/* css/app.css */
* { box-sizing: border-box; }
body {
  margin: 0; font-family: var(--font-body); color: var(--c-parchment);
  background: linear-gradient(180deg, #3a2a17 0%, #2a1d0f 100%);
  min-height: 100vh;
}
#app { max-width: 760px; margin: 0 auto; padding: 12px; }

/* 資源列 */
.resource-bar {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  padding: 8px 12px; background: linear-gradient(180deg, #5a4424, #3a2a14);
  border: var(--border-gold); border-radius: var(--radius);
  box-shadow: inset 0 1px 0 #e8c870; font-weight: bold; font-size: 14px;
}
.resource-bar .rank { color: var(--c-gold-bright); }
.resource-bar .xp { color: #9fe89f; }
.resource-bar .streak { color: #f0a85a; }
.resource-bar .spacer { margin-left: auto; }

/* 題卡（羊皮紙卷軸） */
.card-parchment {
  position: relative;
  margin-top: 12px; padding: 32px 26px; border-radius: 4px; color: var(--c-ink);
  background: linear-gradient(160deg, var(--c-parchment), var(--c-parchment-dark));
  border: 3px solid #8a6d3b; box-shadow: 0 4px 0 #5a4424, inset 0 0 30px rgba(120,90,40,.25);
}
/* 上下木質捲軸滾筒（自包含於卡內，不與選項碰撞） */
.card-parchment::before, .card-parchment::after,
.scroll-card::before, .scroll-card::after {
  content: ""; position: absolute; left: 6px; right: 6px; height: 9px; border-radius: 6px / 50%;
  background: linear-gradient(180deg, #b98a51 0%, #8a5a2b 48%, #5b3a18 56%, #79502c 100%);
  box-shadow: inset 0 1px 1px rgba(255,228,184,.45), inset 0 -2px 3px rgba(0,0,0,.35), 0 1px 2px rgba(0,0,0,.25);
  pointer-events: none;
}
.card-parchment::before, .scroll-card::before { top: 7px; }
.card-parchment::after,  .scroll-card::after  { bottom: 7px; }
.card-parchment .tag { font-size: 12px; letter-spacing: 2px; color: #8a5a2b; font-weight: bold; }
/* pre-line：保留題幹／引文中的換行（表格、資料一二三、條列），其餘空白照常收合 */
.card-parchment .stem { font-size: 17px; line-height: 1.85; white-space: pre-line; }

/* 題組共用引文（置於題卡頂部、子題之上） */
.card-parchment .passage {
  font-size: 15px; line-height: 1.9; color: #4a3818; white-space: pre-line;
  background: rgba(120,90,40,.10); border-left: 3px solid var(--c-gold);
  padding: 12px 14px; border-radius: 4px;
}
.card-parchment .passage-divider { height: 1px; background: #b89a5e; margin: 14px 0 12px; }

/* tag 列：左 tag、右側叢集（分類膠囊 + 淡色年度題號小標） */
.tag-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.tag-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.source-note { font-size: 11px; color: #9a7d4b; font-weight: bold; letter-spacing: .5px; white-space: nowrap; }
.cat-chip {
  font-size: 11px; font-weight: bold; color: #6b4f1f; white-space: nowrap;
  background: rgba(201,162,75,.20); border: 1px solid var(--c-gold);
  padding: 1px 8px; border-radius: 3px;
}

/* 題目圖片裱框 */
.q-figure { margin: 14px 0 2px; text-align: center; }
.q-figure img {
  max-width: 100%; height: auto; border: 3px solid #8a6d3b; border-radius: 3px;
  background: #fff; box-shadow: 0 2px 0 #5a4424, inset 0 0 0 1px #e8c870;
}
.q-figure figcaption { margin-top: 6px; font-size: 12px; color: #8a5a2b; font-weight: bold; letter-spacing: 1px; }

/* 選項（石材按鈕） */
.options { margin-top: 12px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 480px) { .options { grid-template-columns: 1fr; } }
.opt {
  padding: 14px 16px; border-radius: 4px; cursor: pointer; color: var(--c-parchment);
  background: linear-gradient(180deg, #7a6038, #4f3c1f); border: 3px solid var(--c-gold);
  box-shadow: inset 0 1px 0 #e8c870, 0 3px 0 #2a1d0f; font-size: 15px; text-align: left;
}
.opt b { color: var(--c-gold-bright); }
.opt.correct { background: linear-gradient(180deg, #3d6b3a, #244222); border-color: #7fcf6a; }
.opt.wrong { background: linear-gradient(180deg, #6b3a3a, #422222); border-color: #cf6a6a; }
.opt[disabled] { cursor: default; opacity: .95; }

/* 詳解 */
.explain { margin-top: 12px; padding: 16px 18px; border-radius: 4px; font-size: 14px; line-height: 1.7;
  background: rgba(20,40,18,.5); border: 2px solid #5a8a4a; color: #dfeccf; }
.explain .badges { display: flex; gap: 10px; font-weight: bold; margin-bottom: 6px; flex-wrap: wrap; }
.badge-official { background: #2a4a22; padding: 1px 8px; border-radius: 3px; color: #cfe8b8; }
.badge-ai { background: #3a3050; padding: 1px 8px; border-radius: 3px; color: #cdbcf0; }
/* 你選的錯誤選項「錯在哪」提示：紅褐底，與正解綠詳解區隔開 */
.explain .opt-note { margin: 4px 0 10px; padding: 8px 12px; border-radius: 3px;
  background: rgba(80,30,30,.45); border-left: 3px solid #cf6a6a; color: #f0d6d6; }
.explain .opt-note b { color: #f3b0b0; }

/* 通用按鈕、主題卡、首頁 */
.btn { font-family: var(--font-body); cursor: pointer; padding: 10px 18px; border-radius: 4px;
  background: linear-gradient(180deg, #7a6038, #4f3c1f); border: var(--border-gold); color: var(--c-parchment-dark); font-weight: bold; }
.btn:hover { color: var(--c-gold-bright); }
.theme-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(180px,1fr)); gap: 12px; margin-top: 14px; }
.theme-card { padding: 20px; text-align: center; cursor: pointer; border-radius: 6px;
  background: linear-gradient(160deg, #5a4630, #3a2c18); border: var(--border-gold); color: var(--c-parchment); }
.theme-card h3 { color: var(--c-gold-bright); margin: 6px 0; }
.title-display { font-family: var(--font-display); color: var(--c-gold-bright); text-shadow: 2px 2px 0 #000; }

/* 首頁簡介卡：一句定位 ＋ 玩法三步 ＋ 錯題/複習說明 */
.intro-card { padding: 22px 24px; }
.intro-lead { font-size: 16px; font-weight: 900; color: #5a3a12; text-align: center; line-height: 1.6; }
.intro-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 16px 0 4px; }
.intro-step { text-align: center; padding: 12px 8px; border-radius: 6px;
  background: rgba(120,90,40,.12); border: 1px solid #b89a5e; }
.intro-step-icon { font-size: 26px; line-height: 1; }
.intro-step-title { font-weight: 900; color: #5a3a18; margin-top: 6px; font-size: 14px; }
.intro-step-desc { font-size: 12px; color: #6b5326; line-height: 1.55; margin-top: 4px; }
.intro-foot { margin-top: 12px; font-size: 13px; line-height: 1.7; color: #5a4630; text-align: center; }

/* 手機優化：縮內距、放大點擊區、放大字級、簡介三步改單欄 */
@media (max-width: 600px) {
  #app { padding: 10px; }
  /* 手機字級整體放大（原字偏小） */
  body { font-size: 16px; }
  .resource-bar { font-size: 15px; }
  .card-parchment { padding: 24px 18px; }
  .card-parchment .stem { font-size: 17px; line-height: 1.9; }
  .card-parchment .passage { font-size: 16px; }
  .explain { font-size: 15px; line-height: 1.8; }
  .intro-card { padding: 18px 16px; }
  .intro-lead { font-size: 17px; }
  .intro-steps { grid-template-columns: 1fr; gap: 8px; }
  .intro-step { display: flex; align-items: center; gap: 12px; text-align: left; padding: 10px 14px; }
  .intro-step-icon { font-size: 24px; flex: 0 0 auto; }
  .intro-step-title { margin-top: 0; flex: 0 0 auto; white-space: nowrap; font-size: 15px; }
  .intro-step-desc { margin-top: 0; flex: 1 1 auto; min-width: 0; word-break: break-word; font-size: 13px; }
  .intro-foot { font-size: 14px; }
  .title-display { font-size: 27px !important; }
  .opt { padding: 15px; font-size: 16px; }
  .btn { padding: 12px 18px; }
  /* 首頁改版手機優化 */
  .theme-grid { grid-template-columns: 1fr 1fr; }
  .home-cta { grid-template-columns: 1fr 1fr; }
  .hero-title { font-size: 28px; }
  .hero-sub { font-size: 24px; }
  .hero-rank { font-size: 14px; }
  .theme-count { font-size: 13px; }
  .sage-dialog { gap: 10px; }
  .sage-name { font-size: 15px; }
  .sage-line { font-size: 16px; }
  .sage-tip { font-size: 14px; }
  .sage-portrait { width: 46px; height: 46px; font-size: 24px; }
  .sage-bubble::before { display: none; }
  /* 說明 / 公告 / 時間長河字級 */
  .notice-label { font-size: 15px; }
  .notice-desc { font-size: 14px; }
  .changelog-title { font-size: 17px; }
  .changelog-desc { font-size: 15px; }
  .timeline-lead { font-size: 15px; }
  .era-name { font-size: 17px; }
  .era-period { font-size: 13px; }
  .era-count { font-size: 13px; }
}

/* === 首頁改版（2026-06-09）=== */

/* 輕量卡：首頁說明區塊用，無粗滾筒，只留金邊細框 */
.card-plain {
  position: relative; margin-top: 12px; padding: 20px 22px; border-radius: 6px; color: var(--c-ink);
  background: linear-gradient(160deg, var(--c-parchment), var(--c-parchment-dark));
  border: 2px solid #b89a5e; box-shadow: 0 3px 0 #5a4424, inset 0 0 18px rgba(120,90,40,.18);
}

/* ④ 英雄橫幅：深木底 + 亮金標題 */
.hero-banner {
  margin-top: 12px; padding: 22px 20px; text-align: center; border-radius: var(--radius);
  background: linear-gradient(180deg, #5a4424, #2f2210);
  border: var(--border-gold); box-shadow: inset 0 1px 0 #e8c870, 0 4px 0 #1f1408;
}
.hero-title {
  font-family: var(--font-display); font-size: 38px; line-height: 1.1; color: var(--c-gold-bright);
  text-shadow: 0 0 12px rgba(246,217,122,.45), 2px 2px 0 #1a1206; letter-spacing: 1px;
}
.hero-sub { font-size: 22px; font-weight: 900; color: var(--c-parchment); margin-top: 4px; }
.hero-rank { font-size: 13px; letter-spacing: 1px; color: #e8c870; margin-top: 8px; }

/* ③ 女導師對話框 */
.sage-dialog { display: flex; gap: 12px; align-items: flex-start; margin-top: 12px; }
.sage-portrait {
  flex: 0 0 auto; width: 56px; height: 56px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 30px; background: radial-gradient(circle at 40% 35%, #6a5226, #3a2a14);
  border: 3px solid var(--c-gold); box-shadow: inset 0 1px 0 #e8c870, 0 2px 0 #1f1408;
}
.sage-bubble {
  position: relative; flex: 1 1 auto; min-width: 0; padding: 14px 16px; border-radius: 8px; color: var(--c-ink);
  background: linear-gradient(160deg, var(--c-parchment), var(--c-parchment-dark)); border: 2px solid #b89a5e;
  box-shadow: 0 3px 0 #5a4424, inset 0 0 16px rgba(120,90,40,.16);
}
.sage-bubble::before {
  content: ""; position: absolute; left: -9px; top: 18px; width: 0; height: 0;
  border: 8px solid transparent; border-right-color: #b89a5e;
}
.sage-name { font-weight: 900; color: #5a3a12; font-size: 14px; letter-spacing: 1px; margin-bottom: 4px; }
.sage-line { margin: 0 0 8px; font-size: 15px; line-height: 1.85; color: #4a3818; }
.sage-line:last-of-type { margin-bottom: 0; }
.sage-tip { margin: 10px 0 0; padding-top: 8px; border-top: 1px dashed #c2a96a;
  font-size: 13px; line-height: 1.8; color: #7a5e2e; }
.sage-actions { margin-top: 12px; display: flex; gap: 10px; flex-wrap: wrap; }

/* 中文長句斷行優化：盡量避免末行只剩孤字（新版 Chrome/Safari 生效，舊版自然忽略） */
.sage-line, .sage-tip, .notice-desc, .intro-step-desc, .intro-foot,
.changelog-desc, .timeline-lead, .card-parchment .stem, .card-parchment .passage {
  text-wrap: pretty;
}

/* 首頁時間長河 / 戰力評估雙入口：欄位規則對齊上方主題格，讓按鈕寬度與四張卡片切齊 */
.home-cta { display: grid; grid-template-columns: repeat(auto-fit,minmax(180px,1fr)); gap: 12px; margin-top: 16px; }
.home-cta .btn { width: 100%; text-align: center; }

/* 站尾告示牌：聯絡版主 ＋ 主要網站連結。金線分隔＋置中，沿用 .btn 木質金邊風格 */
.site-footer { margin-top: 28px; padding-top: 18px; text-align: center;
  border-top: 1px solid rgba(201,162,75,.4); }
.site-footer-title { font-family: var(--font-display); color: var(--c-gold);
  letter-spacing: 2px; font-size: 14px; margin-bottom: 12px; opacity: .85; }
.site-footer-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; }
.footer-link { display: inline-flex; align-items: center; gap: 6px;
  text-decoration: none; }
.footer-link:hover { color: var(--c-gold-bright); filter: brightness(1.05); }
@media (max-width: 600px) {
  .site-footer-links { flex-direction: column; }
  .footer-link { width: 100%; justify-content: center; }
}

/* ② 錯題 / 複習 圖示列 */
.notice-rows { display: flex; flex-direction: column; gap: 10px; }
.notice-row { display: flex; align-items: flex-start; gap: 12px; }
.notice-icon { flex: 0 0 auto; font-size: 24px; line-height: 1.2; }
.notice-label { font-weight: 900; color: #5a3a18; font-size: 14px; }
.notice-desc { font-size: 13px; line-height: 1.7; color: #6b5326; margin-top: 2px; }

/* 主題格補強：標題、icon、題數 */
.section-title { margin-top: 16px; color: #f6d97a; }
.theme-icon { font-size: 30px; line-height: 1; }
/* 四主題圖示統一用英文字樣（Formosa／China／World／Mix）取代 emoji：字型沿用 History 標題的展示字體 */
.en-icon { font-family: var(--font-display); font-weight: 700; letter-spacing: .02em;
  color: currentColor; white-space: nowrap; }
/* 主題大卡上：字級略縮以容納整字、用亮金並加陰影，四張卡視覺份量一致 */
.theme-icon .en-icon { display: inline-block; font-size: 20px; line-height: 1;
  color: var(--c-gold-bright); text-shadow: 0 2px 0 rgba(0,0,0,.35); }
.theme-count { font-size: 12px; opacity: .8; margin-top: 4px; }

/* 按鈕變體：主要 CTA / 小按鈕 */
.btn-primary {
  background: linear-gradient(180deg, #d8b24e, #a87f25); color: #2a1d0f; border-color: var(--c-gold-bright);
}
.btn-primary:hover { color: #1a1206; filter: brightness(1.06); }
.btn-sm { padding: 7px 14px; font-size: 14px; }

/* ⑥ 更新公告列表 */
.changelog-item { margin-top: 12px; }
.changelog-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.changelog-type { font-size: 11px; font-weight: 900; padding: 2px 9px; border-radius: 3px; letter-spacing: 1px; }
.type-qbank { background: #2a4a22; color: #cfe8b8; }
.type-feature { background: #3a3050; color: #cdbcf0; }
.changelog-date { font-size: 12px; color: #9a7d4b; font-weight: bold; }
.changelog-title { font-weight: 900; color: #5a3a12; font-size: 16px; }
.changelog-desc { font-size: 14px; line-height: 1.75; color: #5a4630; margin-top: 4px; }

/* 名言卷軸彈窗 */
.scroll-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.6); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 50; }
.scroll-card { position: relative; max-width: 520px; text-align: center; color: var(--c-ink); padding: 34px; border-radius: 6px;
  background: radial-gradient(ellipse at top, rgba(255,240,200,.25), transparent 60%), linear-gradient(160deg, var(--c-parchment), var(--c-parchment-dark));
  border: 3px solid #8a6d3b; box-shadow: 0 6px 0 #5a4424, inset 0 0 40px rgba(120,90,40,.3); }
.scroll-card .q-original { font-size: 22px; line-height: 1.7; font-style: italic; color: #2a1d0e; }
.scroll-card .q-author { font-size: 16px; font-weight: bold; color: #5a3a18; margin-top: 10px; }
.scroll-card .q-zh { font-size: 18px; line-height: 1.8; border-top: 1px solid #b89a5e; border-bottom: 1px solid #b89a5e; padding: 14px 0; margin: 18px 16px; }
.scroll-card .q-source { font-size: 12px; color: #9a7d4b; line-height: 1.6; }
.scroll-card .q-verified { margin-top: 14px; display: inline-block; font-size: 11px; background: #2a4a22; color: #cfe8b8; padding: 3px 10px; border-radius: 3px; }

/* === 歷史長河：垂直時間軸 === */
.tl-toggle { display: flex; gap: 8px; margin: 14px 0 4px; flex-wrap: wrap; }
.tl-pill {
  padding: 8px 16px; border-radius: 999px; border: 2px solid var(--c-gold);
  background: rgba(120,90,40,.10); color: #5a4630; font-weight: bold; font-size: 15px; cursor: pointer;
}
.tl-pill.active { background: linear-gradient(180deg, #caa24e, #a8842f); color: #2a1d08; border-color: var(--c-gold-bright); }

.tl-track { position: relative; margin-top: 12px; }
.tl-node { position: relative; display: flex; gap: 14px; padding-bottom: 18px; cursor: pointer; }
.tl-node.empty { cursor: default; opacity: .5; }
/* 連接線：穿過每個圓點中心，串成一條長河 */
.tl-node::before { content: ''; position: absolute; left: 13px; top: 8px; bottom: -8px; width: 2px; background: #b89a5e; }
.tl-node:last-child::before { display: none; }

.tl-dot {
  position: relative; z-index: 1; flex: 0 0 28px; width: 28px; height: 28px; box-sizing: border-box;
  border-radius: 50%; border: 2px solid var(--c-gold); background: #2a1d08;
  display: flex; align-items: center; justify-content: center; color: #2a1d08; font-weight: 900; font-size: 15px;
}
.tl-node.lit .tl-dot { background: radial-gradient(circle at 35% 30%, #f6d97a, #a8842f); border-color: var(--c-gold-bright); }
.tl-node.done .tl-dot { background: linear-gradient(180deg, #caa24e, #a8842f); border-color: var(--c-gold-bright); box-shadow: 0 0 10px rgba(246,217,122,.7); }
.tl-node.empty .tl-dot { background: #3a3020; border-color: #6b5a38; }

.tl-body {
  flex: 1; min-width: 0; color: var(--c-ink);
  background: linear-gradient(160deg, var(--c-parchment), var(--c-parchment-dark));
  border: 1px solid #b89a5e; border-left: 3px solid var(--c-gold); border-radius: 4px; padding: 10px 12px;
}
.tl-node:not(.empty):hover .tl-body { filter: brightness(1.06); border-left-color: var(--c-gold-bright); }
.tl-node.empty .tl-body { background: linear-gradient(160deg, #cdb98a, #b8a06e); opacity: .85; }
.tl-node:not(.empty):focus-visible { outline: none; }
.tl-node:not(.empty):focus-visible .tl-body { border-color: var(--c-gold-bright); box-shadow: 0 0 0 2px rgba(246,217,122,.5); }
.tl-era { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.tl-era-name { font-size: 16px; font-weight: bold; color: #3a2c12; }
.tl-era-range { font-size: 12px; color: #8a7448; }
.tl-bar { height: 8px; border-radius: 4px; background: #d8c69a; overflow: hidden; margin: 8px 0 6px; }
.tl-fill { height: 100%; background: linear-gradient(90deg, #caa24e, #7fcf6a); border-radius: 4px; transition: width .3s; }
.tl-stat { font-size: 13px; color: #5a4630; }

/* === 常駐導覽（桌機左側欄 / 手機底部 bar，2026-06-09）=== */
.app-shell { display: flex; flex-direction: column; min-height: 100vh; }
.main { flex: 1; min-width: 0; }

.nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; justify-content: space-around; align-items: stretch;
  background: linear-gradient(180deg, #5a4424, #2a1d0f);
  border-top: var(--border-gold);
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
}
.nav-brand { display: none; }
.nav-item {
  position: relative; flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-height: 50px; padding: 4px 2px; border-radius: var(--radius);
  color: var(--c-parchment); text-decoration: none; font-weight: bold;
}
.nav-icon { font-size: 20px; line-height: 1; }
.nav-labels { display: flex; flex-direction: column; align-items: center; line-height: 1.12; }
.nav-zh { font-size: 12px; white-space: nowrap; }
.nav-en { font-size: 9px; letter-spacing: .5px; color: var(--c-gold); white-space: nowrap; }
.nav-item:hover { color: var(--c-gold-bright); background: rgba(201,162,75,.12); }
.nav-item.active { color: var(--c-gold-bright); }
.nav-item.active .nav-en { color: var(--c-gold-bright); }
.nav-item.active::after {
  content: ''; position: absolute; bottom: -6px; left: 50%; transform: translateX(-50%);
  width: 24px; height: 3px; border-radius: 99px; background: var(--c-gold-bright);
}
.nav-badge {
  position: absolute; top: 3px; left: 50%; transform: translateX(7px);
  min-width: 16px; height: 16px; padding: 0 4px; border-radius: 9px;
  background: #c0392b; color: #fff; font-size: 10px; font-weight: 900;
  display: flex; align-items: center; justify-content: center; line-height: 1;
}

/* 手機：內容不被固定底部 bar 蓋住 */
@media (max-width: 879px) {
  #app { padding-bottom: 84px; }
}

/* 桌機：左側欄 */
@media (min-width: 880px) {
  .app-shell { flex-direction: row; }
  .nav {
    position: sticky; top: 0; bottom: auto; height: 100vh; width: 172px; flex: 0 0 172px;
    flex-direction: column; justify-content: flex-start; align-items: stretch; gap: 4px;
    border-top: none; border-right: var(--border-gold); padding: 22px 12px;
  }
  .nav-brand {
    display: flex; align-items: center; gap: 8px; padding: 0 10px 16px;
    font-family: var(--font-display); color: var(--c-gold-bright);
  }
  .nav-brand-icon { font-size: 22px; }
  .nav-brand-name { font-size: 18px; font-weight: 900; }
  .nav-item { flex: none; flex-direction: row; justify-content: flex-start; gap: 10px; min-height: 44px; padding: 6px 12px; }
  .nav-labels { flex-direction: column; align-items: flex-start; gap: 0; line-height: 1.18; }
  .nav-zh { font-size: 15px; }
  .nav-en { font-size: 10px; }
  .nav-item.active::after {
    bottom: auto; top: 50%; left: -12px; transform: translateY(-50%);
    width: 3px; height: 22px;
  }
  .nav-badge { position: static; transform: none; margin-left: auto; }
}

/* 切頁進場動畫 */
@keyframes ha-slide-down { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
#app > * { animation: ha-slide-down .18s ease; }

/* === 戰力評估（古風量表）=== */
.analysis-panel { padding: 18px 20px; }
.analysis-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 12px;
  border-bottom: 1px solid #b89a5e; padding-bottom: 8px; }
.analysis-title { font-weight: 900; color: #5a3a12; font-size: 18px; font-family: var(--font-display); }
.analysis-summary { font-size: 12px; color: #7a5a2a; font-weight: bold; white-space: nowrap; }
.analysis-empty { font-size: 14px; color: #7a5a2a; line-height: 1.7; }
.gauges { display: flex; flex-direction: column; gap: 11px; }
.gauge-row { display: grid; grid-template-columns: 92px 1fr auto; align-items: center; gap: 10px; }
.gauge-row.locked { display: flex; gap: 10px; align-items: center; opacity: .6; }
.gauge-label { font-weight: bold; color: #5a3a18; font-size: 14px; white-space: nowrap; }
.gauge-locked { font-size: 12px; color: #9a7d4b; font-weight: bold; }
.gauge-track { height: 14px; border-radius: 7px; overflow: hidden;
  background: rgba(60,40,15,.28); border: 1px solid #8a6d3b;
  box-shadow: inset 0 1px 3px rgba(0,0,0,.4); }
.gauge-fill { height: 100%; border-radius: 7px 0 0 7px;
  background: linear-gradient(180deg, #f6d97a, #c9a24b 60%, #a87f25);
  box-shadow: inset 0 1px 0 #fff3cf; }
.gauge-val { font-size: 12px; color: #6b5326; font-weight: bold; white-space: nowrap; }

/* ===== 會考倒數 × 每日排程 ===== */
.exam-card {
  margin-top: 12px; padding: 16px 18px; border-radius: 6px;
  background: linear-gradient(160deg, #5a4424, #38280f);
  border: var(--border-gold); box-shadow: inset 0 1px 0 #e8c870, 0 3px 0 #2a1d0f;
}
.exam-card-title { font-family: var(--font-display); color: var(--c-gold-bright); font-size: 18px; font-weight: bold; }
.exam-card-desc { color: var(--c-parchment-dark); font-size: 14px; line-height: 1.7; margin-top: 6px; }
.exam-row { display: flex; align-items: center; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.exam-row-label { color: var(--c-parchment); font-weight: bold; font-size: 14px; }
.exam-date-input, .exam-cap-select {
  font-family: var(--font-body); font-size: 15px; padding: 7px 10px; border-radius: 4px;
  border: 2px solid var(--c-gold); background: var(--c-parchment); color: var(--c-ink); font-weight: bold;
}
.exam-actions { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.btn-ghost {
  background: transparent; border: 2px solid #8a6d3b; color: var(--c-parchment-dark);
}
.btn-ghost:hover { color: var(--c-gold-bright); border-color: var(--c-gold); }

/* Dashboard 變體 */
.exam-dash-head { display: flex; align-items: center; justify-content: space-between; }
.exam-dash-count { font-family: var(--font-display); color: var(--c-parchment); font-size: 17px; font-weight: bold; }
.exam-dash-num { color: var(--c-gold-bright); font-size: 30px; }
.exam-gear {
  cursor: pointer; background: transparent; border: none; color: var(--c-parchment-dark);
  font-size: 20px; line-height: 1; padding: 4px;
}
.exam-gear:hover { color: var(--c-gold-bright); }
.exam-bar { margin-top: 12px; height: 14px; border-radius: 7px; overflow: hidden;
  background: #2a1d0f; border: 1px solid #6b5326; box-shadow: inset 0 1px 3px rgba(0,0,0,.4); }
.exam-bar-fill { height: 100%; border-radius: 7px 0 0 7px;
  background: linear-gradient(180deg, #f6d97a, #c9a24b 60%, #a87f25);
  box-shadow: inset 0 1px 0 #fff3cf; transition: width .3s ease; }
.exam-dash-progress { margin-top: 8px; color: var(--c-parchment-dark); font-size: 14px; font-weight: bold; }

/* 自由模式細入口 */
.exam-free-entry {
  margin-top: 12px; padding: 10px 14px; border-radius: 5px; cursor: pointer;
  background: rgba(120,90,40,.18); border: 1px dashed var(--c-gold); color: var(--c-parchment-dark);
  font-size: 14px; font-weight: bold; text-align: center;
}
.exam-free-entry:hover { color: var(--c-gold-bright); border-style: solid; }
