/* ============================================================================
   Squad44 管理面板 v0.3 · 样式
   方向：正式、克制的指挥台。实色面板 + 发丝线分隔，不用毛玻璃和渐变光晕；
   深石墨侧栏、暖灰工作区，底下铺一层极淡的等高线地形（Squad44 是地图战，纹理本身有含义）。
   颜色：钢青色只给可操作的东西；黄铜只出现在品牌标记和“当前”指示；阵营用蓝（同盟国）/ 锈红（轴心国）编码，状态色只表达状态。
   动效：只动 transform / opacity；高频操作（导航）几乎不动，子页切换横向滑动，弹层从来处出现；
   系统“减弱动态效果”下全部静止。
   ========================================================================== */
:root {
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "HarmonyOS Sans SC", "MiSans", "Microsoft YaHei UI", "Microsoft YaHei", "Segoe UI", "Noto Sans SC", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, "Liberation Mono", monospace;
  --canvas: #ECEEEA; --surface: #FFFFFF; --surface-2: #F6F7F4; --surface-3: #E8EBE6;
  --line: #DFE2DC; --line-2: #C9CEC6;
  --text: #14181A; --text-2: #4A5357; --text-3: #7B8488;
  --tint: #1C6A87; --tint-2: #155872; --tint-rgb: 28,106,135; --tint-soft: rgba(28,106,135,.09); --on-tint: #fff;
  --brass: #A9782B; --brass-rgb: 169,120,43;
  --ok: #2E8656; --warn: #B8790F; --bad: #C23F36; --ok-rgb: 46,134,86; --warn-rgb: 184,121,15; --bad-rgb: 194,63,54;
  --allies: #3B76B2; --axis: #AE4F3B;
  --side: #14181A; --side-line: rgba(255,255,255,.07); --side-text: #C5CCCE; --side-dim: #7A8487; --side-hover: rgba(255,255,255,.045); --side-active: #252B2F;
  --topo: rgba(30,62,58,.055);
  --sh-1: 0 1px 0 rgba(20,24,26,.03), 0 1px 2px rgba(20,24,26,.05);
  --sh-2: 0 10px 28px -14px rgba(20,24,26,.28), 0 2px 6px -2px rgba(20,24,26,.08);
  --sh-3: 0 28px 70px -24px rgba(8,12,14,.45), 0 6px 18px -6px rgba(8,12,14,.16);
  --r-sm: 8px; --r: 12px; --r-lg: 16px;
  --ease: cubic-bezier(.23,1,.32,1); --ease-io: cubic-bezier(.65,0,.35,1); --drawer: cubic-bezier(.32,.72,0,1);
  --side-w: 232px; --top-h: 60px;
  /* 兼容旧页面里写死的变量名 */
  --primary: var(--tint); --primary-rgb: var(--tint-rgb); --accent: var(--brass); --card: var(--surface); --card-2: var(--surface-2);
  --bg: var(--canvas); --muted: var(--text-2); --subtle: var(--text-3); --line-strong: var(--line-2); --info: var(--tint);
  color-scheme: light;
}
html[data-theme="dark"] {
  --canvas: #0E1113; --surface: #15191C; --surface-2: #1A1F22; --surface-3: #22282C;
  --line: #262C30; --line-2: #343C41;
  --text: #E6EAEB; --text-2: #A2ACAF; --text-3: #6D777B;
  --tint: #4AA2C2; --tint-2: #6CB7D2; --tint-rgb: 74,162,194; --tint-soft: rgba(74,162,194,.13); --on-tint: #071318;
  --brass: #C99A4E; --brass-rgb: 201,154,78;
  --ok: #46AE76; --warn: #DDA03E; --bad: #E0625A; --ok-rgb: 70,174,118; --warn-rgb: 221,160,62; --bad-rgb: 224,98,90;
  --allies: #5D96D0; --axis: #CF6E58;
  --side: #0A0C0E; --side-active: #1D2226;
  --topo: rgba(170,200,190,.03);
  --sh-1: 0 1px 0 rgba(0,0,0,.25);
  --sh-2: 0 12px 30px -14px rgba(0,0,0,.7), 0 2px 6px rgba(0,0,0,.3);
  --sh-3: 0 30px 80px -24px rgba(0,0,0,.85), 0 6px 18px rgba(0,0,0,.4);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
#root { min-height: 100%; } /* v0.3.2：#root 没高度时，登录页 / 首页的 min-height:100% 失效，只显示到内容高度 */
body { font: 14px/1.55 var(--font); color: var(--text); background: var(--canvas); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
::selection { background: rgba(var(--tint-rgb), .22); }
a { color: var(--tint); text-decoration: none; text-underline-offset: 3px; }
a:hover { text-decoration: underline; }
code, .mono { font-family: var(--mono); font-size: 12.5px; }
.num, td.num, .tnum { font-variant-numeric: tabular-nums; }
td.num, th.num { text-align: right; }
:focus-visible { outline: 2px solid var(--tint); outline-offset: 2px; border-radius: 4px; }
button, input, select, textarea { font: inherit; color: inherit; }
button { -webkit-tap-highlight-color: transparent; }
* { scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 10px; border: 3px solid transparent; background-clip: content-box; }
.hidden { display: none !important; }
.muted { color: var(--text-2); } .subtle { color: var(--text-3); } .small { font-size: 12px; }
.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; } .row.nowrap { flex-wrap: nowrap; }
.grow { flex: 1; min-width: 0; } .right { margin-left: auto; } .nowrap { white-space: nowrap; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mt { margin-top: 14px; } .mb { margin-bottom: 14px; }
.ic { width: 18px; height: 18px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; vertical-align: -4px; }
.ic .f { fill: currentColor; stroke: none; }

/* ---------------------------------------------------------------- 启动 / 品牌 */
.boot { height: 100vh; height: 100dvh; display: grid; place-items: center; }
.brand-mark { width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; font-weight: 800; letter-spacing: -.02em; font-size: 15px;
  background: var(--brass); color: #1B1407; box-shadow: inset 0 0 0 1px rgba(255,255,255,.18), inset 0 -2px 0 rgba(0,0,0,.18); flex-shrink: 0; font-variant-numeric: tabular-nums; }
.boot .brand-mark { animation: s44breath 1.4s var(--ease-io) infinite alternate; }
@keyframes s44breath { to { opacity: .45; } }

/* ---------------------------------------------------------------- 外壳 */
.app { display: flex; height: 100vh; height: 100dvh; position: relative; isolation: isolate; }
.app::before { content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none; background-color: var(--topo);
  -webkit-mask: url(../img/topo.png) 0 0 / 820px repeat; mask: url(../img/topo.png) 0 0 / 820px repeat; }
.side { width: var(--side-w); flex-shrink: 0; height: 100%; background: var(--side); color: var(--side-text); display: flex; flex-direction: column; z-index: 30; position: relative; }
.side-brand { display: flex; align-items: center; gap: 11px; padding: 16px 16px 14px; }
.side-brand .t { font-weight: 650; font-size: 14.5px; color: #F1F3F3; line-height: 1.25; }
.side-brand .s { font-size: 11.5px; color: var(--side-dim); }
.nav { flex: 1; overflow-y: auto; padding: 4px 10px 10px; scrollbar-color: rgba(255,255,255,.12) transparent; }
.nav-group + .nav-group { margin-top: 14px; }
.nav-label { font-size: 11.5px; color: var(--side-dim); padding: 6px 10px 4px; }
.nav-item { display: flex; align-items: center; gap: 11px; height: 38px; padding: 0 10px; border-radius: 9px; color: var(--side-text); cursor: pointer; user-select: none;
  position: relative; font-size: 13.5px; transition: background-color .15s ease, color .15s ease; }
.nav-item:hover { background: var(--side-hover); color: #fff; }
.nav-item.active { background: var(--side-active); color: #fff; font-weight: 600; box-shadow: inset 0 0 0 1px rgba(255,255,255,.04); }
.nav-item.active .ic { color: var(--brass); }
.nav-item .ic { width: 19px; height: 19px; color: #96A1A4; }
.nav-item.locked { opacity: .42; }
.nav-badge { margin-left: auto; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--bad); color: #fff; font-size: 10.5px; font-weight: 700; display: grid; place-items: center; }
.side-foot { padding: 10px; border-top: 1px solid var(--side-line); }
.me { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 10px; cursor: pointer; }
.me:hover { background: var(--side-hover); }
.me .n { font-size: 13px; font-weight: 600; color: #EEF1F1; } .me .r { font-size: 11px; color: var(--side-dim); }
.me > .ic { margin-left: auto; color: var(--side-dim); }
.avatar { width: 32px; height: 32px; border-radius: 9px; background: #2A3236; color: #E6EAEB; display: grid; place-items: center; font-weight: 700; overflow: hidden; flex-shrink: 0; font-size: 13px; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.side.collapsed { width: 68px; }
.side.collapsed .side-brand { justify-content: center; padding-inline: 0; }
.side.collapsed .side-brand > div, .side.collapsed .nav-label, .side.collapsed .nav-item span, .side.collapsed .me > div, .side.collapsed .me > .ic { display: none; }
.side.collapsed .nav-item { justify-content: center; }
.side.collapsed .nav-badge { position: absolute; top: 4px; right: 8px; min-width: 8px; width: 8px; height: 8px; padding: 0; font-size: 0; }
.side.collapsed .me { justify-content: center; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; height: 100%; }
.top { height: var(--top-h); flex-shrink: 0; display: flex; align-items: center; gap: 14px; padding: 0 22px; background: var(--surface); border-bottom: 1px solid var(--line); position: relative; z-index: 20; }
.top-title { font-size: 18px; font-weight: 650; letter-spacing: -.015em; margin: 0; white-space: nowrap; }
.subnav { display: flex; gap: 2px; position: relative; align-self: stretch; align-items: stretch; overflow-x: auto; scrollbar-width: none; }
.subnav::-webkit-scrollbar { display: none; }
.subnav button { border: 0; background: none; padding: 0 12px; font-size: 13.5px; color: var(--text-2); cursor: pointer; white-space: nowrap; position: relative; font-weight: 500; }
.subnav button:hover { color: var(--text); }
.subnav button.on { color: var(--text); font-weight: 600; }
.subnav .ink { position: absolute; bottom: 0; left: 0; height: 2px; border-radius: 2px; background: var(--tint); transition: transform .32s var(--drawer), width .32s var(--drawer); pointer-events: none; }
.top-sep { width: 1px; height: 22px; background: var(--line); flex-shrink: 0; }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.icon-btn { width: 36px; height: 36px; border: 0; border-radius: 9px; background: none; cursor: pointer; display: grid; place-items: center; color: var(--text-2); position: relative; transition: background-color .15s ease, color .15s ease, transform .12s var(--ease); }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn:active { transform: scale(.94); }
.icon-btn .ic { width: 19px; height: 19px; }
.srv-pill { display: flex; align-items: center; gap: 9px; height: 36px; padding: 0 10px 0 11px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); cursor: pointer; max-width: 340px; transition: border-color .15s ease, background-color .15s ease; }
.srv-pill:hover { border-color: var(--line-2); background: var(--surface-2); }
.srv-pill .n { font-weight: 600; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.srv-pill .c { font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.srv-pill > .ic { width: 15px; height: 15px; color: var(--text-3); }
kbd, .kbd { font: 11px/1 var(--font); color: var(--text-3); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; padding: 3px 5px; background: var(--surface); white-space: nowrap; }
.search-btn { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 8px 0 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); color: var(--text-3); cursor: pointer; font-size: 13px; min-width: 170px; }
.search-btn:hover { border-color: var(--line-2); }
.search-btn kbd { margin-left: auto; }
.menu-btn { display: none !important; }

.content { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 20px 24px 40px; display: flex; flex-direction: column; position: relative; scroll-behavior: auto; }
.stage { position: relative; flex: 1 0 auto; display: flex; flex-direction: column; width: 100%; max-width: 1560px; margin: 0 auto; }
.view { flex: 1 0 auto; display: flex; flex-direction: column; min-width: 0; }
.view.fill { flex: 1 1 0; min-height: 0; }
.view > .fill { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.view.out { position: absolute; inset: 0 0 auto 0; pointer-events: none; }
.content.has-fill { overflow-y: hidden; }

/* ---------------------------------------------------------------- 横幅 */
.banner { display: flex; align-items: flex-start; gap: 10px; padding: 10px 14px; border-radius: var(--r-sm); margin-bottom: 12px; font-size: 13px; border: 1px solid var(--line); background: var(--surface); }
.banner > .ic { margin-top: 1px; color: var(--text-2); }
.banner.warn { border-color: rgba(var(--warn-rgb), .35); background: rgba(var(--warn-rgb), .07); } .banner.warn > .ic { color: var(--warn); }
.banner.bad { border-color: rgba(var(--bad-rgb), .35); background: rgba(var(--bad-rgb), .06); } .banner.bad > .ic { color: var(--bad); }
.banner.info { border-color: rgba(var(--tint-rgb), .28); background: var(--tint-soft); } .banner.info > .ic { color: var(--tint); }
.banner > div { flex: 1; min-width: 0; }

/* ---------------------------------------------------------------- 卡片 */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--sh-1); margin-bottom: 16px; position: relative; min-width: 0; }
.card-header { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; min-height: 50px; }
.card-title { margin: 0; font-size: 14.5px; font-weight: 650; display: flex; align-items: center; gap: 8px; }
.card-title .ic { color: var(--text-3); }
.card-body { padding: 16px; }
.card-body.flush { padding: 0; }
.card.fillcard { display: flex; flex-direction: column; min-height: 0; margin-bottom: 0; }
.card.fillcard > .card-body { flex: 1; min-height: 0; overflow: auto; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); margin-bottom: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--sh-1); overflow: hidden; }
.stat-card { padding: 14px 18px; display: flex; gap: 12px; align-items: center; border-right: 1px solid var(--line); min-width: 0; }
.stat-card:last-child { border-right: 0; }
.stat-icon { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: var(--surface-2); color: var(--text-2); flex-shrink: 0; }
.stat-icon.brass { color: var(--brass); }
.stat-label { font-size: 12px; color: var(--text-3); } .stat-value { font-size: 21px; font-weight: 650; line-height: 1.2; font-variant-numeric: tabular-nums; }
.grid2 { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 16px; } .grid3 { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }

/* ---------------------------------------------------------------- 按钮 / 表单 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: 9px; border: 1px solid var(--line-2); background: var(--surface); cursor: pointer;
  font-size: 13px; font-weight: 600; white-space: nowrap; color: var(--text); transition: transform .12s var(--ease), background-color .15s ease, border-color .15s ease, color .15s ease; text-decoration: none !important; }
.btn:hover { background: var(--surface-2); }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn .ic { width: 16px; height: 16px; }
.btn-primary { background: var(--tint); border-color: var(--tint); color: var(--on-tint); box-shadow: inset 0 1px 0 rgba(255,255,255,.12); }
.btn-primary:hover { background: var(--tint-2); border-color: var(--tint-2); }
.btn-accent { background: var(--brass); border-color: var(--brass); color: #1B1407; }
.btn-danger { color: var(--bad); border-color: rgba(var(--bad-rgb), .35); } .btn-danger:hover { background: rgba(var(--bad-rgb), .07); }
.btn-danger.solid { background: var(--bad); color: #fff; border-color: var(--bad); }
.btn-ghost { border-color: transparent; background: none; } .btn-ghost:hover { background: var(--surface-2); }
.btn-sm { height: 30px; padding: 0 11px; font-size: 12.5px; border-radius: 8px; } .btn-xs { height: 26px; padding: 0 9px; font-size: 12px; border-radius: 7px; }
.btn-icon { width: 34px; padding: 0; } .btn-sm.btn-icon { width: 30px; } .btn-xs.btn-icon { width: 26px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px 16px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; } .field.full { grid-column: 1 / -1; }
.field > label { font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.field .help { font-size: 11.5px; color: var(--text-3); line-height: 1.5; }
.form-input, select.form-input, textarea.form-input { height: 36px; padding: 0 11px; border: 1px solid var(--line-2); border-radius: 9px; background: var(--surface); outline: none; width: 100%;
  transition: border-color .15s ease, box-shadow .15s ease; min-width: 0; }
select.form-input { appearance: none; -webkit-appearance: none; padding-right: 30px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237B8488' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 8px center; background-size: 16px; }
textarea.form-input { height: auto; min-height: 84px; padding: 9px 11px; resize: vertical; line-height: 1.55; }
.form-input::placeholder { color: var(--text-3); }
.form-input:focus { border-color: var(--tint); box-shadow: 0 0 0 3px rgba(var(--tint-rgb), .16); }
.form-check { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; font-size: 13px; }
.form-check input { accent-color: var(--tint); width: 15px; height: 15px; margin: 0; }
.field-switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 42px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); cursor: pointer; font-size: 13px; }
.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.toolbar .form-input { width: auto; min-width: 150px; height: 32px; }
.search { position: relative; display: inline-flex; align-items: center; }
.search > .ic { position: absolute; left: 10px; width: 16px; height: 16px; color: var(--text-3); pointer-events: none; }
.search > .form-input { padding-left: 32px; }
.switch { position: relative; width: 42px; height: 24px; display: inline-block; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch span { position: absolute; inset: 0; border-radius: 24px; background: var(--line-2); cursor: pointer; transition: background-color .22s var(--ease); }
.switch span::before { content: ''; position: absolute; width: 20px; height: 20px; left: 2px; top: 2px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .26s var(--drawer); }
.switch input:checked + span { background: var(--ok); } .switch input:checked + span::before { transform: translateX(18px); }
.switch input:focus-visible + span { outline: 2px solid var(--tint); outline-offset: 2px; }

/* 分段控件（页内视图切换；导航用顶栏下划线标签，二者层级分开） */
.seg, .page-tabs { display: inline-flex; position: relative; padding: 3px; background: var(--surface-3); border-radius: 10px; max-width: 100%; overflow-x: auto; scrollbar-width: none; flex-shrink: 0; vertical-align: middle; }
.seg::-webkit-scrollbar, .page-tabs::-webkit-scrollbar { display: none; }
.seg > button, .page-tab { position: relative; z-index: 1; border: 0; background: none; height: 28px; padding: 0 13px; border-radius: 7px; cursor: pointer; font-size: 13px; font-weight: 500; color: var(--text-2); white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; transition: color .2s ease; flex-shrink: 0; }
.seg > button:hover, .page-tab:hover { color: var(--text); }
.seg > button.on, .page-tab.active { color: var(--text); font-weight: 600; }
.seg > button .ic, .page-tab .ic { width: 15px; height: 15px; }
.seg-thumb { position: absolute; z-index: 0; top: 3px; bottom: 3px; left: 0; border-radius: 7px; background: var(--surface); box-shadow: 0 1px 2px rgba(0,0,0,.08), 0 0 0 .5px rgba(0,0,0,.04); transition: transform .3s var(--drawer), width .3s var(--drawer); }
html[data-theme="dark"] .seg-thumb { background: #2E363A; }
.card > .page-tabs, .card > .seg { margin: 12px 16px 0; display: flex; width: max-content; }
.seg.sm > button { height: 24px; padding: 0 9px; font-size: 12px; }

/* ---------------------------------------------------------------- 表格 / 徽标 */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.table th { text-align: left; font-weight: 500; font-size: 12px; color: var(--text-3); padding: 9px 14px; background: var(--surface-2); border-bottom: 1px solid var(--line); white-space: nowrap; position: sticky; top: 0; z-index: 1; }
.table td { padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr:hover { background: var(--surface-2); }
.table tbody tr:last-child td { border-bottom: 0; }
.table tr.dim td { opacity: .5; }
/* v0.3.2：.table th 的左对齐会盖掉 th.num 的右对齐（同优先级、写在后面），数字列表头和数据错位 */
.table th.num, .table td.num { text-align: right; }
.table th.rk, .table td.rk { width: 64px; padding-right: 18px; white-space: nowrap; }
.pcell { display: flex; align-items: center; gap: 10px; min-width: 0; }
.pcell .av { width: 30px; height: 30px; border-radius: 8px; background: var(--surface-2); color: var(--text-2); display: grid; place-items: center; font-weight: 700; font-size: 12px; flex-shrink: 0; border: 1px solid var(--line); }
.pcell .nm { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pcell .sid { font-family: var(--mono); font-size: 11.5px; color: var(--text-3); }
.pcell .dot-on { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); display: inline-block; margin-left: 6px; vertical-align: 1px; }
.badge { display: inline-flex; align-items: center; gap: 4px; height: 21px; padding: 0 7px; border-radius: 6px; font-size: 11.5px; font-weight: 600; white-space: nowrap; background: var(--surface-3); color: var(--text-2); vertical-align: middle; line-height: 1; }
.badge-success, .badge.ok { color: var(--ok); background: rgba(var(--ok-rgb), .11); }
.badge-danger, .badge.bad { color: var(--bad); background: rgba(var(--bad-rgb), .1); }
.badge-warning, .badge.warn { color: var(--warn); background: rgba(var(--warn-rgb), .12); }
.badge-info, .badge.info { color: var(--tint); background: var(--tint-soft); }
.badge.allies { color: var(--allies); background: rgba(59,118,178,.12); } .badge.axis { color: var(--axis); background: rgba(174,79,59,.12); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: var(--text-3); flex-shrink: 0; }
.dot.ok { background: var(--ok); box-shadow: 0 0 0 3px rgba(var(--ok-rgb), .16); } .dot.bad { background: var(--bad); } .dot.warn { background: var(--warn); }
.dot.live { background: var(--ok); animation: s44live 2.4s var(--ease-io) infinite; }
@keyframes s44live { 0%, 100% { box-shadow: 0 0 0 0 rgba(var(--ok-rgb), .45); } 50% { box-shadow: 0 0 0 4px rgba(var(--ok-rgb), 0); } }
.chip { display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 11px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); font-size: 12.5px; color: var(--text-2); cursor: pointer; white-space: nowrap; }
.chip.on { border-color: var(--tint); color: var(--tint); background: var(--tint-soft); font-weight: 600; }
.empty { padding: 40px 20px; text-align: center; color: var(--text-3); font-size: 13px; }
.empty > .ic { display: block; width: 28px; height: 28px; margin: 0 auto 10px; color: var(--line-2); stroke-width: 1.5; }
.empty .btn { margin-top: 12px; }
.loading { padding: 40px; text-align: center; color: var(--text-3); }
.spin { display: inline-block; width: 18px; height: 18px; border: 2px solid var(--line); border-top-color: var(--tint); border-radius: 50%; animation: s44spin .7s linear infinite; vertical-align: middle; }
@keyframes s44spin { to { transform: rotate(360deg); } }
.skel { display: grid; gap: 10px; padding: 16px; }
.skel i { display: block; height: 12px; border-radius: 6px; background: linear-gradient(90deg, var(--surface-3) 0 40%, var(--surface-2) 50%, var(--surface-3) 60% 100%); background-size: 300% 100%; animation: s44skel 1.4s linear infinite; }
.skel i:nth-child(3n+2) { width: 82%; } .skel i:nth-child(3n) { width: 64%; }
@keyframes s44skel { from { background-position: 100% 0; } to { background-position: 0 0; } }
.pager { display: flex; align-items: center; gap: 8px; justify-content: flex-end; padding: 10px 16px; font-size: 12.5px; color: var(--text-2); border-top: 1px solid var(--line); }
.kv { display: grid; grid-template-columns: 116px minmax(0,1fr); gap: 7px 14px; font-size: 13px; } .kv > :nth-child(odd) { color: var(--text-3); } .kv > * { min-width: 0; overflow-wrap: anywhere; }
pre.out { margin: 0; padding: 11px 13px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-sm); font: 12px/1.55 var(--mono); white-space: pre-wrap; word-break: break-all; max-height: 360px; overflow: auto; }
.prow { display: flex; align-items: center; gap: 9px; padding: 7px 14px; font-size: 13px; cursor: pointer; min-height: 36px; }
.prow:hover { background: var(--surface-2); }
.prow .pname { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; box-shadow: var(--sh-1); }
.li { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); min-height: 54px; }
.li:last-child { border-bottom: 0; }
.li.click { cursor: pointer; } .li.click:hover { background: var(--surface-2); }
.li .t { font-weight: 600; font-size: 13.5px; } .li .d { font-size: 12px; color: var(--text-3); }
.tile-ic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-3); color: var(--text-2); flex-shrink: 0; }
.tile-ic.tint { background: var(--tint-soft); color: var(--tint); } .tile-ic.brass { background: rgba(var(--brass-rgb), .13); color: var(--brass); }
.server-item { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; margin-bottom: 8px; transition: border-color .15s ease, background-color .15s ease; }
.server-item.active { border-color: var(--tint); background: var(--tint-soft); }
.server-item:hover { border-color: var(--line-2); }
.bar { height: 6px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 3px; background: var(--tint); transition: width .5s var(--ease); }

/* ---------------------------------------------------------------- 弹窗 / 底部弹层 / 菜单 / 提示 */
.modal-overlay { position: fixed; inset: 0; background: rgba(10,14,16,.42); display: flex; align-items: center; justify-content: center; z-index: 100; padding: 24px; }
.modal { background: var(--surface); border-radius: var(--r-lg); width: 100%; max-width: 560px; max-height: calc(100dvh - 48px); display: flex; flex-direction: column; box-shadow: var(--sh-3); border: 1px solid var(--line); position: relative; }
.modal.wide { max-width: 880px; } .modal.xwide { max-width: 1120px; }
.modal-grab { display: none; }
.modal-head { display: flex; align-items: center; gap: 10px; padding: 15px 18px 13px; border-bottom: 1px solid var(--line); }
.modal-title { margin: 0; font-size: 15.5px; font-weight: 650; flex: 1; display: flex; align-items: center; gap: 8px; min-width: 0; }
.modal-title .ic { color: var(--text-3); }
.modal-close { width: 30px; height: 30px; border: 0; border-radius: 8px; background: none; cursor: pointer; color: var(--text-3); display: grid; place-items: center; }
.modal-close:hover { background: var(--surface-2); color: var(--text); }
.modal-body { padding: 18px; overflow-y: auto; overscroll-behavior: contain; }
.modal-footer { display: flex; gap: 8px; justify-content: flex-end; padding: 12px 18px; border-top: 1px solid var(--line); }
.dropdown { position: fixed; z-index: 120; min-width: 210px; max-width: 300px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--sh-3); padding: 5px; }
.dropdown .dd-head { padding: 8px 10px 8px; border-bottom: 1px solid var(--line); margin: 0 0 4px; }
.dropdown .dd-head b { display: block; font-size: 13.5px; } .dropdown .dd-head span { font-size: 11.5px; color: var(--text-3); }
.dropdown button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; background: none; border-radius: 8px; cursor: pointer; text-align: left; font-size: 13px; color: var(--text); }
.dropdown button .ic { width: 16px; height: 16px; color: var(--text-3); }
.dropdown button:hover { background: var(--surface-2); }
.dropdown button.danger, .dropdown button.danger .ic { color: var(--bad); }
.dropdown hr { border: 0; border-top: 1px solid var(--line); margin: 4px 0; }
.toast-stack { position: fixed; right: 20px; bottom: 20px; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; z-index: 200; max-width: min(420px, calc(100vw - 32px)); pointer-events: none; }
.toast { display: flex; gap: 10px; align-items: flex-start; padding: 10px 14px; background: #1E2427; color: #EEF1F1; border-radius: 11px; box-shadow: var(--sh-2); font-size: 13px; pointer-events: auto; line-height: 1.5; }
html[data-theme="dark"] .toast { background: #2A3236; }
.toast .ic { width: 17px; height: 17px; margin-top: 1px; color: #9FB4BA; }
.toast.ok .ic { color: #5FC48C; } .toast.bad .ic { color: #F07A70; } .toast.warn .ic { color: #E9B455; }
.tips { margin: 0; padding-left: 18px; font-size: 13px; line-height: 1.75; color: var(--text-2); }

/* ---------------------------------------------------------------- 引导 / 命令面板 */
.tour { overflow: hidden; }
.tour-track { display: flex; transition: transform .45s var(--drawer); touch-action: pan-y; }
.tour-slide { flex: 0 0 100%; min-width: 0; }
.tour-art { height: 176px; border-radius: 12px; background: #15191B; position: relative; overflow: hidden; margin-bottom: 18px; display: grid; place-items: center; color: #D8DEE0; }
.tour-art::before { content: ''; position: absolute; inset: 0; background-color: rgba(201,154,78,.28); -webkit-mask: url(../img/topo.png) 0 0 / 560px repeat; mask: url(../img/topo.png) 0 0 / 560px repeat; }
.tour-art > * { position: relative; }
.tour-slide h3 { margin: 0 0 6px; font-size: 18px; letter-spacing: -.015em; } .tour-slide p { margin: 0; color: var(--text-2); line-height: 1.75; font-size: 13.5px; }
.tour-dots { display: flex; gap: 6px; } .tour-dots i { width: 6px; height: 6px; border-radius: 3px; background: var(--line-2); transition: width .3s var(--drawer), background-color .3s ease; }
.tour-dots i.on { width: 18px; background: var(--tint); }
.mock { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: center; padding: 0 16px; }
.mock .mp { height: 32px; padding: 0 12px; border-radius: 9px; background: #232A2E; border: 1px solid rgba(255,255,255,.1); display: flex; align-items: center; gap: 8px; font-size: 12.5px; }
.mock .mp.hl { border-color: rgba(201,154,78,.7); box-shadow: 0 0 0 3px rgba(201,154,78,.18); }
.palette .modal-body { padding: 0; }
.palette .pin { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; height: 52px; padding: 0 18px; font-size: 15px; box-shadow: none !important; }
.palette .pl { max-height: 52vh; overflow: auto; padding: 6px; }
.palette .pi { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 9px; cursor: pointer; font-size: 13.5px; }
.palette .pi .ic { color: var(--text-3); } .palette .pi .h { margin-left: auto; font-size: 12px; color: var(--text-3); }
.palette .pi.on { background: var(--tint-soft); } .palette .pi.on .ic { color: var(--tint); }
.palette .pg { font-size: 11.5px; color: var(--text-3); padding: 8px 12px 4px; }

/* ---------------------------------------------------------------- 概览 */
.readout { display: flex; align-items: stretch; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--sh-1); margin-bottom: 16px; overflow-x: auto; }
.readout > div { padding: 13px 22px; border-right: 1px solid var(--line); min-width: 128px; flex: 1; }
.readout > div:last-child { border-right: 0; }
.readout .l { font-size: 12px; color: var(--text-3); } .readout .v { font-size: 24px; font-weight: 650; font-variant-numeric: tabular-nums; letter-spacing: -.02em; line-height: 1.3; }
.readout .v small { font-size: 13px; color: var(--text-3); font-weight: 500; letter-spacing: 0; }
.rail-wrap { position: relative; margin-bottom: 16px; }
.rail-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.rail-head h3 { margin: 0; font-size: 14px; font-weight: 650; }
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(290px, calc((100% - 28px) / 3)); gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 2px 2px 6px; margin: -2px; scrollbar-width: none; overscroll-behavior-x: contain; scroll-behavior: smooth; }
.rail::-webkit-scrollbar { display: none; }
.rail > * { scroll-snap-align: start; }
.srv-tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 15px 16px; cursor: pointer; box-shadow: var(--sh-1); transition: border-color .15s ease, transform .15s var(--ease); min-width: 0; }
.srv-tile:hover { border-color: var(--line-2); }
.srv-tile:active { transform: scale(.99); }
.srv-tile.cur { border-color: rgba(var(--brass-rgb), .65); }
.srv-tile .nm { font-weight: 650; font-size: 14.5px; display: flex; align-items: center; gap: 8px; }
.srv-tile .mp { font-size: 12.5px; color: var(--text-2); margin-top: 3px; }
.srv-tile .cap { display: flex; justify-content: space-between; align-items: baseline; font-size: 12px; color: var(--text-3); margin: 12px 0 6px; font-variant-numeric: tabular-nums; }
.srv-tile .cap b { color: var(--text); font-size: 16px; }
.srv-tile .al { font-size: 12px; color: var(--warn); margin-top: 9px; display: flex; gap: 6px; align-items: flex-start; }
.dash { display: grid; grid-template-columns: minmax(0,1.3fr) minmax(0,1fr) minmax(250px,.78fr); gap: 16px; align-items: start; }
.dash .card { margin-bottom: 0; }
.dash .card-body.scroll { max-height: 360px; overflow-y: auto; }
.todo { display: flex; gap: 10px; align-items: flex-start; padding: 11px 16px; border-bottom: 1px solid var(--line); font-size: 13px; }
.todo:last-child { border-bottom: 0; }
.todo .w { font-size: 11.5px; color: var(--text-3); white-space: nowrap; margin-left: auto; padding-left: 10px; }
.qa { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 14px; }
.qa button { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); cursor: pointer; text-align: left; font-size: 13px; font-weight: 600; transition: background-color .15s ease, border-color .15s ease, transform .12s var(--ease); }
.qa button:hover { background: var(--surface-2); border-color: var(--line-2); } .qa button:active { transform: scale(.98); }
.qa button .ic { color: var(--tint); }
.heat { display: grid; grid-template-columns: 34px repeat(24, minmax(0, 1fr)); gap: 3px; font-size: 10.5px; }
.heat div { height: 20px; border-radius: 4px; display: grid; place-items: center; color: var(--text-3); font-variant-numeric: tabular-nums; }
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--text-2); margin-bottom: 8px; } .legend i { width: 10px; height: 3px; border-radius: 2px; display: inline-block; margin-right: 6px; vertical-align: middle; }

/* ---------------------------------------------------------------- 实时管理 */
.ol { display: flex; flex-direction: column; gap: 12px; min-height: 0; flex: 1; }
.matchbar { display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); align-items: center; gap: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 13px 18px; box-shadow: var(--sh-1); }
.matchbar .map { font-size: 17px; font-weight: 650; letter-spacing: -.015em; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.matchbar .sub { font-size: 12.5px; color: var(--text-3); margin-top: 2px; }
.score { display: flex; align-items: center; gap: 14px; }
.score .sc-side { display: flex; flex-direction: column; align-items: flex-end; min-width: 0; }
.score .sc-side.r { align-items: flex-start; }
.score .fn { font-size: 13px; font-weight: 600; white-space: nowrap; } .score .fu { font-size: 11.5px; color: var(--text-3); white-space: nowrap; }
.score .tk { font-size: 30px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.03em; line-height: 1; min-width: 56px; text-align: center; }
.score .vs { width: 1px; height: 34px; background: var(--line); }
.matchbar .meta { display: flex; justify-content: flex-end; gap: 6px; flex-wrap: wrap; align-items: center; }
.olbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.olbar .search .form-input { width: 230px; height: 34px; }
.olgrid { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0,1fr) 340px; gap: 12px; }
.teams { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); grid-template-rows: minmax(0,1fr); gap: 12px; min-height: 0; }
.teams.single { grid-template-columns: minmax(0,1fr); }
.team { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); display: flex; flex-direction: column; min-height: 0; overflow: hidden; box-shadow: var(--sh-1); }
.team-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px 10px; border-bottom: 1px solid var(--line); position: relative; flex-wrap: wrap; }
.team-head::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--fc, var(--text-3)); }
.team-head .fn { font-weight: 650; font-size: 14px; } .team-head .fu { font-size: 12px; color: var(--text-3); }
.team-head .n { margin-left: auto; font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.team-body { flex: 1; min-height: 0; overflow-y: auto; padding-bottom: 6px; }
.squad + .squad { border-top: 1px solid var(--line); }
.sq-head { display: flex; align-items: center; gap: 8px; padding: 9px 14px 4px; font-size: 12px; color: var(--text-3); }
.sq-no { min-width: 20px; height: 20px; padding: 0 5px; border-radius: 6px; background: var(--surface-3); color: var(--text); display: grid; place-items: center; font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; }
.sq-head .sn { color: var(--text); font-weight: 650; font-size: 12.5px; letter-spacing: .02em; }
.pr { display: flex; align-items: center; gap: 9px; padding: 0 14px; height: 34px; font-size: 13px; cursor: pointer; transition: background-color .1s ease; }
.pr:hover, .pr:focus-visible { background: var(--surface-2); outline: none; }
.pr .role { width: 16px; height: 16px; color: var(--text-3); }
.pr .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pr .sl { color: var(--brass); width: 14px; height: 14px; }
.pr .kd { font-variant-numeric: tabular-nums; font-size: 12px; color: var(--text-2); min-width: 40px; text-align: right; }
.pr.dead .nm { color: var(--text-3); } .pr.down .nm { color: var(--warn); }
.pr .st { width: 15px; height: 15px; color: var(--text-3); } .pr.down .st { color: var(--warn); }
.pr .src { font-size: 10.5px; color: var(--text-3); border: 1px dashed var(--line-2); border-radius: 4px; padding: 0 4px; white-space: nowrap; }
.events { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); display: flex; flex-direction: column; min-height: 0; overflow: hidden; box-shadow: var(--sh-1); }
.ev-head { display: flex; align-items: center; gap: 8px; padding: 9px 10px 9px 14px; border-bottom: 1px solid var(--line); }
.ev-head b { font-size: 13.5px; }
.ev-tools { display: flex; flex-direction: column; gap: 6px; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.ev-tools .seg { width: 100%; } .ev-tools .seg > button { flex: 1; padding: 0 4px; }
.ev-tools .form-input { height: 30px; }
.ev-list { flex: 1; min-height: 0; overflow-y: auto; font-size: 12.5px; position: relative; }
.ev { display: grid; grid-template-columns: 52px minmax(0,1fr); gap: 8px; padding: 6px 12px; border-bottom: 1px solid var(--line); line-height: 1.5; word-break: break-word; }
.ev .t { color: var(--text-3); font-variant-numeric: tabular-nums; font-size: 11.5px; padding-top: 1px; }
.ev .k { font-size: 11px; font-weight: 600; color: var(--text-3); margin-right: 6px; }
.ev.tk, .ev.call { background: rgba(var(--bad-rgb), .05); } .ev.tk .k, .ev.call .k { color: var(--bad); }
.ev.join .k { color: var(--ok); } .ev.flight .k { color: var(--warn); } .ev.chat.admin .k { color: var(--tint); }
.ev-new { position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%); box-shadow: var(--sh-2); }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(390px, 100vw); z-index: 90; padding: 12px; display: flex; }
.drawer > .events { flex: 1; box-shadow: var(--sh-3); }
.team-tabs { display: none !important; }
.unk { margin-top: 12px; }
.unk .pr { display: inline-flex; width: 100%; }
.unk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }

/* ---------------------------------------------------------------- 投票 */
.vote-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.1fr); gap: 16px; align-items: start; }
.vote-live .q { font-size: 18px; font-weight: 650; letter-spacing: -.015em; margin: 0 0 4px; }
.vote-opt { margin-top: 14px; }
.vote-opt .h { display: flex; justify-content: space-between; font-size: 13.5px; margin-bottom: 6px; gap: 10px; }
.vote-opt .h b { font-variant-numeric: tabular-nums; }
.vote-opt .bar { height: 10px; border-radius: 5px; }
.vote-opt.win .bar > i { background: var(--ok); }
.count { font-size: 28px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.02em; line-height: 1.1; }
.opt-row { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.opt-row .n { width: 26px; height: 26px; border-radius: 7px; background: var(--surface-3); display: grid; place-items: center; font-size: 12px; font-weight: 700; flex-shrink: 0; font-variant-numeric: tabular-nums; }
.preview { background: #1A1F22; color: #F2D14B; border-radius: 9px; padding: 10px 13px; font-size: 13px; line-height: 1.6; text-shadow: 0 1px 0 rgba(0,0,0,.6); }

/* ---------------------------------------------------------------- 地图 */
.timeline { display: grid; gap: 5px; }
.tl-row { display: grid; grid-template-columns: 38px minmax(0,1fr); gap: 8px; align-items: center; }
.tl-row > span { font-size: 12px; color: var(--text-3); }
.tl-row.today > span { color: var(--text); font-weight: 600; }
.tl-track { position: relative; height: 26px; background-color: var(--surface-2); border-radius: 6px; background-image: linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: calc(100% / 24) 100%; }
.tl-seg { position: absolute; top: 3px; bottom: 3px; border-radius: 5px; background: rgba(var(--tint-rgb), .16); border: 1px solid rgba(var(--tint-rgb), .45); font-size: 11px; padding: 0 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text); line-height: 18px; cursor: pointer; }
.tl-seg.hard { background: rgba(var(--warn-rgb), .16); border-color: rgba(var(--warn-rgb), .5); }
.tl-seg.act { box-shadow: 0 0 0 2px rgba(var(--brass-rgb), .5); }
.tl-now { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--bad); border-radius: 1px; z-index: 2; }
.tl-axis { display: grid; grid-template-columns: 38px minmax(0,1fr); gap: 8px; } .tl-axis div { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.md { display: grid; grid-template-columns: 250px minmax(0,1fr); min-height: 0; flex: 1; }
.md-list { border-right: 1px solid var(--line); overflow-y: auto; min-height: 0; }
.md-item { display: flex; align-items: center; gap: 10px; padding: 10px 14px; cursor: pointer; font-size: 13px; border-bottom: 1px solid var(--line); }
.md-item:hover { background: var(--surface-2); } .md-item.on { background: var(--tint-soft); color: var(--tint); font-weight: 600; }
.md-item .c { margin-left: auto; font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.md-body { overflow-y: auto; min-height: 0; }
.pool-card .layers { display: grid; gap: 1px; font-size: 12.5px; }
.pool-card .layers div { display: flex; gap: 8px; padding: 3px 0; } .pool-card .layers span:first-child { color: var(--text-3); width: 18px; text-align: right; font-variant-numeric: tabular-nums; flex-shrink: 0; }
.picker { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 12px; }
.picker > div { border: 1px solid var(--line); border-radius: 10px; max-height: 44vh; overflow: auto; }
.picker .ph { position: sticky; top: 0; background: var(--surface-2); font-size: 12px; color: var(--text-3); padding: 7px 14px; border-bottom: 1px solid var(--line); z-index: 1; }

/* ---------------------------------------------------------------- 插件 */
.prow-plugin { display: grid; grid-template-columns: 36px minmax(0,1fr) auto auto; gap: 14px; align-items: center; padding: 13px 16px; border-bottom: 1px solid var(--line); cursor: pointer; transition: background-color .12s ease; }
.prow-plugin:hover { background: var(--surface-2); }
.prow-plugin:last-child { border-bottom: 0; }
.prow-plugin .t { font-weight: 650; font-size: 13.5px; display: flex; align-items: center; gap: 8px; }
.prow-plugin .d { font-size: 12px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prow-plugin .h { font-size: 12px; color: var(--text-2); margin-top: 3px; display: flex; gap: 12px; flex-wrap: wrap; }
.prow-plugin .h b { font-weight: 600; font-variant-numeric: tabular-nums; }
.feat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; display: flex; flex-direction: column; gap: 10px; min-height: 200px; box-shadow: var(--sh-1); }
.feat .d { font-size: 12.5px; color: var(--text-2); line-height: 1.65; flex: 1; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------------------------------------------------------------- 实时态势 */
.live-board { position: relative; width: 100%; aspect-ratio: 1 / 1; max-height: 72vh; background: #13181A; border-radius: 10px; overflow: hidden; }
.live-board::before { content: ''; position: absolute; inset: 0; background-color: rgba(201,154,78,.13); -webkit-mask: url(../img/topo.png) 0 0 / 600px repeat; mask: url(../img/topo.png) 0 0 / 600px repeat; }
.live-board canvas { width: 100%; height: 100%; display: block; position: relative; }
.live-tip { position: absolute; pointer-events: none; padding: 5px 9px; font-size: 12px; background: #20272A; color: #EEF1F1; border-radius: 7px; white-space: nowrap; z-index: 2; }

/* ---------------------------------------------------------------- 首页 / 登录 */
.pub { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; background: var(--canvas); }
.pub-top { display: flex; align-items: center; gap: 10px; padding: 16px 32px; position: absolute; left: 0; right: 0; top: 0; z-index: 2; color: #EEF1F1; }
.pub-top .t { font-weight: 650; font-size: 15px; }
.pub-top .btn-ghost { color: #D9DFE0; } .pub-top .btn-ghost:hover { background: rgba(255,255,255,.08); }
.hero { position: relative; background: #13171A; color: #E9EDEE; padding: 128px 32px 84px; overflow: hidden; }
.hero::before { content: ''; position: absolute; inset: 0; background-color: rgba(201,154,78,.34); -webkit-mask: url(../img/topo.png) 0 0 / 820px repeat; mask: url(../img/topo.png) 0 0 / 820px repeat; }
.hero::after { content: ''; position: absolute; inset: 0; background: radial-gradient(110% 100% at 80% 0%, transparent 0, rgba(19,23,26,.5) 50%, #13171A 100%); }
.hero > div { position: relative; z-index: 1; max-width: 1160px; margin: 0 auto; }
.hero h1 { font-size: clamp(32px, 4.8vw, 54px); line-height: 1.08; margin: 0 0 14px; letter-spacing: -.035em; font-weight: 700; max-width: 13em; }
.hero p { font-size: 15.5px; color: #A9B4B7; max-width: 34em; margin: 0 0 28px; line-height: 1.75; }
.hero .grid-ref { font-size: 12px; color: #8E989B; font-variant-numeric: tabular-nums; margin-bottom: 18px; display: flex; gap: 16px; }
.hero .btn { height: 42px; padding: 0 18px; font-size: 14px; }
.hero .btn-ghost { color: #DDE3E4; border-color: rgba(255,255,255,.18); } .hero .btn-ghost:hover { background: rgba(255,255,255,.07); }
.pub-body { max-width: 1160px; width: 100%; margin: -40px auto 0; padding: 0 32px 36px; position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0,1.45fr) minmax(0,1fr); gap: 16px; flex: 1; align-content: start; }
.pub-foot { padding: 16px 32px 24px; font-size: 12px; color: var(--text-3); display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; align-items: center; }
.pub-foot a { color: var(--text-3); display: inline-flex; align-items: center; gap: 5px; } .pub-foot a:hover { color: var(--text-2); }
.pub-foot .ic { width: 15px; height: 15px; }
.auth { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: minmax(0,1.05fr) minmax(0,1fr); }
.auth-art { position: relative; background: #13171A; color: #E9EDEE; padding: 36px 48px; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; }
.auth-art::before { content: ''; position: absolute; inset: 0; background-color: rgba(201,154,78,.3); -webkit-mask: url(../img/topo.png) 0 0 / 760px repeat; mask: url(../img/topo.png) 0 0 / 760px repeat; }
.auth-art::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(19,23,26,.15), rgba(19,23,26,.9)); }
.auth-art > * { position: relative; z-index: 1; }
.auth-art h2 { font-size: 30px; letter-spacing: -.03em; margin: 0 0 10px; line-height: 1.2; } .auth-art p { color: #A3AEB1; margin: 0; max-width: 30em; line-height: 1.75; }
.auth-main { display: flex; flex-direction: column; padding: 32px; }
.auth-card { width: 100%; max-width: 360px; margin: auto; }
.auth-card h1 { margin: 0 0 4px; font-size: 24px; letter-spacing: -.02em; }
.auth-card .form-input { height: 42px; } .auth-card .btn { height: 42px; width: 100%; font-size: 14px; }
.auth-card .form-grid { grid-template-columns: 1fr; gap: 12px; }

/* ---------------------------------------------------------------- 移动端 */
.dock { display: none; }
.side-mask { display: none; }
@media (max-width: 1280px) {
  .olgrid { grid-template-columns: minmax(0,1fr); }
  .olgrid > .events { display: none; }
  .dash { grid-template-columns: minmax(0,1fr) minmax(0,1fr); } .dash > :last-child { grid-column: 1 / -1; }
  .rail { grid-auto-columns: minmax(280px, calc((100% - 14px) / 2)); }
}
@media (min-width: 1281px) { .ev-toggle { display: none !important; } }
@media (max-width: 960px) {
  .side { position: fixed; left: 0; top: 0; bottom: 0; width: 268px !important; transform: translateX(-100%); transition: transform .34s var(--drawer); box-shadow: var(--sh-3); }
  .side.show { transform: none; }
  .side.collapsed .side-brand > div, .side.collapsed .nav-label, .side.collapsed .nav-item span, .side.collapsed .me > div, .side.collapsed .me > .ic { display: revert; }
  .side.collapsed .nav-item { justify-content: flex-start; }
  .side-mask.show { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.42); z-index: 25; }
  .menu-btn { display: grid !important; }
  .top { padding: 0 10px; gap: 8px; height: auto; min-height: 56px; flex-wrap: wrap; padding-top: env(safe-area-inset-top); }
  .top-title { font-size: 17px; }
  .top .subnav { order: 9; flex-basis: calc(100% + 20px); height: 42px; margin: 0 -10px; padding: 0 6px; border-top: 1px solid var(--line); }
  .top-sep, .hide-m { display: none !important; }
  .content { padding: 14px 12px calc(84px + env(safe-area-inset-bottom)); }
  .content.has-fill { overflow-y: auto; }
  .view.fill { flex: 1 0 auto; min-height: auto; }
  .grid2, .grid3, .dash, .pub-body, .picker, .vote-grid { grid-template-columns: 1fr; }
  .auth { grid-template-columns: 1fr; } .auth-art { display: none; }
  .dock { display: flex; position: fixed; left: 0; right: 0; bottom: 0; height: calc(60px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: var(--surface); border-top: 1px solid var(--line); z-index: 40; transition: transform .28s var(--drawer); }
  .dock button { flex: 1; border: 0; background: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 10.5px; color: var(--text-3); cursor: pointer; }
  .dock button .ic { width: 22px; height: 22px; }
  .dock button.on { color: var(--tint); }
  .srv-pill { max-width: 170px; } .srv-pill .c { display: none; }
  .kv { grid-template-columns: 96px minmax(0,1fr); }
  .toast-stack { top: calc(10px + env(safe-area-inset-top)); bottom: auto; right: 12px; left: 12px; align-items: stretch; max-width: none; }
  .matchbar { grid-template-columns: 1fr; gap: 12px; } .matchbar .meta { justify-content: flex-start; } .score { justify-content: space-between; }
  .ol { flex: 0 0 auto; }
  .olgrid, .teams { display: block; }
  .team-tabs { display: flex !important; margin-bottom: 10px; }
  .teams > .team { display: none; } .teams > .team.on { display: flex; }
  .team-body { overflow: visible; }
  .olbar .search { flex: 1 1 100%; } .olbar .search .form-input { width: 100%; }
  .md { grid-template-columns: 1fr; } .md-list { border-right: 0; border-bottom: 1px solid var(--line); max-height: 220px; }
  .readout > div { padding: 11px 14px; min-width: 104px; } .readout .v { font-size: 20px; }
  .rail { grid-auto-columns: 86%; }
  .prow-plugin { grid-template-columns: 36px minmax(0,1fr) auto; }
  .stats-grid { grid-template-columns: 1fr 1fr; } .stat-card:nth-child(2n) { border-right: 0; } .stat-card { border-bottom: 1px solid var(--line); }
  .hero { padding: 96px 20px 70px; } .pub-top { padding: 12px 14px; } .pub-body { padding: 0 12px 28px; }
  .modal-overlay { align-items: flex-end; padding: 0; }
  .modal, .modal.wide, .modal.xwide { max-width: none; border-radius: 18px 18px 0 0; max-height: calc(100dvh - 28px); border-bottom: 0; padding-bottom: env(safe-area-inset-bottom); }
  .modal-grab { display: block; width: 38px; height: 5px; border-radius: 3px; background: var(--line-2); margin: 8px auto 0; flex-shrink: 0; }
  .modal-head { padding-top: 10px; touch-action: none; }
  .modal-footer > .btn { flex: 1; }
  .dropdown.sheet { left: 8px !important; right: 8px; bottom: calc(8px + env(safe-area-inset-bottom)); top: auto !important; max-width: none; border-radius: 16px; padding: 6px; }
  .dropdown.sheet button { padding: 13px 12px; font-size: 15px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-input, select.form-input { height: 40px; font-size: 16px; }
  .search-btn { min-width: 0; padding: 0 9px; } .search-btn span, .search-btn kbd { display: none; }
}
@media (max-width: 560px) {
  .srv-pill { max-width: 136px; padding: 0 8px; }
  .score .tk { font-size: 24px; min-width: 44px; }
  .top-title { font-size: 16px; }
  .pub-top .btn-ghost { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
@media (prefers-contrast: more) { :root { --line: #A9B0A6; --line-2: #7E877C; --text-3: #5B6468; } }
@media print { .side, .top, .dock, .toast-stack { display: none !important; } .content { overflow: visible; } }

/* v0.3.2 打乱阵营：逐人结果 */
.shuf-sum { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; font-size: 13px; }
.shuf-sum b { font-variant-numeric: tabular-nums; }
.shuf-list { max-height: 46vh; overflow: auto; border: 1px solid var(--line); border-radius: 10px; margin-top: 10px; }
.shuf-list .table th { position: sticky; top: 0; }
.shuf-list td { padding-top: 7px; padding-bottom: 7px; }
.team-chip { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 6px; font-size: 12px; font-weight: 600; background: var(--surface-2); border: 1px solid var(--line); white-space: nowrap; }
.team-chip.t1 { color: #2F6F9F; } .team-chip.t2 { color: #A0522D; }
html[data-theme="dark"] .team-chip.t1 { color: #7FB4DE; } html[data-theme="dark"] .team-chip.t2 { color: #E09A6E; }
.shuf-arrow { color: var(--text-3); margin: 0 4px; }
