:root{font-family:system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;color:#354a40;background:#f8f5ed;font-synthesis:none;--ink:#354a40;--sage:#456451;--line:#e0e3d5;--cream:#fffdf7;--muted:#748272}*{box-sizing:border-box}body{margin:0}button{font:inherit;cursor:pointer;min-height:44px;padding:11px 15px;border:1px solid var(--line);border-radius:13px;background:var(--cream);color:var(--ink);font-weight:700;line-height:1.35}button:hover{background:#edf2e6}button:focus-visible{outline:3px solid #c17d43;outline-offset:3px}button[aria-pressed=true]{background:#e0eadb;border-color:#7e9a76;color:#28482f}button:disabled{opacity:.55;cursor:default}[hidden]{display:none!important}h1,h2,h3,p{margin:0}h1{font-family:Georgia,serif;font-size:clamp(29px,3.4vw,44px);font-weight:400;letter-spacing:-1.5px;margin:7px 0 9px}h2{font-family:Georgia,serif;font-size:25px;font-weight:400;line-height:1.2}h3{font-size:13px;margin:12px 0;color:#6a7965}p{line-height:1.6}.overline{display:block;font-size:10px;font-weight:700;letter-spacing:1.7px;color:#7a8c70}#game{max-width:1320px;margin:auto;padding:25px 30px 35px}.nursery-header{display:flex;justify-content:space-between;gap:20px;align-items:center;margin-bottom:22px}.nursery-header p{font-size:14px;color:var(--muted)}.header-tools{display:flex;gap:8px;flex-wrap:wrap}.header-tools button{font-size:12px}.header-tools [data-action=pause]{background:var(--sage);color:white;min-width:75px}.visit-strip{display:flex;justify-content:space-between;align-items:center;gap:15px;font-size:12px;margin-bottom:15px;padding-bottom:15px;border-bottom:1px solid var(--line)}#visit-label{color:#7c806a}.caregiver-pick{display:flex;align-items:center;gap:8px}.caregiver-pick button{font-size:12px;min-height:36px;padding:7px 17px}.nursery-layout{display:grid;grid-template-columns:minmax(0,1fr) 310px;gap:23px}.scene{position:relative;aspect-ratio:1.4;isolation:isolate;overflow:hidden;background:#e9eddf url('./assets/nursery.webp') center/cover;border-radius:24px;border:1px solid #dedccb;touch-action:pan-y}.scene-top{position:absolute;z-index:12;left:15px;right:15px;top:14px;display:flex;justify-content:space-between;gap:8px;pointer-events:none}.scene-top span{background:#fffdf3e8;border:1px solid #e5dfcf;border-radius:25px;padding:7px 11px;font-size:10px}.sprite{background-image:var(--asset);background-size:calc(var(--columns)*100%) calc(var(--rows)*100%);background-position:var(--x) var(--y);background-repeat:no-repeat}.item-art{display:inline-block;width:45px;height:45px;flex-shrink:0}.furniture{position:absolute;width:67%;height:78%;left:22%;bottom:0;z-index:2;pointer-events:none}.caregiver{position:absolute;width:47%;height:65%;left:2%;bottom:9%;z-index:4;transform-origin:65% 80%;pointer-events:none}.kay-wrap{position:absolute;width:36%;height:49%;left:45%;bottom:14%;z-index:6;transform-origin:50% 80%;pointer-events:none}.kay{width:100%;height:100%;position:absolute;inset:0}.active-prop{position:absolute;width:20%;height:28%;left:66%;bottom:12%;z-index:8;pointer-events:none;transform-origin:25% 70%}.blanket-layer{position:absolute;z-index:7;width:37%;height:40%;left:44%;bottom:10%;pointer-events:none}.scene[data-location=chair] .furniture{width:55%;height:82%;left:35%;bottom:-2%}.scene[data-location=change] .kay-wrap{bottom:29%;left:43%;height:42%;width:33%}.scene[data-location=change] .caregiver{bottom:14%}.scene[data-location=change] .furniture{left:27%;width:65%;height:75%;bottom:2%}.scene[data-location=change] .active-prop{left:69%;bottom:30%;width:15%;height:22%}.scene[data-location=bed] .furniture{left:24%;width:70%;height:76%;bottom:1%}.scene[data-location=bed] .kay-wrap{bottom:22%;left:44%;width:37%;height:42%}.scene[data-location=bed] .caregiver{bottom:5%}.scene[data-location=cuddle] .furniture{left:20%;width:62%;height:78%}.scene[data-location=cuddle] .caregiver{left:22%;bottom:9%;width:47%;height:67%;z-index:5}.scene[data-location=cuddle] .kay-wrap{left:45%;bottom:25%;width:29%;height:39%}.scene[data-location=cuddle] .active-prop{left:62%;bottom:27%;width:20%;height:25%}.scene-reaction{position:absolute;bottom:10px;left:15px;z-index:12;font-family:Georgia,serif;font-size:18px;color:#4a6250;background:#fffdf5d9;border-radius:14px;padding:4px 12px;pointer-events:none}.scene-reaction:empty{display:none}.scene-target{position:absolute;inset:13% 9% 10% 28%;border:0;background:transparent!important;z-index:10;color:transparent;border-radius:50%}.scene-target span{position:absolute;bottom:-8%;left:12%;font-size:11px;color:#53634d;background:#fffdf5e0;padding:7px 11px;border:1px dashed #9da987;border-radius:20px}.scene-target:hover span{background:#e7f0db}.sleep-z{position:absolute;left:63%;top:28%;z-index:9;font-family:Georgia;font-size:25px;letter-spacing:5px;color:#536d69;animation:float-z 4s ease-in-out infinite}.spills{position:absolute;z-index:9;bottom:32%;left:61%;color:#d68d45;transform:rotate(-10deg)}.pause-overlay,.milestone-overlay{position:absolute;inset:0;z-index:20;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:16px;background:#f9f6e9ee;text-align:center;padding:30px}.pause-overlay h2,.milestone-overlay h2{font-size:34px}.pause-overlay p,.milestone-overlay p{max-width:360px;font-size:14px;color:#71816e}.pause-overlay button,.milestone-overlay button{background:var(--sage);color:white;min-width:170px}.pause-overlay [data-action=visit]{background:transparent;color:var(--sage);font-size:12px}.save-label{font-size:11px;color:#75816c;max-width:300px}.station-nav{display:grid;grid-template-columns:repeat(5,1fr);gap:8px;margin-top:12px}.station-nav button{font-size:11px;font-weight:700;padding:12px 5px;display:flex;flex-direction:column;align-items:center;gap:6px}.station-nav button>span{font-size:23px;font-weight:400;color:#789072}.clue-card{display:flex;align-items:center;gap:13px;border:1px solid var(--line);background:#f0f1e5;border-radius:18px;padding:16px;margin-top:17px}.clue-card p{font-size:13px;margin-top:5px}.clue-card .overline{font-size:9px}.clue-card button{font-size:10px;min-width:92px;padding:9px;white-space:nowrap;margin-left:auto}.clue-symbol{font-size:30px;color:#7f956e}.growth-card{padding:20px 0 0}.growth-card h2{font-size:21px;margin:8px 0 13px}#growth-progress{display:grid;grid-template-columns:repeat(4,1fr);gap:14px}.growth-item{display:grid;grid-template-columns:1fr auto;gap:7px;font-size:10px;color:#74826c}.growth-item strong{font-size:10px;font-weight:700}progress{width:100%;height:6px;grid-column:1/-1;appearance:none;border:0;border-radius:5px;background:#e4e8d9}progress::-webkit-progress-bar{background:#e4e8d9;border-radius:5px}progress::-webkit-progress-value{background:#99ae85;border-radius:5px}.care-panel{background:var(--cream);border:1px solid var(--line);border-radius:22px;padding:23px;align-self:start}.care-panel h2{margin-top:8px}.care-panel>p{font-size:12px;color:var(--muted);margin:11px 0 15px}.activity-status{background:#f0f3e8;border-radius:11px;padding:12px;font-size:12px;line-height:1.5;color:#63765b;margin-bottom:15px;min-height:42px}.controls{display:flex;flex-direction:column;gap:9px}.controls button{font-size:12px;display:flex;align-items:center;justify-content:center;gap:7px}.choice-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.choice-grid .tool{flex-direction:column;padding:8px 5px;min-height:86px;font-size:11px;touch-action:pan-y}.outfits,.supplies{grid-template-columns:repeat(3,minmax(0,1fr))}.outfits .tool,.supplies .tool{font-size:10px}.soothing{display:flex;flex-direction:column;gap:7px}.soothing button{min-height:40px}.selected-note{font-size:11px;color:#8a785c;margin-top:12px;line-height:1.5}.feedback{border-top:1px solid var(--line);margin-top:18px;padding-top:16px;font-size:13px;line-height:1.6;min-height:68px}.parent-help>button{font-size:12px;margin-top:10px;width:100%;border-color:#d9d7bf;background:#f6f1e3}.parent-help>div{margin-top:12px;padding:14px;border-radius:13px;background:#fff0d5;font-size:12px;line-height:1.7}.care-summary{padding-top:15px}.care-summary p{display:flex;justify-content:space-between;gap:10px;font-size:10px;padding:7px 0;border-bottom:1px solid #ededdf}.wardrobe-display{display:flex;align-items:center;gap:9px;font-size:10px;color:#7f8b75;margin-top:17px;border-top:1px solid var(--line);padding-top:10px}.wardrobe-display .item-art{width:32px;height:32px}.locked-note{font-size:11px;color:#8b927d}.nursery-footer{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;font-size:10px;color:#86917e;margin-top:25px}.save-error{color:#a45536}.memory-drawer{margin-top:28px;border:1px solid var(--line);background:var(--cream);border-radius:24px;padding:25px}.memory-heading{display:flex;justify-content:space-between;align-items:center;gap:15px}.memory-heading h2{margin:8px 0}.memory-heading button{font-size:11px}.favorites{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin:22px 0}.favorites div{border-radius:13px;background:#edf1e5;padding:12px}.favorites span{display:block;font-size:10px;color:#7a876f;margin-bottom:6px}.favorites strong{font-size:12px}.memory-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:15px;margin-bottom:25px}.memory-card{padding:10px;border:1px solid #e8e3d4;background:#f9f4e7;display:flex;align-items:center;flex-direction:column;text-align:center;border-radius:4px;transform:rotate(-1deg)}.memory-card:nth-child(2n){transform:rotate(1deg)}.memory-card .item-art{width:95px;height:95px}.memory-card strong{font-size:12px;line-height:1.5}.memory-card small{font-size:10px;color:#7a876f;margin-top:6px}.goal-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.goal-grid article{padding:15px;border-radius:13px;background:#f1f2e9}.goal-grid strong{font-size:12px}.goal-grid p{font-size:11px;color:#7a876f;margin:8px 0}.goal-grid button{font-size:10px}.goal-locked{font-size:10px;color:#959783}.decorations{pointer-events:none}.decorations>span{position:absolute}.flower-decor{left:41%;top:17%;font-size:25px;color:#c7a56b}.mobile-decor{left:70%;top:14%;font-size:21px;color:#9a9866;z-index:3;text-align:center}.bunting-decor{left:25%;top:11%;color:#cba888;letter-spacing:11px;font-size:22px}.canopy-decor{left:45%;top:15%;width:25%;height:58%;border-radius:50% 50% 10% 10%;background:#eee4d080;border:2px solid #d6c6a4;z-index:1}.rug-decor{left:18%;bottom:3%;width:68%;height:22%;border-radius:50%;background:#afbf8b8c;z-index:1}.cushion-decor{left:13%;bottom:9%;width:50px;height:45px;border-radius:14px;background:#ead49a;color:#fff6d7;text-align:center;font-size:30px;z-index:3}.scene[data-animation=eat] .active-prop{animation:offer 1.3s ease-in-out infinite}.scene[data-animation=eat] .caregiver,.scene[data-animation=change] .caregiver{animation:helping-hands 1.5s ease-in-out infinite}.scene[data-animation=reach] .kay-wrap{animation:reach 1.5s ease-in-out infinite}.scene[data-animation=giggle] .kay-wrap{animation:giggle .7s ease-in-out infinite}.scene[data-animation=fuss] .kay-wrap{animation:fuss .6s ease-in-out infinite}.scene[data-animation=reject] .kay-wrap{animation:reject 1.2s ease-in-out infinite}.scene[data-animation=yawn] .kay-wrap{animation:settle 3s ease-in-out infinite}.scene[data-animation=settle] .kay-wrap,.scene[data-animation=cuddle] .caregiver{animation:settle 3.5s ease-in-out infinite}.scene[data-animation=sleep] .kay-wrap{animation:breathe 5s ease-in-out infinite}.scene[data-animation=kick] .blanket-layer{animation:kick 1.5s ease-out infinite}.scene[data-animation=stack] .active-prop{animation:stack 1.7s ease-in-out infinite}.scene[data-animation=roll] .active-prop{animation:roll 2s ease-in-out infinite}.scene[data-animation=crawl] .kay-wrap{animation:crawl 3s ease-in-out infinite}.scene[data-animation=peek] .active-prop{animation:peek 1.6s ease-in-out infinite}.scene[data-animation=carry] .kay-wrap{animation:carry 3s ease-in-out}.scene[data-animation=read] .active-prop{animation:read 2s ease-in-out infinite}.scene[data-paused=true] *{animation-play-state:paused!important}@keyframes offer{50%{transform:translate(38%,-28%) rotate(12deg)}}@keyframes helping-hands{50%{transform:rotate(2deg) translateX(1%)}}@keyframes reach{50%{transform:rotate(-3deg) translateY(-2%)}}@keyframes giggle{50%{transform:translateY(-3%) scale(1.02)}}@keyframes fuss{25%{transform:rotate(-2deg)}75%{transform:rotate(2deg)}}@keyframes reject{50%{transform:translateX(4%) rotate(4deg)}}@keyframes settle{50%{transform:rotate(-3deg)}}@keyframes breathe{50%{transform:scale(1.015)}}@keyframes kick{50%,80%{transform:translate(20%,15%) rotate(18deg)}}@keyframes stack{50%{transform:translateY(-13%)}}@keyframes roll{50%{transform:translateX(-55%) rotate(-100deg)}}@keyframes crawl{50%{transform:translateX(16%)}}@keyframes peek{50%{transform:translate(-40%,-65%) scale(1.2)}}@keyframes carry{0%{transform:translate(-45%,-30%) rotate(-10deg)}100%{transform:translate(0,0)}}@keyframes read{50%{transform:rotateY(18deg)}}@keyframes float-z{50%{transform:translateY(-15px);opacity:.4}}
@media(max-width:1000px){#game{padding:20px}.nursery-layout{grid-template-columns:minmax(0,1fr) 280px;gap:16px}.care-panel{padding:18px}.scene{aspect-ratio:1.15}.header-tools{max-width:260px;justify-content:flex-end}.clue-card{flex-wrap:wrap}.clue-card button{margin-left:43px}.growth-card h2{font-size:19px}}@media(max-width:720px){#game{padding:17px 12px 25px}.nursery-header{align-items:flex-start;flex-direction:column;gap:15px}.nursery-header h1{display:block!important}.nursery-header p{font-size:12px}.header-tools{max-width:none;width:100%;justify-content:flex-start;gap:7px}.header-tools button{font-size:11px;flex:1}.visit-strip{flex-wrap:wrap;gap:12px;margin-bottom:12px}.caregiver-pick{width:100%;justify-content:flex-end}.caregiver-pick>span{margin-right:auto}.nursery-layout{grid-template-columns:1fr;gap:18px}.scene{aspect-ratio:1.2}.scene-top{top:10px;left:10px;right:10px}.scene-top span{font-size:9px;padding:6px 9px}.scene-target span{font-size:9px;bottom:-8%}.station-nav{gap:5px}.station-nav button{font-size:9px;padding:10px 3px;min-width:0;min-height:67px}.station-nav button>span{font-size:20px}.clue-card{padding:13px;gap:10px;flex-wrap:nowrap}.clue-card p{font-size:12px}.clue-card .clue-symbol{display:none}.clue-card button{margin-left:auto;min-width:72px;white-space:normal;font-size:9px}.clue-card .overline{font-size:8px}.growth-card{padding-top:17px}#growth-progress{gap:9px}.growth-item{font-size:9px;display:flex;flex-wrap:wrap}.growth-item progress{flex:1 0 100%}.care-panel{padding:20px}.care-panel h2{font-size:25px}.choice-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.choice-grid .tool{font-size:10px;min-height:86px}.choice-grid .item-art{width:42px;height:42px}.outfits,.supplies{grid-template-columns:repeat(3,1fr)}.soothing{display:grid;grid-template-columns:repeat(3,1fr)}.soothing button{font-size:10px;padding:10px 5px}.controls>button{min-height:46px}.memory-drawer{padding:17px}.favorites,.memory-grid{grid-template-columns:repeat(2,1fr)}.goal-grid{grid-template-columns:1fr 1fr}.pause-overlay,.milestone-overlay{padding:20px;gap:10px}.pause-overlay h2,.milestone-overlay h2{font-size:25px}.pause-overlay p,.milestone-overlay p{font-size:12px}.pause-overlay .save-label{font-size:9px;max-width:260px}.pause-overlay button{min-height:38px;font-size:12px;padding:8px 12px}.nursery-footer{font-size:9px}}
#game,#game button{font-family:system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;color:var(--ink)}#game h1,#game h2{font-family:Georgia,serif}#game .header-tools [data-action=pause],#game .pause-overlay button,#game .milestone-overlay button{color:white}#game .pause-overlay [data-action=visit]{color:var(--sage)}.blanket-layer{width:28%;height:23%;left:55%;bottom:20%}.scene[data-location=change] .kay-wrap{width:40%;height:32%;left:42%;bottom:40%}.scene[data-location=change] .furniture{bottom:0}.scene[data-location=bed] .caregiver{bottom:8%;width:43%}.selected-note button{font-size:11px;margin-top:8px;width:100%}.scene-target:focus-visible{outline:none!important;box-shadow:none!important}.scene-target:focus-visible span{outline:3px solid #8b9e6c;outline-offset:3px}
@media(max-width:720px){.nursery-layout{display:flex;flex-direction:column}.nursery-main{display:contents}.scene{order:1}.station-nav{order:2;margin-top:-6px}.clue-card{order:3;margin-top:0}.care-panel{order:4}.growth-card{order:5;padding-top:0}}
.milestone-kay{width:160px;height:160px;flex-shrink:0}.scene[data-paused=true] .milestone-kay{animation:milestone-cheer 1.8s ease-in-out infinite;animation-play-state:running!important}@keyframes milestone-cheer{0%,100%{transform:translateY(0) rotate(-3deg);background-position:66.6667% 0}50%{transform:translateY(-8px) rotate(3deg);background-position:33.3333% 0}}@media(max-width:720px){.milestone-kay{width:85px;height:85px}.milestone-overlay{gap:7px}.milestone-overlay h2{font-size:22px}}
@media(max-width:720px){.milestone-overlay{padding:14px;gap:6px}.milestone-kay{width:60px;height:60px}.milestone-overlay h2{font-size:20px}.milestone-overlay .overline{font-size:8px}.milestone-overlay p{font-size:11px;line-height:1.4}.milestone-overlay button{min-height:40px;flex-shrink:0}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
.story-picker { margin-block: .75rem 1rem; }
.story-options { display: flex; flex-wrap: wrap; gap: .45rem; }
.story-card { display: flex; align-items: center; gap: .8rem; padding: .65rem; margin-top: .5rem; border-radius: .8rem; background: #fffbec; }
.story-card h2, .story-card p { margin: .2rem 0; }
.story-picture { display: inline-block; width: 4rem; height: 4rem; flex: none; }
.nursery-frame { position: absolute; top: 12%; left: 52%; width: 26%; margin: 0; padding: .25rem; z-index: 2; border: 3px solid #926638; background: #fff5db; border-radius: .35rem; text-align: center; }
.nursery-frame .sprite { display: inline-block; width: 42%; aspect-ratio: 1; vertical-align: bottom; }
.nursery-frame figcaption { font-size: clamp(.53rem, 1.2vw, .8rem); line-height: 1.15; }
.memory-card button { margin-top: .4rem; }
.toy-board { position: absolute; left: 52%; bottom: 19%; width: 38%; display: flex; align-items: end; justify-content: center; gap: .3rem; pointer-events: none; z-index: 4; }
.scene:has(.toy-board:not([hidden])) .active-prop { visibility: hidden; }
.toy-cloth { position: relative; display: grid; place-items: center; width: 28%; aspect-ratio: 1.15; border-radius: 45% 45% 12% 12%; background: #cc6963; }
.toy-cloth .sprite { width: 90%; aspect-ratio: 1; position: absolute; bottom: 55%; }
.cloth-1 { background: #638db9; }
.cloth-2 { background: #c99433; }
.stack-cups { display: flex; flex-direction: column-reverse; align-items: center; width: 60%; }
.stack-cup { display: block; height: clamp(.55rem, 2vw, 1.25rem); width: 100%; background: #ca7868; border-radius: 15% 15% 30% 30%; box-shadow: inset 0 -.15rem #0002; }
.cup-1 { width: 72%; background: #e6b14e; }
.cup-2 { width: 48%; background: #688f74; }
.stack-cups.toppled { transform: rotate(35deg) translateX(25%); }

/* Keep Kay's sprite square and anchor each pose to the furniture surface. */
.scene[data-location] .kay-wrap { height: auto; aspect-ratio: 1; }
.scene[data-location=mat] .furniture { left: 24%; bottom: -4%; }
.scene[data-location=mat] .kay-wrap { left: 46%; bottom: 21%; }
.scene[data-location=cuddle] .caregiver { left: 28%; bottom: 23%; width: 39%; height: 53%; }
.scene[data-location=cuddle] .kay-wrap { left: 45%; bottom: 33%; width: 27%; }
.scene[data-location=cuddle] .active-prop { left: 60%; bottom: 33%; }
.scene[data-location=change] .kay-wrap { left: 38%; bottom: 49%; width: 36%; }
.scene[data-location=bed] .furniture {
  left: 26%;
  bottom: 5%;
  width: 66%;
  height: 65%;
  background: url('./assets/rail-free-bed.png') center bottom / contain no-repeat;
}
.scene[data-location=bed] .kay-wrap { left: 45%; bottom: 24%; width: 33%; }
.scene[data-location=bed] .kay-wrap[data-pose="8"] { bottom: 17%; }
@media (prefers-reduced-motion: no-preference) {
 .stack-cups.toppled { animation: cups-fall .45s ease-in both; }
 @keyframes cups-fall { from { transform: rotate(0deg); } }
}
.toddler-actions { border-top: 1px solid #d8dfca; margin-top: .75rem; padding-top: .75rem; }
.toddler-actions p { margin: .35rem 0 0; }
.toy-basket { position: absolute; z-index: 5; left: 38%; bottom: 18%; width: 16%; height: 10%; border: 3px solid #976841; border-radius: 15% 15% 30% 30%; background: repeating-linear-gradient(0deg,#bb8651 0 4px,#d6a678 4px 7px); pointer-events: none; }
.toy-basket::before { content: ''; position: absolute; inset: -20% -4% auto; height: 35%; border-radius: 50%; background: #765038; border: 3px solid #c49465; }
#game[data-toddler-ending=true] :is(.visit-strip,.story-picker,.station-nav,.clue-card,.growth-card,.care-panel,#scene-target,.header-tools [data-action=pause],.scene-reaction) { display: none; }
#game[data-toddler-ending=true] .nursery-layout { display: block; max-width: 54rem; margin-inline: auto; }
#game[data-toddler-ending=true] .ending-card { margin-top: .75rem; padding: 1rem; background: #fff8e9; border-radius: .9rem; }
#ending-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.scene[data-growth-stage="6"] .kay-wrap { left: 47%; width: 40%; bottom: 18%; animation: none; }
.scene[data-growth-stage="6"] .caregiver { left: 7%; }
.scene[data-ending-step="4"] .toy-basket::after { content: ''; position: absolute; left: 32%; top: -42%; width: 36%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #d1d9a2, #879555 80%); }
@media (prefers-reduced-motion: no-preference) {
 .scene[data-growth-stage="6"][data-ending-step="3"] .kay-wrap { animation: helping-hands .65s ease-out 1; }
}

.scene .age-milestone {background:#f9f6e9;}
#game .scene .milestone-overlay button {
 background:var(--sage);
 color:white;
}
#game .scene .milestone-overlay button:hover {background:#365242;}
.scene .age-milestone .milestone-kay {
 width:clamp(62px, 24%, 145px);
 height:auto;
 aspect-ratio:1;
 border:2px solid #fffdf7;
 border-radius:12px;
 animation:none;
}
.memory-card .milestone-portrait {border-radius:8px;}
/* Kay sits against the cushion, with the front rim drawn over her lap. */
.scene[data-location=chair] .kay-wrap {
 left: 49%;
 bottom: 44%;
 width: 26%;
}
.scene[data-location=chair]:is([data-growth-stage="1"],[data-growth-stage="2"],[data-growth-stage="3"]) .kay-wrap:not([data-pose="8"]) {
 left: 50%;
 bottom: 42%;
}
.scene[data-location=chair]:is([data-growth-stage="1"],[data-growth-stage="2"],[data-growth-stage="3"]) .kay-wrap:not([data-pose="8"]) .kay {
 scale: -1 1;
}
.scene[data-location=chair] .chair-tray {
 z-index: 7;
 clip-path: polygon(18% 29%, 23% 32%, 42% 34%, 55% 34%, 66% 30%, 74% 26%, 75% 32%, 66% 38%, 58% 40%, 32% 37%, 18% 35%);
}
.scene[data-location=chair] .active-prop {
 left: 47%;
 bottom: 54%;
 width: 10%;
 height: 14%;
}
.scene[data-location=chair] .kay-wrap[data-pose="8"] {
 bottom: 49%;
 width: 24%;
}
.scene[data-location=chair] .spills {
 left: 56%;
 bottom: 54%;
}

.growth-card {
 margin-top:17px;
 padding:16px;
 background:#fffdf7;
 border:1px solid var(--line);
 border-radius:18px;
}
#growth-progress {grid-template-columns:repeat(auto-fit,minmax(min(100%,135px),1fr));}
#chapter-next {font-size:13px;margin:12px 0 8px;}
.growth-card [data-action=chapter] {font-size:12px;}

.nursery-header .kay-age {
 margin-top:6px;
 color:var(--ink);
 font-weight:700;
}

/* The same saved family grows into a home, school and outings interface. */
#game[data-era="growing"] > :not(#journey-shell):not(#memory-drawer) { display:none; }
#game[data-era="nursery"] #journey-shell { display:none; }
.journey-header {display:flex;justify-content:space-between;align-items:start;gap:24px;margin:24px 0;}
.journey-header h1 {margin:8px 0;font-size:clamp(26px,4vw,42px);}
.family-ages {max-width:650px;line-height:1.7;font-weight:700;}
.journey-toolbar {display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:14px 18px;background:#e8eee4;border-radius:18px;margin-bottom:20px;}
.journey-toolbar > span:last-child {margin-left:auto;}
.journey-layout {display:grid;grid-template-columns:minmax(0,1.25fr) minmax(300px,.85fr);gap:24px;align-items:start;}
.journey-card {background:#fffdf7;border:1px solid var(--line);padding:22px;border-radius:22px;margin-bottom:20px;min-width:0;}
.journey-card h2 {font-size:22px;margin-top:0;}
.journey-card p {line-height:1.65;}
.journey-scene {position:relative;isolation:isolate;aspect-ratio:4/3;margin:0 0 20px;border:1px solid var(--line);border-radius:24px;overflow:hidden;background:#e7e8d5 url('/TakingCareOfKay/assets/growing-home.webp') center/cover;}
.journey-scene[data-setting="playground"] {background-image:url('/TakingCareOfKay/assets/growing-playground.webp');}
.journey-scene[data-setting="gate"] {background-image:url('/TakingCareOfKay/assets/growing-gate.webp');}
.journey-scene[data-setting="graduation"] {background-image:url('/TakingCareOfKay/assets/growing-graduation.webp');}
.journey-scene-label {position:absolute;top:14px;left:14px;padding:7px 12px;border-radius:20px;background:#fffdf7ed;font-size:13px;font-weight:700;}
.journey-scene .item-art {position:absolute;display:block;bottom:15%;width:43%;height:auto;aspect-ratio:1;background-color:transparent;}
.journey-scene .journey-kay {left:9%;z-index:2;}
.journey-scene .journey-sibling {right:8%;width:50%;}
.journey-scene .journey-other {right:-5%;width:44%;bottom:16%;}
.journey-scene[data-setting="graduation"] .journey-kay {left:0;}
.journey-scene[data-setting="graduation"] .journey-sibling {right:25%;}
.journey-scene figcaption {position:absolute;bottom:0;left:0;right:0;margin:0;background:#fffdf7ed;padding:12px 16px;line-height:1.5;font-size:13px;z-index:3;}
.experience-list {display:grid;gap:12px;}
.experience-list article {display:flex;flex-direction:column;align-items:stretch;gap:4px;padding:10px;background:#f1f2e9;border-radius:12px;}
.experience-list article > span {font-size:12px;font-weight:700;color:#405744;}
.journey-actions,.routine-list {display:grid;gap:10px;margin:16px 0;}
.journey-actions button,.routine-list button,.experience-list button {text-align:left;min-height:48px;white-space:normal;}
.journey-play progress {width:100%;height:10px;accent-color:#526c54;}
.journey-feedback {border-left:3px solid #668365;padding:10px 14px;background:#edf1e5;min-height:52px;}
.journey-pause {padding:12px;background:#f3eadb;border-radius:14px;margin-bottom:20px;}
.journey-hint {background:#f3eadb;padding:12px;border-radius:12px;}
.journey-footer {display:flex;justify-content:space-between;gap:20px;flex-wrap:wrap;font-size:12px;padding:16px 0 28px;}
.journey-pinned {padding:16px;margin-bottom:20px;background:#f3eadb;border-radius:16px;min-height:86px;}
.journey-pinned .keepsake-kay {float:left;width:64px;height:64px;margin-right:12px;}
.journey-pinned strong {display:block;margin-top:5px;}
.journey-pinned p {font-size:12px;line-height:1.6;}
.journey-layout [inert] {opacity:.55;}
@media(max-width:850px){.journey-layout{grid-template-columns:minmax(0,1fr);} .journey-header{flex-direction:column;gap:10px;} .journey-toolbar > span:last-child{margin-left:0;width:100%;} .journey-scene{max-height:540px;} }
@media(max-width:460px){.journey-card{padding:16px;border-radius:18px;} .journey-scene{aspect-ratio:1;} .journey-scene .journey-kay{width:50%;left:2%;bottom:17%;} .journey-scene .journey-sibling{width:60%;right:0;bottom:17%;} .journey-scene[data-setting="graduation"] .journey-kay{width:43%;} .journey-scene[data-setting="graduation"] .journey-sibling{width:54%;right:24%;} .journey-scene figcaption{font-size:12px;} .family-ages{font-size:13px;} .journey-header{margin-top:12px;} }
@media(prefers-reduced-motion:no-preference){.journey-scene .journey-kay{animation:journey-arrive .35s ease-out;}@keyframes journey-arrive{from{transform:translateY(5px);opacity:.6;}to{transform:translateY(0);opacity:1;}}}

/* Playful replay: persistent scene, hands-on workbench, and a family collection. */
.scene{background-image:url('/TakingCareOfKay/assets/play-nursery.webp')}.stack-cup .play-object{width:100%;height:100%;display:block}.stack-cup:has(.play-object){background:transparent!important;box-shadow:none;border:0}.scene[data-location=mat] .active-prop{filter:hue-rotate(var(--toy-hue,0deg))}
.station-nav .play-object{width:30px;height:30px}.wardrobe-display .play-object{width:42px;height:42px}.toy-basket:has(.play-object){background:none;border:0;box-shadow:none;height:17%;bottom:14%}.toy-basket:has(.play-object)::before,.toy-basket:has(.play-object)::after{display:none}.toy-basket>.play-object{width:100%;height:100%}.toy-basket>.basket-ball{display:none;position:absolute;width:45%;height:65%;left:27%;top:-10%}.scene[data-ending-step="4"] .toy-basket>.basket-ball{display:block}
.play-layout{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:22px;align-items:start}
.play-primary{min-width:0}.play-layout aside{min-width:0}.play-layout aside .journey-card{padding:18px}
.play-scene{position:relative;isolation:isolate;overflow:hidden;margin:0;aspect-ratio:2.35;border:1px solid #dacfb5;border-radius:24px 24px 0 0;background:#e9e4d6 url('/TakingCareOfKay/assets/play-workspace.webp') center/cover}
.play-scene[data-setting=kitchen]{background-image:url('/TakingCareOfKay/assets/play-kitchen.webp')}.play-scene[data-setting=bedroom]{background-image:url('/TakingCareOfKay/assets/play-bedroom.webp')}.play-scene[data-setting=playground]{background-image:url('/TakingCareOfKay/assets/growing-playground.webp')}.play-scene[data-setting=gate]{background-image:url('/TakingCareOfKay/assets/growing-gate.webp')}.play-scene[data-setting=graduation]{background-image:url('/TakingCareOfKay/assets/growing-graduation.webp')}
.play-scene-label{position:absolute;left:12px;top:12px;padding:6px 12px;background:#fffdf3eb;border-radius:18px;font-size:12px;font-weight:700;z-index:5}
.play-kay{position:absolute;left:15%;bottom:12%;width:34%;aspect-ratio:1;z-index:3;transform-origin:50% 90%}
.play-body{display:block;width:100%;height:100%;position:absolute;inset:0}
.play-sibling{display:block;position:absolute;right:12%;bottom:12%;width:38%;aspect-ratio:1;z-index:2}
.play-guest{position:absolute;display:block;width:27%;aspect-ratio:1;right:-2%;bottom:19%;z-index:1}
.play-face{display:block;position:absolute;left:10px;bottom:44px;width:64px;aspect-ratio:1;border:2px solid #fffdf7;border-radius:50%;background-color:#f6e8ce;box-shadow:0 3px 12px #354a4024;z-index:6}
.held-prop{position:absolute;left:60%;top:47%;width:24%;aspect-ratio:1;transform:rotate(-12deg)}.held-prop .play-object{width:100%;height:100%}
.play-ground{position:absolute;left:20%;right:14%;height:7%;bottom:12%;border-radius:50%;background:#3c392a36;filter:blur(6px);z-index:0}
.play-scene figcaption{position:absolute;inset:auto 0 0;background:#fff9e9eb;padding:9px 16px;font-size:12px;line-height:1.5;z-index:7}
.play-workbench{position:relative;background:#fffcf4;border:1px solid #dacfb5;border-top:0;border-radius:0 0 22px 22px;padding:20px;display:grid;grid-template-columns:minmax(0,1fr) minmax(150px,.8fr);gap:14px;box-shadow:0 8px 20px #5b51360b}
#play-intro,#play-result{grid-column:1/-1;min-width:0}#play-intro h2{font-size:25px;margin:5px 0 8px}#play-intro p,#play-controls p{font-size:14px;line-height:1.6;margin-bottom:10px}
#play-surface{min-width:0;align-self:start}#play-controls{min-width:0}#play-controls>button,#play-result>button{margin:8px 6px 0 0}
.play-object{display:inline-block;width:56px;height:56px;flex-shrink:0;vertical-align:middle;pointer-events:none}
.prop-tray,.paint-tools,.book-choices{display:grid;grid-template-columns:repeat(auto-fit,minmax(70px,1fr));gap:7px}
.prop-tray button,.paint-tools button,.book-choices button{display:flex;flex-direction:column;align-items:center;justify-content:center;font-size:11px;gap:4px;padding:7px;min-height:64px;background:#f7efd9;touch-action:pan-y}
.play-piece[aria-pressed=true]{background:#e4efdc;box-shadow:inset 0 0 0 2px #66885b}
.placement-board{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;padding:10px;background:#c4a071;border:4px solid #a58053;border-radius:16px;box-shadow:inset 0 2px 6px #5b412936}
.placement-board.arrange{min-height:142px;align-items:center}.placement-board.build{aspect-ratio:1}
.placement-target{min-height:54px;aspect-ratio:1;border:1px dashed #c8baa0;background:#fff8e7;display:grid;place-items:center;padding:3px;border-radius:10px;position:relative}
.placement-target .play-object{width:90%;height:90%;aspect-ratio:1}.placement-target[data-filled=true]{background:#f2eedc;border-style:solid;border-color:#899d76}
.ghost-prop{opacity:.24;filter:grayscale(.4)}.empty-place{color:#aa936f;font-size:12px}
.test-car{display:none;width:56px;height:42px}.test-car .play-object{width:48px;height:48px}
#play-surface[data-test=true] .test-car{display:block;animation:car-cross 1.8s ease-in-out 1}
.paint-surface{display:block;width:100%;height:auto;aspect-ratio:1.5;border:5px solid #c7a579;border-radius:15px;touch-action:none;box-shadow:0 4px 12px #6e543d22;background:#fffaf0}
.paint-surface:focus-visible{outline:3px solid #a86f3d;outline-offset:3px}.paint-surface foreignObject .play-object{width:40px;height:40px}
.paint-cursor{opacity:0}.paint-surface:focus .paint-cursor{opacity:1}.color-choice::before{content:'';display:block;width:27px;height:27px;border-radius:50%;background:var(--paint-color);border:2px solid #fffdf7}
.story-spread{display:grid;grid-template-columns:1fr 1fr;min-height:230px;border:5px solid #a38661;border-radius:9px 16px 16px 9px;background:#fff7e1;box-shadow:0 5px 15px #69583c22}
.story-left,.story-right{padding:12px;min-width:0}.story-left{border-right:2px solid #e5d5b4;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:10px;text-align:center;font-family:Georgia,serif}.story-left>.play-object{width:90px;height:90px}.book-page{display:flex;gap:5px;align-items:center;font-size:11px;line-height:1.4;margin-bottom:8px}.book-page .play-object{width:30px;height:30px}.scrapbook-creations{display:flex;gap:5px}.scrapbook-creations svg{width:45%;height:auto}
.turn-field{position:relative;aspect-ratio:1.4;border:3px solid #b3bd8a;border-radius:18px;background:linear-gradient(#eff2df,#d6e0b8);overflow:hidden}.turn-person{position:absolute;width:36%;aspect-ratio:1;bottom:23%}.turn-person>.sprite{display:block;width:100%;height:100%}.turn-person.p0{left:0}.turn-person.p1{left:32%}.turn-person.p2{left:65%}.passing-object{position:absolute;bottom:4%;width:50px;transition:left .5s ease-in-out}.turn-choices{display:grid;gap:8px}
.speech-bubble{padding:14px;border-radius:18px 18px 18px 3px;background:#edf2e5;border:1px solid #bacaa9}.conversation-choices{display:grid;gap:10px}.conversation-art{display:flex;align-items:center;background:#f2e9d9;border-radius:18px;min-height:170px}.conversation-art>.sprite{width:50%;aspect-ratio:1;display:block}
#play-result:empty{display:none}#play-result>svg{width:100px;height:100px;float:left;margin:0 16px 8px 0}#play-result label{display:block;font-size:12px;margin:8px 0}#creation-name{display:block;max-width:100%;width:260px;padding:10px;border:1px solid #bdc8af;border-radius:9px;font:inherit;color:var(--ink);background:#fffdf7}
.creation-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:14px}.creation-card{padding:14px;border:1px solid #e1d7bf;border-radius:16px;background:#fffaf0}.creation-card>svg{width:100%;max-height:180px}.creation-card h3{font-size:16px}.creation-card button{font-size:12px;margin:4px;min-height:44px}.creation-card p{font-size:12px}
.creation-grid{grid-template-columns:repeat(auto-fill,minmax(180px,240px))}
.graduation-page{border:2px solid #d8bd81;background:#fff5d9;padding:16px;border-radius:16px}.graduation-page h3{font-family:Georgia,serif;font-size:22px;color:var(--ink)}.graduation-pictures{display:flex;flex-wrap:wrap;gap:12px;margin:12px 0}.graduation-pictures figure{margin:0;width:110px}.graduation-pictures svg{width:110px;height:110px}.graduation-pictures figcaption{font-size:11px;line-height:1.5;margin-top:5px;overflow-wrap:anywhere}
.family-shelf{display:flex;gap:8px;flex-wrap:wrap;min-height:110px;padding:10px;border-bottom:12px solid #af875a;border-radius:8px;background:#f4e7ce}.family-shelf[data-style=sage]{background:#e5eddd;border-color:#6e8a63}.family-shelf[data-style=rose]{background:#f4e3e0;border-color:#b47f7b}.family-shelf figure{margin:0;width:calc(50% - 5px)}.family-shelf svg{width:100%;height:auto;display:block}.family-shelf figcaption{font-size:10px;margin-top:5px;line-height:1.4;overflow-wrap:anywhere}.family-shelf>p{font-size:13px}.shelf-styles{display:flex;gap:5px;margin-top:10px}.shelf-styles button{font-size:11px;padding:8px;text-transform:capitalize}
.age-picker{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0}.visit-badge{display:block;border-radius:14px;padding:10px 16px;background:#e7dcbf;font-size:11px;font-weight:700;letter-spacing:1px;margin-bottom:10px}
.play-layout [inert]{opacity:.55}.play-layout [aria-disabled=true]{opacity:.6}.play-layout .journey-card h2{font-size:21px}.play-layout .experience-list button{font-size:12px}.play-layout aside>section>button{margin-top:10px}
@keyframes car-cross{from{transform:translateX(0)}to{transform:translateX(220px)}}
@media(prefers-reduced-motion:no-preference){.placement-target[data-filled=true] .play-object{animation:piece-place .25s ease-out}.book-page:last-of-type{animation:page-open .35s ease-out}#play-surface[data-failed=true] .placement-board{animation:gentle-wobble .4s ease-out}@keyframes piece-place{from{transform:translateY(-7px) scale(.94);opacity:.6}to{transform:translateY(0) scale(1);opacity:1}}@keyframes page-open{from{transform:rotateY(-18deg);opacity:.4}to{transform:rotateY(0);opacity:1}}@keyframes gentle-wobble{25%{transform:rotate(-1deg)}75%{transform:rotate(1deg)}}}
@media(prefers-reduced-motion:no-preference){.play-scene[data-pose="1"] .play-kay{animation:play-reach .45s ease-out}.play-scene[data-pose="4"] .play-kay{animation:play-proud .6s ease-out}.play-scene::after{content:'';position:absolute;inset:0;pointer-events:none;background:linear-gradient(110deg,#fff9d314,transparent 60%);animation:play-light 12s ease-in-out infinite alternate;z-index:0}@keyframes play-reach{from{transform:translateX(-5px)}to{transform:translateX(0)}}@keyframes play-proud{50%{transform:translateY(-7px)}}@keyframes play-light{to{opacity:.3}}}
@media(max-width:1000px){.play-layout{grid-template-columns:minmax(0,1fr) 240px}.play-workbench{grid-template-columns:minmax(0,1fr);padding:16px}#play-intro,#play-result{grid-column:1}#play-controls{grid-row:2}#play-surface{grid-row:3}.play-scene{aspect-ratio:2}.prop-tray,.paint-tools,.book-choices{grid-template-columns:repeat(auto-fit,minmax(68px,1fr))}}
@media(max-width:760px){.play-layout{grid-template-columns:minmax(0,1fr)}.play-layout aside{display:grid;grid-template-columns:1fr 1fr;gap:12px}.play-layout aside #play-chapter{grid-column:1/-1}.play-layout aside .journey-card{margin-bottom:0}.play-scene{aspect-ratio:2.1}.play-kay{width:38%;left:14%}.play-sibling{width:43%;right:12%}.play-face{width:48px;bottom:43px}.play-scene figcaption{font-size:11px;padding:7px 11px}.play-ground{bottom:19%}.play-kay,.play-sibling{bottom:17%}#play-controls{position:sticky;top:0;z-index:9;background:#fffcf4;padding:8px 0}.prop-tray .play-object,.paint-tools .play-object,.book-choices .play-object{width:38px;height:38px}.prop-tray button,.paint-tools button,.book-choices button{font-size:10px}.placement-board.build{max-width:350px;margin:auto}.paint-surface{max-height:320px}.journey-header{gap:9px;margin:10px 0}.journey-header h1{font-size:28px}.journey-header .overline{font-size:8px}.header-tools{gap:5px}.header-tools button{padding:8px 10px;font-size:11px}.family-ages{font-size:11px;line-height:1.5}.journey-toolbar{padding:8px;gap:7px;font-size:11px;margin-bottom:10px}.journey-toolbar button{font-size:11px;padding:8px 12px}.play-scene-label{font-size:10px;top:7px;left:7px;padding:5px 9px}.play-workbench h2{font-size:22px!important}.creation-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:420px){.play-layout aside{display:block}.play-layout aside .journey-card{margin-bottom:12px}.play-workbench{padding:12px;gap:10px}.play-scene{aspect-ratio:1.85}.play-face{width:42px}.prop-tray,.paint-tools,.book-choices{grid-template-columns:repeat(3,minmax(0,1fr))}.play-layout{gap:14px}.creation-grid{grid-template-columns:1fr 1fr;gap:8px}.creation-card{padding:8px}.creation-card button{margin:3px 0;padding:7px;width:100%}.creation-card h3{font-size:13px}.play-layout #play-chapter{order:0}}
/* Illustrated workshop challenges and shared plans. */
.delivery-challenge{margin-top:16px;padding:16px;background:#edf2e4;border-radius:16px}.cargo-choices,.brush-choices{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0}.cargo-choices button{flex:1;min-width:100px}.cargo-choices .play-object{display:block;width:65px;height:65px;margin:auto}.delivery-landscape{height:70px;grid-column:1/-1;pointer-events:none}.delivery-landscape svg{width:100%;height:100%}.delivery-parcel{width:64px;height:64px;grid-column:1/-1;margin:auto;transition:transform .8s}.delivery-parcel .play-object{display:block;width:64px;height:64px}.delivery-parcel[data-delivery=steady]{transform:translateX(90px)}.delivery-parcel[data-delivery=wobble]{transform:rotate(-18deg)}[data-family=arrange] .delivery-landscape,[data-family=arrange] .delivery-parcel{display:none}.shared-plan{list-style:none;padding:0;display:grid;gap:8px}.shared-plan li{display:flex;align-items:center;gap:12px;background:#f2eddf;border-radius:12px;padding:8px}.shared-plan .play-object{display:block;width:52px;height:52px;flex:none}@media(prefers-reduced-motion:reduce){.delivery-parcel{transition:none}}@media(max-width:520px){.delivery-parcel[data-delivery=steady]{transform:translateX(45px)}}

