:root {
  --bg: #050b1c; --panel: #0b1630; --panel2: #0f1d3d; --line: #1e3a8a; --cyan: #38bdf8;
  --text: #e2e8f0; --muted: #94a3b8; --red: #f87171; --green: #4ade80; --gold: #facc15;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text);
  font-family: "Microsoft JhengHei", "Noto Sans TC", "PingFang TC", sans-serif; }
button { font: inherit; }
.app { display: flex; flex-direction: column; min-height: 100vh; }

/* 頂部 */
.topbar { display: flex; align-items: center; gap: 12px; padding: 8px 14px; background: linear-gradient(90deg, #0b1630, #0a1a44);
  border-bottom: 2px solid var(--line); flex-wrap: wrap; }
.logo { font-weight: 900; color: var(--cyan); letter-spacing: 2px; }
.stage-title { font-weight: 700; }
.phase-badge { padding: 3px 10px; border-radius: 999px; background: #1d4ed8; font-size: .85rem; font-weight: 700; }
.phase-badge.enemy { background: #b91c1c; }
.turn { color: var(--muted); }
.cond { display: flex; gap: 12px; font-size: .8rem; flex: 1; min-width: 260px; }
.cond .win { color: #93c5fd; } .cond .lose { color: #fca5a5; }
.btn { background: var(--panel2); color: var(--text); border: 1px solid #2b4fb8; border-radius: 8px; padding: 6px 14px; cursor: pointer; font-weight: 700; }
.btn:hover:not(:disabled) { border-color: var(--cyan); color: var(--cyan); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.end { background: #1d4ed8; border-color: #3b82f6; }
.btn.go { background: #b45309; border-color: #f59e0b; }
.btn.small { font-size: .8rem; padding: 4px 10px; }
.btn.big { width: 100%; padding: 12px; font-size: 1.05rem; margin-top: 8px; }

/* 主畫面 */
.main { display: flex; gap: 12px; padding: 12px; align-items: flex-start; flex-wrap: nowrap; }
.map-wrap { position: relative; flex: 1 1 auto; min-width: 0; }
/* v8：大地圖用捲動視窗；畫布實際顯示大小由 engine.js 依縮放倍率設定 */
.map-view { position: relative; height: calc(100vh - 110px); min-height: 380px; overflow: auto; border: 2px solid var(--line); border-radius: 6px;
  background: radial-gradient(ellipse at 50% 40%, #1b2236, #05070d); cursor: grab; scrollbar-color: #334155 #05070d; }
.map-view.dragging { cursor: grabbing; }
.map-stack { position: relative; }
#fxCanvas { position: absolute; left: 0; top: 0; pointer-events: none; }
.map-zoom { position: absolute; top: 8px; right: 14px; z-index: 4; display: flex; gap: 4px; }
.map-zoom .btn { min-width: 32px; }
#mapCanvas { display: block; border: 2px solid var(--line); border-radius: 6px; background: radial-gradient(ellipse at 50% 40%, #1b2236, #05070d); cursor: pointer; image-rendering: pixelated; }
.terrain-info { margin-top: 6px; font-size: .8rem; color: var(--muted); }
.action-menu { position: absolute; z-index: 5; display: flex; flex-direction: column; gap: 4px; background: rgba(8, 18, 45, .96);
  border: 1px solid var(--cyan); border-radius: 8px; padding: 6px; min-width: 160px; box-shadow: 0 6px 24px rgba(0,0,0,.6); }
.menu-btn { background: #0f1d3d; color: var(--text); border: 1px solid #1e40af; border-radius: 6px; padding: 7px 10px; text-align: left; cursor: pointer; font-weight: 700; }
.menu-btn:hover:not(:disabled) { background: #1e3a8a; }
.menu-btn:disabled { opacity: .4; cursor: not-allowed; }
.menu-btn.talk { border-color: #a78bfa; color: #ddd6fe; }
.menu-btn.cancel { color: var(--muted); }
.menu-btn.spirit { border-color: #f59e0b; color: #fde68a; }

/* v8：精神指令選單 */
.sm-sp { color: var(--muted); font-size: .85rem; margin-bottom: 8px; }
.sm-list { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.sm-btn { text-align: left; background: #0f1d3d; color: var(--text); border: 1px solid #1e40af; border-radius: 8px; padding: 8px 10px; cursor: pointer; }
.sm-btn b { display: block; font-size: 1rem; }
.sm-btn small { color: var(--muted); font-size: .75rem; }
.sm-btn .cost { float: right; color: #fde68a; font-weight: 700; }
.sm-btn:hover:not(:disabled) { background: #1e3a8a; }
.sm-btn:disabled { opacity: .4; cursor: not-allowed; }
.sm-btn.active { border-color: #f59e0b; box-shadow: 0 0 0 1px #f59e0b inset; }

/* v8：地圖戰鬥的小型切入框 */
.mini-cutin { position: absolute; top: 10px; left: 12px; z-index: 6; display: flex; gap: 10px; align-items: center; width: min(420px, 70%);
  background: linear-gradient(90deg, rgba(11,29,77,.95), rgba(5,11,28,.9)); border: 2px solid #38bdf8; border-radius: 10px; padding: 8px;
  box-shadow: 0 6px 24px rgba(0,0,0,.6); pointer-events: none; animation: mcIn .22s ease-out; }
.mini-cutin.enemy { background: linear-gradient(90deg, rgba(59,13,18,.95), rgba(5,11,28,.9)); border-color: #f87171; }
.mini-cutin .mc-img { width: 132px; height: 74px; flex: none; overflow: hidden; border-radius: 6px; background: #05070d; display: flex; align-items: center; justify-content: center; }
.mini-cutin .mc-img img { max-width: 100%; max-height: 100%; object-fit: contain; }
.mini-cutin.enemy .mc-img img { transform: scaleX(1); }
.mc-name { font-weight: 900; font-size: .95rem; }
.mc-weapon { color: #fde68a; font-weight: 700; font-size: .9rem; margin-top: 2px; }
.mc-line { color: var(--muted); font-size: .78rem; margin-top: 2px; }
@keyframes mcIn { from { transform: translateX(-30px); opacity: 0; } to { transform: none; opacity: 1; } }

/* 右側 */
.side { flex: 0 0 330px; min-width: 280px; display: flex; flex-direction: column; gap: 10px; max-height: calc(100vh - 86px); overflow-y: auto; }
/* v8：視窗太窄時才上下排，地圖高度跟著縮 */
@media (max-width: 900px) { .main { flex-wrap: wrap; } .side { flex: 1 1 100%; max-height: none; } .map-view { height: 62vh; } }
.unit-card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
.card-head { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
.card-head h3 { margin: 0; font-size: 1.05rem; }
.unit-badge { width: 46px; height: 46px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 900; background: #1d4ed8; flex: none; }
.pilot { color: var(--muted); font-size: .8rem; }
/* v9：經驗值條 */
.exp-row { display: flex; align-items: center; gap: 8px; font-size: .8rem; margin: 2px 0 6px; color: var(--muted); }
.exp-row .lv { color: #fde68a; font-weight: 900; font-size: .95rem; min-width: 46px; }
.exp-row .track.exp { flex: 1; height: 8px; }
.fill.exp { height: 100%; background: linear-gradient(90deg, #f59e0b, #fde68a); transition: width .4s; }
.bar-row { display: flex; justify-content: space-between; font-size: .8rem; margin-top: 4px; }
.track { height: 7px; background: #111827; border-radius: 4px; overflow: hidden; }
.fill { height: 100%; width: 0; transition: width .3s; } .fill.hp { background: #22c55e; } .fill.en { background: #0ea5e9; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; font-size: .82rem; margin: 8px 0; color: var(--muted); }
.stats b { color: var(--text); }
.section { font-size: .82rem; color: var(--cyan); margin: 8px 0 4px; font-weight: 700; }
.spirits { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.spirit-btn { background: #1e1b4b; color: #e0e7ff; border: 1px solid #4338ca; border-radius: 6px; padding: 5px 2px; cursor: pointer; font-weight: 700; font-size: .85rem; }
.spirit-btn small { display: block; font-size: .7rem; opacity: .7; }
.spirit-btn.active { background: #ca8a04; border-color: var(--gold); color: #000; }
.spirit-btn:disabled { opacity: .45; cursor: not-allowed; }
.muted { color: var(--muted); font-size: .8rem; grid-column: 1 / -1; }
.weapons { display: flex; flex-direction: column; gap: 4px; max-height: 260px; overflow: auto; }
.weapon-card { background: #0a1228; border: 1px solid #1e293b; border-radius: 6px; padding: 5px 8px; cursor: pointer; }
.weapon-card.selected { border-color: var(--red); background: #2a0f16; }
.weapon-card.disabled { opacity: .45; }
.weapon-name { font-weight: 700; font-size: .88rem; }
.weapon-meta { display: flex; gap: 8px; font-size: .72rem; color: var(--muted); flex-wrap: wrap; }
.anim-tag { font-size: .65rem; background: #0e7490; padding: 0 4px; border-radius: 3px; vertical-align: middle; }
.log { background: #020617; border: 1px solid #1e293b; border-radius: 10px; padding: 8px; height: 200px; overflow: auto; font-size: .78rem; }
.log-entry { padding: 2px 0; border-bottom: 1px dashed #111c33; }
.log-entry.player { color: #93c5fd; } .log-entry.enemy { color: #fca5a5; } .log-entry.damage { color: #fde68a; } .log-entry.system { color: var(--muted); }
.debug { font-size: .72rem; color: #a3e635; word-break: break-all; }

/* 對話框 */
.dialogue { position: fixed; inset: 0; z-index: 40; display: flex; align-items: flex-end; justify-content: center; padding: 16px; background: rgba(0,0,0,.25); cursor: pointer; }
.dlg-box { position: relative; width: min(980px, 100%); min-height: 150px; display: flex; gap: 16px; align-items: flex-start;
  background: linear-gradient(180deg, rgba(10,22,55,.97), rgba(5,12,32,.97)); border: 2px solid var(--cyan); border-radius: 12px; padding: 18px 20px 30px; box-shadow: 0 10px 40px rgba(0,0,0,.7); }
.dlg-portrait { width: 84px; height: 84px; border-radius: 12px; flex: none; display: flex; align-items: center; justify-content: center; font-size: 2.2rem; font-weight: 900; color: #0b1020; }
.dlg-body { flex: 1; }
.dlg-name { color: var(--cyan); font-weight: 900; font-size: 1.05rem; margin-bottom: 6px; min-height: 1.2em; }
.dlg-text { font-size: 1.12rem; line-height: 1.75; white-space: pre-wrap; }
.dlg-box.narr .dlg-text { color: #cbd5e1; font-style: italic; }
.dlg-box.place .dlg-text { color: var(--gold); font-weight: 700; }
.dlg-box.place .dlg-text::before { content: '▌場景　'; }
.dlg-box.sys { border-color: #a3e635; } .dlg-box.sys .dlg-text { color: #d9f99d; }
.dlg-hint { position: absolute; right: 16px; bottom: 8px; font-size: .72rem; color: var(--muted); }
.dlg-skip { position: absolute; right: 12px; top: -16px; background: #0f1d3d; color: var(--muted); border: 1px solid #334155; border-radius: 6px; padding: 3px 10px; cursor: pointer; font-size: .78rem; }

/* 橫幅 */
.banner { position: fixed; inset: 0; z-index: 45; display: flex; align-items: center; justify-content: center; pointer-events: none; }
.banner > div { width: 100%; text-align: center; background: linear-gradient(90deg, transparent, rgba(29,78,216,.85), transparent); padding: 18px 0; }
.banner.show > div { animation: slide .5s ease-out; }
@keyframes slide { from { transform: translateX(-30%); opacity: 0; } to { transform: none; opacity: 1; } }
.banner-text { font-size: 2.2rem; font-weight: 900; letter-spacing: 6px; text-shadow: 0 0 18px #38bdf8; }
.banner-sub { color: #bfdbfe; margin-top: 4px; }

/* 視窗 */
.modal { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,.6); padding: 16px; }
.modal-box { background: var(--panel); border: 2px solid var(--line); border-radius: 12px; padding: 18px; width: min(640px, 100%); }
.modal-box.center { text-align: center; }
.modal-box h2 { margin: 0 0 12px; font-size: 1.15rem; color: var(--cyan); }
.pv-grid { display: flex; gap: 10px; align-items: center; }
.pv-side { flex: 1; background: #0a1228; border-radius: 8px; padding: 10px; display: flex; flex-direction: column; gap: 4px; font-size: .9rem; }
.pv-side .tag { font-size: .72rem; color: var(--muted); }
.pv-side.me { border-left: 3px solid #3b82f6; } .pv-side.them { border-left: 3px solid #ef4444; }
.pv-weapon { color: var(--gold); font-weight: 700; }
.pv-counter { color: #fca5a5; font-size: .8rem; }
.big { font-size: 1.3rem; color: #fff; }
.vs { font-weight: 900; color: var(--gold); }
.modal-foot { display: flex; gap: 10px; justify-content: flex-end; margin-top: 14px; }
.modal-box.center .modal-foot { justify-content: center; }
.rs-buttons { display: flex; flex-direction: column; gap: 6px; }
.rs-btn { background: #0f1d3d; color: var(--text); border: 1px solid #2b4fb8; border-radius: 8px; padding: 10px 12px; text-align: left; cursor: pointer; }
.rs-btn b { font-size: 1.05rem; margin-right: 10px; } .rs-btn small { color: var(--muted); }
.rs-btn:hover:not(:disabled) { border-color: var(--cyan); }
.rs-btn:disabled { opacity: .4; cursor: not-allowed; }

/* 簡易戰鬥框 */
.quick-battle { position: fixed; inset: 0; z-index: 48; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,.45); cursor: pointer; }
.qb-inner { width: min(720px, 94%); background: linear-gradient(90deg, #0b1d4d, #050b1c 50%, #3b0d12); border: 2px solid var(--line); border-radius: 12px;
  padding: 18px; display: grid; grid-template-columns: 1fr auto 1fr; grid-template-rows: auto auto auto; gap: 6px; text-align: center; }
.quick-battle.from-right .qb-inner { background: linear-gradient(90deg, #3b0d12, #050b1c 50%, #0b1d4d); }
.qb-att { grid-column: 1; font-weight: 900; } .qb-def { grid-column: 3; grid-row: 1; font-weight: 900; }
.qb-weapon { grid-column: 1 / -1; color: var(--gold); font-size: 1.15rem; font-weight: 900; }
.qb-arrow { grid-column: 2; grid-row: 1; color: var(--cyan); }
.qb-result { grid-column: 1 / -1; font-size: 1.6rem; font-weight: 900; }
.qb-result.hit { color: #fde047; text-shadow: 0 0 12px #f59e0b; } .qb-result.miss { color: #93c5fd; }

/* 招式演出 */
.anim-overlay { position: fixed; inset: 0; z-index: 60; background: #000; display: flex; align-items: center; justify-content: center; }
.anim-stage { position: relative; width: min(100vw, calc(100vh * 16 / 9)); aspect-ratio: 16 / 9; }
#animCanvas { width: 100%; height: 100%; display: block; }
.anim-loading { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--cyan); font-size: 1.2rem; }
.anim-damage { position: absolute; right: 12%; top: 22%; font-size: 4.2rem; font-weight: 900; color: #fff; -webkit-text-stroke: 2px #b91c1c;
  text-shadow: 0 0 18px #f59e0b; opacity: 0; transform: scale(.6); transition: all .25s ease-out; font-family: Impact, "Arial Black", sans-serif; }
.anim-damage.show { opacity: 1; transform: scale(1); }
.anim-speed { position: absolute; right: 120px; bottom: 14px; background: rgba(15,29,61,.85); color: var(--text); border: 1px solid #334155; border-radius: 8px; padding: 6px 14px; cursor: pointer; }
.anim-speed.fast { border-color: #f59e0b; color: #fde68a; }
.anim-skip { position: absolute; right: 14px; bottom: 14px; background: rgba(15,29,61,.85); color: var(--text); border: 1px solid #334155; border-radius: 8px; padding: 6px 14px; cursor: pointer; }

/* 標題畫面 */
.title { position: fixed; inset: 0; z-index: 70; display: flex; align-items: center; justify-content: center; padding: 16px;
  background: radial-gradient(ellipse at center, #10245a 0%, #050b1c 70%); }
.title-box { width: min(460px, 100%); text-align: center; }
.title-box h1 { font-size: 2.6rem; margin: 6px 0; letter-spacing: 8px; color: #fff; text-shadow: 0 0 24px #38bdf8; }
.title-sub { color: var(--muted); letter-spacing: 4px; }
.title-chapter { color: var(--gold); margin-bottom: 18px; }
.title-row { display: flex; gap: 6px; margin-top: 10px; }
.title-row select { flex: 1; background: var(--panel2); color: var(--text); border: 1px solid #2b4fb8; border-radius: 8px; padding: 6px; font: inherit; }
.chk { display: block; text-align: left; margin-top: 10px; font-size: .88rem; color: var(--muted); cursor: pointer; }
.title-note { margin-top: 16px; font-size: .78rem; color: var(--muted); line-height: 1.6; }

/* v12：左下角（右下角是演出的倍速、跳過按鈕）音樂 A／B 與靜音（標題畫面、地圖、戰鬥演出都看得到） */
#audioCtl { position: fixed; left: 10px; bottom: 10px; z-index: 9999; display: flex; gap: 6px; }
#audioCtl button { background: rgba(15, 23, 42, .85); color: var(--text); border: 1px solid #2b4fb8; border-radius: 8px; padding: 5px 10px; font: inherit; font-size: .85rem; cursor: pointer; }
#audioCtl button:hover { border-color: var(--cyan); }

/* v13：標題選單、存檔欄位、金手指、開場 MV */
.title-menu .btn.big { margin-top: 8px; }
.title-more { margin-top: 14px; text-align: left; color: var(--muted); font-size: .88rem; }
.title-more summary { cursor: pointer; text-align: center; }
.cheat-on { margin-top: 8px; font-size: .8rem; color: var(--gold); min-height: 1em; }
#slotModal, #cheatModal { z-index: 80; }          /* 要蓋在標題畫面（z-index 70）上面 */
#interlude { z-index: 60; }
.slot-hint { color: var(--muted); font-size: .85rem; margin: 0 0 10px; }
.slot-list { display: flex; flex-direction: column; gap: 8px; }
.slot { text-align: left; background: var(--panel2); color: var(--text); border: 1px solid #2b4fb8; border-radius: 8px; padding: 10px 12px; cursor: pointer; font: inherit; }
.slot:hover:not(:disabled) { border-color: var(--cyan); }
.slot:disabled { opacity: .45; cursor: default; }
.slot b { color: var(--cyan); margin-right: 8px; }
.slot small { display: block; color: var(--muted); margin-top: 3px; }
.cheat-input { width: 100%; box-sizing: border-box; background: var(--panel2); color: var(--text); border: 1px solid #2b4fb8; border-radius: 8px; padding: 10px; font: inherit; font-size: 1.1rem; text-align: center; letter-spacing: 2px; }
.cheat-msg { color: var(--muted); font-size: .85rem; min-height: 1.4em; }
.cheat-msg.ok { color: var(--green); } .cheat-msg.ng { color: var(--red); }
.cheat-list { text-align: left; font-size: .85rem; color: var(--gold); line-height: 1.7; }
.mv-layer { position: fixed; inset: 0; z-index: 9000; background: #000; display: flex; align-items: center; justify-content: center; }
.mv-layer video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.mv-start { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; padding-bottom: 8vh; cursor: pointer;
  /* v15：遊戲封面（全員海報）放 assets/cover/cover.jpg 就會顯示；還沒有時只有深藍漸層 */
  background: #050b1c url("assets/cover/cover_landscape.jpg") center / contain no-repeat; }   /* v19：橫式螢幕用人物封面 */
@media (orientation: portrait) { .mv-start { background-image: url("assets/cover/cover_portrait.jpg"); } }   /* v19：直式（手機）用機體封面 */
.mv-start .mv-start-title { display: none; }   /* v19：封面圖上已經有標題字 */
.mv-start { padding-bottom: 3vh; }
.mv-start-title, .mv-start-hint { text-shadow: 0 0 12px #000, 0 0 24px #000; }
.mv-loading { position: absolute; z-index: 1; color: var(--muted); letter-spacing: 3px; pointer-events: none; }
.mv-start-title { font-size: 2.6rem; letter-spacing: 8px; color: #fff; text-shadow: 0 0 24px #38bdf8; font-weight: 900; }
.mv-start-hint { margin-top: 18px; color: var(--muted); letter-spacing: 3px; animation: mvBlink 1.6s ease-in-out infinite; }
@keyframes mvBlink { 50% { opacity: .35; } }
.mv-skip { position: absolute; right: 16px; bottom: 16px; z-index: 3; background: rgba(15,29,61,.8); color: var(--text); border: 1px solid #334155; border-radius: 8px; padding: 8px 16px; cursor: pointer; font-weight: 700; }

/* v14：精神指令交易（遙） */
#shopModal { z-index: 62; }
.shop-box { width: min(720px, 100%); max-height: 92vh; display: flex; flex-direction: column; }
.shop-head { display: flex; gap: 12px; align-items: center; }
.shop-face { width: 72px; height: 72px; border-radius: 10px; border: 2px solid var(--line); flex: none; object-fit: cover; }
.shop-head h2 { margin: 0 0 4px; }
.shop-say { margin: 0; color: var(--text); font-size: .9rem; }
.shop-wallet { margin-left: auto; text-align: right; color: var(--muted); font-size: .8rem; flex: none; }
.shop-wallet b { display: block; color: var(--gold); font-size: 1.4rem; }
.shop-tabs { display: flex; gap: 6px; margin: 12px 0 6px; flex-wrap: wrap; }
.shop-tab { background: var(--panel2); color: var(--muted); border: 1px solid #2b4fb8; border-radius: 8px; padding: 6px 14px; cursor: pointer; font-weight: 700; }
.shop-tab.on { color: #fff; border-color: var(--cyan); box-shadow: 0 0 8px rgba(56,189,248,.4); }
.shop-body { overflow-y: auto; padding-right: 4px; }
.shop-body h3 { font-size: .9rem; color: var(--cyan); margin: 12px 0 6px; }
.shop-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--panel2); border: 1px solid #1e3a8a; border-radius: 8px; padding: 8px 10px; margin-bottom: 6px; }
.shop-row small { display: block; color: var(--muted); font-size: .78rem; margin-top: 2px; }
.shop-row .btn { flex: none; min-width: 92px; }
.shop-row .btn:disabled { opacity: .4; cursor: not-allowed; }
.shop-own { display: flex; flex-wrap: wrap; gap: 6px; }
.shop-own span { background: #10245a; border: 1px solid var(--cyan); border-radius: 8px; padding: 4px 10px; font-weight: 700; }
.shop-own small { color: var(--muted); margin-left: 6px; font-weight: 400; }

/* v18：精神指令發動特效（切入） */
.spirit-fx { position: fixed; inset: 0; z-index: 65; display: flex; align-items: center; pointer-events: none; --sf: #38bdf8; }
.sf-band { width: 100%; display: flex; align-items: center; gap: 18px; padding: 10px 6vw; overflow: hidden;
  background: linear-gradient(90deg, transparent, rgba(5,11,28,.92) 12%, rgba(5,11,28,.92) 88%, transparent);
  border-top: 2px solid var(--sf); border-bottom: 2px solid var(--sf); box-shadow: 0 0 40px var(--sf);
  animation: sfBand 1.4s ease-out forwards; }
.sf-face { width: 110px; height: 110px; border-radius: 10px; border: 2px solid var(--sf); object-fit: cover; flex: none; animation: sfFace 1.4s ease-out forwards; }
.sf-text { display: flex; flex-direction: column; animation: sfText 1.4s ease-out forwards; }
.sf-text small { color: var(--muted); letter-spacing: 3px; }
.sf-text b { font-size: clamp(2.4rem, 7vw, 4.2rem); font-weight: 900; letter-spacing: 10px; color: #fff; text-shadow: 0 0 12px var(--sf), 0 0 28px var(--sf); line-height: 1.15; }
.sf-text span { color: var(--text); font-size: .95rem; }
@keyframes sfBand { 0% { transform: scaleY(0); opacity: 0; } 12% { transform: scaleY(1); opacity: 1; } 80% { opacity: 1; } 100% { opacity: 0; } }
@keyframes sfFace { 0% { transform: translateX(-60px); opacity: 0; } 18% { transform: none; opacity: 1; } }
@keyframes sfText { 0% { transform: translateX(80px) skewX(-12deg); opacity: 0; } 22% { transform: none; opacity: 1; } 100% { transform: translateX(-12px); } }

/* v19：標題選單背景＝遊戲封面（壓暗，讓選單看得清楚） */
.title#title { background: linear-gradient(rgba(5,11,28,.55), rgba(5,11,28,.82)), #050b1c url("assets/cover/bg_landscape.jpg") center / cover no-repeat; }   /* 用沒有標題字的原圖，避免和選單標題重複 */
@media (orientation: portrait) { .title#title { background-image: linear-gradient(rgba(5,11,28,.55), rgba(5,11,28,.82)), url("assets/cover/bg_portrait.jpg"); } }
