@font-face {
  font-family: "Wok Thai";
  src: url("assets/fonts/WokTVThaiCompat-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Wok Thai";
  src: url("assets/fonts/WokTVThaiCompat-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --ink: #f5f5f5;
  --muted: #b3b3b3;
  --faint: #8c8c8c;
  --canvas: #080808;
  --canvas-deep: #000000;
  --surface: #161616;
  --surface-raised: #242424;
  --stroke: rgba(255, 255, 255, 0.14);
  --stroke-bright: rgba(255, 255, 255, 0.28);
  --accent: #e50914;
  --accent-ink: #ffffff;
  --signal: #ffffff;
  --danger: #ff7a7a;
  --top-safe: env(safe-area-inset-top, 0px);
  --right-safe: env(safe-area-inset-right, 0px);
  --bottom-safe: env(safe-area-inset-bottom, 0px);
  --left-safe: env(safe-area-inset-left, 0px);
  --max-content: 1040px;
  --tab-height: 68px;
  font-family: "Wok Thai", ui-rounded, "SF Pro Rounded", system-ui, sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  min-height: 100%;
  background: var(--canvas-deep);
  -webkit-text-size-adjust: 100%;
}

body {
  min-width: 320px;
  min-height: 100dvh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(85% 38% at 0% -10%, rgba(255, 106, 61, 0.11), transparent 60%),
    var(--canvas);
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overscroll-behavior-y: none;
}

button, input { font: inherit; }
button { touch-action: manipulation; }
button { color: inherit; }
button:not(:disabled) { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }
img { max-width: 100%; }

svg {
  width: 1.3rem;
  height: 1.3rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.sr-only {
  position: absolute;
  overflow: hidden;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  z-index: 100;
  left: 1rem;
  top: 1rem;
  padding: .65rem .9rem;
  transform: translateY(-200%);
  color: var(--canvas-deep);
  background: var(--ink);
  border-radius: .6rem;
}
.skip-link:focus { transform: translateY(0); }

.app-shell { min-height: 100dvh; }

.topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: center;
  gap: .4rem;
  min-height: calc(62px + var(--top-safe));
  padding: calc(var(--top-safe) + .55rem) max(1rem, var(--right-safe)) .55rem max(1rem, var(--left-safe));
  background: rgba(16, 19, 31, .94);
  background: color-mix(in srgb, var(--canvas) 88%, transparent);
  border-bottom: 1px solid rgba(255,255,255,.06);
  backdrop-filter: blur(20px) saturate(125%);
  -webkit-backdrop-filter: blur(20px) saturate(125%);
}

.brand {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  min-width: 0;
  gap: .5rem;
  color: inherit;
  text-decoration: none;
}
.brand img { width: 31px; height: 25px; object-fit: contain; }
.brand-copy { display: grid; gap: 0; line-height: 1; }
.brand-copy strong { font-family: ui-rounded, "SF Pro Rounded", sans-serif; font-size: 1rem; letter-spacing: .08em; }
.brand-copy small { margin-top: .22rem; color: var(--muted); font-family: ui-rounded, "SF Pro Rounded", sans-serif; font-size: .58rem; letter-spacing: .04em; }

.icon-button {
  display: inline-grid;
  width: 44px;
  height: 44px;
  place-items: center;
  padding: 0;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-radius: 50%;
  -webkit-tap-highlight-color: transparent;
}
.icon-button:active { background: rgba(255,255,255,.12); transform: scale(.95); }

.search-panel {
  position: sticky;
  z-index: 19;
  top: calc(62px + var(--top-safe));
  display: grid;
  grid-template-columns: 1.2rem minmax(0, 1fr) auto;
  align-items: center;
  gap: .6rem;
  width: calc(100% - max(1rem, var(--left-safe)) - max(1rem, var(--right-safe)));
  max-width: var(--max-content);
  min-height: 52px;
  margin: .45rem max(1rem, var(--right-safe)) 0 max(1rem, var(--left-safe));
  padding: .3rem .35rem .3rem .8rem;
  background: rgba(35, 40, 57, .95);
  background: color-mix(in srgb, var(--surface-raised) 92%, transparent);
  border: 1px solid var(--stroke);
  border-radius: 1rem;
  backdrop-filter: blur(16px);
}
.search-panel input { width: 100%; color: var(--ink); background: transparent; border: 0; outline: 0; }
.search-panel input::placeholder { color: var(--faint); }
.text-button { min-height: 40px; padding: 0 .75rem; color: var(--accent); background: transparent; border: 0; border-radius: .55rem; font-weight: 700; }

.main-content {
  width: min(100%, var(--max-content));
  min-height: calc(100dvh - 154px - var(--top-safe) - var(--bottom-safe));
  margin: 0 auto;
  padding: 1.15rem max(1rem, var(--right-safe)) calc(var(--tab-height) + 2rem + var(--bottom-safe)) max(1rem, var(--left-safe));
  scroll-padding-top: 1rem;
  scroll-margin-top: calc(72px + var(--top-safe));
}

.page { animation: appear .22s ease-out both; }
@keyframes appear { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

.eyebrow {
  margin: 0 0 .25rem;
  color: var(--signal);
  font-family: ui-rounded, "SF Pro Rounded", sans-serif;
  font-size: .65rem;
  font-weight: 800;
  letter-spacing: .11em;
}

.page-heading { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin: .2rem 0 1rem; }
.page-heading h1, .page-heading h2, .player-heading h2, .drawer h2 { margin: 0; line-height: 1.15; }
.page-heading h1 { font-size: clamp(1.65rem, 7vw, 2.35rem); letter-spacing: -.035em; }
.page-heading p { margin: .25rem 0 0; color: var(--muted); font-size: .9rem; }

.hero {
  position: relative;
  display: grid;
  min-height: min(50vw, 300px);
  align-content: end;
  overflow: hidden;
  margin: .1rem 0 1.35rem;
  border: 1px solid var(--stroke);
  border-radius: 1.4rem;
  isolation: isolate;
  background: #181a26 url("assets/images/splash-fhd.png") center / cover no-repeat;
  box-shadow: 0 20px 48px rgba(0,0,0,.23);
}
.hero::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  content: "";
  background: linear-gradient(90deg, rgba(9, 11, 18, .92) 0%, rgba(11, 12, 20, .56) 46%, rgba(10, 12, 19, .08) 100%), linear-gradient(0deg, rgba(10, 12, 19, .8), transparent 56%);
}
.hero::after {
  position: absolute;
  z-index: -1;
  inset: 0;
  content: "";
  opacity: .37;
  background-image: linear-gradient(90deg, transparent 0 50%, rgba(255,255,255,.035) 50% 51%, transparent 51% 100%);
  background-size: 7px 7px;
  pointer-events: none;
}
.hero-content { max-width: 34rem; padding: clamp(1.15rem, 4vw, 2rem); }
.hero h1 { max-width: 15ch; margin: 0; font-size: clamp(1.65rem, 7vw, 2.8rem); line-height: 1.05; letter-spacing: -.045em; }
.hero p:not(.eyebrow) { max-width: 35ch; margin: .6rem 0 1.05rem; color: #e1e3ea; }

.primary-button, .secondary-button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  padding: .55rem 1rem;
  border-radius: .8rem;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid transparent;
}
.primary-button { color: var(--accent-ink); background: var(--accent); }
.secondary-button { color: var(--ink); background: rgba(255,255,255,.08); border-color: var(--stroke); }
.primary-button:active, .secondary-button:active { transform: scale(.98); }

.section { margin: 0 0 1.7rem; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: 0 0 .65rem; }
.section-head-actions { display: inline-flex; align-items: center; gap: .25rem; }
.section-head h2 { margin: 0; font-size: 1.2rem; letter-spacing: -.02em; }
.section-head p { margin: 0; color: var(--muted); font-size: .82rem; }
.section-link { padding: .45rem .15rem; color: var(--accent); background: transparent; border: 0; font-size: .9rem; font-weight: 700; }
.search-provider-badge { display:inline-flex; min-height:28px; align-items:center; padding:.3rem .55rem; color:#f2c5c5; background:rgba(229,9,20,.13); border:1px solid rgba(229,9,20,.35); border-radius:999px; font-size:.68rem; font-weight:800; white-space:nowrap; }
.external-search-section { margin-top:-.2rem; }
.external-search-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:.7rem; }
.external-search-grid .station-card { min-width:0; }

.on-air-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .85rem;
  overflow: hidden;
  min-height: 112px;
  padding: 1rem;
  color: var(--ink);
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--stroke);
  border-radius: 1rem;
  box-shadow: 0 12px 30px rgba(0,0,0,.15);
}
.on-air-card::after { position:absolute; right:-20px; bottom:-52px; width:150px; height:150px; content:""; background: rgba(255,106,61,.16); border-radius:50%; pointer-events:none; }
.on-air-card:active { border-color: var(--accent); transform: scale(.992); }
.on-air-card h3 { margin: .15rem 0; font-size: 1.2rem; }
.on-air-card p { margin: 0; color: var(--muted); font-size: .82rem; }
.live-status { display: inline-flex; align-items: center; gap: .4rem; color: var(--signal); font-family: ui-rounded, sans-serif; font-size:.68rem; font-weight:800; letter-spacing:.08em; }
.live-status::before { width:.5rem; height:.5rem; content:""; background: currentColor; border-radius:50%; box-shadow: 0 0 0 3px rgba(245,203,74,.14); }
.play-disc { position: relative; z-index: 1; display: grid; width: 43px; height: 43px; place-items: center; align-self: end; color: var(--accent-ink); background: var(--signal); border-radius: 50%; }
.play-disc svg { width: 1.1rem; margin-left: 2px; fill: currentColor; stroke: none; }

.media-rail {
  display: grid;
  grid-auto-columns: minmax(150px, 43vw);
  grid-auto-flow: column;
  gap: .75rem;
  overflow-x: auto;
  padding: .1rem 0 .8rem;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x;
}
.media-rail::-webkit-scrollbar { display: none; }

.media-card {
  display: grid;
  min-height: 165px;
  align-content: space-between;
  gap: .8rem;
  padding: .95rem;
  color: var(--ink);
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--stroke);
  border-radius: 1rem;
  scroll-snap-align: start;
}
.media-card:active { background: var(--surface-raised); transform: scale(.98); }
.media-card .card-icon { display: grid; width: 42px; height: 42px; place-items: center; color: var(--signal); background: rgba(245,203,74,.12); border-radius: .75rem; }
.media-card .card-icon svg { width: 1.35rem; }
.media-card h3 { margin: 0; font-size: 1.02rem; line-height: 1.2; }
.media-card p { margin: .25rem 0 0; color: var(--muted); font-size: .78rem; line-height: 1.3; }
.media-card small { color: var(--accent); font-weight: 700; }

.radio-welcome, .radio-now-playing {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  min-height: 132px;
  margin: 0 0 1.15rem;
  padding: 1.15rem;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(122deg, #2d0a11 0%, #171717 66%, #111 100%);
  border: 1px solid rgba(229,9,20,.4);
  border-radius: 1rem;
  box-shadow: 0 16px 36px rgba(0,0,0,.26);
}
.radio-welcome::after, .radio-now-playing::after { position: absolute; right: -38px; bottom: -58px; width: 170px; height: 170px; content: ""; background: rgba(229,9,20,.18); border-radius: 50%; pointer-events: none; }
.radio-welcome h2, .radio-now-playing h2 { margin: .1rem 0 .25rem; font-size: clamp(1.25rem, 5vw, 1.7rem); letter-spacing: -.025em; }
.radio-welcome p:not(.eyebrow), .radio-now-playing p:not(.eyebrow) { max-width: 32rem; margin: 0; color: #c8c8c8; font-size: .82rem; line-height: 1.45; }
.radio-welcome-mark { position: relative; z-index: 1; display: grid; width: 66px; height: 66px; place-items: center; color: #fff; background: rgba(229,9,20,.82); border-radius: 1rem; box-shadow: 0 8px 24px rgba(229,9,20,.22); }
.radio-welcome-mark svg { width: 2rem; fill: none; stroke: currentColor; stroke-width: 1.55; stroke-linecap: round; stroke-linejoin: round; }
.radio-now-playing { grid-template-columns: 88px minmax(0, 1fr) auto; min-height: 110px; }
.radio-now-art { position: relative; z-index: 1; display: grid; width: 78px; height: 78px; place-items: center; overflow: hidden; background: rgba(255,255,255,.1); border-radius: .85rem; }
.radio-now-art img { width: 82%; height: 82%; object-fit: contain; }
.radio-now-art .station-monogram { width: 54px; height: 54px; }
.radio-now-copy { position: relative; z-index: 1; min-width: 0; }
.radio-now-copy h2 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.radio-now-copy p:not(.eyebrow) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.radio-now-action { position: relative; z-index: 1; display: grid; width: 46px; height: 46px; place-items: center; color: #fff; background: var(--signal); border: 0; border-radius: 50%; box-shadow: 0 8px 20px rgba(229,9,20,.3); }
.radio-now-action svg { width: 1.1rem; margin-left: 2px; fill: currentColor; stroke: none; }
.radio-equalizer { display: inline-flex; height: 20px; align-items: end; gap: 3px; margin-top: .5rem; }
.radio-equalizer i { display: block; width: 3px; height: 38%; background: var(--signal); border-radius: 999px; animation: radio-eq .9s ease-in-out infinite alternate; }
.radio-equalizer i:nth-child(2) { height: 82%; animation-delay: -.25s; }
.radio-equalizer i:nth-child(3) { height: 58%; animation-delay: -.5s; }
.radio-equalizer i:nth-child(4) { height: 96%; animation-delay: -.7s; }
@keyframes radio-eq { from { transform: scaleY(.55); opacity: .55; } to { transform: scaleY(1); opacity: 1; } }
.radio-station-section .section-head { margin-bottom: .8rem; }

.category-rail { display: flex; gap: .55rem; overflow-x: auto; padding: .05rem 0 .65rem; scrollbar-width: none; }
.category-rail { touch-action: pan-x; }
.category-rail::-webkit-scrollbar { display: none; }
.category-chip { flex: 0 0 auto; min-height: 39px; padding: .45rem .75rem; color: #dcdeea; background: transparent; border: 1px solid var(--stroke); border-radius: 999px; }
.category-chip[aria-pressed="true"] { color: var(--accent-ink); background: var(--signal); border-color: var(--signal); font-weight: 700; }

.station-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; align-items: stretch; }
.station-card {
  display: flex;
  min-height: 224px;
  flex-direction: column;
  overflow: hidden;
  color: var(--ink);
  text-align: left;
  background: linear-gradient(160deg, #202020 0%, #121212 72%);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: .75rem;
  transition: border-color .18s ease, transform .18s ease, background .18s ease;
}
.station-card:active { border-color: var(--accent); transform: scale(.985); }
.station-card:focus-within { border-color: rgba(255,255,255,.46); }
.station-card.is-playing { border-color: rgba(229,9,20,.78); box-shadow: 0 0 0 1px rgba(229,9,20,.22), 0 13px 30px rgba(229,9,20,.11); }
.station-card.is-playing .station-live-badge { background: var(--accent); border-color: var(--accent); }
.station-card.is-playing .station-play-button { color: #fff; background: var(--accent); border-color: var(--accent); }
.station-card-media {
  position: relative;
  display: grid;
  min-height: 96px;
  aspect-ratio: 16 / 8.5;
  place-items: center;
  overflow: hidden;
  background: radial-gradient(circle at 50% 40%, rgba(255,255,255,.12), rgba(255,255,255,.025) 48%, rgba(0,0,0,.2) 100%), #171717;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.station-card-radio .station-card-media { background: radial-gradient(circle at 50% 32%, rgba(229,9,20,.22), rgba(255,255,255,.035) 54%, rgba(0,0,0,.2) 100%), #171717; }
.station-card .station-symbol {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  padding: .9rem 1rem;
  overflow: hidden;
  color: var(--signal);
  background: transparent;
  border: 0;
  border-radius: 0;
}
.station-card .station-symbol img { display: block; width: min(88%, 160px); height: min(72px, 78%); object-fit: contain; object-position: center; filter: drop-shadow(0 4px 8px rgba(0,0,0,.26)); }
.station-card-radio .station-symbol img { width: min(76%, 132px); height: min(64px, 76%); }
.station-card .station-symbol svg { width: 1.6rem; }
.station-monogram { display: grid; width: 56px; height: 56px; place-items: center; color: #fff; background: #2b2b2b; border: 1px solid rgba(255,255,255,.2); border-radius: .8rem; font-family: ui-rounded, "SF Pro Rounded", sans-serif; font-size: 1.15rem; font-weight: 900; letter-spacing: -.04em; }
.station-card-radio .station-monogram { color: #fff; background: #351316; }
.station-live-badge { position: absolute; top: .55rem; left: .55rem; display: inline-flex; align-items: center; gap: .35rem; min-height: 24px; padding: .25rem .45rem; color: #fff; background: rgba(0,0,0,.62); border: 1px solid rgba(255,255,255,.16); border-radius: .35rem; font-family: ui-rounded, "SF Pro Rounded", sans-serif; font-size: .58rem; font-weight: 900; letter-spacing: .08em; }
.station-live-badge span { width: .38rem; height: .38rem; background: var(--accent); border-radius: 50%; box-shadow: 0 0 0 3px rgba(229,9,20,.18); }
.station-card-body { display: grid; min-width: 0; flex: 1; gap: .7rem; padding: .7rem .75rem .75rem; }
.station-card-heading { min-width: 0; }
.station-card h3 { display: -webkit-box; margin: 0 0 .22rem; overflow: hidden; font-size: .92rem; line-height: 1.22; text-overflow: ellipsis; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.station-card p { margin: 0; overflow: hidden; color: var(--muted); font-size: .7rem; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
.station-card-actions { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: .45rem; margin-top: auto; }
.station-play-button { display: inline-flex; min-height: 40px; align-items: center; justify-content: center; gap: .36rem; padding: .45rem .55rem; color: #fff; background: rgba(255,255,255,.09); border: 1px solid rgba(255,255,255,.14); border-radius: .45rem; font-size: .75rem; font-weight: 800; }
.station-play-button svg { width: .95rem; height: .95rem; fill: currentColor; stroke: none; }
.station-play-button:active { color: #fff; background: var(--accent); border-color: var(--accent); }
.station-card .saved-toggle { width: 40px; height: 40px; color: #d9d9d9; background: rgba(255,255,255,.045); border: 1px solid rgba(255,255,255,.1); }
.station-card .saved-toggle[aria-pressed="true"] { color: #fff; background: rgba(229,9,20,.18); border-color: rgba(229,9,20,.5); }
.station-card .saved-toggle svg { width: 1rem; height: 1rem; }

.source-card {
  display: grid;
  grid-template-columns: auto minmax(0,1fr) auto;
  align-items: center;
  gap: .85rem;
  padding: 1rem;
  color: var(--ink);
  text-align:left;
  background: #21191d;
  border: 1px solid rgba(255, 106, 61, .42);
  border-radius: 1rem;
}
.source-card:active { transform:scale(.99); background:#2b1b1d; }
.source-mark { display:grid; width:44px; height:44px; place-items:center; color:var(--accent-ink); background:var(--accent); border-radius:.85rem; font-family: ui-rounded, sans-serif; font-size:1.4rem; font-weight:900; }
.movie-source-mark, .movie-library-mark { color:#17131a; background:var(--signal); }
.source-card strong { display:block; font-size:1rem; }
.source-card small { display:block; margin-top:.1rem; color:#d3b8b4; font-size:.78rem; }
.source-card > svg { color:var(--accent); }
.category-actions { display:grid; gap:.75rem; }
.category-latest { width:100%; }
.compact-button { min-height:40px; padding:.45rem .7rem; font-size:.78rem; white-space:nowrap; }
.catalog-count { color:var(--muted); font-size:.78rem; white-space:nowrap; }

.wow-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:.75rem; }
.wow-grid-rail { grid-template-columns:repeat(2,minmax(0,1fr)); }
.rongyok-load-more { display:grid; justify-items:center; gap:.45rem; padding:1.25rem .25rem .5rem; text-align:center; }
.rongyok-load-more .secondary-button { min-width:9rem; }
.rongyok-load-status { color:var(--muted); font-size:.78rem; }
.wow-card { min-width:0; overflow:hidden; background:var(--surface); border:1px solid var(--stroke); border-radius:1rem; }
.wow-poster-button { position:relative; display:block; width:100%; aspect-ratio:2/3; overflow:hidden; padding:0; color:var(--ink); background:#171a27; border:0; }
.wow-poster-button img, .wow-poster-button .wow-cover-fallback { display:block; width:100%; height:100%; object-fit:cover; }
.wow-cover-fallback { display:grid; place-items:center; color:var(--accent); background:linear-gradient(145deg,#2a202d,#11141f); font-family:ui-rounded,sans-serif; font-size:3.5rem; font-weight:900; }
.wow-poster-button::after { position:absolute; inset:auto 0 0; height:42%; content:""; background:linear-gradient(transparent,rgba(0,0,0,.66)); pointer-events:none; }
.wow-play-badge { position:absolute; z-index:1; right:.55rem; bottom:.55rem; display:grid; width:34px; height:34px; place-items:center; color:var(--accent-ink); background:var(--signal); border-radius:50%; }
.wow-play-badge svg { width:1rem; fill:currentColor; stroke:none; margin-left:2px; }
.wow-card-copy { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:.35rem; align-items:start; padding:.6rem .65rem .65rem; }
.wow-card-copy h3 { grid-column:1/-1; margin:0; overflow:hidden; font-size:.92rem; line-height:1.2; text-overflow:ellipsis; white-space:nowrap; }
.wow-card-copy p { min-width:0; margin:0; overflow:hidden; color:var(--muted); font-size:.7rem; text-overflow:ellipsis; white-space:nowrap; }
.content-date { display:block; grid-column:1/-1; margin:0; color:var(--muted); font-size:.66rem; line-height:1.25; }
.detail-content-date { margin-top:.2rem; }
.episode-date { grid-column:1/-1; margin-top:-.05rem; }
.availability-chip { border-color: color-mix(in srgb, var(--accent) 45%, var(--stroke)); }
.wow-card-copy .saved-toggle { width:32px; height:32px; margin-top:-.2rem; }
.wow-card-copy .saved-toggle svg { width:1rem; height:1rem; }
.wow-skeleton { display:grid; grid-auto-columns:minmax(132px,35vw); grid-auto-flow:column; gap:.75rem; overflow:hidden; }
.wow-skeleton span { display:block; aspect-ratio:2/3; border-radius:1rem; background:linear-gradient(110deg,#1d2231 8%,#2b3040 18%,#1d2231 33%); background-size:200% 100%; animation:skeleton-shimmer 1.4s linear infinite; }
.wow-skeleton-large { grid-template-columns:repeat(2,minmax(0,1fr)); grid-auto-flow:row; grid-auto-columns:auto; }
@keyframes skeleton-shimmer { to { background-position-x:-200%; } }
.wow-detail-page .back-link { margin:.1rem 0 1rem; }
.back-link { display:inline-flex; align-items:center; gap:.25rem; min-height:42px; padding:.3rem .4rem; color:var(--accent); background:transparent; border:0; font-weight:700; }
.back-link svg { width:1.1rem; height:1.1rem; }
.wow-detail { display:grid; grid-template-columns:minmax(108px,34vw) minmax(0,1fr); gap:1rem; align-items:start; margin-bottom:1.5rem; }
.wow-detail-poster { overflow:hidden; aspect-ratio:2/3; background:#171a27; border:1px solid var(--stroke); border-radius:1rem; }
.wow-detail-poster img, .wow-detail-poster .wow-cover-fallback { width:100%; height:100%; object-fit:cover; }
.wow-detail-copy h1 { margin:.1rem 0 .35rem; font-size:clamp(1.35rem,6vw,2.2rem); line-height:1.12; }
.wow-meta { margin:0; color:var(--signal); font-size:.8rem; }
.wow-detail-note { margin:.8rem 0 .65rem; color:var(--muted); font-size:.84rem; }
.watch-resume-note { margin:.55rem 0 1rem; padding:.65rem .75rem; color:var(--ink); background:rgba(229,9,20,.1); border-left:3px solid var(--accent); border-radius:.35rem; font-size:.8rem; line-height:1.35; }
.movie-watch-resume-note { margin-top:1rem; margin-bottom:0; }
.detail-actions { display:flex; align-items:center; gap:.35rem; color:var(--muted); font-size:.75rem; }
.detail-actions .saved-toggle { width:40px; height:40px; }
.movie-language-picker { margin:0 0 1rem; padding:.85rem .9rem .95rem; border:1px solid var(--stroke); border-radius:.9rem; background:rgba(255,255,255,.035); }
.movie-language-picker legend { padding:0 .35rem; color:var(--ink); font-size:.92rem; font-weight:800; }
.movie-language-hint { margin:.05rem 0 .7rem; color:var(--muted); font-size:.78rem; line-height:1.4; }
.movie-language-options { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:.6rem; }
.movie-language-option { min-height:60px; padding:.65rem .75rem; color:var(--ink); text-align:left; background:var(--surface); border:1px solid var(--stroke); border-radius:.7rem; transition:border-color .18s ease, background .18s ease, transform .18s ease; }
.movie-language-option:active { transform:scale(.985); }
.movie-language-option[aria-pressed="true"] { border-color:var(--accent); background:rgba(229,9,20,.16); box-shadow:inset 0 0 0 1px var(--accent); }
.movie-language-option strong, .movie-language-option small { display:block; }
.movie-language-option strong { font-size:.9rem; }
.movie-language-option small { margin-top:.18rem; color:var(--muted); font-size:.72rem; }
.episode-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:.55rem; }
.episode-chip { display:grid; grid-template-columns:auto 1fr auto; align-items:center; gap:.25rem; min-height:50px; padding:.45rem .55rem; color:var(--ink); text-align:left; background:var(--surface); border:1px solid var(--stroke); border-radius:.75rem; font-weight:700; }
.episode-chip span { color:var(--muted); font-size:.62rem; }
.episode-chip svg { width:1rem; height:1rem; color:var(--signal); fill:currentColor; stroke:none; }
.episode-chip:active { border-color:var(--accent); transform:scale(.98); }
.episode-chip.is-resume { border-color:var(--accent); box-shadow:inset 0 0 0 1px var(--accent); }
.detail-source { display:flex; align-items:center; justify-content:space-between; gap:.75rem; padding-top:1rem; border-top:1px solid var(--stroke); }
.detail-source .drawer-note { margin:0; }
.movie-source-panel > div:first-child { min-width:0; }
.movie-source-panel .detail-actions { flex-wrap:wrap; justify-content:flex-end; }
.movie-source-panel .detail-actions .primary-button, .movie-source-panel .detail-actions .secondary-button { min-height:42px; }
.movie-playback-panel { margin-top:1.25rem; padding-top:1rem; border-top:1px solid var(--stroke); }
.movie-playback-panel .section-head { margin-bottom:.7rem; }
.source-loading, .source-error { display:flex; align-items:center; gap:.65rem; min-height:48px; padding:.8rem .9rem; color:var(--muted); background:rgba(255,255,255,.025); border:1px solid var(--stroke); border-radius:.85rem; font-size:.82rem; }
.source-error { justify-content:space-between; color:var(--danger); flex-wrap:wrap; }
.source-error p { margin:0; }
.source-loading-dot { width:.6rem; height:.6rem; flex:0 0 auto; background:var(--signal); border-radius:50%; box-shadow:0 0 0 .25rem rgba(245,203,74,.12); animation:source-pulse 1.2s ease-in-out infinite; }
@keyframes source-pulse { 50% { opacity:.35; transform:scale(.72); } }
.source-option-list, .episode-choice-list { display:grid; gap:.55rem; }
.source-option { display:grid; grid-template-columns:auto minmax(0,1fr) auto; align-items:center; gap:.7rem; min-height:58px; padding:.65rem .75rem; color:var(--ink); text-align:left; background:var(--surface); border:1px solid var(--stroke); border-radius:.85rem; transition:border-color .18s ease, transform .18s ease, background .18s ease; }
.source-option:active, .episode-choice:active { border-color:var(--accent); background:rgba(245,203,74,.08); transform:scale(.985); }
.source-option-icon { display:grid; width:34px; height:34px; place-items:center; color:#17131a; background:var(--signal); border-radius:50%; }
.source-option-icon svg { width:1rem; height:1rem; fill:currentColor; stroke:none; }
.source-option strong, .source-option small { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.source-option strong { font-size:.86rem; }
.source-option small { margin-top:.15rem; color:var(--muted); font-size:.7rem; }
.source-option-arrow { color:var(--signal); font-size:1.25rem; line-height:1; }
.episode-season-list { display:grid; gap:1rem; }
.episode-season { margin:0; padding:.8rem; background:rgba(255,255,255,.02); border:1px solid var(--stroke); border-radius:1rem; }
.episode-season h3 { margin:0 0 .65rem; color:var(--ink); font-size:.9rem; }
.episode-choice { display:grid; grid-template-columns:minmax(58px,auto) minmax(0,1fr) auto; align-items:center; gap:.55rem; min-height:50px; padding:.55rem .65rem; color:var(--ink); text-align:left; background:var(--surface); border:1px solid var(--stroke); border-radius:.75rem; }
.episode-choice > span { color:var(--signal); font-size:.76rem; font-weight:700; }
.episode-choice small { overflow:hidden; color:var(--muted); text-overflow:ellipsis; white-space:nowrap; }
.episode-choice svg { width:1rem; height:1rem; color:var(--signal); fill:currentColor; stroke:none; }
.episode-choice-empty small { color:var(--muted); }
.playback-error { color:var(--danger); }
.provenance-note { margin:1.25rem 0 0; color:var(--muted); font-size:.72rem; line-height:1.45; }
.compact-empty { min-height:220px; }

.empty-state { display:grid; min-height: 42dvh; place-items:center; padding:2rem 1.5rem; text-align:center; background:linear-gradient(145deg, var(--surface), transparent); border:1px dashed var(--stroke-bright); border-radius:1.2rem; }
.empty-state > div { max-width:24rem; }
.empty-state .empty-symbol { display:grid; width:54px; height:54px; place-items:center; margin:0 auto .8rem; color:var(--signal); background:rgba(245,203,74,.1); border-radius:50%; }
.empty-state h2 { margin:0; font-size:1.25rem; }
.empty-state p { margin:.45rem 0 1rem; color:var(--muted); }

.library-list { display:grid; gap:.75rem; }
.library-row { display:grid; grid-template-columns:auto minmax(0,1fr) auto; align-items:center; gap:.8rem; padding:.85rem; background:var(--surface); border:1px solid var(--stroke); border-radius:1rem; }
.library-row .station-symbol { display:grid; width:42px; height:42px; place-items:center; color:var(--signal); background:#11141f; border-radius:.7rem; }
.library-wow-mark { display:grid; width:100%; height:100%; place-items:center; color:var(--accent-ink); background:var(--accent); border-radius:.7rem; font-weight:900; }
.movie-library-mark { color:#17131a; background:var(--signal); }
.watch-library-mark { color:#17131a; background:#f1d86a; }
.rongyok-library-mark { color:#fff; background:#7b49d6; font-size:.62rem; }
.library-row h3 { margin:0; font-size:1rem; }
.library-row p { margin:.15rem 0 0; color:var(--muted); font-size:.78rem; }
.library-open { min-width:0; padding:0; color:inherit; text-align:left; background:transparent; border:0; }
.saved-toggle { display:grid; width:44px; height:44px; place-items:center; color:var(--signal); background:transparent; border:0; border-radius:50%; }
.saved-toggle[aria-pressed="true"] svg { fill: currentColor; }

.tabbar {
  position: fixed;
  z-index: 30;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  min-height: calc(var(--tab-height) + var(--bottom-safe));
  padding: .45rem max(.45rem, var(--right-safe)) max(.45rem, var(--bottom-safe)) max(.45rem, var(--left-safe));
  background: rgba(17, 20, 31, .95);
  background: color-mix(in srgb, #11141f 92%, transparent);
  border-top: 1px solid var(--stroke);
  backdrop-filter: blur(20px) saturate(125%);
  -webkit-backdrop-filter: blur(20px) saturate(125%);
}
.tab { position:relative; display:grid; min-height:54px; place-content:center; gap:.18rem; padding:.2rem; color:var(--muted); background:transparent; border:0; border-radius:.8rem; font-size:.68rem; font-weight:700; }
.tab svg { width:1.3rem; height:1.3rem; margin:auto; }
.tab.is-active { color:var(--signal); }
.tab.is-active::before { position:absolute; top:0; width:1.25rem; height:3px; content:""; background:currentColor; border-radius:999px; }
.tab:active { background:rgba(255,255,255,.08); }

.drawer-layer, .player-layer { position:fixed; z-index:60; inset:0; }
.drawer-backdrop, .player-backdrop { position:absolute; inset:0; width:100%; padding:0; background:rgba(0,0,0,.55); border:0; backdrop-filter:blur(4px); }
.drawer { position:relative; width:min(90vw, 385px); height:100dvh; padding:calc(var(--top-safe) + .85rem) max(1rem, var(--right-safe)) calc(1rem + var(--bottom-safe)) max(1rem, var(--left-safe)); overflow-y:auto; color:var(--ink); background:#161a27; border-right:1px solid var(--stroke); box-shadow: 24px 0 60px rgba(0,0,0,.36); animation:drawer-in .24s cubic-bezier(.2,.75,.2,1) both; }
@keyframes drawer-in { from { transform:translateX(-100%); } to { transform:translateX(0); } }
.drawer-header { display:flex; justify-content:space-between; gap:.75rem; align-items:start; }
.drawer h2 { font-size:1.35rem; }
.drawer-note { margin:.8rem 0 1rem; color:var(--muted); font-size:.86rem; }
.category-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:.5rem; }
.category-item { min-height:49px; padding:.55rem .62rem; color:var(--ink); text-align:left; background:rgba(255,255,255,.045); border:1px solid var(--stroke); border-radius:.7rem; font-size:.84rem; line-height:1.25; }
.category-item:active, .category-item[aria-current="true"] { color:var(--accent-ink); background:var(--signal); border-color:var(--signal); }
.drawer-source { margin-top:1.2rem; padding-top:1rem; border-top:1px solid var(--stroke); }
.drawer-movie-categories, .drawer-wow-categories { margin-top:1.15rem; }
.category-filter-wrap {
  display: grid;
  grid-template-columns: 1.1rem minmax(0, 1fr);
  align-items: center;
  gap: .55rem;
  min-height: 46px;
  margin: .65rem 0 .75rem;
  padding: .25rem .75rem;
  color: var(--muted);
  background: rgba(255,255,255,.06);
  border: 1px solid var(--stroke);
  border-radius: .8rem;
}
.category-filter-wrap input { width: 100%; min-width: 0; color: var(--ink); background: transparent; border: 0; outline: 0; }
.category-filter-wrap input::placeholder { color: var(--faint); }
.movie-raw-heading { margin-top:1.2rem; }
.drawer-loading { grid-column:1/-1; margin:.1rem 0; }
.movie-category-item { display:flex; align-items:center; justify-content:space-between; gap:.45rem; }
.movie-category-item small { color:var(--muted); font-size:.68rem; text-align:right; }
.movie-category-item[aria-current="true"] small { color:var(--accent-ink); }
.wow-category-item { display:flex; align-items:center; justify-content:space-between; gap:.45rem; }
.wow-category-item small { color:var(--muted); font-size:.68rem; }
.wow-category-item[aria-current="true"] small { color:var(--accent-ink); }
.watch-category-item { display:flex; align-items:center; justify-content:space-between; gap:.45rem; }
.watch-category-item small { color:var(--muted); font-size:.68rem; text-align:right; }
.watch-category-item[aria-current="true"] small { color:var(--accent-ink); }
.drawer-watch-categories { margin-top:1.15rem; }
.drawer-rongyok-categories { margin-top:1.15rem; }
.source-row { display:grid; grid-template-columns:auto minmax(0,1fr) auto; align-items:center; width:100%; gap:.65rem; padding:.65rem 0; color:var(--ink); text-align:left; background:transparent; border:0; }
.source-row .source-mark { width:36px; height:36px; border-radius:.65rem; font-size:1.05rem; }
.source-row strong, .source-row small { display:block; }
.source-row small { margin-top:.08rem; color:var(--muted); font-size:.73rem; }
.source-row > svg { color:var(--accent); }

.player-sheet { position:absolute; right:0; bottom:0; left:0; width:min(100%, 760px); margin:auto; padding:.55rem max(1rem, var(--right-safe)) calc(1rem + var(--bottom-safe)) max(1rem, var(--left-safe)); background:#171b28; border:1px solid var(--stroke); border-bottom:0; border-radius:1.45rem 1.45rem 0 0; box-shadow:0 -16px 60px rgba(0,0,0,.42); animation:sheet-in .24s cubic-bezier(.2,.75,.2,1) both; }
@keyframes sheet-in { from { transform:translateY(100%); } to { transform:translateY(0); } }
.player-grabber { width:36px; height:4px; margin:0 auto .7rem; background:rgba(255,255,255,.3); border-radius:999px; }
.player-heading { display:flex; align-items:start; justify-content:space-between; gap:1rem; margin-bottom:.75rem; }
.player-heading > div:first-child { min-width:0; }
.player-heading h2 { font-size:1.18rem; }
.player-actions { display:flex; flex:0 0 auto; align-items:center; gap:.05rem; }
.player-expand { display:none; }
.radio-player-artwork { display:grid; width:min(42vw, 170px); aspect-ratio:1; margin:0 auto .9rem; place-items:center; overflow:hidden; background:radial-gradient(circle at 45% 35%, rgba(255,255,255,.16), rgba(255,255,255,.04) 55%, rgba(0,0,0,.2)), #171717; border:1px solid rgba(255,255,255,.12); border-radius:1.1rem; box-shadow:0 12px 28px rgba(0,0,0,.35); }
.radio-player-artwork img { width:80%; height:80%; object-fit:contain; }
.radio-player-artwork .station-monogram { width:72px; height:72px; }
.native-player { display:block; width:100%; max-height:52dvh; background:#07090f; border-radius:1rem; }
.native-audio { display:block; width:100%; margin-top:.45rem; }
.player-help { margin:.7rem 0 0; color:var(--muted); font-size:.82rem; }

/* Reference-matched playback sheet: keep the catalogue present but visually
   quiet, then let the active stream occupy a calm, near-black iOS-style
   surface. The selector is scoped to the expanded sheet so the compact
   continuation card keeps its existing layout and behavior. */
.player-layer:not(.is-miniplayer) .player-backdrop {
  background: rgba(0,0,0,.66);
  backdrop-filter: blur(14px) saturate(.58);
  -webkit-backdrop-filter: blur(14px) saturate(.58);
}
.player-layer:not(.is-miniplayer) .player-sheet {
  right: 0;
  bottom: 0;
  left: 0;
  width: min(100%, 760px);
  min-height: 40.7dvh;
  max-height: min(78dvh, 620px);
  overflow: auto;
  overscroll-behavior: contain;
  padding: .68rem max(1.35rem, var(--right-safe)) calc(1.1rem + var(--bottom-safe)) max(1.35rem, var(--left-safe));
  color: #f5f5f5;
  background: #0d0d0d;
  border-color: rgba(255,255,255,.2);
  border-radius: 1.55rem 1.55rem 0 0;
  box-shadow: 0 -24px 80px rgba(0,0,0,.72);
}
.player-layer:not(.is-miniplayer) .player-grabber {
  position: relative;
  width: 64px;
  height: 28px;
  margin: .1rem auto -.45rem;
  background: transparent;
  cursor: grab;
  touch-action: none;
}
.player-layer:not(.is-miniplayer) .player-grabber::after {
  position: absolute;
  top: 0;
  left: 50%;
  width: 48px;
  height: 5px;
  content: "";
  background: rgba(255,255,255,.38);
  border-radius: 999px;
  transform: translateX(-50%);
}
.player-layer:not(.is-miniplayer) .player-heading {
  align-items: start;
  gap: .7rem;
  margin: 0 0 1.35rem;
}
.player-layer:not(.is-miniplayer) .player-heading .eyebrow {
  margin: 0 0 .55rem;
  color: #fff;
  font-size: .75rem;
  letter-spacing: .15em;
}
.player-layer:not(.is-miniplayer) .player-heading h2 {
  font-size: clamp(1.18rem, 5vw, 1.5rem);
  line-height: 1.15;
}
.player-layer:not(.is-miniplayer) .player-actions { gap: .15rem; }
.player-layer:not(.is-miniplayer) .player-minimize { display: none; }
.player-layer:not(.is-miniplayer) .player-minimize,
.player-layer:not(.is-miniplayer) .player-expand,
.player-layer:not(.is-miniplayer) .player-close {
  width: 42px;
  height: 42px;
}
.player-layer:not(.is-miniplayer) .player-close svg {
  width: 1.45rem;
  height: 1.45rem;
  stroke-width: 1.7;
}
.player-layer:not(.is-miniplayer) .native-player {
  width: 100%;
  max-height: none;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #000;
  border-radius: .28rem;
  box-shadow: 0 7px 22px rgba(0,0,0,.45);
}
.player-layer:not(.is-miniplayer) .radio-player-artwork[hidden] { display:none; }
.player-layer:not(.is-miniplayer) .radio-player-artwork:not([hidden]) + .native-player { margin-top:.15rem; }
.player-layer:not(.is-miniplayer) .native-audio {
  width: 100%;
  min-height: 44px;
  margin: 0;
}
.player-layer:not(.is-miniplayer) .player-help {
  margin: .95rem 0 0;
  color: #bdbdbd;
  font-size: .8rem;
}

/* YouTube-style continuation for the web/PWA path. Minimize releases the
   modal so the catalog remains usable while the same media element keeps
   playing in a Netflix-like now-playing card above the bottom tabs. The
   full-width card mirrors the compact continuation treatment used on the
   radio screen and keeps the active content visible without taking over the
   page. */
.player-layer.is-miniplayer { pointer-events:none; }
.player-layer.is-miniplayer .player-backdrop { display:none; }
.player-layer.is-miniplayer .player-sheet {
  top:auto;
  right:max(.75rem, var(--right-safe));
  bottom:calc(var(--tab-height) + .55rem + var(--bottom-safe));
  left:max(.75rem, var(--left-safe));
  width:auto;
  max-width:760px;
  display:grid;
  grid-template-columns:minmax(0, 1fr) minmax(118px, 30%);
  grid-template-areas:
    "heading media"
    "help media";
  align-items:center;
  column-gap:.75rem;
  row-gap:.28rem;
  padding:.7rem .75rem;
  pointer-events:auto;
  background:linear-gradient(105deg, #2a090c, #171717 72%);
  border:1px solid rgba(229,9,20,.52);
  border-radius:.4rem;
  box-shadow:0 14px 34px rgba(0,0,0,.6);
  animation:mini-in .2s cubic-bezier(.2,.75,.2,1) both;
}
@keyframes mini-in { from { opacity:0; transform:translateY(.75rem) scale(.96); } to { opacity:1; transform:translateY(0) scale(1); } }
.player-layer.is-miniplayer .player-grabber { display:none; }
.player-layer.is-miniplayer .player-heading { grid-area:heading; align-items:center; gap:.35rem; min-width:0; margin:0; }
.player-layer.is-miniplayer .player-heading .eyebrow { margin:0; color:#f2c5c5; font-size:.6rem; }
.player-layer.is-miniplayer .player-heading h2 { overflow:hidden; font-size:.94rem; text-overflow:ellipsis; white-space:nowrap; }
.player-layer.is-miniplayer .player-help { grid-area:help; display:-webkit-box; margin:0; overflow:hidden; color:#d9bfc0; font-size:.7rem; line-height:1.25; text-overflow:ellipsis; -webkit-box-orient:vertical; -webkit-line-clamp:2; }
.player-layer.is-miniplayer .player-minimize { display:none; }
.player-layer.is-miniplayer .player-expand { display:inline-grid; }
.player-layer.is-miniplayer .native-player { grid-area:media; align-self:center; width:100%; height:auto; max-height:88px; aspect-ratio:16/9; object-fit:contain; border-radius:.28rem; }
.player-layer.is-miniplayer .native-audio { grid-area:media; align-self:center; width:100%; height:32px; margin:0; }
.player-layer.is-miniplayer .radio-player-artwork { display:none; }

@media (max-width: 420px) {
  .radio-now-playing { grid-template-columns: 64px minmax(0,1fr) auto; gap:.7rem; padding:.9rem; }
  .radio-now-art { width:60px; height:60px; border-radius:.7rem; }
  .radio-now-art .station-monogram { width:42px; height:42px; font-size:.88rem; }
  .radio-now-playing h2 { font-size:1.03rem; }
  .radio-welcome { min-height:118px; padding:.95rem; }
  .radio-welcome-mark { width:54px; height:54px; border-radius:.8rem; }
  .external-search-grid { grid-template-columns:1fr; }
  .player-layer.is-miniplayer .player-sheet {
    grid-template-columns:minmax(0, 1fr) 104px;
    column-gap:.55rem;
    padding:.62rem .65rem;
  }
  .player-layer.is-miniplayer .player-heading h2 { font-size:.86rem; }
  .player-layer.is-miniplayer .player-help { font-size:.66rem; }
  .player-layer.is-miniplayer .native-player { max-height:72px; }
}

.toast { position:fixed; z-index:80; right:max(1rem, var(--right-safe)); bottom:calc(var(--tab-height) + 1.25rem + var(--bottom-safe)); left:max(1rem, var(--left-safe)); width:auto; max-width:480px; margin:auto; padding:.75rem 1rem; color:var(--ink); text-align:center; background:#2a3042; border:1px solid var(--stroke-bright); border-radius:.85rem; box-shadow:0 12px 30px rgba(0,0,0,.32); }

/* Central control-plane states.  This surface is intentionally quiet and
   independent of the catalogue: one remote manifest can pause access or ask
   for a platform update without changing the viewer-facing content UI. */
.control-overlay { position:fixed; z-index:100; inset:0; display:grid; place-items:center; padding:calc(1.25rem + var(--top-safe)) max(1rem, var(--right-safe)) calc(1.25rem + var(--bottom-safe)) max(1rem, var(--left-safe)); background:rgba(5,6,10,.86); backdrop-filter:blur(22px) saturate(90%); -webkit-backdrop-filter:blur(22px) saturate(90%); }
.control-dialog { width:min(100%, 28rem); padding:clamp(1.35rem, 5vw, 2rem); color:var(--ink); text-align:center; background:linear-gradient(145deg,rgba(32,35,50,.98),rgba(17,19,29,.98)); border:1px solid rgba(255,255,255,.14); border-radius:1.35rem; box-shadow:0 24px 80px rgba(0,0,0,.52); }
.control-mark { display:grid; width:3.25rem; height:3.25rem; place-items:center; margin:0 auto .85rem; color:#fff; font-family:ui-rounded,"SF Pro Rounded",sans-serif; font-size:.62rem; font-weight:900; letter-spacing:.08em; background:linear-gradient(135deg,#e50914,#a90639); border-radius:1rem; box-shadow:0 10px 28px rgba(229,9,20,.28); }
.control-dialog .eyebrow { margin-bottom:.55rem; }
.control-dialog h2 { margin:0; font-size:clamp(1.35rem,5vw,1.8rem); line-height:1.16; letter-spacing:-.03em; }
.control-dialog p:not(.eyebrow) { margin:.7rem auto 0; max-width:31ch; color:var(--muted); line-height:1.55; }
.control-actions { display:flex; flex-wrap:wrap; justify-content:center; gap:.55rem; margin-top:1.25rem; }
.control-actions .primary-button, .control-actions .secondary-button { min-width:8.5rem; }
.control-actions .text-button { width:100%; }

/* Android first-run invite gate.  Reuse the quiet control-plane treatment so
   activation is clear and focused without turning the first launch into a
   marketing screen. */
.invite-overlay { position:fixed; z-index:110; inset:0; display:grid; place-items:center; padding:calc(1.25rem + var(--top-safe)) max(1rem, var(--right-safe)) calc(1.25rem + var(--bottom-safe)) max(1rem, var(--left-safe)); background:rgba(5,6,10,.9); backdrop-filter:blur(24px) saturate(88%); -webkit-backdrop-filter:blur(24px) saturate(88%); }
.invite-dialog { width:min(100%, 29rem); padding:clamp(1.35rem, 5vw, 2.15rem); color:var(--ink); text-align:center; background:linear-gradient(145deg,rgba(32,35,50,.99),rgba(17,19,29,.99)); border:1px solid rgba(255,255,255,.15); border-radius:1.35rem; box-shadow:0 24px 80px rgba(0,0,0,.58); }
.invite-mark { display:grid; width:3.25rem; height:3.25rem; place-items:center; margin:0 auto .85rem; color:#fff; font-family:ui-rounded,"SF Pro Rounded",sans-serif; font-size:.62rem; font-weight:900; letter-spacing:.08em; background:linear-gradient(135deg,#e50914,#a90639); border-radius:1rem; box-shadow:0 10px 28px rgba(229,9,20,.28); }
.invite-dialog .eyebrow { margin-bottom:.55rem; }
.invite-dialog h2 { margin:0; font-size:clamp(1.35rem,5vw,1.8rem); line-height:1.16; letter-spacing:-.03em; }
.invite-dialog > p:not(.eyebrow):not(.invite-footnote) { margin:.7rem auto 0; max-width:32ch; color:var(--muted); line-height:1.55; }
.invite-label { display:block; margin-top:1.25rem; color:var(--ink); text-align:left; font-size:.85rem; font-weight:700; }
.invite-dialog input { width:100%; min-height:52px; margin-top:.45rem; padding:.75rem .9rem; color:var(--ink); text-align:center; letter-spacing:.08em; text-transform:uppercase; background:rgba(8,8,8,.62); border:1px solid var(--stroke-bright); border-radius:.75rem; outline:0; }
.invite-dialog input::placeholder { color:var(--faint); letter-spacing:.03em; text-transform:none; }
.invite-dialog input:focus { border-color:var(--signal); box-shadow:0 0 0 3px rgba(255,255,255,.15); }
.invite-hint { margin:.45rem 0 0; color:var(--faint); text-align:left; font-size:.76rem; }
.invite-error { margin:.65rem 0 0; color:#ffb1b1; text-align:left; font-size:.82rem; }
.invite-submit { width:100%; min-height:50px; margin-top:1rem; }
.invite-footnote { margin:1.1rem 0 0; color:var(--faint); font-size:.74rem; }

:focus-visible { outline:3px solid var(--signal); outline-offset:3px; }

@media (min-width: 680px) {
  .topbar { padding-right:max(1.5rem,var(--right-safe)); padding-left:max(1.5rem,var(--left-safe)); }
  .main-content { padding-right:max(1.5rem,var(--right-safe)); padding-left:max(1.5rem,var(--left-safe)); }
  .hero { min-height:300px; }
  .media-rail { grid-auto-columns:minmax(175px, 240px); }
  .station-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .wow-grid { grid-template-columns:repeat(4,minmax(0,1fr)); }
  .wow-grid-rail { grid-template-columns:repeat(4,minmax(0,1fr)); }
  .wow-detail { grid-template-columns:190px minmax(0,1fr); max-width:720px; }
  .episode-grid { grid-template-columns:repeat(5,minmax(0,1fr)); }
  .tabbar { right:max(2rem, var(--right-safe)); left:max(2rem, var(--left-safe)); width:min(680px, calc(100% - 4rem)); margin:auto; border:1px solid var(--stroke); border-bottom:0; border-radius:1.25rem 1.25rem 0 0; }
}

@media (min-width: 940px) {
  .station-grid { grid-template-columns:repeat(4,minmax(0,1fr)); }
  .wow-grid { grid-template-columns:repeat(5,minmax(0,1fr)); }
}

@media (min-width: 1100px) {
  .search-panel { margin-right:auto; margin-left:auto; }
}

@media (orientation: landscape) and (max-height: 600px) {
  .topbar { min-height:50px; padding-top:max(.35rem,var(--top-safe)); padding-bottom:.35rem; }
  .main-content { padding-top:.7rem; padding-bottom:calc(58px + var(--bottom-safe)); scroll-margin-top:calc(58px + var(--top-safe)); }
  .hero { min-height:158px; margin-bottom:.8rem; }
  .hero-content { max-width:44rem; padding:.7rem 1.15rem; }
  .hero h1 { max-width:30ch; font-size:1.35rem; }
  .hero p:not(.eyebrow) { display:-webkit-box; max-width:60ch; margin:.25rem 0 .5rem; overflow:hidden; font-size:.78rem; -webkit-box-orient:vertical; -webkit-line-clamp:1; }
  .hero .primary-button { min-height:39px; padding:.42rem .8rem; }
  .section { margin-bottom:1.2rem; }
  .station-grid { grid-template-columns:repeat(4,minmax(0,1fr)); }
  .wow-grid { grid-template-columns:repeat(5,minmax(0,1fr)); }
  .station-card { min-height:224px; }
  .tabbar { min-height:calc(56px + var(--bottom-safe)); padding-top:.2rem; }
  .tab { min-height:46px; grid-auto-flow:column; grid-template-columns:auto auto; column-gap:.4rem; }
  .tab.is-active::before { top:0; }
  .player-layer:not(.is-miniplayer) .player-sheet {
    max-height: calc(100dvh - 1rem);
  }
  .player-layer:not(.is-miniplayer) .native-player {
    max-height: 42dvh;
  }
}

@media (max-width: 359px) {
  .brand-copy small { display:none; }
  .main-content { padding-right:.8rem; padding-left:.8rem; }
  .station-grid { gap:.55rem; }
  .station-card { padding:.7rem; }
}

@media (max-width: 520px) {
  .movie-language-options { grid-template-columns:1fr; }
  .movie-source-panel { align-items:stretch; flex-direction:column; }
  .movie-source-panel .detail-actions { justify-content:flex-start; }
  .movie-source-panel .detail-actions .primary-button, .movie-source-panel .detail-actions .secondary-button { flex:1 1 auto; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior:auto !important; animation-duration:.01ms !important; animation-iteration-count:1 !important; transition-duration:.01ms !important; }
}

/* Streaming-first visual system: restrained black surfaces, a single red
   action colour, and poster rails that feel native to a TV catalogue. */
body {
  background: linear-gradient(180deg, #000 0%, var(--canvas) 28%, #080808 100%);
}
.topbar {
  background: linear-gradient(180deg, rgba(0,0,0,.98), rgba(0,0,0,.78) 72%, transparent);
  border-bottom: 0;
  backdrop-filter: blur(16px) saturate(115%);
  -webkit-backdrop-filter: blur(16px) saturate(115%);
}
.brand-copy strong { color: var(--accent); letter-spacing: .13em; }
.brand-copy small { color: #d5d5d5; }
.icon-button:active { background: rgba(255,255,255,.12); }
.main-content { padding-top: .25rem; }
.hero {
  min-height: min(72vw, 500px);
  margin: 0 calc(-1 * max(1rem, var(--right-safe))) 1.75rem calc(-1 * max(1rem, var(--left-safe)));
  border: 0;
  border-radius: 0;
  background-color: #121212;
  box-shadow: none;
}
.hero::before {
  background: linear-gradient(90deg, rgba(0,0,0,.9) 0%, rgba(0,0,0,.55) 45%, rgba(0,0,0,.06) 100%), linear-gradient(0deg, #080808 0%, rgba(8,8,8,.64) 24%, transparent 66%);
}
.hero::after { opacity: .12; background-image: linear-gradient(90deg, transparent 0 50%, rgba(255,255,255,.04) 50% 51%, transparent 51% 100%); }
.content-hero { background-image: none; }
.content-hero .hero-backdrop {
  position: absolute;
  z-index: -2;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: .82;
  filter: saturate(.92);
}
.content-hero .hero-meta { margin: .55rem 0 1.05rem; color: #d8d8d8; font-size: .9rem; }
.hero-content { max-width: 37rem; padding: clamp(1.25rem, 5vw, 3rem) max(1rem, var(--left-safe)) 2rem; }
.hero h1 { max-width: 13ch; font-size: clamp(2rem, 9vw, 3.7rem); letter-spacing: -.055em; }
.hero p:not(.eyebrow) { color: #e6e6e6; }
.eyebrow { color: #d9d9d9; letter-spacing: .13em; }
.primary-button { background: var(--accent); border-radius: .28rem; box-shadow: 0 8px 18px rgba(229,9,20,.25); }
.secondary-button { background: rgba(109,109,110,.7); border-color: transparent; border-radius: .28rem; }
.section { margin-bottom: 2.1rem; }
.section-head h2 { font-size: 1.28rem; }
.section-link { color: #e5e5e5; }
.section-link:hover, .section-link:focus-visible { color: var(--accent); }
.media-card {
  min-height: 148px;
  padding: .85rem;
  background: linear-gradient(145deg, #202020, #121212);
  border: 0;
  border-radius: .2rem;
}
.media-card .card-icon { color: var(--accent); background: rgba(229,9,20,.16); border-radius: .3rem; }
.media-card small { color: #d6d6d6; }
.on-air-card { background: linear-gradient(105deg, #2a090c, #151515 70%); border-color: rgba(229,9,20,.35); border-radius: .25rem; }
.on-air-card::after { background: rgba(229,9,20,.18); }
.live-status { color: #e5e5e5; }
.play-disc { color: #fff; background: var(--accent); }
.category-chip { color: #d2d2d2; background: #1f1f1f; border-color: transparent; border-radius: .2rem; }
.category-chip[aria-pressed="true"] { color: #fff; background: var(--accent); border-color: var(--accent); }
.wow-grid-rail {
  display: grid;
  grid-template-columns: none;
  grid-auto-columns: minmax(132px, 34vw);
  grid-auto-flow: column;
  gap: .6rem;
  overflow-x: auto;
  padding: .1rem 0 .8rem;
  scrollbar-width: none;
  scroll-snap-type: x proximity;
  touch-action: pan-x;
}
.wow-grid-rail::-webkit-scrollbar { display: none; }
.wow-grid-rail .wow-card { scroll-snap-align: start; }
.wow-card { background: transparent; border: 0; border-radius: .2rem; }
.wow-poster-button { border-radius: .2rem; background: #1b1b1b; }
.wow-poster-button::after { height: 48%; background: linear-gradient(transparent, rgba(0,0,0,.78)); }
.wow-play-badge { right: .45rem; bottom: .45rem; color: #fff; background: var(--accent); }
.wow-card-copy { padding: .5rem .15rem .15rem; }
.wow-card-copy h3 { font-size: .84rem; }
.wow-card-copy p { color: #9f9f9f; }
.wow-detail-poster, .wow-detail-page .wow-detail-poster { border: 0; border-radius: .2rem; background: #171717; }
.wow-meta { color: #e5e5e5; }
.episode-chip, .episode-choice, .source-option, .episode-season { background: #1b1b1b; border-color: #333; border-radius: .25rem; }
.episode-chip svg, .episode-choice svg, .source-option-arrow { color: var(--accent); }
.source-card { background: linear-gradient(105deg, #2a090c, #171717); border-color: rgba(229,9,20,.4); border-radius: .25rem; }
.source-mark { background: var(--accent); color: #fff; border-radius: .25rem; }
.movie-source-mark, .movie-library-mark { background: #e5e5e5; color: #111; }
.drawer { background: #0e0e0e; border-right-color: #262626; }
.category-item { background: #1b1b1b; border-color: #2d2d2d; border-radius: .25rem; }
.category-item:active, .category-item[aria-current="true"] { color: #fff; background: var(--accent); border-color: var(--accent); }
.tabbar { background: rgba(8,8,8,.97); border-top-color: #262626; }
.tab.is-active { color: var(--accent); }
.player-sheet { background: #0e0e0e; border-color: #2a2a2a; }
.native-player { background: #000; border-radius: .25rem; }
.toast { background: #242424; border-color: #444; }
:focus-visible { outline-color: #fff; }

@media (min-width: 680px) {
  .hero { margin-right: calc(-1 * max(1.5rem, var(--right-safe))); margin-left: calc(-1 * max(1.5rem, var(--left-safe))); }
  .wow-grid-rail { grid-auto-columns: minmax(150px, 180px); }
}
@media (orientation: landscape) and (max-height: 600px) {
  .main-content { padding-top: .1rem; }
  .hero { min-height: 158px; margin-bottom: .8rem; }
  .hero-content { max-width: 44rem; padding: .7rem max(1.15rem, var(--left-safe)); }
  .hero h1 { max-width: 30ch; font-size: 1.35rem; }
  .hero p:not(.eyebrow) { margin: .25rem 0 .5rem; font-size: .78rem; }
  .wow-grid-rail { grid-auto-columns: minmax(116px, 18vw); }
}
@media (max-width: 359px) {
  .hero { margin-right: -.8rem; margin-left: -.8rem; }
}

/* Android TV port of the Roku 1.0.10 launcher.  The wide layout keeps the
   same 10-foot information hierarchy: a compact clock/nav band, an eight
   tile service launcher, then a single continue-watching shelf.  These rules
   are scoped to the TV breakpoint so the phone/PWA layout remains unchanged. */
html[data-tv="true"] {
  --tv-page-gutter: 80px;
  --tv-brand-card-width: 360px;
  --tv-brand-card-height: 190px;
  --tv-card-gap-x: 24px;
  --tv-card-gap-y: 30px;
  background: #080b16;
}

html[data-tv="true"] body {
  min-width: 1100px;
  background: #080b16;
}

html[data-tv="true"] .main-content {
  width: 100%;
  max-width: none;
  min-height: 100dvh;
  margin: 0;
  padding: 0;
  scroll-padding-top: 0;
}

html[data-tv="true"] .tabbar { display: none; }

html[data-tv-home="true"] .topbar { display: none; }
html[data-tv="true"] .search-panel {
  position: fixed;
  z-index: 31;
  top: 24px;
  left: 282px;
  width: min(640px, calc(100vw - 330px));
  max-width: none;
  margin: 0;
  background: rgba(17, 24, 39, .98);
  border-color: rgba(221,232,255,.25);
  box-shadow: 0 18px 45px rgba(0,0,0,.42);
}

html[data-tv="true"] .tv-launcher-page {
  width: 100%;
  min-height: 100dvh;
  padding: 0 var(--tv-page-gutter) 54px;
  color: #f7f9ff;
  background:
    radial-gradient(72% 52% at 54% 18%, rgba(63, 19, 62, .28), transparent 68%),
    linear-gradient(180deg, #080b16 0%, #0b0d18 54%, #080b16 100%);
}

html[data-tv="true"] .tv-launcher-header {
  position: relative;
  min-height: 170px;
  margin: 0 calc(-1 * var(--tv-page-gutter));
  padding: 0 var(--tv-page-gutter);
  background: linear-gradient(180deg, rgba(4, 6, 13, .94) 0%, rgba(4, 6, 13, .35) 68%, transparent 100%);
}

html[data-tv="true"] .tv-brand-lockup {
  position: absolute;
  top: 2px;
  left: 70px;
  display: inline-flex;
  width: 154px;
  height: 110px;
  align-items: center;
  gap: 11px;
}

html[data-tv="true"] .tv-brand-lockup img {
  width: 154px;
  height: 110px;
  object-fit: contain;
}

html[data-tv="true"] .tv-clock-block {
  position: absolute;
  top: 8px;
  left: 270px;
  min-width: 530px;
}
html[data-tv="true"] .tv-clock-block p {
  margin: 0 0 4px;
  color: #aeb9cb;
  font-family: ui-rounded, "SF Pro Rounded", sans-serif;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: .12em;
}
html[data-tv="true"] .tv-clock-block > div { display: flex; align-items: center; gap: 18px; }
html[data-tv="true"] .tv-clock-block strong {
  color: #f7f9ff;
  font-family: ui-rounded, "SF Pro Rounded", sans-serif;
  font-size: 38px;
  font-weight: 500;
  line-height: 1;
}
html[data-tv="true"] .tv-clock-block > div > span {
  width: 2px;
  height: 28px;
  background: rgba(255,255,255,.22);
}
html[data-tv="true"] .tv-clock-block small {
  color: #c6cddc;
  font-family: ui-rounded, "SF Pro Rounded", sans-serif;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: .04em;
}

html[data-tv="true"] .tv-nav {
  position: absolute;
  top: 101px;
  right: 38px;
  left: 282px;
  display: flex;
  height: 62px;
  align-items: stretch;
  gap: 2px;
  padding: 6px 10px;
  overflow: hidden;
  background: rgba(17, 24, 39, .88);
  border: 1px solid rgba(221,232,255,.12);
  border-radius: 14px;
  box-shadow: 0 12px 30px rgba(0,0,0,.22);
}

html[data-tv="true"] .tv-nav-item {
  position: relative;
  min-width: 0;
  flex: 1 1 0;
  padding: 0 18px;
  color: #c6cddc;
  background: transparent;
  border: 0;
  border-radius: 9px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: .01em;
  transition: color .16s ease, background .16s ease, transform .16s ease;
}
html[data-tv="true"] .tv-nav-item::after {
  position: absolute;
  right: 18px;
  bottom: 5px;
  left: 18px;
  height: 3px;
  content: "";
  background: var(--accent);
  border-radius: 99px;
  opacity: 0;
}
html[data-tv="true"] .tv-nav-item.is-active { color: #fff; }
html[data-tv="true"] .tv-nav-item.is-active::after { opacity: 1; }
html[data-tv="true"] .tv-nav-item:hover,
html[data-tv="true"] .tv-nav-item:focus-visible {
  color: #fff;
  background: rgba(255,255,255,.13);
  transform: translateY(-1px);
}
html[data-tv="true"] .tv-nav-item:focus-visible {
  outline: 3px solid #fff;
  outline-offset: -5px;
}
html[data-tv="true"] .tv-nav-item:focus-visible::after { opacity: 1; }

html[data-tv="true"] .tv-brand-section { margin-top: 71px; }
html[data-tv="true"] .tv-section-heading { margin: 0; }
html[data-tv="true"] .tv-section-heading .eyebrow {
  margin: 0 0 5px;
  color: #aeb9cb;
  font-size: 17px;
  letter-spacing: .18em;
}
html[data-tv="true"] .tv-section-heading h1,
html[data-tv="true"] .tv-section-heading h2 {
  margin: 0;
  color: #f7f9ff;
  font-size: 52px;
  font-weight: 800;
  letter-spacing: -.035em;
  line-height: 1.08;
}

html[data-tv="true"] .tv-brand-grid {
  display: grid;
  grid-template-columns: repeat(4, var(--tv-brand-card-width));
  grid-auto-rows: var(--tv-brand-card-height);
  gap: var(--tv-card-gap-y) var(--tv-card-gap-x);
  margin-top: 28px;
}

html[data-tv="true"] .tv-brand-tile {
  position: relative;
  display: block;
  width: var(--tv-brand-card-width);
  height: var(--tv-brand-card-height);
  overflow: hidden;
  padding: 0;
  color: #f7f9ff;
  text-align: left;
  background: #111827;
  border: 1px solid rgba(221,232,255,.14);
  border-radius: 15px;
  box-shadow: 0 10px 26px rgba(0,0,0,.24);
  transform-origin: center;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}
html[data-tv="true"] .tv-brand-tile::before {
  position: absolute;
  z-index: 3;
  inset: 5px;
  content: "";
  border: 3px solid transparent;
  border-radius: 10px;
  pointer-events: none;
}
html[data-tv="true"] .tv-brand-tile::after {
  position: absolute;
  z-index: 4;
  right: 16px;
  bottom: 8px;
  left: 16px;
  height: 4px;
  content: "";
  background: var(--accent);
  border-radius: 99px;
  opacity: 0;
  pointer-events: none;
}
html[data-tv="true"] .tv-brand-tile:focus-visible,
html[data-tv="true"] .tv-brand-tile:hover {
  border-color: rgba(255,255,255,.82);
  box-shadow: 0 0 0 3px rgba(255,255,255,.1), 0 14px 38px rgba(0,0,0,.42), 0 0 24px rgba(255,255,255,.09);
  transform: scale(1.045);
}
html[data-tv="true"] .tv-brand-tile:focus-visible { outline: none; }
html[data-tv="true"] .tv-brand-tile:focus-visible::before { border-color: rgba(255,255,255,.9); }
html[data-tv="true"] .tv-brand-tile:focus-visible::after { opacity: 1; }
html[data-tv="true"] .tv-brand-art,
html[data-tv="true"] .tv-brand-art > img:first-child,
html[data-tv="true"] .tv-brand-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
html[data-tv="true"] .tv-brand-art > img:first-child { object-fit: cover; opacity: .94; }
html[data-tv="true"] .tv-brand-shade { background: rgba(8, 11, 22, .965); }
html[data-tv="true"] .tv-brand-mark {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 190px;
  height: 48px;
  object-fit: contain;
  object-position: center;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,.45));
  transform: translate(-50%, -50%);
}
html[data-tv="true"] .tv-history-section { margin-top: 20px; }
html[data-tv="true"] .tv-history-section .tv-section-heading h2 { font-size: 30px; }
html[data-tv="true"] .tv-history-section .tv-section-heading .eyebrow { display: none; }
html[data-tv="true"] .tv-history-grid {
  display: grid;
  grid-template-columns: repeat(6, 260px);
  grid-auto-rows: 140px;
  gap: 24px;
  margin-top: 12px;
}
html[data-tv="true"] .tv-history-tile {
  min-width: 0;
  width: 260px;
  height: 140px;
}
html[data-tv="true"] .tv-history-tile .wow-poster-button {
  height: 140px;
  aspect-ratio: auto;
  border: 1px solid rgba(221,232,255,.14);
  border-radius: 10px;
}
html[data-tv="true"] .tv-history-tile .wow-poster-button:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 4px;
}
html[data-tv="true"] .tv-history-tile .wow-card-copy { display: none; }
html[data-tv="true"] .tv-history-tile .wow-play-badge { width: 36px; height: 36px; }
html[data-tv="true"] .tv-history-empty {
  margin: 12px 0 0;
  color: #8f9aaf;
  font-size: 24px;
}

@media (min-width: 1100px) and (max-width: 1599px) {
  html[data-tv="true"] {
    --tv-page-gutter: 46px;
    --tv-brand-card-width: calc((100vw - 2 * var(--tv-page-gutter) - 3 * var(--tv-card-gap-x)) / 4);
    --tv-brand-card-height: calc(var(--tv-brand-card-width) * .528);
  }
  html[data-tv="true"] .tv-brand-lockup { left: 38px; }
  html[data-tv="true"] .tv-clock-block { left: 210px; }
  html[data-tv="true"] .tv-nav { right: 24px; left: 210px; }
  html[data-tv="true"] .tv-history-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  html[data-tv="true"] .tv-history-tile { width: auto; }
}

/* Android TV WebView reports a 960px CSS viewport on a 1920px panel at
   density 2. Keep the Roku launcher in a true 4x2 grid instead of allowing
   the wide desktop card constants to overflow the WebView. */
@media (max-width: 1099px) and (orientation: landscape) {
  html[data-tv="true"] body { min-width: 0; }
  html[data-tv="true"] {
    --tv-page-gutter: 40px;
    --tv-brand-card-width: calc((100vw - 2 * var(--tv-page-gutter) - 3 * var(--tv-card-gap-x)) / 4);
    --tv-brand-card-height: calc(var(--tv-brand-card-width) * .528);
  }
  html[data-tv="true"] .tv-nav {
    right: 19px;
    left: 282px;
    gap: 0;
    padding-inline: 6px;
  }
  html[data-tv="true"] .tv-nav-item {
    padding-inline: 8px;
    font-size: 17px;
  }
  html[data-tv="true"] .tv-brand-mark {
    width: min(120px, 62%);
    height: 34px;
  }
  html[data-tv="true"] .tv-history-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
  }
  html[data-tv="true"] .tv-history-tile { width: auto; }
}
