/* WTV shell: gold header, phone tab bar (with Ask WTV in its center), menus and sheets, install card,
   Ask WTV panel, welcome sheet, Home for signed-in people, and the rules that fit FM, Studio and the
   Controller inside WTV. Loaded on every WTV page, including FM, Studio and the Controller. */
:root {
  --wtv-black: #050505;
  --wtv-ink: #0d0d0d;
  --wtv-panel: #141210;
  --wtv-line: rgba(201, 168, 76, .32);
  --wtv-gold: #c9a84c;
  --wtv-gold-hi: #f6e29b;
  --wtv-gold-lo: #8b6914;
  --wtv-gold-grad: linear-gradient(135deg, #f6e29b 0%, #c9a84c 52%, #9a7414 100%);
  --wtv-text: #f5f1e6;
  --wtv-muted: #c9c2b0;
  --wtv-head: "Cinzel", Georgia, serif;
  --wtv-body: "Open Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --wtv-bar: 56px;
  --wtv-tab: 0px;
  --wtv-ebar: 52px; /* the WTV header on FM, Studio and the Controller */
  --wtv-fast: 160ms;
}
.wtv-sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* Page changes fade quickly (under 200 ms) where the browser supports it; never with reduced motion */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 140ms; }
@media (prefers-reduced-motion: reduce) { @view-transition { navigation: none; } }

/* ---------- Header ---------- */
.wtv-bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  height: calc(var(--wtv-bar) + env(safe-area-inset-top)); padding: env(safe-area-inset-top) max(12px, env(safe-area-inset-right)) 0 max(12px, env(safe-area-inset-left));
  display: flex; align-items: center; gap: 8px;
  background: rgba(5, 5, 5, .95); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--wtv-line);
  font-family: var(--wtv-body); color: var(--wtv-text); box-sizing: border-box;
}
.wtv-bar *, .wtv-tabs *, .wtv-sheet *, .wtv-ask *, .wtv-modal *, .wtv-install *, .wtv-page *, .wtv-banner *, .wtv-wsheet *, .wtv-tvgate *, .wtv-incard * { box-sizing: border-box; }
.wtv-bar [hidden], .wtv-sheet [hidden], .wtv-ask [hidden], .wtv-modal [hidden], .wtv-page [hidden], .wtv-wsheet [hidden], .wtv-tabs [hidden] { display: none !important; }
body.wtv-shell { padding-top: calc(var(--wtv-bar) + env(safe-area-inset-top)); }
/* Room under the last control so the tab bar never covers it */
body.wtv-shell.wtv-has-tabs { padding-bottom: calc(var(--wtv-tab) + env(safe-area-inset-bottom) + 24px); }
.wtv-brand { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--wtv-text); flex: none; border-radius: 12px; padding: 2px 4px; min-height: 44px; }
.wtv-brand img { width: 40px; height: 40px; filter: drop-shadow(0 0 6px rgba(246, 226, 155, .35)); }
.wtv-brand > span { font-family: var(--wtv-head); font-weight: 800; font-size: 20px; letter-spacing: .08em; background: var(--wtv-gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.wtv-brand .wtv-here { display: none; font: 700 15px var(--wtv-body); letter-spacing: 0; color: var(--wtv-text); -webkit-text-fill-color: var(--wtv-text); background: none; }
.wtv-bar .wtv-nav { display: flex; flex-direction: row; flex-wrap: nowrap; align-items: center; gap: 2px; margin-left: 8px; overflow-x: auto; scrollbar-width: none; }
.wtv-nav::-webkit-scrollbar { display: none; }
.wtv-nav a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px; color: var(--wtv-muted); text-decoration: none; font-weight: 600; font-size: 14px; padding: 0 12px; border-radius: 999px; white-space: nowrap; }
.wtv-nav a:hover { color: var(--wtv-text); background: rgba(255, 255, 255, .06); }
.wtv-nav a[aria-current="page"] { color: #120d02; background: var(--wtv-gold-grad); font-weight: 800; }
.wtv-spacer { flex: 1; }
.wtv-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 999px;
  font: 800 14px/1 var(--wtv-body); text-decoration: none; cursor: pointer; border: 0; white-space: nowrap;
}
.wtv-btn.wtv-btn--gold { background: var(--wtv-gold-grad); color: #120d02; box-shadow: 0 4px 18px rgba(201, 168, 76, .25); }
.wtv-btn--gold:hover { filter: brightness(1.07); }
.wtv-btn.wtv-btn--line { background: transparent; color: var(--wtv-text); box-shadow: inset 0 0 0 1.5px var(--wtv-line); }
.wtv-btn--line:hover { box-shadow: inset 0 0 0 1.5px var(--wtv-gold); }
.wtv-btn--sm { min-height: 44px; padding: 0 14px; font-size: 13px; }
.wtv-shell a:focus-visible, .wtv-shell button:focus-visible, .wtv-shell input:focus-visible, .wtv-shell select:focus-visible, .wtv-shell summary:focus-visible,
.wtv-page a:focus-visible, .wtv-page button:focus-visible {
  outline: 3px solid var(--wtv-gold-hi); outline-offset: 2px;
}
.wtv-askbtn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px 0 6px; border-radius: 999px; border: 1.5px solid rgba(246, 226, 155, .6); background: radial-gradient(circle at 30% 40%, #2a1f07, #0b0904 75%); color: var(--wtv-gold-hi); font: 800 14px var(--wtv-body); cursor: pointer; white-space: nowrap; box-shadow: 0 0 16px rgba(246, 226, 155, .18); }
.wtv-askbtn img { width: 32px; height: 32px; }
.wtv-askbtn:hover, .wtv-askbtn[aria-expanded="true"] { background: rgba(201, 168, 76, .2); }
.wtv-me { width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer; background: var(--wtv-gold-grad); color: #120d02; font: 800 17px/1 var(--wtv-head); flex: none; }
.wtv-studiomenu { display: none; }
.wtv-bar .wtv-studiomenu { width: 44px; padding: 0; flex: none; }
.wtv-install-btn[hidden] { display: none; }

/* ---------- Menus and sheets ---------- */
.wtv-scrim { position: fixed; inset: 0; z-index: 1002; background: rgba(0, 0, 0, .55); }
.wtv-scrim[hidden] { display: none; }
.wtv-sheet {
  position: fixed; z-index: 1003; right: max(12px, env(safe-area-inset-right)); top: calc(var(--wtv-bar) + env(safe-area-inset-top) + 6px);
  width: min(340px, calc(100vw - 24px)); max-height: calc(100dvh - var(--wtv-bar) - 24px); overflow-y: auto; background: #12100c; border: 1px solid var(--wtv-line); border-radius: 18px; padding: 8px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .6); font-family: var(--wtv-body); color: var(--wtv-text);
  animation: wtv-drop var(--wtv-fast) ease-out;
}
.wtv-embed .wtv-sheet { top: calc(var(--wtv-ebar) + 6px); }
.wtv-sheet[hidden] { display: none; }
.wtv-sheet .who { padding: 10px 12px 12px; border-bottom: 1px solid rgba(255, 255, 255, .08); margin-bottom: 6px; }
.wtv-sheet .who b { display: block; font-size: 15px; }
.wtv-sheet .who small { color: var(--wtv-muted); font-size: 13px; word-break: break-all; }
.wtv-sheet a, .wtv-sheet button { display: flex; width: 100%; align-items: center; gap: 12px; min-height: 48px; padding: 0 12px; border-radius: 12px; color: var(--wtv-text); text-decoration: none; font: 600 15px/1.2 var(--wtv-body); background: none; border: 0; cursor: pointer; text-align: left; }
.wtv-sheet a svg, .wtv-sheet button svg { width: 22px; height: 22px; flex: none; color: var(--wtv-gold-hi); }
.wtv-sheet a:hover, .wtv-sheet button:hover { background: rgba(201, 168, 76, .12); }
.wtv-sheet a[aria-current="page"] { background: rgba(201, 168, 76, .16); color: var(--wtv-gold-hi); }
.wtv-sheet .warn { color: #ffd59a; }
.wtv-sheet hr { border: 0; border-top: 1px solid rgba(255, 255, 255, .08); margin: 6px 0; }
.wtv-sheet .grab { display: none; }
@keyframes wtv-drop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@keyframes wtv-rise { from { transform: translateY(24px); opacity: .4; } to { transform: none; opacity: 1; } }

/* ---------- Phone tab bar (Home, TV, Ask, FM, Studio, More) ---------- */
.wtv-tabs { display: none; }
@media (max-width: 720px) {
  :root { --wtv-bar: 52px; }
  .wtv-nav, .wtv-hide-phone { display: none !important; }
  .wtv-brand img { width: 34px; height: 34px; }
  .wtv-brand > span { font-size: 18px; }
  .wtv-brand .wtv-here { display: inline; }
  body.wtv-has-tabs { --wtv-tab: 64px; }
  .wtv-has-tabs .wtv-tabs {
    display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); align-items: stretch;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 1000; height: calc(var(--wtv-tab) + env(safe-area-inset-bottom));
    padding: 0 max(2px, env(safe-area-inset-right)) env(safe-area-inset-bottom) max(2px, env(safe-area-inset-left)); background: #050505; border-top: 1px solid var(--wtv-line);
    font-family: var(--wtv-body);
  }
  .wtv-tabs a, .wtv-tabs button { display: grid; justify-items: center; align-content: center; gap: 3px; min-height: 44px; color: #b3ab9b; text-decoration: none; font: 700 11px/1 var(--wtv-body); background: none; border: 0; border-radius: 12px; cursor: pointer; min-width: 0; padding: 0; }
  .wtv-tabs svg { width: 24px; height: 24px; }
  .wtv-tabs [aria-current="page"], .wtv-tabs [aria-expanded="true"] { color: var(--wtv-gold-hi); }
  .wtv-tabs [aria-current="page"] svg { filter: drop-shadow(0 0 6px rgba(246, 226, 155, .5)); }
  .wtv-tabs [aria-current="page"]::after { content: ""; display: block; width: 18px; height: 3px; border-radius: 3px; background: var(--wtv-gold-hi); margin-top: 1px; }
  /* Ask WTV: a gold button in the middle of the bar, fully inside it so it never covers the page */
  .wtv-tabs .wtv-tab-ask { gap: 2px; color: var(--wtv-gold-hi); }
  .wtv-tabs .wtv-tab-ask i { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid rgba(246, 226, 155, .7); background: radial-gradient(circle at 50% 40%, #2a1f07, #050505 72%); box-shadow: 0 0 0 3px rgba(201, 168, 76, .14), 0 0 16px rgba(246, 226, 155, .3); }
  .wtv-tabs .wtv-tab-ask img { width: 34px; height: 34px; }
  .wtv-tabs .wtv-tab-ask span { font-size: 10px; }
  .wtv-tabs .wtv-tab-ask.listening i { box-shadow: 0 0 0 4px rgba(246, 226, 155, .5), 0 0 26px rgba(246, 226, 155, .6); }
  /* Keyboard open on a phone: the tab bar steps aside so it never hides the field being typed in */
  body.wtv-kb .wtv-tabs, body.wtv-kb .wtv-install { display: none !important; }
  body.wtv-kb.wtv-has-tabs { padding-bottom: 24px; }
  .wtv-sheet.wtv-sheet--phone { top: auto; left: 0; right: 0; bottom: 0; width: auto; max-height: 82dvh; border-radius: 22px 22px 0 0; padding: 6px 10px calc(14px + env(safe-area-inset-bottom)); animation: wtv-rise var(--wtv-fast) ease-out; }
  .wtv-sheet.wtv-sheet--phone .grab { display: block; width: 44px; height: 5px; border-radius: 5px; background: rgba(255, 255, 255, .28); margin: 4px auto 8px; }
  .wtv-askbtn { display: none !important; }
}

/* ---------- TV inside the shell ---------- */
body.wtv-shell.wtv-s-tv .topbar, body.wtv-shell.wtv-s-tv:has(.app-shell) .topbar { top: calc(var(--banner-h, 0px) + var(--wtv-bar) + env(safe-area-inset-top)); }
body.wtv-shell.wtv-s-tv .preview-banner { top: calc(var(--wtv-bar) + env(safe-area-inset-top)); }
@media (max-width: 720px) {
  body.wtv-shell.wtv-s-tv .tabbar { display: none !important; }
  body.wtv-shell.wtv-s-tv .topbar .wtv-tv-brand { display: none !important; }
  body.wtv-shell.wtv-s-tv .sitefoot { padding-bottom: 24px; }
}
body.wtv-shell.wtv-s-tv[data-route="watch"] { padding-top: 0; padding-bottom: 0; }
body.wtv-s-tv[data-route="watch"] .wtv-bar, body.wtv-s-tv[data-route="watch"] .wtv-tabs, body.wtv-s-tv[data-route="watch"] .wtv-ask { display: none !important; }
.wtv-tv-brand { display: inline-flex !important; align-items: center; gap: 6px; height: auto !important; }
.wtv-tv-brand img { width: 34px; height: 34px; }
.wtv-tv-brand span { font-family: var(--wtv-head); font-weight: 800; letter-spacing: .06em; color: var(--wtv-gold-hi); font-size: 18px; white-space: nowrap; }
.wtv-tv-brand b { color: #fff; }
.wtv-tv-brand.lg img { width: 56px; height: 56px; }
.wtv-tv-brand.lg span { font-size: 26px; }

/* TV signed out: one short screen instead of a silent bounce */
.wtv-tvgate { display: grid; justify-items: center; text-align: center; gap: 14px; padding: 36px 16px 28px; max-width: 760px; margin: 0 auto; font-family: var(--wtv-body); color: var(--wtv-text); }
.wtv-tvgate > img { width: 120px; height: 120px; filter: drop-shadow(0 0 18px rgba(246, 226, 155, .35)); }
html .wtv-tvgate h1 { margin: 0; font: 900 clamp(26px, 6vw, 38px)/1.15 var(--wtv-head); color: var(--wtv-gold-hi); }
.wtv-tvgate p { margin: 0; color: var(--wtv-muted); max-width: 480px; }
.wtv-tvgate .cta { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 4px; }
html .wtv-tvgate h2 { margin: 18px 0 0; font: 800 18px var(--wtv-head); color: var(--wtv-text); }
.wtv-tvgate .free { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; width: 100%; }
.wtv-tvgate .free a { display: grid; gap: 6px; text-decoration: none; color: var(--wtv-text); font-weight: 700; font-size: 14px; border-radius: 14px; padding: 6px; background: #0f0d0a; border: 1px solid rgba(255, 255, 255, .08); }
.wtv-tvgate .free a:hover { border-color: var(--wtv-gold); }
.wtv-tvgate .free img { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: 10px; background: #1a1712; }
.wtv-tvgate .free small { color: var(--wtv-muted); font-weight: 600; font-size: 12px; }
@media (max-width: 420px) { .wtv-tvgate .free { grid-template-columns: 1fr 1fr; } .wtv-tvgate .free a:nth-child(3) { grid-column: 1 / -1; } }

/* ---------- FM, Studio and the Controller inside WTV ---------- */
body.wtv-embed { padding-top: 0 !important; }
.wtv-bar--embed { position: relative; z-index: 60; height: calc(var(--wtv-ebar) + env(safe-area-inset-top)); }
.wtv-bar--embed .wtv-brand img { width: 34px; height: 34px; }
@media (min-width: 721px) {
  /* Desktop: the WTV header stays in view, and the section's own sticky parts sit under it */
  .wtv-bar--embed { position: sticky; top: 0; z-index: 61; }
  html.wtv-in-fm .top { top: var(--wtv-ebar); }
  html.wtv-in-fm .gate#gate { top: var(--wtv-ebar); z-index: 59; }
  html.wtv-in-studio .side, html.wtv-in-controller .side { top: var(--wtv-ebar) !important; height: calc(100dvh - var(--wtv-ebar)) !important; }
  html.wtv-in-studio .pubbox { top: calc(var(--wtv-ebar) + 20px); }
  html.wtv-in-studio .mix-picked { top: calc(var(--wtv-ebar) + 12px); }
}
@media (min-width: 721px) and (max-width: 900px) { html.wtv-in-studio .side { top: auto !important; height: auto !important; } }
@media (min-width: 721px) and (max-width: 760px) { html.wtv-in-controller .side { top: auto !important; height: auto !important; } }
@media (min-width: 721px) and (max-width: 760px) { html.wtv-in-fm { --tab: 0px; } }
@media (max-width: 720px) {
  .wtv-bar--embed { --wtv-ebar: 52px; }
  /* Sections' bottom bars sit on top of the WTV tab bar */
  html.wtv-in { --tab: calc(var(--wtv-tab-h, 64px) + 0px); }
  html.wtv-in-fm .player { bottom: calc(var(--wtv-tab-h, 64px) + env(safe-area-inset-bottom)) !important; }
  html.wtv-in-fm .gate#gate { top: calc(var(--wtv-ebar) + env(safe-area-inset-top)); bottom: calc(var(--wtv-tab-h, 64px) + env(safe-area-inset-bottom)); z-index: 999; }
  /* FM's welcome window sits between the WTV header and tab bar, both in view */
  html.wtv-in-fm body:has(#gate:not([hidden])) .wtv-bar--embed { position: fixed; top: 0; left: 0; right: 0; z-index: 1000; }
  html.wtv-in-studio .pbar { bottom: calc(var(--wtv-tab-h, 64px) + env(safe-area-inset-bottom)) !important; }
  html.wtv-in-studio .side { bottom: calc(var(--wtv-tab-h, 64px) + env(safe-area-inset-bottom)) !important; height: auto !important; z-index: 1001 !important; }
  html.wtv-in-studio .drawer-backdrop { z-index: 1000 !important; }
  html.wtv-in-studio .toast, html.wtv-in-controller .mc-toast { bottom: calc(var(--wtv-tab-h, 64px) + env(safe-area-inset-bottom) + 90px) !important; }
  html.wtv-in-studio .tour-offer { bottom: calc(var(--wtv-tab-h, 64px) + env(safe-area-inset-bottom) + 90px) !important; }
  html.wtv-in-studio body.np-open .np { bottom: calc(var(--wtv-tab-h, 64px) + env(safe-area-inset-bottom)) !important; }
  html.wtv-in-studio .main, html.wtv-in-controller .main { padding-bottom: calc(var(--wtv-tab-h, 64px) + 140px) !important; }
  .wtv-s-studio .wtv-studiomenu { display: inline-flex; }
}
/* FM's own phone tab bar becomes a row under FM's header (one bottom bar only: WTV's) */
html.wtv-in-fm .top > .tabbar { position: static !important; display: none; flex-basis: 100%; height: auto !important; padding: 2px 0 0 !important; background: none !important; border: 0 !important; gap: 4px; overflow-x: auto; scrollbar-width: none; }
@media (max-width: 760px) { html.wtv-in-fm .top > .tabbar { display: flex !important; } }
html.wtv-in-fm .top > .tabbar a { flex: 1 0 auto; flex-direction: row !important; gap: 6px !important; min-height: 44px; padding: 0 12px; border-radius: 999px; font-size: 13px !important; }
html.wtv-in-fm .top > .tabbar a.on { background: rgba(226, 183, 64, .14); }
html.wtv-in-fm .top > .tabbar svg { width: 18px !important; height: 18px !important; }
/* One sign-in: FM's own sign-up form, Studio's top bar and App Store pills, and the Controller's Install button are hidden */
html.wtv-in-fm #gate .tabs, html.wtv-in-fm #gate #authForm, html.wtv-in-fm #gate .gate-body > p.fine { display: none !important; }
html.wtv-in-fm.wtv-auth #gate { display: none !important; }
/* FM's header: WTV's header already has the logo and Sign in */
@media (max-width: 720px) { html.wtv-in-fm .top > .brand { display: none !important; } }
html.wtv-in-fm:not(.wtv-auth) #meBtn { display: none !important; }
html.wtv-in-studio #topbar, html.wtv-in-studio .store-links, html.wtv-in-studio .store-links-phone, html.wtv-in-studio .side-store { display: none !important; }
html.wtv-in-studio #installBtn, html.wtv-in-controller #installBtn, html.wtv-in-fm a[href="#/get"] { display: none !important; }
html.wtv-in-studio body.np-open .np { top: 0; }

/* The WTV sign-in card inside FM's welcome window */
.wtv-incard { margin: 14px 0 6px; padding: 16px; border-radius: 16px; background: #0f0d09; border: 1px solid var(--wtv-line); font-family: var(--wtv-body); color: var(--wtv-text); display: grid; gap: 12px; text-align: left; min-width: 0; }
.wtv-incard .head { display: flex; gap: 12px; align-items: center; min-width: 0; }
.wtv-incard .head img { width: 44px; height: 44px; flex: none; }
.wtv-incard .head > div { min-width: 0; }
.wtv-incard b { display: block; font-size: 16px; line-height: 1.3; }
.wtv-incard p { margin: 2px 0 0; color: var(--wtv-muted); font-size: 14px; line-height: 1.45; }
.wtv-incard .row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.wtv-incard .wtv-btn { white-space: normal; text-align: center; line-height: 1.2; min-height: 48px; padding: 6px 12px; }
@media (max-width: 480px) { .wtv-incard .row { grid-template-columns: 1fr; } }

/* A small banner on a section whose sign-in didn't connect, with one next step */
.wtv-banner { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 0; padding: 10px max(12px, env(safe-area-inset-left)); background: #1d1709; border-bottom: 1px solid var(--wtv-gold); font: 600 14px/1.4 var(--wtv-body); color: var(--wtv-text); position: relative; z-index: 59; }
.wtv-banner p { margin: 0; flex: 1; min-width: 180px; }
.wtv-banner .x { width: 44px; height: 44px; border-radius: 50%; border: 0; background: none; color: var(--wtv-muted); font-size: 22px; cursor: pointer; }
body.wtv-shell:not(.wtv-embed) .wtv-banner { position: sticky; top: calc(var(--wtv-bar) + env(safe-area-inset-top)); }

/* ---------- Splash (installed app launch only) and loading ---------- */
.wtv-splash { display: none; }
html.wtv-launch .wtv-splash { position: fixed; inset: 0; z-index: 2000; display: grid; place-items: center; background: radial-gradient(circle at 50% 42%, #1d1606 0%, #050505 60%); transition: opacity .3s ease, visibility .3s; }
.wtv-splash.out { opacity: 0; visibility: hidden; }
.wtv-splash div { display: grid; justify-items: center; gap: 14px; }
.wtv-splash img { width: min(42vw, 200px); height: auto; animation: wtv-glow 2.4s ease-in-out infinite; }
.wtv-splash p { margin: 0; font: 700 14px var(--wtv-head); letter-spacing: .3em; color: var(--wtv-gold-hi); text-transform: uppercase; }
.wtv-loading { display: grid; place-items: center; gap: 12px; padding: 48px 16px; color: var(--wtv-muted); font-family: var(--wtv-body); }
.wtv-loading img { width: 72px; height: 72px; animation: wtv-pulse 1.6s ease-in-out infinite; }
.wtv-empty { display: grid; justify-items: center; gap: 10px; text-align: center; padding: 36px 16px; color: var(--wtv-muted); font-family: var(--wtv-body); }
.wtv-empty img { width: 84px; height: 84px; opacity: .85; }
/* Skeletons: the shape of what's coming instead of a blank screen */
.wtv-skel { background: linear-gradient(90deg, #15130f 0%, #221d14 45%, #15130f 90%); background-size: 200% 100%; animation: wtv-shimmer 1.2s linear infinite; border-radius: 12px; }
.wtv-skel-row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(200px, 240px); gap: 12px; overflow: hidden; }
.wtv-skel-row .wtv-skel { aspect-ratio: 16/11; }
.wtv-skel-line { height: 18px; width: 40%; margin: 28px 0 12px; }
@keyframes wtv-shimmer { to { background-position: -200% 0; } }
@keyframes wtv-glow { 0%, 100% { filter: drop-shadow(0 0 10px rgba(246, 226, 155, .25)); } 50% { filter: drop-shadow(0 0 28px rgba(246, 226, 155, .6)); } }
@keyframes wtv-pulse { 0%, 100% { transform: scale(1); opacity: .9; } 50% { transform: scale(1.06); opacity: 1; } }

/* ---------- Install card ---------- */
.wtv-install {
  position: fixed; z-index: 1001; left: 0; right: 0; margin: 0 auto; bottom: calc(var(--wtv-tab) + env(safe-area-inset-bottom) + 12px);
  width: min(460px, calc(100vw - 20px)); display: grid; grid-template-columns: 56px 1fr auto auto; gap: 10px; align-items: center;
  background: #12100c; border: 1px solid var(--wtv-line); border-radius: 18px; padding: 10px 6px 10px 12px; box-shadow: 0 16px 50px rgba(0, 0, 0, .65);
  font-family: var(--wtv-body); color: var(--wtv-text); animation: wtv-rise var(--wtv-fast) ease-out;
}
.wtv-install[hidden] { display: none; }
.wtv-install img { width: 56px; height: 56px; border-radius: 14px; }
.wtv-install b { display: block; font-size: 15px; }
.wtv-install p { margin: 2px 0 0; font-size: 13px; color: var(--wtv-muted); }
.wtv-install .x { width: 44px; height: 44px; border-radius: 50%; border: 0; background: none; color: var(--wtv-muted); cursor: pointer; font-size: 22px; }
body.wtv-ask-open .wtv-install { display: none; }
/* While the install card shows, the page ends above it too */
body.wtv-shell.wtv-has-install { padding-bottom: calc(var(--wtv-tab) + env(safe-area-inset-bottom) + 112px); }

/* ---------- Ask WTV panel: bottom sheet on phones, side panel on desktop ---------- */
.wtv-ask {
  position: fixed; z-index: 1004; top: calc(var(--wtv-bar) + env(safe-area-inset-top)); right: 0; bottom: 0;
  width: min(420px, 100vw); display: flex; flex-direction: column; background: #0c0b09; border-left: 1px solid var(--wtv-line);
  box-shadow: -24px 0 70px rgba(0, 0, 0, .6); font-family: var(--wtv-body); color: var(--wtv-text);
  animation: wtv-slide var(--wtv-fast) ease-out;
}
@media (min-width: 721px) { .wtv-embed .wtv-ask:not(.page) { top: var(--wtv-ebar); } }
@keyframes wtv-slide { from { transform: translateX(24px); opacity: .4; } to { transform: none; opacity: 1; } }
.wtv-ask[hidden] { display: none; }
.wtv-ask.page { position: relative; inset: auto; width: min(860px, 100%); height: calc(100dvh - var(--wtv-bar) - var(--wtv-tab) - 48px); min-height: 520px; margin: 20px auto; border: 1px solid var(--wtv-line); border-radius: 22px; overflow: hidden; box-shadow: none; animation: none; }
.wtv-ask .grab { display: none; }
@media (max-width: 720px) {
  .wtv-ask:not(.page) { top: auto; left: 0; right: 0; width: 100%; height: 85dvh; border: 1px solid var(--wtv-line); border-bottom: 0; border-radius: 22px 22px 0 0; padding-bottom: env(safe-area-inset-bottom); box-shadow: 0 -24px 70px rgba(0, 0, 0, .7); animation: wtv-rise var(--wtv-fast) ease-out; touch-action: pan-y; }
  .wtv-ask:not(.page) .grab { display: block; width: 100%; height: 22px; border: 0; background: none; padding: 0; cursor: grab; touch-action: none; flex: none; }
  .wtv-ask:not(.page) .grab::before { content: ""; display: block; width: 48px; height: 5px; border-radius: 5px; background: rgba(255, 255, 255, .3); margin: 9px auto 0; }
  .wtv-ask.page { margin: 0; border-radius: 0; border-left: 0; border-right: 0; height: calc(100dvh - var(--wtv-bar) - var(--wtv-tab) - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 24px); min-height: 0; }
}
.wtv-ask-backdrop { position: fixed; inset: 0; z-index: 1003; background: rgba(0, 0, 0, .5); }
.wtv-ask-backdrop[hidden] { display: none; }
@media (min-width: 721px) { .wtv-ask-backdrop { display: none !important; } }
.wtv-ask header { display: flex; align-items: center; gap: 10px; padding: 8px 10px 10px 14px; border-bottom: 1px solid rgba(255, 255, 255, .07); background: linear-gradient(180deg, #17130a, #0c0b09); }
.wtv-ask header img { width: 40px; height: 40px; }
.wtv-ask header h2 { margin: 0; font: 800 18px var(--wtv-head); letter-spacing: .04em; color: var(--wtv-gold-hi); }
.wtv-ask header p { margin: 0; font-size: 12px; color: var(--wtv-muted); }
.wtv-ask header p a { color: var(--wtv-gold-hi); }
.wtv-ask header .grow { flex: 1; min-width: 0; }
.wtv-ask header h2 { white-space: nowrap; }
/* The voice in use is shown in Settings, so the header keeps room for the title */
.wtv-ask header [data-device-note] { display: none !important; }
@media (max-width: 720px) { .wtv-ask header { padding-top: 0; } }
.wtv-ask, .wtv-ask button, .wtv-ask input, .wtv-ask select { font-family: var(--wtv-body); }
.wtv-log > * { flex: none; }
.wtv-icon { width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .14); background: transparent; color: var(--wtv-text); display: grid; place-items: center; cursor: pointer; flex: none; }
.wtv-icon:hover { border-color: var(--wtv-gold); }
.wtv-icon svg { width: 20px; height: 20px; }
.wtv-log { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; scroll-behavior: smooth; overscroll-behavior: contain; }
.wtv-msg { max-width: 86%; padding: 10px 13px; border-radius: 16px; line-height: 1.45; font-size: 15px; white-space: pre-wrap; overflow-wrap: anywhere; }
.wtv-msg.me { align-self: flex-end; background: var(--wtv-gold-grad); color: #120d02; border-bottom-right-radius: 4px; font-weight: 600; }
.wtv-msg.bot { align-self: flex-start; background: #1a1712; border: 1px solid rgba(201, 168, 76, .18); border-bottom-left-radius: 4px; }
.wtv-msg.sys { align-self: center; background: none; color: var(--wtv-muted); font-size: 13px; text-align: center; }
.wtv-msg.bot .row { display: flex; gap: 8px; align-items: flex-start; }
.wtv-msg.bot .row img { width: 26px; height: 26px; flex: none; margin-top: 1px; }
.wtv-confirm { align-self: stretch; background: #1d1709; border: 1px solid var(--wtv-gold); border-radius: 16px; padding: 12px; }
.wtv-confirm p { margin: 0 0 10px; font-weight: 700; }
.wtv-confirm div { display: flex; gap: 8px; }
.wtv-chips { display: flex; gap: 6px; overflow-x: auto; padding: 0 14px 10px; scrollbar-width: none; }
.wtv-chips::-webkit-scrollbar { display: none; }
.wtv-chips button { flex: none; min-height: 44px; border: 1px solid var(--wtv-line); background: transparent; color: var(--wtv-text); border-radius: 999px; padding: 0 14px; font: 600 14px var(--wtv-body); cursor: pointer; }
.wtv-chips button:hover { background: rgba(201, 168, 76, .12); }
/* Four suggestions for the page you're on */
.wtv-ask .wtv-suggest4 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 0 14px 10px; overflow: visible; }
.wtv-ask .wtv-suggest4 button { white-space: normal; text-align: left; line-height: 1.25; padding: 8px 12px; border-radius: 14px; }
/* Listening / Thinking / Speaking: one clear state with the live transcript; tap it to stop */
.wtv-state { display: flex; align-items: center; gap: 12px; margin: 0 14px 10px; min-height: 56px; padding: 8px 14px; border-radius: 16px; border: 1px solid var(--wtv-gold); background: #1d1709; color: var(--wtv-text); font: 600 14px/1.35 var(--wtv-body); cursor: pointer; text-align: left; width: calc(100% - 28px); }
.wtv-state[hidden] { display: none; }
.wtv-state .dot { width: 14px; height: 14px; border-radius: 50%; background: var(--wtv-gold-hi); flex: none; animation: wtv-pulse 1s ease-in-out infinite; }
.wtv-state[data-state="thinking"] .dot { background: transparent; border: 3px solid var(--wtv-gold-hi); border-right-color: transparent; animation: wtv-spin .8s linear infinite; }
.wtv-state b { display: block; color: var(--wtv-gold-hi); font-size: 15px; }
.wtv-state small { display: block; color: var(--wtv-muted); font-size: 12px; }
.wtv-state .said { display: block; color: var(--wtv-text); font-weight: 600; overflow-wrap: anywhere; }
.wtv-state .grow { flex: 1; min-width: 0; }
@keyframes wtv-spin { to { transform: rotate(360deg); } }
.wtv-compose { display: flex; gap: 8px; align-items: center; padding: 10px 12px 12px; border-top: 1px solid rgba(255, 255, 255, .07); }
.wtv-compose input { flex: 1; min-width: 0; height: 48px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .18); background: #15130f; color: var(--wtv-text); padding: 0 16px; font: 16px var(--wtv-body); }
.wtv-compose input::placeholder { color: #9a9282; }
.wtv-mic { width: 64px; height: 64px; border-radius: 50%; border: 0; background: var(--wtv-gold-grad); color: #120d02; display: grid; place-items: center; cursor: pointer; flex: none; touch-action: none; box-shadow: 0 6px 22px rgba(201, 168, 76, .35); }
.wtv-mic svg { width: 28px; height: 28px; }
.wtv-mic.on { animation: wtv-ring 1.2s ease-out infinite; }
@keyframes wtv-ring { 0% { box-shadow: 0 0 0 0 rgba(246, 226, 155, .7); } 100% { box-shadow: 0 0 0 16px rgba(246, 226, 155, 0); } }
.wtv-send { width: 48px; height: 48px; }
.wtv-status { padding: 0 14px 6px; font-size: 13px; color: var(--wtv-muted); min-height: 0; }
.wtv-status:empty { display: none; }
.wtv-settings { padding: 12px 14px; border-bottom: 1px solid rgba(255, 255, 255, .07); display: grid; gap: 10px; background: #100e0a; font-size: 14px; max-height: 50%; overflow-y: auto; }
.wtv-settings[hidden] { display: none; }
.wtv-settings label { display: flex; align-items: center; gap: 10px; min-height: 44px; }
.wtv-settings select { flex: 1; height: 44px; border-radius: 10px; background: #15130f; color: var(--wtv-text); border: 1px solid rgba(255, 255, 255, .16); padding: 0 10px; font: 14px var(--wtv-body); }
.wtv-settings input[type="checkbox"] { width: 22px; height: 22px; accent-color: var(--wtv-gold); }
.wtv-settings .row { display: flex; gap: 8px; flex-wrap: wrap; }
.wtv-settings small { color: var(--wtv-muted); }
.wtv-note { font-size: 12px; color: var(--wtv-gold-hi); background: rgba(201, 168, 76, .1); border: 1px solid var(--wtv-line); padding: 4px 10px; border-radius: 999px; }
.wtv-note[hidden] { display: none; }
body.wtv-ask-page .wtv-tab-ask { color: var(--wtv-gold-hi); }

/* ---------- Welcome (first run) ---------- */
.wtv-wsheet { position: fixed; inset: 0; z-index: 2050; display: grid; place-items: center; padding: 16px; background: rgba(0, 0, 0, .8); font-family: var(--wtv-body); color: var(--wtv-text); }
.wtv-wsheet > div { width: min(560px, 100%); max-height: min(760px, calc(100dvh - 32px)); display: flex; flex-direction: column; background: #0f0d09; border: 1px solid var(--wtv-line); border-radius: 24px; box-shadow: 0 24px 70px rgba(0, 0, 0, .8); overflow: hidden; animation: wtv-rise var(--wtv-fast) ease-out; }
.wtv-wsheet .top { display: flex; align-items: center; gap: 10px; padding: 10px 10px 0 18px; }
.wtv-wsheet h2:focus, .wtv-tvgate:focus, .wtv-mehome:focus { outline: none; }
.wtv-wsheet .dots { display: flex; gap: 6px; flex: 1; }
.wtv-wsheet .dots i { width: 28px; height: 5px; border-radius: 5px; background: rgba(255, 255, 255, .18); }
.wtv-wsheet .dots i.on { background: var(--wtv-gold-hi); }
.wtv-wsheet .body { padding: 8px 18px 12px; overflow-y: auto; flex: 1; }
html .wtv-wsheet h2 { margin: 6px 0 4px; font: 800 24px/1.2 var(--wtv-head); color: var(--wtv-gold-hi); }
html .wtv-wsheet h3 { margin: 16px 0 8px; font: 700 15px var(--wtv-body); color: var(--wtv-text); }
.wtv-wsheet p { margin: 0 0 6px; color: var(--wtv-muted); line-height: 1.5; }
.wtv-wsheet .picks { display: flex; flex-wrap: wrap; gap: 8px; }
.wtv-wsheet .picks button { min-height: 44px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--wtv-line); background: transparent; color: var(--wtv-text); font: 600 14px var(--wtv-body); cursor: pointer; }
.wtv-wsheet .picks button[aria-pressed="true"] { background: var(--wtv-gold-grad); color: #120d02; border-color: transparent; font-weight: 800; }
.wtv-wsheet .picks button[aria-pressed="true"]::before { content: "✓ "; }
.wtv-wsheet .meet { display: grid; justify-items: center; gap: 12px; text-align: center; padding: 8px 0; }
.wtv-wsheet .meet .wtv-mic { width: 84px; height: 84px; }
.wtv-wsheet .meet .wtv-mic svg { width: 36px; height: 36px; }
.wtv-wsheet .meet .ex { display: grid; gap: 8px; width: 100%; }
.wtv-wsheet .meet .ex button { min-height: 48px; border-radius: 14px; border: 1px solid var(--wtv-line); background: #15130f; color: var(--wtv-text); font: 600 15px var(--wtv-body); cursor: pointer; }
.wtv-wsheet .foot { display: flex; gap: 8px; align-items: center; padding: 12px 18px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid rgba(255, 255, 255, .07); }
.wtv-wsheet .foot .grow { flex: 1; }
@media (max-width: 720px) {
  .wtv-wsheet { padding: 0; place-items: end stretch; }
  .wtv-wsheet > div { width: 100%; max-height: 92dvh; border-radius: 22px 22px 0 0; }
}

/* ---------- Home for signed-in people ---------- */
html.wtv-auth .wtv-marketing { display: none !important; }
html:not(.wtv-auth) .wtv-mehome { display: none !important; }
.wtv-mehome { padding: 22px 0 8px; }
.wtv-mehome .hi { display: flex; align-items: center; gap: 14px; margin: 0 0 6px; }
.wtv-mehome .hi img { width: 56px; height: 56px; filter: drop-shadow(0 0 10px rgba(246, 226, 155, .35)); }
.wtv-mehome .hi h1 { margin: 0; font: 900 clamp(26px, 5vw, 40px)/1.15 var(--wtv-head); color: var(--wtv-gold-hi); }
.wtv-mehome .hi p { margin: 2px 0 0; color: var(--wtv-muted); }
html .wtv-mehome h2 { font: 800 clamp(20px, 2.6vw, 26px) var(--wtv-head); margin: 28px 0 4px; color: var(--wtv-text); }
.wtv-mehome .sub { color: var(--wtv-muted); margin: 0 0 12px; font-size: 14px; }
.wtv-mehome .sub a { color: var(--wtv-gold-hi); display: inline-flex; align-items: center; min-height: 44px; }
.wtv-cont { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(240px, 300px); gap: 12px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x mandatory; }
.wtv-cont a { scroll-snap-align: start; display: grid; grid-template-columns: 88px 1fr; gap: 12px; align-items: center; text-decoration: none; color: var(--wtv-text); padding: 8px; border-radius: 16px; background: #0f0d0a; border: 1px solid rgba(255, 255, 255, .08); min-height: 72px; }
.wtv-cont a:hover { border-color: var(--wtv-gold); }
.wtv-cont img { width: 88px; height: 56px; object-fit: cover; border-radius: 10px; background: #1a1712; }
.wtv-cont a.round img { width: 56px; height: 56px; border-radius: 50%; justify-self: center; }
.wtv-cont small { display: block; color: var(--wtv-gold-hi); font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.wtv-cont b { display: block; font-size: 15px; line-height: 1.25; }
.wtv-cont .bar { display: block; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .14); margin-top: 6px; overflow: hidden; }
.wtv-cont .bar i { display: block; height: 100%; background: var(--wtv-gold-hi); }
.wtv-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.wtv-tiles a { display: grid; justify-items: center; gap: 6px; padding: 16px 8px; min-height: 96px; border-radius: 18px; text-decoration: none; color: var(--wtv-text); background: #0f0d0a; border: 1px solid var(--wtv-line); font-weight: 800; }
.wtv-tiles a:hover { background: rgba(201, 168, 76, .1); }
.wtv-tiles svg { width: 30px; height: 30px; color: var(--wtv-gold-hi); }
@media (max-width: 520px) { .wtv-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.wtv-retry { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding: 14px 16px; border-radius: 16px; background: #0f0d0a; border: 1px solid rgba(255, 255, 255, .1); color: var(--wtv-muted); }
.wtv-retry p { margin: 0; flex: 1; min-width: 200px; }

/* Long pages end above the tab bar (and the keyboard) */
@media (max-width: 720px) { .wtv-shell input, .wtv-shell textarea, .wtv-shell select { scroll-margin-bottom: calc(var(--wtv-tab) + 24px); scroll-margin-top: calc(var(--wtv-bar) + 16px); } }

/* ---------- Modal (link old TV account, confirm) ---------- */
.wtv-modal { position: fixed; inset: 0; z-index: 2100; display: grid; place-items: center; padding: 16px; background: rgba(0, 0, 0, .78); font-family: var(--wtv-body); color: var(--wtv-text); }
.wtv-modal > div { width: min(440px, 100%); background: #0f0d09; border: 1px solid var(--wtv-line); border-radius: 22px; padding: 24px; box-shadow: 0 24px 70px rgba(0, 0, 0, .8); }
.wtv-modal img.logo { width: 72px; height: 72px; display: block; margin: 0 auto 8px; }
.wtv-modal h2 { margin: 0 0 8px; text-align: center; font: 800 22px var(--wtv-head); color: var(--wtv-gold-hi); }
.wtv-modal p { color: var(--wtv-muted); margin: 0 0 14px; line-height: 1.5; text-align: center; }

/* ---------- Toast ---------- */
.wtv-toast { position: fixed; z-index: 2200; left: 50%; top: calc(var(--wtv-bar) + env(safe-area-inset-top) + 12px); transform: translateX(-50%); background: #12100c; color: var(--wtv-text); border: 1px solid var(--wtv-gold); border-radius: 14px; padding: 11px 16px; font: 600 14px var(--wtv-body); box-shadow: 0 12px 40px rgba(0, 0, 0, .6); max-width: calc(100vw - 24px); }
.wtv-embed .wtv-toast { top: calc(var(--wtv-ebar) + 12px); }

/* ---------- Shared form fields (sign-on, link dialog) ---------- */
.wtv-field { display: grid; gap: 6px; margin-bottom: 14px; }
.wtv-field label { font-weight: 700; font-size: 14px; color: var(--wtv-text); }
.wtv-field .pw { position: relative; }
.wtv-field input {
  width: 100%; height: 50px; border-radius: 12px; border: 1.5px solid rgba(255, 255, 255, .24); background: #15130f; color: var(--wtv-text);
  padding: 0 14px; font: 16px var(--wtv-body);
}
.wtv-field .pw input { padding-right: 80px; }
.wtv-field input:focus { outline: none; border-color: var(--wtv-gold-hi); box-shadow: 0 0 0 3px rgba(246, 226, 155, .3); }
.wtv-field input[aria-invalid="true"] { border-color: #ff8a80; }
.wtv-field .eye { position: absolute; right: 3px; top: 3px; height: 44px; min-width: 64px; padding: 0 12px; border-radius: 10px; border: 0; background: rgba(255, 255, 255, .08); color: var(--wtv-gold-hi); font: 700 13px var(--wtv-body); cursor: pointer; }
.wtv-field .hint { font-size: 13px; color: var(--wtv-muted); }
.wtv-err { background: rgba(255, 92, 80, .12); border: 1px solid rgba(255, 138, 128, .6); color: #ffd7d3; border-radius: 12px; padding: 10px 12px; margin: 0 0 14px; font-size: 14px; line-height: 1.45; }
.wtv-ok { background: rgba(70, 211, 105, .1); border: 1px solid rgba(70, 211, 105, .5); color: #d4f7dd; border-radius: 12px; padding: 10px 12px; margin: 0 0 14px; font-size: 14px; }
.wtv-err[hidden], .wtv-ok[hidden] { display: none; }
.wtv-check { display: flex; gap: 10px; align-items: flex-start; margin: 4px 0 18px; font-size: 14px; color: var(--wtv-text); min-height: 44px; }
.wtv-check input { width: 24px; height: 24px; accent-color: var(--wtv-gold); flex: none; margin: 0; }
.wtv-check small { display: block; color: var(--wtv-muted); }
.wtv-block { width: 100%; min-height: 50px; font-size: 16px; }
.wtv-linkbtn { background: none; border: 0; color: var(--wtv-gold-hi); font: 700 14px var(--wtv-body); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; padding: 0 6px; min-height: 44px; }

@media (prefers-reduced-motion: reduce) {
  .wtv-splash, .wtv-splash img, .wtv-loading img, .wtv-mic.on, .wtv-skel, .wtv-state .dot, .wtv-sheet, .wtv-ask, .wtv-install, .wtv-wsheet > div { animation: none !important; transition: none !important; }
  .wtv-log { scroll-behavior: auto; }
}
