/* ReSort — a loud game for young adults: dark stage, acid-lime and hot-pink accents,
   chunky expanded headings, garments on cream "sticker" cards. Minimum text size 12px. */

@font-face {
  font-family: "Albert Sans";
  src: url("../fonts/albertsans-var.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
}
@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-var.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}

:root {
  --bg: #15121c;
  --sf: #221d2b;
  --sf2: #2e2839;
  --line: #3d3549;
  --ink: #f6f1ea;
  --tp: #b9b0c6;
  --card: #f6f1e8;
  --card-ink: #2a231c;
  --lime: #c8ff3e;
  --pink: #ff4f9a;
  --sky: #5cc8ff;
  --orange: #ff9a3c;
  --display: "Archivo", "Arial Black", Arial, sans-serif;
  --sans: "Albert Sans", "Helvetica Neue", Arial, sans-serif;
  --gut: 16px;
  --r: 18px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100dvh; background: var(--bg); color: var(--ink);
  font: 400 16px/1.45 var(--sans); font-variant-numeric: tabular-nums;
  -webkit-tap-highlight-color: transparent;
  background-image: radial-gradient(circle at 15% -10%, rgba(200, 255, 62, .10), transparent 45%),
    radial-gradient(circle at 110% 30%, rgba(255, 79, 154, .10), transparent 40%);
  background-attachment: fixed;
}
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
:focus-visible { outline: 3px solid var(--lime); outline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
dl, dd { margin: 0; }
main {
  max-width: 520px; margin: 0 auto;
  padding: calc(10px + env(safe-area-inset-top, 0px)) var(--gut) calc(28px + env(safe-area-inset-bottom, 0px));
  display: flex; flex-direction: column;
}

/* ───────── shared bits ───────── */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 44px; }
.lang { display: inline-flex; background: var(--sf); border-radius: 99px; padding: 3px; }
.lang button { padding: 6px 11px; border-radius: 99px; font-size: 13px; font-weight: 700; color: var(--tp); }
.lang button.on { background: var(--ink); color: var(--bg); }
.pill { background: var(--sf); border-radius: 99px; padding: 8px 12px; font-size: 13px; font-weight: 600; color: var(--tp); }
.score-chip { font-family: var(--display); font-weight: 800; font-size: 14px; color: var(--lime); }

.cta {
  display: block; width: 100%; margin-top: 20px; padding: 18px 20px; border-radius: 99px;
  background: var(--lime); color: #15121c; font-family: var(--display); font-stretch: 112%; font-weight: 800;
  font-size: 18px; letter-spacing: .02em; text-transform: uppercase;
  box-shadow: 0 6px 0 #7fa61c; transition: transform .08s, box-shadow .08s;
}
.cta:active { transform: translateY(4px); box-shadow: 0 2px 0 #7fa61c; }
.ghost {
  display: block; width: 100%; margin-top: 12px; padding: 15px 20px; border-radius: 99px;
  border: 2px solid var(--line); color: var(--ink); font-weight: 700; font-size: 16px;
}
.out-link { display: block; margin: 22px auto 0; text-align: center; color: var(--tp); font-size: 14px; text-decoration: underline; text-underline-offset: 3px; }

/* statistics consent: a sheet at the bottom until the player answers */
.consent {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; max-width: 520px; margin: 0 auto;
  border-radius: 26px 26px 0 0; padding: 18px var(--gut) calc(18px + env(safe-area-inset-bottom, 0px));
  background: var(--sf); border-top: 6px solid var(--sky); box-shadow: 0 -16px 40px rgba(0, 0, 0, .5);
  animation: sheet .28s cubic-bezier(.2, .9, .3, 1);
}
.consent h2 { font-family: var(--display); font-weight: 900; font-stretch: 110%; font-size: 20px; line-height: 1.15; }
.consent p { color: var(--tp); font-size: 14.5px; margin-top: 8px; }
.consent-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.consent .ghost { margin-top: 14px; }
.kicker { font-family: var(--display); font-stretch: 112%; font-weight: 700; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--pink); margin-top: 18px; }
.lead { color: var(--tp); font-size: 17px; margin-top: 10px; }
.label { font-family: var(--display); font-stretch: 112%; font-weight: 700; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--tp); margin: 24px 0 10px; }
.best { text-align: center; color: var(--tp); margin-top: 14px; font-weight: 600; }

#toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); z-index: 50;
  transform: translate(-50%, 20px); opacity: 0; transition: .2s; pointer-events: none;
  background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 99px; font-weight: 700;
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ───────── home ───────── */
.hero { text-align: center; padding: 18px 0 6px; }
.stack { position: relative; height: 150px; margin: 6px auto 4px; width: 260px; }
.mini {
  position: absolute; top: 10px; width: 108px; aspect-ratio: 4 / 5; padding: 10px; background: var(--card);
  border-radius: 14px; box-shadow: 0 10px 24px rgba(0, 0, 0, .35); animation: float 4s ease-in-out infinite;
}
.mini svg { width: 100%; height: 100%; display: block; }
.mini.s0 { left: 0; transform: rotate(-12deg); }
.mini.s1 { left: 76px; top: 0; z-index: 2; transform: rotate(3deg); animation-delay: -1.3s; }
.mini.s2 { right: 0; transform: rotate(13deg); animation-delay: -2.6s; }
@keyframes float { 50% { translate: 0 -6px; } }
.logo {
  font-family: var(--display); font-weight: 900; font-stretch: 125%; font-size: clamp(52px, 17vw, 76px);
  line-height: .95; letter-spacing: -.02em; margin-top: 8px;
}
.logo span { color: var(--lime); }
.tagline { font-size: 18px; color: var(--tp); margin: 12px auto 0; max-width: 30ch; text-wrap: balance; }
.how { list-style: none; padding: 0; margin: 26px 0 0; display: flex; flex-direction: column; gap: 10px; }
.how li { display: flex; gap: 12px; align-items: center; background: var(--sf); border-radius: var(--r); padding: 12px 14px; }
.how b {
  flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  background: var(--pink); color: #fff; font-family: var(--display); font-weight: 900;
}

/* ───────── round intro ───────── */
.dots { display: flex; gap: 6px; margin-top: 10px; }
.dots i { flex: 1; height: 6px; border-radius: 99px; background: var(--sf2); }
.dots i.done { background: var(--tp); }
.dots i.on { background: var(--lime); }
.big { font-family: var(--display); font-weight: 900; font-stretch: 118%; font-size: clamp(30px, 9vw, 42px); line-height: 1.02; margin-top: 8px; text-wrap: balance; }
.route-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.rchip { position: relative; background: var(--sf); border: 2px solid var(--line); border-radius: 99px; padding: 8px 13px; font-weight: 600; font-size: 15px; }
.rchip em {
  position: absolute; top: -10px; right: -6px; font-style: normal; font-size: 12px; font-weight: 800; text-transform: uppercase;
  background: var(--pink); color: #fff; padding: 2px 7px; border-radius: 99px; transform: rotate(6deg);
}
.tip { margin-top: 22px; background: var(--sf); border-left: 4px solid var(--sky); border-radius: 0 var(--r) var(--r) 0; padding: 12px 14px; }
.meta { margin-top: 14px; color: var(--tp); font-size: 14px; }

/* ───────── play ───────── */
.play { min-height: 100dvh; padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px)); }
.hud { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; min-height: 44px; }
.quit { min-width: 40px; height: 40px; border-radius: 99px; background: var(--sf); color: var(--tp); font-size: 16px; padding: 0 10px; }
.quit.armed { background: var(--pink); color: #fff; font-weight: 700; font-size: 14px; }
.hud-round { font-family: var(--display); font-stretch: 112%; font-weight: 700; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--tp); text-align: center; }
.hud-score { display: flex; align-items: center; gap: 8px; }
.hud-score b { font-family: var(--display); font-weight: 900; font-size: 24px; color: var(--lime); }
.combo { background: var(--pink); color: #fff; font-weight: 800; font-size: 13px; padding: 3px 8px; border-radius: 99px; animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.08); } }

.timer { height: 10px; border-radius: 99px; background: var(--sf2); overflow: hidden; margin: 8px 0 12px; }
.timer i { display: block; height: 100%; background: var(--lime); transform-origin: left; border-radius: 99px; }
.timer.low i { background: var(--pink); }

.card {
  position: relative; background: var(--card); color: var(--card-ink); border-radius: 22px; overflow: hidden;
  display: flex; flex-direction: column; box-shadow: 0 12px 30px rgba(0, 0, 0, .4);
}
.card.enter { animation: deal .32s cubic-bezier(.2, .9, .3, 1.2); }
@keyframes deal { from { transform: translateY(30px) rotate(-4deg); opacity: 0; } }
.card-art { background: #e8dfd0; padding: 12px; display: grid; place-items: center; }
.card-art { position: relative; overflow: hidden; }

/* garment layers: as it came in, after a treatment, and an overlay for the route animation */
.art-box { position: relative; height: clamp(110px, 24dvh, 230px); aspect-ratio: 100 / 120; }
.art-layer, .art-box svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.art-box .fx { overflow: visible; pointer-events: none; }
.art-box.gone .art-layer { opacity: .22; filter: grayscale(1); }

/* real garments: photos instead of sketches */
.art-box.photo { aspect-ratio: 3 / 4; }
.art-layer img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 10px; }
.after-badge {
  position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%) rotate(-3deg); white-space: nowrap;
  background: var(--lime); color: #15121c; font-weight: 800; font-size: 12.5px; padding: 3px 9px; border-radius: 99px;
}
.real-badge {
  position: absolute; left: 12px; top: 12px; z-index: 2; background: var(--card-ink); color: var(--card);
  font-weight: 800; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; padding: 4px 9px; border-radius: 99px;
}
.card-top h2 small { font-family: var(--sans); font-weight: 600; font-size: 14px; font-stretch: 100%; color: #5c5145; margin-left: 4px; }
.defect.zoomable, .defect.photo-chip { border: 0; cursor: pointer; font: inherit; font-size: 13px; font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.defect.photo-chip { background: #e3dacb; color: var(--card-ink); }
.source { margin-top: 6px; color: var(--tp); font-size: 12.5px; }

#zoom {
  position: fixed; inset: 0; z-index: 60; display: none; place-items: center; padding: 20px;
  background: rgba(10, 8, 14, .92); cursor: zoom-out;
}
#zoom.show { display: grid; animation: fade-in-z .15s ease; }
@keyframes fade-in-z { from { opacity: 0; } }
#zoom figure { margin: 0; max-width: 520px; width: 100%; }
#zoom img { width: 100%; max-height: 75dvh; object-fit: contain; border-radius: 14px; display: block; }
#zoom figcaption { margin-top: 10px; text-align: center; color: var(--ink); font-weight: 700; }
.zoom-x { position: absolute; top: calc(14px + env(safe-area-inset-top, 0px)); right: 14px; width: 44px; height: 44px; border-radius: 50%; background: var(--sf); color: var(--ink); font-size: 18px; }
.end-icon { position: absolute; inset: 0; display: grid; place-items: center; font-size: 56px; animation: stamp .3s cubic-bezier(.2, .9, .3, 1.5); }

.has-after .before { animation: fade-out 1.3s ease forwards; }
.has-after .after { opacity: 0; animation: fade-in 1.3s ease forwards; }
@keyframes fade-out { 0%, 45% { opacity: 1; } 100% { opacity: 0; } }
@keyframes fade-in { 0%, 45% { opacity: 0; } 100% { opacity: 1; } }

/* resell: the price tag swings on */
.fx-tag { transform-box: view-box; transform-origin: 60px 6px; }
.fx-resell .fx-tag { animation: tag-swing 1.1s cubic-bezier(.3, 1.4, .5, 1) both; }
@keyframes tag-swing { 0% { transform: translateY(-40px) rotate(-40deg); opacity: 0; } 35% { opacity: 1; } 60% { transform: rotate(14deg); } 80% { transform: rotate(-6deg); } 100% { transform: none; } }
.fx-resell .before { animation: sold 1.3s ease forwards; }
@keyframes sold { 70% { transform: none; } 85% { transform: scale(1.05); } 100% { transform: none; } }

/* refresh: bubbles wash the defects away */
.fx-bubble { fill: rgba(92, 200, 255, .25); stroke: #5cc8ff; stroke-width: .6; transform-box: fill-box; transform-origin: center; opacity: 0;
  animation: bubble 1.1s ease-out calc(var(--i) * 70ms) forwards; }
@keyframes bubble { 0% { transform: translateY(8px) scale(.3); opacity: 0; } 30% { opacity: 1; } 100% { transform: translateY(-46px) scale(1.15); opacity: 0; } }

/* repair: a needle sews a zigzag over the damage */
.fx-stitch { fill: none; stroke: var(--pink); stroke-width: 1.1; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 1; stroke-dashoffset: 1; animation: stitch 1s ease-in-out .1s forwards; }
@keyframes stitch { to { stroke-dashoffset: 0; } }
.fx-needle { animation: needle 1s linear .1s both; }
@keyframes needle {
  0% { transform: translate(0, 0); } 12.5% { transform: translate(2.5px, -2.5px); } 25% { transform: translate(5px, 2.5px); }
  37.5% { transform: translate(7.5px, -2.5px); } 50% { transform: translate(10px, 2.5px); } 62.5% { transform: translate(12.5px, -2.5px); }
  75% { transform: translate(15px, 2.5px); } 87.5% { transform: translate(17.5px, -2.5px); } 100% { transform: translate(20px, 0); opacity: 0; }
}

/* remake: scissors cut across, sparkles pop */
.fx-scissors { animation: snip 1s ease-in-out forwards; }
@keyframes snip { 0% { transform: translateX(-10px); opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } 100% { transform: translateX(88px); opacity: 0; } }
.fx-spark { fill: var(--lime); stroke: #2a231c; stroke-width: .4; transform-box: fill-box; transform-origin: center; opacity: 0;
  animation: spark .6s ease-out calc(.55s + var(--i) * 80ms) forwards; }
@keyframes spark { 0% { transform: scale(0) rotate(0); opacity: 0; } 50% { transform: scale(1.6) rotate(45deg); opacity: 1; } 100% { transform: scale(1) rotate(90deg); opacity: 0; } }

/* wholesale: into the box; recycle: spin into fibres; dispose: into the bin */
.fx-box { animation: box-up .35s ease-out both; }
@keyframes box-up { from { transform: translateY(40px); } }
.fx-wholesale .before { animation: into-box 1.2s ease-in .2s forwards; transform-origin: 50% 100%; }
@keyframes into-box { 0% { transform: none; } 25% { transform: translateY(-6%); } 100% { transform: translateY(40%) scale(.35); opacity: 0; } }
.fx-recycle .before { animation: shred 1.1s ease-in forwards; }
@keyframes shred { to { transform: rotate(240deg) scale(.15); filter: grayscale(1); opacity: 0; } }
.fx-dispose .before { animation: bin 1.1s ease-in forwards; }
@keyframes bin { 30% { transform: rotate(-4deg); } 100% { transform: translateY(45%) rotate(14deg) scale(.5); filter: grayscale(1); opacity: 0; } }
.fx-end { opacity: 0; transform-box: fill-box; transform-origin: center; animation: end-in .5s cubic-bezier(.2, .9, .3, 1.5) .6s forwards; }
@keyframes end-in { from { transform: scale(.2); opacity: 0; } to { transform: none; opacity: 1; } }

/* price checks */
.check-badge {
  position: absolute; right: 12px; top: 12px; z-index: 2; background: var(--orange); color: #15121c;
  font-weight: 800; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; padding: 4px 10px; border-radius: 99px; transform: rotate(3deg);
}
.price-q { margin-top: 14px; }
.pq-kicker { font-family: var(--display); font-stretch: 112%; font-weight: 700; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--orange); }
.pq-kicker span { color: var(--tp); text-transform: none; letter-spacing: 0; font-family: var(--sans); font-weight: 600; }
.price-q h3 { font-size: 18px; font-weight: 700; line-height: 1.3; margin-top: 6px; }
.pq-val { display: block; text-align: center; font-family: var(--display); font-weight: 900; font-size: 40px; color: var(--lime); margin-top: 8px; }
#pq { width: 100%; height: 44px; accent-color: var(--lime); margin: 2px 0 0; }
.pq-scale { display: flex; justify-content: space-between; color: var(--tp); font-size: 12.5px; }
.price-q .cta { margin-top: 14px; }
.pq-track { position: relative; height: 8px; border-radius: 99px; background: var(--sf2); margin: 34px 6px 6px; }
.pq-track .mark { position: absolute; top: 50%; width: 16px; height: 16px; border-radius: 50%; transform: translate(-50%, -50%); border: 3px solid var(--sf); }
.pq-track .mark span { position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%); font-style: normal; font-size: 12.5px; font-weight: 800; white-space: nowrap; }
.pq-track .you { background: var(--sky); }
.pq-track .you span { color: var(--sky); }
.pq-track .truth { background: var(--lime); animation: stamp .35s cubic-bezier(.2, .9, .3, 1.5) .1s both; }
.pq-track .truth span { color: var(--lime); }

/* a small receipt: shop price → fees → treatment → net */
.fb-sub { font-family: var(--display); font-stretch: 112%; font-weight: 700; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--tp); margin-top: 14px; }
.receipt { margin-top: 8px; background: var(--sf2); border-radius: 12px; padding: 8px 12px; font-size: 14px; }
.receipt div { display: flex; justify-content: space-between; gap: 12px; padding: 2px 0; }
.receipt dt { color: var(--tp); }
.receipt dd { font-variant-numeric: tabular-nums; white-space: nowrap; }
.receipt .sum { border-top: 1px dashed var(--line); margin-top: 4px; padding-top: 6px; font-weight: 800; }
.receipt .sum dt { color: var(--ink); }
.fb-lesson .gain { color: var(--lime); }
.fb-lesson .loss { color: var(--pink); }
.card-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.card-top { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; }
.card-top h2 { font-family: var(--display); font-weight: 900; font-stretch: 110%; font-size: 24px; line-height: 1; }
.tier { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; padding: 3px 8px; border-radius: 6px; background: #ddd3c2; transform: rotate(-2deg); }
.tier-premium { background: var(--sky); }
.tier-designer { background: var(--card-ink); color: var(--lime); }
.card-meta { font-size: 13.5px; color: #5c5145; }
.defects { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 2px; }
.defect { font-size: 13px; font-weight: 700; padding: 3px 8px; border-radius: 99px; background: #ffd6b8; color: #6a2e0c; }
.defect.bad { background: #2a231c; color: #ffb3d3; }
.defect.clean { background: #d9f7a3; color: #2d4a00; }
.defect.fixed { background: #d9f7a3; color: #2d4a00; }
.defect.fixed s { text-decoration-thickness: 2px; }
.defect.covered { background: #ffd6ea; color: #7a1745; }
.defect.remade { background: var(--card-ink); color: var(--pink); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.stamp {
  position: absolute; left: 12px; top: 12px; width: 58px; height: 58px; border-radius: 50%;
  display: grid; place-items: center; font-size: 30px; background: var(--lime);
  box-shadow: 0 4px 0 rgba(0, 0, 0, .25); animation: stamp .3s cubic-bezier(.2, .9, .3, 1.5);
}
.stamp.close { background: var(--sky); }
.stamp.miss, .stamp.timeout { background: var(--pink); }
@keyframes stamp { from { transform: scale(2.2) rotate(-25deg); opacity: 0; } }

.routes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.route {
  position: relative; display: flex; align-items: center; gap: 9px; text-align: left; min-height: 56px;
  padding: 10px 12px; border-radius: 16px; background: var(--sf); border: 2px solid var(--line);
  font-weight: 700; font-size: 15px; line-height: 1.15; transition: transform .08s, border-color .1s;
}
.route:hover { border-color: var(--lime); }
.route:active { transform: scale(.97); background: var(--sf2); }
.route[disabled] { opacity: .45; }
.route.chosen { opacity: 1; border-color: var(--lime); background: var(--sf2); }
.ri { font-size: 22px; flex: none; }
.rl { min-width: 0; }
.route kbd { display: none; position: absolute; right: 8px; top: 6px; font: 600 12px var(--sans); color: var(--tp); }
@media (hover: hover) and (pointer: fine) { .route kbd { display: block; } }

/* feedback sheet: slides up over the route buttons; the card with its stamp stays visible */
.fb {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; max-width: 520px; margin: 0 auto;
  max-height: 72dvh; overflow-y: auto; border-radius: 26px 26px 0 0;
  padding: 18px var(--gut) calc(18px + env(safe-area-inset-bottom, 0px));
  background: var(--sf); border-top: 6px solid var(--lime); box-shadow: 0 -16px 40px rgba(0, 0, 0, .5);
  animation: sheet .28s cubic-bezier(.2, .9, .3, 1);
}
.fb.close { border-top-color: var(--sky); }
.fb.miss, .fb.timeout { border-top-color: var(--pink); }
@keyframes sheet { from { transform: translateY(100%); } }
.fb-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.fb-title { font-family: var(--display); font-weight: 900; font-stretch: 115%; font-size: 28px; line-height: 1; }
.fb-pts { font-family: var(--display); font-weight: 900; font-size: 26px; color: var(--lime); white-space: nowrap; animation: pop .5s ease-out; }
.fb-pts small { font-size: 16px; color: var(--pink); }
@keyframes pop { from { transform: translateY(12px) scale(.7); opacity: 0; } }
.fb-lines { margin-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.fb-lines div { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; }
.fb-lines dt { color: var(--tp); flex: none; }
.fb-lines dd { font-weight: 700; text-align: right; }
.co2 { margin-top: 8px; font-weight: 700; color: var(--lime); }
.fb-warn { margin-top: 8px; font-weight: 700; color: var(--pink); }
.fb-lesson { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--tp); font-size: 15px; }
.fb .cta { margin-top: 16px; }
.play.has-fb .routes { visibility: hidden; }

/* ───────── results ───────── */
.rank { display: flex; align-items: center; gap: 12px; margin-top: 8px; }
.rank-icon { font-size: 52px; line-height: 1; animation: stamp .45s cubic-bezier(.2, .9, .3, 1.5); }
.rank h1 { font-family: var(--display); font-weight: 900; font-stretch: 118%; font-size: clamp(30px, 9vw, 42px); line-height: 1; }
.final { margin-top: 14px; font-size: 18px; color: var(--tp); }
.final b { font-family: var(--display); font-weight: 900; font-size: 64px; line-height: 1; color: var(--lime); margin-right: 6px; }
.new-best { display: inline-block; align-self: flex-start; margin-top: 10px; background: var(--pink); color: #fff; font-weight: 800; padding: 6px 12px; border-radius: 99px; transform: rotate(-2deg); }
.results .best { text-align: left; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }
.stats div { background: var(--sf); border-radius: var(--r); padding: 14px; display: flex; flex-direction: column; gap: 2px; }
.stats b { font-family: var(--display); font-weight: 800; font-size: 22px; line-height: 1.1; }
.stats span { color: var(--tp); font-size: 13.5px; }
.misses { display: flex; flex-direction: column; gap: 8px; }
.miss-item { background: var(--sf); border-radius: var(--r); padding: 10px; }
.miss-item summary { display: flex; gap: 12px; align-items: center; cursor: pointer; list-style: none; }
.miss-item summary::-webkit-details-marker { display: none; }
.mart { flex: none; width: 56px; aspect-ratio: 4 / 5; background: var(--card); border-radius: 10px; padding: 5px; }
.mart svg, .mart img { width: 100%; height: 100%; display: block; object-fit: cover; border-radius: 6px; }
.mtxt { display: flex; flex-direction: column; min-width: 0; }
.mtxt small { color: var(--tp); font-size: 13.5px; }
.more { margin-top: 8px; }
.more > summary { cursor: pointer; color: var(--tp); font-weight: 700; padding: 8px 0; }
.more .misses { margin-top: 4px; }
.miss-item p { margin-top: 10px; color: var(--tp); font-size: 15px; }

/* short phones: tighter card so card + buttons fit without scrolling */
@media (max-height: 700px) {
  .art-box { height: clamp(96px, 20dvh, 180px); }
  .pq-val { font-size: 32px; }
  .card-top h2 { font-size: 20px; }
  .route { min-height: 50px; padding: 8px 10px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
