:root {
  color-scheme: light;
  --canvas: #ffffff;
  --surface: #fff;
  --surface-soft: #fafafa;
  --track: #f0f0f0;
  --text: #242424;
  --muted: #616161;
  --line: #e5e5e5;
  --control-line: #c6c6c6;
  --accent: #f7630c;
  --accent-hover: #e95b0b;
  --accent-ink: #943600;
  --accent-soft: #fff1e7;
  --accent-line: #f3b18a;
  --assist: #ffbc91;
  --warning: #805300;
  --error: #a4262c;
  --radius: 8px;
  --shadow: 0 1px 3px rgb(0 0 0 / 7%);
  --font: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--canvas); color: var(--text); font: 15px/1.55 var(--font); }
h1, h2, h3, p { margin: 0; }
h1, h2, h3, strong { font-weight: 650; }
h1 { font-size: 20px; }
h2 { font-size: 21px; }
h3 { font-size: 17px; }
small { font-size: 13px; }
.quiet { color: var(--muted); font-size: 13px; }
.status-error, #custom-error { color: var(--error); }

/* ==========================================================================
   顶部导航栏（单行编辑式抬头，与大图预览风格统一）
   ========================================================================== */
.app-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: 0 max(20px, calc((100% - 1160px) / 2));
}
.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 20px;
  min-height: 56px;
  padding: 8px 0;
}
.header-left {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.header-title {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}
.header-title h1 {
  font-size: 18px;
  font-weight: 750;
  color: var(--text);
  letter-spacing: -0.3px;
  margin: 0;
}
/* 右下角轻量状态提示浮层 (Toast) */
.status-toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 1200;
  max-width: min(360px, calc(100vw - 32px));
  padding: 10px 16px;
  background: #242424;
  color: #ffffff;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.45;
  border-radius: 6px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.14);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}
.status-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.status-toast.status-error {
  background: #c42b1c;
  color: #ffffff;
  pointer-events: auto;
}

.header-divider {
  width: 1px;
  height: 18px;
  background: var(--line);
  flex-shrink: 0;
}

/* 顶级工作台切换：无框下划线 Tab */
.workspace-segmented-nav {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.ws-pill {
  position: relative;
  border: none;
  background: transparent;
  padding: 8px 10px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  user-select: none;
}
.ws-pill:hover {
  color: var(--text);
  background: var(--surface-soft);
}
.ws-pill.is-active {
  color: var(--accent);
  background: transparent;
}
.ws-pill.is-active::after {
  content: '';
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: -9px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px 2px 0 0;
}
.ws-badge {
  font-size: 11px;
  background: #f3f4f6;
  color: var(--muted);
  padding: 1px 6px;
  border-radius: 10px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.ws-pill.is-active .ws-badge {
  background: var(--accent-soft);
  color: var(--accent-ink);
}

.header-actions, .planner-toolbar, .row-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.planner-toolbar { gap: 10px 14px; margin: 12px 0; }
.planner-toolbar h2, .planner-toolbar h3 { margin-right: auto; }
.app-container { width: min(1160px, 100%); margin: 0 auto; padding: 20px 20px 64px; }

/* ==========================================================================
   步骤递进步进器（三页共享吸顶栏：左侧递进步骤 + 右侧常驻保存草稿）
   ========================================================================== */
.planner-steps-bar {
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: 100%;
  min-height: 48px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  margin-bottom: 24px;
}
.planner-steps {
  flex: 1;
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.planner-steps-actions {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  padding-left: 12px;
  border-left: 1px solid var(--line);
}
.save-draft-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.save-draft-btn .dirty-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  display: none;
  flex-shrink: 0;
}
.save-draft-btn.is-dirty {
  color: var(--accent-ink);
  font-weight: 600;
}
.save-draft-btn.is-dirty .dirty-dot {
  display: inline-block;
}
.step-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 4px;
  min-height: 48px;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  border-radius: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
  transition: color 0.15s ease, border-color 0.15s ease;
  user-select: none;
}
.step-card:hover .step-title {
  color: var(--text);
}
.step-card:hover .step-indicator {
  border-color: #cbd5e1;
}

.step-indicator {
  position: relative;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 700;
  background: #f5f5f5;
  color: var(--muted);
  border: 1px solid var(--line);
  transition: all 0.15s ease;
}
.step-indicator .step-check {
  display: none;
}

.step-content {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex: 1;
  min-width: 0;
  flex-wrap: wrap;
}
.step-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
  transition: color 0.15s ease;
  white-space: nowrap;
}
.step-desc {
  font-size: 12px;
  color: #94a3b8;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.step-chevron {
  font-size: 16px;
  color: #d4d4d8;
  font-weight: 300;
  margin-left: auto;
  padding-left: 4px;
  line-height: 1;
}

/* 状态 1：当前激活态 */
.step-card.is-active,
.step-card[aria-current='step'] {
  background: transparent;
  border-bottom-color: var(--accent);
}
.step-card.is-active .step-indicator,
.step-card[aria-current='step'] .step-indicator {
  background: var(--accent);
  color: #ffffff;
  border-color: transparent;
}
.step-card.is-active .step-title,
.step-card[aria-current='step'] .step-title {
  color: var(--accent);
}
.step-card.is-active .step-desc,
.step-card[aria-current='step'] .step-desc {
  color: var(--muted);
}
.step-card.is-active .step-chevron,
.step-card[aria-current='step'] .step-chevron {
  color: var(--accent);
}

/* 状态 2：已完成态 */
.step-card.is-completed {
  background: transparent;
  border-bottom-color: transparent;
}
.step-card.is-completed .step-indicator {
  background: #e6f7f0;
  color: #15803d;
  border-color: #b5ead7;
}
.step-card.is-completed .step-indicator .step-num {
  display: none;
}
.step-card.is-completed .step-indicator .step-check {
  display: inline-block;
  font-size: 13px;
  font-weight: 800;
}
.step-card.is-completed .step-title {
  color: var(--text);
}
.step-card.is-completed .step-desc {
  color: var(--muted);
}

/* 状态 3：待进行态 */
.step-card.is-pending {
  background: transparent;
}

@media (max-width: 768px) {
  .header-divider { display: none; }
  .ws-pill.is-active::after { bottom: -4px; }
  .planner-steps-bar {
    position: static;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding-bottom: 10px;
  }
  .planner-steps-actions {
    padding-left: 0;
    border-left: none;
    justify-content: flex-end;
  }
  .planner-sticky-bar {
    top: 0;
  }
  .planner-steps {
    grid-template-columns: 1fr;
    gap: 2px;
    border-bottom: none;
  }
  .step-card {
    border-bottom: 1px solid #f1f5f9;
    margin-bottom: 0;
    padding: 8px 2px;
  }
  .step-card.is-active,
  .step-card[aria-current='step'] {
    border-bottom: 2px solid var(--accent);
  }
  .step-chevron { display: none; }
}

/* ==========================================================================
   通用按钮与输入控件（轻边框、去厚重感）
   ========================================================================== */
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
.btn, .day-tab, .segmented button, .set-menu > summary {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  padding: 5px 12px;
  font-size: 13.5px;
  font-weight: 600;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn:hover, .set-menu > summary:hover { background: var(--surface-soft); border-color: #d4d4d8; }
.btn-ghost {
  border-color: transparent;
  background: transparent;
  color: var(--muted);
  font-weight: 600;
}
.btn-ghost:hover:not(:disabled) {
  background: #f5f5f5;
  border-color: transparent;
  color: var(--text);
}
.btn-primary, .btn-success { background: var(--accent); border-color: transparent; color: #fff; }
.btn-primary:hover, .btn-success:hover { background: var(--accent-hover); border-color: transparent; }
.btn-sm { min-height: 28px; padding: 2px 8px; font-size: 12px; }
button:disabled { cursor: default; opacity: .45; }

input:not([type='checkbox']), select, textarea {
  min-height: 34px;
  max-width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 5px;
  padding: 5px 9px;
  background: var(--surface);
  transition: border-color 0.15s ease, background 0.15s ease;
}
input:not([type='checkbox']):hover, select:hover, textarea:hover {
  border-color: #cbd5e1;
}
input[type='number'], output, .volume-value, .volume-axis { font-variant-numeric: tabular-nums; }
input[type='checkbox'] { accent-color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); outline: none; }
.form-input { width: 100%; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 14px 20px; }
.form-grid label { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; font-weight: 500; color: var(--muted); }
.form-grid input, .form-grid select, .form-grid textarea { width: 100%; color: var(--text); font-weight: 500; }

/* 步骤二：中周期基础设定专用网格（第一行名称/轮数/日期，第二行战略定位整行多行输入） */
.cycle-form-grid {
  grid-template-columns: minmax(0, 2fr) minmax(110px, 0.7fr) minmax(185px, 1.05fr);
  gap: 14px 18px;
}
.cycle-field-block {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--muted);
}

/* ==========================================================================
   全站统一极简定制下拉 (.ed-select) & 定制暖橙日历选择器 (.ed-datepicker)
   ========================================================================== */
.ed-select-native {
  display: none !important;
}
.ed-select {
  position: relative;
  display: inline-flex;
  width: 100%;
  min-width: 0;
}
.ed-select-trigger {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  min-height: 34px;
  padding: 5px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 5px;
  background: #fafafa;
  color: var(--text);
  font-size: 13.5px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.ed-select-trigger:hover:not(:disabled) {
  border-color: #cbd5e1;
  background: #ffffff;
}
.ed-select-trigger[aria-expanded='true'] {
  border-color: var(--accent);
  background: #ffffff;
}
.ed-select-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ed-select-caret {
  flex-shrink: 0;
  color: #94a3b8;
  transition: transform 0.15s ease, color 0.15s ease;
}
.ed-select-trigger[aria-expanded='true'] .ed-select-caret {
  transform: rotate(180deg);
  color: var(--accent);
}

/* 变体 1：表格内紧凑下拉（步骤三编辑轮方案选择） */
.ed-select--compact {
  width: auto;
  flex: 1;
  min-width: 106px;
}
.ed-select--compact .ed-select-trigger {
  min-height: 26px;
  height: 26px;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 600;
  background: #ffffff;
  border-color: #e2e8f0;
  border-radius: 4px;
}
.ed-select--compact .ed-select-trigger:hover:not(:disabled) {
  border-color: var(--accent-line);
}

/* 变体 2：行内轻量下拉（步骤三动作定位） */
.ed-select--inline {
  width: auto;
}
.ed-select--inline .ed-select-trigger {
  min-height: 24px;
  height: 24px;
  padding: 0 4px 0 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-ink);
  background: transparent;
  border: none;
  border-radius: 4px;
  gap: 3px;
}
.ed-select--inline .ed-select-trigger:hover:not(:disabled),
.ed-select--inline .ed-select-trigger[aria-expanded='true'] {
  background: var(--accent-soft);
}
.ed-select--inline .ed-select-caret {
  color: var(--accent-ink);
}

/* 弹出选项浮层（对齐每组 .set-menu-panel） */
.ed-select-menu {
  position: fixed;
  z-index: 2500;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 4px;
  max-height: 260px;
  overflow-y: auto;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 7px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12), 0 2px 6px rgba(0, 0, 0, 0.04);
  animation: popoverFadeIn 0.12s ease;
}
.ed-select-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  border: none;
  border-radius: 4px;
  background: transparent;
  padding: 6px 9px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text);
  text-align: left;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}
.ed-select-option:hover:not(:disabled) {
  background: #f5f5f5;
}
.ed-select-option.is-selected {
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-weight: 700;
}
.ed-select-check {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
}

/* 定制暖橙日历选择器（对齐导出大图月历风格） */
.ed-datepicker-wrap {
  position: relative;
  width: 100%;
}
.ed-datepicker-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 34px;
  width: 100%;
  padding: 5px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 5px;
  background: var(--surface);
  color: var(--text);
  font-size: 13.5px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.ed-datepicker-trigger:hover {
  border-color: #cbd5e1;
}
.ed-datepicker-trigger[aria-expanded='true'] {
  border-color: var(--accent);
}
.ed-cal-icon {
  flex-shrink: 0;
  color: var(--muted);
}
.ed-datepicker-trigger[aria-expanded='true'] .ed-cal-icon {
  color: var(--accent);
}
.ed-datepicker-popover {
  position: fixed;
  z-index: 2500;
  width: 272px;
  padding: 12px 12px 10px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12), 0 2px 6px rgba(0, 0, 0, 0.04);
  animation: popoverFadeIn 0.14s ease;
}
.ed-dp-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid #f1f5f9;
}
.ed-dp-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.ed-dp-nav {
  width: 26px;
  height: 26px;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  font-size: 16px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.ed-dp-nav:hover {
  background: #f5f5f5;
  color: var(--text);
}
.ed-dp-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  color: #94a3b8;
  margin-bottom: 4px;
}
.ed-dp-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}
.ed-dp-cell {
  width: 32px;
  height: 30px;
  margin: 0 auto;
  border: 1px solid transparent;
  border-radius: 50%;
  background: transparent;
  color: var(--text);
  font-size: 12.5px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}
.ed-dp-cell:hover {
  background: var(--accent-soft);
  color: var(--accent-ink);
}
.ed-dp-cell.is-outside {
  color: #cbd5e1;
}
.ed-dp-cell.is-today {
  border-color: var(--accent-line);
  color: var(--accent-ink);
  font-weight: 700;
}
.ed-dp-cell.is-selected {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
  font-weight: 700;
}
.ed-dp-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #f1f5f9;
}
.ed-dp-quick {
  border: none;
  border-radius: 4px;
  background: transparent;
  color: var(--accent-ink);
  font-size: 12px;
  font-weight: 600;
  padding: 3px 8px;
  cursor: pointer;
}
.ed-dp-quick:hover {
  background: var(--accent-soft);
}
.cycle-form-grid .field-positioning {
  grid-column: 1 / -1;
}
.field-label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.char-counter {
  font-size: 11px;
  font-weight: 500;
  color: #94a3b8;
  font-variant-numeric: tabular-nums;
}
.char-counter.is-limit {
  color: var(--accent-ink);
  font-weight: 700;
}
.form-textarea {
  min-height: 62px;
  padding: 8px 10px;
  line-height: 1.55;
  resize: vertical;
  font-family: inherit;
  font-size: 13.5px;
}
@media (max-width: 720px) {
  .cycle-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .cycle-form-grid .field-plan-name {
    grid-column: 1 / -1;
  }
}

/* ==========================================================================
   通用扁平编辑式章节（复刻大图预览 .poster-section 杂志级层次）
   ========================================================================== */
#step-1, #step-2, #step-4 { background: transparent; padding: 0; border: none; box-shadow: none; }
.editorial-section {
  margin-bottom: 32px;
}
.editorial-section-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding-bottom: 8px;
  margin-bottom: 16px;
  border-bottom: 1.5px solid var(--accent);
}
.editorial-header-left {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px 12px;
}
.editorial-section-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.2px;
  margin: 0;
}
.editorial-section-sub {
  font-size: 12px;
  color: var(--muted);
  font-weight: 400;
}
.editorial-inline-select {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--muted);
  font-weight: 500;
}
.editorial-inline-select select {
  min-height: 28px;
  height: 28px;
  padding: 2px 8px;
  font-size: 12.5px;
  color: var(--text);
}
.step-footer-actions {
  display: flex;
  justify-content: flex-end;
  padding-top: 8px;
  border-top: 1px solid #f0f0f0;
}

/* 步骤一：身体指标扁平网格 */
.prof-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 14px 18px; }
.prof-grid label { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; font-weight: 500; color: var(--muted); min-width: 0; }
.prof-grid select, .prof-grid input { width: 100%; min-height: 34px; height: 34px; color: var(--text); font-weight: 500; background: #fafafa; }
.prof-grid select:focus, .prof-grid input:focus { background: #ffffff; }

/* 步骤一：六大核心模式 1RM（双列无框平铺，对齐海报 .poster-pattern-grid） */
#baseline-modes-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px 32px;
}
@media (max-width: 820px) {
  #baseline-modes-container {
    grid-template-columns: 1fr;
    gap: 18px;
  }
}
.mode-group-card {
  border: none;
  border-radius: 0;
  margin: 0;
  background: transparent;
}
.mode-group-header {
  padding: 0 0 6px;
  background: transparent;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  font-weight: 700;
  font-size: 13.5px;
  color: var(--text);
}
.mode-group-header .quiet { font-weight: 400; font-size: 11.5px; }
.mode-header-actions { display: flex; align-items: center; gap: 8px; }
.mode-add-btn {
  border: none;
  background: transparent;
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  padding: 2px 6px;
  min-height: unset;
  border-radius: 4px;
}
.mode-add-btn:hover {
  background: var(--accent-soft);
  color: var(--accent-ink);
}
.mode-empty-tip {
  padding: 12px 0;
  text-align: left;
  color: #94a3b8;
  font-size: 12px;
  background: transparent;
}
.baseline-item-row {
  display: grid;
  grid-template-columns: minmax(110px, 1fr) auto auto;
  gap: 8px 12px;
  align-items: center;
  padding: 7px 2px;
  background: transparent;
  border-bottom: 1px solid #f1f5f9;
  transition: background 0.12s ease;
}
.baseline-item-row:hover {
  background: #fafafa;
}
.baseline-item-row strong {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.baseline-input-wrap { display: inline-flex; align-items: center; gap: 4px; }
.baseline-input-wrap input {
  width: 68px;
  text-align: right;
  font-weight: 700;
  color: var(--accent-ink);
  min-height: 28px;
  height: 28px;
  padding: 2px 6px;
  background: #fafafa;
  border-color: #e5e7eb;
}
.baseline-input-wrap input:focus { background: #ffffff; }
.baseline-input-wrap .unit { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.baseline-row-actions {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}
.baseline-row-actions .btn {
  min-height: 26px;
  padding: 2px 6px;
  font-size: 11.5px;
  border-color: transparent;
  background: transparent;
  color: var(--muted);
  font-weight: 500;
}
.baseline-row-actions .btn:hover {
  background: #f1f5f9;
  color: var(--text);
}
.baseline-row-actions .btn:last-child:hover {
  background: #fee2e2;
  color: #dc2626;
}

/* 步骤一：肌群容量阈值参考（无框三列矩阵，对齐海报 .poster-volume-grid） */
.landmarks-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px 24px; }
@media (max-width: 780px) {
  .landmarks-grid { grid-template-columns: repeat(2, 1fr); gap: 10px 18px; }
}
@media (max-width: 440px) {
  .landmarks-grid { grid-template-columns: 1fr; }
}
.landmark-card {
  background: transparent;
  border: none;
  border-bottom: 1px solid #f0f0f0;
  border-radius: 0;
  padding: 6px 0 9px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.landmark-header-line { display: flex; justify-content: space-between; align-items: baseline; }
.landmark-card strong { font-size: 13px; font-weight: 700; color: var(--text); }
.landmark-mav-badge { font-size: 11.5px; color: #2e7d32; font-weight: 600; font-variant-numeric: tabular-nums; }
.landmark-scale-bar { position: relative; height: 8px; border-radius: 4px; background: #f1f5f9; overflow: hidden; margin: 2px 0; }
.landmark-mav-band { position: absolute; top: 0; bottom: 0; background: #C0DD97; }
.landmark-mrv-band { position: absolute; top: 0; bottom: 0; background: #FCEBEB; }
.landmark-labels { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--muted); line-height: 1; font-variant-numeric: tabular-nums; }

/* 训练日编排内联 1RM 框与当天定位胶囊 */
.ex-1rm-box { display: inline-flex; align-items: center; gap: 4px; background: var(--surface-soft); border: 1px solid var(--control-line); border-radius: 4px; height: 28px; padding: 0 6px; font-size: 12px; color: var(--muted); }
.ex-1rm-box input { width: 55px; height: 100%; border: none !important; background: transparent !important; text-align: center; font-size: 12px; font-weight: 700; color: var(--text); padding: 0; min-height: unset !important; }
.ex-1rm-box input:focus { outline: none; }
.ex-1rm-box:focus-within { border-color: var(--accent); background: #fff; }

.role-select-label { display: inline-flex; align-items: center; gap: 2px; background: transparent; border: none; height: 26px; padding: 0 2px; font-size: 12px; color: var(--muted); }

/* 步骤二：编辑范围分段胶囊 + 语义化交替行日程表 */
.schedule-scope-wrap {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.schedule-scope-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}
.schedule-round-segmented {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px;
  padding: 2px;
  background: #f1f5f9;
  border-radius: 6px;
}
.schedule-round-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  min-height: 26px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.schedule-round-pill:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.7);
}
.schedule-round-pill.is-active {
  background: var(--accent);
  color: #ffffff;
  font-weight: 700;
}
.schedule-custom-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  display: inline-block;
}
.schedule-round-pill.is-active .schedule-custom-dot {
  background: #ffffff;
}

.schedule-summary-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}
.schedule-reset-wrap {
  position: relative;
}
.schedule-list-head {
  display: grid;
  grid-template-columns: 72px 62px 200px minmax(0, 1fr) 96px;
  gap: 12px;
  align-items: center;
  padding: 8px 14px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--muted);
  background: var(--surface-soft);
  border-top: 1px solid #e2e8f0;
  border-bottom: 1.5px solid #cbd5e1;
}
.schedule-head-limit {
  font-style: normal;
  font-weight: 400;
  color: #94a3b8;
  margin-left: 4px;
}
.schedule-head-actions {
  text-align: right;
  padding-right: 6px;
}
.schedule-list {
  list-style: none;
  padding: 0;
  margin: 0 0 14px;
}
.schedule-list > li.schedule-row {
  display: grid;
  grid-template-columns: 72px 62px 200px minmax(0, 1fr) 96px;
  gap: 12px;
  align-items: center;
  padding: 9px 14px;
  background: #ffffff;
  border: none;
  border-bottom: 1px solid #f1f5f9;
  border-radius: 0;
  transition: background 0.12s ease, box-shadow 0.12s ease;
}
.schedule-list > li.schedule-row:nth-child(even) {
  background: #f8fafc;
}
.schedule-list > li.schedule-row:hover {
  background: #fff9f5;
  box-shadow: inset 2px 0 0 var(--accent);
}
.schedule-list > li.schedule-row input {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  border: 1px solid transparent;
  border-bottom: 1px dashed #cbd5e1;
  border-radius: 4px;
  background: transparent;
  padding: 4px 8px;
  min-height: 30px;
}
.schedule-list > li.schedule-row input:hover {
  background: #ffffff;
  border-color: #cbd5e1;
}
.schedule-list > li.schedule-row input:focus {
  background: #ffffff;
  border-color: var(--accent);
}
.day-name-input { font-weight: 600; color: var(--text); }
.day-notes-input { color: var(--muted); font-size: 13px; }
.day-notes-placeholder {
  color: #94a3b8;
  font-size: 12.5px;
  padding: 4px 8px;
  user-select: none;
}
.schedule-list .row-actions {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 28px);
  gap: 4px;
  justify-content: end;
  align-items: center;
}
.schedule-list .row-actions .btn {
  width: 28px;
  min-height: 26px;
  padding: 2px 0;
  border-color: transparent;
  background: transparent;
  color: #94a3b8;
  font-size: 12px;
  justify-content: center;
}
.schedule-list .row-actions .btn:hover:not(:disabled) {
  background: #e2e8f0;
  color: var(--text);
}
.schedule-list .row-actions .btn:disabled {
  opacity: 0.22;
  cursor: default;
}
.schedule-list .row-actions .btn:last-of-type:hover {
  background: #fee2e2;
  color: #dc2626;
}
.schedule-bottom-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 0 2px;
}
.day-number { font-size: 12.5px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.day-type { display: inline-flex; align-items: center; justify-content: center; width: 46px; padding: 2px 0; border-radius: 3px; font-size: 11px; font-weight: 700; background: var(--accent-soft); color: var(--accent-ink); }
.day-type.rest { background: #e2e8f0; color: #64748b; }

/* 四色区分标签系统 */
.tag-list { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid transparent;
  line-height: 1.2;
  white-space: nowrap;
}
.tag-pattern {
  background: #EFF6FC;
  color: #106EBE;
  border-color: #C7E0F4;
}
.tag-equipment {
  background: #F3F2F1;
  color: #323130;
  border-color: #E1DFDD;
}
.tag-muscle-pri {
  background: #FFF1E7;
  color: #D83B01;
  border-color: #F8D2B9;
}
.tag-muscle-sec {
  background: #DFF6DD;
  color: #107C10;
  border-color: #B1E5B0;
}
.role-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  background: var(--accent);
  color: #fff;
}

/* 训练日编排头部与选项卡（轮次页签撑满全宽 + 与下方日程托盘无缝连通） */
.editor-header { margin: 0 0 14px; }
.round-tabs {
  flex: 1;
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(76px, 1fr));
  gap: 0;
  align-items: stretch;
}
.round-tab {
  position: relative;
  min-height: 36px;
  border: none;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  margin-bottom: -1px;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.round-tab:hover {
  background: transparent;
  color: var(--text);
}
.round-tab[aria-pressed='true'] {
  background: transparent;
  color: var(--accent);
  font-weight: 700;
  border-bottom-color: var(--accent);
}
#open-volume { color: var(--accent-ink); }
#open-volume:hover { background: var(--accent-soft); color: var(--accent-ink); }

.day-main-header {
  margin: 4px 0 18px;
  padding-bottom: 10px;
  border-bottom: 1.5px solid var(--accent);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px 16px;
}
.day-heading { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.day-heading h3 { font-size: 16px; font-weight: 750; color: var(--accent); }
.day-notes-badge {
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 400;
  background: transparent;
  border: none;
  padding: 0;
}
.day-stats-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  background: transparent;
  border: none;
  padding: 0;
  font-variant-numeric: tabular-nums;
}
.day-stats-pill strong {
  color: var(--accent-ink);
  font-weight: 700;
}
.day-stats-sub {
  color: #94a3b8;
  font-size: 11.5px;
  margin-left: 2px;
}

#day-nav {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(108px, 1fr));
  gap: 0;
  margin: 0;
}
.day-tab {
  display: grid;
  justify-items: start;
  min-width: 0;
  line-height: 1.35;
  padding: 7px 10px;
  border: none;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  box-shadow: none;
  margin-bottom: -1px;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.day-tab > span {
  width: 100%;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.day-tab small { color: #94a3b8; font-size: 11px; font-weight: 500; display: flex; align-items: center; justify-content: space-between; width: 100%; gap: 6px; }
.day-tab .tab-sets-tag { font-size: 10.5px; font-weight: 600; color: #94a3b8; font-variant-numeric: tabular-nums; }
.day-tab[aria-pressed='true'] .tab-sets-tag { color: var(--accent-ink); }
.day-tab.rest { background: transparent; opacity: 0.65; }
.day-tab:hover { background: #f8fafc; color: var(--text); }
.day-tab[aria-pressed='true'] {
  background: #fff7f2;
  border-bottom-color: var(--accent);
  color: var(--accent-ink);
  box-shadow: none;
}

/* 动作分段块（彻底去卡片外框与阴影，文档流排布） */
.exercise-item {
  background: transparent;
  border: none;
  border-bottom: 1px solid #ececec;
  border-radius: 0;
  margin: 0 0 18px;
  padding-bottom: 14px;
  box-shadow: none;
}
.exercise-item:last-child {
  border-bottom: none;
}
.exercise-summary { display: grid; grid-template-columns: minmax(0, 1fr) auto 18px; align-items: center; gap: 12px; padding: 8px 2px; cursor: pointer; list-style: none; }
.exercise-summary::-webkit-details-marker, .set-menu > summary::-webkit-details-marker { display: none; }
.exercise-summary > strong { font-size: 15.5px; overflow-wrap: anywhere; }
.exercise-summary-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.exercise-chevron { width: 7px; height: 7px; border-right: 1.5px solid #94a3b8; border-bottom: 1.5px solid #94a3b8; transform: rotate(45deg); justify-self: center; align-self: center; transition: transform 0.15s ease; }
.exercise-item[open] > .exercise-summary { border-bottom: none; }
.exercise-item[open] > .exercise-summary .exercise-chevron { transform: rotate(225deg); }
.exercise-body { padding: 4px 0 2px; }
.exercise-body .row-actions { margin-left: auto; }
.exercise-footer { margin-top: 8px; }
.exercise-footer .btn:first-child { border-color: transparent; background: var(--accent-soft); color: var(--accent-ink); }
.exercise-footer .btn:first-child:hover { background: #ffe4d1; }

/* 极简编辑式动作元数据条（替代四色标签框） */
.ex-meta-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin: 2px 0 10px;
}
.ex-meta-line {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}
.ex-meta-item.is-pri {
  color: var(--text);
  font-weight: 600;
}
.ex-meta-sep {
  color: #d4d4d8;
  user-select: none;
}
.ex-inline-controls {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

/* 全轮编辑矩阵：学术三线表（去外框、去竖线，对齐海报 .poster-matrix-table） */
.round-scroll {
  overflow-x: auto;
  margin-block: 6px 8px;
  border: none;
  border-radius: 0;
  background: transparent;
}
.round-matrix { width: 100%; table-layout: fixed; border-collapse: collapse; border-spacing: 0; font-size: 13px; text-align: left; }
.round-matrix th, .round-matrix td {
  padding: 7px 10px;
  border: none;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}
.round-matrix thead th {
  border-top: 1px solid #e5e7eb;
  border-bottom: 1.5px solid #cbd5e1;
  background: var(--surface-soft);
  vertical-align: top;
  padding: 8px 10px;
}
.round-matrix .rm-col-label, .round-matrix tbody .rm-row-label {
  width: 68px;
  min-width: 68px;
  max-width: 68px;
  position: sticky;
  left: 0;
  z-index: 3;
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  background: #ffffff;
  white-space: nowrap;
  padding: 7px 6px;
}
.round-matrix thead .rm-col-label { background: var(--surface-soft); }
.round-matrix tbody tr:hover .rm-row-label { background: #fafafa; }

.round-matrix .round-head, .round-matrix .round-cell { width: 135px; min-width: 125px; }
.round-matrix .round-head.is-editing, .round-matrix .round-cell.is-editing {
  width: 320px;
  min-width: 290px;
  background: #fffaf5;
  padding: 7px 10px;
}
.round-matrix .round-head.is-editing {
  border-bottom-color: var(--accent);
}
/* 只读单元格全域可点，悬浮柔和提示 */
.round-matrix .round-cell:not(.is-editing) {
  cursor: pointer;
  transition: background-color 0.12s ease;
}
.round-matrix .round-cell:not(.is-editing):hover {
  background-color: #fafafa !important;
}
.round-matrix .round-cell:not(.is-editing):hover .ro-main {
  color: var(--accent-ink);
  font-weight: 700;
}

.round-matrix .round-head:not(.is-editing) {
  cursor: pointer;
  transition: background-color 0.12s ease;
}
.round-matrix .round-head:not(.is-editing):hover {
  background-color: #f3f4f6;
}
.round-head-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; min-height: 22px; }
.round-select { background: transparent; border: none; padding: 0; font-size: 13px; font-weight: 700; color: var(--text); cursor: pointer; }
.round-select:hover { color: var(--accent-ink); }
.round-select[aria-pressed='true'] { color: var(--accent); }
.round-skipped-tag { font-size: 11px; font-weight: 500; color: #94a3b8; }

/* 编辑轮右上角 ⋯ 轮次菜单（与每组 .set-menu 完全同源） */
.round-more-menu { position: relative; }
.round-more-menu[open] { z-index: 60; }
.round-more-menu > summary {
  list-style: none;
  width: 24px;
  height: 22px;
  border-radius: 4px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  line-height: 20px;
  text-align: center;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}
.round-more-menu > summary::-webkit-details-marker { display: none; }
.round-more-menu > summary:hover,
.round-more-menu[open] > summary {
  background: #ffffff;
  border-color: #e2e8f0;
  color: var(--text);
}
.round-more-panel {
  min-width: 136px;
}

.round-scope { display: block; font-size: 11px; color: var(--muted); margin-bottom: 2px; }
.round-settings {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 6px;
  margin-top: 6px;
}
.top-toggle-btn {
  flex-shrink: 0;
  height: 26px;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 4px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.top-toggle-btn:hover:not(:disabled) {
  border-color: #cbd5e1;
  color: var(--text);
}
.top-toggle-btn.is-active {
  background: var(--accent-soft);
  border-color: var(--accent-line);
  color: var(--accent-ink);
  font-weight: 700;
}
.top-toggle-btn:disabled {
  opacity: 0.55;
  cursor: default;
}

.round-readonly { display: flex; flex-direction: column; gap: 1px; line-height: 1.35; font-variant-numeric: tabular-nums; }
.ro-main { font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap; }
.round-hint, .ro-hint { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.round-hint:empty, .ro-hint:empty { display: none; }
.round-hint[data-level='warning'] { color: var(--warning); font-weight: 500; }
.round-hint[data-level='error'] { color: var(--error); font-weight: 500; }
.round-empty { display: block; color: #cbd5e1; font-size: 12px; text-align: center; }

/* 单元格单行紧凑编辑（静默浅底，聚焦亮橙边） */
.set-cell-edit { display: flex; flex-direction: column; gap: 2px; }
.set-input-line { display: flex; align-items: center; gap: 5px; flex-wrap: nowrap; }
.input-tag-group {
  display: inline-flex;
  align-items: center;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  height: 28px;
  padding: 0 5px;
  transition: border-color 0.15s ease;
}
.input-tag-group:hover { border-color: #cbd5e1; }
.input-tag-group:focus-within { border-color: var(--accent); }
.input-tag-group input { border: none !important; outline: none !important; height: 100% !important; min-height: unset !important; padding: 0 2px !important; font-size: 13px; font-weight: 600; background: transparent !important; font-variant-numeric: tabular-nums; }
/* 彻底清除输入框自带的原生微调小箭头，防止挤压文字显示空间 */
.input-tag-group input[type='number']::-webkit-inner-spin-button,
.input-tag-group input[type='number']::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.input-tag-group input[type='number'] {
  -moz-appearance: textfield;
}
/* 固定宽度精准定义：次数 36px，重量负荷加宽至 58px（告别小数点截断） */
.input-tag-group input.set-input-amount { width: 36px; text-align: center; }
.input-tag-group input.set-input-load { width: 58px; text-align: center; }
.input-tag-group.is-rpe input.set-input-load { width: 38px; text-align: center; }
.input-tag-group.is-drop input.set-input-load { width: 44px; text-align: center; }
.input-tag-group input[type='number']:first-child { width: 38px; text-align: center; }
.input-tag-group input.set-input-load:first-child { width: 58px; text-align: center; }
.input-tag-group .unit-text { font-size: 11px; color: var(--muted); padding-right: 2px; white-space: nowrap; user-select: none; }
.input-tag-group .prefix-text { font-size: 12px; color: var(--muted); font-weight: 600; padding-left: 2px; white-space: nowrap; user-select: none; }
.input-tag-group .prefix-text + input { width: 44px; text-align: center; }
.input-tag-group.is-rpe .prefix-text + input { width: 38px; text-align: center; }
.input-tag-group input:not(:first-child) { width: 50px; }
.input-tag-group.is-load input:not(:first-child) { width: 58px; }
.set-info-line { display: flex; align-items: center; gap: 6px; min-height: 14px; line-height: 1.2; }
.set-cell-edit .set-hint { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.set-cell-edit .set-hint[data-level='warning'] { color: var(--warning); font-weight: 500; }
.set-cell-edit .set-hint[data-level='error'] { color: var(--error); font-weight: 500; }
.set-cell-edit .set-note { font-size: 11px; color: var(--muted); margin-left: auto; }
/* 外置直达删除按钮：一键删除，告别二级菜单 */
.set-quick-btn-del {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  min-height: 22px !important;
  padding: 0 !important;
  border-radius: 4px;
  border: 1px solid transparent;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  font-size: 12px;
  line-height: 1;
  transition: all 0.15s ease;
  flex-shrink: 0;
  margin-left: auto;
}
.set-quick-btn-del:hover {
  background: #fee2e2;
  color: #dc2626;
  border-color: #fca5a5;
}
.set-cell-edit .set-menu { margin-left: 2px; position: relative; }
.set-cell-edit .set-menu[open] { z-index: 50; }
.set-cell-edit .set-menu > summary { width: 22px; height: 22px; min-height: 22px; padding: 0; font-size: 13px; line-height: 20px; text-align: center; border-radius: 4px; border: 1px solid transparent; color: var(--muted); cursor: pointer; list-style: none; }
.set-cell-edit .set-menu > summary:hover { border-color: var(--control-line); background: var(--surface); color: var(--text); }
.set-menu-panel {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  display: grid;
  min-width: 150px;
  padding: 4px;
  background: #ffffff;
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12), 0 2px 6px rgba(0, 0, 0, 0.04);
  z-index: 999;
}
/* 解决靠下的行下拉菜单被下方遮挡：位于表格最后两行时向上弹出 */
.round-matrix tbody tr:nth-last-child(-n+2) .set-menu-panel {
  top: auto;
  bottom: calc(100% + 4px);
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.12), 0 -2px 6px rgba(0, 0, 0, 0.04);
}
.set-menu-panel .btn { white-space: nowrap; text-align: left; border-color: transparent; font-size: 12px; padding: 4px 8px; }
.set-menu-panel .btn:hover { background: #f1f5f9; color: var(--text); }
.round-edit-scope .btn { margin: 4px 4px 0 0; }

/* 全局模态弹窗基础重置 (彻底消除原生粗黑边框与生硬外框) */
dialog {
  border: none !important;
  outline: none !important;
  background: var(--surface);
  color: var(--text);
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06), 0 16px 48px rgba(0, 0, 0, 0.1);
}
dialog::backdrop {
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(2px);
}
#planner-dialog { width: min(720px, calc(100% - 24px)); max-height: 88vh; padding: 20px 24px; }
#volume-dialog {
  width: min(1180px, calc(100vw - 32px));
  max-height: 90vh;
  padding: 0;
  overflow: hidden;
  box-sizing: border-box;
}
#volume-dialog[open] {
  display: flex;
  flex-direction: column;
}
.volume-dialog-top {
  flex-shrink: 0;
  padding: 18px 24px 0;
  background: #ffffff;
}
#volume-content {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 14px 24px 22px;
}
#planner-dialog > .planner-toolbar { margin-top: 0; }
#planner-dialog label { display: block; }

/* 通用模态弹窗优雅头部与 Fluent 2 关闭按钮 */
.planner-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line, #edebe9);
}
.planner-dialog-header h2 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text, #1e293b);
  margin: 0;
}
.dialog-close-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  min-height: 32px !important;
  padding: 0 !important;
  border: none !important;
  border-radius: 6px;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  transition: all 0.15s ease;
  outline: none;
}
.dialog-close-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
}
.dialog-close-btn:focus {
  outline: none !important;
}

/* 基准 1RM · 模式动作添加弹窗（Fluent 2 轻量三线表风格） */
.baseline-picker {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.baseline-picker-intro {
  padding-top: 2px;
}
.baseline-picker-eyebrow {
  display: inline-block;
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.3;
}
.baseline-picker-desc {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}
.baseline-picker-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 0 2px 9px;
  border-bottom: 1px solid var(--line);
}
.baseline-picker-meta strong {
  color: var(--text);
  font-size: 12.5px;
  font-weight: 650;
}
.baseline-picker-meta .quiet {
  font-size: 11.5px;
  color: var(--muted);
}
.baseline-picker-list {
  max-height: min(46vh, 420px);
  min-height: 96px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}
.baseline-picker-list::-webkit-scrollbar { width: 6px; }
.baseline-picker-list::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: var(--line);
}
.baseline-picker-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px 8px;
  border-bottom: 1px solid #f1f1f1;
  border-radius: 6px;
  transition: background 0.14s ease;
}
.baseline-picker-row:last-child { border-bottom: none; }
.baseline-picker-row:hover { background: var(--surface-soft); }
.baseline-picker-name {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}
.baseline-picker-name strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.baseline-picker-tags {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.baseline-picker-tag {
  display: inline-flex;
  align-items: center;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--track);
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.6;
  white-space: nowrap;
}
.baseline-picker-tag-tier {
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-weight: 600;
}
.baseline-picker-add {
  min-height: 30px;
  padding: 5px 11px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.14s ease, color 0.14s ease;
}
.baseline-picker-add:hover {
  background: var(--accent-soft);
  color: var(--accent-ink);
}
.baseline-picker-add:focus-visible {
  outline: 2px solid var(--accent-line);
  outline-offset: 1px;
}
@media (max-width: 520px) {
  .baseline-picker-meta { flex-direction: column; gap: 3px; }
  .baseline-picker-row { grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
  .baseline-picker-tag:not(.baseline-picker-tag-tier) { display: none; }
}

/* 录入新动作 Fluent 2 现代规格表单 */
.cex-dialog-wrapper {
  display: flex;
  flex-direction: column;
}
.cex-dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--line, #edebe9);
}
.cex-dialog-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text, #0f172a);
  margin: 0 0 4px;
  letter-spacing: -0.2px;
}
.cex-dialog-desc {
  font-size: 12px;
  color: #64748b;
  margin: 0;
  line-height: 1.4;
}
.cex-close-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  min-height: 32px !important;
  padding: 0 !important;
  border: none !important;
  border-radius: 6px;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
  outline: none;
}
.cex-close-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
}
.cex-close-btn:focus {
  outline: none !important;
}

.cex-form-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-height: calc(85vh - 120px);
  overflow-y: auto;
  padding-right: 4px;
}

.cex-card-section {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 4px 0 12px;
  box-shadow: none;
}
.cex-section-title-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px;
  padding-bottom: 6px;
  margin-bottom: 12px;
  border-bottom: 1.5px solid var(--accent);
}
.cex-section-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 6px;
}

.cex-grid-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.cex-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}
.cex-form-group:last-child {
  margin-bottom: 0;
}
.cex-label {
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  display: flex;
  align-items: center;
  gap: 4px;
}
.cex-required {
  color: #ef4444;
  font-weight: 700;
}
.cex-label-tip {
  font-size: 11px;
  font-weight: 400;
  color: #94a3b8;
  margin-left: 4px;
}

.cex-text-input {
  width: 100%;
  box-sizing: border-box;
  height: 36px;
  min-height: 36px !important;
  padding: 0 12px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text, #1e293b);
  background: #ffffff;
  transition: all 0.15s ease;
}
.cex-text-input:focus {
  border-color: var(--accent, #f7630c);
  outline: none;
  box-shadow: 0 0 0 3px rgba(247, 99, 12, 0.15);
}

/* 动力学与器械下拉框 (Fluent 2 专属风格，彻底消除原生丑陋小三角) */
.cex-select-wrap {
  position: relative;
  width: 100%;
}
.cex-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  width: 100%;
  height: 36px;
  min-height: 36px !important;
  padding: 0 32px 0 12px;
  background-color: #ffffff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='none' stroke='%2364748b' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round' d='M2.5 4.5L6 8L9.5 4.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text, #1e293b);
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  transition: all 0.15s ease;
}
.cex-select:hover {
  border-color: var(--accent, #f7630c);
  background-color: #fbfbfb;
}
.cex-select:focus {
  border-color: var(--accent, #f7630c);
  outline: none;
  box-shadow: 0 0 0 3px rgba(247, 99, 12, 0.15);
}

/* 分段单选控件 (Segmented Pills) */
.cex-segmented-control {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: #f1f5f9;
  padding: 3px;
  border-radius: 6px;
  gap: 3px;
}
.cex-seg-btn {
  border: none;
  background: transparent;
  padding: 5px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: unset !important;
  height: 30px;
  user-select: none;
}
.cex-seg-btn:hover {
  color: #0f172a;
  background: rgba(255, 255, 255, 0.6);
}
.cex-seg-btn.is-active {
  background: #ffffff;
  color: var(--accent-ink, #943600);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  font-weight: 700;
}

/* 动作层级选择卡片 */
.cex-tier-chips {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 2px;
}
.cex-tier-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px 6px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #f8fafc;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
  gap: 2px;
  min-height: unset !important;
  user-select: none;
}
.cex-tier-btn:hover {
  border-color: #cbd5e1;
  background: #ffffff;
}
.cex-tier-btn.is-active {
  border-color: var(--accent, #f7630c);
  background: #fff8f3;
  box-shadow: 0 0 0 1px var(--accent, #f7630c);
}
.cex-tier-name {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text, #1e293b);
}
.cex-tier-desc {
  font-size: 10.5px;
  color: #94a3b8;
}
.cex-tier-btn.is-active .cex-tier-name {
  color: var(--accent-ink, #943600);
}
.cex-tier-btn.is-active .cex-tier-desc {
  color: var(--accent, #f7630c);
}

/* 解剖发力链配置模块 */
.cex-role-tabs {
  display: inline-flex;
  background: #f1f5f9;
  padding: 3px;
  border-radius: 6px;
  gap: 3px;
}
.cex-role-tab {
  border: none;
  background: transparent;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: unset !important;
  height: 28px;
  user-select: none;
}
.cex-role-tab:hover {
  color: #0f172a;
}
.cex-role-tab.is-active {
  background: #ffffff;
  color: var(--text, #0f172a);
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
.cex-role-tab[data-role="primary"].is-active {
  color: var(--accent-ink, #943600);
}
.cex-role-tab[data-role="secondary"].is-active {
  color: #15803d;
}

.cex-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 700;
  background: #e2e8f0;
  color: #475569;
}
.cex-role-tab.is-active .cex-count-badge {
  background: var(--accent, #f7630c);
  color: #ffffff;
}
.cex-role-tab[data-role="secondary"].is-active .cex-count-badge {
  background: #16a34a;
}

.cex-selected-summary {
  min-height: 34px;
  padding: 6px 10px;
  border-radius: 6px;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  margin-bottom: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  font-size: 12px;
}
.cex-summary-empty {
  color: #94a3b8;
  font-size: 11.5px;
}
.cex-tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
}
.cex-tag-pri {
  background: #fff8f3;
  color: var(--accent-ink, #943600);
  border: 1px solid #fed7aa;
}
.cex-tag-sec {
  background: #f0fdf4;
  color: #15803d;
  border: 1px solid #bbf7d0;
}
.cex-tag-del {
  cursor: pointer;
  opacity: 0.6;
  font-size: 12px;
  line-height: 1;
}
.cex-tag-del:hover {
  opacity: 1;
}

.cex-bodypart-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid #f1f5f9;
}
.cex-part-pill {
  border: 1px solid transparent;
  background: #f1f5f9;
  color: #475569;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
  min-height: unset !important;
  height: 24px;
  user-select: none;
}
.cex-part-pill:hover {
  background: #e2e8f0;
  color: #1e293b;
}
.cex-part-pill.is-active {
  background: #1e293b;
  color: #ffffff;
}

.cex-anatomy-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  max-height: 250px;
  overflow-y: auto;
  padding-right: 4px;
}
.cex-anatomy-card {
  background: transparent;
  border: none;
  border-bottom: 1px solid #f1f5f9;
  border-radius: 0;
  padding: 6px 0 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.cex-anatomy-card.is-hidden {
  display: none !important;
}
.cex-card-head {
  font-size: 12px;
  font-weight: 700;
  color: #334155;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.cex-muscle-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.cex-muscle-chip {
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #334155;
  font-size: 11.5px;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.12s ease;
  user-select: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: unset !important;
}
.cex-muscle-chip:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
}
.cex-muscle-chip.is-primary {
  background: var(--accent, #f7630c) !important;
  border-color: var(--accent, #f7630c) !important;
  color: #ffffff !important;
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(247, 99, 12, 0.25);
}
.cex-muscle-chip.is-secondary {
  background: #16a34a !important;
  border-color: #16a34a !important;
  color: #ffffff !important;
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(22, 163, 74, 0.25);
}

.cex-error-banner {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
}

.cex-dialog-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line, #edebe9);
}
.cex-footer-status {
  font-size: 12px;
  color: #64748b;
  font-weight: 500;
}
.cex-footer-actions {
  display: flex;
  gap: 10px;
}

/* 容量预检弹窗 */
.volume-header, .volume-legend { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; }
.volume-header { justify-content: space-between; }
.volume-header .quiet { margin-top: 3px; }

/* 容量预检弹窗轮次控制器（扁平去框，对齐海报风格） */
.volume-controls-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin: 12px 0 0;
  padding: 0 0 12px;
  background: transparent;
  border: none;
  border-bottom: 1.5px solid var(--accent);
  border-radius: 0;
}
.volume-round-selector-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.vol-control-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted, #64748b);
  letter-spacing: 0.2px;
}
.volume-round-segmented {
  display: inline-flex;
  background: #e2e8f0;
  padding: 3px;
  border-radius: 6px;
  gap: 3px;
}
.vol-round-pill {
  border: none;
  background: transparent;
  color: #475569;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
  min-height: unset !important;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.vol-round-pill:hover {
  background: rgba(255, 255, 255, 0.65);
  color: var(--text, #0f172a);
}
.vol-round-pill.is-active {
  background: var(--accent, #f7630c);
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 1px 4px rgba(247, 99, 12, 0.25);
}

.fluent-select-styled {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  height: 30px;
  min-height: 30px !important;
  padding: 0 28px 0 10px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
  background-color: #ffffff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='none' stroke='%2364748b' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' d='M2.5 4.5L6 8L9.5 4.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  cursor: pointer;
  transition: all 0.15s ease;
}
.fluent-select-styled:hover {
  border-color: var(--accent);
  background-color: #f8fafc;
}
.fluent-select-styled:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 3px rgba(247, 99, 12, 0.15);
}

.volume-caliber-tag { font-size: 12px; color: var(--muted); background: transparent; padding: 0; border: none; }
.volume-legend { margin-bottom: 12px; color: var(--muted); font-size: 12px; }
.volume-legend > span { display: inline-flex; gap: 4px; align-items: center; }
.volume-legend > span:last-child { margin-left: auto; }
.volume-legend i { width: 10px; height: 10px; border-radius: 2px; }

/* 容量预检：15大肌群三列无框双轨矩阵（对齐导出大图 3x5 排布） */
.volume-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px 22px;
  margin-bottom: 6px;
}
.volume-card {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 6px 0 8px;
  border-bottom: 1px solid #f0f0f0;
}
.volume-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.volume-card-head strong {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
}
.volume-card-right {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.volume-card-meta {
  display: flex;
  justify-content: space-between;
  font-size: 10.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}
.volume-card-meta .is-mav {
  color: #3B6D11;
  font-weight: 600;
}
@media (max-width: 960px) {
  .volume-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 18px;
  }
}
@media (max-width: 600px) {
  .volume-grid {
    grid-template-columns: 1fr;
  }
}
.volume-dual-tracks { display: flex; flex-direction: column; gap: 4px; width: 100%; }
.volume-bar-upper { position: relative; height: 8px; border-radius: 4px; background: #f1f5f9; overflow: hidden; width: 100%; }
.volume-bar-actual { position: absolute; top: 0; bottom: 0; left: 0; border-radius: 4px; z-index: 4; display: flex; overflow: hidden; height: 100%; }
.volume-track-lower { position: relative; height: 8px; border-radius: 4px; overflow: hidden; background: #f1f5f9; width: 100%; }
.volume-zone-adap { position: absolute; top: 0; bottom: 0; background: #E6F7F0; z-index: 1; }
.volume-zone-mav { position: absolute; top: 0; bottom: 0; background: #C0DD97; z-index: 1; }
.volume-zone-fatigue { position: absolute; top: 0; bottom: 0; background: #FFE7BA; z-index: 1; }
.volume-zone-mrv { position: absolute; top: 0; bottom: 0; background: #FCEBEB; z-index: 1; }
.volume-marker { display: none; }
.volume-direct { background: var(--accent); height: 100%; }
.volume-assist { background: #fed7aa; height: 100%; }
.volume-value { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; font-size: 13px; color: var(--text); }
.volume-badge { display: inline-flex; justify-content: center; align-items: center; padding: 2px 6px; border-radius: 4px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.volume-badge.mav { background: #EAF3DE; color: #3B6D11; }
.volume-badge.adaptive { background: #E6F7F0; color: #007A5E; }
.volume-badge.fatigue { background: #FFF7E6; color: #D46B08; }
.volume-badge.mrv { background: #FCEBEB; color: #A32D2D; }
.volume-badge.mev { background: #F3F2F1; color: #616161; }

/* ========================================================
   动作图谱全屏独立工作台 (Exercises Catalog Workstation)
   遵循 E:\X_Program\fitness-app Fluent 2 浅色纯净规范
   ======================================================== */
.catalog-workspace-container {
  width: min(1160px, 100%);
  margin: 0 auto;
  padding: 18px 20px 60px;
}

/* 编排上下文中的提示条 */
.cat-context-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  background: #fff8f3;
  border: 1px solid #fbd2b9;
  border-radius: 8px;
  padding: 10px 16px;
  margin-bottom: 16px;
  box-shadow: 0 2px 6px rgba(247, 99, 12, 0.05);
}
.cat-context-info {
  display: flex;
  align-items: center;
  gap: 8px;
}
.cat-context-icon {
  font-size: 18px;
}

/* 双栏工作台布局 */
.cat-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 20px;
  position: relative;
  align-items: start;
}
@media (max-width: 960px) {
  .cat-layout {
    grid-template-columns: 1fr;
  }
}

/* 左侧分类侧边栏（去卡片外框，改为单边细线分栏） */
.cat-sidebar {
  background: transparent;
  border: none;
  border-right: 1px solid var(--line);
  border-radius: 0;
  padding: 2px 18px 16px 0;
  box-shadow: none;
  position: sticky;
  top: 18px;
  max-height: calc(100vh - 100px);
  display: flex;
  flex-direction: column;
}
.cat-sidebar-header {
  margin-bottom: 12px;
}
.cat-sidebar-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--muted);
  letter-spacing: 0.5px;
  margin-bottom: 8px;
  display: block;
}
.cat-view-segmented {
  display: flex;
  background: #f1f5f9;
  border-radius: 6px;
  padding: 2px;
  gap: 2px;
  border: 1px solid #e2e8f0;
}
.cat-view-btn {
  flex: 1;
  border: none;
  background: transparent;
  padding: 6px 4px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
}
.cat-view-btn:hover {
  color: var(--text);
}
.cat-view-btn.is-active {
  background: #fff;
  color: var(--accent-ink);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
.cat-nav-tree {
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-right: 2px;
}
.cat-nav-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.12s ease;
}
.cat-nav-item:hover {
  background: var(--surface-soft, #f8fafc);
}
.cat-nav-item.is-active {
  background: var(--accent-soft, #fff1e7);
  color: var(--accent-ink);
  font-weight: 700;
}
.cat-nav-count {
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  background: #f1f5f9;
  padding: 1px 6px;
  border-radius: 10px;
}
.cat-nav-item.is-active .cat-nav-count {
  background: rgba(247, 99, 12, 0.16);
  color: var(--accent-ink);
}

/* 树状细分展开组 */
.cat-sub-nav-group {
  margin: 2px 0 6px 12px;
  padding-left: 8px;
  border-left: 2px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.cat-sub-nav-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 8px;
  border-radius: 4px;
  font-size: 12px;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.12s ease;
}
.cat-sub-nav-item:hover {
  background: #f1f5f9;
  color: var(--text);
}
.cat-sub-nav-item.is-active {
  background: #f1f5f9;
  color: var(--text);
  font-weight: 700;
}
.cat-sub-nav-item.is-active .cat-nav-count {
  background: #e2e8f0;
  color: var(--text);
}

/* 右侧动作主画卷 (Content) */
.cat-content {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.cat-toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
}
.cat-search-box {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
}
.cat-search-icon {
  position: absolute;
  left: 14px;
  font-size: 14px;
  color: var(--muted);
  pointer-events: none;
}
.cat-search-box input {
  width: 100%;
  height: 42px;
  padding: 0 38px 0 38px;
  font-size: 14px;
  border: 1px solid var(--control-line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  transition: all 0.15s ease;
}
.cat-search-box input:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 3px rgba(247, 99, 12, 0.12);
}
#cat-search-clear {
  position: absolute;
  right: 12px;
  border: none;
  background: #e2e8f0;
  color: #64748b;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  font-size: 13px;
  line-height: 18px;
  cursor: pointer;
  padding: 0;
}

/* 过滤器胶囊集合（去外框，用底部分割线收口） */
.cat-filters-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  background: transparent;
  border: none;
  border-bottom: 1px solid #f1f5f9;
  border-radius: 0;
  padding: 2px 0 12px;
}
.cat-filter-group {
  display: flex;
  align-items: center;
  gap: 8px;
}
.cat-filter-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}
.cat-pill-group {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.cat-pill-btn {
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.12s ease;
}
.cat-pill-btn:hover {
  border-color: #cbd5e1;
  background: #f1f5f9;
  color: var(--text);
}
.cat-pill-btn.is-active {
  background: #334155;
  color: #fff;
  border-color: #334155;
  font-weight: 600;
}

/* 状态与统计栏 */
.cat-stats-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 2px;
}
.cat-breadcrumb {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 6px;
}
.cat-stats-count {
  font-size: 12px;
  color: var(--muted);
}

/* 动作目录网格（彻底去卡片外框与阴影，改为无框底线目录） */
.cat-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 6px 28px;
}
.cat-card {
  background: transparent;
  border: none;
  border-bottom: 1px solid #ececec;
  border-radius: 0;
  padding: 14px 4px 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  box-shadow: none;
  transition: background 0.12s ease;
}
.cat-card:hover {
  background: #fafafa;
}
.cat-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}
.cat-card-titles {
  min-width: 0;
}
.cat-card-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.35;
  margin-bottom: 2px;
}
.cat-card-en {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cat-card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 6px 0;
}
.cat-card-badges .tag-tier {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  background: #fff1e7;
  color: #943600;
}
.cat-card-badges .tag-tier.tier-主项 {
  background: #fff1e7;
  color: #943600;
  font-weight: 700;
  border: 1px solid #fed7aa;
}
.cat-card-badges .tag-tier.tier-变式 {
  background: #fffbe6;
  color: #b45309;
  font-weight: 600;
  border: 1px solid #fef08a;
}
.cat-card-badges .tag-tier.tier-辅助项 {
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 600;
  border: 1px solid #bfdbfe;
}
.cat-card-badges .tag-tier.tier-肌肥大 {
  background: #f0fdf4;
  color: #15803d;
  font-weight: 600;
  border: 1px solid #bbf7d0;
}
.cat-card-badges .tag-pattern {
  background: #eff6ff;
  color: #1e40af;
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 4px;
}
.cat-card-badges .tag-equip {
  background: #f8fafc;
  color: #475569;
  border: 1px solid #e2e8f0;
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 4px;
}

/* ExRx 解剖信息（去嵌套灰框，纯文字清晰排版） */
.cat-anat-row {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 12px;
  background: transparent;
  padding: 2px 0;
  border-radius: 0;
  border: none;
}
.cat-anat-line {
  display: flex;
  align-items: baseline;
  gap: 8px;
  line-height: 1.45;
}
.cat-anat-label {
  font-size: 11px;
  font-weight: 600;
  color: #94a3b8;
  white-space: nowrap;
  min-width: 36px;
}
.cat-anat-val-target {
  font-weight: 600;
  color: var(--text);
}
.cat-anat-val-sec {
  color: var(--muted);
}

.cat-card-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: none;
  padding-top: 4px;
  margin-top: 2px;
}
.cat-btn-inspect {
  border: none;
  background: transparent;
  padding: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  cursor: pointer;
}
.cat-btn-inspect:hover {
  text-decoration: underline;
  color: var(--accent-hover);
}

/* 动作库详情已统一复用中部模态弹窗 (#exercise-detail-dialog) */

/* 动作详情抽屉/弹窗规格清单（扁平编辑风，对齐海报） */
.ex-spec-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(115px, 1fr));
  gap: 10px 16px;
  margin-bottom: 22px;
  background: transparent;
  padding: 0 0 14px;
  border-radius: 0;
  border: none;
  border-bottom: 1px solid var(--line);
}
.ex-spec-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.ex-spec-label {
  font-size: 11px;
  color: var(--muted);
  font-weight: 500;
}
.ex-spec-val {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.ex-drawer-section-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--accent);
  padding-bottom: 6px;
  margin-bottom: 10px;
  border-bottom: 1.5px solid var(--accent);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ExRx 发力链规格行列表（去外框） */
.ex-anatomy-list {
  display: flex;
  flex-direction: column;
  border: none;
  border-radius: 0;
  overflow: hidden;
  background: transparent;
  margin-bottom: 20px;
}
.ex-anatomy-row {
  display: grid;
  grid-template-columns: 140px 1fr auto;
  align-items: baseline;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid #f1f5f9;
}
.ex-anatomy-row:last-child {
  border-bottom: none;
}
.ex-anatomy-row-role {
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--text);
}
.ex-anatomy-row-role.target { color: #166534; }
.ex-anatomy-row-role.synergist { color: #1e40af; }
.ex-anatomy-row-role.dyn-stab { color: #c2410c; }
.ex-anatomy-row-role.stab { color: #475569; }

.ex-anatomy-row-muscles {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.5;
}
.ex-anatomy-row-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 4px;
  white-space: nowrap;
}
.ex-anatomy-row-badge.target { background: #dcfce7; color: #15803d; }
.ex-anatomy-row-badge.synergist { background: #dbeafe; color: #1d4ed8; }
.ex-anatomy-row-badge.dyn-stab { background: #ffedd5; color: #9a3412; }
.ex-anatomy-row-badge.stab { background: #f1f5f9; color: #64748b; }

.ex-instructions-box {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 4px 0 8px;
  font-size: 13px;
  line-height: 1.7;
  color: #334155;
  white-space: pre-line;
  max-height: 220px;
  overflow-y: auto;
  margin-bottom: 20px;
}
.ex-drawer-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--line);
  padding-top: 14px;
  margin-top: auto;
}

.volume-axis { display: grid; grid-template-columns: 44px minmax(0, 1fr) 148px; gap: 8px 10px; align-items: center; color: var(--muted); font-size: 11px; margin-top: 4px; }
.volume-axis > div { display: flex; justify-content: space-between; border-top: 1px solid var(--line); padding-top: 3px; }
.volume-core { margin: 14px 0 10px; padding: 8px 10px; background: var(--surface-soft); border-radius: 6px; font-size: 13px; }

/* 8 大肌群 × 训练日 负荷热力图 */
.heatmap-section { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 14px; }
.heatmap-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.heatmap-header h4 { margin: 0; font-size: 14px; font-weight: 700; color: var(--text); }
.heatmap-legend { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--muted); }
.heatmap-legend span { display: inline-flex; align-items: center; gap: 4px; }
.heatmap-legend i { width: 12px; height: 12px; border-radius: 2px; }

.heatmap-scroll { width: 100%; overflow-x: auto; border: none; border-radius: 0; background: transparent; }
.heatmap-table { width: 100%; border-collapse: separate; border-spacing: 4px; font-size: 12px; text-align: center; }
.heatmap-table th, .heatmap-table td { padding: 6px 6px; border: none; border-radius: 4px; white-space: nowrap; }
.heatmap-table th { background: transparent; color: var(--muted); font-weight: 600; font-size: 11px; }
.heatmap-table th.hm-day-col { min-width: 64px; }
.heatmap-table th.hm-rest-col { background: transparent; color: #94a3b8; }
.heatmap-table td.hm-muscle-label { text-align: left; font-weight: 700; color: var(--text); background: transparent; width: 56px; }

.hm-cell { position: relative; font-variant-numeric: tabular-nums; font-size: 12px; }
.hm-cell.hm-empty { color: #d0d0d0; background: #fff; }
.hm-cell.hm-rest { color: #a0a0a0; background: #f8f8f8; font-size: 11px; }
.hm-cell.hm-active { font-weight: 600; cursor: default; }
.hm-cell.level-light { background: #FFF0E6; color: #D4380D; border-color: #FFD8BF; }
.hm-cell.level-med { background: #FF8533; color: #FFFFFF; border-color: #E05300; }
.hm-cell.level-heavy { background: #D4380D; color: #FFFFFF; border-color: #B22800; }

@media (max-width: 560px) {
  .app-header { padding: 12px; }
  .app-container { padding: 14px 12px 36px; }
  #step-1, #step-2, #step-4, #planner-dialog { padding: 14px; }
  .volume-dialog-top { padding: 14px 14px 0; }
  #volume-content { padding: 12px 14px 16px; }
  .schedule-list-head { display: none; }
  .schedule-list > li.schedule-row { grid-template-columns: 56px 48px minmax(0, 1fr) 92px; padding: 8px 10px; }
  .day-notes-input, .day-notes-placeholder { grid-column: 1 / -1; }
  .round-matrix th, .round-matrix td { padding: 4px; }
  .round-matrix .round-head, .round-matrix .round-cell { width: 115px; min-width: 105px; }
  .round-matrix .round-head.is-editing, .round-matrix .round-cell.is-editing { width: 250px; min-width: 230px; }
}

/* 计划大图全景预览与海报样式 */
.export-dialog {
  width: min(1360px, 98vw);
  height: 94vh;
  max-height: 94vh;
  padding: 16px 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--text);
  box-shadow: 0 16px 40px rgb(0 0 0 / 18%);
  overflow: hidden;
  box-sizing: border-box;
}
.export-dialog[open] {
  display: flex;
  flex-direction: column;
}
.export-dialog-header {
  flex-shrink: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.export-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}
.export-dialog-body {
  margin-top: 10px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  background: #ffffff;
  padding: 0;
  display: block;
}

/* 导出海报实体（自适应宽度铺满屏幕，纯白底色，抗锯齿高精度渲染） */
.export-poster {
  width: 100%;
  box-sizing: border-box;
  background: #ffffff;
  color: var(--text);
  padding: 24px 20px 40px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
.poster-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 14px;
  margin-bottom: 22px;
}
.poster-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
  letter-spacing: -0.3px;
  line-height: 1.25;
}
.poster-meta-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}
.poster-meta-line strong {
  color: var(--accent);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.poster-meta-sep {
  color: #cbd5e1;
  user-select: none;
}
.poster-meta-dates {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.poster-positioning {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
  font-weight: 400;
  line-height: 1.5;
}

/* 扁平去框化章节结构：用标题下橙色分割线与留白建立杂志级层次 */
.poster-section {
  padding-bottom: 0;
  margin-bottom: 26px;
  border-bottom: none;
}
.poster-section:last-of-type {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}
.poster-section-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding-bottom: 7px;
  margin-bottom: 14px;
  border-bottom: 1.5px solid var(--accent);
}
.poster-section-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.2px;
}
.poster-section-subtitle {
  font-size: 12px;
  color: var(--muted);
  font-weight: 400;
}

/* 个人基础档案（扁平横排排版，无多余胶囊和框） */
.poster-profile-line {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  font-size: 13px;
  color: var(--text);
  line-height: 1.8;
  margin-bottom: 8px;
  padding: 4px 0;
}
.poster-profile-line .prof-item {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
}
.poster-profile-line .prof-item strong {
  color: var(--muted);
  font-weight: 500;
}
.poster-profile-line .prof-divider {
  color: var(--line);
  user-select: none;
}

/* 核心 1RM 基准：按 6 大动作模式分列工整排列 */
.poster-pattern-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  margin-top: 8px;
  background: #ffffff;
}
.poster-pattern-col {
  display: flex;
  flex-direction: column;
  border-right: 1px solid #f0f0f0;
  padding-right: 8px;
}
.poster-pattern-col:last-child {
  border-right: none;
  padding-right: 0;
}
.pat-col-head {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  padding-bottom: 5px;
  margin-bottom: 6px;
  border-bottom: 1.5px solid var(--accent);
  text-align: left;
}
.pat-items-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.pat-item {
  display: flex;
  flex-direction: column;
  font-size: 11.5px;
  line-height: 1.35;
}
.pat-item .pat-name {
  color: var(--muted);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pat-item .pat-val {
  color: var(--accent-ink);
  font-weight: 700;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.pat-empty {
  font-size: 12px;
  color: #cbd5e1;
  padding-top: 2px;
}

/* 周期日历图：去外框、竖线与顶部横线，纯白日期条对齐，休息日下方灰块与训练日橙块同宽 */
.poster-calendar-wrap {
  margin-bottom: 6px;
  border: none;
  background: #ffffff;
}
.cal-week-heads {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  text-align: center;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--muted);
  background: transparent;
  border-bottom: 1.5px solid #e2e8f0;
  margin-bottom: 6px;
}
.cal-week-heads > div {
  padding: 6px 4px;
  border: none;
}
.cal-grid-cells {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px 6px;
}
.cal-cell {
  background: #ffffff;
  border: none;
  min-height: 84px;
  padding: 5px 3px 7px;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-sizing: border-box;
}
.cal-cell.is-outside {
  opacity: 0.28;
  background: transparent;
}
.cal-cell.is-rest {
  background: #ffffff;
}
.cal-rest-block {
  width: 94%;
  flex: 1;
  background: #f8fafc;
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 500;
  color: #cbd5e1;
  letter-spacing: 1px;
  user-select: none;
}
.cal-date-num {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 3px;
  width: 20px;
  height: 20px;
  line-height: 20px;
  text-align: center;
  border-radius: 50%;
}
.cal-date-num.is-start {
  background: var(--accent);
  color: #ffffff;
}
.cal-badge-main {
  width: 94%;
  background: var(--accent);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  padding: 2.5px 2px;
  border-radius: 3px;
  border: none !important;
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cal-muscles-stack {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 94%;
}
/* 浅橙色肌群标签，彻底去除任何框线，完美契合系统暖橙主题 */
.cal-muscle-tag {
  background: var(--accent-soft, #fff1e7); /* 柔和浅橙底 */
  border: none !important; /* 彻底无框线 */
  color: var(--accent-ink, #943600); /* 深橙字，清晰易读 */
  font-size: 10px;
  font-weight: 600;
  text-align: center;
  padding: 2px 2px;
  border-radius: 2px;
  white-space: nowrap;
}

/* 9 大核心肌群周均容量：3x3 矩阵结构（上：实际容量条，下：MEV/MAV/MRV 标尺轨） */
.poster-volume-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px 18px;
  margin-top: 6px;
}
.poster-vol-item {
  padding: 4px 0 6px;
  border-bottom: 1px solid #f0f0f0;
}
.poster-vol-card-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 4px;
  font-size: 12px;
}
.poster-vol-card-head strong {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}
.poster-vol-card-head .vol-val {
  font-weight: 700;
  color: var(--accent-ink);
  font-variant-numeric: tabular-nums;
}

/* 条 1：实际做组容量条 */
.poster-vol-actual-track {
  position: relative;
  height: 8px;
  border-radius: 4px;
  background: #f1f5f9;
  overflow: hidden;
  margin-bottom: 4px;
}
.poster-vol-actual-bar {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  border-radius: 4px;
  display: flex;
  overflow: hidden;
}
.poster-vol-actual-bar .p-direct { background: var(--accent); height: 100%; }
.poster-vol-actual-bar .p-assist { background: var(--assist); height: 100%; }

/* 条 2：MEV / MAV / MRV 标尺轨（置于下方，与上条严格等高） */
.poster-vol-scale-track {
  position: relative;
  height: 8px;
  border-radius: 4px;
  background: #f1f5f9;
  overflow: hidden;
  margin-bottom: 4px;
}
.poster-vol-scale-track .scale-seg-adap {
  position: absolute;
  top: 0;
  bottom: 0;
  background: #e6f7f0;
}
.poster-vol-scale-track .scale-seg-mav {
  position: absolute;
  top: 0;
  bottom: 0;
  background: #c0dd97;
}
.poster-vol-scale-track .scale-seg-fatigue {
  position: absolute;
  top: 0;
  bottom: 0;
  background: #ffe7ba;
}
.poster-vol-scale-track .scale-seg-mrv {
  position: absolute;
  top: 0;
  bottom: 0;
  background: #fcebeb;
}
.poster-vol-scale-track .scale-line-mark {
  display: none;
}

.poster-vol-card-meta {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--muted);
  line-height: 1;
}

/* 导出大图专用：肌群训练密度与间隔分布热力图（无横向滚动截断，印刷级紧凑排布） */
.poster-hm-legend {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  color: var(--muted);
}
.poster-hm-legend span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.poster-hm-legend i {
  display: inline-block;
  width: 11px;
  height: 11px;
  border-radius: 2px;
}
.poster-heatmap-wrap {
  width: 100%;
  border: none;
  background: #ffffff;
}
.poster-heatmap-table {
  width: calc(100% + 8px);
  margin: -4px -4px 0;
  border-collapse: separate;
  border-spacing: 4px;
  table-layout: fixed;
  font-size: 11.5px;
  text-align: center;
}
.poster-heatmap-table th,
.poster-heatmap-table td {
  padding: 6px 2px;
  border: none;
  vertical-align: middle;
}
.poster-heatmap-table th {
  background: transparent;
  color: var(--text);
  font-weight: 700;
  font-size: 11.5px;
  padding: 2px 2px 6px;
  white-space: nowrap;
}
.poster-heatmap-table th.phm-day-head {
  width: 128px;
  text-align: left;
  padding-left: 4px;
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
}
.vol-heatmap-table {
  min-width: 980px;
}
.poster-heatmap-table td.phm-day-label {
  text-align: left;
  padding: 6px 8px 6px 4px;
  background: transparent;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.phm-day-idx {
  display: inline-block;
  min-width: 24px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.phm-day-name {
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  margin-left: 4px;
}
.poster-heatmap-table td.phm-day-label.is-rest .phm-day-idx,
.poster-heatmap-table td.phm-day-label.is-rest .phm-day-name {
  color: #94a3b8;
  font-weight: 500;
}
.phm-cell {
  border-radius: 4px;
  font-variant-numeric: tabular-nums;
  font-size: 11.5px;
  line-height: 1.25;
}
.phm-cell.phm-empty {
  color: #cbd5e1;
  background: #f8fafc;
}
.phm-cell.phm-rest {
  color: #cbd5e1;
  background: #f8fafc;
  font-size: 10.5px;
}
.phm-cell.phm-active {
  font-weight: 700;
}
.phm-cell.level-light {
  background: #FFF0E6;
  color: #D4380D;
}
.phm-cell.level-med {
  background: #FF8533;
  color: #FFFFFF;
}
.phm-cell.level-heavy {
  background: #D4380D;
  color: #FFFFFF;
}
.poster-empty-hint {
  font-size: 12px;
  color: var(--muted);
  padding: 10px 0;
}

/* 完整计划紧凑矩阵：学术三线表（去外框与竖线，极淡横线分隔，内容严格上下居中） */
.poster-day-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
  margin: 18px 0 8px;
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.poster-day-title .day-notes {
  font-size: 12px;
  color: var(--muted);
  font-weight: 400;
}
.poster-matrix-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  border: none;
  margin-bottom: 18px;
  background: #ffffff;
}
.poster-matrix-table th, .poster-matrix-table td {
  border: none;
  padding: 10px 10px;
  vertical-align: middle !important; /* 强制严格上下垂直居中 */
  text-align: center;
}
.poster-matrix-table th {
  background: var(--surface-soft);
  color: var(--text);
  font-weight: 700;
  padding: 9px 8px;
  font-size: 12px;
  border-bottom: 1.5px solid #cbd5e1;
}
.poster-matrix-table tbody td {
  border-bottom: 1px solid #f1f5f9;
}
.poster-matrix-table th:first-child {
  text-align: left;
  padding-left: 14px;
}
.poster-matrix-table td.td-ex {
  width: 230px;
  text-align: left;
  padding-left: 14px;
  vertical-align: middle !important;
}
.poster-matrix-table td.td-ex strong {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.35;
  margin-bottom: 2px;
}
.poster-matrix-table td.td-ex span.meta {
  display: block;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.25;
}

/* 导出海报：学术级上标脚注体系 (Footnotes System) */
.poster-fn-sup {
  font-size: 10px;
  font-weight: 700;
  color: var(--accent, #f7630c);
  margin-left: 2px;
  vertical-align: super;
  line-height: 0;
}
.poster-fn-sup-alt {
  font-size: 10px;
  font-weight: 700;
  color: #d97706;
  margin-left: 2px;
  vertical-align: super;
  line-height: 0;
}

.poster-day-footnotes {
  margin-top: 6px;
  padding: 6px 14px 2px;
  background: transparent;
  border-top: 1px dashed #e2e8f0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.poster-fn-item {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-size: 11px;
  line-height: 1.4;
  color: #64748b;
}
.poster-fn-mark {
  font-weight: 700;
  color: var(--accent-ink, #943600);
  font-size: 10.5px;
  flex-shrink: 0;
  font-family: var(--font);
}
.poster-fn-text {
  color: #475569;
}
.poster-matrix-table td.td-rx {
  text-align: center;
  vertical-align: middle !important;
  padding: 8px 6px;
}
.rx-block {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: center;
  justify-content: center;
  line-height: 1.45;
}
.rx-line {
  display: block;
  font-size: 12px;
  color: var(--text);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.rx-line.is-top {
  font-weight: 700;
  color: var(--accent-ink);
}
.rx-line.is-backoff {
  color: #334155;
  font-weight: 500;
}
.poster-matrix-table tr:hover td {
  background: #fafafa;
}

.poster-footer {
  text-align: center;
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 18px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

/* ==========================================================================
   步骤三智能吸顶控制条（轮次页签与本轮日程托盘一体式包含设计）
   ========================================================================== */
.planner-sticky-bar {
  position: sticky;
  top: 49px;
  z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: none;
  padding: 8px 0 6px;
  margin-bottom: 16px;
}
.sticky-bar-top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px 16px;
  border-bottom: 1px solid #e2e8f0;
}
.sticky-bar-rounds {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: flex-end;
  gap: 10px;
}
.sticky-bar-tag {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  padding-bottom: 9px;
  flex-shrink: 0;
}
.sticky-bar-right {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-bottom: 6px;
  flex-shrink: 0;
}
.sticky-bar-days-tray {
  background: transparent;
  border: none;
  border-bottom: 1px solid #f1f5f9;
  border-radius: 0;
  padding: 2px 0 0;
}
.sticky-day-nav {
  margin: 0;
}
.sticky-day-nav .day-tab {
  min-height: 40px;
}
@media (max-width: 720px) {
  .sticky-bar-top {
    flex-direction: column;
    align-items: stretch;
  }
  .sticky-bar-right {
    justify-content: flex-end;
    padding-bottom: 0;
  }
}

/* ==========================================================================
   动作分段头部操作区与移除轻量确认气泡
   ========================================================================== */
.exercise-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 2px;
  background: transparent;
  cursor: pointer;
  user-select: none;
  border-radius: 4px;
}
.exercise-summary:hover {
  background: #fafafa;
}
.ex-summary-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  flex: 1;
  min-width: 0;
}
.ex-summary-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 10px;
  position: relative;
}
.ex-summary-actions .btn {
  opacity: 0.45;
  transition: opacity 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.exercise-item:hover .ex-summary-actions .btn,
.exercise-item:focus-within .ex-summary-actions .btn {
  opacity: 1;
}
.ex-btn-shift {
  color: var(--muted) !important;
  border: 1px solid transparent !important;
  background: transparent !important;
  padding: 2px 5px !important;
  min-height: 26px !important;
  height: 26px !important;
  font-size: 12px !important;
  border-radius: 4px !important;
}
.ex-btn-shift:hover {
  background: #f1f5f9 !important;
  color: var(--text) !important;
}
.ex-btn-replace {
  color: var(--accent-ink, #943600) !important;
  background: transparent !important;
  border: 1px solid transparent !important;
  padding: 2px 8px !important;
  min-height: 26px !important;
  height: 26px !important;
  font-size: 12px !important;
  border-radius: 4px !important;
  font-weight: 600 !important;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  transition: all 0.15s ease;
}
.ex-btn-replace:hover {
  background: #fff1e7 !important;
  border-color: #fed7aa !important;
  color: var(--accent, #f7630c) !important;
}
.ex-btn-remove {
  color: #e11d48 !important;
  background: transparent !important;
  border: 1px solid transparent !important;
  padding: 2px 8px !important;
  min-height: 26px !important;
  height: 26px !important;
  font-size: 12px !important;
  border-radius: 4px !important;
  font-weight: 600 !important;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  transition: all 0.15s ease;
}
.ex-btn-remove:hover {
  background: #ffe4e6 !important;
  border-color: #fecdd3 !important;
}

/* 移除轻量微气泡二次确认 (Fluent 2 浅色规范) */
.ex-remove-popover {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 100;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 175px;
  white-space: nowrap;
  animation: popoverFadeIn 0.15s ease;
}
@keyframes popoverFadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}
.ex-remove-popover-msg {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
}
.ex-remove-popover-btns {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}
.ex-btn-confirm-del {
  background: #e11d48 !important;
  color: #fff !important;
  border-color: #e11d48 !important;
  font-size: 11px !important;
  padding: 2px 8px !important;
  min-height: 24px !important;
  height: 24px !important;
}
.ex-btn-confirm-del:hover {
  background: #be123c !important;
}

/* 只读 1RM 胶囊徽章 (点击平滑跳转步骤一) */
.ex-1rm-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  background: #fff1e7;
  color: #943600;
  border: 1px solid #ffd8bf;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}
.ex-1rm-badge:hover {
  background: #ffe6d5;
  border-color: #ffbb96;
  color: #7c2d00;
}
.ex-1rm-badge.empty {
  background: #f8fafc;
  color: #64748b;
  border-color: #e2e8f0;
}
.ex-1rm-badge.empty:hover {
  background: #f1f5f9;
  color: var(--text);
  border-color: #cbd5e1;
}

/* 动作卡片候选池状态徽章与多候选控制栏 (Fluent 2 规范) */
.ex-candidates-badge {
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #334155;
  cursor: default;
}
.ex-round-alt-badge {
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  background: #fff8f3;
  border: 1px solid #fed7aa;
  color: var(--accent-ink, #943600);
}
.round-alt-ex-title {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-ink, #943600);
  background: #fff8f3;
  border: 1px solid #fed7aa;
  border-radius: 3px;
  padding: 1px 4px;
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 125px;
}

.ex-candidates-bar {
  margin: 4px 0 10px;
  padding: 8px 12px;
  background: #fafafa;
  border: none;
  border-left: 2px solid var(--accent-line);
  border-radius: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cand-bar-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: #334155;
}
.cand-bar-tip {
  font-size: 11px;
  font-weight: 400;
  color: #64748b;
}

.cand-pills-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.cand-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #334155;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}
.cand-chip:hover {
  border-color: var(--accent, #f7630c);
  background: #fbfbfb;
}
.cand-chip.is-active {
  background: var(--accent, #f7630c);
  border-color: var(--accent, #f7630c);
  color: #ffffff;
  box-shadow: 0 1px 4px rgba(247, 99, 12, 0.25);
}
.cand-chip-icon {
  font-size: 11px;
  line-height: 1;
}
.cand-chip-name {
  line-height: 1.2;
}
.cand-chip-role {
  font-size: 10px;
  background: rgba(255, 255, 255, 0.25);
  padding: 1px 4px;
  border-radius: 3px;
  margin-left: 2px;
}
.cand-chip-main-tag {
  font-size: 10px;
  opacity: 0.7;
  margin-left: 2px;
}
.cand-chip-del {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  min-height: 16px !important;
  padding: 0 !important;
  border: none !important;
  border-radius: 50%;
  background: transparent;
  color: #943600;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  margin-left: 2px;
}
.cand-chip-del:hover {
  background: rgba(0, 0, 0, 0.08);
  color: #ef4444;
}
.cand-chip.is-active .cand-chip-del {
  color: rgba(255, 255, 255, 0.85);
}
.cand-chip.is-active .cand-chip-del:hover {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}
.cand-add-btn {
  height: 28px !important;
  min-height: 28px !important;
  padding: 2px 10px !important;
  font-size: 11.5px !important;
  border-style: dashed !important;
}

.cand-sync-tip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 5px 8px;
  background: #fff8f3;
  border: 1px solid #fed7aa;
  border-radius: 4px;
  font-size: 11.5px;
  color: var(--accent-ink, #943600);
}
.cand-sync-all-btn {
  height: 24px !important;
  min-height: 24px !important;
  padding: 1px 8px !important;
  font-size: 11px !important;
  background: #ffffff !important;
  border: 1px solid #fdba74 !important;
  color: var(--accent-ink, #943600) !important;
  font-weight: 600 !important;
}
.cand-sync-all-btn:hover {
  background: var(--accent, #f7630c) !important;
  border-color: var(--accent, #f7630c) !important;
  color: #ffffff !important;
}

/* ==========================================================================
   轮次停练 / 减量跳过样式 (Deload Skip)
   ========================================================================== */
.round-head-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 4px;
  margin-bottom: 4px;
}
.round-btn-skip {
  font-size: 10.5px;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--control-line);
  border-radius: 4px;
  padding: 1px 4px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}
.round-btn-skip:hover {
  background: #fff1e7;
  color: var(--accent);
  border-color: #ffd8bf;
}
.round-cell.is-skipped {
  background: #f8fafc !important;
  opacity: 0.65;
}
.round-skip-notice {
  font-size: 11.5px;
  color: var(--muted);
  padding: 10px 4px;
  text-align: center;
  font-style: italic;
  line-height: 1.4;
}

/* ==========================================================================
   步骤三内联右侧抽屉：动作直选面板 (Drawer 宽 520px，原地选动作，0 割裂感)
   ========================================================================== */
.planner-inline-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1000;
  display: flex;
  justify-content: flex-end;
}
.planner-drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.planner-drawer-panel {
  position: relative;
  width: min(520px, 92vw);
  height: 100%;
  background: #ffffff;
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.12);
  display: flex;
  flex-direction: column;
  z-index: 2;
  animation: drawerSlideIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.planner-drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}
.planner-drawer-lock-banner {
  padding: 8px 20px;
  background: #fff8f3;
  border-bottom: 1px solid #fed7aa;
  font-size: 12px;
  color: var(--accent-ink, #943600);
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
}
.drawer-close-circle {
  width: 28px;
  height: 28px;
  min-height: unset !important;
  border-radius: 50% !important;
  padding: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 16px !important;
  border: 1px solid var(--line) !important;
  background: #f8fafc !important;
  color: var(--muted) !important;
}
.drawer-close-circle:hover {
  background: #f1f5f9 !important;
  color: var(--text) !important;
}
.planner-drawer-search {
  padding: 12px 20px 8px;
}
.planner-drawer-pills {
  display: flex;
  gap: 6px;
  padding: 0 20px 10px;
  overflow-x: auto;
}
.planner-drawer-pill {
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.12s ease;
}
.planner-drawer-pill:hover {
  background: #f1f5f9;
  color: var(--text);
}
.planner-drawer-pill.is-active {
  background: var(--accent);
  color: #fff;
  border-color: transparent;
}
.planner-drawer-list {
  flex: 1;
  overflow-y: auto;
  padding: 4px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.drawer-item-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 4px;
  border: none;
  border-bottom: 1px solid #f1f5f9;
  border-radius: 0;
  background: transparent;
  transition: background 0.12s ease;
}
.drawer-item-card:hover {
  background: #fafafa;
}
.drawer-item-info {
  flex: 1;
  min-width: 0;
  padding-right: 12px;
}
.drawer-item-name {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 3px;
}
.drawer-item-tags {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  font-size: 11px;
}

/* ==========================================================================
   动作投放至指定训练日选择浮层 (Day Picker Popover)
   ========================================================================== */
.day-picker-popover {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.day-picker-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.day-picker-card {
  position: relative;
  width: min(390px, 92vw);
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.14);
  padding: 16px 18px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 10px;
  animation: popoverFadeIn 0.15s ease;
}
.day-picker-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.day-picker-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}
.day-picker-close {
  background: none;
  border: none;
  font-size: 18px;
  color: var(--muted);
  cursor: pointer;
  padding: 0;
}
.day-picker-sub {
  font-size: 12px;
  color: var(--muted);
  margin-top: -4px;
}
.day-picker-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 290px;
  overflow-y: auto;
}
.day-picker-btn {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 8px;
  border: none;
  border-bottom: 1px solid #f1f5f9;
  border-radius: 4px;
  background: transparent;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
  text-align: left;
}
.day-picker-btn:hover {
  background: var(--accent-soft);
  color: var(--accent-ink);
}
.day-picker-btn-day {
  font-size: 11px;
  color: var(--muted);
  font-weight: normal;
}

/* 编排页动作全量介绍弹窗与触发入口 */
.exercise-detail-modal {
  width: min(680px, calc(100% - 28px));
  max-height: 86vh;
  padding: 0;
  overflow: hidden;
}
.exercise-detail-modal[open] {
  display: flex;
  flex-direction: column;
}
.ex-modal-inner {
  display: flex;
  flex-direction: column;
  max-height: 86vh;
  padding: 22px 26px 18px;
  overflow-y: auto;
}
.ex-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}
.ex-modal-title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}
.ex-modal-sub {
  font-size: 13px;
  margin-top: 2px;
}
.ex-modal-close-btn {
  border-radius: 50% !important;
  width: 30px;
  height: 30px;
  min-height: unset !important;
  padding: 0 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.ex-name-trigger {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  border-radius: 4px;
  transition: color 0.15s ease;
}
.ex-name-trigger:hover {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.ex-name-info-icon {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  opacity: 0.72;
  transition: color 0.15s ease, opacity 0.15s ease;
}
.ex-name-trigger:hover .ex-name-info-icon,
.drawer-item-info.is-clickable:hover .ex-name-info-icon {
  color: var(--accent);
  opacity: 1;
}

.drawer-item-info.is-clickable {
  cursor: pointer;
  flex: 1;
  min-width: 0;
}
.drawer-item-info.is-clickable .drawer-item-name {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  transition: color 0.15s ease;
}
.drawer-item-info.is-clickable:hover .drawer-item-name {
  color: var(--accent);
}

.cand-chip-info {
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  line-height: 1;
  padding: 0 2px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease, background 0.15s ease;
}
.cand-chip-info:hover {
  color: var(--accent);
  background: rgba(15, 23, 42, 0.06);
}
.cand-chip.is-active .cand-chip-info {
  color: rgba(255, 255, 255, 0.85);
}
.cand-chip.is-active .cand-chip-info:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
}

/* =============================================================================
   用户系统与顶部登出样式 (Auth & Top Bar User Profile)
   ============================================================================= */
.header-user-area {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-profile-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 600;
  color: #1e293b;
}

.user-avatar-circle {
  font-size: 14px;
  line-height: 1;
}

.user-display-name {
  max-width: 130px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#btn-logout {
  padding: 5px 12px;
  font-size: 13px;
  font-weight: 500;
  border-radius: 6px;
  color: #64748b;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  cursor: pointer;
  transition: all 0.15s ease;
}
#btn-logout:hover {
  background: #fef2f2;
  border-color: #fecaca;
  color: #ef4444;
}

.badge-custom {
  display: inline-flex;
  align-items: center;
  background: #fef3c7;
  border: 0.5px solid #f59e0b;
  color: #92400e;
  font-size: 11px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 4px;
  margin-left: 6px;
  vertical-align: middle;
}

.btn-del-custom {
  background: transparent;
  border: none;
  color: #ef4444;
  font-size: 12px;
  cursor: pointer;
  text-decoration: underline;
  padding: 2px 4px;
  margin-left: 8px;
  transition: color 0.15s ease;
}
.btn-del-custom:hover {
  color: #b91c1c;
}

/* ==========================================================================
   多训练计划管理 (Multi-Plan System) 极简杂志风样式
   ========================================================================== */

/* 第二行：训练计划与动作工具栏 */
.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.app-subbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 16px;
  min-height: 46px;
  padding: 8px 0 10px 0;
  border-top: 1px solid var(--line);
}

.subbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.subbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* 极简杂志风计划选择器（纯文字排版式交互，无卡片框体残留） */
.header-plan-picker {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.plan-picker-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  user-select: none;
}

.plan-picker-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: none;
  padding: 4px 6px;
  border-radius: 4px;
  cursor: pointer;
  font-family: inherit;
  color: var(--text);
  transition: all 0.15s ease;
  user-select: none;
  max-width: 320px;
  text-align: left;
}

.plan-picker-trigger:hover {
  background: var(--surface-soft);
}

.plan-picker-name {
  font-size: 15px;
  font-weight: 750;
  color: var(--text);
  letter-spacing: -0.25px;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border-bottom: 1.5px dashed var(--control-line);
  padding-bottom: 1px;
  transition: color 0.15s ease, border-bottom-color 0.15s ease;
}

.plan-picker-trigger:hover .plan-picker-name {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.header-plan-picker.is-open .plan-picker-name {
  color: var(--accent-ink);
  border-bottom-color: var(--accent);
}

.plan-picker-meta {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
  margin-left: 2px;
}

.plan-picker-arrow {
  color: var(--muted);
  flex-shrink: 0;
  transition: transform 0.2s ease, color 0.15s ease;
}

.plan-picker-trigger:hover .plan-picker-arrow {
  color: var(--accent);
}

.header-plan-picker.is-open .plan-picker-arrow {
  transform: rotate(180deg);
  color: var(--accent);
}

/* 下拉菜单面板 */
.plan-picker-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 320px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
  z-index: 1200;
  overflow: hidden;
  animation: pickerDropIn 0.18s ease-out;
}

@keyframes pickerDropIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.plan-picker-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: #fafafa;
  border-bottom: 1px solid var(--line);
}

.plan-picker-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.plan-picker-new-btn {
  background: var(--accent);
  color: #ffffff;
  border: none;
  border-radius: 4px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease;
}

.plan-picker-new-btn:hover {
  background: var(--accent-hover);
}

.plan-picker-list {
  max-height: 260px;
  overflow-y: auto;
  padding: 4px 0;
}

.plan-picker-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 14px;
  cursor: pointer;
  transition: background 0.12s ease;
  border-left: 3px solid transparent;
}

.plan-picker-item:hover {
  background: #f8f9fa;
}

.plan-picker-item.is-active {
  background: var(--accent-soft);
  border-left-color: var(--accent);
}

.plan-picker-item-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
  padding-right: 8px;
}

.plan-picker-item-name {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.plan-picker-item.is-active .plan-picker-item-name {
  color: var(--accent-ink);
}

.plan-picker-item-sub {
  font-size: 11.5px;
  color: var(--muted);
}

.plan-picker-item-check {
  color: var(--accent);
  font-weight: 700;
  font-size: 14px;
}

.plan-picker-footer {
  padding: 9px 14px;
  background: #fafafa;
  border-top: 1px solid var(--line);
  text-align: center;
}

.plan-picker-manage-btn {
  background: transparent;
  border: none;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 4px;
  transition: background 0.15s ease;
}

.plan-picker-manage-btn:hover {
  background: #ebebeb;
}

/* 新建计划向导弹窗卡片样式 */
.plan-create-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin: 16px 0;
}

.plan-create-card {
  border: 1.5px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  cursor: pointer;
  background: #ffffff;
  transition: all 0.18s ease;
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
}

.plan-create-card:hover {
  border-color: var(--accent-line);
  background: #fafafa;
}

.plan-create-card.is-selected {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 0 0 1px var(--accent);
}

.plan-create-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.plan-create-card-icon {
  font-size: 20px;
}

.plan-create-card-title {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text);
}

.plan-create-card.is-selected .plan-create-card-title {
  color: var(--accent-ink);
}

.plan-create-card-desc {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
  margin: 0;
}

/* 管理计划卡片弹窗列表 */
.plan-manager-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: 65vh;
  overflow-y: auto;
  padding: 4px 2px;
}

.plan-manager-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.plan-manager-summary {
  font-size: 13px;
  color: var(--muted);
}

.plan-manager-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 16px;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.plan-manager-card:hover {
  border-color: var(--control-line);
}

.plan-manager-card.is-current {
  border-color: var(--accent);
  background: #fffdfb;
}

.plan-manager-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.plan-manager-card-titlewrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.plan-manager-card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.plan-manager-card-tag {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 4px;
}

.plan-manager-card-tag.is-active {
  background: var(--accent-soft);
  color: var(--accent-ink);
  border: 1px solid var(--accent-line);
}

.plan-manager-card-tag.is-draft {
  background: #f1f3f5;
  color: #495057;
}

.plan-manager-card-desc {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.4;
  margin: 0;
}

.plan-manager-card-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 12px;
  color: var(--muted);
}

.plan-manager-card-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
}



