/* =========================================================
   GolfTrace — premium minimal · black + gold
   ========================================================= */

:root {
  --bg:            #0a0a0c;
  --bg-elev:       #131318;
  --bg-elev-2:     #1a1a21;
  --border:        #24242c;
  --border-strong: #34343f;
  --text:          #f4f4f6;
  --text-muted:    #93939c;
  --text-dim:      #62626b;
  --gold:          #d4a857;
  --gold-soft:     #e8c684;
  --gold-glow:     rgba(212, 168, 87, 0.18);
  --danger:        #e25c54;
  --success:       #5fc78b;

  --radius:        12px;
  --radius-sm:     8px;
  --radius-lg:     20px;
  --container:     1140px;

  --shadow-sm:     0 1px 2px rgba(0,0,0,.5);
  --shadow-md:     0 8px 24px rgba(0,0,0,.4);
  --shadow-lg:     0 24px 60px rgba(0,0,0,.5);
}

* { box-sizing: border-box; }

/* 全局: hidden 属性永远赢过 display:flex / grid */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans CJK SC', 'Noto Sans SC', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }

/* ============== CONTAINER ============== */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 28px;
}
.container-narrow { max-width: 780px; }

/* ============== NAV ============== */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 10, 12, 0.72);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 66px;
  gap: 32px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-weight: 700;
  letter-spacing: -0.01em;
}
.brand svg { color: var(--gold); }
.brand-name { font-size: 17px; }
.nav-links {
  display: flex;
  gap: 30px;
  font-size: 14px;
  color: var(--text-muted);
}
.nav-links a {
  transition: color .15s ease;
}
.nav-links a:hover { color: var(--text); }
.nav-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all .15s ease;
  font-family: inherit;
}
.lang-toggle:hover {
  border-color: var(--gold);
  color: var(--text);
}
.lang-toggle .lang-current { color: var(--gold); font-weight: 600; }
.lang-toggle .lang-divider { opacity: .4; }

/* ============== BUTTONS ============== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: 999px;
  font-weight: 500;
  font-size: 14px;
  font-family: inherit;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all .18s ease;
  white-space: nowrap;
}
.btn-sm { padding: 8px 16px; font-size: 13px; }
.btn-lg { padding: 14px 28px; font-size: 15px; }
.btn-block { width: 100%; }

.btn-primary {
  background: var(--gold);
  color: #1a1206;
  font-weight: 600;
}
.btn-primary:hover { background: var(--gold-soft); transform: translateY(-1px); box-shadow: 0 8px 24px var(--gold-glow); }
.btn-primary:disabled { background: var(--border); color: var(--text-dim); cursor: not-allowed; transform: none; box-shadow: none; }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }

.link-btn {
  background: none;
  border: none;
  color: var(--gold);
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  padding: 0;
}
.link-btn:hover { text-decoration: underline; }

/* ============== HERO ============== */
.hero {
  position: relative;
  padding: 110px 0 130px;
  overflow: hidden;
}
.hero-inner {
  position: relative;
  z-index: 2;
  text-align: center;
}
.hero-eyebrow {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(212, 168, 87, 0.08);
  border: 1px solid rgba(212, 168, 87, 0.18);
  color: var(--gold);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 28px;
}
.hero-title {
  font-size: clamp(40px, 6vw, 76px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin: 0 0 24px;
}
.hero-title .accent {
  display: block;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-soft) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-sub {
  max-width: 640px;
  margin: 0 auto 40px;
  font-size: 19px;
  color: var(--text-muted);
  line-height: 1.55;
}
.hero-cta {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.hero-trust {
  color: var(--text-dim);
  font-size: 13px;
}
.hero-blur {
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 600px;
  background: radial-gradient(ellipse at center, var(--gold-glow) 0%, transparent 60%);
  filter: blur(60px);
  z-index: 1;
  pointer-events: none;
}

/* ============== SECTIONS ============== */
.section {
  padding: 110px 0;
  position: relative;
}
.section-alt {
  background: linear-gradient(180deg, transparent 0%, rgba(255,255,255,0.015) 50%, transparent 100%);
  border-top: 1px solid rgba(255,255,255,0.04);
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.section-head { text-align: center; margin-bottom: 72px; }
.section-label {
  display: inline-block;
  color: var(--gold);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.section-title {
  font-size: clamp(28px, 4vw, 46px);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.15;
  margin: 0;
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

/* ============== STEPS ============== */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  counter-reset: step;
}
.step {
  padding: 36px 32px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  position: relative;
  transition: border-color .2s ease, transform .2s ease;
}
.step:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.step-num {
  color: var(--gold);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  margin-bottom: 18px;
}
.step h3 {
  font-size: 19px;
  font-weight: 600;
  margin: 0 0 10px;
  letter-spacing: -0.01em;
}
.step p {
  margin: 0;
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.6;
}

/* ============== FEATURES ============== */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.feature {
  padding: 32px 28px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all .2s ease;
}
.feature:hover {
  border-color: rgba(212, 168, 87, 0.3);
  background: var(--bg-elev-2);
}
.feature-icon {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(212, 168, 87, 0.08);
  color: var(--gold);
  border-radius: 10px;
  margin-bottom: 20px;
}
.feature h3 {
  font-size: 17px;
  font-weight: 600;
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}
.feature p {
  margin: 0;
  color: var(--text-muted);
  font-size: 14.5px;
  line-height: 1.6;
}

/* ============== ANALYZER ============== */
.section-analyze {
  padding: 110px 0;
}
.analyzer {
  display: grid;
  grid-template-columns: minmax(280px, 380px) minmax(0, 1fr);
  gap: 32px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px;
}
.analyzer-left { display: flex; flex-direction: column; gap: 20px; }

/* dropzone */
.dropzone {
  display: block;
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius);
  padding: 36px 24px;
  text-align: center;
  cursor: pointer;
  transition: all .2s ease;
  background: rgba(255,255,255,0.015);
}
.dropzone:hover, .dropzone.dragover {
  border-color: var(--gold);
  background: rgba(212, 168, 87, 0.05);
}
.dropzone-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: var(--text-muted);
}
.dropzone-content svg { color: var(--gold); opacity: 0.9; }
.dropzone-title { color: var(--text); font-size: 16px; font-weight: 500; }
.dropzone-sub { font-size: 13px; color: var(--text-dim); }
.dropzone-selected {
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
}
.dropzone-selected svg { color: var(--gold); flex-shrink: 0; }
.dropzone-selected > div { flex: 1; min-width: 0; }
.selected-name {
  font-weight: 500;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.selected-size { color: var(--text-dim); font-size: 12px; }

/* advanced */
.advanced {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0;
}
.advanced > summary {
  cursor: pointer;
  padding: 14px 18px;
  font-size: 14px;
  color: var(--text-muted);
  user-select: none;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.advanced > summary::-webkit-details-marker { display: none; }
.advanced > summary::after {
  content: '+';
  font-size: 18px;
  font-weight: 300;
  color: var(--text-dim);
}
.advanced[open] > summary::after { content: '−'; }
.advanced[open] > summary { color: var(--text); border-bottom: 1px solid var(--border); }
.adv-row { padding: 14px 18px; }
.adv-row + .adv-row { border-top: 1px solid var(--border); }
.adv-row label { display: block; font-size: 12px; color: var(--text-muted); margin-bottom: 6px; font-weight: 500; }
.adv-row select, .adv-row input {
  width: 100%;
  background: var(--bg-elev-2);
  border: 1px solid var(--border-strong);
  color: var(--text);
  padding: 9px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-family: inherit;
}
.adv-row select:focus, .adv-row input:focus {
  outline: none;
  border-color: var(--gold);
}
.adv-hint { margin-top: 6px; color: var(--text-dim); font-size: 11.5px; }
.adv-optional { color: var(--text-dim); font-weight: 400; font-size: 11px; }

.sample-btn {
  display: block;
  width: 100%;
  background: transparent;
  border: 1px dashed var(--border-strong);
  color: var(--gold);
  padding: 10px 16px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  margin-top: -4px;
  transition: all .15s ease;
}
.sample-btn:hover {
  border-color: var(--gold);
  background: rgba(212, 168, 87, 0.06);
}
.sample-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* status */
.status { display: flex; flex-direction: column; gap: 8px; }
.status-bar {
  width: 100%;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}
.status-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--gold-soft));
  width: 0%;
  transition: width .4s ease;
  border-radius: 2px;
}
.status-text { color: var(--text-muted); font-size: 13px; }

/* 分步进度清单: ✓ 完成(绿) / ● 进行中(金+呼吸) / ○ 等待(暗) */
.status-steps {
  list-style: none;
  margin: 2px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.status-steps li {
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 9px;
  transition: color .3s ease;
}
.step-icon {
  width: 16px;
  text-align: center;
  flex-shrink: 0;
  font-size: 12px;
}
.status-steps .step-done    { color: var(--text-muted); }
.status-steps .step-done .step-icon { color: #6ec06e; }
.status-steps .step-active  { color: var(--text); font-weight: 500; }
.status-steps .step-active .step-icon {
  color: var(--gold);
  animation: step-pulse 1.1s ease-in-out infinite;
}
.status-steps .step-pending { color: var(--text-dim); opacity: 0.55; }
@keyframes step-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

/* analyzer right */
.analyzer-right {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  min-height: 420px;
  position: relative;
  overflow: hidden;
}
.empty-state {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: var(--text-dim);
}
.empty-state p { margin: 0; font-size: 14px; }

.result-head {
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}
.result-head h3 { margin: 0 0 6px; font-size: 18px; font-weight: 600; letter-spacing: -0.01em; }
.result-meta { font-size: 12px; color: var(--text-dim); }

.annotated-figure {
  margin: 0 0 22px;
  padding: 0;
  background: #000;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.annotated-video {
  width: 100%;
  max-height: 480px;
  display: block;
  background: #000;
}
.annotated-figure figcaption {
  padding: 8px 14px;
  font-size: 11.5px;
  color: var(--text-dim);
  letter-spacing: 0.03em;
  border-top: 1px solid var(--border);
  background: var(--bg-elev);
  text-align: center;
}

/* ============== 关键帧网格 ============== */
.phase-frames { margin-bottom: 22px; }
.phase-frames-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  margin-bottom: 10px;
  font-weight: 500;
}
.phase-frames-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.phase-frame {
  background: #000;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  transition: border-color .15s ease, transform .15s ease;
}
.phase-frame:hover {
  border-color: var(--gold);
  transform: translateY(-2px);
}
.phase-frame-img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  display: block;
  background: #000;
  cursor: zoom-in;
  transition: opacity 0.15s;
}
.phase-frame-img:hover { opacity: 0.88; }
.phase-frame-caption {
  padding: 6px 8px;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--gold);
  text-align: center;
  border-top: 1px solid var(--border);
  background: var(--bg-elev);
  font-weight: 500;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.phase-frame-time {
  font-size: 10px;
  color: var(--text-dim);
  font-weight: 400;
  font-variant-numeric: tabular-nums;
}
@media (max-width: 600px) {
  .phase-frames-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ============== 挥杆轨迹回放视频 (合并杆身/平面/累积路径) ============== */
.trajectory-figure {
  margin: 0 0 22px;
  padding: 0;
  background: #000;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.trajectory-video {
  display: block;
  width: 100%;
  max-height: 560px;
  background: #000;
}

/* ============== Lightbox (点击图片放大) ============== */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.94);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  cursor: zoom-out;
  animation: lightbox-fade 0.18s ease-out;
}
@keyframes lightbox-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.lightbox-img {
  max-width: 95vw;
  max-height: 95vh;
  object-fit: contain;
  box-shadow: 0 20px 80px rgba(0, 0, 0, 0.7);
  border-radius: 4px;
}
.lightbox-close {
  position: absolute;
  top: 18px;
  right: 22px;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, border-color 0.15s;
}
.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.5);
}
.trajectory-figure figcaption {
  padding: 8px 14px;
  font-size: 11.5px;
  color: var(--text-dim);
  letter-spacing: 0.03em;
  border-top: 1px solid var(--border);
  background: var(--bg-elev);
  text-align: center;
}
/* 2026-09-30 杆头出画多时的拍摄提示 (main.js renderTrajectoryVideo) */
.trajectory-hint {
  margin: 0;
  padding: 8px 14px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--gold-soft);
  background: var(--gold-glow);
  border-top: 1px solid var(--border);
  text-align: center;
}

.metric-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 24px;
}
.metric {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
}
.metric-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  margin-bottom: 6px;
}
.metric-value {
  font-size: 20px;
  font-weight: 600;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}
.metric-unit { font-size: 12px; color: var(--text-dim); margin-left: 2px; font-weight: 400; }
.metric-approx { font-size: 11px; color: var(--text-dim); margin-top: 3px; font-weight: 400; letter-spacing: 0.02em; font-variant-numeric: tabular-nums; }
/* 背面/正面机位: 旋转类指标不适用的淡化卡 (虚线边框 + 小灰字) */
.metric-na { opacity: 0.6; border-style: dashed; }
.metric-na .metric-value { font-size: 13px; font-weight: 500; color: var(--text-dim); }
/* 智能着色: 好(绿)/中(金,默认)/差(红) + 基准小字 */
.metric-good { border-left: 3px solid #6ec06e; }
.metric-good .metric-value { color: #6ec06e; }
.metric-warn { border-left: 3px solid var(--gold); }
.metric-bad  { border-left: 3px solid #e07b7b; }
.metric-bad .metric-value { color: #e07b7b; }
.metric-bench { font-size: 10px; color: var(--text-dim); margin-top: 5px; letter-spacing: 0.02em; }

.report-lang-note {
  font-size: 12px;
  color: var(--text-dim);
  border: 1px dashed var(--border);
  border-radius: 6px;
  padding: 7px 12px;
  margin-bottom: 14px;
  letter-spacing: 0.02em;
}

.report-body {
  color: var(--text);
  font-size: 14.5px;
  line-height: 1.75;
}
.report-body h2 {
  font-size: 15px;
  font-weight: 600;
  margin: 22px 0 10px;
  color: var(--gold);
  letter-spacing: 0;
}
.report-body h3 { font-size: 14px; font-weight: 600; margin: 18px 0 8px; }
.report-body p { margin: 0 0 12px; color: var(--text-muted); }
.report-body strong { color: var(--text); font-weight: 600; }
.report-body ul, .report-body ol { padding-left: 22px; color: var(--text-muted); margin: 0 0 14px; }
.report-body li { margin-bottom: 6px; }
.report-body code {
  background: var(--bg-elev);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 13px;
}
/* 引用块 (报告里的 banner, 如背面机位提示) -> 金色提示框 */
.report-body blockquote {
  margin: 0 0 16px;
  padding: 11px 16px;
  background: rgba(212, 168, 87, 0.09);
  border-left: 3px solid var(--gold);
  border-radius: 6px;
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
}

.raw-json {
  margin-top: 28px;
  border-top: 1px solid var(--border);
  padding-top: 18px;
}
.raw-json summary {
  cursor: pointer;
  font-size: 13px;
  color: var(--text-muted);
}
.raw-json pre {
  margin: 14px 0 0;
  padding: 16px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 11.5px;
  max-height: 320px;
  overflow: auto;
  color: var(--text-muted);
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
}

/* ============== FAQ ============== */
.faq { display: flex; flex-direction: column; gap: 4px; }
.faq details {
  border-bottom: 1px solid var(--border);
}
.faq summary {
  cursor: pointer;
  padding: 22px 0;
  font-size: 16.5px;
  font-weight: 500;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  transition: color .15s ease;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '';
  width: 12px;
  height: 12px;
  border-right: 1.5px solid var(--text-muted);
  border-bottom: 1.5px solid var(--text-muted);
  transform: rotate(45deg);
  transition: transform .2s ease;
  flex-shrink: 0;
  margin-right: 6px;
}
.faq details[open] summary::after { transform: rotate(-135deg); }
.faq summary:hover { color: var(--gold); }
.faq p { margin: 0 0 22px; color: var(--text-muted); font-size: 15px; line-height: 1.7; padding-right: 30px; }

/* ============== FOOTER ============== */
.footer {
  border-top: 1px solid var(--border);
  padding: 50px 0 60px;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  flex-wrap: wrap;
}
.footer-brand { display: flex; flex-direction: column; gap: 10px; }
.footer-tag { margin: 0; color: var(--text-dim); font-size: 13px; }
.footer-meta { color: var(--text-dim); font-size: 13px; }

/* ============== TOAST ============== */
.toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-elev-2);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  padding: 14px 22px;
  font-size: 14px;
  box-shadow: var(--shadow-lg);
  z-index: 100;
  max-width: 90vw;
  animation: toast-in .25s ease-out;
}
.toast.error { border-color: var(--danger); color: var(--danger); }
.toast.success { border-color: var(--success); color: var(--success); }
.toast.warn { border-color: var(--gold); color: var(--gold); }
@keyframes toast-in {
  from { transform: translate(-50%, 12px); opacity: 0; }
  to   { transform: translate(-50%, 0);    opacity: 1; }
}

/* ============== RESPONSIVE ============== */
@media (max-width: 880px) {
  .nav-links { display: none; }
  .nav-inner { gap: 16px; }
  .steps, .feature-grid { grid-template-columns: 1fr; }
  .analyzer { grid-template-columns: 1fr; padding: 22px; }
  .hero { padding: 70px 0 80px; }
  .section { padding: 70px 0; }
  .section-head { margin-bottom: 48px; }
}

@media (max-width: 520px) {
  .nav-actions .btn { display: none; }
  .container { padding: 0 20px; }
  .hero-cta { flex-direction: column; align-items: stretch; }
  .hero-cta .btn { width: 100%; }
}

/* ============ 付费价值区 (PAYMENT_UX_REFERENCE 二) ============ */
.pay-value {
  margin-top: 14px;
  font-size: 0.82rem;
  line-height: 1.9;
}
.pay-point { color: var(--text-soft, #c9c4b8); }
.pay-point::first-letter { color: var(--gold); }
.pay-trust {
  margin-top: 8px;
  font-size: 0.74rem;
  color: var(--text-dim, #8a8578);
}
.pay-anchor {
  margin-top: 2px;
  font-size: 0.74rem;
  color: var(--text-dim, #8a8578);
  font-style: italic;
}
.pay-alt {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(212, 168, 87, 0.15);
  font-size: 0.74rem;
  color: var(--text-dim, #8a8578);
}

/* 视角/置信提示 (精度杠杆B 分级置信度): 告诉用户旋转指标为什么可信或不可信 */
.view-note { margin: 6px 0 14px; padding: 8px 12px; border-radius: 8px; font-size: 13px; line-height: 1.5;
  background: rgba(212,168,87,.10); border: 1px solid rgba(212,168,87,.35); color: var(--text, #e8e6e0); }
.view-note.high { background: rgba(91,196,106,.10); border-color: rgba(91,196,106,.35); }
.view-note.na { background: rgba(196,91,91,.10); border-color: rgba(196,91,91,.35); }


/* ============== 2026-09-27 质量补丁: 拍摄提示 / 键盘焦点 / 减少动态 ============== */
.drop-tip {
  margin: 10px 2px 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text-muted);
}
a:focus-visible, button:focus-visible, summary:focus-visible, select:focus-visible, .dropzone:focus-within {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}
.status-text { font-variant-numeric: tabular-nums; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* 报告流式预览: 生成中只显示正文, 视频/指标/关键帧等完成后再出现 */
.result-streaming .annotated-figure, .result-streaming .phase-frames, .result-streaming .trajectory-figure,
.result-streaming .metric-row, .result-streaming .raw-json, .result-streaming .result-meta, .result-streaming .view-note { display: none !important; }
.stream-caret {
  display: inline-block; width: 8px; height: 1em; margin-left: 3px; vertical-align: -2px;
  background: var(--gold); animation: caret-blink 1s steps(2, start) infinite;
}
@keyframes caret-blink { to { visibility: hidden; } }

/* ============== 2026-09-28 视觉复查修补 ============== */
/* figure 默认左右 40px 外边距把关键帧缩略图挤成 33px 宽 */
.phase-frame { margin: 0; }

/* 有结果时: 左栏吸顶 (够高的宽屏), 右栏专心展示结果 */
@media (min-width: 881px) and (min-height: 800px) {
  .analyzer.has-result .analyzer-left { position: sticky; top: 90px; align-self: start; }
}

/* 两段回放视频并排; 只剩一段时自动占满; 横屏视频单独一整行 */
.media-pair {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 22px;
}
.media-pair > figure { margin: 0; }
.media-pair > figure.wide { grid-column: 1 / -1; }
.media-pair .annotated-video, .media-pair .trajectory-video { max-height: 520px; }
.result-streaming .media-pair { display: none !important; }

/* 指标卡: 档位词比数字小一号, 窄卡不折成三行 */
.metric-tier { display: block; font-size: 17px; line-height: 1.3; }
.metric-lm-title, .metric-row-note {
  grid-column: 1 / -1;
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  margin-top: 6px;
}
.metric-row-note { margin-top: -2px; color: var(--text-dim); }

/* 报告分节线 */
.report-body hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 22px 0;
}

/* 手机端导航: 汉堡按钮 + 下拉 */
.nav-menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}
.nav-menu-btn:hover { border-color: var(--gold); }
@media (max-width: 880px) {
  .nav-menu-btn { display: inline-flex; }
  .nav.menu-open .nav-links {
    display: flex;
    position: absolute;
    top: 66px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    padding: 6px 24px 14px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55);
  }
  .nav.menu-open .nav-links a {
    padding: 13px 0;
    font-size: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  }
  .nav.menu-open .nav-links a:last-child { border-bottom: 0; }
}

/* 手机: 外框+内框+容器三层内边距把结果区挤到 231px → 去掉外框, 结果区拿到 ~310px, 指标卡两列 */
@media (max-width: 520px) {
  .container { padding: 0 16px; }
  .analyzer { padding: 0; background: transparent; border: 0; gap: 22px; }
  .analyzer-right { padding: 18px 16px; }
  .metric-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .metric { padding: 11px 12px; }
}

/* ============== 2026-10-01 本地教练推荐 ============== */
.coach-block {
  margin-top: 28px;
  padding: 20px 22px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--bg-elev);
}
.coach-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.coach-head h4 { margin: 0; font-size: 17px; color: var(--text); }
.coach-badge {
  font-size: 11px; letter-spacing: 0.04em; color: var(--gold-soft);
  border: 1px solid var(--gold); border-radius: 999px; padding: 2px 9px;
}
.coach-region p { margin: 0 0 12px; color: var(--text-muted); font-size: 14px; line-height: 1.6; }
.coach-region-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.coach-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.coach-card {
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--bg-elev-2); padding: 16px; display: flex; flex-direction: column; gap: 6px;
}
.coach-card-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.coach-name { font-size: 16px; font-weight: 700; color: var(--text); }
.coach-title { font-size: 12px; color: var(--gold-soft); }
.coach-meta { font-size: 12.5px; color: var(--text-muted); }
.coach-fit { font-size: 13px; color: var(--gold-soft); }
.coach-specs { font-size: 12.5px; color: var(--text-muted); }
.coach-bio { margin: 4px 0 0; font-size: 13px; line-height: 1.6; color: var(--text-muted); }
.coach-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.coach-btn {
  font: inherit; font-size: 13px; cursor: pointer; text-decoration: none;
  color: var(--text); background: transparent; border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm); padding: 6px 12px;
}
.coach-btn:hover { border-color: var(--gold); color: var(--gold-soft); }
.coach-btn-primary { background: var(--gold); border-color: var(--gold); color: #111; }
.coach-btn-primary:hover { background: var(--gold-soft); color: #111; }
.coach-disclosure { margin: 14px 0 0; font-size: 12px; line-height: 1.6; color: var(--text-dim); }
.coach-region-reset {
  margin-top: 6px; background: none; border: 0; padding: 0; cursor: pointer;
  font: inherit; font-size: 12px; color: var(--text-dim); text-decoration: underline;
}

/* ============== 2026-10-01 练习记录 + 进步曲线 ============== */
.hist-sub { max-width: 640px; margin: 14px auto 0; color: var(--text-muted); font-size: 14.5px; line-height: 1.7; }
.hist-card {
  max-width: 860px; margin: 0 auto; padding: 22px;
  border: 1px solid var(--border-strong); border-radius: var(--radius-lg); background: var(--bg-elev);
}
.hist-controls { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.hist-controls label { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-muted); }
.hist-controls select {
  font: inherit; font-size: 13px; color: var(--text); background: var(--bg-elev-2);
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm); padding: 6px 10px;
}
.hist-chart { width: 100%; }
.hist-svg { width: 100%; height: auto; display: block; }
.hist-grid { stroke: var(--border); stroke-width: 1; }
.hist-ref { stroke: var(--gold); stroke-width: 1.2; stroke-dasharray: 5 5; opacity: 0.7; }
.hist-line { fill: none; stroke: var(--gold-soft); stroke-width: 2.5; stroke-linejoin: round; }
.hist-dot { fill: var(--gold); stroke: var(--bg); stroke-width: 2; }
.hist-axis { fill: var(--text-dim); font-size: 11px; }
.hist-hint { margin: 8px 0 14px; font-size: 13px; color: var(--text-muted); }
.hist-list { display: flex; flex-direction: column; gap: 8px; max-height: 320px; overflow-y: auto; }
.hist-row {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px;
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-elev-2);
}
.hist-when { min-width: 120px; font-size: 13px; color: var(--text); display: flex; flex-direction: column; }
.hist-file { font-size: 11px; color: var(--text-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 160px; }
.hist-chips { display: flex; flex-wrap: wrap; gap: 6px; flex: 1; }
.hist-chip { font-size: 12px; color: var(--text-muted); border: 1px solid var(--border-strong); border-radius: 999px; padding: 2px 9px; }
.hist-del {
  background: none; border: 0; color: var(--text-dim); font-size: 18px; cursor: pointer; padding: 0 4px; line-height: 1;
}
.hist-del:hover { color: var(--danger); }
.hist-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.hist-import { cursor: pointer; }
@media (max-width: 520px) {
  .coach-block, .hist-card { padding: 16px; }
  .hist-row { flex-wrap: wrap; }
  .hist-when { min-width: 0; }
}

/* ============== 2026-10-01 用户授权贡献 + "哪里不对?" ============== */
.contrib-card {
  margin: 18px 0 6px;
  padding: 18px 20px;
  border: 1px solid var(--gold);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--gold-glow), transparent 70%), var(--bg-elev);
}
.contrib-card h4 { margin: 0 0 6px; font-size: 16px; color: var(--text); }
.contrib-desc { margin: 0 0 12px; font-size: 13.5px; line-height: 1.6; color: var(--text-muted); }
.contrib-btns { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.contrib-btns .btn { min-height: 40px; }
.contrib-no {   /* 拒绝和同意一样好点: 点按区域同高, 只是样式轻一些 */
  background: none; border: 0; min-height: 40px; padding: 6px 12px; cursor: pointer; font: inherit; font-size: 13.5px;
  color: var(--text-muted); text-decoration: underline;
}
.contrib-fine { margin: 10px 0 0; font-size: 12px; line-height: 1.6; color: var(--text-dim); }
.contrib-more { margin-top: 8px; font-size: 12.5px; color: var(--text-muted); }
.contrib-more summary { cursor: pointer; color: var(--gold-soft); }
.contrib-more p { margin: 8px 0 0; line-height: 1.7; }
.contrib-done { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 13.5px; color: var(--text); }
.contrib-withdraw, .hist-withdraw {
  background: none; border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  padding: 4px 10px; cursor: pointer; font: inherit; font-size: 12px; color: var(--text-muted);
}
.contrib-withdraw:hover, .hist-withdraw:hover { border-color: var(--danger); color: var(--danger); }
.label-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 16px 0 4px; }
.label-ask { font-size: 13px; color: var(--text-muted); margin-right: 4px; }
.label-btn {
  font: inherit; font-size: 12.5px; cursor: pointer; color: var(--text-muted); background: transparent;
  border: 1px solid var(--border-strong); border-radius: 999px; padding: 4px 12px;
}
.label-btn:hover { border-color: var(--gold); color: var(--gold-soft); }
.label-btn:disabled { opacity: 0.45; cursor: default; border-color: var(--border); }
@media (max-width: 520px) {
  .contrib-card { padding: 14px; }
  .contrib-btns .btn, .contrib-no { flex: 1 1 100%; }
}

/* 2026-10-02 隐私: 删除这次分析 + 页脚隐私政策链接 */
.delete-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 14px 0 4px; }
.delete-btn {
  font: inherit; font-size: 12.5px; cursor: pointer; color: var(--text-muted); background: transparent;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm); padding: 6px 12px; min-height: 32px;
}
.delete-btn:hover { border-color: var(--danger); color: var(--danger); }
.delete-btn:disabled { opacity: 0.5; cursor: default; }
.delete-note { font-size: 12px; color: var(--text-dim); line-height: 1.5; }
.footer-link { color: var(--text-muted); text-decoration: none; }
.footer-link:hover { color: var(--gold-soft); }
