:root {
  --ink: #17211c;
  --muted: #637169;
  --paper: #fffaf0;
  --card: rgba(255, 252, 244, 0.86);
  --line: rgba(23, 33, 28, 0.14);
  --moss: #314b3b;
  --fern: #5f7f4f;
  --sun: #f1b84b;
  --coral: #e66b4f;
  --sky: #7db9bf;
  --shadow: 0 28px 70px rgba(39, 56, 43, 0.18);
  --display-font: "Iowan Old Style", "Palatino Linotype", "Noto Serif SC", serif;
  --body-font: "Avenir Next", "Gill Sans", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--ink);
  font-family: var(--body-font);
  background:
    radial-gradient(circle at 16% 12%, rgba(241, 184, 75, 0.42), transparent 28rem),
    radial-gradient(circle at 88% 18%, rgba(125, 185, 191, 0.34), transparent 22rem),
    linear-gradient(135deg, #f9edcf 0%, #e6efe3 52%, #d8ecef 100%);
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  opacity: 0.38;
  background-image:
    linear-gradient(rgba(49, 75, 59, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(49, 75, 59, 0.05) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(to bottom, black, transparent 82%);
}

a {
  color: inherit;
}

.site-header,
.site-footer {
  width: min(1160px, calc(100% - 40px));
  margin: 0 auto;
}

.site-header {
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
  padding: 22px 0 0;
}

.brand-link {
  color: var(--moss);
  font-family: var(--display-font);
  font-size: 1.45rem;
  font-weight: 900;
  letter-spacing: -0.04em;
  text-decoration: none;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.site-nav a,
.site-footer a {
  padding: 8px 12px;
  border: 1px solid rgba(49, 75, 59, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.44);
  color: var(--moss);
  font-size: 0.86rem;
  font-weight: 900;
  text-decoration: none;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: center;
  padding: 0 0 36px;
  color: var(--muted);
}

.site-footer span {
  margin-right: 8px;
  font-weight: 900;
}

button,
select {
  font: inherit;
}

.site-shell {
  width: min(1160px, calc(100% - 40px));
  margin: 0 auto;
  padding: 42px 0 56px;
}

.hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.75fr);
  gap: 28px;
  align-items: stretch;
  animation: rise-in 640ms ease both;
}

.hero-copy,
.quiz-card,
.empty-card {
  border: 1px solid var(--line);
  background: var(--card);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero-copy {
  position: relative;
  overflow: hidden;
  min-height: 430px;
  padding: clamp(26px, 5vw, 56px);
  border-radius: 36px;
}

.hero-copy::after {
  position: absolute;
  right: -90px;
  bottom: -150px;
  width: 310px;
  height: 310px;
  border-radius: 999px;
  content: "";
  background: rgba(230, 107, 79, 0.2);
}

.eyebrow {
  display: inline-flex;
  width: fit-content;
  margin: 0 0 18px;
  padding: 7px 12px;
  border: 1px solid rgba(49, 75, 59, 0.16);
  border-radius: 999px;
  color: var(--moss);
  background: rgba(255, 255, 255, 0.52);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1,
h2 {
  font-family: var(--display-font);
  letter-spacing: -0.045em;
}

h1 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(3.1rem, 8vw, 6.8rem);
  line-height: 0.88;
}

h2 {
  margin: 18px 0 24px;
  font-size: clamp(1.75rem, 4.8vw, 3.9rem);
  line-height: 1;
}

.hero-text {
  max-width: 670px;
  margin: 24px 0 34px;
  color: var(--muted);
  font-size: clamp(1rem, 2.2vw, 1.22rem);
  line-height: 1.8;
}

.quiz-switcher {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 12px;
  align-items: end;
  max-width: 720px;
}

.quiz-switcher label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.quiz-switcher select {
  width: 100%;
  min-height: 48px;
  padding: 0 42px 0 15px;
  border: 1px solid rgba(49, 75, 59, 0.18);
  border-radius: 16px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
}

.switch-button,
.primary-action,
.ghost-action {
  min-height: 48px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 900;
}

.switch-button,
.primary-action {
  padding: 0 22px;
  color: #fffaf0;
  background: linear-gradient(135deg, var(--moss), #1d3025);
}

.primary-action:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.ghost-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border: 1px solid rgba(49, 75, 59, 0.18);
  color: var(--moss);
  background: rgba(255, 255, 255, 0.56);
  text-decoration: none;
}

.image-card {
  overflow: hidden;
  display: grid;
  min-height: 430px;
  margin: 0;
  border-radius: 36px;
  box-shadow: var(--shadow);
  background: linear-gradient(135deg, var(--moss), var(--sky));
  animation: float-in 780ms 110ms ease both;
}

.image-card img,
.image-fallback {
  width: 100%;
  height: 100%;
  min-height: 430px;
  object-fit: cover;
  grid-area: 1 / 1;
}

.image-fallback {
  background:
    radial-gradient(circle at 30% 24%, rgba(241, 184, 75, 0.55), transparent 9rem),
    linear-gradient(135deg, var(--moss), var(--sky));
}

.image-card figcaption {
  align-self: end;
  grid-area: 1 / 1;
  margin: 16px;
  padding: 12px 14px;
  border-radius: 18px;
  color: #fffaf0;
  background: rgba(23, 33, 28, 0.58);
  font-size: 0.78rem;
  line-height: 1.55;
  backdrop-filter: blur(12px);
}

.quiz-card {
  position: relative;
  overflow: hidden;
  margin-top: 28px;
  padding: clamp(24px, 4vw, 46px);
  border-radius: 36px;
  animation: rise-in 620ms 160ms ease both;
}

.quiz-card::before {
  position: absolute;
  top: -150px;
  right: -90px;
  width: 280px;
  height: 280px;
  border-radius: 999px;
  content: "";
  background: rgba(241, 184, 75, 0.24);
}

.quiz-meta {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.quiz-meta span {
  padding: 8px 11px;
  border-radius: 999px;
  color: var(--moss);
  background: rgba(95, 127, 79, 0.12);
  font-size: 0.78rem;
  font-weight: 900;
}

.options-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.answer-option {
  position: relative;
  display: flex;
  gap: 14px;
  align-items: center;
  width: 100%;
  min-height: 88px;
  padding: 18px;
  border: 1px solid rgba(49, 75, 59, 0.14);
  border-radius: 24px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.68);
  cursor: pointer;
  text-align: left;
  box-shadow: 0 12px 30px rgba(49, 75, 59, 0.08);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.answer-option:hover,
.answer-option:focus-visible {
  border-color: rgba(49, 75, 59, 0.38);
  transform: translateY(-2px);
  outline: none;
}

.answer-option.is-selected {
  border-color: rgba(49, 75, 59, 0.55);
  background: rgba(241, 184, 75, 0.18);
}

.answer-option.is-correct {
  border-color: rgba(95, 127, 79, 0.65);
  background: rgba(95, 127, 79, 0.18);
}

.answer-option.is-wrong {
  border-color: rgba(230, 107, 79, 0.7);
  background: rgba(230, 107, 79, 0.14);
}

.option-bullet {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 15px;
  color: #fffaf0;
  background: var(--moss);
  font-weight: 900;
}

.option-text {
  font-size: 1.04rem;
  font-weight: 800;
  line-height: 1.42;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.result-panel {
  margin-top: 22px;
  padding: 18px 20px;
  border: 1px solid rgba(49, 75, 59, 0.12);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.52);
}

.result-title {
  margin: 0 0 6px;
  font-family: var(--display-font);
  font-size: 1.55rem;
  font-weight: 800;
}

.result-detail {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.result-panel.is-correct {
  border-color: rgba(95, 127, 79, 0.42);
  background: rgba(95, 127, 79, 0.16);
}

.result-panel.is-wrong {
  border-color: rgba(230, 107, 79, 0.46);
  background: rgba(230, 107, 79, 0.12);
}

.learning-card {
  margin-top: 22px;
  padding: 20px;
  border: 1px solid rgba(49, 75, 59, 0.12);
  border-radius: 24px;
  background: rgba(255, 250, 240, 0.66);
}

.learning-card[hidden] {
  display: none;
}

.learning-card h3,
.recent-section h2 {
  margin: 0 0 10px;
  font-family: var(--display-font);
  font-size: clamp(1.55rem, 3vw, 2.25rem);
  letter-spacing: -0.04em;
}

.learning-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.recent-section {
  margin-top: 28px;
  padding: clamp(22px, 4vw, 36px);
  border: 1px solid var(--line);
  border-radius: 34px;
  background: rgba(255, 252, 244, 0.72);
  box-shadow: var(--shadow);
}

.recent-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.recent-card {
  display: grid;
  gap: 8px;
  min-height: 150px;
  padding: 18px;
  border: 1px solid rgba(49, 75, 59, 0.12);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.58);
  text-decoration: none;
}

.recent-card span {
  color: var(--moss);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.recent-card strong {
  font-size: 1.04rem;
  line-height: 1.25;
}

.recent-card small {
  color: var(--muted);
  line-height: 1.5;
}

.content-shell {
  min-height: 68vh;
}

.content-card {
  max-width: 820px;
  margin: 0 auto;
  padding: clamp(28px, 6vw, 64px);
  border: 1px solid var(--line);
  border-radius: 36px;
  background: var(--card);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.content-card p:not(.eyebrow) {
  color: var(--muted);
  font-size: 1.04rem;
  line-height: 1.85;
  white-space: pre-line;
}

.empty-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
}

.empty-card {
  width: min(680px, 100%);
  padding: clamp(28px, 7vw, 64px);
  border-radius: 36px;
}

.empty-card p:not(.eyebrow) {
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1.8;
}

@media (max-width: 860px) {
  .site-header,
  .site-footer {
    width: min(100% - 28px, 720px);
  }

  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-nav {
    justify-content: flex-start;
  }

  .site-shell {
    width: min(100% - 28px, 720px);
    padding-top: 18px;
  }

  .hero-panel,
  .recent-grid,
  .options-grid {
    grid-template-columns: 1fr;
  }

  .hero-copy,
  .image-card,
  .image-card img,
  .image-fallback {
    min-height: auto;
  }

  .image-card img,
  .image-fallback {
    aspect-ratio: 4 / 3;
  }

  .quiz-switcher {
    grid-template-columns: 1fr;
  }

  .switch-button,
  .primary-action,
  .ghost-action {
    width: 100%;
  }

  .action-row {
    display: grid;
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .site-header,
  .site-footer {
    width: 100%;
    padding-inline: 12px;
  }

  .site-shell {
    width: 100%;
    padding: 0 12px 28px;
  }

  .hero-copy,
  .quiz-card,
  .empty-card,
  .content-card,
  .recent-section {
    border-radius: 28px;
  }

  .hero-copy {
    padding-top: 30px;
  }

  .image-card {
    border-radius: 28px;
  }

  .answer-option {
    min-height: 76px;
    border-radius: 20px;
  }

  .option-bullet {
    width: 38px;
    height: 38px;
  }
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes float-in {
  from {
    opacity: 0;
    transform: translateY(28px) rotate(1deg);
  }
  to {
    opacity: 1;
    transform: translateY(0) rotate(0);
  }
}
