/* LARP Wrapped — "Radio" theme. Generic: all content comes from story.js + data.js.
 * One loud thing: the tuning trace (contour lines that lock from static into a signal).
 * Everything else is quiet: flat colourways, two typefaces, a tuning-scale progress dial. */

:root {
  --ink: #10123F;
  --ultra: #1B1F6B;
  --magenta: #FF2E88;
  --sodium: #FF9A1F;
  --ice: #D6ECFF;
  --violet: #4B22C4;
  --white: #FFFFFF;

  --display: "Bricolage Grotesque", "Arial Narrow", system-ui, sans-serif;
  --text: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --gutter: 7cqw;
  color-scheme: dark;
}

/* Station colourways: bg / fg / accent / duotone (shadows, highlights) / second accent.
 * Contrast (fg on bg): ultra/ice 11.9, magenta/ink 5.6, sodium/ink 8.9, ice/ink 14.3, violet/white 9.4.
 * --ac is only used for large display text, icons and lines (>= 3:1 on bg). */
.cw-ultra   { --bg: var(--ultra);   --fg: var(--ice);   --ac: var(--magenta); --duo-d: #0B0D33; --duo-l: #FF6FAE; --ac2: var(--violet); }
.cw-magenta { --bg: var(--magenta); --fg: var(--ink);   --ac: var(--white);   --duo-d: #2A0B3E; --duo-l: #FFC2DC; --ac2: var(--magenta); }
.cw-sodium  { --bg: var(--sodium);  --fg: var(--ink);   --ac: var(--violet);  --duo-d: #33155E; --duo-l: #FFE1B8; --ac2: var(--sodium); }
.cw-ice     { --bg: var(--ice);     --fg: var(--ink);   --ac: var(--violet);  --duo-d: #1B1F6B; --duo-l: #F4FAFF; --ac2: var(--magenta); }
.cw-violet  { --bg: var(--violet);  --fg: var(--white); --ac: var(--sodium);  --duo-d: #120A3A; --duo-l: #FFB867; --ac2: var(--violet); }

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--ink);
  color: var(--ice);
  font-family: var(--text);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  overscroll-behavior: none;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.noscript { padding: 24px; font-size: 18px; }

/* ── Backdrop (desktop ambience) ─────────────────────────────── */
.backdrop {
  position: fixed; inset: -10%;
  background:
    radial-gradient(40% 35% at 30% 30%, var(--bd, var(--ultra)) 0%, transparent 70%),
    radial-gradient(35% 40% at 75% 70%, var(--bd2, var(--violet)) 0%, transparent 70%),
    var(--ink);
  filter: blur(60px) saturate(1.2);
  transition: background .8s ease;
}

/* ── Stage: full screen on phones, 9:16 frame on desktop ───────── */
.stage {
  position: fixed; inset: 0;
  container-type: size;
  overflow: hidden;
  background: var(--bg, var(--ultra));
  color: var(--fg, var(--ice));
  transition: background-color .45s ease;
  touch-action: pan-y;
  user-select: none; -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
}
@media (min-width: 700px) and (min-aspect-ratio: 3/4) {
  .stage {
    inset: auto;
    top: 50%; left: 50%;
    height: min(100dvh - 48px, 920px);
    aspect-ratio: 9 / 16;
    transform: translate(-50%, -50%);
    border-radius: 28px;
    box-shadow: 0 30px 80px -20px rgba(5, 6, 30, .7);
  }
}

/* Tactile layer: print grain plus faint tape scan lines */
.stage::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 30;
  background-image:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .55 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"),
    repeating-linear-gradient(0deg, rgba(0, 0, 0, .05) 0 1px, transparent 1px 3px);
  mix-blend-mode: overlay; opacity: .4;
}

/* ── Dial: a tuning scale, one segment per slide ─────────────── */
.dial {
  position: absolute; z-index: 20;
  top: calc(env(safe-area-inset-top, 0px) + 2.6cqh);
  left: 6cqw; right: 6cqw;
  height: 4.4cqh;
  pointer-events: none;
}
/* minor scale marks under the segments */
.dial::before {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1.1cqh;
  background: repeating-linear-gradient(90deg, currentColor 0 1px, transparent 1px 1.6cqw);
  color: var(--fg); opacity: .32;
  -webkit-mask: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  mask: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.dial-track {
  position: absolute; left: 0; right: 0; top: 1.2cqh;
  display: flex; gap: 1.2cqw;
  height: 4px;
}
.tick {
  flex: 1; position: relative;
  background: color-mix(in srgb, var(--fg) 30%, transparent);
  border-radius: 2px;
  overflow: hidden;
}
.tick.done { background: var(--fg); }
.tick .fill {
  position: absolute; inset: 0;
  background: var(--fg);
  transform-origin: left;
  transform: scaleX(var(--p, 0));
}
.dial-needle {
  position: absolute; left: 0; top: 0; bottom: -.4cqh;
  width: 0;
  will-change: transform;
}
.dial-needle::before {          /* the needle */
  content: ""; position: absolute; left: -1px; top: 0; bottom: 0; width: 2px;
  background: var(--ac); border-radius: 1px;
}
.dial-needle::after {           /* its pivot */
  content: ""; position: absolute; left: -4px; top: -2px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--ac);
  box-shadow: 0 0 0 2px var(--bg);
}

/* ── The tuning trace (signature) ─────────────────────────────── */
.trace {
  display: block; flex: none;
  width: calc(100% + 2 * var(--gutter));
  margin: 0 calc(-1 * var(--gutter));
  height: 9cqh;
  overflow: visible;
  color: var(--ac);
  fill: none; stroke: currentColor; stroke-width: 1.6px;
  stroke-linejoin: round; stroke-linecap: round;
}
.trace path { vector-effect: non-scaling-stroke; }
.trace path.main { stroke-width: 2.4px; }
/* without a photo, the trace becomes a contour field filling the space above the number */
.trace.field {
  flex: 1 1 0; height: auto; min-height: 14cqh;
  margin-top: -2cqh; margin-bottom: 3cqh;
}
.trace.on-photo {               /* rises out of the bottom edge of a hero photo */
  position: relative; z-index: 2;
  margin-top: -9cqh;
}
.persona-trace { height: 8cqh; margin-top: 3.6cqh; }

/* ── Slides ────────────────────────────────────────────────── */
.slides { position: absolute; inset: 0; outline: none; }
.kbd .slides:focus-visible { box-shadow: inset 0 0 0 3px var(--ac); }

.slide {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  padding:
    calc(env(safe-area-inset-top, 0px) + 11cqh)
    var(--gutter)
    calc(env(safe-area-inset-bottom, 0px) + 6cqh);
  color: var(--fg);
  opacity: 0; visibility: hidden;
  transition: opacity .35s ease, visibility 0s linear .35s;
}
.slide.active { opacity: 1; visibility: visible; transition: opacity .35s ease; }

/* Staggered entrance — one orchestrated reveal per slide */
.slide .r {
  opacity: 0; transform: translateY(3cqh);
  transition: opacity .6s var(--ease-out), transform .7s var(--ease-out);
  transition-delay: calc(var(--i, 0) * 110ms + 120ms);
}
.slide.active .r { opacity: 1; transform: none; }

.spacer { flex: 1; min-height: 2cqh; }

/* Type scale */
.kicker {
  font: 600 max(13px, 3.6cqw)/1.2 var(--text);
  margin: 0 0 2cqh;
}
.headline {
  font-family: var(--display);
  font-weight: 760;
  font-variation-settings: "opsz" 96, "wdth" 82;
  font-size: 10cqw; line-height: .95;
  letter-spacing: -.02em;
  margin: 0;
  text-wrap: balance;
  overflow-wrap: break-word; hyphens: manual;
}
.headline.sm { font-size: 8cqw; }
.sub {
  font: 450 max(14px, 4.3cqw)/1.38 var(--text);
  margin: 2.4cqh 0 0;
  max-width: 34ch;
  text-wrap: pretty;
}
.hint { font: 500 max(13px, 3.4cqw)/1.3 var(--text); margin: 2.4cqh 0 0; }
.big {
  font-family: var(--display);
  font-weight: 800;
  font-size: 30cqw; line-height: .82;
  letter-spacing: -.04em;
  font-variation-settings: "opsz" 96, "wdth" var(--w, 100);
  font-variant-numeric: tabular-nums lining-nums;
  margin: 0 0 1.5cqh -.6cqw;
  color: var(--fg);
  white-space: nowrap;
}
.big.xl { font-size: 36cqw; }
.big.md { font-size: 22cqw; }

/* ── Photos: duotone + grain ───────────────────────────────── */
.ph {
  position: relative; overflow: hidden;
  background: var(--duo-l);
  isolation: isolate;
}
.ph img {
  display: block; width: 100%; height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.2) brightness(1.15);
  mix-blend-mode: multiply;
  pointer-events: none; -webkit-user-drag: none;
}
.ph::after {
  content: ""; position: absolute; inset: 0;
  background: var(--duo-d);
  mix-blend-mode: screen;
}
.ph.placeholder::before {
  content: attr(data-initial);
  position: absolute; inset: 0; display: grid; place-items: center;
  font: 800 12cqw/1 var(--display); color: var(--duo-d); z-index: 1;
}
.photo-hero {
  flex: none;
  margin: 0 calc(-1 * var(--gutter)) 3cqh;
  height: 46cqh;
  border-radius: 0 0 0 18cqw;
}
.credit {
  position: absolute; right: 2.5cqw; bottom: 1.4cqh; z-index: 3;
  font: 500 max(10px, 2.4cqw)/1 var(--text);
  color: var(--duo-d);
  background: var(--duo-l);
  padding: .5cqh 1.4cqw;
}

/* ── Intro ─────────────────────────────────────────────────── */
/* Photo flexes so long headlines never push the hint off-screen */
.t-intro .photo-hero { height: auto; flex: 1 1 0; min-height: 24cqh; max-height: 52cqh; border-radius: 0 0 50% 50% / 0 0 14cqh 14cqh; }
.t-intro .spacer { display: none; }
.t-intro > :not(.photo-hero) { flex-shrink: 0; }
.t-intro .headline { font-size: 11.5cqw; }

/* ── Big number with photo ─────────────────────────────────── */
.t-big-number .photo-hero { height: 44cqh; }

/* ── List slides: the group sits just below the optical centre, sub follows content ── */
.t-stats, .t-ranking, .t-moments, .t-game-ranking, .t-persona { padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 5cqh); }
.t-stats::before, .t-ranking::before, .t-moments::before, .t-game-ranking::before, .t-persona::before { content: ""; flex: 1 1 0; }
.t-stats::after, .t-ranking::after, .t-moments::after, .t-game-ranking::after, .t-persona::after { content: ""; flex: .55 1 0; }
.t-stats .headline.sm, .t-ranking .headline.sm, .t-moments .headline.sm, .t-game-ranking .headline.sm { font-size: 9cqw; }
.t-stats .sub, .t-ranking .sub, .t-game-ranking .sub, .t-persona .sub { margin-top: 3.6cqh; }

/* ── Stats list: two columns, numbers share one width, labels share one baseline ── */
.stats {
  list-style: none; margin: 3.5cqh 0 0; padding: 0;
  display: grid; grid-template-columns: max-content minmax(0, 1fr);
  column-gap: 4cqw; row-gap: 2.4cqh;
  --n: 14cqw; --l: max(14px, 4.4cqw);
}
.stats li {
  grid-column: 1 / -1;
  display: grid; grid-template-columns: subgrid;
  align-items: center;            /* label centred on its number, whatever its line count */
}
.stats .n {
  font: 800 var(--n)/.9 var(--display);
  font-variation-settings: "opsz" 96, "wdth" var(--w, 100);
  font-variant-numeric: tabular-nums;
  letter-spacing: -.03em;
  text-align: left;               /* one clean left edge for the number column */
}
.stats .l { font: 500 var(--l)/1.22 var(--text); min-width: 0; overflow-wrap: break-word; text-wrap: balance; }
.stats.few  { --n: 22cqw; --l: max(16px, 5.4cqw); row-gap: 3.2cqh; }
.stats.four { --n: 16cqw; --l: max(15px, 4.8cqw); }
.stats.five { --n: 12.5cqw; --l: max(14px, 4.3cqw); row-gap: 2cqh; }
.stats.many { --n: 11cqw; --l: max(13px, 4cqw); row-gap: 1.7cqh; }

/* ── Ranking: type size steps with item count ──────────────── */
.rank {
  list-style: none; margin: 3.5cqh 0 0; padding: 0; display: grid; gap: 2cqh;
  --name: 8cqw; --first: 11cqw; --pos: 6cqw;
}
.rank li {
  display: grid; grid-template-columns: 1.6em minmax(0, 1fr) auto; align-items: baseline; gap: 2.4cqw;
}
.rank .pos { font: 700 var(--pos)/1 var(--display); color: var(--ac); font-variant-numeric: tabular-nums; }
.rank .name {
  font: 750 var(--name)/1 var(--display);
  font-variation-settings: "opsz" 72, "wdth" 82;
  letter-spacing: -.015em;
  overflow-wrap: break-word; hyphens: manual; text-wrap: balance;
}
.rank .val { font: 500 max(13px, 3.6cqw)/1.2 var(--text); white-space: nowrap; text-align: right; }
.rank .val small { display: block; margin-top: .5cqh; font: 700 max(12px, 3.3cqw)/1.1 var(--text); color: var(--ac); }
.rank li:first-child .name { font-size: var(--first); }
.rank.few  { --name: 12cqw; --first: 14cqw; --pos: 8cqw; gap: 3.2cqh; }
.rank.four { --name: 9.5cqw; --first: 12cqw; --pos: 7cqw; gap: 2.6cqh; }
.rank.many { --name: 6.4cqw; --first: 8.5cqw; --pos: 5.2cqw; gap: 1.5cqh; }
.rank.small-names       { --name: 6.6cqw; --first: 8cqw; }
.rank.small-names.few   { --name: 9cqw;   --first: 10.5cqw; }
.rank.small-names.four  { --name: 7.4cqw; --first: 9cqw; }
.rank.small-names.many  { --name: 5.4cqw; --first: 6.6cqw; }

/* ── Gallery ───────────────────────────────────────────────── */
.gallery {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.6cqw;
  margin: 0 0 3cqh;
}
.gallery.dense { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.gallery figure { margin: 0; min-width: 0; }
.gallery .ph { aspect-ratio: 1; border-radius: 50%; }
.gallery figcaption {
  font: 600 max(10px, 2.7cqw)/1.15 var(--text);
  margin-top: .8cqh; text-align: center;
  overflow-wrap: break-word; hyphens: manual;
  text-wrap: balance;
}

/* ── Persona ───────────────────────────────────────────────── */
.persona-name {
  font-family: var(--display); font-weight: 800;
  font-size: 15cqw; line-height: .88; letter-spacing: -.035em;
  font-variation-settings: "opsz" 96, "wdth" 75;
  margin: 1cqh 0 1.5cqh;
  text-wrap: balance; overflow-wrap: break-word;
}
.persona-line { font: 600 max(15px, 4.8cqw)/1.25 var(--text); margin: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 1.6cqw; margin: 3cqh 0 0; padding: 0; list-style: none; }
.chips li {
  font: 600 max(12px, 3.5cqw)/1 var(--text);
  padding: 1.2cqh 3cqw;
  border-radius: 999px;
  border: 2px solid var(--fg);
}
.chips li:first-child { background: var(--fg); color: var(--bg); }

/* ── Game ──────────────────────────────────────────────────── */
.t-game .photo-hero { height: 44cqh; }
.game-title {
  font-family: var(--display); font-weight: 800;
  font-size: 11cqw; line-height: .92; letter-spacing: -.025em;
  font-variation-settings: "opsz" 96, "wdth" 80;
  margin: 0; text-wrap: balance; overflow-wrap: break-word; hyphens: manual;
}
.t-game:has(.game-title.long) .photo-hero { height: 36cqh; }
.game-title.long { font-size: 8cqw; font-variation-settings: "opsz" 96, "wdth" 76; }
.facts { display: flex; flex-wrap: wrap; gap: 2cqh 6cqw; margin: 2.6cqh 0 0; padding: 0; list-style: none; }
.facts b { display: block; font: 800 8cqw/1 var(--display); font-variant-numeric: tabular-nums; }
.facts span { font: 500 max(12px, 3cqw)/1.2 var(--text); }

/* ── Top games ─────────────────────────────────────────────── */
.toplist { list-style: none; margin: 3.5cqh 0 0; padding: 0; display: grid; gap: 1.8cqh; --th: 15cqw; --name: 5.6cqw; }
.toplist.few  { --th: 21cqw; --name: 7.6cqw; gap: 2.6cqh; }
.toplist.four { --th: 17cqw; --name: 6.4cqw; gap: 2.2cqh; }
.toplist.many { --th: 12cqw; --name: 4.8cqw; gap: 1.3cqh; }
.toplist li { display: grid; grid-template-columns: var(--th) minmax(0, 1fr) auto; gap: 3cqw; align-items: center; }
.toplist .ph { width: var(--th); aspect-ratio: 1; border-radius: 50%; }
.toplist .name { font: 700 var(--name)/1.05 var(--display); font-variation-settings: "opsz" 48, "wdth" 85; overflow-wrap: break-word; hyphens: manual; }
.toplist .score { font: 800 6.4cqw/1 var(--display); color: var(--ac); font-variant-numeric: tabular-nums; }
.toplist li:first-child .name { font-size: calc(var(--name) * 1.18); }

/* ── Moments ───────────────────────────────────────────────── */
.moments { list-style: none; margin: 3.5cqh 0 0; padding: 0; display: grid; gap: 2.6cqh; --th: 15cqw; --t: max(14px, 4.4cqw); }
.moments.few  { --th: 21cqw; --t: max(16px, 5.2cqw); gap: 3.4cqh; }
.moments.five { --th: 13cqw; --t: max(13px, 4cqw); gap: 2cqh; }
.moments.many { --th: 11cqw; --t: max(13px, 3.7cqw); gap: 1.6cqh; }
.moments li { display: grid; grid-template-columns: var(--th) minmax(0, 1fr); gap: 4cqw; align-items: center; }
.moments .ph { width: var(--th); aspect-ratio: 1; border-radius: 50%; }
.moments p { margin: 0; font: 600 var(--t)/1.28 var(--text); text-wrap: pretty; }
.moments small { display: block; font: 500 max(12px, 2.9cqw)/1.2 var(--text); margin-top: .6cqh; }

/* ── Character trading cards ───────────────────────────────── */
.deck {
  position: relative; flex: 1; min-height: 0;
  margin: 2.4cqh 0 0;
  display: grid; place-items: center;
  container-type: size;          /* cards size themselves to the room left */
}
.tcard {
  /* card colours: inverse of the slide (fg as paper, bg as ink) */
  --paper: var(--fg); --print: var(--bg);
  position: absolute;
  width: min(88cqw, (100cqh - 7cqh) / 1.44);   /* deck units */
  aspect-ratio: 5 / 7.2;
  container-type: inline-size;
  display: flex; flex-direction: column;
  padding: 3.2cqw 3.2cqw 0;
  background: var(--paper); color: var(--print);
  border-radius: 4.5cqw;
  --k: 0;
  transform:
    translateY(calc(var(--k) * -2.6cqh))
    rotate(calc(var(--k) * 2.4deg * var(--tilt, 1)))
    scale(calc(1 - var(--k) * .045));
  z-index: calc(10 - var(--k));
  opacity: calc(1 - var(--k) * .22);
  transition: transform .55s var(--ease-out), opacity .45s ease;
  box-shadow: 0 2cqh 5cqh -2cqh rgba(5, 6, 30, .55);
}
.tcard:nth-child(even) { --tilt: -1; }
.tcard.top { opacity: 1; }
.tcard.gone {
  transform: translateX(-118%) rotate(-14deg);
  opacity: 0;
  z-index: 11;
  pointer-events: none;
}
.tc-photo { position: relative; flex: none; }
.tc-photo .ph { width: 100%; aspect-ratio: 4 / 2.8; border-radius: 2.4cqw 2.4cqw 0 0; }
.pin {                          /* the fate pin badge */
  position: absolute; right: -1cqw; bottom: -9cqw; z-index: 4;
  display: grid; place-items: center; text-align: center;
  width: 25cqw; aspect-ratio: 1; border-radius: 50%;
  padding: 2.4cqw;
  background: var(--ac2); color: var(--paper);
  box-shadow: inset 0 0 0 1.2cqw var(--ac2), inset 0 0 0 1.6cqw var(--paper);
  font: 700 max(11px, 4.4cqw)/1 var(--display);
  font-variation-settings: "opsz" 24, "wdth" 80;
  transform: rotate(-9deg);
  overflow-wrap: anywhere; hyphens: manual;
}
.tc-body {
  flex: 1; min-height: 0;
  display: flex; flex-direction: column;
  padding: 3.2cqw 1.2cqw 0;
  overflow: hidden;
}
.tc-top {
  display: flex; justify-content: space-between; gap: 3cqw;
  flex: none;
  margin: 0 26cqw 0 0;
  font: 600 max(12px, 4.4cqw)/1.15 var(--text);
}
.tc-no { font-variant-numeric: tabular-nums; position: absolute; left: 6cqw; top: 6cqw; z-index: 3;
  background: var(--paper); color: var(--print); padding: .8cqw 2cqw; border-radius: 99px;
  font: 700 max(11px, 3.8cqw)/1 var(--text); }
.tc-name {
  flex: none;
  margin: 1.6cqw 0 0;
  font: 800 11.5cqw/.92 var(--display);
  font-variation-settings: "opsz" 96, "wdth" 78;
  letter-spacing: -.02em;
  text-wrap: balance; overflow-wrap: break-word; hyphens: manual;
}
.tc-name.long { font-size: 9.6cqw; }
.tc-game {
  flex: none;
  margin: 1.8cqw 0 0;
  font: 500 max(12px, 4.2cqw)/1.2 var(--text);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.tc-line {
  flex: 0 1 auto; min-height: 0;   /* the only part allowed to give way */
  margin: 1.8cqw 0 0;
  font: 600 max(12px, 4.4cqw)/1.25 var(--text);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.tc-stats {
  flex: none; margin-top: auto;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 4cqw;
  padding: 2.6cqw 0 3.6cqw;
  border-top: 2px solid var(--print);
}
.tc-stat { display: grid; gap: 1cqw; min-width: 0; }
.tc-stat b { font: 800 9cqw/.85 var(--display); font-variant-numeric: tabular-nums; letter-spacing: -.03em; }
.tc-l { font: 500 max(11px, 3.6cqw)/1.15 var(--text); }
.meter { display: flex; align-items: flex-end; gap: .9cqw; height: 7cqw; justify-self: end; }
.meter i { width: 2.2cqw; background: color-mix(in srgb, var(--print) 28%, transparent); border-radius: 1px; }
.meter i:nth-child(1) { height: 25%; } .meter i:nth-child(2) { height: 33%; }
.meter i:nth-child(3) { height: 41%; } .meter i:nth-child(4) { height: 49%; }
.meter i:nth-child(5) { height: 57%; } .meter i:nth-child(6) { height: 65%; }
.meter i:nth-child(7) { height: 73%; } .meter i:nth-child(8) { height: 81%; }
.meter i:nth-child(9) { height: 90%; } .meter i:nth-child(10) { height: 100%; }
.meter i.on { background: var(--print); }
.tc-stat:last-child { text-align: right; }
.t-cards .sub { margin-top: 2cqh; }

/* ── Guess-before-reveal ───────────────────────────────────── */
.opts { list-style: none; margin: 3cqh 0 0; padding: 0; display: grid; gap: 1.4cqh; }
.opt {
  appearance: none; cursor: pointer; width: 100%;
  display: flex; align-items: center; justify-content: space-between; gap: 3cqw;
  min-height: 48px; padding: 1.4cqh 4.5cqw;
  border: 2px solid var(--fg); border-radius: 3cqw;
  background: transparent; color: var(--fg);
  text-align: left;
  transition: background-color .25s ease, color .25s ease, padding .35s var(--ease-out), opacity .3s ease;
}
.opt-v {
  font: 750 8cqw/1 var(--display);
  font-variation-settings: "opsz" 72, "wdth" 85;
  font-variant-numeric: tabular-nums;
}
.opt:hover:not(:disabled) { background: color-mix(in srgb, var(--fg) 12%, transparent); }
.opt:focus-visible { outline: 3px solid var(--ac); outline-offset: 3px; }
.opt:disabled { cursor: default; }
.opt-mark { font: 700 max(13px, 3.6cqw)/1 var(--text); }
.revealed .opt { padding-block: .6cqh; min-height: 40px; }
.revealed .opt-v { font-size: 6cqw; }
.revealed .opt:not(.right):not(.picked) { opacity: .7; }
.opt.right { background: var(--fg); color: var(--bg); }
.opt.right .opt-mark::before { content: "✓"; font-size: 1.3em; }
.opt.wrong { border-style: dashed; }
.opt.wrong .opt-v { text-decoration: line-through; text-decoration-thickness: .08em; }
.opt.wrong .opt-mark::before { content: "✕"; font-size: 1.2em; }
.revealed .reveal-hint { display: none; }
.answer { visibility: hidden; opacity: 0; transform: translateY(3cqh); }
.revealed .answer {
  visibility: visible; opacity: 1; transform: none;
  transition: opacity .5s ease, transform .6s var(--ease-out);
}
.answer .headline { font-size: 8.5cqw; }

/* ── Summary poster (the shareable 9:16 image) ─────────────── */
.t-summary { padding: calc(env(safe-area-inset-top, 0px) + 9.5cqh) 5cqw calc(env(safe-area-inset-bottom, 0px) + 2.4cqh); }
.poster-wrap { flex: 1; min-height: 0; display: flex; }
.poster {
  flex: 1; min-height: 0;
  display: flex; flex-direction: column;
  background: var(--bg); color: var(--fg);
  border-radius: 5cqw;
  padding: 5cqw 5.5cqw 4cqw;
  overflow: hidden;
  container-type: inline-size;
}
.poster .poster-photo {
  flex: 1 1 0; min-height: 18cqh;
  border-radius: 3cqw;
  margin: 0 0 2.2cqh;
}
.poster-title {
  margin: 0 0 2cqh;
  font: 800 9cqw/.95 var(--display); letter-spacing: -.02em;
  font-variation-settings: "opsz" 96, "wdth" 80;
}
.pcols { display: grid; grid-template-columns: 1fr 1fr; gap: 5cqw; }
.pcol h3, .pstat h3 { margin: 0 0 1cqh; font: 600 max(11px, 3.4cqw)/1.15 var(--text); }
.pcol ol { list-style: none; margin: 0; padding: 0; display: grid; gap: .75cqh; }
.pcol li { display: grid; grid-template-columns: 3.6cqw 1fr; gap: 1.4cqw; align-items: baseline; min-width: 0; }
.pcol .pn { font: 700 max(11px, 3.4cqw)/1.1 var(--text); }
.pcol .pt {
  font: 750 max(12px, 4.3cqw)/1.08 var(--display); font-variation-settings: "opsz" 48, "wdth" 82;
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pstats { display: grid; grid-template-columns: 1fr 1fr; gap: 5cqw; margin-top: 2.4cqh; }
.pstat p { margin: 0; font: 800 9cqw/.95 var(--display); font-variation-settings: "opsz" 96, "wdth" 85; letter-spacing: -.02em; overflow-wrap: anywhere; }
.poster-foot {
  margin: 2.2cqh 0 0; padding-top: 1.4cqh;
  display: flex; justify-content: space-between; gap: 3cqw;
  border-top: 2px solid var(--fg);
  font: 650 max(11px, 3.1cqw)/1.2 var(--text);
}
.actions { display: flex; gap: 3cqw; margin-top: 3cqh; flex-wrap: wrap; justify-content: center; }
.t-summary .actions { margin-top: 1.8cqh; }
.share-btn { width: 100%; padding-block: 2.2cqh; font-size: max(16px, 4.8cqw); }
.actions-sub { display: flex; justify-content: center; gap: 6cqw; margin-top: 1cqh; flex-wrap: wrap; }
.linkbtn {
  appearance: none; border: 0; background: none; cursor: pointer; color: var(--fg);
  font: 600 max(13px, 3.6cqw)/1 var(--text);
  text-decoration: underline; text-underline-offset: 3px;
  min-height: 44px; padding: 0 1cqw;
}
.linkbtn:focus-visible { outline: 3px solid var(--ac); outline-offset: 2px; border-radius: 4px; }
.t-summary .save-msg { text-align: center; margin: 0; min-height: 0; }
.btn {
  appearance: none; border: 2px solid var(--fg); cursor: pointer;
  font: 650 max(14px, 4cqw)/1 var(--text);
  padding: 1.8cqh 5cqw; border-radius: 999px;
  background: transparent; color: var(--fg);
  min-height: 44px;
}
.btn.primary { background: var(--fg); color: var(--bg); }
.btn.ghost { border-color: transparent; text-decoration: underline; text-underline-offset: 3px; }

/* ── Deck controls (manual flipping) ───────────────────────── */
.deck-nav { display: flex; justify-content: center; gap: 6cqw; margin-top: 1.6cqh; }
.deck-btn {
  appearance: none; cursor: pointer;
  width: 44px; height: 44px; border-radius: 50%;
  border: 2px solid var(--fg); background: transparent; color: var(--fg);
  font: 700 22px/1 var(--text);
  display: grid; place-items: center;
}
.deck-btn:focus-visible { outline: 3px solid var(--ac); outline-offset: 3px; }
.btn:focus-visible { outline: 3px solid var(--ac); outline-offset: 3px; }
.save-msg { font: 500 max(12px, 3.2cqw)/1.3 var(--text); margin: 1.5cqh 0 0; min-height: 1.3em; }

/* ── Pause ─────────────────────────────────────────────────── */
.pause-badge {
  position: absolute; z-index: 25;
  right: 6cqw; top: calc(env(safe-area-inset-top, 0px) + 8cqh);
  font: 650 13px/1 var(--text);
  padding: 6px 12px; min-height: 28px; border-radius: 999px; border: 0;
  cursor: pointer;
  background: var(--fg); color: var(--bg);
}
.pause-badge:focus-visible { outline: 3px solid var(--ac); outline-offset: 3px; }
.is-paused .tcard, .is-held .tcard { transition-duration: 0s; }

/* ── Reduced motion ────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .stage, .slide, .slide.active, .slide .r, .tcard, .opt, .revealed .answer { transition: none !important; }
  .slide .r { opacity: 1; transform: none; }
  .backdrop { transition: none; }
  .tcard.gone { transform: none; opacity: 0; }
  .tcard:not(.top):not(.gone) { transform: translateY(calc(var(--k) * -1.6cqh)); }
}
/* poster photo is a wide crop of usually-portrait photos: keep faces (upper third) in frame */
.poster .poster-photo img { object-position: 50% 22% !important; }

/* ── Share panel ───────────────────────────────────────────── */
.share-sheet {
  position: absolute; inset: 0; z-index: 40;
  display: flex; align-items: flex-end;
  background: rgba(8, 9, 40, .55);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.share-sheet[hidden] { display: none; }
.share-panel {
  width: 100%;
  background: var(--ice); color: var(--ink);
  border-radius: 6cqw 6cqw 0 0;
  padding: 3cqh 5cqw calc(env(safe-area-inset-bottom, 0px) + 3cqh);
  display: grid; gap: 1.2cqh;
  animation: sheet-up .35s var(--ease-out);
}
@keyframes sheet-up { from { transform: translateY(100%); } }
.share-head { display: flex; align-items: center; justify-content: space-between; }
.share-head h2 { margin: 0; font: 800 7cqw/1 var(--display); font-variation-settings: "opsz" 96, "wdth" 85; letter-spacing: -.02em; }
.share-x {
  appearance: none; border: 0; cursor: pointer; background: none; color: var(--ink);
  width: 44px; height: 44px; font: 400 30px/1 var(--text);
}
.share-preview {
  width: 24cqw; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 2.4cqw;
  justify-self: center; margin-bottom: .6cqh;
  box-shadow: 0 1.4cqh 3cqh -1.4cqh rgba(8, 9, 40, .5);
}
.share-opt {
  appearance: none; cursor: pointer; text-align: left;
  display: grid; grid-template-columns: 11cqw 1fr; gap: 3.5cqw; align-items: center;
  width: 100%; min-height: 52px;
  padding: 1.2cqh 3.5cqw; border-radius: 3.5cqw;
  border: 2px solid var(--ink); background: transparent; color: var(--ink);
}
.share-opt:hover { background: rgba(16, 18, 63, .06); }
.share-opt:focus-visible, .share-x:focus-visible { outline: 3px solid var(--violet); outline-offset: 2px; }
.share-ic { width: 11cqw; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--ice); }
.share-ic svg { width: 58%; height: 58%; }
.share-opt[data-action="share-ig"] .share-ic { background: var(--magenta); color: var(--white); }
.share-opt[data-action="share-fb"] .share-ic { background: var(--ultra); color: var(--white); }
.share-tx b { display: block; font: 700 max(15px, 4.6cqw)/1.15 var(--text); }
.share-tx small { display: block; font: 500 max(12px, 3.4cqw)/1.25 var(--text); margin-top: .3cqh; }
.share-msg { margin: .4cqh 0 0; min-height: 1.2em; font: 600 max(12px, 3.4cqw)/1.35 var(--text); text-align: center; }

/* ── Build-time share images (index.html?render=og|story) ──── */
body.render { overflow: hidden; background: var(--ink); }
body.render .backdrop { display: none; }
.render-root {
  position: fixed; inset: 0; container-type: size;
  display: flex; padding: 0;
}
.render-story .render-root .poster {
  border-radius: 0; padding: 6cqw 6.5cqw 5cqw;
}
.render-story .poster .poster-photo { border-radius: 3cqw; }
/* 1200×630 link preview: photo left, invitation right */
.poster.og {
  flex-direction: row; gap: 4cqw;
  border-radius: 0; padding: 4.2cqw;
}
.poster.og .poster-photo { flex: 0 0 38%; min-height: 0; height: 100%; margin: 0; border-radius: 2cqw; }
.og-body { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.og-kicker { margin: 0 0 1.4cqh; font: 650 2.1cqw/1.2 var(--text); }
.og-title {
  margin: 0; font: 800 6.2cqw/.95 var(--display); letter-spacing: -.025em;
  font-variation-settings: "opsz" 96, "wdth" 82; text-wrap: balance;
}
.poster.og .pstats { grid-template-columns: repeat(3, auto); justify-content: start; gap: 4cqw; margin-top: 5cqh; }
.poster.og .pstat h3 { font-size: 1.7cqw; }
.poster.og .pstat p { font-size: 4.4cqw; }
.og-cta {
  align-self: flex-start; margin: 6cqh 0 0;
  padding: 1.6cqh 3cqw; border-radius: 999px;
  background: var(--fg); color: var(--bg);
  font: 700 2.2cqw/1 var(--text);
}
.share-qr { display: grid; grid-template-columns: 26cqw 1fr; gap: 4cqw; align-items: center; padding: 1.4cqh 3.5cqw; border-radius: 3.5cqw; background: var(--white); }
.share-qr[hidden] { display: none; }
.share-qr .qr-img svg { display: block; width: 100%; height: auto; }
.share-qr p { margin: 0; font: 600 max(12px, 3.5cqw)/1.35 var(--text); }
.share-opt[data-action="share-wa"] .share-ic { background: #128C4B; color: var(--white); }
.share-panel { max-height: 100%; overflow-y: auto; overscroll-behavior: contain; }
/* the QR replaces the preview so the panel always fits */
.share-panel:has(.share-qr:not([hidden])) .share-preview { display: none; }

/* ── Share designs ─────────────────────────────────────────── */
.prows { margin: 0; display: grid; gap: 1.6cqh; }
.prows > div { display: grid; grid-template-columns: 34% 1fr; gap: 3cqw; align-items: baseline; border-top: 2px solid currentColor; padding-top: 1.2cqh; }
.prows dt { font: 600 max(11px, 3.4cqw)/1.2 var(--text); }
.prows dd { margin: 0; font: 800 6.6cqw/1 var(--display); font-variation-settings: "opsz" 96, "wdth" 82; letter-spacing: -.02em; overflow-wrap: anywhere; }

/* 2 · Signal */
.poster.sig { position: relative; isolation: isolate; }
.poster.sig .sig-trace { position: absolute; left: 0; right: 0; top: 14%; height: 34%; width: 100%; z-index: -1; color: var(--ac); opacity: .9; }
.sig-kicker { margin: 0; font: 800 8.4cqw/.95 var(--display); font-variation-settings: "opsz" 96, "wdth" 80; letter-spacing: -.02em; }
.sig-mid { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; padding-bottom: 3cqh; }
.sig-big {
  margin: 0; font: 800 34cqw/.8 var(--display); letter-spacing: -.05em;
  font-variation-settings: "opsz" 96, "wdth" 75; color: var(--fg);
}
.sig-unit { margin: 1cqh 0 0; font: 800 8cqw/1 var(--display); font-variation-settings: "opsz" 96, "wdth" 82; color: var(--ac); }
.poster.og2 { flex-direction: row; gap: 5cqw; padding: 5cqw; border-radius: 0; align-items: center; }
.poster.og2 .sig-trace { top: 8%; height: 60%; }
.og2-left { flex: 1.1; min-width: 0; }
.og2-left .sig-big { font-size: 17cqw; }
.og2-left .sig-unit { font-size: 3.6cqw; }
.og2-right { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.poster.og2 .prows dt { font-size: 1.6cqw; }
.poster.og2 .prows dd { font-size: 3cqw; }
.poster.og2 .og-cta { margin-top: 4cqh; }

/* 3 · Deck */
.deck-title { margin: 0 0 2.4cqh; font: 800 10cqw/.92 var(--display); font-variation-settings: "opsz" 96, "wdth" 78; letter-spacing: -.025em; text-wrap: balance; }
.deckgrid { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.6cqw; align-content: center; }
.deckgrid figure { margin: 0; min-width: 0; }
.deckgrid .ph { aspect-ratio: 1; border-radius: 3cqw; }
.deckgrid figcaption { margin-top: .7cqh; font: 700 max(10px, 3cqw)/1.1 var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pstats.three { grid-template-columns: repeat(3, 1fr); gap: 4cqw; }
.pstats.three .pstat p { font-size: 7.4cqw; }
.poster.og3 { flex-direction: row; gap: 4cqw; padding: 4cqw; border-radius: 0; }
.poster.og3 .deckgrid { flex: 0 0 44%; gap: 1.2cqw; }
.poster.og3 .deckgrid .ph { border-radius: 1.2cqw; }
.poster.og3 .deckgrid figcaption { display: none; }
.poster.og3 .deck-title { font-size: 5.6cqw; }
.poster.og3 .pstats.three .pstat h3 { font-size: 1.6cqw; }
.poster.og3 .pstats.three .pstat p { font-size: 3.8cqw; }

/* 4 · Magazine cover */
.poster.mag { position: relative; isolation: isolate; padding: 0; color: #fff; background: #120d2b; border-radius: 0; }
.poster.mag .mag-photo { position: absolute; inset: 0; z-index: -2; border-radius: 0; --duo-d: #1a0b2e; --duo-l: #ff8fc0; }
.poster.mag .mag-photo img { object-position: 50% 18% !important; }
.poster.mag::after { content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(18,13,43,.55) 0%, rgba(18,13,43,0) 26%, rgba(18,13,43,0) 48%, rgba(18,13,43,.92) 82%); }
.mag-top { padding: 4.5cqw 5.5cqw 0; text-align: center; }
.mag-mast {
  margin: 0; font: 900 19cqw/.82 "Bodoni Moda", Didot, serif; letter-spacing: -.03em;
  font-variation-settings: "opsz" 96; text-transform: uppercase;
}
.mag-issue { margin: 1.4cqh 0 0; font: italic 600 4.2cqw/1 "Bodoni Moda", serif; }
.mag-badge {
  position: absolute; right: 6cqw; top: 40%;
  width: 30cqw; aspect-ratio: 1; border-radius: 50%; display: grid; place-content: center; text-align: center;
  background: var(--sodium); color: var(--ink); transform: rotate(-10deg);
  font: 800 6.4cqw/1 var(--display); font-variation-settings: "opsz" 96, "wdth" 80; margin: 0;
}
.mag-badge small { display: block; font: 700 3.2cqw/1.1 var(--text); margin-bottom: .6cqh; }
.mag-bottom { margin-top: auto; padding: 0 5.5cqw 6cqw; }
.mag-lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.6cqh; }
.mag-lines li { font: 500 5.2cqw/1.15 var(--text); border-top: 1px solid rgba(255,255,255,.55); padding-top: 1.2cqh; }
.mag-lines b { font: 800 1.25em/1 var(--display); font-variation-settings: "opsz" 96, "wdth" 82; color: #ffb3d4; }
.mag-lines .mag-lead { border: 0; padding: 0; font-size: 6.4cqw; }
.mag-lines .mag-lead b { display: block; font-size: 24cqw; line-height: .85; color: #fff; letter-spacing: -.04em; }
.poster.og4 { flex-direction: row; background: #120d2b; }
.poster.og4::after { display: none; }
.poster.og4 .mag-photo { position: relative; flex: 0 0 42%; inset: auto; z-index: 0; }
.poster.og4 .mag-side { flex: 1; padding: 4cqw 4.5cqw; display: flex; flex-direction: column; justify-content: center; }
.poster.og4 .mag-mast { font-size: 8.6cqw; text-align: left; }
.poster.og4 .mag-issue { font-size: 2cqw; margin-bottom: 3cqh; }
.poster.og4 .mag-lines li { font-size: 2.1cqw; padding-top: .8cqh; }
.poster.og4 .mag-lines .mag-lead { font-size: 2.4cqw; }
.poster.og4 .mag-lines .mag-lead b { font-size: 7cqw; display: inline; }
.poster.og4 .og-cta { background: #fff; color: #120d2b; margin-top: 4cqh; }

/* 5 · Mixtape */
.poster.mix {
  position: relative; isolation: isolate; overflow: hidden; border-radius: 0; color: var(--ink);
  background:
    radial-gradient(60% 45% at 18% 12%, #FF9A1F 0%, transparent 70%),
    radial-gradient(55% 50% at 90% 30%, #FF2E88 0%, transparent 70%),
    radial-gradient(70% 55% at 30% 95%, #4B22C4 0%, transparent 70%),
    radial-gradient(60% 50% at 95% 90%, #D6ECFF 0%, transparent 70%),
    #FF5FA2;
}
.poster.mix::before {   /* grain */
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: .5; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
.mix-year {
  position: absolute; left: -4cqw; top: 2cqh; z-index: -1; margin: 0;
  font: 800 52cqw/.8 var(--display); font-variation-settings: "opsz" 96, "wdth" 75; letter-spacing: -.06em;
  color: transparent; -webkit-text-stroke: 3px rgba(16,18,63,.55); transform: rotate(-8deg);
}
.mix-pins { flex: 1; position: relative; min-height: 0; }
.pin {
  position: absolute; margin: 0; width: 34cqw; aspect-ratio: 1; border-radius: 50%;
  display: grid; place-content: center; text-align: center;
  border: 4px solid var(--ink); box-shadow: 0 1.2cqh 0 rgba(16,18,63,.85);
}
.pin b { font: 800 10cqw/.9 var(--display); font-variation-settings: "opsz" 96, "wdth" 78; letter-spacing: -.03em; }
.pin small { font: 700 3.4cqw/1.1 var(--text); margin-top: .5cqh; }
.pin1 { left: 6%; top: 14%; background: var(--ice); transform: rotate(-12deg); }
.pin2 { right: 6%; top: 4%; background: var(--sodium); transform: rotate(9deg); width: 30cqw; }
.pin3 { right: 10%; top: 44%; background: var(--white); transform: rotate(-6deg); width: 40cqw; }
.pin3 b { font-size: 11cqw; }
.pin4 { left: 10%; top: 56%; background: var(--violet); color: var(--white); border-color: var(--white); transform: rotate(7deg); width: 30cqw; }
.tape {
  position: relative; background: var(--ice); color: var(--ink);
  border: 4px solid var(--ink); border-radius: 4cqw; padding: 4cqw 5cqw 5cqw;
  box-shadow: 0 1.4cqh 0 var(--ink);
}
.tape-title { margin: 0 0 2cqh; font: 800 7.6cqw/.95 var(--display); font-variation-settings: "opsz" 96, "wdth" 80; }
.tape-sides { display: grid; grid-template-columns: 1fr 1fr; gap: 4cqw; }
.tape-side h3 { margin: 0 0 1cqh; font: 700 3.2cqw/1.1 var(--text); color: var(--magenta); }
.tape-side ol { margin: 0; padding-left: 4.4cqw; display: grid; gap: .5cqh; font: 700 3.8cqw/1.15 var(--text); }
.tape-side li { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tape-reels { display: flex; justify-content: center; gap: 22cqw; margin-top: 2cqh; }
.tape-reels i { width: 11cqw; aspect-ratio: 1; border-radius: 50%; border: 4px solid var(--ink); background: repeating-conic-gradient(var(--ink) 0 12deg, transparent 12deg 60deg); }
.poster.mix .poster-foot { border-color: var(--ink); color: var(--ink); }
.poster.og5 { flex-direction: row; align-items: center; gap: 4cqw; padding: 4cqw 5cqw; }
.poster.og5 .mix-year { font-size: 30cqw; top: -2cqh; }
.poster.og5 .mix-pins { flex: 1; height: 100%; }
.poster.og5 .pin { width: 17cqw; border-width: 3px; }
.poster.og5 .pin b { font-size: 5cqw; }
.poster.og5 .pin small { font-size: 1.6cqw; }
.poster.og5 .pin1 { left: 2%; top: 6%; } .poster.og5 .pin2 { left: 46%; right: auto; top: 0; width: 15cqw; }
.poster.og5 .pin3 { left: 40%; right: auto; top: 48%; width: 19cqw; } .poster.og5 .pin3 b { font-size: 5.4cqw; }
.poster.og5 .pin4 { left: 4%; top: 56%; width: 15cqw; }
.poster.og5 .tape { flex: 0 0 48%; padding: 2.6cqw 3cqw; }
.poster.og5 .tape-title { font-size: 3.4cqw; }
.poster.og5 .tape-side h3 { font-size: 1.5cqw; } .poster.og5 .tape-side ol { font-size: 1.8cqw; padding-left: 2cqw; }
.poster.og5 .tape-reels { gap: 10cqw; } .poster.og5 .tape-reels i { width: 5cqw; }

/* 6 · Album (scrapbook) */
.poster.album {
  border-radius: 0; color: #2a1f3d;
  background: radial-gradient(80% 60% at 50% 40%, #E7F2FF 0%, #C9DDF6 100%);
}
.poster.album .ph img { filter: none; mix-blend-mode: normal; }
.poster.album .ph::after { display: none; }
.album-pics { flex: 1; position: relative; min-height: 0; }
.pola {
  position: absolute; margin: 0; width: 50cqw; background: #fff; padding: 2.4cqw 2.4cqw 0;
  box-shadow: 0 1.6cqh 3cqh -1cqh rgba(16,18,63,.45);
}
.pola .ph { aspect-ratio: 1; }
.pola figcaption { font: 700 6cqw/1.6 "Caveat", cursive; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tape-strip { position: absolute; top: -1.4cqh; left: 50%; width: 18cqw; height: 3.6cqh; transform: translateX(-50%) rotate(-4deg); background: rgba(255,154,31,.55); }
.pola1 { left: 2%; top: 2%; transform: rotate(-6deg); }
.pola2 { right: 1%; top: 10%; transform: rotate(5deg); }
.pola3 { left: 6%; top: 46%; transform: rotate(4deg); }
.pola4 { right: 4%; top: 52%; transform: rotate(-5deg); }
.album-notes { position: relative; }
.album-title { margin: 0 0 1.4cqh; font: 700 13cqw/.9 "Caveat", cursive; color: var(--magenta); transform: rotate(-2deg); }
.note { margin: 0 0 .6cqh; font: 600 6.2cqw/1.15 "Caveat", cursive; }
.note b { font-weight: 700; color: var(--violet); }
.poster.album .poster-foot { border-color: #2a1f3d; }
.poster.og6 { flex-direction: row; gap: 3cqw; padding: 3cqw 4cqw; align-items: center; }
.poster.og6 .album-pics { flex: 0 0 52%; height: 100%; }
.poster.og6 .pola { width: 22cqw; padding: 1.2cqw 1.2cqw 0; }
.poster.og6 .pola figcaption { font-size: 2.6cqw; }
.poster.og6 .tape-strip { width: 8cqw; height: 3cqh; }
.poster.og6 .pola1 { left: 0; top: 6%; } .poster.og6 .pola2 { left: 30%; right: auto; top: 2%; } .poster.og6 .pola3 { left: 15%; top: 40%; }
.poster.og6 .album-notes { flex: 1; }
.poster.og6 .album-title { font-size: 6cqw; }
.poster.og6 .note { font-size: 3cqw; }
.poster.og6 .og-cta { background: var(--magenta); color: #fff; margin-top: 3cqh; }
/* fixes after first render */
.mag-mast { font-size: 15cqw; letter-spacing: -.02em; }
.mag-issue { text-shadow: 0 1px 8px rgba(18,13,43,.6); }
.tape-side ol { list-style-position: inside; padding-left: 0; }
.pola figcaption { font-size: 5.2cqw; }
.poster.og4 .mag-mast { font-size: 7cqw; }
.pin b { white-space: nowrap; }
.poster.og5 .pin4 { width: 18cqw; } .poster.og5 .pin4 b { font-size: 3.8cqw; }
.poster.og6 .og-cta { display: inline-block; }
.poster.og6 .pola3 { left: 8%; top: 44%; } .poster.og6 .pola2 { left: 36%; }

/* design picker in the share panel */
.share-pick-l { margin: 0; font: 650 max(12px, 3.4cqw)/1.2 var(--text); }
.share-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3cqw; margin-bottom: .6cqh; }
.pick {
  appearance: none; cursor: pointer; padding: 1.2cqw; border-radius: 3cqw;
  border: 3px solid transparent; background: transparent; color: var(--ink);
  display: grid; gap: .8cqh; justify-items: center;
}
.pick img { width: 100%; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 2cqw; box-shadow: 0 1cqh 2cqh -1cqh rgba(8,9,40,.5); }
.pick span { font: 700 max(12px, 3.4cqw)/1 var(--text); }
.pick[aria-checked="true"] { border-color: var(--magenta); background: rgba(255,46,136,.08); }
.pick:focus-visible { outline: 3px solid var(--violet); outline-offset: 2px; }
.share-panel:has(.share-qr:not([hidden])) .share-pick { grid-template-columns: repeat(3, 1fr); }
.share-panel:has(.share-qr:not([hidden])) .pick img { aspect-ratio: 3 / 4; }

/* stats · tiles: each figure on its own colour tile, slightly tilted like a sticker */
.stats.tiles { display: grid; grid-template-columns: 1fr; row-gap: 2.2cqh; margin-top: 3cqh; }
.stats.tiles li {
  display: grid; grid-template-columns: auto 1fr; column-gap: 4.5cqw; align-items: center;
  background: var(--bg); color: var(--fg);
  border-radius: 4.5cqw; padding: 2.2cqh 6cqw;
  box-shadow: 0 1.2cqh 0 rgba(8, 9, 40, .35);
}
.stats.tiles li:nth-child(odd)  { rotate: -1.6deg; }
.stats.tiles li:nth-child(even) { rotate: 1.4deg; margin-inline: 3cqw -1cqw; }
.stats.tiles .n { font-size: 24cqw; line-height: .85; text-align: left; }
.stats.tiles .l { font: 700 max(16px, 5.6cqw)/1.15 var(--text); }
.stats.tiles.four .n { font-size: 19cqw; }
.stats.tiles.five .n, .stats.tiles.many .n { font-size: 14cqw; }

/* ranking · tiles: each place on its own tilted colour tile */
.rank.tiles { gap: 2.2cqh; margin-top: 3cqh; }
.rank.tiles li {
  background: var(--bg); color: var(--fg);
  border-radius: 4.5cqw; padding: 2cqh 5cqw;
  grid-template-columns: 8cqw 1fr auto; align-items: center;
  box-shadow: 0 1.2cqh 0 rgba(8, 9, 40, .35);
}
.rank.tiles li:nth-child(odd)  { rotate: -1.6deg; }
.rank.tiles li:nth-child(even) { rotate: 1.4deg; margin-inline: 3cqw -1cqw; }
.rank.tiles .pos { color: var(--fg); opacity: .75; }
.rank.tiles .val small { color: inherit; font-size: max(14px, 4.4cqw); }
.rank.tiles .val { font-weight: 600; }

/* ranking · podium: #1 as a hero tile, places 2+ as a grid of small tiles */
.rank.podium { grid-template-columns: 1fr 1fr; gap: 2.6cqw; margin-top: 3cqh; }
.rank.podium li {
  background: var(--bg); color: var(--fg);
  border-radius: 4cqw; padding: 1.8cqh 4cqw 2cqh;
  display: grid; grid-template-columns: 1fr; gap: .6cqh; align-content: start;
  box-shadow: 0 1cqh 0 rgba(8, 9, 40, .35);
}
.rank.podium li .pos { color: var(--fg); opacity: .8; font-size: 5cqw; }
.rank.podium li .name { font-size: 7.6cqw; line-height: 1; }
.rank.podium li .val { text-align: left; font-size: max(13px, 3.8cqw); }
.rank.podium li.hero {
  grid-column: 1 / -1; rotate: -1.5deg;
  grid-template-columns: auto 1fr; grid-template-areas: "pos val" "name name";
  padding: 2.4cqh 5cqw 2.8cqh;
}
.rank.podium li.hero .pos { grid-area: pos; font-size: 9cqw; color: var(--ac); opacity: 1; }
.rank.podium li.hero .val { grid-area: val; justify-self: end; align-self: center;
  background: var(--fg); color: var(--bg); border-radius: 999px; padding: .8cqh 3.4cqw; font-weight: 700; }
.rank.podium li.hero .name { grid-area: name; font-size: 18cqw; line-height: .9; letter-spacing: -.03em; }
.rank.podium li:nth-child(2) { rotate: 1.2deg; } .rank.podium li:nth-child(3) { rotate: -1deg; }
.rank.podium li:nth-child(4) { rotate: -.8deg; } .rank.podium li:nth-child(5) { rotate: 1.4deg; }
/* magazine: masthead on its own band, photo starts below it so faces are never behind the title */
.poster.mag:not(.og4) .mag-photo { inset: 21% 0 0 0; }
.poster.mag:not(.og4) .mag-photo img { object-position: 50% 0% !important; }
.poster.mag:not(.og4)::after {
  background: linear-gradient(180deg, #120d2b 0%, #120d2b 21%, rgba(18,13,43,.35) 25%, rgba(18,13,43,0) 34%,
                                      rgba(18,13,43,0) 50%, rgba(18,13,43,.92) 80%);
}
/* tiles with 5 rows: tighter so the list fits, #1 stays the biggest */
.rank.tiles.five { gap: 1.5cqh; }
.rank.tiles.five li { padding: 1.3cqh 5cqw; }
.rank.tiles.five .name { font-size: 7.4cqw; }
.rank.tiles.five li:first-child { padding-block: 1.8cqh; }
.rank.tiles.five li:first-child .name { font-size: 11cqw; }
/* tiles with 6 rows (stats): compact so they fit */
.stats.tiles.many { row-gap: 1.3cqh; margin-top: 2.4cqh; }
.stats.tiles.many li { padding: 1.1cqh 5cqw; column-gap: 3.5cqw; }
.stats.tiles.many .n { font-size: 10cqw; min-width: 17cqw; }
.stats.tiles.many .l { font-size: max(13px, 3.9cqw); font-weight: 650; }
/* numbers right-aligned in one column so each sits right next to its label */
.stats .n { text-align: right; }
.stats.tiles .n { text-align: right; min-width: 20cqw; }
.stats.tiles.many .n { min-width: 17cqw; }
.stats.tiles.few .n { min-width: 26cqw; }
