/* Ditto — one look, two modes. Dark is the default; light follows the phone or the sun/moon switch. */
@font-face { font-family: 'Rubik'; font-style: normal; font-weight: 300 900; font-display: swap; src: url(/static/rubik-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --font: 'Rubik', ui-rounded, 'SF Pro Rounded', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --bg: #12101f; --surface: #1e1a33; --surface2: #2a2448; --line: rgba(255,255,255,.09); --ink: #f5f2ff; --muted: #aca6cc;
  --accent: #ffd34d; --accent-ink: #1a1400; --edge: #b8931c;
  --me: #ffd34d; --me-ink: #1a1400; --them: #2a2448; --them-ink: #f5f2ff; --them-line: transparent;
  --avatar: #ffd34d; --avatar-ink: #1a1400; --input: #12101f;
  --unlit: rgba(255,255,255,.10); --picked: #ffffff; --picked-ink: #1a1400; --bar-l: 60%; --bar-s: 85%; --bar-glow: 0 0 14px hsl(var(--hue) 90% 60% / .6);
  --door: #ff8a4c; --door-frame: #f3c969; --door-ink: #1a1400; --door-open: #ffd34d;
  --knob-face: #2a2536; --knob-cap: #3a3448; --knob-skirt: #0e0c14; --knob-ridge: rgba(255,255,255,.18); --knob-led-off: rgba(255,255,255,.14);
  --shadow: 0 0 0 1px rgba(255,255,255,.06), 0 14px 36px rgba(0,0,0,.45); --shadow-sm: 0 6px 16px rgba(0,0,0,.3);
  --danger: #ff8a8a; --ok: #7ee2a0; --cue: #ffd34d;
  --bubble-glow: 0 0 0 1px rgba(255,255,255,.04);
  --radius: 22px; --ctl: 14px; --pill: 999px;
  font-family: var(--font);
  color-scheme: dark;
}
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) {
  --bg: #f6efe4; --surface: #fffdf8; --surface2: #f1e8d8; --line: #e4d9c7; --ink: #1f1a17; --muted: #6b6259;
  --accent: #ffcd3c; --accent-ink: #1a1400; --edge: #b8931c;
  --me: #ffcd3c; --me-ink: #1a1400; --them: #fffdf8; --them-ink: #1f1a17; --them-line: #e4d9c7;
  --avatar: #1f1a17; --avatar-ink: #ffcd3c; --input: #f6efe4;
  --unlit: #e9dfcd; --picked: #1f1a17; --picked-ink: #ffffff; --bar-l: 50%; --bar-s: 78%; --bar-glow: none;
  --door: #ffd9a1; --door-frame: #1f1a17; --door-ink: #1f1a17; --door-open: #ffcd3c;
  --knob-face: #efe5d3; --knob-cap: #f8f1e4; --knob-skirt: #d9cdb8; --knob-ridge: rgba(31,26,23,.18); --knob-led-off: #ddd2bf;
  --shadow: 0 12px 30px rgba(90,60,30,.16); --shadow-sm: 0 4px 12px rgba(90,60,30,.10);
  --danger: #c0392b; --ok: #2f8f4e; --cue: #8a5a00;
  --bubble-glow: none;
  color-scheme: light;
} }
:root[data-theme="light"] {
  --bg: #f6efe4; --surface: #fffdf8; --surface2: #f1e8d8; --line: #e4d9c7; --ink: #1f1a17; --muted: #6b6259;
  --accent: #ffcd3c; --accent-ink: #1a1400; --edge: #b8931c;
  --me: #ffcd3c; --me-ink: #1a1400; --them: #fffdf8; --them-ink: #1f1a17; --them-line: #e4d9c7;
  --avatar: #1f1a17; --avatar-ink: #ffcd3c; --input: #f6efe4;
  --unlit: #e9dfcd; --picked: #1f1a17; --picked-ink: #ffffff; --bar-l: 50%; --bar-s: 78%; --bar-glow: none;
  --door: #ffd9a1; --door-frame: #1f1a17; --door-ink: #1f1a17; --door-open: #ffcd3c;
  --knob-face: #efe5d3; --knob-cap: #f8f1e4; --knob-skirt: #d9cdb8; --knob-ridge: rgba(31,26,23,.18); --knob-led-off: #ddd2bf;
  --shadow: 0 12px 30px rgba(90,60,30,.16); --shadow-sm: 0 4px 12px rgba(90,60,30,.10);
  --danger: #c0392b; --ok: #2f8f4e; --cue: #8a5a00;
  --bubble-glow: none;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
html { background: var(--bg); }
body { min-height: 100dvh; color: var(--ink); background: var(--bg); font-family: var(--font); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
main { max-width: 440px; margin: 0 auto; padding: 16px 16px 40px; }
h1 { font-size: 26px; line-height: 1.1; letter-spacing: -.01em; margin: 10px 0 14px; font-weight: 800; }
h2 { font-size: 18px; margin: 0 0 8px; font-weight: 800; }
p { line-height: 1.45; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.tiny { font-size: 12.5px; }
.center { text-align: center; }
.hidden { display: none !important; }
.mt { margin-top: 16px; }
.stack > * + * { margin-top: 12px; }
.row { display: flex; gap: 10px; align-items: center; }
.row > * { flex: 1; min-width: 0; }
.row > .shrink { flex: 0 0 auto; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
svg.ic { display: block; flex-shrink: 0; }

/* ---------- controls ---------- */
button, .btn { font: inherit; font-weight: 800; border: 0; cursor: pointer; border-radius: var(--pill); padding: 13px 18px; font-size: 16px; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; touch-action: manipulation; color: var(--ink); background: transparent; }
.primary, .ghost, .chip, .link, .small-btn { white-space: nowrap; }
.primary { background: var(--accent); color: var(--accent-ink); width: 100%; box-shadow: 0 4px 0 var(--edge); }
.primary:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--edge); }
.primary:disabled, .primary.waiting { background: var(--unlit); color: var(--muted); box-shadow: none; transform: none; }
.ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--line); }
.link { background: none; color: var(--muted); padding: 6px 4px; font-weight: 700; font-size: 15px; text-decoration: underline; text-underline-offset: 3px; }
.small-btn { padding: 9px 14px; font-size: 15px; }
.icon-btn { width: 44px; height: 44px; padding: 0; border-radius: 12px; background: transparent; color: var(--ink); }
.icon-btn:active { background: var(--surface2); }
input[type=text], textarea { width: 100%; font: inherit; font-weight: 500; color: var(--ink); background: var(--input); border: 1.5px solid var(--line); border-radius: var(--ctl); padding: 11px 13px; outline: none; }
input[type=text]:focus, textarea:focus { border-color: var(--accent); }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: .8; }
.error { color: var(--danger); font-weight: 700; min-height: 1.2em; margin: 6px 0 0; font-size: 14px; }
.spinner { width: 18px; height: 18px; border: 3px solid rgba(0,0,0,.2); border-top-color: currentColor; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.toast { position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: var(--pill); font-weight: 800; font-size: 14px; z-index: 50; box-shadow: var(--shadow-sm); }
.copybox { display: flex; gap: 8px; align-items: center; background: var(--surface2); border-radius: var(--ctl); padding: 8px 8px 8px 12px; }
.copybox code { flex: 1; min-width: 0; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.copybox .ghost { padding: 8px 12px; font-size: 14px; flex: 0 0 auto; }
.card { background: var(--surface); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow-sm); }
.card.note { border-left: 4px solid var(--accent); }
.toggle { display: flex; align-items: center; gap: 10px; font-size: 14.5px; font-weight: 700; margin-top: 10px; }
.toggle input { width: 20px; height: 20px; accent-color: var(--accent); }
.chip { padding: 9px 14px; border-radius: var(--pill); border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); font-size: 14px; font-weight: 700; }
.chip[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* ---------- the card ---------- */
.msg { position: relative; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.sender { display: flex; align-items: center; gap: 10px; min-width: 0; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--avatar); color: var(--avatar-ink); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 16px; flex-shrink: 0; }
.avatar.lg { width: 46px; height: 46px; font-size: 20px; }
.avatar.sm { width: 26px; height: 26px; font-size: 12px; }
.msg-from { font-size: 16px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.when { font-size: 13px; color: var(--muted); font-weight: 500; }
.sound-toggle { margin-left: auto; width: 36px; height: 36px; padding: 0; border-radius: 50%; color: var(--muted); background: transparent; }
.sound-toggle.off { opacity: .6; }
.msg-q { font-size: 27px; font-weight: 800; line-height: 1.15; letter-spacing: -.01em; margin: 0; overflow-wrap: anywhere; }
.msg.compact .msg-q { font-size: 20px; }
.msg-reveal { display: flex; flex-direction: column; gap: 8px; animation: rise .3s ease-out; }
.msg-reveal .plan { font-size: 17px; font-weight: 700; line-height: 1.3; margin: 0; overflow-wrap: anywhere; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.answer-row { display: flex; gap: 8px; align-items: center; }
.answer-row input { flex: 1; min-width: 0; height: 46px; padding: 0 14px; }
.answer-row .primary { width: auto; flex: 0 0 auto; height: 46px; padding: 0 18px; }
.seen-by { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.private-note { font-size: 12.5px; color: var(--muted); font-weight: 500; text-align: center; line-height: 1.4; }
.yours { font-weight: 800; font-size: 16px; }
.hint-line { font-size: 12.5px; color: var(--muted); text-align: center; font-weight: 600; }
.asker-line { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 10px; background: color-mix(in srgb, var(--accent) 16%, transparent); font-size: 13px; font-weight: 700; }
.asker-line .link { padding: 0; font-size: 12.5px; }
.ends { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; font-weight: 700; color: var(--muted); }
.ends span:last-child { text-align: right; }

/* answers under a card */
.activity { list-style: none; margin: 6px 0 0; padding: 0 4px; }
.activity li { display: flex; gap: 8px; align-items: baseline; font-size: 14.5px; padding: 5px 0; overflow-wrap: anywhere; }
.activity .who { font-weight: 800; flex-shrink: 0; }
.activity .what { color: var(--muted); font-weight: 500; }
.reply-btn { margin-left: auto; padding: 2px 8px; font-size: 12.5px; font-weight: 800; color: var(--cue); background: none; }
.activity .track { position: relative; height: 30px; margin: 2px 0 8px; border-radius: 999px; background: var(--unlit); }
.activity .dot { position: absolute; top: 3px; width: 24px; height: 24px; margin-left: -12px; border-radius: 50%; background: var(--surface2); border: 2px solid var(--accent); font-size: 10px; font-weight: 900; display: flex; align-items: center; justify-content: center; }
.activity .dot.you { background: var(--accent); color: var(--accent-ink); }

/* ---------- mystery doors ---------- */
.mdoors { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; perspective: 700px; }
.mdoor { position: relative; aspect-ratio: 4 / 5; padding: 0; background: none; border-radius: 12px; }
.mdoor .inner { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform .55s cubic-bezier(.2,.8,.2,1.15); }
.mdoor.flipped .inner { transform: rotateY(180deg); }
.mdoor .face, .mdoor .back { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 12px 12px 6px 6px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 8px 6px; text-align: center; }
.mdoor .face { background: var(--door); color: var(--door-ink); border: 3px solid var(--door-frame); }
.mdoor .face::after { content: ""; position: absolute; right: 8px; bottom: 12px; width: 7px; height: 7px; border-radius: 50%; background: var(--door-frame); }
.mdoor .back { background: var(--door-open); color: #2b1d00; transform: rotateY(180deg); border: 3px solid var(--door-frame); }
.mdoor .num { font-size: 22px; font-weight: 900; line-height: 1; }
.mdoor .lbl { width: 100%; min-width: 0; font-size: 12.5px; font-weight: 700; line-height: 1.2; overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; overflow: hidden; }
.mdoor.chosen { outline: 3px solid var(--accent); outline-offset: 2px; }
.mdoor.hint .face { animation: nudge 3s ease-in-out infinite; }
.mdoor.hint:nth-child(2) .face { animation-delay: .3s; } .mdoor.hint:nth-child(3) .face { animation-delay: .6s; }
@keyframes nudge { 0%, 90%, 100% { transform: none; } 93% { transform: rotate(-1.5deg); } 96% { transform: rotate(1.5deg); } }
@media (prefers-reduced-motion: reduce) { .mdoor .inner { transition: none; } .mdoor.hint .face { animation: none; } }
.mdoor.static { cursor: default; }
.mdoor:disabled { opacity: 1; }

/* ---------- knob ---------- */
.mslider { display: flex; flex-direction: column; gap: 8px; align-items: stretch; }
.knob { position: relative; width: 190px; margin: 0 auto; touch-action: none; user-select: none; -webkit-user-select: none; cursor: grab; outline: none; }
.knob:active { cursor: grabbing; }
.knob:focus-visible { box-shadow: 0 0 0 3px var(--accent); border-radius: 50%; }
.knob.static { cursor: default; }
.knob-svg { width: 100%; height: auto; display: block; filter: drop-shadow(0 8px 14px rgba(0,0,0,.3)); }
.knob .led { fill: var(--knob-led-off); transition: fill .08s; }
.knob .led.on { fill: var(--accent); filter: drop-shadow(0 0 3px var(--accent)); }
.knob-skirt { fill: var(--knob-skirt); }
.knob-body > circle:first-child { fill: var(--knob-face); }
.knob .ridge { stroke: var(--knob-ridge); stroke-width: 1.6; }
.knob-cap { fill: var(--knob-cap); stroke: var(--knob-ridge); stroke-width: 2; }
.knob-mark { stroke: var(--accent); stroke-width: 6; stroke-linecap: round; }
.knob-val { position: absolute; left: 0; right: 0; bottom: 6px; text-align: center; font-size: 26px; font-weight: 900; letter-spacing: -.02em; pointer-events: none; font-variant-numeric: tabular-nums; }

/* ---------- poll ---------- */
.mpoll { display: flex; flex-direction: column; gap: 8px; }
.popt { position: relative; overflow: hidden; width: 100%; justify-content: flex-start; text-align: left; gap: 10px; padding: 12px 14px; border-radius: var(--ctl); font-weight: 700; font-size: 16px;
  background: var(--surface2); color: var(--ink); border: 1.5px solid var(--line); }
.popt .fill { position: absolute; inset: 0 auto 0 0; width: 0; background: color-mix(in srgb, var(--accent) 35%, transparent); transition: width .5s ease-out; }
.popt > :not(.fill) { position: relative; }
.popt .tick { flex: 0 0 20px; height: 20px; border-radius: 50%; border: 2px solid var(--muted); display: grid; place-items: center; font-size: 12px; }
.popt.chosen { border-color: var(--accent); }
.popt.chosen .tick { background: var(--accent); border-color: var(--accent); }
.popt.chosen .tick::after { content: '✓'; color: var(--accent-ink); font-weight: 900; }
.popt .olbl { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.popt .pct { flex: 0 0 auto; font-variant-numeric: tabular-nums; }
.popt.other { background: transparent; border-style: dashed; color: var(--muted); justify-content: center; }
.popt.static { cursor: default; }
.edit-card .popt.other { margin: 4px 0 8px; }
.poll-total { font-size: 12.5px; color: var(--muted); font-weight: 600; text-align: center; }
.write-in { width: 100%; margin-bottom: 8px; }

/* ---------- claim one ---------- */
.mclaim { display: flex; flex-direction: column; gap: 8px; }
.citem { width: 100%; justify-content: space-between; text-align: left; padding: 12px 14px; border-radius: var(--ctl); font-weight: 700; font-size: 16px; background: var(--surface2); color: var(--ink); border: 1.5px solid var(--line); gap: 10px; }
.citem .clbl { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.citem .claim-btn { flex: 0 0 auto; font-size: 13px; padding: 5px 10px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); }
.citem .claimer { flex: 0 0 auto; font-size: 13.5px; color: var(--muted); }
.citem.taken { opacity: .78; }
.citem.taken .clbl { text-decoration: line-through; text-decoration-thickness: 2px; }
.citem.mine { opacity: 1; border-color: var(--accent); }
.citem.mine .clbl { text-decoration: none; }
.citem.mine .claimer { color: var(--cue); font-weight: 800; }
.citem.other { background: transparent; border-style: dashed; color: var(--muted); justify-content: center; }
.citem.static, .citem:disabled { cursor: default; }

/* ---------- 1 to 10 ---------- */
.scale-big { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 62px; }
.scale-big .snumber { font-size: 56px; font-weight: 900; letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.scale-big .sface { font-size: 36px; }
.scale-big .savg { font-size: 12.5px; color: var(--muted); font-weight: 700; align-self: flex-end; margin-bottom: 10px; }
.scale-big.pop { animation: spop .22s ease-out; }
@keyframes spop { 0% { transform: scale(.82); } 60% { transform: scale(1.12); } 100% { transform: scale(1); } }
.scale-meter { display: flex; flex-direction: column; gap: 5px; touch-action: none; cursor: pointer; user-select: none; -webkit-user-select: none; outline-offset: 4px; }
.sbars { display: flex; align-items: flex-end; gap: 5px; height: 120px; padding-top: 4px; }
.sbar { position: relative; flex: 1; height: var(--h); border-radius: 8px 8px 5px 5px; background: var(--unlit); overflow: hidden; transition: transform .12s; }
.sbar.lit { background: hsl(var(--hue) var(--bar-s) var(--bar-l)); box-shadow: var(--bar-glow); }
.sbar.you { background: var(--picked); box-shadow: 0 0 0 3px var(--accent) inset; }
.snums { display: flex; gap: 5px; }
.snum { flex: 1; text-align: center; font-size: 12px; font-weight: 800; color: var(--muted); }
.snum.lit { color: var(--ink); }
.sbar .sfill { position: absolute; left: 0; right: 0; bottom: 0; height: 0; background: hsl(var(--hue) var(--bar-s) var(--bar-l) / .55); }
.scale-meter.results .sbar { background: var(--unlit); }
.scale-meter.results .sbar.lit { background: var(--unlit); box-shadow: none; }
.scale-meter.results .sbar.you { background: var(--picked); box-shadow: 0 0 0 3px var(--accent) inset; }
.sbar.you .sfill { display: none; }
.sbar .scount { position: absolute; top: 4px; left: 0; right: 0; text-align: center; font-size: 11.5px; font-weight: 800; }
.sbar.you .scount { color: var(--picked-ink); }
.msg.on-fire { animation: fire .5s ease-out; }
@keyframes fire { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 70%, transparent); } 100% { box-shadow: 0 0 0 16px transparent; } }
.msg.compact .sbars { height: 84px; }

/* ---------- conversation screen ---------- */
body.thread { display: flex; flex-direction: column; min-height: 100dvh; }
.topbar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 4px; padding: 6px 6px 6px 6px; padding-top: max(6px, env(safe-area-inset-top));
  background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.back { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; color: var(--ink); text-decoration: none; border-radius: 12px; flex-shrink: 0; }
.t-head { flex: 1; min-width: 0; text-align: center; }
.t-title { font-weight: 700; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.t-sub { font-size: 11.5px; color: var(--muted); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.t-spacer { width: 44px; flex-shrink: 0; }
.t-right { display: flex; align-items: center; gap: 2px; flex-shrink: 0; position: relative; }
#invite { height: 38px; padding: 0 14px; font-size: 14px; display: none; }
body.can-invite #invite { display: inline-flex; }
.more { width: 44px; height: 44px; padding: 0; color: var(--ink); background: none; border-radius: 12px; }
.menu { position: absolute; right: 0; top: calc(100% + 4px); z-index: 10; display: flex; flex-direction: column; min-width: 250px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 6px; box-shadow: var(--shadow); }
.menu button { background: none; color: var(--ink); text-align: left; justify-content: flex-start; padding: 11px 12px; font-size: 15px; font-weight: 700; border-radius: 10px; }
.menu button:hover { background: var(--surface2); }
.menu .starter-only { display: none; }
body.starter .menu .starter-only { display: flex; }
.log-wrap { flex: 1; width: 100%; padding: 8px 14px 96px; }
.log { display: flex; flex-direction: column; gap: 10px; max-width: 560px; margin: 0 auto; }
.mrow { position: relative; display: flex; flex-direction: column; max-width: 100%; }
.mrow.me { align-items: flex-end; }
.mrow.them { align-items: flex-start; }
.who-label { font-size: 12px; color: var(--muted); font-weight: 700; margin: 0 10px 3px; overflow-wrap: anywhere; }
.bubble { max-width: 78%; padding: 10px 14px; border-radius: 20px; line-height: 1.35; font-weight: 500; font-size: 16px; overflow-wrap: anywhere; white-space: pre-wrap; }
.mrow.them .bubble { background: var(--them); color: var(--them-ink); border: 1px solid var(--them-line); border-bottom-left-radius: 6px; }
.mrow.me .bubble { background: var(--me); color: var(--me-ink); border-bottom-right-radius: 6px; }
.stamp { font-size: 11px; color: var(--muted); margin: 3px 10px 0; font-weight: 500; }
.mrow.local .bubble { opacity: .7; }
.mrow.local .stamp { background: none; padding: 0; font-size: 11px; color: var(--muted); }
.mrow.local.failed .bubble { opacity: 1; outline: 2px solid var(--danger); }
.mrow.local.failed .stamp { color: var(--danger); font-weight: 800; }
.quote { background: none; border-left: 3px solid var(--accent); border-radius: 4px; padding: 2px 8px; margin: 0 6px 3px; color: var(--muted); font-size: 12.5px; font-weight: 700; max-width: 78%; text-align: left; overflow-wrap: anywhere; display: flex; gap: 4px; align-items: center; }
.card-slot { width: 100%; scroll-margin-top: 76px; }
.mrow .activity { width: 100%; }
.card-extra { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.card-extra .link.tiny { font-size: 12.5px; }
.invite-nudge { width: 100%; text-align: center; border: 1.5px dashed var(--line); border-radius: calc(var(--radius) - 4px); padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.invite-nudge p { margin: 0; font-size: 14px; line-height: 1.35; color: var(--muted); font-weight: 500; }
.nudge-btns { display: flex; gap: 8px; }
.nudge-btns > * { flex: 1; }
.nudge-btns .primary, .nudge-btns .ghost { width: 100%; height: 42px; padding: 0 12px; font-size: 15px; }
.photo-link { display: block; max-width: 72%; }
.photo { display: block; max-width: 100%; max-height: 360px; border-radius: 18px; border: 1px solid var(--line); background: var(--surface); }
.photo-link + .bubble { margin-top: 4px; }
.remove-x { display: none; position: absolute; top: 0; width: 26px; height: 26px; padding: 0; border-radius: 50%; background: var(--danger); color: #fff; font-size: 16px; line-height: 1; z-index: 2; }
.mrow.them .remove-x { right: 0; }
.mrow.me .remove-x { left: 0; }
body.managing .mrow.removable .remove-x, body.managing.starter .mrow .remove-x { display: inline-flex; }
.sent-banner { max-width: 560px; margin: 4px auto 14px; text-align: center; background: var(--surface); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 10px; }
.sent-banner p { margin: 0; font-weight: 700; font-size: 15px; line-height: 1.35; }
.composer { position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; display: flex; align-items: center; gap: 8px; padding: 8px 10px; padding-bottom: max(10px, env(safe-area-inset-bottom));
  background: var(--surface); border-top: 1px solid var(--line); }
.composer > * { flex-shrink: 0; }
.composer input { flex: 1; min-width: 0; height: 40px; border-radius: var(--pill); padding: 0 14px; font-size: 16px; }
.composer .name-in { flex: 0 0 76px; padding: 0 10px; }
.plus, .cam { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; border: 1.5px solid var(--line); background: transparent; color: var(--ink); text-decoration: none; cursor: pointer; padding: 0; }
.cam.busy { opacity: .45; pointer-events: none; }
.send { width: 40px; height: 40px; padding: 0; border-radius: 50%; background: var(--accent); color: var(--accent-ink); }
.send:disabled, .send.sending { opacity: .5; }
.reply-bar { position: fixed; left: 0; right: 0; bottom: calc(58px + env(safe-area-inset-bottom)); z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 14px; background: var(--surface2); border-top: 1px solid var(--line); font-size: 13px; font-weight: 700; color: var(--muted); }
.net-bar { position: fixed; left: 0; right: 0; bottom: calc(58px + env(safe-area-inset-bottom)); z-index: 6; display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 14px; background: var(--danger); color: #2a0000; font-size: 13.5px; font-weight: 800; }
.empty { text-align: center; padding: 40px 8px; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.empty-title { font-size: 20px; font-weight: 800; margin: 0; }

/* ---------- home ---------- */
.home-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 0 12px; }
.brand-mark { font-size: 32px; font-weight: 800; letter-spacing: -.03em; }
.home-actions { display: flex; align-items: center; gap: 8px; }
.theme-btn { width: 42px; height: 42px; padding: 0; border-radius: 50%; border: 1.5px solid var(--line); color: var(--ink); background: transparent; }
.new-btn { width: auto; height: 42px; padding: 0 16px 0 12px; font-size: 15px; gap: 6px; }
.convos { list-style: none; margin: 0; padding: 0; }
.convo { display: flex; align-items: center; gap: 12px; padding: 12px 4px; color: inherit; text-decoration: none; border-bottom: 1px solid var(--line); }
.convo-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.convo-top { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.convo-title { font-weight: 700; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.convo-time { flex: 0 0 auto; color: var(--muted); font-size: 12.5px; font-weight: 500; }
.convo-preview { color: var(--muted); font-size: 14.5px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.convo.unread .convo-title, .convo.unread .convo-preview { color: var(--ink); font-weight: 800; }
.dot-unread { flex: 0 0 10px; height: 10px; border-radius: 50%; background: var(--picked); }
.home-tip { margin-top: 28px; padding: 0 12px; line-height: 1.4; font-weight: 500; }

/* ---------- new ditto ---------- */
.kinds { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.kinds .kgroup { font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 6px 2px -2px; }
.kinds .krow { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.kinds .chip.kind { display: flex; align-items: center; gap: 10px; height: 58px; padding: 0 12px; text-align: left; border-radius: calc(var(--ctl) + 2px); white-space: normal; min-width: 0; }
.kinds .chip.kind .kname { font-size: 15px; font-weight: 700; white-space: nowrap; }
.kinds .chip.kind small { display: block; font-size: 11.5px; font-weight: 500; opacity: .75; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kinds .chip.kind > div { min-width: 0; }
.kinds .chip.quiet { background: transparent; border-style: dashed; }
.kinds .chip.kind[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
body.note-mode .chips, body.note-mode #ai-box, body.note-mode #send-text, body.note-mode #preview-toggle, body.note-mode .edit-cue { display: none !important; }
.edit-cue { font-size: 14px; font-weight: 700; color: var(--cue); margin: 8px 0; }
.edit-card { gap: 8px; }
.edit-card input[type=text] { padding: 9px 12px; }
.from-row { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 800; color: var(--muted); }
.from-row input { width: 150px; }
.q-input { font-size: 18px; font-weight: 800; line-height: 1.25; resize: none; overflow: hidden; }
.choice { display: flex; gap: 8px; align-items: center; }
.choice .n { width: 26px; text-align: center; font-size: 13px; font-weight: 800; color: var(--muted); flex-shrink: 0; }
.choice .two { flex: 1; display: grid; grid-template-columns: 1fr; gap: 4px; }
.choice .mini { font-size: 11px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.ends-edit { display: grid; grid-template-columns: 26px 1fr; gap: 6px 8px; align-items: center; }
.ends-edit span { font-size: 13px; color: var(--muted); font-weight: 800; text-align: center; }
.note-input { width: 100%; font-size: 20px; font-weight: 700; line-height: 1.3; resize: vertical; min-height: 96px; }
.add-photo { width: 100%; }
.note-photo { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.note-photo img { max-width: 100%; max-height: 260px; border-radius: 14px; }
.add-item { display: block; margin: 0 0 4px 34px; }
.audience { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
.aud-label { font-size: 12.5px; font-weight: 800; color: var(--muted); }
.segs { display: flex; gap: 6px; }
.seg { flex: 1; height: 40px; border-radius: var(--ctl); border: 1.5px solid var(--line); background: transparent; color: var(--ink); font-size: 14px; font-weight: 700; padding: 0 8px; }
.seg[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.audience .muted { margin: 4px 2px 0; }
.ai-row { display: flex; gap: 8px; align-items: center; }
.ai-row input { flex: 1; min-width: 0; }
.preview-toggle { margin-left: auto; }
.sent-top { display: block; margin: 10px 0 0; font-weight: 700; color: var(--cue); }
.recent { margin-top: 20px; }
.recent ul { list-style: none; margin: 0; padding: 0; }
.recent li { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.recent li:last-child { border-bottom: 0; }
.recent-title { flex: 1; min-width: 0; overflow-wrap: anywhere; }

/* ---------- answers page (backup) ---------- */
.brand { display: flex; align-items: center; justify-content: space-between; font-weight: 800; letter-spacing: -.02em; font-size: 17px; }
.brand a { color: inherit; text-decoration: none; }
.brand .back-link { color: var(--cue); font-size: 16px; font-weight: 800; }
.thread-note { font-size: 13px; color: var(--muted); font-weight: 600; margin: 10px 0 2px; }
.news { font-weight: 800; font-size: 18px; margin: 0 0 12px; }
.stat { display: grid; grid-template-columns: repeat(3, 1fr); text-align: center; gap: 8px; }
.stat b { display: block; font-size: 26px; font-weight: 900; }
.card.warn { border: 1.5px solid var(--accent); }
