:root {
  --bg: #0d0e12; --panel: #171922; --ink: #f3f4f8; --muted: #9aa0b4;
  --love: #ffce4f; --like: #4fd47e; --dislike: #ff5c6c; --accent: #7c8cff;
  --radius: 14px; --board-poster-w: 0px; --board-reserve: 230px;
}
* { box-sizing: border-box; }
/* Prevent accidental double-tap zoom while the owner taps through cards quickly. */
*, *::before, *::after { touch-action: manipulation; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
.wrap { max-width: 1080px; margin: 0 auto; padding: 24px 20px 120px; }
h1 { font-size: 26px; font-weight: 700; margin: 8px 0 4px; letter-spacing: -0.01em; }
.sub { color: var(--muted); margin: 0 0 22px; font-size: 15px; }
.progress { height: 4px; background: #23262f; border-radius: 4px; overflow: hidden; margin: 0 0 22px; }
.progress > i { display: block; height: 100%; background: var(--accent); transition: width .3s; }
.qhead { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: 2px 0 12px; }
.qhead h1 { margin: 0; }
.qhead .backbar { margin: 0; flex: none; }

/* ---- grid page: fit 30 tiles (10×3) on one no-scroll page ---- */
.wrap:has(.topbar) { max-width: 1320px; padding-bottom: 16px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.topbar h1 { margin: 0; }
.strip-hint { margin: 0 0 12px; color: var(--muted); font-size: 14px; max-width: 780px; }
.actions { display: flex; align-items: center; gap: 14px; }

.grid { display: grid; grid-template-columns: repeat(10, 1fr); gap: 8px; }
.board-strip { display: flex; flex-wrap: nowrap; gap: 8px; overflow-x: auto; overflow-y: hidden;
  align-items: flex-start; padding-bottom: 6px; scrollbar-width: thin; }
.board-strip .tile { flex: 0 0 auto; }
.board-strip::after { content: ''; flex: 0 0 50%; }
/* p1.5: two EQUAL rows (2xN), horizontal scroll when wide — column-flow splits any even count evenly */
.grid.two-row { grid-template-columns: none; grid-template-rows: repeat(2, auto); grid-auto-flow: column;
  grid-auto-columns: minmax(96px, 130px); overflow-x: auto; padding-bottom: 6px; }
/* item 5 — p1.5: center the content column (title + subtitle + grid) as ONE block; title/subtitle stay LEFT-
   justified but aligned to the grid's LEFT edge (the grid drives the column width; the intro is width-capped so
   it can't widen the column). CSS-only — notfor.html wraps the three in .p15.
   FIX (F1, regression of the above): width:max-content + margin-inline:auto pins .p15 to the left once its
   intrinsic width clamps to max-width:100% — a 100%-wide block has no free space left for auto-margins to
   center into. Center via the flex parent instead: align-items:center sizes .p15 to fit-content AND centers
   it post-sizing, so it holds whether or not the content ends up clamped, at every viewport width. */
.wrap:has(.p15) { max-width: 100%; display: flex; flex-direction: column; align-items: center; }
.p15 { max-width: 100%; }
.p15 > .sub { max-width: 640px; }
.tile { display: flex; flex-direction: column; background: var(--panel); border: 2px solid #3f4a85;
  border-radius: 10px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,.35); }
.poster { position: relative; aspect-ratio: 2/3; }
.poster img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cap { position: absolute; left: 0; right: 0; top: 0; padding: 5px 6px 14px; font-size: 10px;
  background: linear-gradient(rgba(0,0,0,.88), transparent); color: #eef0f7; line-height: 1.2;
  opacity: 0; transition: .12s; pointer-events: none; }
.tile:hover .cap { opacity: 1; }
.board-strip .tile .cap { display: block; opacity: 1; }
.tile.s-love  { border-color: var(--love); }
.tile.s-like  { border-color: var(--like); }
.tile.s-dislike { border-color: var(--dislike); }
.board-strip .tile.s-maybe { border-color: var(--muted); }
.board-strip .tile.s-unseen { border-color: var(--accent); }
.tile.s-dislike .poster img { filter: grayscale(.7) brightness(.65); }

/* thumb row BELOW the poster, inside the card box — clearly belongs to the poster above it */
.thumbs { display: flex; gap: 4px; padding: 5px; background: var(--panel); }
.th { flex: 1; background: #20242f; border: 0; border-radius: 6px; padding: 4px 0;
  cursor: pointer; display: flex; align-items: center; justify-content: center; }
.th.dn   { color: var(--dislike); }        /* resting thumbs are colored by meaning so they pop */
.th.up   { color: var(--like); }
.th.love { color: var(--love); }
.board-strip .th.maybe { color: var(--muted); }
.th:hover { background: #2c313f; }
.ic { width: 16px; height: 16px; display: block; }
/* At 390px, .board-strip .ic forced this 37×24 viewBox into 20px square: each
   thumb rendered at 11.89px vs the single thumb's 18.33px. Its width must
   always remain free to follow its height. The flex row then shrank it to
   12.57px vs the single thumb's 12.87px; flex: none makes both 12.87px with
   no row overflow. */
.ic-love { width: auto; height: 16px; aspect-ratio: 37 / 24; flex: none; }
/* selected = inverted: bright filled background with a contrasting thumb */
.th.dn.active   { background: var(--dislike); color: #fff; }
.th.up.active   { background: var(--like); color: #04210f; }
.th.love.active { background: var(--love); color: #1a1300; }
.board-strip .th.maybe.active { background: var(--muted); color: #fff; }
.board-strip .th { height: 44px; align-items: center; justify-content: center; }
.board-strip .unseenbtn { display: block; width: 100%; max-width: none; min-height: 44px; margin: 0; padding: 10px 14px;
  border: 1px solid #303546; border-radius: 10px; background: #1b1e27; color: var(--muted); font-size: 13px;
  font-weight: 600; }
.board-strip .unseenbtn:hover:not(:disabled):not(.active) { color: var(--ink); background: #20242f; }
/* The previous #20242f-on-#1b1e27 chosen state was indistinguishable from unanswered on a phone (2026-08-18). */
.board-strip .unseenbtn.active { background: var(--accent); border-color: var(--accent); color: #0d0e12; font-weight: 700; }
.board-strip .unseenbtn.active::before { content: "\2713\00a0"; }
.board-strip .th.active, .board-strip .unseenbtn.active { box-shadow: 0 0 0 2px rgba(255,255,255,.55); }
.hint { color: var(--muted); font-size: 13px; margin: 14px 0 0; }

/* sticky action bar */
.bar { position: fixed; left: 0; right: 0; bottom: 0; background: rgba(13,14,18,.92);
  backdrop-filter: blur(10px); border-top: 1px solid #23262f; padding: 14px 20px; }
.bar .inner { max-width: 1080px; margin: 0 auto; display: flex; align-items: center; gap: 16px; justify-content: space-between; }
button, .btn { font: inherit; border: 0; border-radius: 999px; padding: 12px 22px; cursor: pointer;
  background: var(--accent); color: #fff; font-weight: 600; }
button.ghost, .btn.ghost { background: #23262f; color: var(--ink); }
button:disabled { opacity: .4; cursor: default; }

/* single-card reaction */
/* reaction card: poster on the LEFT (desktop), with title/synopsis/questions stacked beside it */
.card { display: grid; grid-template-columns: 210px 1fr; gap: 2px 26px; align-items: start;
  grid-template-areas: "poster head" "poster detail" "poster form";
  background: var(--panel); border-radius: 18px; padding: 22px; }
.card .poster { grid-area: poster; width: 210px; aspect-ratio: 2/3; object-fit: cover; border-radius: 12px; align-self: start; display: block; }
.card .head { grid-area: head; }
.card .detail { grid-area: detail; }
/* Keep the question + button positions FIXED for a card once the first reaction is tapped (owner 2026-07-07).
   Two reservations so swapping rows never shifts anything: (1) the form min-height covers the tallest button set;
   (2) each question reserves ~2 lines so a 1-line and a 2-line question occupy the same height → the buttons below
   land at the same Y in every state. Sized to the mobile worst case (a wrapping ack + a 4-button verdict row). */
.card .rx { grid-area: form; min-height: 140px; }
.card .rx .q { min-height: 2.6em; }
@media (max-width: 560px) { .card .rx { min-height: 188px; } .card .rx .q { min-height: 3.4em; }
  /* p2 "fixed card": pin the answer bar to the viewport bottom so it's ALWAYS visible — answering reveals the next
     question in place (no scroll-jerk), the detail scrolls under it. Keeps the card feeling put, like the reveal. */
  .card .rx { position: sticky; bottom: 0; z-index: 2; margin-top: 8px; padding-top: 12px;
    background: linear-gradient(transparent, var(--panel) 14px); } }
.gem-detail form { min-height: 120px; }
@media (max-width: 560px) { .gem-detail form { min-height: 150px; } }
.card h2 { margin: 2px 0 6px; font-size: 22px; }
.card .tags { margin-bottom: 4px; }

/* mobile: COMPACT — small poster beside the title, then the SYNOPSIS, then the question. The synopsis must precede
   the question: you cannot answer "seen it?" about a film you have not been told the premise of (owner, tony49).
   Was "poster head" / "form form" / "detail detail" (2026-06-27), which put the buttons above the description. */
@media (max-width: 560px) {
  .card { grid-template-columns: 104px 1fr; gap: 12px 14px; padding: 16px;
    grid-template-areas: "poster head" "detail detail" "form form"; }
  .card .poster { width: 104px; }
  .card h2 { font-size: 19px; }
  .card .head { align-self: center; }
  /* the narrow-screen `.card { text-align: center }` (a leftover from the pre-grid flex layout) centres the
     synopsis; a centred paragraph is hard to read, and reading it is the whole point of putting it above the
     question. Title / credits / buttons keep their centring. */
  .card .detail { text-align: left; }
}
.desc { color: #c2c7d6; font-size: 13.5px; line-height: 1.45; margin: 10px 0 2px; }
.felt-label { font-size: 11px; color: var(--accent); text-transform: uppercase; letter-spacing: .05em; margin: 12px 0 0; }
.felt { color: #d6dbec; font-size: 14px; line-height: 1.5; margin: 4px 0 2px; padding-left: 12px;
  border-left: 3px solid var(--accent); font-style: italic; }
.q { margin: 18px 0 6px; font-size: 14px; color: var(--muted); }
.opts button.stack { display: inline-flex; flex-direction: column; align-items: center; line-height: 1.1; padding: 9px 24px; }
.opts .bt { font-weight: 600; }
.opts .bs { font-size: 11.5px; opacity: .55; font-weight: 400; margin-top: 2px; }
.opts { display: flex; flex-wrap: wrap; gap: 10px; }
.opts button { background: #23262f; color: var(--ink); }
.opts button.love { background: var(--love); color: #1a1300; }
.opts button.like { background: var(--like); color: #04210f; }
.opts button.dis  { background: var(--dislike); color: #2a0006; }
.hidden { display: none; }
/* Reveal steps share this top-anchored slot, so answering replaces controls in place. */
.q-slot { position: relative; min-height: 132px; }
.q-slot > :not(.hidden) { position: relative; }
body.undo-toast-visible .q-slot { padding-bottom: calc(var(--undo-toast-height, 52px) + 18px + 12px + env(safe-area-inset-bottom)); }

/* Gold oracle: its synopsis and controls need more visual weight than the shared reaction card defaults. */
.gold-card .gold-synopsis { margin: 14px 0 8px; color: var(--ink); font-size: 15px; line-height: 1.6; }
.gold-card .seen-row { display: flex; gap: 10px; margin: 4px 0 12px; }
.gold-card .seen-row > button { flex: 1; min-height: 46px; padding: 10px 16px; background: #23262f; color: var(--ink); }
.gold-card .seen-row > button.selected { background: var(--accent); color: #fff; }
.gold-card .starbar { display: flex; align-items: center; flex-wrap: nowrap; gap: 2px; overflow-x: auto; margin: 4px 0 14px; }
.gold-card .star { min-width: 30px; min-height: 36px; padding: 0; background: transparent; color: var(--muted);
  font-size: 28px; line-height: 1; font-weight: 400; }
.gold-card .star:hover, .gold-card .star:focus-visible, .gold-card .star.filled { color: var(--love); }
.gold-card .starbar.disabled .star { opacity: .4; pointer-events: none; }
.gold-card .star-readout { min-width: 42px; margin-left: 6px; color: var(--muted); font-size: 13px; }

/* discovery / reveal — grid card. MOBILE: poster + title/credits on top, then story/vibe/watch/rate FULL-WIDTH
   below the poster. DESKTOP: poster spans the left, title + story + rate stack beside it. */
.wrap:has(.disc) { padding-top: 10px; padding-bottom: 28px; }   /* tight top; no fixed Finish bar at the bottom */
.wrap:has(.disc) h1 { margin-top: 0; }
.disc { display: flex; flex-direction: column; gap: 14px; }
.gem { background: var(--panel); border-radius: 14px; padding: 14px; display: grid; align-items: start;
  grid-template-columns: 112px 1fr; gap: 6px 14px; grid-template-areas: "poster info" "detail detail"; }
.gem img { grid-area: poster; width: 112px; aspect-ratio: 2/3; object-fit: cover; border-radius: 10px; align-self: start; }
.gem-info { grid-area: info; min-width: 0; }
.gem-detail { grid-area: detail; min-width: 0; }
.gem-head { display: flex; align-items: baseline; gap: 6px 10px; flex-wrap: wrap; margin-bottom: 8px; }
.gem-head h3 { margin: 0; font-size: 17px; color: #5b9dff; }   /* reveal title text = blue (desktop + mobile) */
.gem .yr { color: var(--muted); font-weight: 400; }
.gem .stars { color: var(--love); font-weight: 700; font-size: 13px; white-space: nowrap; }
.gem .stars small { color: var(--muted); font-weight: 600; font-size: 9.5px; letter-spacing: .03em; }
/* quality BADGE (replaces the raw star decimal on reveal/shelf/popup/react cards) — a subtle pill next to the
   title; the tooltip carries the TMDB attribution. Same gold family as .stars so it reads as the quality slot
   it replaced, but quieter (tint + hairline, not solid). */
.badge { display: inline-block; font-size: 10.5px; font-weight: 700; letter-spacing: .02em; color: var(--love);
  background: rgba(255, 206, 79, .10); border: 1px solid rgba(255, 206, 79, .28); border-radius: 999px;
  padding: 1px 8px; white-space: nowrap; vertical-align: middle; }
/* IMDb rating line (owner ruling: raw score is the signal) — star + one-decimal + required "IMDb" attribution */
.imdb-rating { display: inline-flex; align-items: baseline; gap: 4px; font-size: 13px; font-weight: 700;
  color: #f5c518; white-space: nowrap; vertical-align: middle; }   /* IMDb yellow */
.imdb-rating .imdb-star { font-size: 12px; }
.imdb-rating .imdb-src { font-size: 9px; font-weight: 800; letter-spacing: .06em; color: #b9b9b9;
  background: #f5c518; color: #111; border-radius: 3px; padding: 0 3px; position: relative; top: -1px; }
.badge.lane-qual { color: var(--accent); background: rgba(120, 170, 255, .10); border-color: rgba(120, 170, 255, .28); }
.attrib { text-align: center; color: var(--muted); font-size: 11px; opacity: .55; padding: 22px 0 6px; }
.gem .persona { font-size: 11px; color: var(--accent); text-transform: uppercase; letter-spacing: .04em; }
.gem .credits { font-size: 12px; color: var(--muted); margin-top: 2px; }
.category-line { font-size: 12px; color: var(--muted); margin: 2px 0 4px; }
.gem .why { color: var(--muted); font-size: 12.5px; margin: 5px 0 0; }
.gem .ov, .gem .vibe { font-size: 12.5px; line-height: 1.4; margin: 6px 0 0; color: #c2c7d6; }
.gem .vibe { color: #d6dbec; font-style: italic; border-left: 2px solid var(--accent); padding-left: 9px; }
.gem .lbl { font-size: 10px; text-transform: uppercase; letter-spacing: .05em; color: var(--accent);
  font-weight: 700; font-style: normal; margin-right: 5px; }
.gem .watch { margin-top: 7px; }
.gem .opts { margin-top: 8px; }

/* PITCH CARD (discovery gems) — the WHY-we-bet block, tuned for a ~5-second read: tight rhythm, felt chips,
   an italic review quote. Sits above the full story/vibe (which stay as the deep read). */
/* PITCH CARD v2 — a 2-line face: concrete HOOK + FEELING line (taste-language, no title names). */
.gem .pitch { margin: 2px 0 4px; }
.gem .pitch-hook { font-size: 13px; line-height: 1.4; margin: 0 0 4px; color: #e6e9f2; font-weight: 600; }
.gem .pitch-feel { font-size: 12.5px; line-height: 1.4; margin: 0 0 2px; color: var(--accent); font-weight: 600; }

/* DESKTOP: 3 rows, all visible without scrolling — compact rhythm, story + vibe clamped to 2 lines each */
@media (min-width: 561px) {
  .wrap:has(.disc) { max-width: 980px; padding: 16px 20px 24px; }
  .wrap:has(.disc) h1 { font-size: 20px; margin: 0 0 12px; }
  .disc { gap: 12px; }
  .gem { grid-template-columns: auto 1fr; grid-template-areas: "poster info" "poster detail";
    gap: 2px 18px; padding: 11px 14px; }
  .gem img { width: auto; height: 20vh; }
  .gem-head h3 { font-size: 16px; }
  .gem .credits { margin-top: 1px; }
  .gem .ov, .gem .vibe { margin-top: 4px; }   /* full text — pre-trimmed to a complete sentence, no clamp */
  .gem .watch { margin-top: 5px; font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .gem .opts { margin-top: 7px; }
  .gem .opts button { padding: 7px 16px; font-size: 13px; }
  .gem .q { margin: 0 0 5px; font-size: 13px; }
}
.tag { display: inline-block; font-size: 11px; background: #23262f; color: var(--muted); border-radius: 6px; padding: 1px 6px; margin: 2px 3px 0 0; }
.tag-format { color: var(--ink); font-weight: 600; }
.done-stats { display: flex; gap: 28px; margin: 20px 0; }
.done-stats b { font-size: 30px; display: block; }
.done-h2 { font-size: 18px; margin: 26px 0 6px; }
.wl-sub { margin-top: 0 !important; }
/* watchlist — the finish payoff: a poster shelf of what to watch */
.watchlist { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin: 12px 0 6px; }
.wl img { width: 100%; aspect-ratio: 2/3; object-fit: cover; border-radius: 9px; display: block; }
.wl-t { font-size: 12px; margin-top: 6px; line-height: 1.25; }
.wl-l { font-size: 9.5px; color: var(--accent); text-transform: uppercase; letter-spacing: .04em; margin-top: 2px; }
.wanted-shelf-wrap { position: relative; margin: 12px 0 6px; }
.wanted-shelf { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 5 * 12px) / 6); gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.wanted-shelf::-webkit-scrollbar { display: none; }
.wanted-tile { scroll-snap-align: start; }
.wanted-tile-poster { position: relative; }
.wanted-tile-poster.no-poster-watch-soon { min-height: 24px; }
.watch-soon-pill { position: absolute; bottom: 6px; left: 50%; transform: translateX(-50%); white-space: nowrap; padding: 3px 6px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 10px; font-weight: 700; line-height: 1; letter-spacing: .04em; pointer-events: none; }
.wanted-tile .wlink { display: inline-block; margin-top: 5px; font-size: 11px; }
.wanted-scroll-next { position: absolute; z-index: 1; top: 38%; right: 6px; transform: translateY(-50%); width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%; background: var(--accent); color: #fff; font-size: 25px; line-height: 28px; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.28); }
.wl-new { position: relative; }
.wl-new::after { content: "New"; position: absolute; top: 6px; right: 6px; padding: 2px 5px; border-radius: 999px;
  background: var(--accent); color: #fff; font-size: 9px; font-weight: 700; letter-spacing: .04em; pointer-events: none; }
@media (max-width: 560px) { .watchlist { grid-template-columns: repeat(3, 1fr); gap: 10px; } .wanted-shelf { grid-auto-columns: calc((100% - 2 * 10px) / 3); gap: 10px; } .wanted-scroll-next { display: none !important; } }
/* ===== 5-CARD REVEAL STACK (mobile): 3 hero cards + a gems card + a taste card, vertical scroll-snap with a
   sliver of the next card peeking at the bottom (Trio pattern). The card CONTENT + all rating JS are unchanged;
   only the container snaps and each section becomes a ~viewport-tall snap target. ===== */
@media (max-width: 560px) {
  .wrap:has(.disc) { height: 100dvh; overflow-y: auto; scroll-snap-type: y mandatory;
    -webkit-overflow-scrolling: touch; scroll-padding-top: 6px; padding: 6px 14px 0; }
  .wrap:has(.disc) > h1 { font-size: 23px; margin: 2px 0 6px; scroll-snap-align: start; }   /* the TOP rest: pulling
     down snaps here → the h1 + full depth slider are visible, nothing gets cut off / popped back down */
  #revealRefresh { display: none; }        /* no refresh button on the reveal (owner) */
  .disc { gap: 0; }
  /* each hero .gem and each .reveal-card is a snap target; mandatory snap → a modest flick advances one whole card */
  .disc > .gem, .reveal-card { scroll-snap-align: start; box-sizing: border-box; margin: 0 0 10px; }
  /* hero cards are CONTENT-height (owner: don't pad/centre them to the viewport — a shorter card is a shorter card) */
  .disc > .gem { display: flow-root; }   /* premise wraps under the poster (owner 2026-11-15, #1119), matching the pop-up */
  .disc > .gem img { float: left; width: 138px; height: auto; margin: 0 14px 8px 0; }
  .disc > .gem .gem-info { display: block; }
  .disc > .gem .gem-detail { clear: both; }
  .reveal-card { display: flex; flex-direction: column; justify-content: flex-start; min-height: 88dvh;
    background: var(--panel); border-radius: 14px; padding: 16px 14px; }
  .reveal-card .done-h2:first-child { margin-top: 0; }
  /* the gems card is CONTENT-height (owner: no empty tail below the 6 gems) — snap still lands on its top */
  .gems-card { min-height: 0; padding-bottom: 12px; }
  /* the taste card's lane list can exceed a screen → cap it at one card, scroll the lanes INSIDE it */
  .taste-card { justify-content: flex-start; max-height: 88dvh; overflow-y: auto; -webkit-overflow-scrolling: touch; }
  .save-card { min-height: auto; justify-content: flex-start; }
  /* the depth slider lives ABOVE the cards and is NOT shown by default (owner): on load we scroll the first card to
     the top, so the slider sits just off-screen above it — pull DOWN (overscroll to the top) to reveal it. */
  .depth { margin: 0 0 8px; background: rgba(22,24,32,.7); border-radius: 12px; padding: 9px 12px; }
  /* "Your taste" card: halve the gap between the "Centers on …" headline and the "Your taste lanes" heading */
  .taste-card .taste-headline { margin-bottom: 4px; }
  .taste-card .taste-headline + .done-h2 { margin-top: 8px; }
}
.save-card { padding: 12px 14px; }
.save-card .save-circle { margin: 0; padding: 0; background: transparent; }
.save-card .save-circle + .save-circle { margin-top: 12px; }
.save-card .save-circle h2 { font-size: 15px; font-weight: 700; margin: 0 0 4px; }
.save-card .save-circle p { color: var(--muted); font-size: 13px; margin: 0 0 8px; }
.save-card .save-circle form { gap: 8px; }
.save-card .save-circle input { background: #11131a; color: var(--ink); border: 1px solid #30313a; border-radius: 10px; padding: 9px 10px; font-size: 16px; }
.save-card .save-circle input::placeholder { color: var(--muted); }
.save-card .save-circle button { background: #262a38; color: var(--ink); border: 0; border-radius: 10px; padding: 9px 10px; font-weight: 600; }
.save-card #keep-improving-go { color: #a3adff; }
.save-card #save-sent { margin: 0; color: var(--ink); font-size: 14px; }
.wl { cursor: pointer; }
.wl img { transition: transform .12s; }
.wl:hover img { transform: scale(1.03); }
/* popup: a watchlist item opens its full reveal card (same format as the hero picks) */
.modal { position: fixed; inset: 0; z-index: 100; background: rgba(8,9,12,.82); backdrop-filter: blur(4px);
  display: flex; align-items: flex-start; justify-content: center; padding: 24px 16px; overflow-y: auto; }
.modal.hidden { display: none; }   /* must beat .modal's display:flex — else the blur overlay covers the page */
.modal-card { position: relative; width: 100%; max-width: 760px; margin: auto; }
.modal-card .gem { box-shadow: 0 16px 50px rgba(0,0,0,.55); }
/* The reveal popup keeps its rating form, but its reading layout matches the standard info card: the poster floats
   beside title/meta, then the story and vibe clear it and use the card's full width. The on-page .gem grid is left
   untouched for the compact hero face. */
.modal-card .gem.gem-modal { display: flow-root; box-sizing: border-box; }
.modal-card .gem.gem-modal img { float: left; grid-area: auto; width: 108px; height: auto; margin: 0 16px 8px 0; }
.modal-card .gem.gem-modal .gem-info { display: block; min-width: 0; padding-right: 38px; }
.modal-card .gem.gem-modal .gem-detail { clear: both; min-width: 0; }
.modal-card .gem.gem-modal .gem-detail .ov,
.modal-card .gem.gem-modal .gem-detail .vibe { max-width: none; }
.modal-x { position: absolute; top: -12px; right: -8px; z-index: 2; width: 34px; height: 34px; border-radius: 50%;
  padding: 0; box-sizing: border-box; display: flex; align-items: center; justify-content: center;
  background: #2a3155; color: #fff; border: 1px solid #3f4a85; cursor: pointer; font-size: 14px; line-height: 1; }

/* MODAL CARD FITS THE PHONE (tony47: "each card shouldn't fill more than an iPhone screen"). The card is capped to
   the DYNAMIC viewport and scrolls INTERNALLY; the "Seen it?" answer buttons are pinned to its bottom edge so they
   are always reachable without scrolling. Sized in dvh, never per-device: `vh` measures the viewport as if Safari's
   URL bar and toolbar were hidden, so a `vh`-sized card is ~145px taller than what the user can actually see and the
   buttons fall off the bottom — `dvh` tracks the collapsing chrome. `vh` first as the fallback for engines without
   dvh. env(safe-area-inset-bottom) clears the home indicator. */
@supports (height: 100dvh) {
  .modal { align-items: center; overflow: hidden; padding: 12px; }
  .modal-card { margin: 0; max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); min-height: 0; }
  /* :not(.hidden) is REQUIRED — a bare `.modal-card { display: flex }` ties `.hidden`'s (0,1,0) specificity and,
     being later in the file, would beat it and render every shelf card at once (verified: it did). */
  .modal-card:not(.hidden) { display: flex; flex-direction: column; }
  /* padding-bottom: 0 — a sticky child stops at the scrollport's PADDING edge, so a 14px bottom pad would leave a
     strip below the pinned buttons where scrolled text shows through (verified: it did). The form re-adds the pad. */
  .modal-card .gem { min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
    padding-bottom: 0; }
  /* pin the answer buttons to the card's bottom; opaque so the scrolling synopsis never bleeds through */
  .modal-card .gem-detail form { position: sticky; bottom: 0; z-index: 1; background: var(--panel);
    padding-bottom: max(14px, env(safe-area-inset-bottom)); box-shadow: 0 -10px 14px -8px var(--panel); }
  .modal-x { top: 4px; right: 4px; }   /* the card no longer overflows, so a negative offset would clip */
}
.blend-bar { margin: 12px 0; }
.lane-ex { display: block; font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.lane-evidence { display: block; font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.blend-bar .n { font-size: 13px; }
.blend-bar .t { height: 7px; background: #23262f; border-radius: 4px; overflow: hidden; margin-top: 3px; }
.blend-bar .t > i { display: block; height: 100%; background: var(--accent); }

/* ============================= RESPONSIVE ============================= */
/* Mid screens (small laptops / tablets): step the grid down from 10 cols. */
@media (max-width: 1100px) { .grid { grid-template-columns: repeat(6, 1fr); } }
@media (max-width: 820px)  { .grid { grid-template-columns: repeat(4, 1fr); } }

/* Phones: TWO HORIZONTAL POSTER STRIPS filling the screen — top = "to consider" (swipe through), bottom =
   "your picks" (re-votable). Sizes are vh-proportional so two rows fill the height on any iPhone. No page scroll. */
@media (max-width: 560px) {
  .wrap:has(.topbar) { max-width: 100%; padding: 0; height: 100dvh; display: flex; flex-direction: column;
    overflow: hidden; }
  .topbar { flex: none; position: static; margin: 0; padding: 4px 12px;
    border-bottom: 1px solid #23262f; background: var(--bg); }
  .topbar h1 { font-size: 15px; }
  .actions { gap: 10px; }
  .hint { margin: 0; }
  .iconbtn { width: 36px; height: 36px; font-size: 18px; padding: 0;
    display: inline-flex; align-items: center; justify-content: center; }   /* center the ↻ (mobile only) */

  /* Two strips keep their horizontal flow; the board itself uses the remaining screen height. */
  .grid.pool, .votes, .board-strip { display: flex; flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; gap: 10px;
    align-items: center; -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity; }
  .grid.pool { flex: none; padding: 6px 12px; }
  /* 254px = 44 topbar + 14 footer gap + 20 attribution + 14 top padding + 60 thumb row + 50 unseen button + 12 bottom padding + 21 visible band.
     +52px for .strip-hint, which is a full-width 3-line instruction row under the topbar (2026-08-20). Its height
     must be in this budget or the strip overflows the viewport and the escape-hatch button falls below the fold. */
  .wrap:has(.board-strip) { --board-poster-w: min(83vw, 345px, calc((100dvh - 306px) * 2 / 3)); }
  .strip-hint { flex: none; margin: 0 0 6px; padding: 0 12px; font-size: 12px; line-height: 1.25; }
  .wrap:has(.board-strip) .board-strip { flex: 1 1 auto; min-height: 0; padding: 14px 12px 12px; align-items: flex-start; }
  .wrap:has(.board-strip) .attrib { flex: none; height: 20px; margin-top: 14px; padding: 2px 12px; font-size: 9px; line-height: 1.15; }
  .voterail { flex: none; margin: 0; padding: 2px 12px 8px; border-top: 1px solid #2a3155; }
  .rail-label { margin: 0 0 2px; }

  .grid.pool .tile, .votes .tile, .board-strip .tile { flex: 0 0 auto; width: auto !important; scroll-snap-align: center; }
  .grid.pool .tile .poster { height: 36dvh; width: calc(36dvh * 2 / 3); aspect-ratio: auto; }
  .board-strip .tile .poster { width: var(--board-poster-w); height: calc(var(--board-poster-w) * 1.5); aspect-ratio: auto; }
  .votes  .tile .poster { height: 28dvh; width: calc(28dvh * 2 / 3); aspect-ratio: auto; }   /* picks shrink so thumbs clear Safari's bar */
  .grid.pool .tile .poster img, .votes .tile .poster img, .board-strip .tile .poster img { width: 100%; height: 100%; object-fit: cover; }

  .cap { opacity: 1; font-size: 11px; }      /* always show the title (no hover on touch) */
  .votes .tile .cap { display: none; }       /* picks don't need the title overlay */
  .board-strip .tile .cap { display: block; }
  .th { padding: 8px 0; }                    /* finger-sized tap targets */
  .ic { width: 22px; height: 22px; }
  .ic-love { width: auto; height: 22px; }
  .board-strip .thumbs { gap: 2px; padding: 3px; }
  .board-strip .th { height: 54px; }
  .board-strip .unseenbtn { min-height: 50px; }
  .board-strip .ic { width: 20px; height: 20px; }
  .board-strip .ic-love { width: auto; height: 20px; }
  .votes:empty::before { font-size: 12px; align-self: center; }

  /* reaction card stacks vertically */
  .card { flex-direction: column; gap: 14px; padding: 16px; align-items: center; text-align: center; }
  .card img { width: 160px; }
  .card .meta { width: 100%; }
  .opts { justify-content: center; }
  .opts button { flex: 1 1 40%; }

  /* discovery: one column, roomy */
  .disc { grid-template-columns: 1fr; gap: 14px; }
  .gem { flex-direction: row; }
  .gem img { width: 110px; aspect-ratio: 2/3; flex: none; }

  h1 { font-size: 22px; }
  .done-stats { gap: 20px; }
}

/* live re-form "Reading your taste…" overlay (only shown if the recompute round-trip exceeds 150ms) */
.ovl { position: fixed; inset: 0; display: none; align-items: center; justify-content: center;
  background: rgba(8,10,18,.55); backdrop-filter: blur(2px); z-index: 50; }
.ovl.show { display: flex; }
.ovl-card { display: flex; gap: 12px; align-items: center; background: var(--panel);
  padding: 16px 22px; border-radius: 12px; border: 1px solid #3f4a85; font-weight: 600; }
.spin { width: 18px; height: 18px; border: 3px solid #3f4a85; border-top-color: var(--accent);
  border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* two-zone p1: the "to consider" pool stays put; voted FULL-SIZE tiles move down to this rail (re-votable) */
.voterail { margin: 18px -4px 0; padding: 10px 4px 4px; border-top: 1px solid #2a3155; }
.rail-label { display: block; font-size: 10px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 8px; }
.votes { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; align-items: flex-start; }
.votes:empty::before { content: "your picks land here as you tap"; color: var(--muted); font-size: 13px; opacity: .6; }
.votes .tile { flex: 0 0 auto; animation: drop .45s cubic-bezier(.2,.85,.3,1.3); }   /* lands in the picks rail */
@keyframes drop { 0% { transform: translateY(-46px) scale(.8) rotate(-4deg); opacity: 0; }
  60% { transform: translateY(4px) scale(1.05); opacity: 1; } 100% { transform: none; } }
/* a freshly-appended pool tile slides up into the queue */
.grid.pool .tile.fresh { animation: enter .5s cubic-bezier(.2,.85,.3,1.25); }
@keyframes enter { 0% { transform: translateY(28px) scale(.82); opacity: 0; } 100% { transform: none; opacity: 1; } }
/* a tapped tile lights up IN THE MAIN FIELD before it drops to the rail */
.tile.lit { animation: tilelit .26s ease; z-index: 5; position: relative; }
@keyframes tilelit {
  0%   { transform: scale(1);    filter: brightness(1);   box-shadow: 0 0 0 0 rgba(124,140,255,0); }
  45%  { transform: scale(1.06); filter: brightness(1.5); box-shadow: 0 0 26px 6px rgba(124,140,255,.95); }
  100% { transform: scale(1);    filter: brightness(1);   box-shadow: 0 0 0 0 rgba(124,140,255,0); } }
/* tapped thumb lights up for ~1s */
.th.flash { animation: thumbflash 1s ease; }
@keyframes thumbflash {
  0% { transform: scale(1); filter: brightness(1); box-shadow: 0 0 0 0 rgba(124,140,255,0); }
  25% { transform: scale(1.3); filter: brightness(1.8); box-shadow: 0 0 18px 5px rgba(124,140,255,.95); }
  100% { transform: scale(1); filter: brightness(1); box-shadow: 0 0 0 0 rgba(124,140,255,0); } }

/* credits line (stored facts: cast · marquee director · taste-brand studio) — recognition aid on p2/reveal */
.credits { font-size: 12px; color: var(--muted); margin: 2px 0 8px; }
.disc .credits { margin: 2px 0 6px; }
.react-card .category-line { margin: 2px 0 6px; }

/* p1 refresh icon (manual "different movies"), auto-advance transition, and tighter vertical rhythm */
.iconbtn { background: var(--panel); border: 1px solid #3f4a85; color: var(--ink); width: 40px; height: 40px;
  border-radius: 10px; font-size: 20px; line-height: 1; cursor: pointer; padding: 0;
  display: inline-flex; align-items: center; justify-content: center; }   /* icon dead-center (desktop + mobile) */
.iconbtn:hover { background: #2c313f; }
.iconbtn.spin { animation: spin360 .6s ease; }
@keyframes spin360 { to { transform: rotate(360deg); } }
.advance { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center;
  background: rgba(8,10,18,.78); backdrop-filter: blur(3px); font-size: 18px; font-weight: 600; }
.wrap:has(.topbar) { padding-top: 12px; padding-bottom: 12px; }
.wrap:has(.topbar) .topbar { margin-bottom: 10px; }
.wrap:has(.topbar) h1 { font-size: 22px; }
.voterail { margin-top: 12px; }

/* where-to-watch on the reveal (providers from the availability table + a one-click TMDB/JustWatch page) */
.watch { font-size: 12px; color: #c7ccdd; margin: 8px 0 4px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.wlabel { color: var(--like); font-weight: 600; }
.wlink { color: var(--accent); text-decoration: none; font-weight: 600; }
.wlink:hover { text-decoration: underline; }

/* DESKTOP (>560): the whole grid fits the window (no vertical scroll). One card = poster + thumbs, sized as a
   single unit by --cw so they scale together (no blank space) and picks match the pool exactly. --cw fills the
   window width across 10 columns, but is capped by viewport HEIGHT so 2 rows + the picks rail still fit, and
   floored at 90px below which the row scrolls HORIZONTALLY (never reflows to fewer columns). */
@media (min-width: 561px) {
  .wrap:has(.topbar) { max-width: 2200px; height: 100vh; display: flex; flex-direction: column; overflow: hidden;
    padding: 8px 24px 12px;
    /* 2026-09-05 (owner, desktop): posters were too small to read. --cw is scaled 2.2x across all three
       clamp terms so the floor, the width-driven term and the height cap keep their original relationship —
       everything else on the card (poster height, thumbs, icons) is derived from --cw and scales with it.
       The row already scrolls horizontally, so fewer tiles fit on screen rather than the layout reflowing. */
    --cw: clamp(198px, calc((100vw - 120px) / 10 * 2.2), calc(23vh * 2 / 3 * 2.2)); }
  .wrap:has(.topbar) .topbar { flex: none; margin-bottom: 6px; }
  .wrap:has(.topbar) h1 { font-size: 18px; }

  .grid.pool { flex: none; grid-template-columns: repeat(10, var(--cw)); justify-content: start;
    overflow-x: auto; overflow-y: hidden; }             /* 10 per row; scroll right/left only when too narrow */
  .grid.pool .tile, .votes .tile, .board-strip .tile { width: var(--cw); height: auto; }
  .grid.pool .tile .poster, .votes .tile .poster, .board-strip .tile .poster { aspect-ratio: auto; width: 100%; height: calc(var(--cw) * 1.5); }

  .board-strip { display: flex; flex: none; flex-wrap: nowrap; gap: 8px; overflow-x: auto; overflow-y: hidden;
    align-items: flex-start; padding-bottom: 6px; scrollbar-width: thin; }

  .voterail { flex: none; margin: 8px 0 0; padding-top: 6px; border-top: 1px solid #2a3155; }
  .voterail .rail-label { margin-bottom: 4px; }
  .votes { align-items: start; }

  /* thumbs scale with the card width so the box never has blank space below the poster */
  .grid.pool .thumbs, .votes .thumbs, .board-strip .thumbs { padding: calc(var(--cw) * 0.045); gap: calc(var(--cw) * 0.03); }
  .grid.pool .th, .votes .th, .board-strip .th { padding: calc(var(--cw) * 0.04) 0; }
  .grid.pool .ic, .votes .ic, .board-strip .ic { width: calc(var(--cw) * 0.15); height: calc(var(--cw) * 0.15); }
  .grid.pool .ic-love, .votes .ic-love, .board-strip .ic-love { width: auto; height: calc(var(--cw) * 0.15); }
  .board-strip .th { min-width: 0; min-height: 44px; }
  /* 2026-09-05 (owner, desktop): the thumbs rectangles must match the "never heard of it" row's height, and
     the row must have no dead space above or below it. Both were side effects of the 2.2x poster change:
     .thumbs padding and .th padding are --cw fractions, so they grew with the card.
     - .thumbs keeps its HORIZONTAL padding (the buttons still inset from the card edge) and loses the vertical.
     - .th drops its vertical padding and takes the same fixed 44px as .board-strip .unseenbtn's min-height.
     Everything is border-box, so 44px is the whole button. DESKTOP ONLY — the max-width:560px block sets its
     own 3px thumbs padding, 54px .th and 50px unseen button, all untouched. */
  .board-strip .thumbs { padding: 0 calc(var(--cw) * 0.045); }
  .board-strip .th { height: 44px; padding: 0; }
  /* 2026-09-05 (owner, desktop): 0.13 -> 0.078, i.e. 60% of the previous size. The 2.2x poster change above
     scaled these with --cw and made them overbearing on the strip. DESKTOP ONLY — the mobile strip sets its
     own fixed 20px icons in the max-width:560px block and is deliberately untouched. */
  .board-strip .ic { width: calc(var(--cw) * 0.078); height: calc(var(--cw) * 0.078); }
  .board-strip .ic-love { width: auto; height: calc(var(--cw) * 0.078); }
}

/* discovery-depth slider (familiar ↔ deeper cuts) */
.depth { display:flex; align-items:center; gap:12px; max-width:760px; margin:0 auto 18px; }
.depth input[type=range] { flex:1; accent-color: var(--accent); cursor:pointer; }
.depth-l { font-size:12px; color:#9aa1b8; white-space:nowrap; }
.depth:has(.depth-stops) { max-width:none; }   /* #1117 owner: thin bar, as wide as the hero cards */
.depth-stops { display:flex; width:100%; margin:0; background:transparent; border-bottom:1px solid rgba(255,255,255,.08); }   /* #1117 option D: quiet tabs */
.depth-stop { flex:1; border:0; border-radius:0; padding:3px 10px; background:transparent; color:var(--muted); cursor:pointer; font:inherit; font-size:12px; line-height:1.4; white-space:nowrap; }
.depth-stop.active { background:transparent; color:var(--ink); box-shadow:inset 0 -2px 0 var(--accent); }
.disc { transition: opacity .2s ease; }

/* ---- p2 forced-choice screens: a 2x2 poster board, tap a poster to answer (no thumbs, no X) ---- */
/* forced-choice + duel share ONE tile format (consistent across every forced choice); the tap selects, so an
   ⓘ button (top-right) opens the detail summary without triggering a pick. */
.choice-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; width: 100%; margin: 0; }
/* the whole forced-choice board fits ONE iPhone screen: tight top, no reserved Finish bar, TMDB footer may fall
   off the bottom (owner-approved). The tile border HUGS the poster (no oversized frame). */
.wrap:has(.choice-grid) { max-width: 1320px; padding-top: 8px; padding-bottom: 8px; }
.wrap:has(.choice-grid) > h1 { margin: 0 0 8px; text-align: center; }
.wrap:has(.rank-list) { max-width: 1320px; padding-top: 8px; padding-bottom: 8px; }
.wrap:has(.rank-list) > h1, .wrap:has(.notfor-grid) > h1 { margin: 0 0 4px; text-align: center; }
.wrap:has(.rank-list) > .sub, .wrap:has(.notfor-grid) > .sub { margin: 0 0 8px; text-align: center; }
/* Negative forced choices deliberately announce their inverted polarity before a poster is tapped. */
.question-negative { color: var(--dislike); border-left: 3px solid var(--dislike); padding-left: 10px; }
.question-polarity { font-weight: 800; }
.notfor-pill + .question-block .question-polarity { color: var(--dislike); }
.notfor-pill { width: fit-content; margin: 0 auto 4px; padding: 2px 8px; border-radius: 999px; background: color-mix(in srgb, var(--dislike) 20%, transparent); color: var(--dislike); font-size: 11px; font-weight: 800; letter-spacing: .08em; }
.notfor-grid + .notfor-submit { background: var(--dislike); }
/* This stage is exactly the rendered grid width. On wide screens its centered 1080px column leaves real gutters
   in the widened wrap, so Back can be anchored to the grid edge rather than to an assumed maximum width. */
.choice-stage { position: relative; width: min(1080px, 100%); margin: 6px auto 0; }
.choice-stage .backbar { margin: 0 0 6px; }
@media (min-width: 1240px) {
  .choice-stage .backbar { position: absolute; top: 0; left: 100%; margin: 0 0 0 12px; white-space: nowrap; }
}
/* mobile: a 2-across grid — posters read large, the full set of 6 fits without scrolling. */
@media (max-width: 560px) { .choice-grid { grid-template-columns: repeat(2, auto); justify-content: center;
  grid-auto-flow: row; overflow-x: visible; padding-bottom: 0; gap: 10px; margin-top: 0; }   /* auto cols +
  centered track → the horizontal gap between posters equals the 10px vertical gap (no centering slack) */
  .wrap:has(.choice-grid) > h1 { font-size: 23px; }
  .choice-grid .tile { width: fit-content; }   /* border wraps the poster exactly */
  /* posters fill the screen: 3 rows share (viewport − header/gaps reserve), so they scale to any iPhone and the
     bottom row never clips regardless of Safari's chrome height (TMDB footer falls below, owner-approved). */
  .choice-grid .tile .poster { aspect-ratio: auto;
    height: calc((100dvh - 100px) / 3); width: calc((100dvh - 100px) / 3 * 2 / 3); margin: 0; }
  .choice-stage:has(.backbar) .tile .poster { height: calc((100dvh - 132px) / 3); width: calc((100dvh - 132px) / 3 * 2 / 3); }
  .choice-grid .tile .poster img { width: 100%; height: 100%; object-fit: cover; }
  .choice-grid .cap { padding-top: 3px; text-align: center; } }
.choice-grid .tile, .duel-grid .tile.duel { cursor: pointer; transition: transform .12s, border-color .12s; }
.choice-grid .tile:hover, .duel-grid .tile.duel:hover { transform: scale(1.02); border-color: var(--accent); }
.choice-grid .tile.picked, .duel-grid .tile.duel.picked { border-color: var(--love); transform: scale(1.03); }
.choice-grid .tile.selected { border: 4px solid var(--dislike); box-shadow: 0 0 0 4px color-mix(in srgb, var(--dislike) 35%, transparent); transform: scale(1.03); }
.notfor-submit { display: block; margin: 8px auto 0; min-width: 140px; font-weight: 800; }
.board-alt { display: block; margin: 4px auto 0; padding: 0; background: transparent; color: inherit; border: 0; border-radius: 0; text-decoration: underline; font-size: 13px; font-weight: 500; }
.notfor-mark { position: absolute; bottom: 6px; left: 6px; z-index: 6; width: 28px; height: 28px; display: grid; place-items: center; border: 2px solid var(--dislike); border-radius: 50%; color: var(--dislike); background: rgba(13,14,18,.7); font-weight: 800; }
.notfor-stamp { position: absolute; inset: 50% auto auto 50%; z-index: 6; display: none; transform: translate(-50%, -50%) rotate(-12deg); padding: 3px 7px; border: 2px solid var(--dislike); color: var(--dislike); background: rgba(13,14,18,.75); font-size: 13px; font-weight: 900; white-space: nowrap; }
.notfor-grid .tile.selected .poster img { filter: grayscale(.8) brightness(.45); }
.notfor-grid .tile.selected .notfor-mark { background: var(--dislike); color: #fff; }
.notfor-grid .tile.selected .notfor-stamp { display: block; }
.choice-grid .cap, .duel-grid .cap { opacity: 1; font-size: 12.5px; }   /* caption always on — recognition IS the question */

/* Rank boards deliberately use Pointer Events instead of HTML drag-and-drop: iOS Safari supports this path. */
.rank-list { display: grid; gap: 12px; width: min(760px, 100%); margin: 0 auto; }
/* The 3-by-2 board is deliberately desktop-only. Phone grids retain their established 2-up sizing below. */
@media (min-width: 561px) {
  .rank-list, .notfor-grid { grid-template-columns: repeat(3, auto); justify-content: center; gap: 12px; width: max-content; max-width: 100%; margin: 0 auto; }
  .rank-tile .poster, .notfor-grid .tile .poster { height: min(368px, calc((100svh - var(--board-reserve)) / 2)); width: calc(min(368px, calc((100svh - var(--board-reserve)) / 2)) * 2 / 3); aspect-ratio: auto; }
}
.rank-tile { position: relative; cursor: grab; touch-action: none; }
/* #1120: a mouse press on a tile must start OUR drag only — no text highlight (caption/number) and no browser
   image/text drag, which on desktop Safari hijacked the gesture. Owner 2026-11-15. */
.rank-tile { -webkit-user-select: none; user-select: none; }
.rank-tile img { -webkit-user-drag: none; }
/* Let elementFromPoint reach the tile beneath the dragged tile during pointer-captured reordering. */
.rank-tile.dragging { opacity: .55; cursor: grabbing; pointer-events: none; }
.rank-drag-clone { position: fixed; z-index: 1000; margin: 0; pointer-events: none; cursor: grabbing; opacity: .95; transform: scale(1.03); }
.rank-badge { position: absolute; bottom: 6px; left: 6px; z-index: 5; min-width: 28px; height: 28px; padding: 0 6px;
  border-radius: 999px; background: var(--accent); color: #fff; font-weight: 800; display: grid; place-items: center; }
.rank-submit { display: block; margin: 16px auto 0; }
@media (max-width: 560px) {
  /* The six-poster boards are self-contained phone screens: the grid receives whatever height remains after
     their real header and controls, rather than guessing a fixed header reserve. */
  .wrap:has(.rank-list), .wrap:has(.notfor-grid) { height: 100svh; padding: 6px 14px; display: flex;
    flex-direction: column; overflow: hidden; }
  .wrap:has(.rank-list) > h1, .wrap:has(.notfor-grid) > h1 { margin: 0 0 2px; font-size: 19px; line-height: 1.15; }
  .wrap:has(.rank-list) > .sub, .wrap:has(.notfor-grid) > .sub { margin: 0 0 4px; font-size: 13px; line-height: 1.25; }
  .wrap:has(.rank-list) > .attrib, .wrap:has(.notfor-grid) > .attrib { flex: none; order: 99;
    margin: 2px 0 0; padding: 0; font-size: 10px; line-height: 1.15; }
  .choice-stage:has(.rank-list), .choice-stage:has(.notfor-grid) { flex: 1; min-height: 0; width: 100%;
    margin: 2px auto 0; display: flex; flex-direction: column; }
  .choice-stage:has(.rank-list) .backbar, .choice-stage:has(.notfor-grid) .backbar { margin: 0 0 4px; }
  .rank-list, .notfor-grid { flex: 1; min-height: 0; grid-template-columns: repeat(2, auto);
    grid-template-rows: repeat(3, minmax(0, 1fr)); justify-content: center; gap: 10px; }
  .rank-tile, .notfor-grid .tile { width: auto; height: 100%; min-height: 0; justify-self: center; }
  .choice-stage .rank-list .rank-tile .poster, .choice-stage:has(.backbar) .rank-list .rank-tile .poster,
  .choice-stage .notfor-grid .tile .poster, .choice-stage:has(.backbar) .notfor-grid .tile .poster {
    height: 100%; width: auto; aspect-ratio: 2 / 3; margin: 0; }
  .rank-tile .poster img, .notfor-grid .tile .poster img { width: 100%; height: 100%; object-fit: cover; }
  .rank-submit, .notfor-submit { flex: none; margin: 6px auto 0; }
  .choice-stage:has(.rank-list) .board-alt, .choice-stage:has(.notfor-grid) .board-alt { flex: none; margin: 2px auto 0; }
}

/* ── W5 — two-up duel (CAPTURE_V2, W3's minimal-pair delivery surface) ── */
.duel-grid { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px;
  max-width: 620px; margin: 10px auto 0; }
.duel-vs { font-size: 12px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
/* "I don't know these" — a muted, secondary escape hatch under the pair (never competes with the posters) */
.duel-skip { background: transparent; border: 1px solid #2c3350; color: var(--muted); font-size: 13px;
  padding: 8px 16px; border-radius: 999px; cursor: pointer; transition: color .12s, border-color .12s; }
.duel-skip:hover { color: var(--ink); border-color: #3f4a85; }
.duel-skip + .duel-skip { margin-left: 8px; }

/* ⓘ details button — ONE rule for every surface that shows a poster: the opener/choice + duel pages, the
   opening strip's tiles and the swipe deck's card. z-index 5 clears the deck's `.explore-badge` (4).
   ⚠ There must be exactly ONE `.info-btn` rule in this file: a second one added on 2026-08-20 was silently
   overridden by this one (same specificity, later wins) while its test passed by string-matching the dead block. */
.info-btn { position: absolute; top: 6px; right: 6px; z-index: 5; width: 28px; height: 28px; border-radius: 50%;
  border: none; background: rgba(0,0,0,.55); color: #fff; font-size: 15px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center; padding: 0; }
.info-btn:hover { background: rgba(0,0,0,.85); }
.notfor-grid .info-btn { top: auto; right: 6px; bottom: 6px; }
/* Deliberate scoped override: the strip's poster is roughly 350px wide against the deck card's 232px,
   so the same button reads much smaller there. */
.board-strip .info-btn { width: 40px; height: 40px; font-size: 22px; }

/* ---- p1.5 "not for you" probe page: single ✕ per poster, tap poster for detail ---- */
.tile.probe { cursor: pointer; position: relative; }
.probe-x { position: absolute; top: 6px; right: 6px; z-index: 3; width: 30px; height: 30px; border-radius: 50%;
  border: none; background: rgba(0,0,0,.55); color: #fff; font-size: 15px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center; padding: 0; }
.probe-x:hover { background: rgba(210,40,40,.9); }
.tile.probe.xed .poster img { filter: grayscale(1) brightness(.45); }
.tile.probe.xed .probe-x { background: #d22; }
.tile.probe.xed::after { content: "Not for me"; position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%);
  background: #d22; color: #fff; font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 10px; z-index: 3; white-space: nowrap; }
.pill-btn { display: block; margin: 22px auto; padding: 12px 34px; border-radius: 24px; border: none;
  background: var(--accent); color: #fff; font-size: 16px; font-weight: 600; cursor: pointer; }
.pill-btn:disabled { opacity: .5; }

/* ---- undo affordances (mis-tap recovery): reveal ✓-chip undo, shelf toast, p2 "‹ back" ---- */
/* SUBTLE by design — never competes with the primary rate/pick actions. */
.rated { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.undo { background: none; border: none; color: var(--muted); font-size: 12px; cursor: pointer;
  padding: 2px 4px; opacity: .75; text-decoration: underline; text-underline-offset: 2px; }
.undo:hover { opacity: 1; color: var(--ink); }
/* p2 "‹ back" — small, top-left, above the progress bar; returns to the previous question */
.backbar { margin: 0 0 6px; }
.backbtn { background: none; border: none; color: var(--muted); font-size: 13px; cursor: pointer;
  padding: 4px 2px; opacity: .8; }
.backbtn:hover { opacity: 1; color: var(--ink); }
/* shelf-rate undo toast — the rated tile is auto-replaced, so undo lives here (bottom, mobile-thumb reach).
   The fallback height reserves room before its rendered height can be measured by showUndoToast(). */
body.undo-toast-visible { padding-bottom: calc(var(--undo-toast-height, 52px) + 18px + 12px + env(safe-area-inset-bottom)); }
.undo-toast { position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom)); transform: translate(-50%, 140%);
  background: var(--panel); border: 1px solid #3f4a85; border-radius: 10px; color: var(--ink);
  padding: 9px 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  font-size: 13px; z-index: 40; box-sizing: border-box; box-shadow: 0 8px 24px rgba(0,0,0,.4);
  width: min(560px, calc(100vw - 24px)); transition: transform .25s ease; }
.undo-toast.show { transform: translate(-50%, 0); }
.undo-toast b { font-weight: 600; }
.undo-toast .undo { color: var(--accent); opacity: 1; white-space: nowrap; }

/* ── W5 — swipe harvest deck (CAPTURE_V2_ON) ── */
.wrap:has(.swipe-top) { max-width: 560px; }
.swipe-top { margin-bottom: 6px; }
.tastechips { display: inline-flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 5px;
  font-size: 11px; }
.tastechips-label { color: var(--muted); }
.tastechip { padding: 2px 7px; border: 1px solid #3f4a85; border-radius: 999px; background: var(--panel);
  box-shadow: 0 1px 4px rgba(0,0,0,.2); color: var(--ink); font-size: 10.5px; font-weight: 600; white-space: nowrap; }
/* directional labels arranged around the deck (up/down/left/right = the swipe meanings) */
.swipe-stage { display: grid; grid-template-columns: 1fr 232px 1fr; grid-template-rows: auto 1fr auto;
  align-items: center; justify-items: center; max-width: 372px; margin: 2px auto 0; gap: 10px 4px; }
.swipe-stage .deck { grid-column: 2; grid-row: 2; margin: 0; width: 100%; max-width: 232px; }
.dir { font-size: 11px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; line-height: 1.15;
  text-align: center; opacity: .92; }
.dir-up   { grid-column: 2; grid-row: 1; }
.dir-down { grid-column: 2; grid-row: 3; }
.dir-left { grid-column: 1; grid-row: 2; }
.dir-right{ grid-column: 3; grid-row: 2; }
.dir.love { color: var(--love); } .dir.like { color: var(--like); }
.dir.dis  { color: var(--dislike); } .dir.skip, .dir.meh { color: var(--muted); }
.unseenbtn { display: block; width: 100%; max-width: 232px; min-height: 44px; margin: 40px auto 0;
  padding: 10px 14px; border-radius: 10px; border: 1px solid #303546; background: #1b1e27;
  color: var(--muted); font-size: 13px; font-weight: 600; }
.unseenbtn:hover:not(:disabled) { color: var(--ink); background: #20242f; }
.swipe-undobtn { display: block; margin: 12px auto 0; background: none; border: none; color: var(--muted);
  font-size: 13px; cursor: pointer; }
.swipe-undobtn:hover:not(:disabled) { color: var(--ink); }
.swipe-taphint { text-align: center; font-size: 11.5px; color: var(--muted); opacity: .75; margin: 10px 0 0; }
.deck { position: relative; width: 100%; max-width: 260px; margin: 0 auto; aspect-ratio: 2/3; }
.swipe-card { position: absolute; inset: 0; border-radius: var(--radius); overflow: hidden; background: var(--panel);
  border: 2px solid #3f4a85; box-shadow: 0 12px 30px rgba(0,0,0,.45); will-change: transform;
  transform: translateY(calc(var(--depth) * 10px)) scale(calc(1 - var(--depth) * 0.05));
  transition: transform .18s ease, opacity .18s ease; touch-action: none; user-select: none; }
.swipe-card:not(.top) { pointer-events: none; filter: brightness(.7); }
/* Keep the depth stack in steady state, but do not uncover it while the top card flies out. */
#deck.is-consuming .swipe-card:not(.top) { opacity: 0; }
.swipe-card.top { cursor: grab; z-index: 3; }
.swipe-card img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.sc-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 12px 10px; font-size: 13px; font-weight: 600;
  background: linear-gradient(transparent, rgba(0,0,0,.85)); }
.sc-hint { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); padding: 6px 14px; border-radius: 30px;
  font-weight: 800; font-size: 15px; letter-spacing: .04em; opacity: 0; transition: opacity .1s; pointer-events: none;
  z-index: 4; background: rgba(0,0,0,.6); }
.sc-hint.show { opacity: 1; }
.sc-hint.love { color: var(--love); box-shadow: 0 0 0 2px var(--love) inset; }
.sc-hint.like { color: var(--like); box-shadow: 0 0 0 2px var(--like) inset; }
.sc-hint.dislike { color: var(--dislike); box-shadow: 0 0 0 2px var(--dislike) inset; }
.sc-hint.down { color: var(--ink); box-shadow: 0 0 0 2px var(--muted) inset; }
/* One row, always. `left:50%` caps an auto-width absolute box at HALF the card, which wrapped
   "Testing a hunch" onto two lines (owner, 2026-08-22). max-content sizes it to the text; nowrap keeps
   it there; max-width stops it reaching the info button at top-right. */
.explore-badge { position: absolute; top: 0; left: 50%; transform: translateX(-50%); z-index: 4; padding: 5px 7px; border-radius: 999px;
  background: rgba(10,12,18,.9); color: var(--ink); font-size: 9px; font-weight: 800; letter-spacing: .1em;
  line-height: 1; text-transform: uppercase; pointer-events: none;
  width: max-content; max-width: calc(100% - 72px); white-space: nowrap; }
/* prediction ("our read on you") card — a deliberate confident bet, visually distinct from a probe card */
.swipe-card.pred { border-color: var(--love); box-shadow: 0 0 0 2px var(--love) inset, 0 14px 34px rgba(0,0,0,.5); }
.pred-banner { position: absolute; top: 0; left: 0; right: 0; z-index: 4; padding: 14px 16px 26px; text-align: center;
  background: linear-gradient(rgba(0,0,0,.85), transparent); pointer-events: none; }
.pred-banner > div:first-child { font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
  color: var(--love); }
.pred-banner > div:last-child { margin-top: 5px; font-size: 14px; font-weight: 600; color: #fff; line-height: 1.32; }
.swipe-card.fly-left  { transform: translate(-140%, 0) rotate(-18deg); opacity: 0; }
.swipe-card.fly-right { transform: translate(140%, 0) rotate(18deg); opacity: 0; }
.swipe-card.fly-up    { transform: translate(0, -140%) scale(.9); opacity: 0; }
.swipe-card.fly-down  { transform: translate(0, 140%) scale(.9); opacity: 0; }
/* tap-a-poster summary modal (the universal info card, fetched on demand) */
.summary-overlay { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.65); backdrop-filter: blur(3px); padding: 20px; }
.summary-overlay.hidden { display: none; }   /* must beat .summary-overlay's display:flex (defined earlier) */
.summary-box { position: relative; background: var(--panel); border: 1px solid #3f4a85; border-radius: 16px;
  padding: 20px; max-width: 460px; width: 100%; max-height: 86vh; overflow-y: auto; }
.summary-x { position: absolute; top: 10px; right: 10px; background: rgba(0,0,0,.4); border: none; color: var(--ink);
  width: 30px; height: 30px; border-radius: 50%; font-size: 15px; cursor: pointer; z-index: 2; }
.summary-loading { color: var(--muted); text-align: center; padding: 30px 0; }
.summary-poster { float: left; width: 108px; aspect-ratio: 2/3; object-fit: cover; border-radius: 10px;
  margin: 0 16px 8px 0; }
.summary-main h2 { margin: 2px 0 8px; font-size: 20px; }
.summary-main h2 .sy { color: var(--muted); font-weight: 400; }
.summary-main .desc { clear: none; margin-top: 8px; }
.summary-main .felt-label { clear: both; }

/* ===== Phone layout pass, owner 2026-11-15 (#1121 reaction card "E", #1122 six-poster boards + results) ===== */
.sub-phone { display: none; }
@media (max-width: 560px) {
  /* six-poster boards: one-line subtitles (short phone wording), no "LAST ONE" label */
  .sub-full { display: none; }
  .sub-phone { display: inline; }
  .wrap:has(.rank-list) > .sub, .wrap:has(.notfor-grid) > .sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .notfor-pill { display: none; }
  /* posters keep the 2:3 shape: width and height are set explicitly from the grid's own box (container units),
     never left to percentage heights — iOS Safari stretched them sideways under the old rule (owner screenshot). */
  .rank-list, .notfor-grid { container-type: size; grid-template-rows: repeat(3, auto); align-content: center; }
  .rank-tile, .notfor-grid .tile { height: auto; width: auto; }
  .choice-stage .rank-list .rank-tile .poster, .choice-stage:has(.backbar) .rank-list .rank-tile .poster,
  .choice-stage .notfor-grid .tile .poster, .choice-stage:has(.backbar) .notfor-grid .tile .poster {
    --ph: min(calc((100cqh - 20px) / 3), calc((100cqw - 10px) / 2 * 1.5));
    height: var(--ph); width: calc(var(--ph) * 2 / 3); aspect-ratio: auto; }
  /* results page: no "Your N strongest — we found …" line under the heading */
  .reveal-lanes-sub { display: none; }
  /* reaction card E: tighter top (Back + heading kept), question sits on the buttons (every question is one line
     at 393–420pt, measured), no blank band, answers stop just above a two-line "Taste forming…" bar */
  .wrap:has(.react-card) { padding-top: 4px; padding-bottom: 64px; }
  .wrap:has(.react-card) > .backbar { margin: 0; }
  .wrap:has(.react-card) > .backbar .backbtn { padding: 2px 0; line-height: 18px; }
  .wrap:has(.react-card) > h1 { margin: 2px 0 8px; line-height: 1.15; }
  .react-card .rx { min-height: 0; margin-top: 2px; padding-top: 8px; padding-bottom: 8px; bottom: 49px;
    background: linear-gradient(transparent, var(--panel) 8px); }
  .react-card .rx .q { min-height: 1.5em; margin-bottom: 6px; }
  body:has(.react-card) .bar { padding: 7px 14px; }
  body:has(.react-card) .bar .hint { display: block; font-size: 12.5px; line-height: 17px; }
  body:has(.react-card) .bar .hint b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}
@media (max-width: 385px) { .react-card .rx .q { min-height: 3em; } }   /* SE/mini: one question wraps to 2 lines */
