/* Themes (#175): every look is a set of these tokens, swapped by `data-theme` on <html>; nothing
   below names a colour, font, corner or letter case of its own. Bio (bio-shell-spec/tokens.json
   v2) is the default; `plain` is a neutral streaming-app look for whoever would rather not have
   Bio. Fonts fall back to the system; nothing loads from a CDN (spec §2.2). The native clients
   take the same names. */
:root {
  --bg: #040A10;
  --bg-rgb: 4 10 16;
  --board: #02070B;
  --scrim-rgb: 2 7 11;
  --surface: #0D1D28;
  --surface-rgb: 13 29 40;
  --surface-low: #08141D;
  --surface-high: #112535;
  --hairline: #142B38;
  --hairline-strong: #1D3D4E;
  --edge-lit: #24506A;
  --edge-shade: #0A1620;
  --text: #E2F4F8;
  --text-rgb: 226 244 248;
  --text-muted: #7AA2B0;
  --text-dim: #46697A;
  --structure: #1A9FE0;
  --structure-hi: #62D2FF;
  --on-structure: #040A10;
  --alert: #FF4D6A;
  --ember: #FF7A1A;
  --ui: "Chakra Petch", "IBM Plex Sans", system-ui, sans-serif;
  /* Meta lines (years, runtimes, crumbs, labels): mono in Bio. --code stays mono in every theme,
     for file names, tables of facts and keys. */
  --mono: "Geist Mono", "JetBrains Mono", ui-monospace, monospace;
  --code: "Geist Mono", "JetBrains Mono", ui-monospace, monospace;
  --weight: 500;
  /* Labels, buttons and tabs: upper case and tracked out in Bio. */
  --caps: uppercase;
  --track-tight: 0.04em;
  --track-snug: 0.05em;
  --track-chip: 0.06em;
  --track: 0.08em;
  --track-wide: 0.14em;
  /* Bio clips a corner off cards, keys and fields; another theme rounds them instead. */
  --cut-card: 12px;
  --cut-key: 5px;
  --cut-field: 8px;
  --round-card: 0;
  --round-key: 0;
  --round-field: 0;
  --round-panel: 0;
  --round-chip: 0;
  --label-size: 9.5px;
  --mark: var(--structure);
  --mark-font: 500 12px/1.4 var(--ui);
}

:root[data-theme="plain"] {
  --bg: #141414;
  --bg-rgb: 20 20 20;
  --board: #0E0E0E;
  --scrim-rgb: 10 10 10;
  --surface: #232323;
  --surface-rgb: 35 35 35;
  --surface-low: #1B1B1B;
  --surface-high: #2E2E2E;
  --hairline: #2A2A2A;
  --hairline-strong: #3A3A3A;
  --edge-lit: #2A2A2A;
  --edge-shade: transparent;
  --text: #F2F2F2;
  --text-rgb: 242 242 242;
  --text-muted: #A6A6A6;
  --text-dim: #6E6E6E;
  --structure: #4A86E8;
  --structure-hi: #8DB4F2;
  --on-structure: #FFFFFF;
  --alert: #F2626F;
  --ember: #F0A24A;
  --ui: Inter, Roboto, "Segoe UI", "Helvetica Neue", Arial, system-ui, sans-serif;
  --mono: var(--ui);
  --weight: 400;
  --caps: none;
  --track-tight: 0;
  --track-snug: 0;
  --track-chip: 0;
  --track: 0;
  --track-wide: 0.01em;
  --cut-card: 0px;
  --cut-key: 0px;
  --cut-field: 0px;
  --round-card: 8px;
  --round-key: 6px;
  --round-field: 6px;
  --round-panel: 8px;
  --round-chip: 4px;
  --label-size: 12px;
  --mark: var(--text);
  --mark-font: 700 17px/1.4 var(--ui);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: var(--weight) 14px/1.4 var(--ui); }
a { color: var(--structure-hi); }
:focus-visible { outline: 2px solid var(--structure-hi); outline-offset: 2px; }


.bar {
  position: sticky; top: 0; z-index: 2;
  display: flex; align-items: center; gap: 12px;
  padding: 10px 18px; background: var(--board); border-bottom: 1px solid var(--hairline-strong);
}
.mark { color: var(--mark); text-decoration: none; font: var(--mark-font); letter-spacing: var(--track-wide); text-transform: var(--caps); }
.slices { display: flex; gap: 2px; }
.slices a { padding: 6px 10px; color: var(--text-muted); text-decoration: none; font: 500 12px var(--ui);
  letter-spacing: var(--track); text-transform: var(--caps); border-bottom: 2px solid transparent; }
.slices a:hover { color: var(--text); }
.slices a[aria-current] { color: var(--text); border-bottom-color: var(--structure); }
@media (max-width: 640px) { .bar { flex-wrap: wrap; } .slices { order: 3; width: 100%; } }
#search {
  flex: 1; max-width: 420px; padding: 7px 10px; --line: var(--hairline-strong);
  color: var(--text); border: 1px solid var(--line);
  font: inherit; --c: var(--cut-field); border-radius: var(--round-field);
  clip-path: polygon(var(--c) 0, 100% 0, 100% calc(100% - var(--c)), calc(100% - var(--c)) 100%, 0 100%, 0 var(--c));
  /* The frame goes round the cut corners too: a border stops where the clip starts. */
  background: linear-gradient(to bottom right, transparent 50%, var(--line) 0 calc(50% + 1px), transparent 0) 0 0 / var(--c) var(--c) no-repeat border-box,
    linear-gradient(to bottom right, transparent calc(50% - 1px), var(--line) 0 50%, transparent 0) 100% 100% / var(--c) var(--c) no-repeat border-box,
    var(--surface-low);
}
#search:focus { --line: var(--structure); outline: none; }
.who { margin-left: auto; color: var(--text-muted); font: 400 11.5px var(--mono); }

button, .button {
  display: inline-block; padding: 8px 16px; border: 0; cursor: pointer;
  background: var(--structure); color: var(--on-structure); font: 500 12.5px var(--ui);
  letter-spacing: var(--track); text-transform: var(--caps); text-decoration: none; --c: var(--cut-key); border-radius: var(--round-key);
  clip-path: polygon(var(--c) 0, 100% 0, 100% calc(100% - var(--c)), calc(100% - var(--c)) 100%, 0 100%, 0 var(--c));
}
button.ghost, .button.ghost { background: var(--surface-high); color: var(--text); }
button:hover { filter: brightness(1.12); }

main { padding: 18px; }
.label { color: var(--text-muted); font: 400 var(--label-size)/14px var(--mono); letter-spacing: var(--track-wide); text-transform: var(--caps); }
.empty, .notice { color: var(--text-muted); max-width: 640px; margin: 48px auto; padding: 0 16px; text-align: center; overflow-wrap: anywhere; }
.error { color: var(--alert); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 12px; }
.card {
  display: flex; flex-direction: column; justify-content: flex-end; gap: 4px;
  aspect-ratio: 2 / 3; padding: 12px; text-decoration: none; color: var(--text);
  background: linear-gradient(var(--surface), var(--surface-low));
  --c: var(--cut-card); border-radius: var(--round-card);
  clip-path: polygon(var(--c) 0, 100% 0, 100% calc(100% - var(--c)), calc(100% - var(--c)) 100%, 0 100%, 0 var(--c));
}
.card:hover, .card:focus-visible { background: var(--surface-high); outline: none; box-shadow: inset 2px 0 0 var(--structure-hi); }
.card { position: relative; overflow: hidden; }
/* A raised shape's edges (bio-shell-spec edge-lit, edge-shade): lit along the top and the top-left
   cut, shaded down the right, along the bottom and the bottom-right cut, 1px each. Drawn over the
   art, so a poster or a still never hides them; a border would stop where the clip starts. */
.card::after, .wide::after, .gate-card::after { content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none;
  background: linear-gradient(to bottom right, transparent 50%, var(--edge-lit) 0 calc(50% + 1px), transparent 0) 0 0 / var(--c) var(--c),
    linear-gradient(to bottom right, transparent calc(50% - 1px), var(--edge-shade) 0 50%, transparent 0) 100% 100% / var(--c) var(--c),
    linear-gradient(var(--edge-lit) 0 0) 0 0 / 100% 1px, linear-gradient(var(--edge-shade) 0 0) 100% 0 / 1px 100%,
    linear-gradient(var(--edge-shade) 0 0) 0 100% / 100% 1px;
  background-repeat: no-repeat; }
.card .poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.card:has(.poster)::before { content: ""; position: absolute; inset: 45% 0 0; z-index: 1;
  background: linear-gradient(transparent, rgb(var(--scrim-rgb) / 0.92)); }
.card:has(.poster) .meta, .card:has(.poster) .name { position: relative; z-index: 2; }
.card .name { font-size: 15px; line-height: 1.2; }
.card .meta { color: var(--text-muted); font: 400 11.5px var(--mono); }

.title { display: flex; gap: 24px; align-items: flex-start; isolation: isolate; }
.title.has-fanart::before { content: ""; position: fixed; inset: 0; z-index: -1; opacity: 0.22;
  background: var(--fanart) center / cover no-repeat;
  mask-image: linear-gradient(#000, rgba(0, 0, 0, 0.2)); }
.title > .poster { width: 220px; flex: none; aspect-ratio: 2 / 3; object-fit: cover; border-top: 1px solid var(--edge-lit); }
.title .body { min-width: 0; }
.title .overview { max-width: 720px; line-height: 1.55; margin: 0 0 24px; }
.title > .still { width: 360px; flex: none; aspect-ratio: 16 / 9; object-fit: cover; border-top: 1px solid var(--edge-lit); }
@media (max-width: 640px) { .title { flex-direction: column; } .title > .poster { width: 140px; } .title > .still { width: 100%; } }
.crumbs { color: var(--text-muted); font: 400 11.5px var(--mono); margin-bottom: 10px; }
.crumbs a { color: var(--text-muted); text-decoration: none; }
.crumbs a:hover { color: var(--text); }
.title h1 { margin: 0 0 4px; font-weight: 300; font-size: 34px; }
.title .meta { color: var(--text-muted); font: 400 11.5px var(--mono); margin-bottom: 18px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.actions select.version {
  padding: 6px 8px; background: var(--surface-low); color: var(--text);
  border: 1px solid var(--hairline-strong); font: 400 12px var(--ui); max-width: 100%;
}
.rows { list-style: none; padding: 0; margin: 0; max-width: 720px; }
.rows li a { display: flex; gap: 14px; align-items: center; padding: 8px 10px; color: var(--text); text-decoration: none; border-bottom: 1px solid var(--hairline); }
.rows .thumb { width: 128px; flex: none; aspect-ratio: 16 / 9; object-fit: cover; }
.rows .ep { color: var(--text-muted); font: 400 11.5px var(--mono); margin-right: 12px; }
.rows li a:hover { background: var(--surface-high); box-shadow: inset 2px 0 0 var(--structure-hi); }

.crew { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; margin: 0 0 24px; max-width: 720px; }
.crew dt { color: var(--text-muted); font: 400 11.5px/20px var(--mono); }
.crew dd { margin: 0; line-height: 20px; }
.crew a, .person { color: var(--text); text-decoration: none; }
.crew a:hover { color: var(--structure-hi); }
.title + .strip { margin-top: 28px; }
.scroller:has(.person) { grid-auto-columns: 112px; }
.person { display: flex; flex-direction: column; gap: 3px; }
.person .face { width: 112px; aspect-ratio: 2 / 3; object-fit: cover; border-top: 1px solid var(--edge-lit); background: var(--surface); }
.person .face.none { display: grid; place-items: center; color: var(--text-dim); font: 300 28px var(--ui); }
.person .name { font-size: 13px; line-height: 1.25; }
.person .part { color: var(--text-muted); font: 400 11px/1.3 var(--mono); }
.person:hover .name { color: var(--structure-hi); }
.title > .portrait { width: 185px; flex: none; aspect-ratio: 2 / 3; object-fit: cover; border-top: 1px solid var(--edge-lit); }
.title + .grid { margin-top: 24px; }
.card.missing { justify-content: flex-end; }
.card.missing .poster { opacity: 0.45; filter: grayscale(0.6); }
.card.missing:hover { background: linear-gradient(var(--surface), var(--surface-low)); box-shadow: none; }
.card .want { position: relative; z-index: 2; color: var(--ember); font: 400 10.5px/1.3 var(--mono); letter-spacing: var(--track-chip); text-transform: var(--caps); }
.card .want .reason { display: block; color: var(--text-muted); text-transform: none; letter-spacing: 0; }
.card .add { position: relative; z-index: 2; margin-top: 6px; padding: 6px 10px; font-size: 11px; }
.card .add:disabled { background: var(--surface-high); color: var(--text-muted); cursor: default; }
.about { max-width: 640px; line-height: 1.55; }
.about h1 { margin: 0 0 4px; font-weight: 300; font-size: 34px; }
.about .label { margin: 28px 0 6px; font-weight: 400; }
.attribution { display: flex; align-items: center; gap: 12px; margin: 18px 0 0; color: var(--text-muted); font: 400 11px var(--mono); }
.attribution .tmdb { height: 12px; display: block; }

/* Player (#106): the video fills the screen; the top bar and the controls float over it and fade
   out while playing (.idle). */
.player { position: fixed; inset: 0; z-index: 3; background: #000; }
.player video { position: absolute; inset: 0; width: 100%; height: 100%; background: #000; }
/* Text subtitles in the profile's style (#122): the player sets these on the video element. */
.player video, .subpreview { --sub-scale: 1; --sub-colour: #fff; --sub-bg: rgb(var(--scrim-rgb) / 0.72); --sub-shadow: none; }
.player video::cue { font: 500 calc(clamp(18px, 2.6vw, 34px) * var(--sub-scale))/1.3 var(--ui); color: var(--sub-colour);
  background: var(--sub-bg); text-shadow: var(--sub-shadow); }
.subpreview { position: relative; height: 150px; margin-top: 4px; background: linear-gradient(135deg, #3a4f5c, #b8c4b0 60%, #e7e1cf);
  border: 1px solid var(--hairline-strong); overflow: hidden; }
.subpreview span { position: absolute; left: 50%; transform: translateX(-50%); white-space: nowrap; padding: 0 4px;
  font: 500 calc(18px * var(--sub-scale))/1.3 var(--ui); color: var(--sub-colour); background: var(--sub-bg); text-shadow: var(--sub-shadow); }
.player .top { position: absolute; inset: 0 0 auto; z-index: 1; display: flex; align-items: center; gap: 12px; padding: 10px 14px;
  background: linear-gradient(rgb(var(--scrim-rgb) / 0.9), transparent); }
.player .top .name { color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player .controls { position: absolute; inset: auto 0 0; z-index: 1; padding: 28px 14px 12px;
  background: linear-gradient(transparent, rgb(var(--scrim-rgb) / 0.94)); }
.player .top, .player .controls { transition: opacity 0.25s; }
.player.idle { cursor: none; }
.player.idle .top, .player.idle .controls { opacity: 0; pointer-events: none; }
.seekrow { display: flex; align-items: center; gap: 12px; }
.seekrow .time { min-width: 64px; color: var(--text-muted); font: 400 12px var(--mono); font-variant-numeric: tabular-nums; }
.seekrow .time:last-child { text-align: right; }
.player input[type=range] { appearance: none; height: 18px; background: transparent; cursor: pointer; margin: 0; }
.player input[type=range]::-webkit-slider-runnable-track { height: 4px; background: var(--hairline-strong); }
.player input[type=range]::-moz-range-track { height: 4px; background: var(--hairline-strong); }
.player input[type=range]::-moz-range-progress { height: 4px; background: var(--structure); }
.player input[type=range]::-webkit-slider-thumb { appearance: none; width: 12px; height: 12px; margin-top: -4px; background: var(--structure-hi); border: 0; }
.player input[type=range]::-moz-range-thumb { width: 12px; height: 12px; background: var(--structure-hi); border: 0; border-radius: 0; }
.seek { flex: 1; }
/* Seek bar (#113, #114): skip segments as bands under the track, chapters as ticks cut through it,
   both inset by half the range thumb so they line up with it; the preview floats above. */
.seekwrap { flex: 1; position: relative; display: flex; align-items: center; min-width: 0; }
.seekwrap .marks { position: absolute; inset: 0 6px; pointer-events: none; }
.marks .tick { position: absolute; top: 7px; width: 2px; height: 4px; margin-left: -1px; background: var(--board); }
.marks .seg { position: absolute; top: 13px; height: 2px; background: var(--text-dim); }
.marks .seg.credits { background: var(--ember); opacity: 0.6; }
.seekwrap .preview { position: absolute; bottom: 22px; transform: translateX(-50%); display: flex; flex-direction: column;
  align-items: center; gap: 4px; pointer-events: none; z-index: 2; }
.preview .thumb { background-color: #000; background-repeat: no-repeat; border-top: 1px solid var(--edge-lit); }
.preview .ptime { padding: 2px 6px; background: rgb(var(--scrim-rgb) / 0.85); font: 400 12px var(--mono); font-variant-numeric: tabular-nums; }
.preview .pchap { max-width: 240px; padding: 2px 6px; background: rgb(var(--scrim-rgb) / 0.85); color: var(--text-muted); font-size: 12px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player .menu .chapter { display: flex; gap: 16px; justify-content: space-between; }
.player .menu .chapter .at { color: var(--text-muted); font: 400 12px var(--mono); font-variant-numeric: tabular-nums; }
.seek::-webkit-slider-runnable-track { background: linear-gradient(90deg, var(--structure) var(--pos, 0%), var(--hairline-strong) var(--pos, 0%)) !important; }
.vol { width: 88px; }
.buttons { display: flex; align-items: center; gap: 6px; margin-top: 8px; }
.buttons .spacer { flex: 1; }
button.ctl { padding: 7px 11px; background: rgb(var(--surface-rgb) / 0.85); color: var(--text); font: 500 12px var(--mono); letter-spacing: var(--track-tight);
  text-transform: none; border-top: 1px solid var(--edge-lit); }
button.ctl:hover { background: var(--surface-high); filter: none; }
button.ctl.on { color: var(--structure-hi); box-shadow: inset 0 -2px 0 var(--structure); }
button.ctl.play { min-width: 44px; }
.player .menu { border-radius: var(--round-panel); position: absolute; right: 14px; bottom: 92px; z-index: 2; min-width: 260px; max-width: min(420px, calc(100% - 28px));
  max-height: 60vh; overflow-y: auto; padding: 8px; background: var(--surface); border-top: 1px solid var(--edge-lit); }
.player .menu .label { margin: 2px 6px 6px; }
.player .menu .item { display: block; width: 100%; text-align: left; padding: 8px 10px 8px 26px; background: transparent; color: var(--text);
  font: 400 13px var(--ui); letter-spacing: 0; text-transform: none; clip-path: none; position: relative; }
.player .menu .item:hover, .player .menu .item:focus-visible { background: var(--surface-high); outline: none; }
.player .menu .item.on { color: var(--structure-hi); }
.player .menu .item.on::before { content: "●"; position: absolute; left: 10px; font-size: 9px; top: 11px; }
/* A choice that cannot be had here (#213): greyed; why shows on hover, focus or a tap. */
.player .menu .item.off { color: var(--text-dim); cursor: default; }
.player .menu .item.off .why { display: none; margin-top: 3px; color: var(--text-muted); font: 400 11.5px var(--mono); white-space: normal; }
.player .menu .item.off:hover .why, .player .menu .item.off:focus-visible .why, .player .menu .item.off.show .why { display: block; }
/* The Quality menu in plain words (rev 57, #230): name, tag, what it is for; what this play is doing. */
.player .menu .tier { display: block; }
.player .menu .tier .name { display: block; }
.player .menu .tier .tag { margin-left: 8px; padding: 0 5px; border: 1px solid currentColor; border-radius: 3px; font: 600 10px var(--mono);
  vertical-align: 1px; }
.player .menu .tier .what { display: block; margin-top: 2px; color: var(--text-muted); font-size: 11.5px; }
.player .menu .now { margin: 0 6px 6px; color: var(--text); font: 400 12px var(--ui); }
.player .menu .now.why { color: var(--text-muted); font: 400 11.5px var(--mono); }
.player .ended { position: absolute; right: 24px; bottom: 120px; z-index: 2; padding: 14px 16px; background: var(--surface);
  border-top: 1px solid var(--edge-lit); }
.player .ended p { margin: 0 0 10px; }
.player .ended .actions { display: flex; gap: 8px; }
/* Skip intro, recap, preview (#110): stays while the controls hide, so it can be pressed at once. */
.player .skipseg { position: absolute; right: 24px; bottom: 120px; z-index: 2; border-top: 1px solid var(--edge-lit); }
@media (max-width: 640px) { .vol, .seekrow .time:first-child { display: none; } .buttons { flex-wrap: wrap; } }

.settings-link { color: var(--text-muted); font: 400 11.5px var(--mono); text-decoration: none; }
.settings-link:hover { color: var(--text); }

/* Admin (#127) */
.admin { max-width: 760px; }
.admin h1 { margin: 0 0 4px; font-weight: 300; font-size: 34px; }
.admin .label { margin: 28px 0 10px; font-weight: 400; }
.admin .playing { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.admin .playing li { position: relative; padding: 14px 16px; border-radius: 10px; background: var(--surface); }
.admin .playing p { margin: 2px 0; }
.admin .what { font-size: 17px; }
.admin .what a { color: inherit; text-decoration: none; }
.admin .what a:hover { text-decoration: underline; }
.admin .who, .admin .when, .admin .tracks, .admin .workers { color: var(--text-muted); font-size: 13px; }
.admin .how { font-size: 13px; }
.admin .workers { font: 400 11.5px var(--code); }
.admin .progress { display: block; height: 3px; margin: 8px 0 6px; background: var(--hairline-strong); }
.admin .progress span { display: block; height: 100%; background: var(--structure); }
.admin .empty { text-align: left; margin: 12px 0; }
.admin .what .state { float: right; margin-left: 12px; color: var(--text-muted); font: 500 11px var(--ui);
  letter-spacing: var(--track); text-transform: var(--caps); }
.admin .quality, .admin .health { color: var(--text-muted); font-size: 13px; }
.admin .remote { margin: 0 0 10px; color: var(--text-muted); font: 400 12px var(--mono); }
.admin .playing .actions { margin: 10px 0 0; }
.admin form.stop { display: grid; gap: 8px; width: 100%; }
.admin form.stop input.message { max-width: 420px; }
.admin form.stop .actions { margin: 0; }
.admin .playing li.stopped { opacity: .7; }
.admin .history-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.admin .history-filters input[type="search"] { min-width: 12em; }
.admin table.totals { width: 100%; max-width: 560px; margin: 0 0 16px; border-collapse: collapse; font: 400 12px var(--mono); }
.admin table.totals th { text-align: left; color: var(--text-muted); font-weight: 400; padding: 4px 8px 4px 0; }
.admin table.totals td { padding: 4px 8px 4px 0; border-top: 1px solid var(--hairline); }
.admin .history .ended { color: var(--text-muted); font-size: 12px; }
.admin .history-page > button { margin-top: 10px; }
.admin .hold { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 12px; }
.admin .hold input.message { flex: 1 1 16em; max-width: 360px; }
.admin .hold.on { padding: 10px 14px; border-radius: 10px; background: var(--surface); border-left: 3px solid var(--structure); }
.admin .hold p { margin: 0; flex: 1 1 20em; }
.admin .stopall { display: grid; gap: 8px; margin: 0 0 12px; }
.admin .stats-page select { margin: 0 0 12px; }
.admin .figures { font-size: 17px; margin: 4px 0; }
.admin h3.label { font-size: 13px; color: var(--text-muted); margin: 22px 0 8px; }
.admin ul.bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; }
.admin ul.bars li { display: grid; grid-template-columns: minmax(5em, 14em) 1fr minmax(6em, auto); gap: 10px;
  align-items: center; font: 400 12px var(--mono); }
.admin ul.bars .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin ul.bars .name a { color: inherit; }
.admin ul.bars .bar { height: 8px; background: var(--hairline); border-radius: 2px; }
.admin ul.bars .bar span { display: block; height: 100%; background: var(--structure); border-radius: 2px; }
.admin ul.bars .n { color: var(--text-muted); text-align: right; }
.admin .audit .what { font-size: 14px; font-family: var(--mono); }
@media (max-width: 560px) {
  .admin ul.bars li { grid-template-columns: 7em 1fr; }
  .admin ul.bars .n { grid-column: 2; text-align: left; }
}
.settings { display: grid; gap: 10px; max-width: 640px; margin-top: 18px; }
.settings .head { margin: 14px 0 0; }
.settings .row { display: grid; grid-template-columns: 160px auto minmax(12em, 1fr); align-items: center; gap: 10px; }
@media (max-width: 640px) { .settings .row { grid-template-columns: 1fr; gap: 4px; } }
.settings .row .label { margin: 0; }
.settings .row > button { justify-self: start; }
.settings input, .settings select { padding: 6px 8px; border-radius: var(--round-field); background: var(--surface-low); color: var(--text);
  border: 1px solid var(--hairline-strong); font: 400 13px var(--ui); }
.settings input { width: 80px; }
.settings input[type=checkbox] { width: 18px; height: 18px; margin: 0; accent-color: var(--structure-hi); }
.settings input:focus, .settings select:focus { border-color: var(--structure-hi); outline: none; }
.settings .unit { color: var(--text-muted); font: 400 11.5px var(--mono); }
.settings .actions { margin: 10px 0 0; }
.settings .status { margin: 0; color: var(--text-muted); font: 400 12px var(--mono); }
.settings-page .meta { color: var(--text-muted); font: 400 11.5px var(--mono); }
.who a { color: inherit; text-decoration: none; border-bottom: 1px dotted var(--hairline-strong); }
.who a:hover { color: var(--text); }

/* Profiles (#126) */
.profiles { list-style: none; margin: 24px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 16px; }
.profiles li { display: grid; gap: 8px; justify-items: center; width: 132px; }
.profiles button.profile { display: grid; justify-items: center; gap: 6px; width: 100%; padding: 16px 8px; text-transform: none; }
.profiles .initial { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%;
  background: var(--surface-low); color: var(--structure-hi); font: 300 22px var(--ui); }
.profiles .name { font: 400 14px var(--ui); }
.profiles .unit { color: var(--text-muted); font: 400 11px var(--mono); }
.profiles li.current button.profile { box-shadow: inset 0 -2px 0 var(--structure); }
.profiles form.pin { display: flex; gap: 6px; }
.profiles form.pin input { width: 76px; padding: 6px 8px; border-radius: var(--round-field); background: var(--surface-low);
  color: var(--text); border: 1px solid var(--hairline-strong); font: 400 13px var(--mono); }
.profiles-page .status { color: var(--text-muted); font: 400 12px var(--mono); }
.adminprofiles { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.adminprofiles li { display: grid; gap: 8px; padding: 14px 16px; background: var(--surface); border-radius: var(--round-panel); }
.adminprofiles .what { margin: 0; font-size: 16px; }
.adminprofiles .meta { margin: 0; }
.settings input.pin { width: 110px; }
.settings input.name { width: 200px; }
.settings .shares { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.settings label.share { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.player .msg { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); max-width: 520px; text-align: center;
  padding: 18px; background: var(--surface); border-top: 1px solid var(--edge-lit); pointer-events: none; }
.player .msg.status { text-align: left; min-width: 300px; }
.player .msg .head { margin-bottom: 10px; color: var(--text); }
.player .msg .steps { margin: 0; padding: 0; list-style: none; font: 400 12.5px var(--mono); color: var(--text-muted); }
.player .msg .steps li { position: relative; padding: 2px 0 2px 18px; opacity: 0.45; }
.player .msg .steps li::before { content: "·"; position: absolute; left: 4px; }
.player .msg .steps li.done { opacity: 1; }
.player .msg .steps li.done::before { content: "✓"; left: 0; }
.player .msg .steps li.now { opacity: 1; color: var(--text); }
.player .msg .steps li.now::before { content: "▸"; left: 0; color: var(--structure-hi); }
.player .msg p.error { margin: 10px 0 0; }

/* Library features (spec §2.10): filter bar, home rows, watched marks, file info. */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.filters select, .filters input {
  padding: 6px 8px; background: var(--surface-low); color: var(--text-muted);
  border: 1px solid var(--hairline-strong); font: 400 12px var(--ui);
}
.filters input { width: 76px; }
.filters .set { color: var(--text); border-color: var(--structure); }
.filters select:focus, .filters input:focus { border-color: var(--structure-hi); outline: none; }
main > .label { margin: 0 0 10px; font-weight: 400; }

.strip { margin-bottom: 26px; }
.strip .label { margin: 0 0 10px; font-weight: 400; }
.scroller { display: grid; grid-auto-flow: column; grid-auto-columns: 168px; gap: 12px; overflow-x: auto;
  padding-bottom: 6px; scrollbar-color: var(--hairline-strong) transparent; }
.scroller:has(.wide) { grid-auto-columns: 280px; }
.wide {
  position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end;
  aspect-ratio: 16 / 9; padding: 10px 12px 13px; color: var(--text); text-decoration: none;
  container-type: inline-size;
  background: linear-gradient(var(--surface), var(--surface-low));
  --c: var(--cut-card); border-radius: var(--round-card);
  clip-path: polygon(var(--c) 0, 100% 0, 100% calc(100% - var(--c)), calc(100% - var(--c)) 100%, 0 100%, 0 var(--c));
}
/* The card's art only: a logo inside it is not (#172: `.wide img` took the logo out of the flow,
   over the meta line and the bar, and the card clipped it). */
.wide > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.wide::before { content: ""; position: absolute; inset: 30% 0 0; z-index: 1;
  background: linear-gradient(transparent, rgb(var(--scrim-rgb) / 0.6) 45%, rgb(var(--scrim-rgb) / 0.94)); }
.wide > span { position: relative; z-index: 2; }
.wide .label-top { color: var(--text-muted); font: 400 11px var(--mono);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wide .name { font-size: 14px; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wide:hover, .wide:focus-visible { outline: none; box-shadow: inset 2px 0 0 var(--structure-hi); }
/* Progress: a thin strip along the card's bottom edge (#172). */
.wide > .progress { position: absolute; left: 0; right: 0; bottom: 0; z-index: 4; height: 3px; background: rgb(var(--scrim-rgb) / 0.6); }
.wide .progress span { display: block; height: 100%; background: var(--structure); }

.card .badge { position: absolute; top: 8px; right: 8px; z-index: 2; min-width: 22px; padding: 2px 6px; text-align: center;
  background: var(--structure); color: var(--on-structure); font: 600 11px var(--mono); }
.card .badge.count { background: var(--surface-high); color: var(--text); border-top: 1px solid var(--edge-lit); }
.rows .tick { margin-left: auto; color: var(--structure); font: 400 11.5px var(--mono); }
.rows .tick.count { color: var(--text-dim); }

.files { max-width: 720px; margin-top: 28px; }
.files .label { margin: 0 0 8px; font-weight: 400; }
.plan { margin: 0 0 12px; padding: 8px 12px; background: var(--surface-low); border-left: 2px solid var(--structure); }
.plan.transcode { border-left-color: var(--ember); }
.plan p { margin: 0; }
.plan ul { margin: 4px 0 0; padding-left: 18px; color: var(--text-muted); }
.file { padding: 10px 0; border-top: 1px solid var(--hairline); }
.file p { margin: 0 0 4px; }
.fname { font: 400 12px var(--code); word-break: break-all; }
.fname .tag { margin-left: 8px; color: var(--structure); }
.file .facts { color: var(--text-muted); font: 400 11.5px var(--mono); }
.file table { width: 100%; margin-top: 8px; border-collapse: collapse; font: 400 11.5px var(--code); }
.file th { text-align: left; color: var(--text-dim); font-weight: 400; padding: 3px 8px 3px 0; border-bottom: 1px solid var(--hairline); }
.file td { padding: 3px 8px 3px 0; color: var(--text-muted); border-bottom: 1px solid var(--hairline); }
.file td:first-child, .file th:first-child { width: 72px; }

/* Missing and upcoming episodes (spec §2.10.5): listed among the held ones, greyed, not links. */
.rows li.gap > div { display: flex; gap: 14px; align-items: center; padding: 8px 10px; color: var(--text-dim);
  border-bottom: 1px solid var(--hairline); }
.rows li.gap .ep { color: var(--text-dim); }
.rows .tick.gap { color: var(--ember); margin-left: auto; }
.rows .tick.gap + .tick { margin-left: 12px; }
.title .meta.collection { margin-top: -10px; }
.title .meta.collection a { color: var(--text); }
.found { margin-bottom: 26px; }
.found .label { margin: 0 0 10px; font-weight: 400; }
.card .add.ghost { background: transparent; border: 1px solid var(--hairline-strong); color: var(--text-muted); }
.wide .dur { color: var(--text-muted); }

/* Clear logos (#158): the name is the alt text and the fallback. */
img.logo { display: block; max-width: 100%; object-fit: contain; object-position: left bottom; }
/* The logo's box (#172), bottom-left above the meta line: at most ~32% of the card's height
   (16:9, so 18cqw) and 65% of its width, whole whether wide or tall. No logo: the name, there. */
.wide .brand { display: block; margin-bottom: 5px; }
.wide .brand img.logo { width: auto; height: auto; max-width: 65%; max-height: 18cqw;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.7)); }
.wide .brand .name { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
  white-space: normal; font-size: clamp(14px, 6cqw, 20px); font-weight: 500; line-height: 1.2;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7); }
.wide .playmark { position: absolute; top: 50%; left: 50%; z-index: 2; width: 46px; height: 46px; margin: -23px 0 0 -23px;
  display: grid; place-items: center; background: rgb(var(--scrim-rgb) / 0.6); color: var(--text); font-size: 18px;
  border: 1px solid var(--edge-lit); opacity: 0; transition: opacity 0.15s; }
.wide:hover .playmark, .wide:focus-visible .playmark { opacity: 1; }

/* The ⋯ menu on every card (#159). */
.card .more, .wide .more { position: absolute; top: 6px; left: 6px; z-index: 3; padding: 2px 8px; font-size: 16px; line-height: 1;
  background: rgb(var(--scrim-rgb) / 0.72); color: var(--text); opacity: 0; transition: opacity 0.15s; letter-spacing: 0; }
.card:hover .more, .card:focus-within .more, .wide:hover .more, .wide:focus-within .more { opacity: 1; }
@media (hover: none) { .card .more, .wide .more { opacity: 1; } }
.menu { position: fixed; z-index: 20; display: flex; flex-direction: column; min-width: 220px; padding: 4px; border-radius: var(--round-panel);
  background: var(--surface-high); border: 1px solid var(--hairline-strong); border-top-color: var(--edge-lit);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5); }
.menu button { background: none; color: var(--text); text-align: left; text-transform: none; letter-spacing: 0;
  font: 500 13px var(--ui); padding: 8px 12px; clip-path: none; }
.menu button:hover, .menu button:focus-visible { background: var(--surface); outline: none; box-shadow: inset 2px 0 0 var(--structure-hi); }
/* What a card's menu did, or why it could not (#199). */
body > .toast { position: fixed; left: 50%; bottom: 24px; z-index: 21; transform: translateX(-50%); max-width: calc(100% - 32px);
  padding: 8px 14px; background: var(--surface-high); color: var(--text); border: 1px solid var(--hairline-strong);
  border-top-color: var(--edge-lit); border-radius: var(--round-panel); font: 500 12.5px var(--ui); }

/* Home hero (#157). */
.hero { position: relative; isolation: isolate; display: flex; align-items: flex-end; min-height: min(56vh, 520px);
  margin: -18px -18px 26px; padding: 28px 32px; overflow: hidden; border-bottom: 1px solid var(--hairline-strong); }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -2; background: var(--hero) center 25% / cover no-repeat; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, rgb(var(--bg-rgb) / 0.94) 0%, rgb(var(--bg-rgb) / 0.7) 38%, rgb(var(--bg-rgb) / 0) 70%),
    linear-gradient(0deg, var(--bg) 0%, rgb(var(--bg-rgb) / 0) 45%); }
.hero-body { max-width: 560px; }
.hero-body .label { margin: 0 0 10px; }
.hero-logo { margin: 0 0 12px; font-weight: 300; font-size: 40px; line-height: 1.1; }
.hero-logo img.logo { max-height: 130px; max-width: 420px; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.6)); }
.hero-meta { margin: 0 0 10px; color: var(--text-muted); font: 400 12px var(--mono); }
.hero-overview { margin: 0 0 18px; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  overflow: hidden; }
.hero .actions { margin-bottom: 0; }
.hero .dots { position: absolute; right: 24px; bottom: 22px; display: flex; gap: 6px; }
.hero .dots button { width: 22px; height: 4px; padding: 0; background: var(--hairline-strong); clip-path: none; }
.hero .dots button[aria-current="true"] { background: var(--structure-hi); }
@media (max-width: 640px) { .hero { min-height: 60vh; padding: 20px 16px; } .hero .dots { top: 16px; bottom: auto; } .hero-logo img.logo { max-width: 70vw; max-height: 90px; } }
.browse { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 26px; }

/* Title page band (#165): backdrop, logo, facts, quality, actions. */
.band { position: relative; isolation: isolate; margin: -18px -18px 24px; padding: 64px 32px 8px; min-height: 340px;
  display: flex; flex-direction: column; justify-content: flex-end; }
.band.has-fanart::before { content: ""; position: absolute; inset: 0; z-index: -2; background: var(--fanart) center 20% / cover no-repeat; }
.band::after { content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, rgb(var(--bg-rgb) / 0.92) 0%, rgb(var(--bg-rgb) / 0.55) 45%, rgb(var(--bg-rgb) / 0.1) 80%),
    linear-gradient(0deg, var(--bg) 0%, rgb(var(--bg-rgb) / 0) 55%); }
.band h1 { margin: 0 0 6px; font-weight: 300; font-size: 34px; }
.band h1.brand img.logo { max-height: 120px; max-width: min(460px, 80vw); filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.6)); }
.band h1.brand .sub { display: block; margin-top: 8px; font-size: 22px; }
.band .meta { color: var(--text-muted); font: 400 11.5px var(--mono); margin-bottom: 12px; }
.band .actions { margin-bottom: 12px; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.chip { padding: 2px 7px; border-radius: var(--round-chip); border: 1px solid var(--hairline-strong); background: rgb(var(--scrim-rgb) / 0.55); color: var(--text);
  font: 500 10.5px var(--mono); letter-spacing: var(--track-chip); }
@media (max-width: 640px) { .band { padding: 40px 16px 4px; min-height: 260px; } }
.band .tagline { margin: 0 0 8px; color: var(--text); font: 300 italic 16px var(--ui); }
/* A failure's Try again and Back (#154), and the spinner for a wait without a start status. */
.player .msg .actions { justify-content: center; margin: 14px 0 0; pointer-events: auto; }
.player .msg > p { margin: 0; }
.player .spin { position: absolute; left: 50%; top: 50%; width: 48px; height: 48px; margin: -24px 0 0 -24px; z-index: 1;
  border: 3px solid rgb(var(--text-rgb) / 0.18); border-top-color: var(--structure-hi); border-radius: 50%;
  animation: spin 0.9s linear infinite; pointer-events: none; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .player .spin { animation-duration: 2.4s; } }
/* Touch (#155): a centre play/pause with the controls, and the double-tap skip mark. */
.player .bigplay { display: none; position: absolute; left: 50%; top: 50%; z-index: 1; width: 64px; height: 64px; margin: -32px 0 0 -32px;
  padding: 0; border-radius: 50%; background: rgb(var(--scrim-rgb) / 0.6); color: var(--text); font: 500 22px var(--ui);
  transition: opacity 0.25s; clip-path: none; }
.player.touch .bigplay { display: block; }
.player.idle .bigplay { opacity: 0; pointer-events: none; }
.player .skipmark { position: absolute; top: 50%; right: 12%; z-index: 1; transform: translateY(-50%); padding: 10px 16px;
  background: rgb(var(--scrim-rgb) / 0.6); color: var(--text); font: 500 16px var(--mono); pointer-events: none; }
.player .skipmark.back { right: auto; left: 12%; }
.player .spin:not([hidden]) ~ .bigplay { display: none; }
/* Phones (#156): nothing is wider than the screen. A settings row puts its label above the field;
   a file's track table scrolls inside itself. */
.settings { grid-template-columns: minmax(0, 1fr); }
.settings select { max-width: 100%; }
.title .body { max-width: 100%; }
@media (max-width: 640px) {
  .settings .row { grid-template-columns: auto minmax(0, 1fr); gap: 4px 10px; }
  .settings .row .label { grid-column: 1 / -1; }
  .settings .row:has(select) > .unit, .settings .row:has(.choice) > .unit { grid-column: 1 / -1; }
  .file table { display: block; overflow-x: auto; }
  .title h1, .band h1 { font-size: 28px; overflow-wrap: anywhere; }
}
/* Playback info (#149): top left, under the title bar. */
.player .info { border-radius: var(--round-panel); position: absolute; left: 14px; top: 56px; z-index: 2; max-width: min(520px, calc(100% - 28px)); padding: 10px 14px;
  background: rgb(var(--scrim-rgb) / 0.82); border-top: 1px solid var(--edge-lit); font: 400 11.5px/1.5 var(--mono); }
.player .info .label { margin: 0 0 6px; }
.player .info dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 2px 12px; margin: 0; }
.player .info dt { color: var(--text-dim); }
.player .info dd { margin: 0; color: var(--text); overflow-wrap: anywhere; }
/* Speed and subtitle offset (#150, #152): a brief line at the top, and the offset row in the menu. */
.player .toast { position: absolute; left: 50%; top: 64px; z-index: 2; transform: translateX(-50%); padding: 6px 12px;
  background: rgb(var(--scrim-rgb) / 0.82); color: var(--text); font: 500 12px var(--mono); pointer-events: none; }
.player .menu .offset { display: flex; align-items: center; gap: 8px; margin: 6px 0 0; padding: 8px 6px 2px;
  border-top: 1px solid var(--hairline); font: 400 12px var(--mono); }
.player .menu .offset > span:first-child { flex: 1; color: var(--text-muted); }
.player .menu .offset .at { min-width: 56px; text-align: center; font-variant-numeric: tabular-nums; }
.player .menu .note { margin: 6px; color: var(--text-muted); font: 400 11.5px var(--mono); max-width: 280px; }
/* Episode rows (#148): still to play (with progress), name, facts and overview to open, a tick to mark. */
.rows li.episode { display: flex; gap: 14px; align-items: flex-start; padding: 10px; border-bottom: 1px solid var(--hairline); }
.rows li.episode:hover { background: var(--surface-low); }
.rows li.episode .play { position: relative; flex: none; display: block; width: 160px; aspect-ratio: 16 / 9; background: var(--surface); }
.rows li.episode .play .thumb { display: block; width: 100%; height: 100%; }
.rows li.episode .go { position: absolute; left: 50%; top: 50%; width: 36px; height: 36px; margin: -18px 0 0 -18px; border-radius: 50%;
  display: grid; place-items: center; background: rgb(var(--scrim-rgb) / 0.7); color: var(--text); font-size: 13px; opacity: 0; transition: opacity 0.15s; }
.rows li.episode .play:hover .go, .rows li.episode .play:focus-visible .go { opacity: 1; }
@media (hover: none) { .rows li.episode .go { opacity: 0.85; } }
.rows li.episode .progress { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgb(var(--scrim-rgb) / 0.6); }
.rows li.episode .progress span { display: block; height: 100%; background: var(--structure); }
.rows li.episode .what { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; color: var(--text); text-decoration: none; }
.rows li.episode .what:hover .head { color: var(--structure-hi); }
.rows li.episode .facts { color: var(--text-muted); font: 400 11.5px var(--mono); }
.rows li.episode .overview { color: var(--text-muted); line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rows li.episode .seen { flex: none; width: 30px; height: 30px; padding: 0; border-radius: 50%; clip-path: none;
  background: transparent; border: 1px solid var(--hairline-strong); color: var(--structure); font: 500 14px var(--ui); }
.rows li.episode .seen:hover { border-color: var(--structure-hi); filter: none; }
.rows li.episode .seen.on { border-color: var(--structure); }
@media (max-width: 640px) { .rows li.episode .play { width: 112px; } .rows li.episode .overview { -webkit-line-clamp: 3; } }
.rows li.episode a { padding: 0; border-bottom: 0; box-shadow: none; background: none; }
.rows li.episode .what { align-items: flex-start; }
/* Cards (#166): a lift and an edge-lit rim on hover and focus, quality chips, a bar for a film under
   way, ▶ and ✓ on hover, skeletons while a list loads, artwork fading in. No motion when reduced. */
.card, .wide { transition: transform 0.18s ease, box-shadow 0.18s ease; }
.card:hover, .card:focus-visible, .wide:hover, .wide:focus-visible {
  transform: scale(1.05); z-index: 1; box-shadow: inset 0 0 0 1px var(--edge-lit), inset 2px 0 0 var(--structure-hi); }
.scroller { padding-top: 8px; padding-left: 6px; padding-right: 6px; }
.grid { padding: 6px; }
.card .chips { position: absolute; top: 8px; right: 8px; z-index: 2; display: flex; gap: 4px; }
.card .badge ~ .chips { top: 36px; }
.card .chip { padding: 1px 5px; border-radius: var(--round-chip); background: rgb(var(--scrim-rgb) / 0.72); border: 1px solid var(--hairline-strong); color: var(--text);
  font: 500 10px var(--mono); letter-spacing: var(--track-chip); }
.card .progress { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; height: 3px; background: rgb(var(--scrim-rgb) / 0.6); }
.card .progress span { display: block; height: 100%; background: var(--structure); }
.card .acts { position: absolute; left: 50%; top: 40%; z-index: 3; display: flex; gap: 8px; transform: translate(-50%, -50%);
  opacity: 0; transition: opacity 0.15s; }
.card:hover .acts, .card:focus-within .acts { opacity: 1; }
@media (hover: none) { .card .acts { display: none; } }
.card .act { width: 40px; height: 40px; padding: 0; border-radius: 50%; clip-path: none; background: rgb(var(--scrim-rgb) / 0.78);
  border: 1px solid var(--edge-lit); color: var(--text); font: 500 15px var(--ui); }
.card .act:hover { background: var(--structure); color: var(--on-structure); filter: none; }
img.fade { opacity: 0; transition: opacity 0.3s; }
img.fade.in { opacity: 1; }
.skeleton .skel { background: linear-gradient(100deg, var(--surface-low) 30%, var(--surface) 50%, var(--surface-low) 70%) 0 0 / 300% 100%;
  animation: shimmer 1.4s linear infinite; }
@keyframes shimmer { to { background-position: -150% 0; } }
@media (prefers-reduced-motion: reduce) {
  .card, .wide, img.fade, .card .acts { transition: none; }
  .card:hover, .card:focus-visible, .wide:hover, .wide:focus-visible { transform: none; }
  .skeleton .skel { animation: none; }
}
/* A row's heading links to its whole list (#167). */
.strip .label a.see { color: inherit; text-decoration: none; display: inline-flex; gap: 10px; align-items: baseline; }
.strip .label a.see .all { color: var(--text-dim); font-size: 11px; opacity: 0; transition: opacity 0.15s; }
.strip .label a.see:hover, .strip .label a.see:focus-visible { color: var(--text); }
.strip .label a.see:hover .all, .strip .label a.see:focus-visible .all { opacity: 1; color: var(--structure-hi); }
@media (hover: none) { .strip .label a.see .all { opacity: 1; } }

/* Person pages (#173): facts and a clamped biography beside the portrait, Known for, filters,
   and the filmography in groups. */
.person-head { align-items: flex-start; }
.person-head .facts { margin: 4px 0 6px; color: var(--text); font: 400 13px var(--mono); }
.person-head .facts .dot { color: var(--text-dim); }
.person-head .bio { max-width: 72ch; margin: 14px 0 4px; line-height: 1.55; white-space: pre-line;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 6; overflow: hidden; }
.person-head .bio.open { display: block; -webkit-line-clamp: unset; }
.person-head .more-bio { padding: 4px 10px; font-size: 11px; }
.person-head .fetching { display: flex; align-items: center; gap: 10px; margin: 14px 0 0; width: fit-content;
  padding: 8px 12px; color: var(--text); font: 400 12px var(--mono); background: var(--surface);
  border-left: 2px solid var(--structure); }
.person-head .fetching.slow { border-left-color: var(--ember); color: var(--text-muted); }
.spinner.small { display: inline-block; flex: none; width: 14px; height: 14px; border: 2px solid rgb(var(--text-rgb) / 0.18);
  border-top-color: var(--structure-hi); border-radius: 50%; animation: spin 0.9s linear infinite; }
.person-head .portrait.none { display: grid; place-items: center; background: var(--surface);
  color: var(--text-dim); font-size: 44px; font-weight: 300; }
.person .skel { display: block; background: linear-gradient(90deg, var(--surface-low), var(--surface), var(--surface-low));
  background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
.person .portrait.skel { width: 185px; flex: none; aspect-ratio: 2 / 3; }
.person .skel.line { height: 12px; margin: 10px 0; width: min(560px, 90%); }
.person .skel.line.h1 { height: 30px; width: min(320px, 70%); margin-bottom: 16px; }
.person .skel.line.short { width: min(260px, 55%); }
.person .strip { margin-top: 26px; }
.person-filters { align-items: center; margin: 28px 0 6px; gap: 10px 14px; }
.segmented { display: inline-flex; border: 1px solid var(--hairline-strong); }
.segmented button { padding: 6px 12px; background: transparent; color: var(--text-muted); border: 0;
  border-right: 1px solid var(--hairline-strong); font: 400 11.5px var(--mono); letter-spacing: var(--track-tight); text-transform: none;
  clip-path: none; }
.segmented button:last-child { border-right: 0; }
.segmented button[aria-pressed="true"] { background: var(--surface-high); color: var(--text); box-shadow: inset 0 -2px 0 var(--structure); }
.segmented button:focus-visible { outline: 1px solid var(--structure-hi); outline-offset: -1px; }
.segmented .n, .film-group .label .n { margin-left: 6px; color: var(--text-dim); }
.film-group { margin-top: 22px; }
.film-group .label { margin: 0 0 10px; font-weight: 400; }
.card .inlib { position: absolute; top: 8px; right: 8px; z-index: 2; padding: 2px 6px;
  background: rgb(var(--scrim-rgb) / 0.75); color: var(--structure-hi); font: 400 9.5px var(--mono); letter-spacing: var(--track-chip);
  text-transform: var(--caps); border: 1px solid var(--edge-lit); }
/* A missing title's actions: one compact row (#173), on hover or focus where there is hover. */
.card .cta { position: relative; z-index: 2; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.card .cta .add { margin: 0; padding: 4px 8px; font-size: 10px; letter-spacing: var(--track-snug); }
.card .cta .add:not(.ghost) { background: transparent; color: var(--structure-hi); border: 1px solid var(--structure); }
.card .cta .add:not(.ghost):hover { background: var(--structure); color: var(--bg); }
@media (hover: hover) {
  .card .cta { opacity: 0; transition: opacity 0.15s; }
  .card:hover .cta, .card:focus-within .cta { opacity: 1; }
}
@media (max-width: 640px) {
  .person .portrait.skel { width: 140px; }
  .person-filters select { flex: 1 0 100%; }
}
@media (prefers-reduced-motion: reduce) { .person .skel { animation: none; } }

/* A title not in the library (#174): its page, laid out as a person's, and the link that makes a
   missing card open it, under the card's buttons. */
.card .cover { position: absolute; inset: 0; z-index: 3; }
.card .cover:focus-visible { outline: 1px solid var(--structure-hi); outline-offset: -1px; }
.card .cta { z-index: 4; }
.card.missing:has(.cover):hover { background: var(--surface-high); box-shadow: inset 2px 0 0 var(--structure-hi); }
.card.missing:has(.cover):hover .poster { opacity: 0.6; }
.tmdb .want { margin: 0 0 4px; color: var(--ember); font: 400 11px/1.4 var(--mono); letter-spacing: var(--track-chip); text-transform: var(--caps); }
.tmdb .want .reason { color: var(--text-muted); text-transform: none; letter-spacing: 0; }
.tmdb .tagline { margin: 12px 0 0; color: var(--text); font: 300 italic 16px var(--ui); }
.tmdb .crew { margin-top: 14px; }
.tmdb .actions { margin: 18px 0 0; }
.tmdb .empty.note { margin: 14px 0 0; text-align: left; }
.tmdb .face-skel { width: 112px; flex: none; aspect-ratio: 2 / 3; }

/* Player polish (#160, #162, #163): the buffered part of the track, ends-at, a large Play when the
   browser refused to start with sound, and the shortcut list. */
.seek::-webkit-slider-runnable-track { background: linear-gradient(90deg, var(--structure) var(--pos, 0%),
  rgb(var(--text-rgb) / 0.32) var(--pos, 0%), rgb(var(--text-rgb) / 0.32) var(--buf, 0%), var(--hairline-strong) var(--buf, 0%)) !important; }
.seek::-moz-range-track { background: linear-gradient(90deg, rgb(var(--text-rgb) / 0.32) var(--buf, 0%), var(--hairline-strong) var(--buf, 0%)); }
.buttons .endsat { margin-left: 8px; color: var(--text-muted); font: 400 12px var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.player.blocked .bigplay { display: block; width: 104px; height: 104px; margin: -52px 0 0 -52px; font-size: 36px;
  background: rgb(var(--scrim-rgb) / 0.72); box-shadow: 0 0 0 1px var(--edge-lit); }
.player.blocked.idle .bigplay { opacity: 1; pointer-events: auto; }
.player .top .keyhelp { margin-left: auto; padding: 4px 10px; font: 500 13px var(--mono); }
.player .keys { position: absolute; left: 50%; top: 50%; z-index: 3; transform: translate(-50%, -50%); width: min(520px, calc(100% - 28px));
  max-height: calc(100% - 40px); overflow-y: auto; padding: 16px 18px; background: var(--surface); border-top: 1px solid var(--edge-lit); }
.player .keys dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 10px 0 14px; }
.player .keys dt { margin: 0; text-align: right; }
.player .keys dd { margin: 0; color: var(--text); }
.player .keys kbd { padding: 1px 6px; background: var(--surface-high); color: var(--structure-hi); font: 400 12px var(--code);
  border: 1px solid var(--hairline-strong); }
@media (max-width: 640px) { .buttons .endsat { display: none; } }

/* Focus you can see (#163): a clipped button or card hides an outline, so the ring is drawn inside. */
button:focus-visible, .button:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--structure-hi); }
.card:focus-visible, .wide:focus-visible, a.person:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--structure-hi); }

/* Ratings (#121) ride in the meta line; nothing of their own here. */

/* Movies and TV (#168): Shuffle, grid or list, poster size; an A-Z bar when sorted by name. */
.libtools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 12px; }
.libtools .shuffle { padding: 6px 12px; font-size: 11.5px; }
.libtools .shuffle:disabled { color: var(--text-dim); cursor: default; filter: none; }
.segmented button:disabled { color: var(--text-dim); cursor: default; filter: none; }
.az { display: flex; flex-wrap: wrap; gap: 2px; margin: 0 0 12px; font: 400 12px var(--mono); }
.az button, .az span { min-width: 26px; padding: 4px 0; text-align: center; letter-spacing: 0; }
.az button { background: transparent; color: var(--text); clip-path: none; font: inherit; }
.az button:hover { background: var(--surface-high); color: var(--structure-hi); filter: none; }
.az span { color: var(--text-dim); opacity: 0.5; }
.grid [data-letter] { scroll-margin-top: 84px; }
.grid.size-s { grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); }
.grid.size-s .card .name { font-size: 13px; }
.grid.size-l { grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); }
.grid.list { grid-template-columns: 1fr; gap: 4px; }
.grid.list .card { aspect-ratio: auto; min-height: 80px; justify-content: center; gap: 2px; padding: 10px 140px 10px 72px; clip-path: none; }
.grid.list .card::before { display: none; }
.grid.list .card .poster { inset: 8px auto 8px 10px; width: 43px; height: calc(100% - 16px); }
.grid.list .card .name { order: -1; font-size: 15px; }
.grid.list .card .badge, .grid.list .card .badge ~ .chips, .grid.list .card .chips { top: 50%; transform: translateY(-50%); }
.grid.list .card .badge ~ .chips { right: 44px; }
.grid.list .card .acts { left: auto; right: 44px; top: 50%; transform: translateY(-50%); }
.grid.list .card .acts .act { width: 32px; height: 32px; font-size: 13px; }
.grid.list .card:hover .chips, .grid.list .card:focus-within .chips { opacity: 0; }
.grid.list .card:hover, .grid.list .card:focus-visible { transform: none; }
.grid.list .card .more { left: auto; right: 8px; top: 8px; }
.grid.list .card:has(.badge) .more { top: auto; bottom: 6px; }
@media (max-width: 640px) { .grid.list .card { padding-right: 52px; } .grid.list .card .chips { display: none; } }
@media (max-width: 640px) {
  .grid.size-s { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 8px; }
  .grid.size-s .card { padding: 8px; }
  .grid.size-s .card .name { font-size: 12px; }
  .grid.size-l { grid-template-columns: minmax(0, 1fr); }
  .grid [data-letter] { scroll-margin-top: 156px; }
}

/* Home rows and spoiler protection (#169). */
.homerows { display: grid; gap: 2px; max-width: 420px; margin: 0; padding: 0; list-style: none; }
.homerows li { display: flex; align-items: center; gap: 6px; padding: 4px 6px 4px 10px; background: var(--surface-low); }
.homerows label { display: flex; align-items: center; gap: 10px; flex: 1; cursor: pointer; }
.homerows .move { padding: 4px 10px; font: 400 13px var(--mono); letter-spacing: 0; }
.homerows .move:disabled { opacity: 0.3; cursor: default; filter: none; }
.spoil { filter: blur(12px); cursor: pointer; }
.overview.spoil, .rows li.episode .overview.spoil { filter: blur(5px); user-select: none; }
img.spoil { clip-path: inset(0); }

/* What this browser plays (#100). */
.decode { max-width: 640px; margin-top: 30px; }
table.decode { width: 100%; border-collapse: collapse; font: 400 12px var(--code); }
table.decode th, table.decode td { padding: 6px 8px; text-align: left; border-bottom: 1px solid var(--hairline-strong); }
table.decode thead th { color: var(--text-muted); font-weight: 400; }
table.decode tbody th { font-weight: 400; color: var(--text); }
table.decode tr.no th, table.decode tr.no td { color: var(--text-dim); }
table.decode tr.yes td:nth-child(2) { color: var(--structure-hi); }
.decode .actions { margin: 12px 0 0; }
@media (max-width: 640px) { table.decode th, table.decode td { padding: 6px 4px; } table.decode td:nth-child(4), table.decode th:nth-child(4) { display: none; } }

/* Signed out (#189). No app bar until /v1/me says who this is, none signed out, and a locked
   session (the profile picker's PIN) keeps only the mark and Sign out. */
body:not([data-session]) .bar, body[data-session="out"] .bar { display: none; }
body[data-session="locked"] .bar :is(.slices, #search, #admin, #settings) { display: none; }
body[data-session="locked"] #signout { margin-left: auto; }
.gate { display: grid; place-items: center; min-height: calc(100svh - 36px); }
.gate-card {
  display: grid; justify-items: start; width: min(100%, 380px); padding: 36px 32px 28px;
  position: relative; background: var(--surface);
  --c: var(--cut-card); border-radius: var(--round-card);
  clip-path: polygon(var(--c) 0, 100% 0, 100% calc(100% - var(--c)), calc(100% - var(--c)) 100%, 0 100%, 0 var(--c));
}
.gate .glyph { width: 44px; height: 44px; background: var(--mark);
  -webkit-mask: url(/app/mark.svg) center / contain no-repeat; mask: url(/app/mark.svg) center / contain no-repeat; }
.gate .mark { margin: 12px 0 32px; }
.gate h1 { margin: 0 0 6px; font-weight: 300; font-size: 30px; line-height: 1.15; }
.gate .lead { margin: 0 0 24px; color: var(--text-muted); font-size: 15px; line-height: 1.5; }
.gate .button { display: block; width: 100%; padding: 13px 16px; text-align: center; font-size: 13px; }
.gate .button.ghost { margin-top: 0; }
.gate .hint { margin: 10px 0 0; width: 100%; text-align: center; color: var(--text-dim); font: 400 12px/1.5 var(--mono); }
.gate .invite { width: 100%; margin: 28px 0 0; padding-top: 16px; border-top: 1px solid var(--hairline);
  color: var(--text-muted); font-size: 13px; line-height: 1.5; }
/* A phone: no card, the screen is the card. */
@media (max-width: 480px) {
  .gate { place-items: start stretch; padding-top: 12vh; }
  .gate-card { width: 100%; padding: 0 4px; background: none; clip-path: none; }
  .gate-card::after { display: none; }
}

/* Admin tabs and lists (#192), and the profile's own devices and PIN in Settings. */
.admin .tabs { display: flex; flex-wrap: wrap; gap: 2px; margin: 14px 0 6px; border-bottom: 1px solid var(--hairline-strong); }
.admin .tabs a { padding: 8px 12px; color: var(--text-muted); text-decoration: none; font: 500 12px var(--ui);
  letter-spacing: var(--track); text-transform: var(--caps); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.admin .tabs a:hover { color: var(--text); }
.admin .tabs a[aria-current] { color: var(--text); border-bottom-color: var(--structure); }
.admin .settings { max-width: 640px; }
.adminlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.adminlist li { display: grid; gap: 6px; padding: 12px 14px; background: var(--surface); border-radius: var(--round-panel); }
.adminlist p { margin: 0; }
.adminlist .what { font-size: 15px; }
.adminlist .what a { color: inherit; }
.adminlist .meta { color: var(--text-muted); font: 400 11.5px var(--mono); overflow-wrap: anywhere; }
.adminlist .actions { margin: 0; }
.settings input.name, .settings input.code { width: 220px; }
.settings input.pin { width: 120px; }
.settings .segmented { justify-self: start; }
.settings .segmented button[aria-pressed="true"] { color: var(--text); background: var(--surface-high); }
.imports table.decode { max-width: 520px; }
.imports table.decode th { width: 50%; color: var(--text-muted); font-weight: 400; }

/* Layout options (#197, spec §2.10.16), from data-* on <html> set by theme.js and app.js. Phones
   (640 px and narrower) keep the top bar and list rows whatever is chosen. */
.slices a::before, .bar .settings-link::before, #signout::before { content: none; }
/* The top bar between a phone and a wide screen: the search on its own line, so the account links
   are never cut off (it overflowed at 768 px in Bio). */
@media (min-width: 641px) and (max-width: 1024px) {
  html:not([data-nav="side"]) .bar { flex-wrap: wrap; row-gap: 8px; }
  html:not([data-nav="side"]) #search { order: 5; flex: 1 1 100%; max-width: none; }
}
/* The sidebar: labels from 1025 px, an icon rail from 641 px. */
@media (min-width: 641px) {
  html[data-nav="side"] .bar { position: fixed; top: 0; bottom: 0; left: 0; z-index: 2; width: 220px; box-sizing: border-box;
    flex-direction: column; align-items: stretch; gap: 2px; padding: 16px 10px; overflow-y: auto;
    border-bottom: 0; border-right: 1px solid var(--hairline-strong); }
  html[data-nav="side"] main { margin-left: 220px; }
  html[data-nav="side"] .bar .mark { padding: 4px 10px 12px; }
  html[data-nav="side"] #search { order: 1; flex: none; max-width: none; margin: 0 0 10px; }
  html[data-nav="side"] .slices { order: 2; flex-direction: column; gap: 2px; }
  html[data-nav="side"] :is(.slices a, .bar .settings-link, #signout) { display: flex; align-items: center; gap: 12px;
    padding: 9px 10px; border: 0; border-left: 2px solid transparent; background: none; clip-path: none; color: var(--text-muted);
    font: 500 12px var(--ui); letter-spacing: var(--track); text-transform: var(--caps); text-align: left; }
  html[data-nav="side"] :is(.slices a, .bar .settings-link, #signout):hover { color: var(--text); filter: none; }
  html[data-nav="side"] :is(.slices a, .bar .settings-link)[aria-current] { color: var(--text); border-left-color: var(--structure);
    background: var(--surface-low); }
  html[data-nav="side"] :is(.slices a, .bar .settings-link, #signout)::before { content: attr(data-icon); flex: none; width: 18px;
    text-align: center; font: 400 15px/1 var(--ui); letter-spacing: 0; text-transform: none; }
  html[data-nav="side"] .who { order: 3; margin: auto 10px 6px; }
  html[data-nav="side"] :is(.bar .settings-link, #signout) { order: 4; }
}
@media (min-width: 641px) and (max-width: 1024px) {
  html[data-nav="side"] .bar { width: 64px; padding: 14px 6px; }
  html[data-nav="side"] main { margin-left: 64px; padding-top: 64px; }
  html[data-nav="side"] .bar .mark { padding: 4px 0 14px; text-align: center; font-size: 0; }
  html[data-nav="side"] .bar .mark::before { content: "TF"; font: var(--mark-font); letter-spacing: var(--track); }
  html[data-nav="side"] #search { position: fixed; top: 12px; left: 82px; width: min(420px, calc(100vw - 100px)); margin: 0; }
  html[data-nav="side"] :is(.slices a, .bar .settings-link, #signout) { justify-content: center; padding: 11px 0; font-size: 0; gap: 0; }
  html[data-nav="side"] :is(.slices a, .bar .settings-link, #signout)::before { font-size: 17px; }
  html[data-nav="side"] .who { font-size: 0; margin-top: auto; }
}

/* Home: a short hero band, or none (the layout's choice). */
.hero.short { min-height: 0; height: 230px; padding-top: 0; padding-bottom: 22px; }
.hero.short .hero-overview { -webkit-line-clamp: 1; }
.hero.short .hero-logo img.logo { max-height: 70px; }
@media (max-width: 640px) { .hero.short { height: 210px; min-height: 0; } .hero.short .hero-overview { display: none; } }
.scroller.libtiles { grid-auto-columns: 240px; }
.libtile { position: relative; display: flex; align-items: flex-end; aspect-ratio: 16 / 7; padding: 12px 14px; overflow: hidden;
  color: var(--text); text-decoration: none; font: 500 13px var(--ui); letter-spacing: var(--track); text-transform: var(--caps);
  background: linear-gradient(var(--surface), var(--surface-low));
  --c: var(--cut-card); border-radius: var(--round-card);
  clip-path: polygon(var(--c) 0, 100% 0, 100% calc(100% - var(--c)), calc(100% - var(--c)) 100%, 0 100%, 0 var(--c)); }
.libtile::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to bottom right, transparent 50%, var(--edge-lit) 0 calc(50% + 1px), transparent 0) 0 0 / var(--c) var(--c),
    linear-gradient(to bottom right, transparent calc(50% - 1px), var(--edge-shade) 0 50%, transparent 0) 100% 100% / var(--c) var(--c),
    linear-gradient(var(--edge-lit) 0 0) 0 0 / 100% 1px, linear-gradient(var(--edge-shade) 0 0) 100% 0 / 1px 100%,
    linear-gradient(var(--edge-shade) 0 0) 0 100% / 100% 1px;
  background-repeat: no-repeat; }
.libtile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.45; }
.libtile span { position: relative; }
.libtile:hover, .libtile:focus-visible { outline: none; box-shadow: inset 2px 0 0 var(--structure-hi); }

/* Card size, for the Home rows as for the grids. */
html[data-size="s"] .scroller { grid-auto-columns: 128px; }
html[data-size="s"] .scroller:has(.wide) { grid-auto-columns: 220px; }
html[data-size="l"] .scroller { grid-auto-columns: 220px; }
html[data-size="l"] .scroller:has(.wide) { grid-auto-columns: 360px; }
html[data-size] .scroller:has(.person) { grid-auto-columns: 112px; }
/* Landscape cards on Movies and TV: the backdrop, or the poster where there is none. */
.grid.landscape { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.grid.landscape.size-s { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.grid.landscape.size-l { grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); }
.grid.landscape .card { aspect-ratio: 16 / 9; }
/* Artwork alone: the name stays the card's label for a screen reader. */
html[data-names="off"] .grid:not(.list) .card:has(.poster) :is(.name, .meta),
html[data-names="off"] .scroller .card:has(.poster) :is(.name, .meta) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
html[data-names="off"] .grid:not(.list) .card:has(.poster)::before,
html[data-names="off"] .scroller .card:has(.poster)::before { display: none; }

/* A series page's seasons as tabs, or as a row of season cards, above the season's episodes. */
.seasontabs { display: flex; gap: 2px; overflow-x: auto; margin: 0 0 14px; max-width: 980px; border-bottom: 1px solid var(--hairline-strong); }
.seasontabs button { flex: none; padding: 8px 12px; background: none; color: var(--text-muted); clip-path: none; border-radius: 0;
  font: 500 12px var(--ui); letter-spacing: var(--track); text-transform: var(--caps); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.seasontabs button:hover { color: var(--text); filter: none; }
.seasontabs button[aria-selected="true"] { color: var(--text); border-bottom-color: var(--structure); }
.seasontabs .n { margin-left: 6px; color: var(--text-dim); font: 400 10.5px var(--mono); text-transform: none; letter-spacing: 0; }
.seasoncards { margin-bottom: 18px; }
.seasoncards .card[aria-selected="true"] { box-shadow: inset 0 -3px 0 var(--structure); }
.seasonbody { max-width: 980px; margin-bottom: 28px; }
.seasonbody .rows { max-width: none; }
.seasonbody > .empty { margin: 18px 0; text-align: left; }
/* Episodes as a compact list (no still, no overview), or a grid of stills. */
.rows.compact li.episode { align-items: center; padding: 6px 10px; }
.rows.compact li.episode .play { width: 28px; aspect-ratio: 1; background: none; }
.rows.compact li.episode .play .thumb, .rows.compact li.episode .play .progress { display: none; }
.rows.compact li.episode .go { position: static; display: grid; margin: 0; width: 28px; height: 28px; opacity: 1; }
.rows.compact .overview { display: none; }
.rows.compact .what { display: flex; gap: 12px; align-items: baseline; flex: 1; min-width: 0; }
.rows.compact .head { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rows.compact .facts { margin-left: auto; white-space: nowrap; }
@media (max-width: 640px) { .rows.compact .facts { display: none; } }
@media (min-width: 641px) {
  .rows.epgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px 14px; max-width: none; }
  .rows.epgrid li.episode { position: relative; flex-direction: column; gap: 6px; padding: 0; border: 0; }
  .rows.epgrid li.episode:hover { background: none; }
  .rows.epgrid li.episode .play { width: 100%; }
  .rows.epgrid li.episode .overview { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .rows.epgrid li.episode .seen { position: absolute; top: 6px; right: 6px; }
  .rows.epgrid li.gap > div { flex-direction: column; align-items: flex-start; border: 1px dashed var(--hairline-strong); padding: 12px; }
}

/* Settings in tabs (#198), the same strip as Admin's. Its underline overlaps the hairline by 1px, which made
   a 1px vertical scroller with arrows; overflow-y and the padding stop that and keep the whole underline (#220). */
.settings-page .tabs { display: flex; gap: 2px; margin: 14px 0 6px; border-bottom: 1px solid var(--hairline-strong); overflow-x: auto; overflow-y: hidden; padding-bottom: 1px; }
.settings-page .tabs a { flex: none; padding: 8px 12px; color: var(--text-muted); text-decoration: none; font: 500 12px var(--ui);
  letter-spacing: var(--track); text-transform: var(--caps); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.settings-page .tabs a:hover { color: var(--text); }
.settings-page .tabs a[aria-current] { color: var(--text); border-bottom-color: var(--structure); }
.settings .status[data-state="bad"] { color: var(--alert); }
.choice { display: flex; flex-wrap: wrap; gap: 8px; }
.choice label { position: relative; display: grid; gap: 6px; justify-items: center; width: 92px; padding: 8px; font-size: 12px; cursor: pointer;
  color: var(--text-muted); background: var(--surface-low); border: 1px solid var(--hairline-strong); border-radius: var(--round-field); }
.choice label:has(input:checked) { border-color: var(--structure); color: var(--text); }
.choice label:has(input:focus-visible) { outline: 2px solid var(--structure-hi); outline-offset: 2px; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice svg { width: 72px; height: 46px; }
.choice svg rect { fill: var(--hairline-strong); }
.choice label:has(input:checked) svg .hi { fill: var(--structure); }
.settings .row:has(.choice) { align-items: start; }
.settings .row a.button { justify-self: start; }
.player .info .why { display: block; color: var(--text-dim); font: 400 11px var(--mono); }
