/* Choose Your ABG — styles.css
   The contract is DESIGN.md. Every colour, size and radius below is a token from it;
   a raw hex or px in a component rule is a bug (layout numbers that belong to one
   component, like the bow's overlap, are named where they are set). */

/* ───────────────────────── fonts (self-hosted, static, latin) ───────────────────────── */
/* Cherry Bomb One has one weight and no italic; M PLUS Rounded 1c ships 500 / 700 / 800.
   font-synthesis is off on html, so a missing weight or style is never faked. */
@font-face { font-family: "Cherry Bomb One"; font-style: normal; font-weight: 400; font-display: swap; src: url("/assets/fonts/cherry-bomb-one-latin.woff2") format("woff2"); }
@font-face { font-family: "M PLUS Rounded 1c"; font-style: normal; font-weight: 500; font-display: swap; src: url("/assets/fonts/mplus-rounded-500-latin.woff2") format("woff2"); }
@font-face { font-family: "M PLUS Rounded 1c"; font-style: normal; font-weight: 700; font-display: swap; src: url("/assets/fonts/mplus-rounded-700-latin.woff2") format("woff2"); }
@font-face { font-family: "M PLUS Rounded 1c"; font-style: normal; font-weight: 800; font-display: swap; src: url("/assets/fonts/mplus-rounded-800-latin.woff2") format("woff2"); }

/* ───────────────────────── tokens ───────────────────────── */
:root {
  color-scheme: light;

  /* neutrals: a plum-brown ramp steeped in strawberry milk */
  --boba: #43202f;
  --cocoa: #6e4353;
  --taro: #8a5a70;
  --mauve: #c49aae;
  --lace: #f0d5df;
  --blush: #fbe4ec;
  --strawberry-milk: #ffeaf2;
  --milk: #fff7fa;
  --white: #ffffff;

  /* the one accent */
  --cherry: #d81b60;
  --cherry-deep: #ad1457;
  --petal: #f7a8c4;
  --petal-strong: #f28db3;
  --petal-soft: #ffd8e8;

  /* the second player, and the colour of a good pick */
  --matcha: #8dbb6e;
  --matcha-strong: #7aab5a;
  --matcha-deep: #4d7a35;
  --matcha-ink: #3d6429;
  --matcha-soft: #e3f0d6;

  /* grounds */
  --dot: #f6d6e2;
  --gingham: rgb(247 168 196 / 0.22);

  /* type: candy sticker lettering for the voice, a rounded Japanese sans for everything else */
  --font-display: "Cherry Bomb One", ui-rounded, "Arial Rounded MT Bold", system-ui, sans-serif;
  --font-body: "M PLUS Rounded 1c", ui-rounded, system-ui, "Segoe UI", Roboto, sans-serif;
  --highlight: #ffc9dd; /* the marker band behind a headline's one emphasised word */

  --fs-hero: clamp(44px, 6.4vw, 96px);
  --fs-display-lg: clamp(34px, 4.4vw, 60px);
  --fs-display-md: clamp(24px, 2.2vw, 30px);
  --fs-number: 28px;
  --fs-lede: clamp(17px, 1.35vw, 20px);
  --fs-title: 18px;
  --fs-body: 16px;
  --fs-caption: 14px;
  --fs-micro: 12px;

  /* radii: three and the pill */
  --r-ctl: 12px;
  --r-card: 24px;
  --r-frame-sm: 20px; /* phone photo frame = 12px photo + 8px padding, the one derived radius */
  --r-pill: 999px;

  /* spacing */
  --gap: 12px;
  --pad: 24px;
  --section: 32px;
  --section-gap: 128px;
  --page-max: 1200px;
  --duel-max: 980px;
  --gutter: 32px;
  --topbar-h: 64px;

  /* elevation: paper on a table, one shadow, stitched edges */
  --shadow-paper: 0 1px 0 var(--lace), 0 24px 48px -30px rgb(67 32 47 / 0.40);
  --shadow-lift: 0 1px 0 var(--lace), 0 32px 64px -30px rgb(67 32 47 / 0.48);
  --stitch-w: 2px;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --dur-1: 140ms;
  --dur-2: 220ms;
  --dur-3: 320ms;
}

/* ───────────────────────── base ───────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; font-synthesis: none; }
body {
  position: relative;
  margin: 0;
  min-height: 100dvh;
  background-color: var(--milk);
  background-image: radial-gradient(var(--dot) 1.6px, transparent 1.9px);
  background-size: 26px 26px;
  color: var(--boba);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: 500;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
}
img { max-width: 100%; display: block; }
a { color: var(--cherry-deep); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
button { font: inherit; color: inherit; }
kbd {
  font: 800 var(--fs-micro)/1.4 var(--font-body);
  padding: 1px 6px;
  border-radius: var(--r-ctl);
  background: var(--white);
  border: 1px solid var(--lace);
  color: var(--taro);
}
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--cherry-deep); outline-offset: 2px; border-radius: var(--r-ctl); }
::selection { background: var(--petal-soft); }

.skip-link {
  position: absolute; left: var(--gap); top: -60px; z-index: 100;
  padding: 8px 14px; background: var(--boba); color: var(--white); border-radius: var(--r-pill);
}
.skip-link:focus { top: var(--gap); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ───────────────────────── type roles ───────────────────────── */
.hero__title,
.display-xl,
.display-lg,
.display-md,
.statement__line {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  text-wrap: balance;
}
.hero__title, .display-xl { font-size: var(--fs-hero); line-height: 1; letter-spacing: -0.005em; }
.display-lg, .statement__line { font-size: var(--fs-display-lg); line-height: 1.05; letter-spacing: 0; }
.display-md { font-size: var(--fs-display-md); line-height: 1.1; letter-spacing: 0; }
/* the emphasis: one word per headline sits on a marker band, like a highlighted purikura caption */
.hero__title em, .display-xl em, .display-lg em, .display-md em, .statement__line em, .feature__title em {
  font-style: normal;
  padding: 0 0.08em;
  border-radius: 0.16em;
  background: linear-gradient(transparent 56%, var(--highlight) 56%, var(--highlight) 94%, transparent 94%) 0 0 / 100% 100% no-repeat; /* sized, so fx.js can grow it in */
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.num { font-family: var(--font-body); font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.eyebrow {
  margin: 0;
  font: 800 var(--fs-micro)/1.3 var(--font-body);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cherry-deep);
}
.lede { margin: 0; max-width: 36em; font-size: var(--fs-lede); line-height: 1.5; color: var(--cocoa); text-wrap: pretty; }
.title { font-size: var(--fs-title); font-weight: 700; line-height: 1.3; }
.caption { font-size: var(--fs-caption); font-weight: 600; color: var(--taro); }
.micro {
  font-size: var(--fs-micro);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.3;
  color: var(--taro);
}

/* ───────────────────────── surfaces ───────────────────────── */
.card {
  position: relative;
  background: var(--white);
  border: 1px solid var(--lace);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-paper);
}
.card--raised { box-shadow: var(--shadow-lift); }
/* the stitch: a dashed thread 6px inside the edge */
.card--stitched::before {
  content: "";
  position: absolute;
  inset: 6px;
  border: var(--stitch-w) dashed var(--petal);
  border-radius: calc(var(--r-card) - 6px);
  pointer-events: none;
}
.well { background: var(--strawberry-milk); border-radius: var(--r-ctl); }
.skeleton {
  background: linear-gradient(90deg, var(--blush), var(--milk), var(--blush));
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
  border-radius: var(--r-ctl);
}
@keyframes shimmer { to { background-position: -200% 0; } }

[data-icon] { display: inline-flex; align-items: center; justify-content: center; line-height: 0; }
[data-icon] svg { width: 1.25em; height: 1.25em; }

/* ───────────────────────── controls ───────────────────────── */
.btn {
  --btn-bg: var(--white);
  --btn-fg: var(--boba);
  --btn-bg-hover: var(--blush);
  --btn-bd: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
  border: 1.5px solid var(--btn-bd);
  border-radius: var(--r-pill);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font: 700 var(--fs-body)/1 var(--font-body);
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  transition: transform var(--dur-1) var(--ease-out), background-color var(--dur-1), color var(--dur-1);
}
.btn:hover { background: var(--btn-bg-hover); text-decoration: none; }
.btn:active { transform: translateY(1px) scale(0.99); }
.btn:disabled { opacity: 0.55; cursor: default; transform: none; }
.btn--sm { min-height: 36px; padding: 0 14px; font-size: var(--fs-caption); }
.btn--lg { min-height: 56px; padding: 0 28px; font-size: var(--fs-title); }
.btn--cherry { --btn-bg: var(--cherry); --btn-fg: var(--white); --btn-bg-hover: var(--cherry-deep); }
/* the two Choose buttons: pastel flavours with dark text, so the faces stay louder than the controls */
.btn--petal { --btn-bg: var(--petal); --btn-fg: var(--boba); --btn-bg-hover: var(--petal-strong); }
.btn--matcha { --btn-bg: var(--matcha); --btn-fg: var(--boba); --btn-bg-hover: var(--matcha-strong); }
.btn--ink { --btn-bg: var(--boba); --btn-fg: var(--white); --btn-bg-hover: var(--cocoa); }
.btn--white { --btn-bg: var(--white); --btn-fg: var(--boba); --btn-bg-hover: var(--blush); }
.btn--soft { --btn-bg: var(--petal-soft); --btn-fg: var(--cherry-deep); --btn-bg-hover: var(--lace); }
.btn--ghost { --btn-bg: transparent; --btn-fg: var(--boba); --btn-bg-hover: var(--blush); --btn-bd: var(--lace); }
.btn kbd { margin-left: 2px; }

.chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px;
  border-radius: var(--r-pill);
  background: var(--blush);
  color: var(--cocoa);
  font: 700 var(--fs-caption)/1.4 var(--font-body);
  white-space: nowrap;
}
.chip [data-icon] svg, .chip svg { width: 1em; height: 1em; }
.chip--quiet { background: var(--white); color: var(--taro); box-shadow: inset 0 0 0 1px var(--lace); }
.chip--pink { background: var(--petal-soft); color: var(--cherry-deep); }
.chip--up { background: var(--matcha-soft); color: var(--matcha-ink); }
.chip--down { background: var(--blush); color: var(--cocoa); }

.segmented { display: inline-flex; padding: 4px; gap: 4px; border-radius: var(--r-pill); background: var(--blush); }
.segmented--full { display: flex; }
.segmented--full .segmented__btn { flex: 1; }
.segmented__btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 36px; padding: 0 16px;
  border: 0; border-radius: var(--r-pill);
  background: transparent; color: var(--taro);
  font: 700 var(--fs-body)/1 var(--font-body);
  cursor: pointer;
  transition: background-color var(--dur-1), color var(--dur-1);
}
.segmented__btn[aria-selected="true"] { background: var(--white); color: var(--cherry-deep); }

.field { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; border: 0; min-width: 0; }
.field__label { font-size: var(--fs-caption); font-weight: 800; color: var(--cocoa); }
.field__input {
  font: 600 var(--fs-body)/1.2 var(--font-body);
  color: var(--boba);
  min-height: 48px;
  padding: 0 16px;
  border: 1.5px solid var(--lace);
  border-radius: var(--r-ctl);
  background: var(--milk);
  width: 100%;
}
.field__input::placeholder { color: var(--taro); font-weight: 500; }
.field__hint { display: block; margin-top: 2px; }
.field__input:focus { outline: 0; border-color: var(--cherry-deep); box-shadow: 0 0 0 3px var(--petal-soft); background: var(--white); }
.field--radios { gap: 8px; }
.field--radios legend { padding: 0; margin-bottom: 4px; }
.radio {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border: 1.5px solid var(--lace); border-radius: var(--r-ctl); background: var(--white);
  font-weight: 700; cursor: pointer;
}
.radio input { accent-color: var(--cherry); width: 18px; height: 18px; margin: 0; }
.radio:has(input:checked) { border-color: var(--cherry); background: var(--milk); }
.linkbtn { background: none; border: 0; padding: 0; color: var(--cherry-deep); font-weight: 800; cursor: pointer; }
.linkbtn:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ───────────────────────── top bar ───────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 40;
  background: var(--milk);
  border-bottom: 1px solid var(--lace);
}
.topbar__inner {
  max-width: var(--page-max);
  margin: 0 auto;
  height: var(--topbar-h);
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: var(--pad);
}
.brand { justify-self: start; display: inline-flex; align-items: center; gap: 10px; color: var(--cherry); min-width: 0; }
.brand:hover { text-decoration: none; }
/* the logo mark (the portrait from the app icon, tools/build-logo.py) with the brand's vector
   bow on its top edge; the full icon's lace and cloud turn to noise at this size */
.brand__mark { position: relative; flex: none; width: 52px; height: 52px; }
.brand__logo { display: block; width: 52px; height: 52px; filter: drop-shadow(0 2px 3px rgba(67, 32, 47, 0.2)); }
.brand__bow { position: absolute; left: 50%; top: -6px; width: 34px; height: auto; translate: -50% 0; }
@media (hover: hover) and (pointer: fine) {
  .brand__mark { transition: rotate var(--dur-2) var(--ease-out), scale var(--dur-2) var(--ease-out); }
  .brand:hover .brand__mark { rotate: -6deg; scale: 1.06; }
}
@media (prefers-reduced-motion: reduce) {
  .brand:hover .brand__mark { rotate: none; scale: none; }
}
.brand__word {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 23px;
  line-height: 1;
  white-space: nowrap;
}

.nav { justify-self: center; display: flex; gap: 28px; }
.nav__link {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px;
  color: var(--boba);
  font-weight: 600;
  transition: color var(--dur-1);
}
.nav__link:hover { color: var(--cherry); text-decoration: none; }
.nav__link[aria-current="page"] { color: var(--cherry); }
.nav__link[aria-current="page"] .nav__label { text-decoration: underline wavy var(--petal) 2px; text-underline-offset: 7px; }
.nav__icon { display: none; }
.nav__icon svg { width: 20px; height: 20px; }

.topbar__actions { justify-self: end; display: flex; align-items: center; gap: 6px; }
.iconbtn {
  width: 44px; height: 44px; border: 0; border-radius: 50%;
  display: grid; place-items: center;
  background: transparent; color: var(--boba); cursor: pointer;
  transition: background-color var(--dur-1);
}
.iconbtn:hover { background: var(--blush); }
.iconbtn[aria-pressed="false"] { color: var(--taro); }
.iconbtn svg { width: 20px; height: 20px; }
a.iconbtn:hover { text-decoration: none; }
/* "buy $ABG": the Ink pill, so the Cherry claim pill stays the one Cherry control in the bar */
.buybtn {
  display: inline-flex; align-items: center; gap: 7px;
  min-height: 40px; padding: 0 16px 0 12px; margin-right: 4px;
  border-radius: var(--r-pill);
  background: var(--boba); color: var(--white);
  font-weight: 700; white-space: nowrap;
  transition: background-color var(--dur-1);
}
.buybtn:hover { background: var(--cocoa); text-decoration: none; }
.buybtn svg { width: 18px; height: 18px; }

.account {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 3px 12px 3px 3px;
  border: 0; border-radius: var(--r-pill);
  background: var(--white); box-shadow: inset 0 0 0 1.5px var(--lace);
  color: var(--boba);
  font-weight: 700; cursor: pointer;
  transition: background-color var(--dur-1);
}
.account:hover { background: var(--blush); }
.account__avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.account__label { white-space: nowrap; }
.account__score { font-size: var(--fs-caption); line-height: 24px; padding: 0 9px; border-radius: var(--r-pill); background: var(--petal-soft); color: var(--cherry-deep); }
.account--claim { background: var(--cherry); color: var(--white); box-shadow: none; padding: 3px 6px 3px 18px; }
.account--claim:hover { background: var(--cherry-deep); }
.account--claim .account__score { background: var(--white); color: var(--cherry-deep); }

/* ───────────────────────── page shell ───────────────────────── */
/* full width so the gingham band can bleed; each view sets its own measure */
.page { flex: 1; width: 100%; padding: 0 var(--gutter) var(--section); overflow-x: clip; }
.page:focus { outline: 0; }
.view { position: relative; }

/* ───────────────────────── hero + duel ───────────────────────── */
.hero { padding-top: 28px; text-align: center; }
.hero__title { color: var(--cherry); }
.hero__title > span, .hero__title > em { display: inline; }

.duel { position: relative; width: 100%; max-width: var(--duel-max); margin: 30px auto 0; }
.duel__mascot {
  position: absolute; bottom: 70px; z-index: 0;
  width: 190px; height: auto;
  pointer-events: none; user-select: none;
}
.duel__mascot--left { left: -148px; rotate: -8deg; }
.duel__mascot--right { right: -148px; rotate: 8deg; }

.arena {
  position: relative; z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 84px;
  align-items: start;
}
.contender {
  --side: var(--petal);
  display: flex; flex-direction: column; gap: 14px;
  min-width: 0;
}
.contender--right { --side: var(--matcha); }
.contender__frame {
  position: relative;
  padding: 12px;
  background: var(--white);
  border: 1px solid var(--lace);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-paper);
  cursor: pointer;
}
.contender__frame::before {
  content: "";
  position: absolute; inset: 5px; z-index: 1;
  border: var(--stitch-w) dashed var(--side);
  border-radius: calc(var(--r-card) - 5px);
  pointer-events: none;
}
.contender__bow {
  position: absolute; left: 50%; top: -32px; z-index: 3;
  width: 92px; height: auto;
  translate: -50% 0;
  pointer-events: none;
}
.contender__photo-wrap {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: var(--r-ctl);
  overflow: hidden;
  background: var(--blush);
  isolation: isolate;
}
.contender__photo { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; }
.contender__photo[src=""] { visibility: hidden; }
.contender__skeleton { position: absolute; inset: 0; border-radius: 0; }
.contender[data-loaded="true"] .contender__skeleton { display: none; }
.contender__stamp {
  position: absolute; inset: 0; z-index: 2;
  display: grid; place-items: center;
  pointer-events: none;
  opacity: 0;
}
.contender__stamp:not(:empty) { opacity: 1; }
.contender__stamp img, .contender__stamp svg { width: 40%; height: auto; }

/* name tag: a white label pinned to the bottom of the photo */
.contender__meta {
  position: absolute; left: 24px; right: 24px; bottom: 24px; z-index: 2;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 8px;
  pointer-events: none;
}
.contender__name {
  margin: 0;
  min-width: 0;
  padding: 7px 16px 9px;
  border-radius: var(--r-pill);
  background: var(--white);
  font: 400 var(--fs-display-md)/1.05 var(--font-display);
  color: var(--boba);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.chips { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; pointer-events: auto; }
.contender .chip { background: var(--white); color: var(--boba); padding: 6px 12px; }
.contender__choose { width: 100%; }
.contender__choose > span:last-child { overflow: hidden; text-overflow: ellipsis; }

.vs {
  position: absolute; left: 50%; top: 42%; z-index: 4;
  width: 128px; aspect-ratio: 1;
  translate: -50% -50%;
  display: grid; place-items: center;
  pointer-events: none;
}
.vs img { position: absolute; inset: 0; width: 100%; height: 100%; }
.vs__word {
  position: relative;
  font: 400 44px/1 var(--font-display);
  color: var(--cherry);
  translate: 0 -3px;
}
.arena[aria-busy="true"] .contender__choose, .arena[data-busy="true"] .contender__choose { pointer-events: none; }

.taste-delta {
  position: absolute; left: 50%; top: 62%; z-index: 5;
  translate: -50% -50%;
  padding: 6px 18px;
  border: 2px solid var(--boba);
  border-radius: var(--r-pill);
  background: var(--white); color: var(--boba);
  box-shadow: 3px 3px 0 var(--boba);
  font-size: var(--fs-number);
  pointer-events: none;
}
.taste-delta--up { color: var(--matcha-ink); }
.taste-delta--down { color: var(--cocoa); }

.arena-tools { width: 100%; max-width: var(--duel-max); margin: 22px auto 0; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.taste-line { margin: 0; min-height: 30px; text-align: center; font-size: var(--fs-lede); font-weight: 600; color: var(--cocoa); }
.taste-line b { color: var(--cherry-deep); }
.taste-line .chip { margin-right: 6px; }
.arena-tools__row { display: flex; align-items: center; justify-content: center; gap: var(--gap); }
.arena-note { margin: 0; text-align: center; }
.hint { display: inline-flex; align-items: center; gap: 4px; font: 700 var(--fs-caption)/1 var(--font-body); color: var(--taro); }

/* ───────────────────────── how it scores (gingham band) ───────────────────────── */
.band {
  position: relative;
  margin: var(--section-gap) calc(var(--gutter) * -1) 0;
  padding-block: 112px 124px;
  background-color: var(--strawberry-milk);
  background-image:
    linear-gradient(90deg, var(--gingham) 50%, transparent 50%),
    linear-gradient(var(--gingham) 50%, transparent 50%);
  background-size: 44px 44px;
}
.band::before, .band::after, .footer::before {
  content: "";
  position: absolute; left: 0; right: 0; z-index: 1;
  height: 22px;
  background: url("/assets/art/lace-x.svg") repeat-x 0 0 / 48px 22px;
  pointer-events: none;
}
.band::before, .footer::before { top: 0; }
.band::after { bottom: 0; transform: scaleY(-1); }
.band__inner {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex; flex-direction: column; align-items: center; gap: 16px;
  text-align: center;
}
.band__title, .teaser__title { color: var(--cherry); }
.band__stat { margin: 0; font-weight: 600; color: var(--taro); }
.band__stat .num { color: var(--boba); }

.features { width: 100%; margin-top: 44px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--pad); text-align: left; }
.feature { padding: 30px 30px 34px; display: flex; flex-direction: column; gap: 10px; }
.feature__art { position: relative; display: block; width: 172px; height: 124px; margin-bottom: 12px; }
.feature__art img { position: absolute; left: 0; top: 0; width: auto; height: 124px; filter: drop-shadow(0 6px 10px rgba(67, 32, 47, 0.14)); }
.feature__art .feature__accent { left: 98px; top: 58px; height: 66px; rotate: 12deg; }
.feature__title {
  margin: 0;
  font: 400 var(--fs-display-md)/1.1 var(--font-display);
  color: var(--boba);
}
.feature__title em { color: var(--cherry); }
.feature__num { font-size: 0.92em; }
.feature__copy { margin: 0; color: var(--cocoa); }

/* ───────────────────────── the board teaser ───────────────────────── */
.teaser { width: 100%; max-width: var(--duel-max); margin: var(--section-gap) auto 0; display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; }
.rows.rows--teaser {
  width: 100%;
  margin: 28px 0 12px;
  padding: 18px 20px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(5, auto);
  grid-auto-flow: column;
  column-gap: var(--pad);
  text-align: left;
}
.rows--teaser .row { border-bottom: 1px solid var(--blush); }
.rows--teaser .row:nth-child(5n), .rows--teaser .row:last-child { border-bottom: 0; }
.rows--teaser .board-empty { grid-column: 1 / -1; }

/* ───────────────────────── statement ───────────────────────── */
.statement { margin-top: var(--section-gap); padding-bottom: 32px; display: flex; flex-direction: column; align-items: center; gap: 28px; text-align: center; }
.statement__line { max-width: 17ch; color: var(--cherry); }

/* ───────────────────────── rows (rail + page) ───────────────────────── */
/* One voter per line: rank disc, avatar, name (the link to /u/<name>), score in the rounded sans,
   tabular with the tier under it. Rank 1 is Petal Soft, your row is Matcha Soft. */
.rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.row {
  position: relative;
  display: grid;
  grid-template-columns: 32px 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--gap);
  padding: 10px 12px;
  border-radius: var(--r-ctl);
  border-bottom: 1px solid var(--blush);
  transition: background-color var(--dur-1);
}
.row:last-child, .row:has(+ .rows__gap) { border-bottom: 0; }
.row:hover { background: var(--strawberry-milk); }
.row:has(.row__name a:focus-visible) { outline: 3px solid var(--cherry-deep); outline-offset: 2px; }
.row__rank {
  display: grid; place-items: center;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--blush);
  color: var(--cocoa);
  font: 800 var(--fs-caption)/1 var(--font-body);
  font-variant-numeric: tabular-nums;
}
.row__rank--1 { background: var(--cherry); color: var(--white); }
.row__rank--2 { background: var(--petal); color: var(--boba); }
.row__rank--3 { background: var(--matcha); color: var(--boba); }
.row__avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: var(--milk); box-shadow: 0 0 0 2px var(--white), 0 0 0 3.5px var(--lace); }
.row__name { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.row__line { min-width: 0; display: flex; align-items: center; gap: 8px; }
.row__name a { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; color: var(--boba); }
.row__name a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.row__name a:hover { color: var(--cherry-deep); text-decoration: none; }
.row__name a:focus-visible { outline: 0; }
.row__sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--fs-caption); font-weight: 600; color: var(--taro); }
.row__sub svg { width: 12px; height: 12px; margin-right: 3px; vertical-align: -1px; }
.row__you {
  flex: none;
  padding: 3px 8px;
  border-radius: var(--r-pill);
  background: var(--white);
  color: var(--matcha-ink);
  font: 800 var(--fs-micro)/1 var(--font-body);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.row__score { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; text-align: right; }
.row__score .num { font-size: 20px; line-height: 1; color: var(--boba); }
.row__tier { font: 800 var(--fs-micro)/1 var(--font-body); letter-spacing: 0.08em; text-transform: uppercase; color: var(--taro); }
.row--first, .row--first:hover { background: var(--petal-soft); }
.row--first .row__score .num { color: var(--cherry-deep); }
.row--first .row__tier, .row--first .row__sub { color: var(--cocoa); }
/* your row: matcha, the colour of a good pick; pinned, it also gets the stitch */
.row--me, .row--me:hover { background: var(--matcha-soft); }
.row--me .row__rank { background: var(--white); color: var(--matcha-ink); }
.row--me .row__avatar { box-shadow: 0 0 0 2px var(--white), 0 0 0 4px var(--matcha); }
.row--me .row__score .num, .row--me .row__tier, .row--me .row__sub { color: var(--matcha-ink); }
.row--pinned::before {
  content: "";
  position: absolute; inset: 4px;
  border: var(--stitch-w) dashed var(--matcha);
  border-radius: calc(var(--r-ctl) - 4px);
  pointer-events: none;
}
.rows__gap {
  display: flex; align-items: center; gap: var(--gap);
  padding: 18px 12px 10px;
  font: 800 var(--fs-micro)/1 var(--font-body);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--matcha-ink);
}
.rows__gap::before, .rows__gap::after { content: ""; flex: 1; border-top: var(--stitch-w) dashed var(--lace); }
.row.row--skeleton { grid-template-columns: minmax(0, 1fr); padding: 8px 12px; } /* two classes so the phone row columns cannot split the bar */
.row--skeleton .skeleton { display: block; height: 40px; }
.rows--board { padding: 14px; }
.rows--board .row { padding: 12px 16px; }
.rows--board .row__score .num { font-size: 22px; }

/* ───────────────────────── leaderboard page ───────────────────────── */
.board { max-width: 860px; margin: 0 auto; padding-top: 48px; display: flex; flex-direction: column; gap: var(--section); }
.board__head { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.board__head .display-lg { color: var(--cherry); }
.board__sub { margin: 0; color: var(--cocoa); font-size: var(--fs-lede); }
.board__foot { display: flex; justify-content: center; }
.board__foot:has(> [data-load-more][hidden]) { display: none; }

/* The podium: three paper cards on a shared baseline. First place stands in the middle,
   stitched, with the bow on its top edge and the avatar on a doily; second and third are
   plain paper in the duel's two flavours, Petal on the left and Matcha on the right. */
.podium {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) minmax(0, 1fr);
  align-items: end;
  gap: var(--pad);
  margin-top: 28px; /* room for the bow above first place */
}
.podium:empty { display: none; }
.podium__slot {
  --ring: var(--lace);
  --tag: var(--blush);
  --tag-ink: var(--cocoa);
  min-width: 0;
  display: flex; flex-direction: column; align-items: center;
  padding: 30px 16px 28px;
  text-align: center;
  color: var(--boba);
}
a.podium__slot { text-decoration: none; transition: transform var(--dur-2) var(--ease-out); }
a.podium__slot:hover { text-decoration: none; transform: translateY(-3px); }
.podium__slot--1 { order: 2; --ring: var(--cherry); --tag: var(--petal-soft); --tag-ink: var(--cherry-deep); padding: 34px 20px 32px; box-shadow: var(--shadow-lift); }
.podium__slot--2 { order: 1; --ring: var(--petal); --tag: var(--blush); --tag-ink: var(--cherry-deep); }
.podium__slot--3 { order: 3; --ring: var(--matcha); --tag: var(--matcha-soft); --tag-ink: var(--matcha-ink); }

.podium__bow { position: absolute; left: 50%; top: -38px; z-index: 2; width: 112px; height: auto; translate: -50% 0; pointer-events: none; }
.podium__pic { position: relative; display: grid; place-items: center; margin-bottom: 26px; }
.podium__avatar, .podium__hole { position: relative; width: 88px; height: 88px; border-radius: 50%; }
.podium__avatar { object-fit: cover; background: var(--milk); box-shadow: 0 0 0 3px var(--white), 0 0 0 6px var(--ring); }
.podium__hole { display: block; border: var(--stitch-w) dashed var(--mauve); background: var(--milk); }
.podium__rank {
  position: absolute; left: 50%; bottom: -15px;
  translate: -50% 0;
  display: grid; place-items: center;
  min-width: 30px; height: 30px; padding: 0 8px;
  border-radius: var(--r-pill);
  background: var(--ring);
  color: var(--boba);
  box-shadow: 0 0 0 3px var(--white);
  font: 800 var(--fs-caption)/1 var(--font-body);
  font-variant-numeric: tabular-nums;
}
.podium__slot--1 .podium__pic { width: 196px; height: 196px; margin: -10px 0 8px; }
.podium__slot--1 .podium__avatar, .podium__slot--1 .podium__hole { width: 116px; height: 116px; }
.podium__slot--1 .podium__rank { bottom: 22px; min-width: 36px; height: 36px; background: var(--cherry); color: var(--white); font-size: var(--fs-body); }
.podium__doily { position: absolute; inset: 0; width: 100%; height: 100%; }
.podium__sparkle { position: absolute; top: 10px; right: 8px; width: 46px; height: auto; rotate: 10deg; }
.podium__eyebrow { margin-bottom: 8px; }
.podium__name {
  max-width: 100%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font: 400 22px/1.2 var(--font-display);
}
.podium__slot--1 .podium__name { font-size: var(--fs-display-md); }
.podium__score { margin-top: 10px; font-size: var(--fs-number); line-height: 1; }
.podium__slot--1 .podium__score { font-size: 44px; }
.podium__tags { max-width: 100%; margin-top: 12px; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.podium__tier, .podium__you {
  max-width: 100%;
  padding: 4px 12px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  border-radius: var(--r-pill);
  background: var(--tag);
  color: var(--tag-ink);
  font: 800 var(--fs-micro)/1.3 var(--font-body);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.podium__you { background: var(--matcha-soft); color: var(--matcha-ink); }
.podium__slot--open .podium__name { color: var(--taro); }
.podium__slot--open .podium__rank { background: var(--blush); color: var(--taro); }
.podium__slot--loading .podium__hole { border: 0; }
.podium__bar { display: block; width: 70%; height: 18px; margin-top: 10px; }
.podium__bar--short { width: 44%; }

/* nobody on the board yet: Momo, one line in the columnist's voice, one way back to voting */
.board-blank { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 40px var(--pad) 44px; text-align: center; }
.board-blank__art { width: 128px; height: auto; margin-bottom: 4px; }
.board-blank__title { color: var(--boba); }
.board-blank__title em { color: var(--cherry); }
.board-blank__copy { margin: 0 0 12px; max-width: 30em; color: var(--cocoa); }

.board-empty { padding: var(--section); text-align: center; color: var(--taro); font-weight: 700; }

/* ───────────────────────── stats + profile shells ───────────────────────── */
.view--stats { max-width: 960px; margin: 0 auto; padding-top: 48px; }
.view--profile { max-width: 760px; margin: 0 auto; padding-top: 48px; }

/* ───────────────────────── footer ───────────────────────── */
.footer { position: relative; margin-top: var(--section-gap); background: var(--strawberry-milk); overflow: hidden; }
.footer__inner {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 64px var(--gutter) 0;
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
  gap: 16px 40px;
}
.footer__line {
  flex: 1 1 360px;
  max-width: 46ch;
  margin: 0;
  font: 400 var(--fs-lede)/1.5 var(--font-display);
  color: var(--cocoa);
}
.footer__links { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.footer__links a { font-weight: 700; color: var(--boba); }
.footer__links a:hover { color: var(--cherry-deep); }
.footer__year { flex-basis: 100%; font-size: var(--fs-caption); font-weight: 600; color: var(--taro); }
.footer__giant {
  margin: 36px 0 0;
  font: 400 9.4vw/0.9 var(--font-display);
  letter-spacing: -0.01em;
  color: var(--cherry);
  text-align: center;
  white-space: nowrap;
  translate: 0 12%;
  user-select: none;
}

/* ───────────────────────── stickers ───────────────────────── */
/* Die-cut ABG cutouts (assets/stickers/abg, dealt at random by js/stickers.js), 3D emoji
   (assets/stickers/emoji) and a few Sanrio friends (assets/sanrio), grouped in clusters around the
   content. They flank, perch or peek; they never cover a photo, a name, a number, copy or a
   control, and where a width has no empty space for them they are hidden at that width.
   js/fx.js pops them in and makes them answer a hover, a click and a tap; with a mouse, cluster
   stickers can be flung, and spring home. The idle bob is a CSS animation (it costs the main
   thread nothing) and runs only while its cluster is on screen (.is-live, set by fx.js).
   Pixel stickers scale by whole numbers only, so their pixels stay square.
   Each sticker places itself with --x/--y inside its cluster, --h is its height and --r its tilt;
   sizes and positions are multiplied by the cluster's --k, which the breakpoints below set. */
.cluster {
  --k: 1;
  position: absolute; z-index: 2;
  width: calc(var(--cw, 250px) * var(--k)); height: calc(var(--ch, 280px) * var(--k));
  translate: var(--lx, 0px) var(--ly, 0px); /* the lean toward the mouse, fx.js */
  pointer-events: none;
}
.sticker { position: absolute; left: calc(var(--x, 0px) * var(--k)); top: calc(var(--y, 0px) * var(--k)); rotate: var(--r, 0deg); pointer-events: auto; user-select: none; -webkit-tap-highlight-color: transparent; }
.sticker > img { display: block; width: auto; max-width: none; height: calc(var(--h, 120px) * var(--k)); filter: drop-shadow(0 6px 10px rgba(67, 32, 47, 0.16)); -webkit-user-drag: none; }
.sticker > img:not([src]), .footer__abg:not([src]) { visibility: hidden; }
.sticker.is-draggable { cursor: grab; touch-action: none; }
.sticker.is-held { z-index: 5; cursor: grabbing; }
/* the sticker's top edge is the top of her hair, so the crown must sit almost wholly above it;
   img.sticker__crown outranks .sticker > img, which would otherwise give it the cutout's height */
.sticker > img.sticker__crown { position: absolute; left: 50%; top: calc(-58px * var(--k)); width: calc(64px * var(--k)); height: calc(64px * var(--k)); translate: -50% 0; rotate: 14deg; pointer-events: none; }

/* the idle bob, on the picture, so GSAP's squish and drag on the sticker never fight it
   (easeInOutSine: a float, not a UI transition) */
@keyframes sticker-bob {
  from { transform: translateY(0) rotate(-2.5deg); }
  to { transform: translateY(-8px) rotate(2.5deg); }
}
.cluster .sticker > img:not(.sticker__crown), .footer__abg { animation: sticker-bob 3s cubic-bezier(0.37, 0, 0.63, 1) infinite alternate paused; }
.cluster .sticker:nth-child(2) > img { animation-duration: 3.6s; animation-delay: -1.2s; }
.cluster .sticker:nth-child(3) > img { animation-duration: 2.7s; animation-delay: -0.6s; }
.footer__abg:nth-child(3) { animation-duration: 3.4s; animation-delay: -1s; }
/* [src]: an empty slot is hidden, and a hidden element's animation cannot go to the compositor, so it
   would tick on the main thread for nothing (measured: 70ms per second on a throttled phone) */
.cluster.is-live .sticker > img[src], .footer__friends.is-live .footer__abg[src] { animation-play-state: running; }

/* fx.js: split headline letters, the click bursts, the magnetic lean, what the mouse can play with */
.fx-word, .fx-char { display: inline-block; }
.fx-burst { position: fixed; inset: 0; z-index: 85; overflow: hidden; pointer-events: none; }
.fx-bit { position: absolute; left: 0; top: 0; display: block; }
.fx-bit svg { display: block; width: 100%; height: 100%; }
.fx-bit--cherry { color: var(--cherry); }
.fx-bit--petal { color: var(--petal-strong); }
.fx-bit--matcha { color: var(--matcha); }
.fx-magnet { translate: var(--mx, 0px) var(--my, 0px); }
@media (hover: hover) and (pointer: fine) {
  .sticker, .ribbon__item, .footer__friends img, .feature__art { cursor: pointer; }
  .duel__mascot { pointer-events: auto; cursor: pointer; }
}
@media (prefers-reduced-motion: reduce) {
  /* the same selectors as the bob itself: a less specific one loses (:not() counts as a class) */
  .cluster .sticker > img:not(.sticker__crown), .footer__abg { animation: none; }
}

/* the sticker ribbon: every cutout, some emoji and caption chips on a stitched Petal Soft strip,
   two identical runs so js/fx.js can slide the track by half its width and wrap without a seam
   (items carry their own right margin: a flex gap would leave the halves one gap apart) */
.ribbon { position: relative; margin: 96px calc(var(--gutter) * -1) 0; padding-block: 36px; overflow: hidden; background: var(--petal-soft); border-block: var(--stitch-w) dashed var(--petal); }
.ribbon__track { display: flex; align-items: center; width: max-content; }
.ribbon__item { flex: none; display: block; margin-right: 36px; }
.ribbon__pic { display: block; width: auto; height: 184px; rotate: -4deg; filter: drop-shadow(0 6px 10px rgba(67, 32, 47, 0.14)); }
.ribbon__item--tilt .ribbon__pic { rotate: 5deg; }
.ribbon__emoji { display: block; width: auto; height: 96px; }
.ribbon__chip {
  padding: 12px 24px;
  border-radius: var(--r-pill);
  background: var(--cherry);
  color: var(--white);
  font: 400 32px/1 var(--font-display);
  white-space: nowrap;
  rotate: -3deg;
  box-shadow: 0 0 0 4px var(--white);
}
.ribbon__chip:nth-child(8n + 4) { background: var(--matcha); color: var(--boba); rotate: 3deg; }

.hero { position: relative; }
.hero__cluster { --cw: 270px; --ch: 290px; top: 6px; } /* any higher and the sticky top bar trims her hair */
.hero__cluster--left { left: max(0px, calc(50% - 720px)); }
.hero__cluster--right { right: max(0px, calc(50% - 720px)); }

.band__inner { position: relative; }
.band__cluster { --cw: 290px; --ch: 300px; top: -64px; }
.band__cluster--left { left: 0; }
.band__cluster--right { right: 0; }

.teaser { position: relative; }
.rows.rows--teaser { position: relative; z-index: 1; }
.teaser__cluster { --cw: 200px; --ch: 250px; z-index: 0; top: 8px; right: 12px; } /* she peeks from behind the card's top edge */

.statement { position: relative; }
.statement__cluster { --cw: 320px; --ch: 320px; top: -70px; }
.statement__cluster--left { left: max(0px, calc(50% - 700px)); }
.statement__cluster--right { right: max(0px, calc(50% - 700px)); }

.footer__friends { position: relative; z-index: 1; margin: 44px auto -6px; display: flex; justify-content: center; align-items: flex-end; gap: 56px; pointer-events: none; }
.footer__friends img { height: 120px; width: auto; pointer-events: auto; }
.footer__friends img:not([data-abg]) { image-rendering: pixelated; }
.footer__friends .footer__abg { height: 184px; filter: drop-shadow(0 6px 10px rgba(67, 32, 47, 0.16)); }

/* JS-built surfaces get their sticker as a pseudo-element, so the markup contracts stay put */
.board__head { position: relative; }
.board__head::after {
  content: ""; position: absolute; right: 16px; top: 22px;
  width: 96px; aspect-ratio: 1;
  background: url("/assets/stickers/emoji/cherry-blossom.webp") center / contain no-repeat;
  rotate: 8deg; pointer-events: none;
}
.podium__slot--1::after {
  content: ""; position: absolute; left: -26px; top: -44px; z-index: 3;
  width: 80px; aspect-ratio: 1;
  background: url("/assets/stickers/emoji/crown.webp") center / contain no-repeat;
  rotate: -14deg; pointer-events: none;
}

/* Sticker breakpoints. Wide screens grow the side clusters; below the width where the sides have
   room, a section's clusters move into a zone reserved above its first line (--zone-k scales them),
   so they are big on tablets and phones too without ever sitting on copy. */
@media (min-width: 1680px) {
  .hero__cluster, .band__cluster, .statement__cluster { --k: 1.2; }
  /* the band's content box stays 1200 wide, so the bigger clusters step out of it */
  .band__cluster--left { left: -130px; }
  .band__cluster--right { right: -130px; }
  .hero__cluster--left { left: calc(50% - 840px); }
  .hero__cluster--right { right: calc(50% - 840px); }
  .statement__cluster--left { left: calc(50% - 800px); }
  .statement__cluster--right { right: calc(50% - 800px); }
}
@media (max-width: 1399px) {
  .hero__cluster { --k: 0.8; }
  .hero__cluster--left { left: max(0px, calc(50% - 620px)); }
  .hero__cluster--right { right: max(0px, calc(50% - 620px)); }
}
@media (max-width: 1199px) {
  :root { --zone-k: 0.85; }
  .hero__cluster { display: none; } /* the first screen belongs to the duel */
  .band__inner { padding-top: calc(300px * var(--zone-k)); }
  .band__cluster { --k: var(--zone-k); top: 0; }
  .band__cluster--left { left: var(--gutter); }
  .band__cluster--right { right: var(--gutter); }
}
@media (max-width: 1279px) {
  .statement { padding-top: calc(320px * var(--zone-k, 0.85)); }
  .statement__cluster { --k: var(--zone-k, 0.85); top: 0; }
  .statement__cluster--left { left: 0; }
  .statement__cluster--right { right: 0; }
}
@media (max-width: 960px) {
  .teaser__cluster { --k: 0.85; top: 36px; right: 0; }
  .board__head::after { display: none; }
}
@media (max-width: 720px) {
  :root { --zone-k: 0.62; }
  .teaser { padding-top: 176px; } /* the lede wraps to two lines here, so she moves above the eyebrow */
  .teaser__cluster { --k: 0.72; z-index: 2; top: 0; right: auto; left: calc(50% - 72px); }
  .feature__art { width: 150px; height: 108px; }
  .feature__art img { height: 108px; }
  .feature__art .feature__accent { left: 84px; top: 50px; height: 58px; }
  .ribbon { margin-top: 72px; padding-block: 24px; }
  .ribbon__item { margin-right: 22px; }
  .ribbon__pic { height: 128px; }
  .ribbon__emoji { height: 66px; }
  .ribbon__chip { padding: 9px 16px; font-size: 22px; box-shadow: 0 0 0 3px var(--white); }
  .footer__friends { gap: 14px; margin-top: 34px; }
  .footer__friends .footer__abg { height: 132px; }
  .footer__friends img:nth-child(n + 4) { display: none; }
  .podium__slot--1::after { left: -8px; top: -30px; width: 52px; }
}

/* ───────────────────────── toast ───────────────────────── */
.toast {
  position: fixed; left: 50%; bottom: var(--pad); z-index: 90;
  transform: translateX(-50%);
  max-width: min(480px, calc(100% - 2 * var(--gutter)));
  padding: 12px 20px;
  border-radius: var(--r-pill);
  background: var(--boba); color: var(--white);
  font-weight: 700; font-size: var(--fs-caption);
  box-shadow: var(--shadow-lift);
  animation: rise 240ms var(--ease-out);
}
.toast--error { background: var(--cherry-deep); }
.toast--ok { background: var(--matcha-ink); }
body:has([data-onboard]:not([hidden])) .toast { bottom: auto; top: calc(var(--topbar-h) + 12px); }

/* ───────────────────────── motion ───────────────────────── */
@keyframes pop { from { transform: scale(0.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes rise { from { transform: translate(-50%, 12px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }
@keyframes slidein { from { transform: translateY(10px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.arena[data-enter="true"] .contender { animation: slidein 320ms var(--ease-out); }

@media (hover: none) {
  .hint, .btn kbd { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .skeleton, .toast { animation: none; }
}

/* ───────────────────────── responsive ───────────────────────── */
@media (max-width: 1320px) {
  .duel__mascot { width: 150px; bottom: 80px; }
  .duel__mascot--left { left: -112px; }
  .duel__mascot--right { right: -112px; }
}
@media (max-width: 1200px) {
  .duel__mascot { display: none; }
}
@media (max-width: 960px) {
  :root { --gutter: 20px; --section-gap: 96px; }
  .topbar__inner { grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; }
  .nav { justify-self: end; gap: 2px; }
  .nav__label { display: none; }
  .nav__icon { display: inline-flex; }
  .nav__link { width: 44px; border-radius: 50%; }
  .nav__link[aria-current="page"] { background: var(--petal-soft); }
  .features { grid-template-columns: minmax(0, 1fr); max-width: 520px; }
  .rows.rows--teaser { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; grid-auto-flow: row; max-width: 560px; }
  .rows--teaser .row:nth-child(5n) { border-bottom: 1px solid var(--blush); }
  .rows--teaser .row:nth-child(n + 6) { display: none; }
  .rows--teaser .row:nth-child(5) { border-bottom: 0; }
  .band { padding-block: 88px 96px; }
}
@media (max-width: 720px) {
  :root { --section-gap: 80px; }
  .hero { padding-top: 22px; }
  .duel { margin-top: 26px; }
  .arena { gap: 12px; }
  .contender { gap: 10px; }
  .contender__frame { padding: 8px; border-radius: var(--r-frame-sm); }
  .contender__frame::before { inset: 3px; border-width: 1.5px; border-radius: calc(var(--r-frame-sm) - 3px); }
  .contender__bow { width: 56px; top: -19px; }
  .contender__meta { position: static; padding: 8px 6px 6px; }
  .contender__name { padding: 0 0 2px; background: none; font-size: 19px; line-height: 1.2; }
  .chips { display: none; }
  .contender__choose { min-height: 48px; padding: 0 12px; font-size: var(--fs-body); }
  .contender__choose [data-name-btn] { display: none; }
  .vs { width: 70px; top: 38%; }
  .vs__word { font-size: 26px; translate: 0 -2px; }
  .taste-line { font-size: var(--fs-body); }
  .hint { display: none; }
  .feature { padding: 26px 24px 28px; }
  .footer__inner { padding-top: 52px; }
  .board { padding-top: 32px; gap: var(--pad); }
  .podium { grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) minmax(0, 1fr); gap: 8px; margin-top: 20px; }
  .podium__slot { padding: 20px 6px 16px; }
  .podium__slot--1 { padding: 22px 8px 18px; }
  .podium__bow { width: 68px; top: -24px; }
  .podium__pic { margin-bottom: 18px; }
  .podium__avatar, .podium__hole { width: 56px; height: 56px; }
  .podium__avatar { box-shadow: 0 0 0 2px var(--white), 0 0 0 4px var(--ring); }
  .podium__rank { bottom: -11px; min-width: 24px; height: 24px; padding: 0 6px; box-shadow: 0 0 0 2px var(--white); font-size: var(--fs-micro); }
  /* the doily and avatar scale with the card so the scallops stay on the paper down to 320px */
  .podium__slot--1 .podium__pic { width: min(124px, 100%); height: auto; aspect-ratio: 1; margin: -6px 0 4px; }
  .podium__slot--1 .podium__avatar, .podium__slot--1 .podium__hole { width: 58%; height: auto; aspect-ratio: 1; }
  .podium__slot--1 .podium__rank { bottom: calc(21% - 14px); min-width: 28px; height: 28px; font-size: var(--fs-caption); }
  .podium__sparkle { top: 4px; right: 0; width: 30px; }
  .podium__eyebrow { display: none; }
  .podium__name { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; white-space: normal; overflow-wrap: anywhere; font-size: 17px; line-height: 1.1; }
  .podium__slot--1 .podium__name { font-size: 19px; }
  .podium__score { margin-top: 6px; font-size: 20px; }
  .podium__slot--1 .podium__score { font-size: var(--fs-number); }
  .podium__tags { margin-top: 6px; flex-direction: column; align-items: center; gap: 4px; }
  .podium__tier { padding: 0; background: none; letter-spacing: 0.04em; }
  .podium__you { padding: 2px 8px; }
  .row { grid-template-columns: 28px 36px minmax(0, 1fr) auto; gap: 10px; }
  .row__rank { width: 28px; height: 28px; }
  .row__avatar { width: 36px; height: 36px; }
  .rows--board { padding: 10px; }
  .rows--board .row { padding: 10px 10px; }
  .rows--board .row--pinned { padding: 12px 14px; }
  .rows--board .row__score .num { font-size: 20px; }
}
@media (max-width: 520px) {
  :root { --gutter: 16px; }
  .brand__word { display: none; }
  .topbar__actions { gap: 2px; }
  .nav__link, .iconbtn { width: 40px; height: 40px; min-height: 40px; }
  /* phones: the X button and "buy" squeeze in; the logo already goes home, so the heart steps out */
  .nav__link[data-nav="home"] { display: none; }
  .topbar__inner { gap: 6px; }
  .nav .nav__link { width: 36px; }
  .topbar__actions .iconbtn { width: 36px; height: 36px; min-height: 36px; }
  .buybtn { min-height: 36px; padding: 0 12px 0 9px; gap: 5px; margin-right: 2px; font-size: var(--fs-caption); }
  .buybtn svg { width: 16px; height: 16px; }
  .buybtn__ticker { display: none; }
  .account { padding: 3px; }
  .account--claim { padding: 3px 12px; }
  .account--claim .account__score { display: none; }
  .account:not(.account--claim) .account__label { display: none; }
  .taste-line { min-height: 48px; }
}
@media (max-width: 360px) {
  :root { --gutter: 10px; }
  .nav__link, .iconbtn { width: 36px; }
  .brand__mark, .brand__logo { width: 44px; height: 44px; }
  .account--claim { padding: 3px 9px; }
}
