  :root {
    --bg: #0f172a;
    --panel: #1e293b;
    --play: #111c33;
    --paddle: #38bdf8;
    --ball: #f8fafc;
    --text: #e2e8f0;
    --muted: #94a3b8;
  }
  * { margin: 0; padding: 0; box-sizing: border-box; }
  html, body {
    height: 100%;
    overflow: hidden;
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    /* Disable pull-to-refresh, scroll bounce, and double-tap zoom on iOS */
    touch-action: none;
    -webkit-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    overscroll-behavior: none;
  }
  body {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    height: 100vh;  /* fallback */
    height: 100dvh; /* iOS Safari dynamic viewport */
    padding: max(12px, env(safe-area-inset-top))
             max(12px, env(safe-area-inset-right))
             max(12px, env(safe-area-inset-bottom))
             max(12px, env(safe-area-inset-left));
  }
  #hud {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: min(90vmin, 460px);
    font-size: 18px;
    font-variant-numeric: tabular-nums;
  }
  #hud .label { color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; }
  #hud a { color: var(--muted); text-decoration: none; font-size: 14px; }
  #hud .value { font-weight: 700; font-size: 22px; }
  #mid { display: flex; flex-direction: column; align-items: center; gap: 2px; }
  #lives { color: var(--paddle); letter-spacing: 0.06em; }
  #board-wrap { position: relative; }
  canvas {
    display: block;
    background: var(--play);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
  }
  #overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-align: center;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.82);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    padding: 24px;
  }
  #overlay.hidden { display: none; }
  #overlay h1 { font-size: 34px; letter-spacing: 0.02em; }
  #overlay p { color: var(--muted); font-size: 16px; line-height: 1.5; }
  #overlay .big-score { font-size: 26px; font-weight: 700; color: var(--paddle); }
