:root{--dock-space:90px}.livingDock{position:fixed;z-index:220;bottom:max(10px,env(safe-area-inset-bottom));right:max(16px,env(safe-area-inset-right));display:flex!important;visibility:visible!important;gap:9px;padding:6px 12px;border:1px solid #bfa36a88;border-radius:20px;background:linear-gradient(160deg,#142e3df2,#14291ff5);box-shadow:0 5px 22px #0006,inset 0 1px #f2d18b33}.livingDock button{display:flex;flex-direction:column;align-items:center;justify-content:center;position:relative;min-width:66px;min-height:64px;padding:2px 7px;background:transparent;border:0;border-radius:12px;box-shadow:none;color:#eddbb4;transition:background .2s,transform .2s}.livingDock svg{width:43px;height:43px;overflow:visible;filter:drop-shadow(0 3px 2px #0006);animation:dockBreathe 5s ease-in-out infinite}.livingDock button:nth-child(2) svg{animation-delay:-1.7s}.livingDock button:nth-child(3) svg{animation-delay:-3s}.livingDock span{font-size:11px;letter-spacing:.02em}.livingDock button:hover,.livingDock .dockActive{background:#d5b87920}.livingDock button:active{transform:translateY(2px)}.bagFlap,.bookCover{transform-box:fill-box;transform-origin:top;transition:transform .35s}.bookCover{transform-origin:right}.livingDock button:hover .bagFlap,.livingDock .dockActive .bagFlap{transform:scaleY(.62) translateY(-5px)}.livingDock button:hover .bookCover,.livingDock .dockActive .bookCover{transform:scaleX(.55)}.livingDock button:hover .mapTrail{animation:trailDash 1.8s linear infinite}.livingDock .soundWaves{opacity:.85}.livingDock.isMuted .soundWaves{opacity:.15}.watchingMovie nav{visibility:visible!important}.watchingMovie .moviePanel .actions{bottom:calc(var(--dock-space) + 8px)}
#overlay:not([hidden]):not(:has(.moviePanel)){padding-bottom:var(--dock-space)}#overlay .panel:not(.moviePanel){max-height:calc(100dvh - var(--dock-space) - 24px);overflow-y:auto}#overlay.storyDialogue{padding-bottom:var(--dock-space)}#hint{max-width:calc(100vw - 410px)}#toast{bottom:calc(var(--dock-space) + 12px)}
.storyBookPanel{width:min(920px,94vw);padding:0!important;background:#ead9ad!important;color:#382b21;border:2px solid #bd9753;box-shadow:0 20px 100px #0009}.storyBookOpen{display:grid;grid-template-columns:36% 64%;min-height:400px}.storyBookArt{position:relative;overflow:hidden;background:radial-gradient(ellipse at 55% 32%,#395c5a,#153330 75%);display:flex;flex-direction:column;align-items:center;justify-content:center;border-right:5px double #bda570}.storyBookArt img{width:94%;max-height:300px;object-fit:contain}.storyBookArt small{position:relative;text-align:center;font:italic 20px Georgia;color:#e8cb84;padding:15px}.storyBookPage{padding:38px 34px;background:linear-gradient(90deg,#b7975d40,transparent 7%)}.storyBookPage h2{font:32px Georgia;color:#573b22;margin:10px 0 23px}.storyBookPage .eyebrow{color:#866035}.unfoldingWords{font:22px/1.65 Georgia;min-height:175px}.unfoldingWords span{opacity:0;filter:blur(4px);transition:opacity .35s,filter .45s}.unfoldingWords .wordShown{opacity:1;filter:none}.storyBookGoal{font:15px/1.5 Georgia;color:#705e43;border-top:1px solid #a78d5e66;padding-top:13px}.storyBookPage .actions{justify-content:center;gap:9px;flex-wrap:wrap}.storyBookPage button{font-size:15px}.storyBookPage .secondary{color:#5d472a;border-color:#a78d5e;background:#d8c59b}.stoneThought{font-style:italic;color:#ddc18b;text-align:center}#catThought{position:fixed;z-index:8;transform:translate(-50%,-100%);background:#efe0b9;color:#4e3828;border:2px solid #b99350;border-radius:25px;padding:8px 18px 12px;text-align:center;box-shadow:0 5px 15px #0005;font:18px Georgia;pointer-events:none}#catThought[hidden]{display:none}.thinkingDots{display:block;letter-spacing:8px;font-size:21px;animation:thinkPulse 1.5s ease-in-out infinite}.muteControl{grid-column:1/-1;min-height:44px}
@keyframes dockBreathe{50%{transform:translateY(-1px);filter:drop-shadow(0 3px 2px #0006) brightness(1.1)}}@keyframes trailDash{to{stroke-dashoffset:-14}}@keyframes pageDrift{50%{translate:0 -9px;rotate:8deg}}@keyframes thinkPulse{50%{opacity:.45}}
@media(max-height:550px),(pointer:coarse){:root{--dock-space:68px}.livingDock{padding:3px 6px;gap:3px;bottom:max(5px,env(safe-area-inset-bottom));right:max(8px,env(safe-area-inset-right));border-radius:15px}.livingDock button{min-width:56px;min-height:52px;padding:0 4px}.livingDock svg{width:33px;height:33px}.livingDock span{font-size:10px}#hint{max-width:calc(100vw - 285px)}#overlay .panel:not(.moviePanel){max-height:calc(100dvh - var(--dock-space) - 14px)}.storyBookOpen{min-height:0;grid-template-columns:28% 72%}.storyBookArt img{max-height:190px}.storyBookArt small{font-size:14px;padding:8px}.storyBookPage{padding:14px 22px}.storyBookPage h2{font-size:25px;margin:5px 0 10px}.unfoldingWords{font-size:17px;line-height:1.5;min-height:90px;margin:8px 0}.storyBookGoal{font-size:12px;padding-top:6px}.storyBookPage .actions{margin-top:10px}.storyBookPage button{min-height:44px;padding:7px 12px;font-size:13px}.chessPanel.storyTask .chessLayout{grid-template-columns:minmax(180px,calc(100dvh - 148px)) minmax(0,1fr)}.chessPanel .chessFrame{padding:12px}.chessPanel .chessHeader h2{font-size:19px}.chessInstructions p{font-size:13px}.chessInstructions .chessActions button{min-height:44px}.panel.storyTalk{max-height:calc(100dvh - var(--dock-space) - 14px)!important}.storyText h2{font-size:21px}}
@media(max-width:550px){.livingDock{left:50%;right:auto;transform:translateX(-50%)}.storyBookOpen{grid-template-columns:1fr}.storyBookArt{display:none}.storyBookPage{padding:22px}#hint{display:none}}
@media(prefers-reduced-motion:reduce){.livingDock svg,.flyingPage,.thinkingDots{animation:none}.unfoldingWords span{transition:none}.bagFlap,.bookCover{transition:none}}

.unfoldingWords [data-word]{opacity:1;filter:none;white-space:nowrap}.unfoldingWords .inkLetter{opacity:0;filter:none;transition:opacity .12s,color .35s,text-shadow .5s}.unfoldingWords .inkLetter.inkShown{opacity:1}.unfoldingWords .inkLetter.inkFresh{color:#9b6216;text-shadow:0 0 8px #edb540,0 0 18px #f6d986}#writingQuill{position:fixed;z-index:211;width:110px;height:112px;pointer-events:none;transition:left .045s linear,top .07s ease-out;filter:drop-shadow(1px 4px 3px #422e3933)}#writingQuill[hidden]{display:none}#writingQuill img{width:100%;height:100%;object-fit:contain}#writingQuill i,#writingQuill b{position:absolute;font-style:normal;color:#fff4bc;text-shadow:0 0 5px #b16c18,0 0 12px #ffdc6f;font-size:17px;animation:penGlitter .7s ease-in-out infinite}#writingQuill i{left:11px;bottom:0}#writingQuill b{left:28px;bottom:12px;font-size:10px;animation-delay:-.35s}@keyframes penGlitter{50%{opacity:.3;transform:translate(2px,-3px) scale(.6)}}
@media(prefers-reduced-motion:reduce){#writingQuill{display:none}.unfoldingWords .inkLetter{transition:none}}

.practiceNote{font:14px/1.45 Georgia;color:#bba276;text-align:center}

#writingQuill.penLeft img{transform:scaleX(-1)}#writingQuill.penLeft i{left:auto;right:11px}#writingQuill.penLeft b{left:auto;right:28px}@media(max-height:550px){#writingQuill{width:78px;height:80px}#writingQuill i{font-size:12px;left:8px}#writingQuill b{font-size:8px;left:20px;bottom:8px}#writingQuill.penLeft i{right:8px}#writingQuill.penLeft b{right:20px}}
@media(max-height:400px){.storyBookPage{padding:10px 20px}.storyBookPage h2{margin:4px 0 7px;font-size:24px}.unfoldingWords{min-height:78px;font-size:16px;line-height:1.45}.storyBookPage .actions{margin-top:8px}.storyBookArt img{max-height:162px}.storyBookArt small{font-size:13px;padding:7px}}
@media(max-height:550px),(pointer:coarse){.diaryCover{position:static}}
@media(pointer:coarse){#overlay button:not(.chessCell){min-height:44px}.diaryClose{min-width:44px}}

:root{--safe-left:env(safe-area-inset-left,0px);--safe-right:env(safe-area-inset-right,0px)}
#overlay:not(:has(.moviePanel)){padding-left:max(12px,var(--safe-left));padding-right:max(12px,var(--safe-right))}
.intro{bottom:var(--dock-space);max-height:calc(100dvh - var(--dock-space));overflow-y:auto;padding-left:max(7vw,var(--safe-left));padding-right:max(7vw,var(--safe-right))}
@media(pointer:coarse){.intro{padding-left:max(24px,var(--safe-left));padding-right:max(24px,var(--safe-right))}.livingDock{right:max(8px,var(--safe-right))}header{left:max(12px,var(--safe-left));right:max(12px,var(--safe-right))}}
@media(max-height:400px){.intro{padding-top:12px;padding-bottom:12px;align-items:center}.intro .copy{max-width:72%}.intro h1{font-size:29px;line-height:1.08;margin-bottom:8px}.intro .eyebrow{font-size:10px;letter-spacing:2px;margin-bottom:8px}.intro p{font-size:14px;line-height:1.3;margin:8px 0}.intro .actions{margin-top:12px;gap:8px}.intro button{padding:8px 12px;font-size:14px}.intro small{font-size:10px}}
