@font-face{font-family:"DSEG7";src:url("DSEG7Classic-Bold.woff2") format("woff2"),url("https://cdn.jsdelivr.net/npm/dseg@0.46.0/fonts/DSEG7-Classic/DSEG7Classic-Bold.woff2") format("woff2");font-weight:700;font-display:swap;}
:root {
  --bg: #06080f;
  --electric: #5ce1ff;
  --amber: #ffb000;
  --amber-hi: #ffc533;
  --amber-lo: #e08a00;
  --amber-burn: #a85a00;
  --ink: #ffffff;
  --muted: #8a909c;
  --home: #5cff9a;
  --digit: "DSEG7", ui-monospace, "Courier New", monospace;
  --ui: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html, body {
  margin: 0; height: 100%; background: var(--bg); color: var(--ink);
  font-family: var(--ui); -webkit-tap-highlight-color: transparent; user-select: none;
}
body {
  display: grid; place-items: center; min-height: 100dvh;
  padding: 16px;
  background: radial-gradient(90% 55% at 50% -8%, rgba(40, 90, 160, 0.28) 0%, transparent 55%), radial-gradient(70% 45% at 85% 95%, rgba(20, 120, 160, 0.16) 0%, transparent 50%), var(--bg);
}
.spike {
  width: min(920px, 100%); display: grid; gap: clamp(20px, 4vw, 36px);
  justify-items: center; overflow: visible;
}
.badge {
  font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted); opacity: 0.85;
}
.clock-wrap {
  position: relative; display: grid; justify-items: center; gap: 10px;
  overflow: visible; width: 100%;
}
.clock-label {
  font-size: clamp(12px, 2.2vw, 14px); letter-spacing: 0.28em;
  color: var(--amber-lo); font-weight: 700;
}
.clock {
  font-family: var(--digit);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  font-size: clamp(72px, 22vw, 168px);
  line-height: 1; letter-spacing: 0.04em; color: var(--amber);
  text-shadow: 0 0 1px rgba(255, 200, 80, 0.9), 0 0 18px rgba(255, 176, 0, 0.45), 0 2px 0 rgba(0, 0, 0, 0.55);
  min-width: 4.6em; text-align: center; white-space: nowrap; overflow: visible;
  -webkit-font-smoothing: antialiased; transform: translateZ(0);
}
.clock.running { filter: brightness(1.06); }
.pill {
  position: relative;
  appearance: none; -webkit-appearance: none; border: 0; cursor: pointer; border-radius: 999px;
  min-width: 8.2em; min-height: 2.55em; padding: 0.78em 2.1em; font-family: var(--ui);
  font-size: clamp(18px, 3.6vw, 26px); font-weight: 800; letter-spacing: 0.14em;
  /* Button text transparent — only #toggleLabel / .pill-label paints START/STOP (chrome PNG is glyph-free). */
  color: transparent; -webkit-text-fill-color: transparent;
  background: transparent; overflow: visible; isolation: isolate;
  transition: filter 0.12s ease, transform 0.12s ease;
}
.pill::before,
.pill::after,
.pill-chrome::before,
.pill-chrome::after {
  content: none !important;
}
.pill-chrome {
  position: absolute; inset: 0; border-radius: inherit; z-index: 0; pointer-events: none;
  /* Glass chrome only — no baked START/STOP glyphs in button-05-glass-cut.png */
  background:
    linear-gradient(180deg, rgba(255,255,255,0.14) 0%, rgba(255,255,255,0.03) 28%, rgba(0,0,0,0.18) 100%),
    url("button-05-glass-cut.png") center / 100% 100% no-repeat;
  box-shadow:
    0 0 0 1px rgba(220, 240, 255, 0.55),
    0 0 18px rgba(180, 220, 255, 0.28),
    0 10px 28px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    inset 0 -2px 6px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(10px) saturate(1.2);
  -webkit-backdrop-filter: blur(10px) saturate(1.2);
}
.pill-label {
  position: relative; z-index: 1;
  color: var(--ink);
  -webkit-text-fill-color: var(--ink);
  /* One light glow only — no multi-layer shadow that reads as a ghost double */
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
}
.pill:active { filter: brightness(0.92); transform: translateY(1px); }
.pill.is-running .pill-chrome {
  filter: brightness(0.72) saturate(0.85);
  box-shadow:
    0 0 0 1px rgba(160, 180, 200, 0.35),
    0 6px 16px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    inset 0 -2px 6px rgba(0, 0, 0, 0.45);
}
.score-panel {
  position: relative;
  display: grid; justify-items: center; gap: 8px; width: min(300px, 72vw);
  padding: clamp(16px, 3vw, 24px) clamp(20px, 4vw, 32px); border-radius: 18px;
  background: linear-gradient(180deg, #161a24 0%, #0e1118 100%);
  box-shadow: 0 0 0 1px rgba(92, 225, 255, 0.14), 0 16px 40px rgba(0, 0, 0, 0.45);
  overflow: visible;
}
.team-name {
  font-size: clamp(13px, 2.4vw, 15px); font-weight: 800; letter-spacing: 0.22em;
  color: var(--home); text-shadow: 0 0 10px rgba(92, 255, 154, 0.35);
}
.score {
  position: relative; display: grid; place-items: center; width: 100%;
  min-height: 1.15em; width: max-content; max-width: 100%; overflow: visible; border: 0; background: transparent;
  padding: 0.1em 0.2em; cursor: pointer; color: var(--home);
  font-family: var(--digit); font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  font-size: clamp(56px, 14vw, 112px); line-height: 1; letter-spacing: 0.02em;
  text-shadow: 0 0 6px rgba(80, 255, 140, 0.7), 0 0 18px rgba(40, 200, 90, 0.28), 0 2px 0 rgba(0, 0, 0, 0.5);
  -webkit-font-smoothing: antialiased; transform: translateZ(0);
}
.score:focus-visible {
  outline: 2px solid var(--electric); outline-offset: 6px; border-radius: 8px;
}
.score-hint { font-size: 11px; letter-spacing: 0.08em; color: var(--muted); }
.footnote {
  max-width: 36em; text-align: center; font-size: 12px;
  line-height: 1.55; color: var(--muted);
}
/* Electric burst: lab score-fx-05-lightning; above-right of score, clear of digit AABB */
.score-burst {
  position: absolute;
  left: 78%;
  top: -22%;
  width: min(72vw, 300px);
  aspect-ratio: 1;
  z-index: 6;
  pointer-events: none;
  background: url("score-fx-05-lightning-cut.png") center / contain no-repeat;
  filter:
    brightness(1.45) saturate(1.35)
    drop-shadow(0 0 6px rgba(180, 255, 255, 1))
    drop-shadow(0 0 16px rgba(92, 225, 255, 0.95))
    drop-shadow(0 0 32px rgba(140, 90, 255, 0.75))
    drop-shadow(0 0 48px rgba(40, 180, 255, 0.55));
  opacity: 0;
  transform: translate(-8%, -28%) scale(0.62);
  will-change: transform, opacity, filter;
}
.score-burst.on { animation: electric-burst 0.92s cubic-bezier(0.15, 0.85, 0.25, 1) forwards; }
@keyframes electric-burst {
  0%   {
    opacity: 0;
    filter:
      brightness(1.2) saturate(1.2)
      drop-shadow(0 0 4px rgba(180, 255, 255, 0.9))
      drop-shadow(0 0 12px rgba(92, 225, 255, 0.7))
      drop-shadow(0 0 24px rgba(140, 90, 255, 0.5));
    transform: translate(-8%, -28%) scale(0.62);
  }
  12%  {
    opacity: 1;
    filter:
      brightness(1.65) saturate(1.5)
      drop-shadow(0 0 8px rgba(220, 255, 255, 1))
      drop-shadow(0 0 20px rgba(92, 225, 255, 1))
      drop-shadow(0 0 40px rgba(160, 100, 255, 0.9))
      drop-shadow(0 0 56px rgba(40, 180, 255, 0.7));
    transform: translate(-4%, -34%) scale(1.18);
  }
  28%  {
    opacity: 1;
    filter:
      brightness(1.5) saturate(1.4)
      drop-shadow(0 0 6px rgba(180, 255, 255, 1))
      drop-shadow(0 0 18px rgba(92, 225, 255, 0.95))
      drop-shadow(0 0 36px rgba(140, 90, 255, 0.8))
      drop-shadow(0 0 52px rgba(40, 180, 255, 0.6));
    transform: translate(-2%, -38%) scale(1.22);
  }
  58%  {
    opacity: 0.92;
    filter:
      brightness(1.35) saturate(1.3)
      drop-shadow(0 0 6px rgba(180, 255, 255, 0.95))
      drop-shadow(0 0 16px rgba(92, 225, 255, 0.85))
      drop-shadow(0 0 32px rgba(140, 90, 255, 0.65))
      drop-shadow(0 0 48px rgba(40, 180, 255, 0.45));
    transform: translate(0%, -42%) scale(1.28);
  }
  100% {
    opacity: 0;
    filter:
      brightness(1.15) saturate(1.15)
      drop-shadow(0 0 4px rgba(180, 255, 255, 0.4))
      drop-shadow(0 0 12px rgba(92, 225, 255, 0.3))
      drop-shadow(0 0 24px rgba(140, 90, 255, 0.2));
    transform: translate(4%, -48%) scale(1.36);
  }
}

.clock-fit,
.score-fit {
  position: relative;
  width: 100%;
  max-width: 100%;
  overflow: visible;
  display: grid;
  justify-items: center;
}

