:root {
  --ink: 255,255,255;
  --shade: 0,0,0;
  --solid: #fff;
  --on-solid: #000;
  --bg: #000;
  --bg-deep: #050506;
  --bg-intro: #000;
  --mark-filter: none;
  color-scheme: dark;
  --fg: rgba(var(--ink),.94);
  --muted: rgba(var(--ink),.55);
  --faint: rgba(var(--ink),.12);
  --glass: rgba(18,18,20,.42);
  --glass-strong: rgba(16,16,18,.68);
  --line: rgba(var(--ink),.10);
  --accent: #fff;
  --ease: cubic-bezier(.2,.7,.2,1);
}
* { box-sizing: border-box; }
html, body { overscroll-behavior-x: none; margin: 0; height: 100%; background: var(--bg); color: var(--fg); overflow: hidden;
  font-family: "Inter var", Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-feature-settings: "cv11", "ss01"; -webkit-font-smoothing: antialiased; font-size: 13px; letter-spacing: -.005em; }
button, input { font: inherit; color: inherit; }
#view { position: fixed; inset: 0; width: 100vw; height: 100vh; display: block; cursor: grab; touch-action: none; }
body.dragging #view { cursor: grabbing; }
.veil { position: fixed; inset: 0; pointer-events: none;
  background: linear-gradient(to bottom, rgba(var(--shade),.35), transparent 18%, transparent 70%, rgba(var(--shade),.45)); transition: opacity .8s var(--ease); }
.hidden { display: none !important; }

.ui, .veil { transition: opacity .6s var(--ease), transform .6s var(--ease); }
body.idle .ui, body.idle .veil { opacity: 0; pointer-events: none; }
body.idle .dock { transform: translate(-50%, 8px); }
body.idle:not(.dragging) #view { cursor: none; }

.top { position: fixed; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; align-items: center; padding: 22px 28px; pointer-events: none; }
.brand { font-weight: 500; font-size: 14px; letter-spacing: -.01em; }
.status { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.dot { width: 6px; height: 6px; border-radius: 50%; background: #6ee7a8; box-shadow: 0 0 10px #6ee7a8; }
.status.warn .dot { background: #f5c26b; box-shadow: 0 0 10px #f5c26b; }
.status.off .dot { background: #888; box-shadow: none; }

.pill { position: fixed; top: 64px; left: 50%; transform: translateX(-50%); border: 1px solid var(--line);
  background: var(--glass); backdrop-filter: blur(20px) saturate(1.4); -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border-radius: 999px; padding: 8px 16px; cursor: pointer; font-size: 12px; }
.pill:hover { background: var(--glass-strong); }

.toast { position: fixed; bottom: 142px; left: 50%; transform: translate(-50%, 6px); opacity: 0; max-width: min(560px, 90vw);
  background: var(--glass-strong); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border: 1px solid var(--line);
  padding: 9px 14px; border-radius: 12px; font-size: 12px; color: var(--fg); pointer-events: none; transition: all .4s var(--ease); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast .muted { color: var(--muted); }

.dock { position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%); width: min(680px, calc(100vw - 32px)); }
.now { display: flex; align-items: center; gap: 8px; padding: 0 6px 10px; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; }
.now-label { text-transform: uppercase; letter-spacing: .08em; font-size: 10px; color: rgba(var(--ink),.4); }
#now-title, #next-title { color: var(--fg); overflow: hidden; text-overflow: ellipsis; }
#next-title { color: var(--muted); }
.bar { flex: 0 0 64px; height: 2px; background: var(--faint); border-radius: 2px; margin-left: auto; overflow: hidden; }
.bar span { display: block; height: 100%; width: 0; background: var(--accent); transition: width .8s linear; }

.cmd { display: flex; align-items: center; gap: 6px; padding: 6px 6px 6px 18px; border-radius: 16px;
  background: var(--glass); border: 1px solid var(--line);
  backdrop-filter: blur(24px) saturate(1.5); -webkit-backdrop-filter: blur(24px) saturate(1.5);
  box-shadow: 0 10px 40px rgba(var(--shade),.25); }
.cmd:focus-within { background: var(--glass-strong); }
#cmd-input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; font-size: 14px; padding: 9px 0; }
#cmd-input::placeholder { color: rgba(var(--ink),.45); }
.cmd.busy #cmd-input { opacity: .5; }
.sep { width: 1px; height: 20px; background: var(--line); margin: 0 2px; }

.seg { display: inline-flex; background: rgba(var(--ink),.06); border-radius: 10px; padding: 2px; }
.seg button { border: 0; background: none; padding: 5px 10px; border-radius: 8px; cursor: pointer; color: var(--muted); font-size: 12px; }
.seg button.on { background: rgba(var(--ink),.14); color: var(--fg); }
.seg.small button { padding: 4px 8px; }

.icon { position: relative; border: 0; background: none; width: 34px; height: 34px; border-radius: 10px; cursor: pointer; display: grid; place-items: center; color: var(--fg); }
.icon:hover { background: rgba(var(--ink),.08); }
.icon svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
#skip svg { fill: currentColor; stroke: none; }
.icon.text { width: auto; padding: 0 10px; font-size: 12px; font-variant-numeric: tabular-nums; }
.badge { position: absolute; top: 3px; right: 2px; font-size: 9px; min-width: 14px; height: 14px; line-height: 14px; border-radius: 7px; background: var(--solid); color: var(--on-solid); font-weight: 600; }

.pop { position: absolute; right: 0; bottom: calc(100% + 10px); width: 280px; padding: 12px; border-radius: 14px;
  background: var(--glass-strong); border: 1px solid var(--line); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); }
.pop-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 2px; }
.pop-row.dim { opacity: .35; pointer-events: none; }
.mode { flex: 1; border: 1px solid var(--line); background: none; border-radius: 9px; padding: 7px; cursor: pointer; color: var(--muted); }
.mode.on { background: rgba(var(--ink),.12); color: var(--fg); }
.muted { color: var(--muted); }
.num { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 12px; min-width: 52px; text-align: right; }
.fine { color: rgba(var(--ink),.4); font-size: 11px; line-height: 1.5; margin: 6px 2px 0; }
input[type=range] { -webkit-appearance: none; appearance: none; flex: 1; height: 2px; background: var(--faint); border-radius: 2px; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 12px; border-radius: 50%; background: var(--solid); }
input[type=range]::-moz-range-thumb { width: 12px; height: 12px; border: 0; border-radius: 50%; background: var(--solid); }

.drawer { position: fixed; top: 12px; right: 12px; bottom: 12px; width: 340px; max-width: calc(100vw - 24px);
  display: flex; flex-direction: column; border-radius: 18px; background: var(--glass-strong); border: 1px solid var(--line);
  backdrop-filter: blur(28px) saturate(1.4); -webkit-backdrop-filter: blur(28px) saturate(1.4);
  transform: translateX(calc(100% + 24px)); transition: transform .5s var(--ease); }
.drawer.open { transform: none; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 14px 6px 18px; font-weight: 500; }
.card { margin: 6px 12px; padding: 12px 14px; border-radius: 12px; background: rgba(var(--ink),.06); }
.card .k { font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: rgba(var(--ink),.4); }
.card .t { font-weight: 500; margin: 4px 0; }
.card .p { color: var(--muted); font-size: 12px; line-height: 1.45; }
.list { list-style: none; margin: 4px 0; padding: 0 12px; overflow-y: auto; flex: 1; }
.item { position: relative; display: grid; grid-template-columns: 18px 1fr; gap: 8px; align-items: start; padding: 10px 8px; border-radius: 10px; }
.item:hover { background: rgba(var(--ink),.05); }
.item.dragging { opacity: .4; }
.item.over { box-shadow: inset 0 2px 0 #fff; }
.item .n { color: rgba(var(--ink),.35); font-size: 11px; padding-top: 2px; font-variant-numeric: tabular-nums; cursor: grab; }
.item .t { font-weight: 500; }
.item .p { color: var(--muted); font-size: 12px; line-height: 1.45; margin-top: 2px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.item .meta { color: rgba(var(--ink),.35); font-size: 11px; margin-top: 4px; }
.item .acts { position: absolute; top: 6px; right: 6px; display: flex; gap: 0; opacity: 0; background: rgba(20,20,22,.9); border-radius: 9px; transition: opacity .2s; }
.item:hover .acts, .item:focus-within .acts { opacity: 1; }
.item .acts .icon { width: 26px; height: 26px; }
.item .acts .icon svg { width: 13px; height: 13px; }
.item textarea { width: 100%; background: rgba(var(--shade),.3); border: 1px solid var(--line); border-radius: 8px; color: var(--fg); font: inherit; font-size: 12px; padding: 6px 8px; resize: vertical; min-height: 64px; outline: 0; }
.empty { color: var(--muted); padding: 16px 20px; font-size: 12px; }
.drawer-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 12px 18px 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.num-field input { width: 46px; margin-left: 4px; background: rgba(var(--ink),.06); border: 1px solid var(--line); border-radius: 7px; padding: 3px 6px; color: var(--fg); outline: 0; }
.ghost { margin-left: auto; border: 1px solid var(--line); background: none; border-radius: 8px; padding: 4px 10px; cursor: pointer; color: var(--muted); }
.ghost:hover { color: var(--fg); }
.toggle { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.toggle input { display: none; }
.toggle span { width: 26px; height: 16px; border-radius: 8px; background: var(--faint); position: relative; transition: background .2s; }
.toggle span::after { content: ""; position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%; background: var(--solid); transition: transform .2s var(--ease); }
.toggle input:checked + span { background: rgba(var(--ink),.45); }
.toggle input:checked + span::after { transform: translateX(10px); }

@media all {
  .seg[role=group] { display: none; }
  .top { padding: 16px 18px; }
  .dock { bottom: 16px; }
}
.pop-title { font-weight: 500; padding: 2px 2px 0; }
.primary { border: 0; background: var(--solid); color: var(--on-solid); border-radius: 9px; padding: 7px 12px; cursor: pointer; font-weight: 500; font-size: 12px; }
.primary:disabled { opacity: .5; cursor: progress; }

.src { font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: rgba(var(--ink),.45); white-space: nowrap; }
.src.auto { color: rgba(214,196,255,.75); }
.item.auto .t, .item.auto .p { font-style: italic; }
.item.auto { opacity: .78; }
.item.auto .t::before { content: "✦ "; color: rgba(214,196,255,.85); font-style: normal; }
.item.user .t::after { content: "you"; margin-left: 8px; font-size: 9px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; padding: 2px 6px; border-radius: 6px; background: rgba(var(--ink),.14); vertical-align: 1px; }
.tag { font-size: 9px; letter-spacing: .06em; text-transform: uppercase; padding: 2px 6px; border-radius: 6px; background: rgba(var(--ink),.1); margin-left: 6px; }
.tag.auto { background: rgba(170,140,255,.18); color: rgba(225,212,255,.9); }
.spark { color: rgba(214,196,255,.9); font-weight: 400; }
.auto-row { display: flex; align-items: center; justify-content: space-between; width: 100%; }
.auto-status { font-size: 11px; color: rgba(var(--ink),.4); }
.vibe { width: 100%; background: rgba(var(--ink),.06); border: 1px solid var(--line); border-radius: 9px; padding: 7px 10px; color: var(--fg); outline: 0; font-size: 12px; }
.vibe:focus { border-color: rgba(var(--ink),.25); }
.empty .spark { margin-right: 4px; }

/* ambient / screensaver: nothing but the canvas */
body.reveal .ui, body.reveal .veil, body.reveal .drawer, body.reveal .toast, body.reveal-lock .ui, body.reveal-lock .veil, body.reveal-lock .drawer,
body.ambient .ui, body.ambient .veil, body.ambient .toast:not(.show), body.ambient .drawer { opacity: 0 !important; pointer-events: none !important; }
body.ambient #view { cursor: none; }
body.reveal .ui, body.reveal .veil { transition-duration: .35s; }

/* ---------- social layer: quiet, translucent, secondary ---------- */
.top-right { display: flex; align-items: center; gap: 16px; pointer-events: auto; }
.quiet { background: none; border: 0; color: var(--muted); font-size: 12px; cursor: pointer; padding: 4px 0; }
.quiet:hover { color: var(--fg); }
.fuel-chip { display: inline-flex; align-items: center; gap: 8px; background: none; border: 0; cursor: pointer; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; padding: 0; }
.fuel-chip:hover { color: var(--fg); }
.fuel-line { width: 44px; height: 2px; background: var(--faint); border-radius: 2px; overflow: hidden; display: inline-block; }
.fuel-line span { display: block; height: 100%; width: 0; background: rgba(var(--ink),.85); transition: width 1.2s var(--ease); }
.fuel-line.big { width: 100%; height: 3px; }
.fuel-chip.low .fuel-line span { background: #f5c26b; }
.fuel-big { padding: 8px 18px 0; }
.fuel-caption { margin-top: 10px; font-size: 22px; font-weight: 300; letter-spacing: -.02em; }
.fuel-caption .muted { font-size: 13px; }
.pad { padding: 4px 18px; } .pad-x { margin: 0 18px; width: calc(100% - 36px); }
.tiers { display: flex; gap: 8px; padding: 12px 18px; }
.tiers button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 6px; border-radius: 12px;
  background: rgba(var(--ink),.05); border: 1px solid var(--line); color: var(--fg); cursor: pointer; font-size: 15px; font-weight: 500; transition: background .2s, border-color .2s; }
.tiers button:hover { background: rgba(var(--ink),.1); border-color: rgba(var(--ink),.22); }
.tiers small { font-size: 10px; color: var(--muted); font-weight: 400; }
.drawer-sub { padding: 16px 18px 4px; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: rgba(var(--ink),.4); }
.donors .item { grid-template-columns: 1fr auto; }
.donors .amt { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 12px; }
.tabs { display: flex; gap: 14px; }
.tabs button { background: none; border: 0; padding: 4px 0; color: rgba(var(--ink),.4); cursor: pointer; font-size: 13px; font-weight: 500; border-bottom: 1px solid transparent; }
.tabs button.on { color: var(--fg); border-bottom-color: rgba(var(--ink),.6); }
.panel { display: flex; flex-direction: column; min-height: 0; flex: 1; overflow-y: auto; }
.idea .votes { display: flex; flex-direction: column; align-items: center; gap: 0; background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 11px; padding: 0 2px; font-variant-numeric: tabular-nums; }
.idea .votes svg { width: 12px; height: 12px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.idea .votes.on { color: var(--fg); }
.idea { grid-template-columns: 26px 1fr !important; }
.idea .who { color: rgba(var(--ink),.4); font-size: 11px; margin-top: 3px; }
.idea .boosted { color: rgba(245,194,107,.85); }
.idea .acts { top: 8px; }
.audit .item { grid-template-columns: 1fr; font-size: 11px; }
.audit .t { font-weight: 400; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; }

.chat { position: fixed; left: 24px; bottom: 28px; width: min(300px, 32vw); }
.chat-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; max-height: 34vh; overflow: hidden;
  -webkit-mask-image: linear-gradient(to top, #000 70%, transparent); mask-image: linear-gradient(to top, #000 70%, transparent); }
.chat-list li { font-size: 12px; line-height: 1.45; color: rgba(var(--ink),.82); text-shadow: 0 1px 8px rgba(var(--shade),.6); animation: rise .5s var(--ease); position: relative; }
.chat-list li b { font-weight: 500; color: rgba(var(--ink),.55); margin-right: 6px; }
.chat-list li .mod { display: none; margin-left: 6px; font-size: 10px; color: rgba(var(--ink),.4); cursor: pointer; }
body.is-admin .chat-list li:hover .mod { display: inline; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
#chat-input { margin-top: 8px; width: 100%; background: rgba(18,18,20,.35); border: 1px solid var(--line); border-radius: 10px; padding: 7px 10px; color: var(--fg); outline: 0; font-size: 12px;
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); opacity: .55; transition: opacity .3s; }
#chat-input:focus, .chat:hover #chat-input { opacity: 1; }

.sheet { position: fixed; inset: 0; display: grid; place-items: center; background: rgba(var(--shade),.25); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); z-index: 20; animation: fade .3s var(--ease); }
.sheet-card { width: min(340px, 90vw); padding: 22px; border-radius: 18px; background: var(--glass-strong); border: 1px solid var(--line);
  backdrop-filter: blur(28px); -webkit-backdrop-filter: blur(28px); display: flex; flex-direction: column; gap: 10px; }
.sheet-title, .sleep-title { font-size: 17px; font-weight: 500; letter-spacing: -.01em; }
.wide { width: 100%; margin-top: 8px; padding: 9px 12px; }
.ghost.wide { margin-left: 0; }
@keyframes fade { from { opacity: 0; } }

.sleep { position: fixed; inset: 0; display: grid; place-items: center; z-index: 15; background: radial-gradient(ellipse at center, rgba(var(--shade),.15), rgba(var(--shade),.55)); animation: fade .8s var(--ease); }
.sleep-card { text-align: center; max-width: 360px; padding: 0 20px; }
.sleep-card p { color: var(--muted); line-height: 1.6; }
.sleep .tiers { justify-content: center; }
.sleep .tiers button { flex: 0 0 76px; }
body.sleeping #view { filter: blur(6px) brightness(.6) saturate(.8); transition: filter 1.2s var(--ease); }
@media all { .chat { display: none; } }
/* viewers can't steer the stage directly in production */
body.social:not(.is-admin) #queue-list .acts,
body.social:not(.is-admin) .drawer-foot,
body.social:not(.is-admin) .admin-ctl,
body.social:not(.is-admin) .seg[role=group],
body.social:not(.is-admin) #skip, body.social:not(.is-admin) #speed-btn { display: none !important; }
body.social:not(.is-admin) #queue-list .item { cursor: default; }

/* ---------- load-in: inset card -> full bleed, points -> image, staggered UI ---------- */
#intro { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 30; pointer-events: none;
  border-radius: 0; transform: none; transition: none; }   /* the loader never slides/scales; it only crossfades (in JS) */
body.intro { background: var(--bg-intro); }

#view { transition: transform 1.1s var(--ease), border-radius 1.1s var(--ease), filter 1.2s var(--ease); }
body.intro #view { filter: brightness(.6); }
body.intro .ui, body.intro .veil { opacity: 0; transform: translateY(6px); pointer-events: none; }
body.loaded .ui, body.loaded .veil { transition: opacity .9s var(--ease), transform .9s var(--ease); }
/* stagger, after the card has mostly opened: mark → live count → caption → dock → timeline */
body.loaded .top, body.loaded .veil { transition-delay: .9s; }
.top .brand, .top .top-right, .dock .now, .dock > :not(.now):not(.cmd-terms) { transition: opacity .8s var(--ease), transform .8s var(--ease); }
body.intro .top .brand, body.intro .top .top-right, body.intro .dock .now, body.intro .dock > :not(.now):not(.cmd-terms) { opacity: 0; transform: translateY(5px); }
body.loaded .top .brand { transition-delay: .9s; }
body.loaded .top .top-right { transition-delay: 1.05s; }
body.loaded .dock { transition-delay: 1.2s; } body.loaded .dock .now { transition-delay: 1.2s; }
body.loaded .dock > :not(.now):not(.cmd-terms) { transition-delay: 1.35s; }
body.loaded .timeline { transition-delay: 1.5s; }
body.loaded .chat { transition-delay: 1.5s; }
body.loaded.settled .top .brand, body.loaded.settled .top .top-right, body.loaded.settled .dock .now, body.loaded.settled .dock > :not(.now):not(.cmd-terms) { transition-delay: 0s; }
body.intro .dock { transform: translate(-50%, 10px); }
body.loaded.settled .ui, body.loaded.settled .veil { transition-delay: 0s !important; }
body.intro #view { opacity: 0; }
body.loaded #view { transition: transform 1.1s var(--ease), border-radius 1.1s var(--ease), filter 1.2s var(--ease); }
#view { transition: transform 1.1s var(--ease), border-radius 1.1s var(--ease), filter 1.2s var(--ease), opacity .9s var(--ease); }
.audit .meta, .audit .p { word-break: break-all; }

/* reference images + permalinks */
.ref-chip { display: inline-flex; align-items: center; gap: 4px; margin-left: 8px; }
.ref-chip img { width: 26px; height: 26px; object-fit: cover; border-radius: 7px; border: 1px solid var(--line); }
.ref-chip button { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 14px; padding: 0 2px; }
#ref-btn { cursor: pointer; display: inline-grid; place-items: center; }
#ref-btn.hidden { display: none; }
#ref-btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.idea .thumb { width: 34px; height: 34px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); float: right; margin-left: 8px; }
.brand { display: inline-flex; align-items: center; gap: 9px; } .brand-mark { width: 22px; height: 13px; opacity: .9; }

/* ---------- timeline scrubber: a hairline at the very bottom ---------- */
.timeline { display: none !important; position: fixed; left: 28px; right: 28px; bottom: 0; height: 22px; cursor: pointer; touch-action: none; z-index: 6; }
.tl-line { position: absolute; left: 0; right: 0; bottom: 10px; height: 1px; background: rgba(var(--ink),.16); transition: height .25s var(--ease), background .25s; }
.timeline:hover .tl-line, .timeline.active .tl-line { height: 3px; bottom: 9px; background: rgba(var(--ink),.24); border-radius: 2px; }
.tl-head { position: absolute; bottom: 7px; width: 7px; height: 7px; margin-left: -3.5px; border-radius: 50%; background: var(--solid);
  box-shadow: 0 0 10px rgba(var(--ink),.55); transition: transform .25s var(--ease); }
.timeline:not(.away) .tl-head { opacity: .55; }
.timeline.active .tl-head { transform: scale(1.5); }
.tl-tip { position: absolute; bottom: 20px; transform: translateX(-50%); font-size: 11px; color: var(--fg); white-space: nowrap; opacity: 0;
  padding: 4px 8px; border-radius: 8px; background: var(--glass-strong); border: 1px solid var(--line); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  transition: opacity .2s; pointer-events: none; font-variant-numeric: tabular-nums; }
.timeline:hover .tl-tip, .timeline.active .tl-tip { opacity: 1; }
.tl-label { position: absolute; bottom: 14px; font-size: 10px; color: rgba(var(--ink),.35); opacity: 0; transition: opacity .25s; pointer-events: none; }
.tl-label.left { left: 0; } .tl-label.right { right: 0; }
.timeline:hover .tl-label { opacity: 1; }

/* ---------- profile page (/u/<handle>) ---------- */
body.page { overflow: auto; height: auto; min-height: 100%; background: var(--bg-deep); }
.page-bg { position: fixed; inset: 0; background: center/cover no-repeat; filter: blur(60px) saturate(1.2); opacity: .22; transform: scale(1.2); pointer-events: none; transition: opacity 1s var(--ease); }
.page-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, transparent, var(--bg-deep) 70%); }
.page-top { position: sticky; top: 0; z-index: 3; }
.page-top .brand { color: var(--fg); text-decoration: none; }
.quiet-link { color: var(--muted); text-decoration: none; transition: color .2s; }
.quiet-link:hover { color: var(--fg); }
.profile { position: relative; z-index: 1; max-width: 880px; margin: 0 auto; padding: 72px 28px 120px; }
.p-head h1 { font-size: 40px; font-weight: 500; letter-spacing: -.03em; margin: 0 0 10px; }
.p-meta { color: var(--muted); font-size: 13px; }
.p-meta a, .p-empty a { color: var(--fg); }
.p-filter { display: flex; gap: 4px; margin-top: 28px; }
.p-filter button { background: none; border: 0; padding: 6px 11px; border-radius: 999px; color: var(--muted); cursor: pointer; transition: background .2s, color .2s; }
.p-filter button:hover { color: var(--fg); }
.p-filter button.on { background: rgba(var(--ink),.08); color: var(--fg); }
.p-list { list-style: none; margin: 32px 0 0; padding: 0; display: grid; gap: 14px; }
.p-card { display: grid; grid-template-columns: 240px 1fr; gap: 22px; align-items: center; padding: 12px; border-radius: 18px;
  border: 1px solid transparent; transition: background .25s, border-color .25s, opacity .5s var(--ease), transform .5s var(--ease); opacity: 0; transform: translateY(6px); }
.p-card.in { opacity: 1; transform: none; }
.p-card:hover { background: rgba(var(--ink),.03); border-color: var(--line); }
.p-thumb { display: block; position: relative; aspect-ratio: 1200 / 630; border-radius: 12px; overflow: hidden; background: rgba(var(--ink),.04); }
.p-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: 0; transition: opacity .6s var(--ease), transform .8s var(--ease); }
.p-thumb img.ok { opacity: 1; }
.p-thumb img.ref { opacity: .35; filter: blur(2px); }
a.p-thumb:hover img { transform: scale(1.04); }
.p-thumb.empty span { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-size: 12px; }
.p-row { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; }
.p-status { display: inline-flex; align-items: center; gap: 6px; color: var(--fg); }
.p-status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--muted); }
.s-woven::before { background: #7ee2a8; } .s-weaving::before { background: #9ad0ff; box-shadow: 0 0 8px #9ad0ff; animation: pulse 1.6s infinite; }
.s-pending::before { background: rgba(var(--ink),.5); } .s-rejected, .s-withdrawn { color: var(--muted); } .s-rejected::before, .s-withdrawn::before { background: rgba(var(--ink),.18); }
@keyframes pulse { 50% { opacity: .35; } }
.p-text { margin: 8px 0 12px; font-size: 16px; line-height: 1.45; letter-spacing: -.01em; word-break: break-word; }
.p-actions { display: flex; gap: 18px; font-size: 12px; }
.p-actions a, .p-actions button { color: var(--muted); text-decoration: none; background: none; border: 0; padding: 0; cursor: pointer; transition: color .2s; }
.p-actions a:hover, .p-actions button:hover { color: var(--fg); }
.p-empty { color: var(--muted); padding: 60px 0; text-align: center; }
body.page .toast { position: fixed; }
@media all {
  .profile { padding: 40px 18px 80px; }
  .p-head h1 { font-size: 30px; }
  .p-card { grid-template-columns: 1fr; gap: 12px; }
}
.page-top { pointer-events: auto; background: linear-gradient(to bottom, rgba(5,5,6,.85), rgba(5,5,6,0)); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
body.page .toast { bottom: 32px; }
a.who-link { color: inherit; text-decoration: none; } a.who-link:hover { color: var(--fg); text-decoration: underline; text-underline-offset: 2px; }
.p-title { margin: -6px 0 12px; color: var(--muted); font-size: 12px; } .p-title::before { content: "✦ "; opacity: .6; }
.s-upnext::before { background: #9ad0ff; }

/* ---------- phones: one-line header, timeline below the dock, safe areas ---------- */
.top-right > * { white-space: nowrap; }
@media all {
  .top { padding: calc(14px + env(safe-area-inset-top)) 16px 14px; gap: 10px; }
  .brand { font-size: 0; gap: 0; }            /* mark only */
  .brand-mark { width: 22px; height: 22px; }
  .top-right { gap: 12px; }
  .fuel-line { display: none; }
  #status-text { max-width: 96px; overflow: hidden; text-overflow: ellipsis; display: inline-block; vertical-align: middle; }
  .dock { bottom: calc(30px + env(safe-area-inset-bottom)); }
  .timeline { left: 16px; right: 16px; bottom: env(safe-area-inset-bottom); }
  .tl-label { display: none; }
  #live-btn { top: calc(62px + env(safe-area-inset-top)); }
}

/* =========================================================================
   Phones (≤560px): slim pill, compose sheet, overflow row, bottom sheets
   ========================================================================= */
.phone-only, .phone-tab { display: none; }
#panel-chat .chat { position: static; width: auto; display: block !important; padding: 8px 18px 16px; }
#panel-chat .chat-list { max-height: none; overflow: auto; -webkit-mask-image: none; mask-image: none; }
#panel-chat .chat-list li { font-size: 14px; text-shadow: none; }
#panel-chat #chat-form input { width: 100%; height: 44px; font-size: 16px; }
.grab { display: none; }
@media all {
  :root { --pad: 16px; --sb: env(safe-area-inset-bottom); }
  .phone-only { display: grid; }
  .phone-tab { display: inline-block; }
  body { font-size: 14px; }

  /* header: generous safe-area spacing, 44px targets */
  .top { padding: calc(10px + env(safe-area-inset-top)) var(--pad) 10px; }
  .top-right { gap: 6px; }
  .top-right > button, .top-right > .status { min-height: 44px; padding: 0 8px; display: inline-flex; align-items: center; }
  #account-btn { font-size: 14px; }

  /* caption: one quiet line, current scene only, fades out at the edge */
  .now { justify-content: center; padding: 0 8px 12px; font-size: 13px; color: rgba(var(--ink),.78);
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
  .now #now-src, .now #now-arrow, .now #next-title, .now .bar { display: none !important; }
  .now #now-title { overflow: hidden; text-overflow: clip; letter-spacing: -.005em; text-shadow: 0 1px 10px rgba(var(--shade),.55); }

  /* dock: a single slim pill — input, overflow, up-next */
  .dock { width: calc(100vw - 2 * var(--pad)); bottom: calc(26px + var(--sb)); transition: transform .6s var(--ease), opacity .6s var(--ease); }
  .cmd { position: relative; height: 52px; padding: 4px 4px 4px 20px; border-radius: 26px; gap: 2px; flex-wrap: nowrap; }
  #cmd-input { font-size: 16px; min-width: 0; }   /* 16px: no iOS zoom on focus */
  .cmd .icon { width: 44px; height: 44px; border-radius: 22px; }
  .cmd .sec, .cmd .compose-only, .cmd #ref-btn, .cmd .send { display: none !important; }
  #queue-count { top: 6px; right: 5px; }

  /* overflow: secondary actions float as a compact row above the pill */
  body.more-open .cmd .sec:not(.sep) { display: grid !important; }
  body.more-open .cmd { overflow: visible; }
  .more-row { display: none; }
  body.more-open #more-btn { background: rgba(var(--ink),.1); }
  body.more-open .dock .now { opacity: 0; }
  body.more-open .cmd .sec { position: absolute; bottom: calc(100% + 10px); background: var(--glass-strong); border: 1px solid var(--line);
    backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); animation: rise .25s var(--ease) both; }
  body.more-open .cmd #speed-btn { right: 236px; width: auto; padding: 0 14px; }
  body.more-open .cmd #skip { right: 184px; }
  body.more-open .cmd #hide-btn { right: 132px; }
  body.more-open .cmd #fullscreen-btn { right: 80px; }
  body.more-open .cmd #export-btn { right: 28px; }
  body.more-open .cmd #speed-btn { animation-delay: .00s; } body.more-open .cmd #skip { animation-delay: .02s; }
  body.more-open .cmd #hide-btn { animation-delay: .04s; } body.more-open .cmd #fullscreen-btn { animation-delay: .06s; } body.more-open .cmd #export-btn { animation-delay: .08s; }

  /* compose: the pill grows into a sheet with attach / queue·now / send */
  body.composing .veil { opacity: 1; background: linear-gradient(to bottom, transparent 35%, color-mix(in srgb, var(--bg) 62%, transparent)); transition: opacity .45s var(--ease); }   /* same hue as the page: no tint shift */
  body.composing .dock { bottom: calc(12px + var(--sb)); }
  body.composing .dock .now { display: none; }
  body.composing .cmd { height: auto; flex-wrap: wrap; padding: 14px 10px 10px 18px; border-radius: 24px; background: var(--glass-strong); row-gap: 8px; }
  body.composing #cmd-input { flex: 1 0 100%; height: 40px; }
  body.composing .cmd #ref-btn:not(.hidden), body.composing .cmd .compose-only, body.composing .cmd .send { display: grid !important; }
  body.composing .cmd .seg { display: flex !important; margin-right: auto; }
  body.composing .cmd .seg button { min-height: 36px; padding: 0 14px; }
  body.composing .cmd #more-btn, body.composing .cmd #queue-btn { display: none; }
  body.composing .cmd #ref-btn { order: 2; } body.composing .cmd .seg { order: 3; } body.composing .cmd .send { order: 4; }
  .cmd .send { background: var(--solid); color: var(--on-solid); }
  .cmd .send svg { stroke: var(--on-solid); }
  body.composing .ref-chip { order: 1; }

  /* timeline: a hairline under the pill, out of the thumb's way */
  .timeline { left: var(--pad); right: var(--pad); bottom: max(2px, calc(var(--sb) - 4px)); }
  body.composing .timeline { opacity: 0; pointer-events: none; }

  /* centred sheets (auth, fuel) become bottom sheets too */
  .sheet { place-items: end stretch; }
  .sheet-card { width: auto; border-radius: 22px 22px 0 0; padding: 26px 20px calc(22px + var(--sb)); animation: sheetUp .35s var(--ease); }
  .sheet-card input, .sheet-card button { min-height: 44px; font-size: 16px; }

  .pill#live-btn { top: calc(64px + env(safe-area-inset-top)); min-height: 40px; }
  .toast { bottom: calc(110px + var(--sb)); }
}
@keyframes sheetUp { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
/* touch: the timeline is the only scrubber, so make it a proper thumb target with a visible handle */
@media (pointer: coarse) {
  .timeline { height: 44px; }
  .tl-line { bottom: 14px; height: 3px; border-radius: 2px; background: rgba(var(--ink),.22); }
  .tl-head { bottom: 8.5px; width: 14px; height: 14px; margin-left: -7px; box-shadow: 0 0 0 4px rgba(var(--ink),.12), 0 2px 10px rgba(var(--shade),.5); }
  .timeline:not(.away) .tl-head { opacity: .8; }
  .timeline.active .tl-head { transform: scale(1.35); }
  .tl-tip { bottom: 34px; font-size: 13px; padding: 6px 10px; }
  .timeline.active .tl-tip { opacity: 1; }
}
@media (pointer: coarse) {
  .timeline { bottom: max(0px, calc(var(--sb) - 10px)); }
  .dock { bottom: calc(40px + var(--sb)); }
  body.composing .dock { bottom: calc(12px + var(--sb)); }
}
@media all {
  body.composing .cmd .send { margin-left: auto; }
  body.more-open .dock .now { visibility: hidden !important; }
}

/* style chips (composer) */
.chips { display: none; gap: 6px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.chips::-webkit-scrollbar { display: none; }
.chips button { flex: none; height: 32px; padding: 0 13px; border-radius: 16px; border: 1px solid var(--line); background: rgba(var(--ink),.04); color: var(--muted); font-size: 13px; cursor: pointer; transition: background .2s, color .2s, border-color .2s; }
.chips button.on { background: var(--solid); color: var(--on-solid); border-color: var(--solid); }
@media all {
  body.composing .chips { display: flex; order: 1; flex: 1 0 100%; margin: 0 -10px 0 -2px; padding-right: 10px; }
  body.composing #cmd-input { order: 0; }
  body.composing .dock { bottom: calc(12px + max(var(--sb), var(--kb, 0px))); }
}
.me-link { margin-left: 4px; padding: 0 10px; min-height: 44px; display: inline-flex; align-items: center; color: var(--muted); text-decoration: none; font-size: 15px; }
.me-link:hover { color: var(--fg); }


/* landscape phones: immersive full-bleed, chrome only on tap */
body.immersive .veil { opacity: 0; }
body.immersive .dock { width: min(560px, calc(100vw - 2 * max(16px, env(safe-area-inset-left)))); bottom: calc(14px + env(safe-area-inset-bottom)); }
body.immersive .top { padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
@media all { body.composing .cmd .chips { display: flex !important; flex-wrap: nowrap; } body.composing .cmd .chips button { width: auto; } }

/* ---------- sign-in ---------- */
button.google { display: flex; align-items: center; justify-content: center; gap: 10px; height: 46px; border-radius: 12px; border: 0; background: #fff; color: #111; font-weight: 500; cursor: pointer; }
.auth-or { display: flex; align-items: center; gap: 12px; color: rgba(var(--ink),.35); font-size: 11px; text-transform: uppercase; letter-spacing: .1em; margin: 14px 0; }
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.vibe.code { text-align: center; font-size: 26px; letter-spacing: .4em; font-variant-numeric: tabular-nums; height: 56px; }
.auth-row { display: flex; justify-content: space-between; margin-top: 10px; }
button.link { background: none; border: 0; padding: 8px 0; color: var(--muted); cursor: pointer; font-size: 13px; }
button.link:hover:not(:disabled) { color: var(--fg); } button.link:disabled { opacity: .5; cursor: default; }
.auth-msg { min-height: 1em; margin: 10px 0 0; color: rgba(255,200,170,.9); }
.confirm-page { display: block; min-height: 100vh; }
.confirm { width: min(360px, 90vw); text-align: center; padding: 40px 0; margin: 0 auto; min-height: calc(100vh - 300px); display: flex; flex-direction: column; justify-content: center; }
.confirm-mark { width: 40px; opacity: .9; margin-bottom: 18px; }
.confirm h1 { font-size: 24px; font-weight: 500; letter-spacing: -.02em; margin: 0 0 10px; }
.confirm .vibe { width: 100%; margin: 14px 0 10px; }
.confirm .primary { width: 100%; }

/* ---------- portrait band: ambient info in the dark space ---------- */
.amb { display: none; } .status-mini { display: none; }
@media all {
  .amb { display: block; position: fixed; inset: 0; pointer-events: none; z-index: 1; }
  .amb-top { position: absolute; left: 0; right: 0; top: calc(var(--band-top, 30vh) * .5 + 14px); transform: translateY(-50%);
    display: flex; flex-direction: column; align-items: center; gap: 9px; }
  .amb-mark { width: 26px; opacity: .55; }
  #amb-status { font-size: 11px; letter-spacing: .06em; color: rgba(var(--ink),.36); transition: opacity .35s; }
  /* pointer-events:auto so hover/click work; parent .amb stays none so the rest of the layer is hit-through */
  .amb-title { position: absolute; left: 24px; right: 24px; margin: 0 auto; width: max-content; max-width: calc(100vw - 48px); top: calc(var(--band-top, 30vh) - 34px); text-align: center;
    font-size: 13px; letter-spacing: -.005em; color: rgba(var(--ink),.5); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    transition: opacity .35s; pointer-events: auto; cursor: default; }
  /* the ambient layer replaces the header mark/status and the dock caption */
  /* corners: mark top-left; "live · N", fuel, Sign in top-right. Mark + status stay visible when idle. */
  .top { justify-content: space-between; padding-top: calc(env(safe-area-inset-top) + 8px); }
  .top .brand { font-size: 0; gap: 0; } .top .brand-mark { width: 24px; height: 24px; opacity: .6; }
  .top .status .dot { width: 5px; height: 5px; }
  #status-text { display: none; } .status-mini { display: inline; font-size: 11px; letter-spacing: .04em; color: rgba(var(--ink),.45); }
  body.idle .top.ui, body.ambient .top.ui { opacity: 1 !important; }
  body.idle .top .fuel-chip, body.idle #account-btn, body.ambient .top .fuel-chip, body.ambient #account-btn { opacity: 0; pointer-events: none; transition: opacity .6s var(--ease); }
  .top .fuel-chip, #account-btn { transition: opacity .6s var(--ease); }
  .dock .now { display: none !important; }
  /* load-in: ambient pieces arrive after the surround glow */
  .top .brand, .top .status, .amb-title { transition: opacity .9s var(--ease), transform .9s var(--ease); }
  body.intro .top .brand, body.intro .top .status, body.intro .amb-title { opacity: 0; transform: translateY(4px); }
  body.loaded .top .brand { transition-delay: 1.5s; } body.loaded .top .status { transition-delay: 1.75s; } body.loaded .amb-title { transition-delay: 2s; }
  body.loaded.settled .top .brand, body.loaded.settled .top .status, body.loaded.settled .amb-title { transition-delay: 0s; }
  /* the inset card is the band itself, not the whole screen */
  body.intro { background: var(--bg-intro); }
}

/* live captions while scrubbing */
.dock .now > * { transition: opacity .17s var(--ease); }
.dock .now.swap > * { opacity: 0; }
.now-time { color: rgba(var(--ink),.4); font-variant-numeric: tabular-nums; font-size: 11px; }
.now-time:empty { display: none; }
body.hist-cap .dock .now .bar { visibility: hidden; }
.amb-time { display: none; }
@media all {
  .amb-time { display: block; position: absolute; left: 0; right: 0; top: calc(var(--band-top, 30vh) - 18px); text-align: center;
    font-size: 11px; color: rgba(var(--ink),.32); font-variant-numeric: tabular-nums; letter-spacing: .04em; transition: opacity .35s; }
}

/* ---------- light theme (follows the OS; dark stays default) ---------- */
@media (prefers-color-scheme: light) {
  :root {
    --ink: 38,32,26;
    --shade: 120,100,80;
    --solid: #26201a;
    --on-solid: #f6f2eb;
    --bg: #f4efe7;
    --bg-deep: #f4efe7;
    --bg-intro: #fff;
    --glass: rgba(250,246,240,.55);
    --glass-strong: rgba(248,244,237,.82);
    --mark-filter: invert(1) brightness(.25) sepia(.3);
    --fg: rgba(38,32,26,.92);
    color-scheme: light;
  }
  .veil { background: linear-gradient(to bottom, rgba(244,239,231,.4), transparent 18%, transparent 70%, rgba(244,239,231,.5)); }
  .chat-list li, .now #now-title { text-shadow: none; }
}
.brand-mark, .amb-mark { filter: var(--mark-filter); }

/* Adaptive voting: hide vote/boost affordances while the queue is short (FIFO). */
#idea-list.fifo .votes, #idea-list.fifo [data-a="boost"], #idea-list.fifo .boosted { display: none; }
.idea-mode-hint { margin: 0 0 8px; font-size: 12px; opacity: .65; }
/* Non-tapestry pages (profile, confirm) scroll normally: the app shell locks html/body. */
html.page, html:has(body.page) { overflow: auto; height: auto; overscroll-behavior-y: auto; }
html.page body, body.page { overflow: visible; height: auto; min-height: 100%; touch-action: auto; }

/* ---------- offline splash ---------- */
.offline { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; pointer-events: none;
  opacity: 0; visibility: hidden; transition: opacity .9s var(--ease), visibility 0s linear .9s; background: var(--bg-deep); }
body.offline-on .offline { opacity: 1; visibility: visible; pointer-events: auto; transition: opacity .9s var(--ease), visibility 0s; }
.off-bg { position: absolute; inset: -40px; background: center/cover no-repeat; filter: blur(40px) saturate(1.1); opacity: .35; }
.off-bg::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at center, transparent, var(--bg-deep) 75%); }
.off-card { position: relative; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 24px; }
.off-mark { width: 34px; opacity: .7; filter: var(--mark-filter); margin-bottom: 8px; }
.off-title { font-size: 17px; font-weight: 500; letter-spacing: -.01em; color: var(--fg); }
.off-sub { font-size: 13px; color: var(--muted); }
body.offline-on #view { filter: blur(18px) brightness(.8); transition: filter .9s var(--ease); }
body.offline-on #intro, body.offline-on .ui, body.offline-on .amb { opacity: 0 !important; transition: opacity .5s; }

/* Next sheet: skeleton until the first canonical snapshot */
#queue-list.skeleton { min-height: 132px; border-radius: 12px; background: linear-gradient(90deg, rgba(127,127,127,.08) 25%, rgba(127,127,127,.16) 37%, rgba(127,127,127,.08) 63%); background-size: 400% 100%; animation: q-shimmer 1.4s ease infinite; }
@keyframes q-shimmer { 0% { background-position: 100% 0 } 100% { background-position: 0 0 } }
#queue-list .item.idea .meta { opacity: .7 }

/* ---------- terms note + doc pages ---------- */
.cmd-terms { margin: 0 0 6px; text-align: center; font-size: 11px; color: var(--muted); opacity: 0; max-height: 0; overflow: hidden;
  transition: opacity .25s var(--ease), max-height .25s var(--ease); pointer-events: none; }
.dock:focus-within .cmd-terms, body.composing .cmd-terms { opacity: .85; max-height: 24px; pointer-events: auto; }
.cmd-terms a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.who-guest { color: rgba(var(--ink),.45); }
.item.idea.local { opacity: .75; }
.doc-page .p-top { display: flex; justify-content: space-between; align-items: center; padding: 22px 28px; font-size: 13px; }
.doc { max-width: 640px; margin: 48px auto 96px; padding: 0 24px; line-height: 1.6; font-size: 15px; color: rgba(var(--ink),.82); }
.doc h1 { font-size: 34px; font-weight: 500; letter-spacing: -.02em; color: var(--fg); margin: 0 0 14px; }
.doc .lede { font-size: 17px; color: var(--muted); margin-bottom: 36px; }
.doc h2 { font-size: 13px; font-weight: 500; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 36px 0 8px; }
.doc ul { padding-left: 18px; } .doc li { margin: 4px 0; }
/* drop-anywhere reference overlay (desktop) */
#drop-ov { position: fixed; inset: 0; z-index: 9999; display: flex; align-items: center; justify-content: center; pointer-events: none; opacity: 0; transition: opacity .18s ease; background: color-mix(in srgb, var(--bg, #0b0b0c) 55%, transparent); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
#drop-ov.on { opacity: 1; }
#drop-ov .drop-card { position: absolute; inset: 18px; border: 1px dashed color-mix(in srgb, currentColor 35%, transparent); border-radius: 18px; display: flex; align-items: center; justify-content: center; color: var(--fg, #f2f2f2); font: 500 15px/1.2 inherit; letter-spacing: .01em; }
#drop-ov.on .drop-card span { animation: drop-in .22s ease; }
@keyframes drop-in { from { transform: translateY(4px); opacity: 0 } to { transform: none; opacity: 1 } }
.ref-chip img { width: 30px; height: 30px; }

/* ---------- donors: kept-alive ticker, shout-outs ---------- */
.kept { position: fixed; top: 20px; left: 50%; transform: translateX(-50%); z-index: 30; font-size: 11.5px; letter-spacing: .02em;
  color: var(--muted); white-space: nowrap; pointer-events: auto; transition: opacity .6s ease; }
.kept-l { opacity: .7; }
.kept a { color: rgb(var(--ink)); text-decoration: none; display: inline-block; opacity: 0; transform: translateY(3px); }
.kept a.in { animation: kept-in .6s ease forwards; }
.kept a:hover { text-decoration: underline; text-underline-offset: 3px; }
@keyframes kept-in { to { opacity: .9; transform: none; } }
body.intro .kept, body.ambient .kept { opacity: 0; }
body.idle .kept { opacity: .45; }
@media all { .kept { top: calc(46px + env(safe-area-inset-top, 0px)); font-size: 11px; } }


.donor-tabs { display: flex; gap: 14px; }
.donor-tabs button { background: none; border: 0; padding: 0; font: inherit; color: var(--muted); cursor: pointer; letter-spacing: inherit; text-transform: inherit; }
.donor-tabs button.on { color: rgb(var(--ink)); }
.donors .rank { display: inline-block; width: 18px; color: var(--muted); font-variant-numeric: tabular-nums; font-size: 11px; }
.donors .t a { color: inherit; text-decoration: none; }
.donors .t a:hover { text-decoration: underline; text-underline-offset: 3px; }
.donors .d-link { display: inline-block; margin-top: 2px; font-size: 11.5px; color: var(--muted); text-decoration: none; }
.donors .d-link:hover { color: rgb(var(--ink)); }

.p-banner { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; margin-top: 14px; font-size: 14px; }
.p-banner .pb-heart { opacity: .7; }
.p-banner .pb-kept { color: var(--muted); font-size: 12px; letter-spacing: .02em; }
.p-banner .pb-tag { color: rgb(var(--ink)); }
.p-banner .pb-link { color: var(--muted); text-decoration: none; font-size: 13px; }
.p-banner .pb-link:hover { color: rgb(var(--ink)); }
.p-banner-edit { margin-top: 16px; display: grid; gap: 8px; max-width: 460px; }
.p-banner-edit .pbe-title { font-size: 12px; color: rgb(var(--ink)); }
.p-banner-edit input { font: inherit; font-size: 14px; padding: 10px 12px; border-radius: 10px; border: 1px solid rgba(var(--ink),.14);
  background: rgba(var(--ink),.04); color: rgb(var(--ink)); outline: none; }
.p-banner-edit input:focus { border-color: rgba(var(--ink),.35); }
.p-banner-edit .pbe-row { display: flex; justify-content: space-between; align-items: center; font-size: 12px; }
.p-banner-edit button { font: inherit; font-size: 13px; padding: 7px 16px; border-radius: 999px; border: 0; background: var(--solid); color: var(--on-solid); cursor: pointer; }
.p-donate-hint { margin-top: 12px; font-size: 13px; color: var(--muted); }
.p-donate-hint a { color: rgb(var(--ink)); text-decoration: none; }
/* ---------- reactions, notices, share toast, clips (fun.js) ---------- */
.react-layer { position: fixed; right: 0; bottom: 120px; width: 280px; height: 60vh; pointer-events: none; z-index: 30; overflow: hidden; }
.react-float { position: absolute; bottom: 0; font-size: 20px; opacity: 0; animation: react-up 3s var(--ease) forwards; filter: drop-shadow(0 2px 6px rgba(0,0,0,.35)); }
.react-float.own { font-size: 24px; }
@keyframes react-up { 0% { transform: translate(0, 0) scale(.6); opacity: 0; } 12% { opacity: .9; transform: translate(0, -30px) scale(1); }
  100% { transform: translate(var(--dx, 0), var(--rise, -52vh)) scale(.9); opacity: 0; } }
.react-bar { position: fixed; right: 24px; bottom: 132px; display: flex; align-items: center; gap: 2px; padding: 3px; border-radius: 999px;
  background: var(--glass); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid var(--line); z-index: 31; opacity: .55; transition: opacity .25s var(--ease); }
.react-bar:hover, .react-bar:focus-within { opacity: 1; }
.react-bar button { background: none; border: 0; padding: 4px 6px; font-size: 16px; line-height: 1; border-radius: 999px; cursor: pointer; transition: transform .15s var(--ease); }
.react-bar button:active { transform: scale(1.25); }
.react-bar button.cool { opacity: .35; }
.react-sep { width: 1px; height: 16px; background: var(--line); margin: 0 3px; }
.react-bar .clip-btn { font-size: 11px; color: var(--muted); padding: 5px 9px; letter-spacing: .02em; }
.react-bar .clip-btn:hover { color: var(--fg); }
.chat-list li.sys { color: rgba(var(--ink),.5); font-size: 11px; font-style: italic; }
.chat-list li.sys b { font-style: normal; }
.now-remix { background: none; border: 0; padding: 0 2px; color: rgba(var(--ink),.4); font-size: 11px; cursor: pointer; flex: none; }
.now-remix:hover { color: var(--fg); }
.share-toast { position: fixed; left: 50%; top: 64px; transform: translate(-50%, -8px); opacity: 0; pointer-events: none; z-index: 70;
  display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 14px; border-radius: 999px; background: var(--glass-strong);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border: 1px solid var(--line); font-size: 12px; transition: opacity .25s var(--ease), transform .25s var(--ease); white-space: nowrap; }
.share-toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.share-toast .st-btn { background: var(--solid); color: var(--on-solid); border: 0; border-radius: 999px; padding: 5px 12px; font-size: 12px; font-weight: 500; cursor: pointer; min-width: 74px; }
.share-toast .st-btn.ok { background: rgba(var(--ink),.16); color: var(--fg); }
.share-toast .st-x { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 15px; padding: 0 6px; }
@media all {
  .react-bar { right: 10px; bottom: calc(150px + env(safe-area-inset-bottom)); opacity: .8; }
  .react-bar button { padding: 6px 7px; font-size: 18px; }
  .react-layer { width: 160px; bottom: 190px; }
}
@media (prefers-reduced-motion: reduce) { .react-float { animation-duration: 1.2s !important; } }

/* ∞ mark opens /about (the only entry point) */
.brand-link { pointer-events:auto; display:inline-flex; border-radius:6px; transition:opacity .3s var(--ease); }
.brand-link:hover { opacity:.7; }

/* ---------- odometer (live · N watching) ---------- */
.odo { letter-spacing: 0; display: inline-flex; position: relative; vertical-align: -0.1em; font-variant-numeric: tabular-nums; overflow: hidden;
  height: 1.3em; line-height: 1.3em; transition: width 450ms cubic-bezier(.2,.8,.2,1); white-space: nowrap; }
.odo-d { display: inline-block; flex: none; height: 1.3em; overflow: hidden; transition: opacity 450ms cubic-bezier(.2,.8,.2,1), transform 450ms cubic-bezier(.2,.8,.2,1);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 22%, #000 78%, transparent 100%);
          mask-image: linear-gradient(to bottom, transparent 0, #000 22%, #000 78%, transparent 100%); }
.odo-s { display: block; white-space: pre; text-align: center; line-height: 1.3em; will-change: transform; }
.odo-d.rolling .odo-s { filter: blur(.35px); }
.odo-d.enter { opacity: 0; transform: translateY(40%); }
.odo-d.leave { opacity: 0; transform: translateY(-40%); }
@media (prefers-reduced-motion: reduce) { .odo, .odo-d { transition: none !important; } .odo-d.rolling .odo-s { filter: none; } }

/* ---------- haptic wheel (phones) ---------- */
.hwheel { display: none; }
@media all {
  .hwheel { display: block; position: fixed; left: 0; right: 0; bottom: max(0px, calc(var(--sb) - 6px)); height: 40px; z-index: 22; touch-action: none;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent); mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent); }
  .hwheel canvas { width: 100%; height: 100%; display: block; }
  .timeline { display: none !important; }
  body.composing .hwheel { opacity: 0; pointer-events: none; }
  #more-btn { display: none !important; }            /* desktop controls stay off phones */
  body.more-open .cmd .sec { display: none !important; }
}

/* ---------- reactions behind one button ---------- */
.react-bar { display: none !important; }
.react-tray { position: absolute; right: 0; bottom: calc(100% + 10px); display: flex; align-items: center; gap: 2px; padding: 4px;
  border-radius: 999px; background: var(--glass-strong); border: 1px solid var(--line);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); z-index: 40;
  opacity: 0; transform: translateY(6px) scale(.98); transform-origin: 90% 100%; pointer-events: none; transition: opacity .2s var(--ease), transform .25s var(--ease); }
body.react-open .react-tray { opacity: 1; transform: none; pointer-events: auto; }
.react-tray button { background: none; border: 0; padding: 6px 7px; font-size: 18px; line-height: 1; border-radius: 999px; cursor: pointer; transition: transform .15s var(--ease); }
.react-tray button:active { transform: scale(1.25); }
.react-tray button.cool { opacity: .35; }
.react-tray .react-sep { width: 1px; height: 18px; background: var(--line); margin: 0 4px; }
.react-tray .clip-btn { font-size: 12px; color: var(--muted); padding: 6px 11px; }
#react-btn svg { fill: none; }
body.react-open #react-btn { background: rgba(var(--ink),.1); }
body.react-open .dock .now { visibility: hidden; }
@media all {
  .react-tray { right: 50%; transform: translate(50%, 6px) scale(.98); transform-origin: 50% 100%; }
  body.react-open .react-tray { transform: translate(50%, 0); }
  .react-tray button { padding: 8px 9px; font-size: 22px; }
  body.composing #react-btn { display: none !important; }
  .react-layer { width: 120px; bottom: calc(160px + var(--sb, 0px)); height: 50vh; }
}
@media all {
  .hwheel { transition: opacity .6s var(--ease); }
  body.idle .hwheel { opacity: .35; }              /* stays grabbable while the chrome rests */
  body.intro .hwheel { opacity: 0; pointer-events: none; }
}
body.react-open .cmd-terms { display: none !important; }
@media all {
  /* floats live in the quiet space between the pill and the caption, never over it */
  .react-layer { right: 0; width: 110px; bottom: calc(150px + var(--sb, 0px)); height: 130px; --rise: -120px; }
}
.wheel-label { display: none; }
@media all {
  .wheel-label { display: block; position: fixed; left: 50%; bottom: calc(44px + max(0px, var(--sb, 0px) - 6px)); z-index: 23; pointer-events: none;
    transform: translate(-50%, 4px); opacity: 0; transition: opacity .25s var(--ease), transform .3s var(--ease);
    padding: 5px 11px; border-radius: 999px; font-size: 12px; letter-spacing: -.005em; white-space: nowrap; max-width: 78vw; overflow: hidden; text-overflow: ellipsis;
    color: var(--fg); background: var(--glass-strong); border: 1px solid var(--line); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
    font-variant-numeric: tabular-nums; }
  .wheel-label.on { opacity: 1; transform: translate(-50%, 0); }
  body:has(.wheel-label.on) .dock { opacity: 0; pointer-events: none; transition: opacity .2s var(--ease); }
}



/* wide screens: same phone UI, centred and sized sensibly */
@media (min-width: 700px) {
  .dock { width: min(560px, calc(100vw - 32px)); bottom: calc(40px + var(--sb)); }   /* same clearance above the wheel as touch */
  .hwheel { left: 50%; right: auto; width: min(560px, calc(100vw - 32px)); transform: translateX(-50%); }
  .wheel-label { max-width: 50vw; }
}
.fs-btn { display: none; }
@media (pointer: fine) {
  .fs-btn { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 999px;
    background: none; color: rgba(var(--ink),.6); cursor: pointer; transition: color .2s, background .2s; }
  .fs-btn:hover { color: var(--fg); background: rgba(var(--ink),.08); }
  .fs-btn svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.6; }
  body.idle .top .fs-btn { opacity: 0; pointer-events: none; transition: opacity .6s var(--ease); }
}
/* browser fullscreen only: layout unchanged */

/* drawer: bottom sheet on phones/touch, a clean right-side panel on wide screens */
@media (max-width: 700px), (pointer: coarse) {
  /* drawer → bottom sheet with a grab handle */
  .drawer { top: auto; left: 0; right: 0; bottom: 0; width: auto; max-width: none; height: min(78vh, 680px); border-radius: 22px 22px 0 0;
    transform: translateY(105%); padding-bottom: var(--sb); }
  .drawer.open { transform: none; }
  .grab { display: block; padding: 8px 0 0; cursor: grab; touch-action: none; }
  .grab span { display: block; width: 38px; height: 5px; border-radius: 3px; background: rgba(var(--ink),.28); margin: 0 auto; }
  .drawer-head { touch-action: none; padding: 6px 10px 4px 18px; }
  .drawer-head .tabs button { min-height: 44px; font-size: 15px; }
  .drawer .list li, .drawer .item { min-height: 44px; }

  .desk-only { display: none !important; }
}
@media (min-width: 701px) and (pointer: fine) {
  .grab { display: none; }
  .drawer { top: 0; right: 0; bottom: 0; width: 380px; border-radius: 0; border: 0; border-left: 1px solid var(--line);
    background: var(--glass-strong); box-shadow: -24px 0 60px rgba(0,0,0,.18); transform: translateX(100%); transition: transform .45s var(--ease); }
  .drawer.open { transform: none; }
  .drawer-head { padding: 22px 18px 10px 24px; }
  .drawer-head .tabs { display: flex; gap: 2px; }
  .drawer-head .tabs button { font-size: 13px; padding: 6px 10px; border-radius: 999px; }
  .drawer .panel { padding: 0 6px; }
  .drawer-theme { position: absolute; right: 14px; bottom: 14px; z-index: 2; display: flex; gap: 0; padding: 2px; border-radius: 999px; border: 1px solid var(--line); background: var(--glass-strong); font-size: 11px; color: var(--muted); }
  .drawer-theme span { display: none; }
  .drawer-theme button { background: none; border: 1px solid transparent; color: var(--muted); font: inherit; padding: 3px 9px; border-radius: 999px; cursor: pointer; }
  .drawer-theme button:hover { color: var(--fg); }
  .drawer-theme button.on { color: var(--fg); border-color: var(--line); background: rgba(var(--ink),.05); }
}

@media (min-width: 701px) and (pointer: fine) {
  .top-clock { margin-left: 14px; padding-left: 14px; border-left: 1px solid var(--line); font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; letter-spacing: .01em; font-weight: 400; }
  body.idle #account-btn, body.ambient #account-btn { opacity: 1; pointer-events: auto; }   /* @handle / Sign in stays put on desktop */
}

/* Reflection: soft drifting colour blobs around the band (compositor-only motion, colours ease over 3 s) */
@property --c { syntax: "<color>"; inherits: false; initial-value: transparent; }
#amb-blobs { position: fixed; inset: 0; pointer-events: none; opacity: calc(var(--amb-a, 1) * .55); transition: opacity .9s var(--ease); }
body.intro #amb-blobs { opacity: 0; }
#amb-blobs .ab { position: absolute; left: 0; right: 0; overflow: hidden; }
#amb-blobs .ab-top { top: 0; height: var(--band-top, 30vh); -webkit-mask-image: linear-gradient(to top, #000, transparent 85%); mask-image: linear-gradient(to top, #000, transparent 85%); }
#amb-blobs .ab-bot { top: var(--band-bot, 70vh); bottom: 0; -webkit-mask-image: linear-gradient(to bottom, #000, transparent 85%); mask-image: linear-gradient(to bottom, #000, transparent 85%); }
#amb-blobs i { position: absolute; width: 55vw; height: 55vw; max-height: 160%; border-radius: 50%; will-change: transform;
  background: radial-gradient(closest-side, var(--c), transparent); transition: --c 3s ease; animation: ab-drift 38s ease-in-out infinite alternate; }
#amb-blobs .ab-top i { bottom: -40%; } #amb-blobs .ab-bot i { top: -40%; }
#amb-blobs i:nth-child(1) { left: -12vw; } #amb-blobs i:nth-child(2) { left: 22vw; animation-duration: 47s; animation-delay: -12s; } #amb-blobs i:nth-child(3) { left: 56vw; animation-duration: 42s; animation-delay: -25s; }
@keyframes ab-drift { from { transform: translate3d(-4vw, 0, 0) scale(1); } to { transform: translate3d(5vw, 3%, 0) scale(1.12); } }
@media (prefers-reduced-motion: reduce) { #amb-blobs i { animation: none; } }

/* Compose sheet: smooth morph (View Transitions), covered elements fade, no colour/layout jump */
:root { view-transition-name: none; }
.dock { view-transition-name: dock; }
::view-transition-group(dock) { animation-duration: .38s; animation-timing-function: cubic-bezier(.22, .8, .24, 1); }
::view-transition-old(dock), ::view-transition-new(dock) { height: 100%; width: 100%; object-fit: fill; animation-duration: .26s; }
.hwheel, .timeline, .veil, #react-btn, .amb-title, .amb-time { transition: opacity .32s var(--ease); }

.build-id { position: absolute; left: 18px; bottom: 14px; font-size: 10px; letter-spacing: .02em; color: var(--muted); opacity: .45; font-variant-numeric: tabular-nums; pointer-events: none; }

/* Past-live veil: only has width while the view is rubber-banded past live */
#past-veil { position: fixed; right: 0; top: var(--band-top, 30vh); height: calc(var(--band-bot, 70vh) - var(--band-top, 30vh)); width: 0; opacity: 0; pointer-events: none;
  -webkit-backdrop-filter: blur(6px) saturate(.7); backdrop-filter: blur(6px) saturate(.7); background: color-mix(in srgb, var(--bg) 45%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, #000 24px); mask-image: linear-gradient(to right, transparent, #000 24px); transition: opacity .2s; }

/* ---- Compose v2 (same on mobile + desktop): the pill grows UPWARD into a roomy sheet; nothing slides down ---- */
.cmd-terms { font-size: 10px; letter-spacing: .01em; }
body.signed-in .cmd-terms .anon-only { display: none; }
#cmd-input { resize: none; border: 0; outline: 0; background: transparent; color: inherit; font: inherit; min-width: 0; flex: 1;
  height: 40px; line-height: 40px; padding: 0; white-space: nowrap; overflow: hidden; }
body.composing .dock, body.composing.away .dock { bottom: max(calc(40px + var(--sb, 0px)), calc(12px + var(--kb, 0px))) !important; }
body.composing #cmd-input { flex: 1 0 100%; white-space: normal; overflow-y: auto; line-height: 1.45; padding: 6px 0 0;
  height: clamp(64px, calc(100vh - var(--band-bot, 70vh) - 230px - var(--kb, 0px)), 220px) !important; }
body.composing .cmd .seg { margin-right: auto; }
/* Away from live: the chat pill crossfades into "Return to live", same spot */
.dock .cmd, .dock .cmd-terms { transition: opacity .3s var(--ease), transform .3s var(--ease); }
.dock .pill#live-btn { position: absolute; top: auto; bottom: 0; left: 50%; height: 52px; padding: 0 22px; border-radius: 26px;
  transform: translate(-50%, 6px); opacity: 0; pointer-events: none; transition: opacity .3s var(--ease), transform .3s var(--ease); white-space: nowrap; }
body.away .dock .pill#live-btn { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
body.away .dock .cmd, body.away .dock .cmd-terms { opacity: 0; transform: translateY(6px); pointer-events: none; }
body.away .dock .now { opacity: 0 !important; pointer-events: none; }
/* Mobile lock: fixed layout, no zoom; only the compose sheet rides above the keyboard (transform) */
html:not(.page):not(:has(body.page)) { height: 100%; overflow: hidden; }
body:not(.page) { position: fixed; inset: 0; width: 100%; overflow: hidden; }
body, .ui, button, .dock, .top { touch-action: manipulation; pointer-events: auto; }
input, textarea, select, #cmd-input { font-size: max(16px, 1em); }
@media (max-width: 760px), (pointer: coarse) {
  input, textarea, select, #cmd-input, #chat-input, .item textarea, .p-banner-edit input { font-size: 16px !important; }
}
body.composing .dock, body.composing.away .dock { bottom: calc(40px + var(--sb, 0px)) !important;
  translate: 0 calc(-1 * max(0px, var(--kb, 0px) - 28px - var(--sb, 0px))); transition: translate .28s cubic-bezier(.2,.8,.2,1), opacity .3s, transform .3s; }
#intro { background: transparent; }
body { transition: background-color .6s var(--ease); }
/* terms: always just below the chat window, tiny, never over the ribbon */
.dock .cmd-terms, .dock:focus-within .cmd-terms, body.composing .cmd-terms { position: absolute; top: 100%; left: 0; right: 0; margin: 5px 0 0;
  max-height: none; opacity: .6; font-size: 10px; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: auto; }
body.away .dock .cmd-terms, body.intro .dock .cmd-terms { opacity: 0; pointer-events: none; }
@media (max-width: 760px), (pointer: coarse) {
  body.composing .dock, body.composing.away .dock { bottom: calc(56px + var(--sb)) !important; translate: 0 calc(-1 * max(0px, var(--kb, 0px) - 40px - var(--sb, 0px))); }
  .dock .cmd-terms, .dock:focus-within .cmd-terms, body.composing .cmd-terms { margin-top: 4px; font-size: 9px; letter-spacing: 0; }
}
/* terms only while composing; hidden when closed */
.dock .cmd-terms, .dock:focus-within .cmd-terms { opacity: 0 !important; visibility: hidden; pointer-events: none; }
body.composing:not(.away) .dock .cmd-terms { opacity: .6 !important; visibility: visible; pointer-events: auto; }
/* Layout v3 (mobile = desktop): closed pill / return pill centred between ribbon and wheel; open sheet sits low with terms beneath, wheel hidden */
.dock, body.composing .dock, body.composing.away .dock { bottom: calc(28px + var(--sb, 0px)) !important;
  --wheel-h: calc(40px + max(0px, var(--sb, 0px) - 6px));
  --centre: max(0px, calc((100dvh - var(--band-bot, 70dvh) + var(--wheel-h)) / 2 - 26px - 28px - var(--sb, 0px)));
  translate: 0 calc(-1 * var(--centre));
  transition: translate .5s cubic-bezier(.22,1,.36,1), opacity .4s var(--ease), transform .4s var(--ease) !important; }
body.composing:not(.away) .dock { translate: 0 calc(-1 * max(0px, var(--kb, 0px) - 28px - var(--sb, 0px))); }
body.composing:not(.away) .hwheel { opacity: 0; pointer-events: none; transition: opacity .3s var(--ease); }
.hwheel { transition: opacity .4s var(--ease); }
body.composing:not(.away) .dock .cmd-terms { margin-top: 10px; font-size: 10px; letter-spacing: .01em; }
body.composing:not(.away) .dock .cmd-terms { white-space: normal; text-wrap: balance; overflow: visible; }
body.composing:not(.away) .dock { translate: 0 calc(-1 * max(14px, var(--kb, 0px) - 14px - var(--sb, 0px))); }
body.composing:not(.away) .dock .cmd-terms { max-height: none !important; line-height: 1.35; }
/* ambient sound toggle (next to the clock) */
.snd-btn { display: inline-grid; place-items: center; width: 26px; height: 26px; margin-left: 8px; padding: 0; border: 0; border-radius: 50%; background: none;
  color: var(--muted); opacity: .7; cursor: pointer; vertical-align: middle; transition: opacity .3s var(--ease), background-color .3s var(--ease); touch-action: manipulation; pointer-events: auto; }
.snd-btn:hover { opacity: 1; background: rgba(var(--ink), .06); }
.snd-btn .w1, .snd-btn .w2 { opacity: 0; transition: opacity .4s var(--ease); }
.snd-btn .x { opacity: 1; transition: opacity .4s var(--ease); }
.snd-btn.on { opacity: 1; color: var(--fg); }
.snd-btn.on .w1, .snd-btn.on .w2 { opacity: 1; } .snd-btn.on .x { opacity: 0; }
.snd-btn { position: relative; z-index: 40; }
/* Idle v2 (mobile = desktop): only logo, clock and (if playing) the speaker remain */
.top-clock { margin-left: 12px; padding-left: 12px; border-left: 1px solid var(--line); font-size: 12px !important; color: var(--muted); font-variant-numeric: tabular-nums; letter-spacing: .01em; font-weight: 400; }
body.idle .top.ui, body.ambient .top.ui { opacity: 1 !important; pointer-events: none; }
body.idle .top .brand-link, body.idle .top .snd-btn.on { pointer-events: auto; }
body.idle .top .top-right, body.idle #account-btn, body.idle .top .fuel-chip, body.idle .top .fs-btn,
body.idle .hwheel, body.idle .dock, body.idle #live-btn, body.idle .amb-time,
body.idle .snd-btn:not(.on) { opacity: 0 !important; pointer-events: none !important; translate: 0 4px; }
body.idle .dock { translate: 0 calc(4px - var(--centre, 0px)); }
.top .top-right, #account-btn, .hwheel, .amb-title, .amb-time, .snd-btn { transition: opacity .5s var(--ease), translate .5s var(--ease); }
body:not(.idle) .top .top-right { transition-delay: .06s; } body:not(.idle) .amb-title, body:not(.idle) .amb-time { transition-delay: .12s; }
body:not(.idle) .dock { transition-delay: .18s; } body:not(.idle) .hwheel { transition-delay: .24s; }
/* speaker: quiet grey when on */
.snd-btn.on { color: var(--muted); opacity: .55; }
.snd-btn.on:hover { opacity: .85; }
body.idle .amb-title, body.ambient .amb-title { opacity: 1 !important; translate: none; }

/* ---------- drawer v2: quiet, minimal (same on desktop and mobile) ---------- */
.drawer-head { padding: 16px 14px 8px 20px; }
.tabs { gap: 2px; padding: 2px; border-radius: 999px; background: rgba(var(--ink),.05); }
.tabs button { padding: 5px 11px; border: 0; border-radius: 999px; font-size: 12px; font-weight: 450; letter-spacing: .01em; color: rgba(var(--ink),.45); transition: color .2s, background-color .2s; }
.tabs button:hover { color: rgba(var(--ink),.75); }
.tabs button.on { color: var(--fg); background: rgba(var(--ink),.09); border: 0; }
.card.current { margin: 8px 14px 4px; padding: 14px 16px; border-radius: 14px; background: rgba(var(--ink),.045); }
.card .k { display: flex; gap: 8px; font-size: 10px; letter-spacing: .12em; color: rgba(var(--ink),.38); }
.card .k .src { text-transform: none; letter-spacing: .01em; color: rgba(var(--ink),.38); }
.card .k .src:not(:empty)::before { content: "·"; margin-right: 8px; }
.card .t { font-size: 15px; font-weight: 450; letter-spacing: -.005em; margin: 6px 0 4px; }
.card .p { font-size: 12px; line-height: 1.5; color: rgba(var(--ink),.5); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
#queue-list { padding: 4px 14px; }
#queue-list .item { grid-template-columns: 22px 1fr; gap: 6px; padding: 11px 2px; border-radius: 0; cursor: default; opacity: 1; border-bottom: 1px solid rgba(var(--ink),.05); }
#queue-list .item:last-child { border-bottom: 0; }
#queue-list .item:hover { background: none; }
#queue-list .item .n { cursor: default; font-size: 11px; color: rgba(var(--ink),.28); padding-top: 1px; }
#queue-list .item .t { font-size: 13px; font-weight: 400; font-style: normal; letter-spacing: -.003em; color: rgba(var(--ink),.88); }
#queue-list .item.auto .t::before, #queue-list .item.user .t::after { content: none; }
#queue-list .item .meta { font-size: 11px; margin-top: 2px; color: rgba(var(--ink),.36); }
#queue-list .item .acts, #queue-list .item .p { display: none; }

/* live · N: identical line boxes so the odometer digit sits on the text baseline */
.status-mini, #status-text { display: inline-flex; align-items: flex-start; line-height: 1.3em; }
.status-mini > span, #status-text > span { line-height: 1.3em; white-space: pre; }
.status-mini .odo, #status-text .odo { vertical-align: 0; }

/* Google-only sign-in */
#auth-form, #auth-or, #auth-code-form { display: none !important; }

/* ================= UI audit v1 (mobile = desktop) =================
   spacing scale 4 · 8 · 12 · 16 · 24 · 32   type scale 10 · 11 · 12 · 14 */
:root { --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px;
  --t-xs: 10px; --t-sm: 11px; --t-md: 12px; --t-lg: 14px;
  --top-h: calc(env(safe-area-inset-top) + 48px); --edge: var(--s5); }
@media (max-width: 760px) { :root { --edge: var(--s4); } }

/* top bar: one row, one height, shared edge inset, no wrapping */
.top, body.immersive .top { height: var(--top-h); box-sizing: border-box; padding: env(safe-area-inset-top) var(--edge) 0 !important; gap: var(--s3); align-items: center; }
.top .brand { display: flex; align-items: center; white-space: nowrap; min-width: 0; }
.top-clock { margin-left: var(--s3); padding-left: var(--s3); font-size: var(--t-md) !important; white-space: nowrap; line-height: 16px; }
.snd-btn { margin-left: var(--s2); }
.top-right { gap: var(--s3) !important; min-width: 0; }
.top-right > button, .top-right > .status { min-height: 32px !important; padding: 0 !important; }
.top-right, .top-right .status, .top-right .fuel-chip, #account-btn { font-size: var(--t-md) !important; line-height: 16px; }
.top .status { gap: 6px; }
/* dedupe "live · N": the compact status-mini is the only one shown */
#status-text { display: none !important; }
.status-mini { display: inline-flex !important; font-size: var(--t-md) !important; color: var(--muted) !important; letter-spacing: .01em !important; }
@media (max-width: 420px) { .top-right .fuel-chip #fuel-text, .top-clock { font-size: var(--t-sm) !important; } .fuel-line { width: 28px; } .top-right { gap: var(--s2) !important; } }

/* title: one size, one tone */
.amb-title { font-size: 13px; color: rgba(var(--ink),.55); letter-spacing: 0; }

/* ---- notifications: ONE home for every toast — centred in the gap between the top bar and the title ---- */
.toast, body.page .toast, .share-toast {
  position: fixed !important; left: 50% !important; right: auto !important; bottom: auto !important; z-index: 70;
  top: max(calc(var(--top-h) + var(--s1)), calc((var(--top-h) + var(--band-top, 30vh) - 34px) / 2 - 16px)) !important;
  height: 32px; box-sizing: border-box; display: flex; align-items: center; gap: var(--s2);
  max-width: min(520px, calc(100vw - 2 * var(--edge))); padding: 0 var(--s3) !important; border-radius: 999px !important;
  background: var(--glass-strong) !important; border: 1px solid var(--line) !important;
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  font-size: var(--t-md) !important; line-height: 16px; color: var(--fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  opacity: 0; transform: translate(-50%, -6px) !important; pointer-events: none;
  transition: opacity .28s var(--ease), transform .28s var(--ease) !important; }
.toast.show, .share-toast.show { opacity: 1; transform: translate(-50%, 0) !important; }
.share-toast.show { pointer-events: auto; }
.share-toast { padding-right: var(--s1) !important; }
.share-toast .st-btn { height: 24px; padding: 0 var(--s3); font-size: var(--t-sm); min-width: 0; }
.share-toast .st-x { padding: 0 var(--s1); }
/* one at a time: share > toast */
body:has(.share-toast.show) .toast { opacity: 0 !important; pointer-events: none !important; }
/* short screens: the title steps aside while a notification is up, so nothing overlaps */
@media (max-height: 760px) {
  body:has(.toast.show) .amb-title, body:has(.share-toast.show) .amb-title { opacity: 0 !important; }
}

/* ---- composer: even inset on every side ---- */
.cmd { padding: var(--s1) var(--s1) var(--s1) var(--s4) !important; }
body.composing:not(.away) .cmd { padding: var(--s3) !important; row-gap: var(--s3) !important; gap: var(--s2) !important; border-radius: 24px !important; }
body.composing:not(.away) #cmd-input { padding: 0 var(--s3) !important; }
body.composing:not(.away) .cmd .icon, body.composing:not(.away) .cmd .send { width: 40px !important; height: 40px !important; border-radius: 20px !important; }
body.composing:not(.away) .cmd .seg button { min-height: 32px; }
body.composing:not(.away) .ref-chip { margin-left: var(--s2); }
body.composing:not(.away) .dock .cmd-terms { margin-top: var(--s2) !important; font-size: var(--t-xs) !important; }

/* drawer: same rhythm */
.drawer-head { padding: var(--s4) var(--s3) var(--s2) var(--s4) !important; }
.drawer-foot { padding: var(--s3) var(--s4) var(--s4) !important; gap: var(--s3) !important; }
.drawer-sub { padding: var(--s4) var(--s4) var(--s1) !important; }
.card.current { margin: var(--s2) var(--s3) var(--s1) !important; }
#queue-list { padding: var(--s1) var(--s3) !important; }
.empty { padding: var(--s4) !important; }

/* ===== split: composer = text + image + send; reactions by the scene; queue in the top bar ===== */
.cmd #react-btn, .cmd #queue-btn { display: none !important; }
body:not(.composing) .cmd #ref-btn:not(.hidden) { display: grid !important; width: 40px; height: 40px; border-radius: 20px; }
body:not(.composing) .cmd .send { display: grid !important; width: 40px; height: 40px; border-radius: 20px; }
/* reaction row: a small glass pill just under the title, over the top edge of the scene */
.react-tray, body.react-open .react-tray { position: fixed !important; left: 50% !important; right: auto !important; bottom: auto !important;
  top: calc(var(--band-top, 30vh) + var(--s3)) !important; z-index: 35; padding: 2px !important; gap: 0 !important;
  transform: translate(-50%, -4px) !important; transform-origin: 50% 0 !important; }
.react-tray { opacity: 0; pointer-events: none; transition: opacity .3s var(--ease), transform .3s var(--ease) !important; }
body.react-open .react-tray { opacity: 1; pointer-events: auto; transform: translate(-50%, 0) !important; }
.react-tray button { padding: 6px 7px !important; font-size: 18px !important; }
.react-tray .clip-btn { font-size: var(--t-sm) !important; padding: 6px 10px !important; }
body.idle .react-tray, body.ambient .react-tray, body.composing .react-tray, body.intro .react-tray, body.away .react-tray { opacity: 0 !important; pointer-events: none !important; }
body.react-open .dock .now { visibility: visible; }
body.react-open .cmd-terms { display: revert !important; }
/* floats rise from the right edge of the scene */
.react-layer { top: auto !important; bottom: calc(100vh - var(--band-bot, 70vh)) !important; height: calc(var(--band-bot, 70vh) - var(--band-top, 30vh)) !important; right: 0; }
/* "up next" in the top bar */
.upnext-btn { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 !important; border: 0; background: none; cursor: pointer;
  color: var(--muted); font: inherit; font-size: var(--t-md) !important; line-height: 16px; letter-spacing: .01em; white-space: nowrap; transition: color .2s, opacity .5s var(--ease); }
.upnext-btn:hover { color: var(--fg); }
.upnext-n { font-variant-numeric: tabular-nums; color: rgba(var(--ink),.38); }
.upnext-n:empty, .upnext-n[data-z] { display: none; }
body.idle .upnext-btn, body.ambient .upnext-btn { opacity: 0 !important; pointer-events: none !important; }
@media (max-width: 420px) { .upnext-btn { font-size: var(--t-sm) !important; } }

/* ===== top bar v2: left = logo · clock · sound; right = live · N + panel icon. No reactions. ===== */
.react-tray, .react-layer, .react-bar, #react-btn { display: none !important; }
.top-right { gap: var(--s3) !important; }
.panel-btn { position: relative; display: inline-grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 999px;
  background: none; color: var(--muted); cursor: pointer; transition: color .2s, background-color .2s, opacity .5s var(--ease), translate .5s var(--ease); }
.panel-btn:hover { color: var(--fg); background: rgba(var(--ink),.06); }
.panel-n { position: absolute; top: 3px; right: 1px; min-width: 13px; height: 13px; padding: 0 3px; box-sizing: border-box; border-radius: 7px;
  font-size: 9px; line-height: 13px; font-weight: 600; text-align: center; font-variant-numeric: tabular-nums;
  background: rgba(var(--ink),.16); color: var(--fg); }
.panel-n:empty { display: none; }
body.idle .panel-btn, body.ambient .panel-btn, body.idle .top .status, body.ambient .top .status { opacity: 0 !important; pointer-events: none !important; }
.top .status { transition: opacity .5s var(--ease); }

/* drawer footer bar: fuel · clip · fullscreen · theme */
.drawer-bar { display: flex; align-items: center; gap: var(--s2); padding: var(--s3) var(--s4); border-top: 1px solid var(--line);
  padding-bottom: calc(var(--s3) + env(safe-area-inset-bottom)); flex: none; }
.drawer-bar .fuel-chip { display: inline-flex !important; opacity: 1 !important; pointer-events: auto !important; font-size: var(--t-md); gap: var(--s2); margin-right: auto; }
.drawer-bar .fuel-chip.hidden { visibility: hidden; }
.bar-btn, .drawer-bar .fs-btn { display: inline-grid !important; place-items: center; height: 28px; min-width: 28px; padding: 0 var(--s2); border: 0; border-radius: 999px;
  background: none; color: var(--muted); font: inherit; font-size: var(--t-md); cursor: pointer; opacity: 1 !important; pointer-events: auto !important; translate: none !important; }
.bar-btn:hover { color: var(--fg); background: rgba(var(--ink),.06); }
.drawer-bar .fs-btn svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.drawer-bar .drawer-theme { display: inline-flex !important; gap: 2px; padding: 2px; margin: 0; border-radius: 999px; background: rgba(var(--ink),.05); position: static; border: 0; }
.drawer-bar .drawer-theme button { border: 0; background: none; padding: 4px 9px; border-radius: 999px; font-size: var(--t-sm); color: rgba(var(--ink),.45); cursor: pointer; }
.drawer-bar .drawer-theme button.on { background: rgba(var(--ink),.1); color: var(--fg); }
/* You tab */
.you-row { display: flex; align-items: center; justify-content: space-between; padding: var(--s4); border-bottom: 1px solid var(--line); font-size: var(--t-md); }
#panel-you #account-btn { font-size: var(--t-md) !important; color: var(--fg); padding: 0; opacity: 1 !important; pointer-events: auto !important; }

/* ===== sheets v2: compact centred card; bottom sheet on narrow screens ===== */
.sheet { padding: var(--s4); box-sizing: border-box; }
.sheet-card, .sleep-card { width: min(360px, 100%) !important; max-width: 360px !important; box-sizing: border-box; padding: var(--s5) !important; border-radius: 20px !important;
  background: var(--glass-strong) !important; border: 1px solid var(--line) !important; display: flex; flex-direction: column; gap: var(--s3); }
.sheet-card > *, .sleep-card > * { margin: 0 !important; }
.sheet-title, .sleep-title { font-size: 16px !important; font-weight: 500; letter-spacing: -.01em; color: var(--fg); margin: 0 !important; }
.sheet-sub, .sheet-card .fine, .sleep-card p { font-size: var(--t-md) !important; line-height: 1.5; color: var(--muted) !important; margin: 0 !important; }
.sheet-sub:empty, .auth-msg:empty { display: none; }
.sheet-card form:not(.hidden) { display: flex; flex-direction: column; gap: var(--s2); margin: 0; }
#handle-form:not(.hidden) { flex-direction: row; }
#handle-form .vibe { flex: 1; min-width: 0; }
.sheet-card .vibe { height: 40px; box-sizing: border-box; padding: 0 var(--s3); border-radius: 12px; font-size: var(--t-lg); margin: 0; }
.sheet-card .primary, .sleep-card .primary { height: 40px; padding: 0 var(--s4); border-radius: 12px; font-size: var(--t-md); width: auto; }
.sheet-card .google { height: 40px; border-radius: 12px; font-size: var(--t-md); }
.sheet-card .ghost { margin: 0; height: 36px; border-radius: 12px; }
@media (max-width: 560px) {
  .sheet { place-items: end center !important; padding: 0 var(--s2) calc(var(--s2) + env(safe-area-inset-bottom)) !important; }
  .sheet-card { width: 100% !important; max-width: none !important; border-radius: 20px !important; padding: var(--s5) var(--s4) var(--s4) !important; }
}
/* drawer panels: one inset */
.drawer .pad, .drawer .fine.pad { padding: 0 var(--s4) !important; margin: var(--s3) 0 0 !important; font-size: var(--t-sm); }
.drawer .pad-x { margin: var(--s3) var(--s4) 0 !important; width: auto !important; }
.drawer .tiers { padding: 0 var(--s4); gap: var(--s2); margin-top: var(--s3); }
.fuel-big { padding: var(--s4) var(--s4) 0 !important; }

/* ===== screensaver: body.saver (fullscreen) — only a soft clock + title, centred at the top, above the ribbon ===== */
body.saver .top .brand-link, body.saver .snd-btn:not(.on), body.saver .hwheel, body.saver .top-right, body.saver .dock, body.saver .amb-time,
body.saver .toast, body.saver .share-toast, body.saver #live-btn { opacity: 0 !important; pointer-events: none !important; }
body.saver .snd-btn.on { opacity: .3 !important; }
body.saver { cursor: none; }
body.saver .top-clock { position: fixed; left: 0; right: 0; margin: 0 auto; padding: 0; border: 0; width: max-content; text-align: center;
  top: max(var(--s4), calc(var(--band-top, 30vh) - 34px - 64px)); font-size: 44px !important; font-weight: 200; letter-spacing: -.02em; line-height: 1;
  color: rgba(var(--ink),.5); }
body.saver .amb-title { opacity: 1 !important; color: rgba(var(--ink),.38); font-size: var(--t-md); letter-spacing: .02em; translate: none; }
.drawer .build-id { bottom: calc(52px + env(safe-area-inset-bottom)) !important; left: var(--s4) !important; }
.sheet { z-index: 90 !important; }
@media (min-width: 561px) { .sheet { place-items: center !important; } }
body:has(.drawer.open) .hwheel { opacity: 0 !important; pointer-events: none !important; }

/* ===== drawer v3 ===== */
.top-fs { display: inline-grid !important; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 999px; background: none; color: var(--muted); cursor: pointer;
  transition: color .2s, background-color .2s, opacity .5s var(--ease) !important; }
.top-fs:hover { color: var(--fg); background: rgba(var(--ink),.06); }
.top-fs svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.6; }
body.idle .top-fs, body.ambient .top-fs { opacity: 0 !important; pointer-events: none !important; }
/* collapsed rows: title + source; tap to expand */
#queue-list .item, #idea-list .item, #current-card { cursor: pointer; }
#current-card .p, #queue-list .item .p, #idea-list .item .acts { display: none !important; }
#current-card.open .p { display: -webkit-box !important; -webkit-line-clamp: unset; }
#queue-list .item.open .p { display: block !important; margin-top: var(--s1); font-size: var(--t-sm); line-height: 1.5; color: var(--muted); -webkit-line-clamp: unset; }
#idea-list .item .t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#idea-list .item.open .t { white-space: normal; }
#idea-list .item.open .acts { display: flex !important; }
#idea-list .item .thumb { display: none; } #idea-list .item.open .thumb { display: block; }
#current-card .t { margin-bottom: 0; }
#panel-next .drawer-sub { padding-top: var(--s5) !important; }
/* fuel chart */
.fuel-chart { display: block; width: calc(100% - 2 * var(--s4)); height: 120px; margin: var(--s4) var(--s4) 0; color: var(--fg); }
/* footer: build label sits on its own line above the bar */
.drawer .build-id { position: static !important; padding: 0 var(--s4) var(--s1); order: 98; flex: none; }
.drawer-bar { order: 99; }
#panel-next .empty { padding: var(--s2) var(--s4) !important; font-size: var(--t-md); }

/* ===== queue sort + hearts + credit tooltips ===== */
.qsort { display: flex; margin: 0 var(--s4) var(--s3); }
.qsort button { flex: 1; }
#panel-next:not([data-sort="up"]) #current-card, #panel-next:not([data-sort="up"]) #queue-list,
#panel-next:not([data-sort="up"]) #queue-more, #panel-next:not([data-sort="up"]) #queue-empty,
#panel-next[data-sort="up"] #idea-list, #panel-next[data-sort="up"] #idea-empty { display: none !important; }
#queue-list .item, #queue-more .item, #idea-list .item { display: grid; grid-template-columns: auto 1fr auto; align-items: start; }
#queue-more .item .t, #idea-list .item .t, #queue-list .item .t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#queue-more .item.open .t, #idea-list .item.open .t, #queue-list .item.open .t { white-space: normal; }
#queue-more .item .p, #idea-list .item .p { display: none; margin-top: var(--s1); font-size: var(--t-sm); }
#queue-more .item.open .p, #idea-list .item.open .p { display: block; }
.open-s, .linkish { color: var(--muted); text-decoration: none; background: none; border: 0; padding: 0; font: inherit; cursor: pointer; margin-right: var(--s3); }
.open-s:hover, .linkish:hover { color: var(--fg); }
.heart { display: inline-flex; align-items: center; gap: 4px; border: 0; background: none; padding: 2px 0 2px 8px; color: rgba(var(--ink),.35);
  font-size: 11px; font-variant-numeric: tabular-nums; cursor: pointer; min-height: 24px; }
.heart svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.4; }
.heart:hover { color: var(--fg); }
.heart.on { color: var(--fg); } .heart.on svg { fill: currentColor; }
.q-more { display: block; margin: var(--s2) auto var(--s4); border: 0; background: none; color: var(--muted); font-size: var(--t-sm); cursor: pointer; }
.q-more:hover { color: var(--fg); }
#idea-list .item .n, #queue-more .item .n { cursor: default; }
[data-tip] { position: relative; }
/* overflow:hidden on .amb-title / queue .t clips ::after tips — open the box while the tip is shown */
.amb-title[data-tip]:hover, .amb-title[data-tip].tip-on,
#queue-list .item .t[data-tip]:hover, #queue-more .item .t[data-tip]:hover, #idea-list .item .t[data-tip]:hover,
#queue-list .item .t[data-tip].tip-on, #queue-more .item .t[data-tip].tip-on, #idea-list .item .t[data-tip].tip-on {
  overflow: visible;
}
@media (hover: hover) {
  [data-tip]:hover::after { content: attr(data-tip); position: absolute; left: 0; bottom: calc(100% + 6px); white-space: nowrap; pointer-events: none;
    background: var(--glass-strong, rgba(20,20,20,.85)); color: var(--fg); border: 1px solid var(--line); border-radius: 8px; padding: 3px 8px;
    font-size: 11px; font-weight: 400; letter-spacing: 0; z-index: 5; backdrop-filter: blur(8px); }
}
[data-tip].tip-on::after { content: attr(data-tip); position: absolute; left: 0; bottom: calc(100% + 6px); white-space: nowrap; pointer-events: none;
  background: var(--glass-strong, rgba(20,20,20,.85)); color: var(--fg); border: 1px solid var(--line); border-radius: 8px; padding: 3px 8px; font-size: 11px; z-index: 5; }
#now-title[data-href], #amb-title[data-href] { cursor: pointer; }
#amb-title[data-tip]:hover::after, #amb-title[data-tip].tip-on::after {
  left: 50%; transform: translateX(-50%); bottom: calc(100% + 8px); z-index: 6;
}
/* Queue tips sit below the row so a scrollable .list does not clip them upward */
#queue-list .item .t[data-tip]:hover::after, #queue-more .item .t[data-tip]:hover::after, #idea-list .item .t[data-tip]:hover::after,
#queue-list .item .t[data-tip].tip-on::after, #queue-more .item .t[data-tip].tip-on::after, #idea-list .item .t[data-tip].tip-on::after {
  bottom: auto; top: calc(100% + 4px); left: 0; transform: none; z-index: 6;
}
/* Layering: the drawer is its own stacking layer above the ambient layer (.amb, z 1) and the wheel (22-23),
   below share toasts (70) and sheets (90). Without it the drawer sat at z auto, under .amb's title. */
.drawer { z-index: 50; }
/* the on-stage title steps aside while the drawer is open (no hover/click through it either) */
body:has(.drawer.open) .amb-title { opacity: 0 !important; pointer-events: none !important; }

/* sign-in nudge: the one notification spot, placed just above the chat box */
.toast.nudge { top: var(--nudge-top, auto) !important; pointer-events: auto; height: auto; min-height: 36px; padding: 4px 4px 4px var(--s3) !important;
  white-space: normal; border-radius: 18px !important; width: max-content; max-width: calc(100vw - 2 * var(--edge, 16px)) !important; }
.toast.nudge span { flex: 1; min-width: 0; } .toast.nudge button { flex-shrink: 0; }
.toast.nudge button { font: inherit; font-size: var(--t-md); border: 0; border-radius: 999px; padding: 4px 12px; cursor: pointer; color: var(--fg); background: rgba(var(--ink), .12); }
.toast.nudge #nudge-x { background: none; padding: 4px 8px; color: var(--muted); }
body.saver .toast.nudge, body.ambient .toast.nudge { display: none; }

/* the on-stage title is absolutely centred; [data-tip] (position:relative, same specificity, later) used to win
   and shift it right by its left inset (and drop it out of place on desktop). */
#amb-title, #amb-title[data-tip] { position: absolute; left: 0; right: 0; margin: 0 auto; padding: 0 4px; box-sizing: border-box; width: max-content; max-width: calc(100% - 48px); }  /* hit-box hugs the text: a full-width strip slid under the pointer as the band moved */
/* GPU off / replay: a calm dim dot, never "reconnecting" */
.status.replaying .dot { background: rgba(var(--ink), .35); box-shadow: none; }
/* shared footer theme toggle (theme.js fills [data-theme-toggle]) */
.theme-toggle { display:inline-flex; gap:2px; padding:2px; border-radius:999px; box-shadow:inset 0 0 0 1px var(--line); }
.theme-toggle button { all:unset; cursor:pointer; padding:4px 10px; border-radius:999px; font-size:12px; color:rgba(var(--ink),.55); }
.theme-toggle button[aria-pressed="true"] { background:rgba(var(--ink),.08); color:var(--fg); }
