* { box-sizing: border-box; }
:root {
  color-scheme: light;
  --ink: #25312c;
  --muted: #66736d;
  --cream: #fff8e8;
  --paper: #fffdf7;
  --green: #3f8f62;
  --green-dark: #276844;
  --lime: #cde977;
  --blue: #4f78d3;
  --blue-action: #3a5fb8;
  --sky: #dcecff;
  --coral: #f17967;
  --yellow: #ffd76a;
  --border: #e8dfca;
  --shadow: 0 10px 0 rgba(55, 72, 62, .10);
  font-family: "Trebuchet MS", "Arial Rounded MT Bold", system-ui, sans-serif;
}
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 12%, rgba(255, 215, 106, .35) 0 80px, transparent 81px),
    radial-gradient(circle at 92% 8%, rgba(205, 233, 119, .30) 0 105px, transparent 106px),
    var(--cream);
}
button, input { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible { outline: 4px solid var(--blue-action); outline-offset: 3px; }
.site-header {
  min-height: 76px;
  padding: 12px clamp(18px, 4vw, 56px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-size: 1.22rem; font-weight: 800; }
.brand-mark { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 15px 15px 20px 20px; background: var(--green-dark); color: white; box-shadow: inset 0 -4px 0 rgba(0,0,0,.12); }
main { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 14px 0 48px; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(2rem, 4vw, 3.7rem); line-height: 1.02; letter-spacing: -.04em; }
h2 { font-size: clamp(1.45rem, 2.5vw, 2rem); }
p { color: var(--muted); line-height: 1.55; }
.card, .loading-card { background: rgba(255,253,247,.94); border: 2px solid var(--border); border-radius: 28px; box-shadow: var(--shadow); }
.loading-card { min-height: 400px; display: grid; place-items: center; align-content: center; text-align: center; }
.loading-icon { font-size: 5rem; animation: bob 1.4s ease-in-out infinite; }
.hero { padding: clamp(28px, 6vw, 74px); display: grid; grid-template-columns: 1.15fr .85fr; align-items: center; overflow: hidden; }
.hero h1 span { color: var(--green); }
.hero-art { position: relative; min-height: 290px; display: grid; place-items: center; padding-top: 40px; }
.hero-orb { position: relative; width: min(310px, 70vw); aspect-ratio: 1; display: grid; place-items: center; border-radius: 50%; background: var(--lime); font-size: 8rem; box-shadow: inset 0 -16px 0 rgba(63,143,98,.18); }
.letter-stack { color: var(--green-dark); font-size: clamp(3.4rem, 8vw, 6.2rem); font-weight: 900; letter-spacing: -.12em; transform: rotate(-5deg); text-shadow: 5px 5px 0 rgba(255,255,255,.72); }
.spark { position: absolute; font-size: 2rem; }
.piko-peek { position: absolute; left: 0; top: -22.58%; width: 100%; z-index: 2; pointer-events: none; }
.piko-peek svg { display: block; width: 100%; height: auto; overflow: visible; }
.spark.three { display: none; }
@media (prefers-reduced-motion: no-preference) {
  .piko-peek #eye-left, .piko-peek #eye-right { transform-box: fill-box; transform-origin: center; animation: piko-blink 6s ease-in-out 2s infinite; }
  .piko-peek #ear-right { transform-box: fill-box; transform-origin: 50% 100%; animation: piko-ear 9s ease-in-out 5s infinite; }
}
@keyframes piko-blink { 0%, 94%, 100% { transform: scaleY(1); } 97% { transform: scaleY(.1); } }
@keyframes piko-ear { 0%, 96.7%, 100% { transform: rotate(0); } 98.3% { transform: rotate(6deg); } }
.spark.one { top: 10%; left: 8%; transform: rotate(-15deg); }.spark.two { right: 5%; bottom: 12%; }.spark.three { right: 14%; top: 8%; }
.actions, .button-row { display: flex; flex-wrap: wrap; gap: 12px; }
.btn { min-height: 50px; border: 0; border-radius: 16px; padding: 12px 20px; font-weight: 800; color: white; background: var(--green-dark); box-shadow: inset 0 -4px 0 rgba(0,0,0,.14); transition: transform .16s ease, filter .16s ease; }
.btn:hover { transform: translateY(-2px); filter: brightness(1.04); }.btn:active { transform: translateY(1px); }
.btn.secondary { color: var(--ink); background: var(--yellow); }.btn.ghost { color: var(--ink); background: transparent; border: 2px solid var(--border); box-shadow: none; }.btn.blue { background: var(--blue-action); }.btn.coral { color: var(--ink); background: var(--coral); }.btn.small { min-height: 42px; padding: 8px 14px; }
.hint-reveal { animation: hint-pop .28s ease-out; }
.auth-grid, .game-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 22px; }
.auth-card, .game-card, .panel { padding: clamp(22px, 4vw, 38px); }
.auth-icon, .game-icon { font-size: 3.5rem; margin-bottom: 12px; }
.asset-pair { min-height: 78px; display: flex; align-items: center; gap: 8px; }
.asset-pair img { width: 74px; height: 74px; object-fit: contain; }
form { display: grid; gap: 13px; }
label { display: grid; gap: 6px; font-weight: 800; }
input { width: 100%; min-height: 50px; border: 2px solid var(--border); border-radius: 14px; padding: 10px 13px; color: var(--ink); background: white; }
.form-note { font-size: .9rem; }
.alert { padding: 12px 14px; border-radius: 12px; background: #ffe7e1; color: #78372d; font-weight: 700; }
.eyebrow { color: var(--green-dark); font-size: .86rem; font-weight: 900; text-transform: uppercase; letter-spacing: .1em; }
.test-mode-banner { margin-bottom: 20px; padding: 12px 16px; border: 3px solid #9a4a3c; border-radius: 14px; background: #ffe7e1; color: #78372d; font-weight: 900; text-align: center; letter-spacing: .06em; }.test-mode-pill { padding: 8px 12px; border-radius: 999px; background: var(--coral); color: var(--ink); font-weight: 900; }
.dashboard-head, .game-topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.child-list { display: grid; gap: 15px; margin-top: 20px; }
.child-card { padding: 20px; border: 2px solid var(--border); border-radius: 20px; background: white; }
.child-card header { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.badges { display: flex; gap: 8px; flex-wrap: wrap; }.badge { padding: 6px 10px; border-radius: 999px; background: var(--sky); font-size: .84rem; font-weight: 800; }.badge.review { background: #fff0bc; }.badge.proficient { background: #dcf4c8; }
.progress-strip { height: 15px; border-radius: 999px; background: #eee8da; overflow: hidden; }.progress-strip > span { display: block; height: 100%; background: linear-gradient(90deg, var(--green), var(--lime)); border-radius: inherit; transition: width .35s ease; }
.game-card { min-height: 310px; display: flex; flex-direction: column; align-items: flex-start; }.game-card p { flex: 1; }.game-card.frog { background: linear-gradient(145deg, #f4ffe6, var(--paper)); }.game-card.space { background: linear-gradient(145deg, #e7edff, var(--paper)); }
.game-shell { padding: clamp(18px, 3vw, 32px); overflow: hidden; }
.stat-row { display: flex; gap: 10px; flex-wrap: wrap; }.stat { padding: 8px 12px; border-radius: 12px; background: white; border: 2px solid var(--border); font-weight: 800; }
.scene { position: relative; min-height: 420px; border-radius: 24px; padding: 22px; overflow: hidden; }
.pond { background: linear-gradient(#bfe4ff 0 52%, #84cc81 52% 68%, #79cbe0 68%); }.space-scene { color: white; background: radial-gradient(circle at 70% 20%, #5d6fd0, transparent 22%), linear-gradient(160deg, #151b45, #323a7d); }
.scene-title { min-height: 80px; padding-top: 64px; text-align: center; position: relative; z-index: 3; }.scene-title h2 { margin-bottom: 6px; }.space-scene .scene-title p { color: #e3e8ff; }
.audio-controls { position: absolute; right: 0; top: 0; display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 12px; }
.speak-button { width: 56px; height: 56px; display: grid; place-items: center; border: 0; background: white; color: var(--ink); border-radius: 50%; padding: 8px; box-shadow: 0 4px 0 rgba(37,49,44,.12); transition: transform .16s ease-out; }.speak-button:hover { transform: scale(1.06); }.speak-button:active { transform: translateY(2px); box-shadow: none; }.speak-button.slow { background: var(--yellow); }.speak-button img { width: 32px; height: 32px; object-fit: contain; }
.round-instruction { margin: 14px 0 6px; color: var(--ink); font-size: 1.08rem; font-weight: 900; }
.word-build { min-height: 58px; margin: 8px auto 18px; display: flex; justify-content: center; gap: 8px; position: relative; z-index: 3; }.chunk-slot { min-width: 70px; padding: 12px; border-radius: 14px; border: 3px dashed rgba(37,49,44,.25); background: rgba(255,255,255,.7); font-size: 1.6rem; font-weight: 900; text-align: center; }
.fly-field { display: grid; grid-template-columns: repeat(4, minmax(100px, 1fr)); gap: 12px; align-items: start; position: relative; z-index: 3; }
.fly { min-height: 106px; border: 0; background: transparent; color: white; font-size: 1.25rem; font-weight: 900; animation: hoverfly 2s ease-in-out infinite; }
.fly:nth-child(even) { animation-delay: -.8s; }
.fly-art { position: relative; width: 126px; height: 106px; display: grid; place-items: center; margin: auto; filter: drop-shadow(0 7px 2px rgba(37,49,44,.22)); }
.fly-art img { width: 126px; height: 106px; object-fit: contain; }
.fly-label { position: absolute; left: 41%; top: 58%; transform: translate(-50%, -50%); min-width: 48px; color: var(--ink); text-align: center; text-shadow: 0 1px 0 rgba(255,255,255,.8); }
.fly:disabled { opacity: .58; cursor: default; }
.fly-empty { display: block; min-height: 106px; }
.fly.fly-catch { opacity: 1; pointer-events: none; animation: fly-to-word .26s ease-in forwards !important; }
.lily-path { position: absolute; left: 60px; right: 62px; bottom: 2px; min-height: 46px; z-index: 1; }.path-pad { position: absolute; top: 0; width: 56px; height: 46px; margin-left: -28px; object-fit: contain; }.path-pad:nth-child(4n + 1) { transform: rotate(-3deg); }.path-pad:nth-child(4n + 2) { transform: rotate(2deg); }.path-pad:nth-child(4n + 3) { transform: rotate(4deg); }.path-pad:nth-child(4n) { transform: rotate(-2deg); }.frog-nest { position: absolute; right: 8px; bottom: 2px; width: 108px; height: 93px; object-fit: contain; z-index: 2; }.chase-line { position: absolute; left: 60px; right: 62px; bottom: 10px; height: 92px; z-index: 3; }.frog-character, .gator-character { position: absolute; bottom: 0; object-fit: contain; transition: left .35s ease; will-change: transform, opacity; }.frog-character { left: calc(var(--frog-pos, 2.5%) - 41px); width: 82px; height: 82px; z-index: 2; }.gator-character { left: calc(var(--gator-pos, 0%) - 56px); width: 112px; height: 91px; z-index: 3; }.frog-leap { animation: frog-hop .52s ease-out; }.catch-splash { position: absolute; left: calc(var(--frog-pos, 97.5%) - 60px); bottom: -8px; width: 120px; height: 100px; object-fit: contain; opacity: 0; transform: scale(0); transform-origin: center bottom; z-index: 4; }
.feedback { min-height: 54px; display: flex; align-items: center; justify-content: center; padding: 10px; text-align: center; font-size: 1.12rem; font-weight: 900; position: relative; z-index: 6; }.feedback.good { color: var(--green-dark); }.feedback.try { color: #9a4a3c; }
.space-body { position: relative; z-index: 3; max-width: 720px; margin: 0 auto; }.answer-zone { min-height: 74px; border: 3px dashed rgba(255,255,255,.55); border-radius: 18px; padding: 10px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; background: rgba(255,255,255,.1); }.answer-zone input { background: white; font-size: 1.7rem; text-align: center; letter-spacing: .12em; }
.tile-rack { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin: 18px 0; }.letter-tile { width: 58px; height: 58px; border: 0; border-radius: 14px; background: var(--yellow); color: var(--ink); font-size: 1.55rem; font-weight: 900; box-shadow: inset 0 -5px 0 rgba(138,95,18,.18); }.alien-row { min-height: 52px; display: flex; justify-content: center; flex-wrap: wrap; gap: 4px; }.rescued-alien { width: 42px; height: 42px; object-fit: contain; }.asteroid { position: absolute; width: 88px; height: 78px; object-fit: contain; top: 54%; right: 4%; animation: drift 3s linear infinite; }.space-ship { position: absolute; width: 100px; height: 92px; object-fit: contain; left: 3%; bottom: 3%; }.stars { position: absolute; inset: 0; opacity: .35; background-image: radial-gradient(white 1px, transparent 1px); background-size: 34px 34px; }
.finish { text-align: center; padding: clamp(35px, 7vw, 80px); }.finish-icon { min-height: 128px; display: flex; align-items: end; justify-content: center; gap: 8px; }.finish-icon img { width: 124px; height: 124px; object-fit: contain; }.finish h1 { color: var(--green-dark); }
.result-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 24px auto; max-width: 760px; text-align: left; }.result-summary > div { padding: 18px; border: 2px solid var(--border); border-radius: 18px; background: white; }.result-summary h2 { margin-bottom: 10px; font-size: 1.15rem; }.result-summary p { margin-bottom: 0; }.result-words { display: flex; flex-wrap: wrap; gap: 8px; }.result-words span { padding: 6px 10px; border-radius: 999px; background: var(--sky); font-weight: 800; }.result-summary > div:last-child .result-words span { background: #fff0bc; }
.game-rating { max-width: 760px; margin: 22px auto; padding: 20px; border: 2px solid var(--border); border-radius: 20px; background: #fffaf0; }.game-rating h2 { margin-bottom: 6px; }.game-rating p { margin-bottom: 14px; }.rating-choices { display: grid; grid-template-columns: repeat(5, minmax(92px, 1fr)); gap: 10px; }.rating-choices button { min-height: 112px; padding: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; border: 2px solid var(--border); border-radius: 16px; background: white; color: #b77b1f; font-weight: 900; }.rating-choices button:hover { transform: translateY(-2px); border-color: var(--green); }.rating-choices img { width: 64px; height: 64px; object-fit: contain; }.rating-choices span { min-height: 20px; font-size: .88rem; letter-spacing: -1px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 120px); max-width: calc(100% - 32px); padding: 12px 18px; color: white; background: var(--ink); border-radius: 14px; font-weight: 800; transition: transform .25s ease; z-index: 20; }.toast.show { transform: translate(-50%, 0); }
.shake { animation: shake .35s ease; }
@keyframes bob { 50% { transform: translateY(-9px) rotate(3deg); } }
@keyframes hoverfly { 50% { transform: translateY(-8px) rotate(2deg); } }
@keyframes drift { from { transform: translate(30px,-20px) rotate(0); } to { transform: translate(-90px,80px) rotate(230deg); } }
@keyframes shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
@keyframes hint-pop { from { opacity: 0; transform: scale(.78); } to { opacity: 1; transform: scale(1); } }
@keyframes fly-to-word { from { opacity: 1; transform: translateY(0) scale(1); } to { opacity: 0; transform: translateY(-72px) scale(.55); } }
@keyframes frog-hop { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-34px) rotate(-7deg); } }
@media (max-width: 780px) { .hero, .auth-grid, .game-grid, .result-summary { grid-template-columns: 1fr; }.hero-art { min-height: 220px; }.hero-orb { width: 210px; font-size: 6rem; }.fly-field { grid-template-columns: repeat(2, minmax(100px, 1fr)); }.rating-choices { grid-template-columns: repeat(3, minmax(82px, 1fr)); }.scene { min-height: 500px; }.dashboard-head, .game-topbar { align-items: flex-start; flex-direction: column; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }.speak-button:hover, .speak-button:active { transform: none; } }
.next-word-center, .next-word-center:hover { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 6; }.next-word-center:active { transform: translate(-50%, calc(-50% + 1px)); }
.hint-inline { display: inline-block; min-height: 36px; margin: 0 2px; padding: 2px 14px; border: 0; border-radius: 12px; color: var(--ink); background: #ffe9a3; font: inherit; font-weight: 900; box-shadow: inset 0 -3px 0 rgba(0,0,0,.12); vertical-align: middle; cursor: pointer; }
.gator-character.gator-behind { z-index: 1; }
.button-row-spacer { height: 42px; }
@media (min-width: 781px) { .scene.pond { min-height: 460px; } }
.result-line { line-height: 2.6; }
.inline-action { display: inline-block; min-height: 36px; margin: 0 2px; padding: 2px 14px; border: 0; border-radius: 12px; color: var(--ink); background: #ffe9a3; font: inherit; font-weight: 900; box-shadow: inset 0 -3px 0 rgba(0,0,0,.12); vertical-align: middle; cursor: pointer; }
.inline-action.choose { background: #d9e4ff; }

.recent-plays { margin-top: 12px; }.recent-plays summary { cursor: pointer; font-weight: 800; }.recent-play h4 { margin: 12px 0 0; }.recent-play .result-summary { margin: 8px 0; max-width: none; }.recent-play h5 { margin: 0 0 8px; }

/* Starting page (approved map r2 + Brandie's colors; Science = Warm Amber #F2A33A) */
:root { --amber: #f2a33a; }
.account { display: flex; align-items: center; gap: 12px; }
.name-chip { min-height: 42px; display: flex; align-items: center; padding: 8px 16px; border-radius: 999px; background: var(--sky); font-weight: 900; }
.lead { color: var(--muted); font-size: 1.1rem; margin: 0 0 16px; }
.subjects { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.subject { min-height: 230px; padding: 22px 26px; border-radius: 28px; display: flex; align-items: center; gap: 22px; text-align: left; font: inherit; border: 3px solid var(--border); box-shadow: var(--shadow); }
.subject:hover { transform: translateY(-2px); }
.subject-text { display: grid; gap: 6px; justify-items: start; }
.subject-name { font-size: 2rem; font-weight: 900; line-height: 1.1; }
.subject-line { font-size: 1.05rem; margin-bottom: 6px; }
.icon-slot { flex: 0 0 112px; width: 112px; height: 112px; border-radius: 50%; border: 3px dashed var(--ink); background: var(--sky); }
.pill { display: inline-block; padding: 8px 16px; border-radius: 999px; font-weight: 900; font-size: 1rem; color: white; background: var(--green-dark); }
.subject.i-lang { background: var(--green-dark); border-color: var(--green-dark); color: white; }
.subject.i-lang .icon-slot { background: var(--lime); }
.subject.i-lang .pill { background: var(--yellow); color: var(--ink); }
.subject.i-math { background: var(--yellow); border-color: var(--yellow); color: var(--ink); }
.subject.i-math .icon-slot { background: var(--sky); }
.subject.i-social { background: var(--lime); border-color: var(--lime); color: var(--ink); }
.subject.i-social .icon-slot { background: var(--yellow); }
.subject.i-science { background: var(--amber); border-color: var(--amber); color: var(--ink); }
.subject.i-science .icon-slot { background: var(--lime); }
.coming-soon { margin-top: 40px; padding: 56px 40px; }
.center { text-align: center; }
.soon-art { width: 140px; height: 140px; flex: none; margin: 0 auto 14px; }
.coming-soon .lead { max-width: 640px; margin: 0 auto 10px; }
.coming-soon .button-row { justify-content: center; margin-top: 14px; }
.back-subjects { margin-bottom: 10px; }
@media (max-width: 780px) { .subjects { grid-template-columns: 1fr; } }
