/* Far Post: Matchday Album.
   Each matchday is a page in a football sticker album. Right answers are
   stickers; rarity is the finish (matte, gloss, bronze, silver, holo foil).
   One family, Archivo, used across its width axis: condensed for numerals and
   names, normal for reading, expanded for small labels. */

:root {
  --paper: #f2f4ee;
  --paper-2: #e6eae1;
  --paper-3: #d9dfd4;
  --ink: #13241b;
  --ink-2: #48594f;
  --ink-3: #6f7d74;
  --rule: rgba(19, 36, 27, 0.13);
  --rule-2: rgba(19, 36, 27, 0.26);
  --spot: #0a7443;          /* the album's printed spot colour */
  --spot-ink: #f4fbf6;
  --spot-press: #075c35;
  --turf: #dfe9dc;
  --die: #fbfcf8;           /* the die-cut white edge of a sticker */
  --miss: #c43d2a;
  --card-yellow: #f6c90e;
  --shadow: 19, 36, 27;

  /* Tier accents, for text and lines on paper */
  --t-olimpico: #9b6a00;
  --t-worldie: #536273;
  --t-topbins: #9a5426;
  --t-tidy: #0a7443;
  --t-tapin: #5d6b62;
  --t-booked: #8a6d00;

  --display: "Archivo", "Arial Narrow", sans-serif;
  --body: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-spring: cubic-bezier(0.22, 1.12, 0.36, 1);
  --r-card: 14px;
  --r-ctl: 10px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0e1712;
    --paper-2: #16221b;
    --paper-3: #203028;
    --ink: #e8efe9;
    --ink-2: #a9b8ae;
    --ink-3: #85968b;
    --rule: rgba(232, 239, 233, 0.12);
    --rule-2: rgba(232, 239, 233, 0.24);
    --spot: #2fbf78;
    --spot-ink: #06140c;
    --spot-press: #27a466;
    --turf: #15261c;
    --die: #f3f5ef;
    --miss: #ff8a73;
    --shadow: 0, 0, 0;
    --t-olimpico: #f2c75c;
    --t-worldie: #c3ccd6;
    --t-topbins: #e5a06e;
    --t-tidy: #48d18e;
    --t-tapin: #a3b1a8;
    --t-booked: #f6c90e;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100dvh;
  background: var(--paper);
  color: var(--ink);
  font: 400 16px/1.55 var(--body);
  font-stretch: 100%;
  -webkit-font-smoothing: antialiased;
  caret-color: var(--spot);
}
/* Faint pitch markings printed on the album page */
body::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1000px; z-index: -1; pointer-events: none;
  background-color: var(--rule);
  -webkit-mask: url("/pitch-lines.svg") center top / min(1100px, 160vw) auto no-repeat;
  mask: url("/pitch-lines.svg") center top / min(1100px, 160vw) auto no-repeat;
  opacity: 0.45;
}
body { position: relative; }
body::before { transition: opacity 400ms ease; }
body[data-view="play"]::before { opacity: 0; }
::selection { background: var(--spot); color: var(--spot-ink); }
html { scrollbar-color: var(--rule-2) transparent; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
p { margin: 0; }
a { color: var(--spot); text-underline-offset: 3px; text-decoration-thickness: 1px; }

.wrap {
  max-width: 760px; margin: 0 auto;
  padding: max(14px, env(safe-area-inset-top)) max(18px, env(safe-area-inset-right)) 40px max(18px, env(safe-area-inset-left));
  display: flex; flex-direction: column; gap: 28px;
}

h1, h2, h3 { margin: 0; text-wrap: balance; font-family: var(--display); }
h2 { font-size: 26px; font-weight: 800; font-stretch: 75%; line-height: 1.05; letter-spacing: -0.01em; margin-bottom: 8px; }
h3 { font-size: 13px; font-weight: 700; font-stretch: 125%; letter-spacing: 0.04em; text-transform: uppercase; margin: 22px 0 6px; color: var(--ink-2); }

/* ---------------------------------------------------------------- header */
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.crest { width: 40px; height: 28px; overflow: visible; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.crest-near { stroke: var(--ink); stroke-width: 2.4; }
.crest-far { stroke: var(--spot); stroke-width: 3.6; }
.crest-net { stroke: var(--ink-3); stroke-width: 0.9; opacity: 0.7; }
.crest-ball { fill: var(--die); stroke: var(--ink); stroke-width: 1.6; }
.wm { font: 900 30px/1 var(--display); font-stretch: 68%; letter-spacing: -0.01em; text-transform: uppercase; }
.brand:hover .crest-ball { transform: translateX(-3px); }
.crest-ball { transition: transform 260ms var(--ease-out); transform-box: fill-box; }

nav { display: flex; gap: 2px; }
.nav {
  display: inline-flex; align-items: center; gap: 6px;
  font: 600 14px var(--body); color: var(--ink-2); background: none; border: none;
  padding: 8px 10px; border-radius: var(--r-ctl); cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease, transform 120ms var(--ease-out);
}
.nav svg, .close svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.nav:active { transform: scale(0.96); }
@media (hover: hover) and (pointer: fine) { .nav:hover { background: var(--paper-2); color: var(--ink); } }
@media (max-width: 620px) {
  .nav span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .nav { padding: 10px; }
  .nav svg { width: 22px; height: 22px; }
}
.wm { white-space: nowrap; }
@media (max-width: 420px) {   /* five menu items and the wordmark share one line */
  .top { gap: 6px; }
  nav { gap: 0; }
  .nav { padding: 8px 7px; }
  .nav svg { width: 21px; height: 21px; }
}

.banner { background: var(--paper-2); border: 1px solid var(--rule); border-radius: var(--r-ctl); padding: 12px 14px; color: var(--ink-2); font-size: 15px; }

/* ---------------------------------------------------------------- controls */
button { font-family: inherit; }
:focus-visible { outline: 2.5px solid var(--spot); outline-offset: 3px; }
.primary {
  font: 800 17px var(--display); font-stretch: 112%; letter-spacing: 0.01em;
  background: var(--spot); color: var(--spot-ink); border: none; border-radius: 999px;
  padding: 13px 26px; cursor: pointer; white-space: nowrap;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.25) inset, 0 6px 14px -8px rgba(var(--shadow), 0.55);
  transition: transform 140ms var(--ease-out), background-color 160ms ease, box-shadow 160ms ease;
}
.primary:active:not(:disabled) { transform: scale(0.97); background: var(--spot-press); }
.primary:disabled { opacity: 0.4; cursor: default; box-shadow: none; }
@media (hover: hover) and (pointer: fine) { .primary:hover:not(:disabled) { background: var(--spot-press); } }
.primary.big { font-size: 19px; padding: 16px 34px; }
.ghost {
  font: 600 14px var(--body); background: transparent; color: var(--ink); border: 1px solid var(--rule-2);
  border-radius: 999px; padding: 6px 12px; cursor: pointer; transition: background-color 160ms ease, transform 120ms var(--ease-out);
}
.ghost:active { transform: scale(0.96); }
.ghost[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.link { font: 600 14px var(--body); background: none; border: none; padding: 0; color: var(--spot); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.link:disabled { color: var(--ink-3); text-decoration: none; cursor: default; }
.actions { display: flex; align-items: center; gap: 14px 20px; flex-wrap: wrap; margin-top: 26px; }
.streak, .next { color: var(--ink-2); font-weight: 600; font-size: 15px; font-variant-numeric: tabular-nums; }
.fine { color: var(--ink-2); font-size: 14px; }
.lede { color: var(--ink-2); margin-top: 10px; max-width: 58ch; font-size: 17px; }
.lede.tight { margin: 0 0 18px; font-size: 16px; }

/* The printed running head at the top of an album page */
.runhead {
  font: 700 12px var(--body); font-stretch: 125%; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--ink-2); padding-bottom: 10px; margin-bottom: 18px; border-bottom: 1px solid var(--rule);
  font-variant-numeric: tabular-nums;
}

/* ---------------------------------------------------------------- pre-match */
.intro { padding-top: 8px; }
.dateline { font: 700 15px var(--body); color: var(--spot); margin-top: 14px; font-variant-numeric: tabular-nums; }
.headline { font-size: clamp(44px, 11vw, 84px); line-height: 0.9; font-weight: 900; font-stretch: 62%; letter-spacing: -0.015em; text-transform: uppercase; }
.slots { list-style: none; padding: 0; margin: 30px 0 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: clamp(8px, 2.4vw, 16px); }
.slots li {
  aspect-ratio: 5 / 7; border-radius: var(--r-card); border: 1.5px dashed var(--rule-2); background: var(--paper-2);
  display: grid; place-items: center; position: relative; overflow: hidden;
}
.slots li::after { /* the printed hint inside an empty slot: a goal mouth */
  content: ""; position: absolute; left: 26%; right: 26%; bottom: 16%; height: 10%;
  border: 1.5px solid var(--rule-2); border-bottom: none; border-radius: 2px 2px 0 0;
}
.slots li.filled { border: none; background: none; overflow: visible; }
.slots li.filled::after { display: none; }
.slots li.filled .sticker { --w: 100%; }
.slots li > span { font: 900 clamp(30px, 8vw, 58px)/1 var(--display); font-stretch: 62%; color: var(--paper-3); font-variant-numeric: tabular-nums; }
@media (prefers-color-scheme: dark) { .slots li > span { color: var(--rule-2); } }

.tiers { border-top: 1px solid var(--rule); padding-top: 26px; }
.legend { margin: 0 0 20px; }
.legendpitch { width: 100%; height: auto; display: block; border-radius: var(--r-card); }
.tierlist { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px 14px; }
.tierlist li { display: grid; gap: 4px; align-content: start; }
.tierlist .em { margin-bottom: 8px; }
.tierlist .em .sticker { --w: 100%; }
.tierlist .nm { font: 800 19px/1.05 var(--display); font-stretch: 75%; color: var(--ink); }
.tierlist .pt { font: 800 15px var(--display); font-stretch: 100%; color: var(--tc); font-variant-numeric: tabular-nums; }
.tierlist .bl { color: var(--ink-2); font-size: 13.5px; line-height: 1.4; }
@media (min-width: 641px) {
  .tierlist:not(.compact) .nm, .tierlist:not(.compact) .pt { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .tierlist:not(.compact) .bl { text-align: center; padding: 0 4px; }
  .tierlist:not(.compact) .em { margin-bottom: 12px; }
}
@media (max-width: 640px) {
  .tierlist { grid-template-columns: 1fr; gap: 0; }
  .tierlist li { grid-template-columns: 64px minmax(0, 1fr) auto; column-gap: 14px; row-gap: 2px; padding: 12px 0; border-bottom: 1px solid var(--rule); align-items: center; }
  .tierlist li:last-child { border-bottom: none; }
  .tierlist .em { grid-row: span 2; margin: 0; }
  .tierlist .pt { grid-row: 1; grid-column: 3; }
  .tierlist .nm { grid-column: 2; }
  .tierlist .bl { grid-column: 2 / 4; }
}
.tierlist.compact { grid-template-columns: 1fr; gap: 0; }
.tierlist.compact li { grid-template-columns: 52px minmax(0, 1fr) auto; column-gap: 12px; row-gap: 1px; padding: 10px 0; border-bottom: 1px solid var(--rule); align-items: center; }
.tierlist.compact li:last-child { border-bottom: none; }
.tierlist.compact .em { grid-row: span 2; margin: 0; }
.tierlist.compact .pt { grid-row: 1; grid-column: 3; }
.tierlist.compact .nm { grid-column: 2; font-size: 17px; }
.tierlist.compact .bl { grid-column: 2 / 4; font-size: 13px; }

[data-tier="olimpico"] { --tc: var(--t-olimpico); }
[data-tier="worldie"] { --tc: var(--t-worldie); }
[data-tier="topbins"] { --tc: var(--t-topbins); }
[data-tier="tidy"] { --tc: var(--t-tidy); }
[data-tier="tapin"] { --tc: var(--t-tapin); }
[data-tier="booked"] { --tc: var(--t-booked); }
[data-tier="miss"] { --tc: var(--miss); }

/* ---------------------------------------------------------------- stickers
   One component from a 22px pip to a 170px result. Sizes inside use
   container units, so the whole sticker scales as one printed object. */
.sticker {
  --w: 120px; --rot: -1.5deg;
  width: var(--w); aspect-ratio: 5 / 7; flex: none; position: relative;
  border-radius: calc(var(--w) * 0.08); padding: calc(var(--w) * 0.045);
  background: var(--die); container-type: inline-size;
  transform: perspective(600px) rotate(var(--rot)) rotateX(var(--ry, 0deg)) rotateY(var(--rx, 0deg));
  box-shadow: 0 1px 1px rgba(var(--shadow), 0.14), 0 calc(var(--w) * 0.05) calc(var(--w) * 0.12) calc(var(--w) * -0.04) rgba(var(--shadow), 0.32);
  transition: transform 420ms var(--ease-out);
  color: #15261c;
}
.sticker.flat { --rot: 0deg; }
.sticker .face {
  height: 100%; border-radius: 5cqw; position: relative; overflow: hidden;
  display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: 4.5cqw; padding: 6cqw;
  background: var(--face, #eef0ea);
  isolation: isolate;
}
.sticker .face::after { /* the sheen: moves with the pointer on foils */
  content: ""; position: absolute; inset: -20%; z-index: 4; pointer-events: none; mix-blend-mode: soft-light;
  background: linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, 0.9) 50%, transparent 62%);
  transform: translateX(calc(var(--mx, 0.5) * 60% - 30%));
  opacity: var(--sheen, 0);
}
/* Header: sticker number on the left, points on the right */
.sticker .top {
  display: flex; justify-content: space-between; align-items: center; gap: 2cqw;
  position: relative; z-index: 3; min-height: 11cqw; padding: 0 1cqw;
}
.sticker .no { display: inline-flex; align-items: baseline; gap: 1.4cqw; font: 700 6.5cqw/1 var(--body); font-stretch: 120%; text-transform: uppercase; letter-spacing: 0.06em; }
.sticker .no b, .sticker .top .pts {
  font: 900 12cqw/0.9 var(--display); font-stretch: 62%; letter-spacing: 0; font-variant-numeric: tabular-nums;
}
.sticker .top .lab { font: 700 6.5cqw/1 var(--body); font-stretch: 120%; text-transform: uppercase; letter-spacing: 0.06em; }
/* The picture window: the pitch diagram, always at the same scale */
.sticker .art {
  position: relative; z-index: 1; min-height: 0; overflow: hidden;
  border-radius: 3.5cqw; background: var(--window, rgba(255, 255, 255, 0.55));
  box-shadow: inset 0 0 0 0.7cqw rgba(19, 36, 27, 0.16), inset 0 2cqw 4cqw -2cqw rgba(19, 36, 27, 0.18);
}
.sticker .art { display: grid; grid-template-rows: auto minmax(0, 1fr); }
.sticker .art .mark { width: 100%; height: auto; }
.sticker .cap { display: grid; place-content: center; justify-items: center; gap: 1.6cqw; padding: 1cqw 3cqw 3cqw; text-align: center; min-height: 0; overflow: hidden; }
.sticker .cap b { font: 900 12.5cqw/0.9 var(--display); font-stretch: 62%; text-transform: uppercase; letter-spacing: 0.01em; }
.sticker .cap span { font: 700 5.6cqw/1 var(--body); font-stretch: 120%; text-transform: uppercase; letter-spacing: 0.07em; opacity: 0.72; }
/* The name plate along the bottom */
.sticker .plate {
  position: relative; z-index: 3; min-height: 25cqw; padding: 3.5cqw 5cqw;
  display: grid; place-items: center; text-align: center;
  background: #13241b; color: #f4f6f0; border-radius: 3.5cqw;
}
.sticker .name {
  font: 900 12.5cqw/0.95 var(--display); font-stretch: 62%; text-transform: uppercase; letter-spacing: 0.005em;
  overflow-wrap: anywhere; text-wrap: balance;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.sticker .name.long { font-size: 10.5cqw; }
.sticker .name.xlong { font-size: 9cqw; }
@container (max-width: 84px) {
  .sticker .top, .sticker .plate { display: none; }
  .sticker .face { grid-template-rows: 1fr; padding: 7cqw; gap: 0; }
  .sticker .art { border-radius: 6cqw; align-content: center; grid-template-rows: auto; }
  .sticker .cap { display: none; }
}

/* Finishes */
:is(.sticker, .badge)[data-tier="tapin"] { --face: #eceee8; --window: #e0e4dc; }
:is(.sticker, .badge)[data-tier="tidy"] {
  --face: linear-gradient(165deg, #ffffff 0%, #e4f2e9 60%, #d3eadb 100%); --sheen: 0.5;
}
:is(.sticker, .badge)[data-tier="topbins"] {
  --face: linear-gradient(135deg, #f6dcc0 0%, #d39561 32%, #f4d3b1 52%, #b8703c 78%, #e8bb8e 100%); --sheen: 0.8;
}
:is(.sticker, .badge)[data-tier="worldie"] {
  --face: linear-gradient(135deg, #f7f9fb 0%, #b7c1cc 30%, #ffffff 50%, #97a3b0 76%, #e3e8ee 100%); --sheen: 0.9;
}
:is(.sticker, .badge)[data-tier="olimpico"] {
  --face:
    radial-gradient(circle at 20% 15%, rgba(255, 255, 255, 0.9) 0 1.5%, transparent 2%),
    radial-gradient(circle at 78% 30%, rgba(255, 255, 255, 0.8) 0 1.2%, transparent 1.7%),
    radial-gradient(circle at 62% 82%, rgba(255, 255, 255, 0.85) 0 1.4%, transparent 1.9%),
    repeating-linear-gradient(calc(60deg + var(--mx, 0.5) * 30deg), rgba(255, 255, 255, 0) 0 8%, rgba(255, 255, 255, 0.22) 9.5%, rgba(255, 255, 255, 0) 11%),
    linear-gradient(calc(115deg + var(--mx, 0.5) * 50deg), #ffb8dc 0%, #ffe680 17%, #9ef0b8 34%, #8fd2ff 51%, #cfa8ff 68%, #ffb8dc 85%, #ffe680 100%);
  --sheen: 1;
}
:is(.sticker, .badge)[data-tier="olimpico"] .face { background-size: 100% 100%, 100% 100%, 100% 100%, 100% 100%, 240% 240%; background-position: 0 0, 0 0, 0 0, 0 0, calc(var(--mx, 0.5) * 100%) calc(var(--my, 0.5) * 100%); }
:is(.sticker, .badge)[data-tier="booked"] { --face: linear-gradient(160deg, #ffe066, #f6c90e); --window: rgba(255, 255, 255, 0.3); }
.sticker[data-tier="pending"] { --face: var(--paper-2); box-shadow: none; background: transparent; outline: 1.5px dashed var(--rule-2); outline-offset: -1px; }
.sticker[data-tier="pending"] .face { background: transparent; }

/* Shot diagrams inside stickers: one even line, flat fills, one shared scale */
.mark { display: block; overflow: hidden; flex: none; }
.sticker .mark .chalk { stroke: currentColor; stroke-width: 0.6; stroke-opacity: 0.36; fill: none; }
.sticker .mark .chalk .spot { fill: currentColor; fill-opacity: 0.45; stroke: none; }
.sticker .mark .chalk .goalmouth { fill: currentColor; stroke: none; opacity: 1; }
.mark .m-path { fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-dasharray: 2.6 2.2; }
.mark .m-origin { fill: currentColor; stroke: var(--die); stroke-width: 1; }
.mark .m-ball { fill: var(--die); stroke: currentColor; stroke-width: 0.8; }
.mark .card { fill: none; stroke: #15261c; stroke-width: 1.6; }

/* ---------------------------------------------------------------- play */
.scorebar { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pips { list-style: none; display: flex; gap: 8px; padding: 0; margin: 0; }
.pips li { width: 30px; aspect-ratio: 5 / 7; border-radius: 5px; border: 1.5px dashed var(--rule-2); display: grid; place-items: center; background: var(--paper-2); transition: border-color 200ms ease; }
.pips li.now { border-style: solid; border-color: var(--spot); background: var(--paper); }
.pips li[data-tier] { border: none; background: none; }
.pips li .sticker { --w: 30px; --rot: 0deg; }
.pips .pipn { font: 800 13px var(--display); font-stretch: 75%; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.pips li.now .pipn { color: var(--spot); }
.running { font: 900 34px/1 var(--display); font-stretch: 62%; font-variant-numeric: tabular-nums; display: flex; align-items: baseline; gap: 4px; }
.running small { font: 700 12px var(--body); font-stretch: 125%; color: var(--ink-2); text-transform: uppercase; letter-spacing: 0.06em; }

.chance { position: relative; }
.chancehead { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; }
.chancelabel { font: 700 12px var(--body); font-stretch: 125%; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2); padding-bottom: 8px; }
.clock {
  font: 900 64px/0.8 var(--display); font-stretch: 62%; font-variant-numeric: tabular-nums;
  min-width: 2ch; text-align: right; color: var(--ink); letter-spacing: -0.01em;
  transition: color 200ms ease;
}
.clock.low { color: var(--miss); }
.clockbar { height: 4px; background: var(--paper-3); border-radius: 2px; overflow: hidden; margin: 12px 0 6px; }
.clockbar i { display: block; height: 100%; width: 100%; background: var(--ink); transform-origin: left; border-radius: 2px; }
.clock.low + .clockbar i { background: var(--miss); }
.question { font-size: clamp(30px, 7vw, 46px); font-weight: 800; font-stretch: 75%; line-height: 1.02; letter-spacing: -0.01em; margin-top: 4px; }
.scope { color: var(--ink-2); margin-top: 10px; font-size: 15px; }
#guessForm { display: flex; gap: 10px; margin-top: 24px; }
#guess {
  flex: 1; min-width: 0; font: 600 19px var(--body); color: var(--ink);
  background: var(--die); border: 1.5px solid var(--rule-2); border-radius: 999px; padding: 13px 20px;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}
@media (prefers-color-scheme: dark) { #guess { background: var(--paper-2); } }
#guess::placeholder { color: var(--ink-3); opacity: 1; }
#guess:focus-visible { outline: none; border-color: var(--spot); box-shadow: 0 0 0 4px color-mix(in srgb, var(--spot) 18%, transparent); }
#guess:disabled { opacity: 0.6; }
.msg { min-height: 24px; margin-top: 10px; color: var(--ink-2); font-weight: 600; font-size: 15px; }
.msg.bad { color: var(--miss); }
.msg.good { color: var(--spot); }

.overlay {
  position: absolute; inset: -6px; z-index: 3; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  background: color-mix(in srgb, var(--paper) 94%, transparent); border-radius: var(--r-card);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.overlay span { font: 700 12px var(--body); font-stretch: 125%; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); }
.overlay b { font: 900 140px/0.85 var(--display); font-stretch: 62%; color: var(--spot); font-variant-numeric: tabular-nums; }
.overlay b.tick { animation: tick 900ms var(--ease-out); }
@keyframes tick { from { transform: scale(1.18); opacity: 0.2; filter: blur(4px); } to { transform: none; opacity: 1; filter: none; } }

/* The goal scene */
.scene { margin: 14px -4px 8px; }
.goalscene { display: block; width: 100%; height: auto; max-height: 220px; overflow: visible; color: var(--ink); }
.goalscene .grass { fill: var(--turf); }
.goalscene .sixyard { stroke: var(--die); stroke-width: 1.2; fill: none; opacity: 0.9; }
.goalscene .goalline { stroke: var(--die); stroke-width: 1.6; }
.goalscene .mesh-line { stroke: var(--ink); stroke-width: 0.55; opacity: 0.2; fill: none; }
.goalscene .net-depth { stroke: var(--ink); stroke-width: 0.7; opacity: 0.28; fill: none; }
.goalscene .frame { fill: none; stroke: var(--ink); stroke-width: 4.5; stroke-linejoin: round; stroke-linecap: round; }
.goalscene .post-hit { fill: none; stroke: var(--t-olimpico); stroke-width: 6; stroke-linecap: round; opacity: 0; }
.goalscene .frame-hi { fill: none; stroke: var(--paper); stroke-width: 1.4; opacity: 0.55; stroke-linejoin: round; }
.goalscene .ball-skin { fill: #fbfcf8; stroke: #13241b; stroke-width: 0.08; }
.goalscene .ball-patch { fill: #13241b; }
.goalscene .ball-seam { stroke: #13241b; stroke-width: 0.06; fill: none; }
.goalscene .ball-shadow { fill: rgba(var(--shadow), 0.22); }
.goalscene .trail { fill: none; stroke: var(--tc, var(--ink)); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 3 5; opacity: 0.7; }
.goalscene .glow { color: var(--tc); pointer-events: none; }
.goalscene .ripple { fill: none; stroke: var(--tc); stroke-width: 1.6; vector-effect: non-scaling-stroke; }
.goalscene .spark { stroke: var(--tc); stroke-width: 2; stroke-linecap: round; }
.goalscene .yellow .card { fill: var(--card-yellow); stroke: rgba(0, 0, 0, 0.25); stroke-width: 1; }
.goalscene[data-tier="olimpico"] { --tc: var(--t-olimpico); }
.goalscene[data-tier="worldie"] { --tc: var(--t-worldie); }
.goalscene[data-tier="topbins"] { --tc: var(--t-topbins); }
.goalscene[data-tier="tidy"] { --tc: var(--t-tidy); }
.goalscene[data-tier="tapin"] { --tc: var(--t-tapin); }
.goalscene[data-tier="miss"] { --tc: var(--miss); }

/* Result: the sticker lands in its slot */
.result {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px 22px; align-items: center;
  background: var(--paper-2); border-radius: 20px; padding: 22px;
}
.stamp { display: grid; place-items: center; padding: 6px; }
.stamp .sticker { --w: 124px; }
.resulttier { font: 700 12px var(--body); font-stretch: 125%; letter-spacing: 0.06em; text-transform: uppercase; color: var(--tc); }
.commentary { font: 800 25px/1.08 var(--display); font-stretch: 75%; margin-top: 4px; text-wrap: balance; }
.answer { color: var(--ink-2); margin-top: 6px; }
.resultpts { font: 900 58px/0.85 var(--display); font-stretch: 62%; color: var(--tc); font-variant-numeric: tabular-nums; align-self: start; }
.result .primary { grid-column: 1 / -1; justify-self: start; }
.result[data-tier="olimpico"] .commentary { color: var(--t-olimpico); }

/* ---------------------------------------------------------------- full time */
.ftrow { display: flex; gap: 18px 28px; align-items: flex-end; flex-wrap: wrap; }
.ratingbox { display: flex; align-items: flex-end; gap: 14px; }
.rating { font: 900 clamp(96px, 26vw, 148px)/0.78 var(--display); font-stretch: 62%; color: var(--spot); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.ratinglabel { font: 800 22px/1.05 var(--display); font-stretch: 75%; max-width: 8ch; padding-bottom: 4px; }
.ftfacts { display: flex; flex-direction: column; gap: 6px; min-width: 0; padding-bottom: 4px; }
.ftscore { font: 700 18px var(--display); font-stretch: 100%; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.ftscore b { font-weight: 900; font-stretch: 62%; font-size: 34px; color: var(--ink); }
.beat { color: var(--ink-2); max-width: 40ch; }

.album { list-style: none; padding: 0; margin: 30px 0 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: clamp(10px, 2.6vw, 18px); }
.album li { display: grid; justify-items: center; gap: 8px; min-width: 0; }
.album .sticker { --w: 100%; }
.album li > .pts { font: 800 14px var(--display); color: var(--tc); font-variant-numeric: tabular-nums; }

.mapwrap { margin: 30px 0 0; display: grid; gap: 8px; }
.shotmap { width: 100%; height: auto; display: block; border-radius: var(--r-card); }
.turf { fill: var(--turf); }
.chalk { stroke: var(--die); stroke-width: 0.32; }
@media (prefers-color-scheme: dark) { .chalk { stroke: var(--rule-2); } }
.chalk .spot { fill: var(--die); }
.chalk .goalmouth { fill: none; stroke: var(--ink); stroke-width: 0.45; }
.shotmap .shot-path { fill: none; stroke: var(--tc); stroke-width: 0.5; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.shotmap .shot-dot { fill: var(--tc); stroke: var(--turf); stroke-width: 0.4; }
.shotmap .shot-n { font: 800 2.2px var(--display); fill: var(--paper); pointer-events: none; }
.shotmap .shot-n.dim { fill: var(--ink-2); }
.shotmap .card { fill: var(--card-yellow); }

.lp-path { fill: none; stroke: var(--tc); stroke-width: 0.42; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.lp-dot { fill: var(--tc); stroke: var(--turf); stroke-width: 0.35; }
.lp-name { font: 800 2.2px var(--display); letter-spacing: 0.05px; fill: var(--tc); }
.lp-pts { font: 600 1.7px var(--body); fill: var(--ink-2); }

/* Match review */
.cards { display: flex; flex-direction: column; }
.card { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 4px 16px; padding: 18px 0; border-top: 1px solid var(--rule); min-width: 0; }
.card > :not(.thumb) { grid-column: 2; }
.card .thumb { grid-row: 1 / span 6; padding-top: 2px; }
.card .thumb .sticker { --w: 64px; }
.card .q { font: 800 21px/1.1 var(--display); font-stretch: 75%; }
.card .yours { display: flex; gap: 6px 12px; align-items: baseline; flex-wrap: wrap; margin-top: 4px; }
.card .yours b { font-weight: 700; }
.chip { display: inline-flex; align-items: center; gap: 6px; font: 700 11px var(--body); font-stretch: 125%; letter-spacing: 0.05em; text-transform: uppercase; color: var(--tc); white-space: nowrap; }
.card .yours .pts { font: 900 22px var(--display); font-stretch: 62%; color: var(--tc); margin-left: auto; font-variant-numeric: tabular-nums; }
.card .meta { color: var(--ink-2); font-size: 14px; }
.card details { margin-top: 6px; }
.card details summary { cursor: pointer; color: var(--spot); font-weight: 600; font-size: 14px; list-style: none; display: inline-flex; align-items: center; gap: 6px; }
.card details summary::-webkit-details-marker { display: none; }
.card details summary::before { content: ""; width: 7px; height: 7px; border-right: 1.8px solid currentColor; border-bottom: 1.8px solid currentColor; transform: rotate(-45deg); transition: transform 200ms var(--ease-out); }
.card details[open] summary::before { transform: rotate(45deg); }
.sheet { list-style: none; padding: 0; margin: 10px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); column-gap: 24px; }
.sheet li { display: grid; grid-template-columns: minmax(0, 1fr) auto 40px; gap: 10px; align-items: baseline; font-size: 14.5px; padding: 5px 0; border-bottom: 1px solid var(--rule); }
.sheet li.yours { font-weight: 700; color: var(--spot); }
.sheet .chip { font-size: 10px; }
.sheet .pct { text-align: right; color: var(--ink-2); font-variant-numeric: tabular-nums; font-size: 13px; }
.misses { display: flex; flex-direction: column; gap: 4px; font-size: 14px; margin-top: 6px; }
.misses > span { color: var(--ink-2); }
.misses div { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; color: var(--ink-2); }
.misses s { color: var(--miss); text-decoration-thickness: 1px; }
.thumbs { display: flex; gap: 8px; align-items: center; color: var(--ink-2); font-size: 14px; margin-top: 10px; }
.thumbs .ghost { display: grid; place-items: center; width: 38px; height: 32px; padding: 0; color: var(--ink-2); }
.thumbs .ghost[aria-pressed="true"] { color: var(--paper); }
.ic { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.ic.down { transform: rotate(180deg); }
main > section + section { margin-top: 52px; }
.mapwrap + * { margin-top: 0; }

/* ---------------------------------------------------------------- loading */
.loadingslots li { animation: breathe 1.4s ease-in-out infinite; }
.loadingslots li:nth-child(2) { animation-delay: 0.1s; } .loadingslots li:nth-child(3) { animation-delay: 0.2s; }
.loadingslots li:nth-child(4) { animation-delay: 0.3s; } .loadingslots li:nth-child(5) { animation-delay: 0.4s; }
.loadingslots li::after { display: none; }
#loading .lede { margin-top: 16px; }
@keyframes breathe { 50% { opacity: 0.45; } }

/* ---------------------------------------------------------------- dialogs */
dialog {
  width: min(560px, calc(100vw - 24px)); max-height: calc(100dvh - 40px); overflow: auto;
  background: var(--paper); color: var(--ink); border: none; border-radius: 22px; padding: 26px 24px 24px;
  box-shadow: 0 30px 60px -20px rgba(var(--shadow), 0.5), 0 2px 6px rgba(var(--shadow), 0.12);
}
dialog::backdrop { background: rgba(var(--shadow), 0.42); }
dialog h2 { font-size: 32px; font-stretch: 62%; font-weight: 900; text-transform: uppercase; margin: 0 40px 12px 0; }
dialog .close { position: absolute; top: 14px; right: 14px; background: var(--paper-2); border: none; color: var(--ink); border-radius: 999px; width: 38px; height: 38px; display: grid; place-items: center; cursor: pointer; transition: transform 120ms var(--ease-out); }
dialog .close:active { transform: scale(0.92); }
dialog p { color: var(--ink-2); margin-bottom: 8px; }
dialog > form:last-child { margin-top: 20px; }
.steps { padding-left: 22px; display: flex; flex-direction: column; gap: 10px; color: var(--ink-2); margin: 8px 0 0; }
.steps li::marker { font: 900 17px var(--display); font-stretch: 62%; color: var(--spot); }
.steps b { color: var(--ink); }
.statgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 18px 14px; margin: 10px 0 8px; }
.stat b { display: block; font: 900 44px/0.9 var(--display); font-stretch: 62%; font-variant-numeric: tabular-nums; }
.stat span { color: var(--ink-2); font-size: 13px; }
.bars { display: flex; flex-direction: column; gap: 10px; }
.bars div { display: grid; grid-template-columns: 128px minmax(0, 1fr) 30px; gap: 12px; align-items: center; font-size: 14px; }
.bars i { display: block; height: 12px; border-radius: 3px; background: var(--tc); min-width: 3px; }
.bars .n { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.bars .bn { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.bars .bn .sticker { --w: 16px; --rot: 0deg; padding: 1px; }
.archivelist { list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-direction: column; }
.archivelist a { display: flex; justify-content: space-between; gap: 10px; padding: 12px 4px; border-bottom: 1px solid var(--rule); color: var(--ink); text-decoration: none; font-weight: 600; transition: padding 200ms var(--ease-out), color 160ms ease; }
@media (hover: hover) and (pointer: fine) { .archivelist a:hover { color: var(--spot); padding-left: 10px; } }
.archivelist .st { color: var(--ink-2); font-size: 14px; font-weight: 500; }

.foot { color: var(--ink-3); font-size: 13px; border-top: 1px solid var(--rule); padding-top: 16px; margin-top: 12px; }

/* ---------------------------------------------------------------- friends
   Leagues, challenge boards and honours. Same paper, ink and spot green as
   the rest of the album. Answers show as mini stickers; honours are crest
   stickers in the same finishes; labels are printed, not pills. */
.ghost.tall { padding: 11px 20px; font-size: 15px; display: inline-flex; align-items: center; gap: 6px; }
.ghost.tall .ic { width: 16px; height: 16px; margin-right: -4px; }
.ghost:disabled { opacity: 0.35; cursor: default; }
@media (hover: hover) and (pointer: fine) { .ghost:hover:not(:disabled):not([aria-pressed="true"]) { background: var(--paper-2); } }
.link { display: inline-flex; align-items: center; gap: 4px; }
.link .ic { width: 16px; height: 16px; }
.link.danger { color: var(--miss); }
.ghost.danger { color: var(--miss); border-color: color-mix(in srgb, var(--miss) 45%, transparent); }

/* Printed labels: expanded caps, no container */
.tag {
  display: inline-flex; align-items: center; gap: 4px; font: 700 10px/1 var(--body); font-stretch: 125%;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); white-space: nowrap;
}
.tag .ic { width: 13px; height: 13px; stroke-width: 2; }
.tag.win { color: var(--spot); }
.tag.rare { color: var(--tc); }

dialog.wide { width: min(680px, calc(100vw - 24px)); }
dialog.small { width: min(440px, calc(100vw - 24px)); }
dialog.small .row { margin-top: 18px; }
.field { display: grid; gap: 6px; }
.field > span { font: 700 11px var(--body); font-stretch: 125%; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-2); }
.field input {
  font: 600 17px var(--body); color: var(--ink); background: var(--die); border: 1.5px solid var(--rule-2); border-radius: 999px;
  padding: 11px 18px; min-width: 0; width: 100%; transition: border-color 160ms ease, box-shadow 160ms ease;
}
@media (prefers-color-scheme: dark) { .field input { background: var(--paper-2); } }
.field input::placeholder { color: var(--ink-3); opacity: 1; }
.field input:focus-visible { outline: none; border-color: var(--spot); box-shadow: 0 0 0 4px color-mix(in srgb, var(--spot) 18%, transparent); }
#joinCode { text-transform: uppercase; letter-spacing: 0.14em; font: 800 19px/1 var(--display); font-stretch: 75%; font-variant-numeric: tabular-nums; padding-block: 12.5px; }
#joinCode::placeholder { color: var(--paper-3); }
@media (prefers-color-scheme: dark) { #joinCode::placeholder { color: var(--rule-2); } }
.stack { display: grid; gap: 12px; justify-items: start; align-content: start; }
.stack .field { width: 100%; }
.stack h3 { margin: 0 0 2px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
dialog .msg:empty { min-height: 0; margin: 0; }
dialog .fine.me { margin-top: 20px; }

/* The leagues dialog: views dim while the next one loads, then rise in */
#leaguesBody { transition: opacity 180ms ease; }
#leaguesBody[aria-busy="true"] { opacity: 0.5; pointer-events: none; }
.view > h2 { margin-bottom: 10px; }
.back { margin: -6px 0 10px; }
.back .link { margin-left: -4px; font-size: 14px; }

.leaguelist { list-style: none; padding: 0; margin: 16px 0 6px; display: flex; flex-direction: column; border-top: 1px solid var(--rule); }
.leaguelist button {
  width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) auto 20px; align-items: center; gap: 4px 14px; text-align: left;
  background: none; border: none; border-bottom: 1px solid var(--rule); padding: 14px 2px; cursor: pointer; color: var(--ink);
  transition: background-color 160ms ease, transform 120ms var(--ease-out);
}
.leaguelist button:active { transform: scale(0.99); }
.leaguelist .nm { font: 800 22px/1.1 var(--display); font-stretch: 75%; overflow-wrap: anywhere; }
.leaguelist .st { display: inline-flex; align-items: center; gap: 10px; color: var(--ink-2); font-size: 14px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.leaguelist .chev { width: 18px; height: 18px; color: var(--ink-3); transition: transform 200ms var(--ease-out), color 160ms ease; }
@media (hover: hover) and (pointer: fine) {
  .leaguelist button:hover .nm { color: var(--spot); }
  .leaguelist button:hover .chev { color: var(--spot); transform: translateX(3px); }
}
@media (max-width: 480px) {
  .leaguelist button { grid-template-columns: minmax(0, 1fr) 20px; }
  .leaguelist .st { grid-row: 2; }
  .leaguelist .chev { grid-row: 1 / span 2; grid-column: 2; }
}
/* Played-today pips, printed like the chance pips */
.dots { display: inline-flex; gap: 3px; }
.dots i { width: 7px; height: 10px; border-radius: 2px; border: 1.2px dashed var(--rule-2); }
.dots i.on { background: var(--spot); border: 1.2px solid var(--spot); }

.yourname { margin: 22px 0 4px; max-width: 320px; }
.forms { display: grid; grid-template-columns: 1fr 1fr; gap: 24px 0; margin-top: 22px; }
.forms > form:first-child { padding-right: 26px; }
.forms > form + form { padding-left: 26px; border-left: 1px solid var(--rule); }
@media (max-width: 560px) {
  .forms { grid-template-columns: 1fr; }
  .forms > form:first-child { padding-right: 0; }
  .forms > form + form { padding: 22px 0 0; border-left: none; border-top: 1px solid var(--rule); }
}

/* Invite code: a numbered slot, like an empty sticker space */
.invite { display: flex; align-items: center; gap: 12px 16px; flex-wrap: wrap; margin: 4px 0 8px; }
.invite .code {
  font: 900 34px/1 var(--display); font-stretch: 62%; letter-spacing: 0.16em; font-variant-numeric: tabular-nums;
  padding: 9px 10px 7px 16px; border: 1.5px dashed var(--rule-2); border-radius: var(--r-ctl); background: var(--paper-2);
  user-select: all;
}
/* Copy buttons answer in place */
.copybtn .lab { display: inline-flex; align-items: center; gap: 6px; transition: filter 120ms ease, opacity 120ms ease; }
.copybtn .lab .ic { width: 16px; height: 16px; color: var(--spot); stroke-width: 2.2; }
.copybtn.swap .lab { filter: blur(3px); opacity: 0; }
.confirm { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; font-size: 14px; color: var(--ink-2); }

/* Segmented toggle: one raised tab slides between options */
.seg {
  --n: 2; --i: 0; position: relative; display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  padding: 3px; background: var(--paper-2); border-radius: 999px; margin: 16px 0 14px; isolation: isolate;
}
.seg::before {
  content: ""; position: absolute; z-index: -1; top: 3px; bottom: 3px; left: 3px; width: calc((100% - 6px) / var(--n));
  border-radius: 999px; background: var(--paper); box-shadow: 0 1px 2px rgba(var(--shadow), 0.12), 0 2px 6px -2px rgba(var(--shadow), 0.22);
  transform: translateX(calc(var(--i) * 100%));
}
@media (prefers-color-scheme: dark) { .seg::before { background: var(--paper-3); } }
.seg button {
  font: 700 14px var(--body); color: var(--ink-2); background: none; border: none; border-radius: 999px; padding: 7px 18px; cursor: pointer;
  transition: color 160ms ease, transform 120ms var(--ease-out); white-space: nowrap;
}
.seg button[aria-pressed="true"] { color: var(--ink); }
.seg button:active { transform: scale(0.96); }
.seg.small { display: grid; width: max-content; margin: 0 0 12px; }
.seg.small button { font-size: 13px; padding: 5px 14px; }

.daynav { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 4px; }
.daynav span { font: 700 12px var(--body); font-stretch: 125%; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-2); font-variant-numeric: tabular-nums; text-align: center; }
.daynav .ghost { width: 36px; height: 32px; padding: 0; display: grid; place-items: center; }
.daynav .ic { width: 18px; height: 18px; }

/* A matchday board */
.board { list-style: none; padding: 0; margin: 0 0 6px; display: flex; flex-direction: column; }
.board li {
  display: grid; grid-template-columns: 22px minmax(0, 1fr) auto 52px; gap: 12px; align-items: center;
  padding: 10px 0; border-bottom: 1px solid var(--rule); min-height: 56px;
}
.board .pos { font: 900 22px var(--display); font-stretch: 62%; color: var(--ink-3); font-variant-numeric: tabular-nums; text-align: center; }
.board li:first-child[data-status="finished"] .pos { color: var(--ink); }
.board .who { display: flex; flex-wrap: wrap; gap: 3px 10px; align-items: baseline; min-width: 0; }
.board .who b { font-weight: 700; overflow-wrap: anywhere; }
.board li.you .who b { color: var(--spot); }
.board .st { color: var(--ink-3); font-size: 14px; white-space: nowrap; }
.board li[data-status="playing"] .st { color: var(--ink-2); }
.board li[data-status="new"] .who b { color: var(--ink-2); font-weight: 600; }
.board .minis { display: flex; gap: 4px; }
.board .minis .sticker { --w: 24px; --rot: 0deg; padding: 1.5px; }
.board .sc { display: grid; justify-items: end; line-height: 1; }
.board .sc b { font: 900 26px/1 var(--display); font-stretch: 62%; font-variant-numeric: tabular-nums; }
.board .sc small { color: var(--ink-2); font-size: 12px; font-variant-numeric: tabular-nums; margin-top: 3px; }
@media (max-width: 480px) {
  .board li { grid-template-columns: 18px minmax(0, 1fr) 44px; row-gap: 6px; }
  .board .minis, .board .st { grid-column: 2; grid-row: 2; }
  .board .sc { grid-column: 3; grid-row: 1 / span 2; }
}

/* Answer by answer */
.compare { display: grid; gap: 22px; }
.compare .q { font: 800 18px/1.15 var(--display); font-stretch: 75%; color: var(--ink); display: flex; gap: 10px; margin: 0 0 4px; }
.compare .q .n { font: 900 18px/1.15 var(--display); font-stretch: 62%; color: var(--spot); font-variant-numeric: tabular-nums; }
.compare ul { list-style: none; padding: 0; margin: 0; }
.compare li {
  display: grid; grid-template-columns: 22px minmax(64px, 0.55fr) minmax(0, 1.6fr) 40px; gap: 12px; align-items: center;
  padding: 7px 0; border-bottom: 1px solid var(--rule); font-size: 14.5px;
}
.compare .mini .sticker { --w: 22px; --rot: 0deg; padding: 1.5px; }
.compare li .nm { color: var(--ink-2); overflow-wrap: anywhere; }
.compare li.you .nm { color: var(--spot); font-weight: 700; }
.compare li .an { font-weight: 700; display: flex; flex-wrap: wrap; gap: 2px 10px; align-items: baseline; }
.compare li .pt { font: 900 19px var(--display); font-stretch: 62%; color: var(--tc); text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 480px) {
  .compare li { grid-template-columns: 22px minmax(0, 1fr) 36px; row-gap: 1px; }
  .compare .mini { grid-row: 1 / span 2; }
  .compare li .nm { grid-column: 2; font-size: 13px; }
  .compare li .an { grid-column: 2; grid-row: 2; }
  .compare li .pt { grid-column: 3; grid-row: 1 / span 2; }
}

/* League table: a printed fixtures-page table */
.tablewrap { overflow-x: auto; margin: 0 -4px; }
.ltable { width: 100%; border-collapse: collapse; font-size: 15px; font-variant-numeric: tabular-nums; }
.ltable th {
  font: 700 11px var(--body); font-stretch: 125%; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-2);
  text-align: left; padding: 6px 4px; border-bottom: 1.5px solid var(--ink);
}
.ltable td { padding: 10px 4px; border-bottom: 1px solid var(--rule); }
.ltable .n { text-align: right; width: 1%; white-space: nowrap; padding-left: 10px; }
.ltable td:first-child { font: 900 19px/1 var(--display); font-stretch: 62%; color: var(--ink-3); }
.ltable tbody tr:first-child td:first-child { color: var(--ink); }
.ltable td.pts { font: 900 21px/1 var(--display); font-stretch: 62%; }
.ltable tr.you td { color: var(--spot); font-weight: 700; }
.ltable .formh { padding-left: 14px; }
.ltable .form { padding-left: 14px; white-space: nowrap; }
.ltable .form span { display: inline-flex; gap: 3px; vertical-align: middle; }
.ltable .form i {
  width: 18px; height: 18px; border-radius: 4px; display: grid; place-items: center; font: 800 10px var(--body); font-style: normal;
  background: var(--paper-2); color: var(--ink-2); border: 1px solid var(--rule);
}
.ltable .form i[data-f="W"] { background: var(--spot); color: var(--spot-ink); border-color: var(--spot); }
.ltable .form i[data-f="-"] { background: none; border-style: dashed; border-color: var(--rule-2); }
@media (max-width: 420px) { .ltable .avg { display: none; } .ltable .form, .ltable .formh { padding-left: 8px; } }

.panel .tablewrap + .fine, .panel .board + .fine { margin-top: 10px; }
.members { list-style: none; padding: 0; margin: 0; }
.members li { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; flex-wrap: wrap; padding: 9px 0; border-bottom: 1px solid var(--rule); }
.members li > span:first-child { display: flex; gap: 10px; align-items: baseline; }
.leave { margin-top: 18px; }

/* Pre-match: who in your leagues has played */
.leaguepulse { list-style: none; padding: 0; margin: 18px 0 0; display: flex; flex-direction: column; gap: 6px; color: var(--ink-2); font-size: 15px; font-variant-numeric: tabular-nums; }
.leaguepulse li { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.leaguepulse .link { font-size: 15px; }

/* Full time: the curve */
.curve { margin: 24px 0 0; display: grid; gap: 6px; max-width: 360px; }
.curvebars { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; height: 92px; align-items: end; }
.curvebars div { display: grid; grid-template-rows: auto 1fr auto; height: 100%; gap: 3px; }
.curvebars i { align-self: end; background: var(--paper-3); border-radius: 3px 3px 0 0; min-height: 2px; transform-origin: bottom; }
.curvebars .yours i { background: var(--spot); }
.curvebars .cn { font-size: 11px; color: var(--ink-3); text-align: center; align-self: end; font-variant-numeric: tabular-nums; }
.curvebars .yours .cn { color: var(--spot); font-weight: 700; }
.curvebars .cl { font: 700 11px var(--body); font-stretch: 112%; color: var(--ink-2); text-align: center; border-top: 1px solid var(--rule-2); padding-top: 3px; font-variant-numeric: tabular-nums; }
.curvebars .yours .cl { color: var(--spot); }

/* Full time: leagues */
.leaguecard + .leaguecard { margin-top: 30px; }
.lchead { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; border-bottom: 1.5px solid var(--ink); padding-bottom: 10px; }
.lchead h3 { margin: 0; font: 800 23px/1.1 var(--display); font-stretch: 75%; text-transform: none; letter-spacing: 0; color: var(--ink); }
.pitch { border: 1.5px dashed var(--rule-2); border-radius: var(--r-card); padding: 22px; display: grid; gap: 14px; justify-items: start; background: var(--paper-2); }
.pitch p { color: var(--ink-2); max-width: 52ch; }
#ftChallenge .lede.tight { margin-bottom: 10px; }

/* Honours: crest stickers, die-cut round, in the answer stickers' finishes */
.honours { list-style: none; padding: 0; margin: 10px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(132px, 42%), 1fr)); gap: 22px 14px; }
.honours li { display: grid; justify-items: center; text-align: center; gap: 2px; align-content: start; }
.honours .badge { margin-bottom: 8px; }
.honours .hn { font: 800 17px/1.1 var(--display); font-stretch: 75%; color: var(--ink); }
.honours .hb { font-size: 12.5px; line-height: 1.35; color: var(--ink-2); max-width: 22ch; }
.honours .hp { font: 700 11px var(--body); font-stretch: 125%; letter-spacing: 0.05em; color: var(--ink-3); margin-top: 3px; font-variant-numeric: tabular-nums; }
.honours li[data-earned="false"] .hn { color: var(--ink-2); }
.honours li[data-earned="false"] .hb { color: var(--ink-3); }
.badge {
  --w: 68px; --rot: 0deg; width: var(--w); aspect-ratio: 1; border-radius: 50%; padding: calc(var(--w) * 0.06);
  background: var(--die); color: #15261c; position: relative;
  transform: perspective(500px) rotate(var(--rot)) rotateX(var(--ry, 0deg)) rotateY(var(--rx, 0deg));
  box-shadow: 0 1px 1px rgba(var(--shadow), 0.14), 0 4px 9px -3px rgba(var(--shadow), 0.32);
  transition: transform 420ms var(--ease-out);
}
.badge .face {
  height: 100%; border-radius: 50%; position: relative; overflow: hidden; display: grid; place-items: center;
  background: var(--face, #eef0ea); box-shadow: inset 0 0 0 1.5px rgba(19, 36, 27, 0.14);
}
.badge .face::after {
  content: ""; position: absolute; inset: -20%; pointer-events: none; mix-blend-mode: soft-light;
  background: linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, 0.9) 50%, transparent 62%);
  transform: translateX(calc(var(--mx, 0.5) * 60% - 30%)); opacity: var(--sheen, 0);
}
.badge svg { width: 62%; height: 62%; fill: none; stroke: currentColor; stroke-width: 2.1; stroke-linecap: round; stroke-linejoin: round; position: relative; z-index: 1; }
.badge svg .fill { fill: currentColor; }
.badge svg .card { fill: var(--die); }
.badge b { font: 900 26px/1 var(--display); font-stretch: 62%; font-variant-numeric: tabular-nums; position: relative; z-index: 1; }
.badge.locked { background: transparent; box-shadow: none; outline: 1.5px dashed var(--rule-2); outline-offset: -1px; color: var(--ink-3); }
.badge.locked .face { background: transparent; box-shadow: none; opacity: 0.55; }
.finds { list-style: none; padding: 0; margin: 0; }
.finds li { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--rule); }
.finds .sticker { --w: 24px; --rot: 0deg; padding: 1.5px; }
.finds li > span:nth-child(2) { display: grid; min-width: 0; }
.finds small { color: var(--ink-2); font-size: 12.5px; }
.finds .chip { font-size: 10px; }

/* Friends motion: one cohesive entrance, gated like the rest */
@media (prefers-reduced-motion: no-preference) {
  .view { animation: rise 260ms var(--ease-out) both; }
  .seg::before { transition: transform 280ms var(--ease-out); }
  .board li, .leaguelist li, .ltable tbody tr { animation: rise 340ms var(--ease-out) both; animation-delay: calc(var(--i, 0) * 40ms + 60ms); }
  .ltable tbody tr:nth-child(2) { --i: 1; } .ltable tbody tr:nth-child(3) { --i: 2; } .ltable tbody tr:nth-child(4) { --i: 3; }
  .ltable tbody tr:nth-child(5) { --i: 4; } .ltable tbody tr:nth-child(n + 6) { --i: 5; }
  .honours li { animation: rise 360ms var(--ease-out) both; animation-delay: calc(var(--i, 0) * 35ms + 80ms); }
  .honours li[data-earned="true"] .badge { animation: slap 560ms var(--ease-spring) both; animation-delay: calc(var(--i, 0) * 35ms + 140ms); }
  .curvebars i { animation: grow 520ms var(--ease-out) both; animation-delay: calc(1.05s + var(--i, 0) * 60ms); }
  .curvebars .cn { animation: fade 300ms ease both; animation-delay: calc(1.35s + var(--i, 0) * 60ms); }
  @keyframes grow { from { transform: scaleY(0.04); } to { transform: none; } }
}
@media (prefers-reduced-motion: reduce) {
  .badge { transition: none; }
  .copybtn .lab, #leaguesBody { transition: opacity 120ms ease; }
  .copybtn.swap .lab { filter: none; }
}

/* ---------------------------------------------------------------- privacy and terms
   The small print at the back of the programme. The album owns the frame
   (masthead, condensed headline, printed tables, empty sticker slots); the
   reading column stays calm at a real measure. */
.doc .top .ghost.tall { text-decoration: none; }
.docmain { display: grid; gap: 0; }
.docmain .headline { font-size: clamp(44px, 10vw, 76px); }
.docmain .lede { color: var(--ink); max-width: 60ch; margin-top: 14px; }
.docmain section { margin-top: 44px; scroll-margin-top: 20px; }
.docmain h2 { font-size: 30px; font-weight: 900; font-stretch: 62%; text-transform: uppercase; letter-spacing: 0; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1.5px solid var(--ink); }
.docmain section > p { max-width: 66ch; font-size: 16.5px; line-height: 1.65; color: var(--ink); }
.docmain section > p + p { margin-top: 12px; }
.docmain section > p.fine { color: var(--ink-2); font-size: 14px; margin-top: 12px; }
.docmain code { font: 700 0.95em var(--display); font-stretch: 75%; background: var(--paper-2); border-radius: 4px; padding: 1px 5px; }
.toc { display: grid; grid-template-columns: repeat(3, max-content); gap: 10px 36px; margin-top: 28px; padding: 14px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
@media (max-width: 480px) { .toc { grid-template-columns: repeat(2, max-content); column-gap: 28px; } }
.toc a {
  font: 700 12px var(--body); font-stretch: 125%; letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--ink-2); text-decoration: none; transition: color 160ms ease;
}
@media (hover: hover) and (pointer: fine) { .toc a:hover { color: var(--spot); } }
.docmain .tablewrap { margin: 0; }
.ledger { margin-top: 16px; font-size: 14.5px; }
.ledger tbody tr { animation: none !important; }
.ledger td { vertical-align: top; line-height: 1.45; padding: 12px 10px 12px 4px; }
.ledger td:first-child { font: 800 17px/1.15 var(--display); font-stretch: 75%; color: var(--ink); width: 22%; }
.ledger td:nth-child(2) { width: 40%; }
.ledger td:last-child { color: var(--ink-2); }
.ledger tbody tr:first-child td:first-child { color: var(--ink); }
@media (max-width: 560px) {
  .ledger thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .ledger tr { display: grid; padding: 12px 0; border-bottom: 1px solid var(--rule); gap: 4px; }
  .ledger td { display: block; width: auto !important; padding: 0; border: none; }
  .ledger td:last-child::before { content: "Visible to: "; font-weight: 700; color: var(--ink); }
}
/* Not kept: a drawn "none" mark, in the icon family's 1.8 stroke */
.emptyslots { list-style: none; padding: 0; margin: 4px 0 0; display: grid; gap: 14px; max-width: 66ch; }
.emptyslots li { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 14px; align-items: start; font-size: 16.5px; line-height: 1.55; }
.emptyslots li::before {
  content: ""; width: 20px; height: 20px; margin-top: 2px; background: var(--miss);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='8.5'/%3E%3Cpath d='M6 18 18 6'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='8.5'/%3E%3Cpath d='M6 18 18 6'/%3E%3C/svg%3E") center / contain no-repeat;
}
.terms { list-style: none; padding: 0; margin: 4px 0 0; display: grid; gap: 14px; max-width: 66ch; font-size: 16.5px; line-height: 1.6; }
.terms b { font-weight: 700; }
.doc .foot { margin-top: 40px; }

/* ---------------------------------------------------------------- small screens */
@media (max-width: 560px) {
  .wm { font-size: 27px; }
  .crest { width: 34px; }
  #guessForm { flex-direction: column; }
  #guessForm .primary { width: 100%; }
  .pips { gap: 6px; }
  .pips li, .pips li .sticker { width: 26px; --w: 26px; }
  .clock { font-size: 56px; }
  .result { grid-template-columns: auto minmax(0, 1fr); padding: 18px; gap: 6px 16px; }
  .stamp { grid-row: span 2; align-self: start; }
  .resulttext { align-self: end; }
  .result .primary { margin-top: 10px; }
  .stamp .sticker { --w: 104px; }
  .resultpts { grid-column: 2; grid-row: 2; font-size: 44px; align-self: start; }
  .commentary { font-size: 22px; }
  .result .primary { width: 100%; }
  .album { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .bars div { grid-template-columns: 104px minmax(0, 1fr) 26px; }
  .sheet { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------------- motion */
@media (prefers-reduced-motion: no-preference) {
  /* The signature: a sticker slaps into its slot */
  .sticker.slap { animation: slap 620ms var(--ease-spring) both; }
  .sticker.slap .face::after { animation: sweep 1100ms var(--ease-out) 380ms both; }
  @keyframes slap {
    0% { transform: perspective(600px) translateY(-46px) rotate(-12deg) scale(1.28); opacity: 0; box-shadow: 0 40px 50px -20px rgba(var(--shadow), 0.4); }
    55% { opacity: 1; }
    72% { transform: perspective(600px) translateY(1px) rotate(var(--rot)) scale(0.985); box-shadow: 0 1px 1px rgba(var(--shadow), 0.18), 0 2px 4px rgba(var(--shadow), 0.2); }
    100% { transform: perspective(600px) rotate(var(--rot)); }
  }
  @keyframes sweep { from { transform: translateX(-60%); opacity: 1; } to { transform: translateX(60%); opacity: var(--sheen, 0); } }
  .result:not([hidden]) { animation: rise 380ms var(--ease-out) both; }
  @keyframes rise { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }
  .album li { animation: rise 420ms var(--ease-out) both; animation-delay: calc(var(--i, 0) * 110ms + 250ms); }
  .album li .sticker { animation: slap 620ms var(--ease-spring) both; animation-delay: calc(var(--i, 0) * 110ms + 250ms); }
  .clockbar i { transition: transform 0.2s linear; }
  .lp-path { animation: draw 0.9s var(--ease-out) forwards; animation-delay: calc(0.25s + var(--i) * 0.16s); }
  .lp-dot { animation: pop 0.45s var(--ease-spring) both; animation-delay: calc(0.1s + var(--i) * 0.16s); transform-box: fill-box; transform-origin: center; }
  .shotmap .shot-path { animation: draw 0.8s var(--ease-out) forwards; animation-delay: calc(0.9s + var(--i) * 0.3s); }
  .shotmap .shot-dot, .shotmap .card { animation: pop 0.45s var(--ease-spring) both; animation-delay: calc(0.7s + var(--i) * 0.3s); transform-box: fill-box; transform-origin: center; }
  .shotmap .shot-n { animation: fade 0.3s both; animation-delay: calc(0.85s + var(--i) * 0.3s); }
  .pips li[data-tier] .sticker { animation: slap 520ms var(--ease-spring) both; }
  .intro .slots li { animation: rise 500ms var(--ease-out) both; animation-delay: calc(var(--i, 0) * 60ms + 120ms); }
  .intro .slots li:nth-child(1) { --i: 0; } .intro .slots li:nth-child(2) { --i: 1; } .intro .slots li:nth-child(3) { --i: 2; }
  .intro .slots li:nth-child(4) { --i: 3; } .intro .slots li:nth-child(5) { --i: 4; }
  .goalscene.flash { animation: flash 1.4s var(--ease-out); }
  @keyframes flash { 18% { filter: brightness(1.12) saturate(1.3); } }
  @keyframes draw { to { stroke-dashoffset: 0; } }
  @keyframes pop { from { transform: scale(0.5); opacity: 0; } to { transform: scale(1); opacity: 1; } }
  @keyframes fade { from { opacity: 0; } to { opacity: 1; } }
  dialog[open] { animation: dlg 240ms var(--ease-out); }
  dialog[open]::backdrop { animation: fade 240ms ease; }
  @keyframes dlg { from { transform: translateY(10px) scale(0.97); opacity: 0; } to { transform: none; opacity: 1; } }
}
@media (prefers-reduced-motion: reduce) {
  .lp-path, .shotmap .shot-path { stroke-dashoffset: 0; }
  .sticker { transition: none; }
  .loadingslots li { animation: none; }
}

/* Wrong answer: the input flinches */
.shake { border-color: var(--miss) !important; }
@media (prefers-reduced-motion: no-preference) {
  .shake { animation: shake 0.34s cubic-bezier(.36, .07, .19, .97); }
  @keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
}
