/* Catnip in a browser (docs/WEB.md). Night only, Catnip's tokens (DESIGN "Identity", WEB WB2): every colour below
   is a token; Fredoka for what has a voice, system sans for what is read. 390 px wide: no sideways scroll, 44 px
   targets. */
@font-face {
  font-family: "Fredoka";
  src: url("fredoka.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --night: #121A14;
  --surface: #1C2A20;
  --band: #2B4031;
  --focus: #2F6B3D;
  --leaf: #7CC46B;
  --mint: #CDEBB8;
  --cream: #F4EEDD;
  --dim: #8FA095;
  --ginger: #F2A65A;
  --good: #0CA30C;
  --critical: #D03B3B;
  --line: #2B4031;
  --radius: 12px;
  --page: 1320px;
  --voice: "Fredoka", ui-rounded, system-ui, sans-serif;
  --read: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --top: 60px;
  --bar: 64px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--night);
  color: var(--cream);
  font: 16px/1.5 var(--read);
  font-variant-numeric: tabular-nums;
}
a { color: var(--leaf); }
h1, h2, .mark { font-family: var(--voice); font-weight: 600; letter-spacing: 0.01em; }
h1 { font-size: 28px; margin: 4px 0 18px; }
h2 { font-size: 19px; margin: 0 0 10px; color: var(--mint); }
:focus-visible { outline: 3px solid var(--mint); outline-offset: 2px; border-radius: 6px; }
.skip { position: absolute; left: -999px; top: 8px; }
.skip:focus { left: 8px; z-index: 10; background: var(--surface); padding: 10px 14px; }

/* the top: the wordmark, the sections, you */
.top {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; gap: 20px;
  height: var(--top); padding: 0 max(16px, env(safe-area-inset-left));
  background: var(--night);
  border-bottom: 1px solid var(--line);
}
.mark { display: inline-flex; align-items: center; min-height: 44px; color: var(--leaf); font-size: 24px; font-weight: 700; text-decoration: none; }
.mark.big { font-size: 44px; margin: 0 0 4px; }
.sections { display: flex; gap: 4px; }
.sections a, .me {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 0 14px; border-radius: 22px;
  color: var(--cream); text-decoration: none; font-family: var(--voice); font-weight: 500;
}
.sections a:hover, .me:hover { background: var(--surface); }
.sections a[aria-current="page"], .me[aria-current="page"] { background: var(--cream); color: var(--night); }
.me { margin-left: auto; padding-left: 6px; }
.avatar {
  display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
  background: var(--focus); color: var(--cream); font-weight: 600;
}

/* the page */
main { display: block; max-width: var(--page); margin: 0 auto; padding: 20px max(16px, env(safe-area-inset-left)) 40px; }
main:focus { outline: none; }
.section { animation: in 160ms ease-out; }
@keyframes in { from { opacity: 0; transform: translateY(4px); } }

.card { background: var(--surface); border-radius: var(--radius); padding: 16px 18px; margin: 0 0 16px; max-width: 720px; }
.empty { background: var(--surface); border-radius: var(--radius); padding: 28px 24px; max-width: 720px; }
.lead { font-family: var(--voice); font-size: 20px; margin: 0 0 6px; color: var(--mint); }
.empty p:last-child { margin-bottom: 0; }
.hint, .dim { color: var(--dim); }
/* The account's apps (account.html): the steps to install Catnip on a phone and a TV. */
.apps h3 { font-family: var(--voice); font-weight: 600; font-size: 16px; color: var(--cream); margin: 18px 0 6px; }
.apps .steps { margin: 8px 0 0; padding-left: 22px; }
.apps .steps li { margin: 6px 0; line-height: 1.45; }
.mono { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: 0.92em; overflow-wrap: anywhere; }
.hint { font-size: 14px; margin: 10px 0 0; }

.rows { list-style: none; margin: 0; padding: 0; }
.rows li {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px;
  min-height: 44px; padding: 6px 0; border-bottom: 1px solid var(--line);
}
.rows li:last-child { border-bottom: 0; }
.row-main { flex: 1 1 180px; }
.rows form { margin: 0; }
.tag { display: inline-block; font-size: 13px; padding: 2px 10px; border-radius: 11px; background: var(--night); }
.tag.ok { color: var(--leaf); }
.tag.dim { color: var(--dim); }

.note { padding: 10px 14px; border-radius: 10px; margin: 0 0 16px; max-width: 720px; background: var(--surface); }
.note.ok { border-left: 4px solid var(--leaf); }
.note.bad { border-left: 4px solid var(--critical); }

/* forms */
.stack { display: grid; gap: 6px; max-width: 420px; }
.stack label { color: var(--mint); font-size: 14px; margin-top: 8px; }
.stack button { margin-top: 14px; justify-self: start; }
input {
  font: inherit; color: var(--cream); background: var(--night);
  border: 1px solid var(--band); border-radius: 10px; padding: 10px 12px; min-height: 44px; width: 100%;
}
input:focus-visible { border-color: var(--leaf); }
button, .button {
  display: inline-flex; align-items: center; justify-content: center;
  font: 500 16px var(--voice); color: var(--night); background: var(--cream);
  border: 0; border-radius: 22px; min-height: 44px; padding: 0 20px; cursor: pointer; text-decoration: none;
}
button:hover, .button:hover { background: var(--mint); }
button.quiet, .button.quiet { background: transparent; color: var(--mint); border: 1px solid var(--band); }
button.quiet:hover, .button.quiet:hover { background: var(--surface); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.actions form { margin: 0; }

/* the door */
body.door { display: grid; place-items: center; }
.signin { width: 100%; max-width: 420px; padding: 40px 20px; }

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

/* The page is a column: the top, then the player when it's in the flow (Live, and every section on a phone), then
   the section. The player is the same element everywhere (WEB WB1): only its place changes, so it plays on. */
body:not(.door) { display: flex; flex-direction: column; }
.top { order: 0; }
.player { order: 1; }
main { order: 2; width: 100%; }

/* the player: docked in the corner by default; big at the top of Live */
.player[hidden] { display: none; }
.player {
  position: fixed; right: 16px; bottom: 16px; z-index: 6; width: 400px;
  background: var(--surface); border-radius: var(--radius); overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}
body[data-view="live"] .player {
  position: static; width: 100%; max-width: min(960px, calc((100vh - 260px) * 16 / 9)); margin: 16px auto 0; box-shadow: none;
}
.screen { position: relative; aspect-ratio: 16 / 9; background: #000; }
.screen video { display: block; width: 100%; height: 100%; }
.player-wait, .player-error {
  position: absolute; inset: 0; margin: 0; display: grid; place-items: center; align-content: center; gap: 10px;
  padding: 16px; text-align: center; background: rgba(18, 26, 20, 0.7);
}
.player-error { color: var(--cream); }
.player-error > span:first-child { color: var(--critical); font-weight: 700; }
.spin { width: 34px; height: 34px; border-radius: 50%; border: 4px solid var(--band); border-top-color: var(--leaf); animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.caption { position: relative; display: flex; align-items: center; gap: 4px; padding: 6px 8px 8px 12px; }
.cap-text { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; color: var(--cream); text-decoration: none; min-height: 44px; }
.cap-lines { display: grid; min-width: 0; }
.cap-lines > * { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cap-lines .dim { font-size: 14px; }
.pill { flex: none; font: 700 12px var(--voice); letter-spacing: 0.06em; color: var(--night); background: var(--leaf); border-radius: 6px; padding: 2px 7px; }
.icon {
  flex: none; width: 44px; height: 44px; padding: 0; border-radius: 50%;
  background: transparent; color: var(--cream); font-size: 18px; border: 0;
}
.icon:hover { background: var(--band); }
.progress { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--band); }
.progress i { display: block; height: 100%; width: 0; background: var(--leaf); }
body.playing:not([data-view="live"]) main { padding-bottom: 360px; } /* the dock never hides the last row */
/* docked, the caption takes two rows: what plays across the top, the buttons and the volume under it */
body:not([data-view="live"]) .caption { flex-wrap: wrap; justify-content: flex-end; }
body:not([data-view="live"]) .cap-text { flex: 1 1 100%; }

/* Live: the guide's tabs, groups, the grid and the lists */
.guide-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin: 0 0 12px; }
.tabs, .groups, .guide-nav { display: flex; flex-wrap: wrap; gap: 6px; }
.tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; max-width: 100%; }
.tabs [role="tab"] { flex: none; }
.groups { margin: 0 0 12px; overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; padding-bottom: 2px; }
.tabs [role="tab"] { background: transparent; color: var(--mint); border: 1px solid var(--band); }
.tabs [role="tab"][aria-selected="true"], .chip.on { background: var(--cream); color: var(--night); border-color: var(--cream); }
.chip { flex: none; background: var(--surface); color: var(--cream); border: 1px solid var(--band); font-size: 15px; padding: 0 16px; }
.chip:hover, .tabs [role="tab"]:hover { background: var(--band); color: var(--cream); }

.grid-scroll { overflow-x: auto; border-radius: var(--radius); background: var(--surface); }
.grid { position: relative; min-width: 820px; --ch: 210px; }
.grid-times { display: flex; position: sticky; top: 0; height: 36px; align-items: center; border-bottom: 1px solid var(--line); background: var(--surface); z-index: 2; }
.grid-day { flex: none; width: var(--ch); padding-left: 12px; font: 600 14px var(--voice); color: var(--leaf); position: sticky; left: 0; background: var(--surface); }
.ticks { flex: 1; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; font-size: 13px; color: var(--dim); }
.ticks span { border-left: 1px solid var(--line); padding-left: 6px; }
.grid-rows { list-style: none; margin: 0; padding: 0; }
.grid-row { display: flex; height: 56px; border-bottom: 1px solid var(--line); }
.grid-row:last-child { border-bottom: 0; }
.ch { flex: none; width: var(--ch); display: flex; align-items: center; position: sticky; left: 0; z-index: 1; background: var(--surface); border-right: 1px solid var(--line); }
.line { position: relative; flex: 1; }
.grid::after { /* the now line */
  content: ""; position: absolute; top: 0; bottom: 0; width: 2px; background: var(--ginger); pointer-events: none; z-index: 1;
  left: calc(var(--ch) + (100% - var(--ch)) * var(--now, -100) / 100);
}
.prog {
  position: absolute; top: 4px; bottom: 4px; display: grid; align-content: center; justify-content: start; text-align: left;
  min-height: 0; padding: 0 10px; border-radius: 8px; background: var(--night); color: var(--cream);
  font: 14px/1.25 var(--read); overflow: hidden; border: 1px solid var(--line);
}
.prog b, .prog small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prog b { font-weight: 600; }
.prog small { color: var(--dim); font-size: 12px; }
.prog.live { background: var(--focus); border-color: var(--focus); }
.prog.live small { color: var(--mint); }
.prog:hover { background: var(--band); }
.prog.none { position: static; display: flex; height: 100%; background: transparent; border: 0; color: var(--dim); }

.play {
  flex: 1; min-width: 0; display: flex; align-items: center; justify-content: flex-start; gap: 10px; height: 100%; min-height: 44px;
  padding: 0 8px; background: transparent; color: var(--cream); border-radius: 0; font: 500 15px var(--read); text-align: left;
}
.play:hover { background: var(--band); }
.logo { flex: none; display: grid; place-items: center; width: 44px; height: 32px; }
.logo img { max-width: 44px; max-height: 32px; object-fit: contain; }
.logo:empty { display: none; } /* no logo, or it failed: the name takes the room */
.ch-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
li.playing .play { color: var(--leaf); }
li.playing .ch-name::before { content: "▶ "; }
.star { flex: none; width: 44px; height: 44px; padding: 0; background: transparent; color: var(--dim); font-size: 20px; border-radius: 50%; }
.star[aria-pressed="true"] { color: var(--ginger); }
.star:hover { background: var(--band); }

.list { background: var(--surface); border-radius: var(--radius); padding: 4px 8px; max-width: 960px; }
.list .play { flex: 0 1 260px; }
.list .row-main { display: grid; min-width: 0; }
.list .row-main > * { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list .next { font-size: 14px; }
.search { max-width: 520px; margin: 0 0 12px; }
.search.big { max-width: 720px; margin: 0 0 20px; }
.search.big input { min-height: 56px; font-size: 20px; padding: 0 18px; border-radius: 28px; background: var(--surface); }
.prog-detail { margin-top: 12px; }
.prog-detail h2 { color: var(--cream); }

/* the bottom bar on a phone */
.bar { display: none; }
/* the caption's own mute and full screen are live's; a film has the browser's controls */
.player[data-kind="od"] #player-toggle { display: inline-grid; place-items: center; }

/* the caption's buttons by what plays: live has mute and full screen; music previous, play/pause, next; the
   radio play/pause; a film the browser's own controls */
.audio-only { display: none; }
.player[data-kind="music"] .audio-only, .player[data-kind="radio"] #player-toggle { display: inline-grid; place-items: center; }
.player[data-kind="music"] #player-full, .player[data-kind="radio"] #player-full { display: none; }
.player[data-kind="music"] video, .player[data-kind="radio"] video { visibility: hidden; }
.player-cover { position: absolute; inset: 0; margin: auto; height: 100%; max-width: 100%; object-fit: contain; }
.player[data-kind="radio"] .screen::after, .player[data-kind="music"] .screen:not(:has(.player-cover:not([hidden])))::after {
  content: "♪"; position: absolute; inset: 0; display: grid; place-items: center; font-size: 64px; color: var(--leaf);
}
.player[data-kind="radio"] .screen::after { content: "📻"; }

/* the volume: a slim slider beside mute, cream on night */
input.volume { width: 96px; min-height: 44px; accent-color: var(--leaf); background: transparent; border: 0; padding: 0; }
.player[data-kind="radio"] #player-mute, .player[data-kind="music"] #player-mute { display: inline-grid; place-items: center; }

/* On Demand's full player (the TV's bars, VodBar.kt): the window is the picture; the bars float over it */
body.od-full { overflow: hidden; }
body.od-full .player {
  position: fixed; inset: 0; z-index: 30; width: auto; max-width: none; margin: 0; border-radius: 0; box-shadow: none; background: #000;
}
body.od-full .screen { position: absolute; inset: 0; aspect-ratio: auto; height: auto; }
body.od-full .screen video { object-fit: contain; }
body.od-full .caption { display: none; }
.player.idle { cursor: none; }
.vod { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between; pointer-events: none; transition: opacity 200ms; }
.player.idle .vod { opacity: 0; }
.vod > * { pointer-events: auto; }
.vod-top {
  display: flex; align-items: center; gap: 12px; padding: 14px max(20px, env(safe-area-inset-right)) 40px max(12px, env(safe-area-inset-left));
  background: linear-gradient(to bottom, rgba(11, 16, 12, 0.85), transparent);
}
.vod-title { flex: 1; min-width: 0; display: grid; }
.vod-title b { font: 600 22px var(--voice); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vod-title span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--mint); }
.vod-clock { font: 500 18px var(--read); color: var(--cream); }
.vod-bottom {
  display: grid; gap: 6px; padding: 60px max(24px, env(safe-area-inset-right)) max(18px, env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left));
  background: linear-gradient(to top, rgba(11, 16, 12, 0.94), rgba(11, 16, 12, 0.65) 60%, transparent);
}
.vod-scrub { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; font-size: 15px; }
.vod-scrub span:last-child { color: var(--mint); }
#vod-seek { width: 100%; min-height: 44px; accent-color: var(--leaf); background: transparent; border: 0; padding: 0; cursor: pointer; }
.vod-buttons { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; }
.vod-mid { display: flex; align-items: center; gap: 18px; }
.vod-right { display: flex; align-items: center; justify-content: flex-end; gap: 6px; flex-wrap: wrap; }
.vod .icon { background: rgba(28, 42, 32, 0.8); color: var(--cream); font-size: 15px; }
.vod .icon:hover, .vod .icon:focus-visible { background: var(--cream); color: var(--night); }
.vod .icon.big { width: 60px; height: 60px; font-size: 22px; background: var(--cream); color: var(--night); }
.vod .chip { background: rgba(28, 42, 32, 0.8); }
.vod-next {
  position: absolute; right: 28px; bottom: 150px; display: flex; align-items: center; gap: 14px; max-width: min(560px, calc(100% - 56px));
  padding: 10px 12px; border-radius: 14px; background: rgba(28, 42, 32, 0.95); border: 2px solid var(--cream);
}
.vod-next img { width: 160px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; background: var(--night); }
.vod-next > div { display: grid; min-width: 0; }
.vod-next .kicker { font-size: 13px; letter-spacing: 0.1em; }
.vod-next b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vod-menu {
  position: absolute; right: 24px; bottom: 140px; display: grid; gap: 4px; min-width: 260px; max-width: calc(100% - 48px);
  max-height: 50vh; overflow: auto; padding: 12px; border-radius: 14px; background: rgba(28, 42, 32, 0.97);
}
.vod-menu button { justify-content: flex-start; background: transparent; color: var(--cream); border-radius: 10px; font: 15px var(--read); text-align: left; }
.vod-menu button:hover, .vod-menu button:focus-visible { background: var(--cream); color: var(--night); }
.vod-menu button[aria-checked="true"] { color: var(--leaf); }

/* Music (WEB slice 5) */
.card-od.square .art { aspect-ratio: 1; }
.art.round, .cover.round { border-radius: 50%; }
.tile { display: grid; gap: 4px; width: 100%; padding: 0; background: transparent; color: var(--cream); text-align: left; border-radius: 10px; font: inherit; }
.tile:hover { background: transparent; }
.tile .art { width: 100%; }
.tile:hover .art, .tile:focus-visible .art { outline: 3px solid var(--cream); outline-offset: 2px; }
.mu-head { display: flex; flex-wrap: wrap; align-items: end; gap: 20px; margin: 0 0 20px; }
.mu-head .cover { position: relative; flex: none; width: 220px; aspect-ratio: 1; border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.mu-head .cover img { width: 100%; height: 100%; object-fit: cover; }
.mu-head-text { display: grid; gap: 8px; min-width: 0; flex: 1 1 260px; }
.mu-head h1 { margin: 0; }
.facts a { display: inline-flex; align-items: center; min-height: 44px; color: var(--mint); }
.tracks { list-style: none; margin: 0 0 22px; padding: 0; max-width: 900px; }
.tracks li { border-bottom: 1px solid var(--line); }
.track {
  display: grid; grid-template-columns: 36px 1fr auto; align-items: center; gap: 12px; width: 100%; min-height: 52px;
  padding: 6px 8px; background: transparent; color: var(--cream); border-radius: 8px; font: 15px var(--read); text-align: left;
}
.track:hover { background: var(--surface); }
.track .n { text-align: right; }
.track .t { display: grid; min-width: 0; }
.track .t > * { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.track .t b { font-weight: 600; }
.track .t .dim { font-size: 13px; }
.orders { margin: 0 0 16px; }

/* On Demand (WEB slice 4) */
.crumbs { margin: 0 0 8px; display: flex; flex-wrap: wrap; gap: 4px 14px; }
.crumbs a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; font-family: var(--voice); }
.od-top { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin: 0 0 18px; }
.od-top .search { flex: 1 1 280px; margin: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
a.chip { display: inline-flex; align-items: center; min-height: 44px; border-radius: 22px; text-decoration: none; font-family: var(--voice); font-weight: 500; }
.od-row { margin: 0 0 22px; }
.strip { list-style: none; margin: 0; padding: 4px 2px 10px; display: grid; grid-auto-flow: column; grid-auto-columns: 150px; gap: 14px; overflow-x: auto; scrollbar-width: thin; }
.strip.wide { grid-auto-columns: 280px; }
.grid-od { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 18px 14px; }
.card-od a { display: grid; gap: 4px; color: var(--cream); text-decoration: none; border-radius: 10px; }
.card-od .art { position: relative; display: block; aspect-ratio: 2 / 3; border-radius: 10px; overflow: hidden; background: var(--surface); }
.card-od.wide .art { aspect-ratio: 16 / 9; }
.card-od .art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.art-title { position: absolute; inset: 0; display: grid; place-items: center; padding: 10px; text-align: center; font: 600 15px var(--voice); color: var(--mint); }
.card-od .art img + .art-title { display: none; }
.card-od a:hover .art, .card-od a:focus-visible .art { outline: 3px solid var(--cream); outline-offset: 2px; }
.card-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-line { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-od.played .art img { opacity: 0.7; }
.meter { position: absolute; left: 8px; right: 8px; bottom: 8px; height: 4px; border-radius: 2px; background: rgba(18, 26, 20, 0.7); }
.meter i { display: block; height: 100%; border-radius: 2px; background: var(--leaf); }
.tick, .count { position: absolute; top: 6px; right: 6px; min-width: 26px; height: 26px; padding: 0 6px; display: grid; place-items: center; border-radius: 13px; font: 600 13px var(--read); }
.tick { background: var(--cream); color: var(--night); }
.count { background: var(--leaf); color: var(--night); }
.letters { display: flex; flex-wrap: wrap; gap: 2px; margin: 0 0 16px; }
.letters a { display: grid; place-items: center; min-width: 44px; height: 44px; border-radius: 22px; text-decoration: none; color: var(--mint); font: 600 16px var(--voice); }
.letters a[aria-current] { background: var(--cream); color: var(--night); }
.letters a:hover { background: var(--surface); }

.hero { position: relative; display: grid; min-height: 340px; margin: 0 0 18px; border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.hero-art { position: absolute; top: 0; right: 0; height: 100%; width: 70%; object-fit: cover; opacity: 0.85;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 45%); mask-image: linear-gradient(to right, transparent, #000 45%); }
.hero-text { position: relative; align-self: end; padding: 28px; max-width: 680px; display: grid; gap: 8px;
  background: linear-gradient(to right, var(--surface) 55%, transparent); }
.hero h1 { margin: 0; font-size: 34px; }
.kicker { margin: 0; font: 600 16px var(--voice); color: var(--leaf); }
.facts { margin: 0; }
.facts span + span::before { content: " · "; }
.hero:not(:has(.hero-art)) { min-height: 0; }
.overview { margin: 4px 0; max-width: 62ch; }
.od-play { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 6px 0 0; }
.od-play label { display: inline-flex; align-items: center; gap: 8px; color: var(--mint); font-size: 14px; }
select { font: inherit; color: var(--cream); background: var(--night); border: 1px solid var(--band); border-radius: 10px; min-height: 44px; padding: 0 10px; max-width: 220px; }
.seasons { margin: 0 0 12px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; } /* thirty seasons: one row */
.seasons .chip { flex: none; }
.chip.on { background: var(--cream); color: var(--night); }
.episodes { list-style: none; margin: 0 0 22px; padding: 0; display: grid; gap: 10px; max-width: 1000px; }
.ep { display: grid; grid-template-columns: 200px 1fr auto; gap: 14px; align-items: center; background: var(--surface); border-radius: var(--radius); padding: 10px; }
.ep-art { position: relative; display: block; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; background: var(--night); }
.ep-art img { width: 100%; height: 100%; object-fit: cover; }
.ep-text { display: grid; gap: 2px; min-width: 0; }
.ep-name { display: flex; align-items: center; min-height: 44px; color: var(--cream); font-weight: 600; text-decoration: none; }
.ep-over { margin: 4px 0 0; font-size: 14px; color: var(--dim); display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ep.played .ep-art img { opacity: 0.6; }
.ep-play { margin: 0; }
.ep-play .icon { background: var(--cream); color: var(--night); }
.people { grid-auto-columns: 110px; }
.people li { display: grid; gap: 2px; justify-items: center; text-align: center; font-size: 14px; }
.people .face { width: 88px; height: 88px; border-radius: 50%; overflow: hidden; background: var(--surface); }
.people .face img { width: 100%; height: 100%; object-fit: cover; }
.people b, .people .dim { max-width: 110px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

@media (max-width: 700px) {
  .hero { min-height: 0; }
  .hero-art { position: relative; width: 100%; height: auto; aspect-ratio: 16 / 9; -webkit-mask-image: linear-gradient(to bottom, #000 60%, transparent); mask-image: linear-gradient(to bottom, #000 60%, transparent); }
  .hero-text { padding: 18px 16px; background: none; }
  .hero-art + .hero-text { padding-top: 0; margin-top: -40px; }
  .hero h1 { font-size: 26px; }
  .ep { grid-template-columns: 120px 1fr auto; gap: 10px; }
  .ep-over { display: none; }
  .mu-head .cover { width: 140px; }
  input.volume { display: none; } /* a phone has its own buttons */
  .vod-buttons { grid-template-columns: 1fr; justify-items: center; }
  .vod-buttons > .vod-side:first-child { display: none; }
  .vod-right { justify-content: center; }
  .vod-next { right: 12px; left: 12px; bottom: 190px; max-width: none; }
  .vod-next img { width: 96px; }
  .vod-menu { left: 12px; right: 12px; bottom: 230px; min-width: 0; }
  .vod-title b { font-size: 18px; }
  body.od-full .player, body.od-full[data-view="live"] .player { position: fixed; inset: 0; z-index: 30; }
  body.od-full .screen, body.playing.od-full:not([data-view="live"]) .screen { position: absolute; inset: 0; height: auto; aspect-ratio: auto; }
  .strip { grid-auto-columns: 120px; }
  .strip.wide { grid-auto-columns: 230px; }
  .grid-od { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 14px 10px; }
  .sections, .me-name { display: none; }
  .bar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 5;
    display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
    height: calc(var(--bar) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
    background: var(--surface); border-top: 1px solid var(--line);
  }
  .bar a {
    display: grid; place-items: center; align-content: center; gap: 2px;
    color: var(--dim); text-decoration: none; font: 500 12px var(--voice);
  }
  .bar a span { font-size: 20px; line-height: 1; }
  .bar a[aria-current="page"] { color: var(--leaf); }
  main { padding-bottom: calc(var(--bar) + 32px); }
  h1 { font-size: 24px; }
  /* on a phone the player sits under the top in every section, smaller off Live, and stays while you scroll */
  .player, body[data-view="live"] .player { position: sticky; top: var(--top); right: auto; bottom: auto; width: 100%; max-width: none; margin: 0; border-radius: 0; box-shadow: none; z-index: 4; }
  body.playing:not([data-view="live"]) main { padding-bottom: calc(var(--bar) + 32px); }
  body.playing:not([data-view="live"]) .screen { aspect-ratio: auto; height: 120px; }
  body.playing:not([data-view="live"]) .screen video { object-fit: contain; }
  .grid { --ch: 160px; }
  .tabs [role="tab"], .chip { font-size: 14px; padding: 0 13px; }
  .grid-row .star { width: 36px; }
  .list .play { flex-basis: 160px; }
}

/* ---- Read (docs/WEB.md "Read"): comics and books, and the two readers ---- */
.rd-doors { margin: 0 0 18px; }
.rd-more { color: inherit; text-decoration: none; }
.rd-more:hover { color: var(--leaf); }
.count { font: 400 18px var(--read); }
.small { font-size: 14px; }
.tick { position: absolute; top: 8px; right: 8px; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 13px; background: var(--leaf); color: var(--night); font-weight: 700; font-size: 15px; }
.rd-head .cover { width: 200px; aspect-ratio: 2 / 3; }
.rd-head .cover img { position: absolute; inset: 0; }
.rd-head .cover img + .art-title { display: none; }
.rd-by { margin: 0; font: 500 18px var(--voice); color: var(--mint); }
.rd-summary { max-width: 72ch; line-height: 1.5; }
.rd-credits { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; max-width: 72ch; margin: 0 0 14px; }
.rd-credits dt { color: var(--dim); }
.rd-credits dd { margin: 0; }
.rd-rows { list-style: none; margin: 0 0 16px; padding: 4px 8px; background: var(--surface); border-radius: var(--radius); max-width: 960px; }
.rd-rows li + li { border-top: 1px solid var(--line); }
.rd-row { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 6px 4px; color: var(--cream); text-decoration: none; }
.rd-row img { flex: none; width: 36px; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 4px; }
.rd-row-text { display: grid; min-width: 0; }
.rd-row-text > * { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rd-row-text .dim { font-size: 14px; }
.rd-row:hover b { color: var(--leaf); }
.rd-order { counter-reset: arc; }
.rd-order > li { counter-increment: arc; position: relative; }
.rd-order > li .art::before { content: counter(arc); position: absolute; z-index: 1; top: 6px; left: 6px; min-width: 26px; height: 26px; padding: 0 6px; border-radius: 13px; display: grid; place-items: center; background: rgba(18, 26, 20, 0.85); color: var(--cream); font: 600 13px var(--voice); }

/* the readers fill the window over the shell; the player sits under them and plays on */
body[data-view="reader"] { overflow: hidden; }
.reader { position: fixed; inset: 0; z-index: 20; display: grid; grid-template-rows: auto 1fr auto; background: #000; color: var(--cream); }
.reader-bar, .reader-foot { display: flex; align-items: center; gap: 10px; padding: 6px 12px; background: var(--night); }
.reader-bar { padding-top: max(6px, env(safe-area-inset-top)); }
.reader-foot { padding-bottom: max(6px, env(safe-area-inset-bottom)); flex-wrap: wrap; }
.reader-back { text-decoration: none; font-size: 28px; }
.reader-title { flex: 1; display: grid; min-width: 0; }
.reader-title > * { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.reader-title .dim { font-size: 14px; }
.reader-count { font-variant-numeric: tabular-nums; color: var(--mint); white-space: nowrap; }
.reader-bar select { max-width: 30vw; min-height: 44px; background: var(--surface); color: var(--cream); border: 1px solid var(--band); border-radius: 8px; }
.reader-bar [aria-pressed="true"] { background: var(--cream); color: var(--night); }
.reader-stage { position: relative; display: flex; justify-content: center; align-items: center; min-height: 0; overflow: auto; }
.comic-reader .reader-stage img { max-width: 100%; max-height: 100%; object-fit: contain; }
.comic-reader.is-spread .reader-stage img { max-width: 50%; }
.reader-zone { position: absolute; top: 0; bottom: 0; width: 35%; background: transparent; border: 0; border-radius: 0; padding: 0; min-height: 0; cursor: pointer; }
.reader-zone:hover { background: transparent; }
.reader-zone.prev { left: 0; cursor: w-resize; }
.reader-zone.next { right: 0; cursor: e-resize; }
.reader-foot input[type="range"] { flex: 1; min-width: 160px; accent-color: var(--leaf); }
.reader-end { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; width: 100%; }
.reader-end[hidden] { display: none; }
.book-reader .reader-stage { background: var(--night); }
.book-page { flex: 1; align-self: stretch; max-width: 1100px; margin: 12px 0; }
.book-turn { flex: none; align-self: stretch; width: 56px; min-height: 0; padding: 0; border: 0; border-radius: 0; background: transparent; color: var(--dim); font-size: 40px; }
.book-turn:hover { background: var(--surface); color: var(--cream); }
@media (max-width: 700px) {
  .rd-head .cover { width: 140px; }
  .reader-bar { gap: 4px; padding-left: 6px; padding-right: 6px; }
  .book-turn { width: 32px; font-size: 28px; }
  .comic-reader.is-spread .reader-stage img { max-width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .section { animation: none; }
}
