    :root {
      --bg0: #090611;
      --bg1: #150a2b;
      --bg2: #1f103a;
      --gold: #ffd166;
      --cyan: #7ae7ff;
      --rose: #ff78c5;
      --text: #f7f2ff;
      --ui: rgba(255, 255, 255, 0.1);
    }

    * { box-sizing: border-box; }

    html, body {
      margin: 0;
      width: 100%;
      height: 100%;
      overflow: hidden;
      font-family: "Trebuchet MS", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
      color: var(--text);
      background: radial-gradient(1200px 900px at 20% 10%, #3f165f 0%, transparent 40%),
                  radial-gradient(1400px 1000px at 85% 90%, #2f4f86 0%, transparent 45%),
                  linear-gradient(130deg, var(--bg0), var(--bg1), var(--bg2));
      touch-action: none;
    }

    #game {
      position: fixed;
      inset: 0;
      width: 100%;
      height: 100%;
      display: block;
      touch-action: none;
    }

    .hud {
      position: fixed;
      top: 14px;
      left: 14px;
      right: 14px;
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      pointer-events: none;
      gap: 10px;
      top: max(14px, env(safe-area-inset-top));
      left: max(14px, env(safe-area-inset-left));
      right: max(14px, env(safe-area-inset-right));
    }

    .panel {
      background: linear-gradient(140deg, rgba(255,255,255,0.16), rgba(255,255,255,0.07));
      border: 1px solid rgba(255,255,255,0.25);
      border-radius: 14px;
      backdrop-filter: blur(4px);
      padding: 10px 14px;
      min-width: 170px;
      box-shadow: 0 8px 24px rgba(0,0,0,0.35), inset 0 0 20px rgba(255,255,255,0.08);
    }

    .title {
      font-weight: 800;
      font-size: clamp(18px, 2.8vw, 28px);
      letter-spacing: 1px;
      text-shadow: 0 0 16px rgba(255, 184, 245, 0.5);
      margin-bottom: 6px;
    }

    .stat {
      font-size: clamp(14px, 2.2vw, 18px);
      line-height: 1.45;
      text-shadow: 0 0 12px rgba(127, 231, 255, 0.35);
      white-space: nowrap;
    }

    .help {
      position: fixed;
      left: 50%;
      bottom: 14px;
      transform: translateX(-50%);
      font-size: clamp(12px, 1.9vw, 14px);
      background: var(--ui);
      border: 1px solid rgba(255,255,255,0.22);
      border-radius: 999px;
      padding: 7px 12px;
      text-align: center;
      backdrop-filter: blur(3px);
      bottom: max(14px, env(safe-area-inset-bottom));
      max-width: min(92vw, 680px);
    }

    .mobile-controls {
      position: fixed;
      right: max(12px, env(safe-area-inset-right));
      bottom: max(56px, calc(env(safe-area-inset-bottom) + 56px));
      display: none;
      gap: 10px;
      pointer-events: auto;
      z-index: 20;
    }

    .mobile-controls button {
      min-width: 78px;
      padding: 12px 14px;
      font-size: 14px;
      border-radius: 12px;
      color: #ecf9ff;
      background: linear-gradient(140deg, #2f3f73, #1f7f93);
      touch-action: manipulation;
      user-select: none;
      -webkit-user-select: none;
    }

    .center {
      position: fixed;
      inset: 0;
      display: grid;
      place-items: center;
      pointer-events: none;
      text-align: center;
      padding: 20px;
    }

    .card {
      pointer-events: auto;
      max-width: 580px;
      width: min(92vw, 580px);
      background: linear-gradient(165deg, rgba(255,255,255,0.18), rgba(255,255,255,0.06));
      border: 1px solid rgba(255,255,255,0.3);
      border-radius: 22px;
      box-shadow: 0 16px 48px rgba(0,0,0,0.45), inset 0 0 28px rgba(255,255,255,0.08);
      padding: 24px 20px;
      backdrop-filter: blur(6px);
    }

    .card h1 {
      margin: 0 0 8px 0;
      font-size: clamp(28px, 5vw, 46px);
      line-height: 1.1;
      color: #fff6d2;
      text-shadow: 0 0 26px rgba(255, 209, 102, 0.6);
    }

    .card p {
      margin: 8px 0;
      font-size: clamp(14px, 2.2vw, 18px);
      line-height: 1.5;
      opacity: 0.95;
    }

    .btns {
      display: flex;
      flex-wrap: wrap;
      justify-content: center;
      gap: 10px;
      margin-top: 14px;
    }

    button {
      border: none;
      border-radius: 999px;
      padding: 11px 18px;
      font-size: 15px;
      font-weight: 700;
      cursor: pointer;
      color: #170c28;
      background: linear-gradient(140deg, #ffd166, #fff1a8);
      box-shadow: 0 10px 20px rgba(0,0,0,0.3), inset 0 -2px 8px rgba(0,0,0,0.2);
      touch-action: manipulation;
    }

    button.alt {
      color: #ecf9ff;
      background: linear-gradient(140deg, #3a2c68, #23526d);
    }

    .hidden { display: none; }

    @media (max-width: 820px) {
      .hud {
        top: max(10px, env(safe-area-inset-top));
        left: max(10px, env(safe-area-inset-left));
        right: max(10px, env(safe-area-inset-right));
        gap: 8px;
      }

      .panel {
        min-width: 0;
        padding: 8px 10px;
      }

      .title {
        font-size: clamp(16px, 4vw, 22px);
      }

      .stat {
        font-size: clamp(12px, 2.7vw, 15px);
      }

      .help {
        left: max(10px, env(safe-area-inset-left));
        right: max(10px, env(safe-area-inset-right));
        transform: none;
        font-size: 11px;
        line-height: 1.35;
        padding: 7px 10px;
      }
    }

    @media (hover: none) and (pointer: coarse) {
      .mobile-controls {
        display: flex;
      }
    }
