/* =====================================================================
   巡游天国人工湖 · 视觉系统
   墨黑底 · 金色线描 · 湖青辅色 · HUD 角标
   ===================================================================== */
:root {
  --bg: #06080d;
  --ink: #ece6d8;
  --ink-2: #b9b2a3;
  --ink-3: #807a6e;
  --ink-4: #4f4b43;
  --gold: #d9bb7f;
  --gold-hi: #f3dfb0;
  --gold-lo: #8a7447;
  --dom: #e2c07c;
  --intl: #79cfdb;
  --danger: #ff6f61;
  --warn: #f0c46b;
  --ok: #7fe0c3;
  --line: rgba(217, 187, 127, .15);
  --line-2: rgba(217, 187, 127, .34);
  --panel-bg: linear-gradient(180deg, rgba(21, 27, 39, .74), rgba(9, 12, 19, .82));

  --serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", "SimSun", serif;
  --sans: "HarmonyOS Sans SC", "MiSans", "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", system-ui, sans-serif;
  --num: "Bahnschrift", "DIN Alternate", "DIN Pro", "Roboto Condensed", "Segoe UI", var(--sans);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
html { scrollbar-gutter: stable; }
[hidden] { display: none !important; }

body {
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(1100px 560px at 50% -12%, rgba(217, 187, 127, .11), transparent 62%),
    radial-gradient(900px 700px at 88% 115%, rgba(121, 207, 219, .08), transparent 60%),
    radial-gradient(700px 500px at 0% 100%, rgba(217, 187, 127, .05), transparent 60%),
    linear-gradient(180deg, #080b12 0%, #05070b 100%);
  background-attachment: fixed;
}
/* 细网格 + 暗角 */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(217, 187, 127, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(217, 187, 127, .035) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at 50% 40%, #000 20%, transparent 75%);
}
body::after {
  content: "";
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 55%, rgba(0, 0, 0, .55) 100%);
}

::selection { background: rgba(217, 187, 127, .35); color: #fff; }
button, input { font: inherit; color: inherit; }
:focus-visible { outline: 1px solid var(--gold); outline-offset: 3px; }

.defs { position: absolute; width: 0; height: 0; overflow: hidden; }

#lake {
  position: fixed; inset: 0; z-index: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  transition: opacity 1.4s ease;
}
body[data-view="console"] #lake { opacity: .4; }

.grain {
  position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: .05;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

/* 角标：HUD 括号 */
.corners { position: relative; }
.corners::before, .corners::after {
  content: "";
  position: absolute;
  width: 14px; height: 14px;
  pointer-events: none;
  transition: width .4s var(--ease), height .4s var(--ease), border-color .3s;
}
.corners::before { top: -1px; left: -1px; border-top: 1px solid var(--gold); border-left: 1px solid var(--gold); }
.corners::after { right: -1px; bottom: -1px; border-right: 1px solid var(--gold); border-bottom: 1px solid var(--gold); }

/* ===================================================================== BOOT */
.boot {
  position: fixed; inset: 0; z-index: 5;
  display: grid; place-content: center; justify-items: center; gap: 6px;
  animation: fadeIn .6s ease both;
}
.boot-mark { position: relative; width: 88px; height: 88px; margin-bottom: 18px; }
.boot-emblem { width: 100%; height: 100%; color: var(--gold); filter: drop-shadow(0 0 16px rgba(217, 187, 127, .4)); animation: breathe 2.4s ease-in-out infinite; }
.boot-orbit {
  position: absolute; inset: -14px;
  border-radius: 50%;
  border: 1px solid transparent;
  border-top-color: var(--gold-hi);
  border-right-color: rgba(217, 187, 127, .25);
  animation: spin 1.4s linear infinite;
}
.boot-text { margin: 0; font: 500 15px var(--serif); letter-spacing: .5em; padding-left: .5em; color: var(--gold-hi); }
.boot-text::after { content: ""; animation: dots 1.5s steps(4) infinite; }
.boot-en { margin: 0; font-size: 10px; letter-spacing: .45em; padding-left: .45em; color: var(--ink-4); }

/* ===================================================================== GATE */
.gate {
  position: relative; z-index: 2;
  min-height: 100vh;
  display: grid; place-items: center;
  padding: 64px 20px 72px;
}
.hud-frame i {
  position: fixed; width: 36px; height: 36px; pointer-events: none;
  border-color: var(--line-2); border-style: solid; border-width: 0;
}
.hud-frame i:nth-child(1) { top: 22px; left: 22px; border-top-width: 1px; border-left-width: 1px; }
.hud-frame i:nth-child(2) { top: 22px; right: 22px; border-top-width: 1px; border-right-width: 1px; }
.hud-frame i:nth-child(3) { bottom: 22px; left: 22px; border-bottom-width: 1px; border-left-width: 1px; }
.hud-frame i:nth-child(4) { bottom: 22px; right: 22px; border-bottom-width: 1px; border-right-width: 1px; }

.gate-side {
  position: fixed; top: 50%; margin: 0;
  writing-mode: vertical-rl;
  font-size: 10.5px; letter-spacing: .5em; color: var(--ink-4);
  transform: translateY(-50%);
  white-space: nowrap;
}
.gate-side-l { left: 34px; }
.gate-side-r { right: 34px; }

.gate-card {
  width: min(452px, 100%);
  text-align: center;
  animation: rise 1s var(--ease) both;
}
.gate-emblem {
  width: 116px; height: 116px;
  color: var(--gold);
  filter: drop-shadow(0 0 22px rgba(217, 187, 127, .35));
  overflow: visible;
}
.ge-spin, .ge-spin-slow { transform-origin: 60px 60px; }
.ge-spin { animation: spin 18s linear infinite; }
.ge-spin-slow { animation: spin 60s linear infinite reverse; }
.ge-wave { stroke-dasharray: 80; animation: wave 3.2s ease-in-out infinite; }

.eyebrow {
  margin: 24px 0 14px;
  --tracking: clamp(1px, .8vw, 4.83px);
  font-size: clamp(9px, 2.5vw, 10.5px);
  letter-spacing: var(--tracking); padding-left: var(--tracking);
  white-space: nowrap; line-height: 1.6; transform-origin: center;
  color: var(--gold); opacity: .85;
}
.gate-title {
  margin: 0;
  font: 600 clamp(34px, 6vw, 48px)/1.15 var(--serif);
  letter-spacing: .2em; padding-left: .2em;
  background: linear-gradient(180deg, #fff8e6 0%, #ead5a4 55%, #b29357 100%);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 18px rgba(217, 187, 127, .25));
}
.gate-sub { margin: 16px 0 0; color: var(--ink-3); font-size: 13px; letter-spacing: .22em; padding-left: .22em; }

.divider { display: flex; align-items: center; gap: 12px; width: 260px; margin: 30px auto 28px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--line-2)); }
.divider::after { transform: scaleX(-1); }
.divider span { width: 7px; height: 7px; border: 1px solid var(--gold); transform: rotate(45deg); }

.gate-form {
  padding: 28px 28px 22px;
  text-align: left;
  background: var(--panel-bg);
  border: 1px solid var(--line);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .8);
}
.gate-form:focus-within::before, .gate-form:focus-within::after { width: 26px; height: 26px; }

.field-label { display: flex; justify-content: space-between; align-items: baseline; }
.field-label span:first-child { font: 500 13px var(--serif); letter-spacing: .26em; color: var(--ink-2); }
.field-label .en { font-size: 9.5px; letter-spacing: .34em; color: var(--ink-4); }

.field {
  position: relative;
  display: flex; align-items: center;
  height: 54px; margin-top: 12px;
  background: rgba(4, 6, 10, .65);
  border: 1px solid var(--line);
  transition: border-color .25s, box-shadow .25s;
}
.field::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-hi), transparent);
  transform: scaleX(0); transition: transform .45s var(--ease);
}
.field:focus-within { border-color: var(--line-2); box-shadow: 0 0 0 4px rgba(217, 187, 127, .06), inset 0 0 28px rgba(217, 187, 127, .05); }
.field:focus-within::after { transform: scaleX(1); }
.field-icon { width: 18px; height: 18px; margin: 0 12px 0 16px; color: var(--gold-lo); flex: none; transition: color .25s; }
.field:focus-within .field-icon { color: var(--gold); }
.field input {
  flex: 1; min-width: 0; height: 100%;
  background: transparent; border: 0; outline: 0;
  font-size: 16px; letter-spacing: .14em;
}
.field input::placeholder { color: var(--ink-4); letter-spacing: .1em; }
.field input:disabled { opacity: .5; }
.field-btn {
  width: 48px; height: 100%; flex: none;
  display: grid; place-items: center;
  background: transparent; border: 0; cursor: pointer;
  color: var(--ink-3); transition: color .2s;
}
.field-btn:hover { color: var(--gold-hi); }
.field-btn svg { width: 18px; height: 18px; }
.field.shake { animation: shake .42s cubic-bezier(.36, .07, .19, .97); border-color: rgba(255, 111, 97, .55); }

.field-hint { min-height: 20px; margin: 10px 0 0; font-size: 12.5px; letter-spacing: .08em; color: var(--ink-3); }
.field-hint:empty { min-height: 0; margin: 0; }
#caps { margin-top: 10px; }
.field-hint.error { color: var(--danger); }
.field-hint.ok { color: var(--ok); }
.field-hint.warn { color: var(--warn); }

.btn-primary {
  position: relative; overflow: hidden;
  width: 100%; height: 54px; margin-top: 18px;
  display: flex; align-items: center; justify-content: center; gap: 14px;
  border: 0; cursor: pointer;
  clip-path: polygon(14px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%, 0 14px);
  background: linear-gradient(90deg, #b6955a, #efdaa6 50%, #b6955a);
  color: #17130b;
  font: 700 15px var(--serif); letter-spacing: .55em; text-indent: .55em;
  transition: filter .25s, transform .2s;
}
.btn-primary::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: -40%; width: 30%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .55), transparent);
  transform: skewX(-24deg);
  transition: left .7s var(--ease);
}
.btn-primary:hover:not(:disabled) { filter: brightness(1.08) saturate(1.05); }
.btn-primary:hover:not(:disabled)::before { left: 120%; }
.btn-primary:active:not(:disabled) { transform: translateY(1px); }
.btn-primary:disabled { cursor: not-allowed; filter: grayscale(.7) brightness(.6); }
.btn-arrow { width: 18px; height: 18px; transition: transform .3s var(--ease); }
.btn-primary:hover:not(:disabled) .btn-arrow { transform: translateX(4px); }
.btn-spin { display: none; width: 16px; height: 16px; border: 1.5px solid rgba(23, 19, 11, .3); border-top-color: #17130b; border-radius: 50%; animation: spin .7s linear infinite; }
.btn-primary.loading { filter: none !important; cursor: progress; }
.btn-primary.loading .btn-arrow { display: none; }
.btn-primary.loading .btn-spin { display: block; }

.gate-note { margin: 16px 0 0; text-align: center; font-size: 12px; letter-spacing: .14em; color: var(--ink-4); }
.gate-foot {
  position: absolute; left: 0; right: 0; bottom: 26px; margin: 0;
  text-align: center; font-size: 11px; letter-spacing: .3em; color: var(--ink-4);
}
.gate-foot span { color: var(--gold-lo); margin: 0 .6em; }

.gate.leaving .gate-card { animation: leave .75s var(--ease) forwards; }
.gate.leaving .gate-side, .gate.leaving .gate-foot, .gate.leaving .hud-frame { transition: opacity .5s; opacity: 0; }

/* ===================================================================== CONSOLE */
.console {
  position: relative; z-index: 2;
  max-width: 1600px; margin: 0 auto;
  padding: 0 28px 28px;
}

.topbar {
  position: sticky; top: 0; z-index: 20;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px;
  height: 76px; margin: 0 -28px 22px; padding: 0 28px;
  background: linear-gradient(180deg, rgba(6, 8, 13, .94), rgba(6, 8, 13, .72));
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  animation: fadeDown .7s var(--ease) both;
}
.topbar::after {
  content: ""; position: absolute; left: 20%; right: 20%; bottom: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent); opacity: .6;
}
.topbar.modal-pinned { position: fixed; left: var(--topbar-left); width: var(--topbar-width); margin: 0; }
.topbar-placeholder { height: calc(var(--topbar-height, 76px) + 22px); }
.brand { display: flex; align-items: center; gap: 14px; min-width: 0; }
.brand svg { width: 40px; height: 40px; flex: none; color: var(--gold); filter: drop-shadow(0 0 10px rgba(217, 187, 127, .35)); }
.brand h1 { margin: 0; font: 600 20px/1.1 var(--serif); letter-spacing: .22em; color: var(--gold-hi); white-space: nowrap; }
.brand p { margin: 5px 0 0; font-size: 9.5px; letter-spacing: .38em; color: var(--ink-3); white-space: nowrap; }

.link-pill {
  display: flex; align-items: center; gap: 10px;
  height: 34px; padding: 0 18px;
  border: 1px solid var(--line);
  background: rgba(8, 11, 17, .7);
  clip-path: polygon(10px 0, 100% 0, calc(100% - 10px) 100%, 0 100%);
  font-size: 12.5px; letter-spacing: .12em; color: var(--ink-2);
  white-space: nowrap;
}
.link-pill small { color: var(--ink-4); font-size: 11.5px; letter-spacing: .06em; font-family: var(--num); }
.link-pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-4); }
.link-pill[data-state="ok"] .dot { background: var(--ok); box-shadow: 0 0 0 0 rgba(127, 224, 195, .6); animation: ping 2s infinite; }
.link-pill[data-state="warn"] .dot { background: var(--warn); }
.link-pill[data-state="warn"] { color: var(--warn); }
.link-pill[data-state="lost"] .dot { background: var(--danger); animation: blink 1s infinite; }
.link-pill[data-state="lost"] { color: var(--danger); border-color: rgba(255, 111, 97, .35); }
.link-pill[data-state="pending"] .dot { animation: blink 1s infinite; }

.topbar-right { justify-self: end; display: flex; align-items: center; gap: 20px; }
.clock { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.15; }
.clock span { font-size: 11px; letter-spacing: .14em; color: var(--ink-3); }
.clock strong { font: 500 22px var(--num); letter-spacing: .06em; font-variant-numeric: tabular-nums; color: var(--ink); }

.icon-btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 36px; padding: 0 14px;
  border: 1px solid var(--line); background: transparent;
  color: var(--ink-2); font-size: 12px; letter-spacing: .14em;
  cursor: pointer; transition: border-color .2s, color .2s, background .2s;
}
.icon-btn svg { width: 15px; height: 15px; }
.icon-btn:hover { border-color: var(--line-2); color: var(--gold-hi); background: rgba(217, 187, 127, .06); }
.icon-btn.confirm { border-color: rgba(255, 111, 97, .55); color: var(--danger); background: rgba(255, 111, 97, .08); }

/* --------------------------------------------------------------- grid */
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 18px; }
.panel-dps { grid-column: span 8; }
.panel-ratio { grid-column: span 4; }
.kpi { grid-column: span 3; }
.panel-trend, .panel-archive { grid-column: span 12; }

.panel {
  min-width: 0;
  padding: 20px 22px;
  background: var(--panel-bg);
  border: 1px solid var(--line);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 24px 60px -36px rgba(0, 0, 0, .9);
  animation: panelIn .8s var(--ease) both;
  transition: border-color .3s, box-shadow .3s;
}
.panel:hover { border-color: rgba(217, 187, 127, .24); }
.panel:hover::before, .panel:hover::after { width: 22px; height: 22px; }
.grid > :nth-child(1) { animation-delay: .08s; }
.grid > :nth-child(2) { animation-delay: .16s; }
.grid > :nth-child(3) { animation-delay: .22s; }
.grid > :nth-child(4) { animation-delay: .28s; }
.grid > :nth-child(5) { animation-delay: .34s; }
.grid > :nth-child(6) { animation-delay: .40s; }
.grid > :nth-child(7) { animation-delay: .48s; }
.grid > :nth-child(8) { animation-delay: .56s; }

.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.ph-title { display: flex; align-items: baseline; gap: 12px; min-width: 0; }
.ph-idx { position: relative; padding-left: 15px; font: 600 13px var(--num); letter-spacing: .1em; color: var(--gold); }
.ph-idx::before { content: ""; position: absolute; left: 0; top: 50%; width: 6px; height: 6px; margin-top: -3px; background: var(--gold); transform: rotate(45deg); box-shadow: 0 0 8px var(--gold); }
.ph-title h2 { margin: 0; font: 600 16px var(--serif); letter-spacing: .2em; white-space: nowrap; }
.ph-en { font-size: 9.5px; letter-spacing: .34em; color: var(--ink-4); text-transform: uppercase; white-space: nowrap; }

/* --------------------------------------------------------------- DPS */
.live-tag {
  display: inline-flex; align-items: center; gap: 8px;
  height: 24px; padding: 0 10px;
  border: 1px solid rgba(127, 224, 195, .3);
  font: 600 10.5px var(--num); letter-spacing: .3em; color: var(--ok);
}
.live-tag i { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); animation: blink 1.6s infinite; }

.dps-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.dps-value { display: flex; align-items: baseline; gap: 12px; }
.dps-value strong {
  font: 600 clamp(58px, 6.6vw, 96px)/.9 var(--num);
  letter-spacing: -.01em; font-variant-numeric: tabular-nums;
  background: linear-gradient(180deg, #fffaec 0%, #ecd6a2 58%, #b6955a 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 26px rgba(217, 187, 127, .28));
  transition: filter .4s;
}
.dps-value .unit { font: 500 13px var(--num); letter-spacing: .26em; color: var(--ink-3); }

.dps-level {
  display: inline-flex; align-items: center; gap: 10px;
  height: 34px; padding: 0 16px;
  border: 1px solid var(--line-2);
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
  background: rgba(217, 187, 127, .06);
  color: var(--gold-hi);
  transition: color .4s, background .4s, border-color .4s;
}
.lv-zh { font: 600 14px var(--serif); letter-spacing: .4em; }
.lv-en { font: 500 10px var(--num); letter-spacing: .3em; opacity: .6; }
.dps-level[data-level="ripple"] { color: var(--intl); border-color: rgba(121, 207, 219, .4); background: rgba(121, 207, 219, .07); }
.dps-level[data-level="surge"] { color: var(--warn); border-color: rgba(240, 196, 107, .45); background: rgba(240, 196, 107, .08); }
.dps-level[data-level="torrent"] { color: var(--danger); border-color: rgba(255, 111, 97, .55); background: rgba(255, 111, 97, .1); animation: alarm 1.2s infinite; }

.panel-dps[data-alert] { border-color: rgba(255, 111, 97, .4); box-shadow: inset 0 0 60px rgba(255, 111, 97, .07), 0 24px 60px -36px rgba(0, 0, 0, .9); }
.panel-dps[data-alert]::before, .panel-dps[data-alert]::after { border-color: var(--danger); }
.panel-dps[data-alert] .dps-value strong { background-image: linear-gradient(180deg, #fff1ee, #ff9c8f 60%, #d4554a); filter: drop-shadow(0 0 26px rgba(255, 111, 97, .35)); }

.dps-stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  margin: 22px 0 16px;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.dps-stats > div { padding: 12px 16px; }
.dps-stats > div + div { border-left: 1px solid var(--line); }
.dps-stats dt { font-size: 11.5px; letter-spacing: .16em; color: var(--ink-3); }
.dps-stats dd { margin: 6px 0 0; font: 500 21px var(--num); font-variant-numeric: tabular-nums; color: var(--ink); }

.rt-wrap { position: relative; height: 230px; }
.rt-wrap canvas { display: block; width: 100%; height: 100%; touch-action: pan-y; cursor: crosshair; }
.rt-axis { display: flex; justify-content: space-between; padding: 8px 52px 0 0; font: 11px var(--num); letter-spacing: .08em; color: var(--ink-4); }

/* --------------------------------------------------------------- ratio ring */
.panel-ratio { display: flex; flex-direction: column; }
.ring-wrap { position: relative; width: min(250px, 100%); aspect-ratio: 1; margin: 2px auto 20px; }
.ring-wrap svg { width: 100%; height: 100%; overflow: visible; }
.ring-ticks { transform-origin: 100px 100px; animation: spin 90s linear infinite; }
.ring-ticks line { stroke: var(--gold); stroke-width: 1; opacity: .25; }
.ring-ticks line.major { opacity: .6; }
.ring-track { fill: none; stroke: rgba(255, 255, 255, .05); stroke-width: 10; }
.ring-arc { fill: none; stroke-width: 10; stroke-dasharray: 0 999; transition: stroke-dasharray 1.2s var(--ease), stroke-dashoffset 1.2s var(--ease); }
.ring-dom { stroke: var(--dom); filter: drop-shadow(0 0 6px rgba(226, 192, 124, .5)); }
.ring-intl { stroke: var(--intl); filter: drop-shadow(0 0 6px rgba(121, 207, 219, .5)); }
.ring-inner { fill: rgba(5, 7, 11, .5); stroke: var(--line); stroke-dasharray: 2 4; }
.ring-center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; gap: 6px; }
.ring-center strong { font: 600 30px var(--num); font-variant-numeric: tabular-nums; color: var(--ink); }
.ring-center span { font-size: 11px; letter-spacing: .26em; padding-left: .26em; color: var(--ink-3); }

.ratio-legend { list-style: none; margin: auto 0 0; padding: 0; display: grid; gap: 2px; }
.ratio-legend li {
  display: grid; grid-template-columns: 12px auto 1fr auto; align-items: center; gap: 12px;
  padding: 11px 4px; border-top: 1px solid var(--line);
}
.ratio-legend i { width: 8px; height: 8px; transform: rotate(45deg); }
.ratio-legend [data-tone="dom"] i { background: var(--dom); box-shadow: 0 0 8px var(--dom); }
.ratio-legend [data-tone="intl"] i { background: var(--intl); box-shadow: 0 0 8px var(--intl); }
.rl-name { font: 500 13px var(--serif); letter-spacing: .24em; color: var(--ink-2); }
.ratio-legend b { justify-self: end; font: 500 16px var(--num); font-variant-numeric: tabular-nums; }
.ratio-legend em { font: normal 500 13px var(--num); min-width: 54px; text-align: right; }
.ratio-legend [data-tone="dom"] em { color: var(--dom); }
.ratio-legend [data-tone="intl"] em { color: var(--intl); }

/* --------------------------------------------------------------- KPI */
.kpi { display: flex; flex-direction: column; gap: 12px; padding: 18px 20px 16px; }
.kpi-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.kpi-label { display: inline-flex; align-items: center; gap: 10px; font: 500 13px var(--serif); letter-spacing: .2em; color: var(--ink-2); white-space: nowrap; }
.kpi-label i { width: 6px; height: 6px; transform: rotate(45deg); background: var(--tone); box-shadow: 0 0 8px var(--tone); }
.kpi-en { font-size: 9px; letter-spacing: .3em; color: var(--ink-4); }
.kpi-value { font: 600 clamp(28px, 2.5vw, 36px)/1 var(--num); font-variant-numeric: tabular-nums; color: var(--tone); letter-spacing: .01em; }
.kpi[data-tone="dom"] { --tone: var(--dom); }
.kpi[data-tone="intl"] { --tone: var(--intl); }
.kpi[data-tone="total"] { --tone: var(--ink); }
.kpi[data-tone="avg"] { --tone: var(--gold-hi); }
.kpi-bar { position: relative; height: 3px; background: rgba(255, 255, 255, .06); overflow: hidden; }
.kpi-bar i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: linear-gradient(90deg, transparent, var(--tone)); box-shadow: 0 0 10px var(--tone); transition: width 1.2s var(--ease); }
.kpi-spark { width: 100%; height: 30px; margin: -12px 0 -9px; overflow: visible; }
.kpi-spark polyline { fill: none; stroke: var(--gold); stroke-width: 1.4; vector-effect: non-scaling-stroke; }
.kpi-spark polygon { fill: url(#spark-fill); }
.kpi-sub { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; letter-spacing: .04em; color: var(--ink-3); }
.kpi-sub span:last-child { font-family: var(--num); color: var(--ink-2); }

/* --------------------------------------------------------------- trend */
.trend-tools { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.legend { list-style: none; margin: 0; padding: 0; display: flex; gap: 18px; font-size: 12px; letter-spacing: .1em; color: var(--ink-3); }
.legend li { display: flex; align-items: center; gap: 8px; }
.legend i { width: 9px; height: 9px; transform: rotate(45deg); }
.legend [data-tone="dom"] i { background: var(--dom); }
.legend [data-tone="intl"] i { background: var(--intl); }
.legend [data-tone="ma"] i { width: 14px; height: 0; transform: none; border-top: 1px dashed var(--ink-2); }

.tabs { display: flex; border: 1px solid var(--line); }
.tabs button {
  height: 30px; padding: 0 14px;
  background: transparent; border: 0; cursor: pointer;
  font: 500 12px var(--num); letter-spacing: .14em; color: var(--ink-3);
  transition: color .2s, background .2s, box-shadow .2s;
}
.tabs button + button { border-left: 1px solid var(--line); }
.tabs button:hover { color: var(--ink); }
.tabs button[aria-selected="true"] { color: var(--gold-hi); background: rgba(217, 187, 127, .12); box-shadow: inset 0 -2px 0 var(--gold); }

.trend-summary { display: grid; grid-template-columns: repeat(5, 1fr); margin: 0 0 14px; }
.trend-summary > div { padding: 0 16px; }
.trend-summary > div:first-child { padding-left: 0; }
.trend-summary > div + div { border-left: 1px solid var(--line); }
.trend-summary dt { font-size: 11.5px; letter-spacing: .16em; color: var(--ink-3); }
.trend-summary dd { margin: 6px 0 0; font: 500 20px var(--num); font-variant-numeric: tabular-nums; }
.trend-summary dd small { font-size: 11px; color: var(--ink-4); margin-left: 8px; letter-spacing: .04em; }
.trend-summary [data-k="dom"] { color: var(--dom); }
.trend-summary [data-k="intl"] { color: var(--intl); }

.trend-wrap { position: relative; height: 320px; touch-action: pan-y; }
.trend-wrap svg { display: block; width: 100%; height: 100%; overflow: visible; }
.trend-wrap .gridline { stroke: rgba(217, 187, 127, .08); }
.trend-wrap .axis { fill: var(--ink-4); font-family: var(--num); font-size: 11px; letter-spacing: .04em; }
.trend-wrap .axis.wk { fill: var(--gold-lo); }
.trend-wrap .bar-today { opacity: .5; }
.trend-wrap .today-outline { fill: none; stroke: var(--gold); stroke-dasharray: 3 3; opacity: .7; }
.trend-wrap .ma { fill: none; stroke: rgba(236, 230, 216, .55); stroke-width: 1.2; stroke-dasharray: 4 4; }
.trend-wrap .line-dom { fill: none; stroke: var(--dom); stroke-width: 1.5; }
.trend-wrap .line-total { fill: none; stroke: var(--intl); stroke-width: 1.5; }
.trend-wrap .band { fill: rgba(217, 187, 127, .07); }
.trend-wrap .guide { stroke: var(--gold); stroke-dasharray: 2 3; opacity: .6; }
.empty { display: grid; place-items: center; height: 100%; color: var(--ink-4); letter-spacing: .3em; font-size: 13px; }

.tip {
  position: absolute; top: 8px; z-index: 5;
  min-width: 196px; padding: 12px 14px;
  background: rgba(7, 10, 16, .95);
  border: 1px solid var(--line-2);
  box-shadow: 0 16px 40px -10px rgba(0, 0, 0, .8);
  font-size: 12.5px; pointer-events: none;
  opacity: 0; transition: opacity .15s;
}
.tip.show { opacity: 1; }
.tip h4 { display: flex; justify-content: space-between; margin: 0 0 8px; padding-bottom: 8px; border-bottom: 1px solid var(--line); font: 600 13px var(--serif); letter-spacing: .12em; color: var(--gold-hi); }
.tip h4 small { font: 500 11px var(--sans); color: var(--ink-3); letter-spacing: .1em; }
.tip .row { display: flex; align-items: center; gap: 8px; line-height: 1.9; color: var(--ink-3); }
.tip .row b { margin-left: auto; padding-left: 18px; font: 500 13px var(--num); color: var(--ink); font-variant-numeric: tabular-nums; }
.tip .sw { width: 7px; height: 7px; transform: rotate(45deg); }
.tip .sw.dom { background: var(--dom); }
.tip .sw.intl { background: var(--intl); }
.tip .sw.total { background: var(--ink); }
.tip .sw.dps { background: var(--danger); }

/* --------------------------------------------------------------- archive */
.archive-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.search {
  display: flex; align-items: center; gap: 8px;
  height: 34px; padding: 0 12px; width: 240px;
  border: 1px solid var(--line); background: rgba(4, 6, 10, .55);
  transition: border-color .2s;
}
.search:focus-within { border-color: var(--line-2); }
.search svg { width: 15px; height: 15px; color: var(--ink-3); flex: none; }
.search input { flex: 1; min-width: 0; height: 100%; background: transparent; border: 0; outline: 0; font-size: 12.5px; letter-spacing: .06em; }
.search input::placeholder { color: var(--ink-4); }
.btn-ghost {
  display: inline-flex; align-items: center; gap: 8px;
  height: 34px; padding: 0 14px;
  border: 1px solid var(--line-2); background: transparent; cursor: pointer;
  color: var(--gold-hi); font-size: 12px; letter-spacing: .16em;
  transition: background .2s, border-color .2s;
}
.btn-ghost svg { width: 15px; height: 15px; }
.btn-ghost:hover { background: rgba(217, 187, 127, .1); border-color: var(--gold); }

.table-wrap { max-height: 470px; overflow: auto; border-top: 1px solid var(--line); scrollbar-width: thin; scrollbar-color: var(--gold-lo) transparent; }
.table-wrap::-webkit-scrollbar { width: 6px; height: 6px; }
.table-wrap::-webkit-scrollbar-thumb { background: var(--gold-lo); }
table { width: 100%; min-width: 760px; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
thead th { position: sticky; top: 0; z-index: 1; padding: 0; background: #0a0e15; border-bottom: 1px solid var(--line); text-align: right; font-weight: 500; font-size: 12px; letter-spacing: .14em; color: var(--ink-3); white-space: nowrap; }
thead th:first-child { text-align: left; }
thead th button { all: unset; box-sizing: border-box; display: flex; justify-content: flex-end; align-items: center; gap: 6px; width: 100%; padding: 12px 14px; cursor: pointer; transition: color .2s; }
thead th:first-child button { justify-content: flex-start; }
thead th button:hover { color: var(--ink); }
thead th button:focus-visible { outline: 1px solid var(--gold); outline-offset: -3px; }
thead th button::after { content: "◇"; font-size: 9px; opacity: .3; }
thead th[aria-sort="ascending"] button, thead th[aria-sort="descending"] button { color: var(--gold-hi); }
thead th[aria-sort="ascending"] button::after { content: "▲"; opacity: .9; }
thead th[aria-sort="descending"] button::after { content: "▼"; opacity: .9; }
.th-state { padding: 12px 14px !important; }
tbody td { padding: 11px 14px; text-align: right; border-bottom: 1px solid rgba(217, 187, 127, .06); font-family: var(--num); color: var(--ink-2); white-space: nowrap; transition: background .15s, color .15s; }
tbody tr:hover td { background: rgba(217, 187, 127, .045); color: var(--ink); }
tbody td.c-date { text-align: left; color: var(--ink); }
tbody td.c-date .wk { margin-left: 10px; font: 12px var(--sans); color: var(--ink-4); }
tbody td.c-date .wk.we { color: var(--gold-lo); }
tbody td.c-dom { color: var(--dom); }
tbody td.c-intl { color: var(--intl); }
tbody td.c-total { color: var(--ink); font-weight: 500; }
tbody tr.is-today td { background: rgba(127, 224, 195, .035); }
.share { display: inline-flex; align-items: center; gap: 10px; }
.share i { position: relative; width: 64px; height: 4px; background: rgba(226, 192, 124, .3); }
.share i b { position: absolute; right: 0; top: 0; bottom: 0; background: var(--intl); }
.tag { display: inline-block; padding: 2px 9px; border: 1px solid var(--line); font: 11px var(--sans); letter-spacing: .12em; color: var(--ink-3); }
.tag.live { color: var(--ok); border-color: rgba(127, 224, 195, .35); }
.tag.live::before { content: "● "; animation: blink 1.6s infinite; }
.td-empty { text-align: center !important; padding: 48px 0 !important; color: var(--ink-4) !important; letter-spacing: .3em; font-family: var(--sans) !important; }
.archive-foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 12px; font-size: 12px; letter-spacing: .06em; color: var(--ink-4); }

.console-foot {
  display: flex; justify-content: center; flex-wrap: wrap; gap: 10px 28px;
  margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line);
  font-size: 11.5px; letter-spacing: .14em; color: var(--ink-4);
}
.console-foot span:first-child { color: var(--gold-lo); }

.noscript { position: relative; z-index: 3; text-align: center; padding: 40vh 20px; color: var(--ink-2); letter-spacing: .2em; }

/* ===================================================================== responsive */
@media (max-width: 1240px) {
  .panel-dps, .panel-ratio { grid-column: span 12; }
  .panel-ratio { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto 1fr; column-gap: 32px; }
  .panel-ratio .panel-head { grid-column: 1 / -1; }
  .panel-ratio .ring-wrap { width: 220px; margin: 0; }
  .ratio-legend { margin: auto 0; }
  .kpi { grid-column: span 6; }
}
@media (max-width: 860px) {
  .topbar { grid-template-columns: 1fr auto; height: auto; padding-top: 12px; padding-bottom: 12px; row-gap: 10px; }
  .link-pill { grid-row: 2; grid-column: 1 / -1; justify-self: start; }
  .clock span { display: none; }
  .icon-btn span { display: none; }
  .gate-side { display: none; }
  .trend-summary { grid-template-columns: repeat(3, 1fr); row-gap: 14px; }
  .trend-summary > div:nth-child(4) { border-left: 0; padding-left: 0; }
  .search { width: 100%; }
  .archive-tools { width: 100%; }
  .archive-tools .search { flex: 1; }
}
@media (max-width: 640px) {
  .topbar-placeholder { height: calc(var(--topbar-height, 76px) + 16px); }
  .console { padding: 0 14px 20px; }
  .topbar { margin: 0 -14px 16px; padding-left: 14px; padding-right: 14px; }
  .brand { gap: 10px; }
  .brand svg { width: 30px; height: 30px; }
  .brand h1 { font-size: 15px; letter-spacing: .1em; }
  .brand p { display: none; }
  .topbar-right { gap: 10px; }
  .clock strong { font-size: 17px; }
  .icon-btn { padding: 0 10px; }
  .grid { gap: 12px; }
  .panel { padding: 16px; }
  .kpi { grid-column: span 12; }
  .panel-ratio { display: flex; }
  .panel-ratio .ring-wrap { width: min(230px, 100%); margin: 0 auto 16px; }
  .dps-stats { grid-template-columns: repeat(2, 1fr); }
  .dps-stats > div:nth-child(3) { border-left: 0; }
  .dps-stats > div:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .rt-wrap { height: 190px; }
  .trend-wrap { height: 260px; }
  .trend-summary { grid-template-columns: repeat(2, 1fr); }
  .trend-summary > div:nth-child(odd) { border-left: 0; padding-left: 0; }
  .trend-summary > div:nth-child(4) { border-left: 1px solid var(--line); padding-left: 16px; }
  .legend { display: none; }
  .gate-form { padding: 22px 18px 18px; }
  .hud-frame { display: none; }
}

/* =====================================================================
   v2 · 动效 / 范围 / 地域 / 详情
   ===================================================================== */
html.locked { overflow: hidden; }
html.locked .topbar { pointer-events: none; }

/* ---------- 通用动效 */
.fx-ink { position: relative; overflow: hidden; }
.ink {
  position: absolute; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(255, 246, 220, .45) 0%, rgba(255, 246, 220, .12) 40%, transparent 70%);
  transform: scale(0); animation: ink .7s var(--ease) forwards;
}
.btn-primary .ink { background: radial-gradient(circle, rgba(255, 255, 255, .6), transparent 65%); }

.spot:hover { background: radial-gradient(460px circle at var(--mx, -999px) var(--my, -999px), rgba(217, 187, 127, .075), transparent 45%), var(--panel-bg); }
.panel.flash { animation: flash 1.1s ease; }

.veil {
  position: fixed; inset: 0; z-index: 90; pointer-events: none;
  background:
    radial-gradient(circle at center, rgba(217, 187, 127, .16), transparent 45%),
    linear-gradient(180deg, #0a0d14, #05070b);
  display: grid; place-items: center;
}
.veil i { width: 46%; height: 1px; background: linear-gradient(90deg, transparent, var(--gold-hi), transparent); animation: veilLine .9s var(--ease) both; box-shadow: 0 0 18px var(--gold); }

.toasts { position: fixed; top: 88px; right: 24px; z-index: 80; display: grid; gap: 10px; width: min(380px, calc(100vw - 32px)); pointer-events: none; }
.toast {
  position: relative; overflow: hidden;
  display: flex; align-items: center; gap: 12px;
  padding: 13px 16px 15px;
  background: rgba(8, 11, 17, .94); border: 1px solid var(--line-2);
  backdrop-filter: blur(10px);
  box-shadow: 0 18px 40px -12px rgba(0, 0, 0, .8);
  font-size: 13px; letter-spacing: .06em; color: var(--ink);
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
  animation: toastIn .5s var(--ease) both;
}
.toast i { width: 8px; height: 8px; flex: none; transform: rotate(45deg); background: var(--gold); box-shadow: 0 0 10px var(--gold); }
.toast b { position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; background: var(--gold); transform-origin: left; animation: toastBar linear forwards; opacity: .7; }
.toast-ok i, .toast-ok b { background: var(--ok); box-shadow: 0 0 10px var(--ok); }
.toast-danger { border-color: rgba(255, 111, 97, .55); }
.toast-danger i, .toast-danger b { background: var(--danger); box-shadow: 0 0 10px var(--danger); }
.toast.out { animation: toastOut .4s ease forwards; }

/* ---------- 登录页 · 入场与交互 */
.gate { --px: 0; --py: 0; }
.gate-scan {
  position: fixed; left: 0; right: 0; top: 0; height: 120px; pointer-events: none; z-index: 0;
  background: linear-gradient(180deg, transparent, rgba(217, 187, 127, .05) 60%, rgba(243, 223, 176, .14) 99%, transparent);
  animation: scanDown 7s linear infinite;
}
.gate-emblem-wrap { position: relative; display: inline-block; transform: translate(calc(var(--px) * 14px), calc(var(--py) * 10px)); transition: transform .3s ease-out; }
.ge-halo { position: absolute; inset: -18px; border-radius: 50%; border: 1px solid rgba(217, 187, 127, .0); pointer-events: none; }
.gate-emblem-wrap.pulse .ge-halo { animation: halo .9s var(--ease); }
.gate-emblem-wrap.pulse .ge-core { animation: corePulse .5s ease; }
.gate-title { transform: translate(calc(var(--px) * -6px), calc(var(--py) * -4px)); transition: transform .4s ease-out; }
.gate-title { background: none; }
.gate-title span { display: inline-block; background: linear-gradient(180deg, #fff8e6 0%, #ead5a4 55%, #b29357 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hud-frame i { translate: calc(var(--px, 0) * -8px) calc(var(--py, 0) * -8px); transition: translate .5s ease-out; }

.gate.intro .gate-card { animation: none; }
.gate.intro .draw { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.4s var(--ease) .1s forwards; }
.gate.intro .draw.d2 { animation-delay: .4s; }
.gate.intro .draw.d3 { animation-delay: .7s; }

.gate.intro .ge-spin { animation: fadeIn 1s .6s both, spin 18s linear infinite; }
.gate.intro .ge-spin-slow { animation: fadeIn 1s .8s both, spin 60s linear infinite reverse; }
.gate.intro .ge-wave { animation: fadeIn .8s 1s both, wave 3.2s ease-in-out 1s infinite; }
.gate.intro .ge-core { animation: fadeIn .6s 1.1s both; }
.gate.intro .eyebrow { animation: spread 1.2s var(--ease) .5s both; }
.gate.intro .gate-title span { animation: charIn .9s var(--ease) both; animation-delay: calc(.7s + var(--i) * 90ms); }
.gate.intro .gate-sub { animation: rise .9s var(--ease) 1.4s both; }
.gate.intro .divider { animation: widen 1s var(--ease) 1.5s both; }
.gate.intro .gate-form { animation: rise 1s var(--ease) 1.6s both; }
.gate.intro .gate-side, .gate.intro .gate-foot { animation: fadeIn 1.4s ease 1.8s both; }
.gate.intro .hud-frame i { animation: frameIn .9s var(--ease) both; }
.gate.intro .hud-frame i:nth-child(2) { animation-delay: .1s; }
.gate.intro .hud-frame i:nth-child(3) { animation-delay: .2s; }
.gate.intro .hud-frame i:nth-child(4) { animation-delay: .3s; }

.field-wave { display: flex; align-items: center; gap: 2px; height: 18px; margin-right: 4px; opacity: 0; transition: opacity .3s; }
.field-wave i { width: 2px; height: 30%; background: var(--gold); border-radius: 1px; }
.field.typing .field-wave { opacity: .8; }
.field.typing .field-wave i { animation: eq .9s ease-in-out infinite; }
.field-wave i:nth-child(2) { animation-delay: -.2s !important; }
.field-wave i:nth-child(3) { animation-delay: -.45s !important; }
.field-wave i:nth-child(4) { animation-delay: -.1s !important; }
.field-wave i:nth-child(5) { animation-delay: -.6s !important; }

.gate.success .gate-emblem { animation: successSpin .9s var(--ease) forwards; }
.gate.success .gate-form { border-color: var(--gold); box-shadow: 0 0 0 1px rgba(217, 187, 127, .4), 0 0 60px rgba(217, 187, 127, .25); transition: box-shadow .4s, border-color .4s; }
.gate.success .gate-form::before, .gate.success .gate-form::after { width: 100%; height: 100%; transition-duration: .6s; }

/* ---------- 控制台补充 */
.dps-level.swap { animation: levelSwap .6s var(--ease); }
.rt-wrap::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 80px; left: -80px; pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(217, 187, 127, .06), transparent);
  animation: sweep 6s linear infinite;
}
.ring-arc2 { fill: none; stroke-width: 9; stroke-dasharray: var(--len) 999; animation: ringDraw 1.4s var(--ease) both; }
.ratio-top { display: flex; justify-content: space-between; gap: 10px; margin: 12px 0 0; padding-top: 10px; border-top: 1px dashed var(--line); font-size: 12px; color: var(--ink-3); letter-spacing: .06em; }
.ratio-top b { font: 500 13px var(--num); color: var(--ink); margin-left: 6px; }
.kpi-spark .draw, .share-line.draw { stroke-dasharray: 1; animation: drawIn 1.6s var(--ease) both; }
.draw { stroke-dasharray: 1; }
svg.static .draw { animation: none !important; stroke-dashoffset: 0 !important; }

.rangebar, .panel-geo { grid-column: span 12; }
.panel-small { grid-column: span 4; }
.rangebar { position: relative; z-index: 6; display: flex; align-items: center; gap: 22px; flex-wrap: wrap; padding: 14px 20px; }
.rb-label { display: flex; align-items: center; gap: 12px; font: 600 14px var(--serif); letter-spacing: .24em; }
.rb-diamond { width: 8px; height: 8px; border: 1px solid var(--gold); transform: rotate(45deg); box-shadow: 0 0 8px rgba(217, 187, 127, .5); }
.chips, .seg { position: relative; display: flex; border: 1px solid var(--line); background: rgba(4, 6, 10, .4); }
.chips button, .seg button {
  position: relative; z-index: 1;
  height: 32px; padding: 0 14px;
  display: inline-flex; align-items: center; gap: 7px;
  background: transparent; border: 0; cursor: pointer;
  font: 500 12px var(--num); letter-spacing: .14em; color: var(--ink-3);
  transition: color .25s;
}
.seg button { font-family: var(--sans); letter-spacing: .1em; }
.seg button svg { width: 14px; height: 14px; }
.chips button:hover, .seg button:hover { color: var(--ink); }
.chips button[aria-checked="true"], .seg button[aria-selected="true"] { color: var(--gold-hi); }
.chip-ind, .seg-ind {
  position: absolute; left: 0; top: 0; bottom: 0; width: 0; z-index: 0;
  background: rgba(217, 187, 127, .14); box-shadow: inset 0 -2px 0 var(--gold);
  transition: transform .45s var(--ease), width .45s var(--ease), opacity .3s;
}
.rb-pick { position: relative; }
.range-btn {
  display: inline-flex; align-items: center; gap: 10px;
  height: 34px; padding: 0 14px;
  border: 1px solid var(--line-2); background: rgba(217, 187, 127, .05); cursor: pointer;
  font: 500 13px var(--num); letter-spacing: .08em; color: var(--ink);
  transition: border-color .2s, background .2s, box-shadow .3s;
}
.range-btn svg { width: 15px; height: 15px; color: var(--gold); }
.range-btn em { font-style: normal; font-size: 11.5px; color: var(--gold-hi); padding-left: 10px; border-left: 1px solid var(--line); }
.range-btn:hover, .range-btn[aria-expanded="true"] { border-color: var(--gold); background: rgba(217, 187, 127, .1); }
.range-btn.custom { box-shadow: inset 0 -2px 0 var(--gold); }
.rb-hint { margin: 0 0 0 auto; font-size: 12px; color: var(--ink-4); letter-spacing: .08em; }
.rb-hint b { color: var(--gold-lo); font-weight: 500; }

.picker {
  position: absolute; top: calc(100% + 10px); left: 0; z-index: 30;
  display: flex;
  background: rgba(8, 11, 17, .97); border: 1px solid var(--line-2);
  box-shadow: 0 30px 70px -20px rgba(0, 0, 0, .9);
  backdrop-filter: blur(14px);
  transform-origin: top left;
  animation: popIn .32s var(--ease) both;
}
.picker.closing { animation: popOut .22s ease forwards; }
.pk-presets { display: flex; flex-direction: column; padding: 12px 0; border-right: 1px solid var(--line); min-width: 112px; }
.pk-presets button {
  text-align: left; height: 34px; padding: 0 18px;
  background: transparent; border: 0; cursor: pointer;
  font-size: 13px; letter-spacing: .12em; color: var(--ink-2);
  transition: color .2s, background .2s, padding .25s;
}
.pk-presets button:hover { color: var(--gold-hi); background: rgba(217, 187, 127, .08); padding-left: 24px; }
.pk-main { position: relative; padding: 14px 18px 14px; }
.pk-nav { position: absolute; left: 12px; right: 12px; top: 12px; display: flex; justify-content: space-between; pointer-events: none; }
.pk-nav button { pointer-events: auto; width: 30px; height: 30px; display: grid; place-items: center; background: transparent; border: 1px solid transparent; color: var(--ink-2); cursor: pointer; transition: border-color .2s, color .2s; }
.pk-nav button:hover:not(:disabled) { border-color: var(--line-2); color: var(--gold-hi); }
.pk-nav button:disabled { opacity: .25; cursor: default; }
.pk-nav svg { width: 16px; height: 16px; }
.pk-months { display: flex; gap: 26px; }
.cal { width: 252px; }
.cal-title { height: 30px; display: grid; place-items: center; font: 600 14px var(--serif); letter-spacing: .2em; color: var(--gold-hi); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 36px); margin-top: 8px; }
.cal-wk { height: 28px; display: grid; place-items: center; font-size: 11px; color: var(--ink-4); }
.cal-day {
  position: relative; height: 34px;
  background: transparent; border: 0; cursor: pointer;
  font: 500 13px var(--num); color: var(--ink-2);
  transition: color .15s, background .15s;
}
.cal-day:hover:not(:disabled) { color: #fff; background: rgba(217, 187, 127, .12); }
.cal-day:disabled { color: var(--ink-4); opacity: .35; cursor: default; }
.cal-day.is-today::after { content: ""; position: absolute; left: 50%; bottom: 4px; width: 4px; height: 4px; margin-left: -2px; background: var(--ok); border-radius: 50%; }
.cal-day.in-range { background: rgba(217, 187, 127, .1); color: var(--ink); }
.cal-day.in-range.preview { background: rgba(217, 187, 127, .06); }
.cal-day.is-start, .cal-day.is-end { background: linear-gradient(180deg, #efdaa6, #c9a868); color: #15110a; font-weight: 700; }
.cal-day.is-start { clip-path: polygon(6px 0, 100% 0, 100% 100%, 0 100%, 0 6px); }
.cal-day.is-end { clip-path: polygon(0 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%); }
.cal-day.is-start.is-end { clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px); }
.pk-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); font: 500 13px var(--num); color: var(--ink); }
.pk-foot b { color: var(--gold-hi); margin-left: 8px; font-weight: 500; }
.pk-foot .muted { color: var(--ink-4); font-family: var(--sans); }
.pk-foot > div { display: flex; gap: 8px; }
.btn-gold {
  height: 34px; padding: 0 16px; border: 0; cursor: pointer;
  background: linear-gradient(90deg, #b6955a, #efdaa6 50%, #b6955a); color: #17130b;
  font: 700 12.5px var(--serif); letter-spacing: .24em;
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
}
.btn-gold:disabled { filter: grayscale(.8) brightness(.6); cursor: not-allowed; }

.sum-grid { display: grid; grid-template-columns: repeat(4, 1fr); margin: 0 0 16px; border-top: 1px solid var(--line); }
.sum-grid > div { padding: 12px 16px; border-bottom: 1px solid var(--line); min-width: 0; }
.sum-grid > div:not(:nth-child(4n + 1)) { border-left: 1px solid var(--line); }
.sum-grid dt { font-size: 11.5px; letter-spacing: .16em; color: var(--ink-3); }
.sum-grid dd { margin: 6px 0 2px; font: 500 22px var(--num); font-variant-numeric: tabular-nums; }
.sum-grid small { display: block; min-height: 16px; font-size: 11.5px; color: var(--ink-4); letter-spacing: .04em; }
.sum-grid [data-k="dom"] dd { color: var(--dom); }
.sum-grid [data-k="intl"] dd { color: var(--intl); }
.up { color: var(--ok); }
.down { color: var(--danger); }
.flat { color: var(--ink-3); }
.link-btn { padding: 0; background: none; border: 0; cursor: pointer; font: inherit; color: var(--gold-lo); border-bottom: 1px dashed currentColor; transition: color .2s; }
.link-btn:hover { color: var(--gold-hi); }

.trend-wrap { cursor: pointer; user-select: none; }
.trend-wrap svg:not(.static) .bar, .dt-chart svg:not(.static) .bar { transform-box: fill-box; transform-origin: 50% 100%; animation: barGrow .8s var(--ease) both; animation-delay: calc(var(--i) * 14ms); }
.trend-wrap svg:not(.static) .ma { animation: fadeIn 1s ease .6s both; }
.trend-wrap .sel { fill: rgba(217, 187, 127, .14); stroke: var(--gold); stroke-dasharray: 3 3; }
.trend-wrap .bar { transition: filter .2s; }
.tip-hint { margin: 8px 0 0; padding-top: 8px; border-top: 1px solid var(--line); font-size: 11px; color: var(--ink-4); letter-spacing: .08em; }

/* ---------- 地域 */
.geo-body { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; }
.geo-stage { position: relative; height: 520px; overflow: hidden; border: 1px solid var(--line); background: radial-gradient(ellipse at 50% 45%, rgba(121, 207, 219, .06), transparent 60%), rgba(3, 5, 9, .5); }
.geo-stage::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(217, 187, 127, .03) 1px, transparent 1px), linear-gradient(90deg, rgba(217, 187, 127, .03) 1px, transparent 1px);
  background-size: 32px 32px;
}
.geo-globe { position: absolute; inset: 0; width: 100%; height: 100%; cursor: grab; touch-action: none; animation: globeIn 1.4s var(--ease) both; }
.geo-globe.grabbing { cursor: grabbing; }
.geo-map { position: absolute; inset: 0; animation: fadeIn .6s ease both; }
.geo-map svg { width: 100%; height: 100%; display: block; }
.map-grat line { stroke: rgba(217, 187, 127, .06); }
.geo-map path.rg { stroke: rgba(217, 187, 127, .22); stroke-width: .6; transition: fill .8s ease, stroke .2s, filter .2s; cursor: pointer; }
.geo-map path.rg.has { stroke: rgba(243, 223, 176, .35); }
.geo-map path.rg:hover, .geo-map path.rg.hl { stroke: #fff3d0; stroke-width: 1.4; filter: drop-shadow(0 0 6px rgba(243, 223, 176, .6)); }
.map-svg:not(.static) path.rg { animation: mapIn .9s var(--ease) both; animation-delay: calc(var(--i) * 12ms); }
.map-jd { fill: none; stroke: rgba(217, 187, 127, .5); stroke-width: 1; }
.mk { animation: fadeIn .6s ease both; animation-delay: calc(.6s + var(--i) * 120ms); pointer-events: none; }
.mk-dot { fill: #fff3d0; filter: drop-shadow(0 0 4px var(--gold)); }
.mk-ring { fill: none; stroke: var(--gold-hi); transform-box: fill-box; transform-origin: center; animation: mkPing 2.2s ease-out infinite; }
.mk text { fill: var(--ink); font: 500 11px var(--sans); letter-spacing: .08em; paint-order: stroke; stroke: rgba(5, 7, 11, .85); stroke-width: 3px; }
.mk-cn text { fill: var(--gold-hi); }
.geo-caption { position: absolute; left: 14px; top: 12px; display: flex; flex-direction: column; gap: 4px; font-size: 12px; letter-spacing: .1em; color: var(--ink-3); pointer-events: none; }
.geo-caption span:last-child { font-family: var(--num); color: var(--gold-lo); }
.geo-live {
  position: absolute; right: 12px; top: 12px; width: 220px; padding: 12px 14px;
  background: rgba(6, 9, 14, .78); border: 1px solid var(--line); backdrop-filter: blur(6px);
  animation: rise .8s var(--ease) .4s both;
}
.geo-live h4 { margin: 0 0 8px; font: 600 12px var(--serif); letter-spacing: .2em; color: var(--gold-hi); }
.geo-live ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.geo-live li { position: relative; display: grid; grid-template-columns: 10px 1fr auto; gap: 8px; align-items: center; padding: 3px 0; font-size: 12px; color: var(--ink-2); }
.geo-live li b { font: 500 12px var(--num); color: var(--ink); }
.geo-live li em { position: absolute; left: 18px; bottom: 0; height: 1px; background: linear-gradient(90deg, var(--gold), transparent); transition: width .8s var(--ease); }
.geo-scale { position: absolute; left: 14px; bottom: 12px; display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--ink-4); }
.geo-scale i { width: 120px; height: 6px; background: linear-gradient(90deg, rgba(121, 207, 219, .1), var(--intl)); }
.panel-geo[data-view="china"] .geo-scale i { background: linear-gradient(90deg, rgba(226, 192, 124, .1), var(--dom)); }
.geo-tip { top: 0; left: 0; min-width: 170px; }
.geo-loading { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 14px; color: var(--ink-3); letter-spacing: .3em; font-size: 12px; background: rgba(3, 5, 9, .6); transition: opacity .6s; }
.geo-loading span { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); border-top-color: var(--gold); animation: spin 1s linear infinite; }
.geo-loading.done { opacity: 0; pointer-events: none; }

.geo-side { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.geo-side h3 { display: flex; align-items: center; gap: 10px; margin: 0 0 8px; font: 600 14px var(--serif); letter-spacing: .18em; }
.geo-side h3 small { margin-left: auto; font: 500 11px var(--num); color: var(--ink-4); letter-spacing: .04em; }
.sw { display: inline-block; width: 7px; height: 7px; transform: rotate(45deg); flex: none; }
.sw.dom { background: var(--dom); box-shadow: 0 0 6px var(--dom); }
.sw.intl { background: var(--intl); box-shadow: 0 0 6px var(--intl); }
.rank-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; }
.rank-list li {
  display: grid; grid-template-columns: 26px 72px 1fr 54px 48px; align-items: center; gap: 8px;
  padding: 6px 6px; font-size: 12.5px; cursor: pointer;
  transition: background .2s;
}
.rank-list li:hover { background: rgba(217, 187, 127, .07); }
.rank-list .rk { font: 600 11px var(--num); color: var(--ink-4); }
.rank-list li:nth-child(-n + 3) .rk { color: var(--gold); }
.rank-list .nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink); letter-spacing: .06em; }
.rank-list .bar { position: relative; height: 4px; background: rgba(255, 255, 255, .05); }
.rank-list .bar b { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(90deg, transparent, var(--gold)); }
.rank-list li[data-scope="intl"] .bar b { background: linear-gradient(90deg, transparent, var(--intl)); }
.rank-list.anim .bar b { animation: growX .9s var(--ease) both; animation-delay: calc(var(--i) * 50ms); transform-origin: left; }
.rank-list.anim li { animation: slideIn .5s var(--ease) both; animation-delay: calc(var(--i) * 40ms); }
.rank-list .v { text-align: right; font: 500 12.5px var(--num); color: var(--ink); }
.rank-list em { text-align: right; font: normal 11.5px var(--num); color: var(--ink-3); }
.empty-li { display: block !important; padding: 18px 0 !important; text-align: center; color: var(--ink-4); letter-spacing: .2em; cursor: default !important; }

/* ---------- 小面板 */
.weekday { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; height: 190px; align-items: end; }
.wd { display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.wd-v { font: 500 11px var(--num); color: var(--ink-3); }
.wd-bar { width: 60%; max-width: 28px; height: var(--h); min-height: 2px; display: flex; flex-direction: column; overflow: hidden; }
.weekday.anim .wd-bar { animation: barGrow .9s var(--ease) both; animation-delay: calc(var(--i) * 70ms); transform-origin: bottom; }
.wd-dom { background: linear-gradient(180deg, var(--dom), rgba(226, 192, 124, .4)); }
.wd-intl { background: var(--intl); opacity: .85; }
.wd-l { font-size: 12px; color: var(--ink-3); letter-spacing: .1em; }
.wd.hi .wd-v, .wd.hi .wd-l { color: var(--gold-hi); }
.wd.hi .wd-bar { box-shadow: 0 0 16px rgba(217, 187, 127, .45); }
.small-note { margin: 14px 0 0; padding-top: 10px; border-top: 1px dashed var(--line); font-size: 12px; color: var(--ink-3); letter-spacing: .06em; }
.small-note b { color: var(--gold-hi); font-weight: 500; }

.top5 { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.top5 button {
  width: 100%; display: grid; grid-template-columns: 32px 1fr auto; grid-template-rows: auto auto; align-items: center; column-gap: 12px; row-gap: 6px;
  padding: 9px 10px; background: rgba(4, 6, 10, .35); border: 1px solid transparent; cursor: pointer; text-align: left; color: var(--ink);
  transition: border-color .25s, background .25s, transform .25s var(--ease);
}
.top5 button:hover { border-color: var(--line-2); background: rgba(217, 187, 127, .06); transform: translateX(4px); }
.t5-rk { grid-row: span 2; font: 700 20px var(--num); color: var(--gold-lo); }
.top5 li:first-child .t5-rk { color: var(--gold-hi); text-shadow: 0 0 12px rgba(217, 187, 127, .6); }
.t5-date { font: 500 13px var(--num); letter-spacing: .06em; }
.t5-date small { margin-left: 8px; font: 11.5px var(--sans); color: var(--ink-4); }
.t5-v { font: 600 15px var(--num); color: var(--gold-hi); }
.t5-bar { grid-column: 2 / 4; height: 3px; background: rgba(255, 255, 255, .05); position: relative; }
.t5-bar b { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, rgba(226, 192, 124, .2), var(--dom)); }
.top5.anim li { animation: slideIn .55s var(--ease) both; animation-delay: calc(var(--i) * 80ms); }
.top5.anim .t5-bar b { animation: growX 1s var(--ease) both; animation-delay: calc(.2s + var(--i) * 80ms); transform-origin: left; }

.share-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.share-head strong { font: 600 32px var(--num); color: var(--intl); }
.share-head span { font: 12px var(--num); color: var(--ink-3); }
.share-chart { height: 150px; margin-top: 10px; }
.share-chart svg { width: 100%; height: 100%; display: block; }
.share-fill { fill: url(#g-share); }
.share-chart svg:not(.static) .share-fill { animation: fadeIn 1.2s ease .3s both; }
.share-line { fill: none; stroke: var(--intl); stroke-width: 1.5; }
.share-avg { stroke: rgba(236, 230, 216, .35); stroke-dasharray: 4 4; }

/* ---------- 归档表补充 */
tbody tr[data-day] { cursor: pointer; }
tbody tr[data-day]:focus-visible { outline: 1px solid var(--gold); outline-offset: -1px; }
tbody tr .go { display: inline-block; margin-left: 10px; color: var(--gold); opacity: 0; transform: translateX(-6px); transition: opacity .2s, transform .2s; }
tbody tr:hover .go { opacity: 1; transform: none; }
tbody.anim tr { animation: rowIn .5s var(--ease) both; animation-delay: calc(var(--i) * 22ms); }

/* ---------- 当日详情 */
.detail { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 28px; }
.detail-backdrop { position: absolute; inset: 0; background: rgba(3, 4, 7, .76); backdrop-filter: blur(6px); }
.detail-sheet {
  position: relative; width: min(1280px, 100%); max-height: 100%; overflow: hidden auto;
  background: linear-gradient(180deg, rgba(16, 21, 31, .97), rgba(7, 10, 15, .98));
  border: 1px solid var(--line-2);
  box-shadow: 0 40px 120px -20px rgba(0, 0, 0, .9), 0 0 0 1px rgba(0, 0, 0, .5);
  padding: 22px 26px 18px;
  scrollbar-width: thin; scrollbar-color: var(--gold-lo) transparent;
}
.dt-head { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 20px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.dt-title-wrap { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.dt-title-wrap .eyebrow { margin: 0; }
.dt-title-wrap h2 { margin: 0; display: flex; align-items: baseline; gap: 14px; font: 600 30px var(--num); letter-spacing: .08em; color: var(--gold-hi); }
.dt-title-wrap h2 small { font: 500 15px var(--serif); letter-spacing: .3em; color: var(--ink-2); }
.dt-nav { display: flex; gap: 8px; }
.dt-nav .icon-btn:disabled { opacity: .3; cursor: default; }
.dt-content { padding-top: 18px; }
.dt-content.loading { opacity: .45; filter: blur(1px); transition: opacity .2s, filter .2s; }
.dt-content.loading .dt-kpi strong { background: linear-gradient(90deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, .12), rgba(255, 255, 255, .04)); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; color: transparent; }
.dt-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.dt-kpi { position: relative; padding: 16px 18px; border: 1px solid var(--line); background: rgba(4, 6, 10, .45); overflow: hidden; }
.dt-kpi::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: var(--tone); box-shadow: 0 0 12px var(--tone); }
.dt-kpi[data-tone="dom"] { --tone: var(--dom); }
.dt-kpi[data-tone="intl"] { --tone: var(--intl); }
.dt-kpi[data-tone="total"] { --tone: var(--ink); }
.dt-kpi[data-tone="peak"] { --tone: var(--dps, #ff8f7a); }
.dt-kpi > span { font: 500 12.5px var(--serif); letter-spacing: .22em; color: var(--ink-3); }
.dt-kpi strong { display: block; margin: 8px 0 8px; font: 600 30px/1 var(--num); color: var(--tone); font-variant-numeric: tabular-nums; }
.dt-kpi p { margin: 0; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 11.5px; color: var(--ink-4); }
.dt-kpi .dl b { font: 500 12px var(--num); margin-left: 4px; }
.dt-body { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 14px; margin-top: 14px; }
.dt-block { padding: 16px 18px; border: 1px solid var(--line); background: rgba(4, 6, 10, .35); min-width: 0; }
.dt-block h3 { display: flex; align-items: baseline; gap: 10px; margin: 0 0 12px; font: 600 15px var(--serif); letter-spacing: .18em; }
.dt-block h3 small { font: 10px var(--sans); letter-spacing: .26em; color: var(--ink-4); }
.dt-chart { position: relative; height: 280px; }
.dt-chart svg { width: 100%; height: 100%; display: block; overflow: visible; }
.dt-chart .gridline { stroke: rgba(217, 187, 127, .08); }
.dt-chart .axis { fill: var(--ink-4); font-family: var(--num); font-size: 11px; }
.dt-chart .axis-dps { fill: rgba(255, 143, 122, .6); }
.dt-chart .band { fill: rgba(217, 187, 127, .07); }
.dt-chart .h-future { fill: none; stroke: rgba(217, 187, 127, .08); stroke-dasharray: 2 4; }
.dt-chart .bar-now rect { animation: blink 1.6s infinite; }
.dt-chart .dps-line { fill: none; stroke: #ff8f7a; stroke-width: 1.4; opacity: .85; }
.dt-chart svg:not(.static) .dps-line { stroke-dashoffset: 1; animation: draw 1.6s var(--ease) .4s forwards; }
.dt-chart .dps-dot { fill: #ff8f7a; stroke: #0a0d14; stroke-width: 1; }
.dt-chart svg:not(.static) .dps-dot { animation: fadeIn .4s ease both; animation-delay: calc(.5s + var(--i) * 50ms); }
.dt-heat { display: grid; grid-template-columns: repeat(24, 1fr); gap: 3px; margin-top: 12px; }
.dt-heat span {
  position: relative; height: 26px; display: grid; place-items: end center;
  background: rgba(217, 187, 127, calc(.05 + var(--k) * .75));
  box-shadow: inset 0 0 0 1px rgba(217, 187, 127, calc(var(--k) * .5));
  animation: heatIn .6s var(--ease) both; animation-delay: calc(var(--i) * 25ms);
}
.dt-heat span.fut { background: transparent; box-shadow: inset 0 0 0 1px rgba(217, 187, 127, .08); }
.dt-heat span.now { animation: heatIn .6s var(--ease) both, blink 1.4s infinite; }
.dt-heat i { font: normal 9.5px var(--num); color: rgba(5, 7, 11, .75); padding-bottom: 2px; }
.dt-heat span.fut i, .dt-heat span[style*="--k:0."] i { color: var(--ink-4); }
.dt-side { display: flex; flex-direction: column; gap: 10px; }
.dt-ring { display: flex; flex-direction: column; align-items: center; }
.mini-ring { width: 180px; height: 180px; }
.mini-ring .ring-track { stroke-width: 9; }
.mr-v { fill: var(--ink); font: 600 24px var(--num); }
.mr-l { fill: var(--ink-3); font: 11px var(--sans); letter-spacing: .2em; }
.mini-legend { list-style: none; display: flex; gap: 18px; margin: 4px 0 0; padding: 0; font-size: 12px; color: var(--ink-3); }
.mini-legend li { display: flex; align-items: center; gap: 7px; }
.mini-legend b { font: 500 12.5px var(--num); color: var(--ink); }
.dt-facts { margin: 6px 0 0; display: grid; }
.dt-facts > div { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 9px 2px; border-top: 1px solid var(--line); }
.dt-facts dt { font-size: 12px; letter-spacing: .14em; color: var(--ink-3); }
.dt-facts dd { margin: 0; text-align: right; font: 500 13px var(--num); color: var(--ink); }
.dt-facts dd b { color: var(--gold-hi); font-size: 16px; }
.dt-facts dd small { display: block; font-size: 11px; color: var(--ink-4); }
.dt-geo { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 14px; margin-top: 14px; }
.dt-geo-body { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 14px; align-items: center; }
.dt-map { position: relative; height: 300px; inset: auto; }
.rank-list.two-col { grid-template-columns: 1fr 1fr; column-gap: 14px; }
.rank-list.two-col li { grid-template-columns: 22px 64px 1fr 46px; }
.rank-list.two-col li em { display: none; }
.dt-foot { margin: 14px 0 0; font-size: 11.5px; color: var(--ink-4); letter-spacing: .08em; text-align: right; }
.dt-keys { margin: 6px 0 0; font-size: 11px; color: var(--ink-4); letter-spacing: .1em; }
kbd { display: inline-block; min-width: 20px; padding: 1px 5px; margin: 0 2px; border: 1px solid var(--line-2); font: 10.5px var(--num); color: var(--ink-2); text-align: center; }
.dt-content.enter .dt-kpi { animation: rise .7s var(--ease) both; }
.dt-content.enter .dt-kpi:nth-child(2) { animation-delay: .06s; }
.dt-content.enter .dt-kpi:nth-child(3) { animation-delay: .12s; }
.dt-content.enter .dt-kpi:nth-child(4) { animation-delay: .18s; }
.dt-content.enter .dt-block { animation: rise .8s var(--ease) both; animation-delay: .2s; }
.dt-content.enter .dt-geo .dt-block { animation-delay: .3s; }

/* ---------- 错误页 */
.errpage { min-height: 100vh; }
.err {
  position: relative; z-index: 2; min-height: 100vh;
  display: grid; place-content: center; justify-items: center; text-align: center;
  padding: 60px 20px;
}
.err-emblem { width: 120px; height: 120px; color: var(--gold); filter: drop-shadow(0 0 18px rgba(217, 187, 127, .35)); animation: float 6s ease-in-out infinite; overflow: visible; }
.err-emblem .shard { transform-box: fill-box; transform-origin: center; animation: shard 6s ease-in-out infinite; }
.err-emblem .shard.s2 { animation-delay: -3s; }
.err .eyebrow { margin: 22px 0 6px; animation: spread 1.2s var(--ease) .2s both; }
.err-code {
  position: relative; margin: 0;
  font: 700 clamp(110px, 22vw, 210px)/1 var(--num); letter-spacing: .04em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(243, 223, 176, .7);
  background: linear-gradient(100deg, transparent 30%, rgba(243, 223, 176, .9) 45%, rgba(217, 187, 127, .4) 55%, transparent 70%);
  background-size: 300% 100%;
  -webkit-background-clip: text; background-clip: text;
  animation: sheen 5s ease-in-out infinite, rise 1s var(--ease) both;
  filter: drop-shadow(0 0 30px rgba(217, 187, 127, .18));
}
.err-code::before, .err-code::after { content: attr(data-text); position: absolute; inset: 0; -webkit-text-stroke: 1px currentColor; background: none; }
.err-code::before { color: rgba(121, 207, 219, .45); animation: glitchA 4s steps(1) infinite; }
.err-code::after { color: rgba(226, 192, 124, .45); animation: glitchB 4s steps(1) infinite; }
.err-title { margin: 8px 0 0; font: 600 clamp(22px, 3vw, 30px) var(--serif); letter-spacing: .26em; padding-left: .26em; color: var(--gold-hi); animation: rise 1s var(--ease) .3s both; }
.err-desc { margin: 14px 0 0; max-width: 460px; color: var(--ink-3); font-size: 14px; line-height: 1.9; letter-spacing: .12em; animation: rise 1s var(--ease) .45s both; }
.err-meta { margin: 18px 0 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 20px; font: 12px var(--num); color: var(--ink-4); letter-spacing: .08em; animation: fadeIn 1s ease .7s both; }
.err-meta code { color: var(--ink-2); font-family: var(--num); word-break: break-all; }
.err-actions { margin-top: 34px; display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; animation: rise 1s var(--ease) .6s both; }
.err-actions .btn-primary { width: auto; margin: 0; padding: 0 34px; text-decoration: none; }
.err-actions .btn-ghost { height: 54px; padding: 0 26px; text-decoration: none; }
.err-retry { margin-top: 22px; display: flex; align-items: center; gap: 12px; font-size: 12.5px; color: var(--ink-3); letter-spacing: .12em; animation: fadeIn 1s ease .9s both; }
.err-retry svg { width: 34px; height: 34px; transform: rotate(-90deg); }
.err-retry circle { fill: none; stroke-width: 2; }
.err-retry .trk { stroke: rgba(255, 255, 255, .08); }
.err-retry .prg { stroke: var(--danger); stroke-dasharray: 1; stroke-dashoffset: 0; transition: stroke-dashoffset 1s linear; }
.err-500 { --gold: #e8a48f; --gold-hi: #ffd9cc; --gold-lo: #9a5d50; --line: rgba(255, 111, 97, .16); --line-2: rgba(255, 111, 97, .34); }
.err-500 .err-code { -webkit-text-stroke-color: rgba(255, 190, 175, .8); animation: sheen 5s ease-in-out infinite, rise 1s var(--ease) both, jolt 3.2s steps(1) infinite; }
.err-500 .err-code::before { color: rgba(255, 111, 97, .55); animation-duration: 2.2s; }
.err-500 .err-code::after { color: rgba(121, 207, 219, .45); animation-duration: 2.2s; }
.err-500 .btn-primary { background: linear-gradient(90deg, #c26a5a, #ffc7b8 50%, #c26a5a); }

.err-500 .err-emblem { animation: float 6s ease-in-out infinite, tremor .2s linear infinite; }

/* ---------- 响应式补充 */
@media (max-width: 1240px) {
  .panel-small { grid-column: span 6; }
  .panel-small:last-of-type { grid-column: span 12; }
  .geo-body { grid-template-columns: 1fr; }
  .geo-side { flex-direction: row; }
  .geo-side section { flex: 1; min-width: 0; }
  .dt-body, .dt-geo { grid-template-columns: 1fr; }
  .dt-side { flex-direction: row; align-items: center; justify-content: space-around; flex-wrap: wrap; }
  .dt-facts { min-width: 260px; }
}
@media (max-width: 860px) {
  .rb-hint { display: none; }
  .sum-grid { grid-template-columns: repeat(2, 1fr); }
  .sum-grid > div:not(:nth-child(4n + 1)) { border-left: 0; }
  .sum-grid > div:nth-child(even) { border-left: 1px solid var(--line); }
  .geo-side { flex-direction: column; }
  .geo-stage { height: 420px; }
  .geo-live { display: none; }
  .dt-kpis { grid-template-columns: repeat(2, 1fr); }
  .dt-head { grid-template-columns: auto 1fr; }
  .dt-nav { grid-column: 1 / -1; justify-content: space-between; }
  .dt-geo-body { grid-template-columns: 1fr; }
  .picker { flex-direction: column; }
  .pk-presets { flex-direction: row; flex-wrap: wrap; border-right: 0; border-bottom: 1px solid var(--line); padding: 8px; }
  .pk-presets button { height: 30px; padding: 0 10px; }
}
@media (max-width: 720px) {
  .panel-small, .panel-small:last-of-type { grid-column: span 12; }
  .cal-grid { grid-template-columns: repeat(7, 34px); }
  .cal { width: 238px; }
  .picker { left: 50%; transform: translateX(-50%); transform-origin: top center; }
}
@media (max-width: 640px) {
  .rangebar { gap: 12px; }
  .chips button { padding: 0 10px; }
  .detail { padding: 0; }
  .detail-sheet { max-height: 100%; height: 100%; padding: 16px 14px; }
  .dt-title-wrap h2 { font-size: 22px; }
  .dt-kpi strong { font-size: 22px; }
  .dt-heat i { display: none; }
  .rank-list.two-col { grid-template-columns: 1fr; }
  .geo-stage { height: 340px; }
  .rank-list li { grid-template-columns: 24px 64px 1fr 50px 44px; }
  .toasts { top: auto; bottom: 16px; right: 16px; }
}

/* ===================================================================== keyframes */
@keyframes ink { to { transform: scale(1); opacity: 0; } }
@keyframes flash { 0% { box-shadow: 0 0 0 1px rgba(217, 187, 127, .55), 0 0 40px rgba(217, 187, 127, .18); } 100% { box-shadow: 0 24px 60px -36px rgba(0, 0, 0, .9); } }
@keyframes veilLine { from { transform: scaleX(0); opacity: 0; } 60% { opacity: 1; } }
@keyframes toastIn { from { opacity: 0; transform: translateX(40px) scale(.96); } }
@keyframes toastOut { to { opacity: 0; transform: translateX(40px); } }
@keyframes toastBar { from { transform: scaleX(1); } to { transform: scaleX(0); } }
@keyframes scanDown { from { transform: translateY(-140px); } to { transform: translateY(110vh); } }
@keyframes halo { from { inset: -4px; border-color: rgba(243, 223, 176, .7); } to { inset: -36px; border-color: rgba(243, 223, 176, 0); } }
@keyframes corePulse { 50% { r: 4.5; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
/* Scale only the painted text: animating tracking changed line breaks and card height. */
@keyframes spread { from { opacity: 0; transform: scale(1.12); } to { opacity: .85; transform: scale(1); } }
@keyframes charIn { from { opacity: 0; transform: translateY(26px) scale(.9); filter: blur(10px); } }
@keyframes widen { from { opacity: 0; transform: scaleX(0); } }
@keyframes frameIn { from { opacity: 0; transform: scale(2.2); } }
@keyframes eq { 0%, 100% { height: 25%; } 50% { height: 100%; } }
@keyframes successSpin { 40% { transform: scale(1.12) rotate(45deg); filter: drop-shadow(0 0 40px rgba(243, 223, 176, .9)); } 100% { transform: scale(.9) rotate(90deg); opacity: .6; } }
@keyframes levelSwap { from { transform: scale(1.15); filter: brightness(1.8); } }
@keyframes sweep { to { left: 100%; } }
@keyframes ringDraw { from { stroke-dasharray: 0 999; } }
@keyframes popIn { from { opacity: 0; transform: translateY(-8px) scale(.97); } }
@keyframes popOut { to { opacity: 0; transform: translateY(-6px) scale(.98); } }
@keyframes barGrow { from { transform: scaleY(0); } }
@keyframes growX { from { transform: scaleX(0); } }
@keyframes slideIn { from { opacity: 0; transform: translateX(-12px); } }
@keyframes rowIn { from { opacity: 0; transform: translateY(8px); } }
@keyframes mapIn { from { opacity: 0; } }
@keyframes mkPing { 0% { transform: scale(1); opacity: .9; } 100% { transform: scale(4); opacity: 0; } }
@keyframes globeIn { from { opacity: 0; transform: scale(.85) rotate(-8deg); } }
@keyframes heatIn { from { opacity: 0; transform: scaleY(.2); } }
@keyframes shimmer { to { background-position: -200% 0; } }
@keyframes float { 50% { transform: translateY(-10px); } }
@keyframes shard { 50% { transform: translate(3px, -4px) rotate(4deg); } }
@keyframes sheen { 0%, 100% { background-position: 100% 0; } 50% { background-position: 0 0; } }
@keyframes glitchA { 0%, 100% { transform: none; clip-path: inset(0 0 100% 0); } 92% { transform: translate(-4px, 1px); clip-path: inset(20% 0 55% 0); } 94% { transform: translate(3px, -1px); clip-path: inset(60% 0 15% 0); } 96% { clip-path: inset(0 0 100% 0); } }
@keyframes glitchB { 0%, 100% { transform: none; clip-path: inset(0 0 100% 0); } 93% { transform: translate(4px, -1px); clip-path: inset(40% 0 35% 0); } 95% { transform: translate(-3px, 2px); clip-path: inset(10% 0 75% 0); } 97% { clip-path: inset(0 0 100% 0); } }
@keyframes jolt { 0%, 100% { transform: none; } 90% { transform: translateX(-3px) skewX(-4deg); } 91% { transform: translateX(4px) skewX(3deg); } 92% { transform: none; } }
@keyframes tremor { 50% { translate: .6px -.4px; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes fadeDown { from { opacity: 0; transform: translateY(-12px); } }
@keyframes rise { from { opacity: 0; transform: translateY(18px); filter: blur(6px); } }
@keyframes leave { to { opacity: 0; transform: scale(1.05); filter: blur(8px); } }
@keyframes panelIn { from { opacity: 0; transform: translateY(16px); } }
@keyframes breathe { 50% { opacity: .55; transform: scale(.96); } }
@keyframes dots { 0% { content: ""; } 25% { content: "·"; } 50% { content: "··"; } 75% { content: "···"; } }
@keyframes wave { 0%, 100% { stroke-dashoffset: 0; } 50% { stroke-dashoffset: 160; } }
@keyframes shake { 15%, 85% { transform: translateX(-2px); } 30%, 70% { transform: translateX(5px); } 45%, 55% { transform: translateX(-7px); } }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(127, 224, 195, .55); } 80%, 100% { box-shadow: 0 0 0 8px rgba(127, 224, 195, 0); } }
@keyframes blink { 50% { opacity: .3; } }
@keyframes alarm { 50% { box-shadow: 0 0 18px rgba(255, 111, 97, .35); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001s !important; animation-iteration-count: 1 !important; transition-duration: .001s !important; }
}
@keyframes drawIn { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
