:root{font-family:ui-rounded,"Avenir Next",Avenir,"Trebuchet MS",sans-serif;color:#f9f4e9;background:#182a43;font-synthesis:none;--ink:#233b50;--cream:#fff9ee;--lilac:#cbb9ee;--gold:#ffe09c;--mint:#b5ddc7;--line:rgba(255,255,255,.17)}*{box-sizing:border-box}html{overflow-x:hidden}body{margin:0;overflow:clip;height:100dvh}button,input,select{font:inherit}button,a{touch-action:manipulation;-webkit-tap-highlight-color:transparent}button{border:0;cursor:pointer;color:inherit;background:none;min-height:44px;font-weight:750;transition:transform .13s,background .15s,box-shadow .15s}button:hover{filter:brightness(1.07)}button:active{transform:scale(.95)}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,canvas:focus-visible{outline:3px solid #ffc965;outline-offset:4px}button:disabled{cursor:default;opacity:.55}button:disabled:active{transform:none}button svg,svg[aria-hidden]{pointer-events:none}button small{display:block;font-weight:500}h1,h2,h3,p{margin-top:0}h2{font-size:clamp(24px,3.2vw,36px);letter-spacing:-.04em;margin-bottom:0}h3{letter-spacing:-.025em}p{line-height:1.5}button.primary,.primary{background:var(--ink);color:var(--cream);border-radius:18px;padding:14px 24px;box-shadow:0 4px 0 #112a3c}.secondary{background:#e9e0f2;color:var(--ink);border-radius:16px;padding:12px 18px}.eyebrow{display:block;font-size:10px;letter-spacing:.19em;font-weight:800;line-height:1.5}#world{width:100%;height:100%;display:block;touch-action:none}#world:focus{outline-offset:-4px}#way-out{position:fixed;left:calc(14px + env(safe-area-inset-left));top:calc(16px + env(safe-area-inset-top));width:46px;height:46px;border-radius:15px;background:#1e344acf;backdrop-filter:blur(12px);padding:5px;z-index:12}#way-out svg{width:100%;height:100%;pointer-events:none}.has-site-up #way-out{display:none}#hud{position:fixed;top:calc(12px + env(safe-area-inset-top));left:calc(74px + env(safe-area-inset-left));right:calc(22px + env(safe-area-inset-right));display:flex;justify-content:space-between;align-items:flex-start;pointer-events:none;z-index:10}#hud button{pointer-events:auto}#wordmark{text-align:left;text-shadow:0 2px 12px #183346aa;padding:0 8px}.brand-small{font-size:8px;letter-spacing:.21em;display:block}.brand{font-size:34px;letter-spacing:-.045em;font-weight:850;white-space:nowrap}.brand i{font-family:Georgia,serif;font-weight:500}.brand sup{font-size:22px;color:#ffe0a0;margin-left:5px}.hud-right{display:flex;gap:8px;align-items:center}#stars{border:1px solid #ffffff33;background:#1b3245bf;backdrop-filter:blur(14px);padding:10px 16px;border-radius:22px;font-size:19px}#stars span{color:var(--gold)}#stars small{display:inline;font-size:12px;opacity:.7}.icon-button{width:44px;height:44px;border-radius:50%;background:#ffffff20;font-size:24px;flex-shrink:0}#objective{position:fixed;left:calc(26px + env(safe-area-inset-left));top:calc(106px + env(safe-area-inset-top));width:285px;padding:18px 20px;border:1px solid #fff3;border-radius:23px;background:#183247be;backdrop-filter:blur(18px);box-shadow:0 8px 35px #17304722}#objective .eyebrow{color:var(--gold);font-size:9px}#objective strong{font-size:18px;line-height:1.35;display:block;margin:9px 0}#go-next{padding:0;color:#d7eddf;font-size:13px}#go-next span{margin-left:15px}#caption{position:fixed;bottom:calc(116px + env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);width:min(520px,calc(100% - 36px));display:flex;gap:12px;align-items:center;padding:14px 16px;background:#fff9eef2;color:var(--ink);border:1px solid #fff;border-radius:24px;box-shadow:0 12px 40px #10273b25;z-index:11;pointer-events:none}#caption b{font-size:11px;letter-spacing:.1em;text-transform:uppercase;color:#87739e}#caption p{font-size:14px;margin:4px 0 0;line-height:1.35}#caption button{pointer-events:auto;min-width:44px;color:#8b70a8}.amy-dot{display:grid;place-items:center;width:36px;height:36px;min-width:36px;background:#e5d7f0;border-radius:50%;font-family:Georgia,serif;font-size:25px}#dock{position:fixed;bottom:calc(65px + env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);display:flex;border:1px solid #fff5;border-radius:23px;gap:3px;padding:5px 9px;background:#1a3349e8;backdrop-filter:blur(20px);box-shadow:0 8px 32px #0d263933;z-index:12}#dock button{display:flex;align-items:center;justify-content:center;gap:8px;min-width:92px;padding:4px 9px;font-size:12px;border-radius:15px}#dock button:hover{background:#ffffff14}#dock span{font-size:24px;font-weight:400;color:#e1d0ff}#hint{position:fixed;right:calc(22px + env(safe-area-inset-right));bottom:calc(15px + env(safe-area-inset-bottom));font-size:10px;letter-spacing:.05em;opacity:.8;pointer-events:none}#hint span{margin:0 7px}#joystick{position:fixed;left:calc(32px + env(safe-area-inset-left));bottom:calc(100px + env(safe-area-inset-bottom));width:96px;height:96px;border:1px solid #ffffff88;border-radius:50%;background:#23425577;touch-action:none;display:none;align-items:center;justify-content:center;z-index:12}#stick{width:45px;height:45px;border-radius:50%;background:#fffae5a8;border:3px solid #fff8}#joystick span{position:absolute;bottom:-20px;font-size:9px;letter-spacing:.2em}.touch #joystick{display:flex}#near-play{position:fixed;right:calc(28px + env(safe-area-inset-right));bottom:calc(194px + env(safe-area-inset-bottom));background:var(--gold);color:#3b4051;border-radius:22px;padding:15px 24px;box-shadow:0 5px 0 #ba935e;z-index:12}#near-play span{margin-left:12px}#connection{position:fixed;right:18px;top:85px;font-size:11px;background:#253a4e;padding:8px 12px;border-radius:12px}#admin-badge{position:fixed;right:15px;top:128px;font-size:10px;background:#492b58;padding:4px 12px;border-radius:12px;z-index:25}#admin-badge button{font-size:12px;margin-left:8px}#toast{position:fixed;left:50%;top:calc(84px + env(safe-area-inset-top));transform:translateX(-50%);max-width:85vw;padding:12px 18px;border-radius:16px;background:#233b50;color:#fff9ee;box-shadow:0 8px 28px #142c4a33;z-index:80;text-align:center;font-size:13px}#loading{position:fixed;inset:0;background:radial-gradient(ellipse at 50% 30%,#38516b,#16293e 72%);z-index:100;display:flex;align-items:center;justify-content:center;flex-direction:column;text-align:center;padding:30px}#loading h1{font-family:Georgia,serif;font-size:48px;font-weight:400;letter-spacing:-.06em;margin:16px 0}#loading .eyebrow{color:#d8c5ef}#loading-message{font-size:14px;color:#b9cad2}#loading progress{appearance:none;width:210px;height:5px;border:0;border-radius:10px;background:#ffffff20;margin:18px}progress::-webkit-progress-bar{background:#ffffff20;border-radius:10px}progress::-webkit-progress-value{background:#d9c4ed;border-radius:10px}#loading-percent{font-size:10px;letter-spacing:.15em}.loading-orbit{font-size:60px;color:#ffe09c;width:120px;height:120px;border:1px solid #ffffff22;border-radius:50%;display:grid;place-items:center;box-shadow:0 0 90px #bbacfb22;animation:float 5s ease-in-out infinite}@keyframes float{50%{transform:translateY(-8px) rotate(8deg)}}[hidden]{display:none!important}#overlay{position:fixed;inset:0;background:#142d4599;backdrop-filter:blur(8px);z-index:30;display:flex;justify-content:safe center;align-items:safe center;overflow-y:auto;padding:calc(32px + env(safe-area-inset-top)) 18px calc(72px + env(safe-area-inset-bottom))}#sheet{width:min(880px,100%);max-height:100%;overflow:auto;border-radius:32px;background:#fff9ee;color:var(--ink);box-shadow:0 25px 100px #0c1d3c55;border:1px solid #ffffffaa}.sheet-header{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:26px 30px 20px;position:sticky;top:0;background:#fff9eef5;z-index:3;border-bottom:1px solid #263d5010}.sheet-header .eyebrow{color:#8a789e;font-size:9px;margin-bottom:6px}.sheet-header .icon-button{background:#eee8df;color:#53626a}#sheet-body{padding:22px 30px 30px}.lead{font-size:14px;color:#65757c;max-width:580px}.spot-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}.spot-card{position:relative;text-align:left;background:#f0eadf;border:1px solid #273b4b0b;border-radius:22px;padding:16px;overflow:hidden;min-height:160px}.spot-card:nth-child(3n+2){background:#eae5f2}.spot-card:nth-child(3n){background:#e3eee7}.spot-art{height:58px;position:relative;display:flex;align-items:center;justify-content:center;margin-bottom:12px;border-radius:14px;background:linear-gradient(150deg,#fff9,transparent)}.spot-art svg{width:100%;height:100%}.spot-card strong{display:block;font-size:15px}.spot-card small{font-size:11px;margin-top:6px;line-height:1.4;color:#65747c}.spot-card .mini-stars{position:absolute;right:14px;top:13px;color:#927d9f;font-size:12px;letter-spacing:2px}.level-pills{display:flex;gap:10px;margin:18px 0}.level-pills button{flex:1;border-radius:18px;background:#e9e1f0;padding:16px 8px;text-align:center}.level-pills b{display:block;font-size:22px;margin-bottom:5px}.adventure-art{height:170px;border-radius:24px;background:linear-gradient(130deg,#e2deed,#d9eadd);overflow:hidden}.adventure-art svg{width:100%;height:100%}.sheet-actions{display:flex;flex-wrap:wrap;gap:12px;margin-top:18px}.sheet-actions>*{flex:1}.talk-options{display:grid;grid-template-columns:1fr 1fr;gap:12px}.talk-options button{background:#e8e1f0;border-radius:18px;text-align:left;padding:18px;font-size:15px}.talk-answer{margin:16px 0;background:white;border-radius:20px;padding:18px;line-height:1.6;font-family:Georgia,serif;font-size:21px}.coming-soon{margin-top:18px;width:100%;border:1px dashed #8b7b9655;border-radius:18px;padding:15px;font-size:12px}.sticker-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px}.sticker{border:2px dashed #d7d1c7;border-radius:25px;min-height:130px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;text-align:center;padding:13px}.sticker.earned{border:2px solid white;background:#eee4f7;box-shadow:0 4px 0 #d8cbe5;transform:rotate(-2deg)}.sticker:nth-child(even){transform:rotate(2deg)}.sticker .glyph{font-size:34px;color:#a793b6}.sticker b{font-size:12px}.sticker small{font-size:12px;letter-spacing:3px;color:#9c7c40}.filters{display:flex;flex-wrap:wrap;gap:8px;margin:14px 0}.filters button{border-radius:14px;padding:9px 14px;background:#eee8df;font-size:12px}.filters button.selected{background:#30485d;color:#fff9ee}input[type=search]{width:100%;height:46px;border:1px solid #d7cedf;border-radius:15px;background:#fff;padding:10px 14px;color:#253e53}.motion-list{max-height:260px;overflow:auto;margin:12px 0;display:grid;grid-template-columns:1fr 1fr;gap:8px}.motion-row{display:flex;align-items:center;gap:3px;background:#eee8f0;border-radius:15px;padding:4px}.motion-row .motion-play{text-align:left;flex:1;padding:8px 10px;font-size:12px}.motion-row .motion-add,.motion-row .motion-fav{min-width:44px;font-size:20px}.dance-chain{display:flex;gap:8px;flex-wrap:wrap}.dance-slot{flex:1;min-width:80px;border:1px dashed #bbaac9;border-radius:15px;padding:12px;font-size:11px;background:white;text-align:center;min-height:58px}.color-grid{display:flex;gap:10px;flex-wrap:wrap}.color-grid button{background:#eee8df;border:3px solid transparent;padding:8px 12px;border-radius:16px;font-size:11px}.color-grid button.selected{border-color:#8971a2}.swatch{display:block;width:24px;height:24px;border-radius:50%;margin:0 auto 5px;border:1px solid #6e617544}.game-meta{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px;font-size:12px;color:#718087}.quest-progress{height:6px;background:#e6deed;border-radius:10px;margin-bottom:18px;overflow:hidden}.quest-progress span{height:100%;display:block;background:#ae94c6;transition:width .25s}.game-board{position:relative;width:100%;height:300px;background:#233c57;border-radius:24px;overflow:hidden;color:#fff8ed;isolation:isolate}.game-board svg{width:100%;height:100%}.star-node{position:absolute;width:48px;height:48px;min-height:48px;border-radius:50%;background:#607289;border:2px solid #a8b6cc;color:#fff9ee;transform:translate(-50%,-50%);font-size:15px;z-index:2}.star-node:active{transform:translate(-50%,-50%) scale(.92)}.star-node.done{background:#dfc287;border-color:#ffeba7;color:#354458}.star-node.next{box-shadow:0 0 0 7px #ead39d22,0 0 35px #ffe8a144;border-color:#ffe1a0}.star-lines{position:absolute;inset:0}.big-symbol{display:grid;place-items:center;height:100%;font-size:85px;color:#d2e8ed}.timing-pond{background:linear-gradient(#35566d,#89b8be);height:210px;display:grid;place-items:center;position:relative;overflow:hidden}.timing-pond .ripple{position:absolute;border:2px solid #deffff66;border-radius:50%;width:65%;height:30%;bottom:23px}.timing-pond .ripple:nth-child(2){width:40%;height:18%;bottom:36px}.stone{font-size:52px;position:relative;z-index:2}.timing-track{height:24px;margin:20px 32px;background:#1b304b;border-radius:30px;position:relative}.timing-zone{position:absolute;top:0;height:100%;background:#e9d4a2;border-radius:20px}.timing-dot{position:absolute;top:-5px;width:18px;height:34px;border:3px solid #fff;border-radius:14px;background:#c9b7ef;transform:translateX(-50%)}.jump-ring{width:100px;height:100px;border:4px solid #e5d2f3;border-radius:50%;display:grid;place-items:center;font-size:45px;background:#a4a7ce22;position:relative}.jump-ring:after{content:'';position:absolute;inset:-20px;border:2px dashed #ffffff88;border-radius:50%}.picture-choices{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin-top:16px}.picture-choices button{background:#e9e2ef;border:2px solid transparent;border-radius:18px;padding:12px}.picture-choices button span{display:block;font-size:35px;margin:8px}.picture-choices button small{font-size:12px}.story-scene{padding:25px;background:linear-gradient(#32415e,#695b71);display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center}.story-scene p{max-width:490px;font-family:Georgia,serif;font-size:22px;line-height:1.45}.story-trail{font-size:25px;letter-spacing:8px;min-height:42px}.dance-display{height:180px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:15px;background:linear-gradient(130deg,#72618b,#314458)}.dance-display .move{font-size:58px}.dance-sequence{display:flex;gap:10px}.dance-sequence span{display:grid;place-items:center;width:44px;height:44px;background:#ffffff11;border-radius:13px;font-size:22px}.dance-sequence .active{background:#ffe09c;color:#344256}.dance-buttons{grid-template-columns:repeat(4,1fr)}.hide-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:10px;padding:20px;align-content:center;background:linear-gradient(#3b645d,#a9c3a3);height:300px}.hiding-place{background:#ecf0dc;color:#375c4d;border-radius:22px;min-height:88px;border:3px solid #ffffff33;font-size:32px;position:relative}.hiding-place small{font-size:12px;position:absolute;bottom:4px;left:0;right:0}.hiding-place.tried{background:#cad8c2}.garden-scene{background:linear-gradient(#9bbcc7 55%,#709f6e 55%);display:flex;align-items:flex-end;justify-content:center;padding:36px 12px;gap:12px}.garden-flower{font-size:52px;filter:drop-shadow(0 5px 1px #486f5633)}.garden-flower.seed{font-size:30px}.game-action{display:flex;gap:12px;margin-top:16px;position:sticky;bottom:0;background:#fff9eef5;padding:8px 0;z-index:4}.game-action button{flex:1}.game-feedback{min-height:24px;text-align:center;color:#7d668e;font-size:13px;margin:8px 0}.result{text-align:center;padding:20px 0}.result-star{font-size:90px;color:#ddad48;text-shadow:0 5px 0 #fff,0 8px 25px #e6b25e44}.result h3{font-family:Georgia,serif;font-size:30px;font-weight:400}.setting-row{padding:14px 0;border-bottom:1px solid #233b5015;display:flex;align-items:center;justify-content:space-between;gap:20px}.setting-row p{font-size:12px;color:#748087;margin:4px 0 0}.setting-row button{background:#e8deef;color:#4d3964;border-radius:15px;padding:8px 15px;min-width:70px}.settings-note{font-size:12px;color:#7c8588;margin:18px 0}.admin-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.admin-grid button,.admin-grid select{background:#e8e0ee;border:0;border-radius:13px;padding:12px;min-height:44px;color:#37475e}.asset-row{display:block;padding:12px;border-bottom:1px solid #ddd;font-size:12px;overflow-wrap:anywhere}.asset-row a{color:#685389}.empty{padding:22px;text-align:center;background:#eee8df;border-radius:18px;color:#697980;font-size:13px}.noscript{position:fixed;inset:0;background:#233b50;padding:30px;z-index:110}#fallback{position:fixed;inset:0;background:radial-gradient(ellipse at center,#6a8291,#233b50);text-align:center;padding:200px 30px 250px;overflow:auto}.planet-art{font-size:45px;line-height:1.8;margin-bottom:15px}#fallback p{max-width:440px;margin:auto;font-size:14px}.game-flash{animation:good .42s ease-out}@keyframes good{50%{box-shadow:inset 0 0 0 5px #ffe3a577}}.studio-open #sheet{width:min(660px,100%)}.studio-open #overlay{justify-content:flex-end;background:#12253d33;backdrop-filter:none}.studio-open #caption{left:24px;transform:none;width:300px}.reduced *{animation:none!important;transition:none!important}.reduced .sticker{transform:none}@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}
@media(min-width:1100px){#sheet{max-height:calc(100dvh - 110px)}}
@media(max-width:700px){#hud{left:64px;right:12px}.brand-small{font-size:6px;letter-spacing:.12em}.brand{font-size:27px}.brand sup{font-size:16px}#wordmark{padding:3px 0}#stars{padding:9px 11px;font-size:15px}.hud-right{gap:5px}#way-out{left:10px;top:16px}#objective{top:91px;left:16px;width:230px;padding:13px 16px}#objective strong{font-size:15px;margin:6px 0}#objective .eyebrow{font-size:8px}#go-next{font-size:12px}#dock{width:calc(100% - 28px);gap:0;padding:4px;bottom:calc(65px + env(safe-area-inset-bottom))}#dock button{min-width:0;flex:1;font-size:10px;gap:4px}#dock span{font-size:21px}#caption{bottom:calc(125px + env(safe-area-inset-bottom));padding:11px 13px;border-radius:20px;gap:9px}#caption p{font-size:12px}.amy-dot{min-width:30px;width:30px;height:30px;font-size:21px}#hint{right:15px;font-size:8px;bottom:calc(18px + env(safe-area-inset-bottom))}#joystick{left:22px;bottom:calc(225px + env(safe-area-inset-bottom));width:74px;height:74px}#stick{width:38px;height:38px}#near-play{bottom:calc(237px + env(safe-area-inset-bottom));right:20px;font-size:12px;padding:12px 18px}#overlay{padding:calc(12px + env(safe-area-inset-top)) 10px calc(66px + env(safe-area-inset-bottom))}#sheet{border-radius:24px}.sheet-header{padding:20px 20px 16px}#sheet-body{padding:18px 20px 22px}.spot-grid{grid-template-columns:1fr 1fr;gap:10px}.spot-card{min-height:153px;padding:12px}.spot-card strong{font-size:12px}.spot-card small{font-size:10px}.spot-art{height:56px}.sticker-grid{grid-template-columns:1fr 1fr;gap:10px}.sticker{min-height:115px}.talk-options{grid-template-columns:1fr}.talk-options button{padding:14px 16px;font-size:14px}.talk-answer{font-size:18px}.motion-list{grid-template-columns:1fr;max-height:220px}.game-board{height:235px}.timing-pond{height:155px}.timing-track{margin:17px 23px}.picture-choices{gap:7px}.picture-choices button{padding:8px 5px}.picture-choices button span{font-size:28px}.picture-choices button small{font-size:10px}.hide-grid{gap:8px;padding:12px;height:235px}.hiding-place{min-height:75px;font-size:26px;border-radius:16px}.story-scene{padding:18px}.story-scene p{font-size:18px}.dance-display{height:150px}.dance-display .move{font-size:38px}.dance-sequence{gap:4px}.dance-sequence span{width:35px;height:35px}.garden-flower{font-size:35px}.garden-scene{padding:32px 12px;gap:5px}.studio-open #overlay{background:#142d4599;backdrop-filter:blur(8px)}.studio-open #caption{left:50%;transform:translateX(-50%);width:calc(100% - 36px)}.lead{font-size:12px}.game-meta{font-size:10px}.game-action{padding-top:6px}.game-action button{padding:12px}.game-feedback{font-size:12px}.level-pills button{padding:13px 5px;font-size:12px}}
@media(max-height:650px){#objective{top:86px;padding:10px 15px}#caption{bottom:calc(122px + env(safe-area-inset-bottom));max-width:420px}#sheet-body{padding-top:12px}.sheet-header{padding-top:13px;padding-bottom:12px}.game-board{height:180px}.timing-pond{height:110px}.hide-grid{height:180px}.hiding-place{min-height:65px}.dance-display{height:115px;gap:7px}.dance-display .move{font-size:30px}.picture-choices{margin-top:8px}.game-feedback{margin:5px 0}.story-scene p{font-size:16px}.game-action{margin-top:8px}.game-meta{margin-bottom:6px}.quest-progress{margin-bottom:10px}#joystick{bottom:calc(195px + env(safe-area-inset-bottom))}.game-board .star-node{width:44px;height:44px;min-height:44px}}
.peekaboo{position:absolute;inset:12px;display:flex;align-items:center;justify-content:center;flex-direction:column;background:#2e5b50ed;border-radius:20px;z-index:3;pointer-events:none}.peekaboo canvas{width:220px;height:140px;border-radius:18px}.peekaboo strong{color:#fff6d6;font-size:23px;margin-top:8px}.game-flash .stone{animation:stone-skip .65s ease-out}.game-flash .jump-ring{animation:soft-jump .6s ease-out}@keyframes stone-skip{0%{transform:translate(-80px,10px) scale(1)}30%{transform:translate(-25px,-30px) scale(.8)}55%{transform:translate(20px,10px) scale(.6)}75%{transform:translate(45px,-5px) scale(.45)}100%{transform:translate(70px,15px) scale(.2)}}@keyframes soft-jump{50%{translate:0 -12px}}

/* A sheet has real geometry immediately, even with a frozen animation clock. */
#sheet{flex:0 0 auto;min-width:0;min-height:100px;max-height:calc(100dvh - 110px)}
#sheet button{flex-shrink:0}#sheet-body{min-height:44px}
@media(max-width:700px){#sheet{max-height:calc(100dvh - 80px - env(safe-area-inset-top) - env(safe-area-inset-bottom))}}
.mode-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.mode-card{min-height:150px;border-radius:24px;background:#e8e0f2;padding:20px;text-align:left;border:2px solid #fff}.mode-card:nth-child(2n){background:#dfede3}.mode-card>span{float:right;font-size:42px;color:#78668f}.mode-card strong{display:block;font-size:24px;margin:12px 0}.mode-card small{line-height:1.5;color:#566774;max-width:230px}.chat-card{grid-column:1/-1;min-height:110px}.chat-card:disabled{opacity:.75;border:2px dashed #c5bdcb;background:#eee9e1}.face-preview{display:block;width:100%;height:clamp(180px,30dvh,320px);border-radius:24px;background:#233c57}.face-caption{min-height:48px;margin:16px 0;font-size:17px;line-height:1.45}.script-picker{display:flex;gap:8px;flex-wrap:wrap}.script-picker button{flex:1;min-width:100px;border-radius:18px;padding:12px;background:#e8e0f2;border:2px solid transparent}.script-picker button[aria-pressed=true]{border-color:#8d72a6;background:#f2e6ff}.script-picker span{display:block;font-size:23px}.script-picker small{font-size:11px}.viseme-buttons{display:flex;gap:7px;flex-wrap:wrap}.viseme-buttons button{background:#e8e0f2;border-radius:12px;min-width:52px}.mouth-controls summary{cursor:pointer;min-height:44px;padding:12px 0;font-weight:750}.mouth-controls p{font-size:13px}.morph-control{display:grid;grid-template-columns:110px 1fr 44px;align-items:center;gap:10px;min-height:48px;font-size:13px}.morph-control input{width:100%;min-height:44px;accent-color:#8d72a6}.face-open #sheet{width:min(760px,100%)}.face-open #caption{visibility:hidden}#chat-form{display:grid;gap:10px;margin-top:18px}#chat-text{min-height:44px;border-radius:12px;border:1px solid #bcaecd;padding:10px}
@media(max-width:700px){.mode-grid{gap:9px}.mode-card{padding:13px;min-height:150px}.mode-card strong{font-size:20px}.mode-card>span{float:none;font-size:28px}.mode-card small{font-size:12px}.chat-card{min-height:110px}.chat-card>span{float:right}.script-picker button{min-width:80px;padding:9px;font-size:12px}.face-caption{font-size:14px}.face-open .game-action{flex-wrap:wrap}.face-open .game-action button{min-width:90px}.morph-control{grid-template-columns:95px 1fr 35px;gap:6px;font-size:12px}#dock button{font-size:9px;gap:3px}#dock span{font-size:18px}}

.face-mood{font-size:12px;color:#78668f;margin:-6px 0 14px}

/* The welcome view remains visible while the mode picker is open. */
.home-open #overlay{justify-content:flex-end;background:transparent;backdrop-filter:none}
.home-open #sheet{width:min(46vw,480px)}
.home-open #objective,.home-open #caption,.home-open #joystick,.home-open #near-play{visibility:hidden}
.home-open .mode-grid{grid-template-columns:1fr 1fr;gap:10px}
.home-open .mode-card{min-height:108px;padding:12px}
.home-open .sheet-header{padding:18px 20px 14px}
.home-open #sheet-body{padding:16px 20px 20px}
@media(max-width:759px){
 .home-open #overlay{align-items:flex-end;padding-top:0}
 .home-open #sheet{width:100%;max-height:43dvh}
 .home-open .sheet-header{padding:12px 16px}
 .home-open .sheet-header h2{font-size:24px}
 .home-open #sheet-body{padding:12px 16px 18px}
 .home-open .lead{display:none}
 .home-open .mode-card{min-height:90px;padding:10px}
}
/* Voice options (2026-10-20) */
.mini-head{margin:18px 0 10px;font-size:14px;letter-spacing:.04em}
.voice-picker{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:10px;margin:10px 0 6px}
.voice-chip{background:#efe8f6;color:#2f2442;border:3px solid transparent;border-radius:18px;padding:12px 14px;text-align:left;display:flex;flex-direction:column;gap:4px;min-height:64px;transition:transform .18s cubic-bezier(.3,1.6,.5,1),border-color .2s,background .2s}
.voice-chip b{font-size:15px}.voice-chip small{font-size:12px;color:#6c6080;line-height:1.3}
.voice-chip:active{transform:scale(.96)}
.voice-chip.selected{border-color:#8971a2;background:#fff9ee;box-shadow:0 6px 18px #8971a233}
.voice-chip.selected b::after{content:"  ♪";color:#8971a2}
.voice-chip.loading{opacity:.6;animation:voicePulse .8s ease-in-out infinite alternate}
@keyframes voicePulse{to{transform:scale(.97)}}
.reduced .voice-chip{transition:none}.reduced .voice-chip.loading{animation:none}
/* Homework with Amy + Talk with Amy (2026-10-20) */
.mode-card.hw-card{background:linear-gradient(135deg,#fff1c9,#ffe2a8);border-color:#ffe09c;box-shadow:0 8px 24px #ffcf6a33}
.mode-card.chat-card{background:linear-gradient(135deg,#e6dcff,#d6e6ff)}
.mode-card{transition:transform .2s cubic-bezier(.3,1.6,.5,1)}.mode-card:active{transform:scale(.97)}
.hw-loading{display:grid;place-items:center;gap:10px;padding:28px 0;color:#65757c}.hw-loading .loading-orbit{width:72px;height:72px;font-size:34px}
.hw-hero{display:flex;gap:14px;align-items:center;margin-bottom:14px}.hw-hero>div{flex:1}.hw-hero .lead{margin:0}
.amy-dot.big{width:54px;height:54px;min-width:54px;font-size:34px;background:radial-gradient(circle at 35% 30%,#fff,#e5d7f0 60%);box-shadow:0 0 0 4px #fff,0 6px 18px #8971a244;animation:amyBob 3.2s ease-in-out infinite}
@keyframes amyBob{50%{transform:translateY(-4px)}}
.hw-total,.hw-bar{height:10px;border-radius:99px;background:#eee8df;overflow:hidden;margin-top:8px}.hw-bar{height:6px;margin-top:6px}
.hw-total span,.hw-bar span{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,#b5ddc7,#7cc49c);transition:width .8s cubic-bezier(.2,.8,.2,1)}
.hw-list{display:grid;gap:10px}
.hw-row{display:flex;align-items:center;gap:12px;padding:12px 14px;border-radius:18px;background:#f3eee6;border:2px solid transparent;position:relative}
.hw-row.next{background:#fff;border-color:#ffe09c;box-shadow:0 6px 20px #ffcf6a40;animation:hwGlow 2.4s ease-in-out infinite}
@keyframes hwGlow{50%{box-shadow:0 6px 28px #ffcf6a77}}
.hw-row.done{opacity:.75}.hw-row.done .hw-icon{background:#ffe09c;color:#7a5a12}
.hw-icon{display:grid;place-items:center;width:42px;height:42px;min-width:42px;border-radius:14px;background:#e8e0f2;color:#5b4777;font-weight:800;font-size:16px}
.hw-main{flex:1;min-width:0}.hw-main b{display:block;font-size:15px}.hw-main small{color:#748087;font-size:12px}
.hw-pick{position:absolute;top:-9px;left:16px;font-style:normal;font-size:10px;font-weight:800;letter-spacing:.08em;background:#ffe09c;color:#6b4d0b;border-radius:99px;padding:2px 9px}
.hw-go{padding:10px 16px;border-radius:14px;white-space:nowrap}
.hw-apps{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:10px}
.hw-app{display:flex;flex-direction:column;align-items:flex-start;gap:4px;padding:12px;border-radius:18px;background:#f3eee6;text-align:left}.hw-app small{color:#748087;text-transform:capitalize}
.hw-moods{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}
.hw-moods button{display:flex;flex-direction:column;align-items:center;gap:6px;padding:16px 8px;border-radius:20px;background:#f3eee6;font-size:15px;font-weight:700;border:3px solid transparent;transition:transform .2s cubic-bezier(.3,1.6,.5,1)}
.hw-moods button span{font-size:34px}.hw-moods button:nth-child(1){background:#fff1c9}.hw-moods button:nth-child(3){background:#e3e8f0}
.hw-moods button.selected{border-color:#8971a2;transform:scale(1.05)}.hw-moods button:disabled:not(.selected){opacity:.45}
.talk-free{width:100%;margin-top:14px}
/* Talk with Amy: a side panel so Amy stays visible on her planet while she talks */
.amy-open #sheet{width:min(560px,100%)}
.amy-open #overlay{justify-content:flex-end;background:#12253d33;backdrop-filter:none}
.amy-open #caption{left:24px;transform:none;width:min(340px,calc(100% - 600px))}
.amy-chat{display:flex;flex-direction:column;gap:12px}
.chat-log{display:flex;flex-direction:column;gap:10px;max-height:min(46vh,420px);min-height:160px;overflow-y:auto;padding:4px 2px;scroll-behavior:smooth}
.bubble{display:flex;gap:8px;align-items:flex-end;max-width:88%}
.bubble p{margin:0;padding:10px 14px;border-radius:18px;font-size:15px;line-height:1.4}
.bubble.amy{align-self:flex-start}.bubble.amy p{background:#efe8f6;border-bottom-left-radius:6px}
.bubble.kid{align-self:flex-end}.bubble.kid p{background:var(--ink);color:var(--cream);border-bottom-right-radius:6px}
.bubble.pop{animation:bubblePop .32s cubic-bezier(.3,1.5,.5,1)}
@keyframes bubblePop{from{opacity:0;transform:translateY(8px) scale(.94)}}
.bubble.thinking{background:#efe8f6;border-radius:18px;padding:12px 16px;gap:5px}
.bubble.thinking span{width:8px;height:8px;border-radius:50%;background:#8971a2;animation:dot 1s infinite ease-in-out}
.bubble.thinking span:nth-child(2){animation-delay:.15s}.bubble.thinking span:nth-child(3){animation-delay:.3s}
@keyframes dot{40%{transform:translateY(-6px);opacity:.5}}
.bubble .offer{margin-left:8px;align-self:center;background:#ffe09c;color:#5a420c;border-radius:14px;padding:8px 12px;font-weight:700;font-size:13px;white-space:nowrap}
.chat-chips{display:flex;gap:8px;overflow-x:auto;padding-bottom:2px}
.chat-chips button{flex:0 0 auto;background:#f3eee6;border-radius:99px;padding:9px 14px;font-size:13px;font-weight:700}
.chat-compose{display:flex;gap:8px;align-items:center}
.chat-compose input{flex:1;min-width:0;font-size:16px;padding:14px 16px;border-radius:18px;border:2px solid #e3dbea;background:#fff}
.chat-compose input:focus{outline:none;border-color:#8971a2}
.chat-compose .primary{padding:14px 18px}
.chat-compose .primary.nudge{animation:nudge .9s ease-in-out 3}
@keyframes nudge{50%{transform:scale(1.12)}}
.chat-mic{--lvl:0;position:relative;width:58px;height:58px;min-width:58px;border-radius:50%;background:#ffe09c;font-size:24px;box-shadow:0 4px 0 #d7b25d;touch-action:none;user-select:none;-webkit-user-select:none}
.chat-mic .ring{position:absolute;inset:-6px;border-radius:50%;border:3px solid #ffcf6a;opacity:0;transform:scale(calc(.9 + var(--lvl)*.4))}
.chat-mic.listening{background:#ff9f8a;box-shadow:0 2px 0 #c9705d;transform:translateY(2px)}.chat-mic.listening .ring{opacity:1;animation:ring 1.2s ease-out infinite}
@keyframes ring{to{transform:scale(1.5);opacity:0}}
.chat-foot{display:flex;flex-wrap:wrap;gap:8px 14px;justify-content:space-between;font-size:11px;color:#748087}
.link{background:none;padding:0;color:#6b5690;text-decoration:underline;font-size:11px}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
.mem-list .setting-row span{color:#5b4777;font-weight:700;text-transform:capitalize}
@media(max-width:700px){.amy-open #overlay{justify-content:center;background:#142d4599}.amy-open #caption{visibility:hidden}.chat-log{max-height:40vh}.hw-row{flex-wrap:wrap}.hw-go{width:100%}}
.reduced .hw-row.next,.reduced .amy-dot.big,.reduced .bubble.pop,.reduced .chat-mic.listening .ring{animation:none}
/* R4 · rules spelled out + first 10 seconds (2026-10-21, ANY-APP §32) */
.say-hi{margin-top:22px;min-height:72px;min-width:min(300px,86vw);padding:18px 38px;border-radius:40px;font-size:25px;font-weight:800;color:#2a2140;background:linear-gradient(135deg,#ffe9a8,#ffd270);box-shadow:0 6px 0 #c99a3a,0 0 46px #ffd27055;animation:sayHi 2.2s ease-in-out infinite;transition:transform .13s,box-shadow .13s}
.say-hi:active{transform:translateY(3px) scale(.98);box-shadow:0 3px 0 #c99a3a}.say-hi:disabled{opacity:1}
@keyframes sayHi{50%{transform:scale(1.045);box-shadow:0 6px 0 #c99a3a,0 0 70px #ffd270aa}}
.reduced .say-hi{animation:none}
.rule-box{margin:0 0 10px}
.rule-line{margin:0;padding:9px 12px;border-radius:14px;background:#f3eee6;color:#3e4f5b;font-size:14px;line-height:1.38;font-weight:650}
.rule-line::before{content:"★ ";content:"★ " / "";color:#d79b2b}
.rule-replay{display:block;margin:4px 4px 0;color:#7c8588;font-size:12px}
#how-btn{margin-left:auto;font-size:26px;font-weight:800;line-height:1}
#how-overlay{position:fixed;inset:0;z-index:60;background:#142d45aa;backdrop-filter:blur(4px);display:flex;align-items:center;justify-content:center;padding:calc(16px + env(safe-area-inset-top)) 16px calc(16px + env(safe-area-inset-bottom))}
#how-card{width:min(460px,100%);max-height:100%;overflow:auto;background:#fff9ee;color:var(--ink);border-radius:26px;padding:20px 22px 18px;box-shadow:0 25px 90px #0c1d3c66;border:1px solid #ffffffaa}
#how-card .eyebrow{color:#8a789e;font-size:9px}
#how-card h3{font-size:24px;margin:2px 0 10px;letter-spacing:-.03em}
.how-sec{margin:0 0 12px}.how-sec h4{margin:0 0 4px;font-size:14px;color:#6b5690}
.how-sec p,.how-sec li{margin:0 0 4px;font-size:14px;line-height:1.42}.how-sec ul{margin:0;padding-left:18px}
#how-close{width:100%;min-height:48px;margin-top:6px}
/* Boards give their height back to the rule line (the answer buttons must stay above the sticky action bar). Short screens keep their old fixed heights. */
@media(max-width:700px){.rule-line{font-size:13px;padding:8px 11px}.say-hi{font-size:22px;padding:16px 28px}#sheet[data-screen=play] .sheet-header{padding:12px 20px 10px}#sheet[data-screen=play] #sheet-body{padding-top:12px}}
@media(max-height:650px){.rule-line{font-size:12.5px;padding:6px 10px}}
@media(min-width:701px) and (min-height:651px){#sheet{--bh:clamp(220px,calc(100dvh - 545px),300px);--bhc:clamp(190px,calc(100dvh - 565px),300px)}.game-board,.hide-grid{height:var(--bh)}.game-board:has(+.picture-choices){height:var(--bhc)}.game-board:has(.dance-display){height:max(var(--bhc),200px)}.dance-display{height:min(180px,calc(max(var(--bhc),200px) - 50px))}.timing-pond{height:calc(var(--bh) - 90px)}}
@media(max-width:700px) and (min-height:651px){#sheet{--bh:clamp(170px,calc(100dvh - 486px),235px);--bhc:clamp(165px,calc(100dvh - 496px),235px)}.game-board,.hide-grid{height:var(--bh)}.game-board:has(+.picture-choices){height:var(--bhc)}.game-board:has(.dance-display){height:max(var(--bhc),190px)}.dance-display{height:calc(max(var(--bhc),190px) - 50px);gap:7px}.timing-pond{height:calc(var(--bh) - 80px)}}
@media(max-width:700px) and (min-height:651px) and (max-height:740px){.picture-choices{margin-top:10px}.picture-choices button{padding:8px 6px}.picture-choices button span{margin:4px;font-size:30px}}
