:root {
  --bg: #f4eee2;
  --panel: rgba(255, 252, 246, 0.97);
  --line: #d8c9af;
  --text: #2d2418;
  --muted: #6d624d;
  --accent: #b75a2f;
  --accent-deep: #8e3f20;
  --accent-soft: #f8ddd1;
  --olive: #6a7a3c;
  --olive-soft: #e2ebca;
  --sand: #efe7d8;
  --shadow: 0 18px 42px rgba(60, 44, 16, 0.08);
  --radius: 20px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.88), transparent 32%),
    linear-gradient(135deg, #efe6d7 0%, #f8f3ea 42%, #f3ebdb 100%);
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.app {
  max-width: 1520px;
  margin: 0 auto;
  padding: 28px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 22px;
}

.topbar h1 {
  margin: 8px 0 6px;
  font-size: 34px;
}

.eyebrow {
  margin: 0;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.subtitle,
.muted {
  color: var(--muted);
}

.topbar-actions,
.actions-right,
.badge-row,
.chip-row,
.btn-row,
.tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr) 310px;
  gap: 20px;
  align-items: start;
}

.panel {
  background: var(--panel);
  border: 1px solid rgba(216, 201, 175, 0.72);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.side {
  padding: 20px;
  position: sticky;
  top: 24px;
}

.main {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.hero,
#stepContent,
.actions {
  padding: 24px;
}

.hero {
  display: flex;
  justify-content: space-between;
  gap: 22px;
  align-items: flex-start;
  background:
    linear-gradient(140deg, rgba(255, 255, 255, 0.97), rgba(250, 239, 228, 0.94)),
    linear-gradient(120deg, rgba(183, 90, 47, 0.08), rgba(106, 122, 60, 0.08));
}

.hero h2 {
  margin: 6px 0 8px;
  font-size: 28px;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.panel-head h2,
.stack h3,
.section h3,
.section h4 {
  margin: 0;
}

.step-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.step {
  display: flex;
  gap: 12px;
  padding: 12px 14px;
  width: 100%;
  text-align: left;
  color: var(--muted);
  border: 1px solid transparent;
  border-radius: 16px;
  background: transparent;
}

.step.active {
  color: var(--text);
  background: rgba(183, 90, 47, 0.1);
  border-color: rgba(183, 90, 47, 0.18);
}

.step.done {
  color: #42501d;
  background: rgba(106, 122, 60, 0.08);
}

.step-index {
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-weight: 700;
  background: rgba(216, 201, 175, 0.5);
}

.step.active .step-index {
  color: #fff;
  background: var(--accent);
}

.step.done .step-index {
  color: #fff;
  background: var(--olive);
}

.step-copy strong {
  display: block;
  margin-bottom: 4px;
}

.step-copy span {
  font-size: 14px;
  color: var(--muted);
}

.note,
.banner {
  padding: 14px 16px;
  border-radius: 16px;
}

.note {
  margin-top: 18px;
  background: rgba(111, 98, 77, 0.08);
}

.banner {
  background: rgba(255, 224, 168, 0.28);
  border: 1px solid rgba(216, 201, 175, 0.62);
  color: #75521d;
}

.btn {
  border: 0;
  border-radius: 14px;
  padding: 12px 18px;
  font-weight: 600;
}

.btn.primary {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  box-shadow: 0 12px 24px rgba(183, 90, 47, 0.22);
}

.btn.ghost {
  color: var(--text);
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(216, 201, 175, 0.82);
}

.badge,
.pill,
.tag,
.mini-pill {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 13px;
}

.badge {
  color: var(--accent-deep);
  background: rgba(183, 90, 47, 0.1);
  border: 1px solid rgba(183, 90, 47, 0.16);
}

.pill {
  color: #43501b;
  background: var(--olive-soft);
}

.tag {
  color: var(--muted);
  background: rgba(111, 98, 77, 0.08);
}

.mini-pill {
  color: #5d4d35;
  background: var(--sand);
}

.stack,
.section {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.form-grid,
.choice-grid,
.card-grid,
.summary-grid {
  display: grid;
  gap: 14px;
}

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

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

.field,
.field-full {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field-full {
  grid-column: 1 / -1;
}

label {
  font-size: 14px;
  font-weight: 600;
}

input,
textarea {
  width: 100%;
  padding: 14px 16px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(216, 201, 175, 0.92);
  border-radius: 14px;
}

textarea {
  min-height: 110px;
  resize: vertical;
}

.choice-card,
.data-card,
.summary-item,
.question-card {
  padding: 16px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(216, 201, 175, 0.72);
  border-radius: 18px;
}

.choice-card {
  text-align: left;
}

.choice-card.selected {
  background: rgba(248, 221, 209, 0.62);
  border-color: rgba(183, 90, 47, 0.4);
}

.choice-card.selected strong::after {
  content: " 已选";
  margin-left: 6px;
  color: var(--accent-deep);
  font-size: 12px;
  font-weight: 700;
}

.choice-card strong,
.data-card h4,
.question-card h4 {
  display: block;
  margin: 0 0 6px;
}

.choice-card span,
.data-card p,
.question-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.summary-item strong {
  display: block;
  margin-bottom: 6px;
}

.summary-item span {
  color: var(--muted);
  line-height: 1.45;
}

hr {
  height: 1px;
  border: 0;
  margin: 18px 0;
  background: rgba(216, 201, 175, 0.8);
}

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

.actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.tab {
  color: var(--text);
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(216, 201, 175, 0.92);
  border-radius: 999px;
  padding: 10px 14px;
}

.tab.active {
  color: var(--accent-deep);
  background: var(--accent-soft);
  border-color: rgba(183, 90, 47, 0.35);
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  color: #fff;
  padding: 14px 18px;
  border-radius: 16px;
  background: rgba(45, 36, 24, 0.94);
  box-shadow: 0 16px 34px rgba(45, 36, 24, 0.18);
}

@media (max-width: 1260px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .side {
    position: static;
  }
}

@media (max-width: 900px) {
  .app {
    padding: 16px;
  }

  .topbar,
  .hero,
  .actions {
    flex-direction: column;
  }

  .form-grid,
  .choice-grid,
  .card-grid,
  .summary-grid {
    grid-template-columns: 1fr;
  }
}
