/* IQ-Kids 全站樣式 */

:root {
  --bg: #FFF8E7;
  --bg-paper: #FFFFFF;
  --ink: #2D2A4A;
  --ink-soft: #6B6890;
  --primary: #FF6B9D;
  --primary-deep: #E84A82;
  --secondary: #4ECDC4;
  --accent: #FFD93D;
  --purple: #9B7EDE;
  --orange: #FF9F45;
  --success: #6BCB77;
  --error: #FF8C8C;
  --shadow: 0 6px 0 rgba(45, 42, 74, 0.15);
  --shadow-hover: 0 4px 0 rgba(45, 42, 74, 0.15);
  --shadow-sm: 0 3px 0 rgba(45, 42, 74, 0.15);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Fredoka', 'Noto Sans TC', sans-serif;
  background: var(--bg);
  background-image:
    radial-gradient(circle at 20% 30%, rgba(255, 217, 61, 0.15) 0%, transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(78, 205, 196, 0.12) 0%, transparent 40%),
    radial-gradient(circle at 50% 100%, rgba(255, 107, 157, 0.1) 0%, transparent 50%);
  min-height: 100vh;
  color: var(--ink);
  padding: 20px;
  overflow-x: hidden;
}

.container { max-width: 820px; margin: 0 auto; }

/* HEADER */
.header { text-align: center; padding: 24px 16px 24px; }
.title {
  font-size: clamp(28px, 5vw, 44px);
  font-weight: 900;
  color: var(--ink);
  letter-spacing: -0.02em;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.title-emoji {
  font-size: 1.2em;
  display: inline-block;
  animation: wiggle 3s ease-in-out infinite;
}
@keyframes wiggle {
  0%, 100% { transform: rotate(-5deg); }
  50% { transform: rotate(5deg); }
}
.subtitle {
  color: var(--ink-soft);
  font-size: 16px;
  margin-top: 8px;
  font-weight: 500;
}

/* ============ MENU ============ */
.menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  margin-top: 24px;
}
.topic-card {
  background: var(--bg-paper);
  border: 4px solid var(--ink);
  border-radius: 24px;
  padding: 22px 20px;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}
.topic-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 0 rgba(45, 42, 74, 0.15);
}
.topic-card .topic-emoji { font-size: 44px; margin-bottom: 10px; display: block; }
.topic-card .topic-name { font-size: 20px; font-weight: 900; color: var(--ink); margin-bottom: 6px; }
.topic-card .topic-desc {
  font-size: 14px;
  color: var(--ink-soft);
  font-weight: 500;
  line-height: 1.5;
  margin-bottom: 14px;
}
.difficulty-row { display: flex; gap: 8px; }
.diff-btn {
  flex: 1;
  background: white;
  border: 2.5px solid var(--ink);
  border-radius: 12px;
  padding: 8px 4px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  color: var(--ink);
  box-shadow: var(--shadow-sm);
  transition: all 0.15s;
}
.diff-btn:hover {
  transform: translateY(1px);
  box-shadow: 0 2px 0 rgba(45, 42, 74, 0.15);
}
.diff-btn.easy { background: #E8F8E0; }
.diff-btn.mid  { background: #FFF3D6; }
.diff-btn.hard { background: #FFE0E8; }
.topic-card.matrix     { background: linear-gradient(135deg, #FFFFFF 0%, #FFF0F5 100%); }
.topic-card.sequence   { background: linear-gradient(135deg, #FFFFFF 0%, #E8FCFB 100%); }
.topic-card.spatial    { background: linear-gradient(135deg, #FFFFFF 0%, #F0EAFB 100%); }
.topic-card.numseries  { background: linear-gradient(135deg, #FFFFFF 0%, #FFFAE0 100%); }
.topic-card.analogy    { background: linear-gradient(135deg, #FFFFFF 0%, #FFEFE0 100%); }
.topic-card.multivar   { background: linear-gradient(135deg, #FFFFFF 0%, #EFEDFA 100%); }

/* ============ QUIZ ============ */
.back-btn {
  background: white;
  border: 3px solid var(--ink);
  border-radius: 14px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  color: var(--ink);
  box-shadow: var(--shadow-sm);
  font-family: inherit;
  margin-bottom: 16px;
}
.back-btn:hover { transform: translateY(1px); box-shadow: 0 2px 0 rgba(45, 42, 74, 0.15); }
.progress-bar {
  background: white;
  border: 3px solid var(--ink);
  border-radius: 999px;
  height: 18px;
  margin-bottom: 6px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 999px;
  transition: width 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  width: 0%;
}
.progress-text {
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
  margin-bottom: 18px;
}

/* CARD */
.card {
  background: var(--bg-paper);
  border: 4px solid var(--ink);
  border-radius: 28px;
  padding: 32px 24px 24px;
  box-shadow: var(--shadow);
  position: relative;
}
.card-badge {
  position: absolute;
  top: -14px;
  left: 24px;
  background: var(--accent);
  border: 3px solid var(--ink);
  border-radius: 999px;
  padding: 4px 16px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}
.card-stars {
  position: absolute;
  top: -14px;
  right: 24px;
  background: var(--purple);
  border: 3px solid var(--ink);
  border-radius: 999px;
  padding: 4px 14px;
  font-size: 13px;
  font-weight: 700;
  color: white;
}
.question-text {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.6;
  margin-top: 8px;
  margin-bottom: 22px;
  color: var(--ink);
}
.question-visual {
  background: #FAFAFF;
  border: 2px dashed #D5D2EC;
  border-radius: 20px;
  padding: 24px 16px;
  margin-bottom: 24px;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 140px;
}

/* ============ MATRIX 3x3 ============ */
.matrix-3x3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  max-width: 320px;
}
.matrix-2x2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  max-width: 220px;
}
.matrix-cell {
  aspect-ratio: 1;
  background: white;
  border: 3px solid var(--ink);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 2px 2px 0 var(--ink);
}
.matrix-cell.unknown {
  background: var(--accent);
  font-size: 32px;
  font-weight: 900;
  color: var(--ink);
}

/* ============ SEQUENCE ============ */
.shape-sequence, .sequence-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}
.shape-cell, .seq-cell {
  width: 64px;
  height: 64px;
  background: white;
  border: 3px solid var(--ink);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 2px 2px 0 var(--ink);
}
.shape-cell.unknown, .seq-cell.unknown {
  background: var(--accent);
  font-size: 28px;
  font-weight: 900;
  color: var(--ink);
}
.arrow {
  font-size: 20px;
  color: var(--ink-soft);
  font-weight: 700;
}

/* ============ NUMBER ============ */
.number-sequence {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}
.num-cell {
  min-width: 56px;
  height: 56px;
  background: white;
  border: 3px solid var(--ink);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
  padding: 0 12px;
  box-shadow: 2px 2px 0 var(--ink);
}
.num-cell.unknown { background: var(--accent); color: var(--ink); }

/* ============ ANALOGY ============ */
.analogy-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
}
.analogy-row .arr { color: var(--ink-soft); }
.analogy-row .term {
  background: white;
  border: 3px solid var(--ink);
  border-radius: 12px;
  padding: 10px 16px;
  box-shadow: 2px 2px 0 var(--ink);
  min-width: 70px;
  text-align: center;
}
.analogy-row .term.unknown { background: var(--accent); }

/* ============ OPTIONS ============ */
.options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}
.options.shape-options { grid-template-columns: repeat(4, 1fr); }
.options.text-options  { grid-template-columns: repeat(2, 1fr); }
.option {
  background: white;
  border: 3px solid var(--ink);
  border-radius: 16px;
  padding: 14px 12px;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  transition: all 0.15s;
  box-shadow: var(--shadow-sm);
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 64px;
  font-family: inherit;
  flex-direction: column;
}
.option:hover:not(:disabled) {
  transform: translateY(2px);
  box-shadow: 0 2px 0 rgba(45, 42, 74, 0.15);
  background: #FFFBF0;
}
.option:active:not(:disabled) {
  transform: translateY(4px);
  box-shadow: 0 0 0 rgba(45, 42, 74, 0.15);
}
.option .label {
  background: var(--secondary);
  color: white;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 13px;
  flex-shrink: 0;
}
.option .opt-text { font-size: 14px; }
.option.correct {
  background: var(--success);
  color: white;
  border-color: #4FAF5C;
  animation: pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.option.correct .label { background: white; color: var(--success); }
.option.incorrect {
  background: var(--error);
  color: white;
  border-color: #E66B6B;
  animation: shake 0.5s;
}
.option.incorrect .label { background: white; color: var(--error); }
.option:disabled { cursor: not-allowed; }

@keyframes pop {
  0% { transform: scale(1); }
  40% { transform: scale(1.06); }
  100% { transform: scale(1); }
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}

/* ============ FEEDBACK ============ */
.feedback {
  margin-top: 20px;
  padding: 18px;
  border-radius: 18px;
  border: 3px solid var(--ink);
  background: #FFFBF0;
  box-shadow: var(--shadow-sm);
  display: none;
  animation: slideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.feedback.show { display: block; }
@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.feedback-header {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 900;
  margin-bottom: 12px;
}
.feedback.correct .feedback-header { color: var(--success); }
.feedback.incorrect .feedback-header { color: var(--primary-deep); }
.feedback-emoji { font-size: 26px; }
.hint-question {
  background: white;
  border: 2px solid var(--ink);
  border-radius: 12px;
  padding: 12px 14px;
  margin: 10px 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.6;
}
.hint-question::before { content: '🤔 '; }
.explanation {
  font-size: 15px;
  line-height: 1.75;
  color: var(--ink);
  margin: 10px 0;
  font-weight: 500;
}
.explanation strong {
  background: var(--accent);
  padding: 1px 6px;
  border-radius: 5px;
  font-weight: 700;
}
.skill-tag {
  display: inline-block;
  background: var(--secondary);
  color: white;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  margin-top: 10px;
}

/* ============ ACTIONS ============ */
.actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
  flex-wrap: wrap;
}
.btn {
  flex: 1;
  min-width: 120px;
  padding: 14px 18px;
  border: 3px solid var(--ink);
  border-radius: 14px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all 0.15s;
  font-family: inherit;
  color: var(--ink);
}
.btn:hover { transform: translateY(1px); box-shadow: 0 2px 0 rgba(45, 42, 74, 0.15); }
.btn:active { transform: translateY(4px); box-shadow: 0 0 0 rgba(45, 42, 74, 0.15); }
.btn-primary { background: var(--primary); color: white; }
.btn-ghost { background: white; }

/* ============ FINAL ============ */
.final-screen {
  text-align: center;
  padding: 30px 20px;
  background: var(--bg-paper);
  border: 4px solid var(--ink);
  border-radius: 28px;
  box-shadow: var(--shadow);
}
.trophy {
  font-size: 70px;
  animation: bounce 1.5s ease-in-out infinite;
  display: inline-block;
}
@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}
.final-title { font-size: 28px; font-weight: 900; margin: 16px 0 4px; color: var(--ink); }
.score-display { font-size: 16px; color: var(--ink-soft); margin-bottom: 22px; font-weight: 600; }
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 22px 0;
}
.stat-box {
  background: white;
  border: 3px solid var(--ink);
  border-radius: 14px;
  padding: 14px 6px;
  box-shadow: var(--shadow-sm);
}
.stat-value { font-size: 26px; font-weight: 900; color: var(--primary); }
.stat-label { font-size: 12px; color: var(--ink-soft); font-weight: 600; margin-top: 4px; }

.celebration {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 100;
  font-size: 70px;
  opacity: 0;
}
.celebration.show {
  animation: celebrate 1s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes celebrate {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.3) rotate(-30deg); }
  50% { opacity: 1; transform: translate(-50%, -50%) scale(1.3) rotate(15deg); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1) rotate(0deg); }
}

/* ============ LOADING ============ */
.loading {
  text-align: center;
  padding: 60px 20px;
  color: var(--ink-soft);
  font-weight: 600;
}
.loading::after {
  content: '';
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid var(--ink-soft);
  border-top-color: transparent;
  border-radius: 50%;
  margin-left: 10px;
  animation: spin 0.8s linear infinite;
  vertical-align: middle;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 520px) {
  /* ───── 基礎佈局 ───── */
  body { padding: 14px; }

  /* 題目視覺相關 */
  .options.shape-options { grid-template-columns: repeat(2, 1fr); }
  .question-text { font-size: 16px; }
  .matrix-3x3 { max-width: 260px; }
  .matrix-cell svg { width: 80%; height: 80%; }
  .shape-cell { width: 52px; height: 52px; }
  .num-cell { min-width: 48px; height: 48px; font-size: 18px; padding: 0 10px; }

  /* ───── Card 跟結算頁邊距收緊 ───── */
  .card { padding: 28px 16px 18px; }
  .final-screen { padding: 24px 16px; }

  /* ───── 題型卡片 ───── */
  .topic-card { padding: 18px 16px; }
  .topic-card .topic-emoji { font-size: 36px; }
  .topic-card .topic-name { font-size: 18px; }

  /* ───── 頂端三按鈕縮一點,避開 title ───── */
  .mute-btn { width: 38px; height: 38px; font-size: 18px; top: 10px; right: 10px; }
  .lang-switcher { top: 10px; right: 58px; }
  .lang-btn { width: 38px; height: 38px; font-size: 17px; }
  .lang-menu { min-width: 200px; max-width: 240px; padding: 12px; top: 46px; }
  .settings-btn-top { top: 10px; right: 106px; width: 38px; height: 38px; font-size: 18px; }

  /* ───── Test mode banner ───── */
  .test-mode-banner { padding: 14px 16px; gap: 12px; }
  .banner-emoji { font-size: 32px; }
  .banner-title { font-size: 17px; }
  .banner-sub { font-size: 12px; }
  .banner-arrow { font-size: 22px; }

  /* ───── 測驗設定 chips 收緊 ───── */
  .setup-section { margin-bottom: 14px; }
  .setup-chip { padding: 7px 11px; font-size: 12px; }
  .chip-emoji { font-size: 14px; }
  .setup-h2 { font-size: 19px; }

  /* ───── Test 答題 3 按鈕避免擠爆 ───── */
  .test-actions { gap: 6px; }
  .test-actions .btn { font-size: 13px; padding: 10px 8px; min-width: 70px; }

  /* ───── Stats 數字小一點 ───── */
  .stats .stat-value { font-size: 22px; }
  .stat-box { padding: 10px 4px; }

  /* ───── 雷達圖 SVG 縮到容器寬 (主要修法) ───── */
  .radar-chart { max-width: 100%; height: auto; display: block; }
  .radar-section { padding: 16px 12px 12px; }

  /* ───── 錯題回顧 row 在窄畫面換行 ───── */
  .review-row { flex-wrap: wrap; }
  .wrong-item { flex-wrap: wrap; padding: 8px; gap: 8px; }
  .wrong-meta { margin-left: 0; width: 100%; padding-left: 38px; font-size: 11px; }

  /* ───── 測驗結果 review-item 收一點 ───── */
  .review-item { padding: 10px 12px; }
  .review-prompt { font-size: 13px; }

  /* ───── 回饋 modal ───── */
  .fb-modal { padding: 18px 16px 14px; }
  .fb-chip { padding: 7px 10px; font-size: 12px; }
  .fb-chip-emoji { font-size: 14px; }

  /* ───── 系統回饋 banner 收緊 ───── */
  .system-feedback-row { padding: 14px 12px; }
  .system-feedback-btn { padding: 9px 16px; font-size: 13px; }
}

/* 真的很窄的螢幕 (iPhone SE 1st gen, 舊 Android,320-360px) */
@media (max-width: 360px) {
  .title { font-size: 22px; }
  .banner-title { font-size: 16px; }
  .banner-sub { font-size: 11px; }
  .banner-emoji { font-size: 28px; }

  /* 測驗答題 3 按鈕直立堆疊 */
  .test-actions { flex-direction: column; }
  .test-actions .btn { min-width: 100%; }

  /* 學習模式難度按鈕直立堆疊
     原本「⭐⭐⭐ 挑戰 (22)」會包到 3 行,改 stack 後一行完整顯示 */
  .difficulty-row { flex-direction: column; gap: 6px; }
  .diff-btn { padding: 9px 12px; font-size: 13px; }
}

.hide { display: none !important; }

/* ============ RENDER ERRORS (dev) ============ */
.render-error, .render-stub {
  background: #FFE0E0;
  border: 2px dashed #FF8C8C;
  padding: 12px;
  border-radius: 8px;
  color: #8B2C2C;
  font-size: 13px;
}

/* ============ TOP-RIGHT 控制群 (齒輪 / 翻譯 / 靜音) ============ */
/* 順序由右到左: mute > lang > settings (越常用越靠右,符合拇指區) */
.settings-btn-top {
  position: fixed;
  top: 16px;
  right: 124px;  /* 在 lang 按鈕的左邊 (lang 在 70) */
  z-index: 50;
  width: 44px;
  height: 44px;
  background: white;
  border: 3px solid var(--ink);
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-family: inherit;
}
.settings-btn-top:hover {
  transform: translateY(2px) rotate(45deg);
  box-shadow: 0 1px 0 rgba(45, 42, 74, 0.15);
  background: #FFFBF0;
}
.settings-btn-top:active { transform: translateY(4px) rotate(90deg); }

/* ============ LANG SWITCHER (Google Translate widget) ============ */
.lang-switcher {
  position: fixed;
  top: 16px;
  right: 70px;  /* mute 按鈕左邊 */
  z-index: 50;
}
.lang-btn {
  width: 44px;
  height: 44px;
  background: white;
  border: 3px solid var(--ink);
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-family: inherit;
}
.lang-btn:hover {
  transform: translateY(2px);
  box-shadow: 0 1px 0 rgba(45, 42, 74, 0.15);
  background: #FFFBF0;
}
.lang-menu {
  position: absolute;
  top: 54px;
  right: 0;
  background: white;
  border: 3px solid var(--ink);
  border-radius: 16px;
  padding: 14px 16px;
  box-shadow: var(--shadow);
  min-width: 220px;
  max-width: 280px;
}
.lang-menu-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 10px;
  text-align: center;
}
.lang-menu-hint {
  font-size: 11px;
  color: var(--ink-soft);
  margin-top: 10px;
  text-align: center;
  font-weight: 500;
  line-height: 1.5;
  opacity: 0.8;
}

/* Google Translate widget 樣式覆蓋 — 讓它跟我們風格一致 */
#google_translate_element .goog-te-gadget {
  font-family: inherit !important;
  font-size: 13px !important;
  color: var(--ink) !important;
}
#google_translate_element .goog-te-gadget-simple {
  background: #FFFBF0 !important;
  border: 2px solid var(--ink) !important;
  border-radius: 10px !important;
  padding: 6px 10px !important;
  font-size: 13px !important;
  cursor: pointer;
  display: block !important;
  text-align: center;
}
#google_translate_element .goog-te-menu-value {
  color: var(--ink) !important;
  font-weight: 700 !important;
}
#google_translate_element .goog-te-menu-value span {
  color: var(--ink) !important;
}
/* 隱藏 "Powered by Google" 因為它佔空間,而且我們有 hint 寫 */
#google_translate_element .goog-logo-link,
#google_translate_element .goog-te-gadget > span > a {
  display: none !important;
}
/* 避免被 Translate 加的頂部 banner 干擾佈局 */
body { top: 0 !important; }
.goog-te-banner-frame.skiptranslate { display: none !important; }

/* ============ MUTE BUTTON ============ */
.mute-btn {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 50;
  width: 44px;
  height: 44px;
  background: white;
  border: 3px solid var(--ink);
  border-radius: 50%;
  font-size: 22px;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-family: inherit;
}
.mute-btn:hover {
  transform: translateY(2px);
  box-shadow: 0 1px 0 rgba(45, 42, 74, 0.15);
}
.mute-btn:active {
  transform: translateY(4px);
  box-shadow: 0 0 0 rgba(45, 42, 74, 0.15);
}

/* ============ FEEDBACK BUTTON (per-question) ============ */
.feedback-btn {
  position: absolute;
  bottom: -16px;
  right: 24px;
  background: white;
  border: 2.5px solid var(--ink);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all 0.15s;
  color: var(--ink-soft);
  font-family: inherit;
}
.feedback-btn:hover {
  background: #FFFBF0;
  color: var(--ink);
  transform: translateY(1px);
  box-shadow: 0 2px 0 rgba(45, 42, 74, 0.15);
}

/* ============ FEEDBACK MODAL ============ */
.fb-modal-root {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  transition: opacity 0.18s ease;
}
.fb-modal-root.show { opacity: 1; }

.fb-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(45, 42, 74, 0.45);
  backdrop-filter: blur(2px);
}

.fb-modal {
  position: relative;
  background: var(--bg-paper);
  border: 4px solid var(--ink);
  border-radius: 24px;
  padding: 22px 22px 18px;
  max-width: 460px;
  width: 100%;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  box-shadow: var(--shadow);
  transform: translateY(20px) scale(0.96);
  transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.fb-modal-root.show .fb-modal {
  transform: translateY(0) scale(1);
}

.fb-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.fb-title {
  font-size: 20px;
  font-weight: 900;
  color: var(--ink);
}
.fb-close {
  background: white;
  border: 2.5px solid var(--ink);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  font-size: 18px;
  font-weight: 900;
  cursor: pointer;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-family: inherit;
  line-height: 1;
}
.fb-close:hover { background: var(--error); color: white; }

.fb-qid {
  font-size: 12px;
  color: var(--ink-soft);
  margin-bottom: 14px;
}
.fb-qid code {
  background: #FFFBF0;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid #E5E2F0;
  font-size: 11px;
  font-family: 'Fredoka', monospace;
}

.fb-section-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 8px;
  margin-top: 4px;
}

.fb-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.fb-chip {
  background: white;
  border: 2.5px solid var(--ink);
  border-radius: 999px;
  padding: 8px 12px;
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  box-shadow: var(--shadow-sm);
  transition: all 0.12s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.fb-chip:hover {
  transform: translateY(1px);
  box-shadow: 0 2px 0 rgba(45, 42, 74, 0.15);
}
.fb-chip.selected {
  background: var(--secondary);
  color: white;
  border-color: #2EA89C;
}
.fb-chip-emoji { font-size: 16px; }

.fb-textarea {
  width: 100%;
  min-height: 70px;
  background: white;
  border: 2.5px solid var(--ink);
  border-radius: 12px;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 14px;
  color: var(--ink);
  resize: vertical;
  outline: none;
  box-shadow: var(--shadow-sm);
  margin-bottom: 16px;
}
.fb-textarea:focus { border-color: var(--primary); }

.fb-footer {
  display: flex;
  gap: 10px;
}
.fb-footer .btn {
  flex: 1;
  margin: 0;
  font-size: 14px;
  padding: 10px 14px;
}

.fb-toast {
  position: absolute;
  left: 50%;
  bottom: -42px;
  transform: translateX(-50%);
  background: var(--ink);
  color: white;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  white-space: nowrap;
  max-width: 90vw;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fb-toast.show { opacity: 1; }
.fb-toast.ok { background: var(--success); }
.fb-toast.warn { background: var(--orange); }

/* ============ SETTINGS MODAL ============ */
.settings-modal {
  position: relative;
  background: var(--bg-paper);
  border: 4px solid var(--ink);
  border-radius: 24px;
  padding: 22px 22px 18px;
  max-width: 520px;
  width: 100%;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  box-shadow: var(--shadow);
  transform: translateY(20px) scale(0.96);
  transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.settings-modal-root.show .settings-modal {
  transform: translateY(0) scale(1);
}

.settings-section {
  border-top: 2px dashed var(--ink-soft);
  padding-top: 14px;
  margin-top: 14px;
}
.settings-section:first-of-type {
  border-top: none;
  padding-top: 0;
  margin-top: 8px;
}
.settings-section-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 10px;
}

.settings-toggle-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  cursor: pointer;
  user-select: none;
}
.settings-toggle-row input[type="checkbox"] { display: none; }
.settings-toggle-switch {
  width: 44px;
  height: 24px;
  background: #E5E2F0;
  border: 2.5px solid var(--ink);
  border-radius: 999px;
  position: relative;
  transition: background 0.15s;
  flex-shrink: 0;
}
.settings-toggle-switch::after {
  content: '';
  position: absolute;
  top: 1px;
  left: 1px;
  width: 16px;
  height: 16px;
  background: white;
  border: 2px solid var(--ink);
  border-radius: 50%;
  transition: left 0.15s;
}
.settings-toggle-row input[type="checkbox"]:checked + .settings-toggle-switch {
  background: var(--success);
}
.settings-toggle-row input[type="checkbox"]:checked + .settings-toggle-switch::after {
  left: 21px;
}

.settings-slider-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.settings-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  flex-shrink: 0;
  min-width: 70px;
}
.settings-slider {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  background: #E5E2F0;
  border: 2px solid var(--ink);
  border-radius: 999px;
  outline: none;
  cursor: pointer;
}
.settings-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--primary);
  border: 2.5px solid var(--ink);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}
.settings-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--primary);
  border: 2.5px solid var(--ink);
  cursor: pointer;
}
.settings-slider-value {
  font-size: 13px;
  font-weight: 800;
  color: var(--ink);
  min-width: 26px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.settings-test-btn {
  background: white;
  border: 2px solid var(--ink);
  border-radius: 50%;
  width: 30px;
  height: 30px;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-family: inherit;
  flex-shrink: 0;
}
.settings-test-btn:hover { background: var(--accent); }

.settings-stats {
  font-size: 13px;
  color: var(--ink);
  background: #FFFBF0;
  border: 2px dashed var(--ink-soft);
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 10px;
  line-height: 1.6;
}
.settings-stats strong { color: var(--primary-deep); }

.settings-button-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.settings-btn {
  flex: 1;
  background: white;
  border: 2.5px solid var(--ink);
  border-radius: 999px;
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  font-family: inherit;
  box-shadow: var(--shadow-sm);
  transition: all 0.15s;
  text-align: center;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 120px;
}
.settings-btn:hover:not(:disabled) {
  background: #FFFBF0;
  transform: translateY(1px);
  box-shadow: 0 2px 0 rgba(45, 42, 74, 0.15);
}
.settings-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.settings-btn.danger {
  color: var(--error);
  border-color: var(--error);
}
.settings-btn.danger:hover:not(:disabled) {
  background: #FFEFEF;
}

.settings-about {
  background: #FFFBF0;
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 10px;
}
.settings-about-row {
  font-size: 13px;
  color: var(--ink);
  margin-bottom: 6px;
  line-height: 1.6;
}
.settings-about-row:last-child { margin-bottom: 0; }
.settings-link {
  color: var(--primary);
  text-decoration: none;
  font-weight: 700;
}
.settings-link:hover { text-decoration: underline; }

/* ============ WEAK-SPOT CTA (final screen) ============ */
.weak-spot-cta {
  background: linear-gradient(135deg, #FFFBF0, #FFF3D6);
  border: 3px solid var(--accent);
  border-radius: 16px;
  padding: 14px 16px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  box-shadow: var(--shadow-sm);
}
.weak-spot-cta.weak-spot-unpracticed {
  background: linear-gradient(135deg, #F0FCEF, #E8F8E0);
  border-color: var(--success);
}
.weak-spot-icon {
  font-size: 32px;
  flex-shrink: 0;
}
.weak-spot-body {
  flex: 1;
  min-width: 180px;
  text-align: left;
}
.weak-spot-headline {
  font-size: 14px;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 2px;
}
.weak-spot-sub {
  font-size: 12px;
  color: var(--ink-soft);
  font-weight: 600;
  line-height: 1.5;
}
.weak-spot-btn {
  flex: 0 0 auto;
  font-size: 13px;
  padding: 10px 16px;
  min-width: 110px;
}

@media (max-width: 520px) {
  .settings-modal { padding: 18px 16px 14px; }
  .settings-label { min-width: 56px; font-size: 12px; }
  .settings-slider-row { gap: 8px; }
  .settings-test-btn { width: 26px; height: 26px; font-size: 12px; }
  .settings-button-row { gap: 6px; }
  .settings-btn { font-size: 12px; padding: 8px 10px; min-width: 100px; }

  .weak-spot-cta { padding: 12px; gap: 10px; }
  .weak-spot-icon { font-size: 26px; }
  .weak-spot-headline { font-size: 13px; }
  .weak-spot-sub { font-size: 11px; }
  .weak-spot-btn { width: 100%; flex: 1 1 100%; }
}

/* 系統回饋 modal 的「整個網站」標籤 */
.fb-tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  border: 2px solid var(--ink);
}
.fb-tag-sys {
  background: linear-gradient(135deg, #FFD93D, #FF9F45);
  color: var(--ink);
}

/* card 加 position:relative 讓 feedback-btn 能 absolute 定位 */
.card { position: relative; }

/* ============ RADAR CHART (final screen) ============ */
.radar-section {
  background: white;
  border: 3px solid var(--ink);
  border-radius: 18px;
  padding: 20px 16px 14px;
  box-shadow: var(--shadow-sm);
  margin: 22px 0;
}
.radar-section-title {
  font-size: 18px;
  font-weight: 900;
  color: var(--ink);
  text-align: center;
  margin-bottom: 4px;
}
.radar-section-sub {
  font-size: 12px;
  color: var(--ink-soft);
  text-align: center;
  margin-bottom: 8px;
  font-weight: 500;
}
.radar-wrap {
  display: flex;
  justify-content: center;
  margin: 4px 0 12px;
}
.radar-chart .radar-data-polygon {
  animation: radarGrow 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
  transform-origin: center;
}
@keyframes radarGrow {
  from { transform: scale(0.4); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}
.radar-legend {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 4px 12px;
  padding: 8px 4px 0;
  border-top: 1px dashed var(--ink-soft);
}
.legend-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
}
.legend-swatch {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--ink);
  flex-shrink: 0;
}
.legend-name { flex: 1; }
.legend-stat { color: var(--ink-soft); font-weight: 700; }
.legend-empty {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--ink-soft);
  font-size: 13px;
  padding: 6px;
}

/* ============ WRONG REVIEW (final screen) ============ */
.wrong-review {
  background: #FFFBF0;
  border: 3px solid var(--ink);
  border-radius: 18px;
  padding: 16px 14px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 18px;
}
.wrong-review-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--primary-deep);
  margin-bottom: 10px;
}
.wrong-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: white;
  border: 2px solid var(--ink);
  border-radius: 10px;
  margin-bottom: 6px;
  font-size: 13px;
}
.wrong-tag {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}
.wrong-id {
  font-family: monospace;
  font-weight: 700;
  color: var(--ink);
  font-size: 12px;
}
.wrong-meta {
  margin-left: auto;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 500;
}
.wrong-review-empty {
  text-align: center;
  padding: 14px;
  color: var(--success);
  font-weight: 800;
  font-size: 15px;
  background: #F0FCEF;
  border: 2px dashed var(--success);
  border-radius: 14px;
  margin-bottom: 18px;
}

/* ============ RECORD TOOLS (final screen) ============ */
.record-tools {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 18px;
}
.record-btn {
  background: white;
  border: 2.5px solid var(--ink);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  font-family: inherit;
  box-shadow: var(--shadow-sm);
  transition: all 0.15s;
}
.record-btn:hover {
  background: #FFFBF0;
  transform: translateY(1px);
  box-shadow: 0 2px 0 rgba(45, 42, 74, 0.15);
}
.record-btn.danger { color: var(--error); border-color: var(--error); }
.record-btn.danger:hover { background: #FFEFEF; }
.record-privacy {
  text-align: center;
  font-size: 11px;
  color: var(--ink-soft);
  margin-top: 8px;
  font-weight: 500;
  opacity: 0.8;
}

/* ============ TEST MODE BANNER (menu entry) ============ */
.test-mode-banner {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 16px;
  background: linear-gradient(135deg, #FFD93D 0%, #FF9F45 100%);
  border: 4px solid var(--ink);
  border-radius: 24px;
  padding: 18px 22px;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: all 0.2s;
  font-family: inherit;
  text-align: left;
  margin-top: 24px;
}
.test-mode-banner:hover {
  transform: translateY(-3px);
  box-shadow: 0 9px 0 rgba(45, 42, 74, 0.15);
}
.banner-emoji { font-size: 38px; }
.banner-text { flex: 1; display: flex; flex-direction: column; }
.banner-title { font-size: 19px; font-weight: 900; color: var(--ink); }
.banner-sub { font-size: 13px; color: var(--ink); font-weight: 600; opacity: 0.85; margin-top: 2px; }
.banner-arrow { font-size: 26px; color: var(--ink); font-weight: 900; }

.menu-section-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-soft);
  margin-top: 22px;
  margin-bottom: -4px;
  padding: 0 4px;
}

/* ============ SYSTEM FEEDBACK ROW (menu bottom) ============ */
.system-feedback-row {
  margin-top: 28px;
  text-align: center;
  padding: 16px;
  background: rgba(255, 255, 255, 0.4);
  border: 2px dashed var(--ink-soft);
  border-radius: 18px;
}
.system-feedback-btn {
  background: white;
  border: 3px solid var(--ink);
  border-radius: 999px;
  padding: 10px 22px;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  font-family: inherit;
  box-shadow: var(--shadow-sm);
  transition: all 0.15s;
}
.system-feedback-btn:hover {
  background: linear-gradient(135deg, #FFFBF0, #FFF3D6);
  transform: translateY(2px);
  box-shadow: 0 2px 0 rgba(45, 42, 74, 0.15);
}
.system-feedback-hint {
  font-size: 12px;
  color: var(--ink-soft);
  margin-top: 8px;
  font-weight: 500;
  opacity: 0.85;
}

/* about 頁連結 */
.about-link-row {
  text-align: center;
  margin-top: 18px;
  padding-bottom: 10px;
}
.about-link {
  display: inline-block;
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 16px;
  border-radius: 999px;
  transition: all 0.15s;
}
.about-link:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.5);
  text-decoration: underline;
}

/* ============ TEST SETUP ============ */
.test-setup-card { margin-top: 16px; padding-top: 36px; }
.setup-h2 {
  font-size: 22px;
  font-weight: 900;
  color: var(--ink);
  margin-bottom: 6px;
  text-align: center;
}
.setup-intro {
  font-size: 14px;
  color: var(--ink-soft);
  margin-bottom: 22px;
  text-align: center;
  font-weight: 500;
  line-height: 1.6;
}
.setup-intro strong { background: var(--accent); padding: 1px 6px; border-radius: 4px; color: var(--ink); }

.setup-section { margin-bottom: 18px; }
.setup-h3 {
  font-size: 14px;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 8px;
}
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.setup-chip {
  background: white;
  border: 2.5px solid var(--ink);
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  box-shadow: var(--shadow-sm);
  transition: all 0.12s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.setup-chip:hover:not(:disabled) {
  transform: translateY(1px);
  box-shadow: 0 2px 0 rgba(45, 42, 74, 0.15);
}
.setup-chip.active {
  background: var(--secondary);
  color: white;
  border-color: #2EA89C;
}
.setup-chip:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  background: #F0EDF7;
}
.chip-emoji { font-size: 16px; }
.chip-count {
  font-size: 11px;
  font-weight: 600;
  opacity: 0.75;
}

.setup-summary {
  background: #FFFBF0;
  border: 2px dashed var(--ink);
  border-radius: 12px;
  padding: 10px 14px;
  margin: 14px 0 18px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  text-align: center;
}
.setup-summary .warn { color: var(--error); font-weight: 800; }

#startTestBtn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
#startTestBtn:disabled:hover {
  transform: none;
}

/* ============ TEST IN PROGRESS ============ */
.test-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.test-timer {
  background: white;
  border: 3px solid var(--ink);
  border-radius: 14px;
  padding: 6px 14px;
  font-size: 16px;
  font-weight: 800;
  color: var(--ink);
  box-shadow: var(--shadow-sm);
  min-width: 90px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.test-timer.timer-warn {
  background: #FFF3D6;
  color: var(--orange);
  border-color: var(--orange);
}
.test-timer.timer-critical {
  background: var(--error);
  color: white;
  border-color: #C84040;
  animation: timerPulse 0.6s ease-in-out infinite;
}
@keyframes timerPulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.06); }
}

.test-card { padding-top: 36px; }
.test-card .feedback-btn { display: none; }  /* 測驗模式不顯示 feedback 按鈕,避免分心 */

.test-option.test-picked {
  background: #FFF3D6;
  border-color: var(--orange);
  box-shadow: 0 2px 0 rgba(255, 159, 69, 0.4);
}
.test-option.test-picked .label {
  background: var(--orange);
  color: white;
}

.test-actions {
  display: flex;
  gap: 8px;
  margin-top: 18px;
  flex-wrap: wrap;
}
.test-actions .btn {
  flex: 1;
  min-width: 90px;
  font-size: 14px;
  padding: 12px 14px;
}

/* ============ TEST RESULT ============ */
.stats-4 {
  grid-template-columns: repeat(4, 1fr);
}
@media (max-width: 520px) {
  .stats-4 { grid-template-columns: repeat(2, 1fr); }
}

.test-review-section {
  margin-top: 22px;
  text-align: left;
}
.test-review-title {
  font-size: 16px;
  font-weight: 900;
  color: var(--ink);
  margin-bottom: 10px;
}
.review-item {
  background: white;
  border: 3px solid var(--ink);
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 8px;
  box-shadow: var(--shadow-sm);
}
.review-item.review-right { border-color: var(--success); background: #F0FCEF; }
.review-item.review-wrong { border-color: var(--error);   background: #FFEFEF; }
.review-item.review-skip  { border-color: var(--ink-soft); background: #F5F4FA; }
.review-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 700;
}
.review-no {
  background: var(--ink);
  color: white;
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 12px;
}
.review-topic { color: var(--ink-soft); flex: 1; }
.review-status {
  font-size: 18px;
  font-weight: 900;
  min-width: 24px;
  text-align: center;
}
.review-right .review-status { color: var(--success); }
.review-wrong .review-status { color: var(--error); }
.review-skip  .review-status { color: var(--ink-soft); }

.review-prompt {
  font-size: 14px;
  color: var(--ink);
  font-weight: 600;
  margin-bottom: 6px;
  line-height: 1.4;
}
.review-answers {
  display: flex;
  gap: 10px;
  font-size: 13px;
  flex-wrap: wrap;
}
.review-picked {
  padding: 2px 10px;
  border-radius: 999px;
  background: white;
  border: 2px solid var(--ink);
  color: var(--ink);
  font-weight: 700;
}
.review-correct {
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--success);
  color: white;
  border: 2px solid #4FAF5C;
  font-weight: 700;
}
.review-detail {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--ink-soft);
  font-size: 13px;
}
.review-detail summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--primary-deep);
  padding: 4px 0;
}
.review-detail .hint-question,
.review-detail .explanation { font-size: 13px; margin: 6px 0; }
