/* ==========================================================================
   康軒六上國語遊戲化教學與互動測驗平台 - 全域樣式表 (UDL 特教友善與高對比防疲勞設計)
   ========================================================================== */

:root {
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: #eff6ff;
  --primary-focus: rgba(37, 99, 235, 0.25);
  
  --secondary: #f59e0b;
  --secondary-hover: #d97706;
  --secondary-light: #fef3c7;
  
  --success: #10b981;
  --success-light: #ecfdf5;
  --danger: #ef4444;
  --danger-light: #fef2f2;
  --warning: #f97316;
  
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --bg-card-alt: #f1f5f9;
  
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-sub: #64748b;
  
  --border-color: #cbd5e1;
  --border-focus: #3b82f6;
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 8px -1px rgba(0,0,0,0.08), 0 2px 4px -2px rgba(0,0,0,0.05);
  --shadow-lg: 0 10px 20px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.05);
  --shadow-pop: 0 12px 28px rgba(37, 99, 235, 0.18);

  /* UDL 特教無障礙預設：大字級與寬鬆行距 */
  --base-font-size: 20px;
  --reading-line-height: 2.1;
  --reading-letter-spacing: 0.04em;
}

/* 學生/特教大字模式 */
body.font-large {
  --base-font-size: 24px;
  --reading-line-height: 2.3;
}

body.font-xlarge {
  --base-font-size: 28px;
  --reading-line-height: 2.4;
}

/* 高對比模式 */
body.high-contrast {
  --bg-main: #000000;
  --bg-card: #18181b;
  --bg-card-alt: #27272a;
  --text-main: #ffffff;
  --text-muted: #e4e4e7;
  --text-sub: #a1a1aa;
  --border-color: #52525b;
  --primary-light: #1e3a8a;
  --secondary-light: #78350f;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang TC", "Microsoft JhengHei", "微軟正黑體", sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  font-size: var(--base-font-size);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.site-header {
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
  color: white;
  padding: 12px 24px;
  box-shadow: var(--shadow-md);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.brand-area {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.brand-logo {
  width: 44px;
  height: 44px;
  background: white;
  color: var(--primary);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 900;
  box-shadow: var(--shadow-sm);
}

.brand-title h1 {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  margin: 0;
}

.brand-title p {
  font-size: 0.8rem;
  opacity: 0.9;
  margin: 0;
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.nav-btn {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.nav-btn:hover {
  background: rgba(255, 255, 255, 0.28);
  transform: translateY(-1px);
}

.nav-btn.active {
  background: white;
  color: var(--primary);
  border-color: white;
}

.nav-btn.btn-warning {
  background: #f59e0b;
  color: #78350f;
  border: none;
  font-weight: 700;
}

.nav-btn.btn-warning:hover {
  background: #fbbf24;
}

/* ==========================================================================
   Main Layout & Container
   ========================================================================== */
.main-container {
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  padding: 20px;
  flex: 1;
}

/* 課次選擇條 (Lesson Bar) */
.lesson-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 8px 4px 16px 4px;
  margin-bottom: 20px;
  scrollbar-width: thin;
}

.lesson-pill {
  flex-shrink: 0;
  padding: 10px 18px;
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-lg);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 95px;
}

.lesson-pill .lesson-num {
  font-size: 0.8rem;
  opacity: 0.75;
}

.lesson-pill .lesson-name {
  font-size: 1.05rem;
  white-space: nowrap;
}

.lesson-pill:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
  transform: translateY(-2px);
}

.lesson-pill.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
  box-shadow: var(--shadow-pop);
}

.lesson-pill.active .lesson-num {
  opacity: 0.9;
}

/* ==========================================================================
   Mode Switcher (教學區 vs 測驗闖關區)
   ========================================================================== */
.mode-tabs {
  display: flex;
  background: var(--bg-card-alt);
  border-radius: var(--radius-lg);
  padding: 6px;
  gap: 8px;
  margin-bottom: 24px;
}

.mode-tab {
  flex: 1;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  border: none;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-muted);
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.2s ease;
}

.mode-tab:hover {
  color: var(--text-main);
}

.mode-tab.active {
  background: var(--bg-card);
  color: var(--primary);
  box-shadow: var(--shadow-md);
}

/* ==========================================================================
   Instructional View (教學為主的區塊)
   ========================================================================== */
.instruction-panel {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 1024px) {
  .instruction-panel {
    grid-template-columns: 320px 1fr;
  }
}

/* 左側：生字清單卡片 */
.vocab-sidebar {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  padding: 20px;
  height: fit-content;
  position: sticky;
  top: 90px;
}

.vocab-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(58px, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.vocab-tile {
  aspect-ratio: 1;
  background: var(--bg-card-alt);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s ease;
}

.vocab-tile .tile-zhuyin {
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--text-sub);
}

.vocab-tile:hover {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary);
  transform: scale(1.05);
}

.vocab-tile.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
  box-shadow: var(--shadow-pop);
}

.vocab-tile.active .tile-zhuyin {
  color: rgba(255, 255, 255, 0.9);
}

/* 右側主內容區 (Tab 導覽) */
.content-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.main-subnav-bar {
  display: flex;
  gap: 8px;
  padding: 14px 20px 0 20px;
  background: var(--bg-card-alt);
  border-bottom: 2px solid var(--border-color);
}

.main-subnav-btn {
  background: none;
  border: none;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-muted);
  padding: 10px 18px;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.main-subnav-btn:hover {
  background: white;
  color: var(--text-main);
}

.main-subnav-btn.active {
  background: white;
  color: var(--primary);
  border-top: 3px solid var(--primary);
  font-weight: 800;
}

/* ==========================================================================
   新版生字專區 (精確對齊使用者 3 張截圖之版面配置)
   ========================================================================== */

/* 1. 頂部深藍橫幅 (Header Banner) */
.vocab-zone-banner {
  background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%);
  color: white;
  padding: 18px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.vocab-zone-title-area {
  display: flex;
  align-items: center;
  gap: 14px;
}

.vocab-zone-icon {
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.vocab-zone-texts h2 {
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  margin: 0;
}

.vocab-zone-texts p {
  font-size: 0.85rem;
  opacity: 0.9;
  margin: 2px 0 0 0;
}

/* 膠囊切換選單 (4 Tabs) */
.vocab-zone-tabs {
  display: flex;
  background: rgba(0, 0, 0, 0.18);
  border-radius: var(--radius-full);
  padding: 5px;
  gap: 6px;
}

.vocab-zone-tab {
  background: transparent;
  border: none;
  color: white;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.vocab-zone-tab:hover {
  background: rgba(255, 255, 255, 0.2);
}

.vocab-zone-tab.active {
  background: white;
  color: #1e40af;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

/* 2. 【分頁一：本字學習】 (對應附圖一) */
.pane-core-learning {
  padding: 24px;
}

.core-learning-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 768px) {
  .core-learning-grid {
    grid-template-columns: 320px 1fr;
  }
}

/* 紅框田字格 (Tianzige) */
.tianzige-container {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.tianzige-box {
  width: 100%;
  aspect-ratio: 1;
  background: #ffffff;
  border: 3.5px solid #ef4444;
  border-radius: 24px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 14px rgba(239, 68, 68, 0.12);
  overflow: hidden;
}

/* 十字輔助線 */
.tianzige-box::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  border-top: 1.5px dashed #fca5a5;
  pointer-events: none;
}

.tianzige-box::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  border-left: 1.5px dashed #fca5a5;
  pointer-events: none;
}

.tianzige-char {
  font-size: 130px;
  font-weight: 900;
  color: #1e40af;
  line-height: 1;
  position: relative;
  z-index: 1;
  user-select: none;
}

.btn-speak-char {
  background: #059669;
  color: white;
  border: none;
  padding: 14px;
  border-radius: 16px;
  font-size: 1.15rem;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 4px 10px rgba(5, 150, 105, 0.25);
  transition: all 0.2s ease;
}

.btn-speak-char:hover {
  background: #047857;
  transform: translateY(-2px);
}

/* 右側：字義、注音、部首卡片 */
.core-right-col {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* 字義解釋卡 (淺黃色) */
.card-char-def {
  background: #fefce8;
  border: 1.5px solid #fef08a;
  border-radius: 20px;
  padding: 22px;
}

.card-char-def-header {
  font-size: 1.15rem;
  font-weight: 800;
  color: #92400e;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.card-char-def-body {
  font-size: 1.35rem;
  line-height: 1.8;
  color: #1e293b;
  font-weight: 700;
}

/* 雙並排屬性卡 (注音與部首) */
.core-meta-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.card-meta-zhuyin {
  background: #faf5ff;
  border: 1.5px solid #f3e8ff;
  border-radius: 20px;
  padding: 18px 22px;
  text-align: center;
}

.card-meta-zhuyin .lbl {
  font-size: 0.95rem;
  font-weight: 700;
  color: #7e22ce;
  margin-bottom: 6px;
}

.card-meta-zhuyin .val {
  font-size: 2.4rem;
  font-weight: 900;
  color: #6b21a8;
  line-height: 1.2;
}

.card-meta-radical {
  background: #f0fdf4;
  border: 1.5px solid #dcfce7;
  border-radius: 20px;
  padding: 18px 22px;
  text-align: center;
}

.card-meta-radical .lbl {
  font-size: 0.95rem;
  font-weight: 700;
  color: #15803d;
  margin-bottom: 6px;
}

.card-meta-radical .val {
  font-size: 2.4rem;
  font-weight: 900;
  color: #166534;
  line-height: 1.2;
}

/* 3. 【分頁三：造詞應用】 (對應附圖二 - 三欄直式卡片) */
.pane-vocab-words {
  padding: 24px;
}

.vocab-3col-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.word-vertical-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 22px;
  padding: 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: all 0.2s ease;
}

.word-vertical-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: #93c5fd;
}

/* AI 插圖預覽方塊 */
.ai-image-placeholder {
  background: #f8fafc;
  border: 1.5px dashed #cbd5e1;
  border-radius: 16px;
  height: 150px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #64748b;
  font-size: 0.9rem;
}

.btn-gen-ai-img {
  background: #4f46e5;
  color: white;
  border: none;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-gen-ai-img:hover {
  background: #4338ca;
  transform: scale(1.04);
}

/* 詞彙標題與語音列 */
.word-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.word-term-huge {
  font-size: 2rem;
  font-weight: 900;
  color: #1d4ed8;
}

.btn-circle-audio {
  width: 40px;
  height: 40px;
  background: #eff6ff;
  border: 1.5px solid #bfdbfe;
  color: #2563eb;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.1rem;
  transition: all 0.2s ease;
}

.btn-circle-audio:hover {
  background: #2563eb;
  color: white;
}

/* 詞意黃底小卡 */
.word-def-box {
  background: #fefce8;
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 1.05rem;
  line-height: 1.6;
  color: #1e293b;
}

.word-def-tag {
  color: #b45309;
  font-weight: 800;
}

/* 黃色左側粗線例句 */
.word-sentence-box {
  border-left: 4.5px solid #f59e0b;
  padding-left: 12px;
  font-size: 1.05rem;
  line-height: 1.6;
  color: #334155;
  margin-top: 4px;
}

/* 4. 【分頁四：形近字辨析】 (對應附圖三) */
.pane-similar-words {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

/* 頂部：本課目標字橫幅 */
.target-char-banner {
  background: #eff6ff;
  border: 1.5px solid #bfdbfe;
  border-radius: 22px;
  padding: 22px 26px;
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 24px;
}

.badge-target-char {
  position: absolute;
  top: 14px;
  right: 18px;
  background: #2563eb;
  color: white;
  padding: 4px 14px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 800;
}

.target-char-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 90px;
}

.target-char-left .big-char {
  font-size: 4.2rem;
  font-weight: 900;
  color: #1e3a8a;
  line-height: 1;
}

.target-char-left .big-zhuyin {
  font-size: 1.6rem;
  font-weight: 800;
  color: #2563eb;
  margin-top: 4px;
}

.target-char-right {
  flex: 1;
  min-width: 280px;
}

.target-def-pill {
  background: #dbeafe;
  color: #1e40af;
  padding: 3px 12px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 800;
  display: inline-block;
  margin-bottom: 8px;
}

.target-def-text {
  font-size: 1.3rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.7;
  margin-bottom: 12px;
}

.target-example-pill {
  background: white;
  border: 1.5px solid #bfdbfe;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 1.05rem;
  color: #1e293b;
}

.target-example-pill strong {
  color: #2563eb;
}

/* 底部：三欄形近字卡片 */
.similar-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.similar-vertical-card {
  background: #ffffff;
  border: 2px solid #fed7aa;
  border-radius: 22px;
  padding: 20px;
  box-shadow: var(--shadow-sm);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: all 0.2s ease;
}

.similar-vertical-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: #f97316;
}

.similar-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.similar-badge-orange {
  background: #ea580c;
  color: white;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 800;
}

.btn-circle-orange-audio {
  width: 38px;
  height: 38px;
  background: #fff7ed;
  border: 1.5px solid #ffedd5;
  color: #ea580c;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.05rem;
  transition: all 0.2s ease;
}

.btn-circle-orange-audio:hover {
  background: #ea580c;
  color: white;
}

.similar-char-title-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.similar-char-big {
  font-size: 3rem;
  font-weight: 900;
  color: #0f172a;
  line-height: 1;
}

.similar-zhuyin-big {
  font-size: 1.7rem;
  font-weight: 900;
  color: #ea580c;
}

.similar-def-text {
  font-size: 1.15rem;
  color: #475569;
  line-height: 1.6;
}

.similar-word-subcard {
  background: #fffbeb;
  border: 1px solid #fef3c7;
  border-radius: 16px;
  padding: 12px 16px;
  margin-top: auto;
}

.similar-word-tag {
  background: #ffedd5;
  color: #9a3412;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 800;
  display: inline-block;
  margin-bottom: 6px;
}

.similar-word-term {
  font-size: 1.8rem;
  font-weight: 900;
  color: #7c2d12;
  line-height: 1.2;
}

/* ==========================================================================
   筆順分頁樣式 - 大尺寸田字格與特教友善排版 (Hanzi Writer 260px)
   ========================================================================== */
.pane-stroke-view {
  padding: 28px;
}

.stroke-stage-layout {
  display: flex;
  flex-direction: column;
  gap: 32px;
  align-items: center;
}

@media (min-width: 860px) {
  .stroke-stage-layout {
    flex-direction: row;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 40px;
  }
}

.stroke-tianzige-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: 290px;
  flex-shrink: 0;
}

.stroke-tianzige-box {
  width: 280px;
  height: 280px;
  background: #ffffff;
  border: 4px solid #ef4444;
  border-radius: 24px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(239, 68, 68, 0.16);
  overflow: hidden;
}

/* 十字輔助線 (標準田字格) */
.stroke-tianzige-box::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  border-top: 2px dashed #fca5a5;
  pointer-events: none;
  z-index: 0;
}

.stroke-tianzige-box::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  border-left: 2px dashed #fca5a5;
  pointer-events: none;
  z-index: 0;
}

.stroke-character-target {
  width: 260px;
  height: 260px;
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stroke-speed-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #f1f5f9;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  border: 1px solid #cbd5e1;
}

.speed-label {
  font-size: 0.85rem;
  font-weight: 800;
  color: #475569;
}

.btn-speed {
  background: white;
  border: 1px solid #cbd5e1;
  color: #334155;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-speed:hover {
  background: #e2e8f0;
}

.btn-speed.active {
  background: #2563eb;
  color: white;
  border-color: #2563eb;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.3);
}

.stroke-control-panel {
  flex: 1;
  min-width: 280px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.stroke-title-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  padding: 18px 24px;
}

.badge-stroke-hd {
  display: inline-block;
  background: #dbeafe;
  color: #1e40af;
  font-size: 0.85rem;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  margin-bottom: 8px;
}

.stroke-char-heading {
  font-size: 1.85rem;
  font-weight: 900;
  color: #1e3a8a;
  line-height: 1.3;
  margin-bottom: 6px;
}

.stroke-meta-pills {
  font-size: 1.15rem;
  font-weight: 700;
  color: #475569;
}

.stroke-action-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn-stroke-action {
  flex: 1;
  min-width: 170px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 20px;
  border-radius: var(--radius-md);
  border: none;
  font-size: 1.05rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s, box-shadow 0.15s;
}

.btn-stroke-action:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-stroke-action:active {
  transform: translateY(0);
}

.btn-stroke-action.btn-play {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: white;
}

.btn-stroke-action.btn-quiz {
  background: linear-gradient(135deg, #059669, #047857);
  color: white;
}

.btn-stroke-action.btn-moe {
  background: #f1f5f9;
  color: #1e3a8a;
  border: 1.5px solid #cbd5e1;
}

.stroke-tips-card {
  background: #fffbeb;
  border-left: 5px solid #f59e0b;
  border-radius: 12px;
  padding: 14px 18px;
}

.tips-title {
  font-weight: 800;
  color: #b45309;
  font-size: 0.98rem;
  margin-bottom: 4px;
}

.tips-content {
  font-size: 0.94rem;
  color: #78350f;
  line-height: 1.55;
}

/* ==========================================================================
   課文全文無損閱讀器 (Reading Viewer)
   ========================================================================== */
.reading-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--border-color);
}

.reading-title-box h2 {
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--primary);
}

.reading-author {
  font-size: 1.05rem;
  color: var(--text-sub);
  margin-top: 4px;
}

.reading-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

.article-content {
  line-height: var(--reading-line-height);
  letter-spacing: var(--reading-letter-spacing);
  font-size: var(--base-font-size);
}

.article-content p {
  margin-bottom: 1.6em;
  text-indent: 2em;
  position: relative;
}

.article-content p.active-highlight {
  background: #fef08a;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  border-left: 6px solid #eab308;
  transition: all 0.3s ease;
}

.article-content .highlight-char {
  background: rgba(37, 99, 235, 0.12);
  color: var(--primary);
  font-weight: 700;
  padding: 0 4px;
  border-radius: 4px;
  cursor: pointer;
  border-bottom: 2px solid var(--primary);
}

.article-content .highlight-char:hover {
  background: var(--primary);
  color: white;
}

/* ==========================================================================
   心智圖與 AI 導出區塊 (Mindmap & AI Hub)
   ========================================================================== */
.mindmap-wrapper {
  background: var(--bg-card-alt);
  border-radius: var(--radius-md);
  padding: 24px;
  border: 1px solid var(--border-color);
  min-height: 480px;
  display: flex;
  flex-direction: column;
}

.mindmap-tree {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 16px;
}

.tree-node {
  background: white;
  border-radius: var(--radius-md);
  border: 2px solid var(--border-color);
  padding: 16px 20px;
  box-shadow: var(--shadow-sm);
}

.tree-node.root {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  font-size: 1.3rem;
  font-weight: 900;
  text-align: center;
}

.tree-node.branch {
  border-left: 6px solid var(--secondary);
}

.tree-node.deep-meaning {
  border-left: 6px solid #8b5cf6;
}

.tree-node.vocab-meaning {
  border-left: 6px solid #10b981;
}

.node-title {
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.node-items {
  list-style: none;
  padding-left: 14px;
}

.node-items li {
  position: relative;
  padding-left: 18px;
  margin-bottom: 6px;
  color: var(--text-muted);
}

.node-items li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: bold;
}

.ai-export-box {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px dashed var(--border-color);
}

.btn-export {
  padding: 10px 18px;
  border-radius: var(--radius-md);
  border: none;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.btn-canva {
  background: #7d2ae8;
  color: white;
}

.btn-canva:hover {
  background: #6b1fd0;
  transform: translateY(-2px);
}

.btn-notebooklm {
  background: #0f9d58;
  color: white;
}

.btn-notebooklm:hover {
  background: #0b8043;
  transform: translateY(-2px);
}

/* ==========================================================================
   Quiz & Gamification (四大全維度測驗與 RPG 冒險)
   ========================================================================== */
.quiz-dashboard {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  padding: 24px;
}

.quiz-select-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}

.quiz-card-type {
  background: var(--bg-card-alt);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.quiz-card-type:hover {
  border-color: var(--primary);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.quiz-card-type.active {
  background: var(--primary-light);
  border-color: var(--primary);
}

.quiz-card-type .type-tag {
  font-size: 0.8rem;
  font-weight: 800;
  color: white;
  background: var(--primary);
  padding: 2px 10px;
  border-radius: var(--radius-full);
  display: inline-block;
  margin-bottom: 8px;
}

.quiz-card-type h3 {
  font-size: 1.3rem;
  font-weight: 800;
  margin-bottom: 6px;
}

.quiz-card-type p {
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* 測驗進行中介面 */
.quiz-play-area {
  display: none;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 2px solid var(--primary);
  padding: 28px;
  margin-top: 16px;
  box-shadow: var(--shadow-lg);
}

.quiz-status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--border-color);
}

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

.progress-pill {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--primary);
  background: var(--primary-light);
  padding: 6px 14px;
  border-radius: var(--radius-full);
}

.hearts-container {
  display: flex;
  gap: 4px;
  font-size: 1.3rem;
  color: var(--danger);
}

.combo-badge {
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  color: white;
  font-weight: 900;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.95rem;
  animation: pulse 1s infinite alternate;
}

@keyframes pulse {
  from { transform: scale(1); }
  to { transform: scale(1.08); }
}

.tts-btn {
  background: #f1f5f9;
  border: 2px solid #cbd5e1;
  color: #1e293b;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.tts-btn:hover {
  background: #e2e8f0;
  border-color: var(--primary);
  color: var(--primary);
}

.nav-anchor-tag {
  background: #dbeafe;
  color: #1e40af;
  border: 1px solid #bfdbfe;
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
  cursor: pointer;
}

.nav-anchor-tag:hover {
  background: #bfdbfe;
}

.quiz-question-box {
  margin-bottom: 24px;
}

.quiz-question-text {
  font-size: 1.45rem;
  font-weight: 800;
  line-height: 1.6;
  color: var(--text-main);
  margin-bottom: 24px;
}

.quiz-options-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

@media (min-width: 768px) {
  .quiz-options-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.quiz-option-btn {
  background: var(--bg-card-alt);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  text-align: left;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  transition: all 0.2s ease;
  line-height: 1.5;
}

.quiz-option-btn .opt-key {
  width: 36px;
  height: 36px;
  background: white;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  flex-shrink: 0;
  color: var(--primary);
}

.quiz-option-btn:hover {
  border-color: var(--primary);
  background: var(--primary-light);
  transform: translateY(-2px);
}

.quiz-option-btn.correct {
  background: var(--success-light);
  border-color: var(--success);
  color: #065f46;
}

.quiz-option-btn.wrong {
  background: var(--danger-light);
  border-color: var(--danger);
  color: #991b1b;
}

.quiz-option-btn.disabled {
  opacity: 0.35;
  pointer-events: none;
}

.quiz-feedback-box {
  margin-top: 20px;
  padding: 16px 20px;
  border-radius: var(--radius-md);
  display: none;
  font-size: 1.1rem;
}

.quiz-feedback-box.correct {
  background: var(--success-light);
  border: 2px solid var(--success);
  color: #065f46;
}

.quiz-feedback-box.wrong {
  background: var(--danger-light);
  border: 2px solid var(--danger);
  color: #991b1b;
}

.quiz-lifeline-row {
  display: flex;
  gap: 12px;
  margin-top: 20px;
  align-items: center;
}

.btn-lifeline {
  background: #fef3c7;
  border: 2px solid #f59e0b;
  color: #92400e;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

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

/* ==========================================================================
   Teacher Dashboard (教師控制台與學情診斷)
   ========================================================================== */
.dashboard-panel {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  padding: 28px;
}

.dash-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--border-color);
}

.dash-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.stat-box {
  background: var(--bg-card-alt);
  border-radius: var(--radius-md);
  padding: 18px;
  border: 1px solid var(--border-color);
  text-align: center;
}

.stat-box .stat-val {
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--primary);
  line-height: 1.1;
  margin-top: 4px;
}

.stat-box .stat-lbl {
  font-size: 0.95rem;
  color: var(--text-muted);
  font-weight: 700;
}

.error-radar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.error-card {
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.error-card.type-a { background: #eff6ff; border-color: #bfdbfe; }
.error-card.type-b { background: #fefce8; border-color: #fef08a; }
.error-card.type-c { background: #ecfdf5; border-color: #a7f3d0; }
.error-card.type-d { background: #faf5ff; border-color: #e9d5ff; }

.error-card h4 {
  font-size: 1.1rem;
  font-weight: 800;
  margin-bottom: 6px;
}

.table-responsive {
  overflow-x: auto;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: 24px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 1rem;
}

.data-table th, .data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
}

.data-table th {
  background: var(--bg-card-alt);
  font-weight: 800;
  color: var(--text-main);
}

.data-table tr:hover {
  background: var(--primary-light);
}

/* ==========================================================================
   Modals & Popups
   ========================================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal-content {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  max-width: 800px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  padding: 28px;
  position: relative;
}

.modal-close-btn {
  position: absolute;
  top: 18px;
  right: 18px;
  background: none;
  border: none;
  font-size: 1.8rem;
  cursor: pointer;
  color: var(--text-sub);
}

/* ==========================================================================
   Utility & Buttons
   ========================================================================== */
.btn-primary {
  background: var(--primary);
  color: white;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  border: none;
  font-size: 1.1rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: var(--bg-card-alt);
  color: var(--text-main);
  padding: 12px 24px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-secondary:hover {
  background: #e2e8f0;
}

.btn-sm {
  padding: 6px 14px;
  font-size: 0.88rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: white;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.btn-sm:hover {
  background: var(--bg-card-alt);
  border-color: var(--primary);
  color: var(--primary);
}

/* ==========================================================================
   課文心智圖與 Canva / NotebookLM / 簡報播放器樣式
   ========================================================================== */
.mindmap-wrapper {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.mindmap-tree {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.tree-node {
  background: #ffffff;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border-color);
  padding: 20px 24px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s;
}

.tree-node:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.tree-node.root {
  background: linear-gradient(135deg, #1e3a8a, #2563eb);
  color: white;
  font-size: 1.45rem;
  font-weight: 900;
  border: none;
  text-align: center;
  box-shadow: var(--shadow-md);
}

.tree-node.branch {
  border-left: 6px solid #d97706;
}

.tree-node.deep-meaning {
  border-left: 6px solid #8b5cf6;
}

.tree-node.vocab-meaning {
  border-left: 6px solid #10b981;
}

.node-title {
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 12px;
}

.node-items {
  list-style: none;
  padding-left: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.node-items li {
  position: relative;
  padding-left: 20px;
  font-size: 1.05rem;
  line-height: 1.65;
  color: #334155;
}

.node-items li::before {
  content: "•";
  position: absolute;
  left: 4px;
  top: 0;
  color: var(--primary);
  font-weight: 900;
  font-size: 1.2rem;
}

/* 自動化整合工具橫幅 */
.ai-export-panel {
  background: linear-gradient(135deg, #f8fafc 0%, #eff6ff 100%);
  border: 2px solid #bfdbfe;
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: var(--shadow-sm);
}

.ai-export-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.ai-export-title {
  font-size: 1.25rem;
  font-weight: 900;
  color: #1e3a8a;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ai-export-subtitle {
  font-size: 0.95rem;
  color: #64748b;
}

.ai-export-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

.btn-export-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 16px 20px;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.btn-export-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.btn-export-card .btn-title {
  font-size: 1.05rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-export-card .btn-desc {
  font-size: 0.85rem;
  opacity: 0.9;
  line-height: 1.4;
}

/* Canva PPTX 主推按鈕 (紫色高貴漸層) */
.btn-canva-pptx {
  background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
  color: white;
}

/* NotebookLM 按鈕 (綠色智慧漸層) */
.btn-notebooklm-auto {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  color: white;
}

/* 內建簡報全螢幕播放按鈕 (藍色專業漸層) */
.btn-deck-viewer {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: white;
}

/* Canva Docs 大綱輔助按鈕 */
.btn-canva-docs {
  background: #ffffff;
  color: #475569;
  border: 1.5px solid #cbd5e1;
}

.btn-canva-docs:hover {
  background: #f1f5f9;
  color: #1e293b;
}

/* 內建互動簡報播放器 (Native Interactive Slide Deck) */
.slide-deck-overlay {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 950px;
  background: white;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0,0,0,0.25);
}

.slide-deck-header {
  background: #0f172a;
  color: white;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.slide-deck-title {
  font-size: 1.15rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
}

.slide-deck-counter {
  font-size: 0.95rem;
  color: #94a3b8;
  font-weight: 700;
}

.slide-deck-body {
  min-height: 480px;
  padding: 36px 44px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  position: relative;
}

.slide-deck-footer {
  background: #f1f5f9;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid #cbd5e1;
}

.slide-nav-btns {
  display: flex;
  gap: 10px;
}

/* ==========================================================================
   教師控制台安全驗證彈窗與歷程分組樣式
   ========================================================================== */
.auth-modal-content {
  max-width: 480px;
  padding: 32px;
  border-radius: 24px;
}

.auth-header {
  text-align: center;
  margin-bottom: 24px;
}

.auth-icon {
  font-size: 3rem;
  margin-bottom: 8px;
}

.auth-header h2 {
  font-size: 1.55rem;
  color: #1e3a8a;
  font-weight: 900;
  margin-bottom: 6px;
}

.auth-header p {
  font-size: 0.92rem;
  color: #64748b;
  line-height: 1.5;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
}

.form-group label {
  font-size: 0.92rem;
  font-weight: 800;
  color: #334155;
}

.auth-input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #cbd5e1;
  border-radius: 12px;
  font-size: 1.05rem;
  transition: all 0.2s;
  outline: none;
}

.auth-input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.auth-error-msg {
  background: #fef2f2;
  border: 1.5px solid #f87171;
  color: #dc2626;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 0.92rem;
  font-weight: 700;
  text-align: center;
}

.auth-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 8px;
}

/* 學生歷程分組表頭與行樣式 */
.student-journey-group {
  background: #f8fafc;
  border-left: 5px solid #2563eb;
}

.student-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #dbeafe;
  color: #1e40af;
  padding: 4px 12px;
  border-radius: 9999px;
  font-weight: 800;
  font-size: 0.92rem;
}

.badge-dim-zhuyin {
  background: #e0f2fe;
  color: #0369a1;
}

.badge-dim-radical {
  background: #fef3c7;
  color: #b45309;
}

.badge-dim-vocab {
  background: #dcfce7;
  color: #15803d;
}

.badge-dim-reading {
  background: #f3e8ff;
  color: #7e22ce;
}

.btn-logout {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fca5a5;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-weight: 800;
  font-size: 0.92rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.btn-logout:hover {
  background: #fecaca;
  color: #991b1b;
}
