:root {
  --bg: #f4efe6;
  --bg-glow: rgba(218, 188, 131, 0.18);
  --paper: rgba(255, 251, 245, 0.94);
  --paper-strong: #fffdf8;
  --line: rgba(114, 95, 74, 0.14);
  --line-strong: rgba(114, 95, 74, 0.24);
  --text: #1d1712;
  --muted: #6f655b;
  --soft: #96887a;
  --gold: #b08a43;
  --gold-soft: rgba(176, 138, 67, 0.16);
  --sage: #7f9585;
  --sage-soft: rgba(127, 149, 133, 0.16);
  --rose: #c98b81;
  --rose-soft: rgba(201, 139, 129, 0.16);
  --shadow: 0 16px 40px rgba(77, 59, 33, 0.08);
  --radius: 8px;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at top left, var(--bg-glow), transparent 28%),
    linear-gradient(180deg, #f7f2ea 0%, var(--bg) 45%, #eee7dc 100%);
  font-family:
    "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei",
    sans-serif;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  padding: 28px 16px 48px;
}

.page {
  width: min(var(--max), 100%);
  margin: 0 auto;
  background: linear-gradient(180deg, rgba(255, 253, 248, 0.98), rgba(252, 247, 240, 0.97));
  border: 1px solid rgba(176, 138, 67, 0.24);
  border-radius: 16px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.page::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.page-inner {
  position: relative;
  padding: 26px 22px 28px;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(176, 138, 67, 0.18);
}

.brand h1 {
  margin: 0;
  font-size: clamp(2rem, 3vw, 3rem);
  line-height: 1;
  font-weight: 600;
  letter-spacing: -0.04em;
  font-family:
    "Iowan Old Style", "Palatino Linotype", "Songti SC", "STSong", serif;
  color: #5b4320;
}

.brand p {
  margin: 10px 0 0;
  max-width: 560px;
  color: var(--muted);
  font-size: 0.96rem;
  line-height: 1.7;
}

.topbar-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
}

.meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.52);
  color: var(--muted);
  font-size: 0.86rem;
}

.meta-chip strong {
  color: var(--text);
  font-weight: 600;
}

.credit-wallet {
  position: relative;
}

.credit-balance-button {
  cursor: pointer;
  font: inherit;
}

.credit-balance-button:hover {
  border-color: rgba(176, 138, 67, 0.45);
  background: rgba(255, 250, 239, 0.92);
}

.credit-panel {
  position: absolute;
  z-index: 20;
  top: calc(100% + 10px);
  right: 0;
  width: min(360px, calc(100vw - 32px));
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 252, 246, 0.98);
  box-shadow: 0 16px 42px rgba(94, 70, 33, 0.14);
}

.credit-panel-head,
.credit-transaction {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.credit-panel-head span,
.credit-panel-note {
  color: var(--muted);
  font-size: 0.78rem;
}

.credit-balance-large {
  margin: 12px 0;
  color: #8b672a;
  font-size: 2rem;
  font-weight: 700;
}

.credit-balance-large small {
  font-size: 0.9rem;
  font-weight: 500;
}

.credit-redeem-row {
  display: flex;
  gap: 8px;
}

.credit-redeem-row input {
  min-width: 0;
  flex: 1;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 11px;
  background: #fffdf9;
  color: var(--text);
  font: inherit;
}

.credit-redeem-row .button-primary {
  padding: 0 14px;
  white-space: nowrap;
}

.credit-panel-note {
  margin-top: 10px;
  line-height: 1.6;
}

.credit-transactions {
  display: grid;
  gap: 8px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(176, 138, 67, 0.16);
}

.credit-transaction {
  color: var(--muted);
  font-size: 0.8rem;
}

.credit-transaction b {
  color: #6f8d58;
  font-weight: 600;
}

.credit-transaction b.is-minus {
  color: #9a6657;
}

.secret-trigger {
  border: 1px solid rgba(176, 138, 67, 0.2);
  background: rgba(255, 253, 248, 0.72);
  color: #7d705e;
  transition:
    border-color 180ms ease,
    color 180ms ease,
    background 180ms ease;
}

.secret-trigger:hover {
  border-color: rgba(176, 138, 67, 0.42);
  color: #5b4320;
}

.module {
  margin-top: 14px;
  padding: 16px;
  border: 1px solid rgba(176, 138, 67, 0.14);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(255, 251, 245, 0.92));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.module-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: start;
  margin-bottom: 14px;
}

.module-badge {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(180deg, #caa45b, #b1853f);
  color: #fffdf7;
  font-weight: 700;
  font-size: 0.84rem;
  letter-spacing: 0.06em;
}

.module-title h2 {
  margin: 0;
  font-size: 1.35rem;
  font-family:
    "Iowan Old Style", "Palatino Linotype", "Songti SC", "STSong", serif;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.module-title p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.7;
  font-size: 0.94rem;
}

.conclusion {
  min-width: min(340px, 100%);
  max-width: 430px;
  padding: 12px 14px;
  border: 1px solid rgba(176, 138, 67, 0.16);
  border-radius: var(--radius);
  background: rgba(255, 251, 245, 0.72);
}

.conclusion-label {
  margin: 0 0 6px;
  color: var(--gold);
  font-size: 0.84rem;
  letter-spacing: 0.08em;
}

.conclusion p {
  margin: 0;
  color: var(--text);
  line-height: 1.65;
  font-size: 0.95rem;
}

.input-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 14px;
}

.input-panels {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.input-column {
  display: grid;
  gap: 12px;
}

.mini-panel {
  min-height: 180px;
  padding: 14px;
  border: 1px solid rgba(176, 138, 67, 0.14);
  border-radius: var(--radius);
  background: rgba(255, 253, 248, 0.82);
}

.mini-panel h3,
.action-panel h3,
.settings-panel h3 {
  margin: 0 0 10px;
  font-size: 0.96rem;
  font-weight: 600;
}

.mini-panel h3 {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mini-panel h3 span {
  color: var(--gold);
}

.field-list {
  display: grid;
  gap: 10px;
}

.field-row,
.field-stack {
  display: grid;
  gap: 6px;
}

.field-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field-list label,
.action-panel label,
.settings-panel label {
  color: var(--muted);
  font-size: 0.82rem;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid rgba(176, 138, 67, 0.18);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
  padding: 11px 12px;
  outline: none;
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease;
}

input:focus,
textarea:focus,
select:focus {
  border-color: rgba(176, 138, 67, 0.46);
  box-shadow: 0 0 0 4px rgba(176, 138, 67, 0.12);
  background: #fffefb;
}

textarea {
  min-height: 126px;
  resize: vertical;
  line-height: 1.65;
}

.action-panel {
  display: grid;
  gap: 12px;
  align-content: start;
  padding: 14px;
  border: 1px solid rgba(176, 138, 67, 0.16);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(247, 238, 224, 0.92));
}

.button-primary,
.button-secondary {
  min-height: 48px;
  border-radius: var(--radius);
  border: 0;
  font-size: 1rem;
  font-weight: 600;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    opacity 180ms ease;
}

.button-primary {
  color: #fffaf1;
  background: linear-gradient(180deg, #c49c54, #b1853f);
  box-shadow: 0 12px 24px rgba(176, 138, 67, 0.22);
}

.button-primary:hover {
  transform: translateY(-1px);
}

.button-primary:disabled,
.button-secondary:disabled {
  opacity: 0.56;
  cursor: default;
  transform: none;
  box-shadow: none;
}

.button-secondary {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(176, 138, 67, 0.18);
}

.button-row {
  display: flex;
  gap: 10px;
}

.tiny-note {
  color: var(--soft);
  font-size: 0.82rem;
  line-height: 1.65;
}

.status-box {
  padding: 12px;
  border-radius: var(--radius);
  border: 1px solid rgba(176, 138, 67, 0.14);
  background: rgba(255, 251, 245, 0.7);
  color: var(--muted);
  line-height: 1.65;
}

.status-box strong {
  display: block;
  color: var(--text);
  margin-bottom: 3px;
}

.input-footnote {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.input-footnote-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.settings-panel {
  display: none;
  margin-top: 12px;
  padding: 14px;
  border: 1px solid rgba(176, 138, 67, 0.18);
  border-radius: 12px;
  background: rgba(255, 250, 242, 0.94);
}

.settings-panel.is-open {
  display: grid;
  gap: 10px;
}

.settings-panel p {
  margin: 0 0 4px;
  color: var(--muted);
  line-height: 1.6;
  font-size: 0.85rem;
}

.stepper {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

.step-chip {
  display: grid;
  gap: 8px;
  min-height: 86px;
  padding: 12px;
  border: 1px solid rgba(176, 138, 67, 0.14);
  border-radius: 12px;
  background: rgba(255, 253, 248, 0.7);
  color: var(--muted);
  text-align: left;
  transition:
    border-color 180ms ease,
    background 180ms ease,
    color 180ms ease,
    transform 180ms ease;
}

.step-chip:hover {
  border-color: rgba(176, 138, 67, 0.3);
  transform: translateY(-1px);
}

.step-chip span {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: rgba(176, 138, 67, 0.12);
  color: #7a5c25;
  font-size: 0.82rem;
  font-weight: 700;
}

.step-chip strong {
  font-size: 0.88rem;
  line-height: 1.45;
  font-weight: 600;
}

.step-chip.is-active,
.step-chip.is-done {
  color: var(--text);
}

.step-chip.is-active {
  border-color: rgba(176, 138, 67, 0.42);
  background: linear-gradient(180deg, rgba(247, 239, 225, 0.95), rgba(255, 251, 244, 0.92));
  box-shadow: inset 0 0 0 1px rgba(176, 138, 67, 0.16);
}

.step-chip.is-active span {
  background: linear-gradient(180deg, #caa45b, #b1853f);
  color: #fffdf7;
}

.step-chip.is-done {
  border-color: rgba(127, 149, 133, 0.28);
  background: rgba(246, 250, 247, 0.9);
}

.step-chip.is-done span {
  background: rgba(127, 149, 133, 0.16);
  color: #506154;
}

.wizard-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 290px;
  gap: 14px;
  align-items: start;
}

.wizard-main,
.step-stack {
  display: grid;
  gap: 12px;
}

.wizard-section {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(176, 138, 67, 0.14);
  border-radius: 12px;
  background: rgba(255, 253, 248, 0.78);
}

.conditional-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(127, 149, 133, 0.18);
  border-radius: 12px;
  background: rgba(246, 250, 247, 0.84);
}

.conditional-panel h3 {
  margin: 0;
  font-size: 0.98rem;
}

.conditional-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
  font-size: 0.88rem;
}

.wizard-head {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: start;
}

.wizard-head h3 {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 600;
}

.wizard-head p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.7;
  font-size: 0.93rem;
}

.compact-panel {
  min-height: 0;
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.choice-card {
  display: grid;
  gap: 8px;
  min-height: 88px;
  padding: 14px;
  border: 1px solid rgba(176, 138, 67, 0.14);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.88);
  color: var(--muted);
  text-align: left;
  transition:
    border-color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.choice-card:hover {
  border-color: rgba(176, 138, 67, 0.32);
  transform: translateY(-1px);
}

.choice-card strong {
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.45;
}

.choice-card span {
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.6;
}

.choice-card.is-selected {
  border-color: rgba(176, 138, 67, 0.46);
  background: linear-gradient(180deg, rgba(246, 236, 216, 0.94), rgba(255, 249, 239, 0.94));
  box-shadow: inset 0 0 0 1px rgba(176, 138, 67, 0.18);
}

.scale-row {
  display: grid;
  gap: 10px;
}

.scale-row input[type="range"] {
  padding: 0;
  accent-color: #b1853f;
}

.scale-markers {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--soft);
  font-size: 0.84rem;
}

.scale-markers strong {
  color: var(--text);
  font-weight: 700;
}

.example-box {
  padding: 14px;
  border: 1px solid rgba(127, 149, 133, 0.18);
  border-radius: var(--radius);
  background: rgba(246, 250, 247, 0.86);
}

.example-box strong {
  display: block;
  margin-bottom: 8px;
  color: #506154;
  font-size: 0.86rem;
  letter-spacing: 0.04em;
}

.example-box p {
  margin: 0;
  color: var(--muted);
  line-height: 1.72;
}

.story-area {
  min-height: 180px;
}

.helper-list,
.summary-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.helper-list span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(176, 138, 67, 0.08);
  color: #7a5c25;
  font-size: 0.82rem;
}

.helper-soft span {
  background: rgba(127, 149, 133, 0.1);
  color: #506154;
}

.wizard-actions {
  display: grid;
  gap: 10px;
}

.report-stack {
  position: relative;
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.report-stack.is-locking .report-section {
  filter: blur(1px);
}

.lock-overlay {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: rgba(244, 239, 230, 0.62);
  backdrop-filter: blur(6px);
  z-index: 5;
}

.lock-overlay.is-visible {
  display: flex;
}

.lock-card {
  width: min(420px, calc(100% - 32px));
  padding: 22px 20px;
  border-radius: 14px;
  border: 1px solid rgba(176, 138, 67, 0.22);
  background: rgba(255, 252, 247, 0.96);
  box-shadow: var(--shadow);
}

.lock-card h3 {
  margin: 0 0 10px;
  font-size: 1.1rem;
}

.lock-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.lock-card ul {
  margin: 12px 0 0;
  padding-left: 18px;
  color: var(--soft);
  line-height: 1.8;
}

.overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 12px;
}

.overview-stack {
  display: grid;
  gap: 12px;
}

/* 通用词兜底 banner：projectName 缺失时提示用户补充材料 */
.hint-banner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid rgba(176, 138, 67, 0.22);
  border-radius: 8px;
  background: rgba(255, 250, 235, 0.7);
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.7;
}

.hint-banner-icon {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(176, 138, 67, 0.18);
  color: var(--gold);
  font-weight: 700;
  font-size: 0.8rem;
  margin-top: 1px;
}

.overview-pulse-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.signal-card,
.slice-card,
.priority-card,
.path-card,
.boundary-card,
.primary-variable-card,
.supporting-variable-card {
  padding: 16px;
  border: 1px solid rgba(176, 138, 67, 0.14);
  border-radius: 12px;
  background: rgba(255, 253, 248, 0.86);
}

.signal-card-emphasis,
.primary-variable-card {
  background: linear-gradient(180deg, rgba(247, 239, 225, 0.96), rgba(255, 251, 244, 0.94));
}

/* B 点一句话：视觉权重最高，横跨整行 */
.signal-card-hero {
  grid-column: 1 / -1;
  padding: 20px 22px;
  border-color: rgba(176, 138, 67, 0.34);
  box-shadow: 0 8px 22px rgba(176, 138, 67, 0.1);
}

.signal-card-hero h3 {
  font-size: 1.2rem;
  line-height: 1.65;
}

/* 主诊断卡：模块第一块，最高视觉权重之一 */
.diagnosis-card {
  grid-column: 1 / -1;
  padding: 22px 24px;
  border: 1px solid rgba(176, 138, 67, 0.38);
  border-left: 4px solid var(--gold);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(247, 239, 225, 0.96), rgba(255, 251, 244, 0.94));
  box-shadow: 0 10px 28px rgba(176, 138, 67, 0.14);
}

.diagnosis-card h3 {
  margin: 4px 0 0;
  font-size: 1.24rem;
  line-height: 1.7;
  font-family: "Iowan Old Style", "Palatino Linotype", "Songti SC", "STSong", serif;
  font-weight: 600;
  color: var(--text);
}

/* 为什么会卡住：解释机制层，边框更轻、字色稍降一档 */
.why-stuck-card {
  padding: 16px 20px;
  border: 1px solid rgba(176, 138, 67, 0.18);
  border-left: 3px solid rgba(176, 138, 67, 0.4);
  border-radius: 10px;
  background: rgba(255, 253, 248, 0.86);
}

.why-stuck-card p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.85;
  font-size: 0.95rem;
}

.overview-analysis-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.mini-analysis-card {
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid rgba(176, 138, 67, 0.14);
  background: rgba(255, 251, 244, 0.92);
}

.mini-analysis-card p:last-child {
  margin-top: 6px;
  color: var(--text);
}

/* 6 层固定结构：每层一行 label + 正文 */
.why-stuck-layers {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.why-stuck-layer {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 12px;
  align-items: start;
  padding: 10px 14px;
  border-left: 2px solid rgba(176, 138, 67, 0.22);
  background: rgba(255, 253, 248, 0.6);
  border-radius: 0 6px 6px 0;
}

.why-stuck-layer .layer-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 26px;
  padding: 0 8px;
  border-radius: 4px;
  background: rgba(176, 138, 67, 0.12);
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.why-stuck-layer .layer-body {
  margin: 2px 0 0;
  color: var(--muted);
  line-height: 1.78;
  font-size: 0.92rem;
}

/* 第 5 层"真正卡点"轻微高亮 */
.why-stuck-layer:nth-child(5) {
  border-left-color: var(--gold);
  background: rgba(176, 138, 67, 0.06);
}

.why-stuck-layer:nth-child(5) .layer-body {
  color: var(--text);
  font-weight: 500;
}

/* 第 6 层"转向方向"给出后续收束方向，金色提示色 */
.why-stuck-layer:nth-child(6) {
  border-left-color: var(--gold);
  background: rgba(247, 239, 225, 0.5);
}

.why-stuck-layer:nth-child(6) .layer-body {
  color: var(--text);
}

/* B 点卡（三块之一）：比诊断卡稍低一档 */
.signal-card-bpoint {
  padding: 18px 22px;
  border-color: rgba(176, 138, 67, 0.3);
  box-shadow: 0 6px 18px rgba(176, 138, 67, 0.08);
}

.signal-card-bpoint h3 {
  font-size: 1.12rem;
  line-height: 1.7;
}

.overview-summary-text {
  font-size: 1.04rem;
  line-height: 1.9;
  color: var(--text);
}

.timeline-body p {
  margin: 0;
}

.timeline-body p + p {
  margin-top: 10px;
}

.overview-variable-list {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.overview-variable-card {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid rgba(176, 138, 67, 0.12);
  border-radius: 10px;
  background: rgba(255, 251, 244, 0.86);
}

.overview-variable-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(176, 138, 67, 0.14);
  color: var(--gold);
  font-weight: 700;
}

.overview-variable-main h4 {
  margin: 0 0 8px;
  font-size: 1rem;
  line-height: 1.5;
}

.overview-variable-main p {
  margin: 0;
  color: var(--muted);
}

.overview-variable-main p + p {
  margin-top: 8px;
}

.seven-day-action-list {
  margin: 14px 0 0;
  padding-left: 22px;
  color: var(--text);
  line-height: 1.85;
}

.seven-day-action-list li + li {
  margin-top: 8px;
}

.why-stuck-intro {
  margin: 2px 0 0;
  color: var(--text);
  font-size: 1rem;
  line-height: 1.84;
}

.overview-label,
.path-label,
.variable-label {
  margin: 0 0 8px;
  color: var(--gold);
  font-size: 0.82rem;
  letter-spacing: 0.06em;
}

.signal-card h3,
.slice-card h3,
.priority-card h3,
.path-card h3,
.primary-variable-card h3,
.supporting-variable-card h3 {
  margin: 0;
  font-size: 1.12rem;
  line-height: 1.55;
  font-family:
    "Iowan Old Style", "Palatino Linotype", "Songti SC", "STSong", serif;
  font-weight: 600;
}

.signal-card p,
.priority-card p,
.boundary-card p,
.primary-variable-card p,
.supporting-variable-card p,
.path-node p {
  margin: 0;
  color: var(--muted);
  line-height: 1.72;
  font-size: 0.92rem;
}

.priority-card {
  border-color: rgba(176, 138, 67, 0.26);
  box-shadow: inset 0 0 0 1px rgba(176, 138, 67, 0.08);
}

/* 生活切片：时间线样式 */
.slice-card h3 {
  margin-bottom: 4px;
}

.slice-intro {
  margin: 0 0 6px;
  color: var(--soft);
  font-size: 0.86rem;
  line-height: 1.7;
}

.timeline-list {
  position: relative;
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.timeline-list::before {
  content: "";
  position: absolute;
  left: 46px;
  top: 14px;
  bottom: 14px;
  width: 2px;
  background: rgba(176, 138, 67, 0.18);
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 14px;
  align-items: start;
}

.timeline-marker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 92px;
  height: 30px;
  border-radius: 999px;
  background: linear-gradient(180deg, #caa45b, #b1853f);
  color: #fffdf7;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
  z-index: 1;
  box-shadow: 0 2px 6px rgba(176, 138, 67, 0.18);
}

.timeline-body {
  padding: 12px 14px;
  border: 1px solid rgba(176, 138, 67, 0.1);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.68);
  color: var(--muted);
  line-height: 1.72;
  font-size: 0.92rem;
}

/* 路径卡：三段因果链 + 箭头连接 */
.path-flow {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 12px;
}

.path-node {
  position: relative;
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid rgba(176, 138, 67, 0.1);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
}

.path-node p {
  font-size: 0.9rem;
}

.path-node.is-transition {
  background: rgba(246, 236, 216, 0.76);
  border-color: rgba(176, 138, 67, 0.28);
}

.path-node:not(:last-child)::after {
  content: "→";
  position: absolute;
  right: -15px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gold);
  font-weight: 700;
  font-size: 1rem;
  z-index: 1;
}

.variable-section {
  display: grid;
  gap: 10px;
}

.variable-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.variable-section-head h3 {
  margin: 0;
  font-size: 1rem;
}

.variable-role-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.supporting-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.variable-block {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.variable-label {
  margin-bottom: 0;
}

/* 首要变量的三栏信息条 */
.variable-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.variable-grid .variable-block {
  margin-top: 0;
}

/* 变量规范解释：首要变量金色左边框，支撑变量更轻 */
.variable-explanation {
  margin: 8px 0 0;
  padding: 10px 12px;
  border-left: 3px solid var(--gold);
  background: rgba(176, 138, 67, 0.06);
  color: var(--text);
  line-height: 1.7;
  font-size: 0.95rem;
}

.variable-explanation-sm {
  padding: 8px 10px;
  border-left-width: 2px;
  background: rgba(176, 138, 67, 0.04);
  font-size: 0.88rem;
}

.role-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(176, 138, 67, 0.08);
  color: #7a5c25;
  font-size: 0.82rem;
  font-weight: 600;
}

.role-pill-primary {
  background: rgba(176, 138, 67, 0.14);
}

/* 支撑变量卡视觉下调 */
.supporting-variable-card {
  padding: 12px 14px;
  background: rgba(255, 253, 248, 0.55);
  border-color: rgba(176, 138, 67, 0.1);
}

.supporting-variable-card h3 {
  font-size: 0.98rem;
  font-family: inherit;
  font-weight: 600;
}

.supporting-variable-card .variable-block {
  margin-top: 8px;
  gap: 4px;
}

.supporting-variable-card p {
  font-size: 0.88rem;
}

/* 本周最小行动：行动卡 */
.action-card {
  border-color: rgba(176, 138, 67, 0.34);
  box-shadow: 0 8px 22px rgba(176, 138, 67, 0.12);
}

.action-card h3 {
  margin-top: 2px;
}

.action-guide {
  margin: 6px 0 0;
  color: var(--text);
  line-height: 1.75;
  font-size: 0.94rem;
}

/* 本周最小行动：两层结构 */
.action-layers {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.action-direct {
  position: relative;
  padding: 14px 16px;
  border: 1px solid rgba(176, 138, 67, 0.34);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(247, 239, 225, 0.96), rgba(255, 251, 244, 0.94));
  box-shadow: 0 4px 12px rgba(176, 138, 67, 0.1);
}

/* 三层行动卡：① 今日动作 / ② 可复制 / ③ 反馈判断，外加可替换字段模板 */
.action-today {
  padding: 12px 14px;
  border: 1px solid rgba(176, 138, 67, 0.22);
  border-left: 3px solid var(--gold);
  border-radius: 8px;
  background: rgba(255, 250, 232, 0.85);
}

.action-today-text {
  margin: 0;
  color: var(--text);
  line-height: 1.75;
  font-size: 0.96rem;
  font-weight: 500;
}

.action-judgment {
  padding: 12px 14px;
  border: 1px dashed rgba(176, 138, 67, 0.28);
  border-radius: 8px;
  background: rgba(127, 149, 133, 0.06);
}

.action-judgment-text {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
  font-size: 0.92rem;
}

.action-layer-label {
  margin: 0 0 6px;
  color: var(--gold);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

/* 变量因果关系链（首要 + 支撑之间的服务关系） */
.variable-causal {
  margin: 10px 0 0;
  padding: 8px 12px;
  border-left: 2px solid var(--gold);
  background: rgba(176, 138, 67, 0.05);
  color: var(--text);
  font-size: 0.86rem;
  line-height: 1.7;
}

.variable-causal-sm {
  border-left-color: rgba(176, 138, 67, 0.32);
  background: rgba(176, 138, 67, 0.03);
  font-size: 0.82rem;
}

.action-direct-text {
  margin: 0;
  padding-right: 64px;
  color: var(--text);
  line-height: 1.85;
  font-size: 0.96rem;
  font-family:
    "Iowan Old Style", "Palatino Linotype", "Songti SC", "STSong", serif;
}

.action-copy {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 4px 10px;
  border: 1px solid rgba(176, 138, 67, 0.34);
  border-radius: 6px;
  background: rgba(255, 253, 248, 0.9);
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 600;
  transition: background 0.15s ease, color 0.15s ease;
}

.action-copy:hover {
  background: var(--gold);
  color: #fffdf7;
}

.action-copy.is-copied {
  border-color: var(--sage);
  color: var(--sage);
}

.action-template {
  padding: 12px 14px;
  border: 1px dashed rgba(176, 138, 67, 0.42);
  border-radius: 8px;
  background: rgba(255, 251, 245, 0.72);
  color: var(--muted);
  line-height: 1.9;
  font-size: 0.9rem;
  font-family:
    "Iowan Old Style", "Palatino Linotype", "Songti SC", "STSong", serif;
}

.action-template .blank {
  color: var(--gold);
  font-weight: 700;
  background: rgba(176, 138, 67, 0.1);
  padding: 0 2px;
  border-radius: 3px;
}

/* 反馈分类：三列 + 解读 */
.feedback-grid {
  margin-top: 14px;
}

.feedback-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 6px;
}

.feedback-cell {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid rgba(176, 138, 67, 0.14);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.8);
}

.feedback-cell-label {
  margin: 0;
  color: var(--gold);
  font-size: 0.9rem;
  font-weight: 700;
}

.feedback-cell-interpret {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.65;
}

/* 为什么先动这个：浅色提示卡 */
.why-not-card {
  padding: 12px 14px;
  border: 1px dashed rgba(176, 138, 67, 0.22);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.5);
}

.why-not-title {
  margin: 0 0 6px;
  color: var(--soft);
  font-size: 0.84rem;
  font-weight: 600;
}

.why-not-list {
  margin: 0;
  padding-left: 16px;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.75;
}

/* 判断边界：底部弱化，三张小卡 */
.boundary-card {
  padding: 12px 14px;
  background: transparent;
  border-color: rgba(176, 138, 67, 0.08);
}

.boundary-card .overview-label {
  color: var(--soft);
  font-size: 0.78rem;
}

.boundary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 8px;
}

.boundary-mini-card {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid rgba(176, 138, 67, 0.12);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.75);
}

.boundary-mini-title {
  margin: 0;
  color: var(--soft);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}

.boundary-mini-body {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.72;
}

.boundary-mini-card-foc {
  background: rgba(176, 138, 67, 0.06);
  border-color: rgba(176, 138, 67, 0.18);
}

.boundary-mini-card-foc .boundary-mini-body {
  color: var(--text);
  font-weight: 600;
}

/* boundary-evidence 旧规则已废弃（已合并进 boundary-row-est） */

.metric-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.metric-card,
.sim-card,
.week-card,
.contradiction-card,
.alignment-card,
.risk-card,
.stage-note {
  padding: 14px;
  border: 1px solid rgba(176, 138, 67, 0.12);
  border-radius: var(--radius);
  background: rgba(255, 253, 248, 0.84);
}

.metric-card h3,
.sim-card h3,
.week-card h3,
.contradiction-card h3,
.alignment-card h3,
.risk-card h3,
.stage-note h3 {
  margin: 0;
  font-size: 0.94rem;
}

.metric-score {
  margin: 10px 0 8px;
  font-size: 2rem;
  line-height: 1;
  font-family:
    "Iowan Old Style", "Palatino Linotype", "Songti SC", "STSong", serif;
}

.metric-score span {
  color: var(--soft);
  font-size: 1rem;
}

.bar {
  height: 7px;
  border-radius: 999px;
  background: rgba(176, 138, 67, 0.16);
  overflow: hidden;
}

.bar > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #b1853f, #caa45b);
}

.metric-card p,
.sim-card p,
.alignment-card p,
.risk-card p,
.week-card p,
.stage-note p,
.contradiction-summary p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.7;
  font-size: 0.9rem;
}

.radar-card {
  display: grid;
  place-items: center;
  gap: 14px;
  padding: 14px;
  border: 1px solid rgba(176, 138, 67, 0.12);
  border-radius: var(--radius);
  background: rgba(255, 253, 248, 0.84);
}

.radar-svg {
  width: 100%;
  max-width: 220px;
  overflow: visible;
}

.radar-label {
  font-size: 11px;
  fill: var(--muted);
}

.reason-analysis-section {
  display: grid;
  gap: 12px;
}

.reason-analysis-longform {
  gap: 16px;
}

.reason-hero-card,
.reason-card,
.reason-summary-card,
.reason-longform-card {
  padding: 16px 18px;
  border: 1px solid rgba(176, 138, 67, 0.16);
  border-radius: 12px;
  background: rgba(255, 253, 248, 0.84);
}

.reason-hero-card {
  background: linear-gradient(180deg, rgba(247, 239, 225, 0.96), rgba(255, 251, 244, 0.94));
  border-color: rgba(176, 138, 67, 0.28);
  box-shadow: 0 8px 22px rgba(176, 138, 67, 0.08);
}

.reason-hero-card h3 {
  margin: 0;
  font-size: 1.18rem;
  line-height: 1.72;
  font-family:
    "Iowan Old Style", "Palatino Linotype", "Songti SC", "STSong", serif;
  font-weight: 600;
}

.reason-analysis-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 12px;
}

.reason-analysis-grid-narrow {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.reason-card-emphasis {
  background: linear-gradient(180deg, rgba(255, 251, 245, 0.94), rgba(247, 239, 225, 0.86));
}

.reason-card h3,
.reason-summary-card p,
.reason-summary-card h3 {
  margin: 0 0 8px;
  font-size: 1rem;
  font-family:
    "Iowan Old Style", "Palatino Linotype", "Songti SC", "STSong", serif;
  font-weight: 600;
}

.reason-card p,
.reason-summary-card p,
.reason-longform-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.82;
  font-size: 0.94rem;
}

.reason-longform-card {
  background: rgba(255, 251, 244, 0.9);
}

.reason-longform-text {
  white-space: pre-wrap;
}

.reason-gap-list {
  display: grid;
  gap: 14px;
  margin-top: 10px;
}

.reason-gap-item {
  padding-top: 14px;
  border-top: 1px solid rgba(176, 138, 67, 0.12);
}

.reason-gap-item:first-child {
  padding-top: 0;
  border-top: none;
}

.reason-gap-item h3 {
  margin: 0 0 8px;
  font-size: 1rem;
  font-family:
    "Iowan Old Style", "Palatino Linotype", "Songti SC", "STSong", serif;
  font-weight: 600;
}

.reason-chain-list,
.reason-not-list {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 8px;
}

.reason-chain-list li,
.reason-not-list li {
  color: var(--muted);
  line-height: 1.78;
  font-size: 0.93rem;
}

.reason-summary-card {
  border-color: rgba(176, 138, 67, 0.24);
  background: rgba(255, 250, 242, 0.92);
}

.reason-summary-card .overview-label {
  margin-bottom: 6px;
}

.contradiction-diagnosis-section {
  display: grid;
  gap: 12px;
}

.contradiction-hero-card,
.contradiction-block,
.contradiction-pivot-card,
.alignment-summary {
  padding: 16px 18px;
  border: 1px solid rgba(176, 138, 67, 0.16);
  border-radius: 12px;
  background: rgba(255, 253, 248, 0.84);
}

.contradiction-hero-card {
  background: linear-gradient(180deg, rgba(247, 239, 225, 0.96), rgba(255, 251, 244, 0.94));
  border-color: rgba(176, 138, 67, 0.28);
  box-shadow: 0 8px 22px rgba(176, 138, 67, 0.08);
}

.contradiction-hero-card h3 {
  margin: 0;
  font-size: 1.12rem;
  line-height: 1.74;
  font-family:
    "Iowan Old Style", "Palatino Linotype", "Songti SC", "STSong", serif;
  font-weight: 600;
}

.contradiction-block h3,
.contradiction-pivot-card p {
  margin: 0 0 8px;
  font-size: 1rem;
  font-family:
    "Iowan Old Style", "Palatino Linotype", "Songti SC", "STSong", serif;
  font-weight: 600;
}

.contradiction-sides-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.contradiction-side-card {
  padding: 14px;
  border: 1px solid rgba(176, 138, 67, 0.12);
  border-radius: 10px;
  background: rgba(255, 250, 242, 0.86);
}

.contradiction-side-card-forward {
  background: linear-gradient(180deg, rgba(246, 249, 245, 0.94), rgba(237, 244, 238, 0.9));
  border-color: rgba(127, 149, 133, 0.18);
}

.contradiction-side-card-pullback {
  background: linear-gradient(180deg, rgba(253, 245, 242, 0.94), rgba(250, 238, 234, 0.9));
  border-color: rgba(201, 139, 129, 0.16);
}

.contradiction-side-title {
  margin: 0 0 6px;
  color: var(--soft);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.contradiction-side-list,
.contradiction-manifestation-list {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 8px;
}

.contradiction-side-list li,
.contradiction-manifestation-list li,
.contradiction-pivot-card > p:last-child {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
  font-size: 0.94rem;
}

.contradiction-pivot-card {
  border-color: rgba(176, 138, 67, 0.24);
  background: rgba(255, 250, 242, 0.92);
}

.alignment-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 12px;
}

.summary-list {
  margin: 12px 0 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.82;
}

.alignment-grid {
  display: grid;
  gap: 10px;
}

.alignment-card ul,
.sim-card ul,
.week-card ul,
.risk-card ul {
  margin: 10px 0 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.8;
}

.fit-pill {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(176, 138, 67, 0.18);
  background: rgba(176, 138, 67, 0.08);
  color: #7e5c20;
  font-size: 0.84rem;
  font-weight: 600;
}

.variables-table-wrap,
.risk-table-wrap {
  overflow-x: auto;
  border: 1px solid rgba(176, 138, 67, 0.12);
  border-radius: 12px;
}

.variable-rank-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.variable-module-stack {
  display: grid;
  gap: 16px;
}

.variable-rank-card,
.simulation-timeline-card,
.simulation-stage-card,
.simulation-cost-card {
  border: 1px solid rgba(176, 138, 67, 0.14);
  border-radius: 12px;
  background: rgba(255, 253, 248, 0.86);
}

.variable-rank-card {
  padding: 16px 18px;
}

.variable-rank-card-primary {
  background: linear-gradient(180deg, rgba(247, 239, 225, 0.96), rgba(255, 251, 244, 0.94));
  border-color: rgba(176, 138, 67, 0.28);
  box-shadow: 0 8px 22px rgba(176, 138, 67, 0.08);
  grid-column: span 2;
}

.variable-rank-head {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: start;
  margin-bottom: 14px;
}

.variable-rank-order {
  display: inline-grid;
  place-items: center;
  min-width: 42px;
  min-height: 42px;
  border-radius: 999px;
  background: rgba(176, 138, 67, 0.12);
  color: var(--gold);
  font-weight: 700;
  font-family:
    "Iowan Old Style", "Palatino Linotype", "Songti SC", "STSong", serif;
}

.variable-rank-role,
.simulation-stage-label {
  margin: 0 0 6px;
  color: var(--gold);
  font-size: 0.82rem;
  letter-spacing: 0.06em;
}

.variable-rank-head h3,
.simulation-stage-card h3 {
  margin: 0;
  font-size: 1.02rem;
  font-family:
    "Iowan Old Style", "Palatino Linotype", "Songti SC", "STSong", serif;
}

.variable-rank-body {
  display: grid;
  gap: 12px;
}

.variable-rank-row {
  display: grid;
  gap: 6px;
}

.variable-rank-label {
  margin: 0;
  color: var(--soft);
  font-size: 0.82rem;
}

.variable-rank-row p:last-child,
.simulation-stage-card p:last-child,
.simulation-cost-card p:last-child {
  margin: 0;
  color: var(--muted);
  line-height: 1.82;
  font-size: 0.94rem;
}

.simulation-timeline-card {
  padding: 16px 18px;
  display: grid;
  gap: 12px;
}

.simulation-config-card {
  padding: 18px;
  border: 1px solid rgba(176, 138, 67, 0.16);
  border-radius: 12px;
  background: rgba(255, 253, 248, 0.9);
  display: grid;
  gap: 16px;
}

.simulation-config-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.simulation-config-head h3 {
  margin: 6px 0 0;
  font-size: 1.04rem;
  line-height: 1.72;
  font-family:
    "Iowan Old Style", "Palatino Linotype", "Songti SC", "STSong", serif;
}

.simulation-intensity-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.simulation-intensity-card,
.simulation-variable-card,
.simulation-chart-card {
  border: 1px solid rgba(176, 138, 67, 0.14);
  border-radius: 12px;
  background: rgba(255, 251, 244, 0.92);
}

.simulation-intensity-card {
  padding: 14px 16px;
}

.simulation-intensity-title {
  margin: 0;
  color: var(--gold);
  font-weight: 700;
}

.simulation-intensity-summary {
  margin: 6px 0 8px;
  color: var(--text);
  font-size: 0.92rem;
}

.simulation-intensity-card p:last-child {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.simulation-selector-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.simulation-variable-card {
  padding: 14px 16px;
  display: grid;
  gap: 12px;
}

.simulation-variable-card.is-active {
  border-color: rgba(176, 138, 67, 0.26);
  box-shadow: 0 8px 18px rgba(176, 138, 67, 0.08);
}

.simulation-variable-toggle {
  display: flex;
  gap: 10px;
  align-items: center;
  font-weight: 600;
  color: var(--text);
}

.simulation-variable-toggle input {
  width: 16px;
  height: 16px;
}

.simulation-intensity-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip-button {
  border: 1px solid rgba(176, 138, 67, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--muted);
  font-size: 0.86rem;
  padding: 8px 12px;
  cursor: pointer;
}

.chip-button.is-active {
  border-color: rgba(176, 138, 67, 0.3);
  background: rgba(247, 239, 225, 0.96);
  color: var(--gold);
}

.chip-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.simulation-overload-warning {
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(253, 245, 242, 0.96);
  border: 1px solid rgba(182, 99, 74, 0.2);
}

.simulation-overload-warning strong {
  color: #a0543e;
}

.simulation-overload-warning p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.78;
}

.simulation-timeline-card-emphasis {
  background: linear-gradient(180deg, rgba(250, 244, 233, 0.96), rgba(255, 252, 247, 0.94));
}

.simulation-timeline-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.simulation-module-stack,
.simulation-stage-stack,
.resource-stage-stack,
.resource-grid,
.reference-grid {
  display: grid;
  gap: 12px;
}

.simulation-stage-stack {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.simulation-stage-stack-quad {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.simulation-stage-card,
.simulation-cost-card {
  padding: 14px 16px;
}

.simulation-stage-card-emphasis {
  background: linear-gradient(180deg, rgba(247, 239, 225, 0.78), rgba(255, 250, 242, 0.94));
  border-color: rgba(176, 138, 67, 0.24);
}

.simulation-cost-card {
  background: rgba(255, 250, 242, 0.92);
  border-color: rgba(176, 138, 67, 0.2);
}

.simulation-chart-card {
  padding: 16px 18px 10px;
}

.simulation-chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 10px;
}

.simulation-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.88rem;
}

.simulation-legend-swatch {
  width: 14px;
  height: 14px;
  border-radius: 999px;
}

.simulation-chart-svg {
  width: 100%;
  height: auto;
}

.simulation-axis-label {
  fill: var(--muted);
  font-size: 11px;
}

.reference-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.resource-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.resource-stage-stack {
  gap: 18px;
}

.resource-stage-card {
  display: grid;
  gap: 16px;
}

.resource-stage-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.resource-stage-head h3 {
  margin: 6px 0 0;
  font-size: 1.08rem;
  line-height: 1.7;
}

.reference-card,
.resource-card,
.risk-card {
  border: 1px solid rgba(176, 138, 67, 0.14);
  border-radius: 12px;
  background: rgba(255, 253, 248, 0.9);
  padding: 16px 18px;
}

.reference-head {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.reference-head h3,
.resource-card h3 {
  margin: 0;
  font-size: 1.02rem;
  font-family:
    "Iowan Old Style", "Palatino Linotype", "Songti SC", "STSong", serif;
}

.reference-body,
.resource-body,
.week-card-stack {
  display: grid;
  gap: 12px;
}

.reference-section {
  display: grid;
  gap: 6px;
}

.reference-stage-list {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.8;
}

.reference-body p,
.reference-stage-list li {
  color: var(--muted);
  line-height: 1.82;
}

.reference-reminder {
  margin-top: 2px;
}

.contradiction-conflict-card {
  background: rgba(255, 252, 245, 0.94);
}

.contradiction-summary-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.risk-grid-expanded {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.risk-card {
  display: grid;
  gap: 8px;
}

.risk-card h3,
.week-card-stack strong {
  color: var(--text);
}

.risk-card p,
.week-card-stack p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.risk-card-emphasis,
.quote-card {
  background: rgba(255, 249, 241, 0.96);
  border-color: rgba(176, 138, 67, 0.22);
}

.quote-card p {
  color: var(--text);
}

.action-judgment-card {
  margin-top: 12px;
}

.action-judgment-card-emphasis {
  background: rgba(255, 248, 238, 0.96);
  border-color: rgba(176, 138, 67, 0.24);
}

.week-summary-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 14px;
}

.week-summary-grid.is-double {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.week-summary-grid.is-single {
  grid-template-columns: minmax(0, 1fr);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 880px;
  background: rgba(255, 253, 248, 0.84);
}

th,
td {
  padding: 14px 12px;
  border-bottom: 1px solid rgba(176, 138, 67, 0.1);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 600;
  background: rgba(255, 249, 241, 0.92);
}

td {
  color: var(--text);
  line-height: 1.65;
  font-size: 0.92rem;
}

tbody tr:last-child td {
  border-bottom: 0;
}

.rank-cell {
  width: 62px;
  color: var(--gold);
  font-weight: 700;
  font-family:
    "Iowan Old Style", "Palatino Linotype", "Songti SC", "STSong", serif;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(176, 138, 67, 0.1);
  color: #7a5c25;
  font-size: 0.82rem;
  font-weight: 600;
}

.impact-score {
  display: inline-grid;
  place-items: center;
  min-width: 52px;
  min-height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(127, 149, 133, 0.12);
  color: #506154;
  font-weight: 700;
}

.sim-grid,
.risk-grid,
.week-grid {
  display: grid;
  gap: 10px;
}

.sim-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.risk-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.week-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.week-card h3 {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.week-index {
  color: var(--soft);
  font-size: 0.82rem;
}

.footer-note {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(176, 138, 67, 0.12);
  color: var(--soft);
  font-size: 0.84rem;
}

.footer-note strong {
  color: var(--gold);
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  max-width: 320px;
  padding: 14px 16px;
  border: 1px solid rgba(176, 138, 67, 0.18);
  border-radius: 12px;
  background: rgba(255, 252, 247, 0.98);
  box-shadow: var(--shadow);
  color: var(--text);
  line-height: 1.6;
  z-index: 50;
}

.toast p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

@media (max-width: 1120px) {
  .module-head,
  .stage-meta,
  .alignment-layout,
  .overview-grid,
  .input-grid,
  .wizard-layout {
    grid-template-columns: 1fr;
  }

  .path-flow,
  .overview-pulse-grid,
  .supporting-grid,
  .boundary-grid,
  .variable-rank-grid,
  .simulation-timeline-grid,
  .simulation-stage-stack,
  .reference-grid,
  .resource-grid,
  .contradiction-summary-grid,
  .risk-grid-expanded {
    grid-template-columns: 1fr;
  }

  .variable-rank-card-primary {
    grid-column: span 1;
  }

  .variable-grid {
    grid-template-columns: 1fr;
  }

  /* 平板：反馈三列收成两列，避免挤压 */
  .feedback-cols {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  /* 窄屏隐藏路径卡之间的 → 箭头 */
  .path-node::after {
    display: none;
  }

  /* 时间线左侧竖线与圆点：窄屏仍保留，但缩进收紧 */
  .timeline-list::before {
    left: 76px;
  }

  .conclusion {
    max-width: none;
  }

  .input-panels,
  .choice-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stepper {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .input-panels {
    grid-template-columns: 1fr;
  }

  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sim-grid,
  .risk-grid,
  .week-grid {
    grid-template-columns: 1fr;
  }

  .overview-analysis-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .page-inner {
    padding: 20px 14px 22px;
  }

  .topbar {
    flex-direction: column;
  }

  .topbar-tools {
    width: 100%;
    flex-wrap: wrap;
  }

  .stepper,
  .choice-grid {
    grid-template-columns: 1fr;
  }

  .wizard-head {
    grid-template-columns: 1fr;
  }

  .module {
    padding: 14px;
  }

  .metric-grid,
  .contradiction-sides-grid,
  .reason-analysis-grid,
  .reason-analysis-grid-narrow,
  .simulation-stage-stack,
  .reference-grid,
  .resource-grid,
  .risk-grid-expanded {
    grid-template-columns: 1fr;
  }

  .field-row,
  .button-row {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .footer-note {
    flex-direction: column;
  }

  .timeline-item {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .timeline-list::before {
    display: none;
  }

  .variable-grid {
    grid-template-columns: 1fr;
  }

  .action-template {
    font-size: 0.9rem;
  }

  /* 移动端：反馈三列改单列；复制按钮变内联，避免遮挡长话术 */
  .feedback-cols {
    grid-template-columns: 1fr;
  }

  .action-direct-text {
    padding-right: 0;
  }

  .action-copy {
    position: static;
    justify-self: start;
    margin-top: 8px;
  }
}
