/*
 * Give me something to watch (givemesomething.to/watch) — Living Room look (chosen 2026-10-14 from eight
 * directions; the others are in design/looks-explored).
 * How films look on a TV home screen: wide stills from the film instead of posters, the title set on the
 * still, a deep blue-black like a dimmed room and one warm accent like a standby light. Red Hat Display for
 * titles and figures, Red Hat Text for everything you read. Dark only, by choice: it's the living room
 * with the lights down. Structure and behaviour come from New Game+'s Shelf (rail, tiles, drawer).
 */

@font-face { font-family: 'Red Hat Display'; src: url('fonts/red-hat-display-latin-wght-normal.woff2') format('woff2'); font-weight: 300 900; font-display: swap; }
@font-face { font-family: 'Red Hat Text'; src: url('fonts/red-hat-text-latin-wght-normal.woff2') format('woff2'); font-weight: 300 700; font-display: swap; }

:root {
  /* Neutral ramp (dimmed-room blue-black), back to front */
  --canvas: #0a0d13;
  --surface: #121722;
  --raised: #1b2230;
  --skeleton: #161c28;
  --line: #263044;
  --line-strong: #6c7a93;
  --ink-3: #8a97ab;
  --ink-2: #b4bfd0;
  --ink: #eef2f8;
  /* The one accent: standby amber */
  --accent: #f0b84a;
  --accent-strong: #ffcb66;
  --on-accent: #191103;
  --focus: #f0b84a;
  /* Semantics */
  --free: #8be3b0;
  --positive: #8fc6ff;
  --scrim: rgb(4 6 10 / 0.8);
  --shadow-pop: 0 18px 40px -16px rgb(0 0 0 / 0.6), 0 0 0 1px var(--line);
  /* The flat-to-dark band that lets a title sit on any still */
  --still-scrim: linear-gradient(to top, rgb(5 7 11 / 0.92), rgb(5 7 11 / 0.7) 55%, transparent);

  --font-display: 'Red Hat Display', system-ui, sans-serif;
  --font-body: 'Red Hat Text', system-ui, sans-serif;
  --ease: cubic-bezier(0.2, 0, 0, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--canvas); color: var(--ink); font-family: var(--font-body); -webkit-font-smoothing: antialiased; }
body { margin: 0; min-height: 100dvh; background: var(--canvas); font-size: 15px; line-height: 1.45; display: flex; flex-direction: column; }
main { flex: 1; width: 100%; max-width: 1600px; margin: 0 auto; padding: 0 32px; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
img { display: block; max-width: 100%; }
h1, h2, h3 { text-wrap: balance; margin: 0; }
p, li { text-wrap: pretty; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
::selection { background: var(--accent); color: var(--on-accent); }
.num { font-family: var(--font-body); font-variant-numeric: lining-nums proportional-nums; }
.label-caps { font-family: var(--font-body); font-weight: 700; font-size: 12px; line-height: 1; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-2); }
.hint { margin: 0; font-size: 13px; line-height: 1.35; color: var(--ink-3); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 8px; z-index: 50; background: var(--accent); color: var(--on-accent); padding: 8px 12px; border-radius: 6px; }
.ico { display: inline-flex; width: 18px; height: 18px; flex: none; }
.ico svg { width: 100%; height: 100%; }

/* ── Header ─────────────────────────────────────────────────────────── */
.site-header { display: flex; align-items: center; gap: 16px; padding: 12px 32px; border-bottom: 1px solid var(--line); min-height: 68px; flex-wrap: wrap; }
/* The marquee lockup: the umbrella line small, the section's verb big in its colour (/play and /read get their own). */
.wordmark { display: inline-grid; gap: 4px; line-height: 1; text-decoration: none; color: var(--ink); }
.wordmark .wm-pre { font-family: var(--font-body); font-weight: 700; font-size: 9.5px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-2); }
.wordmark .wm-verb { font-family: var(--font-display); font-weight: 900; font-size: 30px; line-height: 0.85; letter-spacing: 0.04em; text-transform: uppercase; color: var(--accent); }
.wordmark:hover .wm-verb { color: var(--accent-strong); }
.proto-tag { font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-3); border: 1px solid var(--line); border-radius: 4px; padding: 2px 6px; }
/* Preview (a private Vercel link) and Local are tagged loudly, so neither is mistaken for the live site. */
html[data-target='preview'] .proto-tag, html[data-target='local'] .proto-tag { color: var(--on-accent); background: var(--accent); border-color: var(--accent); font-weight: 700; }
.header-search { flex: 1; max-width: 560px; margin-left: 24px; }

/* ── Buttons ────────────────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 16px; border: 0; border-radius: 6px; font-weight: 700; font-size: 14px; transition: background-color 150ms var(--ease); }
.btn.secondary { background: var(--raised); color: var(--ink); }
.btn.secondary:hover { background: var(--line); }
.btn.primary { background: var(--accent); color: var(--on-accent); }
.btn.primary:hover { background: var(--accent-strong); }
.btn.sm { min-height: 36px; padding: 0 12px; font-size: 13px; }
.btn.block { width: 100%; }
.btn[aria-pressed='true'] { background: var(--ink); color: var(--canvas); }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 0; border-radius: 6px; background: transparent; color: var(--ink-2); }
.icon-btn:hover { background: var(--raised); color: var(--ink); }
.text-btn { border: 0; background: none; padding: 10px 0; color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; font-size: 14px; }
.text-btn:hover { color: var(--ink); }

/* ── Search ─────────────────────────────────────────────────────────── */
.search { position: relative; }
.search-box { display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--surface); color: var(--ink-3); }
.search-box:focus-within { outline: 3px solid var(--focus); outline-offset: 0; }
.search-box input { flex: 1; min-width: 0; border: 0; background: none; outline: none; color: var(--ink); font-size: 15px; height: 100%; }
.search-box input::placeholder { color: var(--ink-3); opacity: 1; }
.search-box input::-webkit-search-cancel-button { appearance: none; }
.search.lg .search-box { height: 56px; padding: 0 18px; }
.search.lg input { font-size: 17px; }
.search.dashed .search-box { border-style: dashed; background: transparent; height: 44px; }
.search ul { position: absolute; left: 0; right: 0; top: calc(100% + 6px); margin: 0; padding: 6px; list-style: none; background: var(--surface); border-radius: 6px; box-shadow: var(--shadow-pop); z-index: 30; max-height: 70vh; overflow: auto; min-width: 300px; }
.search li button { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; gap: 12px; align-items: center; width: 100%; padding: 6px 8px; border: 0; background: none; text-align: left; border-radius: 4px; }
.search li button[aria-selected='true'], .search li button:hover { background: var(--raised); }
.search li img, .search li .noimg { width: 32px; height: 48px; object-fit: cover; border-radius: 4px; background: var(--raised); flex: none; }
.search .s-name { font-weight: 700; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search .s-meta { font-size: 13px; color: var(--ink-3); white-space: nowrap; }
/* The rail's field is narrow: on desktop its list is at least 440px and opens over the results (New Game+ D-129); app.js places it. */

/* ── Home ───────────────────────────────────────────────────────────── */
.home { padding: 72px 0 56px; }
.hero { font-family: var(--font-display); font-weight: 800; font-size: clamp(44px, 6vw, 72px); line-height: 0.98; letter-spacing: -0.025em; }
.hero .accent { color: var(--accent); }
.lede { max-width: 600px; margin: 24px 0 28px; font-size: 17px; line-height: 1.4; color: var(--ink-2); }
.home-search { max-width: 672px; }
/* The home page sentence: "Give me something to watch like…", finished by the search field. */
.say { max-width: 11em; margin: 0; font-family: var(--font-display); font-weight: 800; font-size: clamp(36px, 5.6vw, 72px); line-height: 1; letter-spacing: -0.025em; }
.say .accent { color: var(--accent); }
.say-search { max-width: 760px; margin-top: 14px; }
.search.say .search-box { height: auto; gap: 14px; padding: 4px 0 12px; border: 0; border-bottom: 3px solid var(--accent); border-radius: 0; background: none; font-family: var(--font-display); font-weight: 700; font-size: clamp(24px, 3.2vw, 44px); letter-spacing: -0.02em; }
.search.say .search-box:focus-within { outline: none; box-shadow: 0 3px 0 var(--accent-strong); border-bottom-color: var(--accent-strong); }
.search.say input { height: auto; padding: 0; font: inherit; letter-spacing: inherit; }
.search.say ul { top: calc(100% + 12px); font-size: 15px; letter-spacing: 0; }
.say-caret { flex: none; width: 3px; height: 0.95em; background: var(--accent); animation: say-blink 1s steps(1) infinite; }
.search.say .search-box:focus-within .say-caret, .search.say .search-box:has(input:not(:placeholder-shown)) .say-caret { display: none; }
@keyframes say-blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .say-caret { animation: none; } }
.notice { max-width: 672px; margin-top: 16px; padding: 12px 14px; border-radius: 6px; background: var(--raised); }
.home-starts { margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--line); }
.starts { list-style: none; margin: 16px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
/* Ten starters: two columns, or two full rows of five on desktop. */
@media (min-width: 1024px) { .starts { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.start { position: relative; display: block; width: 100%; padding: 0; border: 0; background: none; text-align: left; color: #fff; border-radius: 10px; overflow: hidden; outline-offset: 3px; transition: translate 200ms var(--ease); }
.start .start-name { position: absolute; left: 0; right: 0; bottom: 0; padding: 28px 14px 12px; background: var(--still-scrim); font-family: var(--font-display); font-weight: 800; font-size: 19px; line-height: 1.05; }
@media (max-width: 639px) { .starts { gap: 12px; } .start .start-name { padding: 20px 10px 8px; font-size: 15px; } }
@media (min-width: 1024px) and (max-width: 1279px) { .start .start-name { padding: 22px 12px 10px; font-size: 16px; } }
.start img, .start .noimg { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--raised); }
.start:hover { outline: 2px solid var(--accent); translate: 0 -2px; }

/* ── Discover: rail + results ───────────────────────────────────────── */
.discover { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; padding: 24px 0 64px; }
@media (min-width: 1024px) { .discover { grid-template-columns: 288px minmax(0, 1fr); } .rail { position: sticky; top: 16px; align-self: start; max-height: calc(100dvh - 32px); overflow: auto; padding-right: 4px; z-index: 20; } }
.rail { display: grid; gap: 28px; align-content: start; }
.rail-block { display: grid; gap: 12px; }

.seed-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.seed { display: grid; grid-template-columns: 40px minmax(0, 1fr) 44px; align-items: center; gap: 10px; padding: 4px 0 4px 4px; background: var(--surface); border-radius: 6px; }
.seed img, .seed .noimg { width: 40px; height: 60px; object-fit: cover; border-radius: 4px; background: var(--raised); }
.seed-name { font-family: var(--font-display); font-weight: 800; font-size: 21px; line-height: 1; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.seed-year { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
/* The pick just added: an amber ring that fades, so you can see where it went. */
.seed.just-added { animation: seed-in 1.6s var(--ease); }
@keyframes seed-in { from { box-shadow: 0 0 0 2px var(--accent); } to { box-shadow: 0 0 0 2px transparent; } }
.seed-note { margin: 8px 0 0; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border: 1.5px solid transparent; border-radius: 999px; background: var(--raised); color: var(--ink); font-size: 14px; position: relative; transition: background-color 150ms var(--ease); }
.chip::after { content: ''; position: absolute; inset: -4px 0; }
.chip:hover { background: var(--line); }
.chip[data-state='more'] { background: var(--accent); color: var(--on-accent); font-weight: 700; }
.chip[data-state='more']:hover { background: var(--accent-strong); }
.chip[data-state='without'] { background: transparent; border: 1.5px dashed var(--line-strong); color: var(--ink-2); }
.chip[data-state='without'] .chip-text { text-decoration: line-through; }
.chip .ico { width: 16px; height: 16px; }

.segmented { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.segmented button { min-height: 40px; border: 0; border-radius: 6px; background: var(--raised); font-size: 14px; }
.segmented button:hover { background: var(--line); }
.segmented button[aria-checked='true'] { background: var(--accent); color: var(--on-accent); font-weight: 700; }
.service-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.service { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 6px 8px; border: 0; border-radius: 6px; background: var(--raised); text-align: left; font-size: 13px; line-height: 1.2; }
.service:hover { background: var(--line); }
.service img, .service .noimg { width: 26px; height: 26px; border-radius: 4px; flex: none; background: var(--line); }
.service .check { display: none; width: 18px; height: 18px; margin-left: auto; color: var(--on-accent); flex: none; }
.service[aria-pressed='true'] { background: var(--accent); color: var(--on-accent); font-weight: 700; }
.service[aria-pressed='true'] .check { display: inline-flex; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); cursor: pointer; }
.switch-row:last-of-type { border-bottom: 1px solid var(--line); }
.switch-label { display: block; font-weight: 700; font-size: 14px; }
.switch-hint { display: block; font-size: 12px; color: var(--ink-3); }
.switch-row input { appearance: none; width: 40px; height: 24px; border-radius: 4px; background: var(--line-strong); position: relative; flex: none; cursor: pointer; transition: background-color 150ms var(--ease); }
.switch-row input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 2px; background: var(--surface); transition: translate 150ms var(--ease); }
.switch-row input:checked { background: var(--accent); }
.switch-row input:checked::after { translate: 16px 0; }

/* ── Results ────────────────────────────────────────────────────────── */
.results { min-width: 0; }
.results-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.summary { flex: 1 1 20rem; min-width: 0; font-family: var(--font-display); font-weight: 800; font-size: 40px; line-height: 1; letter-spacing: -0.02em; }
.summary .num { font-family: var(--font-display); }
.shelf { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 20px; row-gap: 40px; transition: opacity 150ms var(--ease); }
.shelf[aria-busy='true'] { opacity: 0.55; }
@media (min-width: 1280px) { .shelf { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.cell { display: grid; grid-row: span 4; grid-template-rows: subgrid; row-gap: 0; }

.card { display: grid; grid-row: span 4; grid-template-rows: subgrid; row-gap: 0; position: relative; }
.cover { position: relative; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: var(--raised); outline-offset: 3px; transition: translate 200ms var(--ease); }
.cover img { width: 100%; height: 100%; object-fit: cover; }
/* No still: the poster, framed on its upper part */
.cover img.poster-fallback { object-position: center 22%; }
.card:has(.open:hover) .cover { outline-color: var(--accent); }
.cover .noart { display: grid; place-items: end start; height: 100%; padding: 12px; font-family: var(--font-display); font-weight: 800; font-size: 25px; line-height: 1; }
.card:has(.open:hover) .cover { outline: 2px solid var(--line-strong); translate: 0 -2px; }
.card:has(.open:focus-visible) .cover { outline: 3px solid var(--focus); translate: 0 -2px; }
.cover { cursor: pointer; }
.card:has(.cover:hover) .cover { outline: 2px solid var(--line-strong); translate: 0 -2px; }
.card:has(.cover:hover) .open { text-decoration: underline; }
.cover-tags { position: absolute; top: 8px; left: 8px; right: 8px; display: flex; flex-wrap: wrap; gap: 6px; pointer-events: none; }
.cover-tag { padding: 2px 6px; border-radius: 4px; background: color-mix(in srgb, var(--canvas) 90%, transparent); color: var(--ink); font-size: 12px; font-weight: 700; }
.match-tag { color: var(--accent); }

.info { display: flex; flex-direction: column; gap: 6px; padding-top: 14px; min-width: 0; }
/* The title sits on the still: positioned from the info row up over the bottom of the cover */
.info { position: relative; }
.title { position: absolute; left: 0; right: 0; bottom: 100%; margin: 0; padding: 30px 14px 12px; background: var(--still-scrim); border-radius: 0 0 10px 10px; color: #fff; font-family: var(--font-display); font-weight: 800; font-size: 25px; line-height: 1.02; letter-spacing: -0.015em; }
.open { padding: 0; border: 0; background: none; text-align: left; font: inherit; color: inherit; text-transform: inherit; letter-spacing: inherit; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.open::after { content: ''; position: absolute; inset: 0; z-index: 0; }
.open:hover, .open:focus-visible { text-decoration: underline; }
.open:focus-visible { outline: none; color: var(--accent); }
.meta { margin: 0; font-size: 13px; color: var(--ink-3); }
.reason { margin: 0; font-size: 14px; line-height: 1.4; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; text-wrap: wrap; }
.stats { margin: auto 0 0; padding: 8px 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stats > div { padding: 0 8px; border-left: 1px solid var(--line); }
.stats > div:first-child { padding-left: 0; border-left: 0; }
.stats dt { font-family: var(--font-body); font-weight: 700; font-size: 11.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stats dd { margin: 2px 0 0; font-family: var(--font-display); font-size: 19px; font-weight: 700; line-height: 1.1; white-space: nowrap; }
.stats dd.pos { color: var(--positive); }
.stats dd.unknown { color: var(--ink-3); }


.access { padding: 12px 0 10px; display: grid; gap: 6px; align-content: start; }
.access-figure { font-family: var(--font-display); font-weight: 800; font-size: 22px; line-height: 1; letter-spacing: 0.02em; text-transform: uppercase; }
.access-figure.free { color: var(--free); }
.access-figure.muted { font-size: 19px; color: var(--ink-3); }
.access-note { margin: 0; display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); min-height: 24px; min-width: 0; }
.access-note img { width: 22px; height: 22px; border-radius: 4px; flex: none; }
.access-note .txt { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink); font-weight: 700; }
.access-note .how { color: var(--ink-3); font-weight: 400; }
.access-note .more-svc { flex: none; padding: 1px 6px; border-radius: 4px; background: var(--raised); color: var(--ink-2); font-size: 12px; font-weight: 700; }

.actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border-radius: 6px; overflow: hidden; position: relative; z-index: 1; align-self: start; }
.act { display: grid; justify-items: center; gap: 4px; min-height: 56px; padding: 8px 2px; border: 0; background: var(--surface); color: var(--ink-2); font-size: 12px; font-weight: 700; }
.act:hover { background: var(--raised); color: var(--ink); }
.act[aria-pressed='true'] { background: var(--ink); color: var(--canvas); }
.act:focus-visible { outline-offset: -3px; }
.act .ico.down { rotate: 180deg; }

/* ── View switch and list view ──────────────────────────────────────── */
/* The tools stay on one line; when the title needs the room they move below it together. */
.results-tools { display: flex; justify-content: flex-end; align-items: center; gap: 8px; flex: none; margin-left: auto; }
.sort-menu { position: relative; }
.sort-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 0 10px 0 12px; border: 0; border-radius: 8px; background: var(--raised); color: var(--ink); font-size: 13px; font-weight: 700; }
.sort-btn:hover { background: var(--line); }
.sort-btn .sort-label { color: var(--ink-3); font-weight: 700; }
.sort-btn .chev { width: 16px; height: 16px; color: var(--ink-2); transition: rotate 150ms var(--ease); }
.sort-btn[aria-expanded='true'] .chev { rotate: 180deg; }
.sort-list { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; width: 240px; margin: 0; padding: 6px; list-style: none; border-radius: 8px; background: var(--surface); box-shadow: var(--shadow-pop); outline: none; }
.sort-list li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 6px; cursor: pointer; }
.sort-list li:hover, .sort-list li.active { background: var(--raised); }
.sort-list:focus-visible li.active { outline: 2px solid var(--focus); outline-offset: -2px; }
.sort-opt { display: grid; flex: 1; }
.sort-opt-label { font-size: 14px; font-weight: 700; color: var(--ink); }
.sort-opt-desc { font-size: 12px; color: var(--ink-3); }
.sort-list .tick { width: 18px; height: 18px; color: var(--accent); }
.sort-hint { margin: -12px 0 16px; }
.view-switch { display: inline-flex; gap: 2px; padding: 3px; border-radius: 8px; background: var(--raised); }
.view-switch button { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 10px; border: 0; border-radius: 6px; background: none; color: var(--ink-2); font-size: 13px; font-weight: 700; position: relative; }
.view-switch button::after { content: ''; position: absolute; inset: -6px 0; }
.view-switch button:hover { color: var(--ink); }
.view-switch button[aria-pressed='true'] { background: var(--accent); color: var(--on-accent); }

.rows { list-style: none; margin: 0; padding: 0; transition: opacity 150ms var(--ease); }
.rows[aria-busy='true'] { opacity: 0.55; }
/* Wide: one line per title, columns aligned under a header */
.row-card, .row-head { display: grid; grid-template-columns: 28px 160px minmax(0, 1fr) 64px 64px 80px 220px 124px; align-items: center; column-gap: 16px; }
.row-head { padding: 0 0 10px; border-bottom: 1px solid var(--line); font-size: 11.5px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); }
.row { border-bottom: 1px solid var(--line); }
.row-card { position: relative; padding: 12px 0; }
.row-card:has(.open:hover) { background: color-mix(in srgb, var(--raised) 45%, transparent); }
.row-card:has(.open:hover) .row-still, .row-card:has(.open:focus-visible) .row-still { outline: 2px solid var(--accent); outline-offset: 2px; }
.row-rank { font-family: var(--font-display); font-weight: 800; font-size: 19px; color: var(--ink-3); text-align: right; }
.row-still { width: 160px; aspect-ratio: 16 / 9; border-radius: 6px; overflow: hidden; background: var(--raised); }
.row-still img { width: 100%; height: 100%; object-fit: cover; }
.row-still img.poster-fallback { object-position: center 22%; }
.row-main { min-width: 0; display: grid; gap: 3px; }
.row-title { font-family: var(--font-display); font-weight: 800; font-size: 21px; line-height: 1.05; letter-spacing: -0.01em; }
.row-match { color: var(--accent); }
.row-reason { margin: 0; font-size: 13.5px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-num { text-align: left; }
.row-num .num { font-family: var(--font-display); font-weight: 700; font-size: 19px; white-space: nowrap; }
.row-num .num.pos { color: var(--positive); }
.row-num .num.unknown { color: var(--ink-3); }
.row-num-label { display: none; }
.row-access { display: grid; gap: 4px; min-width: 0; }
.row-access .access-figure { font-size: 17px; }
.row-actions { display: flex; justify-content: flex-end; gap: 4px; position: relative; z-index: 1; }
.ibtn { width: 36px; height: 36px; flex: none; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 6px; background: none; color: var(--ink-3); position: relative; }
.ibtn::after { content: ''; position: absolute; inset: -4px; }
.ibtn:hover { background: var(--raised); color: var(--ink); }
.ibtn[aria-pressed='true'] { background: var(--ink); color: var(--canvas); }

/* Wide: the facts wrapper dissolves so its cells are the table's columns */
.row-facts { display: contents; }
/* Medium: title block on the first line, one line of facts under it */
@media (max-width: 1279px) {
  .row-head { display: none; }
  .row-card { grid-template-columns: 24px 136px minmax(0, 1fr) auto; grid-template-areas: 'rank still main actions' 'rank still facts facts'; row-gap: 10px; align-items: start; }
  .row-rank { grid-area: rank; padding-top: 4px; }
  .row-still { grid-area: still; width: 136px; }
  .row-main { grid-area: main; }
  .row-actions { grid-area: actions; }
  .row-facts { grid-area: facts; display: flex; flex-wrap: wrap; align-items: end; gap: 8px 24px; min-width: 0; }
  .row-num-label { display: block; font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); }
  .row-access { flex: 1 1 180px; }
}
/* Phone: still and title, then the facts, then the actions */
@media (max-width: 639px) {
  .results-head { flex-direction: column; }
  .row-card { grid-template-columns: 96px minmax(0, 1fr) auto; grid-template-areas: 'still main main' 'facts facts actions'; column-gap: 12px; }
  .row-rank { display: none; }
  .row-still { width: 96px; }
  .row-title { font-size: 18px; }
  .row-reason { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .row-facts { gap: 8px 16px; }
  .row-access { flex-basis: 100%; }
  .row-actions { align-self: end; gap: 0; margin-right: -6px; }
}

.more-row { display: flex; align-items: center; gap: 16px; margin-top: 40px; }
.empty-shelf { border-top: 1px solid var(--line); padding-top: 24px; display: grid; gap: 12px; }
.empty-shelf .drops { display: flex; flex-wrap: wrap; gap: 8px; }

/* ── Phone: horizontal cards (New Game+'s < 640 layout) ─────────────── */
@media (max-width: 639px) {
  main { padding: 0 16px; }
  .site-header { padding: 10px 16px; }
  .header-search { order: 3; flex-basis: 100%; max-width: none; margin-left: 0; }
  .proto-tag { display: none; }
  .summary { flex: none; font-size: 34px; }
  .results-head { flex-direction: column; }
  .results-tools { flex-wrap: wrap; justify-content: flex-start; margin-left: 0; }
  .sort-list { left: 0; right: auto; }
  .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-right: -16px; padding-right: 16px; }
  .chip { flex: none; }
  .shelf { grid-template-columns: minmax(0, 1fr); row-gap: 28px; }
  .title { font-size: 23px; }
}

/* Trailer: one 16:9 frame; a poster button until played */
.trailer-frame { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 6px; overflow: hidden; background: var(--raised); border: 0; padding: 0; display: block; }
.trailer-frame.skeleton { animation: pulse 1.4s ease-in-out infinite alternate; }
@keyframes pulse { to { opacity: 0.55; } }
.trailer-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.trailer-poster img { width: 100%; height: 100%; object-fit: cover; }
.play-pill { position: absolute; left: 12px; bottom: 12px; display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 6px; background: var(--accent); color: var(--on-accent); font-weight: 700; }
.trailer-poster:hover .play-pill { background: var(--accent-strong); }

/* ── Drawer and dialog ──────────────────────────────────────────────── */
dialog { color: var(--ink); background: var(--surface); border: 0; padding: 0; }
dialog::backdrop { background: var(--scrim); }
/* max-width: none undoes the browser's default dialog cap, so the panel is full width on phones */
.drawer { margin: 0 0 0 auto; height: 100dvh; max-height: none; max-width: none; width: min(560px, 100vw); border-radius: 10px 0 0 10px; overflow: auto; }
.drawer[open] { animation: drawer-in 250ms var(--ease); }
@keyframes drawer-in { from { opacity: 0; transform: translateX(24px); } }
.drawer-inner { padding: 20px 24px 32px; display: grid; gap: 20px; }
.drawer-top { display: grid; grid-template-columns: 120px minmax(0, 1fr) 44px; gap: 16px; align-items: start; }
.drawer-top img, .drawer-top .noimg { width: 120px; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 6px; background: var(--raised); }
.drawer-title { font-family: var(--font-display); font-weight: 800; font-size: 34px; line-height: 0.95; }
.drawer-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.good-match { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-3); }
/* "Good match?" in the drawer: thumbs, then "What's off?" after a thumbs-down (New Game+'s D-118). */
.match-block { display: grid; gap: 10px; }
.ico.down { rotate: 180deg; }
.whats-off { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.whats-off .hint { color: var(--ink-2); }
.off-options { display: flex; flex-wrap: wrap; gap: 6px; }
.match-block .btn[aria-pressed='true'] { background: var(--ink); color: var(--canvas); }
.leave-out { justify-self: start; }
.note-form { display: flex; flex-wrap: wrap; gap: 8px; }
.note-input { flex: 1 1 200px; min-width: 0; min-height: 38px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--surface); color: var(--ink); font: inherit; font-size: 15px; }
.vote-status:empty { display: none; }

/* Feedback dialog (footer → Feedback; New Game+'s D-115). */
.feedback-dialog { width: min(520px, calc(100vw - 32px)); }
.feedback-form { display: grid; gap: 14px; }
.feedback-form label { display: grid; gap: 6px; font-size: 14px; font-weight: 700; }
.feedback-form label .opt { font-weight: 400; color: var(--ink-2); }
.feedback-form textarea, .feedback-form input[type='email'] { width: 100%; min-width: 0; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--surface); color: var(--ink); font: inherit; font-size: 15px; }
.feedback-form textarea { resize: vertical; line-height: 1.4; }
.feedback-form .trap { position: absolute; left: -9999px; width: 0; height: 0; opacity: 0; }
.feedback-status:empty { display: none; }
.footer-links button { padding: 0; border: 0; background: none; color: var(--ink-2); font: inherit; cursor: pointer; }
.footer-links button:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }
@media (max-width: 639px) { .footer-links button { display: inline-flex; align-items: center; min-height: 44px; } }
.d-section { display: grid; gap: 10px; }
.d-section p { margin: 0; color: var(--ink-2); }
.credits { margin: 0; display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 16px; font-size: 14px; }
.credits dt { color: var(--ink-3); }
.credits dd { margin: 0; }
.dialog { width: min(760px, calc(100vw - 32px)); border-radius: 10px; padding: 20px 24px 24px; }
.dialog[open] { display: grid; gap: 16px; animation: fade-in 200ms var(--ease); }
@keyframes fade-in { from { opacity: 0; } }
.dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.dialog-title { font-family: var(--font-display); font-weight: 800; font-size: 34px; line-height: 0.95; }
.blind-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.blind-cols ol { margin: 10px 0 0; padding-left: 22px; display: grid; gap: 6px; }
.blind-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.blind-reveal { margin: 0; padding: 12px 14px; border-radius: 6px; background: var(--raised); }

/* ── Info pages: About and sources, Privacy, Terms ───────────────────── */
.doc { max-width: 720px; padding: 56px 0 72px; }
.doc h1 { margin: 0; font-family: var(--font-display); font-weight: 800; font-size: clamp(40px, 5vw, 56px); line-height: 1; letter-spacing: -0.025em; }
.doc .lead { margin: 16px 0 0; font-size: 18px; line-height: 1.5; color: var(--ink-2); }
.doc .updated { margin: 10px 0 0; font-size: 13px; color: var(--ink-3); }
.doc .cta { margin: 24px 0 0; }
.doc a.btn { text-decoration: none; }
.doc h2 { margin: 44px 0 12px; font-family: var(--font-display); font-weight: 800; font-size: 24px; line-height: 1.1; letter-spacing: -0.01em; }
.doc p, .doc li { font-size: 16px; line-height: 1.6; color: var(--ink-2); }
.doc p { margin: 0 0 12px; }
.doc ul { display: grid; gap: 8px; margin: 0 0 12px; padding-left: 20px; }
.doc a:not(.btn) { color: var(--ink); text-underline-offset: 3px; }
.sources { display: grid; gap: 16px; margin: 0 0 16px; }
.sources > div { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 4px 20px; align-items: baseline; }
.sources dt { font-weight: 700; color: var(--ink); }
.sources dd { margin: 0; font-size: 16px; line-height: 1.55; color: var(--ink-2); }
.sources .tmdb-logo { display: block; height: 12px; width: auto; }
@media (max-width: 639px) { .doc { padding: 36px 0 56px; } .sources > div { grid-template-columns: minmax(0, 1fr); } }

/* ── Owner page (New Game+'s D-119) ─────────────────────────────────── */
.doc.owner { max-width: 960px; }
.owner-catalog { margin: 8px 0 8px; padding: 12px 16px; border-radius: 8px; background: var(--surface); }
.doc.owner .owner-catalog p { margin: 0; }
.doc.owner .owner-warn { margin-top: 6px; color: var(--accent); font-weight: 700; }
.owner-signout { margin-left: auto; }
.owner-login { display: grid; gap: 8px; max-width: 420px; margin-top: 24px; }
.owner-login label { font-weight: 700; }
.owner-login-row { display: flex; gap: 8px; }
.owner-login input { flex: 1; min-width: 0; min-height: 44px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--surface); color: var(--ink); font: inherit; }
.owner-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.owner-tabs button { min-height: 36px; padding: 0 12px; border: 0; border-radius: 6px; background: var(--raised); color: var(--ink-2); font-weight: 700; font-size: 14px; }
.owner-tabs button[aria-selected='true'] { background: var(--ink); color: var(--canvas); }
.owner-inbox, .owner-notes { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.owner-item { padding: 14px 16px; border-radius: 8px; background: var(--surface); display: grid; gap: 8px; }
.owner-item p { margin: 0; }
.doc.owner .owner-message { white-space: pre-wrap; color: var(--ink); }
.owner-status { text-transform: uppercase; letter-spacing: 0.06em; font-size: 11px; font-weight: 700; }
.owner-status.s-new { color: var(--accent); }
.owner-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.owner-actions .btn[aria-pressed='true'] { background: var(--ink); color: var(--canvas); }
.owner-delete { margin-left: auto; }
.owner-rates { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 28px; }
.owner-rate { padding: 14px 16px; border-radius: 8px; background: var(--surface); }
.owner-rate p { margin: 0; }
.doc.owner .owner-figure { font-family: var(--font-display); font-weight: 800; font-size: 40px; line-height: 1.1; color: var(--ink); }
.doc.owner h3 { margin: 28px 0 10px; }
.owner-weeks { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 8px; align-items: end; }
.owner-week { display: grid; gap: 4px; justify-items: center; }
.owner-bar { display: flex; align-items: flex-end; width: 100%; height: 120px; border-radius: 4px; background: var(--surface); overflow: hidden; }
.owner-bar > span { display: flex; align-items: flex-end; width: 100%; background: var(--line-strong); }
.owner-bar-up { width: 100%; background: var(--accent); }
.owner-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.owner-table th, .owner-table td { padding: 8px 6px; border-bottom: 1px solid var(--line); text-align: left; }
.owner-table th { color: var(--ink-3); font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; }
.owner-table .num { text-align: right; }
.owner-notes li { padding: 10px 14px; border-radius: 8px; background: var(--surface); }
.owner-notes p { margin: 0; }
@media (max-width: 639px) { .owner-rates { grid-template-columns: minmax(0, 1fr); } .doc.owner .owner-figure { font-size: 32px; } }

/* One or two quiet lines: TMDB's logo and required notice, then the info pages. */
.site-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 24px; padding: 16px 32px; border-top: 1px solid var(--line); font-size: 12px; line-height: 1.4; color: var(--ink-3); }
.footer-credit { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: 0; }
/* TMDB's logo at the smallest size that stays readable (9px tall), well below our own marks as its terms ask. */
.tmdb-mark { display: inline-flex; flex: none; }
.tmdb-mark img { display: block; height: 9px; width: auto; }
.footer-links { display: flex; flex-wrap: wrap; align-items: center; gap: 0 16px; }
.footer-links a { color: var(--ink-2); text-decoration: none; }
.footer-links a:hover, .footer-links a[aria-current='page'] { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }
@media (max-width: 639px) { .site-footer { padding: 12px 16px 16px; } .footer-links a { display: inline-flex; align-items: center; min-height: 44px; } }

/* ── Where to watch (details panel): one row per service ──────────────── */
.w-logo { border-radius: 6px; object-fit: cover; flex: none; background: var(--line); display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: var(--ink-2); }
.wt { width: 100%; border-collapse: collapse; font-size: 14px; table-layout: fixed; }
.wt thead th:not(:first-child) { width: 56px; }
.wt th, .wt td { padding: 8px 6px; border-bottom: 1px solid var(--line); }
.wt thead th { font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); text-align: center; padding-top: 0; }
.wt thead th:first-child { text-align: left; }
.wt thead th.free { color: var(--free); }
.wt tbody th { text-align: left; font-weight: 700; }
.wt-svc { display: inline-flex; align-items: center; gap: 10px; }
.wt-svc .w-logo { width: 26px; height: 26px; }
.wt-yours { padding: 1px 6px; border-radius: 4px; background: var(--free); color: var(--canvas); font-size: 11px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; }
.wt td { text-align: center; width: 56px; color: var(--ink); }
.wt td.free { color: var(--free); }
.wt td .ico { width: 18px; height: 18px; }
.wt-no { color: var(--line-strong); }
.wt-svc { min-width: 0; }
.wt-name { min-width: 0; }
.wt-yours { display: inline-block; margin-left: 8px; white-space: nowrap; vertical-align: 1px; }
@media (max-width: 639px) {
  .drawer-inner { padding: 16px 16px 28px; }
  .wt thead th:not(:first-child) { width: 44px; }
  .wt th, .wt td { padding: 8px 2px; }
  .wt thead th { font-size: 10px; letter-spacing: 0.06em; }
  .wt-svc { gap: 8px; }
  .wt-svc .w-logo { width: 22px; height: 22px; }
  .wt-yours { font-size: 10px; padding: 1px 4px; }
}

/* ── Filters (concept A: set once) ─────────────────────────────────── */
#filters { display: grid; gap: 22px; }
.fc-block { display: grid; gap: 10px; }
.fc-head { display: flex; align-items: center; justify-content: space-between; }
.fc-head .text-btn { padding: 0; }
.segmented.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.segmented.four button { font-size: 12.5px; padding: 0 2px; }
.segmented.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.segmented.three button { font-size: 12.5px; padding: 0 2px; }
.svc-logo { width: 32px; height: 32px; border-radius: 6px; object-fit: cover; flex: none; background: var(--line); display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: var(--ink-2); }
.logo-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 8px; border: 0; border-radius: 8px; background: var(--surface); text-align: left; }
.logo-row:hover { background: var(--raised); }
.logo-row .more-svc, .lib-tag { padding: 2px 6px; border-radius: 4px; background: var(--raised); color: var(--ink-2); font-size: 12px; font-weight: 700; }

/* Services picker */
.picker { width: min(720px, calc(100vw - 32px)); max-height: min(86vh, 900px); }
.picker[open] { display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; }
.pick-body { overflow: auto; display: grid; gap: 22px; padding: 4px 2px; align-content: start; }
.pick-section { display: grid; gap: 10px; }
.pick-section .service .svc-logo { width: 26px; height: 26px; }
.service .svc-text { display: grid; min-width: 0; }
.service .svc-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.service .svc-count { font-size: 11.5px; font-weight: 400; color: var(--ink-3); }
.service[aria-pressed='true'] .svc-count { color: inherit; opacity: 0.8; }
.pick-more { padding-top: 4px; }
.pick-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.service-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 639px) { .service-grid.three { grid-template-columns: repeat(2, minmax(0, 1fr)); } }


@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
