/* Matchday: the shared look for every game (decided 2026-11-21).
   Tokens first, then components. Sticker Book and Comic Strip are alternative looks:
   set data-look="sticker" or data-look="comic" on any container to re-dress what is inside.
   Fonts (load from Google Fonts): Paytone One, Nunito 500–900, Bangers. All three render
   every player name in the release except Bangers (caps only: shouts, never names). */

:root {
  color-scheme: light;

  /* colour: ink and paper */
  --ink: #1B1B1F;          /* outlines, text */
  --ink-2: #4A4F57;        /* secondary text, 8.4:1 on chalk */
  --ink-3: #6B7078;        /* captions, 4.9:1 on chalk */
  --chalk: #FFFBEF;        /* panels */
  --paper: #FFFFFF;        /* inputs, tiles on chalk */
  --line: #E6DFC8;         /* dividers inside panels */

  /* colour: the pitch */
  --grass-1: #47A84C;
  --grass-2: #3C9E45;
  --grass-deep: #2F8A3A;
  --grass-dark: #0F5132;   /* white text 9.4:1 */
  --chalk-line: rgb(255 255 255 / .5);

  /* colour: kit accents (ink text only on these) */
  --sun: #FFD23F;   --sun-deep: #D9A400;
  --orange: #FF8A00; --orange-deep: #C46A00;
  --sky: #9BDCF7;   --sky-deep: #4FA8D8;
  --peach: #FFB27A; --peach-deep: #E0884A;
  --hi: #FFE45C;           /* highlight, picked */
  --blue: #1F6FEB;         /* info, focus ring; white text 4.6:1 */

  /* colour: verdicts (always paired with an icon and a word) */
  --good: #1E9E4A; --good-tint: #D9F7C8; --good-text: #166534;
  --bad: #E3262E;  --bad-tint: #FFD9D6;  --bad-text: #B42318;

  /* colour: duels, one per player */
  --home: #FF6B4A; --away: #3D9BFF;

  /* structure */
  --edge: var(--ink);      /* outline colour */
  --bw: 3px;               /* outline */
  --bw-thin: 2px;
  --r-lg: 22px; --r: 16px; --r-sm: 12px; --r-xs: 8px; --r-pill: 999px;
  --lift: 5px;             /* shadow depth = press distance */
  --sh: 0 var(--lift) 0 var(--ink);
  --sh-sm: 0 3px 0 var(--ink);
  --sh-press: 0 0 0 var(--ink);
  --press: translateY(var(--lift));
  --press-sm: translateY(3px);
  --tilt: 0deg;            /* card tilt (sticker look uses it) */
  --ground: repeating-linear-gradient(90deg, var(--grass-1) 0 44px, var(--grass-2) 44px 88px);

  /* space (4px base) */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 20px; --s6: 24px; --s7: 32px; --s8: 40px;

  /* type */
  --f-display: 'Paytone One', 'Arial Rounded MT Bold', system-ui, sans-serif;
  --f-body: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --f-shout: 'Bangers', Impact, 'Arial Black', sans-serif;
  --display-case: none; --display-track: 0;
  --t-xs: 12px; --t-sm: 14px; --t-md: 16px; --t-lg: 18px; --t-xl: 22px; --t-2xl: 28px; --t-3xl: 36px; --t-4xl: 48px;

  /* motion */
  --d-press: 34ms; --d-quick: 160ms; --d-base: 260ms; --d-pop: 420ms; --d-slow: 600ms;
  --ease-spring: cubic-bezier(.3, .7, .4, 1.5);
  --ease-pop: cubic-bezier(.34, 1.56, .64, 1);
  --ease-out: cubic-bezier(.2, .9, .3, 1);
}

/* ---------- alternative looks ---------- */
[data-look="sticker"] {
  --ink: #14213D; --ink-2: #3E4A60; --ink-3: #5B6579;
  --chalk: #FFFFFF; --paper: #FFFFFF;
  --sun: #E3262E; --sun-deep: #A8161D; --orange: #1F6FEB; --orange-deep: #1450B0;
  --edge: #FFFFFF; --bw: 4px; --r: 10px; --r-sm: 8px; --r-lg: 14px;
  --sh: 0 0 0 2px var(--ink), 5px 6px 0 2px var(--ink);
  --sh-sm: 0 0 0 2px var(--ink), 3px 3px 0 2px var(--ink);
  --sh-press: 0 0 0 2px var(--ink), 0 0 0 2px var(--ink);
  --press: translate(5px, 6px); --press-sm: translate(3px, 3px);
  --tilt: -1.2deg;
  --ground: radial-gradient(circle, #A9D6F7 1.6px, transparent 1.8px) 0 0 / 12px 12px, radial-gradient(circle, #A9D6F7 1.6px, transparent 1.8px) 6px 6px / 12px 12px, #D4ECFF;
  --f-display: 'Anton', Impact, sans-serif; --f-body: 'Lexend', system-ui, sans-serif; --f-shout: 'Anton', Impact, sans-serif;
  --display-case: uppercase; --display-track: .03em;
}
[data-look="sticker"] .btn:not(.chalk):not(.sky):not(.peach):not(:disabled) { color: #FFFFFF; }
[data-look="comic"] {
  --ink: #111111; --chalk: #FFFFFF;
  --sun: #2EC4F1; --sun-deep: #1593BB; --orange: #FF4F9A; --orange-deep: #C42F72; --hi: #FFE14D;
  --bw: 4px; --r: 3px; --r-sm: 3px; --r-lg: 4px; --r-xs: 2px;
  --sh: 6px 6px 0 var(--ink); --sh-sm: 4px 4px 0 var(--ink);
  --press: translate(6px, 6px); --press-sm: translate(4px, 4px);
  --ground: radial-gradient(circle, #FFB3D2 2px, transparent 2.3px) 0 0 / 10px 10px, #FFF3F8;
  --f-display: 'Bungee', 'Arial Black', sans-serif; --f-body: 'Barlow', system-ui, sans-serif;
  --display-case: uppercase;
}

/* ---------- base ---------- */
[hidden] { display: none !important; }
.md, .md * { box-sizing: border-box; }
.md { font: 600 var(--t-md)/1.5 var(--f-body); color: var(--ink); -webkit-tap-highlight-color: transparent; }
.md :focus-visible { outline: 3px dashed var(--blue); outline-offset: 3px; }
.md h1, .md h2, .md h3, .md .display { font-family: var(--f-display); font-weight: 400; line-height: 1.1; text-transform: var(--display-case); letter-spacing: var(--display-track); text-wrap: balance; margin: 0; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-2); }
.caption { font-size: var(--t-xs); font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }

.pitch { background: var(--ground); position: relative; }
.pitch.lines::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(circle at 50% 46%, transparent 0 78px, var(--chalk-line) 79px 82px, transparent 83px),
    linear-gradient(var(--chalk-line), var(--chalk-line)) 50% 46% / 100% 3px no-repeat; }
[data-look] .pitch.lines::before { display: none; }

/* ---------- panel ---------- */
.panel { background: var(--chalk); border: var(--bw) solid var(--edge); border-radius: var(--r); box-shadow: var(--sh); color: var(--ink); }
.panel.pad { padding: var(--s4); }
.panel.flat { box-shadow: none; }
.panel.green { background: var(--grass-2); color: var(--paper); }
.panel.sun { background: var(--sun); }

/* title ribbon on top of a panel or modal */
.ribbon { display: block; width: fit-content; max-width: 100%; margin: 0 auto; background: var(--sun); border: var(--bw) solid var(--edge); border-radius: var(--r-sm); box-shadow: var(--sh-sm);
  padding: 6px 22px; font: 400 var(--t-xl)/1.1 var(--f-display); text-transform: uppercase; letter-spacing: .02em; text-align: center; color: var(--ink); }
.ribbon.on-top { margin-top: calc(-1 * (var(--s5) + 18px)); position: relative; }

/* ---------- buttons ---------- */
.btn { --b: var(--sun); --b-deep: var(--sun-deep);
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2); min-height: 48px; padding: 10px 20px;
  font: 400 var(--t-lg)/1 var(--f-display); text-transform: var(--display-case); letter-spacing: var(--display-track); color: var(--ink);
  background: var(--b); border: var(--bw) solid var(--edge); border-radius: var(--r-sm); box-shadow: var(--sh);
  cursor: pointer; user-select: none; text-decoration: none; position: relative;
  transition: transform var(--d-base) var(--ease-spring), box-shadow var(--d-base) var(--ease-spring), background var(--d-quick); }
.btn:hover { transform: translateY(-2px); box-shadow: 0 calc(var(--lift) + 2px) 0 var(--ink); }
[data-look] .btn:hover { box-shadow: var(--sh); }
.btn:active, .btn.is-pressed { transform: var(--press); box-shadow: var(--sh-press); transition-duration: var(--d-press); }
.btn:disabled, .btn.is-disabled { background: #E9E4D4; color: var(--ink-3); cursor: not-allowed; transform: none; box-shadow: var(--sh-sm); }
.btn svg { width: 22px; height: 22px; flex: none; }
.btn.orange { --b: var(--orange); }
.btn.sky { --b: var(--sky); }
.btn.peach { --b: var(--peach); }
.btn.green { --b: var(--good); color: var(--paper); }
.btn.red { --b: var(--bad); color: var(--paper); }
.btn.chalk { --b: var(--chalk); }
.btn.lg { min-height: 60px; font-size: var(--t-2xl); padding: 12px 28px; border-radius: var(--r); }
.btn.sm { min-height: 38px; font-size: var(--t-md); padding: 6px 14px; box-shadow: var(--sh-sm); }
.btn.sm:active { transform: var(--press-sm); }
.btn.block { display: flex; width: 100%; }
.btn.icon { width: 48px; padding: 0; }
.btn.icon.round { border-radius: 50%; }
.btn.is-loading { color: transparent; }
.btn.is-loading::after { content: ""; position: absolute; width: 22px; height: 22px; border: 3px solid var(--ink); border-right-color: transparent; border-radius: 50%; animation: md-spin .7s linear infinite; }
/* menu button: icon block + label (like the pause menu reference) */
.btn.menu { justify-content: flex-start; padding: 0 18px 0 0; gap: 14px; overflow: hidden; }
.btn.menu .ic { align-self: stretch; display: grid; place-items: center; width: 52px; background: var(--paper); border-right: var(--bw) solid var(--edge); }

/* ---------- chips, stats, badges ---------- */
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; font: 800 var(--t-sm)/1.2 var(--f-body); background: var(--paper); border: var(--bw-thin) solid var(--edge); border-radius: var(--r-pill); color: var(--ink); white-space: nowrap; }
.chip svg { width: 16px; height: 16px; }
.chip.sun { background: var(--sun); } .chip.sky { background: var(--sky); } .chip.good { background: var(--good-tint); color: var(--good-text); } .chip.bad { background: var(--bad-tint); color: var(--bad-text); }
.chip.dark { background: var(--ink); color: var(--chalk); border-color: var(--ink); }
.stat { display: inline-flex; align-items: center; gap: var(--s2); padding: 6px 14px 6px 6px; background: var(--chalk); border: var(--bw) solid var(--edge); border-radius: var(--r-pill); box-shadow: var(--sh-sm); font: 800 var(--t-sm)/1 var(--f-body); color: var(--ink); }
.stat .ic { width: 30px; height: 30px; border-radius: 50%; background: var(--sun); border: var(--bw-thin) solid var(--ink); display: grid; place-items: center; }
.stat .ic svg { width: 18px; height: 18px; }
.stat b { font: 400 var(--t-xl)/1 var(--f-display); font-variant-numeric: tabular-nums; }
.badge { min-width: 24px; height: 24px; padding: 0 6px; display: inline-grid; place-items: center; background: var(--bad); color: var(--paper); border: var(--bw-thin) solid var(--ink); border-radius: var(--r-pill); font: 900 var(--t-xs)/1 var(--f-body); }

/* ---------- inputs ---------- */
.field { display: flex; align-items: center; gap: var(--s3); min-height: 56px; padding: 0 var(--s4); background: var(--paper); border: var(--bw) solid var(--edge); border-radius: var(--r-sm); box-shadow: var(--sh-sm); transition: box-shadow var(--d-quick); }
.field svg { width: 22px; height: 22px; flex: none; color: var(--ink); }
.field input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: 700 var(--t-lg)/1.2 var(--f-body); color: var(--ink); padding: 14px 0; }
.field input::placeholder { color: var(--ink-3); }
.field:focus-within { box-shadow: 0 0 0 5px var(--hi), var(--sh-sm); }
.md .field input:focus-visible { outline: none; }   /* the field's yellow ring shows focus; no second outline */
.md input:not([type=checkbox]):not([type=radio]):not([type=range]):focus-visible, .md textarea:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--hi); }   /* text inputs: a yellow ring, never the dashed one */
.field.is-error { box-shadow: 0 0 0 5px var(--bad-tint), var(--sh-sm); }
.field .clear { border: 0; background: none; padding: 4px; cursor: pointer; color: var(--ink-2); }

/* suggestions open ABOVE the field so the phone keyboard never hides them */
.suggest { display: grid; gap: var(--s2); }
.suggest-row { display: flex; align-items: center; gap: var(--s3); width: 100%; min-height: 52px; padding: 8px 14px; text-align: left; background: var(--chalk); border: var(--bw) solid var(--edge); border-radius: var(--r-sm); box-shadow: var(--sh-sm); font: 800 var(--t-md)/1.2 var(--f-body); color: var(--ink); cursor: pointer; transition: transform var(--d-quick) var(--ease-spring), background var(--d-quick); }
.suggest-row:hover, .suggest-row.is-active { background: var(--hi); }
.suggest-row:active { transform: var(--press-sm); box-shadow: var(--sh-press); }
.suggest-row .who { flex: 1; min-width: 0; }
.suggest-row .who mark { background: none; color: inherit; text-decoration: underline 3px var(--orange); text-underline-offset: 3px; }
.suggest-row small { font: 700 var(--t-sm)/1 var(--f-body); color: var(--ink-3); font-variant-numeric: tabular-nums; }
.suggest-row .avatar { width: 36px; height: 36px; }

.toggle { display: inline-flex; align-items: center; gap: var(--s3); cursor: pointer; font-weight: 800; }
.toggle input { appearance: none; width: 58px; height: 34px; border: var(--bw) solid var(--edge); border-radius: var(--r-pill); background: #E9E4D4; position: relative; cursor: pointer; transition: background var(--d-quick); margin: 0; }
.toggle input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--paper); border: var(--bw-thin) solid var(--ink); transition: transform var(--d-base) var(--ease-spring); }
.toggle input:checked { background: var(--good); }
.toggle input:checked::after { transform: translateX(24px); }

.seg { display: inline-flex; flex-wrap: wrap; background: var(--chalk); border: var(--bw) solid var(--edge); border-radius: var(--r-sm); overflow: hidden; box-shadow: var(--sh-sm); max-width: 100%; }
.seg button { flex: 1 1 auto; border: 0; background: transparent; padding: 10px 14px; font: 800 var(--t-sm)/1 var(--f-body); color: var(--ink); cursor: pointer; }
.seg button + button { border-left: var(--bw) solid var(--edge); }
.seg button[aria-pressed="true"] { background: var(--sun); }

/* ---------- avatars, crests, shirts ---------- */
.avatar { width: 56px; height: 56px; border-radius: 50%; border: var(--bw) solid var(--ink); background: var(--sky); overflow: hidden; flex: none; display: grid; place-items: center; }
.avatar svg, .avatar img { width: 100%; height: 100%; display: block; object-fit: cover; }
.avatar.lg { width: 96px; height: 96px; }
.avatar.home { box-shadow: 0 0 0 4px var(--home); } .avatar.away { box-shadow: 0 0 0 4px var(--away); }
.crest { width: 48px; height: 56px; flex: none; }
.crest svg { width: 100%; height: 100%; overflow: visible; }

/* ---------- golf: hole card ---------- */
.hole-card { display: flex; align-items: center; gap: var(--s4); padding: 22px var(--s4) var(--s4); rotate: var(--tilt); }
.target { flex: none; width: 88px; height: 88px; border-radius: 50%; background: var(--sun); border: var(--bw) solid var(--ink); display: grid; place-content: center; text-align: center; position: relative; box-shadow: inset 0 -6px 0 rgb(0 0 0 / .14); color: var(--ink); }
.target::before { content: ""; position: absolute; left: 50%; top: -16px; width: 3px; height: 20px; background: var(--ink); }
.target::after { content: ""; position: absolute; left: calc(50% + 2px); top: -16px; width: 18px; height: 12px; background: var(--orange); border: 2px solid var(--ink); border-left: 0; clip-path: polygon(0 0, 100% 50%, 0 100%); }
.target small { font: 900 10px/1.2 var(--f-body); letter-spacing: .08em; text-transform: uppercase; }
.target b { font: 400 30px/1 var(--f-display); text-transform: var(--display-case); }
.hole-card .what { display: grid; gap: 4px; min-width: 0; }
.hole-card .what h3 { font-size: var(--t-xl); }
.hole-card .src { font: 600 var(--t-xs)/1.35 var(--f-body); color: var(--ink-3); }

/* ---------- golf: player card (sticker border + tilt) ---------- */
.player-card { position: relative; display: grid; grid-template-columns: auto 1fr; gap: var(--s3) var(--s4); align-items: center; padding: var(--s4); background: var(--paper);
  border: 5px solid var(--paper); border-radius: var(--r); box-shadow: 0 0 0 var(--bw) var(--ink), 4px 6px 0 var(--bw) var(--ink); rotate: -1.2deg; }
.player-card:nth-of-type(even) { rotate: 1.4deg; }
.player-card .name { font: 400 var(--t-xl)/1.1 var(--f-display); text-transform: var(--display-case); }
.player-card .meta { display: flex; flex-wrap: wrap; gap: 6px; grid-column: 1 / -1; }
.player-card .rank-tag { position: absolute; top: -14px; right: 14px; background: var(--ink); color: var(--chalk); border-radius: var(--r-xs); padding: 4px 10px; font: 400 var(--t-md)/1 var(--f-display); }
.player-card.target-holder .rank-tag { background: var(--sun); color: var(--ink); border: var(--bw-thin) solid var(--ink); }
.player-card .credit { grid-column: 1 / -1; font: 600 11px/1.3 var(--f-body); color: var(--ink-3); }

/* ---------- golf: scorecard (our own: chips, not a grid table) ---------- */
.scorecard { display: grid; grid-template-columns: repeat(var(--holes, 3), minmax(0, 1fr)) minmax(0, 1.2fr); gap: var(--s2); }
.hole-chip { display: grid; justify-items: center; gap: 2px; padding: 8px 4px; background: var(--chalk); border: var(--bw) solid var(--edge); border-radius: var(--r-sm); box-shadow: var(--sh-sm); text-align: center; min-width: 0; }
.hole-chip .caption { font-size: 10px; }
.hole-chip b { font: 400 var(--t-2xl)/1 var(--f-display); font-variant-numeric: tabular-nums; }
.hole-chip.now { background: var(--hi); }
.hole-chip.ace { background: var(--good-tint); }
.hole-chip.ace b { color: var(--good-text); }
.hole-chip.total { background: var(--ink); color: var(--chalk); border-color: var(--ink); }
.hole-chip.total .caption { color: var(--sun); }

.progress-dots { display: flex; gap: 6px; }
.progress-dots i { width: 14px; height: 14px; border-radius: 50%; border: var(--bw-thin) solid var(--ink); background: var(--chalk); }
.progress-dots i.done { background: var(--good); } .progress-dots i.now { background: var(--sun); transform: scale(1.25); }

/* ---------- letters ---------- */
.tiles { display: grid; grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)); gap: var(--s2); }
.tile { position: relative; aspect-ratio: 1; max-width: 100%; display: grid; place-items: center; padding: 0; background: var(--paper); border: var(--bw) solid var(--edge); border-radius: var(--r-sm); box-shadow: var(--sh);
  font: 400 clamp(22px, 7vw, 32px)/1 var(--f-display); color: var(--ink); cursor: pointer; user-select: none; transition: transform var(--d-quick) var(--ease-spring), box-shadow var(--d-quick), background var(--d-quick); }
.tile .v { position: absolute; right: 6px; bottom: 3px; font: 900 11px/1 var(--f-body); }
.tile .m { position: absolute; left: 5px; top: 4px; font: 900 10px/1 var(--f-body); background: var(--paper); border: 1.5px solid var(--ink); border-radius: 4px; padding: 1px 3px; }
.tile.l2 { background: var(--sky); } .tile.l3 { background: var(--peach); }
.tile.is-picked { background: var(--hi); transform: var(--press); box-shadow: var(--sh-press); }
.tile .order { position: absolute; top: -9px; right: -9px; width: 22px; height: 22px; border-radius: 50%; background: var(--ink); color: var(--chalk); font: 900 11px/22px var(--f-body); text-align: center; }
.tile.is-empty { visibility: hidden; }
.tile.sm { font-size: 16px; box-shadow: none; border-width: var(--bw-thin); border-radius: var(--r-xs); width: 32px; }
.queue { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.answer-bar { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); min-height: 60px; padding: 8px var(--s4); }
.answer-bar .word { font: 400 var(--t-2xl)/1 var(--f-display); letter-spacing: .12em; min-width: 0; overflow-wrap: anywhere; }
.answer-bar .word:empty::before { content: attr(data-empty); font: 700 var(--t-md)/1 var(--f-body); letter-spacing: 0; color: var(--ink-3); }
.bonus-card { display: flex; align-items: center; gap: var(--s3); padding: 10px var(--s4); background: var(--hi); rotate: -.8deg; }
.bonus-card .label { flex: 1; min-width: 0; }
.bonus-card .label small { display: block; font: 900 10px/1.2 var(--f-body); letter-spacing: .08em; text-transform: uppercase; }
.bonus-card .label b { font: 400 var(--t-lg)/1.15 var(--f-display); }
.bonus-card .pts { font: 400 var(--t-xl)/1 var(--f-display); }
.bonus-card svg { width: 34px; height: 34px; flex: none; }
.word-list { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.word-list li { display: flex; align-items: center; gap: var(--s3); padding: 8px 12px; background: var(--paper); border: var(--bw-thin) solid var(--ink); border-radius: var(--r-sm); }
.word-list .w { font: 400 var(--t-md)/1 var(--f-display); letter-spacing: .08em; min-width: 72px; }
.word-list .p { flex: 1; min-width: 0; font-weight: 700; color: var(--ink-2); }
.word-list .s { font: 400 var(--t-md)/1 var(--f-display); font-variant-numeric: tabular-nums; }

/* ---------- timers ---------- */
.timer-ring { --size: 104px; position: relative; width: var(--size); height: var(--size); flex: none; }
.timer-ring svg { width: 100%; height: 100%; rotate: -90deg; overflow: visible; }
.timer-ring .track { fill: var(--chalk); stroke: var(--ink); stroke-width: 3; }
.timer-ring .bar { fill: none; stroke: var(--good); stroke-width: 11; stroke-linecap: round; }
.timer-ring .n { position: absolute; inset: 0; display: grid; place-items: center; font: 400 calc(var(--size) * .36)/1 var(--f-display); font-variant-numeric: tabular-nums; color: var(--ink); }
.timer-ring.is-hurry .bar { stroke: var(--bad); }
.timer-ring.is-hurry { animation: md-pulse 1s ease-in-out infinite; }
.timer-ring.sm { --size: 56px; } .timer-ring.sm .bar { stroke-width: 8; }
.timer-bar { height: 22px; background: var(--chalk); border: var(--bw) solid var(--edge); border-radius: var(--r-pill); overflow: hidden; box-shadow: var(--sh-sm); }
.timer-bar i { display: block; height: 100%; width: var(--p, 100%); background: repeating-linear-gradient(-45deg, var(--good) 0 10px, #26B055 10px 20px); border-right: var(--bw) solid var(--ink); transition: width 1s linear; }
.timer-bar.is-hurry i { background: repeating-linear-gradient(-45deg, var(--bad) 0 10px, #F04A51 10px 20px); }

/* ---------- duel ---------- */
.duel { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: var(--s3); }
.duel .side { display: flex; align-items: center; gap: var(--s2); min-width: 0; }
.duel .side.away { flex-direction: row-reverse; text-align: right; }
.duel .side b { font: 400 var(--t-3xl)/1 var(--f-display); font-variant-numeric: tabular-nums; }
.duel .side.home b { color: var(--home); -webkit-text-stroke: 1.5px var(--ink); } .duel .side.away b { color: var(--away); -webkit-text-stroke: 1.5px var(--ink); }
.duel .vs { font: 400 var(--t-lg)/1 var(--f-shout); background: var(--ink); color: var(--sun); padding: 6px 8px 4px; border-radius: var(--r-xs); rotate: -6deg; }

/* ---------- feedback ---------- */
.stamp-layer { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; z-index: 5; }
.stamp-layer > * { grid-area: 1 / 1; }
.stamp-layer.end { justify-items: end; align-items: center; padding-right: 10px; }
.stamp-layer.end .burst { width: 124px; height: 124px; margin-right: -6px; }
.stamp-layer.end .stamp { font-size: 34px; position: relative; }
.stamp { display: inline-flex; align-items: center; gap: 8px; padding: 6px 16px 3px; font: 400 44px/1 var(--f-shout); letter-spacing: .03em; white-space: nowrap; border: 4px solid currentColor; border-radius: 10px; background: var(--chalk); rotate: -10deg; box-shadow: 3px 4px 0 currentColor; }
.stamp svg { width: 30px; height: 30px; }
.stamp.good { color: var(--good-text); background: var(--good-tint); }
.stamp.bad { color: var(--bad-text); background: var(--bad-tint); }
.stamp.neutral { color: var(--ink); background: var(--hi); }
.stamp.sm { font-size: 28px; padding: 4px 10px 2px; border-width: 3px; }
.burst { width: 200px; height: 200px; background: var(--hi); border: 0;
  clip-path: polygon(50% 0%, 57% 30%, 79% 9%, 68% 36%, 98% 28%, 74% 48%, 100% 62%, 70% 62%, 85% 90%, 59% 70%, 50% 100%, 42% 70%, 15% 90%, 30% 62%, 0% 62%, 26% 48%, 2% 28%, 32% 36%, 21% 9%, 43% 30%); }
.burst.ink { filter: drop-shadow(0 0 0 var(--ink)); }
.toast { display: inline-flex; align-items: center; gap: var(--s3); padding: 10px 16px; background: var(--ink); color: var(--chalk); border: var(--bw) solid var(--ink); border-radius: var(--r-sm); box-shadow: 0 4px 0 var(--sun); font: 800 var(--t-sm)/1.3 var(--f-body); }
.toast svg { width: 20px; height: 20px; flex: none; }
.toast.good { background: var(--good-tint); color: var(--good-text); box-shadow: 0 4px 0 var(--good); border-color: var(--good-text); }
.toast.bad { background: var(--bad-tint); color: var(--bad-text); box-shadow: 0 4px 0 var(--bad); border-color: var(--bad-text); }
.toast-host { position: absolute; left: 0; right: 0; bottom: var(--s4); display: grid; justify-items: center; gap: var(--s2); pointer-events: none; z-index: 20; }

.verdict { display: flex; align-items: center; gap: var(--s3); padding: var(--s3) var(--s4); border: var(--bw) solid currentColor; border-radius: var(--r-sm); font-weight: 800; }
.verdict.good { color: var(--good-text); background: var(--good-tint); }
.verdict.bad { color: var(--bad-text); background: var(--bad-tint); }
.verdict svg { width: 26px; height: 26px; flex: none; }

/* ---------- overlays ---------- */
.scrim { position: absolute; inset: 0; background: rgb(27 27 31 / .45); backdrop-filter: blur(3px); display: grid; place-items: center; padding: var(--s5); z-index: 30; }
.modal { width: 100%; max-width: 340px; padding: var(--s5); padding-top: 0; background: var(--orange); border: var(--bw) solid var(--edge); border-radius: var(--r-lg); box-shadow: 0 8px 0 var(--ink); display: grid; gap: var(--s4); text-align: center; }
.modal .ribbon { margin-top: -22px; background: var(--chalk); }
.modal p { font-weight: 800; color: var(--ink); }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; background: var(--chalk); border-top: var(--bw) solid var(--ink); border-radius: var(--r-lg) var(--r-lg) 0 0; padding: var(--s3) var(--s4) var(--s5); z-index: 30; display: grid; gap: var(--s3); }
.sheet::before { content: ""; justify-self: center; width: 48px; height: 6px; border-radius: 3px; background: var(--ink); opacity: .3; }

/* ---------- navigation ---------- */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); }
.bottom-nav { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s2); padding: var(--s2); background: var(--grass-dark); border-top: var(--bw) solid var(--ink); }
.bottom-nav a { display: grid; justify-items: center; gap: 2px; padding: 8px 4px 6px; background: var(--grass-2); border: var(--bw) solid var(--ink); border-radius: var(--r-sm); box-shadow: var(--sh-sm); color: var(--paper); text-decoration: none; font: 800 11px/1 var(--f-body); }
.bottom-nav a svg { width: 26px; height: 26px; }
.bottom-nav a[aria-current="page"] { background: var(--sun); color: var(--ink); }

/* ---------- lists ---------- */
.leader { display: grid; gap: var(--s2); margin: 0; padding: 0; list-style: none; }
.leader li { display: flex; align-items: center; gap: var(--s3); padding: 8px 12px; background: var(--chalk); border: var(--bw) solid var(--edge); border-radius: var(--r-sm); }
.leader .pos { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; border: var(--bw-thin) solid var(--ink); font: 400 var(--t-md)/1 var(--f-display); background: var(--paper); flex: none; }
.leader li:nth-child(1) .pos { background: var(--sun); } .leader li:nth-child(2) .pos { background: #D9DEE6; } .leader li:nth-child(3) .pos { background: var(--peach); }
.leader .nm { flex: 1; min-width: 0; font-weight: 800; }
.leader .sc { font: 400 var(--t-lg)/1 var(--f-display); font-variant-numeric: tabular-nums; }
.leader li.me { background: var(--hi); box-shadow: var(--sh-sm); }

/* game card on the home screen */
.game-card { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: var(--s4); padding: var(--s4); text-decoration: none; color: var(--ink); background: var(--chalk); border: var(--bw) solid var(--edge); border-radius: var(--r); box-shadow: var(--sh); transition: transform var(--d-base) var(--ease-spring), box-shadow var(--d-base) var(--ease-spring); }
.game-card:hover { transform: translateY(-2px); }
.game-card:active { transform: var(--press); box-shadow: var(--sh-press); transition-duration: var(--d-press); }
.game-card .art { width: 64px; height: 64px; border-radius: var(--r-sm); border: var(--bw) solid var(--ink); display: grid; place-items: center; background: var(--sun); }
.game-card .art svg { width: 40px; height: 40px; }
.game-card h3 { font-size: var(--t-xl); }
.game-card p { font-size: var(--t-sm); color: var(--ink-2); margin: 2px 0 0; }
.game-card.is-soon { opacity: .7; box-shadow: var(--sh-sm); }
.game-card.daily { background: var(--sun); }
.game-card.daily .art { background: var(--paper); }

.empty-state { display: grid; justify-items: center; gap: var(--s3); text-align: center; padding: var(--s6) var(--s4); }
.empty-state svg.art { width: 120px; height: 120px; }

/* ---------- round 2 (2026-11-23): letters boards, reveal and shuffle; golf hole header and result ---------- */
/* letters: pick a board */
.mode { display: grid; gap: 8px; padding: 14px; text-align: left; cursor: pointer; width: 100%; font: inherit; color: inherit; }
.mode h3 { font-size: var(--t-xl); display: flex; align-items: center; gap: 10px; }
.mode p { margin: 0; font: 700 var(--t-sm)/1.4 var(--f-body); color: var(--ink-2); }
.mode .eg { display: flex; gap: 4px; }
.mode .eg .tile.sm { width: 26px; font-size: 13px; }
.mode.is-picked { background: var(--hi); }
.mode .tag { margin-left: auto; font: 900 11px/1 var(--f-body); letter-spacing: .08em; text-transform: uppercase; background: var(--ink); color: var(--chalk); padding: 5px 8px; border-radius: 6px; }
.mode .done { font: 800 var(--t-sm)/1.2 var(--f-body); color: var(--good-text); }
/* letters: clear inside the word bar; shuffle icon */
.answer-bar .x { border: 0; background: var(--line); border-radius: 50%; width: 30px; height: 30px; display: grid; place-items: center; cursor: pointer; flex: none; color: var(--ink); }
.answer-bar .x svg { width: 16px; height: 16px; }
/* letters: who the word was counted as */
.reveal { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 2px 12px; align-items: center; padding: 16px 14px 12px; background: var(--good-tint); }
.reveal .tag { position: absolute; top: -12px; left: 14px; background: var(--good); color: #fff; border: 2px solid var(--ink); border-radius: 8px; padding: 3px 9px; font: 400 14px/1 var(--f-display); letter-spacing: .06em; }
.reveal .avatar { width: 52px; height: 52px; grid-row: 1 / span 2; }
.reveal .name { font: 400 var(--t-lg)/1.1 var(--f-display); overflow-wrap: anywhere; align-self: end; }
.reveal .meta-line { grid-column: 2; align-self: start; }
.reveal .pts { grid-column: 3; grid-row: 1 / span 2; font: 400 34px/1 var(--f-display); text-align: right; font-variant-numeric: tabular-nums; }
.reveal .pts small { display: block; font: 800 11px/1.2 var(--f-body); color: var(--ink-2); letter-spacing: .02em; }
.word-list.rich li { align-items: flex-start; }
.word-list.rich .p b { display: block; color: var(--ink); font-weight: 800; }
.word-list.rich .p span { display: block; font: 700 12px/1.3 var(--f-body); color: var(--ink-3); }

/* golf: which hole, which period */
.holebar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 10px; }
.holebar .n { white-space: nowrap; font: 400 36px/1 var(--f-display); color: #fff; text-shadow: 0 3px 0 var(--ink); }
.holebar .n small { font: 400 16px/1 var(--f-display); opacity: .9; margin-left: 4px; }
.scope { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px 5px; white-space: nowrap; border: var(--bw) solid var(--ink); border-radius: 99px; box-shadow: var(--sh-sm); font: 400 13px/1 var(--f-display); letter-spacing: .04em; text-transform: uppercase; color: var(--ink); }
.scope svg { width: 18px; height: 18px; }
.scope.all { background: var(--sun); }
.scope.since { background: var(--sky); }
.scope.sm { font-size: 12px; padding: 5px 10px 4px; box-shadow: none; border-width: var(--bw-thin); }
.scope.sm svg { width: 15px; height: 15px; }
.scope-line { font: 900 12px/1 var(--f-body); letter-spacing: .06em; text-transform: uppercase; color: var(--ink); }
.holestrip { display: flex; align-items: center; gap: 10px; padding: 8px 12px; }
.holestrip .h { font: 400 22px/1 var(--f-display); white-space: nowrap; }
.holestrip .t { min-width: 0; flex: 1; font: 800 13px/1.25 var(--f-body); }
.holestrip .t b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-weight: 800; }
.holestrip .t span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.holestrip .t span { display: block; color: var(--ink-3); font-weight: 700; }

/* golf: one result card. A verdict, you, a rank ruler, the target; one meta line each so it never scrolls */
.result-card { display: grid; }
.result-card .head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 14px; border-bottom: var(--bw) solid var(--ink); border-radius: calc(var(--r) - 3px) calc(var(--r) - 3px) 0 0; }
.result-card .head.off { background: var(--bad-tint); color: var(--bad-text); }
.result-card .head.near { background: var(--hi); color: var(--ink); }
.result-card .head.ace { background: var(--good-tint); color: var(--good-text); }
.result-card .head .w { display: flex; align-items: center; gap: 8px; font: 400 var(--t-lg)/1.1 var(--f-display); text-transform: uppercase; letter-spacing: .03em; }
.result-card .head .w svg { width: 24px; height: 24px; }
.result-card .head .p { font: 400 30px/1 var(--f-display); font-variant-numeric: tabular-nums; }
.rc-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 2px 12px; align-items: center; padding: 8px 14px 9px; }
.rc-row .role { grid-column: 1 / -1; display: flex; align-items: center; gap: 6px; font: 900 11px/1 var(--f-body); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.rc-row .role i { font-style: normal; background: var(--ink); color: var(--chalk); border-radius: 6px; padding: 4px 8px; }
.rc-row.tgt .role i { background: var(--sun); color: var(--ink); border: 2px solid var(--ink); padding: 2px 7px; }
.rc-row .avatar { width: 48px; height: 48px; grid-column: 1; grid-row: 2; }
.rc-row .txt { grid-column: 2; grid-row: 2; min-width: 0; }
.rc-row .name { font: 400 var(--t-lg)/1.1 var(--f-display); overflow-wrap: anywhere; }
.rc-row .big { grid-column: 3; grid-row: 2; text-align: right; font: 400 26px/1 var(--f-display); font-variant-numeric: tabular-nums; }
.rc-row .big small { display: block; margin-top: 2px; font: 800 11px/1.2 var(--f-body); color: var(--ink-3); letter-spacing: .02em; }
.meta-line { font: 700 12px/1.3 var(--f-body); color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rc-row.off .avatar { filter: grayscale(.5); }
.ruler { padding: 0 14px 6px; background: repeating-linear-gradient(135deg, transparent 0 8px, rgb(0 0 0 / .035) 8px 16px); border-block: 2px dashed var(--line); }
.ruler .track { position: relative; height: 32px; margin: 6px 8px 0; }
.ruler .track::before { content: ""; position: absolute; left: 0; right: 0; top: 22px; height: 6px; background: var(--ink); border-radius: 4px; opacity: .85; }
.ruler .tick { position: absolute; top: 18px; width: 2px; height: 14px; background: var(--ink); opacity: .5; translate: -1px 0; }
.ruler .m { position: absolute; top: 0; translate: -50% 0; }
.ruler .m b svg { width: 14px; height: 14px; }
.ruler .m b { width: 26px; height: 26px; border-radius: 50%; border: 3px solid var(--ink); display: grid; place-items: center; font: 900 11px/1 var(--f-body); }
.ruler .m.you b { background: var(--ink); color: var(--chalk); }
.ruler .m.tgt b { background: var(--sun); }
.ruler .span { position: absolute; top: 20px; height: 10px; background: var(--orange); border: 2px solid var(--ink); border-radius: 6px; }
.ruler .nums { position: relative; height: 12px; margin: 3px 8px 0; font: 800 10px/1 var(--f-body); color: var(--ink-3); }
.ruler .nums span { position: absolute; translate: -50% 0; }
.ruler .gaptxt { text-align: center; font: 800 12.5px/1.3 var(--f-body); padding-top: 2px; }
.ruler .gaptxt b { font: 400 16px/1 var(--f-display); }
.gapline { padding: 5px 14px; text-align: center; font: 800 13px/1.3 var(--f-body); color: var(--ink-2); background: repeating-linear-gradient(135deg, transparent 0 8px, rgb(0 0 0 / .035) 8px 16px); border-block: 2px dashed var(--line); }
.result-card .also { padding: 6px 14px 8px; border-top: 2px dashed var(--line); font: 700 12.5px/1.35 var(--f-body); color: var(--ink-2); }
.result-card .also b { color: var(--ink); }
.result-card .also.credit { padding-block: 4px; font-size: 11px; font-weight: 600; color: var(--ink-3); }
.result-card .also.credit a { color: inherit; }

/* ---------- animations (utility classes; JS adds and removes them) ---------- */
.a-squash { animation: md-squash 180ms ease-out; }
.a-shake { animation: md-shake 400ms ease-in-out; }
.a-pop { animation: md-pop var(--d-pop) var(--ease-pop) both; }
.a-stamp { animation: md-stamp var(--d-base) cubic-bezier(.2, .9, .3, 1.2) both; }
.a-burst { animation: md-burst var(--d-pop) var(--ease-pop) both; }
.a-drop { animation: md-drop 380ms var(--ease-pop) both; }
.a-tick { animation: md-tick 300ms ease-out; display: inline-block; }
.a-flip { animation: md-flip 560ms var(--ease-out) both; }
.a-wiggle { animation: md-wiggle 600ms ease-in-out; }
.a-slide-up { animation: md-slide-up 320ms var(--ease-out) both; }
.a-fade-out { animation: md-fade-out 260ms ease-in both; }
.a-glow { animation: md-glow 1.4s ease-in-out 2; }
.a-float { animation: md-float 2.4s ease-in-out infinite; }
.stamp.a-stamp.a-shake { animation: md-stamp var(--d-base) cubic-bezier(.2, .9, .3, 1.2) both, md-shake 400ms var(--d-base) ease-in-out; }

@keyframes md-squash { 40% { transform: scale(1.07, .9); } 100% { transform: scale(1); } }
@keyframes md-shake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-8px) rotate(-1deg); } 40% { transform: translateX(7px) rotate(1deg); } 60% { transform: translateX(-5px); } 80% { transform: translateX(3px); } }
@keyframes md-pop { 0% { transform: scale(0); } 70% { transform: scale(1.15); } 100% { transform: scale(1); } }
@keyframes md-stamp { from { transform: scale(2.2) rotate(-14deg); opacity: 0; } to { transform: scale(1) rotate(0); opacity: 1; } }
@keyframes md-burst { from { transform: scale(0) rotate(-40deg); } to { transform: scale(1) rotate(0); } }
@keyframes md-drop { from { transform: translateY(-48px) scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes md-tick { 40% { transform: scale(1.35) rotate(-6deg); } }
@keyframes md-flip { from { transform: perspective(800px) rotateY(-90deg); } to { transform: perspective(800px) rotateY(0); } }
@keyframes md-wiggle { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-6deg); } 50% { transform: rotate(5deg); } 75% { transform: rotate(-3deg); } }
@keyframes md-slide-up { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes md-fade-out { to { opacity: 0; transform: translateY(-8px); } }
@keyframes md-glow { 50% { box-shadow: 0 0 0 8px var(--hi), var(--sh); } }
@keyframes md-float { 50% { transform: translateY(-6px); } }
@keyframes md-pulse { 0%, 100% { transform: scale(1); } 15% { transform: scale(1.08); } }
@keyframes md-spin { to { transform: rotate(360deg); } }
@keyframes md-confetti { to { transform: translate(var(--dx), 260px) rotate(var(--rot)); opacity: 0; } }
.confetti-bit { position: absolute; top: 30%; left: 50%; width: 10px; height: 14px; border: 2px solid var(--ink); border-radius: 2px; animation: md-confetti 1100ms cubic-bezier(.2, .6, .4, 1) forwards; pointer-events: none; z-index: 6; }

@media (prefers-reduced-motion: reduce) {
  .md *, .md *::before, .md *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
  .timer-ring.is-hurry, .a-float { animation: none !important; }
  .confetti-bit { display: none; }
}
