/* ===== Tapone 运球水平测试 · 实验版 =====
 * 风格：大面积浅色底、粗黑标题、细分隔线、少量橙色点缀，数据是画面主角。
 * 品牌橙沿用 tapone-sensor-beta（#FF6B00），大号数字用 Beta 里的 Bebas Neue 窄体字。
 */

@font-face {
  font-family: 'TaponeNumber';
  src: url('./assets/fonts/BebasNeue-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #F5F4F0;
  --surface: #FFFFFF;
  --ink: #111111;
  --ink-2: #4A4741;
  --ink-3: #8A867E;
  --ink-4: #B9B5AD;
  --line: rgba(17, 17, 17, 0.12);
  --line-strong: rgba(17, 17, 17, 0.88);
  --accent: #FF6B00;
  --accent-ink: #D95500;
  --accent-soft: #FFEADB;
  --num: 'TaponeNumber', 'DIN Condensed', 'Arial Narrow', sans-serif;
  --sans: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
  --gutter: 20px;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  overscroll-behavior: none;   /* 测试中误触下拉不会刷新页面 */
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
}

body { overflow-x: hidden; user-select: none; -webkit-user-select: none; }

button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }

#app {
  min-height: 100vh;
  min-height: 100dvh;
  max-width: 480px;
  margin: 0 auto;
  padding: calc(env(safe-area-inset-top, 0px) + 12px) var(--gutter) calc(env(safe-area-inset-bottom, 0px) + 24px);
  display: flex;
  flex-direction: column;
}

.page { flex: 1; display: flex; flex-direction: column; }

/* ===== 顶栏 ===== */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 44px;
  flex-shrink: 0;
}
.topbar-logo { height: 30px; width: auto; display: block; }
.back-btn {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 15px; font-weight: 600; color: var(--ink);
  padding: 8px 4px 8px 0;
}
.back-btn::before { content: '←'; font-size: 18px; }
.text-btn { font-size: 14px; font-weight: 600; color: var(--ink-3); padding: 8px 0 8px 12px; }

/* 数据来源切换（传感器 / 模拟） */
.seg {
  display: inline-flex;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 2px;
}
.seg button {
  font-size: 12px; font-weight: 700;
  padding: 5px 11px;
  border-radius: 999px;
  color: var(--ink-2);
}
.seg button.is-on { background: var(--ink); color: #fff; }

/* ===== 通用文字 ===== */
.eyebrow {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: var(--ink-3);
}
.eyebrow .dot { color: var(--accent); }

.h1 {
  font-size: 40px;
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: -0.02em;
  margin-top: 10px;
}
.h2 { font-size: 28px; line-height: 1.15; font-weight: 900; letter-spacing: -0.01em; margin-top: 8px; }
.lead { font-size: 15px; line-height: 1.6; color: var(--ink-2); margin-top: 12px; }

/* 斜切橙色底线（运动感点缀） */
.hl { position: relative; white-space: nowrap; z-index: 0; }
.hl::after {
  content: '';
  position: absolute; left: -2px; right: -4px; bottom: 0.06em; height: 0.32em;
  background: var(--accent);
  transform: skewX(-14deg);
  z-index: -1;
}

.trial {
  display: inline-block;
  font-size: 11px; font-weight: 800; letter-spacing: 0.04em;
  color: var(--accent-ink);
  border: 1px solid currentColor;
  border-radius: 4px;
  padding: 1px 5px;
  vertical-align: middle;
  white-space: nowrap;
}

.sec-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 800; letter-spacing: 0.08em;
  color: var(--ink);
  padding-bottom: 10px;
  border-bottom: 2px solid var(--ink);
}
.sec-title .spacer { flex: 1; }

.hairline { border: 0; border-top: 1px solid var(--line); }

/* ===== 首页 ===== */
.hero { padding: 26px 0 22px; }

.source {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}
.status-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ink-4); flex-shrink: 0; }
.status-dot.is-on { background: #2EAD5B; }
.status-dot.is-wait { background: var(--accent); animation: blink 1s ease-in-out infinite; }
.status-dot.is-warn { background: #E5483B; }
.status-dot.is-sim { background: var(--ink); }
@keyframes blink { 50% { opacity: 0.25; } }
.source-info { flex: 1; min-width: 0; }
.source-title { font-size: 15px; font-weight: 800; word-break: break-all; }
.source-detail { font-size: 12px; color: var(--ink-3); margin-top: 2px; line-height: 1.5; }
.source-detail.is-error { color: #D23A2E; }
.pill-btn {
  flex-shrink: 0;
  font-size: 14px; font-weight: 800;
  color: #fff; background: var(--ink);
  border-radius: 999px;
  padding: 10px 16px;
}
.pill-btn.is-ghost { background: transparent; color: var(--ink); border: 1px solid var(--line-strong); }
.pill-btn:active, .test-row:active, .hand-tile:active, .btn:active { transform: scale(0.98); }

.tests { margin-top: 0; }
.test-row {
  width: 100%;
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 4px;
  text-align: left;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}
.test-row:first-child { border-top: 1px solid var(--line); }
.test-num { font-family: var(--num); font-size: 30px; color: var(--accent); line-height: 1; }
.test-name { font-size: 24px; font-weight: 900; letter-spacing: -0.01em; }
.test-desc { font-size: 13px; color: var(--ink-3); margin-top: 3px; }
.test-arrow {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--ink); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 700;
}

.mine { margin-top: 32px; }
.mine-row {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr auto auto 40px;
  align-items: center;
  gap: 10px;
  text-align: left;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.mine-label { font-size: 14px; font-weight: 700; }
.mine-sub { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.mine-value { font-size: 15px; font-weight: 800; text-align: right; white-space: nowrap; }
.mine-value small { font-size: 11px; font-weight: 600; color: var(--ink-3); margin-left: 2px; }
.mine-empty { color: var(--ink-4); font-weight: 600; }

.grade-chip {
  font-family: var(--num);
  font-size: 30px; line-height: 1;
  text-align: center;
  color: var(--ink);
}
.grade-chip.is-S { color: var(--accent); }
.grade-chip.is-none { color: var(--ink-4); font-size: 22px; }

.foot { margin-top: 28px; font-size: 12px; color: var(--ink-3); line-height: 1.7; text-align: center; }

/* ===== 准备页 ===== */
.prep-head { padding: 18px 0 18px; }

.hand-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hand-tile {
  position: relative;
  text-align: left;
  padding: 16px 16px 14px;
  border: 1.5px solid var(--line);
  background: var(--surface);
  border-radius: 14px;
  min-height: 112px;
  display: flex; flex-direction: column; justify-content: space-between;
}
.hand-tile.is-on { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.hand-tile.is-on::after {
  content: ''; position: absolute; top: 14px; right: 14px;
  width: 12px; height: 12px; border-radius: 50%; background: var(--accent);
}
.hand-name { font-size: 26px; font-weight: 900; }
.hand-last { font-size: 12px; color: var(--ink-3); }
.hand-last b { color: var(--ink); font-weight: 800; }

.opt-label { font-size: 12px; font-weight: 800; letter-spacing: 0.08em; color: var(--ink-3); margin: 20px 0 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font-size: 13px; font-weight: 700;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-2);
}
.chip.is-on { border-color: var(--ink); background: var(--ink); color: #fff; }

.rules { margin-top: 20px; }
.rules li {
  list-style: none;
  display: grid; grid-template-columns: 28px 1fr; gap: 6px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px; line-height: 1.5; color: var(--ink-2);
}
.rules li:first-child { border-top: 1px solid var(--line); }
.rules li span { font-family: var(--num); font-size: 18px; color: var(--accent); line-height: 1.3; }
.rules li b { color: var(--ink); }

.notice {
  margin-top: 16px;
  display: flex; align-items: center; gap: 12px;
  font-size: 13px; line-height: 1.5; color: var(--ink-2);
}
.notice p { flex: 1; }

/* 实时信号条 */
.live { margin-top: 20px; }
.live-head { display: flex; justify-content: space-between; align-items: center; font-size: 12px; font-weight: 700; color: var(--ink-3); }
.live-head .left { display: inline-flex; align-items: center; gap: 6px; }
.live-head .status-dot { width: 7px; height: 7px; }
.live-rate { font-variant-numeric: tabular-nums; }
.live-rate.is-warn { color: #D23A2E; }
.wave {
  display: block;
  width: 100%;
  height: 84px;
  margin-top: 8px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.wave.is-tall { height: 120px; }
.live.is-bottom { margin-top: 0; padding-top: 18px; }
.live-tip { font-size: 12px; color: var(--ink-3); margin-top: 6px; }

.prep-actions { margin-top: auto; padding-top: 24px; }

.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%;
  height: 58px;
  border-radius: 999px;
  font-size: 18px; font-weight: 900; letter-spacing: 0.02em;
  background: var(--accent); color: #fff;
}
.btn.is-dark { background: var(--ink); }
.btn.is-ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--ink); }
.btn + .btn { margin-top: 10px; }
.btn[disabled] { opacity: 0.35; }

/* ===== 倒计时 ===== */
.countdown {
  position: fixed; inset: 0;
  background: var(--bg);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  z-index: 50;
}
.countdown-num { font-family: var(--num); font-size: 220px; line-height: 0.9; color: var(--ink); }
.countdown-num.is-go { color: var(--accent); font-family: var(--sans); font-weight: 900; font-size: 88px; }
.countdown-tip { font-size: 15px; font-weight: 700; color: var(--ink-3); margin-top: 18px; }

/* ===== 测试中 ===== */
.run-top { display: flex; justify-content: space-between; align-items: center; height: 44px; }
.run-tag { font-size: 14px; font-weight: 900; }
.run-tag .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-right: 8px; vertical-align: 1px; animation: blink 1.2s ease-in-out infinite; }

.big-count {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
  padding: 8px 0;
  min-height: 260px;
}
.big-count-num {
  font-family: var(--num);
  font-size: 200px;
  line-height: 0.86;
  letter-spacing: 0.01em;
  color: var(--ink);
  display: inline-block;
}
.big-count-num.pop { animation: pop 0.22s ease-out; }
@keyframes pop {
  0% { transform: scale(1.12); color: var(--accent); }
  55% { color: var(--accent); }
  56%, 100% { transform: scale(1); color: var(--ink); }
}
.big-count-unit { font-size: 15px; font-weight: 800; color: var(--ink-3); margin-top: 6px; }

.wait-hint {
  text-align: center;
  font-size: 18px; font-weight: 900;
  color: var(--accent-ink);
  margin-top: 6px;
  animation: blink 1.1s ease-in-out infinite;
}

.run-stats {
  display: grid; grid-template-columns: 1fr 1fr;
  margin-top: 14px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.run-stat { padding: 12px 0; }
.run-stat + .run-stat { border-left: 1px solid var(--line); padding-left: 16px; }
.run-stat-label { font-size: 12px; font-weight: 700; color: var(--ink-3); }
.run-stat-value { font-size: 30px; font-weight: 900; margin-top: 2px; font-variant-numeric: tabular-nums; }
.run-stat-value small { font-size: 13px; font-weight: 700; color: var(--ink-3); margin-left: 3px; }

.progress { height: 4px; background: var(--line); margin-top: 18px; border-radius: 2px; overflow: hidden; }
.progress > i { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 2px; }

/* 节拍测进行中 */
.tempo-row { display: flex; align-items: flex-end; justify-content: space-between; padding-top: 14px; }
.tempo-stage { font-size: 14px; font-weight: 800; color: var(--ink-3); }
.tempo-num { font-family: var(--num); font-size: 84px; line-height: 0.85; }
.tempo-unit { font-size: 15px; font-weight: 800; color: var(--ink-3); margin-left: 4px; }
.beat-light {
  width: 76px; height: 76px; border-radius: 50%;
  border: 3px solid var(--ink);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--num); font-size: 40px; line-height: 1;
  transition: background 0.08s, color 0.08s, border-color 0.08s;
  flex-shrink: 0;
}
.beat-light.is-flash { background: var(--ink); color: #fff; }
.beat-light.is-accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.follow-line { font-size: 15px; font-weight: 800; margin-top: 16px; min-height: 22px; }
.follow-line .muted { color: var(--ink-3); font-weight: 700; }
.stage-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; min-height: 26px; }
.stage-chip { font-size: 12px; font-weight: 800; padding: 4px 8px; border-radius: 6px; background: var(--ink); color: #fff; }
.stage-chip.is-fail { background: transparent; color: var(--accent-ink); border: 1px solid currentColor; }

/* ===== 报告 ===== */
.report-head { padding: 14px 0 4px; }
.report-meta { font-size: 13px; font-weight: 700; color: var(--ink-3); margin-top: 4px; }
.sim-tag { display: inline-block; font-size: 11px; font-weight: 800; color: #fff; background: var(--ink); border-radius: 4px; padding: 1px 6px; margin-left: 6px; vertical-align: 1px; }

.overall {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: end;
  gap: 18px;
  padding: 10px 0 22px;
  border-bottom: 2px solid var(--ink);
}
.overall-grade {
  position: relative;
  font-family: var(--num);
  font-size: 196px;
  line-height: 0.8;
  padding: 0 6px;
  z-index: 0;
}
.overall-grade::after {
  content: '';
  position: absolute; left: -4px; right: -10px; bottom: 6px; height: 34px;
  background: var(--accent);
  transform: skewX(-14deg);
  z-index: -1;
}
.overall-grade.is-S { color: var(--ink); }
.overall-side { padding-bottom: 10px; }
.overall-label { font-size: 22px; font-weight: 900; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.overall-summary { font-size: 14px; line-height: 1.6; color: var(--ink-2); margin-top: 8px; }

.grades { margin-top: 26px; }
.grade-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.grade-name { font-size: 13px; font-weight: 800; color: var(--ink-3); }
.grade-value { font-size: 26px; font-weight: 900; margin-top: 3px; letter-spacing: -0.01em; }
.grade-value small { font-size: 13px; font-weight: 700; color: var(--ink-3); margin-left: 3px; letter-spacing: 0; }
.grade-note { font-size: 12px; color: var(--ink-3); margin-top: 3px; line-height: 1.5; }
.grade-letter {
  font-family: var(--num);
  font-size: 64px; line-height: 0.85;
  min-width: 52px; text-align: center;
}
.grade-letter.is-S { color: var(--accent); }
.grade-letter.is-none { font-size: 22px; color: var(--ink-4); font-family: var(--sans); font-weight: 700; }

.facts { margin-top: 30px; }
.fact-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; }
.fact { padding: 14px 0; }
.fact + .fact { border-left: 1px solid var(--line); padding-left: 12px; }
.fact-label { font-size: 12px; font-weight: 700; color: var(--ink-3); }
.fact-value { font-size: 26px; font-weight: 900; margin-top: 2px; }
.fact-value small { font-size: 12px; font-weight: 700; color: var(--ink-3); margin-left: 2px; }
.ref-tag { font-size: 10px; font-weight: 800; color: var(--ink-3); border: 1px solid var(--line); border-radius: 4px; padding: 0 4px; margin-left: 4px; vertical-align: 2px; }

.chart-block { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 14px; }
.chart-title { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; font-weight: 800; }
.chart-readout { font-size: 12px; font-weight: 700; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.chart { display: block; width: 100%; margin-top: 8px; touch-action: pan-y; }
.chart text { font-family: var(--sans); font-size: 10px; fill: var(--ink-3); font-variant-numeric: tabular-nums; }

.stage-table { margin-top: 26px; }
.stage-row {
  display: grid;
  grid-template-columns: 74px 1fr 64px;
  align-items: center;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}
.stage-rate { font-size: 15px; font-weight: 900; }
.stage-rate small { font-size: 11px; color: var(--ink-3); font-weight: 700; margin-left: 2px; }
.stage-bar { position: relative; height: 8px; background: var(--line); border-radius: 4px; }
.stage-bar > i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px; background: var(--ink); }
.stage-bar.is-fail > i { background: var(--accent); }
.stage-bar > em { position: absolute; top: -4px; bottom: -4px; width: 1px; background: var(--ink-2); }
.stage-res { text-align: right; font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums; }
.stage-res.is-fail { color: var(--accent-ink); }
.stage-legend { font-size: 12px; color: var(--ink-3); margin-top: 8px; line-height: 1.6; }

.report-actions { margin-top: 28px; }
.report-hint { font-size: 12px; color: var(--ink-3); text-align: center; margin-top: 10px; line-height: 1.6; }

/* ===== 弹窗 / 提示条 ===== */
.modal {
  position: fixed; inset: 0;
  background: rgba(17, 17, 17, 0.36);
  display: flex; align-items: flex-end; justify-content: center;
  z-index: 100;
  padding: 16px;
}
.modal-card {
  width: 100%; max-width: 440px;
  background: var(--surface);
  border-radius: 20px;
  padding: 24px 20px calc(env(safe-area-inset-bottom, 0px) + 18px);
}
.modal-title { font-size: 22px; font-weight: 900; }
.modal-text { font-size: 14px; line-height: 1.7; color: var(--ink-2); margin: 10px 0 18px; }
.modal-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.modal-actions .btn { height: 50px; font-size: 16px; margin: 0; }

.toast {
  position: fixed; left: 50%;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 28px);
  transform: translate(-50%, 16px);
  max-width: calc(100% - 40px);
  background: var(--ink); color: #fff;
  font-size: 14px; font-weight: 600; line-height: 1.5;
  padding: 10px 16px; border-radius: 12px;
  opacity: 0; pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 200; text-align: center;
}
.toast.is-show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 360px) {
  :root { --gutter: 16px; }
  .h1 { font-size: 34px; }
  .big-count-num { font-size: 168px; }
  .overall-grade { font-size: 168px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ===== 0.3 新增：主成绩区 ===== */
.score-hero {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 12px;
  padding: 8px 0 20px;
  border-bottom: 2px solid var(--ink);
}
.score-label { font-size: 14px; font-weight: 800; color: var(--ink-3); }
.score-num { font-family: var(--num); font-size: 132px; line-height: 0.86; margin-top: 6px; }
.score-unit { font-family: var(--sans); font-size: 18px; font-weight: 800; color: var(--ink-3); margin-left: 6px; }
.score-none { font-family: var(--sans); font-size: 34px; font-weight: 900; line-height: 1.6; }
.score-sub { font-size: 13px; font-weight: 600; color: var(--ink-2); margin-top: 8px; line-height: 1.6; }
.new-best { color: var(--accent-ink); }
.score-grade { text-align: center; padding-bottom: 4px; }
.score-grade .overall-grade { font-size: 132px; padding: 0 4px; }
.score-grade .overall-grade::after { height: 26px; bottom: 4px; }
.score-grade-label { font-size: 13px; font-weight: 800; margin-top: 12px; display: flex; gap: 6px; align-items: center; justify-content: center; }

/* 分析区 */
.an-row { padding: 15px 0; border-bottom: 1px solid var(--line); }
.an-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.an-name { font-size: 14px; font-weight: 800; color: var(--ink-2); }
.an-value { font-size: 24px; font-weight: 900; white-space: nowrap; }
.an-value small { font-size: 13px; font-weight: 700; color: var(--ink-3); margin-left: 2px; }
.an-text { font-size: 14px; line-height: 1.6; color: var(--ink); margin-top: 4px; }
.an-row.is-pending .an-value { color: var(--ink-4); }
.an-row.is-pending .an-text { color: var(--ink-3); }
.sec-count { font-size: 12px; font-weight: 700; color: var(--ink-3); letter-spacing: 0; }

/* 首页成绩行 / 小折线 */
.spark { display: block; }
.mine-row.is-flat { cursor: default; }
.mine-hint { font-size: 12px; color: var(--ink-3); margin-top: 8px; }
.muted-v { font-size: 13px; color: var(--ink-3); font-weight: 700; }

/* 历史记录 */
.hist-top { display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: end; padding: 10px 0 18px; }
.hist-best-v { font-size: 40px; font-weight: 900; margin-top: 2px; }
.hist-best-v small { font-size: 14px; color: var(--ink-3); margin-left: 3px; }
.hist-trend { text-align: right; }
.hist-trend .spark { margin-top: 6px; }
.hist-row {
  width: 100%; display: grid; grid-template-columns: 1fr auto 44px; align-items: center; gap: 10px;
  text-align: left; padding: 14px 0; border-bottom: 1px solid var(--line);
}
.hist-date { font-size: 14px; font-weight: 700; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.hist-value { font-size: 18px; font-weight: 900; }
.hist-value small { font-size: 11px; color: var(--ink-3); margin-left: 2px; }
.best-tag, .lb-tag, .me-tag {
  font-size: 10px; font-weight: 800; padding: 1px 5px; border-radius: 4px;
}
.best-tag { background: var(--accent); color: #fff; }
.lb-tag { border: 1px solid var(--line-strong); color: var(--ink); }
.me-tag { background: var(--ink); color: #fff; margin-left: 6px; vertical-align: 2px; }
.empty { font-size: 14px; color: var(--ink-3); padding: 24px 0; text-align: center; }

/* 排行榜 */
.rank-ages { margin: 4px 0 16px; }
.rank-me { border-top: 2px solid var(--ink); }
.rank-me-row { display: flex; justify-content: space-between; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.rank-me-v { font-size: 22px; font-weight: 900; margin-top: 2px; }
.rank-me-v b { font-family: var(--num); font-size: 34px; font-weight: 400; color: var(--accent); }
.rank-me-v small { font-size: 12px; color: var(--ink-3); margin-left: 2px; }
.rank-row { display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 8px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.rank-row.is-me { background: var(--accent-soft); margin: 0 -10px; padding: 12px 10px; border-radius: 8px; }
.rank-no { font-family: var(--num); font-size: 26px; color: var(--ink-3); }
.rank-no.is-top { color: var(--accent); }
.rank-name { font-size: 15px; font-weight: 800; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.rank-name small { font-size: 11px; font-weight: 600; color: var(--ink-3); margin-left: 6px; }
.rank-v { font-size: 20px; font-weight: 900; }
.rank-v small { font-size: 11px; color: var(--ink-3); margin-left: 2px; }
.privacy { font-size: 12px; color: var(--ink-3); line-height: 1.7; margin-top: 18px; }
.closed { padding: 30px 0; text-align: center; border-top: 1px solid var(--line); }
.closed-title { font-size: 26px; font-weight: 900; }
.closed p { font-size: 14px; color: var(--ink-3); margin-top: 8px; line-height: 1.6; }

/* 报告里的排行榜区 */
.lb-block { margin-top: 26px; padding-top: 14px; border-top: 1px solid var(--line); }
.lb-line { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 12px; }
.lb-title { font-size: 13px; font-weight: 800; letter-spacing: 0.08em; }
.lb-note { font-size: 12px; color: var(--ink-3); text-align: right; line-height: 1.5; }
.lb-block .btn { height: 50px; font-size: 16px; }

/* 节拍测报告 */
.stage-detail { font-size: 11px; color: var(--ink-3); margin-top: 4px; }
.warn { display: block; color: var(--accent-ink); margin-top: 6px; }

/* 准备页提示 */
.awake-tip { font-size: 12px; color: var(--ink-3); margin-top: 14px; line-height: 1.6; }
.awake-tip b { color: var(--ink); }
.countdown-num.is-ready { font-family: var(--sans); font-weight: 900; font-size: 72px; }

/* 表单 */
.text-input {
  width: 100%; height: 50px; border: 1.5px solid var(--ink); border-radius: 12px;
  padding: 0 14px; font-size: 17px; font-weight: 700; font-family: var(--sans); background: #fff;
  user-select: text; -webkit-user-select: text;
}
.form-err { color: #D23A2E; font-size: 13px; min-height: 20px; margin: 10px 0 6px; }
#profile-form .chips { margin-bottom: 4px; }
