    :root {
      --paper: #f3ead8;
      --sand: #dfc89e;
      --brick: #7c5b48;
      --ink: #261d18;
      --gold: #ffcc67;
      --sun: #ffd65c;
      --sky: #a8d7ff;
      --panel: rgba(255, 248, 236, 0.9);
      --accent: #b9552f;
      --accent-2: #2d7f6e;
    }

    * { box-sizing: border-box; }

    html, body {
      margin: 0;
      height: 100%;
      background: #cde8f5;
      color: var(--ink);
      font-family: system-ui, -apple-system, sans-serif;
      touch-action: none;
    }

    body {
      display: grid;
      place-items: center;
      padding: 14px;
      height: 100vh;
      height: 100dvh;
      overflow: hidden;
    }

    .shell {
      width: min(100%, 1040px);
      height: 100%;
      display: flex;
      flex-direction: column;
      background: var(--panel);
      border: 2px solid rgba(80, 55, 35, 0.15);
      border-radius: 28px;
      box-shadow: 0 22px 70px rgba(78, 53, 31, 0.16);
      overflow: hidden;
    }

    .hud {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 10px;
      padding: 14px 16px 10px;
      flex-wrap: wrap;
      background: rgba(255,255,255,0.5);
    }

    .title-group h1 {
      margin: 0;
      font-size: clamp(1.35rem, 2.4vw, 2rem);
      letter-spacing: 0.03em;
    }

    .title-group p {
      margin: 4px 0 0;
      font-size: 0.92rem;
      opacity: 0.82;
    }

    .stats {
      display: flex;
      gap: 10px;
      flex-wrap: wrap;
    }

    .card {
      min-width: 112px;
      padding: 10px 12px;
      border-radius: 16px;
      background: rgba(255,255,255,0.6);
      border: 1px solid rgba(90, 62, 43, 0.08);
      text-align: center;
    }

    .card .label {
      display: block;
      font-size: 0.7rem;
      text-transform: uppercase;
      letter-spacing: 0.08em;
      opacity: 0.6;
    }

    .card .value {
      display: block;
      font-size: 1.1rem;
      font-weight: 700;
      margin-top: 4px;
    }

    /* Minimal HUD while playing — hide title and show only stats + ? */
    .shell.playing .title-group { display: none; }
    .shell.playing .hud {
      padding: 8px 14px;
      background: none;
    }

    .help-btn {
      width: 40px;
      height: 40px;
      padding: 0;
      border-radius: 50%;
      font-size: 1.3rem;
      font-weight: 900;
      flex-shrink: 0;
      line-height: 1;
    }

    button {
      appearance: none;
      border: 0;
      border-radius: 999px;
      background: var(--accent);
      color: white;
      font: inherit;
      font-weight: 700;
      padding: 12px 18px;
      cursor: pointer;
      box-shadow: 0 10px 20px rgba(185, 85, 47, 0.22);
    }

    button.alt {
      background: var(--accent-2);
      box-shadow: 0 10px 20px rgba(45, 127, 110, 0.22);
    }

    button.ghost {
      background: rgba(80, 56, 35, 0.08);
      color: var(--ink);
      box-shadow: none;
    }

    .stage {
      position: relative;
      padding: 0 14px 14px;
      flex: 1;
      min-height: 0;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    canvas {
      display: block;
      max-width: 100%;
      max-height: 100%;
      width: auto;
      height: auto;
      aspect-ratio: 960 / 600;
      border-radius: 24px;
      background: #cfeafe;
      border: 1px solid rgba(73, 47, 26, 0.18);
      touch-action: none;
    }

    .overlay {
      position: absolute;
      inset: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 24px;
      background: rgba(37, 24, 16, 0.42);
      backdrop-filter: blur(3px);
      border-radius: 24px;
    }

    .overlay[hidden] { display: none; }

    .panel {
      width: min(100%, 500px);
      padding: 22px;
      border-radius: 24px;
      background: rgba(255, 247, 235, 0.97);
      box-shadow: 0 18px 40px rgba(24, 16, 11, 0.2);
      text-align: center;
    }

    .panel h2 {
      margin: 0 0 10px;
      font-size: clamp(1.4rem, 2.5vw, 2.1rem);
    }

    .panel p {
      margin: 0 0 12px;
      line-height: 1.45;
    }

    .panel .row {
      display: flex;
      gap: 10px;
      justify-content: center;
      flex-wrap: wrap;
      margin-top: 16px;
    }

    @media (max-width: 720px) {
      body { padding: 0; }
      .shell {
        width: 100%;
        border-radius: 0;
      }
      .hud { padding-top: calc(14px + env(safe-area-inset-top)); }
      .stage { padding-bottom: calc(14px + env(safe-area-inset-bottom)); }
    }
