/* Verita — palette taken from the logo: ink charcoal + feather teal. */
:root {
  --ink: #1D2324;          /* app bars, logo ground */
  --ink-2: #273031;
  --on-ink: #F4F7F6;
  --teal: #13D1BC;         /* the feather */
  --teal-deep: #0A8F80;    /* teal that reads on light surfaces */
  --on-teal: #062B27;      /* text/icons placed on teal */
  --bg: #FFFFFF;
  --panel: #F2F4F4;
  --line: #E4E8E8;
  --text: #182021;
  --muted: #66716F;
  --wall: #ECEFEE;
  --wall-img: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%22160%22%20height%3D%22160%22%20fill%3D%22none%22%20stroke%3D%22rgba%2829%2C35%2C36%2C.055%29%22%20stroke-width%3D%221.6%22%20stroke-linecap%3D%22round%22%3E%3Cg%20transform%3D%22translate%2818%2022%29%20rotate%28-8%29%22%3E%3Cpath%20d%3D%22M0%2034C6%2022%2016%208%2024%200c3%2012-3%2028-24%2034zM3%2031%2021%205%22/%3E%3C/g%3E%3Cg%20transform%3D%22translate%28104%2040%29%20rotate%2828%29%22%3E%3Cpath%20d%3D%22M0%2034C6%2022%2016%208%2024%200c3%2012-3%2028-24%2034zM3%2031%2021%205%22/%3E%3C/g%3E%3Cg%20transform%3D%22translate%2860%20104%29%20rotate%28-34%29%22%3E%3Cpath%20d%3D%22M0%2034C6%2022%2016%208%2024%200c3%2012-3%2028-24%2034zM3%2031%2021%205%22/%3E%3C/g%3E%3Cg%20transform%3D%22translate%28128%20118%29%20rotate%2812%29%20scale%28.7%29%22%3E%3Cpath%20d%3D%22M0%2034C6%2022%2016%208%2024%200c3%2012-3%2028-24%2034zM3%2031%2021%205%22/%3E%3C/g%3E%3Ccircle%20cx%3D%2274%22%20cy%3D%2230%22%20r%3D%221.6%22/%3E%3Ccircle%20cx%3D%2224%22%20cy%3D%22120%22%20r%3D%221.6%22/%3E%3Ccircle%20cx%3D%22140%22%20cy%3D%2284%22%20r%3D%221.4%22/%3E%3C/svg%3E");
  --out: #D9F4EF;
  --in: #FFFFFF;
  --quote-bg: rgba(29, 35, 36, .06);
  --read: #0A8F80;
  --bubble-shadow: 0 1px .5px rgba(11, 20, 18, .13);
  --danger: #D2463F;
  --pill: rgba(255, 255, 255, .94);
  --note: #FFF5D1;
  --flash: rgba(19, 209, 188, .28);
  --r: 12px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
  --st: env(safe-area-inset-top, 0px);
  --sb: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #161B1C; --ink-2: #202728; --bg: #0F1415; --panel: #182021; --line: #232C2D; --text: #E8EEED; --muted: #8E9B99;
    --wall: #0B1011; --wall-img: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%22160%22%20height%3D%22160%22%20fill%3D%22none%22%20stroke%3D%22rgba%28255%2C255%2C255%2C.04%29%22%20stroke-width%3D%221.6%22%20stroke-linecap%3D%22round%22%3E%3Cg%20transform%3D%22translate%2818%2022%29%20rotate%28-8%29%22%3E%3Cpath%20d%3D%22M0%2034C6%2022%2016%208%2024%200c3%2012-3%2028-24%2034zM3%2031%2021%205%22/%3E%3C/g%3E%3Cg%20transform%3D%22translate%28104%2040%29%20rotate%2828%29%22%3E%3Cpath%20d%3D%22M0%2034C6%2022%2016%208%2024%200c3%2012-3%2028-24%2034zM3%2031%2021%205%22/%3E%3C/g%3E%3Cg%20transform%3D%22translate%2860%20104%29%20rotate%28-34%29%22%3E%3Cpath%20d%3D%22M0%2034C6%2022%2016%208%2024%200c3%2012-3%2028-24%2034zM3%2031%2021%205%22/%3E%3C/g%3E%3Cg%20transform%3D%22translate%28128%20118%29%20rotate%2812%29%20scale%28.7%29%22%3E%3Cpath%20d%3D%22M0%2034C6%2022%2016%208%2024%200c3%2012-3%2028-24%2034zM3%2031%2021%205%22/%3E%3C/g%3E%3Ccircle%20cx%3D%2274%22%20cy%3D%2230%22%20r%3D%221.6%22/%3E%3Ccircle%20cx%3D%2224%22%20cy%3D%22120%22%20r%3D%221.6%22/%3E%3Ccircle%20cx%3D%22140%22%20cy%3D%2284%22%20r%3D%221.4%22/%3E%3C/svg%3E"); --out: #0D4A43; --in: #1C2526; --quote-bg: rgba(255,255,255,.06);
    --read: #13D1BC; --pill: rgba(28, 37, 38, .96); --note: #2E2B1B; --bubble-shadow: 0 1px .5px rgba(0,0,0,.45); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ink: #161B1C; --ink-2: #202728; --bg: #0F1415; --panel: #182021; --line: #232C2D; --text: #E8EEED; --muted: #8E9B99;
  --wall: #0B1011; --wall-img: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%22160%22%20height%3D%22160%22%20fill%3D%22none%22%20stroke%3D%22rgba%28255%2C255%2C255%2C.04%29%22%20stroke-width%3D%221.6%22%20stroke-linecap%3D%22round%22%3E%3Cg%20transform%3D%22translate%2818%2022%29%20rotate%28-8%29%22%3E%3Cpath%20d%3D%22M0%2034C6%2022%2016%208%2024%200c3%2012-3%2028-24%2034zM3%2031%2021%205%22/%3E%3C/g%3E%3Cg%20transform%3D%22translate%28104%2040%29%20rotate%2828%29%22%3E%3Cpath%20d%3D%22M0%2034C6%2022%2016%208%2024%200c3%2012-3%2028-24%2034zM3%2031%2021%205%22/%3E%3C/g%3E%3Cg%20transform%3D%22translate%2860%20104%29%20rotate%28-34%29%22%3E%3Cpath%20d%3D%22M0%2034C6%2022%2016%208%2024%200c3%2012-3%2028-24%2034zM3%2031%2021%205%22/%3E%3C/g%3E%3Cg%20transform%3D%22translate%28128%20118%29%20rotate%2812%29%20scale%28.7%29%22%3E%3Cpath%20d%3D%22M0%2034C6%2022%2016%208%2024%200c3%2012-3%2028-24%2034zM3%2031%2021%205%22/%3E%3C/g%3E%3Ccircle%20cx%3D%2274%22%20cy%3D%2230%22%20r%3D%221.6%22/%3E%3Ccircle%20cx%3D%2224%22%20cy%3D%22120%22%20r%3D%221.6%22/%3E%3Ccircle%20cx%3D%22140%22%20cy%3D%2284%22%20r%3D%221.4%22/%3E%3C/svg%3E"); --out: #0D4A43; --in: #1C2526; --quote-bg: rgba(255,255,255,.06);
  --read: #13D1BC; --pill: rgba(28, 37, 38, .96); --note: #2E2B1B; --bubble-shadow: 0 1px .5px rgba(0,0,0,.45); color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; margin: 0; }
body { font-family: var(--font); font-size: 15px; line-height: 1.38; color: var(--text); background: var(--ink);
  overscroll-behavior: none; -webkit-font-smoothing: antialiased; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
svg { display: block; }
.hidden { display: none !important; }

#app { height: 100dvh; display: flex; overflow: hidden; background: var(--bg); }
body.offline-session #app { margin-top: 26px; height: calc(100dvh - 26px); }
#app:has(.splash) { position: fixed; inset: 0; height: 100dvh; display: grid; place-items: center; background: var(--ink); }
.splash { width: 100%; height: 100%; display: grid; place-items: center; margin: 0; color: var(--on-ink); }
.splash img { display: block; animation: breathe 1.6s ease-in-out infinite; }
@keyframes breathe { 50% { opacity: .55; } }
@media (prefers-reduced-motion: reduce) { *, *::before { animation: none !important; transition: none !important; } }

/* ---------- panes ---------- */
.pane { display: flex; flex-direction: column; min-width: 0; height: 100%; background: var(--bg); position: relative; }
.left, .right { width: 100%; }
@media (max-width: 899px) {
  #app[data-pane="left"] .right, #app[data-pane="right"] .left { display: none; }
}
@media (min-width: 900px) {
  .left { width: 400px; flex: none; border-right: 1px solid var(--line); }
  .right { flex: 1; }
  .right .bar > .back-btn { display: none; }
  .right .bar { padding-left: 14px; }
}

/* ---------- app bars ---------- */
.bar { flex: none; display: flex; align-items: center; gap: 4px; min-height: calc(58px + var(--st));
  padding: var(--st) 6px 0 6px; background: var(--ink); color: var(--on-ink); position: relative; z-index: 2; }
.brand { flex: 1; display: flex; align-items: center; padding-left: 12px; color: var(--on-ink); }
.brand .logo { height: 34px; width: auto; }
.bar h2 { font-size: 18px; font-weight: 600; margin: 0 0 0 4px; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.icon-btn { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; flex: none; transition: background .15s; }
.icon-btn:active { background: rgba(255,255,255,.12); }
.pane-body .icon-btn:active, .composer .icon-btn:active { background: var(--line); }
.icon-btn svg { width: 22px; height: 22px; }
.chat-head { flex: 1; display: flex; align-items: center; gap: 10px; min-width: 0; text-align: left; padding: 4px 0; border-radius: 10px; }
.chat-head .who { min-width: 0; }
.chat-head .name { font-weight: 600; font-size: 16.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-head .status { font-size: 12.5px; opacity: .78; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-head .status.live { color: var(--teal); opacity: 1; }

.search { flex: none; padding: 10px 12px 4px; background: var(--bg); }
.search input { width: 100%; height: 40px; border-radius: 20px; border: 0; padding: 0 16px; background: var(--panel); font-size: 15px; }
.search input:focus { outline: 2px solid var(--teal); outline-offset: -2px; }
.chips { flex: none; display: flex; gap: 8px; padding: 8px 12px 10px; background: var(--bg); border-bottom: 1px solid var(--line); overflow-x: auto; }
.chip { height: 32px; padding: 0 14px; border-radius: 16px; background: var(--panel); color: var(--muted); font-size: 14px; font-weight: 500; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.chip.on { background: var(--ink); color: var(--on-ink); }
:root[data-theme="dark"] .chip.on { background: var(--teal); color: var(--on-teal); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .chip.on { background: var(--teal); color: var(--on-teal); } }
.chip .n { font-size: 12px; background: var(--teal); color: var(--on-teal); border-radius: 9px; padding: 0 6px; line-height: 18px; font-weight: 700; }

.pane-body { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; position: relative; }
.pad { padding: 16px; }

/* ---------- avatars ---------- */
.av { flex: none; width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; position: relative;
  font-weight: 600; font-size: 17px; color: #fff; user-select: none; }
.av img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.av.sm { width: 40px; height: 40px; font-size: 14px; }
.av.lg { width: 120px; height: 120px; font-size: 42px; }
.av svg { width: 55%; height: 55%; }
.av .dot { position: absolute; right: 1px; bottom: 1px; width: 13px; height: 13px; border-radius: 50%; background: var(--teal); border: 2.5px solid var(--bg); }
.av.edit { cursor: pointer; }
.av.edit::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: rgba(0,0,0,.0); transition: background .15s; }
.av.edit:hover::after { background: rgba(0,0,0,.18); }
.av-cam { position: absolute; right: 2px; bottom: 2px; width: 36px; height: 36px; border-radius: 50%; background: var(--teal); color: var(--on-teal); display: grid; place-items: center; border: 3px solid var(--bg); }
.av-cam svg { width: 18px; height: 18px; }

/* ---------- list rows ---------- */
.row { display: flex; align-items: center; gap: 13px; width: 100%; padding: 8px 14px; text-align: left; position: relative; transition: background .12s; }
.row:active, .row.active { background: var(--panel); }
@media (hover: hover) { .row:hover { background: var(--panel); } }
.row .mid { flex: 1; min-width: 0; padding: 6px 0; align-self: stretch; display: flex; flex-direction: column; justify-content: center; gap: 2px; }
.row .top, .row .sub { display: flex; align-items: center; gap: 8px; }
.row .title { flex: 1; font-weight: 600; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .time { font-size: 12px; color: var(--muted); flex: none; }
.row .time.hot { color: var(--teal-deep); font-weight: 600; }
.row .preview { flex: 1; color: var(--muted); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 4px; min-width: 0; }
.row .preview svg { width: 16px; height: 16px; flex: none; }
.row .preview .live { color: var(--teal-deep); font-weight: 500; }
.row .preview .draft { color: var(--danger); font-weight: 500; }
.badge { flex: none; min-width: 21px; height: 21px; padding: 0 6px; border-radius: 11px; background: var(--teal);
  color: var(--on-teal); font-size: 12px; font-weight: 700; display: grid; place-items: center; }
.row .check { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--muted); flex: none; display: grid; place-items: center; color: transparent; }
.row .check svg { width: 16px; height: 16px; }
.row.picked .check { background: var(--teal); border-color: var(--teal); color: var(--on-teal); }
.row .tag { font-size: 11px; color: var(--teal-deep); border: 1px solid currentColor; border-radius: 5px; padding: 1px 6px; flex: none; }
.section-label { padding: 16px 18px 6px; font-size: 13.5px; color: var(--teal-deep); font-weight: 600; }

.empty { padding: 48px 28px; text-align: center; color: var(--muted); max-width: 360px; margin: 0 auto; }
.empty .mark { width: 64px; margin: 0 auto 6px; color: var(--teal); opacity: .9; }
.empty h3 { color: var(--text); font-size: 18px; margin: 14px 0 6px; }
.lock-note { display: flex; gap: 6px; align-items: center; justify-content: center; color: var(--muted); font-size: 12.5px; padding: 18px; }
.lock-note svg { width: 13px; height: 13px; }

.fab { position: absolute; right: 18px; bottom: calc(18px + var(--sb)); width: 58px; height: 58px; border-radius: 18px;
  background: var(--teal); color: var(--on-teal); display: grid; place-items: center; box-shadow: 0 6px 18px rgba(10, 60, 54, .3); z-index: 3; transition: transform .12s; }
.fab:active { transform: scale(.94); }
.fab svg { width: 24px; height: 24px; }

/* ---------- conversation ---------- */
.wall-wrap { flex: 1; min-height: 0; position: relative; display: flex; flex-direction: column; }
.wall { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 6px 4% 8px; background-color: var(--wall);
  background-image: var(--wall-img); background-size: 160px 160px; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.wall-empty { flex: 1; display: grid; place-items: center; background: var(--panel); color: var(--muted); text-align: center; padding: 30px; }
.wall-empty .logo { width: 240px; color: var(--text); margin: 0 auto 14px; opacity: .92; }
.day { position: sticky; top: 6px; z-index: 1; text-align: center; margin: 10px 0 6px; pointer-events: none; }
.day span, .sys span { display: inline-block; background: var(--pill); padding: 5px 12px; border-radius: 8px; font-size: 12.5px;
  color: var(--muted); box-shadow: var(--bubble-shadow); }
.sys { text-align: center; margin: 6px 0; }
.sys span { max-width: 85%; }
.e2e-banner { margin: 8px auto 12px; max-width: 360px; text-align: center; font-size: 12.5px; background: var(--note);
  color: var(--text); border-radius: 10px; padding: 8px 12px; box-shadow: var(--bubble-shadow); display: flex; gap: 8px; align-items: flex-start; text-align: left; }
.e2e-banner svg { width: 14px; height: 14px; flex: none; margin-top: 2px; }
.warn-banner { background: #FFE2C2; color: #5A3410; }
.unread-line { text-align: center; margin: 10px -4%; padding: 5px 0; background: rgba(255,255,255,.55); color: var(--teal-deep); font-size: 12.5px; font-weight: 600; }
:root[data-theme="dark"] .unread-line { background: rgba(255,255,255,.05); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .unread-line { background: rgba(255,255,255,.05); } }

.msg { display: flex; margin: 2px 0; position: relative; border-radius: 8px; transition: background .4s; }
.msg.out { justify-content: flex-end; }
.msg.first { margin-top: 8px; }
.msg.new .bubble { animation: pop .18s ease-out; }
@keyframes pop { from { transform: translateY(6px) scale(.98); opacity: 0; } }
.msg.flash { background: var(--flash); }
.msg.selected { background: var(--flash); }
.swipe-hint { position: absolute; left: -34px; top: 50%; width: 28px; height: 28px; margin-top: -14px; border-radius: 50%; background: var(--pill);
  display: grid; place-items: center; color: var(--muted); opacity: 0; box-shadow: var(--bubble-shadow); }
.swipe-hint svg { width: 16px; height: 16px; }
.bubble { position: relative; max-width: min(80%, 540px); background: var(--in); border-radius: var(--r); padding: 6px 8px 7px 10px;
  box-shadow: var(--bubble-shadow); word-wrap: break-word; overflow-wrap: anywhere; touch-action: pan-y; }
.out .bubble { background: var(--out); }
.msg.first.in .bubble { border-top-left-radius: 3px; }
.msg.first.out .bubble { border-top-right-radius: 3px; }
.bubble .sender { font-size: 13px; font-weight: 600; margin-bottom: 2px; }
.bubble .text { white-space: pre-wrap; font-size: 15.3px; }
.bubble .text a { color: var(--teal-deep); text-decoration: underline; text-underline-offset: 2px; }
.bubble .text.big { font-size: 36px; line-height: 1.15; }
.meta { float: right; margin: 6px 0 -4px 10px; display: flex; align-items: center; gap: 3px; font-size: 11px; color: var(--muted); white-space: nowrap; position: relative; top: 2px; }
.meta svg { width: 16px; height: 16px; }
.meta .read { color: var(--read); }
.bubble.media { padding: 3px; }
.bubble.media .caption { padding: 4px 7px 2px; }
.bubble.media .sender, .bubble.media .quote { margin: 3px 4px 4px; }
.bubble.media > .meta.over { position: absolute; top: auto; right: 9px; bottom: 8px; float: none; margin: 0; color: #fff;
  background: rgba(0,0,0,.38); padding: 1px 7px; border-radius: 10px; }
.bubble.deleted .text, .bubble.failed .text { color: var(--muted); font-style: italic; }

.quote { display: flex; gap: 8px; align-items: stretch; background: var(--quote-bg); border-radius: 8px; overflow: hidden; margin: 2px -2px 5px; text-align: left; width: calc(100% + 4px); min-width: 180px; cursor: pointer; }
.quote .qbar { width: 4px; flex: none; }
.quote .qbody { flex: 1; min-width: 0; padding: 5px 2px 6px; }
.quote .qname { font-size: 12.5px; font-weight: 600; }
.quote .qtext { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 4px; }
.quote .qtext svg { width: 14px; height: 14px; flex: none; }
.quote img { width: 48px; height: 48px; object-fit: cover; flex: none; }

.mediabox { position: relative; border-radius: 9px; overflow: hidden; background: #0003; display: block; min-width: 200px; }
.mediabox img, .mediabox video { display: block; width: 100%; max-height: 380px; object-fit: cover; }
.mediabox .blur { filter: blur(8px); transform: scale(1.1); }
.center { position: absolute; inset: 0; display: grid; place-items: center; }
.play-chip { width: 54px; height: 54px; border-radius: 50%; background: rgba(0,0,0,.5); color: #fff; display: grid; place-items: center; backdrop-filter: blur(4px); }
.play-chip svg { width: 26px; height: 26px; }
.dur-chip { position: absolute; left: 8px; bottom: 8px; color: #fff; font-size: 11.5px; background: rgba(0,0,0,.38); padding: 1px 7px; border-radius: 10px; }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid rgba(255,255,255,.35); border-top-color: #fff; animation: spin .8s linear infinite; }
.spinner.dark { border-color: var(--line); border-top-color: var(--teal); }
.spinner.sm { width: 20px; height: 20px; border-width: 2.5px; }
.uploading { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0,0,0,.28); }
@keyframes spin { to { transform: rotate(360deg); } }

.note-video { width: 230px; height: 230px; border-radius: 50%; overflow: hidden; position: relative; background: #000; box-shadow: 0 2px 8px rgba(0,0,0,.18); }
.note-video video, .note-video img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bubble.note { background: transparent !important; box-shadow: none; padding: 0; }
.bubble.note .meta { position: absolute; top: auto; right: 12px; bottom: 12px; color: #fff; background: rgba(0,0,0,.42); padding: 1px 7px; border-radius: 10px; float: none; margin: 0; }
.bubble.note .quote { background: var(--pill); }

.filecard { display: flex; align-items: center; gap: 10px; padding: 9px; border-radius: 9px; background: var(--quote-bg); min-width: 230px; text-align: left; width: 100%; position: relative; }
.filecard .ficon { width: 40px; height: 46px; border-radius: 6px; background: var(--ink); color: var(--teal); display: grid; place-items: center; font-size: 10px; font-weight: 800; letter-spacing: .02em; flex: none; }
.filecard .fname { font-weight: 500; font-size: 14px; word-break: break-all; }
.filecard .fsize { font-size: 12px; color: var(--muted); }

.voice { display: flex; align-items: center; gap: 10px; min-width: 240px; padding: 4px 2px 2px; }
.voice .vbtn { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); flex: none; }
.voice .vbtn svg { width: 28px; height: 28px; }
.voice .track { flex: none; width: 100%; height: 28px; position: relative; display: flex; align-items: center; cursor: pointer; }
.voice .bars { position: absolute; inset: 0; display: flex; align-items: center; gap: 2px; }
.voice .bars i { flex: 1; background: var(--muted); opacity: .4; border-radius: 2px; }
.voice .bars i.on { background: var(--teal-deep); opacity: 1; }
.voice .vtime { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.voice .av { width: 42px; height: 42px; font-size: 14px; }

.to-bottom { position: absolute; right: 14px; bottom: 12px; width: 44px; height: 44px; border-radius: 50%; background: var(--pill); color: var(--muted);
  box-shadow: 0 2px 8px rgba(0,0,0,.18); display: grid; place-items: center; z-index: 3; transition: opacity .15s, transform .15s; }
.to-bottom svg { width: 24px; height: 24px; transform: rotate(90deg); }
.to-bottom.gone { opacity: 0; transform: translateY(10px); pointer-events: none; }
.to-bottom .badge { position: absolute; top: -6px; right: -4px; }

/* ---------- composer ---------- */
.composer { flex: none; display: flex; align-items: flex-end; gap: 6px; padding: 6px 6px calc(6px + var(--sb)); background: var(--wall); }
.inputbox { flex: 1; display: flex; flex-direction: column; background: var(--bg); border-radius: 24px; min-height: 48px; box-shadow: var(--bubble-shadow); overflow: hidden; min-width: 0; }
.inputrow { display: flex; align-items: flex-end; padding: 0 4px; }
.inputbox textarea { flex: 1; border: 0; outline: 0; resize: none; background: transparent; font-size: 16px; line-height: 22px; padding: 13px 8px; max-height: 132px; min-width: 0; }
.inputbox .icon-btn { color: var(--muted); width: 44px; height: 48px; border-radius: 22px; }
.reply-bar { display: flex; margin: 6px 6px 0; border-radius: 14px 14px 8px 8px; }
.reply-bar .quote { margin: 0; width: 100%; cursor: default; }
.reply-bar .icon-btn { width: 34px; height: 34px; align-self: center; }
.send { width: 48px; height: 48px; border-radius: 50%; background: var(--teal); color: var(--on-teal); display: grid; place-items: center; flex: none; transition: transform .1s; }
.send:active { transform: scale(.92); }
.send svg { width: 22px; height: 22px; }
.recbar { flex: 1; display: flex; align-items: center; gap: 12px; background: var(--bg); border-radius: 24px; height: 48px; padding: 0 8px 0 16px; box-shadow: var(--bubble-shadow); }
.recbar .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--danger); animation: breathe 1s infinite; }
.recbar .rtime { flex: 1; font-variant-numeric: tabular-nums; }
.recbar .icon-btn { color: var(--danger); }

/* ---------- sheets, menus, overlays ---------- */
#overlay:empty { display: none; }
.scrim { position: fixed; inset: 0; background: rgba(8, 14, 14, .45); z-index: 40; display: flex; align-items: flex-end; justify-content: center; animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
.sheet { width: 100%; max-width: 520px; background: var(--bg); border-radius: 22px 22px 0 0; padding: 10px 12px calc(16px + var(--sb)); animation: up .2s ease-out; }
.sheet::before { content: ""; display: block; width: 36px; height: 4px; border-radius: 2px; background: var(--line); margin: 0 auto 10px; }
@keyframes up { from { transform: translateY(30px); opacity: 0; } }
.sheet h3 { margin: 2px 8px 12px; font-size: 16px; }
.attach-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 6px 0 4px; }
.attach-grid button { display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); padding: 8px 0; }
.attach-grid .disc { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; color: #fff; }
.attach-grid .disc svg { width: 24px; height: 24px; }
.sheet-list button { display: flex; align-items: center; gap: 16px; width: 100%; padding: 14px 10px; border-radius: 12px; font-size: 15.5px; text-align: left; }
.sheet-list button:active { background: var(--panel); }
.sheet-list svg { width: 22px; height: 22px; color: var(--muted); }
.sheet-list .danger, .sheet-list .danger svg { color: var(--danger); }

.menu { position: fixed; z-index: 45; background: var(--bg); border-radius: 14px; min-width: 210px; padding: 6px 0;
  box-shadow: 0 10px 30px rgba(0,0,0,.24); animation: up .14s ease-out; transform-origin: top right; }
.menu button { display: block; width: 100%; text-align: left; padding: 12px 18px; font-size: 15px; }
.menu button:active { background: var(--panel); }
.menu-scrim { position: fixed; inset: 0; z-index: 44; }

.viewer { position: fixed; inset: 0; z-index: 50; background: #000; display: flex; flex-direction: column; color: #fff; animation: fade .15s; }
.viewer .bar { background: rgba(0,0,0,.5); }
.viewer .stage { flex: 1; display: grid; place-items: center; overflow: hidden; min-height: 0; }
.viewer img, .viewer video { max-width: 100%; max-height: 100%; object-fit: contain; }
.viewer .compose-cap { display: flex; gap: 8px; padding: 8px 10px calc(10px + var(--sb)); align-items: flex-end; }
.viewer .compose-cap .inputbox { background: #232b2c; color: #fff; }
.viewer .thumbs { display: flex; gap: 6px; overflow-x: auto; padding: 0 10px 6px; }
.viewer .thumbs img, .viewer .thumbs .tf { width: 54px; height: 54px; object-fit: cover; border-radius: 8px; border: 2px solid transparent; flex: none; background: #333; display: grid; place-items: center; }
.viewer .thumbs .on { border-color: var(--teal); }

.recorder { position: fixed; inset: 0; z-index: 50; background: rgba(12, 17, 18, .95); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 26px; color: #fff; padding: var(--st) 20px var(--sb); animation: fade .15s; }
.recorder .circle { width: min(78vw, 320px); aspect-ratio: 1; border-radius: 50%; overflow: hidden; background: #000; position: relative; box-shadow: 0 0 0 4px rgba(19,209,188,.35); }
.recorder .circle.rec-on { box-shadow: 0 0 0 4px var(--danger); }
.recorder .circle video { width: 100%; height: 100%; object-fit: cover; }
.recorder .ctrls { display: flex; align-items: center; gap: 34px; }
.recorder .rec { width: 76px; height: 76px; border-radius: 50%; border: 4px solid #fff; display: grid; place-items: center; }
.recorder .rec i { width: 56px; height: 56px; border-radius: 50%; background: var(--danger); transition: all .2s; }
.recorder .rec.on i { width: 28px; height: 28px; border-radius: 7px; }
.recorder .icon-btn { color: #fff; width: 52px; height: 52px; }
.recorder .hint { font-size: 14px; opacity: .8; font-variant-numeric: tabular-nums; }
.recorder .btn.ghost { color: #fff; border-color: rgba(255,255,255,.35); }

#toast { position: fixed; left: 50%; bottom: calc(92px + var(--sb)); transform: translateX(-50%) translateY(8px); background: var(--ink-2); color: var(--on-ink);
  padding: 10px 16px; border-radius: 10px; font-size: 14px; z-index: 60; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; max-width: 90vw; text-align: center; box-shadow: 0 6px 20px rgba(0,0,0,.25); }
#toast.show { opacity: 1; transform: translateX(-50%); }

/* ---------- sign-in ---------- */
.auth { flex: 1; overflow-y: auto; display: flex; flex-direction: column; align-items: center; background: var(--panel); }
.auth-top { flex: none; width: 100%; background: var(--ink); color: var(--on-ink); padding: calc(44px + var(--st)) 24px 70px; text-align: center; position: relative; overflow: hidden; }
.auth-top::after { content: ""; position: absolute; inset: 0; background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%22160%22%20height%3D%22160%22%20fill%3D%22none%22%20stroke%3D%22rgba%28255%2C255%2C255%2C.04%29%22%20stroke-width%3D%221.6%22%20stroke-linecap%3D%22round%22%3E%3Cg%20transform%3D%22translate%2818%2022%29%20rotate%28-8%29%22%3E%3Cpath%20d%3D%22M0%2034C6%2022%2016%208%2024%200c3%2012-3%2028-24%2034zM3%2031%2021%205%22/%3E%3C/g%3E%3Cg%20transform%3D%22translate%28104%2040%29%20rotate%2828%29%22%3E%3Cpath%20d%3D%22M0%2034C6%2022%2016%208%2024%200c3%2012-3%2028-24%2034zM3%2031%2021%205%22/%3E%3C/g%3E%3Cg%20transform%3D%22translate%2860%20104%29%20rotate%28-34%29%22%3E%3Cpath%20d%3D%22M0%2034C6%2022%2016%208%2024%200c3%2012-3%2028-24%2034zM3%2031%2021%205%22/%3E%3C/g%3E%3Cg%20transform%3D%22translate%28128%20118%29%20rotate%2812%29%20scale%28.7%29%22%3E%3Cpath%20d%3D%22M0%2034C6%2022%2016%208%2024%200c3%2012-3%2028-24%2034zM3%2031%2021%205%22/%3E%3C/g%3E%3Ccircle%20cx%3D%2274%22%20cy%3D%2230%22%20r%3D%221.6%22/%3E%3Ccircle%20cx%3D%2224%22%20cy%3D%22120%22%20r%3D%221.6%22/%3E%3Ccircle%20cx%3D%22140%22%20cy%3D%2284%22%20r%3D%221.4%22/%3E%3C/svg%3E"); background-size: 160px; opacity: .9; pointer-events: none; }
.auth-top .logo { width: min(240px, 66vw); margin: 0 auto; position: relative; z-index: 1; }
.auth-top p { margin: 16px auto 0; opacity: .78; max-width: 300px; position: relative; z-index: 1; }
.auth-card { flex: none; width: calc(100% - 28px); max-width: 420px; margin: -40px 0 30px; background: var(--bg); border-radius: 20px; padding: 6px 18px 22px;
  box-shadow: 0 10px 40px rgba(0,0,0,.14); position: relative; z-index: 1; }
.install-cta { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 4px 10px; padding: 11px 12px; margin: 8px 0 14px;
  border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
.install-cta[hidden] { display: none; }
.install-copy { display: grid; gap: 2px; min-width: 0; font-size: 13px; }
.install-copy span, .install-help { color: var(--muted); font-size: 12px; line-height: 1.4; }
.install-button { min-height: 38px; padding: 0 14px; border-radius: 20px; background: var(--teal); color: var(--on-teal); font-size: 13px; font-weight: 650; white-space: nowrap; }
.install-button:disabled { opacity: .7; }
.install-help { grid-column: 1 / -1; margin: 4px 0 0; }
.tabs { display: flex; margin: 0 -18px 18px; border-bottom: 1px solid var(--line); }
.tabs button { flex: 1; padding: 15px 0 12px; font-weight: 600; color: var(--muted); border-bottom: 3px solid transparent; }
.tabs button.on { color: var(--text); border-bottom-color: var(--teal); }
.field { display: block; margin-bottom: 14px; }
.field span { display: block; font-size: 13px; color: var(--muted); margin-bottom: 5px; }
.field input, .field select, .field textarea { width: 100%; height: 48px; border: 1px solid var(--line); border-radius: 12px; padding: 0 14px; background: var(--bg); font-size: 16px; }
.field textarea { height: 80px; padding: 10px 14px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--teal); outline-offset: -1px; border-color: transparent; }
.field.code input { font-size: 21px; letter-spacing: .14em; text-transform: uppercase; text-align: center; font-weight: 700; }
.field small { display: block; color: var(--muted); font-size: 12px; margin-top: 5px; }
.pw { position: relative; }
.pw input { padding-right: 48px; }
.pw button { position: absolute; right: 4px; top: 4px; width: 40px; height: 40px; display: grid; place-items: center; color: var(--muted); }
.pw button svg { width: 20px; height: 20px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 48px; padding: 0 22px; border-radius: 24px;
  background: var(--teal); color: var(--on-teal); font-weight: 650; font-size: 15.5px; white-space: nowrap; transition: transform .1s; }
.btn:active { transform: scale(.98); }
.btn svg { width: 20px; height: 20px; }
.btn.block { width: 100%; }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn.danger { background: transparent; color: var(--danger); border: 1px solid var(--line); }
.btn[disabled] { opacity: .6; pointer-events: none; }
.err { color: var(--danger); font-size: 13.5px; margin: -4px 0 12px; }
.err:empty { display: none; }
.fine { font-size: 12.5px; color: var(--muted); text-align: center; margin: 16px 0 0; display: flex; gap: 6px; justify-content: center; align-items: flex-start; }
.fine svg { width: 13px; height: 13px; flex: none; margin-top: 2px; }

/* ---------- profile / info / admin ---------- */
.profile-head { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 26px 16px 20px; background: var(--bg); text-align: center; }
.profile-head .pname { font-size: 22px; font-weight: 600; }
.profile-head .psub { color: var(--muted); }
.profile-head .av-wrap { position: relative; }
.card { background: var(--bg); margin-top: 10px; }
.pane-body.gray { background: var(--panel); }
.kv { padding: 12px 18px; border-bottom: 1px solid var(--line); }
.kv .k { font-size: 13px; color: var(--muted); }
.kv .v { font-size: 15.5px; margin-top: 2px; }
.safety { display: grid; grid-template-columns: repeat(4, auto); gap: 8px 16px; justify-content: center; font-variant-numeric: tabular-nums;
  font-size: 17px; letter-spacing: .04em; padding: 16px; font-family: ui-monospace, Menlo, Consolas, monospace; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; padding: 14px 16px; }
.invite { padding: 12px 16px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 10px; }
.invite:last-child { border-bottom: 0; }
.invite .code { font-family: ui-monospace, Menlo, Consolas, monospace; font-weight: 700; font-size: 16px; letter-spacing: .04em; }
.invite .info { flex: 1; min-width: 0; }
.invite .meta2 { font-size: 12.5px; color: var(--muted); }
.invite.dead { opacity: .5; }
.invite .icon-btn { color: var(--muted); }
.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--teal); margin-right: 6px; vertical-align: 1px; }
.dead .status-dot { background: var(--muted); }
.form-inline { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 10px 16px 4px; }
.form-inline .field { margin-bottom: 6px; }
.code-reveal { text-align: center; padding: 6px 8px 14px; }
.code-reveal .big { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 28px; font-weight: 800; letter-spacing: .08em; margin: 6px 0 4px; }
.code-reveal p { color: var(--muted); margin: 0 0 16px; font-size: 13.5px; }
.code-reveal .actions { justify-content: center; padding: 0; }
img.logo, img.mark { display: block; height: auto; }
.setting-control { padding: 10px 0 4px; border-top: 1px solid var(--line); }
.setting-toggle { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 48px; }
.setting-toggle > div { display: grid; gap: 3px; }
.setting-toggle strong { font-size: 14px; font-weight: 600; }
.setting-toggle span { color: var(--muted); font-size: 12.5px; }
.setting-toggle input[type="checkbox"] { appearance: none; width: 48px; height: 28px; flex: none; border-radius: 16px;
  background: var(--line); position: relative; transition: background .15s; cursor: pointer; }
.setting-toggle input[type="checkbox"]::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px;
  border-radius: 50%; background: var(--bg); box-shadow: 0 1px 3px #0003; transition: transform .15s; }
.setting-toggle input[type="checkbox"]:checked { background: var(--teal-deep); }
.setting-toggle input[type="checkbox"]:checked::after { transform: translateX(20px); }
.setting-help { margin: 6px 0 8px; line-height: 1.45; }

/* ===== merged from calendar / tasks / backups / camera / selection ===== */
/* ---------- bottom tabs ---------- */
.tabbar { flex: none; display: flex; background: var(--bg); border-top: 1px solid var(--line); padding: 4px 8px calc(4px + var(--sb)); }
.tab { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 0 4px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.tab .tab-ic { position: relative; width: 64px; height: 32px; border-radius: 16px; display: grid; place-items: center; transition: background .15s; }
.tab .tab-ic svg { width: 22px; height: 22px; }
.tab.on { color: var(--text); }
.tab.on .tab-ic { background: color-mix(in srgb, var(--teal) 26%, transparent); color: var(--text); }
.tab .badge { position: absolute; top: -4px; right: 6px; min-width: 18px; height: 18px; font-size: 11px; padding: 0 5px; }
.left.has-tabs .fab { bottom: calc(84px + var(--sb)); }

/* ---------- calendar ---------- */
.cal { background: var(--bg); padding: 6px 10px 12px; border-bottom: 1px solid var(--line); }
.cal-head { display: flex; align-items: center; gap: 2px; padding: 4px 2px 8px; }
.cal-head .icon-btn { color: var(--muted); }
.cal-title { font-size: 17px; font-weight: 650; min-width: 150px; text-align: center; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.cal-grid.wk span { text-align: center; font-size: 12px; font-weight: 600; color: var(--muted); padding: 4px 0 6px; }
.day-cell { height: 46px; border-radius: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; position: relative; }
.day-cell .num { font-size: 15px; font-weight: 500; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-variant-numeric: tabular-nums; }
.day-cell.out .num { color: var(--muted); opacity: .45; }
.day-cell.today .num { color: var(--teal-deep); font-weight: 800; box-shadow: inset 0 0 0 2px var(--teal); }
.day-cell.sel .num { background: var(--ink); color: var(--on-ink); box-shadow: none; }
.day-cell .dots { display: flex; gap: 3px; height: 5px; }
.day-cell .dots i { width: 5px; height: 5px; border-radius: 50%; }
@media (hover: hover) { .day-cell:hover { background: var(--panel); } }
.agenda { padding-bottom: 6px; }
.agenda-day { padding: 12px 18px 4px; font-size: 13px; font-weight: 600; color: var(--muted); }
.linkish { color: var(--teal-deep); font-weight: 600; font-size: 13px; }
.ev-row { display: flex; align-items: center; gap: 12px; width: calc(100% - 20px); margin: 4px 10px; padding: 10px 12px 10px 0; background: var(--bg); border-radius: 14px; text-align: left;
  box-shadow: 0 1px 0 var(--line), 0 0 0 1px var(--line); overflow: hidden; transition: transform .1s; }
.ev-row:active { transform: scale(.99); }
.ev-row.active { box-shadow: 0 0 0 2px var(--teal); }
.ev-bar { align-self: stretch; width: 5px; border-radius: 0 4px 4px 0; flex: none; }
.ev-time { width: 74px; flex: none; white-space: nowrap; font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.ev-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ev-title { font-weight: 600; font-size: 15.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev-sub { display: flex; align-items: center; gap: 4px; font-size: 13px; color: var(--muted); min-width: 0; }
.ev-sub span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev-sub svg { width: 14px; height: 14px; flex: none; }
.ev-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; }
.ev-count { display: flex; align-items: center; gap: 3px; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.ev-count svg { width: 15px; height: 15px; }
.rsvp-chip { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 10px; background: var(--panel); color: var(--muted); }
.rsvp-chip.going { background: color-mix(in srgb, var(--teal) 22%, transparent); color: var(--teal-deep); }

.ev-hero { background: var(--bg); padding: 22px 20px 18px; border-top: 6px solid var(--cat); }
.ev-cat { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .02em; padding: 3px 10px; border-radius: 10px; margin-right: 6px;
  background: color-mix(in srgb, var(--cat) 16%, transparent); color: var(--cat); }
.ev-hero h1 { font-size: 24px; line-height: 1.2; margin: 12px 0 12px; letter-spacing: -.01em; }
.ev-line { display: flex; align-items: flex-start; gap: 10px; font-size: 15px; margin: 8px 0; }
.ev-line svg { width: 19px; height: 19px; color: var(--muted); flex: none; margin-top: 1px; }
.ev-desc { white-space: pre-wrap; margin: 14px 0 0; color: var(--text); }
.ev-desc a { color: var(--teal-deep); }
.ev-by { font-size: 12.5px; color: var(--muted); margin-top: 14px; }
.rsvp { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.rsvp-btn { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 4px; border-radius: 14px; border: 1px solid var(--line); font-size: 13.5px; font-weight: 600; color: var(--muted); transition: all .15s; }
.rsvp-btn b { font-size: 19px; color: var(--text); font-variant-numeric: tabular-nums; }
.rsvp-btn.on.going { background: var(--teal); border-color: var(--teal); color: var(--on-teal); }
.rsvp-btn.on.going b { color: var(--on-teal); }
.rsvp-btn.on.maybe { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.rsvp-btn.on.maybe b { color: var(--on-ink); }
.rsvp-btn.on.no { border-color: var(--danger); color: var(--danger); }
.form-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.toggle { display: flex; align-items: center; gap: 10px; margin: -2px 0 14px; font-size: 15px; }
.toggle input { width: 20px; height: 20px; accent-color: var(--teal-deep); }
.cat-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }

.ev-card { display: flex; flex-direction: column; gap: 3px; text-align: left; width: 100%; min-width: 230px; padding: 10px 12px 12px; border-radius: 9px;
  background: var(--quote-bg); border-left: 4px solid var(--cat); }
.ev-card-top { display: flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: var(--cat); }
.ev-card-top svg { width: 14px; height: 14px; }
.ev-card-title { font-weight: 650; font-size: 15.5px; }
.ev-card-line { font-size: 13px; color: var(--muted); }
.ev-card-cta { margin-top: 6px; font-size: 13px; font-weight: 700; color: var(--teal-deep); }
.ev-card.gone { opacity: .6; }

/* ---------- calendar type switches (colour only) ---------- */
.type-switches { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 4px;
  padding: 8px 14px; background: var(--bg); border-bottom: 1px solid var(--line); }
.tsw { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; flex: none; transition: transform .12s; }
.tsw:active { transform: scale(.9); }
.tsw i { width: 24px; height: 24px; border-radius: 50%; background: var(--c); display: grid; place-items: center; color: #fff;
  transition: box-shadow .15s, opacity .15s, transform .15s; }
.tsw i svg { width: 15px; height: 15px; }
.tsw.on i { box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--c); transform: scale(1.04); }
.type-switches.filtering .tsw:not(.on):not(.all) i { opacity: .32; transform: scale(.82); }
.tsw.all i { box-shadow: inset 0 0 0 5px var(--bg); }
.tsw.all.on i { box-shadow: inset 0 0 0 5px var(--bg), 0 0 0 3px var(--bg), 0 0 0 5px var(--text); }
.type-switches.filtering .tsw.all i { opacity: .45; }
.tsw-sep { width: 1px; height: 22px; background: var(--line); flex: none; }
@media (hover: hover) { .tsw:hover i { transform: scale(1.1); } }
.cal { padding-top: 2px; }

/* ---------- tasks ---------- */
.av.xs { width: 24px; height: 24px; font-size: 10px; }
.av.xs .dot { display: none; }
.chip .n.warn { background: var(--danger); color: #fff; }
.tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tbl { width: 100%; border-collapse: collapse; table-layout: fixed; min-width: 320px; font-size: 14px; }
.tbl thead th { position: sticky; top: 0; z-index: 1; background: var(--panel); text-align: left; font-weight: 600; font-size: 12px;
  color: var(--muted); padding: 0; border-bottom: 1px solid var(--line); }
.tbl thead th button { display: flex; align-items: center; gap: 1px; width: 100%; padding: 9px 6px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.tbl thead th .sort { opacity: .3; display: grid; }
.tbl thead th .sort svg { width: 14px; height: 14px; }
.tbl thead th .sort.asc, .tbl thead th .sort.desc { opacity: 1; color: var(--teal-deep); }
.tbl .c-task { width: 34%; padding-left: 12px; }
.tbl thead .c-task button { padding-left: 12px; }
.tbl .c-who { width: 25%; }
.tbl .c-due { width: 18%; }
.tbl .c-st { width: 23%; padding-right: 8px; }
.tbl tbody tr { border-bottom: 1px solid var(--line); cursor: pointer; transition: background .12s; }
.tbl tbody tr:active, .tbl tbody tr.active { background: var(--panel); }
@media (hover: hover) { .tbl tbody tr:hover { background: var(--panel); } }
.tbl tbody tr.active { box-shadow: inset 3px 0 0 var(--teal); }
.tbl td { padding: 11px 6px; vertical-align: middle; }
.tbl td.c-task { padding-left: 12px; }
.tbl .tt { font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.3; }
.tbl tr.is-mine .tt::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--teal); margin-right: 6px; vertical-align: 2px; }
.tbl tr.is-done .tt { color: var(--muted); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--muted) 60%, transparent); }
.tbl .who { display: flex; align-items: center; gap: 6px; min-width: 0; }
.tbl .who span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13.5px; }
.tbl .c-due { font-size: 12.5px; line-height: 1.25; font-variant-numeric: tabular-nums; color: var(--muted); }
.overdue { color: var(--danger) !important; font-weight: 700; }
.muted { color: var(--muted); font-size: 13px; }

.st { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 8px; border-radius: 13px; font-size: 12px; font-weight: 700; white-space: nowrap;
  background: color-mix(in srgb, var(--sc) 16%, transparent); color: var(--sc); max-width: 100%; }
.st i, .st-step i { width: 7px; height: 7px; border-radius: 50%; background: var(--sc); flex: none; }
.st-todo { --sc: #66716F; } .st-doing { --sc: #2E86C1; } .st-blocked { --sc: #D2463F; } .st-done { --sc: #0A8F80; }
:root[data-theme="dark"] .st-todo { --sc: #9AA6A4; } :root[data-theme="dark"] .st-done { --sc: #13D1BC; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .st-todo { --sc: #9AA6A4; } :root:not([data-theme="light"]) .st-done { --sc: #13D1BC; } }
button.st:active { transform: scale(.95); }

.task-hero { background: var(--bg); padding: 20px 20px 16px; }
.task-hero h1 { font-size: 23px; line-height: 1.25; margin: 12px 0 6px; letter-spacing: -.01em; }
.task-meta { display: grid; gap: 12px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.task-meta > div { display: grid; grid-template-columns: 110px 1fr; align-items: center; gap: 10px; }
.task-meta .k { font-size: 13px; color: var(--muted); }
.task-meta .v { font-size: 15px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.od-tag { font-size: 11px; background: var(--danger); color: #fff; padding: 2px 8px; border-radius: 10px; }
.st-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.st-step { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 2px; border-radius: 12px; border: 1px solid var(--line);
  font-size: 12.5px; font-weight: 600; color: var(--muted); }
.st-step i { width: 10px; height: 10px; }
.st-step.on { border-color: var(--sc); background: color-mix(in srgb, var(--sc) 14%, transparent); color: var(--text); }
.st-step[disabled] { opacity: .55; cursor: not-allowed; }
.tabbar .tab .tab-ic { width: 56px; max-width: 100%; }
.tabbar .tab { min-width: 0; }
.tabbar .tab > span:last-child { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11.5px; }

.chips.fit { overflow: visible; justify-content: space-between; gap: 4px; padding: 8px 10px 10px; }
.chips.fit .chip { padding: 0 9px; font-size: 13px; gap: 5px; }
.chips.fit .chip .n { padding: 0 5px; }
.tbl .c-due .d1, .tbl .c-due .d2 { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tbl .c-due .d2 { font-size: 11.5px; opacity: .8; }

/* ---------- repeating events ---------- */
.ev-title .rep { display: inline-grid; vertical-align: -2px; margin-right: 4px; color: var(--muted); }
.ev-title .rep svg { width: 15px; height: 15px; }
.agenda-note { display: flex; gap: 8px; align-items: flex-start; margin: 10px 14px 0; padding: 10px 12px; border-radius: 12px; background: var(--panel); color: var(--muted); font-size: 12.5px; }
.agenda-note svg { width: 15px; height: 15px; flex: none; margin-top: 1px; }
.next-dates { display: flex; flex-wrap: wrap; gap: 8px; }
.form-2 + .field, .toggle + .field { margin-top: 0; }

/* ---------- wallpapers (chat + empty screens) ---------- */
/* The picture is softened with a see-through layer in the theme colour so
   bubbles and text stay easy to read. Tune with --wall-veil. */
:root { --wall-photo: url("/img/wall-light.webp"); --wall-veil: rgba(246, 245, 241, .72); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --wall-photo: url("/img/wall-dark.webp"); --wall-veil: rgba(11, 15, 16, .4); } }
:root[data-theme="dark"] { --wall-photo: url("/img/wall-dark.webp"); --wall-veil: rgba(11, 15, 16, .4); }
.pane.has-wall { background-color: var(--wall); background-image: linear-gradient(var(--wall-veil), var(--wall-veil)), var(--wall-photo);
  background-size: cover; background-position: center; }
.pane.has-wall .wall, .pane.has-wall .composer, .pane.has-wall .wall-empty { background: transparent; }
.pane.has-wall .wall-empty .logo { filter: drop-shadow(0 1px 8px var(--wall-veil)); }
.pane.has-wall .wall-empty p, .pane.has-wall .wall-empty .lock-note { color: var(--text); text-shadow: 0 0 10px var(--wall), 0 0 2px var(--wall); }
/* sign-in screen uses the dark artwork under the logo, and the light one behind the card */
.auth { background-color: var(--panel); background-image: linear-gradient(var(--wall-veil), var(--wall-veil)), var(--wall-photo); background-size: cover; background-position: center; }
.auth-top { background-color: #12181a; background-image: linear-gradient(rgba(16, 22, 24, .45), rgba(16, 22, 24, .65)), url("/img/wall-dark.webp"); background-size: cover; background-position: center; }
.auth-top::after { display: none; }

/* ---------- forward / edit ---------- */
.fwd { display: flex; align-items: center; gap: 4px; font-size: 12.5px; font-style: italic; color: var(--muted); margin: 0 0 3px; }
.fwd svg { width: 14px; height: 14px; }
.bubble.media .fwd { margin: 3px 6px 4px; }
.meta .edited { font-style: italic; margin-right: 3px; }
.fw-sheet { max-height: 86dvh; display: flex; flex-direction: column; }
.fw-list { overflow-y: auto; flex: 1; min-height: 120px; margin: 0 -12px; }
.fw-foot { display: flex; align-items: center; gap: 12px; padding-top: 10px; border-top: 1px solid var(--line); margin-top: 6px; }
.fw-count { flex: 1; color: var(--muted); font-size: 14px; padding-left: 6px; }
.send[disabled] { opacity: .45; pointer-events: none; }
.edit-bar .qname svg { width: 14px; height: 14px; }

/* ---------- settings rows, switches, tones, backup ---------- */
.set-card { padding: 4px 0; }
.set-card.dim { opacity: .5; }
.set-row { display: flex; align-items: center; gap: 14px; width: 100%; padding: 12px 16px; text-align: left; cursor: pointer; }
button.set-row:active { background: var(--panel); }
.set-row > svg { width: 20px; height: 20px; color: var(--muted); flex: none; }
.set-ic { width: 38px; height: 38px; border-radius: 12px; background: var(--panel); color: var(--teal-deep); display: grid; place-items: center; flex: none; }
.set-ic svg { width: 21px; height: 21px; }
.set-ic.big { width: 48px; height: 48px; border-radius: 14px; background: color-mix(in srgb, var(--teal) 18%, transparent); }
.set-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.set-title { font-size: 15.5px; font-weight: 500; }
.set-sub { font-size: 13px; color: var(--muted); line-height: 1.35; }
.set-head { padding: 12px 16px 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
.switch { position: relative; width: 46px; height: 28px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch i { position: absolute; inset: 0; border-radius: 14px; background: var(--line); transition: background .15s; }
.switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .15s; }
.switch input:checked + i { background: var(--teal-deep); }
.switch input:checked + i::after { transform: translateX(18px); }
.switch input:focus-visible + i { outline: 2px solid var(--teal); outline-offset: 2px; }
.tones { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 2px 16px 8px; }
.tone { display: flex; align-items: center; gap: 8px; padding: 11px 12px; border-radius: 12px; border: 1px solid var(--line); font-weight: 500; text-align: left; }
.tone i { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--muted); flex: none; }
.tone svg { width: 16px; height: 16px; margin-left: auto; color: var(--muted); }
.tone.on { border-color: var(--teal-deep); background: color-mix(in srgb, var(--teal) 12%, transparent); }
.tone.on i { border: 5px solid var(--teal-deep); }
.vol { display: flex; align-items: center; gap: 12px; padding: 4px 16px 14px; color: var(--muted); }
.vol svg { width: 20px; height: 20px; }
.vol input { flex: 1; accent-color: var(--teal-deep); }
.muted-ic { display: grid; color: var(--muted); }
.muted-ic svg { width: 15px; height: 15px; }
.badge.quiet { background: var(--muted); color: var(--bg); }
.bk-status { display: flex; gap: 14px; align-items: center; margin-top: 0; }
.bk-step { font-size: 14px; margin: 0 8px 10px; }
.bk-bar { height: 8px; border-radius: 4px; background: var(--panel); margin: 0 8px; overflow: hidden; }
.bk-bar i { display: block; height: 100%; width: 0; background: var(--teal-deep); transition: width .25s; }
.bk-viewer { position: fixed; inset: 0; z-index: 50; }
.bk-wall { background-color: var(--wall); background-image: linear-gradient(var(--wall-veil), var(--wall-veil)), var(--wall-photo); background-size: cover; background-position: center; padding: 6px 4%; }
.bk-img { display: block; max-width: min(64vw, 300px); max-height: 320px; border-radius: 8px; }

/* =====================================================================
   Design system v2 — "quiet craft"
   One bold thing: titles set in Cormorant Garamond, echoing the VERITA
   wordmark. Everything else is calm: Hanken Grotesk for the interface,
   inset grouped cards, one radius scale, motion only when you act.
   ===================================================================== */
@font-face { font-family: "Hanken Grotesk"; src: url("/fonts/hanken-grotesk.woff2") format("woff2"); font-weight: 400 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Cormorant Garamond"; src: url("/fonts/cormorant-600.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
:root {
  --font: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Noto Naskh Arabic", "Noto Nastaliq Urdu", Arial, sans-serif;
  --display: "Cormorant Garamond", "Cormorant", Georgia, "Times New Roman", serif;
  --r-sm: 10px; --r-md: 14px; --r-lg: 18px; --r-xl: 24px;
  --ease: cubic-bezier(.2, .8, .2, 1);
}
body { font-size: 15px; }

/* type roles */
.screen-title { font-family: var(--display); font-weight: 600; font-size: 29px; line-height: 1; letter-spacing: .005em; margin: 2px 0 0 12px; flex: 1; color: var(--on-ink); }
.bar h2 { font-size: 17px; font-weight: 600; letter-spacing: -.01em; }
.ev-hero h1, .task-hero h1 { font-family: var(--display); font-weight: 600; font-size: 31px; line-height: 1.08; letter-spacing: .002em; margin: 14px 0 12px; }
.profile-head .pname { font-family: var(--display); font-weight: 600; font-size: 30px; line-height: 1.05; letter-spacing: .005em; }
.empty h3 { font-family: var(--display); font-weight: 600; font-size: 26px; line-height: 1.1; margin: 12px 0 8px; }
.cal-title { font-family: var(--display); font-weight: 600; font-size: 25px; letter-spacing: .01em; }
.code-reveal .big { letter-spacing: .06em; }
.auth-top p { font-size: 15px; line-height: 1.5; }
.section-label { color: var(--muted); font-size: 13px; font-weight: 600; letter-spacing: 0; padding: 20px 20px 8px; }

/* app bar */
.bar { min-height: calc(60px + var(--st)); box-shadow: 0 1px 0 rgba(255,255,255,.04), 0 6px 18px -12px rgba(0,0,0,.45); }
.brand svg { height: 36px; }

/* inset grouped surfaces on grey screens */
.pane-body.gray { padding-bottom: 28px; }
.pane-body.gray .card { margin: 12px 12px 0; border-radius: var(--r-lg); overflow: hidden; box-shadow: 0 1px 2px rgba(16, 24, 24, .05); }
.pane-body.gray .card.pad { padding: 16px 18px; }
.pane-body.gray > .section-label + .card, .pane-body.gray div > .section-label + .card { margin-top: 0; }
.pane-body.gray > .ev-hero, .pane-body.gray > .task-hero { margin: 12px 12px 0; border-radius: var(--r-xl); box-shadow: 0 1px 2px rgba(16, 24, 24, .05); }
.ev-hero { border-top: 0; position: relative; overflow: hidden; padding: 22px 22px 20px; }
.ev-hero::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 5px; background: var(--cat); }
.task-hero { padding: 22px 22px 20px; }
.pane-body.gray .profile-head { background: transparent; padding: 28px 16px 10px; }
.pane-body.gray .kv:last-child { border-bottom: 0; }
.pane-body.gray .actions.card { justify-content: flex-start; }
:root[data-theme="dark"] .pane-body.gray .card, :root[data-theme="dark"] .pane-body.gray > .ev-hero, :root[data-theme="dark"] .pane-body.gray > .task-hero { box-shadow: none; }

/* lists */
#chatlist-body .row { padding: 0 14px; min-height: 76px; }
#chatlist-body .row .mid { border-bottom: 1px solid var(--line); padding: 14px 0; align-self: stretch; }
#chatlist-body .row:last-of-type .mid { border-bottom: 0; }
.row .title { font-weight: 600; letter-spacing: -.01em; }
.row.unread .preview { color: var(--text); font-weight: 500; }
.row .preview { font-size: 14px; }
.left.has-tabs .pane-body { padding-bottom: 104px; }

/* floating action button — extended with a label where an admin creates things */
.fab { border-radius: var(--r-lg); transition: transform .12s, box-shadow .15s; }
.fab.ext { width: auto; padding: 0 20px 0 16px; display: flex; gap: 8px; font-weight: 600; font-size: 15px; }
.fab.ext svg { width: 22px; height: 22px; }

/* tabs */
.tabbar { padding-top: 6px; box-shadow: 0 -1px 0 var(--line); border-top: 0; }
.tab { font-weight: 600; letter-spacing: -.005em; }
.tab.on { color: var(--text); }

/* chat */
.bubble { border-radius: var(--r-md); }
.msg.first.in .bubble { border-top-left-radius: 4px; }
.msg.first.out .bubble { border-top-right-radius: 4px; }
.bubble .text { font-size: 15.5px; line-height: 1.42; }
.meta { font-size: 11px; font-variant-numeric: tabular-nums; }
.day span, .sys span { font-weight: 500; border-radius: 10px; }
.e2e-banner { border-radius: var(--r-md); line-height: 1.45; }
.chat-head .name { letter-spacing: -.01em; }
.inputbox { border-radius: 26px; }
.composer { padding-top: 8px; }

/* skeleton while a chat loads */
.sk { display: flex; flex-direction: column; gap: 10px; padding: 18px 4%; }
.sk i { display: block; height: 38px; border-radius: var(--r-md); background: color-mix(in srgb, var(--bg) 70%, transparent);
  animation: skPulse 1.2s ease-in-out infinite; }
.sk i:nth-child(odd) { width: 58%; } .sk i:nth-child(even) { width: 44%; align-self: flex-end; }
.sk i:nth-child(3) { width: 68%; height: 54px; }
@keyframes skPulse { 50% { opacity: .45; } }

/* event detail: RSVP as one segmented control, actions as rows */
.rsvp { gap: 0; border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.rsvp-btn { border: 0; border-radius: 0; padding: 12px 4px; }
.rsvp-btn + .rsvp-btn { border-left: 1px solid var(--line); }
.st-steps { gap: 0; border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.st-step { border: 0; border-radius: 0; padding: 12px 2px; }
.st-step + .st-step { border-left: 1px solid var(--line); }
.st-step.on { border-color: transparent; box-shadow: inset 0 -3px 0 var(--sc); }
a.set-row { color: inherit; text-decoration: none; }

/* forms */
.field input, .field select, .field textarea { border-radius: 12px; }
.btn { border-radius: 14px; font-weight: 600; letter-spacing: -.005em; }
.chip { border-radius: 12px; }
.sheet { border-radius: var(--r-xl) var(--r-xl) 0 0; }

/* motion that answers an action: screens slide in when you open them on a phone */
@media (max-width: 899px) {
  #app[data-pane="right"] .right { animation: paneIn .24s var(--ease); }
  #app[data-pane="left"] .left { animation: paneBack .2s var(--ease); }
}
@keyframes paneIn { from { transform: translateX(28px); opacity: .4; } }
@keyframes paneBack { from { transform: translateX(-14px); opacity: .6; } }
@media (prefers-reduced-motion: reduce) { #app .right, #app .left { animation: none !important; } }
/* on big screens tile the artwork at phone scale instead of blowing it up */
@media (min-width: 900px) { .pane.has-wall, .bk-wall { background-size: auto, 620px auto; background-repeat: repeat; background-position: 0 0; } }

/* ---------- in-app camera ---------- */
.cam { position: fixed; inset: 0; z-index: 50; background: #000; color: #fff; display: flex; flex-direction: column; animation: fade .15s; }
.cam-feed { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cam-feed.mirror { transform: scaleX(-1); }
.cam.flash::after { content: ""; position: absolute; inset: 0; background: #fff; animation: camFlash .25s ease-out forwards; pointer-events: none; }
@keyframes camFlash { from { opacity: .85; } to { opacity: 0; } }
.cam-top { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; padding: calc(10px + var(--st)) 14px 10px;
  background: linear-gradient(rgba(0,0,0,.45), transparent); }
.cam-time { font-variant-numeric: tabular-nums; font-weight: 600; background: var(--danger); padding: 4px 12px; border-radius: 12px; }
.cam-to { font-size: 14px; font-weight: 600; background: rgba(0,0,0,.4); padding: 6px 12px; border-radius: 14px; max-width: 55%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cam-bottom { position: relative; z-index: 1; margin-top: auto; padding: 18px 0 calc(18px + var(--sb)); background: linear-gradient(transparent, rgba(0,0,0,.65) 35%); }
.cam-row { display: flex; align-items: center; justify-content: space-evenly; }
.cam-round { width: 54px; height: 54px; border-radius: 50%; background: rgba(255,255,255,.16); color: #fff; display: grid; place-items: center; backdrop-filter: blur(6px); }
.cam-round svg { width: 26px; height: 26px; }
.cam-shutter { width: 82px; height: 82px; border-radius: 50%; border: 5px solid #fff; display: grid; place-items: center; }
.cam-shutter i { width: 62px; height: 62px; border-radius: 50%; background: #fff; transition: all .18s var(--ease); }
.cam-shutter:active i { transform: scale(.92); }
.cam-shutter.video i { background: var(--danger); }
.cam-shutter.rec i { width: 30px; height: 30px; border-radius: 8px; }
.cam-modes { display: flex; justify-content: center; gap: 6px; margin-top: 16px; }
.cam-mode { padding: 8px 18px; border-radius: 18px; font-weight: 600; font-size: 15px; color: rgba(255,255,255,.8); }
.cam-mode.on { background: rgba(255,255,255,.18); color: #fff; }

/* ---------- selecting chats, pins, archive ---------- */
.sel-bar { background: var(--ink-2); }
.sel-bar .sel-count { font-family: var(--font); font-size: 20px; font-weight: 600; margin-left: 6px; }
.av-host { position: relative; flex: none; display: block; }
.sel-tick { position: absolute; right: -2px; bottom: -2px; width: 22px; height: 22px; border-radius: 50%; background: var(--teal); color: var(--on-teal);
  display: grid; place-items: center; border: 2.5px solid var(--bg); animation: tickIn .16s var(--ease); }
.sel-tick svg { width: 14px; height: 14px; }
@keyframes tickIn { from { transform: scale(.4); opacity: 0; } }
#chatlist-body .row.sel { background: color-mix(in srgb, var(--teal) 14%, var(--bg)); }
.left.selecting .fab { transform: scale(0); pointer-events: none; }
.badge.dot { min-width: 12px; width: 12px; height: 12px; padding: 0; }
.row .sub .muted-ic { margin-left: 2px; }
.arch-row .arch-ic { background: var(--panel); color: var(--teal-deep); }
.arch-row .arch-ic svg { width: 24px; height: 24px; }
.arch-row .title { font-weight: 600; }
#chatlist-body .arch-row { min-height: 60px; }
#chatlist-body .arch-row .mid { padding: 10px 0; }

/* Logo and header icons share one row; the wordmark sits low in its image, so lift it to the icons' centre line. */
.bar .brand { align-self: center; }
.bar .brand .logo { transform: translateY(-6px); }

/* Polls */
.poll-list { display: flex; flex-direction: column; }
.poll-row { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; background: none; color: inherit; width: 100%; }
.poll-row.active { background: color-mix(in srgb, var(--teal) 14%, transparent); }
.poll-q { font-weight: 600; overflow-wrap: anywhere; }
.poll-sub { display: flex; gap: 10px; align-items: center; font-size: 13px; flex-wrap: wrap; }
.poll-sub.muted { color: var(--muted); }
.poll-opts { display: flex; flex-direction: column; gap: 8px; }
.poll-opt { position: relative; overflow: hidden; display: flex; justify-content: space-between; gap: 12px; align-items: center; text-align: left; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-md, 10px); background: var(--bg); color: inherit; }
.poll-opt .bar-fill { position: absolute; inset: 0 auto 0 0; background: color-mix(in srgb, var(--teal) 22%, transparent); transition: width .25s; }
.poll-opt.on { border-color: var(--teal); }
.poll-opt.lead .poll-opt-l { font-weight: 700; }
.poll-opt > span:not(.bar-fill) { position: relative; }
.poll-opt-l { display: flex; gap: 6px; align-items: center; overflow-wrap: anywhere; }
.poll-opt-l svg { width: 18px; height: 18px; flex: none; }
.poll-opt-n { flex: none; font-variant-numeric: tabular-nums; color: var(--muted); font-size: 13px; }
.poll-opt:disabled { opacity: 1; cursor: default; }
