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

    html,
    body {
      width: 100%;
      height: 100%;
      overflow: hidden;
      background: #0a0f16;
      touch-action: none;
      -webkit-tap-highlight-color: transparent;
      font-family: 'Courier New', Courier, monospace;
      user-select: none;
    }

    /* Full-screen canvas — no chrome around it */
    #c {
      position: fixed;
      inset: 0;
      width: 100%;
      height: 100%;
      display: block;
      cursor: crosshair;
      touch-action: none;
    }

    /* HUD — overlaid on top of canvas */
    #hud {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      display: flex;
      justify-content: space-around;
      align-items: center;
      padding: env(safe-area-inset-top, 12px) 16px 10px;
      padding-top: max(env(safe-area-inset-top, 0px), 12px);
      pointer-events: none;
      z-index: 10;
    }

    .stat {
      text-align: center;
      line-height: 1.1;
    }

    .stat-label {
      color: #3a5060;
      font-size: clamp(8px, 2vw, 11px);
      letter-spacing: 3px;
      text-transform: uppercase;
    }

    .stat-val {
      color: #60e8a0;
      font-size: clamp(18px, 5vw, 26px);
      font-weight: bold;
      letter-spacing: 1px;
    }

    /* Full-screen message overlay */
    #msg {
      position: fixed;
      inset: 0;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      text-align: center;
      pointer-events: none;
      transition: opacity 0.35s;
      z-index: 20;
      padding: 20px;
    }

    #msg.off {
      opacity: 0;
    }

    #msg h1 {
      font-size: clamp(28px, 10vw, 54px);
      color: #60e8a0;
      letter-spacing: clamp(4px, 2vw, 10px);
      text-transform: uppercase;
      text-shadow: 0 0 30px rgba(96, 232, 160, .55);
      line-height: 1;
    }

    #msg .sub {
      color: #3a5060;
      font-size: clamp(10px, 3vw, 13px);
      letter-spacing: 2px;
      margin-top: clamp(8px, 2vh, 14px);
      line-height: 1.6;
    }

    #msg .pts {
      color: #e0e060;
      font-size: clamp(13px, 4vw, 18px);
      letter-spacing: 3px;
      margin-top: clamp(10px, 2.5vh, 18px);
      text-shadow: 0 0 16px rgba(224, 224, 96, .5);
    }

    #msg .restart-btn {
      margin-top: clamp(18px, 4vh, 28px);
      padding: 14px 36px;
      background: rgba(96, 232, 160, .12);
      border: 1px solid rgba(96, 232, 160, .3);
      color: #60e8a0;
      font-family: inherit;
      font-size: clamp(12px, 3.5vw, 15px);
      letter-spacing: 4px;
      text-transform: uppercase;
      cursor: pointer;
      pointer-events: all;
      border-radius: 2px;
      -webkit-tap-highlight-color: transparent;
    }

    #msg .restart-btn:active {
      background: rgba(96, 232, 160, .25);
    }

    /* Floating pop text */
    #pop {
      position: fixed;
      top: clamp(60px, 14vh, 90px);
      left: 50%;
      transform: translateX(-50%);
      color: #e0e060;
      font-size: clamp(12px, 4vw, 16px);
      letter-spacing: 3px;
      text-align: center;
      white-space: nowrap;
      pointer-events: none;
      opacity: 0;
      transition: opacity .25s;
      text-shadow: 0 0 14px rgba(224, 224, 96, .7);
      z-index: 15;
    }

    #pop.on {
      opacity: 1;
    }

    /* Tiny keyboard hint — desktop only */
    #hint {
      position: fixed;
      bottom: max(env(safe-area-inset-bottom, 0px), 8px);
      right: 12px;
      color: #1a2a35;
      font-size: 9px;
      letter-spacing: 2px;
      pointer-events: none;
      z-index: 5;
    }

    @media (hover:none) {
      #hint {
        display: none;
      }
    }

    /* ── Loader overlay ───────────────────────────────────────────────────────── */
    #loader {
      position: fixed;
      inset: 0;
      z-index: 100;
      background: #0a0f16;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: clamp(14px, 3vh, 24px);
      transition: opacity 0.6s ease;
    }

    #loader.fade {
      opacity: 0;
      pointer-events: none;
    }

    #loader h2 {
      color: #60e8a0;
      font-family: 'Courier New', monospace;
      font-size: clamp(22px, 7vw, 40px);
      letter-spacing: clamp(4px, 2vw, 10px);
      text-transform: uppercase;
      text-shadow: 0 0 28px rgba(96, 232, 160, .5);
      margin: 0;
    }

    #loader-track {
      width: clamp(180px, 55vw, 320px);
      height: clamp(8px, 2vh, 14px);
      background: rgba(255, 255, 255, .06);
      border-radius: 99px;
      overflow: hidden;
    }

    #loader-fill {
      height: 100%;
      width: 0%;
      background: linear-gradient(90deg, #2aaa6a, #60e8a0);
      border-radius: 99px;
      transition: width 0.25s ease;
    }

    #loader-label {
      color: #3a5060;
      font-family: 'Courier New', monospace;
      font-size: clamp(9px, 2.5vw, 12px);
      letter-spacing: 3px;
      text-transform: uppercase;
    }