/* KB Coach — futuristic minimal. #D70304 on near-black. Landscape-first (16:9). */
:root {
  --red: #D70304;
  --bg: #0A0A0B;
  --surface: #141416;
  --line: #232327;
  --text: #F7F7F8;
  --muted: #8B8B93;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.accent { color: var(--red); }
.hidden { display: none !important; }
.screen { min-height: 100vh; }

/* ---- Config screen (skeleton; P1 fleshes out) ---- */
.brand { padding: 40px 48px 8px; display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.btn-compact { padding: 10px 18px; font-size: 13px; }
.brand h1 { font-size: 28px; font-weight: 800; letter-spacing: -0.02em; margin: 0; }
.tagline { color: var(--muted); font-size: 14px; margin: 4px 0 0; }

.presets {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  padding: 24px 48px;
}

.section-label {
  padding: 8px 48px 0;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 12px;
}

.config-panel { padding: 0 48px 120px; }

/* Preset cards */
.preset-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
  background: var(--surface);
  /* Buttons don't inherit colour/font from the page — set both explicitly or the
     label falls back to the UA's dark button text and vanishes on the dark card. */
  color: var(--text);
  font-family: inherit;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 18px 16px;
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.2s ease;
}
.preset-card:hover {
  border-color: color-mix(in srgb, var(--red) 40%, var(--line));
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(215, 3, 4, 0.12);
}
.preset-card:active { transform: scale(0.98); }
.preset-card.active { border-color: var(--red); box-shadow: inset 0 0 0 1px var(--red); }
.preset-name { font-size: 17px; font-weight: 800; letter-spacing: -0.01em; color: var(--text); }
.preset-sub { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }

/* Config grid */
.config-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px 28px;
  align-items: start;
}
.control { display: flex; flex-direction: column; gap: 10px; }
.control-label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; font-weight: 700; }
.control-body { display: flex; flex-direction: column; gap: 10px; }
.control-hint { margin: 0; font-size: 11px; color: var(--muted); line-height: 1.4; }
.control-static { margin: 0; font-size: 14px; color: var(--text); font-weight: 600; }

/* Segmented control */
.segmented { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.seg {
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--muted);
  border-radius: 9px;
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  letter-spacing: 0.01em;
  transition: color 0.12s ease, border-color 0.12s ease, background 0.12s ease;
}
.seg:hover { color: var(--text); }
.seg.active { color: #fff; background: var(--red); border-color: var(--red); }

/* Range + number inputs */
.range-row { display: flex; align-items: center; gap: 14px; }
.range-row input[type="range"] { flex: 1; accent-color: var(--red); }
.range-val { font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; min-width: 62px; }
.weight-row { display: flex; align-items: center; gap: 10px; }
.control input[type="number"] {
  width: 84px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 9px;
  padding: 9px 10px;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  font-variant-numeric: tabular-nums;
}
.unit { font-size: 13px; color: var(--muted); }

/* Chips (exercise picker) */
.chip-list { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--muted);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: color 0.12s ease, border-color 0.12s ease;
}
.chip:hover { color: var(--text); }
.chip.active { color: #fff; border-color: var(--red); background: color-mix(in srgb, var(--red) 22%, transparent); }
.chip.static { cursor: default; color: var(--text); border-style: dashed; }
.chip.static.burpee { border-color: color-mix(in srgb, var(--red) 45%, var(--line)); }
.ghost-btn {
  align-self: flex-start;
  background: none;
  border: 1px solid var(--line);
  color: var(--muted);
  border-radius: 9px;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}
.ghost-btn:hover { color: var(--text); border-color: var(--muted); }

/* Reps grid */
.reps-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.rep-cell { display: flex; flex-direction: column; gap: 6px; }
.rep-name { font-size: 12px; color: var(--muted); font-weight: 600; }
.rep-cell input[type="number"] { width: 100%; }

.summary-strip {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 16px 48px;
  background: color-mix(in srgb, var(--surface) 85%, transparent);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
}
.summary-item { display: flex; flex-direction: column; }
.summary-item span { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
.summary-item label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }

.btn-start {
  margin-left: auto;
  background: var(--red);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 14px 44px;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.2s ease;
}
.btn-start:hover { transform: translateY(-1px); box-shadow: 0 6px 30px rgba(215, 3, 4, 0.55); }
.btn-start:active { transform: scale(0.97); }

/* Liquid metal button — CSS-only recreation of the animated chrome-ring pill button
   (the paper-design WebGL shader swapped for a rotating conic-gradient; same silhouette:
   transparent button > animated metal ring > dark inner pill with an icon badge). Used
   for the primary CTAs (Start, Go again) layered on top of .btn-start for positioning. */
@property --liquid-angle {
  syntax: '<angle>';
  inherits: false;
  initial-value: 0deg;
}
.btn-start.liquid-btn {
  background: none;
  border: none;
  padding: 0;
  border-radius: 0;
  box-shadow: none;
}
.btn-start.liquid-btn:hover { box-shadow: none; }
.liquid-border {
  display: block;
  border-radius: 999px;
  padding: 3px;
  background: conic-gradient(from var(--liquid-angle, 0deg),
    var(--red) 0%, #ffffff 18%, var(--red) 36%, #3a0405 58%, var(--red) 80%, #ffffff 92%, var(--red) 100%);
  animation: liquidSpin 6s linear infinite;
  box-shadow: 0 10px 32px rgba(215, 3, 4, 0.4);
  transition: box-shadow 0.2s ease;
}
.liquid-btn:hover .liquid-border { box-shadow: 0 14px 42px rgba(215, 3, 4, 0.6); }
@keyframes liquidSpin { to { --liquid-angle: 360deg; } }
.liquid-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg);
  border-radius: 999px;
  padding: 13px 34px 13px 13px;
  transition: background 0.15s ease;
}
.liquid-btn:hover .liquid-inner { background: #17171a; }
.liquid-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  flex-shrink: 0;
}
.liquid-text { font-weight: 800; font-size: 16px; letter-spacing: 0.02em; color: #fff; }
.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 32px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}

/* ---- Workout screen ---- */
#workoutScreen { position: relative; overflow: hidden; height: 100vh; }

.trainer-video, .placeholder-bg, .trainer-still {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* Static pose image — used for movements that have no clip yet (warm-up drills,
   cool-down stretches). Sits above the gradient, below the videos. */
.trainer-still { z-index: 1; opacity: 0; transition: opacity 0.3s ease; }
.trainer-still.show { opacity: 1; }
/* Placeholder behind, videos above it, HUD on top. Videos crossfade via opacity —
   never display:none, or the transition can't run. */
.placeholder-bg { z-index: 0; opacity: 1; transition: opacity 0.3s ease; }
.placeholder-bg.behind-video { opacity: 0; }
.trainer-video { z-index: 1; opacity: 0; transition: opacity 0.3s ease; }
.trainer-video.show { opacity: 1; }
.hud { z-index: 2; }

/* P1 placeholders — one gradient per movement pattern */
.placeholder-bg[data-pattern="hinge"]    { background: radial-gradient(ellipse at 50% 30%, #2a0d0d, var(--bg) 75%); }
.placeholder-bg[data-pattern="squat"]    { background: radial-gradient(ellipse at 50% 30%, #26100a, var(--bg) 75%); }
.placeholder-bg[data-pattern="push"]     { background: radial-gradient(ellipse at 50% 30%, #1c1520, var(--bg) 75%); }
.placeholder-bg[data-pattern="pull"]     { background: radial-gradient(ellipse at 50% 30%, #0d1a2a, var(--bg) 75%); }
.placeholder-bg[data-pattern="fullbody"] { background: radial-gradient(ellipse at 50% 30%, #2a0d18, var(--bg) 75%); }
.placeholder-bg[data-pattern="carry"]    { background: radial-gradient(ellipse at 50% 30%, #0d2a1a, var(--bg) 75%); }
.placeholder-bg[data-pattern="cardio"]   { background: radial-gradient(ellipse at 50% 30%, #2a1a0d, var(--bg) 75%); }
.placeholder-bg[data-pattern="rest"]     { background: radial-gradient(ellipse at 50% 30%, #16161a, var(--bg) 75%); }
.placeholder-bg[data-pattern="warmup"]   { background: radial-gradient(ellipse at 50% 30%, #1a2410, var(--bg) 75%); }
.placeholder-bg[data-pattern="cooldown"] { background: radial-gradient(ellipse at 50% 30%, #101c24, var(--bg) 75%); }

.hud {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: linear-gradient(to top, rgba(10,10,11,0.85) 0%, transparent 30%),
              linear-gradient(to bottom, rgba(10,10,11,0.6) 0%, transparent 18%);
}

.progress-track { height: 4px; background: rgba(255,255,255,0.12); }
.progress-fill { height: 100%; width: 0%; background: var(--red); transition: width 0.3s linear; box-shadow: 0 0 14px rgba(215, 3, 4, 0.7); }

.hud-top { display: flex; gap: 10px; padding: 14px 24px; }
.hud-chip {
  background: rgba(20,20,22,0.65);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.03em;
  font-variant-numeric: tabular-nums;
}

.hud-bottom {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 0 40px 32px;
}
/* Trainer footage varies in brightness, so the HUD carries its own shadow to stay
   legible over a light concrete floor as well as a dark scene. */
.hud-exercise h2 { font-size: 44px; font-weight: 800; margin: 0; letter-spacing: -0.01em; text-shadow: 0 2px 18px rgba(0,0,0,0.75); }
.hud-exercise p { margin: 6px 0 0; font-size: 18px; color: #C9C9D1; font-weight: 600; text-shadow: 0 2px 12px rgba(0,0,0,0.7); }
.hud-next { font-size: 15px; }
.hud-next::before { content: ""; }

/* Countdown lives inside a draining progress ring — the per-segment clock reads as a
   game HUD dial rather than a bare number. --p is the remaining fraction (1 → 0). */
.hud-countdown-wrap {
  position: relative;
  width: 250px;
  height: 250px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.cd-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(var(--red) calc(var(--p, 1) * 1turn), rgba(255,255,255,0.1) 0);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 7px), #000 calc(100% - 6px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 7px), #000 calc(100% - 6px));
  filter: drop-shadow(0 0 10px rgba(215, 3, 4, 0.45));
}
.hud-countdown-wrap.rest .cd-ring {
  background: conic-gradient(rgba(247,247,248,0.85) calc(var(--p, 1) * 1turn), rgba(255,255,255,0.1) 0);
  filter: none;
}
.hud-countdown {
  font-size: 104px;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
  text-shadow: 0 4px 30px rgba(0,0,0,0.8);
}
.hud-countdown.final { color: var(--red); text-shadow: 0 0 34px rgba(215, 3, 4, 0.6), 0 4px 30px rgba(0,0,0,0.8); }
.hud-countdown.punch { animation: punch 0.4s cubic-bezier(0.22, 1, 0.36, 1); }
@keyframes punch { 0% { transform: scale(1.22); } }

/* ---- Finish screen ---- */
#finishScreen {
  position: relative;
  overflow: hidden;
  display: grid;
  place-content: center;
  text-align: center;
  background: radial-gradient(900px 500px at 50% 30%, rgba(215, 3, 4, 0.10), transparent 65%);
}
.finish-fx { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.finish-content { position: relative; z-index: 1; display: grid; justify-items: center; gap: 28px; }
/* Staggered entrance — each row lands a beat after the last. */
.finish-content > * { opacity: 0; animation: riseIn 0.55s cubic-bezier(0.22, 1, 0.36, 1) forwards; }
.finish-content > *:nth-child(1) { animation-delay: 0.05s; }
.finish-content > *:nth-child(2) { animation-delay: 0.15s; }
.finish-content > *:nth-child(3) { animation-delay: 0.3s; }
.finish-content > *:nth-child(4) { animation-delay: 0.45s; }
.finish-content > *:nth-child(5) { animation-delay: 0.6s; }
.finish-pb {
  margin: 0;
  color: var(--red);
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-shadow: 0 0 24px rgba(215, 3, 4, 0.5);
}
#finishScreen h2 { font-size: 40px; font-weight: 800; margin: 0; }
.finish-stats { display: flex; gap: 40px; margin: 0; }
.finish-stats dt { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.finish-stats dd { font-size: 32px; font-weight: 800; margin: 6px 0 0; font-variant-numeric: tabular-nums; }
.finish-streak { color: var(--muted); font-size: 14px; margin: 0; letter-spacing: 0.02em; }

/* ---- History screen ---- */
#historyScreen { padding-bottom: 48px; }
.stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  padding: 20px 48px 4px;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px 18px;
}
.stat-value { font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; display: block; }
.stat-label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700; }

.history-actions { display: flex; flex-wrap: wrap; gap: 10px; padding: 20px 48px 8px; align-items: center; }
.history-actions .btn-start { margin-left: 0; padding: 12px 26px; font-size: 14px; }
.history-actions .btn-secondary { padding: 12px 20px; font-size: 14px; }
.ghost-btn.danger { margin-left: auto; color: #ff6a6a; border-color: #402022; }
.ghost-btn.danger:hover { color: #fff; background: #611; border-color: #a33; }

.history-table-wrap { padding: 12px 48px 0; overflow-x: auto; }
.history-table { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.history-table th {
  text-align: left; font-size: 11px; color: var(--muted); text-transform: uppercase;
  letter-spacing: 0.08em; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.history-table td { padding: 11px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.history-table tr:hover td { background: var(--surface); }
.history-table .abandoned { color: var(--muted); }
.tag-abandoned { color: #ffab5a; font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 700; }
.history-empty { padding: 40px 48px; color: var(--muted); font-size: 15px; }
.finish-actions { display: flex; align-items: center; gap: 14px; justify-content: center; }

/* Workout HUD: hint the cursor for tap-to-pause / hold-to-abandon */
#workoutScreen { cursor: pointer; }

/* ==================== Game feel ==================== */

/* Ambient depth on the setup screen — the red glow drifts slowly across the page,
   subtle enough to read as "alive" rather than distracting. */
#configScreen {
  background-image: radial-gradient(1100px 520px at 50% 50%, rgba(215, 3, 4, 0.08), transparent 60%);
  background-repeat: no-repeat;
  background-size: 180% 180%;
  animation: ambientDrift 24s ease-in-out infinite alternate;
}
@keyframes ambientDrift {
  0% { background-position: 88% -10%; }
  100% { background-position: 25% 30%; }
}

/* Progressive disclosure: day templates are the fast path, everything else lives
   behind one toggle so the setup screen opens simple. */
.more-toggle-row { padding: 4px 48px 8px; }
.more-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: 1px solid var(--line);
  color: var(--muted);
  border-radius: 999px;
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  font-family: inherit;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.more-toggle:hover { color: var(--text); border-color: var(--muted); }
.more-toggle-chevron { display: inline-block; font-size: 12px; transition: transform 0.25s ease; }
.more-toggle[aria-expanded="true"] .more-toggle-chevron { transform: rotate(180deg); }
.more-section.hidden { display: none; }
.more-section:not(.hidden) { animation: riseIn 0.4s cubic-bezier(0.22, 1, 0.36, 1) both; }

/* Screen transitions — config fades only (its summary strip is position:fixed and
   must not sit inside a transformed ancestor mid-animation); the rest rise in. */
.screen-enter { animation: screenFade 0.45s ease both; }
#workoutScreen.screen-enter,
#finishScreen.screen-enter,
#historyScreen.screen-enter { animation: screenRise 0.5s cubic-bezier(0.22, 1, 0.36, 1) both; }
@keyframes screenFade { from { opacity: 0; } }
@keyframes screenRise { from { opacity: 0; transform: translateY(16px) scale(0.99); } }

/* Boot stagger — plays once on load, gated by body.boot so re-renders don't flicker. */
@keyframes riseIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.boot .brand { animation: riseIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) both; }
.boot .preset-card {
  opacity: 0;
  animation: riseIn 0.45s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: calc(var(--i, 0) * 55ms);
}
.boot .config-grid .control {
  opacity: 0;
  animation: riseIn 0.45s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: calc(140ms + var(--i, 0) * 40ms);
}
.boot .summary-strip { animation: riseIn 0.5s 0.25s cubic-bezier(0.22, 1, 0.36, 1) both; }

/* Value-change feedback */
.pop { animation: pop 0.3s cubic-bezier(0.22, 1, 0.36, 1); }
@keyframes pop { 0% { transform: scale(1.18); } }

/* Segment-change slide for the exercise name / rep line */
.swap { animation: swapIn 0.45s cubic-bezier(0.22, 1, 0.36, 1); }
@keyframes swapIn { 0% { opacity: 0; transform: translateY(16px); } }

/* Red edge glow that breathes through the final 3 seconds of a work segment */
.vignette {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  opacity: 0;
  box-shadow: inset 0 0 140px 30px rgba(215, 3, 4, 0.35);
  transition: opacity 0.3s ease;
}
.vignette.final { opacity: 1; animation: vigPulse 1s ease-in-out infinite; }
@keyframes vigPulse { 50% { opacity: 0.45; } }

/* Round-start flash */
.go-flash {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(ellipse at center, rgba(215, 3, 4, 0.28), transparent 65%);
}
.go-flash.show { animation: goFlash 0.55s ease-out; }
@keyframes goFlash { 0% { opacity: 1; } 100% { opacity: 0; } }

/* Milestone banners — Halfway there / Final round */
.banner {
  position: absolute;
  top: 20%;
  left: 0;
  right: 0;
  z-index: 4;
  text-align: center;
  pointer-events: none;
  opacity: 0;
  font-size: 58px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fff;
  text-shadow: 0 0 44px rgba(215, 3, 4, 0.95), 0 2px 18px rgba(0, 0, 0, 0.7);
}
.banner.show { animation: bannerIn 1.7s cubic-bezier(0.22, 1, 0.36, 1) both; }
@keyframes bannerIn {
  0% { opacity: 0; transform: scale(1.35); }
  12% { opacity: 1; transform: scale(1); }
  72% { opacity: 1; }
  100% { opacity: 0; }
}

/* Pause overlay */
.pause-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-content: center;
  text-align: center;
  background: rgba(10, 10, 11, 0.55);
  -webkit-backdrop-filter: blur(16px) saturate(0.85);
  backdrop-filter: blur(16px) saturate(0.85);
}
.pause-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  animation: riseIn 0.35s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.pause-icon { display: flex; gap: 10px; }
.pause-icon span {
  width: 12px;
  height: 44px;
  border-radius: 4px;
  background: var(--red);
  box-shadow: 0 0 18px rgba(215, 3, 4, 0.6);
}
.pause-card h2 { margin: 0; font-size: 44px; font-weight: 900; letter-spacing: 0.12em; text-transform: uppercase; }
.pause-card p { margin: 0; color: var(--muted); font-size: 14px; letter-spacing: 0.04em; }

/* Hold-to-end progress ring — fills over the same 800 ms as the abandon timer */
.hold-indicator {
  position: absolute;
  left: 50%;
  bottom: 36px;
  transform: translateX(-50%);
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 0;
  transition: opacity 0.15s ease;
  pointer-events: none;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.hold-indicator.active { opacity: 1; }
.hold-bg { fill: none; stroke: rgba(255, 255, 255, 0.15); stroke-width: 4; }
.hold-fg {
  fill: none;
  stroke: var(--red);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-dasharray: 125.7;
  stroke-dashoffset: 125.7;
  transform: rotate(-90deg);
  transform-origin: center;
}
.hold-indicator.active .hold-fg { animation: holdFill 0.8s linear forwards; }
@keyframes holdFill { to { stroke-dashoffset: 0; } }

/* 3-2-1-GO start countdown */
.countdown-overlay {
  position: absolute;
  inset: 0;
  z-index: 7;
  display: grid;
  place-content: center;
  text-align: center;
  gap: 6px;
  background: radial-gradient(ellipse at center, rgba(215, 3, 4, 0.10), transparent 60%), rgba(10, 10, 11, 0.88);
}
.countdown-num {
  font-size: 220px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}
.countdown-num.zoom { animation: cdZoom 0.8s cubic-bezier(0.22, 1, 0.36, 1) both; }
@keyframes cdZoom {
  0% { transform: scale(1.55); opacity: 0; }
  25% { opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}
.countdown-label {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted);
  min-height: 20px;
}
.countdown-overlay.go .countdown-num { color: var(--red); text-shadow: 0 0 80px rgba(215, 3, 4, 0.9); }

/* Respect reduced-motion: everything settles instantly. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
