:root {
  --paper: #f5efe5;
  --paper-strong: #fffaf2;
  --ink: #2f2721;
  --muted: #756a61;
  --line: rgba(112, 87, 68, 0.18);
  --green: #466b62;
  --green-deep: #2f4f49;
  --clay: #9a704f;
  --sage: #6c8e87;
  --danger: #a64033;
  --shadow: 0 18px 50px rgba(47, 39, 33, 0.12);
  --radius: 8px;
  --soft-shadow: 0 8px 28px rgba(47, 39, 33, 0.08);
}

* { box-sizing: border-box; }

body {
  background:
    linear-gradient(180deg, rgba(255, 250, 242, 0.78), rgba(245, 239, 229, 0.92)),
    repeating-linear-gradient(90deg, rgba(47, 79, 73, 0.035) 0, rgba(47, 79, 73, 0.035) 1px, transparent 1px, transparent 42px);
  color: var(--ink);
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", sans-serif;
  margin: 0;
}

button { border: 0; font: inherit; }

.app-shell {
  margin: 0 auto;
  max-width: 1180px;
  padding: 28px 24px 40px;
}

.topbar {
  margin-bottom: 18px;
}

.topbar h1 {
  font-family: "Source Han Serif SC", "Noto Serif CJK SC", "Songti SC", serif;
  font-size: 32px;
  font-weight: 600;
  line-height: 1.18;
  margin: 0;
}

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

.layout {
  align-items: start;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(230px, 280px) minmax(0, 1fr);
}

.intro-panel { margin-bottom: 20px; }

.intro-panel h2 {
  font-family: "Source Han Serif SC", "Noto Serif CJK SC", "Songti SC", serif;
  font-size: 28px;
  font-weight: 600;
  line-height: 1.28;
  margin: 0 0 10px;
}

.intro-panel p:not(.eyebrow) {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.85;
  margin: 8px 0 0;
  max-width: 900px;
}

.scale-copy {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.scale-copy span {
  background: rgba(70, 107, 98, 0.09);
  border: 1px solid rgba(70, 107, 98, 0.12);
  border-radius: 6px;
  color: var(--green-deep);
  display: inline-flex;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  padding: 7px 10px;
}

.panel,
.result-card {
  background: rgba(255, 250, 242, 0.88);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--soft-shadow);
  padding: 24px;
}

.side-panel {
  display: grid;
  gap: 16px;
  position: sticky;
  top: 20px;
}

.main-panel { min-width: 0; }

.panel h2,
.result-card h2 {
  font-family: "Source Han Serif SC", "Noto Serif CJK SC", "Songti SC", serif;
  font-size: 23px;
  font-weight: 600;
  line-height: 1.24;
  margin: 0 0 16px;
}

.primary-btn,
.secondary-btn {
  align-items: center;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  font-weight: 700;
  justify-content: center;
  line-height: 1.2;
  min-height: 42px;
  padding: 10px 15px;
}

.primary-btn {
  background: var(--green-deep);
  color: #fffdf7;
  width: 100%;
}

.secondary-btn {
  background: rgba(255, 253, 247, 0.72);
  border: 1px solid var(--line);
  color: var(--green-deep);
}

.primary-btn:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.muted,
.small-note {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.75;
  margin: 0;
}

.error-text {
  color: var(--danger);
  font-size: 13px;
  line-height: 1.65;
  min-height: 22px;
}

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

.progress-panel {
  box-shadow: none;
}

.progress-list {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.progress-row {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: 44px minmax(0, 1fr) 58px;
}

.progress-letter {
  background: #ece2d2;
  border-radius: 6px;
  display: grid;
  font-weight: 800;
  height: 38px;
  place-items: center;
}

.progress-track {
  background: rgba(70, 107, 98, 0.12);
  border-radius: 999px;
  height: 8px;
  overflow: hidden;
}

.progress-fill {
  background: linear-gradient(90deg, var(--clay), var(--sage));
  display: block;
  height: 100%;
  width: var(--progress);
}

.progress-count {
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

.rating-list {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.rating-item {
  background: rgba(255, 253, 247, 0.66);
  border: 1px solid rgba(112, 87, 68, 0.13);
  border-radius: 6px;
  display: grid;
  gap: 14px;
  padding: 16px;
}

.rating-item strong {
  display: block;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.68;
  text-wrap: pretty;
}

.rating-scale {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(5, minmax(42px, 1fr));
}

.rating-button {
  background: rgba(255, 253, 247, 0.82);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  cursor: pointer;
  font-weight: 800;
  min-height: 44px;
}

.rating-button.is-selected {
  background: var(--green-deep);
  border-color: var(--green-deep);
  color: #fffdf7;
}

.result-stage {
  display: grid;
  min-height: 62vh;
  place-items: center;
}

.result-card {
  max-width: 900px;
  width: min(100%, 900px);
}

.result-hero {
  margin: 0 0 20px;
}

.result-summary {
  color: var(--ink);
  font-family: "Source Han Serif SC", "Noto Serif CJK SC", "Songti SC", serif;
  font-size: 24px;
  line-height: 1.62;
  margin: 0 0 20px;
}

.score-table {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  overflow: hidden;
}

.score-row {
  align-items: center;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(116px, 1.1fr) minmax(150px, 1fr) minmax(0, 3fr) 70px;
  padding: 14px 16px;
}

.score-row strong { line-height: 1.35; }

.score-row span { line-height: 1.45; }

.score-row + .score-row { border-top: 1px solid var(--line); }

.bar-track {
  background: rgba(70, 107, 98, 0.12);
  border-radius: 999px;
  height: 8px;
  overflow: hidden;
}

.bar-fill {
  background: linear-gradient(90deg, var(--clay), var(--sage));
  display: block;
  height: 100%;
  width: var(--score);
}

.result-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.submit-panel {
  background: rgba(70, 107, 98, 0.07);
  border: 1px solid rgba(70, 107, 98, 0.14);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  margin-top: 18px;
  padding: 18px;
}

.submit-title {
  color: var(--ink);
  font-size: 17px;
  font-weight: 800;
  line-height: 1.45;
  margin: 0;
}

.type-picture {
  align-items: stretch;
  background: #efe7da;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 300px);
  overflow: hidden;
}

.type-copy {
  display: grid;
  gap: 8px;
  padding: 22px;
}

.type-copy h3 {
  font-family: "Source Han Serif SC", "Noto Serif CJK SC", "Songti SC", serif;
  font-size: 26px;
  font-weight: 600;
  line-height: 1.25;
  margin: 0;
}

.type-copy p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.75;
  margin: 0;
}

.type-art {
  min-height: 210px;
  overflow: hidden;
  position: relative;
}

.type-art::before,
.type-art::after,
.type-art span {
  content: "";
  position: absolute;
}

.type-art-cold {
  background: linear-gradient(180deg, #eaf1ed, #d7e6e2);
}

.type-art-cold::before {
  background: #f8fbf8;
  border-radius: 50%;
  box-shadow: 42px -18px 0 -8px rgba(255,255,255,0.78), -38px 24px 0 -12px rgba(255,255,255,0.7);
  height: 86px;
  left: 50%;
  top: 46px;
  width: 86px;
}

.type-art-cold::after {
  background: linear-gradient(90deg, rgba(47, 79, 73, 0.14), rgba(47, 79, 73, 0));
  bottom: 34px;
  height: 36px;
  left: 18%;
  transform: rotate(-7deg);
  width: 72%;
}

.type-art-water {
  background: linear-gradient(180deg, #eef3ef, #d9e4dc);
}

.type-art-water::before {
  background: rgba(255,255,255,0.78);
  border-radius: 45% 55% 58% 42%;
  box-shadow: 46px 36px 0 -10px rgba(255,255,255,0.58), -42px 48px 0 -18px rgba(255,255,255,0.62);
  height: 108px;
  left: 46%;
  top: 42px;
  width: 118px;
}

.type-art-water::after {
  background: rgba(70, 107, 98, 0.2);
  border-radius: 999px;
  bottom: 34px;
  height: 18px;
  left: 20%;
  width: 68%;
}

.type-art-sleep {
  background: linear-gradient(180deg, #e8e4df, #d8d4cd);
}

.type-art-sleep::before {
  background: #fff8df;
  border-radius: 50%;
  box-shadow: 0 0 38px rgba(255, 231, 147, 0.55);
  height: 76px;
  right: 56px;
  top: 42px;
  width: 76px;
}

.type-art-sleep::after {
  background: linear-gradient(90deg, rgba(154,112,79,0.28), rgba(70,107,98,0.14));
  border-radius: 50%;
  bottom: 26px;
  height: 72px;
  left: 42px;
  width: 170px;
}

.type-art-damp {
  background: linear-gradient(180deg, #eee8db, #ded6c5);
}

.type-art-damp::before {
  background: rgba(154,112,79,0.28);
  border-radius: 999px;
  bottom: 44px;
  height: 26px;
  left: 36px;
  width: 210px;
}

.type-art-damp::after {
  background: rgba(70,107,98,0.3);
  border-radius: 50%;
  box-shadow: 42px -22px 0 -10px rgba(70,107,98,0.16), 74px 18px 0 -12px rgba(154,112,79,0.18);
  height: 86px;
  left: 82px;
  top: 54px;
  width: 86px;
}

.type-art-wind {
  background: linear-gradient(180deg, #ece8df, #d7e1dc);
}

.type-art-wind::before {
  border: 3px solid rgba(47,79,73,0.22);
  border-left: 0;
  border-radius: 0 999px 999px 0;
  height: 72px;
  left: 48px;
  top: 52px;
  width: 170px;
}

.type-art-wind::after {
  background: rgba(154,112,79,0.28);
  border-radius: 999px;
  bottom: 48px;
  height: 22px;
  right: 34px;
  width: 170px;
}

.is-hidden { display: none !important; }

@media (max-width: 980px) {
  .layout { grid-template-columns: 1fr; }
  .side-panel { position: static; }
  .side-panel .small-note { display: none; }
}

@media (max-width: 680px) {
  body {
    background:
      linear-gradient(180deg, rgba(255, 250, 242, 0.92), rgba(245, 239, 229, 0.96));
  }
  .app-shell { padding: 18px 14px 34px; }
  .topbar { margin-bottom: 14px; }
  .topbar h1 { font-size: 27px; }
  .panel,
  .result-card {
    padding: 20px;
  }
  .intro-panel { margin-bottom: 14px; }
  .intro-panel h2 { font-size: 25px; }
  .intro-panel p:not(.eyebrow) {
    font-size: 15px;
    line-height: 1.8;
  }
  .progress-panel {
    padding: 16px;
  }
  .progress-panel h2 {
    font-size: 20px;
    margin-bottom: 12px;
  }
  .question-head { display: grid; }
  .question-head h2 { margin-bottom: 8px; }
  .question-head .secondary-btn {
    justify-self: start;
  }
  .rating-list {
    gap: 16px;
    margin-top: 20px;
  }
  .rating-item {
    gap: 16px;
    padding: 18px 14px;
  }
  .rating-item strong {
    font-size: 16px;
    line-height: 1.75;
  }
  .rating-scale { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .rating-button {
    min-height: 44px;
    padding: 0;
  }
  .submit-panel {
    margin-top: 20px;
    padding: 18px 14px;
  }
  .result-stage {
    min-height: auto;
    place-items: start;
  }
  .result-summary {
    font-size: 21px;
    line-height: 1.65;
  }
  .type-picture {
    grid-template-columns: 1fr;
  }
  .type-copy {
    padding: 20px 18px 0;
  }
  .type-copy h3 {
    font-size: 24px;
  }
  .type-art {
    min-height: 170px;
  }
  .score-row {
    align-items: start;
    gap: 8px 10px;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 14px;
  }
  .score-row strong,
  .score-row > span:first-of-type {
    grid-column: 1;
  }
  .score-row .bar-track {
    grid-column: 1 / -1;
  }
  .score-row > span:last-child {
    grid-column: 2;
    grid-row: 1 / span 2;
    white-space: nowrap;
  }
}
