* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Maru Gothic ProN", "Hiragino Kaku Gothic ProN", "Meiryo", sans-serif;
  background: linear-gradient(155deg, #e0f2fe 0%, #f0f9ff 45%, #fef9c3 100%);
  color: #0f172a;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 100vh;
  padding: 8px;
}

.app-container {
  width: 100%;
  max-width: 460px;
  background: rgba(255, 255, 255, 0.94);
  border: 2px solid #bae6fd;
  border-radius: 16px;
  box-shadow: 0 10px 28px rgba(14, 116, 144, 0.12);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.game-header {
  text-align: center;
  position: relative;
}

.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.game-title {
  font-size: 1.28rem;
  font-weight: 900;
  letter-spacing: 0.03em;
  color: #0c4a6e;
  display: flex;
  align-items: center;
  gap: 6px;
}

.title-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f97316 0%, #ef4444 100%);
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 900;
  box-shadow: 0 2px 4px rgba(239, 68, 68, 0.3);
}

.version-badge {
  font-size: 0.7rem;
  padding: 2px 7px;
  border-radius: 999px;
  font-weight: 900;
}

.badge-v5 {
  background: linear-gradient(135deg, #fef08a 0%, #fde047 100%);
  color: #854d0e;
  border: 1px solid #facc15;
}

.header-right-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* 効果音オン・オフ切替ボタン（iPhoneで指で確実に押せるよう最低 44×44 CSSピクセルのタッチ領域を確保） */
.sound-toggle-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 78px;
  min-height: 44px;
  padding: 6px 12px;
  font-size: 0.8rem;
  font-weight: 900;
  color: #475569;
  background: #ffffff;
  border: 2px solid #94a3b8;
  border-radius: 999px;
  cursor: pointer;
  touch-action: manipulation;
  line-height: 1.1;
  position: relative;
  z-index: 30;
  box-shadow: 0 2px 0 #cbd5e1;
  transition: transform 0.06s ease;
}

.sound-toggle-btn:active {
  transform: translateY(1px);
}

.sound-toggle-btn.sound-on {
  color: #065f46;
  background: linear-gradient(180deg, #d1fae5 0%, #a7f3d0 100%);
  border-color: #059669;
  box-shadow: 0 2px 0 #047857;
}

.mobile-help-menu {
  display: none;
  position: relative;
}

.version-links {
  display: flex;
  gap: 4px;
}

.version-switch-link {
  font-size: 0.72rem;
  font-weight: 800;
  color: #0369a1;
  text-decoration: none;
  padding: 2px 7px;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 6px;
}

.version-switch-link:hover {
  background: #e0f2fe;
}

.instructions {
  background: #f8fafc;
  border: 1px solid #e0f2fe;
  border-radius: 8px;
  padding: 6px 10px;
  text-align: left;
  font-size: 0.72rem;
  line-height: 1.4;
  color: #334155;
}

.instructions strong {
  color: #dc2626;
}

/* 制限時間選択バー */
.mode-selector-bar {
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 10px;
  padding: 6px 8px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
}

.mode-buttons-group {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  width: 100%;
}

.mode-btn {
  appearance: none;
  background: #ffffff;
  border: 1.5px solid #93c5fd;
  border-radius: 8px;
  padding: 6px 4px;
  font-size: 0.86rem;
  font-weight: 800;
  color: #1e40af;
  cursor: pointer;
  touch-action: manipulation;
  box-shadow: 0 2px 0 #bfdbfe;
  transition: transform 0.08s ease;
}

.mode-btn.active-mode {
  background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%);
  border-color: #1e3a8a;
  color: #ffffff;
  box-shadow: 0 2px 0 #1e3a8a;
}

.mode-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
}

.mode-lock-note {
  width: 100%;
  font-size: 0.68rem;
  font-weight: 700;
  color: #0369a1;
  text-align: center;
}

/* 自己ベストランキングパネル */
.ranking-panel {
  background: linear-gradient(180deg, #fffbeb 0%, #fef3c7 100%);
  border: 1.5px solid #fcd34d;
  border-radius: 10px;
  padding: 6px 10px;
}

.ranking-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-bottom: 1px solid #fde68a;
  padding-bottom: 3px;
  margin-bottom: 4px;
}

.ranking-title {
  font-size: 0.85rem;
  font-weight: 900;
  color: #92400e;
}

.ranking-subtitle {
  font-size: 0.66rem;
  font-weight: 700;
  color: #b45309;
}

.ranking-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.ranking-col {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid #fde68a;
  border-radius: 6px;
  padding: 4px 8px;
}

.ranking-col-title {
  font-size: 0.74rem;
  font-weight: 800;
  color: #b45309;
  margin-bottom: 2px;
  text-align: center;
  border-bottom: 1px dashed #fcd34d;
  padding-bottom: 2px;
}

.ranking-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ranking-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.76rem;
  line-height: 1.3;
}

.rank-Pos {
  font-weight: 700;
  color: #92400e;
}

.rank-val {
  font-weight: 900;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
}

.storage-warning {
  margin-top: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  color: #b45309;
  background: #fffbeb;
  border: 1px solid #fcd34d;
  border-radius: 4px;
  padding: 3px 6px;
  text-align: center;
}

.storage-warning.hidden {
  display: none;
}

/* ステータスバー（残り時間・現在スコア・現在コンボ） */
.stats-bar {
  display: grid;
  grid-template-columns: 1fr 1fr 1.35fr;
  gap: 6px;
  align-items: stretch;
}

.stat-box {
  background: #ffffff;
  border: 1.5px solid #bae6fd;
  border-radius: 10px;
  padding: 5px 6px;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-shadow: 0 2px 5px rgba(2, 132, 199, 0.06);
}

.stat-box-time {
  background: linear-gradient(180deg, #ffffff 0%, #f0f9ff 100%);
}

.stat-box-score {
  background: linear-gradient(180deg, #ffffff 0%, #ecfdf5 100%);
  border-color: #a7f3d0;
}

.stat-label {
  font-size: 0.7rem;
  font-weight: 800;
  color: #475569;
}

.stat-value {
  font-size: 1.32rem;
  font-weight: 900;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
}

.stat-value small {
  font-size: 0.72rem;
  font-weight: 700;
  color: #475569;
}

.combo-highlight-box {
  background: linear-gradient(180deg, #fffbeb 0%, #fef3c7 100%);
  border: 2px solid #f59e0b;
  padding: 4px 6px;
}

.combo-label {
  color: #b45309;
  font-size: 0.74rem;
  font-weight: 800;
}

.combo-main-line {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 2px;
  line-height: 1.05;
  margin: 1px 0;
}

.combo-big-number {
  font-size: 1.95rem;
  font-weight: 900;
  color: #d97706;
  font-variant-numeric: tabular-nums;
}

.combo-unit {
  font-size: 0.76rem;
  font-weight: 800;
  color: #b45309;
}

.sub-stat {
  display: block;
  font-size: 0.66rem;
  font-weight: 700;
  color: #78350f;
  border-top: 1px dashed #fcd34d;
  padding-top: 1px;
  margin-top: 1px;
}

.sub-stat strong {
  color: #0f172a;
  font-weight: 900;
}

/* 合計パネル ＆ スタートボタン行 */
.sum-panel {
  background: linear-gradient(180deg, #f0f9ff 0%, #e0f2fe 100%);
  border: 2px solid #7dd3fc;
  border-radius: 12px;
  padding: 7px 10px;
  text-align: center;
}

.sum-grid {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  align-items: center;
  gap: 8px;
}

.sum-current-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  border-right: 2px solid #bae6fd;
  padding-right: 8px;
}

.sum-label {
  font-size: 0.75rem;
  font-weight: 800;
  color: #0369a1;
}

.sum-current-line {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.sum-number {
  font-size: 1.95rem;
  font-weight: 900;
  color: #0284c7;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
}

.sum-slash {
  font-size: 0.9rem;
  font-weight: 800;
  color: #38bdf8;
}

.sum-needed-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  border: 2px solid #fda4af;
  border-radius: 10px;
  padding: 3px 8px;
  box-shadow: 0 2px 4px rgba(225, 29, 72, 0.08);
}

.needed-caption {
  font-size: 0.7rem;
  font-weight: 800;
  color: #9f1239;
  line-height: 1.1;
}

.needed-big-red {
  font-size: 2.05rem;
  font-weight: 900;
  color: #dc2626;
  line-height: 1.1;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}

.mobile-dial-combo-block {
  display: none;
}

.start-action-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px dashed #93c5fd;
}

.btn-start {
  appearance: none;
  background: linear-gradient(180deg, #10b981 0%, #059669 100%);
  border: 2px solid #047857;
  color: #ffffff;
  border-radius: 10px;
  padding: 7px 16px;
  font-size: 0.9rem;
  font-weight: 900;
  cursor: pointer;
  touch-action: manipulation;
  flex: 0 0 auto;
  box-shadow: 0 3px 0 #065f46, 0 4px 10px rgba(5, 150, 105, 0.25);
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}

.btn-start:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #065f46;
}

.btn-start:disabled {
  background: #94a3b8;
  border-color: #64748b;
  box-shadow: none;
  cursor: default;
}

.status-message {
  font-size: 0.78rem;
  font-weight: 800;
  text-align: left;
  flex: 1 1 auto;
}

.status-ready,
.status-start,
.status-add {
  color: #0369a1;
}

.status-success {
  color: #15803d;
}

.status-burst {
  color: #dc2626;
}

.status-discard {
  color: #475569;
}

.status-timeup {
  color: #0f172a;
}

/* =========================================================
   円盤セクション（コンボ数に応じて円盤外周ベゼルと周囲装飾の青色が段階的に濃くなる）
   ・0〜4: #f0f9ff(ほぼ白) -> 5〜9: #bfdbfe(薄い青) -> 10〜14: #60a5fa(はっきりした青)
   ・15〜19: #3b82f6(鮮やかな青) -> 20〜24: #1e3a8a(濃紺) -> 25〜29: #172554(さらに深い濃紺)
   ・30〜39: #0f172a(黒に近い青) -> 40〜49: #080f1f(さらに黒に近い) -> 50〜59: #030712(ほぼ黒) -> 60以上: #000000(完全な黒)
   ・失敗して0コンボになると一気にほぼ白(#f0f9ff)へ戻る
   ========================================================= */
.dial-section {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 2px 0;
  padding: 6px;
  border-radius: 22px;
  transition: background 0.18s ease, box-shadow 0.18s ease;
}

/* 10コンボごとの達成文字演出バナー（円盤の真上・余白に絶対配置し、6つの数字や中央表示に一切被らず画面高さも増やさない） */
.combo-milestone-banner {
  position: absolute;
  top: 2px;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none !important;
  z-index: 25;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.combo-milestone-banner.hidden {
  display: none !important;
}

.combo-milestone-text {
  display: inline-block;
  font-size: 1.32rem;
  font-weight: 900;
  color: #fde047;
  text-shadow:
    -1.5px -1.5px 0 #78350f,
     1.5px -1.5px 0 #78350f,
    -1.5px  1.5px 0 #78350f,
     1.5px  1.5px 0 #78350f,
     0 3px 8px rgba(15, 23, 42, 0.55);
  letter-spacing: 0.03em;
  pointer-events: none;
}

.combo-milestone-banner.banner-active .combo-milestone-text {
  animation: milestoneBannerBurst 0.48s cubic-bezier(0.18, 0.89, 0.32, 1.28) forwards;
}

/* 100コンボ達成時の特別演出（少し大きく豪華に弾ける） */
.combo-milestone-banner.banner-max100 .combo-milestone-text {
  font-size: 1.52rem;
  color: #fef08a;
  text-shadow:
    -2px -2px 0 #991b1b,
     2px -2px 0 #991b1b,
    -2px  2px 0 #991b1b,
     2px  2px 0 #991b1b,
     0 0 14px rgba(250, 204, 21, 0.95);
  animation: milestoneBannerMax100Burst 0.58s cubic-bezier(0.18, 0.89, 0.32, 1.28) forwards;
}

@keyframes milestoneBannerBurst {
  0% {
    opacity: 0;
    transform: scale(0.45) translateY(6px);
  }
  28% {
    opacity: 1;
    transform: scale(1.22) translateY(-2px);
  }
  65% {
    opacity: 1;
    transform: scale(1.0) translateY(-4px);
  }
  100% {
    opacity: 0;
    transform: scale(1.08) translateY(-9px);
  }
}

@keyframes milestoneBannerMax100Burst {
  0% {
    opacity: 0;
    transform: scale(0.4) translateY(8px);
  }
  25% {
    opacity: 1;
    transform: scale(1.36) translateY(-3px);
  }
  55% {
    opacity: 1;
    transform: scale(1.08) translateY(-5px);
  }
  100% {
    opacity: 0;
    transform: scale(1.16) translateY(-11px);
  }
}

/* 小さな光の粒（スパークル）が散るように消える演出 */
.sparkle {
  position: absolute;
  font-size: 0.88rem;
  color: #fde047;
  text-shadow: 0 0 4px #b45309;
  opacity: 0;
  pointer-events: none;
}

.combo-milestone-banner.banner-max100 .sparkle {
  font-size: 1.05rem;
  color: #fef08a;
  text-shadow: 0 0 8px #f59e0b;
}

.combo-milestone-banner.banner-active .sp-1 { animation: spAnim1 0.48s ease-out forwards; }
.combo-milestone-banner.banner-active .sp-2 { animation: spAnim2 0.48s ease-out forwards; }
.combo-milestone-banner.banner-active .sp-3 { animation: spAnim3 0.48s ease-out forwards; }
.combo-milestone-banner.banner-active .sp-4 { animation: spAnim4 0.48s ease-out forwards; }
.combo-milestone-banner.banner-active .sp-5 { animation: spAnim5 0.48s ease-out forwards; }
.combo-milestone-banner.banner-active .sp-6 { animation: spAnim6 0.48s ease-out forwards; }

@keyframes spAnim1 {
  0%   { opacity: 1; transform: translate(0, 0) scale(0.5); }
  100% { opacity: 0; transform: translate(-72px, -16px) scale(1.15); }
}
@keyframes spAnim2 {
  0%   { opacity: 1; transform: translate(0, 0) scale(0.5); }
  100% { opacity: 0; transform: translate(72px, -16px) scale(1.15); }
}
@keyframes spAnim3 {
  0%   { opacity: 1; transform: translate(0, 0) scale(0.5); }
  100% { opacity: 0; transform: translate(-48px, -24px) scale(0.95); }
}
@keyframes spAnim4 {
  0%   { opacity: 1; transform: translate(0, 0) scale(0.5); }
  100% { opacity: 0; transform: translate(48px, -24px) scale(0.95); }
}
@keyframes spAnim5 {
  0%   { opacity: 1; transform: translate(0, 0) scale(0.5); }
  100% { opacity: 0; transform: translate(-86px, 4px) scale(0.9); }
}
@keyframes spAnim6 {
  0%   { opacity: 1; transform: translate(0, 0) scale(0.5); }
  100% { opacity: 0; transform: translate(86px, 4px) scale(0.9); }
}

/* 円盤周囲の背景・装飾オーラ（前半のコンボから速いペースで濃くなる） */
.dial-section.combo-lv-0 { background: radial-gradient(circle, rgba(240, 249, 255, 0.4) 0%, rgba(240, 249, 255, 0) 70%); }
.dial-section.combo-lv-1 { background: radial-gradient(circle, rgba(191, 219, 254, 0.72) 0%, rgba(191, 219, 254, 0) 72%); }
.dial-section.combo-lv-2 { background: radial-gradient(circle, rgba(96, 165, 250, 0.76) 0%, rgba(96, 165, 250, 0) 73%); }
.dial-section.combo-lv-3 { background: radial-gradient(circle, rgba(59, 130, 246, 0.78) 0%, rgba(59, 130, 246, 0) 74%); }
.dial-section.combo-lv-4 { background: radial-gradient(circle, rgba(30, 58, 138, 0.8) 0%, rgba(30, 58, 138, 0) 75%); }
.dial-section.combo-lv-5 { background: radial-gradient(circle, rgba(23, 37, 84, 0.84) 0%, rgba(23, 37, 84, 0) 76%); }
.dial-section.combo-lv-6 { background: radial-gradient(circle, rgba(15, 23, 42, 0.86) 0%, rgba(15, 23, 42, 0) 77%); }
.dial-section.combo-lv-7 { background: radial-gradient(circle, rgba(8, 15, 31, 0.89) 0%, rgba(8, 15, 31, 0) 78%); }
.dial-section.combo-lv-8 { background: radial-gradient(circle, rgba(3, 7, 18, 0.91) 0%, rgba(3, 7, 18, 0) 79%); }
.dial-section.combo-lv-9 { background: radial-gradient(circle, rgba(0, 0, 0, 0.94) 0%, rgba(2, 6, 23, 0) 80%); }

.dial-wrapper {
  position: relative;
  width: 280px;
  height: 280px;
  touch-action: manipulation;
  border-radius: 50%;
  outline: none;
  filter: drop-shadow(0 6px 14px rgba(148, 163, 184, 0.16));
  transition: filter 0.18s ease;
}

.dial-svg {
  width: 100%;
  height: 100%;
  display: block;
  touch-action: manipulation;
}

.dial-outer-rim {
  fill: #f0f9ff;
  stroke: #bae6fd;
  stroke-width: 2.5px;
  transition: fill 0.16s ease, stroke 0.16s ease;
}

/* コンボ段階（レベル0〜9）に応じた円盤外周ベゼル色
   ・0〜4: #f0f9ff -> 5〜9: #bfdbfe -> 10〜14: #60a5fa -> 15〜19: #3b82f6 -> 20〜24: #1e3a8a
   ・25〜29: #172554 -> 30〜39: #0f172a -> 40〜49: #080f1f -> 50〜59: #030712 -> 60以上: #000000
   ※外周が濃紺〜黒になっても輪郭が埋もれないよう、明るいブルー/シアンの外枠ストロークを付与 */
.dial-outer-rim.combo-lv-0 { fill: #f0f9ff !important; stroke: #bae6fd !important; stroke-width: 2.5px; }
.dial-outer-rim.combo-lv-1 { fill: #bfdbfe !important; stroke: #60a5fa !important; stroke-width: 2.8px; }
.dial-outer-rim.combo-lv-2 { fill: #60a5fa !important; stroke: #2563eb !important; stroke-width: 3px; }
.dial-outer-rim.combo-lv-3 { fill: #3b82f6 !important; stroke: #1d4ed8 !important; stroke-width: 3.2px; }
.dial-outer-rim.combo-lv-4 { fill: #1e3a8a !important; stroke: #3b82f6 !important; stroke-width: 3.5px; }
.dial-outer-rim.combo-lv-5 { fill: #172554 !important; stroke: #38bdf8 !important; stroke-width: 3.5px; }
.dial-outer-rim.combo-lv-6 { fill: #0f172a !important; stroke: #38bdf8 !important; stroke-width: 3.8px; }
.dial-outer-rim.combo-lv-7 { fill: #080f1f !important; stroke: #38bdf8 !important; stroke-width: 4px; }
.dial-outer-rim.combo-lv-8 { fill: #030712 !important; stroke: #7dd3fc !important; stroke-width: 4.2px; }
.dial-outer-rim.combo-lv-9 { fill: #000000 !important; stroke: #38bdf8 !important; stroke-width: 4.5px; }

/* 円盤すぐ外側のドロップシャドウ */
.dial-wrapper.combo-lv-0 { filter: drop-shadow(0 6px 14px rgba(148, 163, 184, 0.16)); }
.dial-wrapper.combo-lv-1 { filter: drop-shadow(0 6px 15px rgba(59, 130, 246, 0.26)); }
.dial-wrapper.combo-lv-2 { filter: drop-shadow(0 7px 17px rgba(37, 99, 235, 0.36)); }
.dial-wrapper.combo-lv-3 { filter: drop-shadow(0 8px 18px rgba(29, 78, 216, 0.44)); }
.dial-wrapper.combo-lv-4 { filter: drop-shadow(0 9px 20px rgba(30, 58, 138, 0.56)); }
.dial-wrapper.combo-lv-5 { filter: drop-shadow(0 10px 22px rgba(23, 37, 84, 0.64)); }
.dial-wrapper.combo-lv-6 { filter: drop-shadow(0 10px 23px rgba(15, 23, 42, 0.72)); }
.dial-wrapper.combo-lv-7 { filter: drop-shadow(0 11px 24px rgba(8, 15, 31, 0.78)); }
.dial-wrapper.combo-lv-8 { filter: drop-shadow(0 12px 25px rgba(3, 7, 18, 0.84)); }
.dial-wrapper.combo-lv-9 { filter: drop-shadow(0 12px 26px rgba(0, 0, 0, 0.9)); }

/* 節目到達時のリングも同系色の青で控えめに脈動させる */
.dial-milestone-halo {
  fill: none;
  stroke: #3b82f6;
  stroke-width: 0;
  opacity: 0;
  pointer-events: none;
  transform-origin: 150px 150px;
}

.dial-milestone-halo.milestone-halo-active {
  animation: milestoneHaloPulse 0.26s ease-out forwards;
}

.dial-milestone-halo.milestone-halo-max100 {
  stroke: #1e3a8a;
  animation: milestoneHaloMax100Pulse 0.34s ease-out forwards;
}

@keyframes milestoneHaloPulse {
  0% {
    stroke-width: 8px;
    opacity: 0.9;
  }
  100% {
    stroke-width: 1px;
    opacity: 0;
  }
}

@keyframes milestoneHaloMax100Pulse {
  0% {
    stroke-width: 12px;
    opacity: 1;
  }
  50% {
    stroke-width: 8px;
    opacity: 0.9;
  }
  100% {
    stroke-width: 2px;
    opacity: 0;
  }
}

.dial-bg {
  fill: #e2e8f0;
  stroke: #1e3a8a;
  stroke-width: 3px;
}

.dial-sector {
  stroke: #94a3b8;
  stroke-width: 2.2px;
  cursor: pointer;
  touch-action: manipulation;
  transition: fill 0.06s ease;
}

.dial-sector.sector-even {
  fill: url(#sectorEvenGrad);
}

.dial-sector.sector-odd {
  fill: url(#sectorOddGrad);
}

.dial-sector:hover {
  fill: #e0f2fe;
}

/* 開始前（?状態）の円盤スタイル */
.dial-wrapper.dial-waiting .dial-sector,
.dial-wrapper.dial-waiting .dial-number {
  cursor: default;
}

.dial-wrapper.dial-waiting .dial-sector.sector-even {
  fill: #f8fafc;
}

.dial-wrapper.dial-waiting .dial-sector.sector-odd {
  fill: #f1f5f9;
}

.dial-wrapper.dial-waiting .dial-number {
  fill: #94a3b8;
}

.dial-wrapper.dial-finished .dial-svg {
  pointer-events: none;
}

/* タッチ時の即時カラーフィードバック */
.dial-sector.flash-add {
  fill: #7dd3fc !important;
}

.dial-sector.flash-success {
  fill: #4ade80 !important;
}

.dial-sector.flash-burst {
  fill: #f87171 !important;
}

.dial-number {
  font-size: 42px;
  font-weight: 900;
  fill: #0f172a;
  stroke: #ffffff;
  stroke-width: 2px;
  paint-order: stroke fill;
  cursor: pointer;
  touch-action: manipulation;
  font-variant-numeric: tabular-nums;
}

.dial-center-bg {
  fill: #0f172a;
  stroke: #38bdf8;
  stroke-width: 3px;
  pointer-events: none;
}

.dial-center-label {
  font-size: 18px;
  font-weight: 900;
  fill: #ffffff;
  pointer-events: none;
}

.dial-center-pc.hidden,
.dial-center-mobile.hidden {
  display: none !important;
}

/* PC版ではスマホ専用の中央円2段表示を非表示 */
.dial-center-mobile {
  display: none;
  pointer-events: none;
}

/* 円盤中央のスタートボタン（ゲーム開始前のみ表示、中央円と同じ半径 r=52 / 49・位置 cx=150, cy=150） */
.center-start-group {
  cursor: pointer;
  pointer-events: all;
  touch-action: manipulation;
  outline: none;
}

.center-start-group.hidden,
.center-start-group.is-playing {
  display: none !important;
  pointer-events: none !important;
}

.center-start-outer {
  fill: #fde047;
  stroke: #f59e0b;
  stroke-width: 2.5px;
}

.center-start-bg {
  fill: url(#centerStartGrad30);
  stroke: #1d4ed8;
  stroke-width: 3px;
  transition: filter 0.08s ease;
}

/* 改良①: 時間モード別に中央スタートボタンを色分け（10秒：明るいグリーン系 / 30秒：鮮やかなブルー系 / 60秒：オレンジ系） */
.center-start-group.start-mode-10 .center-start-bg {
  fill: url(#centerStartGrad10);
  stroke: #047857;
}
.center-start-group.start-mode-10 .center-start-title,
.center-start-group.start-mode-10 .center-start-sub {
  stroke: #064e3b;
}

.center-start-group.start-mode-30 .center-start-bg {
  fill: url(#centerStartGrad30);
  stroke: #1d4ed8;
}
.center-start-group.start-mode-30 .center-start-title,
.center-start-group.start-mode-30 .center-start-sub {
  stroke: #1e3a8a;
}

.center-start-group.start-mode-60 .center-start-bg {
  fill: url(#centerStartGrad60);
  stroke: #c2410c;
}
.center-start-group.start-mode-60 .center-start-title,
.center-start-group.start-mode-60 .center-start-sub {
  stroke: #7c2d12;
}

.center-start-group:hover .center-start-bg,
.center-start-group:active .center-start-bg {
  filter: brightness(1.06);
}

.center-start-title {
  font-size: 21px;
  font-weight: 900;
  fill: #ffffff;
  stroke: #1e3a8a;
  stroke-width: 2.5px;
  paint-order: stroke fill;
  stroke-linejoin: round;
  pointer-events: none;
}

.center-start-sub {
  font-size: 14px;
  font-weight: 900;
  fill: #fef08a;
  stroke: #1e3a8a;
  stroke-width: 2.2px;
  paint-order: stroke fill;
  stroke-linejoin: round;
  pointer-events: none;
}

/* 10達成時、中央円内の黄色いコンボ数字(#center-combo-num)だけを一瞬わずかに拡大して戻す演出（節目・100コンボ強調対応） */
.center-combo-num {
  transform-box: fill-box;
  transform-origin: center center;
}

.center-combo-num.combo-num-pop {
  animation: comboNumPopAnim 0.18s ease-out;
}

.center-combo-num.combo-num-milestone-pop {
  animation: comboNumMilestonePopAnim 0.22s ease-out;
}

.center-combo-num.combo-num-max100-pop {
  animation: comboNumMax100PopAnim 0.26s ease-out;
}

@keyframes comboNumPopAnim {
  0% {
    transform: scale(1);
  }
  45% {
    transform: scale(1.26);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes comboNumMilestonePopAnim {
  0% {
    transform: scale(1);
  }
  45% {
    transform: scale(1.42);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes comboNumMax100PopAnim {
  0% {
    transform: scale(1);
  }
  40% {
    transform: scale(1.55);
  }
  75% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
  }
}

/* 終了時オーバーレイ（円盤を暗く覆い、結果情報のみ表示・ボタンは含めない） */
.result-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.9);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10;
  pointer-events: auto;
}

.result-overlay.hidden {
  display: none;
}

.result-card {
  text-align: center;
  color: #ffffff;
  padding: 16px;
  width: 90%;
  pointer-events: none;
}

.result-card h2 {
  font-size: 1.55rem;
  margin-bottom: 4px;
  color: #fde047;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.result-mode-label {
  font-size: 0.82rem;
  color: #cbd5e1;
  margin-bottom: 6px;
}

.rank-in-banner {
  background: linear-gradient(135deg, #f59e0b 0%, #dc2626 100%);
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 900;
  padding: 4px 10px;
  border-radius: 999px;
  margin: 4px auto 8px;
  display: inline-block;
  box-shadow: 0 2px 6px rgba(220, 38, 38, 0.4);
}

.rank-in-banner.hidden {
  display: none;
}

.result-row {
  font-size: 1.05rem;
  margin-bottom: 5px;
}

.best-diff-msg {
  margin-top: 6px;
  font-size: 0.84rem;
  font-weight: 800;
  color: #fde047;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(253, 224, 71, 0.45);
  border-radius: 999px;
  padding: 3px 10px;
  display: inline-block;
}

.best-diff-msg.hidden {
  display: none;
}

/* 円盤の外側・下部コントロールエリア */
.controls-bar {
  width: 100%;
}

.controls-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: 100%;
}

.controls-group.hidden {
  display: none;
}

.btn {
  appearance: none;
  border: 2px solid transparent;
  border-radius: 10px;
  padding: 10px 8px;
  font-size: 0.9rem;
  font-weight: 900;
  cursor: pointer;
  touch-action: manipulation;
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}

.btn:active {
  transform: translateY(2px);
}

.btn:disabled {
  opacity: 0.48;
  cursor: not-allowed;
  box-shadow: none !important;
  transform: none !important;
}

.btn-discard {
  background: linear-gradient(180deg, #fff1f2 0%, #ffe4e6 100%);
  border-color: #fb7185;
  color: #be123c;
  box-shadow: 0 2px 0 #fda4af;
}

.btn-restart {
  background: linear-gradient(180deg, #f8fafc 0%, #e2e8f0 100%);
  border-color: #94a3b8;
  color: #334155;
  box-shadow: 0 2px 0 #cbd5e1;
}

.btn-primary {
  background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
  border-color: #1d4ed8;
  color: #ffffff;
  box-shadow: 0 3px 0 #1e40af;
}

.btn-secondary {
  background: linear-gradient(180deg, #475569 0%, #334155 100%);
  border-color: #1e293b;
  color: #f8fafc;
  box-shadow: 0 3px 0 #0f172a;
}

/* =========================================================
   スマートフォン縦画面専用・v5 カジュアルゲームデザイン (max-width: 600px)
   ・明るく爽やかな空色〜クリームの淡い背景グラデーション
   ・円盤はブルーの立体ベゼル＋交互パステル扇形で視認性とゲーム感を両立
   ・中央円の上段「あと○（赤）」と下段「○（黄色＋黒縁）コンボ」を鮮明に表示
   ・10達成時は中央リングと軽量ポップで気持ちよくフィードバック（タッチ阻害ゼロ）
   ========================================================= */
@media (max-width: 600px) {
  html,
  body {
    height: 100%;
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
    overscroll-behavior: none;
    padding: 0;
    background: linear-gradient(165deg, #e0f2fe 0%, #f0f9ff 52%, #fef9c3 100%);
  }

  .app-container {
    width: 100%;
    max-width: 100%;
    height: 100%;
    height: 100dvh;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    padding: max(6px, env(safe-area-inset-top)) 12px max(8px, env(safe-area-inset-bottom));
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 4px;
    overflow: hidden;
  }

  /* 1. ヘッダー */
  .header-top {
    margin-bottom: 0;
    gap: 4px;
  }

  .game-title {
    font-size: 1.02rem;
    gap: 4px;
    white-space: nowrap;
  }

  .title-icon {
    width: 20px;
    height: 20px;
    font-size: 0.74rem;
  }

  .version-badge {
    font-size: 0.62rem;
    padding: 1px 5px;
  }

  .sound-toggle-btn {
    min-width: 78px;
    min-height: 44px;
    padding: 6px 11px;
    font-size: 0.78rem;
  }

  .instructions,
  .version-links {
    display: none;
  }

  .mobile-help-menu {
    display: block;
  }

  .mobile-help-btn {
    list-style: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    font-size: 0.72rem;
    font-weight: 800;
    color: #0369a1;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #bae6fd;
    border-radius: 999px;
    padding: 4px 10px;
    cursor: pointer;
    white-space: nowrap;
  }

  .mobile-help-btn::-webkit-details-marker {
    display: none;
  }

  .mobile-help-popup {
    position: absolute;
    right: 0;
    top: calc(100% + 4px);
    width: 270px;
    background: #ffffff;
    border: 2px solid #7dd3fc;
    border-radius: 10px;
    padding: 8px 10px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.18);
    text-align: left;
    font-size: 0.74rem;
    line-height: 1.45;
    color: #1e293b;
    z-index: 50;
  }

  .mobile-help-popup p {
    margin-bottom: 4px;
  }

  .mobile-help-popup strong {
    color: #dc2626;
  }

  .mobile-version-links {
    display: flex;
    gap: 5px;
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid #e2e8f0;
  }

  .mobile-version-links a {
    flex: 1;
    text-align: center;
    font-size: 0.72rem;
    font-weight: 800;
    color: #0284c7;
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 5px;
    padding: 3px 0;
    text-decoration: none;
  }

  /* 2. 時間モード選択バー */
  .mode-selector-bar {
    background: transparent;
    border: none;
    padding: 0;
    gap: 5px;
    flex-wrap: nowrap;
  }

  .mode-buttons-group {
    gap: 6px;
    flex: 1 1 auto;
  }

  .mode-btn {
    padding: 4px 4px;
    font-size: 0.8rem;
    border: 1.5px solid #93c5fd;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.9);
    color: #1e40af;
  }

  .mode-btn.active-mode {
    background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%);
    border-color: #1e3a8a;
    color: #ffffff;
  }

  .mode-lock-note {
    display: none;
  }

  /* 3. 自己ベストランキング：ゴールド調のスリムな1行カプセルバー */
  .ranking-panel {
    background: linear-gradient(90deg, #fffbeb 0%, #fef3c7 100%);
    border: 1.5px solid #fcd34d;
    border-radius: 8px;
    padding: 4px 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    box-shadow: 0 2px 5px rgba(217, 119, 6, 0.08);
  }

  .ranking-header {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
    flex: 0 0 auto;
  }

  .ranking-title {
    font-size: 0.72rem;
    font-weight: 900;
    color: #92400e;
  }

  .ranking-subtitle {
    display: none;
  }

  .ranking-columns {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 0 1 auto;
  }

  .ranking-col {
    background: transparent;
    border: none;
    padding: 0;
    display: flex;
    align-items: baseline;
    gap: 4px;
  }

  .ranking-col-title {
    font-size: 0.7rem;
    font-weight: 800;
    color: #b45309;
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
  }

  .ranking-col-title::after {
    content: ":";
  }

  .ranking-list li:nth-child(2),
  .ranking-list li:nth-child(3),
  .ranking-list li .rank-Pos {
    display: none;
  }

  .ranking-list li {
    font-size: 0.82rem;
    line-height: 1;
  }

  .rank-val {
    font-weight: 900;
    color: #0f172a;
  }

  /* 4. 残り時間・現在スコア：白カードに柔らかいシャドウ */
  .stats-bar {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .stat-box {
    padding: 4px 6px;
    border-radius: 9px;
  }

  .stat-label {
    font-size: 0.66rem;
  }

  .stat-value {
    font-size: 1.24rem;
    line-height: 1.15;
  }

  .stat-value small {
    font-size: 0.64rem;
  }

  .combo-highlight-box {
    display: none;
  }

  /* 5. スマホ版ではスタートボタンが円盤中央に入ったため、外側の合計パネル・スタート行は非表示にしてスッキリ整理 */
  .sum-panel {
    display: none;
  }

  /* 6. 円盤セクション */
  .dial-section {
    flex: 1 1 auto;
    min-height: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .dial-wrapper {
    width: min(86vw, 52dvh, 330px);
    height: min(86vw, 52dvh, 330px);
    min-width: 230px;
    min-height: 230px;
  }

  /* 中央円：外周ゴールドリング＋白〜淡ピンク背景で「あと○」と「○コンボ」を鮮明に表示 */
  .dial-center-pc {
    display: none;
  }

  .dial-center-mobile {
    display: block;
    pointer-events: none;
  }

  .dial-center-mobile-outer {
    fill: #fde047;
    stroke: #f59e0b;
    stroke-width: 2px;
    pointer-events: none;
  }

  .dial-center-mobile-bg {
    fill: url(#centerBgGrad);
    stroke: #dc2626;
    stroke-width: 3px;
    pointer-events: none;
  }

  .center-needed-svg-text {
    font-size: 23px;
    font-weight: 900;
    fill: #dc2626;
    stroke: #ffffff;
    stroke-width: 2px;
    paint-order: stroke fill;
    font-variant-numeric: tabular-nums;
    pointer-events: none;
  }

  .center-combo-svg-text {
    font-size: 13.5px;
    font-weight: 800;
    fill: #b45309;
    font-variant-numeric: tabular-nums;
    pointer-events: none;
  }

  /* コンボ数字部分だけを鮮やかな黄色＋黒縁取り＋ひと回り大きい太字 */
  .center-combo-num {
    font-size: 18px;
    font-weight: 900;
    fill: #facc15;
    stroke: #0f172a;
    stroke-width: 3px;
    paint-order: stroke fill;
    stroke-linejoin: round;
    font-variant-numeric: tabular-nums;
    pointer-events: none;
  }

  .center-combo-label {
    font-size: 13.5px;
    font-weight: 800;
    fill: #b45309;
    stroke: none;
    pointer-events: none;
  }

  .dial-number {
    font-size: 40px;
  }

  /* 7. 下部ボタン */
  .controls-group {
    gap: 8px;
  }

  .btn {
    padding: 8px 6px;
    font-size: 0.82rem;
    font-weight: 800;
    border-radius: 9px;
    border-width: 1.5px;
  }
}

/* iPhone SE等の縦が短い画面 (高さ620px以下) 向けの微調整 */
@media (max-width: 600px) and (max-height: 620px) {
  .app-container {
    gap: 2px;
  }
  .btn-start {
    padding: 5px 14px;
    font-size: 0.8rem;
  }
  .dial-wrapper {
    width: min(76vw, 44dvh, 255px);
    height: min(76vw, 44dvh, 255px);
    min-width: 195px;
    min-height: 195px;
  }
  .btn {
    padding: 6px 4px;
    font-size: 0.76rem;
  }
}


/* =========================================================
   v7 追加: 時間延長バッジ & 3〜6 TAPS! / スピードボーナス表示バナー
   （円盤の上側余白に pointer-events: none で配置し、6つの数字や中央円を一切隠さず操作も妨げない）
   ========================================================= */
.stat-box-time {
  position: relative;
}

.time-extend-badge {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 6px;
  font-size: 0.72rem;
  font-weight: 900;
  color: #ffffff;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border-radius: 999px;
  box-shadow: 0 2px 4px rgba(5, 150, 105, 0.25);
  vertical-align: middle;
  pointer-events: none;
}

.time-extend-badge.hidden {
  display: none !important;
}

.bonus-popup-banner {
  position: absolute;
  top: 4px;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none !important;
  z-index: 24;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
}

.bonus-popup-banner.hidden {
  display: none !important;
}

.bonus-popup-taps {
  display: inline-block;
  padding: 2px 10px;
  font-size: 0.92rem;
  font-weight: 900;
  color: #ffffff;
  background: linear-gradient(135deg, #ec4899 0%, #8b5cf6 100%);
  border: 1.5px solid #fde047;
  border-radius: 999px;
  box-shadow: 0 3px 8px rgba(139, 92, 246, 0.45);
  letter-spacing: 0.03em;
  pointer-events: none;
}

.bonus-popup-taps.hidden {
  display: none !important;
}

.bonus-popup-time {
  display: inline-block;
  padding: 2px 10px;
  font-size: 0.88rem;
  font-weight: 900;
  color: #064e3b;
  background: linear-gradient(135deg, #a7f3d0 0%, #34d399 100%);
  border: 1.5px solid #059669;
  border-radius: 999px;
  box-shadow: 0 3px 8px rgba(5, 150, 105, 0.35);
  pointer-events: none;
}

.bonus-popup-time.hidden {
  display: none !important;
}

.bonus-popup-banner.bonus-popup-active {
  animation: bonusPopupFloat 0.62s cubic-bezier(0.18, 0.89, 0.32, 1.28) forwards;
}

@keyframes bonusPopupFloat {
  0% {
    opacity: 0;
    transform: translateX(-50%) scale(0.6) translateY(6px);
  }
  25% {
    opacity: 1;
    transform: translateX(-50%) scale(1.1) translateY(-2px);
  }
  70% {
    opacity: 1;
    transform: translateX(-50%) scale(1.0) translateY(-4px);
  }
  100% {
    opacity: 0;
    transform: translateX(-50%) scale(1.04) translateY(-8px);
  }
}


/* =========================================================
   くるくる10 v8 統合版 追加・上書きスタイル
   - 第2章：チャレンジ / れんしゅう モード切替タブ＆赤枠ヒント強調
   - 第4章・第5章：3〜6 TAPS! / SUPER FAST! 並列達成バナー＆ OVER! 表示
   - 第6章：効果音＆BGM独立ON/OFFボタン・言語切替ボタン
   - 第7章：コンボが増えるほど明るく華やかになる外周色（水色→青→紫→ピンク→オレンジ→ゴールド→虹色）＆5コンボ持続表示
   - 第8章：一時停止オーバーレイ
   - 第9章・第10章：体験チュートリアル案内バー＆共通マスコット枠
   - 第11章：開始前のSTART穏やか発光アニメーション
   ========================================================= */

.header-right-group {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: nowrap;
}

.sound-toggle-btn {
  min-width: 78px;
  min-height: 44px;
  padding: 5px 8px;
  font-size: 0.72rem;
}

.bgm-toggle-btn.sound-on {
  color: #1e40af;
  background: linear-gradient(180deg, #dbeafe 0%, #bfdbfe 100%);
  border-color: #2563eb;
  box-shadow: 0 2px 0 #1d4ed8;
}

.lang-toggle-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 4px 8px;
  font-size: 0.7rem;
  font-weight: 900;
  color: #0369a1;
  background: #f0f9ff;
  border: 1.5px solid #7dd3fc;
  border-radius: 999px;
  cursor: pointer;
  touch-action: manipulation;
  white-space: nowrap;
}

.btn-bgm-track-switch {
  appearance: none;
  display: block;
  width: 100%;
  margin: 6px 0 4px;
  padding: 6px 10px;
  font-size: 0.74rem;
  font-weight: 800;
  color: #1e40af;
  background: #eff6ff;
  border: 1.5px solid #93c5fd;
  border-radius: 8px;
  cursor: pointer;
  text-align: center;
}

.btn-open-tutorial {
  appearance: none;
  display: block;
  width: 100%;
  margin: 6px 0;
  padding: 8px 10px;
  font-size: 0.78rem;
  font-weight: 900;
  color: #ffffff;
  background: linear-gradient(135deg, #ec4899 0%, #8b5cf6 100%);
  border: 1.5px solid #fde047;
  border-radius: 8px;
  cursor: pointer;
  text-align: center;
  box-shadow: 0 2px 6px rgba(139, 92, 246, 0.35);
}

/* 第2章：チャレンジ / れんしゅう モード切替タブ */
.game-mode-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  width: 100%;
}

.game-mode-tab {
  appearance: none;
  background: #ffffff;
  border: 1.5px solid #93c5fd;
  border-radius: 8px;
  padding: 6px 6px;
  font-size: 0.8rem;
  font-weight: 900;
  color: #1e40af;
  cursor: pointer;
  touch-action: manipulation;
  box-shadow: 0 2px 0 #bfdbfe;
}

.game-mode-tab.active-mode {
  background: linear-gradient(180deg, #0284c7 0%, #0369a1 100%);
  border-color: #075985;
  color: #ffffff;
  box-shadow: 0 2px 0 #0c4a6e;
}

.game-mode-tab:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
}

/* 第10章：共通マスコット案内バー（チャレンジプレイ中は自動で .hidden になり視認性を妨げない） */
.mascot-guide-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(90deg, #fff1f2 0%, #fefce8 100%);
  border: 1.5px solid #fda4af;
  border-radius: 10px;
  padding: 5px 8px;
}

.mascot-guide-bar.hidden {
  display: none !important;
}

.mascot-avatar-slot {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
  border: 2px solid #0f172a;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(15, 23, 42, 0.2);
}

.mascot-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mascot-img.hidden {
  display: none !important;
}

.mascot-placeholder-badge {
  color: #ffffff;
  font-size: 1rem;
  font-weight: 900;
  font-family: "Arial Black", sans-serif;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}

.mascot-speech-box {
  flex: 1 1 auto;
  min-width: 0;
}

.mascot-speech-text {
  font-size: 0.72rem;
  font-weight: 800;
  color: #881337;
  line-height: 1.3;
}

/* 第9章：体験チュートリアル案内バー */
.tutorial-banner {
  background: linear-gradient(135deg, #fdf2f8 0%, #f3e8ff 100%);
  border: 2px solid #ec4899;
  border-radius: 10px;
  padding: 6px 10px;
}

.tutorial-banner.hidden {
  display: none !important;
}

.tutorial-banner-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 3px;
}

.tutorial-banner-title {
  font-size: 0.74rem;
  font-weight: 900;
  color: #9d174d;
}

.tutorial-close-btn {
  appearance: none;
  background: #be185d;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 0.7rem;
  font-weight: 800;
  cursor: pointer;
}

.tutorial-prompt-text {
  font-size: 0.8rem;
  font-weight: 900;
  color: #be123c;
  line-height: 1.35;
}

/* 第2章＆第9章：練習モードのヒント＆チュートリアルの赤枠・赤数字強調 */
.dial-sector.sector-hint-red {
  fill: url(#sectorHintRedGrad) !important;
  stroke: #dc2626 !important;
  stroke-width: 4px !important;
}

.dial-number.number-hint-red {
  fill: #dc2626 !important;
  stroke: #ffffff !important;
  stroke-width: 3px !important;
}

/* 第7章：コンボが増えるほど明るく華やかに進化する円盤外周＆背景オーラ
   （従来の暗い青〜黒を廃止し、水色→青→紫→ピンク→オレンジ→ゴールド→虹色へ進化） */
.dial-section.combo-lv-0 { background: radial-gradient(circle, rgba(224, 242, 254, 0.5) 0%, rgba(240, 249, 255, 0) 70%); }
.dial-section.combo-lv-1 { background: radial-gradient(circle, rgba(56, 189, 248, 0.42) 0%, rgba(56, 189, 248, 0) 72%); }
.dial-section.combo-lv-2 { background: radial-gradient(circle, rgba(59, 130, 246, 0.45) 0%, rgba(59, 130, 246, 0) 73%); }
.dial-section.combo-lv-3 { background: radial-gradient(circle, rgba(168, 85, 247, 0.46) 0%, rgba(168, 85, 247, 0) 74%); }
.dial-section.combo-lv-4 { background: radial-gradient(circle, rgba(236, 72, 153, 0.48) 0%, rgba(236, 72, 153, 0) 75%); }
.dial-section.combo-lv-5 { background: radial-gradient(circle, rgba(249, 115, 22, 0.50) 0%, rgba(249, 115, 22, 0) 76%); }
.dial-section.combo-lv-6 { background: radial-gradient(circle, rgba(250, 204, 21, 0.58) 0%, rgba(250, 204, 21, 0) 77%); }
.dial-section.combo-lv-7,
.dial-section.combo-lv-8,
.dial-section.combo-lv-9 {
  background: radial-gradient(circle, rgba(244, 63, 94, 0.38) 0%, rgba(168, 85, 247, 0.32) 42%, rgba(250, 204, 21, 0) 78%);
}

.dial-outer-rim.combo-lv-0 { fill: #e0f2fe !important; stroke: #7dd3fc !important; stroke-width: 2.8px; }
.dial-outer-rim.combo-lv-1 { fill: #38bdf8 !important; stroke: #0284c7 !important; stroke-width: 3px; }
.dial-outer-rim.combo-lv-2 { fill: #3b82f6 !important; stroke: #1d4ed8 !important; stroke-width: 3.2px; }
.dial-outer-rim.combo-lv-3 { fill: #a855f7 !important; stroke: #7e22ce !important; stroke-width: 3.4px; }
.dial-outer-rim.combo-lv-4 { fill: #ec4899 !important; stroke: #be185d !important; stroke-width: 3.5px; }
.dial-outer-rim.combo-lv-5 { fill: #f97316 !important; stroke: #c2410c !important; stroke-width: 3.6px; }
.dial-outer-rim.combo-lv-6 { fill: #facc15 !important; stroke: #ca8a04 !important; stroke-width: 4px; }
.dial-outer-rim.combo-lv-7 { fill: url(#rainbowRimGrad) !important; stroke: #fde047 !important; stroke-width: 4.2px; }
.dial-outer-rim.combo-lv-8 { fill: url(#rainbowRimGrad) !important; stroke: #ffffff !important; stroke-width: 4.5px; }
.dial-outer-rim.combo-lv-9 { fill: url(#rainbowRimGrad) !important; stroke: #fde047 !important; stroke-width: 4.8px; }

.dial-wrapper.combo-lv-0 { filter: drop-shadow(0 6px 14px rgba(56, 189, 248, 0.18)); }
.dial-wrapper.combo-lv-1 { filter: drop-shadow(0 6px 15px rgba(2, 132, 199, 0.28)); }
.dial-wrapper.combo-lv-2 { filter: drop-shadow(0 7px 17px rgba(37, 99, 235, 0.36)); }
.dial-wrapper.combo-lv-3 { filter: drop-shadow(0 8px 18px rgba(147, 51, 234, 0.42)); }
.dial-wrapper.combo-lv-4 { filter: drop-shadow(0 9px 20px rgba(219, 39, 119, 0.46)); }
.dial-wrapper.combo-lv-5 { filter: drop-shadow(0 10px 22px rgba(234, 88, 12, 0.5)); }
.dial-wrapper.combo-lv-6 { filter: drop-shadow(0 10px 24px rgba(234, 179, 8, 0.6)); }
.dial-wrapper.combo-lv-7,
.dial-wrapper.combo-lv-8,
.dial-wrapper.combo-lv-9 { filter: drop-shadow(0 11px 25px rgba(236, 72, 153, 0.58)); }

/* 第7章：5コンボ刻みの達成文字を消さずに次の5コンボ到達まで維持するスタイル */
.combo-milestone-banner.banner-persistent .combo-milestone-text {
  opacity: 1 !important;
  animation: none !important;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.85) 0%, rgba(30, 58, 138, 0.88) 100%);
  border: 1.5px solid #fde047;
  border-radius: 999px;
  padding: 2px 12px;
  font-size: 0.92rem;
  color: #fde047;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.3);
}

/* 第4章：達成表示バナー（3〜6 TAPS! と SUPER FAST!/FAST!/GOOD! を並列表示し、約1.45秒間はっきり読める） */
.bonus-popup-banner {
  top: 28px;
  z-index: 26;
}

.bonus-popup-speed {
  display: inline-block;
  padding: 2px 10px;
  font-size: 0.88rem;
  font-weight: 900;
  color: #ffffff;
  background: linear-gradient(135deg, #f97316 0%, #dc2626 100%);
  border: 1.5px solid #fde047;
  border-radius: 999px;
  box-shadow: 0 3px 8px rgba(220, 38, 38, 0.4);
  letter-spacing: 0.03em;
  pointer-events: none;
}

.bonus-popup-speed.hidden {
  display: none !important;
}

.bonus-popup-banner.bonus-popup-active {
  animation: bonusPopupHoldAndFade 1.45s cubic-bezier(0.18, 0.89, 0.32, 1.2) forwards;
}

@keyframes bonusPopupHoldAndFade {
  0% {
    opacity: 0;
    transform: translateX(-50%) scale(0.65) translateY(5px);
  }
  14% {
    opacity: 1;
    transform: translateX(-50%) scale(1.08) translateY(-1px);
  }
  25% {
    opacity: 1;
    transform: translateX(-50%) scale(1.0) translateY(-2px);
  }
  84% {
    opacity: 1;
    transform: translateX(-50%) scale(1.0) translateY(-2px);
  }
  100% {
    opacity: 0;
    transform: translateX(-50%) scale(1.02) translateY(-6px);
  }
}

/* 第5章：10超過時の「OVER!」バナー */
.over-popup-banner {
  position: absolute;
  top: 26px;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none !important;
  z-index: 27;
  padding: 3px 16px;
  font-size: 1.25rem;
  font-weight: 900;
  color: #ffffff;
  background: linear-gradient(135deg, #ef4444 0%, #991b1b 100%);
  border: 2px solid #fde047;
  border-radius: 999px;
  box-shadow: 0 4px 12px rgba(185, 28, 28, 0.55);
  letter-spacing: 0.06em;
}

.over-popup-banner.hidden {
  display: none !important;
}

.over-popup-banner.over-popup-active {
  animation: bonusPopupHoldAndFade 1.1s ease-out forwards;
}

/* 第11章：開始前のSTARTボタン穏やか発光（激しい点滅を避け、開始後は停止） */
.center-start-group.start-gentle-glow .center-start-outer {
  animation: startGentlePulse 2.4s ease-in-out infinite;
}

@keyframes startGentlePulse {
  0%, 100% {
    opacity: 0.92;
    stroke-width: 2.5px;
  }
  50% {
    opacity: 1;
    stroke-width: 5px;
  }
}

/* 第8章：一時停止オーバーレイ */
.pause-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.88);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 15;
  pointer-events: auto;
}

.pause-overlay.hidden {
  display: none !important;
}

.pause-card {
  text-align: center;
  color: #ffffff;
  padding: 14px;
  width: 88%;
}

.pause-card h3 {
  font-size: 1.25rem;
  color: #fde047;
  margin-bottom: 6px;
}

.pause-desc {
  font-size: 0.76rem;
  color: #e2e8f0;
  margin-bottom: 8px;
  line-height: 1.35;
}

.pause-countdown-text {
  font-size: 1.15rem;
  font-weight: 900;
  color: #38bdf8;
  min-height: 1.4em;
  margin-bottom: 6px;
}

.pause-resume-btn {
  width: 100%;
  max-width: 160px;
}

/* 下部3ボタンレイアウト */
.controls-group-3 {
  grid-template-columns: 1.1fr 1fr 0.9fr;
  gap: 6px;
}

.btn-pause {
  background: linear-gradient(180deg, #eff6ff 0%, #dbeafe 100%);
  border-color: #60a5fa;
  color: #1e40af;
  box-shadow: 0 2px 0 #93c5fd;
}

.btn-hint {
  background: linear-gradient(180deg, #fef2f2 0%, #fee2e2 100%);
  border-color: #f87171;
  color: #b91c1c;
  box-shadow: 0 2px 0 #fca5a5;
}

.btn-pause.hidden,
.btn-hint.hidden {
  display: none !important;
}

@media (max-width: 600px) {
  .hidden-on-compact {
    display: none;
  }
  .sound-toggle-btn {
    min-width: 68px;
    min-height: 40px;
    padding: 4px 7px;
    font-size: 0.68rem;
  }
  .mascot-guide-bar {
    padding: 3px 7px;
  }
  .mascot-avatar-slot {
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
  }
  .mascot-speech-text {
    font-size: 0.68rem;
  }
}


/* =========================================================
   くるくる10 v9 一括改善版 スタイル定義
   - 改善②：達成表示（SUPER FAST!, FAST!, GOOD!, 3〜6 TAPS!）および OVER! を円盤中央へ移動し、
             ブワッと浮かび上がる爽快な拡大・浮上アニメーション（pointer-events: none）
   - 改善③-A：円盤外周の色は常に視認性の高い固定ライトスカイ（#e0f2fe / #38bdf8）
   - 改善⑤：マスコット中心の「遊び方」モーダル＆iPhone Safariで円盤・スコア・下部ボタンが絶対に重ならないレイアウト整理
   ========================================================= */

/* 改善②：円盤中央（「あと○」が表示される円の位置）からブワッと浮かび上がる達成表示ポップアップ */
.bonus-popup-banner.center-achievement-popup {
  position: absolute;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%);
  pointer-events: none !important;
  z-index: 28;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  white-space: nowrap;
}

.bonus-popup-banner.center-achievement-popup .bonus-popup-taps {
  font-size: 1.18rem;
  padding: 4px 14px;
  font-weight: 900;
  color: #ffffff;
  background: linear-gradient(135deg, #ec4899 0%, #7c3aed 100%);
  border: 2.5px solid #fde047;
  border-radius: 999px;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.45);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
}

.bonus-popup-banner.center-achievement-popup .bonus-popup-speed {
  font-size: 1.12rem;
  padding: 4px 14px;
  font-weight: 900;
  color: #ffffff;
  background: linear-gradient(135deg, #f97316 0%, #dc2626 100%);
  border: 2.5px solid #fde047;
  border-radius: 999px;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.45);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
}

.bonus-popup-banner.center-achievement-popup .bonus-popup-time {
  font-size: 0.98rem;
  padding: 2px 12px;
  font-weight: 900;
  color: #064e3b;
  background: linear-gradient(135deg, #fef08a 0%, #4ade80 100%);
  border: 2px solid #059669;
  border-radius: 999px;
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.35);
}

.bonus-popup-banner.center-achievement-popup.bonus-popup-active {
  animation: centerAchievementFloat 0.92s cubic-bezier(0.18, 0.89, 0.32, 1.28) forwards !important;
}

/* 改善②-8：OVER! も円盤中央からブワッと浮かび上がる統一位置・演出 */
.over-popup-banner.center-achievement-popup {
  position: absolute;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%);
  pointer-events: none !important;
  z-index: 29;
  padding: 6px 20px;
  font-size: 1.45rem;
  font-weight: 900;
  color: #ffffff;
  background: linear-gradient(135deg, #ef4444 0%, #991b1b 100%);
  border: 3px solid #fde047;
  border-radius: 999px;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.55);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.over-popup-banner.center-achievement-popup.over-popup-active {
  animation: centerAchievementFloat 0.95s cubic-bezier(0.18, 0.89, 0.32, 1.28) forwards !important;
}

@keyframes centerAchievementFloat {
  0% {
    opacity: 0;
    transform: translate(-50%, -42%) scale(0.48);
  }
  22% {
    opacity: 1;
    transform: translate(-50%, -54%) scale(1.18);
  }
  42% {
    opacity: 1;
    transform: translate(-50%, -52%) scale(1.0);
  }
  78% {
    opacity: 1;
    transform: translate(-50%, -56%) scale(1.0);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -64%) scale(0.96);
  }
}

/* 改善③-A：円盤外周と周囲は常に固定の見やすいライトスカイ色 */
.dial-section {
  background: radial-gradient(circle, rgba(224, 242, 254, 0.45) 0%, rgba(240, 249, 255, 0) 70%) !important;
}

.dial-outer-rim {
  fill: #e0f2fe !important;
  stroke: #38bdf8 !important;
  stroke-width: 3px !important;
}

/* 改善⑤：キャラクター中心の「遊び方」モーダル */
.mobile-help-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 4px 10px;
  font-size: 0.74rem;
  font-weight: 900;
  color: #ffffff;
  background: linear-gradient(180deg, #0284c7 0%, #0369a1 100%);
  border: 1.5px solid #075985;
  border-radius: 999px;
  cursor: pointer;
  touch-action: manipulation;
  white-space: nowrap;
  box-shadow: 0 2px 0 #0c4a6e;
}

.howto-modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.72);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 14px;
  z-index: 100;
}

.howto-modal.hidden {
  display: none !important;
}

.howto-card {
  width: 100%;
  max-width: 380px;
  background: #ffffff;
  border: 3px solid #38bdf8;
  border-radius: 18px;
  padding: 14px 16px;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.35);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.howto-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1.5px solid #e0f2fe;
  padding-bottom: 6px;
}

.howto-title {
  font-size: 1.08rem;
  font-weight: 900;
  color: #0c4a6e;
}

.howto-step-badge {
  font-size: 0.78rem;
  font-weight: 900;
  color: #0369a1;
  background: #e0f2fe;
  padding: 2px 10px;
  border-radius: 999px;
}

.howto-mascot-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.howto-mascot-avatar {
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
  border: 2.5px solid #0f172a;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 3px 6px rgba(15, 23, 42, 0.22);
}

.howto-bubble {
  flex: 1 1 auto;
  background: #fff1f2;
  border: 2px solid #fda4af;
  border-radius: 14px;
  padding: 8px 12px;
}

.howto-speech-text {
  font-size: 0.96rem;
  font-weight: 900;
  color: #881337;
  line-height: 1.35;
}

.howto-visual-box {
  background: linear-gradient(135deg, #f0f9ff 0%, #fef9c3 100%);
  border: 2px dashed #38bdf8;
  border-radius: 12px;
  padding: 10px;
  text-align: center;
  font-size: 1.02rem;
  font-weight: 900;
  color: #0f172a;
}

.howto-sub-text {
  font-size: 0.84rem;
  font-weight: 700;
  color: #334155;
  line-height: 1.45;
}

.howto-mascot-note {
  font-size: 0.66rem;
  color: #64748b;
  line-height: 1.3;
}

.howto-nav-row {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 8px;
}

.howto-nav-btn {
  background: #f1f5f9;
  border-color: #94a3b8;
  color: #334155;
  padding: 8px;
  font-size: 0.86rem;
}

.howto-nav-next {
  background: linear-gradient(180deg, #38bdf8 0%, #0284c7 100%);
  border-color: #0369a1;
  color: #ffffff;
}

.howto-action-row {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 8px;
}

.howto-practice-btn {
  background: linear-gradient(180deg, #10b981 0%, #059669 100%);
  border-color: #047857;
  color: #ffffff;
  padding: 8px;
  font-size: 0.84rem;
}

.howto-close-btn {
  background: #e2e8f0;
  border-color: #94a3b8;
  color: #0f172a;
  padding: 8px;
  font-size: 0.84rem;
}

.howto-extra-row {
  border-top: 1px solid #e2e8f0;
  padding-top: 6px;
}

/* 改善⑤-D：iPhone Safari の画面高さに応じて余白と円盤サイズを自動調整し、
   案内枠・スコア・円盤・下部ボタンが絶対に重ならないようにし、かつヘッダー右端の「遊び方」ボタン等も見切れないレスポンシブ設計 */
@media (max-width: 600px) {
  .app-container {
    padding: max(4px, env(safe-area-inset-top)) 8px max(8px, env(safe-area-inset-bottom));
    gap: 3px;
    justify-content: space-between;
  }

  .header-top {
    gap: 3px;
  }

  .game-title {
    font-size: 0.94rem;
    gap: 3px;
  }

  .title-icon {
    width: 18px;
    height: 18px;
    font-size: 0.68rem;
  }

  .version-badge {
    font-size: 0.58rem;
    padding: 1px 4px;
  }

  .header-right-group {
    gap: 3px;
  }

  .sound-toggle-btn {
    min-width: 0;
    min-height: 36px;
    padding: 4px 6px;
    font-size: 0.64rem;
  }

  .lang-toggle-btn {
    min-height: 34px;
    padding: 3px 6px;
    font-size: 0.64rem;
  }

  .mobile-help-btn {
    min-height: 34px;
    padding: 3px 8px;
    font-size: 0.68rem;
  }

  .game-mode-tab {
    padding: 5px 4px;
    font-size: 0.78rem;
  }

  .ranking-panel {
    padding: 3px 8px;
  }

  .stats-bar {
    gap: 6px;
  }

  .stat-box {
    padding: 3px 6px;
  }

  .stat-value {
    font-size: 1.16rem;
  }

  .mascot-guide-bar {
    padding: 4px 8px;
    flex-shrink: 0;
  }

  .mascot-speech-text {
    font-size: 0.74rem;
  }

  .dial-section {
    flex: 1 1 auto;
    min-height: 0;
    padding: 2px;
    margin: 0;
    overflow: visible;
  }

  /* 円盤の直径を画面の残り高さ(44dvh)以内に制限し、上部のマスコットバーや下部の操作ボタンと絶対に重ならないようにする */
  .dial-wrapper {
    width: min(78vw, 44dvh, 290px);
    height: min(78vw, 44dvh, 290px);
    min-width: 190px;
    min-height: 190px;
  }

  .combo-milestone-banner {
    top: -2px;
  }

  .controls-bar {
    flex-shrink: 0;
    padding-top: 2px;
  }

  .controls-group-3 .btn {
    padding: 8px 4px;
    font-size: 0.78rem;
  }
}

@media (max-width: 600px) and (max-height: 700px) {
  .dial-wrapper {
    width: min(72vw, 41dvh, 250px);
    height: min(72vw, 41dvh, 250px);
    min-width: 175px;
    min-height: 175px;
  }
}


/* =========================================================
   くるくる10 v10 一括改善版 スタイル定義
   - 改善①：大きく押しやすい「ゲームモード」「練習モード」2ボタン＆下側へ移動した控えめな自己ベスト表示（練習中は非表示）
   - 改善②：円盤全体の拡大（最大340px / 54dvh）＆中央円の拡大（r=58/55、文字も拡大）
   - 改善③：達成文字（GOOD!, SUPER FAST!, 3〜6 TAPS!, OVER!）を中央円の内側（width/height: 35.5% 円形領域）だけに完全クリップし、
             アニメーション中も周囲の数字マスへ絶対にはみ出さない設計
   - 改善④：実際の円盤上で揺れる人差し指アイコン（👆）と1行体験ガイドバー
   - 改善⑤：ゲームモード中の練習モード切替確認モーダル
   ========================================================= */

/* 改善①：「ゲームモード」「練習モード」を最優先で見やすく押しやすい大型タブに設計 */
.mode-selector-bar {
  padding: 2px 0;
  background: transparent;
  border: none;
}

.game-mode-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  width: 100%;
}

.game-mode-tab {
  appearance: none;
  min-height: 44px;
  padding: 8px 10px;
  font-size: 0.98rem !important;
  font-weight: 900;
  letter-spacing: 0.02em;
  color: #475569;
  background: #f1f5f9;
  border: 2px solid #cbd5e1;
  border-radius: 12px;
  cursor: pointer;
  touch-action: manipulation;
  box-shadow: 0 2px 0 #cbd5e1;
  transition: transform 0.08s ease, background 0.12s ease;
}

.game-mode-tab.active-mode {
  color: #ffffff;
  background: linear-gradient(180deg, #0284c7 0%, #0369a1 100%);
  border-color: #075985;
  box-shadow: 0 3px 0 #0c4a6e, 0 4px 10px rgba(2, 132, 199, 0.28);
}

#game-mode-practice-btn.active-mode {
  background: linear-gradient(180deg, #10b981 0%, #059669 100%);
  border-color: #047857;
  box-shadow: 0 3px 0 #064e3b, 0 4px 10px rgba(5, 150, 105, 0.28);
}

/* 改善①：画面下側へ移動した控えめな自己ベスト表示（現在スコアより控えめにし、下部ボタンの邪魔をしない） */
.ranking-panel.ranking-panel-bottom {
  background: rgba(254, 252, 232, 0.85);
  border: 1px solid #fde047;
  border-radius: 8px;
  padding: 3px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  box-shadow: none;
  flex-shrink: 0;
}

.ranking-panel.ranking-panel-bottom.hidden {
  display: none !important;
}

.ranking-panel-bottom .ranking-header {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0;
}

.ranking-panel-bottom .ranking-title {
  font-size: 0.7rem;
  font-weight: 800;
  color: #a16207;
}

.ranking-panel-bottom .ranking-columns {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ranking-panel-bottom .ranking-col {
  background: transparent;
  border: none;
  padding: 0;
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.ranking-panel-bottom .ranking-col-title {
  font-size: 0.68rem;
  font-weight: 700;
  color: #a16207;
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.ranking-panel-bottom .ranking-col-title::after {
  content: ":";
}

.ranking-panel-bottom .ranking-list li:nth-child(2),
.ranking-panel-bottom .ranking-list li:nth-child(3),
.ranking-panel-bottom .ranking-list li .rank-Pos {
  display: none;
}

.ranking-panel-bottom .ranking-list li {
  font-size: 0.76rem;
  line-height: 1.1;
}

.ranking-panel-bottom .rank-val {
  font-weight: 800;
  color: #334155;
}

/* 改善②：円盤全体の拡大と中央円の文字サイズ拡大 */
.dial-wrapper {
  width: 320px;
  height: 320px;
}

.dial-number {
  font-size: 44px !important;
}

.center-needed-svg-text {
  font-size: 25px !important;
}

.center-combo-num {
  font-size: 20px !important;
}

.center-combo-label {
  font-size: 14px !important;
}

.center-start-title {
  font-size: 23px !important;
}

.center-start-sub {
  font-size: 15px !important;
}

/* 改善③：達成文字（GOOD!, SUPER FAST!, 3〜6 TAPS!, OVER!）を中央円（r=55 / 150 = 直径36.6%）の
   内側だけに完全クリップして表示し、周囲の数字マスへ絶対にはみ出さない設計 */
.bonus-popup-banner.center-circle-clipped-popup {
  position: absolute;
  top: 50% !important;
  left: 50% !important;
  width: 35.2% !important;
  height: 35.2% !important;
  max-width: 35.2% !important;
  max-height: 35.2% !important;
  border-radius: 50% !important;
  overflow: hidden !important;
  transform: translate(-50%, -50%) scale(1);
  pointer-events: none !important;
  z-index: 28;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.97) 0%, rgba(254, 249, 195, 0.96) 100%);
  border: 2.5px solid #f59e0b;
  box-shadow: inset 0 0 8px rgba(250, 204, 21, 0.45);
  padding: 4px;
  text-align: center;
}

.bonus-popup-banner.center-circle-clipped-popup .bonus-popup-taps {
  display: block;
  max-width: 96%;
  font-size: 1.05rem;
  line-height: 1.1;
  padding: 2px 6px;
  font-weight: 900;
  color: #ffffff;
  background: linear-gradient(135deg, #ec4899 0%, #7c3aed 100%);
  border: 1.5px solid #fde047;
  border-radius: 999px;
  box-shadow: 0 2px 5px rgba(15, 23, 42, 0.25);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bonus-popup-banner.center-circle-clipped-popup .bonus-popup-speed {
  display: block;
  max-width: 96%;
  font-size: 0.78rem;
  line-height: 1.1;
  padding: 1px 6px;
  font-weight: 900;
  color: #ffffff;
  background: linear-gradient(135deg, #f97316 0%, #dc2626 100%);
  border-radius: 999px;
  white-space: nowrap;
}

.bonus-popup-banner.center-circle-clipped-popup .bonus-popup-time {
  display: block;
  max-width: 92%;
  font-size: 0.74rem;
  line-height: 1.05;
  padding: 1px 5px;
  font-weight: 900;
  color: #064e3b;
  background: #a7f3d0;
  border-radius: 999px;
  white-space: nowrap;
}

/* 同時表示（複数行）や長い文字（SUPER FAST!）のときは文字サイズを自動縮小して中央円内に確実に収める */
.bonus-popup-banner.center-circle-clipped-popup.center-multiline .bonus-popup-taps {
  font-size: 0.82rem;
  padding: 1px 5px;
}

.bonus-popup-banner.center-circle-clipped-popup.center-long-text .bonus-popup-taps,
.bonus-popup-banner.center-circle-clipped-popup.center-long-text .bonus-popup-speed {
  font-size: 0.72rem;
  padding: 1px 4px;
}

.bonus-popup-banner.center-circle-clipped-popup.bonus-popup-active {
  animation: centerCircleContainedPop 0.88s cubic-bezier(0.18, 0.89, 0.32, 1.18) forwards !important;
}

.over-popup-banner.center-circle-clipped-popup {
  position: absolute;
  top: 50% !important;
  left: 50% !important;
  width: 35.2% !important;
  height: 35.2% !important;
  max-width: 35.2% !important;
  max-height: 35.2% !important;
  border-radius: 50% !important;
  overflow: hidden !important;
  transform: translate(-50%, -50%) scale(1);
  pointer-events: none !important;
  z-index: 29;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.18rem;
  font-weight: 900;
  color: #ffffff;
  background: radial-gradient(circle, #ef4444 0%, #991b1b 100%);
  border: 2.5px solid #fde047;
}

.over-popup-banner.center-circle-clipped-popup.over-popup-active {
  animation: centerCircleContainedPop 0.92s cubic-bezier(0.18, 0.89, 0.32, 1.18) forwards !important;
}

/* アニメーションの最大スケールも 1.0 倍以内に抑え、中央円から1ピクセルも外へ出ない */
@keyframes centerCircleContainedPop {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.55);
  }
  22% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.0);
  }
  78% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.0);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.92);
  }
}

/* 改善④：実際の円盤上で揺れる指アイコン（👆）と体験型「遊び方」案内バー */
.guide-instruction-bar {
  background: linear-gradient(135deg, #fff1f2 0%, #fef9c3 100%);
  border: 2px solid #f43f5e;
  border-radius: 10px;
  padding: 5px 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex-shrink: 0;
}

.guide-instruction-bar.hidden {
  display: none !important;
}

.guide-bar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.guide-stage-badge {
  flex: 0 0 auto;
  font-size: 0.72rem;
  font-weight: 900;
  color: #ffffff;
  background: #e11d48;
  padding: 2px 7px;
  border-radius: 999px;
}

.guide-prompt-text {
  flex: 1 1 auto;
  font-size: 0.78rem;
  font-weight: 900;
  color: #881337;
  line-height: 1.3;
}

.guide-exit-btn {
  flex: 0 0 auto;
  appearance: none;
  background: #ffffff;
  border: 1.5px solid #fda4af;
  color: #be123c;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 3px 7px;
  border-radius: 6px;
  cursor: pointer;
}

.guide-finish-btn {
  width: 100%;
  background: linear-gradient(180deg, #10b981 0%, #059669 100%);
  border-color: #047857;
  color: #ffffff;
  padding: 6px 10px;
  font-size: 0.84rem;
}

.guide-finish-btn.hidden {
  display: none !important;
}

.practice-notice-bar {
  background: #fff1f2;
  border: 1.5px solid #fda4af;
  border-radius: 8px;
  padding: 3px 8px;
  text-align: center;
  flex-shrink: 0;
}

.practice-notice-bar.hidden {
  display: none !important;
}

.practice-notice-text {
  font-size: 0.76rem;
  font-weight: 900;
  color: #be123c;
}

/* 円盤上のターゲット数字を指す揺れる人差し指アイコン（👆） */
.finger-guide-pointer {
  position: absolute;
  transform: translate(-50%, -12%);
  pointer-events: none !important;
  z-index: 32;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: fingerTapBounce 0.75s ease-in-out infinite;
}

.finger-guide-pointer.hidden {
  display: none !important;
}

.finger-emoji {
  font-size: 1.85rem;
  line-height: 1;
  filter: drop-shadow(0 3px 6px rgba(15, 23, 42, 0.45));
}

.finger-caption {
  font-size: 0.68rem;
  font-weight: 900;
  color: #ffffff;
  background: #e11d48;
  border: 1.5px solid #fde047;
  border-radius: 999px;
  padding: 1px 7px;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.35);
}

/* 左下の「捨てる」ボタンを指す揺れる人差し指アイコン */
.discard-btn-wrapper {
  position: relative;
  display: flex;
  flex-direction: column;
}

.discard-btn-wrapper .btn-discard {
  width: 100%;
}

.btn-discard.discard-guide-highlight {
  background: linear-gradient(180deg, #fecdd3 0%, #fda4af 100%) !important;
  border-color: #dc2626 !important;
  border-width: 2.5px !important;
  color: #881337 !important;
}

.discard-finger-pointer {
  position: absolute;
  bottom: calc(100% + 2px);
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none !important;
  z-index: 35;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: discardFingerBounce 0.75s ease-in-out infinite;
}

.discard-finger-pointer.hidden {
  display: none !important;
}

@keyframes fingerTapBounce {
  0%, 100% {
    transform: translate(-50%, -8%) scale(1);
  }
  50% {
    transform: translate(-50%, 6%) scale(1.12);
  }
}

@keyframes discardFingerBounce {
  0%, 100% {
    transform: translateX(-50%) translateY(0) scale(1);
  }
  50% {
    transform: translateX(-50%) translateY(-8px) scale(1.1);
  }
}

/* 改善⑤：ゲームモード中に練習モードボタンを押した際の切替確認モーダル */
.mode-switch-modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.72);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 16px;
  z-index: 110;
}

.mode-switch-modal.hidden {
  display: none !important;
}

.mode-switch-card {
  width: 100%;
  max-width: 340px;
  background: #ffffff;
  border: 3px solid #38bdf8;
  border-radius: 16px;
  padding: 18px 16px;
  text-align: center;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.35);
}

.mode-switch-msg {
  font-size: 0.98rem;
  font-weight: 900;
  color: #0f172a;
  line-height: 1.45;
  margin-bottom: 14px;
}

.mode-switch-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* 改善②：iPhone標準サイズ（390x844）・小型サイズ（375x667）・Safariツールバー表示時のレスポンシブ調整
   上部のマスコット枠を整理し自己ベストを下側へスリム化したことで生まれた縦余白を最大限活用して円盤を大きく表示！ */
@media (max-width: 600px) {
  .app-container {
    padding: max(4px, env(safe-area-inset-top)) 8px max(8px, env(safe-area-inset-bottom));
    gap: 4px;
    justify-content: space-between;
  }

  .game-mode-tab {
    min-height: 42px;
    padding: 6px 8px;
    font-size: 0.94rem !important;
  }

  .stats-bar {
    gap: 6px;
  }

  .stat-box {
    padding: 3px 6px;
  }

  .stat-value {
    font-size: 1.2rem;
  }

  .dial-section {
    flex: 1 1 auto;
    min-height: 0;
    padding: 2px;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  /* v9の min(78vw, 44dvh, 290px) から min(92vw, 54dvh, 345px) へと大幅に拡大しつつ、下部ボタンと重ならない！ */
  .dial-wrapper {
    width: min(92vw, 54dvh, 345px);
    height: min(92vw, 54dvh, 345px);
    min-width: 220px;
    min-height: 220px;
  }
}

@media (max-width: 600px) and (max-height: 700px) {
  .dial-wrapper {
    width: min(86vw, 49dvh, 295px);
    height: min(86vw, 49dvh, 295px);
    min-width: 200px;
    min-height: 200px;
  }
}

/* =========================================================
   くるくる10 v11 一括改善版 追加スタイル定義
   - 改善①：ゲームオーバー後・プレイ中どこから「遊び方」を開いても結果画面と重ならないレイアウト
   - 改善②：中央「スタート」から開始＆初心者が一目でわかる大型人差し指アイコン（👆 / 👇）と「ここを押す」ラベル
   - 改善③：獲得した時間ボーナス「＋1.2秒！」等が円盤中央付近から上部の残り時間表示へスーッと上昇しながらフェードアウトする独立演出
   - 改善⑤：プレイ中の円盤中心座標・直径の完全固定（バッジ出現や通知バーによるレイアウトシフトをゼロに抑制）
   - 改善⑥：終了画面の「今回遊べた時間」「最長プレイ記録」「最長プレイ時間更新！」表示
   ========================================================= */

/* 改善⑤：プレイ中に上部の残り時間バッジや練習通知バーが出現しても、統計ボックスや円盤の中心位置が1pxも動かないよう固定 */
.stat-box-time .stat-value {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  min-width: 72px;
  font-variant-numeric: tabular-nums;
}

.stat-box-time .time-extend-badge {
  position: absolute;
  left: calc(100% + 2px);
  top: 50%;
  transform: translateY(-50%);
  margin-left: 0 !important;
  white-space: nowrap;
  z-index: 20;
  pointer-events: none !important;
}

.stat-box-score .stat-value {
  font-variant-numeric: tabular-nums;
  min-width: 64px;
  display: inline-block;
}

.dial-section {
  position: relative;
  flex: 1 1 auto;
  display: flex;
  justify-content: center;
  align-items: center;
}

.dial-wrapper {
  flex: 0 0 auto;
  will-change: auto;
  transform: translateZ(0);
}

/* 練習モードの手詰まり通知バーを円盤セクション上部の絶対配置オーバーレイにし、出現しても円盤の中心Y座標を動かさない */
.dial-section > .practice-notice-bar {
  position: absolute;
  top: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 94%;
  max-width: 350px;
  z-index: 30;
  pointer-events: none;
  box-shadow: 0 3px 8px rgba(190, 18, 60, 0.16);
}

/* 改善②：大型化した人差し指アイコン（👆）と「ここを押す」「スタートを押す」ラベル
   指先（上端）がターゲット座標（left, top）の真下すぐ近くを指し、かつ数字文字そのものを覆い隠さない設計 */
.finger-guide-pointer {
  position: absolute;
  transform: translate(-50%, 10px);
  pointer-events: none !important;
  z-index: 36;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 96px;
  min-height: 76px;
  animation: fingerTapBounceV11 0.72s ease-in-out infinite !important;
}

/* 下端のセクター3（y=82.2%）では画面下端や自己ベストバーと重ならないよう少し内側にオフセット */
.finger-guide-pointer[data-align="above"] {
  transform: translate(-50%, -22px);
  animation: fingerTapBounceAboveV11 0.72s ease-in-out infinite !important;
}

/* 中央の「スタート」ボタンを指すときも中央円の下半分から「スタート」文字を隠さずに明確に指す */
.finger-guide-pointer[data-target-type="start"] {
  transform: translate(-50%, 14px);
}

.finger-target-ring {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 3.5px dashed #e11d48;
  background: rgba(254, 240, 138, 0.22);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.8), 0 0 14px rgba(225, 29, 72, 0.45);
  position: absolute;
  top: -38px;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
  animation: fingerTargetPulseV11 1.1s ease-in-out infinite;
}

.finger-guide-pointer[data-target-type="start"] .finger-target-ring {
  width: 94px;
  height: 94px;
  top: -62px;
  border-width: 4px;
  border-color: #fde047;
  box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.9), 0 0 18px rgba(250, 204, 21, 0.75);
}

.finger-emoji {
  font-size: 3.05rem !important;
  line-height: 1 !important;
  filter: drop-shadow(0 4px 8px rgba(15, 23, 42, 0.55)) !important;
}

.finger-caption {
  font-size: 0.86rem !important;
  font-weight: 900 !important;
  color: #ffffff !important;
  background: linear-gradient(135deg, #e11d48 0%, #be123c 100%) !important;
  border: 2.5px solid #fde047 !important;
  border-radius: 999px !important;
  padding: 3px 12px !important;
  margin-top: 2px;
  white-space: nowrap;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.45) !important;
  letter-spacing: 0.02em;
}

/* 左下の「捨てる」ボタンを上から下向き（👇）に指す大型指アイコン */
.discard-finger-pointer {
  position: absolute;
  bottom: calc(100% + 4px) !important;
  left: 50% !important;
  transform: translateX(-50%);
  pointer-events: none !important;
  z-index: 38;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 104px;
  animation: discardFingerBounceV11 0.72s ease-in-out infinite !important;
}

.discard-finger-down {
  font-size: 2.85rem !important;
  line-height: 1 !important;
}

.center-start-group.guide-start-target .center-start-outer {
  stroke: #e11d48 !important;
  stroke-width: 5px !important;
}

@keyframes fingerTapBounceV11 {
  0%, 100% {
    transform: translate(-50%, 10px) scale(1);
  }
  50% {
    transform: translate(-50%, 0px) scale(1.1);
  }
}

@keyframes fingerTapBounceAboveV11 {
  0%, 100% {
    transform: translate(-50%, -16px) scale(1);
  }
  50% {
    transform: translate(-50%, -26px) scale(1.1);
  }
}

@keyframes discardFingerBounceV11 {
  0%, 100% {
    transform: translateX(-50%) translateY(0px) scale(1);
  }
  50% {
    transform: translateX(-50%) translateY(-10px) scale(1.1);
  }
}

@keyframes fingerTargetPulseV11 {
  0%, 100% {
    transform: translateX(-50%) scale(0.95);
    opacity: 0.85;
  }
  50% {
    transform: translateX(-50%) scale(1.06);
    opacity: 1;
  }
}

/* 改善③：獲得した時間ボーナス（「＋1.2秒！」等）が円盤中央付近に大きくパッと現れ、
   画面上部の残り時間表示の方向へスーッと上昇しながら徐々に透明になって消える独立演出 */
.time-bonus-float-popup {
  position: absolute;
  left: 50%;
  top: 40%;
  transform: translate(-50%, -50%);
  pointer-events: none !important;
  z-index: 34;
  font-size: 1.72rem;
  font-weight: 900;
  color: #fef08a;
  background: linear-gradient(135deg, rgba(5, 150, 105, 0.96) 0%, rgba(4, 120, 87, 0.96) 100%);
  border: 3px solid #fde047;
  border-radius: 999px;
  padding: 5px 18px;
  white-space: nowrap;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.42), 0 0 14px rgba(52, 211, 153, 0.65);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.55);
  letter-spacing: 0.03em;
}

.time-bonus-float-popup.hidden {
  display: none !important;
}

.time-bonus-float-popup.time-bonus-float-active {
  animation: timeBonusRiseAndFade 1.02s cubic-bezier(0.16, 0.84, 0.32, 1) forwards !important;
}

@keyframes timeBonusRiseAndFade {
  0% {
    opacity: 0;
    transform: translate(-50%, 6px) scale(0.55);
  }
  16% {
    opacity: 1;
    transform: translate(-50%, -14px) scale(1.12);
  }
  30% {
    opacity: 1;
    transform: translate(-50%, -32px) scale(1.02);
  }
  72% {
    opacity: 0.92;
    transform: translate(-50%, -96px) scale(1.0);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -148px) scale(0.92);
  }
}

/* 改善⑥：終了画面の「今回遊べた時間」「最長プレイ記録」「最長プレイ時間更新！」バナー */
.result-card {
  padding: 12px 14px !important;
}

.result-card h2 {
  font-size: 1.42rem !important;
  margin-bottom: 2px !important;
}

.result-mode-label {
  margin-bottom: 4px !important;
}

.result-row {
  font-size: 0.95rem !important;
  margin-bottom: 3px !important;
}

.result-row-duration strong {
  color: #fde047;
  font-size: 1.05rem;
}

.result-row-best-duration {
  font-size: 0.84rem !important;
  color: #cbd5e1;
}

.result-row-best-duration strong {
  color: #38bdf8;
}

.duration-record-banner {
  background: linear-gradient(135deg, #10b981 0%, #0284c7 100%);
  color: #ffffff;
  border: 1.5px solid #fde047;
  font-size: 0.76rem;
  font-weight: 900;
  padding: 3px 10px;
  border-radius: 999px;
  margin: 2px auto 6px;
  display: inline-block;
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.45);
}

.duration-record-banner.hidden {
  display: none !important;
}

.ranking-panel-bottom .ranking-columns {
  gap: 8px !important;
}

/* =========================================================
   くるくる10 v12 一括改善版 追加・上書きスタイル定義
   - 改善①：時間ボーナス「＋1.2秒！」等を白色・半透明・背景なし・枠線なし（pointer-events: none）に変更
   - 改善②：指先の赤い点線リングを削除し、大型の黄色い人差し指アイコンとラベルのみで明確に案内
   - 改善③：遊び方の赤い四角い説明ボックス・ステップ番号・終了ボタンを廃止し、円盤上部に大きな文字で直接案内（右下の「やめる」で終了）
   - 改善④：ゲーム終了画面を「TIME UP!」「NEW RECORD!(更新時1つのみ)」「今回のスコア(最大強調)」「最大コンボ」「今回遊べた時間」に大幅整理
   - 改善⑤：ゲームモード中、円盤のすぐ下に3列独立カードで「最高スコア」「最大コンボ」「最長時間」の数字を大きく見やすく配置（終了画面・練習中は非表示）
   - 改善⑥：終了画面の「もう一度挑戦」（赤色）と待機画面の中央「スタート」に穏やかな脈動アニメーションを追加（prefers-reduced-motion対応）
   - 改善⑦：5コンボごとの達成表示（「5コンボ達成！」等）を大型化し、円盤に近い位置で爽快に表示（数字を隠さず操作も妨げず円盤位置も固定）
   ========================================================= */

/* 改善①：時間ボーナス表示を白色・半透明・背景なし・吹き出しなし・枠線なしに変更（文字サイズ 1.72rem 維持、背後の数字が透けてタップも一切妨げない） */
.time-bonus-float-popup {
  position: absolute;
  left: 50%;
  top: 40%;
  transform: translate(-50%, -50%);
  pointer-events: none !important;
  user-select: none !important;
  z-index: 34;
  font-size: 1.72rem !important;
  font-weight: 900 !important;
  color: rgba(255, 255, 255, 0.86) !important;
  background: transparent !important;
  background-image: none !important;
  border: none !important;
  border-radius: 0 !important;
  padding: 0 !important;
  box-shadow: none !important;
  text-shadow:
    0 2px 6px rgba(15, 23, 42, 0.62),
    0 0 10px rgba(2, 132, 199, 0.45) !important;
  white-space: nowrap;
  letter-spacing: 0.03em;
}

.time-bonus-float-popup.hidden {
  display: none !important;
}

.time-bonus-float-popup.time-bonus-float-active {
  animation: timeBonusRiseAndFadeV12 1.02s cubic-bezier(0.16, 0.84, 0.32, 1) forwards !important;
}

@keyframes timeBonusRiseAndFadeV12 {
  0% {
    opacity: 0;
    transform: translate(-50%, 6px) scale(0.65);
  }
  16% {
    opacity: 0.9;
    transform: translate(-50%, -14px) scale(1.08);
  }
  32% {
    opacity: 0.86;
    transform: translate(-50%, -34px) scale(1.0);
  }
  72% {
    opacity: 0.68;
    transform: translate(-50%, -98px) scale(1.0);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -148px) scale(0.95);
  }
}

/* 改善②：赤い点線リングを完全削除（DOM上からも削除済みだが念のため display: none 保証） */
.finger-target-ring {
  display: none !important;
}

/* 改善③：遊び方の説明表示を全面的に簡素化（赤い四角いボックスやステップ番号を廃止し、円盤上部に大きな文字で直接表示） */
.guide-direct-overlay {
  position: absolute;
  top: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 96%;
  max-width: 368px;
  z-index: 33;
  pointer-events: none !important;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  text-align: center;
}

.guide-direct-overlay.hidden,
.guide-stage-badge,
.guide-exit-btn,
.guide-stage-badge.hidden,
.guide-exit-btn.hidden,
.guide-finish-btn.hidden {
  display: none !important;
}

.guide-direct-text {
  font-size: 1.28rem !important;
  font-weight: 900 !important;
  color: #881337 !important;
  line-height: 1.28 !important;
  letter-spacing: 0.02em;
  text-shadow:
    -2px -2px 0 #ffffff,
     2px -2px 0 #ffffff,
    -2px  2px 0 #ffffff,
     2px  2px 0 #ffffff,
     0 3px 8px rgba(255, 255, 255, 0.95),
     0 4px 12px rgba(15, 23, 42, 0.22);
  pointer-events: none !important;
}

.guide-direct-overlay .guide-finish-btn {
  pointer-events: auto !important;
  width: auto !important;
  min-width: 180px;
  margin-top: 2px;
  padding: 8px 18px !important;
  font-size: 0.96rem !important;
  border-radius: 999px !important;
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.35);
}

/* 改善④：ゲーム終了画面の大幅簡素化（TIME UP! / NEW RECORD! / 今回のスコア最大強調 / 最大コンボ / 今回遊べた時間） */
.result-card.result-card-v12 {
  width: 92% !important;
  max-width: 288px;
  padding: 10px 12px !important;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.result-title-v12 {
  font-size: 1.48rem !important;
  font-weight: 900;
  color: #fde047;
  margin: 0 !important;
  line-height: 1.1;
  letter-spacing: 0.04em;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}

.new-record-banner {
  display: inline-block;
  font-size: 0.88rem;
  font-weight: 900;
  color: #ffffff;
  background: linear-gradient(135deg, #ef4444 0%, #f59e0b 100%);
  border: 2px solid #fde047;
  border-radius: 999px;
  padding: 2px 14px;
  margin: 0;
  letter-spacing: 0.06em;
  box-shadow: 0 3px 10px rgba(239, 68, 68, 0.5);
}

.new-record-banner.hidden {
  display: none !important;
}

.result-score-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  border: 1.5px solid rgba(253, 224, 71, 0.45);
  border-radius: 14px;
  padding: 5px 14px;
  width: 92%;
  margin: 2px 0;
}

.result-score-caption {
  font-size: 0.76rem;
  font-weight: 800;
  color: #e2e8f0;
  line-height: 1.15;
}

.result-score-big {
  font-size: 1.95rem !important;
  font-weight: 900;
  color: #fde047;
  line-height: 1.12;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.55);
}

.result-sub-metrics {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 92%;
}

.result-row.result-row-v12 {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  font-size: 0.88rem !important;
  color: #cbd5e1;
  margin: 0 !important;
  padding: 1px 4px;
}

.result-row.result-row-v12 strong {
  font-size: 1.02rem;
  font-weight: 900;
  color: #ffffff;
  font-variant-numeric: tabular-nums;
}

/* 改善⑤：自己ベスト欄を円盤のすぐ下に3列独立カードとして配置し、文字・数字を大きく読みやすく改善 */
.ranking-panel.ranking-panel-v12 {
  background: linear-gradient(180deg, rgba(255, 251, 235, 0.96) 0%, rgba(254, 243, 199, 0.94) 100%) !important;
  border: 2px solid #fcd34d !important;
  border-radius: 12px !important;
  padding: 5px 8px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 3px !important;
  box-shadow: 0 3px 10px rgba(217, 119, 6, 0.1) !important;
  flex-shrink: 0;
}

.ranking-panel.ranking-panel-v12.hidden {
  display: none !important;
}

.ranking-panel-v12 .ranking-header {
  display: none !important;
}

.ranking-panel-v12 .ranking-columns-v12 {
  display: grid !important;
  grid-template-columns: 1.15fr 1fr 0.95fr !important;
  gap: 6px !important;
  width: 100%;
}

.ranking-panel-v12 .ranking-card-v12 {
  background: #ffffff !important;
  border: 1.5px solid #fde68a !important;
  border-radius: 9px !important;
  padding: 4px 4px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 1px !important;
  text-align: center;
}

.ranking-panel-v12 .ranking-col-title {
  font-size: 0.72rem !important;
  font-weight: 800 !important;
  color: #b45309 !important;
  line-height: 1.1 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
}

.ranking-panel-v12 .ranking-col-title::after {
  content: none !important;
}

.ranking-panel-v12 .ranking-list li {
  justify-content: center !important;
  font-size: 1.02rem !important;
  line-height: 1.15 !important;
}

.ranking-panel-v12 .rank-val {
  font-size: 1.04rem !important;
  font-weight: 900 !important;
  color: #0f172a !important;
  font-variant-numeric: tabular-nums;
}

/* 改善⑥：終了画面の「もう一度挑戦」を鮮やかな赤色＋穏やかな脈動アニメーションに変更、
   および開始待ち画面の円盤中央「スタート」にも穏やかな脈動アニメーションを付与 */
#overlay-restart-btn,
.btn-retry-red-pulse {
  background: linear-gradient(180deg, #ef4444 0%, #dc2626 100%) !important;
  border-color: #991b1b !important;
  color: #ffffff !important;
  box-shadow: 0 3px 0 #7f1d1d, 0 5px 14px rgba(220, 38, 38, 0.38) !important;
}

.btn-retry-red-pulse {
  animation: retryButtonGentlePulseV12 1.5s ease-in-out infinite;
}

@keyframes retryButtonGentlePulseV12 {
  0%, 100% {
    transform: scale(1);
    filter: brightness(1);
  }
  50% {
    transform: scale(1.045);
    filter: brightness(1.08);
  }
}

.center-start-group {
  transform-box: fill-box;
  transform-origin: center center;
}

.center-start-group.start-pulse-active {
  animation: centerStartButtonPulseV12 1.6s ease-in-out infinite;
}

@keyframes centerStartButtonPulseV12 {
  0%, 100% {
    transform: scale(1);
    filter: brightness(1);
  }
  50% {
    transform: scale(1.045);
    filter: brightness(1.08);
  }
}

/* OSの「視差効果を減らす（prefers-reduced-motion: reduce）」設定への配慮 */
@media (prefers-reduced-motion: reduce) {
  .btn-retry-red-pulse,
  .center-start-group.start-pulse-active,
  .center-start-group.start-gentle-glow .center-start-outer {
    animation: none !important;
    transform: none !important;
  }
}

/* 改善⑦：5コンボごとの達成表示（「5コンボ達成！」等）を大型化し、円盤に近い位置で達成時にパッと爽快に表示 */
.combo-milestone-banner.banner-large-v12 {
  position: absolute;
  top: 6px !important;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none !important;
  z-index: 25;
}

.combo-milestone-banner.banner-large-v12.banner-persistent .combo-milestone-text {
  font-size: 1.38rem !important;
  font-weight: 900 !important;
  padding: 4px 18px !important;
  color: #fef08a !important;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.88) 0%, rgba(30, 58, 138, 0.9) 100%) !important;
  border: 2.5px solid #fde047 !important;
  border-radius: 999px !important;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.35) !important;
  letter-spacing: 0.04em;
}

.combo-milestone-banner.banner-large-v12.milestone-pop-in .combo-milestone-text {
  animation: milestoneLargePopInV12 0.34s cubic-bezier(0.18, 0.89, 0.32, 1.28) forwards !important;
}

@keyframes milestoneLargePopInV12 {
  0% {
    transform: scale(0.65);
  }
  65% {
    transform: scale(1.12);
  }
  100% {
    transform: scale(1);
  }
}

/* 小型画面（375x667等）でも円盤・大型自己ベスト・下部ボタンが重ならず1画面に美しく収まるレスポンシブ調整 */
@media (max-width: 600px) and (max-height: 700px) {
  .dial-wrapper {
    width: min(84vw, 46dvh, 282px);
    height: min(84vw, 46dvh, 282px);
    min-width: 200px;
    min-height: 200px;
  }

  .ranking-panel.ranking-panel-v12 {
    padding: 4px 6px !important;
  }

  .ranking-panel-v12 .ranking-card-v12 {
    padding: 3px 3px !important;
  }

  .ranking-panel-v12 .ranking-col-title {
    font-size: 0.68rem !important;
  }

  .ranking-panel-v12 .rank-val {
    font-size: 0.94rem !important;
  }

  .guide-direct-text {
    font-size: 1.12rem !important;
  }

  .combo-milestone-banner.banner-large-v12.banner-persistent .combo-milestone-text {
    font-size: 1.18rem !important;
    padding: 3px 14px !important;
  }
}

/* =========================================================
   くるくる10 v13 一括改善版 追加・上書きスタイル定義
   - 改善①：遊び方の案内文字をさらに大型化し、メイン円盤のすぐ近く（または円盤上）に配置（pointer-events: none）
   - 改善②：中央スタート直後に基本ルール説明「円の数字を押して、合計を10にしてね！」（ステップB）と「わかった！次へ ▶」を追加
   - 改善③：重要数字（「10」は赤＋大サイズ、押すべき数字「7」「3」「2」「1」等は黄色バッジ＋青太枠＋大サイズ、「3つ」「4つ」も強調）
   - 改善④：最終画面を4行大型説明（「30秒」青強調・「10」赤大サイズ）に刷新し、「ゲームへ戻る」ボタンを円盤の下側に大きく配置
   - 改善⑤：5コンボごとの達成表示（「5コンボ達成！」等）をさらに大きく（1.68rem）、円盤に近い中央寄りの位置へ下げて配置
   - 改善⑥：時間ボーナス（「＋1.2秒！」等）を黒い細い輪郭線だけの中抜き文字（内部完全透明、pointer-events: none）に変更
   ========================================================= */

.dial-wrapper {
  overflow: visible !important;
}

.guide-direct-overlay.hidden,
.guide-stage-badge,
.guide-exit-btn,
.guide-stage-badge.hidden,
.guide-exit-btn.hidden,
.guide-next-btn.hidden,
.guide-finish-btn.hidden {
  display: none !important;
}

/* 改善①〜④：#dial-hit-area を基準に円盤のすぐ近く・円盤上に大型配置する遊び方案内 */
.guide-overlay-v13 {
  position: absolute !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  width: 102% !important;
  max-width: 368px !important;
  z-index: 36 !important;
  pointer-events: none !important;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  text-align: center;
}

/* ステップA：「真ん中のスタートを押してね！」は青い中央スタート円のすぐ上（円盤内上部）に表示 */
.guide-overlay-v13[data-position-mode="above-start"] {
  top: 10% !important;
  bottom: auto !important;
  transform: translateX(-50%) !important;
}

/* ステップB：「円の数字を押して、合計を10にしてね！」基本ルール説明（円盤中央上部に大きく表示＋次へボタン） */
.guide-overlay-v13[data-position-mode="center-rule"] {
  top: 50% !important;
  bottom: auto !important;
  transform: translate(-50%, -50%) !important;
  width: 96% !important;
  background: rgba(255, 255, 255, 0.95) !important;
  border: 3px solid #0284c7 !important;
  border-radius: 18px !important;
  padding: 14px 12px !important;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.28) !important;
  gap: 10px !important;
}

/* ステップC〜F：数字タップ・捨てる案内はメイン円盤の外周上端に一部重なるすぐ近くの高さに大きく配置（上端の数字 7 / 1 は隠さない） */
.guide-overlay-v13[data-position-mode="near-dial-top"] {
  top: auto !important;
  bottom: calc(100% - 26px) !important;
  transform: translateX(-50%) !important;
}

/* ステップG：最終画面（4行の大型説明を円盤上に大きく重ね、「ゲームへ戻る」ボタンを円盤の下側に大きく配置） */
.guide-overlay-v13[data-position-mode="final-summary"] {
  inset: 0 !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  transform: none !important;
  justify-content: center !important;
  align-items: center !important;
}

.guide-overlay-v13 .guide-direct-text {
  font-size: 1.52rem !important;
  font-weight: 900 !important;
  color: #0f172a !important;
  line-height: 1.32 !important;
  letter-spacing: 0.02em;
  text-shadow:
    -2.5px -2.5px 0 #ffffff,
     2.5px -2.5px 0 #ffffff,
    -2.5px  2.5px 0 #ffffff,
     2.5px  2.5px 0 #ffffff,
     0 3px 10px rgba(255, 255, 255, 0.98),
     0 5px 14px rgba(15, 23, 42, 0.25) !important;
  pointer-events: none !important;
}

.guide-overlay-v13[data-position-mode="final-summary"] .guide-direct-text {
  width: 96% !important;
  background: rgba(255, 255, 255, 0.96) !important;
  border: 3px solid #38bdf8 !important;
  border-radius: 18px !important;
  padding: 14px 10px !important;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.28) !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 5px !important;
  font-size: 1.38rem !important;
  line-height: 1.34 !important;
}

.guide-final-line {
  display: block;
  width: 100%;
  text-align: center;
}

/* 改善③＆④：案内文中の重要数字の色と大きさ強調 */
.guide-hl-ten {
  display: inline-block;
  color: #dc2626 !important;
  font-size: 1.35em !important;
  font-weight: 900 !important;
  padding: 0 3px;
  text-shadow:
    -2px -2px 0 #ffffff,
     2px -2px 0 #ffffff,
    -2px  2px 0 #ffffff,
     2px  2px 0 #ffffff,
     0 2px 8px rgba(220, 38, 38, 0.28) !important;
}

.guide-hl-num {
  display: inline-block;
  color: #1d4ed8 !important;
  background: #fef08a !important;
  border: 2.5px solid #2563eb !important;
  border-radius: 9px !important;
  padding: 0 7px !important;
  margin: 0 2px !important;
  font-size: 1.26em !important;
  font-weight: 900 !important;
  line-height: 1.15 !important;
  text-shadow: none !important;
  box-shadow: 0 3px 8px rgba(37, 99, 235, 0.25) !important;
}

.guide-hl-count {
  display: inline-block;
  color: #0369a1 !important;
  font-size: 1.16em !important;
  font-weight: 900 !important;
  text-decoration: underline 3px #38bdf8;
  text-underline-offset: 3px;
}

.guide-hl-time {
  display: inline-block;
  color: #0369a1 !important;
  background: #e0f2fe !important;
  border: 2.5px solid #0284c7 !important;
  border-radius: 9px !important;
  padding: 0 7px !important;
  margin: 0 2px !important;
  font-size: 1.24em !important;
  font-weight: 900 !important;
  line-height: 1.15 !important;
  text-shadow: none !important;
}

.guide-hl-action {
  display: inline-block;
  color: #be123c !important;
  font-size: 1.12em !important;
  font-weight: 900 !important;
}

.guide-wrong-tap-sub {
  display: block;
  font-size: 0.78em !important;
  color: #dc2626 !important;
  margin-top: 2px;
}

/* ステップBの「わかった！次へ ▶」ボタン */
.guide-overlay-v13 .guide-next-btn {
  pointer-events: auto !important;
  width: auto !important;
  min-width: 210px !important;
  min-height: 46px !important;
  padding: 10px 22px !important;
  font-size: 1.16rem !important;
  font-weight: 900 !important;
  border-radius: 999px !important;
  background: linear-gradient(180deg, #0284c7 0%, #0369a1 100%) !important;
  border: 2px solid #075985 !important;
  color: #ffffff !important;
  box-shadow: 0 4px 0 #0c4a6e, 0 6px 16px rgba(2, 132, 199, 0.38) !important;
  animation: retryButtonGentlePulseV12 1.5s ease-in-out infinite;
}

/* 改善④：最終画面の「ゲームへ戻る」ボタンを円盤の下側に大きく配置 */
.guide-overlay-v13 .guide-finish-btn-v13 {
  pointer-events: auto !important;
  position: absolute !important;
  top: calc(100% + 8px) !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  width: 88% !important;
  max-width: 310px !important;
  min-width: 220px !important;
  min-height: 48px !important;
  margin: 0 !important;
  padding: 11px 24px !important;
  font-size: 1.24rem !important;
  font-weight: 900 !important;
  border-radius: 999px !important;
  background: linear-gradient(180deg, #10b981 0%, #059669 100%) !important;
  border: 2.5px solid #047857 !important;
  color: #ffffff !important;
  box-shadow: 0 4px 0 #065f46, 0 6px 16px rgba(5, 150, 105, 0.38) !important;
}

/* 改善⑤：5コンボごとの達成表示をさらに大きく（1.68rem）、円盤上端に近い中央寄りの位置へ配置（数字を隠さず操作も妨げない） */
.combo-milestone-banner.banner-large-v13 {
  position: absolute !important;
  top: -18px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  width: max-content !important;
  max-width: 96vw !important;
  pointer-events: none !important;
  z-index: 32 !important;
}

.combo-milestone-banner.banner-large-v13.banner-persistent .combo-milestone-text {
  font-size: 1.68rem !important;
  font-weight: 900 !important;
  padding: 6px 22px !important;
  color: #fef08a !important;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.92) 0%, rgba(30, 58, 138, 0.94) 100%) !important;
  border: 3px solid #fde047 !important;
  border-radius: 999px !important;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.38) !important;
  letter-spacing: 0.04em;
  white-space: nowrap !important;
}

/* 改善⑥：時間ボーナス（「＋1.2秒！」等）を黒い細い輪郭線だけの中抜き文字（内部完全透明・背景なし・枠なし）に変更 */
.time-bonus-float-popup {
  font-size: 1.72rem !important;
  font-weight: 900 !important;
  color: transparent !important;
  -webkit-text-fill-color: transparent !important;
  -webkit-text-stroke: 1.35px rgba(15, 23, 42, 0.92) !important;
  text-stroke: 1.35px rgba(15, 23, 42, 0.92) !important;
  background: transparent !important;
  background-image: none !important;
  border: none !important;
  box-shadow: none !important;
  text-shadow: none !important;
  padding: 0 !important;
  pointer-events: none !important;
  user-select: none !important;
}

/* 小型iPhone画面（375x667等）での見切れ防止・サイズ最適化 */
@media (max-width: 600px) and (max-height: 700px) {
  .guide-overlay-v13 .guide-direct-text {
    font-size: 1.32rem !important;
    line-height: 1.26 !important;
  }

  .guide-overlay-v13[data-position-mode="near-dial-top"] {
    bottom: calc(100% - 20px) !important;
  }

  .guide-overlay-v13[data-position-mode="final-summary"] .guide-direct-text {
    font-size: 1.18rem !important;
    padding: 10px 8px !important;
    gap: 3px !important;
  }

  .guide-overlay-v13 .guide-finish-btn-v13 {
    top: calc(100% + 5px) !important;
    min-height: 42px !important;
    padding: 8px 18px !important;
    font-size: 1.12rem !important;
  }

  .combo-milestone-banner.banner-large-v13 {
    top: -15px !important;
  }

  .combo-milestone-banner.banner-large-v13.banner-persistent .combo-milestone-text {
    font-size: 1.38rem !important;
    padding: 4px 16px !important;
  }
}

/* =========================================================
   くるくる10 v14 一括改善版 追加・上書きスタイル定義
   - 改善①：円盤中央の下段に「残り14.3秒」（練習モードでは「無制限」）を表示し、画面左上カードに「現在コンボ」、右上カードに「現在スコア」を配置
   - 改善②：5コンボごとの達成バナーを円盤外周に重ならない「円盤の直上（少し上）」へ移動（v13の大型文字サイズは維持、上端の数字マスを隠さない）
   - 改善③：時間ボーナス（「＋1.2秒！」等）の中抜き文字の輪郭色を黒から鮮やかな青（#1769E0 コバルトブルー）に変更（文字内部完全透明・背景なし・pointer-events: none）
   ========================================================= */

/* 改善①：画面上部の2列ステータスカード（左上：現在コンボ、右上：現在スコア） */
.stats-bar.stats-bar-v14 {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 8px !important;
  width: 100%;
  position: relative;
}

.stats-bar-v14 .stat-box {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
}

.stats-bar-v14 .stat-box-combo .stat-value {
  color: #b45309 !important;
  font-variant-numeric: tabular-nums;
}

.stats-bar-v14 .stat-box-score .stat-value {
  color: #0f172a !important;
  font-variant-numeric: tabular-nums;
}

.stats-bar-v14 .stat-value small {
  margin-left: 2px;
  font-weight: 800;
}

.stats-bar-v14 .time-extend-badge,
.stats-bar-v14 .sub-stat.hidden,
#center-combo-text,
.center-combo-row,
.center-combo-row.hidden {
  display: none !important;
}

/* 改善①：円盤中央（r=58/55）の上段「あと○」と下段「残り○秒」（練習時は「無制限」、100秒超でも見切れないサイズ設計） */
.center-needed-svg-text {
  font-size: 23.5px !important;
  font-weight: 900 !important;
  fill: #dc2626 !important;
  stroke: #ffffff !important;
  stroke-width: 2.2px !important;
  paint-order: stroke fill !important;
  font-variant-numeric: tabular-nums;
  pointer-events: none !important;
}

.center-time-svg-text {
  font-variant-numeric: tabular-nums;
  pointer-events: none !important;
}

.center-time-svg-text .center-time-prefix {
  font-size: 11.5px !important;
  font-weight: 800 !important;
  fill: #0369a1 !important;
  stroke: #ffffff !important;
  stroke-width: 1.5px !important;
  paint-order: stroke fill !important;
}

.center-time-svg-text .center-time-num {
  font-size: 18px !important;
  font-weight: 900 !important;
  fill: #0284c7 !important;
  stroke: #ffffff !important;
  stroke-width: 2.4px !important;
  paint-order: stroke fill !important;
  stroke-linejoin: round;
  font-variant-numeric: tabular-nums;
}

.center-time-svg-text .center-time-unit {
  font-size: 11.5px !important;
  font-weight: 800 !important;
  fill: #0369a1 !important;
  stroke: #ffffff !important;
  stroke-width: 1.5px !important;
  paint-order: stroke fill !important;
}

/* 残り時間が100秒を超えた場合（例：残り124.5秒）も中央円内（r=55）で見切れず周囲数字マスへ一切はみ出さない自動サイズ調整 */
.center-time-svg-text.time-over-100 .center-time-prefix,
.center-time-svg-text.time-over-100 .center-time-unit {
  font-size: 10px !important;
}

.center-time-svg-text.time-over-100 .center-time-num {
  font-size: 15.2px !important;
}

/* 練習モード時（「無制限」表示） */
.center-time-svg-text.time-practice-mode .center-time-num {
  font-size: 16.5px !important;
  fill: #059669 !important;
}

/* 時間ボーナス獲得時、中央の残り時間を揺らさず短く色強調する演出 */
.center-time-svg-text.time-bonus-gained .center-time-num,
.center-time-svg-text.time-bonus-gained .center-time-unit {
  fill: #059669 !important;
  stroke: #fef08a !important;
}

/* 改善②：5コンボごとの達成バナーを円盤外周（#dial-hit-area 上端）に重ならない「円盤の直上（少し上）」へ配置 */
.combo-milestone-banner.banner-large-v14 {
  position: absolute !important;
  top: auto !important;
  bottom: calc(100% + 10px) !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  width: max-content !important;
  max-width: 96vw !important;
  pointer-events: none !important;
  z-index: 32 !important;
}

.combo-milestone-banner.banner-large-v14.banner-persistent .combo-milestone-text {
  font-size: 1.68rem !important;
  font-weight: 900 !important;
  padding: 5px 22px !important;
  color: #fef08a !important;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.92) 0%, rgba(30, 58, 138, 0.94) 100%) !important;
  border: 3px solid #fde047 !important;
  border-radius: 999px !important;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.38) !important;
  letter-spacing: 0.04em;
  white-space: nowrap !important;
}

/* 改善③：時間ボーナスの中抜き文字の輪郭色を黒から鮮やかな青（#1769E0 コバルトブルー）に変更（内部完全透明維持） */
.time-bonus-float-popup {
  font-size: 1.72rem !important;
  font-weight: 900 !important;
  color: transparent !important;
  -webkit-text-fill-color: transparent !important;
  -webkit-text-stroke: 1.35px #1769E0 !important;
  text-stroke: 1.35px #1769E0 !important;
  background: transparent !important;
  background-image: none !important;
  border: none !important;
  box-shadow: none !important;
  text-shadow: none !important;
  padding: 0 !important;
  pointer-events: none !important;
  user-select: none !important;
}

/* 小型iPhone画面（375x667等）でも5コンボバナーが円盤外周および上部ステータスバーと重ならない位置調整 */
@media (max-width: 600px) and (max-height: 700px) {
  .combo-milestone-banner.banner-large-v14 {
    top: auto !important;
    bottom: calc(100% + 5px) !important;
  }

  .combo-milestone-banner.banner-large-v14.banner-persistent .combo-milestone-text {
    font-size: 1.38rem !important;
    padding: 3px 16px !important;
  }
}

/* =========================================================
   くるくる10 v15 一括改善版 追加・上書きスタイル定義
   - 改善1：円盤中央の上段を「残り29.5秒」（練習時は「無制限」）、下段を「あと10」に入れ替え
   - 改善2＆3：遊び方に「合計が10を超えるとリセット」「10を作れないときは『捨てる』」を組み込み、最終ボタンを「まずは練習モードへ！」に変更
   - 改善6：ゲーム終了後の「もう一度挑戦」ボタンの拡大縮小脈動アニメーション（retryButtonStrongPulseV15）を大幅強化
   ========================================================= */

.finished-controls-v15 {
  grid-template-columns: 1.32fr 0.88fr !important;
  gap: 14px !important;
  padding: 2px 6px !important;
  align-items: center !important;
}

#overlay-restart-btn.btn-retry-strong-v15,
.btn-retry-strong-v15 {
  background: linear-gradient(180deg, #ff4d4d 0%, #dc2626 55%, #b91c1c 100%) !important;
  border: 2.5px solid #fef08a !important;
  color: #ffffff !important;
  font-size: 1.02rem !important;
  font-weight: 900 !important;
  letter-spacing: 0.03em;
  text-shadow: 0 1px 3px rgba(127, 29, 29, 0.85) !important;
  transform-origin: center center !important;
  will-change: transform, box-shadow;
  animation: retryButtonStrongPulseV15 1.05s cubic-bezier(0.22, 0.61, 0.36, 1) infinite !important;
}

/* はっきり大きく膨らみ（scale 1.13）、その後キュッと縮んで（scale 0.93）リズミカルに繰り返す強弱脈動 */
@keyframes retryButtonStrongPulseV15 {
  0% {
    transform: scale(1);
    box-shadow: 0 3px 0 #7f1d1d, 0 5px 14px rgba(220, 38, 38, 0.42);
  }
  28% {
    transform: scale(1.11, 1.13);
    box-shadow: 0 5px 0 #7f1d1d, 0 10px 24px rgba(239, 68, 68, 0.68), 0 0 0 4px rgba(254, 202, 202, 0.58);
  }
  52% {
    transform: scale(0.93, 0.92);
    box-shadow: 0 2px 0 #7f1d1d, 0 3px 8px rgba(220, 38, 38, 0.35);
  }
  75% {
    transform: scale(1.06, 1.07);
    box-shadow: 0 4px 0 #7f1d1d, 0 7px 18px rgba(239, 68, 68, 0.52), 0 0 0 2px rgba(254, 202, 202, 0.38);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 3px 0 #7f1d1d, 0 5px 14px rgba(220, 38, 38, 0.42);
  }
}

@media (prefers-reduced-motion: reduce) {
  #overlay-restart-btn.btn-retry-strong-v15,
  .btn-retry-strong-v15 {
    animation: none !important;
    transform: none !important;
  }
}

/* =========================================================
   くるくる10 v16 一括改善版 追加・上書きスタイル定義
   - 改善1：円盤中央の「GOOD!」「3〜6 TAPS!」文字演出（#bonus-popup-banner）を常時非表示にし、残り時間と「あと○」を常時見せる
   - 改善2：練習モードの円盤下に「赤いマスをタップすると10になるよ！」説明バー（#practice-hint-guide-bar）を配置
   - 改善3〜5：遊び方の10超過注意文（⚠️気をつけて！）、時間ボーナス2条件の赤太字強調、高得点目標の表示
   - 改善6：初回起動時の「くるくる10へようこそ！まずは遊び方を覚えよう！」大型ウェルカム案内モーダル
   - 改善7：通常の数字マス6つを白一色（#ffffff）に統一し、6マスの境界線（#7dd3fc）と赤ヒントの区別を明快化
   - 改善8：ゲーム終了画面に「今回の最高コンボ」と「歴代ベスト（最高スコア・最高コンボ・最長時間）」を同時表示してその場で比較可能にする
   ========================================================= */

/* 改善1：円盤中央の達成文字ポップアップは常に非表示（残り時間の増加を一切遮らない） */
#bonus-popup-banner,
.bonus-popup-banner.center-circle-clipped-popup {
  display: none !important;
}

/* 改善7：通常の数字マス6つを白一色（#ffffff）に統一し、6マスの境界線をくっきり見やすく維持 */
.dial-sector,
.dial-sector.sector-even,
.dial-sector.sector-odd {
  fill: #ffffff !important;
  stroke: #7dd3fc !important;
  stroke-width: 2.5px !important;
}

.dial-sector.sector-hint-red {
  fill: url(#sectorHintRedGrad) !important;
  stroke: #f43f5e !important;
  stroke-width: 3px !important;
}

.dial-sector.flash-add {
  fill: #bae6fd !important;
}

.dial-sector.flash-success {
  fill: #fde047 !important;
}

.dial-sector.flash-burst {
  fill: #fecaca !important;
}

/* 改善2：練習モード限定で円盤のすぐ下に表示する「赤いマスをタップすると10になるよ！」説明バー */
.practice-hint-guide-bar {
  background: linear-gradient(180deg, #fff1f2 0%, #ffe4e6 100%);
  border: 2px solid #fb7185;
  border-radius: 12px;
  padding: 8px 12px;
  text-align: center;
  box-shadow: 0 3px 10px rgba(244, 63, 94, 0.14);
  flex-shrink: 0;
}

.practice-hint-guide-bar.hidden {
  display: none !important;
}

.practice-hint-guide-text {
  font-size: 1.05rem;
  font-weight: 900;
  color: #9f1239;
  line-height: 1.25;
  letter-spacing: 0.02em;
}

.practice-hint-ten {
  display: inline-block;
  color: #dc2626;
  font-size: 1.22em;
  font-weight: 900;
  padding: 0 2px;
  text-shadow: -1px -1px 0 #ffffff, 1px -1px 0 #ffffff, -1px 1px 0 #ffffff, 1px 1px 0 #ffffff;
}

/* 改善3〜5：遊び方の10超過注意文と時間ボーナス2条件（赤色太字強調）・高得点目標 */
.guide-warn-heading {
  display: block;
  color: #dc2626 !important;
  font-size: 1.15em !important;
  font-weight: 900 !important;
  margin-bottom: 2px;
}

.guide-hl-zero {
  display: inline-block;
  color: #dc2626 !important;
  background: #fee2e2 !important;
  border: 2.5px solid #dc2626 !important;
  border-radius: 8px !important;
  padding: 0 7px !important;
  margin: 0 2px !important;
  font-size: 1.22em !important;
  font-weight: 900 !important;
  line-height: 1.12 !important;
  text-shadow: none !important;
}

.guide-final-cond-red {
  color: #dc2626 !important;
  font-size: 1.08em !important;
  font-weight: 900 !important;
}

.guide-final-goal-line {
  color: #0369a1 !important;
  font-size: 1.04em !important;
  font-weight: 900 !important;
  margin-top: 2px;
  padding-top: 4px;
  border-top: 2px dashed #bae6fd;
}

/* 改善6：初回起動時の大型ウェルカム案内モーダル（80歳の方にも読みやすく押しやすい大型文字＆高コントラストボタン） */
.welcome-onboarding-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(15, 23, 42, 0.68);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.welcome-onboarding-modal.hidden {
  display: none !important;
}

.welcome-onboarding-card {
  width: 100%;
  max-width: 356px;
  background: linear-gradient(180deg, #ffffff 0%, #f0f9ff 100%);
  border: 3.5px solid #0284c7;
  border-radius: 22px;
  padding: 22px 18px 20px;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.45);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
}

.welcome-badge-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f97316 0%, #ef4444 100%);
  color: #ffffff;
  font-size: 1.75rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.35);
}

.welcome-onboarding-title {
  font-size: 1.56rem;
  font-weight: 900;
  color: #0c4a6e;
  line-height: 1.25;
}

.welcome-onboarding-subtitle {
  font-size: 1.22rem;
  font-weight: 900;
  color: #be123c;
  background: #fff1f2;
  border: 2px solid #fecdd3;
  border-radius: 12px;
  padding: 7px 14px;
  width: 100%;
  line-height: 1.3;
}

.welcome-onboarding-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  margin-top: 6px;
}

.welcome-guide-btn {
  width: 100%;
  min-height: 56px;
  font-size: 1.32rem !important;
  font-weight: 900 !important;
  border-radius: 999px !important;
  background: linear-gradient(180deg, #10b981 0%, #059669 100%) !important;
  border: 2.5px solid #047857 !important;
  color: #ffffff !important;
  box-shadow: 0 4px 0 #065f46, 0 8px 18px rgba(5, 150, 105, 0.38) !important;
  animation: centerStartButtonPulseV12 1.6s ease-in-out infinite;
}

.welcome-skip-btn {
  width: 100%;
  min-height: 46px;
  font-size: 1.04rem !important;
  font-weight: 800 !important;
  border-radius: 999px !important;
  background: #f1f5f9 !important;
  border: 2px solid #94a3b8 !important;
  color: #334155 !important;
  box-shadow: 0 2px 0 #cbd5e1 !important;
}

/* 改善8：ゲーム終了画面に「今回の結果」と「歴代ベスト3項目」を同時に見やすく収めるレイアウト */
.result-card.result-card-v16 {
  width: 95% !important;
  max-width: 306px !important;
  padding: 8px 10px !important;
  gap: 4px !important;
}

.result-header-row-v16 {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.result-card-v16 .result-title-v12 {
  font-size: 1.32rem !important;
}

.result-card-v16 .new-record-banner {
  font-size: 0.78rem !important;
  padding: 2px 10px !important;
}

.result-card-v16 .result-score-hero {
  padding: 4px 10px !important;
  width: 96% !important;
  margin: 1px 0 !important;
}

.result-card-v16 .result-score-big {
  font-size: 1.72rem !important;
}

.result-card-v16 .result-sub-metrics {
  width: 96% !important;
  gap: 1px !important;
}

.result-card-v16 .result-row.result-row-v12 {
  font-size: 0.84rem !important;
}

.result-card-v16 .result-row.result-row-v12 strong {
  font-size: 0.96rem !important;
}

.result-alltime-best-box {
  width: 96%;
  background: rgba(15, 23, 42, 0.55);
  border: 1.5px solid rgba(253, 224, 71, 0.55);
  border-radius: 10px;
  padding: 4px 6px;
  margin-top: 2px;
}

.result-alltime-best-heading {
  font-size: 0.72rem;
  font-weight: 900;
  color: #fde047;
  text-align: center;
  margin-bottom: 2px;
  letter-spacing: 0.05em;
}

.result-alltime-best-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr 0.95fr;
  gap: 4px;
}

.result-best-item {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 2px 3px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.result-best-label {
  font-size: 0.64rem;
  font-weight: 800;
  color: #cbd5e1;
  line-height: 1.1;
}

.result-best-val {
  font-size: 0.82rem;
  font-weight: 900;
  color: #fde047;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 600px) and (max-height: 700px) {
  .practice-hint-guide-bar {
    padding: 5px 8px;
  }

  .practice-hint-guide-text {
    font-size: 0.94rem;
  }

  .guide-overlay-v13[data-position-mode="final-summary"] .guide-direct-text {
    font-size: 1.06rem !important;
    padding: 8px 6px !important;
    gap: 2px !important;
  }

  .result-card.result-card-v16 {
    padding: 6px 8px !important;
    gap: 2px !important;
  }

  .result-card-v16 .result-title-v12 {
    font-size: 1.16rem !important;
  }

  .result-card-v16 .result-score-hero {
    padding: 2px 8px !important;
  }

  .result-card-v16 .result-score-big {
    font-size: 1.44rem !important;
  }

  .result-card-v16 .result-row.result-row-v12 {
    font-size: 0.78rem !important;
  }

  .result-card-v16 .result-row.result-row-v12 strong {
    font-size: 0.88rem !important;
  }

  .result-alltime-best-box {
    padding: 3px 4px;
  }

  .result-best-val {
    font-size: 0.76rem;
  }
}

/* =========================================================
   くるくる10 v17 一括改善版 追加・上書きスタイル定義
   - 改善1：ゲームモード・練習モード双方の開始待ち画面で中央「スタート」を示す動く人差し指を表示
   - 改善2：練習モードの赤ヒント説明（「赤いマスをタップすると10になるよ！」）を練習開始後のみ表示し、円盤すぐ下へ移動＆文字を大きく目立たせる
   - 改善3：ゲーム終了画面の黒い円盤内の重複「歴代ベスト」枠を削除し、「黒い円盤内＝今回の結果」「円盤下＝歴代ベスト」に役割を明確化
   - 改善4：円盤全体の直径を現行v16から正確に3％（1.03倍）拡大（320px->329.6px / 345px->355.35px / 282px->290.46px）
   ========================================================= */

/* 改善4：円盤全体の直径をv16から正確に3％（1.03倍）拡大
   SVG(viewBox 300x300)が width/height: 100% で比例拡大されるため、外周・6つの数字マス・中央丸・タップ判定領域がすべて均等に1.03倍へ拡大 */
.dial-wrapper {
  width: 329.6px;
  height: 329.6px;
}

@media (max-width: 600px) {
  .dial-wrapper {
    width: min(94.76vw, 55.62dvh, 355.35px);
    height: min(94.76vw, 55.62dvh, 355.35px);
    min-width: 226.6px;
    min-height: 226.6px;
  }
}

@media (max-width: 600px) and (max-height: 700px) {
  .dial-wrapper {
    width: min(86.52vw, 47.38dvh, 290.46px);
    height: min(86.52vw, 47.38dvh, 290.46px);
    min-width: 206px;
    min-height: 206px;
  }
}

/* 改善2：練習モードの赤ヒント説明バーを円盤のすぐ下へ近づけ、文字サイズを大きく目立たせる */
.dial-section {
  flex-direction: column !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 8px !important;
}

.practice-hint-guide-bar.practice-hint-guide-bar-v17 {
  width: 96%;
  max-width: 368px;
  margin-top: 2px;
  padding: 10px 14px;
  background: linear-gradient(180deg, #fff1f2 0%, #ffe4e6 100%);
  border: 2.5px solid #f43f5e;
  border-radius: 14px;
  box-shadow: 0 5px 14px rgba(244, 63, 94, 0.22);
  pointer-events: none;
}

.practice-hint-guide-bar-v17 .practice-hint-guide-text {
  font-size: 1.24rem !important;
  font-weight: 900 !important;
  color: #9f1239 !important;
  line-height: 1.28 !important;
  letter-spacing: 0.02em;
}

.practice-hint-guide-bar-v17 .practice-hint-ten {
  font-size: 1.28em !important;
  color: #dc2626 !important;
  font-weight: 900 !important;
  padding: 0 3px;
}

/* 改善3：黒い円盤内の重複歴代ベスト枠を削除し、今回の結果（TIME UP!・今回のスコア・今回の最高コンボ・今回遊べた時間）をゆったり読みやすく配置 */
#result-alltime-best-box,
.result-alltime-best-box {
  display: none !important;
}

.result-card.result-card-v17 {
  width: 92% !important;
  max-width: 298px !important;
  padding: 14px 14px !important;
  gap: 8px !important;
}

.result-card-v17 .result-title-v12 {
  font-size: 1.48rem !important;
}

.result-card-v17 .new-record-banner {
  font-size: 0.86rem !important;
  padding: 3px 12px !important;
}

.result-card-v17 .result-score-hero {
  padding: 8px 14px !important;
  width: 94% !important;
  margin: 2px 0 !important;
}

.result-card-v17 .result-score-caption {
  font-size: 0.82rem !important;
}

.result-card-v17 .result-score-big {
  font-size: 2.02rem !important;
}

.result-card-v17 .result-sub-metrics {
  width: 94% !important;
  gap: 5px !important;
}

.result-card-v17 .result-row.result-row-v12 {
  font-size: 0.92rem !important;
  padding: 2px 4px !important;
}

.result-card-v17 .result-row.result-row-v12 strong {
  font-size: 1.06rem !important;
}

@media (max-width: 600px) and (max-height: 700px) {
  .dial-section {
    gap: 5px !important;
  }

  .practice-hint-guide-bar.practice-hint-guide-bar-v17 {
    padding: 6px 10px;
    margin-top: 0;
  }

  .practice-hint-guide-bar-v17 .practice-hint-guide-text {
    font-size: 1.08rem !important;
  }

  .result-card.result-card-v17 {
    padding: 10px 12px !important;
    gap: 5px !important;
  }

  .result-card-v17 .result-title-v12 {
    font-size: 1.32rem !important;
  }

  .result-card-v17 .result-score-hero {
    padding: 5px 10px !important;
  }

  .result-card-v17 .result-score-big {
    font-size: 1.76rem !important;
  }

  .result-card-v17 .result-row.result-row-v12 {
    font-size: 0.84rem !important;
  }

  .result-card-v17 .result-row.result-row-v12 strong {
    font-size: 0.96rem !important;
  }
}

/* =========================================================
   くるくる10 v19 一括改善版 追加・上書きスタイル定義
   - 改善1：練習モードで赤ヒントON/OFFと「赤いマスをタップすると10になるよ！」説明文のON/OFFを完全連動
   - 改善2：「遊び方」で「ゲーム開始時の6つの数字には、必ず10を作れる組み合わせがあるよ！」と「数字が入れ替わったあとは、10を作れない場合もあるよ。」を明記
   - 改善3：通常画面から開発バージョンバッジ（v18/v19）を非表示にし、上部ヘッダーのタイトルと4操作ボタン（音声・BGM・言語・遊び方）の余白を整理（円盤直径・下部ボタン位置は一切変えない）
   - 改善4：コンボ達成表示を5コンボ刻みから「1コンボ！」「2コンボ！」「3コンボ！」…と毎回の10完成ごとに更新＆軽快な拡大アニメーションで演出（10超過時は即座にリセット消去）
   ========================================================= */

/* 改善3：通常画面からバージョンバッジを非表示にし、上部ヘッダーのタイトルと4つの操作ボタンを過密にならないよう整理 */
.version-badge,
.version-badge.badge-v5 {
  display: none !important;
}

.header-top.header-top-v19 {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
}

.game-title.game-title-v19 {
  white-space: nowrap;
  flex-shrink: 0;
}

@media (max-width: 600px) {
  .header-top.header-top-v19 {
    gap: 4px;
  }

  .game-title.game-title-v19 {
    font-size: 0.96rem;
    gap: 4px;
  }

  .header-right-group {
    gap: 3px;
  }

  .sound-toggle-btn {
    padding: 4px 5px;
    font-size: 0.64rem;
  }

  .lang-toggle-btn {
    padding: 3px 5px;
    font-size: 0.64rem;
  }

  .mobile-help-btn {
    padding: 3px 7px;
    font-size: 0.68rem;
  }
}

@media (max-width: 385px) {
  .header-top.header-top-v19 {
    gap: 3px;
  }

  .game-title.game-title-v19 {
    font-size: 0.9rem;
    gap: 3px;
  }

  .header-right-group {
    gap: 2.5px;
  }

  .sound-toggle-btn {
    padding: 4px 4px;
    font-size: 0.61rem;
  }

  .lang-toggle-btn {
    padding: 3px 4px;
    font-size: 0.61rem;
  }

  .mobile-help-btn {
    padding: 3px 6px;
    font-size: 0.64rem;
  }
}

/* 改善2：「遊び方」内の開始時10作成保証・途中補充時の補足説明スタイル */
.guide-guarantee-sub {
  display: block;
  margin-top: 6px;
  padding-top: 6px;
  border-top: 2px dashed #bae6fd;
  font-size: 0.78em !important;
  line-height: 1.28 !important;
  color: #0369a1 !important;
  font-weight: 900 !important;
}

.guide-guarantee-note {
  display: block;
  margin-bottom: 3px;
  font-size: 0.72em !important;
  line-height: 1.22 !important;
  color: #0369a1 !important;
  font-weight: 900 !important;
}

@media (max-width: 600px) and (max-height: 700px) {
  .guide-guarantee-sub {
    margin-top: 4px;
    padding-top: 4px;
    font-size: 0.74em !important;
  }

  .guide-guarantee-note {
    font-size: 0.68em !important;
  }
}

/* =========================================================
   くるくる10 v20 最終仕上げ 追加・上書きスタイル定義
   - 改善1：「遊び方」の合計0時10作成保証の説明（「合計が0のとき、6つの数字には必ず10を作れる組み合わせがあるよ！」）
   - 改善2：「遊び方」の途中手詰まり時の説明（「数字を選んでいる途中で、10を作れなくなることもあるよ。」「そんなときは『捨てる』を押してね！」）
   - 改善3：上部ヘッダーからゲーム名・ロゴを外し、最上段右寄せの「⚙ 設定」ボタン＆設定パネル（音声・BGM・言語）と、
            その下の選択エリア（「ゲームモード」「練習モード」「遊び方」）へ役割別に整理（円盤直径・中心位置はv19と完全同一に維持）
   ========================================================= */

/* 改善3-7：通常画面からゲーム名・タイトル用ロゴ・バージョンバッジを完全非表示（HTMLメタデータ・ウェルカム案内・manifestには保持） */
.game-title.game-title-v20,
.game-title-v20 .title-icon,
.version-badge,
.version-badge.badge-v5 {
  display: none !important;
}

/* 最上段：右寄せの「⚙ 設定」バー（v19のヘッダーと同じ高さを保ち、円盤の中心位置を1pxもずらさない） */
.header-top.header-top-v20 {
  display: flex !important;
  justify-content: flex-end !important;
  align-items: center !important;
  min-height: 36px;
  margin-bottom: 4px;
}

.header-right-group.header-right-group-v20 {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  width: 100%;
}

.settings-toggle-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 36px;
  padding: 5px 14px;
  font-size: 0.82rem;
  font-weight: 900;
  color: #334155;
  background: #ffffff;
  border: 2px solid #94a3b8;
  border-radius: 999px;
  cursor: pointer;
  touch-action: manipulation;
  white-space: nowrap;
  box-shadow: 0 2px 0 #cbd5e1;
  transition: transform 0.08s ease, background 0.12s ease;
}

.settings-toggle-btn:active,
.settings-toggle-btn.settings-open {
  color: #0c4a6e;
  background: #e0f2fe;
  border-color: #0284c7;
  box-shadow: 0 2px 0 #0369a1;
}

/* 選択エリア：「ゲームモード」「練習モード」（主要2ボタンを大きく維持）と「遊び方」を同じ選択バー内に役割整理 */
.game-mode-tabs.game-mode-tabs-v20 {
  display: grid !important;
  grid-template-columns: 1.25fr 1.25fr 0.92fr !important;
  gap: 7px !important;
  width: 100%;
  align-items: stretch;
}

.mobile-help-btn.mobile-help-tab-v20 {
  appearance: none;
  min-height: 44px;
  padding: 8px 8px;
  font-size: 0.92rem !important;
  font-weight: 900;
  letter-spacing: 0.02em;
  color: #075985;
  background: linear-gradient(180deg, #e0f2fe 0%, #bae6fd 100%);
  border: 2px solid #0284c7;
  border-radius: 12px;
  cursor: pointer;
  touch-action: manipulation;
  white-space: nowrap;
  box-shadow: 0 2px 0 #0369a1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.08s ease, background 0.12s ease;
}

.mobile-help-btn.mobile-help-tab-v20.active-guide {
  color: #ffffff;
  background: linear-gradient(180deg, #0284c7 0%, #0369a1 100%);
  border-color: #075985;
  box-shadow: 0 3px 0 #0c4a6e, 0 4px 10px rgba(2, 132, 199, 0.28);
}

@media (max-width: 600px) {
  .header-top.header-top-v20 {
    min-height: 36px;
    margin-bottom: 4px;
  }

  .settings-toggle-btn {
    min-height: 34px;
    padding: 4px 12px;
    font-size: 0.78rem;
  }

  .game-mode-tabs.game-mode-tabs-v20 {
    grid-template-columns: 1.24fr 1.24fr 0.92fr !important;
    gap: 6px !important;
  }

  .game-mode-tabs-v20 .game-mode-tab {
    min-height: 42px;
    padding: 6px 6px;
    font-size: 0.92rem !important;
  }

  .mobile-help-btn.mobile-help-tab-v20 {
    min-height: 42px;
    padding: 6px 6px;
    font-size: 0.86rem !important;
  }
}

@media (max-width: 385px) {
  .game-mode-tabs.game-mode-tabs-v20 {
    grid-template-columns: 1.22fr 1.22fr 0.94fr !important;
    gap: 5px !important;
  }

  .game-mode-tabs-v20 .game-mode-tab {
    padding: 6px 4px;
    font-size: 0.86rem !important;
  }

  .mobile-help-btn.mobile-help-tab-v20 {
    padding: 6px 4px;
    font-size: 0.8rem !important;
  }
}

/* 改善3-5：設定パネル（音声・BGM・言語の3項目を大きく見やすく一覧表示し、背景タップまたは「✕ 閉じる」で直感的に閉じられるモーダル） */
.settings-modal {
  position: fixed;
  inset: 0;
  z-index: 118;
  background: rgba(15, 23, 42, 0.52);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: max(48px, env(safe-area-inset-top)) 14px 16px;
}

.settings-modal.hidden {
  display: none !important;
}

.settings-card {
  width: 100%;
  max-width: 344px;
  background: #ffffff;
  border: 3px solid #0284c7;
  border-radius: 18px;
  padding: 14px 16px 16px;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.38);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.settings-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid #e0f2fe;
  padding-bottom: 8px;
}

.settings-modal-title {
  font-size: 1.16rem;
  font-weight: 900;
  color: #0c4a6e;
  margin: 0;
}

.settings-close-btn {
  appearance: none;
  min-height: 36px;
  padding: 5px 12px;
  font-size: 0.84rem;
  font-weight: 900;
  color: #334155;
  background: #f1f5f9;
  border: 2px solid #cbd5e1;
  border-radius: 999px;
  cursor: pointer;
  touch-action: manipulation;
}

.settings-rows {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  padding: 8px 12px;
}

.settings-row-label {
  font-size: 0.98rem;
  font-weight: 900;
  color: #0f172a;
}

.settings-card .settings-action-btn {
  min-width: 126px !important;
  min-height: 42px !important;
  padding: 7px 14px !important;
  font-size: 0.92rem !important;
  font-weight: 900 !important;
  border-radius: 999px !important;
}

/* =========================================================
   くるくる10 v21 追加・上書きスタイル定義
   - D3：記録が時間モード別であることを画面に明示（#ranking-mode-label 見出しを表示）
   - OVERルールの明記：開始待ち画面の円盤上部に短いOVERルール注意バッジ（#prestart-over-rule-note）を絶対配置し、円盤直径・座標を一切動かさない
   ========================================================= */

.ranking-panel-v12 .ranking-header.ranking-header-v21 {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  border-bottom: none !important;
  padding: 0 0 1px 0 !important;
  margin: 0 !important;
}

.ranking-panel-v12 .ranking-header.ranking-header-v21 .ranking-title {
  font-size: 0.72rem !important;
  font-weight: 900 !important;
  color: #92400e !important;
  line-height: 1.15 !important;
  letter-spacing: 0.02em;
  text-align: center;
}

.prestart-over-rule-note {
  position: absolute;
  top: 2px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 24;
  pointer-events: none !important;
  background: rgba(255, 241, 242, 0.94);
  border: 1.5px solid #fda4af;
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 0.72rem;
  font-weight: 900;
  color: #be123c;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(190, 18, 60, 0.12);
}

.prestart-over-rule-note.hidden {
  display: none !important;
}

@media (max-width: 600px) and (max-height: 700px) {
  .ranking-panel-v12 .ranking-header.ranking-header-v21 .ranking-title {
    font-size: 0.66rem !important;
  }

  .prestart-over-rule-note {
    font-size: 0.66rem;
    padding: 1px 8px;
  }
}

/* =========================================================
   くるくる10 v21 再試遊フィードバック 4項目 最小限修正スタイル
   - D1：チュートリアル中の「📖 遊び方チュートリアル」明示バッジ
   - N2：待機画面の中央スタートボタン用人差し指（👆）が「30秒」に重ならない専用バウンスアニメーション
   - 案A：設定モーダル内の時間モード切替（10秒 / 30秒 / 60秒）と待機画面の短い案内
   ========================================================= */

/* D1：体験型チュートリアル明示バッジ（#guide-stage-badge は既存テスト互換のため非表示維持） */
.guide-tutorial-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 12px;
  font-size: 0.78rem;
  font-weight: 900;
  color: #ffffff;
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  border: 2px solid #ffffff;
  border-radius: 999px;
  box-shadow: 0 3px 10px rgba(2, 132, 199, 0.35);
  letter-spacing: 0.03em;
  white-space: nowrap;
  pointer-events: none !important;
}

.guide-tutorial-badge.hidden {
  display: none !important;
}

.guide-overlay-v13[data-position-mode="above-start"] {
  top: 5% !important;
  gap: 3px !important;
}

/* N2：中央スタートボタンを指す指アイコン専用アニメーション（「30秒」表記の下側へ配置し重なりを完全解消） */
@keyframes fingerTapBounceStartV21 {
  0%, 100% {
    transform: translate(-50%, 42px) scale(1);
  }
  50% {
    transform: translate(-50%, 35px) scale(1.08);
  }
}

@keyframes fingerTapBounceStartCompactV21 {
  0%, 100% {
    transform: translate(-50%, 33px) scale(1);
  }
  50% {
    transform: translate(-50%, 27px) scale(1.06);
  }
}

.finger-guide-pointer[data-target-type="start"] {
  transform: translate(-50%, 42px);
  animation: fingerTapBounceStartV21 0.72s ease-in-out infinite !important;
}

/* 案A：設定モーダル内の「制限時間（10秒 / 30秒 / 60秒）」行 */
.settings-row.settings-row-time {
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}

.settings-row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.settings-time-lock-note {
  font-size: 0.74rem;
  font-weight: 800;
  color: #b45309;
  white-space: nowrap;
}

.settings-time-lock-note.hidden {
  display: none !important;
}

.settings-time-btns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  width: 100%;
}

.settings-time-btn {
  appearance: none;
  min-height: 40px;
  padding: 6px 8px;
  font-size: 0.92rem;
  font-weight: 900;
  color: #334155;
  background: #ffffff;
  border: 2px solid #cbd5e1;
  border-radius: 10px;
  cursor: pointer;
  touch-action: manipulation;
  box-shadow: 0 2px 0 #cbd5e1;
  transition: transform 0.08s ease, background 0.12s ease, border-color 0.12s ease;
}

.settings-time-btn.active-mode {
  color: #ffffff;
  background: linear-gradient(180deg, #0284c7 0%, #0369a1 100%);
  border-color: #075985;
  box-shadow: 0 2px 0 #0c4a6e;
}

.settings-time-btn:disabled {
  opacity: 0.48;
  cursor: not-allowed;
  box-shadow: none;
}

/* 案A：待機画面の円盤下端に絶対配置する短い時間モード変更案内（円盤サイズ・座標に影響しない） */
.prestart-time-settings-note {
  position: absolute;
  bottom: 1px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 24;
  pointer-events: none !important;
  background: rgba(240, 249, 255, 0.94);
  border: 1.5px solid #7dd3fc;
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 0.7rem;
  font-weight: 800;
  color: #0369a1;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.12);
}

.prestart-time-settings-note.hidden {
  display: none !important;
}

@media (max-width: 600px) and (max-height: 700px) {
  .finger-guide-pointer[data-target-type="start"] {
    transform: translate(-50%, 33px);
    animation: fingerTapBounceStartCompactV21 0.72s ease-in-out infinite !important;
  }

  .guide-tutorial-badge {
    font-size: 0.86rem;
    padding: 4px 13px;
  }

  .prestart-time-settings-note {
    font-size: 0.78rem;
    padding: 3px 11px;
  }
}

/* =========================================================
   くるくる10 v22 改善スタイル定義
   - 修正2：1段目（モード／遊び方）→ 2段目（コンボ／スコア）→ 3段目（⚙ 設定）の配置に整理（余分な空白行を作らず円盤サイズ維持）
   - 修正3：待機画面OVERルール注意文の文字サイズ・太さ・コントラストを強化
   - 修正4：待機画面の制限時間変更案内（「⚙ 設定で制限時間を変更」）の文字サイズ・太さ・視認性を強化
   - 修正5：「📖 遊び方チュートリアル」バッジの文字サイズ・視認性を強化
   ========================================================= */

/* 修正2：旧ヘッダー行を非表示にし、3段目にコンパクトで押しやすい「⚙ 設定」バーを配置 */
.game-header-v22-hidden {
  display: none !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

.settings-bar-v22 {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  margin: 2px 0 0 0;
  padding: 0;
}

.settings-toggle-btn.settings-toggle-btn-v22 {
  min-height: 34px;
  min-width: 128px;
  padding: 4px 18px;
  font-size: 0.86rem;
  font-weight: 900;
  color: #0f172a;
  background: linear-gradient(180deg, #ffffff 0%, #f1f5f9 100%);
  border: 2px solid #64748b;
  border-radius: 999px;
  box-shadow: 0 2px 0 #cbd5e1, 0 2px 6px rgba(15, 23, 42, 0.08);
  letter-spacing: 0.03em;
}

/* 修正3：OVERルール注意文の視認性・コントラスト強化（絶対配置のため円盤直径・座標は不変） */
.prestart-over-rule-note {
  top: 2px;
  padding: 4px 12px;
  font-size: 0.84rem;
  font-weight: 900;
  color: #9f1239;
  background: rgba(255, 228, 230, 0.97);
  border: 2px solid #e11d48;
  box-shadow: 0 3px 10px rgba(225, 29, 72, 0.22);
  max-width: 96%;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 修正4：制限時間変更案内の短縮＆視認性強化（絶対配置のため円盤直径・座標は不変） */
.prestart-time-settings-note {
  bottom: 1px;
  padding: 4px 14px;
  font-size: 0.86rem;
  font-weight: 900;
  color: #075985;
  background: rgba(224, 242, 254, 0.97);
  border: 2px solid #0284c7;
  box-shadow: 0 3px 10px rgba(2, 132, 199, 0.2);
}

/* 修正5：「📖 遊び方チュートリアル」バッジの大型化・明瞭化 */
.guide-tutorial-badge {
  padding: 5px 16px;
  font-size: 0.98rem;
  font-weight: 900;
  color: #ffffff;
  background: linear-gradient(135deg, #0284c7 0%, #1d4ed8 100%);
  border: 2.5px solid #ffffff;
  box-shadow: 0 4px 14px rgba(29, 78, 216, 0.42);
  letter-spacing: 0.04em;
}

.guide-overlay-v13[data-position-mode="above-start"] {
  top: 3% !important;
  gap: 3px !important;
}

@media (max-width: 600px) and (max-height: 700px) {
  .settings-bar-v22 {
    margin: 1px 0 0 0;
  }

  .settings-toggle-btn.settings-toggle-btn-v22 {
    min-height: 30px;
    min-width: 118px;
    padding: 3px 16px;
    font-size: 0.8rem;
  }

  .prestart-over-rule-note {
    font-size: 0.76rem;
    padding: 3px 10px;
  }

  .prestart-time-settings-note {
    font-size: 0.78rem;
    padding: 3px 12px;
  }

  .guide-tutorial-badge {
    font-size: 0.86rem;
    padding: 4px 13px;
  }
}

/* =========================================================
   くるくる10 v23 改善スタイル定義
   - 修正3：3段目の設定ボタンを横幅拡大（「⚙ 設定（時間・音）」）し、横に「音ONで爽快感アップ！」をコンパクトに配置
   - モーダル表示中のタッチ挙動安定化（touch-action: manipulation）
   ========================================================= */

.settings-bar-v22.settings-bar-v23 {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin: 2px 0 0 0;
  padding: 0 2px;
  flex-wrap: nowrap;
}

.settings-toggle-btn.settings-toggle-btn-v23 {
  min-height: 36px;
  min-width: 176px;
  padding: 5px 16px;
  font-size: 0.86rem;
  font-weight: 900;
  color: #0c4a6e;
  background: linear-gradient(180deg, #f0f9ff 0%, #e0f2fe 100%);
  border: 2px solid #0284c7;
  border-radius: 999px;
  box-shadow: 0 2px 0 #0369a1, 0 3px 8px rgba(2, 132, 199, 0.16);
  letter-spacing: 0.02em;
  flex: 0 1 auto;
}

.settings-sound-hint-v23 {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  font-size: 0.76rem;
  font-weight: 900;
  color: #9a3412;
  background: #ffedd5;
  border: 1.5px solid #fb923c;
  border-radius: 999px;
  white-space: nowrap;
  pointer-events: none;
  line-height: 1.15;
  flex: 0 1 auto;
}

/* モーダルオーバーレイ自体のタッチ貫通防止補助 */
.settings-modal,
.mode-switch-modal,
.welcome-onboarding-modal,
.pause-overlay {
  touch-action: manipulation;
}

@media (max-width: 600px) and (max-height: 700px) {
  .settings-bar-v22.settings-bar-v23 {
    gap: 5px;
    margin: 1px 0 0 0;
  }

  .settings-toggle-btn.settings-toggle-btn-v23 {
    min-height: 32px;
    min-width: 152px;
    padding: 4px 12px;
    font-size: 0.78rem;
  }

  .settings-sound-hint-v23 {
    padding: 3px 8px;
    font-size: 0.69rem;
  }
}

@media (max-width: 385px) {
  .settings-bar-v22.settings-bar-v23 {
    gap: 5px;
  }

  .settings-toggle-btn.settings-toggle-btn-v23 {
    min-width: 148px;
    padding: 4px 11px;
    font-size: 0.78rem;
  }

  .settings-sound-hint-v23 {
    padding: 3px 7px;
    font-size: 0.68rem;
  }
}

/* =========================================================
   くるくる10 v25 共通改善スタイル（Web版・iOS版共通）
   - 改善①：一時停止中でも設定モーダルを最前面に開けるようz-indexを保証
   - 改善③：練習モードからゲームモードへの穏やかな案内バー（点滅なし・操作の邪魔にならない下部配置）
   - 改善④：チュートリアルで「7 + 3 = 10！」等の足し算と達成感を強調表示
   - 改善⑤：コンボ達成バナーの設定ボタン非重複調整＆モード名付き2行「もう一度挑戦」ボタン
   ========================================================= */

.settings-modal {
  z-index: 120 !important;
}

.practice-challenge-nudge-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 94%;
  max-width: 364px;
  margin: 4px auto 0;
  padding: 6px 12px;
  text-align: center;
  background: linear-gradient(180deg, #eff6ff 0%, #dbeafe 100%);
  border: 2px solid #3b82f6;
  border-radius: 999px;
  box-shadow: 0 3px 10px rgba(37, 99, 235, 0.14);
  pointer-events: auto;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  font-family: inherit;
  transition: transform 0.1s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.practice-challenge-nudge-bar:hover {
  background: linear-gradient(180deg, #dbeafe 0%, #bfdbfe 100%);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.22);
}

.practice-challenge-nudge-bar:active {
  transform: scale(0.98);
  background: linear-gradient(180deg, #bfdbfe 0%, #93c5fd 100%);
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.18);
}

.practice-challenge-nudge-bar:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.45);
  outline-offset: 2px;
}

.practice-challenge-nudge-bar.hidden {
  display: none !important;
}

.practice-challenge-nudge-text {
  margin: 0;
  font-size: 0.80rem;
  font-weight: 900;
  color: #1d4ed8;
  line-height: 1.25;
  white-space: nowrap;
}

.practice-challenge-nudge-arrow {
  display: inline-block;
  font-size: 1.05rem;
  font-weight: 900;
  color: #2563eb;
  line-height: 1;
  flex-shrink: 0;
}

.guide-eq-pill {
  display: inline-block;
  margin-bottom: 4px;
  padding: 2px 12px;
  font-size: 1.05em;
  font-weight: 900;
  color: #0369a1;
  background: #e0f2fe;
  border: 2px solid #0284c7;
  border-radius: 999px;
  text-shadow: none !important;
}

.guide-eq-success {
  display: block;
  margin: 0 auto 4px;
  padding: 5px 14px;
  font-size: 1.18em;
  font-weight: 900;
  color: #ffffff;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border: 2.5px solid #fde047;
  border-radius: 14px;
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.32);
  text-shadow: none !important;
}

.combo-milestone-banner.banner-large-v14 {
  top: auto !important;
  bottom: calc(100% + 3px) !important;
  max-width: 92vw !important;
}

.combo-milestone-banner.banner-large-v14.banner-persistent .combo-milestone-text {
  font-size: 1.22rem !important;
  padding: 3px 16px !important;
  border-width: 2.5px !important;
  line-height: 1.2 !important;
}

#overlay-restart-btn.btn-retry-strong-v15 {
  display: inline-flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 1.15 !important;
  padding: 6px 10px !important;
  gap: 1px !important;
}

.retry-mode-line {
  display: block;
  font-size: 0.78rem;
  font-weight: 900;
  opacity: 0.96;
  letter-spacing: 0.02em;
}

.retry-action-line {
  display: block;
  font-size: 1.02rem;
  font-weight: 900;
}

@media (max-width: 600px) and (max-height: 700px) {
  .practice-challenge-nudge-bar {
    padding: 4px 10px;
    margin-top: 2px;
    gap: 3px;
  }

  .practice-challenge-nudge-text {
    font-size: 0.72rem;
  }

  .practice-challenge-nudge-arrow {
    font-size: 0.92rem;
  }

  .combo-milestone-banner.banner-large-v14 {
    bottom: calc(100% + 2px) !important;
  }

  .combo-milestone-banner.banner-large-v14.banner-persistent .combo-milestone-text {
    font-size: 1.06rem !important;
    padding: 2px 12px !important;
  }

  .retry-mode-line {
    font-size: 0.72rem;
  }

  .retry-action-line {
    font-size: 0.94rem;
  }
}

/* =========================================================
   くるくる10 v27 共通UI視認性・操作性改善（Web版・iOS版共通）
   - 改善①：ゲームモード円盤下の「⚙ 制限時間を変更する ›」をタップ可能なボタン化
   - 改善②：設定誘導バー（音ON案内＋太い右向きSVG矢印＋設定ボタン）の視認性・押しやすさ強化
   ========================================================= */

/* 改善①：制限時間変更ボタン（絶対配置維持で円盤サイズ・座標を一切変えない） */
.prestart-time-settings-note.prestart-time-settings-btn-v27 {
  pointer-events: auto !important;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  font-family: inherit;
  padding: 5px 15px;
  font-size: 0.86rem;
  font-weight: 900;
  color: #075985;
  background: linear-gradient(180deg, #f0f9ff 0%, #dbeafe 100%);
  border: 2px solid #0284c7;
  border-radius: 999px;
  box-shadow: 0 2px 0 #0369a1, 0 3px 10px rgba(2, 132, 199, 0.22);
  transition: transform 0.1s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.prestart-time-settings-note.prestart-time-settings-btn-v27:hover {
  background: linear-gradient(180deg, #e0f2fe 0%, #bfdbfe 100%);
  box-shadow: 0 2px 0 #0369a1, 0 4px 12px rgba(2, 132, 199, 0.28);
}

.prestart-time-settings-note.prestart-time-settings-btn-v27:active {
  transform: translateX(-50%) scale(0.97);
  background: linear-gradient(180deg, #bae6fd 0%, #93c5fd 100%);
  box-shadow: 0 1px 0 #0369a1, 0 2px 6px rgba(2, 132, 199, 0.2);
}

.prestart-time-settings-note.prestart-time-settings-btn-v27:focus-visible {
  outline: 3px solid rgba(2, 132, 199, 0.45);
  outline-offset: 2px;
}

/* 改善②：設定誘導バー（音ON案内＋太いSVG右向き矢印＋分かりやすい設定ボタン） */
.settings-bar-v22.settings-bar-v23.settings-bar-v27 {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  width: 100%;
  margin: 2px 0 0 0;
  padding: 0 2px;
  flex-wrap: nowrap;
}

.settings-hint-group-v27 {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex: 0 1 auto;
  min-width: 0;
  pointer-events: none;
}

.settings-sound-hint-v23.settings-sound-hint-v27 {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 11px;
  font-size: 0.84rem;
  font-weight: 900;
  color: #9a3412;
  background: linear-gradient(180deg, #fff7ed 0%, #ffedd5 100%);
  border: 2px solid #f97316;
  border-radius: 999px;
  box-shadow: 0 2px 6px rgba(234, 88, 12, 0.16);
  white-space: nowrap;
  line-height: 1.15;
  letter-spacing: 0.01em;
}

.settings-hint-arrow-v27 {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ea580c;
  flex-shrink: 0;
  filter: drop-shadow(0 1px 1px rgba(154, 52, 18, 0.22));
}

.settings-hint-arrow-v27 svg {
  display: block;
  width: 24px;
  height: 16px;
}

.settings-toggle-btn.settings-toggle-btn-v23.settings-toggle-btn-v27 {
  min-height: 38px;
  min-width: 0;
  padding: 6px 14px;
  font-size: 0.90rem;
  font-weight: 900;
  color: #0c4a6e;
  background: linear-gradient(180deg, #ffffff 0%, #dbeafe 100%);
  border: 2.5px solid #0284c7;
  border-radius: 999px;
  box-shadow: 0 3px 0 #0369a1, 0 4px 10px rgba(2, 132, 199, 0.22);
  letter-spacing: 0.01em;
  white-space: nowrap;
  flex: 0 0 auto;
  cursor: pointer;
  transition: transform 0.1s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.settings-toggle-btn.settings-toggle-btn-v23.settings-toggle-btn-v27:active {
  transform: translateY(1px) scale(0.98);
  box-shadow: 0 1px 0 #0369a1, 0 2px 5px rgba(2, 132, 199, 0.18);
}

@media (max-width: 600px) and (max-height: 700px) {
  .prestart-time-settings-note.prestart-time-settings-btn-v27 {
    font-size: 0.80rem;
    padding: 4px 12px;
  }

  .settings-bar-v22.settings-bar-v23.settings-bar-v27 {
    gap: 5px;
    margin: 1px 0 0 0;
  }

  .settings-sound-hint-v23.settings-sound-hint-v27 {
    padding: 4px 9px;
    font-size: 0.78rem;
  }

  .settings-hint-arrow-v27 svg {
    width: 22px;
    height: 15px;
  }

  .settings-toggle-btn.settings-toggle-btn-v23.settings-toggle-btn-v27 {
    min-height: 35px;
    padding: 5px 11px;
    font-size: 0.82rem;
  }
}

@media (max-width: 385px) {
  .settings-bar-v22.settings-bar-v23.settings-bar-v27 {
    gap: 4px;
  }

  .settings-hint-group-v27 {
    gap: 3px;
  }

  .settings-sound-hint-v23.settings-sound-hint-v27 {
    padding: 4px 8px;
    font-size: 0.75rem;
  }

  .settings-hint-arrow-v27 svg {
    width: 21px;
    height: 14px;
  }

  .settings-toggle-btn.settings-toggle-btn-v23.settings-toggle-btn-v27 {
    min-height: 34px;
    padding: 4px 10px;
    font-size: 0.78rem;
  }
}


/* =========================================================
   Playgama r3: スマートフォン横向き・iframe表示領域対応（下部ボタン見切れ・スクロール完全防止）
   - 実際の公式QA iframe高さ（375px〜760px）をカバーするため max-height: 760px へ拡張
   - 縦向き通常表示は維持しつつ、横向き環境では常に2カラム・100%画面内収容を保証
   ========================================================= */
@media (orientation: landscape) and (max-height: 760px) {
  html, body {
    height: 100% !important;
    max-height: 100dvh !important;
    overflow: hidden !important;
  }

  .app-container {
    display: grid !important;
    grid-template-columns: minmax(210px, 44vw) minmax(0, 1fr) !important;
    grid-template-rows: auto auto auto 1fr auto !important;
    column-gap: 10px !important;
    row-gap: 4px !important;
    align-items: center !important;
    max-width: 100vw !important;
    width: 100vw !important;
    height: 100% !important;
    max-height: 100dvh !important;
    padding: 6px 10px !important;
    margin: 0 !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
  }

  .sum-panel,
  .status-message,
  .game-header-v22-hidden {
    display: none !important;
  }

  #dial-section {
    grid-column: 1 / 2 !important;
    grid-row: 1 / 6 !important;
    width: 100% !important;
    height: 100% !important;
    max-height: calc(100dvh - 12px) !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
    padding: 0 !important;
    position: relative !important;
  }

  .dial-wrapper,
  #dial-hit-area {
    width: min(74dvh, 40vw) !important;
    height: min(74dvh, 40vw) !important;
    max-width: 310px !important;
    max-height: 310px !important;
  }

  #dial-svg {
    width: 100% !important;
    height: 100% !important;
  }

  .prestart-over-rule-note {
    position: static !important;
    transform: none !important;
    margin: 0 0 2px 0 !important;
    font-size: 0.68rem !important;
    padding: 2px 8px !important;
    max-width: 98% !important;
  }

  .prestart-time-settings-note.prestart-time-settings-btn-v27 {
    position: static !important;
    transform: none !important;
    margin: 4px auto 0 !important;
    font-size: 0.72rem !important;
    padding: 3px 10px !important;
  }

  .practice-hint-guide-bar,
  .practice-challenge-nudge-bar {
    position: static !important;
    margin: 3px auto 0 !important;
    padding: 3px 8px !important;
    max-width: 98% !important;
  }

  .practice-hint-guide-text,
  .practice-challenge-nudge-text {
    font-size: 0.68rem !important;
  }

  #mode-selector-bar {
    grid-column: 2 / 3 !important;
    grid-row: 1 / 2 !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  #mode-selector-bar .mode-tab-btn,
  #mode-selector-bar .help-btn {
    min-height: 30px !important;
    padding: 3px 6px !important;
    font-size: 0.76rem !important;
  }

  .stats-bar.stats-bar-v14 {
    grid-column: 2 / 3 !important;
    grid-row: 2 / 3 !important;
    margin: 0 !important;
    gap: 6px !important;
  }

  .stats-bar.stats-bar-v14 .stat-box {
    padding: 3px 8px !important;
    min-height: 34px !important;
  }

  .stats-bar.stats-bar-v14 .stat-label {
    font-size: 0.64rem !important;
  }

  .stats-bar.stats-bar-v14 .stat-value {
    font-size: 1.05rem !important;
  }

  #settings-bar-v22.settings-bar-v27 {
    grid-column: 2 / 3 !important;
    grid-row: 3 / 4 !important;
    margin: 0 !important;
    gap: 4px !important;
  }

  .settings-sound-hint-v23.settings-sound-hint-v27 {
    font-size: 0.70rem !important;
    padding: 3px 7px !important;
  }

  .settings-hint-arrow-v27 svg {
    width: 18px !important;
    height: 12px !important;
  }

  .settings-toggle-btn.settings-toggle-btn-v27 {
    min-height: 30px !important;
    padding: 3px 9px !important;
    font-size: 0.74rem !important;
  }

  #ranking-panel {
    grid-column: 2 / 3 !important;
    grid-row: 4 / 5 !important;
    margin: 0 !important;
    padding: 4px 8px !important;
    align-self: stretch !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
  }

  #ranking-panel .ranking-title {
    font-size: 0.72rem !important;
    margin-bottom: 2px !important;
  }

  #ranking-panel .ranking-col-title {
    font-size: 0.64rem !important;
  }

  #ranking-panel .rank-val {
    font-size: 0.84rem !important;
  }

  .controls-bar {
    grid-column: 2 / 3 !important;
    grid-row: 5 / 6 !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
  }

  .controls-bar .btn {
    min-height: 34px !important;
    padding: 4px 6px !important;
    font-size: 0.76rem !important;
  }

  #overlay-restart-btn.btn-retry-strong-v15 {
    padding: 4px 8px !important;
  }

  .retry-mode-line {
    font-size: 0.66rem !important;
  }

  .retry-action-line {
    font-size: 0.82rem !important;
  }

  /* モーダル（設定・確認・ウェルカム・一時停止）も横向き高さ内に完全収容 */
  .settings-modal,
  .mode-switch-modal,
  .welcome-onboarding-modal,
  .pause-overlay {
    align-items: center !important;
    padding: 8px !important;
  }

  .settings-card,
  .mode-switch-card,
  .welcome-onboarding-card {
    max-height: calc(100dvh - 16px) !important;
    overflow-y: auto !important;
    padding: 10px 14px !important;
  }

  .settings-card-header {
    margin-bottom: 6px !important;
  }

  .settings-rows {
    gap: 6px !important;
  }

  .settings-row {
    padding: 5px 8px !important;
  }
}

/* PC・タブレット短高iframe（例: 1280x800）でも下部ボタンがファーストビュー内に収まるよう調整 */
@media (min-width: 601px) and (max-height: 920px) and (min-height: 761px) {
  .app-container {
    padding-top: 8px !important;
    padding-bottom: 8px !important;
    gap: 4px !important;
  }

  .sum-panel {
    display: none !important;
  }

  .dial-wrapper,
  #dial-hit-area {
    width: min(350px, 47dvh) !important;
    height: min(350px, 47dvh) !important;
  }

  #ranking-panel {
    padding: 6px 12px !important;
    margin: 2px auto !important;
  }

  .controls-bar {
    margin-top: 2px !important;
  }
}

/* ==========================================
   v28.3移植: PC/タブレット（>600px）円盤中央タイマー＆「あと○」表示復旧
   ========================================== */
.dial-center-pc {
  display: none !important;
}
.dial-center-mobile {
  display: block;
  pointer-events: none;
}
.dial-center-mobile.hidden {
  display: none !important;
}
.dial-center-mobile-outer {
  fill: #fde047;
  stroke: #f59e0b;
  stroke-width: 2px;
  pointer-events: none;
}
.dial-center-mobile-bg {
  fill: url(#centerBgGrad);
  stroke: #dc2626;
  stroke-width: 3px;
  pointer-events: none;
}
.center-needed-svg-text {
  font-size: 23px;
  font-weight: 900;
  fill: #dc2626;
  stroke: #ffffff;
  stroke-width: 2px;
  paint-order: stroke fill;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}
