/* ============================================================
   cupia — スマホ優先のデザイン
   ============================================================ */
:root {
  --brand: #E0507A;
  --brand-strong: #C93A63;
  --brand-soft: #FDEBF0;
  --brand-ink: #FFFFFF;
  --ink: #2B2330;
  --ink-2: #5E5563;
  --muted: #958C9A;
  --bg: #F6F2F4;
  --card: #FFFFFF;
  --line: #EEE7EA;
  --field: #F7F4F6;
  --danger: #D33A4A;
  --ok: #1E9E6A;
  --ok-soft: #E6F6EF;
  --warn-soft: #FFF5E5;
  --warn-line: #F3D9A8;
  --chat-bg: #F1ECEF;
  --bubble-other: #FFFFFF;
  --bubble-mine: #E0507A;
  --bubble-mine-ink: #FFFFFF;
  --shadow: 0 1px 2px rgba(43, 35, 48, .06), 0 4px 16px rgba(43, 35, 48, .05);
  --radius: 16px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --brand: #F06B8E;
    --brand-strong: #F58AA6;
    --brand-soft: #3A2430;
    --brand-ink: #FFFFFF;
    --ink: #F3EDF1;
    --ink-2: #CFC5CC;
    --muted: #9C929A;
    --bg: #17131A;
    --card: #221D26;
    --line: #322B35;
    --field: #2A242E;
    --danger: #FF6B7A;
    --ok: #4CC994;
    --ok-soft: #1C3229;
    --warn-soft: #33291A;
    --warn-line: #5F4A22;
    --chat-bg: #120F14;
    --bubble-other: #2A242E;
    --bubble-mine: #D9547B;
    --bubble-mine-ink: #FFFFFF;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3);
  }
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic UI", Meiryo, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  letter-spacing: .01em;
}
a { color: var(--brand-strong); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.3rem; line-height: 1.4; margin: 0 0 .5rem; font-weight: 700; }
h2 { font-size: 1.02rem; margin: 0 0 .6rem; font-weight: 700; }
code { font-size: .85em; word-break: break-all; }
hr { border: 0; border-top: 1px solid var(--line); margin: 1.2rem 0; }
img { max-width: 100%; }

/* ---------- ヘッダー・フッター ---------- */
.top {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  height: 56px; padding: 0 16px;
  background: var(--card);
  background: color-mix(in srgb, var(--card) 92%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(12px); backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; }
.brand img { height: 26px; width: auto; display: block; }
.brand:hover { text-decoration: none; }
.logo-dark { display: none !important; }
@media (prefers-color-scheme: dark) {
  .logo-light { display: none !important; }
  .logo-dark { display: block !important; }
}
.wrap { max-width: 640px; margin: 0 auto; padding: 16px 16px 8px; }
.wrap.wide { max-width: 1000px; }
.foot { max-width: 640px; margin: 0 auto; padding: 16px 20px 40px; color: var(--muted); font-size: .78rem; text-align: center; }
.foot a { color: var(--ink-2); font-weight: 600; }
.foot p { margin: .4rem 0 0; }

/* ---------- カード ---------- */
.card { background: var(--card); border-radius: var(--radius); padding: 20px; margin-bottom: 14px; box-shadow: var(--shadow); }
.card.narrow { max-width: 460px; margin-left: auto; margin-right: auto; }
.card.center, .center { text-align: center; }
.headrow { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.headrow h1 { margin: 0; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid2.tight { gap: 10px; }
@media (max-width: 560px) { .grid2 { grid-template-columns: 1fr; } }
.section-title { font-size: .78rem; color: var(--muted); font-weight: 700; letter-spacing: .06em; margin: 22px 6px 8px; }

/* ---------- トップページ ---------- */
.hero { text-align: center; padding: 28px 20px 24px; }
.hero-mark { width: 76px; height: 76px; margin: 4px auto 12px; display: block; filter: drop-shadow(0 6px 14px rgba(224, 80, 122, .3)); }
.hero h1 { font-size: 1.45rem; margin-bottom: .4rem; letter-spacing: .02em; }
.hero p { color: var(--ink-2); font-size: .92rem; margin: 0 0 1.2rem; }
.hero .btn { width: 100%; max-width: 320px; }
.points { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.points span { font-size: .75rem; color: var(--ink-2); background: var(--brand-soft); border-radius: 999px; padding: .2rem .7rem; }

/* 一覧メニュー (設定アプリ風) */
.menu { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; margin-bottom: 14px; }
.menu a { display: flex; align-items: center; gap: 14px; padding: 14px 16px; color: var(--ink); border-top: 1px solid var(--line); }
.menu a:first-child { border-top: 0; }
.menu a:hover { background: var(--field); text-decoration: none; }
.menu .ico { flex: none; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-strong); }
.menu .ico svg { width: 20px; height: 20px; }
.menu .txt { flex: 1; min-width: 0; }
.menu .txt b { display: block; font-size: .98rem; }
.menu .txt small { display: block; color: var(--muted); font-size: .78rem; line-height: 1.4; }
.menu .chev { color: var(--muted); flex: none; }

/* ---------- ボタン ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 48px; padding: .55rem 1.3rem; border-radius: 999px;
  border: 1px solid var(--line); background: var(--card); color: var(--ink);
  font: inherit; font-weight: 700; font-size: .95rem; text-decoration: none; cursor: pointer;
  transition: transform .06s ease, filter .15s ease, background .15s ease;
}
.btn:hover { text-decoration: none; filter: brightness(.98); }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); box-shadow: 0 4px 12px rgba(224, 80, 122, .28); }
.btn.primary:hover { filter: brightness(1.04); }
.btn.danger { color: var(--danger); border-color: var(--line); border-color: color-mix(in srgb, var(--danger) 40%, transparent); background: transparent; }
.btn.small { min-height: 34px; padding: .2rem .85rem; font-size: .82rem; }
.btn.block { width: 100%; }
.actions { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: .8rem; }
.link { font-size: .88rem; font-weight: 600; }
.inline { display: inline; margin: 0; }

/* ---------- フォーム ---------- */
.form { display: flex; flex-direction: column; gap: 1rem; margin-top: .8rem; }
.form + .form { margin-top: 1.2rem; padding-top: 1.2rem; border-top: 1px solid var(--line); }
.form > .btn { margin-top: .3rem; }
label { display: flex; flex-direction: column; gap: .35rem; font-weight: 700; font-size: .88rem; color: var(--ink-2); }
label.check { flex-direction: row; align-items: flex-start; gap: .6rem; font-weight: 500; color: var(--ink); font-size: .92rem; }
label.check input { margin-top: .25rem; width: 20px; height: 20px; flex: none; accent-color: var(--brand); }
label.strong { font-weight: 700; }
input[type=text], input:not([type]), input[type=email], input[type=password], input[type=search], select, textarea {
  width: 100%; font: inherit; font-size: 16px; /* iOSの自動ズーム防止 */
  padding: .75rem .9rem; border: 1.5px solid transparent; border-radius: 12px;
  background: var(--field); color: var(--ink); font-weight: 500;
  transition: border-color .15s ease, background .15s ease;
}
input::placeholder, textarea::placeholder { color: var(--muted); font-weight: 400; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--brand); background: var(--card); }
.row { display: flex; gap: .5rem; }
.row input { flex: 1; min-width: 0; }
.row .btn { flex: none; }
.radios { border: 0; padding: 0; margin: 0; display: flex; gap: 1.2rem; flex-wrap: wrap; }
.req { font-size: .68rem; color: var(--brand-strong); font-weight: 700; background: var(--brand-soft); border-radius: 6px; padding: 0 .35rem; margin-left: .2rem; }
.help { font-size: .78rem; color: var(--muted); font-weight: 400; margin: -.5rem 0 0; line-height: 1.55; }
label .help { margin: 0; }
.help.after-form, .form + .help { margin: .7rem 0 0; }
.pwmsg { font-size: .82rem; margin: -.5rem 0 0; min-height: 1em; font-weight: 600; }
.pwmsg.good { color: var(--ok); }
.pwmsg.bad { color: var(--danger); }
.muted { color: var(--muted); }
.small { font-size: .82rem; }
.warn { color: var(--danger); font-weight: 700; }

/* ---------- お知らせ ---------- */
.flash { padding: .8rem 1rem; border-radius: 12px; margin: 0 0 14px; font-size: .9rem; font-weight: 600; }
.flash ul { margin: 0; padding-left: 1.2rem; }
.flash p { margin: 0 0 .6rem; }
.flash.ok { background: var(--ok-soft); color: var(--ok); }
.flash.err { background: var(--card); border: 1px solid var(--danger); background: color-mix(in srgb, var(--danger) 10%, var(--card)); color: var(--danger); }
@supports (background: color-mix(in srgb, red 10%, white)) { .flash.err { border-color: transparent; } }
.notice { background: var(--warn-soft); border: 1px solid var(--warn-line); border-radius: 12px; padding: .9rem 1rem; font-size: .85rem; margin: .9rem 0; color: var(--ink-2); }
.notice strong { color: var(--ink); }
.notice ul { margin: .4rem 0 0; padding-left: 1.1rem; }
.notice li + li { margin-top: .25rem; }
.safe { background: var(--ok-soft); color: var(--ink-2); border-radius: 12px; padding: .75rem .9rem; font-size: .85rem; margin: 0; }

/* ---------- 検索結果など ---------- */
.results { list-style: none; padding: 0; margin: .8rem 0 0; }
.results li { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .7rem .2rem; border-top: 1px solid var(--line); }
.results .rname { font-weight: 700; }
.rno { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: .06em; font-size: .9em; color: var(--ink-2); }
.roomno {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 2.1rem; font-weight: 700; letter-spacing: .14em;
  margin: .3rem auto .8rem; padding: .5rem 1rem; background: var(--brand-soft); color: var(--brand-strong); border-radius: 14px; display: inline-block;
}
.steps { text-align: left; background: var(--field); border-radius: 12px; padding: .9rem 1rem; margin: 1rem 0; font-size: .9rem; }
.steps ol { margin: .3rem 0; padding-left: 1.3rem; }
.card.center .btn { margin: .3rem; }

/* ---------- 表 ---------- */
.tbl { width: 100%; border-collapse: collapse; margin-top: .8rem; font-size: .9rem; }
.tbl th, .tbl td { text-align: left; padding: .65rem .4rem; border-top: 1px solid var(--line); vertical-align: middle; }
.tbl th { color: var(--muted); font-weight: 700; font-size: .75rem; }
.tbl tr.muted td { color: var(--muted); }
.tbl tr.ok .key { color: var(--ok); }
.tbl td.nowrap { text-align: right; white-space: nowrap; }
.nowrap .inline + .inline { margin-left: 4px; }
.tbl-wrap { overflow-x: auto; }
.key { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 1.25rem; font-weight: 700; letter-spacing: .18em; }
.tag { display: inline-block; font-size: .7rem; font-weight: 700; padding: .05rem .5rem; border-radius: 999px; background: var(--field); color: var(--muted); }
.danger-zone { border: 1px solid var(--line); border: 1px solid color-mix(in srgb, var(--danger) 30%, transparent); box-shadow: none; }
pre.code, textarea.code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: .8rem; background: var(--field); border: 1px solid var(--line); border-radius: 10px; padding: .7rem; white-space: pre; overflow-x: auto; width: 100%; }

/* ============================================================
   チャット画面
   ============================================================ */
.chat-body { height: 100dvh; overflow: hidden; background: var(--chat-bg); }
.chat { display: flex; flex-direction: column; height: 100vh; height: 100dvh; max-width: 760px; margin: 0 auto; background: var(--chat-bg); }
.chat-head {
  display: grid; grid-template-columns: 48px 1fr auto; align-items: center; gap: 4px;
  height: 56px; padding: 0 8px; background: var(--card); border-bottom: 1px solid var(--line);
}
.icon-btn {
  width: 44px; height: 44px; border-radius: 50%; border: 0; background: transparent; color: var(--ink-2);
  display: grid; place-items: center; cursor: pointer; text-decoration: none;
}
.icon-btn:hover { background: var(--field); text-decoration: none; }
.icon-btn svg { width: 24px; height: 24px; }
.chat-title { text-align: center; min-width: 0; line-height: 1.25; }
.chat-title .rname { display: block; font-weight: 700; font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-title .rno { font-size: .72rem; color: var(--muted); }
.exit-btn { min-height: 34px; padding: .2rem .8rem; font-size: .8rem; border-radius: 999px; border: 0; background: var(--brand-soft); color: var(--brand-strong); font: inherit; font-weight: 700; font-size: .8rem; cursor: pointer; }
.chat-nav { display: flex; }

.chat-log { flex: 1; overflow-y: auto; padding: 12px 12px 16px; display: flex; flex-direction: column; overscroll-behavior: contain; }
.chat-note { align-self: center; text-align: center; font-size: .72rem; color: var(--muted); background: var(--card); background: color-mix(in srgb, var(--card) 70%, transparent); border-radius: 12px; padding: .35rem .8rem; margin: 4px 16px 10px; line-height: 1.5; }
.day { align-self: center; font-size: .72rem; font-weight: 700; color: var(--ink-2); background: var(--card); background: color-mix(in srgb, var(--card) 80%, transparent); border-radius: 999px; padding: .15rem .8rem; margin: 14px 0 8px; }

.msg { display: flex; gap: 8px; align-items: flex-start; max-width: 100%; margin-top: 12px; }
.msg.cont { margin-top: 3px; }
.msg.mine { justify-content: flex-end; }
.av {
  flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  color: #fff; font-weight: 700; font-size: .9rem;
}
.msg.cont .av { visibility: hidden; height: 0; }
.av-0 { background: #F28BA6; } .av-1 { background: #8B9CF2; } .av-2 { background: #5CC3A8; } .av-3 { background: #F2B56B; }
.av-4 { background: #B48BF2; } .av-5 { background: #6BB8F2; } .av-6 { background: #E88A6E; } .av-7 { background: #8FBF5A; }
.mbody { min-width: 0; max-width: calc(100% - 96px); display: flex; flex-direction: column; }
.msg.mine .mbody { align-items: flex-end; max-width: 80%; }
.who { font-size: .72rem; color: var(--ink-2); margin: 0 0 3px 4px; display: flex; align-items: center; gap: 6px; }
.badge { font-size: .62rem; font-weight: 700; color: var(--brand-strong); background: var(--brand-soft); border-radius: 999px; padding: 0 .45rem; line-height: 1.6; }
.mrow { display: flex; align-items: flex-end; gap: 6px; max-width: 100%; }
.msg.mine .mrow { flex-direction: row-reverse; }
.when { flex: none; font-size: .66rem; color: var(--muted); line-height: 1.2; padding-bottom: 2px; }
.bubble {
  position: relative; background: var(--bubble-other); color: var(--ink);
  border-radius: 18px; padding: .55rem .9rem; white-space: pre-wrap; overflow-wrap: anywhere;
  box-shadow: 0 1px 1px rgba(43, 35, 48, .06); font-size: .95rem; line-height: 1.55; min-width: 0;
}
.msg:not(.cont):not(.mine) .bubble { border-top-left-radius: 6px; }
.msg.mine:not(.cont) .bubble { border-top-right-radius: 6px; }
.msg.mine .bubble { background: var(--bubble-mine); color: var(--bubble-mine-ink); box-shadow: none; }

/* 入力欄 */
.chat-form {
  display: flex; gap: 6px; align-items: flex-end;
  padding: 8px 10px calc(8px + env(safe-area-inset-bottom)); background: var(--card); border-top: 1px solid var(--line);
}
.chat-form textarea {
  flex: 1; resize: none; max-height: 140px; line-height: 1.45; border-radius: 22px; padding: .6rem 1rem; min-height: 44px;
}
.round-btn {
  flex: none; width: 44px; height: 44px; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer;
  background: transparent; color: var(--ink-2); padding: 0;
}
.round-btn svg { width: 24px; height: 24px; }
.round-btn:hover { background: var(--field); }
.round-btn.send { background: var(--brand); color: #fff; }
.round-btn.send:hover { filter: brightness(1.05); background: var(--brand); }
.round-btn.send svg { width: 22px; height: 22px; margin-left: 2px; }
.chat-err { color: var(--danger); background: var(--card); margin: 0; padding: 0 16px 8px; font-size: .82rem; font-weight: 600; }
.chat-closed { text-align: center; padding: 16px; margin: 0; background: var(--card); color: var(--muted); border-top: 1px solid var(--line); font-size: .9rem; }

/* ファイル */
.attach { cursor: pointer; }
.filecard { display: flex; flex-direction: column; gap: 2px; min-width: 200px; max-width: 280px; }
.filecard .ftop { display: flex; align-items: center; gap: 10px; }
.filecard .fic { flex: none; width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-strong); }
.filecard .fic svg { width: 22px; height: 22px; }
.msg.mine .filecard .fic { background: rgba(255, 255, 255, .22); color: #fff; }
.filecard .fname { font-weight: 700; font-size: .88rem; overflow-wrap: anywhere; line-height: 1.35; }
.filecard .fsize { font-size: .72rem; opacity: .75; }
.filecard .fgone { font-size: .78rem; opacity: .8; margin-top: .3rem; }
.filecard .factions { display: flex; gap: 6px; margin-top: .55rem; }
.filecard .factions .btn { flex: 1; min-height: 34px; font-size: .8rem; padding: .2rem .6rem; }
.msg.mine .filecard .factions .btn { background: rgba(255, 255, 255, .95); color: var(--brand-strong); border-color: transparent; }
.upbar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 10px 16px; background: var(--card); border-top: 1px solid var(--line); font-size: .82rem; }
.upbar[hidden] { display: none; }
.upinfo { flex: 1 1 100%; display: flex; justify-content: space-between; gap: 8px; min-width: 0; font-weight: 600; }
.upinfo #upname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upprog { flex: 1; height: 6px; background: var(--field); border-radius: 3px; overflow: hidden; }
.upprog #upfill { height: 100%; width: 0; background: var(--brand); transition: width .2s; border-radius: 3px; }
.viewer { position: fixed; inset: 0; background: rgba(10, 6, 12, .92); z-index: 20; display: flex; flex-direction: column; }
.viewer[hidden] { display: none; }
.viewer-bar { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 16px; color: #fff; font-size: .9rem; }
.viewer-bar span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.viewer-body { flex: 1; display: flex; align-items: center; justify-content: center; padding: 8px; min-height: 0; }
.viewer-body img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; }

/* アプリ切り替え時などにぼかす */
.shield { display: none; }
.hidden-content .chat { filter: blur(16px); }
.hidden-content .shield {
  display: flex; flex-direction: column; gap: 10px; position: fixed; inset: 0; align-items: center; justify-content: center;
  font-weight: 700; color: var(--ink); background: rgba(128,128,128,.15); background: color-mix(in srgb, var(--bg) 40%, transparent); cursor: pointer; z-index: 10;
}
.shield img { width: 56px; height: 56px; }

/* ---------- 運営者画面 ---------- */
.admin-nav { display: flex; gap: .4rem; flex-wrap: wrap; justify-content: flex-end; }
.top.admin { height: auto; min-height: 56px; padding: 8px 16px; flex-wrap: wrap; }
.admin-msg { border-top: 1px solid var(--line); padding: .6rem 0; }
.admin-msg .meta { font-size: .76rem; color: var(--muted); }
.admin-msg.old { opacity: .6; }
.admin-msg .body { white-space: pre-wrap; overflow-wrap: anywhere; }
.tbl .btn { white-space: nowrap; }
/* 運営者画面: スマホ対応 */
.row select { flex: none; width: auto; max-width: 40%; }
.tbl-wrap .tbl { min-width: 560px; }
.tbl-wrap .tbl th { white-space: nowrap; }
.top.admin { flex-direction: column; align-items: stretch; gap: 8px; }
.top.admin .admin-nav { flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start; padding-bottom: 2px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.top.admin .admin-nav::-webkit-scrollbar { display: none; }
.top.admin .admin-nav .btn { flex: none; }
@media (min-width: 900px) {
  .top.admin { flex-direction: row; align-items: center; }
  .top.admin .admin-nav { justify-content: flex-end; }
}
.top.admin .admin-nav { align-items: center; flex: none; }
.top.admin .admin-nav .btn { height: 34px; min-height: 34px; }
.top.admin .admin-nav form { flex: none; }
/* 特長・使い方・よくある質問 */
.features { display: flex; flex-direction: column; gap: 16px; }
.feat { display: flex; gap: 14px; align-items: flex-start; }
.feat .fi { flex: none; width: 44px; height: 44px; border-radius: 12px; background: var(--brand-soft); display: grid; place-items: center; font-size: 1.3rem; }
.feat h2 { font-size: .98rem; margin: 0 0 .15rem; }
.feat p { margin: 0; font-size: .85rem; color: var(--ink-2); line-height: 1.6; }
.howto { list-style: none; counter-reset: step; padding: 0; margin: 0 0 1rem; display: flex; flex-direction: column; gap: 14px; }
.howto li { counter-increment: step; position: relative; padding-left: 44px; }
.howto li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 30px; height: 30px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 700; display: grid; place-items: center; font-size: .9rem; }
.howto b { display: block; }
.howto span { display: block; font-size: .87rem; color: var(--ink-2); }
.faq details { border-top: 1px solid var(--line); }
.faq details:first-child { border-top: 0; }
.faq summary { cursor: pointer; padding: .85rem 1.8rem .85rem 0; font-weight: 700; font-size: .93rem; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "＋"; position: absolute; right: 2px; top: .8rem; color: var(--brand); font-weight: 700; }
.faq details[open] summary::after { content: "－"; }
.faq details p { margin: 0 0 1rem; font-size: .88rem; color: var(--ink-2); }
.foot-links { display: flex; justify-content: center; gap: 1.2rem; flex-wrap: wrap; }
/* 公開設定・入室リクエスト */
.field-title { font-weight: 700; font-size: .88rem; color: var(--ink-2); margin-bottom: -.4rem; }
.choices { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.choice { flex-direction: row; align-items: flex-start; gap: .7rem; padding: .75rem .9rem; border: 1.5px solid var(--line); border-radius: 12px; cursor: pointer; font-weight: 400; color: var(--ink); }
.choice input { margin-top: .25rem; width: 20px; height: 20px; flex: none; accent-color: var(--brand); }
.choice span { display: flex; flex-direction: column; }
.choice b { font-size: .92rem; }
.choice small { font-size: .78rem; color: var(--muted); line-height: 1.5; }
.choice:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.results li { flex-wrap: wrap; }
.results .rinfo { display: flex; flex-direction: column; min-width: 0; }
.room-pill { display: inline-flex; flex-direction: column; background: var(--brand-soft); border-radius: 12px; padding: .5rem .9rem; margin: .2rem 0 .6rem; }
.room-pill .rno { font-size: .78rem; }
.counter { text-align: right; }
.card.attention { border: 1.5px solid var(--brand); }
.count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--brand); color: #fff; font-size: .75rem; margin-left: 4px; vertical-align: 2px; }
.request { border-top: 1px solid var(--line); padding: .8rem 0; }
.request:first-of-type { border-top: 0; }
.req-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.req-comment { margin: .35rem 0 .6rem; font-size: .9rem; white-space: pre-wrap; overflow-wrap: anywhere; background: var(--field); border-radius: 10px; padding: .6rem .8rem; }
.req-actions { display: flex; gap: 8px; }
.icon-btn { position: relative; }
.icon-btn .dot { position: absolute; top: 4px; right: 2px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 999px; background: var(--brand); color: #fff; font-size: .66rem; font-weight: 700; display: grid; place-items: center; border: 2px solid var(--card); }
/* ハウス */
.crumbs { margin: 0 4px 10px; font-size: .88rem; font-weight: 700; }
.house-head h1 { margin: 0; font-size: 1.2rem; }
.roomcard { padding: 16px 18px; }
.rc-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.rc-title { display: flex; flex-direction: column; min-width: 0; }
.rc-title b { font-size: 1.05rem; overflow-wrap: anywhere; }
.rc-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: .5rem 0 .8rem; }
.warn-tag { background: color-mix(in srgb, var(--danger) 12%, var(--card)); color: var(--danger); }
.req-note { color: var(--brand-strong); font-weight: 700; }
.rc-actions { display: flex; gap: 8px; }
.rc-actions .btn { min-height: 40px; padding: .3rem 1.1rem; }
.headrow .btn, .headrow form { flex: none; white-space: nowrap; }
.tag-own { background: var(--brand-soft); color: var(--brand-strong); }
.hero-sub { margin: .8rem 0 0 !important; }
/* マイタイトル・メモ (自分だけに見える) */
.my-title { display: block; color: var(--brand-strong); font-weight: 700; font-size: .9rem; margin-top: 2px; overflow-wrap: anywhere; }
.chat-title .small-title { font-size: .72rem; margin-top: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.my-memo { margin: -.2rem 0 .8rem; padding: .5rem .75rem; background: var(--field); border-radius: 10px; font-size: .84rem; color: var(--ink-2); white-space: pre-wrap; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.note-edit { margin-top: .7rem; border-top: 1px solid var(--line); padding-top: .55rem; }
.note-edit summary { cursor: pointer; font-size: .82rem; font-weight: 700; color: var(--ink-2); list-style: none; }
.note-edit summary::-webkit-details-marker { display: none; }
.note-edit[open] summary { color: var(--brand-strong); }
/* 料金プラン・プレミアム */
.plan-table { min-width: 0 !important; }
.plan-table th, .plan-table td { text-align: center; vertical-align: middle; font-size: .85rem; }
.plan-table td:first-child, .plan-table th:first-child { text-align: left; color: var(--ink-2); font-weight: 600; font-size: .8rem; }
.plan-table th.pr, .plan-table td.pr { background: var(--brand-soft); color: var(--brand-strong); font-weight: 700; }
.plan-table thead th { font-size: .9rem; color: var(--ink); }
.plan-table thead th.pr { border-radius: 10px 10px 0 0; }
.plan-table small { font-weight: 500; font-size: .7rem; line-height: 1.4; display: inline-block; }
.plan-table tr.price b { font-size: 1rem; }
.plan-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: .4rem 0 1rem; }
.plan-choice { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 16px 10px 12px; border: 1.5px solid var(--line); border-radius: 14px; color: var(--ink); text-align: center; }
.plan-choice:hover { text-decoration: none; border-color: var(--brand); }
.plan-choice.best { border-color: var(--brand); background: var(--brand-soft); }
.plan-choice .pp { font-size: 1.15rem; font-weight: 800; color: var(--brand-strong); }
.plan-choice small { font-size: .7rem; color: var(--muted); }
.ribbon { position: absolute; top: -10px; background: var(--brand); color: #fff; font-size: .68rem; font-weight: 700; border-radius: 999px; padding: .05rem .6rem; }
.plan-notes { padding-left: 1.1rem; margin: .5rem 0 0; }
.plan-notes li + li { margin-top: .3rem; }
.plan-card .plan-head { display: flex; align-items: center; gap: 8px; margin-bottom: .3rem; }
.plan-card.is-premium { border: 1.5px solid var(--brand); }
.plan-badge { font-size: .62rem; font-weight: 800; letter-spacing: .08em; color: #fff; background: linear-gradient(135deg, #F27A98, #C93A63); border-radius: 6px; padding: .1rem .45rem; }
.card-element { padding: .8rem .9rem; border-radius: 12px; background: var(--field); border: 1.5px solid transparent; min-height: 48px; }
.pay-err { color: var(--danger); font-size: .85rem; font-weight: 600; margin: -.4rem 0 0; min-height: 1em; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg-item { flex-direction: row; font-weight: 600; }
.seg-item input { position: absolute; opacity: 0; pointer-events: none; }
.seg-item span { display: inline-block; padding: .4rem .8rem; border-radius: 999px; border: 1.5px solid var(--line); font-size: .85rem; cursor: pointer; }
.seg-item input:checked + span { background: var(--brand); border-color: var(--brand); color: #fff; }
.seg-item input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.tbl.legal th { width: 32%; color: var(--ink-2); font-size: .8rem; white-space: normal; vertical-align: top; }
.days-in { max-width: 70px; flex: none !important; text-align: center; }
/* 有料相談 */
.field-title.mt { margin-top: 1rem; }
.consult-card { border: 1.5px dashed var(--line); }
.price-box { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; background: var(--brand-soft); border-radius: 12px; padding: .7rem 1rem; margin: .6rem 0; }
.price-box b { font-size: 1.6rem; color: var(--brand-strong); }
.price-box span { font-size: .85rem; color: var(--ink-2); }
.intro { white-space: normal; font-size: .92rem; color: var(--ink-2); background: var(--field); border-radius: 10px; padding: .7rem .9rem; }
.sessions { border-top: 1px solid var(--line); margin: .2rem 0 .8rem; padding-top: .5rem; display: flex; flex-direction: column; gap: 4px; }
.session-row { margin: 0; }
.session-btn { width: 100%; display: flex; align-items: center; gap: 10px; background: var(--field); border: 0; border-radius: 10px; padding: .55rem .8rem; font: inherit; color: var(--ink); cursor: pointer; text-align: left; }
.session-btn b { flex: 1; font-size: .9rem; }
.session-btn .chev-s { color: var(--muted); }
details.apply { border-top: 1px solid var(--line); padding: .6rem 0; }
details.apply summary { cursor: pointer; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
/* チェックボックス付きの文 (リンクを含んでも崩れないように) */
label.check { display: block; position: relative; padding-left: 1.9rem; }
label.check input { position: absolute; left: 0; top: .15rem; margin: 0; }
/* 表記の表は横スクロールさせず折り返す */
.tbl-wrap .tbl.legal { min-width: 0; }
.tbl.legal td { overflow-wrap: anywhere; }

/* 参加キーを伝える */
.tbl tr.share-row td { border-top: 0; padding-top: 0; }
details.share > summary { cursor: pointer; color: var(--brand-strong); font-weight: 700; font-size: .9rem; padding: .3rem 0; }
.share-body { background: var(--field); border-radius: 12px; padding: .9rem; margin-top: .4rem; }
.copy-list { display: grid; gap: .5rem; }
.copy-item { display: grid; grid-template-columns: 5.5rem 1fr auto; align-items: center; gap: .5rem; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: .45rem .6rem; }
.copy-lbl { font-size: .78rem; color: var(--muted); font-weight: 700; }
.copy-val { font-size: 1rem; font-weight: 700; letter-spacing: .05em; overflow-wrap: anywhere; min-width: 0; }
.copy-val.url { font-size: .8rem; font-weight: 400; letter-spacing: 0; }
textarea.invite-text { width: 100%; font-size: .85rem; line-height: 1.6; resize: vertical; box-sizing: border-box; }
.share-btns { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .6rem; }
.btn.line { background: #06c755; border-color: #06c755; color: #fff; }
.btn.copied { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn.copy-ng { background: var(--danger); border-color: var(--danger); color: #fff; }
.share-mail { margin-top: .3rem; }
.copy-tmp { position: fixed; top: -1000px; left: 0; opacity: 0; }
@media (max-width: 480px) { .copy-item { grid-template-columns: 1fr auto; } .copy-lbl { grid-column: 1 / -1; } }
.share-body input, .share-body textarea { background: var(--card); border: 1px solid var(--line); }
.share-body .field-title.mt { margin-top: 1.1rem; margin-bottom: .4rem; }
.share-mail label { display: block; margin-bottom: .6rem; }

/* ================= PAL・トーク ================= */
.pal-cta { display: block; margin: 0 0 1rem; padding: 1rem 1.2rem; border-radius: var(--radius); background: linear-gradient(135deg, var(--brand) 0%, #F28AA8 100%); color: #fff; box-shadow: 0 6px 20px rgba(224, 80, 122, .28); text-decoration: none; }
.pal-cta:hover { text-decoration: none; filter: brightness(1.03); }
.pal-cta b { display: block; font-size: 1.15rem; }
.pal-cta small { display: block; opacity: .92; margin-top: .2rem; }
.pal-cta.big { text-align: center; padding: 1.3rem 1.2rem; }
.pal-cta.big b { font-size: 1.45rem; letter-spacing: .04em; }
.pal-cta.big b::after { content: ' ›'; }
.pal-cta-k { display: block; font-size: .82rem; opacity: .95; margin-bottom: .25rem; }
.pal-hero { text-align: center; padding: 1.2rem .5rem .6rem; }
.pal-hero h1 { font-size: 1.45rem; line-height: 1.5; margin: .3rem 0 .6rem; }
.pal-kicker { color: var(--brand-strong); font-weight: 700; font-size: .85rem; margin: 0; letter-spacing: .06em; }
.card.soft { background: var(--brand-soft); }
.pal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .7rem; margin-top: .6rem; }
.pal-card { display: flex; gap: .8rem; padding: .8rem; border: 1px solid var(--line); border-radius: 14px; background: var(--card); color: var(--ink); text-decoration: none; min-width: 0; }
.pal-card:hover { text-decoration: none; border-color: var(--brand); }
.pal-ph { position: relative; flex: 0 0 auto; width: 72px; height: 72px; border-radius: 50%; overflow: hidden; background: var(--field); display: grid; place-items: center; }
.pal-ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pal-ph.none span { font-size: 1.6rem; font-weight: 700; color: var(--brand-strong); }
.pal-ph.big { width: 120px; height: 120px; }
.pal-ph.big.none span { font-size: 2.6rem; }
.standby-dot { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); background: var(--ok); color: #fff; font-style: normal; font-size: .6rem; font-weight: 700; padding: .05rem .4rem; border-radius: 6px; white-space: nowrap; }
.pal-info { display: flex; flex-direction: column; gap: .2rem; min-width: 0; }
.pal-name { font-size: 1.02rem; }
.pal-meta { font-size: .78rem; color: var(--muted); }
.pal-cats { display: flex; flex-wrap: wrap; gap: .25rem; margin: 0; }
.pal-cats i { font-style: normal; font-size: .72rem; background: var(--brand-soft); color: var(--brand-strong); padding: .1rem .5rem; border-radius: 999px; }
.pal-stats { display: flex; flex-wrap: wrap; align-items: baseline; gap: .2rem .6rem; font-size: .8rem; }
.score { color: #E39B00; }
.pal-stats .price { margin-left: auto; color: var(--ink); }
.row-btns { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.row-btns form { margin: 0; }
.list-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .5rem; }
.list-head h2 { margin: 0; }
.seg.sort { display: flex; flex-wrap: wrap; gap: .3rem; }
.seg.sort .seg-item { font-size: .78rem; padding: .3rem .7rem; border: 1px solid var(--line); border-radius: 999px; color: var(--ink-2); text-decoration: none; }
.seg.sort .seg-item.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.pager { display: flex; flex-wrap: wrap; justify-content: center; gap: .3rem; margin-top: 1rem; }
.pager a { min-width: 2.2rem; text-align: center; padding: .3rem .5rem; border: 1px solid var(--line); border-radius: 8px; text-decoration: none; }
.pager a.on { background: var(--brand); color: #fff; border-color: var(--brand); }
.pal-top { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.pal-title { margin: 0 0 .3rem; }
.standby-badge { display: inline-block; margin: 0 0 .4rem; color: var(--ok); background: var(--ok-soft); font-weight: 700; font-size: .85rem; padding: .2rem .7rem; border-radius: 999px; }
.pal-rating { margin: .4rem 0 .2rem; }
.pal-rating .score { font-size: 1.3rem; }
.pal-dl { display: grid; grid-template-columns: 5rem 1fr; gap: .3rem .8rem; margin: 1rem 0; font-size: .9rem; }
.pal-dl dt { color: var(--muted); font-weight: 700; }
.pal-dl dd { margin: 0; }
.slot-day { display: flex; gap: .6rem; padding: .5rem 0; border-top: 1px solid var(--line); align-items: flex-start; }
.slot-date { flex: 0 0 4.5rem; font-weight: 700; font-size: .88rem; padding-top: .35rem; }
.slot-list { display: flex; flex-wrap: wrap; gap: .4rem; }
.slot { display: inline-block; padding: .35rem .75rem; border: 1px solid var(--brand); color: var(--brand-strong); border-radius: 10px; font-weight: 700; font-size: .88rem; text-decoration: none; background: var(--card); cursor: pointer; font-family: inherit; }
.slot:hover { background: var(--brand-soft); text-decoration: none; }
.slot.booked { border-color: var(--line); color: var(--muted); cursor: default; background: var(--field); }
.slot.del { border-color: var(--line); color: var(--ink-2); }
fieldset.checks { border: 0; padding: 0; margin: 0 0 .9rem; display: flex; flex-wrap: wrap; gap: .4rem; }
fieldset.checks legend { margin-bottom: .4rem; padding: 0; }
.chip { display: inline-flex; align-items: center; gap: .3rem; padding: .35rem .7rem; border: 1px solid var(--line); border-radius: 999px; font-size: .85rem; cursor: pointer; background: var(--card); }
.chip:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-strong); font-weight: 700; }
.chip input { margin: 0; }
.chip.time { font-variant-numeric: tabular-nums; padding: .3rem .55rem; font-size: .8rem; }
.talk-list { list-style: none; padding: 0; margin: .4rem 0 0; }
.talk-list li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem; padding: .7rem .2rem; border-top: 1px solid var(--line); }
.talk-list li > div:first-child { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.talk-list li.hot { background: var(--ok-soft); border-radius: 10px; padding: .7rem; }
.talk-list li.soon { background: var(--warn-soft); border-radius: 10px; padding: .7rem; }
.notice-line { font-size: .82rem; font-weight: 700; color: var(--brand-strong); }
.talk-list li.hot .notice-line { color: var(--ok); }
.talks-card { border: 2px solid var(--brand-soft); }
.photo-edit { display: flex; gap: 1rem; align-items: flex-start; flex-wrap: wrap; margin-bottom: 1rem; }
.photo-edit form { margin: 0 0 .4rem; }
.reviews { list-style: none; padding: 0; margin: 0; }
.reviews li { padding: .7rem 0; border-top: 1px solid var(--line); }
.reviews li p { margin: .3rem 0 0; font-size: .9rem; }
.reviews form { margin-top: .3rem; }
.score-pick { border: 0; padding: 0; margin: 0 0 1rem; display: grid; gap: .3rem; }
.score-opt { display: flex; align-items: center; gap: .5rem; padding: .45rem .7rem; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.score-opt:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); font-weight: 700; }
.warn-box { background: var(--warn-soft); border: 1px solid var(--warn-line); border-radius: 12px; padding: .8rem 1rem; margin: .8rem 0; }
.warn-box ul { margin: .4rem 0; padding-left: 1.2rem; }
.warn-box p { margin: .3rem 0 0; }
.admin-ph { border-radius: 50%; object-fit: cover; }
.standby-btn { min-height: 52px; font-size: 1.05rem; }
form[inert] { opacity: .55; }

/* ルーム: 写真・ファイルの送信ボタン */
.attach-bar { display: flex; align-items: center; gap: .6rem; padding: 8px 12px 0; background: var(--card); border-top: 1px solid var(--line); }
.attach-btn { display: inline-flex; align-items: center; gap: .4rem; padding: .4rem .85rem; border: 1px solid var(--brand); color: var(--brand-strong); border-radius: 999px; font-size: .85rem; font-weight: 700; cursor: pointer; background: var(--card); }
.attach-btn:hover { background: var(--brand-soft); }
.attach-btn svg { width: 20px; height: 20px; }
.attach-hint { font-size: .75rem; color: var(--muted); }
.attach-bar + .chat-form { border-top: 0; }

/* トークルームの残り時間 */
.talk-bar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .2rem .8rem; padding: 8px 14px; background: var(--brand-soft); color: var(--ink); font-size: .82rem; border-bottom: 1px solid var(--line); }
.talk-left { font-weight: 700; }
.talk-bar.phase-live { background: var(--ok-soft); }
.talk-bar.soon { background: var(--warn-soft); }
.talk-bar.soon .talk-left { color: var(--danger); }
.talk-bar.phase-after, .talk-bar.phase-cancelled { background: var(--field); color: var(--muted); }
.chat-closed .btn { margin-top: .5rem; }
.pal-ph { overflow: visible; }
.pal-ph img { border-radius: 50%; }
.standby-dot { bottom: -8px; font-size: .62rem; padding: .1rem .45rem; box-shadow: 0 0 0 2px var(--card); }
.hero .btn.pal-hero-btn { margin-top: .6rem; background: var(--card); color: var(--brand-strong); border: 2px solid var(--brand); font-weight: 700; }
.attach-bar .attach-btn { flex-direction: row; display: inline-flex; margin: 0; width: auto; min-height: 36px; }
label.chip, label.score-opt { flex-direction: row; font-weight: 500; color: var(--ink); }

/* トップページ (PAL が主役) */
.pal-top-hero h1 { font-size: 1.6rem; line-height: 1.5; margin: .3rem 0 .8rem; }
.pal-top-hero .btn + .btn { margin-top: .6rem; }
.pal-about h2 { margin-top: 0; }
.steps2 { display: grid; grid-template-columns: 1fr; gap: .9rem; margin: 1rem 0; }
@media (min-width: 640px) { .steps2 { grid-template-columns: 1fr 1fr; } }
.step-col { background: var(--field); border-radius: 14px; padding: .9rem 1rem 1rem; }
.step-col h3 { margin: 0 0 .5rem; font-size: 1rem; }
.step-col ol { margin: 0 0 .8rem; padding-left: 1.3rem; }
.step-col li { margin-bottom: .45rem; font-size: .88rem; }
.step-col li b { display: block; }
.step-col li span { color: var(--ink-2); font-size: .82rem; }
.chat-hero h2 { font-size: 1.15rem; line-height: 1.5; margin: .3rem 0 .5rem; }
.nb { display: inline-block; }
.pal-top-hero h1 { font-size: 1.5rem; }

/* 犯罪への加担を禁止する警告 */
.crime-warning { border: 2px solid var(--danger); background: color-mix(in srgb, var(--danger) 7%, var(--card)); border-radius: 12px; padding: .8rem 1rem; margin: 0 0 1rem; color: var(--ink); }
.crime-warning .cw-title { color: var(--danger); font-weight: 800; margin: 0 0 .4rem; font-size: .98rem; }
.crime-warning ul { margin: 0; padding-left: 1.2rem; font-size: .84rem; line-height: 1.7; }
.crime-warning li { margin-bottom: .25rem; }
.legal-doc h2 { font-size: 1.02rem; margin-top: 1.4rem; }
.legal-doc li { margin-bottom: .35rem; font-size: .9rem; }
.legal-doc p { font-size: .9rem; }

/* 経験・お気に入り・相談メモ */
.tagline { font-weight: 800; font-size: 1.05rem; line-height: 1.6; color: var(--brand-strong); margin: .4rem 0 1rem !important; letter-spacing: .02em; }
.pal-exp { font-size: .76rem; color: var(--ink-2); }
.exp-chips { display: flex; flex-wrap: wrap; gap: .35rem; margin: .3rem 0 1rem; }
.exp-chips i { font-style: normal; font-size: .82rem; background: var(--ok-soft); color: var(--ok); border-radius: 999px; padding: .2rem .7rem; font-weight: 700; }
details.exp-group { border: 1px solid var(--line); border-radius: 12px; padding: .5rem .8rem; margin-bottom: .5rem; }
details.exp-group > summary { cursor: pointer; font-weight: 700; font-size: .92rem; }
details.exp-group .checks { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .6rem; }
.exp-n { display: inline-block; margin-left: .5rem; min-width: 1.4rem; text-align: center; background: var(--brand); color: #fff; border-radius: 999px; font-size: .72rem; padding: 0 .4rem; }
.fav-form { display: flex; flex-wrap: wrap; gap: .4rem; margin: .5rem 0 .2rem; }
.btn.fav.on { background: var(--brand-soft); color: var(--brand-strong); border-color: var(--brand); }
.fav-list { list-style: none; padding: 0; margin: 0; }
.fav-list li { display: flex; flex-direction: column; gap: .15rem; padding: .6rem 0; border-top: 1px solid var(--line); }
.memo-peek { margin-top: .3rem; font-size: .82rem; }
.memo-peek summary { cursor: pointer; color: var(--brand-strong); font-weight: 700; }
.memo-peek p { background: var(--field); border-radius: 8px; padding: .5rem .7rem; margin: .3rem 0 0; }
details.pal-memo { background: var(--warn-soft); border-bottom: 1px solid var(--warn-line); padding: 6px 14px; font-size: .84rem; }
details.pal-memo > summary { cursor: pointer; font-weight: 700; }
details.pal-memo textarea { width: 100%; box-sizing: border-box; background: var(--card); margin-top: .4rem; }
details.pal-memo .form { margin: 0 0 .4rem; }
.fav-form { margin-bottom: .6rem; }
.fav-form .btn { margin: 0; }
.fav-form + .help { display: block; margin-top: .4rem; clear: both; }
.exp-add { display: flex; flex-wrap: wrap; gap: .3rem; align-items: center; margin: 0; }
.exp-add select, .exp-add input { min-height: 34px; padding: .2rem .5rem; font-size: .82rem; width: auto; }
.search-result { margin-top: 1rem; border-top: 1px solid var(--line); padding-top: .8rem; }
.room-results li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .4rem; }
.room-intro { display: block; font-size: .82rem; color: var(--ink-2); margin-top: .3rem; line-height: 1.6; white-space: normal; }
.room-intro.box { background: var(--field); border-radius: 10px; padding: .6rem .8rem; margin: .6rem 0; }
.room-intro-note { text-align: left; }
.room-results .rinfo { flex: 1 1 60%; min-width: 0; }
.op-back { margin: .6rem 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.soon-box { background: var(--warn-soft); border: 1px solid var(--warn-line); border-radius: 12px; padding: .7rem 1rem; margin: .4rem 0; font-weight: 700; color: var(--ink); }
.toggle-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; background: var(--field); border-radius: 10px; padding: .6rem .8rem; margin: .6rem 0; }
.room-qualify { display: block; font-size: .82rem; color: var(--ink); margin-top: .3rem; line-height: 1.6; }
.room-qualify.box { background: var(--ok-soft); border-radius: 10px; padding: .6rem .8rem; margin: .6rem 0; }

/* ---- 有料ルーム ---- */
.tag-paid { background: var(--warn-soft); color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--warn-line); }
.paid-make { border: 1px dashed var(--warn-line); border-radius: 12px; padding: .7rem .9rem; margin: .4rem 0 .8rem; }
.paid-opts { margin-top: .5rem; }
.paid-state { background: var(--brand-soft); border-radius: 10px; padding: .6rem .9rem; margin: .4rem 0 .6rem; }
.paid-state.expired { background: color-mix(in srgb, var(--danger) 12%, var(--card)); color: var(--danger); font-weight: 700; }
.paid-rules { margin: .6rem 0; }
.paid-rules summary, .other-card summary { cursor: pointer; font-weight: 600; font-size: .92rem; }
.saved-pay { border: 1px solid var(--line); border-radius: 12px; padding: .8rem .9rem; margin: .6rem 0; }
.other-card { margin: .6rem 0; }
.tds-box { background: var(--brand-soft); border-radius: 12px; padding: .9rem 1rem; }
.renew-btn { box-shadow: inset 0 0 0 1px var(--warn-line); background: var(--warn-soft); }
.paid-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .8rem; background: var(--warn-soft); color: var(--ink); box-shadow: inset 0 0 0 1px var(--warn-line); border-radius: 10px; padding: .5rem .8rem; margin: .4rem 0; font-size: .9rem; }
.paid-bar .btn { margin-left: auto; }
.promo-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .8rem; background: var(--brand-soft); border-radius: 10px; padding: .5rem .8rem; margin: .4rem 0; font-size: .9rem; }
.promo-bar .btn { margin-left: auto; }
.room-paid { display: block; margin-top: .25rem; }

/* ---- LINE で確認 ---- */
.line-step { border: 1px solid var(--line); border-radius: 12px; padding: .8rem .95rem; margin: .4rem 0 .6rem; background: var(--field); }
.line-step-title { margin: 0 0 .3rem; }
.line-btn { background: #06C755; color: #fff; border-color: #06C755; font-weight: 700; margin-top: .5rem; }
.line-btn:hover { background: #05b34c; }
.line-done { background: var(--ok-soft); color: var(--ok); border-radius: 10px; padding: .5rem .8rem; font-weight: 700; }

/* ---- 自分の書き込みの削除 ---- */
.mdel { display: block; margin-top: 2px; padding: 0; border: 0; background: none; color: var(--muted); font-size: .68rem; text-decoration: underline; cursor: pointer; }
.mdel:hover { color: var(--danger); }
.bubble.deleted { background: transparent !important; color: var(--muted) !important; font-style: italic; font-size: .82rem; box-shadow: inset 0 0 0 1px var(--line); }

/* ---- チャットのプレミアム機能 ---- */
.mmore { display: block; margin-top: 2px; padding: 0 .3rem; border: 0; background: none; color: var(--muted); font-size: .9rem; line-height: 1; cursor: pointer; letter-spacing: .05em; }
.mmore:hover { color: var(--brand); }
.when .edited { display: block; font-size: .62rem; }
.when .rd { display: block; font-size: .62rem; color: var(--brand-strong); }
.quote { display: flex; flex-direction: column; align-items: flex-start; max-width: 100%; margin: 0 0 3px; padding: .25rem .6rem; border: 0; border-left: 3px solid var(--brand); border-radius: 6px; background: var(--field); color: var(--ink-2); font-size: .74rem; text-align: left; cursor: pointer; }
.quote b { font-size: .7rem; color: var(--brand-strong); }
.quote span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; }
.msg.mine .quote { align-self: flex-end; }
.reacts { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 3px; }
.msg.mine .reacts { justify-content: flex-end; }
.react { border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 1px 8px; font-size: .78rem; cursor: pointer; color: var(--ink); }
.react.on { border-color: var(--brand); background: var(--brand-soft); }
.msg-menu { position: relative; z-index: 5; margin-top: 4px; padding: .45rem; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 4px; min-width: 180px; }
.msg.mine .msg-menu { align-self: flex-end; }
.emo-row { display: flex; gap: 2px; }
.emo { border: 0; background: none; font-size: 1.25rem; padding: 2px 4px; cursor: pointer; border-radius: 8px; }
.emo:hover { background: var(--field); }
.menu-btn { border: 0; background: var(--field); color: var(--ink); text-align: left; padding: .4rem .6rem; border-radius: 8px; font-size: .85rem; cursor: pointer; }
.menu-btn:hover { background: var(--brand-soft); }
.flash-hit .bubble { outline: 3px solid var(--brand); outline-offset: 2px; transition: outline-color .3s; }
.pin-bar { display: flex; flex-direction: column; gap: 2px; padding: .35rem .6rem; background: var(--card); border-bottom: 1px solid var(--line); }
.pin-item { display: flex; align-items: center; gap: 4px; }
.pin-go { flex: 1; min-width: 0; display: flex; gap: 6px; align-items: baseline; border: 0; background: none; padding: 2px 0; text-align: left; cursor: pointer; color: var(--ink); font-size: .8rem; }
.pin-go b { flex: none; font-size: .74rem; color: var(--brand-strong); }
.pin-go span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pin-x { border: 0; background: none; color: var(--muted); font-size: 1rem; cursor: pointer; }
.search-panel { padding: .5rem .6rem; background: var(--card); border-bottom: 1px solid var(--line); }
.search-row { display: flex; gap: 6px; }
.search-row input { flex: 1; min-width: 0; }
.search-results { list-style: none; margin: .4rem 0 0; padding: 0; max-height: 40vh; overflow-y: auto; }
.search-results .hit { display: flex; flex-direction: column; width: 100%; border: 0; background: none; text-align: left; padding: .35rem .2rem; border-bottom: 1px solid var(--line); cursor: pointer; color: var(--ink); }
.hit-meta { font-size: .7rem; color: var(--muted); }
.hit-text { font-size: .85rem; }
.compose-bar { display: flex; align-items: center; gap: 8px; padding: .35rem .7rem; background: var(--brand-soft); font-size: .8rem; color: var(--ink-2); }
.compose-bar span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sched-panel { padding: .5rem .7rem; background: var(--card); border-top: 1px solid var(--line); }
.sched-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: .82rem; }
.sched-list { list-style: none; margin: .4rem 0 0; padding: 0; font-size: .8rem; }
.sched-list li { display: flex; align-items: center; gap: 6px; padding: .25rem 0; border-bottom: 1px solid var(--line); }
.sched-when { flex: none; color: var(--brand-strong); }
.sched-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.round-btn.sched { background: var(--field); color: var(--ink-2); }
.compose-bar[hidden], .pin-bar[hidden], .search-panel[hidden], .sched-panel[hidden] { display: none !important; }
.chat-head.has-search { grid-template-columns: 48px 1fr 44px auto; }

/* ---- カード入力 (fincode) ---- */
.card-fields { border: 1px solid var(--line); border-radius: 12px; padding: .7rem .8rem .2rem; margin: .4rem 0; background: var(--field); }
.card-fields input { font-variant-numeric: tabular-nums; letter-spacing: .04em; }

/* ---- 売上と振り込み ---- */
.earn-boxes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: .6rem 0; }
.earn-box { background: var(--field); border-radius: 12px; padding: .55rem .7rem; display: flex; flex-direction: column; gap: 2px; }
.earn-box span { font-size: .75rem; color: var(--muted); }
.earn-box b { font-size: 1.1rem; }
.earn-box.main { background: var(--brand-soft); }
.earn-box.main b { color: var(--brand-strong); font-size: 1.35rem; }
.payout-req { border: 1px solid var(--line); border-radius: 12px; padding: .6rem .8rem; margin: .5rem 0; }
