/* Curious Kea shopfront — shared look for every page (docs/07 palette).
   Daylight paper, ink text, olive headings, orange reserved for the one
   discovery moment on the landing page. Handwriting = Caveat. */
:root {
  --paper: #f7f6f2;
  --paper-raised: #fffef9;
  --ink: #2b2b28;
  --olive: #5c6b46;
  --slate: #4a5257;
  --tussock: #c9a86a;
  --orange: #e8672b;
  --rule: #d9d4c7;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background:
    radial-gradient(1200px 600px at 70% -10%, #fffef9 0%, transparent 60%),
    var(--paper);
  color: var(--ink);
  font-family: Georgia, 'Iowan Old Style', 'Times New Roman', serif;
  line-height: 1.6;
  padding: 1.25rem 1.25rem 4rem;
}
main { max-width: 36rem; margin: 0 auto; }
.wide { max-width: 44rem; }
.hand { font-family: 'Caveat', cursive; font-weight: 600; }
a { color: var(--olive); text-underline-offset: 0.15em; }
a:hover, a:focus-visible { color: var(--ink); }
p { margin: 0 0 0.9rem; }
ul, ol { padding-left: 1.2rem; margin: 0 0 0.9rem; }
li { margin-bottom: 0.35rem; }
strong { font-weight: 600; }
h1 {
  font-family: 'Caveat', cursive;
  font-weight: 700;
  font-size: clamp(2.6rem, 10vw, 4rem);
  line-height: 1;
  margin: 0 0 0.25rem;
  transform: rotate(-1.4deg);
  color: var(--olive);
}
h1 .kea-word { color: var(--ink); }
.short {
  font-family: 'Caveat', cursive;
  font-weight: 600;
  font-size: clamp(1.5rem, 5.5vw, 1.9rem);
  color: var(--slate);
  margin: 0 0 2rem;
  transform: rotate(-0.5deg);
}
h2 {
  font-family: 'Caveat', cursive;
  font-weight: 700;
  font-size: 1.85rem;
  line-height: 1.1;
  color: var(--ink);
  margin: 2.5rem 0 0.6rem;
}
h3 {
  font-family: 'Caveat', cursive;
  font-weight: 700;
  font-size: 1.45rem;
  line-height: 1.15;
  color: var(--olive);
  margin: 1.6rem 0 0.35rem;
}
hr { border: 0; border-top: 1px solid var(--rule); margin: 2rem 0; }
blockquote {
  margin: 0 0 0.9rem;
  border-left: 3px solid var(--tussock);
  padding-left: 0.9rem;
  color: var(--slate);
  font-style: italic;
}
table {
  border-collapse: collapse;
  width: 100%;
  margin: 0 0 1.2rem;
  font-size: 0.95rem;
}
th, td { text-align: left; vertical-align: top; padding: 0.4rem 0.6rem 0.4rem 0; border-bottom: 1px solid var(--rule); }
th { font-family: 'Caveat', cursive; font-weight: 700; font-size: 1.15rem; color: var(--olive); }
.table-scroll { overflow-x: auto; }

/* Top nav (docs/07 §4.2): wordmark + three handwritten links, "play"
   boxed. Inline at 320px; no menu, no JS. */
.nav {
  display: flex;
  align-items: baseline;
  gap: 1rem 1.1rem;
  flex-wrap: wrap;
  margin: 0 0 2.25rem;
  font-family: 'Caveat', cursive;
  font-weight: 600;
  font-size: 1.35rem;
}
.nav .wordmark {
  margin-right: auto;
  color: var(--olive);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.5rem;
}
.nav .wordmark .kea-word { color: var(--ink); }
.nav a { color: var(--ink); text-decoration: none; position: relative; }
.nav a:not(.wordmark):not(.play)::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: -0.05em;
  height: 2px; background: var(--ink); border-radius: 2px;
  transform: scaleX(0) rotate(-1deg); transform-origin: left center;
  transition: transform 220ms ease;
}
.nav a:not(.wordmark):not(.play):hover::after,
.nav a:not(.wordmark):not(.play):focus-visible::after,
.nav a[aria-current="page"]::after { transform: scaleX(1) rotate(-1deg); }
.nav a:focus-visible { outline: 2px solid var(--olive); outline-offset: 3px; }

/* The wobbly hand-drawn box: the CTA, and the old "coming soon". */
.boxed {
  font-family: 'Caveat', cursive;
  font-weight: 600;
  color: var(--ink);
  display: inline-block;
  border: 2px solid var(--ink);
  border-radius: 3px 12px 4px 14px / 12px 4px 14px 3px;
  padding: 0.15rem 0.9rem 0.3rem;
  transform: rotate(1.2deg);
  background: #fffef9;
  text-decoration: none;
  line-height: 1.2;
}
.boxed:hover, .boxed:focus-visible { background: var(--ink); color: var(--paper); outline: none; }
.nav .play { font-size: 1.25rem; }
.cta { font-size: 1.6rem; padding: 0.3rem 1.2rem 0.45rem; }

footer {
  margin-top: 3.5rem;
  font-size: 0.85rem;
  color: var(--slate);
  line-height: 1.8;
  border-top: 1px solid var(--rule);
  padding-top: 1rem;
}
footer .hand { font-size: 1.15rem; }
footer a { color: var(--slate); }
footer .links a { margin-right: 0.9rem; }

/* Landing-page furniture. */
.hero { display: block; width: 380px; max-width: 100%; height: auto; margin: 0 0 0.75rem -0.6rem; }
.blurb { font-size: 1.05rem; line-height: 1.65; margin: 0 0 1.75rem; max-width: 30rem; }
.blurb strong { color: var(--olive); font-weight: 600; }
.crew { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 1.25rem 2rem; margin: 0.5rem 0 0; }
.crew figure { margin: 0; display: grid; grid-template-columns: 4.5rem 1fr; gap: 0.9rem; align-items: start; }
/* Profile circles: each portrait sits in a raised-paper coin. One
   separation treatment (the background), a hairline of tussock thread.
   Kea's drawing fills its box tighter than Rock's, so it gets extra
   padding (.pad) to sit at the same visual weight. */
.crew img {
  width: 4.5rem; height: 4.5rem;
  border-radius: 50%;
  background: var(--paper-raised);
  border: 1.5px solid var(--rule);
  padding: 0.4rem;
  object-fit: contain;
}
/* Kea's crop sits up-and-left in its box; uneven padding re-centres the
   bird in the coin (same total per axis, so the scale matches Rock). */
.crew img.pad { padding: 0.75rem 0.45rem 0.45rem 0.75rem; }
.crew figcaption { font-size: 0.98rem; line-height: 1.5; }
.crew figcaption b { display: block; font-family: 'Caveat', cursive; font-weight: 700; font-size: 1.4rem; color: var(--olive); line-height: 1.1; }
.locals { font-size: 0.95rem; color: var(--slate); margin-top: 1rem; }
.loop { list-style: none; padding: 0; counter-reset: beat; margin: 0.5rem 0 0; }
.loop li { position: relative; padding-left: 2.4rem; margin-bottom: 0.7rem; }
.loop li::before {
  counter-increment: beat; content: counter(beat);
  position: absolute; left: 0; top: 0.05em;
  font-family: 'Caveat', cursive; font-weight: 700; font-size: 1.4rem; color: var(--tussock); line-height: 1;
}
.loop b { font-family: 'Caveat', cursive; font-weight: 700; font-size: 1.25rem; color: var(--ink); }
.promise { border-left: 3px solid var(--tussock); padding-left: 0.9rem; font-style: italic; color: var(--slate); }
.strip {
  display: flex; flex-wrap: wrap; gap: 0.5rem 0.9rem;
  font-family: 'Caveat', cursive; font-weight: 600; font-size: 1.3rem; color: var(--olive);
  margin: 0.5rem 0 0.25rem; padding: 0;
  list-style: none;
}
.strip li::before { content: "· "; color: var(--tussock); }
.strip li:first-child::before { content: ""; }

/* Expedition shelves (generated on the landing page and the grown-ups hub). */
.shelf { margin: 0 0 1.4rem; }
.shelf-name { font-family: 'Caveat', cursive; font-weight: 700; font-size: 1.45rem; color: var(--olive); margin: 1.4rem 0 0.2rem; }
.shelf ol { list-style: none; padding: 0; margin: 0; }
.shelf li { padding: 0.35rem 0; border-bottom: 1px dashed var(--rule); }
.shelf .ep-title { font-weight: 600; }
.shelf .ep-meta { color: var(--slate); font-size: 0.9rem; }
.shelf .ep-links { font-size: 0.9rem; }
.shelf .ep-links a { margin-right: 0.8rem; }

/* Grown-ups card pages. */
.card-meta { font-style: italic; color: var(--slate); margin: -0.5rem 0 1.5rem; }
.card-actions { margin: 0 0 1.5rem; display: flex; gap: 0.6rem 1rem; flex-wrap: wrap; align-items: center; }
.card-actions .back { font-family: 'Caveat', cursive; font-weight: 600; font-size: 1.2rem; }

@media print {
  body { background: #fff; padding: 0; }
  .nav, footer, .card-actions { display: none; }
  main { max-width: none; }
  a { color: inherit; text-decoration: none; }
}
@media (prefers-reduced-motion: reduce) {
  .nav a::after { transition: none; }
}

/* The taster: one minute of the game on the landing page (taster.js). */
.taster {
  margin: 2.5rem 0 0.5rem;
  padding: 1rem 1.1rem 1.2rem;
  border-left: 3px solid var(--tussock);
  background: #fffef9;
}
.taster h2 { margin-top: 0; }
.taster .t-intro { color: var(--slate); }
.taster-stage:empty { display: none; }
.taster-stage { margin: 0.5rem 0 0.75rem; }
.t-line { margin: 0 0 0.9rem; }
.t-name { display: flex; align-items: center; gap: 0.4rem; margin: 0 0 0.1rem; }
.t-name img { width: 32px; height: 32px; }
.t-name .hand { font-size: 1.25rem; font-weight: 700; color: var(--olive); }
.t-rock .t-name { flex-direction: row-reverse; justify-content: flex-start; }
.t-rock .t-name .hand { color: var(--slate); }
.t-rock { text-align: right; }
.t-text { margin: 0; line-height: 1.5; }
.t-narr .t-text { font-style: italic; color: var(--slate); }
.t-log .t-text {
  font-family: 'Caveat', cursive; font-weight: 600; font-size: 1.3rem;
  border-bottom: 1px solid var(--rule); display: inline-block; padding: 0 0.2rem 0.05rem;
}
.t-flash .t-text { transition: color 400ms ease; }
.t-flash-on .t-text { color: var(--orange); font-weight: 600; }
.t-choices { display: flex; flex-direction: column; align-items: flex-start; gap: 0.6rem; margin: 0.6rem 0 1rem; }
.t-choice { font-size: 1.2rem; text-align: left; cursor: pointer; }
.t-picked { color: var(--slate); font-size: 1.2rem; margin: 0 0 0.9rem; }
.t-end { margin: 1rem 0 0; }
.t-more { color: var(--slate); font-size: 0.95rem; margin: 0.8rem 0 0.4rem; }
.t-again { background: none; border: none; color: var(--slate); font-size: 1.1rem; padding: 0; cursor: pointer; border-bottom: 1px dotted var(--slate); }
.taster-start { font-size: 1.4rem; cursor: pointer; }
