/* =============================================================
   中国铁路调度模拟器 · UI
   ============================================================= */
:root {
  --bg: #030a10;
  --bg-soft: #06131b;
  --bg-panel: #081821;
  --bg-panel2: #0b202b;
  --line: #15323f;
  --line-soft: rgba(120, 195, 218, 0.12);
  --line-bright: rgba(84, 216, 255, 0.24);
  --text: #e9f6fb;
  --text-soft: #b8d0da;
  --muted: #7d9aa8;
  --dim: #516d7a;
  --cyan: #54d8ff;
  --cyan2: #1ca6d2;
  --gold: #f3c969;
  --gold2: #e1a94b;
  --red: #e14b4e;
  --red-soft: #ff7474;
  --green: #6fe3a8;
  --amber: #ffb85c;
  --violet: #c39dff;
  --font: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", "Source Han Sans SC", sans-serif;
  --mono: "Bahnschrift", "DIN Alternate", "Consolas", "SFMono-Regular", monospace;
  --radius: 12px;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.42);
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 13px;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font-family: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
input, select, textarea { outline: none; }
a { color: var(--cyan); text-decoration: none; }
::selection { background: rgba(84, 216, 255, 0.25); }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(100, 155, 172, 0.25); border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: rgba(100, 155, 172, 0.4); }
.hidden { display: none !important; }
.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; vertical-align: middle; }
.icon-right { width: 16px; height: 16px; margin-left: 6px; }
.screen { display: none; position: relative; }
.screen.active { display: flex; }
.glass {
  background: linear-gradient(160deg, rgba(10, 28, 38, 0.78), rgba(4, 13, 19, 0.88));
  border: 1px solid var(--line-soft);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.live-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); animation: breathe 2s ease-in-out infinite; }
@keyframes breathe { 0%,100% { opacity: .45; transform: scale(.85); } 50% { opacity: 1; transform: scale(1.08); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes pulseRing { 0% { box-shadow: 0 0 0 0 rgba(84, 216, 255, .25); } 70% { box-shadow: 0 0 0 10px rgba(84, 216, 255, 0); } 100% { box-shadow: 0 0 0 0 rgba(84, 216, 255, 0); } }

/* ============================ 通用控件 ============================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border-radius: 8px; border: 1px solid transparent;
  font-size: 13px; font-weight: 600; letter-spacing: .03em;
  transition: all .18s ease; white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary {
  color: #1a1005;
  background: linear-gradient(120deg, #ffe7a4, var(--gold) 42%, #dba545);
  box-shadow: 0 10px 28px rgba(243, 201, 105, .18), inset 0 1px 0 rgba(255,255,255,.5);
}
.btn-primary:hover { box-shadow: 0 14px 34px rgba(243, 201, 105, .28), inset 0 1px 0 rgba(255,255,255,.6); }
.btn-ghost { color: var(--text-soft); border-color: var(--line-bright); background: rgba(9, 28, 38, .55); }
.btn-ghost:hover { border-color: rgba(84, 216, 255, .5); color: var(--cyan); }
.btn-text { color: var(--muted); padding: 10px 8px; }
.btn-text:hover { color: var(--gold); }
.btn-danger { color: #ffd8d8; background: rgba(225, 75, 78, .14); border-color: rgba(225, 75, 78, .3); }
.btn-danger:hover { background: rgba(225, 75, 78, .24); }
.btn-sm { padding: 6px 11px; font-size: 11px; border-radius: 6px; }
.btn-lg { padding: 14px 26px; font-size: 15px; border-radius: 10px; }
.btn-lg small { display: block; font-weight: 500; font-size: 10px; opacity: .68; letter-spacing: .05em; }
.btn .icon { width: 16px; height: 16px; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 8px; color: var(--muted);
  border: 1px solid transparent; transition: all .16s ease;
}
.icon-btn:hover { color: var(--text); background: rgba(84, 216, 255, .08); border-color: var(--line-soft); }
.icon-btn .icon { width: 17px; height: 17px; }
.eyebrow { color: var(--cyan); font-size: 10px; font-weight: 700; letter-spacing: .22em; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.gold { color: var(--gold); }
.warn { color: var(--amber); }
.late { color: var(--red-soft); }
.ok { color: var(--green); }
.muted { color: var(--muted); }
.dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--muted); }
.dot.cyan { background: var(--cyan); } .dot.amber { background: var(--amber); } .dot.red { background: var(--red); } .dot.green { background: var(--green); }
kbd {
  display: inline-block; padding: 1px 5px; border-radius: 4px; font-family: var(--mono); font-size: 10px;
  color: var(--text-soft); background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1);
}
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px; border-radius: 999px; font-size: 10px; letter-spacing: .04em; border: 1px solid var(--line-soft); color: var(--muted); }
.pill.gold { color: var(--gold); border-color: rgba(243, 201, 105, .28); background: rgba(243, 201, 105, .07); }
.tag-type { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; padding: 2px 7px; border-radius: 4px; font-size: 10px; font-weight: 700; letter-spacing: .03em; background: rgba(84,216,255,.12); color: var(--cyan); border: 1px solid rgba(84,216,255,.2); }
.tag-type.icr { color: var(--green); background: rgba(111,227,168,.1); border-color: rgba(111,227,168,.2); }
.tag-type.conv, .tag-type.regional { color: var(--gold); background: rgba(243,201,105,.09); border-color: rgba(243,201,105,.2); }
.tag-type.heavy { color: var(--amber); background: rgba(255,184,92,.1); border-color: rgba(255,184,92,.22); }

/* ============================ 加载页 ============================ */
.loading-screen {
  position: fixed; inset: 0; z-index: 2000; background: #030a10;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px;
  transition: opacity .5s ease, visibility .5s ease;
}
.loading-screen.done { opacity: 0; visibility: hidden; }
.loading-screen p { color: var(--muted); letter-spacing: .18em; font-size: 12px; }
.loading-mark {
  width: 56px; height: 56px; border-radius: 50%;
  border: 2px solid rgba(84,216,255,.14); border-top-color: var(--cyan);
  box-shadow: 0 0 40px rgba(84,216,255,.15);
  animation: spin 1.1s linear infinite;
}

/* ============================ 主菜单 ============================ */
.menu-screen {
  min-height: 100vh; height: 100vh; overflow-y: auto; overflow-x: hidden;
  flex-direction: column; background: #030a10;
}
#menu-canvas { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; }
.menu-scrim {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(ellipse at 58% 40%, rgba(4, 12, 18, .02), transparent 55%),
    linear-gradient(90deg, rgba(3,10,16,.95) 0%, rgba(3,10,16,.58) 38%, rgba(3,10,16,.38) 68%, rgba(3,10,16,.72) 100%),
    linear-gradient(0deg, rgba(3,10,16,.99) 0%, transparent 38%);
}
.menu-top {
  position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between;
  padding: 24px 46px 12px; flex: none;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark { width: 44px; height: 44px; color: var(--gold); display: flex; align-items: center; justify-content: center; filter: drop-shadow(0 0 12px rgba(243,201,105,.2)); }
.brand-mark svg { width: 40px; height: 40px; }
.brand-text b { display: block; font-size: 14px; letter-spacing: .08em; font-weight: 700; color: #f2f8fa; }
.brand-text span { display: block; font-size: 9px; letter-spacing: .26em; color: var(--muted); margin-top: 3px; }
.menu-nav { display: flex; gap: 4px; align-items: center; }
.menu-link {
  display: inline-flex; align-items: center; gap: 7px; padding: 9px 13px; color: var(--muted);
  border-radius: 7px; font-size: 12px; letter-spacing: .04em; transition: all .16s;
}
.menu-link .icon { width: 15px; height: 15px; }
.menu-link:hover { color: var(--text); background: rgba(255,255,255,.04); }
.menu-main {
  position: relative; z-index: 2; flex: 1; width: 100%; max-width: 1640px; margin: 0 auto;
  padding: 12px 46px 8px; display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(320px, 430px);
  gap: 40px; align-items: center; min-height: 430px;
}
.hero { padding: 10px 0 14px; }
.hero-kicker { display: inline-flex; align-items: center; gap: 8px; color: var(--cyan); font-size: 10px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; }
.hero h1 { margin: 15px 0 18px; display: flex; flex-direction: column; line-height: .98; }
.h1-cn {
  font-size: clamp(48px, 5.6vw, 86px); font-weight: 800; letter-spacing: .06em;
  color: #f3fbfe; text-shadow: 0 6px 34px rgba(0,0,0,.45);
}
.h1-cn.accent {
  background: linear-gradient(96deg, #f7dfa0 0%, #f3c969 38%, #e0a549 78%, #f1d28b 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 8px 26px rgba(243, 201, 105, .16));
}
.h1-en { font-family: var(--mono); font-size: clamp(11px, 1.2vw, 15px); letter-spacing: .46em; color: var(--muted); margin-top: 16px; font-weight: 400; }
.h1-en i { color: var(--red); font-style: normal; }
.hero-sub { color: var(--text-soft); font-size: 13px; line-height: 1.95; max-width: 620px; margin: 0 0 23px; }
.hero-stats { display: flex; gap: 0; margin: 0 0 28px; border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); width: fit-content; }
.hero-stats div { padding: 12px 24px 12px 0; margin-right: 24px; border-right: 1px solid var(--line-soft); display: flex; align-items: baseline; gap: 9px; }
.hero-stats div:last-child { border-right: 0; margin-right: 0; padding-right: 0; }
.hero-stats b { font-family: var(--mono); font-size: 22px; font-weight: 600; color: var(--text); }
.hero-stats span { color: var(--muted); font-size: 10px; letter-spacing: .06em; }
.hero-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.hero-note { display: flex; align-items: center; gap: 7px; color: var(--dim); font-size: 10px; letter-spacing: .03em; margin: 18px 0 0; }
.hero-note .icon { width: 13px; height: 13px; color: var(--gold2); }
.menu-live {
  border-radius: 16px; overflow: hidden; box-shadow: var(--shadow);
  border: 1px solid rgba(84, 216, 255, .16);
  animation: fadeUp .7s ease both .15s;
}
.live-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--line-soft); color: var(--text-soft); font-size: 11px; letter-spacing: .05em; }
.live-head > span:first-child { display: flex; align-items: center; gap: 8px; }
.live-clock { font-family: var(--mono); color: var(--gold); font-size: 13px; letter-spacing: .06em; }
.live-radar { position: relative; height: 154px; overflow: hidden; border-bottom: 1px solid var(--line-soft); background: radial-gradient(ellipse at 65% 55%, rgba(20, 91, 112, .22), transparent 65%); }
.radar-grid {
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(84,216,255,.045) 1px, transparent 1px), linear-gradient(90deg, rgba(84,216,255,.045) 1px, transparent 1px);
  background-size: 26px 26px;
  transform: perspective(260px) rotateX(42deg) scale(1.2); opacity: .9;
}
.radar-line { position: absolute; height: 1px; width: 130%; left: -15%; top: 55%; background: linear-gradient(90deg, transparent, rgba(84,216,255,.3), transparent); transform: rotate(-16deg); }
.radar-line.l2 { top: 70%; transform: rotate(-8deg); opacity: .55; background: linear-gradient(90deg, transparent, rgba(243,201,105,.28), transparent); }
.radar-point { position: absolute; width: 6px; height: 6px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 14px var(--cyan); animation: breathe 2.4s infinite; }
.radar-point::after { content: ''; position: absolute; inset: -5px; border: 1px solid rgba(84,216,255,.3); border-radius: 50%; }
.radar-point.p1 { left: 28%; top: 44%; } .radar-point.p2 { left: 63%; top: 32%; animation-delay: .7s; background: var(--gold); box-shadow: 0 0 14px var(--gold); } .radar-point.p3 { left: 76%; top: 64%; animation-delay: 1.3s; }
.radar-caption { position: absolute; left: 18px; bottom: 15px; font-family: var(--mono); font-size: 8px; letter-spacing: .2em; color: var(--dim); line-height: 1.8; }
.radar-caption b { color: var(--text-soft); letter-spacing: .1em; font-size: 11px; font-family: var(--font); }
.live-board { padding: 6px 0; min-height: 132px; }
.live-row { display: grid; grid-template-columns: 46px 1fr 40px 44px; gap: 8px; align-items: center; padding: 8px 18px; font-size: 11px; }
.live-row + .live-row { border-top: 1px solid rgba(255,255,255,.03); }
.live-row .live-no { font-family: var(--mono); font-weight: 600; color: var(--gold); }
.live-row .live-route { color: var(--text-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.live-row .live-time { font-family: var(--mono); color: var(--muted); font-size: 10px; }
.live-row .live-status { font-size: 9px; color: var(--green); }
.live-foot { display: flex; justify-content: space-between; padding: 10px 18px; border-top: 1px solid var(--line-soft); color: var(--dim); font-size: 9px; letter-spacing: .04em; }
.scenario-strip { position: relative; z-index: 2; padding: 2px 46px 10px; flex: none; max-width: 1640px; margin: 0 auto; width: 100%; }
.strip-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 12px; }
.strip-head h2 { font-size: 19px; margin: 4px 0 0; letter-spacing: .06em; font-weight: 700; }
.strip-hint { color: var(--muted); font-size: 10px; letter-spacing: .04em; }
.scenario-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(172px, 1fr)); gap: 10px; }
.scenario-card {
  position: relative; text-align: left; padding: 15px 15px 13px; border-radius: 11px;
  background: linear-gradient(160deg, rgba(12, 32, 43, .7), rgba(4, 13, 19, .85));
  border: 1px solid var(--line-soft); min-height: 144px; overflow: hidden;
  transition: all .2s ease; color: var(--text);
}
.scenario-card::before { content: ''; position: absolute; inset: 0; background: linear-gradient(135deg, rgba(84,216,255,.07), transparent 55%); opacity: 0; transition: opacity .2s; }
.scenario-card:hover { border-color: rgba(84,216,255,.35); transform: translateY(-2px); background: rgba(10, 27, 37, .92); }
.scenario-card:hover::before { opacity: 1; }
.scenario-card.selected { border-color: rgba(243, 201, 105, .62); box-shadow: 0 0 0 1px rgba(243,201,105,.14), 0 14px 30px rgba(0,0,0,.3); background: linear-gradient(160deg, rgba(32,34,28,.85), rgba(8,18,22,.95)); }
.scenario-card.selected::after { content: '已选择'; position: absolute; top: 0; right: 0; padding: 4px 9px; font-size: 9px; letter-spacing: .08em; color: #1b1305; background: var(--gold); border-radius: 0 0 0 7px; font-weight: 700; }
.sc-card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.sc-diff { color: var(--gold); font-size: 10px; letter-spacing: 1px; }
.sc-tag { color: var(--muted); font-size: 9px; border: 1px solid var(--line-soft); padding: 2px 6px; border-radius: 3px; }
.scenario-card h3 { font-size: 14px; margin: 0 0 7px; font-weight: 700; letter-spacing: .03em; }
.sc-focus { display: flex; align-items: center; gap: 6px; color: var(--cyan); font-size: 11px; margin-bottom: 12px; }
.sc-focus .icon { width: 12px; height: 12px; }
.sc-meta { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 9px; font-family: var(--mono); letter-spacing: .02em; padding-top: 10px; border-top: 1px solid rgba(255,255,255,.045); }
.sc-meta .sc-goal { color: var(--dim); }
.sc-index { position: absolute; right: 10px; bottom: 32px; font-family: var(--mono); font-size: 52px; color: rgba(255,255,255,.028); line-height: 1; font-weight: 700; pointer-events: none; }
.scenario-card.custom-card { border-style: dashed; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 7px; color: var(--muted); }
.scenario-card.custom-card:hover { color: var(--gold); }
.scenario-card.custom-card .icon { width: 24px; height: 24px; }
.scenario-card.custom-card b { font-size: 12px; color: var(--text-soft); font-weight: 600; }
.scenario-card.custom-card span { font-size: 9px; color: var(--dim); }
.scenario-card.custom-card.empty { background: rgba(4,13,19,.45); }
.menu-footer { position: relative; z-index: 2; display: flex; justify-content: space-between; padding: 11px 46px 16px; color: #3f5560; font-size: 9px; letter-spacing: .05em; border-top: 1px solid rgba(255,255,255,.03); }

/* ============================ 主界面框架 ============================ */
.game-screen { flex-direction: column; height: 100vh; min-width: 1180px; overflow: hidden; }
.topbar {
  height: 68px; flex: none; display: grid; grid-template-columns: minmax(280px, 1fr) auto minmax(450px, 1fr);
  align-items: center; gap: 18px; padding: 0 18px;
  background: linear-gradient(180deg, rgba(8, 22, 30, .98), rgba(5, 15, 21, .98));
  border-bottom: 1px solid var(--line-soft); box-shadow: 0 6px 30px rgba(0,0,0,.28); z-index: 20;
}
.topbar-left { display: flex; align-items: center; gap: 11px; min-width: 0; }
.brand-mini { width: 38px; height: 38px; color: var(--gold); border: 1px solid var(--line-soft); border-radius: 9px; }
.brand-mini svg { width: 26px; height: 26px; }
.scenario-meta { min-width: 0; }
.scenario-title { display: block; font-size: 13px; font-weight: 700; color: var(--text); letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.scenario-sub { display: block; color: var(--muted); font-size: 9px; letter-spacing: .08em; margin-top: 4px; }
.topbar-center { display: flex; align-items: center; gap: 17px; }
.clock-block { text-align: center; min-width: 132px; }
.clock-date { display: block; font-size: 9px; color: var(--muted); letter-spacing: .1em; }
.clock-time { display: block; font-family: var(--mono); font-size: 28px; line-height: 1.05; letter-spacing: .035em; color: #f5fcff; text-shadow: 0 0 24px rgba(84,216,255,.15); }
.speed-group { display: flex; align-items: center; gap: 2px; padding: 3px; border-radius: 7px; background: rgba(255,255,255,.035); border: 1px solid var(--line-soft); }
.speed-btn { min-width: 30px; height: 28px; padding: 0 7px; border-radius: 5px; color: var(--muted); font-family: var(--mono); font-size: 11px; display: inline-flex; align-items: center; justify-content: center; transition: all .15s; }
.speed-btn .icon { width: 14px; height: 14px; }
.speed-btn:hover { color: var(--text); background: rgba(255,255,255,.05); }
.speed-btn.active { color: #1a1204; background: var(--gold); font-weight: 700; }
.topbar-right { display: flex; align-items: center; justify-content: flex-end; gap: 5px; }
.metric-chip { padding: 5px 11px; border-left: 1px solid var(--line-soft); display: flex; flex-direction: column; gap: 2px; min-width: 58px; }
.metric-label { color: var(--muted); font-size: 8px; letter-spacing: .08em; }
.metric-value { font-family: var(--mono); font-size: 16px; color: #e6f7fc; line-height: 1.1; font-weight: 500; }
.metric-value.gold { color: var(--gold); }
.metric-value.warn { color: var(--amber); }
.bell-btn { position: relative; }
.bell-badge { position: absolute; top: 1px; right: 1px; min-width: 14px; height: 14px; padding: 0 3px; border-radius: 8px; background: var(--red); color: #fff; font-size: 8px; display: flex; align-items: center; justify-content: center; font-family: var(--mono); box-shadow: 0 0 0 2px #08161e; }
.game-main { flex: 1; min-height: 0; display: grid; grid-template-columns: 254px minmax(0, 1fr) 342px; background: #050f15; }
.game-left { background: #06131b; border-right: 1px solid var(--line-soft); padding: 12px; overflow-y: auto; }
.map-stage { min-width: 0; min-height: 0; display: flex; flex-direction: column; background: #040d13; }
.map-canvas-wrap { position: relative; flex: 1; min-height: 0; overflow: hidden; }
#game-map { display: block; width: 100%; height: 100%; cursor: grab; }
#game-map.grabbing { cursor: grabbing; }
.map-overlay-top { position: absolute; top: 14px; left: 14px; pointer-events: none; }
.map-context { border-radius: 9px; padding: 10px 13px; font-size: 10px; color: var(--muted); letter-spacing: .03em; display: flex; align-items: center; gap: 12px; pointer-events: auto; }
.map-context b { color: var(--text-soft); font-weight: 600; }
.map-context .ctx-sep { width: 1px; height: 12px; background: var(--line-soft); }
.map-context .ctx-weather { color: var(--cyan); }
.map-controls { position: absolute; top: 14px; right: 14px; display: flex; flex-direction: column; gap: 5px; }
.map-controls .icon-btn { width: 32px; height: 32px; background: rgba(6,19,27,.82); border: 1px solid var(--line-soft); border-radius: 6px; backdrop-filter: blur(8px); }
.map-hint-bar { position: absolute; left: 14px; bottom: 12px; display: flex; gap: 14px; color: var(--dim); font-size: 9px; letter-spacing: .03em; background: rgba(4,13,19,.62); padding: 6px 10px; border-radius: 6px; border: 1px solid rgba(120,195,218,.08); }
.map-hint-bar span { display: inline-flex; align-items: center; gap: 4px; }
.map-ticker { position: absolute; right: 14px; bottom: 12px; max-width: 50%; color: var(--muted); font-size: 10px; background: rgba(4,13,19,.72); border: 1px solid var(--line-soft); border-radius: 6px; padding: 7px 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: none; }
.map-ticker.show { display: block; animation: fadeIn .3s; }
.map-tooltip {
  position: absolute; top: 0; left: 0; z-index: 8; pointer-events: none;
  min-width: 178px; max-width: 280px; padding: 10px 12px; border-radius: 8px;
  background: rgba(5, 17, 24, .95); border: 1px solid rgba(84,216,255,.28);
  box-shadow: 0 12px 30px rgba(0,0,0,.45); opacity: 0; transform: translate(0,0);
  transition: opacity .12s ease;
}
.map-tooltip.show { opacity: 1; }
.tip-kicker { color: var(--cyan); font-size: 8px; letter-spacing: .12em; margin-bottom: 4px; text-transform: uppercase; }
.tip-title { font-size: 13px; font-weight: 700; color: var(--text); }
.tip-title .tip-route { font-size: 9px; color: var(--muted); font-weight: 400; margin-left: 4px; }
.tip-meta { margin-top: 4px; color: var(--muted); font-size: 9px; }
.tip-desc { margin-top: 4px; color: var(--dim); font-size: 9px; line-height: 1.6; }

/* ============================ 左侧栏 ============================ */
.side-section { margin-bottom: 13px; }
.side-title { display: flex; align-items: center; justify-content: space-between; font-size: 9px; letter-spacing: .16em; color: var(--dim); text-transform: uppercase; margin-bottom: 8px; padding: 0 2px; }
.side-title .icon { width: 12px; height: 12px; }
.focus-card {
  background: linear-gradient(155deg, rgba(16, 44, 57, .76), rgba(6, 19, 27, .82));
  border: 1px solid rgba(84, 216, 255, .18); border-radius: 10px; padding: 13px; position: relative; overflow: hidden;
}
.focus-card::after { content: ''; position: absolute; width: 90px; height: 90px; right: -30px; top: -30px; border-radius: 50%; background: radial-gradient(circle, rgba(84,216,255,.16), transparent 70%); }
.focus-kicker { display: flex; align-items: center; gap: 6px; color: var(--cyan); font-size: 9px; letter-spacing: .1em; }
.focus-name { font-size: 22px; font-weight: 800; letter-spacing: .03em; margin: 5px 0 3px; }
.focus-name small { font-size: 10px; color: var(--muted); font-weight: 400; letter-spacing: .06em; margin-left: 5px; }
.focus-lines { color: var(--muted); font-size: 9px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.focus-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line-soft); }
.focus-stat { display: flex; flex-direction: column; gap: 2px; }
.focus-stat b { font-family: var(--mono); font-size: 15px; font-weight: 500; color: var(--text); }
.focus-stat span { font-size: 8px; color: var(--muted); }
.focus-actions { display: flex; gap: 6px; margin-top: 11px; }
.focus-actions .btn { flex: 1; padding: 7px 8px; font-size: 10px; }
.auto-strip { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; margin-top: 7px; border: 1px solid var(--line-soft); border-radius: 7px; background: rgba(255,255,255,.02); }
.auto-strip span { font-size: 10px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.auto-strip .icon { width: 13px; height: 13px; }
.switch { position: relative; width: 30px; height: 17px; border-radius: 20px; background: rgba(255,255,255,.12); transition: background .18s; flex: none; }
.switch::after { content: ''; position: absolute; top: 2px; left: 2px; width: 13px; height: 13px; border-radius: 50%; background: #a6bdc7; transition: transform .18s, background .18s; }
.switch.on { background: rgba(243, 201, 105, .32); }
.switch.on::after { transform: translateX(13px); background: var(--gold); }
.objective-card { border: 1px solid var(--line-soft); border-radius: 9px; padding: 10px 11px; background: rgba(255,255,255,.018); }
.obj-row { display: flex; align-items: center; justify-content: space-between; font-size: 10px; color: var(--muted); padding: 3px 0; }
.obj-row b { color: var(--text-soft); font-family: var(--mono); font-weight: 500; }
.obj-row b.good { color: var(--green); }
.obj-bar { height: 4px; background: rgba(255,255,255,.06); border-radius: 4px; margin: 7px 0 3px; overflow: hidden; }
.obj-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--cyan2), var(--cyan)); border-radius: 4px; transition: width .4s ease; }
.obj-bar i.gold { background: linear-gradient(90deg, var(--gold2), var(--gold)); }
.obj-foot { color: var(--dim); font-size: 8px; margin-top: 4px; }
.filter-list { display: flex; flex-direction: column; gap: 2px; }
.filter-row { display: flex; align-items: center; gap: 8px; padding: 6px 7px; border-radius: 5px; font-size: 10px; color: var(--muted); cursor: pointer; transition: background .15s; }
.filter-row:hover { background: rgba(255,255,255,.03); color: var(--text-soft); }
.filter-row .swatch { width: 15px; height: 3px; border-radius: 3px; background: var(--muted); opacity: .9; }
.filter-row .filter-count { margin-left: auto; color: var(--dim); font-family: var(--mono); font-size: 9px; }
.filter-row input { display: none; }
.filter-row .filter-check { width: 12px; height: 12px; border: 1px solid var(--line); border-radius: 3px; margin-left: 2px; display: flex; align-items: center; justify-content: center; }
.filter-row.on .filter-check { background: rgba(84,216,255,.16); border-color: var(--cyan); }
.filter-row.on .filter-check::after { content: ''; width: 5px; height: 5px; border-radius: 1px; background: var(--cyan); }
.filter-row.off { opacity: .45; }
.side-net { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.side-net div { padding: 8px 9px; border-radius: 7px; background: rgba(255,255,255,.02); border: 1px solid rgba(255,255,255,.035); }
.side-net b { display: block; font-family: var(--mono); font-size: 14px; color: var(--text-soft); font-weight: 500; }
.side-net span { display: block; color: var(--dim); font-size: 8px; margin-top: 2px; letter-spacing: .04em; }
.side-link { width: 100%; display: flex; align-items: center; justify-content: space-between; padding: 8px 9px; border-radius: 6px; color: var(--muted); font-size: 10px; border: 1px solid transparent; }
.side-link:hover { color: var(--cyan); background: rgba(84,216,255,.04); border-color: var(--line-soft); }
.side-link .icon { width: 13px; height: 13px; }

/* ============================ 右侧信息板 ============================ */
.inspector { background: #06131b; border-left: 1px solid var(--line-soft); overflow-y: auto; min-height: 0; }
.inspector-inner { padding: 14px; }
.insp-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.insp-kicker { color: var(--cyan); font-size: 8px; letter-spacing: .18em; text-transform: uppercase; margin-bottom: 5px; }
.insp-title { font-size: 17px; font-weight: 700; letter-spacing: .02em; line-height: 1.25; }
.insp-title small { font-size: 10px; color: var(--muted); font-weight: 400; margin-left: 4px; }
.insp-sub { color: var(--muted); font-size: 9px; margin-top: 4px; line-height: 1.7; }
.insp-section { margin-bottom: 13px; }
.insp-label { display: flex; align-items: center; justify-content: space-between; font-size: 9px; letter-spacing: .12em; color: var(--dim); margin: 0 0 7px; text-transform: uppercase; }
.insp-label b { color: var(--muted); font-family: var(--mono); font-weight: 500; letter-spacing: 0; }
.request-item {
  background: linear-gradient(150deg, rgba(29, 33, 28, .55), rgba(8, 20, 26, .8));
  border: 1px solid rgba(243, 201, 105, .22); border-radius: 9px; padding: 10px;
  margin-bottom: 8px; position: relative; overflow: hidden;
}
.request-item::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: var(--gold); box-shadow: 0 0 12px rgba(243,201,105,.5); }
.request-item.high { border-color: rgba(225, 75, 78, .32); }
.request-item.high::before { background: var(--red-soft); box-shadow: 0 0 12px rgba(225,75,78,.5); }
.req-top { display: flex; align-items: center; gap: 7px; }
.req-no { font-family: var(--mono); font-size: 17px; font-weight: 600; color: var(--gold); letter-spacing: .02em; }
.req-top .tag-type { margin-left: 1px; }
.req-priority { margin-left: auto; color: var(--red-soft); font-size: 8px; letter-spacing: .08em; display: inline-flex; align-items: center; gap: 3px; }
.req-priority .icon { width: 10px; height: 10px; }
.req-route { color: var(--text-soft); font-size: 10px; margin: 5px 0 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.req-meta { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 9px; font-family: var(--mono); margin-bottom: 8px; }
.req-meta .req-eta { color: var(--amber); }
.req-platforms { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 4px; }
.pf-btn {
  padding: 5px 3px; border-radius: 4px; border: 1px solid var(--line-soft); background: rgba(255,255,255,.025);
  color: var(--muted); font-size: 9px; font-family: var(--mono); text-align: center; transition: all .12s; line-height: 1.3;
}
.pf-btn small { display: block; font-size: 7px; color: var(--dim); }
.pf-btn.free { color: var(--text-soft); border-color: rgba(111, 227, 168, .22); background: rgba(111,227,168,.055); }
.pf-btn.free:hover { background: rgba(111,227,168,.16); border-color: var(--green); color: var(--green); transform: translateY(-1px); }
.pf-btn.busy, .pf-btn.reserved { color: var(--dim); border-color: rgba(255,255,255,.05); background: rgba(255,255,255,.012); cursor: not-allowed; }
.pf-btn.closed { color: rgba(255, 116, 116, .55); border-color: rgba(225,75,78,.2); background: repeating-linear-gradient(135deg, rgba(225,75,78,.06), rgba(225,75,78,.06) 3px, transparent 3px, transparent 6px); cursor: not-allowed; }
.pf-btn.selected { border-color: var(--gold); color: var(--gold); box-shadow: 0 0 0 1px rgba(243,201,105,.25); }
.empty-hint { padding: 14px 12px; border: 1px dashed var(--line-soft); border-radius: 8px; color: var(--dim); font-size: 10px; line-height: 1.8; text-align: center; }
.insp-footer { display: flex; gap: 6px; margin-top: 10px; }
.insp-footer .btn { flex: 1; font-size: 10px; padding: 8px; }
.station-big { font-size: 23px; font-weight: 800; letter-spacing: .03em; line-height: 1.15; }
.station-city { color: var(--muted); font-size: 9px; letter-spacing: .05em; margin-top: 4px; }
.station-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 9px; }
.line-pill { display: inline-flex; padding: 3px 6px; border-radius: 3px; border: 1px solid var(--line-soft); color: var(--muted); font-size: 8px; background: rgba(255,255,255,.02); }
.famous-note { color: var(--text-soft); font-size: 10px; line-height: 1.85; background: rgba(255,255,255,.02); border-left: 2px solid var(--gold); padding: 8px 10px; border-radius: 0 6px 6px 0; }
.famous-facts { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.famous-facts span { padding: 3px 6px; border-radius: 3px; background: rgba(84,216,255,.05); color: var(--muted); font-size: 8px; }
.train-hero { display: flex; align-items: center; gap: 12px; }
.train-no-big { font-family: var(--mono); font-size: 30px; font-weight: 600; color: var(--gold); line-height: 1; }
.train-route-big { color: var(--text-soft); font-size: 11px; margin-top: 5px; }
.train-stock-art { margin: 12px 0; border-radius: 8px; overflow: hidden; border: 1px solid var(--line-soft); background: #07141c; }
.route-timeline { display: flex; flex-direction: column; position: relative; padding-left: 14px; margin-top: 4px; }
.route-timeline::before { content: ''; position: absolute; left: 4px; top: 8px; bottom: 8px; width: 1px; background: var(--line); }
.rt-stop { position: relative; padding: 5px 0 5px 8px; font-size: 10px; color: var(--muted); }
.rt-stop::before { content: ''; position: absolute; left: -13px; top: 9px; width: 5px; height: 5px; border-radius: 50%; background: var(--line); border: 1px solid #0a1a23; }
.rt-stop.passed { color: var(--dim); }
.rt-stop.passed::before { background: var(--dim); }
.rt-stop.focus { color: var(--gold); font-weight: 600; }
.rt-stop.focus::before { background: var(--gold); box-shadow: 0 0 8px rgba(243,201,105,.5); width: 7px; height: 7px; left: -14px; top: 8px; }
.rt-stop.upcoming { color: var(--text-soft); }
.rt-stop .rt-time { float: right; font-family: var(--mono); font-size: 9px; color: var(--dim); }
.rt-stop.focus .rt-time { color: var(--gold); }
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.info-cell { padding: 8px 9px; border-radius: 6px; background: rgba(255,255,255,.022); border: 1px solid rgba(255,255,255,.035); }
.info-cell span { display: block; color: var(--dim); font-size: 8px; letter-spacing: .05em; }
.info-cell b { display: block; font-family: var(--mono); font-size: 13px; font-weight: 500; color: var(--text-soft); margin-top: 2px; }
.back-link { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 9px; padding: 3px 0; margin-bottom: 8px; }
.back-link:hover { color: var(--cyan); }
.back-link .icon { width: 12px; height: 12px; }
.request-actions { display: flex; gap: 5px; margin-top: 6px; }
.request-actions .btn { flex: 1; padding: 6px 4px; font-size: 9px; }
.mini-platforms { display: flex; gap: 4px; width: 100%; }
.mini-platforms .pf-btn { flex: 1; }

/* ============================ 底部运行图 ============================ */
.board-panel { flex: none; height: 238px; display: flex; flex-direction: column; background: #06131b; border-top: 1px solid var(--line-soft); transition: height .22s ease; }
.board-panel.collapsed { height: 43px; }
.board-head { height: 43px; flex: none; display: flex; align-items: center; justify-content: space-between; padding: 0 13px; border-bottom: 1px solid rgba(255,255,255,.035); }
.board-tabs { display: flex; align-items: center; gap: 2px; }
.board-tab { padding: 8px 12px; color: var(--muted); font-size: 10px; border-radius: 5px; letter-spacing: .04em; position: relative; }
.board-tab:hover { color: var(--text-soft); }
.board-tab.active { color: var(--gold); }
.board-tab.active::after { content: ''; position: absolute; left: 12px; right: 12px; bottom: -6px; height: 2px; background: var(--gold); border-radius: 2px; }
.board-tools { display: flex; align-items: center; gap: 6px; }
.search-box { display: flex; align-items: center; gap: 5px; width: 170px; height: 26px; padding: 0 8px; border-radius: 5px; background: rgba(255,255,255,.035); border: 1px solid rgba(255,255,255,.05); }
.search-box .icon { width: 12px; height: 12px; color: var(--dim); }
.search-box input { width: 100%; border: 0; background: none; color: var(--text-soft); font-size: 10px; }
.search-box input::placeholder { color: var(--dim); }
.board-tools .icon-btn { width: 26px; height: 26px; }
.board-tools .chevron { transition: transform .2s; }
.board-panel.collapsed .chevron { transform: rotate(180deg); }
.board-body { flex: 1; min-height: 0; overflow: auto; padding: 0 8px 8px; }
.board-panel.collapsed .board-body { display: none; }
.board-table { width: 100%; border-collapse: collapse; font-size: 10px; }
.board-table th { position: sticky; top: 0; z-index: 1; text-align: left; padding: 7px 8px 6px; color: var(--dim); font-weight: 500; font-size: 8px; letter-spacing: .1em; background: #06131b; border-bottom: 1px solid rgba(255,255,255,.04); white-space: nowrap; }
.board-table td { padding: 7px 8px; border-bottom: 1px solid rgba(255,255,255,.025); color: var(--text-soft); vertical-align: middle; white-space: nowrap; }
.board-table tr:hover td { background: rgba(84,216,255,.032); cursor: pointer; }
.board-table tr.urgent td { background: rgba(243,201,105,.045); }
.board-table tr.urgent:hover td { background: rgba(243,201,105,.08); }
.board-table tr.late-row td { background: rgba(225,75,78,.04); }
.board-table tr.done-row td { opacity: .5; }
.board-table .t-no { font-family: var(--mono); font-size: 12px; font-weight: 600; color: var(--text); }
.board-table .t-delay { font-size: 9px; color: var(--amber); }
.board-table .t-delay.bad { color: var(--red-soft); }
.board-table .t-route { color: var(--muted); font-size: 9px; }
.board-table .t-time { font-family: var(--mono); color: var(--muted); font-size: 10px; }
.board-table .t-time.now { color: var(--gold); }
.board-table .t-platform { font-family: var(--mono); color: var(--cyan); font-size: 10px; }
.board-table .t-action { text-align: right; }
.tiny-btn { padding: 3px 8px; border-radius: 4px; border: 1px solid rgba(243,201,105,.25); color: var(--gold); background: rgba(243,201,105,.06); font-size: 9px; transition: all .12s; }
.tiny-btn:hover { background: rgba(243,201,105,.16); }
.tiny-btn.ghost { color: var(--muted); border-color: var(--line-soft); background: transparent; }
.tiny-btn.ghost:hover { color: var(--cyan); border-color: var(--line-bright); }
.status-text { display: inline-flex; align-items: center; gap: 4px; font-size: 9px; }
.status-text::before { content: ''; width: 4px; height: 4px; border-radius: 50%; background: currentColor; }
.status-text.warn { color: var(--amber); } .status-text.ok { color: var(--green); } .status-text.late { color: var(--red-soft); } .status-text.done { color: var(--dim); } .status-text.muted { color: var(--muted); }
.board-empty { padding: 28px; text-align: center; color: var(--dim); font-size: 10px; }
.log-list { padding: 4px 4px; }
.log-item { display: flex; gap: 9px; padding: 6px 7px; border-bottom: 1px solid rgba(255,255,255,.03); font-size: 10px; color: var(--muted); align-items: flex-start; }
.log-item .log-time { font-family: var(--mono); color: var(--dim); font-size: 9px; flex: none; min-width: 46px; }
.log-item .log-dot { width: 5px; height: 5px; border-radius: 50%; margin-top: 4px; background: var(--green); flex: none; }
.log-item .log-dot.late { background: var(--red-soft); }
.log-item .log-dot.warn { background: var(--amber); }
.log-item .log-train { color: var(--text-soft); font-family: var(--mono); }
.log-item .log-text { flex: 1; }
.log-item .log-score { font-family: var(--mono); font-size: 9px; color: var(--green); }
.log-item .log-score.neg { color: var(--red-soft); }

/* ============================ 车站控制台 ============================ */
.console-overlay { position: fixed; inset: 0; z-index: 500; background: #040c12; display: flex; flex-direction: column; animation: fadeIn .2s ease; }
.console-head { height: 72px; flex: none; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 20px; background: linear-gradient(180deg, rgba(9,24,33,.99), rgba(5,15,21,.99)); border-bottom: 1px solid var(--line-soft); }
.console-title { display: flex; align-items: center; gap: 12px; min-width: 0; }
.console-title > div { min-width: 0; }
.console-kicker { display: block; color: var(--cyan); font-size: 8px; letter-spacing: .16em; margin-bottom: 3px; }
.console-title h2 { margin: 0; font-size: 20px; letter-spacing: .03em; }
.console-station-tag { color: var(--muted); font-size: 9px; padding: 3px 7px; border: 1px solid var(--line-soft); border-radius: 4px; margin-left: 2px; white-space: nowrap; }
.console-head-stats { display: flex; align-items: center; gap: 0; }
.console-stat { padding: 0 14px; border-left: 1px solid var(--line-soft); display: flex; flex-direction: column; gap: 3px; min-width: 72px; }
.console-stat span { font-size: 8px; color: var(--dim); letter-spacing: .05em; }
.console-stat b { font-family: var(--mono); font-size: 15px; font-weight: 500; color: var(--text-soft); }
.console-stat b.gold { color: var(--gold); }
.console-stat b.red { color: var(--red-soft); }
.console-actions { display: flex; align-items: center; gap: 12px; }
.clock-mini { text-align: right; }
.clock-mini span { display: block; font-family: var(--mono); font-size: 21px; color: var(--text); letter-spacing: .03em; }
.clock-mini small { display: block; color: var(--dim); font-size: 8px; margin-top: 2px; }
.speed-group.light { background: rgba(255,255,255,.02); }
.console-body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 408px; }
.console-stage { position: relative; min-width: 0; min-height: 0; background: #040e14; overflow: hidden; }
#console-canvas { display: block; width: 100%; height: 100%; }
.console-stage-overlay { position: absolute; inset: 0; pointer-events: none; }
.yard-legend { position: absolute; right: 18px; top: 68px; display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: 9px; background: rgba(5,17,24,.7); border: 1px solid var(--line-soft); padding: 7px 11px; border-radius: 6px; }
.yard-legend span { display: inline-flex; align-items: center; gap: 5px; }
.yard-hint { position: absolute; left: 18px; bottom: 14px; color: var(--dim); font-size: 9px; letter-spacing: .03em; }
.console-side { background: #06131b; border-left: 1px solid var(--line-soft); overflow-y: auto; padding: 14px; }
.console-side .insp-head { margin-bottom: 10px; }
.console-queue-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.console-queue-head .insp-label { margin: 0; }
.queue-item { border: 1px solid var(--line-soft); background: rgba(255,255,255,.018); border-radius: 8px; padding: 9px 10px; margin-bottom: 6px; transition: all .15s; }
.queue-item:hover { border-color: var(--line-bright); }
.queue-item.active { border-color: rgba(243,201,105,.4); background: rgba(243,201,105,.04); }
.q-top { display: flex; align-items: center; gap: 7px; }
.q-no { font-family: var(--mono); font-size: 16px; color: var(--gold); font-weight: 600; }
.q-status { margin-left: auto; font-size: 8px; color: var(--amber); }
.q-route { font-size: 9px; color: var(--muted); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.q-time { display: flex; gap: 12px; font-size: 9px; color: var(--muted); font-family: var(--mono); margin-top: 4px; }
.q-time b { color: var(--text-soft); font-weight: 500; }
.q-platforms { display: flex; gap: 4px; margin-top: 7px; flex-wrap: wrap; }
.q-platforms .pf-btn { min-width: 34px; padding: 4px 5px; flex: 1; }
.queue-item .req-platforms { margin-top: 7px; grid-template-columns: repeat(auto-fill, minmax(38px, 1fr)); }
.queue-item .pf-btn { padding: 4px 2px; }
.pf-matrix { display: flex; flex-direction: column; gap: 5px; }
.pf-matrix-row { display: flex; align-items: center; gap: 8px; padding: 5px 7px; border-radius: 5px; border: 1px solid transparent; font-size: 9px; }
.pf-matrix-row.free { border-color: rgba(111,227,168,.12); background: rgba(111,227,168,.025); }
.pf-matrix-row.busy { border-color: rgba(255,255,255,.045); background: rgba(255,255,255,.014); }
.pf-matrix-row.closed { border-color: rgba(225,75,78,.14); background: rgba(225,75,78,.03); }
.pf-matrix-row .pf-num { width: 28px; font-family: var(--mono); color: var(--text-soft); font-size: 11px; flex: none; }
.pf-matrix-row .pf-state { color: var(--muted); flex: 1; }
.pf-matrix-row .pf-state b { color: var(--text-soft); font-weight: 500; }
.pf-matrix-row .pf-free { font-family: var(--mono); font-size: 8px; color: var(--dim); }
.console-section-title { font-size: 9px; letter-spacing: .14em; color: var(--dim); margin: 16px 0 7px; display: flex; justify-content: space-between; align-items: center; }
.console-auto { display: flex; align-items: center; justify-content: space-between; padding: 9px 10px; border-radius: 7px; border: 1px solid var(--line-soft); background: rgba(255,255,255,.018); margin-bottom: 10px; }
.console-auto span { font-size: 10px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.console-auto .icon { width: 13px; height: 13px; }
.console-footer-note { margin-top: 15px; padding: 9px 10px; border-radius: 6px; background: rgba(84,216,255,.035); border: 1px solid rgba(84,216,255,.1); color: var(--dim); font-size: 9px; line-height: 1.8; }

/* ============================ 弹出层 / 弹窗 ============================ */
.modal-backdrop { position: fixed; inset: 0; z-index: 900; background: rgba(1, 6, 10, .76); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); display: flex; align-items: center; justify-content: center; padding: 28px; animation: fadeIn .18s ease; }
.modal { width: min(980px, 94vw); max-height: min(88vh, 920px); background: linear-gradient(160deg, #0b1e28, #050f15 65%); border: 1px solid rgba(84,216,255,.19); border-radius: 16px; box-shadow: 0 30px 90px rgba(0,0,0,.6); display: flex; flex-direction: column; overflow: hidden; animation: fadeUp .22s ease; }
.modal.wide { width: min(1240px, 95vw); }
.modal.narrow { width: min(560px, 92vw); }
.modal-head { flex: none; padding: 20px 26px 16px; border-bottom: 1px solid var(--line-soft); display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; }
.modal-kicker { color: var(--cyan); font-size: 8px; letter-spacing: .2em; text-transform: uppercase; margin-bottom: 6px; }
.modal-title { margin: 0; font-size: 23px; letter-spacing: .04em; font-weight: 700; }
.modal-desc { margin: 7px 0 0; color: var(--muted); font-size: 11px; line-height: 1.8; max-width: 720px; }
.modal-head .icon-btn { width: 32px; height: 32px; border: 1px solid var(--line-soft); color: var(--muted); flex: none; }
.modal-body { flex: 1; overflow-y: auto; padding: 20px 26px; min-height: 0; }
.modal-foot { flex: none; padding: 13px 26px; border-top: 1px solid var(--line-soft); display: flex; align-items: center; justify-content: space-between; gap: 10px; background: rgba(3,10,15,.5); }
.modal-foot-note { color: var(--dim); font-size: 9px; }
.modal-actions { display: flex; align-items: center; gap: 8px; }

/* 车辆图鉴 */
.stock-filter { display: flex; align-items: center; gap: 5px; margin-bottom: 16px; flex-wrap: wrap; }
.stock-filter button { padding: 6px 11px; border-radius: 5px; border: 1px solid transparent; color: var(--muted); font-size: 10px; }
.stock-filter button:hover { color: var(--text-soft); }
.stock-filter button.active { color: var(--gold); border-color: rgba(243,201,105,.25); background: rgba(243,201,105,.06); }
.stock-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.stock-card { border: 1px solid var(--line-soft); border-radius: 10px; overflow: hidden; background: linear-gradient(160deg, rgba(11,29,39,.8), rgba(4,13,19,.9)); transition: all .18s; }
.stock-card:hover { border-color: rgba(84,216,255,.28); transform: translateY(-2px); }
.stock-art { height: 92px; display: flex; align-items: center; justify-content: center; background: radial-gradient(ellipse at 50% 80%, rgba(84,216,255,.08), transparent 70%), #06141c; padding: 8px 16px; border-bottom: 1px solid rgba(255,255,255,.03); position: relative; overflow: hidden; }
.stock-art::after { content: ''; position: absolute; left: 0; right: 0; bottom: 18px; height: 1px; background: linear-gradient(90deg, transparent, rgba(84,216,255,.16), transparent); }
.stock-art svg { width: 100%; height: 100%; overflow: visible; }
.stock-info { padding: 11px 13px 13px; }
.stock-name { font-size: 14px; font-weight: 700; display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.stock-cat { font-size: 8px; color: var(--cyan); border: 1px solid rgba(84,216,255,.18); border-radius: 3px; padding: 2px 5px; flex: none; font-weight: 400; }
.stock-meta { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 7px; color: var(--muted); font-size: 9px; }
.stock-meta b { color: var(--text-soft); font-weight: 500; font-family: var(--mono); }
.stock-desc { margin-top: 9px; color: var(--dim); font-size: 9px; line-height: 1.8; }
.stock-stripe { height: 2px; width: 40px; border-radius: 2px; margin-top: 10px; }

/* 车站工坊 */
.workshop-grid { display: grid; grid-template-columns: 340px minmax(0,1fr); gap: 22px; align-items: start; }
.form-section { margin-bottom: 16px; }
.form-label { display: block; font-size: 9px; color: var(--muted); letter-spacing: .05em; margin-bottom: 5px; }
.form-label b { color: var(--red-soft); font-weight: 400; margin-left: 2px; }
.form-input, .form-select, .form-textarea {
  width: 100%; padding: 9px 11px; background: rgba(255,255,255,.035); border: 1px solid var(--line);
  border-radius: 6px; color: var(--text); font-size: 12px; transition: border-color .15s;
}
.form-input:focus, .form-select:focus, .form-textarea:focus { border-color: var(--cyan2); background: rgba(84,216,255,.035); }
.form-select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 15px) 50%, calc(100% - 10px) 50%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.range-wrap { display: flex; align-items: center; gap: 10px; }
.range-wrap input[type=range] { flex: 1; accent-color: var(--gold); }
.range-val { min-width: 36px; text-align: center; font-family: var(--mono); color: var(--gold); font-size: 13px; }
.swatch-row { display: flex; gap: 7px; }
.swatch-dot { width: 22px; height: 22px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; }
.swatch-dot.active { border-color: #fff; box-shadow: 0 0 0 2px var(--bg-panel); }
.workshop-preview { border: 1px solid var(--line-soft); border-radius: 12px; overflow: hidden; background: #05131b; min-height: 360px; display: flex; flex-direction: column; }
.preview-head { display: flex; align-items: center; justify-content: space-between; padding: 11px 14px; border-bottom: 1px solid var(--line-soft); color: var(--muted); font-size: 9px; }
.preview-stage { flex: 1; position: relative; min-height: 300px; overflow: hidden; }
.preview-stage svg { width: 100%; height: 100%; display: block; object-fit: cover; }
.preview-foot { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 14px; border-top: 1px solid var(--line-soft); color: var(--dim); font-size: 9px; }
.preview-foot b { color: var(--text-soft); font-weight: 500; }
.custom-list { margin-top: 18px; }
.custom-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 11px; border-radius: 7px; border: 1px solid var(--line-soft); background: rgba(255,255,255,.02); margin-bottom: 6px; }
.custom-item .ci-name { font-size: 12px; color: var(--text-soft); }
.custom-item .ci-meta { color: var(--dim); font-size: 9px; margin-top: 3px; }
.custom-item .btn { padding: 4px 8px; font-size: 9px; }

/* 路网资料 */
.lines-layout { display: grid; grid-template-columns: 1fr; gap: 12px; }
.line-search { display: flex; align-items: center; gap: 8px; background: rgba(255,255,255,.03); border: 1px solid var(--line); border-radius: 6px; padding: 8px 11px; }
.line-search .icon { width: 14px; height: 14px; color: var(--dim); }
.line-search input { flex: 1; background: none; border: 0; color: var(--text); font-size: 11px; }
.line-stats { display: flex; gap: 8px; flex-wrap: wrap; }
.line-stat { font-size: 9px; color: var(--muted); border: 1px solid var(--line-soft); border-radius: 4px; padding: 3px 7px; }
.line-table { width: 100%; border-collapse: collapse; font-size: 10px; }
.line-table th { position: sticky; top: 0; background: #081821; text-align: left; padding: 7px 9px; color: var(--dim); font-weight: 500; font-size: 8px; letter-spacing: .08em; border-bottom: 1px solid var(--line-soft); }
.line-table td { padding: 7px 9px; border-bottom: 1px solid rgba(255,255,255,.025); color: var(--text-soft); }
.line-table tr:hover td { background: rgba(84,216,255,.03); }
.line-type-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 5px; }
.line-table .lt-name { font-weight: 600; }
.line-table .lt-stations { color: var(--dim); font-size: 9px; max-width: 420px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.line-table .lt-km { font-family: var(--mono); color: var(--muted); }
.lines-scroll { max-height: 520px; overflow-y: auto; }

/* 玩法说明 */
.help-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.help-card { border: 1px solid var(--line-soft); border-radius: 9px; padding: 14px 16px; background: rgba(255,255,255,.02); }
.help-card h4 { margin: 0 0 8px; font-size: 12px; color: var(--gold); display: flex; align-items: center; gap: 7px; }
.help-card h4 .icon { width: 15px; height: 15px; }
.help-card p, .help-card li { color: var(--muted); font-size: 10px; line-height: 1.95; margin: 0; }
.help-card ul { margin: 0; padding-left: 16px; }
.help-card li { margin-bottom: 4px; }
.help-keys { display: flex; flex-direction: column; gap: 6px; margin-top: 3px; }
.help-key { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 10px; }
.help-key kbd { min-width: 32px; text-align: center; }

/* 任务简报 & 报告 */
.brief-hero { display: flex; gap: 18px; align-items: flex-start; margin-bottom: 18px; }
.brief-icon { width: 54px; height: 54px; border-radius: 14px; background: rgba(243,201,105,.09); border: 1px solid rgba(243,201,105,.25); color: var(--gold); display: flex; align-items: center; justify-content: center; flex: none; }
.brief-icon .icon { width: 27px; height: 27px; }
.brief-title { font-size: 22px; font-weight: 700; margin: 0 0 5px; }
.brief-sub { color: var(--muted); font-size: 10px; letter-spacing: .04em; }
.brief-body { color: var(--text-soft); font-size: 11px; line-height: 1.95; }
.brief-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 16px 0; }
.brief-cell { border: 1px solid var(--line-soft); border-radius: 8px; padding: 11px 13px; background: rgba(255,255,255,.018); }
.brief-cell span { display: block; color: var(--dim); font-size: 8px; letter-spacing: .08em; margin-bottom: 4px; }
.brief-cell b { font-family: var(--mono); font-size: 18px; font-weight: 500; color: var(--text); }
.brief-cell small { color: var(--muted); font-size: 9px; margin-left: 5px; font-family: var(--font); }
.brief-tip { display: flex; gap: 8px; align-items: flex-start; padding: 9px 11px; border-radius: 6px; background: rgba(84,216,255,.04); border: 1px solid rgba(84,216,255,.1); color: var(--muted); font-size: 10px; line-height: 1.8; margin-bottom: 6px; }
.brief-tip .icon { width: 13px; height: 13px; color: var(--cyan); margin-top: 2px; flex: none; }
.report-head { text-align: center; padding: 10px 0 14px; }
.report-stars { display: flex; justify-content: center; gap: 9px; margin-bottom: 12px; }
.report-star { color: rgba(255,255,255,.1); }
.report-star .icon { width: 36px; height: 36px; stroke-width: 1.1; }
.report-star.on { color: var(--gold); filter: drop-shadow(0 0 10px rgba(243,201,105,.3)); }
.report-grade { font-size: 26px; font-weight: 800; letter-spacing: .06em; color: var(--gold); }
.report-scenario { color: var(--muted); font-size: 10px; margin-top: 5px; letter-spacing: .05em; }
.report-metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 18px 0; }
.report-metric { border: 1px solid var(--line-soft); background: rgba(255,255,255,.02); border-radius: 8px; padding: 12px; text-align: center; }
.report-metric span { display: block; color: var(--dim); font-size: 8px; letter-spacing: .07em; margin-bottom: 4px; }
.report-metric b { display: block; font-family: var(--mono); font-size: 21px; font-weight: 500; color: var(--text); }
.report-metric b.gold { color: var(--gold); }
.report-metric b.green { color: var(--green); }
.report-metric b.red { color: var(--red-soft); }
.report-obj { display: flex; flex-direction: column; gap: 7px; margin: 16px 0 4px; }
.report-obj-row { display: flex; align-items: center; justify-content: space-between; padding: 9px 12px; border-radius: 6px; background: rgba(255,255,255,.02); border: 1px solid var(--line-soft); color: var(--muted); font-size: 10px; }
.report-obj-row b { font-family: var(--mono); font-weight: 500; color: var(--text-soft); }
.report-obj-row .ok { color: var(--green); }
.report-obj-row .fail { color: var(--red-soft); }
.report-note { color: var(--dim); font-size: 9px; line-height: 1.8; margin-top: 12px; text-align: center; }

/* 确认框 */
.confirm-body { color: var(--muted); font-size: 11px; line-height: 1.9; }
.confirm-body b { color: var(--text); }

/* Toast */
.toast-root { position: fixed; top: 80px; left: 50%; transform: translateX(-50%); z-index: 850; display: flex; flex-direction: column; align-items: center; gap: 8px; width: 380px; max-width: 42vw; pointer-events: none; }
.toast {
  pointer-events: auto; padding: 11px 13px; border-radius: 8px; border: 1px solid var(--line-bright);
  background: rgba(6, 19, 27, .96); box-shadow: 0 12px 34px rgba(0,0,0,.4);
  display: flex; gap: 9px; align-items: flex-start; animation: toastIn .28s ease; backdrop-filter: blur(10px);
}
.toast.leaving { animation: toastOut .25s ease forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateX(18px); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateX(18px); } }
.toast .toast-icon { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.toast .toast-title { font-size: 11px; font-weight: 600; color: var(--text); }
.toast .toast-text { font-size: 9px; color: var(--muted); line-height: 1.7; margin-top: 3px; }
.toast.info .toast-icon { color: var(--cyan); }
.toast.warn { border-color: rgba(255,184,92,.3); } .toast.warn .toast-icon { color: var(--amber); }
.toast.danger { border-color: rgba(225,75,78,.35); } .toast.danger .toast-icon { color: var(--red-soft); }
.toast.success { border-color: rgba(111,227,168,.3); } .toast.success .toast-icon { color: var(--green); }

/* 动态抽屉 */
.alerts-pop { position: fixed; top: 78px; right: 22px; z-index: 880; width: 360px; max-height: 520px; background: rgba(6,19,27,.98); border: 1px solid var(--line-bright); border-radius: 10px; box-shadow: 0 24px 60px rgba(0,0,0,.55); display: flex; flex-direction: column; animation: fadeUp .16s ease; overflow: hidden; }
.alerts-head { display: flex; align-items: center; justify-content: space-between; padding: 11px 14px; border-bottom: 1px solid var(--line-soft); font-size: 11px; color: var(--text-soft); }
.alerts-list { overflow-y: auto; padding: 6px; }
.alert-row { padding: 9px 10px; border-radius: 6px; border-bottom: 1px solid rgba(255,255,255,.03); }
.alert-row:hover { background: rgba(84,216,255,.035); }
.alert-top { display: flex; align-items: center; gap: 5px; font-size: 10px; font-weight: 600; color: var(--text-soft); }
.alert-top .icon { width: 12px; height: 12px; color: var(--amber); }
.alert-top.red .icon { color: var(--red-soft); }
.alert-time { margin-left: auto; color: var(--dim); font-family: var(--mono); font-size: 8px; font-weight: 400; }
.alert-body { color: var(--muted); font-size: 9px; line-height: 1.75; margin-top: 3px; }

/* 响应式 */
@media (max-width: 1360px) {
  .topbar-right .metric-chip { min-width: 50px; padding: 4px 8px; }
  .topbar { grid-template-columns: minmax(240px, 1fr) auto minmax(410px, 1fr); gap: 10px; }
  .game-main { grid-template-columns: 238px minmax(0, 1fr) 320px; }
  .menu-main { gap: 24px; }
  .scenario-cards { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
  .scenario-card { min-height: 128px; }
  .console-body { grid-template-columns: minmax(0, 1fr) 380px; }
}
@media (max-width: 1180px) {
  .menu-main { grid-template-columns: 1fr; }
  .menu-live { display: none; }
  .hero { padding-bottom: 0; }
  .menu-top { padding: 18px 26px 8px; }
  .menu-main { padding: 8px 26px; min-height: auto; }
  .scenario-strip { padding: 10px 26px; }
  .menu-footer { padding: 11px 26px 16px; }
  .menu-screen { height: auto; min-height: 100vh; }
  .h1-cn { font-size: clamp(42px, 7vw, 64px); }
  .game-screen { min-width: 1180px; }
  .help-grid { grid-template-columns: 1fr; }
  .workshop-grid { grid-template-columns: 1fr; }
  .report-metrics { grid-template-columns: repeat(2, 1fr); }
  .brief-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .menu-nav .menu-link { padding: 7px 8px; font-size: 0; }
  .menu-nav .menu-link .icon { width: 18px; height: 18px; }
  .scenario-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .menu-footer { flex-direction: column; gap: 5px; }
  .hero-stats { flex-wrap: wrap; }
  .hero-stats div { border-right: 0; }
  .topbar { grid-template-columns: 1fr auto; }
  .topbar-center { grid-column: 1 / -1; order: 3; display: none; }
  .modal { width: 96vw; }
  .brief-grid { grid-template-columns: 1fr; }
}

/* ==== 展示补充 ==== */
.train-stock-art { position: relative; height: 112px; display: flex; align-items: center; justify-content: center; background: radial-gradient(ellipse at 55% 82%, rgba(84,216,255,.1), transparent 65%), #06141c; }
.train-stock-art svg { width: 100%; height: 100%; padding: 4px; }
.info-cell b.ok, .info-cell b.late, .info-cell b.warn, .info-cell b.gold { color: inherit; }
.info-cell b.ok { color: var(--green); } .info-cell b.late { color: var(--red-soft); } .info-cell b.warn { color: var(--amber); } .info-cell b.gold { color: var(--gold); }
.scenario-card.custom h3 { color: var(--violet); }
.scenario-card.custom .sc-focus { color: var(--violet); }
.scenario-card.custom.selected { border-color: rgba(195,157,255,.6); box-shadow: 0 0 0 1px rgba(195,157,255,.14), 0 14px 30px rgba(0,0,0,.3); }
.scenario-card.custom.selected::after { background: var(--violet); color: #150a20; }
.pf-matrix-row .pf-state b { color: var(--text-soft); font-family: var(--mono); font-weight: 500; }
.board-table .t-no { color: #dff7ff; }
.menu-screen::-webkit-scrollbar { width: 8px; }
@media (max-height: 900px) {
  .menu-main { min-height: 390px; padding-top: 4px; }
  .h1-cn { font-size: clamp(42px, 4.8vw, 68px); }
  .hero-sub { margin-bottom: 16px; line-height: 1.8; }
  .hero-stats { margin-bottom: 20px; }
  .scenario-card { min-height: 126px; padding: 12px 13px 11px; }
  .menu-top { padding-top: 16px; }
  .menu-footer { padding-bottom: 10px; }
}

/* 知名车站图鉴 */
.famous-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.famous-card { position: relative; overflow: hidden; border: 1px solid var(--line-soft); border-radius: 10px; padding: 14px 15px 15px; background: linear-gradient(160deg, rgba(12,34,44,.82), rgba(4,13,19,.92)); }
.famous-card::before { content: ''; position: absolute; left: 0; top: 0; right: 0; height: 2px; background: linear-gradient(90deg, var(--accent, var(--cyan)), transparent 75%); opacity: .8; }
.famous-card::after { content: ''; position: absolute; right: -34px; top: -34px; width: 100px; height: 100px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--accent, #54d8ff) 15%, transparent), transparent 70%); }
.fc-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.fc-city { font-size: 8px; color: var(--muted); letter-spacing: .05em; }
.fc-tag { color: var(--gold); font-size: 8px; border: 1px solid rgba(243,201,105,.2); border-radius: 3px; padding: 2px 5px; white-space: nowrap; }
.famous-card h3 { margin: 6px 0 7px; font-size: 21px; letter-spacing: .02em; display: flex; align-items: baseline; gap: 7px; }
.famous-card h3 small { color: var(--dim); font-size: 8px; font-weight: 400; letter-spacing: .04em; }
.famous-card p { color: var(--muted); font-size: 9px; line-height: 1.8; margin: 0 0 9px; }
.fc-facts { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 8px; }
.fc-facts span { font-size: 8px; color: var(--text-soft); background: rgba(255,255,255,.035); padding: 3px 6px; border-radius: 3px; border: 1px solid rgba(255,255,255,.03); }
.fc-lines { display: flex; flex-wrap: wrap; gap: 4px; }

/* ============================================================
   更新：真实站场 / 自由调度
   ============================================================ */
.focus-yards { display: flex; flex-wrap: wrap; gap: 3px 7px; margin-top: 6px; }
.focus-yards span { color: var(--muted); font-size: 8px; display: inline-flex; align-items: center; gap: 4px; }
.focus-yards i, .yard-note i, .brief-yards i { display: inline-block; width: 5px; height: 5px; border-radius: 50%; flex: none; }
.yard-note { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 8px; margin-top: 8px; padding: 6px 8px; border-radius: 5px; background: rgba(84,216,255,.035); border: 1px solid rgba(84,216,255,.1); color: var(--muted); font-size: 8px; line-height: 1.65; }
.yard-badge { color: var(--gold); border: 1px solid rgba(243,201,105,.24); border-radius: 3px; padding: 1px 4px; font-size: 8px; flex: none; }
.yard-note span { display: inline-flex; align-items: center; gap: 4px; }
.yard-field-label { display: flex; align-items: center; gap: 5px; margin: 8px 0 4px; padding: 3px 6px; border-radius: 4px; background: rgba(84,216,255,.045); color: var(--text-soft); font-size: 8px; letter-spacing: .04em; }
.yard-field-label b { margin-left: auto; color: var(--dim); font-family: var(--mono); font-weight: 500; letter-spacing: 0; }
.yard-field-label .swatch { width: 10px; height: 3px; border-radius: 2px; }
.yard-color { width: 5px; height: 5px; border-radius: 50%; display: inline-block; margin-right: 3px; }
.req-platforms { max-height: 112px; overflow-y: auto; padding-right: 2px; }
.req-platforms::-webkit-scrollbar { width: 4px; }
.req-platforms .pf-btn { min-width: 48px; font-size: 8px; line-height: 1.3; }
.req-platforms .pf-btn small { font-size: 6px; }
.pf-matrix { max-height: 280px; overflow-y: auto; padding-right: 2px; }
.pf-matrix::-webkit-scrollbar { width: 4px; }
.brief-yards { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.brief-yards span { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 8px; border: 1px solid var(--line-soft); border-radius: 3px; padding: 2px 5px; }
.famous-dispatch { margin-top: 9px; width: 100%; padding: 6px 8px; border-radius: 4px; border: 1px solid rgba(84,216,255,.2); color: var(--cyan); background: rgba(84,216,255,.045); font-size: 9px; transition: all .15s; }
.famous-dispatch:hover { background: rgba(84,216,255,.12); border-color: rgba(84,216,255,.45); }
.free-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 9px; }
.free-card { text-align: left; border: 1px solid var(--line-soft); border-radius: 9px; background: linear-gradient(155deg, rgba(12,33,43,.8), rgba(4,13,19,.92)); padding: 12px 13px; color: var(--text); transition: all .16s; }
.free-card:hover { border-color: rgba(84,216,255,.42); transform: translateY(-1px); background: rgba(10,28,38,.9); }
.free-card-top { display: flex; align-items: center; justify-content: space-between; }
.free-lvl { font-size: 8px; padding: 1px 5px; border-radius: 3px; color: var(--muted); border: 1px solid var(--line-soft); }
.free-lvl.famous { color: var(--gold); border-color: rgba(243,201,105,.25); }
.free-lvl.hub { color: var(--cyan); border-color: rgba(84,216,255,.2); }
.free-lvl.custom { color: var(--violet); border-color: rgba(195,157,255,.25); }
.free-type { font-size: 8px; color: var(--dim); }
.free-card h3 { margin: 7px 0 2px; font-size: 19px; letter-spacing: .02em; }
.free-city { font-size: 8px; color: var(--muted); }
.free-yards { margin-top: 7px; font-size: 8px; color: var(--dim); line-height: 1.65; min-height: 22px; }
.free-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; padding-top: 7px; border-top: 1px solid rgba(255,255,255,.04); font-family: var(--mono); font-size: 8px; color: var(--muted); }
.free-foot span:last-child { color: var(--gold); font-family: var(--font); }
.yard-color { display: inline-block; width: 5px; height: 5px; border-radius: 50%; margin-right: 4px; vertical-align: middle; }
.console-side .pf-matrix { max-height: 340px; }
.queue-item .req-platforms { max-height: 92px; }
.console-stat span { white-space: nowrap; }
@media (max-width: 1360px) {
  .menu-nav .menu-link { padding: 8px 9px; font-size: 11px; }
  .free-grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
}

/* 车站控制台 · 站场切换 */
.console-field-tabs { display: flex; align-items: center; gap: 3px; padding: 3px; border-radius: 7px; background: rgba(255,255,255,.025); border: 1px solid var(--line-soft); overflow-x: auto; max-width: 500px; }
.console-field-tab { display: inline-flex; align-items: center; gap: 4px; padding: 6px 9px; border-radius: 5px; color: var(--muted); font-size: 9px; white-space: nowrap; transition: all .15s; }
.console-field-tab i { width: 5px; height: 5px; border-radius: 50%; flex: none; }
.console-field-tab b { color: var(--dim); font-family: var(--mono); font-weight: 500; font-size: 8px; }
.console-field-tab:hover { color: var(--text-soft); background: rgba(255,255,255,.04); }
.console-field-tab.active { color: var(--gold); background: rgba(243,201,105,.09); }
.console-field-tab.active b { color: var(--gold); }
@media (max-width: 1360px) { .console-field-tabs { max-width: 310px; } .console-field-tab { padding: 5px 6px; font-size: 8px; } }

/* 股道方向 / 达速通过 */
.pf-dir { display: inline-block; margin-left: 4px; font-style: normal; font-family: var(--mono); font-size: 10px; color: var(--cyan); vertical-align: 1px; }
.pf-matrix-row.busy .pf-dir { color: var(--green); }
.pf-matrix-row.direction { border-color: rgba(243,201,105,.18); background: rgba(243,201,105,.035); }
.pf-matrix-row.direction .pf-state { color: var(--gold); }
.pf-matrix-row.direction .pf-free { color: var(--gold); }
.pf-btn.direction { border-color: rgba(243,201,105,.22); color: var(--gold); background: rgba(243,201,105,.04); opacity: .9; }
.pf-btn.direction small { color: rgba(243,201,105,.55); }
.pass-note { display: inline-block; color: var(--gold); border: 1px solid rgba(243,201,105,.2); border-radius: 3px; padding: 1px 5px; font-size: 8px; }

/* 客流 / 列车详情 / 发车控制 */
.flow-mini-grid { display:grid; grid-template-columns:1fr 1fr; gap:5px; }
.flow-mini { border:1px solid var(--line-soft); border-radius:5px; padding:6px 8px; background:rgba(255,255,255,.018); }
.flow-mini span { display:block; color:var(--muted); font-size:8px; }
.flow-mini b { display:block; margin-top:2px; font-family:var(--mono); font-size:15px; color:var(--text); }
.flow-mini b small { font-family:var(--font); font-size:7px; color:var(--muted); font-weight:400; margin-left:2px; }
.flow-mini.gold b { color:var(--gold); }
.console-live-flow { display:flex; align-items:center; gap:7px; margin-top:8px; padding:7px 8px; border-radius:5px; border:1px solid rgba(84,216,255,.12); background:rgba(84,216,255,.035); color:var(--muted); font-size:8px; flex-wrap:wrap; }
.console-live-flow b { color:var(--cyan); font-family:var(--mono); font-size:11px; }
.console-live-flow em { font-style:normal; color:var(--dim); }
.console-live-flow .tiny-btn { margin-left:auto; }
.train-detail-head { display:flex; align-items:center; justify-content:space-between; gap:14px; padding:12px 14px; border-left:3px solid var(--cyan); border-radius:4px; background:rgba(84,216,255,.04); }
.train-detail-no { display:flex; align-items:center; gap:7px; font-family:var(--mono); font-size:25px; font-weight:700; color:var(--text); }
.train-detail-route { margin-top:4px; color:var(--muted); font-size:10px; }
.train-detail-platform { text-align:right; color:var(--gold); font-family:var(--mono); font-size:16px; }
.train-detail-platform small { display:block; color:var(--muted); font-family:var(--font); font-size:8px; margin-top:2px; }
.train-metric-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:7px; margin-top:12px; }
.train-metric { border:1px solid var(--line-soft); border-radius:5px; padding:8px 10px; background:rgba(255,255,255,.018); }
.train-metric span { display:block; color:var(--muted); font-size:8px; }
.train-metric b { display:block; margin-top:3px; color:var(--text); font-size:14px; font-family:var(--mono); }
.train-metric small { display:block; margin-top:2px; color:var(--dim); font-size:8px; }
.detail-section { margin-top:13px; }
.detail-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:7px 14px; margin-top:7px; }
.detail-grid div { padding:5px 0; border-bottom:1px solid rgba(255,255,255,.035); }
.detail-grid span { display:block; color:var(--muted); font-size:8px; }
.detail-grid b { display:block; margin-top:2px; color:var(--text-soft); font-size:10px; font-weight:500; }
.car-strip { display:flex; flex-wrap:wrap; gap:4px; margin-top:7px; }
.car-chip { display:flex; align-items:center; gap:4px; min-width:42px; padding:4px 6px; border:1px solid rgba(255,255,255,.1); border-radius:4px; background:rgba(255,255,255,.02); color:var(--text-soft); }
.car-chip b { width:13px; height:13px; display:inline-flex; align-items:center; justify-content:center; border-radius:50%; background:rgba(255,255,255,.08); color:var(--muted); font-family:var(--mono); font-size:7px; font-weight:400; }
.car-chip span { font-size:8px; white-space:nowrap; }
.dep-delay-row { display:flex; flex-wrap:wrap; gap:5px; margin-top:7px; }
.dep-delay-row .btn { padding:6px 9px; font-size:9px; }
.detail-note { margin-top:8px; padding:8px 10px; border:1px solid rgba(243,201,105,.16); border-radius:5px; background:rgba(243,201,105,.04); color:var(--muted); font-size:8px; line-height:1.7; }
.flow-metric-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:7px; }
.flow-metric { border:1px solid var(--line-soft); border-radius:6px; padding:10px 12px; background:rgba(255,255,255,.02); }
.flow-metric span { display:block; color:var(--muted); font-size:8px; }
.flow-metric b { display:block; margin-top:4px; color:var(--text); font-family:var(--mono); font-size:21px; }
.flow-metric b small { font-family:var(--font); font-size:8px; color:var(--muted); font-weight:400; }
.flow-metric.gold b { color:var(--gold); }
.flow-chart { margin-top:14px; border:1px solid var(--line-soft); border-radius:6px; padding:10px 12px; background:rgba(255,255,255,.015); }
.flow-chart-head { display:flex; justify-content:space-between; color:var(--muted); font-size:8px; margin-bottom:8px; }
.flow-chart-head .dot { display:inline-block; width:5px; height:5px; border-radius:50%; margin:0 4px 0 8px; }
.flow-bars { height:120px; display:flex; align-items:flex-end; gap:5px; border-bottom:1px solid var(--line-soft); padding-bottom:2px; }
.flow-bar { flex:1; height:100%; display:flex; align-items:flex-end; gap:1px; }
.flow-bar i { display:block; flex:1; border-radius:2px 2px 0 0; min-height:2px; }
.flow-bar i.in { background:rgba(84,216,255,.55); }
.flow-bar i.out { background:rgba(243,201,105,.45); }
.flow-top { margin-top:14px; }
.flow-table { width:100%; border-collapse:collapse; margin-top:6px; font-size:8px; }
.flow-table th { text-align:left; color:var(--dim); font-weight:500; padding:5px 6px; border-bottom:1px solid var(--line-soft); }
.flow-table td { padding:6px; color:var(--text-soft); border-bottom:1px solid rgba(255,255,255,.025); }
.flow-table td b { color:var(--cyan); font-family:var(--mono); }
.tiny-btn { border:1px solid var(--line-soft); border-radius:4px; padding:3px 6px; color:var(--muted); font-size:8px; background:rgba(255,255,255,.02); }
.tiny-btn:hover { color:var(--cyan); border-color:rgba(84,216,255,.3); }


/* ============================================================
   移动端 / 触屏适配
   ============================================================ */
html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}
body {
  position: fixed;
  inset: 0;
  touch-action: pan-y;
  -webkit-text-size-adjust: 100%;
}
button, .icon-btn, .menu-link, .mobile-tool, .board-tab, .speed-btn {
  touch-action: manipulation;
}
input, textarea, select { -webkit-user-select: text; user-select: text; }
#screen-game, .console-overlay, .modal-backdrop { user-select: none; -webkit-user-select: none; }
#game-map { touch-action: none; }
#console-canvas { touch-action: none; }
.mobile-toolbar { display: none; }
.mobile-drawer-close { display: none; }
.mobile-scrim {
  position: fixed; inset: 0; z-index: 120;
  background: rgba(1, 6, 10, .62);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}
.mobile-toolbar .mobile-tool {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-width: 0; min-height: 40px; padding: 5px 8px; border-radius: 6px;
  color: var(--muted); font-size: 10px; letter-spacing: .04em;
  border: 1px solid transparent; background: rgba(255,255,255,.02);
}
.mobile-toolbar .mobile-tool .icon { width: 16px; height: 16px; color: var(--cyan); }
.mobile-toolbar .mobile-tool.active {
  color: var(--gold); border-color: rgba(243,201,105,.25); background: rgba(243,201,105,.06);
}
.mobile-toolbar .mobile-tool.active .icon { color: var(--gold); }

@media (max-width: 1179px) {
  /* ---------- 主菜单 ---------- */
  .menu-screen {
    height: 100vh;
    height: 100dvh;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
  }
  .menu-top {
    padding: calc(12px + env(safe-area-inset-top)) calc(14px + env(safe-area-inset-right)) 7px calc(14px + env(safe-area-inset-left));
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
  }
  .brand { gap: 8px; min-width: 0; }
  .brand-mark { width: 34px; height: 34px; flex: none; }
  .brand-mark svg { width: 31px; height: 31px; }
  .brand-text b { font-size: 12px; letter-spacing: .04em; white-space: nowrap; }
  .brand-text span { font-size: 7px; letter-spacing: .12em; margin-top: 2px; }
  .menu-nav {
    order: 2; width: 100%; gap: 3px; flex-wrap: nowrap;
    justify-content: space-between; min-width: 0; padding-top: 2px;
  }
  .menu-nav .menu-link {
    flex: 1; max-width: 52px; height: 34px; padding: 0; justify-content: center;
    font-size: 0; border-radius: 7px;
  }
  .menu-nav .menu-link .icon { width: 18px; height: 18px; }
  .menu-main {
    display: block;
    flex: none;
    height: auto;
    padding: 8px 16px 4px;
    min-height: 0;
    max-width: none;
  }
  .hero { padding: 4px 0 8px; }
  .hero-kicker { font-size: 8px; letter-spacing: .1em; gap: 6px; line-height: 1.6; }
  .hero h1 { margin: 9px 0 10px; }
  .h1-cn { font-size: clamp(38px, 12vw, 58px); letter-spacing: .035em; }
  .h1-en { font-size: 8px; letter-spacing: .24em; margin-top: 9px; }
  .hero-sub { font-size: 11px; line-height: 1.8; margin-bottom: 13px; max-width: none; }
  .hero-sub br { display: none; }
  .hero-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
    margin: 0 0 14px;
    gap: 0;
  }
  .hero-stats div {
    padding: 8px 10px;
    margin: 0;
    border-right: 1px solid var(--line-soft);
    border-bottom: 1px solid var(--line-soft);
    gap: 7px;
  }
  .hero-stats div:nth-child(2n) { border-right: 0; }
  .hero-stats div:nth-last-child(-n+2) { border-bottom: 0; }
  .hero-stats b { font-size: 19px; }
  .hero-stats span { font-size: 9px; }
  .hero-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .hero-actions .btn-primary { grid-column: 1 / -1; }
  .hero-actions .btn-lg { width: 100%; padding: 12px 12px; font-size: 13px; }
  .hero-actions .btn-text { grid-column: 1 / -1; padding: 7px 0; }
  .hero-note { align-items: flex-start; font-size: 8px; line-height: 1.7; margin-top: 12px; }
  .hero-note .icon { margin-top: 1px; }
  .menu-live { display: none !important; }
  .scenario-strip { padding: 8px 16px 10px; }
  .strip-head { display: block; margin-bottom: 9px; }
  .strip-head h2 { font-size: 16px; }
  .strip-hint { display: none; }
  .scenario-cards { grid-template-columns: 1fr; gap: 8px; }
  .scenario-card { min-height: 108px; padding: 12px 13px; }
  .sc-index { font-size: 42px; bottom: 26px; }
  .menu-footer {
    flex-direction: column; gap: 4px; padding: 11px 16px calc(16px + env(safe-area-inset-bottom));
    font-size: 8px; line-height: 1.6;
  }

  /* ---------- 游戏主框架 ---------- */
  .game-screen {
    height: 100vh;
    height: 100dvh;
    min-width: 0 !important;
    width: 100%;
    overflow: hidden;
    overscroll-behavior: none;
  }
  .topbar {
    flex: none;
    height: auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px 8px;
    padding: calc(7px + env(safe-area-inset-top)) calc(9px + env(safe-area-inset-right)) 7px calc(9px + env(safe-area-inset-left));
    grid-template-columns: none;
  }
  .topbar-left { flex: 1 1 auto; min-width: 0; gap: 6px; }
  .brand-mini { width: 32px; height: 32px; flex: none; border-radius: 7px; }
  .brand-mini svg { width: 22px; height: 22px; }
  .scenario-meta { min-width: 0; }
  .scenario-title { font-size: 11px; max-width: 48vw; }
  .scenario-sub { display: none; }
  .topbar-center {
    order: 3;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 2px 0 0;
  }
  .clock-block { text-align: left; min-width: 0; flex: 1 1 auto; }
  .clock-date { display: none; }
  .clock-time { font-size: 22px; letter-spacing: .02em; text-shadow: none; }
  .speed-group { padding: 2px; flex: none; }
  .speed-btn { min-width: 29px; height: 26px; padding: 0 5px; font-size: 10px; }
  .speed-btn .icon { width: 13px; height: 13px; }
  .topbar-right { order: 2; gap: 0; flex: none; }
  .topbar-right .metric-chip { display: none; }
  .topbar-right .metric-chip.pending-chip {
    display: flex; min-width: 38px; padding: 3px 6px; border-left: 0;
  }
  .topbar-right .metric-label { display: none; }
  .topbar-right .metric-value { font-size: 13px; }
  .topbar-right [data-action="save-game"],
  .topbar-right [data-action="open-help"],
  .topbar-right [data-action="leave-game"] { display: none; }
  .topbar-right .bell-btn { width: 31px; height: 31px; }
  .topbar-right .bell-btn .icon { width: 16px; height: 16px; }

  .mobile-toolbar {
    display: flex; flex: none; gap: 5px;
    padding: 5px calc(8px + env(safe-area-inset-right)) 5px calc(8px + env(safe-area-inset-left));
    background: #06131b;
    border-bottom: 1px solid var(--line-soft);
    z-index: 15;
  }
  .mobile-toolbar .mobile-tool { flex: 1; }

  .game-main { flex: 1; min-height: 0; display: block; position: relative; }
  .map-stage { height: 100%; min-height: 0; display: flex; flex-direction: column; }
  .map-canvas-wrap { flex: 1; min-height: 0; touch-action: none; }
  .map-overlay-top { top: 8px; left: calc(8px + env(safe-area-inset-left)); right: calc(62px + env(safe-area-inset-right)); }
  .map-context {
    padding: 6px 8px; font-size: 8px; gap: 7px;
    max-width: 100%; overflow: hidden;
  }
  .map-context .ctx-sep, .map-context .ctx-weather { display: none; }
  .map-controls {
    top: 8px; right: calc(8px + env(safe-area-inset-right)); flex-direction: row; flex-wrap: wrap; gap: 4px;
  }
  .map-controls .icon-btn { width: 30px; height: 30px; }
  .map-controls .icon-btn .icon { width: 15px; height: 15px; }
  .map-hint-bar { display: none; }
  .map-ticker { left: 8px; right: 8px; bottom: 8px; max-width: none; font-size: 8px; }

  .board-panel {
    height: 41vh;
    min-height: 200px;
    max-height: 360px;
    flex: none;
  }
  .board-panel.collapsed { height: 41px; min-height: 0; max-height: 41px; }
  .board-head { height: 41px; padding: 0 calc(7px + env(safe-area-inset-right)) 0 calc(7px + env(safe-area-inset-left)); gap: 4px; }
  .board-tabs { min-width: 0; overflow-x: auto; scrollbar-width: none; }
  .board-tabs::-webkit-scrollbar { display: none; }
  .board-tab { padding: 7px 8px; font-size: 9px; white-space: nowrap; }
  .board-tab.active::after { left: 8px; right: 8px; bottom: -5px; }
  .board-tools { flex: none; }
  .board-tools .search-box { display: none; }
  .board-tools .icon-btn { width: 28px; height: 28px; }
  .board-body {
    padding: 0 4px calc(4px + env(safe-area-inset-bottom));
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    touch-action: pan-x pan-y;
  }
  .board-table { min-width: 720px; font-size: 9px; }
  .board-table th:last-child, .board-table td:last-child {
    position: sticky; right: 0; z-index: 2;
    background: #06131b;
    box-shadow: -7px 0 12px rgba(0,0,0,.34);
  }
  .board-table th:last-child { z-index: 3; }
  .board-table th { padding: 6px 6px; font-size: 7px; }
  .board-table td { padding: 6px; font-size: 9px; }
  .board-table .t-no { font-size: 11px; }
  .board-empty { padding: 18px 8px; }

  /* 移动端抽屉：站点 / 股道详情 */
  .game-left, .inspector {
    position: fixed;
    top: 0;
    bottom: 0;
    width: min(88vw, 370px);
    z-index: 130;
    display: block;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    transition: transform .22s ease;
    box-shadow: 0 0 40px rgba(0,0,0,.55);
    padding: calc(14px + env(safe-area-inset-top)) 14px calc(20px + env(safe-area-inset-bottom));
  }
  .game-left { left: 0; transform: translateX(-103%); border-right: 1px solid var(--line-bright); }
  .inspector { right: 0; transform: translateX(103%); border-left: 1px solid var(--line-bright); }
  .game-left.mobile-open, .inspector.mobile-open { transform: translateX(0); }
  .game-left .inspector-inner, .inspector .inspector-inner { padding: 0; }
  .mobile-scrim { display: block; }
  .mobile-drawer-close:not(.hidden) {
    position: fixed; z-index: 136;
    top: calc(10px + env(safe-area-inset-top)); right: calc(10px + env(safe-area-inset-right));
    display: inline-flex; align-items: center; gap: 4px;
    padding: 7px 10px; border-radius: 999px;
    border: 1px solid rgba(243,201,105,.3);
    background: rgba(6,19,27,.94); color: var(--gold);
    font-size: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.4);
  }
  .mobile-drawer-close .icon { width: 14px; height: 14px; }

  /* 移动端全屏按钮 */
  .fullscreen-btn.hidden { display: none !important; }

  /* 浮层 / Toast / 动态 */
  .toast-root {
    top: auto;
    bottom: calc(41vh + 16px + env(safe-area-inset-bottom));
    width: calc(100vw - 20px);
    max-width: none;
  }
  .toast { padding: 10px 11px; }
  .alerts-pop {
    top: calc(54px + env(safe-area-inset-top));
    left: 8px; right: 8px; width: auto; max-height: 70dvh;
  }
  .alerts-pop .alerts-list { overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }

  /* ---------- 弹窗 ---------- */
  .modal-backdrop { padding: 8px; align-items: center; }
  .modal, .modal.wide, .modal.narrow {
    width: 100%;
    max-height: calc(100vh - 16px);
    max-height: calc(100dvh - 16px);
    border-radius: 12px;
  }
  .modal-head { padding: 14px 15px 11px; }
  .modal-kicker { font-size: 7px; margin-bottom: 4px; }
  .modal-title { font-size: 19px; }
  .modal-desc { font-size: 9px; line-height: 1.7; margin-top: 5px; }
  .modal-head .icon-btn { width: 30px; height: 30px; }
  .modal-body {
    padding: 13px 15px;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
  }
  .modal-foot {
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
    flex-wrap: wrap;
  }
  .modal-foot-note { display: none; }
  .modal-actions { width: 100%; }
  .modal-actions .btn { flex: 1; }
  .help-grid, .stock-grid, .famous-grid, .free-grid, .workshop-grid,
  .brief-grid, .report-metrics { grid-template-columns: 1fr; }
  .report-metrics { grid-template-columns: 1fr 1fr; }
  .train-metric-grid, .detail-grid, .flow-metric-grid { grid-template-columns: 1fr 1fr; }
  .detail-grid { gap: 6px 10px; }
  .car-strip { gap: 3px; }
  .car-chip { min-width: 0; padding: 3px 5px; }
  .car-chip span { font-size: 7px; }
  .dep-delay-row { display: grid; grid-template-columns: 1fr 1fr; }
  .dep-delay-row .btn { padding: 8px 6px; font-size: 9px; }
  .flow-chart { padding: 8px; }
  .flow-bars { height: 82px; gap: 3px; }
  .flow-table { min-width: 560px; }
  .flow-top { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .stock-art { height: 78px; }
  .workshop-preview { min-height: 260px; }
  .preview-stage { min-height: 220px; }
  .form-row { grid-template-columns: 1fr; }
  .line-table { font-size: 9px; }
  .lines-scroll { max-height: 56dvh; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
  .brief-hero { gap: 11px; }
  .brief-title { font-size: 19px; }
  .report-stars .icon { width: 30px; height: 30px; }

  /* ---------- 车站控制台 ---------- */
  .console-overlay { height: 100vh; height: 100dvh; overflow: hidden; }
  .console-head {
    height: auto;
    flex-wrap: wrap;
    gap: 4px 8px;
    padding: calc(7px + env(safe-area-inset-top)) calc(9px + env(safe-area-inset-right)) 7px calc(9px + env(safe-area-inset-left));
  }
  .console-title { flex: 1 1 150px; gap: 6px; min-width: 0; }
  .console-title h2 { font-size: 16px; }
  .console-kicker, .console-station-tag { display: none; }
  .console-head-stats { display: none; }
  .console-field-tabs {
    order: 4; width: 100%; max-width: none;
    overflow-x: auto; overscroll-behavior: contain;
    padding: 2px; border-radius: 5px;
  }
  .console-field-tab { padding: 5px 7px; font-size: 8px; }
  .console-actions { order: 3; gap: 5px; }
  .clock-mini span { font-size: 15px; }
  .clock-mini small { display: none; }
  .console-actions .speed-btn { min-width: 26px; }
  .console-actions .icon-btn { width: 30px; height: 30px; }
  .console-body { flex: 1; min-height: 0; display: flex; flex-direction: column; }
  .console-stage {
    flex: 1;
    min-height: 0;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior: contain;
    touch-action: pan-x;
    -webkit-overflow-scrolling: touch;
  }
  #console-canvas { width: 820px; min-width: 820px; height: 100%; }
  .console-stage-overlay { width: 820px; }
  .yard-legend { display: none; }
  .yard-hint { left: 9px; bottom: 7px; font-size: 8px; }
  .console-side {
    flex: none;
    height: 39%;
    min-height: 205px;
    max-height: 330px;
    border-left: 0;
    border-top: 1px solid var(--line-soft);
    padding: 10px 12px calc(14px + env(safe-area-inset-bottom));
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
  }
  .console-side .insp-head { margin-bottom: 7px; }
  .console-side .insp-title { font-size: 15px; }
  .console-side .console-live-flow { margin-top: 6px; }
  .console-side .insp-footer .btn { padding: 8px 8px; font-size: 10px; }
  .console-side .queue-item { padding: 8px; }
  .console-side .console-footer-note { margin-top: 10px; }
  .console-side .pf-matrix { max-height: 260px; }
}

/* 窄屏：再压缩工具栏与卡片 */
@media (max-width: 370px) {
  .brand-text span { display: none; }
  .scenario-title { max-width: 40vw; }
  .mobile-toolbar .mobile-tool { gap: 3px; padding: 4px 3px; font-size: 9px; }
  .mobile-toolbar .mobile-tool .icon { width: 14px; height: 14px; }
  .h1-cn { font-size: 36px; }
  .hero-stats b { font-size: 17px; }
  .hero-actions .btn-lg { font-size: 12px; }
  .console-title { flex-basis: 120px; }
}

/* 手机横屏：地图与控制台重排 */
@media (max-width: 1179px) and (orientation: landscape) {
  .toast-root {
    top: auto;
    bottom: 12px;
    width: min(420px, 44vw);
  }
  .topbar { padding-top: calc(4px + env(safe-area-inset-top)); gap: 2px 6px; }
  .topbar-center { width: auto; flex: 1 1 120px; order: 2; padding: 0; }
  .topbar-left { flex: 0 1 auto; }
  .clock-time { font-size: 18px; }
  .topbar-right { order: 3; }
  .mobile-toolbar { padding: 3px 7px; }
  .mobile-toolbar .mobile-tool { min-height: 34px; }
  .scenario-title { max-width: 28vw; }
  .map-stage {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(300px, .8fr);
    grid-template-rows: minmax(0, 1fr);
  }
  .map-canvas-wrap { grid-column: 1; grid-row: 1; }
  .board-panel {
    grid-column: 2;
    grid-row: 1;
    height: 100%;
    min-height: 0;
    max-height: none;
    border-top: 0;
    border-left: 1px solid var(--line-soft);
  }
  .board-panel.collapsed {
    width: 41px;
    height: 100%;
    max-height: none;
    min-height: 0;
  }
  .board-panel.collapsed .board-tabs, .board-panel.collapsed .board-tools { display: none; }
  .board-panel.collapsed .board-head { height: 100%; justify-content: center; padding: 0; }
  .board-panel.collapsed .chevron { transform: rotate(90deg); }
  .board-table { min-width: 620px; }
  .console-head { padding-top: calc(4px + env(safe-area-inset-top)); }
  .console-body { display: grid; grid-template-columns: minmax(0, 1fr) 320px; grid-template-rows: minmax(0, 1fr); }
  .console-stage { min-height: 0; height: 100%; }
  #console-canvas { width: 760px; min-width: 760px; height: 100%; }
  .console-stage-overlay { width: 760px; }
  .console-side {
    height: 100%;
    max-height: none;
    min-height: 0;
    border-top: 0;
    border-left: 1px solid var(--line-soft);
  }
  .modal { max-height: calc(100dvh - 12px); }
  .modal-body { padding: 10px 14px; }
  .menu-main { padding-top: 4px; }
  .hero h1 { margin: 5px 0 7px; }
  .hero-stats { grid-template-columns: repeat(4, 1fr); }
  .hero-stats div { border-bottom: 0; border-right: 1px solid var(--line-soft); }
  .hero-stats div:last-child { border-right: 0; }
  .hero-stats div:nth-child(2n) { border-right: 1px solid var(--line-soft); }
}
