/* ============================================================
   奇数・偶数ハンター v2.0.0（シンプルUI版）
   固定ヘッダー＋全画面メインエリア＋右下縦型ツールバー
   全て .oeh-root 配下にスコープ
   ============================================================ */

.oeh-root, .oeh-root * {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
.oeh-root{
  --base: #FFFFFF;
  --base-light: #FAFAFA;
  --base-dark: #F5F5F5;

  --main: #1e3a5f;
  --main-light: #2d5a8f;
  --main-dark: #0f1e3a;

  --accent: #d4af37;
  --accent-light: #f4cf5f;
  --accent-dark: #b8941f;

  --text: #2C3E50;
  --text-light: #7F8C8D;
  --border: #E8E8E8;

  --warn: #f59e0b;
  --danger: #ef4444;

  --shadow: 0 4px 20px rgba(30, 58, 95, 0.1);
  --shadow-hover: 0 8px 30px rgba(30, 58, 95, 0.15);
}
.oeh-root{
  font-family: 'Hiragino Kaku Gothic ProN', 'Yu Gothic', 'Meiryo', sans-serif;
  color: var(--text);
  background: #7f8fa5; /* 修正: 参考画像から抽出した落ち着いたブルーグレーに変更 */
  min-height: 100vh;
  position: relative;
  overflow: hidden;
  /* 修正: テーマの本文カラム幅に閉じ込められて右側に大きな余白ができる問題対策。
     親要素の幅制約を無視してビューポート全幅まで広げる */
  width: 100vw;
  margin-left: calc(50% - 50vw);
}

/* ---------- 全体レイアウト ---------- */
.oeh-root .oeh-app{
  height: 100vh; display: flex; flex-direction: column;
}

/* ---------- 固定ヘッダー ---------- */
.oeh-root .oeh-header{
  flex-shrink: 0;
  display: flex; align-items: center; gap: 16px;
  padding: 12px 20px;
  background: var(--main);
  color: #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,.15);
  flex-wrap: wrap;
}
.oeh-root .oeh-title{
  margin: 0; font-size: 17px; font-weight: 900; letter-spacing: .02em;
  white-space: nowrap;
}
.oeh-root .oeh-instruction{
  flex: 1; text-align: center; font-size: 13px; font-weight: 600;
  opacity: .9; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  min-width: 80px;
}
.oeh-root .oeh-status{
  display: flex; gap: 8px; flex-shrink: 0; flex-wrap: wrap;
}
.oeh-root .oeh-stat{
  display: flex; flex-direction: column; align-items: center;
  background: rgba(255,255,255,.12);
  border-radius: 12px; padding: 4px 12px; min-width: 56px;
}
.oeh-root .oeh-stat-label{ font-size: 10px; font-weight: 700; opacity: .8; letter-spacing: .04em; }
.oeh-root .oeh-stat-value{ font-size: 16px; font-weight: 900; line-height: 1.3; }
.oeh-root .oeh-stat-value small{ font-size: 11px; font-weight: 700; opacity: .85; margin-left: 2px; }
.oeh-root .oeh-stat-warn{ background: rgba(245,158,11,.25); }
.oeh-root .oeh-stat-danger{ background: rgba(239,68,68,.25); }

/* ---------- 全画面メインエリア ---------- */
.oeh-root .oeh-main{
  flex: 1; min-height: 0;
  position: relative;
  padding: 20px;
  display: flex;
}

/* ===== 設定画面 ===== */
.oeh-root .target-selection{
  flex: 1;
  display: flex; align-items: center; justify-content: center;
}
.oeh-root .oeh-setup-card{
  background: #FFFFFF; /* 修正: 参考画像に合わせてカードは白に */
  padding: 28px;
  border-radius: 20px;
  border: 2px solid var(--border);
  box-shadow: var(--shadow);
  width: 100%;
  max-width: 640px;
  max-height: 100%;
  overflow: auto;
  position: relative; /* 修正: ハンバーガーメニューボタンをカード基準で配置するため */
}

.oeh-root .setting-group{ margin-bottom: 16px; }

.oeh-root .target-buttons{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  max-width: 500px;
  margin: 0 auto 12px;
}
.oeh-root .target-btn{
  padding: 16px 20px;
  font-size: 1.05rem;
  border: 2px solid var(--border);
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 900;
  background: var(--base);
  color: var(--text);
  display: flex; flex-direction: row; align-items: center; justify-content: center; gap: 8px;
  position: relative;
}
.oeh-root .target-btn:hover{
  border-color: var(--accent);
  background: #fffcf5;
}
.oeh-root .target-btn.selected{
  border-color: var(--main);
  background: var(--main);
  color: var(--accent);
}
.oeh-root .target-btn.selected::before{
  content: '✓'; position: absolute; top: 6px; right: 10px;
  font-size: 1.1rem; font-weight: bold;
}
.oeh-root .target-icon{ font-size: 1.3rem; }

.oeh-root .difficulty-buttons{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 10px;
  max-width: 600px;
  margin: 0 auto 12px;
}
.oeh-root .difficulty-btn{
  padding: 12px 16px;
  font-size: 1rem;
  border: 2px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-weight: 900;
  background: var(--base);
  color: var(--text);
  position: relative;
}
.oeh-root .difficulty-btn:hover{
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(30, 58, 95, 0.2);
  border-color: var(--accent);
}
.oeh-root .difficulty-btn.selected{
  background: linear-gradient(135deg, var(--accent-light) 0%, var(--accent) 100%);
  color: var(--main-dark);
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}
.oeh-root .difficulty-btn.selected::before{
  content: '✓'; position: absolute; top: 4px; right: 8px; font-size: 1.2rem;
}
.oeh-root .difficulty-info{
  font-size: 0.82rem;
  color: var(--text-light);
  text-align: center;
  padding: 8px;
}

/* 修正: v2新機能「だんだん難しくなるモード」を難易度ボタンと横並びの5個目のボタンにした。
   ベースの見た目は.difficulty-btnを共有し、ここではアイコン＋2行テキストのレイアウトのみ調整 */
.oeh-root .progressive-toggle-btn{
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; line-height: 1.3; font-size: 0.85rem;
}
.oeh-root .progressive-toggle-icon{ font-size: 1.15rem; }
.oeh-root .progressive-note{
  font-size: 0.78rem;
  color: var(--text-light);
  text-align: center;
  padding: 6px 8px 0;
}

.oeh-root .start-game-section{
  text-align: center;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.oeh-root .start-game-btn{
  padding: 16px 40px;
  font-size: 1.2rem;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-weight: 900;
  background: linear-gradient(135deg, var(--accent-light) 0%, var(--accent) 100%);
  color: var(--main-dark);
  margin-bottom: 8px;
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}
.oeh-root .start-game-btn:hover:not(:disabled){
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(212, 175, 55, 0.4);
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
}
.oeh-root .start-game-btn:disabled{
  background: #cfd8dc; cursor: not-allowed; transform: none;
  box-shadow: none; color: #90a4ae;
}

/* ===== ゲーム画面 ===== */
.oeh-root .game-section{
  display: none;
  flex: 1;
  min-width: 0;
  justify-content: center; /* 修正: 横幅を縮小した分、中央に寄せる */
}
.oeh-root .game-section.active{ display: flex; }

/* 修正: 両サイドのコレクション演出（.collection-side、物理演算ボール）を削除し、
   game-areaが画面幅いっぱいに使えるシンプルな1カラム構成にした */
.oeh-root .game-layout{
  display: flex;
  width: 65%; /* 修正: ゲーム画面をさらに狭く(90%→65%) */
  max-width: 620px;
  height: 100%;
}

.oeh-root .game-area{
  width: 100%; height: 100%;
  background: linear-gradient(180deg, var(--base) 0%, var(--base-light) 100%);
  position: relative;
  overflow: hidden;
  border-top: 3px solid var(--main-light);
  border-bottom: 3px solid var(--main-light);
  box-shadow: 0 4px 16px rgba(30, 58, 95, 0.15);
  touch-action: manipulation;
}
.oeh-root .game-area.paused .number{ animation-play-state: paused; }
.oeh-root .game-area.input-locked{ pointer-events: none; }

.oeh-root .number{
  position: absolute;
  width: 70px; height: 70px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem; font-weight: 900;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  animation: oeh-fall linear;
  background: var(--base);
  color: var(--main);
  box-shadow: 0 4px 16px rgba(30, 58, 95, 0.2);
  border: 4px solid var(--main-light);
}
.oeh-root .number:hover{
  transform: scale(1.15);
  box-shadow: 0 6px 24px rgba(30, 58, 95, 0.3);
  border-color: var(--accent);
}
.oeh-root .number:active{ transform: scale(0.95); }

/* 修正: 落下距離を固定px(530px)からコンテナ高さ基準(top:100%)に変更。
   全画面レイアウトでgame-areaの高さが可変になったため、
   どんな画面サイズでも枠の下端まで正しく落ちるようにする */
@keyframes oeh-fall{
  from{ top: -80px; }
  to{ top: 100%; }
}

.oeh-root .score-effect{
  position: absolute;
  font-size: 1.8rem;
  font-weight: bold;
  pointer-events: none;
  z-index: 1000;
  animation: oeh-scoreFloat 1s ease-out forwards;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}
@keyframes oeh-scoreFloat{
  0%{ transform: translateY(0); opacity: 1; }
  100%{ transform: translateY(-60px); opacity: 0; }
}

/* 修正: v2新機能「連続正解の実績バッジ」「だんだん難しくなるモードのレベルアップ通知」 */
.oeh-root .achievement-badge{
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--accent-light) 0%, var(--accent) 100%);
  color: var(--main-dark);
  font-weight: 900;
  font-size: 1.1rem;
  padding: 10px 24px;
  border-radius: 50px;
  box-shadow: 0 8px 20px rgba(0,0,0,.25);
  pointer-events: none;
  z-index: 500;
  animation: oeh-badge-pop 1.8s ease forwards;
  white-space: nowrap;
}
.oeh-root .level-up-badge{
  /* 修正: コンボバッジと同時に出ても重ならないよう少し下にずらす */
  top: 70px;
  background: linear-gradient(135deg, var(--main-light) 0%, var(--main) 100%);
  color: #fff;
}
@keyframes oeh-badge-pop{
  0%{ transform: translateX(-50%) translateY(-20px) scale(0.8); opacity: 0; }
  15%{ transform: translateX(-50%) translateY(0) scale(1.05); opacity: 1; }
  25%{ transform: translateX(-50%) translateY(0) scale(1); opacity: 1; }
  80%{ transform: translateX(-50%) translateY(0) scale(1); opacity: 1; }
  100%{ transform: translateX(-50%) translateY(-10px) scale(0.95); opacity: 0; }
}

/* ---------- 右下 縦型アイコンツールバー ---------- */
.oeh-root .oeh-toolbar{
  position: fixed; right: 20px; bottom: 20px;
  display: flex; flex-direction: column; gap: 14px;
  z-index: 50;
}
.oeh-root .oeh-toolbar button{
  width: 54px; height: 54px; border-radius: 50%;
  border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  background: #fff; color: var(--main);
  box-shadow: 0 4px 14px rgba(0,0,0,.2);
  transition: transform .15s, box-shadow .15s, background .15s, color .15s;
}
.oeh-root .oeh-toolbar button:hover:not(:disabled){ transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,0,0,.28); }
.oeh-root .oeh-toolbar button:active:not(:disabled){ transform: translateY(0); }
.oeh-root .oeh-toolbar button.oeh-primary{ background: var(--accent); color: var(--main-dark); }
.oeh-root .oeh-toolbar button:disabled{ opacity: .4; cursor: not-allowed; box-shadow: none; }

/* ---------- ゲームオーバー画面 ---------- */
.oeh-root .game-over{
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(15, 30, 58, 0.9);
  display: none; align-items: center; justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(8px);
}
.oeh-root .game-over-content{
  background: var(--base);
  padding: 22px 28px;
  border-radius: 24px;
  text-align: center;
  max-width: 480px; width: 90%;
  /* 修正: 縦スクロールが出ないよう、余白・文字サイズを詰めてビューポート内に収まるようにした。
     万一それでも収まらない極端に低い画面のための保険としてoverflow:autoは残す
     （中身が見切れて消えるより、最終手段としてスクロール可能な方が安全なため） */
  max-height: 94vh; overflow: auto;
  box-shadow: 0 20px 60px rgba(30, 58, 95, 0.3);
  border-top: 4px solid var(--accent);
  border-bottom: 4px solid var(--accent);
  position: relative;
}
.oeh-root .close-gameover-btn{
  position: absolute; top: 12px; right: 12px;
  width: 34px; height: 34px; border: 2px solid var(--border);
  background: var(--base-light); color: var(--text);
  font-size: 1.3rem; font-weight: 900; border-radius: 50%;
  cursor: pointer; transition: all 0.3s ease;
  display: flex; align-items: center; justify-content: center; line-height: 1;
}
.oeh-root .close-gameover-btn:hover{
  background: var(--main); color: var(--base);
  transform: rotate(90deg);
  box-shadow: 0 4px 12px rgba(30, 58, 95, 0.3);
}
.oeh-root .game-over-title{
  font-size: 1.3rem; margin-bottom: 10px; font-weight: 900; color: var(--main);
}
.oeh-root .score-display{
  font-size: 1.9rem; margin: 10px 0; font-weight: 900;
  color: var(--main);
  padding: 8px 14px; border-radius: 14px;
  background: linear-gradient(135deg, #fff 0%, var(--base-dark) 100%);
  box-shadow: 0 10px 25px rgba(30, 58, 95, 0.18);
  text-align: center;
}
.oeh-root .game-stats{
  background: var(--base-light);
  padding: 10px 16px; border-radius: 14px; margin: 10px 0;
  border: 2px solid var(--border);
}
.oeh-root .stat-row{
  display: flex; justify-content: space-between; margin: 5px 0;
  font-size: 0.88rem; color: var(--text);
}
.oeh-root .stat-label{ font-weight: 600; color: var(--text-light); }
.oeh-root .stat-value{ font-weight: 900; color: var(--main); }

.oeh-root .game-over-buttons{
  display: flex; flex-direction: column; gap: 8px; margin-top: 12px;
}
.oeh-root .game-over-buttons button{
  padding: 11px 30px; font-size: 1rem; border-radius: 50px;
  border: none; cursor: pointer; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.oeh-root .retry-btn{
  background: linear-gradient(135deg, var(--accent-light) 0%, var(--accent) 100%);
  color: var(--main-dark); font-weight: 900;
}
.oeh-root .retry-btn:hover{ background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%); }
.oeh-root .settings-btn{
  background: linear-gradient(135deg, var(--main-light) 0%, var(--main) 100%);
  color: #ffffff; font-weight: 900;
}
.oeh-root .settings-btn:hover{ background: linear-gradient(135deg, var(--main) 0%, var(--main-dark) 100%); }

/* ---------- v2新機能「得点記録」一覧モーダル ---------- */
.oeh-root .records-modal{
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(15, 30, 58, 0.9);
  display: none; align-items: center; justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(8px);
}
.oeh-root .records-modal.active{ display: flex; }
.oeh-root .records-modal-content{
  background: var(--base);
  padding: 40px;
  border-radius: 24px;
  text-align: center;
  max-width: 480px; width: 90%;
  max-height: 85vh;
  display: flex; flex-direction: column;
  box-shadow: 0 20px 60px rgba(30, 58, 95, 0.3);
  border-top: 4px solid var(--accent);
  border-bottom: 4px solid var(--accent);
  position: relative;
}
.oeh-root .close-records-btn{
  position: absolute; top: 16px; right: 16px;
  width: 40px; height: 40px; border: 2px solid var(--border);
  background: var(--base-light); color: var(--text);
  font-size: 1.5rem; font-weight: 900; border-radius: 50%;
  cursor: pointer; transition: all 0.3s ease;
  display: flex; align-items: center; justify-content: center; line-height: 1;
}
.oeh-root .close-records-btn:hover{
  background: var(--main); color: var(--base);
  transform: rotate(90deg);
  box-shadow: 0 4px 12px rgba(30, 58, 95, 0.3);
}
.oeh-root .records-title{
  font-size: 1.5rem; margin-bottom: 20px; font-weight: 900; color: var(--main);
  flex-shrink: 0;
}
.oeh-root .records-list-wrap{
  overflow-y: auto;
  flex: 1;
  min-height: 60px;
  background: var(--base-light);
  border-radius: 16px;
  border: 2px solid var(--border);
  padding: 8px;
}
.oeh-root .records-empty{
  padding: 30px 10px;
  color: var(--text-light);
  font-size: 0.95rem;
  font-weight: 600;
}
.oeh-root .records-row{
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  text-align: left;
}
.oeh-root .records-row + .records-row{ border-top: 1px solid var(--border); }
.oeh-root .records-rank{
  flex-shrink: 0;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--main); color: var(--accent);
  font-size: 0.8rem; font-weight: 900;
  display: flex; align-items: center; justify-content: center;
}
.oeh-root .records-row:nth-child(1) .records-rank{ background: var(--accent); color: var(--main-dark); }
.oeh-root .records-info{ flex: 1; min-width: 0; }
.oeh-root .records-score{ font-size: 1.15rem; font-weight: 900; color: var(--main); }
.oeh-root .records-mode{
  font-size: 0.75rem; color: var(--text-light); font-weight: 700;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.oeh-root .records-date{
  flex-shrink: 0;
  font-size: 0.72rem; color: var(--text-light); font-weight: 600;
  text-align: right;
}
.oeh-root .clear-records-btn{
  margin-top: 16px;
  padding: 12px 24px; font-size: 0.95rem; border-radius: 50px;
  border: 2px solid var(--danger); background: #fff; color: var(--danger);
  font-weight: 900; cursor: pointer; transition: all .2s ease;
  flex-shrink: 0;
}
.oeh-root .clear-records-btn:hover{ background: var(--danger); color: #fff; }

/* ---------- 修正: モーダル画面（ゲーム終了・スコア記録）専用のハンバーガーメニュー ----------
   ゲーム本体の画面には出さず、モーダルの左上にだけ配置し、押すと他の整数関連アプリへの
   リンク一覧ドロワーが右から開く。閉じるボタン（右上・丸背景）と対で並ぶよう、
   同じ丸背景スタイルを踏襲している */
.oeh-root .oeh-menu-btn{
  position: absolute; top: 12px; left: 12px;
  width: 34px; height: 34px; border: 2px solid var(--border);
  background: var(--base-light); color: var(--main);
  border-radius: 50%;
  cursor: pointer; transition: all 0.3s ease;
  display: flex; align-items: center; justify-content: center; line-height: 1;
}
.oeh-root .oeh-menu-btn:hover{
  background: var(--main);
  box-shadow: 0 4px 12px rgba(30, 58, 95, 0.3);
}
.oeh-root .oeh-menu-btn-icon{
  width: 18px; height: 18px; fill: var(--main);
}
.oeh-root .oeh-menu-btn:hover .oeh-menu-btn-icon{ fill: #fff; }

.oeh-root .oeh-menu-overlay{
  position: fixed; inset: 0; z-index: 1150;
  background: rgba(15, 30, 58, .45);
  opacity: 0; pointer-events: none;
  transition: opacity .2s ease;
}
.oeh-root .oeh-menu-overlay.is-open{ opacity: 1; pointer-events: auto; }
.oeh-root .oeh-menu-drawer{
  position: fixed; z-index: 1151; top: 0; right: 0;
  width: min(380px, 90%); height: 100%; height: 100dvh;
  display: flex; flex-direction: column;
  background: #fff; border-left: 1px solid var(--border);
  box-shadow: -12px 0 30px rgba(15, 30, 58, .25);
  transform: translateX(105%);
  transition: transform .25s ease;
}
.oeh-root .oeh-menu-drawer.is-open{ transform: translateX(0); }
.oeh-root .oeh-menu-header{
  display: flex; align-items: center; gap: 10px;
  min-height: 64px; padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  flex: 0 0 auto;
}
.oeh-root .oeh-menu-heading{
  flex: 1; margin: 0; color: var(--main);
  font-size: 18px; font-weight: 900;
}
.oeh-root .oeh-menu-close,
.oeh-root .oeh-menu-back{
  width: 40px; height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: 50%;
  background: var(--base-light); color: var(--main);
  font: inherit; font-size: 20px; cursor: pointer;
}
.oeh-root .oeh-menu-content{ flex: 1; overflow-y: auto; padding: 14px; }
.oeh-root .oeh-menu-topic-list,
.oeh-root .oeh-menu-app-list{ display: grid; gap: 10px; }
.oeh-root .oeh-menu-topic{
  width: 100%; display: flex; align-items: center; gap: 12px;
  min-height: 58px; padding: 13px 15px;
  border: 1px solid var(--border); border-radius: 16px;
  background: #fff; color: var(--text);
  font: inherit; font-size: 16px; font-weight: 700; text-align: left; cursor: pointer;
}
.oeh-root .oeh-menu-topic:hover{ background: var(--base-light); }
.oeh-root .oeh-menu-topic-name{ flex: 1; }
.oeh-root .oeh-menu-topic-count{ color: var(--text-light); font-size: 13px; font-weight: 700; }
.oeh-root .oeh-menu-topic-arrow{ color: var(--text-light); }
.oeh-root .oeh-menu-app{
  position: relative; display: block;
  padding: 14px 15px; border: 1px solid var(--border); border-radius: 14px;
  background: #fff; color: var(--text);
  text-decoration: none !important;
  font-size: 15px; font-weight: 700; line-height: 1.5;
}
.oeh-root .oeh-menu-app:hover{ background: var(--base-light); }
.oeh-root .oeh-menu-app.is-current{
  padding-right: 66px;
  background: var(--base-dark); border-color: var(--main-light); color: var(--main);
  cursor: default;
}
.oeh-root .oeh-menu-current-badge{
  position: absolute; top: 50%; right: 10px; transform: translateY(-50%);
  padding: 3px 7px; border-radius: 999px;
  background: var(--main); color: #fff; font-size: 10px; font-weight: 700;
}
.oeh-root .oeh-menu-empty{ padding: 26px 12px; color: var(--text-light); text-align: center; font-size: 14px; }
@media (max-width: 700px){
  .oeh-root .oeh-menu-drawer{ width: min(340px, 94%); }
}

/* ---------- レスポンシブ対応 ---------- */
@media (max-width: 768px){
  .oeh-root .oeh-instruction{ display: none; }
  .oeh-root .oeh-title{ font-size: 15px; }
  .oeh-root .target-buttons{ grid-template-columns: 1fr; }
  .oeh-root .number{ width: 56px; height: 56px; font-size: 1.4rem; }
  /* 修正: 画面自体が狭い端末では65%幅だと逆に手狭になるため、ここだけ広めに戻す */
  .oeh-root .game-layout{ width: 90%; }
}

@media (max-width: 480px){
  .oeh-root .difficulty-buttons{ grid-template-columns: 1fr 1fr; }
  .oeh-root .oeh-stat{ min-width: 44px; padding: 4px 8px; }
}

/* 修正: 横向きスマホ等、縦の高さが低い画面でもゲーム終了画面が縦スクロールなしで収まるよう、
   さらに余白・文字サイズを詰める */
@media (max-height: 500px){
  .oeh-root .game-over-content{ padding: 14px 22px; }
  .oeh-root .game-over-title{ font-size: 1.1rem; margin-bottom: 6px; }
  .oeh-root .score-display{ font-size: 1.5rem; margin: 6px 0; padding: 6px 14px; }
  .oeh-root .game-stats{ padding: 6px 16px; margin: 6px 0; }
  .oeh-root .stat-row{ margin: 3px 0; font-size: 0.8rem; }
  .oeh-root .game-over-buttons{ margin-top: 8px; gap: 6px; }
  .oeh-root .game-over-buttons button{ padding: 8px 30px; font-size: 0.9rem; }
}
