:root{color:var(--ink);background:var(--paper);font-family:Avenir Next,Nunito Sans,sans-serif;font-synthesis:none;--paper: #f7f2e8;--ink: #292825;--red: #c83b32;--yellow: #f4c84a;--blue: #247ba0;--green: #4f9d69;--focus: #135f7a;--motion-fast: .14s;--motion-normal: .26s;--motion-slow: .42s;--motion-quick: .14s;--motion-standard: .26s;--motion-celebrate: .62s;--motion-transition: .85s}*{box-sizing:border-box}html,body,#app{width:100%;height:100%;margin:0;overflow:hidden}button,input{font:inherit;letter-spacing:0}.game-shell,.canvas-host,.ui-host{position:absolute;inset:0}.canvas-host{pointer-events:none;z-index:0}.canvas-host canvas{display:block;width:100%;height:100%}.ui-host{pointer-events:none;z-index:10}.flight-input-surface{position:absolute;inset:var(--flight-top, 0px) 0 var(--flight-bottom, 0px);z-index:1;touch-action:none}.ui-host>section,.hud,.word-rail{pointer-events:auto}button{touch-action:manipulation}.mission-desk,.results,.editor-panel{touch-action:pan-y}:focus-visible{outline:3px solid var(--focus);outline-offset:3px}.mission-desk,.spelling-panel,.results,.editor-panel{position:absolute;inset:0;display:grid;align-content:center;justify-items:center;gap:18px;padding:24px;background:color-mix(in srgb,var(--paper) 93%,transparent);overflow:auto}.mission-desk h1,.results h1{margin:0;font-family:Chalkboard SE,Avenir Next,sans-serif;font-size:clamp(2.25rem,8vw,5rem)}.eyebrow{margin:0;font-weight:800;color:var(--red);letter-spacing:.12em}.pack-grid{display:grid;grid-template-columns:repeat(3,minmax(130px,190px));gap:12px}.pack-grid button,.letter-bank button,.editor-panel button,.results button{min-height:48px;border:2px solid var(--ink);border-radius:8px;background:#fff;box-shadow:4px 4px 0 var(--ink);font-weight:800;cursor:pointer}.pack-grid button{min-height:72px;padding:10px}.pack-grid button.is-selected{background:var(--yellow);transform:translate(-2px,-2px)}.pack-grid small{display:block;margin-top:4px;font-weight:500}.primary{min-height:54px;padding:0 30px;border:0;border-radius:7px;color:#fff;background:var(--red);font-weight:800;cursor:pointer}.settings-tools{display:flex;gap:10px}.icon-button{width:48px;height:48px;border:2px solid var(--ink);border-radius:50%;background:var(--yellow);cursor:pointer}.hud{display:flex;align-items:center;justify-content:space-between;margin:16px;padding:10px 16px;border-bottom:2px solid rgba(41,40,37,.35);font-weight:800}.ui-host:has(.word-rail-host) .hud{margin-top:calc(16px + env(safe-area-inset-top))}.word-rail-host{position:absolute;z-index:2;top:calc(72px + env(safe-area-inset-top));left:50%;width:min(820px,calc(100% - 32px - env(safe-area-inset-left) - env(safe-area-inset-right)));transform:translate(-50%);pointer-events:none}.word-rail{display:grid;grid-template-columns:minmax(60px,auto) minmax(0,1fr) 44px;align-items:center;gap:8px 12px;min-height:62px;padding:7px 10px;border:2px solid var(--ink);border-radius:7px;background:#f7f2e8f5;box-shadow:3px 3px #2928253d}.word-clue{display:flex;align-items:center;gap:7px;min-width:0;max-width:170px;font-weight:900;line-height:1.15}.word-clue-image{width:42px;height:42px;object-fit:contain}.word-clue-symbol{display:grid;place-items:center;flex:0 0 42px;height:42px;font-size:1.8rem;line-height:1}.word-clue [data-meaning]{overflow:hidden;max-width:7em;text-overflow:ellipsis;white-space:nowrap}.word-clue [data-meaning]:empty{display:none}.word-slots{display:flex;align-items:center;gap:3px;min-width:0;width:100%;min-height:44px;overflow-x:auto;overflow-y:hidden;scrollbar-width:thin;white-space:nowrap;border-bottom:2px solid var(--blue);pointer-events:auto;touch-action:pan-x}.word-slots [data-slot]{display:inline-grid;place-items:center;flex:0 0 27px;min-width:27px;height:33px;font-size:1.2rem;font-weight:900;line-height:1}.word-slots .is-filled{color:var(--blue)}.word-slots .is-fixed{flex-basis:15px;min-width:15px}.word-slots [data-current-slot]{border-bottom:3px solid var(--red)}.word-rail button{pointer-events:auto;touch-action:manipulation;min-width:44px;min-height:44px;border:2px solid var(--ink);border-radius:7px;background:#fff;color:var(--ink);cursor:pointer}.word-rail .word-speak{width:44px;padding:0;background:var(--yellow);font-size:1.35rem}.word-controls{display:flex;gap:4px}.word-rail:has(.word-touch-toggle){grid-template-columns:minmax(42px,auto) minmax(0,1fr) auto}.word-touch-toggle{width:44px;padding:0;font-size:1.3rem}.fallback-letters{grid-column:1 / -1;display:flex;justify-content:center;gap:10px}.fallback-letters button{width:56px;font-size:1.35rem;font-weight:900;box-shadow:2px 2px 0 var(--ink)}.word-status{grid-column:1 / -1;min-width:0;color:var(--ink);font-size:.8rem;font-weight:900;line-height:1.1;text-align:center}.word-status:empty{display:none}.word-rail-host.is-enter .word-rail{border-color:var(--blue)}.word-rail-host.is-correct .word-rail{border-color:var(--green)}.word-rail-host.is-wrong .word-rail{border-color:var(--red)}.word-rail-host.is-reward .word-rail{background:#fff4c8}.word-rail-host.is-correct .word-status{color:#286941}.word-rail-host.is-wrong .word-status{color:#a72f27}.maker-menu-instructions{max-width:32em;margin:0;text-align:center;line-height:1.6;font-weight:700}.maker-desk-host{position:absolute;z-index:3;top:var(--maker-top, 72px);bottom:auto;left:50%;width:min(620px,calc(100% - 24px - env(safe-area-inset-left) - env(safe-area-inset-right)));transform:translate(-50%);pointer-events:none}.maker-desk{position:relative;display:grid;grid-template-columns:minmax(54px,100px) minmax(0,1fr) 48px;align-items:center;gap:8px 12px;padding:12px 18px 10px;border:2px solid var(--ink);border-radius:4px 18px 4px 4px;background:#fffaf0;box-shadow:5px 5px #2928253d}.maker-desk:before{position:absolute;top:-2px;right:-2px;width:18px;height:18px;border-left:2px solid var(--ink);border-bottom:2px solid var(--ink);border-radius:0 0 0 3px;background:linear-gradient(45deg,#e5d8bc 0 48%,var(--paper) 49%);content:"";pointer-events:none}.maker-escort{grid-column:1 / -1;margin:0;color:#185873;font-size:.8rem;font-weight:800;letter-spacing:.04em}.maker-escort:before{display:inline-block;width:7px;height:7px;margin-right:6px;border-radius:50%;background:#67b8d6;box-shadow:0 0 0 3px #e1f2f8;content:""}.maker-clue{display:flex;align-items:center;gap:6px;min-width:0;font-weight:900;line-height:1.2;overflow-wrap:anywhere}.maker-clue img,.maker-symbol{display:grid;place-items:center;flex:0 0 42px;width:42px;height:42px;object-fit:contain;font-size:1.9rem;overflow:hidden}.maker-clue [data-maker-meaning]{min-width:0;max-height:3.6em;overflow:auto;pointer-events:auto;touch-action:pan-y}.maker-clue [data-maker-meaning]:empty{display:none}.maker-slots{position:relative;display:flex;align-items:center;gap:4px;min-width:0;width:100%;min-height:46px;overflow-x:auto;overflow-y:hidden;overscroll-behavior-x:contain;scrollbar-width:thin;white-space:nowrap;pointer-events:auto;touch-action:pan-x}.maker-slots [data-slot]{display:inline-grid;place-items:center;flex:0 0 29px;min-width:29px;height:35px;border-bottom:2px solid #c9c1ae;font-size:1.35rem;font-weight:900}.maker-slots [data-current-slot]{border-bottom:3px solid var(--blue);background:#eaf3f5}.maker-slots .is-filled{border-color:var(--blue);color:var(--blue)}.maker-slots .is-fixed{flex-basis:16px;min-width:16px;border-color:transparent}.maker-desk button{min-width:44px;min-height:44px;border:2px solid var(--ink);border-radius:6px;color:var(--ink);background:#fff;font-weight:900;cursor:pointer;pointer-events:auto;touch-action:manipulation}.maker-speak{width:48px;height:48px;padding:0;font-size:1.3rem;background:var(--yellow)!important}.maker-choices{grid-column:1 / -1;display:flex;justify-content:center;gap:12px}.maker-choices button{display:grid;grid-template-columns:1fr auto;align-items:center;gap:5px;width:84px;min-width:56px;height:62px;min-height:56px;padding:4px 10px;font-size:2rem;box-shadow:3px 3px 0 var(--ink);transition:transform var(--motion-fast),box-shadow var(--motion-fast)}.maker-choices kbd{align-self:end;padding-bottom:3px;color:#635e52;font:700 .7rem Avenir Next,sans-serif}.maker-choices button:active[aria-disabled=false]{transform:translate(2px,2px);box-shadow:1px 1px 0 var(--ink);background:#fff0c1}.maker-choices button[aria-disabled=true]{color:#6d685c;background:#ede9e0;box-shadow:1px 1px 0 var(--ink);cursor:default}.maker-status{grid-column:1 / -1;min-width:0;min-height:1.1em;text-align:center;overflow-wrap:anywhere;color:#635e52;font-size:.8rem;font-weight:800}.maker-desk-host.is-wrong [data-current-slot]{background:#ffe6cd;border-color:#aa601e}.maker-desk-host.is-wrong .maker-status{color:#945117}.maker-desk-host.is-correct .maker-status{color:#286941}.maker-desk-host.is-reward .maker-desk{background:#fff4cf}.creation-gallery{width:min(620px,100%);min-width:0}.creation-gallery h2{margin:0 0 12px;font-size:1.2rem;text-align:center}.creation-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(132px,100%),1fr));gap:12px}.creation-card{display:flex;flex-direction:column;align-items:center;gap:5px;min-width:0;padding:12px 8px;border:1px solid #b8ad97;border-radius:3px 14px 3px 3px;background:#fffaf0;box-shadow:3px 3px #ddd3bd;text-align:center;overflow-wrap:anywhere}.creation-picture{display:grid;place-items:center;width:56px;height:56px;object-fit:contain;font-size:2.5rem;overflow:hidden}.creation-card strong{font-size:1.1rem;color:var(--blue)}.creation-recovered{margin-top:3px;padding:3px 6px;border-radius:3px;color:#286941;background:#e4efdf;font-weight:800}@media(max-width:480px){.hud{margin-top:calc(8px + env(safe-area-inset-top))}.maker-desk-host{width:calc(100% - 16px - env(safe-area-inset-left) - env(safe-area-inset-right))}.maker-desk{grid-template-columns:minmax(44px,82px) minmax(0,1fr) 44px;padding:10px 10px 8px;gap:7px}.maker-clue{gap:4px;font-size:.85rem}.maker-clue img,.maker-symbol{flex-basis:36px;width:36px;height:36px}.maker-speak{width:44px;height:44px}.maker-choices button{width:76px;height:58px}}@media(max-height:440px)and (orientation:landscape){.hud{margin-top:calc(5px + env(safe-area-inset-top));padding-block:4px}.maker-desk{grid-template-columns:minmax(44px,86px) minmax(0,1fr) 44px auto;grid-template-rows:auto 44px;gap:4px 8px;padding:5px 10px 7px}.maker-escort{grid-column:1 / 3;grid-row:1;font-size:.7rem}.maker-status{grid-column:3 / 5;grid-row:1;text-align:right;font-size:.7rem}.maker-clue{grid-column:1;grid-row:2;font-size:.8rem}.maker-clue img,.maker-symbol{flex-basis:32px;width:32px;height:32px;font-size:1.5rem}.maker-slots{grid-column:2;grid-row:2;min-height:44px}.maker-speak{grid-column:3;grid-row:2;width:44px;height:44px}.maker-choices{grid-column:4;grid-row:2;gap:7px}.maker-choices button{width:56px;min-width:44px;height:44px;min-height:44px;padding:2px 6px;font-size:1.5rem}}.fallback-flight{position:absolute;inset:0;overflow:hidden;pointer-events:none;background:repeating-linear-gradient(to bottom,transparent 0 34px,rgba(36,123,160,.17) 35px 36px),var(--paper)}.fallback-flight:before{position:absolute;inset:0 auto 0 12%;width:2px;background:#c83b324d;content:""}.fallback-aircraft,.fallback-enemy,.fallback-shot{position:absolute;display:block;transform:translate(-50%,-50%);line-height:1}.fallback-aircraft{top:75%;color:var(--blue)}.fallback-aircraft svg{display:block;width:100%;height:100%}.fallback-enemy{color:var(--red);font-size:1.8rem;font-weight:900}.fallback-shot{width:7px;height:17px;border-radius:3px;background:var(--yellow);box-shadow:0 0 0 2px var(--ink)}.fallback-maker,.fallback-companion{position:absolute;width:clamp(48px,12vw,76px);top:53%;transform:translate(-50%,-50%)}.fallback-companion{top:70%}.fallback-maker svg,.fallback-companion svg{display:block;width:100%}.fallback-companion small{display:block;font-size:10px;text-align:center;white-space:nowrap;color:var(--blue)}.fallback-escort{position:absolute;top:75%;width:100px;height:75px;border:3px solid #78bcd4;border-radius:50%;transform:translate(-50%,-50%);box-shadow:0 0 14px #85c7e177}.fallback-flight.is-sweeping:after{position:absolute;top:35%;left:5%;right:5%;height:22px;background:repeating-linear-gradient(35deg,#a7d6d2 0 18px,#f7f2e8 18px 22px);border-block:2px solid #497789;content:""}.fallback-maker.is-mistake{filter:sepia(.45)}.menu-notice{max-width:42rem;margin:0;padding:10px 14px;border:2px solid var(--yellow);background:#fff8d8;font-weight:700;text-align:center}.answer-feedback{position:absolute;inset:50% auto auto 50%;transform:translate(-50%,-50%);width:min(480px,calc(100% - 24px));padding:32px;border:3px solid var(--ink);border-radius:8px;background:var(--paper);box-shadow:8px 8px #29282540;text-align:center}.answer-feedback h2{margin:0 0 12px}.answer-feedback p{margin:0;font-size:1.35rem}.answer-feedback .feedback-combo{display:inline-block;margin-top:16px;padding:4px 14px;border-block:2px solid var(--red);color:var(--red);font-size:1.65rem;font-weight:900;letter-spacing:.06em}.pause-overlay{position:absolute;z-index:20;inset:0;display:grid;place-content:center;justify-items:center;gap:16px;background:color-mix(in srgb,var(--paper) 90%,transparent)}.pause-overlay button{min-height:48px;padding:0 22px;border:2px solid var(--ink);border-radius:7px;background:var(--yellow);font-weight:800;cursor:pointer}.spelling-panel{inset:auto auto max(12px,2%) 50%;width:min(680px,calc(100% - 24px));max-height:calc(100% - 24px);overflow-y:auto;overscroll-behavior:contain;align-content:start;transform:translate(-50%);border:3px solid var(--ink);border-radius:8px;box-shadow:8px 8px #29282540;background:var(--paper)}.prompt-picture{font-size:4rem;line-height:1}.prompt-image{max-width:120px;max-height:100px;object-fit:contain}.prompt-support{margin:0;font-size:1.25rem;font-weight:800}.speak-button{min-width:48px;min-height:48px;border:2px solid var(--ink);border-radius:50%;background:var(--blue);cursor:pointer}.answer-slots{min-height:38px;width:min(100%,420px);max-width:100%;overflow-x:auto;overflow-wrap:anywhere;word-break:break-word;border-bottom:3px solid var(--ink);text-align:center;font-size:clamp(1.1rem,6vw,1.8rem);letter-spacing:.12em}.letter-bank{display:flex;flex-wrap:wrap;justify-content:center;gap:10px}.letter-bank button{width:58px;font-size:1.5rem}.letter-bank button:disabled{color:var(--paper);background:var(--blue);opacity:1;box-shadow:none;transform:translateY(-5px) rotate(-2deg)}.spelling-actions{display:flex;gap:10px}.spelling-actions button,.keyboard-answer+button{min-height:48px;padding:0 20px;border:2px solid var(--ink);border-radius:7px;background:#fff;font-weight:800;cursor:pointer}.keyboard-answer{display:grid;gap:5px;font-weight:700}.keyboard-answer input,.editor-panel input{min-height:44px;width:100%;padding:8px 10px;border:2px solid var(--ink);border-radius:5px;background:#fff}.letter-bank button{transition:transform var(--motion-fast) ease,box-shadow var(--motion-fast) ease,background var(--motion-fast) ease}.letter-bank button:active:not(:disabled),.letter-bank button.is-pressed{transform:translate(2px,2px);box-shadow:2px 2px 0 var(--ink);background:color-mix(in srgb,var(--yellow) 70%,white)}.letter-bank button:disabled{cursor:not-allowed}.spelling-panel{animation:page-in var(--motion-normal) ease both}.score-pop{animation:score-flight var(--motion-celebrate) cubic-bezier(.2,.8,.2,1) both}@keyframes page-in{0%{opacity:0;transform:translate(-50%) translateY(10px)}to{opacity:1;transform:translate(-50%) translateY(0)}}@keyframes score-flight{0%{opacity:0;transform:translate(-12px,10px) scale(.82)}70%{opacity:1;transform:translateY(-4px) scale(1.08)}to{opacity:1;transform:translate(0) scale(1)}}.results dl{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}.results dl div{min-width:110px;padding:12px;border-top:3px solid var(--blue);text-align:center;animation:result-reveal .42s ease both}.results dt{font-size:.85rem}.results dd{margin:4px 0 0;font-size:1.6rem;font-weight:800}.grade{margin:0;color:var(--red);font-size:4rem;font-weight:900}.results dl div:nth-child(2){animation-delay:.08s}.results dl div:nth-child(3){animation-delay:.16s}.results dl div:nth-child(4){animation-delay:.24s}.results dl div:nth-child(5){animation-delay:.32s}.results dl div:nth-child(6){animation-delay:.4s}.learning-outcomes{max-width:620px;overflow-wrap:anywhere;text-align:center;animation:result-reveal .45s .48s ease both}.learning-outcomes p{margin:8px 0}.learning-outcomes [data-mastered-message]{color:var(--blue);font-weight:800}.results-actions{display:flex;flex-wrap:wrap;justify-content:center;gap:16px}.results-actions button{padding:0 20px}.hud [data-hud-combo]{color:var(--red);min-width:5em;text-align:center}.combo-milestone{animation:combo-beat .65s ease both}.hud strong{min-width:4ch;text-align:right;font-variant-numeric:tabular-nums}.results{align-content:safe center}@media(max-width:480px){.hud{margin:8px;padding:8px 4px;gap:5px;font-size:.75rem}.hud [data-hud-combo]{min-width:4.5em}.results{padding:18px 12px}}@media(max-width:480px){.ui-host:has(.word-rail-host) .hud{margin-top:calc(8px + env(safe-area-inset-top))}.word-rail-host{top:calc(52px + env(safe-area-inset-top));width:calc(100% - 16px - env(safe-area-inset-left) - env(safe-area-inset-right))}.word-rail{grid-template-columns:minmax(42px,auto) minmax(0,1fr) 44px;gap:6px;padding:5px 6px}.word-clue{max-width:88px;gap:3px;font-size:.85rem}.word-clue-image,.word-clue-symbol{width:38px;height:38px;flex-basis:38px}.word-slots [data-slot]{flex-basis:25px;min-width:25px}}@media(max-height:440px){.ui-host:has(.word-rail-host) .hud{margin-top:calc(5px + env(safe-area-inset-top));padding-block:4px}.word-rail-host{top:calc(44px + env(safe-area-inset-top))}.word-rail{min-height:50px;padding-block:3px}.word-clue-image,.word-clue-symbol{width:34px;height:34px;flex-basis:34px}.fallback-letters button{min-height:44px}}@keyframes combo-beat{30%{transform:scale(1.18) rotate(-3deg);text-shadow:2px 3px 0 var(--yellow)}to{transform:none}}@keyframes result-reveal{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}.editor-panel{align-content:start;justify-items:stretch;width:min(680px,calc(100% - 24px));inset:50% auto auto 50%;transform:translate(-50%,-50%);height:min(90vh,700px);border:3px solid var(--ink);border-radius:8px;box-shadow:8px 8px #29282540}.editor-heading{display:flex;align-items:center;justify-content:space-between}.editor-heading h2{margin:0}.editor-heading button{width:48px;min-height:48px;box-shadow:none}.pack-name-field,.word-row label{display:grid;gap:5px;font-weight:700}.word-rows{display:grid;gap:10px;overflow:auto}.word-row{display:grid;grid-template-columns:1fr 1fr;gap:10px}.editor-panel [data-editor-error]{min-height:1.4em;margin:0;color:var(--red);font-weight:700}.editor-actions{display:flex;justify-content:flex-end}[data-custom-pack-list]{display:grid;grid-template-columns:1fr;gap:10px;width:100%;padding:12px;border:2px solid var(--ink);border-radius:6px;background:#fffaf0}[data-custom-pack-list] h3{margin:0;font-size:1rem}.custom-pack-item{display:flex;align-items:center;justify-content:space-between;gap:12px;min-width:0;padding:10px 12px;border:1px solid #b8ad97;border-radius:4px;background:#fff}.custom-pack-item>div{display:grid;gap:3px;min-width:0}.custom-pack-item strong{overflow-wrap:anywhere}.custom-pack-item small{color:#635e52;font-weight:700}.custom-pack-item .danger{flex:0 0 auto;min-height:48px;padding:0 14px;border:2px solid var(--red);border-radius:7px;color:#a72f27;background:#fff;box-shadow:2px 2px #a72f27;font-weight:800;cursor:pointer}@media(max-width:640px){.pack-grid{grid-template-columns:1fr;width:min(100%,320px)}.mission-desk h1{font-size:2.5rem}.spelling-panel{bottom:2%;gap:10px}.results dl{grid-template-columns:1fr 1fr}.results{gap:12px}.word-row{grid-template-columns:1fr;gap:6px}.custom-pack-item{align-items:stretch;flex-wrap:wrap}.custom-pack-item>div{flex:1 1 180px}.custom-pack-item .danger{flex:1 1 100%;min-height:48px}}.hud{margin-top:calc(16px + env(safe-area-inset-top))}@media(max-width:480px){.hud{margin-top:calc(8px + env(safe-area-inset-top))}}@media(max-height:440px)and (orientation:landscape){.hud{margin-top:calc(5px + env(safe-area-inset-top));padding-block:4px}}@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation-duration:1ms!important;transition-duration:1ms!important}.spelling-panel,.score-pop,.combo-milestone,.results dl div,.learning-outcomes{animation:none!important}}html.reduced-motion *,html.reduced-motion *:before,html.reduced-motion *:after{animation:none!important;transition:none!important;scroll-behavior:auto!important}
