/* 數位發展部報告｜簡報樣式：工程藍圖風（預設深藍藍圖，可切白底藍線）
 * 與中正工作坊（米白紙＋橘色玻璃卡）刻意區隔：格線底、細線框、角標、等寬數字、綠色「通過」訊號 */
:root,
[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0a1d33;
  --bg2: #0e2744;
  --grid: rgba(110, 170, 240, .09);
  --grid-major: rgba(110, 170, 240, .16);
  --panel: rgba(14, 39, 68, .82);
  --panel-solid: #0f2a49;
  --ink: #eaf2ff;
  --muted: #9fb6d2;
  --line: #2f5a86;
  --line-soft: rgba(94, 200, 255, .22);
  --pass: #3ddc97;
  --pass-ink: #3ddc97;
  --amber: #ffc857;
  --cyan: #5ec8ff;
  --danger: #ff7a7a;
  --shadow: 0 0 0 1px rgba(94, 200, 255, .08), 0 18px 40px rgba(0, 0, 0, .35);
}
[data-theme="light"] {
  --bg: #f6f9fd;
  --bg2: #eaf1fa;
  --grid: rgba(30, 90, 170, .07);
  --grid-major: rgba(30, 90, 170, .13);
  --panel: rgba(255, 255, 255, .9);
  --panel-solid: #ffffff;
  --ink: #0d2240;
  --muted: #4a6283;
  --line: #9db7d6;
  --line-soft: rgba(20, 110, 190, .18);
  --pass: #11935f;
  --pass-ink: #0b7a4e;
  --amber: #8a5a00;
  --cyan: #0b6fb3;
  --danger: #c62828;
  --shadow: 0 0 0 1px rgba(20, 80, 150, .08), 0 8px 22px rgba(20, 50, 90, .14);
}
/* 白底：面板改為不透明白色＋較深的框線，才不會被格線底透出來、和背景糊在一起；琥珀色加深到文字可讀 */
[data-theme="light"] {
  color-scheme: light;
  --panel: #ffffff;
  --line: #7f9fc6;
}

html, body { background: var(--bg); color: var(--ink); }
.reveal-viewport {
  background-color: var(--bg);
  background-image:
    linear-gradient(var(--grid-major) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-major) 1px, transparent 1px),
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 160px 160px, 160px 160px, 32px 32px, 32px 32px;
  background-position: -1px -1px;
}
/* 手機（上下捲動檢視）：Reveal 會把每一頁的背景以「當下算出的顏色」寫死在 .scroll-page 的 inline style，
 * 切換深淺底色後這些頁面背景不會跟著變（白底模式下仍是深藍底，文字區塊顏色就對不上），所以用 !important 讓它跟著主題變數走。 */
.reveal-scroll .scroll-page {
  background-color: var(--bg) !important;
  background-image:
    linear-gradient(var(--grid-major) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-major) 1px, transparent 1px),
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px) !important;
  background-size: 160px 160px, 160px 160px, 32px 32px, 32px 32px !important;
  background-position: -1px -1px !important;
}
.reveal {
  font-family: 'Noto Sans TC', 'Microsoft JhengHei', sans-serif;
  font-size: 30px;
  color: var(--ink);
  line-height: 1.5;
}
.reveal .slides { text-align: left; }
.reveal .slides > section { height: 720px; box-sizing: border-box; padding: 0; }
.reveal .controls { color: var(--cyan); }
.reveal .progress { color: var(--pass); height: 4px; }
.reveal .slide-number {
  background: transparent; color: var(--muted); right: 18px; bottom: 12px;
  font: 500 15px 'JetBrains Mono', monospace;
}
.reveal .slides section .fragment { opacity: 1; visibility: inherit; transition: none; }
html.print-pdf .reveal .slides section .fragment { opacity: 1 !important; visibility: visible !important; }

.reveal h1, .reveal h2, .reveal h3 {
  font-family: inherit; color: var(--ink); text-transform: none; letter-spacing: 0; margin: 0; text-shadow: none;
}
.reveal h1 { font-size: 72px; font-weight: 900; line-height: 1.18; }
.reveal h2 { font-size: 52px; font-weight: 900; line-height: 1.22; margin-bottom: 22px; }
.reveal h3 { font-size: 31px; font-weight: 700; line-height: 1.3; margin-bottom: 8px; }
.reveal p { margin: 0 0 12px; }
.reveal a { color: var(--cyan); }
.reveal ul, .reveal ol { margin: 0 0 0 1.1em; }
.reveal li { margin: 6px 0; }
.mono, .num, .kicker, .tag, .stamp { font-family: 'JetBrains Mono', 'Consolas', monospace; }
.muted { color: var(--muted); }
.small { font-size: 24px; }
.tiny { font-size: 18px; }
.em { color: var(--pass-ink); font-weight: 700; }
.amber { color: var(--amber); }
.cyan { color: var(--cyan); }

/* 版面 */
.s { position: relative; height: 720px; padding: 40px 56px 46px; box-sizing: border-box; display: flex; flex-direction: column; }
.s.center { justify-content: center; }
.grow { flex: 1; min-height: 0; }
.g2 { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.g3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.g4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.g-7-5 { display: grid; grid-template-columns: 7fr 5fr; gap: 26px; }
.g-5-7 { display: grid; grid-template-columns: 5fr 7fr; gap: 26px; }
.row { display: flex; gap: 18px; align-items: center; }

/* 章節標籤：像程式註解 */
.kicker {
  display: inline-flex; align-items: center; gap: 12px; align-self: flex-start;
  font-size: 19px; letter-spacing: .06em; color: var(--cyan); margin-bottom: 10px;
}
.kicker::before { content: ''; width: 34px; height: 2px; background: var(--cyan); }
.kicker b { color: var(--pass-ink); font-weight: 700; }

/* 藍圖面板：細框＋四角定位標記 */
.panel {
  position: relative; background: var(--panel); border: 1px solid var(--line);
  padding: 20px 24px; box-shadow: var(--shadow); box-sizing: border-box;
}
.panel::before, .panel::after {
  content: ''; position: absolute; width: 14px; height: 14px; border-color: var(--cyan); border-style: solid;
}
.panel::before { top: -1px; left: -1px; border-width: 2px 0 0 2px; }
.panel::after { bottom: -1px; right: -1px; border-width: 0 2px 2px 0; }
.panel.pass { border-color: color-mix(in srgb, var(--pass) 60%, var(--line)); }
.panel.pass::before, .panel.pass::after { border-color: var(--pass); }
.panel.amber::before, .panel.amber::after { border-color: var(--amber); }
/* 琥珀面板：只有框線、標籤與項目符號用琥珀色，內文維持一般文字色（白底時整塊內文變琥珀色又淡又難讀） */
[data-theme="light"] .panel.amber { color: var(--ink); border-color: color-mix(in srgb, var(--amber) 55%, var(--line)); }
.panel.amber li::marker { color: var(--amber); }
.panel.amber .tag { border-color: var(--amber); color: var(--amber); }
.panel h3 { font-size: 29px; }
.panel p, .panel li { font-size: 25px; }
.panel .tag {
  display: inline-block; font-size: 16px; padding: 2px 10px; border: 1px solid var(--line); color: var(--muted);
  margin-bottom: 8px; letter-spacing: .05em;
}

/* 大數字 */
.stat { text-align: left; }
.stat .num { display: block; font-size: 76px; font-weight: 700; line-height: 1.05; color: var(--pass-ink); letter-spacing: -.02em; }
.stat .num small { font-size: 32px; color: var(--muted); margin-left: 6px; font-weight: 500; }
.stat .lbl { display: block; font-size: 24px; color: var(--muted); margin-top: 6px; }
.stat.amber .num { color: var(--amber); }
.stat.cyan .num { color: var(--cyan); }

/* 封面 */
.cover h1 { font-size: 70px; }
.cover .stamp {
  display: inline-block; align-self: flex-start; font-size: 20px; letter-spacing: .08em; color: var(--pass-ink);
  border: 2px solid var(--pass); padding: 6px 16px; margin-bottom: 26px;
}
.cover .sub { font-size: 34px; color: var(--muted); margin-top: 16px; }
.cover .meta { font-size: 25px; margin-top: 34px; line-height: 1.7; }
.cover .meta b { color: var(--ink); }
.cover-art { position: absolute; right: 56px; top: 50%; transform: translateY(-50%); width: 420px; opacity: .92; }
.cover-art td { white-space: nowrap; }

/* 章節頁 */
.chapter .no { font: 700 150px/1 'JetBrains Mono', monospace; color: transparent; -webkit-text-stroke: 2px var(--cyan); opacity: .7; }
.chapter h2 { font-size: 66px; margin-top: 8px; }
.chapter p { font-size: 30px; color: var(--muted); }

/* 議程 */
.agenda { display: grid; grid-template-columns: 1fr 1fr; grid-auto-flow: column; grid-template-rows: repeat(4, 1fr); gap: 0 44px; }
.agenda .it {
  display: grid; grid-template-columns: 64px 1fr 92px; align-items: center; gap: 14px;
  border-bottom: 1px dashed var(--line); padding: 10px 4px;
}
.agenda .n { font: 700 34px 'JetBrains Mono', monospace; color: var(--cyan); }
.agenda .t { font-size: 32px; font-weight: 700; }
.agenda .t span { display: block; font-size: 21px; font-weight: 400; color: var(--muted); }
.agenda .m { font: 500 22px 'JetBrains Mono', monospace; color: var(--muted); text-align: right; }

/* 流程 */
.flow { display: flex; align-items: stretch; gap: 0; }
.flow .step { flex: 1; text-align: center; padding: 22px 12px; }
.flow .step .ic { font-size: 50px; line-height: 1; }
.flow .step h3 { font-size: 28px; margin: 12px 0 6px; }
.flow .step p { font-size: 21px; color: var(--muted); margin: 0; }
.flow .arrow { align-self: center; width: 46px; height: 2px; background: var(--cyan); position: relative; flex: none; }
.flow .arrow::after { content: ''; position: absolute; right: -2px; top: -6px; border: 7px solid transparent; border-left: 10px solid var(--cyan); }

/* 長條圖 */
.bars { display: flex; flex-direction: column; gap: 11px; }
.bars .b { display: grid; grid-template-columns: 150px 1fr 70px; align-items: center; gap: 14px; font-size: 24px; }
.bars .track { height: 26px; background: var(--grid-major); position: relative; }
.bars .fill { position: absolute; inset: 0 auto 0 0; width: var(--w); background: var(--cyan); transform-origin: left; }
.bars .b:first-child .fill { background: var(--pass); }
.bars .v { font: 700 24px 'JetBrains Mono', monospace; text-align: right; }

/* 每月折線（直條） */
.cols { display: flex; align-items: flex-end; gap: 14px; height: 300px; border-bottom: 2px solid var(--line); padding: 0 6px; }
.cols .c { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; }
.cols .c i { display: block; width: 100%; height: var(--h); background: linear-gradient(var(--cyan), color-mix(in srgb, var(--cyan) 40%, transparent)); transform-origin: bottom; }
.cols .c b { font: 600 17px 'JetBrains Mono', monospace; color: var(--muted); margin-bottom: 6px; }
.cols .c.partial i { background: repeating-linear-gradient(45deg, var(--cyan) 0 6px, transparent 6px 12px); opacity: .7; }
.cols-x { display: flex; gap: 14px; padding: 6px 6px 0; }
.cols-x span { flex: 1; text-align: center; font: 500 17px 'JetBrains Mono', monospace; color: var(--muted); }

/* 截圖框：瀏覽器外框 */
.shot { position: relative; border: 1px solid var(--line); background: var(--panel-solid); box-shadow: var(--shadow); overflow: hidden; }
.shot .bar { height: 30px; display: flex; align-items: center; gap: 7px; padding: 0 12px; border-bottom: 1px solid var(--line); font: 14px 'JetBrains Mono', monospace; color: var(--muted); }
.shot .bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.shot .bar span { margin-left: 10px; }
.shot img { display: block; width: 100%; height: auto; margin: 0; }

/* 示範步驟 */
.demo-steps { display: flex; flex-direction: column; gap: 12px; }
.demo-steps a.ds {
  display: grid; grid-template-columns: 54px 1fr auto; align-items: center; gap: 16px; text-decoration: none; color: var(--ink);
  border: 1px solid var(--line); background: var(--panel); padding: 13px 18px; transition: border-color .2s, transform .2s;
}
.demo-steps a.ds:hover { border-color: var(--pass); transform: translateX(6px); }
.demo-steps .n { font: 700 30px 'JetBrains Mono', monospace; color: var(--cyan); }
.demo-steps h3 { font-size: 27px; margin: 0; }
.demo-steps p { font-size: 20px; color: var(--muted); margin: 2px 0 0; }
.demo-steps .go { font: 600 17px 'JetBrains Mono', monospace; color: var(--pass-ink); }
.btn-backup {
  align-self: flex-start; margin-top: 14px; font: 600 19px 'Noto Sans TC', sans-serif; color: var(--amber);
  background: transparent; border: 1px dashed var(--amber); padding: 8px 16px; cursor: pointer;
}

/* 時間軸 */
.tl { position: relative; display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; padding-top: 34px; }
.tl::before { content: ''; position: absolute; left: 0; right: 0; top: 14px; height: 2px; background: var(--line); }
.tl .line-fill { position: absolute; left: 0; top: 14px; height: 2px; width: 100%; background: var(--pass); transform-origin: left; }
.tl .ev { position: relative; }
.tl .ev::before { content: ''; position: absolute; top: -27px; left: 0; width: 14px; height: 14px; background: var(--bg); border: 2px solid var(--pass); transform: rotate(45deg); }
.tl .d { font: 700 25px 'JetBrains Mono', monospace; color: var(--cyan); }
.tl h3 { font-size: 28px; margin: 8px 0 8px; }
.tl p { font-size: 22px; color: var(--muted); margin: 0; line-height: 1.5; }

/* 掃描結果表 */
.scan { width: 100%; border-collapse: collapse; font-size: 23px; }
.scan th, .scan td { border-bottom: 1px solid var(--line); padding: 9px 10px; text-align: left; }
.scan th { font: 600 18px 'JetBrains Mono', monospace; color: var(--muted); letter-spacing: .05em; }
.scan td.n { font-family: 'JetBrains Mono', monospace; text-align: right; }
.scan td.ok { color: var(--pass-ink); font-weight: 700; }
.scan tr.final td { background: color-mix(in srgb, var(--pass) 12%, transparent); }

/* 修補清單 */
.fix { display: grid; grid-template-columns: 1fr 52px 1fr; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px dashed var(--line); font-size: 23px; }
.fix .before { color: var(--muted); }
.fix .before::before { content: '✕ '; color: var(--danger); font-weight: 700; }
.fix .after::before { content: '✓ '; color: var(--pass-ink); font-weight: 700; }
.fix .ar { text-align: center; color: var(--cyan); font-size: 28px; }

/* 感謝與建議 */
.thanks { font-size: 24px; padding: 14px 22px; margin-bottom: 16px; }
.sugg { gap: 14px 20px; }
.sugg .panel { padding: 14px 22px; }
.sugg .panel h3 { font-size: 27px; margin-bottom: 4px; }
.sugg .panel p { font-size: 21px; margin: 0; line-height: 1.45; }
.sugg .panel .tag { margin-bottom: 4px; }

/* 開源結構樹 */
.tree { font: 22px/1.75 'JetBrains Mono', monospace; color: var(--ink); white-space: pre; margin: 0; }
.tree .c { color: var(--muted); }
.tree .k { color: var(--pass-ink); }

/* QR */
.qrs { display: flex; gap: 40px; justify-content: center; }
.qrbox { text-align: center; }
.qrbox .qr { width: 210px; height: 210px; background: #fff; padding: 10px; box-sizing: border-box; margin: 0 auto 10px; border: 1px solid var(--line); }
.qrbox .qr svg { width: 100%; height: 100%; display: block; }
.qrbox h3 { font-size: 26px; }
.qrbox .u { font: 17px 'JetBrains Mono', monospace; color: var(--muted); }
.reveal a.qrbox { display: block; color: inherit; text-decoration: none; padding: 12px 14px 10px; border-radius: 10px; border: 1px solid transparent; transition: border-color .2s, background .2s, transform .2s; cursor: pointer; }
.reveal a.qrbox:hover, .reveal a.qrbox:focus-visible { border-color: var(--cyan); background: rgba(94,200,255,.08); transform: translateY(-3px); outline: none; }
.reveal a.qrbox:hover .u, .reveal a.qrbox:focus-visible .u { color: var(--cyan); text-decoration: underline; }
.reveal a.qrbox .go { display: inline-block; margin-top: 6px; font-size: 15px; color: var(--cyan); }

/* 主題切換鈕 */
#theme-btn {
  position: fixed; top: 12px; right: 14px; z-index: 30; font: 500 14px 'Noto Sans TC', sans-serif;
  color: var(--muted); background: var(--panel); border: 1px solid var(--line); padding: 5px 12px; cursor: pointer; opacity: .55;
}
#theme-btn:hover { opacity: 1; }

/* 備援影片疊層 */
.backup {
  position: fixed; inset: 0; z-index: 50; background: rgba(5, 14, 26, .94); display: none;
  align-items: center; justify-content: center; flex-direction: column; gap: 12px;
}
.backup.on { display: flex; }
.backup video { max-width: 92vw; max-height: 84vh; border: 1px solid var(--line); }
.backup button { font: 600 18px 'Noto Sans TC', sans-serif; color: #eaf2ff; background: transparent; border: 1px solid #5ec8ff; padding: 6px 18px; cursor: pointer; }

/* 署名 */
.akai-footer {
  position: fixed; bottom: 10px; left: 16px; z-index: 20; font: 13px 'Noto Sans TC', sans-serif; color: var(--muted); opacity: .8;
}
.akai-footer a { color: var(--cyan); text-decoration: none; border-bottom: 1px dotted var(--cyan); }

/* 維運：錯誤通報流程（壓縮版 flow） */
.flow.compact .step { padding: 14px 8px; }
.flow.compact .step .ic { font-size: 40px; }
.flow.compact .step h3 { font-size: 24px; margin: 8px 0 4px; }
.flow.compact .step p { font-size: 19px; line-height: 1.4; }
.flow.compact .arrow { width: 30px; }
.ops { margin-top: 18px; gap: 16px; }
.ops .panel { padding: 16px 20px; }
.ops .panel h3 { font-size: 25px; margin-bottom: 6px; }
.ops .panel li, .ops .panel p { font-size: 20px; line-height: 1.45; margin: 4px 0; }
.ops .panel ul { margin-left: 1em; }

/* 被找到：三層導流 */
.layers { display: flex; flex-direction: column; gap: 12px; }
.layers .ly { display: grid; grid-template-columns: 132px 1fr; gap: 18px; align-items: center; border-bottom: 1px dashed var(--line); padding: 10px 0; }
.layers .ly:last-child { border-bottom: 0; }
.layers .tag { align-self: flex-start; }
.layers .ly { padding: 16px 0; }
.layers .big { font: 700 52px/1 'JetBrains Mono', monospace; color: var(--pass-ink); text-align: right; }
.layers .big small { display: block; font-size: 18px; font-weight: 500; color: var(--muted); margin-top: 4px; }
.layers h3 { font-size: 27px; margin: 0 0 4px; }
.layers p { font-size: 22px; color: var(--muted); margin: 0; line-height: 1.45; }
.layers .path { font: 500 19px 'JetBrains Mono', monospace; color: var(--cyan); margin: 8px 0 0; }
.seo-side { display: flex; flex-direction: column; gap: 16px; }
.seo-side .panel { padding: 18px 22px; flex: 1; }
.seo-side .panel li { font-size: 22px; line-height: 1.45; margin: 6px 0; }

/* 一鍵複製提示詞：畫面標示 */
.shot-img { position: relative; }
.shot-img .ring {
  position: absolute; left: 1.35%; top: 92.2%; width: 13%; height: 5.9%; box-sizing: content-box;
  margin: -5px 0 0 -5px; padding: 0 5px 5px 0; border: 3px solid var(--pass); border-radius: 14px;
  animation: ring-pulse 1.6s ease-in-out infinite;
}
.shot-img .callout {
  position: absolute; left: 16.5%; top: 86.5%; font: 700 21px 'Noto Sans TC', sans-serif; color: #0a1d33;
  background: var(--pass); padding: 6px 12px; white-space: nowrap;
}
[data-theme="light"] .shot-img .callout { background: var(--pass-ink); color: #fff; }
/* 開源頁：工具介紹頁的「開源原始碼」按鈕（截圖 1180×240，按鈕位置依截圖比例） */
.os-steps { display: flex; flex-direction: column; gap: 10px; }
.os-steps .panel { padding: 10px 18px; }
.os-steps .panel h3 { margin: 0 0 2px; }
.os-steps .os-repos h3 { margin-bottom: 8px; }
.src-shot { border: 1px solid var(--line); line-height: 0; }
.src-shot img { width: 100%; height: auto; display: block; }
.src-shot .ring { left: 25%; top: 55.4%; width: 20.8%; height: 34.6%; }
.src-shot .callout { left: 49%; top: 58%; font-size: 19px; line-height: 1.3; }
@keyframes ring-pulse { 0%, 100% { box-shadow: 0 0 0 3px color-mix(in srgb, var(--pass) 30%, transparent); } 50% { box-shadow: 0 0 0 9px color-mix(in srgb, var(--pass) 8%, transparent); } }
.pstep { display: flex; flex-direction: column; gap: 10px; }
.pstep .ps { display: grid; grid-template-columns: 46px 1fr; gap: 12px; align-items: center; border: 1px solid var(--line); background: var(--panel); padding: 10px 16px; }
.pstep .ps .n { font: 700 30px 'JetBrains Mono', monospace; color: var(--cyan); }
.pstep .ps h3 { font-size: 24px; margin: 0; }
.pstep .ps p { font-size: 19px; color: var(--muted); margin: 2px 0 0; line-height: 1.4; }

/* 手機上下滑動提示：只在手機的捲動檢視顯示，第一次滑動後自動隱藏 */
.swipe-hint {
  position: fixed; left: 50%; bottom: 46px; z-index: 25; transform: translateX(-50%);
  display: none; flex-direction: column; align-items: center; gap: 2px; pointer-events: none;
  font: 700 17px 'Noto Sans TC', sans-serif; color: var(--ink);
  background: color-mix(in srgb, var(--panel-solid) 92%, transparent); border: 1px solid var(--pass);
  padding: 8px 18px 6px; box-shadow: 0 0 0 4px color-mix(in srgb, var(--pass) 18%, transparent);
  animation: swipe-pulse 2.2s ease-in-out infinite;
}
html.swipe-hint-on .swipe-hint { display: flex; }
.swipe-hint .sh-arrows { display: flex; flex-direction: column; align-items: center; line-height: 0; height: 26px; }
.swipe-hint .sh-arrows i {
  display: block; width: 13px; height: 13px; border-right: 3px solid var(--pass); border-bottom: 3px solid var(--pass);
  transform: rotate(45deg); margin-top: -4px; opacity: 0; animation: swipe-chev 1.4s ease-in-out infinite;
}
.swipe-hint .sh-arrows i:nth-child(2) { animation-delay: .25s; }
@keyframes swipe-chev { 0% { opacity: 0; transform: translateY(-5px) rotate(45deg); } 45% { opacity: 1; } 100% { opacity: 0; transform: translateY(7px) rotate(45deg); } }
@keyframes swipe-pulse { 0%, 100% { transform: translateX(-50%) translateY(0); } 50% { transform: translateX(-50%) translateY(-5px); } }
html.is-opening .swipe-hint { opacity: 0; }
@media (prefers-reduced-motion: reduce) {
  .swipe-hint, .swipe-hint .sh-arrows i { animation: none; }
  .swipe-hint .sh-arrows i { opacity: 1; }
}

/* 新版本提示列（js/sw-register.js）：桌機置中膠囊，手機改為底部滿寬卡片 */
#sw-update-bar {
  position: fixed; left: 50%; bottom: 44px; transform: translateX(-50%); z-index: 60;
  display: flex; align-items: center; gap: 14px; width: max-content; max-width: calc(100vw - 24px);
  background: var(--panel-solid); color: var(--ink); border: 1px solid var(--pass);
  padding: 12px 14px 12px 20px; box-shadow: var(--shadow), 0 0 0 4px color-mix(in srgb, var(--pass) 16%, transparent);
  font: 500 16px 'Noto Sans TC', sans-serif; animation: sw-in .35s ease-out;
}
#sw-update-bar .sw-msg { display: flex; flex-direction: column; line-height: 1.35; }
#sw-update-bar .sw-msg b { font-size: 18px; color: var(--pass-ink); }
#sw-update-bar .sw-msg small { font-size: 14px; color: var(--muted); }
#sw-update-bar button { cursor: pointer; font: 700 16px 'Noto Sans TC', sans-serif; border: 0; }
#sw-go { order: 2; background: var(--pass); color: #04210f; padding: 10px 18px; min-height: 44px; }
[data-theme="light"] #sw-go { background: var(--pass-ink); color: #fff; }
#sw-x { order: 3; background: transparent; color: var(--muted); width: 44px; height: 44px; font-size: 18px; }
#sw-go:focus-visible, #sw-x:focus-visible { outline: 3px solid var(--cyan); outline-offset: 2px; }
html.has-update-bar .swipe-hint { display: none !important; }
@keyframes sw-in { from { opacity: 0; transform: translate(-50%, 12px); } to { opacity: 1; transform: translate(-50%, 0); } }
@media (max-width: 560px) {
  #sw-update-bar {
    left: 12px; right: 12px; bottom: max(40px, env(safe-area-inset-bottom)); transform: none; width: auto;
    display: grid; grid-template-columns: 1fr auto; grid-template-areas: "msg x" "go go"; gap: 10px; padding: 14px 14px 14px 18px;
    animation: none;
  }
  #sw-update-bar .sw-msg { grid-area: msg; }
  #sw-x { grid-area: x; }
  #sw-go { grid-area: go; width: 100%; min-height: 48px; }
}
@media (prefers-reduced-motion: reduce) { #sw-update-bar { animation: none; } }

/* 開場影片頁 */
.vid-slide .op-wrap { position: relative; width: 1280px; height: 720px; background: #000; }
.vid-slide .op-video { width: 100%; height: 100%; object-fit: cover; display: block; }
.vid-slide .op-play {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: none; gap: 14px; align-items: center;
  font: 700 30px 'Noto Sans TC', sans-serif; color: #fff; background: rgba(10, 29, 51, .85); border: 2px solid #3ddc97; padding: 18px 34px; cursor: pointer;
}
.vid-slide.op-blocked .op-play { display: inline-flex; }
.vid-slide .op-skip { position: absolute; right: 22px; bottom: 16px; font: 16px 'Noto Sans TC', sans-serif; color: rgba(255, 255, 255, .6); }
.vid-slide.op-ending .op-video { opacity: 0; transition: opacity .6s; }
html.is-opening .akai-footer, html.is-opening #theme-btn,
html.is-opening .reveal .controls, html.is-opening .reveal .slide-number, html.is-opening .reveal .progress { opacity: 0; pointer-events: none; }
.vid-slide .s, .vid-slide { padding: 0 !important; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
