/* ==========================================================================
   AnneRanks · 计分终端
   墨黑底 + 骨白字 + 硫磺绿，Instrument Serif 巨号数字 + JetBrains Mono 数据标签
   ========================================================================== */

@font-face {
  font-family: 'Instrument Serif';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/instrument-serif-latin-400-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Instrument Serif';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/instrument-serif-latin-400-italic.woff2') format('woff2');
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/jetbrains-mono-latin-400-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('fonts/jetbrains-mono-latin-500-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/jetbrains-mono-latin-700-normal.woff2') format('woff2');
}

:root {
  --ink: #0a0a0b;
  --ink-2: #0e0e10;
  --surface: #131315;
  --surface-2: #18181b;
  --bone: #f3f0e7;
  --bone-dim: #b8b4a8;
  --dim: #7e7c74;
  --dim-2: #56544e;
  --line: rgba(243, 240, 231, 0.11);
  --line-2: rgba(243, 240, 231, 0.055);
  --acid: #d7ff3e;
  --acid-dim: rgba(215, 255, 62, 0.14);
  --danger: #ff5233;
  --danger-dim: rgba(255, 82, 51, 0.14);
  --teal: #59d6c4;
  --teal-dim: rgba(89, 214, 196, 0.14);
  --sky: #8ab6ff;
  --sky-dim: rgba(138, 182, 255, 0.14);

  --serif: 'Instrument Serif', 'Source Han Serif SC', 'Noto Serif SC', 'Songti SC', 'SimSun', Georgia, serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans SC', sans-serif;

  --rail: 232px;
  --pad: clamp(18px, 3.2vw, 44px);
  --r: 2px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--bone);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(900px 520px at 8% -6%, rgba(215, 255, 62, 0.055), transparent 70%),
    radial-gradient(760px 520px at 98% 4%, rgba(89, 214, 196, 0.035), transparent 72%),
    linear-gradient(180deg, #0c0c0e 0%, #0a0a0b 42%, #08080a 100%);
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.55;
  background-image:
    repeating-linear-gradient(90deg, transparent 0 63px, var(--line-2) 63px 64px),
    repeating-linear-gradient(0deg, transparent 0 63px, var(--line-2) 63px 64px);
  mask-image: radial-gradient(120% 100% at 50% 0%, #000 20%, transparent 85%);
  -webkit-mask-image: radial-gradient(120% 100% at 50% 0%, #000 20%, transparent 85%);
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

::selection { background: var(--acid); color: #0a0a0b; }

/* ---------- 骨架 ---------- */
.frame {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: var(--rail) minmax(0, 1fr);
  min-height: 100vh;
}

.rail {
  position: sticky;
  top: 0;
  height: 100vh;
  border-right: 1px solid var(--line);
  padding: 26px 0 18px;
  display: flex;
  flex-direction: column;
  gap: 26px;
  background: linear-gradient(180deg, rgba(20, 20, 22, 0.72), rgba(10, 10, 11, 0.35));
  backdrop-filter: blur(6px);
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  text-decoration: none;
  color: inherit;
  padding: 0 22px;
}
.brand-mark {
  flex: none;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  color: var(--acid);
  font-family: var(--serif);
  font-size: 26px;
  line-height: 1;
  padding-bottom: 3px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px rgba(215, 255, 62, 0.06);
}
.brand-text { display: grid; gap: 1px; min-width: 0; }
.brand-text strong {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 21px;
  letter-spacing: 0.01em;
  line-height: 1.1;
}
.brand-text em {
  font-family: var(--mono);
  font-style: normal;
  font-size: 9.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--dim);
}

.nav { display: grid; gap: 1px; padding: 0 12px; }
.nav a {
  position: relative;
  display: grid;
  grid-template-columns: 22px 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  text-decoration: none;
  color: var(--bone-dim);
  border-radius: var(--r);
  transition: color 0.18s, background 0.18s;
}
.nav a i {
  font-family: var(--mono);
  font-style: normal;
  font-size: 10px;
  color: var(--dim-2);
  letter-spacing: 0.04em;
}
.nav a span { font-size: 13.5px; letter-spacing: 0.02em; }
.nav a b {
  font-family: var(--mono);
  font-weight: 400;
  font-size: 8.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dim-2);
  opacity: 0;
  transform: translateX(-3px);
  transition: opacity 0.2s, transform 0.2s;
}
.nav a:hover { color: var(--bone); background: rgba(255, 255, 255, 0.025); }
.nav a:hover b { opacity: 1; transform: none; }
.nav a.active { color: var(--bone); background: rgba(215, 255, 62, 0.055); }
.nav a.active i { color: var(--acid); }
.nav a.active b { opacity: 1; transform: none; color: var(--dim); }
.nav a.active::before {
  content: '';
  position: absolute;
  left: 0; top: 8px; bottom: 8px;
  width: 2px;
  background: var(--acid);
}

.rail-foot { margin-top: auto; padding: 0 22px; display: grid; gap: 12px; }
.season-chip {
  border: 1px solid var(--line);
  padding: 10px 12px;
  display: grid;
  gap: 6px;
  background: var(--ink-2);
}
.sc-label {
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--dim);
}
.sc-value { font-family: var(--mono); font-size: 12.5px; color: var(--bone); }
.sc-bar { height: 2px; background: rgba(255, 255, 255, 0.09); display: block; overflow: hidden; }
.sc-bar i { display: block; height: 100%; width: 0; background: var(--acid); transition: width 1.1s cubic-bezier(0.2, 0.9, 0.2, 1); }
.rail-note {
  margin: 0;
  font-family: var(--mono);
  font-size: 9px;
  line-height: 1.65;
  letter-spacing: 0.06em;
  color: var(--dim-2);
}

/* ---------- 顶栏 ---------- */
.body { display: flex; flex-direction: column; min-width: 0; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 var(--pad);
  height: 58px;
  border-bottom: 1px solid var(--line);
  background: rgba(10, 10, 11, 0.82);
  backdrop-filter: blur(10px) saturate(120%);
}
.crumb {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--dim);
  min-width: 0;
}
.crumb #crumbIdx { color: var(--acid); }
.crumb #crumbName { color: var(--bone); font-size: 11px; letter-spacing: 0.06em; font-family: var(--sans); }

.topbar-right { display: flex; align-items: center; gap: 16px; }

.search { position: relative; display: flex; align-items: center; gap: 8px; }
.search svg {
  width: 14px; height: 14px;
  fill: none; stroke: var(--dim); stroke-width: 1.4;
  flex: none;
}
.search input {
  width: 218px;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  color: var(--bone);
  font-family: var(--mono);
  font-size: 11.5px;
  padding: 5px 2px;
  outline: none;
  transition: border-color 0.2s, width 0.24s;
}
.search input::placeholder { color: var(--dim-2); }
.search input:focus { border-color: var(--acid); width: 264px; }
.search input::-webkit-search-cancel-button { filter: invert(0.7); }

.results {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 320px;
  max-height: 340px;
  overflow: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 24px 48px -24px #000;
  z-index: 40;
}
.results a {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 12px;
  text-decoration: none;
  color: var(--bone-dim);
  border-bottom: 1px solid var(--line-2);
  font-size: 13px;
}
.results a:hover { background: rgba(215, 255, 62, 0.07); color: var(--bone); }
.results a span { font-family: var(--mono); font-size: 11px; color: var(--dim); }
.results a i { font-style: normal; color: var(--acid); font-family: var(--mono); font-size: 10px; }

.clock {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--bone-dim);
  letter-spacing: 0.06em;
  padding-left: 16px;
  border-left: 1px solid var(--line);
}
.clock em { font-style: normal; font-size: 8.5px; color: var(--dim-2); letter-spacing: 0.14em; }

/* ---------- 内容 ---------- */
main { flex: 1; padding: var(--pad) var(--pad) 70px; max-width: 1340px; width: 100%; outline: none; }

.foot {
  display: flex;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
  padding: 22px var(--pad) 26px;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 10px;
  line-height: 1.85;
  color: var(--dim-2);
  letter-spacing: 0.03em;
}
.foot p { margin: 0; }
.foot b { color: var(--dim); font-weight: 500; }
.foot code { color: var(--bone-dim); font-family: inherit; }
.foot-meta { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.foot .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--dim-2); }

/* ---------- 通用排版 ---------- */
.eyebrow {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--dim);
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
}
.eyebrow::before { content: ''; width: 22px; height: 1px; background: var(--acid); opacity: 0.7; }

h1.display {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(38px, 5.6vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.012em;
  margin: 0 0 10px;
}
h1.display em { font-style: italic; color: var(--acid); }
h2.section {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(24px, 2.6vw, 34px);
  line-height: 1.06;
  margin: 0;
}
h2 .num {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--acid);
  vertical-align: super;
  margin-right: 8px;
}
.lead { color: var(--bone-dim); max-width: 56ch; margin: 0; font-size: 13.5px; }
.mono { font-family: var(--mono); }
.dim { color: var(--dim); }
.acid { color: var(--acid); }
.danger { color: var(--danger); }
.teal { color: var(--teal); }
.tnum { font-variant-numeric: tabular-nums; }

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  padding-bottom: 14px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--line);
}
.section-head .meta { font-family: var(--mono); font-size: 10px; color: var(--dim); letter-spacing: 0.08em; text-align: right; }

/* ---------- 卡片 ---------- */
.card {
  position: relative;
  background: linear-gradient(180deg, rgba(24, 24, 27, 0.72), rgba(14, 14, 16, 0.55));
  border: 1px solid var(--line);
}
.card::before, .card::after {
  content: '';
  position: absolute;
  width: 7px; height: 7px;
  border: 1px solid var(--acid);
  opacity: 0.32;
  pointer-events: none;
}
.card::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.card::after { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }
.card-pad { padding: 18px 20px; }
.card-tight { padding: 13px 15px; }

/* ---------- 数据格 ---------- */
.strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  border: 1px solid var(--line);
  background: rgba(19, 19, 21, 0.5);
}
.cell {
  padding: 15px 16px 17px;
  border-right: 1px solid var(--line);
  display: grid;
  gap: 5px;
  align-content: start;
}
.cell:last-child { border-right: 0; }
.cell .k {
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--dim);
}
.cell .v {
  font-family: var(--mono);
  font-size: clamp(19px, 2vw, 24px);
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--bone);
  font-variant-numeric: tabular-nums;
}
.cell .v small { font-size: 0.52em; color: var(--dim); letter-spacing: 0.06em; margin-left: 3px; }
.cell .s { font-family: var(--mono); font-size: 9.5px; color: var(--dim-2); letter-spacing: 0.04em; }

/* ---------- 赛季进度尺 ---------- */
.ruler { margin: 26px 0 0; }
.ruler-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--dim);
  letter-spacing: 0.1em;
  margin-bottom: 8px;
}
.ruler-head b { color: var(--bone); font-weight: 400; }
.ruler-track {
  position: relative;
  height: 34px;
  border-top: 1px solid var(--line);
  background-image: repeating-linear-gradient(90deg, var(--line) 0 1px, transparent 1px 100%);
  background-size: calc(100% / 24) 100%;
  background-repeat: no-repeat;
}
.ruler-fill {
  position: absolute;
  top: -1px; left: 0;
  height: 1px;
  background: var(--acid);
  width: 0;
  transition: width 1.2s cubic-bezier(0.2, 0.9, 0.2, 1);
  box-shadow: 0 0 12px rgba(215, 255, 62, 0.5);
}
.ruler-now {
  position: absolute;
  top: -5px;
  width: 1px;
  height: 12px;
  background: var(--acid);
  transition: left 1.2s cubic-bezier(0.2, 0.9, 0.2, 1);
}
.ruler-now::after {
  content: 'NOW';
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.18em;
  color: var(--acid);
}
.ruler-ticks { position: absolute; inset: 0; display: flex; }
.ruler-ticks span {
  flex: 1;
  border-left: 1px solid transparent;
  font-family: var(--mono);
  font-size: 8px;
  color: var(--dim-2);
  padding-top: 16px;
}
.ruler-ticks span:nth-child(4n+1) { border-left-color: var(--line); }

/* ---------- 榜首 / 领奖台 ---------- */
.champion {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 0;
  border: 1px solid var(--line);
  background: linear-gradient(160deg, rgba(215, 255, 62, 0.055), rgba(19, 19, 21, 0.4) 46%);
}
.champion-main { padding: 26px 28px 24px; border-right: 1px solid var(--line); }
.champion-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--acid);
  border: 1px solid rgba(215, 255, 62, 0.3);
  padding: 4px 9px;
  margin-bottom: 20px;
}
.champion-name {
  font-family: var(--serif);
  font-size: clamp(30px, 3.6vw, 46px);
  line-height: 1.02;
  margin: 0 0 4px;
  letter-spacing: -0.01em;
}
.champion-name a { color: inherit; text-decoration: none; }
.champion-name a:hover { color: var(--acid); }
.champion-sub { font-family: var(--mono); font-size: 10px; color: var(--dim); letter-spacing: 0.08em; }
.champion-score {
  font-family: var(--serif);
  font-size: clamp(58px, 9vw, 108px);
  line-height: 0.86;
  letter-spacing: -0.03em;
  margin: 18px 0 0;
  font-variant-numeric: tabular-nums;
  color: var(--bone);
}
.champion-score small {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--dim);
  margin-left: 12px;
  vertical-align: baseline;
}
.champion-side { display: grid; grid-template-rows: repeat(3, 1fr); }
.podium-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line-2);
  text-decoration: none;
  color: inherit;
  transition: background 0.16s;
}
.podium-row:last-child { border-bottom: 0; }
.podium-row:hover { background: rgba(255, 255, 255, 0.03); }
.podium-rank {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--dim);
  letter-spacing: 0.04em;
}
.podium-name {
  font-family: var(--serif);
  font-size: 21px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.podium-pts { font-family: var(--mono); font-size: 13px; color: var(--bone-dim); font-variant-numeric: tabular-nums; }
.podium-row:hover .podium-name { color: var(--acid); }

/* ---------- 榜单表格 ---------- */
.tbl-wrap { border: 1px solid var(--line); overflow: hidden; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
table.tbl thead th {
  text-align: right;
  font-family: var(--mono);
  font-weight: 400;
  font-size: 8.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dim);
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
  background: rgba(24, 24, 27, 0.6);
  position: sticky;
  top: 0;
}
table.tbl thead th:first-child, table.tbl tbody td:first-child { text-align: left; }
table.tbl thead th.l, table.tbl tbody td.l { text-align: left; }
table.tbl tbody td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line-2);
  text-align: right;
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  color: var(--bone-dim);
  white-space: nowrap;
}
table.tbl tbody tr:last-child td { border-bottom: 0; }
table.tbl tbody tr { transition: background 0.14s; }
table.tbl tbody tr.clickable { cursor: pointer; }
table.tbl tbody tr.clickable:hover { background: rgba(215, 255, 62, 0.05); }
table.tbl tbody tr.clickable:hover .pname { color: var(--acid); }
.pname {
  font-family: var(--sans);
  font-size: 13.5px;
  color: var(--bone);
  display: flex;
  align-items: center;
  gap: 9px;
  white-space: nowrap;
}
.pname .sid { font-family: var(--mono); font-size: 9.5px; color: var(--dim-2); letter-spacing: 0.02em; }
.rk {
  display: inline-grid;
  place-items: center;
  min-width: 26px;
  height: 22px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--dim);
  border: 1px solid var(--line);
  padding: 0 5px;
}
.rk.top { color: #0a0a0b; background: var(--acid); border-color: var(--acid); font-weight: 700; }
.rk.tied { border-style: dashed; }
.bar-cell { position: relative; }
.bar-cell .bar-bg {
  position: absolute;
  inset: 4px auto 4px 6px;
  background: linear-gradient(90deg, rgba(215, 255, 62, 0.16), rgba(215, 255, 62, 0.02));
  width: 0;
  transition: width 0.9s cubic-bezier(0.2, 0.9, 0.2, 1);
  pointer-events: none;
}
.bar-cell .bar-bg.neg { background: linear-gradient(90deg, rgba(255, 82, 51, 0.18), rgba(255, 82, 51, 0.02)); }
.bar-cell span.val { position: relative; }
.delta { font-size: 11px; color: var(--dim); }
.delta.lead { color: var(--acid); }

/* ---------- 徽标 ---------- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 7px;
  border: 1px solid var(--line);
  color: var(--bone-dim);
  white-space: nowrap;
}
.chip.acid { border-color: rgba(215, 255, 62, 0.35); color: var(--acid); background: var(--acid-dim); }
.chip.danger { border-color: rgba(255, 82, 51, 0.35); color: var(--danger); background: var(--danger-dim); }
.chip.teal { border-color: rgba(89, 214, 196, 0.3); color: var(--teal); background: var(--teal-dim); }
.chip.sky { border-color: rgba(138, 182, 255, 0.3); color: var(--sky); background: var(--sky-dim); }
.chip.ghost { color: var(--dim); }
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; }

.diff {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  padding: 2px 7px;
  border: 1px solid currentColor;
  color: var(--bone-dim);
  white-space: nowrap;
}
.diff.d1 { color: #8fd18f; }
.diff.d2 { color: #9bd0e8; }
.diff.d3 { color: #e0c96a; }
.diff.d4 { color: #ff9c5a; }
.diff.d5 { color: #ff6a5a; }
.diff.d6 { color: #d68cff; }
.diff.d0 { color: var(--dim); }

/* ---------- 过滤条 ---------- */
.filters {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.filters .lbl { font-family: var(--mono); font-size: 9px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--dim-2); }
.fbtn {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  padding: 5px 11px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--bone-dim);
  cursor: pointer;
  transition: all 0.16s;
}
.fbtn:hover { border-color: rgba(243, 240, 231, 0.3); color: var(--bone); }
.fbtn.on { border-color: var(--acid); color: var(--acid); background: var(--acid-dim); }

/* ---------- 记录卡 ---------- */
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); gap: 14px; }
.rec {
  position: relative;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(24, 24, 27, 0.66), rgba(13, 13, 15, 0.5));
  padding: 16px 17px 14px;
  display: grid;
  gap: 11px;
  transition: border-color 0.2s, transform 0.2s, background 0.2s;
  cursor: pointer;
}
.rec:hover { border-color: rgba(215, 255, 62, 0.4); transform: translateY(-2px); background: linear-gradient(180deg, rgba(215, 255, 62, 0.05), rgba(13, 13, 15, 0.6)); }
.rec-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.rec-map { font-family: var(--serif); font-size: 19px; line-height: 1.15; }
.rec-sub { font-family: var(--mono); font-size: 9px; color: var(--dim); letter-spacing: 0.1em; text-transform: uppercase; }
.rec-time {
  font-family: var(--serif);
  font-size: 42px;
  line-height: 0.9;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.rec-time small { font-family: var(--mono); font-size: 9.5px; color: var(--dim-2); letter-spacing: 0.14em; margin-left: 8px; }
.rec-roster { font-size: 11.5px; color: var(--bone-dim); line-height: 1.5; }
.rec-foot {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 9.5px; color: var(--dim-2);
  border-top: 1px solid var(--line-2); padding-top: 9px;
}

/* ---------- 时间线 ---------- */
.tl { position: relative; padding-left: 26px; }
.tl::before { content: ''; position: absolute; left: 5px; top: 6px; bottom: 6px; width: 1px; background: var(--line); }
.tl-item { position: relative; padding: 0 0 20px; }
.tl-item::before {
  content: '';
  position: absolute;
  left: -24px; top: 7px;
  width: 7px; height: 7px;
  background: var(--ink);
  border: 1px solid var(--acid);
  transform: rotate(45deg);
}
.tl-day {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.tl-day b { color: var(--bone); font-weight: 400; letter-spacing: 0.04em; }
.tl-row {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: baseline;
  padding: 7px 0;
  border-bottom: 1px solid var(--line-2);
}
.tl-row:last-child { border-bottom: 0; }
.tl-time { font-family: var(--mono); font-size: 11px; color: var(--dim); }
.tl-main { font-size: 13px; }
.tl-main b { font-weight: 400; color: var(--bone); }
.tl-main small { display: block; font-family: var(--mono); font-size: 9.5px; color: var(--dim); margin-top: 2px; }
.tl-sec { font-family: var(--mono); font-size: 12px; color: var(--acid); font-variant-numeric: tabular-nums; }

/* ---------- 玩家名片 ---------- */
.plate { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: end; }
.plate-id { display: grid; gap: 6px; }
.plate-name { font-family: var(--serif); font-size: clamp(36px, 5vw, 64px); line-height: 0.95; margin: 0; letter-spacing: -0.015em; }
.plate-sid { font-family: var(--mono); font-size: 10.5px; color: var(--dim); letter-spacing: 0.06em; }
.plate-badges { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.badge-big {
  border: 1px solid var(--line);
  padding: 9px 14px;
  text-align: right;
  display: grid;
  gap: 2px;
  min-width: 104px;
  background: var(--ink-2);
}
.badge-big .v { font-family: var(--mono); font-size: 22px; line-height: 1; letter-spacing: -0.02em; }
.badge-big .v small { font-size: 10px; color: var(--dim); }
.badge-big .k { font-family: var(--mono); font-size: 8px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--dim); }

/* 分数构成：分段条 */
.compo-bar { display: flex; height: 26px; border: 1px solid var(--line); overflow: hidden; background: var(--ink-2); }
.compo-seg { position: relative; height: 100%; width: 0; transition: width 1s cubic-bezier(0.2, 0.9, 0.2, 1); }
.compo-seg:hover { filter: brightness(1.25); }
.compo-seg.kill { background: var(--acid); }
.compo-seg.advance { background: var(--teal); }
.compo-seg.support { background: var(--sky); }
.compo-seg.penalty { background: var(--danger); }
.compo-seg.other { background: #7a7568; }
.compo-legend { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 12px; }
.compo-legend div { display: flex; align-items: center; gap: 7px; font-family: var(--mono); font-size: 10px; color: var(--bone-dim); letter-spacing: 0.04em; }
.compo-legend i { width: 9px; height: 9px; display: block; }
.compo-legend i.kill { background: var(--acid); }
.compo-legend i.advance { background: var(--teal); }
.compo-legend i.support { background: var(--sky); }
.compo-legend i.penalty { background: var(--danger); }
.compo-legend i.other { background: #7a7568; }
.compo-legend b { color: var(--bone); font-weight: 400; }

.grp-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.grp {
  border: 1px solid var(--line);
  padding: 14px 15px;
  display: grid;
  gap: 10px;
  align-content: start;
  background: rgba(19, 19, 21, 0.4);
}
.grp-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.grp-name { font-family: var(--serif); font-size: 19px; }
.grp-total { font-family: var(--mono); font-size: 13px; font-variant-numeric: tabular-nums; }
.grp-total.neg { color: var(--danger); }
.grp-desc { font-size: 11.5px; color: var(--dim); margin: 0; line-height: 1.5; }
.grp-items { display: grid; gap: 1px; }
.grp-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: baseline;
  padding: 5px 0;
  border-top: 1px solid var(--line-2);
  font-size: 11.5px;
}
.grp-item .n { color: var(--bone-dim); }
.grp-item .t { font-family: var(--mono); font-size: 9.5px; color: var(--dim-2); }
.grp-item .v { font-family: var(--mono); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.grp-item .v.neg { color: var(--danger); }

/* 曲线 */
.chart { width: 100%; height: 132px; display: block; overflow: visible; }
.chart .grid-l { stroke: var(--line-2); stroke-width: 1; }
.chart .line { fill: none; stroke: var(--acid); stroke-width: 1.5; }
.chart .area { fill: url(#fadeAcid); }
.chart .dot { fill: var(--acid); }
.chart text { font-family: var(--mono); font-size: 8px; fill: var(--dim); letter-spacing: 0.08em; }

/* 热力 */
.heat { width: 100%; border-collapse: collapse; font-family: var(--mono); font-size: 10.5px; }
.heat th {
  font-weight: 400; color: var(--dim); font-size: 8.5px; letter-spacing: 0.12em;
  text-transform: uppercase; padding: 6px 8px; text-align: right; border-bottom: 1px solid var(--line);
}
.heat th:first-child { text-align: left; }
.heat td { padding: 5px 8px; text-align: right; border-bottom: 1px solid var(--line-2); color: var(--bone-dim); }
.heat td:first-child { text-align: left; font-family: var(--sans); color: var(--bone); font-size: 12px; }
.heat td.hc { color: #0a0a0b; font-weight: 500; }

/* 横向条 */
.hbars { display: grid; gap: 3px; }
.hbar {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr) 84px;
  gap: 12px;
  align-items: center;
  padding: 7px 0;
  border-bottom: 1px solid var(--line-2);
}
.hbar:last-child { border-bottom: 0; }
.hbar .n { font-size: 12.5px; color: var(--bone); display: grid; gap: 1px; }
.hbar .n small { font-family: var(--mono); font-size: 8.5px; color: var(--dim-2); letter-spacing: 0.06em; }
.hbar .track { height: 9px; background: rgba(255, 255, 255, 0.045); position: relative; overflow: hidden; }
.hbar .track i { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--acid); transition: width 0.9s cubic-bezier(0.2, 0.9, 0.2, 1); }
.hbar .track i.teal { background: var(--teal); }
.hbar .track i.sky { background: var(--sky); }
.hbar .track i.danger { background: var(--danger); }
.hbar .v { font-family: var(--mono); font-size: 11.5px; color: var(--bone-dim); text-align: right; font-variant-numeric: tabular-nums; }

/* 直方图 */
.hist { display: flex; align-items: flex-end; gap: 4px; height: 108px; margin-top: 8px; }
.hist div { flex: 1; background: rgba(215, 255, 62, 0.18); position: relative; height: 2px; transition: height 0.8s cubic-bezier(0.2, 0.9, 0.2, 1); }
.hist div span {
  position: absolute; top: -15px; left: 0; right: 0; text-align: center;
  font-family: var(--mono); font-size: 9px; color: var(--dim);
}
.hist div b {
  position: absolute; bottom: -17px; left: 0; right: 0; text-align: center;
  font-family: var(--mono); font-size: 8.5px; color: var(--dim-2); font-weight: 400; white-space: nowrap;
}


/* ---------- 战役推进 ---------- */
.camp {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(24, 24, 27, 0.5), rgba(13, 13, 15, 0.35));
  padding: 13px 15px 15px;
}
.camp-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding-bottom: 10px;
  margin-bottom: 11px;
  border-bottom: 1px solid var(--line-2);
}
.camp-name {
  font-family: var(--serif);
  font-size: 20px;
  display: flex;
  align-items: baseline;
  gap: 9px;
}
.camp-name i {
  font-family: var(--mono);
  font-style: normal;
  font-size: 9px;
  letter-spacing: 0.16em;
  color: var(--dim-2);
  text-transform: uppercase;
}
.camp-prog { font-size: 10.5px; color: var(--dim); letter-spacing: 0.08em; }
.camp-chapters {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: 7px;
}
.chap {
  border: 1px dashed var(--line);
  padding: 8px 10px;
  display: grid;
  gap: 3px;
  align-content: start;
  position: relative;
}
.chap.on {
  border: 1px solid rgba(215, 255, 62, 0.32);
  background: rgba(215, 255, 62, 0.045);
}
.chap.on::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 1px;
  background: var(--acid);
  opacity: 0.75;
}
.chap-name { font-size: 12.5px; color: var(--bone); line-height: 1.3; }
.chap:not(.on) .chap-name { color: var(--dim); }
.chap-time {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--acid);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.chap .diff { margin-top: 1px; justify-self: start; }

/* ---------- 空状态 / 提示 ---------- */
.empty {
  border: 1px dashed var(--line);
  padding: 22px;
  display: grid;
  gap: 7px;
  justify-items: start;
  background: repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.014) 0 8px, transparent 8px 16px);
}
.empty b { font-family: var(--serif); font-size: 18px; font-weight: 400; }
.empty p { margin: 0; font-size: 12px; color: var(--dim); max-width: 62ch; line-height: 1.65; }
.empty code { font-family: var(--mono); font-size: 11px; color: var(--bone-dim); }

.note {
  display: flex;
  gap: 10px;
  padding: 10px 13px;
  border-left: 2px solid var(--acid);
  background: rgba(215, 255, 62, 0.04);
  font-size: 12px;
  color: var(--bone-dim);
  line-height: 1.6;
}
.note.warn { border-left-color: var(--danger); background: rgba(255, 82, 51, 0.05); }
.note b { color: var(--bone); font-weight: 500; }

/* ---------- 走马灯 ---------- */
.ticker {
  position: relative;
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(10, 10, 11, 0.6);
  margin-top: 22px;
}
.ticker-track { display: flex; width: max-content; animation: slide 46s linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 20px;
  border-right: 1px solid var(--line-2);
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--bone-dim);
  white-space: nowrap;
  letter-spacing: 0.03em;
}
.ticker-item b { color: var(--bone); font-weight: 400; }
.ticker-item i { font-style: normal; color: var(--dim-2); }
.ticker-item s { text-decoration: none; color: var(--acid); font-size: 11px; }
.ticker-item s.neg { color: var(--danger); }
@keyframes slide { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- 骨架 ---------- */
.sk { background: linear-gradient(90deg, rgba(255,255,255,0.03), rgba(255,255,255,0.07), rgba(255,255,255,0.03)); background-size: 240% 100%; animation: shimmer 1.4s ease-in-out infinite; }
@keyframes shimmer { from { background-position: 120% 0; } to { background-position: -120% 0; } }
.sk-line { height: 12px; margin-bottom: 10px; }
.sk-block { height: 160px; }

/* ---------- 进入动画 ---------- */
.rise { opacity: 0; transform: translateY(10px); animation: rise 0.62s cubic-bezier(0.2, 0.9, 0.2, 1) forwards; }
@keyframes rise { to { opacity: 1; transform: none; } }
.d1 { animation-delay: 0.04s; } .d2 { animation-delay: 0.1s; } .d3 { animation-delay: 0.16s; }
.d4 { animation-delay: 0.22s; } .d5 { animation-delay: 0.28s; } .d6 { animation-delay: 0.34s; }

/* ---------- 错误 ---------- */
.err {
  border: 1px solid rgba(255, 82, 51, 0.35);
  background: rgba(255, 82, 51, 0.06);
  padding: 18px 20px;
  display: grid;
  gap: 8px;
  justify-items: start;
}
.err b { font-family: var(--serif); font-size: 20px; font-weight: 400; color: var(--danger); }
.err code { font-family: var(--mono); font-size: 11px; color: var(--bone-dim); }

/* ---------- 弹层 ---------- */
.sheet {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(5, 5, 6, 0.78);
  backdrop-filter: blur(5px);
  animation: fade 0.2s ease;
}
@keyframes fade { from { opacity: 0; } }
.sheet-box {
  width: min(760px, 100%);
  max-height: 84vh;
  overflow: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 40px 90px -40px #000;
  animation: rise2 0.28s cubic-bezier(0.2, 0.9, 0.2, 1);
}
@keyframes rise2 { from { opacity: 0; transform: translateY(14px); } }
.sheet-head {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 16px;
  padding: 20px 22px 16px; border-bottom: 1px solid var(--line);
}
.sheet-head h3 { font-family: var(--serif); font-weight: 400; font-size: 28px; margin: 0 0 4px; }
.sheet-close {
  background: transparent; border: 1px solid var(--line); color: var(--dim);
  width: 28px; height: 28px; cursor: pointer; font-family: var(--mono); font-size: 13px;
  transition: all 0.16s; flex: none;
}
.sheet-close:hover { color: var(--acid); border-color: var(--acid); }
.sheet-body { padding: 18px 22px 24px; display: grid; gap: 16px; }
.kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 1px; background: var(--line-2); border: 1px solid var(--line-2); }
.kv div { background: var(--ink-2); padding: 9px 11px; display: grid; gap: 3px; }
.kv .k { font-family: var(--mono); font-size: 8px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--dim-2); }
.kv .v { font-family: var(--mono); font-size: 12.5px; color: var(--bone); }

/* ---------- 布局工具 ---------- */
.row { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.between { justify-content: space-between; }
.cols-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; }
.cols-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.gap-sm { gap: 8px; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 10px; } .mt-2 { margin-top: 18px; } .mt-3 { margin-top: 28px; } .mt-4 { margin-top: 40px; }
.mb-1 { margin-bottom: 10px; } .mb-2 { margin-bottom: 18px; }
.stack { display: grid; gap: 16px; }
.mini { font-family: var(--mono); font-size: 9.5px; color: var(--dim); letter-spacing: 0.06em; }

/* ---------- 移动端 ---------- */
@media (max-width: 1080px) {
  .champion { grid-template-columns: 1fr; }
  .champion-main { border-right: 0; border-bottom: 1px solid var(--line); }
}

/* 移动端横向导航：隐藏滚动条，只保留滑动 */
.rail { scrollbar-width: none; -ms-overflow-style: none; }
.rail::-webkit-scrollbar { display: none; }

@media (max-width: 900px) {
  .frame { grid-template-columns: 1fr; }
  .rail {
    position: sticky;
    top: 0;
    height: auto;
    z-index: 30;
    flex-direction: row;
    align-items: center;
    gap: 0;
    padding: 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    background: rgba(10, 10, 11, 0.94);
    backdrop-filter: blur(12px);
    overflow-x: auto;
  }
  .brand { padding: 10px 14px; border-right: 1px solid var(--line); }
  .brand-mark { width: 30px; height: 30px; font-size: 19px; }
  .brand-text em { display: none; }
  .brand-text strong { font-size: 16px; }
  .nav { display: flex; padding: 0; gap: 0; }
  .nav a { grid-template-columns: auto auto; padding: 12px 11px; gap: 5px; }
  .nav a i { display: none; }
  .nav a span { font-size: 12.5px; white-space: nowrap; }
  .nav a b { display: none; }
  .nav a.active::before { left: 8px; right: 8px; top: auto; bottom: 0; width: auto; height: 2px; }
  .rail-foot { display: none; }
  .topbar { top: 49px; }
  .search input { width: 130px; }
  .search input:focus { width: 168px; }
  .clock { display: none; }
  .plate { grid-template-columns: 1fr; }
  .plate-badges { justify-content: flex-start; }
  table.tbl { font-size: 12px; }
  table.tbl thead th, table.tbl tbody td { padding: 9px 10px; }
  .hbar { grid-template-columns: 96px minmax(0, 1fr) 68px; gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .ticker-track { animation: none; }
}
