/* 會考練功坊的樣式。不整頁縮放：字照實際大小排（製作規則：題目、選項 16px 以上，說明 14px 以上），手機直拿會自然換行。 */
:root {
  /* 全站的暖色色票（game/css/style.css、edu-home 首頁；總管 2026-11-12 轉達）。#2f6f8f 是會考練功坊自己的顏色，留給連結 */
  --bg: #f6ecd6; --card: #fff; --ink: #2b1d0e; --muted: #5a4325; --line: #ead9b4;
  --brand: #2f6f8f; --brand-ink: #fff; --ok: #1e8449; --ok-bg: #e8f6ee; --no: #c0392b; --no-bg: #fdecea; --tag: #ead9b4;
  --gold: #f2c14e; --gold-d: #b9821f; --radius: 14px;
  --font: "PingFang TC", "Microsoft JhengHei", "Noto Sans TC", "Heiti TC", sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: #120c06; color: var(--ink); font: 18px/1.7 var(--font); }
body.noscroll { overflow: hidden; }
a { color: var(--brand); }
h1, h2, h3 { line-height: 1.35; font-weight: 900; }
h2 { font-size: 21px; margin: 28px 0 10px; }
h3 { font-size: 18px; margin: 18px 0 6px; }
.muted { color: var(--muted); }
.small { font-size: 15px; }
.center { text-align: center; }
.grow { flex: 1; }
.note { background: #fff6dd; border: 1px solid #f0dca0; border-radius: 10px; padding: 10px 14px; font-size: 16px; }
.tag { display: inline-block; background: var(--tag); border-radius: 6px; padding: 0 8px; font-size: 14px; margin-left: 6px; }
.tag.free { background: #dff3e4; color: #1e6b3a; }

.top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 10px; padding: 8px max(16px, env(safe-area-inset-left)); background: linear-gradient(#3d2714, #24160b); color: #fff3d6; border-bottom: 2px solid var(--gold-d); }
.top .brand { color: var(--gold); font-weight: 900; text-decoration: none; font-size: 19px; }
.top .back { display: inline-flex; align-items: center; gap: 4px; flex: none; white-space: nowrap; min-height: 44px; padding: 0 14px; border-radius: 999px; cursor: pointer;
  background: rgba(255, 243, 214, .14); color: #fff3d6; border: 2px solid rgba(242, 193, 78, .75); font: inherit; font-size: 17px; font-weight: 900; }
.top .back:active { transform: translateY(2px); }
.top .brand { white-space: nowrap; }
.top #who { min-width: 0; }
.top #who .muted { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top #who { display: flex; align-items: center; gap: 8px; }
.top #who .muted { color: #f1dfb8; }
.top .btn-s.ghost { color: #fff; border-color: rgba(255, 255, 255, .6); }
main { max-width: 860px; margin: 0 auto; padding: 16px 16px 40px; }
.foot { max-width: 860px; margin: 0 auto; padding: 18px 16px 40px; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 14px; color: var(--muted); }
.foot span { flex-basis: 100%; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 48px; padding: 8px 22px; border-radius: 999px; border: 0;
  background: linear-gradient(180deg, #ffe08a, var(--gold) 55%, var(--gold-d)); color: #3a2208; box-shadow: 0 3px 0 #7a520f; font: inherit; font-weight: 900; text-decoration: none; cursor: pointer; }
.btn:active:not(:disabled) { transform: translateY(3px); box-shadow: none; }
.btn.ghost { background: #fffaf0; color: #3a2208; box-shadow: 0 3px 0 #c9b48a, inset 0 0 0 2px var(--gold-d); }
.btn.big { width: 100%; font-size: 19px; min-height: 54px; }
.btn.off { opacity: .45; pointer-events: none; }
.btn:disabled { opacity: .5; cursor: default; }
.btn-s { font: inherit; font-size: 15px; font-weight: 700; padding: 4px 12px; min-height: 36px; border-radius: 999px; border: 1.5px solid var(--gold-d); background: var(--gold); color: #3a2208; cursor: pointer; }
.btn-s.ghost { background: transparent; color: #6b4a12; }

.hero { text-align: center; padding: 30px 6px; }
.hero h1 { font-size: 32px; margin: 10px 0; }
.hero .lead { font-size: 20px; }
.hero .points { text-align: left; display: inline-block; margin: 6px 0 22px; padding-left: 1.2em; }
.hero .btn.big { max-width: 420px; }

.page-title { font-size: 26px; margin: 8px 0 6px; }
.subj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin: 14px 0; }
.subj { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 16px 8px; background: var(--card); border: 2px solid var(--line); border-radius: var(--radius); text-decoration: none; color: inherit; min-height: 120px; }
.subj:hover { border-color: var(--brand); }
.subj.soon { opacity: .5; }
.subj.locked { background: #f1efe9; }
.subj-icon { font-size: 34px; }
.subj-name { font-size: 20px; font-weight: 700; }
.subj-sub { font-size: 14px; text-align: center; }

.quick { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0; }
.group h3 { color: var(--muted); font-size: 16px; }
.rows { display: flex; flex-direction: column; gap: 8px; }
.row { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: var(--card); border: 1.5px solid var(--line); border-radius: 12px; text-decoration: none; color: inherit; min-height: 56px; }
.row:hover { border-color: var(--brand); }
.row.locked { background: #f1efe9; }
.row-main { flex: 1; display: flex; flex-direction: column; }
.row-side { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.years { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 8px 14px; border-radius: 999px; background: var(--card); border: 1.5px solid var(--line); text-decoration: none; color: inherit; min-height: 44px; display: inline-flex; align-items: center; }

/* 做題 */
.qbar { display: flex; align-items: center; gap: 8px; font-size: 16px; }
.pbar { height: 6px; background: var(--line); border-radius: 3px; margin: 8px 0 14px; overflow: hidden; }
.pbar span { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), var(--gold-d)); }
.card { background: var(--card); border: 1.5px solid var(--line); border-radius: var(--radius); padding: 16px; margin: 12px 0; }
.qmeta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.qmeta .btn-s { margin-left: auto; }
.stem { font-size: 19px; line-height: 1.85; }
.passage { background: #fbf8f1; border: 1.5px solid var(--line); border-radius: var(--radius); padding: 10px 16px; margin: 12px 0; }
.passage summary { cursor: pointer; font-weight: 700; color: var(--brand); min-height: 40px; display: flex; align-items: center; }
.pass-text { font-size: 18px; line-height: 1.9; }
.fig { margin: 14px 0; text-align: center; }
.fig-btn { border: 0; background: none; padding: 0; cursor: zoom-in; max-width: 100%; }
.fig img { max-width: 100%; height: auto; }
.fig figcaption { font-size: 16px; color: var(--muted); }
.zoom-hint { font-size: 15px; color: var(--muted); margin-top: 2px; }
/* 有題組文章的題（家長 2026-11-13）：電腦 1000px 以上文章在左、自己捲，題目在右；手機、平板直拿上下排 */
.qmeta .jump-pass { margin-left: 0; }
@media (min-width: 1000px) {
  body.has-pass main { max-width: 1320px; }
  .qwrap { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
  .qwrap > .passage { position: sticky; top: 70px; max-height: calc(100vh - 90px); overflow: auto; margin: 0; }
  .qcol > .card.q { margin-top: 0; }
  .jump-pass { display: none; }
}
/* 題組文章重新排版（原本只有圖的 35 篇，2026-11-13）：mathlite.js 的 <h> <table> <list> <note> <card> <chat>… */
.ly .ly-p { margin: 6px 0; }
.ly-h { font-size: 1.18em; font-weight: 800; text-align: center; line-height: 1.4; margin: 10px 0; }
.ly-h2 { font-weight: 800; line-height: 1.5; margin: 14px 0 2px; }
.ly-c { text-align: center; }
.ly-r { text-align: right; }
.ly-note { text-align: right; margin: 10px 0 4px; }
.ly-note > span { display: inline-block; text-align: left; font-size: 16px; line-height: 1.6; background: #fff; border: 1.5px solid #a89878; border-radius: 6px; padding: 3px 10px; }
.ly-note > span::before { content: "📖 "; }
.ly-url { font-size: 15px; line-height: 1.5; color: #4a4a4a; background: #ebe8e1; border-radius: 999px; padding: 3px 14px; margin: 2px 0 10px; overflow-wrap: anywhere; }
.ly-list { list-style: none; margin: 6px 0; padding: 0; }
.ly-list li { padding-left: 1.5em; text-indent: -1.5em; margin: 3px 0; }
.ly-list li.sub { margin-left: 1.5em; }
.ly-tw { overflow-x: auto; margin: 10px 0; }
.ly-table { border-collapse: collapse; font-size: 16px; line-height: 1.5; background: #fff; }
.ly-table th, .ly-table td { border: 1px solid #b9ab8f; padding: 4px 8px; text-align: left; vertical-align: top; }
.ly-table th { background: #efe5cf; }
.ly-table .fig { margin: 2px 0; }
.ly-card { background: #fff; border: 1.5px solid #b9ab8f; border-radius: 10px; padding: 6px 12px; margin: 10px 0; }
.ly-card > .ly-p:first-child .fig, .ly-card > .fig:first-child { margin-top: 4px; }
.ly-chat { background: #eeebe4; border-radius: 12px; padding: 4px 10px; margin: 10px 0; }
.ly-msg { margin: 8px 0; max-width: 92%; }
.ly-msg.me { margin-left: auto; text-align: right; }
.ly-who { font-size: 14px; font-weight: 700; color: var(--muted); line-height: 1.4; }
.ly-bub { display: inline-block; text-align: left; background: #fff; border: 1.5px solid #c9bda5; border-radius: 14px; padding: 3px 12px; line-height: 1.6; }
.ly-msg.me .ly-bub { background: #e6f2e1; }
.ly-sm { font-size: 0.85em; }
.ly .fig { margin: 10px 0; }
.ly .fig img { mix-blend-mode: multiply; }  /* 切出來的圖白底融進米色的文章底 */
.ly .ly-p, .ly-list li, .ly-bub, .ly-note > span { overflow-wrap: anywhere; }  /* 長網址、email 在手機上自己換行 */
.ly-table td, .ly-table th { overflow-wrap: break-word; }  /* 表格不能用 anywhere：欄會縮到一個字寬（年份變成 19／40） */
.fig-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.fig-wide .fig-btn { max-width: none; }
.fig-wide img { max-width: none; }
@media (min-width: 700px) { .fig-wide img { max-width: 100%; } }
@media (min-width: 700px) { .zoom-hint { display: none; } }
.opts { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.opt { display: flex; align-items: flex-start; gap: 10px; text-align: left; width: 100%; min-height: 54px; padding: 10px 14px; border-radius: 12px; border: 2px solid var(--line); background: #fff; font: inherit; font-size: 19px; color: inherit; cursor: pointer; }
.opt:hover:not(:disabled) { border-color: var(--brand); background: #f3f8fa; }
.opt-l { font-weight: 700; min-width: 2.2em; }
.opt img { max-width: 100%; height: auto; }
.opt.right { border-color: var(--ok); background: var(--ok-bg); }
.opt.wrong { border-color: var(--no); background: var(--no-bg); }
.opt.dim { opacity: .6; }
.opt:disabled { cursor: default; }

.result.ok { border-color: var(--ok); }
.result.no { border-color: var(--no); }
.res-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 20px; }
.result.ok .res-head b { color: var(--ok); }
.result.no .res-head b { color: var(--no); }
.ex { font-size: 18px; line-height: 1.9; }
.why-not { padding-left: 1.1em; font-size: 17px; }
.why-not li { margin: 6px 0; }
.why-not li.mine { background: var(--no-bg); border-radius: 8px; padding: 4px 8px; list-style-position: inside; margin-left: -1.1em; }
.inline { display: inline; }
.goto { background: #fbf3df; border-radius: 12px; padding: 4px 14px 14px; margin: 16px 0; }
.goto .btn.go { width: 100%; white-space: normal; text-align: center; }
.wait { position: relative; height: 34px; margin: 10px 0 6px; border-radius: 8px; background: #eee; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.wait-bar { position: absolute; left: 0; top: 0; bottom: 0; background: #f3dfa6; }
.wait-t { position: relative; font-size: 15px; color: var(--muted); }
.wait-t.pulse { animation: pulse .35s; color: var(--ink); font-weight: 700; }
@keyframes pulse { 50% { transform: scale(1.25); } }
.big-num { font-size: 30px; font-weight: 700; }

/* 算式（tools/exam_drill/mathlite.js 產生的標籤） */
.ml { white-space: normal; overflow-wrap: normal; }
.ml-fr, .ml-sq, .ml-cs, .ml-ol, .ml-arc { white-space: nowrap; }
.ml i { font-family: "Times New Roman", "Cambria Math", serif; font-style: italic; font-size: 1.08em; }
.ml-op { padding: 0 .12em; }
.ml-fr { display: inline-flex; flex-direction: column; vertical-align: middle; text-align: center; margin: 0 .1em; font-size: .92em; line-height: 1.25; }
.ml-fr .ml-n { border-bottom: 1.5px solid currentColor; padding: 0 .15em; }
.ml-fr .ml-d { padding: 0 .15em; }
.ml-sq { white-space: nowrap; }
.ml-rad { font-family: "Times New Roman", serif; }
.ml-sqb { border-top: 1.5px solid currentColor; padding: 0 .1em; margin-left: -.05em; }
.ml-idx { font-size: .6em; margin-right: -.3em; }
.ml-ol { border-top: 1.5px solid currentColor; padding-top: 1px; }
.ml-arc { position: relative; display: inline-block; }
.ml-arc::before { content: "⌒"; position: absolute; left: 0; right: 0; top: -.85em; text-align: center; font-size: .9em; transform: scaleX(1.6); }
.ml-cs { display: inline-flex; align-items: center; vertical-align: middle; }
.ml-br { font-size: 2.3em; line-height: 1; font-weight: 300; margin-right: .1em; }
.ml-rows { display: inline-flex; flex-direction: column; line-height: 1.5; }
.ml-box { display: inline-block; border: 1.5px solid #8a857a; padding: 4px 10px; margin: 6px 0; border-radius: 4px; }
.ml-tx { font-style: normal; }
sup { font-size: .7em; }
sub { font-size: .7em; }

/* 放大看圖、回報視窗 */
.ov { position: fixed; inset: 0; z-index: 20; }
.vw { position: absolute; inset: 0; background: rgba(20, 20, 20, .92); display: flex; flex-direction: column; }
.vw-bar { display: flex; align-items: center; gap: 8px; padding: 8px max(12px, env(safe-area-inset-left)); color: #fff; font-size: 16px; }
.vw-bar .btn-s { background: #fff; color: #222; border-color: #fff; min-width: 44px; }
.vw-z { min-width: 3.2em; text-align: center; }
.vw-title { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vw-box { flex: 1; overflow: auto; -webkit-overflow-scrolling: touch; background: #fff; touch-action: pan-x pan-y pinch-zoom; }
.vw-box img { width: 100%; height: auto; display: block; }
.dlg-wrap { position: absolute; inset: 0; background: rgba(0, 0, 0, .45); display: flex; align-items: center; justify-content: center; padding: 16px; }
.dlg { width: min(440px, 100%); max-height: 100%; overflow: auto; margin: 0; }
.dlg h2 { margin-top: 0; }
.reasons { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.reason { font: inherit; font-size: 16px; padding: 8px 12px; min-height: 44px; border-radius: 10px; border: 1.5px solid var(--line); background: #fff; cursor: pointer; }
.reason.on { border-color: var(--brand); background: #e6f1f6; font-weight: 700; }
.dlg input { width: 100%; font: inherit; font-size: 16px; padding: 10px; border-radius: 10px; border: 1.5px solid var(--line); }
.row-btns { display: flex; gap: 10px; justify-content: flex-end; margin-top: 12px; }

@media (min-width: 900px) {
  .stem { font-size: 20px; }
  .opt { font-size: 20px; }
}
/* 手機橫拿（高度很矮）：上方列變薄 */
@media (max-height: 460px) {
  .top { padding-top: 4px; padding-bottom: 4px; }
  .top .back { min-height: 44px; }  /* 手機橫拿也維持 44px 好按（總管 2026-11-12） */
  main { padding-top: 8px; }
}

/* ---------- 工坊和武器（家長 2026-11-12：「畫面漂亮一點，要有工坊的背景，每一科就是一把武器，隨著做題正確題數增加，武器漸漸升級到越來越華麗」）
   背景只在選科、選章、成績這些頁亮出來；做題那一頁題目和附圖留在白色卡片上（官方附圖是白底）。 ---------- */
body::before { content: ""; position: fixed; inset: 0; z-index: -1;
  background: radial-gradient(ellipse at 50% 45%, rgba(18, 12, 6, 0) 35%, rgba(18, 12, 6, .7) 100%), #120c06 url(img/bg_forge.jpg) center / cover no-repeat; }
body:not(.home)::before { filter: brightness(.5); }
main { background: rgba(246, 236, 214, .97); border-radius: 20px; margin: 12px auto; box-shadow: 0 6px 24px rgba(0, 0, 0, .4); }
.foot { background: rgba(246, 236, 214, .9); border-radius: 16px; margin-bottom: 24px; }
@media (max-width: 900px) { main { margin: 10px 8px; } .foot { margin: 0 8px 24px; } }
body.home main { background: transparent; box-shadow: none; }
.forge-hero { text-align: center; color: #fff3d6; text-shadow: 0 2px 6px rgba(0, 0, 0, .8); padding: 6px 4px 2px; }
.forge-hero h1 { font-size: 28px; margin: 6px 0; color: var(--gold); }
.forge-hero p { font-size: 17px; margin: 0 0 6px; }
.forge-note { color: #fff3d6; text-shadow: 0 1px 4px rgba(0, 0, 0, .9); background: rgba(18, 12, 6, .45); border-radius: 12px; padding: 8px 12px; }

/* 武器卡：照首頁 .world-tile（紙色底、科目顏色的內框、下緣厚影）；等級的顏色照卡片稀有度 N／R／SR／SSR */
.wgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 14px; margin: 14px 0; }
.wcard { --c: #2f6f8f; display: flex; flex-direction: column; gap: 4px; padding: 10px 10px 12px; border-radius: 20px; text-decoration: none; color: var(--ink);
  background: #f6ecd6; box-shadow: 0 6px 0 color-mix(in srgb, var(--c) 70%, #000), inset 0 0 0 4px var(--c); transition: transform .15s; }
.wcard:hover { transform: translateY(-3px); }
.wcard:active { transform: translateY(4px); box-shadow: 0 2px 0 color-mix(in srgb, var(--c) 70%, #000), inset 0 0 0 4px var(--c); }
.wcard.locked { filter: grayscale(.7); }
.wstand { display: block; position: relative; aspect-ratio: 1; border-radius: 14px; overflow: hidden; border: 3px solid #a07a50;
  background: radial-gradient(circle at 50% 58%, #e9c995 0, #9a6a3a 60%, #5b3a1c 100%); }
.wstand img { position: relative; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 4px 5px rgba(0, 0, 0, .45)); }
.t2 .wstand { border-color: #c8ced4; background: radial-gradient(circle at 50% 58%, #dfe3e7 0, #9aa3ad 55%, #59626b 100%); }
.t3 .wstand { border-color: #9fd0ff; background: radial-gradient(circle at 50% 58%, #cfe7ff 0, #5aa9f0 55%, #1f5fa8 100%); }
.t4 .wstand { border-color: #e3b8ff; background: radial-gradient(circle at 50% 58%, #f1dcff 0, #c27cf2 55%, #6a2ea0 100%); }
.t5 .wstand { border-color: #fff1b8; background: radial-gradient(circle at 50% 58%, #fff6c8 0, #ffe27a 30%, #f39c12 65%, #c0392b 100%); box-shadow: 0 0 14px rgba(255, 200, 80, .9); }
.t5 .wstand::before { content: ""; position: absolute; inset: -40%; background: conic-gradient(from 0deg, transparent 0 20deg, rgba(255, 255, 220, .45) 30deg, transparent 40deg 110deg, rgba(255, 255, 220, .45) 120deg, transparent 130deg 200deg, rgba(255, 255, 220, .45) 210deg, transparent 220deg 290deg, rgba(255, 255, 220, .45) 300deg, transparent 310deg); animation: spin 14s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.wcard.locked .wstand { border-color: #8a857a; background: #4a4038; }
.wcard.locked .wstand img { filter: brightness(.45); }
.wname { display: flex; flex-direction: column; line-height: 1.35; }
.wname b { font-size: 19px; font-weight: 900; }
.wname .muted { color: var(--muted); }
.wtier { align-self: flex-start; font-weight: 900; font-size: 15px; color: #fff; border-radius: 999px; padding: 1px 10px; background: #8b6b4a; }
.t2 .wtier { background: linear-gradient(#9aa3ad, #59626b); }
.t3 .wtier { background: linear-gradient(#5aa9f0, #1f5fa8); }
.t4 .wtier { background: linear-gradient(#c27cf2, #6a2ea0); }
.t5 .wtier { background: linear-gradient(#ffe27a, #f39c12 55%, #c0392b); color: #3a1600; }
.wtier.lock { background: #6f6a60; }
.wbar { height: 9px; border-radius: 5px; background: #e0cfa8; overflow: hidden; }
.wbar span { display: block; height: 100%; border-radius: 5px; background: linear-gradient(90deg, #ffe08a, var(--gold-d)); }
.wnext { color: var(--muted); line-height: 1.4; }

/* 一科的頁面上方：這一科的武器 */
.wbanner { --c: #2f6f8f; display: flex; align-items: center; gap: 14px; padding: 12px; margin: 4px 0 8px; border-radius: 20px;
  background: #fffaf0; box-shadow: 0 5px 0 color-mix(in srgb, var(--c) 70%, #000), inset 0 0 0 4px var(--c); }
.wbanner .wstand { width: 112px; flex: none; }
.wb-main { flex: 1; display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.wb-main .page-title { margin: 0; }

/* 武器升級（光和閃光用 CSS 做，不畫進圖裡） */
.lvup-wrap { background: rgba(18, 12, 6, .8); }
.lvup { position: relative; width: min(420px, 100%); text-align: center; padding: 18px 18px 20px; border-radius: 22px; overflow: hidden;
  background: linear-gradient(#fff8ea, #f6ecd6); box-shadow: 0 0 0 4px var(--gold), 0 0 40px rgba(255, 200, 80, .7); animation: lvpop .45s ease-out; }
.lvup-rays { position: absolute; left: 50%; top: 150px; width: 560px; height: 560px; margin: -280px 0 0 -280px; border-radius: 50%;
  background: repeating-conic-gradient(rgba(255, 200, 60, .45) 0 6deg, rgba(255, 200, 60, 0) 6deg 30deg); animation: spin 10s linear infinite; }
.lvup img { position: relative; width: min(240px, 62vw); height: auto; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .4)); animation: lvimg .8s ease-out; }
.lvup h2 { position: relative; margin: 4px 0; font-size: 26px; color: #8a5a00; }
.lvup p { position: relative; margin: 4px 0; }
.lvup .wtier { position: relative; align-self: center; display: inline-block; }
.lvup .btn { position: relative; margin-top: 10px; }
@keyframes lvpop { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes lvimg { 0% { transform: scale(.3) rotate(-30deg); opacity: 0; } 60% { transform: scale(1.15) rotate(6deg); opacity: 1; } 100% { transform: scale(1) rotate(0); } }
@media (prefers-reduced-motion: reduce) { .lvup, .lvup img, .lvup-rays, .t5 .wstand::before { animation: none; } }

/* 窄手機（360～420 寬）：左上「返回」和右邊的登出一定要留著；「會考」兩字收起來，名字太長就截斷 */
@media (max-width: 420px) {
  .top { gap: 6px; padding-left: max(10px, env(safe-area-inset-left)); padding-right: max(10px, env(safe-area-inset-right)); }
  .top .back { padding: 0 11px; font-size: 16px; }
  .top .brand { font-size: 17px; }
  .brand-k { display: none; }
  .top #who .muted { max-width: 4.6em; }
}
@media (max-width: 330px) { .top .brand { display: none; } }

/* 課本版本鈕（家長 2026-11-21：會考題對照課文章節要分版本；樣子照遊戲「📚 對應課綱」的版本鈕） */
.vers { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 12px 0 4px; }
.vers-l { font-weight: 800; }
.vers-b { display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; background: rgba(58, 40, 16, .95); box-shadow: inset 0 0 0 2px rgba(242, 193, 78, .35); }
.ver { min-height: 40px; padding: 4px 16px; border: 0; border-radius: 999px; font: inherit; font-size: 17px; font-weight: 900; color: #fff; background: transparent; cursor: pointer; }
.ver.on { background: var(--gold); color: var(--ink); }
