:root{--cream:#fff7e8;--ink:#294f45;--sage:#dbe5c6;--coral:#da8065;--gold:#f2ca72;--line:#cbd4b8;--paper:#fffcf4}*{box-sizing:border-box}body{margin:0;background:var(--cream);color:var(--ink);font-family:'Trebuchet MS','Avenir Next',sans-serif}button,a{-webkit-tap-highlight-color:transparent}button{font:inherit;color:inherit;border:1px solid var(--line);border-radius:12px;background:var(--paper);padding:11px 16px;cursor:pointer;font-weight:700;transition:transform .18s,box-shadow .18s}button:hover:not(:disabled){transform:translateY(-2px);box-shadow:0 5px 0 #294f4512}button:disabled{cursor:default;opacity:.48}button:focus-visible,a:focus-visible{outline:4px solid #568baf;outline-offset:4px}a{color:inherit}[hidden]{display:none!important}header{display:flex;justify-content:space-between;align-items:center;padding:22px 4vw;border-bottom:1px solid #d8dcc6;gap:20px}.brand{display:flex;align-items:center;gap:11px;text-decoration:none;font-family:Georgia,serif;font-size:26px;font-weight:bold;line-height:1.15}.brand small{display:block;font:9px 'Trebuchet MS',sans-serif;letter-spacing:1.6px;margin-top:6px}.brand-mark{font:52px Georgia;color:var(--coral)}.header-tools{display:flex;align-items:center;gap:8px}.header-tools button{font-size:13px;padding:10px 12px}.series{font-size:10px;letter-spacing:1.5px;margin-right:14px}.primary{background:var(--ink);color:var(--cream);border-color:var(--ink);padding:16px 24px;border-radius:16px;font-size:19px;box-shadow:0 5px 0 #193c3320}.primary span{margin-left:34px}.eyebrow{font-size:12px;font-weight:bold;letter-spacing:2px;margin:0 0 14px}.welcome-copy h1{font-family:Georgia,serif;font-size:clamp(50px,6.5vw,94px);font-weight:400;line-height:1.03;letter-spacing:-3px;margin:20px 0 26px}em{color:var(--coral);font-weight:400}.lead{font-size:22px;line-height:1.55;margin-bottom:28px}#welcome{display:grid;grid-template-columns:43% 57%;padding:65px 5vw 0;max-width:1600px;margin:auto;position:relative}.welcome-note{font-size:13px;margin-top:24px}.welcome-art{position:relative;align-self:center}.welcome-art svg{width:100%;overflow:visible}.sticker{position:absolute;top:0;right:40px;font:italic 23px Georgia;background:var(--gold);border-radius:50%;padding:20px;transform:rotate(8deg);z-index:1}.art-caption{display:block;text-align:center;font-size:11px;letter-spacing:3px;margin-top:-20px}.welcome-bottom{grid-column:1/-1;display:flex;justify-content:space-around;padding:27px 0;margin-top:48px;border-top:1px solid var(--line);font-size:13px;font-weight:bold;letter-spacing:2px}#lesson{max-width:1600px;padding:22px 4vw 25px;margin:auto}nav{display:flex;gap:6px;flex-wrap:wrap;padding-bottom:20px}nav button{font-size:12px;padding:9px 11px;border:0;background:transparent}nav button.active{background:var(--ink);color:var(--paper)}nav button b{font-size:10px;margin-right:7px;color:var(--coral)}nav button.active b{color:var(--gold)}.heading{display:flex;justify-content:space-between;align-items:center;gap:30px;margin:7px 0 22px}.heading h1{font:400 clamp(32px,3.4vw,52px)/1.08 Georgia,serif;margin:0;letter-spacing:-1.3px}.heading>p{font-size:19px;line-height:1.5;max-width:470px;margin:0}.layout{display:grid;grid-template-columns:minmax(0,1.7fr) minmax(335px,1fr);gap:24px;align-items:start}.world{background:#f4f1df;border:1px solid #d9ddc5;border-radius:30px;position:relative;overflow:hidden;min-width:0}.world-top{display:flex;justify-content:space-between;gap:10px;padding:19px 25px 0;font-size:10px;font-weight:bold;letter-spacing:1.5px}.world-top span:last-child{color:#976447}#scene{padding:0 8px}#scene>svg{width:100%;display:block}.svg-label{font-family:'Trebuchet MS',sans-serif;font-size:25px;font-weight:bold;fill:#294f45}#speech{min-height:67px;padding:13px 24px 19px;text-align:center;font-size:22px;line-height:1.4;font-weight:bold;background:#fff9e8;border-top:1px solid #d9ddc5}.confetti{position:absolute;inset:0;pointer-events:none;overflow:hidden}.confetti i{position:absolute;width:11px;height:19px;left:var(--x);top:43%;background:var(--c);border-radius:2px;animation:confetti 1.6s ease-out both;animation-delay:var(--delay)}aside{padding:22px 24px;background:var(--paper);border:1px solid var(--line);border-radius:26px}aside h2{font:400 29px/1.2 Georgia,serif;margin:0 0 14px}aside p{font-size:17px;line-height:1.5;margin:12px 0}.goal{font-size:18px;font-weight:bold;line-height:1.45;margin-bottom:16px}.choice{width:100%;display:flex;text-align:left;align-items:center;gap:15px;margin:11px 0;padding:16px;border:2px solid #cad6b8;border-radius:20px;background:#fffaf0;min-height:100px;position:relative}.choice:nth-of-type(2){background:#eef2df}.choice .command{font-size:22px;line-height:1.25;flex:1}.choice small{display:block;font-size:10px;font-weight:normal;letter-spacing:1px;margin-bottom:7px}.choice .try{font-size:24px;color:#b66f51}.choice.selected{border:3px solid #477461;background:#e7efd6}.choice.selected:before{content:'▶';position:absolute;right:12px;top:5px;font-size:11px;color:#477461}.choice.vague.selected{border-color:#bb9360;background:#fcf1d5}.micro{font-size:13px!important;color:#5f7765}.response{background:#f0ead8;border-radius:15px;padding:13px 16px;margin-top:16px;font-size:17px;line-height:1.5}.response.success{background:#e5efcf}.response b{display:block;margin-bottom:5px}.actions{display:flex;gap:8px;margin-top:14px}.actions button{flex:1}.wide{width:100%;margin-top:8px}.party-list{display:flex;gap:9px;justify-content:space-between;flex-wrap:wrap}.party-list span{display:flex;flex-direction:column;align-items:center;font-size:12px;font-weight:bold}.maker-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin:15px 0}.maker-grid button{padding:8px 5px;font-size:12px;display:flex;flex-direction:column;align-items:center}.maker-grid button.selected{background:var(--sage);border:2px solid var(--ink)}.action-ticket{border:2px dashed #bdc9a5;border-radius:17px;padding:15px;text-align:center;margin:14px 0;background:#fff9ea}.action-ticket strong{font-size:22px;display:block;margin:6px 0}.say-it{background:#e5eccf;border-radius:20px;padding:20px;text-align:center;margin-top:14px;font-size:25px;font-family:Georgia,serif}.big-icon{display:flex;justify-content:center;gap:16px}.paper-stage{min-height:470px;padding:36px;display:flex;flex-direction:column;justify-content:center}.paper-stage h2{font:42px Georgia;margin:0 0 12px;text-align:center}.paper-stage p{text-align:center;font-size:21px;line-height:1.5}.paper-card{display:grid;grid-template-columns:1fr 1fr;background:#fff9eb;border:2px dashed #a8ba92;border-radius:25px;max-width:560px;width:100%;margin:24px auto;transform:rotate(-3deg);box-shadow:10px 13px 0 #d3ddba}.paper-card div{padding:24px 14px;text-align:center}.paper-card div:first-child{border-right:2px dashed #a8ba92}.paper-card small{font-size:13px;letter-spacing:1px}.paper-card strong{display:block;font-size:23px;margin-top:8px}.paper-card svg{display:block;margin:auto}.footer-note{font-size:16px!important}.result-stars{transform-box:fill-box;transform-origin:center;animation:spark .9s ease-out both}.party-scene.doing .pip-body{animation:hop 1.6s ease-in-out}.action-wave.doing .wave-arm{transform-origin:53px 2px;animation:wave .45s ease-in-out 4}.moving-hat,.moving-pumpkin,.moving-into,.moving-letter{transition:transform 1.6s cubic-bezier(.25,.75,.35,1)}.action-hat .moving-hat{transform:translate(-328px,-112px)}.action-pick .moving-pumpkin{transform:translate(-252px,9px)}.action-basket .moving-into{transform:translate(255px,45px)}.action-letter .moving-letter{transform:translate(313px,52px)}.party-scene.done .pip-body{transform:translateY(0)}.thought{animation:thought .5s ease-out}.thought circle{animation:question 1s ease-in-out infinite alternate}.world.slow .moving-hat,.world.slow .moving-pumpkin,.world.slow .moving-into,.world.slow .moving-letter{transition-duration:2.6s}.world.slow .action-wave.doing .wave-arm{animation-duration:.65s}footer{display:flex;justify-content:space-between;align-items:center;gap:20px;margin-top:21px}footer p{font-size:16px;line-height:1.5;margin:0;max-width:65%}footer>div{display:flex;gap:8px}footer .primary{padding:12px 20px;font-size:17px}dialog{border:0;border-radius:26px;max-width:850px;width:90vw;padding:0;background:var(--paper);color:var(--ink);max-height:88vh}dialog::backdrop{background:#223f32a6;backdrop-filter:blur(5px)}.guide-content{padding:35px 42px;line-height:1.65}.guide-content h2{font:38px Georgia}.guide-content h3{margin-bottom:6px}.guide-content table{border-collapse:collapse;font-size:14px;width:100%}.guide-content td,.guide-content th{border-bottom:1px solid var(--line);padding:13px;text-align:left;vertical-align:top}.guide-content th{width:110px}.close{float:right}.busy #home{pointer-events:none}.busy .world{box-shadow:0 0 0 3px #e8c879}body:fullscreen{overflow:auto}
@keyframes wave{0%,100%{transform:rotate(-8deg)}50%{transform:rotate(-48deg)}}@keyframes hop{0%,100%{transform:translateY(0)}35%{transform:translateY(-20px)}65%{transform:translateY(0)}}@keyframes thought{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:translateY(0)}}@keyframes question{to{opacity:.4}}@keyframes spark{from{opacity:0;transform:scale(.4)}50%{opacity:1;transform:scale(1.3)}to{opacity:1;transform:scale(1)}}@keyframes confetti{0%{opacity:0;transform:translateY(0) rotate(0)}15%{opacity:1}100%{opacity:0;transform:translate(var(--drift),220px) rotate(360deg)}}
@media(min-width:1500px){aside p{font-size:20px}.choice .command{font-size:27px}.world-top{font-size:13px}#speech{font-size:26px}nav button{font-size:14px}}@media(max-width:1050px){header{padding:16px 3vw}.series{display:none}.brand{font-size:21px}.header-tools{gap:5px}.header-tools button{font-size:11px;padding:9px}.layout{grid-template-columns:minmax(0,1.4fr) minmax(300px,1fr);gap:15px}aside{padding:17px}.heading>p{font-size:17px;max-width:400px}.choice .command{font-size:19px}.choice{min-height:89px;padding:11px}.choice svg{width:50px}.paper-stage{min-height:380px;padding:18px}}@media(max-width:760px){header{flex-wrap:wrap;gap:12px}.header-tools{flex-wrap:wrap}.header-tools button{font-size:12px}#welcome{grid-template-columns:1fr;padding:30px 6vw 0}.welcome-copy h1{font-size:58px}.welcome-art{margin-top:35px}.welcome-bottom{margin-top:25px;font-size:10px;gap:12px}.heading{display:block}.heading>p{max-width:none;margin-top:16px}.layout{grid-template-columns:1fr}#lesson{padding:20px 5vw}.world-top{font-size:9px}.choice .command{font-size:22px}#speech{font-size:19px;min-height:60px}.paper-stage{min-height:320px}.paper-stage h2{font-size:31px}footer{align-items:flex-start;flex-direction:column}footer p{max-width:100%}.sticker{font-size:17px;padding:15px;right:20px}.guide-content{padding:24px}.guide-content table{font-size:12px}}@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important;scroll-behavior:auto!important}.confetti{display:none}.paper-card{transform:none}}
/* Keep the entire lesson visible on common classroom projectors. */
@media(min-width:1000px) and (min-height:650px) and (max-height:850px){header{padding:12px 4vw}.brand-mark{font-size:40px}.brand{font-size:23px}#lesson{padding-top:12px;padding-bottom:14px}nav{padding-bottom:10px}nav button{padding:8px 10px}.heading{margin:5px 0 15px;min-height:67px}.heading h1{font-size:38px}.heading .eyebrow{margin-bottom:9px}.heading>p{font-size:17px}#scene>svg{height:calc(100vh - 405px)}.world-top{padding:15px 20px 0}#speech{min-height:55px;padding:12px 20px;font-size:20px}aside{padding:17px 20px}.choice{min-height:87px;padding:11px 14px}.choice .command{font-size:21px}.choice svg{width:56px;height:56px}aside p{font-size:16px}.response{padding:10px 13px;font-size:16px}.goal{font-size:17px;margin-bottom:10px}.actions{margin-top:12px}.paper-stage{min-height:430px;padding:22px}.paper-stage h2{font-size:34px}.paper-card{margin:15px auto}.paper-card div{padding:15px}footer{margin-top:14px}footer p{font-size:14px}.maker-grid{margin:10px 0}.action-ticket{margin:10px 0;padding:10px}.action-ticket svg{height:70px;width:70px}}

.action-wave.done .wave-arm{transform-origin:53px 2px;transform:rotate(-28deg)}
@media(min-width:1000px) and (min-height:650px) and (max-height:850px){.paper-stage{min-height:363px;padding:16px}.paper-stage p{font-size:18px;margin:9px 0}.paper-card{margin:12px auto}.paper-card div{padding:10px}.paper-card svg{width:85px;height:85px}.paper-card strong{font-size:19px}.maker-grid{grid-template-columns:repeat(5,1fr);gap:5px}.maker-grid button{font-size:10px;padding:7px 2px}.maker-grid svg{height:36px;width:36px}.action-ticket{display:grid;grid-template-columns:65px 1fr;column-gap:8px;align-items:center;text-align:left}.action-ticket svg{grid-row:1/3;width:65px;height:65px}.action-ticket strong{font-size:20px}.action-ticket p{margin:2px 0}.maker-grid~.primary{font-size:17px}aside:has(.maker-grid) h2{font-size:25px;margin-bottom:8px}aside:has(.maker-grid) .eyebrow{margin-bottom:8px}}

.brand-logo{width:94px;height:68px;object-fit:contain;display:block}.brand-tagline{font:700 10px/1.5 'Trebuchet MS',sans-serif;letter-spacing:1.4px}.brand{gap:15px}.hello-note{font-size:22px!important;font-weight:bold;background:#edf1df;padding:15px;border-radius:16px}.party-scene.action-hello .wave-arm{transform-origin:53px 2px;transform:rotate(-28deg)}
@media(max-width:760px){.brand-logo{width:78px;height:58px}.brand-tagline{font-size:9px}}
@media(min-width:1000px) and (min-height:650px) and (max-height:850px){.brand-logo{width:75px;height:51px}.brand-tagline{font-size:9px}}
/* A friendly Halloween party, with clear emotional feedback. */
.pip-frown,.pip-happy-eyes,.pip-cheeks{opacity:0}.thinking .pip-smile{opacity:0}.thinking .pip-frown{opacity:1}.thinking .pip-eyes{transform:translateY(3px)}.thinking .pip-body{transform-origin:0px 35px;animation:uh-oh .55s ease-in-out 2;transform:rotate(-4deg) translateY(5px)}.done:not(.action-hello) .pip-eyes{opacity:0}.done:not(.action-hello) .pip-happy-eyes,.done:not(.action-hello) .pip-cheeks{opacity:1}.done:not(.action-hello) .pip-smile{stroke-width:5}.done:not(.action-hello) .pip-body{animation:happy-hop .6s ease-in-out 2;transform-origin:0px 45px}.reaction-badge .badge-pop{transform-origin:0px 0px;animation:badge-pop .5s cubic-bezier(.15,.8,.3,1.3) both}.reaction-badge.oops .badge-pop{animation:badge-pop .5s ease-out,uh-oh .5s .4s ease-in-out}.lantern-hang{transform-origin:0px -25px;animation:lantern-drift 5s ease-in-out infinite alternate}.bat-float{animation:bat-drift 5.5s ease-in-out infinite alternate}.little-spider{animation:spider-drift 4s ease-in-out infinite alternate}.fairy-light{animation:light-glow 3.5s ease-in-out infinite alternate}.busy .halloween-decor *{animation-play-state:paused}.confetti i:nth-child(3n){border-radius:50%;width:12px;height:12px}.confetti i:nth-child(5n){width:17px;height:17px;clip-path:polygon(50% 0,62% 35%,100% 50%,62% 65%,50% 100%,38% 65%,0 50%,38% 35%)}.response.success{border-left:5px solid #86a764}.response:not(.success){border-left:5px solid #dca578}.world:has(.thinking){box-shadow:0 0 0 3px #e7bc86}.world:has(.done:not(.action-hello)){box-shadow:0 0 0 3px #d7c274}
@keyframes uh-oh{0%,100%{transform:rotate(-4deg) translateY(5px)}30%{transform:rotate(4deg) translateY(5px)}70%{transform:rotate(-6deg) translateY(5px)}}@keyframes happy-hop{0%,100%{transform:translateY(0) scale(1)}45%{transform:translateY(-17px) scale(1.04)}}@keyframes badge-pop{from{opacity:0;transform:scale(.4)}to{opacity:1;transform:scale(1)}}@keyframes lantern-drift{from{transform:rotate(-6deg)}to{transform:rotate(6deg)}}@keyframes bat-drift{from{transform:translateY(-5px) rotate(-4deg)}to{transform:translateY(7px) rotate(4deg)}}@keyframes spider-drift{from{transform:translateY(0)}to{transform:translateY(9px)}}@keyframes light-glow{from{opacity:.6}to{opacity:1}}
@media(prefers-reduced-motion:reduce){.thinking .pip-body{transform:translateY(5px)}.done .pip-body{transform:none}}
@media(min-width:1000px) and (min-height:650px) and (max-height:850px){.response{margin-top:12px}.response:not(.success){line-height:1.4}.response b{margin-bottom:3px}}
/* Picture programming: the cards, their execution and the result share one view. */
.goal-preview{display:flex;align-items:center;gap:13px;padding-bottom:11px;border-bottom:1px solid var(--line)}.goal-preview svg{flex-shrink:0}.goal-preview small{display:block;letter-spacing:1.5px;font-size:10px;margin-bottom:6px}.goal-preview strong{font-size:16px;line-height:1.4;display:block}.bank{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin:13px 0}.bank button{padding:9px 4px;display:flex;flex-direction:column;align-items:center;gap:4px;font-size:12px;line-height:1.2}.bank button svg{flex-shrink:0}.strip-label{display:flex;justify-content:space-between;font-size:10px;letter-spacing:1px;font-weight:bold;margin:12px 0 8px}.sequence-strip{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;position:relative}.sequence-cell{position:relative;border:2px dashed #c4ceae;border-radius:15px;background:#fff9e9}.sequence-cell:not(:last-child):after{content:'→';position:absolute;right:-14px;top:42%;font-size:17px;z-index:2;color:#69866a}.sequence-cell>button:first-child{width:100%;padding:11px 3px 7px;border:0;background:transparent;display:flex;flex-direction:column;align-items:center;font-size:11px;min-height:106px;border-radius:13px;position:relative}.sequence-cell>button:first-child b{position:absolute;left:7px;top:5px;font-size:12px;color:#a8875d}.sequence-cell.picked{border:3px solid #658678;background:#e8efdc}.sequence-cell.current{border:3px solid #be9653;background:#fff0b5;box-shadow:0 0 0 3px #f1d28d}.sequence-cell.problem{border:3px solid #d5a16e;background:#fbe6cc}.remove-card{position:absolute;right:2px;top:1px;border:0;background:transparent;font-size:16px;padding:1px 6px;z-index:3}.blank-card{font:42px Georgia;color:#c6b995;height:62px;display:grid;place-items:center}.swap-controls{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:9px 0;font-size:12px;color:#647b67}.swap-controls button{padding:3px 10px;min-width:38px}.builder-hint{font-size:13px!important;line-height:1.4!important;margin:12px 0 0!important}.result-extra{display:block;font-size:12px;line-height:1.4;margin-top:5px}.intro-strip{display:flex;gap:11px;align-items:center;margin:22px 0}.intro-strip span{display:grid;place-items:center;width:64px;height:67px;border:2px dashed #b8c5a4;border-radius:12px;background:#fff4d7;font:32px Georgia}.intro-strip b{font-size:30px}.making-choices{display:flex;justify-content:space-between;gap:3px;margin:0 0 12px}.making-choices button{display:flex;flex-direction:column;align-items:center;padding:5px 2px;flex:1;font-size:9px;line-height:1.2}.making-choices button.selected{border:2px solid var(--ink);background:#e8efd8}.print-link{display:block;font-size:12px;margin-top:12px}.motion{animation:machine-move 1.35s cubic-bezier(.35,.1,.35,1) both;transform-box:view-box}.slow .motion{animation-duration:2.15s}.running-step .pip-body{animation:none!important}.running-step .wave-arm{transform-origin:53px 2px;animation:operate .55s ease-in-out 2}.stamp-tool{animation:stamp-down 1.25s ease-in-out both}.slow .stamp-tool{animation-duration:2s}.posting-card{animation:machine-move 1.15s ease-out both,post-away 1.3s ease-in both}.sweet-fall{animation:machine-move 1.3s ease-in both,post-away 1.4s ease-in both}.bow-appear,.op-tie .ribbon,.op-knot .ribbon{animation:bow-pop 1.1s ease-out both}.inflate-balloon{transform-origin:0px 45px;animation:inflate-balloon 1.3s ease-in-out both}.card-fold{transform-origin:0px 0px;animation:fold-card 1.2s ease-in-out both}.op-fill .bag-sweets{animation:reveal-step 1.2s both}.op-on .light-glow{animation:light-on 1.3s ease-in both}.op-open .bag-mouth{transform-origin:0px -54px;animation:open-mouth 1.2s ease-in-out both}.seq-scene .halloween-decor{opacity:.8}.air-puff{animation:puff 1.2s ease-out both}
@keyframes machine-move{from{transform:translate(var(--dx),var(--dy))}to{transform:translate(0,0)}}@keyframes stamp-down{0%,100%{transform:translateY(0)}50%{transform:translateY(55px)}}@keyframes operate{0%,100%{transform:rotate(0)}50%{transform:rotate(22deg)}}@keyframes post-away{0%,65%{opacity:1}100%{opacity:0}}@keyframes reveal-step{0%,70%{opacity:0}100%{opacity:1}}@keyframes bow-pop{0%,30%{opacity:0;transform:scale(.15)}100%{opacity:1;transform:scale(1)}}@keyframes inflate-balloon{from{transform:scale(.4,.2)}to{transform:scale(1,1)}}@keyframes fold-card{from{transform:scaleX(1.65)}to{transform:scaleX(1)}}@keyframes open-mouth{from{transform:scaleY(.1)}to{transform:scaleY(1)}}@keyframes light-on{from{opacity:0}to{opacity:.35}}@keyframes puff{from{opacity:0;transform:translateX(-15px)}50%{opacity:1}to{opacity:0;transform:translateX(10px)}}
@media(min-width:1000px) and (min-height:650px) and (max-height:850px){header{padding-top:10px;padding-bottom:10px}nav{padding-bottom:6px}.heading{min-height:62px;margin:5px 0 12px}.heading h1{font-size:35px}.heading>p{font-size:16px;line-height:1.4;max-width:480px}aside{padding:12px 17px}.goal-preview{gap:9px;padding-bottom:6px;min-height:49px}.goal-preview svg{width:48px;height:49px}.goal-preview strong{font-size:14px;line-height:1.3}.goal-preview small{font-size:9px;margin-bottom:3px}.bank{margin:7px 0;gap:6px}.bank button{font-size:10px;padding:4px 2px;gap:2px}.bank svg{width:43px;height:43px}.strip-label{margin:8px 0 5px;font-size:9px}.sequence-strip{gap:10px}.sequence-cell>button:first-child{min-height:78px;padding:5px 2px 4px;font-size:10px}.sequence-cell svg{width:51px;height:51px}.sequence-cell>button:first-child b{font-size:10px;top:4px;left:5px}.blank-card{font-size:32px;height:51px}.swap-controls{font-size:10px;margin:5px 0}.swap-controls button{padding:1px 9px}.bank~.primary{font-size:15px;padding:10px 8px;margin-top:5px;border-radius:12px}.actions{margin-top:7px;gap:5px}.actions button{font-size:11px;padding:7px 5px}.response{margin-top:8px;padding:8px 10px;font-size:13px;line-height:1.35}.response b{margin-bottom:3px}.result-extra{font-size:11px;margin-top:3px}.builder-hint{font-size:11px!important;line-height:1.35!important;margin-top:8px!important}#speech{font-size:17px;padding:11px 16px;min-height:52px}#scene>svg{height:calc(100vh - 396px)}.making-choices{margin-bottom:7px}.making-choices svg{width:29px;height:31px}.making-choices button{font-size:8px}.print-link{font-size:11px;margin-top:7px}footer{margin-top:10px}footer p{font-size:13px;max-width:70%}.welcome-copy h1{font-size:70px}}
@media(max-width:760px){.sequence-cell>button:first-child{min-height:120px}.sequence-cell svg{width:73px;height:73px}.bank svg{width:75px;height:75px}.goal-preview strong{font-size:17px}.making-choices button{font-size:10px}#speech{font-size:17px}.sequence-cell:not(:last-child):after{right:-15px}.welcome-copy h1{font-size:51px;letter-spacing:-2px}}
@media(prefers-reduced-motion:reduce){.motion{transform:none!important}.posting-card,.sweet-fall{opacity:0}.stamp-tool{display:none}.bow-appear,.ribbon,.bag-sweets,.light-glow{animation:none!important}}
.op-stamp .pumpkin-face,.op-draw .draw-star{animation:reveal-step 1.2s both}.slow .op-stamp .pumpkin-face,.slow .op-draw .draw-star{animation-duration:1.9s}
@media(prefers-reduced-motion:reduce){.op-stamp .pumpkin-face,.op-draw .draw-star{animation:none!important}}
.stamp-tool{animation:none}.op-stamp .stamp-tool,.op-draw .stamp-tool{animation:stamp-down 1.25s ease-in-out both}.slow .op-stamp .stamp-tool,.slow .op-draw .stamp-tool{animation-duration:2s}
@keyframes stamp-down{0%,100%{transform:translateY(0)}50%{transform:translateY(var(--stamp-drop,55px))}}
@media(min-width:1000px) and (min-height:650px) and (max-height:850px){.bank svg{width:54px;height:54px}.sequence-cell svg{width:64px;height:64px}.sequence-cell>button:first-child{min-height:92px}.blank-card{height:64px}}
@media(prefers-reduced-motion:reduce){.stamp-tool{display:none}}
.op-post .post-inspection{animation:reveal-step 1.3s both}
@media(prefers-reduced-motion:reduce){.op-post .post-inspection{animation:none!important}}
.spill{animation:sweet-bounce 1.35s ease-in-out both}.blocked-light{animation:blocked-light 1.35s ease-in-out both}
@keyframes sweet-bounce{0%{transform:translate(var(--dx),var(--dy))}45%{transform:translate(calc(var(--dx) - 225px),-126px)}to{transform:translate(0,0)}}@keyframes blocked-light{0%{transform:translate(var(--dx),var(--dy))}50%{transform:translate(-165px,-40px)}to{transform:translate(0,0)}}
@media(prefers-reduced-motion:reduce){.spill,.blocked-light{transform:none!important}}
@media(min-width:1000px) and (min-height:650px) and (max-height:850px){body[data-lesson-stage="7"] aside{padding-top:10px;padding-bottom:10px}body[data-lesson-stage="7"] .sequence-cell svg{width:56px;height:56px}body[data-lesson-stage="7"] .sequence-cell>button:first-child{min-height:84px}body[data-lesson-stage="7"] .bank svg{width:48px;height:48px}}
.sequence-cell.picked{border-color:#568baf;background:#e6eef3;box-shadow:0 0 0 2px #a7c5d7}.sequence-cell.picked:before{content:'↔';position:absolute;left:42%;top:-13px;background:#568baf;color:white;font-size:14px;border-radius:7px;padding:0 5px;z-index:4}

/* Keep each instruction legible; stamp position and ink follow explicit playback phases. */
.swap-controls{justify-content:center;min-height:24px;text-align:center}.sequence-cell>button:first-child{min-height:140px}.sequence-cell svg{width:90px;height:90px}.bank button{opacity:1}.stamp-head.down{animation:press-down .6s ease-in-out both}.stamp-head.contact{transform:translateY(var(--stamp-drop))}.stamp-head.up{animation:press-up .6s ease-in-out both}.slow .stamp-head.down,.slow .stamp-head.up{animation-duration:.96s}.stamp-ready .motion,.stamp-down .motion,.stamp-contact .motion,.stamp-up .motion{animation:none}.op-stamp .pumpkin-face,.op-draw .draw-star{animation:none}.running-step .wave-arm{animation:none}.stamp-contact .pumpkin-face,.stamp-contact .draw-star{filter:drop-shadow(0 0 3px #ffe5a2)}
@keyframes press-down{from{transform:translateY(0)}to{transform:translateY(var(--stamp-drop))}}@keyframes press-up{from{transform:translateY(var(--stamp-drop))}to{transform:translateY(0)}}
@media(min-width:1000px) and (min-height:650px) and (max-height:850px){.sequence-cell svg{width:82px;height:82px}.sequence-cell>button:first-child{min-height:116px}.strip-label{margin-top:14px}.primary.wide{margin-top:8px}.bank svg{width:58px;height:58px}}
@media(max-width:760px){.sequence-cell svg{width:78px;height:78px}.sequence-cell>button:first-child{min-height:128px}}
@media(prefers-reduced-motion:reduce){.stamp-head.down,.stamp-head.up{animation:none}.stamp-head.down{transform:translateY(var(--stamp-drop))}}

.sequence-cell button:disabled{opacity:1}.sequence-cell.current{box-shadow:0 0 0 3px #f1d28d}.sequence-cell.current svg{filter:drop-shadow(0 2px 2px #cbb17a)}

.failure{background:#fff0e3;border:2px solid #d6987f}.actual-result{display:flex;align-items:center;gap:10px}.actual-result svg{flex:0 0 76px}.actual-result small{display:block;letter-spacing:1px;font-size:10px;font-weight:bold;margin-bottom:4px}.goal-checks{display:flex;gap:6px;flex-wrap:wrap;margin-top:6px}.goal-checks span{font-size:11px;font-weight:bold;padding:4px 6px;border-radius:7px;background:#e4ebd5}.goal-checks .missing{background:#f4d6c7;color:#854638}.sequence-cell.problem:before{content:'!';position:absolute;right:5px;top:4px;background:#af6650;color:#fff7e8;border-radius:50%;width:20px;height:20px;text-align:center;font-weight:bold;z-index:3}.blocked .pip-smile{opacity:0}.blocked .pip-frown{opacity:1}.world:has(.blocked){box-shadow:0 0 0 3px #d6987f}.error-target{pointer-events:none}.table-ink{opacity:1}.blocked .error-target{animation:error-pulse .6s ease-in-out 2}@keyframes error-pulse{50%{opacity:.5}}
@media(min-width:1000px) and (min-height:650px) and (max-height:850px){.failure{padding:8px 10px}.actual-result svg{width:63px;height:63px;flex-basis:63px}.goal-checks span{font-size:10px;padding:3px 5px}.failure .result-extra{margin-top:4px}}

@media(min-width:1000px) and (min-height:650px) and (max-height:850px){.actual-result svg{width:58px;height:58px;flex-basis:58px}.failure{padding:7px 10px}.failure b{font-size:13px;margin-bottom:2px}.goal-checks{margin-top:3px}}
@media(min-width:1000px) and (min-height:650px) and (max-height:850px){
 body[data-lesson-stage="7"] .making-choices svg{width:23px;height:24px}
 body[data-lesson-stage="7"] .making-choices button{padding:3px 2px}
 body[data-lesson-stage="7"] .sequence-cell svg{width:48px;height:48px}
 body[data-lesson-stage="7"] .sequence-cell>button:first-child{min-height:74px}
 body[data-lesson-stage="7"] #run{font-size:16px;padding:10px 8px}
 body[data-lesson-stage="7"] .actual-result svg{width:44px;height:44px;flex-basis:44px}
 body[data-lesson-stage="7"] .failure{padding:6px 9px}
 body[data-lesson-stage="7"] .actual-result{font-size:12px;line-height:1.3}
 body[data-lesson-stage="7"] .print-link{margin-top:4px;font-size:10px}
}

/* Teacher-paced mission before each of the five machines. */
#mission{padding:12px 0 20px}.mission-card{position:relative;display:grid;grid-template-columns:.8fr 1.4fr;max-width:1060px;margin:8px auto;background:#fffcf4;border:2px solid #cbd4b8;border-radius:32px;overflow:hidden;box-shadow:0 10px 0 #d7dbc44d;animation:mission-arrive .45s ease-out both}.mission-art{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;background:#e9efd9;padding:44px 30px 32px;text-align:center;border-right:1px solid #cbd4b8}.mission-sticker{position:absolute;left:22px;top:22px;font-size:11px;font-weight:bold;letter-spacing:1.4px;background:#f2ca72;padding:9px 13px;border-radius:10px;transform:rotate(-4deg)}.mission-goal-art{display:grid;place-items:center;width:240px;height:235px;border-radius:50%;background:#fff6de;margin:12px 0 18px}.mission-art small{letter-spacing:2px;font-size:11px;font-weight:bold;margin:8px 0}.mission-art strong{font:400 25px/1.3 Georgia,serif;max-width:280px}.mission-pip{position:absolute;bottom:25px;left:14px;width:68px;opacity:.9}.mission-pip svg{width:100%;display:block}.mission-star{position:absolute;right:23px;top:65px;font:45px Georgia;color:#dca578}.mission-star.second{right:36px;top:126px;font-size:24px}.mission-copy{padding:34px 40px}.mission-copy .eyebrow{font-size:11px;margin-bottom:9px}.mission-copy h1{font:400 36px/1.1 Georgia,serif;letter-spacing:-1px;margin:0 0 12px}.mission-context{font-size:17px;line-height:1.4;margin:0 0 18px}.mission-start{border-left:4px solid #a1b98b;padding:7px 14px;background:#f0f3e6;border-radius:0 12px 12px 0}.mission-start b,.mission-rules>b{font-size:12px;letter-spacing:.7px}.mission-start p{font-size:16px;line-height:1.4;margin:5px 0}.mission-rules{margin-top:16px}.mission-rules p{display:flex;gap:10px;font-size:16px;line-height:1.45;margin:8px 0}.mission-rules p span{color:#b97c5c;flex-shrink:0}.mission-question{font-size:21px;line-height:1.35;font-weight:bold;margin:19px 0 16px}.mission-copy .primary{font-size:17px;padding:13px 20px}.review-mission{display:block;margin:8px auto 0;padding:3px 5px;border:0;background:transparent;font-size:11px;text-decoration:underline;font-weight:normal}.heading:has(#story[hidden]){min-height:62px}.mission-card button:focus-visible{outline-offset:3px}
@keyframes mission-arrive{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:translateY(0)}}
@media(min-width:1000px) and (min-height:650px) and (max-height:850px){#mission{padding:0}.mission-card{margin:4px auto}.mission-copy{padding:26px 34px}.mission-copy h1{font-size:32px}.mission-context{font-size:16px;margin-bottom:13px}.mission-rules{margin-top:12px}.mission-rules p{font-size:15px;margin:7px 0}.mission-question{font-size:20px;margin:14px 0}.mission-art{padding-top:35px}.mission-goal-art{width:220px;height:218px}.mission-art strong{font-size:24px}.review-mission{margin-top:5px;font-size:10px}}
@media(max-width:760px){#mission{padding-top:0}.mission-card{grid-template-columns:1fr;border-radius:25px}.mission-art{border-right:0;border-bottom:1px solid #cbd4b8;padding:38px 24px 20px}.mission-goal-art{width:160px;height:160px;margin:12px 0 6px}.mission-goal-art svg{width:145px;height:145px}.mission-art strong{font-size:23px;max-width:270px}.mission-pip{width:50px;bottom:22px;left:10px}.mission-copy{padding:26px 24px}.mission-copy h1{font-size:29px}.mission-question{font-size:20px}.mission-copy .primary{width:100%;font-size:16px}}
.mission-pip{top:18px;right:14px;bottom:auto;left:auto;width:52px}.mission-star{top:120px}.mission-star.second{top:182px}
@media(max-width:760px){.mission-pip{width:45px;top:14px;right:12px;bottom:auto;left:auto}}

.heading>.review-mission{margin:0;padding:6px 8px;font-size:12px;white-space:nowrap;flex-shrink:0}@media(max-width:760px){.heading>.review-mission{margin-top:12px;padding-left:0;white-space:normal;text-align:left}}
/* The classroom uses the available viewport, rather than growing with either panel. */
@media(min-width:1000px){
 body{height:100dvh;display:flex;flex-direction:column}
 header{flex:none;padding:9px 3vw;gap:12px}
 .brand-logo{width:75px;height:51px}.brand-tagline{font-size:9px}
 #lesson{flex:1;min-height:0;width:100%;display:grid;grid-template-rows:auto auto minmax(0,1fr) auto;gap:9px;padding:10px 3vw 12px;margin:0 auto}
 #chapters{padding:0;gap:4px;align-items:center}#chapters button{padding:7px 9px;font-size:12px}
 .heading,.heading:has(#story[hidden]){margin:0;min-height:56px;gap:24px}.heading h1{font-size:clamp(28px,2.8vw,42px)}.heading .eyebrow{font-size:10px;margin-bottom:6px}.heading>p{font-size:15px;line-height:1.35;max-width:450px}
 .layout{min-height:0;grid-template-columns:minmax(0,1.35fr) minmax(350px,1fr);gap:20px;align-items:stretch}
 .world{height:100%;min-height:0;display:grid;grid-template-rows:auto minmax(0,1fr) auto;border-radius:25px}
 .world-top{padding:13px 18px 0;font-size:9px;letter-spacing:1px}
 #scene{min-height:0;padding:0 8px;display:flex;align-items:center;justify-content:center}#scene>svg{height:100%;width:100%;min-height:0;object-fit:contain}
 #speech{min-height:52px;display:flex;align-items:center;justify-content:center;padding:10px 16px;font-size:clamp(16px,1.3vw,22px);line-height:1.3}
 #controls{height:100%;min-height:0;display:flex;flex-direction:column;gap:6px;padding:12px 16px;border-radius:25px}
 #controls>*{flex-shrink:0}#controls>.sequence-strip{flex:1;min-height:84px}
 .goal-preview{gap:9px;padding-bottom:6px;min-height:46px}.goal-preview svg{width:46px;height:46px}.goal-preview small{font-size:9px;margin-bottom:3px}.goal-preview strong{font-size:clamp(14px,1.05vw,18px);line-height:1.3}
 .bank{margin:0;gap:7px}.bank button{padding:5px 3px;gap:3px;font-size:11px}.bank svg{width:clamp(42px,6vh,68px);height:clamp(42px,6vh,68px)}
 .strip-label{margin:3px 0 0;font-size:10px}.sequence-strip{gap:12px}.sequence-cell>button:first-child{height:100%;min-height:0;justify-content:center;gap:6px;padding:8px 3px;font-size:12px}.sequence-cell svg{width:clamp(56px,8vh,90px);height:clamp(56px,8vh,90px)}.blank-card{height:clamp(56px,8vh,90px);font-size:38px}
 .swap-controls{margin:0;min-height:18px;font-size:11px}.primary.wide,#run{margin:0;font-size:17px;padding:11px 10px;border-radius:13px}.actions{margin:0;gap:6px}.actions button{font-size:11px;padding:7px 5px}
 .builder-hint{margin:0!important;font-size:11px!important;line-height:1.35!important}.response{margin:0;font-size:13px;line-height:1.35;padding:8px 10px}.response b{margin-bottom:3px}.result-extra{font-size:11px;margin-top:3px}.failure{padding:7px 10px}.failure b{font-size:13px;margin-bottom:2px}.actual-result svg{height:54px;width:54px;flex-basis:54px}.goal-checks{margin-top:3px}.goal-checks span{font-size:10px;padding:3px 5px}
 .making-choices{margin:0}.making-choices button{font-size:9px;padding:4px 2px}.making-choices svg{width:27px;height:27px}.print-link{margin:0;font-size:11px}
 body[data-lesson-stage="7"] #controls{padding:10px 14px}body[data-lesson-stage="7"] .sequence-cell>button:first-child{height:100%;min-height:0}body[data-lesson-stage="7"] #controls>.sequence-strip{min-height:70px}
 footer{margin:0;gap:16px;min-height:44px}footer p{font-size:12px;max-width:64%;line-height:1.35}footer button{padding:10px 15px;font-size:14px}footer .primary{padding:10px 16px;font-size:15px}
 #lesson:has(#mission:not([hidden])){grid-template-rows:auto minmax(0,1fr)}#mission{min-height:0;padding:0;display:grid;place-items:center}.mission-card{margin:0;width:100%;max-width:1060px;max-height:100%}
 #welcome{flex:1;min-height:0;width:100%;grid-template-rows:minmax(0,1fr) auto;padding:18px 4vw 0}.welcome-copy{align-self:center}.welcome-copy h1{font-size:clamp(50px,5.3vw,85px);margin:12px 0 20px}.lead{font-size:20px;line-height:1.4;margin-bottom:20px}.welcome-note{margin-top:18px}.welcome-art{min-height:0}.welcome-art svg{height:min(49vh,480px);width:100%}.welcome-bottom{margin-top:12px;padding:17px 0;font-size:12px}
}
@media(min-width:1000px) and (max-height:700px){
 header{padding-top:5px;padding-bottom:5px}.brand-logo{height:42px;width:62px}#lesson{padding-top:6px;padding-bottom:8px;gap:6px}.heading,.heading:has(#story[hidden]){min-height:48px}.heading h1{font-size:29px}#chapters button{font-size:11px;padding:5px 8px}
 #controls{padding:9px 12px;gap:4px}.goal-preview{min-height:40px}.goal-preview svg{height:38px;width:38px}.goal-preview strong{font-size:13px}.bank svg{width:38px;height:38px}.bank button{font-size:10px;padding:3px 2px}.sequence-cell svg{width:48px;height:48px}.blank-card{height:48px;font-size:32px}#controls>.sequence-strip{min-height:70px}.sequence-cell>button:first-child{font-size:11px;padding:5px 2px;gap:3px}#run{font-size:15px;padding:8px 8px}.actions button{padding:5px;font-size:10px}.swap-controls{font-size:10px;min-height:15px}#speech{font-size:15px;min-height:43px;padding:7px 12px}.actual-result svg{height:40px;width:40px;flex-basis:40px}.actual-result{font-size:12px}.response{padding:6px 8px}.goal-checks span{font-size:9px}.builder-hint{font-size:10px!important}.world-top{padding-top:9px}footer{min-height:38px}footer p{font-size:11px}footer .primary,footer button{padding:8px 13px;font-size:13px}
 .mission-copy{padding:18px 28px}.mission-copy h1{font-size:28px}.mission-context{margin-bottom:10px;font-size:14px}.mission-start p,.mission-rules p{font-size:14px;line-height:1.3}.mission-rules{margin-top:9px}.mission-question{font-size:18px;margin:10px 0}.mission-copy .primary{padding:10px 15px;font-size:15px}.mission-goal-art{height:170px;width:170px;margin:8px 0}.mission-goal-art svg{height:165px;width:165px}.mission-art{padding:36px 25px 18px}.mission-art strong{font-size:21px}
 .welcome-copy h1{font-size:54px}.lead{font-size:17px}.welcome-bottom{padding:12px 0}.welcome-note{margin-top:10px}
}
@media(min-width:1000px) and (max-height:700px){
 body[data-lesson-stage="7"] .making-choices svg{width:18px;height:18px}
 body[data-lesson-stage="7"] .making-choices button{padding:2px;font-size:8px}
 body[data-lesson-stage="7"] .actual-result svg{width:30px;height:30px;flex-basis:30px}
 body[data-lesson-stage="7"] .failure{padding:5px 7px}
 body[data-lesson-stage="7"] .actual-result{font-size:11px;line-height:1.25}
 body[data-lesson-stage="7"] .sequence-cell svg{width:42px;height:42px}
 body[data-lesson-stage="7"] #controls>.sequence-strip{min-height:64px}
 body[data-lesson-stage="7"] .print-link{font-size:10px}
}
@media(min-width:1600px) and (min-height:850px){
 #chapters button{font-size:14px;padding:8px 11px}.bank button{font-size:14px;padding:8px 4px}.bank svg{width:74px;height:74px}.sequence-cell svg{width:108px;height:108px}.sequence-cell>button:first-child{font-size:16px;gap:10px}.blank-card{height:108px;font-size:52px}.goal-preview svg{width:56px;height:56px}.strip-label{font-size:11px}.swap-controls{font-size:13px}.primary.wide,#run{font-size:20px;padding:14px 12px}.actions button{font-size:13px;padding:10px 7px}.builder-hint{font-size:13px!important}.response{font-size:15px;padding:10px 12px}.actual-result svg{width:64px;height:64px;flex-basis:64px}.goal-checks span{font-size:12px}footer p{font-size:14px}footer .primary,footer button{font-size:17px;padding:12px 20px}.world-top{font-size:10px}
}
