:root {
  color-scheme: light;
  --paper: #fbf7eb;
  --ink: #20362a;
  --muted: #4f6052;
  --line: #d8decb;
  --green: #234732;
  --green-light: #e7eed9;
  --gold: #e5aa42;
  --serif: Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font: 16px/1.55 var(--sans);
  color: var(--ink);
  background: var(--paper);
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button { color: inherit; font: inherit; }
button:not(:disabled) { cursor: pointer; }
:focus-visible { outline: 3px solid #826028; outline-offset: 4px; }
h1, h2, h3, p, figure { margin: 0; }
h1, h2 { font: 600 clamp(2rem, 4vw, 3.65rem)/1.04 var(--serif); letter-spacing: -.045em; text-wrap: balance; }
h1 { font-size: clamp(3rem, 6.2vw, 6.25rem); }
h1 em { color: #42674c; font-weight: inherit; }
h3 { font-size: 1rem; line-height: 1.3; }
.wrap { width: min(100% - 3rem, 76rem); margin-inline: auto; }
.skip { position: fixed; z-index: 10; top: .5rem; left: .5rem; padding: .75rem 1rem; background: white; transform: translateY(-150%); }
.skip:focus { transform: none; }
.site-header { border-bottom: 1px solid var(--line); }
.header-inner, .footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.25rem; min-height: 5rem; }
.brand { display: inline-flex; align-items: center; gap: .65rem; font: bold 1.45rem/1 var(--serif); text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 2.45rem; height: 2.45rem; border-radius: .8rem; background: var(--green); color: #fbf2d5; }
nav { display: flex; align-items: center; gap: 1.5rem; font-size: .92rem; font-weight: 650; }
nav > a { text-underline-offset: .28em; }
nav > a:not([aria-current], .button) { text-decoration: none; }
nav > a:hover { text-decoration: underline; }
.button {
  display: inline-flex; justify-content: center; align-items: center; gap: .6rem;
  min-height: 3.15rem; padding: .64rem 1rem; border: 1px solid transparent; border-radius: .65rem;
  font-weight: 700; text-decoration: none; line-height: 1.25; transition: background-color .15s, transform .15s;
}
.button:active { transform: translateY(1px); }
.button svg, .guide-footer svg { flex: none; }
.button-primary { background: var(--green); color: #fff8de; box-shadow: 0 3px #142e20; }
.button-primary:hover { background: #315d44; }
.button-outline { border-color: #9da991; background: #faf9ee; }
.button-outline:hover { background: var(--green-light); text-decoration: none; }
.button-small { min-height: 2.75rem; }
.text-link { color: var(--green); font-weight: 700; text-decoration: underline; text-underline-offset: .22em; }
button.text-link { background: none; border: 0; min-height: 2.75rem; padding: .35rem .2rem; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; }
.eyebrow { display: flex; align-items: center; gap: .55rem; font-size: .76rem; font-weight: 750; letter-spacing: .13em; text-transform: uppercase; color: #3e5b45; }
.eyebrow > span, .status-dot { width: .5rem; height: .5rem; border-radius: 50%; background: #ab6c16; flex: none; }
.lede { color: var(--muted); font-size: clamp(1rem, 1.8vw, 1.2rem); max-width: 37rem; }
.hero {
  display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); align-items: center;
  gap: clamp(1.5rem, 3vw, 3.5rem); padding-block: clamp(2.5rem, 4.5vw, 5rem);
}
.hero-copy { display: grid; justify-items: start; gap: 1.35rem; }
.hero-copy h1 { font-size: clamp(2.75rem, 4.4vw, 4.35rem); text-wrap: initial; }
.hero-note { color: var(--muted); font-size: .85rem; }
.hero-note span { margin-inline: .3rem; color: #926120; }
.hero-art { position: relative; isolation: isolate; margin: 0; }
.hero-art > img {
  width: 100%; aspect-ratio: 1.46; object-fit: cover; border-radius: 1.7rem;
  border: .4rem solid #fff9e7; box-shadow: 0 0 0 1px #c4cbb3, 0 18px 50px #455c3726;
}
.hero-art figcaption { position: absolute; bottom: .95rem; left: .95rem; display: inline-flex; align-items: center; gap: .45rem; padding: .35rem .65rem; color: var(--ink); background: var(--paper); border-radius: .45rem; font-size: .75rem; font-weight: 650; }
.word-badge {
  display: flex; align-items: center; gap: .55rem; padding: .45rem .85rem .45rem .5rem;
  border-radius: .85rem; border: 1px solid #d9c791; background: #fff4d6; box-shadow: 0 5px 15px #34372427;
  position: absolute; top: 1.15rem; right: -.6rem; transform: rotate(4deg);
}
.word-badge img { width: 2.8rem; height: 2.8rem; object-fit: contain; }
.word-badge b, .word-badge small { display: block; }
.word-badge b { font: bold 1.24rem var(--serif); }
.word-badge small { color: var(--muted); }
.how-section { border-block: 1px solid #ced9c0; background: var(--green-light); }
.how-inner { display: grid; grid-template-columns: .85fr 1.15fr; align-items: center; gap: clamp(1.5rem, 5vw, 5rem); padding-block: clamp(2.5rem, 5vw, 4.75rem); }
.how-heading h2, .farm-teaser h2, .guide-heading h2 { margin-block: .4rem .65rem; }
.how-heading p:last-child, .farm-teaser p:last-child, .guide-heading p:last-child { color: var(--muted); }
.steps { display: grid; gap: .8rem; margin: 0; padding: 0; list-style: none; }
.steps li { display: flex; gap: .9rem; align-items: start; padding-block: .6rem; border-bottom: 1px solid #c6d4b9; }
.steps li:last-child { border-bottom: 0; }
.steps li > span { padding: .25rem .5rem; border-radius: .35rem; background: #f7efd3; color: #5f461f; font: bold 1rem var(--serif); }
.steps p { font-size: .93rem; color: var(--muted); margin-top: .2rem; }
.farm-teaser { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: clamp(2.5rem, 5vw, 4.5rem); }
.farm-teaser h2 { font-size: clamp(2rem, 4vw, 3rem); }
.farm-teaser .button { flex: none; }
.site-footer { border-top: 1px solid var(--line); background: #f2f1e3; }
.footer-inner { min-height: 6.25rem; padding-block: 1rem; }
.footer-inner > p { color: var(--muted); font-size: .9rem; }
.footer-inner > a:last-child, .guide-footer > a { display: inline-flex; align-items: center; gap: .35rem; font-size: .9rem; font-weight: 650; }
.quest-heading, .quest-wrap, .field-guide { width: min(100% - 3rem, 68rem); }
.quest-heading { display: grid; justify-items: start; gap: .6rem; padding-block: clamp(2rem, 4vw, 3.4rem) 1.6rem; }
.quest-heading h1 { font-size: clamp(2.85rem, 6.7vw, 5.4rem); }
.quest-card { display: grid; grid-template-columns: minmax(0, .65fr) minmax(0, 1fr); overflow: hidden; border: 1px solid #b7c4a8; border-radius: 1.35rem; background: #fffcf2; box-shadow: 0 8px 0 #e3e7d4; }
.quest-art { position: relative; overflow: hidden; isolation: isolate; min-height: 14rem; background: #d7eac5; }
.quest-art > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 19% center; }
.quest-animals { position: absolute; inset: auto .7rem 2.9rem; display: flex; justify-content: center; gap: .25rem; align-items: end; }
.quest-animals img { width: 24%; max-width: 6rem; height: 5.6rem; object-fit: contain; filter: drop-shadow(0 4px 4px #243b2777); }
.quest-art-tag { position: absolute; bottom: .75rem; left: 50%; translate: -50%; padding: .27rem .6rem; border-radius: .35rem; background: #fff8e5; color: var(--green); font-size: .66rem; font-weight: 750; letter-spacing: .09em; white-space: nowrap; }
.quest-play { padding: clamp(1.15rem, 3vw, 2.2rem); }
.quest-play h2 { font-size: clamp(1.85rem, 4vw, 2.95rem); margin-block: .45rem .55rem; }
#quest-description { color: var(--muted); }
.quest-controls { margin-top: .9rem; }
.listen-row { display: flex; flex-wrap: wrap; align-items: center; gap: .65rem; }
#spoken-word { padding: .35rem .7rem; border-radius: .5rem; background: #f1eacb; font-weight: 700; }
.quest-progress { height: .35rem; background: #e3e7d6; border-radius: 1rem; overflow: hidden; margin-block: .8rem .25rem; }
.quest-progress > span { display: block; height: 100%; width: 0; background: #5c8052; transition: width .2s; }
.quest-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; margin-top: 1rem; }
.animal-option { display: grid; justify-items: center; gap: .25rem; min-width: 0; padding: .55rem .2rem; border-radius: .8rem; border: 1px solid #c4cfb3; background: #edf1e2; font-weight: 700; }
.animal-option:not(:disabled):hover { background: #dfe9ce; border-color: #6a8659; }
.animal-option img { width: min(100%, 5rem); height: clamp(3.2rem, 8vw, 5rem); object-fit: contain; }
.animal-option[data-result=correct] { background: #d5ebcb; border-color: #53734b; box-shadow: inset 0 0 0 1px #53734b; }
.animal-option[data-result=retry] { opacity: .67; }
.feedback { margin-block: .85rem; font-weight: 650; }
.feedback:empty { margin: 0; }
.feedback.correct { color: #315e39; }
.feedback.retry { color: #8a4e27; }
.feedback.reward { display: inline-flex; align-items: center; gap: .45rem; padding: .4rem .85rem; border: 1px solid #d1aa5b; border-radius: .6rem; background: #fff1c8; color: #634411; animation: reward .26s ease-out; }
.feedback.reward span { color: #a86e11; font-size: 1.4rem; }
@keyframes reward { from { transform: translateY(5px) scale(.96); } to { transform: none; } }
.field-guide { padding-block: 3rem; }
.guide-heading { margin-bottom: 1.3rem; }
.guide-heading h2 { font-size: clamp(1.9rem, 4vw, 3rem); }
.animal-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .85rem; }
.animal-card { min-width: 0; display: grid; grid-template-columns: 5rem minmax(0, 1fr); gap: .9rem; padding: 1rem; border: 1px solid var(--line); border-radius: .8rem; background: #f7f6e9; }
.animal-card > img { width: 4.7rem; height: 4.7rem; object-fit: contain; }
.animal-card h3 { font: bold 1.45rem var(--serif); }
.translation, .meaning { color: var(--muted); font-size: .9rem; }
.example { margin-top: .5rem; }
.animal-card audio { display: block; width: min(100%, 18rem); height: 2.45rem; margin-top: .6rem; }
.guide-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .65rem; margin-top: 1.5rem; }
@media (max-width: 850px) {
  .hero { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .hero-copy { gap: 1rem; }
  .hero-art > img { aspect-ratio: .95; }
  .quest-card { grid-template-columns: minmax(0, .5fr) minmax(0, 1fr); }
}
@media (max-width: 650px) {
  .wrap, .quest-heading, .quest-wrap, .field-guide { width: min(100% - 2rem, 76rem); }
  .header-inner { min-height: 4.25rem; }
  .brand { font-size: 1.16rem; gap: .4rem; }
  .brand-mark { width: 2.1rem; height: 2.1rem; }
  nav { gap: .6rem; font-size: .8rem; }
  nav .button { display: none; }
  .hero, .how-inner, .quest-card { grid-template-columns: 1fr; }
  .hero { padding-block: 2.5rem; }
  .hero-art > img { aspect-ratio: 1.35; }
  .word-badge { right: .6rem; }
  .farm-teaser, .footer-inner { align-items: start; flex-direction: column; }
  .footer-inner { gap: .75rem; }
  .quest-art { min-height: 8.5rem; }
  .quest-art > img { object-position: center 39%; }
  .quest-animals { inset: auto .7rem 1.6rem; }
  .quest-animals img { height: 4.3rem; width: 3.8rem; }
  .quest-art-tag { bottom: .3rem; }
  .animal-list { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001s !important; transition-duration: .001s !important; }
}
