/* ==========================================================================
   Elysium LP 看板 · 样式（浅色 / AGC · Uniswap 气质）
   只使用系统字体栈，无外部字体、无 CDN。
   ========================================================================== */

/* ------------------------------ 设计变量 ------------------------------ */
:root {
  --bg: #f6f7f9;
  --card: #ffffff;
  --line: rgba(17, 17, 17, 0.07);
  --line-strong: rgba(17, 17, 17, 0.12);
  --ink: #111111;
  --ink-2: rgba(17, 17, 17, 0.55);
  --ink-3: rgba(17, 17, 17, 0.38);
  --accent: #ff6a00;
  --accent-soft: rgba(255, 106, 0, 0.1);
  --accent-line: rgba(255, 106, 0, 0.24);
  --pos: #12a150;
  --neg: #e5484d;
  --bar: #a9bbd1; /* 非当前柱：浅灰蓝 */
  --bar-hover: #94a9c4;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(17, 17, 17, 0.04);
  --shadow-lift: 0 6px 20px rgba(17, 17, 17, 0.06);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", "Helvetica Neue",
    "PingFang SC", "Microsoft YaHei", sans-serif;
  --page-max: 1160px;
}

/* ------------------------------ 基础重置 ------------------------------ */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
}

h1,
h2,
h3,
p,
dl,
dd,
dt,
figure {
  margin: 0;
}

button {
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
}

a {
  color: inherit;
}

code {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

/* 数字统一等宽，避免跳动 */
.stat-v,
.quote-value,
.detail-v,
.amount-v,
.range-label,
.range-val,
.range-share,
.dist-stat-v,
.tag-v,
.pool-id-value,
.foot-left,
.pos-token,
.pos-range {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

/* ------------------------------ 布局 ------------------------------ */
.topbar,
.page,
.page-foot {
  width: 100%;
  max-width: var(--page-max);
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

/* ------------------------------ 顶栏 ------------------------------ */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 20px;
  padding-bottom: 18px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
  flex: none;
}

.brand-name {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.brand-tag {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-2);
  background: rgba(17, 17, 17, 0.04);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 9px;
  white-space: nowrap;
}

.brand-tag.muted {
  color: var(--ink-3);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.refresh-state {
  font-size: 12px;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
  min-height: 16px;
}

/* ------------------------------ 按钮 ------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 38px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--card);
  color: var(--ink);
  font-size: 14px;
  font-weight: 650;
  transition: background 0.16s ease, border-color 0.16s ease, transform 0.16s ease,
    box-shadow 0.16s ease;
  white-space: nowrap;
}

.btn:hover {
  background: #fafafa;
  border-color: rgba(17, 17, 17, 0.2);
}

.btn:active {
  transform: translateY(1px);
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 1px 2px rgba(255, 106, 0, 0.24);
}

.btn-primary:hover {
  background: #f26200;
  border-color: #f26200;
}

.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--ink-2);
  padding: 0 12px;
}

.btn-ghost:hover {
  background: rgba(17, 17, 17, 0.04);
  border-color: transparent;
  color: var(--ink);
}

.btn-lg {
  height: 44px;
  padding: 0 22px;
  font-size: 15px;
}

.icon-btn {
  border: 1px solid var(--line-strong);
  background: var(--card);
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 650;
  border-radius: 999px;
  height: 26px;
  padding: 0 10px;
  transition: color 0.16s ease, border-color 0.16s ease;
}

.icon-btn:hover {
  color: var(--ink);
  border-color: rgba(17, 17, 17, 0.24);
}

.icon-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.icon-btn.done {
  color: var(--pos);
  border-color: rgba(18, 161, 80, 0.35);
}

.link {
  font-size: 12px;
  font-weight: 650;
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid var(--accent-line);
}

.link:hover {
  border-bottom-color: var(--accent);
}

/* spinner 小圈 */
.spinner {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 2px solid rgba(17, 17, 17, 0.16);
  border-top-color: var(--accent);
  animation: spin 0.7s linear infinite;
  flex: none;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ------------------------------ 顶部提示条 ------------------------------ */
.banner {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 24px;
  background: #fff8e6;
  border-bottom: 1px solid rgba(17, 17, 17, 0.07);
  color: #6b4b00;
  font-size: 13px;
  font-weight: 600;
}

.banner[hidden] {
  display: none;
}

.banner-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #e2a300;
  flex: none;
}

.banner-text {
  flex: 1;
  min-width: 0;
}

.banner-btn {
  border: 1px solid rgba(107, 75, 0, 0.28);
  background: #fff;
  color: #6b4b00;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  height: 26px;
  padding: 0 12px;
}

.banner-btn[hidden] {
  display: none;
}

.banner-close {
  border: 0;
  background: transparent;
  color: rgba(107, 75, 0, 0.6);
  font-size: 18px;
  line-height: 1;
  padding: 0 4px;
}

.banner.is-danger {
  background: #fff1f0;
  color: #8c1d1f;
}

.banner.is-danger .banner-dot {
  background: var(--neg);
}

.banner.is-danger .banner-btn {
  color: #8c1d1f;
  border-color: rgba(140, 29, 31, 0.3);
}

/* ------------------------------ 卡片通用 ------------------------------ */
.page {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding-bottom: 28px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px 24px;
}

.card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.card-title {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.card-note {
  font-size: 12px;
  color: var(--ink-3);
  font-weight: 600;
}

.card-sub {
  font-size: 12.5px;
  color: var(--ink-3);
  margin-top: -8px;
  margin-bottom: 14px;
}

/* ------------------------------ ① 池头卡 ------------------------------ */
.hero {
  padding: 26px 28px 20px;
}

.hero-grid {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.hero-title {
  font-size: 42px;
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.hero-sub {
  margin-top: 8px;
  font-size: 13px;
  color: var(--ink-2);
  font-weight: 600;
}

.hero-quote {
  text-align: right;
  min-width: 190px;
}

.quote-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.quote-value {
  font-size: 38px;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.025em;
  margin-top: 2px;
}

.quote-value.is-empty {
  color: var(--ink-3);
  font-size: 28px;
  font-weight: 600;
}

.quote-sub {
  font-size: 13px;
  color: var(--ink-2);
  font-weight: 600;
  margin-top: 4px;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fafbfc;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 12.5px;
  color: var(--ink-2);
  font-weight: 600;
  white-space: nowrap;
}

.tag-k {
  color: var(--ink-3);
  font-weight: 600;
}

.tag-v {
  color: var(--ink);
  font-weight: 700;
}

.tag.live .tag-v {
  color: var(--accent);
}

.tag.live::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 1.8s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.35;
  }
}

.hero-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.pool-id {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.pool-id-label {
  font-size: 12px;
  color: var(--ink-3);
  font-weight: 600;
}

.pool-id-value {
  font-size: 12.5px;
  color: var(--ink);
  background: rgba(17, 17, 17, 0.04);
  border-radius: 8px;
  padding: 3px 8px;
  font-weight: 600;
}

.hero-meta {
  font-size: 12px;
  color: var(--ink-3);
  font-weight: 600;
  text-align: right;
}

/* ------------------------------ ② 概览卡 ------------------------------ */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.stat-grid + .stat-grid {
  margin-top: 10px;
}

.stat {
  background: #fafbfc;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  min-width: 0;
}

.stat-k {
  font-size: 12px;
  color: var(--ink-3);
  font-weight: 650;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stat-v {
  font-size: 26px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-top: 6px;
}

.stat-sub {
  font-size: 12.5px;
  font-weight: 650;
  color: var(--ink-2);
  margin-top: 4px;
}

/* 小号格子（三档年化） */
.stat-grid-sm {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stat.small .stat-v {
  font-size: 20px;
}

.stat.accented {
  background: var(--accent-soft);
  border-color: var(--accent-line);
}

.stat.accented .stat-v {
  color: var(--accent);
}

/* 概览卡底部说明（年化口径） */
.stat-note {
  margin-top: 10px;
  font-size: 11.5px;
  color: var(--ink-3);
  font-weight: 600;
}

/* 钱包级警告（汇总卡下方） */
.warn-list {
  list-style: none;
  margin: 12px 0 0;
  padding: 10px 14px;
  background: #fff8e6;
  border: 1px solid rgba(226, 163, 0, 0.24);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.warn-list li {
  position: relative;
  padding-left: 14px;
  font-size: 12px;
  font-weight: 650;
  color: #6b4b00;
  line-height: 1.45;
}

.warn-list li::before {
  content: "!";
  position: absolute;
  left: 2px;
  top: 0;
  color: #b98600;
  font-weight: 800;
}

/* 仓位级警告（仓位卡底部，小字灰字） */
.pos-warnings {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pos-warnings li {
  position: relative;
  padding-left: 12px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-3);
  line-height: 1.45;
}

.pos-warnings li::before {
  content: "·";
  position: absolute;
  left: 2px;
}

/* 空态 / 引导态 */
.empty {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding: 8px 2px;
}

.empty.compact {
  justify-content: flex-start;
  padding: 14px 2px;
  display: block;
}

.empty-title {
  font-size: 17px;
  font-weight: 750;
  letter-spacing: -0.01em;
}

.empty-note {
  font-size: 13px;
  color: var(--ink-2);
  margin-top: 6px;
  max-width: 62ch;
}

.empty-tip {
  margin-top: 10px;
  font-size: 12.5px;
  font-weight: 650;
  color: var(--neg);
}

.notice {
  background: #fff8e6;
  border: 1px solid rgba(226, 163, 0, 0.28);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 600;
  color: #6b4b00;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

/* 骨架占位（首屏加载） */
.skeleton-line {
  height: 84px;
  border-radius: var(--radius-sm);
  background: linear-gradient(90deg, #f4f5f7 0%, #eceef1 50%, #f4f5f7 100%);
  background-size: 200% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* ------------------------------ ③ 我的仓位 ------------------------------ */
.section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 2px 4px 0;
}

.section-title {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.015em;
}

.positions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pos {
  padding: 20px 22px;
}

.pos-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.pos-id {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pos-token {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 11.5px;
  font-weight: 700;
}

.badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.badge.ok {
  color: var(--pos);
  background: rgba(18, 161, 80, 0.1);
}

.badge.out {
  color: var(--ink-3);
  background: rgba(17, 17, 17, 0.05);
}

.pos-range {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}

.pos-range .unit {
  font-size: 12px;
  color: var(--ink-3);
  font-weight: 650;
  margin-left: 2px;
}

/* 价格位置进度条 */
.rangebar {
  margin-top: 14px;
}

.rangebar-track {
  position: relative;
  height: 8px;
  border-radius: 999px;
  background: rgba(17, 17, 17, 0.06);
}

.rangebar-fill {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 106, 0, 0.18), rgba(255, 106, 0, 0.38));
}

.rangebar.is-out .rangebar-fill {
  background: rgba(17, 17, 17, 0.1);
}

.rangebar-dot {
  position: absolute;
  top: 50%;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid #fff;
  box-shadow: 0 1px 3px rgba(17, 17, 17, 0.18);
  transform: translate(-50%, -50%);
}

.rangebar.is-out .rangebar-dot {
  background: var(--ink-3);
}

/* 全区间仓位：整条浅色铺满，不显示位置点 */
.rangebar.is-full .rangebar-fill {
  background: var(--accent-soft);
}

.rangebar.is-full .rangebar-track {
  background: rgba(255, 106, 0, 0.08);
}

/* 缺价（普通仓位但价格缺失）：不显示填充 */
.rangebar.is-unknown .rangebar-fill {
  background: rgba(17, 17, 17, 0.06);
}

/* 全区间徽标（与在区间徽标并列） */
.badge.range-badge {
  color: var(--accent);
  background: var(--accent-soft);
}

.badge.range-badge::before {
  background: var(--accent);
}

.rangebar-labels {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
  font-size: 11.5px;
  color: var(--ink-3);
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.rangebar-now {
  color: var(--accent);
}

/* 本金 / 待领 */
.pos-amounts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.amount {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  background: #fafbfc;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 9px 13px;
  font-size: 13px;
}

.amount-k {
  font-size: 11.5px;
  color: var(--ink-3);
  font-weight: 650;
  white-space: nowrap;
}

.amount-v {
  font-weight: 700;
  color: var(--ink);
}

.amount-v + .amount-v {
  margin-left: 2px;
}

/* 明线网格 */
.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
  gap: 0;
  margin-top: 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.detail {
  background: var(--card);
  padding: 12px 14px;
  min-width: 0;
  /* 用外扩 1px 描边画分隔线：相邻格子描边重合为 1px，末尾空位保持纯白 */
  box-shadow: 0 0 0 1px var(--line);
}

.detail-k {
  font-size: 11.5px;
  color: var(--ink-3);
  font-weight: 650;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.detail-v {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-top: 4px;
}

.detail-sub {
  font-size: 11.5px;
  color: var(--ink-3);
  font-weight: 650;
  margin-top: 2px;
}

/* 涨跌色（避免与 .pos 仓位卡选择器冲突，统一用 .up / .down） */
.up {
  color: var(--pos);
}

.down {
  color: var(--neg);
}

.flat {
  color: var(--ink);
}

/* ------------------------------ ④ 流动性分布 ------------------------------ */
.dist-current {
  font-size: 15px;
  font-weight: 750;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.dist-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 268px;
  gap: 18px;
  align-items: stretch;
}

.dist-chart-wrap {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.dist-scroll {
  flex: 1 1 auto;
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
}

.dist-chart {
  position: relative;
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 100%;
  min-height: 210px;
  /* 桶少时铺满容器；桶多时按内容变宽，由 .dist-scroll 横向滚动 */
  width: max-content;
  min-width: 100%;
  padding: 22px 4px 0;
  border-bottom: 1px solid var(--line);
}

.bar-col {
  flex: 1 1 0;
  min-width: 14px;
  height: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  position: relative;
}

.bar {
  width: 100%;
  max-width: 46px;
  border-radius: 6px 6px 2px 2px;
  background: var(--bar);
  transition: height 0.35s cubic-bezier(0.22, 1, 0.36, 1), background 0.16s ease;
}

.bar-col:hover .bar {
  background: var(--bar-hover);
}

.bar-col.is-current .bar {
  background: var(--accent);
}

.bar-col.is-current:hover .bar {
  background: #f26200;
}

.bar-col .bar-empty {
  width: 100%;
  max-width: 46px;
  height: 2px;
  border-radius: 2px;
  background: rgba(17, 17, 17, 0.07);
}

.dist-empty {
  margin: auto;
  color: var(--ink-3);
  font-size: 13px;
  font-weight: 650;
  padding-bottom: 40px;
}

/* 当前价竖线 */
.price-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 0;
  border-left: 1.5px dashed var(--accent);
  pointer-events: none;
  z-index: 2;
}

.price-line-label {
  position: absolute;
  top: 0;
  left: 0;
  transform: translateX(-50%);
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  border-radius: 999px;
  padding: 2px 8px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.dist-axis {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
  font-size: 11.5px;
  color: var(--ink-3);
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.dist-axis span {
  white-space: nowrap;
}

/* 右侧统计卡 */
.dist-stats {
  background: #fafbfc;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 6px 16px;
  align-self: start;
}

.dist-stat {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.dist-stat:last-child {
  border-bottom: 0;
}

.dist-stat-k {
  font-size: 12.5px;
  color: var(--ink-3);
  font-weight: 650;
  white-space: nowrap;
}

.dist-stat-v {
  font-size: 14px;
  font-weight: 750;
  text-align: right;
}

/* 主要区间表格 */
.ranges {
  margin-top: 20px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.ranges-head {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1.4fr;
  gap: 12px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--ink-3);
  padding: 0 2px 8px;
}

.range-row {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1.4fr;
  gap: 12px;
  align-items: center;
  padding: 10px 2px;
  border-top: 1px solid var(--line);
  font-size: 13.5px;
}

.range-label {
  font-weight: 700;
}

.range-val {
  font-weight: 700;
  color: var(--ink);
}

.range-share {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 650;
  color: var(--ink-2);
  font-size: 12.5px;
}

.range-bar {
  flex: 1;
  height: 6px;
  border-radius: 999px;
  background: rgba(17, 17, 17, 0.07);
  position: relative;
  overflow: hidden;
  min-width: 40px;
}

.range-bar > i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--bar);
}

.range-pct {
  font-style: normal;
  font-weight: 650;
  color: var(--ink-2);
  min-width: 46px;
  text-align: right;
}

.range-row.is-current .range-bar > i {
  background: var(--accent);
}

.range-row.is-current .range-label::after {
  content: "当前";
  margin-left: 8px;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 1px 6px;
  vertical-align: 1px;
}

.ranges-more {
  margin-top: 10px;
  font-size: 12px;
  color: var(--ink-3);
  font-weight: 600;
}

/* ------------------------------ 页脚 ------------------------------ */
.page-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 6px;
  padding-bottom: 32px;
  font-size: 12px;
  color: var(--ink-3);
  font-weight: 600;
}

.foot-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.foot-stale {
  color: #8c6a00;
  background: #fff8e6;
  border-radius: 999px;
  padding: 1px 8px;
  font-weight: 700;
}

.foot-stale[hidden] {
  display: none;
}

/* ------------------------------ 响应式 ------------------------------ */
@media (max-width: 1024px) {
  .stat-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .stat-grid-sm {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dist-body {
    grid-template-columns: minmax(0, 1fr);
  }

}

@media (max-width: 720px) {
  .topbar,
  .page,
  .page-foot {
    padding-left: 14px;
    padding-right: 14px;
  }

  .page {
    gap: 14px;
  }

  .card {
    padding: 18px 16px;
    border-radius: 16px;
  }

  .hero {
    padding: 20px 18px 16px;
  }

  .hero-title {
    font-size: 34px;
  }

  .quote-value {
    font-size: 30px;
  }

  .hero-grid {
    gap: 14px;
  }

  .hero-quote {
    text-align: left;
    min-width: 0;
  }

  .hero-meta {
    text-align: left;
  }

  .stat-grid,
  .stat-grid-sm {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stat-v {
    font-size: 22px;
  }

  .detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ranges-head,
  .range-row {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.85fr) minmax(52px, 0.75fr);
    gap: 8px;
  }

  /* 移动端保留占比横条，只隐藏百分比数字，避免看不到份额 */
  .range-pct {
    display: none;
  }

  .range-share {
    gap: 0;
  }

  .range-bar {
    min-width: 36px;
  }

  .dist-chart {
    min-height: 180px;
  }

  .brand-tag {
    display: none;
  }
}

@media (max-width: 420px) {
  .stat-grid,
  .stat-grid-sm {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stat {
    padding: 12px 13px;
  }

  .stat-v {
    font-size: 20px;
  }

  .detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-title {
    font-size: 30px;
  }

  .quote-value {
    font-size: 26px;
  }
}

/* 减少动效偏好 */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}
