/* ============ Alkutrain 设计系统 v4 ============ */
:root {
  /* 背景 */
  --bg: #0a0e14;
  --bg-alt: #111820;
  --card: #151c26;
  --card-hover: #1a2230;

  /* 边框与文字 */
  --border: #222d3b;
  --border-light: #1e2836;
  --text: #e4e8ef;
  --text-dim: #7d8fa3;
  --text-muted: #4a5a6e;

  /* 品牌色：黑白灰主调 */
  --accent: #e4e8ef;
  --accent-hover: #fff;
  --accent-glow: rgba(255, 255, 255, .08);
  --accent-soft: rgba(255, 255, 255, .06);
  --accent-2: #9ca3af;
  --accent-2-soft: rgba(156, 163, 175, .1);
  --accent-2-glow: rgba(156, 163, 175, .15);

  /* 肌肉群标签色（灰调） */
  --muscle-chest: #b0b8c4;
  --muscle-back: #9ca3af;
  --muscle-legs: #a1a8b4;
  --muscle-shoulders: #b5bcc8;
  --muscle-arms: #8d95a1;
  --muscle-core: #7d8fa3;
  --muscle-cond: #6b7785;

  /* 形状 */
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 18px;
  --shadow: 0 10px 40px rgba(0, 0, 0, .4);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, .5);

  /* 布局 */
  --maxw: 1100px;
  --nav-h: 66px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); }

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--bg); color: var(--text); line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; display: block; }
a { color: inherit; }

.container { width: min(var(--maxw), 100% - 2rem); margin-inline: auto; }
.container-narrow { width: min(720px, 100% - 2rem); }

/* ============ 导航栏 ============ */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(10, 14, 20, .82);
  backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid var(--border-light);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: var(--nav-h);
}
.logo {
  font-weight: 800; font-size: 1.4rem; text-decoration: none;
  letter-spacing: -.3px; background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.logo:hover { opacity: .9; }
.nav-links { display: flex; gap: .25rem; }
.nav-links a {
  color: var(--text-dim); text-decoration: none; font-size: .9rem; font-weight: 500;
  padding: .45rem .85rem; border-radius: var(--radius-sm);
  transition: color .2s, background .2s;
  position: relative;
}
.nav-links a:hover, .nav-links a:focus-visible { color: var(--text); background: rgba(255,255,255,.04); }
.nav-links a::after {
  content: ""; position: absolute; bottom: 2px; left: 50%; transform: translateX(-50%);
  width: 0; height: 2px; background: #fff;
  border-radius: 1px; transition: width .2s;
}
.nav-links a:hover::after { width: 60%; }

.nav-toggle {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: 0; cursor: pointer; padding: 8px;
}
.nav-toggle span { width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: transform .25s, opacity .25s; }
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============ Hero ============ */
.hero {
  padding: 5rem 0 5.5rem;
  background:
    radial-gradient(800px 500px at 85% -5%, rgba(99, 102, 241, .15), transparent 60%),
    radial-gradient(600px 400px at 5% 105%, rgba(34, 211, 238, .08), transparent 60%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-alt) 100%);
  position: relative; overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,.03) 1px, transparent 0);
  background-size: 32px 32px; pointer-events: none;
}
.hero-inner {
  display: grid; grid-template-columns: 1.15fr .85fr; gap: 3.5rem;
  align-items: center; position: relative; z-index: 1;
}
.badge {
  display: inline-block; font-size: .78rem; font-weight: 600;
  color: var(--text-dim); letter-spacing: .03em;
  border: 1px solid var(--border); border-radius: 999px;
  padding: .28rem .95rem; margin-bottom: 1.2rem;
  background: rgba(255,255,255,.03);
}
.hero h1 {
  font-size: clamp(2.1rem, 4.8vw, 3.4rem); line-height: 1.15;
  font-weight: 800; letter-spacing: -.02em;
}
.hero h1 em { font-style: normal; background: linear-gradient(135deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.lead { margin-top: 1.2rem; color: var(--text-dim); font-size: 1.05rem; max-width: 36em; line-height: 1.7; }
.hero-cta { display: flex; gap: 1rem; margin-top: 2.2rem; flex-wrap: wrap; }

/* Hero 右侧 KPI 卡片 */
.hero-card {
  background: linear-gradient(145deg, rgba(21, 28, 38, .92), rgba(21, 28, 38, .72));
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 2rem 1.8rem; box-shadow: var(--shadow-lg);
  backdrop-filter: blur(10px);
}
.hc-kpi-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem;
}
.hc-kpi {
  text-align: center; padding: .85rem .4rem;
  background: rgba(255,255,255,.025); border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  transition: transform .2s, border-color .2s;
}
.hc-kpi:hover { transform: translateY(-2px); border-color: rgba(255,255,255,.15); }
.hc-kpi-num {
  display: block; font-size: 1.75rem; font-weight: 800;
  color: #fff;
}
.hc-kpi-label { font-size: .76rem; color: var(--text-dim); margin-top: .2rem; }
.hc-note {
  text-align: center; margin-top: 1.2rem; font-size: .78rem;
  color: var(--text-muted); letter-spacing: .02em;
}

/* ============ 按钮 ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  padding: .8rem 1.7rem; border-radius: 10px;
  font-size: .96rem; font-weight: 600; text-decoration: none;
  cursor: pointer; border: 1px solid transparent;
  transition: transform .15s, background .2s, border-color .2s, box-shadow .2s;
}
.btn:active { transform: scale(.97); }
.btn-primary {
  background: #fff; color: var(--bg);
  box-shadow: 0 4px 20px rgba(255, 255, 255, .1);
}
.btn-primary:hover, .btn-primary:focus-visible {
  background: #e4e8ef; box-shadow: 0 6px 28px rgba(255, 255, 255, .15);
}
.btn-ghost {
  border-color: var(--border); color: var(--text); background: transparent;
}
.btn-ghost:hover, .btn-ghost:focus-visible { border-color: var(--text-dim); background: rgba(255,255,255,.03); }
.btn-lg { padding: 1rem 2.2rem; font-size: 1.05rem; width: 100%; }

/* ============ 通用 Section ============ */
.section { padding: 4.5rem 0; }
.section-alt {
  background: var(--bg-alt);
  border-block: 1px solid var(--border-light);
}
.section-head { text-align: center; margin-bottom: 2.5rem; }
.section-head h2 {
  font-size: clamp(1.6rem, 3vw, 2.3rem); font-weight: 800;
  letter-spacing: -.01em;
}
.section-head p { color: var(--text-dim); margin-top: .5rem; max-width: 520px; margin-inline: auto; }

/* ============ 动作库 Section ============ */
.lib-filters { display: grid; gap: 1.2rem; margin-bottom: 2rem; }
.filter-group { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.filter-label {
  font-size: .75rem; font-weight: 700; color: var(--text-dim);
  white-space: nowrap; text-transform: uppercase; letter-spacing: .06em;
}
.filter-btns { display: flex; gap: .4rem; flex-wrap: wrap; }
.filter-btn {
  padding: .45rem 1rem; border: 1px solid var(--border); border-radius: 999px;
  background: var(--card); color: var(--text-dim); font-size: .85rem; font-weight: 500;
  cursor: pointer; transition: all .2s; white-space: nowrap;
}
.filter-btn:hover { border-color: var(--text-muted); color: var(--text); }
.filter-btn.active {
  background: #fff; border-color: #fff; color: var(--bg);
  box-shadow: 0 2px 12px rgba(255,255,255,.08);
}

.lib-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
}
.lib-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.2rem 1.4rem;
  cursor: pointer; transition: transform .2s, border-color .2s, box-shadow .2s;
  display: grid; gap: .5rem;
}
.lib-card:hover {
  transform: translateY(-3px); border-color: var(--accent);
  box-shadow: 0 8px 30px rgba(0,0,0,.3);
}
.lib-card-header { display: flex; align-items: center; justify-content: space-between; gap: .8rem; }
.lib-card-name {
  font-size: 1.05rem; font-weight: 700; color: var(--text);
}
.lib-card-tags { display: flex; gap: .4rem; flex-wrap: wrap; }
.lib-card-target {
  font-size: .84rem; color: var(--text-dim); line-height: 1.5;
}
.lib-card-meta {
  display: flex; gap: .6rem; font-size: .77rem; color: var(--text-muted);
  margin-top: .2rem;
}
.lib-empty { text-align: center; color: var(--text-dim); padding: 3rem 1rem; font-size: .95rem; }

/* 肌肉群/器材标签 */
.tag-muscle {
  font-size: .72rem; font-weight: 600; padding: .15rem .6rem;
  border-radius: 999px; white-space: nowrap;
}
.tag-muscle.chest { background: rgba(176, 184, 196, .12); color: var(--muscle-chest); }
.tag-muscle.back { background: rgba(156, 163, 175, .12); color: var(--muscle-back); }
.tag-muscle.legs { background: rgba(161, 168, 180, .12); color: var(--muscle-legs); }
.tag-muscle.shoulders { background: rgba(181, 188, 200, .12); color: var(--muscle-shoulders); }
.tag-muscle.arms { background: rgba(141, 149, 161, .12); color: var(--muscle-arms); }
.tag-muscle.core { background: rgba(125, 143, 163, .12); color: var(--muscle-core); }
.tag-muscle.cond { background: rgba(107, 119, 133, .12); color: var(--muscle-cond); }

.tag-equip {
  font-size: .72rem; font-weight: 500; padding: .15rem .6rem;
  border-radius: 999px; background: var(--bg); color: var(--text-muted);
  border: 1px solid var(--border-light); white-space: nowrap;
}

/* ============ 表单 ============ */
.plan-form { display: grid; gap: 1.5rem; }
.form-block {
  border: 1px solid var(--border); border-left: 3px solid var(--accent);
  border-radius: var(--radius); background: var(--card);
  padding: 1.6rem 1.8rem; display: grid; gap: 1.2rem;
}
.form-block legend {
  font-weight: 700; padding-inline: .6rem; font-size: .95rem;
  color: var(--accent); letter-spacing: .02em;
}
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.field { display: grid; gap: .4rem; font-size: .88rem; color: var(--text-dim); }
.field > span { font-weight: 500; }
.field input, .field select {
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: .72rem .9rem; font-size: .94rem; color: var(--text);
  transition: border-color .2s, box-shadow .2s;
}
.field input:focus, .field select:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.field input[aria-invalid="true"] { border-color: #ef4444; }
.form-actions { text-align: center; }
.form-error { color: #f87171; text-align: center; font-size: .9rem; }

/* ============ 结果区 ============ */
.plan-result { margin-top: 2.5rem; }
.result-tabs {
  display: flex; gap: .4rem; background: var(--card);
  border: 1px solid var(--border); border-radius: var(--radius) var(--radius) 0 0;
  padding: .5rem; overflow-x: auto;
}
.tab {
  flex: 1; min-width: 90px; padding: .62rem 1rem; border: 0; border-radius: 8px;
  background: transparent; color: var(--text-dim); font-size: .92rem; font-weight: 600;
  cursor: pointer; transition: background .2s, color .2s; white-space: nowrap;
}
.tab:hover { color: var(--text); background: rgba(255,255,255,.03); }
.tab.active { background: #fff; color: var(--bg); box-shadow: 0 2px 10px rgba(255,255,255,.08); }
.tab-panel {
  border: 1px solid var(--border); border-top: 0;
  border-radius: 0 0 var(--radius) var(--radius);
  background: var(--card); padding: 1.6rem;
}
.disclaimer { margin-top: 1.2rem; font-size: .8rem; color: var(--text-muted); }

/* KPI 摘要卡片 */
.plan-summary {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 1.5rem;
}
.kpi {
  background: var(--bg-alt); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 1rem; text-align: center;
}
.kpi b { display: block; font-size: 1.4rem; color: #fff; }
.kpi span { font-size: .78rem; color: var(--text-dim); }

/* 日程卡片（升级版） */
.day-card {
  background: var(--bg-alt); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.2rem 1.4rem; margin-bottom: 1rem;
}
.day-card h4 { font-size: 1rem; margin-bottom: .6rem; display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.day-card h4 .tag {
  font-size: .7rem; font-weight: 600; vertical-align: middle;
  background: rgba(255,255,255,.08); color: #fff;
  border-radius: 999px; padding: .12rem .6rem;
}

/* 动作行（升级版） */
.ex-row {
  display: flex; align-items: center; gap: .7rem;
  padding: .65rem .8rem; margin: .3rem 0;
  background: var(--card); border: 1px solid var(--border-light);
  border-radius: var(--radius-sm); transition: border-color .2s;
}
.ex-row:hover { border-color: rgba(255,255,255,.15); }
.ex-dot {
  width: 8px; height: 8px; border-radius: 50%; background: #fff; flex-shrink: 0;
}
.ex-name {
  font-weight: 600; font-size: .92rem; color: var(--text);
  cursor: pointer; transition: color .2s; flex: 1;
}
.ex-name:hover { color: var(--accent); }
.ex-row-tags { display: flex; gap: .35rem; flex-shrink: 0; }
.ex-learn {
  font-size: .74rem; font-weight: 600; color: var(--accent);
  cursor: pointer; white-space: nowrap; padding: .22rem .65rem;
  border: 1px solid var(--accent); border-radius: 999px;
  transition: all .2s; flex-shrink: 0;
}
.ex-learn:hover { background: #fff; color: var(--bg); }
.ex-sep { height: 1px; background: var(--border-light); margin: .5rem 0; }
.day-note { color: var(--text-dim); font-size: .86rem; margin-top: .5rem; font-style: italic; }
.day-card.rest { border-style: dashed; opacity: .7; }

.diet-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.diet-table th, .diet-table td { text-align: left; padding: .65rem .55rem; border-bottom: 1px solid var(--border-light); }
.diet-table th { color: var(--text-dim); font-weight: 600; font-size: .85rem; }
.diet-table td b { color: var(--accent-2); }

.reco-list { list-style: none; display: grid; gap: .85rem; }
.reco-list li {
  background: var(--bg-alt); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: .9rem 1.1rem .9rem 2.6rem;
  position: relative; font-size: .93rem;
}
.reco-list li::before { content: "✓"; position: absolute; left: .9rem; top: .85rem; color: #fff; font-weight: 800; }

/* ============ 功能卡片 ============ */
.features-grid { gap: 1.4rem; }
.feature-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.8rem; transition: transform .2s, border-color .2s, box-shadow .2s;
}
.feature-card:hover { transform: translateY(-4px); border-color: rgba(255,255,255,.15); box-shadow: var(--shadow); }
.fc-icon { font-size: 2.2rem; margin-bottom: .8rem; }
.feature-card h3 { margin-bottom: .5rem; font-size: 1.08rem; }
.feature-card p { color: var(--text-dim); font-size: .91rem; line-height: 1.65; }

/* ============ FAQ ============ */
.faq-item {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.1rem 1.4rem; margin-bottom: .85rem;
}
.faq-item summary { cursor: pointer; font-weight: 600; }
.faq-item p { margin-top: .7rem; color: var(--text-dim); font-size: .92rem; line-height: 1.65; }

/* ============ 页脚 ============ */
.footer { border-top: 1px solid var(--border-light); padding: 1.8rem 0; background: var(--bg-alt); }
.footer-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .8rem; }
.footer p { color: var(--text-muted); font-size: .83rem; }
.footer a { color: var(--text-dim); text-decoration: none; margin-left: 1.2rem; font-size: .83rem; }
.footer a:hover { color: var(--text); }

/* ============ 响应式断点 ============ */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-card { order: -1; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .plan-summary { grid-template-columns: repeat(2, 1fr); }
  .lib-grid { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .hero { padding: 3rem 0 3.5rem; }
  .grid-3 { grid-template-columns: 1fr; }
  .section { padding: 3rem 0; }
  .hc-kpi-grid { grid-template-columns: 1fr 1fr; }

  .nav-toggle { display: flex; }
  .nav-links {
    position: absolute; top: var(--nav-h); left: 0; right: 0;
    flex-direction: column; gap: 0;
    background: var(--bg-alt); border-bottom: 1px solid var(--border);
    padding: 0; max-height: 0; overflow: hidden;
    transition: max-height .3s ease, padding .3s ease;
  }
  .nav-links.open { max-height: 260px; padding: .5rem 0; }
  .nav-links a { padding: .85rem 1.5rem; display: block; }
  .nav-links a:hover { background: rgba(255, 255, 255, .04); }

  .plan-summary { grid-template-columns: repeat(2, 1fr); }
  .tab-panel { padding: 1.1rem; }
  .btn-lg { width: 100%; }
  .filter-group { flex-direction: column; align-items: flex-start; gap: .5rem; }
  .lib-card-header { flex-direction: column; align-items: flex-start; }
}

/* 减少动效偏好 */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ============ 安全筛查复选框 ============ */
.check-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: .7rem; }
.check {
  display: flex; align-items: center; gap: .55rem; cursor: pointer;
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: .6rem .85rem; font-size: .88rem; color: var(--text); user-select: none;
  transition: border-color .2s, background .2s;
}
.check:hover { border-color: var(--text-muted); }
.check:has(input:checked) { border-color: #fff; background: rgba(255, 255, 255, .06); }
.check input { accent-color: #fff; width: 16px; height: 16px; }
.check-note { font-size: .8rem; color: var(--text-muted); }

/* ============ 风险闸门 ============ */
.risk-gate {
  margin-top: 1.5rem; border-radius: var(--radius); padding: 1.2rem 1.4rem;
  border: 1px solid; font-size: .93rem; display: grid; gap: .4rem;
}
.risk-gate.rg-high { background: rgba(239, 68, 68, .08); border-color: rgba(239, 68, 68, .45); }
.risk-gate.rg-mid { background: var(--accent-2-soft); border-color: rgba(34, 211, 238, .4); }
.risk-gate h3 { font-size: 1rem; margin-bottom: .3rem; }
.risk-gate.rg-high h3 { color: #f87171; }
.risk-gate.rg-mid h3 { color: var(--accent-2); }
.risk-gate p { color: var(--text-dim); font-size: .87rem; }
.risk-gate p b { color: var(--text); }

/* ============ 安全边界框 ============ */
.safety-box {
  background: rgba(255, 255, 255, .03); border: 1px solid rgba(255, 255, 255, .1);
  border-radius: var(--radius); padding: 1.1rem 1.3rem; margin-bottom: 1.4rem; font-size: .9rem;
}
.safety-box h4 { color: #fff; margin-bottom: .4rem; font-size: .95rem; }
.safety-box ul { list-style: none; display: grid; gap: .25rem; color: var(--text-dim); }
.safety-box li::before { content: "▸ "; color: #fff; }

/* ============ 今日训练 ============ */
.today-card { max-width: 720px; margin-inline: auto; }
.today-empty { color: var(--text-dim); text-align: center; padding: 2rem 1rem; }
.today-head {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .8rem;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius) var(--radius) 0 0;
  padding: 1rem 1.3rem;
}
.today-head h3 { font-size: 1.04rem; }
.today-head .tag {
  font-size: .7rem; font-weight: 600; margin-left: .5rem; vertical-align: middle;
  background: rgba(255,255,255,.08); color: #fff; border-radius: 999px; padding: .12rem .6rem;
}
.today-body {
  background: var(--card); border: 1px solid var(--border); border-top: 0;
  border-radius: 0 0 var(--radius) var(--radius); padding: 1.2rem 1.3rem; display: grid; gap: .85rem;
}
.today-rest { color: var(--text-dim); font-size: .93rem; }
.ex-item {
  display: flex; align-items: center; gap: .8rem; padding: .7rem .9rem;
  background: var(--bg-alt); border: 1px solid var(--border-light); border-radius: var(--radius-sm);
  cursor: pointer; transition: opacity .2s, border-color .2s; user-select: none;
}
.ex-item input { accent-color: var(--accent); width: 18px; height: 18px; flex-shrink: 0; }
.ex-item span { font-size: .91rem; }
.ex-item.done { opacity: .42; }
.ex-item.done span { text-decoration: line-through; }
.today-done { text-align: center; color: var(--accent-2); font-weight: 700; padding: .5rem; }

/* 组间计时器 */
.timer {
  background: var(--bg-alt); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.1rem 1.3rem; display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
}
.timer-presets { display: flex; gap: .4rem; flex-wrap: wrap; }
.timer-presets button, .timer button {
  background: var(--bg); border: 1px solid var(--border); color: var(--text-dim);
  border-radius: var(--radius-sm); padding: .45rem .8rem; font-size: .85rem; cursor: pointer;
  transition: border-color .2s, color .2s;
}
.timer-presets button.active { border-color: #fff; color: #fff; background: rgba(255, 255, 255, .08); }
.timer-presets button:hover, .timer button:hover { color: var(--text); border-color: var(--text-muted); }
.timer-display {
  font-size: 1.9rem; font-weight: 800; font-variant-numeric: tabular-nums;
  min-width: 90px; text-align: center;
}
.timer-display.urgent { color: #f87171; }
.timer button.btn-start { background: #fff; color: var(--bg); border-color: #fff; font-weight: 600; }

/* ============ 体重进度 ============ */
.weight-layout { display: grid; grid-template-columns: 360px 1fr; gap: 1.4rem; align-items: start; }
.weight-form-card, .weight-chart-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.4rem;
}
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; }
.w-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: .7rem; margin-top: 1.1rem; }
.w-stats .kpi b { font-size: 1.12rem; }
.w-advice {
  margin-top: 1rem; font-size: .87rem; color: var(--text-dim);
  background: var(--bg-alt); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: .8rem 1rem;
}
.w-advice b { color: #fff; }
.w-chart-empty { color: var(--text-dim); text-align: center; padding: 4rem 1rem; font-size: .9rem; }
.w-chart-svg { width: 100%; height: auto; }
.w-chart-legend { display: flex; gap: 1.2rem; margin-top: .6rem; font-size: .77rem; color: var(--text-dim); flex-wrap: wrap; }
.w-chart-legend i { display: inline-block; width: 18px; height: 3px; border-radius: 2px; vertical-align: middle; margin-right: .35rem; }

/* ============ 导出按钮行 ============ */
.export-row { text-align: center; margin-top: 1.2rem; }

@media (max-width: 900px) {
  .weight-layout { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .w-stats { grid-template-columns: repeat(3, 1fr); }
  .grid-2 { grid-template-columns: 1fr 1fr; }
}

/* ============ 教学卡弹窗（升级版双栏） ============ */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0, 0, 0, .7); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 1rem; animation: fadeIn .2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); width: min(900px, 95vw);
  max-height: 85vh; overflow-y: auto;
  box-shadow: var(--shadow-lg);
  display: grid; grid-template-rows: auto 1fr;
  animation: slideUp .25s ease;
}
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.modal-close {
  position: absolute; top: 1rem; right: 1rem; z-index: 10;
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid var(--border); background: var(--bg);
  color: var(--text-dim); font-size: 1.3rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all .2s;
}
.modal-close:hover { border-color: #fff; color: #fff; }

/* 教学卡双栏布局 */
.cm-layout {
  display: grid; grid-template-columns: 1.2fr .8fr; gap: 0;
  min-height: 400px;
}
.cm-left { padding: 2rem 1.8rem; border-right: 1px solid var(--border-light); }
.cm-right { padding: 2rem 1.5rem; background: var(--bg-alt); border-radius: 0 0 var(--radius-lg) 0; }

.cm-title {
  font-size: 1.35rem; font-weight: 800; margin-bottom: .3rem;
  display: flex; align-items: center; gap: .6rem;
}
.cm-back {
  font-size: .82rem; color: var(--text-dim); cursor: pointer;
  text-decoration: none; margin-right: auto; padding: .3rem .5rem;
  border-radius: var(--radius-sm); transition: background .2s;
}
.cm-back:hover { background: rgba(255,255,255,.05); }

/* 视频占位区 */
.cm-media {
  background: var(--bg); border: 1px solid var(--border-light);
  border-radius: var(--radius); padding: 2.5rem 1.5rem;
  text-align: center; margin: 1.2rem 0;
  min-height: 120px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: .6rem;
}
.cm-media-icon { font-size: 2.5rem; opacity: .4; }
.cm-video-hint { font-size: .82rem; color: var(--text-dim); }
.cm-search-kw {
  font-size: .8rem; color: var(--accent); background: var(--accent-soft);
  padding: .3rem .7rem; border-radius: 999px; margin-top: .3rem;
}

/* 步骤列表 */
.cm-section { margin-top: 1.4rem; }
.cm-section-title {
  font-size: .9rem; font-weight: 700; color: var(--accent-2);
  margin-bottom: .6rem; display: flex; align-items: center; gap: .4rem;
}
.cm-steps { list-style: none; display: grid; gap: .5rem; counter-reset: step; }
.cm-steps li {
  counter-increment: step; padding-left: 2rem; position: relative;
  font-size: .91rem; color: var(--text-dim); line-height: 1.55;
}
.cm-steps li::before {
  content: counter(step); position: absolute; left: 0; top: 0;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--accent); color: #fff; font-size: .72rem;
  font-weight: 700; display: flex; align-items: center; justify-content: center;
}

/* 专家建议 / 常见错误 */
.cm-tips, .cm-errors { list-style: none; display: grid; gap: .4rem; }
.cm-tips li {
  padding: .5rem .5rem .5rem 1.6rem; position: relative;
  font-size: .88rem; color: var(--text-dim); background: var(--bg);
  border-radius: var(--radius-sm);
}
.cm-tips li::before { content: "▸"; position: absolute; left: .5rem; top: .55rem; color: #fff; }
.cm-errors li {
  padding: .5rem .5rem .5rem 1.6rem; position: relative;
  font-size: .88rem; color: var(--text-dim); background: var(--bg);
  border-radius: var(--radius-sm);
}
.cm-errors li::before { content: "✗"; position: absolute; left: .45rem; top: .5rem; color: #f87171; font-weight: 700; }

/* 教练提示 */
.cm-coach-tip {
  margin-top: 1rem; padding: .8rem 1rem;
  background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .1);
  border-radius: var(--radius-sm); font-size: .88rem; color: var(--text-dim);
}
.cm-coach-tip strong { color: #fff; }

/* 呼吸 / 降阶 / 停止信号 */
.cm-breathe, .cm-easier, .cm-stop {
  margin-top: .8rem; font-size: .87rem; color: var(--text-dim);
  padding: .6rem .9rem; background: var(--bg); border-radius: var(--radius-sm);
  line-height: 1.6;
}
.cm-stop { border-color: rgba(239, 68, 68, .35); color: #fca5a5; }

/* 右侧栏模块 */
.cm-module { margin-bottom: 1.4rem; }
.cm-module-title {
  font-size: .82rem; font-weight: 700; color: var(--text-dim);
  text-transform: uppercase; letter-spacing: .04em; margin-bottom: .6rem;
}

/* 肌肉激活条 */
.muscle-bar { margin-bottom: .7rem; }
.muscle-bar-header {
  display: flex; justify-content: space-between; font-size: .82rem; margin-bottom: .25rem;
}
.muscle-bar-name { color: var(--text); font-weight: 500; }
.muscle-bar-pct { color: var(--text-dim); }
.muscle-bar-track {
  height: 6px; background: var(--border); border-radius: 3px; overflow: hidden;
}
.muscle-bar-fill {
  height: 100%; border-radius: 3px; background: linear-gradient(90deg, #9ca3af, #e4e8ef);
  transition: width .4s ease;
}

/* 难度雷达图 */
.cm-radar { display: flex; justify-content: center; padding: .5rem 0; }
.cm-radar svg { max-width: 200px; }

/* 难度条形（移动端降级） */
.diff-bars { display: grid; gap: .4rem; }
.diff-bar { display: flex; align-items: center; gap: .5rem; font-size: .78rem; }
.diff-bar-label { width: 42px; color: var(--text-dim); flex-shrink: 0; }
.diff-bar-track { flex: 1; height: 5px; background: var(--border); border-radius: 3px; overflow: hidden; }
.diff-bar-fill { height: 100%; background: #9ca3af; border-radius: 3px; }

/* 标签组 */
.cm-tags { display: flex; gap: .4rem; flex-wrap: wrap; }

/* 组数指南 */
.set-guide { display: grid; gap: .35rem; }
.set-row { display: flex; align-items: center; gap: .6rem; font-size: .84rem; }
.set-level { width: 38px; font-weight: 700; color: #fff; flex-shrink: 0; }
.set-detail { color: var(--text-dim); }

/* 变化动作 */
.variations { display: grid; gap: .4rem; }
.var-btn {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .4rem .8rem; border: 1px solid var(--border); border-radius: 999px;
  background: var(--bg); color: var(--text-dim); font-size: .8rem;
  cursor: pointer; transition: all .2s;
}
.var-btn:hover { border-color: #fff; color: #fff; }

/* FAQ 折叠 */
.cm-faq { margin-top: 1rem; }
.cm-faq summary {
  font-size: .88rem; font-weight: 600; cursor: pointer;
  padding: .5rem 0; border-top: 1px solid var(--border-light);
  color: var(--text-dim);
}
.cm-faq p { font-size: .86rem; color: var(--text-dim); padding-bottom: .5rem; line-height: 1.6; }

/* ============ PDF 导出（打印视图） ============ */
@media print {
  body { background: #fff; color: #111; }
  .nav, .hero, #generator .plan-form, #today, #weight, #features, #faq,
  .footer, .result-tabs, .export-row, .disclaimer, #riskGate,
  .nav-toggle, #exercise-library, .modal-backdrop { display: none !important; }
  .plan-result { display: block !important; margin-top: 0; }
  .plan-result[hidden] { display: block !important; }
  .tab-panel { display: block !important; border: none; background: #fff; padding: 0; page-break-after: always; }
  .tab-panel[hidden] { display: block !important; }
  .kpi { border: 1px solid #ccc; background: #f6f6f6; }
  .kpi b { color: #4f46e5; }
  .day-card, .diet-table th, .diet-table td, .reco-list li, .safety-box { border-color: #ccc; }
  .diet-table td b { color: #0891b2; }
  .day-card, .reco-list li { background: #f6f6f6; }
  .day-card p, .reco-list li, .diet-table th { color: #333; }
  .safety-box { background: #ecfeff; }
  .safety-box h4 { color: #0891b2; }
  .ex-row, .ex-name { color: #333; }
  .tag-muscle, .tag-equip { color: #666; background: #f0f0f0; border-color: #ddd; }
  .modal { box-shadow: none; border: none; overflow: visible; }
  .cm-layout { display: block; }
  .cm-right { display: none; }
}

/* 弹窗移动端单栏 */
@media (max-width: 680px) {
  .modal { width: 96vw; max-height: 90vh; }
  .cm-layout { grid-template-columns: 1fr; }
  .cm-right { display: none; }
  .diff-bars { display: grid; }  /* 移动端用条形替代雷达图 */
  .cm-radar { display: none; }
}

/* ============ v4.1 微升级：滚动淡入 ============ */
.fade-in {
  opacity: 0; transform: translateY(24px);
  transition: opacity .5s ease, transform .5s ease;
}
.fade-in.visible {
  opacity: 1; transform: translateY(0);
}

/* ============ v4.1 微升级：返回顶部按钮 ============ */
.back-top {
  position: fixed; bottom: 2rem; right: 2rem; z-index: 90;
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--border); background: var(--card);
  color: var(--accent); font-size: 1.15rem;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow);
  opacity: 0; transform: translateY(12px); transition: all .3s ease;
  pointer-events: none;
}
.back-top.show {
  opacity: 1; transform: translateY(0); pointer-events: auto;
}
.back-top:hover {
  background: #fff; color: var(--bg);
  border-color: #fff;
  box-shadow: 0 4px 20px rgba(255,255,255,.1);
  transform: translateY(-2px);
}

/* ============ v4.1 微升级：Toast 提示 ============ */
.toast-container {
  position: fixed; bottom: 2rem; left: 50%; z-index: 150;
  display: flex; flex-direction: column; gap: .5rem;
  pointer-events: none; transform: translateX(-50%);
}
.toast {
  padding: .7rem 1.4rem; border-radius: 999px;
  background: var(--card); border: 1px solid var(--border);
  color: var(--text); font-size: .87rem; font-weight: 500;
  box-shadow: var(--shadow); white-space: nowrap;
  animation: toastIn .35s ease forwards, toastOut .35s ease 2.5s forwards;
  pointer-events: auto;
}
@keyframes toastIn {
  from { opacity: 0; transform: translateY(16px) scale(.95); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes toastOut {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to   { opacity: 0; transform: translateY(-8px) scale(.95); }
}