@font-face{font-family:Figtree;src:url('/fonts/figtree.woff2') format('woff2');font-display:swap}
@font-face{font-family:Bricolage;src:url('/fonts/bricolage.woff2') format('woff2');font-display:swap}
:root{color-scheme:dark;--night:#11163f;--panel:#222968;--panel-dark:#171d52;--line:#606cd2;--ink:#fbfcff;--muted:#c1caef;--pink:#f758c4;--cyan:#5ce0fc;--purple:#c39dff;--green:#69edc4;--radius:22px;--ease:cubic-bezier(.16,1,.3,1)}
*{box-sizing:border-box}body{margin:0;background:#10152f;color:var(--ink);font:17px/1.5 Figtree,sans-serif;min-height:100dvh}body::before{content:"";position:fixed;inset:0;background:linear-gradient(#101438aa,#131a45e8),url('https://media.questant.app/assets/questmon/game/16989ee522de695c/stages/Q10/full.webp') center/cover;z-index:-1}button,a,input,textarea,select{-webkit-tap-highlight-color:transparent}button,input,textarea,select{font:inherit}button,a{touch-action:manipulation}button{cursor:pointer;color:inherit}button:disabled{cursor:default;opacity:.5}a{color:inherit;text-underline-offset:4px}svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}button:focus-visible,a:focus-visible,textarea:focus-visible,select:focus-visible{outline:3px solid var(--cyan);outline-offset:4px}::selection{background:#ba80ff;color:#fff}::-webkit-scrollbar{width:9px}::-webkit-scrollbar-thumb{background:#646baa;border-radius:8px}h1,h2,h3,p{margin:0}h1,h2,h3{font-family:Bricolage,Figtree,sans-serif;line-height:1.15;text-wrap:balance}h1{font-size:clamp(26px,3vw,36px);letter-spacing:-.02em}h2{font-size:24px}h3{font-size:19px}.muted{color:var(--muted)}.app-shell{max-width:1250px;margin:auto;padding:24px 32px 120px}.app-header{display:flex;align-items:center;justify-content:space-between;gap:15px;margin-bottom:24px}.brand{font-family:Bricolage,sans-serif;font-size:clamp(26px,3.5vw,38px);font-weight:900;letter-spacing:-.03em;text-decoration:none;white-space:nowrap}.brand span{color:#ff9ee0;margin-right:5px}.brand strong{color:var(--cyan)}.header-actions{display:flex;align-items:center;gap:10px}.candy{background:#252c70;padding:9px 16px;border-radius:16px;font-size:15px;font-weight:700;font-variant-numeric:tabular-nums}.icon-button{height:44px;width:44px;border-radius:14px;border:1px solid var(--line);background:var(--panel-dark);display:inline-flex;align-items:center;justify-content:center;text-decoration:none}.notice{border:1px solid #bd95ef;background:#282050;border-radius:12px;padding:10px 16px;margin-bottom:16px;font-size:14px}.layout{display:grid;grid-template-columns:minmax(340px, .9fr) minmax(0,1.2fr);gap:24px;align-items:start}.panel{background:var(--panel);border:1px solid var(--line);border-radius:var(--radius);overflow:hidden}.panel-pad{padding:24px}.section-head{display:flex;gap:12px;align-items:center;justify-content:space-between;margin-bottom:16px}.section-head p{color:var(--muted);font-size:15px;margin-top:5px}.count{font-size:14px;white-space:nowrap;color:var(--cyan)}.listener-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:8px}.listener{border:1px solid #7280dc;border-radius:13px;aspect-ratio:1;background:#1c2358;padding:0;position:relative;overflow:hidden;transition:border-color .2s,box-shadow .2s}.listener img{width:100%;height:100%;object-fit:cover;object-position:center 42%;display:block}.listener:not(.held) img{filter:saturate(.65);opacity:.6}.listener.selected{border:3px solid var(--cyan);box-shadow:0 3px 16px #48cfff45}.listener:hover{border-color:#f79cdd}.listener .qid{position:absolute;bottom:0;right:0;background:#10163ee8;font-size:10px;padding:0 5px}.listener .held-mark{position:absolute;left:4px;top:4px;width:7px;height:7px;background:var(--green);border-radius:50%}.selected-partner{display:flex;gap:18px;padding:20px 0;margin-top:8px;align-items:center}.partner-photo{width:86px;height:108px;object-fit:cover;border-radius:14px}.selected-partner h3{margin-bottom:6px}.selected-partner p{font-size:14px;color:var(--muted)}.tag{display:inline-flex;align-items:center;gap:7px;padding:4px 9px;border-radius:8px;background:#3b397c;font-size:12px;color:#e1dcff;margin-top:8px}.button{border:0;border-radius:16px;padding:14px 21px;font-weight:800;display:inline-flex;align-items:center;justify-content:center;gap:10px;min-height:50px;text-decoration:none}.primary{background:var(--pink);color:#241138;box-shadow:0 5px 18px #05092248}.secondary{background:#414b9d;color:#fff}.light{background:#e5e8ff;color:#191e53}.cyan{background:var(--cyan);color:#15274a}.full{width:100%}.actions{display:flex;gap:12px;flex-wrap:wrap;margin-top:20px}.small-button{border:1px solid #747edd;border-radius:10px;background:var(--panel-dark);padding:8px 12px;font-size:14px;min-height:44px}.scene{height:315px;position:relative;border-radius:var(--radius);overflow:hidden;background:linear-gradient(0deg,#0e194bdd,transparent 65%),url('https://media.questant.app/assets/questmon/game/16989ee522de695c/stages/Q10/full.webp') center 47%/cover}.scene .mimi{position:absolute;bottom:-12px;left:35px;height:235px;width:220px;object-fit:contain;image-rendering:auto}.scene .scene-listener{position:absolute;right:30px;bottom:16px;width:127px;height:180px;object-fit:cover;border-radius:18px;box-shadow:0 8px 25px #09132ca0}.bubble{position:absolute;top:20px;left:25px;max-width:310px;padding:15px 21px;background:#f5f6ff;color:#141a51;border-radius:24px 24px 24px 5px;line-height:1.3;font-weight:700;font-size:19px}.scene-status{position:absolute;bottom:20px;left:20px;padding:6px 12px;border-radius:11px;background:#172561dd;color:var(--cyan);font-size:13px}.welcome{padding:24px 4px}.welcome h1{margin-bottom:12px}.welcome p{color:var(--muted);max-width:48ch}.free-note{font-size:13px;text-align:center;color:var(--muted);margin-top:10px}.bond-track{height:7px;background:#41497b;border-radius:7px;margin-top:8px;overflow:hidden}.bond-track span{display:block;height:100%;background:var(--pink)}.bottom-nav{position:fixed;bottom:18px;left:50%;transform:translateX(-50%);display:flex;gap:6px;padding:8px;background:#171e54f5;border:1px solid #6771c8;border-radius:22px;z-index:5;box-shadow:0 12px 34px #05092280}.bottom-nav button{background:transparent;border:0;border-radius:15px;padding:12px 20px;color:var(--muted);display:flex;gap:9px;align-items:center;font-weight:700}.bottom-nav button[aria-current=page]{background:#303d86;color:var(--cyan)}.task-layout{grid-template-columns:minmax(300px,.85fr) minmax(0,1.2fr)}.task-top{display:flex;justify-content:space-between;align-items:center;gap:15px;margin-bottom:18px}.task-top h1{font-size:27px}.round{font-variant-numeric:tabular-nums;color:var(--muted);font-size:14px}.task-card{background:#f3f5ff;color:#171e56;border-radius:18px;padding:24px;margin-bottom:18px}.task-card h2{font-size:25px;line-height:1.25}.task-card p{margin-top:14px}.question-label{display:flex;align-items:center;gap:8px;color:#38408c;font-size:14px;font-weight:700;margin-bottom:12px}.feedback-speech{background:var(--panel-dark);border-radius:16px;padding:18px;margin-top:18px}.feedback-speech p{color:#eff1ff}.last-answer{padding:18px;background:#161e50;border-radius:14px;margin-bottom:15px}.last-answer blockquote{margin:8px 0 0;color:#f4f5ff;overflow-wrap:anywhere}.dimensions{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-top:18px}.dimension{background:#182052;padding:12px;border-radius:13px}.dimension strong{display:block;font-size:14px}.dimension small{font-size:12px;color:var(--muted)}.dimension-bar{height:6px;border-radius:8px;background:#404876;margin:10px 0 6px}.dimension-bar span{display:block;background:var(--cyan);height:100%;border-radius:inherit}.dimension:nth-child(2) .dimension-bar span{background:var(--purple)}.dimension:nth-child(3) .dimension-bar span{background:var(--green)}label{display:block;font-weight:700;margin-bottom:10px}textarea{display:block;width:100%;min-height:130px;resize:vertical;border:1px solid #bbc5ee;border-radius:16px;padding:16px;background:#fafbff;color:#182052;caret-color:#783fae;line-height:1.5}textarea::placeholder{color:#687397}.input-meta{display:flex;justify-content:space-between;align-items:center;color:var(--muted);font-size:12px;margin-top:7px}.submit-actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin-top:18px}.submit-actions .primary{flex:1}.mic{background:#283c84;border:1px solid var(--cyan);color:var(--cyan);height:54px;width:54px;border-radius:50%;display:flex;align-items:center;justify-content:center}.mic.recording{background:#9b256f;color:#fff;border-color:var(--pink)}.hint{padding:13px 16px;border-radius:12px;background:#f5e6b9;color:#443512;margin-bottom:15px}.result h1{margin:14px 0}.result-reward{display:flex;align-items:center;gap:10px;border-radius:14px;padding:16px;background:#d2fff0;color:#163c35;font-weight:800;margin:20px 0}.result-reward svg{width:30px;height:30px}.result p{color:var(--muted)}.catalog-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-top:24px}.gift-row{background:#252c69;border:1px solid #6672ba;border-radius:16px;padding:18px;display:flex;flex-direction:column;gap:10px}.gift-row svg{color:var(--purple);width:30px;height:30px}.gift-row p{font-size:13px;color:var(--muted)}.gift-row .button{margin-top:auto;font-size:14px}.categories{display:flex;gap:10px;flex-wrap:wrap;margin:20px 0}.categories button.active{background:var(--cyan);color:#15274a;border-color:var(--cyan)}.inventory{margin-top:36px}.inventory-row{padding:16px 0;border-bottom:1px solid #56639d;display:flex;gap:15px;align-items:center;justify-content:space-between}.inventory-row select{background:var(--panel-dark);color:#fff;padding:10px;border:1px solid #8b96d2;border-radius:10px;max-width:220px}.scene-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:0 30px;margin-top:26px}.scene-entry{padding:20px 0;border-bottom:1px solid #5b659c;display:flex;align-items:center;gap:15px}.scene-entry svg{color:var(--cyan);width:32px;height:32px}.scene-entry p{font-size:14px;color:var(--muted);margin-top:6px}.memory{display:flex;gap:18px;align-items:start;padding:24px 0;border-bottom:1px solid #5b659c}.memory img{width:70px;height:85px;object-fit:cover;border-radius:12px}.memory p{color:var(--muted);margin-top:8px;max-width:70ch}.memory blockquote{margin:14px 0 0;color:#fff;overflow-wrap:anywhere}.initial{padding:80px 25px;text-align:center}.initial p{color:var(--muted);margin-top:16px}.initial a{margin-top:24px}.toast{position:fixed;left:50%;bottom:110px;transform:translateX(-50%);background:#f5f6ff;color:#171e56;padding:14px 22px;border-radius:16px;box-shadow:0 10px 30px #080b2860;z-index:10;max-width:calc(100% - 32px);width:max-content}.error-text{color:#ffe0ed;margin:12px 0;font-size:14px}.toolbar{display:flex;gap:12px;margin:15px 0}.empty{padding:45px 10px;color:var(--muted)}.stage-reveal{animation:stage-settle .45s var(--ease)}@keyframes stage-settle{from{filter:brightness(.85)}to{filter:brightness(1)}}
@media(min-width:1500px){.app-shell{padding-top:38px}.scene{height:370px}.scene .mimi{height:265px;width:250px}}
@media(max-width:850px){.app-shell{padding:18px 20px 110px}.layout{grid-template-columns:minmax(290px,1fr) minmax(0,1fr);gap:16px}.panel-pad{padding:18px}.listener-grid{gap:5px}.scene{height:290px}.scene .mimi{width:180px;left:5px}.scene .scene-listener{right:15px;width:95px;height:145px}.bubble{max-width:calc(100% - 35px);font-size:17px}.catalog-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.header-actions .icon-button{display:none}.task-layout{grid-template-columns:1fr}.task-layout>.stage-column{display:grid;grid-template-columns:1fr 1fr;gap:18px}.task-layout .scene{height:270px}.feedback-speech{margin-top:0}.dimensions{grid-column:1/-1}.bottom-nav button{padding:11px 16px}}
@media(max-width:600px){body{font-size:16px}.app-shell{padding:16px 14px 110px}.app-header{margin-bottom:16px}.brand{font-size:27px}.candy{font-size:12px;padding:8px 10px}.layout{display:flex;flex-direction:column;gap:18px}.friends-layout>.stage-column{order:-1;width:100%}.friends-layout .scene{height:235px}.friends-layout .scene .mimi{height:180px;left:28px}.friends-layout .scene .scene-listener{height:125px;width:86px;right:35px}.friends-layout .bubble{top:15px;font-size:16px;max-width:285px}.welcome{padding:18px 3px 0}.welcome h1{font-size:27px;margin-bottom:7px}.welcome p{font-size:15px}.collection-panel{width:100%}.listener-grid{gap:7px}.panel-pad{padding:18px}.selected-partner{padding:15px 0}.partner-photo{width:65px;height:83px}.bottom-nav{bottom:10px;width:calc(100% - 22px);justify-content:space-between;gap:0;padding:6px}.bottom-nav button{font-size:12px;flex-direction:column;gap:4px;padding:9px 10px;flex:1}.bottom-nav svg{width:22px;height:22px}.task-layout>.stage-column{display:block;width:100%}.task-layout .scene{height:245px}.task-layout .scene .mimi{height:190px}.task-layout .scene .scene-listener{height:130px;width:95px;right:30px}.task-layout .feedback-speech{margin-top:12px}.task-layout>.task-column{width:100%}.task-top h1{font-size:24px}.dimensions{margin-top:12px}.dimension{padding:10px}.task-card{padding:20px}.task-card h2{font-size:22px}.catalog-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.gift-row{padding:15px}.gift-row h3{font-size:17px}.scene-grid{grid-template-columns:1fr}.inventory-row{flex-wrap:wrap}.inventory-row select{max-width:100%}.memory{gap:12px}.memory img{width:55px;height:70px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important}}
/* Keep audio and the full-site return reachable on every device. */
@media(max-width:850px){.header-actions .icon-button{display:inline-flex}}
@media(max-width:600px){.app-header{flex-wrap:wrap}.app-header .brand{flex:1 1 100%}.header-actions{width:100%;justify-content:flex-end}}
@media(max-width:380px){.listener-grid{grid-template-columns:repeat(5,minmax(0,1fr))}}
/* Generated artwork, persistent casual games and shared speech. */
.speech-status{min-height:20px;margin:8px 0;color:#c1caef;font-size:13px;text-align:right}
.scene{background-image:url('/api/mimi/assets/scene-library')}
.gift-description{margin-top:12px;max-width:65ch}.gift-row{display:flex;flex-direction:column;align-items:center;gap:12px;overflow:hidden}.gift-row .gift-art{width:100%;height:210px;object-fit:contain;filter:drop-shadow(0 12px 12px #10152f66)}.gift-row h3{text-align:center;min-height:44px}.gift-row button{margin-top:auto;width:100%}.inventory-row .gift-art{width:60px;height:60px;object-fit:contain;flex-shrink:0}.scene-entry{padding:0;display:flex;flex-direction:column;overflow:hidden}.scene-entry>img{width:100%;aspect-ratio:3/2;object-fit:cover}.scene-entry>div{padding:18px}.scene-entry p{margin:8px 0 16px}.resume-game{margin:20px 0}
.play-scene{background-image:linear-gradient(#10152f66,#10152fbb),var(--scene-image);background-size:cover;background-position:center;border-radius:16px;padding:24px;min-height:520px}.play-companion{display:flex;gap:14px;align-items:center;margin-bottom:20px;background:#171d52ec;padding:14px;border-radius:12px;max-width:600px}.play-companion img{width:68px;height:68px;object-fit:contain}.play-companion p{color:#c1caef;margin-top:6px}.play-board{max-width:850px;margin:0 auto;background:#171d52f2;border-radius:16px;padding:24px}.play-instructions{margin-bottom:20px;color:#c1caef;max-width:65ch}.play-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;max-width:600px;margin:20px auto}.play-tile{min-width:44px;min-height:64px;padding:8px;border:1px solid #606cd2;background:#303979;color:#fbfcff;border-radius:12px;cursor:pointer;touch-action:manipulation}.play-tile img{width:100%;height:80px;object-fit:contain}.play-tile:hover:not(:disabled){background:#414b9d}.play-tile:disabled{opacity:.6;cursor:default}.play-tile.matched{background:#285953;border-color:#69edc4;opacity:1}.picked{outline:3px solid #f758c4;outline-offset:2px}.card-back{font-size:32px;color:#5ce0fc}.memory-grid .play-tile{height:112px}.difference-pair{display:grid;grid-template-columns:1fr 1fr;gap:20px}.difference-scene{background-size:cover;border-radius:12px;padding:12px}.difference-scene h3{background:#171d52e8;padding:8px;font-size:16px}.difference-scene .play-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}.difference-scene img{height:64px;object-fit:contain;width:100%}.reference-tile{min-height:64px;background:#171d52bb;border-radius:10px}.missing-space{display:block;min-height:64px}.found{color:#69edc4}.puzzle-layout{display:flex;gap:20px;align-items:center;flex-wrap:wrap}.puzzle-grid{grid-template-columns:repeat(3,minmax(0,1fr));width:min(100%,480px);gap:4px;margin:0}.puzzle-grid .play-tile{aspect-ratio:1;padding:0;border-radius:6px;overflow:hidden}.puzzle-piece{display:block;width:100%;height:100%;background-size:300% 200%}.puzzle-reference{width:170px;max-width:100%;border-radius:12px}.sequence-icons{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:16px;margin:22px 0}.sequence-icons img{width:72px;height:72px;object-fit:contain}.sequence-icons>span{padding:6px}.target-item{display:flex;justify-content:center}.target-item img{width:140px;height:140px;object-fit:contain}.target,.sequence-display,.order-preview{text-align:center}.light-grid{display:grid;grid-template-columns:repeat(4,minmax(44px,1fr));gap:12px;max-width:480px;margin:20px auto}.light{display:grid;place-items:center;border-radius:12px;width:70px;height:70px;max-width:100%;font-size:24px;font-weight:700;color:#10152f}.light-0{background:#f758c4}.light-1{background:#5ce0fc}.light-2{background:#ffcc70}.light-3{background:#69edc4}.sequence-icons .light{animation:light-cue .6s 1 both}.light-grid .light{margin:auto}.star-grid{display:grid;grid-template-columns:repeat(4,minmax(44px,1fr));gap:16px;max-width:500px;margin:20px auto}.star-grid .play-tile{position:relative;min-height:76px;background:#222968aa}.star-grid svg{width:42px;height:42px;fill:#ffcc70}.star-grid span{position:absolute;inset:0;display:grid;place-items:center;color:#10152f;font-weight:700}.star-grid span:empty{display:none}.garden-flower{text-align:center}.garden-flower img{height:190px;width:200px;object-fit:contain}.care-buttons{display:flex;gap:12px;justify-content:center;flex-wrap:wrap;margin-top:20px}.care-buttons button{flex:1;max-width:200px}.play-result{text-align:center;padding:40px 0}.play-result p{margin:16px 0 24px}
.craft-dialog{background:#171d52;color:#fbfcff;border:1px solid #606cd2;border-radius:16px;padding:28px;width:min(420px,calc(100vw - 32px));text-align:center}.craft-dialog::backdrop{background:#10152fcc}.craft-dialog h2{font-size:24px}.craft-sheet{width:240px;max-width:100%;height:240px;margin:20px auto;background-repeat:no-repeat;background-size:400% 100%;animation:craft-progress 2.6s steps(3,end) forwards}.craft-dialog .gift-art{width:240px;max-width:100%;height:240px;object-fit:contain;margin:20px auto}.craft-dialog p{color:#c1caef;margin-bottom:20px}.craft-dialog button{min-height:48px}
@keyframes light-cue{0%{filter:brightness(.45)}40%,80%{filter:brightness(1.35)}100%{filter:brightness(.45)}}
@keyframes craft-progress{from{background-position:0% 0}to{background-position:100% 0}}
@media(max-width:700px){.difference-pair{grid-template-columns:1fr}.play-scene{padding:12px}.play-board{padding:14px}.play-grid{gap:8px}.play-tile img{height:62px}.memory-grid .play-tile{height:88px}.light{width:56px;height:56px}.star-grid{gap:10px}.gift-row .gift-art{height:180px}.speech-status{text-align:left}.play-companion img{width:54px;height:54px}}
@media(prefers-reduced-motion:reduce){.craft-sheet,.sequence-icons .light{animation:none}}

/* Keep the game controls clear at every scroll position. */
.is-playing .bottom-nav{position:static;transform:none;width:fit-content;max-width:100%;margin:28px auto 0}
.is-playing .app-shell{padding-bottom:24px}

/* Tripo 2.5D actors: transparent poses, shared foot-anchored motion, state cues. */
.questmon-actor{display:inline-block;position:relative;width:110px;height:110px;flex-shrink:0;vertical-align:middle}
.questmon-actor>.actor-source,.questmon-actor>.creature-motion{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;pointer-events:none}
.questmon-actor>.motion-source{opacity:0}
.listener .questmon-actor{width:100%;height:100%;position:absolute;inset:0}
.listener:not(.held) .questmon-actor{filter:saturate(.65);opacity:.7}
.scene .scene-listener{width:180px;height:225px;right:15px;bottom:4px;border-radius:0;box-shadow:none}
.scene .mimi{bottom:0}
.scene{background-position:center bottom}
.selected-partner .partner-photo{width:96px;height:112px;object-fit:contain}
.play-companion .game-actor{width:110px;height:110px}
.memory .memory-actor{width:70px;height:85px}
.actor-thought,.actor-bulb{position:absolute;top:2%;right:2%;display:none;width:38px;height:38px;border-radius:50%;background:#192251e8;color:#ffdf78;align-items:center;justify-content:center;gap:3px;pointer-events:none;box-shadow:0 0 15px #ffe78a44}
[data-state=thinking]>.actor-thought{display:flex}
[data-state=understood]>.actor-bulb{display:flex}
.actor-thought i{width:5px;height:5px;background:var(--cyan);border-radius:50%;animation:thought-pulse 1.2s ease-in-out infinite}
.actor-thought i:nth-child(2){animation-delay:.18s}.actor-thought i:nth-child(3){animation-delay:.36s}
.actor-bulb svg{width:26px;height:26px;fill:#ffdf7830;stroke:#ffdf78}
.listener .actor-bulb,.listener .actor-thought{width:22px;height:22px;top:0;right:0}
@keyframes thought-pulse{50%{opacity:.3;transform:translateY(-3px)}}
@media(max-width:700px){.scene .scene-listener{width:135px;height:180px;right:4px;bottom:2px}.play-companion .game-actor{width:84px;height:84px}}
@media(prefers-reduced-motion:reduce){.actor-thought i{animation:none}}
/* A living town. Map chrome follows the illustrated paths; copies live one layer below. */
.world-heading{display:flex;justify-content:space-between;align-items:end;gap:24px;margin:14px 0 24px}.world-heading h1{font-size:clamp(30px,3.5vw,48px);line-height:1.1;max-width:780px}.world-heading p{color:#c1caef;margin-top:12px}.world-eyebrow{font-size:12px!important;font-weight:700;letter-spacing:.16em;color:#a4e9fa!important;margin:0 0 12px!important}.world-resume{display:flex;gap:10px;flex-wrap:wrap;max-width:270px}.world-map{position:relative;height:min(65vh,700px);min-height:430px;overflow:auto;border:1px solid #7477b8;border-radius:24px;cursor:grab;overscroll-behavior:contain;scrollbar-color:#9297cd #1b2258;touch-action:pan-x pan-y}.world-map:focus-visible{outline:3px solid #5ce0fc;outline-offset:4px}.world-map.dragging{cursor:grabbing;user-select:none}.world-canvas{position:relative;width:max(100%,1500px);aspect-ratio:3/2;overflow:hidden}.world-canvas.map-fit{width:100%;min-width:0}.map-plate{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;pointer-events:none}.map-place{position:absolute;transform:translate(-50%,-50%);border:1px solid #fbd7a3;background:#182555ee;color:#fff;padding:10px 16px;min-height:52px;border-radius:14px;box-shadow:0 6px 20px #080c2870;cursor:pointer;z-index:2;min-width:100px}.map-place:hover,.map-place:focus-visible{background:#38417b;outline:3px solid #ffb7e2;outline-offset:4px}.map-place-name{display:block;font-weight:700;white-space:nowrap}.map-place-count{display:block;font-size:11px;color:#e5d5b6;margin-top:3px}.map-footer{display:flex;align-items:center;justify-content:flex-end;gap:12px;margin:14px 0}.map-footer p{margin-right:auto;font-size:13px;color:#c1caef}.place-shortcuts{display:flex;flex-wrap:wrap;gap:8px}.place-shortcuts span{color:#a4e9fa;margin-left:6px}.town-bulletin{display:grid;grid-template-columns:1.1fr repeat(3,1fr);gap:20px;margin:48px 0 20px;align-items:start}.town-bulletin h2{font-size:25px;line-height:1.25}.event-note{background:transparent;border:0;border-top:1px solid #7477b8;text-align:left;color:#fff;padding:16px 0;display:grid;gap:10px;cursor:pointer}.event-note small{color:#a4e9fa}.event-note strong{font-size:20px}.event-note span{font-size:14px;line-height:1.55;color:#c1caef}.event-note:hover strong{text-decoration:underline;text-underline-offset:5px}
.place-stage{position:relative;isolation:isolate;min-height:480px;background-image:var(--place-image);background-size:cover;background-position:center bottom;border-radius:24px;overflow:hidden}.place-story{position:absolute;z-index:2;left:28px;top:28px;max-width:420px;background:#151c4be8;padding:22px 26px;border-radius:16px;box-shadow:0 12px 30px #080d3040}.place-story h2{font-size:30px;margin:0 0 12px}.place-story>p:last-child{color:#d0d8f2;line-height:1.5}.place-stage .place-mimi{position:absolute;width:350px;height:390px;right:7%;bottom:0}.place-caption{position:absolute;z-index:2;bottom:18px;left:24px;background:#151c4bdd;padding:8px 14px;border-radius:12px;color:#fff;font-size:13px}.scene-content{display:grid;grid-template-columns:1.8fr 1fr;gap:36px;margin-top:32px}.scene-content h2{margin-bottom:10px}.scene-activity{padding:26px 0;border-top:1px solid #7477b8}.scene-activity p{color:#c1caef;margin:14px 0;line-height:1.6}.resident-groups{display:grid;gap:16px;margin-top:20px}.resident-family{display:flex;gap:20px;align-items:center;padding:18px 0;border-bottom:1px solid #5763a0}.resident-family .family-actor{width:120px;height:136px}.resident-family h3{font-size:23px}.resident-family p{font-size:14px;color:#c1caef;margin:8px 0 12px}.copy-buttons{display:flex;gap:8px;flex-wrap:wrap}.scene-back{margin-bottom:18px}.character-layout{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(310px,1fr);gap:26px;align-items:start}.character-stage{min-height:570px}.character-stage .character-mimi{position:absolute;left:0;bottom:0;width:46%;height:78%}.character-stage .character-friend{position:absolute;right:0;bottom:0;width:57%;height:86%}.character-bubble{position:absolute;z-index:2;top:26px;left:26px;max-width:75%;padding:16px 22px;background:#f6f4ff;color:#192251;border-radius:22px;font-weight:700;font-size:22px;box-shadow:0 6px 20px #171a5433}.character-actions h2{font-size:30px}.character-actions>p{line-height:1.55;margin:14px 0;color:#c1caef}.character-actions .button{margin:10px 0 0;min-height:50px}.character-actions .small-button{margin-top:18px}.friendship-steps{margin:20px 0;padding-left:22px;line-height:1.7;font-size:15px;color:#c1caef}.friendship-steps li.done{color:#a4e9fa}.friendship-steps li.done::marker{color:#5ce0fc}.person-gift-bag{margin-top:26px;border-top:1px solid #7477b8;padding-top:20px}.gift-choice{display:flex;align-items:center;gap:12px;text-align:left;background:transparent;color:#fff;border:0;border-bottom:1px solid #5763a0;padding:8px 0;min-height:64px;width:100%;cursor:pointer}.gift-choice img{width:64px;height:64px;object-fit:contain}.gift-choice:hover{background:#333e79}.bag-totals{display:flex;align-items:center;gap:24px;margin:28px 0;background:#242d69;padding:20px 24px;border-radius:16px;flex-wrap:wrap}.bag-totals strong{font-size:24px}.bag-totals span{color:#c1caef}.bag-totals button{margin-left:auto}.collection-families{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:28px;margin-top:32px}.collection-family{border-top:1px solid #7477b8;padding:20px 0}.collection-family .collection-actor{width:150px;height:170px;display:block;margin:auto}.collection-family h2{font-size:24px;margin:10px 0 20px}.copy-schedule{display:grid;gap:7px;padding:14px 0;border-top:1px solid #5763a0;font-size:14px}.copy-schedule span{color:#c1caef}.copy-schedule button{justify-self:start}.invite-dialog{background:#192251;color:#fff;border:1px solid #7477b8;border-radius:24px;padding:28px;width:min(520px,calc(100vw - 28px))}.invite-dialog::backdrop{background:#080c28bb}.invite-dialog h2{font-size:28px;margin-bottom:14px}.invite-dialog p{color:#c1caef;line-height:1.5;margin-bottom:18px}.invite-dialog label{display:block;font-weight:700;margin-bottom:8px}.invite-dialog select{width:100%;max-width:100%;padding:14px;background:#242d69;color:#fff;border:1px solid #9297cd;border-radius:12px}.invite-actor{display:block;width:200px;height:210px;margin:12px auto}.invite-dialog .actions{justify-content:space-between}
/* Foreground actors fill the scene at the reference's conversational scale. */
.task-layout .scene{height:450px}.task-layout .scene .mimi{left:0;bottom:0;width:48%;height:82%}.task-layout .scene .scene-listener{right:0;bottom:0;width:55%;height:88%}.task-layout .bubble{top:20px;left:20px;transform:none;max-width:calc(100% - 40px);font-size:21px;z-index:3}.task-layout .scene-status{z-index:3;background:#151c4bdd;padding:6px 12px;border-radius:12px}
.ambient,.scene-ambient{position:absolute;inset:0;overflow:hidden;pointer-events:none;z-index:1}.ambient i,.scene-ambient i{position:absolute;left:var(--x);top:var(--y);width:5px;height:5px;background:#fff1b8;box-shadow:0 0 12px 4px #ffdea44d;border-radius:50%;animation:town-float 8s ease-in-out infinite;animation-delay:var(--delay)}.ambient-garden i{width:8px;height:5px;background:#ffc7e5;border-radius:80% 0 80% 0}.ambient-observatory i{background:#d7edff;animation:star-shimmer 4s ease-in-out infinite;animation-delay:var(--delay)}.ambient-kitchen i,.ambient-cafe i{width:12px;height:40px;background:#fff6;filter:blur(9px);animation:steam-rise 8s ease-in-out infinite;animation-delay:var(--delay)}.ambient-workshop i{background:#ffc875;animation:town-float 11s ease-in-out infinite;animation-delay:var(--delay)}.ambient-playground i{background:#ffe9ae;animation:town-float 6s ease-in-out infinite;animation-delay:var(--delay)}.place-stage::after{content:'';position:absolute;inset:-20%;pointer-events:none;z-index:0;background:radial-gradient(ellipse at 75% 35%,#ffdb9822,transparent 55%);animation:room-light 10s ease-in-out infinite}.ambient-library i,.ambient-classroom i,.ambient-music i{opacity:.45;background:#dbe0ff;animation:town-float 14s ease-in-out infinite;animation-delay:var(--delay)}
@keyframes town-float{0%,100%{transform:translate(0,0);opacity:.15}50%{transform:translate(22px,-35px);opacity:.9}}@keyframes star-shimmer{0%,100%{opacity:.2;transform:scale(.6)}50%{opacity:1;transform:scale(1.6)}}@keyframes steam-rise{0%{transform:translateY(45px);opacity:0}45%{opacity:.5}100%{transform:translate(30px,-130px);opacity:0}}@keyframes room-light{50%{opacity:.4;transform:translateX(4%)}}
/* The settlement celebrates only events the server actually saved. */
.settlement{position:relative;isolation:isolate;overflow:hidden;text-align:center;padding:40px 30px;background:#182252;border:1px solid #7477b8;border-radius:28px}.settlement>h1{font-size:clamp(34px,4.5vw,60px);margin:14px 0;line-height:1.05;position:relative;z-index:2}.settlement>p{max-width:680px;margin:0 auto;color:#c1caef;line-height:1.6;position:relative;z-index:2}.settlement-sky{position:absolute;inset:0;pointer-events:none}.settlement-sky i{position:absolute;left:var(--x);top:var(--y);color:#adb1e4;font-style:normal;animation:star-shimmer 5s ease-in-out infinite;animation-delay:var(--delay)}.settlement.mastered .settlement-sky i{color:#ffd58d}.settlement-cast{display:flex;justify-content:center;align-items:end;height:340px;max-width:720px;margin:5px auto 0;position:relative;z-index:2}.settlement-cast .questmon-actor{width:48%;height:100%}.settlement-ribbon{position:relative;z-index:2;background:#f758c4;color:#1b214f;font-size:24px;font-weight:800;padding:18px 28px;width:fit-content;max-width:100%;margin:0 auto 30px;border-radius:16px;box-shadow:0 8px 35px #f758c440}.settlement-details{display:grid;grid-template-columns:1fr 1.2fr;gap:36px;text-align:left;position:relative;z-index:2;max-width:960px;margin:auto}.settlement-details .dimensions{display:flex;flex-direction:column;gap:12px;margin:0}.settlement-details .dimension{width:100%;padding:18px}.settlement-story p{margin:14px 0;color:#d0d8f2;line-height:1.55}.settlement-story h2{font-size:25px}.friendship-unlocked{color:#ffda88!important;font-weight:700;font-size:22px}.star-choice{display:flex;gap:12px;align-items:start;font-size:14px;color:#c1caef;margin:16px 0}.star-choice input{width:20px;height:20px;accent-color:#f758c4;flex-shrink:0}.mimi-cinema{position:fixed;inset:0;width:100vw;height:100dvh;max-width:none;max-height:none;border:0;margin:0;padding:0;color:#fff;background:#080b26;overflow:hidden}.mimi-cinema::backdrop{background:#080b26}.mimi-cinema video{display:block;width:100%;height:100%;object-fit:contain;background:#000}.cinema-controls{position:absolute;z-index:3;bottom:0;left:0;right:0;display:flex;gap:16px;align-items:center;padding:24px;background:#12183de8}.cinema-controls>span{margin-right:auto}.cinema-fallback{height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:30px 24px 120px;text-align:center}.cinema-fallback .gift-art{width:min(50vw,340px);height:min(50vw,340px);object-fit:contain;animation:gift-arrive 1.4s ease-out both}.cinema-fallback p{margin:18px 0 0}.cinema-error{position:absolute;top:30px;left:30px;right:30px;background:#192251;padding:16px;border-radius:12px}.friendship-embrace{position:relative;width:min(90vw,680px);height:min(65vh,420px);display:flex;align-items:end;justify-content:center}.friendship-embrace .questmon-actor{width:48%;height:100%;z-index:2;animation:friendship-arrive 1.4s ease-out both}.friendship-embrace .friendship-friend{animation-delay:.2s}.friendship-ring{position:absolute;border:2px solid #ffcf91;box-shadow:0 0 50px #ffbf7440;width:80%;aspect-ratio:1;border-radius:50%;bottom:5%;animation:friendship-glow 3s ease-out infinite;opacity:.4}.friendship-embrace+h2{font-size:clamp(25px,4vw,42px)}@keyframes gift-arrive{from{transform:translateY(35px) scale(.8);opacity:0}to{transform:none;opacity:1}}@keyframes friendship-arrive{from{transform:translateY(40px);opacity:0}to{transform:none;opacity:1}}@keyframes friendship-glow{from{transform:scale(.75);opacity:0}50%{opacity:.55}to{transform:scale(1.1);opacity:0}}
@media(max-width:1000px){.town-bulletin{grid-template-columns:repeat(3,1fr)}.town-bulletin>div{grid-column:1/-1}.character-layout{grid-template-columns:1fr}.character-stage{min-height:560px}.character-stage .character-mimi{left:8%;width:38%}.character-stage .character-friend{right:8%;width:44%}.character-actions{max-width:100%}.collection-families{grid-template-columns:repeat(2,minmax(0,1fr))}.task-layout>.stage-column{display:block}.task-layout .scene{height:430px}}
@media(max-width:600px){.world-heading{display:block;margin-top:10px}.world-heading h1{font-size:32px}.world-heading>button{margin-top:16px}.world-resume{max-width:none;margin-top:18px}.world-map{min-height:410px;height:56vh;border-radius:16px}.world-canvas{width:1150px}.world-canvas.map-fit{width:800px}.map-place{padding:8px 11px;min-width:100px;font-size:13px}.map-footer{flex-wrap:wrap;gap:8px}.map-footer p{flex:1 1 100%}.town-bulletin{grid-template-columns:1fr;gap:16px;margin-top:34px}.town-bulletin>div{grid-column:auto}.place-stage{min-height:470px}.place-story{left:16px;top:16px;right:16px;padding:18px;max-width:none}.place-story h2{font-size:26px}.place-stage .place-mimi{width:230px;height:270px;right:0}.place-caption{left:12px;bottom:12px;font-size:12px;max-width:calc(100% - 24px)}.scene-content{grid-template-columns:1fr;gap:24px}.resident-family{gap:12px}.resident-family .family-actor{width:84px;height:105px}.resident-family h3{font-size:21px}.character-stage{min-height:410px}.character-stage .character-mimi{left:-6%;width:55%;height:82%}.character-stage .character-friend{right:-4%;width:60%;height:88%}.character-bubble{left:15px;top:18px;max-width:calc(100% - 30px);font-size:18px;padding:12px 16px}.character-actions{padding:22px}.collection-families{grid-template-columns:1fr;gap:20px}.collection-family .collection-actor{float:left;width:100px;height:115px;margin:0 16px 15px 0}.collection-family .copy-schedule{clear:both}.bag-totals{gap:12px;padding:18px}.bag-totals button{margin-left:0;flex-basis:100%}.task-layout .scene{height:360px}.task-layout .scene .mimi{left:-5%;width:56%;height:80%}.task-layout .scene .scene-listener{right:-3%;width:60%;height:86%}.task-layout .bubble{font-size:18px;top:15px;left:15px;max-width:calc(100% - 30px)}.settlement{padding:30px 18px;border-radius:20px}.settlement-cast{height:250px}.settlement-cast .questmon-actor{width:54%}.settlement-ribbon{font-size:19px;padding:15px 20px}.settlement-details{grid-template-columns:1fr;gap:26px}.settlement-details .dimensions{flex-direction:row;gap:6px}.settlement-details .dimension{padding:10px;min-width:0}.cinema-controls{padding:16px;flex-wrap:wrap}.cinema-controls>span{flex-basis:100%;font-size:14px}.cinema-controls button{margin-left:auto}.invite-dialog{padding:22px}.invite-dialog h2{font-size:25px}}
@media(prefers-reduced-motion:reduce){.ambient i,.scene-ambient i,.place-stage::after,.settlement-sky i,.cinema-fallback .gift-art,.friendship-embrace .questmon-actor,.friendship-ring{animation:none!important}.world-map{scroll-behavior:auto}.friendship-ring{opacity:.3}}
/* Dock occupies its own row: it never covers an actor or a map destination. */
.bottom-nav{position:static;transform:none;width:fit-content;max-width:100%;margin:30px auto 0}.app-shell{padding-bottom:28px}.world-map:has(.map-fit){min-height:0;height:auto}.world-canvas.map-fit{width:100%;min-width:0}.map-fit .map-place{display:none}.character-stage .character-mimi{left:-3%;width:56%}.character-stage .character-friend{right:-2%;width:62%}.character-stage .questmon-actor>.creature-motion,.character-stage .questmon-actor>.actor-source{width:115%;height:115%;left:-7.5%;top:-10%}.event-state{font-size:13px;color:#a4e9fa!important;margin-top:14px}.task-layout .scene .questmon-actor>.creature-motion,.task-layout .scene .questmon-actor>.actor-source{width:115%;height:115%;left:-7.5%;top:-10%}
@media(max-width:600px){.bottom-nav{width:100%;margin-top:28px}.character-stage{min-height:360px}.character-stage .character-mimi{left:-9%;width:62%}.character-stage .character-friend{right:-7%;width:67%}.character-stage .character-bubble{font-size:17px}.place-stage .place-caption{font-size:11px}}

/* Independent finish review: readable speech and correctly scoped controls. */
.task-card .small-button{color:#fbfcff}
.feedback-speech .question-label{color:#a4e9fa}
.button.light{display:inline-flex;width:auto;height:auto;font-size:16px;min-height:48px;flex-shrink:0;color:#171e56}
.settlement-details>.dimensions{grid-column:auto}
.settlement-story{min-width:0}
.settlement-story .actions{flex-wrap:wrap}
.world-cycle{color:#c1caef;margin-top:12px}
@media(max-width:1000px){.settlement-details{grid-template-columns:1fr}.settlement-details>.dimensions{grid-column:auto}.settlement-story{width:100%}}

/* Teaching that never leaves a child stuck: labelled hint levels and the end-of-session lesson. */
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.hint strong{display:block;font:700 12px/1.2 Figtree,sans-serif;letter-spacing:.06em;text-transform:uppercase;margin-bottom:4px;color:#7a5a12}
.hint p{margin:0}
.hint.hint-level-2{background:#e2f1ff;color:#13325a}.hint.hint-level-2 strong{color:#1d5b9c}
.hint.hint-level-3{background:#e7fbf2;color:#0f3d2c}.hint.hint-level-3 strong{color:#16784f}
.settlement-lesson{margin:16px 0;padding:16px 18px;border-radius:16px;background:#f7f2ff;color:#1c1f45}
.settlement-lesson h3{font-size:18px;margin-bottom:8px;color:#3a2a8c}
.settlement-story .settlement-lesson p{color:#23285a;margin:0}
.settlement-lesson .lesson-model{font-size:18px;line-height:1.5}
.lesson-ideas{list-style:none;margin:12px 0 0;padding:0;display:grid;gap:6px}
.lesson-ideas li{display:flex;gap:8px;align-items:baseline;font-size:15px;line-height:1.4}
.lesson-ideas li span[aria-hidden]{flex:none;width:1.2em;font-weight:700}
.lesson-ideas li.got span[aria-hidden]{color:#16784f}.lesson-ideas li.todo span[aria-hidden]{color:#b03a8a}
.settlement-story .settlement-lesson .lesson-next{margin-top:10px;font-size:14px;color:#4b4f80}
/* The Questmon's wrong idea, in its own words, before the child teaches it. */
.task-card .belief{margin:6px 0 12px;padding:12px 16px;border-radius:16px 16px 16px 4px;background:#fff5d6;color:#3b2a06;font:600 18px/1.45 Figtree,sans-serif;position:relative}
.task-card .teach-ask{color:var(--muted);font-weight:500}.task-card .teach-ask::before{content:"· "}
.settlement-story p.convinced{padding:12px 16px;border-radius:16px 16px 4px 16px;background:#e7fbf2;color:#0f3d2c;font-size:17px}
.lesson-tag{display:inline-block;vertical-align:middle;margin-left:10px;padding:3px 10px;border-radius:99px;background:var(--green);color:#0b2e22;font:700 12px/1.4 Figtree,sans-serif;letter-spacing:.04em;text-transform:uppercase}
/* Results: the celebration stays, but the outcome and what was learnt come into view sooner. */
@media (max-height:900px){.settlement-cast{height:230px}.settlement{padding-top:28px}.settlement h1{font-size:clamp(28px,4vw,44px)}}
/* The Learning Router at the end of a lesson: what comes next, or a gentle stop for today */
.quest-next{margin:14px 0;padding:14px 16px;border-radius:16px;background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.18);text-align:left;display:grid;gap:6px;justify-items:start}
.quest-next p{margin:0}.quest-next.rest{background:rgba(255,214,102,.14);border-color:rgba(255,214,102,.45)}

/* Mimi level (progress only) and a lesson's progress line. */
.mimi-level{display:inline-grid;grid-template-columns:auto minmax(64px,140px) auto;align-items:center;gap:8px;margin:0 12px;font-size:13px;font-weight:600}
.mimi-level b{white-space:nowrap}
.mimi-level-bar{height:8px;border-radius:99px;background:rgba(0,0,0,.12);overflow:hidden}.mimi-level-bar i{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,#ff9fc4,#ffd27a)}
.mimi-level small{opacity:.75;white-space:nowrap}
.settlement-progress{margin:8px 0;font-size:15px}
@media (max-width:640px){.mimi-level{grid-template-columns:auto minmax(48px,1fr);margin:0 6px}.mimi-level small{display:none}}

/* Rarity met (shared daily roll): shown on visitors and after a capture. */
.rarity-tag{display:inline-block;margin:4px auto;padding:2px 10px;border-radius:99px;font-size:12px;font-weight:800;letter-spacing:.04em;text-transform:uppercase;color:#fff}
.rarity-tag[data-finish=rare]{background:#3b82f6}.rarity-tag[data-finish=epic]{background:#8b5cf6}.rarity-tag[data-finish=legendary]{background:linear-gradient(90deg,#f59e0b,#ef4444);box-shadow:0 0 12px #f59e0b88}

body { overscroll-behavior-y: contain; }
.chat-starters { display:flex; flex-wrap:wrap; gap:8px; margin:8px 0 12px; }
.person-chat-compose button, .character-actions .button { min-height:44px; touch-action:manipulation; border-bottom:3px solid #4b4589; box-shadow:0 2px 0 #27244d; }
.person-chat-compose button:enabled:active, .character-actions .button:enabled:active { transform:translateY(2px); box-shadow:none; transition:none; }
@media (prefers-reduced-motion:no-preference) {
  .character-bubble.thinking { animation:mimi-thinking 1s ease-in-out infinite alternate; }
  @keyframes mimi-thinking { to { opacity:.7; } }
}

/* The illustrated world is the viewport. HUDs reserve the actors' foreground. */
:root{--hud-top:calc(76px + env(safe-area-inset-top));--hud-bottom:calc(94px + env(safe-area-inset-bottom));--mimi-vh:100dvh}
.motion-plane{position:absolute;pointer-events:none;z-index:1;overflow:hidden}.motion-plane canvas{position:absolute;pointer-events:none}.world-canvas>.motion-plane{z-index:1}.gift-flight{position:fixed;z-index:50;width:100px;height:100px;object-fit:contain;pointer-events:none}
body[data-immersion]:not([data-immersion=other]):not([data-immersion=settlement]){height:100dvh;overflow:hidden}
body[data-immersion]:not([data-immersion=other]):not([data-immersion=settlement]) .app-shell{max-width:none;margin:0;padding:0;height:var(--mimi-vh)}
body[data-immersion] .app-header{position:fixed;inset:env(safe-area-inset-top) 0 auto;z-index:12;margin:0;padding:14px 24px;pointer-events:none;background:linear-gradient(#0b133ed9,transparent)}
body[data-immersion] .app-header>*{pointer-events:auto}.brand{font-size:28px}.candy{padding:8px 12px}.header-actions{gap:8px}
body[data-immersion] .bottom-nav{position:fixed;z-index:15;bottom:calc(14px + env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);margin:0;width:fit-content;max-width:calc(100% - 24px);background:#171e50f5;box-shadow:0 10px 28px #070d3270}
body[data-immersion=other] .app-shell,body[data-immersion=settlement] .app-shell{padding-top:110px;padding-bottom:130px}
body[data-immersion] #notice{position:fixed;z-index:16;left:24px;bottom:calc(var(--hud-bottom) + 5px);max-width:440px;padding:6px 12px;margin:0;font-size:11px;background:#202650f5}
body[data-immersion] #speech-status:not(:empty){position:fixed;z-index:18;top:calc(var(--hud-top) - 5px);right:24px;max-width:min(440px,90vw);padding:8px 12px;background:#171e50f5;border-radius:12px;font-size:12px;pointer-events:none}
body[data-immersion] .toast{z-index:70;bottom:calc(var(--hud-bottom) + 8px)}
body[data-immersion] .world-heading{position:fixed;z-index:6;top:var(--hud-top);left:28px;right:28px;margin:0;align-items:start;pointer-events:none}
body[data-immersion] .world-heading>*{pointer-events:auto}.world-heading h1{font-size:clamp(26px,3vw,40px);color:#fff;text-shadow:0 3px 15px #081030}.world-heading p{margin-top:6px;text-shadow:0 2px 6px #070c26;background:#17204dd9;width:fit-content;padding:3px 8px;border-radius:7px;font-size:13px}
.world-map{position:absolute;inset:0;width:100vw;height:var(--mimi-vh);min-height:0;border:0;border-radius:0;scrollbar-width:thin}.world-canvas{width:max(100vw,calc(var(--mimi-vh)*1.5));min-height:100%;aspect-ratio:3/2}.world-canvas.map-fit{width:100%;min-height:0;margin-top:calc((var(--mimi-vh) - 100vw / 1.5)/2)}.world-map:has(.map-fit){height:var(--mimi-vh)}
.world-home .map-footer{position:fixed;z-index:5;left:28px;bottom:calc(var(--hud-bottom) + 8px);margin:0;max-width:calc(100% - 50px);flex-wrap:wrap}.map-footer p{background:#17204de8;color:#eef3ff;border-radius:8px;padding:5px 10px}.map-footer .small-button{background:#17204df5}
.places-drawer{position:fixed;z-index:8;right:28px;bottom:calc(var(--hud-bottom) + 8px);width:270px;background:#17204df5;border-radius:14px;padding:12px 16px;box-shadow:0 8px 24px #080e304d}.places-drawer summary{cursor:pointer;font-weight:700;min-height:30px;list-style-position:inside}.places-drawer[open] summary{padding-bottom:12px}.place-shortcuts{max-height:calc(var(--mimi-vh) - 310px);overflow:auto;display:grid;grid-template-columns:1fr;gap:5px}.place-shortcuts .small-button{min-height:44px;text-align:left;justify-content:space-between;display:flex}.town-bulletin{display:none}
body[data-immersion=place] .place-stage,body[data-immersion=person] .character-stage{position:absolute;inset:0;height:var(--mimi-vh);min-height:0;border-radius:0}
.place-stage::after,.ambient,.scene-ambient{display:none}.place-story{top:calc(var(--hud-top) + 70px);left:28px;max-width:360px;padding:15px 20px;background:#17204ded}.place-story summary{cursor:pointer;list-style-position:inside;font-size:21px;font-family:Bricolage,Figtree,sans-serif;line-height:1.2}.place-story p{font-size:14px;margin-top:10px;color:#d0d8f2}.place-stage .place-mimi{width:38vw;max-width:540px;height:60vh;bottom:var(--hud-bottom);right:8%}.place-caption{left:28px;bottom:calc(var(--hud-bottom) + 10px)}
.scene-content{position:absolute;z-index:4;bottom:calc(var(--hud-bottom) + 48px);left:28px;right:28px;margin:0;display:block;pointer-events:none}.scene-content>*{pointer-events:auto}.scene-content>section{max-width:calc(100% - 370px)}.scene-content>section>h2,.scene-content>section>.muted{display:none}.resident-groups{display:flex;gap:20px;overflow-x:auto;align-items:end;margin:0;padding:10px 4px 12px;scroll-snap-type:x proximity;scrollbar-width:thin}.resident-family{display:flex;flex-direction:column;align-items:center;text-align:center;gap:0;border:0;padding:0;flex:0 0 155px;scroll-snap-align:start}.resident-family .family-actor{width:155px;height:170px}.resident-family h3{font-size:18px}.resident-family>div{padding:8px;background:#17204df0;border-radius:12px;width:100%}.resident-family p{font-size:11px;margin:4px 0 8px}.copy-buttons{justify-content:center;gap:4px}.copy-buttons .small-button{font-size:11px;min-height:44px;padding:6px 8px}.scene-activity{position:absolute;right:0;bottom:0;width:320px;padding:18px 20px;background:#17204df0;border:0;border-radius:16px}.scene-activity h2{font-size:22px}.scene-activity p{font-size:13px;margin:8px 0 12px;line-height:1.4}.scene-activity .button{width:100%}
.character-layout{display:block}.scene-back{position:fixed;z-index:7;top:calc(var(--hud-top) + 57px);left:28px;margin:0;background:#17204df5}.character-stage .character-mimi{left:0;width:32%;height:68%;bottom:var(--hud-bottom)}.character-stage .character-friend{left:26%;right:auto;width:48%;height:80%;bottom:var(--hud-bottom)}.character-bubble{top:calc(var(--hud-top) + 115px);left:28px;max-width:calc(100% - 425px);font-size:20px}.character-stage .place-caption{bottom:calc(var(--hud-bottom) + 5px)}
.character-actions{position:absolute;z-index:6;right:28px;bottom:var(--hud-bottom);width:335px;max-height:calc(var(--mimi-vh) - var(--hud-top) - var(--hud-bottom) - 65px);overflow:auto;padding:20px;background:#17204df5;border:0;border-radius:16px;scrollbar-width:thin}.character-actions h2{font-size:27px}.character-actions>p{font-size:13px;margin:10px 0}.character-actions .button{min-height:44px;margin-top:8px;font-size:14px}.character-actions .small-button{margin-top:10px}.character-actions .free-note{font-size:11px}.friendship-details{margin:10px 0;font-size:13px;color:#d0d8f2}.friendship-details summary{cursor:pointer;min-height:30px}.friendship-steps{font-size:13px;margin:8px 0}.friendship-details .muted{font-size:12px}.character-actions select{width:100%;max-width:100%}.person-gift-bag{margin-top:12px;padding-top:12px}
body[data-immersion=lesson] .task-top,body[data-immersion=game] .task-top{position:fixed;z-index:7;top:var(--hud-top);left:24px;right:24px;margin:0;background:#17204df0;padding:10px 16px;border-radius:14px}.task-top h1{font-size:24px}
body[data-immersion=lesson] .task-layout{display:block}.task-layout .scene{position:absolute;inset:0;height:var(--mimi-vh);border-radius:0}.task-layout .scene .mimi{width:30%;height:68%;bottom:var(--hud-bottom);left:0}.task-layout .scene .scene-listener{width:40%;height:78%;left:23%;right:auto;bottom:var(--hud-bottom)}.task-layout .bubble{top:calc(var(--hud-top) + 90px);max-width:calc(100% - 490px);left:24px}.task-layout .scene-status{left:25px;bottom:calc(var(--hud-bottom) + 120px)}.task-layout .feedback-speech{position:absolute;z-index:4;bottom:calc(var(--hud-bottom) + 5px);left:24px;width:calc(100% - 500px);max-height:120px;overflow:auto;margin:0;background:#17204df5;padding:12px 16px;border-radius:14px}.feedback-speech .question-label{font-size:12px}.feedback-speech p{font-size:14px}.task-layout .stage-column>.dimensions{display:none}.task-column{position:absolute;z-index:5;right:24px;top:calc(var(--hud-top) + 75px);bottom:var(--hud-bottom);width:430px;overflow:auto;border:0;background:#17204df5}.task-column textarea{min-height:130px}.task-card{background:transparent;padding:0}.task-card h2{font-size:24px}
body[data-immersion=game] .play-scene{position:absolute;inset:0;height:var(--mimi-vh);min-height:0;background-position:center bottom;border-radius:0;display:block;padding:0}.play-companion{position:absolute;left:24px;bottom:var(--hud-bottom);width:42%;max-width:600px;display:flex;flex-direction:column;padding:0;background:transparent}.play-companion .game-actor{width:100%;height:60vh}.play-companion>div:last-child{background:#17204df5;padding:12px 18px;border-radius:14px}.play-board{position:absolute;z-index:4;right:24px;top:calc(var(--hud-top) + 75px);bottom:var(--hud-bottom);width:50%;max-width:700px;overflow:auto;background:#17204df5;padding:20px;border-radius:16px}.play-instructions{font-size:14px}.play-tile{min-height:44px}
@media(max-width:1000px){.character-actions{width:290px}.character-stage .character-mimi{left:-5%;width:40%;height:65%}.character-stage .character-friend{left:24%;width:49%;height:72%}.character-bubble{max-width:calc(100% - 345px)}.scene-content>section{max-width:calc(100% - 300px)}.scene-activity{width:270px}.place-stage .place-mimi{right:4%;width:45vw}.task-column{width:380px}.task-layout .bubble{max-width:calc(100% - 430px)}.task-layout .feedback-speech{width:calc(100% - 430px)}}
@media(max-width:600px){
  :root{--hud-top:calc(65px + env(safe-area-inset-top));--hud-bottom:calc(85px + env(safe-area-inset-bottom))}
  body[data-immersion] .app-header{padding:10px 12px;gap:8px}.brand{font-size:23px}.brand strong{display:none}.header-actions{gap:5px}.candy{font-size:11px;padding:8px}.icon-button{height:38px;width:38px;border-radius:11px}body[data-immersion] .bottom-nav{width:calc(100% - 24px);padding:6px;bottom:calc(10px + env(safe-area-inset-bottom))}.bottom-nav button{padding:8px 10px;min-height:48px;font-size:11px}
  body[data-immersion] .world-heading{top:var(--hud-top);left:16px;right:16px;display:flex;gap:10px}.world-heading h1{font-size:25px;max-width:270px}.world-heading p{font-size:11px;max-width:260px}.world-heading .world-cycle{display:inline-block}.world-home .world-heading>div:first-child>p:last-child{display:none}.world-heading>button{margin:0;min-height:40px;white-space:nowrap;font-size:11px}.world-resume{position:absolute;top:75px;left:0;margin:0}.world-resume .button{font-size:12px;padding:8px 12px;min-height:40px}
  .world-canvas{width:max(1150px,calc(var(--mimi-vh)*1.5))}.map-place{font-size:12px;min-width:90px;padding:8px 10px}.map-place-count{font-size:10px}.world-home .map-footer{left:16px;bottom:calc(var(--hud-bottom) + 60px);max-width:calc(100% - 32px);gap:6px}.map-footer p{font-size:11px;flex-basis:100%;width:fit-content;max-width:250px}.map-footer .small-button{font-size:11px;min-height:38px}.places-drawer{left:16px;right:16px;bottom:calc(var(--hud-bottom) + 5px);width:auto;padding:8px 14px}.places-drawer summary{min-height:32px;font-size:13px}.places-drawer .place-shortcuts{grid-template-columns:1fr 1fr;max-height:45vh}.place-shortcuts .small-button{font-size:12px}
  .place-story{top:calc(var(--hud-top) + 68px);left:16px;right:16px;padding:12px 14px;max-width:none}.place-story summary{font-size:18px}.place-story p{font-size:12px}.place-stage .place-mimi{width:74vw;height:44vh;max-height:390px;right:-4%;bottom:calc(var(--hud-bottom) + 230px)}.place-caption{left:16px;bottom:calc(var(--hud-bottom) + 222px);font-size:11px;max-width:calc(100% - 32px)}
  .scene-content{left:12px;right:12px;bottom:calc(var(--hud-bottom) + 4px)}.scene-content>section{max-width:none}.resident-groups{gap:12px;padding:5px 0}.resident-family{flex-basis:145px}.resident-family .family-actor{width:135px;height:125px}.resident-family h3{font-size:15px}.resident-family p{font-size:10px;margin:3px 0 6px}.resident-family>div{padding:6px}.copy-buttons .small-button{min-height:44px;font-size:11px}.scene-activity{right:4px;bottom:calc(100% + 40px);width:auto;max-width:220px;padding:10px 12px}.scene-activity h2,.scene-activity p{display:none}.scene-activity .button{font-size:12px;min-height:40px;padding:8px 10px}.scene-activity .small-button{font-size:11px}
  .scene-back{left:16px;top:calc(var(--hud-top) + 55px);min-height:36px;font-size:12px}.character-bubble{top:calc(var(--hud-top) + 102px);left:16px;max-width:calc(100% - 32px);font-size:16px;padding:10px 14px}.character-stage .character-mimi{left:-10%;width:64%;height:calc(var(--mimi-vh) - 470px);min-height:170px;max-height:420px;bottom:calc(var(--hud-bottom) + 225px)}.character-stage .character-friend{left:auto;right:-7%;width:67%;height:calc(var(--mimi-vh) - 430px);min-height:200px;max-height:460px;bottom:calc(var(--hud-bottom) + 225px)}.character-stage .place-caption{display:none}.character-actions{left:12px;right:12px;bottom:calc(var(--hud-bottom) + 4px);width:auto;max-height:216px;padding:14px 16px;border-radius:16px;display:grid;grid-template-columns:1fr 1fr;gap:6px 10px;align-items:start}.character-actions h2{font-size:20px}.character-actions>p,.character-actions .bond-track,.character-actions .friendship-details,.character-actions label,.character-actions select,.person-gift-bag{grid-column:1/-1}.character-actions>p{font-size:11px;margin:0}.character-actions .button{min-height:44px;padding:8px 9px;margin:0;font-size:12px}.character-actions .small-button{margin:0;min-height:36px;font-size:12px}.character-actions .free-note{font-size:10px;order:2}.friendship-details{margin:0;font-size:11px}.friendship-details summary{min-height:28px}.bond-track{margin:0}.person-gift-bag{margin:5px 0 0}.person-gift-bag h3{font-size:17px}
  body[data-immersion] #notice{left:12px;bottom:calc(var(--hud-bottom) + 7px);max-width:calc(100% - 24px);font-size:9px;padding:4px 8px;pointer-events:none}body[data-immersion=person] #notice,body[data-immersion=place] #notice,body[data-immersion=lesson] #notice,body[data-immersion=game] #notice{display:none}body[data-immersion] #speech-status:not(:empty){right:12px;top:var(--hud-top);font-size:10px;max-width:230px}
  body[data-immersion=lesson] .task-top,body[data-immersion=game] .task-top{left:12px;right:12px;padding:8px 10px;gap:8px}.task-top h1{font-size:17px}.task-top span{font-size:11px}.task-top button{min-height:36px;font-size:11px}
  .task-layout .scene .mimi{left:-10%;width:64%;height:calc(var(--mimi-vh) - 510px);min-height:140px;bottom:calc(var(--hud-bottom) + 305px)}.task-layout .scene .scene-listener{left:auto;right:-6%;width:65%;height:calc(var(--mimi-vh) - 480px);min-height:170px;bottom:calc(var(--hud-bottom) + 305px)}.task-layout .bubble{top:calc(var(--hud-top) + 72px);left:16px;max-width:calc(100% - 32px);font-size:15px;padding:8px 12px}.task-layout .scene-status{display:none}.task-layout .feedback-speech{left:12px;right:12px;width:auto;bottom:calc(var(--hud-bottom) + 248px);max-height:66px;padding:8px 12px}.feedback-speech p{font-size:11px}.feedback-speech .question-label{font-size:10px}.feedback-speech>.muted{display:none}.task-column{top:auto;left:12px;right:12px;bottom:calc(var(--hud-bottom) + 4px);width:auto;height:238px;padding:14px;border-radius:16px}.task-card h2{font-size:17px}.task-card .question-label{font-size:10px}.task-column textarea{min-height:70px;height:70px;font-size:16px;margin-top:4px}.task-column label{font-size:12px}.input-meta{font-size:9px}.submit-actions{gap:6px;margin-top:6px}.submit-actions .button{font-size:12px;min-height:40px;padding:8px 10px}.task-column .last-answer{display:none}.task-column .free-note{font-size:10px}.task-column .task-card{margin-bottom:8px}.task-column .small-button{font-size:10px}
  .play-companion{left:12px;bottom:calc(var(--hud-bottom) + 365px);width:44%;max-width:none}.play-companion .game-actor{height:calc(var(--mimi-vh) - 510px);min-height:150px}.play-companion>div:last-child{padding:6px 10px;font-size:11px}.play-companion>div:last-child p{font-size:10px}.play-board{left:12px;right:12px;top:auto;bottom:calc(var(--hud-bottom) + 4px);height:355px;width:auto;padding:14px;border-radius:16px}.play-instructions{font-size:11px}.play-board #play-rules{font-size:11px;min-height:36px}.play-grid{gap:6px;margin:12px auto}.play-tile{padding:4px;min-height:44px}.play-tile img{height:44px}.memory-grid .play-tile{height:60px}.sequence-icons{gap:6px;margin:10px 0}.sequence-icons img{width:40px;height:40px}.star-grid{gap:6px;margin:10px auto}.star-grid .play-tile{min-height:48px}.star-grid svg{width:28px;height:28px}.difference-pair{gap:8px}.difference-scene{padding:6px}.difference-scene img,.missing-space,.reference-tile{height:36px;min-height:36px}.difference-scene h3{font-size:11px}.garden-flower img{height:110px;width:120px}.target-item img{width:80px;height:80px}.light-grid{gap:6px}.light{width:44px;height:44px}.puzzle-reference{width:80px}.puzzle-grid{width:220px}.play-result{padding:15px 0}
  body.keyboard-open .bottom-nav,body.keyboard-open .app-header,body.keyboard-open .feedback-speech{display:none}body.keyboard-open .task-column{bottom:8px;height:calc(var(--mimi-vh) - 65px)}body.keyboard-open .task-top{top:8px}body.keyboard-open .task-layout .scene .questmon-actor{display:none}body.keyboard-open .task-layout .bubble{display:none}
}
@media(max-height:650px) and (min-width:601px){.character-actions{max-height:calc(var(--mimi-vh) - 180px);bottom:80px}.character-bubble{top:140px}.scene-content{bottom:105px}.resident-family .family-actor{height:110px}.place-story{max-width:280px}.place-story summary{font-size:17px}.play-board,.task-column{top:130px;bottom:80px}.character-stage .character-friend{height:65%;bottom:80px}.character-stage .character-mimi{height:60%;bottom:80px}}
@media(prefers-reduced-motion:reduce){.motion-plane canvas{transition:none}.gift-flight{opacity:1}}
/* Batched viewport corrections: controls and foregrounds have separate safe zones. */
.place-stage .questmon-actor,.scene .questmon-actor,.play-companion .questmon-actor{z-index:2}
.task-column .task-card{color:#fbfcff}.task-column .question-label{color:#a4e9fa}
.play-scene{overflow:hidden}
.task-layout .scene{background-size:cover;background-repeat:no-repeat;background-position:center bottom}
body[data-immersion=place] #notice,body[data-immersion=person] #notice,body[data-immersion=lesson] #notice,body[data-immersion=game] #notice{display:none}
.resident-groups>.empty{background:#17204df0;border-radius:12px;padding:16px 20px;color:#d0d8f2;max-width:600px;font-size:14px}
body[data-immersion=other] .world-heading{position:static;margin:0 0 24px;pointer-events:auto}
body[data-immersion=other] #notice,body[data-immersion=settlement] #notice{position:static;max-width:none;margin:0 0 18px;font-size:12px;pointer-events:auto}
body[data-immersion=map] #notice{top:200px;bottom:auto}
.scene-back{top:calc(var(--hud-top) + 85px)}
.character-bubble{top:calc(var(--hud-top) + 145px)}
.place-stage .place-mimi{bottom:calc(var(--hud-bottom) + 160px);height:55vh}
@media(min-width:601px) and (max-width:1000px){
 .task-layout>.task-column{left:24px;right:24px;top:auto;bottom:var(--hud-bottom);width:auto;height:310px;padding:18px 20px}
 .task-layout .scene .mimi{left:-5%;width:50%;height:calc(var(--mimi-vh) - 620px);bottom:calc(var(--hud-bottom) + 410px)}
 .task-layout .scene .scene-listener{left:auto;right:-3%;width:56%;height:calc(var(--mimi-vh) - 580px);bottom:calc(var(--hud-bottom) + 410px)}
 .task-layout .feedback-speech{left:24px;right:24px;width:auto;bottom:calc(var(--hud-bottom) + 320px);max-height:80px}
 .task-layout .bubble{max-width:calc(100% - 48px)}.task-layout .scene-status{display:none}.task-column textarea{height:90px;min-height:90px}.task-column .free-note{display:none}
 .character-actions{left:24px;right:24px;width:auto;max-height:220px;display:grid;grid-template-columns:1fr 1fr;gap:6px 12px;padding:16px 20px}
 .character-actions h2,.character-actions>p,.character-actions .bond-track,.character-actions .friendship-details,.character-actions label,.character-actions select,.person-gift-bag{grid-column:1/-1}
 .character-actions>p{margin:0;font-size:12px}.character-actions .button{margin:0;min-height:44px}.character-actions .free-note{order:2}.character-actions h2{font-size:23px}
 .character-stage .character-mimi{left:-6%;width:55%;height:calc(var(--mimi-vh) - 520px);bottom:calc(var(--hud-bottom) + 240px)}
 .character-stage .character-friend{left:auto;right:-3%;width:59%;height:calc(var(--mimi-vh) - 470px);bottom:calc(var(--hud-bottom) + 240px)}
 .character-stage .place-caption{bottom:calc(var(--hud-bottom) + 227px)}
}
@media(max-width:600px){
 .task-layout>.task-column{width:auto}
 .task-layout>.task-column{height:310px}.task-layout .feedback-speech{bottom:calc(var(--hud-bottom) + 323px);max-height:60px}
 .task-layout .scene .mimi{height:calc(var(--mimi-vh) - 560px);bottom:calc(var(--hud-bottom) + 384px)}
 .task-layout .scene .scene-listener{height:calc(var(--mimi-vh) - 535px);bottom:calc(var(--hud-bottom) + 384px)}
 .task-column .task-card .question-label{margin-bottom:6px}.task-column .task-card h2{font-size:16px}.task-column textarea{min-height:60px;height:60px}.task-column .free-note{display:none}
 body[data-immersion] .app-header{flex-wrap:nowrap}body[data-immersion] .app-header .brand{flex:0 0 auto}body[data-immersion] .header-actions{width:auto;flex:0 0 auto}
 body[data-immersion=map] #notice{top:156px;bottom:auto;max-width:280px}
 body[data-immersion=person] .world-heading h1{font-size:22px;max-width:245px}body[data-immersion=person] .world-heading p{display:none}
 .scene-back{top:calc(var(--hud-top) + 54px)}.character-bubble{top:calc(var(--hud-top) + 104px)}
 .place-stage .place-mimi{bottom:calc(var(--hud-bottom) + 320px);height:34vh}
 .character-stage .character-mimi{bottom:calc(var(--hud-bottom) + 255px)}.character-stage .character-friend{right:-2%;bottom:calc(var(--hud-bottom) + 255px);width:65%}
 .character-actions{max-height:240px}
}
/* Independent finish review: three corrections, one shared responsive staging budget. */
.task-column>.dimensions{display:flex;gap:12px;margin:12px 0 16px}.task-column>.dimensions .dimension{flex:1;min-width:0;padding:0;background:transparent;border:0}.task-column>.dimensions strong{font-size:13px}.task-column>.dimensions small{font-size:10px}.task-column>.dimensions .dimension>small:first-of-type{display:none}.task-column>.dimensions .dimension-bar{height:7px;margin:6px 0}.task-column>.dimensions .dimension-bar span{transform-origin:left center}
@media(max-width:600px){.task-column>.dimensions{gap:10px;margin:6px 0 9px}.task-column>.dimensions strong{font-size:11px}.task-column>.dimensions small{font-size:9px}.task-column>.dimensions .dimension-bar{margin:4px 0}.task-column #replay-voice{min-height:32px;padding:4px 8px}.task-column .task-card{margin-bottom:5px}}
@media(prefers-reduced-motion:reduce){.task-column>.dimensions .dimension-bar span{transition:none}}
.task-column .task-card{position:relative}.task-column .task-card>.question-label{padding-right:102px;min-height:44px;display:flex;align-items:center}.task-column #replay-voice{position:absolute;right:0;top:0;min-height:44px;padding:6px 10px}
.task-column .task-card{margin-bottom:10px}.task-column>.dimensions{margin:8px 0 10px}.task-column .submit-actions{margin-top:10px}
@media(min-width:601px) and (max-width:1000px){.task-layout>.task-column{height:450px}.task-layout .feedback-speech{bottom:calc(var(--hud-bottom) + 463px);max-height:60px}.task-layout .feedback-speech>.muted{display:none}}
@media(min-width:601px) and (max-width:1000px){
 .character-stage .character-mimi,.character-stage .character-friend{height:clamp(220px,calc(var(--mimi-vh) - 680px),520px)}
 .task-layout .scene .mimi,.task-layout .scene .scene-listener{top:250px;bottom:auto;height:clamp(180px,calc(var(--mimi-vh) - 860px),400px)}
}
@media(max-width:600px){
 body[data-immersion] .app-header{padding:8px 10px;gap:6px}.brand{font-size:22px}.header-actions{gap:4px}.header-actions .icon-button{width:44px;height:44px;flex:0 0 44px}.candy{font-size:10px;padding:6px}
 .world-resume{top:145px;gap:6px;max-width:calc(100vw - 32px)}.world-resume .button{min-height:44px;font-size:11px;padding:8px 10px}
 body[data-immersion] .world-heading>button,.map-footer .small-button,.scene-back,.scene-activity .button,.scene-activity .small-button,.character-actions .small-button,.task-top button,.play-board #play-rules,.task-column .small-button{min-height:44px;min-width:44px}
 .places-drawer summary,.friendship-details summary,.character-actions select{min-height:44px}
 .world-home .map-footer{bottom:calc(var(--hud-bottom) + 82px)}
 .character-stage .character-mimi,.character-stage .character-friend{height:280px;min-height:0;max-height:none}
 .play-companion{top:calc(var(--hud-top) + 65px);bottom:auto;left:12px;width:calc(100% - 24px);flex-direction:row;align-items:center;gap:12px}
 .play-companion .game-actor{width:54%;height:clamp(100px,calc(var(--mimi-vh)*.58 - 230px),250px);min-height:0;flex-shrink:0}
 .play-companion>div:last-child{width:calc(46% - 12px);min-width:0}.play-board{height:min(355px,calc(var(--mimi-vh)*.42))}
 :root{--lesson-panel-h:min(380px,calc(var(--mimi-vh)*.45))}
 .task-layout>.task-column{height:var(--lesson-panel-h)}.task-layout .feedback-speech{bottom:calc(var(--hud-bottom) + var(--lesson-panel-h) + 13px)}
 .task-layout .scene .mimi,.task-layout .scene .scene-listener{top:calc(var(--hud-top) + 120px);bottom:auto;height:max(90px,calc(var(--mimi-vh) - var(--hud-bottom) - var(--lesson-panel-h) - 260px));min-height:0}
 .task-layout .scene .mimi{width:52%;left:0}.task-layout .scene .scene-listener{width:55%;right:0}
}
/* Keep the film subject large in portrait and reserve the actual controls below it. */
.cinema-celebration{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:24px 24px calc(var(--cinema-control-space,100px) + 24px);background:#080b26b8;backdrop-filter:blur(8px)}
.cinema-celebration .friendship-embrace{width:min(calc(100vw - 24px),1000px);height:min(46dvh,540px)}
.cinema-celebration .friendship-embrace .questmon-actor{width:72%;height:100%;margin-inline:-11%}
.cinema-celebration .friendship-embrace .actor-bulb{top:10%;right:24%}
.cinema-celebration h2{margin:24px 0 0;max-width:90vw}
.cinema-controls button{min-height:44px}
.mimi-cinema video{height:calc(100% - var(--cinema-control-space,104px))}
@media(max-aspect-ratio:1/1){.mimi-cinema video{height:calc(100% - var(--cinema-control-space,104px));object-fit:cover}.cinema-controls{padding-bottom:calc(16px + env(safe-area-inset-bottom))}}
.craft-result-stage{position:relative;width:min(92vw,850px);height:min(48dvh,480px);display:flex;align-items:center;justify-content:center;gap:12px}
.craft-result-stage .questmon-actor{width:58%;height:100%;margin:0}
.craft-result-gift{width:36%;max-width:280px;filter:drop-shadow(0 12px 22px #120f2866);animation:craft-gift-reveal 900ms cubic-bezier(.16,1,.3,1) both}
.craft-result-gift img{width:100%;height:auto;max-height:32dvh;object-fit:contain}
@keyframes craft-gift-reveal{from{transform:translateY(32px) scale(.72);filter:drop-shadow(0 4px 8px #120f2822) blur(5px)}to{transform:translateY(0) scale(1);filter:drop-shadow(0 12px 22px #120f2866) blur(0)}}
@media(prefers-reduced-motion:reduce){.craft-result-gift{animation:none}}

/* The answer box, hints and Send always stay in view; only the question and feedback above them
   scroll. Previously the form ran below the panel on laptop screens and Send was hidden. */
.task-column #explanation{position:sticky;bottom:0;z-index:2;margin:0 -4px;padding:14px 4px 4px;background:linear-gradient(#17204d00,#17204d 18px)}
@media (max-height:860px){.task-column textarea{min-height:84px}.task-column .task-card h2{font-size:22px}}
/* Character page: Mimi's speech bubble sits above her and is never covered by her head. Mimi is
   capped to the space under the bubble. */
.character-bubble{z-index:4}
@media(min-width:601px){.character-stage .character-mimi{height:min(68%,calc(var(--mimi-vh) - var(--hud-top) - var(--hud-bottom) - 145px))}}
/* Map: the zoom buttons sit on the right edge, clear of the place labels along the bottom. */
@media(min-width:601px){.world-home #map-fit,.world-home #map-close{position:fixed;z-index:5;right:28px;width:168px;justify-content:center}.world-home #map-fit{top:calc(50% - 52px)}.world-home #map-close{top:calc(50% + 2px)}}
@media (max-height:860px) and (min-width:601px){.task-column #question{font-size:21px}.task-card .belief{font-size:16px;padding:10px 14px}}
@media(max-width:600px){.task-card .belief{font-size:14px;line-height:1.4;padding:8px 12px;margin:4px 0 6px}.task-column #question{font-size:16px}.task-column #explanation{padding-top:10px}.task-column .free-note{display:none}.task-card .teach-ask{display:none}}
@media(max-width:600px){.task-column #explanation>label{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}.task-column textarea{min-height:58px;height:58px}}
.task-column #explanation .hint{margin-bottom:10px;padding:10px 14px;font-size:15px;line-height:1.4}
@media(max-width:600px){.task-column #explanation .hint{font-size:13px;padding:8px 10px;margin-bottom:6px}}
.submit-actions .primary{white-space:nowrap}

/* Keep the village visible; actions and dialogue occupy their own space. */
.world-resume{position:fixed;z-index:6;top:var(--hud-top);left:24px;display:flex;gap:8px}
.world-home .map-footer{gap:6px}
.world-home .map-footer button{font-size:24px;min-width:44px;min-height:44px}
.places-drawer{width:200px}
.bottom-nav{gap:12px}
.candy{font-size:11px}
.map-place-count{font-size:11px}
.primary{box-shadow:0 5px 18px #00000048}
.settlement{box-shadow:0 12px 28px #00000055}
.resident-family{cursor:pointer;color:#fff;background:transparent;font:inherit;min-height:44px}
.resident-family:hover .family-actor{transform:translateY(-4px)}
.resident-name{background:#17204deb;padding:6px 12px;border-radius:12px;font-weight:600}
.new-friend{font-size:12px;color:#b8f0e1;line-height:1.4}
.resident-family .new-friend{padding:4px 8px;background:#17204deb;border-radius:8px;margin-top:4px}
.scene-activity{display:flex;flex-wrap:wrap;gap:8px;width:auto;max-width:310px;padding:12px}
.scene-activity .button{width:auto}
.place-stage .place-mimi{bottom:calc(var(--hud-bottom) + 135px);height:46vh}
.character-actions{width:300px;max-height:52vh}
.character-actions>.full{width:100%;margin-top:12px}
.friend-facts{display:flex;align-items:center;justify-content:space-between;font-size:13px;gap:12px}
.friend-facts span:last-child{text-transform:capitalize;color:#d0d8f2}
.friend-tools{display:flex;gap:6px;flex-wrap:wrap;margin-top:8px}
.friend-tools button{flex:1;min-height:44px;padding:6px}
.person-gift-bag{max-height:240px;overflow:auto}
body.is-teaching .bottom-nav{display:none}
body.is-settled .bottom-nav{display:none}
#main [hidden]{display:none!important}
body.is-teaching #speech-status{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.task-layout .bubble,.task-layout .scene-status{display:none}
.task-layout .feedback-speech>.muted{display:none}
.lesson-feedback{margin:12px 0;font-size:12px}
.lesson-feedback summary{cursor:pointer;min-height:36px;display:flex;align-items:center;color:#b5c9e9}
.lesson-feedback .last-answer{display:block}
.task-card .belief{font-size:17px;margin:8px 0;line-height:1.4}
.task-card #replay-voice{min-height:36px;min-width:44px;margin:8px 0 0}
.task-card #replay-voice svg{width:18px;height:18px}
.task-column #voice-help:empty{display:none}
.task-column .input-meta{margin:4px 0}
.task-column #send{min-width:100px}
.mimi-album{max-width:1060px;margin:auto}
.mimi-album .world-heading{position:static;display:flex;align-items:center;justify-content:space-between;margin-bottom:24px}
.mimi-album .dex-index{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:14px}
.mimi-album .dex-slot{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:space-between;gap:6px;border:1px solid #718ac044;border-radius:16px;background:#17204d;color:#eff5ff;padding:10px;cursor:pointer;min-width:0;font:inherit;box-shadow:0 5px 12px #00000033}
.mimi-album .dex-slot img{width:100%;height:auto;aspect-ratio:2/3;object-fit:contain}
.mimi-album .dex-slot.missing img{opacity:.18;filter:grayscale(1)}
.mimi-album .dex-slot.missing strong{color:#a9b8d1}
.mimi-album .dex-slot strong{font-size:12px;line-height:1.25;min-height:30px;text-align:center}
.mimi-album .dex-number{position:absolute;top:8px;left:9px;color:#a9b8d1;font-size:11px}
.mimi-album .dex-slot[aria-current=true]{outline:3px solid #a4e9fa;outline-offset:3px}
.mimi-album .dex-slot:hover{border-color:#a4e9fa}
.album-friends{display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding:24px 0}
.album-friend{display:grid;justify-items:center;background:#17204d;border:1px solid #718ac044;border-radius:16px;padding:12px;color:#eff5ff;cursor:pointer;font:inherit}
.album-friend .album-actor{width:140px;height:140px}
.album-friend>span{font-size:13px;margin-top:8px}
.craft-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:24px}
.craft-heading h1{font-size:clamp(24px,4vw,36px)}
.friendship-celebration{position:relative;width:min(460px,82vw);height:320px;margin:20px auto;display:grid;place-items:center;isolation:isolate}
.friendship-celebration::before{content:'';position:absolute;width:240px;height:240px;border:3px solid #b9efff;border-radius:50%;background:#26305e;box-shadow:0 0 40px #82ddeb55;animation:mimi-friend-circle 950ms cubic-bezier(.16,1,.3,1) both}
.friendship-celebration .celebration-friend{width:280px;height:280px;z-index:1;animation:mimi-friend-arrive 700ms cubic-bezier(.16,1,.3,1) both}
.friendship-celebration .celebration-mimi{position:absolute;left:-5%;bottom:0;width:170px;height:170px;z-index:2}
.settlement .settlement-details{display:block;max-width:660px;margin:auto}
.settlement .settlement-ribbon{margin-bottom:18px}
.settlement .settlement-details>details{margin:18px 0;text-align:left}
.settlement .settlement-details>details>summary{cursor:pointer;min-height:44px;display:flex;align-items:center;justify-content:center}
@keyframes mimi-friend-circle{from{transform:scale(.5);opacity:0}to{transform:scale(1);opacity:1}}
@keyframes mimi-friend-arrive{from{transform:translateY(24px) scale(.85);opacity:0}to{transform:translateY(0) scale(1);opacity:1}}
@media(max-width:1000px){
 body.is-teaching .task-layout{position:absolute;top:calc(var(--hud-top) + 58px);bottom:12px;left:12px;right:12px;display:grid;grid-template-rows:minmax(90px,1fr) auto;gap:10px}
 body.is-teaching .task-layout .stage-column{position:relative;min-height:0;height:100%;align-self:stretch;overflow:hidden}
 body.is-teaching .task-layout .scene{position:absolute;inset:0;height:100%;background:transparent!important}
 body.is-teaching .task-layout:before{content:'';position:fixed;z-index:-1;inset:0;background:linear-gradient(#171e5044,#171e50aa),var(--lesson-image) center bottom/cover}
 body.is-teaching .task-layout .scene .mimi{top:auto;left:8%;bottom:58px;width:40%;height:calc(100% - 58px);min-height:0;max-height:300px}
 body.is-teaching .task-layout .scene .scene-listener{top:auto;left:auto;right:7%;bottom:58px;width:48%;height:calc(100% - 58px);min-height:0;max-height:320px}
 body.is-teaching .task-layout .feedback-speech{position:absolute;left:0;right:0;bottom:0;width:auto;max-height:58px;padding:8px 12px;background:#17204df5}
 body.is-teaching .task-column{position:relative;inset:auto;width:100%;height:auto;max-height:min(58dvh,480px);overflow:auto;padding:16px;margin:0}
 body.is-teaching .task-top{left:12px;right:12px;top:var(--hud-top);padding:6px 10px;height:46px}
 body.is-teaching .task-top h1{font-size:17px;line-height:1.2}
 body.is-teaching .task-card h2{font-size:18px;line-height:1.35}
 body.is-teaching .task-card .belief{font-size:14px}
 body.is-teaching .task-column textarea{height:76px;min-height:76px}
 body.is-teaching .feedback-speech .question-label{font-size:11px;margin:0}
 body.is-teaching .feedback-speech p{font-size:12px;line-height:1.35}
 body.is-teaching .task-column .submit-actions{margin-top:8px;gap:8px}
 body.is-teaching .task-column .free-note{font-size:11px}
 body.is-teaching .task-column .input-meta,body.is-teaching .task-column .small-button,body.is-teaching .task-card .question-label{font-size:11px}
}
@media(max-width:600px){
 .world-resume{left:12px;top:var(--hud-top)}
 .world-home .map-footer{left:12px;bottom:calc(var(--hud-bottom) + 8px)}
 .places-drawer{left:auto;right:12px;width:160px;bottom:calc(var(--hud-bottom) + 8px)}
 .places-drawer[open]{width:calc(100% - 24px)}
 .world-heading h1{font-size:22px}
 .scene-back{top:calc(var(--hud-top) + 48px)}
 .place-stage .place-mimi{bottom:calc(var(--hud-bottom) + 180px);height:35vh;width:60vw;right:0;max-height:300px}
 .scene-content{bottom:calc(var(--hud-bottom) + 4px)}
 .scene-activity{position:static;max-width:none;background:transparent;padding:4px 0;justify-content:center}
 .resident-family{flex-basis:130px}
 .resident-family .family-actor{width:130px;height:130px}
 .resident-name{font-size:13px}
 .character-bubble{top:calc(var(--hud-top) + 102px);font-size:14px;max-width:calc(100% - 32px)}
 .character-stage .character-mimi{left:-5%;width:53%;height:calc(var(--mimi-vh) - 420px);min-height:100px;max-height:360px;bottom:calc(var(--hud-bottom) + 160px)}
 .character-stage .character-friend{right:-1%;width:58%;height:calc(var(--mimi-vh) - 390px);min-height:130px;max-height:390px;bottom:calc(var(--hud-bottom) + 160px)}
 .character-actions{display:block;max-height:160px;width:auto;padding:12px 14px}
 .character-actions .friend-facts{font-size:12px}
 .character-actions .bond-track{margin:6px 0}
 .character-actions .full{margin-top:8px;font-size:14px}
 .character-actions .friend-tools{margin-top:6px}
 .character-actions .friend-tools button{font-size:12px}
 .character-actions:has(.person-gift-bag){max-height:42vh}
 .mimi-album .dex-index{grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
 .mimi-album .dex-slot{padding:8px;border-radius:12px}
 .mimi-album .dex-slot strong{font-size:11px}
 .friendship-celebration{height:280px}
 .friendship-celebration .celebration-friend{width:240px;height:240px}
 .friendship-celebration .celebration-mimi{width:130px;height:130px;left:0}
 body.keyboard-open.is-teaching .task-layout{top:60px;bottom:8px;grid-template-rows:0 minmax(0,1fr);gap:0}
 body.keyboard-open.is-teaching .stage-column{display:none}
 body.keyboard-open.is-teaching .task-column{max-height:none;height:100%}
 body.keyboard-open.is-teaching .task-top{top:8px}
}

@media(prefers-reduced-motion:reduce){.friendship-celebration::before,.friendship-celebration .celebration-friend{animation:none}.resident-family:hover .family-actor{transform:none}}

/* One reading region; the composer occupies its own row, even with an open hint. */
body.is-teaching .task-column{display:grid;grid-template-rows:minmax(0,1fr) auto;overflow:hidden;gap:12px}
body.is-teaching .lesson-reading{min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable;overflow-wrap:anywhere;padding-right:4px;scroll-padding:8px}
body.is-teaching #explanation{position:static;bottom:auto;margin:0;padding:0;background:transparent;min-width:0}
body.is-teaching .task-card{position:relative;padding-right:44px;margin:0 0 12px}
body.is-teaching .task-card h2{font-size:20px;line-height:1.45;overflow-wrap:anywhere}
body.is-teaching .task-card #replay-voice{position:absolute;right:0;top:0;margin:0}
body.is-teaching .hint{margin:10px 0;padding:12px;max-height:none;overflow:visible}
body.is-teaching .hint p{line-height:1.5;margin:6px 0 0;overflow-wrap:anywhere}
body.is-teaching .feedback-speech:has(p:empty){display:none}
body.is-teaching #voice-help{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
body.is-teaching .task-layout .scene{overflow:hidden}
/* Portraits are intentionally framed at the torso; faces remain above the dialogue. */
body.is-teaching .task-layout .scene .mimi{width:42%;height:95%;bottom:-22%;left:-4%;max-height:none}
body.is-teaching .task-layout .scene .scene-listener{width:52%;height:110%;bottom:-28%;left:23%;max-height:none}
body.is-teaching .scene [data-tier="3"],body.is-teaching .scene [data-tier="4"]{scale:1.5;transform-origin:50% 25%}
body.is-teaching .scene .questmon-actor>.creature-motion,body.is-teaching .scene .questmon-actor>.actor-source{transform:scale(1.4);transform-origin:50% 15%}
.character-portraits{position:absolute;left:0;right:0;top:calc(var(--hud-top) + 170px);bottom:var(--hud-bottom);overflow:hidden}
.character-stage .character-portraits .character-mimi{height:115%;max-height:none;bottom:-38%;width:42%;left:-4%}
.character-stage .character-portraits .character-friend{height:125%;max-height:none;bottom:-43%;width:52%;left:22%}
.character-portraits [data-tier="3"],.character-portraits [data-tier="4"]{scale:1.5;transform-origin:50% 25%}
.character-portraits .questmon-actor>.creature-motion,.character-portraits .questmon-actor>.actor-source{transform:scale(1.25);transform-origin:50% 15%}
/* Q33's coiled body puts its face at the right edge of the source art. */
body.is-teaching .scene .mimi,.character-portraits .character-mimi{z-index:3}
body.is-teaching .task-layout .scene .scene-listener[data-character="Q33"]{left:5%}
.character-stage .character-portraits .character-friend[data-character="Q33"]{left:4%}
@media(max-width:1000px){
 body.is-teaching .task-layout{grid-template-rows:minmax(74px,1fr) min(62dvh,480px);gap:10px}
 body.is-teaching .task-column{height:100%;max-height:none;padding:12px;gap:8px}
 body.is-teaching .task-card h2{font-size:17px;line-height:1.45}
 body.is-teaching .task-column textarea{height:64px;min-height:64px;max-height:100px;resize:none;font-size:16px;margin:0}
 body.is-teaching .task-layout .scene{height:auto;bottom:0}
 body.is-teaching .task-layout .scene .mimi{left:-8%;width:58%;height:150%;bottom:-55%;max-height:none}
 body.is-teaching .task-layout .scene .scene-listener{left:auto;right:-7%;width:66%;height:160%;bottom:-60%;max-height:none}
 body.is-teaching .task-layout .scene .scene-listener[data-character="Q33"]{left:auto;right:20%}
 body.is-teaching .feedback-speech{max-height:48px}
 body.is-teaching .submit-actions{min-height:44px}
 .character-portraits{bottom:calc(var(--hud-bottom) + 164px)}
 .character-stage .character-portraits .character-mimi{width:58%;height:150%;bottom:-55%;left:-8%}
 .character-stage .character-portraits .character-friend{width:66%;height:160%;bottom:-60%;left:auto;right:-7%}
 .character-stage .character-portraits .character-friend[data-character="Q33"]{left:auto;right:20%}
}
@media(max-height:500px) and (max-width:1000px){
 body.is-teaching .task-layout{grid-template-columns:minmax(100px,.7fr) minmax(0,1.3fr);grid-template-rows:minmax(0,1fr)}
 body.is-teaching .task-column textarea{height:52px;min-height:52px}
}
@media(max-width:600px){
 body.keyboard-open.is-teaching .task-layout{grid-template-columns:1fr;grid-template-rows:0 minmax(0,1fr)}
}

/* Controls and conversation captions leave room for the village. */
.year-control select{min-height:44px;width:94px;padding:8px 6px;border:1px solid #718ac0;border-radius:10px;background:#17204d;color:#eff5ff;font:inherit;font-size:14px;cursor:pointer}
.year-control select:focus-visible{outline:3px solid #a4e9fa;outline-offset:3px}
.year-control select:disabled{opacity:.55;cursor:wait}
.social-lines{list-style:none;margin:0;padding:0;text-align:left}
.social-lines li+li{margin-top:14px}
.social-lines strong{display:block;font-size:12px;color:#52637b;line-height:1.4}
.social-lines p{margin:4px 0 0;line-height:1.5}
.social-lines .is-speaking strong{color:#183f75}
.character-bubble:has(.social-lines){max-height:min(32dvh,240px);overflow:auto;overscroll-behavior:contain;scrollbar-color:#7b7cb4 #eeeafa}
.person-chat-invite{margin-top:12px}
.person-chat-invite label{display:block;font-size:14px;margin-bottom:6px}
.person-chat-invite select{width:100%;font:inherit}
.person-chat-invite button{margin-top:8px;min-height:44px;width:100%}
@media(max-width:600px){
 .year-control select{width:84px;font-size:13px}
 .character-actions{max-height:216px}
 .character-actions:has(.person-chat-invite){max-height:42dvh}
 .character-portraits{bottom:calc(var(--hud-bottom) + 220px)}
 .character-bubble:has(.social-lines){max-height:min(24dvh,180px);padding:12px 14px}
 body.is-teaching .task-layout .scene .mimi{left:4%;bottom:20px;width:40%;height:78%;max-height:190px}
 body.is-teaching .task-layout .scene .scene-listener{left:auto;right:4%;bottom:20px;width:46%;height:85%;max-height:205px}
 body.is-teaching .scene [data-tier="3"],body.is-teaching .scene [data-tier="4"]{scale:1}
 body.is-teaching .scene .questmon-actor>.creature-motion,body.is-teaching .scene .questmon-actor>.actor-source{transform:scale(1);transform-origin:center}
 body.is-teaching .task-layout .scene .scene-listener[data-character="Q33"]{right:8%}
}
@media(max-width:360px){body[data-immersion] .app-header{padding-inline:6px;gap:2px}body[data-immersion] .app-header .brand{font-size:18px}body[data-immersion] .header-actions{gap:0}}

/* Dialogue shares the controls panel; it never floats across a character's face. */
.character-actions .character-bubble{position:static;transform:none;max-width:none;width:100%;max-height:180px;overflow:auto;margin:0 0 12px;padding:12px 14px;font-size:15px;text-align:left;color:#24334d;background:#fff7e9;border-radius:14px}
.character-actions:has(.person-chat-compose) .person-main-actions,.character-actions:has(.person-chat-compose) .friend-tools,.character-actions:has(.person-chat-compose) .free-note,.character-actions:has(.person-chat-compose) #person-befriend{display:none}
.person-chat-compose{margin-top:10px}.person-chat-compose label{display:block;font-size:14px;margin-bottom:6px}
.person-chat-compose textarea{width:100%;min-height:56px;max-height:110px;resize:vertical;font:inherit;font-size:16px;border-radius:10px;padding:8px 10px;background:#fffaf0;color:#24334d}
.casual-controls{display:flex;gap:8px;align-items:center}.casual-controls>*{flex:1}
.chat-progress{font-size:12px;line-height:1.5;margin:8px 0;color:#cfe1f7}
.character-actions #casual-memories{min-height:36px;margin-top:0}
.shared-memory-dialog{max-width:500px;max-height:80dvh}.shared-memory-dialog ul{list-style:none;padding:0;max-height:50dvh;overflow:auto}.shared-memory-dialog li{display:flex;gap:12px;align-items:center;justify-content:space-between;margin:12px 0;line-height:1.5}.shared-memory-dialog li span{overflow-wrap:anywhere}
.scene-content>section{position:relative}.ambient-chat-bubble{position:absolute;top:-46px;left:20%;z-index:6;border:2px solid #dbc5a4;border-radius:18px;background:#fff8e9;color:#24334d;min-height:44px;min-width:64px;padding:8px 14px;font-size:20px;cursor:pointer;box-shadow:0 4px 12px #17204d55}
.ambient-chat-bubble:focus-visible{outline:3px solid #a4e9fa;outline-offset:4px}
.ambient-dialogue{position:absolute;z-index:7;top:calc(var(--hud-top) + 72px);left:24px;width:min(480px,calc(100% - 48px));max-height:35dvh;overflow:auto;border-radius:16px;background:#fff8e9;color:#24334d;padding:14px 18px;box-shadow:0 8px 20px #17204d55}
.ambient-dialogue button{margin-top:10px;color:#fff;background:#213169}
@media(max-width:1000px){
 .character-portraits{top:calc(var(--hud-top) + 105px);bottom:calc(var(--hud-bottom) + 282px)}
 .character-stage .character-portraits .character-mimi{height:95%;max-height:300px;bottom:0;left:0;width:48%;min-height:0}
 .character-stage .character-portraits .character-friend{height:100%;max-height:320px;bottom:0;right:0;left:auto;width:52%;min-height:0}
 .character-portraits [data-tier]{scale:1}.character-portraits .questmon-actor>.creature-motion,.character-portraits .questmon-actor>.actor-source{transform:scale(1);width:100%;height:100%;left:0;top:0}
 .character-actions{display:block;max-height:268px;padding:12px 14px}
 .character-actions:has(.person-chat-compose){max-height:min(46dvh,390px)}
 .character-layout:has(.person-chat-compose) .character-portraits{bottom:calc(var(--hud-bottom) + min(46dvh,390px) + 10px)}
 .character-actions .character-bubble{max-height:120px;font-size:14px;margin-bottom:8px}
 .character-actions .friend-facts{margin:0;font-size:11px}
 .character-actions .bond-track{margin:4px 0}
 .character-actions .casual-controls button{font-size:13px;min-height:44px}
}

@media(max-width:600px){
 body.keyboard-open[data-immersion=person] .bottom-nav{display:none}
 body.keyboard-open[data-immersion=person] .character-actions{top:calc(var(--hud-top) + 106px);bottom:8px;max-height:none;overflow:auto}
 body.keyboard-open[data-immersion=person] .character-actions .character-bubble{max-height:48px;font-size:13px;padding:8px 10px;margin-bottom:6px}
 body.keyboard-open[data-immersion=person] .character-actions .friend-facts,body.keyboard-open[data-immersion=person] .character-actions .bond-track,body.keyboard-open[data-immersion=person] .chat-progress,body.keyboard-open[data-immersion=person] #casual-memories{display:none}
 body.keyboard-open[data-immersion=person] .person-chat-compose{margin:0}
 body.keyboard-open[data-immersion=person] .person-chat-compose textarea{height:48px;min-height:48px;resize:none}
 body.keyboard-open[data-immersion=person] .character-portraits{top:calc(var(--hud-top) + 45px);bottom:auto;height:54px;left:48%;right:5%}
}

/* Voice-first companion conversation. Preserve the learning action above it. */
#sound{width:auto;flex-shrink:0;display:inline-flex;align-items:center;gap:5px;padding:7px 9px;white-space:nowrap}
#sound span{font-size:12px;font-weight:600}
#sound[data-muted=true]{background:#fff3d4;color:#26314e}
.social-icon-tools{display:grid;grid-template-columns:repeat(4,minmax(44px,1fr));gap:10px;margin:12px 0}
.social-icon-tools .icon-button{width:100%;min-height:48px}
.social-icon-tools svg{width:24px;height:24px}
.social-icon-tools button:disabled{opacity:.4}
.character-actions:has(.person-chat-compose) #person-hello{display:none}
.casual-voice{display:flex;align-items:center;gap:10px}
.voice-record{display:inline-flex;align-items:center;justify-content:center;gap:10px;min-height:48px;flex:1;touch-action:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}
.voice-record svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.voice-record.recording{background:#9d3645;color:#fff}
.voice-input-status{font-size:13px;line-height:1.5;color:#e5eaf7;margin:8px 0;overflow-wrap:anywhere}
.voice-input-status:empty{display:none}
.casual-type{margin:8px 0}.casual-type summary{cursor:pointer;min-height:44px;display:flex;align-items:center;text-decoration:underline;text-underline-offset:4px;color:#d2e3fc}
.casual-type[open] summary{min-height:32px}
.character-layout.is-chatting .character-mimi{display:none}
.character-layout.is-chatting .character-portraits{left:2%;right:40%;top:calc(var(--hud-top) + 120px);bottom:var(--hud-bottom)}
.character-layout.is-chatting .character-friend{left:0;right:auto;width:100%;height:135%;bottom:-40%;max-height:none;z-index:4}
.character-layout.is-chatting .character-friend[data-character=Q33]{left:-12%}
.character-layout.is-chatting .questmon-actor>.creature-motion,.character-layout.is-chatting .questmon-actor>.actor-source{transform:scale(1.25);transform-origin:50% 15%}
@media(max-width:1000px){
 .character-layout.is-chatting .character-portraits{left:5%;right:5%;top:calc(var(--hud-top) + 90px);bottom:calc(var(--hud-bottom) + min(42dvh,340px));overflow:hidden}
 .character-layout.is-chatting .character-friend{left:4%;width:92%;height:155%;bottom:-60%;max-height:none}
 .character-actions:has(.person-chat-compose){max-height:min(49dvh,420px)}
 #sound{padding:6px;gap:3px}#sound svg{width:18px}#sound span{font-size:10px}
}

@media(max-width:600px){
 .character-layout.is-chatting .character-portraits{top:calc(var(--hud-top) + 64px);bottom:calc(var(--hud-bottom) + min(42dvh,340px))}
 .character-actions:has(.person-chat-compose){max-height:min(42dvh,340px)}
 body[data-immersion]{--hud-top:calc(112px + env(safe-area-inset-top))}
 body[data-immersion] .app-header{flex-wrap:wrap;gap:6px;padding-bottom:8px}body[data-immersion] .app-header .header-actions{flex:0 0 100%;width:100%;justify-content:space-between;gap:4px}
 body[data-immersion] .app-header .header-actions .icon-button{min-width:44px;min-height:44px;width:44px;flex:0 0 44px}
 body[data-immersion] .app-header #sound{width:auto;min-width:82px;flex:0 0 auto;padding:6px 9px}
 body[data-immersion] .app-header #sound span{font-size:12px}
 .character-actions:not(:has(.person-chat-compose)){max-height:310px}
 .social-icon-tools{margin:8px 0;gap:8px}
 body.keyboard-open[data-immersion=person] .character-layout.is-chatting .character-portraits{top:calc(var(--hud-top) + 52px);bottom:auto;height:70px;left:56%;right:0}
}
/* Fit the visible character to the space beside/before the actual conversation
   panel. Alpha-fitted motion already normalizes all 36 silhouettes; tier zoom
   and negative bottom offsets must not crop heads or stretch a tablet portrait. */
.character-layout .character-stage .character-portraits{left:20px;right:auto;top:var(--portrait-top,calc(var(--hud-top) + 110px));bottom:auto;width:var(--portrait-width,calc(100% - 395px));height:var(--portrait-height,calc(var(--mimi-vh) - var(--hud-top) - var(--hud-bottom) - 110px));display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:stretch;overflow:visible;gap:8px}
.character-layout.is-chatting .character-stage .character-portraits{grid-template-columns:minmax(0,1fr)}
.character-layout .character-stage .character-portraits .questmon-actor{position:relative;inset:auto;width:100%;height:100%;min-height:0;max-height:none;scale:1;transform:none;transform-origin:center}
.character-layout .character-stage .character-portraits .questmon-actor>.creature-motion,.character-layout .character-stage .character-portraits .questmon-actor>.actor-source{inset:0;width:100%;height:100%;object-fit:contain;object-position:center;transform:none}
@media(min-width:701px){
 .character-layout .character-actions{left:auto;right:20px;width:min(360px,42vw);bottom:var(--hud-bottom);max-height:calc(var(--mimi-vh) - var(--hud-top) - var(--hud-bottom) - 110px)}
}
@media(max-width:700px){
 .character-layout .character-actions{left:12px;right:12px;width:auto;bottom:calc(var(--hud-bottom) + 4px);max-height:min(42dvh,max(150px,calc(var(--mimi-vh) - var(--hud-top) - var(--hud-bottom) - 240px)))}
 .character-layout .character-stage .character-portraits{width:var(--portrait-width,calc(100% - 40px));height:var(--portrait-height,25dvh)}
 body.keyboard-open[data-immersion=person] .character-layout .character-stage .character-portraits{display:none}
}

/* The lesson heading belongs to its panel, alongside persistent reading controls. */
body.is-teaching .task-column{grid-template-rows:auto minmax(0,1fr) auto;top:var(--hud-top)}
body.is-teaching .task-column .task-top{position:static;inset:auto;height:auto;margin:0;padding:0 0 8px;background:transparent;border-radius:0;display:flex;flex-wrap:wrap;gap:8px;border-bottom:1px solid #718ac044}
body.is-teaching .task-top h1{flex:1;min-width:0;font-size:20px;line-height:1.25}
body.is-teaching .task-top #lesson-back{order:-1}
body.is-teaching .task-top .word-help-toolbar{order:1;flex-basis:100%;margin:0;color:#eff5ff}
body.is-teaching .task-top .word-help-note{color:#b5c9e9}
:is(.task-top,.character-bubble,.ambient-dialogue) .word-help-words{color:#a4e9fa}
.character-bubble .word-help-toolbar,.ambient-dialogue .word-help-toolbar{position:sticky;top:0;margin:0 0 12px;padding:4px 0;background:inherit}
@media(max-width:1000px){body.is-teaching .task-layout{top:var(--hud-top)}body.is-teaching .task-column{top:auto}body.is-teaching .task-top h1{font-size:17px}}
@media(max-width:600px){body.keyboard-open.is-teaching .task-layout{top:8px}body.is-teaching .task-top h1{font-size:16px}}

.character-bubble .word-help-words{color:#1552c6}

/* Keep Teach and conversation controls without a screen-wide header strip. */
body:is(.is-teaching,[data-immersion=person]) .app-header{background:none}

.person-main-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;grid-column:1/-1}
.person-main-actions .button{width:100%;min-width:0}

/* The same card artwork and flip behaviour as Candi, inside Mimi's quiet HUD. */
.app-header .brand { display:inline-flex; align-items:baseline; gap:6px; white-space:nowrap; }
.app-header .brand strong { display:inline; font-size:.65em; }
.questmon-card-dialog,.gift-discovery-dialog { color:var(--ink); background:var(--panel-dark); border:1px solid var(--line); border-radius:20px; padding:18px; width:min(410px,calc(100vw - 24px)); max-height:calc(100dvh - 28px); overflow:auto; }
.questmon-card-dialog::backdrop,.gift-discovery-dialog::backdrop { background:#080d28c9; }
.questmon-card-dialog header,.gift-discovery-dialog header { display:flex; gap:12px; align-items:center; justify-content:space-between; margin-bottom:14px; }
.questmon-card-dialog h2,.gift-discovery-dialog h2 { margin:0; font-size:22px; }
.questmon-card-dialog .icon-button,.gift-discovery-dialog .icon-button { flex:0 0 44px; width:44px; height:44px; }
.questmon-card-dialog svg,.gift-discovery-dialog svg { width:22px; fill:none; stroke:currentColor; stroke-width:1.8; }
.card-dialog-art { width:min(330px,100%); margin:0 auto; }
.card-dialog-bond { display:flex; align-items:center; gap:14px; margin:20px 0; }
.card-dialog-bond progress { flex:1; min-width:0; accent-color:var(--cyan); height:8px; }
.card-copy-picker { display:grid; gap:6px; margin-bottom:12px; }
.card-copy-picker select { width:100%; }
.questmon-card-dialog [data-meet-card] { width:100%; }
.mimi-inventory { max-width:1000px; margin:auto; }
.inventory-currencies { display:flex; gap:32px; flex-wrap:wrap; padding:18px 0 24px; border-bottom:1px solid var(--line); }
.inventory-currencies>div { display:flex; gap:12px; align-items:center; }
.inventory-currencies strong { color:var(--cyan); font-size:25px; font-variant-numeric:tabular-nums; }
.inventory-currencies small { color:var(--muted); }
.inventory-category h2 { font-size:20px; margin:26px 0 14px; }
.inventory-grid { display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:14px; }
.inventory-item { position:relative; display:flex; flex-direction:column; align-items:center; gap:8px; border:0; background:transparent; color:var(--ink); cursor:pointer; font:inherit; padding:8px 0; min-width:0; }
.inventory-item img { width:100%; aspect-ratio:1; object-fit:contain; }
.inventory-item>span { font-size:13px; line-height:1.4; text-align:center; overflow-wrap:anywhere; }
.inventory-quantity { position:absolute; right:3px; top:3px; min-width:25px; padding:3px 7px; border-radius:8px; background:var(--panel-dark); color:var(--cyan); font-variant-numeric:tabular-nums; }
.inventory-item:hover { color:var(--cyan); }
.inventory-item:focus-visible { outline:2px solid var(--cyan); outline-offset:3px; border-radius:10px; }
.discovery-gift { display:block; width:180px; height:180px; object-fit:contain; margin:0 auto; }
.discovery-count { text-align:center; color:var(--muted); }
.gift-discovery-dialog h3 { font-size:17px; margin:24px 0 12px; }
.discovery-friends { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; align-items:start; }
.discovery-friend { min-width:0; text-align:center; }
.discovery-friend img { width:100%; height:92px; object-fit:contain; }
.discovery-friend strong { display:block; font-size:12px; line-height:1.4; }
.discovery-unknown { display:grid; place-items:center; height:100px; color:var(--muted); font-size:34px; }
.invite-dialog { width:min(460px,calc(100vw - 24px)); max-height:calc(100dvh - 28px); overflow:auto; }
.invite-dialog select { width:100%; min-width:0; font-size:16px; }
@media(max-width:700px) {
  .inventory-grid { grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
  .inventory-currencies { gap:22px; font-size:14px; }
  .inventory-currencies strong { font-size:22px; }
  body[data-immersion] .app-header .brand { font-size:20px; flex:1 1 auto; min-width:0; gap:4px; }
  body[data-immersion] .app-header .brand strong { display:inline; font-size:13px; }
  body[data-immersion] .header-actions { gap:3px; }
  body[data-immersion] .header-actions .icon-button { width:38px; height:44px; flex:0 0 38px; }
  .place-stage:not(.character-stage) .place-mimi { left:12%; right:auto; width:60vw; height:clamp(180px,35dvh,300px); bottom:calc(var(--hud-bottom) + 220px); }
  .scene-content { bottom:calc(var(--hud-bottom) + 8px); }
  .resident-groups { gap:16px; padding:6px 0 12px; align-items:end; }
  .resident-family { flex-basis:156px; min-width:0; }
  .resident-family .family-actor { width:156px; height:170px; }
  .resident-name { font-size:12px; white-space:nowrap; padding:6px 10px; }
  .scene-activity { justify-content:center; padding:6px 0; }
}
@media(max-height:600px) and (max-width:700px) {
  .place-stage:not(.character-stage) .place-mimi { width:38vw; height:180px; left:5%; bottom:calc(var(--hud-bottom) + 180px); }
  .resident-family .family-actor { height:118px; }
}

/* Confirmed gift delivery and a short 2.5D celebration. */
.gift-picker-dialog{color:var(--ink);background:var(--panel-dark);border:1px solid var(--line);border-radius:20px;padding:20px;width:min(540px,calc(100vw - 24px));max-height:calc(100dvh - 28px);overflow:auto}.gift-picker-dialog::backdrop{background:#080d28c9}.gift-picker-dialog header{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:14px}.gift-picker-dialog h2{font-size:24px}.gift-picker-dialog p{margin:14px 0;line-height:1.5}.gift-picker-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.gift-picker-grid .inventory-item[aria-pressed=true]{outline:3px solid var(--cyan);outline-offset:2px}.gift-picker-dialog [data-gift-error]{color:#ffe0ed}.gift-picker-dialog button{min-height:44px}.gift-reaction-stage{position:relative;display:flex;align-items:center;justify-content:center;margin:0 auto;max-width:480px}.gift-happy-actor{transform-origin:50% 85%;animation:gift-happy-spin 1.6s ease-in-out 1}.gift-reaction-stage .gift-reaction-actor{width:min(48vw,280px);height:min(48vw,280px)}.gift-reaction-stage .gift-art{width:min(24vw,140px);height:min(24vw,140px);object-fit:contain}.gift-receipt{color:var(--cyan);font-weight:800}.mimi-cinema[data-film=gift-reaction] .cinema-fallback{padding:28px;overflow:auto}.mimi-cinema[data-film=gift-reaction] h2{font-size:clamp(22px,4vw,32px);margin:18px 0}.mimi-cinema[data-film=gift-reaction] p{line-height:1.5;margin:12px 0}@keyframes gift-happy-spin{0%{transform:scale(1)}18%{transform:translateY(12px) scale(1.14,.83)}42%{transform:translateY(-24px) scale(.9,1.1) rotate(0)}78%{transform:translateY(-12px) rotate(360deg)}100%{transform:scale(1) rotate(360deg)}}@media(prefers-reduced-motion:reduce){.gift-happy-actor{animation:none}}

#candy{position:relative}.inventory-total{position:absolute;top:1px;right:0;background:var(--cyan);color:#171e56;border-radius:10px;font-size:10px;font-weight:800;line-height:16px;min-width:16px;padding:0 3px}.mimi-cinema[data-film=gift-reaction] .cinema-fallback{padding-bottom:150px}.mimi-cinema[data-film=gift-reaction] .gift-art{width:min(24vw,140px);height:min(24vw,140px)}

body.is-playing:has(.spot-game) .bottom-nav{display:none}
body.is-playing:has(.spot-game) .app-shell{padding-top:88px;padding-bottom:32px}
.spot-game{width:min(1120px,100%);margin:0 auto;padding:22px 28px 32px;color:#513b51;background:#fff1df;border-radius:20px;box-shadow:0 10px 40px #050c3033}
.spot-game .small-button{color:#624366;background:#f6dfdd;border:1px solid #b785a1}
.spot-game .small-button:hover{background:#efd0d5}.spot-game .small-button:focus-visible{outline:3px solid #795586;outline-offset:3px}
.spot-compare{display:none}
.spot-top{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:26px}
.spot-top h1{font:900 clamp(20px,3vw,30px)/1.2 'Bricolage Grotesque',sans-serif;margin:0;text-align:center}
.spot-count{font-size:20px;font-weight:800;font-variant-numeric:tabular-nums;white-space:nowrap}
.spot-intro{display:flex;align-items:center;gap:20px;margin-bottom:16px}.spot-intro h2{font-size:23px;margin:0 0 6px}.spot-intro p{margin:0;line-height:1.5}.spot-intro>button{margin-left:auto;flex-shrink:0}
.spot-partner{display:flex;align-items:center;gap:10px;flex-shrink:0}.spot-actor{width:72px;height:84px!important}.spot-partner strong{max-width:130px;font-size:13px}.spot-partner .actor-shadow{display:none}
.spot-pictures{display:grid;grid-template-columns:1fr 1fr;gap:16px}.spot-view{margin:0;min-width:0}.spot-view figcaption{margin-bottom:8px;text-align:center;font-size:13px;font-weight:800;color:#73536f}
.spot-picture{display:block;position:relative;padding:0;width:100%;border:0;border-radius:14px;overflow:hidden;background:#edd9cd;box-shadow:0 6px 22px #65452f20;cursor:crosshair;touch-action:manipulation;isolation:isolate}
.spot-picture img{display:block;width:100%;height:auto;pointer-events:none;user-select:none}.spot-picture:disabled{opacity:1;cursor:wait}.is-complete .spot-picture:disabled{cursor:default}
.spot-picture:focus-visible{outline:3px solid #795586;outline-offset:4px}.spot-markers{position:absolute;inset:0;pointer-events:none;z-index:2}
.spot-found{position:absolute;transform:translate(-50%,-50%);border:3px solid #247951;border-radius:50%;background:#d4f7cf26;display:grid;place-items:center;animation:spot-found .45s cubic-bezier(.16,1,.3,1) both;box-shadow:0 2px 7px #1a563e35}
.spot-found svg{width:30%;min-width:16px;position:absolute;bottom:-3px;right:-3px;padding:2px;border-radius:50%;background:#247951;fill:none;stroke:#fff;stroke-width:3.5;stroke-linecap:round;stroke-linejoin:round}
.spot-ripple{position:absolute;left:50%;top:50%;width:44px;height:44px;border:2px solid #fff;border-radius:50%;pointer-events:none;z-index:4;animation:spot-ripple .7s ease-out both}.spot-ripple.is-hit{border-color:#22764d}.spot-ripple.is-miss{border-color:#a65361;background:#ffe0e055}.spot-ripple.is-pending{border-style:dashed}
.spot-hint-area{position:absolute;width:50%;height:50%;background:#ffe5963d;outline:2px dashed #927037;outline-offset:-4px;pointer-events:none;animation:spot-hint 1.4s ease-in-out infinite;z-index:1}
.spot-cursor{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:36px;height:36px;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 5px #442d4066;pointer-events:none;display:none;z-index:5}.has-cursor:focus-visible .spot-cursor{display:block}
.spot-footer{display:flex;justify-content:space-between;gap:16px;align-items:center;margin-top:16px;min-height:32px}.spot-footer p{margin:0;font-weight:600}.spot-footer>span{font-size:13px;white-space:nowrap;color:#73536f}
.spot-loading{padding:12px 0;margin:0;color:#73536f;cursor:pointer}.spot-retry{padding:14px 0;color:#81374d}.spot-retry p{margin:0 0 10px}.spot-result{text-align:center;margin-top:24px;padding:22px 0}.spot-result h2{font-size:28px;margin:0 0 8px}.spot-result p{margin:0 0 16px}.is-complete .spot-partner .spot-actor{animation:spot-cheer 1.2s cubic-bezier(.16,1,.3,1)}
@keyframes spot-found{from{transform:translate(-50%,-50%) scale(.55);opacity:.2}to{transform:translate(-50%,-50%) scale(1);opacity:1}}
@keyframes spot-ripple{from{transform:translate(-50%,-50%) scale(.5);opacity:.9}to{transform:translate(-50%,-50%) scale(2);opacity:0}}
@keyframes spot-hint{0%,100%{opacity:.55}50%{opacity:1}}
@keyframes spot-cheer{0%,100%{transform:translateY(0)}25%{transform:translateY(-10px) rotate(-7deg)}50%{transform:translateY(0) rotate(5deg)}75%{transform:translateY(-5px)}}
@media(max-width:650px){.spot-game{padding:16px 16px 32px}.spot-top{gap:10px;margin-bottom:20px}.spot-top h1{max-width:150px;font-size:20px}.spot-top .small-button{font-size:12px;padding:10px}.spot-count{font-size:17px}.spot-intro{gap:12px;flex-wrap:wrap}.spot-partner strong{display:none}.spot-actor{width:52px;height:62px!important}.spot-intro>div:nth-child(2){flex:1;min-width:190px}.spot-intro h2{font-size:19px}.spot-intro p{font-size:13px}.spot-intro>button{margin:0 0 0 auto}.spot-pictures{grid-template-columns:1fr;gap:14px}.spot-view figcaption{text-align:left;margin-bottom:6px}.spot-footer{align-items:flex-start}.spot-footer p{font-size:14px}.spot-footer>span{font-size:12px}.spot-picture{border-radius:12px}}
@media(prefers-reduced-motion:reduce){.spot-found,.spot-ripple,.spot-hint-area,.is-complete .spot-partner .spot-actor{animation:none}.spot-ripple{display:none}}
@media(max-width:650px){
 body.is-playing:has(.spot-game) .app-shell{padding:76px 12px 24px}
 .spot-game{padding:14px 12px 24px;border-radius:16px}
 .spot-top{margin-bottom:14px}.spot-top h1{font-size:18px;max-width:140px}
 .spot-intro{gap:10px;margin-bottom:12px}.spot-intro>div:nth-child(2){min-width:0}
 .spot-intro h2{font-size:18px}.spot-intro>button{padding:8px 12px}
 .spot-compare{display:flex;gap:6px;align-items:center;margin:12px 0}
 .spot-compare button{flex:1;min-height:44px;padding:8px;font:inherit;font-size:13px;font-weight:700;line-height:1.2;border:1px solid #b785a1;background:#fff7ed;color:#624366;border-radius:10px}
 .spot-compare button[aria-pressed=true]{background:#795586;color:#fff;border-color:#795586}
 .spot-game[data-picture=A] .spot-view:nth-child(2),.spot-game[data-picture=B] .spot-view:nth-child(1){display:none}
 .spot-view figcaption{display:none}.spot-footer{margin-top:12px}
 .spot-game .spot-loading[hidden]{display:none}
}
 .spot-scores{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:0 0 14px;font-size:14px}.spot-scores>span{padding:7px 12px;border-radius:12px;background:#e4eee2;color:#335d43}.spot-scores>span:nth-child(2){background:#eee0f0;color:#754285}.spot-scores strong{margin-left:8px;font-size:18px}.spot-scores>b{margin-left:auto;font-size:13px}.spot-found.partner-found{border-color:#9a64af;background:#b47bce20}.spot-found.partner-found svg{background:#8a55a1}.spot-partner-cursor{position:absolute;width:32px;height:32px;border:3px solid #9a64af;border-radius:50%;box-shadow:0 0 0 3px #fff9;transform:translate(-50%,-50%);pointer-events:none;z-index:4;transition:left .8s ease,top .8s ease;background:#a171b422}.spot-partner-cursor[hidden]{display:none}.spot-partner-cursor>span{position:absolute;left:50%;top:32px;transform:translateX(-50%);max-width:95px;padding:2px 6px;border-radius:7px;font-size:10px;color:white;background:#754285;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}@media(prefers-reduced-motion:reduce){.spot-partner-cursor{transition:none}}

body.is-playing:has(.memory-game) .bottom-nav{display:none}
body.is-playing:has(.memory-game) .app-shell{padding-top:88px;padding-bottom:32px}
.memory-game{width:min(1000px,100%);margin:auto;padding:22px 28px 30px;color:#513b51;background:#fff1df;border-radius:20px;box-shadow:0 10px 40px #050c3033}
.memory-game .small-button{color:#624366;background:#f6dfdd;border:1px solid #b785a1}.memory-game .small-button:hover{background:#efd0d5}
.memory-top{display:flex;gap:12px;align-items:center;justify-content:space-between;margin-bottom:16px}.memory-top h1{margin:0;font:900 28px/1.2 'Bricolage Grotesque',sans-serif}.memory-top>span{font-size:15px;font-weight:800;white-space:nowrap;font-variant-numeric:tabular-nums}
.memory-intro{display:flex;align-items:center;gap:16px;margin-bottom:14px}.memory-intro h2{margin:0 0 4px;font-size:21px}.memory-intro p{margin:0;font-size:14px;line-height:1.5}.memory-intro>span{margin-left:auto;white-space:nowrap;font-weight:700;font-size:13px}
.memory-actor{width:64px;height:76px!important}.memory-partner{flex-shrink:0}.memory-partner .actor-shadow{display:none}
.memory-table{padding:24px;border-radius:16px;background-color:#ac794e;background-size:cover;background-position:center bottom;box-shadow:inset 0 2px 14px #4c2b2966}
.memory-board{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;max-width:420px;margin:auto}
.memory-card{position:relative;width:100%;aspect-ratio:3/4;padding:0;border:0;border-radius:12px;background:none;perspective:900px;cursor:pointer;touch-action:manipulation;box-shadow:0 4px 9px #3b223c50}.memory-card:disabled{opacity:1;cursor:default}.memory-card:focus-visible{outline:3px solid #fff7c6;outline-offset:4px}
.memory-turn{display:block;position:absolute;inset:0;transform-style:preserve-3d;transition:transform .26s cubic-bezier(.16,1,.3,1)}.is-open .memory-turn{transform:rotateY(180deg)}
.memory-back,.memory-front{position:absolute;inset:0;display:grid;place-items:center;border-radius:12px;overflow:hidden;backface-visibility:hidden;border:2px solid #efcf97}.memory-back img{width:100%;height:100%;object-fit:cover;pointer-events:none}.memory-front{transform:rotateY(180deg);background:#fff8e8}.memory-front img{width:100%;height:auto;pointer-events:none;user-select:none}.is-matched .memory-front{border:3px solid #357855;box-shadow:0 0 16px #ffe4ac90}.is-mismatch .memory-front{border-color:#af687a}
.memory-check{display:none;position:absolute;right:4px;bottom:4px;width:23px;height:23px;border-radius:50%;padding:3px;background:#357855;fill:none;stroke:#fff;stroke-width:3.5;stroke-linecap:round;stroke-linejoin:round}.is-matched .memory-check{display:block}
.memory-footer{display:flex;justify-content:space-between;gap:16px;align-items:center;margin-top:14px}.memory-footer p{margin:0;font-size:14px;font-weight:600}.memory-footer>span{font-size:12px;white-space:nowrap;color:#73536f}.memory-loading{margin:0 0 12px;font-size:14px}.memory-retry{margin-top:18px}.memory-retry p{margin-bottom:10px}.memory-round-result,.memory-result{text-align:center;margin-top:20px}.memory-result h2,.memory-round-result h2{font-size:24px;margin:0 0 12px}.memory-result p{margin:0 0 14px}
@media(max-width:650px){body.is-playing:has(.memory-game) .app-shell{padding:76px 12px 24px}.memory-game{padding:14px 12px 22px;border-radius:16px}.memory-top h1{font-size:20px}.memory-top .small-button{font-size:12px;padding:10px}.memory-top>span{font-size:12px}.memory-intro{gap:10px;flex-wrap:wrap}.memory-intro>div:nth-child(2){flex:1}.memory-intro>span{width:100%;text-align:right;font-size:12px}.memory-intro h2{font-size:18px}.memory-intro p{font-size:13px}.memory-actor{width:50px;height:60px!important}.memory-table{padding:16px 10px;border-radius:12px}.memory-board{gap:8px}.memory-card,.memory-back,.memory-front{border-radius:9px}.memory-footer{align-items:flex-start;flex-wrap:wrap;gap:8px}.memory-footer p{font-size:13px}.memory-check{width:20px;height:20px}}
@media(prefers-reduced-motion:reduce){.memory-turn{transition:none}}
.memory-scores{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:0 0 14px;font-size:14px}.memory-scores>span{padding:7px 12px;border-radius:12px;background:#e4eee2;color:#335d43}.memory-scores>span:nth-child(2){background:#eee0f0;color:#754285}.memory-scores strong{margin-left:8px;font-size:18px}.memory-scores>b{margin-left:auto;font-size:13px}.memory-card.partner-pair .memory-front{box-shadow:inset 0 0 0 4px #a171b4}.memory-card.partner-pair .memory-check{background:#8a55a1}

/* The same illustrated Mimi world, with readable handmade notebooks. */
.simple-melody .melody-grid{grid-template-columns:92px repeat(var(--melody-beats,8),minmax(44px,1fr));min-width:calc(92px + var(--melody-beats,8)*56px)}
.simple-melody .melody-instrument{position:sticky;left:0;z-index:2;background:#fff6e5;color:#50383c}
.simple-melody .melody-instrument svg{width:54px;height:44px;fill:none;stroke:currentColor;stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round}
.simple-melody .melody-pitches{display:flex;gap:6px;max-width:420px}.simple-melody .melody-pitches button{flex:1;min-width:36px}
.simple-length{display:flex;gap:10px;justify-content:space-between;margin:12px 0}.simple-settings{margin:12px 0}.simple-settings summary{cursor:pointer;min-height:44px;display:flex;align-items:center}.simple-settings label{display:block;margin-block:10px}
/* This editor owns vertical scrolling; the shared fixed game frame hides overflow. */
body[data-immersion=game] .creative-game.simple-melody{padding-top:calc(var(--simple-hud-height,var(--hud-top)) + 10px);overflow:auto;touch-action:pan-x pan-y;scroll-padding-bottom:calc(var(--hud-bottom) + 20px)}
body[data-immersion=game] .simple-melody .melody-desk{overflow:visible;flex:0 0 auto}
@media(max-width:600px){.simple-melody .melody-grid{grid-template-columns:76px repeat(var(--melody-beats,8),44px);min-width:calc(76px + var(--melody-beats,8)*50px)}.simple-melody .melody-pitches{width:100%}.simple-melody .melody-instrument svg{width:46px;height:36px}}
.creative-game{--ink:#3d2936;--paper:#fff6e5;--plum:#64406c;position:relative;min-height:78vh;color:var(--ink);padding:16px 24px 30px;background:linear-gradient(#1b173050,#1b173060),var(--creative-scene) center/cover fixed}
body[data-immersion=game] .creative-game{position:fixed;inset:0;overflow:hidden;display:flex;flex-direction:column;padding-top:calc(var(--hud-top) + 10px);padding-bottom:calc(var(--hud-bottom) + 20px);overscroll-behavior:contain}
body[data-immersion=game] .creative-top{flex:0 0 auto;width:100%}body[data-immersion=game] .creative-friend{flex:0 0 auto;width:100%}body[data-immersion=game] .melody-desk,body[data-immersion=game] .observatory-desk{flex:1 1 auto;min-height:0;overflow:auto;width:100%;overscroll-behavior:contain}
.creative-top{display:flex;align-items:center;gap:16px;max-width:1000px;margin:0 auto 12px;color:#fff9e9}.creative-top h1{flex:1;margin:0;font-size:30px;text-shadow:0 2px 8px #241933}.creative-top select{width:132px;min-height:44px;padding:6px;border-radius:10px;font-size:14px;color:var(--ink);background:var(--paper)}
.creative-friend{display:flex;align-items:center;gap:16px;max-width:920px;margin:0 auto 16px;padding:6px 20px 6px 10px;border-radius:18px;background:#22172bbf;color:#fff8e9;min-height:88px}.creative-friend>div:not(.questmon-actor){min-width:0}.creative-friend strong{font-size:16px}.creative-friend p{font-size:14px;line-height:1.55;margin:6px 0}.creative-friend .creative-actor{position:relative;inset:auto;flex:0 0 90px;width:90px;height:84px;min-height:0;max-height:84px;margin:0;overflow:visible}.creative-friend .questmon-actor>.actor-source,.creative-friend .questmon-actor>.creature-motion{transform:none;width:100%;height:100%;left:0;top:0}
.melody-desk,.observatory-desk{max-width:920px;margin:auto;padding:28px;border-radius:20px 20px 32px 20px;background:linear-gradient(120deg,#fffaf0,#f8eacf);box-shadow:0 12px 32px #160e2566,inset 0 0 0 1px #fff7db;color:var(--ink)}
.creative-game .button,.creative-picker .button,.mimi-music-picker .button{background:var(--plum,#64406c);color:#fff8ed;border:1px solid #8b628a;min-height:46px}.creative-game .small-button,.creative-picker .small-button,.mimi-music-picker .small-button{background:#fff5df;color:#563854;border:1px solid #b69679;min-height:44px}.creative-game button:disabled{opacity:.5}.creative-game button:focus-visible,.creative-picker button:focus-visible{outline:3px solid #bc8155;outline-offset:3px}
.melody-title{display:flex;align-items:center;gap:12px;font-size:14px;margin-bottom:18px}.melody-title input{min-width:0;flex:1;background:#fffdf6;border:1px solid #c6a588;border-radius:9px;padding:9px 12px;color:var(--ink);font-family:inherit;font-size:20px;min-height:44px}.melody-tools{display:flex;flex-wrap:wrap;justify-content:space-between;gap:18px;align-items:center}.melody-pitches{display:flex;gap:6px}.melody-pitches [aria-pressed=true]{background:#72517a;color:#fff}.melody-tools label{display:flex;align-items:center;gap:10px;font-size:14px}.melody-tools input[type=range]{width:130px;accent-color:#72517a}.melody-legend{display:flex;gap:16px;font-size:12px;margin:16px 0 8px}.melody-legend span::before{content:'●';padding-right:5px;color:#89609d}.melody-legend span:nth-child(2)::before{color:#88531f}.melody-scroll{overflow-x:auto;border-radius:14px;padding:4px 2px 12px;scrollbar-color:#b99370 #f7ebd5}.melody-grid{display:grid;grid-template-columns:100px repeat(8,minmax(44px,1fr));gap:7px;min-width:510px}.melody-beat{text-align:center;font-size:12px;color:#756054}.melody-instrument{padding:0;background:transparent;border:0;display:flex;align-items:center;gap:2px;color:#493843;font:inherit}.melody-instrument img{width:60px;height:68px;object-fit:contain}.melody-instrument span{font-size:11px;line-height:1.3;overflow-wrap:anywhere}.melody-cell{border-radius:9px;background:#ebdcc5;border:1px solid #cdb597;min-height:62px;font-size:18px;font-weight:700;color:#846c58;transition:background .12s,transform .12s,box-shadow .12s}.melody-cell.is-mine{background:#79568b;color:#fff9ef;border-color:#674570;box-shadow:none}.melody-cell.is-friend{background:#94602d;color:#fff;border-style:dashed;border-color:#8b5e28}.melody-cell.is-playing{box-shadow:0 0 0 3px #e7a738;transform:translateY(-3px)}.melody-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:12px}.melody-actions>*{flex:1}.melody-keepsake{border-top:1px solid #d6b792;padding-top:18px;margin-top:18px}.melody-keepsake h2{font-size:28px}.melody-keepsake button{margin:8px 12px 0 0}
.creative-retry{margin:16px 0;padding:12px;border:2px solid #a76838;border-radius:12px;background:#fff1cd}.creative-retry[hidden]{display:none!important}.creative-notice{font-size:12px;line-height:1.6;color:#71594c;margin:20px 0 0}.creative-notice a{color:#64406c}.star-progress{display:flex;gap:6px;margin-left:auto}.star-progress i{width:7px;height:7px;border-radius:50%;background:#eec96a44}.star-progress .is-lit{background:#ffe28e;box-shadow:0 0 8px #ffcf6499}.star-question h2{font-size:30px;margin:8px 0 18px}.star-question-copy{font-size:22px;line-height:1.65;margin:0 0 22px;max-width:690px}.star-answers{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:9px}.star-answer{min-height:92px;border:1px solid #bda080;background:#fffaf0;color:#49313d;font:inherit;font-size:14px;line-height:1.5;padding:12px 8px;border-radius:14px}.star-answer span{display:block;width:24px;height:24px;border-radius:50%;background:#ead8bd;margin:0 auto 10px;font-size:13px;line-height:24px}.star-answer[aria-pressed=true]{background:#785482;color:#fff}.star-answer[aria-pressed=true] span{background:#fff2cf;color:#76507e}.star-answer:disabled{opacity:.78}.star-answer[aria-pressed=true]:disabled{opacity:1}.star-reveal{border-top:1px solid #d2b18e;margin-top:24px;padding-top:20px;display:flex;gap:16px;align-items:center;flex-wrap:wrap}.star-reveal p{flex:1;margin:0;min-width:160px}.star-sealed{font-size:14px;color:#795d48;margin-top:20px}.star-interlude{text-align:center}.star-interlude h2{font-size:28px}.star-interlude>p{line-height:1.6}.star-chart{position:relative;width:min(100%,430px);aspect-ratio:100/85;margin:18px auto;background:radial-gradient(ellipse at center,#564167,#20152e);border-radius:18px;overflow:hidden;box-shadow:inset 0 0 50px #120e2b}.star-chart svg{width:100%;height:100%}.star-chart polyline{fill:none;stroke:#ffe5a4;stroke-width:.6}.star-chart circle{fill:#ffe8b3;filter:drop-shadow(0 0 2px #ffcc70)}.star-node{position:absolute;transform:translate(-50%,-50%);min-width:48px;min-height:48px;border-radius:50%;background:#302339;border:1px solid #7a658a;color:#cdbbcc;font-size:16px}.star-node.is-next{background:#ffdda0;color:#50373d;box-shadow:0 0 24px #ffd88788;border:2px solid #fffbdf;animation:star-breathe 1.5s ease-in-out infinite}.star-node.is-linked{background:#685275;color:#ffe6a4}.star-certificates{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}.star-certificate{padding:24px 18px;text-align:center;border:1px solid #b89a6e;border-radius:4px;background:linear-gradient(145deg,#fffdf4,#f1dec0);outline:1px solid #d7bf98;outline-offset:-7px;color:#50383c}.star-certificate h2{font-size:26px;margin:16px 0 8px;overflow-wrap:anywhere}.star-certificate h3{font-size:19px;line-height:1.5}.star-certificate .star-chart{width:100%;max-width:250px}.certificate-preferences{font-size:16px;line-height:1.7}.certificate-date{font-size:12px;color:#674a2c}
.creative-picker,.mimi-music-picker{width:min(860px,calc(100% - 24px));max-height:85dvh;overflow:auto;background:#fff7e7;color:#50383c;border:1px solid #b59773;border-radius:20px;padding:24px}.creative-picker::backdrop,.mimi-music-picker::backdrop{background:#1c173abd;backdrop-filter:blur(5px)}.creative-picker header,.mimi-music-picker header{display:flex;gap:16px;align-items:center;justify-content:space-between;margin-bottom:16px}.creative-picker h2,.mimi-music-picker h2{margin:0;font-size:27px}.creative-picker>select,.mimi-music-picker select{font:inherit;padding:8px;color:#50383c;background:#fffdfa;border:1px solid #b59773;border-radius:8px;min-height:44px;max-width:100%}.creative-pack-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:18px 0}.creative-pack{padding:0;text-align:left;border:1px solid #b79775;border-radius:12px;overflow:hidden;background:#fffdf5;color:#523d42;font:inherit;transition:transform .15s,box-shadow .15s}.creative-pack img{display:block;width:100%;height:85px;object-fit:cover;background:#ede0cc}.creative-pack span{display:block;padding:10px}.creative-pack small{font-size:11px;display:block;color:#97744c;margin-bottom:5px}.creative-pack strong{font-size:15px;line-height:1.5;display:block}.creative-pack.is-selected{outline:3px solid #795387;outline-offset:2px;background:#f2e9f4}.creative-pack:hover{transform:translateY(-2px)}.creative-archive{border-top:1px solid #d0b38e;padding-top:16px;margin-top:20px}.creative-archive button{margin:8px 6px 0 0}.creative-archive summary{cursor:pointer;min-height:44px}.mimi-music-picker label{display:block;margin:18px 0}.mimi-music-picker input{accent-color:#71507a;width:100%}.mimi-music-picker select{display:block;width:100%;margin-top:8px}#town-music{font-size:22px}
@keyframes star-breathe{50%{box-shadow:0 0 32px #ffd887bb}}
.melody-instrument{flex-direction:column;justify-content:center}.melody-instrument img{width:52px;height:44px}.melody-instrument span{width:100%;text-align:center;overflow-wrap:normal}.melody-cell.is-mine.is-friend{background:linear-gradient(135deg,#79568b 50%,#94602d 50%);color:#fff9ef}
@media(max-width:600px){.creative-game{padding-inline:12px}.creative-top{gap:8px;flex-wrap:wrap}.creative-top h1{font-size:21px;order:-1;width:100%;flex-basis:100%}.creative-top select{margin-left:auto}.creative-top .small-button{font-size:12px}.creative-friend{gap:10px;padding:6px 10px;margin-bottom:12px}.creative-friend .creative-actor{width:64px;height:64px;max-height:64px;flex-basis:64px}.creative-friend p{font-size:12px;line-height:1.45}.creative-friend strong{font-size:14px}.star-progress{display:none}.melody-desk,.observatory-desk{padding:18px 14px;border-radius:16px}.melody-title{display:block;font-size:12px}.melody-title input{display:block;width:100%;margin-top:6px;font-size:18px}.melody-tools{gap:12px}.melody-tools label{font-size:12px;width:100%}.melody-tools input[type=range]{flex:1;width:auto}.melody-pitches{width:100%}.melody-pitches button{flex:1}.melody-grid{grid-template-columns:76px repeat(8,44px);min-width:484px;gap:6px}.melody-instrument{flex-direction:column;justify-content:center}.melody-instrument img{height:42px;width:50px}.melody-instrument span{font-size:10px}.melody-cell{min-height:64px}.melody-actions>*{flex:1 1 calc(50% - 10px);font-size:13px;padding-inline:8px}.star-question h2{font-size:24px}.star-question-copy{font-size:18px;line-height:1.7}.star-answers{grid-template-columns:1fr;gap:8px}.star-answer{display:flex;align-items:center;gap:12px;text-align:left;padding:10px 14px;min-height:50px;font-size:15px}.star-answer span{margin:0;flex:0 0 24px}.star-reveal{display:block}.star-reveal p{margin:10px 0 14px}.star-reveal .button{width:100%}.star-chart{max-width:320px}.star-certificates{grid-template-columns:1fr;gap:22px}.star-certificate{padding:24px}.creative-picker,.mimi-music-picker{padding:18px}.creative-pack-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.creative-pack img{height:76px}.creative-picker>button{width:100%}.header-actions{gap:0}.app-header .header-actions .icon-button{min-width:34px;width:34px;padding:4px}}
@media(prefers-reduced-motion:reduce){.creative-game *,.creative-picker *{animation:none!important;transition:none!important}.melody-cell.is-playing{transform:none}}

.star-question-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;margin-bottom:18px}.star-question-heading h2{margin:0}.question-count{font-size:14px;color:#674a2c;margin:0}.certificate-recipient{font-size:24px;font-weight:600;margin:12px 0;overflow-wrap:anywhere}
.music-score{display:flex;gap:18px;align-items:center;margin-bottom:24px;color:#3d302b}
.music-score img{display:block;min-height:140px;max-height:none;width:140px;height:140px;flex:0 0 140px;object-fit:cover;border-radius:14px}
.music-score h2{font-size:22px;line-height:1.25;margin:0 0 8px;overflow-wrap:anywhere}
.music-score p{font-size:14px;line-height:1.5;margin:6px 0;color:#654728}
.compose-heading{font-size:20px;margin:24px 0 16px;color:#3d302b}
.music-preview{position:sticky;bottom:0;padding:12px 0;background:#fff8e8}.music-preview p:empty{display:none}
@media(max-width:600px){.music-score{gap:12px}.music-score img{width:92px;height:112px;min-height:112px;flex-basis:92px}.music-score h2{font-size:18px}.music-score p{font-size:12px}.compose-heading{font-size:18px}}
/* Actual astronomical node/edge geometry, with an automatic per-answer reveal. */
.real-star-chart{background:#18254b;border-radius:16px;overflow:hidden;aspect-ratio:100/85;max-width:420px;width:100%;margin:0 auto}
.real-star-chart svg{display:block;width:100%;height:auto;background:none}
.real-star-chart line{stroke:#7e8dac;stroke-width:.5;opacity:.4}
.real-star-chart circle{fill:#8997b3;opacity:.65}
.real-star-chart line.is-lit{stroke:#f1c86b;opacity:1;stroke-width:.65}
.real-star-chart circle.is-lit{fill:#ffe19b;opacity:1}
.real-star-chart circle.just-lit{animation:star-arrival .6s ease-out}
.star-adventure{display:grid;grid-template-columns:minmax(180px,.8fr) minmax(0,1.2fr);gap:26px;align-items:start}
.star-live-map h2{font-size:20px;line-height:1.4;margin:14px 0 4px;text-align:center}
.star-lit-count{font-size:14px;text-align:center;color:#654728}
.star-adventure .star-question-copy{font-size:21px;line-height:1.5;margin:16px 0}
.star-adventure .star-answers{grid-template-columns:1fr;gap:10px}
.star-adventure .star-answer{text-align:left;padding:12px 16px;min-height:52px;font-size:16px;line-height:1.5;white-space:normal}
.star-adventure .star-answer:disabled{opacity:1;color:#493843;background:#fff8eb;cursor:default}
.star-adventure .star-answer.is-chosen{background:#64406c;color:#fff;border-color:#64406c;opacity:1}
.star-reveal{display:block}.star-reveal p{margin:10px 0 14px}.star-reveal .button{min-height:44px}
.star-certificate .real-star-chart{max-width:270px;margin:14px auto}
/* Native WebKit menus inherit Mimi's dark color scheme unless pinned to paper. */
.creative-top select,.creative-picker>select{color-scheme:light;background-color:#fffdf6;color:#3d2936;-webkit-text-fill-color:#3d2936;font-size:16px}
.certificate-comment{font-size:16px;line-height:1.6}.certificate-stars{font-size:14px;line-height:1.5;color:#705538}
.creative-pack .real-star-chart{width:100%;height:108px;aspect-ratio:auto;border-radius:0}
.creative-pack .real-star-chart svg{height:100%;width:100%}
.creative-pack span small:last-child{display:block;margin-top:8px;line-height:1.5}
@keyframes star-arrival{from{opacity:.35}to{opacity:1}}
@media(max-width:600px){.star-adventure{grid-template-columns:1fr;gap:12px}.star-live-map .real-star-chart{max-width:200px}.star-live-map h2{font-size:18px;margin:8px 0 2px}.star-lit-count{margin:4px 0}.star-adventure .star-question-copy{font-size:18px}.star-adventure .star-answer{font-size:15px;min-height:52px}.star-certificates{grid-template-columns:1fr}.star-certificate{padding:22px 18px}.certificate-recipient{font-size:21px}.creative-pack .real-star-chart{height:100px}}
@media(prefers-reduced-motion:reduce){.real-star-chart circle.just-lit{animation:none}}
/* The game leaves a strip between its desk and navigation for speech status. */
body[data-immersion=game] #speech-status:not(:empty){top:auto;bottom:var(--hud-bottom);left:24px;right:auto;max-width:calc(100vw - 48px);width:max-content;padding:4px 8px;font-size:11px;line-height:1.2;pointer-events:none}
.star-navigation{display:flex;flex-wrap:wrap;gap:12px;align-items:center;margin-top:20px}
.level-picker{width:min(560px,calc(100% - 24px))}
.level-picker-note{margin:0 0 12px;font-size:14px}
.level-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px;margin-bottom:14px}
.level-grid button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;min-height:62px;border-radius:14px;border:2px solid #d9c3a4;background:#fffdf7;color:#50383c;cursor:pointer}
.level-grid button strong{font-size:20px}.level-grid button small{font-size:11px;min-height:13px}
.level-grid button.is-done{background:#f3ffe9;border-color:#9fce86}
.level-grid button.is-next{border-color:#e9799d}
.level-grid button[aria-pressed=true]{background:#64406c;border-color:#64406c;color:#fff8ed}
@media(max-width:420px){.level-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}

/* The cream music desk sits in the existing illustrated Mimi room. */
body[data-immersion]:has(#main .phrase-game){height:auto;min-height:100dvh;overflow:auto}
body[data-immersion]:has(#main .phrase-game) .app-shell{height:auto;min-height:100dvh;padding:0}
body:has(#main .phrase-game) .bottom-nav{display:none}
body:has(#main .phrase-game) #main{margin:0;padding:0}
.phrase-game.creative-game,body[data-immersion=game] .phrase-game.creative-game{position:relative;inset:auto;display:block;min-height:100dvh;height:auto;overflow:visible;padding:calc(var(--phrase-hud-height,80px) + 16px) 24px 40px;background:linear-gradient(#fff7ebdc,#fff7ebf2),var(--creative-scene) center/cover fixed}
.phrase-game .creative-top,.phrase-intro,.phrase-desk{max-width:1056px;margin-inline:auto}
.phrase-game .creative-top{position:relative;inset:auto;margin-bottom:20px;padding:0;display:flex;gap:16px;align-items:center;justify-content:space-between}
.phrase-game .creative-top h1{font-size:clamp(24px,4vw,40px);margin:0;text-wrap:balance;color:#432635;text-shadow:none}
.phrase-game .creative-top select{max-width:150px;min-height:44px}
.phrase-intro{display:grid;grid-template-columns:128px 1fr 136px;gap:24px;align-items:center;margin-bottom:24px}
.phrase-cover{width:128px;height:128px;object-fit:cover;border-radius:12px}
.phrase-heading h2{font-size:clamp(23px,3vw,34px);margin:0 0 8px;text-wrap:balance}
.phrase-heading p{color:#694455;margin:0 0 12px}
.phrase-listen{display:flex;gap:8px;flex-wrap:wrap}
.phrase-friend{text-align:center;color:#694455}
.phrase-friend .phrase-actor{position:relative;inset:auto;min-height:0;max-height:104px;width:112px;height:104px;margin:auto}
.phrase-friend .questmon-actor>.actor-source,.phrase-friend .questmon-actor>.creature-motion{transform:none;width:100%;height:100%;left:0;top:0}
.phrase-friend strong{display:block;margin-top:4px}
.phrase-desk{background:#fffcf4;border-radius:16px;padding:28px;box-shadow:0 14px 40px #58293916}
.phrase-title-row{display:flex;gap:24px;justify-content:space-between;align-items:end}
.phrase-title-row label{display:flex;gap:8px;flex-direction:column;color:#694455;font-weight:650}
.phrase-title-row label:first-child{flex:1;max-width:460px}
.phrase-title-row input:not([type=range]){min-height:44px;width:100%;border:1px solid #bea5ad;border-radius:8px;padding:8px 12px;background:#fff;color:#432635;caret-color:#7a3d63}
.phrase-title-row label:last-child{display:grid;grid-template-columns:1fr auto;column-gap:12px;width:220px}
.phrase-title-row input[type=range]{grid-column:1;grid-row:2;accent-color:#7a3d63}
.phrase-title-row output{grid-column:2;grid-row:2;font-variant-numeric:tabular-nums}
.phrase-guide{color:#694455;margin:20px 0 16px;max-width:70ch;line-height:1.6}
.phrase-bars{display:flex;gap:8px;margin-bottom:20px;flex-wrap:wrap}
.phrase-bars button{min-height:44px;display:flex;gap:8px;align-items:center}
.phrase-bars [aria-pressed=true]{background:#7a3d63;color:#fff;border-color:#7a3d63}
.phrase-bars span:empty{display:none}
.phrase-bars span{font-size:12px;font-variant-numeric:tabular-nums}
.phrase-bars .is-sounding{outline:2px solid #ad7934;outline-offset:3px}
.phrase-measure[hidden]{display:none}
.phrase-measure h3{font-size:22px;margin:0 0 20px}
.phrase-measure h3 small{color:#694455;font-size:14px;margin-left:8px}
.phrase-lane + .phrase-lane{margin-top:20px}
.phrase-lane h4{font-size:15px;color:#694455;margin:0 0 8px}
.phrase-ribbon{display:flex;gap:6px;overflow-x:auto;padding:4px 4px 12px;scrollbar-color:#ad7d96 #f4e6d8;scrollbar-width:thin}
.phrase-note{flex:var(--note-length) 0 48px;min-width:48px;min-height:70px;border:1px dashed #bda0ad;border-radius:8px;color:#694455;background:#f7eee5;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:3px;cursor:pointer}
.phrase-note strong{font-size:16px;font-weight:700;white-space:nowrap}
.phrase-note small{font-size:12px}
.phrase-note.is-filled{background:#e8d4e2;border-style:solid;border-color:#a67e96;color:#482b3d}
.phrase-note.is-ghost strong{font-weight:500;font-size:14px}
.phrase-note.is-playing{background:#f1d9a9;border-color:#956528;color:#482b3d}
.phrase-note:hover:not(:disabled){background:#ecdbea}
.phrase-game :focus-visible,.creative-archive :focus-visible{outline:3px solid #7a3d63;outline-offset:3px}
.phrase-game ::selection{color:#fff;background:#7a3d63}
.phrase-game .phrase-note:disabled{cursor:default;opacity:1}
.phrase-game button:disabled:not(.phrase-note){opacity:.55;cursor:default}
.phrase-edit-tools{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}
.phrase-edit-tools [aria-pressed=true]{background:#7a3d63;color:#fff}
.phrase-settings{margin-top:20px;color:#694455}
.phrase-settings summary{cursor:pointer;min-height:44px;padding-block:10px;font-weight:650}
.phrase-settings .phrase-title-row{padding-block:12px}
.phrase-actions{display:flex;gap:12px;flex-wrap:wrap;margin-top:24px}
.phrase-status{min-height:24px;color:#694455;margin:12px 0 0;line-height:1.5}
.phrase-keepsake{margin-top:24px;padding-top:24px;border-top:1px solid #d9c6cf}
.phrase-keepsake h2{margin:0 0 8px}
.phrase-keepsake p{color:#694455}
.star-completed-chart{max-width:240px;margin:0 auto 24px}
body[data-immersion]:has(.observatory-game.is-result){height:auto;min-height:100dvh;overflow:auto}
body[data-immersion]:has(.observatory-game.is-result) .app-shell{height:auto;min-height:100dvh;padding:0}
body:has(.observatory-game.is-result) .bottom-nav{display:none}
body[data-immersion=game] .observatory-game.is-result{position:relative;inset:auto;display:block;height:auto;overflow:visible;min-height:100dvh;padding-top:calc(var(--hud-top) + 16px);padding-bottom:32px}
body[data-immersion=game] .observatory-game.is-result .observatory-desk{overflow:visible;height:auto;min-height:0}
.creative-archive-row{display:flex;gap:12px;align-items:center;justify-content:space-between;padding:8px 0;border-bottom:1px solid #dbc7d1}
.creative-archive-row > [data-picker-open]{text-align:start;flex:1;min-width:0;overflow-wrap:anywhere}
.creative-archive-row [data-picker-remove]{width:44px;height:44px;flex:none;padding:10px}
.creative-archive-row svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.creative-remove-confirm{padding:12px 0;color:#694455}
.creative-remove-confirm button{margin-inline-end:8px;min-height:44px}
.creative-archive-status{color:#694455;line-height:1.5}
@media(max-width:620px){
 .phrase-game.creative-game,body[data-immersion=game] .phrase-game.creative-game{padding-inline:16px;padding-bottom:24px}
 .phrase-game .creative-top{gap:8px;flex-wrap:wrap}
 .phrase-game .creative-top h1{font-size:25px;order:-1;flex-basis:100%}
 .phrase-intro{grid-template-columns:80px 1fr;gap:12px;margin-bottom:16px}
 .phrase-cover{width:80px;height:80px}
 .phrase-heading h2{font-size:24px}
 .phrase-friend{grid-column:1/-1;display:flex;gap:12px;align-items:center;text-align:start}
 .phrase-friend .phrase-actor{width:72px;height:64px;margin:0}
 .phrase-heading p{font-size:14px}
 .phrase-listen{grid-column:1/-1;display:grid;grid-template-columns:1fr 1fr}
 .phrase-listen button{font-size:13px;padding:8px;white-space:normal}
 .phrase-desk{padding:16px}
 .phrase-title-row{flex-direction:column;align-items:stretch;gap:16px}
 .phrase-title-row label:last-child{width:100%}
 .phrase-bars{gap:6px}
 .phrase-bars button{flex:1 1 calc(50% - 6px);justify-content:center}
 .phrase-actions{gap:8px}
 .phrase-actions button{flex:1 1 140px;min-height:48px}
 .phrase-note{min-height:68px}
 .star-completed-chart{max-width:180px;margin-bottom:20px}
}
@media(prefers-reduced-motion:no-preference){.phrase-note.is-filled{transition:background-color .18s ease-out}.phrase-friend .character{animation:phrase-friend-arrive .5s cubic-bezier(.16,1,.3,1)}@keyframes phrase-friend-arrive{from{filter:brightness(.9)}to{filter:brightness(1)}}}

.cozy-game{max-width:1180px;margin:0 auto;padding-bottom:24px}.cozy-top{display:flex;gap:20px;align-items:center;margin-bottom:6px}.cozy-top h1{margin:3px 0;font-size:clamp(24px,3vw,34px)}.cozy-top small{color:#c8c9e5}.cozy-host{display:flex;gap:18px;align-items:center;min-height:128px}.cozy-host-actor{width:118px;height:128px;flex:none}.cozy-host p{margin:6px 0;color:#d3d4ed;max-width:55ch}.cozy-layout{display:grid;grid-template-columns:minmax(0,1.8fr) minmax(250px,1fr);gap:22px;align-items:start}.cozy-playfield{position:relative;overflow:hidden;border-radius:24px;isolation:isolate;box-shadow:0 16px 40px #080d3266}.cozy-cafe-scene{position:relative;aspect-ratio:6/5;background-size:cover;background-position:center}.cozy-zone{position:absolute;z-index:600;padding:4px 10px;background:#fff3dded;color:#614445;font-size:12px;border-radius:8px;pointer-events:none}.cozy-window{left:10%;top:21%}.cozy-quiet{right:9%;top:21%}.cozy-company{left:42%;top:58%}.cozy-seat{position:absolute;left:var(--x);top:var(--y);transform:translate(-50%,-50%);width:14%;height:23%;border:2px dashed #fff9ecb3;border-radius:40%;background:#ffffff14;z-index:550;touch-action:manipulation;cursor:pointer}.cozy-seat span{display:block;color:#59373d;background:#fff8eae8;border-radius:50%;width:25px;line-height:25px;margin:0 auto;font-weight:700}.cozy-seat:hover,.cozy-seat:focus-visible{background:#fff4d84d;border:3px solid #fff6d6;outline:3px solid #723c7d;outline-offset:2px}.cozy-seat:disabled{cursor:default;border-color:transparent;background:transparent}.cozy-guest{position:absolute;width:18%;height:31%;transform:translate(-50%,-93%);transition:left .7s cubic-bezier(.2,.8,.2,1),top .7s cubic-bezier(.2,.8,.2,1);pointer-events:none}.cozy-chair{position:absolute;width:100%;height:75%;object-fit:contain;bottom:-10%}.cozy-seated{position:absolute;width:100%;height:100%;object-fit:contain;bottom:0;filter:drop-shadow(0 5px 4px #5a362844);animation:cozy-breathe 4s ease-in-out infinite}.cozy-satisfied{position:absolute;top:3%;right:0;color:#cf3766;font-size:24px;opacity:0;transition:opacity .3s}.cozy-guest.is-happy .cozy-satisfied{opacity:1}.cozy-table{position:absolute;left:var(--x);top:var(--y);width:35%;height:32%;transform:translate(-50%,-48%);z-index:var(--depth);pointer-events:none}.cozy-table-art{width:100%;height:100%;object-fit:contain;filter:drop-shadow(0 9px 6px #70442444)}.cozy-table-prop{position:absolute;width:24%;height:35%;object-fit:contain;left:38%;top:3%;animation:cozy-arrive .45s ease-out}.cozy-weather{position:absolute;inset:0;pointer-events:none;z-index:2}.cozy-cafe-scene[data-weather=rain] .cozy-weather{background:linear-gradient(120deg,#8392bd33,transparent 50%)}.cozy-cafe-scene[data-weather=evening] .cozy-weather{background:#69557b22}.cozy-controls{padding:0 2px}.cozy-instruction{color:#e5def0;font-size:15px;line-height:1.5;margin:0 0 12px}.cozy-guests{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.cozy-guests button{display:grid;grid-template-columns:48px minmax(0,1fr);text-align:left;align-items:center;padding:7px;border-radius:12px;border:2px solid #81739f;background:#25284f;color:#fff;min-height:75px;cursor:pointer}.cozy-guests img{grid-row:1/3;width:48px;height:58px;object-fit:contain}.cozy-guests strong{font-size:13px;overflow-wrap:anywhere}.cozy-guests small{font-size:11px;color:#d8cde2}.cozy-guests [aria-pressed=true]{background:#544263;border-color:#ffd09c;box-shadow:0 0 0 2px #ffd09c33}.cozy-guests .is-seated strong::after{content:' ✓';color:#b0ead7}.cozy-actions{display:flex;gap:8px;margin:14px 0;flex-wrap:wrap}.cozy-actions button{flex:1;min-height:44px}.cozy-progress{color:#f8d6bc;font-size:14px;min-height:22px}.cozy-save{width:100%;min-height:48px}.cozy-status{color:#ffd09c;min-height:22px;font-size:14px}.cozy-keepsake{padding:14px 0;border-top:1px solid #8a779f}.cozy-keepsake h2{font-size:21px}.cozy-keepsake p{color:#b6ecdb}.cozy-loading{position:absolute;inset:0;z-index:900;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:24px;text-align:center;background:#f9e8de;color:#553849}.cozy-loading[hidden],.cozy-keepsake[hidden],.cozy-retry[hidden]{display:none}.cozy-kitchen-scene{background-size:cover;background-position:center;display:flex;justify-content:center}.cozy-kitchen-scene canvas{width:100%;max-width:440px;height:auto;aspect-ratio:4/5;touch-action:none;cursor:crosshair}.cozy-next{display:flex;gap:18px;align-items:start;margin-bottom:14px}.cozy-next>div{flex:1;text-align:center;display:flex;flex-direction:column;align-items:center}.cozy-next small{font-size:12px;color:#d6c7df}.cozy-next img{width:84px;height:84px;object-fit:contain;filter:drop-shadow(0 8px 5px #11163366)}.cozy-next strong{font-size:14px;color:#f6d6bf}.cozy-aim{display:flex;flex-direction:column;gap:10px;font-size:14px}.cozy-aim input{width:100%;min-height:44px;accent-color:#eeadc7}.cozy-drop{width:100%;min-height:52px;margin:10px 0 16px}.cozy-recipe{color:#d9c9de;font-size:14px;line-height:1.5;padding-left:12px}.cozy-controls button:disabled{opacity:.55}.cozy-controls button:focus-visible{outline:3px solid #fff0ca;outline-offset:3px}@keyframes cozy-breathe{50%{transform:translateY(-3%) scale(1.025)}}@keyframes cozy-arrive{from{transform:translateY(-18%);opacity:0}to{transform:none;opacity:1}}@media(max-width:850px){.cozy-layout{grid-template-columns:minmax(0,1.4fr) minmax(210px,1fr);gap:14px}.cozy-host{min-height:104px}.cozy-host-actor{width:92px;height:104px}.cozy-guests button{grid-template-columns:40px minmax(0,1fr)}.cozy-guests img{width:40px}}@media(max-width:600px){.cozy-layout{grid-template-columns:1fr;gap:16px}.cozy-top{align-items:start;gap:12px}.cozy-top h1{font-size:25px}.cozy-top .small-button{flex-shrink:0;font-size:12px;min-height:44px;padding:8px}.cozy-host{min-height:94px;gap:12px}.cozy-host-actor{width:86px;height:94px}.cozy-host p{font-size:13px}.cozy-host strong{font-size:15px}.cozy-cafe-scene{aspect-ratio:6/5}.cozy-guests{grid-template-columns:repeat(3,minmax(0,1fr))}.cozy-guests button{display:flex;flex-direction:column;text-align:center;min-height:112px;padding:6px}.cozy-guests img{width:54px;height:54px}.cozy-guests small{font-size:10px;line-height:1.2}.cozy-guests strong{font-size:12px}.cozy-kitchen-scene canvas{max-width:350px}.cozy-next{margin:0}.cozy-next img{height:60px;width:60px}.cozy-next>div{flex-direction:row;flex-wrap:wrap;justify-content:center;gap:8px}.cozy-next small{width:100%}.cozy-zone{font-size:10px;padding:3px 7px}.cozy-table-prop{top:7%}.cozy-kitchen .cozy-controls{display:grid;grid-template-columns:1fr 1fr;gap:8px}.cozy-next,.cozy-recipe,.cozy-instruction,.cozy-progress,.cozy-save,.cozy-status,.cozy-keepsake,.cozy-retry{grid-column:1/-1}.cozy-drop{margin:0;align-self:center}.cozy-kitchen .cozy-instruction{margin-bottom:0}.cozy-kitchen .cozy-progress{margin:4px 0}}@media(prefers-reduced-motion:reduce){.cozy-guest{transition:none}.cozy-seated,.cozy-table-prop{animation:none}}

/* Scene-specific art and safe game controls. */
body:has(.cozy-game) .bottom-nav{display:none}
body[data-immersion]:has(#main .cozy-game){height:auto;min-height:100dvh;overflow:auto}
body[data-immersion]:has(#main .cozy-game) .app-shell{height:auto;min-height:100dvh;padding:0}
.cozy-game{padding-top:calc(var(--cozy-hud-height,110px) + 16px);padding-inline:16px;padding-bottom:calc(36px + env(safe-area-inset-bottom))}
.cozy-window,.cozy-quiet{top:8%}
.cozy-company{top:auto;bottom:3%;left:42%}
.cozy-chair{display:none}
.cozy-satisfied svg{width:22px;height:22px;fill:#ffd3df;stroke:#963151;stroke-width:1.5}
.cozy-seated{height:115%;bottom:-15%}
.cozy-guests [aria-pressed=true]{box-shadow:none}
.cozy-recipe{border-left:0;padding-left:0}
.cozy-kitchen-scene canvas{aspect-ratio:2/3;max-width:400px}
.cozy-top small{display:block;margin-top:5px}
@media(max-width:600px){.cozy-kitchen-scene canvas{max-width:300px}.cozy-game .cozy-controls{padding-bottom:18px}.cozy-top{flex-wrap:wrap}.cozy-top>div{flex:1 1 100%;order:-1;min-width:0}.cozy-top h1{font-size:23px;overflow-wrap:anywhere}}

/* Workshop marble run and Little Garden. Inherits the cozy layout and HUD reserve. */
.craft-board{position:relative;aspect-ratio:400/560;max-width:440px;margin:0 auto}
.craft-board canvas{position:absolute;inset:0;width:100%;height:100%}
.craft-slot{position:absolute;width:15%;height:10.5%;transform:translate(-50%,-50%);border:0;border-radius:14px;background:transparent;cursor:pointer;touch-action:manipulation}
.craft-slot:hover:not(:disabled){background:#fff6dc55;box-shadow:inset 0 0 0 2px #fff3d0}
.craft-slot:focus-visible{outline:3px solid #723c7d;outline-offset:1px;background:#fff6dc66}
.craft-slot:disabled{cursor:default}
.craft-game .cozy-playfield{background:var(--craft-scene) center/cover}
.craft-workshop .cozy-playfield{padding:14px 0}
.craft-tools{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:6px}
.craft-tools button{display:flex;flex-direction:column;align-items:center;gap:2px;min-height:76px;padding:6px 3px;border-radius:12px;border:2px solid #81739f;background:#25284f;color:#fff;cursor:pointer}
.craft-tools svg{width:38px;height:38px}
.craft-tools small{font-size:10.5px;line-height:1.15;text-align:center;color:#e3d8ea}
.craft-tools [aria-pressed=true]{background:#544263;border-color:#ffd09c}
.craft-tools [data-tool=erase] svg{background:#8a5a7a;border-radius:50%}
.craft-tool-art{width:40px;height:38px;object-fit:contain;filter:drop-shadow(0 2px 2px #0005)}
.craft-tool-art.is-left{transform:rotate(-24deg)}.craft-tool-art.is-right{transform:rotate(24deg)}.craft-tool-art.is-fan-left{transform:scaleX(-1)}
.craft-tools.is-deep button{min-height:72px}
.craft-help{color:#cfc4dc;font-size:13px;line-height:1.45;margin:10px 0 0}
.craft-bed-scene{position:relative;aspect-ratio:6/5;background-size:cover;background-position:center;display:flex;align-items:center;justify-content:center}
.craft-bed{display:grid;grid-template-columns:repeat(4,1fr);gap:2.2%;width:min(78%,480px);aspect-ratio:1;padding:3%;border-radius:22px;background:#7a5136e6;box-shadow:0 14px 30px #3b221455,inset 0 0 0 4px #a8784f}
.craft-plot{position:relative;border:0;border-radius:14px;background:radial-gradient(circle at 40% 35%,#9a6a45,#6b4128);box-shadow:inset 0 -4px 0 #00000026;cursor:pointer;padding:0;touch-action:manipulation;overflow:visible}
.craft-plot:hover:not(:disabled){box-shadow:inset 0 0 0 3px #ffe8b0}
.craft-plot:focus-visible{outline:3px solid #fff0ca;outline-offset:2px}
.craft-plot:disabled{cursor:default}
.craft-plot.is-planted{cursor:help}
.craft-plot[data-feature=pond]{background:radial-gradient(circle at 45% 40%,#bfe9f2,#5fa7c2 70%,#4b7f95)}
.craft-plot[data-feature=stone]{background:radial-gradient(circle at 30% 30%,#d9d2c6 0 22%,transparent 23%),radial-gradient(circle at 68% 62%,#c8bfb0 0 26%,transparent 27%),radial-gradient(circle at 40% 35%,#9a6a45,#6b4128)}
.craft-plant{position:absolute;inset:6%;display:flex;align-items:flex-end;justify-content:center;pointer-events:none}
.craft-plant img{width:100%;height:100%;object-fit:contain;transform-origin:50% 92%;filter:drop-shadow(0 4px 3px #3a201266);transition:transform .5s cubic-bezier(.2,.8,.2,1),filter .5s}
.craft-plot[data-level="0"] img{transform:scale(.55);filter:saturate(.55) drop-shadow(0 4px 3px #3a201266)}
.craft-plot[data-level="1"] img{transform:scale(.7)}
.craft-plot[data-level="2"] img{transform:scale(.85)}
.craft-plot[data-level="3"] img{transform:scale(1)}
.craft-plot[data-level="3"]::after{content:'';position:absolute;inset:-4%;border-radius:16px;box-shadow:0 0 0 2px #ffe08a99,0 0 18px #ffe08a88;pointer-events:none}
.craft-plot.is-new .craft-plant img{animation:craft-sprout .6s cubic-bezier(.2,.8,.2,1)}
.craft-bees{position:absolute;right:-4%;top:-6%;width:30%;height:30%;background:radial-gradient(ellipse 30% 22% at 50% 55%,#f7c548 60%,transparent 62%),radial-gradient(ellipse 22% 16% at 38% 30%,#ffffffcc 70%,transparent 72%),radial-gradient(ellipse 22% 16% at 62% 30%,#ffffffcc 70%,transparent 72%);animation:craft-buzz 2.4s ease-in-out infinite;pointer-events:none}
.craft-bees[hidden]{display:none}
.craft-mark{position:absolute;left:6%;top:6%;width:9px;height:9px;border-radius:50%;background:#e9799d;box-shadow:0 0 0 2px #fff7;display:none}
.craft-plot.is-partner .craft-mark{display:block}
.craft-packets{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.craft-packets button{display:grid;grid-template-columns:52px minmax(0,1fr);grid-template-rows:auto auto;column-gap:8px;text-align:left;align-items:center;padding:8px;border-radius:12px;border:2px solid #81739f;background:#25284f;color:#fff;min-height:96px;cursor:pointer}
.craft-packets img{grid-row:1/3;width:52px;height:60px;object-fit:contain}
.craft-packets strong{font-size:13px;overflow-wrap:anywhere}
.craft-packets small{font-size:11px;line-height:1.3;color:#d8cde2}
.craft-packets [aria-pressed=true]{background:#544263;border-color:#ffd09c;box-shadow:0 0 0 2px #ffd09c33}
.craft-pips{position:absolute;left:0;right:0;bottom:5%;display:flex;justify-content:center;gap:4px;pointer-events:none}
.craft-pips i{width:7px;height:7px;border-radius:50%;background:#00000033;box-shadow:0 0 0 1px #fff5}
.craft-plot:not([data-level]) .craft-pips,.craft-plot[data-level=""] .craft-pips{display:none}
.craft-plot[data-level="1"] .craft-pips i:nth-child(-n+1),.craft-plot[data-level="2"] .craft-pips i:nth-child(-n+2),.craft-plot[data-level="3"] .craft-pips i{background:#ffd3df;box-shadow:0 0 0 1px #963151}
.craft-why{min-height:20px;color:#f8e3c8;font-size:13px;line-height:1.45;margin:8px 0 0}
.craft-met{color:#b0ead7}
.craft-notes{margin-top:12px;color:#e5def0;font-size:13px}
.craft-notes summary{cursor:pointer;min-height:32px;color:#f8d6bc}
.craft-notes ul{list-style:none;padding:0;margin:6px 0 0;display:grid;gap:6px}
.craft-notes li{display:grid;grid-template-columns:30px 1fr;gap:8px;align-items:center;line-height:1.35}
.craft-notes img{width:30px;height:30px;object-fit:contain}
.craft-game .cozy-controls button:disabled{opacity:.55}
.craft-game [hidden]{display:none!important}
/* Playground: seesaw */
.seesaw-scene{position:relative;min-height:440px;display:flex;flex-direction:column;justify-content:flex-end;gap:18px;padding:24px 16px 18px;background:linear-gradient(#ffffff00 40%,#2b1f3a66)}
.seesaw{position:relative;height:190px;margin:0 2%}
.seesaw-plank{position:absolute;left:0;right:0;bottom:62px;height:16px;border-radius:9px;background:linear-gradient(#e7b07a,#a66a3b);box-shadow:0 4px 0 #6d4123,0 10px 18px #2c180c55;display:grid;grid-template-columns:repeat(8,1fr);transform:rotate(var(--tilt,0deg));transform-origin:50% 50%;transition:transform .9s cubic-bezier(.3,1.4,.5,1)}
.seesaw-seat{position:relative;border:0;background:transparent;height:16px;cursor:pointer;padding:0;touch-action:manipulation}
.seesaw-seat::before{content:'';position:absolute;left:50%;top:-6px;width:70%;height:6px;transform:translateX(-50%);border-radius:4px;background:#fff3dc88}
.seesaw-seat small{position:absolute;left:50%;top:20px;transform:translateX(-50%);font-size:11px;font-weight:700;color:#fff8ea;text-shadow:0 1px 2px #3a2219}
.seesaw-seat:disabled{opacity:1;cursor:default}
.seesaw-seat:focus-visible{outline:3px solid #fff0ca;outline-offset:4px}
.seesaw-seat.is-selected .seesaw-friend img{filter:drop-shadow(0 0 6px #ffd27a)}
.seesaw-friend{position:absolute;left:50%;bottom:12px;width:min(88px,12vw);transform:translateX(-50%);pointer-events:none}
.seesaw-friend img{width:100%;height:auto;display:block;filter:drop-shadow(0 4px 3px #2c180c66)}
.seesaw-seat.is-partner .seesaw-friend::after{content:'';position:absolute;right:2px;top:2px;width:9px;height:9px;border-radius:50%;background:#e9799d;box-shadow:0 0 0 2px #fff7}
.seesaw-weight{position:absolute;left:50%;bottom:-6px;transform:translateX(-50%);display:flex;gap:2px;padding:2px 4px;border-radius:8px;background:#3a2a4dcc}
.seesaw-weight i{width:7px;height:7px;border-radius:50%;background:#ffd27a}
.seesaw-pin{position:absolute;left:4px;top:4px;width:8px;height:8px;border-radius:50%;background:#9fd7ff;box-shadow:0 0 0 2px #fff7}
.seesaw-pivot{position:absolute;left:50%;bottom:0;width:0;height:0;transform:translateX(-50%);border-left:34px solid transparent;border-right:34px solid transparent;border-bottom:64px solid #8f6ab0;filter:drop-shadow(0 6px 6px #1d123044)}
.seesaw.is-level .seesaw-plank{animation:seesaw-ride 2.6s ease-in-out infinite}
.seesaw-bench{display:flex;flex-wrap:wrap;gap:8px;justify-content:center;min-height:96px;padding:10px;border-radius:16px;background:#5b3b2ccc;box-shadow:inset 0 -5px 0 #3c2519}
.seesaw-bench p{margin:auto;color:#f8e3c8}
.seesaw-waiting{position:relative;display:flex;flex-direction:column;align-items:center;width:84px;padding:4px 4px 8px;border:2px solid transparent;border-radius:12px;background:#ffffff14;color:#fff;cursor:pointer}
.seesaw-waiting img{width:56px;height:56px;object-fit:contain}
.seesaw-waiting strong{font-size:11px;line-height:1.1;margin-top:9px;text-align:center;overflow-wrap:anywhere}
.seesaw-waiting .seesaw-weight{position:static;transform:none;margin-top:-4px}
.seesaw-waiting.is-selected{border-color:#ffd09c;background:#ffffff2e}
.seesaw-meter{display:grid;grid-template-columns:1fr auto 1fr;gap:10px;align-items:center;text-align:center;margin-bottom:10px;padding:10px;border-radius:14px;background:#25284f}
.seesaw-meter small{display:block;color:#d6c7df;font-size:12px}
.seesaw-meter strong{font-size:28px;color:#ffe6c4}
.seesaw-vs{font-size:28px;font-weight:700;color:#ffd09c}
@keyframes seesaw-ride{25%{transform:rotate(5deg)}75%{transform:rotate(-5deg)}}
/* Library: picture book */
.book-scene{min-height:440px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;padding:22px 14px}
.book{display:grid;grid-template-columns:1fr 1fr;width:min(100%,680px);aspect-ratio:3/2;border-radius:10px;background:#7b4b3a;padding:10px;box-shadow:0 18px 40px #1b0f2c66}
.book-page{background:#fff8ec;padding:14px;overflow:auto;color:#4b3436}
.book-left{border-radius:6px 0 0 6px;box-shadow:inset -14px 0 18px -12px #6d4a3a66;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;text-align:center}
.book-right{border-radius:0 6px 6px 0;box-shadow:inset 14px 0 18px -12px #6d4a3a66}
.book-left img{max-width:100%;max-height:62%;object-fit:contain;border-radius:8px}
.book-left img[src*="scene-"]{width:100%;object-fit:cover}
.book-emblem svg{width:96px;height:96px}
.book-caption{margin:0;font-size:15px;line-height:1.45;font-family:Georgia,serif}
.book-lines{margin:0;padding-left:20px;font-family:Georgia,serif;font-size:14px;line-height:1.55}
.book-lines li{margin-bottom:6px}
.book-lines li.is-partner{color:#8a3c62}
.book-lines li.is-current{background:#ffe9c2;border-radius:6px}
.book-nav{display:flex;align-items:center;gap:12px;color:#f8e3c8}
.book-cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.book-cards button{display:flex;flex-direction:column;align-items:center;gap:6px;padding:8px;min-height:150px;border-radius:12px;border:2px solid #81739f;background:#25284f;color:#fff;cursor:pointer;text-align:center}
.book-cards img{width:100%;height:72px;object-fit:contain;border-radius:8px}
.book-cards img[src*="scene-"]{object-fit:cover}
.book-cards .book-emblem svg{width:60px;height:60px}
.book-cards span{font-size:12px;line-height:1.3}
.book-cards button:hover:not(:disabled){border-color:#ffd09c}
/* Café: layered drinks */
.drink-scene{min-height:440px;display:grid;grid-template-columns:1fr 1fr;align-items:end;gap:12px;padding:20px;background:linear-gradient(#ffffff00 45%,#3a223366)}
.drink-guest{display:flex;flex-direction:column;align-items:center;gap:8px}
.drink-guest img{width:min(170px,100%);height:auto;filter:drop-shadow(0 8px 6px #2c180c55)}
.drink-bubble{order:-1;background:#fff8ec;color:#4b3436;border-radius:16px;padding:10px 12px;font-size:14px;line-height:1.45;box-shadow:0 6px 14px #2c180c33;position:relative}
.drink-bubble::after{content:'';position:absolute;left:46%;bottom:-10px;border:10px solid transparent;border-top-color:#fff8ec;border-bottom:0}
.drink-word{font-weight:700;border-bottom:4px solid var(--c)}
.drink-counter{display:flex;justify-content:center;padding-bottom:10px}
.drink-glass{position:relative;width:120px;height:210px;border:4px solid #ffffffcc;border-top:0;border-radius:0 0 26px 26px;background:#ffffff26;box-shadow:inset 0 0 12px #ffffff55,0 10px 18px #2c180c44;overflow:visible}
.drink-fill{position:absolute;left:0;right:0;bottom:0;display:flex;flex-direction:column;border-radius:0 0 22px 22px;overflow:hidden}
.drink-layer{height:44px;background:var(--c);border-top:1px solid #ffffff55;animation:drink-pour .5s ease-out}
.drink-layer.is-mixed{background:repeating-linear-gradient(115deg,var(--c) 0 10px,#c99a7a 10px 18px);filter:saturate(.75)}
.drink-garnish{position:absolute;left:50%;top:-30px;width:40px;height:40px;transform:translateX(-50%);border-radius:50%;background:radial-gradient(circle,#ffd27a 0 30%,transparent 32%),radial-gradient(circle at 30% 30%,#f08fae 0 12%,transparent 14%),radial-gradient(circle at 70% 60%,#66c79a 0 12%,transparent 14%)}
.drink-garnish[data-g="1"]{background:linear-gradient(80deg,transparent 46%,#f07a9a 46% 54%,transparent 54%);border-radius:0;top:-46px;height:60px}
.drink-garnish[data-g="2"]{background:radial-gradient(circle,#f3c79a 0 50%,#c9864c 52% 58%,transparent 60%)}
.drink-garnish[data-g="3"]{background:radial-gradient(ellipse 40% 25% at 50% 50%,#3fae6f 90%,transparent 92%)}
.drink-bottles{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:6px}
.drink-bottles button{display:flex;flex-direction:column;align-items:center;gap:2px;padding:6px 2px;min-height:110px;border-radius:12px;border:2px solid #81739f;background:#25284f;color:#fff;cursor:pointer}
.drink-bottles svg{width:30px;height:42px}
.drink-bottles strong{font-size:11px;line-height:1.15;text-align:center}
.drink-bottles small{font-size:9.5px;line-height:1.15;color:#d8cde2;text-align:center}
.craft-notes p{line-height:1.5;margin:6px 0 0}
@keyframes drink-pour{from{transform:translateY(-30px);opacity:0}}
/* Town: lantern code */
.lantern-scene{min-height:440px;display:flex;flex-direction:column;gap:16px;padding:22px 16px;background:linear-gradient(#1b1438cc,#1b143855 60%,#1b1438cc)}
.lantern-string{display:flex;justify-content:center;gap:clamp(10px,4vw,28px);padding-top:18px;border-top:3px solid #c8a77a;border-radius:50% 50% 0 0/14px 14px 0 0}
.lantern{position:relative;display:flex;align-items:center;justify-content:center;width:64px;height:78px;border-radius:22px 22px 26px 26px;background:var(--c);box-shadow:0 0 0 3px #3b2a1f,0 10px 16px #0007;opacity:.85}
.lantern::before{content:'';position:absolute;top:-18px;left:50%;width:2px;height:18px;background:#c8a77a}
.lantern.is-empty{background:#4b436688;border:2px dashed #c8bfe0;box-shadow:none}
.lantern.is-lit{opacity:1;box-shadow:0 0 0 3px #3b2a1f,0 0 28px var(--c),0 0 60px var(--c);animation:lantern-glow 2.4s ease-in-out infinite}
.lantern .lantern-shape{width:36px;height:36px}
.lantern-history{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:6px;max-height:260px;overflow:auto}
.lantern-history li{display:grid;grid-template-columns:minmax(80px,130px) 1fr auto;align-items:center;gap:8px;padding:6px 10px;border-radius:12px;background:#ffffff14;color:#f3e9ff;font-size:13px}
.lantern-history li.is-partner{background:#e9799d22}
.lantern-history .lantern-empty{display:block;text-align:center;color:#d8cde2}
.lantern-who{font-weight:700;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.lantern-mini{display:flex;gap:4px}
.lantern-dot{display:inline-flex;width:26px;height:26px;border-radius:8px;background:var(--c);align-items:center;justify-content:center}
.lantern-dot .lantern-shape{width:18px;height:18px}
.lantern-sparks{display:inline-flex;gap:3px;vertical-align:middle}
.lantern-sparks i{width:12px;height:12px;border-radius:50%}
.lantern-sparks .gold{background:#ffd23f;box-shadow:0 0 6px #ffd23f}
.lantern-sparks .silver{background:#dfe6f3;box-shadow:0 0 4px #dfe6f3}
.lantern-sparks .none{background:transparent;border:1px solid #ffffff44}
.lantern-palette{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:6px}
.lantern-palette button{display:flex;flex-direction:column;align-items:center;gap:3px;padding:6px 2px;min-height:78px;border-radius:12px;border:2px solid #81739f;background:#25284f;color:#fff;cursor:pointer}
.lantern-palette [aria-pressed=true]{border-color:#ffd09c;background:#544263}
.lantern-palette small{font-size:10.5px;text-align:center;line-height:1.15}
.lantern-shape{display:block}
.lantern-shape.big{width:36px;height:36px;border-radius:10px;background:var(--c);padding:4px}
@keyframes lantern-glow{50%{filter:brightness(1.15)}}
@keyframes craft-sprout{from{transform:scale(.2);opacity:.2}}
@keyframes craft-buzz{50%{transform:translate(-3px,-3px) rotate(-8deg)}}
.craft-game .cozy-actions{flex-wrap:wrap}
@media(max-width:600px){.seesaw-scene{min-height:360px;padding:16px 6px 12px}.seesaw{height:150px}.seesaw-plank{bottom:50px}.seesaw-pivot{border-left-width:24px;border-right-width:24px;border-bottom-width:50px}.seesaw-waiting{width:70px}.book{grid-template-columns:1fr;aspect-ratio:auto}.book-left{border-radius:6px 6px 0 0;min-height:220px}.book-right{border-radius:0 0 6px 6px}.book-cards button{min-height:130px}.drink-scene{grid-template-columns:1fr;justify-items:center;min-height:0;gap:22px}.drink-glass{height:170px;width:104px}.drink-layer{height:36px}.drink-guest{flex-direction:row}.drink-guest img{width:90px}.drink-bubble{order:0}.drink-bubble::after{display:none}.drink-bottles small{display:none}.drink-bottles button{min-height:80px}.lantern{width:52px;height:64px}.lantern-history li{grid-template-columns:62px 1fr auto}.craft-board{max-width:340px}.craft-tools small{font-size:9.5px}.craft-tools button{min-height:66px}.craft-tools svg,.craft-tool-art{width:30px;height:30px}.craft-bed{width:90%}.craft-packets button{grid-template-columns:40px minmax(0,1fr);min-height:84px}.craft-packets img{width:40px;height:48px}.craft-packets small{font-size:10px}.craft-game .cozy-controls{display:block}}
@media(prefers-reduced-motion:reduce){.seesaw-plank{transition:none}.seesaw.is-level .seesaw-plank,.lantern.is-lit,.drink-layer{animation:none}.craft-plant img{transition:none}.craft-plot.is-new .craft-plant img,.craft-bees{animation:none}}
/* Café v9: Mimi's Mixology bar */
.bar-scene{position:relative;min-height:460px;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:end;gap:10px;padding:18px 18px 0;background:linear-gradient(#1b0f2600 30%,#1b0f2699)}
.bar-guest{display:flex;flex-direction:column;align-items:center;gap:8px;padding-bottom:70px}
.bar-guest img{width:min(190px,100%);filter:drop-shadow(0 10px 8px #1a0c1866);animation:bar-idle 3.2s ease-in-out infinite}
.bar-bubble{order:-1;position:relative;display:flex;gap:10px;align-items:flex-start;max-width:290px;padding:12px 14px;border-radius:18px;background:#fff8ef;color:#4b2f38;box-shadow:0 8px 18px #1a0c1844;font-size:15px;line-height:1.45}
.bar-bubble::after{content:'';position:absolute;left:46%;bottom:-11px;border:11px solid transparent;border-top-color:#fff8ef;border-bottom:0}
.bar-bubble p{margin:0}
.bar-mood{font-size:30px;line-height:1;animation:bar-bob 2.4s ease-in-out infinite}
.bar-counter{position:relative;display:flex;justify-content:center;align-items:flex-end;min-height:330px;padding-bottom:58px}
.bar-scene::before{content:'';position:absolute;left:0;right:0;bottom:0;height:64px;border-top:6px solid #c88a55;background:linear-gradient(#9b5f36,#6d3f22)}
.bar-glass-wrap{position:relative;z-index:2;width:min(270px,95%);margin-bottom:-14px}
.bar-glass{display:block;width:100%;height:auto;overflow:visible;filter:drop-shadow(0 6px 10px #1a0c1855)}
.bar-glass-empty{display:grid;place-items:center;height:200px;border:3px dashed #fff8;border-radius:24px;color:#fff;font-weight:700;margin-bottom:10px}
.bar-liquid{animation:bar-slosh 3.6s ease-in-out infinite;transform-origin:100px 240px}
.bar-layer.is-new{animation:bar-fill .55s cubic-bezier(.2,.8,.2,1);transform-box:fill-box;transform-origin:50% 100%}
.bar-layer.is-stirred{animation:bar-swirl .9s ease-out}
.bar-surface{animation:bar-wave 2.2s ease-in-out infinite;transform-box:fill-box;transform-origin:center}
.bar-ice{fill:#e9f8ffcc;stroke:#fff;stroke-width:2;animation:bar-float 3s ease-in-out infinite}
.bar-fizz{fill:#ffffffcc;animation:bar-rise 2.2s linear infinite}
.bar-garnish{animation:bar-drop .5s cubic-bezier(.3,1.5,.5,1)}
.bar-pour{position:absolute;z-index:3;left:50%;top:-10px;width:120px;height:240px;transform:translateX(-10%);pointer-events:none;opacity:0}
.bar-pour.is-on{opacity:1}
.bar-pour-bottle{position:absolute;left:30px;top:0;width:58px;transform-origin:50% 80%;animation:bar-tilt .65s ease-in-out forwards}
.bar-pour-bottle svg{width:100%;height:auto}
.bar-stream{position:absolute;left:30px;top:56px;width:9px;height:0;border-radius:5px;background:var(--c);box-shadow:0 0 6px var(--c);animation:bar-stream .65s ease-in forwards}
.bar-react{position:absolute;z-index:5;left:50%;top:18%;transform:translate(-50%,0);display:flex;flex-direction:column;align-items:center;gap:6px;pointer-events:none;opacity:0}
.bar-react.is-on{animation:bar-pop 2.4s ease-out forwards}
.bar-stars{font-size:54px;color:#ffd23f;text-shadow:0 0 18px #ffd23f99,0 4px 0 #b07d1e;letter-spacing:4px}
.bar-stars i{font-style:normal;color:#ffffff40;text-shadow:none}
.bar-recipe{padding:8px 16px;border-radius:14px;background:#fff3c4;color:#7a4b00;text-align:center;font-weight:700;box-shadow:0 6px 16px #0005}
.bar-recipe strong{font-size:20px}
.bar-hearts{position:relative;width:200px;height:40px}
.bar-hearts i{position:absolute;font-style:normal;font-size:22px;animation:bar-heart 1.8s ease-out forwards}
.bar-hearts i:nth-child(odd){left:20%}.bar-hearts i:nth-child(even){left:70%}.bar-hearts i:nth-child(3n){left:45%;animation-delay:.2s}.bar-hearts i:nth-child(4n){left:85%;animation-delay:.35s}
.bar-meters{display:grid;gap:8px;margin-bottom:12px;padding:12px;border-radius:16px;background:#25284f}
.bar-wishes{list-style:none;display:flex;flex-wrap:wrap;gap:6px;margin:4px 0 0;padding:0}
.bar-wishes li{padding:4px 10px;border-radius:999px;background:#ffffff14;color:#e9def5;font-size:13px}
.bar-wishes li.is-met{background:#6fe3a633;color:#c9f7df}
.bar-garnish-art[src*="garnish-umbrella"]{transform:scaleX(-1)}
.bar-meter{display:grid;grid-template-columns:62px 1fr 62px;align-items:center;gap:8px}
.bar-end{display:flex;flex-direction:column;align-items:center;font-size:22px;line-height:1}
.bar-end small{font-size:11px;color:#d8cde2;margin-top:3px}
.bar-track{position:relative;height:18px;border-radius:10px;background:linear-gradient(90deg,#fff2 0 49.5%,#fff6 49.5% 50.5%,#fff2 50.5%)}
.bar-zone{position:absolute;top:0;bottom:0;border-radius:10px;background:#6fe3a6;box-shadow:0 0 10px #6fe3a6aa;opacity:.75}
.bar-meter.is-met .bar-zone{animation:bar-glow 1.2s ease-in-out infinite}
.bar-needle{position:absolute;top:50%;width:26px;height:26px;margin-left:-13px;border-radius:50%;background:radial-gradient(circle at 35% 35%,#fff,#ffd09c);border:3px solid #7a3d60;transform:translateY(-50%);transition:left .6s cubic-bezier(.3,1.6,.5,1)}
.bar-steps{display:flex;gap:4px;list-style:none;padding:0;margin:0 0 10px;flex-wrap:wrap}
.bar-steps li{padding:4px 10px;border-radius:999px;background:#ffffff14;color:#cfc4dc;font-size:12px}
.bar-steps li.is-now{background:#ffd09c;color:#3d2433;font-weight:700}
.bar-steps li.is-done{background:#6fe3a633;color:#bff3d6}
.bar-prompt{color:#f3e9ff;font-size:15px;line-height:1.45;margin:0 0 10px}
.bar-small{color:#cfc4dc;font-size:12px;margin:8px 0 4px}
.bar-choices{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.bar-choices button,.bar-bottles button{display:flex;flex-direction:column;align-items:center;gap:4px;padding:8px 4px;border-radius:14px;border:2px solid #81739f;background:#25284f;color:#fff;cursor:pointer;transition:transform .15s}
.bar-choices button:hover:not(:disabled),.bar-bottles button:hover:not(:disabled){transform:translateY(-3px);border-color:#ffd09c}
.bar-choices button:active:not(:disabled),.bar-bottles button:active:not(:disabled){transform:scale(.95)}
.bar-choices svg{width:56px;height:62px}
.bar-choices strong,.bar-bottles strong{font-size:12px;text-align:center;line-height:1.2}
.bar-choices small{font-size:11px;color:#d8cde2}
.bar-choices.is-garnish svg{width:60px;height:44px}
.bar-choices.is-mini{grid-template-columns:repeat(3,minmax(0,1fr))}
.bar-choices.is-mini button{padding:6px 2px}
.bar-choices [aria-pressed=true]{border-color:#ffd09c;background:#544263}
.bar-ice-pic{display:flex;flex-wrap:wrap;justify-content:center;gap:3px;width:56px;height:46px;align-content:center}
.bar-ice-pic i{width:20px;height:20px;border-radius:5px;background:#e9f8ffcc;border:2px solid #fff;transform:rotate(12deg)}
.bar-ice-pic b{font-size:26px;color:#d8cde2}
.bar-bottles{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
.bar-bottles svg{width:36px;height:52px;filter:drop-shadow(0 4px 3px #0006)}
.bar-bottle-art{width:44px;height:58px;object-fit:contain;filter:drop-shadow(0 4px 3px #0006)}
.bar-pour-bottle .bar-bottle-art{width:100%;height:auto}
.bar-garnish-art{width:52px;height:46px;object-fit:contain;filter:drop-shadow(0 3px 2px #0005)}
.bar-ice-pic img{width:22px;height:22px;object-fit:contain}
.bar-ice-pic img:nth-child(odd){transform:rotate(12deg)}
.bar-bottles button.is-tip{border-color:#ffe066;box-shadow:0 0 0 3px #ffe06655,0 0 22px #ffe066aa;animation:bar-wiggle .7s ease-in-out infinite}
.bar-taste{display:flex;gap:2px;font-size:13px}
.bar-taste i{font-style:normal}
.bar-serve{font-size:17px;min-height:52px}
.bar-help{margin-top:12px}
.bar-book ul{list-style:none;padding:0;margin:8px 0 0;display:grid;gap:8px}
.bar-book li{display:grid;gap:2px;padding:8px 10px;border-radius:10px;background:#ffffff10}
.bar-book li span{font-size:12px;color:#d8cde2;line-height:1.4}
.bar-book li.is-found{background:#ffd23f22;box-shadow:inset 0 0 0 1px #ffd23f66}
@keyframes bar-idle{50%{transform:translateY(-6px)}}
@keyframes bar-bob{50%{transform:translateY(-4px) rotate(-6deg)}}
@keyframes bar-slosh{25%{transform:rotate(.8deg)}75%{transform:rotate(-.8deg)}}
@keyframes bar-fill{from{transform:scaleY(0)}}
@keyframes bar-swirl{0%{filter:hue-rotate(0) saturate(2)}50%{filter:hue-rotate(60deg) saturate(1.6)}100%{filter:none}}
@keyframes bar-wave{50%{transform:scaleY(1.6)}}
@keyframes bar-float{50%{transform:translateY(-3px)}}
@keyframes bar-rise{from{transform:translateY(0);opacity:.9}to{transform:translateY(var(--rise,-100px));opacity:0}}
@keyframes bar-drop{from{transform:translateY(-40px);opacity:0}}
@keyframes bar-tilt{0%{transform:translate(40px,-30px) rotate(0)}35%{transform:translate(0,0) rotate(-120deg)}85%{transform:translate(0,0) rotate(-120deg)}100%{transform:translate(30px,-20px) rotate(0);opacity:0}}
@keyframes bar-stream{0%,25%{height:0}45%,85%{height:150px;top:56px}100%{height:0;top:200px}}
@keyframes bar-pop{0%{opacity:0;transform:translate(-50%,20px) scale(.6)}12%{opacity:1;transform:translate(-50%,0) scale(1.1)}20%{transform:translate(-50%,0) scale(1)}80%{opacity:1}100%{opacity:0;transform:translate(-50%,-20px)}}
@keyframes bar-heart{from{transform:translateY(0) scale(.6);opacity:1}to{transform:translateY(-90px) scale(1.2);opacity:0}}
@keyframes bar-glow{50%{box-shadow:0 0 18px #6fe3a6}}
@keyframes bar-wiggle{25%{transform:rotate(-5deg)}75%{transform:rotate(5deg)}}
@media(max-width:600px){.bar-scene{grid-template-columns:1fr;min-height:0;padding-top:12px}.bar-guest{flex-direction:row;padding-bottom:0;align-items:flex-start}.bar-guest img{width:96px}.bar-bubble{order:1;font-size:13px}.bar-bubble::after{display:none}.bar-counter{min-height:270px}.bar-glass-wrap{width:190px}.bar-bottles{grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}.bar-bottles svg{width:28px;height:42px}.bar-meter{grid-template-columns:52px 1fr 52px}.bar-stars{font-size:42px}}
@media(prefers-reduced-motion:reduce){.bar-guest img,.bar-mood,.bar-liquid,.bar-surface,.bar-ice,.bar-fizz,.bar-bottles button.is-tip,.bar-meter.is-met .bar-zone{animation:none}.bar-needle{transition:none}}
/* Town v9: Delivery Bot */
.town-scene{display:flex;justify-content:center;padding:18px;background:linear-gradient(#ffffff00,#1b143855)}
.town-frame{width:min(100%,560px);border-radius:24px;box-shadow:0 16px 36px #1b143866}
.town-board{display:block;width:100%;height:auto;border-radius:22px}
.town-board.is-deliver{animation:town-flash .5s ease-out}
.town-van{transition:transform .38s cubic-bezier(.4,.1,.3,1)}
.town-pad{animation:town-pulse 1.8s ease-in-out infinite;transform-box:fill-box;transform-origin:center}
[data-coin].is-taken{animation:town-take .45s ease-in forwards}
.town-dropped{animation:town-in .35s ease-out}
.town-van-body{animation:town-bob .5s ease-in-out infinite alternate}
.town-van.is-bump .town-van-body{animation:town-bump .4s ease-in-out}
.town-coin{animation:town-spin 1.6s ease-in-out infinite;transform-box:fill-box;transform-origin:center}
.town-door{animation:town-pulse 1.8s ease-in-out infinite;transform-box:fill-box;transform-origin:center}
.town-goals{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:10px}
.town-goals span{padding:5px 10px;border-radius:999px;background:#ffffff14;color:#e9def5;font-size:13px}
.town-goals .is-met{background:#6fe3a633;color:#c9f7df}
.town-goals .is-over{background:#ffb4a633;color:#ffd9d1}
.town-program{list-style:none;display:grid;grid-template-columns:repeat(10,minmax(0,1fr));gap:4px;padding:8px;margin:0 0 10px;border-radius:14px;background:#25284f}
.town-program li{aspect-ratio:1}
.town-program span{display:block;width:100%;height:100%;border-radius:8px;border:2px dashed #ffffff30}
.town-program button{width:100%;height:100%;border-radius:8px;border:0;background:#ffd09c;color:#3d2433;font-size:20px;font-weight:800;cursor:pointer;padding:0;animation:town-in .25s ease-out}
.town-program button.is-tip{background:#ffe066;box-shadow:0 0 12px #ffe066}
.town-arrows{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.town-arrows button{display:flex;flex-direction:column;align-items:center;gap:2px;min-height:84px;border-radius:16px;border:2px solid #81739f;background:#25284f;color:#fff;cursor:pointer;transition:transform .12s}
.town-arrows button span{font-size:36px;line-height:1}
.town-arrows button small{font-size:12px;color:#d8cde2}
.town-arrows button:active:not(:disabled){transform:scale(.93)}
.town-go{font-size:18px;min-height:52px;flex:2}
@keyframes town-bob{to{transform:translateY(-2px)}}
@keyframes town-bump{25%{transform:translateY(-10px) rotate(-6deg)}50%{transform:translateY(4px) rotate(5deg)}75%{transform:translateY(-4px)}}
@keyframes town-spin{50%{transform:scaleX(.35)}}
@keyframes town-pulse{50%{transform:scale(1.08)}}
@keyframes town-flash{40%{filter:brightness(1.25) saturate(1.3)}}
@keyframes town-in{from{transform:scale(.4)}}

@keyframes town-take{to{transform:translateY(-40px);opacity:0}}
@media(max-width:600px){.town-scene{padding:8px}.town-program button{font-size:15px}.town-arrows button{min-height:70px}.town-arrows button span{font-size:30px}}
@media(prefers-reduced-motion:reduce){.town-van-body,.town-coin,.town-door,.town-pad,.town-program button{animation:none}}
/* Playground v9: drag-and-drop seesaw */
.see-scene{display:flex;flex-direction:column;gap:10px;padding:14px;background:linear-gradient(#ffffff00 40%,#2b1f3a66)}
.see-board{display:block;width:100%;height:auto;overflow:visible;touch-action:none}
.see-plank{transition:transform 1s cubic-bezier(.3,1.7,.45,1)}
.see-plank.is-riding{animation:see-ride 2.4s ease-in-out infinite}
.see-step{font-size:15px;font-weight:800;fill:#fff8ea;paint-order:stroke;stroke:#3a2219;stroke-width:3px}
.see-weight{font-size:16px;font-weight:800;fill:#fff;paint-order:stroke;stroke:#3a2a4d;stroke-width:3px}
.see-seat{cursor:pointer}
.see-seat.is-hover rect{opacity:1;fill:#ffe066}
.see-friend{cursor:grab;animation:see-land .5s cubic-bezier(.3,1.6,.5,1)}
.see-friend image{filter:drop-shadow(0 6px 4px #2c180c66)}
.see-friend.is-selected image{filter:drop-shadow(0 0 8px #ffd27a)}
.see-friend.is-partner image{filter:drop-shadow(0 0 6px #f08fae)}
.see-plank.is-riding .see-friend{animation:see-bounce .6s ease-in-out infinite alternate}
.see-ghost{fill:#ffe06640;stroke:#ffe066;stroke-width:3;stroke-dasharray:8 6;animation:see-glow 1s ease-in-out infinite}
.see-party rect{animation:see-confetti 1.8s ease-in forwards}
.see-bench{display:flex;flex-wrap:wrap;gap:8px;justify-content:center;min-height:110px;padding:10px;border-radius:16px;background:#5b3b2ccc;box-shadow:inset 0 -5px 0 #3c2519}
.see-bench p{margin:auto;color:#f8e3c8;font-weight:700}
.see-card{display:flex;flex-direction:column;align-items:center;width:92px;padding:6px 4px 8px;border:2px solid transparent;border-radius:14px;background:#ffffff1a;color:#fff;cursor:grab;touch-action:none;transition:transform .15s}
.see-card:hover:not(:disabled){transform:translateY(-3px)}
.see-card img{width:62px;height:62px;object-fit:contain;pointer-events:none}
.see-card strong{font-size:11px;line-height:1.1;text-align:center;overflow-wrap:anywhere}
.see-card small{font-size:11px;color:#ffd23f;letter-spacing:1px}
.see-card.is-selected{border-color:#ffd09c;background:#ffffff33}
.see-card.is-idea{border-color:#ffe066;box-shadow:0 0 16px #ffe06699;animation:see-glow 1s ease-in-out infinite}
.see-balloon-pic{display:block;width:62px;height:62px;object-fit:contain}
.see-balloons{animation:see-sway 3s ease-in-out infinite alternate;transform-box:fill-box;transform-origin:50% 100%}
@keyframes see-sway{from{transform:rotate(-4deg)}to{transform:rotate(4deg)}}
.see-drag{position:fixed;left:0;top:0;z-index:9999;width:90px;pointer-events:none;filter:drop-shadow(0 12px 10px #0006)}
.see-drag img{width:90px;height:auto}
@keyframes see-ride{0%,100%{transform:rotate(-6deg)}50%{transform:rotate(6deg)}}
@keyframes see-bounce{to{transform:translateY(-10px)}}
@keyframes see-land{from{transform:translateY(-60px);opacity:.3}}
@keyframes see-glow{50%{opacity:.55}}
@keyframes see-confetti{to{transform:translateY(480px) rotate(540deg);opacity:.2}}
@media(max-width:600px){.see-card{width:74px}.see-card img{width:48px;height:48px}}
@media(prefers-reduced-motion:reduce){.see-plank{transition:none}.see-friend,.see-plank.is-riding .see-friend,.see-ghost,.see-card.is-idea,.see-party rect,.see-balloons{animation:none}}
/* App icons inherit a stroke; drawn game boards must not. */
.see-board,.bar-glass,.town-board,.bar-choices svg,.bar-bottles svg,.craft-tools svg,.book-emblem svg,.drink-bottles svg{stroke:none}
/* Garden v9: six-day growing season */
.grow-scene{position:relative;display:flex;flex-direction:column;gap:12px;padding:14px;background:linear-gradient(#ffffff00 30%,#2b1f3a55)}
.grow-sky{position:relative;overflow:hidden;display:flex;flex-direction:column;gap:2px;padding:12px 16px;border-radius:16px;color:#3b2a1f;background:linear-gradient(#bfe6ff,#fff3d6);box-shadow:0 6px 16px #1b143833}
.grow-sky[data-weather=cloud]{background:linear-gradient(#d7dcea,#f2efe8)}
.grow-sky[data-weather=rain]{background:linear-gradient(#9aa9c8,#d9dfeb);color:#1f2a40}
.grow-sky strong{font-size:17px;position:relative}.grow-sky span{font-size:13px;position:relative}
.grow-sun{position:absolute;right:18px;top:-24px;width:80px;height:80px;border-radius:50%;background:radial-gradient(circle,#ffe066 40%,#ffd23f00 70%);animation:grow-pulse 3s ease-in-out infinite}
.grow-sky:not([data-weather=sun]) .grow-sun{opacity:.25}
.grow-rain{position:absolute;inset:0;display:none}
.grow-sky[data-weather=rain] .grow-rain{display:block}
.grow-rain i{position:absolute;top:-10px;width:2px;height:12px;background:#ffffffb0;animation:grow-drop 1s linear infinite}
.grow-rain i:nth-child(odd){animation-duration:.8s}
.grow-rain i:nth-child(1){left:5%}.grow-rain i:nth-child(2){left:11%;animation-delay:.3s}.grow-rain i:nth-child(3){left:17%;animation-delay:.6s}.grow-rain i:nth-child(4){left:23%;animation-delay:.1s}.grow-rain i:nth-child(5){left:29%;animation-delay:.5s}.grow-rain i:nth-child(6){left:35%;animation-delay:.2s}.grow-rain i:nth-child(7){left:41%;animation-delay:.7s}.grow-rain i:nth-child(8){left:47%;animation-delay:.4s}.grow-rain i:nth-child(9){left:53%;animation-delay:.9s}.grow-rain i:nth-child(10){left:59%;animation-delay:.15s}.grow-rain i:nth-child(11){left:65%;animation-delay:.55s}.grow-rain i:nth-child(12){left:71%;animation-delay:.35s}.grow-rain i:nth-child(13){left:77%;animation-delay:.75s}.grow-rain i:nth-child(14){left:83%;animation-delay:.05s}.grow-rain i:nth-child(15){left:89%;animation-delay:.45s}.grow-rain i:nth-child(16){left:95%;animation-delay:.65s}.grow-rain i:nth-child(17){left:8%;animation-delay:.85s}.grow-rain i:nth-child(18){left:62%;animation-delay:.25s}
.grow-bed{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;width:min(100%,520px);margin:0 auto;padding:12px;border-radius:22px;background:#7a5136;box-shadow:0 14px 30px #3b221455,inset 0 0 0 5px #a8784f}
.grow-plot{position:relative;aspect-ratio:1;border:0;border-radius:14px;background:radial-gradient(circle at 40% 35%,#9a6a45,#6b4128);box-shadow:inset 0 -5px 0 #0002;cursor:pointer;padding:0;touch-action:manipulation}
.grow-plot svg{position:absolute;inset:0;width:100%;height:100%;overflow:visible;stroke:none}
.grow-plot:hover:not(:disabled){box-shadow:inset 0 0 0 3px #ffe8b0}
.grow-plot:focus-visible{outline:3px solid #fff0ca;outline-offset:2px}
.grow-plot.is-feature[data-feature=pond]{background:radial-gradient(circle at 45% 40%,#bfe9f2,#5fa7c2 70%,#4b7f95)}
.grow-plot.is-feature[data-feature=stone]{background:radial-gradient(circle at 30% 30%,#d9d2c6 0 22%,transparent 23%),radial-gradient(circle at 68% 62%,#c8bfb0 0 26%,transparent 27%),radial-gradient(circle at 40% 35%,#9a6a45,#6b4128)}
.grow-plot.is-ready{box-shadow:0 0 0 3px #ffe08a,0 0 18px #ffe08a99}
.grow-plot.is-new .grow-plant{animation:craft-sprout .6s cubic-bezier(.2,.8,.2,1)}
.grow-plant{transition:transform .5s}
.grow-plant.is-droopy{transform:rotate(14deg) scaleY(.88);filter:saturate(.6)}
.grow-aphid{animation:grow-crawl 1.6s ease-in-out infinite alternate}
.grow-sparkle{animation:grow-pulse 1.2s ease-in-out infinite;transform-box:fill-box;transform-origin:center}
.grow-thirst{position:absolute;left:4px;bottom:4px;font-size:12px;filter:drop-shadow(0 1px 1px #0006)}
.grow-happy{position:absolute;right:6px;top:4px;color:#ff8fb1;font-size:16px;text-shadow:0 1px 2px #0006;animation:grow-pulse 1.6s ease-in-out infinite}
.grow-safe{position:absolute;left:4px;top:2px;font-size:12px;opacity:.85}
.grow-night{position:absolute;inset:0;border-radius:24px;background:radial-gradient(circle at 75% 20%,#fff8 0 3%,transparent 4%),linear-gradient(#141a3fdd,#2b1f4add);opacity:0;pointer-events:none;transition:opacity .4s}
.grow-night.is-on{opacity:1}
.grow-night i{position:absolute;width:4px;height:4px;border-radius:50%;background:#fff;animation:grow-twinkle 1s ease-in-out infinite alternate}
.grow-night i:nth-child(1){left:12%;top:18%}.grow-night i:nth-child(2){left:30%;top:30%;animation-delay:.3s}.grow-night i:nth-child(3){left:55%;top:12%;animation-delay:.6s}.grow-night i:nth-child(4){left:70%;top:40%;animation-delay:.2s}.grow-night i:nth-child(5){left:88%;top:25%;animation-delay:.5s}
.grow-order{display:grid;gap:6px;margin-bottom:10px;padding:10px 12px;border-radius:14px;background:#25284f;color:#f3e9ff}
.grow-order div{display:flex;flex-wrap:wrap;gap:6px}
.grow-order span{display:flex;align-items:center;gap:4px;padding:3px 8px 3px 3px;border-radius:999px;background:#ffffff14;font-size:13px}
.grow-order span.is-met{background:#6fe3a633}
.grow-order img{width:26px;height:26px;object-fit:contain}
.grow-order small{font-size:16px}
.grow-sleep{font-size:17px;min-height:52px;width:100%}
.grow-sprite{position:absolute;left:8%;bottom:6%;width:84%;height:88%;object-fit:contain;object-position:50% 100%;transform-origin:50% 95%;transition:transform .5s;filter:drop-shadow(0 3px 2px #2b170c55);pointer-events:none}
.grow-sprite.is-stage-0{left:18%;width:64%;height:50%}
.grow-sprite.is-stage-1{left:16%;width:68%;height:66%;animation:grow-sway 3.2s ease-in-out infinite alternate}
.grow-sprite.is-stage-2{animation:grow-sway 3.6s ease-in-out infinite alternate}
.grow-sprite.is-stage-3{animation:grow-sway 4s ease-in-out infinite alternate}
.grow-sprite.is-droopy{transform:rotate(12deg) scaleY(.86);filter:saturate(.55) drop-shadow(0 3px 2px #2b170c55);animation:none}
.grow-plot.is-new .grow-sprite{animation:craft-sprout .6s cubic-bezier(.2,.8,.2,1)}
.grow-glint{position:absolute;right:6%;top:4%;font-size:18px;animation:grow-pulse 1.2s ease-in-out infinite;pointer-events:none}
.grow-aphid-art{position:absolute;width:30%;left:22%;top:34%;pointer-events:none;animation:grow-crawl 1.6s ease-in-out infinite alternate}
.grow-aphid-art.b{left:52%;top:50%;width:24%;animation-delay:.5s}
.grow-buzz{position:absolute;width:30%;left:60%;top:6%;pointer-events:none;animation:grow-buzz 2.6s ease-in-out infinite}
.grow-bunny{position:absolute;width:62%;right:-12%;bottom:-6%;pointer-events:none;filter:drop-shadow(0 3px 3px #0005);animation:grow-nibble .7s ease-in-out infinite alternate;z-index:2}
.grow-bunny.is-hopping{animation:grow-hop .55s ease-in forwards}
.grow-plot.is-target:not(.is-feature){box-shadow:inset 0 0 0 3px #ffe8b0,0 0 14px #ffe8b088;animation:grow-pulse 1.4s ease-in-out infinite}
.grow-plot.is-watered::after{content:'';position:absolute;inset:0;border-radius:14px;background:repeating-linear-gradient(100deg,#bfe3ff00 0 9px,#bfe3ffcc 9px 11px);animation:grow-drop-in .6s linear}
.grow-plot.is-visited::after{content:'✨';position:absolute;inset:0;display:grid;place-items:center;font-size:30px;animation:grow-pulse .7s ease-in-out}
.grow-perch{display:flex;align-items:center;gap:12px;min-height:0;width:min(100%,520px);margin:0 auto}
.grow-perch:empty{display:none}
.grow-perch-note{margin:0;padding:8px 12px;border-radius:14px;background:#fff6e8;color:#4a3122;font-size:13px;line-height:1.35;box-shadow:0 4px 12px #1b143833}
.grow-guest{flex:none;width:78px;height:78px;border:0;border-radius:50%;background:radial-gradient(circle,#fff8 0 40%,#fff0 70%);cursor:grab;touch-action:none;padding:4px;animation:grow-hover 1.8s ease-in-out infinite alternate}
.grow-guest img{width:100%;height:100%;object-fit:contain;pointer-events:none;filter:drop-shadow(0 4px 4px #0004)}
.grow-guest span{font-size:44px}
.grow-guest.is-picked{box-shadow:0 0 0 3px #ffe08a,0 0 18px #ffe08a}
.grow-guest.is-dragging{animation:none;cursor:grabbing;z-index:5;position:relative}
.grow-flyer{position:absolute;width:76px;height:76px;object-fit:contain;margin:-38px 0 0 -38px;pointer-events:none;z-index:6;transition:transform .6s cubic-bezier(.3,.7,.3,1),opacity .6s;filter:drop-shadow(0 4px 4px #0005)}
.grow-flyer.is-can{width:90px;height:90px;transform-origin:30% 70%;animation:grow-pour .6s ease-in-out}
.grow-flyer.is-picked{transition:transform .6s cubic-bezier(.5,-.4,.6,1),opacity .6s}
.grow-basket{width:30px;height:30px;object-fit:contain;vertical-align:middle;margin-right:2px}
.grow-basket.is-bounce{animation:grow-pulse .45s ease-in-out}
@keyframes grow-sway{from{transform:rotate(-2.5deg)}to{transform:rotate(2.5deg)}}
@keyframes grow-buzz{0%{transform:translate(0,0)}25%{transform:translate(-30px,10px) rotate(-10deg)}50%{transform:translate(-10px,-12px)}75%{transform:translate(8px,6px) rotate(8deg)}100%{transform:translate(0,0)}}
@keyframes grow-nibble{to{transform:translateY(-3px) rotate(-3deg)}}
@keyframes grow-hop{40%{transform:translate(20px,-40px)}100%{transform:translate(90px,10px);opacity:0}}
@keyframes grow-hover{to{transform:translateY(-6px)}}
@keyframes grow-pour{0%{rotate:0deg}40%,100%{rotate:-35deg}}
@keyframes grow-drop-in{from{background-position:0 -40px}to{background-position:0 40px}}
@keyframes grow-pulse{50%{transform:scale(1.12)}}
@keyframes grow-drop{to{transform:translateY(120px)}}
@keyframes grow-crawl{to{transform:translate(6px,-3px)}}
@keyframes grow-twinkle{to{opacity:.2}}
@media(prefers-reduced-motion:reduce){.grow-sun,.grow-rain i,.grow-aphid,.grow-sparkle,.grow-happy,.grow-night i,.grow-sprite,.grow-glint,.grow-aphid-art,.grow-buzz,.grow-bunny,.grow-guest,.grow-plot.is-target{animation:none}.grow-plant,.grow-sprite{transition:none}}
/* Library v9: animated picture book */
.story-scene{display:flex;flex-direction:column;align-items:center;gap:10px;padding:18px 14px;background:linear-gradient(#1b0f2600,#1b0f2666)}
.story-book{width:min(100%,640px);padding:14px;border-radius:14px;background:#7b4b3a;box-shadow:0 18px 40px #1b0f2c77}
.story-stage{position:relative;overflow:hidden;aspect-ratio:16/10;border-radius:8px;background-size:cover;background-position:center;box-shadow:inset 0 0 0 4px #fff8ec,inset 0 0 40px #0004;touch-action:none}
.story-stage.is-flip{animation:story-flip .6s ease-out}
.story-line{margin:12px 4px 2px;padding:12px 16px;border-radius:8px;background:#fff8ec;color:#4b3436;font-family:Georgia,serif;font-size:clamp(16px,2.2vw,21px);line-height:1.5;text-align:center;min-height:3.2em}
.story-sticker{position:absolute;transform:translate(-50%,-50%);cursor:grab;filter:drop-shadow(0 8px 6px #0006);user-select:none;touch-action:none}
.story-sticker.is-hero{width:26%;max-width:170px}
.story-sticker.is-helper{width:16%;max-width:110px;animation:story-hover 2.4s ease-in-out infinite}
.story-sticker.is-new{animation:story-pop .7s cubic-bezier(.3,1.6,.5,1)}
.story-emblem{position:absolute;right:6%;top:8%;font-size:42px;filter:drop-shadow(0 4px 4px #0006);animation:story-hover 2s ease-in-out infinite}
.story-pageno{position:absolute;right:10px;bottom:8px;padding:2px 9px;border-radius:999px;background:#fff8ecd0;color:#7b4b3a;font-weight:800;font-size:13px}
.story-fx{position:absolute;inset:0;pointer-events:none;overflow:hidden}
.fx-night,.fx-stars,.fx-moon{background:linear-gradient(#0d1438cc,#2b1f4a99)}
.fx-storm{background:linear-gradient(#2a2f4acc,#4a4f6a66)}
.fx-rain{background:#5a6a9a44}
.fx-wilt{backdrop-filter:sepia(.7) saturate(.6)}
.fx-quiet{backdrop-filter:grayscale(.8)}
.fx-twinkle{position:absolute;width:5px;height:5px;border-radius:50%;background:#fff;animation:grow-twinkle 1.2s ease-in-out infinite alternate}
.fx-drop{position:absolute;top:-12px;width:2px;height:14px;background:#d9e6ff;animation:grow-drop .8s linear infinite}
.fx-cloud{position:absolute;left:8%;top:4%;width:46%;height:26%;border-radius:999px;background:#5a5f7a;box-shadow:40px 10px 0 -6px #6a6f8a;animation:story-drift 6s ease-in-out infinite alternate}
.fx-cloud.b{left:48%;top:10%;width:40%;animation-duration:7s}
.fx-flash{position:absolute;inset:0;background:#fff;opacity:0;animation:story-flash 3.2s linear infinite}
.fx-glyph{position:absolute;left:50%;top:22%;transform:translateX(-50%);font-size:48px;animation:story-hover 2s ease-in-out infinite}
.fx-mist{position:absolute;left:-20%;top:30%;width:140%;height:40%;border-radius:50%;background:radial-gradient(#ffffffcc,#fff0 70%);animation:story-drift 8s ease-in-out infinite alternate}
.fx-mist.b{top:55%;animation-duration:11s}
.fx-door{position:absolute;left:62%;top:22%;width:16%;height:46%;border-radius:40px 40px 4px 4px;background:radial-gradient(#fff8c8,#ffd23f 60%,#e8a400);box-shadow:0 0 40px #ffe066;animation:story-glow 1.6s ease-in-out infinite alternate}
.fx-float,.fx-pop{position:absolute;bottom:-10%;font-size:34px;font-style:normal;color:#fff;text-shadow:0 2px 4px #0006;animation:story-up 4s ease-in infinite}
.fx-pop{animation:story-bloom 2.4s cubic-bezier(.3,1.6,.5,1) infinite}
.fx-rainbow{position:absolute;left:10%;top:12%;width:80%;height:120%;border-radius:50%;background:radial-gradient(circle at 50% 100%,transparent 52%,#a98be0 52% 56%,#5aa9e6 56% 60%,#66c79a 60% 64%,#ffd23f 64% 68%,#ff9a3c 68% 72%,#f07a9a 72% 76%,transparent 76%);opacity:.85;animation:story-pop 1.2s ease-out}
.fx-owl{position:absolute;left:-15%;top:12%;font-size:58px;animation:story-fly 4.5s ease-in-out infinite}
.fx-lantern{position:absolute;bottom:-12%;width:22px;height:28px;border-radius:10px 10px 12px 12px;background:radial-gradient(#fff4c4,#ffb347);box-shadow:0 0 18px #ffb347;animation:story-up 5s ease-in infinite}
.fx-flake{position:absolute;top:-8%;font-size:20px;font-style:normal;color:#fff;animation:story-snow 5s linear infinite}
.fx-moon{position:absolute}.fx-moon::after{content:'';position:absolute;left:72%;top:-80px;width:64px;height:64px;border-radius:50%;box-shadow:-14px 8px 0 4px #fff3c4}
.fx-moon{left:0;top:110px}
.story-fx i:nth-child(1){left:6%;top:12%;animation-delay:0s}.story-fx i:nth-child(2){left:14%;top:40%;animation-delay:.4s}.story-fx i:nth-child(3){left:22%;top:20%;animation-delay:.9s}.story-fx i:nth-child(4){left:30%;top:55%;animation-delay:1.3s}.story-fx i:nth-child(5){left:38%;top:8%;animation-delay:.2s}.story-fx i:nth-child(6){left:46%;top:35%;animation-delay:1.7s}.story-fx i:nth-child(7){left:54%;top:15%;animation-delay:.6s}.story-fx i:nth-child(8){left:62%;top:48%;animation-delay:1.1s}.story-fx i:nth-child(9){left:70%;top:25%;animation-delay:2.1s}.story-fx i:nth-child(10){left:78%;top:60%;animation-delay:.3s}.story-fx i:nth-child(11){left:86%;top:10%;animation-delay:1.5s}.story-fx i:nth-child(12){left:94%;top:38%;animation-delay:.8s}.story-fx i:nth-child(13){left:10%;top:70%;animation-delay:2.4s}.story-fx i:nth-child(14){left:50%;top:65%;animation-delay:1.9s}.story-fx i:nth-child(15){left:66%;top:72%;animation-delay:.5s}.story-fx i:nth-child(16){left:82%;top:78%;animation-delay:2.7s}.story-fx i:nth-child(17){left:34%;top:80%;animation-delay:1.2s}.story-fx i:nth-child(18){left:18%;top:5%;animation-delay:2.2s}.story-fx i:nth-child(19){left:58%;top:4%;animation-delay:3s}.story-fx i:nth-child(20){left:90%;top:52%;animation-delay:2.5s}.story-fx i:nth-child(n+21){left:44%;top:30%;animation-delay:1.4s}
.fx-float:nth-child(n),.fx-lantern:nth-child(n),.fx-pop:nth-child(n){top:auto}
.fx-pop{bottom:auto}
.fx-pop:nth-child(1){left:10%;top:62%}.fx-pop:nth-child(2){left:28%;top:72%}.fx-pop:nth-child(3){left:48%;top:66%}.fx-pop:nth-child(4){left:68%;top:74%}.fx-pop:nth-child(5){left:86%;top:64%}
.fx-drop:nth-child(n){top:-12px}.fx-flake:nth-child(n){top:-8%}
.story-titles{display:grid;gap:8px;margin-bottom:10px}
.story-titles button{padding:12px;border-radius:14px;border:2px solid #81739f;background:#25284f;color:#fff;font-family:Georgia,serif;font-size:16px;cursor:pointer}
.story-titles button:hover:not(:disabled){border-color:#ffd09c}
.story-play{font-size:18px;min-height:54px;width:100%}
.story-read{display:flex;gap:8px;align-items:center;color:#e5def0;font-size:14px;margin:10px 0}
.story-card-emblem{font-size:40px;line-height:72px}
@keyframes story-flip{0%{transform:perspective(900px) rotateY(-70deg);opacity:.2}100%{transform:none;opacity:1}}
@keyframes story-pop{from{transform:translate(-50%,-50%) scale(.3);opacity:0}}
@keyframes story-hover{50%{transform:translate(-50%,calc(-50% - 8px))}}
@keyframes story-drift{to{transform:translateX(8%)}}
@keyframes story-flash{0%,62%,70%,100%{opacity:0}64%,68%{opacity:.7}}
@keyframes story-glow{to{box-shadow:0 0 70px #ffe066}}
@keyframes story-up{from{transform:translateY(0);opacity:1}to{transform:translateY(-130%);opacity:0}}
@keyframes story-bloom{0%{transform:scale(0)}40%,80%{transform:scale(1)}100%{transform:scale(0)}}
@keyframes story-fly{0%{transform:translate(0,0)}50%{transform:translate(70vw,10px) scaleX(1)}51%{transform:translate(70vw,10px) scaleX(-1)}100%{transform:translate(0,0) scaleX(-1)}}
@keyframes story-snow{to{transform:translateY(110vh) rotate(180deg)}}
@media(prefers-reduced-motion:reduce){.story-stage.is-flip,.story-sticker,.story-emblem,.story-fx *{animation:none!important}}
/* Library big books: the friend sticker, time-of-day skies and new effects */
.story-sticker.is-friend{width:22%;max-width:150px}
.story-sky{position:absolute;inset:0;pointer-events:none}
.story-sky.sky-sun{background:radial-gradient(circle at 85% 10%,#fff3b080,transparent 35%)}
.story-sky.sky-rain{background:#4a5a8a40}.story-sky.sky-night{background:linear-gradient(#0d1438b0,#2b1f4a70)}.story-sky.sky-snow{background:#e8f2ff50}.story-sky.sky-wind{background:#c8d8e030}.story-sky.sky-fog{background:linear-gradient(#ffffff70,#ffffff20)}
.fx-sun{background:radial-gradient(circle at 82% 14%,#fff7c0 0 7%,#ffe06655 9%,transparent 30%)}
.fx-wind i,.fx-bubbles i,.fx-confetti i,.fx-ducks i{position:absolute;font-style:normal}
.fx-wind .fx-leaf{position:absolute;left:-10%;font-size:24px;animation:story-gust 3.2s linear infinite}
.fx-bubbles .fx-bub{position:absolute;bottom:-10%;width:22px;height:22px;border-radius:50%;background:radial-gradient(circle at 35% 35%,#fff,#bfe6ff80 60%,#9fd7ff40);box-shadow:inset 0 0 0 1px #fff8;animation:story-up 4.5s ease-in infinite}
.fx-confetti .fx-bit{position:absolute;top:-6%;width:8px;height:12px;border-radius:2px;animation:story-snow 3.4s linear infinite}
.fx-balloon .fx-hot{position:absolute;left:58%;top:-30%;font-size:64px;animation:story-descend 5s ease-out forwards}
.fx-ducks .fx-duck{position:absolute;bottom:8%;left:-12%;font-size:30px;animation:story-march 7s linear infinite}
@keyframes story-gust{to{transform:translate(120vw,-40px) rotate(540deg)}}
@keyframes story-descend{to{transform:translateY(55%)}}
@keyframes story-march{to{transform:translateX(130vw)}}
.fx-wind .fx-leaf:nth-child(1){top:20%}.fx-wind .fx-leaf:nth-child(2){top:40%;animation-delay:.6s}.fx-wind .fx-leaf:nth-child(3){top:60%;animation-delay:1.2s}.fx-wind .fx-leaf:nth-child(4){top:30%;animation-delay:1.8s}.fx-wind .fx-leaf:nth-child(5){top:75%;animation-delay:2.4s}
.fx-ducks .fx-duck:nth-child(2){animation-delay:.6s}.fx-ducks .fx-duck:nth-child(3){animation-delay:1.1s}.fx-ducks .fx-duck:nth-child(4){animation-delay:1.6s}
