/* 9it Connect — warm ivory, deep plum, coral. Mobile first. */
:root {
  --ivory: #FBF6EE;
  --ivory-2: #F4ECE1;
  --card: #FFFDF9;
  --plum: #3E1A3A;
  --plum-2: #5B2A55;
  --plum-3: #7A4573;
  --plum-soft: #F1E6EE;
  --coral: #E2674E;
  --coral-ink: #A9402B;
  --coral-soft: #FBE3DC;
  --ink: #26171F;
  --muted: #6B5B66;
  --line: #E7DCD2;
  --success: #2C7350;
  --success-soft: #E2F1E8;
  --danger: #A8261E;
  --danger-soft: #FBE4E1;
  --warn: #7A5000;
  --warn-soft: #FBF0D9;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(62, 26, 58, .06), 0 8px 24px rgba(62, 26, 58, .07);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --tabbar-h: 68px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font); font-size: 16px; line-height: 1.5; color: var(--ink); background: var(--ivory);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: var(--plum-2); }
h1, h2, h3 { font-family: var(--display); font-weight: 600; color: var(--plum); line-height: 1.2; margin: 0 0 .5rem; letter-spacing: -0.01em; }
h1 { font-size: 1.75rem; } h2 { font-size: 1.35rem; } h3 { font-size: 1.1rem; }
p { margin: 0 0 .75rem; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.tiny { font-size: .78rem; }
.center { text-align: center; }
.row { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.row.nowrap { flex-wrap: nowrap; }
.stack > * + * { margin-top: .75rem; }
.stack-lg > * + * { margin-top: 1.25rem; }
.grow { flex: 1 1 auto; min-width: 0; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--coral); outline-offset: 2px; border-radius: 6px; }

/* ---------- layout ---------- */
.app { min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between;
  padding: .6rem 1rem; background: rgba(251, 246, 238, .92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: .55rem; text-decoration: none; color: var(--plum); }
.brand-mark { width: 34px; height: 34px; border-radius: 11px; background: var(--plum); color: var(--ivory); display: grid; place-items: center; font-family: var(--display); font-weight: 700; font-size: 1rem; }
.brand-name { font-family: var(--display); font-weight: 600; font-size: 1.15rem; }
.main { flex: 1; width: 100%; max-width: 760px; margin: 0 auto; padding: 1rem 1rem calc(var(--tabbar-h) + 1.5rem); }
.main.wide { max-width: 1100px; }
.tabbar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 30; height: var(--tabbar-h); display: grid; grid-template-columns: repeat(5, 1fr);
  background: var(--card); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom);
}
.tab {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; text-decoration: none; color: var(--muted);
  font-size: .72rem; font-weight: 600; position: relative; min-height: 48px;
}
.tab svg { width: 24px; height: 24px; }
.tab[aria-current="page"] { color: var(--plum); }
.tab[aria-current="page"]::before { content: ''; position: absolute; top: 0; left: 30%; right: 30%; height: 3px; border-radius: 0 0 3px 3px; background: var(--coral); }
.tab .badge { position: absolute; top: 8px; right: calc(50% - 22px); }
@media (min-width: 900px) {
  .app { flex-direction: row; }
  .tabbar { position: sticky; top: 0; height: 100vh; width: 220px; grid-template-columns: none; grid-auto-rows: 56px; align-content: start; border-top: none; border-right: 1px solid var(--line); padding: 5.5rem .75rem 1rem; }
  .tab { flex-direction: row; justify-content: flex-start; gap: .75rem; font-size: .95rem; padding: 0 1rem; border-radius: 14px; }
  .tab[aria-current="page"] { background: var(--plum-soft); }
  .tab[aria-current="page"]::before { display: none; }
  .tab .badge { position: static; margin-left: auto; }
  .content-col { flex: 1; min-width: 0; display: flex; flex-direction: column; }
  .main { padding-bottom: 3rem; }
  .topbar .brand { display: none; }
  .topbar { justify-content: flex-end; }
  .desk-brand { position: fixed; top: 1.1rem; left: 1.4rem; z-index: 31; }
}
@media (max-width: 899px) { .desk-brand { display: none; } }

/* ---------- surfaces ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem; box-shadow: var(--shadow); }
.card.flat { box-shadow: none; }
.card.soft { background: var(--plum-soft); border-color: transparent; box-shadow: none; }
.card.coral { background: var(--coral-soft); border-color: transparent; box-shadow: none; }
.card + .card { margin-top: .9rem; }
.section-title { display: flex; align-items: baseline; justify-content: space-between; margin: 1.5rem 0 .6rem; }
.section-title h2 { margin: 0; }
.divider { height: 1px; background: var(--line); margin: 1rem 0; border: 0; }
.pill { display: inline-flex; align-items: center; gap: .3rem; padding: .25rem .65rem; border-radius: 999px; background: var(--ivory-2); color: var(--plum-2); font-size: .8rem; font-weight: 600; }
.pill.coral { background: var(--coral-soft); color: var(--coral-ink); }
.pill.success { background: var(--success-soft); color: var(--success); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.danger { background: var(--danger-soft); color: var(--danger); }
.pill.plum { background: var(--plum); color: var(--ivory); }
.badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--coral); color: #fff; font-size: .72rem; font-weight: 700; display: inline-grid; place-items: center; }
.notice { border-radius: var(--radius-sm); padding: .8rem 1rem; background: var(--plum-soft); color: var(--plum); font-size: .92rem; }
.notice.warn { background: var(--warn-soft); color: var(--warn); }
.notice.danger { background: var(--danger-soft); color: var(--danger); }
.notice.success { background: var(--success-soft); color: var(--success); }
.notice.coral { background: var(--coral-soft); color: var(--coral-ink); }

/* ---------- buttons ---------- */
.btn {
  appearance: none; border: 1.5px solid transparent; border-radius: 14px; min-height: 48px; padding: .7rem 1.15rem; font: inherit; font-weight: 650;
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: .5rem; text-decoration: none; transition: transform .12s ease, background .15s ease, box-shadow .15s ease;
  background: var(--plum); color: var(--ivory);
}
.btn:hover { background: var(--plum-2); }
.btn:active { transform: scale(.98); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; transform: none; }
.btn.coral { background: var(--coral); color: #fff; }
.btn.coral:hover { background: #D0583F; }
.btn.ghost { background: transparent; color: var(--plum); border-color: var(--line); }
.btn.ghost:hover { background: var(--ivory-2); }
.btn.soft { background: var(--plum-soft); color: var(--plum); }
.btn.soft:hover { background: #E8D8E3; }
.btn.danger { background: transparent; color: var(--danger); border-color: #EBC8C4; }
.btn.danger:hover { background: var(--danger-soft); }
.btn.small { min-height: 40px; padding: .45rem .85rem; font-size: .9rem; border-radius: 12px; }
.btn.block { width: 100%; }
.btn.icon { width: 44px; min-height: 44px; padding: 0; border-radius: 12px; }
.btn svg { width: 20px; height: 20px; }
.btn .spinner { width: 16px; height: 16px; }
.btn-row { display: flex; gap: .6rem; flex-wrap: wrap; }
.btn-row > .btn { flex: 1 1 140px; }
.linkbtn { background: none; border: 0; padding: .25rem; color: var(--plum-2); font: inherit; font-weight: 600; text-decoration: underline; cursor: pointer; min-height: 44px; }

/* ---------- forms ---------- */
label.field { display: block; }
.field > .lbl, .field .lbl { display: block; font-weight: 600; font-size: .92rem; margin-bottom: .35rem; color: var(--plum); }
.field .hint { font-size: .82rem; color: var(--muted); margin-top: .3rem; }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=datetime-local], input[type=number], input[type=search], select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: #fff; border: 1.5px solid var(--line); border-radius: 12px; padding: .7rem .85rem; min-height: 48px;
}
textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--plum-3); box-shadow: 0 0 0 3px rgba(122, 69, 115, .18); }
.field.error input, .field.error textarea, .field.error select { border-color: var(--danger); }
.field-error { color: var(--danger); font-size: .85rem; margin-top: .3rem; }
.form-error { margin-bottom: .75rem; }
.check { display: flex; gap: .7rem; align-items: flex-start; padding: .35rem 0; cursor: pointer; }
.check input { width: 22px; height: 22px; margin-top: 1px; accent-color: var(--plum); flex: none; }
.grid-2 { display: grid; grid-template-columns: 1fr; gap: .9rem; }
@media (min-width: 560px) { .grid-2 { grid-template-columns: 1fr 1fr; } }
.chips { display: flex; flex-wrap: wrap; gap: .45rem; }
.chip {
  border: 1.5px solid var(--line); background: #fff; color: var(--ink); border-radius: 999px; padding: .45rem .85rem; font: inherit; font-size: .9rem; cursor: pointer; min-height: 40px;
}
.chip[aria-pressed="true"] { background: var(--plum); border-color: var(--plum); color: var(--ivory); }
.chip.static { cursor: default; background: var(--ivory-2); border-color: transparent; color: var(--plum-2); min-height: 0; padding: .3rem .7rem; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: .35rem; background: var(--ivory-2); padding: .3rem; border-radius: 14px; }
.seg button { border: 0; background: transparent; border-radius: 11px; min-height: 44px; font: inherit; font-weight: 600; color: var(--plum-2); cursor: pointer; }
.seg button[aria-pressed="true"] { background: #fff; color: var(--plum); box-shadow: var(--shadow); }
.toggle { position: relative; width: 50px; height: 30px; flex: none; }
.toggle input { opacity: 0; width: 100%; height: 100%; position: absolute; margin: 0; cursor: pointer; z-index: 1; }
.toggle span { position: absolute; inset: 0; background: #D9CCD4; border-radius: 999px; transition: background .2s; }
.toggle span::after { content: ''; position: absolute; left: 3px; top: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.toggle input:checked + span { background: var(--plum); }
.toggle input:checked + span::after { transform: translateX(20px); }
.toggle input:focus-visible + span { outline: 3px solid var(--coral); outline-offset: 2px; }

/* ---------- avatars & photos ---------- */
.avatar { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; background: var(--plum-soft); flex: none; display: grid; place-items: center; color: var(--plum); font-weight: 700; overflow: hidden; }
.avatar.lg { width: 72px; height: 72px; font-size: 1.4rem; }
.avatar.sm { width: 36px; height: 36px; font-size: .85rem; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.photo-hero { position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 5; background: var(--plum-soft); }
.photo-hero img { width: 100%; height: 100%; object-fit: cover; }
.photo-hero .overlay { position: absolute; left: 0; right: 0; bottom: 0; padding: 1.2rem 1rem .9rem; background: linear-gradient(transparent, rgba(38, 14, 34, .78)); color: #fff; }
.photo-hero .overlay h2 { color: #fff; margin: 0; font-size: 1.6rem; }
.photo-dots { position: absolute; top: .6rem; left: .6rem; right: .6rem; display: flex; gap: 4px; }
.photo-dots i { flex: 1; height: 3px; border-radius: 3px; background: rgba(255,255,255,.45); }
.photo-dots i.on { background: #fff; }
.photo-nav { position: absolute; top: 0; bottom: 30%; width: 40%; background: transparent; border: 0; cursor: pointer; }
.photo-nav.prev { left: 0; } .photo-nav.next { right: 0; }
.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; }
.photo-tile { position: relative; aspect-ratio: 1; border-radius: 14px; overflow: hidden; background: var(--ivory-2); border: 1.5px dashed var(--line); }
.photo-tile img { width: 100%; height: 100%; object-fit: cover; }
.photo-tile .tile-actions { position: absolute; left: 4px; right: 4px; bottom: 4px; display: flex; gap: 4px; justify-content: flex-end; }
.photo-tile .tile-actions button { background: rgba(255,255,255,.92); border: 0; border-radius: 10px; min-height: 34px; min-width: 34px; font-size: .75rem; font-weight: 700; color: var(--plum); cursor: pointer; padding: 0 .5rem; }
.photo-tile .primary-tag { position: absolute; top: 6px; left: 6px; }
.photo-add { display: grid; place-items: center; color: var(--plum-2); font-weight: 600; cursor: pointer; text-align: center; padding: .5rem; font-size: .85rem; }

/* ---------- lists ---------- */
.list { list-style: none; margin: 0; padding: 0; }
.list-item { display: flex; gap: .85rem; align-items: center; padding: .85rem .25rem; border-bottom: 1px solid var(--line); text-decoration: none; color: inherit; min-height: 64px; }
.list-item:last-child { border-bottom: 0; }
a.list-item:hover { background: var(--ivory-2); border-radius: 12px; }
.list-item .title { font-weight: 650; color: var(--plum); }
.list-item .sub { font-size: .87rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: .4rem 1rem; font-size: .93rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }

/* ---------- discover ---------- */
.discover-card { max-width: 460px; margin: 0 auto; }
.reasons { list-style: none; padding: 0; margin: .75rem 0 0; display: grid; gap: .4rem; }
.reasons li { display: flex; gap: .5rem; align-items: flex-start; font-size: .93rem; color: var(--plum-2); }
.reasons li::before { content: ''; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--coral); margin-top: .5em; }
.decide { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; margin-top: 1rem; }
.decide .btn { min-height: 56px; font-size: 1.02rem; }
.filters-bar { display: flex; gap: .5rem; justify-content: space-between; align-items: center; margin-bottom: .9rem; }

/* ---------- messages ---------- */
.thread { display: flex; flex-direction: column; height: calc(100vh - 64px - var(--tabbar-h)); height: calc(100dvh - 64px - var(--tabbar-h)); }
@media (min-width: 900px) { .thread { height: calc(100dvh - 64px); } }
.thread-head { display: flex; align-items: center; gap: .75rem; padding: .5rem 0 .75rem; border-bottom: 1px solid var(--line); }
.thread-body { flex: 1; overflow-y: auto; padding: 1rem 0; display: flex; flex-direction: column; gap: .4rem; }
.bubble { max-width: 80%; padding: .6rem .9rem; border-radius: 18px; background: #fff; border: 1px solid var(--line); align-self: flex-start; white-space: pre-wrap; word-wrap: break-word; }
.bubble.mine { align-self: flex-end; background: var(--plum); color: var(--ivory); border-color: var(--plum); }
.bubble.system { align-self: center; max-width: 92%; background: var(--plum-soft); border-color: transparent; color: var(--plum); font-size: .88rem; text-align: center; border-radius: 14px; }
.bubble .meta { display: block; font-size: .72rem; opacity: .75; margin-top: .2rem; text-align: right; }
.bubble.failed { background: var(--danger-soft); color: var(--danger); border-color: #EBC8C4; }
.composer { display: flex; gap: .5rem; padding: .6rem 0 .2rem; border-top: 1px solid var(--line); align-items: flex-end; }
.composer textarea { min-height: 48px; max-height: 140px; border-radius: 16px; }
.composer-hint { font-size: .8rem; color: var(--muted); padding: .25rem 0 0; }

/* ---------- hot seat ---------- */
.room { display: grid; gap: 1rem; }
.room-head { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: .5rem; position: sticky; top: 57px; z-index: 5; background: var(--ivory); padding: .4rem 0; }
@media (max-width: 899px) { .timer { width: 108px; height: 108px; } .timer .t { font-size: 1.6rem; } .avatar.lg { width: 60px; height: 60px; } }
@media (min-width: 900px) { .room-head { top: 0; } }
.person { display: flex; flex-direction: column; align-items: center; gap: .3rem; text-align: center; min-width: 0; }
.person .name { font-weight: 650; color: var(--plum); font-size: .92rem; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.presence { font-size: .75rem; color: var(--muted); display: inline-flex; align-items: center; gap: .3rem; }
.presence::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #C9BCC5; }
.presence.on::before { background: var(--success); }
.person.turn .avatar { box-shadow: 0 0 0 3px var(--ivory), 0 0 0 6px var(--coral); }
.timer { position: relative; width: 132px; height: 132px; display: grid; place-items: center; }
.timer svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.timer .track { stroke: var(--ivory-2); }
.timer .prog { stroke: var(--plum); transition: stroke-dashoffset 1s linear; }
.timer.paused .prog { stroke: #B9A9B5; }
.timer .t { font-family: var(--display); font-size: 1.9rem; font-weight: 600; color: var(--plum); font-variant-numeric: tabular-nums; }
.timer .lbl { font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-top: -.2rem; }
.timer-inner { display: flex; flex-direction: column; align-items: center; }
.qcard { background: var(--plum); color: var(--ivory); border-radius: 24px; padding: 1.4rem 1.25rem 1.25rem; box-shadow: 0 10px 30px rgba(62, 26, 58, .22); }
.qcard .mood { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: #F3C3B6; font-weight: 700; }
.qcard .q { font-family: var(--display); font-size: 1.4rem; line-height: 1.3; margin: .5rem 0 1rem; color: #fff; }
.qcard .turn { display: inline-flex; gap: .4rem; align-items: center; background: rgba(255,255,255,.12); border-radius: 999px; padding: .35rem .8rem; font-size: .85rem; font-weight: 600; }
.qcard textarea { background: rgba(255,255,255,.96); border-color: transparent; }
.qcard .answer { background: rgba(255,255,255,.1); border-radius: 14px; padding: .75rem .9rem; margin-top: .6rem; }
.qcard .answer .who { font-size: .78rem; opacity: .8; font-weight: 700; margin-bottom: .15rem; }
.qcard .btn.soft { background: rgba(255,255,255,.14); color: #fff; }
.qcard .btn.soft:hover { background: rgba(255,255,255,.22); }
.qcard .btn.coral { box-shadow: none; }
.controls { display: grid; grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)); gap: .5rem; }
.controls .btn { min-height: 48px; padding: .5rem; font-size: .9rem; }
.room-chat { max-height: 260px; overflow-y: auto; display: flex; flex-direction: column; gap: .35rem; padding: .5rem 0; }
.progress-dots { display: flex; gap: 6px; justify-content: center; }
.progress-dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--line); }
.progress-dots i.on { background: var(--coral); }
.end-choices { display: grid; gap: .6rem; }
.end-choices .btn { justify-content: flex-start; min-height: 56px; text-align: left; }

/* ---------- modal & toast ---------- */
.modal-back { position: fixed; inset: 0; z-index: 100; background: rgba(38, 14, 34, .45); display: flex; align-items: flex-end; justify-content: center; padding: 0; animation: fade .18s ease; }
.modal { background: var(--ivory); width: 100%; max-width: 560px; max-height: 92vh; overflow-y: auto; border-radius: 24px 24px 0 0; padding: 1.25rem 1.1rem calc(1.25rem + env(safe-area-inset-bottom)); animation: rise .22s ease; }
@media (min-width: 640px) { .modal-back { align-items: center; padding: 1rem; } .modal { border-radius: 24px; } }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: .75rem; }
.modal-head h2 { margin: 0; }
.toasts { position: fixed; z-index: 200; left: 50%; transform: translateX(-50%); bottom: calc(var(--tabbar-h) + .75rem); width: min(94vw, 440px); display: grid; gap: .5rem; }
.toasts > .toast:nth-last-child(n+4) { display: none; }
@media (min-width: 900px) { .toasts { bottom: auto; top: .75rem; left: auto; right: 1rem; transform: none; } }
.toast { background: var(--plum); color: var(--ivory); border-radius: 14px; padding: .8rem 1rem; box-shadow: var(--shadow); display: flex; gap: .75rem; align-items: center; animation: rise .2s ease; }
.toast.error { background: var(--danger); }
.toast.success { background: var(--success); }
.toast a, .toast button { color: #fff; font-weight: 700; }
.toast button { background: none; border: 0; cursor: pointer; font: inherit; min-height: 36px; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ---------- misc ---------- */
.spinner { width: 28px; height: 28px; border: 3px solid var(--plum-soft); border-top-color: var(--plum); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading { display: grid; place-items: center; gap: .75rem; padding: 3rem 1rem; color: var(--muted); }
.empty { text-align: center; padding: 2.5rem 1rem; }
.empty .art { width: 84px; height: 84px; margin: 0 auto 1rem; border-radius: 26px; background: var(--plum-soft); display: grid; place-items: center; color: var(--plum); }
.empty .art svg { width: 40px; height: 40px; }
.hero { text-align: center; padding: 2.5rem 0 1.5rem; }
.hero h1 { font-size: 2.3rem; }
.hero .tagline { font-family: var(--display); font-style: italic; color: var(--coral-ink); font-size: 1.2rem; margin-bottom: 1.25rem; }
.steps { display: grid; gap: .75rem; counter-reset: s; }
.steps li { list-style: none; display: flex; gap: .8rem; align-items: flex-start; }
.steps li::before { counter-increment: s; content: counter(s); flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--coral-soft); color: var(--coral-ink); display: grid; place-items: center; font-weight: 700; font-size: .9rem; }
.menu-list button, .menu-list a { width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--line); padding: .9rem .25rem; font: inherit; color: var(--ink); cursor: pointer; min-height: 52px; display: flex; gap: .75rem; align-items: center; text-decoration: none; }
.menu-list .danger { color: var(--danger); }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th, .table td { text-align: left; padding: .55rem .5rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { color: var(--muted); font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; }
.scroll-x { overflow-x: auto; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .75rem; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: .9rem 1rem; }
.stat .v { font-family: var(--display); font-size: 1.7rem; color: var(--plum); font-weight: 600; }
.stat .k { color: var(--muted); font-size: .85rem; }
.test-banner { background: var(--warn-soft); color: var(--warn); text-align: center; font-size: .8rem; font-weight: 600; padding: .3rem .5rem; }
.icon-inline { width: 18px; height: 18px; vertical-align: -3px; }
.notif-item.unread { background: var(--plum-soft); border-radius: 12px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
.loading.boot { width: 100%; min-height: 100vh; }
.room > div:empty { display: none; }

/* Mobile app shell: keep content clear of the notch / status bar. */
.topbar { padding-top: calc(.6rem + env(safe-area-inset-top)); }
.native-app .main { padding-top: 1rem; }
.native-app body, .native-app { -webkit-tap-highlight-color: transparent; }
.native-app .modal { max-height: calc(100vh - env(safe-area-inset-top) - 12px); }
