/* =========================================================
 * SyntheSweep 1問1答ミニゲーム スタイルシート (quiz/quiz.css)
 * 本編共通ダーク配色 + スマホ縦幅最適化 + 1問1答専用ハイライト
 * ========================================================= */

:root {
  --bg-base: #0b1120;
  --bg-surface: #111c33;
  --bg-card: #16233d;
  --bg-card-hover: #1d2d4f;
  --border-subtle: #263656;
  --border-strong: #3b527d;
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --accent-sky: #38bdf8;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;
  --cell-size: 56px;
}

*, *::before, *::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: radial-gradient(circle at 20% 0%, #152544 0%, var(--bg-base) 60%);
  color: var(--text-main);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans", "Noto Sans JP", sans-serif;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-x: none;
}

button {
  font-family: inherit;
  color: inherit;
  cursor: pointer;
}

.quiz-app {
  max-width: 560px;
  min-height: 100dvh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  padding: 0 12px 18px;
}

/* --- トップバー --- */
.quiz-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 2px 8px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

.brand-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: none;
  padding: 4px 6px;
  border-radius: 8px;
  transition: background 0.15s;
}

.brand-btn:hover {
  background: rgba(56, 189, 248, 0.1);
}

.brand-icon {
  display: inline-flex;
  width: 20px;
  height: 20px;
  color: #38bdf8;
}

.brand-icon .ss-icon {
  width: 20px;
  height: 20px;
}

.brand-title {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.brand-tag {
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.16);
  color: #7dd3fc;
  border: 1px solid rgba(56, 189, 248, 0.35);
}

.topbar-status {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: nowrap;
}

.status-pill {
  font-size: 12px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  white-space: nowrap;
}

.course-pill {
  color: #7dd3fc;
}

.progress-pill {
  color: #f8fafc;
}

.timer-pill {
  font-variant-numeric: tabular-nums;
  color: #cbd5e1;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-icon {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  font-size: 16px;
  transition: background 0.15s, border-color 0.15s;
}

.btn-icon:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-strong);
}

/* --- メインコンテナ --- */
.quiz-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding-top: 12px;
}

.screen[hidden] {
  display: none !important;
}

/* --- タイトル画面 --- */
.screen-title {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.hero-card {
  text-align: center;
  padding: 20px 16px 18px;
  background: linear-gradient(155deg, rgba(30, 58, 138, 0.35), rgba(17, 28, 51, 0.85));
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 18px;
}

.hero-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #7dd3fc;
  background: rgba(56, 189, 248, 0.14);
  border: 1px solid rgba(56, 189, 248, 0.35);
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 10px;
}

.hero-title {
  margin: 0 0 8px;
  font-size: 28px;
  font-weight: 900;
  letter-spacing: 0.01em;
}

.hero-accent {
  background: linear-gradient(90deg, #38bdf8, #34d399);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-copy {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 700;
  color: #f8fafc;
}

.hero-sub {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
}

.mode-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.section-heading {
  margin: 0;
  font-size: 13px;
  font-weight: 800;
  color: var(--text-muted);
  letter-spacing: 0.03em;
}

.daily-card {
  background: linear-gradient(160deg, #172747, #111c33);
  border: 1px solid rgba(52, 211, 153, 0.35);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.28);
}

.daily-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.daily-label {
  font-size: 16px;
  font-weight: 800;
  color: #f8fafc;
}

.daily-date {
  font-size: 12px;
  font-weight: 700;
  color: #6ee7b7;
  margin-top: 2px;
}

.daily-rule-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.16);
  color: #6ee7b7;
  border: 1px solid rgba(52, 211, 153, 0.35);
  white-space: nowrap;
}

.daily-desc {
  margin: 0;
  font-size: 13px;
  color: #cbd5e1;
  line-height: 1.5;
}

.daily-done-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid var(--border-subtle);
}

.daily-done-emojis {
  font-size: 18px;
  letter-spacing: 3px;
}

.daily-done-score {
  font-size: 13px;
  font-weight: 700;
  color: #6ee7b7;
}

.daily-card-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.course-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.course-card {
  text-align: left;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 13px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: transform 0.12s, border-color 0.15s, background 0.15s;
}

.course-card:hover {
  transform: translateY(-2px);
  background: var(--bg-card-hover);
}

.course-beginner:hover { border-color: #4ade80; }
.course-intermediate:hover { border-color: #38bdf8; }
.course-advanced:hover { border-color: #fb7185; }

.course-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}

.course-name {
  font-size: 15px;
  font-weight: 800;
}

.course-count {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
}

.course-desc {
  margin: 0;
  font-size: 12px;
  color: #cbd5e1;
  line-height: 1.45;
}

.title-footer-links {
  text-align: center;
  margin-top: 4px;
}

/* --- 汎用ボタン --- */
.btn-primary {
  width: 100%;
  padding: 13px 18px;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 800;
  color: #06281e;
  background: linear-gradient(135deg, #34d399, #38bdf8);
  box-shadow: 0 6px 18px rgba(56, 189, 248, 0.25);
  transition: transform 0.12s, filter 0.15s;
}

.btn-primary:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.btn-secondary {
  width: 100%;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  color: #e2e8f0;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  transition: background 0.15s;
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
}

.btn-ghost {
  width: 100%;
  padding: 11px 16px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid var(--border-subtle);
}

.btn-ghost:hover {
  color: var(--text-main);
  border-color: var(--border-strong);
}

.btn-text {
  background: transparent;
  border: none;
  color: #7dd3fc;
  font-size: 13px;
  font-weight: 700;
  padding: 6px 10px;
}

.btn-text:hover {
  text-decoration: underline;
}

/* --- プレイ画面 --- */
.screen-play {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}

.play-meta-bar {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  font-size: 13px;
}

.meta-mines {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.meta-mine-icon {
  display: inline-flex;
  width: 17px;
  height: 17px;
  color: #fca5a5;
}

.meta-mine-icon .ss-icon {
  width: 17px;
  height: 17px;
}

.meta-total-mines {
  font-size: 12px;
  color: var(--text-muted);
}

.progress-dots {
  display: flex;
  align-items: center;
  gap: 5px;
}

.progress-dot {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  background: #1e293b;
  border: 1px solid #334155;
}

.progress-dot.is-current {
  border-color: #38bdf8;
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.28);
}

/* --- 盤面＋ペンキャンバス --- */
.board-stage-wrap {
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 2px 0;
}

.board-canvas-stage {
  position: relative;
  display: inline-block;
  border-radius: 14px;
  touch-action: manipulation;
}

.board-canvas-stage.pen-mode-active {
  touch-action: none;
  overscroll-behavior-x: none;
}

.board-grid {
  display: grid;
  grid-template-columns: repeat(6, var(--cell-size));
  grid-template-rows: repeat(6, var(--cell-size));
  gap: 4px;
  padding: 8px;
  background: #0f172a;
  border: 2px solid #2b3c5c;
  border-radius: 14px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.42);
  user-select: none;
}

.memo-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 10;
  border-radius: 14px;
}

.board-canvas-stage.pen-mode-active .memo-canvas {
  pointer-events: auto;
  cursor: crosshair;
}

.board-canvas-stage.memo-hidden .memo-canvas {
  opacity: 0;
}

/* セルデザイン */
.mine-cell {
  width: var(--cell-size);
  height: var(--cell-size);
  border-radius: 9px;
  border: 1.5px solid transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: calc(var(--cell-size) * 0.48);
  position: relative;
  transition: transform 0.08s, border-color 0.14s, background 0.14s, box-shadow 0.14s;
  padding: 0;
}

.mine-cell.cell-hidden {
  background: linear-gradient(155deg, #3b4f73, #2b3b59);
  border-color: #4f6792;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.mine-cell.cell-hidden:hover {
  background: linear-gradient(155deg, #475f8a, #334669);
  border-color: #7dd3fc;
}

.mine-cell.cell-hidden:active {
  transform: scale(0.95);
}

.mine-cell.cell-revealed {
  background: #172236;
  border-color: #283854;
}

.mine-cell.cell-flagged {
  background: linear-gradient(155deg, #334155, #1e293b);
  border-color: rgba(244, 63, 94, 0.55);
}

.mine-cell.cell-masked {
  color: rgba(148, 163, 184, 0.65);
  font-weight: 700;
}

/* クラシック数字配色（本編 classic.js 準拠） */
.num-0 { color: #64748b; }
.num-1 { color: #38bdf8; }
.num-2 { color: #4ade80; }
.num-3 { color: #f87171; }
.num-4 { color: #a78bfa; }
.num-5 { color: #fb923c; }
.num-6 { color: #2dd4bf; }
.num-7 { color: #f43f5e; }
.num-8 { color: #cbd5e1; }

/* 観測範囲（周囲8マス）ハイライト */
.mine-cell.fov-source {
  border-color: #38bdf8 !important;
  box-shadow: inset 0 0 0 2px rgba(56, 189, 248, 0.5);
}

.mine-cell.fov-highlight {
  box-shadow: inset 0 0 0 2px rgba(56, 189, 248, 0.72), 0 0 8px rgba(56, 189, 248, 0.28);
  filter: brightness(1.16);
}

/* ヒント1段階目・ミス時根拠数字ハイライト（黄色枠） */
@keyframes cluePulse {
  0%, 100% {
    box-shadow: 0 0 0 2px rgba(250, 204, 21, 0.85), 0 0 12px rgba(250, 204, 21, 0.45);
  }
  50% {
    box-shadow: 0 0 0 3px rgba(254, 240, 138, 1), 0 0 20px rgba(250, 204, 21, 0.8);
  }
}

.mine-cell.hint-clue-pulse {
  border-color: #facc15 !important;
  background: rgba(250, 204, 21, 0.14) !important;
  animation: cluePulse 1.15s ease-in-out infinite;
  z-index: 2;
}

.mine-cell.clue-explain-highlight {
  border-color: #facc15 !important;
  background: rgba(250, 204, 21, 0.16) !important;
  box-shadow: 0 0 0 2px rgba(250, 204, 21, 0.75);
  z-index: 2;
}

/* ヒント2段階目 確定ターゲット点滅 */
@keyframes targetBlink {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.9), 0 0 14px rgba(56, 189, 248, 0.55);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 0 0 3px rgba(125, 211, 252, 1), 0 0 22px rgba(56, 189, 248, 0.9);
  }
}

.mine-cell.hint-target-blink {
  border-color: #38bdf8 !important;
  animation: targetBlink 0.9s ease-in-out infinite;
  z-index: 3;
}

/* 正解・ミス時ハイライト */
.mine-cell.ans-safe {
  border-color: #34d399 !important;
  background: rgba(16, 185, 129, 0.24) !important;
  box-shadow: inset 0 0 0 2px rgba(52, 211, 153, 0.75);
}

.mine-cell.ans-mine {
  border-color: #f43f5e !important;
  background: rgba(244, 63, 94, 0.22) !important;
  box-shadow: inset 0 0 0 2px rgba(251, 113, 133, 0.75);
}

.ans-badge {
  font-size: calc(var(--cell-size) * 0.38);
  font-weight: 900;
  pointer-events: none;
}

.ans-badge-safe {
  color: #6ee7b7;
}

.ans-badge-mine {
  color: #fda4af;
}

/* --- フィードバックドック ＆ ペンツールバー --- */
.feedback-dock {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pen-toolbar {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 7px 10px;
  background: #17233b;
  border: 1px solid rgba(56, 189, 248, 0.4);
  border-radius: 12px;
}

.feedback-dock.pen-toolbar-open .pen-toolbar {
  display: flex;
}

.pen-swatches {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pen-swatch {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid transparent;
  padding: 0;
}

.pen-swatch.active {
  border-color: #ffffff;
  transform: scale(1.12);
}

.pen-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-mini {
  padding: 5px 9px;
  border-radius: 8px;
  border: 1px solid var(--border-strong);
  background: var(--bg-card);
  font-size: 13px;
  font-weight: 700;
}

.btn-mini:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn-mini-done {
  background: rgba(56, 189, 248, 0.2);
  border-color: #38bdf8;
  color: #7dd3fc;
}

.feedback-banner {
  min-height: 54px;
  padding: 10px 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.feedback-banner.is-correct {
  border-color: rgba(52, 211, 153, 0.7);
  background: rgba(6, 78, 59, 0.35);
}

.feedback-banner.is-mistake {
  border-color: rgba(244, 63, 94, 0.75);
  background: rgba(136, 19, 55, 0.28);
}

.feedback-banner.is-hint {
  border-color: rgba(250, 204, 21, 0.65);
  background: rgba(113, 63, 18, 0.25);
}

.feedback-text {
  font-size: 13px;
  line-height: 1.45;
  color: #e2e8f0;
  flex: 1;
}

.btn-next {
  flex-shrink: 0;
  padding: 8px 13px;
  border: none;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 800;
  background: linear-gradient(135deg, #34d399, #38bdf8);
  color: #06281e;
  white-space: nowrap;
}

/* --- 操作バー --- */
.control-bar {
  width: 100%;
  display: flex;
  align-items: stretch;
  gap: 6px;
}

.mode-toggle-group {
  display: flex;
  flex: 1.5;
  gap: 4px;
  background: var(--bg-surface);
  padding: 3px;
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
}

.ctrl-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 7px 4px;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  transition: background 0.14s, border-color 0.14s;
  min-width: 0;
}

.ctrl-btn:hover {
  background: var(--bg-card-hover);
}

.mode-btn {
  border: 1px solid transparent;
  background: transparent;
}

.mode-btn.active {
  background: rgba(56, 189, 248, 0.2);
  border-color: #38bdf8;
  color: #e0f2fe;
}

#modeFlagBtn.active {
  background: rgba(244, 63, 94, 0.22);
  border-color: #fb7185;
  color: #ffe4e6;
}

#penToggleBtn.pen-active {
  background: rgba(56, 189, 248, 0.22);
  border-color: #38bdf8;
}

#penToggleBtn.has-memo {
  border-color: rgba(250, 204, 21, 0.7);
}

.ctrl-ico {
  font-size: 17px;
  line-height: 1.1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 20px;
}

.ctrl-ico .ss-icon {
  width: 18px;
  height: 18px;
}

.ctrl-lbl {
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

/* --- リザルト画面 --- */
.screen-result {
  display: flex;
  justify-content: center;
  padding-top: 8px;
}

.result-card {
  width: 100%;
  background: linear-gradient(165deg, #172747, #111c33);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 20px;
  padding: 24px 18px 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.4);
}

.result-crown {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(251, 191, 36, 0.14);
  border: 1px solid rgba(251, 191, 36, 0.4);
}

.result-crown .ss-icon {
  width: 30px;
  height: 30px;
}

.result-course {
  font-size: 13px;
  font-weight: 700;
  color: #7dd3fc;
}

.result-rank {
  margin: 0;
  font-size: 24px;
  font-weight: 900;
}

.result-emoji-bar {
  font-size: 32px;
  letter-spacing: 6px;
  padding: 10px 16px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
}

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

.stat-box {
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 10px;
}

.stat-label {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 3px;
}

.stat-value {
  font-size: 20px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.result-legend {
  font-size: 11px;
  color: var(--text-muted);
}

.result-share-actions,
.result-nav-actions {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.btn-x-share {
  width: 100%;
  padding: 13px 18px;
  border-radius: 12px;
  border: 1px solid #334155;
  background: #0f172a;
  color: #ffffff;
  font-size: 15px;
  font-weight: 800;
  transition: background 0.15s, border-color 0.15s;
}

.btn-x-share:hover {
  background: #1e293b;
  border-color: #64748b;
}

/* --- チュートリアルモーダル --- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 9, 20, 0.8);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  z-index: 100;
}

.modal-backdrop[hidden] {
  display: none !important;
}

.tutorial-card {
  width: 100%;
  max-width: 440px;
  max-height: 92dvh;
  overflow-y: auto;
  background: #111c33;
  border: 1px solid var(--border-strong);
  border-radius: 18px;
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.tut-step-badge {
  font-size: 11px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.18);
  color: #7dd3fc;
}

.btn-text-skip {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 700;
  padding: 4px 6px;
}

.btn-text-skip:hover {
  color: #f8fafc;
}

.tut-title {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
}

.tut-desc {
  margin: 0;
  font-size: 13px;
  color: #cbd5e1;
  line-height: 1.5;
}

.tut-rule-box {
  padding: 9px 11px;
  border-radius: 10px;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.35);
  font-size: 13px;
  line-height: 1.45;
  color: #e0f2fe;
}

.tut-mines-banner {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(250, 204, 21, 0.14);
  border: 1.5px solid #facc15;
  color: #fef08a;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 0 14px rgba(250, 204, 21, 0.3);
  animation: cluePulse 1.2s ease-in-out infinite;
}

.tut-mines-icon {
  display: inline-flex;
  width: 16px;
  height: 16px;
  color: #fca5a5;
}

.tut-mines-icon .ss-icon {
  width: 16px;
  height: 16px;
}

.tut-mines-sub {
  font-size: 12px;
  color: #fde68a;
  font-weight: 600;
}

.tut-interactive-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.tut-mode-bar {
  display: flex;
  gap: 8px;
}

.tut-mode-btn {
  padding: 7px 14px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: var(--bg-card);
  font-size: 13px;
  font-weight: 800;
}

.tut-mode-btn.active {
  background: rgba(244, 63, 94, 0.22);
  border-color: #fb7185;
}

#tutModeRevealBtn.active {
  background: rgba(56, 189, 248, 0.22);
  border-color: #38bdf8;
}

.tut-mini-board {
  display: grid;
  grid-template-columns: repeat(3, 62px);
  grid-template-rows: repeat(3, 62px);
  gap: 5px;
  padding: 8px;
  background: #0f172a;
  border: 2px solid #2b3c5c;
  border-radius: 12px;
}

.tut-mini-board .mine-cell {
  --cell-size: 62px;
}

.tut-feedback {
  min-height: 22px;
  font-size: 13px;
  font-weight: 700;
  color: #6ee7b7;
  text-align: center;
}

.tut-feedback.is-warn {
  color: #fbbf24;
}

.guide-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.guide-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 11px;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid var(--border-subtle);
}

.guide-ico {
  min-width: 48px;
  text-align: center;
  font-size: 16px;
  font-weight: 800;
  padding-top: 2px;
}

.guide-name {
  font-size: 13px;
  font-weight: 800;
  color: #f8fafc;
}

.guide-text {
  font-size: 12px;
  color: #cbd5e1;
  line-height: 1.4;
}

.tut-footer {
  margin-top: 2px;
}

/* --- レスポンシブ調整（スマホ 390px 幅） --- */
@media (max-width: 480px) {
  :root {
    --cell-size: min(54px, calc((100vw - 56px) / 6));
  }

  .quiz-app {
    padding: 0 8px 14px;
  }

  .course-grid {
    grid-template-columns: 1fr;
  }

  .brand-title {
    font-size: 14px;
  }

  .brand-tag {
    display: none;
  }

  .status-pill {
    font-size: 11px;
    padding: 3px 6px;
  }

  .hero-title {
    font-size: 24px;
  }

  .result-emoji-bar {
    font-size: 28px;
    letter-spacing: 4px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mine-cell.hint-clue-pulse,
  .mine-cell.hint-target-blink {
    animation: none !important;
  }
}
