/* ==========================================================================
   Horrorverse — design system (loaded last)
   One typeface (Geist, served from /app/fonts), a cool near-black palette with one
   red accent, eight text styles. The older stylesheets read the same tokens through
   the remapped names below, so every screen shares type and colour; components that
   were rebuilt (header, home, lineup cards) are styled here in full.
   ========================================================================== */

@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/app/fonts/geist-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/app/fonts/geist-latin-ext-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* 1. Tokens ---------------------------------------------------------------- */
:root {
  --bg: #0a0b0d;
  --bg-1: #111317;
  --bg-2: #171a1f;
  --bg-3: #1f232a;
  --hairline: #ffffff12;
  --hairline-2: #ffffff22;
  --text: #f3f4f6;
  --text-2: #a8adb7;
  --text-3: #767c88;
  --red: #e5484d;
  --red-2: #f2555a;
  --star: #f5c451;

  --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  /* Eight text styles. */
  --t-hero: 600 clamp(28px, 3.4vw, 44px)/1.08 var(--font);
  --t-h2: 600 20px/1.25 var(--font);
  --t-h3: 600 17px/1.25 var(--font);
  --t-input: 400 18px/1.45 var(--font);
  --t-body: 400 15px/1.55 var(--font);
  --t-ui: 500 14px/1.2 var(--font);
  --t-meta: 400 13px/1.4 var(--font);
  --t-label: 600 11px/1 var(--font);

  --r-s: 6px;
  --r-m: 10px;
  --r-l: 16px;

  /* The older stylesheets' names, pointed at the same palette and type. */
  --canvas: var(--bg);
  --surface: var(--bg-1);
  --surface-strong: var(--bg-2);
  --sunken: #08090b;
  --raised: var(--bg-2);
  --raised-hover: var(--bg-3);
  --sheet: var(--bg-1);
  --popover: var(--bg-2);
  --card: var(--bg-1);
  --white: #0d0f12;
  --ink: var(--text);
  --ink-soft: #d5d8de;
  --muted: var(--text-2);
  --fog: var(--text-3);
  --line: #262a31;
  --line-soft: var(--hairline);
  --line-strong: #353a43;
  --accent: var(--red);
  --accent-soft: #e5484d26;
  --blood: var(--red);
  --blood-hover: var(--red-2);
  --on-blood: #fff;
  --gold: var(--star);
  --orange: var(--red);
  --blue: #9aa4b5;
  --font-display: var(--font);
  --font-ui: var(--font);
  --font-mono: var(--font);
  --radius: var(--r-m);
  --radius-s: var(--r-s);
  --radius-m: var(--r-m);
  --radius-l: var(--r-l);
}

/* 2. Base: one typeface everywhere ------------------------------------------- */
html, body { background: var(--bg); }
body { color: var(--text); font: var(--t-body); font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased; }
html body *, html body *::before, html body *::after { font-family: var(--font) !important; }
h1, h2, h3, h4 { letter-spacing: -.015em; }
.kicker, .eyebrow { font: var(--t-label); letter-spacing: .08em; text-transform: uppercase; color: var(--text-2); }
.ui-icon { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.star-icon { width: 11px; height: 11px; flex: none; fill: var(--star); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; min-height: 36px; padding: 0 14px; border: 1px solid var(--hairline-2); border-radius: var(--r-s); background: transparent; color: var(--text); font: var(--t-ui); white-space: nowrap; }
.btn:hover:not(:disabled) { background: var(--bg-2); transform: none; }
.inline-link { color: var(--text); text-decoration: underline; text-decoration-color: var(--text-3); text-underline-offset: 3px; }

/* 3. Header -------------------------------------------------------------------- */
.app-nav { height: 60px; min-height: 60px; border-bottom: 1px solid var(--hairline); background: #0a0b0de6; }
.brand { gap: 9px; color: var(--text); font: 650 16px/1 var(--font); letter-spacing: -.02em; text-transform: none; }
.brand:hover { color: var(--text); }
.brand-mark { width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid var(--red); border-right-color: transparent; background: none; transform: rotate(-30deg); box-shadow: none; }
.route-tabs { gap: 2px; }
.route-tabs a { min-height: 36px; height: 36px; padding: 0 12px; border-radius: var(--r-s); color: var(--text-2); font: var(--t-ui); }
.route-tabs a:hover { background: var(--bg-2); color: var(--text); }
.route-tabs a.active { color: var(--text); background: transparent; }
.route-tabs a.active::after { display: none; }
.nav-personal button { min-height: 36px; height: 36px; border-radius: var(--r-s); font: var(--t-ui); }
.nav-personal button:hover, .nav-personal button:focus { background: var(--bg-2); color: var(--text); }
/* Signed out: a solid "Sign in" button; signed in: the name, quietly. */
body:not(.signed-in) .nav-personal #account-open { background: var(--text); color: var(--bg); border-color: transparent; padding: 0 14px; font-weight: 600; }
body:not(.signed-in) .nav-personal #account-open:hover { background: #fff; }
.nav-personal #account-open .account-nav-label { padding: 0; border: 0; background: none; color: inherit; }

/* 4. Home: the question ---------------------------------------------------------- */
.ask { padding: 64px 0 8px; text-align: center; }
.ask h1 { margin: 0 0 8px; font: var(--t-hero); letter-spacing: -.035em; text-wrap: balance; }
.ask-sub { margin: 0 auto 26px; max-width: 640px; color: var(--text-2); font: var(--t-body); text-wrap: balance; }
.command-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.prompt { max-width: 780px; margin: 0 auto; text-align: left; border: 1px solid var(--hairline-2); border-radius: 18px; background: var(--bg-1); box-shadow: 0 24px 60px -30px #000, 0 0 0 4px #e5484d0d; }
.prompt:focus-within { border-color: #e5484d80; }
.prompt-input { position: relative; }
.prompt-input textarea, .prompt-input textarea:focus { display: block; width: 100%; height: auto; min-height: 64px; max-height: 172px; padding: 20px 52px 8px 20px; border: 0; outline: 0; border-radius: 18px 18px 0 0; background: transparent; box-shadow: none; color: var(--text); font: var(--t-input); resize: none; overflow-y: auto; scrollbar-width: thin; }
.prompt-input textarea::placeholder { color: var(--text-3); }
.prompt-input .query-clear { position: absolute; top: 14px; right: 12px; width: 32px; height: 32px; min-height: 32px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--text-3); font-size: 20px; }
.prompt-input .query-clear:hover { background: var(--bg-3); color: var(--text); }
.prompt-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 10px 10px 14px; }
.seg { display: inline-flex; gap: 0; padding: 3px; border: 0; border-radius: 8px; background: var(--bg-3); }
.seg button { height: 28px; min-height: 28px; padding: 0 12px; border: 0; border-radius: 6px; background: transparent; color: var(--text-2); font: 500 13px/1 var(--font); box-shadow: none; }
.seg button.active { background: var(--bg-1); color: var(--text); box-shadow: 0 1px 2px #0008; }
.pill, .composer-options #filter-toggle.pill { height: 30px; min-height: 30px; padding: 0 12px; display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--hairline-2); border-radius: 999px; background: transparent; color: var(--text-2); font: 500 13px/1 var(--font); white-space: nowrap; }
.pill:hover:not(:disabled) { background: var(--bg-2); color: var(--text); transform: none; }
.pill[aria-expanded="true"] { color: var(--text); border-color: #e5484d66; background: #e5484d14; }
.go, #night-search.go { margin-left: auto; width: auto; height: 40px; min-height: 40px; padding: 0 16px; display: inline-flex; align-items: center; gap: 8px; border: 0; border-radius: var(--r-m); background: var(--red); color: #fff; font: 600 14px/1 var(--font); box-shadow: none; }
.go:hover:not(:disabled) { background: var(--red-2); transform: none; }
.prompt .filter-row { padding: 0 14px 12px; }
.examples { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; max-width: 900px; margin: 18px auto 0; }
.example { height: 32px; min-height: 32px; padding: 0 13px; border: 1px solid var(--hairline); border-radius: 999px; background: var(--bg-1); color: var(--text-2); font: var(--t-meta); }
.example:hover { border-color: var(--hairline-2); background: var(--bg-1); color: var(--text); transform: none; }

/* 5. Home: sections ---------------------------------------------------------------- */
.night-page:not(.has-programme) .discovery, .discovery { padding-top: 40px; }
.section-head { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 16px; }
.section-head > div { min-width: 0; }
.section-head h2 { margin: 0; font: var(--t-h2); }
.section-head p { margin: 4px 0 0; color: var(--text-3); font: var(--t-meta); }
.section-head > .btn { margin-left: auto; }
.feed-loading, .feed-error { color: var(--text-2); font: var(--t-meta); }

/* Today's three picks */
.top-pick-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.top-pick { min-width: 0; display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--hairline); border-radius: var(--r-l); background: var(--bg-1); }
.top-pick-still { position: relative; display: block; aspect-ratio: 16 / 8; width: 100%; min-height: 0; padding: 0; border: 0; border-radius: 0; background: var(--bg-3); overflow: hidden; }
.top-pick-still img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.top-pick:hover .top-pick-still img { transform: scale(1.03); }
.top-pick .top-pick-still img.poster-still, .night-lineup:not(.single-lineup) .night-art-backdrop.poster-still { opacity: .55; filter: blur(16px) saturate(1.1); transform: scale(1.3); }
.top-pick-still::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, var(--bg-1), transparent 60%); }
.top-pick-num { position: absolute; z-index: 1; top: 12px; left: 12px; padding: 4px 8px; border-radius: var(--r-s); background: #000a; backdrop-filter: blur(6px); color: var(--text); font: var(--t-label); letter-spacing: .06em; text-transform: uppercase; }
.top-pick-body { position: relative; z-index: 1; flex: 1; display: grid; grid-template-columns: 64px minmax(0, 1fr); grid-template-rows: auto auto 1fr; gap: 0 14px; margin-top: -44px; padding: 0 18px 18px; }
.top-pick-poster { grid-row: 1 / span 2; width: 64px; min-height: 0; aspect-ratio: 2 / 3; padding: 0; border: 0; border-radius: var(--r-s); overflow: hidden; background: var(--bg-3); box-shadow: 0 0 0 1px var(--hairline-2), 0 10px 20px #0009; }
.top-pick-poster img { width: 100%; height: 100%; object-fit: cover; }
.top-pick-head { min-width: 0; padding-top: 30px; }
.top-pick-head h3 { margin: 0 0 4px; font: var(--t-h3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-pick-head h3 button, .film-card h3 button { display: block; max-width: 100%; min-height: 0; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-pick-head h3 button:hover, .film-card h3 button:hover { color: var(--text); text-decoration: underline; text-underline-offset: 3px; transform: none; }
.film-facts-line { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 10px; margin: 0; color: var(--text-2); font: var(--t-meta); }
/* Rating and facts stay on one line; on a narrow card only the countries are cut short. */
.film-facts-line:has(> .facts-meta) { flex-wrap: nowrap; }
.film-facts-line > .rating-inline { flex: none; }
.facts-meta { display: flex; min-width: 0; white-space: nowrap; }
.facts-meta > * { flex: none; }
.facts-meta > i { font-style: normal; white-space: pre; }
.facts-meta > .facts-countries { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.rating-inline { display: inline-flex; align-items: center; gap: 3px; color: var(--text); font-weight: 600; }
.top-pick-why { grid-column: 1 / -1; align-self: start; margin: 14px 0 0; padding: 10px 12px; border-radius: var(--r-m); background: var(--bg-2); color: var(--text-2); font: var(--t-meta); }
.top-pick-story { grid-column: 1 / -1; align-self: start; margin: 14px 0 0; color: var(--text-2); font: var(--t-meta); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.top-pick-actions { grid-column: 1 / -1; align-self: end; display: flex; gap: 8px; margin-top: 14px; }
.top-pick-actions .primary { flex: 1; height: 36px; min-height: 36px; border: 0; border-radius: var(--r-s); background: var(--text); color: var(--bg); font: 600 14px/1 var(--font); }
.top-pick-actions .primary:hover { background: #fff; transform: none; }
.film-tools .save-film, .film-tools .hide-film { width: 36px; min-width: 36px; height: 36px; min-height: 36px; padding: 0; border: 1px solid var(--hairline-2); border-radius: var(--r-s); background: transparent; color: var(--text); }
.film-tools .save-film:hover, .film-tools .hide-film:hover { background: var(--bg-2); border-color: var(--hairline-2); }
.film-tools .save-film.is-saved { border-color: #e5484d99; color: var(--red-2); }

/* Browse tabs and poster grid */
.browse { margin-top: 56px; padding-top: 28px; border-top: 1px solid var(--hairline); }
.browse-head { flex-wrap: wrap; align-items: center; }
.tabs { display: flex; gap: 4px; max-width: 100%; padding: 4px; border: 1px solid var(--hairline); border-radius: var(--r-m); background: var(--bg-1); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { flex: none; height: 32px; min-height: 32px; padding: 0 14px; border: 0; border-radius: 7px; background: transparent; color: var(--text-2); font: var(--t-ui); }
.tabs button:hover { color: var(--text); background: transparent; transform: none; }
.tabs button.on { background: var(--bg-3); color: var(--text); }
.browse-head .browse-note { margin: 0 0 0 auto; }
.film-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 22px 14px; }

/* Poster card */
.film-card { min-width: 0; }
.film-card-art { position: relative; }
.film-card-poster { position: relative; display: block; width: 100%; min-height: 0; aspect-ratio: 2 / 3; padding: 0; border: 0; border-radius: var(--r-s); overflow: hidden; background: var(--bg-2); box-shadow: 0 0 0 1px var(--hairline); }
.film-card-poster img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.film-card-poster .poster-fallback { display: grid; place-items: center; height: 100%; padding: 10px; color: var(--text-2); font: var(--t-meta); text-align: center; }
.film-card:hover .film-card-poster img { transform: scale(1.04); }
.film-card-poster:hover { transform: none; }
.rating-badge { position: absolute; left: 6px; bottom: 6px; display: inline-flex; align-items: center; gap: 3px; padding: 3px 6px; border-radius: 4px; background: #000b; backdrop-filter: blur(6px); color: var(--text); font: 600 11px/1 var(--font); }
.card-quick { position: absolute; top: 6px; right: 6px; display: flex; gap: 4px; opacity: 0; transition: opacity .15s ease; }
.film-card:hover .card-quick, .film-card:focus-within .card-quick, .card-quick:has(.is-saved, .is-hidden) { opacity: 1; }
.card-quick .save-film, .card-quick .hide-film { width: 28px; min-width: 28px; height: 28px; min-height: 28px; border: 0; border-radius: 50%; background: #000b; backdrop-filter: blur(6px); }
.card-quick .save-icon, .card-quick .hide-icon { width: 14px; height: 14px; }
.film-card h3 { margin: 9px 0 2px; font: 500 14px/1.3 var(--font); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.film-card-meta { margin: 0; color: var(--text-3); font: var(--t-meta); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.film-card .home-reason { margin: 4px 0 0; color: var(--text-2); font: var(--t-meta); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Rails */
.rail-section { margin-top: 44px; }
.rail-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px; }
.rail-head h2 { margin: 0; font: var(--t-h3); }
.rail-head > span { color: var(--text-3); font: var(--t-meta); }
.rail-nav { display: flex; gap: 6px; margin-left: auto; align-self: center; }
.rail-nav[hidden] { display: none; }
.rail-nav button { display: grid; place-items: center; width: 30px; height: 30px; min-height: 30px; padding: 0 0 2px; border: 1px solid var(--hairline-2); border-radius: 50%; background: transparent; color: var(--text-2); font-size: 18px; line-height: 1; }
.rail-nav button:hover:not(:disabled) { background: var(--bg-2); color: var(--text); transform: none; }
.rail-nav button:disabled { opacity: .3; }
.film-rail { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 8 * 12px) / 9); gap: 12px; min-width: 0; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none; }
.film-rail::-webkit-scrollbar { display: none; }
.film-rail .film-card { scroll-snap-align: start; }

/* Atlas teaser */
.teasers { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; margin-top: 56px; }
.teaser { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) 180px; align-items: center; gap: 20px; padding: 22px; border: 1px solid var(--hairline); border-radius: var(--r-l); background: var(--bg-1); color: var(--text); text-decoration: none; }
.teaser:hover { border-color: var(--hairline-2); }
.teaser-label { color: var(--red); font: var(--t-label); letter-spacing: .08em; text-transform: uppercase; }
.teaser h3 { margin: 8px 0 6px; font: var(--t-h3); }
.teaser p { margin: 0 0 12px; color: var(--text-2); font: var(--t-meta); }
.teaser-link { font: var(--t-ui); }
.teaser-link::after { content: " →"; color: var(--text-3); }
.teaser-art { width: 100%; height: 110px; border-radius: var(--r-m); background: var(--bg-2); }

/* 6. Movie-night lineup cards: still on top, small poster, facts, story, actions. */
.night-result-bar { border-bottom: 0; }
.night-bar { border-bottom: 1px solid var(--hairline); }
.night-bar h1 { font: 600 clamp(24px, 2.6vw, 32px)/1.15 var(--font); letter-spacing: -.025em; }
.night-chapter > span { color: var(--red); font: var(--t-label); letter-spacing: .06em; }
.night-chapter strong { font: var(--t-label); letter-spacing: .06em; text-transform: uppercase; color: var(--text-2); }
.night-chapter i { background: var(--hairline); }
.night-lineup:not(.single-lineup) .movie-card.night-film { display: flex; flex-direction: column; padding: 0; overflow: hidden; border: 1px solid var(--hairline); border-radius: var(--r-l); background: var(--bg-1); }
.night-lineup:not(.single-lineup) .night-film .night-art { position: relative; display: block; width: 100%; height: auto; aspect-ratio: 16 / 8; padding: 0; overflow: visible; border-radius: 0; background: var(--bg-3); }
.night-lineup:not(.single-lineup) .night-art-backdrop { display: block; position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 1; filter: none; transform: none; }
.night-lineup:not(.single-lineup) .night-art { overflow: hidden; }
.night-lineup:not(.single-lineup) .night-art::after { display: block; background: linear-gradient(0deg, var(--bg-1), transparent 60%); }
.night-lineup:not(.single-lineup) .night-cover { position: absolute; z-index: 2; left: 18px; bottom: -40px; width: 64px; height: 96px; border-radius: var(--r-s); box-shadow: 0 0 0 1px var(--hairline-2), 0 10px 20px #0009; }
.night-lineup:not(.single-lineup) .night-art:hover .night-cover { transform: none; }
.night-lineup:not(.single-lineup) .night-art-hint { display: none; }
.night-lineup:not(.single-lineup) .night-film-content { display: flex; flex-direction: column; flex: 1; padding: 0 18px 18px; }
.night-lineup:not(.single-lineup) .night-film-head { min-height: 56px; padding: 10px 0 0 78px; }
.night-lineup:not(.single-lineup) .night-film-head h2 { font: var(--t-h3); letter-spacing: -.01em; }
.night-lineup:not(.single-lineup) .night-film-head > p { margin-top: 4px; color: var(--text-2); font: var(--t-meta); }
.night-lineup:not(.single-lineup) .night-story-wrap { margin-top: 16px; }
.night-lineup:not(.single-lineup) .night-story { margin: 0; color: var(--text-2); font: var(--t-body); -webkit-line-clamp: 3; }
.night-note { display: flex; align-items: flex-start; gap: 12px; margin: -6px 0 24px; padding: 12px 12px 12px 14px; border: 1px solid var(--hairline); border-radius: var(--r-m); background: var(--bg-1); }
.night-note > .ui-icon { margin-top: 3px; color: var(--red); }
.night-note p { flex: 1; min-width: 0; max-width: 86ch; margin: 0; color: var(--text-2); font: var(--t-body); }
.night-note .btn { flex: none; margin-left: auto; height: 32px; min-height: 32px; }
.night-ask { display: inline-flex; align-items: center; gap: 8px; }
.night-reason > summary { color: var(--text); font: var(--t-meta); }
.night-reason { margin-top: 12px; }
.night-card-actions { gap: 8px; padding-top: 16px; }
.night-card-actions .night-explore { height: 36px; min-height: 36px; border: 0; border-radius: var(--r-s); background: var(--text); color: var(--bg); font: 600 14px/1 var(--font); }
.night-card-actions .night-explore:hover { background: #fff; }
.night-card-actions .night-swap { height: 36px; min-height: 36px; padding: 0 12px; border: 1px solid var(--hairline-2); border-radius: var(--r-s); color: var(--text); font: var(--t-ui); }
.film-menu > summary, .night-card-actions .film-menu > summary { width: 36px; min-width: 36px; height: 36px; min-height: 36px; border-color: var(--hairline-2); border-radius: var(--r-s); }

/* 7. Phone shell: tab bar colours (layout in design.css section 18). */
@media (max-width: 760px) {
  .route-tabs { border-top-color: var(--hairline); background: #0a0b0df2; }
  .route-tabs a { height: 58px; min-height: 58px; padding: 0; border-radius: 0; font: 600 10px/1 var(--font); color: var(--text-3); }
  .route-tabs a:hover { background: transparent; }
  .route-tabs a.active { color: var(--text); }
  .route-tabs a.active .tab-icon { color: var(--red); }
  .app-nav { height: 52px; min-height: 52px; }
  .nav-personal #account-open, body:not(.signed-in) .nav-personal #account-open { width: 36px; min-width: 36px; max-width: 36px; height: 36px; min-height: 36px; padding: 0 !important; border: 1px solid var(--hairline-2); background: transparent; color: var(--text); }
  .nav-personal #account-open .account-nav-icon { display: block; width: 20px; height: 20px; }
}

/* 8. Responsive ------------------------------------------------------------------ */
@media (max-width: 1100px) {
  .film-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .film-rail { grid-auto-columns: calc((100% - 5 * 12px) / 6); }
  .top-pick-row { grid-template-columns: minmax(0, 1fr); }
  .top-pick { display: grid; grid-template-columns: 300px minmax(0, 1fr); }
  .top-pick-still { aspect-ratio: auto; height: 100%; }
  .top-pick-still::after { background: linear-gradient(270deg, var(--bg-1), transparent 50%); }
  .top-pick-body { margin-top: 0; padding: 18px; }
  .top-pick-head { padding-top: 4px; }
  .teaser { grid-template-columns: minmax(0, 1fr); }
  .teaser-art { display: none; }
}
@media (max-width: 760px) {
  .ask { padding: 28px 0 0; }
  .ask h1 { font-size: 26px; }
  .ask-sub { margin-bottom: 18px; font: var(--t-meta); }
  /* Two lines, so the example request reads in full. */
  .prompt-input textarea, .prompt-input textarea:focus { min-height: 70px; padding: 16px 44px 6px 16px; font-size: 16px; }
  .prompt-bar { padding: 10px; }
  .prompt-bar [data-surprise] { width: 30px; padding: 0; justify-content: center; font-size: 0; gap: 0; }
  .prompt-bar [data-surprise] .ui-icon { width: 15px; height: 15px; }
  .section-head:not(.browse-head) { flex-wrap: nowrap; align-items: flex-end; }
  .section-head > .btn { flex: none; }
  .top-pick-row { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 86%; gap: 12px; margin-inline: -16px; padding-inline: 16px; scroll-padding-inline: 16px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .top-pick-row::-webkit-scrollbar { display: none; }
  .top-pick { scroll-snap-align: start; }
  .go, #night-search.go { flex: 1 0 100%; justify-content: center; margin-left: 0; }
  .examples { flex-wrap: nowrap; justify-content: flex-start; margin-inline: -16px; padding-inline: 16px; overflow-x: auto; scrollbar-width: none; }
  .examples::-webkit-scrollbar { display: none; }
  .example { flex: none; }
  .discovery, .night-page:not(.has-programme) .discovery { padding-top: 32px; }
  .section-head { flex-wrap: wrap; }
  .top-pick { display: flex; }
  .top-pick-still { aspect-ratio: 16 / 8; height: auto; }
  .top-pick-still::after { background: linear-gradient(0deg, var(--bg-1), transparent 60%); }
  .top-pick-body { margin-top: -40px; padding: 0 16px 16px; }
  .top-pick-head { padding-top: 26px; }
  .browse { margin-top: 40px; }
  .browse-head .browse-note { display: none; }
  .browse-head .tabs { flex: 1 0 calc(100% + 32px); max-width: none; margin-inline: -16px; padding-inline: 16px; border-inline: 0; border-radius: 0; }
  .film-grid { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 118px; grid-template-rows: auto auto; gap: 18px 10px; margin-inline: -16px; padding-inline: 16px; scroll-padding-inline: 16px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .film-grid::-webkit-scrollbar { display: none; }
  .film-grid .film-card { scroll-snap-align: start; }
  .film-rail { grid-auto-columns: 118px; gap: 10px; margin-inline: -16px; padding-inline: 16px; scroll-padding-inline: 16px; }
  /* A card cut by the right edge fades out: it reads as "more this way", not as clipped. */
  .film-grid, .film-rail { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 24px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 24px), transparent); }
  .rail-section { margin-top: 32px; }
  .rail-head > span { display: none; }
  .card-quick { opacity: 1; }
  .night-note { margin-top: 0; }
  .night-ask { display: none; }
  .teasers { grid-template-columns: minmax(0, 1fr); margin-top: 40px; }
}
@media (hover: none) { .card-quick { opacity: 1; } .rail-nav { display: none; } }
/* Touch screens show the quick actions all the time, so a poster carries only "save";
   "Not for me" is in the film sheet a tap away. */
@media (hover: none), (max-width: 760px) { .card-quick .hide-film:not(.is-hidden) { display: none; } }
.film-grid > [hidden] { display: none; }

/* A rated film is watched by definition: its "Watched" mark is a quiet note, not a
   highlighted button that cannot be pressed. */
.feedback-options .watched-only.active:disabled { opacity: 1; border-color: transparent; background: transparent; color: var(--text-3); }
/* The filter sheet's kicker matches the other dialogs'. */
.tune-head .kicker { margin-bottom: 10px; color: var(--text-2); font: var(--t-label); letter-spacing: .08em; text-transform: uppercase; }
/* A toast is as wide as its message (left: 50% alone would cap it at half the screen). */
.toast { width: max-content; max-width: min(420px, calc(100vw - 32px)); }

/* Star ratings: hovering (or focusing) star N previews N stars, 1 to N. */
.star-rating:has(.rating-star:hover) .rating-star,
.star-rating:has(.rating-star:focus-visible) .rating-star { color: #4b515c !important; }
.star-rating:has(.rating-star:hover) .rating-star:is(:hover, :has(~ .rating-star:hover)),
.star-rating:has(.rating-star:focus-visible) .rating-star:is(:focus-visible, :has(~ .rating-star:focus-visible)) { color: var(--star) !important; }

/* Atlas. */
/* The film panel names the region the film sits in; the name frames it on the map. */
.region-chip {
  display: inline-flex; align-items: center; gap: 7px; min-height: 28px; margin: -4px 0 6px -9px; padding: 0 10px 0 9px;
  border: 1px solid transparent; border-radius: 999px; background: transparent; color: var(--ink-soft);
  font: 500 var(--text-caption)/1 var(--font-ui); cursor: pointer; text-align: left;
}
.region-chip:hover { border-color: var(--line-strong); background: var(--raised); color: var(--ink); transform: none; }
.region-chip .legend-dot { flex-shrink: 0; }
@media (min-width: 761px) {
  /* Key and film count share one line; the starters are one slim row, not a card. */
  .explore-page .map-hud { display: flex; align-items: center; gap: 6px; }
  .explore-page .hud-card { max-width: none; flex-wrap: nowrap; white-space: nowrap; }
  .atlas-starters { display: flex; align-items: center; gap: 16px; width: max-content; max-width: calc(100% - 24px); padding: 4px 18px; bottom: 56px; }
  .atlas-starters > div { flex-wrap: nowrap; }
  .atlas-starters small { display: none; }
}
@media (min-width: 1180px) {
  .atlas-starters { bottom: 12px; max-width: calc(100% - 660px); }
}
@media (max-width: 760px) {
  /* The trail stops short of the three round tools over the map's corner. */
  .atlas-trail { right: 152px; }
  /* The map fills the screen above the tab bar: nothing left to scroll under it. */
  :root body.atlas-active { padding-bottom: 0; }
  .atlas-trail .trail-crumbs { min-width: 0; }
  .atlas-trail .trail-crumbs button { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
  /* With a film open, half the screen stays map: a lower sheet, and only the reset
     button (fingers zoom), placed under the tools instead of on top of them. */
  .atlas-drawer { max-height: 50%; }
  /* The sheet is short: the buttons come before the summary, which can be long. */
  .atlas-drawer .detail-main-actions { order: -1; }
  .explore-page .has-selection .map-controls { top: 54px; right: 8px; }
  .explore-page .has-selection .map-controls button:not([data-map-zoom="reset"]) { display: none; }
  .explore-page .hud-card { flex-wrap: nowrap; white-space: nowrap; }
  .legend-regions .legend-dot { display: none; }
  .atlas-starters > div::before { content: "Start with"; align-self: center; flex-shrink: 0; color: var(--fog); font-size: var(--text-caption); }
}
