/* 碰皮今夜秀 — 每日節目：深夜秀方案 C（像素角色＋現代深夜秀介面）。基準 1920×1080，整個舞台等比縮放。
   設計系統 docs/DESIGN_SYSTEM_PENGPI.md；設計稿 assets/redesign_latenight/C_01（片頭）、C_02（作答）、C_05（手機）、C_06（成績單）、C_07（選舉）。
   規則：
   - 播出層（logo bug、ON AIR、lower third、跑馬燈、題卡、選項）是現代高解析介面：12／18／24px 圓角、2px 描邊，不套像素濾鏡
   - 內容層（黑皮、碰碰、現場連線場景、星芒與彩帶）維持 8-bit：最近鄰縮放、steps() 逐格動畫
   - 色彩、字型、間距、動效一律用 css/tokens.css 的變數；每個非答題畫面只有一個珊瑚紅主按鈕
   - 中文用 Noto Sans TC；英文短標 Space Grotesk；純數字 IBM Plex Mono；Press Start 2P 只用在 SCORE、COMBO 等極短彩蛋 */
:root {
  /* 舊變數保留給共用的特效（js/fx.js 產生的元素）與回饋表單 */
  --gold: var(--pengpi-amber); --ink: var(--pengpi-ink); --white: var(--pengpi-ivory); --dim: var(--pengpi-muted);
  --ok: var(--pengpi-green); --bad: var(--pengpi-coral); --red: var(--pengpi-coral); --bg2: var(--pengpi-panel);
  --vp: 4px;
  --lt-top: 862px;      /* lower third 上緣 */
  --marquee-top: 984px; /* 跑馬燈上緣 */
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #02050d; overflow: hidden; touch-action: manipulation; user-select: none; -webkit-user-select: none; }
body { font-family: var(--font-zh-body); color: var(--pengpi-ivory); }
[hidden] { display: none !important; }
.px { font-family: var(--font-pixel); }
.en { font-family: var(--font-en-display); }
.small { font-size: 18px; } .dim { color: var(--pengpi-muted); } .gold { color: var(--pengpi-amber); }

#viewport { position: fixed; inset: 0; }
/* 棚景：台北夜景深夜秀攝影棚（assets/ui/bg_pengpi，由 source_c_hybrid_studio 放大到 1920×1080） */
#stage { position: absolute; width: 1920px; height: 1080px; transform-origin: 0 0; overflow: hidden;
  background: var(--pengpi-midnight) url("../assets/ui/bg_pengpi.png") 0 0 / 1920px 1080px no-repeat;
  background-image: image-set(url("../assets/ui/bg_pengpi.webp") type("image/webp"), url("../assets/ui/bg_pengpi.png") type("image/png")); }
/* 讀字用的暗幕：片頭淡、作答與成績單深一點（設計稿 C_02、C_06 背景都壓暗） */
#stage::before { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; transition: opacity var(--motion-segment) var(--ease-standard);
  background: linear-gradient(90deg, rgb(5 10 22 / 55%) 0%, rgb(5 10 22 / 20%) 45%, rgb(5 10 22 / 35%) 100%); opacity: .55; }
#stage:has(> #hud:not([hidden]))::before, #stage.result-mode::before { opacity: 1; }
#stage:not([data-screen="title"]):not([data-screen="none"]):not([data-screen="question"]):not(.result-mode)::before { opacity: 1;
  background: rgb(5 10 22 / 62%); }
/* 只給螢幕閱讀器（畫面上改用圖片或其他位置顯示的文字） */
.sr-only, #q-meta, .hud-logo span, #live-window .live-tag, #timer > .px.small {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
#fx { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
#fx canvas { width: 1920px !important; height: 1080px !important; image-rendering: pixelated; }

/* 舊版布幕、燈泡框、CRT 掃描線：深夜秀不作全站基底（DESIGN_SYSTEM_PENGPI 第 7 節），元素保留但不顯示 */
.curtain, .valance, #crt, #stage-front, #elec-desk { display: none !important; }
#btn-crt { display: none; }

/* ---------- 播出層：logo bug、ON AIR、APPLAUSE ---------- */
.hud-logo, #brand-bug { position: absolute; left: 48px; top: 40px; width: 404px; height: 124px; z-index: 6; }
/* logo bug（broadcast bug）：像素雙頭像（assets/brand/logo_heads，從 logo_pengpi.png 左側切出）＋真文字，首頁與作答畫面共用（首頁 V2 定案調整）。
   「碰皮今夜秀」Noto Sans TC 900、奶油色字、珊瑚色描邊（八方向 text-shadow）加霓虹光暈；資訊頁（節目表、排行榜、紀錄、關於、支持、選舉選單）不顯示 */
#brand-bug.pp-logo { width: auto; max-width: 420px; display: flex; align-items: center; gap: 14px; padding: 8px 22px 8px 10px; pointer-events: none;
  border-radius: 18px; background: rgb(5 10 22 / 88%); border: 3px solid var(--pengpi-cyan); box-shadow: 0 0 18px rgb(40 217 255 / 30%), 0 10px 24px var(--pengpi-shadow); }
.pp-logo-icon { flex: none; width: 112px; height: 103px; background: url("../assets/brand/logo_heads.png") center / contain no-repeat;
  background-image: image-set(url("../assets/brand/logo_heads.webp") type("image/webp"), url("../assets/brand/logo_heads.png") type("image/png")); }
.pp-logo-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.pp-logo-en { font: 700 22px/1 var(--font-en-display); letter-spacing: 1.5px; color: var(--pengpi-cyan); text-shadow: 0 0 10px rgb(40 217 255 / 55%); white-space: nowrap; }
.pp-logo-zh { font: 900 50px/1.1 var(--font-zh-display); letter-spacing: 2px; color: #FFF1DE; white-space: nowrap;
  text-shadow: 2px 0 0 var(--pengpi-coral), -2px 0 0 var(--pengpi-coral), 0 2px 0 var(--pengpi-coral), 0 -2px 0 var(--pengpi-coral),
    2px 2px 0 var(--pengpi-coral), -2px -2px 0 var(--pengpi-coral), 2px -2px 0 var(--pengpi-coral), -2px 2px 0 var(--pengpi-coral),
    0 0 10px rgb(255 93 115 / 95%), 0 0 22px rgb(255 93 115 / 75%), 0 0 40px rgb(255 93 115 / 45%); }
#stage:is([data-screen="schedule"], [data-screen="board"], [data-screen="about"], [data-screen="records"], [data-screen="support"], :is([data-screen="election"], [data-screen="topics"])) #brand-bug { display: none; }
#onair { position: absolute; right: 48px; top: 50px; z-index: 9; display: flex; align-items: center; gap: 14px; min-width: 196px; height: 56px; padding: 0 24px;
  background: var(--pengpi-coral); color: var(--pengpi-ink); font: 700 26px/1 var(--font-en-display); letter-spacing: .5px; border-radius: 10px;
  box-shadow: 0 0 0 2px rgb(255 248 232 / 35%) inset, 0 8px 24px var(--pengpi-shadow); }
#onair i { width: 20px; height: 20px; border-radius: 50%; background: var(--pengpi-ivory); box-shadow: 0 0 10px rgb(255 248 232 / 80%); animation: onairdot 2s steps(1) infinite; }
@keyframes onairdot { 50% { opacity: .35; } }
/* APPLAUSE：平常是熄燈的招牌，觀眾鼓掌（答對、連擊、高分成績單）時亮琥珀色 1.2～1.8 秒；選舉特別報導不亮（第 6.8 節） */
#applause { position: absolute; right: 48px; top: 118px; z-index: 9; width: 196px; height: 44px; display: flex; align-items: center; justify-content: center;
  font: 700 22px/1 var(--font-en-display); letter-spacing: 3px; color: rgb(255 200 87 / 32%); background: rgb(5 10 22 / 82%);
  border: 2px solid rgb(255 200 87 / 28%); border-radius: 8px; transition: all var(--motion-fast) var(--ease-standard); }
#applause.on { color: var(--pengpi-ink); background: var(--pengpi-amber); border-color: #fff3c4; box-shadow: 0 0 28px rgb(255 200 87 / 75%), 0 0 0 4px rgb(255 200 87 / 25%); }
#stage.election-mode #applause, #stage[data-screen="about"] #applause, #stage[data-screen="support"] #applause { display: none; }

/* ---------- 上方 HUD（6.7）：logo bug → 節目牌 → 升級進度；右上分數；段落牌、題號、倒數在題卡頂列 ---------- */
#hud { position: absolute; left: 0; top: 0; width: 1920px; height: 0; z-index: 7; pointer-events: none; }
#hud > * { position: absolute; }
.hud-plate { left: 472px; top: 52px; height: 46px; padding: 0 20px; display: flex; align-items: center; border-radius: 10px;
  background: var(--pengpi-coral); color: var(--pengpi-ivory); font-size: 24px; font-weight: 900; letter-spacing: 1px; }
.hud-progress { left: 472px; top: 110px; height: 40px; display: flex; align-items: center; gap: 8px; padding: 0 14px; border-radius: 10px;
  background: rgb(5 10 22 / 86%); border: 2px solid var(--pengpi-slate); font-size: 20px; font-weight: 700; color: var(--pengpi-muted); }
.hud-progress .stage-name { padding: 0 6px; border-radius: 6px; }
.hud-progress .stage-name.done { color: var(--pengpi-green); }
.hud-progress .stage-name.now { background: var(--pengpi-cyan); color: var(--pengpi-ink); }
.hud-progress .bar { width: 18px; height: 3px; border-radius: 2px; background: var(--pengpi-slate); } .hud-progress .bar.done { background: var(--pengpi-green); }
/* 段落牌（題卡左上，設計稿 C_02「第 2 段｜今日主題」） */
.hud-left { left: 518px; top: 196px; max-width: 640px; height: 48px; display: flex; align-items: center; gap: 10px; padding: 0 22px; border-radius: 10px;
  background: var(--pengpi-coral); color: var(--pengpi-ivory); font-size: 24px; font-weight: 700; }
#seg-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tag-1p { display: none; }
/* 段落牌與題號屬於題卡頂列：題卡不在畫面上時（開場字卡、段落轉場、台詞）一起收起 */
#stage:has(#screen-question[hidden]) :is(.hud-left, #hud-q) { display: none; }
/* 題號（題卡右上「Q 04/10」，數字用 IBM Plex Mono、tabular） */
.hud-q { left: 1176px; top: 196px; width: 170px; height: 48px; display: flex; align-items: center; justify-content: flex-end; gap: 0;
  color: var(--pengpi-cyan); font: 700 28px/1 var(--font-number); font-variant-numeric: tabular-nums; }
.hud-q b { font-weight: 700; margin-left: 12px; }
.hud-score { left: 1350px; top: 50px; width: 260px; height: 112px; display: flex; flex-direction: column; align-items: flex-end; justify-content: center; gap: 6px;
  padding: 0 22px; border-radius: 12px; background: rgb(5 10 22 / 86%); border: 2px solid var(--pengpi-slate); }
.hud-score .px.small { font-size: 14px; color: var(--pengpi-muted); }
#score { font: 700 44px/1 var(--font-number); font-variant-numeric: tabular-nums; display: inline-block; color: var(--pengpi-ivory); }
#score.bump { animation: bump .45s steps(1) both; }
@keyframes bump { 0% { transform: translateY(-4px); color: var(--pengpi-amber); } 33% { transform: translateY(4px); color: var(--pengpi-amber); } 66% { transform: translateY(-4px); } 100% { transform: none; } }

/* 倒數：題卡頂列下方一條 15 格的細長進度條；秒數在題卡右上（設計稿 C_02「12 秒」） */
#timer { position: absolute; left: 518px; top: 262px; width: 946px; height: 12px; z-index: 7; pointer-events: none; }
#timer-cells { display: grid; grid-template-columns: repeat(15, minmax(0, 1fr)); gap: 4px; height: 12px; }
#timer-cells span { height: 12px; border-radius: 3px; background: rgb(101 120 159 / 35%); }
#timer-cells span.on { background: var(--pengpi-cyan); }
#timer.warn #timer-cells span.on { background: var(--pengpi-amber); } #timer.danger #timer-cells span.on { background: var(--pengpi-coral); }
#timer.final #timer-cells span.on { animation: tflash .222s steps(1) infinite; }
#timer.final #timer-cells span.edge { animation: tflash .222s steps(1) infinite, tjump .222s steps(1) infinite; }
@keyframes tflash { 0% { background: var(--pengpi-coral); } 50% { background: var(--pengpi-ivory); } }
@keyframes tjump { 0% { transform: translateY(-4px); } 50% { transform: translateY(0); } }
#timer-num { position: absolute; right: 0; top: -66px; height: 48px; display: flex; align-items: center; font: 700 28px/1 var(--font-number);
  font-variant-numeric: tabular-nums; color: var(--pengpi-cyan); }
#timer-num::after { content: " 秒"; font-family: var(--font-zh-body); font-weight: 700; font-size: 24px; margin-left: 6px; }
#timer.final #timer-num { color: var(--pengpi-coral); }
#timer-num.tickpop { animation: tickpop .25s steps(1) both; }
@keyframes tickpop { 0% { transform: scale(1.4); } 33% { transform: scale(1.2); } 66% { transform: scale(1.08); } 100% { transform: none; } }
#timer.timeup #timer-cells span { background: rgb(101 120 159 / 25%) !important; animation: none; transform: none; }
#timer.timeup #timer-num { color: var(--pengpi-coral); animation: blink .2s steps(1) 3; }
@keyframes blink { 50% { visibility: hidden; } }

/* ---------- 前景觀眾：左右兩群像素觀眾（assets/ui/home/audience_left／right；首頁 V2 定案調整） ----------
   每群切成 4 塊（js/game.js 建立，--i 由左到右），答對由左到右跳起、答錯下沉、最後 5 秒緊張、高分持續歡呼。
   首頁：原尺寸、底邊對齊舞台底，排在碰碰之前（z 7）；作答與成績單：縮成約 70%、底邊對齊跑馬燈上緣，排在題卡之下（z 3），不壓題卡與答案按鈕 */
#audience { position: absolute; left: 0; top: 0; width: 1920px; height: 1080px; z-index: 3; pointer-events: none; --aud-s: .7; --aud-b: 96px; }
#stage[data-screen="title"] #audience { z-index: 7; --aud-s: 1; --aud-b: 0px; }
.aud-group { position: absolute; bottom: var(--aud-b); transform: scale(var(--aud-s)); }
.aud-group.left { left: 0; width: 842px; height: 291px; transform-origin: 0 100%; }
.aud-group.right { right: 0; width: 850px; height: 301px; transform-origin: 100% 100%; }
#audience .crowd { position: absolute; top: 0; height: 100%; background-repeat: no-repeat; image-rendering: pixelated;
  animation: sway var(--dur, 3s) steps(1) infinite; animation-delay: var(--delay, 0s); }
.aud-group.left .crowd { background-size: 842px 291px; background-image: url("../assets/ui/home/audience_left.png");
  background-image: image-set(url("../assets/ui/home/audience_left.webp") type("image/webp"), url("../assets/ui/home/audience_left.png") type("image/png")); }
.aud-group.right .crowd { background-size: 850px 301px; background-image: url("../assets/ui/home/audience_right.png");
  background-image: image-set(url("../assets/ui/home/audience_right.webp") type("image/webp"), url("../assets/ui/home/audience_right.png") type("image/png")); }
@keyframes sway { 0%, 70% { transform: none; } 80% { transform: translateY(-4px); } 90% { transform: translateY(-2px); } }
#audience.cheer .crowd { animation: crowd .5s steps(1) 2; animation-delay: calc(var(--i) * 70ms); }
@keyframes crowd { 0% { transform: translateY(-18px); } 50% { transform: none; } }
#audience.party .crowd { animation: crowd .5s steps(1) infinite; animation-delay: calc(var(--i) * 70ms); }
#audience.aww .crowd { animation: aww .9s steps(3) both; }
@keyframes aww { 0% { transform: none; } 30%, 70% { transform: translateY(12px); } 100% { transform: none; } }
#audience.tense .crowd { animation: tense .25s steps(1) infinite; animation-delay: calc(var(--i) * 30ms); }
@keyframes tense { 0% { transform: translateX(-2px); } 50% { transform: translateX(2px); } }
/* 節目表、排行榜、關於等資訊頁不顯示觀眾 */
#stage:is([data-screen="schedule"], [data-screen="board"], [data-screen="about"], [data-screen="records"], [data-screen="support"], :is([data-screen="election"], [data-screen="topics"])) #audience { display: none; }

/* ---------- lower third（6.3）：高 114px、深色 94% 底、左側 16px 青色訊號條；kicker／headline／右側 detail ---------- */
.lt { position: absolute; left: 0; top: var(--lt-top); width: 1500px; height: 114px; z-index: 8; display: grid; grid-template-columns: 1fr auto;
  grid-template-rows: 34px 1fr; column-gap: 24px; padding: 14px 32px 12px 40px; background: rgb(5 10 22 / 94%);
  animation: ltin var(--motion-ui) var(--ease-enter) both; }
.lt::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 16px; background: var(--pengpi-cyan); }
@keyframes ltin { from { opacity: 0; transform: translateX(-32px); } to { opacity: 1; transform: none; } }
.lt-kicker { grid-column: 1 / -1; font: 700 20px/34px var(--font-en-display); color: var(--pengpi-cyan); letter-spacing: 1px; }
.lt-main { display: flex; align-items: center; min-width: 0; }
.lt-headline, .lt-default { font-size: 34px; font-weight: 700; color: var(--pengpi-ivory); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lt-detail { align-self: end; font-size: 20px; color: var(--pengpi-muted); white-space: nowrap; padding-bottom: 6px; }

/* ---------- 跑馬燈（6.5）：高 96px、最左 12px 青色狀態線、狀態牌 148px；一則一則捲動 ---------- */
#marquee { position: absolute; left: 0; top: var(--marquee-top); width: 1920px; height: 96px; z-index: 8; display: flex; align-items: center; gap: 28px;
  padding-left: 40px; overflow: hidden; background: rgb(5 10 22 / 96%); border-top: 2px solid rgb(101 120 159 / 35%); }
#marquee::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 12px; background: var(--pengpi-cyan); }
#marquee .live { flex: none; min-width: 148px; height: 50px; padding: 0 18px; display: flex; align-items: center; justify-content: center; border-radius: 8px;
  background: var(--pengpi-coral); color: var(--pengpi-ivory); font: 700 24px/1 var(--font-en-display); letter-spacing: 1px; }
#marquee .chevrons { display: none; }
.marquee-track { flex: 1; max-width: 1360px; overflow: hidden; white-space: nowrap; }
#marquee-text { display: inline-block; padding-left: 100%; font-size: 30px; font-weight: 700; color: var(--pengpi-ivory); white-space: nowrap; animation: marquee 20s linear infinite; }
@keyframes marquee { to { transform: translateX(-100%); } }
#corner-btns { position: absolute; right: 28px; bottom: 22px; z-index: 9; display: flex; gap: 12px; }

/* ---------- 碰碰的「現場連線」視窗（第 2 段「今日主題」） ----------
   右側欄的現代視窗（青色外框＋LIVE 標籤），裡面是像素場景與碰碰；碰碰下半身被視窗切掉，對話框移到視窗下方 */
#live-window { position: absolute; left: 1520px; top: 182px; width: 372px; height: 470px; z-index: 6; --sprite-scale: 1.3;
  border-radius: var(--radius-card); border: 4px solid var(--pengpi-cyan); background: var(--pengpi-ink); overflow: hidden;
  box-shadow: 0 0 0 2px rgb(5 10 22 / 80%), 0 18px 40px var(--pengpi-shadow); }
#live-window .live-scene { position: absolute; inset: 0; overflow: hidden; image-rendering: pixelated; background: #0b0e2c center / cover no-repeat; }
#live-window .live-frame { display: none; }
#live-window .live-lights { position: absolute; inset: 0; display: none; }
#live-window .live-slot { position: absolute; left: 0; right: 0; bottom: -130px; display: flex; justify-content: center; }
#live-window .live-banner { position: absolute; right: 14px; top: 70px; padding: 10px 8px; border-radius: 8px; background: rgb(5 10 22 / 86%); color: var(--pengpi-amber);
  font-size: 32px; font-weight: 900; line-height: 1.1; writing-mode: vertical-rl; letter-spacing: 6px; border: 2px solid var(--pengpi-amber); }
#live-window .live-chip { position: absolute; left: 14px; top: 14px; display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 14px; border-radius: 8px;
  background: var(--pengpi-coral); color: var(--pengpi-ivory); font: 700 20px/1 var(--font-en-display); }
#live-window .live-chip i { width: 12px; height: 12px; border-radius: 50%; background: var(--pengpi-ivory); animation: onairdot 1.4s steps(1) infinite; }
/* 場景：夜市（場景圖 assets/ui/live_scene.png；新增場景時加一條 data-scene 規則，並在題庫集數設定 liveScene） */
#live-window[data-scene="nightmarket"] .live-scene { background-image: url("../assets/ui/live_scene.png");
  background-image: image-set(url("../assets/ui/live_scene.webp") type("image/webp"), url("../assets/ui/live_scene.png") type("image/png")); }
/* 連線中：碰碰本人的位置改成視窗下方的對話框 */
#stage.live-mode #host-pengpeng { top: 670px; bottom: auto; right: 28px; left: auto; width: 372px; }
#stage.live-mode #host-pengpeng .nameplate { display: none; }
#stage.live-mode #host-pengpeng .bubble { position: relative; top: auto; bottom: auto; left: auto; right: auto; width: 372px; }

/* ---------- 主持人：像素角色（最近鄰縮放、steps 逐格）；腳下單色接觸陰影 ---------- */
.host { position: absolute; left: 70px; bottom: 218px; width: 360px; z-index: 6; display: flex; flex-direction: column; align-items: center; }
.host.right { left: auto; right: 40px; bottom: 96px; }
.host img, #live-window img { height: 300px; image-rendering: pixelated; display: block; transform-origin: 50% 100%; animation: breathe 1.333s steps(1) infinite; }
.host .actor::after { content: ""; position: absolute; left: 50%; bottom: -6px; width: 70%; height: 18px; transform: translateX(-50%); border-radius: 50%;
  background: rgb(0 0 0 / 30%); filter: blur(10px); z-index: -1; }
.host .actor { position: relative; }
#live-window .actor::after { display: none; }
.host.talk img, #host-pengpeng.talk ~ #live-window img { animation: bob .333s steps(1) infinite; }
@keyframes bob { 50% { transform: translateY(-8px); } }
@keyframes breathe { 50% { transform: translateY(4px); } }
/* 片頭：黑皮站在左側主持桌前（設計稿 C_01）、碰碰在右下 DJ 台 */
#host-heipi { --sprite-scale: 1.7; }
#host-pengpeng { --sprite-scale: 1.2; }
/* 節目進行中（上方 HUD 顯示時）：黑皮在左欄、碰碰在右欄；名牌收起 */
#stage:has(> #hud:not([hidden])) #host-heipi { left: 50px; --sprite-scale: 1.55; }
#stage:not(.live-mode):has(> #hud:not([hidden])) #host-pengpeng { --sprite-scale: 1.25; }
.host .nameplate { display: none; }

/* 整隻角色的移動（.actor）與身體動作（img）分開。全部用 steps(1) 逐格播放 */
.actor { transform-origin: 50% 100%; animation-timing-function: steps(1, end) !important; }
.host.right .actor, #live-window .actor { --dir: -1; } .actor { --dir: 1; }
.motion-enter { animation: enter .7s both; }
.motion-exit { animation: exit .6s steps(6) both; }
@keyframes exit { 0% { transform: none; } 20% { transform: translateY(-24px); } 100% { transform: translateX(calc(var(--dir) * -520px)); } }
#live-window.slide-in { animation: winin .5s steps(5) both; }
#live-window.slide-out { animation: winin .5s steps(5) reverse both; }
@keyframes winin { from { transform: translateX(480px); } to { transform: none; } }
@keyframes enter { 0% { transform: translateX(calc(var(--dir) * -420px)); } 14% { transform: translateX(calc(var(--dir) * -320px)); }
  28% { transform: translateX(calc(var(--dir) * -200px)); } 42% { transform: translateX(calc(var(--dir) * -88px)); }
  57% { transform: translateX(0); } 71% { transform: translateX(calc(var(--dir) * 24px)); } 85% { transform: translateX(calc(var(--dir) * 8px)); } 100% { transform: none; } }
.motion-think { animation: think 1.333s infinite; }
@keyframes think { 0%, 100% { transform: translateX(calc(var(--dir) * 12px)); } 50% { transform: translateX(calc(var(--dir) * 20px)) translateY(-4px); } }
.motion-nervous { animation: nervous .2s infinite; }
@keyframes nervous { 0%, 100% { transform: translateX(calc(var(--dir) * 10px)); } 50% { transform: translateX(calc(var(--dir) * 18px)); } }
.motion-jump { animation: jump .5s 2; }
@keyframes jump { 0% { transform: scaleY(.92); } 16.66% { transform: translateY(-48px); } 33.33% { transform: translateY(-84px); }
  50% { transform: translateY(-96px); } 66.66% { transform: translateY(-72px); } 83.33% { transform: translateY(-32px); } 100% { transform: none; } }
.motion-spin { animation: spin .8s 1; }
@keyframes spin { 0% { transform: none; } 12.5% { transform: translateY(-32px); } 25% { transform: translateY(-56px) scaleX(-1); }
  37.5% { transform: translateY(-64px) scaleX(-1); } 50% { transform: translateY(-64px); } 62.5% { transform: translateY(-48px) scaleX(-1); }
  75% { transform: translateY(-24px); } 87.5% { transform: scaleY(.92); } 100% { transform: none; } }
.motion-slump { animation: slump .33s both; }
@keyframes slump { 0% { transform: none; } 25% { transform: translateY(4px); } 50% { transform: translateY(8px) scaleY(.95); } 75%, 100% { transform: translateY(12px) scaleY(.9); } }
.motion-tilt { animation: tilt .33s both; }
@keyframes tilt { 0% { transform: none; } 33% { transform: rotate(calc(var(--dir) * -4deg)); } 66% { transform: rotate(calc(var(--dir) * -8deg)); } 100% { transform: rotate(calc(var(--dir) * -12deg)); } }
.motion-pace { animation: pace 2.4s infinite; }
@keyframes pace { 0%, 100% { transform: none; } 6% { transform: translateX(16px); } 12% { transform: translateX(32px); } 18% { transform: translateX(48px); }
  24% { transform: translateX(60px); } 26% { transform: translateX(60px) scaleX(-1); } 32% { transform: translateX(44px) scaleX(-1); }
  38% { transform: translateX(28px) scaleX(-1); } 44% { transform: translateX(12px) scaleX(-1); } 50% { transform: scaleX(-1); } 52% { transform: none; } }
.motion-cheer { animation: jump .5s infinite; }
.motion-stretch { animation: stretch 1.333s 1; }
@keyframes stretch { 0%, 100% { transform: none; } 25% { transform: translateY(-8px); } 50% { transform: translateY(-12px) scaleY(1.08); } 75% { transform: translateY(4px) scaleY(.94); } }

/* 對話框（6.6）：深色面板＋青色描邊，上方是角色名稱（18～20px）、台詞 26px 最多約三行；放在角色頭頂，不遮題卡 */
.bubble { position: absolute; bottom: calc(100% + 18px); left: 0; width: 380px; z-index: 2; cursor: pointer;
  padding: 14px 20px 16px; border-radius: var(--radius-card); background: rgb(13 27 56 / 96%); border: 2px solid var(--pengpi-cyan);
  color: var(--pengpi-ivory); font-size: 26px; font-weight: 700; line-height: 1.45; box-shadow: 0 12px 28px var(--pengpi-shadow);
  animation: bubblein var(--motion-ui) var(--ease-enter) both; }
.bubble::before { display: block; margin-bottom: 4px; font-size: 19px; font-weight: 900; color: var(--pengpi-cyan); letter-spacing: 1px; }
#bubble-heipi::before { content: "黑皮"; }
#bubble-pengpeng::before { content: "碰碰"; color: var(--pengpi-amber); }
#bubble-pengpeng { border-color: var(--pengpi-amber); }
.host.right .bubble { left: auto; right: 0; }
@keyframes bubblein { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ---------- 共用按鈕（6.1）：主按鈕珊瑚紅＋3px 象牙白內框；次要按鈕深藍＋灰藍描邊 ---------- */
.btn { font-family: var(--font-zh-body); font-size: 28px; font-weight: 700; color: var(--pengpi-ivory); cursor: pointer; min-height: 56px; padding: 10px 32px;
  border-radius: var(--radius-control); background: var(--pengpi-panel-raised); border: 2px solid var(--pengpi-slate);
  transition: filter var(--motion-fast) var(--ease-standard), transform var(--motion-fast) var(--ease-standard), box-shadow var(--motion-fast); }
.btn:hover:not(:disabled) { filter: brightness(1.12); transform: translateY(-2px); }
.btn:active:not(:disabled) { transform: scale(.98); transition-duration: var(--motion-press); }
.btn:disabled { background: var(--pengpi-disabled-bg); color: var(--pengpi-disabled-fg); border-color: var(--pengpi-disabled-bg); cursor: default; box-shadow: none; }
.btn.red { background: var(--pengpi-coral); border-color: var(--pengpi-coral); box-shadow: inset 0 0 0 3px var(--pengpi-ivory), 0 10px 24px rgb(255 93 115 / 25%); }
.btn.red:disabled { background: var(--pengpi-disabled-bg); box-shadow: none; }
.btn.big { min-height: 76px; font-size: 34px; padding: 12px 48px; }
.btn.small { font-size: 22px; min-height: 48px; padding: 6px 18px; }
/* 鍵盤焦點：4px focus ring、外擴 3px */
.btn:focus-visible, .opt:focus-visible, .streak-chip:focus-visible, .linkish:focus-visible {
  outline: var(--stroke-focus) solid var(--pengpi-focus); outline-offset: 3px; }

/* 畫面 */
.screen { position: absolute; inset: 0; z-index: 4; }

/* ---------- 首頁 V2（docs/HOME_REDESIGN_V2.md 定案調整；DECISIONS 第 85 條；示意圖 assets/redesign_home_v2/home_V2_*_mock.png） ----------
   空攝影棚（assets/ui/home，座標見 layout.json）＋後方大螢幕輪播、黑皮坐在主播桌後、碰碰站在桌子左側、前景觀眾。
   圖層：背景 → 大螢幕 → 椅背 → 黑皮 → 主播桌（＋桌上按鈕）→ 碰碰（z 6）→ 前景觀眾（z 7）→ 介面（z 8 以上）。
   #screen-title 不建立自己的圖層（z-index: auto），裡面的元素直接和碰碰、觀眾比上下 */
#screen-title { z-index: auto; }
#stage[data-screen="title"]::before { opacity: 0; }
#stage[data-screen="title"] :is(#marquee, #applause, #host-heipi) { display: none; }
#stage[data-screen="title"] #onair { right: 244px; top: 50px; }
/* 碰碰：站在主播桌左側（約 x 390～630、底邊 y 760），沿用站姿與表情 */
#stage[data-screen="title"] #host-pengpeng { left: 382px; right: auto; bottom: 316px; width: 256px; --sprite-scale: 1.12; }
/* 首頁的提示訊息放在主播桌下方，不蓋黑皮的臉 */
#stage[data-screen="title"] .toast { top: 866px; }
.home-scene { position: absolute; left: 0; top: 0; width: 1920px; height: 1080px; z-index: 3; transform-origin: 0 0; }
.home-scene picture { display: contents; }
.home-bg { position: absolute; left: 0; top: 0; width: 1920px; height: 1080px; }
.home-chair { position: absolute; left: 866px; top: 450px; width: 199px; height: 88px; image-rendering: pixelated; }
/* 黑皮坐姿：水平中心 x 965、底邊 y 562（雙手剛好放在桌面上） */
.home-heipi { position: absolute; left: 965px; bottom: 518px; height: 284px; width: auto; transform: translateX(-50%); image-rendering: pixelated; pointer-events: none; }
.home-desk { position: absolute; left: 620px; top: 538px; width: 690px; height: 232px; image-rendering: pixelated; }

/* 後方大螢幕（bg 的螢幕框 x 615～1305、y 140～450）：黑皮的頭從 y 278 起擋住中間，文字只用 y 160～276；狀態小牌放在左下角（黑皮旁邊） */
.tv { position: absolute; left: 626px; top: 150px; width: 668px; height: 290px; }
.tv-slide { position: absolute; left: 0; top: 0; width: 100%; height: 130px; margin: 0; padding: 10px 18px 0; display: flex; flex-direction: column; align-items: center; gap: 4px;
  text-align: center; background: none; border: 0; color: var(--pengpi-ivory); font-family: var(--font-zh-body); }
.tv-slide p { margin: 0; }
button.tv-slide { cursor: pointer; border-radius: 12px; }
button.tv-slide:hover { filter: brightness(1.15); }
button.tv-slide:focus-visible, .tv-dot:focus-visible { outline: var(--stroke-focus) solid var(--pengpi-focus); outline-offset: 3px; }
.tv-kicker { font: 700 26px/1.2 var(--font-zh-body); color: var(--pengpi-cyan); letter-spacing: 1px; white-space: nowrap; text-shadow: 0 0 12px rgb(40 217 255 / 45%); }
.tv-topic { font-size: 76px; font-weight: 900; line-height: 1.05; white-space: nowrap; color: var(--pengpi-ivory); text-shadow: 0 0 16px rgb(255 248 232 / 40%), 0 4px 0 rgb(5 10 22 / 60%); }
.tv-topic[data-len="m"] { font-size: 68px; } .tv-topic[data-len="l"] { font-size: 58px; } .tv-topic[data-len="xl"] { font-size: 50px; }
/* 「✓ 今日已收看」「上次還沒看完」：螢幕左下角（黑皮左側），不被頭擋住 */
.tv-status { position: absolute; left: 18px; top: 218px; display: flex; }
.tv-status > span { display: inline-block; font-size: 26px; font-weight: 900; padding: 4px 16px; border-radius: 10px; background: rgb(5 10 22 / 85%); }
.tv-status .ep-done { color: var(--pengpi-green); border: 2px solid rgb(75 227 163 / 60%); }
.tv-status .resume-note { color: var(--pengpi-amber); border: 2px solid rgb(255 200 87 / 55%); }
/* 第 ② 張：前三名排成三欄（中間那欄在黑皮頭上方，高度不超過 y 276） */
.tv-board { list-style: none; margin: 4px 0 0; padding: 0; width: 100%; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tv-board li { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 8px; align-items: baseline; min-width: 0; text-align: left; }
.tv-board .tb-rank { grid-row: 1 / 3; align-self: center; font: 700 40px/1 var(--font-number); color: var(--pengpi-amber); }
.tv-board .tb-name { font-size: 26px; /* 組合式代號最長 6 個字（暗黑的鳳梨酥），26px 才放得下 */ font-weight: 900; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tv-board .tb-score { font: 700 24px/1.2 var(--font-number); color: var(--pengpi-muted); }
.tv-board li.tv-empty { grid-column: 1 / -1; display: block; text-align: center; font-size: 30px; font-weight: 700; line-height: 1.5; color: var(--pengpi-ivory); }
.tv-almanac { font-size: 30px; font-weight: 700; line-height: 1.3; color: var(--pengpi-ivory); text-wrap: balance; }
/* 像素風切換：由上往下逐格掃出（steps） */
.tv-slide.tv-in { animation: tvin .56s steps(7) both; }
@keyframes tvin { from { clip-path: inset(0 0 100% 0); filter: brightness(1.8); } to { clip-path: inset(0); filter: none; } }
/* 偏好減少動態：螢幕右下角的小圓點，手動切換 */
.tv-dots { position: absolute; right: 16px; top: 236px; display: flex; gap: 12px; }
.tv-dot { width: 30px; height: 30px; padding: 0; border-radius: 50%; border: 3px solid var(--pengpi-cyan); background: rgb(5 10 22 / 80%); cursor: pointer; }
.tv-dot[aria-pressed="true"] { background: var(--pengpi-cyan); }

/* 主播桌正面兩顆節目按鈕（面板 x 725～1205、y 588～740）：紅色大按鈕約佔 62%、紫色小按鈕亮度較低；任何狀態只有一顆紅色 */
.desk-btns { position: absolute; left: 729px; top: 595px; width: 472px; height: 138px; display: flex; gap: 10px; align-items: stretch; }
.btn.desk-btn { position: relative; flex: 0 0 168px; min-width: 0; min-height: 0; padding: 8px 10px 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  text-decoration: none; text-align: center; line-height: 1.1; border-radius: 14px; white-space: nowrap;
  background: linear-gradient(180deg, #2c1f63, #1a1342); border: 3px solid var(--pengpi-violet); color: #e6defc; filter: brightness(.9);
  box-shadow: inset 0 0 0 2px rgb(255 255 255 / 8%), 0 8px 18px rgb(0 0 0 / 35%); }
.btn.desk-btn:hover:not(:disabled) { filter: brightness(1.05); }
.btn.desk-btn.red { flex: 1 1 0; filter: none; color: var(--pengpi-ivory); background: var(--pengpi-coral); border-color: var(--pengpi-coral);
  box-shadow: inset 0 0 0 3px var(--pengpi-ivory), 0 10px 24px rgb(255 93 115 / 35%); }
.btn.desk-btn.red:hover:not(:disabled) { filter: brightness(1.1); }
.desk-label { font-size: 20px; font-weight: 700; letter-spacing: 1px; opacity: .92; }
/* 主文字依字數縮放（js/game.js fitDesk 設定 --n），一律不截斷 */
.desk-main { display: block; font-weight: 900; font-size: min(28px, calc(140px / var(--n, 5))); }
.desk-btn.red .desk-main { font-size: min(46px, calc(270px / var(--n, 5))); }
.desk-sub { font-size: 18px; font-weight: 700; color: #c4b8ee; }
/* 升學記按鈕右上角的「Beta」小貼紙（不寫時長） */
.desk-btn .beta-tag { position: absolute; right: -10px; top: -14px; transform: rotate(8deg); padding: 3px 8px; border-radius: 6px; background: var(--pengpi-amber); color: var(--pengpi-ink);
  font: 700 16px/1 var(--font-en-display); letter-spacing: .5px; box-shadow: 0 3px 0 rgb(0 0 0 / 35%); }
/* 共用小面板：「看成績・重播」小選單、右上「更多」 */
.pop-menu { position: absolute; z-index: 12; display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: var(--radius-card);
  background: rgb(5 10 22 / 97%); border: 2px solid var(--pengpi-cyan); box-shadow: 0 18px 40px var(--pengpi-shadow); }
.pop-menu .btn { width: 100%; font-size: 26px; min-height: 56px; padding: 6px 18px; text-align: left; }
.rec-menu { left: 0; bottom: calc(100% + 14px); width: 320px; }

/* 右上「更多」：48px 以上；ON AIR 燈放在它左邊 */
.btn.more-btn { position: absolute; right: 48px; top: 46px; z-index: 9; min-width: 176px; height: 64px; min-height: 64px; padding: 0 26px; font-size: 30px; font-weight: 900;
  background: rgb(5 10 22 / 90%); border: 2px solid var(--pengpi-slate); }
.more-panel { right: 48px; top: 124px; width: 380px; }
.more-nav { display: flex; flex-direction: column; gap: 10px; }
.more-panel .streak-chip { font-size: 22px; text-align: left; white-space: normal; line-height: 1.4; padding: 4px 6px; }
.more-panel .streak-chip small { display: block; margin: 2px 0 0; font-size: 18px; }
.more-legal { margin: 4px 0 0; font-size: 18px; color: var(--pengpi-muted); }
/* 「更多」面板最上面的《常識升學記》：經典街機特別企劃（紫框，和桌上節目按鈕同一個家族、不是紅色）；名稱兩行，不截字 */
.pop-menu .btn.more-classic { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px; min-height: 72px; padding: 8px 18px;
  text-decoration: none; white-space: normal; line-height: 1.2; background: linear-gradient(180deg, #2c1f63, #1a1342); border: 2px solid var(--pengpi-violet); color: #e6defc; }
.more-classic .mc-name { font-size: 26px; font-weight: 900; }
.more-classic .mc-tag { font-size: 18px; font-weight: 700; color: #c4b8ee; }
.more-classic .mc-dot { display: none; } /* 名稱兩行時不顯示中點（文字內容仍是「常識升學記・經典街機特別企劃」） */
.more-legal .linkish { color: var(--pengpi-muted); }
.streak-chip { font-family: var(--font-zh-body); font-weight: 700; color: var(--pengpi-ivory); background: none; border: 0; cursor: pointer; border-radius: 6px; }
.streak-chip b { color: var(--pengpi-amber); font-family: var(--font-number); }
.streak-chip small { color: var(--pengpi-cyan); text-decoration: underline; text-underline-offset: 4px; }

/* 左側「2026 選舉專區」看板（x 40～370、y 170～560）：新聞風格、白與青；不用任何政黨色、不放候選人照片與數字 */
.elec-wrap { position: absolute; left: 40px; top: 170px; width: 330px; height: 390px; z-index: 8; }
.elec-board { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 26px 24px 22px; cursor: pointer; text-align: left;
  font-family: var(--font-zh-body); color: #0b1a33; border-radius: 18px; background: linear-gradient(180deg, #ffffff, #eaf6fb); border: 4px solid var(--pengpi-cyan);
  box-shadow: 0 0 0 3px rgb(5 10 22 / 70%), 0 0 24px rgb(40 217 255 / 35%), 0 16px 36px var(--pengpi-shadow); transition: filter var(--motion-fast), transform var(--motion-fast); }
.elec-board:hover { filter: brightness(1.04); transform: translateY(-2px); }
.elec-board:focus-visible, .home-lamp:focus-visible, .board-close:focus-visible { outline: var(--stroke-focus) solid var(--pengpi-focus); outline-offset: 3px; }
.eb-tag { font-size: 20px; font-weight: 900; color: #fff; background: #e23b4e; padding: 3px 12px; border-radius: 6px; }
.eb-kicker { font: 700 18px/1 var(--font-en-display); letter-spacing: 2px; color: #0a87a8; }
.eb-title { font-size: 40px; font-weight: 900; line-height: 1.15; color: #0b1a33; white-space: nowrap; } /* 「2026 選舉專區」一行放得下（內容寬 274px） */
.eb-rule { width: 100%; height: 6px; border-radius: 3px; background: var(--pengpi-cyan); }
.eb-sub { font-size: 24px; font-weight: 700; line-height: 1.4; color: #2c3d5a; }
.eb-go { margin-top: auto; align-self: stretch; padding: 12px; border-radius: 12px; text-align: center; background: #0b1a33; color: var(--pengpi-cyan); font-size: 26px; font-weight: 900; }

/* 右側「創始贊助委員」看板（x 1540～1860、y 170～660）：金色燈泡框，燈泡兩組交替慢慢閃（steps）；不放分數與名次 */
.sponsor-board { position: absolute; left: 1540px; top: 170px; width: 320px; height: 490px; z-index: 8; display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 30px 26px 26px; border-radius: 20px; background: rgb(9 10 30 / 95%); border: 4px solid #e9a92f;
  box-shadow: 0 0 0 3px rgb(5 10 22 / 80%), 0 0 28px rgb(255 200 87 / 35%), 0 16px 36px var(--pengpi-shadow); }
.sponsor-board::before, .sponsor-board::after { content: ""; position: absolute; inset: 5px; pointer-events: none;
  --bulb: radial-gradient(circle, #fff4c2 0 3px, #ffc857 3.6px 4.8px, transparent 5.4px);
  background: var(--bulb) 0 0 / 28px 14px repeat-x, var(--bulb) 0 100% / 28px 14px repeat-x, var(--bulb) 0 0 / 14px 28px repeat-y, var(--bulb) 100% 0 / 14px 28px repeat-y;
  animation: bulbs 1.6s steps(1) infinite; }
.sponsor-board::after { background-position: 14px 0, 14px 100%, 0 14px, 100% 14px; animation-delay: -.8s; }
@keyframes bulbs { 0% { opacity: 1; } 50% { opacity: .2; } }
.sb-kicker { font: 700 20px/1.2 var(--font-en-display); letter-spacing: 3px; color: var(--pengpi-amber); }
.sb-title { font-size: 36px; font-weight: 900; line-height: 1.2; color: #ffe39a; text-shadow: 0 0 12px rgb(255 200 87 / 55%); white-space: nowrap; }
.sb-thanks { font-size: 19px; font-weight: 700; color: var(--pengpi-muted); white-space: nowrap; }
.sb-list { position: relative; flex: 1; width: 100%; min-height: 0; margin: 8px 0 12px; overflow: hidden; display: flex; flex-direction: column; justify-content: center; }
.sb-names { list-style: none; margin: 0; padding: 0; text-align: center; font-size: 28px; font-weight: 700; line-height: 1.42; color: var(--pengpi-ivory); }
.sb-names li { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sponsor-board.scrolling .sb-list { justify-content: flex-start; mask-image: linear-gradient(transparent, #000 12%, #000 88%, transparent); }
.sponsor-board.scrolling .sb-names { animation: sbscroll var(--scroll-dur, 20s) linear infinite; }
@keyframes sbscroll { from { transform: translateY(0); } to { transform: translateY(-50%); } }
.sb-empty { margin: 0; text-align: center; font-size: 24px; font-weight: 700; line-height: 1.5; color: #ffe39a; }
.sponsor-board[data-state="list"] .sb-empty, .sponsor-board:not([data-state="list"]) .sb-names { display: none; }
.sponsor-board[data-state="loading"] .sb-empty { visibility: hidden; }
.btn.sb-join { position: relative; width: 100%; min-height: 64px; padding: 6px 12px; font-size: 26px; font-weight: 900; color: var(--pengpi-ink);
  background: linear-gradient(180deg, #ffd977, #f0b23a); border: 2px solid #fff0b8; box-shadow: 0 6px 16px rgb(255 200 87 / 30%); }
.recruit-tag { position: absolute; right: -10px; top: -14px; background: var(--pengpi-coral); color: var(--pengpi-ivory); font-size: 15px; font-weight: 900;
  padding: 1px 8px; border-radius: 6px; white-space: nowrap; z-index: 2; } /* 固定顯示、不閃爍（DECISIONS 第 43 條） */
/* 手機用的小燈牌、收起鈕、遮罩：桌機不顯示 */
.home-lamp, .board-close, .home-scrim { display: none; }

/* 分享連結進站：主播桌下方一個非紅的小連結「先看朋友成績」 */
.btn.friend-link { position: absolute; left: 0; right: 0; top: 792px; width: max-content; margin: 0 auto; z-index: 8; min-height: 52px; padding: 6px 22px; font-size: 24px;
  background: rgb(5 10 22 / 92%); border-color: var(--pengpi-cyan); white-space: nowrap; }
/* 右下角一行小字：BETA・關於與免責聲明・條款・隱私・回報問題（在右下角靜音鈕左邊） */
.home-foot { position: absolute; right: 100px; bottom: 30px; z-index: 8; margin: 0; padding: 0; font-size: 20px; color: rgb(225 233 250 / 88%); white-space: nowrap;
  text-shadow: 0 2px 3px #000, 0 0 10px #000; }
.home-foot .linkish { font-size: 20px; color: inherit; }
.support-fine a { color: var(--pengpi-cyan); text-underline-offset: 3px; }

/* ---------- 資訊頁共用（節目表、排行榜、我的紀錄、關於、支持節目、選舉選單） ---------- */
.screen-title { margin: 0; font-size: 52px; font-weight: 900; color: var(--pengpi-ivory); text-align: center; line-height: 1.15; }
.screen-kicker { display: block; font: 700 22px/1.4 var(--font-en-display); letter-spacing: 2px; color: var(--pengpi-cyan); }
#screen-schedule, #screen-board, #screen-about, #screen-records, #screen-support, :is(#screen-election, #screen-topics) { display: flex; flex-direction: column; align-items: center; gap: 22px; padding-top: 40px; }
:is(#screen-schedule, #screen-board, #screen-about, #screen-records, #screen-support, :is(#screen-election, #screen-topics)) > .btn:last-child { min-width: 260px; }
/* 節目表：集數多時在清單內捲動，不蓋到下方跑馬燈 */
#schedule-list { display: flex; flex-direction: column; gap: 14px; width: 1080px; max-height: 700px; overflow-y: auto; padding: 4px 16px 8px 4px;
  scrollbar-color: var(--pengpi-cyan) rgb(5 10 22 / 60%); }
.ep-row { display: grid; grid-template-columns: 1fr 150px auto; gap: 24px; align-items: center; padding: 14px 24px; font-size: 28px; font-weight: 700;
  border-radius: var(--radius-card); background: rgb(5 10 22 / 92%); border: 2px solid var(--pengpi-slate); }
.ep-row .ep-done { color: var(--pengpi-green); font-size: 22px; text-align: right; }

/* ---------- 題卡（設計稿 C_02）：x 480～1500、y 172～852；頂列段落牌＋題號秒數，題幹置中，2×2 選項，右下出題單位 ---------- */
.qcard-frame { position: absolute; left: 480px; top: 172px; width: 1020px; height: 680px; border-radius: var(--radius-feature);
  background: rgb(5 10 22 / 96%); border: 4px solid var(--pengpi-cyan); box-shadow: 0 24px 60px var(--pengpi-shadow); }
.qcard-frame::before { content: ""; position: absolute; left: 22px; right: 22px; top: 14px; height: 3px; border-radius: 2px; background: var(--pengpi-violet); }
.qcard { position: absolute; left: 34px; top: 112px; width: 944px; height: 186px; padding: 0 24px;
  display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; }
.qtext { color: var(--pengpi-ivory); font-size: 52px; font-weight: 900; line-height: 1.22; margin: 0; text-wrap: balance; }
/* 題目字級依字數（js/game.js 設定 data-len）：≤9 字 72px、≤16 字 60px、≤32 字 48px、更長 40px（一行最多約 24 字，超過分兩行） */
.qtext[data-len="s"] { font-size: 72px; } .qtext[data-len="m"] { font-size: 60px; } .qtext[data-len="l"] { font-size: 48px; }
.qtext[data-len="xl"] { font-size: 40px; line-height: 1.25; }
.q-credit { position: absolute; right: 34px; bottom: 20px; margin: 0; font-size: 20px; color: var(--pengpi-muted); }
.q-source { display: none; }
#options { position: absolute; left: 518px; top: 486px; width: 946px; display: grid; grid-template-columns: 1fr 1fr; gap: 24px 28px; }
/* 只有兩個選項（○× 題、觀眾時刻二選一）：一排兩顆，放在選項區垂直置中 */
#options:not(:has(> :nth-child(3))) { top: 556px; }
/* 選項（6.2）：A／B／C／D 代號塊用珊瑚／青／綠／琥珀，文字區一律灰藍；代號、文字、顏色三重區分 */
.opt { --k: var(--pengpi-coral); position: relative; display: flex; align-items: center; height: 118px; padding: 0 24px 0 104px; cursor: pointer;
  font-family: var(--font-zh-body); font-size: 34px; font-weight: 700; color: var(--pengpi-ivory); text-align: center; line-height: 1.2;
  border-radius: var(--radius-card); background: var(--pengpi-panel-raised); border: 3px solid var(--k);
  transition: filter var(--motion-fast), transform var(--motion-fast); }
.opt > span:last-child { flex: 1; }
.opt.c1 { --k: var(--pengpi-cyan); } .opt.c2 { --k: var(--pengpi-green); } .opt.c3 { --k: var(--pengpi-amber); }
.opt .key { position: absolute; left: 12px; top: 12px; bottom: 12px; width: 72px; display: flex; align-items: center; justify-content: center; border-radius: 10px;
  background: var(--k); color: var(--pengpi-ink); font: 700 36px/1 var(--font-en-display); }
#options.tf .opt .key { font-family: var(--font-zh-body); font-size: 44px; font-weight: 900; }
.opt:hover:not(:disabled) { filter: brightness(1.12); transform: translateY(-2px); }
.opt:active:not(:disabled) { transform: scale(.98); }
.opt:disabled { cursor: default; }
/* 求救刪除的選項：半透明、灰階、不能點 */
.opt.gone { opacity: .25; filter: grayscale(1); pointer-events: none; cursor: default; }
/* 鎖定答案：100ms 內先改描邊（青色 focus 光） */
.opt.locked { box-shadow: 0 0 0 4px var(--pengpi-focus), 0 0 24px rgb(40 217 255 / 45%); }
.opt.dim { opacity: .45; }
/* 正解：綠色描邊＋勾號＋「答對」；選錯：珊瑚描邊＋叉號＋「再想一下」 */
.opt.right { border-color: var(--pengpi-green); box-shadow: 0 0 0 4px var(--pengpi-green), 0 0 28px rgb(75 227 163 / 45%); animation: okblink .2s steps(1) 4; }
@keyframes okblink { 50% { box-shadow: 0 0 0 4px var(--pengpi-ivory), 0 0 28px rgb(75 227 163 / 45%); } }
.opt.wrong { border-color: var(--pengpi-coral); box-shadow: 0 0 0 4px var(--pengpi-coral); }
.opt.right::after, .opt.wrong::after { position: absolute; right: 12px; top: -18px; padding: 2px 12px; border-radius: 8px; font-size: 20px; font-weight: 900; line-height: 30px; }
.opt.right::after { content: "✓ 答對"; background: var(--pengpi-green); color: var(--pengpi-ink); }
.opt.wrong::after { content: "✕ 再想一下"; background: var(--pengpi-coral); color: var(--pengpi-ivory); }
#btn-help { position: absolute; left: 518px; top: 776px; z-index: 7; }

/* 對錯時的題目區：答錯短震、逾時定格（灰階） */
#screen-question.shake { animation: shake .36s steps(1) both; }
@keyframes shake { 0% { transform: translate(8px, 0); } 25% { transform: translate(-8px, 4px); } 50% { transform: translate(4px, -4px); } 75% { transform: translate(-4px, 0); } 100% { transform: none; } }
#screen-question.freeze { filter: grayscale(1) brightness(.8); }

/* 解說：選項區換成解說面板（題幹留在上方、縮小讓出空間）
   緊湊排法：判定＋正確答案同一列 → 解說 → 按鈕列；題庫最長的一般解說（約 60 字）在每個模式、尺寸都不出現捲軸。
   max-height 依面板下方的東西訂：每日節目到題卡底（422～838），選舉專區到資料來源列上方（見選舉段落）。
   超長解說或展開「回報錯誤」時才在面板內捲動，判定列黏在上方不被捲走。
   --pop-x／--pop-y：分段跳分框的位置（舞台座標，js/game.js 讀取）；桌機在判定列下方、面板右側（跳分框會再上浮 12px，仍不碰判定列） */
#explain { position: absolute; left: 518px; top: 422px; width: 946px; max-height: 416px; overflow-y: auto; z-index: 1; display: flex; flex-direction: column; gap: 10px;
  padding: 20px 28px; border-radius: var(--radius-card); background: var(--pengpi-panel); border: 2px solid var(--pengpi-slate);
  animation: explainin var(--motion-ui) var(--ease-enter) both; scrollbar-color: var(--pengpi-cyan) transparent; --pop-x: 1290; --pop-y: 520; }
@keyframes explainin { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
/* 判定列連同面板上緣的留白一起黏住（負邊距吃掉面板 padding-top；sticky 以內容區為準，所以 top 也要減掉 padding），
   捲動時文字從判定列下方滑過、判定與上緣保持距離 */
.explain-head { position: sticky; top: -20px; z-index: 1; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 24px;
  margin-top: -20px; padding-top: 20px; background: var(--pengpi-panel); }
.verdict { font-size: 52px; font-weight: 900; line-height: 1.05; }
.verdict.ok { color: var(--pengpi-green); } .verdict.bad { color: var(--pengpi-coral); }
.verdict .pts { font: 700 30px/1 var(--font-number); color: var(--pengpi-amber); margin-left: 16px; }
.answer-line { font-size: 30px; font-weight: 700; color: var(--pengpi-cyan); }
.explain-text { font-size: 27px; line-height: 1.55; color: var(--pengpi-ivory); flex: 1; }
#btn-next { align-self: flex-end; }
/* 解說出現時：題幹區縮小、字級降一級（最長 37 字的題目兩行仍完整顯示），把空間讓給解說面板 */
#screen-question:has(> #explain:not([hidden])) .qcard { top: 108px; height: 136px; }
#screen-question:has(> #explain:not([hidden])) .qtext[data-len="s"] { font-size: 60px; }
#screen-question:has(> #explain:not([hidden])) .qtext[data-len="m"] { font-size: 52px; }
#screen-question:has(> #explain:not([hidden])) .qtext[data-len="l"] { font-size: 44px; }
#screen-question:has(> #explain:not([hidden])) .qtext[data-len="xl"] { font-size: 38px; }
/* 分段跳分框出現時，解說文字只用左側，不被跳分框蓋住（跳分框在判定列下方，判定與正確答案照常整列） */
#explain.with-pop .explain-text { max-width: 550px; }

/* ---------- DOM 特效（js/fx.js） ---------- */
#fx-layer { position: absolute; inset: 0; z-index: 15; pointer-events: none; }
#fx-top { position: absolute; left: 0; top: 0; width: 1920px; height: 1080px; image-rendering: pixelated; }
.fx-pop { position: absolute; transform: translate(-50%, -50%); font: 700 56px/1 var(--font-number); color: var(--pengpi-amber); white-space: nowrap;
  text-shadow: 0 4px 0 var(--pengpi-ink), 0 0 18px rgb(5 10 22 / 90%); animation: popup .72s steps(1) both; }
.fx-pop.minus { color: var(--pengpi-coral); font-size: 44px; }
@keyframes popup {
  0% { transform: translate(-50%, -50%) scale(.5); } 9% { transform: translate(-50%, -50%) scale(1.25); }
  18% { transform: translate(-50%, calc(-50% - 16px)); } 30% { transform: translate(-50%, calc(-50% - 32px)); }
  45% { transform: translate(-50%, calc(-50% - 48px)); } 60% { transform: translate(-50%, calc(-50% - 56px)); }
  80% { transform: translate(-50%, calc(-50% - 64px)); } 90%, 100% { transform: translate(-50%, calc(-50% - 64px)); visibility: hidden; } }
.fx-pop.timeup { color: var(--pengpi-coral); font: 700 72px/1 var(--font-en-display); animation: timeuppop .9s steps(1) both; }
@keyframes timeuppop { 0% { transform: translate(-50%, -50%) scale(1.4); } 11% { transform: translate(-50%, -50%); }
  33% { visibility: hidden; } 44% { visibility: visible; transform: translate(-50%, -50%); } 66% { visibility: hidden; } 77%, 100% { visibility: visible; transform: translate(-50%, -50%); } }
/* 分段跳分（答對 +100／速度 +N／COMBO +N／本題得分） */
.fx-pop.fx-score { display: flex; flex-direction: column; align-items: stretch; gap: 2px; font-size: 32px; min-width: 340px; padding: 12px 24px 14px;
  border-radius: var(--radius-card); background: rgb(5 10 22 / 96%); border: 2px solid var(--pengpi-amber); text-shadow: none;
  transform: translate(-50%, 0); animation: scorerise 1.4s steps(1) both; }
@keyframes scorerise { 0% { transform: translate(-50%, 0); } 25% { transform: translate(-50%, -4px); } 50% { transform: translate(-50%, -8px); } 75%, 100% { transform: translate(-50%, -12px); } }
.fx-row { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; line-height: 1.25;
  animation: rowin .33s steps(1) both; animation-delay: calc(var(--i, 0) * 110ms); }
.fx-row .lbl { font-family: var(--font-zh-body); font-weight: 700; font-size: 28px; color: var(--pengpi-ivory); }
.fx-row .px { font-family: var(--font-number); font-weight: 700; }
.fx-row.speed .px { color: var(--pengpi-green); }
.fx-row.combo .lbl { font-family: var(--font-en-display); font-size: 24px; color: var(--pengpi-cyan); }
.fx-row.combo .px { color: var(--pengpi-cyan); }
.fx-row.mult .px { color: var(--pengpi-ivory); }
.fx-row.total { justify-content: flex-end; margin-top: 6px; padding-top: 8px; border-top: 2px dashed rgb(255 200 87 / 50%); }
.fx-row.total .px { font-size: 52px; color: var(--pengpi-amber); }
@keyframes rowin { 0% { visibility: hidden; } 1% { visibility: visible; transform: scale(1.5); } 33% { transform: scale(1.2); } 66%, 100% { visibility: visible; transform: none; } }

/* COMBO 看板：上方播出層（分數左側），連對 3 題起出現；加一時跳一下 */
#combo { position: absolute; left: 1060px; top: 50px; width: 270px; height: 66px; z-index: 7; pointer-events: none; display: flex; align-items: center; justify-content: center; gap: 14px;
  border-radius: 12px; background: rgb(5 10 22 / 92%); border: 2px solid var(--pengpi-cyan); box-shadow: 0 0 20px rgb(40 217 255 / 35%); }
#combo .combo-label { font-size: 20px; color: var(--pengpi-cyan); animation: comboflash .333s steps(1) infinite; }
#combo .combo-n { font: 700 38px/1 var(--font-number); color: var(--pengpi-ivory); }
@keyframes comboflash { 50% { color: var(--pengpi-amber); } }
#combo.hit { animation: combohit .48s steps(1) both; }
@keyframes combohit { 0% { transform: scale(1.25); } 25% { transform: scale(1.12) translateY(-6px); } 50% { transform: translateY(3px); } 75%, 100% { transform: none; } }

.fx-bang { position: absolute; transform: translate(-50%, -50%); animation: bangin .8s steps(1) both; }
.fx-bang canvas { display: block; image-rendering: pixelated; }
@keyframes bangin { 0% { transform: translate(-50%, -50%) scale(1.6); } 10% { transform: translate(-50%, -50%) scale(1.25); }
  20% { transform: translate(-50%, -50%) rotate(-4deg); } 30% { transform: translate(-50%, -50%); } 88% { visibility: visible; } 89%, 100% { visibility: hidden; transform: translate(-50%, -50%); } }

/* 段落轉場（300～500ms）：方塊斜向長出／縮回，顏色改成深夜藍 */
#wipe { position: absolute; inset: 0; z-index: 19; display: grid; grid-template-columns: repeat(16, 120px); grid-template-rows: repeat(9, 120px); pointer-events: none; }
#wipe i { background: var(--pengpi-ink); transform: scale(0); }
#wipe i.b { background: var(--pengpi-panel); }
#wipe.in i { transform: scale(1); animation: wipein .24s steps(3) both; animation-delay: calc(var(--d) * 9ms); }
#wipe.out i { transform: scale(0); animation: wipein .24s steps(3) reverse both; animation-delay: calc((23 - var(--d)) * 9ms); }
@keyframes wipein { from { transform: scale(0); } to { transform: scale(1); } }

/* ---------- 疊加：段落字卡、觀眾時刻、天才挑戰、離開確認 ---------- */
.overlay { position: absolute; inset: 0; z-index: 20; display: flex; align-items: center; justify-content: center; background: var(--pengpi-scrim); }
#overlay-segment { background: transparent; }
.segment-card { min-width: 1000px; padding: 40px 88px 46px; text-align: center; border-radius: var(--radius-feature); background: rgb(5 10 22 / 96%);
  border: 4px solid var(--pengpi-cyan); box-shadow: 0 30px 70px var(--pengpi-shadow); position: relative; animation: segin var(--motion-segment) var(--ease-enter) both; }
.segment-card::before { content: ""; position: absolute; left: 26px; right: 26px; top: 16px; height: 3px; border-radius: 2px; background: var(--pengpi-violet); }
.seg-no { font: 700 30px/1.2 var(--font-en-display); letter-spacing: 4px; color: var(--pengpi-cyan); }
.segment-name { font-size: 84px; font-weight: 900; color: var(--pengpi-ivory); margin-top: 12px; line-height: 1.12; }
@keyframes segin { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: none; } }
.overlay.see-through { background: rgb(5 10 22 / 30%); align-items: flex-start; padding-top: 36px; }
.shout { text-align: center; padding: 16px 56px 20px; border-radius: var(--radius-feature); background: var(--pengpi-amber); color: var(--pengpi-ink); box-shadow: 0 18px 40px var(--pengpi-shadow); }
.shout-title { font-size: 44px; font-weight: 900; }
.shout-num { font: 700 84px/1.1 var(--font-number); }
.genius-box, .exit-box { padding: 40px 56px; text-align: center; border-radius: var(--radius-feature); background: rgb(5 10 22 / 97%); border: 4px solid var(--pengpi-cyan);
  box-shadow: 0 30px 70px var(--pengpi-shadow); }
.genius-title { font-size: 72px; font-weight: 900; color: var(--pengpi-ivory); margin-bottom: 30px; }
.genius-choices { display: flex; gap: 40px; }
.genius-btn { display: flex; flex-direction: column; gap: 8px; width: 520px; padding: 28px; min-height: 180px; justify-content: center; }
.genius-btn b { font-size: 52px; } .genius-btn span { font-size: 24px; font-weight: 700; color: var(--pengpi-muted); }
.genius-btn.safe { border-color: var(--pengpi-cyan); }
.genius-btn.hard { border-color: var(--pengpi-violet); background: linear-gradient(135deg, rgb(135 91 255 / 35%), var(--pengpi-panel-raised)); }
.exit-box { max-width: 960px; }
.exit-title { font-size: 46px; font-weight: 900; color: var(--pengpi-ivory); margin-bottom: 12px; }
.exit-box p { font-size: 24px; color: var(--pengpi-muted); line-height: 1.6; margin: 0 0 24px; }
.exit-buttons { display: flex; gap: 24px; justify-content: center; }
/* 朋友的成績圖卡（分享連結進站）：1200×630 圖卡縮成 840 寬 */
.friend-box { width: 960px; }
.friend-img { display: block; width: 840px; height: auto; aspect-ratio: 1200 / 630; margin: 0 auto 16px; border-radius: var(--radius-card); border: 2px solid var(--pengpi-slate); }
.friend-box p { margin-bottom: 20px; }

/* ---------- 成績單（設計稿 C_06）：x 480～1500 的大卡；第一視線是稱號與答對數，下面是 10 格與加分 ---------- */
#screen-result { display: block; }
.report { position: absolute; left: 480px; top: 166px; width: 1020px; max-height: 806px; overflow-y: auto; display: flex; flex-direction: column; gap: 14px;
  padding: 30px 40px 24px; border-radius: var(--radius-feature); background: rgb(5 10 22 / 96%); border: 4px solid var(--pengpi-cyan);
  box-shadow: 0 24px 60px var(--pengpi-shadow); scrollbar-color: var(--pengpi-cyan) transparent; }
.report::before { content: ""; position: absolute; left: 26px; right: 26px; top: 16px; height: 3px; border-radius: 2px; background: var(--pengpi-violet); }
.paper { position: relative; color: var(--pengpi-ivory); display: flex; flex-direction: column; gap: 10px; }
.print-line { position: relative; }
.paper.printing .print-line { animation: printline var(--motion-ui) var(--ease-enter) both; animation-delay: calc(var(--i, 0) * 140ms); }
@keyframes printline { from { opacity: 0; transform: translateX(-24px); } to { opacity: 1; transform: none; } }
.report-head { display: flex; justify-content: space-between; align-items: baseline; gap: 24px; margin-top: 4px; }
.rh-kicker { font-size: 26px; font-weight: 700; color: var(--pengpi-cyan); white-space: nowrap; }
#report-ep { font-size: 20px; color: var(--pengpi-muted); text-align: right; }
/* 參選人專題：標頭右上放本人像素人像（上半身，兩人同一縮放比例），標頭下加分隔線，和稱號、等級印章分開；
   外框用中性灰藍、不用政黨色，兩人的位置、尺寸、外框、文字格式完全相同（DECISIONS 第 39 條） */
.paper.has-cand .report-head { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "k c" "e c"; column-gap: 24px; row-gap: 4px; align-items: center;
  padding-bottom: 12px; border-bottom: 2px solid rgb(101 120 159 / 35%); }
.paper.has-cand .rh-kicker { grid-area: k; align-self: end; }
.paper.has-cand #report-ep { grid-area: e; align-self: start; text-align: left; }
.report-cand { grid-area: c; display: flex; align-items: center; gap: 14px; }
.report-cand[hidden] { display: none; }
.rc-frame { width: 96px; height: 96px; flex: none; display: flex; justify-content: center; align-items: flex-start; overflow: hidden;
  border-radius: var(--radius-control); border: 3px solid var(--pengpi-slate); background: var(--pengpi-panel); }
.rc-frame img { height: 156px; width: auto; max-width: none; flex: none; margin-top: 4px; image-rendering: pixelated; }
.rc-text { display: flex; flex-direction: column; gap: 2px; white-space: nowrap; }
.rc-text b { font-size: 26px; font-weight: 900; color: var(--pengpi-ivory); line-height: 1.2; }
.rc-text small { font-size: 17px; font-weight: 700; color: var(--pengpi-muted); }
.report-hero { display: flex; justify-content: space-between; align-items: center; min-height: 96px; }
.report-title { font-size: 64px; font-weight: 900; color: var(--pengpi-ivory); line-height: 1.12; }
/* 等級徽章：圓角方牌、IBM Plex Mono 等級字 */
.stamp { width: 104px; height: 104px; flex-shrink: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  border-radius: var(--radius-card); border: 3px solid var(--pengpi-amber); color: var(--pengpi-amber); background: rgb(255 200 87 / 10%); }
.stamp .px { font: 700 52px/1 var(--font-number); }
.stamp small { font-size: 16px; font-weight: 700; }
.paper.printing .stamp { animation: stamp .32s steps(1) both; animation-delay: .82s; }
@keyframes stamp { 0% { opacity: 0; transform: scale(1.8); } 25% { opacity: 1; transform: scale(1.4); } 50% { transform: scale(1.12); } 75% { transform: scale(.96); } 100% { opacity: 1; transform: none; } }
.report-scoreline { display: flex; align-items: baseline; gap: 22px; flex-wrap: wrap; }
.report-correct { order: -1; font-size: 44px; font-weight: 900; color: var(--pengpi-coral); }
.score-label { font-size: 14px; color: var(--pengpi-muted); }
.report-score { font: 700 40px/1 var(--font-number); color: var(--pengpi-ivory); }
.report-replay { display: inline-block; background: var(--pengpi-panel-raised); color: var(--pengpi-amber); font-size: 20px; padding: 4px 12px; border-radius: 8px; }
.report-grid { display: flex; gap: 10px; padding: 2px 0; }
.report-grid span { width: 56px; height: 56px; display: flex; align-items: center; justify-content: center; position: relative; border-radius: 10px;
  color: var(--pengpi-ink); font-size: 32px; font-weight: 900; line-height: 1; }
.report-grid span.g-gap { margin-left: 18px; }
.report-grid .g-ok { background: var(--pengpi-green); } .report-grid .g-bad { background: var(--pengpi-coral); color: var(--pengpi-ivory); }
.report-grid .g-genius { box-shadow: 0 0 0 3px var(--pengpi-amber); }
.report-grid .g-genius::after { content: "★"; position: absolute; top: -16px; right: -10px; font-size: 22px; color: var(--pengpi-amber); }
.report-bonus { display: flex; align-items: baseline; gap: 14px; }
.report-bonus .bonus-val { font: 700 24px/1 var(--font-number); color: var(--pengpi-ivory); margin-right: 22px; }
.report-wrongline { padding-top: 10px; border-top: 2px solid rgb(101 120 159 / 35%); font-size: 24px; font-weight: 700; line-height: 1.45; display: flex; gap: 16px; align-items: baseline; }
.side-label { font-size: 19px; color: var(--pengpi-cyan); font-weight: 700; white-space: nowrap; }
.report-notes { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.note { padding: 10px 18px; border-radius: var(--radius-control); background: var(--pengpi-panel); border: 2px solid rgb(101 120 159 / 45%);
  color: var(--pengpi-ivory); font-size: 21px; font-weight: 700; line-height: 1.4; display: flex; flex-direction: column; gap: 2px; }
.note .side-label { font-size: 17px; }
.report-buttons { display: flex; gap: 20px; justify-content: center; }
/* 「再看一集 ▶」比原本的「重播」長：按鈕不折行，分享鈕讓出一點寬度 */
.report-buttons .btn { white-space: nowrap; padding-left: 22px; padding-right: 22px; }
.report-buttons #btn-share { min-width: 230px; }
.waitlist-line { text-align: center; font-size: 20px; color: var(--pengpi-muted); animation: appear 0s 1.4s both; }
@keyframes appear { from { visibility: hidden; } to { visibility: visible; } }
.waitlist-line .linkish { color: var(--pengpi-muted); }
#waitlist-form { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 12px; font-weight: 700; }
/* 分享面板（DECISIONS 第 53、77 條）：蓋在整個舞台上（fixed＝相對於縮放後的舞台），不被成績單卡裁切 */
#share-panel { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 30; width: 1120px;
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; padding: 30px 36px; border-radius: var(--radius-feature);
  background: rgb(5 10 22 / 98%); border: 4px solid var(--pengpi-cyan); box-shadow: 0 0 0 9999px rgb(2 5 13 / 70%); }
#share-panel[hidden] { display: none; }
#overlay-fb { z-index: 40; } #overlay-fb p { font-size: 26px; line-height: 1.6; margin: 10px 0; color: var(--pengpi-ivory); } #overlay-fb small { font-size: 20px; color: var(--pengpi-muted); }
/* 分享面板打開時，成績單整層提到主持人之上，暗幕才蓋得住整個舞台 */
#screen-result:has(#share-panel:not([hidden])) { z-index: 25; }
#share-panel .share-title { grid-column: 1 / -1; color: var(--pengpi-ivory); font-size: 36px; font-weight: 900; text-align: center; }
#share-panel small { display: block; font-size: 18px; font-weight: 500; color: var(--pengpi-muted); margin-top: 2px; }
#share-panel #share-close { grid-column: 1 / -1; justify-self: center; min-width: 200px; }
#share-panel .share-preview { grid-column: 1 / -1; display: flex; gap: 20px; align-items: center; padding: 14px; border-radius: var(--radius-control); background: var(--pengpi-panel); }
#share-panel .share-preview img { width: 400px; height: 210px; border-radius: 10px; background: var(--pengpi-panel-raised); flex: none; }
#share-panel .share-preview pre { margin: 0; white-space: pre-wrap; font-family: var(--font-zh-body); font-size: 20px; line-height: 1.5; color: var(--pengpi-ivory); }
#share-panel .share-status { grid-column: 1 / -1; margin: 0; text-align: center; font-size: 20px; color: var(--pengpi-amber); min-height: 26px; }
#share-panel #share-native { grid-column: 1 / -1; }
.toast { position: absolute; left: 50%; top: 440px; transform: translateX(-50%); z-index: 35; padding: 12px 28px; white-space: nowrap; border-radius: var(--radius-control);
  background: rgb(5 10 22 / 97%); border: 2px solid var(--pengpi-cyan); color: var(--pengpi-ivory); font-size: 26px; font-weight: 700; box-shadow: 0 12px 30px var(--pengpi-shadow); }

/* Turnstile 需要互動時出現的勾選框：畫面下方置中，蓋在所有內容之上 */
#turnstile-box { position: absolute; left: 50%; bottom: 120px; transform: translateX(-50%) scale(1.6); transform-origin: 50% 100%; z-index: 30; }
#turnstile-box:empty { display: none; }
/* 驗證結束後收起（不用 display:none，保留 iframe 供下次驗證重用）；不擋住底下的選項 */
#turnstile-box.ts-done { visibility: hidden; pointer-events: none; }
/* 支持節目：兩個方案按鈕 */
.plan-row { display: flex; gap: 16px; }
.btn.plan { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; position: relative; padding-top: 20px; }
.btn.plan b { font-size: 30px; } .btn.plan small { font-size: 17px; font-weight: 700; opacity: .9; }
.plan-tag { position: absolute; top: -16px; left: 50%; transform: translateX(-50%); background: var(--pengpi-amber); color: var(--pengpi-ink); font-size: 17px; padding: 1px 10px;
  border-radius: 6px; white-space: nowrap; }
#screen-support { padding-top: 26px !important; gap: 14px !important; }
.support-cards { display: flex; gap: 28px; }
.support-card { padding: 22px 30px 24px; border-radius: var(--radius-feature); background: rgb(5 10 22 / 94%); border: 2px solid var(--pengpi-slate); }
.support-card.main { width: 880px; border-color: var(--pengpi-amber); }
.support-card:not(.main) { width: 420px; }
.support-card:not(.main) .tip-row { flex-direction: column; }
.support-card h3 { margin: 0 0 6px; font-size: 32px; color: var(--pengpi-amber); }
.support-lead { margin: 0 0 10px; font-size: 23px; line-height: 1.5; color: var(--pengpi-ivory); font-weight: 700; }
.perk-list { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 20px; line-height: 1.45; color: var(--pengpi-muted); }
.perk-list li { padding-left: 30px; position: relative; }
.perk-list li::before { content: '★'; position: absolute; left: 0; color: var(--pengpi-amber); }
.perk-list b { color: var(--pengpi-ivory); }
.perk-list i { font-style: normal; font-size: 15px; color: var(--pengpi-ink); background: var(--pengpi-green); padding: 1px 8px; margin-left: 8px; border-radius: 6px; white-space: nowrap; }
.support-fine { margin: 0 0 12px; font-size: 16px; line-height: 1.5; color: var(--pengpi-muted); }
.support-agree { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 12px; font-size: 18px; line-height: 1.5; color: var(--pengpi-ivory); cursor: pointer; }
.support-agree input { width: 22px; height: 22px; margin-top: 3px; flex: none; accent-color: var(--pengpi-coral); }
.support-agree a { color: var(--pengpi-cyan); text-underline-offset: 3px; }
.support-test { margin: 0; background: var(--pengpi-amber); color: var(--pengpi-ink); font-size: 22px; padding: 6px 18px; font-weight: 700; border-radius: 8px; }
.support-status { margin: 0 0 12px; font-size: 22px; color: var(--pengpi-green); min-height: 28px; }
.tip-row { display: flex; gap: 16px; margin-top: 16px; }
.btn.tip { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 28px; }
.btn.tip small { font-size: 18px; font-weight: 700; opacity: .85; }
.support-line { display: flex; gap: 18px; justify-content: center; align-items: center; font-size: 21px; }
.support-line .linkish { color: var(--pengpi-amber); }
.support-line .dim { opacity: .75; font-size: 18px; color: var(--pengpi-muted); }
#email-line { display: flex; flex-direction: column; gap: 8px; align-items: center; font-size: 21px; color: var(--pengpi-muted); }
#email-form { display: flex; gap: 12px; }
#email-input { font-size: 22px; padding: 6px 12px; width: 360px; }
/* 右下角小圖示按鈕（離開、靜音） */
.btn.icon-btn { width: 52px; height: 52px; min-height: 0; padding: 0; font-size: 24px; line-height: 1; opacity: .8; display: inline-flex; align-items: center; justify-content: center; }
.btn.icon-btn:hover, .btn.icon-btn:focus-visible { opacity: 1; }

/* 我的紀錄 */
#screen-records { gap: 16px !important; padding-top: 30px !important; }
.records-top { display: flex; gap: 18px; align-items: stretch; }
.rec-stat, .rec-cal { border-radius: var(--radius-card); background: rgb(5 10 22 / 94%); border: 2px solid var(--pengpi-slate); }
.rec-stat { padding: 12px 26px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.rec-stat b { font: 700 56px/1.1 var(--font-number); color: var(--pengpi-amber); } .rec-stat small { font-size: 19px; color: var(--pengpi-muted); }
.rec-cal { display: grid; grid-template-columns: repeat(7, 34px); gap: 4px; padding: 10px; }
.rec-cal span { height: 30px; display: flex; align-items: center; justify-content: center; font-size: 15px; color: var(--pengpi-muted); background: var(--pengpi-panel); border-radius: 5px; }
.rec-cal span.watched { background: var(--pengpi-green); color: var(--pengpi-ink); font-weight: 700; } .rec-cal span.head { background: none; color: var(--pengpi-cyan); font-weight: 700; }
.rec-cal span.blank { background: none; }
.rec-cal span.today { box-shadow: 0 0 0 2px var(--pengpi-ivory); }
.rec-note { margin: 0; font-size: 20px; color: var(--pengpi-muted); }
.rec-list { width: 1320px; max-height: 300px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding: 4px; scrollbar-color: var(--pengpi-cyan) rgb(5 10 22 / 60%); }
.rec-row { display: grid; grid-template-columns: 160px 1fr 300px 90px 270px; align-items: center; gap: 14px; padding: 10px 18px; border-radius: var(--radius-control);
  background: rgb(13 27 56 / 94%); border: 2px solid rgb(101 120 159 / 50%); color: var(--pengpi-ivory); font-size: 21px; font-weight: 700; }
.rec-row .rec-grade { font: 700 24px/1 var(--font-number); color: var(--pengpi-amber); }
.rec-row .rec-grid { font-size: 18px; letter-spacing: 1px; white-space: nowrap; }
.rec-row .rec-tag { font-size: 16px; color: var(--pengpi-muted); }
.rec-account { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; justify-content: center; max-width: 1320px; font-size: 21px; color: var(--pengpi-ivory);
  padding: 10px 22px; border-radius: var(--radius-control); background: rgb(5 10 22 / 90%); }
.rec-account form { display: flex; gap: 10px; }
.rec-account input { font-size: 22px; padding: 6px 12px; width: 360px; }
.rec-account .linkish { font-size: 18px; color: var(--pengpi-cyan); }
.rec-empty { text-align: center; font-size: 24px; color: var(--pengpi-ivory); padding: 24px; border-radius: var(--radius-control); background: rgb(5 10 22 / 90%); }
/* 付款完成感謝頁：黑皮、碰碰在兩側歡呼，中間是感謝卡 */
#screen-thanks { display: flex; align-items: flex-start; justify-content: center; padding-top: 168px; }
.thanks-card { width: 940px; padding: 36px 48px 40px; text-align: center; border-radius: var(--radius-feature); background: rgb(5 10 22 / 95%); border: 4px solid var(--pengpi-amber);
  box-shadow: 0 24px 60px var(--pengpi-shadow); }
.thanks-title { font-size: 64px; font-weight: 900; color: var(--pengpi-amber); margin-bottom: 18px; }
.thanks-main { margin: 0 0 12px; font-size: 32px; font-weight: 700; color: var(--pengpi-ivory); line-height: 1.5; }
.thanks-status { margin: 0 0 18px; font-size: 26px; color: var(--pengpi-green); min-height: 36px; }
.thanks-note { margin: 0 0 26px; font-size: 22px; color: var(--pengpi-muted); line-height: 1.6; }
#stage[data-screen="thanks"] #host-heipi { left: 70px; }
/* 首頁贊助看板的暱稱設定（感謝頁、我的紀錄；DECISIONS 第 85 條） */
.board-form { display: flex; flex-direction: column; align-items: center; gap: 8px; max-width: 760px; margin: 0 auto 20px; padding: 14px 24px 12px;
  border-radius: var(--radius-control); background: rgb(255 200 87 / 8%); border: 2px solid rgb(255 200 87 / 45%); }
.bf-label { font-size: 26px; font-weight: 900; color: var(--pengpi-amber); }
.bf-row { display: flex; gap: 12px; align-items: center; }
#thanks-board-name, #rec-board-name { width: 320px; font: 700 26px/1.3 var(--font-zh-body); padding: 8px 14px; border-radius: 10px; border: 2px solid var(--pengpi-slate);
  background: var(--pengpi-ivory); color: var(--pengpi-ink); user-select: text; -webkit-user-select: text; }
.bf-check { display: flex; align-items: center; gap: 10px; font-size: 22px; font-weight: 700; color: var(--pengpi-ivory); cursor: pointer; }
.bf-check input { width: 26px; height: 26px; accent-color: var(--pengpi-amber); }
.bf-note { margin: 0; font-size: 19px; color: var(--pengpi-muted); }
.bf-status { margin: 0; min-height: 26px; font-size: 21px; font-weight: 700; color: var(--pengpi-muted); }
.bf-status[data-state="ok"] { color: var(--pengpi-green); } .bf-status[data-state="error"] { color: var(--pengpi-coral); }
.bf-status:empty { display: none; }
.board-form.rec-board { flex-direction: row; flex-wrap: wrap; justify-content: center; max-width: 1320px; margin: 0; background: rgb(5 10 22 / 90%); }
.board-form.rec-board .bf-note, .board-form.rec-board .bf-status { flex-basis: 100%; text-align: center; }

/* 手機直立：由 js/game.js 依實際寬高加上 body.is-portrait（不用 orientation 媒體查詢，App 內建瀏覽器轉向時會不準） */
#rotate { display: none; }
body.is-portrait #rotate { display: flex; position: fixed; inset: 0; z-index: 100; background: var(--pengpi-midnight); color: var(--pengpi-ivory); font-size: 26px; font-weight: 900;
  align-items: center; justify-content: center; text-align: center; line-height: 1.6; padding: 0 16px; }
#rotate small { display: block; margin: 14px 8px 18px; font-size: 16px; font-weight: 500; color: var(--pengpi-muted); line-height: 1.5; }
#rotate .btn { font-size: 18px; }

/* 成績單模式：主持人在左右兩欄，不蓋成績單 */
#stage.result-mode #host-heipi { left: 60px; bottom: 120px; --sprite-scale: 1.5; }
#stage.result-mode:not(.live-mode) #host-pengpeng { --sprite-scale: 1.2; }
#stage.about-mode .host { visibility: hidden; }

/* 開場字卡 */
#intro-card { position: absolute; left: 520px; top: 280px; width: 1000px; z-index: 5; text-align: center; padding: 36px 48px 32px; border-radius: var(--radius-feature);
  background: rgb(5 10 22 / 96%); border: 4px solid var(--pengpi-cyan); box-shadow: 0 30px 70px var(--pengpi-shadow); animation: segin var(--motion-segment) var(--ease-enter) both; }
#intro-card .intro-kicker { font: 700 24px/1.3 var(--font-en-display); letter-spacing: 3px; color: var(--pengpi-cyan); }
#intro-card .intro-date { margin-top: 8px; font-size: 36px; font-weight: 700; color: var(--pengpi-muted); }
#intro-card .intro-ep { margin-top: 12px; font-size: 60px; font-weight: 900; color: var(--pengpi-ivory); line-height: 1.2; }
#intro-card .intro-sub { margin-top: 18px; font-size: 22px; color: var(--pengpi-muted); }

/* 回報錯誤 */
.explain-actions { display: flex; justify-content: space-between; align-items: center; }
/* 展開回報框時「回報錯誤」會隱藏，「下一題」仍靠右不跳位 */
.explain-actions #btn-next { margin-left: auto; }
.btn.ghost { background: transparent; color: var(--pengpi-muted); border-color: rgb(101 120 159 / 60%); }
#report-box { display: flex; align-items: center; gap: 16px; font-size: 22px; }
#report-box select { font-size: 22px; padding: 6px 10px; font-family: inherit; border: 2px solid var(--pengpi-slate); border-radius: 8px; background: var(--pengpi-ivory); color: var(--pengpi-ink); }

/* 文字連結 */
.linkish { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }

/* 排行榜 */
#screen-board { padding-top: 70px !important; }
.tabs { display: flex; gap: 20px; }
.tab[aria-selected="true"] { background: var(--pengpi-cyan); color: var(--pengpi-ink); border-color: var(--pengpi-cyan); }
/* 滿 10 名時清單不能把「回到片頭」擠出畫面（玩家 2026-10-13 回報離不開排行榜）：列距收緊，放不下時清單自己捲動 */
#board-list { width: 900px; margin: 0; padding: 0 12px 0 0; list-style: none; display: flex; flex-direction: column; gap: 6px; max-height: 560px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
#board-list li { flex: none; }
#board-list li { display: flex; justify-content: space-between; padding: 5px 26px; border-radius: var(--radius-control); background: rgb(5 10 22 / 92%);
  border: 2px solid rgb(101 120 159 / 50%); font: 700 28px/1.3 var(--font-number); white-space: pre; }
#board-list li:first-child { color: var(--pengpi-amber); border-color: var(--pengpi-amber); }
.board-note { color: var(--pengpi-muted); font-size: 22px; margin: 0; }

/* 關於 */
#screen-about .about { max-height: 760px; overflow-y: auto; overscroll-behavior: contain; scrollbar-color: var(--pengpi-cyan) transparent; user-select: text; -webkit-user-select: text; }
.about { width: 1320px; padding: 28px 44px; border-radius: var(--radius-feature); background: rgb(5 10 22 / 95%); border: 2px solid var(--pengpi-slate);
  color: var(--pengpi-ivory); font-size: 23px; line-height: 1.65; }
.about h2 { margin: 0 0 8px; font-size: 40px; color: var(--pengpi-ivory); } .about h3 { margin: 18px 0 4px; font-size: 27px; color: var(--pengpi-cyan); }
.about p { margin: 0; color: #dbe5fb; }
.about a { color: var(--pengpi-cyan); font-weight: 700; }

/* 成績單額外區塊（排行榜暱稱、會員候補表單） */
#result-extras { display: flex; flex-direction: column; gap: 10px; font-size: 21px; font-weight: 700; }
#result-extras:empty, #result-extras:not(:has(form:not([hidden]))) { display: none; }
#result-extras form { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; }
#result-extras input, #waitlist-form input, #email-input, .rec-account input { font-size: 22px; padding: 6px 12px; border: 2px solid var(--pengpi-slate); border-radius: 8px;
  font-family: inherit; background: var(--pengpi-ivory); color: var(--pengpi-ink); }
#initials { width: 120px; text-transform: uppercase; font-family: var(--font-number); }
#waitlist-email { width: 340px; }

/* ---------- 選舉特別專區（PLAN 4.4.2；設計稿 C_07）----------
   新聞棚（bg_election.png）＋母品牌 logo bug；右上 SPECIAL；題卡中立版：四個選項同色、同尺寸、同權重（不對應政黨色）；
   題卡底部是公開資料來源列；lower third「NEWS DESK」；不使用 APPLAUSE 與笑聲 */
#stage.election-mode { background-image: url("../assets/ui/bg_election.png"); background-color: #0b1636;
  background-image: image-set(url("../assets/ui/bg_election.webp") type("image/webp"), url("../assets/ui/bg_election.png") type("image/png")); }
#stage.election-mode::before { background: rgb(5 10 22 / 38%); opacity: 1; }
#stage.election-mode #audience { display: none; }
#stage.election-mode .hud-plate, #stage.election-mode .hud-progress { display: none; }
.hud-elec { display: none; }
#stage.election-mode .hud-elec { display: flex; align-items: center; gap: 12px; left: 472px; top: 52px; }
.hud-elec-title { height: 46px; padding: 0 20px; display: flex; align-items: center; border-radius: 10px; background: var(--pengpi-coral); color: var(--pengpi-ivory);
  font-size: 24px; font-weight: 900; letter-spacing: 1px; }
.hud-elec-zone { height: 46px; padding: 0 18px; display: flex; align-items: center; border-radius: 10px; background: rgb(5 10 22 / 90%); border: 2px solid var(--pengpi-slate);
  color: var(--pengpi-ivory); font-size: 24px; font-weight: 700; }
#stage.election-mode .hud-left { background: var(--pengpi-coral); }
/* 主持人：黑皮與碰碰並排在左欄（右欄留給參選人專題的人物） */
#stage.election-mode:has(> #hud:not([hidden])) #host-heipi { left: 0; bottom: 218px; width: 250px; --sprite-scale: 1.15; }
#stage.election-mode:not(.result-mode):has(> #hud:not([hidden])) #host-pengpeng { left: 220px; right: auto; bottom: 218px; width: 220px; --sprite-scale: .9; }
#stage.election-mode .host .bubble { width: 420px; }
#stage.election-mode:not(.result-mode) #host-pengpeng .bubble { left: -200px; right: auto; }
#stage:is(.election-mode, .topic-mode) .q-credit { display: none; }
#stage:is(.election-mode, .topic-mode) .q-source { position: absolute; left: 34px; right: 34px; bottom: 18px; height: 62px; margin: 0; display: flex; align-items: center; justify-content: space-between;
  padding: 0 26px; border-radius: var(--radius-control); border: 2px solid var(--pengpi-violet); background: rgb(13 27 56 / 70%); }
.q-source span { font-size: 22px; font-weight: 700; color: var(--pengpi-ivory); } .q-source small { font-size: 19px; color: var(--pengpi-muted); }
#stage.election-mode .opt { --k: var(--pengpi-slate); border-color: var(--pengpi-slate); justify-content: flex-start; text-align: left; padding-left: 118px; }
#stage.election-mode .opt .key { background: var(--pengpi-panel); color: var(--pengpi-ivory); border: 2px solid var(--pengpi-cyan); }
#stage:is(.election-mode, .topic-mode) #options { top: 470px; }
#stage:is(.election-mode, .topic-mode) #options:not(:has(> :nth-child(3))) { top: 540px; }
/* 解說面板止於資料來源列上方（來源列頂端 y=768，留 12px）；手機版在手機段落另外設定 */
#stage:is(.election-mode, .topic-mode) #explain { max-height: 334px; }
#elec-candidate { position: absolute; right: 70px; bottom: 96px; height: 380px; z-index: 6; image-rendering: pixelated; pointer-events: none; }
/* 專區選單 */
:is(#screen-election, #screen-topics) { gap: 20px !important; }
.elec-group { width: 1120px; padding: 18px 32px 24px; border-radius: var(--radius-feature); background: rgb(5 10 22 / 94%); border: 2px solid var(--pengpi-slate); }
.elec-group h3 { margin: 0 0 14px; font-size: 28px; color: var(--pengpi-cyan); }
.elec-row { display: flex; gap: 24px; justify-content: center; }
.elec-row + .elec-row { margin-top: 18px; }
.elec-zone { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.elec-zone b { font-size: 36px; } .elec-zone small { font-size: 20px; font-weight: 700; color: var(--pengpi-muted); }
.elec-zone.wide { width: 728px; }
/* 兩位參選人按鈕：完全相同的尺寸與樣式（PLAN 4.4.2） */
.elec-zone.pick { border-color: var(--pengpi-amber) !important; box-shadow: 0 0 0 4px var(--pengpi-amber), 0 0 28px 6px rgb(255 200 87 / 70%); animation: zonepick 1.2s ease-in-out infinite; }
@keyframes zonepick { 50% { box-shadow: 0 0 0 4px var(--pengpi-amber), 0 0 10px 2px rgb(255 200 87 / 35%); } }
@media (prefers-reduced-motion: reduce) { .elec-zone.pick { animation: none; } }
.elec-zone.cand { width: 350px; height: 150px; flex-direction: row; justify-content: center; gap: 18px; }
.elec-zone.cand .cand-img { height: 124px; image-rendering: pixelated; }
.elec-zone.cand picture { display: contents; }
.elec-zone.cand .cand-text { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.elec-row.cities .elec-zone { width: 180px; font-size: 30px; }
.elec-zone:disabled { opacity: .45; cursor: not-allowed; }
.elec-note { width: 1120px; margin: 0; font-size: 21px; line-height: 1.5; color: var(--pengpi-muted); }

/* ---------- 主題專區（DECISIONS 第 102 條）：韓流大挑戰 ----------
   原創舞台背景（assets/ui/topics/kpop/bg_kpop，午夜藍＋紫／青／桃紅霓虹；不含任何藝人、Logo、手燈造型）；
   題卡、選項沿用每日節目的配色，APPLAUSE 照常；題卡底部是資料時間列；不顯示升級進度 */
#stage.topic-mode { background-image: url("../assets/ui/topics/kpop/bg_kpop.png"); background-color: #0a0d2e;
  background-image: image-set(url("../assets/ui/topics/kpop/bg_kpop.webp") type("image/webp"), url("../assets/ui/topics/kpop/bg_kpop.png") type("image/png")); }
#stage.topic-mode::before { background: rgb(5 10 22 / 30%); opacity: 1; }
#stage.topic-mode .hud-progress { display: none; }
#stage.topic-mode .hud-plate { background: linear-gradient(90deg, #ff4f9a, #8b5bff); }
#stage.topic-mode .hud-left { background: #8b5bff; }
#stage.topic-mode #audience { display: none; }
#stage.topic-mode .q-source { border-color: #ff4f9a; }
/* 首頁入口：電腦版在選舉看板上方（x 40～370、y 170～320），選舉看板往下移 */
.topic-board { position: absolute; left: 40px; top: 170px; width: 330px; height: 150px; z-index: 8; display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto 1fr auto;
  align-items: center; column-gap: 12px; padding: 16px 20px 16px 22px; cursor: pointer; text-align: left; font-family: var(--font-zh-body); color: var(--pengpi-ivory);
  border-radius: 18px; border: 4px solid #ff4f9a; background: linear-gradient(135deg, #2a1466 0%, #12194a 55%, #0a2a55 100%);
  box-shadow: 0 0 0 3px rgb(5 10 22 / 70%), 0 0 24px rgb(255 79 154 / 40%), 0 16px 36px var(--pengpi-shadow); transition: filter var(--motion-fast), transform var(--motion-fast); }
.topic-board:hover { filter: brightness(1.1); transform: translateY(-2px); }
.topic-board:focus-visible, .topic-zone:focus-visible { outline: var(--stroke-focus) solid var(--pengpi-focus); outline-offset: 3px; }
.tb-tag { justify-self: start; font: 700 18px/1 var(--font-en-display); letter-spacing: 2px; color: #12194a; background: #5ff0ff; padding: 4px 10px; border-radius: 6px; }
.tb-title { grid-column: 1; font-size: 40px; font-weight: 900; line-height: 1.15; white-space: nowrap; text-shadow: 0 0 14px rgb(255 79 154 / 70%); }
.tb-sub { grid-column: 1; font-size: 22px; font-weight: 700; color: #d6dcff; white-space: nowrap; }
.tb-go { grid-column: 2; grid-row: 1 / 4; font-size: 34px; color: #5ff0ff; }
.elec-wrap { top: 336px; }
.lamp-topic { display: none; }
/* 選單 */
.topic-cards { display: flex; gap: 28px; align-items: stretch; justify-content: center; width: 1120px; }
.btn.topic-zone { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 260px; padding: 26px 30px;
  border-radius: var(--radius-feature); border: 4px solid #8b5bff; background: linear-gradient(160deg, rgb(42 20 102 / 96%), rgb(10 16 48 / 96%)); }
.btn.topic-zone.main { flex: 1.3; border-color: #ff4f9a; box-shadow: inset 0 0 0 3px rgb(255 248 232 / 18%), 0 12px 30px rgb(255 79 154 / 25%); }
.topic-zone .tz-kicker { font: 700 22px/1.2 var(--font-zh-body); letter-spacing: 2px; color: #5ff0ff; }
.topic-zone b { font-size: 56px; font-weight: 900; line-height: 1.15; }
.topic-zone.sub b { font-size: 48px; }
.topic-zone small { font-size: 24px; font-weight: 700; color: #d6dcff; }
.topic-zone.pick { box-shadow: 0 0 0 4px var(--pengpi-amber), 0 0 28px 6px rgb(255 200 87 / 70%); }
.topic-zone:disabled { opacity: .45; cursor: not-allowed; }
/* 主題專區成績單：紅色主按鈕（再挑戰 10 題，或題庫出完後的接著看今日節目）排在最前面 */
#stage.topic-mode .report-buttons .btn.red { order: -1; }

/* 成績單下方的回饋連結：一行小字 */
.feedback-line { margin: -4px 0 0; text-align: center; font-size: 19px; }
.feedback-line .linkish { color: var(--pengpi-muted); }
.feedback-line .btn { color: var(--pengpi-ivory); }
/* 回饋表單（js/ops.js 產生）：蓋在舞台最上層 */
.ops-overlay { position: absolute; inset: 0; z-index: 40; display: flex; align-items: center; justify-content: center; background: var(--pengpi-scrim); }
.ops-box { width: 1000px; padding: 30px 44px 28px; display: flex; flex-direction: column; gap: 14px; font-family: var(--font-zh-body); color: var(--pengpi-ivory);
  border-radius: var(--radius-feature); background: rgb(5 10 22 / 98%); border: 4px solid var(--pengpi-cyan); box-shadow: 0 30px 70px var(--pengpi-shadow); }
.ops-box h2 { margin: 0; font-size: 38px; color: var(--pengpi-ivory); }
.ops-kinds { border: 0; margin: 0; padding: 0; display: flex; gap: 14px; flex-wrap: wrap; }
.ops-kinds legend { font-size: 22px; color: var(--pengpi-muted); margin-bottom: 8px; padding: 0; }
.ops-kind { cursor: pointer; }
.ops-kind input { position: absolute; opacity: 0; pointer-events: none; }
.ops-kind span { display: inline-block; font-size: 25px; font-weight: 700; padding: 8px 20px; border-radius: var(--radius-control); background: var(--pengpi-panel-raised); border: 2px solid var(--pengpi-slate); }
.ops-kind input:checked + span { background: var(--pengpi-cyan); color: var(--pengpi-ink); border-color: var(--pengpi-cyan); }
.ops-kind input:focus-visible + span { outline: 4px solid var(--pengpi-focus); outline-offset: 3px; }
.ops-field { display: flex; flex-direction: column; gap: 6px; font-size: 22px; color: var(--pengpi-muted); position: relative; }
.ops-field textarea, .ops-field input { font: 700 25px/1.45 var(--font-zh-body); color: var(--pengpi-ink); background: var(--pengpi-ivory); border: 2px solid var(--pengpi-slate);
  border-radius: var(--radius-control); padding: 10px 14px; resize: none; }
.ops-field textarea:focus, .ops-field input:focus { outline: none; border-color: var(--pengpi-cyan); box-shadow: 0 0 0 3px rgb(40 217 255 / 40%); }
.ops-count { position: absolute; right: 12px; bottom: 10px; font-size: 18px; color: #6b6b75; }
.ops-auto { margin: 0; font-size: 18px; color: var(--pengpi-muted); line-height: 1.5; }
.ops-status { margin: 0; min-height: 30px; font-size: 22px; font-weight: 700; color: var(--pengpi-muted); }
.ops-status[data-state="ok"] { color: var(--pengpi-green); } .ops-status[data-state="error"] { color: var(--pengpi-coral); }
.ops-buttons { display: flex; gap: 24px; justify-content: center; }
.ops-field textarea, .ops-field input { user-select: text; -webkit-user-select: text; }
.ops-box.sent .ops-kinds, .ops-box.sent .ops-field, .ops-box.sent .ops-auto { opacity: .5; }

/* ---------- 手機版面（body.layout-phone；負責人 2026-10-10 定案，DECISIONS 第 99 條）----------
   手機橫放（高度 ≤ 500）或 App 內建瀏覽器轉 90 度時由 js/game.js fitStage 加上 .layout-phone：
   舞台固定縮 0.4 倍、長寬跟著手機畫面（--sw／--sh 是舞台寬高，單位 px，例如 iPhone Safari 橫放 1875×855、FB 轉向 1648×983），
   所以這段的舞台座標 × 0.4 ＝ 手機上的真實大小。
   手機標準（設計規格）：內文 ≥ 40（16px）、題目 ≥ 50（20px）、小字 ≥ 38（14px；最窄的手機會縮到 0.373 倍，仍有 14px）；觸控 ≥ 120（48px）、主按鈕與答案 ≥ 140～160（56～64px）。
   位置一律從左右、上下邊緣算（不同手機長寬不同），不寫死 1920×1080 的座標。
   美術（攝影棚、主持人、觀眾）照比例縮放；手機上收起次要資訊：ON AIR、APPLAUSE、跑馬燈、字幕條、作答時的 logo、選舉專區名稱牌 */
.layout-phone #stage { --hk: min(calc(var(--sh) / 635), calc(var(--sw) / 1320)); background-size: cover; background-position: 50% 50%; }
.layout-phone #hud { width: 100%; }
.layout-phone #audience { width: 100%; height: 100%; }
.layout-phone #audience, .layout-phone #stage[data-screen="title"] #audience { --aud-s: .57; --aud-b: 0px; }
.layout-phone #wipe { grid-template-columns: repeat(16, 1fr); grid-template-rows: repeat(9, 1fr); }
.layout-phone :is(#onair, #applause, #marquee, #lower-third) { display: none !important; }

/* logo bug：只留頭像與「碰皮今夜秀」；作答、成績單時收起（左上換成節目牌與求救） */
.layout-phone :is(.hud-logo, #brand-bug) { width: 340px; height: 100px; top: 14px; left: 30px; }
.layout-phone #brand-bug.pp-logo { max-width: 350px; padding: 6px 14px 6px 6px; gap: 10px; }
.layout-phone .pp-logo-icon { width: 86px; height: 79px; }
.layout-phone .pp-logo-en { display: none; }
.layout-phone .pp-logo-zh { font-size: 44px; letter-spacing: 0; }
.layout-phone #stage:is(:has(> #hud:not([hidden])), .result-mode) #brand-bug { display: none; }

/* 右上圖示鈕（離開、靜音）：120×120（48px） */
.layout-phone #corner-btns { right: 24px; bottom: auto; top: 18px; }
.layout-phone .btn.icon-btn { width: 120px; height: 120px; font-size: 52px; }
.layout-phone .toast { top: 400px; max-width: calc(var(--sw) * 1px - 80px); white-space: normal; text-align: center; font-size: 42px; line-height: 1.4; }
.layout-phone #turnstile-box { bottom: 160px; transform: translateX(-50%) scale(2.5); }

/* ---------- 首頁 ----------
   攝影棚整組放大（像鏡頭推近黑皮），以主播桌為中心；--hk 依舞台高度與寬度取較小的倍率（約 1.25～1.7），大螢幕不撞到左右的燈牌。
   主播桌上的字在放大後的攝影棚裡，真實大小 ＝ 字級 × --hk × 0.4，所以字級訂在 28～32 以上（≥ 14px） */
.layout-phone .home-scene { transform: translate(calc(var(--sw) * .5px - 965px * var(--hk)), calc(-115px * var(--hk))) scale(var(--hk)); }
.layout-phone .tv-kicker { font-size: 34px; }
/* 「✓ 今日已收看」「上次還沒看完」：字放大後排成兩行，仍在黑皮頭部左邊 */
.layout-phone .tv-status { top: 192px; }
.layout-phone .tv-status > span { max-width: 152px; font-size: 30px; line-height: 1.2; text-align: center; }
.layout-phone .tv-board .tb-score { font-size: 28px; }
.layout-phone .desk-btns { left: 660px; top: 590px; width: 610px; height: 150px; }
.layout-phone .btn.desk-btn { flex-basis: 250px; }
.layout-phone .desk-label { font-size: 34px; }
.layout-phone .desk-main { font-size: min(36px, calc(230px / var(--n, 5))); }
.layout-phone .desk-btn.red .desk-main { font-size: min(56px, calc(330px / var(--n, 5))); }
.layout-phone .desk-sub { display: none; }
.layout-phone .desk-btn .beta-tag { font-size: 28px; padding: 4px 10px; top: -22px; }
.layout-phone .pop-menu .btn { min-height: 100px; font-size: 32px; }
.layout-phone .rec-menu { width: 420px; }
/* 碰碰：站在主播桌右側 */
.layout-phone #stage[data-screen="title"] #host-pengpeng { left: auto; right: 60px; bottom: 50px; width: 400px; --sprite-scale: 1.7; }
.layout-phone #stage[data-screen="title"] #corner-btns { left: 30px; right: auto; top: 300px; }
/* 首頁提示訊息：放在大螢幕下緣、主播桌上方，不蓋桌上的按鈕 */
.layout-phone #stage[data-screen="title"] .toast { top: calc((590px - 115px) * var(--hk) - 140px); }
/* 右上「更多」與面板（面板太長時在面板內捲動） */
.layout-phone .btn.more-btn { right: 30px; top: 14px; height: 134px; min-height: 134px; padding: 0 36px; font-size: 46px; }
.layout-phone .more-panel { right: 30px; top: 160px; width: 700px; max-height: calc(var(--sh) * 1px - 190px); overflow-y: auto; gap: 14px; padding: 22px; }
.layout-phone .more-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
/* 6 個項目剛好兩欄三列（加了「常見問題」後，回報問題不再獨占一列，面板高度不變） */
.layout-phone .more-panel .btn { min-height: 130px; font-size: 44px; }
.layout-phone .more-panel .streak-chip, .layout-phone .more-panel .streak-chip small { font-size: 40px; }
/* 條款、隱私：整列 120 高，兩個連結各自好點 */
.layout-phone .more-legal { display: flex; align-items: center; gap: 30px; min-height: 120px; font-size: 40px; }
.layout-phone .more-legal .linkish { display: inline-flex; align-items: center; justify-content: center; min-width: 140px; min-height: 120px; padding: 0 24px; font-size: 40px; }
.layout-phone .pop-menu .btn.more-classic { min-height: 134px; padding: 10px 26px; }
.layout-phone .more-classic .mc-name { font-size: 44px; } .layout-phone .more-classic .mc-tag { font-size: 38px; }
.layout-phone .home-foot { display: none; }
/* 兩塊看板縮成小燈牌（左上「2026 選舉專區」、右上「★ 贊助」），點了展開成浮層，一次只展開一塊 */
.layout-phone .home-lamp { display: flex; align-items: center; justify-content: center; position: absolute; z-index: 9; min-height: 134px; padding: 0 32px; border-radius: 20px;
  font-family: var(--font-zh-body); font-size: 44px; font-weight: 900; cursor: pointer; white-space: nowrap; box-shadow: 0 8px 20px var(--pengpi-shadow); }
.layout-phone .home-lamp[hidden] { display: none; }
.layout-phone .lamp-elec { left: 30px; top: 140px; color: #0b1a33; background: linear-gradient(180deg, #ffffff, #e3f4fa); border: 4px solid var(--pengpi-cyan); }
.layout-phone .lamp-sponsor { right: 30px; top: 166px; color: var(--pengpi-ink); background: linear-gradient(180deg, #ffd977, #f0b23a); border: 4px solid #fff0b8; }
.layout-phone .home-lamp[aria-expanded="true"] { box-shadow: 0 0 0 6px var(--pengpi-focus); }
.layout-phone .home-board { display: none; }
/* 展開的浮層：放在主播桌上方，遮罩也只蓋到桌面，不蓋桌上的紅色主按鈕 */
.layout-phone .home-board.open { display: flex; position: absolute; left: 0; right: 0; top: 24px; margin: 0 auto; z-index: 14; }
.layout-phone .home-scrim:not([hidden]) { display: block; position: absolute; left: 0; top: 0; width: 100%; height: calc((580px - 115px) * var(--hk)); z-index: 13; background: rgb(2 5 13 / 62%); }
.layout-phone .home-board.open .board-close { display: flex; align-items: center; justify-content: center; position: absolute; right: 18px; top: 18px; z-index: 2; width: 124px; height: 124px;
  padding: 0; border-radius: 18px; font-size: 52px; font-weight: 900; cursor: pointer; background: rgb(5 10 22 / 92%); color: var(--pengpi-ivory); border: 3px solid var(--pengpi-slate); }
.layout-phone .elec-wrap.open, .layout-phone .sponsor-board.open { width: min(980px, calc(var(--sw) * 1px - 60px)); height: calc((580px - 115px) * var(--hk) - 40px); }
.layout-phone .elec-board { gap: 14px; padding: 32px 44px 30px; }
.layout-phone .eb-tag { font-size: 40px; padding: 4px 18px; }
.layout-phone .eb-kicker { font-size: 38px; }
.layout-phone .eb-title { font-size: 88px; }
.layout-phone .eb-rule { height: 10px; }
.layout-phone .eb-sub { font-size: 48px; }
.layout-phone .eb-go { font-size: 54px; min-height: 140px; display: flex; align-items: center; justify-content: center; }
.layout-phone .sponsor-board.open { padding: 36px 60px 36px; gap: 8px; }
.layout-phone .sb-kicker { font-size: 38px; } .layout-phone .sb-title { font-size: 60px; } .layout-phone .sb-thanks { font-size: 38px; }
.layout-phone .sb-names { font-size: 44px; line-height: 1.3; } .layout-phone .sb-empty { font-size: 44px; }
.layout-phone .sponsor-board:not(.scrolling) .sb-names { display: grid; grid-template-columns: 1fr 1fr; column-gap: 40px; }
.layout-phone .btn.sb-join { min-height: 140px; font-size: 50px; }
.layout-phone .recruit-tag { font-size: 38px; padding: 2px 14px; top: -26px; }
.layout-phone .btn.friend-link { left: 30px; right: auto; top: 460px; margin: 0; min-height: 134px; padding: 0 30px; font-size: 42px; }

/* ---------- 作答 ----------
   上列（高 120）：左「節目牌＋求救」、右「分數＋COMBO＋離開／靜音」。
   題卡在左（左 30、右留 470 給主持人欄）、上 152、下留 140 給底部字幕條；選項 2×2 填滿題幹下方到題卡底；
   右欄只放黑皮（第 2 段現場連線時改放連線視窗）；台詞改成底部字幕條 */
.layout-phone .hud-plate { left: 30px; top: 18px; height: 120px; font-size: 44px; padding: 0 28px; }
.layout-phone .hud-progress { display: none; }
.layout-phone .hud-score { left: auto; right: 300px; top: 18px; width: auto; min-width: 330px; height: 120px; flex-direction: row; align-items: center; justify-content: center; gap: 18px; padding: 0 26px; }
.layout-phone .hud-score .px.small { font-size: 30px; } .layout-phone #score { font-size: 56px; }
/* COMBO 緊貼在分數框左邊：分數框寬度跟著字走（像素字很寬），所以 COMBO 改成上下兩行的窄框，位置由 js/game.js 量分數框後設定（--combo-r），不會壓到分數（負責人 2026-10-12 實機） */
.layout-phone #combo { left: auto; right: calc(var(--combo-r, 800) * 1px); top: 18px; width: 190px; height: 120px; flex-direction: column; gap: 6px; }
.layout-phone #combo .combo-label { font-size: 28px; } .layout-phone #combo .combo-n { font-size: 50px; }
.layout-phone #btn-help { left: 330px; right: auto; top: 18px; min-height: 120px; padding: 0 24px; font-size: 38px; z-index: 8; }
.layout-phone .qcard-frame { left: 30px; right: 470px; top: 152px; bottom: 128px; width: auto; height: auto; }
.layout-phone .hud-left { left: 66px; top: 168px; height: 64px; font-size: 40px; max-width: calc(var(--sw) * 1px - 1020px); }
.layout-phone .hud-q { left: auto; right: 716px; top: 168px; width: 200px; height: 64px; font-size: 42px; }
.layout-phone #timer { left: 66px; right: 506px; width: auto; top: 250px; height: 14px; }
.layout-phone #timer-num { top: -82px; height: 64px; font-size: 42px; } .layout-phone #timer-num::after { font-size: 40px; }
.layout-phone .qcard { left: 36px; right: 36px; top: 112px; width: auto; height: 124px; padding: 0 12px; }
.layout-phone :is(.qtext, .qtext[data-len]) { font-size: 60px; line-height: 1.2; }
.layout-phone .qtext[data-len="l"] { font-size: 54px; } .layout-phone .qtext[data-len="xl"] { font-size: 50px; }
.layout-phone .q-credit { display: none; }
.layout-phone #options { left: 66px; right: 506px; top: 400px; bottom: 144px; width: auto; grid-template-rows: 1fr 1fr; gap: 18px 28px; }
.layout-phone #options:not(:has(> :nth-child(3))) { grid-template-rows: 1fr; top: auto; bottom: calc((var(--sh) * 1px - 544px - 200px) / 2 + 144px); height: 200px; }
.layout-phone .opt { height: auto; min-height: 120px; font-size: 50px; line-height: 1.15; padding-left: 140px; }
.layout-phone .opt .key { width: 100px; font-size: 52px; }
.layout-phone #options.tf .opt .key { font-size: 60px; }
.layout-phone :is(.opt.right, .opt.wrong)::after { font-size: 38px; line-height: 48px; top: -30px; }
/* 解說面板：答完後段落牌、題號、倒數條收起，題幹移到題卡頂端（上 166～270），面板接在下方到題卡底；
   「下一題」黏在面板底部，解說太長時在中間捲動（iPhone SE 橫放舞台只有 750 高，這樣解說仍有 2 行以上） */
.layout-phone #explain { left: 66px; right: 506px; top: 282px; bottom: 144px; width: auto; max-height: none; gap: 12px; padding: 16px 28px 0; --pop-x: -230; --pop-y: 300; }
.layout-phone #stage:is(.election-mode, .topic-mode) #explain { max-height: none; }
.layout-phone .explain-head { top: -16px; margin-top: -16px; padding-top: 16px; }
.layout-phone .verdict { font-size: 54px; } .layout-phone .verdict .pts { font-size: 42px; }
.layout-phone .answer-line { font-size: 40px; } .layout-phone .explain-text { font-size: 40px; line-height: 1.45; }
.layout-phone .explain-actions { position: sticky; bottom: 0; z-index: 1; margin-top: auto; padding: 8px 0 12px; background: var(--pengpi-panel); }
.layout-phone #explain .btn { min-height: 120px; font-size: 42px; }
.layout-phone #explain #btn-next { min-height: 132px; font-size: 48px; padding: 0 56px; }
.layout-phone #explain.with-pop .explain-text { max-width: none; }
.layout-phone #stage:has(#explain:not([hidden])) :is(.hud-left, #hud-q, #timer) { display: none; }
.layout-phone #screen-question:has(> #explain:not([hidden])) .qcard { top: 14px; height: 104px; }
.layout-phone #screen-question:has(> #explain:not([hidden])) .qtext[data-len] { font-size: 44px; line-height: 1.18; }
.layout-phone #screen-question:has(> #explain:not([hidden])) .qtext[data-len="xl"] { font-size: 40px; }
.layout-phone #report-box { flex-wrap: wrap; } .layout-phone :is(#report-box, #report-box select) { font-size: 40px; }
.layout-phone #report-box select { min-height: 120px; }
/* 主持人：右欄只留黑皮；台詞是底部字幕條 */
.layout-phone #stage:has(> #hud:not([hidden])) #host-heipi { left: auto; right: 20px; bottom: 150px; width: 420px; --sprite-scale: 1.45; }
.layout-phone #stage:has(> #hud:not([hidden])) #host-heipi .actor { --dir: -1; }
.layout-phone #stage:not(.live-mode):has(> #hud:not([hidden])) #host-pengpeng .actor { display: none; }
.layout-phone #stage.live-mode #host-heipi .actor { display: none; }
.layout-phone #live-window { left: auto; right: 20px; top: 152px; width: 420px; height: calc(var(--sh) * 1px - 310px); }
.layout-phone :is(.bubble, .host.right .bubble, #stage.live-mode #host-pengpeng .bubble, #stage.election-mode .host .bubble) {
  position: fixed; left: 30px; right: 30px; top: auto; bottom: 12px; width: auto; min-height: 104px; display: flex; align-items: center; gap: 18px;
  padding: 8px 36px; border-radius: 0; border: 0; border-left: 16px solid var(--pengpi-cyan); background: rgb(5 10 22 / 96%); font-size: 40px; line-height: 1.3; }
.layout-phone .bubble::before { display: inline; margin: 0; font-size: 40px; flex: none; }
.layout-phone #bubble-heipi::before { content: "黑皮："; } .layout-phone #bubble-pengpeng::before { content: "碰碰："; }
.layout-phone #bubble-pengpeng { border-left-color: var(--pengpi-amber); }
.layout-phone #stage.live-mode #host-pengpeng { top: auto; }

/* 特效、字卡、疊加視窗（寬度不超過舞台、太高時在框內捲動） */
.layout-phone .fx-pop.fx-score { min-width: 400px; font-size: 44px; } .layout-phone .fx-row .lbl { font-size: 42px; } .layout-phone .fx-row.total .px { font-size: 70px; }
.layout-phone .segment-card { min-width: 0; width: min(1400px, calc(var(--sw) * 1px - 80px)); padding: 36px 48px 40px; }
.layout-phone .seg-no { font-size: 44px; } .layout-phone .segment-name { font-size: 104px; }
.layout-phone #intro-card { left: 40px; right: 40px; top: 160px; width: auto; max-width: 1400px; margin: 0 auto; }
.layout-phone #intro-card .intro-kicker { font-size: 38px; } .layout-phone #intro-card .intro-date { font-size: 52px; }
.layout-phone #intro-card .intro-ep { font-size: 80px; } .layout-phone #intro-card .intro-sub { font-size: 40px; }
.layout-phone .shout-title { font-size: 64px; } .layout-phone .shout-num { font-size: 110px; }
.layout-phone .overlay > :is(.genius-box, .exit-box) { max-width: calc(var(--sw) * 1px - 60px); max-height: calc(var(--sh) * 1px - 40px); overflow-y: auto; padding: 32px 44px; }
.layout-phone .genius-title { font-size: 90px; margin-bottom: 20px; }
.layout-phone .genius-btn { width: min(760px, calc((var(--sw) * 1px - 240px) / 2)); min-height: 280px; } .layout-phone .genius-btn b { font-size: 76px; } .layout-phone .genius-btn span { font-size: 40px; }
.layout-phone .exit-box { width: min(1600px, calc(var(--sw) * 1px - 60px)); }
.layout-phone .exit-title { font-size: 68px; } .layout-phone .exit-box p { font-size: 42px; } .layout-phone .exit-buttons .btn { min-height: 150px; font-size: 50px; padding: 0 48px; }
.layout-phone #overlay-exit { background: rgb(2 5 13 / 96%); }
.layout-phone .friend-box { padding: 24px 44px; } .layout-phone .friend-img { width: min(900px, 100%); margin-bottom: 12px; }
.layout-phone .friend-box .exit-title { font-size: 56px; margin-bottom: 8px; } .layout-phone .friend-box p { margin-bottom: 14px; }
.layout-phone #overlay-fb p { font-size: 42px; } .layout-phone #overlay-fb small { font-size: 38px; }

/* ---------- 成績單：大卡在左（右欄黑皮），內容在卡內捲動；主行動（分享）緊接在成績下面 ---------- */
.layout-phone .report { left: 30px; right: 470px; top: 24px; bottom: 24px; width: auto; max-height: none; padding: 26px 40px; gap: 20px; }
.layout-phone .report > * { flex: none; }
/* 「今晚節目成績單」小標收起（日期與主題那行已經說明是哪一集） */
.layout-phone .rh-kicker { display: none; } .layout-phone #report-ep { font-size: 40px; text-align: left; }
.layout-phone .rc-frame { width: 132px; height: 132px; } .layout-phone .rc-frame img { height: 214px; margin-top: 6px; }
.layout-phone .rc-text b { font-size: 44px; } .layout-phone .rc-text small { font-size: 38px; }
.layout-phone .report-title { font-size: 76px; }
.layout-phone .stamp { width: 132px; height: 132px; } .layout-phone .stamp .px { font-size: 68px; } .layout-phone .stamp small { font-size: 38px; }
.layout-phone .report-correct { font-size: 64px; } .layout-phone .score-label { font-size: 38px; } .layout-phone .report-score { font-size: 60px; }
.layout-phone .report-replay { font-size: 40px; }
.layout-phone .report-grid { flex-wrap: wrap; }
.layout-phone .report-grid span { width: 80px; height: 80px; font-size: 46px; }
.layout-phone .report-grid .g-genius::after { font-size: 38px; top: -24px; }
.layout-phone .side-label { font-size: 38px; } .layout-phone .report-bonus { flex-wrap: wrap; } .layout-phone .report-bonus .bonus-val { font-size: 42px; }
.layout-phone :is(.report-wrongline, .note) { font-size: 40px; } .layout-phone .note .side-label { font-size: 38px; }
.layout-phone .report-notes { grid-template-columns: 1fr; }
/* 第一屏：稱號、10 格、答對與分數，接著就是分享按鈕；最荒謬的答錯、加分明細、明日預告等往下捲
   （.paper 改成 display: contents，讓成績單各列和按鈕列一起排序） */
.layout-phone .paper { display: contents; }
.layout-phone .report > * { order: 9; }
.layout-phone .report-head { order: 0; } .layout-phone .report-hero { order: 1; } .layout-phone .report-grid { order: 2; }
.layout-phone .report-scoreline { order: 3; } .layout-phone .report > .report-buttons { order: 4; }
.layout-phone .report-wrongline { order: 5; } .layout-phone .report-bonus { order: 6; }
.layout-phone .report-buttons { flex-wrap: wrap; gap: 18px; }
.layout-phone .report-buttons .btn { min-height: 140px; min-width: 0; font-size: 42px; padding: 10px 24px; white-space: nowrap; }
.layout-phone .report-buttons #btn-share { min-width: 0; padding: 10px 36px; }
.layout-phone :is(.feedback-line, .feedback-line .linkish, .support-line, .waitlist-line, #email-line, #result-extras) { font-size: 40px; }
.layout-phone :is(.feedback-line, .support-line, .waitlist-line) .linkish { display: inline-flex; align-items: center; min-height: 120px; }
.layout-phone .support-line .dim { font-size: 38px; }
.layout-phone :is(#result-extras input, #waitlist-form input, #email-input) { font-size: 42px; padding: 14px 18px; width: min(640px, 100%); }
.layout-phone #initials { width: 220px; }
.layout-phone .report .btn.small { min-height: 124px; font-size: 42px; }
.layout-phone #email-form { flex-wrap: wrap; justify-content: center; }
.layout-phone #stage.result-mode #host-heipi { left: auto; right: 20px; bottom: 40px; width: 420px; --sprite-scale: 1.45; }
.layout-phone #stage.result-mode:not(.live-mode) #host-pengpeng .actor { display: none; }
/* 分享面板：鋪滿舞台、可捲動；標題與「關閉」黏在上方 */
.layout-phone #share-panel { left: 30px; right: 30px; top: 24px; bottom: 24px; width: auto; transform: none; overflow-y: auto; align-content: start; gap: 22px; padding: 0 40px 30px; }
.layout-phone #share-panel .share-title { grid-column: 1 / 3; grid-row: 1; position: sticky; top: 0; z-index: 2; align-self: stretch; display: flex; align-items: center;
  justify-content: flex-start; min-height: 150px; padding-top: 10px; font-size: 54px; background: rgb(5 10 22 / 98%); text-align: left; }
.layout-phone #share-panel #share-close { grid-column: 3; grid-row: 1; justify-self: end; align-self: center; position: sticky; top: 14px; z-index: 3; min-width: 260px; min-height: 124px; }
.layout-phone #share-panel .btn { min-height: 150px; font-size: 44px; } .layout-phone #share-panel small { font-size: 38px; }
.layout-phone #share-panel .btn.red small { color: rgb(255 248 232 / 88%); }
.layout-phone #share-panel .share-preview pre { font-size: 38px; } .layout-phone #share-panel .share-preview img { width: 520px; height: 273px; }
.layout-phone #share-panel .share-status { font-size: 40px; min-height: 0; }

/* 付款完成感謝頁：卡片加寬、字放大，主持人只留底部字幕 */
.layout-phone #screen-thanks { padding-top: 24px; overflow-y: auto; }
.layout-phone .thanks-card { width: min(1460px, calc(var(--sw) * 1px - 60px)); padding: 24px 48px 28px; }
.layout-phone .thanks-title { font-size: 72px; margin-bottom: 8px; } .layout-phone .thanks-main { font-size: 42px; margin-bottom: 6px; }
.layout-phone .thanks-status { font-size: 40px; margin-bottom: 10px; min-height: 0; }
.layout-phone .thanks-note { font-size: 38px; margin-bottom: 14px; line-height: 1.4; }
.layout-phone #btn-thanks-home { min-height: 150px; font-size: 48px; }
.layout-phone #stage[data-screen="thanks"] .host .actor { display: none; }
.layout-phone #stage[data-screen="thanks"] #brand-bug { display: none; }
.layout-phone .board-form { max-width: none; flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 10px 24px; padding: 14px 30px; margin-bottom: 14px; }
.layout-phone :is(.bf-label, .bf-check, .bf-note, .bf-status) { font-size: 40px; }
.layout-phone :is(.bf-note, .bf-status) { flex-basis: 100%; text-align: center; }
.layout-phone .bf-check { min-height: 120px; }
.layout-phone :is(#thanks-board-name, #rec-board-name) { width: 440px; font-size: 42px; padding: 18px 20px; }
.layout-phone .bf-check input { width: 56px; height: 56px; }
.layout-phone .board-form .btn.small { min-height: 124px; font-size: 44px; }

/* ---------- 資訊頁（節目表、排行榜、我的紀錄、關於、支持節目、選舉選單）：整頁捲動、「回到片頭」黏在底部 ---------- */
.layout-phone :is(#screen-schedule, #screen-board, #screen-about, #screen-records, #screen-support, :is(#screen-election, #screen-topics)) {
  overflow-y: auto; overscroll-behavior: contain; justify-content: flex-start; padding: 30px 40px 60px !important; gap: 26px !important; scrollbar-width: none; }
.layout-phone :is(#screen-schedule, #screen-board, #screen-about, #screen-records, #screen-support, :is(#screen-election, #screen-topics)) > * { flex: none; }
/* 「回到片頭」固定在左上角（手機常見的返回位置，捲動時一直在，不蓋內容；右上是靜音鈕） */
.layout-phone :is(#screen-schedule, #screen-board, #screen-about, #screen-records, #screen-support, :is(#screen-election, #screen-topics)) > .btn:last-child {
  position: fixed; left: 30px; top: 18px; z-index: 12; min-width: 0; min-height: 120px; margin: 0; padding: 0 36px 0 28px; font-size: 42px;
  background: rgb(5 10 22 / 94%); box-shadow: 0 10px 30px var(--pengpi-shadow); }
.layout-phone :is(#screen-schedule, #screen-board, #screen-about, #screen-records, #screen-support, :is(#screen-election, #screen-topics)) > .btn:last-child::before { content: "‹ "; font-size: 52px; line-height: 0; }
.layout-phone .screen-title { font-size: 68px; } .layout-phone .screen-kicker { font-size: 38px; }
.layout-phone :is(#screen-schedule, #screen-board, #screen-about, #screen-records, #screen-support, :is(#screen-election, #screen-topics)) .btn { min-height: 130px; font-size: 44px; }
/* 節目表 */
.layout-phone #schedule-list { width: 100%; max-width: 1600px; max-height: none; overflow: visible; padding: 0; gap: 18px; }
.layout-phone .ep-row { grid-template-columns: 1fr auto auto; gap: 24px; min-height: 150px; padding: 10px 24px 10px 32px; font-size: 42px; }
.layout-phone .ep-row .ep-done { font-size: 38px; }
.layout-phone .ep-row .btn { min-width: 200px; }
/* 排行榜 */
.layout-phone #screen-board { padding-top: 30px !important; }
.layout-phone #board-list { width: 100%; max-width: 1400px; max-height: none; overflow: visible; padding: 0; gap: 12px; }
.layout-phone #board-list li { font-size: 44px; padding: 18px 32px; }
.layout-phone .board-note { font-size: 40px; }
/* 關於 */
.layout-phone .about { width: 100%; max-width: 1640px; padding: 30px 44px; font-size: 40px; line-height: 1.6; }
.layout-phone #screen-about .about { max-height: none; overflow: visible; }
.layout-phone .about h2 { font-size: 60px; } .layout-phone .about h3 { font-size: 46px; margin-top: 26px; }
.layout-phone .about .btn.small { min-height: 120px; }
/* 我的紀錄：上排三個數字＋月曆（放不下就換行）、成績清單兩行一筆 */
.layout-phone .records-top { flex-wrap: wrap; justify-content: center; gap: 20px; max-width: 100%; }
.layout-phone .rec-stat { padding: 16px 36px; } .layout-phone .rec-stat b { font-size: 84px; } .layout-phone .rec-stat small { font-size: 38px; }
.layout-phone .rec-cal { grid-template-columns: repeat(7, 84px); gap: 8px; padding: 16px; }
.layout-phone .rec-cal span { height: 70px; font-size: 38px; border-radius: 10px; }
.layout-phone .rec-list { width: 100%; max-width: 1600px; max-height: none; overflow: visible; gap: 14px; }
.layout-phone .rec-row { grid-template-columns: auto 1fr auto; grid-template-areas: "d t g" "m m s"; gap: 6px 24px; padding: 16px 28px; font-size: 40px; }
.layout-phone .rec-row > :nth-child(1) { grid-area: d; color: var(--pengpi-muted); } .layout-phone .rec-row > :nth-child(2) { grid-area: t; }
.layout-phone .rec-row > :nth-child(3) { grid-area: m; } .layout-phone .rec-row > :nth-child(4) { grid-area: g; }
.layout-phone .rec-row > :nth-child(5) { grid-area: s; justify-self: end; }
.layout-phone .rec-row .rec-grade { font-size: 48px; } .layout-phone .rec-row .rec-grid { font-size: 38px; } .layout-phone .rec-row .rec-tag { font-size: 38px; }
.layout-phone .rec-empty { font-size: 40px; padding: 36px; }
.layout-phone .rec-account { max-width: 1600px; gap: 20px; padding: 20px 30px; font-size: 40px; }
.layout-phone .rec-account form { flex-wrap: wrap; justify-content: center; }
.layout-phone .rec-account input { font-size: 42px; padding: 14px 18px; width: min(640px, 100%); }
.layout-phone .rec-account .linkish { display: inline-flex; align-items: center; min-height: 120px; font-size: 40px; }
.layout-phone .rec-account .btn.small, .layout-phone .board-form.rec-board .btn.small { min-height: 124px; font-size: 42px; }
.layout-phone .board-form.rec-board { max-width: 1600px; }
/* 支持節目：兩張卡改成上下排；方案與飲料按鈕 ≥ 64px；同意勾選框 56px、整列可點 */
.layout-phone #screen-support { padding-top: 30px !important; gap: 26px !important; }
.layout-phone .support-cards { flex-direction: column; gap: 26px; width: 100%; max-width: 1600px; }
.layout-phone :is(.support-card.main, .support-card:not(.main)) { width: auto; padding: 30px 44px 34px; }
.layout-phone .support-card:not(.main) .tip-row { flex-direction: row; }
.layout-phone .support-card h3 { font-size: 54px; margin-bottom: 12px; }
.layout-phone .support-lead { font-size: 42px; margin-bottom: 16px; }
.layout-phone .perk-list { font-size: 38px; line-height: 1.45; gap: 12px; margin-bottom: 18px; }
.layout-phone .perk-list li { padding-left: 52px; }
.layout-phone .perk-list i { font-size: 38px; padding: 2px 14px; margin-left: 12px; border-radius: 10px; }
.layout-phone .support-fine { font-size: 38px; line-height: 1.5; margin-bottom: 20px; }
.layout-phone .support-agree { align-items: center; gap: 24px; min-height: 120px; margin-bottom: 20px; padding: 12px 20px; font-size: 40px; border-radius: 16px;
  background: rgb(255 248 232 / 6%); border: 2px solid rgb(101 120 159 / 55%); }
.layout-phone .support-agree input { width: 60px; height: 60px; margin: 0; }
.layout-phone .support-test { font-size: 38px; padding: 10px 24px; }
.layout-phone .support-status { font-size: 40px; min-height: 0; }
.layout-phone .plan-row { gap: 26px; margin-top: 30px; }
.layout-phone .btn.plan { min-height: 190px; padding-top: 34px; } .layout-phone .btn.plan b { font-size: 54px; } .layout-phone .btn.plan small { font-size: 38px; }
.layout-phone .plan-tag { font-size: 38px; padding: 4px 18px; top: -28px; border-radius: 10px; }
.layout-phone .tip-row { gap: 24px; margin-top: 20px; }
.layout-phone .btn.tip { min-height: 180px; } .layout-phone .btn.tip b { font-size: 52px; } .layout-phone .btn.tip small { font-size: 38px; }
/* 選舉選單 */
.layout-phone .elec-group { width: 100%; max-width: 1600px; padding: 24px 40px 30px; }
.layout-phone .elec-group h3 { font-size: 44px; margin-bottom: 18px; }
.layout-phone .elec-zone b { font-size: 52px; } .layout-phone :is(.elec-zone small, .elec-note) { font-size: 40px; }
.layout-phone .elec-zone.wide { width: 100%; min-height: 150px; }
.layout-phone .elec-row { gap: 26px; }
.layout-phone .elec-zone.cand { flex: 1; width: auto; height: 200px; } .layout-phone .elec-zone.cand .cand-img { height: 170px; }
.layout-phone .elec-row.cities { flex-wrap: wrap; } .layout-phone .elec-row.cities .elec-zone { flex: 1 0 220px; width: auto; min-height: 130px; font-size: 46px; }
.layout-phone .elec-note { width: 100%; max-width: 1600px; line-height: 1.5; }

/* ---------- 選舉特別報導（手機）：左上只留「選舉特別報導」牌；資料來源移到右欄上方，黑皮在它下方；參選人人物收起 ---------- */
.layout-phone #stage.election-mode .hud-elec { left: 30px; top: 18px; }
.layout-phone .hud-elec-title { height: 120px; padding: 0 28px; font-size: 44px; }
.layout-phone .hud-elec-zone { display: none !important; }
.layout-phone #stage.election-mode:has(> #hud:not([hidden])) #host-heipi { left: auto; right: 20px; bottom: 150px; width: 420px; --sprite-scale: 1.3; }
.layout-phone #stage.election-mode:not(.result-mode) #host-pengpeng .actor { display: none; }
.layout-phone #stage.election-mode #elec-candidate { display: none; }
.layout-phone #stage:is(.election-mode, .topic-mode) .q-source { position: fixed; left: auto; right: 20px; top: 152px; bottom: auto; width: 420px; height: auto; flex-direction: column; align-items: flex-start;
  gap: 4px; padding: 14px 22px; z-index: 7; background: rgb(13 27 56 / 92%); }
.layout-phone .q-source span { font-size: 38px; line-height: 1.35; } .layout-phone .q-source small { font-size: 38px; line-height: 1.35; }
.layout-phone #stage:is(.election-mode, .topic-mode) #options { top: 400px; }
.layout-phone #stage:is(.election-mode, .topic-mode) #options:not(:has(> :nth-child(3))) { top: auto; }
.layout-phone #stage.election-mode .opt { padding-left: 140px; }

/* 主題專區（手機）：首頁用左上燈牌（選舉燈牌往下排、靜音鈕再往下）；選單兩張卡並排；作答時資料時間在右欄上方 */
.layout-phone .topic-board { display: none; }
.layout-phone .lamp-topic { left: 30px; top: 140px; gap: 14px; color: var(--pengpi-ivory); background: linear-gradient(135deg, #5b2bd6, #ff4f9a); border: 4px solid #ffd0e6; }
.layout-phone .lamp-topic i { font: 700 30px/1 var(--font-en-display); font-style: normal; letter-spacing: 1px; color: #12194a; background: #5ff0ff; padding: 6px 12px; border-radius: 8px; }
.layout-phone .lamp-elec { top: 294px; }
.layout-phone #stage[data-screen="title"] #corner-btns { top: auto; bottom: 24px; }
.layout-phone .btn.friend-link { top: 448px; }
.layout-phone .topic-cards { width: 100%; max-width: 1600px; gap: 26px; }
.layout-phone .btn.topic-zone { min-height: 300px; padding: 24px 26px; }
.layout-phone .topic-zone .tz-kicker { font-size: 38px; }
.layout-phone .topic-zone b { font-size: 72px; } .layout-phone .topic-zone.sub b { font-size: 62px; }
.layout-phone .topic-zone small { font-size: 40px; line-height: 1.3; }
.layout-phone #stage.topic-mode:has(> #hud:not([hidden])) #host-heipi { --sprite-scale: 1.3; }
/* 回饋表單 */
.layout-phone .ops-box { width: min(1500px, calc(var(--sw) * 1px - 60px)); max-height: calc(var(--sh) * 1px - 40px); overflow-y: auto; gap: 18px; padding: 28px 40px; }
.layout-phone .ops-box h2 { font-size: 56px; } .layout-phone .ops-kind span { font-size: 40px; padding: 24px 30px; }
.layout-phone :is(.ops-field, .ops-kinds legend) { font-size: 40px; } .layout-phone :is(.ops-field textarea, .ops-field input) { font-size: 42px; }
.layout-phone :is(.ops-auto, .ops-status) { font-size: 38px; } .layout-phone .ops-buttons .btn { font-size: 46px; min-height: 140px; padding: 16px 56px; }
.layout-phone .ops-count { font-size: 38px; }

/* 減少動態：取消位移、縮放、閃爍與自動捲動，保留透明度切換（第 8 節） */
@media (prefers-reduced-motion: reduce) {
  .host img, .host.talk img, .actor, .segment-card, .opt.right, #intro-card, #explain, #score.bump, #timer-num.tickpop,
  #timer.final #timer-cells span, #timer.timeup #timer-num, #screen-question.shake, .paper.printing .print-line, .paper.printing .stamp,
  .waitlist-line, #marquee-text, #wipe i, .fx-pop, .fx-bang, #live-window .live-lights, #audience .crowd, #onair i, #live-window .live-chip i,
  #live-window img, .fx-row, #combo, #combo .combo-label, .lt, .bubble, .tv-slide, .sponsor-board::before, .sponsor-board::after, .sb-names { animation: none !important; }
  /* 贊助名單不自動捲動，名單長時改成可以手動捲 */
  .sponsor-board.scrolling .sb-list { overflow-y: auto; mask-image: none; }
  .sponsor-board.scrolling .sb-names li[aria-hidden="true"] { display: none; }
  .btn, .opt, .elec-board, #applause, #stage::before { transition: opacity 80ms linear !important; }
  .btn:hover:not(:disabled), .opt:hover:not(:disabled), .elec-board:hover { transform: none; }
  #wipe.out { display: none; }
}
