/* 米花地下城 — 介面樣式。畫面本體是 Three.js canvas，這裡只管 HUD、選單、觸控搖桿。
   2026-09-17 全面改版：照園區《UI-DESIGN-STANDARD》v1.0——
   不在對局裡的畫面用「奶油卡＋木牌＋蜂蜜黃主鍵」；對局內 HUD 用「深木頭列」（同一套 token，壓在暗色地板上看得清）。
   顏色只表示四件事：金黃＝主要動作／獎勵、藍＝工具、綠＝完成／在線、紅＝危險／未讀。寶物四階色另有一套（DESIGN 5.1）。 */
:root {
  /* 園區共用 token（UI-DESIGN-STANDARD §2.3） */
  --ui-cream-0: #fffdf7; --ui-cream-1: #fff8e8; --ui-cream-2: #f6e8c8;
  --ui-ink: #3a2c12; --ui-muted: #6b5327; --ui-gold: #f5a91b; --ui-gold-dark: #9d6508;
  --ui-blue: #2e8fd6; --ui-green: #35ad58; --ui-danger: #d94b52;
  --ui-radius-sm: 11px; --ui-radius-md: 18px; --ui-radius-lg: 24px;
  --ui-shadow-card: 0 14px 38px rgba(63,42,19,.22), inset 0 1px 0 rgba(255,255,255,.75);
  --ui-speed-fast: 160ms; --ui-speed: 220ms;
  /* 本館語彙 */
  --bg: #14121a;
  --cream-card: linear-gradient(rgba(255,253,247,.95), rgba(255,248,232,.92));
  --cream-shadow: 0 10px 30px rgba(60,40,20,.24), 0 3px 0 rgba(184,121,15,.12), inset 0 2px 0 rgba(255,255,255,.6);
  --cream-edge: rgba(150,115,55,.22);
  --wood-bg: rgba(50,32,14,.72); --wood-edge: rgba(255,230,160,.35); --wood-ink: #fff5dc; --wood-hi: #ffd45e;
  --sign: linear-gradient(#a8743f, #7a4f26); --sign-edge: #d0a06a; --sign-ink: #ffe9a8; --sign-shadow: #5a3618;
  --honey: linear-gradient(#ffe08a, #f5a91b); --honey-edge: #ffedb0; --honey-ink: #5a3800; --honey-shadow: #c9871a;
  --tool: linear-gradient(#5cc3f2, #2e8fd6); --ok: linear-gradient(#6fdc6f, #2faa4a);
  --butter: var(--ui-gold); --core: #e0432b; --fine: #3b7fc4; --rare: #8e3fb5; --legend: #c98f0a;
  /* 文字色依所在容器切換：夜色背景上是奶油白，奶油卡裡是暖褐（見 .panel 等） */
  --ink: #fff5dc; --ink2: rgba(255,245,220,.74); --acc: #ffd45e; --line: rgba(255,230,160,.28); --track: rgba(0,0,0,.35);
  --font: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif;
  --mono: ui-monospace, Menlo, Consolas, monospace;
  /* 園區共用面板只設變數、不改預設（UI-DESIGN-STANDARD §2.3） */
  --soc-sheet: #fff8e8; --soc-edge: rgba(150,115,55,.28); --soc-ink: #3a2c12; --soc-secfg: #806d4d;
  --soc-card: #fffdf7; --soc-cardfg: #3a2c12; --soc-accent: #f5a91b; --soc-dim: #93805f;
  --pshare-bg: #fff8e8; --pshare-fg: #3a2c12; --pshare-accent: #f5a91b; --pshare-btn: #f5a91b;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink); font-family: var(--font); overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
input, textarea { user-select: text; -webkit-user-select: text; }
img { -webkit-user-drag: none; user-drag: none; pointer-events: none; }
#gl { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.lbl { color: var(--ink2); font-size: 12px; letter-spacing: .04em; }
.hero-text em, .card span, .perk .lbl, .char em, .weapon em, .end .whatif, .choices-hint { text-wrap: pretty; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid rgba(46,143,214,.78); outline-offset: 2px; }

/* ---- 奶油卡：所有不在對局裡的面板、卡片、對話框；對局內的背包／說明／升級卡也用它（§3.7） ---- */
.panel, .cream { --ink: var(--ui-ink); --ink2: var(--ui-muted); --acc: var(--ui-gold-dark); --line: var(--cream-edge); --track: rgba(60,40,20,.12);
  color: var(--ink); background: var(--cream-card); border: 2.5px solid #fff; border-radius: var(--ui-radius-md); padding: 16px;
  box-shadow: var(--cream-shadow); }
.tile { background: rgba(255,255,255,.55); border: 1.5px solid var(--cream-edge); border-radius: var(--ui-radius-sm); }

/* ---- 按鈕語彙 ---- */
button { font: inherit; color: var(--ui-ink); background: rgba(255,252,244,.95); border: 2px solid rgba(150,115,55,.22); border-radius: var(--ui-radius-sm); padding: 9px 16px; cursor: pointer;
  box-shadow: 0 3px 0 rgba(150,110,40,.14); transition: transform var(--ui-speed-fast) ease, box-shadow var(--ui-speed-fast) ease, filter var(--ui-speed-fast) ease; }
button:hover { filter: brightness(1.03); } button:active { transform: translateY(2px); box-shadow: 0 1px 0 rgba(150,110,40,.14); }
button.primary { background: var(--honey); color: var(--honey-ink); border-color: var(--honey-edge); font-weight: 800; box-shadow: 0 5px 0 var(--honey-shadow); }
button.primary:active { box-shadow: 0 1px 0 var(--honey-shadow); transform: translateY(4px); }
button.tool { background: var(--tool); color: #fff; border-color: rgba(255,255,255,.55); font-weight: 800; box-shadow: 0 5px 0 #1d6aa8; text-shadow: 0 1px 2px rgba(0,0,0,.25); }
button.tool:active { box-shadow: 0 1px 0 #1d6aa8; transform: translateY(4px); }
button.ghost { background: transparent; border-color: transparent; box-shadow: none; color: inherit; }
button.ghost:active { transform: none; }
button:disabled { opacity: .45; cursor: default; box-shadow: none; transform: none; filter: none; }
.ghost.small, .small { padding: 4px 10px; font-size: 12px; }
button.link { background: none; border: 0; padding: 0; color: var(--acc); text-decoration: underline; cursor: pointer; font-size: inherit; box-shadow: none; }
/* 深色（夜色背景、HUD）上的按鈕：木頭列 */
.wood, .hud-card button, .camp-hud button, .brand-r button, .end .actions button:not(.primary) { color: var(--wood-ink); background: var(--wood-bg); border: 1.5px solid var(--wood-edge); box-shadow: none; backdrop-filter: blur(8px); }
input { font: inherit; color: var(--ui-ink); background: #fffdf7; border: 2px solid rgba(150,115,55,.28); border-radius: var(--ui-radius-sm); padding: 10px 12px; width: 100%; }
input::placeholder { color: #a8967a; }
input:focus { outline: none; border-color: var(--ui-blue); box-shadow: 0 0 0 3px rgba(46,143,214,.2); }
/* 木牌：頁面標題、房名、角色名 */
.sign { display: inline-block; background: var(--sign); border: 2px solid var(--sign-edge); color: var(--sign-ink); border-radius: 12px; padding: 6px 18px; font-weight: 900; letter-spacing: .06em; box-shadow: 0 5px 0 var(--sign-shadow), 0 8px 20px rgba(0,0,0,.35); text-shadow: 0 1px 0 rgba(0,0,0,.35); }

/* ---- 觸控搖桿 ---- */
#touch { position: fixed; inset: 0; z-index: 5; }
#touch .stick { position: absolute; width: 120px; height: 120px; border-radius: 50%; border: 2px solid rgba(255,245,220,.35); background: rgba(50,32,14,.28); transform: translate(-50%, -50%); display: none; pointer-events: none; }
#touch .stick .knob { position: absolute; left: 50%; top: 50%; width: 48px; height: 48px; border-radius: 50%; background: rgba(255,208,96,.8); box-shadow: 0 2px 6px rgba(0,0,0,.35); transform: translate(-50%, -50%); }
#touch .stick.on { display: block; }
#touch .stick#stickR .knob { background: rgba(224,67,43,.8); }
#crosshair { position: fixed; left: 0; top: 0; z-index: 7; pointer-events: none; color: var(--wood-hi); margin: -18px 0 0 -18px; filter: drop-shadow(0 0 3px rgba(0,0,0,.8)); }
body.aiming #touch { cursor: none; }

/* ===================== 對局內 HUD（深木頭列） ===================== */
#hud { position: fixed; inset: 0; z-index: 6; pointer-events: none; padding: max(10px, env(safe-area-inset-top)) 12px; }
.hud-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.hud-card { background: var(--wood-bg); border: 1.5px solid var(--wood-edge); border-radius: 14px; padding: 8px 12px; min-width: 190px; color: var(--wood-ink); backdrop-filter: blur(8px); box-shadow: 0 6px 18px rgba(0,0,0,.3); }
/* 右上那張讓開園區按鈕列（Social.mount 畫的，寬度由 --park-dock-rest-w 提供；沒掛就是 0） */
.hud-card.right { min-width: 130px; margin-right: calc(var(--park-dock-rest-w, 0px) + 6px); }
.hud-card .name { font-weight: 700; }
.hud-card .row { font-size: 13px; }
.who-lv { display: inline-flex; align-items: center; gap: 7px; min-width: 0; }
.time-ping { display: inline-flex; align-items: center; gap: 8px; }
/* 畫面暗角：視線集中在中央的角色，GPU 零成本（CSS 疊層，不是後製） */
.net-note { position: fixed; left: 50%; top: 38%; transform: translateX(-50%); z-index: 8; display: flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: var(--ui-radius-md); background: var(--wood-bg); border: 1px solid var(--wood-edge); color: var(--wood-ink); font-size: 15px; font-weight: 700; box-shadow: 0 10px 30px rgba(0,0,0,.35); }
.net-note svg { color: var(--wood-hi); animation: net-spin 1.1s linear infinite; }
@keyframes net-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .net-note svg { animation: none; } }
/* 園區共用連線提示列（shared conn-status.js）：left:50% 讓縮放寬度只剩半個螢幕，手機上字一行兩三個、「重新整理」一字一行 */
.pcs-bar { width: max-content; }
.pcs-bar button { white-space: nowrap; flex: none; }
.vignette { position: fixed; inset: 0; pointer-events: none; z-index: 1; background: radial-gradient(ellipse 75% 70% at 50% 52%, rgba(10,6,14,0) 58%, rgba(10,6,14,.42) 100%); }
.gpu-note { display: flex; gap: 8px; align-items: flex-start; margin: 10px 0 0; padding: 10px 12px; border-radius: var(--ui-radius-sm); background: var(--cream-card); border: 1px solid var(--cream-edge); border-left: 4px solid var(--ui-danger); box-shadow: var(--cream-shadow); color: var(--ui-ink); font-size: 13px; line-height: 1.5; }
.gpu-note svg { flex: none; margin-top: 2px; color: var(--ui-danger); }
.roles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.role { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 10px 6px 9px; min-height: 44px; border-radius: var(--ui-radius-sm); background: var(--cream-card); border: 1px solid var(--cream-edge); color: var(--ui-ink); cursor: pointer; transition: transform var(--ui-speed-fast), box-shadow var(--ui-speed-fast); }
.role svg { color: var(--ui-muted); }
.role span { font-weight: 800; font-size: 15px; }
.role em { font-style: normal; font-size: 11.5px; line-height: 1.35; color: var(--ui-muted); text-align: center; }
.role:hover { transform: translateY(-1px); }
.role.sel { box-shadow: 0 0 0 2px var(--ui-gold), var(--cream-shadow); }
.role.sel svg { color: var(--ui-gold-dark); }
.role:focus-visible { outline: 3px solid var(--ui-blue); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .role { transition: none; } .role:hover { transform: none; } }
.ping { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; color: #8fe8b4; }
.ping b { font-weight: 700; }
.ping.mid { color: var(--wood-hi); }
.ping.bad { color: #ff9a8a; }
.hud-card .lv { flex: none; padding: 1px 7px; border-radius: 999px; font: 700 11px var(--mono); color: var(--honey-ink); background: var(--honey); letter-spacing: .02em; }
.hud-card .lv.up { animation: lv-up .6s ease; }
@keyframes lv-up { 0% { transform: scale(1); } 40% { transform: scale(1.35); box-shadow: 0 0 14px rgba(255,208,96,.8); } }
.bar { height: 8px; background: var(--track); border-radius: 6px; overflow: hidden; margin-top: 6px; }
.bar > div { height: 100%; width: 100%; transition: width .12s linear; }
.bar.spirit > div { background: var(--ok); }
.bar.heat > div { background: linear-gradient(90deg, #ffe08a, #f5a91b 55%, var(--core)); width: 0; }
.bar.stamina { height: 4px; margin-top: 4px; } .bar.stamina > div { background: #8fd0ff; width: 100%; transition: width .1s linear; }
.guide { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 12px; color: var(--ink2); }
.guide svg { color: var(--wood-hi); flex: none; transition: transform .15s linear; }
.guide.open svg { color: #5cc3f2; } .guide.leave svg { color: #6fdc6f; }
.minimap { display: block; width: 220px; height: 132px; margin-top: 6px; border-radius: 10px; border: 1.5px solid var(--wood-edge); background: #14121a; image-rendering: pixelated; }
@media (max-width: 600px) { .minimap { width: 150px; height: 90px; } }
/* 「現在走值多少」：整局唯一重要的決定 */
.hud-card .row.worth { margin: 3px -6px; padding: 3px 6px; border-radius: 8px; background: rgba(255,208,96,.14); box-shadow: inset 0 0 0 1px rgba(255,208,96,.3); }
.hud-card .row.worth .lbl { color: var(--wood-hi); }
#hudWorth { color: var(--wood-hi); font-weight: 800; font-size: 15px; }
.hud-card .row.worth.rich { background: rgba(111,224,168,.14); box-shadow: inset 0 0 0 1px rgba(111,224,168,.35); }
.hud-card .row.worth.rich .lbl, #hudWorth.rich { color: #8fe8b4; }
#hudRelicCount.full { color: var(--wood-hi); }
.relic.fine { border-color: var(--fine); color: var(--fine); }
.relic.rare { border-color: var(--rare); color: var(--rare); }
.relic.legend { border-color: var(--legend); color: var(--legend); box-shadow: 0 0 10px rgba(201,143,10,.5); }
.relic.core { border-color: var(--core); color: var(--core); box-shadow: 0 0 14px rgba(224,67,43,.7); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 24px rgba(224,67,43,.95); } }
.tip { position: absolute; z-index: 8; pointer-events: none; min-width: 180px; max-width: 260px; background: var(--wood-bg); border: 1.5px solid var(--wood-edge); border-radius: 12px; padding: 8px 10px; font-size: 12px; color: var(--wood-ink); display: flex; flex-direction: column; gap: 4px; backdrop-filter: blur(8px); }
.tip b { font-size: 14px; } .tip .bar { height: 6px; margin-top: 2px; } .tip .bar > div { background: #ff6a4d; }
.tip.boss b { color: #ff9c7a; } .tip .stars { color: var(--wood-hi); letter-spacing: .1em; }
.announce { position: absolute; left: 50%; top: 18%; transform: translateX(-50%); text-align: center; font-size: clamp(18px, 3vw, 28px); font-weight: 900; color: var(--wood-ink); text-shadow: 0 2px 12px rgba(0,0,0,.8); padding: 10px 22px; border-radius: 16px; background: rgba(50,32,14,.6); border: 1.5px solid var(--wood-edge); backdrop-filter: blur(8px); }
.announce small { display: block; font-size: 13px; font-weight: 400; color: var(--ink2); margin-top: 4px; }
.announce.legend { color: #ffd45e; } .announce.core { color: #ff8f70; }
.toast { position: absolute; left: 50%; top: 24%; transform: translateX(-50%); max-width: min(80vw, 520px); text-align: center; background: var(--wood-bg); border: 1.5px solid var(--wood-edge); border-radius: 999px; padding: 8px 16px; font-size: 14px; color: var(--wood-ink); backdrop-filter: blur(8px); }
.extract { position: absolute; left: 50%; bottom: 28%; transform: translateX(-50%); min-width: 240px; max-width: min(440px, 90vw); text-align: center; padding: 8px 16px 10px; border-radius: 16px;
  background: var(--wood-bg); border: 1.5px solid rgba(255,208,96,.55); box-shadow: 0 8px 26px rgba(0,0,0,.5); backdrop-filter: blur(8px); color: var(--wood-ink); }
.extract .lbl { font-size: 13px; color: var(--wood-ink); line-height: 1.4; white-space: nowrap; }
.extract .lbl b { color: var(--wood-hi); }
.extract .extract-mul { margin-top: 2px; font-size: 12px; font-weight: 700; color: var(--wood-hi); }
.extract .bar { margin-top: 7px; } .extract .bar > div { background: var(--honey); width: 0; }
@media (max-width: 480px) { .extract .lbl { white-space: normal; } }
.asleep { position: absolute; left: 50%; top: 40%; transform: translateX(-50%); font-size: 18px; font-weight: 700; color: var(--wood-ink); background: var(--wood-bg); border: 1.5px solid var(--wood-edge); padding: 10px 18px; border-radius: 14px; backdrop-filter: blur(8px); }
.last-call { position: absolute; left: 50%; top: 8%; transform: translateX(-50%); z-index: 7; padding: 6px 16px; border-radius: 999px; font-size: 13px; font-weight: 700; letter-spacing: .04em;
  color: #fff; background: rgba(217,75,82,.55); border: 1.5px solid rgba(255,255,255,.55); animation: last-call 1.8s ease-in-out infinite; }
@keyframes last-call { 50% { background: rgba(217,75,82,.8); box-shadow: 0 0 22px rgba(217,75,82,.4); } }
.ending-note { position: absolute; left: 50%; top: 44%; transform: translateX(-50%); z-index: 8; font-size: clamp(18px, 3.4vw, 26px); font-weight: 900; letter-spacing: .08em; color: var(--wood-ink); text-shadow: 0 2px 16px rgba(0,0,0,.9); animation: ending-in .5s ease both; }
@keyframes ending-in { from { opacity: 0; transform: translateX(-50%) scale(.94); } }
/* Boss 血條 */
.bossbar { position: absolute; left: 50%; top: 92px; transform: translateX(-50%); width: min(520px, 80vw); text-align: center; color: var(--wood-ink);
  background: var(--wood-bg); border: 1.5px solid var(--wood-edge); border-radius: 14px; padding: 6px 12px 8px; backdrop-filter: blur(8px); }
@media (max-width: 560px) { .bossbar { top: 150px; width: min(520px, 92vw); } }
.bossbar .bar { height: 12px; border: 1px solid rgba(0,0,0,.3); } .bossbar .bar > div { background: linear-gradient(90deg, #ff8f70, #e0432b); }
/* 受傷：邊緣紅暈（保護級：不是血） */
.hurt-flash { position: absolute; inset: 0; pointer-events: none; z-index: 8; opacity: 0; transition: opacity .35s ease-out; background: radial-gradient(ellipse at center, rgba(224,67,43,0) 55%, rgba(224,67,43,.55) 100%); }
.hurt-flash.on { opacity: 1; transition: opacity .04s; }

/* 圓鈕（右下一疊，由下往上：技能 120、換彈 200、說明 272；背包在換彈左邊）。木頭底、蜂蜜黃冷卻環。 */
.round-btn { position: absolute; right: max(18px, env(safe-area-inset-right)); bottom: max(120px, calc(env(safe-area-inset-bottom) + 120px)); width: 64px; height: 64px; border-radius: 50%; pointer-events: auto;
  display: grid; place-items: center; padding: 0; color: var(--wood-ink); border: 2px solid var(--wood-edge); box-shadow: 0 4px 0 rgba(0,0,0,.35), 0 8px 18px rgba(0,0,0,.3);
  background: conic-gradient(var(--ui-gold) var(--cd, 100%), rgba(50,32,14,.85) 0); }
.round-btn::before { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: rgba(50,32,14,.96); }
.round-btn > svg, .round-btn > span { position: relative; }
.round-btn .skill-lbl { font-size: 10px; white-space: nowrap; max-width: 56px; overflow: hidden; text-overflow: ellipsis; }
.round-btn.cool { color: var(--ink2); }
.round-btn:active { transform: translateY(2px); box-shadow: 0 2px 0 rgba(0,0,0,.35); }
.skill-lbl { font-size: 10px; letter-spacing: .04em; }
.round-btn.skill { border-color: rgba(255,208,96,.7); }
.round-btn.ammo { bottom: max(200px, calc(env(safe-area-inset-bottom) + 200px)); width: 58px; height: 58px; font-size: 11px; }
.round-btn.ammo.empty { color: #ff9c7a; border-color: rgba(255,120,90,.7); }
.round-btn.swap { right: max(96px, calc(env(safe-area-inset-right) + 96px)); }
.round-btn.swap::before { background: rgba(47,170,74,.92); }
.round-btn.swap[data-better="down"]::before { background: rgba(96,96,108,.92); }
.round-btn.swap[data-better="up"] { border-color: rgba(150,255,210,.7); box-shadow: 0 4px 0 rgba(0,0,0,.35), 0 0 0 3px rgba(111,220,111,.35); }
.round-btn.stow { right: max(174px, calc(env(safe-area-inset-right) + 174px)); width: 58px; height: 58px; }
.round-btn.stow::before { background: rgba(46,143,214,.92); }
.bag-btn { right: max(96px, calc(env(safe-area-inset-right) + 96px)); bottom: max(203px, calc(env(safe-area-inset-bottom) + 203px)); width: 52px; height: 52px; }
.bag-btn.full { color: var(--wood-hi); border-color: rgba(255,208,96,.8); }
.help-btn { right: max(25px, calc(env(safe-area-inset-right) + 7px)); bottom: max(272px, calc(env(safe-area-inset-bottom) + 272px)); width: 44px; height: 44px; font-weight: 800; }
.mute-btn { position: absolute; left: max(12px, env(safe-area-inset-left)); bottom: max(14px, calc(env(safe-area-inset-bottom) + 14px)); width: 40px; height: 40px; border-radius: 50%; pointer-events: auto; display: grid; place-items: center; padding: 0;
  color: var(--wood-ink); background: var(--wood-bg); border: 1.5px solid var(--wood-edge); box-shadow: none; backdrop-filter: blur(8px); }
.mute-btn .off { display: none; } .mute-btn.muted .on { display: none; } .mute-btn.muted .off { display: block; }
.leave-run-btn { bottom: max(64px, calc(env(safe-area-inset-bottom) + 64px)); width: 44px; height: 44px; left: max(10px, env(safe-area-inset-left)); }
.leave-confirm { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 12; width: min(340px, calc(100vw - 32px)); padding: 16px; pointer-events: auto; display: flex; flex-direction: column; gap: 10px; text-align: center; }
.leave-confirm[hidden] { display: none; }
.leave-confirm .row { display: flex; gap: 10px; justify-content: center; }
.leave-confirm button { min-height: 44px; flex: 1; }

/* 升級卡（DESIGN 4.3）：不暫停、選了才收；奶油卡浮在畫面下方 */
.choices { position: absolute; left: 50%; bottom: max(24px, env(safe-area-inset-bottom)); transform: translateX(-50%); width: min(640px, 94vw); pointer-events: auto; }
.choices-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 0 4px 8px; text-shadow: 0 1px 4px rgba(60,35,10,.7); }
.choices-head b { color: var(--wood-hi); font-size: 15px; letter-spacing: .02em; }
.choices-head span { color: var(--ink2); font-size: 12px; }
.choices-hint { margin-top: 8px; text-align: center; font-size: 12px; color: var(--ink2); text-shadow: 0 1px 4px rgba(60,35,10,.7); }
.cards { display: grid; grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); gap: 8px; }
.card { position: relative; --ink: var(--ui-ink); --ink2: var(--ui-muted); --acc: var(--ui-gold-dark); color: var(--ink);
  background: var(--cream-card); border: 2.5px solid #fff; border-radius: 16px; padding: 30px 12px 12px; text-align: left;
  display: flex; flex-direction: column; gap: 5px; min-height: 96px; min-width: 0; box-shadow: var(--cream-shadow);
  transition: transform .12s ease, border-color .12s ease, box-shadow .12s ease; animation: card-in .22s cubic-bezier(.2,.9,.3,1.3) both; animation-delay: calc(var(--i, 0) * 45ms); }
@keyframes card-in { from { opacity: 0; transform: translateY(14px) scale(.96); } }
.cards .card b { font-size: 15px; line-height: 1.25; }
.cards .card span { font-size: 12px; line-height: 1.4; color: var(--ink2); }
.card kbd { position: absolute; left: 10px; top: 8px; display: grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; font-family: var(--mono); font-size: 12px; font-weight: 700;
  color: var(--honey-ink); background: var(--honey); border-radius: 6px; box-shadow: 0 2px 0 var(--honey-shadow); }
.card:hover, .card:focus-visible { border-color: var(--ui-gold); outline: none; transform: translateY(-3px); box-shadow: 0 14px 30px rgba(60,40,20,.3), 0 0 0 3px rgba(245,169,27,.25); }
.card:active, .card.picked { transform: translateY(0) scale(.97); border-color: var(--ui-gold); }
.choices.waiting .cards { animation: choices-breathe 2.4s ease-in-out infinite; }
@keyframes choices-breathe { 50% { filter: brightness(1.06); } }
@media (pointer: coarse) {
  .choices { bottom: max(200px, calc(env(safe-area-inset-bottom) + 200px)); width: min(560px, 96vw); }
  .card { padding: 28px 10px 10px; min-height: 84px; }
  .cards .card b { font-size: 14px; } .cards .card span { font-size: 11px; }
}
.choices .bar { margin-top: 8px; } .choices .bar > div { background: var(--honey); }

/* 背包（DESIGN 5.2）：口袋 16 格＋裝備包 4 格，遊戲不暫停 */
.bag { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 9; backdrop-filter: blur(6px); background: linear-gradient(rgba(255,253,247,.97), rgba(255,248,232,.96)); width: min(560px, 94vw); max-height: 92vh; overflow-y: auto; pointer-events: auto; padding: 14px 16px 12px; animation: bag-in .16s ease both; }
@keyframes bag-in { from { opacity: 0; transform: translate(-50%, -46%) scale(.97); } }
.bag-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.bag-head b { font-size: 16px; color: var(--ui-ink); }
.bag-head #bagCount { color: var(--ink2); font-size: 12px; }
.bag-head #bagWorth { margin-left: auto; color: var(--acc); font-weight: 800; font-size: 13px; }
.bag-head button { margin-left: 4px; }
.bag-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.bag-head2 { margin-top: 12px; padding-top: 10px; border-top: 1.5px solid var(--cream-edge); }
.bag-head2 .lbl { margin-left: auto; font-size: 11px; }
.bag-gear { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.bag-slot, .bag-gear-item { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 6px; border-radius: 12px; text-align: center; font: inherit; color: var(--ink);
  background: rgba(255,255,255,.6); border: 2px solid var(--cream-edge); box-shadow: 0 2px 0 rgba(150,110,40,.1); }
.bag-slot { position: relative; min-height: 84px; cursor: pointer; transition: transform .1s ease, border-color .1s ease; }
.bag-slot img { width: 30px; height: 30px; object-fit: contain; }
.bag-slot b { font-size: 11px; line-height: 1.25; } .bag-slot span { font-size: 10px; color: var(--ink2); }
.bag-slot:hover { transform: translateY(-2px); }
.bag-slot.fine { border-color: var(--fine); } .bag-slot.rare { border-color: var(--rare); }
.bag-slot.legend { border-color: var(--legend); box-shadow: 0 0 12px rgba(201,143,10,.35); }
.bag-slot.core { border-color: var(--core); box-shadow: 0 0 14px rgba(224,67,43,.4); }
.bag-slot.empty { background: rgba(255,255,255,.3); border-style: dashed; border-color: rgba(150,115,55,.4); cursor: default; color: var(--ink2); box-shadow: none; }
.bag-slot.empty:hover { transform: none; }
.bag-gear-item { min-height: 150px; padding-bottom: 6px; }
.bag-gear-item.empty { justify-content: center; color: var(--ink2); font-size: 11px; background: rgba(255,255,255,.3); border-style: dashed; border-color: rgba(150,115,55,.4); box-shadow: none; }
.bag-gear-item img { width: 34px; height: 34px; object-fit: contain; }
.bag-gear-item b { font-size: 11px; line-height: 1.25; } .bag-gear-item span { font-size: 10px; color: var(--ink2); }
.bag-gear-stats { width: 100%; font-size: 10px; line-height: 1.35; text-align: left; color: var(--ink2); margin: 2px 0 4px; }
.bag-gear-stats .up { color: #1f8f4a; } .bag-gear-stats .down { color: #c93a3a; } .bag-gear-stats .affix { color: var(--acc); }
.bag-gear-item .acts { display: flex; gap: 4px; margin-top: auto; }
.bag-gear-item .acts button { font-size: 11px; padding: 3px 8px; border-radius: 8px; }
.bag-gear-item .acts button.equip { background: var(--tool); color: #fff; border-color: rgba(255,255,255,.55); box-shadow: 0 2px 0 #1d6aa8; }
.bag-gear-item.t-fine { border-color: var(--fine); } .bag-gear-item.t-rare { border-color: var(--rare); } .bag-gear-item.t-legend { border-color: var(--legend); } .bag-gear-item.t-core { border-color: var(--core); }
.bag-foot { margin-top: 10px; text-align: center; font-size: 11px; }
.bag-foot b { color: var(--acc); font-family: var(--mono); }

/* 按住 H 的說明（不暫停，所以不是可以停留的彈窗） */
.help { position: absolute; inset: 0; z-index: 11; display: grid; place-items: center; background: rgba(20,14,8,.55); backdrop-filter: blur(3px); animation: help-in .12s ease both; }
@keyframes help-in { from { opacity: 0; } }
.help-card { width: min(880px, 94vw); max-height: 88vh; overflow: auto; padding: 16px 20px 18px; border-radius: var(--ui-radius-lg); }
.help-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-bottom: 10px; margin-bottom: 12px; border-bottom: 1.5px solid var(--cream-edge); }
.help-head b { font-size: 17px; color: var(--ui-ink); }
.help-head .lbl b { color: var(--acc); font-family: var(--mono); font-size: 12px; }
.help-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px 22px; }
.help-cols h4 { margin: 0 0 7px; font-size: 13px; color: var(--acc); letter-spacing: .04em; }
.help-cols ul { margin: 0; padding-left: 17px; display: flex; flex-direction: column; gap: 5px; }
.help-cols li { font-size: 12.5px; line-height: 1.55; color: var(--ink2); }
.help-cols li b, .help-cols dd b { color: var(--ink); }
.help-cols dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 5px 10px; align-items: baseline; }
.help-cols dt { font: 700 11px var(--mono); color: var(--honey-ink); background: var(--honey); padding: 1px 7px; border-radius: 5px; justify-self: start; white-space: nowrap; box-shadow: 0 1px 0 var(--honey-shadow); }
.help-cols dd { margin: 0; font-size: 12.5px; line-height: 1.5; color: var(--ink2); }

/* 換裝比較卡（DESIGN 5.5.4）：換裝鈕上方，不遮瞄準區 */
.gear-tip { --ink: var(--ui-ink); --ink2: var(--ui-muted); --acc: var(--ui-gold-dark); --line: var(--cream-edge); color: var(--ink); background: var(--cream-card); border: 2.5px solid #fff; box-shadow: var(--cream-shadow);
  position: fixed; z-index: 25; pointer-events: none; right: max(12px, calc(env(safe-area-inset-right) + 12px)); bottom: max(240px, calc(env(safe-area-inset-bottom) + 240px));
  width: min(226px, 62vw); padding: 9px 11px; border-radius: 12px; border-left-width: 4px; display: flex; flex-direction: column; gap: 3px; }
.gear-tip b { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; font-size: 13px; }
.gear-tip .gear-tier { font-size: 10px; font-weight: normal; white-space: nowrap; }
.gear-tip-rows { display: flex; flex-direction: column; gap: 1px; margin: 3px 0 2px; }
.gear-tip-row { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; line-height: 1.5; }
.gear-tip-row .mono { font-variant-numeric: tabular-nums; }
.gear-tip-row .mono.up { color: #1f8f4a; font-weight: 700; } .gear-tip-row .mono.down { color: #c93a3a; font-weight: 700; }
.gear-tip .gear-affix { font-size: 11px; } .gear-tip .gear-foot { font-size: 10px; }
.gear-tip-foot { margin-top: 6px; font-size: 10px; color: var(--ink2); }
@media (max-height: 680px) { .gear-tip { bottom: max(200px, calc(env(safe-area-inset-bottom) + 200px)); font-size: 11px; } }

/* 營地＝走得進去的家（sim/camp.mjs）：HUD 換成營地那組 */
#hud.camp .hud-top, #hud.camp #btnBag, #hud.camp #extractBar, #hud.camp .bossbar { display: none !important; }
.camp-hud { position: absolute; inset: 0; pointer-events: none; z-index: 6; }
.camp-hud-top { position: absolute; left: max(14px, env(safe-area-inset-left)); right: max(14px, env(safe-area-inset-right)); top: max(12px, env(safe-area-inset-top)); display: flex; align-items: center; gap: 10px; pointer-events: auto; padding-right: var(--park-dock-rest-w, 0px); }
.camp-hud-title { background: var(--sign); border: 2px solid var(--sign-edge); color: var(--sign-ink); border-radius: 12px; padding: 5px 14px; display: flex; flex-direction: column; line-height: 1.15; box-shadow: 0 4px 0 var(--sign-shadow), 0 8px 20px rgba(0,0,0,.35); }
.camp-hud-title .lbl { color: rgba(255,233,168,.75); font-size: 10px; }
.camp-hud-title b { font-size: 14px; letter-spacing: .04em; }
.camp-hud-res { display: flex; gap: 6px; flex-wrap: wrap; }
.camp-hud-res .res { background: var(--wood-bg); border: 1.5px solid var(--wood-edge); border-radius: 12px; padding: 5px 10px; min-width: 56px; text-align: center; color: var(--wood-ink); backdrop-filter: blur(8px); }
.camp-hud-res .res .lbl { display: block; font-size: 10px; color: var(--ink2); }
.camp-hud-res .res b { font-size: 14px; }
.camp-hud-top .ghost { margin-left: auto; }
.station-prompt { position: absolute; left: 50%; bottom: max(150px, calc(env(safe-area-inset-bottom) + 150px)); transform: translateX(-50%); pointer-events: auto;
  font: inherit; font-size: 15px; font-weight: 800; color: var(--honey-ink); background: var(--honey); border: 2px solid var(--honey-edge); border-radius: 999px; padding: 10px 22px; cursor: pointer; box-shadow: 0 5px 0 var(--honey-shadow), 0 10px 30px rgba(0,0,0,.4); }
.station-prompt kbd { display: inline-block; font: inherit; font-size: 12px; background: rgba(90,56,0,.85); color: #ffe9a8; border-radius: 6px; padding: 1px 7px; margin-right: 8px; }
.camp-modal { position: fixed; inset: 0; z-index: 40; background: rgba(20,14,8,.6); backdrop-filter: blur(4px); display: flex; align-items: flex-start; justify-content: center; overflow-y: auto; padding: 24px 12px; animation: help-in var(--ui-speed) ease both; }
.camp-modal-box { position: relative; width: min(1080px, 100%); }
/* 關閉鍵是木牌；選擇器加上 .camp-modal 才壓得過 button.ghost 的透明底 */
.camp-modal .camp-modal-close { position: absolute; right: 14px; top: 14px; z-index: 2; min-height: 44px; min-width: 64px; padding: 6px 14px; font-size: 13px; background: var(--sign); border: 2px solid var(--sign-edge); color: var(--sign-ink); font-weight: 800; box-shadow: 0 3px 0 var(--sign-shadow); }
.camp-modal .camp { margin: 0; }
/* 更衣鏡／槍架視窗：借出發頁的選角、選槍 DOM */
.pick-modal { display: flex; flex-direction: column; gap: 14px; padding-top: 22px; }
.pick-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding-right: 76px; }
.pick-head .sign { font-size: 18px; }
.pick-hero { display: grid; grid-template-columns: 300px 1fr; gap: 14px; align-items: start; }
.pick-hero .pick-head { grid-column: 1 / -1; }
.pick-hero .hero { padding-top: 8px; }
@media (max-width: 820px) { .pick-hero { grid-template-columns: 1fr; } .pick-hero .hero { flex-direction: row; align-items: flex-end; } }
.camp-modal .camp-head { padding-right: 76px; }   /* 讓開右上的關閉鍵 */

/* ===================== 選單（出發／大廳／營地） ===================== */
#menu { position: fixed; inset: 0; z-index: 10; overflow: auto; display: flex; flex-direction: column; gap: 10px; padding: max(12px, env(safe-area-inset-top)) 14px max(12px, env(safe-area-inset-bottom)); color: var(--ink); }
/* 場景是主角：出發頁用沒有角色的乾淨版（選中的角色站在舞台上）；大廳與營地用五隻在電梯口的主視覺 */
.menu-bg { position: fixed; inset: 0; z-index: -1; background: #14121a url('assets/ui/lobby_bg.webp') center 35% / cover no-repeat; }
#menu[data-view="play"] .menu-bg { background-image: url('assets/ui/lobby_bg_clean.webp'); }
@media (orientation: portrait) { .menu-bg, #menu[data-view="play"] .menu-bg { background-image: url('assets/ui/lobby_bg_tall.webp'); background-position: center top; } }
.menu-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20,18,26,.28) 0%, rgba(20,18,26,.32) 40%, rgba(20,18,26,.78) 100%); }
.brand { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: min(1080px, 100%); margin: 0 auto; }
.brand-l { position: relative; display: flex; align-items: center; gap: 14px; min-width: 0; }
.brand-l::before { content: ""; position: absolute; inset: -14px -26px -14px -18px; z-index: -1; border-radius: 999px; background: radial-gradient(ellipse at 40% 50%, rgba(12,10,18,.6) 0%, rgba(12,10,18,.3) 55%, rgba(12,10,18,0) 100%); }
.brand .crest { width: clamp(52px, 9vw, 76px); height: auto; flex: none; filter: drop-shadow(0 3px 10px rgba(0,0,0,.55)) drop-shadow(0 0 16px rgba(245,169,27,.28)); }
h1 { margin: 0; font-size: clamp(28px, 5.6vw, 46px); line-height: 1.04; letter-spacing: .04em; font-weight: 900;
  text-shadow: 0 1px 0 #6b4a05, 0 2px 5px rgba(0,0,0,.55), 0 10px 26px rgba(0,0,0,.5);
  background: linear-gradient(180deg, #fffaf0 0%, #ffe9b0 26%, #ffc94d 52%, #f5a91b 74%, #d08a14 92%, #a8720a 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
h1 small { display: block; font-size: 11px; letter-spacing: .34em; color: var(--ink2); font-weight: 700; margin-top: 5px; -webkit-text-fill-color: rgba(255,245,220,.8); text-shadow: none; }
h2 { margin: 0; }
.brand-r { display: flex; gap: 6px; }
/* 右上角是園區那一排(收合一顆)。.brand 最寬 1080 置中, 螢幕不夠寬時音效／音樂鈕會貼到它底下: 讀收合寬度讓位 */
@media (max-width: 1240px) { .brand { padding-right: calc(var(--park-dock-rest-w, 0px) + 8px); } }
.tog { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; font-size: 12px; border-radius: 999px; color: var(--ink2); }
.tog.on { color: var(--wood-hi); border-color: rgba(255,208,96,.55); }
.hub { width: min(1080px, 100%); margin: 0 auto; display: flex; flex-direction: column; gap: 10px; flex: 1; }
/* 導覽列（木頭列）＋分級標示同一列：標示在四種視窗都要在摺線內（DESIGN 12） */
.views-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.views { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--wood-bg); border: 1.5px solid var(--wood-edge); backdrop-filter: blur(8px); align-self: flex-start; }
.views button { border: 0; background: transparent; padding: 8px 18px; border-radius: 999px; font-weight: 800; color: var(--wood-ink); box-shadow: none; letter-spacing: .04em; }
.views button.sel { background: var(--honey); color: var(--honey-ink); box-shadow: 0 2px 0 var(--honey-shadow); }
.views button:active { transform: none; }
.bnbRating { display: flex; align-items: center; gap: 10px; margin: 0; padding: 6px 12px 6px 8px; max-width: 360px; border-radius: 12px; --ink: var(--ui-ink); --ink2: var(--ui-muted); color: var(--ink); background: var(--cream-card); border: 2px solid #fff; box-shadow: 0 3px 10px rgba(60,40,20,.14); }
/* 分級標識法定下限 45x45（~/bonmipang/GAME-RATING.md），任何尺寸都不得低於它 */
.bnbRating img { flex: none; width: 45px; height: 45px; }
.bnbRating p { margin: 0; font-size: 10.5px; line-height: 1.45; color: var(--ink2); }
.bnbRating b { display: block; font-weight: 800; color: var(--ui-ink); font-size: 12px; }
.view { display: flex; flex-direction: column; gap: 12px; }
.tag { margin: 0; color: var(--wood-ink); font-size: 14px; text-shadow: 0 1px 4px rgba(60,35,10,.7); }
.field label, .field .lbl { display: block; margin-bottom: 6px; }
.field > label, .field > .lbl { font-weight: 700; color: var(--ink2); }

/* 出發：左邊是開放式舞台（角色直接站在背景上，腳下一張能力卡），右邊是選擇卡 */
.play-grid { display: grid; grid-template-columns: 320px 1fr; gap: 14px; align-items: start; }
.hero { position: relative; display: flex; flex-direction: column; align-items: center; gap: 0; padding-top: 8px; }
.hero-glow { position: absolute; left: 50%; top: 120px; width: 260px; height: 260px; transform: translate(-50%, -50%); border-radius: 50%; background: radial-gradient(circle, rgba(255,208,96,.38), rgba(255,208,96,0) 68%); pointer-events: none; }
.hero img { position: relative; width: 216px; height: 216px; object-fit: contain; filter: drop-shadow(0 14px 18px rgba(0,0,0,.55)); transition: transform .25s ease; animation: hero-float 6s ease-in-out infinite; }
@keyframes hero-float { 50% { transform: translateY(-6px); } }
.hero:hover img { transform: translateY(-4px) scale(1.03); animation: none; }
.hero-text { position: relative; width: 100%; display: flex; flex-direction: column; align-items: center; gap: 3px; margin-top: -8px; padding: 22px 14px 14px; }
.hero-text > b { position: absolute; top: -20px; left: 50%; transform: translateX(-50%); font-size: 20px; white-space: nowrap; }
.hero-text span { font-size: 12px; color: var(--ink2); }
.hero-stats { width: 100%; margin-top: 8px; }
.pick { display: flex; flex-direction: column; gap: 12px; }
.chars { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.char { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 2px; min-width: 0; text-align: center; border-radius: 12px; background: rgba(255,255,255,.55); }
.char picture, .weapon picture { display: contents; }
.char img { width: 56px; height: 56px; object-fit: contain; }
.char span { font-weight: 800; } .char em { font-style: normal; font-size: 11px; line-height: 1.2; color: var(--ink2); }
.char.sel, .weapon.sel { border-color: var(--ui-gold); background: linear-gradient(rgba(255,224,138,.45), rgba(245,169,27,.25)); box-shadow: 0 0 0 2px rgba(245,169,27,.35), 0 3px 0 rgba(150,110,40,.14); }
.weapons { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.weapon { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 10px 6px 8px; min-width: 0; border-radius: 12px; background: rgba(255,255,255,.55); }
.weapon img { width: 100%; height: 44px; object-fit: contain; transition: transform .12s ease; }
.weapon:hover img { transform: scale(1.06); }
.weapon span { font-weight: 800; font-size: 12px; text-align: center; } .weapon em { font-style: normal; font-size: 10px; line-height: 1.3; color: var(--ink2); text-align: center; }
.weapon.locked img { opacity: .45; filter: grayscale(.8) brightness(.9); }
/* 鎖住的槍：說明列是價格藥丸，買得起＝蜂蜜黃（點卡片就買下並換上），買不起／訪客＝灰 */
.weapon.locked em { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 10px; font-weight: 800; color: var(--honey-ink); background: var(--honey); box-shadow: 0 2px 0 var(--honey-shadow); }
.weapon.locked.poor em { color: var(--ink2); background: rgba(120,100,70,.14); box-shadow: none; }
.pick-note.warn, .pick-head .lbl.warn { color: var(--ui-danger); font-weight: 800; }
.weapon .lock { position: absolute; right: 6px; top: 6px; color: var(--ink2); opacity: .8; }
.weapon.locked:hover .lock { color: var(--acc); }
@media (max-width: 600px) { .char img { width: 44px; height: 44px; } .char span { font-size: 13px; } .char em { font-size: 10px; } }
/* 唯一的蜂蜜黃大鍵是「單人下城」；「線上組隊」是工具藍 */
.cta { display: flex; gap: 10px; }
.cta .big { flex: 1; padding: 16px; font-size: 19px; font-weight: 900; border-radius: 16px; letter-spacing: .06em; }
.cta .primary { flex: 1.4; }
.cta .primary { box-shadow: 0 8px 0 var(--honey-shadow), 0 14px 28px rgba(245,169,27,.28); }
.cta .primary:active { transform: translateY(5px); box-shadow: 0 3px 0 var(--honey-shadow); }
.cta .tool { font-size: 17px; box-shadow: 0 5px 0 #1d6aa8; }
.cta .tool:active { transform: translateY(4px); box-shadow: 0 1px 0 #1d6aa8; }
.practice-row { margin: -4px 0 0; font-size: 12px; color: var(--ink2); text-shadow: 0 1px 4px rgba(60,35,10,.7); }
.practice-row .link { color: var(--wood-hi); }
.howto.panel { font-size: 13px; color: var(--ink2); } .howto ol { margin: 6px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 3px; } .howto b { color: var(--ink); }
/* 米花通行證列：共用元件只管版面，顏色照本館 token */
.account-row .park-badge { justify-content: space-between; }
#accountRow .soc-row { background: rgba(255,255,255,.6); border: 1.5px solid var(--cream-edge); border-radius: 12px; color: var(--ui-ink); padding: 10px 12px; }
#accountRow .soc-who b { color: var(--ui-ink); font-family: var(--font); letter-spacing: .02em; }
#accountRow .soc-who span { color: var(--ui-muted); font-family: var(--font); }
#accountRow .soc-act, #accountRow .soc-act.txt { background: var(--honey); color: var(--honey-ink); border: 2px solid var(--honey-edge); border-radius: 10px; font-family: var(--font); font-weight: 800; box-shadow: 0 3px 0 var(--honey-shadow); }
#accountRow .soc-act:hover { color: var(--honey-ink); filter: brightness(1.03); }
#accountRow .soc-act + .soc-act { background: rgba(255,252,244,.95); color: var(--ui-ink); border-color: var(--cream-edge); box-shadow: 0 3px 0 rgba(150,110,40,.14); }

/* 選單裡的數值條（hud/stats-ui.mjs）：五隻角色比五隻、八把槍比八把 */
.stat-bars { display: flex; flex-direction: column; gap: 5px; }
.stat-row { display: grid; grid-template-columns: 68px 1fr auto; align-items: center; gap: 8px; }
.stat-lbl { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--ink2); white-space: nowrap; }
.stat-lbl svg { color: var(--acc); opacity: .9; flex: none; }
.stat-bar { height: 7px; border-radius: 4px; background: var(--track); overflow: hidden; }
.stat-bar > div { height: 100%; border-radius: 4px; background: var(--honey); transition: width .25s ease; }
.stat-val { font-size: 11px; color: var(--ink2); min-width: 44px; text-align: right; }
.stat-bars.compact { gap: 3px; width: 100%; margin: 2px 0 1px; }
.stat-bars.compact .stat-row { grid-template-columns: 1fr; gap: 0; }
.stat-bars.compact .stat-bar { height: 4px; }
.stat-bars.compact .stat-row:nth-child(1) .stat-bar > div { background: linear-gradient(90deg, #c93a3a, #e0432b); }
.stat-bars.compact .stat-row:nth-child(2) .stat-bar > div { background: var(--tool); }
.stat-bars.compact .stat-row:nth-child(3) .stat-bar > div { background: var(--honey); }
.bar-key { display: flex; gap: 12px; margin: 2px 0 6px; font-size: 11px; color: var(--ink2); }
.bar-key span { display: inline-flex; align-items: center; gap: 5px; }
.bar-key b { font-weight: inherit; }
.bar-key i { width: 14px; height: 4px; border-radius: 2px; display: inline-block; }
.bar-key .k1 { background: #e0432b; } .bar-key .k2 { background: var(--ui-blue); } .bar-key .k3 { background: var(--ui-gold); }
.stat-row.best .stat-lbl, .stat-row.best .stat-val { color: var(--acc); font-weight: 700; }
.stat-row.best .stat-bar > div { background: linear-gradient(90deg, #f5a91b, #ffe08a); box-shadow: 0 0 8px rgba(245,169,27,.45); }
.chips { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; width: 100%; }
.chip { display: flex; align-items: flex-start; gap: 8px; text-align: left; padding: 7px 9px; border-radius: 10px; background: rgba(255,255,255,.55); border: 1.5px solid var(--cream-edge); }
.chip-ic { display: grid; place-items: center; width: 26px; height: 26px; flex: none; border-radius: 8px; color: var(--honey-ink); background: var(--honey); box-shadow: 0 2px 0 var(--honey-shadow); }
.chip-txt { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.chip-txt b { font-size: 12px; color: var(--ink); }
.chip-txt span { font-size: 11.5px; line-height: 1.4; color: var(--ink2); }

/* 出發畫面的「這身裝備」（DESIGN 5.5.6） */
.go-loadout { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.go-slot { background: rgba(255,255,255,.55); border: 1.5px solid var(--cream-edge); border-left: 4px solid var(--cream-edge); border-radius: 10px; padding: 7px 9px; display: flex; flex-direction: column; gap: 2px; }
.go-slot.t-fine { border-left-color: var(--fine); } .go-slot.t-rare { border-left-color: var(--rare); } .go-slot.t-legend { border-left-color: var(--legend); } .go-slot.t-core { border-left-color: var(--core); } .go-slot.t-worn { border-left-color: #8b8b93; }
.go-slot.empty { border-style: dashed; opacity: .75; }
.go-slot b { font-size: 13px; }
@media (max-width: 560px) { .go-loadout { grid-template-columns: 1fr; } }

/* 大廳 */
.lobby { display: flex; flex-direction: column; gap: 10px; }
.lobby-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.lobby-head-r { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.lobby-head .back-btn { min-height: 44px; min-width: 44px; padding: 8px 12px; font-size: 14px; font-weight: 800; }
.room-note { text-align: center; font-weight: 700; }
.badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; border-radius: 10px; background: var(--ui-danger); color: #fff; font-size: 11px; padding: 0 6px; margin-left: 6px; border: 2px solid #fff; }
.room-list { display: flex; flex-direction: column; gap: 6px; max-height: 180px; overflow: auto; }
.room-list .room { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; text-align: left; }
.room-list .empty { color: var(--ink2); font-size: 13px; padding: 6px 0; }
.lobby-actions { display: grid; grid-template-columns: 1.4fr 1fr 96px 96px; gap: 8px; align-items: stretch; }
.lobby-actions button { font-weight: 800; }
.lobby-actions #joinCode { text-align: center; letter-spacing: .18em; text-transform: uppercase; font-family: var(--mono); }
.room-panel { background: rgba(255,255,255,.5); border: 1.5px solid var(--cream-edge); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.room-panel .row > span { font-weight: 700; }
.seats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.seat { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 4px; border: 2px dashed var(--cream-edge); border-radius: 12px; font-size: 12px; min-height: 96px; justify-content: center; background: rgba(255,255,255,.35); }
.seat img { width: 44px; height: 44px; object-fit: contain; }
.seat .st { color: var(--ink2); font-size: 11px; } .seat.ready .st { color: #1f8f4a; font-weight: 700; } .seat.host .st { color: var(--acc); font-weight: 700; }

/* 營地 */
.camp { display: flex; flex-direction: column; gap: 10px; }
.camp-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.camp-head > div:first-child .lbl { margin-bottom: 4px; }
.camp-head b#campTitle { display: inline-block; background: var(--sign); border: 2px solid var(--sign-edge); color: var(--sign-ink); border-radius: 12px; padding: 5px 16px; font-size: 18px; font-weight: 900; letter-spacing: .06em; box-shadow: 0 4px 0 var(--sign-shadow), 0 8px 18px rgba(0,0,0,.3); text-shadow: 0 1px 0 rgba(0,0,0,.35); }
/* 資源格：深木頭 chip（跟園區的金幣 chip 同一款） */
.camp-stats { display: flex; flex-wrap: wrap; gap: 8px; }
.res { flex: none; display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 66px; padding: 7px 10px 6px; border-radius: 12px; white-space: nowrap; color: var(--wood-ink); background: rgba(50,32,14,.82); border: 1.5px solid var(--wood-edge); }
.res > svg { color: rgba(255,245,220,.7); flex: none; }
.res-t { display: flex; flex-direction: column; align-items: center; line-height: 1.15; }
.res-t .lbl { font-size: 10px; letter-spacing: .08em; color: rgba(255,245,220,.7); }
.res-t b { font-size: 17px; }
.res.gold { border-color: rgba(255,208,96,.6); background: linear-gradient(rgba(90,56,0,.9), rgba(50,32,14,.9)); }
.res.gold > svg, .res.gold b { color: var(--wood-hi); }
@media (max-width: 820px) { .res-t b { font-size: 15px; } .res { min-width: 58px; padding: 6px 8px 5px; } }
.next-floor { display: flex; flex-direction: column; gap: 4px; margin: 4px 0 2px; }
.next-floor .bar { height: 8px; background: var(--track); border-radius: 4px; overflow: hidden; margin-top: 0; }
.next-floor .bar > div { height: 100%; width: 0; background: var(--honey); transition: width .3s; }
.camp-flair { display: flex; flex-direction: column; gap: 2px; margin: 4px 0; padding: 10px 12px; border-radius: 10px; border: 1.5px solid var(--cream-edge); border-left: 4px solid var(--cream-edge); background: rgba(255,255,255,.55); }
.camp-flair b { font-size: 15px; }
.camp-flair.t-rare { border-left-color: var(--rare); } .camp-flair.t-legend { border-left-color: var(--legend); } .camp-flair.t-core { border-left-color: var(--core); }
/* 分頁：奶油藥丸，選中蜂蜜黃；手機橫向捲動，不換行、不擠成直字 */
.tabs { display: flex; gap: 6px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding: 2px; margin: 0 -2px; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { flex: none; padding: 7px 14px; font-size: 13px; font-weight: 800; border-radius: 999px; white-space: nowrap; }
.tabs button.sel { background: var(--honey); color: var(--honey-ink); border-color: var(--honey-edge); box-shadow: 0 3px 0 var(--honey-shadow); }
.perk-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.perk { display: grid; grid-template-columns: 1fr auto; gap: 3px 10px; align-items: center; background: rgba(255,255,255,.55); border: 1.5px solid var(--cream-edge); border-radius: 12px; padding: 9px 11px; transition: border-color .12s ease, background .12s ease; }
.perk:hover { border-color: rgba(245,169,27,.5); }
.perk.done { opacity: .75; }
.perk-name { display: flex; align-items: center; gap: 8px; min-width: 0; }
.perk-ic { display: grid; place-items: center; width: 26px; height: 26px; flex: none; border-radius: 8px; color: var(--honey-ink); background: var(--honey); box-shadow: 0 2px 0 var(--honey-shadow); }
.perk.done .perk-ic { color: #fff; background: var(--ok); box-shadow: 0 2px 0 #1f8f4a; }
.perk b { font-size: 13px; } .perk .lbl { grid-column: 1; min-height: 1.25em; }
.perk .pips { display: flex; gap: 4px; flex: none; } .perk .pip { width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid rgba(150,115,55,.35); background: #fff; } .perk .pip.on { background: var(--ui-gold); border-color: var(--ui-gold-dark); }
.perk button { grid-column: 2; grid-row: 1 / span 2; padding: 6px 11px; font-size: 12px; white-space: nowrap; }
/* 買得起＝蜂蜜黃；買不起＝灰 */
.perk button:not(:disabled) { background: var(--honey); color: var(--honey-ink); border-color: var(--honey-edge); font-weight: 800; box-shadow: 0 3px 0 var(--honey-shadow); }
.perk .bar { grid-column: 1 / -1; height: 6px; background: var(--track); border-radius: 3px; overflow: hidden; margin-top: 2px; }
.perk .bar > div { height: 100%; background: var(--honey); }
.perk.ready { border-color: var(--ui-gold); box-shadow: 0 0 0 2px rgba(245,169,27,.3); background: linear-gradient(rgba(255,224,138,.35), rgba(255,255,255,.55)); }
.quest-reward { grid-column: 2; grid-row: 1 / span 2; align-self: center; justify-self: end; padding: 6px 11px; font-size: 12px; white-space: nowrap; color: var(--ink2); border: 1.5px solid var(--cream-edge); border-radius: 10px; background: rgba(255,255,255,.5); }
.quest-reward.got { color: #1f8f4a; border-color: rgba(47,170,74,.45); }
.contract-box { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.contract-head { font-size: 13px; color: var(--ink2); }
.perk.contract.sel { box-shadow: 0 0 0 2px rgba(245,169,27,.55); border-color: var(--ui-gold); }
.perk.contract .lbl { grid-column: 1 / -1; }
.codex-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.codex-head { grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; margin-bottom: 4px; }
.codex-head b { font-size: 15px; color: var(--ink); white-space: nowrap; }
.codex-head .bar { flex: 1; margin-top: 0; height: 8px; background: var(--track); border-radius: 4px; overflow: hidden; }
.codex-head .bar > div { height: 100%; background: var(--honey); }
.codex { border: 2px solid var(--cream-edge); border-radius: 12px; padding: 10px 6px 8px; text-align: center; font-size: 11px; min-height: 96px; display: flex; flex-direction: column; justify-content: center; gap: 4px; background: rgba(255,255,255,.55); transition: transform .12s ease, box-shadow .12s ease; }
.codex.unknown { color: var(--ink2); border-style: dashed; background: rgba(255,255,255,.25); }
.codex-gem { width: 42px; height: 42px; object-fit: contain; margin: 0 auto 2px; }
.codex.unknown .codex-gem { filter: grayscale(1) brightness(.6) contrast(1.1); opacity: .5; }
.codex:not(.unknown) .codex-gem { filter: drop-shadow(0 2px 6px rgba(60,40,20,.35)); }
.codex.legend .codex-gem { filter: drop-shadow(0 2px 8px rgba(201,143,10,.55)); }
.codex.core .codex-gem { filter: drop-shadow(0 2px 10px rgba(224,67,43,.6)); }
.codex:not(.unknown):hover { transform: translateY(-2px); }
.codex.fine { border-color: var(--fine); } .codex.rare { border-color: var(--rare); } .codex.legend { border-color: var(--legend); box-shadow: 0 0 10px rgba(201,143,10,.3); } .codex.core { border-color: var(--core); box-shadow: 0 0 14px rgba(224,67,43,.4); }
.codex b { font-size: 12px; } .codex .ver { color: var(--acc); } .codex .ff { color: var(--core); font-weight: 700; }
.board { display: flex; flex-direction: column; gap: 6px; }
.board .rowb { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; padding: 6px 10px; border: 1.5px solid var(--cream-edge); border-radius: 10px; font-size: 13px; background: rgba(255,255,255,.5); }
.board .rowb.me { background: linear-gradient(rgba(255,224,138,.4), rgba(255,255,255,.55)); border-color: rgba(245,169,27,.5); }
.board .rowb.me .who > span { color: var(--acc); font-weight: 700; }
.board .rank { display: grid; place-items: center; width: 24px; height: 24px; flex: none; border-radius: 8px; font: 700 12px var(--mono); color: var(--ink2); background: rgba(255,255,255,.7); border: 1.5px solid var(--cream-edge); }
.board .rank.r1 { color: var(--honey-ink); background: var(--honey); border-color: var(--honey-edge); }
.board .rank.r2 { color: #14121a; background: #dfe3ea; border-color: #fff; }
.board .rank.r3 { color: #fff; background: #c48a5a; border-color: #fff; }
.board .who { display: flex; align-items: center; gap: 8px; min-width: 0; }
.board .av { width: 26px; height: 26px; flex: none; object-fit: contain; border-radius: 50%; background: rgba(255,255,255,.7); }

/* 裝備庫（DESIGN 5.5.6）：上面三格身上這身，下面是庫 */
.gear-slots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.gear-slot { background: rgba(255,255,255,.55); border: 1.5px solid var(--cream-edge); border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 4px; }
.gear-slot.empty { border-style: dashed; background: rgba(255,255,255,.25); }
.gear-slot.empty .gear-body { color: var(--ink2); }
.gear-slot .slot-how { display: block; margin-top: 3px; color: var(--acc); }
.gear-head { font-size: 13px; color: var(--ink2); margin: 4px 0 8px; }
.gear-head.over { color: #c93a3a; font-weight: 700; }
.gear-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.gear-card { background: rgba(255,255,255,.55); border: 1.5px solid var(--cream-edge); border-left-width: 4px; border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 3px; }
.gear-card.on { box-shadow: 0 0 0 2px rgba(47,170,74,.55); }
.gear-card b, .gear-slot b { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; font-size: 14px; }
.gear-tier { font-size: 11px; font-weight: normal; }
.gear-affix { font-size: 12px; color: var(--acc); font-weight: 700; }
.gear-foot { font-size: 11px; color: var(--ink2); }
.gear-acts { display: flex; gap: 6px; margin-top: auto; padding-top: 8px; flex-wrap: wrap; }
.gear-acts button { font-size: 12px; padding: 4px 10px; }
.gear-stats { display: flex; flex-wrap: wrap; gap: 3px 5px; font-size: 11px; color: var(--ink2); font-variant-numeric: tabular-nums; }
.gear-stats > span { padding: 1px 6px; border-radius: 5px; background: rgba(60,40,20,.08); white-space: nowrap; }
.gear-img { width: 100%; max-width: 96px; height: 58px; object-fit: contain; align-self: center; margin-bottom: 2px; filter: drop-shadow(0 3px 8px rgba(60,40,20,.3)); }
.gear-slot .gear-img { height: 46px; max-width: 76px; }
.gear-card.t-legend .gear-img { filter: drop-shadow(0 3px 10px rgba(201,143,10,.5)); }
.gear-card.t-core .gear-img { filter: drop-shadow(0 3px 12px rgba(224,67,43,.55)); }
.gear-card.t-worn .gear-img { filter: grayscale(.45) brightness(.9); }
.t-worn { border-left-color: #8b8b93; } .t-worn .gear-tier { color: #6f6f78; }
.t-fine { border-left-color: var(--fine); } .t-fine .gear-tier { color: #2c6aa8; }
.t-rare { border-left-color: var(--rare); } .t-rare .gear-tier { color: #7a2f9e; }
.t-legend { border-left-color: var(--legend); } .t-legend .gear-tier { color: #a87508; }
.t-core { border-left-color: var(--core); } .t-core .gear-tier { color: #c03520; }
@media (max-width: 560px) { .gear-slots { grid-template-columns: 1fr; } }

/* ===================== 結算 ===================== */
.end { position: fixed; inset: 0; z-index: 10; display: grid; place-items: center; overflow: auto; background: rgba(20,14,8,.62); backdrop-filter: blur(4px); padding: 16px; }
.end .menu-card { width: min(720px, 100%); margin: auto; display: flex; flex-direction: column; gap: 12px; padding: 20px 22px 18px; border-radius: var(--ui-radius-lg); animation: bag-in .2s ease both; }
.end .menu-card > h2 { align-self: flex-start; font-size: 20px; }
.end table { width: 100%; border-collapse: collapse; font-size: 14px; }
.end th { padding: 4px 8px 8px; font-size: 11px; font-weight: 700; letter-spacing: .06em; color: var(--ink2); text-align: left; border-bottom: 1.5px solid var(--cream-edge); }
.end td { padding: 9px 8px; border-bottom: 1px solid rgba(150,115,55,.16); text-align: left; vertical-align: middle; }
.end tbody tr:last-child td { border-bottom: 0; }
.end .relics { display: flex; gap: 3px; flex-wrap: wrap; align-items: center; }
.end .relics .relic { width: 19px; height: 19px; font-size: 10px; border-radius: 5px; border: 1.5px solid; background: rgba(255,255,255,.6); animation: none; box-shadow: none; }
.end .title { font-size: 12px; color: var(--acc); font-weight: 700; }
.end .actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 2px; }
.end .actions button { font-weight: 800; }
.end .actions button:not(.primary) { color: var(--ui-ink); background: rgba(255,252,244,.95); border: 2px solid var(--cream-edge); box-shadow: 0 3px 0 rgba(150,110,40,.14); backdrop-filter: none; }
.end-mine { display: grid; grid-template-columns: repeat(auto-fit, minmax(112px, 1fr)); gap: 8px; }
.end-mine div { background: rgba(255,255,255,.55); border: 1.5px solid var(--cream-edge); border-radius: 12px; padding: 9px 11px; }
.end-mine b { display: block; margin-top: 2px; font-size: 19px; font-variant-numeric: tabular-nums; }
.end-mine div:nth-child(4) { border-color: var(--ui-gold); background: linear-gradient(rgba(255,224,138,.45), rgba(255,255,255,.55)); }
.end-mine div:nth-child(4) b { color: var(--acc); }
.end-mine .unl { grid-column: 1 / -1; display: flex; gap: 6px 8px; flex-wrap: wrap; align-items: center; }
.end-mine .unl > .title, .end-mine .unl > .note { flex-basis: 100%; margin-top: 2px; }
.whatif { margin: 8px 0 4px; padding: 8px 10px; border-radius: 10px; font-size: 13px; color: var(--ui-ink); background: linear-gradient(rgba(255,224,138,.45), rgba(255,240,200,.5)); border: 1.5px solid rgba(245,169,27,.5); }
.gear-result { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; padding-top: 8px; border-top: 1.5px solid var(--cream-edge); }
.gear-result .relic { align-self: flex-start; }
.replay-banner { position: fixed; left: 50%; top: 14px; transform: translateX(-50%); z-index: 60; padding: 6px 14px; border-radius: 999px; font-size: 13px; letter-spacing: .04em; color: var(--wood-ink); background: var(--wood-bg); border: 1.5px solid var(--wood-edge); backdrop-filter: blur(8px); }

/* ===================== 開機畫面（寫死在 HTML 裡，domReady 就看得到） ===================== */
.boot { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; background: radial-gradient(ellipse at 50% 35%, #2a1f3a 0%, var(--bg) 62%); transition: opacity .35s ease; }
.boot.gone { opacity: 0; pointer-events: none; }
.boot-inner { display: flex; flex-direction: column; align-items: center; gap: 14px; width: min(320px, 76vw); text-align: center; }
.boot-crest { width: clamp(84px, 22vw, 112px); height: auto; filter: drop-shadow(0 4px 14px rgba(0,0,0,.6)) drop-shadow(0 0 22px rgba(245,169,27,.3)); animation: boot-float 3.6s ease-in-out infinite; }
@keyframes boot-float { 50% { transform: translateY(-6px); } }
.boot-brand { font-size: clamp(26px, 6vw, 34px); font-weight: 900; letter-spacing: .06em; color: var(--wood-hi); text-shadow: 0 2px 18px rgba(245,169,27,.25); animation: boot-pulse 2.4s ease-in-out infinite; }
@keyframes boot-pulse { 50% { text-shadow: 0 2px 28px rgba(245,169,27,.5); } }
.boot-brand small { display: block; margin-top: 4px; font-size: 11px; font-weight: 600; letter-spacing: .32em; color: var(--ink2); }
.boot-bar { width: 100%; height: 6px; border-radius: 3px; background: rgba(255,255,255,.12); overflow: hidden; }
.boot-bar > div { width: 0; height: 100%; border-radius: 3px; background: var(--honey); transition: width .2s ease; }
.boot-bar.wait > div { width: 38%; transition: none; animation: boot-slide 1.4s ease-in-out infinite; }
@keyframes boot-slide { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(163%); } }
.boot-msg { font-size: 13px; color: var(--ink2); font-variant-numeric: tabular-nums; }
.boot-tip { min-height: 2.6em; font-size: 12px; line-height: 1.5; color: var(--ink2); }
.boot-tip b { color: var(--wood-hi); font-weight: 700; }

/* ===================== 響應式 ===================== */
@media (max-width: 820px) {
  .play-grid { grid-template-columns: 1fr; }
  .hero { flex-direction: row; align-items: flex-end; justify-content: flex-start; gap: 0; padding-top: 4px; }
  .hero-glow { left: 66px; top: 62px; width: 170px; height: 170px; }
  .hero img { width: 128px; height: 128px; flex: none; margin-bottom: 6px; z-index: 1; }
  .hero-text { margin: 0 0 0 -14px; padding: 12px 12px 12px 22px; align-items: flex-start; text-align: left; }
  .hero-text > b { position: static; transform: none; font-size: 16px; padding: 3px 12px; margin-bottom: 4px; }
  .weapons { grid-template-columns: repeat(3, 1fr); }
  .cta { position: sticky; bottom: -1px; padding: 12px 0 6px; margin: 0 -14px; padding-left: 14px; padding-right: 14px; background: linear-gradient(180deg, rgba(20,18,26,0), rgba(20,18,26,.92) 32%); z-index: 2; }
  .cta .big { padding: 14px; font-size: 17px; }
  .brand h1 small { letter-spacing: .18em; }
  .tog span { display: none; } .tog { padding: 8px; }
  .lobby-actions { grid-template-columns: 1fr 1fr; }
  .hud-card { min-width: 150px; padding: 6px 10px; }
  .perk-grid { grid-template-columns: 1fr; }
  .tabs { margin: 0 -12px; padding: 2px 12px; } .tabs::after { content: ""; flex: none; width: 4px; }
  .bnbRating { max-width: none; flex: 1 1 100%; }   /* 手機：分級標示自己一列，不跟導覽列擠 */
}
@media (max-width: 600px) {
  h1 { font-size: 30px; }
  .panel { padding: 12px; }
  .bag-grid, .bag-gear { grid-template-columns: repeat(4, 1fr); gap: 6px; }
  /* HUD 兩張卡：左卡吃剩餘寬度、右卡照小地圖寬，不再溢出螢幕 */
  .hud-card { min-width: 0; padding: 5px 9px; font-size: 12px; background: rgba(50,32,14,.6); } .hud-top .hud-card:first-child { flex: 1 1 auto; } .hud-card.right { flex: none; min-width: 0; }
  .hud-card .row { font-size: 12px; } .hud-card .row.worth { margin: 2px -4px; padding: 2px 4px; } #hudWorth { font-size: 13px; }
  .bar { height: 6px; margin-top: 4px; } .guide { font-size: 11px; margin-top: 4px; }
  /* 營地 HUD：木牌與資源格壓小，一列放得下 */
  .camp-hud-top { gap: 6px; flex-wrap: wrap; } .camp-hud-res { order: 3; flex-basis: 100%; } #btnCampMenu { order: 2; }   /* 第一列：木牌＋回選單；第二列：資源格 */
  .camp-hud-title { padding: 3px 10px; } .camp-hud-title b { font-size: 12px; white-space: nowrap; } .camp-hud-title .lbl { display: none; }
  .camp-hud-res { gap: 4px; } .camp-hud-res .res { padding: 3px 7px; min-width: 44px; border-radius: 9px; } .camp-hud-res .res b { font-size: 12px; } .camp-hud-res .res .lbl { font-size: 9px; }
  .bag-slot { padding: 6px 4px; min-height: 76px; }
}
@media (max-width: 480px) {
  .views button { padding: 8px 14px; }
  .bnbRating p { font-size: 10px; }
  .chars { gap: 4px; } .char { padding: 6px 2px; }
  .weapons { gap: 4px; }
}
/* 手機橫向：寬度會超過 820 而被當桌機，但高度只有 390。標題壓扁、舞台縮小、CTA 不黏底（會吃掉一半畫面） */
@media (max-height: 520px) {
  .brand .crest { width: 40px; } h1 { font-size: 22px; } h1 small { display: none; }
  .hero img { width: 120px; height: 120px; } .hero-glow { display: none; }
  .play-grid { grid-template-columns: 260px 1fr; }
  .cta { position: static; padding: 0; margin: 0; background: none; }
  .cta .big { padding: 12px; font-size: 16px; }
  .bnbRating { padding: 4px 8px; max-width: 320px; } .bnbRating img { width: 45px; height: 45px; } .bnbRating p { font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .card, .choices.waiting .cards, .relic.core, .perk.ready button, .last-call, .ending-note, .boot-brand, .boot-bar.wait > div, .boot-crest, .hero img, .hud-card .lv.up, .bag, .end .menu-card, .help, .camp-modal { animation: none; }
  .boot, .hurt-flash, button { transition: none; }
}
