/* Present app UI. One light system: white and sky surfaces, navy ink, one blue accent. */
@font-face { font-family: "Present Sans"; font-style: normal; font-weight: 300 900; font-display: swap; src: url(/fonts/figtree-latin-wght-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Present Sans"; font-style: normal; font-weight: 300 900; font-display: swap; src: url(/fonts/figtree-latin-ext-wght-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* Dark is the default theme; light is an override (html[data-theme="light"]). */
:root {
  color-scheme: dark;
  --navy: #EEF2FB;            /* headings */
  --ink: #CDD4E3;             /* body text */
  --muted: #8C96AD;
  --faint: #5F6A85;
  --line: #1F2840;
  --line-2: #2D3852;
  --line-3: #3D4A68;
  --bg: #0A0F1C;
  --surface: #121A2C;
  --sunken: #19233A;
  --blue: #86A9FF;            /* accent text, focus, selection */
  --blue-h: #A9C2FF;
  --blue-50: rgba(96, 143, 255, .13);
  --blue-100: rgba(96, 143, 255, .24);
  --primary: #2F6BEA; --primary-h: #4380FA; --on-primary: #fff;
  --red: #FF6B70; --red-50: rgba(255, 107, 112, .13); --danger-line: rgba(255, 107, 112, .38);
  --amber: #F3B05A; --amber-50: rgba(243, 176, 90, .12);
  --green: #4ADE9A; --ok-bg: rgba(74, 222, 154, .1);
  --deep: #14234D;            /* navy fills (decorative slides, phone) */
  --filled: #3E5A99;
  --glass: rgba(18, 26, 44, .82); --glass-line: rgba(255, 255, 255, .06);
  --appbar-bg: rgba(10, 15, 28, .78);
  --page-grad: radial-gradient(1200px 600px at 50% -10%, #17306B 0%, transparent 65%), linear-gradient(180deg, #0D1834 0%, #0A0F1C 60%);
  --art-bg: radial-gradient(120% 90% at 90% 0%, #1D3E8F 0%, transparent 60%), radial-gradient(90% 70% at 0% 100%, #15295C 0%, transparent 60%), linear-gradient(160deg, #10204A, #0D1834 55%, #0B1328);
  --art-card: #1A2644;
  --scrim: rgba(3, 7, 18, .45);
  --shimmer: rgba(255, 255, 255, .05);
  --toast-bg: #EEF2FB; --toast-fg: #0A1F4D;
  --code-bg: #0D1528; --code-fg: #DCE5FF; --code-line: #1F2840;
  --sh-1: 0 1px 2px rgba(0, 0, 0, .3);
  --sh-2: 0 1px 2px rgba(0, 0, 0, .3), 0 14px 32px -12px rgba(0, 0, 0, .6);
  --sh-3: 0 2px 6px rgba(0, 0, 0, .3), 0 30px 70px -20px rgba(0, 0, 0, .7);
  --r-sm: 8px; --r: 12px; --r-lg: 16px; --r-xl: 24px;
  --font: "Present Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "Cascadia Code", "SF Mono", Menlo, Consolas, monospace;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --ratio: 16 / 9;
}
:root[data-theme="light"] {
  color-scheme: light;
  --navy: #0A1F4D; --ink: #23262F; --muted: #646A78; --faint: #9CA1AD;
  --line: #E4E7EE; --line-2: #D2D7E1; --line-3: #B9C0CE;
  --bg: #F5F7FB; --surface: #FFFFFF; --sunken: #EEF1F7;
  --blue: #0540AD; --blue-h: #04348C; --blue-50: #EBF1FD; --blue-100: #D6E3FB;
  --primary: #0540AD; --primary-h: #04348C;
  --red: #DC3D43; --red-50: #FDECEC; --danger-line: #F2C4C6;
  --amber: #A35A0A; --amber-50: #FFF3E0;
  --green: #18794E; --ok-bg: #E7F5EE;
  --deep: #0A1F4D; --filled: #9DB6E6;
  --glass: rgba(255, 255, 255, .86); --glass-line: rgba(255, 255, 255, .9);
  --appbar-bg: rgba(245, 247, 251, .82);
  --page-grad: linear-gradient(180deg, #CFE1FF 0%, #E8F0FF 34%, #F7FAFF 70%, #fff 100%);
  --art-bg: radial-gradient(120% 90% at 90% 0%, #BBD5FF 0%, transparent 60%), radial-gradient(90% 70% at 0% 100%, #D9E6FF 0%, transparent 60%), linear-gradient(160deg, #DCE9FF, #EEF4FF 55%, #F6F9FF);
  --art-card: #FFFFFF;
  --scrim: rgba(10, 31, 77, .28);
  --shimmer: rgba(255, 255, 255, .55);
  --toast-bg: #0A1F4D; --toast-fg: #fff;
  --code-bg: #0A1F4D; --code-fg: #E3EBFF; --code-line: #0A1F4D;
  --sh-1: 0 1px 2px rgba(10, 31, 77, .05), 0 1px 1px rgba(10, 31, 77, .03);
  --sh-2: 0 1px 2px rgba(10, 31, 77, .04), 0 10px 28px -10px rgba(10, 31, 77, .18);
  --sh-3: 0 2px 6px rgba(10, 31, 77, .05), 0 28px 64px -20px rgba(10, 31, 77, .32);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--bg); color: var(--ink); font: 450 15px/1.5 var(--font); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; }
body.sky { background: var(--page-grad) fixed; background-color: var(--bg); }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
code { font: 500 .88em/1.4 var(--mono); background: var(--sunken); color: var(--navy); padding: .15em .45em; border-radius: 6px; }
kbd { font: 600 11px/1 var(--mono); padding: 3px 6px; border-radius: 6px; background: var(--surface); border: 1px solid var(--line-2); box-shadow: 0 1px 0 var(--line-2); color: var(--muted); }
.i { flex: none; display: block; }
.wrap { width: 100%; max-width: 1320px; margin: 0 auto; padding: 0 max(clamp(18px, 4vw, 40px), env(safe-area-inset-right)) 0 max(clamp(18px, 4vw, 40px), env(safe-area-inset-left)); }

/* ---------------------------------------------------------------- type */
.display { font-weight: 400; font-size: clamp(34px, 4.6vw, 48px); line-height: 1.06; letter-spacing: -.028em; color: var(--navy); }
.display.sm { font-size: clamp(26px, 3.4vw, 32px); letter-spacing: -.022em; line-height: 1.15; }
.lede { color: var(--muted); font-size: 16px; line-height: 1.5; }
.link { display: inline-flex; align-items: center; gap: 6px; color: var(--blue); font-weight: 600; }
@media (hover: hover) { .link:hover { color: var(--blue-h); } }
.link .i { transition: transform .2s var(--ease); }
@media (hover: hover) { .link:hover .i { transform: translateX(2px); } }
.link.quiet { color: var(--muted); font-weight: 500; }
@media (hover: hover) { .link.quiet:hover { color: var(--navy); } }
@media (hover: hover) { .link.quiet:hover .i { transform: none; } }

/* ---------------------------------------------------------------- brand */
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; letter-spacing: -.02em; color: var(--navy); }
.logo-mark { display: block; flex: none; }

/* ---------------------------------------------------------------- buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); color: var(--navy); font-weight: 600; font-size: 14.5px; letter-spacing: -.005em; white-space: nowrap; transition: background .18s, border-color .18s, color .18s, box-shadow .18s, transform .12s; }
@media (hover: hover) { .btn:hover { background: var(--sunken); border-color: var(--line-2); } }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .55; pointer-events: none; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
@media (hover: hover) { .btn.primary:hover { background: var(--primary-h); border-color: var(--primary-h); } }
.btn.danger { color: var(--red); border-color: var(--danger-line); background: var(--surface); }
@media (hover: hover) { .btn.danger:hover { background: var(--red-50); } }
.btn.lg { height: 48px; padding: 0 24px; font-size: 16px; }
.btn.sm { height: 34px; padding: 0 14px; font-size: 13.5px; }
.btn.block { width: 100%; }
.icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; padding: 0; border-radius: 999px; border: 0; background: transparent; color: var(--muted); transition: background .15s, color .15s; }
@media (hover: hover) { .icon-btn:hover { background: var(--sunken); color: var(--navy); } }

/* ---------------------------------------------------------------- forms */
.stack { display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 7px; margin-top: 8px; }
.field label { font-weight: 600; font-size: 14px; color: var(--navy); }
.field input { height: 48px; padding: 0 14px; border-radius: var(--r); border: 1px solid var(--line-2); background: var(--surface); font-size: 16px; outline: none; transition: border-color .15s, box-shadow .15s; }
@media (hover: hover) { .field input:hover { border-color: var(--line-3); } }
.field input:focus { border-color: var(--blue); box-shadow: 0 0 0 4px var(--blue-50); }
.field input[aria-invalid="true"] { border-color: var(--red); }
.err { color: var(--red); font-size: 14px; font-weight: 500; }
.err:empty { display: none; }

/* ---------------------------------------------------------------- sign in (split) */
.auth { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: minmax(360px, 520px) 1fr; background: var(--surface); }
.auth-form { display: flex; flex-direction: column; padding: 28px clamp(24px, 5vw, 64px) 32px; }
.auth-form form { margin: auto 0; padding: 48px 0; max-width: 380px; width: 100%; }
.auth-form .display { margin-bottom: -6px; }
.auth-form .btn { margin-top: 8px; }
.auth-alt { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; color: var(--muted); font-size: 14.5px; }
.auth-art { position: relative; overflow: hidden; margin: 12px; border-radius: 28px; background: var(--art-bg); }
@media (max-width: 860px) { .auth { grid-template-columns: 1fr; } .auth-art { display: none; } }

/* decorative slide stack */
.art { position: absolute; inset: 0; }
.art .s { position: absolute; aspect-ratio: 16 / 10; border-radius: 18px; box-shadow: var(--sh-3); overflow: hidden; animation: float 9s var(--ease) infinite alternate; }
.art .s1 { width: 46%; left: 14%; top: 18%; background: var(--deep); color: #fff; border: 1px solid var(--glass-line); padding: 4% 4.4%; transform: rotate(-5deg); display: flex; flex-direction: column; z-index: 2; }
.art .s2 { width: 38%; right: 8%; top: 12%; background: var(--art-card); padding: 3.4%; transform: rotate(4deg); animation-delay: -3s; display: flex; flex-direction: column; }
.art .s3 { width: 40%; left: 32%; bottom: 10%; background: var(--art-card); padding: 3.4%; transform: rotate(2deg); animation-delay: -6s; display: flex; align-items: center; gap: 8%; z-index: 1; }
.art .s-k { font-size: clamp(9px, .8vw, 12px); letter-spacing: .16em; text-transform: uppercase; color: #8FB0F0; font-weight: 700; }
.art .s-k.dark { color: var(--blue); }
.art .s-h { margin-top: auto; font-size: clamp(18px, 2.4vw, 38px); line-height: 1.02; letter-spacing: -.03em; font-weight: 500; }
.art .s-dots { display: flex; gap: 6px; margin-top: 8%; }
.art .s-dots i { width: 22%; height: 3px; border-radius: 3px; background: rgba(255,255,255,.25); }
.art .s-dots i:first-child { background: #8FB0F0; }
.art .bars { flex: 1; display: flex; align-items: flex-end; gap: 7%; padding-top: 8%; }
.art .bars i { flex: 1; height: var(--h); border-radius: 6px 6px 2px 2px; background: var(--blue-100); }
.art .bars i:nth-child(4) { background: var(--blue); }
.art .orb { width: 34%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 30% 30%, #7FA8FF, var(--blue)); flex: none; }
.art .s-lines { flex: 1; display: flex; flex-direction: column; gap: 12%; }
.art .s-lines i { height: 9px; border-radius: 9px; background: var(--sunken); }
.art .s-lines i:first-child { height: 14px; width: 80%; background: var(--navy); opacity: .85; }
.art .phone { position: absolute; width: 16%; aspect-ratio: 9 / 19; right: 12%; bottom: 14%; border-radius: 26px; background: var(--deep); border: 5px solid var(--art-card); box-shadow: var(--sh-3); padding: 34px 14px 0; color: #fff; z-index: 3; transform: rotate(-3deg); animation: float 9s var(--ease) infinite alternate; animation-delay: -4.5s; }
.art .ph-notch { position: absolute; top: 5%; left: 50%; width: 30%; height: 3%; border-radius: 9px; background: rgba(255,255,255,.18); transform: translateX(-50%); }
.art .ph-k { display: inline-flex; font-size: clamp(7px, .6vw, 10px); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; padding: 3px 7px; border-radius: 9px; background: var(--red); }
.art .ph-h { font-size: clamp(11px, 1.1vw, 16px); font-weight: 500; line-height: 1.1; margin-top: 10px; letter-spacing: -.01em; }
.art .ph-bars { display: flex; flex-direction: column; gap: 8px; margin-top: 18px; }
.art .ph-bars i { height: 22px; width: var(--w); border-radius: 7px; background: rgba(255,255,255,.14); }
.art .ph-bars i:first-child { background: #8FB0F0; }
@keyframes float { from { translate: 0 0; } to { translate: 0 -14px; } }
@media (prefers-reduced-motion: reduce) { .art .s, .art .phone { animation: none; } }

/* ---------------------------------------------------------------- join / message (centered on sky) */
.join { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; padding: max(20px, env(safe-area-inset-top)) 20px max(24px, env(safe-area-inset-bottom)); }
.join-top { width: 100%; max-width: 1100px; display: flex; justify-content: center; padding: 8px 0 0; }
.join-card { width: min(440px, 100%); margin: clamp(28px, 11vh, 120px) 0 auto; display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 40px 32px 32px; border-radius: var(--r-xl); background: var(--glass); border: 1px solid var(--glass-line); box-shadow: var(--sh-3); text-align: center; position: relative; backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
.join-card .lede { margin-top: -4px; margin-bottom: 12px; }
.join-card .btn { margin-top: 6px; }
.join-card .err { min-height: 0; }
.join-card.busy .btn { opacity: .6; pointer-events: none; }
.join-foot { padding-top: 22px; }
.join-foot .link { font-size: 14px; }
.code-boxes { display: flex; justify-content: center; gap: 12px; cursor: text; }
.code-boxes span { width: 68px; height: 80px; border-radius: 16px; display: grid; place-items: center; font-size: 38px; font-weight: 600; color: var(--navy); font-variant-numeric: tabular-nums; background: var(--surface); border: 1.5px solid var(--line-2); transition: border-color .15s, box-shadow .15s, transform .2s var(--ease); }
.code-boxes span.filled { border-color: var(--filled); }
.code-boxes span.cursor { border-color: var(--blue); box-shadow: 0 0 0 4px var(--blue-50); }
.code-boxes span.cursor::after { content: ""; width: 2px; height: 34px; border-radius: 2px; background: var(--blue); animation: caret 1.05s steps(1) infinite; }
.code-boxes.has-err span { border-color: var(--danger-line); }
.code-boxes.shake { animation: shake .4s var(--ease); }
@keyframes caret { 50% { opacity: 0; } }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.code-input { position: absolute; opacity: 0; width: 1px; height: 1px; left: 50%; top: 50%; pointer-events: none; font-size: 16px; }
@media (max-width: 400px) { .code-boxes { gap: 9px; } .code-boxes span { width: 60px; height: 72px; font-size: 34px; } .join-card { padding: 32px 22px 24px; } }
.msg-card { gap: 16px; }
.msg-card.left { align-items: stretch; text-align: left; }
.consent-ico { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--blue-50); color: var(--blue); }
.perm { margin: 0; padding: 14px 16px; list-style: none; border-radius: var(--r); background: var(--sunken); display: flex; flex-direction: column; gap: 6px; font-size: 14.5px; }
.perm li::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--blue); margin-right: 10px; vertical-align: middle; }
.note { font-size: 14px; padding: 12px 14px; border-radius: var(--r); background: var(--sunken); }
.note.warn { background: var(--amber-50); color: var(--amber); }
.row-btns { display: flex; gap: 10px; margin-top: 6px; }
.row-btns .btn { flex: 1; }

/* ---------------------------------------------------------------- app bar */
.appbar { position: sticky; top: 0; z-index: 20; background: var(--appbar-bg); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.appbar.scrolled { border-bottom-color: var(--line); }
.appbar .wrap { height: 64px; display: flex; align-items: center; justify-content: space-between; }
.appbar-r { display: flex; align-items: center; gap: 8px; }
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); padding: 6px 10px; border-radius: 999px; }
.status.ok { color: var(--green); background: var(--ok-bg); }
.acct { position: relative; }

/* menus */
.menu { position: absolute; z-index: 30; min-width: 220px; padding: 6px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh-3); display: flex; flex-direction: column; animation: menu-in .16s var(--ease); }
.menu[hidden] { display: none; }
@keyframes menu-in { from { opacity: 0; transform: translateY(-4px) scale(.98); } }
.acct .menu { right: 0; top: calc(100% + 6px); }
.menu a, .menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border-radius: 9px; border: 0; background: none; text-align: left; font-size: 14px; font-weight: 500; color: var(--ink); }
.menu a .i, .menu button .i { color: var(--muted); }
@media (hover: hover) { .menu a:hover, .menu button:hover { background: var(--sunken); } }
.menu .danger, .menu .danger .i { color: var(--red); }
@media (hover: hover) { .menu .danger:hover { background: var(--red-50); } }
.menu hr { border: 0; height: 1px; background: var(--line); margin: 6px 4px; }
.menu form { margin: 0; }

/* ---------------------------------------------------------------- deck grid */
.page { padding-top: clamp(20px, 4vw, 40px); padding-bottom: 80px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.page-head .lede { margin-top: 6px; font-size: 15px; }
.live-txt { color: var(--red); font-weight: 600; }
.search { position: relative; display: flex; align-items: center; width: min(320px, 100%); }
.search .i { position: absolute; left: 14px; color: var(--faint); pointer-events: none; }
.search input { width: 100%; height: 42px; padding: 0 14px 0 40px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); outline: none; font-size: 16px; transition: border-color .15s, box-shadow .15s; }
.search input:focus { border-color: var(--blue); box-shadow: 0 0 0 4px var(--blue-50); }
.search input::placeholder { color: var(--faint); }
.tabs { display: flex; gap: 4px; margin: 28px 0 22px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tab { position: relative; display: inline-flex; align-items: center; gap: 8px; padding: 10px 12px 12px; border: 0; background: none; font-size: 14.5px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.tab span { font-size: 12px; font-weight: 600; padding: 1px 7px; border-radius: 999px; background: var(--sunken); color: var(--muted); }
@media (hover: hover) { .tab:hover { color: var(--navy); } }
.tab.on { color: var(--navy); }
.tab.on::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--blue); }
.tab.on span { background: var(--blue-50); color: var(--blue); }
.tab[data-f="live"] span { background: var(--red-50); color: var(--red); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(290px, 100%), 1fr)); gap: 28px 24px; }
.card { position: relative; display: flex; flex-direction: column; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh-1); transition: box-shadow .25s var(--ease), transform .25s var(--ease), border-color .25s; opacity: 0; animation: card-in .55s var(--ease) forwards; animation-delay: calc(var(--i, 0) * 45ms); }
.card.menu-open { z-index: 10; box-shadow: var(--sh-2); border-color: var(--line-2); }
@media (hover: hover) { .card:hover, .card.menu-open { box-shadow: var(--sh-2); transform: translateY(-2px); border-color: var(--line-2); } }
.card[hidden] { display: none; }
@keyframes card-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.thumb { position: relative; display: block; margin: 6px 6px 0; border-radius: 11px; overflow: hidden; aspect-ratio: 16 / 9; background: var(--sunken); isolation: isolate; }
.shot { position: absolute; inset: 0; }
.shot::before { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, var(--shimmer) 50%, transparent 70%) var(--sunken); background-size: 220% 100%; animation: shimmer 1.4s linear infinite; }
.shot.loaded::before { display: none; }
@keyframes shimmer { from { background-position: 120% 0; } to { background-position: -120% 0; } }
.shot iframe, .shot img { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; object-fit: cover; pointer-events: none; opacity: 0; transition: opacity .5s var(--ease); }
.shot.loaded iframe, .shot.loaded img { opacity: 1; }
.thumb .hover { position: absolute; inset: 0; display: grid; place-items: center; background: var(--scrim); opacity: 0; transition: opacity .2s; z-index: 2; }
.thumb .hover .btn { box-shadow: 0 8px 24px rgba(5, 64, 173, .35); transform: translateY(4px); transition: transform .25s var(--ease), background .18s; }
.thumb:focus-visible .hover { opacity: 1; }
@media (hover: hover) { .card:hover .thumb .hover { opacity: 1; } .card:hover .thumb .hover .btn { transform: none; } }
.live-tag { position: absolute; left: 10px; top: 10px; z-index: 3; display: inline-flex; align-items: center; gap: 7px; height: 26px; padding: 0 10px 0 9px; border-radius: 999px; background: #fff; color: var(--red); font-size: 12px; font-weight: 700; letter-spacing: .02em; box-shadow: 0 2px 8px rgba(10,31,77,.18); }
.live-tag i { width: 7px; height: 7px; border-radius: 50%; background: var(--red); animation: pulse 1.8s infinite; }
.live-tag b { color: #0A1F4D; letter-spacing: .12em; font-variant-numeric: tabular-nums; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(220,61,67,.5); } 70% { box-shadow: 0 0 0 6px rgba(220,61,67,0); } 100% { box-shadow: 0 0 0 0 rgba(220,61,67,0); } }
.card .body { padding: 12px 10px 14px 16px; display: flex; flex-direction: column; gap: 3px; flex: 1; }
.title-row { display: flex; align-items: center; gap: 6px; }
.title-row h2 { flex: 1; min-width: 0; font-size: 16px; font-weight: 600; letter-spacing: -.012em; color: var(--navy); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.title-row .more { width: 32px; height: 32px; margin: -4px 0; opacity: .7; }
.card.menu-open .more { opacity: 1; }
@media (hover: hover) { .card:hover .more { opacity: 1; } }
@media (hover: none) { .title-row .more { opacity: 1; width: 40px; height: 40px; margin: -8px -4px; } }
.meta { font-size: 13px; color: var(--muted); padding-right: 6px; }
.desc { font-size: 13.5px; color: var(--muted); margin-top: 4px; padding-right: 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chip { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--sunken); color: var(--muted); }
.chip.blue { background: var(--blue-50); color: var(--blue); }
.chip.amber { background: var(--amber-50); color: var(--amber); }
.card > .menu { right: 8px; top: calc(100% - 14px); }
.card > .menu.up { top: auto; transform-origin: bottom right; }
.card > .menu { overflow-y: auto; overscroll-behavior: contain; }
.none { text-align: center; color: var(--muted); padding: 60px 0; }

.empty { grid-column: 1 / -1; max-width: 560px; margin: 6vh auto 0; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 44px 32px; border-radius: var(--r-xl); background: var(--surface); border: 1px dashed var(--line-2); }
.empty-ico { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; background: var(--blue-50); color: var(--blue); margin-bottom: 4px; }
.empty h2 { font-size: 22px; font-weight: 600; letter-spacing: -.02em; color: var(--navy); }
.empty p { color: var(--muted); }
.cmd { display: flex; align-items: center; gap: 4px; width: 100%; margin: 8px 0 6px; padding: 6px 6px 6px 14px; border-radius: var(--r); background: var(--sunken); text-align: left; }
.cmd code { flex: 1; min-width: 0; background: none; padding: 0; font-size: 12.5px; overflow-x: auto; white-space: nowrap; scrollbar-width: none; }

/* ---------------------------------------------------------------- guide */
.doc { max-width: 820px; padding-top: 32px; padding-bottom: 96px; }
.doc-k { font-size: 13px; font-weight: 600; color: var(--blue); letter-spacing: .02em; margin-bottom: 8px; }
.prose { color: var(--ink); font-size: 16px; line-height: 1.7; }
.prose h1 { font-size: 44px; font-weight: 400; letter-spacing: -.03em; line-height: 1.1; color: var(--navy); margin: 0 0 20px; }
.prose h2 { font-size: 24px; font-weight: 600; letter-spacing: -.02em; color: var(--navy); margin: 48px 0 12px; padding-top: 24px; border-top: 1px solid var(--line); }
.prose h3 { font-size: 18px; font-weight: 600; color: var(--navy); margin: 28px 0 8px; }
.prose p, .prose ul, .prose ol { margin: 0 0 14px; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin: 4px 0; }
.prose li::marker { color: var(--faint); }
.prose a { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }
.prose pre { margin: 0 0 18px; padding: 16px 18px; border-radius: var(--r); background: var(--code-bg); color: var(--code-fg); border: 1px solid var(--code-line); overflow-x: auto; font-size: 13.5px; line-height: 1.6; }
.prose pre code { background: none; color: inherit; padding: 0; font-size: inherit; }

/* ---------------------------------------------------------------- speaker console */
body.console-body { background: var(--bg); }
.console { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 400px); grid-template-rows: auto minmax(0, 1fr); gap: 16px 20px; height: 100vh; height: 100dvh; padding: 0 20px 20px; }
.c-top { grid-column: 1 / -1; display: flex; align-items: center; gap: 16px; height: 68px; border-bottom: 1px solid var(--line); margin: 0 -20px; padding: 0 20px; background: var(--surface); }
.c-back { display: inline-flex; align-items: center; gap: 4px; height: 36px; padding: 0 12px 0 8px; border-radius: 999px; font-weight: 600; font-size: 14px; color: var(--muted); }
@media (hover: hover) { .c-back:hover { background: var(--sunken); color: var(--navy); } }
.c-title { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.c-title strong { font-size: 16px; font-weight: 600; color: var(--navy); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: -.01em; }
.c-label { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); }
.c-stats { display: flex; gap: 6px; }
.stat { display: flex; flex-direction: column; align-items: flex-start; padding: 6px 14px; border-radius: var(--r); background: var(--sunken); min-width: 92px; line-height: 1.2; }
.num { font-size: 22px; font-weight: 600; color: var(--navy); font-variant-numeric: tabular-nums; letter-spacing: -.02em; background: none; border: 0; padding: 0; }
@media (hover: hover) { button.num:hover { color: var(--blue); } }
#count small { font-size: 14px; color: var(--faint); font-weight: 500; }
#count .sub { display: none; }
.c-main { display: flex; flex-direction: column; gap: 14px; min-width: 0; min-height: 0; }
.c-frame { position: relative; width: 100%; aspect-ratio: var(--ratio); background: #0B1020; border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--sh-2); }
.c-main .c-frame { flex: 1; min-height: 0; width: auto; max-width: 100%; aspect-ratio: var(--ratio); margin: 0 auto; cursor: pointer; }
.c-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; pointer-events: none; }
.c-controls { display: grid; grid-template-columns: 1fr auto 1.6fr; gap: 10px; }
.c-controls .btn { height: 56px; border-radius: var(--r-lg); font-size: 16px; }
.sq { width: 14px; height: 10px; border-radius: 2px; background: currentColor; }
#black.on { background: #000; border-color: var(--line-3); color: #fff; }
.c-side { display: flex; flex-direction: column; gap: 12px; min-height: 0; overflow: auto; padding-bottom: 2px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px 16px; box-shadow: var(--sh-1); }
.p-h { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.c-next .c-frame { border-radius: 10px; box-shadow: none; }
.c-notes { flex: 1; min-height: 160px; overflow: auto; }
.notes { font-size: 19px; line-height: 1.55; color: var(--ink); }
.notes .dim { color: var(--faint); font-size: 15px; }
.notes .n-html { margin-top: 8px; }
.c-live { display: flex; flex-direction: column; gap: 14px; }
.c-live .row { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.c-live .p-h { margin-bottom: 2px; }
.live-status { font-weight: 600; color: var(--navy); font-size: 15px; display: flex; align-items: center; gap: 8px; }
.live-status.on::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--red); animation: pulse 1.8s infinite; }
.live-join { display: flex; gap: 16px; align-items: center; }
.qr { width: 120px; flex: none; padding: 6px; border-radius: 10px; background: #fff; border: 1px solid var(--line); }
.qr img { display: block; width: 100%; image-rendering: pixelated; }
.join-host { font-weight: 600; font-size: 14px; color: var(--navy); margin-bottom: 8px; word-break: break-all; }
.code { font-size: 32px; font-weight: 600; letter-spacing: .14em; color: var(--navy); font-variant-numeric: tabular-nums; line-height: 1.1; }
.switch { display: flex; align-items: center; gap: 10px; font-size: 14px; cursor: pointer; user-select: none; color: var(--ink); }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch i { flex: none; width: 38px; height: 22px; border-radius: 999px; background: var(--line-2); position: relative; transition: background .2s; }
.switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(10,31,77,.25); transition: transform .2s var(--ease); }
.switch input:checked + i { background: var(--blue); }
.switch input:checked + i::after { transform: translateX(16px); }
.switch input:focus-visible + i { box-shadow: 0 0 0 4px var(--blue-50); }
.c-open { display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; font-weight: 500; color: var(--muted); padding: 4px 2px; }
@media (hover: hover) { .c-open:hover { color: var(--blue); } }
body[data-conn="offline"] .c-live .row::after { content: "Offline"; color: var(--amber); font-size: 12px; font-weight: 600; }
@media (max-width: 900px) {
  .c-controls { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1.6fr); }
  .c-controls .btn { min-width: 0; padding: 0 14px; }
  .console { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto auto; height: auto; min-height: 100dvh; }
  .c-top { flex-wrap: wrap; height: auto; padding: 10px 16px; }
  .c-stats { width: 100%; }
  .stat { flex: 1; min-width: 0; }
  .c-next { display: none; }
  .c-controls .btn { height: 64px; }
}

/* ---------------------------------------------------------------- toast */
.g-toast { position: fixed; left: 50%; bottom: 28px; z-index: 50; transform: translate(-50%, 8px); padding: 10px 18px; border-radius: 999px; background: var(--toast-bg); color: var(--toast-fg); font-size: 14px; font-weight: 500; box-shadow: var(--sh-3); opacity: 0; pointer-events: none; transition: opacity .2s, transform .25s var(--ease); }
.g-toast.on { opacity: 1; transform: translate(-50%, 0); }
.page-head + .grid { margin-top: 32px; }

/* ---------------------------------------------------------------- theme toggle */
.theme-btn .i-sun { display: block; }
.theme-btn .i-moon { display: none; }
:root[data-theme="light"] .theme-btn .i-sun { display: none; }
:root[data-theme="light"] .theme-btn .i-moon { display: block; }
.theme-anim, .theme-anim * { transition: background-color .3s ease, border-color .3s ease, color .3s ease !important; }
.join-top, .c-top { position: relative; }
.join-top .theme-btn { position: absolute; right: 0; top: 4px; }
.auth-top { display: flex; align-items: center; justify-content: space-between; }

/* ---------------------------------------------------------------- dialog (share link) */
.dlg { width: min(520px, calc(100vw - 32px)); padding: 22px 22px 20px; border: 1px solid var(--line); border-radius: 22px; background: var(--surface); color: var(--ink); box-shadow: var(--sh-3); }
.dlg[open] { animation: dlg-in .28s var(--ease); }
.dlg::backdrop { background: var(--scrim); backdrop-filter: blur(3px); }
@keyframes dlg-in { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.dlg-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.dlg-head h2 { margin: 0; font-size: 22px; font-weight: 600; letter-spacing: -.02em; color: var(--navy); }
.dlg-sub { margin: 4px 0 0; font-size: 14px; color: var(--muted); }
.dlg-note { margin: 0; font-size: 14px; line-height: 1.55; color: var(--muted); }
.dlg-actions { display: flex; align-items: center; gap: 8px; margin-top: 18px; flex-wrap: wrap; }
.dlg-actions .sp { flex: 1; }
.dlg .err { margin: 12px 0 0; }
.share-url { margin: 0 0 12px; }
.share-url code { font-size: 13.5px; color: var(--navy); overflow: hidden; text-overflow: ellipsis; }
.share-url { cursor: text; user-select: all; }
.chip.share-chip { background: var(--blue-50); color: var(--blue); }

/* ---------------------------------------------------------------- touch */
a, button, label, summary { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.c-live .switch { margin-top: 6px; }
@media (pointer: coarse) {
  .icon-btn { min-width: 44px; min-height: 44px; }
  .link { min-height: 44px; }
  .switch { min-height: 44px; }
  .c-live .btn, .dlg-actions .btn { min-height: 44px; }
  #timer { min-height: 40px; }
}
@media (hover: none) and (pointer: coarse) { .switch kbd, .kbd-only { display: none !important; } }
@media (max-width: 480px) {
  #share-onbox .dlg-actions { display: grid; grid-template-columns: 1fr 1fr; }
  #share-onbox .dlg-actions .sp { display: none; }
  #share-onbox .dlg-actions .btn { justify-content: center; }
}
@media (max-width: 900px) {
  .c-main .c-frame { flex: none; width: 100%; }
  .c-notes { min-height: 0; flex: none; }
}
@media (min-width: 560px) and (max-width: 900px) {
  .c-next { display: block !important; }
  .c-next .c-frame { width: 50%; }
}
@media (max-height: 500px) { .menu a, .menu button { padding: 6px 10px; } .menu hr { margin: 3px 4px; } }

/* ---------------------------------------------------------------- join: name step */
.join-k { margin: 0; font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--blue); }
.join-card .field { width: 100%; text-align: left; }
.join-card .field input { font-size: 18px; height: 52px; }
.join-note { margin: 2px 0 0; font-size: 13px; color: var(--muted); }

/* ---------------------------------------------------------------- shared small controls */
.btn.ghost { border-color: transparent; background: transparent; color: var(--muted); }
.icon-btn.sm { width: 34px; height: 34px; font-weight: 700; font-size: 13px; }
button.link { background: none; border: 0; padding: 0; font: inherit; font-weight: 600; cursor: pointer; }
.link.sm { font-size: 13px; }
.link.danger { color: var(--red); }

/* ---------------------------------------------------------------- question lists (remote + console) */
.qa-h { display: flex; align-items: center; gap: 8px; margin: 18px 0 8px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.qa-h span, .qa-hidden summary span { font-size: 11.5px; padding: 1px 8px; border-radius: 999px; background: var(--sunken); color: var(--ink); letter-spacing: 0; }
.qa-note { margin: 0 0 10px; font-size: 13px; color: var(--muted); }
.qa-note.warn { color: var(--amber); }
.qa-ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.qa-item { padding: 12px 14px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); }
.qa-item.spot { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-50); }
.qa-item.answered { opacity: .55; }
.qa-top { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.qa-name { font-weight: 600; color: var(--navy); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qa-when { flex: 1; color: var(--faint); }
.qa-votes { display: inline-flex; align-items: center; gap: 3px; font-weight: 700; color: var(--navy); font-variant-numeric: tabular-nums; }
.qa-why { font-size: 12px; font-weight: 600; color: var(--amber); }
.qa-text { margin: 6px 0 10px; font-size: 16px; line-height: 1.45; color: var(--navy); overflow-wrap: anywhere; }
.qa-act { display: flex; flex-wrap: wrap; gap: 6px; }
.qa-empty { margin: 6px 0; font-size: 14px; color: var(--muted); }
.qa-hidden { margin-top: 16px; }
.qa-hidden summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--muted); display: flex; align-items: center; gap: 8px; min-height: 36px; }
.qa-hidden .qa-ol { margin-top: 8px; }
.qa-clear { margin-top: 18px; font-size: 13px; }
.c-qa .row { display: flex; align-items: center; justify-content: space-between; }
.c-qa .p-h { margin-bottom: 8px; }
.c-qa .qa-item { padding: 10px 12px; }
.c-qa .qa-text { font-size: 14.5px; margin: 4px 0 8px; }
.c-remote .qr { width: 92px; }
.c-remote p.small { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.45; }
.c-remote .p-h { margin-bottom: 4px; }

/* ---------------------------------------------------------------- phone remote */
body.remote-body { background: var(--bg); overscroll-behavior: none; }
.remote { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto minmax(0, 1fr) auto; overflow-x: hidden; height: 100vh; height: 100dvh; padding: 0 max(12px, env(safe-area-inset-right)) 0 max(12px, env(safe-area-inset-left)); }
.r-top { display: flex; align-items: center; gap: 6px; min-height: 56px; padding-top: env(safe-area-inset-top); }
.r-back { display: grid; place-items: center; width: 44px; height: 44px; margin-left: -8px; border-radius: 999px; color: var(--muted); flex: none; }
.r-title { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
.r-title strong { font-size: 15px; font-weight: 600; color: var(--navy); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.r-sub { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.r-dot { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--faint); }
body[data-conn="ok"] .r-dot { background: var(--green); }
body[data-conn="live"] .r-dot { background: var(--red); }
body[data-conn="offline"] .r-dot { background: var(--amber); }
body[data-conn="offline"] .r-sub { color: var(--amber); }
.r-time { height: 40px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--navy); font: 600 15px/1 var(--font); font-variant-numeric: tabular-nums; flex: none; }
.r-top .acct { position: relative; }
.r-stage { display: flex; flex-direction: column; gap: 8px; padding-top: 4px; min-width: 0; }
.r-frame { position: relative; width: 100%; aspect-ratio: var(--ratio); max-height: 34vh; max-height: 34dvh; margin: 0 auto; border-radius: var(--r-lg); overflow: hidden; background: #0B1020; box-shadow: var(--sh-2); touch-action: pan-y; }
.r-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; pointer-events: none; }
.r-tag { position: absolute; left: 10px; top: 10px; padding: 5px 10px; border-radius: 999px; background: rgba(0,0,0,.72); color: #fff; font-size: 12px; font-weight: 600; }
.r-tag[hidden] { display: none; }
.r-meta { display: flex; align-items: baseline; gap: 10px; font-size: 13.5px; color: var(--muted); min-height: 20px; }
.r-count { font-weight: 700; color: var(--navy); font-size: 15px; font-variant-numeric: tabular-nums; flex: none; }
.r-count small { color: var(--faint); font-weight: 500; font-size: 13px; }
.r-build { flex: none; }
.r-next { margin-left: auto; text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.r-next b { color: var(--ink); font-weight: 600; }
.r-notes { min-height: 0; display: flex; flex-direction: column; margin-top: 10px; border-top: 1px solid var(--line); }
.r-notes-h { display: flex; align-items: center; justify-content: space-between; height: 40px; flex: none; }
.r-fs { display: flex; gap: 2px; }
.r-notes-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; font-size: var(--notes-size, 19px); line-height: 1.5; padding-bottom: 12px; -webkit-overflow-scrolling: touch; }
.r-poll { margin-bottom: 10px; flex: none; }
.r-poll[hidden] { display: none; }
.rp { padding: 12px 14px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); }
.rp-h { display: flex; align-items: center; gap: 10px; }
.rp-n { flex: 1; font-size: 13px; font-weight: 600; color: var(--navy); }
.rp-q { margin: 6px 0 8px; font-size: 15px; font-weight: 600; color: var(--navy); }
.rp-opts { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.rp-opts li { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) 42px; align-items: center; gap: 10px; font-size: 14px; }
.rp-l { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink); }
.rp-b { height: 8px; border-radius: 8px; background: var(--sunken); overflow: hidden; }
.rp-b i { display: block; height: 100%; border-radius: 8px; background: var(--blue); transition: width .6s var(--ease); }
.rp-opts li.ok .rp-b i { background: var(--green); }
.rp-p { text-align: right; font-weight: 700; color: var(--navy); font-variant-numeric: tabular-nums; }
.r-dock { display: flex; flex-direction: column; gap: 10px; padding: 10px 0 max(12px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--bg); }
.r-tools { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.r-tool { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 56px; border-radius: var(--r); border: 0; background: var(--surface); color: var(--ink); font-size: 12px; font-weight: 600; }
.r-tool .i { color: var(--muted); }
.r-tool.on { background: var(--blue-50); color: var(--blue); }
.r-tool.on .i { color: var(--blue); }
.r-badge { position: absolute; top: 5px; right: calc(50% - 26px); min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px; background: var(--blue); color: #fff; font-size: 11px; font-weight: 700; line-height: 19px; text-align: center; }
.r-badge.warn { background: var(--amber); color: #1a1205; }
.r-badge[hidden] { display: none; }
.r-nav { display: grid; grid-template-columns: 1fr 2.2fr; gap: 10px; }
.r-nav .btn { height: 72px; border-radius: var(--r-lg); font-size: 18px; }
.r-nav .btn:disabled { opacity: .45; }
.r-toast { position: fixed; left: 50%; bottom: calc(170px + env(safe-area-inset-bottom)); transform: translate(-50%, 8px); padding: 10px 18px; border-radius: 999px; background: var(--toast-bg); color: var(--toast-fg); font-size: 14px; font-weight: 500; opacity: 0; pointer-events: none; transition: opacity .2s, transform .25s var(--ease); white-space: nowrap; max-width: 92vw; overflow: hidden; text-overflow: ellipsis; z-index: 60; }
.r-toast.on { opacity: 1; transform: translate(-50%, 0); }
.menu .danger, .menu .danger .i { color: var(--red); }

/* bottom sheets */
.sheet { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; background: rgba(3,7,18,0); transition: background .22s; }
.sheet.on { background: rgba(3,7,18,.55); }
.sheet[hidden] { display: none; }
.sheet-in { width: min(640px, 100%); max-height: 88vh; max-height: 88dvh; display: flex; flex-direction: column; padding: 8px 16px max(16px, env(safe-area-inset-bottom)); border-radius: 22px 22px 0 0; background: var(--bg); border: 1px solid var(--line); border-bottom: 0; box-shadow: var(--sh-3); transform: translateY(100%); transition: transform .24s var(--ease); overflow-y: auto; overscroll-behavior: contain; }
.sheet.on .sheet-in { transform: none; }
.sheet-h { position: sticky; top: -8px; z-index: 1; display: flex; align-items: center; justify-content: space-between; min-height: 52px; margin: -8px -16px 0; padding: 0 8px 0 16px; background: var(--bg); flex: none; }
.sheet-h h2 { margin: 0; font-size: 18px; font-weight: 600; color: var(--navy); letter-spacing: -.01em; }
.toc { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.toc button { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; padding: 6px 12px; border-radius: var(--r); border: 0; background: transparent; color: var(--ink); text-align: left; font-size: 15px; }
.toc button.on { background: var(--blue-50); color: var(--navy); }
.toc-n { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: var(--sunken); color: var(--muted); font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.toc button.on .toc-n { background: var(--primary); color: #fff; }
.toc-t { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 500; }
.toc-k { flex: none; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--blue); background: var(--blue-50); padding: 3px 8px; border-radius: 999px; }
.qa-set { display: flex; flex-direction: column; gap: 4px; padding: 4px 0 6px; border-bottom: 1px solid var(--line); }
.qa-set .switch { min-height: 44px; }

@media (hover: hover) {
  .toc button:hover { background: var(--sunken); }
  .r-tool:hover { background: var(--sunken); }
}
/* landscape phone, tablet, desktop: slide and controls on the left, notes on the right */
@media (min-width: 560px) and (orientation: landscape), (min-width: 900px) {
  .remote { grid-template-columns: minmax(0, 1.1fr) minmax(280px, 1fr); grid-template-rows: auto minmax(0, 1fr) auto; column-gap: 20px; }
  .r-top { grid-column: 1 / -1; }
  .r-stage { grid-column: 1; grid-row: 2; }
  .r-frame { max-height: none; }
  .r-notes { grid-column: 2; grid-row: 2 / 4; margin-top: 0; border-top: 0; border-left: 1px solid var(--line); padding-left: 16px; padding-bottom: max(12px, env(safe-area-inset-bottom)); }
  .r-dock { grid-column: 1; grid-row: 3; border-top: 0; }
}
@media (max-height: 500px) and (orientation: landscape) {
  .r-top { min-height: 44px; }
  .r-tool { min-height: 42px; flex-direction: row; gap: 6px; }
  .r-badge { position: static; margin-left: 2px; }
  .r-tool { font-size: 12px; gap: 5px; padding: 0 4px; }
  .r-tool .i { width: 18px; height: 18px; }
  .r-tool span { white-space: nowrap; }
  .r-nav .btn { height: 50px; }
  .r-stage { min-height: 0; }
  /* height comes from the space left between the top bar and the controls; width follows the slide ratio */
  .r-frame { width: auto; max-width: 100%; height: calc(100vh - 218px - env(safe-area-inset-bottom)); height: calc(100dvh - 218px - env(safe-area-inset-bottom)); min-height: 120px; max-height: none; margin: 0 auto; align-self: center; }
}
@media (max-height: 500px) and (orientation: landscape) and (max-width: 740px) {
  .r-tool span { display: none; }
  .r-tool .i { width: 21px; height: 21px; }
}

/* remote: the poll card and the notes scroll together, the header stays */
.r-notes { overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.r-notes-h { position: sticky; top: 0; z-index: 1; background: var(--bg); }
.r-notes-body { flex: none; overflow: visible; min-height: auto; }
.qa-jump { display: flex; align-items: center; width: 100%; min-height: 44px; margin-top: 12px; padding: 0 14px; border-radius: var(--r); border: 1px solid var(--amber); background: var(--amber-50); color: var(--amber); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }

/* Branding: "Present System by Jan Bukhari", kept quiet. */
.brand-sys { font-style: normal; font-weight: 500; color: var(--muted); margin-left: .28em; letter-spacing: -.01em; }
.byline { color: var(--faint, var(--muted)); font-size: 12.5px; line-height: 1.5; letter-spacing: .005em; margin: 0; }
.auth-form .byline { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line, rgba(127,127,127,.18)); }
.join-foot .byline { margin-top: 10px; text-align: center; }
.page-foot { text-align: center; padding: 40px 0 28px; }
@media (max-width: 400px) { .appbar .brand-sys { display: none; } }
