/* findmygeo: components. "Survey Sticker".
   Hairline rules + hard-offset stickers. No gradients, no blur, no soft shadows, radius 0
   except stickers / pills / switches. Orange (--accent) is the single loud colour.
   Sections follow the CSS vocabulary in CONTRACT.md. */

/* ───────────── 0. Base ───────────── */
:root {
  --map-bg: #eaeaea;
  --ease-out: cubic-bezier(.25, .8, .25, 1);
}
:root[data-theme="dark"] { --map-bg: #000; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --map-bg: #000; }
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 15px/1.45 var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg, canvas { max-width: 100%; }
a { color: inherit; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--accent); }
button, input, select, textarea { font: inherit; color: inherit; border-radius: 0; }
button { cursor: pointer; -webkit-appearance: none; appearance: none; }
[hidden] { display: none !important; }
::selection { background: var(--accent); color: #fff; }

:focus { outline: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ───────────── 1. Layout ───────────── */
.screen {
  --k: 1;
  min-height: 100vh;
  min-height: 100dvh;
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 max(var(--gutter), env(safe-area-inset-right)) calc(var(--s5) + env(safe-area-inset-bottom)) max(var(--gutter), env(safe-area-inset-left));
}

/* TV / projector: full width, everything scales through --k (px) and em (type). */
.screen.wide {
  max-width: none;
  font-size: calc(15px * var(--k));
  padding-left: calc(var(--s4) * var(--k));
  padding-right: calc(var(--s4) * var(--k));
}
@media (min-width: 1200px) { .screen.wide { --k: 1.25; } }
@media (min-width: 1700px) { .screen.wide { --k: 1.6; } }
@media (min-width: 2400px) { .screen.wide { --k: 2.3; } }

/* Fit-to-viewport column (phone guess screen: header, growing map, sticky action bar). */
.screen.fit {
  height: 100vh; height: 100dvh;
  min-height: 0;
  display: flex; flex-direction: column;
  padding-bottom: 0;
  overflow: hidden;
}
.grow { flex: 1 1 auto; min-height: 0; position: relative; }
.grow > .map, .grow > .photo-well { position: absolute; inset: 0; min-height: 0; height: auto; }
.bar {
  position: sticky; bottom: 0;
  margin: 0 calc(var(--gutter) * -1);
  padding: var(--s3) var(--gutter) calc(var(--s3) + env(safe-area-inset-bottom));
  background: var(--bg);
  border-top: 1px solid var(--rule);
  display: flex; gap: var(--s3); align-items: center;
}
.bar > .btn { flex: 1; }

.masthead {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s3);
  padding: .9em 0 .8em;
  border-bottom: 1px solid var(--rule);
  min-height: 3.6em;
}
.masthead > * { min-width: 0; }
.wordmark {
  flex: none;
  font: 700 1.55em/1 var(--font-display);
  text-transform: uppercase; letter-spacing: .1em;
  white-space: nowrap;
}
.wordmark .dot { color: var(--accent); }

.sheet { padding: var(--s4) 0; border-top: 1px solid var(--rule); }
.sheet:first-child { border-top: 0; }
.sheet.ink { border-top: 2px solid var(--ink); }

.with-rail { display: grid; grid-template-columns: var(--rail-w) minmax(0, 1fr); gap: var(--s4); align-items: start; }
.with-rail > :not(.rail) { min-width: 0; }

.rail {
  position: sticky; top: var(--s3);
  display: flex; flex-direction: column;
  padding-top: var(--s4);
}
.rail-item {
  appearance: none; background: none; color: var(--muted);
  border: 0; border-top: 2px solid transparent; border-bottom: 2px solid transparent;
  margin: 0; padding: 12px 0;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  font: 500 12px/1 var(--font-mono); letter-spacing: .06em; font-variant-numeric: tabular-nums;
  text-transform: uppercase;
  cursor: default;
}
.rail-item::before {
  content: ""; width: 10px; height: 10px; border-radius: 50%;
  border: 1.5px solid var(--muted); background: transparent;
}
.rail-item[data-state="done"] { color: var(--ink); }
.rail-item[data-state="done"]::before { background: var(--ink); border-color: var(--ink); }
.rail-item[data-state="current"] {
  color: var(--ink); font-weight: 600;
  border-top-color: var(--accent); border-bottom-color: var(--accent);
}
.rail-item[data-state="current"]::before { background: var(--accent); border-color: var(--accent); }

.split { display: grid; grid-template-columns: 5fr 7fr; gap: var(--s5); align-items: start; }
.split > * { min-width: 0; }
.stack { display: flex; flex-direction: column; gap: var(--s3); }
.stack.lg { gap: var(--s4); }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); }
.spacer { flex: 1; }
hr.rule { border: 0; border-top: 1px solid var(--rule); margin: var(--s4) 0; height: 0; }

@media (max-width: 820px) {
  .split { grid-template-columns: 1fr; gap: var(--s4); }
  .with-rail { grid-template-columns: 1fr; gap: var(--s3) 0; }
  .rail {
    flex-direction: row; overflow-x: auto; padding-top: 0;
    top: 0; z-index: 20;
    margin: 0 calc(var(--gutter) * -1); padding-inline: var(--gutter);
    background: var(--bg); border-bottom: 1px solid var(--rule);
    scrollbar-width: none;
  }
  .rail::-webkit-scrollbar { display: none; }
  .rail-item { flex: 0 0 auto; min-width: 52px; padding: 10px 8px; }
}

/* ───────────── 2. Type ───────────── */
.display {
  font: 700 clamp(40px, 12.5vw, 96px)/.95 var(--font-display);
  text-transform: uppercase; letter-spacing: -.01em;
  overflow-wrap: anywhere;
}
.screen.wide .display { font-size: clamp(64px, 6.6vw, 240px); letter-spacing: -.02em; }
.h2 {
  font: 600 1.85em/1 var(--font-display);
  text-transform: uppercase; letter-spacing: .05em;
}
.label {
  font: 600 .78em/1.2 var(--font-body);
  text-transform: uppercase; letter-spacing: var(--track-label);
  color: var(--muted);
}
.num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }
.big-num {
  font: 500 4.2em/1 var(--font-mono); font-variant-numeric: tabular-nums;
  letter-spacing: -.03em;
}
.muted { color: var(--muted); }
.accent-text { color: var(--accent); }
.center { text-align: center; }

/* ───────────── 3. Controls ───────────── */
.btn {
  --lift: var(--hard);
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 48px; padding: .5em 1.1em .45em;
  font: 600 1.2em/1 var(--font-display);
  text-transform: uppercase; letter-spacing: .09em; text-decoration: none; white-space: nowrap;
  color: var(--ink); background: var(--bg);
  border: var(--border) solid var(--ink); border-radius: 0;
  box-shadow: var(--lift);
  transition: transform var(--fast), box-shadow var(--fast), background var(--fast), color var(--fast);
  user-select: none; -webkit-user-select: none; touch-action: manipulation;
}
.btn:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--shadow); color: var(--ink); }
.btn:active { transform: translate(3px, 3px); box-shadow: var(--hard-press); }
.btn.accent { background: var(--accent); color: var(--on-accent); }
.btn.accent:hover { color: var(--on-accent); }
.btn.ink { background: var(--ink); color: var(--bg); }
.btn.ink:hover { color: var(--bg); }
.btn.lg {
  min-height: 60px; padding: .55em 1.4em .5em; font-size: 1.5em;
  border-width: var(--border-heavy); letter-spacing: .1em;
}
.btn.small { min-height: 36px; padding: .4em .85em .35em; font-size: 1em; box-shadow: var(--hard-sm); }
.btn.small:hover { box-shadow: 4px 4px 0 var(--shadow); }
.btn[disabled], .btn[aria-disabled="true"] {
  background: transparent; color: var(--muted); border-color: var(--muted);
  box-shadow: none; transform: none; cursor: not-allowed;
}
@media (max-width: 600px) { .btn.lg { display: flex; width: 100%; } }

.text-btn {
  appearance: none; background: none; border: 0; padding: .4em 0; margin: 0;
  font: 600 1.05em/1 var(--font-display); text-transform: uppercase; letter-spacing: .1em;
  color: var(--ink);
  text-decoration: underline 2px transparent; text-underline-offset: 5px;
  transition: text-decoration-color var(--fast), color var(--fast);
}
.text-btn:hover { text-decoration-color: var(--accent); }
.text-btn[disabled] { color: var(--muted); cursor: not-allowed; text-decoration: none; }

.icon-btn {
  appearance: none; display: inline-grid; place-items: center;
  width: 44px; height: 44px; padding: 0;
  background: transparent; color: var(--ink);
  border: 1.5px solid var(--ink);
  font: 600 1.4em/1 var(--font-display);
  transition: background var(--fast), color var(--fast);
}
.icon-btn:hover { background: var(--ink); color: var(--bg); }
.icon-btn[disabled] { color: var(--muted); border-color: var(--rule); cursor: not-allowed; background: transparent; }

.seg { display: inline-flex; max-width: 100%; border: 1.5px solid var(--accent); }
.seg > button {
  appearance: none; flex: 1 1 auto; min-height: 44px; min-width: 52px; padding: .35em 1em;
  background: transparent; color: var(--ink); border: 0; border-radius: 0;
  font: 600 1.1em/1 var(--font-display); text-transform: uppercase; letter-spacing: .09em; white-space: nowrap;
  transition: background var(--fast), color var(--fast);
}
.seg > button + button { border-left: 1.5px solid var(--accent); }
.seg > button:hover { background: color-mix(in srgb, var(--accent) 14%, transparent); }
.seg > button[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }
.seg > button:focus-visible { outline-offset: -5px; outline-color: var(--ink); }

.field { display: flex; flex-direction: column; gap: .5em; min-width: 0; }
.field > .seg, .field > .stepper, .stack > .seg, .stack > .stepper { align-self: flex-start; }
.input {
  width: 100%; min-height: 48px; padding: .55em .8em;
  background: transparent; color: var(--ink);
  border: 1.5px solid var(--ink); border-radius: 0;
  font: 500 max(16px, 1.1em)/1.3 var(--font-body);
  -webkit-appearance: none; appearance: none;
}
.input::placeholder { color: var(--muted); opacity: 1; }
.input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.input.code { font: 600 2em/1 var(--font-mono); letter-spacing: .3em; text-transform: uppercase; text-align: center; }

.stepper { display: inline-flex; align-items: stretch; border: 1.5px solid var(--ink); }
.stepper > button {
  appearance: none; width: 48px; min-height: 48px; padding: 0;
  background: transparent; color: var(--ink); border: 0;
  font: 500 1.6em/1 var(--font-display);
  transition: background var(--fast), color var(--fast);
}
.stepper > button:hover { background: var(--ink); color: var(--bg); }
.stepper > button[disabled] { color: var(--muted); background: transparent; cursor: not-allowed; }
.stepper > .num {
  display: grid; place-items: center; min-width: 3.2ch; padding: 0 .6em;
  font-size: 1.4em; font-weight: 500;
  border-left: 1.5px solid var(--ink); border-right: 1.5px solid var(--ink);
}

.dropzone {
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .4em;
  min-height: 160px; padding: var(--s4);
  text-align: center; color: var(--ink);
  background: transparent; border: 2px dashed var(--ink); border-radius: 0;
  cursor: pointer;
  transition: border-color var(--fast), background var(--fast);
}
.dropzone::before {
  content: "+";
  font: 500 4.5em/.8 var(--font-mono); color: var(--accent);
  transition: transform var(--fast);
}
.dropzone:hover, .dropzone.drag { border-style: solid; border-color: var(--accent); }
.dropzone.drag::before { transform: scale(1.15); }
.dropzone input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }

/* ───────────── 4. Team / sticker ───────────── */
.sticker {
  --sz: calc(36px * var(--k, 1));
  flex: none;
  display: inline-grid; place-items: center;
  width: var(--sz); height: var(--sz); border-radius: 50%;
  background: var(--team, var(--panel)); color: var(--on-team);
  border: 2px solid var(--ink);
  box-shadow: var(--hard-sm);
  font: 700 calc(var(--sz) * .46)/1 var(--font-display);
  text-transform: uppercase; letter-spacing: .02em;
  padding-top: .06em;
  user-select: none;
}
.sticker.lg { --sz: calc(56px * var(--k, 1)); border-width: 2.5px; }
.sticker.xl { --sz: calc(120px * var(--k, 1)); border-width: 3px; box-shadow: 5px 5px 0 var(--shadow); }

@keyframes slap {
  from { transform: scale(1.25) rotate(-8deg); opacity: 0; }
  to   { transform: scale(1) rotate(0); opacity: 1; }
}
.slap { animation: slap .35s var(--slap) both; animation-delay: var(--d, 0s); }

.team-chip {
  display: inline-flex; align-items: center; gap: .5em;
  padding: 3px .95em 3px 3px; max-width: 100%;
  background: var(--team, var(--panel)); color: var(--on-team);
  border: 2px solid var(--ink); border-radius: 100px;
  font: 700 1.05em/1 var(--font-display); text-transform: uppercase; letter-spacing: .08em;
  white-space: nowrap;
}
.team-chip .sticker {
  --sz: calc(26px * var(--k, 1));
  box-shadow: none; border-width: 1.5px; background: var(--bg); color: var(--ink);
}

.tag {
  display: inline-block; transform: rotate(-1deg);
  padding: .3em .85em .25em;
  background: var(--bg); color: var(--ink);
  border: 1.5px solid var(--ink); border-radius: 100px;
  font: 600 .9em/1 var(--font-display); text-transform: uppercase; letter-spacing: .12em;
  white-space: nowrap;
}
.tag.accent { background: var(--accent); color: var(--on-accent); }

/* ───────────── 5. Status ───────────── */
.status {
  display: inline-flex; align-items: center; gap: .55em;
  padding: .32em .85em .28em;
  border: 1.5px solid var(--rule); border-radius: 100px;
  color: var(--muted); background: transparent;
  font: 600 .78em/1 var(--font-body); text-transform: uppercase; letter-spacing: var(--track-label);
  white-space: nowrap;
}
.status::before {
  content: ""; flex: none; width: .75em; height: .75em; border-radius: 50%;
  border: 1.5px solid currentColor;
}
.status[data-state="pinned"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.status[data-state="pinned"]::before {
  width: .42em; height: .78em; border: solid currentColor; border-width: 0 2px 2px 0; border-radius: 0;
  transform: translateY(-.1em) rotate(45deg); margin: 0 .2em 0 .15em;
}
.status[data-state="pinning"] { color: var(--ink); border-color: var(--ink); }
.status[data-state="pinning"]::before { background: var(--accent); border-color: var(--accent); animation: pulse 1.1s ease-in-out infinite; }
.status[data-state="out"] { border-style: dashed; text-decoration: line-through; text-decoration-thickness: 1.5px; }
.status[data-state="out"]::before { border-style: dashed; }
.status[data-state="offline"] { border-color: var(--muted); }
.status[data-state="waiting"]::before { border-color: var(--muted); }

/* ───────────── 6. Data ───────────── */
table.board { width: 100%; border-collapse: collapse; font-size: 1.1em; }
table.board th {
  padding: 0 .6em .7em; text-align: left;
  font: 600 .72em/1.2 var(--font-body); text-transform: uppercase; letter-spacing: var(--track-label);
  color: var(--muted); border-bottom: 1px solid var(--ink);
}
table.board td { padding: .7em .6em; border-bottom: 1px solid var(--rule); vertical-align: middle; }
table.board th.num, table.board td.num { text-align: right; }
table.board td.num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
table.board tbody tr.winner td:first-child { box-shadow: inset 3px 0 0 var(--accent); padding-left: .9em; }
table.board tbody tr.winner td { font-weight: 600; }

.callout { border-left: 2px solid var(--accent); padding: .15em 0 .15em .95em; }

/* ───────────── 7. Media ───────────── */
.photo-well {
  position: relative; display: grid; place-items: center;
  width: 100%; height: 100%; min-height: 200px;
  background: #000; border: 1px solid var(--rule); overflow: hidden;
}
/* absolute: a percentage height inside the auto grid row would resolve to the image's natural size and crop it */
.photo-well > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: block; }

.map { position: relative; width: 100%; height: 100%; min-height: 320px; background: var(--map-bg); }

.qr {
  display: inline-block; width: calc(220px * var(--k, 1)); max-width: 100%;
  padding: 12px; line-height: 0;
  background: #fff; border: 2px solid var(--ink); box-shadow: var(--hard);
}
.qr > svg, .qr > img, .qr > canvas { display: block; width: 100%; height: auto; }

.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: var(--s2); }
.thumb {
  position: relative; aspect-ratio: 1; overflow: hidden;
  background: #000; border: 2px solid var(--ink);
}
.thumb > img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb-x {
  position: absolute; top: 0; right: 0; z-index: 2;
  display: grid; place-items: center; width: 32px; height: 32px; padding: 0;
  background: var(--ink); color: var(--bg); border: 0;
  font: 600 20px/1 var(--font-display);
}
.thumb-x:hover { background: var(--accent); color: var(--on-accent); }
.thumb-badge {
  position: absolute; left: 0; bottom: 0; z-index: 2;
  padding: 3px 6px 2px; background: var(--ink); color: var(--bg);
  font: 500 10px/1.1 var(--font-mono); text-transform: uppercase; letter-spacing: .1em;
}

/* ───────────── 8. Feedback ───────────── */
.timer { font: 500 3.6em/1 var(--font-mono); font-variant-numeric: tabular-nums; letter-spacing: -.03em; }
.timer.warn { color: var(--accent); animation: pulse .9s ease-in-out infinite; }

@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
.pulse { animation: pulse 1.8s ease-in-out infinite; }

.toast {
  position: fixed; left: 50%; bottom: calc(var(--s4) + env(safe-area-inset-bottom)); z-index: 3000;
  max-width: calc(100vw - 2 * var(--gutter));
  transform: translate(-50%, 12px); opacity: 0; pointer-events: none;
  padding: .75em 1.3em .7em;
  background: var(--ink); color: var(--bg); border: 2px solid var(--bg);
  outline: 2px solid var(--ink);
  font: 600 clamp(16px, 1.25vw, 30px)/1.1 var(--font-display);
  text-transform: uppercase; letter-spacing: .1em; text-align: center;
  transition: opacity var(--fast), transform var(--fast);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.overlay {
  position: fixed; inset: 0; z-index: 2000;
  display: grid; place-items: center; padding: var(--gutter);
  background: rgba(0, 0, 0, .62);
}
.modal {
  width: 100%; max-width: 520px; max-height: 90dvh; overflow: auto;
  padding: var(--s4);
  background: var(--bg); color: var(--ink);
  border: var(--border) solid var(--ink); box-shadow: var(--hard);
}

.progress { height: 10px; border: 1.5px solid var(--ink); background: transparent; }
.progress > span { display: block; height: 100%; background: var(--accent); }

.empty {
  display: grid; place-items: center; text-align: center; gap: .4em;
  padding: var(--s5) var(--s4);
  color: var(--muted); border: 1.5px dashed var(--muted);
  font-size: .95em;
}

/* ───────────── 9. Leaflet (map.js) ───────────── */
.leaflet-container {
  background: var(--map-bg); font-family: var(--font-body); outline-offset: 0;
}
.map.fmg-picker { cursor: crosshair; }
.map.fmg-picker.is-locked { cursor: default; }
.map.is-locked .leaflet-tile-pane { opacity: .55; }
.map.is-locked .leaflet-marker-pane { opacity: .85; }

.leaflet-bar, .leaflet-touch .leaflet-bar {
  border: 2px solid var(--ink); border-radius: 0; box-shadow: var(--hard-sm);
}
.leaflet-touch .leaflet-bar a, .leaflet-bar a {
  width: calc(40px * var(--k, 1)); height: calc(40px * var(--k, 1)); line-height: calc(38px * var(--k, 1));
  background: var(--bg); color: var(--ink);
  border-bottom: 1.5px solid var(--ink); border-radius: 0;
  font: 500 calc(24px * var(--k, 1))/calc(38px * var(--k, 1)) var(--font-display);
}
.leaflet-touch .leaflet-bar a:first-child, .leaflet-touch .leaflet-bar a:last-child,
.leaflet-bar a:first-child, .leaflet-bar a:last-child { border-radius: 0; }
.leaflet-bar a:last-child { border-bottom: 0; }
.leaflet-bar a:hover, .leaflet-bar a:focus { background: var(--ink); color: var(--bg); }
.leaflet-bar a.leaflet-disabled { background: var(--bg); color: var(--muted); cursor: default; }
.leaflet-touch .leaflet-control-zoom-in, .leaflet-touch .leaflet-control-zoom-out { font-size: calc(24px * var(--k, 1)); }
.leaflet-top.leaflet-right .leaflet-control { margin-top: 12px; margin-right: 12px; }

.leaflet-container .leaflet-control-attribution {
  background: var(--bg); color: var(--muted); opacity: .85;
  font: 400 calc(10px * var(--k, 1))/1.5 var(--font-mono); padding: 1px 6px; margin: 0;
}
.leaflet-container .leaflet-control-attribution a { color: var(--muted); text-decoration: underline 1px; text-underline-offset: 2px; }

/* sticker pin: the .face carries the look + the slap, so Leaflet's own transform is never touched */
.pin-sticker, .pin-target, .dim-label { background: none; border: 0; }
.pin-sticker .face {
  display: grid; place-items: center;
  width: var(--sz, 36px); height: var(--sz, 36px); border-radius: 50%;
  background: var(--team, var(--panel)); color: var(--on-team);
  border: 2px solid var(--ink); box-shadow: var(--hard-sm);
  font: 700 calc(var(--sz, 36px) * .46)/1 var(--font-display);
  text-transform: uppercase; letter-spacing: .02em; padding-top: .06em;
}
.pin-sticker.slap, .pin-target.slap { animation: none; }
.pin-sticker.slap .face, .pin-target.slap .face { animation: slap .35s var(--slap) both; animation-delay: var(--d, 0s); }

.pin-target .face { display: block; position: relative; width: 100%; height: 100%; background: #fff; border: 2px solid #0b0b0b; box-shadow: 3px 3px 0 #0b0b0b; }
.pin-target .face::before, .pin-target .face::after {
  content: ""; position: absolute; left: 50%; top: 50%;
  width: 70%; height: 3.5px; margin: -1.75px 0 0 -35%;
  background: var(--accent); transform: rotate(45deg);
}
.pin-target .face::after { transform: rotate(-45deg); }

.dim-label { width: 0; height: 0; overflow: visible; pointer-events: none; }
.dim-label > span {
  position: absolute; left: 0; top: 0; transform: translate(-50%, -50%);
  display: block; white-space: nowrap; pointer-events: none;
  padding: 3px 7px 2px 13px;
  background: #fff; color: #0b0b0b;
  border: 1.5px solid #0b0b0b;
  box-shadow: inset 7px 0 0 var(--team, var(--accent)), 2px 2px 0 #0b0b0b;
  font: 500 calc(12px * var(--k, 1))/1.1 var(--font-mono); font-variant-numeric: tabular-nums; letter-spacing: .02em;
}
@keyframes dim-label-in { from { visibility: hidden; } to { visibility: visible; } }
.dim-label.late > span { animation: dim-label-in 0s linear both; animation-delay: var(--d, 0s); }

path.dim-line { stroke: var(--accent); stroke-linecap: butt; fill: none; }

/* ───────────── 10. Responsive + motion ───────────── */
@media (max-width: 600px) {
  .masthead { padding-top: .7em; }
  .big-num { font-size: 3.4em; }
  .timer { font-size: 3em; }
  .modal { padding: var(--s3) var(--s3) var(--s4); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
  .toast { transform: translate(-50%, 0); }
}
