/* Animal Pieces: its own look (a wooden toy shelf, chunky bumpy pieces, a shelf for the tray; Doug picked look A, Oct 20).
   Calm by design: soft colors, slow smooth motion (0.4 to 0.8 s, ease in and out), one thing moving at a time. */
:root {
  --paper: #ecd0a0;
  --card: #fffaf0;
  --linen: #fbf3e2;
  --ink: #3b2610;
  --soft: #7a6047;
  --thread: #b89a6a;
  --green: #5f9a5a;
  --green-d: #42763f;
  --sun: #e9b949;
  --radius: 20px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  min-height: 100dvh;
  /* Look B (Doug, Nov 3): the bright blue field comes from look-b.css; this is only the color before it loads. */
  background-color: #1f5fbf;
  color: var(--ink);
  font: 500 18px/1.45 'Fredoka', system-ui, sans-serif;
  overscroll-behavior: none;
}
h1, h2 { font-weight: 700; line-height: 1.1; margin: 0; }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: #2f5f8f; }
[hidden] { display: none !important; }

/* top bar */
.top { display: flex; align-items: center; gap: 10px; padding: max(10px, env(safe-area-inset-top)) 16px 6px; min-height: 64px; }
.grow { flex: 1; }
.brand svg { display: block; }
.back, .round {
  min-height: 48px; min-width: 48px; border: 3px solid var(--ink); border-radius: 16px; background: var(--card);
  box-shadow: 0 4px 0 var(--ink); font-weight: 700; padding: 6px; display: inline-flex; align-items: center; justify-content: center;
}
.back:active, .round:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
#sound .mute { display: none; }
#sound[aria-pressed='false'] .mute { display: inline; }
#sound[aria-pressed='false'] .waves { display: none; }

main { max-width: 1600px; margin: 0 auto; padding: 0 16px calc(24px + env(safe-area-inset-bottom)); }
.screen { display: grid; gap: 18px; }

/* home */
.hero { text-align: center; display: grid; gap: 8px; justify-items: center; }
.hero h1 { font-size: clamp(34px, 9vw, 52px); }
.lede { margin: 0; font-size: 20px; color: var(--soft); }

.big {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 76px;
  border: 3px solid var(--ink); border-radius: 24px; font-size: 30px; font-weight: 700; box-shadow: 0 7px 0 var(--ink); padding: 10px 20px;
}
.big:active { transform: translateY(5px); box-shadow: 0 2px 0 var(--ink); }
.big.go { background: var(--green); color: #fff; text-shadow: 0 2px 0 #0003; }
.big.plain { background: var(--card); font-size: 24px; min-height: 64px; }

.pick { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.pick legend { font-weight: 700; font-size: 18px; margin-bottom: 8px; padding: 0; }
.pick button {
  border: 3px solid var(--ink); border-radius: 18px; background: var(--card); box-shadow: 0 4px 0 var(--ink); padding: 8px 4px 10px;
  display: grid; justify-items: center; align-content: start; gap: 2px; font-weight: 700; font-size: 17px; line-height: 1.15; min-height: 56px;
}
.pick button svg { width: min(22vw, 96px); height: auto; margin-bottom: 4px; }
.pick button small { font-size: 14px; font-weight: 500; color: var(--soft); }
.pick button[aria-pressed='true'] { background: #e3f0de; border-color: var(--green-d); box-shadow: 0 4px 0 var(--green-d); outline: 3px solid var(--green); outline-offset: 1px; }
.pick button:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips legend { width: 100%; }
.chips button { display: inline-flex; min-height: 48px; padding: 6px 14px; font-size: 18px; align-items: center; }

.grownups, .about { background: var(--card); border: 3px solid var(--ink); border-radius: var(--radius); padding: 14px 16px; box-shadow: 0 5px 0 #4a362033; }
.grownups summary { font-weight: 700; cursor: pointer; min-height: 32px; }
.grownups p, .about p { margin: 10px 0 0; }
.about h2 { font-size: 22px; }
.small { font-size: 14px; color: var(--soft); }
.grown-text, .parents { display: grid; gap: 8px; }
.grown-text h2, .parents h2 { margin: 8px 0 0; }
.grown-text h3 { margin: 6px 0 0; font-size: 19px; }
.grown-text p, .grown-text ul, .parents p { margin: 0; }
.grown-text ul { padding-left: 22px; display: grid; gap: 6px; }

/* the board: the animal and the tray */
#play-screen { gap: 8px; }
.dots { list-style: none; display: flex; justify-content: center; gap: 8px; margin: 0; padding: 0; }
.dots li { width: 22px; height: 22px; border-radius: 7px; background: #fff4dc; border: 3px dashed #6b4a24; }
.dots li.now { background: #fff4dc; border-style: solid; }
.dots li.done { border-style: solid; }
.board-wrap { position: relative; height: min(calc(100dvh - 150px - env(safe-area-inset-top)), calc((min(100vw, 792px) - 32px) * 1.5)); min-height: 260px; }
#board { display: block; width: 100%; height: 100%; touch-action: none; }
.said { margin: 0; min-height: 26px; text-align: center; font-size: 17px; color: var(--ink); }
.next { position: absolute; z-index: 2; width: auto; animation: fade .5s ease-in-out both; }

.shelf { fill: #c99a5c; stroke: var(--ink); stroke-width: 1.4; }
.shelf-in { fill: #f3dfb8; stroke: #8a6330; stroke-width: .6; }
.slot { fill: #fffaf0; }
.slot-edge { fill: none; stroke: var(--ink); stroke-width: 9; stroke-dasharray: 14 10; stroke-linejoin: round; }
.layer-tray .body, .layer-fly .body { cursor: grab; }
.body.lifted { filter: drop-shadow(0 1px 1px #0005); }
/* The hint: the screen dims around it (spotlight.js, Doug's standing rule Oct 6: no circles). */
.body.nope { animation: nope .7s ease-in-out; }
.body.leave { opacity: 0; transition: opacity .5s ease-in-out; pointer-events: none; }

/* finish: the animals lined up on the shelf */
#finish { text-align: center; padding-top: 6px; gap: 14px; }
.cheer { font-size: clamp(30px, 8vw, 44px); }
.parade {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: 10px; padding: 14px; justify-items: center;
  background: #b88a4e; border-radius: 20px; border: 3px solid #6b4a24; box-shadow: 0 6px 0 #8a6330; animation: fade .6s ease-in-out both;
}
.parade svg { display: block; width: 100%; max-width: 190px; height: auto; background: #e9cf9f; border-radius: 14px; padding: 8px; }
.talk { margin: 0; background: #fff8e6; border: 2px dashed var(--thread); border-radius: 16px; padding: 12px 14px; text-align: left; font-size: 18px; }

/* Evening look (after 6 PM unless a grown-up changes it): dimmer and warmer, same layout. */
body.evening { --paper: #e6d4b2; --card: #f1e4c8; }
body.evening main, body.evening .top { filter: brightness(.86) sepia(.18); }

/* Motion: slow, smooth, once. Nothing loops or shakes. */
@keyframes fade { from { opacity: 0; } }
@keyframes nope { 40% { opacity: .5; } }

@media (min-width: 700px) {
  .big { max-width: 520px; justify-self: center; }
  .next { max-width: none; }
}
/* short, wide screens (a phone held sideways): less room above the board */
@media (orientation: landscape) and (max-height: 520px) {
  .top { min-height: 52px; padding-top: max(4px, env(safe-area-inset-top)); padding-bottom: 2px; }
  .board-wrap { height: calc(100dvh - 104px); }
  .said { min-height: 0; font-size: 15px; }
  .dots li { width: 12px; height: 12px; }
  .next { min-height: 64px; font-size: 26px; }
}

/* Hear it again: a big speaker beside the line, for children who cannot read it (Doug, Oct 20: "audio is crucial"). */
.said-row { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 0 16px 8px; }
.hear { flex: none; width: 56px; height: 56px; border: 3px solid var(--ink); border-radius: 50%; background: var(--card); color: var(--ink); box-shadow: 0 4px 0 var(--ink); display: grid; place-items: center; padding: 0; cursor: pointer; }
.hear:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--ink); }
.said-row .said { flex: 0 1 auto; min-width: 0; }
