/* ==========================================================================
   战火世界 · 河谷战线
   轻量像素风 UI · 无外部依赖
   ========================================================================== */
:root {
  --ink: #090b0c;
  --ink-2: #0f1315;
  --panel: rgba(12, 16, 18, 0.92);
  --panel-soft: rgba(20, 25, 27, 0.86);
  --line: #3f4644;
  --line-bright: #69716a;
  --text: #e7ddc7;
  --muted: #9a9789;
  --dim: #6e7068;
  --sand: #d3b884;
  --amber: #f3a33b;
  --amber-2: #ffc364;
  --blue: #5fb8ff;
  --blue-deep: #1f6db3;
  --red: #ff6258;
  --red-deep: #a52c29;
  --green: #8acb68;
  --font: "Cascadia Mono", "Consolas", "Noto Sans CJK SC", "Noto Sans SC", "Microsoft YaHei", "PingFang SC", monospace, sans-serif;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.48);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html { color-scheme: dark; }
body { min-width: 320px; background: var(--ink); color: var(--text); font-family: var(--font); font-size: 13px; line-height: 1.55; overflow-x: hidden; }
button, select, input { font: inherit; }
button { color: inherit; }
button, select { cursor: pointer; }
img { display: block; max-width: 100%; }
::selection { background: var(--amber); color: #13100b; }
.scanlines, .grain { position: fixed; inset: 0; z-index: 120; pointer-events: none; }
.scanlines { background: repeating-linear-gradient(to bottom, rgba(0, 0, 0, 0.08) 0, rgba(0, 0, 0, 0.08) 1px, transparent 1px, transparent 3px); opacity: 0.5; }
.grain { opacity: 0.16; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E"); mix-blend-mode: soft-light; }
body[data-quality="low"] .scanlines, body[data-quality="low"] .grain { display: none; }
body[data-quality="medium"] .grain { opacity: 0.08; }
body[data-quality="medium"] .scanlines { opacity: 0.28; }
.eyebrow { color: var(--amber); font-size: 10px; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; }
.panel { position: relative; background: linear-gradient(150deg, rgba(19, 24, 25, 0.94), rgba(9, 12, 13, 0.94)); border: 1px solid var(--line); box-shadow: var(--shadow), inset 0 0 0 1px rgba(255, 255, 255, 0.025); }
.panel::before { content: ""; position: absolute; top: -1px; left: -1px; width: 96px; height: 2px; background: var(--amber); box-shadow: 0 0 14px rgba(243, 163, 59, 0.4); }
.panel::after { content: ""; position: absolute; right: -1px; bottom: -1px; width: 22px; height: 22px; border-right: 1px solid var(--amber); border-bottom: 1px solid var(--amber); opacity: 0.45; pointer-events: none; }
.panel-heading { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; }
.tag { border: 1px solid #4a504b; color: var(--muted); background: rgba(0, 0, 0, 0.25); padding: 2px 7px; font-size: 10px; letter-spacing: 0.1em; }
h1, h2, h3 { line-height: 1.12; font-weight: 800; }
h2 { font-size: 22px; letter-spacing: 0.03em; }
p { color: var(--muted); }
b { color: var(--text); }
.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 36px; padding: 8px 15px; border: 1px solid #59625e; border-radius: 0; background: linear-gradient(180deg, #273034, #171d1f); color: var(--text); font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px)); transition: background 120ms ease, color 120ms ease, border-color 120ms ease, transform 80ms ease; }
.btn:hover { border-color: var(--amber); color: var(--amber-2); background: linear-gradient(180deg, #303a3d, #1a2123); }
.btn:active { transform: translateY(1px); }
.btn.active { border-color: var(--amber); color: #1b1408; background: var(--amber); }
.btn-primary { border-color: #f9c160; color: #1a1308; background: linear-gradient(180deg, var(--amber-2), var(--amber)); box-shadow: 0 0 0 1px rgba(255, 195, 100, 0.17), 0 8px 26px rgba(243, 163, 59, 0.19); }
.btn-primary:hover { color: #0b0905; background: #ffd07e; border-color: #ffe0a7; }
.btn-ghost { background: rgba(11, 15, 16, 0.6); border-color: #4b5350; }
.btn-small { min-height: 28px; padding: 5px 10px; font-size: 10px; }
.btn-start { min-height: 54px; padding: 3px 26px 3px 18px; font-size: 19px; letter-spacing: 0.12em; clip-path: polygon(0 0, calc(100% - 13px) 0, 100% 13px, 100% 100%, 13px 100%, 0 calc(100% - 13px)); }
.btn-kicker { font-size: 8px; letter-spacing: 0.17em; writing-mode: vertical-rl; opacity: 0.62; }
.btn-arrow { font-size: 13px; }
.icon-btn { width: 34px; height: 34px; display: inline-grid; place-items: center; border: 1px solid #505955; background: rgba(12, 16, 18, 0.88); color: var(--text); font-weight: 800; transition: 120ms ease; }
.icon-btn:hover { border-color: var(--amber); color: var(--amber); }

/* ============================ 主菜单 ============================ */
.menu-screen { position: relative; min-height: 100vh; padding: 18px clamp(14px, 2.2vw, 36px) 12px; background: linear-gradient(90deg, rgba(7, 10, 11, 0.96) 0%, rgba(7, 10, 11, 0.72) 34%, rgba(7, 10, 11, 0.42) 100%), linear-gradient(0deg, rgba(7, 9, 10, 0.96) 0%, rgba(7, 9, 10, 0.32) 56%, rgba(7, 9, 10, 0.7) 100%), url("../assets/images/menu-bg.jpg") center 38% / cover no-repeat; }
.menu-screen::before { content: ""; position: fixed; inset: 0; pointer-events: none; background: radial-gradient(ellipse at 68% 34%, transparent 0%, rgba(0, 0, 0, 0.4) 72%); }
.menu-header, .menu-main, .armory-panel, .menu-footer { position: relative; z-index: 1; max-width: 1580px; margin-left: auto; margin-right: auto; }
.menu-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 74px; padding: 10px 0 14px; border-bottom: 1px solid rgba(116, 120, 106, 0.28); }
.brand { display: flex; align-items: center; gap: 14px; }
.brand-mark { width: 44px; height: 44px; display: flex; align-items: flex-end; gap: 4px; padding: 7px; border: 1px solid #5c5b4e; background: rgba(10, 13, 14, 0.7); }
.brand-mark i { display: block; width: 7px; background: var(--amber); box-shadow: 0 0 8px rgba(243, 163, 59, 0.45); }
.brand-mark i:nth-child(1) { height: 16px; opacity: 0.62; }
.brand-mark i:nth-child(2) { height: 27px; }
.brand-mark i:nth-child(3) { height: 20px; opacity: 0.82; }
.brand-copy h1 { font-size: clamp(25px, 2.6vw, 40px); letter-spacing: 0.08em; color: #f3ead5; text-shadow: 3px 3px 0 rgba(0, 0, 0, 0.48); }
.brand-copy h1 span { display: inline-block; margin-left: 8px; font-size: 0.4em; letter-spacing: 0.14em; color: var(--amber); font-weight: 600; }
.brand-copy p { margin-top: 2px; color: #aaa58f; font-size: 9px; letter-spacing: 0.26em; }
.header-actions { display: flex; align-items: center; gap: 10px; }
.status-strip { display: flex; align-items: center; gap: 7px; font-size: 10px; color: #aaa58f; letter-spacing: 0.06em; white-space: nowrap; }
.status-strip b { margin-left: 6px; color: var(--amber); border-left: 1px solid #4d4d43; padding-left: 10px; }
.live-dot { width: 6px; height: 6px; background: var(--green); box-shadow: 0 0 7px var(--green); animation: blink 2s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0.35; } }
.menu-main { display: grid; grid-template-columns: minmax(0, 1.18fr) minmax(340px, 0.82fr); gap: 14px; padding: 14px 0; }
.mission-panel { padding: 16px 18px 14px; overflow: hidden; }
.mission-panel h2 { margin: 2px 0 8px; font-size: clamp(20px, 2vw, 27px); color: #f2e7d0; }
.mission-lead { max-width: 760px; font-size: 12px; line-height: 1.7; color: #b9b4a2; }
.map-schematic { position: relative; display: grid; grid-template-columns: 86px 52px minmax(140px, 1fr) 52px 86px; align-items: center; gap: 6px; min-height: 82px; margin: 12px 0 10px; padding: 8px 8px 10px; border: 1px solid #3f443c; background: repeating-linear-gradient(90deg, rgba(164, 156, 125, 0.05) 0 1px, transparent 1px 24px), linear-gradient(180deg, #171d1b, #101412); overflow: hidden; }
.map-side { padding: 7px 4px; text-align: center; font-size: 9px; letter-spacing: 0.1em; border: 1px solid currentColor; line-height: 1.2; }
.map-side.blue { color: var(--blue); background: rgba(38, 111, 169, 0.12); }
.map-side.red { color: var(--red); background: rgba(154, 42, 38, 0.12); }
.map-node { position: relative; display: grid; place-items: center; width: 42px; height: 42px; margin: auto; border: 1px solid var(--sand); background: #171813; clip-path: polygon(25% 0, 75% 0, 100% 25%, 100% 75%, 75% 100%, 25% 100%, 0 75%, 0 25%); }
.map-node b { color: var(--amber); font-size: 17px; line-height: 1; }
.map-node small { position: absolute; top: 46px; color: var(--dim); font-size: 8px; white-space: nowrap; }
.map-center { position: relative; height: 58px; display: flex; align-items: flex-end; justify-content: center; border-left: 1px dashed #4f4c3d; border-right: 1px dashed #4f4c3d; }
.map-center span { position: absolute; bottom: 1px; font-size: 8px; color: var(--amber); letter-spacing: 0.08em; }
.reactor { width: 24px; height: 26px; border: 1px solid #756743; background: linear-gradient(90deg, #2b3b35, #334d3c, #2b3b35); position: relative; z-index: 2; }
.reactor::before { content: ""; position: absolute; inset: 4px 5px 8px; background: #19251f; border: 1px solid #4c5f4e; }
.cooling { width: 22px; height: 35px; border: 1px solid #6a654f; background: linear-gradient(90deg, #3b4138, #232b26); clip-path: polygon(24% 0, 76% 0, 100% 100%, 0 100%); position: relative; z-index: 1; }
.cooling-a { margin-right: -4px; }
.cooling-b { margin-left: -4px; transform: scale(0.8); opacity: 0.8; }
.wire-line { position: absolute; left: 28%; right: 28%; bottom: 7px; height: 6px; opacity: 0.55; background: repeating-linear-gradient(135deg, #8e7d5a 0 1px, transparent 1px 5px), repeating-linear-gradient(45deg, #8e7d5a 0 1px, transparent 1px 5px); }
.brief-grid { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid #373c37; }
.brief-grid div { padding: 7px 10px 0 0; display: flex; flex-direction: column; gap: 1px; }
.brief-grid span { font-size: 9px; color: var(--dim); letter-spacing: 0.05em; }
.brief-grid b { color: var(--sand); font-size: 12px; }
.settings-panel { padding: 16px 18px 12px; }
.settings-panel h2 { margin: 2px 0 4px; }
.settings-note { font-size: 10px; color: var(--dim); line-height: 1.5; margin-bottom: 10px; }
.setting-row { display: grid; grid-template-columns: minmax(140px, 1fr) minmax(150px, 1.1fr); align-items: center; gap: 12px; padding: 8px 0; border-top: 1px solid rgba(91, 94, 82, 0.28); }
.setting-label { display: flex; flex-direction: column; line-height: 1.35; }
.setting-label b { font-size: 12px; font-weight: 600; }
.setting-label span { font-size: 8px; color: var(--dim); letter-spacing: 0.16em; }
.pixel-select { width: 100%; min-height: 32px; padding: 5px 8px; border: 1px solid #505752; border-radius: 0; background: #121718; color: var(--text); font-size: 10px; }
.seg-control { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid #4c534f; }
.seg-control button { min-height: 30px; border: 0; border-right: 1px solid #3b413e; background: #131819; color: var(--muted); font-size: 10px; }
.seg-control button:last-child { border-right: 0; }
.seg-control button:hover { background: #202729; color: var(--text); }
.seg-control button.active { background: var(--amber); color: #1b1306; font-weight: 800; }
.volume-control { display: grid; grid-template-columns: 32px minmax(0, 1fr) 26px; align-items: center; gap: 8px; }
.volume-control output { font-size: 10px; color: var(--sand); text-align: right; }
input[type="range"] { width: 100%; height: 4px; appearance: none; -webkit-appearance: none; background: #333b38; border: 1px solid #4b534e; }
input[type="range"]::-webkit-slider-thumb { appearance: none; -webkit-appearance: none; width: 12px; height: 16px; background: var(--amber); border: 0; }
input[type="range"]::-moz-range-thumb { width: 12px; height: 16px; background: var(--amber); border: 0; border-radius: 0; }
.settings-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 9px; margin-top: 3px; border-top: 1px solid #363b36; }
.saved-indicator { font-size: 9px; color: var(--dim); }
.saved-indicator.flash { color: var(--green); }/* ---- 军械库 ---- */
.armory-panel { padding: 12px 16px 14px; }
.armory-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin-bottom: 10px; }
.armory-head h2 { margin-top: 2px; font-size: 19px; }
.armory-head h2 span { margin-left: 8px; color: var(--dim); font-size: 10px; font-weight: 400; letter-spacing: 0.04em; }
.armory-tabs { display: flex; border: 1px solid #454c48; }
.armory-tabs button { min-height: 30px; padding: 4px 14px; border: 0; border-right: 1px solid #3b423e; background: #121718; color: var(--muted); font-size: 11px; }
.armory-tabs button:last-child { border-right: 0; }
.armory-tabs button small { color: var(--dim); font-size: 8px; margin-left: 4px; }
.armory-tabs button:hover { color: var(--text); }
.armory-tabs button.active { background: var(--sand); color: #17140f; font-weight: 800; }
.armory-tabs button.active small { color: #4c4130; }
.armory-body { display: grid; grid-template-columns: minmax(0, 1fr) 355px; gap: 12px; align-items: stretch; }
.armory-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; align-content: start; min-height: 218px; }
.unit-card { position: relative; display: grid; grid-template-columns: 74px minmax(0, 1fr); gap: 8px; min-height: 66px; padding: 5px; text-align: left; border: 1px solid #3c433f; background: linear-gradient(110deg, #181d1e, #101415); color: var(--text); overflow: hidden; transition: border-color 120ms ease, background 120ms ease, transform 120ms ease; }
.unit-card:hover { border-color: #80775f; background: #1d2424; transform: translateY(-1px); }
.unit-card.active { border-color: var(--amber); box-shadow: inset 3px 0 0 var(--amber); }
.unit-card img { width: 74px; height: 66px; object-fit: cover; object-position: center; image-rendering: pixelated; background: #161b1c; filter: saturate(0.8) contrast(1.04); }
.unit-card .unit-card-copy { min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 1px; }
.unit-card b { font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.unit-card small { color: var(--dim); font-size: 8px; letter-spacing: 0.08em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.unit-card .unit-cost { color: var(--amber); font-size: 10px; font-weight: 700; }
.unit-card .unit-lock { position: absolute; top: 3px; right: 4px; padding: 0 3px; border: 1px solid #735b2d; color: #d9b36b; background: rgba(16, 13, 9, 0.88); font-size: 7px; letter-spacing: 0.08em; }
.dossier { display: grid; grid-template-columns: 46% minmax(0, 1fr); min-height: 218px; border: 1px solid #434a44; background: #101415; }
.dossier-image-wrap { position: relative; min-height: 190px; overflow: hidden; border-right: 1px solid #353b37; background: #151a1b; }
.dossier-image-wrap::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent 65%, rgba(10, 13, 14, 0.85)), linear-gradient(0deg, rgba(10, 13, 14, 0.8), transparent 40%); pointer-events: none; }
.dossier-image-wrap img { width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; filter: contrast(1.06) saturate(0.9); }
.dossier-corner { position: absolute; z-index: 2; left: 7px; bottom: 6px; color: var(--amber); font-size: 7px; letter-spacing: 0.12em; }
.dossier-copy { padding: 10px 11px 8px; display: flex; flex-direction: column; min-width: 0; }
.dossier-title { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.dossier-title span { color: var(--amber); font-size: 7px; letter-spacing: 0.12em; }
.dossier-title h3 { margin-top: 1px; font-size: 16px; color: #f1e6d0; }
.dossier-title > b { color: var(--amber); font-size: 17px; white-space: nowrap; }
.dossier-title > b small { display: block; text-align: right; color: var(--dim); font-size: 7px; letter-spacing: 0.1em; }
.dossier-copy > p { margin: 4px 0 7px; font-size: 9px; line-height: 1.5; color: #a8a696; min-height: 42px; }
.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px 6px; }
.stat-grid div { display: flex; justify-content: space-between; gap: 5px; padding-bottom: 2px; border-bottom: 1px dotted #3c423d; font-size: 9px; }
.stat-grid span { color: var(--dim); }
.stat-grid b { color: var(--sand); font-weight: 600; }
.dossier-role { margin-top: auto; padding-top: 7px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px; font-size: 8px; }
.dossier-role span { color: var(--blue); }
.dossier-role i { color: var(--dim); font-style: normal; }
.menu-footer { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0 2px; color: #77776b; font-size: 8px; letter-spacing: 0.04em; }

/* ============================ 游戏界面 ============================ */
.game-screen { height: 100vh; min-height: 560px; display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; background: #080b0c; overflow: hidden; }
.game-header { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(280px, 0.9fr) minmax(180px, 1fr) auto; align-items: center; gap: 14px; padding: 8px 14px 6px; background: linear-gradient(180deg, #141a1c, #0c1011); border-bottom: 1px solid #3a423e; }
.hq-card { min-width: 0; }
.hq-head { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; font-size: 9px; color: var(--muted); }
.hq-head b { font-size: 10px; letter-spacing: 0.04em; }
.hq-head em { margin-left: auto; color: var(--sand); font-style: normal; font-size: 9px; }
.side-dot { width: 6px; height: 6px; display: inline-block; }
.hq-card.blue .side-dot { background: var(--blue); box-shadow: 0 0 7px var(--blue); }
.hq-card.red .side-dot { background: var(--red); box-shadow: 0 0 7px var(--red); }
.bar { height: 5px; background: #252c2a; border: 1px solid #3d4540; overflow: hidden; }
.bar i { display: block; width: 100%; height: 100%; transition: width 200ms linear; }
.bar.hp i { background: var(--sand); }
.hq-card.blue .bar.hp i { background: linear-gradient(90deg, #1b5888, var(--blue)); }
.hq-card.red .bar.hp i { background: linear-gradient(90deg, var(--red), #8e2522); }
.match-center { text-align: center; min-width: 0; }
.match-topline { display: flex; align-items: center; justify-content: center; gap: 9px; }
.match-timer { font-size: 25px; line-height: 1; font-weight: 800; letter-spacing: 0.05em; color: #f6ead2; font-variant-numeric: tabular-nums; }
.match-timer.danger { color: var(--red); animation: blink 1s steps(2) infinite; }
.difficulty-badge { border: 1px solid #5d6358; padding: 1px 5px; color: var(--amber); background: rgba(0, 0, 0, 0.3); font-size: 8px; letter-spacing: 0.1em; }
.phase-label { color: var(--dim); font-size: 8px; letter-spacing: 0.1em; white-space: nowrap; }
.victory-score { display: flex; align-items: center; justify-content: center; gap: 11px; margin-top: 5px; }
.victory-score > span { font-size: 12px; font-weight: 800; min-width: 28px; }
.blue-score { color: var(--blue); }
.red-score { color: var(--red); }
.score-label { color: var(--dim); font-size: 7px; letter-spacing: 0.13em; }
.score-label small { display: block; font-size: 6px; color: #565c55; }
.game-actions { display: flex; gap: 4px; align-items: center; }
.game-actions .icon-btn { width: 30px; height: 30px; font-size: 11px; }
.frontline-strip { display: flex; align-items: stretch; gap: 6px; min-height: 36px; padding: 4px 14px; background: #0e1213; border-bottom: 1px solid #2f3733; }
.point-chip { flex: 1; min-width: 0; display: grid; grid-template-columns: auto auto minmax(40px, 1fr); align-items: center; gap: 6px; padding: 3px 7px; border: 1px solid #343b37; background: #121718; }
.point-chip > b { width: 20px; height: 20px; display: grid; place-items: center; border: 1px solid #786c51; color: var(--amber); font-size: 11px; }
.point-chip > span { font-size: 8px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.point-chip > em { grid-column: 3; grid-row: 1; justify-self: end; color: var(--dim); font-style: normal; font-size: 8px; white-space: nowrap; }
.point-chip .mini-bar { grid-column: 2 / 4; grid-row: 2; height: 2px; background: #313633; }
.point-chip .mini-bar i { display: block; width: 0; height: 100%; background: var(--amber); transition: width 200ms linear; }
.point-chip.blue-held { border-color: #2f6189; }
.point-chip.blue-held .mini-bar i { background: var(--blue); }
.point-chip.red-held { border-color: #773b37; }
.point-chip.red-held .mini-bar i { background: var(--red); }
.point-chip.center { flex: 1.35; }
.point-chip.center .split-bar { grid-column: 1 / 4; grid-row: 2; display: flex; height: 3px; background: #323733; }
.split-bar i { display: block; height: 100%; transition: width 250ms linear; }
#pointCBlue { width: 0; background: var(--blue); }
#pointCRed { width: 0; background: var(--red); }
.point-chip.center > em { grid-column: 1 / 4; grid-row: 1; justify-self: end; }
.income-box { display: flex; align-items: center; gap: 9px; padding: 3px 8px; border: 1px solid #343b37; background: #121718; font-size: 8px; }
.income-box span { color: var(--dim); white-space: nowrap; }
.income-box b { font-size: 10px; white-space: nowrap; }
.blue-text { color: var(--blue) !important; }
.red-text { color: var(--red) !important; }
.canvas-wrap { position: relative; min-height: 0; background: #090c0d; overflow: hidden; border-bottom: 1px solid #2d3430; }
#battleCanvas { display: block; width: 100%; height: 100%; object-fit: contain; image-rendering: pixelated; image-rendering: crisp-edges; }
.canvas-top-left { position: absolute; top: 8px; left: 12px; display: flex; gap: 12px; color: #c4b99c; font-size: 8px; letter-spacing: 0.06em; background: rgba(7, 10, 11, 0.58); padding: 3px 6px; border-left: 1px solid var(--amber); pointer-events: none; }
.canvas-hint { position: absolute; right: 12px; bottom: 9px; color: rgba(220, 206, 172, 0.52); font-size: 8px; letter-spacing: 0.05em; pointer-events: none; }
.game-banner { position: absolute; top: 12%; left: 50%; transform: translateX(-50%); padding: 7px 22px; border: 1px solid rgba(243, 163, 59, 0.55); background: rgba(9, 12, 13, 0.86); color: var(--amber-2); font-size: 11px; letter-spacing: 0.08em; white-space: nowrap; animation: banner-in 180ms steps(3); }
@keyframes banner-in { from { opacity: 0; transform: translate(-50%, -6px); } }
.command-bar { display: grid; grid-template-columns: minmax(0, 1fr) 312px; gap: 8px; padding: 7px 12px 9px; background: linear-gradient(180deg, #111719, #080b0c); }
.shop-panel { min-width: 0; }
.shop-head { display: flex; align-items: center; gap: 12px; min-height: 29px; }
.shop-title { display: flex; align-items: baseline; gap: 6px; }
.shop-title span { font-size: 11px; font-weight: 800; }
.shop-title small { color: var(--dim); font-size: 7px; letter-spacing: 0.14em; }
.supply-readout { display: flex; align-items: baseline; gap: 5px; margin-left: auto; }
.supply-readout span { color: var(--dim); font-size: 8px; }
.supply-readout b { color: var(--amber-2); font-size: 20px; line-height: 1; font-variant-numeric: tabular-nums; }
.supply-readout em { color: var(--dim); font-size: 7px; font-style: normal; }
.shop-tabs { display: flex; gap: 2px; }
.shop-tabs button { min-height: 23px; padding: 2px 10px; border: 1px solid #424a45; background: #141a1b; color: var(--muted); font-size: 9px; }
.shop-tabs button.active { border-color: var(--amber); background: rgba(243, 163, 59, 0.13); color: var(--amber-2); }
.shop-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; margin-top: 4px; min-height: 91px; }
.shop-card { position: relative; display: grid; grid-template-columns: 43px minmax(0, 1fr); align-items: center; gap: 4px; min-height: 88px; padding: 4px; border: 1px solid #39413c; background: #111617; text-align: left; overflow: hidden; transition: border-color 100ms ease, background 100ms ease, transform 80ms ease; }
.shop-card:hover { border-color: #8a7a59; background: #192021; transform: translateY(-1px); }
.shop-card:active { transform: translateY(0); }
.shop-card img { width: 43px; height: 66px; object-fit: cover; object-position: center; image-rendering: pixelated; filter: saturate(0.8); }
.shop-card .sc-body { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.shop-card .sc-name { font-size: 9px; font-weight: 700; line-height: 1.25; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.shop-card .sc-role { color: var(--dim); font-size: 7px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shop-card .sc-cost { color: var(--amber); font-size: 12px; font-weight: 800; margin-top: 1px; }
.shop-card .sc-cost small { font-size: 7px; color: var(--dim); font-weight: 400; }
.shop-card .sc-key { position: absolute; top: 2px; right: 3px; color: #75786d; font-size: 7px; }
.shop-card .sc-lock { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(8, 11, 12, 0.76); color: #c2a264; font-size: 8px; letter-spacing: 0.08em; text-align: center; padding: 4px; }
.shop-card.unaffordable { opacity: 0.46; }
.shop-card.unlocked-flash { animation: unlocked 800ms steps(3); }
@keyframes unlocked { 0%, 100% { border-color: #39413c; } 50% { border-color: var(--amber); box-shadow: 0 0 18px rgba(243, 163, 59, 0.45); } }
.shop-empty { grid-column: 1 / -1; display: grid; place-items: center; border: 1px dashed #3d443e; color: var(--dim); font-size: 10px; min-height: 88px; }
.tactics-panel { border-left: 1px solid #333b37; padding-left: 8px; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.tactics-row { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.tactics-row .btn { min-height: 25px; font-size: 9px; padding: 3px 5px; }
.focus-btn { display: flex; align-items: center; justify-content: space-between; gap: 6px; border: 1px solid #66553a; background: rgba(243, 163, 59, 0.08); color: var(--amber-2); padding: 4px 7px; min-height: 27px; font-size: 9px; text-align: left; }
.focus-btn:hover { background: rgba(243, 163, 59, 0.15); }
.focus-btn small { color: var(--dim); font-size: 7px; font-weight: 400; white-space: nowrap; }
.tactics-info { display: flex; gap: 8px; font-size: 8px; }
.tactics-info div { flex: 1; display: flex; justify-content: space-between; gap: 4px; border-bottom: 1px dotted #3a413c; }
.tactics-info span { color: var(--dim); }
.tactics-info b { font-size: 8px; white-space: nowrap; }
.log-box { flex: 1; min-height: 22px; max-height: 40px; overflow: hidden; font-size: 8px; line-height: 1.55; color: #8c8b7d; }
.log-line { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.log-line b { color: var(--sand); font-weight: 400; }/* ============================ 模态框 ============================ */
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 18px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(3, 5, 6, 0.82); backdrop-filter: blur(3px); }
.modal-card { position: relative; z-index: 1; width: min(940px, 100%); max-height: calc(100vh - 36px); overflow: auto; padding: 22px; border: 1px solid #5a5d50; background: linear-gradient(145deg, rgba(23, 28, 28, 0.98), rgba(9, 12, 13, 0.99)); box-shadow: 0 30px 90px rgba(0, 0, 0, 0.8), inset 0 0 0 1px rgba(255, 255, 255, 0.035); animation: modal-in 160ms steps(3); }
.modal-card::before { content: ""; position: absolute; top: -1px; left: -1px; width: 150px; height: 2px; background: var(--amber); }
@keyframes modal-in { from { opacity: 0; transform: translateY(8px); } }
.modal-card h2 { margin: 5px 0 5px; font-size: 27px; color: #f5ead3; letter-spacing: 0.05em; }
.modal-lead { font-size: 11px; color: #aaa696; max-width: 680px; }
.modal-close { position: absolute; top: 8px; right: 8px; width: 26px; height: 26px; border: 1px solid #505850; background: #121718; color: var(--muted); font-size: 17px; line-height: 1; }
.modal-close:hover { color: var(--amber); border-color: var(--amber); }
.difficulty-card { width: min(1080px, 100%); }
.difficulty-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 15px; }
.difficulty-option { position: relative; text-align: left; padding: 14px; border: 1px solid #444b45; background: linear-gradient(160deg, #1a2021, #0e1213); display: flex; flex-direction: column; gap: 7px; min-height: 285px; transition: border-color 120ms ease, transform 120ms ease; }
.difficulty-option:hover { transform: translateY(-2px); border-color: var(--difficulty-color, var(--amber)); }
.difficulty-option .diff-index { color: var(--dim); font-size: 8px; letter-spacing: 0.16em; }
.difficulty-option h3 { font-size: 25px; color: var(--difficulty-color); letter-spacing: 0.06em; }
.difficulty-option .diff-code { font-size: 8px; color: var(--dim); letter-spacing: 0.16em; margin-top: -4px; }
.difficulty-option > p { font-size: 10px; color: #b0ac9b; line-height: 1.65; flex: 1; }
.difficulty-option ul { list-style: none; display: flex; flex-direction: column; gap: 4px; padding-top: 7px; border-top: 1px solid #353c38; }
.difficulty-option li { font-size: 9px; color: #979486; padding-left: 10px; position: relative; }
.difficulty-option li::before { content: ">"; position: absolute; left: 0; color: var(--difficulty-color); }
.difficulty-option .diff-tagline { color: var(--difficulty-color); font-size: 9px; }
.difficulty-option .diff-go { margin-top: 3px; min-height: 30px; border: 1px solid var(--difficulty-color); background: transparent; color: var(--difficulty-color); font-size: 10px; font-weight: 700; letter-spacing: 0.1em; }
.difficulty-option .diff-go:hover { background: var(--difficulty-color); color: #13110b; }
.difficulty-note { margin-top: 12px; font-size: 9px; color: var(--dim); border-left: 2px solid var(--amber); padding-left: 8px; }
.manual-card { width: min(1080px, 100%); }
.manual-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; margin-top: 14px; }
.manual-grid section { padding-top: 7px; border-top: 1px solid #363d38; }
.manual-grid h3 { color: var(--sand); font-size: 12px; margin-bottom: 4px; }
.manual-grid p { font-size: 10px; line-height: 1.7; color: #a9a697; margin-bottom: 4px; }
.manual-grid p b { color: var(--amber-2); }
.pause-card, .end-card { width: min(520px, 100%); }
.pause-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; margin: 13px 0 16px; font-size: 10px; }
.pause-summary div { display: flex; justify-content: space-between; padding: 4px 7px; border: 1px solid #363d38; background: #111617; }
.pause-summary span { color: var(--dim); }
.pause-summary b { color: var(--sand); }
.modal-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 15px; }
.end-card { text-align: center; }
.end-card h2 { font-size: 36px; }
.end-card .eyebrow { display: block; }
.end-verdict { margin: 6px auto 12px; max-width: 440px; font-size: 11px; color: #b6b1a0; }
.end-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 5px; text-align: left; }
.end-stats div { display: flex; justify-content: space-between; border: 1px solid #373e39; padding: 5px 8px; background: #111617; font-size: 10px; }
.end-stats span { color: var(--dim); }
.end-stats b { color: var(--sand); }
.end-card .modal-actions { justify-content: center; }
.toast { position: fixed; z-index: 150; left: 50%; bottom: 24px; transform: translateX(-50%); padding: 7px 15px; border: 1px solid #665f49; background: rgba(10, 13, 14, 0.95); color: var(--sand); font-size: 10px; box-shadow: var(--shadow); white-space: nowrap; animation: toast-in 140ms steps(2); }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 6px); } }

/* ---- 响应式 ---- */
@media (max-width: 1180px) {
  .menu-main { grid-template-columns: 1fr; }
  .armory-body { grid-template-columns: 1fr 300px; }
  .armory-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); min-height: 0; }
  .dossier { grid-template-columns: 42% minmax(0, 1fr); }
  .command-bar { grid-template-columns: minmax(0, 1fr) 260px; }
  .shop-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .shop-card { min-height: 78px; }
  .game-header { grid-template-columns: minmax(140px, 1fr) minmax(240px, 0.8fr) minmax(140px, 1fr) auto; gap: 8px; }
}
@media (max-width: 900px) {
  .menu-header { align-items: flex-start; }
  .header-actions { flex-wrap: wrap; justify-content: flex-end; }
  .status-strip { display: none; }
  .brand-copy h1 span { display: block; margin-left: 0; font-size: 0.34em; }
  .armory-body { grid-template-columns: 1fr; }
  .dossier { min-height: 160px; }
  .armory-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .unit-card { grid-template-columns: 52px minmax(0, 1fr); }
  .unit-card img { width: 52px; height: 58px; }
  .game-screen { min-height: 640px; }
  .game-header { grid-template-columns: 1fr 1fr auto; }
  .match-center { grid-column: 1 / -1; grid-row: 1; }
  .hq-card.blue { grid-column: 1; grid-row: 2; }
  .hq-card.red { grid-column: 2; grid-row: 2; }
  .game-actions { grid-column: 3; grid-row: 2; }
  .frontline-strip { flex-wrap: wrap; }
  .income-box { display: none; }
  .command-bar { grid-template-columns: 1fr; }
  .tactics-panel { border-left: 0; border-top: 1px solid #333b37; padding: 5px 0 0; display: grid; grid-template-columns: 1.2fr 1fr; gap: 4px 8px; }
  .tactics-row { grid-column: 1; }
  .focus-btn { grid-column: 1; }
  .tactics-info { grid-column: 2; grid-row: 1 / 3; flex-direction: column; justify-content: center; }
  .log-box { display: none; }
  .shop-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .shop-card { min-height: 66px; }
  .shop-card img { height: 52px; }
  .canvas-hint { display: none; }
}
@media (max-width: 640px) {
  .menu-screen { padding: 10px 9px; }
  .menu-header { gap: 8px; padding: 4px 0 9px; }
  .brand-mark { width: 35px; height: 35px; padding: 5px; }
  .brand-mark i { width: 5px; }
  .brand-copy h1 { font-size: 22px; }
  .brand-copy p { font-size: 7px; letter-spacing: 0.12em; }
  .header-actions { gap: 5px; }
  .btn-start { min-height: 44px; font-size: 14px; padding: 2px 13px; }
  .btn-kicker { display: none; }
  .btn-ghost { min-height: 44px; padding: 4px 8px; font-size: 9px; }
  .menu-main { padding: 9px 0; gap: 9px; }
  .mission-panel, .settings-panel, .armory-panel { padding: 12px; }
  .map-schematic { grid-template-columns: 58px 38px minmax(90px, 1fr) 38px 58px; min-height: 72px; }
  .map-side { font-size: 7px; padding: 5px 2px; }
  .map-node { width: 32px; height: 32px; }
  .map-node small { display: none; }
  .brief-grid { grid-template-columns: 1fr 1fr; }
  .setting-row { grid-template-columns: 1fr; gap: 4px; }
  .armory-tabs button { padding: 4px 7px; font-size: 9px; }
  .armory-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .unit-card { grid-template-columns: 40px minmax(0, 1fr); min-height: 54px; }
  .unit-card img { width: 40px; height: 48px; }
  .dossier { grid-template-columns: 38% minmax(0, 1fr); min-height: 150px; }
  .menu-footer { flex-direction: column; gap: 2px; }
  .difficulty-list { grid-template-columns: 1fr; }
  .difficulty-option { min-height: 0; }
  .manual-grid { grid-template-columns: 1fr; }
  .modal { padding: 8px; }
  .modal-card { padding: 15px; max-height: calc(100vh - 16px); }
  .game-header { padding: 5px 7px; }
  .match-timer { font-size: 21px; }
  .frontline-strip { padding: 3px 6px; gap: 3px; }
  .point-chip { padding: 2px 4px; gap: 3px; }
  .point-chip > span { display: none; }
  .point-chip .mini-bar { grid-column: 2 / 4; }
  .point-chip.center > em { font-size: 7px; }
  .command-bar { padding: 5px 6px; }
  .shop-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3px; }
  .shop-card { grid-template-columns: 1fr; min-height: 80px; }
  .shop-card img { display: none; }
  .shop-card .sc-name { font-size: 9px; }
  .canvas-top-left { font-size: 7px; gap: 6px; }
    .dossier-copy > p { min-height: 0; }
}
@media (max-height: 760px) and (min-width: 900px) {
  .menu-header { min-height: 60px; padding: 6px 0 9px; }
  .brand-mark { width: 36px; height: 36px; }
  .brand-copy h1 { font-size: 30px; }
  .menu-main { padding: 9px 0; }
  .mission-panel, .settings-panel { padding: 12px 15px; }
  .settings-note { display: none; }
  .setting-row { padding: 5px 0; }
  .armory-panel { padding: 9px 14px; }
  .armory-grid { min-height: 138px; }
  .unit-card { min-height: 62px; }
  .dossier { min-height: 138px; }
  .dossier-image-wrap { min-height: 138px; }
  .menu-footer { padding-top: 5px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}.menu-screen { display: flex; flex-direction: column; }
.menu-main { flex: 0 0 auto; }
.armory-panel { flex: 0 0 auto; }
.menu-footer { margin-top: auto; }
.canvas-wrap { background: linear-gradient(180deg, #192630 0%, #232b2c 34%, #0a0d0c 100%); }
#battleCanvas { position: relative; z-index: 1; }
.canvas-top-left, .canvas-hint { z-index: 2; }
.game-banner { z-index: 3; }/* ---- 可读性增强：画面较宽时放大作战单位 ---- *//* 单位模型完整展示，不裁切炮管与机翼 */
.unit-card img { object-fit: contain; padding: 2px; background: #101415; }
.dossier-image-wrap img { object-fit: contain; padding: 5px; }
.shop-card img { object-fit: contain; padding: 2px; background: #0f1414; }
.armory-grid { grid-auto-rows: 1fr; align-content: stretch; }/* 保持上中下三段在 flex 布局中占满可用宽度 */
.menu-header, .menu-main, .armory-panel, .menu-footer { width: 100%; }/* 紧凑高度：常见 1366×768 屏幕尽量在一屏内完成三段布局 */
@media (max-height: 840px) and (min-width: 900px) {
  .menu-screen { padding-top: 10px; }
  .menu-header { min-height: 54px; padding: 4px 0 8px; }
  .brand-mark { width: 36px; height: 36px; }
  .brand-copy h1 { font-size: 30px; }
  .brand-copy p { font-size: 8px; }
  .btn-start { min-height: 44px; font-size: 16px; }
  .menu-main { padding: 8px 0; gap: 10px; }
  .mission-panel, .settings-panel { padding: 10px 14px 9px; }
  .mission-panel h2 { font-size: 22px; margin-bottom: 5px; }
  .mission-lead { font-size: 10.5px; line-height: 1.55; }
  .map-schematic { min-height: 68px; margin: 8px 0 6px; padding: 5px 7px 8px; }
  .map-center { height: 48px; }
  .brief-grid b { font-size: 11px; }
  .settings-note { display: none; }
  .setting-row { padding: 5px 0; }
  .settings-footer { padding-top: 6px; }
  .armory-panel { padding: 8px 14px 9px; }
  .armory-head { margin-bottom: 6px; }
  .armory-head h2 { font-size: 16px; }
  .armory-body { grid-template-columns: minmax(0, 1fr) 338px; }
  .armory-grid { min-height: 164px; gap: 5px; }
  .unit-card { min-height: 58px; grid-template-columns: 64px minmax(0, 1fr); }
  .unit-card img { width: 64px; height: 58px; }
  .dossier { min-height: 164px; }
  .dossier-image-wrap { min-height: 164px; }
  .dossier-copy { padding: 8px 9px 6px; }
  .dossier-copy > p { min-height: 30px; margin: 3px 0 5px; }
  .dossier-role { padding-top: 4px; }
  .menu-footer { padding-top: 5px; }
}/* 低高度桌面：压缩指挥栏，保证商店卡片完整落在视口内 */
@media (max-height: 840px) and (min-width: 900px) {
  .game-header { padding: 5px 12px 4px; }
  .frontline-strip { min-height: 32px; padding: 3px 12px; }
  .command-bar { padding: 4px 10px 6px; }
  .shop-head { min-height: 24px; }
  .shop-grid { margin-top: 3px; min-height: 74px; }
  .shop-card { min-height: 74px; }
  .shop-card img { height: 56px; }
  .shop-card .sc-role { display: none; }
  .tactics-panel { gap: 3px; }
  .focus-btn { min-height: 24px; }
  .log-box { max-height: 34px; }
}/* ---- 顶部折叠战场选择 ---- */
.map-picker { position: relative; }
.btn-map {
  min-height: 38px; padding: 4px 10px; gap: 7px; border-color: #4e574f;
  background: rgba(9, 13, 14, 0.86); text-transform: none;
}
.btn-map:hover { border-color: var(--amber); }
.map-picker-label { color: var(--dim); font-size: 8px; letter-spacing: 0.12em; }
.btn-map b { color: var(--amber-2); font-size: 10px; letter-spacing: 0.04em; }
.map-chevron { color: var(--dim); font-size: 9px; margin-left: 2px; transition: transform 120ms ease; }
.map-picker.open .map-chevron { transform: rotate(180deg); }
.map-picker-menu {
  position: absolute; z-index: 90; top: calc(100% + 8px); right: 0;
  width: min(460px, calc(100vw - 24px)); padding: 10px;
  border: 1px solid #62685b; border-top: 2px solid var(--amber);
  background: linear-gradient(150deg, rgba(22, 27, 27, 0.99), rgba(8, 11, 12, 0.99));
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.82);
}
.map-picker-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 2px 2px 8px; }
.map-picker-head small { color: var(--dim); font-size: 8px; }
.map-option {
  display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 9px; width: 100%;
  padding: 7px; border: 1px solid #3c443f; background: #111617; text-align: left;
  transition: border-color 120ms ease, background 120ms ease;
}
.map-option + .map-option { margin-top: 6px; }
.map-option:hover { border-color: #8c7b59; background: #192020; }
.map-option.active { border-color: var(--amber); background: rgba(243, 163, 59, 0.08); box-shadow: inset 3px 0 0 var(--amber); }
.map-thumb { position: relative; width: 72px; height: 58px; overflow: hidden; border: 1px solid #3d443f; background: #151a1b; }
.map-thumb.valley { background: linear-gradient(#31434e 0 52%, #5a4c39 52% 100%); }
.map-thumb.valley::before { content: ""; position: absolute; left: 20px; bottom: 18px; width: 30px; height: 20px; background: #747665; clip-path: polygon(18% 0, 82% 0, 100% 100%, 0 100%); }
.map-thumb.valley::after { content: ""; position: absolute; left: 4px; right: 4px; bottom: 8px; height: 2px; background: repeating-linear-gradient(90deg, #b3a174 0 3px, transparent 3px 7px); opacity: .7; }
.map-thumb.trench { background: repeating-linear-gradient(0deg, #3e3528 0 8px, #4a3e2d 8px 12px); }
.map-thumb.trench::before { content: ""; position: absolute; inset: 8px 6px; border-top: 3px double #a99368; border-bottom: 3px double #a99368; transform: skewY(-6deg); opacity: .8; }
.map-thumb.trench::after { content: ""; position: absolute; left: 16px; top: 15px; width: 36px; height: 26px; border: 3px double #c2a875; transform: skewX(-18deg); opacity: .7; }
.map-option-copy { min-width: 0; display: flex; flex-direction: column; gap: 2px; justify-content: center; }
.map-option-title { display: flex; align-items: center; gap: 7px; }
.map-option-title b { font-size: 12px; color: #f0e4cb; }
.map-option-title span { color: var(--dim); font-size: 7px; letter-spacing: .12em; }
.map-option-copy > span { color: var(--dim); font-size: 8px; line-height: 1.4; }
.map-option-copy > small { color: #b7a985; font-size: 8px; line-height: 1.4; }
.map-new { border: 1px solid #966f30; color: var(--amber); padding: 0 3px; font-size: 6px; letter-spacing: .08em; }
.map-selected-mark { margin-left: auto; color: var(--amber); font-size: 9px; }
.settings-footer-actions { display: flex; gap: 5px; }
.sound-status { color: var(--dim); }
.sound-status.ready { color: var(--green); }
.sound-status.muted { color: var(--red); }
@media (max-width: 1180px) {
  .map-picker-menu { right: -120px; }
}
@media (max-width: 900px) {
  .map-picker-menu { right: 0; }
  .btn-map { min-height: 32px; padding: 3px 8px; }
}
@media (max-width: 640px) {
  .map-picker { order: 4; width: 100%; }
  .btn-map { width: 100%; justify-content: center; min-height: 32px; }
  .map-picker-menu { right: 0; width: 100%; }
  .settings-footer { flex-wrap: wrap; }
  .settings-footer-actions { width: 100%; justify-content: flex-end; }
}/* ---- 折叠菜单层级与堑壕战示意 ---- */
.menu-header { z-index: 20; }
.map-picker-menu { z-index: 95; }
.map-schematic[data-map="trench"] {
  background:
    repeating-linear-gradient(135deg, rgba(167, 144, 100, 0.06) 0 2px, transparent 2px 12px),
    linear-gradient(180deg, #191b16, #10120f);
}
.map-schematic[data-map="trench"] .cooling-a,
.map-schematic[data-map="trench"] .cooling-b { display: none; }
.map-schematic[data-map="trench"] .reactor {
  width: 52px; height: 26px; border: 1px solid #857653;
  background: linear-gradient(180deg, #5a5749, #35362d);
  clip-path: polygon(10% 0, 90% 0, 100% 30%, 100% 100%, 0 100%, 0 30%);
}
.map-schematic[data-map="trench"] .reactor::before {
  inset: 7px 10px 9px; background: #141812; border-color: #6c694f;
}
.map-schematic[data-map="trench"] .wire-line {
  height: 9px; background: repeating-linear-gradient(90deg, transparent 0 8px, #9f895d 8px 10px);
  transform: skewY(-5deg); opacity: .32;
}
.map-schematic[data-map="trench"] .map-node b { color: #d6bd83; }
.map-schematic[data-map="trench"] .map-center span { color: #d8c28e; }/* ---- P2P 联机 ---- */
.btn-net { border-color: #4d6b69; color: #a9ded5; }
.btn-net:hover { border-color: #72d5c4; color: #c7fff3; }
.network-card { width: min(780px, 100%); }
.network-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 14px 0 10px; }
.network-tabs button { min-height: 38px; border: 1px solid #4c5550; background: #111718; color: var(--muted); font-size: 11px; }
.network-tabs button:hover { border-color: var(--amber); color: var(--amber-2); }
.network-tabs button.active { border-color: var(--amber); background: rgba(243, 163, 59, 0.12); color: var(--amber-2); }
.network-panel { border-top: 1px solid #353d38; padding-top: 10px; }
.network-step { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.network-step label { color: var(--sand); font-size: 9px; letter-spacing: .04em; }
.network-code {
  width: 100%; min-height: 64px; resize: vertical; padding: 7px;
  border: 1px solid #3f4842; background: #0b1011; color: #b9d8ce;
  font-family: var(--font); font-size: 8px; line-height: 1.45; word-break: break-all;
}
.network-step .btn { align-self: flex-start; }
.network-status {
  margin-top: 9px; padding: 6px 8px; border-left: 2px solid #5f6a60;
  background: rgba(7, 10, 11, .5); color: var(--muted); font-size: 9px;
}
.network-status.ok { border-color: var(--green); color: var(--green); }
.network-status.err { border-color: var(--red); color: var(--red); }
.network-lobby {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
  margin-top: 10px; padding: 8px; border: 1px solid #3d594e; background: rgba(79, 160, 120, .08);
  color: #b9e5c6; font-size: 9px;
}
.network-lobby b { font-size: 10px; }
.network-lobby small { color: var(--dim); }
.network-lobby .btn { margin-left: auto; }
.network-help { margin-top: 10px; font-size: 8px; color: var(--dim); line-height: 1.5; }
@media (max-width: 640px) {
  .network-tabs { grid-template-columns: 1fr; }
  .network-code { min-height: 52px; }
}/* ---- 自动公告 ---- */
.announcement-card { width: min(660px, 100%); }
.announcement-list { margin: 13px 0 14px; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.announcement-list li { position: relative; padding: 6px 8px 6px 18px; border-left: 2px solid #5b604f; background: rgba(12, 16, 17, .6); color: #b7b2a0; font-size: 10px; line-height: 1.6; }
.announcement-list li::before { content: ">"; position: absolute; left: 5px; color: var(--amber); }
.announcement-list b { color: var(--sand); }
.announcement-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid #3b423a; padding-top: 10px; }
.announcement-foot span { color: var(--dim); font-size: 8px; letter-spacing: .08em; }/* ---- 部署点数倍率 ---- */
.supply-select { width: auto; min-width: 102px; min-height: 32px; padding: 4px 8px; border: 1px solid #505752; border-radius: 0; background: #121718; color: var(--sand); font-size: 9px; letter-spacing: .04em; }
.supply-select.boosted { border-color: var(--amber); color: var(--amber); background: rgba(243, 163, 59, .08); }
.supply-badge { border: 1px solid #5d6358; padding: 1px 5px; color: var(--dim); background: rgba(0, 0, 0, .3); font-size: 8px; letter-spacing: .08em; white-space: nowrap; }
.supply-badge.boosted { border-color: var(--amber); color: var(--amber); }.announcement-card { max-height: calc(100vh - 36px); overflow-y: auto; }
/* ==================== 安卓 / iOS 竖屏掌机布局 ==================== */
.mobile-view-controls { display: none; position: absolute; z-index: 4; top: 6px; right: 6px; align-items: center; gap: 3px; padding: 3px 5px; border: 1px solid #4a5148; background: rgba(8, 11, 12, 0.78); }
.mobile-view-controls span { color: var(--dim); font-size: 7px; letter-spacing: 0.08em; }
.mobile-view-controls button { width: 27px; height: 27px; padding: 0; border: 1px solid #5f604f; background: #141a1b; color: var(--sand); font-size: 11px; line-height: 1; touch-action: manipulation; }
.mobile-view-controls button:active { border-color: var(--amber); color: var(--amber-2); background: rgba(243, 163, 59, 0.15); }

@media (orientation: portrait) and (max-width: 900px) {
  .game-screen { height: 100vh; height: 100dvh; min-height: 0; grid-template-rows: auto auto minmax(0, 1fr) auto; overflow: hidden; overscroll-behavior: none; }
  .game-header { padding: calc(3px + env(safe-area-inset-top)) 6px 3px; gap: 3px 6px; }
  .match-topline { gap: 5px; }
  .match-timer { font-size: 25px; }
  .phase-label { display: none; }
  .supply-badge { padding: 1px 4px; font-size: 7px; }
  .victory-score { margin-top: 1px; gap: 8px; }
  .game-actions { gap: 3px; }
  .game-actions .icon-btn { width: 28px; height: 28px; font-size: 10px; }
  .hq-head { margin-bottom: 2px; font-size: 8px; }
  .hq-head b { font-size: 9px; }
  .frontline-strip { padding: 2px 5px; gap: 3px; min-height: 0; }
  .point-chip { min-height: 27px; padding: 1px 4px; gap: 3px; }
  .point-chip > b { width: 17px; height: 17px; font-size: 9px; }
  .point-chip > em { font-size: 7px; }
  .point-chip > span { font-size: 7px; }
  .canvas-wrap { min-height: 0; }
  #battleCanvas { object-fit: cover; object-position: 50% 50%; touch-action: manipulation; }
  .mobile-view-controls { display: flex; }
  .canvas-top-left { top: 4px; left: 4px; gap: 4px; padding: 2px 4px; font-size: 6.5px; }
  .canvas-hint { display: none; }

  .command-bar { display: flex; flex-direction: column; gap: 3px; padding: 3px 5px calc(3px + env(safe-area-inset-bottom)); }
  .shop-panel { display: block; min-width: 0; }
  .shop-head { min-height: 22px; gap: 5px; }
  .shop-title { display: none; }
  .supply-readout { margin-left: 0; gap: 3px; }
  .supply-readout span { font-size: 7px; }
  .supply-readout b { font-size: 16px; }
  .supply-readout em { font-size: 6px; }
  .shop-tabs { margin-left: auto; gap: 2px; }
  .shop-tabs button { min-height: 22px; padding: 1px 8px; font-size: 8px; }
  .shop-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3px; }
  .shop-card { min-height: 46px; padding: 3px 5px; grid-template-columns: 1fr; align-content: center; }
  .shop-card img { display: none; }
  .shop-card .sc-body { gap: 0; }
  .shop-card .sc-name { font-size: 9px; line-height: 1.3; }
  .shop-card .sc-role { display: none; }
  .shop-card .sc-cost { font-size: 9px; line-height: 1.3; }
  .shop-card .sc-key { font-size: 7px; }
  .shop-card .sc-lock { font-size: 7px; }

  .tactics-panel { display: flex; flex-direction: row; align-items: stretch; gap: 3px; padding: 0; border: 0; }
  .tactics-row { display: flex; flex: 1; gap: 3px; }
  .tactics-row .btn { flex: 1; min-height: 32px; padding: 2px 3px; font-size: 8px; }
  .focus-btn { flex: 1; min-height: 32px; padding: 2px 6px; }
  .focus-btn span { font-size: 8px; }
  .focus-btn small { font-size: 6.5px; }
  .tactics-info, .log-box { display: none; }
  .game-banner { max-width: 94%; white-space: normal; text-align: center; font-size: 9px; padding: 5px 10px; }
}
/* ==================== Android 全局小地图 ==================== */
.minimap { display: none; position: absolute; z-index: 6; left: 8px; bottom: 8px; width: min(48vw, 210px); padding: 4px; border: 1px solid #66705f; background: rgba(7, 11, 12, .9); box-shadow: 0 4px 14px rgba(0, 0, 0, .45); user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.android-app .minimap { display: block; }
.minimap-head { display: flex; justify-content: space-between; gap: 4px; padding: 0 1px 3px; color: var(--sand); font-size: 7px; letter-spacing: .06em; }
.minimap-head small { color: var(--dim); font-size: 6px; }
#minimapCanvas { display: block; width: 100%; height: auto; background: #081012; border: 1px solid #2f3b39; image-rendering: pixelated; touch-action: none; cursor: crosshair; }
/* 步兵扩编第 7 位医疗兵后的商店列布局 */
@media (min-width: 901px) {
  .shop-grid { grid-template-columns: repeat(7, minmax(0, 1fr)); }
}
@media (orientation: portrait) and (max-width: 900px) {
  .shop-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
/* ---- 5位邀请码联机 ---- */
.network-room-code { margin: 8px 0 4px; min-height: 58px; display: grid; place-items: center; border: 1px solid #7c6a44; background: #0d1213; color: var(--amber-2); font-size: 36px; font-weight: 800; letter-spacing: .22em; line-height: 1; }
.network-host-status { min-height: 18px; text-align: right; color: var(--green); font-size: 9px; letter-spacing: .08em; }
.network-room-input { width: 100%; margin: 7px 0; min-height: 52px; text-align: center; color: var(--amber-2); font-size: 26px; font-weight: 800; letter-spacing: .28em; }
.network-inline-note { margin: 4px 0 0; color: var(--dim); font-size: 9px; line-height: 1.6; }
/* 手机网页版：显示与安卓相同的小地图，电脑网页仍隐藏 */
@media (orientation: portrait) and (max-width: 900px) {
  .minimap { display: block; top: 8px; left: 8px; bottom: auto; }
  .canvas-top-left { top: 90px; }
}
/* ================= 人类大战哥斯拉 ================= */
.godzilla-entry { margin: 0 18px 8px; padding: 9px 16px; display: flex; align-items: center; gap: 14px; text-align: left; border: 1px solid #8f2f2c; background: linear-gradient(90deg, rgba(92,20,18,.92), rgba(38,15,15,.92)); color: #ff6b5f; cursor: pointer; box-shadow: 0 0 0 1px rgba(255,86,72,.12), inset 0 0 24px rgba(255,55,40,.08); }
.godzilla-entry:hover { border-color: #ff6b5f; background: linear-gradient(90deg, rgba(122,26,22,.95), rgba(50,18,18,.95)); }
.godzilla-entry-kicker { color: #ffd2c8; font-size: 10px; letter-spacing: .16em; border: 1px solid #ff6b5f; padding: 2px 7px; animation: godzilla-pulse 1.4s steps(2,end) infinite; }
.godzilla-entry strong { color: #ff4e43; font-size: 18px; letter-spacing: .06em; text-shadow: 0 0 14px rgba(255,50,40,.38); }
.godzilla-entry-sub { color: #d9a096; font-size: 9px; letter-spacing: .08em; }
.godzilla-entry-arrow { margin-left: auto; color: #ffb2a8; font-size: 10px; border-left: 1px solid rgba(255,100,80,.35); padding-left: 12px; }
@keyframes godzilla-pulse { 50% { opacity: .55; } }
.godzilla-hud { display: none; position: absolute; z-index: 7; top: 8px; left: 50%; transform: translateX(-50%); width: min(460px, 46vw); padding: 5px 8px; border: 1px solid #7d2c28; background: rgba(12,9,9,.9); color: #ffd8ca; font-size: 8px; }
.godzilla-mode .godzilla-hud { display: block; }
.godzilla-hud .gh-title { display: flex; gap: 6px; align-items: baseline; border-bottom: 1px solid rgba(255,100,80,.25); padding-bottom: 3px; margin-bottom: 4px; }
.godzilla-hud .gh-title span { color: #c88678; font-size: 7px; letter-spacing: .08em; }
.godzilla-hud .gh-title b { color: #ff5d50; font-size: 12px; letter-spacing: .1em; }
.godzilla-hud .gh-title em { margin-left: auto; color: #f3b16f; font-style: normal; font-size: 7px; }
.godzilla-hud .gh-row { display: flex; align-items: center; gap: 5px; margin-top: 3px; }
.godzilla-hud .gh-row > span { width: 22px; color: #c99a8b; }
.godzilla-hud .gh-bar { height: 5px; flex: 1; background: #2b1918; border: 1px solid #4f2c29; }
.godzilla-hud .gh-bar i { display: block; height: 100%; width: 100%; background: #d64b3e; transition: width 120ms linear; }
.godzilla-hud .gh-row.armor .gh-bar i { background: #c19a59; }
.godzilla-hud .gh-row > b { width: 48px; text-align: right; color: #ffb0a2; font-size: 7px; }
.godzilla-hud .gh-sub { margin-top: 4px; color: #d6b6a5; font-size: 7px; }
.godzilla-mode #pointChipA, .godzilla-mode #pointChipB { display: none; }
.godzilla-mode .victory-score { visibility: hidden; }
.godzilla-mode .income-box .red-text { display: none; }
.godzilla-mode .minimap { display: block; top: 8px; left: 8px; bottom: auto; }
.godzilla-mode .canvas-top-left { top: 90px; }
.godzilla-mode .frontline-strip { grid-template-columns: minmax(0,1fr) auto; }
.godzilla-mode .point-chip.center { max-width: 100%; }
@media (orientation: portrait) and (max-width: 900px) {
  .godzilla-entry { margin: 0 8px 5px; padding: 7px 9px; gap: 7px; flex-wrap: wrap; }
  .godzilla-entry strong { font-size: 15px; }
  .godzilla-entry-sub { width: 100%; font-size: 8px; }
  .godzilla-entry-arrow { margin-left: 0; border-left: 0; padding-left: 0; font-size: 8px; }
  .godzilla-hud { top: 4px; width: min(360px, 62vw); font-size: 7px; }
  .godzilla-mode .minimap { top: 8px; left: 8px; }
  .godzilla-mode .canvas-top-left { top: 90px; }
}
/* 手机竖屏：哥斯拉HUD靠右，避免与小地图重叠 */
@media (orientation: portrait) and (max-width: 900px) {
  .godzilla-hud { top: 8px; left: auto; right: 8px; transform: none; width: min(180px, 46vw); font-size: 6.5px; }
  .godzilla-hud .gh-title b { font-size: 10px; }
  .godzilla-hud .gh-title span { font-size: 6px; }
  .godzilla-hud .gh-title em { font-size: 6px; }
  .godzilla-hud .gh-row > span { width: 20px; }
  .godzilla-hud .gh-row > b { width: 42px; }
  .godzilla-hud .gh-sub { font-size: 6px; }
}
/* 移动端：哥斯拉血量与装甲并入顶部红方血条，避免遮挡左上角小地图 */
.top-armor { display: none; align-items: center; gap: 4px; margin-top: 3px; color: #d8a28c; font-size: 7px; }
.top-armor > span { color: #c99a7c; }
.top-armor .bar { flex: 1; height: 4px; margin: 0; background: #2b1917; border: 1px solid #5a332d; }
.top-armor .bar i { display: block; height: 100%; width: 100%; background: #c59a5e; }
.top-armor > b { width: 30px; text-align: right; color: #f0c992; font-size: 7px; }
@media (orientation: portrait) and (max-width: 900px) {
  .godzilla-mode .top-armor { display: flex; }
  .godzilla-mode .godzilla-hud { display: none !important; }
  .godzilla-mode .hq-card.red { padding-bottom: 3px; }
  .godzilla-mode .hq-card.red .bar.hp { height: 4px; }
  .godzilla-mode .top-armor { font-size: 6px; margin-top: 2px; }
  .godzilla-mode .top-armor > b { font-size: 6px; }
}
.godzilla-entry:disabled { opacity: .58; cursor: wait; }
.godzilla-entry:disabled .godzilla-entry-arrow { color: #9a756f; }