:root {
  color-scheme: light;
  --bg: #f1f8f7;
  --surface: #ffffff;
  --text: #153a3c;
  --text-strong: #073f41;
  --muted: #607375;
  --accent: #087f78;
  --accent-dark: #066861;
  --accent-soft: #e8f5f3;
  --line: #d7e5e3;
  --warning: #895913;
  --warning-bg: #fff8eb;
  --warning-line: #efd9ad;
  --shadow: 0 18px 48px rgba(15, 65, 65, 0.08);
  --radius-lg: 28px;
  --radius-md: 16px;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 0%, rgba(8, 127, 120, 0.08), transparent 34rem),
    var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

.app-shell {
  width: min(100%, 520px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 20px 16px;
}

.screen {
  min-height: calc(100vh - 40px);
  padding: clamp(26px, 7vw, 44px) clamp(20px, 6vw, 34px);
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.home-screen {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.home-content {
  margin: auto 0;
}

.title {
  max-width: 12em;
  margin: 0;
  color: var(--text-strong);
  font-size: clamp(35px, 10vw, 52px);
  font-weight: 750;
  letter-spacing: -0.04em;
  line-height: 1.28;
}

h1[tabindex="-1"]:focus {
  outline: none;
}

.title-rule {
  width: 48px;
  height: 4px;
  margin: 30px 0;
  background: var(--accent);
  border-radius: 99px;
}

.subtitle {
  margin: 0;
  color: #334f51;
  font-size: 17px;
  line-height: 1.9;
}

.button {
  display: inline-flex;
  min-height: 54px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 14px;
  cursor: pointer;
  font-size: 17px;
  font-weight: 700;
  transition: background-color 120ms ease, border-color 120ms ease;
}

.button:focus-visible,
.option:has(input:focus-visible) {
  outline: 3px solid rgba(8, 127, 120, 0.24);
  outline-offset: 3px;
}

.button-primary {
  color: #fff;
  background: var(--accent);
}

.button-primary:hover {
  background: var(--accent-dark);
}

.button-primary:disabled {
  cursor: not-allowed;
  background: #aac9c6;
}

.button-secondary {
  color: var(--accent-dark);
  background: transparent;
  border-color: var(--accent);
}

.start-button {
  width: 100%;
  min-height: 62px;
  margin-top: 38px;
  font-size: 20px;
}

.disclaimer {
  margin: 28px 0 0;
  padding: 14px 16px;
  color: var(--muted);
  background: var(--accent-soft);
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.65;
  text-align: center;
}

.progress-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 10px;
}

.progress-count {
  color: var(--text-strong);
  font-size: 28px;
  font-weight: 750;
}

.progress-label {
  color: var(--muted);
  font-size: 14px;
}

.progress-track,
.dimension-track {
  overflow: hidden;
  width: 100%;
  background: #e8eeed;
  border-radius: 99px;
}

.progress-track {
  height: 8px;
  margin-bottom: 34px;
}

.progress-fill,
.dimension-fill {
  height: 100%;
  background: var(--accent);
  border-radius: inherit;
}

.question-title {
  margin: 0 0 24px;
  color: #183b3d;
  font-size: clamp(22px, 6vw, 27px);
  line-height: 1.55;
}

.options {
  display: grid;
  gap: 13px;
  margin: 0;
  padding: 0;
  border: 0;
}

.option {
  display: grid;
  min-height: 76px;
  grid-template-columns: 27px 1fr;
  gap: 13px;
  align-items: center;
  padding: 15px 16px;
  border: 1px solid #c9d5d4;
  border-radius: 14px;
  cursor: pointer;
  color: #253f40;
  background: #fff;
  line-height: 1.55;
}

.option:hover {
  border-color: #88b6b2;
}

.option.selected {
  color: var(--text-strong);
  background: var(--accent-soft);
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.option input {
  width: 22px;
  height: 22px;
  margin: 0;
  accent-color: var(--accent);
}

.option-letter {
  margin-right: 5px;
  font-weight: 750;
}

.question-actions {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 12px;
  margin-top: 28px;
}

.question-actions.single {
  grid-template-columns: 1fr;
}

.score-line {
  margin: 0 0 8px;
  color: var(--text-strong);
  font-size: clamp(24px, 7vw, 34px);
  font-weight: 750;
}

.score-number {
  font-size: 1.45em;
}

.result-title {
  margin: 16px 0 14px;
  color: var(--text-strong);
  font-size: clamp(26px, 7.5vw, 34px);
  line-height: 1.35;
}

.result-description {
  margin: 0 0 32px;
  color: #415b5d;
  font-size: 16px;
  line-height: 1.9;
}

.section-title {
  margin: 32px 0 18px;
  color: var(--text-strong);
  font-size: 20px;
}

.dimensions {
  display: grid;
  gap: 18px;
}

.dimension-topline {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  font-size: 15px;
}

.dimension-percent {
  color: var(--accent-dark);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.dimension-track {
  height: 9px;
}

.notice-list {
  display: grid;
  gap: 12px;
  margin-top: 30px;
}

.notice {
  padding: 17px 18px;
  color: var(--warning);
  background: var(--warning-bg);
  border: 1px solid var(--warning-line);
  border-radius: var(--radius-md);
  font-size: 15px;
  line-height: 1.75;
}

.notice strong {
  display: block;
  margin-bottom: 5px;
  font-size: 16px;
}

.next-step {
  padding: 18px;
  color: #195653;
  background: var(--accent-soft);
  border-radius: var(--radius-md);
  font-size: 16px;
  line-height: 1.75;
}

.restart-button {
  width: 100%;
  margin-top: 24px;
}

@media (min-width: 640px) {
  .app-shell {
    padding-block: 34px;
  }

  .screen {
    min-height: calc(100vh - 68px);
  }
}

@media (max-width: 360px) {
  .screen {
    padding-inline: 18px;
    border-radius: 22px;
  }

  .option {
    padding-inline: 13px;
  }

  .question-actions {
    grid-template-columns: 1fr;
  }
}

/* Final-reference refinements */
.option.selected {
  color: #385343;
  background: #edf3e9;
  border-color: #789779;
  box-shadow: inset 0 0 0 1px #789779;
}

.option.selected .option-letter {
  color: #497452;
}

.option input {
  accent-color: #63896a;
}

.question-title,
.options,
.result-description,
.dimensions,
.next-step {
  border-radius: 18px;
}

.question-title {
  border-radius: 18px 18px 0 0;
}

.options {
  border-radius: 0 0 18px 18px;
}

.result-title {
  margin: 4px 0 10px;
}

.score-line {
  display: block;
  margin: 0 0 22px;
  padding: 0;
  color: #7b7467;
  background: transparent;
  border-radius: 0;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.04em;
  transform: none;
}

.score-number {
  color: #496c53;
  font-size: 1.15em;
  font-weight: 750;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

/* Warm stationery visual direction */
:root {
  --bg: #eee1cc;
  --surface: #fbf6ea;
  --text: #3f4038;
  --text-strong: #283a35;
  --muted: #766f62;
  --accent: #5e8d63;
  --accent-dark: #406f4b;
  --accent-soft: #edf2e7;
  --line: #ddd2c0;
  --warning: #76542d;
  --warning-bg: #fff0cb;
  --warning-line: #d5ad63;
  --blue: #315f91;
  --yellow: #e9bd60;
  --shadow: 0 18px 45px rgba(93, 72, 41, 0.14);
  --radius-lg: 30px;
  --radius-md: 14px;
}

html {
  background: var(--bg);
}

body {
  color: var(--text);
  background-color: var(--bg);
  background-image: url("assets/warm-grid-paper.png");
  background-position: center top;
  background-size: 760px auto;
  font-family: "Songti SC", "STSong", "Noto Serif CJK SC", "SimSun", serif;
}

.app-shell {
  width: min(100%, 480px);
  padding: 12px;
}

.screen {
  position: relative;
  overflow: hidden;
  min-height: calc(100vh - 24px);
  padding: 34px 22px 28px;
  background-color: rgba(251, 246, 234, 0.95);
  background-image: url("assets/warm-grid-paper.png");
  background-position: center top;
  background-size: 660px auto;
  border: 1px solid rgba(205, 184, 149, 0.55);
  box-shadow: var(--shadow);
}

.home-screen {
  justify-content: flex-start;
  padding-top: clamp(48px, 11vh, 86px);
}

.home-content {
  display: flex;
  width: 100%;
  min-height: 100%;
  flex-direction: column;
  margin: 0;
}

.title {
  max-width: 11em;
  color: #26342f;
  font-family: "Kaiti SC", "STKaiti", "KaiTi", serif;
  font-size: clamp(35px, 10.5vw, 48px);
  font-weight: 700;
  letter-spacing: 0.015em;
  line-height: 1.38;
  text-shadow: 0 1px 0 #fff8e8;
}

.title-rule {
  width: 152px;
  height: 9px;
  margin: 8px 0 27px;
  background: rgba(233, 189, 96, 0.82);
  border-radius: 5px 1px 6px 2px;
  transform: rotate(-1.5deg);
}

.subtitle {
  color: #5d5b53;
  font-size: 16px;
  line-height: 1.95;
}

.button {
  border-radius: 999px;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  font-weight: 650;
  letter-spacing: 0.02em;
  box-shadow: 0 8px 18px rgba(64, 111, 75, 0.13);
}

.button-primary {
  color: #fffdf6;
  background-color: var(--accent);
  background-image: linear-gradient(135deg, #6c9a6e, #487953);
}

.button-primary:hover {
  background: var(--accent-dark);
}

.button-primary:disabled {
  color: rgba(255, 253, 246, 0.8);
  background: #b9c4ab;
  box-shadow: none;
}

.button-secondary {
  color: #68685f;
  background: rgba(255, 252, 245, 0.76);
  border-color: #c8c1b5;
  box-shadow: none;
}

.start-button {
  min-height: 60px;
  margin-top: 28px;
  font-size: 20px;
}

.disclaimer {
  position: relative;
  z-index: 2;
  margin: 20px 10px 0;
  padding: 14px 18px;
  color: #716b60;
  background: rgba(247, 230, 190, 0.72);
  border: 1px solid rgba(211, 181, 123, 0.38);
  border-radius: 3px 9px 4px 10px;
  font-size: 12px;
  line-height: 1.7;
  transform: rotate(-0.7deg);
}

.home-illustration {
  position: relative;
  width: calc(100% + 18px);
  margin: 22px -9px -21px;
}

.home-illustration img {
  display: block;
  width: 100%;
  height: auto;
  filter: saturate(0.88) contrast(0.97);
}

.progress-header {
  margin-bottom: 12px;
}

.progress-count {
  color: #34483f;
  font-family: "Kaiti SC", "STKaiti", "KaiTi", serif;
  font-size: 26px;
  letter-spacing: 0.04em;
}

.progress-label {
  color: #837b6e;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif;
}

.progress-track {
  height: 10px;
  margin-bottom: 23px;
  background: rgba(133, 124, 107, 0.13);
  border: 1px solid rgba(153, 139, 116, 0.07);
}

.progress-fill {
  background: #7ba77b;
}

.question-tag {
  display: inline-block;
  margin: 0 0 -5px 7px;
  padding: 9px 20px 10px;
  color: #254c6f;
  background: #f4d995;
  font-family: "Kaiti SC", "STKaiti", "KaiTi", serif;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.08em;
  transform: rotate(-2deg);
}

.question-title {
  position: relative;
  z-index: 1;
  margin: 0 0 18px;
  padding: 28px 18px 20px;
  color: #34372f;
  background: rgba(255, 253, 247, 0.9);
  border: 1px solid rgba(216, 204, 183, 0.72);
  border-bottom: 0;
  border-radius: 14px 14px 0 0;
  font-family: "Songti SC", "STSong", serif;
  font-size: clamp(21px, 5.8vw, 26px);
  font-weight: 700;
  line-height: 1.7;
  box-shadow: 0 10px 24px rgba(99, 76, 44, 0.08);
}

.options {
  position: relative;
  z-index: 2;
  gap: 10px;
  margin-top: -19px;
  padding: 15px 14px 17px;
  background: rgba(255, 253, 247, 0.92);
  border: 1px solid rgba(216, 204, 183, 0.72);
  border-top: 0;
  border-radius: 0 0 14px 14px;
  box-shadow: 0 12px 26px rgba(99, 76, 44, 0.08);
}

.option {
  min-height: 68px;
  grid-template-columns: 30px 1fr;
  gap: 11px;
  padding: 12px 13px;
  color: #514f47;
  background: rgba(250, 249, 244, 0.94);
  border-color: #dedbd2;
  border-radius: 10px;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 15px;
}

.option:hover {
  border-color: #9cad91;
}

.option.selected {
  color: #304860;
  background: #edf2f7;
  border-color: #6e8fb4;
  box-shadow: inset 0 0 0 1px #6e8fb4;
}

.option input {
  width: 24px;
  height: 24px;
  accent-color: #527caf;
}

.option-letter {
  color: #315f91;
}

.question-actions {
  gap: 10px;
  margin-top: 24px;
}

.question-actions .button {
  min-height: 52px;
}

.score-line {
  display: inline-block;
  margin: 0 0 16px;
  padding: 9px 14px;
  color: #2f567a;
  background: #f2dca5;
  border-radius: 4px 10px 5px 8px;
  font-family: "Kaiti SC", "STKaiti", "KaiTi", serif;
  font-size: clamp(22px, 6.5vw, 30px);
  transform: rotate(-1deg);
}

.result-title {
  position: relative;
  margin: 4px 0 20px;
  color: #274f7c;
  font-family: "Kaiti SC", "STKaiti", "KaiTi", serif;
  font-size: clamp(29px, 8.2vw, 38px);
  font-weight: 700;
  letter-spacing: 0.025em;
  line-height: 1.45;
  text-decoration: underline;
  text-decoration-color: rgba(233, 189, 96, 0.78);
  text-decoration-thickness: 7px;
  text-underline-offset: -2px;
  text-decoration-skip-ink: none;
}

.result-description {
  margin: 0;
  padding: 18px;
  color: #696258;
  background: rgba(255, 253, 247, 0.87);
  border: 1px solid rgba(217, 204, 181, 0.72);
  border-radius: 12px;
  font-size: 15px;
  line-height: 1.95;
  box-shadow: 0 8px 20px rgba(95, 73, 42, 0.06);
}

.section-title {
  margin: 28px 0 15px;
  color: #335a4a;
  font-family: "Kaiti SC", "STKaiti", "KaiTi", serif;
  font-size: 22px;
  letter-spacing: 0.03em;
}

.dimensions {
  gap: 16px;
  padding: 18px;
  background: rgba(255, 253, 247, 0.87);
  border: 1px solid rgba(217, 204, 181, 0.72);
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(95, 73, 42, 0.06);
}

.dimension-topline {
  margin-bottom: 7px;
  color: #555248;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif;
  font-size: 14px;
}

.dimension-percent {
  color: #344e69;
}

.dimension-track {
  height: 9px;
  background: rgba(128, 117, 99, 0.13);
}

.dimension-fill {
  background: #6c966d;
}

.dimension:nth-child(2) .dimension-fill,
.dimension:nth-child(5) .dimension-fill {
  background: #6e8fb9;
}

.dimension:nth-child(4) .dimension-fill {
  background: #b99565;
}

.notice-list {
  gap: 14px;
}

.notice {
  color: #76542d;
  background: rgba(255, 239, 197, 0.9);
  border: 1px solid #d9ba78;
  border-radius: 5px 12px 6px 10px;
  font-family: "Kaiti SC", "STKaiti", "KaiTi", serif;
  font-size: 16px;
  transform: rotate(-0.35deg);
  box-shadow: 0 8px 18px rgba(119, 84, 41, 0.08);
}

.notice:nth-child(even) {
  transform: rotate(0.4deg);
}

.notice strong {
  color: #76542d;
  font-size: 18px;
}

.next-step {
  color: #3b5c53;
  background: rgba(240, 243, 228, 0.9);
  border: 1px solid rgba(145, 163, 119, 0.45);
  border-radius: 12px;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif;
  font-size: 15px;
}

.restart-button {
  min-height: 56px;
}

@media (min-width: 640px) {
  .app-shell {
    padding-block: 24px;
  }

  .screen {
    min-height: calc(100vh - 48px);
  }
}

@media (max-width: 360px) {
  .screen {
    padding: 28px 16px 24px;
  }

  .question-actions {
    grid-template-columns: 1fr 1.2fr;
  }

  .question-actions.single {
    grid-template-columns: 1fr;
  }
}
