    :root{
      --c-green:#006633;
      --c-bg:#f5faff;
      --c-text:#223;
      --c-muted:#556;
      --c-border:rgba(0,0,0,.10);
      --c-shadow:0 8px 24px rgba(0,0,0,.08);

      --stage-max:980px;
      --stage-radius:16px;
      --hudH:20%;
      --midH:45%;
      --btnH:35%;
    }

    html, body{ height:100%; }
    body{
      background:var(--c-bg);
      color:var(--c-text);
      margin:0;
    }

    .page-wrap{
      max-width: var(--stage-max);
      margin: 0 auto;
      padding: 0px 12px 28px;
    }

    /* --- GAME UI --- */
    .gameShell{
      background:#fff;
      border:1px solid var(--c-border);
      border-radius: var(--stage-radius);
      box-shadow: var(--c-shadow);
      overflow:hidden;

      height: calc(70vh - 24px);
      min-height: 360px;
      max-height: 920px;

      position:relative;
      user-select:none;
      -webkit-user-select:none;
      touch-action: manipulation;
    }

    .stageBg{
      position:absolute; inset:0;
      background:
        radial-gradient(1200px 400px at 50% -100px, rgba(0,102,51,.14), transparent 65%),
        radial-gradient(900px 340px at 30% 20%, rgba(31,111,235,.10), transparent 60%),
        linear-gradient(180deg, #fbfdff, #f6fbff 45%, #ffffff);
      pointer-events:none;
    }

    .hud{
      padding: 5px;
      position:relative;
      z-index:2;
      border-bottom:1px solid rgba(0,0,0,.06);
      background: linear-gradient(90deg, rgba(0,102,51,.10), rgba(10,139,78,.06));
    }

    .hudTop{
      display:flex;
      align-items:flex-start;
      justify-content:space-between;
      gap:10px;
    }

    .hudTitle{ line-height:1.2; }
    .hudTitle .brand{
      display:inline-flex;
      align-items:center;
      gap:8px;
      font-weight:900;
      letter-spacing:.3px;
      color:#123;
      font-size:14px;
    }
    .hudTitle .brand .tag{
      display:inline-flex;
      align-items:center;
      justify-content:center;
      padding: 4px 9px;
      border-radius: 999px;
      background: rgba(0,102,51,.10);
      border:1px solid rgba(0,102,51,.20);
      color: var(--c-green);
      font-size:12px;
      font-weight:900;
      white-space:nowrap;
    }
    .hudTitle h1{
      margin:8px 0 0;
      font-size: 18px;
      font-weight: 900;
      letter-spacing: .6px;
      color:#0f1a13;
    }

    .hudStats{
      display:flex;
      gap:8px;
      justify-content:flex-end;
    }
    .statPill{
      display:inline-flex;
      align-items:center;
      justify-content:center;
      padding: 6px 6px;
      border-radius: 999px;
      border:1px solid rgba(0,0,0,.10);
      background:#fff;
      box-shadow: 0 6px 14px rgba(0,0,0,.06);
      font-weight:900;
      font-size:14px;
      color:#123;
      white-space:nowrap;
    }
    .statPill b{ margin-left:6px; color:var(--c-green); }
    .statPill.time b{ color:#d11; } /* TIMEは赤 */

    .hudHint{
      margin-top:10px;
      display:flex;
      align-items:center;
      justify-content:space-between;
      gap:10px;
      flex-wrap:wrap;
    }
    .hintText{
      font-size:12px;
      color:#345;
      font-weight:800;
      line-height:1.5;
    }
    .hintText span{
      display:inline-block;
      padding: 2px 8px;
      border-radius: 10px;
      background: rgba(255,204,0,.18);
      border:1px solid rgba(255,204,0,.28);
      font-weight:900;
    }

.hudBtns{
  display:flex;
  align-items:center;
  gap:8px; /* ボタン同士の間は“余白”だけ */
}
/* ✅ 緑の点の正体：文字なしの #btnStartMini を消す */
#btnStartMini{
  display:none !important;
}

#btnResetMini{
  background: linear-gradient(90deg, var(--c-green), #0a8b4e);
  border-color: rgba(0,0,0,.10);
}

.btnMini{
  border:1px solid rgba(0,0,0,.12);
  border-radius: 12px;
  padding: 8px 4px;
  font-weight:900;
  font-size:10px;
  color:#fff;
  box-shadow: 0 6px 14px rgba(0,0,0,.06);
  cursor:pointer;
  outline:none;
}

/* ✅ SOUND ON = 緑 */
.btnMini.soundOn{
  background: linear-gradient(90deg, var(--c-green), #0a8b4e);
  border-color: rgba(0,0,0,.10);
}

/* ✅ SOUND OFF = 灰色 */
.btnMini.soundOff{
  background:#9aa3ad;
  border-color: rgba(0,0,0,.12);
}

.btnMini:active{ transform: translateY(1px); }

/* もう primary を visibility:hidden にしない（消してOK） */
.btnMini.primary{
  background: linear-gradient(90deg, var(--c-green), #0a8b4e);
  color:#fff;
  border-color: rgba(0,0,0,.10);
  /* ✅ visibility:hidden は削除 */
}

    .midArea{
      height: var(--midH);
      position:relative;
      z-index:2;
      overflow:hidden;
      border-bottom:1px solid rgba(0,0,0,.06);
      background:
        radial-gradient(700px 220px at 50% 10%, rgba(0,102,51,.09), transparent 60%),
        linear-gradient(180deg, rgba(255,255,255,.45), rgba(255,255,255,0));
    }

    .laneGuide{
      position:absolute; inset:0;
      pointer-events:none;
      opacity:.55;
    }
    .laneGuide:before{
      content:"";
      position:absolute;
      left:50%;
      top:0;
      bottom:0;
      width:2px;
      transform:translateX(-50%);
      background: linear-gradient(180deg, rgba(31,111,235,.18), rgba(0,0,0,0));
    }
    .laneGuide:after{
      content:"";
      position:absolute;
      left:0; right:0;
      bottom:10px;
      height:2px;
      background: linear-gradient(90deg, rgba(0,0,0,0), rgba(0,0,0,.14), rgba(0,0,0,0));
    }

    .enemy{
      position:absolute;
      left:50%;
      top:0;
      transform: translate(-50%, 0);
      width: min(86%, 680px);
      padding: 10px 14px;
      border-radius: 14px;
      border:1px solid rgba(0,0,0,.12);
      background: #ffffff;
      box-shadow: 0 14px 26px rgba(0,0,0,.12);

      font-weight: 900;
      font-size: 26px;
      letter-spacing: .6px;
      text-align:center;
      color:#111;
      white-space:nowrap;
      overflow:hidden;
      text-overflow:ellipsis;
    }
    .enemy .sub{
      display:block;
      margin-top:2px;
      font-size: 12px;
      letter-spacing:.2px;
      color:#456;
      font-weight:800;
    }

    .btnArea{
      height: var(--btnH);
      position:relative;
      z-index:2;
      display:flex;
      align-items:center;
      justify-content:center;
      padding:5px;
      background:
        radial-gradient(1000px 260px at 50% 120%, rgba(255,204,0,.14), transparent 60%),
        linear-gradient(180deg, rgba(255,255,255,.6), #fff);
    }

    .choicePanel{
      width: 100%;
      display:flex;
      flex-direction:column;
      align-items:center;
      justify-content:flex-start;
      gap: 7px;
      padding: 8px 0;
    }

    .choiceBtn{
      width: 90%;
      max-width: 360px;
      min-width: 180px;
      height: 36px;
      border-radius: 16px;
      border: 1px solid rgba(0,0,0,.14);
      box-shadow: 0 10px 22px rgba(0,0,0,.10);
      background:#fff;
      font-weight: 900;
      font-size: 20px;
      color:#123;
      cursor:pointer;
      outline:none;
      position:relative;
      overflow:hidden;
    }
    .choiceBtn:active{ transform: translateY(1px); }
    .choiceBtn.good{
      background: linear-gradient(90deg, #28a745, #16b35a);
      color:#fff;
      border-color: rgba(0,0,0,.10);
    }
    .choiceBtn.bad{
      background: linear-gradient(90deg, #f1f5f9, #ffffff);
    }
    .choiceBtn[disabled]{
      opacity:.60;
      cursor:not-allowed;
      transform:none;
    }

    .btnNote{
      margin-top:4px;
      font-size: 12px;
      color:#567;
      font-weight:800;
      text-align:center;
    }
    .btnNote kbd{
      padding: 2px 6px;
      border-radius: 8px;
      border:1px solid rgba(0,0,0,.14);
      background:#fff;
      font-weight:900;
      box-shadow: 0 6px 12px rgba(0,0,0,.06);
    }

    /* Beam */
    .beam{
      position:absolute;
      width: 10px;
      height: 0px;
      border-radius: 999px;
      transform: translateX(-50%);
      opacity: 1;
      pointer-events:none;
      z-index: 6;
      filter: drop-shadow(0 10px 10px rgba(0,0,0,.15));
    }
    .beam.good{
      background: linear-gradient(180deg, rgba(255,255,255,.95), rgba(120,255,170,.92), rgba(0,102,51,.92));
      box-shadow: 0 0 18px rgba(120,255,170,.75), 0 0 34px rgba(0,102,51,.35);
    }
    .beam.bad{
      background: linear-gradient(180deg, rgba(255,255,255,.75), rgba(190,190,190,.75), rgba(120,120,120,.82));
      box-shadow: 0 0 14px rgba(160,160,160,.50), 0 0 24px rgba(0,0,0,.18);
    }

    /* FX（Enemy位置に出す） */
    .fx{
      position:absolute;
      pointer-events:none;
      z-index: 8;
      display:flex;
      align-items:center;
      justify-content:center;
      width: 220px;
      height: 220px;
      transform: translate(-50%, -50%);
    }

/* =========================
   FX: 正解 = 気持ちいい「〇」
   ========================= */

/* 正解（1のとき） */
.fxBoom{
  width: 150px;
  height: 150px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 35% 30%, rgba(255,255,255,.95), rgba(255,255,255,0) 42%),
    radial-gradient(circle at 50% 55%, rgba(120,255,170,.95), rgba(40,167,69,.78) 48%, rgba(0,102,51,.28) 74%, rgba(0,0,0,0) 76%);
  box-shadow:
    0 0 22px rgba(120,255,170,.72),
    0 0 40px rgba(40,167,69,.40),
    0 18px 28px rgba(0,0,0,.18);
  animation: boomGood .46s cubic-bezier(.12,.8,.18,1) forwards;
  position:relative;
}

/* 中央：〇（気持ちいい） */
.fxBoom:before{
  content:"〇";
  position:absolute;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size: 74px;
  font-weight: 900;
  color: #ffffff;
  text-shadow:
    0 6px 16px rgba(0,0,0,.18),
    0 0 18px rgba(120,255,170,.55);
  animation: popGoodText 1s cubic-bezier(.12,.8,.18,1) forwards;
}

/* キラッ（爽快感） 
.fxBoom:after{
  content:"✦";
  position:absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%,-50%);
  font-size: 18px;
  color: rgba(255,255,255,.95);
  text-shadow: 0 0 14px rgba(255,255,255,.8);
  opacity:0;
  animation: sparkle .46s ease-out forwards;
}

*/

@keyframes boomGood{
  0%   { transform: scale(.22); opacity:0; filter: blur(2px); }
  55%  { transform: scale(1.08); opacity:1; filter: blur(0); }
  78%  { transform: scale(.98); opacity:1; }
  100% { transform: scale(1.18); opacity:0; filter: blur(1px); }
}
@keyframes popGoodText{
  0%   { transform: scale(.45); opacity:0; }
  55%  { transform: scale(1.10); opacity:1; }
  78%  { transform: scale(1.00); opacity:1; }
  100% { transform: scale(1.18); opacity:0; }
}
@keyframes sparkle{
  0%   { opacity:0; transform: translate(-50%,-50%) scale(.6) rotate(0deg); }
  40%  { opacity:1; transform: translate(-50%,-80%) scale(1.1) rotate(12deg); }
  100% { opacity:0; transform: translate(-50%,-110%) scale(.9) rotate(24deg); }
}


/* =========================
   FX: 不正解 = 丸い背景 + 「×」
   ========================= */

.fxIcon{
  width: 150px;
  height: 150px;
  border-radius: 999px;
  border:1px solid rgba(0,0,0,.10);

  /* 〇に近い“気持ちいい丸背景”だけど、色はミス寄り（重くしない） */
  background:
    radial-gradient(circle at 35% 30%, rgba(255,255,255,.95), rgba(255,255,255,0) 42%),
    radial-gradient(circle at 50% 55%, rgba(255,210,120,.95), rgba(255,140,0,.92) 48%, rgba(255,0,122,.18) 74%, rgba(0,0,0,0) 76%);

  box-shadow:
    0 0 18px rgba(255,170,0,.35),
    0 0 34px rgba(255,0,122,.18),
    0 18px 28px rgba(0,0,0,.16);

  display:flex;
  align-items:center;
  justify-content:center;
  flex-direction:column;
  gap: 6px;

  animation: tryAgainPop 1.5s cubic-bezier(.18,.9,.2,1) forwards;
  position:relative;
  padding: 10px 12px;
}

/* 中央：×（ストップ感を減らすため“白× + 光”） */
.fxIcon .big{
  font-size: 76px;
  line-height: 1;
  font-weight: 900;
  color: #ffffff;
  text-shadow:
    0 6px 16px rgba(0,0,0,.16),
    0 0 18px rgba(255,255,255,.35);
  transform: translateY(-2px);
}

/* 下：②③④ は小さなピルで（どれ押したかは分かる） */
.fxIcon .small{
  font-size: clamp(12px, 2.6vw, 16px);
  line-height: 1.15;
  max-width: 132px;
  text-align: center;
  white-space: normal;
  word-break: break-word;
  color:#fff;

  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* “ぷるん→次いこ” の動きは維持 */
@keyframes tryAgainPop{
  0%   { transform: scale(.78); opacity:0; filter: blur(1px); }
  45%  { transform: scale(1.06); opacity:1; filter: blur(0); }
  65%  { transform: scale(.98); opacity:1; }
  82%  { transform: scale(1.02) rotate(-2deg); opacity:1; }
  100% { transform: scale(1.14) rotate(2deg); opacity:0; filter: blur(.8px); }
}

    /* Overlay */
    .overlay{
      position:absolute; inset:0;
      z-index: 20;
      display:flex;
      align-items:center;
      justify-content:center;
      padding: 14px;
      background: rgba(10,20,18,.42);
      backdrop-filter: blur(2px);
    }
    .overlayCard{
      width: min(520px, 96%);
      background:#fff;
      border-radius: 18px;
      border:1px solid rgba(0,0,0,.12);
      box-shadow: 0 24px 54px rgba(0,0,0,.25);
      padding: 16px 16px 14px;
      text-align:center;
    }
    .overlayCard h2{
      margin: 0 0 8px;
      font-size: 20px;
      font-weight: 900;
      color:#0f1a13;
    }
    .overlayCard p{
      margin: 0 0 12px;
      font-size: 13px;
      color:#345;
      font-weight:800;
      line-height: 1.7;
    }
    .overlayBtn{
      width: min(360px, 92%);
      height:100px;
      border-radius: 16px;
      border:1px solid rgba(0,0,0,.10);
      background: linear-gradient(90deg, var(--c-green), #0a8b4e);
      color:#fff;
      font-weight:900;
      font-size: 32px;
      padding: 12px 14px;
      box-shadow: 0 14px 24px rgba(0,0,0,.18);
      cursor:pointer;
      outline:none;
    }
    .overlayBtn:active{ transform: translateY(1px); }

/* =========================
   High Score UI (Proud ver.)
   ========================= */
@keyframes bestPulse{
  0%   { transform: translateY(0) scale(1); filter: brightness(1); }
  55%  { transform: translateY(-1px) scale(1.03); filter: brightness(1.10); }
  100% { transform: translateY(0) scale(1); filter: brightness(1); }
}
@keyframes bestShine{
  0%   { transform: translateX(-120%) skewX(-18deg); opacity: 0; }
  20%  { opacity: .85; }
  45%  { opacity: 0; }
  100% { transform: translateX(120%) skewX(-18deg); opacity: 0; }
}
@keyframes bestSparkle{
  0%,100% { transform: scale(.9) rotate(-8deg); opacity: .55; }
  50%     { transform: scale(1.15) rotate(10deg); opacity: 1; }
}

.bestPill{
  margin: 12px auto 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 999px;

  /* もっと“メダル感” */
  border: 1px solid rgba(255, 210, 0, .55);
  background:
    radial-gradient(900px 220px at 50% -80px, rgba(255,255,255,.95), rgba(255,255,255,0) 55%),
    linear-gradient(90deg,
      rgba(255,215,0,.38),
      rgba(255,245,210,.55) 28%,
      rgba(0,102,51,.10) 68%,
      rgba(255,204,0,.22)
    );

  box-shadow:
    0 18px 38px rgba(0,0,0,.16),
    0 0 0 4px rgba(255,204,0,.12),
    0 0 28px rgba(255,204,0,.18);

  font-weight: 900;
  font-size: 13px;
  color:#102016;
  letter-spacing: .25px;
  position: relative;
  overflow: hidden;

  animation: bestPulse 1.55s ease-in-out infinite;
}

/* 王冠 + キラ */
.bestPill::before{
  content:"👑";
  font-size: 16px;
  line-height: 1;
  filter: drop-shadow(0 10px 16px rgba(0,0,0,.18));
}

/* 斜めの“光が走る”演出 */
.bestPill::after{
  content:"";
  position:absolute;
  top:-30%;
  left:-40%;
  width: 40%;
  height: 160%;
  background: linear-gradient(90deg,
    rgba(255,255,255,0),
    rgba(255,255,255,.75),
    rgba(255,255,255,0)
  );
  opacity: 0;
  animation: bestShine 2.6s ease-in-out infinite;
  pointer-events:none;
}

/* 数字を“誇りの芯”に */
.bestPill b{
  color: #0a6b3a;
  font-size: 18px;
  text-shadow:
    0 12px 22px rgba(0,0,0,.14),
    0 0 18px rgba(255,204,0,.28);
}

/* 「最高記録」ラベルを少し強めにしたい場合（任意） */
.bestPill{
  text-shadow: 0 8px 18px rgba(0,0,0,.08);
}

/* ✅ SOUND button color */
#btnSoundMini.soundOn{
  background: linear-gradient(90deg, var(--c-green), #0a8b4e);
  color:#fff;
  border-color: rgba(0,0,0,.10);
}

#btnSoundMini.soundOff{
  background: #8a8f98;          /* 灰色 */
  color:#fff;
  border-color: rgba(0,0,0,.18);
  box-shadow: 0 6px 14px rgba(0,0,0,.06);
}

/* モバイルで少しだけ控えめに（読みやすさ優先） */
@media (max-width: 520px){
  .bestPill{ padding: 10px 13px; gap: 9px; }
  .bestPill::before{ font-size: 15px; }
  .bestPill b{ font-size: 17px; }
}

    .resultBig{
      font-size: 34px;
      font-weight: 900;
      color:#0f1a13;
      letter-spacing:.5px;
      margin: 8px 0 6px;
    }
    .resultBig .n{
      color: var(--c-green);
      font-size: 46px;
      margin: 0 4px;
      text-shadow: 0 10px 18px rgba(0,0,0,.10);
    }

    @media (max-width: 520px){
      .hudTitle h1{ font-size: 20px; }
      .enemy{ font-size: 24px; }
      .choiceBtn{ height:50px; }
      .resultBig{ font-size: 30px; }
      .resultBig .n{ font-size: 42px; }
    }