/* Huddle — ArrowEye/Kardinal design tokens, with a user-selectable theme switcher */
:root, [data-theme="kardinal"] {
  --bg:#05080d; --bg2:#0a111b; --bg3:#0f1826; --card:rgba(255,255,255,.045); --card2:rgba(255,255,255,.07); --line:rgba(255,255,255,.1);
  --text:#eef2f6; --muted:#9aa7b4; --accent:#ed462f; --accent2:#ff7a5c; --deep:#d9341c; --gold:#d8b46a; --blue:#5aa9ff; --green:#3fd07a;
  --me:linear-gradient(135deg,#ed462f,#d9341c); --me-text:#fff; --glow:rgba(237,70,47,.35);
  --font:"Manrope",system-ui,-apple-system,Segoe UI,Roboto,sans-serif; --head:"Space Grotesk",var(--font); --mono:"JetBrains Mono",ui-monospace,Menlo,monospace;
  color-scheme: dark;
}
[data-theme="midnight"] { --bg:#04070f; --bg2:#081125; --bg3:#0c1a33; --accent:#5aa9ff; --accent2:#8cc4ff; --deep:#2f7fe0; --me:linear-gradient(135deg,#3d8ef0,#2563c9); --glow:rgba(90,169,255,.35); }
[data-theme="gold"] { --bg:#07070a; --bg2:#100f12; --bg3:#18161b; --accent:#d8b46a; --accent2:#f0d595; --deep:#b8913f; --me:linear-gradient(135deg,#e2bf74,#b8913f); --me-text:#120e05; --glow:rgba(216,180,106,.35); }
[data-theme="emerald"] { --bg:#040a08; --bg2:#08130f; --bg3:#0d1c16; --accent:#3fd07a; --accent2:#7ee3a6; --deep:#23a65a; --me:linear-gradient(135deg,#3fd07a,#1f9a52); --me-text:#03130a; --glow:rgba(63,208,122,.3); }
[data-theme="paper"] { --bg:#f4f0e6; --bg2:#ebe5d6; --bg3:#e2dac8; --card:rgba(0,0,0,.04); --card2:rgba(0,0,0,.07); --line:rgba(0,0,0,.12); --text:#16130d; --muted:#615a4c; --accent:#d9341c; --accent2:#ed462f; --deep:#b02810; --me:linear-gradient(135deg,#ed462f,#c42c14); --glow:rgba(217,52,28,.25); color-scheme: light; }

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { background: var(--bg); color: var(--text); font: 15px/1.5 var(--font); -webkit-font-smoothing: antialiased; overflow: hidden; overscroll-behavior: none; }
[hidden] { display: none !important; }
button { font: inherit; color: inherit; cursor: pointer; }
input, textarea { font: inherit; color: inherit; }
a { color: var(--accent2); }
kbd { font: 11px var(--mono); padding: 1px 6px; border: 1px solid var(--line); border-radius: 6px; color: var(--muted); }
#bg { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; opacity: .55; pointer-events: none; }

.mark { width: 34px; height: 34px; border-radius: 10px; display: inline-grid; place-items: center; background: var(--me); box-shadow: 0 0 24px var(--glow); position: relative; flex: none; }
.mark::after { content: "H"; font: 700 18px var(--head); color: var(--me-text); }
.mark.xl { width: 72px; height: 72px; border-radius: 20px; } .mark.xl::after { font-size: 38px; }

.btn { border: 1px solid var(--line); background: var(--card2); border-radius: 12px; padding: 10px 16px; font-weight: 600; transition: transform .12s, background .2s, box-shadow .2s; }
.btn:hover { background: var(--card); } .btn:active { transform: scale(.97); }
.btn.primary { background: var(--me); color: var(--me-text); border-color: transparent; box-shadow: 0 6px 24px var(--glow); }
.btn.ghost { background: transparent; }
.btn.ok { background: var(--green); color: #031208; border: 0; }
.btn.danger { background: #e5484d; color: #fff; border: 0; }
.btn.sm { padding: 6px 12px; font-size: 13px; border-radius: 10px; }
.icon { background: transparent; border: 0; width: 40px; height: 40px; border-radius: 12px; display: inline-grid; place-items: center; font-size: 18px; position: relative; transition: background .2s; flex: none; }
.icon:hover { background: var(--card2); } .icon.sm { width: 28px; height: 28px; font-size: 13px; }
.icon.on { background: var(--card2); box-shadow: inset 0 0 0 1px var(--accent); }
.pill { border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 7px 12px; font-size: 13px; font-weight: 600; }
.pill:hover { border-color: var(--accent); }
.dot { position: absolute; top: 6px; right: 6px; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent); }

/* login */
.screen { position: fixed; inset: 0; display: grid; place-items: center; z-index: 2; padding: 20px; }
.login-card { width: min(420px, 100%); background: color-mix(in srgb, var(--bg2) 88%, transparent); border: 1px solid var(--line); border-radius: 24px; padding: 32px; backdrop-filter: blur(18px); box-shadow: 0 30px 80px rgba(0,0,0,.45); animation: rise .5s ease; }
.brand-big { display: flex; gap: 14px; align-items: center; margin-bottom: 26px; }
.brand-big h1 { font: 700 30px var(--head); margin: 0; letter-spacing: -.02em; } .brand-big p { margin: 0; color: var(--muted); font-size: 13px; }
.login-card form { display: grid; gap: 10px; }
.login-card label { font-size: 13px; color: var(--muted); }
.login-card input { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 13px 14px; outline: none; }
.login-card input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--glow); }
#code { font: 600 26px var(--mono); letter-spacing: .5em; text-align: center; }
.err { color: #ff8a80; min-height: 1.2em; font-size: 14px; margin: 12px 0 0; }
.fine { color: var(--muted); font-size: 12px; margin: 6px 0 0; }

/* shell */
#shell { position: fixed; inset: 0; display: grid; grid-template-columns: 300px 1fr; z-index: 1; }
#side { background: color-mix(in srgb, var(--bg2) 92%, transparent); border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; padding: max(14px, env(safe-area-inset-top)) 12px max(12px, env(safe-area-inset-bottom)); gap: 10px; backdrop-filter: blur(20px); }
.side-top { display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; gap: 10px; align-items: center; } .brand b { font: 700 18px var(--head); display: block; line-height: 1.1; } .brand small { color: var(--muted); font-size: 12px; }
#b-close-side { display: none; }
#people { display: grid; gap: 6px; }
.person { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); }
.person .who { min-width: 0; flex: 1; } .person b { font-size: 14px; display: block; } .person small { color: var(--muted); font-size: 12px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font: 700 14px var(--head); color: #05080d; position: relative; flex: none; }
.avatar.xl { width: 96px; height: 96px; font-size: 36px; }
.avatar .st { position: absolute; right: -1px; bottom: -1px; width: 11px; height: 11px; border-radius: 50%; border: 2px solid var(--bg2); background: #59616b; }
.avatar .st.on { background: var(--green); box-shadow: 0 0 8px var(--green); }
.avatar .st.away { background: var(--gold); }
.avatar.ai { background: var(--me); color: var(--me-text); }
.search-btn { display: flex; justify-content: space-between; align-items: center; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 9px 12px; color: var(--muted); font-size: 13px; }
#rooms { flex: 1; overflow-y: auto; min-height: 0; margin: 0 -4px; padding: 0 4px; }
.sec { font: 600 11px var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: .12em; margin: 12px 8px 4px; }
.room { display: flex; gap: 10px; align-items: center; width: 100%; border: 0; background: transparent; padding: 9px 10px; border-radius: 12px; text-align: left; transition: background .15s; }
.room:hover { background: var(--card); } .room.active { background: var(--card2); box-shadow: inset 3px 0 0 var(--accent); }
.room .ri { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--card2); font-size: 15px; flex: none; }
.room .rt { flex: 1; min-width: 0; } .room .rt b { display: block; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.room .rt small { display: block; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.badge { background: var(--accent); color: #fff; font: 700 11px var(--mono); border-radius: 999px; padding: 2px 7px; box-shadow: 0 0 10px var(--glow); }
.room.unread .rt b { color: var(--text); font-weight: 800; }
.btn.new { width: 100%; }
.side-foot { display: flex; flex-wrap: wrap; gap: 6px; }

#main { display: flex; flex-direction: column; min-width: 0; min-height: 0; position: relative; }
#room-head { display: flex; align-items: center; gap: 10px; padding: max(10px, env(safe-area-inset-top)) 16px 10px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 70%, transparent); backdrop-filter: blur(16px); }
.room-title { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.room-title > div { min-width: 0; }
#room-icon { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: var(--card2); font-size: 18px; flex: none; }
#room-name { font: 600 17px var(--head); margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#room-topic { margin: 0; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.head-actions { display: flex; align-items: center; gap: 2px; }
.live { display: inline-flex; align-items: center; gap: 6px; font: 600 11px var(--mono); color: var(--muted); margin-right: 6px; text-transform: uppercase; letter-spacing: .1em; }
.live i { width: 8px; height: 8px; border-radius: 50%; background: #59616b; }
.live.on i { background: var(--green); box-shadow: 0 0 10px var(--green); animation: beat 2s infinite; }
.only-mobile { display: none; }

#msgs { flex: 1; overflow-y: auto; padding: 18px 18px 8px; display: flex; flex-direction: column; gap: 2px; scroll-behavior: smooth; overscroll-behavior: contain; }
.day { align-self: center; font: 600 11px var(--mono); color: var(--muted); background: var(--card); border: 1px solid var(--line); padding: 4px 10px; border-radius: 999px; margin: 14px 0 8px; letter-spacing: .08em; text-transform: uppercase; }
.sys { align-self: center; font-size: 12px; color: var(--muted); margin: 6px 0; }
.msg { display: flex; gap: 10px; max-width: min(760px, 92%); position: relative; animation: pop .25s ease; }
.msg.mine { align-self: flex-end; flex-direction: row-reverse; }
.msg .avatar { margin-top: 2px; }
.msg.cont .avatar { visibility: hidden; height: 0; }
.msg .stack { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; }
.msg.mine .stack { align-items: flex-end; }
.msg .meta { font-size: 12px; color: var(--muted); margin: 6px 4px 3px; display: flex; gap: 8px; align-items: baseline; }
.msg .meta b { color: var(--text); font-weight: 700; }
.msg.cont .meta { display: none; }
.bubble { background: var(--card2); border: 1px solid var(--line); padding: 9px 13px; border-radius: 18px; border-top-left-radius: 6px; word-wrap: break-word; overflow-wrap: anywhere; max-width: 100%; position: relative; }
.msg.mine .bubble { background: var(--me); color: var(--me-text); border-color: transparent; border-top-left-radius: 18px; border-top-right-radius: 6px; }
.msg.ai .bubble { background: linear-gradient(var(--bg2), var(--bg2)) padding-box, linear-gradient(135deg, var(--accent), var(--gold), var(--blue)) border-box; border: 1px solid transparent; }
.msg.streaming .bubble::after { content: "▍"; color: var(--accent); animation: blink 1s steps(1) infinite; margin-left: 2px; }
.bubble p { margin: 0 0 8px; } .bubble p:last-child { margin: 0; }
.bubble pre { background: rgba(0,0,0,.35); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; overflow-x: auto; font: 13px/1.5 var(--mono); margin: 6px 0; white-space: pre; }
.bubble code { font: 13px var(--mono); background: rgba(0,0,0,.25); padding: 1px 5px; border-radius: 5px; }
.bubble ul, .bubble ol { margin: 4px 0 8px; padding-left: 20px; }
.bubble h4 { margin: 6px 0 4px; font: 600 15px var(--head); }
.msg.mine .bubble a { color: inherit; }
.bubble img.att { display: block; max-width: min(360px, 100%); max-height: 320px; border-radius: 12px; cursor: zoom-in; }
.file { display: flex; gap: 10px; align-items: center; text-decoration: none; color: inherit; }
.file .fi { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: rgba(0,0,0,.25); font-size: 18px; }
.voice { display: grid; gap: 6px; min-width: 240px; } .voice audio { width: 100%; height: 36px; }
.voice .tr { font-size: 13px; opacity: .9; font-style: italic; }
.edited { font-size: 11px; opacity: .7; }
.deleted { font-style: italic; opacity: .6; }
.reacts { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 4px; }
.reacts button { border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 1px 8px; font-size: 13px; }
.reacts button.me { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 18%, transparent); }
.seen { font-size: 11px; color: var(--muted); margin: 2px 6px 0; }
.tools { position: absolute; top: -14px; right: 8px; display: none; gap: 2px; background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; padding: 2px; box-shadow: 0 8px 24px rgba(0,0,0,.35); z-index: 3; }
.msg.mine .tools { right: auto; left: 8px; }
.msg:hover .tools, .msg.show-tools .tools { display: flex; }
.tools button { border: 0; background: transparent; width: 28px; height: 28px; border-radius: 8px; font-size: 14px; }
.tools button:hover { background: var(--card2); }
.ai-model { font: 10px var(--mono); color: var(--muted); margin: 3px 6px 0; letter-spacing: .05em; }
.thinking { display: inline-flex; gap: 4px; padding: 4px 0; } .thinking i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: bounce 1.2s infinite; } .thinking i:nth-child(2) { animation-delay: .15s; } .thinking i:nth-child(3) { animation-delay: .3s; }
.more-btn { align-self: center; margin: 6px 0 12px; }
.empty { margin: auto; text-align: center; color: var(--muted); max-width: 420px; padding: 30px; }
.empty .big { font-size: 42px; } .empty h3 { color: var(--text); font: 600 20px var(--head); margin: 8px 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 12px; }
html.blurred .bubble, html.blurred .room small, html.blurred #ghost, html.blurred #captions { filter: blur(7px); transition: filter .2s; }
html.blurred .msg:hover .bubble, html.blurred .msg.show-tools .bubble { filter: none; }

#ghost { margin: 0 18px 6px; padding: 8px 12px; border: 1px dashed var(--accent); border-radius: 14px; font-size: 14px; color: var(--muted); background: color-mix(in srgb, var(--accent) 6%, transparent); max-height: 120px; overflow: auto; }
#ghost b { color: var(--text); } #ghost .txt { color: var(--text); white-space: pre-wrap; }
#typing { height: 20px; padding: 0 22px; font-size: 12px; color: var(--muted); }

#composer { padding: 8px 14px max(12px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 75%, transparent); backdrop-filter: blur(16px); }
#composer .row { display: flex; align-items: flex-end; gap: 6px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 5px; transition: border-color .2s, box-shadow .2s; }
#composer .row:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--glow); }
#input { flex: 1; resize: none; border: 0; outline: none; background: transparent; padding: 9px 4px; max-height: 180px; line-height: 1.45; }
.send { width: 42px; height: 42px; border-radius: 14px; border: 0; background: var(--me); color: var(--me-text); font-size: 17px; flex: none; box-shadow: 0 4px 16px var(--glow); transition: transform .12s; }
.send:active { transform: scale(.92); }
#b-dictate.on { background: color-mix(in srgb, var(--accent) 25%, transparent); animation: beat 1.4s infinite; }
#reply-bar, #attach-bar { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--muted); padding: 2px 8px 8px; }
#reply-bar span { border-left: 3px solid var(--accent); padding-left: 8px; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#attach-bar { flex-wrap: wrap; } .chip { border: 1px solid var(--line); background: var(--card2); border-radius: 10px; padding: 4px 8px; font-size: 12px; }
#rec-bar { display: flex; align-items: center; gap: 10px; padding: 8px 4px 0; }
.rec-dot { width: 10px; height: 10px; border-radius: 50%; background: #e5484d; animation: beat 1s infinite; }
#rec-time { font: 600 14px var(--mono); }
#rec-wave { flex: 1; height: 28px; min-width: 60px; }

/* call */
#call { position: fixed; inset: 0; z-index: 20; background: #020305; display: flex; flex-direction: column; padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom); color: #eef2f6; }
.call-top { display: flex; justify-content: space-between; align-items: center; padding: 12px 18px; gap: 10px; flex-wrap: wrap; font-size: 14px; }
#call-timer { font: 600 13px var(--mono); color: var(--muted); margin-left: 8px; }
.q { font: 11px var(--mono); color: var(--muted); margin-left: 8px; }
#call-status { color: var(--muted); font-size: 13px; }
.stage { flex: 1; position: relative; margin: 0 12px; border-radius: 22px; overflow: hidden; background: radial-gradient(circle at 50% 40%, #0f1826, #020305); min-height: 0; }
#v-remote { width: 100%; height: 100%; object-fit: contain; background: transparent; }
#remote-empty { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 12px; color: var(--muted); }
#v-local { position: absolute; right: 14px; bottom: 14px; width: min(26vw, 220px); aspect-ratio: 3/4; object-fit: cover; border-radius: 16px; border: 2px solid rgba(255,255,255,.18); box-shadow: 0 10px 40px rgba(0,0,0,.6); transform: scaleX(-1); background: #0a111b; }
#v-local.screen { transform: none; object-fit: contain; }
#floaters { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.floater { position: absolute; bottom: 10%; font-size: 44px; animation: floatup 2.6s ease-out forwards; }
#captions { min-height: 54px; max-height: 120px; overflow: hidden; margin: 10px 18px 0; display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; font-size: 16px; }
#captions .ln { background: rgba(0,0,0,.55); padding: 3px 10px; border-radius: 8px; align-self: center; max-width: 900px; }
#captions .ln b { color: var(--gold); margin-right: 6px; } #captions .ln.interim { opacity: .65; }
.call-bar { display: flex; justify-content: center; gap: 10px; padding: 14px; flex-wrap: wrap; }
.cbtn { width: 64px; height: 64px; border-radius: 20px; border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.07); display: grid; place-content: center; justify-items: center; font-size: 20px; gap: 2px; color: #eef2f6; transition: background .2s, transform .12s; }
.cbtn span { font-size: 10px; color: #9aa7b4; } .cbtn:active { transform: scale(.94); }
.cbtn.off { background: rgba(229,72,77,.25); border-color: #e5484d; }
.cbtn.on { background: color-mix(in srgb, var(--accent) 30%, transparent); border-color: var(--accent); }
.cbtn.end { background: #e5484d; border: 0; }

#ring { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; background: rgba(2,3,5,.7); backdrop-filter: blur(10px); }
.ring-card { background: var(--bg2); border: 1px solid var(--line); border-radius: 26px; padding: 30px 34px; display: grid; justify-items: center; gap: 14px; animation: rise .3s; }
.ring-card h3 { margin: 0; font: 600 20px var(--head); } .ring-card .row { display: flex; gap: 12px; }
.pulse { animation: ringpulse 1.4s infinite; }

/* modal + toast */
#modal { position: fixed; inset: 0; z-index: 40; background: rgba(2,3,5,.6); backdrop-filter: blur(8px); display: grid; place-items: center; padding: 16px; }
.modal-card { width: min(560px, 100%); max-height: 88vh; overflow-y: auto; background: var(--bg2); border: 1px solid var(--line); border-radius: 22px; padding: 24px; position: relative; animation: rise .25s; }
.modal-card h3 { font: 600 20px var(--head); margin: 0 0 6px; } .modal-card p { color: var(--muted); margin: 0 0 14px; }
.close { position: absolute; top: 12px; right: 12px; }
.field { display: grid; gap: 6px; margin-bottom: 14px; } .field label { font-size: 13px; color: var(--muted); }
.field input, .field select, .field textarea { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 11px 12px; outline: none; }
.field input:focus { border-color: var(--accent); }
.seg { display: flex; gap: 6px; flex-wrap: wrap; } .seg button { flex: 1; min-width: 120px; border: 1px solid var(--line); background: var(--card); padding: 12px; border-radius: 14px; text-align: left; }
.seg button.sel { border-color: var(--accent); box-shadow: 0 0 0 2px var(--glow); }
.seg button b { display: block; } .seg button small { color: var(--muted); }
.swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.sw { width: 54px; height: 54px; border-radius: 16px; border: 2px solid var(--line); position: relative; }
.sw.sel { border-color: var(--text); box-shadow: 0 0 0 3px var(--glow); }
.sw span { position: absolute; bottom: -18px; left: 0; right: 0; font-size: 10px; color: var(--muted); text-align: center; }
.set-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.set-row div small { display: block; color: var(--muted); font-size: 12px; }
.toggle { width: 46px; height: 26px; border-radius: 999px; border: 0; background: #39414b; position: relative; flex: none; }
.toggle::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: left .2s; }
.toggle.on { background: var(--accent); } .toggle.on::after { left: 23px; }
.results { display: grid; gap: 6px; max-height: 50vh; overflow-y: auto; }
.result { border: 1px solid var(--line); background: var(--card); border-radius: 12px; padding: 10px 12px; text-align: left; }
.result small { color: var(--muted); display: block; font-size: 12px; } .result mark { background: color-mix(in srgb, var(--accent) 40%, transparent); color: inherit; border-radius: 3px; }
.steps { margin: 0; padding-left: 20px; color: var(--text); } .steps li { margin: 6px 0; }
#toasts { position: fixed; bottom: max(90px, calc(env(safe-area-inset-bottom) + 90px)); left: 50%; transform: translateX(-50%); z-index: 50; display: grid; gap: 8px; justify-items: center; pointer-events: none; }
.toast { background: var(--bg3); border: 1px solid var(--line); padding: 10px 16px; border-radius: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.4); font-size: 14px; animation: rise .25s; pointer-events: auto; max-width: 90vw; }
.toast.err { border-color: #e5484d; }
.lightbox { position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,.9); display: grid; place-items: center; cursor: zoom-out; }
.lightbox img { max-width: 94vw; max-height: 92vh; border-radius: 10px; }

/* showcase */
#showcase { position: fixed; inset: 0; z-index: 25; background: var(--bg); overflow: hidden; }
#sc-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.sc-wrap { position: relative; height: 100%; display: grid; align-content: center; justify-items: center; gap: 18px; padding: 24px; text-align: center; }
.sc-brand { display: flex; align-items: center; gap: 18px; } .sc-brand h1 { font: 700 clamp(40px, 8vw, 88px) var(--head); margin: 0; letter-spacing: -.03em; line-height: 1; } .sc-brand p { margin: 4px 0 0; color: var(--muted); text-align: left; }
.sc-clock { font: 600 clamp(48px, 11vw, 132px) var(--mono); letter-spacing: -.04em; line-height: 1; background: linear-gradient(135deg, var(--text), var(--accent2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sc-date { color: var(--muted); font: 500 18px var(--head); margin-top: -8px; }
.sc-people { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }
.sc-people .person { min-width: 220px; backdrop-filter: blur(10px); }
.sc-stats { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.stat { min-width: 130px; padding: 14px 18px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); backdrop-filter: blur(10px); }
.stat b { display: block; font: 600 30px var(--mono); } .stat span { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .12em; }
.sc-feats { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; max-width: 900px; }
.sc-feats span { border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 6px 12px; font-size: 13px; color: var(--muted); }
.sc-ticker { height: 24px; color: var(--accent2); font: 500 14px var(--mono); }
.sc-exit { position: absolute; top: max(14px, env(safe-area-inset-top)); right: 14px; border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 8px 14px; font-size: 13px; opacity: .6; }
.sc-exit:hover { opacity: 1; }

@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
@keyframes pop { from { opacity: 0; transform: translateY(6px) scale(.98); } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes beat { 50% { opacity: .45; } }
@keyframes bounce { 0%, 80%, 100% { transform: translateY(0); opacity: .5; } 40% { transform: translateY(-5px); opacity: 1; } }
@keyframes ringpulse { 0% { box-shadow: 0 0 0 0 var(--glow); } 100% { box-shadow: 0 0 0 26px transparent; } }
@keyframes floatup { to { transform: translateY(-60vh) scale(1.4); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

@media (max-width: 820px) {
  #shell { grid-template-columns: 1fr; }
  #side { position: fixed; inset: 0 auto 0 0; width: min(86vw, 330px); z-index: 10; transform: translateX(-102%); transition: transform .25s ease; box-shadow: 20px 0 60px rgba(0,0,0,.5); }
  #shell.side-open #side { transform: none; }
  #shell.side-open::after { content: ""; position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 9; }
  #b-close-side { display: inline-grid; }
  .only-mobile { display: inline-grid; }
  .live span { display: none; }
  #msgs { padding: 14px 10px 6px; }
  .msg { max-width: 94%; }
  #v-local { width: 30vw; }
  .cbtn { width: 54px; height: 54px; border-radius: 16px; font-size: 18px; }
  .cbtn span { display: none; }
  #b-blur { display: none; }
}
