:root {
  color-scheme: light;
  --paper: #eaf3fa;
  --paper-white: #fbf9f4;
  --ink: #202833;
  --muted: #65717d;
  --line: rgba(32, 40, 51, 0.22);
  --blue: #bddcee;
  --lavender: #dcd4ee;
  --mint: #c7e6da;
  --peach: #f6d7c8;
  --coral: #e86b57;
  --shadow: 4px 5px 0 rgba(32, 40, 51, 0.13);
  --display: "Hannotate SC", "HanziPen SC", "STKaiti", "PingFang SC", sans-serif;
  --body: "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
html { background: #dce8f2; }
body {
  margin: 0;
  min-width: 320px;
  background: #dce8f2;
  color: var(--ink);
  font-family: var(--body);
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; }
button { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible, a:focus-visible {
  outline: 4px solid rgba(232, 107, 87, 0.34);
  outline-offset: 3px;
}

.page-shell {
  width: min(100%, 560px);
  min-height: 100vh;
  margin: 0 auto;
  background: var(--paper);
  overflow: hidden;
}
.paper-panel {
  background: var(--paper-white);
  border: 2px solid var(--ink);
  border-radius: 24px 20px 26px 18px;
  box-shadow: var(--shadow);
}

/* Intro */
.intro { padding: 14px; }
.intro-hero { padding: 18px 18px 22px; background: var(--paper); }
.brand-row, .quiz-head > div, .result-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.brand-row {
  padding-bottom: 14px;
  border-bottom: 2px dashed rgba(32, 40, 51, 0.26);
  font-size: 13px;
  font-weight: 700;
}
.brand-word { letter-spacing: 0.08em; }
.issue {
  padding: 4px 9px;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  background: var(--lavender);
}
.intro-copy { padding: 24px 2px 16px; }
.eyebrow, .report-label {
  display: inline-block;
  margin: 0 0 12px;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--lavender);
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
  transform: rotate(-1deg);
}
.intro-copy h1, .result-hero h1, .question-panel h1, .analyzing h1 {
  margin: 0;
  font-family: var(--display);
  font-weight: 900;
  letter-spacing: 0.01em;
}
.intro-copy h1 { font-size: clamp(36px, 9vw, 54px); line-height: 1.2; }
.intro-copy h1 em, .result-hero h1 em {
  color: var(--coral);
  font-style: normal;
  text-decoration: underline;
  text-decoration-thickness: 7px;
  text-decoration-color: rgba(232, 107, 87, 0.38);
  text-underline-offset: -2px;
}
.lede {
  margin: 18px 0 0;
  color: #414b56;
  font-size: 16px;
  line-height: 1.78;
}
.intro-visual { margin: 4px 0 0; }
.intro-visual img, .result-illustration img, .analyzing-card img {
  display: block;
  width: 100%;
  height: auto;
  border: 2px solid var(--ink);
  border-radius: 22px 18px 24px 16px;
}
.hero-hand-note {
  width: max-content;
  max-width: 100%;
  margin: -14px auto 0;
  padding: 9px 14px;
  position: relative;
  z-index: 1;
  background: var(--peach);
  border: 2px solid var(--ink);
  border-radius: 10px 14px 9px 16px;
  font-family: var(--display);
  font-size: 17px;
  font-weight: 800;
  transform: rotate(-1deg);
}
.intro-bottom { margin-top: 16px; padding: 20px 18px 18px; }
.intro-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.intro-stats div {
  min-height: 88px;
  padding: 12px;
  border: 1.5px solid var(--ink);
  border-radius: 16px;
  text-align: center;
}
.intro-stats div:nth-child(1) { background: var(--lavender); }
.intro-stats div:nth-child(2) { background: var(--mint); }
.intro-stats div:nth-child(3) { background: var(--peach); }
.intro-stats strong { display: block; font-family: var(--display); font-size: 29px; }
.intro-stats span { color: #46515d; font-size: 13px; }
.source-note {
  display: grid;
  gap: 4px;
  margin: 14px 0 18px;
  padding: 12px 14px;
  background: rgba(220, 212, 238, 0.52);
  border-left: 4px solid var(--coral);
  border-radius: 8px 14px 12px 8px;
  color: #46515d;
  font-size: 13px;
  line-height: 1.65;
}
.source-note strong { color: var(--ink); font-size: 13px; }
.delivery-preview {
  margin: 18px 0;
  padding: 16px;
  background: var(--blue);
  border: 2px solid var(--ink);
  border-radius: 18px 23px 16px 20px;
}
.delivery-preview > p { margin: 0 0 10px; font-family: var(--display); font-size: 21px; font-weight: 900; }
.delivery-preview div { display: grid; grid-template-columns: 36px 1fr; gap: 10px; align-items: center; padding: 9px 0; border-top: 1.5px dashed rgba(32, 40, 51, 0.3); }
.delivery-preview strong { color: var(--coral); }
.delivery-preview span { font-size: 14px; font-weight: 700; }
.access-form label { display: block; margin-bottom: 9px; font-weight: 800; }
.access-field {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  background: #fff;
  border: 2px solid var(--ink);
  border-radius: 14px 18px 12px 16px;
  overflow: hidden;
}
.access-field input {
  width: 100%;
  min-height: 58px;
  padding: 0 14px;
  background: transparent;
  border: 0;
  color: var(--ink);
  font-size: 18px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.access-field input:focus { outline: 0; }
.access-field span { padding: 8px 12px; margin-right: 8px; border-radius: 999px; background: var(--lavender); font-size: 12px; font-weight: 800; }
.access-field.has-error { border-color: #b43d31; }
.access-rule, .privacy, .access-error { margin: 8px 0 0; font-size: 12px; line-height: 1.6; }
.access-rule, .privacy { color: var(--muted); }
.access-error { min-height: 19px; color: #a62f27; font-weight: 700; }
.button {
  width: 100%;
  min-height: 56px;
  padding: 14px 18px;
  border: 2px solid var(--ink);
  border-radius: 16px 19px 14px 18px;
  box-shadow: 3px 4px 0 rgba(32, 40, 51, 0.18);
  font-family: var(--display);
  font-size: 18px;
  font-weight: 900;
  cursor: pointer;
}
.button:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 rgba(32, 40, 51, 0.18); }
.button.primary { margin-top: 10px; background: var(--coral); color: #fff; }
.button.secondary { background: var(--mint); }
.access-ready { margin: 16px 0 8px; padding: 12px; background: var(--mint); border: 1.5px solid var(--ink); border-radius: 14px; font-weight: 700; text-align: center; }
.notice { margin-top: 24px; padding: 16px 0 0; border-top: 2px dashed var(--line); }
.notice header { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.notice header span { color: var(--coral); font-size: 12px; font-weight: 800; }
.notice h2 { margin: 0; font-family: var(--display); font-size: 23px; }
.notice ul { margin: 12px 0; padding-left: 22px; color: #49545f; font-size: 13px; line-height: 2; }
.notice > p, .intro footer { color: var(--muted); font-size: 12px; text-align: center; }
.intro footer { margin-top: 22px; }

/* Quiz */
.quiz { padding-bottom: 24px; }
.quiz-head {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
  padding: 14px;
  background: var(--paper-white);
  border-bottom: 2px solid var(--ink);
}
.quiz-head > div span { font-size: 13px; font-weight: 800; }
.quiz-head > div strong { font-size: 14px; }
.icon-button {
  min-width: 64px;
  min-height: 44px;
  border: 1.5px solid var(--ink);
  border-radius: 12px;
  background: var(--lavender);
  font-weight: 800;
}
.progress { height: 8px; background: rgba(32, 40, 51, 0.12); }
.progress i { display: block; height: 100%; background: var(--coral); transition: width 0.25s ease; }
.section-marker {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 12px;
  align-items: center;
  margin: 16px 14px 0;
  padding: 12px 14px;
  background: var(--blue);
  border: 1.5px solid var(--ink);
  border-radius: 14px 19px 13px 17px;
}
.section-marker > span { font-family: var(--display); font-size: 33px; color: var(--coral); }
.section-marker strong { font-size: 16px; }
.section-marker p { margin: 3px 0 0; color: #53606c; font-size: 12px; line-height: 1.5; }
.question-panel { margin: 14px; padding: 20px 18px 18px; }
.question-meta { display: flex; align-items: center; justify-content: space-between; }
.question-meta span { padding: 6px 11px; border-radius: 999px; background: var(--mint); font-size: 13px; font-weight: 800; }
.question-meta b { color: rgba(32, 40, 51, 0.28); font-family: var(--display); font-size: 38px; }
.question-panel h1 { margin-top: 18px; font-size: clamp(28px, 7.4vw, 42px); line-height: 1.42; }
.question-value { display: inline-block; margin: 16px 0 4px; padding: 7px 10px; background: var(--peach); border-radius: 8px; font-size: 12px; font-weight: 700; transform: rotate(-0.5deg); }
.scale-list { margin-top: 16px; display: grid; gap: 9px; }
.scale-option {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 10px;
  align-items: center;
  min-height: 76px;
  padding: 11px 13px;
  background: var(--paper-white);
  border: 1.5px solid var(--ink);
  border-radius: 14px 18px 13px 16px;
  text-align: left;
  cursor: pointer;
}
.scale-option.selected { background: var(--coral); color: #fff; box-shadow: 3px 4px 0 rgba(32, 40, 51, 0.2); }
.scale-number { color: var(--coral); font-weight: 900; }
.scale-option.selected .scale-number { color: #fff; }
.scale-copy strong, .scale-copy small { display: block; }
.scale-copy strong { font-size: 16px; }
.scale-copy small { margin-top: 3px; color: var(--muted); font-size: 11px; }
.scale-option.selected small { color: rgba(255, 255, 255, 0.86); }
.scale-check { opacity: 0; padding: 4px 7px; border: 1px solid currentColor; border-radius: 999px; font-size: 10px; }
.scale-option.selected .scale-check { opacity: 1; }
.question-foot { margin: 18px 0 0; color: var(--muted); font-size: 12px; text-align: center; }

/* Analyzing */
.analyzing { display: grid; place-items: center; padding: 18px; }
.analyzing-card { width: 100%; padding: 18px; text-align: center; }
.analyzing-card img { max-height: 330px; object-fit: cover; object-position: center; }
.analyzing-card > p { display: inline-block; margin: 18px 0 8px; padding: 6px 10px; background: var(--lavender); border-radius: 999px; font-weight: 800; }
.analyzing h1 { font-size: 29px; line-height: 1.45; }
.analysis-steps { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 18px; font-size: 12px; }
.analysis-steps i { width: 24px; border-top: 2px dashed var(--coral); }
.analysis-steps strong { padding: 6px 9px; background: var(--mint); border-radius: 999px; }

/* Result */
.result { padding-bottom: 34px; }
.result-toolbar {
  position: sticky;
  top: 0;
  z-index: 10;
  min-height: 58px;
  padding: 10px 14px;
  background: rgba(251, 249, 244, 0.97);
  border-bottom: 2px solid var(--ink);
}
.result-toolbar button { min-height: 36px; padding: 0 10px; border: 1.5px solid var(--ink); border-radius: 999px; background: var(--lavender); font-size: 12px; font-weight: 800; }
.result-toolbar span { font-size: 12px; font-weight: 800; }
.result-hero { margin: 14px; padding: 22px 18px 20px; background: var(--paper); }
.result-hero h1 { font-size: clamp(34px, 8.8vw, 52px); line-height: 1.28; }
.result-combo {
  display: inline-block;
  margin-top: 18px;
  padding: 9px 13px;
  background: var(--peach);
  border: 2px solid var(--ink);
  border-radius: 10px 15px 9px 13px;
  font-family: var(--display);
  font-size: 22px;
  font-weight: 900;
  transform: rotate(-0.8deg);
}
.hero-lede { margin: 16px 0; font-size: 15px; line-height: 1.8; }
.result-illustration { margin: 14px 0; }
.result-illustration img { max-height: 350px; object-fit: cover; object-position: center; }
.combination-note {
  margin-top: 14px;
  padding: 16px;
  background: var(--mint);
  border: 2px solid var(--ink);
  border-radius: 18px 14px 20px 13px;
  box-shadow: 3px 4px 0 rgba(32, 40, 51, 0.14);
}
.combination-note span { display: block; margin-bottom: 7px; color: #b3473b; font-size: 12px; font-weight: 900; }
.combination-note p { margin: 0; font-family: var(--display); font-size: 19px; font-weight: 800; line-height: 1.65; }
.hero-note { display: grid; gap: 3px; margin-top: 14px; color: var(--muted); font-size: 11px; }
.hero-note strong { color: var(--ink); font-size: 12px; }
.result-summary {
  display: grid;
  gap: 10px;
  margin: 0 14px 14px;
}
.result-summary div { padding: 14px; border: 1.5px solid var(--ink); border-radius: 14px; }
.result-summary div:nth-child(1) { background: var(--peach); }
.result-summary div:nth-child(2) { background: var(--lavender); }
.result-summary div:nth-child(3) { background: var(--mint); }
.result-summary span, .result-summary strong { display: block; }
.result-summary span { margin-bottom: 5px; color: var(--muted); font-size: 11px; }
.result-summary strong { font-size: 14px; line-height: 1.55; }
.report-section {
  margin: 14px;
  padding: 20px 18px;
  background: var(--paper-white);
  border: 2px solid var(--ink);
  border-radius: 20px 15px 23px 17px;
  box-shadow: var(--shadow);
}
.report-section:nth-of-type(even) { background: rgba(220, 212, 238, 0.44); }
.section-heading { display: grid; grid-template-columns: 50px 1fr; gap: 10px; align-items: start; margin-bottom: 18px; }
.section-heading > span { color: var(--coral); font-family: var(--display); font-size: 35px; }
.section-heading p { margin: 1px 0 4px; color: #b3473b; font-size: 12px; font-weight: 900; }
.section-heading h2 { margin: 0; font-family: var(--display); font-size: 24px; line-height: 1.4; }
.belief-shift { display: grid; gap: 12px; }
.belief-shift article { padding: 15px; border: 1.5px solid var(--ink); border-radius: 15px; }
.belief-shift article:first-child { background: var(--peach); }
.belief-shift article:last-child { background: var(--mint); }
.belief-shift span { font-size: 12px; font-weight: 900; }
.belief-shift p { margin: 8px 0 0; font-family: var(--display); font-size: 18px; font-weight: 800; line-height: 1.65; }
.source-list { display: grid; gap: 12px; }
.source-card { display: grid; grid-template-columns: 42px 1fr; gap: 10px; padding: 15px; background: var(--blue); border: 1.5px solid var(--ink); border-radius: 16px 20px 14px 18px; }
.source-card:nth-child(2) { background: var(--peach); }
.source-index { color: var(--coral); font-family: var(--display); font-size: 26px; }
.source-main > p:first-child { margin: 0 0 4px; color: #46525e; font-size: 11px; font-weight: 800; }
.source-main h3 { margin: 0; font-family: var(--display); font-size: 22px; line-height: 1.4; }
.source-values { display: flex; align-items: center; gap: 8px; margin: 11px 0; font-size: 11px; }
.source-values i { width: 24px; border-top: 2px dashed var(--ink); }
.source-insight { margin: 0; font-size: 13px; line-height: 1.75; }
.chart-legend { display: flex; justify-content: flex-end; gap: 14px; margin-bottom: 12px; color: var(--muted); font-size: 11px; }
.chart-legend i { display: inline-block; width: 10px; height: 10px; margin-right: 5px; border: 1px solid var(--ink); border-radius: 3px; }
.chart-legend .pref { background: var(--lavender); }
.chart-legend .env { background: var(--coral); }
.dimension-row { padding: 12px 0; border-top: 1px dashed var(--line); }
.dimension-title { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.dimension-title strong { font-size: 14px; }
.dimension-title span { color: var(--muted); font-size: 11px; }
.axis { position: relative; height: 18px; margin: 0 7px; }
.axis-line { position: absolute; top: 8px; left: 0; width: 100%; border-top: 2px solid rgba(32, 40, 51, 0.24); }
.marker { position: absolute; top: 1px; width: 15px; height: 15px; margin-left: -7px; border: 2px solid var(--ink); border-radius: 4px; }
.marker.pref { background: var(--lavender); transform: rotate(-8deg); }
.marker.env { background: var(--coral); border-radius: 50%; }
.axis-labels { display: flex; justify-content: space-between; color: var(--muted); font-size: 10px; }
.scale-note { margin: 12px 0 0; color: var(--muted); font-size: 10px; line-height: 1.6; }
.compatible-grid { display: grid; gap: 10px; }
.compatible-grid > div { padding: 14px; background: var(--mint); border: 1.5px solid var(--ink); border-radius: 14px; }
.compatible-grid span, .compatible-grid strong { display: inline-block; margin-right: 7px; }
.compatible-grid strong { padding: 3px 7px; background: var(--paper-white); border-radius: 999px; font-size: 11px; }
.compatible-grid p { margin: 8px 0 0; font-size: 13px; line-height: 1.7; }
.filter-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.filter-list li { display: grid; grid-template-columns: 35px 1fr; gap: 10px; align-items: start; padding: 13px; background: var(--blue); border: 1.5px solid var(--ink); border-radius: 13px; }
.filter-list span { color: var(--coral); font-weight: 900; }
.filter-list p { margin: 0; font-size: 13px; line-height: 1.65; }
.reversal { margin-top: 14px; padding: 14px; background: var(--peach); border-radius: 13px; }
.reversal strong { font-size: 13px; }
.reversal p { margin: 8px 0 0; font-size: 11px; line-height: 1.6; }
.action-grid { display: grid; gap: 12px; }
.action-grid article { padding: 15px; border: 1.5px solid var(--ink); border-radius: 16px; background: var(--lavender); }
.action-grid article:nth-child(2) { background: var(--mint); }
.action-grid article:nth-child(3) { background: var(--peach); }
.action-grid article > span { font-size: 11px; font-weight: 900; }
.action-grid h3 { margin: 3px 0 10px; font-family: var(--display); font-size: 24px; }
.action-grid p { margin: 8px 0 0; font-size: 12px; line-height: 1.7; }
.action-grid b { display: block; margin-bottom: 3px; color: #a53f35; }
.share-card { margin: 14px; padding: 24px 20px; background: var(--peach); border: 2px solid var(--ink); border-radius: 22px 16px 24px 18px; box-shadow: var(--shadow); }
.share-card p { display: inline-block; margin: 0; padding: 6px 10px; background: var(--lavender); border-radius: 999px; font-size: 12px; font-weight: 900; }
.share-card h2 { margin: 18px 0 12px; font-family: var(--display); font-size: 31px; line-height: 1.35; }
.share-card strong { display: block; margin-bottom: 18px; font-family: var(--display); font-size: 16px; line-height: 1.65; }
.share-card > span { color: var(--muted); font-size: 11px; }
.report-footer { margin: 24px 14px; color: var(--muted); font-size: 10px; text-align: center; }
.report-footer span { display: block; margin-bottom: 5px; font-weight: 800; }
.report-footer p { margin: 0; }
.result-actions { display: grid; gap: 9px; margin: 0 14px; }
.result-actions .button { margin: 0; }
.text-button { min-height: 46px; border: 0; background: transparent; font-weight: 800; text-decoration: underline; }

/* Result typography: one family, three sizes. Weight and color carry the remaining hierarchy. */
#app .result {
  --result-title-size: clamp(34px, 8.4vw, 42px);
  --result-heading-size: 20px;
  --result-body-size: 14px;
  font-family: var(--body);
  font-size: var(--result-body-size);
}
#app .result,
#app .result * {
  font-family: var(--body);
}
#app .result * { font-size: inherit; }
#app .result .result-hero h1 { font-size: var(--result-title-size); }
#app .result .result-combo,
#app .result .combination-note p,
#app .result .section-heading > span,
#app .result .section-heading h2,
#app .result .belief-shift p,
#app .result .source-index,
#app .result .source-main h3,
#app .result .action-grid h3,
#app .result .share-card h2 {
  font-size: var(--result-heading-size);
}

/* Share modal */
.image-modal { position: fixed; inset: 0; z-index: 30; padding: 18px; overflow: auto; background: rgba(32, 40, 51, 0.74); }
.image-modal[hidden] { display: none; }
.image-modal-panel { width: min(100%, 460px); margin: 0 auto; padding: 16px; background: var(--paper); border: 2px solid var(--ink); border-radius: 20px; }
.image-modal-panel header { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.image-modal-panel header strong, .image-modal-panel header span { display: block; }
.image-modal-panel header span { margin-top: 3px; color: var(--muted); font-size: 11px; }
.image-modal-panel header button { min-height: 38px; padding: 0 12px; border: 1.5px solid var(--ink); border-radius: 999px; background: var(--lavender); }
.image-modal-panel img { display: block; width: 100%; border: 1.5px solid var(--ink); }
.image-modal-panel a { display: block; margin-top: 12px; padding: 13px; background: var(--coral); border: 2px solid var(--ink); border-radius: 13px; color: #fff; font-weight: 800; text-align: center; text-decoration: none; }

@media (max-width: 420px) {
  .intro { padding: 10px; }
  .intro-hero, .intro-bottom { padding-left: 15px; padding-right: 15px; }
  .question-panel, .result-hero, .report-section, .share-card { margin-left: 10px; margin-right: 10px; }
  .result-summary, .result-actions { margin-left: 10px; margin-right: 10px; }
  .section-heading { grid-template-columns: 42px 1fr; }
  .section-heading > span { font-size: 30px; }
  .result-toolbar span { display: none; }
}

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

@media print {
  html, body, .page-shell { background: #fff; }
  .result-toolbar, .result-actions { display: none; }
  .report-section, .result-hero, .share-card { box-shadow: none; break-inside: avoid; }
}
