/* 小创瓦百科：电竞游戏站标准做法（对标 playvalorant.com / blitz.gg），与群里的战术板卡片同一套视觉。 */
@font-face {
  font-family: "XC Display";
  src: url("/assets/fonts/xc-display.woff2?v=5e1ca4940d") format("woff2");
  font-display: swap;
}

:root {
  --ink: #0f1923;
  --ink-2: #16222e;
  --ink-3: #1c2b39;
  --line: #1f2a36;
  --line-2: #2c3b4b;
  --paper: #ece8e1;
  --paper-2: #c9d1d9;
  --muted: #9aa6b2;
  --red: #ff4655;
  --red-text: #ff6b78;
  --teal: #3fd3c0;
  --gold: #f5b942;
  --blue: #7fa7ff;
  --cut: 12px;
  --display: "XC Display", "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", sans-serif;
  --body: "PingFang SC", "HarmonyOS Sans SC", "Noto Sans CJK SC", "Microsoft YaHei", "WenQuanYi Micro Hei", system-ui, sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --top: 56px;
  --tabbar: 64px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--top) + 60px); }
body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font: 16px/1.6 var(--body);
  min-height: 100vh;
  padding-bottom: calc(var(--tabbar) + env(safe-area-inset-bottom));
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
a:not([class]):hover { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--red); }
button { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 400; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
::selection { background: var(--red); color: var(--ink); }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
* { scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: var(--line-2); }
::-webkit-scrollbar-track { background: transparent; }
svg { width: 1em; height: 1em; }

.wrap { width: min(1200px, 100% - 32px); margin-inline: auto; }
.display { font-family: var(--display); font-weight: 400; letter-spacing: 0; }
.num { font-family: var(--display); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.cut { clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut)); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--paper); color: var(--ink); padding: 8px 12px; z-index: 50; }
.skip:focus { left: 8px; }

/* ---------- 顶栏与底栏 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  background: rgba(15, 25, 35, 0.92);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar-in { height: var(--top); display: flex; align-items: center; gap: 24px; }
.wordmark { font: 26px/1 var(--display); letter-spacing: 0.02em; white-space: nowrap; }
.wordmark i, .foot-brand i { color: var(--red); font-style: normal; margin: 0 1px; }
.nav-desk { display: none; gap: 4px; margin-left: 8px; }
.nav-desk a { padding: 8px 14px; color: var(--muted); font-weight: 600; font-size: 15px; transition: color .2s var(--ease); position: relative; }
.nav-desk a:hover, .nav-desk a[aria-current="page"] { color: var(--paper); }
.nav-desk a[aria-current="page"]::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: -11px; height: 3px; background: var(--red); }
.icon-btn {
  margin-left: auto; display: inline-flex; align-items: center; gap: 8px;
  min-width: 44px; min-height: 44px; padding: 0 12px; justify-content: center;
  background: transparent; border: 1px solid var(--line-2); cursor: pointer; color: var(--paper);
  transition: border-color .2s var(--ease), background .2s var(--ease);
}
.icon-btn:hover { border-color: var(--paper); }
.icon-btn svg { font-size: 20px; }
.icon-btn span { display: none; font-size: 14px; color: var(--muted); }
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: grid; grid-template-columns: repeat(5, 1fr);
  height: calc(var(--tabbar) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  background: rgba(15, 25, 35, 0.96); border-top: 1px solid var(--line);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 12px; color: var(--muted); position: relative; }
.tabbar a svg { font-size: 22px; }
.tabbar a[aria-current="page"] { color: var(--paper); }
.tabbar a[aria-current="page"]::before { content: ""; position: absolute; top: 0; left: 30%; right: 30%; height: 3px; background: var(--red); }

/* ---------- 通用排版 ---------- */
.page { padding: 20px 0 56px; }
.h1 { font: clamp(56px, 16vw, 104px)/1.02 var(--display); letter-spacing: -0.01em; }
.h1 em { font-style: normal; color: var(--red); display: block; margin-top: -0.04em; }
.lead { color: var(--paper-2); font-size: 16px; line-height: 1.7; max-width: 34em; }
.sec { margin-top: 48px; }
.sec-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.sec-head h2 { font: 34px/1.05 var(--display); white-space: nowrap; }
.sec-head::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.sec-head a { order: 2; font-size: 14px; color: var(--muted); white-space: nowrap; display: inline-flex; align-items: center; gap: 4px; }
.sec-head a:hover { color: var(--paper); }
.sec-head a svg { font-size: 16px; }
.h3 { font: 24px/1.15 var(--display); margin-bottom: 10px; }
.prose p + p { margin-top: 10px; }
.tag {
  display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px;
  font-size: 13px; font-weight: 700; background: var(--ink-3); color: var(--paper);
  --cut: 7px;
  clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
}
.tag.red { background: var(--red); color: var(--ink); }
.tag.teal { background: var(--teal); color: var(--ink); }
.tag.gold { background: var(--gold); color: var(--ink); }
.tag.line { background: transparent; box-shadow: inset 0 0 0 1px var(--line-2); color: var(--muted); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px;
  background: var(--red); color: var(--ink); font-weight: 800; font-size: 16px; border: 0; cursor: pointer;
  clip-path: polygon(0 0, 100% 0, 100% 68%, calc(100% - 14px) 100%, 0 100%);
  transition: background .2s var(--ease), transform .2s var(--ease);
}
.btn:hover { background: #ff5d6a; }
.btn:active { transform: translateY(1px); }
.btn.ghost { background: transparent; color: var(--paper); box-shadow: inset 0 0 0 1px var(--line-2); clip-path: none; }
.btn.ghost:hover { box-shadow: inset 0 0 0 1px var(--paper); }
.btn svg { font-size: 18px; }

/* ---------- 首页 ---------- */
.home-hero { display: grid; gap: 22px; padding-top: 18px; }
.home-hero > *, .split > *, .agent-hero > * { min-width: 0; }
.home-hero .lead { margin-top: 14px; }
.strip {
  display: grid; grid-auto-flow: column; grid-auto-columns: 78%; gap: 10px;
  overflow-x: auto; scroll-snap-type: x mandatory; margin-inline: -16px; padding: 4px 16px 10px;
  overscroll-behavior-x: contain; scroll-padding-inline: 16px;
}
.strip > * { scroll-snap-align: start; }
.map-tile {
  position: relative; display: flex; flex-direction: column; justify-content: flex-end;
  min-height: 190px; padding: 16px; overflow: hidden; background: var(--ink-3);
  --cut: 16px; isolation: isolate;
  clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
}
.map-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform .6s var(--ease); }
.map-tile::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(15,25,35,0.05) 20%, rgba(15,25,35,0.92) 88%); }
.map-tile:hover img { transform: scale(1.04); }
.map-tile b { font: 34px/1 var(--display); }
.map-tile small { display: block; margin-top: 6px; font: 15px/1 var(--display); letter-spacing: 0.16em; color: var(--paper-2); text-transform: uppercase; }
.map-tile .tags { position: absolute; top: 12px; right: 12px; }
.map-tile .sites { font: 16px/1 var(--display); color: var(--gold); margin-top: 8px; letter-spacing: 0.08em; }
.map-tile.off { opacity: 0.78; }
.map-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.map-grid .map-tile { min-height: 150px; }
.map-grid .map-tile b { font-size: 26px; }

.demo { background: var(--ink-2); border: 1px solid var(--line); }
.demo-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 2px 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.demo-head b { font-weight: 700; font-size: 15px; }
.demo-head span { font-size: 12px; color: var(--muted); }

.role-tabs { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 14px; }
.role-tabs button {
  flex: none; min-height: 40px; padding: 0 16px; background: transparent; border: 1px solid var(--line-2);
  color: var(--muted); font-weight: 700; cursor: pointer; transition: all .2s var(--ease);
}
.role-tabs button[aria-selected="true"] { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.agent-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.agent-card {
  position: relative; background: var(--ink-2); padding: 10px 8px 10px; text-align: center;
  --cut: 12px; transition: background .2s var(--ease);
  clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
}
.agent-card:hover { background: var(--ink-3); }
.agent-card img { width: 72px; height: 72px; margin: 0 auto; background: var(--ink-3); }
.agent-card b { display: block; margin-top: 8px; font: 19px/1.1 var(--display); }
.agent-card small { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.agent-card .diff { position: absolute; top: 8px; right: 8px; display: flex; gap: 2px; }
.diff { display: inline-flex; gap: 3px; align-items: center; }
.diff i { width: 6px; height: 6px; background: var(--line-2); transform: rotate(45deg); }
.diff i.on { background: var(--gold); }

.path { counter-reset: step; display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.path li { counter-increment: step; background: var(--ink); padding: 14px 14px 14px 62px; position: relative; font-size: 15px; line-height: 1.6; }
.path li::before {
  content: counter(step); position: absolute; left: 14px; top: 13px; width: 34px; height: 34px;
  display: grid; place-items: center; background: var(--gold); color: var(--ink); font: 21px/1 var(--display);
  clip-path: polygon(7px 0, 100% 0, 100% calc(100% - 7px), calc(100% - 7px) 100%, 0 100%, 0 7px);
}
.ask { display: grid; gap: 8px; }
.ask li {
  display: flex; align-items: center; gap: 10px; padding: 12px 12px 12px 14px;
  background: var(--ink-2); border: 1px solid var(--line);
}
.ask li p { flex: 1; font-size: 15px; line-height: 1.5; }
.ask li p small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.copy { flex: none; min-width: 44px; min-height: 44px; display: grid; place-items: center; background: transparent; border: 1px solid var(--line-2); cursor: pointer; }
.copy:hover { border-color: var(--paper); }
.copy svg { font-size: 18px; }

/* ---------- 详情页头 ---------- */
.detail-hero { position: relative; margin: -20px 0 0; padding: 28px 0 22px; overflow: hidden; isolation: isolate; }
.detail-hero .bg { position: absolute; inset: 0; z-index: -2; }
.detail-hero .bg img { width: 100%; height: 100%; object-fit: cover; opacity: 0.55; }
.detail-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(15,25,35,0.35), var(--ink) 92%); }
.crumbs { font-size: 13px; color: var(--muted); display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.crumbs a:hover { color: var(--paper); }
.title-row { display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; }
.title-row .en { font: 22px/1 var(--display); letter-spacing: 0.18em; color: var(--muted); text-transform: uppercase; padding-bottom: 8px; }
.detail-hero .tags { margin-top: 14px; }
.detail-hero .lead { margin-top: 12px; }

.tabs {
  position: sticky; top: var(--top); z-index: 20; display: flex; gap: 0; overflow-x: auto;
  background: rgba(15, 25, 35, 0.94); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line); margin: 0 -16px; padding: 0 16px;
}
.tabs button {
  flex: none; min-height: 48px; padding: 0 16px; background: none; border: 0; color: var(--muted);
  font-weight: 700; font-size: 15px; cursor: pointer; position: relative;
}
.tabs button[aria-selected="true"] { color: var(--paper); }
.tabs button[aria-selected="true"]::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 0; height: 3px; background: var(--red); }
.subtabs { display: flex; gap: 6px; margin: 14px 0 12px; flex-wrap: wrap; }
.subtabs button {
  min-width: 52px; min-height: 40px; padding: 0 14px; background: transparent; border: 1px solid var(--line-2);
  color: var(--paper); font: 18px/1 var(--display); cursor: pointer;
}
.subtabs button[aria-pressed="true"] { background: var(--gold); border-color: var(--gold); color: var(--ink); }

/* ---------- 战术板 ---------- */
.board-frame { position: relative; background: var(--ink); border: 1px solid var(--line); }
.board-frame svg.xcb-board { width: 100%; height: auto; display: block; }
.board-frame .xcb-display { font-family: var(--display); font-weight: 400; }
.board-tools { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; padding: 10px 0; }
.board-tools .toggle {
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; font-size: 13px; font-weight: 700;
  background: transparent; border: 1px solid var(--line-2); color: var(--muted); cursor: pointer;
}
.board-tools .toggle[aria-pressed="true"] { color: var(--paper); border-color: var(--paper); }
.board-tools .toggle i { width: 10px; height: 10px; background: var(--c, var(--paper)); transform: rotate(45deg); }
.board-tools .spacer { flex: 1; }
.board-note { font-size: 12px; color: var(--muted); padding-top: 8px; }
.xcb-board .is-dim { opacity: 0.18; transition: opacity .25s var(--ease); }
.xcb-board .xcb-route, .xcb-board .xcb-player { transition: opacity .25s var(--ease); }

.rows { border-top: 1px solid var(--line); }
.rows li { display: flex; gap: 12px; align-items: flex-start; padding: 14px 0; border-bottom: 1px solid var(--line); }
.rows li[data-i] { cursor: pointer; }
.rows li[data-i]:hover b { color: var(--teal); }
.rows li.is-on { background: linear-gradient(90deg, rgba(63,211,192,0.08), transparent 70%); }
.rows .no {
  flex: none; width: 34px; height: 34px; display: grid; place-items: center; margin-top: 4px;
  background: var(--teal); color: var(--ink); font: 21px/1 var(--display);
  clip-path: polygon(7px 0, 100% 0, 100% calc(100% - 7px), calc(100% - 7px) 100%, 0 100%, 0 7px);
}
.rows .no.dia { background: var(--paper); clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); }
.rows .no.foe { background: var(--red); }
.rows .no.atk { background: var(--red); }
.rows .no.gold { background: var(--gold); }
.rows .ava { flex: none; width: 46px; height: 46px; background: var(--ink-3); clip-path: polygon(9px 0, 100% 0, 100% calc(100% - 9px), calc(100% - 9px) 100%, 0 100%, 0 9px); }
.rows .ab { flex: none; width: 40px; height: 40px; padding: 6px; background: var(--ink-3); }
.rows b { display: block; font-size: 16px; font-weight: 800; }
.rows b kbd { font: 12px/1 var(--body); font-weight: 800; background: var(--paper); color: var(--ink); padding: 2px 6px; margin: 0 4px; vertical-align: 2px; }
.rows em { display: block; font-style: normal; color: var(--gold); font-size: 13px; margin-top: 2px; }
.rows p { color: var(--paper-2); font-size: 15px; line-height: 1.6; margin-top: 2px; white-space: pre-line; }
.bullets li { position: relative; padding: 10px 0 10px 24px; border-bottom: 1px solid var(--line); font-size: 15px; line-height: 1.65; color: var(--paper-2); }
.bullets li::before { content: ""; position: absolute; left: 3px; top: 19px; width: 9px; height: 9px; background: var(--teal); transform: rotate(45deg); }
.bullets.foe li::before { background: var(--red); }
.bullets.gold li::before { background: var(--gold); }
.steps { counter-reset: s; }
.steps li { counter-increment: s; position: relative; padding: 12px 0 12px 48px; border-bottom: 1px solid var(--line); font-size: 15px; line-height: 1.65; }
.steps li::before {
  content: counter(s); position: absolute; left: 0; top: 10px; width: 32px; height: 32px; display: grid; place-items: center;
  background: var(--gold); color: var(--ink); font: 20px/1 var(--display);
  clip-path: polygon(7px 0, 100% 0, 100% calc(100% - 7px), calc(100% - 7px) 100%, 0 100%, 0 7px);
}

.split { display: grid; gap: 28px; }
.panel { background: var(--ink-2); border: 1px solid var(--line); padding: 18px; }
.panel + .panel { margin-top: 12px; }
.panel h3 { font: 24px/1.1 var(--display); margin-bottom: 10px; }
.panel.foe h3 { color: var(--red-text); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 15px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }

/* 阵容 */
.comp { padding: 14px 0; border-bottom: 1px solid var(--line); }
.comp-faces { display: flex; gap: 6px; }
.comp-faces a { width: 52px; }
.comp-faces img { width: 52px; height: 52px; background: var(--ink-3); clip-path: polygon(9px 0, 100% 0, 100% calc(100% - 9px), calc(100% - 9px) 100%, 0 100%, 0 9px); }
.comp-faces small { display: block; text-align: center; font-size: 11px; color: var(--muted); margin-top: 3px; white-space: nowrap; overflow: hidden; }
.comp p { margin-top: 8px; font-size: 14px; color: var(--paper-2); }
.comp p small { color: var(--muted); }

/* ---------- 英雄页 ---------- */
.agent-hero { display: grid; gap: 8px; }
.agent-hero .portrait { position: relative; height: 320px; margin: -8px -16px 0; overflow: hidden; }
.agent-hero .portrait img { position: absolute; right: -10%; top: 0; height: 132%; width: auto; max-width: none; filter: drop-shadow(0 20px 40px rgba(0,0,0,0.5)); }
.agent-hero .portrait::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, var(--ink)); }
.agent-hero .role-glow { position: absolute; left: 22%; right: 6%; top: 10%; bottom: 18%; background: color-mix(in srgb, var(--glow, #ff4655) 55%, var(--ink)); clip-path: polygon(18% 0, 100% 0, 100% 82%, 82% 100%, 0 100%, 0 18%); }
.abilities { display: grid; gap: 10px; }
.ability { display: grid; grid-template-columns: 56px 1fr; gap: 14px; padding: 16px; background: var(--ink-2); border: 1px solid var(--line); }
.ability .icon { width: 56px; height: 56px; padding: 9px; background: var(--ink-3); position: relative; }
.ability .icon kbd { position: absolute; right: -6px; bottom: -6px; font: 15px/1 var(--display); background: var(--paper); color: var(--ink); padding: 3px 6px; }
.ability h3 { font: 22px/1.15 var(--display); }
.ability h3 small { font: 13px/1 var(--body); color: var(--muted); margin-left: 6px; letter-spacing: 0.02em; }
.ability p { font-size: 14px; color: var(--paper-2); line-height: 1.65; margin-top: 6px; }
.ability .tip { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line-2); color: var(--paper); font-size: 14px; }
.ability .tip b { color: var(--teal); margin-right: 6px; }

/* ---------- 视频 ---------- */
.videos { display: grid; gap: 12px; }
.video { background: var(--ink-2); border: 1px solid var(--line); }
.video .cover { position: relative; aspect-ratio: 16 / 9; background: var(--ink-3); overflow: hidden; cursor: pointer; border: 0; padding: 0; width: 100%; display: block; }
.video .cover img { width: 100%; height: 100%; object-fit: cover; }
.video .cover .dur { position: absolute; right: 8px; bottom: 8px; background: rgba(15,25,35,0.85); padding: 2px 8px; font: 14px/1.4 var(--display); }
.video .cover .play { position: absolute; left: 50%; top: 50%; width: 56px; height: 56px; margin: -28px 0 0 -28px; display: grid; place-items: center; background: var(--red); color: var(--ink); clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px); }
.video .cover .play svg { font-size: 26px; }
.video iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; display: block; background: #000; }
.video .meta { padding: 12px 14px 14px; }
.video .meta b { display: block; font-size: 15px; line-height: 1.45; font-weight: 700; }
.video .meta small { display: block; color: var(--muted); font-size: 12px; margin-top: 4px; }
.video .meta p { margin-top: 8px; font-size: 14px; color: var(--teal); }
.video .meta a { display: inline-flex; gap: 4px; align-items: center; margin-top: 8px; font-size: 13px; color: var(--muted); }
.video .meta a:hover { color: var(--paper); }
.empty { padding: 18px; border: 1px dashed var(--line-2); color: var(--muted); font-size: 14px; line-height: 1.7; }
.empty b { color: var(--paper); }

/* ---------- 入门页 ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: 12px; background: var(--ink-2); position: sticky; top: 0; }
td.price { font: 18px/1.2 var(--display); color: var(--gold); white-space: nowrap; font-variant-numeric: tabular-nums; }
.gloss-search { width: 100%; min-height: 48px; padding: 0 14px; background: var(--ink-2); color: var(--paper); border: 1px solid var(--line-2); font: 16px var(--body); }
.gloss-search::placeholder { color: var(--muted); }
.gloss { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); margin-top: 10px; }
.gloss div { background: var(--ink); padding: 12px 14px; }
.gloss b { font: 21px/1.2 var(--display); }
.gloss b small { font: 12px var(--body); color: var(--muted); margin-left: 8px; }
.gloss p { font-size: 14px; color: var(--paper-2); margin-top: 4px; line-height: 1.65; }
.roles { display: grid; gap: 10px; }
.role-card { padding: 16px; background: var(--ink-2); border: 1px solid var(--line); }
.role-card h3 { font: 26px/1 var(--display); }
.role-card p { margin-top: 8px; font-size: 14px; color: var(--paper-2); line-height: 1.65; }
.role-card .faces { display: flex; gap: 6px; margin-top: 12px; }
.role-card .faces img { width: 40px; height: 40px; background: var(--ink-3); }

/* ---------- 状态 ---------- */
.skeleton { display: grid; gap: 12px; padding-top: 24px; }
.skeleton i { display: block; height: 18px; background: linear-gradient(90deg, var(--ink-2), var(--ink-3), var(--ink-2)); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
.skeleton i.big { height: 64px; width: 70%; }
.skeleton i.box { height: 280px; }
@keyframes shimmer { to { background-position: -200% 0; } }
.error-box { margin-top: 32px; padding: 20px; border: 1px solid var(--line-2); }
.error-box h2 { font: 30px/1.1 var(--display); margin-bottom: 8px; }
.error-box p { color: var(--paper-2); margin-bottom: 14px; }
.toast {
  position: fixed; left: 50%; bottom: calc(var(--tabbar) + 16px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px);
  background: var(--paper); color: var(--ink); padding: 10px 16px; font-weight: 700; font-size: 14px; opacity: 0; pointer-events: none;
  transition: opacity .25s var(--ease), transform .25s var(--ease); z-index: 60;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 对话框 ---------- */
dialog { border: 0; padding: 0; background: var(--ink); color: var(--paper); max-width: none; max-height: none; }
dialog::backdrop { background: rgba(5, 10, 15, 0.72); backdrop-filter: blur(4px); }
#search { width: min(640px, 100%); height: min(640px, 100%); margin: 0 auto auto; border-bottom: 1px solid var(--line-2); }
.search-head { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.search-head > svg { font-size: 20px; color: var(--muted); flex: none; }
.search-head input { flex: 1; min-width: 0; min-height: 44px; background: transparent; border: 0; color: var(--paper); font: 17px var(--body); }
.search-head input:focus { outline: none; }
.search-results { overflow-y: auto; max-height: calc(100% - 66px); padding: 6px 0; }
.search-results a { display: flex; align-items: center; gap: 12px; padding: 10px 16px; min-height: 56px; }
.search-results a:hover, .search-results a:focus { background: var(--ink-2); outline: none; }
.search-results img { width: 40px; height: 40px; object-fit: cover; background: var(--ink-3); }
.search-results b { display: block; font-size: 15px; }
.search-results small { display: block; font-size: 12px; color: var(--muted); }
.search-results .group { padding: 12px 16px 4px; font-size: 12px; color: var(--muted); letter-spacing: 0.08em; }
#zoom { width: 100vw; height: 100dvh; }
.zoom-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.zoom-head b { font-weight: 700; }
.zoom-body { overflow: auto; height: calc(100% - 61px); overscroll-behavior: contain; touch-action: pan-x pan-y pinch-zoom; }
.zoom-body svg.xcb-board { width: 200%; min-width: 820px; height: auto; display: block; }

/* ---------- 页脚 ---------- */
.site-foot { border-top: 1px solid var(--line); padding: 28px 0 32px; color: var(--muted); font-size: 13px; line-height: 1.7; }
.site-foot p + p { margin-top: 8px; }
.foot-brand { font: 24px/1 var(--display); color: var(--paper); }
.legal { font-size: 12px; }

/* ---------- 宽屏 ---------- */
@media (min-width: 720px) {
  .strip { grid-auto-columns: 42%; }
  .map-grid { grid-template-columns: repeat(3, 1fr); }
  .videos { grid-template-columns: repeat(2, 1fr); }
  .abilities { grid-template-columns: repeat(2, 1fr); }
  .roles { grid-template-columns: repeat(2, 1fr); }
  .icon-btn span { display: inline; }
}
@media (min-width: 1024px) {
  body { padding-bottom: 0; }
  .tabbar { display: none; }
  .nav-desk { display: flex; }
  .page { padding-top: 32px; }
  .home-hero { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 40px; align-items: start; padding-top: 36px; }
  .home-hero .strip { grid-auto-flow: row; grid-template-columns: repeat(2, 1fr); grid-auto-columns: auto; overflow: visible; margin: 22px 0 0; padding: 0; }
  .home-hero .strip .map-tile { min-height: 150px; }
  .map-grid { grid-template-columns: repeat(4, 1fr); }
  .videos { grid-template-columns: repeat(3, 1fr); }
  .split { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: start; }
  .split > .side { position: sticky; top: calc(var(--top) + 64px); }
  .split.board-left > .side { position: static; }
  .split.board-left > :first-child { position: sticky; top: calc(var(--top) + 60px); }
  .tabs { margin: 0; padding: 0; }
  .agent-hero { grid-template-columns: 1fr 1fr; align-items: center; }
  .agent-hero .portrait { height: 460px; margin: 0; order: 2; }
  .agent-hero .portrait img { right: 0; height: 120%; }
  .detail-hero { padding: 48px 0 28px; }
  .toast { bottom: 24px; }
}
/* ---------- 自由摆放看板 ---------- */
.ed-title { font-size: clamp(48px, 13vw, 88px); }
.ed-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 18px 0 12px; }
.ed-select { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.ed-select select { min-height: 40px; background: var(--ink-2); color: var(--paper); border: 1px solid var(--line-2); padding: 0 10px; font: 15px var(--body); }
.seg { display: inline-flex; }
.seg button { min-height: 40px; padding: 0 14px; background: transparent; border: 1px solid var(--line-2); color: var(--muted); font-weight: 700; cursor: pointer; }
.seg button + button { border-left: 0; }
.seg button[data-side="attack"][aria-pressed="true"] { background: var(--red); border-color: var(--red); color: var(--ink); }
.seg button[data-side="defense"][aria-pressed="true"] { background: var(--teal); border-color: var(--teal); color: var(--ink); }
.ed-bar .toggle, .ed-float .toggle { min-height: 40px; }
.ed-stage { position: relative; border: 1px solid var(--line); background: var(--ink); }
.ed-scroll { overflow: auto; max-height: 72vh; overscroll-behavior: contain; }
.ed-canvas { width: 100%; }
.ed-canvas svg { width: 100%; height: auto; display: block; user-select: none; -webkit-user-select: none; cursor: crosshair; }
.ed-float { position: absolute; right: 8px; top: 8px; display: flex; gap: 4px; }
.ed-float .toggle { background: rgba(15,25,35,0.9); min-width: 40px; justify-content: center; }
.ed-hint { min-height: 22px; margin: 8px 0; font-size: 14px; color: var(--gold); }
.ed-tools { display: grid; grid-template-columns: repeat(6, 1fr); border: 1px solid var(--line); position: sticky; bottom: calc(var(--tabbar) + env(safe-area-inset-bottom)); z-index: 5; background: var(--ink); }
.ed-tools button { min-height: 48px; background: transparent; border: 0; border-right: 1px solid var(--line); color: var(--muted); font-weight: 700; cursor: pointer; }
.ed-tools button:last-child { border-right: 0; }
.ed-tools button[aria-selected="true"] { background: var(--paper); color: var(--ink); }
.ed-panel { padding: 14px 0; min-height: 120px; }
.ed-sub { font-size: 14px; color: var(--muted); margin-bottom: 10px; }
.ed-agents { display: grid; grid-template-columns: repeat(auto-fill, minmax(62px, 1fr)); gap: 6px; }
.ed-agents button { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 2px; background: var(--ink-2); border: 1px solid var(--line); color: var(--paper-2); font-size: 12px; cursor: pointer; }
.ed-agents button img { width: 40px; height: 40px; }
.ed-agents button[aria-pressed="true"] { border-color: var(--gold); background: rgba(245,185,66,0.12); color: var(--paper); }
.ed-abrow { display: grid; grid-template-columns: 36px 1fr; gap: 4px 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.ed-abrow .ed-face { width: 36px; height: 36px; grid-row: span 2; }
.ed-abrow b { font-size: 14px; }
.ed-abrow > div { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; grid-column: 2; }
.ed-abrow button { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px; background: var(--ink-2); border: 1px solid var(--line); color: var(--paper-2); cursor: pointer; font-size: 11px; position: relative; }
.ed-abrow button img { width: 26px; height: 26px; }
.ed-abrow button kbd { position: absolute; top: 2px; left: 4px; font: 11px/1 var(--display); color: var(--muted); }
.ed-abrow button span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ed-abrow button[aria-pressed="true"] { border-color: var(--gold); background: rgba(245,185,66,0.12); color: var(--paper); }
.ed-selbox { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; background: var(--ink-2); border: 1px solid var(--line); }
.ed-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; }
.shot { max-width: 100%; margin: 0 auto; display: block; }
.shot-tip { padding: 12px 16px; font-size: 14px; color: var(--paper-2); }
.shot-tip a { color: var(--teal); }

/* ---------- 经典战术轮播 ---------- */
.carousel { position: relative; }
.car-track { display: grid; grid-auto-flow: column; grid-auto-columns: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.car-track::-webkit-scrollbar { display: none; }
.car-slide { scroll-snap-align: start; display: grid; gap: 14px; padding: 2px; }
.car-slide .board-frame { cursor: pointer; }
.car-meta h3 { font: 30px/1.1 var(--display); }
.car-meta p { margin-top: 8px; color: var(--paper-2); font-size: 15px; line-height: 1.65; }
.car-meta .tags { margin-top: 10px; }
.car-meta .faces { display: flex; gap: 6px; margin-top: 12px; }
.car-meta .faces img { width: 38px; height: 38px; background: var(--ink-3); clip-path: polygon(7px 0, 100% 0, 100% calc(100% - 7px), calc(100% - 7px) 100%, 0 100%, 0 7px); }
.car-meta .row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.car-nav { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.car-nav button.arrow { min-width: 44px; min-height: 44px; display: grid; place-items: center; background: transparent; border: 1px solid var(--line-2); cursor: pointer; }
.car-nav button.arrow svg { font-size: 20px; }
.car-dots { display: flex; gap: 6px; flex-wrap: wrap; flex: 1; }
.car-dots button { width: 22px; height: 22px; padding: 0; background: transparent; border: 0; cursor: pointer; display: grid; place-items: center; }
.car-dots button i { width: 9px; height: 9px; background: var(--line-2); transform: rotate(45deg); transition: background .2s var(--ease); }
.car-dots button[aria-current="true"] i { background: var(--red); }
.car-count { font: 18px/1 var(--display); color: var(--muted); }

/* ---------- 点位 ---------- */
.lineups { display: grid; gap: 10px; }
.lineup { padding: 14px; background: var(--ink-2); border: 1px solid var(--line); cursor: pointer; }
.lineup.is-on { border-color: var(--gold); }
.lineup-head { display: flex; align-items: center; gap: 10px; }
.lineup-head img { width: 36px; height: 36px; background: var(--ink-3); }
.lineup-head b { font-size: 15px; }
.lineup-head em { font-style: normal; color: var(--gold); font-size: 13px; display: block; }
.lineup dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; margin: 12px 0 0; font-size: 14px; line-height: 1.6; }
.lineup dt { color: var(--muted); white-space: nowrap; }
.lineup dd { margin: 0; color: var(--paper-2); }
.lineup .src { display: inline-flex; gap: 4px; align-items: center; margin-top: 8px; font-size: 12px; color: var(--muted); }
.filter-row { display: flex; gap: 6px; flex-wrap: wrap; margin: 12px 0; }
.filter-row button { min-height: 36px; padding: 0 12px; background: transparent; border: 1px solid var(--line-2); color: var(--muted); cursor: pointer; font-weight: 700; display: inline-flex; align-items: center; gap: 6px; }
.filter-row button img { width: 22px; height: 22px; }
.filter-row button[aria-pressed="true"] { border-color: var(--paper); color: var(--paper); }

@media (max-width: 1023px) {
  .ed-title { font-size: 44px; }
  .editor .lead { font-size: 14px; }
  .ed-stage { position: sticky; top: var(--top); z-index: 6; box-shadow: 0 10px 18px rgba(5, 10, 15, 0.55); }
  .ed-scroll { max-height: 48vh; }
  .ed-hint { min-height: 20px; font-size: 13px; }
}
@media (min-width: 1024px) {
  .car-slide { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: center; gap: 28px; }
  .ed-layout { display: grid; grid-template-columns: minmax(0, 7fr) minmax(320px, 5fr); gap: 24px; align-items: start; }
  .ed-left { position: sticky; top: calc(var(--top) + 16px); }
  .ed-scroll { max-height: calc(100vh - var(--top) - 80px); }
  .ed-tools { position: static; }
  .ed-right .ed-panel { max-height: calc(100vh - var(--top) - 220px); overflow-y: auto; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
.xcb-board .xcb-drop { transform-box: fill-box; transform-origin: center; }
.lineup-head .no { flex: none; width: 30px; height: 30px; display: grid; place-items: center; background: var(--paper); color: var(--ink); font: 18px/1 var(--display); clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); }
