/* Aside TV. Laid out on a fixed 1920x1080 stage that app.js scales to the screen. */
:root {
  --bg: #0b0c10;
  --surface: rgba(16, 18, 24, 0.9);
  --surface-2: rgba(32, 35, 44, 0.92);
  --line: rgba(255, 255, 255, 0.12);
  --text: #f4f1ea;
  --muted: #b3ada2;
  --faint: #7d786f;
  --accent: #f2b544;
  --accent-ink: #1d1503;
  --good: #7fd6a4;
  --warn: #f29b6b;
  --sans: "Inter", "Roboto", "Helvetica Neue", Arial, sans-serif;
  --serif: "DM Serif Display", Georgia, serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { width: 100%; height: 100%; overflow: hidden; background: var(--bg); color: var(--text); font-family: var(--sans); }
button { font: inherit; color: inherit; background: none; border: 0; }
.hidden { display: none !important; }

#stage { position: absolute; left: 0; top: 0; width: 1920px; height: 1080px; transform-origin: 0 0; overflow: hidden; background: var(--bg); }
.screen { position: absolute; inset: 0; }

/* ---------- focus ---------- */
[data-focus] { outline: none; transition: transform .14s ease, box-shadow .14s ease, background-color .14s ease; }
[data-focus].focused { transform: scale(1.05); box-shadow: 0 0 0 5px #fff, 0 12px 40px rgba(0, 0, 0, .55); z-index: 2; }

.btn { display: inline-flex; align-items: center; gap: 14px; height: 76px; padding: 0 38px; border-radius: 40px; background: var(--surface-2); font-size: 30px; font-weight: 600; white-space: nowrap; }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.focused { background: #fff; color: #111; }
.btn .ico { font-size: 26px; }

/* ---------- brand ---------- */
.logo { display: flex; align-items: center; gap: 14px; font-weight: 700; font-size: 40px; letter-spacing: -.5px; }
.logo.small { font-size: 28px; gap: 10px; }
.logo-mark { display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; background: var(--accent); color: var(--accent-ink); font-family: var(--serif); font-size: 38px; line-height: 1; padding-bottom: 6px; }
.logo.small .logo-mark { width: 38px; height: 38px; border-radius: 11px; font-size: 28px; padding-bottom: 4px; }

/* ---------- home ---------- */
.backdrop { position: absolute; inset: 0; background-size: cover; background-position: center 30%; transition: opacity .5s ease; }
.scrim { position: absolute; inset: 0; background:
  linear-gradient(90deg, rgba(11, 12, 16, .97) 0%, rgba(11, 12, 16, .86) 34%, rgba(11, 12, 16, .25) 70%, rgba(11, 12, 16, .1) 100%),
  linear-gradient(0deg, rgba(11, 12, 16, 1) 0%, rgba(11, 12, 16, .7) 30%, rgba(11, 12, 16, 0) 55%); }
.brand { position: absolute; left: 110px; top: 70px; }
.tagline { margin-top: 14px; color: var(--muted); font-size: 24px; }
.hero { position: absolute; left: 110px; top: 215px; width: 1000px; }
.hero-meta { color: var(--accent); font-size: 24px; font-weight: 600; letter-spacing: .5px; text-transform: uppercase; }
.hero-title { margin-top: 10px; font-family: var(--serif); font-weight: 400; font-size: 108px; line-height: 1; letter-spacing: -1px; }
.hero-logline { margin-top: 20px; font-size: 29px; line-height: 1.45; color: #dcd7cd; max-width: 900px; }
.hero-actions { margin-top: 34px; display: flex; gap: 22px; }
.rows { position: absolute; left: 110px; right: 110px; top: 655px; }
.row-label { font-size: 21px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: 14px; }
.cards { display: flex; gap: 28px; margin-bottom: 26px; }
.card { position: relative; width: 288px; height: 162px; border-radius: 16px; overflow: hidden; background: #222 center/cover; }
.card .card-title { position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 18px 14px; font-weight: 600; font-size: 24px; background: linear-gradient(0deg, rgba(0,0,0,.85), rgba(0,0,0,0)); }
.card .card-progress { position: absolute; left: 0; bottom: 0; height: 6px; background: var(--accent); }
.card.current::after { content: ""; position: absolute; inset: 0; border-radius: 16px; box-shadow: inset 0 0 0 3px var(--accent); }
.toggles { display: flex; gap: 22px; }
.toggle { display: flex; align-items: center; gap: 18px; height: 72px; padding: 0 30px; border-radius: 36px; background: var(--surface-2); font-size: 26px; font-weight: 500; }
.toggle .state { min-width: 64px; padding: 6px 14px; border-radius: 20px; text-align: center; font-size: 20px; font-weight: 700; background: rgba(255,255,255,.12); color: var(--muted); }
.toggle.on .state { background: var(--accent); color: var(--accent-ink); }
.toggle.focused { background: #fff; color: #111; }
.credits { position: absolute; left: 110px; right: 110px; bottom: 22px; font-size: 17px; color: var(--faint); }

/* ---------- player ---------- */
#video { position: absolute; inset: 0; width: 100%; height: 100%; background: #000; object-fit: contain; }
.captions { position: absolute; left: 260px; right: 260px; bottom: 96px; text-align: center; font-size: 44px; font-weight: 500; line-height: 1.3; text-shadow: 0 2px 6px #000, 0 0 2px #000; }
.ad-caption { position: absolute; left: 50%; transform: translateX(-50%); top: 56px; max-width: 1500px; display: flex; align-items: center; gap: 18px; padding: 16px 28px; border-radius: 18px; background: rgba(10, 11, 14, .82); font-size: 30px; line-height: 1.35; }
.ad-icon { flex: none; padding: 4px 12px; border-radius: 8px; border: 2px solid var(--accent); color: var(--accent); font-weight: 700; font-size: 22px; letter-spacing: 1px; }
.pill { position: absolute; display: flex; align-items: center; gap: 12px; padding: 12px 24px; border-radius: 30px; background: rgba(10, 11, 14, .78); font-size: 22px; font-weight: 600; }
.phone-pill { right: 60px; top: 50px; }
.dot { width: 12px; height: 12px; border-radius: 50%; background: var(--good); box-shadow: 0 0 12px var(--good); }

.controls { position: absolute; inset: 0; background: linear-gradient(0deg, rgba(0,0,0,.85) 0%, rgba(0,0,0,0) 32%), linear-gradient(180deg, rgba(0,0,0,.7) 0%, rgba(0,0,0,0) 22%); }
.controls-top { position: absolute; left: 90px; top: 60px; }
.ctl-title { font-family: var(--serif); font-size: 56px; }
.ctl-sub { margin-top: 8px; font-size: 24px; color: var(--muted); }
.ctl-sub b { color: var(--accent); }
.controls-bottom { position: absolute; left: 90px; right: 90px; bottom: 60px; }
.progress { position: relative; height: 10px; border-radius: 5px; background: rgba(255,255,255,.25); }
.progress-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 5px; background: var(--accent); }
.progress-head { position: absolute; top: 50%; width: 26px; height: 26px; margin: -13px 0 0 -13px; border-radius: 50%; background: #fff; }
.ctl-row { display: flex; justify-content: space-between; margin-top: 22px; font-size: 26px; color: #ddd; }
kbd { display: inline-block; min-width: 40px; margin: 0 8px 0 26px; padding: 2px 10px; border-radius: 8px; background: rgba(255,255,255,.16); font-family: var(--sans); font-size: 22px; text-align: center; }

.buffering { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.spinner { width: 90px; height: 90px; border-radius: 50%; border: 8px solid rgba(255,255,255,.2); border-top-color: var(--accent); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* aside bar */
.asidebar { position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 80px 70px; background: linear-gradient(0deg, rgba(8,9,12,.97) 0%, rgba(8,9,12,.9) 70%, rgba(8,9,12,0) 100%); }
.asidebar-head { display: flex; align-items: center; gap: 28px; margin-bottom: 30px; }
.asidebar-sub { font-size: 26px; color: var(--muted); }
.asidebar-sub b { color: var(--accent); }
.chips { display: flex; gap: 14px; flex-wrap: nowrap; }
.chip { display: flex; align-items: center; gap: 12px; height: 80px; padding: 0 26px; border-radius: 40px; background: var(--surface-2); font-size: 26px; font-weight: 600; white-space: nowrap; }
.chip .ico { width: 26px; height: 26px; }
.chip .ico { font-size: 30px; }
.chip.focused { background: var(--accent); color: var(--accent-ink); }
.chip-phone { box-shadow: inset 0 0 0 3px var(--accent); }

/* answer card */
.answer { position: absolute; top: 0; right: 0; bottom: 0; width: 820px; padding: 80px 70px 60px; background: linear-gradient(270deg, rgba(10,11,15,.98) 0%, rgba(10,11,15,.95) 80%, rgba(10,11,15,.85) 100%); border-left: 1px solid var(--line); display: flex; flex-direction: column; }
.answer-q { font-size: 26px; font-weight: 600; color: var(--accent); text-transform: uppercase; letter-spacing: 1px; line-height: 1.35; }
.answer-from { margin-top: 10px; font-size: 22px; color: var(--muted); }
.answer-body { margin-top: 28px; font-size: 38px; line-height: 1.45; font-weight: 400; }
.answer-thinking { margin-top: 34px; display: flex; align-items: center; gap: 22px; font-size: 28px; color: var(--muted); }
.dots { display: inline-flex; gap: 10px; }
.dots i { width: 14px; height: 14px; border-radius: 50%; background: var(--accent); animation: blink 1.2s infinite ease-in-out; }
.dots i:nth-child(2) { animation-delay: .2s; }
.dots i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; transform: scale(.8); } 40% { opacity: 1; transform: scale(1); } }
.answer-moments { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 16px; }
.moment { display: flex; align-items: center; gap: 12px; height: 64px; padding: 0 26px; border-radius: 32px; background: var(--surface-2); font-size: 24px; font-weight: 600; }
.moment.focused { background: #fff; color: #111; }
.answer-actions { margin-top: auto; padding-top: 30px; display: flex; gap: 18px; }
.answer-guard { margin-top: 26px; font-size: 21px; color: var(--faint); line-height: 1.4; }
.answer-guard .ok { color: var(--good); }
.answer-guard .rw { color: var(--warn); }

/* pairing */
.pair, .welcome { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(5, 6, 8, .82); }
.pair-card { display: flex; gap: 70px; align-items: center; width: 1460px; padding: 70px; border-radius: 36px; background: var(--surface); border: 1px solid var(--line); }
#pair-qr { width: 420px; height: 420px; border-radius: 24px; background: #fff; padding: 22px; image-rendering: pixelated; }
.pair-text h2 { font-family: var(--serif); font-weight: 400; font-size: 64px; line-height: 1.05; }
.pair-text p { margin-top: 22px; font-size: 28px; line-height: 1.5; color: #d6d1c7; }
.pair-code b { color: var(--accent); }
.pair-status { margin-top: 26px; font-size: 26px; font-weight: 600; color: var(--muted); }
.pair-status.ok { color: var(--good); }
.pair-actions { margin-top: 34px; }

.welcome-card { width: 1100px; padding: 70px 80px; border-radius: 36px; background: var(--surface); border: 1px solid var(--line); }
.welcome-card h2 { margin-top: 30px; font-family: var(--serif); font-weight: 400; font-size: 72px; }
.welcome-card p { margin-top: 18px; font-size: 32px; line-height: 1.45; color: #d6d1c7; }
.welcome-actions { margin-top: 44px; display: flex; gap: 22px; }

.toast { position: absolute; left: 50%; bottom: 80px; transform: translateX(-50%); padding: 22px 38px; border-radius: 22px; background: rgba(15, 16, 21, .95); border: 1px solid var(--line); font-size: 28px; font-weight: 500; }
