/* A-Chat 案C ブランド(2026-10-07 鳥飼選択)。色・字・角丸は web/design/tokens.json(アオキシンテック Design System)から。
   紺 #193a68 / 青 #137aac / 緑 #389f88。丸みを強く(14〜22px)、ボタンはピル型。絵文字は使わず線のアイコン。 */
:root {
  --navy: #193a68; --navy-deep: #17213c; --blue: #137aac; --green: #389f88;
  --bg: #f3f5f9; --panel: #ffffff; --chip: #eef1f5; --border: #d2d8e0; --row-rule: #f1f5f9;
  --text: #1a202c; --sub: #5b6675; --tag-ink: #334155;
  --blue-weak: #e7f2f7; --blue-line: #bfe0ec; --green-weak: #e6f4f0; --green-ink: #1f7a66;
  --warn-bg: #fef9c3; --warn-ink: #a16207; --err: #dc2626; --err-bg: #fee2e2; --ok: #047857; --ok-bg: #ecfdf5;
  --rail-ink: #a9b8d1;
  --r-xl: 22px; --r-lg: 18px; --r-md: 14px; --r-sm: 10px; --r-pill: 99px;
  --shadow: 0 2px 8px rgba(23,33,60,.08); --shadow-md: 0 2px 10px rgba(23,33,60,.12); --shadow-lg: 0 6px 18px rgba(23,33,60,.30);
  --font: "Hiragino Kaku Gothic ProN", "Yu Gothic UI", Meiryo, sans-serif;
  --rail-w: 72px; --list-w: 336px; --head-h: 76px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 15px; line-height: 1.5; -webkit-text-size-adjust: 100%; overscroll-behavior-y: none; }
button, input, textarea, select { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
a { color: var(--blue); }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.num { font-variant-numeric: tabular-nums; }
.ellip { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- 起動 ---------- */
.boot { height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; color: var(--sub); font-size: 13.5px; }
.boot-mark { width: 44px; height: 44px; border-radius: 14px; background: linear-gradient(135deg, var(--blue), var(--green)); animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .55; } }

/* ---------- 枠(PC: レール・一覧・会話 / スマホ: 1 画面ずつ) ---------- */
.app { height: 100vh; height: 100dvh; display: grid; grid-template-columns: var(--rail-w) var(--list-w) minmax(0, 1fr); overflow: hidden; }
.app.single { display: block; height: auto; min-height: 100vh; overflow: auto; }   /* ログインなど枠の無い画面 */
.rail { background: linear-gradient(180deg, var(--navy), var(--navy-deep)); display: flex; flex-direction: column; align-items: center; padding: 14px 0; gap: 6px; }
.rail .mark { width: 40px; height: 40px; border-radius: var(--r-md); background: linear-gradient(135deg, var(--blue), var(--green)); display: flex; align-items: center; justify-content: center; margin-bottom: 12px; box-shadow: 0 4px 12px rgba(0,0,0,.25); color: #fff; }
.rail a, .rail button.ritem { position: relative; width: 56px; height: 54px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; text-decoration: none; color: var(--rail-ink); font-size: 9.5px; font-weight: 600; line-height: 1.1; letter-spacing: .02em; border-radius: var(--r-md); }
.rail a:hover { color: #fff; background: rgba(255,255,255,.06); }
.rail a.on { color: #fff; font-weight: 700; background: rgba(56,159,136,.28); box-shadow: inset 0 0 0 1px rgba(56,159,136,.6); }
.rail .sp { flex: 1 1 auto; }
.rail .me { width: 36px; height: 36px; border-radius: 50%; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; margin-top: 6px; box-shadow: 0 0 0 2px rgba(255,255,255,.35); }
.badge { min-width: 18px; height: 18px; padding: 0 5px; border-radius: var(--r-pill); background: var(--green); color: #fff; font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; line-height: 1; }
.rail .badge { position: absolute; top: 6px; right: 8px; }

/* 一覧 */
.list { background: var(--panel); border-right: 1px solid var(--border); display: flex; flex-direction: column; min-height: 0; }
.list-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 18px 10px; gap: 10px; }
.list-head h1 { margin: 0; font-size: 22px; font-weight: 800; letter-spacing: -.01em; line-height: 1.4; }
.search { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border-radius: var(--r-pill); background: var(--chip); margin: 0 18px 10px; color: var(--sub); }
.search input { flex: 1 1 auto; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 13.5px; color: var(--text); }
.chips { display: flex; gap: 6px; padding: 0 18px 12px; overflow-x: auto; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { height: 30px; padding: 0 14px; border-radius: var(--r-pill); background: var(--chip); color: var(--tag-ink); font-size: 12.5px; font-weight: 600; line-height: 1.25; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.chip.on { background: var(--navy); color: #fff; font-weight: 700; }
.rows { flex: 1 1 auto; min-height: 0; overflow: auto; display: flex; flex-direction: column; padding: 0 10px 10px; gap: 2px; }
.row { display: flex; gap: 12px; align-items: center; padding: 10px 12px; text-decoration: none; color: var(--text); border-radius: 16px; text-align: left; width: 100%; }
.row:hover { background: var(--chip); }
.row.on { background: var(--blue-weak); }
.row .av { flex: 0 0 44px; }
.row .body { flex: 1 1 auto; min-width: 0; }
.row .l1 { display: flex; justify-content: space-between; gap: 8px; font-size: 13.5px; font-weight: 600; }
.row.unread .l1 { font-weight: 700; }
.row .t { font-size: 11.5px; color: var(--sub); white-space: nowrap; font-weight: 400; }
.row.unread .t { color: var(--blue); font-weight: 700; }
.row .l2 { display: flex; justify-content: space-between; gap: 8px; align-items: center; font-size: 12.5px; color: var(--sub); }
.empty { padding: 30px 18px; color: var(--sub); font-size: 13.5px; text-align: center; }

/* 頭文字の丸・種類の角丸 */
.av { width: 44px; height: 44px; border-radius: 50%; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; flex: 0 0 44px; }
.av.sq { border-radius: var(--r-md); font-size: 11px; }
.av.case { background: linear-gradient(135deg, var(--blue), var(--green)); }
.av.case.pale { background: var(--blue-weak); color: var(--blue); }
.av.busho { background: var(--navy); }
.av.all { background: var(--green); }
.av.group { background: var(--blue); }
.av.sm { width: 32px; height: 32px; flex-basis: 32px; font-size: 12px; }
.av.md { width: 38px; height: 38px; flex-basis: 38px; font-size: 13px; }
.av.xs { width: 30px; height: 30px; flex-basis: 30px; font-size: 11px; border: 2px solid #fff; }

/* ピル型のボタン */
.btn { height: 36px; padding: 0 14px; border-radius: var(--r-pill); background: var(--blue); color: #fff; font-size: 13.5px; font-weight: 700; line-height: 1.25; display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap; }
.btn:hover { filter: brightness(1.08); }
.btn:disabled { opacity: .45; cursor: default; filter: none; }
.btn.lg { height: 40px; padding: 0 20px; font-size: 14px; }
.btn.grad { background: linear-gradient(90deg, var(--blue), var(--green)); box-shadow: 0 2px 8px rgba(19,122,172,.35); }
.btn.ghost { background: var(--chip); color: var(--text); font-weight: 600; }
.btn.line { background: var(--panel); color: var(--blue); border: 1.5px solid var(--blue); }
.btn.danger { background: var(--err-bg); color: var(--err); }
.btn.navy { background: var(--navy); }
.ibtn { width: 38px; height: 38px; border-radius: var(--r-pill); display: inline-flex; align-items: center; justify-content: center; color: var(--sub); }
.ibtn:hover { background: var(--chip); color: var(--text); }
.ibtn.green { background: var(--green-weak); color: var(--green-ink); }

/* 会話 */
.main { min-width: 0; display: flex; flex-direction: column; min-height: 0; position: relative; }
.rhead { min-height: var(--head-h); background: var(--panel); border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 14px; padding: 10px 24px; }
.rhead .ttl { flex: 1 1 auto; min-width: 0; }
.rhead h2 { margin: 0; font-size: 18px; font-weight: 800; line-height: 1.4; display: inline; }
.rhead .l1 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rhead .l2 { font-size: 12.5px; color: var(--sub); }
.tag { height: 24px; padding: 0 10px; border-radius: var(--r-pill); background: var(--chip); color: var(--tag-ink); font-size: 11.5px; font-weight: 600; display: inline-flex; align-items: center; white-space: nowrap; }
.tag.warn { background: var(--warn-bg); color: var(--warn-ink); font-weight: 700; }
.tag.ok { background: var(--ok-bg); color: var(--ok); font-weight: 700; }
.tag.err { background: var(--err-bg); color: var(--err); font-weight: 700; }
.tag.blue { background: var(--blue-weak); color: var(--blue); font-weight: 700; }
.avs { display: flex; align-items: center; }
.avs .av + .av { margin-left: -8px; }
.avs .av.more { background: var(--chip); color: var(--tag-ink); }
.back { display: none; }

.msgs { flex: 1 1 auto; min-height: 0; overflow: auto; padding: 20px 28px; display: flex; flex-direction: column; gap: 14px; scroll-behavior: smooth; }
.daysep { display: flex; align-items: center; justify-content: center; }
.daysep span { height: 24px; padding: 0 12px; border-radius: var(--r-pill); background: var(--panel); border: 1px solid var(--border); color: var(--sub); font-size: 11.5px; font-weight: 600; display: inline-flex; align-items: center; }
.loadmore { align-self: center; }
.msg { display: flex; gap: 12px; align-items: flex-end; max-width: 680px; }
.msg .av { align-self: flex-end; }
.msg .col { min-width: 0; display: flex; flex-direction: column; }
.msg .meta { font-size: 12px; color: var(--sub); margin: 0 0 4px 6px; }
.msg .meta b { color: var(--text); font-weight: 700; }
.bubble { background: var(--panel); border-radius: 6px 20px 20px 20px; padding: 12px 16px; font-size: 14.5px; box-shadow: var(--shadow); white-space: pre-wrap; word-break: break-word; position: relative; }
.bubble .mention { color: var(--blue); font-weight: 700; }
.bubble .seiban { color: var(--blue); font-weight: 700; text-decoration: underline dotted; cursor: pointer; }
.bubble.deleted { color: var(--sub); font-style: normal; background: var(--chip); box-shadow: none; }
.msg.me { align-self: flex-end; flex-direction: row-reverse; max-width: 600px; }
.msg.me .col { align-items: flex-end; }
.msg.me .meta { margin: 0 6px 4px 0; }
.msg.me .bubble { background: var(--navy); color: #fff; border-radius: 20px 6px 20px 20px; box-shadow: 0 2px 8px rgba(23,33,60,.18); }
.msg.me .bubble .mention, .msg.me .bubble .seiban { color: #bfe0ec; }
.msg.me .bubble a { color: #bfe0ec; }
.msg .foot { display: flex; gap: 6px; margin: 6px 0 0 6px; align-items: center; flex-wrap: wrap; font-size: 11.5px; color: var(--sub); }
.msg.me .foot { margin: 6px 6px 0 0; justify-content: flex-end; }
.react { height: 26px; padding: 0 10px; border-radius: var(--r-pill); background: var(--panel); color: var(--tag-ink); font-size: 11.5px; font-weight: 700; display: inline-flex; align-items: center; gap: 5px; box-shadow: 0 1px 3px rgba(23,33,60,.12); }
.react.mine { background: var(--green-weak); color: var(--green-ink); }
.react.add { opacity: 0; padding: 0 8px; }
.msg:hover .react.add, .msg:focus-within .react.add { opacity: 1; }
.thread-link { color: var(--blue); font-weight: 700; background: none; }
.thread-link:hover { text-decoration: underline; }
.photos { margin-top: 10px; display: flex; gap: 10px; flex-wrap: wrap; }
.photos img { width: 180px; height: 120px; object-fit: cover; border-radius: var(--r-md); background: var(--chip); cursor: zoom-in; display: block; }
.dcard { margin-top: 10px; display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: var(--r-md); background: var(--panel); color: var(--text); text-decoration: none; border: 1px solid var(--border); cursor: pointer; text-align: left; width: 100%; }
.msg.me .dcard { border: 0; }
.dcard .thumb { width: 64px; height: 48px; border-radius: 8px; background: #eceff2; display: flex; align-items: center; justify-content: center; flex: 0 0 64px; }
.dcard .thumb span { width: 44px; height: 32px; background: #fff; border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; }
.dcard .nm { font-size: 13px; font-weight: 700; }
.dcard .sb { font-size: 11.5px; color: var(--sub); }
.dcard .open { margin-left: auto; height: 26px; padding: 0 10px; border-radius: var(--r-pill); background: var(--blue-weak); color: var(--blue); font-size: 11.5px; font-weight: 700; display: inline-flex; align-items: center; white-space: nowrap; }

/* 案件カード */
.ccard { margin: 8px 0 0 50px; max-width: 560px; background: var(--panel); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow); border: 1.5px solid var(--blue-line); }
.msg.me + .ccard, .ccard.right { margin-left: auto; margin-right: 0; }
.ccard .ch { display: flex; align-items: center; gap: 8px; padding: 10px 16px; background: linear-gradient(90deg, var(--blue-weak), var(--green-weak)); font-size: 12.5px; font-weight: 800; color: var(--blue); }
.ccard .ch .sub { margin-left: auto; font-size: 11px; color: var(--sub); font-weight: 400; }
.ccard .grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 16px; padding: 14px 16px; font-size: 13px; }
.ccard .k { font-size: 11.5px; color: var(--sub); }
.ccard .v { font-weight: 700; }
.ccard .v.warn { color: var(--warn-ink); }
.ccard .v.ok { color: var(--ok); }
.ccard .v .sub { color: var(--sub); font-weight: 400; }
.ccard .acts { display: flex; gap: 8px; padding: 0 16px 12px; flex-wrap: wrap; }
.ccard .acts .btn { height: 30px; font-size: 12.5px; }
.ccard .pending { padding: 14px 16px; color: var(--sub); font-size: 13px; }

/* 書く所 */
.composer { padding: 12px 28px 18px; background: var(--bg); }
.cbox { background: var(--panel); border-radius: var(--r-xl); box-shadow: var(--shadow-md); padding: 12px 14px 10px; position: relative; }
.cbox textarea { width: 100%; border: 0; outline: 0; resize: none; font-size: 14.5px; padding: 4px 6px 10px; background: transparent; max-height: 180px; min-height: 28px; line-height: 1.5; display: block; }
.cbox .tools { display: flex; align-items: center; gap: 4px; }
.cbox .hint { flex: 1 1 auto; font-size: 11.5px; color: var(--sub); text-align: right; padding-right: 10px; }
.pending-atts { display: flex; gap: 8px; flex-wrap: wrap; padding: 0 6px 10px; }
.pending-atts .pa { position: relative; width: 72px; height: 72px; border-radius: var(--r-sm); overflow: hidden; background: var(--chip); display: flex; align-items: center; justify-content: center; color: var(--sub); font-size: 11px; }
.pending-atts .pa img { width: 100%; height: 100%; object-fit: cover; }
.pending-atts .pa .x { position: absolute; top: 2px; right: 2px; width: 20px; height: 20px; border-radius: 50%; background: rgba(23,33,60,.75); color: #fff; display: flex; align-items: center; justify-content: center; }
.replying { display: flex; align-items: center; gap: 8px; padding: 0 6px 8px; font-size: 12.5px; color: var(--sub); }
.replying b { color: var(--text); }
.suggest { position: absolute; left: 14px; bottom: calc(100% + 6px); background: var(--panel); border-radius: var(--r-md); box-shadow: var(--shadow-lg); padding: 6px; max-height: 240px; overflow: auto; min-width: 240px; z-index: 5; }
.suggest button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border-radius: var(--r-sm); text-align: left; font-size: 13.5px; }
.suggest button:hover, .suggest button.on { background: var(--blue-weak); }
.suggest .sub { color: var(--sub); font-size: 12px; margin-left: auto; }

/* スレッド(PC は右に差し込み、スマホは全面) */
.thread { position: absolute; top: 0; right: 0; bottom: 0; width: min(420px, 100%); background: var(--panel); border-left: 1px solid var(--border); display: flex; flex-direction: column; box-shadow: -8px 0 24px rgba(23,33,60,.08); z-index: 6; }
.thread .th { height: 56px; display: flex; align-items: center; gap: 10px; padding: 0 14px; border-bottom: 1px solid var(--border); font-weight: 800; }
.thread .msgs { padding: 14px 16px; background: var(--bg); }
.thread .composer { padding: 10px 12px 14px; }
.thread .msg { max-width: 100%; }

/* 浮いたメニュー(スマホ) */
.fnav { display: none; }

/* 画面全体(ログイン・設定・検索・管理) */
.page { flex: 1 1 auto; min-height: 0; overflow: auto; padding: 24px 28px 40px; }
.page h1 { margin: 0 0 14px; font-size: 22px; font-weight: 800; }
.card { background: var(--panel); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 18px 20px; margin-bottom: 14px; max-width: 760px; }
.card h3 { margin: 0 0 10px; font-size: 14px; font-weight: 700; }
.card p { margin: 6px 0; font-size: 13.5px; color: var(--sub); }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 8px 12px; font-size: 13.5px; }
.kv .k { color: var(--sub); }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 12px; color: var(--sub); }
.field input, .field textarea, .field select { height: 44px; padding: 0 14px; border-radius: var(--r-md); border: 1px solid var(--border); background: var(--panel); font-size: 15px; }
.field textarea { height: auto; padding: 10px 14px; }
.field input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-weak); outline: 0; }
.err-msg { color: var(--err); font-size: 13px; margin: 6px 0; }
.ok-msg { color: var(--ok); font-size: 13px; margin: 6px 0; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; }
table.tbl th, table.tbl td { padding: 7px 8px; border-bottom: 1px solid var(--row-rule); text-align: left; vertical-align: top; }
table.tbl th { color: var(--sub); font-weight: 600; }

/* ログイン */
.login { min-height: 100vh; min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: 20px; background: linear-gradient(160deg, var(--bg), #e6eef7); }
.login .box { width: min(420px, 100%); background: var(--panel); border-radius: var(--r-xl); box-shadow: var(--shadow-lg); padding: 28px 28px 24px; }
.login .mark { width: 56px; height: 56px; border-radius: 18px; background: linear-gradient(135deg, var(--blue), var(--green)); display: flex; align-items: center; justify-content: center; color: #fff; margin: 0 auto 12px; }
.login h1 { margin: 0 0 4px; text-align: center; font-size: 24px; font-weight: 800; color: var(--navy); }
.login .lead { text-align: center; color: var(--sub); font-size: 13px; margin: 0 0 20px; }
.login .btn { width: 100%; height: 48px; font-size: 15px; }
.login .code { letter-spacing: .4em; text-align: center; font-size: 22px; font-weight: 700; }

/* 重ね(ビュワー・ダイアログ) */
#layer:empty { display: none; }
.scrim { position: fixed; inset: 0; background: rgba(15,23,42,.62); display: flex; align-items: center; justify-content: center; z-index: 50; padding: 16px; }
.dialog { width: min(560px, 100%); max-height: 90vh; overflow: auto; background: var(--panel); border-radius: var(--r-xl); box-shadow: var(--shadow-lg); padding: 20px 22px; }
.dialog h2 { margin: 0 0 12px; font-size: 18px; font-weight: 800; }
.dialog .acts { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; }
.picklist { max-height: 46vh; overflow: auto; display: flex; flex-direction: column; gap: 2px; margin-top: 8px; }
.picklist .row { padding: 8px 10px; }
.picklist .row.sel { background: var(--green-weak); }
.viewer { position: fixed; inset: 0; background: rgba(10,14,24,.96); z-index: 60; display: flex; flex-direction: column; color: #fff; }
.viewer .vh { height: 56px; display: flex; align-items: center; gap: 10px; padding: 0 14px; font-size: 13.5px; }
.viewer .vh .sp { flex: 1 1 auto; min-width: 0; }
.viewer .vb { flex: 1 1 auto; min-height: 0; overflow: auto; display: flex; align-items: center; justify-content: center; touch-action: pinch-zoom; }
.viewer img { max-width: 100%; max-height: 100%; object-fit: contain; -webkit-user-drag: none; user-select: none; -webkit-touch-callout: none; }
.viewer .vf { padding: 10px 14px calc(10px + var(--safe-b)); font-size: 12px; color: #c7d3e6; text-align: center; }
.toast { position: fixed; left: 50%; bottom: calc(24px + var(--safe-b)); transform: translateX(-50%); background: var(--navy-deep); color: #fff; padding: 10px 16px; border-radius: var(--r-pill); font-size: 13.5px; box-shadow: var(--shadow-lg); z-index: 70; max-width: 90vw; }
.toast.err { background: var(--err); }
.newbar { position: absolute; left: 50%; transform: translateX(-50%); bottom: 110px; z-index: 4; }
.upd { position: fixed; top: 10px; left: 50%; transform: translateX(-50%); background: var(--green); color: #fff; padding: 8px 14px; border-radius: var(--r-pill); font-size: 13px; z-index: 70; display: flex; gap: 10px; align-items: center; }
.upd button { color: #fff; font-weight: 700; text-decoration: underline; }

/* ---------- タブレット ---------- */
@media (max-width: 1100px) { :root { --list-w: 300px; } .msgs { padding: 16px 18px; } .composer { padding: 10px 18px 16px; } }

/* ---------- スマホ: 1 画面ずつ ---------- */
@media (max-width: 767px) {
  .app { grid-template-columns: 1fr; }
  .rail { display: none; }
  .list { border-right: 0; padding-bottom: calc(84px + var(--safe-b)); }
  body[data-pane="room"] .list, body[data-pane="page"] .list { display: none; }
  body[data-pane="list"] .main { display: none; }
  .rhead { background: var(--navy); color: #fff; border-bottom: 0; border-radius: 0 0 var(--r-xl) var(--r-xl); box-shadow: 0 4px 14px rgba(23,33,60,.25); padding: 12px 12px 12px; gap: 8px; min-height: 0; flex-wrap: wrap; }
  .rhead h2 { font-size: 16px; }
  .rhead .l2 { color: #c7d3e6; font-size: 12px; }
  .rhead .tag { background: rgba(255,255,255,.14); color: #fff; }
  .rhead .tag.warn { background: var(--warn-bg); color: var(--warn-ink); }
  .rhead .btn.line { border-color: rgba(255,255,255,.6); color: #fff; background: transparent; }
  .rhead .btn.ghost { background: rgba(255,255,255,.12); color: #fff; }
  .rhead .avs { display: none; }
  .back { display: inline-flex; width: 40px; height: 40px; border-radius: 12px; align-items: center; justify-content: center; color: #fff; background: rgba(255,255,255,.12); flex: 0 0 40px; }
  .rhead .av { width: 40px; height: 40px; flex-basis: 40px; }
  .msgs { padding: 14px 12px 16px; gap: 12px; }
  .msg { max-width: 100%; }
  .msg .col { max-width: 86%; }
  .ccard { margin-left: 40px; }
  .photos img { width: 134px; height: 96px; }
  .composer { padding: 8px 10px calc(10px + var(--safe-b)); }
  .cbox { padding: 8px 8px 6px; }
  .cbox .hint { display: none; }
  .ibtn { width: 44px; height: 40px; }
  .thread { width: 100%; border-left: 0; }
  .fnav { display: grid; position: fixed; left: 10px; right: 10px; bottom: calc(12px + var(--safe-b)); height: 62px; border-radius: var(--r-pill); background: var(--navy); box-shadow: var(--shadow-lg); grid-template-columns: repeat(5, minmax(0, 1fr)); padding: 0 6px; z-index: 20; }
  body[data-pane="room"] .fnav { display: none; }
  .fnav a { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; text-decoration: none; color: var(--rail-ink); font-size: 10.5px; font-weight: 600; }
  .fnav a span.ic { width: 40px; height: 30px; border-radius: var(--r-pill); display: flex; align-items: center; justify-content: center; }
  .fnav a.on { color: #fff; font-weight: 700; }
  .fnav a.on span.ic { background: rgba(56,159,136,.45); }
  .fnav .badge { position: absolute; top: 8px; right: calc(50% - 24px); }
  .page { padding: 18px 14px calc(100px + var(--safe-b)); }
  .main .page { padding-bottom: 24px; }
  .newbar { bottom: 90px; }
}
