.credit { color: #fff; opacity: .7; font-size: 13px; margin-left: 12px; text-shadow: 0 1px 3px #000; }
#rotate { position: fixed; inset: 0; z-index: 300; display: none; place-items: center; padding: 24px; background: rgba(12, 8, 4, .94); color: #fff8e6; text-align: center; }
body.portrait #rotate:not(.off) { display: grid; }
#rotate .ic { font-size: 64px; animation: tilt 1.6s ease-in-out infinite; }
#rotate p { font-size: 22px; font-weight: 900; line-height: 1.6; margin: 12px 0 20px; }
@keyframes tilt { 50% { transform: rotate(-90deg); } }
@media (prefers-reduced-motion: reduce) { #rotate .ic { animation: none; } }
/* 分享版整頁等比例縮小成 1200×640 的版面，窄螢幕版面規則不適用：統治筆記、說明牌小地圖照常顯示 */
@media (max-width: 900px) {
  .cn-notes { display: block; }
  .cn-bubble, .cn-advisors { right: 272px; }
  .cn-ruler { width: 24%; }
  .mu-placard { grid-template-columns: 110px 1fr auto; }
  .mu-placard .mini-tw { display: block; }
}
/* 手機橫向（矮螢幕）：題目的四個選項排成一列，面板才放得下 */
@media (max-height: 520px) {
  .wp-o { grid-template-columns: repeat(4, 1fr); }
  .war-opt-btn { font-size: 17px; padding: 8px 10px; }
  .wp-q { margin: 2px 0 8px; }
}
@media (max-height: 520px), (max-width: 960px) {
  /* 對話、上方列 */
  #dialog .box { font-size: 31px; }
  #dialog .who { font-size: 24px; }
  #dialog .next { font-size: 22px; }
  .play-top .ttl { font-size: 24px; }
  .tag { font-size: 24px; }
  .mu-door .k { width: 36px; height: 36px; font-size: 23px; }
  /* 解說卡 */
  .explain-card { width: min(1120px, 94%); max-height: calc(var(--vh, 1vh) * 90); padding: 14px 26px 10px; font-size: 30px; line-height: 1.45; }
  .explain-card .hd { font-size: 34px; }
  .explain-card .go { margin-top: 6px; font-size: 24px; }
  .explain-card .wait-bar { margin-top: 8px; }
  /* 議事廳 */
  .cn-ruler .nm { font-size: 22px; }
  .cn-bubble { left: 25%; right: 262px; padding: 10px 18px; top: 66px; }
  .cn-bubble .yr { font-size: 24px; }
  .cn-bubble .t { font-size: 34px; line-height: 1.3; }
  .cn-bubble .sub { font-size: 26px; }
  /* 有自己的問句時，問句比處境大（家長 2026-11-14，原本處境 34px、問句 26px 咖啡色） */
  .cn-bubble.hasq .t { font-size: 27px; }
  .cn-bubble.hasq .sub { font-size: 34px; }
  .cn-advisors { left: 25%; right: 262px; bottom: 10px; gap: 10px; }
  .cn-adv img { height: 96px; }
  .cn-adv .who { font-size: 20px; }
  .cn-adv .say { font-size: 28px; line-height: 1.28; min-height: 4.2em; padding: 16px 10px 10px; gap: 6px; }
  .cn-adv.plain .say { min-height: 3.4em; }
  .cn-adv .say b { width: 38px; height: 38px; font-size: 24px; }
  .cn-notes { top: 66px; bottom: 10px; right: 10px; width: 244px; padding: 10px 12px; }
  .cn-notes .hd { font-size: 22px; }
  .cn-notes li { font-size: 21px; line-height: 1.3; }
  /* 比較表 */
  .cmp-head { font-size: 28px; top: 62px; }
  .cmp-table { top: 100px; gap: 5px; padding: 8px; width: min(1160px, 97%); }
  .cmp-table .colh { font-size: 26px; padding: 3px 6px; }
  .cmp-table .rowh { font-size: 24px; padding: 3px 6px; }
  .cmp-table .cell { font-size: 25px; min-height: 46px; padding: 3px 8px; line-height: 1.2; }
  .cmp-tray { width: min(1160px, 97%); gap: 6px; bottom: 8px; }
  /* 卡片只有一行字時實際只有 23 點高，不好點（2026-11-13 理化機器人）：最少 58（實際約 34 點）；現在一次只發一張卡，托盤不會變多列 */
  .cmp-card { font-size: 25px; padding: 7px 12px; min-height: 58px; }
  .dt-zoom-x { font-size: 26px; }
  /* 手機橫拿（不是直式版面）：列名照最長的排成一行（最多 15em），不要折成兩行把每一列撐高，表格才放得進畫面（2026-11-12） */
  html:not(.hp) .cmp-table { --cmp-c0: fit-content(15em); }
  html:not(.hp) .cmp-table .corner { min-width: 9em; }
  /* 博物館 */
  .mu-prog { font-size: 26px; top: 62px; }
  .mu-ped { top: 108px; }
  .mu-ped .plate { font-size: 36px; }
  .mu-door .lb { font-size: 34px; }
  .mu-door .era { font-size: 24px; }
  .mu-door .k { font-size: 20px; }
  .mu-placard .when { font-size: 1em; }
  .mu-hall .hd { font-size: 26px; }
  .mu-hall .hd span { font-size: 20px; }
  .mu-hall figcaption { font-size: 22px; line-height: 1.2; }
  /* 偵探 */
  .dt-top { font-size: 26px; top: 60px; }
  .dt-file { top: 98px; bottom: 10px; left: 2%; width: 54%; padding: 10px 16px; }
  .dt-file .kind { font-size: 26px; }
  .dt-file .doc { font-size: 29px; line-height: 1.36; margin-top: 2px; }
  .dt-file .note { font-size: 20px; margin-top: 2px; }
  .dt-fig { margin: 4px 0 2px; padding: 4px; }
  .dt-fig svg { max-height: 158px; }
  .dt-clues { gap: 6px; margin-top: 8px; }
  .dt-clue { font-size: 25px; line-height: 1.25; padding: 8px 12px; }
  .dt-ask { top: 98px; bottom: 10px; right: 2%; width: 41%; padding: 10px 14px; gap: 6px; }
  .dt-ask .q { font-size: 30px; line-height: 1.3; }
  .dt-ask .opts { gap: 6px; }
  .dt-opt { font-size: 28px; line-height: 1.25; padding: 7px 10px; gap: 8px; align-items: center; }
  .dt-opt b { width: 34px; height: 34px; font-size: 20px; }
  .dt-worth { font-size: 20px; }
  /* 謊言怪 */
  .db-boss .nm { font-size: 26px; }
  .db-lie { top: 66px; width: 62%; padding: 10px 18px; }
  .db-lie .who { font-size: 22px; }
  .db-lie .t { font-size: 36px; line-height: 1.3; margin-top: 2px; }
  .db-lie .ask { font-size: 26px; margin-top: 6px; }
  .db-hand { bottom: 10px; gap: 10px; }
  .db-card { min-height: 0; padding: 8px 12px; }
  .db-card .top { font-size: 20px; }
  .db-card .t { font-size: 28px; line-height: 1.28; margin-top: 2px; }
  /* 攻城戰、創世旅程 */
  .wb-s { font-size: 20px; }
  .war-panel { width: min(1240px, 96%); bottom: 8px; padding: 8px 16px 10px; max-height: calc(var(--vh, 1vh) * 62); }
  .wp-n { font-size: 20px; }
  .wp-q { font-size: 31px; line-height: 1.25; margin: 2px 0 6px; }
  .wp-o { gap: 6px 8px; }
  .war-opt-btn { font-size: 27px; line-height: 1.22; padding: 6px 10px; gap: 8px; }
  .war-opt-btn b { width: 34px; height: 34px; font-size: 20px; }
  .war.fiction .wb-t { font-size: 26px; line-height: 1.2; }
  .war.fiction .wb-s { font-size: 18px; }
  .war.fiction .war-name { font-size: 24px; }
  /* 考古題面板 */
  .boss-panel { top: 60px; bottom: 10px; width: 54%; padding: 10px 14px; }
  .boss-panel .qmeta { font-size: 20px; margin-bottom: 4px; }
  .boss-panel .passage-tog { font-size: 20px; }
  .boss-panel .opts { gap: 6px; margin-top: 8px; }
  .boss-panel .opt { font-size: 27px; line-height: 1.25; padding: 6px 10px; }
  .boss-panel .opt b { font-size: 24px; }
  /* 關卡說明視窗 */
  .modal p[style*="19px"] { font-size: 27px !important; line-height: 1.4 !important; }
  .modal .muted { font-size: 22px; }
  .chap-card .muted, .chap-card .era { font-size: 20px; }
  html .syl-label { font-size: 22px; }
  html .syl-info { font-size: 20px; }
  html .syl-g { font-size: 20px; }
  /* 地圖旁的面板 */
  .side-btn { font-size: 21px; }
  .side-btn small { font-size: 20px; }
  .daily { font-size: 19px; }
  .daily b { font-size: 20px; }
  .badge { font-size: 19px; }
  /* 章節列表 */
  .chap-card2 .cc-num { font-size: 20px; }
  .chap-card2 .cc-title { font-size: 25px; }
  .chap-card2 .cc-stars { font-size: 20px; }
  .sem-tabs button { font-size: 24px; }
  .btn { font-size: 22px; }
  /* 數學、理化的題目區（這幾份樣式比這裡晚載入，所以前面加 html） */
  html .mx-q { font-size: 30px; line-height: 1.3; padding: 6px 14px; }
  html .mx-tag { font-size: 23px; }
  html .mx-tip { font-size: 24px; }
  html .mx-worth { font-size: 20px; }
  html .mx-clue { font-size: 23px; min-height: 50px; }
  html .mx-pick { font-size: 27px; line-height: 1.25; min-height: 58px; padding: 8px 12px; }
  html .mx-pick b { font-size: 20px; }
  html .mx-door span { font-size: 28px; line-height: 1.25; }
  html .mx-card { font-size: 28px; line-height: 1.4; }
  html .mx-who .bubble { font-size: 26px; line-height: 1.3; }
  html .mx-book .hd { font-size: 22px; }
  html .mx-notes { font-size: 22px; line-height: 1.3; }
  html .mx-line { font-size: 28px; line-height: 1.25; padding: 7px 12px; }
  html .mx-line b { font-size: 20px; }
  html .mx-hall .hd { font-size: 24px; }
  html .mx-hall .it { font-size: 22px; }
  html .mx-thint { font-size: 22px; }
  html .mx-trow .lab { font-size: 26px; }
  html .mx-sc-btn, html .mx-sc-clear { font-size: 22px; }
  /* 理化的實驗台 */
  html .sx-goals, html .sx-mini { font-size: 22px; }
  html .sx-table { font-size: 24px; }
  html .sx-table th { font-size: 21px; }
  html .sx-step { font-size: 24px; }
  html .sx-step .val { font-size: 26px; }
  html .sx-glabel { font-size: 24px; }
  html .sx-listen, html .sx-say { font-size: 26px; line-height: 1.3; }
  html .sx-hud { font-size: 27px; }
  /* 地科 */
  html .ea-q { font-size: 30px; line-height: 1.3; }
  html .ea-tag { font-size: 20px; }
  html .ea-tip { font-size: 22px; }
  html .ea-cap { font-size: 26px; }
  html .ea-card p { font-size: 28px; line-height: 1.4; }
  html .ea-card .ea-sub { font-size: 22px; }
  html .ea-opt b { font-size: 27px; }
  html .ea-chip b, html .ea-chip .no { font-size: 24px; }
  html .ea-chip small, html .ea-inset span { font-size: 20px; }
  html .ea-sortb { min-height: 52px; padding: 2px 12px; }
  html .ea-sortb, html .ea-sortrow b, html .ea-spotname, html .ea-clear { font-size: 22px; }
  html .ea-pics figcaption { font-size: 22px; }
  html .ea-go { font-size: 27px; }
  /* 生物 */
  html .bx-panel { width: 390px; gap: 6px; padding: 10px 12px; }
  html .bx-opts { gap: 6px; }
  html .bx-prompt { font-size: 30px; line-height: 1.3; }
  html .bx-lab .bx-prompt { font-size: 29px; }
  html .bx-opt { font-size: 27px; line-height: 1.22; padding: 8px 12px; }
  html .bx-card p { font-size: 28px; line-height: 1.4; }
  html .bx-card p.muted { font-size: 22px; }
  html .bx-banner b { font-size: 26px; }
  html .bx-banner span { font-size: 24px; }
  html .bx-state, html .bx-gun { font-size: 24px; }
  html .bx-gun small, html .bx-gens .g small { font-size: 18px; }
  html .bx-gens b, html .bx-pet { font-size: 20px; }
  html .bx-chip { font-size: 20px; }
  html .bx-bar label, html .bx-segb, html .bx-ctrl, html .bx-hint, html .bx-round { font-size: 22px; }
  /* 國文的小遊戲 */
  html .cg-name { font-size: 26px; }
  html .cg-foe > div { font-size: 24px; }
  html .cg-scroll small { font-size: 24px; }
  html .cg-slot small { font-size: 24px; }
}
/* 英文網站的拆字工坊（game/js/word.js）。網站版整頁會縮放，這裡的大小都用 px 和 %，不用 vw */
.wpart .wp-panel { position: absolute; left: 50%; transform: translateX(-50%); top: 62px; bottom: 12px; width: min(1060px, 94%); padding: 14px 22px; box-sizing: border-box; overflow-y: auto; border-radius: 20px; background: #fffaf0; box-shadow: 0 8px 24px rgba(0, 0, 0, .35); display: flex; flex-direction: column; gap: 10px; color: var(--ink); }
.wp-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 22px; }
.wp-bonus { padding: 2px 10px; border-radius: 10px; background: #fff3cf; color: #8a5200; font-size: 22px; font-weight: 800; }
.explain-card .wp-bonus { display: inline-block; margin-top: 8px; }
.wp-pairs { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 12px; }
.wp-pair { display: flex; align-items: baseline; gap: 10px; padding: 8px 16px; border-radius: 14px; background: #fff; box-shadow: 0 3px 0 #c9a86a; font-size: 30px; font-weight: 700; }
.wp-pair b { font-weight: 900; }
.wp-pair i { font-style: normal; color: #c92f2a; }
.wp-pair small { font-size: 22px; font-weight: 700; color: var(--ink-2); }
.wp-doc { padding: 12px 18px; border-radius: 12px; background: #fff3cf; font-size: 33px; font-weight: 700; line-height: 1.4; }
.wp-doc mark { padding: 0 4px; border-radius: 6px; background: #ffd54f; }
.wp-word { text-align: center; font-size: 40px; font-weight: 900; }
.wpart .wp-q { margin: 0; font-size: 34px; font-weight: 900; line-height: 1.3; }
.wpart .wp-head + * { margin-top: auto; }
.wpart .wp-panel > :last-child { margin-bottom: auto; }
.wp-opts { display: grid; gap: 10px; }
.wp-opt.right { background: #c9f2c7; }
.wp-opt.wrong { background: #f8c9c6; }
.wp-opt.hint { outline: 3px solid #f0a500; }
.wp-target { text-align: center; font-size: 46px; font-weight: 900; }
.wp-slots { display: flex; align-items: center; justify-content: center; gap: 12px; }
.wp-slots .plus { font-size: 36px; font-weight: 900; }
.wp-slot { min-width: 180px; height: 70px; display: grid; place-items: center; border: 3px dashed #b9821f; border-radius: 12px; font-size: 36px; font-weight: 900; }
.wp-slot.filled { border-style: solid; background: #fff; }
.wp-tiles { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.wp-tile { min-width: 130px; padding: 12px 20px; border-radius: 12px; background: var(--gold); box-shadow: 0 4px 0 #b9821f; font-size: 34px; font-weight: 900; color: var(--ink); }
.wp-tile:disabled, .wp-letter:disabled { opacity: .3; box-shadow: none; }
.wp-boxes { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.wp-box { width: 58px; height: 68px; display: grid; place-items: center; border-bottom: 4px solid #b9821f; font-size: 42px; font-weight: 900; }
.wp-box.filled { color: #1c7c33; }
.wp-letter { width: 72px; height: 72px; border-radius: 12px; background: var(--gold); box-shadow: 0 4px 0 #b9821f; font-size: 38px; font-weight: 900; color: var(--ink); }
.wp-letter.hint { outline: 4px solid #2b8a3e; }
/* 點錯零件、拼錯字母的提示：寫在零件下面，先留好位置（visibility），出現時畫面不會跳 */
.wp-tip { min-height: 1.35em; padding: 6px 14px; border-radius: 12px; text-align: center; font-size: 28px; font-weight: 800; line-height: 1.35; visibility: hidden; }
.wp-tip.on { visibility: visible; }
.wp-tip.bad { background: #fde3e1; color: #a3241f; }
.wp-tip.order { background: #fff3cf; color: #7a4b12; }
.wp-tile.wp-wrong { background: #f3c2bd; text-decoration: line-through; }
/* 手機橫拿時整頁會縮到約 0.59 倍（build_share.py 照 1200×640 縮），下面這些字縮完才看得清楚（家長 2026-11-05：題目的字有點小） */
.detective .dt-opt { padding: 12px 14px; font-size: 30px; font-weight: 800; line-height: 1.3; align-items: center; }
.wpart .dt-opt { padding: 12px 14px; font-size: 33px; font-weight: 800; line-height: 1.3; align-items: center; }
.wpart .dt-opt b, .detective .dt-opt b { width: 38px; height: 38px; font-size: 20px; }
.council .cn-bubble .t { font-size: clamp(32px, calc(var(--vw, 1vw) * 2.6), 38px); }
.council .cn-bubble .sub { font-size: 22px; }
.council .cn-adv.plain .say { min-height: 3.2em; align-items: center; font-size: 34px; font-weight: 900; }
.council .cn-adv .say b { width: 38px; height: 38px; font-size: 20px; }
.cn-notes .hd { font-size: 22px; }
.cn-notes li { font-size: 22px; }
.mu-prog { font-size: 28px; }
.mu-ped .plate { font-size: 40px; }
.mu-door .era { font-size: 21px; }
.dt-top { font-size: 26px; }
.dt-file .kind { font-size: 28px; }
.dt-file .doc { font-size: clamp(31px, calc(var(--vw, 1vw) * 2.6), 36px); line-height: 1.5; }
.dt-file .note { font-size: 18px; }
.dt-clue { font-size: 26px; }
.dt-ask .q { font-size: clamp(30px, calc(var(--vw, 1vw) * 2.5), 34px); }
.dt-worth { font-size: 20px; }
.db-lie .ask { font-size: clamp(25px, calc(var(--vw, 1vw) * 2.1), 28px); }
.db-card .top { font-size: 20px; }
.db-card .t { font-size: clamp(28px, calc(var(--vw, 1vw) * 2.3), 32px); }
.cmp-head { font-size: 28px; }
.cmp-table .colh { font-size: 26px; padding: 3px 6px; }
.cmp-table .rowh { font-size: 24px; padding: 3px 6px; }
.cmp-table .cell { min-height: 56px; padding: 3px 8px; font-size: 25px; }
.cmp-table { gap: 5px; }
.cmp-card { font-size: 25px; padding: 7px 12px; }
.cmp-tray { width: min(1160px, 97%); gap: 6px; }
.q-banner { font-size: clamp(30px, calc(var(--vw, 1vw) * 2.8), 38px); }
.explain-card { font-size: clamp(27px, calc(var(--vw, 1vw) * 2.2), 30px); }
/* 聽力的解說卡（解說＋原文）在電腦上原本只有 780px 寬、字 27px，一題要捲兩三頁（2026-11-08 🚩回報 9，1225×623）；加寬。
   手機矮螢幕下面的 @media 會再改成 96%，要放在它們前面 */
.scene.listen .explain-card { width: min(1100px, 94%); }
/* 對話、關卡說明、地圖右邊的面板（主工作階段 2026-11-05 量的：iPhone 橫拿網址列還在時整頁只有 0.531 倍） */
#dialog .box { font-size: 31px; line-height: 1.45; }
#dialog .who { font-size: 24px; }
#dialog .next { font-size: 22px; }
.tag { font-size: 22px; }
.node-panel > p { font-size: 26px !important; line-height: 1.5 !important; }
.map-side { gap: 10px; }
.map-side .parch { padding: 12px 18px; }
.chap-card h2 { font-size: 30px; }
#chap-sub { font-size: 22px; }
.chap-card .era { font-size: 22px; }
#chap-prog-txt { font-size: 20px; }
.side-btn { padding: 8px 6px; font-size: 22px; }
.side-btn .big-ic { font-size: 30px; }
.side-btn small { font-size: 20px; }
.daily { font-size: 20px; line-height: 1.4; }
.daily b { font-size: 21px; }
.word-total { margin-left: 4px; background: #2c6e9b; white-space: nowrap; border: 0; font-family: inherit; cursor: pointer; }
.word-side { cursor: pointer; }
.sem-tabs { flex-wrap: wrap; }
.sem-tabs .word-daily { margin-left: auto; background: var(--gold); color: var(--ink); white-space: nowrap; }
.sem-tabs .word-daily.done { background: rgba(255, 255, 255, .15); color: #fff; }
.wp-shake { animation: wp-shake .35s; }
@keyframes wp-shake { 25% { transform: translateX(-6px); } 50% { transform: translateX(6px); } 75% { transform: translateX(-4px); } }

/* 會考聽力（game/js/listen.js）手機橫拿、畫面很矮時：網址列或 App 內建瀏覽器的工具列把高度吃掉，整頁縮得更小。
   794×260 只剩 0.41 倍，選項 28px 實際只有 11px、「再聽一次」6.5px（2026-11-07 🚩回報 #5，家長：「放大」）。
   橫拿時版面都是 640 高再等比縮小，同一組大小在每種矮螢幕排起來都一樣，只差實際字級。
   高 400 以下放大一級（實際：選項 16～21px），300 以下再大一級（260 高：選項 16.2px、說明和解說 14.2px、小標 11.4px）。
   電腦、平板、直拿都不套用。題目卡和解說卡本來就能捲動，放不下就捲 */
@media (orientation: landscape) and (max-height: 400px) {
  .scene.listen .ls-panel { width: min(1500px, 96%); }
  .scene.listen .ls-head { font-size: 30px; }
  .scene.listen .ls-head .tag { font-size: 28px; }
  .scene.listen .ls-head .muted { font-size: 24px; }
  .scene.listen .ls-inst { font-size: 30px; }
  .scene.listen .ls-play { width: 84px; height: 84px; font-size: 34px; }
  .scene.listen .ls-time { font-size: 24px; }
  .scene.listen .btn.ls-again { font-size: 30px; padding: 6px 16px; }
  .scene.listen .ls-opt.dt-opt { font-size: 34px; padding: 8px 14px; }
  .scene.listen .ls-opt.dt-opt b { width: 42px; height: 42px; font-size: 24px; }
  .scene.listen .explain-card { width: min(1500px, 96%); font-size: 30px; }
  .scene.listen .explain-card .go { font-size: 24px; }
  .scene.listen .ls-script small { font-size: 24px; }
  /* 附圖的題（107-20、110-13、112-18、113-18）選項只是「選 A」，排成一列，圖和選項才放得進同一畫面 */
  .scene.listen .ls-panel:has(.ls-fig) .ls-opts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (orientation: landscape) and (max-height: 300px) {
  .scene.listen .ls-head { font-size: 36px; }
  .scene.listen .ls-head .tag { font-size: 34px; }
  .scene.listen .ls-head .muted { font-size: 28px; }
  .scene.listen .ls-inst { font-size: 35px; }
  .scene.listen .ls-play { width: 100px; height: 100px; font-size: 40px; }
  .scene.listen .ls-time { font-size: 28px; }
  .scene.listen .btn.ls-again { font-size: 35px; padding: 6px 18px; }
  .scene.listen .ls-opt.dt-opt { font-size: 40px; padding: 8px 14px; }
  .scene.listen .ls-opt.dt-opt b { width: 50px; height: 50px; font-size: 28px; }
  .scene.listen .explain-card { font-size: 35px; }
  .scene.listen .explain-card .go { font-size: 28px; }
  .scene.listen .ls-script small { font-size: 28px; }
  .scene.listen .ls-fig { max-height: 176px; }
}
/* 聽力的解說卡（原文＋解說）常常要往下捲，「5 秒後可以繼續／點一下繼續」原本在最下面看不到，倒數時點了看起來沒反應
   （2026-11-08 🚩回報 7「按了沒反應」，Android 375×695 直拿）：黏在卡片底部；倒數條拿掉，倒數看那行字 */
/* 卡片下緣留白統一 10px（電腦原本 16px），這條黏到最底（bottom/margin -10px）才不會從下面露出捲動中的字；底下那條框線畫在這條上 */
.scene.listen .explain-card { padding-bottom: 10px; }
.scene.listen .explain-card .go { position: sticky; bottom: -10px; margin: 10px -21px -10px; padding: 8px 21px 16px; background: rgb(255, 250, 236); box-shadow: 0 -12px 12px -10px rgba(80, 50, 10, .35), inset 0 -5px 0 #e3bb5c; }
.scene.listen .explain-card.good .go { box-shadow: 0 -12px 12px -10px rgba(80, 50, 10, .35), inset 0 -5px 0 #4cc982; }
.scene.listen .explain-card.bad .go { box-shadow: 0 -12px 12px -10px rgba(80, 50, 10, .35), inset 0 -5px 0 #e5675f; }
.scene.listen .explain-card .wait-bar { display: none; }
/* 原本的 blink 是整塊變透明，黏住的那條會連底色一起閃、露出後面的字，改成只閃字 */
.scene.listen .explain-card.ready .go { opacity: 1; animation: lsGoBlink 1.2s infinite; }
.scene.listen .explain-card .go.wait { opacity: 1; }  /* 倒數時原本 .85 半透明，黏住後會透出後面的字 */
@keyframes lsGoBlink { 50% { color: rgba(185, 130, 31, .25); } }
/* 錄音還沒播完就答錯：解說卡最上面提醒「記得把題目聽完」（家長 2026-11-09） */
.scene.listen .explain-card .ls-early { margin: 0 0 10px; padding: 6px 14px; border-radius: 12px; background: #fff1c9; color: #8a4b00; font-weight: 900; }

.chap-card2.paywalled { filter: saturate(.55); }
.chap-card2.paywalled .cc-stars { color: #8e2320; }
.acct-chip { display: inline-flex; align-items: center; gap: 6px; }
.acct-chip img { width: 26px; height: 26px; border-radius: 50%; }
.chap-head .acct-chip { margin-left: auto; }
.acct-chip .acct-title { padding: 1px 9px; border-radius: 999px; background: #7a520f; color: #ffe9b0; font-size: 14px; white-space: nowrap; }
.login-ways { display: flex; flex-direction: column; align-items: stretch; gap: 10px; width: min(100%, 360px); margin: 4px auto 6px; }
.login-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; text-decoration: none; white-space: nowrap; padding-inline: 16px; }
.google-btn { background: #fff; color: #1f1f1f; box-shadow: inset 0 0 0 1px #747775, 0 4px 0 #c9c9c9; }
.pay-sum { margin: 4px 0 12px; padding-left: 1.2em; font-size: 15px; line-height: 1.6; }
.pay-sum li { margin-bottom: 4px; }
.legal-foot { position: fixed; left: max(12px, env(safe-area-inset-left, 0px)); bottom: max(8px, env(safe-area-inset-bottom, 0px)); z-index: 30;
  color: #fff; opacity: .78; font-size: 13px; text-shadow: 0 1px 3px #000; display: none; }
#s-title.active ~ .legal-foot { display: block; }
/* 標題畫面左上角：回到 edu.liaison.tw 選科目的首頁 */
.all-subjects { position: absolute; left: max(16px, env(safe-area-inset-left, 0px)); top: max(14px, env(safe-area-inset-top, 0px)); z-index: 2; text-decoration: none; }
.legal-foot a { color: #fff; }
/* 「對應課綱」橫軸：捲動時黏在上方，點年級那一段放大列出各章 */
.syl { position: sticky; top: 8px; z-index: 6; width: min(1180px, calc(var(--vw, 1vw) * 92)); margin: 0 auto 14px; padding: 8px 12px 10px; border-radius: 18px;
  background: rgba(24, 15, 6, .9); box-shadow: inset 0 0 0 2px rgba(242, 193, 78, .35), 0 8px 20px rgba(0, 0, 0, .35); backdrop-filter: blur(6px); }
.syl-head { display: flex; align-items: baseline; gap: 14px; margin: 0 4px 6px; }
.syl-label { flex: none; color: #ffe6a8; font-size: 18px; font-weight: 900; }
.syl-info { min-width: 0; color: #fff; font-size: 15px; font-weight: 700; opacity: .92; }
.syl-info b { color: var(--gold); }
.syl-track { position: relative; display: flex; gap: 6px; }
.syl-track::before { content: ""; position: absolute; left: 6px; right: 6px; top: 50%; height: 3px; margin-top: -1.5px; border-radius: 3px;
  background: linear-gradient(90deg, rgba(242, 193, 78, .2), rgba(242, 193, 78, .6), rgba(242, 193, 78, .2)); }
.syl-seg { position: relative; flex: 1 1 0; min-width: 86px; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 4px; border-radius: 999px;
  transition: flex-grow .35s ease, background-color .35s; }
.syl-seg.on { flex-grow: 7; justify-content: flex-start; background: rgba(58, 40, 16, .95); box-shadow: inset 0 0 0 2px rgba(242, 193, 78, .5); }
.syl-g { flex: none; padding: 6px 14px; border-radius: 999px; font-size: 17px; font-weight: 900; background: #3a2810; color: #fff; box-shadow: inset 0 0 0 2px rgba(242, 193, 78, .5); }
.syl-g:hover { background: #4d3615; }
.syl-seg.on .syl-g { background: var(--gold); color: var(--ink); box-shadow: none; }
.syl-chs { display: flex; gap: 4px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.syl-seg:not(.on) .syl-chs { display: none; }
.syl-ch { flex: none; padding: 4px 9px; border-radius: 999px; font-size: 15px; font-weight: 900; background: rgba(255, 255, 255, .14); color: #fff;
  animation: syl-in .3s ease-out both; animation-delay: calc(var(--i) * 40ms + .12s); }
.syl.still .syl-ch { animation: none; }
.syl-ch:hover { background: rgba(255, 255, 255, .28); }
.syl-ch.on { background: #fff; color: var(--ink); box-shadow: 0 0 0 3px var(--gold); }
.syl-ch:disabled { opacity: .4; cursor: not-allowed; }
@keyframes syl-in { from { opacity: 0; transform: translateX(-8px); } }
/* 點到的章節方塊：放大、金色光圈，上面標出對應哪幾場 */
.chap-card2.syl-hit { z-index: 3; transform: scale(1.07); box-shadow: 0 0 0 4px var(--gold), 0 0 28px 6px rgba(242, 193, 78, .7), 0 5px 0 #b98d3c, 0 10px 20px rgba(0, 0, 0, .35); }
.chap-card2.syl-hit:hover { transform: scale(1.07) translateY(-3px); }
.chap-card2.syl-pop { animation: syl-pop .6s ease-out .3s both; }
@keyframes syl-pop { 0% { transform: scale(1); } 45% { transform: scale(1.16); } 100% { transform: scale(1.07); } }
.syl-tag { position: absolute; top: -14px; left: 50%; transform: translateX(-50%); white-space: nowrap; padding: 2px 12px; border-radius: 999px;
  background: var(--gold); color: var(--ink); font-size: 14px; font-weight: 900; box-shadow: 0 2px 6px rgba(0, 0, 0, .35); }
@media (prefers-reduced-motion: reduce) {
  .syl-seg { transition: none; }
  .syl-ch, .chap-card2.syl-pop { animation: none; }
}

/* ---------- 手機直拿的直式版面（tools/eng_portrait.py） ---------- */
#rotate { display: none !important; }

/* 標題畫面 */
html.hp .logo { font-size: 64px; letter-spacing: 4px; white-space: nowrap; }
html.hp .logo-sub { font-size: 22px; letter-spacing: 2px; }
html.hp .title-box { top: 46%; width: 92%; }
html.hp .title-foot { left: 16px; right: 16px; bottom: 64px; flex-wrap: wrap; justify-content: center; }
html.hp .title-foot .credit { flex-basis: 100%; text-align: center; margin: 4px 0 0; }
html.hp .legal-foot { left: 0; right: 0; text-align: center; font-size: 15px; }

/* 章節列表：上面兩排按鈕太多，字不要斷成直排；帳號換到第二行 */
html.hp .hud { gap: 8px; }
html.hp .hud .pill { padding: 6px 12px 6px 8px; white-space: nowrap; }
html.hp .hud .btn { padding: 8px 12px; white-space: nowrap; }
html.hp .chap-head { flex-wrap: wrap; row-gap: 8px; }
html.hp .chap-head .btn { white-space: nowrap; }

/* 家長專區、島鎮：小字放大（16px 在直拿只剩 9.7px） */
html.hp .modal .tabs button, html.hp .modal .buffbar { font-size: 23px; }
html.hp .town-count, html.hp .town-info { font-size: 23px; }
/* 抽到的卡片、卡冊裡打開的卡片：背面的重點原本只剩 9.7px，整張放大 1.5 倍（約 14.6px） */
html.hp .card3d { zoom: 1.5; }

/* 章節地圖：地圖鋪滿，面板改到下面一排 */
html.hp #map-svg, html.hp #s-map.generic #map-svg { width: 100%; height: 100%; }
html.hp .map-side { top: auto; left: 12px; right: 12px; bottom: 70px; width: auto; max-width: none; flex-direction: row; flex-wrap: wrap; gap: 8px; }
html.hp .map-side > * { margin: 0; }
html.hp .map-side .chap-card { flex: 1 1 100%; padding: 10px 14px; }
html.hp .map-side .chap-card h2 { font-size: 24px; }
html.hp .map-side .side-grid { flex: 1 1 100%; }
html.hp .map-side #daily { flex: 1 1 100%; padding: 8px 14px; font-size: 23px; }

/* 劇情對話：人物圖不要蓋住字 */
html.hp #dialog img.portrait { height: calc(var(--vh, 1vh) * 40); left: 0; }
html.hp #dialog img.portrait.speaker { height: calc(var(--vh, 1vh) * 34); bottom: calc(var(--vh, 1vh) * 22); }

/* 提示泡泡：移到畫面中間（只停 2.7 秒，點得穿） */
html.hp #toast { top: 42%; width: 92%; }
html.hp .toast { text-align: center; }

/* ---------- 大解密（和歷史共用的畫面，照 tools/hist_portrait.py） ---------- */
/* 解說卡：直拿畫面窄，卡片放寬 */
html.hp .explain-card { width: 94%; max-height: calc(var(--vh, 1vh) * 84); }
/* 議事廳的解說卡放在下面空著的地方，不要蓋住選項（生物 🚩22 的做法，家長 2026-11-15：「改六科」。量過六科免費章 328 張答錯卡，
   原本 318 張壓在還能選的選項上，貼下面後 0 張；tools/council_portrait_scan.sh 可以重量） */
html.hp .scene.council:not(.cmp-on) > .explain-veil { place-items: end center; padding: 0 0 calc(var(--vh, 1vh) * 3); }
/* 倒數中點畫面，整張卡片左右晃一下，讓孩子知道要先看卡片。第一個動畫要留著原本的 pop（同名的動畫不會重播），不然晃完卡片會再跳出來一次 */
html.hp .scene.council .explain-card:has(.go.nudge) { animation: pop .28s cubic-bezier(.2, 1.4, .4, 1), shake .35s; }

/* 情境連環事件：說話的人和問題在上面並排，選項由上往下排，筆記本收起來 */
html.hp .scene.council:not(.cmp-on) { display: grid; grid-template-columns: 150px 1fr; grid-template-rows: auto auto; align-content: start; gap: 12px 10px;
  padding: 66px 12px 16px; overflow-y: auto; }
html.hp .scene.council:not(.cmp-on) > .cn-ruler, html.hp .scene.council:not(.cmp-on) > .cn-bubble,
html.hp .scene.council:not(.cmp-on) > .cn-advisors { position: relative; left: auto; right: auto; top: auto; bottom: auto; }
html.hp .cn-ruler { grid-column: 1; grid-row: 1; width: auto; align-self: start; }
html.hp .cn-ruler img { height: 180px; }
html.hp .cn-ruler .nm { position: relative; bottom: auto; margin-top: -12px; padding: 4px 12px; font-size: 22px; text-align: center; }
html.hp .cn-bubble { grid-column: 2; grid-row: 1; align-self: start; }
html.hp .cn-bubble::before { top: 60px; bottom: auto; }
html.hp .cn-advisors { grid-column: 1 / -1; grid-row: 2; display: flex; flex-direction: column; gap: 14px; }
html.hp .cn-adv { display: grid; grid-template-columns: 92px 1fr; align-items: center; column-gap: 6px; }
html.hp .cn-adv img { grid-column: 1; grid-row: 1 / span 2; height: 104px; margin: 0; }
html.hp .cn-adv .who { grid-column: 2; grid-row: 1; justify-self: start; margin: 0 0 -8px 12px; }
html.hp .cn-adv .say { grid-column: 2; grid-row: 2; min-height: 0; font-size: 29px; }
html.hp .cn-adv.plain { grid-template-columns: 1fr; }
html.hp .cn-adv.plain .say { grid-column: 1; grid-row: 1; }
html.hp .cn-notes { display: none; }

/* 比較表：標題、表格、卡片由上往下排，太長可以捲動 */
html.hp .scene.council.cmp-on { display: flex; flex-direction: column; gap: 10px; padding: 64px 10px 14px; overflow-y: auto; }
html.hp .scene.council.cmp-on > .cmp-head, html.hp .scene.council.cmp-on > .cmp-table,
html.hp .scene.council.cmp-on > .cmp-tray { position: relative; left: auto; right: auto; top: auto; bottom: auto; width: 100%; margin: 0; flex: none; }
html.hp .cmp-table .cell, html.hp .cmp-card { font-size: 28px; }
html.hp .cmp-table .rowh { font-size: 24px; }

/* 單字標本館：最後的展廳改成由上往下 */
html.hp .mu-hall { grid-template-columns: 1fr !important; overflow-y: auto; }
html.hp .mu-hall .room { overflow: visible; }
html.hp .mu-hall figure { width: 30%; }
html.hp .mu-hall figcaption { font-size: 24px; }
html.hp .mu-door .era { font-size: 22px; }

/* 告示偵探：告示在上，題目和選項在下，整頁可以捲動 */
html.hp .scene.detective { display: flex; flex-direction: column; gap: 12px; padding: 104px 12px 16px; overflow-y: auto; }
html.hp .scene.detective > .dt-file, html.hp .scene.detective > .dt-ask { position: relative; left: auto; right: auto; top: auto; bottom: auto; width: auto; overflow: visible; flex: none; }
html.hp .dt-ask .q { font-size: 31px; }
html.hp .dt-opt { font-size: 29px; }

/* 謊言怪：巨獸縮小放右上，謊話和卡片放寬 */
html.hp .db-boss { width: 38%; top: 60px; }
html.hp .db-boss img { height: 220px; }
html.hp .db-lie { left: 12px; right: auto; width: calc(62% - 18px); top: 66px; }
html.hp .db-lie::after { display: none; }
html.hp .db-hand { left: 12px; right: 12px; grid-template-columns: 1fr !important; gap: 12px; }
html.hp .db-card { min-height: 0; }
html.hp .db-card .t { font-size: 29px; }

/* ---------- 英文自己的玩法 ---------- */

/* 標題畫面：最下面的資料來源（12px 在直拿只剩 7.9px） */
html.hp .title-foot .credit { font-size: 18px; }

/* 結算：答對、連擊、分數的小字 */
html.hp .result .stat { font-size: 20px; }

/* 情境連環事件、易混字比較表的選項：英文沒有顧問頭像（plain），直拿時拉滿整列，不要縮在右邊 */
html.hp .cn-advisors { align-items: stretch; }

/* 會考聽力：題目卡放寬、字放大（390 寬縮放 0.61：說明 15.8px、選項 18.3px），看圖題的三張圖由上往下排 */
html.hp .scene.listen .ls-panel { top: 66px; width: 96%; max-height: calc(100% - 80px); }
html.hp .scene.listen .ls-head { font-size: 32px; }
html.hp .scene.listen .ls-head .tag { font-size: 28px; }
html.hp .scene.listen .ls-head .muted { font-size: 22px; }
html.hp .scene.listen .ls-inst { font-size: 26px; }
html.hp .scene.listen .ls-play { width: 80px; height: 80px; font-size: 32px; }
html.hp .scene.listen .ls-time { font-size: 22px; }
html.hp .scene.listen .btn.ls-again { font-size: 26px; padding: 6px 14px; }
html.hp .scene.listen .ls-opt.dt-opt { font-size: 30px; }
html.hp .scene.listen .ls-opt.dt-opt b { width: 40px; height: 40px; font-size: 22px; }
html.hp .scene.listen .ls-pics { grid-template-columns: 1fr; }
html.hp .scene.listen .ls-pic img { max-height: calc(var(--vh, 1vh) * 20); }
html.hp .scene.listen .ls-pic b { width: 44px; height: 44px; font-size: 24px; }
html.hp .scene.listen .ls-fig { max-height: none; width: 100%; }
html.hp .scene.listen .ls-script small { font-size: 22px; }

/* 怪物題重打（射擊 Boss 戰）：題目卡在上面拉滿，巨獸和光球在下面（位置在 JS_PATCH 的 shooter） */
html.hp .boss-panel { left: 12px; right: 12px; width: auto; top: 62px; bottom: auto; max-height: 42%; }
html.hp .boss-panel .muted { font-size: 22px; }
