  :root {
    --bg: #12101c;
    --fg: #f5f3ff;
    --muted: #9c97b8;
    --zip: #ff3d7f;
    --zap: #ffd23f;
    --zop: #3de0ff;
    --heat: 0;
    --sky: rgba(120, 80, 255, 0.25);
    --start-bg: rgba(18, 16, 28, 0.96);
    --over-bg: #000;
  }
  * { box-sizing: border-box; }
  html, body { margin: 0; height: 100%; }
  body {
    background:
      radial-gradient(ellipse at 50% 120%, rgba(255, 40, 60, calc(var(--heat) * 0.55)), transparent 65%),
      radial-gradient(ellipse at 50% -20%, var(--sky), transparent 60%),
      var(--bg);
    color: var(--fg);
    font-family: Inter, system-ui, -apple-system, sans-serif;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
    display: flex;
    flex-direction: column;
    height: 100dvh;
  }
  body.shake { animation: shake 0.12s linear infinite; }
  @keyframes shake {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(calc(var(--heat) * 3px), calc(var(--heat) * -2px)); }
    75% { transform: translate(calc(var(--heat) * -3px), calc(var(--heat) * 2px)); }
  }

  header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    font-weight: 700;
    letter-spacing: 0.04em;
    font-size: 14px;
    color: var(--muted);
    gap: 12px;
  }
  header .logo { font-family: Bungee, Impact, sans-serif; color: var(--fg); font-size: 18px; letter-spacing: 0.02em; }
  header .logo span:nth-child(1) { color: var(--zip); }
  header .logo span:nth-child(2) { color: var(--zap); }
  header .logo span:nth-child(3) { color: var(--zop); }
  header .stats { display: flex; gap: 16px; }
  header b { color: var(--fg); font-variant-numeric: tabular-nums; }

  main#field { position: relative; flex: 1; margin: 0 16px 16px; }

  .btn {
    position: absolute;
    border: none;
    border-radius: 50%;
    font-family: Bungee, Impact, sans-serif;
    color: #14121e;
    cursor: pointer;
    touch-action: manipulation;
    transition: left 0.22s cubic-bezier(.3,1.4,.5,1), top 0.22s cubic-bezier(.3,1.4,.5,1), width 0.3s, height 0.3s, transform 0.08s;
    box-shadow: 0 10px 0 rgba(0,0,0,0.35), 0 0 40px var(--glow);
    letter-spacing: 0.02em;
  }
  .btn:focus-visible { outline: 4px solid var(--fg); outline-offset: 6px; }
  .btn.pressed { transform: translateY(6px) scale(0.95); box-shadow: 0 4px 0 rgba(0,0,0,0.35), 0 0 80px var(--glow); }
  #zip { background: var(--zip); --glow: rgba(255, 61, 127, 0.45); }
  #zap { background: var(--zap); --glow: rgba(255, 210, 63, 0.45); }
  #zop { background: var(--zop); --glow: rgba(61, 224, 255, 0.45); }

  .btn.decoy { animation: popin 0.25s cubic-bezier(.3,1.6,.5,1); }
  @keyframes popin { from { transform: scale(0); } to { transform: scale(1); } }

  .ring {
    position: absolute;
    border-radius: 50%;
    border: 6px solid var(--c);
    pointer-events: none;
    animation: ring 0.5s ease-out forwards;
  }
  @keyframes ring { from { transform: scale(1); opacity: 0.9; } to { transform: scale(1.7); opacity: 0; } }

  #timer {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 10px;
    border-radius: 5px;
    background: rgba(255,255,255,0.08);
    overflow: hidden;
    opacity: 0;
    transition: opacity 0.3s;
  }
  #timer.on { opacity: 1; }
  #timerFill {
    height: 100%;
    width: 100%;
    transform-origin: left;
    background: linear-gradient(90deg, #ff2d3d, #ffd23f 60%, #46f08a);
    background-size: 100vw 100%;
  }

  #roundCorner {
    position: absolute;
    right: 0;
    bottom: 16px;
    pointer-events: none;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.04em;
    color: var(--muted);
  }
  #roundCorner b { color: var(--fg); font-variant-numeric: tabular-nums; }
  #roundCorner .sep { margin: 0 6px; opacity: 0.5; }

  .pop {
    position: absolute;
    transform: translate(-50%, -50%);
    pointer-events: none;
    font-family: Bungee, Impact, sans-serif;
    font-size: 20px;
    color: var(--fg);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
    animation: pop 0.7s ease-out forwards;
    white-space: nowrap;
  }
  .pop.fast { color: var(--zap); font-size: 24px; }
  .pop.round { color: #46f08a; font-size: 26px; }
  @keyframes pop { from { opacity: 1; translate: 0 0; } to { opacity: 0; translate: 0 -60px; } }
  .board li small { color: var(--muted); font-size: 11px; margin-left: 6px; }

  #overEmoji { font-size: clamp(64px, 18vw, 120px); line-height: 1; animation: wobble 1.2s ease-in-out infinite; }
  @keyframes wobble {
    0%, 100% { transform: rotate(-8deg) scale(1); }
    50% { transform: rotate(8deg) scale(1.08); }
  }
  #overQuip { font-family: Bungee, Impact, sans-serif; color: var(--zap) !important; font-size: clamp(20px, 5vw, 30px) !important; }

  .overlay {
    position: fixed;
    inset: 0;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 24px 16px;
    gap: 18px;
    z-index: 10;
  }
  .overlay.show { display: flex; }
  #start { background: var(--start-bg); }
  #over { background: var(--over-bg); }
  .overlay h1 {
    font-family: Bungee, Impact, sans-serif;
    font-size: clamp(40px, 12vw, 110px);
    line-height: 0.95;
    margin: 0;
  }
  #start h1 span:nth-of-type(1) { color: var(--zip); }
  #start h1 span:nth-of-type(2) { color: var(--zap); }
  #start h1 span:nth-of-type(3) { color: var(--zop); }
  #over h1 { color: #ff2d3d; animation: flicker 0.9s steps(2) 2; }
  @keyframes flicker { 50% { opacity: 0.2; } }
  .overlay p { margin: 0; color: var(--muted); font-size: 17px; max-width: 30em; line-height: 1.5; }
  .overlay p b { color: var(--fg); }
  .cta {
    font-family: Bungee, Impact, sans-serif;
    font-size: 22px;
    padding: 16px 36px;
    border: none;
    border-radius: 999px;
    background: var(--fg);
    color: #14121e;
    cursor: pointer;
    box-shadow: 0 6px 0 rgba(255,255,255,0.25);
    margin-top: 8px;
  }
  .cta:active { transform: translateY(4px); box-shadow: 0 2px 0 rgba(255,255,255,0.25); }
  .cta[disabled] { opacity: 0.35; }
  .sound-toggle { border: 1px solid var(--muted); border-radius: 12px; background: transparent; color: var(--fg); padding: 8px 12px; cursor: pointer; font: inherit; }
  .sound-toggle[hidden] { display: none; }

  /* ---------- Theme decorations (see THEMES in the script) ---------- */
  .tagline { font-family: Bungee, Impact, sans-serif; color: var(--zap) !important; font-size: clamp(16px, 4vw, 22px) !important; }
  .tagline[hidden] { display: none; }
  #ambient { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
  body:has(.overlay.show) #ambient { z-index: 11; }
  #ambient span { position: absolute; top: 0; opacity: 0.35; animation: ambient-float linear infinite; }
  #ambient .still { top: 72px; right: 24px; left: auto; font-size: clamp(64px, 14vw, 120px); opacity: 0.4; animation: none; }
  @keyframes ambient-float {
    from { transform: translate(0, 110vh) rotate(-10deg); }
    50% { transform: translate(5vw, 45vh) rotate(10deg); }
    to { transform: translate(-3vw, -20vh) rotate(-10deg); }
  }
  @media (max-width: 420px) { header .logo { display: none; } header { justify-content: flex-end; } header .stats { gap: 10px; align-items: center; } }

  .overlay { overflow-y: auto; justify-content: safe center; }
  .version { font-size: 11px; color: var(--muted); opacity: 0.7; letter-spacing: 0.04em; }

  /* ---------- Leaderboard ---------- */
  .board { width: 100%; max-width: 320px; font-size: 14px; }
  .board[hidden], .board-form[hidden] { display: none; }
  .board h2 { font-family: Bungee, Impact, sans-serif; font-size: 16px; margin: 0 0 6px; color: var(--zap); letter-spacing: 0.04em; }
  .board ol { list-style: none; margin: 0; padding: 0; }
  .board li { display: grid; grid-template-columns: 2em 1fr auto; gap: 8px; padding: 3px 8px; border-radius: 8px; color: var(--muted); text-align: left; }
  .board li b { color: var(--fg); font-variant-numeric: tabular-nums; }
  .board li .who { color: var(--fg); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .board li.me { background: rgba(255, 210, 63, 0.18); }
  .board .empty { color: var(--muted); margin: 0; }
  .board-form { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; max-width: 340px; }
  .board-form p { width: 100%; margin: 0; color: var(--fg); font-weight: 700; }
  .board-form input {
    font: inherit; font-size: 16px; padding: 10px 14px; border-radius: 999px; width: 11em;
    border: 1px solid var(--muted); background: rgba(255,255,255,0.06); color: var(--fg);
    user-select: text; -webkit-user-select: text;
  }
  .board-form button { font: inherit; font-weight: 700; padding: 10px 18px; border-radius: 999px; border: none; background: var(--zap); color: #14121e; cursor: pointer; }
  .board-form button[disabled] { opacity: 0.5; }
  .board-form .msg { width: 100%; font-size: 13px; color: var(--muted); min-height: 1em; }
  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
    body.shake { animation: none !important; }
    #ambient span { animation: none !important; }
  }

/* ---------- Cookie consent (added by build.py) ---------- */
#consent {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  margin: 0 auto;
  max-width: 640px;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  border-radius: 16px;
  background: #1f1b2e;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  color: var(--fg);
  font-size: 14px;
  line-height: 1.45;
}
#consent p { margin: 0; flex: 1; color: var(--fg); }
#consent a { color: var(--zop); }
.consent-actions { display: flex; gap: 8px; flex-shrink: 0; }
.consent-actions button {
  font: inherit;
  font-weight: 700;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid var(--fg);
  background: transparent;
  color: var(--fg);
  cursor: pointer;
  min-width: 96px;
}
.consent-actions button:last-child { background: var(--fg); color: #14121e; }
.consent-actions button:focus-visible { outline: 3px solid var(--zap); outline-offset: 2px; }
@media (max-width: 560px) {
  #consent { flex-direction: column; align-items: stretch; }
  .consent-actions button { flex: 1; }
}
.consent-settings {
  font: inherit;
  font-size: 12px;
  background: none;
  border: none;
  color: var(--muted);
  text-decoration: underline;
  cursor: pointer;
  padding: 4px;
}
