:root { color-scheme: dark; }

    * { box-sizing: border-box; }

    html,
    body {
      width: 100%;
      height: 100%;
      margin: 0;
      overflow: hidden;
      background: #08090c;
      overscroll-behavior: none;
      user-select: none;
      -webkit-user-select: none;
      -webkit-touch-callout: none;
      touch-action: none;
      font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
    }

    #game {
      position: fixed;
      inset: 0;
      width: 100dvw;
      height: 100dvh;
      display: block;
      cursor: grab;
      touch-action: none;
      outline: none;
      background: #08090c;
      transform: translateZ(0);
      contain: strict;
    }

    #game.dragging { cursor: grabbing; }

    .game-shell {
      position: fixed;
      inset: 0;
      width: 100dvw;
      height: 100dvh;
      overflow: hidden;
      background: #08090c;
    }

    .hud-level {
      position: fixed;
      top: max(16px, env(safe-area-inset-top));
      right: max(16px, env(safe-area-inset-right));
      z-index: 5;
      pointer-events: none;
      padding: 0;
      border: 0;
      border-radius: 0;
      background: transparent;
      box-shadow: none;
      color: rgba(228, 255, 250, 0.96);
      font-size: clamp(0.72rem, 1.8vw, 0.95rem);
      font-weight: 800;
      letter-spacing: 0.18em;
      line-height: 1;
      text-transform: uppercase;
      text-shadow: 0 0 18px rgba(86, 210, 213, 0.52), 0 2px 12px rgba(0, 0, 0, 0.72);
      backdrop-filter: none;
      -webkit-backdrop-filter: none;
    }

    .sr-only {
      position: absolute;
      width: 1px;
      height: 1px;
      padding: 0;
      margin: -1px;
      overflow: hidden;
      clip: rect(0, 0, 0, 0);
      white-space: nowrap;
      border: 0;
    }

    noscript {
      position: fixed;
      inset: auto 1rem 1rem 1rem;
      z-index: 10;
      padding: 1rem;
      border: 1px solid rgba(255, 255, 255, 0.14);
      border-radius: 1rem;
      background: rgba(5, 6, 11, 0.86);
      color: #fff;
      text-align: center;
    }


    .update-toast {
      position: fixed;
      left: 50%;
      bottom: max(18px, calc(env(safe-area-inset-bottom) + 18px));
      z-index: 30;
      pointer-events: none;
      max-width: min(92vw, 32rem);
      padding: 0.92rem 1.18rem;
      border: 1px solid rgba(187, 255, 119, 0.30);
      border-radius: 999px;
      background: linear-gradient(135deg, rgba(9, 25, 19, 0.92), rgba(13, 14, 29, 0.92));
      box-shadow: 0 18px 60px rgba(0, 0, 0, 0.46), inset 0 1px 0 rgba(255, 255, 255, 0.10);
      color: rgba(238, 255, 224, 0.98);
      font-size: clamp(0.74rem, 2.4vw, 0.95rem);
      font-weight: 900;
      letter-spacing: 0.16em;
      line-height: 1.1;
      text-align: center;
      text-transform: uppercase;
      text-shadow: 0 0 18px rgba(187, 255, 119, 0.42);
      opacity: 0;
      transform: translate3d(-50%, 22px, 0) scale(0.98);
      transition: opacity 220ms ease, transform 220ms ease;
      backdrop-filter: blur(14px);
      -webkit-backdrop-filter: blur(14px);
    }

    .update-toast.is-visible {
      opacity: 1;
      transform: translate3d(-50%, 0, 0) scale(1);
    }
