:root {
  color-scheme: light;
  --bg: #ffffff;
  --bg-deep: #f5d99c;
  --paper: #fffaf0;
  --paper-strong: #fff2c9;
  --ink: #3b2818;
  --muted: #7a6042;
  --line: #d8ad63;
  --accent: #9a642d;
  --accent-strong: #704016;
  --butter: #f3c76a;
  --cream: #fff8e6;
  --green: #8fae6b;
  --berry: #8c6aa8;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
}

body::before {
  content: none;
}

button,
a {
  font: inherit;
}

.app {
  width: min(1080px, calc(100% - 32px));
  min-height: calc(100vh - 38px);
  margin: 0 auto;
  display: grid;
  align-items: center;
  padding: 36px 0;
  position: relative;
}

.screen {
  display: none;
}

.screen-active {
  display: block;
}

.intro {
  display: none;
  max-width: 560px;
  margin: 0 auto;
}

.intro.screen-active {
  display: grid;
}

.intro-copy,
.result-card,
.quiz {
  position: relative;
  background: rgba(255, 250, 240, 0.68);
  border: 1px solid rgba(154, 100, 45, 0.24);
  border-radius: 8px;
  box-shadow: 0 18px 58px rgba(112, 64, 22, 0.1);
  backdrop-filter: blur(18px);
}

.intro-copy::after,
.quiz::after,
.result-card::after {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px dashed rgba(154, 100, 45, 0.26);
  border-radius: 6px;
  pointer-events: none;
}

.intro-copy {
  padding: clamp(28px, 5vw, 56px);
  display: grid;
  gap: 12px;
}

.intro-image {
  margin: 0;
  padding: 0;
  overflow: hidden;
  justify-self: center;
  width: min(100%, 320px);
  border-radius: 0;
  background: transparent;
  border: 0;
}

.intro-image img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 6px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0;
}

h1,
h2 {
  margin: 0;
  line-height: 1.08;
  letter-spacing: 0;
}

h1 {
  max-width: 10em;
  font-size: clamp(2.35rem, 6vw, 5rem);
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2.35rem);
}

.lead {
  max-width: 43rem;
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.65;
}

.intro-copy .subtitle {
  margin: -10px 0 2px;
  color: rgba(122, 96, 66, 0.62);
  font-size: clamp(1.05rem, 2.4vw, 1.35rem);
  font-weight: 800;
  line-height: 1.35;
}

.primary-btn,
.ghost-btn {
  min-height: 46px;
  border-radius: 8px;
  border: 1px solid transparent;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.primary-btn {
  background: rgba(154, 100, 45, 0.92);
  color: var(--cream);
  box-shadow: 0 10px 20px rgba(154, 100, 45, 0.22);
}

.primary-btn:hover:not(:disabled),
.ghost-btn:hover {
  transform: translateY(-1px);
}

.primary-btn:disabled {
  cursor: not-allowed;
  opacity: 0.48;
  box-shadow: none;
}

.ghost-btn {
  background: rgba(255, 248, 230, 0.46);
  border-color: rgba(216, 173, 99, 0.76);
  color: var(--accent-strong);
}

.quiz {
  padding: clamp(22px, 4vw, 44px);
}

.quiz-top {
  display: grid;
  gap: 20px;
}

.progress-shell {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #ecd4a4;
}

.progress-bar {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--butter));
  transition: width 220ms ease;
}

.options {
  display: grid;
  gap: 14px;
  margin: 34px 0;
}

.option {
  width: 100%;
  min-height: 58px;
  border: 1px solid rgba(216, 173, 99, 0.72);
  border-radius: 8px;
  background: rgba(255, 248, 230, 0.54);
  padding: 18px;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.option:hover,
.option-selected {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.option-selected {
  background: rgba(255, 233, 173, 0.72);
}

.quiz-actions,
.result-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.result {
  max-width: 980px;
  margin: 0 auto;
}

.result-card {
  padding: clamp(22px, 4vw, 44px);
  display: grid;
  grid-template-columns: minmax(220px, 0.75fr) minmax(0, 1.25fr);
  gap: clamp(22px, 4vw, 44px);
  align-items: center;
}

.mantou-frame {
  position: relative;
  width: min(100%, 320px);
  aspect-ratio: 1 / 1;
  overflow: hidden;
  justify-self: center;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.42);
}

.mantou-photo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.result-heading {
  display: grid;
  gap: 6px;
  margin: 0 0 18px;
}

.result-heading span {
  color: var(--accent);
  font-size: 1rem;
  font-weight: 800;
}

.result-heading strong {
  color: var(--ink);
  font-size: clamp(2.2rem, 5vw, 4.5rem);
  line-height: 0.98;
  font-weight: 950;
}

.result-description {
  display: grid;
  gap: 8px;
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.62;
}

.result-description p {
  margin: 0;
}

.credit {
  position: relative;
  z-index: 1;
  padding: 0 0 12px;
  text-align: center;
  font-size: 0.68rem;
  letter-spacing: 0;
}

.credit a {
  color: rgba(74, 42, 25, 0.42);
  text-decoration: none;
}

.credit a:hover {
  color: rgba(74, 42, 25, 0.68);
}

@media (max-width: 760px) {
  .app {
    width: min(100% - 24px, 1080px);
    padding: 18px 0;
  }

  .intro.screen-active {
    display: block;
  }

  .intro-copy {
    padding: 24px;
  }

  .result-card {
    grid-template-columns: 1fr;
  }

  .mantou-frame {
    max-width: 340px;
    margin: 0 auto;
  }

  .quiz-actions,
  .result-actions {
    flex-direction: column-reverse;
  }

  .primary-btn,
  .ghost-btn {
    width: 100%;
  }
}
