/* Leaf Peek: its own calm look (a pond-colored table, soft green leaves, cream picture cards).
   Motion: one leaf turns at a time in 0.6 s, ease in and out; a found pair settles to a soft green in 0.6 s.
   Nothing loops, and the kit's kids.css turns all of it off under Reduce motion. */
@font-face {
  font-family: 'ABeeZee';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(abeezee.woff2) format('woff2');
}

:root {
  --pond: #dcefe9;
  --pond-2: #c7e3db;
  --spot: #bcdcd3;
  --card: #fffdf5;
  --ink: #23413a;
  --soft: #4f6b63;
  --leaf: #86c47c;
  --leaf-d: #4f8f55;
  --green: #3f9a5a;
  --green-d: #2b7443;
  --sun: #f2c35a;
  --radius: 20px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  min-height: 100dvh;
  background: radial-gradient(circle at 15% 10%, #e9f6f2 0 16%, transparent 17%), radial-gradient(circle at 88% 85%, #d2ebe4 0 18%, transparent 19%), var(--pond);
  color: var(--ink);
  font: 500 18px/1.45 'Fredoka', system-ui, sans-serif;
  overscroll-behavior: none;
  overflow-x: hidden;
}
h1, h2 { font-weight: 700; line-height: 1.1; margin: 0; }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: #23628a; }

/* 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 { width: 40px; height: 40px; }
.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;
}
.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; max-width: 640px; margin: 0 auto; }

/* home */
.hero { text-align: center; display: grid; gap: 8px; }
.hero h1 { font-size: clamp(36px, 10vw, 54px); }
.lede { margin: 0; font-size: 20px; color: var(--soft); }
.demo { display: flex; justify-content: center; gap: 10px; margin-top: 6px; }
.demo span { width: 64px; height: 64px; border-radius: 16px; display: grid; place-items: center; }
.demo-leaf { background: var(--spot); }
.demo-leaf::after { content: ''; width: 46px; height: 52px; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; background: linear-gradient(90deg, #9bd291 50%, var(--leaf) 50%); }
.demo-pic { background: #e7f5e1; border: 3px solid var(--green); }
.demo-pic img { width: 46px; height: 46px; }

.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: 10px 6px;
  display: grid; justify-items: center; align-content: center; gap: 4px; font-weight: 700; font-size: 19px; min-height: 80px; line-height: 1.15;
}
.pick button small { font-size: 14px; font-weight: 500; color: var(--soft); }
.pick button[aria-pressed='true'] { background: #e2f3dc; 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); }
.mini { display: grid; grid-template-columns: repeat(6, 9px); gap: 3px; justify-content: center; }
.mini i { width: 9px; height: 11px; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; background: var(--leaf); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips legend { width: 100%; }
.chips button { display: inline-flex; min-height: 52px; padding: 6px 16px; font-size: 18px; align-items: center; gap: 6px; }
.abc { font: 400 22px/1 'ABeeZee', sans-serif; }

.grownups, .about { background: var(--card); border: 3px solid var(--ink); border-radius: var(--radius); padding: 14px 16px; box-shadow: 0 5px 0 #23413a33; }
.grownups summary { font-weight: 700; cursor: pointer; min-height: 32px; }
.grownups p { margin: 10px 0 0; }
.grownups .pick { margin-top: 12px; }
.small { font-size: 14px; color: var(--soft); }

/* the board: nothing but leaves */
#play-screen { max-width: none; }
.board {
  display: grid; grid-template-columns: repeat(var(--cols, 2), var(--cell, 120px)); grid-auto-rows: var(--cell, 120px);
  justify-content: center; align-content: center; gap: 0; min-height: calc(100dvh - 100px);
}
.spot { border: 0; padding: 6px; background: none; perspective: 900px; width: var(--cell, 120px); height: var(--cell, 120px); touch-action: manipulation; }
.spot .inner { position: relative; display: block; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform .6s ease-in-out; }
.spot.open .inner { transform: rotateY(180deg); }
.face {
  position: absolute; inset: 0; display: grid; place-items: center; border-radius: 22%; -webkit-backface-visibility: hidden; backface-visibility: hidden;
}
.leaf-side { background: var(--spot); box-shadow: inset 0 3px 6px #23413a1f; transition: box-shadow .6s ease-in-out; }
.leaf-side .leaf { width: 86%; height: 86%; filter: drop-shadow(0 3px 0 #2f6b4a33); }
.under { transform: rotateY(180deg); background: var(--card); border: 3px solid #a9cbbf; box-shadow: 0 4px 0 #23413a26; transition: background-color .6s ease-in-out, border-color .6s ease-in-out; }
.under img { width: 74%; height: 74%; object-fit: contain; }
.letter { font: 400 calc(var(--cell, 120px) * .5)/1 'ABeeZee', 'Comic Sans MS', sans-serif; color: #2e5f8a; padding-bottom: 4%; }
/* A found pair stays face up and settles onto a soft green pad. */
.spot.found .under { background: #e2f3dc; border-color: var(--green); }
.spot.found { cursor: default; }
/* The hint: the screen dims around it (spotlight.js, Doug's standing rule Oct 6: no circles). */
.spot:focus-visible { outline: 4px solid var(--ink); outline-offset: -2px; border-radius: 24px; }

/* finish */
#finish { text-align: center; padding-top: 10px; }
.cheer { font-size: clamp(32px, 8vw, 46px); }
.found-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.found-list li {
  width: 96px; background: #e2f3dc; border: 3px solid var(--green); border-radius: 18px; padding: 8px 4px 6px; display: grid; justify-items: center; gap: 2px;
  font-weight: 600; font-size: 16px; line-height: 1.15;
}
.found-list img { width: 56px; height: 56px; }
.found-list .letter { font-size: 40px; padding: 4px 0 6px; }
.found-list { animation: settle .6s ease-in-out both; }
.talk { margin: 0; background: #f4fbf8; border: 2px dashed var(--leaf-d); 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 { --pond: #cfe0d6; --card: #f3ead6; background: var(--pond); }
body.evening main, body.evening .top { filter: brightness(.86) sepia(.18); }

@keyframes settle { from { opacity: 0; } }

@media (min-width: 700px) {
  .big { max-width: 520px; justify-self: center; }
}
/* The grown-ups text under the game (own site only, hidden under the Child lock). */
.grown-text, .parents { display: grid; gap: 8px; }
.grown-text h2, .parents h2 { margin: 8px 0 0; font-size: 22px; }
.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: 4px; }
