/* games/football brand kit (T1). Shared by the game (index.html/style.css) and brand.html.
   Load the fonts first:
   <link rel="preconnect" href="https://fonts.googleapis.com">
   <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
   <link href="https://fonts.googleapis.com/css2?family=Jersey+10&family=Silkscreen:wght@400;700&display=swap" rel="stylesheet">
   Palette: data-palette="a"|"b" on <html> (palette.js sets it). Default B.
   Everything is square-edged: corners are stepped with box-shadow rings, never border-radius. */

/* ---- Colors: mirror palette.js exactly (key fooBar -> --c-foo-bar, arrays -> --c-key-0..n). If you tune
   palette.js, update these too (they were generated by a small node script that imports PALETTES). ---- */
:root,
[data-palette="b"] {
  --c-night: true;
  --c-bg: #0b1230;
  --c-bg-deep: #060a1c;
  --c-panel: #141d48;
  --c-panel-edge: #e9ecff;
  --c-text: #ffffff;
  --c-text-dim: #8f9bd0;
  --c-outline: #04061a;
  --c-accent: #ffd60a;
  --c-accent-2: #ff3b54;
  --c-accent-3: #35c6ff;
  --c-good: #2ee879;
  --c-accent-ink: #04061a;
  --c-orange: #ff8c42;
  --c-panel-2: #1d2862;
  --c-banner: #ffd60a;
  --c-field-1: #2f9e3f;
  --c-field-2: #278a36;
  --c-field-line: #f2fff2;
  --c-field-num: #f2fff2;
  --c-endzone: #6e1a2c;
  --c-endzone-text: #ffd60a;
  --c-sideline: #1f6e2b;
  --c-goalpost: #ffd60a;
  --c-sky: #060a1c;
  --c-stands: #1a2150;
  --c-stands-shade: #10163a;
  --c-crowd-0: #ff3b54;
  --c-crowd-1: #e9ecff;
  --c-crowd-2: #35c6ff;
  --c-crowd-3: #ffd60a;
  --c-crowd-4: #ff8c42;
  --c-crowd-5: #9b6bff;
  --c-crowd-6: #2a2f55;
  --c-lights: #fff6c8;
  --c-bloom: rgba(255,246,200,0.18);
  --c-wall: #141d48;
  --c-wall-trim: #ffd60a;
  --c-vignette: rgba(4,6,26,0.55);
  --c-ink: #04061a;
  --c-skin-0: #f1c27d;
  --c-skin-1: #c68642;
  --c-skin-2: #8d5524;
  --c-skin-3: #5c3a1e;
  --c-hair: #1d140a;
  --c-jersey: #1f3a70;
  --c-jersey-shade: #132650;
  --c-trim: #9fd0f2;
  --c-pants: #e9ecf4;
  --c-pants-shade: #b4bccf;
  --c-helmet: #1f3a70;
  --c-helmet-shine: #6b8cc8;
  --c-facemask: #9fd0f2;
  --c-def: #ff3b54;
  --c-def-shade: #b8203a;
  --c-def-trim: #ffffff;
  --c-def-helmet: #b8203a;
  --c-ref: #ffffff;
  --c-ref-stripe: #04061a;
  --c-flag: #ffd60a;
  --c-kettle: #7a1f2b;
  --c-kettle-shade: #521320;
  --c-sack: #d2ad6e;
  --c-sack-shade: #8f6d3c;
  --c-ball: #8b4a22;
  --c-ball-shade: #5e2f14;
  --c-laces: #ffffff;
  --c-trail: #ffd60a;
  --c-confetti-0: #ffd60a;
  --c-confetti-1: #ff3b54;
  --c-confetti-2: #35c6ff;
  --c-confetti-3: #ffffff;
  --c-confetti-4: #2ee879;
}

[data-palette="a"] {
  --c-bg: #2c5ad8;
  --c-bg-deep: #1a3a9c;
  --c-panel: #14215c;
  --c-panel-edge: #ffffff;
  --c-text: #ffffff;
  --c-text-dim: #b9c8f5;
  --c-outline: #0b1033;
  --c-accent: #ffe03a;
  --c-accent-2: #e8343a;
  --c-accent-3: #3a8cff;
  --c-good: #3fd16a;
  --c-accent-ink: #0b1033;
  --c-orange: #ff8a1f;
  --c-panel-2: #1f2f7a;
  --c-banner: #ffe03a;
  --c-field-1: #4f9a3c;
  --c-field-2: #468c35;
  --c-field-line: #e9f5e1;
  --c-field-num: #e9f5e1;
  --c-endzone: #2c5ad8;
  --c-endzone-text: #ffffff;
  --c-sideline: #3c7a2c;
  --c-goalpost: #ffe03a;
  --c-sky: #8fc6ff;
  --c-stands: #5b6170;
  --c-stands-shade: #434856;
  --c-crowd-0: #e8343a;
  --c-crowd-1: #ffffff;
  --c-crowd-2: #3a8cff;
  --c-crowd-3: #ffe03a;
  --c-crowd-4: #f2a65a;
  --c-crowd-5: #8b5a3c;
  --c-crowd-6: #1c1c1c;
  --c-lights: #ffffff;
  --c-bloom: rgba(255,255,255,0);
  --c-wall: #14215c;
  --c-wall-trim: #ffe03a;
  --c-vignette: rgba(11,16,51,0);
  --c-ink: #101010;
  --c-skin-0: #f1c27d;
  --c-skin-1: #c68642;
  --c-skin-2: #8d5524;
  --c-skin-3: #5c3a1e;
  --c-hair: #2b1d0e;
  --c-jersey: #e8343a;
  --c-jersey-shade: #a8222a;
  --c-trim: #ffffff;
  --c-pants: #f4f4f4;
  --c-pants-shade: #c9c9c9;
  --c-helmet: #e8343a;
  --c-helmet-shine: #ff8a8a;
  --c-facemask: #d8d8d8;
  --c-def: #ffffff;
  --c-def-shade: #bfc6d6;
  --c-def-trim: #14215c;
  --c-def-helmet: #14215c;
  --c-ref: #ffffff;
  --c-ref-stripe: #101010;
  --c-flag: #ffe03a;
  --c-kettle: #7a1f2b;
  --c-kettle-shade: #521320;
  --c-sack: #d2ad6e;
  --c-sack-shade: #8f6d3c;
  --c-ball: #8b4a22;
  --c-ball-shade: #5e2f14;
  --c-laces: #ffffff;
  --c-trail: #ffe03a;
  --c-confetti-0: #ffe03a;
  --c-confetti-1: #e8343a;
  --c-confetti-2: #3a8cff;
  --c-confetti-3: #ffffff;
  --c-confetti-4: #3fd16a;
}

/* Palette N, Under the Lights (Unlimited). Mirrors PALETTES.n in palette.js. */
[data-palette="n"] {
  --c-night: true;
  --c-bg: #060a1e;
  --c-bg-deep: #020410;
  --c-panel: #10173c;
  --c-panel-edge: #e9ecff;
  --c-text: #ffffff;
  --c-text-dim: #7f8bc4;
  --c-outline: #04061a;
  --c-accent: #ffd60a;
  --c-accent-2: #ff3b54;
  --c-accent-3: #35c6ff;
  --c-good: #2ee879;
  --c-accent-ink: #04061a;
  --c-orange: #ff8c42;
  --c-panel-2: #18214f;
  --c-banner: #ffd60a;
  --c-field-1: #145423;
  --c-field-2: #11491e;
  --c-field-line: #cfdccf;
  --c-field-num: #cfdccf;
  --c-endzone: #4f1420;
  --c-endzone-text: #ffd60a;
  --c-sideline: #0b2e13;
  --c-goalpost: #ffd60a;
  --c-sky: #020410;
  --c-stands: #121838;
  --c-stands-shade: #0a0e26;
  --c-crowd-0: #ff3b54;
  --c-crowd-1: #e9ecff;
  --c-crowd-2: #35c6ff;
  --c-crowd-3: #ffd60a;
  --c-crowd-4: #ff8c42;
  --c-crowd-5: #9b6bff;
  --c-crowd-6: #2a2f55;
  --c-lights: #fffbe0;
  --c-bloom: rgba(255,248,214,0.26);
  --c-wall: #10173c;
  --c-wall-trim: #ffd60a;
  --c-vignette: rgba(2,4,16,0.78);
  --c-ink: #04061a;
  --c-skin-0: #f1c27d;
  --c-skin-1: #c68642;
  --c-skin-2: #8d5524;
  --c-skin-3: #5c3a1e;
  --c-hair: #1d140a;
  --c-jersey: #8cc6ee;
  --c-jersey-shade: #5b98c8;
  --c-trim: #1f3a70;
  --c-pants: #1f3a70;
  --c-pants-shade: #132650;
  --c-helmet: #1f3a70;
  --c-helmet-shine: #6b8cc8;
  --c-facemask: #9fd0f2;
  --c-def: #ff3b54;
  --c-def-shade: #b8203a;
  --c-def-trim: #ffffff;
  --c-def-helmet: #b8203a;
  --c-ref: #ffffff;
  --c-ref-stripe: #04061a;
  --c-flag: #ffd60a;
  --c-kettle: #7a1f2b;
  --c-kettle-shade: #521320;
  --c-sack: #d2ad6e;
  --c-sack-shade: #8f6d3c;
  --c-ball: #8b4a22;
  --c-ball-shade: #5e2f14;
  --c-laces: #ffffff;
  --c-trail: #ffd60a;
  --c-confetti-0: #ffd60a;
  --c-confetti-1: #ff3b54;
  --c-confetti-2: #35c6ff;
  --c-confetti-3: #ffffff;
  --c-confetti-4: #2ee879;
  --c-pools: 0.24;
}

/* ---- Derived per-palette tokens ---- */
:root,
[data-palette="b"],
[data-palette="n"] {
  --shadow: #02030c;              /* hard offset shadow */
  --star-1: var(--c-accent-2);
  --star-2: var(--c-accent);
  --star-3: var(--c-accent-3);
  --tier-checkdown-bg: var(--c-panel-2);
  --tier-checkdown-fg: var(--c-good);
  --page-bg:
    radial-gradient(ellipse 260px 150px at 0 0, rgba(255,246,200,.13) 0 40%, rgba(255,246,200,.07) 40% 70%, rgba(255,246,200,.03) 70% 100%, transparent 100%),
    radial-gradient(ellipse 260px 150px at 100% 0, rgba(255,246,200,.13) 0 40%, rgba(255,246,200,.07) 40% 70%, rgba(255,246,200,.03) 70% 100%, transparent 100%),
    linear-gradient(var(--c-bg) 0 240px, color-mix(in srgb, var(--c-bg) 66%, var(--c-bg-deep)) 240px 320px, color-mix(in srgb, var(--c-bg) 33%, var(--c-bg-deep)) 320px 400px, var(--c-bg-deep) 400px);
}
[data-palette="a"] {
  --shadow: #10287a;
  --star-1: var(--c-accent-2);
  --star-2: #ffffff;
  --star-3: var(--c-accent-3);
  --tier-checkdown-bg: var(--c-good);
  --tier-checkdown-fg: var(--c-accent-ink);
  --page-bg: var(--c-bg);
}

/* ---- Type, spacing, frames ---- */
:root {
  /* Silkscreen: labels, buttons, headings. Crisp at multiples of 4px (8-unit em): 12/16/24/32.
     Jersey 10: prompts, answers, numbers. Crisp at multiples of 5px (10-unit em): 20/25/30/40/60. */
  --f-display: "Silkscreen", ui-monospace, monospace;
  --f-body: "Jersey 10", "Arial Narrow", sans-serif;

  --t-label: 12px;   /* Silkscreen: tags, small caps labels */
  --t-btn: 16px;     /* Silkscreen 700: buttons, chips, section titles */
  --t-h2: 24px;      /* Silkscreen 700 */
  --t-h1: 32px;      /* Silkscreen 700: wordmark */
  --t-body: 20px;    /* Jersey: secondary text */
  --t-body-l: 25px;  /* Jersey: answers, input (>=16px so iOS never zooms) */
  --t-prompt: 30px;  /* Jersey: the prompt */
  --t-num: 40px;     /* Jersey: clock */
  --t-score: 60px;   /* Jersey: final score */

  --px: 2px;         /* one "art pixel" of UI chrome */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px;
  --tap: 48px;       /* min tap target */
  --col: 480px;      /* max content column */

  /* Outlined pixel text: 8-way outline + hard drop below. */
  --tx-ol:
    -2px 0 0 var(--c-outline), 2px 0 0 var(--c-outline), 0 -2px 0 var(--c-outline), 0 2px 0 var(--c-outline),
    -2px -2px 0 var(--c-outline), 2px -2px 0 var(--c-outline), -2px 2px 0 var(--c-outline), 2px 2px 0 var(--c-outline),
    0 4px 0 var(--c-outline), -2px 4px 0 var(--c-outline), 2px 4px 0 var(--c-outline);
  --tx-ol-sm:
    -1px 0 0 var(--c-outline), 1px 0 0 var(--c-outline), 0 -1px 0 var(--c-outline), 0 1px 0 var(--c-outline),
    -1px -1px 0 var(--c-outline), 1px -1px 0 var(--c-outline), -1px 1px 0 var(--c-outline), 1px 1px 0 var(--c-outline),
    0 2px 0 var(--c-outline), 1px 2px 0 var(--c-outline), -1px 2px 0 var(--c-outline);

  /* Pixel bevel inside buttons */
  --star-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 9 9' shape-rendering='crispEdges'%3E%3Cpath d='M4 0h1v1h-1zM3 1h3v1h-3zM3 2h3v1h-3zM0 3h9v1h-9zM1 4h7v1h-7zM2 5h5v1h-5zM2 6h2v1h-2zM5 6h2v1h-2zM1 7h2v1h-2zM6 7h2v1h-2zM0 8h2v1h-2zM7 8h2v1h-2z'/%3E%3C/svg%3E");
  --bevel: inset 0 -4px 0 0 rgba(0,0,0,.22), inset 0 2px 0 0 rgba(255,255,255,.35);
}

/* ---- Frame tokens, resolved per element ---- */
:where(.fb, .fb *) {
  /* Stepped pixel frame: 2px --edge ring, 2px --ol ring with notched corners. Lives OUTSIDE the box,
     so give framed things >= 6px of margin. Override --edge per element (focus, error, tier).
     Declared per element (zero-specificity :where) so an element's own --edge override applies. */
  --edge: var(--c-panel-edge);
  --ol: var(--c-outline);
  --ring:
    0 -2px 0 0 var(--edge), 0 2px 0 0 var(--edge), -2px 0 0 0 var(--edge), 2px 0 0 0 var(--edge),
    0 -4px 0 0 var(--ol), 0 4px 0 0 var(--ol), -4px 0 0 0 var(--ol), 4px 0 0 0 var(--ol),
    -2px -2px 0 0 var(--ol), 2px -2px 0 0 var(--ol), -2px 2px 0 0 var(--ol), 2px 2px 0 0 var(--ol);
  /* Small ring (chips): 2px ol only, notched. */
  --ring-sm: 0 -2px 0 0 var(--ol), 0 2px 0 0 var(--ol), -2px 0 0 0 var(--ol), 2px 0 0 0 var(--ol);
  /* Hard drop shadows, shaped like the ring (so the corners stay stepped). */
  --drop: 0 8px 0 0 var(--shadow), -4px 4px 0 0 var(--shadow), 4px 4px 0 0 var(--shadow), -2px 6px 0 0 var(--shadow), 2px 6px 0 0 var(--shadow);
  --drop-pressed: 0 6px 0 0 var(--shadow), -4px 2px 0 0 var(--shadow), 4px 2px 0 0 var(--shadow), -2px 4px 0 0 var(--shadow), 2px 4px 0 0 var(--shadow);
  --drop-sm: 0 4px 0 0 var(--shadow), -2px 2px 0 0 var(--shadow), 2px 2px 0 0 var(--shadow);
}

/* ---- Base ---- */
html { background: var(--c-bg-deep); }
body.fb {
  margin: 0; min-height: 100vh; min-height: 100dvh;
  background: var(--page-bg); background-color: var(--c-bg);
  color: var(--c-text);
  font-family: var(--f-body); font-size: var(--t-body); line-height: 1.1;
  -webkit-font-smoothing: none; -moz-osx-font-smoothing: grayscale; font-smooth: never;
  -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent;
}
.fb *, .fb *::before, .fb *::after { box-sizing: border-box; }
.fb img, .fb canvas, .px-art { image-rendering: pixelated; image-rendering: crisp-edges; }
.app { max-width: var(--col); margin: 0 auto; padding: var(--s4); }

/* ---- Text styles ---- */
.tx-display { font-family: var(--f-display); font-weight: 700; text-transform: uppercase; letter-spacing: 0; }
.tx-label { font-family: var(--f-display); font-size: var(--t-label); text-transform: uppercase; color: var(--c-text-dim); }
.tx-body { font-family: var(--f-body); font-size: var(--t-body); }
.tx-ol { text-shadow: var(--tx-ol); }
.tx-ol-sm { text-shadow: var(--tx-ol-sm); }
.tx-accent { color: var(--c-accent); }
.tx-dim { color: var(--c-text-dim); }
.h1 { font-family: var(--f-display); font-weight: 700; font-size: var(--t-h1); text-transform: uppercase; text-shadow: var(--tx-ol); line-height: 1; }
.h2 { font-family: var(--f-display); font-weight: 700; font-size: var(--t-h2); text-transform: uppercase; text-shadow: var(--tx-ol); line-height: 1.1; }

/* ---- Wordmark: ★★★ NAME ★★★ ---- */
.wordmark { display: flex; align-items: center; justify-content: center; gap: var(--s3); margin: var(--s2) 0; }
.wordmark__name { font-family: var(--f-display); font-weight: 700; font-size: var(--t-h1); line-height: 1;
  text-transform: uppercase; text-shadow: var(--tx-ol); white-space: nowrap; }
.wordmark__name em { font-style: normal; color: var(--c-accent); }
.stars { display: inline-flex; gap: 2px; flex: none; }
.star { width: 18px; height: 18px; display: block; fill: currentColor; shape-rendering: crispEdges; }
.stars .star:nth-child(1) { color: var(--star-1); }
.stars .star:nth-child(2) { color: var(--star-2); }
.stars .star:nth-child(3) { color: var(--star-3); }
.stars--rev { flex-direction: row-reverse; }
.wordmark--sm { gap: var(--s2); }
.wordmark--sm .wordmark__name { font-size: var(--t-btn); text-shadow: var(--tx-ol-sm); }
.wordmark--sm .star { width: 12px; height: 12px; }
@media (max-width: 359px) { .wordmark__name { font-size: var(--t-h2); } .wordmark .star { width: 12px; height: 12px; } }

/* Yellow banner strip (RB menu band) */
.banner { background: var(--c-banner); color: var(--c-accent-ink); font-family: var(--f-display); font-weight: 700;
  font-size: var(--t-btn); text-transform: uppercase; text-align: center; padding: var(--s2) var(--s3);
  box-shadow: 0 -2px 0 0 var(--c-outline), 0 2px 0 0 var(--c-outline), 0 6px 0 0 var(--shadow); }

/* ---- Panels ---- */
.panel { position: relative; background: var(--c-panel); color: var(--c-text);
  padding: var(--s4); margin: 6px 6px 14px; box-shadow: var(--ring), var(--drop); }
.panel--inset { background: var(--c-panel-2); }
.panel__tag { position: absolute; top: -9px; left: 50%; transform: translateX(-50%); background: var(--c-panel);
  padding: 0 var(--s2); font-family: var(--f-display); font-size: var(--t-label); line-height: 14px;
  text-transform: uppercase; color: var(--c-text); white-space: nowrap; }
.panel__tag--left { left: var(--s3); transform: none; }

/* ---- Buttons ---- */
.btn { --btn-bg: var(--c-panel); --btn-fg: var(--c-text);
  appearance: none; border: 0; border-radius: 0; margin: 6px 6px 10px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  min-height: var(--tap); padding: var(--s2) var(--s4);
  background: var(--btn-bg); color: var(--btn-fg);
  font-family: var(--f-display); font-weight: 700; font-size: var(--t-btn); text-transform: uppercase; line-height: 1;
  box-shadow: var(--bevel), var(--ring), var(--drop);
  transition: transform 40ms steps(1); user-select: none; -webkit-user-select: none; touch-action: manipulation; }
.btn:active, .btn.is-pressed { transform: translateY(2px);
  box-shadow: inset 0 4px 0 0 rgba(0,0,0,.22), inset 0 -2px 0 0 rgba(0,0,0,.12), var(--ring), var(--drop-pressed); }
.btn:focus-visible { outline: none; --edge: var(--c-accent); }
.btn--primary { --btn-bg: var(--c-accent); --btn-fg: var(--c-accent-ink); }
.btn--secondary { --btn-bg: var(--c-panel); --btn-fg: var(--c-text); text-shadow: var(--tx-ol-sm); }
.btn--danger { --btn-bg: var(--c-accent-2); --btn-fg: #fff; text-shadow: var(--tx-ol-sm); }
.btn--block { display: flex; width: calc(100% - 12px); }
.btn--lg { min-height: 56px; font-size: var(--t-h2); }
.btn:disabled, .btn.is-disabled { --btn-bg: var(--c-panel-2); --btn-fg: var(--c-text-dim); --edge: var(--c-text-dim);
  cursor: not-allowed; text-shadow: none; transform: none; box-shadow: var(--ring), var(--drop-sm);
  background-image: repeating-linear-gradient(135deg, transparent 0 6px, rgba(0,0,0,.18) 6px 8px); }
.btn .key { font-size: var(--t-label); opacity: .75; }

/* Square icon button (mute, info) */
.icon-btn { appearance: none; border: 0; border-radius: 0; cursor: pointer; margin: 6px;
  width: 44px; height: 44px; display: inline-grid; place-items: center; padding: 0;
  background: var(--c-panel); color: var(--c-text); box-shadow: var(--ring), var(--drop-sm); touch-action: manipulation; }
.icon-btn:active { transform: translateY(2px); box-shadow: var(--ring); }
.icon-btn svg { width: 24px; height: 24px; fill: currentColor; shape-rendering: crispEdges; display: block; }
.icon-btn .when-muted { display: none; }
.icon-btn.is-muted { color: var(--c-text-dim); }
.icon-btn.is-muted .when-muted { display: block; } .icon-btn.is-muted .when-on { display: none; }

/* Segmented toggle (palette switch, tabs) */
.seg { display: inline-flex; margin: 6px; box-shadow: var(--ring), var(--drop-sm); background: var(--c-panel); }
.seg > button { appearance: none; border: 0; border-radius: 0; background: transparent; color: var(--c-text-dim);
  font-family: var(--f-display); font-weight: 700; font-size: var(--t-label); text-transform: uppercase;
  padding: 0 var(--s3); min-height: 36px; cursor: pointer; }
.seg > button + button { box-shadow: -2px 0 0 0 var(--c-outline); }
.seg > button[aria-pressed="true"], .seg > button.is-active { background: var(--c-accent); color: var(--c-accent-ink); }

/* ---- Scoreboard bar ---- */
.scorebar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: var(--s2);
  background: var(--c-outline); color: var(--c-text); padding: var(--s2) var(--s3) var(--s2);
  box-shadow: 0 2px 0 0 var(--c-panel-edge), 0 4px 0 0 var(--c-outline), 0 8px 0 0 var(--shadow); margin-bottom: 14px; }
.scorebar__cell { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.scorebar__cell:last-child { align-items: flex-end; text-align: right; }
.scorebar__k { font-family: var(--f-display); font-size: var(--t-label); text-transform: uppercase; color: var(--c-text-dim); line-height: 1; }
.scorebar__v { font-family: var(--f-body); font-size: var(--t-prompt); line-height: .9; color: var(--c-text); }
.scorebar__clock { font-family: var(--f-body); font-size: var(--t-num); line-height: .85; color: var(--c-accent);
  min-width: 3ch; text-align: center; background: #000; padding: 2px var(--s2) 0;
  box-shadow: 0 0 0 2px var(--c-panel-2), inset 0 -2px 0 0 rgba(255,255,255,.08); }
.scorebar__clock.is-urgent { color: var(--c-accent-2); animation: fb-blink 1s steps(2) infinite; }
.pips { display: flex; gap: 3px; margin-top: 3px; }
.pip { width: 10px; height: 10px; background: var(--c-panel-2); box-shadow: inset 0 0 0 2px rgba(255,255,255,.12); }
.pip.is-now { background: var(--c-text); animation: fb-blink 1s steps(2) infinite; }
.pip.is-final { width: 16px; }
.pip[data-tier] { box-shadow: none; }
.pip[data-tier="checkdown"] { background: var(--c-good); } .pip[data-tier="slant"] { background: var(--c-accent-3); }
.pip[data-tier="dime"] { background: var(--c-orange); } .pip[data-tier="pissmissile"] { background: var(--c-accent); }
.pip[data-tier="hailmary"] { background: #fff; } .pip[data-tier="incomplete"] { background: var(--c-text-dim); }
.pip[data-tier="sack"] { background: var(--c-accent-2); }
/* 30s clock bar under the scoreboard (RB kick-meter look). Set --left: 0..1 */
.clockbar { --left: 1; height: 8px; background: var(--c-panel-2); margin: 0 0 14px; box-shadow: var(--ring-sm); position: relative; }
.clockbar::before { content: ""; position: absolute; inset: 0; width: calc(var(--left) * 100%);
  background: var(--c-good); box-shadow: inset 0 -2px 0 rgba(0,0,0,.25); }
.clockbar.is-urgent::before { background: var(--c-accent-2); }

/* ---- Prompt card ---- */
.prompt-card { position: relative; background: var(--c-panel); padding: var(--s5) var(--s4) var(--s4);
  margin: 12px 6px 14px; box-shadow: var(--ring), var(--drop); }
.prompt-card__meta { position: absolute; top: -12px; left: var(--s3); display: flex; gap: var(--s2); }
.prompt-card__text { font-family: var(--f-body); font-size: var(--t-prompt); line-height: 1; text-shadow: var(--tx-ol-sm);
  overflow-wrap: anywhere; }
.prompt-card--final { --edge: var(--c-accent); }
.prompt-card__sub { margin-top: var(--s2); font-family: var(--f-display); font-size: var(--t-label); text-transform: uppercase; color: var(--c-accent); }
/* little league/slot tags sitting on the frame */
.tag { display: inline-block; font-family: var(--f-display); font-weight: 700; font-size: var(--t-label); line-height: 1;
  text-transform: uppercase; padding: 4px 6px 3px; background: var(--c-text); color: var(--c-accent-ink); box-shadow: var(--ring-sm); }
.tag--nfl { background: var(--c-accent-3); color: var(--c-accent-ink); }
.tag--college { background: var(--c-orange); color: var(--c-accent-ink); }
.tag--final { background: var(--c-accent); color: var(--c-accent-ink); }
.tag--dim { background: var(--c-panel-2); color: var(--c-text-dim); }

/* ---- Answer input + submit ---- */
.answer { display: flex; align-items: stretch; gap: var(--s2); margin: 6px 6px 10px; }
.answer .btn { margin: 0; flex: none; }
.input { appearance: none; border: 0; border-radius: 0; outline: none; flex: 1; min-width: 0; width: 100%;
  min-height: 52px; padding: 4px var(--s3) 0;
  background: var(--c-outline); color: var(--c-text); caret-color: var(--c-accent);
  font-family: var(--f-body); font-size: var(--t-body-l); line-height: 1;
  box-shadow: inset 0 4px 0 0 rgba(0,0,0,.35), var(--ring); }
.input::placeholder { color: var(--c-text-dim); opacity: .7; }
.input:focus, .input.is-focus { --edge: var(--c-accent); }
.input.is-error { --edge: var(--c-accent-2); animation: fb-shake 240ms steps(4) 1; }
.input-hint { font-family: var(--f-display); font-size: var(--t-label); text-transform: uppercase; margin: 2px 6px 0; color: var(--c-text-dim); }
.input-hint--error { color: var(--c-accent-2); }

/* ---- Chips (pick row, generic) ---- */
.chips { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s3); padding: 2px; }
.chip { appearance: none; border: 0; border-radius: 0; cursor: pointer; margin: 2px;
  display: inline-flex; align-items: center; gap: var(--s2); min-height: 40px; padding: 4px var(--s3) 0;
  background: var(--c-panel-2); color: var(--c-text); font-family: var(--f-body); font-size: var(--t-body-l); line-height: 1;
  box-shadow: inset 0 0 0 2px var(--c-panel-edge), var(--ring-sm), var(--drop-sm); touch-action: manipulation; }
.chip:active, .chip.is-pressed { transform: translateY(2px); box-shadow: inset 0 0 0 2px var(--c-panel-edge), var(--ring-sm); }
.chip.is-selected { background: var(--c-accent); color: var(--c-accent-ink); }
.pick { margin: 6px; }
.pick__q { font-family: var(--f-display); font-weight: 700; font-size: var(--t-label); text-transform: uppercase;
  color: var(--c-accent); margin-bottom: var(--s2); }

/* ---- Typo-confirm bubble (points up at the input) ---- */
.bubble { position: relative; margin: 14px 6px 10px; padding: var(--s3) var(--s3) var(--s2);
  background: var(--c-text); color: var(--c-accent-ink); box-shadow: var(--ring-sm), var(--drop-sm); }
.bubble::before { content: ""; position: absolute; top: -12px; left: 20px; width: 20px; height: 12px; background: var(--c-text);
  clip-path: polygon(8px 0, 12px 0, 12px 4px, 16px 4px, 16px 8px, 20px 8px, 20px 12px, 0 12px, 0 8px, 4px 8px, 4px 4px, 8px 4px); }
.bubble__k { font-family: var(--f-display); font-size: var(--t-label); text-transform: uppercase; opacity: .7; }
.bubble__v { font-family: var(--f-body); font-size: var(--t-prompt); line-height: 1; margin: 2px 0 var(--s1); }
.bubble__hint { font-family: var(--f-display); font-size: var(--t-label); text-transform: uppercase; }
.bubble__hint b { background: var(--c-accent-ink); color: var(--c-text); padding: 1px 4px; }

/* ---- Tier chips: <span class="tier tier--dime"><i>🟧</i><b>Dime</b><em>+60</em></span> ---- */
.tier { --t-bg: var(--c-panel-2); --t-fg: var(--c-text);
  position: relative; display: inline-flex; align-items: center; gap: var(--s2); margin: 4px; vertical-align: middle;
  min-height: 36px; padding: 0 var(--s3) 0 var(--s2); background: var(--t-bg); color: var(--t-fg);
  font-family: var(--f-display); font-weight: 700; font-size: var(--t-label); text-transform: uppercase; line-height: 1; white-space: nowrap;
  box-shadow: var(--bevel), var(--ring-sm), var(--drop-sm); }
.tier > i { font-style: normal; font-size: 16px; line-height: 1; font-family: system-ui, "Apple Color Emoji", "Segoe UI Emoji", sans-serif; }
.tier > b { font-weight: 700; }
.tier > em { font-style: normal; font-family: var(--f-body); font-size: var(--t-body); font-weight: 400; margin-left: 2px; padding-top: 2px; }
.tier--lg { min-height: 48px; font-size: var(--t-btn); padding: 0 var(--s4) 0 var(--s3); }
.tier--lg > i { font-size: 22px; } .tier--lg > em { font-size: var(--t-body-l); }
.tier--sm { min-height: 26px; padding: 0 var(--s2) 0 6px; gap: 6px; box-shadow: var(--bevel), var(--ring-sm); }
.tier--sm > i { font-size: 12px; }
.tier--checkdown { --t-bg: var(--tier-checkdown-bg); --t-fg: var(--tier-checkdown-fg); }
.tier--slant { --t-bg: var(--c-accent-3); --t-fg: var(--c-accent-ink); }
.tier--dime { --t-bg: var(--c-orange); --t-fg: var(--c-accent-ink); }
/* The money chip: the only full-yellow tier, with laser streaks and a yellow glow ring. */
.tier--pissmissile { --t-bg: var(--c-accent); --t-fg: var(--c-accent-ink); overflow: visible;
  background-image:
    linear-gradient(90deg, transparent 0 calc(100% - 26px), rgba(255,255,255,.55) calc(100% - 26px) calc(100% - 22px), transparent calc(100% - 22px)),
    repeating-linear-gradient(0deg, transparent 0 6px, rgba(255,255,255,.28) 6px 8px);
  box-shadow: var(--bevel), var(--ring-sm), 0 0 0 4px var(--c-accent), 0 0 0 6px var(--c-outline), var(--drop-sm);
  margin: 8px 8px 8px 22px; }
.tier--pissmissile.tier--sm { margin: 6px; }
.tier--pissmissile:not(.tier--sm)::before { content: ""; position: absolute; right: 100%; top: 50%; width: 18px; height: 10px; margin-top: -5px; margin-right: 6px;
  background: linear-gradient(90deg, transparent 0 4px, var(--c-accent) 4px 6px, transparent 6px 8px, var(--c-accent) 8px 12px, transparent 12px 13px, var(--c-accent) 13px);
  clip-path: polygon(0 4px, 100% 0, 100% 100%, 0 6px); }
.tier--hailmary { --t-bg: #ffffff; --t-fg: var(--c-accent-ink); }
.tier--hailmary > b { display: inline-flex; align-items: center; gap: 4px; }
.tier--hailmary > b::before, .tier--hailmary > b::after { content: ""; width: 9px; height: 9px; background: var(--c-accent-2);
  -webkit-mask: var(--star-mask) center / 9px 9px no-repeat; mask: var(--star-mask) center / 9px 9px no-repeat; }
.tier--hailmary > b::after { background: var(--c-accent-3); }
.tier--incomplete { --t-bg: var(--c-panel-2); --t-fg: var(--c-text-dim); }
.tier--incomplete > b { text-decoration: line-through; text-decoration-thickness: 2px; }
/* White on red with a plain 1-art-px drop (an 8-way outline on 12px Silkscreen smeared into the glyphs). */
.tier--sack { --t-bg: var(--c-accent-2); --t-fg: #ffffff; text-shadow: 0 2px 0 rgba(4,6,26,.45); }
.tier--touchdown { --t-bg: var(--c-good); --t-fg: var(--c-accent-ink); }
.tier--fieldgoal { --t-bg: #ffffff; --t-fg: var(--c-accent-ink); }
.tier--fieldgoal > i, .tier--punt > i { filter: none; }
.tier--punt { --t-bg: var(--c-panel-2); --t-fg: var(--c-text); }

/* ---- Results card ---- */
.results { padding: 0; }
.results__head { text-align: center; padding: var(--s5) var(--s4) var(--s3); }
.results__score { font-family: var(--f-body); font-size: var(--t-score); line-height: .8; color: var(--c-accent); text-shadow: var(--tx-ol); margin: var(--s2) 0 var(--s1); }
.results__stats { display: flex; justify-content: center; gap: var(--s4); margin-top: var(--s2); }
.results__stats div { display: flex; flex-direction: column; align-items: center; }
.results__stats b { font-family: var(--f-body); font-size: var(--t-prompt); font-weight: 400; line-height: .9; }
.results__rows { list-style: none; margin: 0; padding: 0; }
.results__row { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; gap: 0 var(--s2); align-items: start;
  padding: var(--s2) var(--s3) 10px; border-top: 2px solid var(--c-outline); }
.results__row:nth-child(odd) { background: var(--c-panel-2); }
.results__n { font-family: var(--f-display); font-weight: 700; font-size: var(--t-label); color: var(--c-text-dim); padding-top: 4px; }
.results__q { font-family: var(--f-body); font-size: var(--t-body); color: var(--c-text-dim); line-height: 1; overflow-wrap: anywhere; }
.results__a { font-family: var(--f-body); font-size: var(--t-body-l); line-height: 1; margin: 2px 0 6px; overflow-wrap: anywhere; }
.results__pct { font-family: var(--f-display); font-size: var(--t-label); color: var(--c-text-dim); white-space: nowrap; }
.results__row .tier { margin: 2px; }
.results__pts { font-family: var(--f-body); font-size: var(--t-prompt); line-height: 1; text-align: right; text-shadow: var(--tx-ol-sm); padding-top: 2px; }
.results__pts[data-tier="pissmissile"] { color: var(--c-accent); }
.results__pts[data-tier="incomplete"], .results__pts[data-tier="sack"] { color: var(--c-text-dim); }
.results__foot { padding: var(--s3) var(--s3) var(--s2); border-top: 2px solid var(--c-outline); }

/* ---- Share text mockup ---- */
.share-mock { white-space: pre-wrap; font-family: var(--f-body); font-size: var(--t-body-l); line-height: 1.15;
  background: var(--c-outline); color: var(--c-text); padding: var(--s3); margin: 6px 6px 14px; box-shadow: var(--ring-sm), var(--drop-sm); }
.share-mock .emo { font-family: system-ui, "Apple Color Emoji", sans-serif; font-size: 20px; letter-spacing: 2px; }

/* ---- Toast ---- */
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); z-index: 50;
  transform: translate(-50%, 16px); opacity: 0; pointer-events: none; max-width: calc(100vw - 32px);
  background: var(--c-outline); color: var(--c-text); padding: var(--s3) var(--s4) 10px;
  font-family: var(--f-display); font-weight: 700; font-size: var(--t-label); text-transform: uppercase; text-align: center;
  --edge: var(--c-accent); box-shadow: var(--ring), var(--drop-sm);
  transition: opacity 120ms steps(2), transform 120ms steps(2); }
.toast.is-shown { opacity: 1; transform: translate(-50%, 0); }
.toast.is-static { position: relative; left: auto; bottom: auto; transform: none; display: inline-block; margin: 6px; }

/* ---- Animations ---- */
@keyframes fb-blink { 50% { opacity: .25; } }
@keyframes fb-shake { 25% { transform: translateX(-4px); } 50% { transform: translateX(4px); } 75% { transform: translateX(-2px); } }
@keyframes fb-streak { from { background-position: -40px 0, 0 0; } to { background-position: 140px 0, 0 0; } }
.tier--pissmissile.is-live { animation: fb-streak 900ms steps(12) infinite; }
@media (prefers-reduced-motion: reduce) {
  .fb *, .fb *::before, .fb *::after { animation: none !important; transition: none !important; }
}
