/* The same open storybook layout is shared by all nine missions. */
:root { color-scheme: light; }
.activity-page {
  min-height: 100vh;
  color: #214332;
  background: linear-gradient(#f5f9ec33, #fff8e8 39rem), #fff8e8
    url("assets/brain-story/picture-book-meadow.webp") center top / max(100%, 67rem) auto no-repeat;
}
.activity-page :focus-visible { outline-color: #236844; }
.activity-page .quest-nav { gap: .4rem 1rem; flex-wrap: wrap; }
.activity-page .quest-nav > a:last-child {
  padding: .15rem .75rem;
  border-radius: 2rem;
  background: #fffdf5;
  font-weight: 750;
  text-decoration: none;
}
.game-main { max-width: 58rem; padding-block: clamp(.75rem, 3vw, 2.25rem) 3.5rem; }
.game-heading { margin-bottom: 1.25rem; }
.game-heading h1 {
  margin: .08em 0;
  color: #17452f;
  font: 400 clamp(2.7rem, 7vw, 5rem)/1 "Patrick Hand", system-ui, sans-serif;
}
.game-heading .quest-kicker, .game-panel .quest-kicker {
  color: #355c3b;
  font-size: .88rem;
  letter-spacing: .04em;
  text-transform: none;
}
.game-heading p { margin-block: .35rem; }
.game-materials { font-weight: 600; }
.game-reward { color: #795017; font-size: .94rem; font-weight: 800; }
.game-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: start;
  gap: clamp(1rem, 5vw, 3.4rem);
}
.game-reference, .game-panel { min-width: 0; }
.game-reference img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 1.25rem;
  box-shadow: 0 .45rem 1.25rem #31583820;
}
.game-reference .scrolly-reference {
  max-height: 17rem;
  object-fit: contain;
  background: radial-gradient(#fff0ae, #f4e9c2 72%);
}
.game-reference ol { padding-inline-start: 1.35rem; }
.game-reference li + li { margin-top: .35rem; }
.game-panel {
  padding: clamp(1rem, 3vw, 1.55rem);
  border: 1px solid #cbdab4;
  border-radius: 1.3rem;
  background: #fbfff3;
}
.game-panel h2, .game-result h2 {
  margin: 0 0 .5rem;
  font: 400 clamp(1.8rem, 4vw, 2.4rem)/1.06 "Patrick Hand", system-ui, sans-serif;
}
.game-panel p { margin-block: .45rem .8rem; }
.activity-page .quest-button, .activity-page .quest-secondary { min-height: 48px; font-size: 1rem; }
.activity-page .quest-button { background: #245e40; border-color: #245e40; color: #fffdf5; }
.activity-page .quest-button:hover { background: #174c32; }
.activity-page .quest-secondary { background: #fffdf5; border-color: #9eb38e; color: #214332; }
.activity-page .quest-secondary:hover { background: #eaf2dd; }
.activity-page button:disabled { cursor: default; opacity: .6; }
.game-score { color: #245e40; font: 850 clamp(1.5rem, 5vw, 2.8rem)/1.12 system-ui, sans-serif; }
.game-hint { color: #48624d; font-size: .94rem; }
.game-prompt { padding: .85rem; border-radius: .85rem; background: #e9f1da; font-size: 1.12rem; }
.game-print { display: block; width: fit-content; margin-top: .8rem; }
.poem-line { display: grid; gap: .2rem; margin-block: .6rem; font-weight: 650; }
.poem-line input, .tally input {
  min-width: 0;
  min-height: 48px;
  padding: .4rem .65rem;
  border: 1px solid #97ae87;
  border-radius: .6rem;
  background: #fff;
  color: #214332;
  font: inherit;
}
.sketch-paper {
  display: grid;
  place-items: center;
  background: #fff6df;
  border-radius: .9rem;
  box-shadow: inset 0 0 0 2px #efdeae;
}
.scrolly-sketch { display: block; width: min(100%, 16rem); height: auto; fill: none; stroke: #263a36; stroke-width: 3.3; stroke-linecap: round; stroke-linejoin: round; }
.sketch-brain { stroke: #b15e14; }
@media (prefers-reduced-motion: no-preference) {
  .scrolly-sketch :is(path, ellipse) { stroke-dasharray: 1; animation: draw-scrolly 1.05s var(--sketch-delay, 0s) ease-out both; }
  .sketch-brain { --sketch-delay: 1s; }
  .sketch-face { --sketch-delay: 1.9s; }
  .sketch-limbs { --sketch-delay: 2.8s; }
  @keyframes draw-scrolly { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
}
@media (prefers-reduced-motion: reduce) { .sketch-replay { display: none; } }
.sketch-replay { margin-block: .6rem; }
.drawing-upload { border-top: 1px solid #cbdab4; padding-top: .8rem; }
.drawing-upload:has(input:focus-visible) .drawing-label { outline: 3px solid #236844; outline-offset: 4px; }
.drawing-preview { display: block; max-width: 100%; max-height: 18rem; border-radius: .65rem; }
.upload-status:empty { display: none; }

.game-result:not(.game-panel) {
  margin-top: 1.25rem;
  padding: 1rem 1.35rem 1.35rem;
  background: #faedc4;
  border-radius: 1.2rem;
}
.game-result.game-panel { background: #faedc4; border-color: #e6ce89; }
.game-result .game-star { color: #97640e; font-size: 2rem; line-height: 1; margin: 0 0 .25rem; }
.game-nav { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem; margin-top: 1rem; }
.tally {
  display: grid;
  grid-template-columns: 3rem minmax(5rem, 8.5rem) 3rem;
  justify-content: start;
  align-items: center;
  gap: .4rem;
  margin-block: .85rem .65rem;
}
.tally label { grid-column: 1 / -1; font-weight: 750; }
.tally input { width: 100%; text-align: center; font-size: 1.4rem; font-weight: 800; appearance: textfield; }
.tally input::-webkit-inner-spin-button, .tally input::-webkit-outer-spin-button { appearance: none; }
.tally .tally-button { padding: 0; font-size: 1.5rem; }
#catch-progress { display: block; width: min(100%, 15.3rem); height: .8rem; accent-color: #2d754e; }
@media (max-width: 650px) {
  .activity-page .quest-nav { column-gap: .35rem; font-size: .83rem; }
  .activity-page .quest-nav > a:last-child { padding-inline: .55rem; }
  .game-content { grid-template-columns: minmax(0, 1fr); gap: .75rem; }
  .game-reference img { max-height: 12.5rem; }
  .game-reference p, .game-reference ol { margin-block: .65rem; }
}
