/* S19 阵容榜 / 数据页：沿用模拟器的深色面板与金色强调 */
body.comps-body {
  display: block; overflow-x: hidden; overflow-y: auto; height: auto; min-height: 100vh;
  background:
    radial-gradient(1100px 420px at 50% -160px, rgba(233,185,73,.10), transparent 68%),
    linear-gradient(180deg, #1b1d21 0, #18191c 380px, #17181b 100%);
}
body.comps-body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image: radial-gradient(rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 22px 22px; opacity: .35;
}
.app-topbar {
  position: sticky; top: 0; z-index: 40; height: 62px; flex: none;
  background: rgba(27,29,33,.94); backdrop-filter: blur(14px);
  border-bottom-color: #343840; box-shadow: 0 1px 0 rgba(255,255,255,.03), 0 8px 26px rgba(0,0,0,.28);
}
.app-topbar .brand { flex: 0 0 240px; min-width: 0; display: flex; align-items: center; color: var(--text); text-decoration: none; white-space: nowrap; font-size: 15px; font-weight: 700; }
.app-nav { display: flex; align-items: stretch; gap: 0; height: 62px; }
.app-nav a { display: flex; align-items: center; padding: 0 17px; color: #9aa0a9; text-decoration: none; border-bottom: 2px solid transparent; font-size: 13.5px; font-weight: 600; }
.app-nav a:hover { color: var(--text); }
.app-nav a.on { color: #ffd76b; border-bottom-color: #e9b949; text-shadow: 0 0 18px rgba(233,185,73,.35); }
.comps-main { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 30px 0 14px; }
.comps-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 20px; }
.page-eyebrow { display: flex; align-items: center; gap: 8px; color: #e9b949; font-size: 11px; font-weight: 800; letter-spacing: .16em; }
.page-eyebrow::before { content: ""; width: 22px; height: 2px; border-radius: 2px; background: linear-gradient(90deg, #e9b949, transparent); }
.comps-head h1 { margin: 5px 0 6px; font-size: 32px; line-height: 1.2; letter-spacing: .01em; text-shadow: 0 2px 20px rgba(0,0,0,.35); }
.comps-head p { margin: 0; color: #a4a9b1; font-size: 13px; }
.dataset-meta { display: flex; padding: 11px 4px; background: linear-gradient(180deg, #25282d, #202227); border: 1px solid #393d44; border-radius: 10px; box-shadow: inset 0 1px 0 rgba(255,255,255,.04), 0 6px 20px rgba(0,0,0,.18); flex: none; }
.dataset-meta div { display: flex; flex-direction: column; gap: 2px; padding: 0 16px; }
.dataset-meta div + div { border-left: 1px solid #353941; }
.dataset-meta span { color: #858a93; font-size: 10.5px; }
.dataset-meta b { color: #f0eadc; font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; }
.app-filter { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 0 0 14px; padding: 10px 12px; background: linear-gradient(180deg, rgba(38,41,46,.88), rgba(31,33,37,.88)); border: 1px solid #343840; border-radius: 10px; box-shadow: inset 0 1px 0 rgba(255,255,255,.03); }
.filter-left, .filter-right { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.tier-filter { display: flex; gap: 4px; }
.tier-filter button { min-width: 36px; height: 31px; background: #23262b; border: 1px solid #3b3f47; color: #9ba0a9; border-radius: 5px; padding: 0 11px; cursor: pointer; font: inherit; font-size: 12px; font-weight: 700; transition: background .15s, border-color .15s, color .15s; }
.tier-filter button:hover { color: #e7e2d8; border-color: #666b75; }
.tier-filter button.on { color: #211909; background: linear-gradient(180deg, #f2c761, #dca83a); border-color: #f0c35b; box-shadow: 0 2px 10px rgba(233,185,73,.18); font-weight: 900; }
.tier-filter button[data-tier="S"].on { color: #2a1111; background: #ff7075; border-color: #ff7075; box-shadow: none; }
.tier-filter button[data-tier="A"].on { color: #2a1a05; background: #f2bb54; border-color: #f2bb54; }
.tier-filter button[data-tier="B"].on { color: #1d142b; background: #ad91e8; border-color: #ad91e8; }
.tier-filter button[data-tier="C"].on { color: #0f1d2b; background: #76ade0; border-color: #76ade0; }
.filter-search { display: flex; align-items: center; gap: 6px; background: #202329; border: 1px solid #3b3f47; border-radius: 5px; padding: 0 10px; min-width: 258px; transition: border-color .15s, box-shadow .15s; }
.filter-search:focus-within { border-color: #b7933f; box-shadow: 0 0 0 3px rgba(233,185,73,.10); }
.filter-search span { color: #9da3ad; font-size: 15px; }
.filter-search input { flex: 1; background: transparent; border: 0; color: var(--text); outline: none; padding: 7px 0; font: inherit; font-size: 12.5px; }
.filter-select { display: flex; align-items: center; gap: 6px; color: var(--dim); font-size: 11px; }
.filter-select select { background: #23262b; color: #d9dce1; border: 1px solid #3b3f47; border-radius: 5px; padding: 6px 8px; font: inherit; font-size: 12px; }
.result-count { color: #8f949d; font-size: 11px; font-variant-numeric: tabular-nums; }
.comps-ad { min-height: 0; margin: 4px 0 10px; }
.comp-list { display: flex; flex-direction: column; gap: 9px; }
.comp-row { position: relative; display: flex; flex-wrap: wrap; background: linear-gradient(180deg, #212328 0, #1d1f23 100%); border: 1px solid #30343b; border-left: 4px solid #777; border-radius: 10px; overflow: hidden; box-shadow: inset 0 1px 0 rgba(255,255,255,.025), 0 3px 14px rgba(0,0,0,.14); transition: border-color .15s, box-shadow .15s, background .15s;
  /* 一屏外几十张卡不参与布局/绘制，首屏和滚动都轻很多 */
  content-visibility: auto; contain-intrinsic-size: auto 236px;
}
.comp-row:hover { border-color: #424750; border-left-color: var(--tc); box-shadow: inset 0 1px 0 rgba(255,255,255,.04), 0 6px 20px rgba(0,0,0,.22); }
.comp-row.t-S { background: linear-gradient(90deg, rgba(255,112,117,.055), transparent 26%), linear-gradient(180deg, #222328, #1d1f23); }
.comp-row.open { border-color: #4b4230; box-shadow: inset 0 1px 0 rgba(255,255,255,.04), 0 8px 26px rgba(0,0,0,.24); }
.comp-row.t-S { --tc: #ff7075; border-left-color: var(--tc); }
.comp-row.t-A { --tc: #f2bb54; border-left-color: var(--tc); }
.comp-row.t-B { --tc: #ad91e8; border-left-color: var(--tc); }
.comp-row.t-C { --tc: #76ade0; border-left-color: var(--tc); }
.comp-grade { position: relative; flex: 0 0 64px; display: grid; place-items: center; font-size: 30px; font-weight: 900; color: var(--tc); background: linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.01)); text-shadow: 0 0 24px color-mix(in srgb, var(--tc) 40%, transparent); }
.comp-grade::after { content: ""; position: absolute; top: 14%; bottom: 14%; right: 0; width: 1px; background: linear-gradient(transparent, #ffffff12, transparent); }
.comp-content { flex: 1; min-width: 0; padding: 12px 16px 11px; }
.comp-titlebar { display: flex; align-items: flex-start; gap: 10px; }
.comp-title { flex: 1; min-width: 0; }
.comp-title h2 { display: inline; margin: 0; color: #f0ede5; font-size: 16.5px; line-height: 1.4; font-weight: 800; letter-spacing: .01em; }
.comp-badges { display: inline-flex; gap: 4px; margin-left: 9px; vertical-align: 1px; }
.comp-badge { display: inline-block; padding: 1px 7px; border-radius: 4px; border: 1px solid #3d424a; background: #24272c; color: #9298a2; font-size: 10.5px; font-weight: 500; }
.comp-actions { display: flex; gap: 4px; align-items: center; flex: none; }
.comp-icon-btn { display: grid; place-items: center; background: transparent; border: 1px solid transparent; border-radius: 5px; color: #8f959e; width: 30px; height: 30px; cursor: pointer; font-size: 14px; transition: color .15s, background .15s, border-color .15s; }
.comp-icon-btn:hover { color: #ffe09b; border-color: #4b4f58; background: #2a2d32; }
.comp-icon-btn.action { background: #23262b; border-color: #3c4149; color: #b8bdc6; font-size: 12px; font-weight: 700; }
.comp-icon-btn.action:hover { background: #2e3238; border-color: #6f747d; color: #ffe09b; }
.comp-expand { transition: transform .15s; }
.comp-row.open .comp-expand { transform: rotate(180deg); }
.comp-traits { display: flex; flex-wrap: wrap; gap: 5px; margin: 7px 0 8px; }
.trait-chip { display: inline-flex; align-items: center; gap: 5px; background: #26292e; border: 1px solid #3b3f46; color: #c2c7cf; border-radius: 6px; padding: 2px 8px 2px 3px; font-size: 12px; line-height: 20px; white-space: nowrap; }
.trait-chip.active { background: linear-gradient(180deg, #302b1e, #28251d); border-color: #5f5128; color: #e5dcc6; }
.trait-chip.more { color: #8c929b; padding: 2px 7px; }
.trait-chip img { width: 16px; height: 16px; border-radius: 2px; }
.trait-chip b { color: #ffd76b; margin-left: 1px; font-weight: 800; font-variant-numeric: tabular-nums; }
.comp-units { display: flex; flex-wrap: wrap; gap: 4px 7px; }
.unit-chunk { width: 58px; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.unit-portrait { position: relative; width: 46px; height: 46px; border: 2px solid var(--cc, #555); border-radius: 5px; background: #101113; box-shadow: 0 2px 6px rgba(0,0,0,.32); transition: transform .15s, filter .15s; }
.unit-chunk:hover .unit-portrait { transform: translateY(-2px); filter: brightness(1.12); }
.unit-portrait img { width: 100%; height: 100%; object-fit: cover; display: block; }
.unit-portrait .star { position: absolute; left: -2px; right: -2px; top: 4px; text-align: center; line-height: 12px; font-size: 12px; letter-spacing: -1.5px; font-weight: 900; color: #ffd76b; text-shadow: 0 1px 2px #000, 0 0 4px #000; pointer-events: none; }
.unit-portrait .cost { position: absolute; right: 1px; bottom: 1px; width: 9px; height: 9px; border-radius: 50%; background: var(--cc, #555); border: 1px solid #000; box-shadow: 0 0 5px var(--cc); }
.unit-portrait .items { position: absolute; left: -3px; right: -3px; bottom: -8px; display: flex; justify-content: center; gap: 1px; }
.unit-portrait .items img { width: 15px; height: 15px; border: 1px solid #000; border-radius: 2px; }
.unit-name { width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: center; color: #9aa0a9; font-size: 10px; line-height: 1.25; }
.comp-stats { flex: 0 0 300px; display: grid; grid-template-columns: repeat(4, 1fr); align-items: center; gap: 0; padding: 11px 7px; border-left: 1px solid #30343b; background: rgba(255,255,255,.012); }
.comp-stat { text-align: center; padding: 2px 5px; border-left: 1px solid rgba(255,255,255,.045); }
.comp-stat:first-child { border-left: 0; }
.comp-stat b { display: block; color: #ece8df; font-size: 16.5px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.comp-stat span { display: block; margin-top: 1px; color: #858a93; font-size: 10px; white-space: nowrap; }
.comp-stat.good b { color: #76dda4; text-shadow: 0 0 14px rgba(107,216,157,.22); }
.comp-detail { flex-basis: 100%; border-top: 1px solid #343840; padding: 16px 18px 18px 80px; background: linear-gradient(180deg, #181a1d, #141619); box-shadow: inset 0 1px 0 rgba(255,255,255,.025); }
.comp-row.open .comp-detail { display: block; animation: detail-in .18s ease-out; }
@keyframes detail-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.detail-grid { display: flex; gap: 26px; align-items: flex-start; }
.mini-board { display: grid; grid-template-columns: repeat(7, 38px); grid-auto-rows: 42px; gap: 3px; flex: none; }
.mini-cell { background: #23262a; border: 1px solid #2f3238; border-radius: 4px; display: grid; place-items: center; position: relative; }
.mini-cell img { width: 30px; height: 30px; border-radius: 3px; border: 1px solid var(--cc,#555); }
.mini-cell .ms { position: absolute; left: 1px; top: 0; color: #ffd76b; font-size: 8px; line-height: 10px; text-shadow: 0 1px 1px #000; }
.detail-copy { flex: 1; min-width: 0; color: #a7acb5; font-size: 12.5px; line-height: 1.65; }
.detail-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 10px; padding-bottom: 8px; border-bottom: 1px solid #2f3339; }
.detail-heading h3 { margin: 0; color: #f0ece2; font-size: 15px; font-weight: 800; letter-spacing: .02em; }
.detail-heading span { color: #807f76; font-size: 10.5px; letter-spacing: .05em; }
.detail-copy p { margin: 0 0 8px; }
.detail-facts { display: flex; flex-wrap: wrap; gap: 7px; margin: 0 0 10px; }
.detail-facts span { display: inline-flex; align-items: baseline; gap: 5px; padding: 4px 9px; background: #202329; border: 1px solid #33373e; border-radius: 5px; color: #8f949d; font-size: 10.5px; }
.detail-facts b { color: #eee8db; font-size: 14px; font-weight: 800; font-variant-numeric: tabular-nums; }
.detail-traits { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 10px !important; }
.detail-traits span { padding: 2px 7px; background: #202329; border: 1px solid #31353c; border-radius: 4px; color: #a9aeb6; font-size: 11px; }
.detail-traits b { color: #ffd76b; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.detail-actions .btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 34px; padding: 0 14px; border-radius: 6px; font-size: 12.5px; font-weight: 700; }
.detail-actions .primary { background: linear-gradient(180deg, #f3c961, #dda93a); color: #241a06; border-color: #f5cf72; box-shadow: inset 0 1px 0 #ffe9a8, 0 3px 10px rgba(233,185,73,.16); text-shadow: 0 1px 0 rgba(255,255,255,.22); }
.list-footer { color: var(--dim); text-align: center; font-size: 11px; padding: 24px 0 20px; }
.app-footer { border-top: 1px solid var(--line); margin-top: 20px; padding: 16px 24px; display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; color: #777b83; font-size: 11px; }
.app-footer nav { display: flex; gap: 14px; }
.app-footer a { color: #8e929a; text-decoration: none; }
.app-footer a:hover { color: #fff; }

/* 数据页 */
.data-main { width: min(1360px, calc(100% - 32px)); margin: 0 auto; padding: 30px 0 34px; }
#dataContent { overflow-x: auto; }
.data-tabs { display: flex; gap: 6px; margin: 16px 0 14px; border-bottom: 1px solid #343840; }
.data-tabs button { background: none; border: 0; border-bottom: 2px solid transparent; color: #9399a2; font: inherit; font-size: 13.5px; font-weight: 600; padding: 9px 16px; cursor: pointer; transition: color .15s, background .15s; }
.data-tabs button:hover { color: #e4dfd4; background: rgba(255,255,255,.025); }
.data-tabs button.on { color: #ffd76b; border-bottom-color: #e9b949; text-shadow: 0 0 16px rgba(233,185,73,.3); }
.data-toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; padding: 10px 12px; background: linear-gradient(180deg, rgba(38,41,46,.75), rgba(31,33,37,.75)); border: 1px solid #343840; border-radius: 10px; }
.data-toolbar .filter-search { min-width: 260px; }
.data-table { width: 100%; border-collapse: separate; border-spacing: 0; background: linear-gradient(180deg, #202227, #1d1f23); border: 1px solid #343840; border-radius: 10px; overflow: hidden; box-shadow: 0 4px 18px rgba(0,0,0,.14); }
.data-table th { text-align: left; background: #26292e; color: #9da3ac; font-size: 10.5px; font-weight: 600; padding: 10px 12px; white-space: nowrap; border-bottom: 1px solid #343840; letter-spacing: .03em; }
.data-table td { border-top: 1px solid #2b2f35; padding: 9px 12px; font-size: 12.5px; vertical-align: middle; color: #c9cdd4; }
.data-table tbody tr:hover td { background: rgba(233,185,73,.035); }
.data-table tbody tr:first-child td { border-top: 0; }
.data-unit { display: flex; align-items: center; gap: 8px; min-width: 150px; }
.data-unit img { width: 42px; height: 42px; border: 2px solid var(--cc,#555); border-radius: 6px; object-fit: cover; box-shadow: 0 2px 7px rgba(0,0,0,.28); }
.data-unit b { display: block; color: #ece8df; font-size: 13.5px; }
.data-unit small { color: #888e97; font-size: 11px; }
.data-trait-list { display: flex; flex-wrap: wrap; gap: 4px; }
.data-trait-list > span { display: inline-flex; align-items: center; gap: 3px; color: #9ba1aa; font-size: 10.5px; }
.data-trait-list img { width: 15px; height: 15px; }
.data-num { text-align: right; font-variant-numeric: tabular-nums; color: #d5d8dd; }

/* 棋子表：固定列宽，费用/定位紧贴棋子列，四维属性等宽居中 */
.units-table { table-layout: fixed; min-width: 1000px; }
.units-table th:nth-child(1) { width: 240px; }
.units-table th:nth-child(2) { width: 88px; }
.units-table th:nth-child(3) { width: 116px; }
.units-table th:nth-child(4) { width: 340px; }
.units-table th:nth-child(5),
.units-table th:nth-child(6),
.units-table th:nth-child(7),
.units-table th:nth-child(8) { width: auto; }
.units-table th.data-num,
.units-table td.data-num { text-align: center; padding-left: 8px; padding-right: 8px; }
.units-table .data-unit { min-width: 0; }
.data-empty { color: var(--dim); text-align: center; padding: 30px; }
.item-cell { display: flex; align-items: center; gap: 7px; }
.item-cell img { width: 42px; height: 42px; border: 1px solid #4b4f56; border-radius: 5px; }
.item-cell b { color: #ece8df; font-size: 13.5px; }
.item-cell small { color: var(--dim); font-size: 10px; display: block; }

/* 羁绊表：固定列宽，身份/评级/类型/档位/效果/单位分区 */
.traits-table { table-layout: fixed; min-width: 1020px; }
.traits-table th:nth-child(1) { width: 270px; }
.traits-table th:nth-child(2) { width: 80px; }
.traits-table th:nth-child(3) { width: 96px; }
.traits-table th:nth-child(4) { width: 136px; }
.traits-table th:nth-child(5) { width: auto; }
.traits-table th:nth-child(6) { width: 232px; }
.traits-table th { padding: 12px 14px; font-size: 11.5px; color: #a7adb7; }
.traits-table td { padding: 12px 14px; vertical-align: middle; }
.traits-table th:nth-child(2), .traits-table td:nth-child(2),
.traits-table th:nth-child(3), .traits-table td:nth-child(3),
.traits-table th:nth-child(4), .traits-table td:nth-child(4) { text-align: center; }
.trait-name-cell { display: flex; align-items: center; gap: 10px; min-width: 0; }
.trait-name-cell .trait-symbol { width: 34px; height: 34px; }
.trait-name-cell .trait-symbol img { width: 22px; height: 22px; }
.trait-name-cell b { color: #f0ece2; font-size: 14.5px; font-weight: 700; line-height: 1.35; }
.trait-rating-cell .grade-badge { min-width: 27px; height: 27px; font-size: 13.5px; border-radius: 6px; }
.trait-type { display: inline-flex; align-items: center; justify-content: center; min-width: 48px; padding: 3px 9px; border: 1px solid #3b4048; border-radius: 999px; background: #24272c; color: #aeb4bd; font-size: 12px; line-height: 18px; }
.trait-type.type-class { border-color: #6d5a2e; background: #2c281d; color: #e2c477; }
.trait-type.type-band { border-color: #355a7b; background: #1e2832; color: #8fc4ee; }
.trait-type.type-unique { border-color: #5c4277; background: #292132; color: #cf9ef0; }
.bp-list { display: inline-flex; flex-wrap: wrap; justify-content: center; gap: 5px; }
.bp-chip { display: inline-grid; place-items: center; min-width: 27px; padding: 2px 7px; border: 1px solid #3d424a; border-radius: 5px; background: #24272c; color: #d9dde3; font-size: 12px; font-weight: 700; line-height: 18px; font-variant-numeric: tabular-nums; }
.bp-list .muted { color: #7d828a; }
.trait-effect { color: #b8bdc5; font-size: 12.5px; line-height: 1.75; }
.trait-units { display: flex; flex-wrap: wrap; gap: 5px; align-content: center; }
.trait-unit-icon { width: 34px; height: 34px; border: 1px solid var(--cc, #555); border-radius: 5px; object-fit: cover; background: #111; }

.data-card-note { color: #80858e; font-size: 11px; line-height: 1.6; margin: 12px 0 0; }
.rating-note { display: inline-flex; align-items: center; gap: 5px; color: #9a9584; }
.rating-note b { color: #d9b55a; }
@media (max-width: 1060px) {
  .comp-stats { flex-basis: 238px; padding-left: 3px; padding-right: 3px; }
  .comp-stat b { font-size: 15px; }
  .comp-stat span { font-size: 9.5px; }
  .comp-content { padding-left: 13px; padding-right: 13px; }
}
@media (max-width: 900px) {
  .comps-head { align-items: flex-start; flex-direction: column; }
  .dataset-meta { width: 100%; justify-content: space-between; }
  .dataset-meta div { flex: 1; }
  .app-filter { align-items: flex-start; flex-direction: column; }
  .comp-stats { flex-basis: 205px; grid-template-columns: repeat(2, 1fr); }
  .comp-stat { text-align: center; }
  .detail-grid { flex-direction: column; align-items: stretch; gap: 16px; }
  .mini-board-panel { align-self: center; }
}
@media (max-width: 640px) {
  .topbar.app-topbar { flex-wrap: wrap; height: auto; min-height: 56px; padding: 8px 12px; gap: 8px; }
  .app-topbar .brand { flex: 0 1 auto; font-size: 14px; white-space: nowrap; }
  .app-topbar .brand .sub { display: none; }
  .app-topbar .app-nav { order: 3; width: 100%; height: 44px; margin-top: 2px; border-top: 1px solid #2e3239; }
  .app-nav a { flex: 1; justify-content: center; padding: 0 4px; font-size: 12px; }
  #accountMount { margin-left: auto; }
  .site-account-btn { padding: 6px 10px; font-size: 12px; }
  .comps-main { width: calc(100% - 20px); padding-top: 18px; }
  .comps-head h1 { font-size: 24px; }
  .dataset-meta { gap: 0; padding: 9px 2px; }
  .dataset-meta div { padding: 0 9px; }
  .dataset-meta b { font-size: 13px; }
  .dataset-meta span { font-size: 9.5px; }
  .filter-search { min-width: 0; width: 100%; }
  .filter-left, .filter-right { width: 100%; }
  .comp-grade { flex-basis: 43px; font-size: 21px; }
  .comp-content { padding: 10px; width: calc(100% - 43px); }
  .comp-stats { flex-basis: 100%; border-left: 0; border-top: 1px solid #2f3238; padding: 7px 10px; }
  .comp-detail { padding: 12px 10px 14px; }
  .mini-board-panel { zoom: .84; }
  .detail-actions { gap: 6px; }
  .detail-actions .btn { flex: 1 1 auto; }
  .data-main { width: calc(100% - 20px); padding-top: 20px; }
  #dataContent { overflow-x: auto; }
  .data-table { min-width: 760px; font-size: 11px; }
  .data-table th:nth-child(5), .data-table td:nth-child(5) { display: none; }
  .data-toolbar .filter-search { min-width: 0; }
  .app-footer { padding: 14px; }
  .topbar .patch-badge { display: none; }
}

/* 法律与错误页 */
.legal-main, .notfound-main { width: min(860px, calc(100% - 32px)); margin: 0 auto; padding: 28px 0 40px; }
.legal-main h1, .notfound-main h1 { font-size: 29px; margin: 4px 0 8px; }
.legal-card { background: #1e2024; border: 1px solid var(--line); border-radius: 10px; padding: 24px 28px; }
.legal-card h2 { font-size: 17px; margin: 22px 0 6px; }
.legal-card h2:first-child { margin-top: 0; }
.legal-card p { color: #c5c8ce; font-size: 13px; }
.legal-card a { color: #e9b949; }
.notfound-main { text-align: center; padding-top: 100px; }
.notfound-main .code { font-size: 72px; color: #e9b949; font-weight: 900; }
.notfound-main p { color: var(--dim); }
@media (max-width: 640px) { .legal-card { padding: 18px; } }

/* 游戏风彩色羁绊符号（原始 PNG 为白色遮罩） */
.trait-symbol {
  display: inline-grid; place-items: center; place-content: center; justify-content: center; width: 20px; height: 20px; flex: none; border-radius: 50%;
  background: #17191d;
  background: color-mix(in srgb, var(--tring, #7b818b) 30%, #131519);
  border: 2px solid var(--tring, #7b818b);
  box-shadow: 0 0 10px color-mix(in srgb, var(--tring, #7b818b) 42%, transparent), inset 0 0 0 1px rgba(0,0,0,.6);
}
.trait-symbol img { display: block; width: 14px; height: 14px; object-fit: contain; filter: brightness(0) invert(1) drop-shadow(0 1px 1px rgba(0,0,0,.9)); opacity: 1; }
.trait-chip .trait-symbol { width: 22px; height: 22px; }
.trait-chip .trait-symbol img { width: 15px; height: 15px; }
.data-trait-list .trait-symbol { width: 23px; height: 23px; }
.data-trait-list .trait-symbol img { width: 16px; height: 16px; }
.data-unit .trait-symbol { width: 21px; height: 21px; }
.data-unit .trait-symbol img { width: 15px; height: 15px; }
.unit-portrait .items .item-icon { width: 14px; height: 14px; }
.unit-portrait .items .item-icon > img { width: 100%; height: 100%; border: 1px solid #000; border-radius: 2px; }
.mini-board-panel { flex: none; padding: 14px 14px 9px; background: #101215; border: 1px solid #30343b; border-radius: 10px; box-shadow: inset 0 1px 0 rgba(255,255,255,.025), 0 4px 16px rgba(0,0,0,.18); }
.mini-hex-board { position: relative; flex: none; }
.mini-hex-board .cell::after { background: #1c1f24; }
.mini-hex-board .cell.front-row::after { background: #211d1d; }
.board-caption { display: flex; justify-content: space-between; gap: 20px; margin-top: 9px; color: #777c85; font-size: 10.5px; letter-spacing: .03em; }
.board-caption span:first-child { color: #b7a878; }
.mini-hex-board .cell { cursor: default; }
.mini-hex-board .unit { pointer-events: none; cursor: default; }
.mini-hex-board .unit .nm { display: none; }
.mini-hex-board .unit .hex img { border: 0; }
.mini-hex-board .unit .hex { box-shadow: 0 0 0 1px rgba(0,0,0,.5); }
/* 小棋盘沿用主棋盘的相对位置（星级压头像上缘、装备贴右侧一列），只缩字号和图标 */
.mini-hex-board .unit .st { font-size: 9px; letter-spacing: -1.3px; }
.mini-hex-board .unit .its { right: -4px; gap: 1px; }
.mini-hex-board .unit .item-icon { width: 11px; height: 11px; }
.mini-hex-board .unit .its:has(.item-icon:nth-child(3)) .item-icon { width: 9.5px; height: 9.5px; }
.detail-actions .btn { background: linear-gradient(180deg, #2d3036, #26292e); color: #d8dbe1; border: 1px solid #474c55; cursor: pointer; text-decoration: none; transition: background .15s, border-color .15s, color .15s, transform .12s; }
.detail-actions .btn > span { color: #8f949d; font-size: 10px; }
.detail-actions .btn:hover { border-color: #717783; color: #fff; transform: translateY(-1px); }
.detail-actions .btn.primary > span { color: #6b5218; }
.detail-actions .btn.enemy { background: linear-gradient(180deg, #392523, #2b1e1d); border-color: #633a36; color: #f0b0a6; }
.detail-actions .btn.enemy > span { color: #b56d64; }
.detail-actions .btn.enemy:hover { border-color: #a45a51; color: #ffd3cc; }
.detail-actions .btn.export { border-color: #4b4635; color: #ddc883; background: linear-gradient(180deg, #302c21, #28251c); }
.detail-actions .btn.export > span { color: #b79a4c; }
.detail-actions .btn.export:hover { border-color: #8f7538; color: #ffe7a0; }
.detail-actions .btn.primary { background: linear-gradient(180deg, #f3c961, #dda93a); border-color: #f5cf72; color: #241a06; font-weight: 900; box-shadow: inset 0 1px 0 #ffe9a8, 0 3px 10px rgba(233,185,73,.16); }
.detail-actions .btn.primary:hover { background: linear-gradient(180deg, #f8d374, #e4b146); border-color: #ffe29a; color: #1d1403; filter: none; }
.detail-grid { align-items: flex-start; }
.detail-copy { padding-top: 2px; }
.loadout { margin: 4px 0 0; }
.loadout h4 { display: flex; align-items: center; gap: 8px; margin: 0 0 9px; color: #e9d9ae; font-size: 13px; font-weight: 700; letter-spacing: .04em; }
.loadout h4::before { content: ""; width: 3px; height: 14px; border-radius: 2px; background: #e9b949; box-shadow: 0 0 8px rgba(233,185,73,.35); }
.loadout-row { display: flex; align-items: center; gap: 8px; min-height: 34px; padding: 4px 0; border-top: 1px solid rgba(255,255,255,.045); }
.loadout-row:first-of-type { border-top: 0; }
.loadout-row > img { width: 32px; height: 32px; border: 2px solid var(--cc,#555); border-radius: 5px; object-fit: cover; box-shadow: 0 2px 7px rgba(0,0,0,.28); }
.loadout-row > b { flex: 0 0 auto; color: #e2ddd2; font-size: 13.5px; font-weight: 700; }
.loadout-stars { flex: 0 0 auto; color: #d8ad47; font-size: 10px; letter-spacing: -1px; }
.loadout-items { display: flex; flex-wrap: wrap; gap: 5px; margin-left: 4px; }
.loadout-items > span { display: inline-flex; align-items: center; gap: 4px; padding: 2px 6px 2px 3px; background: #202329; border: 1px solid #30343b; border-radius: 5px; color: #b3b8c0; font-size: 11.5px; }
.loadout-items .item-icon { width: 19px; height: 19px; }
.item-icon { position: relative; display: inline-block; flex: none; }
.item-icon.radiant::after { content: ""; position: absolute; inset: -2px; background: url("img/radiant-frame.png") center / 100% 100% no-repeat; pointer-events: none; }
.grade-badge { display: inline-grid; place-items: center; min-width: 27px; height: 27px; padding: 0 6px; border-radius: 6px; font-weight: 900; font-size: 13.5px; color: #15171a; box-shadow: none; }
.grade-S { background: #ff7075; } .grade-A { background: #f2bb54; } .grade-B { background: #ad91e8; } .grade-C { background: #76ade0; } .grade-D { background: #9ca5af; }
.grade-none { background: #34373e; color: #9ca5af; box-shadow: none; }
.multi-filter { display: flex; flex-wrap: wrap; gap: 5px; }
.multi-tag { background: #23262b; border: 1px solid #3b3f47; color: #858b94; border-radius: 999px; min-height: 29px; padding: 4px 11px; font: inherit; font-size: 11.5px; cursor: pointer; transition: color .15s, border-color .15s, background .15s; }
.multi-tag.on { color: #f0e8d4; border-color: #75622e; background: linear-gradient(180deg, #322d20, #29251b); box-shadow: inset 0 1px 0 rgba(255,255,255,.04); }
.multi-tag:hover { border-color: #b3923f; color: #e8e2d5; }
.multi-tag.all-tag { border-color: #6d5b2a; background: #2d291d; color: #f0e8d4; font-weight: 800; }
.multi-tag.all-tag.partial { border-color: #7b6a3a; background: #312c20; color: #e8d6a3; }
.multi-tag.all-tag:not(.on) { border-color: #444951; background: #25282d; color: #9aa0a9; }
.role-chip { display: inline-flex; align-items: center; justify-content: center; min-width: 62px; padding: 3px 8px; border: 1px solid #3b4048; border-radius: 999px; background: #24272c; color: #aeb4bd; font-size: 11.5px; line-height: 17px; white-space: nowrap; }
.role-chip.role-tank { border-color: #355a7b; background: #1e2832; color: #8fc4ee; }
.role-chip.role-fighter { border-color: #75552f; background: #2e271d; color: #e8b77a; }
.role-chip.role-physical { border-color: #754842; background: #2e2321; color: #f0a49a; }
.role-chip.role-magic { border-color: #5c4277; background: #292132; color: #cf9ef0; }
.role-chip.role-support { border-color: #456553; background: #263a30; color: #b5e8ce; }
.role-chip.role-emblem { border-color: #6d5b2a; background: #2d291d; color: #e8d28d; }
.item-table { table-layout: fixed; min-width: 980px; }
.item-table th:nth-child(1) { width: 260px; }
.item-table th:nth-child(2) { width: 82px; }
.item-table th:nth-child(3) { width: 112px; }
.item-table th:nth-child(4) { width: 116px; }
.item-table th:nth-child(5) { width: 126px; }
.item-table th:nth-child(6) { width: auto; }
.item-table td { padding: 9px 14px; }
.item-slot { position: relative; display: inline-flex; width: 42px; height: 42px; flex: none; }
.item-slot > img { width: 100%; height: 100%; border: 1px solid #4b4f56; border-radius: 3px; object-fit: cover; }
.item-slot.radiant > img { border-color: #6d5524; }
.item-slot.radiant::after { content: ""; position: absolute; inset: -3px; background: url("img/radiant-frame.png") center / 100% 100% no-repeat; pointer-events: none; filter: drop-shadow(0 0 3px rgba(255,199,84,.45)); }
@media (max-width: 640px) { .mini-hex-board { transform-origin: top left; } }

/* 404 / 法务页的按钮是 <a class="btn">，补一套链接形态，避免出现浏览器默认蓝字下划线 */
.notfound-main .btn, .legal-main .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  margin-top: 12px; color: inherit; text-decoration: none; font-size: 12.5px;
}
