/* chashitsu（計画3）：墨が主役、アクセントは立てた抹茶の緑ひとつ。白は白、灰は灰、墨は墨。全部ゴシック */
:root {
  --white: #FFFFFF; --ink: #1C1C1C; --ink-2: #3A3A3A; --muted: #6E6E6E; --line: #E6E6E6; --soft: #F5F5F5;
  --sumi: #1B1B1B; --sumi-deep: #111111; --side-text: #D6D6D6; --side-dim: #8F8F8F;
  --matcha: #5A9A3C; --matcha-hi: #7CB85A; --matcha-deep: #3F7A2A; --matcha-soft: #EEF6E9;
  --danger: #B3412E;
  --sakura: #F3C9CF; --wakakusa: #D9E8BF; --sora: #CFE2F3; --fuji: #DDD3F0; --kincha: #F0DDB0;
  --gothic: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic", Meiryo, sans-serif;
  /* 墨の粒・紙の目（SVG のノイズ。色みは足さない） */
  --grain: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .07 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  --paper: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='p'><feTurbulence type='fractalNoise' baseFrequency='.6' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 .025 0'/></filter><rect width='100%' height='100%' filter='url(%23p)'/></svg>");
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; font: 15px/1.8 var(--gothic); color: var(--ink); background: var(--white) var(--paper); -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--matcha); outline-offset: 2px; }
input, textarea, select { font: inherit; color: var(--ink); }

/* ── ボタンは2種類：抹茶（主）と線（従） */
.matcha-btn { font-weight: 700; letter-spacing: .04em; border: 0; color: #fff; border-radius: 10px; padding: 10px 20px;
  background: linear-gradient(180deg, var(--matcha-hi) 0%, var(--matcha) 55%, var(--matcha-deep) 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 1px 2px rgba(63,122,42,.35), 0 4px 12px rgba(63,122,42,.18);
  transition: transform .08s ease, filter .15s ease; }
.matcha-btn:hover { filter: brightness(1.04); }
.matcha-btn:active { transform: translateY(1px) scale(.98); }
.line-btn { font-size: 14px; font-weight: 600; border: 1px solid #D0D0D0; background: #fff; color: var(--ink-2); border-radius: 10px; padding: 8px 16px; }
.line-btn:hover { border-color: var(--ink-2); }
.danger { color: var(--danger) !important; }

/* ── 入力欄 */
.field-input, .gate-form input, .admin-form input, .admin-form select {
  width: 100%; padding: 12px 14px; border: 1px solid #D6D6D6; border-radius: 10px; background: #fff; box-shadow: inset 0 1px 2px rgba(0,0,0,.04); }

/* ── 入口 */
.gate { min-height: 100%; display: grid; place-items: center; padding: 40px 16px; }
.gate-inner { width: 100%; max-width: 360px; text-align: center; }
.gate-mado { width: 220px; height: 220px; display: block; margin: 0 auto 22px; }
.gate-title { font-size: 22px; font-weight: 700; letter-spacing: .18em; margin: 0 0 4px; }
.gate-lead { font-size: 13px; color: var(--muted); letter-spacing: .04em; margin: 0 0 32px; }
.gate-form { display: grid; gap: 8px; text-align: left; }
.gate-form label { font-size: 13px; font-weight: 600; color: var(--ink-2); letter-spacing: .04em; }
.gate-form .matcha-btn { margin-top: 8px; padding: 13px; font-size: 15px; }
.gate-note { color: var(--ink-2); font-size: 14px; line-height: 1.9; margin: 0; }
.gate-error { color: var(--danger); font-size: 14px; margin: 14px 0 0; }

/* ── 読み込み：丸窓が、まんなかから開く */
.loading { position: fixed; inset: 0; z-index: 10; display: grid; place-items: center; background: var(--sumi) var(--grain); transition: opacity .45s ease; }
.loading.out { opacity: 0; pointer-events: none; }
.loading-mado { width: 180px; height: 180px; display: block; margin: 0 auto; clip-path: circle(0% at 50% 50%); animation: mado-open 1.2s cubic-bezier(.45,.05,.3,1) forwards; }
@keyframes mado-open { to { clip-path: circle(51% at 50% 50%); } }
.loading-word { color: #fff; opacity: 0; text-align: center; font-weight: 700; letter-spacing: .18em; margin-top: 18px; animation: fadein .5s 1s forwards; }
@keyframes fadein { to { opacity: 1; } }

/* ── 部屋：左から 茶室の切り替え（2つ以上のとき）・チャンネル・投稿 */
.app { display: grid; grid-template-columns: auto 248px 1fr; height: 100vh; height: 100dvh; }
.rail { background: var(--sumi-deep) var(--grain); display: grid; align-content: start; justify-items: center; gap: 14px; padding: 18px 13px; }
.ws { width: 38px; height: 38px; border-radius: 50%; border: 0; padding: 0; display: grid; place-items: center; font-weight: 700; font-size: 13px; color: var(--ink); box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }
.ws.current { outline: 2px solid var(--matcha-hi); outline-offset: 3px; }
.side { background: var(--sumi) var(--grain); color: var(--side-text); padding: 18px 12px 14px; display: grid; grid-template-rows: auto 1fr auto; gap: 22px; min-height: 0; overflow-y: auto; box-shadow: inset -1px 0 0 #000; }
.brand { display: flex; align-items: center; gap: 12px; padding: 2px 6px; }
.brand-mark { width: 44px; height: 44px; flex: none; object-fit: contain; }
.ws-name { color: #fff; font-weight: 700; font-size: 16px; letter-spacing: .03em; line-height: 1.3; overflow-wrap: anywhere; }
.brand-sub { font-size: 11px; color: var(--side-dim); letter-spacing: .06em; }
.nav-h { font-size: 12px; font-weight: 600; color: var(--side-dim); padding: 0 10px 6px; letter-spacing: .1em; margin: 0; }
.ch-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.ch { position: relative; width: 100%; display: flex; align-items: center; gap: 10px; padding: 6px 10px; border: 0; border-radius: 8px; background: none; color: var(--side-text); font-size: 15px; letter-spacing: .02em; text-align: left; }
.ch:hover { background: rgba(255,255,255,.06); }
.ch .ic { width: 16px; text-align: center; color: var(--side-dim); font-size: 14px; }
.ch.current { background: rgba(255,255,255,.96); color: var(--ink); font-weight: 600; box-shadow: 0 2px 8px rgba(0,0,0,.35); }
.ch.current .ic { color: var(--matcha); }
/* 今いる場所の、抹茶の小さな印 */
.ch.current::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 4px; border-radius: 0 3px 3px 0; background: linear-gradient(180deg, var(--matcha-hi), var(--matcha-deep)); }
.ch.unread { color: #fff; font-weight: 700; }
.ch .dot { margin-left: auto; width: 8px; height: 8px; border-radius: 50%; background: var(--matcha-hi); }
.me { display: flex; align-items: center; gap: 10px; padding: 12px 6px 0; border-top: 1px solid rgba(255,255,255,.08); font-size: 14px; color: #fff; }
.me .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-btn { font-size: 13px; border: 1px solid rgba(255,255,255,.18); background: none; color: var(--side-text); border-radius: 8px; padding: 3px 10px; }
.side-btn:hover { border-color: rgba(255,255,255,.4); color: #fff; }

.av { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 14px; color: var(--ink); box-shadow: inset 0 0 0 1px rgba(0,0,0,.06); }
.av.small { width: 28px; height: 28px; font-size: 12px; }

/* ── 投稿の列 */
.main { display: grid; grid-template-rows: auto 1fr auto; min-height: 0; min-width: 0; background: var(--white) var(--paper); }
.ch-head { padding: 16px 32px 14px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 10px; background: rgba(255,255,255,.7); }
.ch-head h1 { font-size: 19px; font-weight: 700; letter-spacing: .03em; margin: 0; }
.ch-head .hash { color: var(--matcha); margin-right: 4px; font-weight: 600; }
.back { display: none; border: 0; background: none; font-size: 22px; line-height: 1; padding: 4px 8px 6px 0; color: var(--ink-2); }
.msgs { list-style: none; margin: 0; padding: 14px 16px; overflow-y: auto; display: grid; align-content: start; gap: 2px; }
.msg { display: flex; gap: 14px; padding: 10px 16px; border-radius: 14px; position: relative; }
.msg:hover, .msg:focus-within { background: #fff; box-shadow: 0 0 0 1px var(--line), 0 6px 20px rgba(0,0,0,.05); }
.msg .body { min-width: 0; flex: 1; }
.who { font-weight: 700; font-size: 15px; letter-spacing: .02em; }
.org { font-size: 12px; color: var(--muted); margin-left: 8px; padding: 1px 8px; border: 1px solid var(--line); border-radius: 999px; vertical-align: 1px; white-space: nowrap; }
.when { font-size: 12px; color: #8A8A8A; margin-left: 8px; font-variant-numeric: tabular-nums; }
.text { margin: 2px 0 0; max-width: 700px; color: var(--ink-2); overflow-wrap: anywhere; }
.actions { position: absolute; right: 16px; top: -14px; display: none; gap: 2px; background: #fff; border-radius: 999px; padding: 3px 6px; box-shadow: 0 0 0 1px var(--line), 0 4px 14px rgba(0,0,0,.08); }
.actions:empty { display: none !important; }
.msg:hover .actions, .msg:focus-within .actions { display: flex; }
.actions button { font-size: 12px; font-weight: 600; background: none; border: 0; padding: 4px 10px; border-radius: 999px; color: var(--ink-2); }
.actions button:hover { background: var(--soft); }
.edit { display: grid; gap: 8px; margin-top: 6px; }
.edit textarea { width: 100%; min-height: 80px; padding: 10px 12px; border: 1px solid #D6D6D6; border-radius: 10px; resize: vertical; }
.edit .row { display: flex; gap: 8px; }
.edit .matcha-btn, .edit .line-btn { padding: 6px 16px; font-size: 14px; }
/* 届いた投稿：抹茶の淡い色から、白へ落ち着く */
.msg.arrive { animation: settle 2.2s ease-out; }
@keyframes settle { 0% { background: #DCEFCF; } 100% { background: transparent; } }
.day { font-size: 12px; color: #8A8A8A; display: flex; align-items: center; gap: 14px; padding: 12px 16px 8px; letter-spacing: .06em; }
.day::before, .day::after { content: ""; height: 1px; background: linear-gradient(90deg, transparent, var(--line) 20%, var(--line) 80%, transparent); flex: 1; }

/* 投稿の無いチャンネル：立てた抹茶 */
.empty { display: grid; place-items: center; text-align: center; color: var(--muted); padding: 12vh 16px; font-size: 14px; }
.empty-matcha { width: 180px; height: 180px; display: block; margin: 0 auto 6px; }
.empty b { display: block; color: var(--ink); font-size: 17px; margin-bottom: 4px; letter-spacing: .06em; }

.compose { padding: 8px 32px 24px; }
.box { background: #fff; border-radius: 16px; padding: 12px 14px; display: grid; gap: 6px; box-shadow: 0 0 0 1px #DADADA, 0 2px 10px rgba(0,0,0,.04); }
.box:focus-within { box-shadow: 0 0 0 1px var(--matcha), 0 0 0 4px rgba(90,154,60,.12); }
.box textarea { border: 0; resize: none; min-height: 48px; max-height: 40vh; outline: none; background: transparent; padding: 0; }
.box textarea::placeholder { color: #A0A0A0; }
.box .row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.hint { font-size: 12px; color: #8A8A8A; }
.box .matcha-btn { padding: 7px 22px; border-radius: 999px; font-size: 14px; }
.send-error { color: var(--danger); margin: 0; font-size: 13px; }

/* ── 管理（kazuhiro だけ）：抹茶のボタンは「招く」の1つだけ。設定は細い行と線のボタン */
.admin-head { flex-wrap: wrap; }
.admin-pick { margin-left: auto; display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 600; color: var(--muted); }
.admin-pick select { height: 38px; min-width: 200px; padding: 0 34px 0 12px; border: 1px solid #D6D6D6; border-radius: 10px; font-weight: 700; color: var(--ink);
  appearance: none; background: #fff url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8'><path d='M1 1l5 5 5-5' fill='none' stroke='%236E6E6E' stroke-width='1.5'/></svg>") no-repeat right 12px center; }
.admin { padding: 24px 32px 48px; overflow-y: auto; display: grid; gap: 16px; align-content: start; }
.admin-cols { display: grid; grid-template-columns: minmax(0, 560px) minmax(280px, 360px); gap: 24px; align-items: start; }
.admin-main { display: grid; gap: 16px; }
.admin-card { display: grid; gap: 14px; padding: 22px 24px; background: #fff; border-radius: 16px; box-shadow: 0 0 0 1px var(--line), 0 2px 10px rgba(0,0,0,.03); }
.admin-card h2 { font-size: 17px; margin: 0; letter-spacing: .04em; }
/* 主：招く。抹茶の細い線を上に1本 */
.admin-card.primary { box-shadow: 0 0 0 1px var(--line), 0 6px 24px rgba(0,0,0,.06); border-top: 3px solid var(--matcha); }
/* 従：設定。背景に溶かして、文字も小さめ */
.admin-card.quiet { background: transparent; box-shadow: 0 0 0 1px var(--line); padding: 18px 20px; gap: 0; }
.admin-card.quiet h2 { font-size: 14px; color: var(--muted); margin-bottom: 6px; }
.admin-row { display: grid; grid-template-columns: 150px 1fr; align-items: center; gap: 12px; padding: 10px 0; }
.admin-card.quiet .admin-row + .admin-row { border-top: 1px solid var(--line); }
.admin-row label { font-size: 14px; font-weight: 600; color: var(--ink-2); display: grid; }
.admin-row label span { font-size: 12px; font-weight: 400; color: var(--muted); }
.admin-row input { height: 40px; padding: 0 12px; border: 1px solid #D6D6D6; border-radius: 10px; background: #fff; }
.admin-row .line-btn { height: 40px; padding: 0 16px; white-space: nowrap; }
.admin-lead { margin: -8px 0 0; font-size: 13px; color: var(--muted); }
.admin-note { margin: -4px 0 0; font-size: 12px; color: var(--muted); }
.admin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
.admin-card label { display: grid; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.admin-card.primary input, .admin-card.primary select { width: 100%; height: 46px; padding: 0 14px; border: 1px solid #D6D6D6; border-radius: 10px; background-color: #fff; }
.admin-card.primary select { appearance: none; background: #fff url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8'><path d='M1 1l5 5 5-5' fill='none' stroke='%236E6E6E' stroke-width='1.5'/></svg>") no-repeat right 14px center; padding-right: 36px; }
.admin-card.primary > .matcha-btn { justify-self: start; height: 46px; padding: 0 28px; font-size: 15px; }
.admin-inline { display: flex; gap: 10px; }
.admin-inline input { flex: 1; min-width: 0; }
.admin-msg { color: var(--matcha-deep); margin: 0; font-weight: 600; font-size: 14px; }
.admin-msg:empty { display: none; }
.admin-msg.error { color: var(--danger); }
.admin button:disabled, .admin-first button:disabled { opacity: .6; cursor: default; }
/* 右：この茶室の人 */
.people { position: sticky; top: 0; gap: 8px; }
.people h3 { font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: .08em; margin: 10px 0 2px; }
.people h3 span { display: inline-block; min-width: 20px; margin-left: 4px; padding: 0 6px; border-radius: 10px; background: var(--soft); color: var(--ink-2); text-align: center; }
.people-list { list-style: none; margin: 0; padding: 0; display: grid; }
.person { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.person:last-child { border-bottom: 0; }
.who-block { flex: 1; min-width: 0; display: grid; line-height: 1.4; }
.who-block b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who-block small { font-size: 12px; color: var(--muted); }
.av.ghost { background: var(--soft); color: var(--muted); font-size: 13px; }
.person.pending b { font-weight: 600; color: var(--ink-2); }
.me-tag { font-size: 12px; color: var(--muted); }
.text-btn { border: 0; background: none; font-size: 13px; font-weight: 600; padding: 4px 6px; border-radius: 6px; color: var(--ink-2); }
.text-btn:hover { background: var(--soft); }
@media (max-width: 1100px) { .admin-cols { grid-template-columns: minmax(0, 620px); } .people { position: static; } }
/* 茶室がまだ無いとき */
.admin-first { display: grid; place-items: center; padding: 40px 16px; overflow-y: auto; }
.admin-first-inner { width: 100%; max-width: 420px; text-align: center; display: grid; gap: 14px; }
.admin-mado { width: 160px; height: 160px; margin: 0 auto 6px; display: block; }
.admin-first h2 { font-size: 20px; margin: 0; letter-spacing: .08em; }
.admin-first p { margin: 0; color: var(--muted); font-size: 14px; }
.admin-first .admin-inline { margin-top: 10px; }
.admin-first .admin-inline input { padding: 0 14px; border: 1px solid #D6D6D6; border-radius: 10px; background: #fff; height: 46px; }
.admin-first .matcha-btn { height: 46px; padding: 0 24px; }
/* 入力欄に入ったら、抹茶色の枠1本（外側の二重線は出さない） */
.gate-form input:focus-visible, .admin-card input:focus-visible, .admin-card select:focus-visible, .admin-pick select:focus-visible, .admin-inline input:focus-visible {
  outline: none; border-color: var(--matcha); box-shadow: 0 0 0 3px rgba(90,154,60,.15); }

/* ── スマホ：1列。チャンネル一覧 → チャンネル */
@media (max-width: 720px) {
  .app { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .rail { grid-auto-flow: column; justify-content: start; padding: 12px 16px; }
  .side { box-shadow: none; padding: 16px 12px; }
  .app.in-channel .rail, .app.in-channel .side { display: none; }
  .app:not(.in-channel) .main { display: none; }
  .app.in-channel { grid-template-rows: 1fr; }
  .app:not(.in-channel) { grid-template-rows: auto 1fr; }
  .back { display: block; }
  .ch-head { padding: 12px 16px; }
  .compose { padding: 8px 12px 14px; }
  .msgs { padding: 10px 4px; }
  .msg { padding: 10px 12px; gap: 12px; }
  .hint { display: none; }
  .admin { padding: 16px 12px 40px; }
  .admin-grid { grid-template-columns: 1fr; }
  .admin-row { grid-template-columns: 1fr; gap: 6px; }
  .admin-pick { margin-left: 0; width: 100%; }
  .admin-pick select { flex: 1; min-width: 0; }
}
@media (hover: none) {
  .actions { position: static; display: flex; background: none; box-shadow: none; padding: 4px 0 0; margin-left: -10px; }
  .msg:hover, .msg:focus-within { background: none; box-shadow: none; }
}

@media (prefers-reduced-motion: reduce) {
  .loading-mado { clip-path: none; animation: none; }
  .loading-word { opacity: 1; animation: none; }
  .loading { transition: none; }
  .msg.arrive { animation: none; }
  .matcha-btn { transition: none; }
}
/* 茶室が1つのときは、左端の列を出さない */
.app.no-rail { grid-template-columns: 248px 1fr; }
@media (max-width: 720px) { .app.no-rail { grid-template-columns: 1fr; } }

/* 左下：名前が長いとき・ボタンが2つのときは、ボタンを下の段へ */
.me { flex-wrap: wrap; row-gap: 8px; }
.me .name { flex: 1 1 110px; }
.box .matcha-btn { margin-left: auto; }
@media (max-width: 720px) {
  .app.no-rail:not(.in-channel) { grid-template-rows: 1fr; }
}
@media (hover: none) {
  /* 触る端末：編集・削除は本文の下に出す */
  .msg { flex-wrap: wrap; }
  .actions { flex-basis: 100%; padding-left: 50px; }
}
.me-btns { display: flex; gap: 6px; margin-left: auto; }
.side-btn.on { background: rgba(255,255,255,.96); color: var(--ink); border-color: transparent; font-weight: 600; }
.gate-hint { font-size: 12px; color: var(--muted); }

/* 個人情報の取り扱い：入口の中の、読める大きさの箱 */
.terms { text-align: left; margin: 0 0 16px; }
.terms-box { height: 260px; overflow-y: auto; padding: 14px 16px; border: 1px solid #D6D6D6; border-radius: 10px; background: #fff; font-size: 13px; line-height: 1.8; color: var(--ink-2); }
.terms-box h1 { font-size: 16px; margin: 0 0 4px; }
.terms-box h2 { font-size: 14px; margin: 16px 0 4px; }
.terms-box ul { padding-left: 1.2em; margin: 4px 0; }
.terms-box p { margin: 4px 0; }
.terms-box .doc-meta { color: var(--muted); font-size: 12px; }
.terms #terms-hint { display: block; margin: 6px 0 0; }
.terms-check { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 14px; font-weight: 600; color: var(--ink); }
.terms-check input { width: 18px; height: 18px; accent-color: var(--matcha); }
.terms-check:has(input:disabled) { color: #A0A0A0; }
.matcha-btn:disabled { filter: grayscale(.8) brightness(1.15); cursor: default; box-shadow: none; }
.gate-foot { margin: 28px 0 0; font-size: 12px; }
.gate-foot a { color: var(--muted); }
/* 個人情報のページ（単独で開いたとき） */
.doc-page { padding: 40px 16px 80px; }
.doc { max-width: 680px; margin: 0 auto; line-height: 1.9; color: var(--ink-2); }
.doc h1 { font-size: 22px; color: var(--ink); margin: 0 0 4px; letter-spacing: .06em; }
.doc h2 { font-size: 16px; color: var(--ink); margin: 28px 0 6px; }
.doc .doc-meta { color: var(--muted); font-size: 13px; margin: 0 0 24px; }
.doc ul { padding-left: 1.3em; }
.gate.compact .gate-mado { width: 120px; height: 120px; margin-bottom: 12px; }
.gate.compact .gate-lead { margin-bottom: 20px; }
.gate-form .terms { margin: 8px 0 0; }
/* 左下：自分の名前を押すと、その場で変えられる */
.name-btn { border: 0; background: none; color: #fff; font: inherit; text-align: left; padding: 2px 6px; margin-left: -6px; border-radius: 6px; display: flex; align-items: center; gap: 6px; }
.name-btn:hover { background: rgba(255,255,255,.08); }
.name-btn .pen { font-size: 12px; color: var(--side-dim); opacity: 0; }
.name-btn:hover .pen, .name-btn:focus-visible .pen { opacity: 1; }
.name-form { width: 100%; display: grid; gap: 6px; }
.name-form label { font-size: 12px; color: var(--side-dim); }
.name-form input { height: 38px; padding: 0 10px; border-radius: 8px; border: 1px solid rgba(255,255,255,.25); background: #2A2A2A; color: #fff; }
.name-form input:focus-visible { outline: none; border-color: var(--matcha-hi); }
.name-form small { font-size: 11px; color: var(--side-dim); }
.name-form .row { display: flex; gap: 6px; }
.name-error { color: #F0A090; font-size: 12px; margin: 0; }
/* 投稿欄の下の但し書き：小さく、いつも出す */
.compose-note { margin: 8px 4px 0; font-size: 11px; line-height: 1.6; color: #8A8A8A; }
/* 処理中のボタン：文字の前に小さな輪が回る */
button.busy { position: relative; cursor: progress; }
button.busy::before { content: ""; display: inline-block; width: 1em; height: 1em; margin-right: .5em; vertical-align: -0.15em;
  border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
.matcha-btn.busy:disabled { filter: none; opacity: .9; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { button.busy::before { animation-duration: 2s; } }
.no-room { height: 100%; }

/* ── 一覧性（Elios 2026-10-20「フォントや余白が大きい」）：文字と余白を詰め、投稿は下（書く欄のすぐ上）から積む */
body { font-size: 14px; line-height: 1.7; }
.ch-head { padding: 12px 24px 11px; }
.ch-head h1 { font-size: 17px; }
.msgs { display: flex; flex-direction: column; gap: 0; padding: 8px 10px; }
.msgs > :first-child { margin-top: auto; }   /* 投稿が少ないときも、書く欄の近くに寄せる */
.msg { gap: 12px; padding: 6px 14px; border-radius: 10px; }
.msg + .msg { margin-top: 2px; }
.av { width: 32px; height: 32px; font-size: 13px; }
.who { font-size: 14px; }
.org { font-size: 11px; padding: 0 7px; margin-left: 6px; }
.when { font-size: 11px; margin-left: 6px; }
.text { margin-top: 0; line-height: 1.65; }
.day { padding: 8px 14px 4px; font-size: 11px; }
.actions { top: -12px; }
.compose { padding: 4px 24px 14px; }
.box { padding: 8px 12px; gap: 4px; border-radius: 12px; }
.box textarea { min-height: 40px; }
.box .matcha-btn { padding: 5px 18px; font-size: 13px; }
.compose-note { margin-top: 6px; }
.side { padding: 14px 10px 12px; gap: 16px; }
.brand-mark { width: 38px; height: 38px; }
.ws-name { font-size: 15px; }
.ch { font-size: 14px; padding: 4px 10px; }
.ch.current::before { left: -10px; top: 6px; bottom: 6px; }
.empty { margin: auto 0; padding: 6vh 16px; }
@media (max-width: 720px) {
  .ch-head { padding: 10px 12px; }
  .compose { padding: 4px 10px 10px; }
  .msgs { padding: 6px 2px; }
  .msg { padding: 6px 10px; }
}
.me .name { flex-basis: 80px; }
/* 長い投稿：8行で折りたたみ、「もっと見る」 */
.text.clamp { display: -webkit-box; -webkit-line-clamp: 8; line-clamp: 8; -webkit-box-orient: vertical; overflow: hidden; }
.more { border: 0; background: none; padding: 2px 0; margin-top: 2px; font-size: 12px; font-weight: 600; color: var(--matcha-deep); }
.more:hover { text-decoration: underline; }
/* 招待のあと：入口の URL をふだんのメールで送ってもらう */
.invite-next { display: grid; gap: 8px; padding: 12px 14px; border-radius: 10px; background: var(--matcha-soft); font-size: 13px; color: var(--ink-2); }
.invite-next p { margin: 0; }
.invite-next input { height: 40px; padding: 0 12px; border: 1px solid #D6D6D6; border-radius: 10px; background: #fff; }
.invite-next .line-btn { height: 40px; }
/* 約款の中の長い URL で、入口が横にはみ出さないように */
.terms-box { overflow-wrap: anywhere; word-break: break-word; }
.gate-form, .gate-form > *, .terms { min-width: 0; }
.doc { overflow-wrap: anywhere; }
