@font-face { font-family: 'Fraunces'; src: url('../fonts/fraunces.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'Fraunces'; src: url('../fonts/fraunces-italic.woff2') format('woff2'); font-weight: 100 900; font-style: italic; font-display: swap; }
@font-face { font-family: 'Figtree'; src: url('../fonts/figtree.woff2') format('woff2'); font-weight: 300 900; font-display: swap; }

:root {
  --bg: #2b3628;
  --bg-2: #364433;
  --paper: #f4ecd9;
  --paper-2: #e9dec4;
  --ink: #23291f;
  --muted: #6f6650;
  --line: #d4c6a5;
  --ochre: #d98a2b;
  --ochre-dark: #a9621a;
  --good: #4f7d32;
  --bad: #b1432c;
  --serif: 'Fraunces', Georgia, serif;
  --sans: 'Figtree', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--paper);
  font: 17px/1.45 var(--sans);
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
button { font: inherit; color: inherit; cursor: pointer; }
kbd {
  font: 600 0.72em var(--sans);
  padding: 0.1em 0.45em;
  border-radius: 4px;
  border: 1px solid currentColor;
  opacity: 0.6;
  margin-left: 0.4em;
}

.screen { min-height: 100%; }

/* Home */
#home { max-width: 1180px; margin: 0 auto; padding: 48px 24px 64px; }
.masthead h1 {
  font: italic 800 clamp(64px, 11vw, 120px)/0.9 var(--serif);
  margin: 0;
  color: var(--paper);
  letter-spacing: -0.02em;
}
.lede { max-width: 34em; font-size: 19px; color: #d9d0b9; margin: 18px 0 40px; }
.label {
  font: 700 13px var(--sans);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ochre);
  margin: 0 0 14px;
}
.walks { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; }
.walk {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  text-align: left;
  border: 0;
  border-radius: 14px;
  padding: 0;
  overflow: hidden;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.25);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.walk:hover, .walk:focus-visible { transform: translateY(-3px); box-shadow: 0 8px 18px rgba(0, 0, 0, 0.3); outline: none; }
.walk .thumb { position: relative; height: 128px; overflow: hidden; }
.walk .thumb .scene { position: absolute; inset: -12px; filter: blur(3px); }
.walk .thumb img { position: absolute; left: 50%; bottom: 6px; height: 112px; max-width: 80%; object-fit: contain; transform: translateX(-50%); filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.25)); }
.walk .text { padding: 12px 16px 16px; }
.walk b { display: block; font: 700 21px/1.15 var(--serif); }
.walk small { display: block; color: var(--muted); font-size: 14px; margin-top: 4px; }
.walk .best { display: block; margin-top: 8px; font-size: 14px; font-weight: 700; color: var(--ochre-dark); }

.home-tools { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.tool {
  display: flex; flex-direction: column; align-items: flex-start;
  padding: 14px 20px;
  border-radius: 12px;
  border: 1.5px solid #5a6a53;
  background: var(--bg-2);
  text-align: left;
}
.tool:hover, .tool:focus-visible { border-color: var(--paper); outline: none; }
.tool b { font: 700 18px var(--serif); }
.tool span { font-size: 14px; color: #c5bca5; }

/* Play */
#play { display: flex; flex-direction: column; min-height: 100vh; }
.playbar, .guidebar {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 20px;
}
.icon {
  width: 44px; height: 44px; flex: none;
  border-radius: 50%;
  border: 1.5px solid #5a6a53;
  background: var(--bg-2);
  font-size: 20px; line-height: 1;
}
.icon:hover, .icon:focus-visible { border-color: var(--paper); outline: none; }
.icon.off { opacity: 0.45; }
.where { flex: 1; min-width: 0; }
.where span { font: 700 18px var(--serif); }
.dots { list-style: none; display: flex; gap: 6px; margin: 6px 0 0; padding: 0; }
.dots li { width: 22px; height: 6px; border-radius: 3px; background: #4b5a46; }
.dots li.now { background: var(--paper); }
.dots li.s3 { background: #f0c35a; }
.dots li.s2 { background: #d9a548; }
.dots li.s1 { background: #b08a45; }
.dots li.s0 { background: var(--bad); }
.tally { font: 700 20px var(--serif); color: #f0c35a; white-space: nowrap; }

.stage {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 24px;
  padding: 4px 24px 24px;
  min-height: 0;
}
.frame { display: flex; flex-direction: column; gap: 14px; min-height: 0; justify-content: center; }
.lens {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  max-height: calc(100vh - 160px);
  margin: 0 auto;
  overflow: hidden;
  background: #111;
  /* Two overlapping circles with soft edges, like looking through binoculars. */
  -webkit-mask: radial-gradient(circle closest-side at 33.5% 50%, #000 86%, transparent 100%), radial-gradient(circle closest-side at 66.5% 50%, #000 86%, transparent 100%);
  mask: radial-gradient(circle closest-side at 33.5% 50%, #000 86%, transparent 100%), radial-gradient(circle closest-side at 66.5% 50%, #000 86%, transparent 100%);
}
.lens .scene { position: absolute; inset: -30px; filter: blur(7px); transition: background 0.3s; }
.bird {
  position: absolute;
  left: 50%; top: 50%;
  max-width: 62%; max-height: 78%;
  transform: translate(-50%, -46%);
  will-change: filter;
}
.bird.flip { transform: translate(-50%, -46%) scaleX(-1); }
.bird.settle { transition: filter 0.45s ease-out; }

.focus-row { display: flex; align-items: center; gap: 12px; max-width: 640px; width: 100%; margin: 0 auto; }
.focus-label { font-size: 13px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: #a9a08a; }
.focus-track { flex: 1; height: 8px; border-radius: 4px; background: #46553f; overflow: hidden; }
.focus-fill { height: 100%; width: 0; background: var(--paper); border-radius: 4px; }
.pips { font-size: 22px; letter-spacing: 2px; color: #f0c35a; min-width: 80px; text-align: right; }
.pips i { font-style: normal; color: #55634d; }

.side { display: flex; flex-direction: column; justify-content: center; min-height: 0; }
.ask, .card {
  background: var(--paper);
  color: var(--ink);
  border-radius: 16px;
  padding: 22px;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.25);
}
.prompt { font: 700 24px/1.2 var(--serif); margin: 0 0 16px; }
.choices { display: grid; gap: 10px; }
.choice {
  display: flex; align-items: center; gap: 12px;
  text-align: left;
  padding: 13px 14px;
  border-radius: 10px;
  border: 1.5px solid var(--line);
  background: #fbf6ea;
  font-weight: 600;
  font-size: 17px;
  transition: border-color 0.1s, background 0.1s;
}
.choice:hover:not(:disabled), .choice:focus-visible { border-color: var(--ink); outline: none; }
.choice .n {
  flex: none;
  width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--paper-2);
  font-size: 13px; font-weight: 800; color: var(--muted);
}
.choice:disabled { cursor: default; }
.choice.right { border-color: var(--good); background: #e3edd3; }
.choice.wrong { border-color: var(--bad); background: #f5d9cf; }
.sharpen {
  margin-top: 14px;
  width: 100%;
  padding: 10px;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 15px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.card { max-height: calc(100vh - 110px); overflow: auto; }
.verdict { margin: 0 0 4px; font-weight: 800; font-size: 15px; letter-spacing: 0.08em; text-transform: uppercase; }
.verdict.good { color: var(--good); }
.verdict.bad { color: var(--bad); }
.verdict .stars { color: #d79d22; letter-spacing: 1px; font-size: 18px; margin-left: 6px; }
.card h2, .page h2 { font: 700 28px/1.1 var(--serif); margin: 0; }
.sci { margin: 4px 0 0; font: italic 400 15px var(--serif); color: var(--muted); }
.card h3, .page h3 {
  margin: 16px 0 4px;
  font: 800 12px var(--sans);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ochre-dark);
}
.card ul, .page ul { margin: 0; padding-left: 18px; }
.card li, .page li { margin: 2px 0; }
.card p, .page p { margin: 0; }
.fact { margin-top: 14px !important; padding: 10px 12px; border-radius: 8px; background: var(--paper-2); font-size: 15.5px; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0 10px; }
.pair figure { margin: 0; padding: 8px; border-radius: 10px; background: #fbf6ea; border: 1.5px solid var(--line); text-align: center; }
.pair figure.is { border-color: var(--good); }
.pair img { width: 100%; height: 110px; object-fit: contain; }
.pair figcaption { font-size: 13.5px; font-weight: 700; line-height: 1.2; }
.pair figcaption span { display: block; font-weight: 500; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; }
.tell { font-size: 16px; }
.btn {
  display: inline-block;
  margin-top: 18px;
  padding: 12px 22px;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-weight: 700;
  font-size: 17px;
}
.btn:hover, .btn:focus-visible { background: #000; outline: none; }
.btn.quiet { background: transparent; color: var(--paper); border: 1.5px solid #6c7b64; }
.card .btn { width: 100%; }

/* End */
#end { display: grid; place-items: center; padding: 32px 20px; }
.end-sheet { width: min(860px, 100%); background: var(--paper); color: var(--ink); border-radius: 18px; padding: 32px; }
.end-sheet h1 { font: italic 800 44px/1 var(--serif); margin: 0; }
.end-score { font: 700 22px var(--serif); color: var(--ochre-dark); margin: 8px 0 18px; }
.end-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; column-gap: 28px; }
.end-list li { display: flex; align-items: center; gap: 14px; padding: 8px 0; border-top: 1px solid var(--line); }
.end-list img { width: 64px; height: 48px; object-fit: contain; }
.end-list .who { flex: 1; font-weight: 700; }
.end-list .who small { display: block; font-weight: 500; color: var(--bad); }
.end-list .st { color: #d79d22; font-size: 18px; letter-spacing: 1px; }
.end-buttons { display: flex; gap: 10px; flex-wrap: wrap; }
.end-buttons .btn.quiet { color: var(--ink); border-color: var(--line); }

/* Field guide */
#guide { max-width: 1180px; margin: 0 auto; padding: 12px 8px 48px; }
.guidebar h1 { font: italic 800 34px var(--serif); margin: 0; }
.filter { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 20px 18px; }
.filter button {
  padding: 7px 14px;
  border-radius: 999px;
  border: 1.5px solid #5a6a53;
  background: transparent;
  font-size: 15px;
  font-weight: 600;
}
.filter button[aria-pressed='true'] { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.guide-grid { list-style: none; margin: 0; padding: 0 20px; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.guide-grid li { display: flex; }
.guide-grid button {
  width: 100%;
  border: 0;
  border-radius: 12px;
  background: var(--paper);
  color: var(--ink);
  padding: 10px 10px 12px;
  text-align: left;
}
.guide-grid button:hover, .guide-grid button:focus-visible { outline: 3px solid var(--ochre); outline-offset: 2px; }
.guide-grid img { display: block; width: 100%; height: 120px; object-fit: contain; }
.guide-grid b { display: block; margin-top: 6px; font: 700 16px/1.15 var(--serif); }
.guide-grid small { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; }
.guide-grid small.got { color: var(--good); font-weight: 700; }

.page {
  width: min(760px, calc(100% - 24px));
  max-height: calc(100% - 24px);
  border: 0;
  border-radius: 18px;
  padding: 28px;
  background: var(--paper);
  color: var(--ink);
}
.page::backdrop { background: rgba(20, 26, 18, 0.7); }
.page .close { position: absolute; top: 14px; right: 14px; background: var(--paper-2); border-color: var(--line); color: var(--ink); }
.page .hero { display: block; width: 100%; height: 280px; object-fit: contain; margin-bottom: 12px; }
.page .cols { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 28px; }
.page .alike { list-style: none; padding: 0; }
.page .alike li { display: flex; gap: 12px; align-items: flex-start; padding: 8px 0; border-top: 1px solid var(--line); }
.page .alike img { width: 76px; height: 56px; object-fit: contain; flex: none; }
.page .alike b { display: block; font-family: var(--serif); }
.page .alike span { font-size: 15px; }

/* Scenes: soft backgrounds for each kind of place, always out of focus */
.scene.town {
  background:
    radial-gradient(circle at 18% 30%, rgba(255, 255, 255, 0.55) 0 4%, transparent 5%),
    radial-gradient(ellipse at 25% 58%, #557d3a 0 22%, transparent 23%),
    radial-gradient(ellipse at 82% 55%, #4c7334 0 26%, transparent 27%),
    linear-gradient(#b9d6e6 0 50%, #93b862 50% 100%);
}
.scene.bush {
  background:
    linear-gradient(90deg, transparent 0 14%, #cfc3ad 14% 17%, transparent 17% 76%, #bcae96 76% 78.5%, transparent 78.5%),
    radial-gradient(circle at 70% 25%, rgba(240, 236, 190, 0.6) 0 6%, transparent 7%),
    radial-gradient(ellipse at 30% 30%, #4f6e3a 0 30%, transparent 31%),
    radial-gradient(ellipse at 85% 75%, #3c5a2e 0 30%, transparent 31%),
    linear-gradient(#7e9a63, #455f34);
}
.scene.water {
  background:
    linear-gradient(90deg, transparent 0 6%, #8a9a52 6% 7%, transparent 7% 9%, #7d8c49 9% 10%, transparent 10% 88%, #8a9a52 88% 89%, transparent 89%),
    radial-gradient(ellipse at 50% 56%, rgba(255, 255, 255, 0.4) 0 18%, transparent 19%),
    linear-gradient(#cfe0e4 0 46%, #8fb0b8 46% 60%, #6f939e 60% 100%);
}
.scene.outback {
  background:
    radial-gradient(ellipse at 80% 46%, #6e7d48 0 9%, transparent 10%),
    radial-gradient(ellipse at 14% 48%, #7b8650 0 6%, transparent 7%),
    linear-gradient(#e9c79a 0 18%, #d9e2e4 18% 48%, #c46a37 48% 70%, #a9532b 70% 100%);
}

@media (max-width: 900px) {
  .stage { grid-template-columns: 1fr; padding: 0 14px 18px; gap: 14px; }
  .lens { max-height: none; }
  .side { justify-content: flex-start; }
  .choices { grid-template-columns: 1fr 1fr; }
  .choice { font-size: 15px; padding: 10px; }
  .choice .n { display: none; }
  .ask, .card { padding: 16px; }
  .prompt { font-size: 20px; margin-bottom: 10px; }
  .card { max-height: none; }
  .sharpen kbd, .btn kbd { display: none; }
}
@media (max-width: 560px) {
  .page .cols, .end-list { grid-template-columns: 1fr; }
  .end-sheet { padding: 22px; }
  .page .hero { height: 200px; }
  #home { padding-top: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  .walk, .bird.settle { transition: none; }
}
