/* ===== Apple-inspired 变量 ===== */
:root {
  /* 纯黑底,Apple Dark 风 — 不带任何色彩 hint */
  --bg: #000000;
  --bg-deep: #000000;
  --bg-elev: #1c1c1e;           /* iOS systemGray6 dark */
  --card: #1c1c1e;
  --card-2: #2c2c2e;            /* iOS systemGray5 dark */
  --card-hover: #3a3a3c;

  /* 克制的橙色 — 像 Apple 系统橙 */
  --accent: #FF7A4D;             /* 主橙,明亮但不刺眼 */
  --accent-2: #FF955F;
  --accent-dim: #C24B2A;
  --accent-glow: rgba(255, 122, 77, 0.18);

  /* 辅助色(很克制使用)*/
  --color-fire: #FF7A4D;
  --color-flash: #FFD60A;       /* Apple yellow */
  --color-leaf: #32D74B;        /* Apple green */
  --color-sky: #64D2FF;          /* Apple blue */
  --color-violet: #BF5AF2;       /* Apple purple */
  --color-rose: #FF6482;         /* Apple pink */

  /* 文字 — Apple 标准灰阶 */
  --text: #FFFFFF;
  --text-dim: rgba(235, 235, 245, 0.6);
  --text-faint: rgba(235, 235, 245, 0.3);

  /* 分隔线极细 */
  --border: rgba(255, 255, 255, 0.10);
  --border-soft: rgba(255, 255, 255, 0.06);
  --separator: rgba(84, 84, 88, 0.65);

  --success: var(--color-leaf);
  --warning: var(--color-flash);
  --danger: #FF453A;

  --tab-bar-h: 68px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);

  /* 阴影低调 */
  --shadow-1: 0 1px 2px rgba(0,0,0,0.3);
  --shadow-2: 0 4px 16px rgba(0,0,0,0.4);
  --shadow-glow: 0 0 0 transparent;

  --ease: cubic-bezier(.32, .72, 0, 1);     /* iOS 系统缓动 */
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);  /* 弹簧式入场 */
  --ease-out: cubic-bezier(.22, 1, .36, 1);       /* 强 ease-out */

  /* 单色渐变(更克制)*/
  --grad-warm: linear-gradient(180deg, #FF955F 0%, #FF7A4D 100%);
  --grad-orange: linear-gradient(180deg, #FF955F, #FF7A4D);
  --grad-sunset: linear-gradient(180deg, #FF955F, #FF7A4D);
  --grad-fire: linear-gradient(180deg, #FF955F, #FF7A4D);

  /* 圆角 */
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 18px;
  --r-xl: 22px;
}

/* ===== 重置 ===== */
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
               "Segoe UI", "PingFang SC", "Hiragino Sans GB", sans-serif;
  font-size: 16px;
  line-height: 1.4;
  letter-spacing: -0.1px;
  min-height: 100vh;
  overscroll-behavior-y: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
}
/* Apple 风:纯黑,不加多彩光晕 */
#app, #onboarding-root, #workout-root, #chat-root, .splash {
  position: relative;
  z-index: 1;
}
button { font-family: inherit; font-size: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select, textarea { font-family: inherit; font-size: inherit; }
.hidden { display: none !important; }
svg { fill: none; stroke: currentColor; }

/* ===== 应用容器 ===== */
#app { min-height: 100vh; padding-bottom: calc(var(--tab-bar-h) + var(--safe-bottom)); }

/* ===== Splash — Apple iOS 启动风 ===== */
.splash {
  position: fixed; inset: 0;
  background: var(--bg);
  z-index: 999;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 18px;
  transition: opacity 0.35s var(--ease);
}
.splash-icon {
  width: 88px; height: 88px;
  border-radius: 22px;
  background: var(--accent);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
}
.splash-icon svg { width: 44px; height: 44px; color: #fff; }
.splash-title {
  color: var(--text);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 4px;
}
.splash.fading { opacity: 0; pointer-events: none; }

/* ===== 主布局 ===== */
.main { padding-top: var(--safe-top); }
.view {
  padding: 16px 16px 24px;
  max-width: 720px;
  margin: 0 auto;
  will-change: opacity;
}
.view.view-anim {
  animation: view-in 0.32s var(--ease-out);
}
@keyframes view-in {
  from { opacity: 0; transform: translate3d(0, 4px, 0); }
  to   { opacity: 1; transform: translate3d(0, 0, 0); }
}

/* ===== 屏幕(全屏覆盖,如引导)===== */
.screen {
  position: fixed; inset: 0;
  background: var(--bg);
  z-index: 100;
  overflow-y: auto;
  padding: calc(var(--safe-top) + 24px) 20px calc(var(--safe-bottom) + 120px);
}

/* ===== 文本通用 ===== */
h1 {
  font-size: 28px; font-weight: 700; margin-bottom: 8px;
  line-height: 1.2; letter-spacing: -0.5px;
}
h2 { font-size: 20px; font-weight: 600; margin-bottom: 10px; letter-spacing: -0.3px; }
h3 { font-size: 17px; font-weight: 600; letter-spacing: -0.2px; }
.text-dim { color: var(--text-dim); }
.text-faint { color: var(--text-faint); }
.text-accent { color: var(--accent); }
.text-sm { font-size: 14px; }
.text-xs { font-size: 12px; }
.text-lg { font-size: 18px; }
.text-xl { font-size: 22px; font-weight: 700; }
.fw-500 { font-weight: 500; }
.fw-600 { font-weight: 600; }

/* ===== 卡片 ===== */
.card {
  background: var(--card);
  border: none;
  border-radius: var(--r-md);
  padding: 16px;
  margin-bottom: 10px;
  transition: background 0.2s var(--ease), transform 0.15s var(--ease);
}
.swap-option:active,
.day-block:active,
.history-row:active,
.list-item:active {
  transform: scale(0.985);
}
.card-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
}

/* ===== 按钮 ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 6px;
  height: 48px; padding: 0 20px;
  border-radius: 12px;
  font-size: 16px; font-weight: 600;
  letter-spacing: -0.1px;
  transition: background 0.18s var(--ease-out), transform 0.12s var(--ease-out), opacity 0.18s var(--ease-out);
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(0.96); }
.btn:disabled { opacity: 0.45; pointer-events: none; }
.btn svg { width: 18px; height: 18px; flex: 0 0 18px; }
.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: none;
}
.btn-primary:active { background: var(--accent-dim); }
.btn-secondary { background: var(--card-2); color: var(--text); border: none; }
.btn-secondary:active { background: var(--card-hover); }
.btn-ghost { background: transparent; color: var(--text-dim); }
.btn-ghost-mini {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 13px;
  padding: 6px 12px;
  cursor: pointer;
  border-radius: 8px;
  transition: color 0.15s var(--ease), background 0.15s var(--ease);
}
.btn-ghost-mini:active { color: var(--text); background: rgba(255,255,255,0.05); }
.center-block { display: block; margin-left: auto; margin-right: auto; }
.btn-block { width: 100%; }
.btn-sm { height: 36px; padding: 0 14px; font-size: 14px; border-radius: 8px; }
.btn-sm svg { width: 14px; height: 14px; flex: 0 0 14px; }
.btn-danger { background: transparent; color: var(--danger); border: 1px solid rgba(239,68,68,0.4); }
.btn-icon {
  width: 40px; height: 40px; padding: 0;
  border-radius: 10px;
  background: var(--card); color: var(--text-dim);
  border: 1px solid var(--border);
}

/* ===== 表单 ===== */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; color: var(--text-dim); margin-bottom: 6px; }
.field input, .field select {
  width: 100%; height: 48px;
  background: var(--card); color: var(--text);
  border: 1px solid var(--border); border-radius: 12px;
  padding: 0 14px;
  outline: none;
  transition: border-color 0.2s var(--ease);
}
.field input:focus, .field select:focus { border-color: var(--accent); }
.field-row { display: flex; gap: 12px; }
.field-row .field { flex: 1; }

/* ===== 选项卡 ===== */
.option-list { display: flex; flex-direction: column; gap: 10px; }
.option {
  display: flex; align-items: center;
  background: var(--card); border: 2px solid transparent;
  border-radius: var(--r-md); padding: 16px;
  text-align: left;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease), transform 0.1s var(--ease);
  cursor: pointer;
  position: relative;
}
.option:active { transform: scale(0.98); }
.option-title { font-size: 16px; font-weight: 600; letter-spacing: -0.2px; }
.option-desc { font-size: 13px; color: var(--text-dim); margin-top: 2px; }
.option.selected {
  border-color: var(--accent);
  background: var(--card-2);
}
.option.selected::after {
  content: ''; position: absolute; top: 14px; right: 14px;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--accent);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M5 12l5 5L20 7' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-size: 14px;
  background-repeat: no-repeat;
  background-position: center;
}
.option-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.option-grid .option { text-align: center; flex-direction: column; padding: 18px 12px; }
.gender-option svg {
  margin-bottom: 6px;
  color: var(--text-dim);
  transition: color 0.2s var(--ease);
}
.gender-option.selected svg { color: var(--accent); }

/* ===== 引导进度点 ===== */
.onboarding-progress {
  display: flex; gap: 6px; justify-content: center;
  margin-bottom: 28px;
}
.onboarding-progress .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--border);
  transition: background 0.25s var(--ease), width 0.25s var(--ease);
}
.onboarding-progress .dot.active { background: var(--accent); width: 28px; border-radius: 4px; }
.onboarding-progress .dot.done { background: var(--accent-dim); }

.onboarding-step {
  padding-bottom: 32px;
  animation: step-in 0.28s var(--ease);
}
@keyframes step-in {
  from { opacity: 0; transform: translateX(8px); }
  to   { opacity: 1; transform: translateX(0); }
}
.onboarding-actions {
  position: fixed; bottom: 0; left: 0; right: 0;
  padding: 16px 20px calc(var(--safe-bottom) + 16px);
  background: linear-gradient(to top, var(--bg) 60%, transparent);
  display: flex; gap: 10px;
  z-index: 110;
}
.onboarding-actions .btn { flex: 1; }
.onboarding-actions .btn-secondary { flex: 0 0 auto; min-width: 96px; }

/* welcome / final 屏 */
.ob-hero {
  text-align: center; padding: 40px 0 24px;
}
.ob-hero-icon {
  width: 96px; height: 96px;
  margin: 0 auto 20px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255,122,77,0.2), rgba(255,122,77,0.05));
  display: flex; align-items: center; justify-content: center;
  color: var(--accent);
  box-shadow: 0 8px 32px var(--accent-glow);
}
.ob-hero-title { font-size: 28px; font-weight: 700; margin-bottom: 8px; }
.ob-hero-sub { font-size: 15px; color: var(--text-dim); line-height: 1.6; }

.ob-summary { margin-top: 12px; }
.ob-summary-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 16px; background: var(--card);
  border-radius: 10px; margin-bottom: 6px;
  font-size: 14px;
}
.ob-summary-row .k { color: var(--text-dim); }
.ob-summary-row .v { font-weight: 600; }

/* ===== 体态照片上传 ===== */
.photo-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; margin: 16px 0; }
.photo-slot {
  aspect-ratio: 3/4;
  background: var(--card);
  border: 2px dashed var(--border);
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
  cursor: pointer;
  transition: border-color 0.2s var(--ease);
}
.photo-slot:active { border-color: var(--accent); }
.photo-slot img { width: 100%; height: 100%; object-fit: cover; }
.photo-slot-label {
  position: absolute; bottom: 6px; left: 6px; right: 6px;
  background: rgba(0,0,0,0.65); color: #fff;
  font-size: 11px; padding: 3px 6px; border-radius: 6px;
  text-align: center;
  backdrop-filter: blur(4px);
}
.photo-slot input[type=file] { display: none; }
.photo-slot-add { color: var(--text-dim); font-size: 13px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.photo-slot-add svg { width: 22px; height: 22px; }

/* ===== 底部 tab bar ===== */
.tab-bar {
  position: fixed; bottom: 0; left: 0; right: 0;
  height: calc(var(--tab-bar-h) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  background: rgba(20, 20, 22, 0.78);
  backdrop-filter: saturate(180%) blur(30px);
  -webkit-backdrop-filter: saturate(180%) blur(30px);
  border-top: 0.5px solid var(--separator);
  display: flex; z-index: 50;
}
.tab {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 3px;
  color: var(--text-faint); font-size: 10px;
  font-weight: 500;
  transition: color 0.18s var(--ease-out);
  position: relative;
  -webkit-tap-highlight-color: transparent;
}
.tab-icon {
  width: 24px; height: 24px;
  transition: transform 0.28s var(--ease-spring);
}
.tab:active .tab-icon { transform: scale(0.86); }
.tab.active { color: var(--accent); }
.tab.active .tab-icon { transform: scale(1); }
.tab.active .tab-label { font-weight: 600; }
/* iOS 风:active 不加横条,只靠颜色和粗细变化 */

/* ===== 今日 / 训练动作卡 ===== */
.today-header {
  display: flex; align-items: flex-end; justify-content: space-between;
  margin-bottom: 22px;
  padding: 6px 0 4px;
}
.greeting { font-size: 14px; color: var(--text-dim); font-weight: 500; }
.today-date { font-size: 13px; color: var(--text-faint); margin-top: 2px; }
.today-title {
  font-size: 32px; font-weight: 700; margin-top: 6px;
  line-height: 1.1;
  letter-spacing: -0.8px;
}
.today-badge {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--accent-glow); color: var(--accent);
  padding: 5px 10px; border-radius: 8px;
  font-size: 12px; font-weight: 600;
  margin-top: 12px;
}
.today-badge svg { width: 12px; height: 12px; }

.day-progress {
  margin: 8px 0 18px;
}

.exercise-card {
  padding: 14px 16px;
  position: relative;
  overflow: hidden;
}
.exercise-card.done { opacity: 0.55; }
.exercise-card.done .exercise-name { text-decoration: line-through; }
.exercise-card.done::before {
  content: '';
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 3px; background: var(--success);
}
.exercise-name { font-size: 16px; font-weight: 600; }
.exercise-name-en { font-size: 12px; color: var(--text-dim); margin-top: 2px; }
.exercise-meta { display: flex; gap: 14px; margin: 12px 0 4px; flex-wrap: wrap; }
.exercise-meta-item { font-size: 13px; color: var(--text-dim); }
.exercise-meta-item strong { color: var(--text); font-size: 18px; font-weight: 700; margin-right: 2px; font-variant-numeric: tabular-nums; }
.muscle-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.muscle-tag {
  font-size: 11px; color: var(--text-dim);
  background: var(--bg); padding: 3px 8px; border-radius: 6px;
  border: 1px solid var(--border-soft);
}
.exercise-tips { font-size: 13px; color: var(--text-dim); line-height: 1.7; margin: 10px 0; }
.exercise-tips ul { list-style: none; padding: 0; }
.exercise-tips li { padding-left: 14px; position: relative; }
.exercise-tips li::before { content: ""; position: absolute; left: 4px; top: 9px; width: 4px; height: 4px; border-radius: 50%; background: var(--accent); }
.exercise-actions { display: flex; gap: 8px; margin-top: 12px; }
.exercise-actions .btn { flex: 1; }
.exercise-actions .btn.btn-icon { flex: 0 0 40px; }

.exercise-toggle {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--text-dim);
  user-select: none;
  cursor: pointer;
  padding: 4px 0;
}
.exercise-toggle svg { width: 14px; height: 14px; transition: transform 0.2s var(--ease); }
.exercise-toggle.open svg { transform: rotate(90deg); }

/* ===== 营养卡 — Apple 风 ===== */
.nutrition-card {
  background: var(--card);
  padding: 16px;
  border: none;
  position: relative;
}
.macro-row { display: flex; gap: 10px; margin: 14px 0 10px; position: relative; z-index: 1; }
.macro {
  flex: 1; text-align: center;
  padding: 12px 6px;
  border-radius: var(--r-sm);
  background: rgba(255,255,255,0.04);
  border: none;
}
.macro-value {
  font-size: 22px; font-weight: 700; color: var(--text);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.3px;
}
.macro-label { font-size: 11px; color: var(--text-dim); margin-top: 2px; }
.food-examples { font-size: 13px; color: var(--text-dim); line-height: 1.8; }

/* ===== 进度条 ===== */
.progress {
  height: 8px; background: var(--border); border-radius: 4px; overflow: hidden;
}
.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 0.4s var(--ease);
  border-radius: 4px;
}
.progress-text { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 6px; }

/* ===== 完成今日训练大按钮 ===== */
.finish-bar {
  position: sticky; bottom: 0;
  margin: 24px -16px -16px;
  padding: 12px 16px calc(var(--safe-bottom) + 12px);
  background: linear-gradient(to top, var(--bg) 60%, transparent);
}

/* ===== 计划 tab 周视图 ===== */
.week-strip {
  display: flex; gap: 8px;
  overflow-x: auto; padding-bottom: 8px; margin-bottom: 16px;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
}
.week-strip::-webkit-scrollbar { display: none; }
.day-pill {
  flex: 0 0 auto;
  min-width: 64px; padding: 12px 8px;
  background: var(--card);
  border: none;
  border-radius: var(--r-md);
  text-align: center;
  cursor: pointer;
  scroll-snap-align: start;
  transition: background 0.2s var(--ease), transform 0.15s var(--ease);
}
.day-pill {
  transition: background 0.2s var(--ease-out), transform 0.16s var(--ease-out);
}
.day-pill:active { transform: scale(0.94); }
.day-pill.today {
  background: var(--accent);
  color: #fff;
}
.day-pill.today .dow,
.day-pill.today .date,
.day-pill.today .type { color: #fff !important; }
.day-pill.done:not(.today) {
  background: var(--card-2);
}
.day-pill .dow { font-size: 11px; color: var(--text-dim); }
.day-pill .date { font-size: 17px; font-weight: 600; margin-top: 2px; font-variant-numeric: tabular-nums; letter-spacing: -0.3px; }
.day-pill .type { font-size: 11px; color: var(--accent); margin-top: 4px; font-weight: 500; }
.day-pill .type.rest { color: var(--text-faint); }
.day-pill .check { color: var(--success); font-size: 11px; margin-top: 2px; }
.day-pill.today .check { color: #fff; }

.day-block {
  background: var(--card); border-radius: 14px;
  padding: 14px; margin-bottom: 10px;
  border: 1px solid var(--border-soft);
}
.day-block .day-block-head {
  display: flex; justify-content: space-between; align-items: center;
  cursor: pointer;
}
.day-block .day-block-head.has-detail { padding-bottom: 4px; }
.day-block .meta { font-size: 12px; color: var(--text-dim); }
.day-block .ex-list { font-size: 13px; color: var(--text-dim); line-height: 1.7; margin-top: 6px; }

.day-detail-row {
  padding: 10px 0;
  border-bottom: 1px solid var(--border-soft);
}
.day-detail-row:last-child { border-bottom: none; }

/* ===== 我的页面 ===== */
.profile-header {
  display: flex; align-items: center; gap: 14px;
  padding: 18px 18px;
  background: var(--card);
  border: none;
  border-radius: var(--r-md);
  margin-bottom: 18px;
}
.profile-header h2 {
  margin: 0 !important;
  font-size: 18px;
  letter-spacing: -0.3px;
}
.profile-info-line { font-size: 13px; color: var(--text-dim); margin-top: 3px; line-height: 1.4; }
.avatar {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 600;
  flex: 0 0 56px;
}

.stat-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; margin: 12px 0; }
.stat {
  background: var(--card);
  border-radius: var(--r-md);
  padding: 14px 8px; text-align: center;
  border: none;
}
.stat-value {
  font-size: 26px; font-weight: 700; color: var(--text);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.5px;
}
.stat-label { font-size: 12px; color: var(--text-dim); margin-top: 2px; }
.stat-icon { color: var(--accent); margin-bottom: 4px; display: flex; justify-content: center; }
.stat-icon svg { width: 17px; height: 17px; }

.section-title {
  font-size: 13px; color: var(--text-dim);
  text-transform: uppercase; letter-spacing: 0.5px;
  margin: 26px 0 8px;
  font-weight: 500;
  padding: 0 4px;
}

/* heatmap */
.heatmap {
  display: grid;
  grid-template-columns: repeat(13, 1fr);
  gap: 3px;
  padding: 16px;
  background: var(--card);
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  margin-bottom: 12px;
}
.heatmap .cell {
  aspect-ratio: 1;
  border-radius: 3px;
  background: rgba(255,255,255,0.04);
  position: relative;
}
.heatmap .cell.lv1 { background: rgba(255,122,77,0.30); }
.heatmap .cell.lv2 { background: rgba(255,122,77,0.55); }
.heatmap .cell.lv3 { background: var(--accent); }
.heatmap .cell.future { background: transparent; }
.heatmap .cell.today { outline: 1.5px solid var(--accent); outline-offset: 1px; }
.heatmap-legend {
  display: flex; align-items: center; gap: 4px;
  font-size: 11px; color: var(--text-dim);
  margin-top: 8px;
  justify-content: flex-end;
}
.heatmap-legend .cell { width: 10px; height: 10px; border-radius: 2px; }

/* 设置行 — iOS list 风 */
.list-item {
  display: flex; align-items: center;
  background: var(--card); border: none;
  border-radius: var(--r-md);
  padding: 14px 16px;
  margin-bottom: 6px;
  cursor: pointer;
  transition: background 0.2s var(--ease);
  gap: 12px;
}

/* 分组列表(iOS 设置 / 健康风格)*/
.list-group {
  background: var(--card);
  border-radius: var(--r-md);
  overflow: hidden;
  margin-bottom: 6px;
}
.list-group > .list-item {
  background: transparent;
  border-radius: 0;
  margin: 0;
  position: relative;
}
.list-group > .list-item + .list-item::before {
  content: '';
  position: absolute; top: 0; left: 60px; right: 16px;
  height: 0.5px;
  background: var(--separator);
}
.list-item:active { background: var(--card-hover); transition-duration: 0s; }
.list-item .icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: rgba(255,122,77,0.10);
  color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  flex: 0 0 36px;
}
.list-item .icon svg { width: 18px; height: 18px; }
.list-item .label { flex: 1; font-size: 15px; font-weight: 500; }
.list-item .chev { color: var(--text-faint); }
.list-item .chev svg { width: 16px; height: 16px; }
.list-item.danger .icon { background: rgba(239,68,68,0.10); color: var(--danger); }
.list-item.danger .label { color: var(--danger); }

/* ===== 计时器遮罩 ===== */
.timer-overlay {
  position: fixed; inset: 0;
  background: rgba(8,8,8,0.96);
  backdrop-filter: blur(8px);
  z-index: 200;
  display: flex; align-items: center; justify-content: center;
  animation: fade-in 0.2s var(--ease);
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.timer-content { text-align: center; }
.timer-label { font-size: 13px; color: var(--text-dim); letter-spacing: 6px; }
.timer-ring-wrap {
  position: relative;
  width: 240px; height: 240px;
  margin: 24px auto 32px;
}
.timer-ring { width: 100%; height: 100%; }
.timer-ring circle { transition: stroke-dashoffset 0.95s linear; }
.timer-display {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 88px; font-weight: 300; color: var(--text);
  font-variant-numeric: tabular-nums;
  line-height: 1;
  letter-spacing: -2px;
}
.timer-actions { display: flex; gap: 10px; justify-content: center; padding: 0 16px; }

/* ===== 模态 ===== */
.modal {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  z-index: 250;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.2s var(--ease);
}
.modal.show { opacity: 1; }
.modal-box {
  background: var(--card-2); border: none;
  border-radius: var(--r-lg);
  padding: 22px; width: 100%; max-width: 360px;
  box-shadow: var(--shadow-2);
  transform: scale(0.86) translate3d(0,8px,0);
  opacity: 0;
  transition: transform 0.32s var(--ease-spring), opacity 0.22s var(--ease-out);
  will-change: transform, opacity;
}
.modal.show .modal-box {
  transform: scale(1) translate3d(0,0,0);
  opacity: 1;
}
.modal-title { font-size: 18px; font-weight: 600; margin-bottom: 8px; }
.modal-text { font-size: 14px; color: var(--text-dim); margin-bottom: 18px; line-height: 1.6; }
.modal-actions { display: flex; gap: 10px; }
.modal-actions .btn { flex: 1; }

/* ===== Toast ===== */
.toast-root {
  position: fixed; left: 0; right: 0;
  top: calc(var(--safe-top) + 16px);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  z-index: 280;
  pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: 8px;
  background: rgba(40,40,40,0.95);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 11px 18px;
  border-radius: 12px;
  font-size: 14px;
  box-shadow: var(--shadow-2);
  transform: translateY(-12px);
  opacity: 0;
  transition: transform 0.25s var(--ease), opacity 0.25s var(--ease);
  max-width: 88vw;
  pointer-events: auto;
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast.success { border-color: rgba(74,222,128,0.4); }
.toast.success .toast-icon { color: var(--success); }
.toast.error { border-color: rgba(239,68,68,0.4); }
.toast.error .toast-icon { color: var(--danger); }
.toast-icon { width: 16px; height: 16px; flex: 0 0 16px; }

/* ===== 离线徽标 ===== */
.offline-pill {
  position: fixed;
  top: calc(var(--safe-top) + 8px);
  left: 50%; transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px;
  background: rgba(239,68,68,0.15);
  border: 1px solid rgba(239,68,68,0.4);
  color: #fca5a5;
  border-radius: 12px;
  font-size: 11px; font-weight: 600;
  z-index: 70;
  backdrop-filter: blur(10px);
}
.offline-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--danger);
  animation: offline-pulse 1.6s infinite ease-in-out;
}
@keyframes offline-pulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

/* ===== 容量警告条 ===== */
.storage-warning {
  position: fixed; top: 0; left: 0; right: 0;
  background: var(--warning); color: #1a1a1a;
  padding: calc(var(--safe-top) + 8px) 16px 8px;
  font-size: 13px; font-weight: 500;
  display: flex; justify-content: space-between; align-items: center;
  z-index: 60;
}
.storage-warning button {
  display: flex; align-items: center; justify-content: center;
  padding: 4px 8px; color: #1a1a1a;
}

/* ===== 庆祝遮罩 ===== */
.celebration-overlay {
  position: fixed; inset: 0;
  background: rgba(8,8,8,0.96);
  backdrop-filter: blur(8px);
  z-index: 320;
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  transition: opacity 0.3s var(--ease);
  overflow: hidden;
}
.celebration-overlay.show { opacity: 1; }
.celebration-content {
  text-align: center;
  padding: 24px;
  transform: scale(0.85);
  transition: transform 0.4s var(--ease);
}
.celebration-overlay.show .celebration-content { transform: scale(1); }
.celebration-check {
  width: 110px; height: 110px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 24px;
  animation: celebrate-bounce 0.7s var(--ease-spring);
}
@keyframes celebrate-bounce {
  0% { transform: scale(0); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}
.celebration-title { font-size: 28px; font-weight: 700; margin-bottom: 8px; }
.celebration-sub { font-size: 14px; color: var(--text-dim); margin-bottom: 28px; }
.celebration-overlay .btn { min-width: 160px; }

.confetti {
  position: absolute;
  top: -20px; left: 50%;
  border-radius: 2px;
  animation: confetti-fall 2s var(--ease) forwards;
  pointer-events: none;
}
@keyframes confetti-fall {
  0% { transform: translate(0, 0) rotate(0); opacity: 1; }
  100% { transform: translate(var(--dx), var(--dy)) rotate(720deg); opacity: 0; }
}

/* ===== 工具类 ===== */
.row { display: flex; align-items: center; }
.row.gap { gap: 8px; }
.row.between { justify-content: space-between; }
.col { display: flex; flex-direction: column; }
.mt-4 { margin-top: 4px; }
.mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; }
.mb-4 { margin-bottom: 4px; }
.mb-8 { margin-bottom: 8px; } .mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; } .mb-24 { margin-bottom: 24px; }
.center { text-align: center; }
.flex-1 { flex: 1; }

/* ===== AI 元素 ===== */
.ai-tag {
  display: inline-block;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  color: #fff;
  font-size: 10px; font-weight: 700;
  padding: 2px 8px; border-radius: 6px;
  margin-left: 8px;
  vertical-align: middle;
  letter-spacing: 1px;
}
.ai-rationale {
  padding: 10px 14px;
  background: rgba(255,122,77,0.06);
  border-left: 2px solid var(--accent);
  border-radius: 4px;
  font-size: 13px;
  line-height: 1.6;
}
.ai-tip-stub, .ai-tip-card {
  background: linear-gradient(135deg, rgba(255,122,77,0.08), rgba(255,122,77,0.02));
  border: 1px solid rgba(255,122,77,0.18);
}
.ai-tip-text {
  font-size: 14px; line-height: 1.7;
  color: var(--text);
}
.ai-result {
  font-size: 14px; line-height: 1.8;
  color: var(--text);
  white-space: pre-wrap;
}

/* ===== Loading overlay ===== */
.loading-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(4px);
  z-index: 270;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.2s var(--ease);
  pointer-events: auto;
}
.loading-overlay.show { opacity: 1; }
.loading-box {
  background: var(--card-2);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 36px;
  display: flex; flex-direction: column;
  align-items: center; gap: 14px;
  box-shadow: var(--shadow-2);
  transform: scale(0.92);
  transition: transform 0.2s var(--ease);
}
.loading-overlay.show .loading-box { transform: scale(1); }
.loading-spinner {
  width: 32px; height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-text { font-size: 14px; color: var(--text-dim); }

/* ===== Chip grid (focus areas) ===== */
.chip-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.chip {
  height: 56px;
  background: var(--card);
  border: 2px solid transparent;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease), transform 0.1s var(--ease);
  cursor: pointer;
  user-select: none;
}
.chip:active { transform: scale(0.96); }
.chip.selected {
  border-color: var(--accent);
  background: linear-gradient(180deg, rgba(255,122,77,0.14), rgba(255,122,77,0.04));
  color: var(--accent);
}

/* ===== Focus badge / weight hint ===== */
.focus-badge {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  letter-spacing: 1px;
  margin-left: 6px;
  vertical-align: middle;
}
.exercise-meta-item.weight-hint {
  flex-basis: 100%;
  margin-top: 2px;
  color: var(--text-dim);
}
.exercise-meta-item.weight-hint strong { color: var(--accent); font-size: 14px; font-weight: 600; }

/* ===== 今日 hero 按钮 — Apple 风 ===== */
.today-hero-btn {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; padding: 18px 20px;
  background: var(--accent);
  border-radius: var(--r-lg);
  color: #fff;
  margin-bottom: 16px;
  border: none;
  transition: opacity 0.15s var(--ease), transform 0.1s var(--ease);
  cursor: pointer;
}
.today-hero-btn:active { opacity: 0.85; transform: scale(0.99); }
@keyframes hero-shift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
.today-hero-btn:active {
  transform: scale(0.98);
  box-shadow: 0 4px 12px rgba(255,122,77,0.3);
}
.today-hero-text { text-align: left; }
.today-hero-label {
  font-size: 22px; font-weight: 700;
  letter-spacing: -0.4px;
}
.today-hero-sub { font-size: 13px; opacity: 0.9; margin-top: 4px; }
.today-hero-icon-r {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.18);
  display: flex; align-items: center; justify-content: center;
}
.today-hero-icon-r svg { width: 20px; height: 20px; color: #fff; }
.today-hero.done {
  display: flex; align-items: center; gap: 14px;
  background: rgba(74,222,128,0.10);
  border: 1px solid rgba(74,222,128,0.3);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 16px;
}
.today-hero-icon {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--success);
  color: #0a0a0a;
  display: flex; align-items: center; justify-content: center;
  flex: 0 0 40px;
}
.today-hero-icon svg { width: 22px; height: 22px; }

/* ===== Workout Mode ===== */
.workout-screen {
  z-index: 200;
  padding: 0;
  display: flex; flex-direction: column;
}
.w-header {
  display: flex; align-items: center; gap: 12px;
  padding: calc(var(--safe-top) + 10px) 14px 10px;
  border-bottom: 1px solid var(--border-soft);
}
.w-header .btn-icon { flex: 0 0 40px; }
.w-header-center { flex: 1; min-width: 0; }
.w-header-progress { padding: 4px 0; }
.w-header-info {
  display: flex; gap: 8px; align-items: center;
  margin-top: 6px;
  font-size: 12px;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
}
.w-progress-strip {
  width: 100%; height: 5px;
  background: var(--border);
  border-radius: 3px; overflow: hidden;
}
.w-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 0.3s var(--ease);
}

.w-body {
  flex: 1;
  padding: 24px 20px;
  overflow-y: auto;
}
.w-meta-top {
  display: flex; gap: 8px;
  font-size: 13px; color: var(--text-dim);
  margin-bottom: 8px;
}
.w-meta-top strong { color: var(--accent); font-weight: 700; }

/* 大字动作名 hero */
.w-ex-hero { margin-bottom: 16px; padding-top: 4px; }
.w-exercise-name {
  font-size: 32px; font-weight: 800; line-height: 1.15;
  letter-spacing: -0.5px;
}
.w-exercise-en { font-size: 14px; color: var(--text-dim); margin-top: 4px; }

/* 一行目标说明 */
.w-target-line {
  padding: 12px 14px;
  background: var(--card);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  font-size: 14px;
  color: var(--text-dim);
  margin-bottom: 14px;
  text-align: center;
}
.w-target-line strong { color: var(--text); font-weight: 700; font-size: 16px; font-variant-numeric: tabular-nums; }

/* 大字"第 N 组"显示 — Apple 风克制 */
.set-progress-block {
  padding: 14px 16px;
  background: var(--card);
  border: none;
  border-radius: var(--r-md);
  margin-bottom: 14px;
}
.set-progress-title {
  display: flex; align-items: baseline; gap: 6px;
  margin-bottom: 8px;
}
.set-progress-title .set-num {
  font-size: 32px; font-weight: 800;
  color: var(--accent);
  line-height: 1;
}
.set-progress-block .set-dots {
  margin: 0;
  justify-content: flex-start;
}

/* 已完成组的小药丸 */
.set-history-row {
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
  margin-top: 12px;
}
.set-history-pill {
  background: rgba(74,222,128,0.10);
  color: var(--color-leaf);
  border: 1px solid rgba(74,222,128,0.3);
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.set-history-pill small { font-size: 10px; opacity: 0.7; }

/* 折叠的动作要点 */
.w-tips-details {
  margin-top: 18px;
  padding: 10px 14px;
  background: var(--card);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
}
.w-tips-details summary {
  font-size: 13px;
  color: var(--text-dim);
  cursor: pointer;
  user-select: none;
  list-style: none;
  display: flex; align-items: center; gap: 6px;
}
.w-tips-details summary::-webkit-details-marker { display: none; }
.w-tips-details summary::before {
  content: '▸';
  color: var(--accent);
  font-size: 11px;
  transition: transform 0.2s var(--ease);
  display: inline-block;
}
.w-tips-details[open] summary::before { transform: rotate(90deg); }
.w-tips-details ul {
  list-style: none; padding: 0; margin: 10px 0 0;
  font-size: 13px; line-height: 1.7; color: var(--text-dim);
}
.w-tips-details li { padding-left: 14px; position: relative; }
.w-tips-details li::before {
  content: ''; position: absolute; left: 4px; top: 9px;
  width: 4px; height: 4px; border-radius: 50%; background: var(--accent);
}

/* 底部固定操作区 */
.w-bottom-bar {
  border-top: 1px solid var(--border-soft);
  background: var(--bg);
  padding: 10px 14px calc(var(--safe-bottom) + 10px);
}
.w-secondary-row {
  display: flex; gap: 6px; justify-content: center;
  margin-bottom: 10px;
}
.btn-mini {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 6px 12px;
  background: transparent;
  color: var(--text-dim);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.15s var(--ease), color 0.15s var(--ease);
}
.btn-mini:active { background: var(--card); color: var(--text); }
.btn-mini.metro-on { color: var(--color-flash); border-color: var(--color-flash); }
.w-finish-btn {
  height: 56px !important;
  font-size: 17px !important;
}

.w-target {
  background: var(--card);
  border-radius: 12px;
  padding: 14px 16px;
  margin-top: 18px;
}
.w-target-row {
  display: flex; justify-content: space-between;
  padding: 6px 0;
  font-size: 14px;
  color: var(--text-dim);
}
.w-target-row strong { color: var(--text); font-size: 16px; font-variant-numeric: tabular-nums; }

.w-history-strip {
  display: flex; gap: 6px; flex-wrap: wrap;
}
.w-history-pill {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--bg-elev);
  border: 1px solid var(--border-soft);
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.w-history-pill.small { padding: 2px 8px; font-size: 12px; }

.w-set-input {
  display: flex; gap: 12px;
  margin-top: 18px;
}
.w-set-input-block { flex: 1; }
.w-set-input-block label {
  display: block;
  font-size: 12px; color: var(--text-dim);
  margin-bottom: 6px;
}

.num-stepper {
  display: flex; align-items: center;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  height: 52px;
}
.num-stepper input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text);
  text-align: center;
  font-size: 22px; font-weight: 700;
  font-variant-numeric: tabular-nums;
  outline: none;
  width: 100%;
  -moz-appearance: textfield;
}
.num-stepper input::-webkit-outer-spin-button,
.num-stepper input::-webkit-inner-spin-button {
  -webkit-appearance: none; margin: 0;
}
.num-btn {
  width: 44px; height: 100%;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-dim);
  background: transparent;
  transition: background 0.15s var(--ease);
}
.num-btn:active { background: rgba(255,255,255,0.05); color: var(--accent); }
.num-btn svg { width: 18px; height: 18px; }
.num-stepper.big { height: 64px; }
.num-stepper.big input { font-size: 32px; }
.num-stepper.big .num-btn { width: 56px; }

.w-actions {
  display: flex; gap: 10px;
  padding: 14px 16px calc(var(--safe-bottom) + 14px);
  border-top: 1px solid var(--border-soft);
  background: var(--bg);
}
.w-actions .btn { height: 56px; font-size: 17px; }
.w-actions .btn-primary {
  flex: 1;
  font-size: 18px;
}

.w-rest-body {
  flex: 1;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 24px;
  text-align: center;
}
.w-rest-actions {
  display: flex; gap: 10px; flex-wrap: wrap;
  justify-content: center;
}

.w-summary {
  flex: 1;
  padding: 16px 16px calc(var(--safe-bottom) + 80px);
  overflow-y: auto;
}
.w-summary-hero { padding-top: 16px; }

/* ===== 成就 ===== */
.achievement-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}
.achievement {
  background: var(--card);
  border: none;
  border-radius: var(--r-md);
  padding: 14px 12px;
  text-align: center;
  position: relative;
}
.achievement.locked { opacity: 0.40; }
.achievement.unlocked {
  background: var(--card);
}
.achievement-icon {
  width: 36px; height: 36px;
  border-radius: 12px;
  margin: 0 auto 8px;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent);
  color: #fff;
}
.achievement.locked .achievement-icon {
  background: var(--card-2);
  color: var(--text-faint);
}
.achievement-icon svg { width: 18px; height: 18px; }
.achievement-title { font-size: 13px; font-weight: 600; margin-bottom: 2px; }
.achievement-desc { font-size: 11px; color: var(--text-dim); line-height: 1.4; }
.achievement-new {
  position: absolute; top: -6px; right: -6px;
  background: var(--accent); color: #fff;
  font-size: 10px; font-weight: 700;
  padding: 2px 6px; border-radius: 6px;
  letter-spacing: 1px;
}
/* summary 中 unlocked achievement 大尺寸版 */
.w-summary-section .achievement {
  display: flex; align-items: center; gap: 12px;
  text-align: left;
  padding: 12px 14px;
  margin-bottom: 8px;
}
.w-summary-section .achievement-icon { margin: 0; flex: 0 0 36px; }

/* ===== PR rows ===== */
.pr-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-soft);
}
.pr-row:last-child { border-bottom: none; }

/* ===== Weight chart ===== */
.weight-chart-wrap {
  background: rgba(0,0,0,0.2);
  border-radius: 10px;
  padding: 8px;
}
.weight-chart {
  width: 100%; height: 80px; display: block;
}

/* ===== iOS Sheet — 上滑出 + grab handle ===== */
.sheet {
  background: var(--bg-elev);
  border: none;
  border-radius: 16px 16px 0 0;
  width: 100%; max-width: 520px;
  max-height: 90vh;
  display: flex; flex-direction: column;
  box-shadow: 0 -8px 28px rgba(0,0,0,0.5);
  transform: translate3d(0, 100%, 0);
  transition: transform 0.42s var(--ease-out);
  will-change: transform;
  position: relative;
  /* sheet 从底部出 */
  margin-top: auto;
  margin-bottom: 0;
  padding-bottom: var(--safe-bottom);
}
/* modal 容器变成对齐底部 */
.modal:has(.sheet) {
  align-items: flex-end;
  padding: 0;
}
.modal.show .sheet { transform: translate3d(0, 0, 0); }
.sheet::before {
  content: '';
  position: absolute; top: 8px; left: 50%;
  transform: translateX(-50%);
  width: 36px; height: 5px;
  border-radius: 3px;
  background: rgba(255,255,255,0.25);
  pointer-events: none;
}
.sheet-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 24px 20px 12px;
  border-bottom: 0.5px solid var(--separator);
}
.sheet-body {
  padding: 12px 20px 20px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.setting-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-soft);
  gap: 12px;
}
.setting-row:last-child { border-bottom: none; }
.setting-row.column-stack {
  flex-direction: column; align-items: stretch;
}
.setting-row .label { font-size: 14px; }
.setting-row.column-stack .label { margin-bottom: 8px; color: var(--text-dim); font-size: 12px; }

/* iOS-style switch */
.switch {
  position: relative;
  display: inline-block;
  width: 44px; height: 26px;
  flex: 0 0 44px;
}
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider {
  position: absolute; cursor: pointer;
  inset: 0;
  background: var(--border);
  border-radius: 26px;
  transition: background 0.2s var(--ease);
}
.switch .slider::before {
  content: '';
  position: absolute;
  height: 22px; width: 22px;
  left: 2px; top: 2px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s var(--ease);
}
.switch input:checked + .slider { background: var(--accent); }
.switch input:checked + .slider::before { transform: translateX(18px); }

.seg-control {
  display: flex;
  background: var(--bg-elev);
  border-radius: 10px;
  padding: 3px;
}
.seg-control button {
  flex: 1;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 14px;
  color: var(--text-dim);
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.seg-control button.active {
  background: var(--card);
  color: var(--text);
  box-shadow: var(--shadow-1);
}

/* ===== A2HS banner ===== */
.a2hs-banner {
  position: fixed; left: 16px; right: 16px;
  bottom: calc(var(--tab-bar-h) + var(--safe-bottom) + 12px);
  background: rgba(28,28,28,0.96);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 14px;
  display: flex; align-items: center; gap: 12px;
  box-shadow: var(--shadow-2);
  z-index: 90;
  transform: translateY(20px); opacity: 0;
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}
.a2hs-banner.show { transform: translateY(0); opacity: 1; }
.a2hs-text { flex: 1; font-size: 13px; }
.a2hs-text strong { display: block; margin-bottom: 2px; }

/* ===== 心情轨迹 ===== */
.mood-pattern-card { padding: 14px 16px; }
.mood-pattern {
  display: grid;
  grid-template-columns: repeat(14, 1fr);
  gap: 4px;
  margin-bottom: 10px;
}
.mood-cell {
  aspect-ratio: 1;
  border-radius: 4px;
  transition: transform 0.15s var(--ease);
}
.mood-cell:active { transform: scale(0.85); }
.mood-legend {
  display: flex; flex-wrap: wrap; gap: 10px;
  font-size: 11px;
  color: var(--text-dim);
}
.mood-legend span { display: inline-flex; align-items: center; gap: 4px; }
.mood-legend i {
  width: 8px; height: 8px;
  border-radius: 2px;
  display: inline-block;
}

/* ===== 计划编辑器 ===== */
.edit-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  background: var(--card);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  margin-bottom: 6px;
}
.edit-row-info { flex: 1; min-width: 0; }
.edit-row-info .fw-500 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.edit-row-actions { display: flex; gap: 4px; }
.btn-sm-icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  padding: 0;
  flex: 0 0 32px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  color: var(--text-dim);
}
.btn-sm-icon:active { background: var(--card); }
.btn-sm-icon[disabled] { opacity: 0.3; pointer-events: none; }
.btn-sm-icon:last-child { color: var(--danger); }

.picker-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px;
  background: var(--card);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  margin-bottom: 6px;
  cursor: pointer;
  transition: background 0.15s var(--ease);
}
.picker-row:active { background: var(--card-hover); }

/* ===== 成就解锁弹出卡 ===== */
.achievement-pop {
  position: fixed;
  top: calc(var(--safe-top) + 16px);
  left: 16px; right: 16px;
  max-width: 420px;
  margin: 0 auto;
  z-index: 290;
  display: flex; align-items: center; gap: 14px;
  padding: 14px 18px;
  background: linear-gradient(135deg, #2a1530 0%, #1f1426 60%);
  border: 1px solid rgba(255,107,53,0.4);
  border-radius: 16px;
  box-shadow: 0 12px 36px rgba(255,122,77,0.45), 0 0 60px rgba(255,91,156,0.2);
  transform: translateY(-120%);
  opacity: 0;
  transition: transform 0.45s var(--ease), opacity 0.3s ease;
  overflow: hidden;
}
.achievement-pop.show { transform: translateY(0); opacity: 1; }
.achievement-pop .ap-icon {
  width: 56px; height: 56px;
  border-radius: 16px;
  background: var(--grad-warm);
  background-size: 200% 200%;
  animation: hero-shift 4s ease infinite;
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  flex: 0 0 56px;
  box-shadow: 0 6px 20px rgba(255,107,53,0.45);
}
.achievement-pop .ap-text { flex: 1; min-width: 0; }
.achievement-pop .ap-tag {
  font-size: 10px; font-weight: 700;
  color: var(--color-flash);
  letter-spacing: 2px;
  margin-bottom: 4px;
  text-transform: uppercase;
}
.achievement-pop .ap-title {
  font-size: 17px; font-weight: 700;
  color: var(--text);
}
.achievement-pop .ap-desc {
  font-size: 12px; color: var(--text-dim);
  margin-top: 2px;
}
.achievement-pop .ap-shine {
  position: absolute;
  top: -60%; right: -40%;
  width: 120%; height: 220%;
  background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,0.08) 50%, transparent 70%);
  pointer-events: none;
  animation: shine 2.6s ease infinite;
}
@keyframes shine {
  0% { transform: translateX(-50%); }
  100% { transform: translateX(50%); }
}

/* ===== 历史列表 ===== */
.history-month { margin-bottom: 14px; }
.history-month-label {
  font-size: 12px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
  padding-left: 4px;
}
.history-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px;
  background: var(--card);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  margin-bottom: 6px;
  cursor: pointer;
  transition: background 0.15s var(--ease);
}
.history-row:active { background: var(--card-hover); }
.history-date {
  flex: 0 0 44px;
  text-align: center;
  padding: 6px 0;
  background: rgba(255,122,77,0.08);
  border-radius: 8px;
}
.history-day {
  font-size: 18px; font-weight: 700;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.history-dow { font-size: 10px; color: var(--text-dim); }
.history-content { flex: 1; min-width: 0; }
.history-content .fw-500 {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ===== 时间预算选择 ===== */
.budget-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.budget-opt {
  padding: 18px 12px;
  background: var(--card);
  border: 2px solid transparent;
  border-radius: 14px;
  text-align: center;
  transition: border-color 0.2s var(--ease), transform 0.1s var(--ease);
  cursor: pointer;
}
.budget-opt:active { transform: scale(0.97); border-color: var(--accent); }
.budget-min { font-size: 28px; font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; }
.budget-label { font-size: 12px; color: var(--text-dim); margin-top: 2px; }

/* ===== 热身阶段 hero ===== */
.warmup-hero {
  text-align: center;
  padding: 16px 0 24px;
}
.warmup-timer {
  margin: 18px 0;
  display: inline-flex; align-items: baseline; gap: 4px;
}
.warmup-display {
  font-size: 64px;
  font-weight: 200;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

/* ===== 体重目标块 ===== */
.weight-target-block {
  margin-top: 14px;
  padding: 12px;
  background: var(--card-2);
  border-radius: var(--r-sm);
}

/* ===== Set 进度点 ===== */
.set-dots {
  display: flex; align-items: center; gap: 6px;
  margin: 8px 0 4px;
}
.set-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--border);
  transition: background 0.25s var(--ease), transform 0.2s var(--ease);
}
.set-dot.done { background: var(--color-leaf); }
.set-dot.current {
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(255,122,77,0.18);
  transform: scale(1.2);
  animation: dot-pulse 1.4s ease infinite;
}
@keyframes dot-pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(255,122,77,0.18); }
  50% { box-shadow: 0 0 0 8px rgba(255,122,77,0.05); }
}
.set-dot-label {
  margin-left: 8px;
  font-size: 12px;
  color: var(--text-dim);
}

/* ===== BPM 小提示 ===== */
.bpm-hint {
  margin-left: 8px;
  padding: 2px 8px;
  background: rgba(167,139,250,0.15);
  color: var(--color-violet);
  border-radius: 6px;
  font-size: 11px;
}

/* ===== Workout 内嵌 bodymap ===== */
.w-bodymap { margin-top: 14px; }
.w-bodymap .bodymap-card { padding: 10px; }
.w-bodymap .bodymap-svg { width: 60px; }

/* ===== 活动圆环(Apple Watch 风) ===== */
.rings-card {
  display: flex; align-items: center; gap: 18px;
  padding: 16px;
  background: var(--card);
  border-radius: var(--r-md);
  margin-bottom: 10px;
}
.rings-svg-wrap {
  flex: 0 0 120px;
  width: 120px; height: 120px;
}
.rings-svg { width: 100%; height: 100%; }
.rings-svg circle { transition: stroke-dashoffset 0.8s var(--ease); }
.rings-legend { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.ring-stat {
  display: flex; align-items: center; gap: 8px;
  font-size: 14px;
}
.ring-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  flex: 0 0 9px;
}
.ring-label { color: var(--text-dim); flex: 1; }
.ring-val {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.2px;
}

/* ===== 训练量曲线卡 ===== */
.volume-chart-card { padding: 14px; }
.volume-chart {
  width: 100%; height: 110px; display: block;
  margin: 4px 0;
}

/* ===== 每日金句卡 — Apple 风克制 ===== */
.quote-card {
  position: relative;
  padding: 18px 20px 16px;
  background: var(--card);
  border: none;
  border-radius: var(--r-md);
  margin-bottom: 14px;
}
.quote-mark {
  font-size: 32px; font-weight: 400;
  color: var(--accent);
  line-height: 0.5;
  margin-bottom: 6px;
  font-family: Georgia, serif;
}
.quote-text {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  margin-bottom: 8px;
  letter-spacing: -0.1px;
}
.quote-by {
  font-size: 12px;
  color: var(--text-dim);
  text-align: right;
}
.quote-refresh {
  position: absolute;
  top: 10px; right: 12px;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: rgba(167,139,250,0.18);
  color: var(--color-violet);
  display: flex; align-items: center; justify-content: center;
  z-index: 2;
}
.quote-refresh:active { background: rgba(167,139,250,0.35); }
.quote-flash {
  animation: quote-flash 0.5s ease;
}
@keyframes quote-flash {
  0% { transform: scale(0.98); opacity: 0.6; }
  100% { transform: scale(1); opacity: 1; }
}

/* ===== 节拍器 ON 指示 ===== */
.metro-on {
  color: var(--color-flash) !important;
}

/* ===== 心情打卡 ===== */
.mood-block {
  margin: 0 0 16px;
  padding: 14px 16px;
  background: var(--card);
  border: none;
  border-radius: var(--r-md);
}
.mood-prompt { font-size: 14px; color: var(--text-dim); margin-bottom: 10px; }
.mood-options {
  display: flex; gap: 6px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.mood-options::-webkit-scrollbar { display: none; }
.mood-opt {
  flex: 0 0 auto;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 10px 12px;
  background: var(--bg-elev);
  border: 1.5px solid transparent;
  border-radius: 12px;
  font-size: 11px;
  color: var(--text-dim);
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
  min-width: 64px;
}
.mood-opt svg { width: 22px; height: 22px; }
.mood-opt.selected {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(255,122,77,0.06);
}
.mood-advice {
  margin-top: 10px;
  padding: 10px 12px;
  background: rgba(255,122,77,0.07);
  border-left: 2px solid var(--accent);
  border-radius: 4px;
  font-size: 13px;
  line-height: 1.6;
}
.mood-advice strong { color: var(--accent); margin-right: 6px; }
.mood-freeform {
  display: flex; gap: 6px; align-items: center;
  margin-top: 10px;
}
.mood-freeform input {
  flex: 1;
  height: 38px;
  background: var(--bg-elev);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0 12px;
  font-size: 13px;
  outline: none;
}
.mood-freeform input:focus { border-color: var(--accent); }
.mood-freeform .btn-icon {
  width: 38px; height: 38px;
  background: var(--grad-orange);
  border: none;
  color: #fff;
}

/* ===== 适配建议卡 ===== */
.adapt-card {
  background: linear-gradient(135deg, var(--card), rgba(255,122,77,0.06));
  border: 1px solid rgba(255,122,77,0.2);
}

/* ===== Chat 全屏 ===== */
.chat-screen {
  z-index: 200;
  padding: 0;
  display: flex; flex-direction: column;
  overflow: hidden;
}
.chat-header {
  display: flex; align-items: center; gap: 12px;
  padding: calc(var(--safe-top) + 10px) 16px 10px;
  border-bottom: 0.5px solid var(--separator);
  background: rgba(20, 20, 22, 0.78);
  backdrop-filter: saturate(180%) blur(30px);
  -webkit-backdrop-filter: saturate(180%) blur(30px);
}
.chat-title-block { flex: 1; }
.chat-title { font-size: 17px; font-weight: 700; }
.chat-subtitle { font-size: 11px; color: var(--success); margin-top: 2px; }
.chat-list {
  flex: 1;
  overflow-y: auto;
  padding: 16px 12px;
  display: flex; flex-direction: column; gap: 12px;
}
.chat-welcome {
  text-align: center;
  padding: 40px 20px 30px;
}
.chat-welcome-avatar {
  width: 72px; height: 72px;
  margin: 0 auto 14px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255,122,77,0.2), rgba(255,122,77,0.05));
  color: var(--accent);
  display: flex; align-items: center; justify-content: center;
}
.chat-welcome-name { font-size: 18px; font-weight: 700; margin-bottom: 6px; }
.chat-welcome-sub { font-size: 13px; color: var(--text-dim); }

.chat-msg { display: flex; gap: 8px; max-width: 100%; }
.chat-msg.user { justify-content: flex-end; }
.chat-msg.assistant { justify-content: flex-start; }
.chat-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: rgba(255,122,77,0.15);
  color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  flex: 0 0 28px;
}
.chat-avatar svg { width: 14px; height: 14px; }
.chat-msg .bubble {
  max-width: 78%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.55;
  word-wrap: break-word;
}
.chat-msg.user .bubble {
  background: var(--accent);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.chat-msg.assistant .bubble {
  background: var(--card-2);
  border: none;
  color: var(--text);
  border-bottom-left-radius: 4px;
}
.chat-actions {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-top: 10px;
}
.chat-action {
  padding: 6px 12px;
  background: rgba(255,122,77,0.12);
  color: var(--accent);
  border: 1px solid rgba(255,122,77,0.3);
  border-radius: 14px;
  font-size: 12px;
  font-weight: 500;
}
.chat-action:active { background: rgba(255,122,77,0.2); }
.typing { display: inline-flex; gap: 4px; padding: 2px 0; }
.typing span {
  width: 6px; height: 6px;
  background: var(--text-dim);
  border-radius: 50%;
  animation: typing 1.2s infinite ease-in-out;
}
.typing span:nth-child(2) { animation-delay: 0.2s; }
.typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typing {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40% { transform: scale(1); opacity: 1; }
}
.chat-input-bar {
  padding: 8px 12px calc(var(--safe-bottom) + 8px);
  background: rgba(20, 20, 22, 0.78);
  backdrop-filter: saturate(180%) blur(30px);
  -webkit-backdrop-filter: saturate(180%) blur(30px);
  border-top: 0.5px solid var(--separator);
}
.chat-suggestions {
  display: flex; gap: 6px;
  overflow-x: auto;
  padding: 0 4px 8px;
  -webkit-overflow-scrolling: touch;
}
.chat-suggestions::-webkit-scrollbar { display: none; }
.chat-chip {
  flex: 0 0 auto;
  padding: 6px 12px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  font-size: 13px;
  color: var(--text-dim);
}
.chat-chip:active { background: var(--card-hover); color: var(--text); }
.chat-input-row {
  display: flex; gap: 8px; align-items: flex-end;
}
#chat-input {
  flex: 1;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 10px 14px;
  color: var(--text);
  font-size: 14px;
  resize: none;
  outline: none;
  min-height: 40px;
  max-height: 120px;
  font-family: inherit;
}
#chat-input:focus { border-color: var(--accent); }
.chat-send-btn {
  width: 38px; height: 38px;
  flex: 0 0 38px;
  padding: 0;
  border-radius: 50%;
  border: none;
  background: var(--accent);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: opacity 0.15s var(--ease);
}
.chat-send-btn:active { opacity: 0.6; }

/* ===== Journal 文本 ===== */
.journal-text {
  font-size: 14px;
  line-height: 1.85;
  color: var(--text);
  white-space: pre-wrap;
}

/* ===== Settings input ===== */
.setting-input {
  width: 100%;
  height: 44px;
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0 12px;
  font-size: 14px;
  outline: none;
}
.setting-input:focus { border-color: var(--accent); }

/* ===== 照片时间序列 ===== */
.timeline-session {
  padding: 12px;
  background: var(--card);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  margin-bottom: 10px;
}
.timeline-photos {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
}
.timeline-photos img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
}
.timeline-photo-empty {
  width: 100%;
  aspect-ratio: 3/4;
  background: var(--bg-elev);
  border-radius: 8px;
  border: 1px dashed var(--border);
}

/* ===== 进阶提示 ===== */
.progression-hint {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px;
  background: var(--card-2);
  border-radius: var(--r-sm);
  font-size: 13px;
  color: var(--text);
  line-height: 1.5;
  margin-bottom: 14px;
}
.progression-hint svg { color: var(--accent); flex: 0 0 14px; }

/* ===== Workout Mode 双行操作区 ===== */
.w-action-secondary {
  display: flex; gap: 8px; justify-content: center;
  padding: 0 16px 6px;
  border-top: 1px solid var(--border-soft);
  padding-top: 10px;
  background: var(--bg);
}

/* ===== 休息日恢复动作卡 ===== */
.recovery-item {
  background: linear-gradient(135deg, var(--card), rgba(60,180,120,0.04));
  border-color: rgba(60,180,120,0.15);
}

/* ===== 连击数字动画(stat-value 的 streak)===== */
@keyframes streak-pulse {
  0%, 100% { text-shadow: 0 0 0 transparent; transform: scale(1); }
  50% { text-shadow: 0 0 12px rgba(255,122,77,0.6); transform: scale(1.05); }
}
.stat .stat-value.streak-active {
  animation: streak-pulse 2.4s ease-in-out infinite;
}

/* ===== 训练总结教练寄语 ===== */
.w-coach-message {
  text-align: center;
  margin-top: 14px;
  padding: 12px 18px;
  background: rgba(255,122,77,0.08);
  border-left: 2px solid var(--accent);
  border-radius: 4px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text);
  min-height: 24px;
  font-style: italic;
}
.w-coach-message:empty { display: none; }

/* ===== FAB 提示泡 + 脉动光晕 ===== */
.fab-tip-bubble {
  position: fixed;
  right: 16px;
  bottom: calc(var(--tab-bar-h) + var(--safe-bottom) + 76px);
  max-width: 220px;
  padding: 10px 14px;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  color: #fff;
  border-radius: 14px;
  font-size: 13px;
  box-shadow: 0 8px 24px rgba(255,122,77,0.5);
  z-index: 80;
  opacity: 0; transform: translateY(10px);
  transition: opacity 0.3s, transform 0.3s var(--ease);
}
.fab-tip-bubble.show { opacity: 1; transform: translateY(0); }
.fab-tip-bubble::after {
  content: '';
  position: absolute;
  right: 24px; bottom: -8px;
  width: 0; height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 8px solid var(--accent);
}
.fab-tip-pulse::after {
  content: '';
  position: absolute; inset: -4px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  animation: fab-ring 1.4s ease-out infinite;
  pointer-events: none;
}
.fab-tip-bubble {
  pointer-events: none;
}
@keyframes fab-ring {
  0% { transform: scale(0.95); opacity: 0.7; }
  100% { transform: scale(1.5); opacity: 0; }
}

/* ===== 聊天浮动按钮 ===== */
.chat-fab {
  position: fixed;
  right: 16px;
  bottom: calc(var(--tab-bar-h) + var(--safe-bottom) + 16px);
  width: 52px; height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 20px rgba(255,122,77,0.4);
  z-index: 45;
  transition: transform 0.15s var(--ease), box-shadow 0.2s var(--ease);
}
.chat-fab:active {
  transform: scale(0.94);
  box-shadow: 0 3px 10px rgba(255,122,77,0.3);
}

/* ===== Body map ===== */
.bodymap-card { padding: 14px 16px; }
.bodymap-row {
  display: flex; gap: 12px;
  justify-content: center;
  margin: 6px 0;
}
.bodymap-svg {
  width: 80px; height: auto;
}
.bodymap-tags {
  display: flex; flex-wrap: wrap; gap: 4px;
  justify-content: center;
}
.muscle-tag.highlight {
  background: rgba(255,122,77,0.12);
  color: var(--accent);
  border-color: rgba(255,122,77,0.3);
}

/* ===== Swap option card hover ===== */
.swap-option { cursor: pointer; transition: background 0.15s var(--ease); }
.swap-option:active { background: var(--card-hover); }

/* ===== Textarea base ===== */
textarea {
  font-family: inherit;
  font-size: 14px;
}

/* ===== 空状态 ===== */
.empty {
  text-align: center; padding: 64px 16px;
  color: var(--text-dim);
}
.empty-icon {
  width: 56px; height: 56px;
  margin: 0 auto 16px;
  border-radius: 16px;
  background: var(--card); color: var(--text-faint);
  display: flex; align-items: center; justify-content: center;
}
.empty-icon svg { width: 28px; height: 28px; }
.empty-title { color: var(--text); font-size: 16px; margin-bottom: 4px; }
.empty-sub { font-size: 13px; }
