/* 今晚換你主持・樣式（P2 正式美術）
   色票與字型讀 css/full_tokens.css 的設計代碼（與 css/tokens.css 碰皮今夜秀設計系統同名同值；只讀，不改）；這個檔案只給 host.html 用。
   原則（docs/DESIGN_SYSTEM_PENGPI.md 第 7～9 節）：像素角色與場景是內容層（最近鄰縮放、steps() 逐格動畫）；題卡、HUD、按鈕是播出層（高解析、圓角、描邊）。
   版面不整張縮放：根字級依畫面大小在 14～24px 之間（1920×1080 約 24px、844×390 為 14px），尺寸一律用 rem；
   844×390（高度 ≤ 520px）每個畫面都有專用排版（檔案最後的媒體查詢）：字至少 14px、按鈕至少 48px、主按鈕與答題選項至少 64px。
   素材：流程板背景、會議室、同期立繪、結局插圖在 assets/host/web/（輕量 webp），攝影棚 assets/ui/home/，黑皮與碰碰站姿 assets/characters/。 */
html { font-size: clamp(14px, calc(min(100vw, 177.78vh) / 80), 24px); }
html, body { margin: 0; height: 100%; background: var(--pengpi-ink); color: var(--c-text); font-family: var(--font-body); }
body { overflow: hidden; -webkit-text-size-adjust: 100%; }
* { box-sizing: border-box; }
button { font: inherit; color: inherit; }
h2, h3, p { margin: 0; }
img { image-rendering: auto; }
:root { --snd: max(48px, 2.6rem); --neon-cyan: 0 0 .6rem rgb(40 217 255 / 55%); }
/* 安全區（瀏海、圓角、Home 指示條）：統一讀這四個變數（預設 env(safe-area-inset-*)；自動測試覆寫它們模擬有瀏海的手機）。
   ui.js 透過 #sa-probe 的 padding 讀出實際 px，盤面格子與角色一起避開 */
:root { --sa-t: env(safe-area-inset-top, 0px); --sa-r: env(safe-area-inset-right, 0px); --sa-b: env(safe-area-inset-bottom, 0px); --sa-l: env(safe-area-inset-left, 0px); }
#sa-probe { position: fixed; left: 0; top: 0; width: 0; height: 0; overflow: hidden; visibility: hidden; pointer-events: none; padding: var(--sa-t) var(--sa-r) var(--sa-b) var(--sa-l); }

#app { position: fixed; inset: 0; display: grid; grid-template-rows: auto 1fr auto; overflow: hidden; overflow: clip; background: var(--pengpi-midnight); }  /* clip：焦點移到畫面外的元素時整個畫面也不會被捲動 */
#app[data-view="boot"] > * { visibility: hidden; }

/* ---------- 測試版標籤（右下角，很小、不擋點擊）、靜音鈕（右上角） ---------- */
#beta { position: fixed; right: .5rem; bottom: .35rem; z-index: 90; pointer-events: none; padding: 0 .4rem; border-radius: .3rem; font: 700 14px/1.4 var(--font-label);
  letter-spacing: .06em; color: rgb(175 194 232 / 70%); background: rgb(5 10 22 / 55%); border: 1px solid rgb(101 120 159 / 45%); }
#snd { position: fixed; top: .5rem; right: .6rem; z-index: 80; width: var(--snd); height: var(--snd); border-radius: .7rem; border: 2px solid var(--pengpi-slate);
  background: rgb(5 10 22 / 86%); color: var(--pengpi-ivory); display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.snd-ico { display: flex; width: 60%; height: 60%; }
#snd svg { width: 100%; height: 100%; }
#snd .snd-x { display: none; }
#snd[aria-pressed="true"] { color: var(--pengpi-coral); border-color: var(--pengpi-coral); }
#snd[aria-pressed="true"] .snd-x { display: inline; }
#snd[aria-pressed="true"] .snd-wave { display: none; }
#snd:focus-visible { outline: 3px solid var(--c-focus); outline-offset: 2px; }
/* 配音開關：靜音鈕正下方，同樣大小；按下（關閉配音）時變珊瑚色並劃一條斜線 */
#vox { position: fixed; top: calc(.5rem + var(--snd) + .35rem); right: .6rem; z-index: 80; width: var(--snd); height: var(--snd); border-radius: .7rem; border: 2px solid var(--pengpi-slate);
  background: rgb(5 10 22 / 86%); color: var(--pengpi-ivory); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; cursor: pointer; padding: 0; }
.vox-ico { display: flex; width: 42%; height: 42%; }
#vox svg { width: 100%; height: 100%; }
.vox-label { font: 700 max(14px, .55rem)/1 var(--font-label); letter-spacing: 0; margin-top: .05rem; }
#vox .vox-x { display: none; }
#vox[aria-pressed="true"] { color: var(--pengpi-coral); border-color: var(--pengpi-coral); }
#vox[aria-pressed="true"] .vox-x { display: inline; }
#vox[aria-pressed="true"] .vox-dots { display: none; }
#vox:focus-visible { outline: 3px solid var(--c-focus); outline-offset: 2px; }

/* ---------- 按鈕（碰皮今夜秀 6.1：主按鈕珊瑚紅＋象牙白內框；次要深藍＋灰藍描邊） ---------- */
.btn { min-height: max(48px, 2.8rem); min-width: 48px; padding: .3rem 1.1rem; border-radius: var(--radius-control); border: 2px solid var(--pengpi-slate);
  background: var(--pengpi-panel-raised); color: var(--c-text); cursor: pointer; display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
  line-height: 1.2; font-weight: 700; touch-action: manipulation; transition: filter var(--dur-fast, 160ms), transform var(--dur-fast, 160ms); position: relative; }
.btn .btn-main { font-size: 1rem; }
.btn .btn-sub { font-size: max(14px, .7rem); font-weight: 500; color: var(--c-muted); }
.btn.primary { background: var(--pengpi-coral); border-color: var(--pengpi-coral); color: var(--pengpi-ivory); min-height: max(64px, 3.2rem);
  box-shadow: inset 0 0 0 3px var(--pengpi-ivory), 0 .5rem 1.2rem rgb(255 93 115 / 25%); padding: .3rem 1.6rem; }
.btn.primary .btn-main { font-size: 1.1rem; font-weight: 900; }
.btn.primary .btn-sub { color: #fff0f2; }
.btn.ghost { background: rgb(5 10 22 / 72%); border-color: var(--pengpi-slate); color: var(--pengpi-muted); }
.btn:hover:not(:disabled) { filter: brightness(1.12); transform: translateY(-2px); }
.btn:active:not(:disabled) { transform: scale(.98); }
.btn:focus-visible, .opt:focus-visible, textarea:focus-visible { outline: 3px solid var(--c-focus); outline-offset: 3px; }
.btn:disabled { background: var(--c-disabled-bg); border-color: var(--c-disabled-bg); color: var(--c-disabled-ink); cursor: default; box-shadow: none; }
.btn:disabled .btn-sub { color: var(--c-disabled-ink); }
.btn-ico { display: none; }
/* 事件與決策按鈕（GEMINI R3 第 2 點，ui.js choose() 加 .btn-px）：和狀態列、☰ 同一套像素霓虹框——3px 實線外框、小圓角、4px 硬陰影，按下時陰影縮小、按鈕往右下沉；
   顏色沿用主次色：主按鈕珊瑚紅＋象牙白框、次要深藍＋青色框、ghost 灰藍框 */
.btn.btn-px { border: 3px solid var(--pengpi-cyan); border-radius: 4px; background: #071126; box-shadow: 4px 4px 0 #02050d; transition: transform 80ms steps(2), box-shadow 80ms steps(2), filter var(--dur-fast, 160ms); }
.btn.btn-px.primary { background: var(--pengpi-coral); border-color: var(--pengpi-ivory); color: var(--pengpi-ivory); box-shadow: 4px 4px 0 #02050d, 0 0 .8rem rgb(255 93 115 / 35%); }
.btn.btn-px.ghost { background: rgb(5 10 22 / 86%); border-color: var(--pengpi-slate); }
.btn.btn-px:hover:not(:disabled) { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 #02050d; }
.btn.btn-px.primary:hover:not(:disabled) { box-shadow: 5px 5px 0 #02050d, 0 0 .8rem rgb(255 93 115 / 35%); }
.btn.btn-px:active:not(:disabled) { transform: translate(2px, 2px); box-shadow: 2px 2px 0 #02050d; }
.btn.btn-px:disabled { border-color: var(--c-disabled-bg); box-shadow: 2px 2px 0 #02050d; }

/* ---------- 真文字 logo：遊戲 logo「今晚換你主持」（青色描邊＋紫光）、節目 logo bug「碰皮今夜秀」（同每日節目 .pp-logo） ---------- */
.hl-logo { display: flex; flex-direction: column; align-items: center; gap: .15rem; text-align: center; }
.hl-en { font: 700 max(14px, .7rem)/1 var(--font-label); letter-spacing: .18em; color: var(--pengpi-amber); text-shadow: 0 0 .5rem rgb(255 200 87 / 55%); }
.hl-zh { font: 900 2.6rem/1.08 var(--font-body); letter-spacing: .08em; color: #FFF1DE; white-space: nowrap;
  text-shadow: 2px 0 0 var(--pengpi-cyan), -2px 0 0 var(--pengpi-cyan), 0 2px 0 var(--pengpi-cyan), 0 -2px 0 var(--pengpi-cyan),
    2px 2px 0 var(--pengpi-cyan), -2px -2px 0 var(--pengpi-cyan), 2px -2px 0 var(--pengpi-cyan), -2px 2px 0 var(--pengpi-cyan),
    0 0 .4rem rgb(40 217 255 / 90%), 0 0 1rem rgb(135 91 255 / 80%), 0 0 1.8rem rgb(135 91 255 / 50%); }
.hl-sub { font: 700 max(14px, .8rem)/1.3 var(--font-body); color: var(--pengpi-cyan); letter-spacing: .12em; text-shadow: 0 0 .5rem rgb(40 217 255 / 45%); }
.pp-bug { display: flex; align-items: center; gap: .55rem; padding: .3rem .9rem .3rem .4rem; border-radius: .75rem; background: rgb(5 10 22 / 88%);
  border: 3px solid var(--pengpi-cyan); box-shadow: 0 0 .75rem rgb(40 217 255 / 30%), 0 .4rem 1rem var(--pengpi-shadow); width: max-content; }
.pp-bug-icon { width: 3.4rem; height: 3.1rem; background: url("../assets/brand/logo_heads.webp") center / contain no-repeat; image-rendering: pixelated; }
.pp-bug-text { display: flex; flex-direction: column; gap: .1rem; }
.pp-bug-text em { font: 700 max(14px, .66rem)/1 var(--font-label); font-style: normal; letter-spacing: .08em; color: var(--pengpi-cyan); }
.pp-bug-text b { font: 900 1.45rem/1.1 var(--font-body); letter-spacing: .06em; color: #FFF1DE;
  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), 0 0 .5rem rgb(255 93 115 / 90%), 0 0 1.1rem rgb(255 93 115 / 55%); }
.on-air { position: absolute; top: .9rem; right: calc(var(--snd) + 1.4rem); z-index: 6; display: flex; align-items: center; gap: .5rem; height: max(40px, 2.2rem); padding: 0 1rem;
  border-radius: .5rem; background: var(--pengpi-coral); color: var(--pengpi-ink); font: 700 1rem/1 var(--font-label); letter-spacing: .04em; pointer-events: none;
  box-shadow: inset 0 0 0 2px rgb(255 248 232 / 35%), 0 .4rem 1rem var(--pengpi-shadow); }
.on-air i { width: .75rem; height: .75rem; border-radius: 50%; background: var(--pengpi-ivory); box-shadow: 0 0 .5rem rgb(255 248 232 / 80%); animation: onairdot 2s steps(1) infinite; }
@keyframes onairdot { 50% { opacity: .35; } }

/* ---------- 第一次進來的說明卡 ---------- */
.scr-welcome-wrap { background: linear-gradient(rgb(5 10 22 / 72%), rgb(5 10 22 / 86%)), url("../assets/ui/home/bg_home.webp") center / cover no-repeat, var(--pengpi-ink); }
.scr-welcome { min-height: 100%; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.wc-card { max-width: 36rem; display: flex; flex-direction: column; gap: 1rem; align-items: center; text-align: center; padding: 1.6rem 1.8rem;
  border-radius: var(--radius-feature); background: rgb(5 10 22 / 94%); border: 4px solid var(--pengpi-cyan); box-shadow: 0 1.2rem 3rem var(--pengpi-shadow); position: relative; }
.wc-card::before { content: ""; position: absolute; left: 1rem; right: 1rem; top: .6rem; height: 3px; border-radius: 2px; background: var(--pengpi-violet); }
.wc-card p { line-height: 1.7; font-size: 1rem; }
.wc-acts .btn { min-width: 11rem; }
.q-judging { margin-top: .5rem; text-align: center; color: var(--c-muted); font-weight: 700; }
/* 硬派每一步送出後：按鈕立刻鎖住（動畫照常）；等待提示依時間分三段（HOST_P3_REVIEW 第 5 條） */
#app.arc-busy button, #app.arc-busy .opt { pointer-events: none; }
.net-wait { position: fixed; top: max(10px, env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); z-index: 80;
  display: flex; align-items: center; gap: .6rem; padding: .45rem .6rem .45rem .9rem; border-radius: 999px;
  background: rgba(14, 18, 40, .92); border: 2px solid rgba(40, 217, 255, .55); color: var(--pengpi-ivory, #fff6e5);
  font-size: max(14px, .9rem); font-weight: 700; box-shadow: 0 6px 20px rgba(0, 0, 0, .35); }
.net-wait[hidden] { display: none; }
.net-wait .nw-dot { width: 10px; height: 10px; border-radius: 50%; background: #28d9ff; animation: nw-blink 1s ease-in-out infinite; }
.net-wait[data-stage="slow"] { border-color: rgba(255, 200, 60, .7); }
.net-wait[data-stage="slow"] .nw-dot { background: #ffc83c; }
.net-wait[data-stage="retry"] { border-color: rgba(255, 110, 90, .8); }
.net-wait[data-stage="retry"] .nw-dot { background: #ff6e5a; animation: none; }
.net-wait .nw-retry { min-height: 48px; min-width: 72px; padding: 0 1rem; pointer-events: auto; }
@keyframes nw-blink { 50% { opacity: .3; } }
@media (prefers-reduced-motion: reduce) { .net-wait .nw-dot { animation: none; } }

/* ---------- 狀態列（棋盤 V2）：常駐四項（段落、表現分、士氣、能力章）＋右上 ☰；支援卡、同期排行、路線收進 ☰ 面板 ---------- */
#hud { display: flex; align-items: center; gap: .6rem; padding: .4rem calc(var(--snd) + 1.2rem) .3rem .8rem; min-height: max(52px, 2.9rem); position: relative; z-index: 6; pointer-events: none; }
#hud > * { pointer-events: auto; }
#app:not([data-view="board"]) #hud { visibility: hidden; }
.hud-me { display: flex; align-items: center; gap: 1.1rem; min-width: 0; padding: .25rem 1rem .25rem .3rem; border-radius: 6px;
  background: #071126; border: 3px solid var(--pengpi-cyan); box-shadow: 4px 4px 0 #02050d, inset 0 0 0 2px #0f2a52; }
/* 第三輪：狀態列改成和題卡、按鈕一致的粗框像素風（3px 實線外框、小圓角、4px 硬陰影） */
.hud-stage { font-weight: 900; font-size: .9rem; color: var(--pengpi-ivory); white-space: nowrap; padding: .1rem .6rem; border-radius: 4px; background: var(--pengpi-coral);
  border: 2px solid #02050d; box-shadow: 2px 2px 0 #02050d; }
.hud-morale, .hud-badges { display: inline-flex; align-items: center; gap: .25rem; }
.hud-me em { font-style: normal; font-size: max(14px, .68rem); color: var(--c-muted); margin-right: .15rem; white-space: nowrap; }
.hud-morale i { width: .75rem; height: .75rem; display: inline-block; background: #24365c; box-shadow: 2px 2px 0 #02050d; }
.hud-morale i.on { background: var(--pengpi-green); box-shadow: 2px 2px 0 #02050d, 0 0 .4rem rgb(75 227 163 / 60%); }
.badge { min-width: 1.8rem; height: 1.8rem; padding: 0 .2rem; border-radius: 4px; border: 2px dashed #3a4f78; display: inline-flex; align-items: center; justify-content: center;
  font-size: max(14px, .6rem); font-weight: 900; color: transparent; }
.badge.on { border: 2px solid #fff8; background: var(--sc); color: #fff; text-shadow: 0 1px 0 #0006; }
.badge.on.spent { opacity: .45; background: repeating-linear-gradient(135deg, var(--sc) 0 4px, #0008 4px 7px); }
.hud-total { display: inline-flex; align-items: baseline; gap: .3rem; white-space: nowrap; }
.hud-total b { font: 700 1.05rem var(--font-number); color: var(--pengpi-amber); }
.hud-menu { margin-left: auto; flex: none; width: max(48px, 2.6rem); height: max(48px, 2.6rem); border-radius: 6px; border: 3px solid var(--pengpi-cyan); background: #071126; box-shadow: 4px 4px 0 #02050d;
  color: var(--pengpi-ivory); cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0; }
.hm-ico { display: flex; flex-direction: column; gap: 5px; width: 46%; }
.hm-ico i { display: block; height: 3px; border-radius: 2px; background: currentColor; }
.hud-menu[aria-expanded="true"] { border-color: var(--pengpi-cyan); color: var(--pengpi-cyan); }
.hud-menu:focus-visible { outline: 3px solid var(--c-focus); outline-offset: 2px; }
/* ☰ 面板：遮罩蓋住整個畫面（含骰子），點遮罩、「關閉」或 Esc 都能關；題卡（overlay z 30）一定在面板上面 */
#hud-scrim { position: absolute; inset: 0; z-index: 26; background: rgb(3 6 16 / 58%); }
#hud-scrim[hidden], #hud-panel[hidden] { display: none; }
#app:not([data-view="board"]) #hud-scrim, #app:not([data-view="board"]) #hud-panel { display: none; }
#hud-panel { position: absolute; z-index: 27; top: calc(max(52px, 2.9rem) + .3rem); right: calc(var(--snd) + 1.2rem); width: min(26rem, calc(100% - var(--snd) - 2rem)); max-height: calc(100% - max(52px, 2.9rem) - 1rem);
  overflow: auto; padding: .7rem .9rem .9rem; border-radius: var(--radius-card); background: rgb(5 10 22 / 97%); border: 2px solid rgb(40 217 255 / 55%);
  box-shadow: 0 1rem 2.4rem rgb(0 0 0 / 80%); display: flex; flex-direction: column; gap: .7rem; }
.hp-head { display: flex; align-items: center; justify-content: space-between; gap: .6rem; }
.hp-head b { font-size: 1rem; font-weight: 900; color: var(--pengpi-ivory); }
.hp-sec h3 { font: 700 max(14px, .66rem) var(--font-label); color: var(--pengpi-cyan); letter-spacing: .08em; margin-bottom: .3rem; }
.hp-board { display: flex; flex-direction: column; gap: .1rem; }
.hp-board b { font-size: max(14px, .9rem); color: var(--pengpi-ivory); }
.hp-board span { font-size: max(14px, .75rem); color: var(--c-muted); }
.hp-tags { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .35rem; }
.hud-route { padding: .05rem .5rem; border-radius: .4rem; border: 2px solid var(--pengpi-violet); color: #d6c8ff; font-size: max(14px, .68rem); font-weight: 900; white-space: nowrap; }
.hud-hand { display: flex; flex-direction: column; gap: .3rem; }
.hand-card { display: flex; align-items: baseline; flex-wrap: wrap; gap: .1rem .5rem; padding: .2rem .5rem; border-radius: .4rem; border: 2px solid var(--pengpi-amber); background: rgb(255 200 87 / 10%); }
.hand-card .hc-long { color: var(--pengpi-amber); font-size: max(14px, .72rem); font-weight: 900; }
.hc-short { display: none; }
.hc-desc { font-size: max(14px, .64rem); color: var(--c-text); font-weight: 500; }
.hand-none { font-size: max(14px, .66rem); color: #8ea0c4; }
.hud-rank { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .35rem; }
.hud-rank li { display: grid; grid-template-columns: auto 1fr auto; grid-template-rows: auto auto; align-items: center; column-gap: .55rem; padding: .2rem .6rem .2rem .2rem; border-radius: .6rem;
  background: var(--pengpi-panel); border: 2px solid color-mix(in srgb, var(--nc) 55%, transparent); }
.hud-rank li.you { border-color: var(--pengpi-cyan); box-shadow: var(--neon-cyan); }
.rk-face { grid-row: 1 / 3; position: relative; width: 2.3rem; height: 2.3rem; border-radius: .45rem; background: color-mix(in srgb, var(--nc) 35%, #0b1630); overflow: hidden; }
.rk-face img { width: 100%; height: 100%; image-rendering: pixelated; display: block; }
.rk { position: absolute; right: 0; bottom: 0; min-width: 1rem; padding: 0 .15rem; font: 700 max(14px, .6rem)/1.1 var(--font-number); color: var(--pengpi-ink); background: var(--pengpi-amber); border-radius: .3rem 0 0 0; text-align: center; }
.hud-rank .nm { font-size: max(14px, .72rem); font-weight: 900; grid-row: 1; grid-column: 2; }
.hud-rank .kpi { font: 700 max(14px, .78rem) var(--font-number); color: var(--pengpi-ivory); grid-row: 1 / 3; grid-column: 3; }
.hud-rank .rk-sub { grid-row: 2; grid-column: 2; font-size: max(14px, .6rem); color: var(--c-muted); line-height: 1.2; }
.hp-legend { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .4rem; font-size: max(14px, .7rem); color: var(--c-text); }
.hp-legend li { display: flex; align-items: center; gap: .45rem; }
.bt-dot { display: inline-flex; flex: none; align-items: center; justify-content: center; min-width: 1.3rem; height: 1.3rem; border-radius: .65rem; background: var(--pengpi-amber); color: var(--pengpi-ink);
  font: 700 max(14px, .66rem) var(--font-number); font-style: normal; }
.lg-line { flex: none; width: 1.4rem; height: 4px; border-radius: 2px; background: var(--pengpi-cyan); }
.lg-line.risky { background: #FF9F43; }
.lg-stop { flex: none; font-style: normal; font-weight: 900; padding: 0 .35rem; border-radius: .3rem; background: var(--pengpi-amber); color: var(--pengpi-ink); }

/* ---------- 鏡頭層（棋盤 V2）：攝影棚 bg_home（cam-bg）、LED 盤面（board-wrap）、主播桌／黑皮／碰碰／觀眾（cam-fg） ----------
   遊玩模式（data-cam="play"）：攝影棚跟著盤面放大、調暗，前景淡出；事件模式（data-cam="event"）：攝影棚 cover 全景、盤面縮進大螢幕。
   transform 值由 ui.js layoutCam() 依視窗算好放在 --cam-scene／--led-event；轉場 0.62 秒，減少動態時直接切換。
   第三輪：外圍攝影棚一律用 --cam-scene（cover 縮放，最多 100%，1920 原生圖不放大），遊玩時只調暗、事件時淡入原色；拉遠／拉近只縮放盤面層 */
#main { position: static; min-height: 0; min-width: 0; }
#cam { position: absolute; inset: 0; z-index: 1; overflow: hidden; overflow: clip; background: #050a16; }
#app:not([data-view="board"]) #cam { visibility: hidden; }
.cam-layer { position: absolute; inset: 0; pointer-events: none; }
.cam-scene { transform-origin: 0 0; transform: var(--cam-scene); transition: filter .62s, opacity .62s; }
#cam-bg .cam-scene { filter: brightness(.3) saturate(.6); opacity: .85; }
#cam[data-cam="event"] #cam-bg .cam-scene { filter: none; opacity: 1; }
#cam-fg { z-index: 3; opacity: 0; visibility: hidden; transition: opacity .4s, visibility 0s .62s; }
#cam[data-cam="event"] #cam-fg { opacity: 1; visibility: visible; transition: opacity .45s .15s, visibility 0s; }
#cam.cam-instant .cam-scene, #cam.cam-instant #board-wrap, #cam.cam-instant #cam-fg { transition: none !important; }

/* ---------- LED 盤面：段落背景加 42% 深藍遮罩並降飽和（路線與特殊格保留亮度）；站台圖示＋名牌＋單向箭頭連線 ---------- */
#board-wrap { position: absolute; left: 0; top: 0; z-index: 2; transform-origin: 0 0; transition: transform var(--cam-t, .62s) cubic-bezier(.45, 0, .2, 1); --u: 15px;
  border-radius: calc(var(--u) * 1.1); box-shadow: 0 0 0 3px rgb(40 217 255 / 85%), 0 0 1.6rem rgb(40 217 255 / 40%), 0 1rem 3rem rgb(0 0 0 / 65%); }
#cam[data-cam="event"] #board-wrap { transform: var(--led-event); }
#board-wrap::before, #board-wrap::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; }
#board-wrap::before { background: var(--pengpi-midnight) var(--board-bg) center / cover no-repeat; image-rendering: pixelated; filter: saturate(.55) brightness(.9); }
#board-wrap::after { background: radial-gradient(90% 85% at 50% 50%, rgb(6 14 40 / 46%), rgb(6 14 40 / 36%)); }
#board-wrap.theme-field::after { background: rgb(6 14 40 / 52%); }
#board-wrap.theme-rerun::after { background: rgb(6 14 40 / 30%); }
#links { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; z-index: 1; }
#links line { stroke-linecap: round; }
#links .ln-glow { stroke: rgb(40 217 255 / 18%); stroke-width: calc(var(--u) * .95); }
#links .ln-core { stroke: #B9CCF2; stroke-width: calc(var(--u) * .36); }
#links .ln-arrow { fill: #EAF2FF; stroke: #0B1630; stroke-width: 1.5px; }
/* 岔路兩條支線：青（穩健）、橘（冒險）實線，一路接到合流點 */
#links g.tone-safe .ln-core { stroke: var(--pengpi-cyan); stroke-width: calc(var(--u) * .5); }
#links g.tone-safe .ln-glow { stroke: rgb(40 217 255 / 32%); }
#links g.tone-safe .ln-arrow { fill: var(--pengpi-cyan); }
#links g.tone-risky .ln-core { stroke: #FF9F43; stroke-width: calc(var(--u) * .5); }
#links g.tone-risky .ln-glow { stroke: rgb(255 159 67 / 32%); }
#links g.tone-risky .ln-arrow { fill: #FF9F43; }
#links g.route-safe .ln-glow, #links g.route-risky .ln-glow { stroke-width: calc(var(--u) * 1.6); }
#links g.route-safe .ln-core, #links g.route-risky .ln-core { stroke-width: calc(var(--u) * .7); }
#board-wrap.routing #links g.ln:not(.route-safe):not(.route-risky) { opacity: .3; }
/* 事件模式：大螢幕只顯示簡化畫面（事件名稱大字＋模糊、調暗的盤面剪影），不和前面的黑皮搶焦點 */
#board-tv { position: absolute; inset: 0; z-index: 8; display: flex; align-items: flex-start; justify-content: center; padding-top: calc(var(--u) * 2.6); pointer-events: none;
  opacity: 0; visibility: hidden; transition: opacity .35s, visibility 0s .35s; border-radius: inherit; background: rgb(6 14 40 / 38%); }
#tv-title { font-weight: 900; font-size: calc(var(--u) * 7); line-height: 1.15; letter-spacing: .08em; color: var(--pengpi-ivory); padding: .08em .5em; white-space: nowrap;
  background: rgb(5 10 22 / 82%); border: calc(var(--u) * .5) solid var(--pengpi-coral); border-radius: calc(var(--u) * .6); box-shadow: calc(var(--u) * .6) calc(var(--u) * .6) 0 #02050d;
  text-shadow: 0 0 calc(var(--u) * 1.2) rgb(255 93 115 / 70%); }
#cam[data-cam="event"] #board-tv { opacity: 1; visibility: visible; transition: opacity .45s .2s, visibility 0s; }
#links, #cells, #actors, #plates, #fork-tips { transition: filter .5s, opacity .5s; }
#cam[data-cam="event"] #links, #cam[data-cam="event"] #cells, #cam[data-cam="event"] #actors, #cam[data-cam="event"] #plates, #cam[data-cam="event"] #fork-tips {
  filter: blur(calc(var(--u) * .45)) brightness(.7) saturate(.6); }
#cam.cam-instant #board-tv, #cam.cam-instant #links, #cam.cam-instant #cells, #cam.cam-instant #actors, #cam.cam-instant #plates { transition: none !important; }
#cells { position: absolute; inset: 0; z-index: 2; }
/* 格子：left／top＝站台底部中央（ui.js 算 px），寬高＝站台圖大小 */
.cell { position: absolute; transform: translate(-50%, -100%); }
.cell-tile { display: block; width: 100%; height: 100%; image-rendering: pixelated; filter: drop-shadow(0 calc(var(--u) * .3) calc(var(--u) * .25) rgb(0 0 0 / 70%)); transition: filter .2s, opacity .2s; }
.cell.must:not(.big) .cell-tile { filter: drop-shadow(0 0 calc(var(--u) * .45) rgb(255 200 87 / 70%)) drop-shadow(0 calc(var(--u) * .3) calc(var(--u) * .25) rgb(0 0 0 / 70%)); }
.cell.reach .cell-tile { filter: drop-shadow(0 0 calc(var(--u) * .6) rgb(255 200 87 / 95%)) drop-shadow(0 0 calc(var(--u) * .2) #fff8); }
.cell.here .cell-tile { filter: drop-shadow(0 0 calc(var(--u) * .7) rgb(40 217 255 / 95%)) drop-shadow(0 0 calc(var(--u) * .2) #fffa); }
.cell.route-safe .cell-tile { filter: drop-shadow(0 0 calc(var(--u) * .8) rgb(40 217 255 / 95%)); }
.cell.route-risky .cell-tile { filter: drop-shadow(0 0 calc(var(--u) * .8) rgb(255 159 67 / 95%)); }
#board-wrap.routing .cell:not(.route-safe):not(.route-risky):not(.here), #board-wrap.routing .cell-plate:not(.route-safe):not(.route-risky):not(.here) { opacity: .35; }
.cell-reach { position: absolute; top: -.3em; right: -.5em; min-width: 1.6em; height: 1.6em; padding: 0 .3em; border-radius: .8em; background: var(--pengpi-amber); color: var(--pengpi-ink);
  font: 700 max(14px, calc(var(--u) * 1.3)) var(--font-number); font-style: normal; display: none; align-items: center; justify-content: center;
  box-shadow: 0 0 0 2px var(--pengpi-ink), 0 0 .6rem rgb(255 200 87 / 80%); z-index: 2; white-space: nowrap; }
.cell.big .cell-reach { top: 4%; right: 6%; }
.cell.reach .cell-reach { display: inline-flex; }
/* 岔路小提示（第三輪）：入口格旁兩行小卡（青線・穩／支援卡＋科技），點提示或點路線上的格子就選；≥ 48px */
#fork-tips { position: absolute; inset: 0; z-index: 6; pointer-events: none; }
.fork-tip { position: absolute; pointer-events: auto; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 0; min-width: 48px; min-height: 48px;
  padding: 3px 10px 4px; border-radius: 6px; border: 3px solid var(--tc); background: rgb(5 10 22 / 94%); color: var(--pengpi-ivory); cursor: pointer; text-align: left;
  box-shadow: 4px 4px 0 #02050d, 0 0 .8rem color-mix(in srgb, var(--tc) 45%, transparent); font-family: inherit; line-height: 1.25; white-space: nowrap; animation: tipin .25s ease-out; }
.fork-tip.tone-safe { --tc: var(--pengpi-cyan); }
.fork-tip.tone-risky { --tc: #FF9F43; }
.fork-tip .btn-main { font-weight: 900; font-size: max(14px, calc(var(--u) * 1.2)); color: var(--tc); }
.fork-tip .btn-sub { font-weight: 700; font-size: max(14px, calc(var(--u) * 1.05)); color: var(--pengpi-ivory); }
.fork-tip:hover { transform: translateY(-2px); filter: brightness(1.15); }
.fork-tip:focus-visible { outline: 3px solid var(--c-focus); outline-offset: 3px; }
.cell.pickable { cursor: pointer; }
@keyframes tipin { from { opacity: 0; transform: translateY(6px); } }
/* 名牌：格名＋科目色塊（任務格）／起點／必停；在角色上面一層，角色不會擋字 */
#plates { position: absolute; inset: 0; z-index: 4; pointer-events: none; }
.cell-plate { position: absolute; transform: translateX(-50%); display: inline-flex; align-items: center; gap: calc(var(--u) * .35); white-space: nowrap;
  padding: calc(var(--u) * .16) calc(var(--u) * .55); border-radius: calc(var(--u) * .45); background: rgb(5 10 22 / 90%); border: 2px solid rgb(159 180 221 / 45%);
  box-shadow: 0 2px 6px rgb(0 0 0 / 60%); font-size: max(14px, calc(var(--u) * 1.4)); line-height: 1.2; transition: opacity .2s, border-color .2s; }
.cell-name { font-weight: 900; color: var(--pengpi-ivory); }
.cell-tag { font-size: max(14px, calc(var(--u) * 1.12)); font-weight: 900; padding: 0 .35em; border-radius: .3em; line-height: 1.3; }
.cell-tag.subj { background: var(--tc); color: #fff; text-shadow: 0 1px 0 #0008; }
.cell-tag.start { background: var(--pengpi-ivory); color: var(--pengpi-ink); }
.cell-tag.stop { background: var(--pengpi-amber); color: var(--pengpi-ink); }
.cell-dot { display: none; flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--tc); box-shadow: 0 0 0 1.5px #0008; }
.cell-plate.must { border-color: rgb(255 200 87 / 80%); }
.cell-plate.t-lesson { border-color: var(--pengpi-amber); background: rgb(40 28 4 / 92%); }
.cell-plate.t-exam { border-color: var(--pengpi-coral); background: rgb(58 12 28 / 94%); font-size: max(15px, calc(var(--u) * 1.65)); box-shadow: 0 0 .8rem rgb(255 93 115 / 45%); }
.cell-plate.reach { border-color: var(--pengpi-amber); }
.cell-plate.here { border-color: var(--pengpi-cyan); box-shadow: 0 0 .6rem rgb(40 217 255 / 70%); }
.cell-plate.route-safe { border-color: var(--pengpi-cyan); }
.cell-plate.route-risky { border-color: #FF9F43; }
/* 角色站上棋盤：left／top＝腳底位置；圖高 --ch；橢圓陰影；碰碰頭上「你」（雙人：輪到的人頭上名字） */
#actors { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.tok { position: absolute; width: 0; height: 0; transition: left .26s cubic-bezier(.3, .6, .4, 1), top .26s cubic-bezier(.3, .6, .4, 1); }
.tok.no-move { transition: none; }
.tok-img { position: absolute; left: 0; bottom: 0; height: var(--ch); width: var(--cw, auto); max-width: none; transform: translateX(-50%); image-rendering: pixelated; filter: drop-shadow(0 1px 0 rgb(0 0 0 / 60%)); }
.tok-shadow { position: absolute; left: 0; top: 0; width: calc(var(--ch) * .62); height: calc(var(--ch) * .16); transform: translate(-50%, -55%); border-radius: 50%;
  background: radial-gradient(closest-side, rgb(0 0 0 / 62%), rgb(0 0 0 / 0)); }
/* 「你」／雙人名字：位置由 ui.js 算（left／top 相對腳底）；預設頭上 6px、箭頭朝下（--ax 對準頭）；避讓名牌時改到側邊，箭頭橫向指向角色 */
.tok-tag { position: absolute; left: 0; top: 0; padding: 0 .45em; border-radius: 4px; background: var(--pc, var(--pengpi-cyan)); color: var(--pengpi-ink);
  font-weight: 900; font-size: max(14px, calc(var(--ch) * .24)); line-height: 1.35; white-space: nowrap; box-shadow: 2px 2px 0 #02050d, 0 0 .5rem rgb(40 217 255 / 60%); }
.tok-tag::after { content: ""; position: absolute; left: var(--ax, 50%); top: 100%; transform: translateX(-50%); border: 5px solid transparent; border-top-color: var(--pc, var(--pengpi-cyan)); }
.tok-tag[data-arrow="right"]::after { left: 100%; top: 50%; transform: translateY(-50%); border-top-color: transparent; border-left-color: var(--pc, var(--pengpi-cyan)); }
.tok-tag[data-arrow="left"]::after { left: auto; right: 100%; top: 50%; transform: translateY(-50%); border-top-color: transparent; border-right-color: var(--pc, var(--pengpi-cyan)); }
.tok-tag[hidden] { display: none; }
.tok.p1 .tok-tag, .tok.p2 .tok-tag { background: var(--pc); box-shadow: 2px 2px 0 #02050d, 0 0 .5rem color-mix(in srgb, var(--pc) 70%, transparent); }
.tok-player.active .tok-img { filter: drop-shadow(0 0 2px #fff) drop-shadow(0 0 calc(var(--ch) * .06) var(--pc, var(--pengpi-cyan))); }
.tok.hop .tok-img { animation: tokhop .26s ease-out; }
@keyframes tokhop { 45% { transform: translate(-50%, -26%); } }

/* ---------- 主持與操作層：左下迷你主播桌黑皮（桌寬 ≤ 300px）＋字幕條（最多兩行）、下方中央骰子、右邊操作按鈕 ---------- */
#dock { position: relative; z-index: 5; height: max(136px, 7rem); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: .8rem;
  padding: 0 1rem calc(.35rem + env(safe-area-inset-bottom)); pointer-events: none; }
#dock > * { pointer-events: auto; }
#app:not([data-view="board"]) #dock { visibility: hidden; }
#host-desk { position: absolute; left: .4rem; bottom: 0; width: min(300px, 8rem); aspect-ratio: 100 / 86; pointer-events: none; transition: opacity .3s; }
.hd-heipi { position: absolute; left: 50%; bottom: 42%; height: 58%; width: auto; transform: translateX(-50%); image-rendering: pixelated; }
.hd-desk { position: absolute; left: 0; bottom: 0; width: 100%; image-rendering: pixelated; filter: drop-shadow(0 .3rem .5rem rgb(0 0 0 / 60%)); }
#dialog { grid-column: 1; min-width: 0; margin-left: calc(min(300px, 8rem) + .3rem); display: flex; flex-wrap: wrap; align-items: center; gap: .15rem .45rem;
  padding: .4rem .8rem .45rem; border-radius: var(--radius-card); background: rgb(5 10 22 / 93%); border: 2px solid rgb(135 91 255 / 55%); border-left: .4rem solid var(--pengpi-coral);
  box-shadow: 0 .5rem 1.4rem rgb(0 0 0 / 60%); }
#dlg-kicker { padding: .05rem .5rem; border-radius: .35rem; background: var(--pengpi-coral); color: var(--pengpi-ivory); font-size: max(14px, .78rem); font-weight: 900; white-space: nowrap; }
#dlg-kicker[hidden] { display: none; }
#dlg-face { flex: none; width: 1.7rem; height: 1.7rem; border-radius: .35rem; background: #1b2a50; image-rendering: pixelated; border: 2px solid var(--pengpi-violet); }
#dlg-face[hidden] { display: none; }
#dlg-who { flex: none; padding: 0 .5rem; border-radius: .35rem; background: var(--pengpi-violet); font-size: max(14px, .72rem); line-height: 1.5; }
#dialog[data-who="碰碰"] #dlg-who { background: var(--pengpi-coral); }
#dialog[data-who="碰碰"] #dlg-face { border-color: var(--pengpi-coral); }
#dialog[data-who="栗子"] #dlg-who { background: #C98B4B; color: var(--pengpi-ink); }
#dialog[data-who="阿閃"] #dlg-who { background: #E8743B; color: var(--pengpi-ink); }
#dialog[data-who="墨墨"] #dlg-who { background: #6B8CAE; color: var(--pengpi-ink); }
#dialog[data-who="豆豆"] #dlg-who { background: #FFC857; color: var(--pengpi-ink); }
#dialog[data-who="豆豆"] #dlg-face { border-color: #FFC857; }
#dlg-text { flex: 1 1 100%; font-size: .95rem; line-height: 1.4; min-height: 2.8em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
#dlg-text[data-len="m"] { font-size: max(14px, .84rem); }
#dlg-text[data-len="l"] { font-size: max(14px, .74rem); }
/* 骰子（點骰子或空白鍵擲；鍵盤焦點與 aria-label 保留）：待命時半透明、輪到擲骰時金色呼吸光圈 */
#dice-box { grid-column: 2; display: flex; flex-direction: column; align-items: center; gap: 0; align-self: end; transition: opacity .3s; }
#dice { position: relative; width: clamp(104px, 5rem, 120px); height: clamp(104px, 5rem, 120px); padding: 0; border: 0; border-radius: 24%; background: none; cursor: pointer; touch-action: manipulation; }
#dice img { display: block; width: 100%; height: 100%; object-fit: contain; object-position: 50% 100%; image-rendering: pixelated; filter: drop-shadow(0 .2rem .2rem rgb(0 0 0 / 55%)); transition: transform .12s ease-out, opacity .2s; }
#dice:disabled { cursor: default; }
#dice:disabled img { opacity: .55; }
#dice.up img, #dice.land img, #dice.rebound img, #dice.landed img, #dice.rolling-still img, #dice.fade img { opacity: 1; }
#dice.ready::before { content: ""; position: absolute; inset: -7%; border-radius: 28%; box-shadow: 0 0 0 3px var(--pengpi-amber), 0 0 1.3rem rgb(255 200 87 / 85%); animation: dicepulse 1.1s ease-in-out infinite; }
#dice.ready:hover img { transform: translateY(-4%) rotate(-4deg); }
#dice.up img { transform: translateY(-3%) rotate(-6deg); }   /* 第三輪：彈起幅度收小，翻滾時不蓋到盤面最下排的名牌 */
#dice.land img { transform: translateY(3%) scale(1.1, .88); transition-duration: .08s; }
#dice.rebound img { transform: translateY(-9%); transition-duration: .14s; }
#dice.fade img { animation: dicefade .35s linear; }
#dice:focus-visible { outline: 3px solid var(--c-focus); outline-offset: 4px; }
@keyframes dicepulse { 50% { box-shadow: 0 0 0 3px var(--pengpi-amber), 0 0 .4rem rgb(255 200 87 / 40%); } }
@keyframes dicefade { from { opacity: 0; } }
#dice-cap { min-height: 1.3em; margin-top: .3rem; font-size: max(14px, .72rem); font-weight: 900; color: var(--pengpi-ivory); text-shadow: 0 1px 2px #000, 0 0 6px #000; white-space: nowrap; }
#actions { position: absolute; right: 1rem; bottom: calc(.5rem + env(safe-area-inset-bottom)); max-width: calc(50% - 4.5rem); display: flex; gap: .5rem; flex-wrap: wrap; justify-content: flex-end; align-items: flex-end; }
#actions .btn { min-width: 6rem; }
#actions .btn.fork { align-items: flex-start; text-align: left; max-width: 25rem; padding: .35rem .8rem; min-height: 64px; border-width: 3px; background: rgb(5 10 22 / 94%); }
.btn.fork-safe { border-color: var(--pengpi-cyan); box-shadow: 0 0 .7rem rgb(40 217 255 / 40%); }
.btn.fork-risky { border-color: #FF9F43; box-shadow: 0 0 .7rem rgb(255 159 67 / 40%); }
.btn.fork-safe .btn-main { color: var(--pengpi-cyan); }
.btn.fork-risky .btn-main { color: #FF9F43; }
.btn .btn-line { font-size: max(14px, .64rem); font-weight: 500; color: var(--c-text); line-height: 1.3; }
/* 事件模式（鏡頭拉遠）：迷你主播桌與骰子收起（攝影棚裡就有黑皮），字幕條變成畫面下方中央的 lower third */
#app[data-cam="event"] #host-desk, #app[data-cam="event"] #dice-box { opacity: 0; visibility: hidden; }
#app[data-cam="event"] #dialog { grid-column: 1 / -1; grid-row: 1; justify-self: center; width: min(62rem, 72%); margin-left: 0; border-color: rgb(255 93 115 / 70%); }
#app[data-cam="event"] #dock:has(#actions .btn) #dialog { justify-self: start; width: calc(50% - 1rem); }

/* ---------- 作答層：碰皮今夜秀題卡（.qcard-frame：深色卡、4px 青色描邊、紫色上緣線、A～D 色塊） ---------- */
#overlay { position: absolute; inset: 0; z-index: 30; background: var(--pengpi-scrim); display: flex; align-items: center; justify-content: center; padding: .6rem; }
#overlay[hidden] { display: none; }
#panel { width: min(100%, 54rem); max-height: 100%; overflow: auto; }
.q-card { position: relative; background: rgb(5 10 22 / 97%); border: 4px solid var(--pengpi-cyan); border-radius: var(--radius-feature); padding: 1.1rem 1.3rem 1rem;
  display: flex; flex-direction: column; gap: .65rem; box-shadow: 0 1.2rem 3rem var(--pengpi-shadow), 0 0 1.4rem rgb(40 217 255 / 20%); animation: cardin .24s var(--ease-enter, ease) both; }
.q-card::before { content: ""; position: absolute; left: 1rem; right: 1rem; top: .55rem; height: 3px; border-radius: 2px; background: var(--pengpi-violet); }
.q-card.kind-meeting, .q-card.kind-standIn { border-color: var(--pengpi-amber); box-shadow: 0 1.2rem 3rem var(--pengpi-shadow), 0 0 1.4rem rgb(255 200 87 / 22%); }
.q-card.kind-save { border-color: var(--pengpi-coral); box-shadow: 0 0 0 4px rgb(255 93 115 / 25%), 0 0 2rem rgb(255 93 115 / 45%); }
.q-card.kind-extra, .q-card.kind-genius { border-color: var(--pengpi-violet); }
@keyframes cardin { from { opacity: 0; transform: translateY(1rem); } to { opacity: 1; transform: none; } }
.q-head { display: flex; align-items: center; gap: .6rem; margin-top: .2rem; }
.q-subj { padding: .1rem .65rem; border-radius: .4rem; background: var(--sc); color: #fff; font-weight: 900; font-size: max(14px, .85rem); text-shadow: 0 1px 0 #0006; white-space: nowrap; }
.q-title { flex: 1; font-size: max(14px, .85rem); color: var(--c-muted); font-weight: 700; min-width: 0; }
.q-sec { font: 700 1.5rem var(--font-number); color: var(--pengpi-cyan); min-width: 2rem; text-align: right; white-space: nowrap; }
.q-sec small { font: 700 max(14px, .7rem) var(--font-body); margin-left: .15rem; }
.hurry .q-sec { color: var(--pengpi-coral); }
.q-bar { height: .45rem; border-radius: .3rem; background: #1b2c52; overflow: hidden; }
.q-bar-fill { display: block; height: 100%; background: linear-gradient(90deg, var(--pengpi-cyan), var(--pengpi-amber)); transform-origin: 0 50%; }
.hurry .q-bar-fill { background: var(--pengpi-coral); }
.q-note { font-size: max(14px, .82rem); font-weight: 700; color: var(--pengpi-amber); text-align: center; }
.q-qbox { min-height: 5.2rem; display: flex; align-items: center; justify-content: center; padding: .2rem .6rem; }
.q-text { font-weight: 900; line-height: 1.3; text-align: center; text-wrap: balance; color: var(--pengpi-ivory); }
.q-text[data-len="s"] { font-size: 2.1rem; } .q-text[data-len="m"] { font-size: 1.75rem; } .q-text[data-len="l"] { font-size: 1.45rem; } .q-text[data-len="xl"] { font-size: 1.22rem; line-height: 1.4; }
.q-opts { display: grid; gap: .7rem .8rem; grid-template-columns: 1fr 1fr; }
.q-opts.n3 { grid-template-columns: 1fr 1fr 1fr; }
.opt { --k: var(--c-ans-a); position: relative; min-height: max(64px, 3.8rem); border-radius: var(--radius-card); border: 3px solid var(--k); background: var(--pengpi-panel-raised); color: var(--c-text);
  cursor: pointer; display: flex; align-items: center; gap: .7rem; padding: .35rem .9rem .35rem .45rem; text-align: left; font-size: 1.05rem; font-weight: 700; line-height: 1.25;
  transition: filter var(--dur-fast, 160ms), transform var(--dur-fast, 160ms); }
.opt-b { --k: var(--c-ans-b); } .opt-c { --k: var(--c-ans-c); } .opt-d { --k: var(--c-ans-d); }
.opt-key { flex: none; width: 2.5rem; align-self: stretch; min-height: 2.5rem; border-radius: .55rem; display: inline-flex; align-items: center; justify-content: center;
  font: 700 1.2rem var(--font-label); color: var(--pengpi-ink); background: var(--k); }
.opt-text { flex: 1; }
.opt.tf { justify-content: center; font-size: 1.3rem; }
.opt.tf .opt-key { font: 900 1.6rem var(--font-body); width: 3rem; }
.opt.tf .opt-text { flex: 0 1 auto; }
/* 滑鼠移上去只變亮、不位移：位移會讓停在選項邊緣的滑鼠反覆進出 hover，選項一直抖（手機右欄的按鈕正好在選項下緣） */
.opt:hover:not(:disabled) { filter: brightness(1.15); box-shadow: 0 0 0 2px rgb(255 255 255 / 25%); }
.opt:disabled { cursor: default; }
.opt.locked { box-shadow: 0 0 0 4px var(--pengpi-focus), 0 0 1.2rem rgb(40 217 255 / 45%); }
.opt.right { border-color: var(--pengpi-green); box-shadow: 0 0 0 4px var(--pengpi-green), 0 0 1.2rem 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 1.2rem rgb(75 227 163 / 45%); } }
.opt.wrong { border-color: var(--pengpi-coral); box-shadow: 0 0 0 4px var(--pengpi-coral); }
.opt.dim { opacity: .45; }
.opt.right::after, .opt.wrong::after { position: absolute; right: .6rem; top: -.8rem; padding: .05rem .5rem; border-radius: .35rem; font-size: max(14px, .7rem); font-weight: 900; line-height: 1.4; }
.opt.right::after { content: "✓ 答對"; background: var(--pengpi-green); color: var(--pengpi-ink); }
.opt.wrong::after { content: "✕ 再想一下"; background: var(--pengpi-coral); color: var(--pengpi-ivory); }
.q-cards { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.q-cards > small { color: var(--c-muted); font-size: max(14px, .7rem); }
.card-btn { min-height: 48px; padding: .15rem .8rem; border-color: var(--pengpi-amber); background: rgb(255 200 87 / 10%); }
.card-btn .btn-main { color: var(--pengpi-amber); font-size: max(14px, .85rem); }
.card-btn.on { background: var(--pengpi-amber); } .card-btn.on .btn-main, .card-btn.on .btn-sub { color: var(--pengpi-ink); }
.q-card.shake { animation: qshake .36s steps(1) both; }
@keyframes qshake { 0% { transform: translate(8px, 0); } 25% { transform: translate(-8px, 4px); } 50% { transform: translate(4px, -4px); } 75% { transform: translate(-4px, 0); } 100% { transform: none; } }
/* 揭曉（每日節目 #explain 的緊湊版面）：卡片高度不超過畫面；判定＋分數＋正解同一列且 sticky；解說區自己捲動；「繼續」固定在卡片底部 */
.q-card.revealed { max-height: calc(100vh - 1.2rem); max-height: calc(100dvh - 1.2rem); overflow: hidden; }
.q-card.revealed > * { flex: none; }
.q-card.revealed .q-bar, .q-card.revealed .q-note, .q-card.revealed .q-cards { display: none; }
.q-card.revealed .q-qbox { min-height: 0; }
.q-card.revealed .q-text { font-size: 1.15rem; }
.q-card.revealed .opt { min-height: max(48px, 2.6rem); font-size: .95rem; }
.q-card.revealed .opt-key { min-height: 0; }
.q-card.revealed.is-ok { border-color: var(--pengpi-green); }
.q-card.revealed.is-ng { border-color: var(--pengpi-coral); }
.q-result { flex: 0 1 auto !important; min-height: 3.2rem; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: .35rem;
  border-radius: var(--radius-card); padding: .7rem 1rem; background: var(--pengpi-panel); border: 2px solid var(--pengpi-slate); animation: cardin .24s ease both; }
.q-verdict-row { position: sticky; top: -.7rem; margin-top: -.7rem; padding-top: .7rem; background: var(--pengpi-panel); z-index: 1;
  display: flex; flex-wrap: wrap; align-items: baseline; gap: .1rem 1.2rem; }
.q-verdict { font-size: 1.6rem; font-weight: 900; line-height: 1.1; }
.q-verdict .pts { font: 700 1rem/1 var(--font-number); color: var(--pengpi-amber); margin-left: .6rem; }
.q-result.ok .q-verdict { color: var(--pengpi-green); }
.q-result.ng .q-verdict { color: var(--pengpi-coral); }
.q-answer { font-size: 1rem; color: var(--pengpi-cyan); font-weight: 700; }
.q-answer b { color: var(--pengpi-ivory); }
.q-explain { font-size: .92rem; line-height: 1.55; color: var(--pengpi-ivory); }
.q-line { font-size: .88rem; line-height: 1.45; color: var(--pengpi-muted); }
.q-tip { display: flex; gap: .5rem; align-items: center; font-size: .86rem; line-height: 1.45; color: var(--pengpi-ivory); margin-top: .1rem; padding: .35rem .5rem; border-radius: .5rem; background: rgb(135 91 255 / 14%); }
.q-tip-face { width: 2rem; height: 2rem; flex: none; image-rendering: pixelated; }
.q-tip b { flex: none; padding: 0 .4rem; border-radius: .3rem; background: var(--pengpi-violet); font-size: max(14px, .76rem); }
.q-acts { display: flex; justify-content: flex-end; }
.q-acts .btn { min-width: 9rem; }

/* ---------- 救一次：戲劇化選擇卡（警示燈框＋兩張大卡） ---------- */
#overlay.ov-save { background: radial-gradient(70% 70% at 50% 50%, rgb(70 10 25 / 70%), rgb(5 10 22 / 92%)); }
#panel.save { width: min(100%, 50rem); }
.save-card-wrap { position: relative; border-radius: var(--radius-feature); padding: 1.3rem 1.4rem 1.1rem; background: rgb(5 10 22 / 97%); border: 4px solid var(--pengpi-coral);
  box-shadow: 0 0 0 4px rgb(255 93 115 / 25%), 0 0 2.4rem rgb(255 93 115 / 50%); display: flex; flex-direction: column; gap: .9rem; animation: savein .3s steps(4) both; overflow: hidden; }
@keyframes savein { from { transform: scale(1.12); opacity: 0; } to { transform: none; opacity: 1; } }
.save-siren { position: absolute; left: 0; right: 0; top: 0; height: .55rem; background: repeating-linear-gradient(90deg, var(--pengpi-coral) 0 2rem, #3a0d1a 2rem 4rem); animation: siren .5s steps(2) infinite; }
@keyframes siren { to { background-position: 4rem 0; } }
.save-head { text-align: center; display: flex; flex-direction: column; gap: .3rem; margin-top: .3rem; }
.save-kicker { font: 700 max(14px, .75rem) var(--font-label); letter-spacing: .25em; color: var(--pengpi-coral); }
.save-title { font-size: 2.4rem; font-weight: 900; color: var(--pengpi-ivory); text-shadow: 0 0 .8rem rgb(255 93 115 / 80%); line-height: 1.1; }
.save-line { font-size: 1rem; line-height: 1.5; color: var(--pengpi-ivory); }
.save-acts { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.save-acts .save-no { grid-column: 1 / -1; justify-self: center; min-width: 14rem; }
.save-opt { min-height: max(120px, 6.4rem); border-width: 3px; border-radius: var(--radius-card); padding: .6rem .9rem; gap: .25rem; background: linear-gradient(180deg, #1a2d58, #0b1630); }
.save-opt .btn-main { font-size: 1.25rem; font-weight: 900; }
.save-opt .btn-sub { color: var(--pengpi-ivory); font-size: max(14px, .76rem); text-align: center; }
.save-opt .btn-ico { display: inline-flex; align-items: center; justify-content: center; width: 2.6rem; height: 2.6rem; font-style: normal; font-weight: 900; font-size: max(14px, .78rem); }
.save-badge { border-color: var(--sc); box-shadow: 0 0 1rem color-mix(in srgb, var(--sc) 45%, transparent); }
.save-badge .btn-ico { border-radius: 50%; background: var(--sc); color: #fff; border: 3px solid #fff8; }
.save-score { border-color: var(--pengpi-amber); box-shadow: 0 0 1rem rgb(255 200 87 / 35%); }
.save-score .btn-ico { border-radius: 50%; background: radial-gradient(circle at 35% 35%, #ffe7a3, var(--pengpi-amber) 55%, #b98320); border: 3px solid #8a5e12; }
.save-score .btn-ico::after { content: "＄"; color: #6b4708; }
.save-opt:disabled { background: #141d33; box-shadow: none; border-color: #2b3958; }
.save-opt:disabled .btn-ico { filter: grayscale(1) brightness(.6); }
/* 救一次的兩張大卡也用像素框（保留各自的科目色／金色外框與光暈） */
.btn.btn-px.save-opt { border-radius: 6px; background: linear-gradient(180deg, #1a2d58, #0b1630); }
.btn.btn-px.save-badge { border-color: var(--sc); box-shadow: 4px 4px 0 #02050d, 0 0 1rem color-mix(in srgb, var(--sc) 45%, transparent); }
.btn.btn-px.save-score { border-color: var(--pengpi-amber); box-shadow: 4px 4px 0 #02050d, 0 0 1rem rgb(255 200 87 / 35%); }
.btn.btn-px.save-opt:active:not(:disabled) { box-shadow: 2px 2px 0 #02050d; }
.btn.btn-px.save-opt:disabled { background: #141d33; border-color: #2b3958; box-shadow: 2px 2px 0 #02050d; }
/* 分享：選橫式或限動 */
#panel.share { width: min(100%, 46rem); }
.share-pick { border-radius: var(--radius-feature); padding: 1.2rem; background: rgb(5 10 22 / 97%); border: 4px solid var(--pengpi-cyan); display: flex; flex-direction: column; gap: .8rem; align-items: center; }
.share-pick-thumbs { display: flex; gap: .8rem; align-items: center; justify-content: center; }
.share-pick-thumbs img { border-radius: .5rem; border: 2px solid var(--pengpi-slate); height: 9rem; width: auto; }
.share-pick-acts { display: flex; gap: .6rem; flex-wrap: wrap; justify-content: center; }

/* ---------- 全畫面 ---------- */
#screen { position: absolute; inset: 0; z-index: 20; overflow: auto; background: var(--pengpi-midnight); }
#screen[hidden] { display: none; }
.sticky-acts { position: sticky; bottom: 0; z-index: 5; padding: .5rem 0 calc(.5rem + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgb(7 17 38 / 0%), rgb(7 17 38 / 92%) 35%); }
.st-acts, .npc-acts, .res-acts, .sv-acts, .meet-acts, .gal-acts { display: flex; gap: .6rem; justify-content: flex-end; flex-wrap: wrap; }
.npc-acts .btn, .res-acts .btn, .sv-acts .btn, .gal-acts .btn { min-width: 9rem; }
.res-acts.sticky-acts, .gal-acts.sticky-acts { margin: 0 calc(-1 * var(--side, 1.4rem)); padding-left: var(--side, 1.4rem); padding-right: var(--side, 1.4rem); background: linear-gradient(180deg, rgb(5 10 22 / 0%), rgb(5 10 22 / 94%) 28%); }

/* ---------- 攝影棚（首頁、開場）：1920×1080 場景 cover 縮放；座標同每日節目首頁 css/style.css .home-* ---------- */
.scr-intro { position: absolute; inset: 0; overflow: hidden; }
.studio { position: absolute; inset: 0; overflow: hidden; background: #050a16; }
.studio-scene { position: absolute; left: 0; top: 0; width: 1920px; height: 1080px; transform-origin: 0 0; }
.studio-scene img { position: absolute; image-rendering: pixelated; }
.st-bg { left: 0; top: 0; width: 1920px; height: 1080px; image-rendering: auto !important; }
.st-chair { left: 866px; top: 450px; width: 199px; height: 88px; }
.st-heipi { left: 965px; bottom: 518px; height: 284px; width: auto; transform: translateX(-50%); }
.st-desk { left: 620px; top: 538px; width: 690px; height: 232px; }
.st-peng { left: 386px; top: 430px; height: 336px; width: auto; filter: drop-shadow(0 12px 10px rgb(0 0 0 / 30%)); }
.st-aud-l { left: 0; top: 789px; width: 842px; height: 291px; }
.st-aud-r { left: 1070px; top: 779px; width: 850px; height: 301px; }
/* 後方大螢幕（x 615～1305、y 140～450）：黑皮的頭從 y 278 起擋住中間，logo 只用 y 158～276 */
.st-tv { position: absolute; left: 626px; top: 156px; width: 668px; height: 122px; display: flex; align-items: center; justify-content: center; }
.hl-logo.on-tv { gap: 2px; }
.hl-logo.on-tv .hl-en { display: none; }
.hl-logo.on-tv .hl-zh { font-size: 72px; letter-spacing: 6px; }
.hl-logo.on-tv .hl-sub { font-size: 24px; letter-spacing: 4px; }
.title-top { position: absolute; left: 1.2rem; top: .9rem; z-index: 6; display: flex; flex-direction: column; align-items: flex-start; gap: .6rem; }
.title-home .btn { min-height: 48px; padding: .2rem 1rem; }
.title-home .btn .btn-main { font-size: max(14px, .8rem); }
.title-home .btn .btn-main::before { content: "◀ "; color: var(--pengpi-cyan); }
/* 主播桌正面的選單（桌面依場景座標對位：--px／--py／--pw／--ph） */
.title-menu { position: absolute; z-index: 6; }
.title-menu .hl-logo.in-menu { display: none; }
.title-menu.placed { left: var(--px); top: var(--py); width: var(--pw); height: var(--ph); padding: 0 .4rem; }
.title-menu.placed .title-acts { display: grid; grid-template-columns: 1.55fr 1fr; gap: .5rem; height: 100%; }
.title-acts .btn { width: 100%; }
.title-acts .title-main { border-radius: 1rem; }
.title-acts .title-main .btn-main { font-size: 1.7rem; letter-spacing: .06em; }
.title-acts .title-main .btn-sub { font-size: max(14px, .72rem); font-weight: 700; }
.title-acts .title-gallery { border-radius: 1rem; background: linear-gradient(180deg, #2c1a68, #1a0f45); border: 3px solid var(--pengpi-violet); box-shadow: 0 0 1rem rgb(135 91 255 / 40%); }
.title-acts .title-gallery .btn-main { font-size: 1.2rem; font-weight: 900; color: #e4dbff; }
.title-acts .title-gallery .btn-sub { color: var(--pengpi-amber); font-weight: 700; }
.title-menu.placed .title-save, .title-menu.placed .title-extra { position: absolute; left: -10%; right: -10%; display: flex; justify-content: center; }
.title-menu.placed .title-extra { top: calc(100% + 1.2rem); }
.title-menu.placed .title-save { top: calc(100% + .2rem); text-align: center; font-size: max(14px, .7rem); color: var(--pengpi-muted); text-shadow: 0 1px 2px #000; }
.title-extra .btn { min-width: 12rem; }
.title-lead { position: absolute; left: 50%; bottom: 1rem; transform: translateX(-50%); z-index: 5; display: flex; align-items: center; gap: .8rem; white-space: nowrap;
  padding: .3rem 1.2rem .3rem .3rem; border-radius: .6rem; background: rgb(5 10 22 / 90%); border: 2px solid var(--pengpi-slate); font-size: .95rem; font-weight: 700; color: var(--pengpi-ivory); }
.title-lead b { font: 700 max(14px, .7rem) var(--font-label); letter-spacing: .1em; padding: .2rem .6rem; border-radius: .4rem; background: var(--pengpi-coral); color: var(--pengpi-ink); }
.scr-title:has(.title-extra .btn) .title-lead { display: none; }
/* 開場的 lower third 字幕 */
.st-dialog { position: absolute; left: 50%; bottom: max(1rem, env(safe-area-inset-bottom)); transform: translateX(-50%); width: min(94%, 56rem); z-index: 6;
  background: rgb(5 10 22 / 95%); border: 2px solid var(--pengpi-slate); border-left: .5rem solid var(--pengpi-coral); border-radius: var(--radius-card); padding: .8rem 1.1rem;
  display: flex; flex-direction: column; gap: .5rem; box-shadow: 0 .6rem 2rem #000a; animation: ltin .3s steps(4) both; }
@keyframes ltin { from { transform: translate(-50%, 1.5rem); opacity: 0; } to { transform: translateX(-50%); opacity: 1; } }
.st-line { display: flex; align-items: center; gap: .5rem; }
.st-face { width: 2.4rem; height: 2.4rem; image-rendering: pixelated; border-radius: .4rem; background: #1b2a50; }
.st-who { padding: .1rem .6rem; border-radius: .35rem; background: var(--pengpi-coral); font-size: max(14px, .85rem); color: var(--pengpi-ivory); }
.st-role { font: 700 max(14px, .7rem) var(--font-label); letter-spacing: .12em; color: var(--pengpi-cyan); }
.st-step { margin-left: auto; color: var(--c-muted); font-family: var(--font-number); font-size: max(14px, .7rem); }
.st-text { font-size: 1.1rem; line-height: 1.55; }
.st-acts .btn { min-width: 9rem; }

/* ---------- 節目字卡轉場（steps 逐格進場） ---------- */
.title-card { position: absolute; inset: 0; z-index: 60; overflow: hidden; pointer-events: none; background: var(--pengpi-ink); opacity: 0; }
.title-card::before { content: ""; position: absolute; inset: 0; background: var(--bg) center / cover no-repeat; filter: brightness(.38) saturate(1.1); image-rendering: pixelated; }
.title-card.on { opacity: 1; }
.title-card.off { opacity: 0; transition: opacity .3s steps(3); }
.tc-band { position: absolute; left: -10%; width: 120%; height: 7rem; transform: translateX(-110%) skewY(-6deg); }
.tc-band.b1 { top: 34%; background: var(--pengpi-coral); }
.tc-band.b2 { top: calc(34% + 7rem); height: .7rem; background: var(--pengpi-cyan); box-shadow: 0 0 1rem var(--pengpi-cyan); }
.title-card.on .tc-band.b1 { animation: band .42s steps(6) forwards; }
.title-card.on .tc-band.b2 { animation: band .42s .08s steps(6) forwards; }
@keyframes band { to { transform: translateX(0) skewY(-6deg); } }
.tc-body { position: absolute; left: 8%; top: 22%; display: flex; flex-direction: column; gap: .4rem; clip-path: inset(0 100% 0 0); }
.title-card.on .tc-body { animation: wipe .5s .3s steps(8) forwards; }
@keyframes wipe { to { clip-path: inset(0 0 0 0); } }
.tc-no { font: 700 1.6rem/1 var(--font-label); letter-spacing: .2em; color: var(--pengpi-amber); text-shadow: 0 0 .6rem rgb(255 200 87 / 60%); }
.tc-title { font: 900 5rem/1.1 var(--font-body); color: #FFF1DE; letter-spacing: .08em; margin-top: 1.4rem;
  text-shadow: 3px 0 0 var(--pengpi-ink), -3px 0 0 var(--pengpi-ink), 0 3px 0 var(--pengpi-ink), 0 -3px 0 var(--pengpi-ink), 0 0 1.4rem rgb(5 10 22 / 90%); }
.tc-place { display: inline-flex; align-items: center; gap: .5rem; width: fit-content; font-size: 1.6rem; font-weight: 900; color: var(--pengpi-cyan); margin-top: 1.6rem; padding: .15rem .8rem; border-radius: .5rem; background: rgb(5 10 22 / 88%); text-shadow: 0 0 .7rem rgb(40 217 255 / 60%); }
.tc-pin { width: 1.1rem; height: 1.1rem; background: var(--pengpi-amber); clip-path: polygon(50% 100%, 0 40%, 0 0, 100% 0, 100% 40%); }
.tc-sub { width: fit-content; font-size: 1.05rem; font-weight: 700; color: var(--pengpi-ivory); padding: .1rem .8rem; border-radius: .4rem; background: rgb(5 10 22 / 75%); }
.tc-cheer { position: absolute; right: 5%; bottom: 0; display: flex; align-items: flex-end; gap: .6rem; transform: translateX(120%); }
.title-card.on .tc-cheer { animation: cheerin .45s .6s steps(5) forwards; }
@keyframes cheerin { to { transform: none; } }
.tc-cheer-img { height: min(58vh, 30rem); width: auto; image-rendering: pixelated; filter: drop-shadow(0 1rem 1rem rgb(0 0 0 / 35%)); order: 2; }
.tc-bubble { order: 1; max-width: 18rem; margin-bottom: 55%; padding: .7rem 1rem; border-radius: 1rem; background: var(--pengpi-ivory); color: var(--pengpi-ink); font-size: 1.05rem; font-weight: 700; line-height: 1.45;
  display: flex; flex-direction: column; gap: .2rem; box-shadow: 0 .5rem 1.2rem #0008; position: relative; }
.tc-bubble::after { content: ""; position: absolute; right: -.7rem; bottom: 1.2rem; border: .5rem solid transparent; border-left: .8rem solid var(--pengpi-ivory); }
.tc-bubble b { font-size: max(14px, .8rem); color: var(--pengpi-coral); }
.title-card.still .tc-band, .title-card.still .tc-body, .title-card.still .tc-cheer { animation: none !important; transform: none; clip-path: none; }
.title-card.still .tc-band { transform: skewY(-6deg); }

/* ---------- 同期介紹與段落開場：段落背景＋正式立繪 ---------- */
.scr-npc-wrap, .scr-route-wrap { background: var(--pengpi-midnight); }
.scr-npc { position: relative; min-height: 100%; padding: 1rem 1.4rem 0; display: flex; flex-direction: column; justify-content: center; gap: .8rem; max-width: 84rem; margin: 0 auto; isolation: isolate; }
.scr-npc::before { content: ""; position: fixed; inset: 0; z-index: -1; background: var(--board-bg) center / cover no-repeat; filter: brightness(.32) saturate(1.1); image-rendering: pixelated; }
.stage-head { display: flex; align-items: center; gap: .9rem; flex-wrap: wrap; padding-right: calc(var(--snd) + .6rem); }
.stage-no { padding: .1rem .7rem; border-radius: .4rem; background: var(--pengpi-coral); color: var(--pengpi-ivory); font-weight: 900; font-size: max(14px, .85rem); letter-spacing: .05em; }
.stage-head h2 { font-size: 1.8rem; font-weight: 900; text-shadow: 0 0 1rem rgb(40 217 255 / 35%); }
.stage-board { color: var(--pengpi-cyan); font-weight: 700; font-size: 1rem; }
.npc-lead { display: flex; align-items: center; gap: .6rem; color: var(--pengpi-ivory); font-size: .92rem; line-height: 1.5; padding: .5rem .8rem; border-radius: var(--radius-card);
  background: rgb(5 10 22 / 82%); border-left: .35rem solid var(--pengpi-violet); }
.lead-face { width: 2.4rem; height: 2.4rem; flex: none; image-rendering: pixelated; }
.lead-who { flex: none; padding: 0 .45rem; border-radius: .35rem; background: var(--pengpi-violet); color: var(--pengpi-ivory); font-size: max(14px, .8rem); }
.npc-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; align-items: stretch; }
.npc-card { position: relative; background: rgb(5 10 22 / 88%); border: 3px solid var(--nc, #34507f); border-radius: var(--radius-card); padding: .8rem .9rem;
  display: grid; grid-template-columns: 9.5rem 1fr; gap: .8rem; align-items: end; box-shadow: 0 0 1.2rem color-mix(in srgb, var(--nc) 25%, transparent); }
.npc-card.you { --nc: var(--pengpi-cyan); }
.npc-fig { position: relative; align-self: stretch; display: flex; align-items: flex-end; justify-content: center; min-height: 12rem; }
.npc-sprite { height: 13rem; width: auto; max-width: 100%; object-fit: contain; object-position: bottom; image-rendering: pixelated; filter: drop-shadow(0 .6rem .5rem rgb(0 0 0 / 30%)); }
.scr-npc.first .npc-sprite { height: 15.5rem; }
.scr-npc.first .npc-fig { min-height: 15rem; }
.scr-npc.first .npc-card { padding-top: 1.4rem; }
.npc-bubble { position: absolute; left: -.4rem; top: -1.7rem; z-index: 2; width: max-content; max-width: 10.4rem; padding: .45rem .7rem; border-radius: .8rem; background: var(--pengpi-ivory); color: var(--pengpi-ink);
  font-size: max(14px, .82rem); font-weight: 900; line-height: 1.35; box-shadow: 0 .3rem .8rem #0008; animation: bubblepop .3s steps(3) both; }
.npc-bubble::after { content: ""; position: absolute; left: 2.2rem; bottom: -.6rem; border: .4rem solid transparent; border-top: .6rem solid var(--pengpi-ivory); }
@keyframes bubblepop { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
.npc-info { display: flex; flex-direction: column; gap: .4rem; min-width: 0; }
.npc-card header { display: flex; flex-direction: column; gap: .1rem; }
.npc-card header small { color: var(--c-muted); font-size: max(14px, .72rem); }
.npc-name { display: block; font-size: 1.05rem; color: var(--nc); }
.npc-card.you .npc-name { color: var(--pengpi-cyan); }
.npc-ab { list-style: none; margin: 0; padding: 0; display: grid; gap: .2rem; }
.npc-ab li { display: grid; grid-template-columns: 2.4rem 1fr 1.7rem; gap: .4rem; align-items: center; font-size: max(14px, .72rem); }
.npc-ab li i { height: .55rem; background: linear-gradient(90deg, var(--sc) var(--v), #1f3158 var(--v)); clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%); }
.npc-ab li b { font-family: var(--font-number); text-align: right; }
.npc-ab li.strong span { color: var(--pengpi-amber); font-weight: 900; }
.npc-pred { font-size: max(14px, .82rem); } .npc-pred b { color: var(--pengpi-cyan); font-family: var(--font-number); font-size: 1rem; }
/* 同期卡的強項（2026-10-11 簡化：不列六科數字，只寫強項兩科） */
.npc-strong { display: flex; align-items: center; gap: .4rem; margin: 0; font-size: max(14px, .82rem); color: var(--c-muted); }
.npc-strong b { padding: .05rem .5rem; border-radius: .4rem; border: 2px solid var(--sc); color: var(--pengpi-ivory); font-weight: 900; }
/* 養成版開場只有一頁：字幕下面一行寫這一局要做什麼 */
.st-goal { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .7rem; margin: .1rem 0 0; font-size: max(14px, .9rem); font-weight: 700; color: var(--pengpi-ivory); }
.st-goal b { padding: .05rem .55rem; border-radius: .4rem; background: var(--pengpi-amber); color: var(--pengpi-ink); font-weight: 900; }
.st-goal span { color: var(--c-muted); font-weight: 500; }
/* FB、IG、LINE 內建瀏覽器直式打開：外層只放一個轉 90 度的 iframe（js/host/game.js turnShell） */
body.turn-shell { overflow: hidden; background: var(--pengpi-ink); }
#turn-frame { position: fixed; left: 0; top: 0; border: 0; transform-origin: 0 0; background: var(--pengpi-ink); }
.npc-rules { margin: 0; padding-left: 1.1rem; display: grid; gap: .3rem; font-size: max(14px, .82rem); line-height: 1.4; }
.npc-card.compact { grid-template-columns: 6.5rem 1fr; }
.npc-card.compact .npc-sprite { height: 8.5rem; }
.npc-card.compact .npc-fig { min-height: 8rem; }
.npc-card.out { border-style: dashed; opacity: .82; }
.npc-card.out .npc-sprite { filter: grayscale(.85) brightness(.75); }
.npc-out { font-size: max(14px, .85rem); color: var(--c-muted); font-style: italic; }
.npc-quote { display: none; }
.npc-card.you .npc-fig { min-height: 0; }

/* ---------- 主管會議（bg_meeting：暗場、4 個站位、4 盞聚光燈） ---------- */
.scr-meet { overflow: hidden !important; overflow: clip !important; background: #02050d; } /* clip：粒子、燈光超出畫面時也不能被捲動 */
.meet-stage { position: absolute; inset: 0; overflow: hidden; overflow: clip; }
.meet-bgbox { position: absolute; inset: 0; overflow: hidden; }
.meet-scene { position: absolute; left: 0; top: 0; width: 1920px; height: 1080px; transform-origin: 0 0; }
.meet-bg { position: absolute; left: 0; top: 0; width: 1920px; height: 1080px; image-rendering: pixelated; }
/* 燈光：開會時整場微亮、演出開始後壓暗，只剩被點到的人那一盞 */
.meet-scene::after { content: ""; position: absolute; inset: 0; z-index: 1; background: rgb(30 60 120 / 10%); transition: background 1s steps(5); }
.meet-stage.lights-dim .meet-scene::after { background: rgb(1 2 8 / 62%); }
.meet-stage.stage-host .meet-scene::after { background: rgb(120 20 60 / 14%); }
.meet-stage.stage-host.lights-dim .meet-scene::after { background: rgb(1 2 8 / 62%); }
.beam { position: absolute; left: 0; top: 96px; width: 1920px; height: 760px; z-index: 2; opacity: 0; mix-blend-mode: screen; transition: opacity .35s steps(3);
  background: linear-gradient(180deg, rgb(255 248 232 / 62%), rgb(255 230 190 / 16%) 85%, rgb(255 230 190 / 0%));
  clip-path: polygon(calc(var(--lx) - 26px) 0, calc(var(--lx) + 26px) 0, calc(var(--mx) + 170px) 100%, calc(var(--mx) - 170px) 100%); }
.pool { position: absolute; top: 830px; width: 380px; height: 84px; transform: translate(-50%, -50%); z-index: 2; border-radius: 50%; opacity: 0; transition: opacity .35s steps(3);
  background: radial-gradient(closest-side, rgb(255 244 220 / 70%), rgb(255 230 190 / 22%) 60%, transparent); mix-blend-mode: screen; }
.beam.on, .pool.on { opacity: 1; }
/* 四個站位：桌面依場景座標（.meet-cast 的 --s、--tx、--ty，ui.js fitScene）；每人寬 300、高 430（場景 px），腳踩在 y 830 */
.meet-cast { position: absolute; inset: 0; pointer-events: none; z-index: 3; }
.actor { position: absolute; left: calc((var(--tx) + (var(--mx) - 160) * var(--s)) * 1px); top: calc((var(--ty) + 400 * var(--s)) * 1px);
  width: calc(320px * var(--s)); height: calc(430px * var(--s)); }
.actor-fig { position: absolute; inset: 0; display: flex; align-items: flex-end; justify-content: center; transition: opacity .9s steps(6), transform .9s steps(6), filter .4s; }
.actor-img { height: calc(400px * var(--s)); width: auto; image-rendering: pixelated; filter: drop-shadow(0 .5rem .5rem rgb(0 0 0 / 40%)); }
.actor.kind-boss .actor-img { height: calc(440px * var(--s)); }
.actor-name { position: absolute; left: 50%; top: calc(100% + .25rem); transform: translateX(-50%); display: flex; align-items: center; gap: .35rem; white-space: nowrap;
  padding: .1rem .7rem; border-radius: .45rem; background: rgb(5 10 22 / 90%); border: 2px solid color-mix(in srgb, var(--nc) 70%, transparent); font-size: max(14px, .9rem); color: var(--pengpi-ivory); }
.actor-tag { font-style: normal; font-weight: 900; }
.actor-tag:empty { display: none; }
.actor-light { display: none; }
.meet-stage.sils .actor .actor-fig { filter: brightness(.42) saturate(.6); }
.meet-stage.sils .actor.lit .actor-fig { filter: brightness(1.08) drop-shadow(0 0 1.2rem rgb(255 248 232 / 40%)); }
.actor.lit .actor-name { border-color: var(--pengpi-ivory); }
.actor.stay .actor-tag { color: var(--pengpi-green); }
.actor.late .actor-tag { color: var(--pengpi-amber); }
.actor.exit .actor-tag { color: var(--pengpi-coral); }
.actor.exit.rerun .actor-tag { color: var(--pengpi-amber); }
.actor.exit .an-text { text-decoration: line-through; text-decoration-color: var(--pengpi-coral); text-decoration-thickness: 2px; }
.actor.gone .actor-fig { opacity: 0; transform: translate(14%, 6%); }
.actor.tense .actor-fig { animation: tremble .25s steps(2) infinite; }
@keyframes tremble { 50% { transform: translateX(3px); } }
.actor.res-promote .actor-img { filter: drop-shadow(0 0 1rem rgb(40 217 255 / 90%)); }
.actor.empty { display: none; }
.meet-title { position: absolute; left: 1.2rem; top: .9rem; z-index: 5; display: flex; flex-direction: column; gap: .2rem; padding: .4rem .9rem; border-radius: .6rem; background: rgb(5 10 22 / 86%);
  border-left: .35rem solid var(--pengpi-coral); }
.meet-title b { font-size: 1.3rem; font-weight: 900; color: var(--pengpi-ivory); }
.meet-title span { color: var(--c-muted); font-size: max(14px, .8rem); }
.meet-score { position: absolute; right: calc(var(--snd) + 1.2rem); top: .9rem; z-index: 5; font: 700 1.3rem var(--font-number); color: var(--pengpi-amber); padding: .2rem .7rem; border-radius: .5rem; background: rgb(5 10 22 / 86%); }
.meet-score:empty { display: none; }
.meet-cap { position: absolute; left: 50%; bottom: calc(max(48px, 2.8rem) + 1.6rem); transform: translateX(-50%); width: min(92%, 60rem); z-index: 6;
  background: rgb(5 10 22 / 92%); border: 2px solid var(--pengpi-slate); border-left: .5rem solid var(--pengpi-violet); border-radius: var(--radius-card); padding: .5rem 1rem;
  display: flex; gap: .7rem; align-items: center; min-height: 3.4rem; }
.meet-face { width: 2.6rem; height: 2.6rem; flex: none; image-rendering: pixelated; }
.meet-who { flex: none; padding: .1rem .5rem; border-radius: .35rem; background: var(--pengpi-violet); font-size: max(14px, .8rem); }
.meet-cap[data-who="栗子"] { border-left-color: #C98B4B; } .meet-cap[data-who="栗子"] .meet-who { background: #C98B4B; color: var(--pengpi-ink); }
.meet-cap[data-who="阿閃"] { border-left-color: #E8743B; } .meet-cap[data-who="阿閃"] .meet-who { background: #E8743B; color: var(--pengpi-ink); }
.meet-cap[data-who="墨墨"] { border-left-color: #6B8CAE; } .meet-cap[data-who="墨墨"] .meet-who { background: #6B8CAE; color: var(--pengpi-ink); }
.meet-cap[data-who="碰碰"] { border-left-color: var(--pengpi-coral); } .meet-cap[data-who="碰碰"] .meet-who { background: var(--pengpi-coral); }
.meet-cap[data-who="豆豆"] { border-left-color: #FFC857; } .meet-cap[data-who="豆豆"] .meet-who { background: #FFC857; color: var(--pengpi-ink); }
.meet-text { font-size: 1.15rem; line-height: 1.5; font-weight: 700; }
.meet-acts { position: absolute; left: 50%; bottom: .8rem; transform: translateX(-50%); width: min(92%, 60rem); z-index: 6; justify-content: center; min-height: max(48px, 2.8rem); }
.meet-acts .btn.primary { min-width: 12rem; }
.meet-skip { min-width: 7rem; min-height: max(52px, 3rem); position: absolute; right: 0; bottom: 0; }
/* 印章：蓋下去的衝擊（縮放 steps、整個舞台短暫震動、閃光、粒子） */
.stamp { position: absolute; left: 50%; top: 24%; transform: translate(-50%, 0) rotate(-8deg); padding: .3rem 1.4rem; border: .4rem double currentColor; border-radius: .6rem;
  font-size: 3.4rem; font-weight: 900; letter-spacing: .25rem; background: rgb(5 10 22 / 78%); z-index: 7; white-space: nowrap; animation: stamp-in .32s steps(4) both;
  box-shadow: 0 0 2rem color-mix(in srgb, currentColor 45%, transparent); text-shadow: 0 0 1rem currentColor; }
.stamp[hidden] { display: none; }
.stamp.promote { color: var(--pengpi-green); }
.stamp.retake, .stamp.rerun { color: var(--pengpi-amber); }
.stamp.micOff { color: var(--pengpi-coral); }
.stamp.still { animation: none; }
@keyframes stamp-in { from { transform: translate(-50%, 0) rotate(-8deg) scale(2.6); opacity: 0; } 70% { transform: translate(-50%, 0) rotate(-8deg) scale(.92); opacity: 1; } to { transform: translate(-50%, 0) rotate(-8deg) scale(1); opacity: 1; } }
/* 震動只動場景與站位（在舞台裡面，被 clip 裁掉，不會撐出捲動） */
.meet-stage.shake .meet-bgbox, .meet-stage.shake .meet-cast { animation: stageshake .4s steps(1) both; }
@keyframes stageshake { 0% { transform: translate(10px, 4px); } 20% { transform: translate(-9px, -5px); } 40% { transform: translate(6px, 3px); } 60% { transform: translate(-4px, 2px); } 80% { transform: translate(2px, -1px); } 100% { transform: none; } }
.meet-flash { position: absolute; inset: 0; z-index: 8; pointer-events: none; background: var(--pengpi-ivory); opacity: 0; }
.meet-flash.go { animation: flash .28s steps(3) both; }
@keyframes flash { 0% { opacity: .55; } 100% { opacity: 0; } }
.fx-layer { position: absolute; left: 50%; top: 32%; width: 0; height: 0; z-index: 8; pointer-events: none; }
.fx-p { position: absolute; left: 0; top: 0; width: .6rem; height: .6rem; background: var(--c); animation: fly var(--d) steps(8) forwards; }
.fx-dust { width: .8rem; height: .8rem; border-radius: 50%; opacity: .8; }
@keyframes fly { to { transform: translate(var(--dx), var(--dy)) rotate(var(--rot)); opacity: 0; } }

/* ---------- 職涯路線 ---------- */
.scr-route { position: relative; min-height: 100%; padding: 1rem 1.4rem 0; display: flex; flex-direction: column; justify-content: center; gap: .9rem; max-width: 84rem; margin: 0 auto; isolation: isolate; }
.scr-route::before { content: ""; position: fixed; inset: 0; z-index: -1; background: url("../assets/host/web/bg_board_writers.webp") center / cover no-repeat; filter: brightness(.3); image-rendering: pixelated; }
.route-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.route-card { background: rgb(5 10 22 / 90%); border: 3px solid var(--rc, #34507f); border-radius: var(--radius-card); padding: .9rem 1rem; display: flex; flex-direction: column; gap: .45rem;
  box-shadow: 0 0 1.2rem color-mix(in srgb, var(--rc) 30%, transparent); }
.route-badge { display: flex; align-items: center; gap: .5rem; font-size: max(14px, .8rem); font-weight: 900; color: var(--rc); }
.route-ico { width: 2.2rem; height: 2.2rem; border-radius: .5rem; background: var(--rc); display: inline-block;
  -webkit-mask: var(--m) center / 70% no-repeat; mask: var(--m) center / 70% no-repeat; }
.ico-arts { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3E%3Cpath d='M1 7h2l4-4-2-2-4 4z'/%3E%3C/svg%3E"); }
.ico-sci { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3E%3Cpath d='M0 1h8v5H5v1h1v1H2V7h1V6H0zM1 2v3h6V2z'/%3E%3C/svg%3E"); }
.ico-intl { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3E%3Cpath d='M3 0h2v4H3zM2 2h1v2a1 1 0 0 0 2 0V2h1v2a2 2 0 0 1-1.5 2v1H6v1H2V7h1.5V6A2 2 0 0 1 2 4z'/%3E%3C/svg%3E"); }
.route-card header { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; flex-wrap: wrap; }
.route-name { font-size: 1.35rem; font-weight: 900; color: var(--rc); }
.route-card header small { color: var(--c-muted); font-size: max(14px, .72rem); }
.route-blurb { font-size: .92rem; line-height: 1.45; }
.route-facts { list-style: none; margin: 0; padding: 0; display: grid; gap: .2rem; font-size: max(14px, .8rem); line-height: 1.4; }
.route-facts em { font-style: normal; display: inline-block; min-width: 3.4rem; margin-right: .3rem; color: var(--c-muted); font-weight: 700; }
.route-arts { --rc: #FF9FB0; } .route-sci { --rc: var(--pengpi-cyan); } .route-intl { --rc: var(--pengpi-green); }
.route-card .route-btn { margin-top: auto; width: 100%; min-height: max(64px, 3.4rem); border-width: 3px; }
.route-btn-arts { border-color: #FF9FB0; } .route-btn-sci { border-color: var(--pengpi-cyan); } .route-btn-intl { border-color: var(--pengpi-green); }
.route-btn .btn-main { font-size: 1.1rem; font-weight: 900; }

/* ---------- 結局：1600×900 插圖主視覺＋真文字標題＋職涯摘要 ---------- */
.scr-result-wrap { background: radial-gradient(90% 70% at 30% 0%, #142a5a, var(--pengpi-midnight) 55%, var(--pengpi-ink)); }
.scr-ending { min-height: 100%; padding: 1rem 1.4rem 0; display: flex; flex-direction: column; gap: .9rem; max-width: 90rem; margin: 0 auto; --tone: var(--pengpi-amber); }
.scr-ending.tone-cyan { --tone: var(--pengpi-cyan); } .scr-ending.tone-violet { --tone: #B79BFF; } .scr-ending.tone-coral { --tone: var(--pengpi-coral); } .scr-ending.tone-amber { --tone: #FFB347; }
.end-main { display: grid; grid-template-columns: 1.35fr 1fr; gap: 1.1rem; align-items: start; padding-right: calc(var(--snd) + .4rem); }
.end-hero { position: relative; margin: 0; border-radius: var(--radius-feature); overflow: hidden; border: 4px solid var(--tone); box-shadow: 0 0 2rem color-mix(in srgb, var(--tone) 40%, transparent), 0 1rem 2.4rem #000a;
  aspect-ratio: 16 / 9; background: #0b1630; animation: heroin .5s steps(5) both; }
@keyframes heroin { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0); } }
.end-art { display: block; width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; }
.end-head { position: absolute; left: 0; right: 0; bottom: 0; padding: 3rem 1.4rem 1rem; display: flex; flex-direction: column; gap: .2rem;
  background: linear-gradient(180deg, rgb(5 10 22 / 0%), rgb(5 10 22 / 88%) 55%); }
.res-kicker { display: inline-flex; align-items: center; gap: .6rem; font: 700 max(14px, .8rem) var(--font-body); color: var(--pengpi-cyan); letter-spacing: .1rem; }
.end-new { font-style: normal; padding: .05rem .5rem; border-radius: .35rem; background: var(--pengpi-amber); color: var(--pengpi-ink); letter-spacing: 0; animation: onairdot 1.2s steps(1) infinite; }
.end-head h2 { font-size: 3.4rem; font-weight: 900; line-height: 1.1; color: #FFF6E6; letter-spacing: .06em;
  text-shadow: 2px 0 0 var(--tone), -2px 0 0 var(--tone), 0 2px 0 var(--tone), 0 -2px 0 var(--tone), 0 0 .8rem var(--tone), 0 0 1.8rem color-mix(in srgb, var(--tone) 60%, transparent); }
.end-share { font-size: 1.2rem; font-weight: 900; color: var(--pengpi-ivory); text-shadow: 0 2px 4px #000; }
.end-side { display: flex; flex-direction: column; gap: .7rem; min-width: 0; }
.end-scene { margin: 0; padding: .7rem .9rem; border-radius: var(--radius-card); background: rgb(5 10 22 / 88%); border: 2px solid color-mix(in srgb, var(--tone) 60%, #1d3463); }
.end-scene figcaption { display: flex; flex-direction: column; gap: .4rem; }
.end-scene figcaption > b { font-size: 1.15rem; color: var(--tone); }
.end-line { display: flex; align-items: flex-start; gap: .5rem; font-size: 1rem; line-height: 1.5; }
.end-face { width: 2.4rem; height: 2.4rem; flex: none; image-rendering: pixelated; }
.end-line em { font-style: normal; flex: none; padding: 0 .45rem; border-radius: .35rem; background: var(--pengpi-violet); font-size: max(14px, .78rem); font-weight: 900; margin-top: .15rem; }
.tl { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: .45rem; }
.tl-stage { background: rgb(5 10 22 / 88%); border-radius: .7rem; padding: .35rem .6rem; display: grid; gap: .05rem; border-top: .25rem solid #34507f; font-size: max(14px, .8rem); }
.tl-stage b { font-size: max(14px, .66rem); color: var(--c-muted); }
.tl-stage span { font-weight: 900; }
.tl-stage small { font-size: max(14px, .66rem); color: var(--c-muted); }
.tl-stage.first { border-top-color: var(--pengpi-green); }
.tl-stage.via-meeting:not(.first) { border-top-color: var(--pengpi-amber); }
.tl-stage.via-standIn { border-top-color: #FFB347; }
.tl-stage:is(.via-micOff, .via-declined, .via-standInOut) { border-top-color: var(--pengpi-coral); }
.tl-stage.none { opacity: .45; }
.res-box { background: rgb(5 10 22 / 88%); border-radius: var(--radius-card); padding: .7rem .9rem; display: flex; flex-direction: column; gap: .4rem; font-size: .9rem; line-height: 1.45; border: 2px solid #1d3463; }
.res-box h3 { font-size: max(14px, .8rem); color: var(--pengpi-cyan); font-weight: 700; letter-spacing: .05em; }
.end-stats { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: .3rem .8rem; }
.end-stats div { display: flex; flex-direction: column; }
.end-stats dt { font-size: max(14px, .66rem); color: var(--c-muted); }
.end-stats dd { margin: 0; font-weight: 900; font-size: 1rem; }
.res-badges { display: flex; gap: .3rem; flex-wrap: wrap; }
.res-badges .badge { min-width: 2.4rem; height: 2rem; color: #8ea0c4; font-size: max(14px, .62rem); }
.res-badges .badge.on { color: #fff; }
.res-note { font-size: max(14px, .72rem); color: var(--c-muted); }
.end-cond { color: var(--pengpi-ivory); }
.end-more { display: grid; grid-template-columns: 1.35fr 1fr; gap: 1rem; align-items: start; }
.res-npcs { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.res-npc { display: grid; grid-template-columns: 3rem 1fr; gap: .6rem; align-items: start; padding: .4rem .55rem; border-radius: .6rem; background: #0b1630; border-left: .3rem solid var(--nc); }
.res-npc.out .res-npc-face { filter: grayscale(.8); }
.res-npc-face { width: 3rem; height: 3rem; image-rendering: pixelated; }
.res-npc-body { display: grid; gap: .05rem; min-width: 0; }
.res-npc .nm { color: var(--pengpi-ivory); }
.npc-check { font-size: max(14px, .72rem); }
.npc-check em { font-style: normal; font-weight: 900; }
.npc-check em.hit { color: var(--pengpi-green); }
.npc-check em.miss { color: var(--pengpi-coral); }
.share-box { display: flex; gap: .7rem; align-items: flex-start; }
.share-preview { display: block; height: auto; border-radius: .5rem; border: 2px solid #34507f; background: #0b1630; }
.share-preview.pv-wide { width: 72%; aspect-ratio: 1200 / 630; }
.share-preview.pv-story { width: calc(28% - .7rem); aspect-ratio: 1080 / 1920; }

/* ---------- 結局圖鑑 ---------- */
.scr-gallery-wrap { background: radial-gradient(90% 70% at 50% 0%, #1d1650, var(--pengpi-midnight) 55%, var(--pengpi-ink)); }
.scr-gallery { min-height: 100%; padding: 1rem 1.4rem 0; display: flex; flex-direction: column; justify-content: center; gap: .9rem; max-width: 84rem; margin: 0 auto; }
.gal-count { margin-left: auto; font-size: 1rem; font-weight: 700; color: var(--pengpi-muted); }
.gal-count b { font: 700 1.4rem var(--font-number); color: var(--pengpi-amber); }
.gal-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.gal-card { --tone: var(--pengpi-amber); border-radius: var(--radius-card); overflow: hidden; background: rgb(5 10 22 / 92%); border: 3px solid #26365a; display: flex; flex-direction: column; }
.gal-card.tone-cyan { --tone: var(--pengpi-cyan); } .gal-card.tone-violet { --tone: #B79BFF; } .gal-card.tone-coral { --tone: var(--pengpi-coral); } .gal-card.tone-amber { --tone: #FFB347; }
.gal-card.on { border-color: var(--tone); box-shadow: 0 0 1.2rem color-mix(in srgb, var(--tone) 35%, transparent); }
.gal-art { position: relative; aspect-ratio: 16 / 8; background: radial-gradient(60% 80% at 50% 100%, #1a2b55, #070d1d); overflow: hidden; display: flex; align-items: flex-end; justify-content: center; }
.gal-thumb { width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; }
.gal-sil { height: 86%; width: auto; image-rendering: pixelated; filter: brightness(0) drop-shadow(0 0 .5rem rgb(135 91 255 / 70%)); opacity: .85; }
.gal-q { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); font: 900 3.4rem/1 var(--font-body); color: var(--pengpi-amber); text-shadow: 0 0 1rem rgb(255 200 87 / 70%), 0 3px 0 #000; }
.gal-no { position: absolute; left: .5rem; top: .45rem; font: 700 max(14px, .66rem) var(--font-label); padding: .05rem .45rem; border-radius: .3rem; background: rgb(5 10 22 / 85%); color: var(--pengpi-muted); }
.gal-body { padding: .55rem .8rem .7rem; display: flex; flex-direction: column; gap: .2rem; }
.gal-name { font-size: 1.15rem; font-weight: 900; color: var(--tone); }
.gal-card.locked .gal-name { color: var(--pengpi-muted); letter-spacing: .2em; }
.gal-line { font-size: max(14px, .8rem); line-height: 1.45; color: var(--pengpi-ivory); }
.gal-card.locked .gal-line { color: var(--pengpi-muted); }

/* ---------- 問卷 ---------- */
.scr-survey-wrap, .scr-thanks-wrap { background: radial-gradient(90% 70% at 50% 0%, #142a5a, var(--pengpi-midnight) 55%, var(--pengpi-ink)); }
.scr-survey { min-height: 100%; padding: 1rem 1.4rem 0; display: flex; flex-direction: column; justify-content: center; gap: .7rem; max-width: 62rem; margin: 0 auto; }
.scr-survey h2, .scr-thanks h2 { font-size: 1.5rem; font-weight: 900; }
.sv-lead { color: var(--c-muted); font-size: max(14px, .85rem); }
.sv-row { display: flex; gap: .6rem 2rem; flex-wrap: wrap; }
.sv-q { display: flex; flex-direction: column; gap: .35rem; }
.sv-q h3 { font-size: .95rem; }
.sv-opts, .sv-tags { display: flex; gap: .5rem; flex-wrap: wrap; }
.sv-opt { min-width: 4.5rem; }
.sv-tag { min-height: 48px; }
.sv-opt[aria-pressed="true"], .sv-tag[aria-pressed="true"] { background: var(--pengpi-cyan); border-color: var(--pengpi-cyan); color: var(--pengpi-ink); }
#sv-text { width: 100%; font: inherit; font-size: max(16px, 1rem); padding: .5rem .7rem; border-radius: .6rem; border: 2px solid var(--pengpi-slate); background: #0b1630; color: var(--c-text); resize: vertical; min-height: 48px; }
.scr-thanks { min-height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1rem; padding: 1rem; text-align: center; }

/* ---------- 小提示與直式提示 ---------- */
.toast { position: absolute; left: 50%; top: 6rem; transform: translateX(-50%); z-index: 40; padding: .45rem 1.1rem; border-radius: .6rem; background: rgb(5 10 22 / 95%); border: 2px solid var(--pengpi-slate);
  font-weight: 700; font-size: max(14px, .9rem); pointer-events: none; animation: toast-in .25s steps(3) both; max-width: 92%; text-align: center; }
.toast.good { border-color: var(--pengpi-green); box-shadow: 0 0 .8rem rgb(75 227 163 / 35%); }
.toast.bad { border-color: var(--pengpi-coral); box-shadow: 0 0 .8rem rgb(255 93 115 / 35%); }
/* 棋盤 V2：流程板上的提示放在狀態列那一排的空位（不蓋住上排格子的名牌） */
#app[data-view="board"] > .toast { top: .55rem; left: auto; right: calc(var(--snd) * 2 + 2.6rem); transform: none; max-width: 42%; animation-name: toast-in-side; }
@keyframes toast-in-side { from { opacity: 0; transform: translateY(-.5rem); } to { opacity: 1; transform: none; } }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, -.5rem); } to { opacity: 1; transform: translate(-50%, 0); } }
#rotate-hint { display: none; }
@media (orientation: portrait) and (max-width: 600px) {
  #rotate-hint { display: flex; position: fixed; inset: 0; z-index: 99; background: var(--pengpi-ink); align-items: center; justify-content: center; text-align: center; padding: 1.5rem; }
  #rotate-hint > div { display: flex; flex-direction: column; gap: .8rem; align-items: center; }
  #rotate-hint p { font-size: 1.4rem; font-weight: 900; }
  #rotate-hint small { color: var(--c-muted); font-size: 14px; }
}

/* ==================== P3：模式選擇、排行榜、硬派、雙人對決 ==================== */
/* 首頁：主按鈕佔左邊兩列，右欄是結局圖鑑＋排行榜 */
.title-menu.placed .title-acts { grid-template-rows: 1fr 1fr; }
.title-menu.placed .title-acts .title-main { grid-row: 1 / 3; }
.title-menu.placed .title-acts .btn { min-height: 0; }
.title-acts .title-board { border-radius: 1rem; background: linear-gradient(180deg, #0f3446, #0a1f2c); border: 3px solid var(--pengpi-cyan); box-shadow: 0 0 .8rem rgb(40 217 255 / 30%); }
.title-acts .title-board .btn-main { font-size: 1.05rem; font-weight: 900; color: #d8f7ff; }
.title-acts .title-board .btn-sub { color: var(--pengpi-cyan); font-weight: 700; }
.title-acts .title-gallery .btn-main { font-size: 1.05rem; }
.title-extra { gap: .6rem; flex-wrap: wrap; }

/* 模式選擇：三張模式卡（1P／ARCADE／2P），比照常識升學記的三模式卡，用碰皮今夜秀的深藍卡＋霓虹描邊 */
#screen.scr-mode-wrap { background: linear-gradient(rgb(5 10 22 / 72%), rgb(5 10 22 / 92%)), url("../assets/ui/home/bg_home.webp") center / cover no-repeat, var(--pengpi-ink); }
.scr-mode { min-height: 100%; padding: 1rem 1.4rem 0; display: flex; flex-direction: column; justify-content: center; gap: 1rem; max-width: 86rem; margin: 0 auto; }
.mode-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; align-items: stretch; }
.mode-card { --mc: var(--pengpi-cyan); position: relative; display: flex; flex-direction: column; gap: .5rem; padding: 1.2rem 1.2rem 1rem; border-radius: var(--radius-feature);
  background: rgb(13 27 56 / 94%); border: 3px solid color-mix(in srgb, var(--mc) 75%, #34507f);
  box-shadow: 0 .8rem 2rem var(--pengpi-shadow), 0 0 1.4rem color-mix(in srgb, var(--mc) 25%, transparent); }
.mode-card::before { content: ""; position: absolute; left: 1rem; right: 1rem; top: .55rem; height: 3px; border-radius: 2px; background: var(--pengpi-violet); }
.mode-card.m-arcade { --mc: var(--pengpi-coral); }
.mode-card.m-duo { --mc: var(--pengpi-amber); }
.mc-top { display: flex; align-items: center; justify-content: space-between; margin-top: .3rem; }
.mc-tag { padding: .35rem .8rem; border-radius: .5rem; font: 700 1rem/1 var(--font-label); letter-spacing: .08em; background: var(--mc); color: var(--pengpi-ink); }
.mc-ico { width: 2.4rem; height: 2.4rem; background: var(--mc); -webkit-mask: var(--m) center / contain no-repeat; mask: var(--m) center / contain no-repeat; }
.ico-standard { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3E%3Cpath d='M3 0h2v1h1v2H5v1H3V3H2V1h1zM1 5h6v3H1z'/%3E%3C/svg%3E"); }
.ico-arcade { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3E%3Cpath d='M3 0h2v2H4.5v2H7v2H6v2H2V6H1V4h2.5V2H3z'/%3E%3C/svg%3E"); }
.ico-duo { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3E%3Cpath d='M1 1h2v2H1zM5 1h2v2H5zM0 4h4v3H0zM4 4h4v3H4z'/%3E%3C/svg%3E"); }
.mc-name { font-size: 2rem; font-weight: 900; color: #FFF1DE; letter-spacing: .04em; text-shadow: 0 0 .8rem color-mix(in srgb, var(--mc) 60%, transparent); }
.mc-sub { font-size: max(14px, .85rem); color: #c5d3f0; font-weight: 700; }
.mc-rules { margin: .2rem 0 0; padding-left: 1.1rem; display: grid; gap: .25rem; font-size: max(14px, .85rem); line-height: 1.4; color: var(--pengpi-ivory); }
.mc-rules li::marker { color: var(--mc); }
.mc-note { font-size: max(14px, .8rem); color: #a9b8d8; font-weight: 600; line-height: 1.35; }
.mc-acts { margin-top: auto; display: grid; gap: .5rem; padding-top: .6rem; }
.mc-acts .btn { width: 100%; }
.mode-btn { min-height: max(64px, 3.4rem); border-width: 3px; }
.mode-btn .btn-main { font-size: 1.1rem; font-weight: 900; }
.mb-arcade { border-color: var(--pengpi-coral); background: linear-gradient(180deg, #4a1630, #2a0c1c); }
.mb-duo { border-color: var(--pengpi-amber); background: linear-gradient(180deg, #4a3812, #2a1f08); }
.mb-practice { min-height: max(48px, 2.6rem); border-color: rgb(255 93 115 / 55%); }
.mode-acts { display: flex; justify-content: flex-end; }

/* 排行榜：同每日節目的排行榜（LEADERBOARD 小標、分頁鈕選中青色、深色等寬數字列、第一名琥珀色、灰字說明） */
#screen.scr-board-wrap { background: radial-gradient(90% 70% at 50% 0%, #142a5a, var(--pengpi-midnight) 55%, var(--pengpi-ink)); }
.scr-board { min-height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .8rem; padding: 1.2rem 1rem; }
.lb-title { display: flex; flex-direction: column; align-items: center; gap: .25rem; font-size: 2.2rem; font-weight: 900; color: #FFF1DE; letter-spacing: .08em; }
.lb-kicker { font: 700 max(14px, .8rem)/1 var(--font-label); letter-spacing: .22em; color: var(--pengpi-amber); }
.lb-sub { color: var(--pengpi-cyan); font-weight: 700; font-size: max(14px, .9rem); }
.lb-tabs { display: flex; gap: .8rem; }
.lb-tabs .btn { min-width: 7rem; }
.lb-tabs .btn[aria-selected="true"] { background: var(--pengpi-cyan); color: var(--pengpi-ink); border-color: var(--pengpi-cyan); }
.lb-list { width: min(100%, 42rem); margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: .5rem; max-height: 52vh; overflow: auto; overscroll-behavior: contain; }
.lb-list li { display: grid; grid-template-columns: 2.6rem 1fr auto 5.4rem; gap: .9rem; align-items: center; padding: .5rem 1.2rem; border-radius: var(--radius-control);
  background: rgb(5 10 22 / 92%); border: 2px solid rgb(101 120 159 / 50%); font: 700 1.2rem/1.3 var(--font-number); white-space: pre; }
.lb-list li.lb-row:first-child { color: var(--pengpi-amber); border-color: var(--pengpi-amber); }
.lb-end { font: 700 max(14px, .72rem) var(--font-body); color: var(--c-muted); white-space: nowrap; }
.lb-score { text-align: right; }
.lb-list li.lb-empty { display: block; text-align: center; font: 700 max(14px, .9rem)/1.5 var(--font-body); color: var(--c-muted); white-space: normal; }
.lb-mine { color: var(--pengpi-amber); font-weight: 700; font-size: max(14px, .9rem); }
.lb-mine[hidden] { display: none; }
.lb-note { color: var(--pengpi-muted); font-size: max(14px, .8rem); text-align: center; }
.lb-acts { display: flex; justify-content: center; }
.lb-acts .btn { min-width: 10rem; }

/* 狀態列：模式標籤（硬派計分局／練習局）、雙人「輪到誰」 */
.hud-mode { padding: .05rem .5rem; border-radius: .4rem; font-size: max(14px, .68rem); font-weight: 900; white-space: nowrap; border: 2px solid var(--pengpi-coral); color: #ffd0d7; background: rgb(255 93 115 / 12%); }
.hud-mode.practice { border-color: var(--pengpi-amber); color: #ffe6b0; background: rgb(255 200 87 / 10%); }
.hud-who { padding: .05rem .6rem; border-radius: .4rem; font-weight: 900; font-size: max(14px, .8rem); background: var(--pc); color: var(--pengpi-ink); white-space: nowrap; }
.hud-rank li.active { border-color: var(--nc); box-shadow: 0 0 .7rem color-mix(in srgb, var(--nc) 70%, transparent); }

/* 題卡：雙人「誰在作答」標籤 */
.q-who { flex: none; padding: .1rem .6rem; border-radius: .4rem; background: var(--pc); color: var(--pengpi-ink); font-weight: 900; font-size: max(14px, .9rem); }
.q-card.kind-buzz { border-color: var(--pc, var(--pengpi-amber)); box-shadow: 0 1.2rem 3rem var(--pengpi-shadow), 0 0 1.6rem color-mix(in srgb, var(--pc, #FFC857) 45%, transparent); }
.q-card.kind-duoCut { border-color: var(--pc, var(--pengpi-amber)); }

/* 雙人搶答：整個左半邊是 1P、右半邊是 2P（手機左右半邊觸控），題卡疊在中間、不擋觸控 */
#overlay.ov-buzz { padding: 0; background: rgb(2 5 13 / 90%); }
#panel.buzz { width: 100%; height: 100%; max-height: none; overflow: hidden; }
.buzz-wrap { position: relative; width: 100%; height: 100%; }
.buzz-btn { position: absolute; top: 0; bottom: 0; width: 50%; min-height: 0; border-radius: 0; border: 0; padding: 0 1.2%; justify-content: center; gap: .4rem;
  background: linear-gradient(90deg, color-mix(in srgb, var(--pc) 30%, #050a16), rgb(5 10 22 / 20%) 70%); }
.buzz-btn.p1 { left: 0; align-items: flex-start; border-right: 2px dashed rgb(255 255 255 / 12%); }
.buzz-btn.p2 { right: 0; align-items: flex-end; background: linear-gradient(270deg, color-mix(in srgb, var(--pc) 30%, #050a16), rgb(5 10 22 / 20%) 70%); }
.buzz-btn .btn-main, .buzz-btn .btn-sub { width: 19vw; text-align: center; white-space: normal; }
.buzz-btn .btn-main { font-size: 2rem; font-weight: 900; color: var(--pc); text-shadow: 0 0 1rem var(--pc); line-height: 1.15; }
.buzz-btn .btn-sub { color: var(--pengpi-ivory); font-size: max(14px, .9rem); }
.buzz-btn:hover:not(:disabled) { transform: none; filter: brightness(1.3); }
.buzz-btn.won { background: color-mix(in srgb, var(--pc) 60%, #050a16); }
.buzz-btn.won .btn-main { color: var(--pengpi-ivory); }
/* 搶答鈕上的頭像（1P 碰碰、2P 豆豆） */
.buzz-face { width: 5.5rem; height: 5.5rem; align-self: auto; margin: 0 calc((19vw - 5.5rem) / 2); border: 4px solid var(--pc); border-radius: 1rem; background: #0b1022; image-rendering: pixelated; box-shadow: 0 0 1rem color-mix(in srgb, var(--pc) 60%, transparent); }
.bk-m { display: none; }
/* 置中不用 transform（題卡本身有進場動畫會蓋掉 transform）：inset 0＋margin auto＋高度依內容 */
.buzz-card { position: absolute; inset: 0; margin: auto; height: fit-content; width: min(56%, 52rem); max-height: 94%; pointer-events: none; z-index: 2; border-color: var(--pengpi-amber); }
.bz-opts { display: grid; gap: .5rem .6rem; grid-template-columns: 1fr 1fr; }
.bz-opts.n3 { grid-template-columns: 1fr 1fr 1fr; }
.bz-opt { --k: var(--c-ans-a); display: flex; align-items: center; gap: .5rem; min-height: 3rem; padding: .3rem .6rem .3rem .3rem; border-radius: var(--radius-card);
  border: 2px dashed color-mix(in srgb, var(--k) 75%, transparent); color: var(--pengpi-ivory); font-weight: 700; font-size: 1rem; background: rgb(5 10 22 / 70%); }
.bz-opt.opt-b { --k: var(--c-ans-b); } .bz-opt.opt-c { --k: var(--c-ans-c); } .bz-opt.opt-d { --k: var(--c-ans-d); }
.bz-opt .opt-key { min-height: 2rem; }

/* 主播桌爭奪戰：比分板（先得 3 分） */
.race-board { position: absolute; left: 50%; top: .8rem; transform: translateX(-50%); z-index: 6; display: flex; align-items: center; gap: 1.2rem; padding: .4rem 1.2rem; border-radius: .8rem;
  background: rgb(5 10 22 / 92%); border: 3px solid var(--pengpi-amber); box-shadow: 0 0 1.2rem rgb(255 200 87 / 35%); }
.rb-p { display: flex; align-items: center; gap: .6rem; }
.rb-p b { font: 700 1.4rem/1 var(--font-label); color: var(--pc); }
.rb-pips { display: flex; gap: .3rem; }
.rb-pips i { width: 1.1rem; height: 1.1rem; border-radius: 50%; border: 2px solid var(--pc); }
.rb-pips i.on { background: var(--pc); box-shadow: 0 0 .5rem var(--pc); }
.rb-mid { display: flex; flex-direction: column; align-items: center; gap: .15rem; }
.rb-score { font: 700 2rem/1 var(--font-number); color: #FFF1DE; }
.rb-n { font-size: max(14px, .7rem); color: var(--c-muted); }
.final-race .meet-score { display: none; }
.duo-meet .actor.kind-you .actor-name { border-color: var(--nc); color: var(--nc); }
.actor.stay.res-promote .actor-tag { color: var(--pengpi-green); }

/* 雙人：段落開場兩張玩家卡、結果頁兩欄 */
.npc-row.duo-row { grid-template-columns: 1fr 1fr; }
.duo-card .npc-sprite { filter: drop-shadow(0 0 .8rem var(--nc)); }
.scr-duo-end { max-width: 92rem; }
.duo-end-head h2 { color: #FFF6E6; }
.duo-row-res { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; padding-right: calc(var(--snd) + .4rem); }
.duo-res { background: rgb(5 10 22 / 90%); border: 3px solid color-mix(in srgb, var(--pc) 55%, #26365a); border-radius: var(--radius-card); padding: .8rem; display: flex; flex-direction: column; gap: .5rem; min-width: 0; }
.duo-res.win { border-color: var(--pc); box-shadow: 0 0 1.6rem color-mix(in srgb, var(--pc) 45%, transparent); }
.duo-res.lose .duo-art img { filter: grayscale(.45) brightness(.8); }
.duo-art { position: relative; margin: 0; aspect-ratio: 16 / 8; border-radius: .7rem; overflow: hidden; background: #0b1630; }
.duo-art img { width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; display: block; }
.duo-stamp { position: absolute; right: 1rem; top: 1rem; transform: rotate(-8deg); padding: .1rem .8rem; border: .3rem double currentColor; border-radius: .5rem; font-size: 1.6rem; font-weight: 900;
  background: rgb(5 10 22 / 80%); text-shadow: 0 0 .8rem currentColor; white-space: nowrap; }
.duo-stamp.promote { color: var(--pengpi-green); }
.duo-stamp.micOff { color: var(--pengpi-coral); }
.duo-res header { display: flex; align-items: baseline; gap: .7rem; flex-wrap: wrap; }
.duo-name { padding: .05rem .6rem; border-radius: .4rem; background: var(--pc); color: var(--pengpi-ink); font-size: 1.1rem; }
.duo-res h3 { font-size: 1.5rem; font-weight: 900; color: #FFF6E6; }
.duo-res .end-share { font-size: 1rem; text-shadow: none; flex-basis: 100%; }
.duo-tl { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: .2rem .8rem; font-size: max(14px, .76rem); color: var(--c-muted); }

/* 硬派：結局頁的硬派成績、士氣歸零、練習接關 */
.arc-score { border-color: var(--pengpi-coral); }
.arc-score.pending { border-color: var(--pengpi-amber); }
.arc-big { display: flex; align-items: baseline; gap: .7rem; flex-wrap: wrap; }
.arc-big em { font-style: normal; color: var(--c-muted); font-size: max(14px, .8rem); }
.arc-big b { font: 700 2rem/1 var(--font-number); color: var(--pengpi-amber); }
.arc-big small { color: var(--c-muted); font-size: max(14px, .7rem); }
.arc-rank { color: var(--pengpi-ivory); font-weight: 700; }
.mic-off .save-title { color: var(--pengpi-coral); }
.scr-continue p { max-width: 42rem; line-height: 1.6; }
.scr-continue .res-acts { width: min(100%, 30rem); justify-content: center; }
.scr-continue .res-acts .btn { flex: 1 1 0; min-width: 0; }
.scr-continue .save-kicker { font-size: max(14px, .9rem); }
.net-retry p { text-align: center; }

/* ==================== 手機橫放（高度 ≤ 520px，例如 844×390）：每個畫面的專用排版 ==================== */
@media (max-height: 520px) {
  /* 安全邊距（GEMINI R3 第 1 點）：靠邊的介面一律 max(既有邊距, 安全區)；橫放時左右至少 12px */
  :root { --snd: 48px; --edge-l: max(12px, var(--sa-l)); --edge-r: max(12px, var(--sa-r)); --edge-t: max(4px, var(--sa-t)); --edge-b: var(--sa-b); }
  .btn { min-height: 48px; padding: .15rem .7rem; }
  .btn .btn-main { font-size: 15px; }
  .btn .btn-sub, .btn .btn-line { font-size: 14px; line-height: 1.25; }
  .btn.primary { min-height: 64px; padding: .2rem 1rem; }
  .btn.primary .btn-main { font-size: 17px; }
  /* 靜音、配音鈕：離開螢幕邊緣，改成和 ☰ 一樣的像素框（3px 外框、小圓角、硬陰影） */
  #snd { top: var(--edge-t); right: var(--edge-r); border-radius: 5px; border-width: 3px; box-shadow: 3px 3px 0 #02050d; }
  #vox { top: calc(var(--edge-t) + var(--snd) + 4px); right: var(--edge-r); border-radius: 5px; border-width: 3px; box-shadow: 3px 3px 0 #02050d; }
  #beta { font-size: 14px; bottom: var(--edge-b); right: var(--edge-r); border-radius: .3rem .3rem 0 0; }

  /* 棋盤 V2 手機（844×390，第三輪重排）：狀態列單列 48px（段落只留「第 1 段」、不顯示排名文字）；沒有右側欄，盤面佔滿全寬；
     字幕改成畫面下方的半透明橫條（高 50px、最多兩行、字 14px），左端常駐迷你主播桌黑皮（104×60）；骰子浮在右下角（76px）；
     名牌只留格名（科目色塊縮成小點）、字 14px；按鈕 ≥ 48px。字幕條與骰子區的尺寸和 ui.js 的 M_STRIP／M_DICE 一致 */
  #app[data-view="board"] { grid-template-columns: 1fr; grid-template-rows: calc(48px + var(--edge-t)) 1fr; }
  #app[data-view="board"] #hud { grid-column: 1; grid-row: 1; }
  #app[data-view="board"] #main { grid-column: 1; grid-row: 2; }
  #hud { min-height: 48px; padding: var(--edge-t) calc(var(--edge-r) + 52px) 0 var(--edge-l); gap: .4rem; }
  /* 流程板時配音鈕移到靜音鈕左邊（同一列）：由右往左 靜音｜配音｜☰，間隔 4px */
  #app[data-view="board"] #hud { padding-right: calc(var(--edge-r) + 104px); }
  #app[data-view="board"] ~ #vox { top: var(--edge-t); right: calc(var(--edge-r) + 52px); }
  /* 段落開場（同期介紹）也一樣排成一列：配音鈕原本在靜音鈕下面，會蓋住右邊那張卡片上的碰碰（負責人 2026-10-13 實機）；
     標題與黑皮那句話右邊留出兩顆按鈕的位置 */
  #app:has(.scr-stage) ~ #vox { top: var(--edge-t); right: calc(var(--edge-r) + 52px); }
  .scr-stage > .stage-head, .scr-stage > .npc-lead { margin-right: 108px; }
  .hud-me { gap: .6rem; padding: 2px 8px 2px 2px; flex-wrap: nowrap; border-radius: 5px; box-shadow: 3px 3px 0 #02050d; }
  .hs-title, .hud-me em { display: none; }
  .hud-stage { font-size: 14px; padding: 1px 6px; }
  .hud-total b { font-size: 15px; }
  .hud-morale i { width: 10px; height: 10px; }
  .hud-badges { gap: 3px; }
  .badge { min-width: 14px; width: 14px; height: 14px; padding: 0; border-radius: 3px; font-size: 14px; color: transparent !important; overflow: hidden; text-indent: 20px; border-width: 2px; }
  .hud-menu { width: 48px; height: 48px; border-radius: 5px; box-shadow: 3px 3px 0 #02050d; }
  /* ☰ 面板（REVIEW_R3）：窄面板（216px，約盤面四分之一）、標頭與排行列壓縮，同期排行排第一個，844×390 首屏完整看到全部玩家；其餘往下捲 */
  #hud-panel { top: calc(var(--edge-t) + 52px); right: var(--edge-r); width: 216px; max-height: calc(100% - var(--edge-t) - 56px - var(--edge-b)); padding: 2px 8px 8px; gap: 6px;
    border-radius: 6px; border-width: 3px; box-shadow: 4px 4px 0 #02050d, 0 .6rem 1.6rem rgb(0 0 0 / 70%); }
  .hp-head { order: 0; }
  .hp-sec { order: 2; }
  .hp-sec.hp-rank-sec { order: 1; }
  .hp-head .hp-close { min-width: 56px; padding: 0 .5rem; }
  .hp-head b, .hp-board b { font-size: 15px; }
  .hp-sec h3, .hp-board span, .hand-card .hc-long, .hc-desc, .hand-none, .hud-rank .nm, .hud-rank .kpi, .hud-rank .rk-sub, .hp-legend, .hud-route, .hud-who { font-size: 14px; }
  .hp-sec h3 { margin-bottom: 2px; line-height: 1.2; }
  .hud-rank { gap: 3px; }
  .hud-rank li { column-gap: 6px; padding: 1px 6px 1px 1px; border-radius: 5px; }
  .hud-rank .nm, .hud-rank .rk-sub { line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .rk-face { width: 30px; height: 30px; border-radius: 4px; }
  .rk { font-size: 14px; min-width: 14px; }

  /* 盤面 */
  .cell-plate { padding: 0 4px; gap: 3px; border-width: 1.5px; border-radius: 4px; font-size: 14px; }
  .cell-plate.t-exam { font-size: 15px; }
  .cell-tag { font-size: 14px; padding: 0 2px; }
  .cell-tag.subj, .cell-tag.stop { display: none; }
  .cell-dot { display: inline-block; }
  .cell-reach { font-size: 14px; height: 22px; min-width: 22px; top: -8px; right: -10px; }
  .tok-tag { font-size: 14px; }
  .fork-tip { padding: 2px 8px 3px; border-width: 2px; box-shadow: 3px 3px 0 #02050d; }
  #links .ln-arrow { stroke-width: 1px; }

  /* 主持與操作層（疊在盤面上）：下方字幕條、左端主播桌、右下骰子；有操作按鈕時骰子收起、按鈕浮在字幕條上方右側 */
  #app[data-view="board"] #dock { position: absolute; left: 0; right: 0; bottom: 0; height: 0; display: block; padding: 0; }
  #host-desk { position: absolute; left: var(--edge-l); bottom: var(--edge-b); width: 104px; height: 60px; aspect-ratio: auto; z-index: 2; }
  #host-desk .hd-heipi { left: 50%; bottom: 12px; height: 56px; }
  #host-desk .hd-desk { left: 0; bottom: 0; width: 104px; height: 24px; object-fit: cover; object-position: 50% 0; }
  #dialog { position: absolute; left: 0; right: calc(var(--edge-r) + 88px); bottom: 0; height: calc(50px + var(--edge-b)); margin: 0; padding: 3px 8px calc(3px + var(--edge-b)) calc(var(--edge-l) + 110px); overflow: hidden;
    display: grid; grid-template-columns: auto 1fr; grid-template-rows: 1fr 1fr; align-items: center; column-gap: 8px; row-gap: 0;
    border: 0; border-top: 2px solid rgb(135 91 255 / 70%); border-radius: 0; background: linear-gradient(180deg, rgb(5 10 22 / 70%), rgb(5 10 22 / 86%)); box-shadow: 0 -4px 12px rgb(0 0 0 / 35%); }
  #dlg-face { display: none !important; }
  #dlg-kicker { grid-column: 1; grid-row: 1; font-size: 14px; padding: 0 .35rem; line-height: 1.3; }
  #dlg-who { grid-column: 1; grid-row: 1 / 3; align-self: center; justify-self: start; font-size: 14px; padding: 0 .35rem; }
  #dialog:has(#dlg-kicker:not([hidden])) #dlg-who { grid-row: 2; }
  #dlg-text, #dlg-text[data-len] { grid-column: 2; grid-row: 1 / 3; font-size: 14px; line-height: 1.32; min-height: 0; -webkit-line-clamp: 2; text-shadow: 0 1px 2px #000; }
  #dice-box { position: absolute; right: var(--edge-r); bottom: calc(16px + var(--edge-b)); width: 84px; gap: 0; }   /* 底下讓出右下角的 Beta 小字 */
  #dice { width: 76px; height: 76px; }
  #dice-cap { font-size: 14px; white-space: nowrap; text-align: center; line-height: 1.2; min-height: 17px; margin-top: 7px; }
  #actions { position: absolute; right: var(--edge-r); left: auto; bottom: calc(58px + var(--edge-b)); width: min(300px, 42vw); max-width: none; display: grid; grid-template-columns: 1fr; gap: 8px; }
  #actions:has(> :nth-child(4)) { grid-template-columns: 1fr 1fr; width: min(420px, 56vw); }
  #actions:has(> :nth-child(4)) .btn.primary { grid-column: 1 / -1; }
  #actions .btn { min-width: 0; width: 100%; padding: .15rem .45rem; }
  #actions .btn.btn-px { width: calc(100% - 4px); }   /* 留出 4px 硬陰影，不貼到螢幕邊 */
  #dock:has(#actions .btn) #dice-box { display: none; }
  #dock:has(#actions .btn) #dialog { right: 0; }
  #app[data-cam="event"] #host-desk, #app[data-cam="event"] #dice-box { display: none; }
  #app[data-cam="event"] #dialog { right: 0; width: auto; justify-self: auto; padding-left: var(--edge-l); padding-right: var(--edge-r); border-color: rgb(255 93 115 / 80%); }
  #app[data-cam="event"] #dock:has(#actions .btn) #dialog { width: auto; }

  /* 題卡：用滿可用高度；四選項 2×2、每格 64px */
  #overlay { padding: max(.3rem, var(--sa-t)) max(.5rem, var(--sa-r)) max(.3rem, var(--sa-b)) max(.5rem, var(--sa-l)); }
  #panel { width: 100%; }
  .q-card { padding: .55rem .8rem .5rem; gap: .35rem; border-width: 3px; border-radius: 16px; }
  .q-card::before { top: .3rem; }
  .q-subj, .q-title { font-size: 14px; }
  .q-sec { font-size: 20px; }
  .q-bar { height: 5px; }
  .q-note { font-size: 14px; }
  .q-qbox { min-height: 0; padding: 0 .3rem; }
  .q-text[data-len] { font-size: 18px; line-height: 1.35; }
  .q-text[data-len="xl"] { font-size: 16px; }
  .q-opts { gap: .4rem .5rem; }
  .opt { min-height: 64px; font-size: 16px; padding: .2rem .6rem .2rem .3rem; gap: .5rem; border-radius: 12px; }
  .opt-key { width: 34px; min-height: 0; font-size: 17px; }
  .opt.tf { font-size: 18px; } .opt.tf .opt-key { font-size: 22px; width: 40px; }
  .opt.right::after, .opt.wrong::after { font-size: 14px; top: -11px; }
  .q-cards > small { font-size: 14px; }
  .card-btn .btn-sub { display: none; }
  .q-card.revealed { gap: .3rem; }
  .q-card.revealed .q-opts { display: none; }
  .q-card.revealed .q-text { font-size: 14px; line-height: 1.35; color: var(--c-muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-weight: 700; }
  .q-card.revealed .q-sec { display: none; }
  .q-result { padding: .4rem .7rem; gap: .2rem; }
  .q-verdict-row { top: -.4rem; margin-top: -.4rem; padding-top: .4rem; }
  .q-verdict { font-size: 20px; } .q-verdict .pts { font-size: 15px; }
  .q-answer { font-size: 15px; }
  .q-explain, .q-line, .q-tip { font-size: 14px; line-height: 1.4; }
  .q-tip-face { width: 26px; height: 26px; }
  .q-tip b { font-size: 14px; }
  .q-acts .btn { min-height: 64px; }

  /* 救一次 */
  .save-card-wrap { padding: .7rem .8rem .6rem; gap: .45rem; border-width: 3px; }
  .save-kicker { font-size: 14px; }
  .save-title { font-size: 24px; }
  .save-line { font-size: 14px; line-height: 1.4; }
  .save-acts { gap: .45rem; }
  .save-opt { min-height: 96px; padding: .3rem .5rem; }
  .save-opt .btn-main { font-size: 17px; }
  .save-opt .btn-ico { width: 30px; height: 30px; font-size: 14px; }
  .save-acts .save-no { min-height: 48px; }
  .share-pick-thumbs img { height: 110px; }
  .share-pick { padding: .6rem; gap: .5rem; }

  /* 首頁：右側直排選單；場景裡的大螢幕 logo 改到選單上方（場景縮小後字太小） */
  .st-tv, .title-top .pp-bug, .on-air, .title-lead { display: none; }
  .title-top { left: .4rem; top: .4rem; }
  .title-menu { right: .5rem; top: 50%; transform: translateY(-50%); width: 280px; padding: .6rem; display: flex; flex-direction: column; gap: .45rem;
    background: rgb(5 10 22 / 90%); border: 2px solid var(--pengpi-cyan); border-radius: 16px; box-shadow: 0 0 1rem rgb(40 217 255 / 25%); }
  .title-menu .hl-logo.in-menu { display: flex; }
  .hl-logo.in-menu .hl-en { display: none; }
  .hl-logo.in-menu .hl-zh { font-size: 26px; letter-spacing: 2px; }
  .hl-logo.in-menu .hl-sub { font-size: 14px; letter-spacing: 1px; }
  .title-acts { display: flex; flex-direction: column; gap: .4rem; }
  .title-acts .title-main .btn-main { font-size: 20px; }
  .title-acts .title-gallery .btn-main { font-size: 16px; }
  .title-save { font-size: 14px; color: var(--pengpi-muted); text-align: center; }
  .title-extra .btn { width: 100%; min-width: 0; }
  .title-home .btn .btn-main { font-size: 14px; }
  /* 開場字幕 */
  .st-dialog { padding: .4rem .7rem; gap: .25rem; width: 96%; bottom: .3rem; border-left-width: .35rem; }
  .st-face { width: 28px; height: 28px; }
  .st-who, .st-role, .st-step { font-size: 14px; }
  .st-text { font-size: 15px; line-height: 1.45; }
  .st-acts .btn { min-width: 7rem; }

  /* 節目字卡 */
  .tc-band { height: 64px; } .tc-band.b2 { top: calc(34% + 64px); height: 6px; }
  .tc-body { left: 6%; top: 16%; }
  .tc-no { font-size: 16px; } .tc-title { font-size: 40px; margin-top: .6rem; } .tc-place { font-size: 18px; margin-top: 1rem; } .tc-sub { font-size: 14px; }
  .tc-cheer-img { height: 230px; }
  .tc-bubble { font-size: 14px; max-width: 200px; margin-bottom: 120px; padding: .4rem .6rem; }
  .tc-bubble b { font-size: 14px; }

  /* 同期介紹：每張卡左立繪右資料；口頭禪泡泡在資料上方；六科兩欄；你的卡不放剪影 */
  .scr-npc { padding: .4rem .6rem 0; gap: .35rem; justify-content: flex-start; }
  .stage-head { gap: .5rem; }
  .stage-head h2 { font-size: 18px; }
  .stage-no, .stage-board { font-size: 14px; }
  .npc-lead { font-size: 14px; line-height: 1.35; padding: .25rem .5rem; gap: .4rem; }
  .npc-lead > span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .lead-face { width: 26px; height: 26px; }
  .lead-who { font-size: 14px; }
  .npc-row { gap: .4rem; }
  .npc-card { grid-template-columns: 78px 1fr; gap: .4rem; padding: .35rem .45rem; border-width: 2px; align-items: start; }
  .npc-fig { min-height: 0; flex-direction: column; justify-content: flex-start; align-items: center; }
  .npc-sprite { height: 108px; }
  .npc-bubble { position: static; order: -1; width: auto; max-width: none; font-size: 14px; padding: .15rem .35rem; border-radius: .5rem; margin-bottom: .2rem; display: none; }
  .npc-quote { display: block; font-size: 14px; line-height: 1.3; font-weight: 900; color: var(--pengpi-ink); background: var(--pengpi-ivory); padding: .05rem .4rem; border-radius: .45rem; width: fit-content; }
  .npc-info { gap: .15rem; }
  .npc-name { font-size: 15px; }
  .npc-card header small { font-size: 14px; }
  .npc-ab { grid-template-columns: 1fr 1fr; column-gap: .5rem; row-gap: 0; }
  .npc-ab li { grid-template-columns: 30px 1fr 22px; gap: .2rem; font-size: 14px; }
  .npc-ab li i { height: 6px; }
  .npc-pred, .npc-pred b, .npc-rules, .npc-out { font-size: 14px; }
  .npc-rules { gap: 0; line-height: 1.35; padding-left: 1rem; }
  .npc-card.you { grid-template-columns: 1fr; }
  .npc-card.you .npc-fig { display: none; }
  .npc-card.compact { grid-template-columns: 60px 1fr; }
  .npc-card.compact .npc-sprite { height: 80px; }
  .npc-card.compact .npc-fig { min-height: 0; }

  /* 主管會議：四人站成一排、各自的聚光燈（場景燈只在桌面對位）；字幕與按鈕在下方 */
  .beam, .pool { display: none; }
  .meet-title { left: .4rem; top: .3rem; padding: .1rem .5rem; flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 0 .5rem; border-left-width: .25rem; max-width: calc(100% - 9rem); }
  .meet-title b { font-size: 15px; }
  .meet-title span { font-size: 14px; }
  .meet-score { top: .3rem; right: 56px; font-size: 16px; padding: 0 .5rem; }
  .meet-cast { inset: 36px 0 auto; height: 178px; display: flex; justify-content: space-evenly; align-items: flex-end; padding: 0 .5rem; }
  .actor { position: relative; left: auto; top: auto; width: 22%; height: 150px; }
  .actor.empty { display: block; visibility: hidden; }
  .actor-img, .actor.kind-boss .actor-img { height: 140px; }
  .actor.kind-boss .actor-img { height: 150px; }
  .actor-name { font-size: 14px; padding: 0 .4rem; top: 100%; }
  .actor-light { display: block; position: absolute; left: 50%; bottom: 0; width: 170%; height: 190px; transform: translateX(-50%); opacity: 0; pointer-events: none; transition: opacity .35s steps(3);
    background: linear-gradient(180deg, rgb(255 248 232 / 0%), rgb(255 248 232 / 30%)); clip-path: polygon(44% 0, 56% 0, 100% 100%, 0 100%); }
  .actor.lit .actor-light { opacity: 1; }
  .meet-cap { bottom: 72px; width: calc(100% - 1rem); padding: .25rem .6rem; gap: .45rem; min-height: 0; border-left-width: .3rem; }
  .meet-face { width: 28px; height: 28px; }
  .meet-who { font-size: 14px; }
  .meet-text { font-size: 15px; line-height: 1.35; }
  .meet-acts { bottom: .25rem; width: calc(100% - 1rem); min-height: 64px; gap: .4rem; }
  .meet-skip { min-height: 48px; }
  .stamp { font-size: 30px; top: 18%; border-width: .3rem; padding: .1rem .8rem; }

  /* 職涯路線 */
  .scr-route { padding: .4rem .6rem 0; gap: .35rem; justify-content: flex-start; }
  .route-row { gap: .4rem; }
  .route-card { padding: .3rem .5rem; gap: .15rem; border-width: 2px; }
  .route-badge { font-size: 14px; } .route-ico { width: 24px; height: 24px; }
  .route-name { font-size: 17px; }
  .route-card header small, .route-blurb, .route-facts { font-size: 14px; line-height: 1.3; }
  .route-facts { gap: 0; }
  .route-facts em { min-width: 2.9rem; }
  .route-card .route-btn { min-height: 64px; }
  .route-btn .btn-main { font-size: 16px; }

  /* 結局：左插圖右摘要，往下捲看同期與分享卡；「再玩一次」固定在底部 */
  .scr-ending { padding: .4rem .6rem 0; gap: .45rem; --side: .6rem; }
  .end-main { grid-template-columns: 330px 1fr; gap: .5rem; padding-right: 50px; }
  .end-hero { border-width: 3px; border-radius: 14px; }
  .end-head { padding: 1.4rem .6rem .4rem; gap: 0; }
  .res-kicker { font-size: 14px; }
  .end-head h2 { font-size: 26px; }
  .end-share { font-size: 14px; }
  .end-side { gap: .35rem; }
  .end-scene { padding: .3rem .5rem; }
  .end-scene figcaption > b { font-size: 15px; }
  .end-line { font-size: 14px; line-height: 1.35; }
  .end-face { width: 24px; height: 24px; }
  .end-line em { font-size: 14px; }
  .tl { gap: .3rem; }
  .tl-stage { padding: .15rem .4rem; font-size: 14px; }
  .tl-stage b, .tl-stage small { font-size: 14px; }
  .tl-stage small:last-child { display: none; }
  .end-main .res-box.stats { grid-column: 1 / -1; }
  .res-box { padding: .35rem .55rem; gap: .2rem; font-size: 14px; }
  .res-box h3 { font-size: 14px; }
  .end-stats { grid-template-columns: repeat(4, auto); }
  .end-stats dt, .end-stats dd { font-size: 14px; }
  .res-badges .badge { min-width: 34px; width: auto; height: 24px; padding: 0 4px; border-radius: 12px; font-size: 14px; border-width: 2px; }
  .res-note, .npc-check { font-size: 14px; }
  .end-more { grid-template-columns: 1fr; gap: .45rem; }
  .res-npc { grid-template-columns: 30px 1fr; gap: .4rem; padding: .25rem .4rem; }
  .res-npc-face { width: 30px; height: 30px; }
  .share-box { max-width: 560px; }
  .res-acts .btn { min-width: 0; flex: 1 1 0; }

  /* 結局圖鑑：兩欄、每格左縮圖右文字 */
  .scr-gallery { padding: .4rem .6rem 0; gap: .4rem; justify-content: flex-start; --side: .6rem; }
  .gal-count { font-size: 14px; } .gal-count b { font-size: 18px; }
  .gal-grid { grid-template-columns: 1fr 1fr; gap: .4rem; }
  .gal-card { flex-direction: row; border-width: 2px; }
  .gal-art { width: 132px; flex: none; }
  .gal-q { font-size: 32px; }
  .gal-no { font-size: 14px; left: 3px; top: 3px; padding: 0 3px; }
  .gal-body { padding: .25rem .5rem; gap: 0; justify-content: center; }
  .gal-name { font-size: 15px; }
  .gal-line { font-size: 14px; line-height: 1.3; }

  /* 問卷 */
  .scr-survey { padding: .4rem .8rem 0; gap: .3rem; }
  .scr-survey h2, .scr-thanks h2 { font-size: 18px; }
  .sv-q h3 { font-size: 14px; }
  .sv-lead { font-size: 14px; }
  .sticky-acts { padding: .25rem 0; }
  .toast { font-size: 14px; top: calc(52px + var(--edge-t)); }
  /* 棋盤上的提示（GEMINI R3 第 3 點）：短版文字、最多兩行、字 14px；放在狀態列那一排的空白處（ui.js 量好 left／max-width），
     不蓋到盤面上排的名牌與可停格數字；放不下時改到字幕條上方 */
  #app[data-view="board"] > .toast { top: calc(var(--edge-t) + 2px); right: auto; left: auto; max-width: 46%; padding: 3px 10px; line-height: 1.3; border-width: 2px; border-radius: 5px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; text-align: left; box-shadow: 3px 3px 0 #02050d; }
  #app[data-view="board"] > .toast.in-hud { max-height: 44px; }
  #app[data-view="board"] > .toast.above-strip { top: auto; bottom: calc(58px + var(--edge-b)); left: 50%; transform: translateX(-50%); animation-name: toast-in; }
  .wc-card { padding: .9rem 1rem; gap: .5rem; }
  .wc-card p { font-size: 14px; line-height: 1.5; }
  .hl-logo.in-welcome .hl-zh { font-size: 28px; }
  .hl-logo.in-welcome .hl-sub { font-size: 14px; }
  .hl-logo.in-welcome .hl-en { display: none; }
  /* ---------- P3：首頁兩顆小按鈕並排、模式選擇、排行榜、搶答、比分板、雙人結果、硬派成績 ---------- */
  .title-acts { display: grid; grid-template-columns: 1fr 1fr; gap: .4rem; }
  .title-acts .title-main { grid-column: 1 / -1; }
  .title-acts .title-gallery .btn-main, .title-acts .title-board .btn-main { font-size: 15px; }
  .hud-mode { display: none; }
  .hud-who { font-size: 14px; padding: 0 .4rem; }

  .scr-mode { padding: .4rem 54px 0 .6rem; gap: .35rem; justify-content: flex-start; }
  .mode-head .stage-board { display: none; }
  .mode-row { gap: .4rem; }
  .mode-card { padding: .4rem .55rem .45rem; gap: .15rem; border-width: 2px; border-radius: 14px; }
  .mode-card::before { display: none; }
  .mc-top { margin-top: 0; }
  .mc-tag { font-size: 14px; padding: .15rem .45rem; }
  .mc-ico { width: 24px; height: 24px; }
  .mc-name { font-size: 19px; }
  .mc-sub, .mc-rules { font-size: 14px; line-height: 1.3; }
  .mc-rules { gap: 0; padding-left: .9rem; margin: 0; }
  .mc-note { font-size: 14px; line-height: 1.2; }
  .mc-acts { gap: .3rem; padding-top: .25rem; }
  .mode-btn { min-height: 64px; }
  .mode-btn .btn-main { font-size: 16px; }
  .mb-practice { min-height: 48px; }

  .scr-board { gap: .3rem; padding: .4rem .6rem; justify-content: flex-start; }
  .lb-title { font-size: 20px; flex-direction: row; gap: .6rem; align-items: baseline; }
  .lb-kicker, .lb-sub, .lb-note, .lb-mine { font-size: 14px; }
  .lb-tabs { gap: .4rem; }
  .lb-tabs .btn { min-width: 5rem; }
  .lb-list { max-height: 150px; gap: .3rem; }
  .lb-list li { font-size: 15px; padding: .15rem .7rem; gap: .5rem; grid-template-columns: 2rem 1fr auto 4rem; }
  .lb-end, .lb-list li.lb-empty { font-size: 14px; }

  .buzz-card { width: 58%; }
  .buzz-btn { padding: 0 .6%; }
  .buzz-btn .btn-main { font-size: 18px; }
  .buzz-btn .btn-sub { font-size: 14px; }
  .buzz-face { width: 44px; height: 44px; border-width: 3px; border-radius: 10px; margin: 0 calc((19vw - 44px) / 2); }
  .bk-desk { display: none; }
  .bk-m { display: inline; }
  .bz-opts { gap: .3rem .4rem; }
  .bz-opt { min-height: 34px; font-size: 14px; padding: .1rem .4rem .1rem .2rem; gap: .3rem; border-radius: 10px; }
  .bz-opt .opt-key { width: 26px; min-height: 0; font-size: 14px; }
  .q-who { font-size: 14px; padding: 0 .4rem; }

  .race-board { left: auto; right: 52px; top: 2px; transform: none; padding: .1rem .5rem; gap: .5rem; border-width: 2px; }
  .rb-p { gap: .3rem; }
  .rb-p b { font-size: 15px; }
  .rb-pips i { width: 12px; height: 12px; }
  .rb-score { font-size: 18px; }
  .rb-n { font-size: 14px; }
  .final-race .meet-title { max-width: 38%; }

  .npc-row.duo-row { grid-template-columns: 1fr 1fr; }
  .duo-row-res { gap: .4rem; padding-right: 50px; }
  .duo-res { padding: .35rem; gap: .25rem; border-width: 2px; }
  .duo-art { aspect-ratio: 16 / 6; }
  .duo-stamp { font-size: 18px; right: .4rem; top: .4rem; border-width: .2rem; }
  .duo-res h3 { font-size: 17px; }
  .duo-name { font-size: 15px; }
  .duo-res .end-share { font-size: 14px; }
  .duo-tl { font-size: 14px; grid-template-columns: 1fr; }
  .duo-row-res .end-stats { grid-template-columns: 1fr 1fr; }

  .arc-big b { font-size: 22px; }
  .scr-continue p { font-size: 14px; }

}

/* ---------- 減少動態：取消位移、縮放、閃爍、震動與粒子，只保留透明度切換與停頓（判分資訊不靠動畫） ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .fx-layer, .meet-flash { display: none; }
  .title-card .tc-band { transform: skewY(-6deg) !important; }
  .title-card .tc-body { clip-path: none !important; }
  .title-card .tc-cheer { transform: none !important; }
  .actor.gone .actor-fig { transform: none; }
  /* 棋盤 V2：鏡頭直接切換（上面已取消 transition）；骰子不翻滾，結果直接淡入 */
  #dice.fade img { animation: dicefade .3s linear !important; }
}

/* ---------- 主角碰碰（assets/host/web/pp_*.webp；雙人對決 2P 豆豆 doudou_*）：2026-10-07 起取代人類實習生 ---------- */
/* 升職字卡：碰碰（cheer）站在黑皮或同期旁邊一起歡呼 */
.tc-cheer.with-you { gap: .2rem; }
.tc-cheer-img.tc-you { order: 3; } /* 碰碰和同期一樣高（立繪都是 420px），不另外縮小 */
/* 結局頁：碰碰站在場景說明卡左邊 */
.end-scene:has(.end-you) { display: flex; align-items: flex-end; gap: .8rem; }
.end-you { height: 8.5rem; width: auto; flex: none; image-rendering: pixelated; filter: drop-shadow(0 .4rem .4rem rgb(0 0 0 / 35%)); margin-bottom: -.2rem; }
.end-scene figcaption { flex: 1; min-width: 0; }
/* 分享選單：分享連結的狀態 */
.share-link { margin: 0; font-size: max(14px, .85rem); color: var(--pengpi-muted); text-align: center; }

/* ---------- P4 雙人對決結果：攝影棚（勝者坐上主播桌、敗者站在桌旁）＋兩欄成績＋雙人分享卡 ---------- */
.scr-duo-end { padding-top: 0; }
.ds-hero { position: relative; height: min(58vh, 620px); min-height: 300px; margin: 0 calc(-1 * var(--gutter, 0px)) .8rem; border-radius: 0 0 var(--radius-card) var(--radius-card); overflow: hidden; }
.duo-studio { position: absolute; inset: 0; }
.duo-scene .ds-tv { flex-direction: column; gap: 0; text-align: center; }
.ds-kicker { font: 700 30px var(--font-label, sans-serif); letter-spacing: .06em; color: var(--pengpi-cyan); text-shadow: 0 0 12px rgb(40 217 255 / 60%); }
.ds-big { font-size: 64px; font-weight: 900; line-height: 1.05; color: #FFF1DE; text-shadow: 0 0 6px #875BFF, 3px 0 0 #28D9FF, -3px 0 0 #28D9FF, 0 3px 0 #28D9FF, 0 -3px 0 #28D9FF; }
.ds-sub { font-size: 26px; color: var(--pengpi-muted); }
.ds-winner { left: 965px; top: 300px; height: 380px; width: auto; transform: translateX(-50%); filter: drop-shadow(0 0 18px rgb(255 248 232 / 35%)); }
.ds-loser { left: 505px; top: 400px; height: 370px; width: auto; transform: translateX(-50%); filter: brightness(.82) drop-shadow(0 12px 10px rgb(0 0 0 / 35%)); }
.ds-heipi { left: 1420px; top: 330px; height: 440px; width: auto; transform: translateX(-50%); filter: drop-shadow(0 12px 10px rgb(0 0 0 / 30%)); }
.ds-plate { position: absolute; transform: translateX(-50%); display: flex; align-items: center; gap: 14px; padding: 6px 22px; border-radius: 14px; white-space: nowrap;
  background: rgb(5 10 22 / 92%); border: 5px solid var(--pc); box-shadow: 0 0 18px color-mix(in srgb, var(--pc) 60%, transparent); }
.ds-plate b { font: 900 46px var(--font-label, sans-serif); color: var(--pc); }
.ds-plate span { font-size: 40px; font-weight: 900; color: var(--pengpi-ivory); }
.ds-desk-plate { left: 965px; top: 540px; } /* 放在桌面上緣：再低會被結果字幕條蓋住 */
.ds-loser-plate { left: 505px; top: 318px; } /* 名牌放在敗者頭上（下方會被結果字幕條蓋住） */
.ds-loser-plate span { color: var(--pengpi-coral); }
.ds-hero .duo-end-head { position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; margin: 0; padding: .6rem 1.2rem; display: flex; align-items: baseline; gap: .4rem 1rem; flex-wrap: wrap;
  background: linear-gradient(90deg, rgb(5 10 22 / 94%), rgb(5 10 22 / 80%) 60%, rgb(5 10 22 / 30%)); border-top: 3px solid var(--pengpi-coral); }
.ds-hero .duo-end-head h2 { font-size: 1.8rem; }
.duo-art .duo-you { position: absolute; left: .6rem; bottom: 0; height: 72%; width: auto; object-fit: contain; image-rendering: pixelated; filter: drop-shadow(0 0 .6rem color-mix(in srgb, var(--pc) 70%, transparent)); }
.duo-res.lose .duo-art .duo-you { filter: none; }
/* 2P 豆豆的結局欄：場景背景（結局插圖畫的是碰碰），豆豆站中間 */
.duo-art.dd-scene .duo-you { left: 50%; transform: translateX(-50%); height: 82%; }
.duo-share .share-box { justify-content: center; }
.pv-duo { max-width: min(100%, 40rem); }

@media (max-height: 520px) {
  /* 手機：碰碰縮成小立繪放在卡片右上角（名字那兩行旁邊），規則文字照舊用整張卡寬 */
  .npc-card.you { position: relative; }
  .npc-card.you .npc-fig { display: block; position: absolute; right: .35rem; top: .25rem; }
  .npc-card.you .npc-sprite { height: 60px; filter: none; }
  .npc-card.you header { min-height: 56px; padding-right: 40px; }
  .tc-cheer-img.tc-you { height: 230px; }
  .end-you { height: 92px; }
  .end-scene:has(.end-you) { gap: .45rem; }
  .ds-hero { height: 300px; min-height: 0; margin-bottom: .4rem; }
  .duo-scene .st-tv.ds-tv { display: flex; } /* 首頁的大螢幕在手機收起，雙人結果的大螢幕要顯示比分 */
  .ds-hero .duo-end-head { padding: .25rem .6rem; gap: 0 .6rem; }
  .ds-hero .duo-end-head h2 { font-size: 20px; }
  .duo-art .duo-you { height: 92%; left: .3rem; }
  .pv-duo { max-width: 100%; }
}
