/* ============================================
   拼图中国 — 清新配色 v3
   ============================================ */

:root {
  --primary: #5B8FF9;
  --primary-dark: #3B6FD4;
  --primary-light: #9EC5FF;
  --accent: #5AD8A6;
  --accent-dark: #3CB88C;
  --warm: #FF9D76;
  --warm-dark: #E8825E;
  --star: #F6AD55;
  --bg: #F7F9FC;
  --bg-light: #FFFFFF;
  --bg-dark: #E8ECF2;
  --text: #2D3748;
  --text-light: #718096;
  --text-muted: #A0AEC0;
  --border: #E2E8F0;
  --border-light: #EDF2F7;
  --wrong: #FC8181;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow: 0 4px 20px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.1);
  --radius: 12px;
  --transition: 0.3s ease;
}

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

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow: hidden;
  height: 100vh;
  width: 100vw;
}

/* ── 通用 ─────────────────────────────── */
.screen {
  position: fixed;
  inset: 0;
  display: none;
  flex-direction: column;
  z-index: 1;
}
.screen.active { display: flex; }

.hidden { display: none !important; }

button {
  cursor: pointer;
  border: none;
  font-family: inherit;
  font-size: inherit;
}

/* ── 开始界面 ──────────────────────────── */
#start-screen {
  background: linear-gradient(135deg, #4F7DF3 0%, #5B8FF9 40%, #8EC5FC 100%);
  justify-content: center;
  align-items: center;
  color: white;
  overflow-y: auto;
  padding-top: max(48px, env(safe-area-inset-top));
  padding-bottom: max(24px, env(safe-area-inset-bottom));
}

.start-inner {
  text-align: center;
  max-width: 600px;
  padding: 32px;
  background: rgba(255,255,255,0.18);
  border-radius: 24px;
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.25);
  margin: 20px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.1);
}

.game-title {
  font-size: 3.2rem;
  font-weight: 900;
  letter-spacing: 0.15em;
  color: white;
  text-shadow: 0 2px 16px rgba(79,125,243,0.4);
  margin-bottom: 4px;
}

.game-subtitle {
  font-size: 1.05rem;
  opacity: 0.9;
  margin-bottom: 28px;
  letter-spacing: 0.2em;
  color: rgba(255,255,255,0.9);
}

.start-options {
  margin-bottom: 24px;
}

.option-group {
  margin-bottom: 16px;
  text-align: left;
}

.option-group label {
  display: block;
  font-size: 0.9rem;
  opacity: 0.9;
  margin-bottom: 8px;
  font-weight: 600;
  color: white;
}

/* 问答子选项：地区下拉 */
.quiz-select {
  width: 100%;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.3);
  background: rgba(255,255,255,0.92);
  color: #333;
  font-size: 0.9rem;
  outline: none;
  cursor: pointer;
}

/* 音效开关按钮 */
.btn-sound {
  margin-left: 10px;
  padding: 5px 12px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.35);
  background: rgba(255,255,255,0.2);
  color: white;
  font-size: 0.78rem;
  cursor: pointer;
  transition: var(--transition);
}
.btn-sound:hover { background: rgba(255,255,255,0.32); }
.btn-sound.sound-off { opacity: 0.7; }

/* 结算页勋章 */
.result-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin: 10px 0 4px;
}
.badge-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 12px;
  border-radius: 14px;
  background: linear-gradient(135deg, #FFD666, #FF9D76);
  color: #5a3d00;
  font-size: 0.82rem;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(255,157,118,0.4);
}

/* 结算页省份小统计 */
.result-stats-extra {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin: 8px 0 12px;
  flex-wrap: wrap;
}
.stat-extra {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 110px;
  padding: 8px 14px;
  border-radius: 12px;
  background: rgba(91,143,249,0.1);
}
.stat-extra .stat-label { font-size: 0.74rem; color: #888; }
.stat-extra .stat-value { font-size: 0.95rem; font-weight: 700; color: #5B8FF9; margin-top: 2px; }

.btn-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-option {
  padding: 8px 18px;
  border-radius: 20px;
  background: rgba(255,255,255,0.2);
  color: white;
  font-size: 0.9rem;
  transition: var(--transition);
  border: 1px solid rgba(255,255,255,0.3);
}
.btn-option:hover {
  background: rgba(255,255,255,0.35);
}
.btn-option.active {
  background: white;
  color: var(--primary-dark);
  font-weight: 700;
  border-color: white;
  box-shadow: 0 2px 12px rgba(0,0,0,0.1);
}

.mode-desc {
  font-size: 0.85rem;
  opacity: 0.9;
  line-height: 1.6;
  padding: 12px 16px;
  background: rgba(255,255,255,0.12);
  border-radius: 10px;
  margin-top: 8px;
  text-align: left;
  min-height: 50px;
  border-left: 3px solid white;
  color: rgba(255,255,255,0.95);
}

.diff-desc {
  font-size: 0.82rem;
  color: #4A5568;
  line-height: 1.7;
  background: white;
  border-radius: 8px;
  padding: 10px 14px;
  margin: 6px 0 10px;
  border-left: 3px solid var(--primary);
  animation: fadeIn 0.3s;
  text-align: left;
  box-shadow: var(--shadow-sm);
}
.diff-desc .diff-title {
  font-weight: 700;
  color: var(--primary);
  display: block;
  margin-bottom: 6px;
  font-size: 0.9rem;
}
.diff-desc .diff-item {
  margin: 4px 0;
  padding-left: 8px;
  color: var(--text-light);
}
.btn-help {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1.5px solid white;
  background: transparent;
  color: white;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  margin-left: 6px;
  vertical-align: middle;
  transition: all 0.2s;
  line-height: 1;
  padding: 0;
}
.btn-help:hover {
  background: white;
  color: var(--primary);
}

.btn-start {
  display: inline-block;
  padding: 14px 48px;
  font-size: 1.2rem;
  font-weight: 700;
  border-radius: 32px;
  background: white;
  color: var(--primary-dark);
  transition: var(--transition);
  letter-spacing: 0.1em;
  margin-top: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}
.btn-start:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(255,255,255,0.3);
}
.btn-start.btn-secondary {
  background: rgba(255,255,255,0.25);
  color: white;
  margin-left: 12px;
}
.btn-start.btn-secondary:hover {
  background: rgba(255,255,255,0.4);
}

.start-footer {
  margin-top: 20px;
  font-size: 0.8rem;
  opacity: 0.7;
}

/* ── 游戏界面 ──────────────────────────── */
#game-screen {
  background: var(--bg);
  overscroll-behavior: none;
  touch-action: none;
}

/* 顶部栏 */
#top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  background: white;
  color: var(--text);
  z-index: 10;
  flex-shrink: 0;
  height: 44px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.bar-left, .bar-center, .bar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.bar-label {
  font-size: 0.78rem;
  background: var(--bg);
  padding: 3px 10px;
  border-radius: 12px;
  color: var(--text-light);
  font-weight: 600;
}

#timer-display, #score-display {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  min-width: 50px;
  font-size: 0.9rem;
  color: var(--text);
}

.btn-icon {
  background: var(--bg);
  color: var(--text);
  padding: 5px 12px;
  border-radius: 8px;
  font-size: 0.8rem;
  transition: var(--transition);
  border: 1px solid var(--border);
}
.btn-icon:hover { background: var(--bg-dark); }
#btn-hint:disabled { opacity: 0.4; cursor: not-allowed; }

/* 旋转操作提示栏 */
.rotate-hint-bar {
  background: var(--primary-light);
  color: var(--primary-dark);
  text-align: center;
  padding: 4px 16px;
  font-size: 0.78rem;
  flex-shrink: 0;
  animation: fadeIn 0.3s;
  font-weight: 600;
}

/* 进度条 */
#progress-bar-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 16px;
  background: white;
  flex-shrink: 0;
  border-bottom: 1px solid var(--border-light);
}
#progress-bar {
  flex: 1;
  height: 6px;
  background: var(--border-light);
  border-radius: 3px;
  overflow: hidden;
}
#progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--primary));
  border-radius: 3px;
  transition: width 0.4s ease;
}
#progress-text {
  font-size: 0.78rem;
  color: var(--text-light);
  min-width: 50px;
  text-align: right;
}

/* 地图区域 */
#map-area {
  flex: 1;
  display: flex;
  position: relative;
  overflow: hidden;
}

#map-svg {
  flex: 1;
  width: 100%;
  height: 100%;
  background: transparent;
  touch-action: none;
}

/* 省份目标轮廓（ghost） */
.province-target {
  fill: rgba(0,0,0,0.03);
  stroke: #C8D6E5;
  stroke-width: 1.5;
  stroke-dasharray: 6 4;
  transition: fill 0.3s;
}
.province-target.highlight {
  fill: rgba(91,143,249,0.12);
  stroke: var(--primary);
  stroke-width: 2;
}

/* 省份拼块 */
.province-piece {
  cursor: grab;
  transition: filter 0.2s;
}
.province-piece:hover {
  filter: brightness(1.1) drop-shadow(0 2px 10px rgba(0,0,0,0.15));
}
.province-piece.dragging {
  cursor: grabbing;
  filter: drop-shadow(0 8px 24px rgba(0,0,0,0.25));
}
.province-piece.snapped {
  cursor: default;
}
/* 自由拼图模式：已放置拼块仍可拖动（整组移动） */
.province-piece.placed {
  cursor: grab;
}
.province-piece.placed.dragging {
  cursor: grabbing;
}
.province-piece.wrong {
  animation: wrong-flash 0.4s ease;
}
/* 港澳等小省份的透明放大点击区域 */
.hk-mo-hit {
  pointer-events: all !important;
  cursor: grab;
}

/* 吸附闪光动画 */
.province-piece.just-snapped {
  animation: snap-flash 0.5s ease;
}
@keyframes snap-flash {
  0% { filter: brightness(1.8) drop-shadow(0 0 24px #5B8FF9); }
  100% { filter: brightness(1) drop-shadow(0 0 0 transparent); }
}

@keyframes wrong-flash {
  0%, 100% { filter: none; }
  30%, 70% { filter: drop-shadow(0 0 14px #FC8181) brightness(1.15); }
}

/* 拼块标签 */
.piece-label {
  font-size: 11px;
  font-weight: 700;
  fill: white;
  text-anchor: middle;
  pointer-events: none;
  text-shadow: 0 1px 3px rgba(0,0,0,0.4);
}

/* 旋转拼块视觉提示 */
.province-piece[data-rotation="90"] .piece-inner,
.province-piece[data-rotation="180"] .piece-inner,
.province-piece[data-rotation="270"] .piece-inner {
  filter: drop-shadow(0 0 6px rgba(91,143,249,0.5));
}

/* 海岸线参考（自由拼图模式） */
.coastline-ref path {
  pointer-events: none;
}

/* ── 自由拼图组样式 ─────────────────────── */
.puzzle-group {
  cursor: grab;
  transition: filter 0.2s;
}
.puzzle-group:hover {
  filter: brightness(1.1) drop-shadow(0 2px 10px rgba(0,0,0,0.15));
}
.puzzle-group.dragging {
  cursor: grabbing;
  filter: drop-shadow(0 8px 24px rgba(0,0,0,0.25));
}
.puzzle-group.just-merged {
  animation: merge-flash 0.6s ease;
}
@keyframes merge-flash {
  0% { filter: brightness(1.8) drop-shadow(0 0 24px #5AD8A6); }
  100% { filter: brightness(1) drop-shadow(0 0 0 transparent); }
}
/* 旋转拼块视觉提示（自由模式） */
.puzzle-group[data-rotation="90"],
.puzzle-group[data-rotation="180"],
.puzzle-group[data-rotation="270"] {
  filter: drop-shadow(0 0 6px rgba(91,143,249,0.4));
}
.puzzle-group[data-rotation="90"]:hover,
.puzzle-group[data-rotation="180"]:hover,
.puzzle-group[data-rotation="270"]:hover {
  filter: brightness(1.1) drop-shadow(0 2px 10px rgba(0,0,0,0.15)) drop-shadow(0 0 6px rgba(91,143,249,0.4));
}

/* 信息卡 */
#info-card {
  position: absolute;
  bottom: 16px;
  right: 16px;
  width: 260px;
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px;
  z-index: 20;
  border: 1px solid var(--border);
}
#info-card.hidden { display: none; }
.btn-close {
  position: absolute;
  top: 6px;
  right: 10px;
  background: none;
  font-size: 1.3rem;
  color: var(--text-muted);
  line-height: 1;
}
#card-body h3 {
  font-size: 1.05rem;
  margin-bottom: 6px;
  color: var(--primary);
}
#card-body p {
  font-size: 0.82rem;
  color: var(--text-light);
  line-height: 1.6;
  margin-bottom: 4px;
}
#card-body .card-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}
#card-body .card-meta span {
  font-size: 0.76rem;
  background: var(--bg);
  padding: 2px 8px;
  border-radius: 4px;
  color: var(--text-light);
}

/* ── 结算界面 ──────────────────────────── */
#result-screen {
  background: linear-gradient(135deg, #1A365D 0%, #2D5A8E 50%, #3B6FD4 100%);
  justify-content: center;
  align-items: center;
  color: white;
}

.result-inner {
  text-align: center;
  padding: 40px;
}

.result-grade {
  font-size: 5rem;
  font-weight: 900;
  color: white;
  text-shadow: 0 0 40px rgba(255,255,255,0.3);
  line-height: 1;
  margin-bottom: 8px;
}
.result-grade.s { color: #FFD666; }
.result-grade.a { color: #5AD8A6; }
.result-grade.b { color: #7EB8FF; }
.result-grade.c { color: #FC8181; }
.result-grade.d { color: #A0AEC0; }

.result-mode-info {
  font-size: 0.95rem;
  opacity: 0.7;
  margin-bottom: 12px;
  letter-spacing: 0.05em;
}

#result-title {
  font-size: 1.5rem;
  font-weight: 700;
  opacity: 0.9;
  margin-bottom: 24px;
}

.result-stats {
  display: flex;
  gap: 24px;
  justify-content: center;
  margin: 24px 0;
}
.stat {
  text-align: center;
}
.stat-label {
  display: block;
  font-size: 0.8rem;
  opacity: 0.6;
  margin-bottom: 4px;
}
.stat-value {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
}

.result-best {
  font-size: 0.85rem;
  opacity: 0.6;
  margin-bottom: 28px;
}

.result-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

/* ── 知识卡片弹窗 ──────────────────────── */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 100;
}
.modal.hidden { display: none; }

.modal-content {
  background: white;
  border-radius: 16px;
  max-width: 420px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  padding: 24px;
  position: relative;
  color: var(--text);
  box-shadow: var(--shadow-lg);
}
.btn-close-modal {
  position: absolute;
  top: 10px;
  right: 14px;
  background: none;
  font-size: 1.5rem;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
}

.knowledge-content h2 {
  font-size: 1.3rem;
  color: var(--primary);
  margin-bottom: 4px;
}
.knowledge-content .k-region {
  font-size: 0.82rem;
  color: var(--accent-dark);
  font-weight: 600;
  margin-bottom: 12px;
}
.knowledge-content .k-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.knowledge-content .k-tag {
  font-size: 0.78rem;
  background: var(--bg);
  padding: 3px 10px;
  border-radius: 6px;
  color: var(--text-light);
}
.knowledge-content .k-funfact {
  font-size: 0.88rem;
  line-height: 1.7;
  color: var(--text);
  margin-top: 12px;
  padding: 12px;
  background: var(--bg);
  border-radius: 8px;
  border-left: 3px solid var(--accent);
}

/* ── 烟花粒子 ──────────────────────────── */
.confetti {
  position: fixed;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 200;
  animation: confetti-fall 1.5s ease-out forwards;
}

@keyframes confetti-fall {
  0% { opacity: 1; transform: translateY(0) rotate(0deg); }
  100% { opacity: 0; transform: translateY(300px) rotate(720deg); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ── 知识问答界面 ──────────────────────── */
#quiz-screen {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

#quiz-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(8px);
  color: white;
  z-index: 10;
  flex-shrink: 0;
  height: 44px;
}
#quiz-top-bar .bar-label {
  background: rgba(255,255,255,0.2);
  color: white;
  font-weight: 600;
}
#quiz-top-bar .btn-icon {
  background: rgba(255,255,255,0.15);
  color: white;
  border: 1px solid rgba(255,255,255,0.3);
}
.quiz-timer {
  font-size: 1.4rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  color: #FFD666;
  min-width: 40px;
  text-align: center;
}
#quiz-progress-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(255,255,255,0.9);
}

#quiz-content {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 16px;
  overflow-y: auto;
}

#quiz-card {
  background: white;
  border-radius: 20px;
  padding: 32px 24px;
  max-width: 440px;
  width: 100%;
  box-shadow: 0 12px 40px rgba(0,0,0,0.15);
  text-align: center;
  animation: fadeIn 0.4s ease;
}

.quiz-province {
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--primary-dark);
  margin-bottom: 8px;
}

.quiz-question {
  font-size: 1.05rem;
  color: var(--text-light);
  margin-bottom: 20px;
}

.quiz-choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}

.quiz-choice {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 16px;
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: 12px;
  font-size: 1rem;
  color: var(--text);
  transition: all 0.2s;
  cursor: pointer;
  text-align: left;
}
.quiz-choice:hover {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(91,143,249,0.2);
}
.quiz-choice:active {
  transform: scale(0.97);
}
.quiz-choice.correct {
  background: #D4EDDA;
  border-color: #5AD8A6;
  color: #155724;
}
.quiz-choice.wrong {
  background: #F8D7DA;
  border-color: #FC8181;
  color: #721C24;
}
.quiz-choice:disabled {
  cursor: default;
  pointer-events: none;
}

.choice-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary-dark);
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}
.quiz-choice.correct .choice-label {
  background: #5AD8A6;
  color: white;
}
.quiz-choice.wrong .choice-label {
  background: #FC8181;
  color: white;
}

.choice-text {
  flex: 1;
  font-weight: 600;
}

.quiz-feedback {
  font-size: 1rem;
  font-weight: 700;
  padding: 10px 16px;
  border-radius: 10px;
  margin-bottom: 12px;
  animation: fadeIn 0.3s;
}
.quiz-feedback.hidden { display: none; }
.quiz-feedback.correct {
  background: #D4EDDA;
  color: #155724;
  border: 1px solid #5AD8A6;
}
.quiz-feedback.wrong {
  background: #F8D7DA;
  color: #721C24;
  border: 1px solid #FC8181;
}

#quiz-score-bar {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-top: 8px;
}
.quiz-stat {
  font-size: 0.85rem;
  color: var(--text-light);
  font-weight: 600;
}
.quiz-stat span {
  color: var(--primary);
  font-weight: 800;
}

/* ── 填空题输入 ────────────────────────── */
.quiz-fill {
  margin-bottom: 12px;
  animation: fadeIn 0.3s;
}

.quiz-fill-input {
  width: 100%;
  padding: 14px 16px;
  font-size: 1.4rem;
  font-weight: 700;
  text-align: center;
  border: 2px solid var(--border);
  border-radius: 12px;
  outline: none;
  color: var(--text);
  background: var(--bg);
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}
.quiz-fill-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(91, 143, 249, 0.15);
}
.quiz-fill-input.correct {
  border-color: #5AD8A6;
  background: #D4EDDA;
}
.quiz-fill-input.wrong {
  border-color: #FC8181;
  background: #F8D7DA;
}
.quiz-fill-input:disabled {
  opacity: 0.7;
  cursor: default;
}

.quiz-fill-submit {
  margin-top: 12px;
  width: 100%;
  padding: 12px;
  font-size: 1rem;
  font-weight: 700;
  border: none;
  border-radius: 12px;
  background: var(--primary);
  color: white;
  cursor: pointer;
  transition: background 0.2s;
}
.quiz-fill-submit:hover {
  background: var(--primary-dark);
}
.quiz-fill-submit:active {
  transform: scale(0.98);
}

/* ── 响应式 ────────────────────────────── */
@media (max-width: 768px) {
  .game-title { font-size: 1.8rem; }
  .game-subtitle { font-size: 0.9rem; margin-bottom: 16px; }
  .start-inner {
    padding: 16px;
    margin: 8px;
    max-height: 92vh;
    overflow-y: auto;
    width: calc(100% - 16px);
    border-radius: 18px;
  }
  .start-options { margin-bottom: 12px; }
  .option-group { margin-bottom: 10px; }
  .option-group label { font-size: 0.82rem; margin-bottom: 4px; }
  .btn-option { padding: 6px 12px; font-size: 0.78rem; }
  .mode-desc { padding: 8px 10px; font-size: 0.78rem; }
  .diff-desc { padding: 8px 10px; font-size: 0.76rem; }
  .btn-start { padding: 10px 28px; font-size: 0.95rem; margin-top: 4px; }
  .start-footer { margin-top: 10px; font-size: 0.7rem; }
  #top-bar { padding: 6px 8px; font-size: 0.8rem; height: 40px; }
  .bar-center { gap: 6px; }
  .bar-label { font-size: 0.7rem; padding: 2px 8px; }
  #info-card { width: calc(100% - 24px); bottom: 8px; right: 8px; left: 8px; }
  .result-stats { gap: 12px; }
  .stat-value { font-size: 1.2rem; }
  .rotate-hint-bar { font-size: 0.7rem; padding: 3px 8px; }
  .quiz-province { font-size: 1.8rem; }
  .quiz-question { font-size: 0.95rem; }
  #quiz-card { padding: 20px 16px; }
  .quiz-choice { padding: 10px 12px; font-size: 0.9rem; }
  .quiz-timer { font-size: 1.2rem; }
}

@media (max-width: 480px) {
  .game-title { font-size: 1.5rem; }
  .game-subtitle { font-size: 0.8rem; }
  .start-inner { padding: 12px; margin: 6px; border-radius: 14px; }
  .btn-group { gap: 4px; }
  .btn-option { padding: 5px 10px; font-size: 0.75rem; }
  .mode-desc { font-size: 0.72rem; padding: 6px 8px; }
  .diff-desc { font-size: 0.72rem; padding: 6px 8px; }
  .btn-start { padding: 8px 24px; font-size: 0.88rem; }
  #map-svg { min-height: 300px; }
}
