*{box-sizing:border-box}body{margin:0;color:#28334b;background-color:#fff8e9;background-image:radial-gradient(#ebdbba 1px,transparent 1px);background-size:15px 15px;font:16px/1.4 ui-rounded,"Trebuchet MS",system-ui,sans-serif}main,.studio-footer{width:min(1160px,100%);margin:auto;padding:0 28px}.brand{font-weight:950;font-size:27px;letter-spacing:-.07em;display:flex;align-items:center;gap:10px}.brand-drop{display:inline-grid;place-items:center;width:26px;height:29px;background:#52cbe0;color:#273852;border-radius:60% 8% 60% 60%;transform:rotate(-45deg);border:2px solid}.tag,.kicker,.chapter,#badge,.padhead{font:800 11px/1.3 ui-monospace,monospace;letter-spacing:.12em}.tag{border:1.5px solid #344052;border-radius:20px;padding:7px 13px;background:#ffe185}.heading{display:flex;align-items:center;justify-content:space-between;margin:27px 0 19px}h1,h2{margin:0;font-weight:950;letter-spacing:-.065em;line-height:1.05}h1{font-size:clamp(42px,5.8vw,72px);color:#29354f;text-shadow:2px 3px #ffc36d}.kicker{color:#855031;margin-bottom:8px}#badge{color:#5c487a;background:#eee0fa;border:1.5px solid #886ca6;padding:9px 13px;border-radius:20px;letter-spacing:.06em}.layout{display:grid;grid-template-columns:minmax(0,1.52fr) minmax(320px,1fr);gap:20px;align-items:start;padding-bottom:28px}.play,.desk{border:2px solid #344055;border-radius:22px;overflow:hidden;box-shadow:0 5px 0 #c5b99e;background:#fffdf5}.scene{background:#a8e6ef;border-bottom:2px solid #344055}.scene svg{display:block;width:100%;height:auto}.mission{padding:17px 22px 19px}.chapter{color:#52705d}.mission h2,.desk h2{font-size:30px;margin:5px 0 7px}.mission p,.instruction{margin:0;color:#50586b}.desk{padding:21px;background:#faf3ff}.desk .kicker{color:#725782}.instruction{font-size:15px;min-height:21px}button{font:800 15px/1.15 inherit;font-family:inherit;font-size:15px;font-weight:800;color:#28334b;border:1.6px solid #394255;border-radius:10px;background:white;cursor:pointer}button:focus-visible,[tabindex]:focus-visible{outline:3px solid #b5550b;outline-offset:3px}button:disabled{opacity:.52;cursor:default}.chip{padding:9px 12px;box-shadow:0 3px #44445a;cursor:grab;touch-action:manipulation}.chip:active{transform:translateY(2px)}#palette{display:flex;gap:9px;margin:15px 0 18px;flex-wrap:wrap}.right{background:#ffd26b}.down{background:#8fdfdc}.left{background:#ffb6b9}.pad{border:1.5px solid #68718a;border-radius:13px;overflow:hidden;background:#fffefa}.padhead{background:#333d57;color:#fff7de;display:flex;justify-content:space-between;padding:9px 13px;font-size:10px}.padhead span+span{color:#dbd8f1;font-size:9px}#listing{padding:6px 10px;max-height:262px;overflow:auto}.line,.slot{width:100%;min-height:39px;display:flex;align-items:center;gap:10px;font:700 15px/1.2 ui-monospace,monospace;border-bottom:1px dashed #d7cfde}.line{cursor:grab}.line.active{background:#fff0a7;box-shadow:inset 4px 0 #f0a22d}.num{font:600 14px monospace;color:#766785;min-width:29px;text-align:center}.line .remove{margin-left:auto;border:0;background:transparent;font-size:19px;padding:6px 10px}.slot{color:#766880;font-size:12px;border:0}.over{outline:3px dashed #8c55bb;outline-offset:-3px;background:#eee1f9}.actions{display:flex;gap:7px;margin:15px 0 11px}.actions button,#next{padding:10px 15px;box-shadow:0 2px #394255}#run,#next{background:#bce884}#feedback{font-size:14px;line-height:1.4;color:#45455d}#next{margin-top:12px}#pip-shadow{transform-origin:0 8px}.happy{transform-box:fill-box;transform-origin:center;animation:bob .65s ease-in-out infinite alternate}@keyframes bob{to{transform:translateY(-3px) rotate(-3deg)}}@media(max-width:760px){main,.studio-footer{padding:0 12px}.brand{font-size:22px}.heading{margin:15px 0 12px}.heading .kicker{margin-bottom:3px}.layout{grid-template-columns:1fr;gap:12px}.scene svg{max-height:32vh}.mission{padding:9px 14px}.mission h2{font-size:22px;display:inline-block;margin-right:5px}.mission p,.chapter{font-size:13px}.desk{padding:15px}.desk h2{font-size:25px}#badge{font-size:9px;padding:6px}.tag{font-size:9px}#palette{margin:10px 0 12px}}@media(prefers-reduced-motion:reduce){#pip{transition:none}.happy{animation:none}}[hidden]{display:none!important}
.chip,.line{touch-action:none;user-select:none;-webkit-user-select:none}.ghost{position:fixed;z-index:10;pointer-events:none;border:2px solid #394255;border-radius:10px;transform:rotate(-5deg);font-weight:800}

.chip.repeat,.token.repeat{background:#d9bafa}.line{gap:5px;min-height:48px;cursor:default}.line.selected,.slot.selected{box-shadow:inset 3px 0 #8662a7}.line.active{box-shadow:inset 3px 0 #d78e17}.line .num{background:transparent;border:0;cursor:grab;padding:8px 3px}.blocks{display:flex;align-items:center;flex-wrap:wrap;gap:5px;padding:5px 0}.token{display:inline-flex;align-items:center;gap:4px;padding:4px 5px;border:1px solid #596074;border-radius:7px;font:700 13px ui-monospace,monospace;cursor:grab;white-space:nowrap;touch-action:none}.token.executing{position:relative;background:#fff255;color:#25232c;outline:3px solid #a04b05;box-shadow:0 0 9px 2px #ffb51c;animation:hop-light .48s ease-out}
.token.executing::after{content:"▶";position:absolute;top:-8px;left:2px;padding:0 3px;background:#853e05;color:white;border-radius:3px;font:9px/12px system-ui;pointer-events:none}
.token.loop-running{background:#aa72db;color:#24152e;box-shadow:0 0 0 2px #754396}
@keyframes hop-light{from{box-shadow:0 0 12px 5px #ffb51c}to{box-shadow:0 0 9px 2px #ffb51c}}
@media(prefers-reduced-motion:reduce){.token.executing{animation:none}}.token input{width:34px;text-align:center;border:1px solid #766086;border-radius:4px;font:700 16px ui-monospace,monospace;color:#282f4b;background:white;touch-action:auto;user-select:text}.line .token .remove{margin:0;padding:2px;color:#465065;font-size:14px}.slot{border-radius:0;text-align:left;background:transparent;padding:6px 10px}
.blocks.loop-group{display:grid;grid-template-columns:max-content minmax(0,1fr);align-items:start;gap:4px 17px;min-width:0;max-width:100%}
.loop-group>.repeat{margin-top:3px}
.loop-moves{position:relative;display:flex;flex-wrap:wrap;align-items:center;gap:5px;padding:3px;border:1.5px solid #8152a2;border-radius:8px;background:#f5edfb;min-width:0}
.loop-moves::before,.loop-moves::after{content:"";position:absolute;pointer-events:none}
.loop-moves::before{left:-18px;top:15px;width:16px;border-top:2px solid #754690}
.loop-moves::after{left:-7px;top:12px;width:6px;height:6px;border-top:2px solid #754690;border-right:2px solid #754690;transform:rotate(45deg)}
.loop-moves.empty-loop{border-style:dashed;padding:7px;font:600 12px/1.3 ui-monospace,monospace;color:#67447e}

.blocks.loop-group{display:flex;align-items:center;gap:5px;min-width:0}.loop-group>.repeat{margin:0 12px 0 0}.loop-moves{max-width:100%}.group-actions{display:flex;flex-basis:100%;gap:7px}.group-actions button{font:600 11px/1.3 ui-monospace,monospace;padding:4px 7px;color:#593577;border:1px solid #9b81ac;background:#f6effb}

.level-picker{display:grid;gap:4px;font-weight:800;font-size:13px}.level-picker select{cursor:pointer;max-width:100%;min-height:40px}
@media(max-width:540px){.heading{flex-wrap:wrap;gap:10px}.level-picker{font-size:12px}#badge{font-size:13px}}

#budget{background:#e3f1d0;color:#314932;border-radius:8px;padding:6px 10px;font-weight:700;font-size:14px;margin:0 0 10px}#budget.over-budget{background:#ffe0b9;color:#673919}

.chip.turn,.token.turn{background:#f5b1df}
/* Keep the world and its notebook in the same viewport. Only the list of code scrolls. */
body{height:100vh;height:100dvh;min-height:330px;display:flex;flex-direction:column}
main,.studio-footer{margin:0 auto}

main{flex:1;min-height:0;display:flex;flex-direction:column}
.heading{flex:none;margin:10px 0 12px;gap:12px}.heading h1{font-size:clamp(27px,4.2vw,48px)}
.layout{flex:1;min-height:0;grid-template-columns:minmax(0,1.14fr) minmax(0,1fr);align-items:stretch;grid-template-rows:minmax(0,1fr);padding-bottom:12px}
.play,.desk{min-height:0;min-width:0;display:flex;flex-direction:column}
.scene{flex:1;min-height:0;overflow:hidden;display:flex;align-items:center}.scene svg{max-height:100%;width:100%;height:100%}
.watch{display:flex;align-items:center;gap:9px;flex:none;min-height:36px;padding:6px 14px;background:#34405c;color:white;font:700 13px ui-monospace,monospace}.watch-lamp{width:9px;height:9px;border-radius:50%;background:#ffe16e}#now{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.mission{padding:12px 15px;flex:none}.mission h2{font-size:25px}
#memory{display:flex;gap:5px;flex-wrap:wrap;padding:6px 10px;max-height:12vh;overflow:auto}.jar{font:700 13px/1.3 ui-monospace,monospace;border-radius:7px;background:#ffe098;color:#423455;padding:5px 7px}
.desk{padding:14px}.desk h2{font-size:25px}.desk>p{flex:none}.instruction{font-size:14px;line-height:1.3}
#palette{flex:none;max-height:16vh;overflow:auto;gap:6px;margin:9px 0;padding:1px 2px 4px}
.chip{min-height:40px;padding:6px 10px}
.pad{flex:1;min-height:62px;display:flex;flex-direction:column}.padhead{flex:none}
#listing{flex:1;max-height:none;overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable}
.actions{flex:none;margin:9px 0 6px}.actions button{min-height:42px}
#feedback{max-height:4em;overflow:auto;flex:none}#next{align-self:flex-start}#budget{margin-bottom:6px;padding:4px 8px}
#answer-form{border:1px solid #887ba5;background:#efe8ff;border-radius:8px;padding:6px;margin-top:4px;flex:none}#answer-form>div{display:flex;gap:6px}#reply{width:5em;font-size:16px}
.work-line{display:flex;align-items:center;gap:5px;flex-wrap:wrap;border-bottom:1px dashed #d5c9da;padding:6px 2px}
.work-op{font:800 13px/1.2 ui-monospace,monospace;padding:6px;border:1px solid #6d7281;border-radius:6px;background-color:#f7d995}.work-op.repeat{background:#d9bafa}
.work-arg{font:600 10px system-ui;display:grid;color:#596077}.work-arg input,.work-arg select{font:600 16px ui-monospace,monospace;border:1px solid #9695a1;padding:4px;border-radius:5px;color:#28334b;width:clamp(75px,9vw,125px)}
.work-line .remove{margin-left:auto;min-width:30px;min-height:30px;border:0;background:none}.work-lit{background:#fff0a7}.work-lit>.work-op{outline:3px solid #ab5a19;background:#fff255;box-shadow:0 0 9px #ffb51c}
.work-group{border-left:3px solid #a57ac5;background:#f7f1fc;margin-left:10px;padding-left:4px}
.work-slot{display:block;width:100%;padding:6px 4px;background:transparent;border:1px dashed #baacc8;text-align:left;font-size:12px;color:#675575}.work-slot.chosen{background:#e8def5;color:#483357}.workshop .num{min-width:22px}
@media(max-width:690px) and (orientation:portrait){
 .tag{padding:3px 9px}.heading{flex-wrap:nowrap;margin:5px 0 7px}.heading .kicker{display:none}.heading h1{font-size:25px;line-height:1}
 .level-picker{font-size:10px;gap:0;flex:1;max-width:260px}#badge{padding:3px 5px;min-height:34px;max-width:100%;font-size:12px;letter-spacing:0}
 .layout{grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(105px,28%) minmax(0,1fr);gap:7px}
 .play,.desk{border-radius:12px}.play{position:relative}.scene{flex:1}.watch{min-height:25px;font-size:11px;padding:3px 8px}
 .mission{display:none}#memory{position:absolute;left:0;top:0;right:0;max-height:45px;padding:3px;pointer-events:none}.jar{font-size:10px;padding:2px 4px}
 .desk{padding:8px}.desk>.kicker,.desk>h2{display:none}.instruction{font-size:13px;line-height:1.25}.chip{min-height:40px;padding:5px 8px;font-size:13px}#palette{max-height:90px;margin:4px 0;gap:4px}
 .actions{margin:6px 0 3px}#feedback{font-size:12px;line-height:1.25;max-height:2.6em}.actions button,#next{padding:6px 12px}.padhead{padding:4px 8px}.work-arg input{width:82px}
 #budget{font-size:12px}.line .remove{min-height:32px}.desk #next{margin-top:4px}
}
@media(max-height:565px) and (orientation:landscape){
 .heading{margin:2px 0 5px}.heading .kicker,.desk>.kicker,.desk>h2{display:none}.heading h1{font-size:24px}.level-picker{display:flex;align-items:center}#badge{min-height:32px}
 .layout{grid-template-columns:1fr 1.1fr;grid-template-rows:minmax(0,1fr);gap:10px;padding-bottom:7px}.desk,.mission{padding:6px}.mission h2{font-size:19px}.mission p{font-size:12px}
 .chip{min-height:34px;padding:4px 8px}#palette{margin:3px 0;max-height:50px}.instruction,#feedback{font-size:12px}.actions{margin:4px 0}.actions button{padding:4px 10px;min-height:33px}.padhead{padding:3px 9px}
}
@media(max-width:690px) and (orientation:portrait) and (max-height:700px){.layout{grid-template-rows:minmax(108px,31%) minmax(0,1fr)}}
.level-picker{min-width:0}
#badge option[value^="chapter-"]{font-weight:bold}
#badge{
 width:100%;
 -webkit-appearance:none;
 appearance:none;
 padding-inline-start:18px;
 padding-inline-end:34px;
 text-overflow:ellipsis;
 background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='m1.5 1.5 4.5 4.5 4.5-4.5' fill='none' stroke='%235c487a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
 background-repeat:no-repeat;
 background-position:right 13px center;
 background-size:12px 8px;
}
@media(max-width:760px){#badge{padding-inline-start:10px}}
@media(forced-colors:active){
 #badge{-webkit-appearance:auto;appearance:auto;background-image:none;padding-inline-end:8px}
}
.work-op,.value-card{touch-action:none;user-select:none;cursor:grab}.value-card{padding:6px 9px;border-radius:20px;background:#cbeee7;font:800 13px ui-monospace,monospace}
@media(min-width:691px) and (max-width:980px) and (orientation:portrait){
 .layout{grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,36%) minmax(0,1fr);gap:12px}
 .play{position:relative}.mission{padding:4px 10px}.mission h2,.mission .chapter{display:none}
 .desk>h2{font-size:22px;margin:2px 0}
}
@media(max-width:690px) and (orientation:portrait){
 .level-picker{min-width:0}#badge{width:100%}
 .mission{display:block;padding:2px 8px;max-height:35px;overflow:auto}.mission h2,.mission .chapter{display:none}.mission p{font-size:11px;line-height:1.2}
 .chapter-review .mission{max-height:5em}
 .work-line{min-height:40px}.work-slot{min-height:34px}.work-line .remove{min-width:36px;min-height:36px}
}

@keyframes pour-flow{to{stroke-dashoffset:-20}}
.pour-dashes{animation:pour-flow .42s linear infinite}
@media(prefers-reduced-motion:reduce){.pour-dashes{animation:none}}

.code-field{display:inline-flex;align-items:center;gap:3px;touch-action:manipulation}
.code-field button{min-height:27px;border-radius:4px;font:700 15px ui-monospace,monospace}
.code-field .field-done{padding:2px 6px;color:#226345;background:#f2fff5;border:1px solid #71977e}
.code-field .field-literal{border:0;background:transparent;padding:2px 6px;color:#48245f;text-decoration:underline dotted #9971ae;text-underline-offset:3px}
.code-field .field-literal:hover,.code-field .field-literal:focus-visible{background:#efdcff}
@media(pointer:coarse){.code-field button{min-height:34px;min-width:32px}}

.work-arg:has(.confirmed){max-width:100%;min-width:0}.field-literal{max-width:100%;white-space:pre-wrap;overflow-wrap:anywhere;text-align:left}
.work-slot{min-height:30px;color:#77578f;font-weight:800}.group-actions{flex-basis:auto}.group-actions button{font-size:15px;min-width:28px}
.mission #budget{display:inline;font-size:12px;padding:0;background:none;margin:0;color:#626151}.mission #budget.over-budget{color:#a04d23}

/* Keep the drop zone on the same line as its repeat count. */
.repeat-zone,.loop-moves.repeat-zone{display:inline-flex;align-items:center;gap:3px;flex-wrap:nowrap;flex:none;max-width:none;min-width:52px;min-height:34px;padding:2px 14px 2px 5px;border:1px solid #b49ac8;border-radius:6px;background:#f3eaf9}
.repeat-zone.over{background:#e3d2f3}.repeat-zone.chosen{box-shadow:inset 0 -2px #9364ac}
.loop-moves::after,.loop-moves::before{content:none}
.blocks.loop-group{flex-wrap:nowrap;gap:3px;max-width:100%;min-width:0;overflow-x:auto}.loop-group>.repeat{margin:0}
.work-line.repeat-row{flex-wrap:nowrap;gap:3px;max-width:100%;overflow-x:auto}
.work-line.inline-op{flex:none;flex-wrap:nowrap;gap:2px;padding:2px;border:0}
.repeat-row>.remove,.inline-op>.remove{min-width:18px;min-height:27px;margin-left:0;padding:1px 2px}
.work-line .work-op,.repeat-row>.work-arg{flex:none;white-space:nowrap}
.line .blocks.loop-group::-webkit-scrollbar,.repeat-row::-webkit-scrollbar{height:4px}
.work-line.inline-op:has(>.work-group){align-items:start}
@media(max-width:690px){
 #listing{padding-inline:6px;scrollbar-gutter:auto}
 .work-line.repeat-row{gap:2px}
 .repeat-row>.num{min-width:16px;font-size:12px}
 .repeat-row .work-op{font-size:12px;padding:5px 3px}
 .work-line.inline-op{gap:0;padding:2px 0}
 .repeat-row>.remove,.inline-op>.remove{min-width:15px;font-size:13px}
 .repeat-zone{gap:1px}
 .repeat-row .code-field .field-literal{padding-inline:2px;min-width:16px}
 .loop-group .token{padding:3px;gap:1px;font-size:12px}
}

.repeat-zone:empty{min-width:60px;border-style:dashed}.repeat-zone:focus-visible{outline:2px solid #835aa0;outline-offset:1px}

.repeat-gap{display:block;position:relative;flex:0 0 17px;height:30px;align-self:center;border-radius:4px;background:#fff7c3;box-shadow:inset 0 0 0 1px #c79134;pointer-events:none}
.repeat-gap::after{content:"";position:absolute;inset:3px auto 3px 7px;width:3px;border-radius:2px;background:#793920}
@media(max-width:690px),(pointer:coarse){.repeat-gap{flex-basis:21px;height:34px}.repeat-gap::after{left:9px}}

.repeat-zone:has(>.repeat-gap:only-child){min-width:60px;border-style:dashed}

.line-gap{display:grid;align-items:center;height:12px;padding:0 5px;border-radius:4px;background:#fff7c3;box-shadow:inset 0 0 0 1px #c79134;overflow-anchor:none}
.line-gap::after{content:"";height:3px;background:#793920;border-radius:2px}
@media(max-width:690px),(pointer:coarse){.line-gap{height:14px}}

.direction-slot{min-width:46px;min-height:32px;padding:3px 7px;border:1px solid #76a59b;border-radius:6px;background:#d9f3eb;color:#28334b;font:800 13px ui-monospace,monospace}
.direction-slot:empty{background:#f4fcf8;border-style:dashed}
.direction-slot[aria-pressed="true"]{outline:2px solid #38897c;outline-offset:1px}
.direction-slot.over{background:#fff4b0;outline:3px solid #a06024}
@media(pointer:coarse){.value-card,.direction-slot{min-height:40px}}

.scene{position:relative}
#pip-speech{position:absolute;z-index:2;width:max-content;max-width:min(30ch,calc(100% - 12px));color:#29384c;background:#fffff5;border:2px solid #35425a;border-radius:14px;box-shadow:0 2px #35425a26;font:700 16px/1.25 ui-rounded,system-ui,sans-serif}
#pip-words{display:block;max-height:clamp(38px,12vh,100px);overflow:auto;overscroll-behavior:contain;overflow-wrap:anywhere;white-space:pre-wrap;padding:6px 10px}
#pip-speech::after{content:"";position:absolute;left:var(--tail);bottom:-7px;width:10px;height:10px;background:#fffff5;border-right:2px solid #35425a;border-bottom:2px solid #35425a;transform:translateX(-50%) rotate(45deg)}
#pip-speech.below::after{top:-7px;bottom:auto;transform:translateX(-50%) rotate(225deg)}
@media(max-width:690px){#pip-speech{font-size:14px}#pip-words{max-height:52px}}

.studio-footer{
 flex:none;display:flex;align-items:center;justify-content:space-between;gap:12px;
 border-top:1px solid #e1d3b7;padding-block:4px max(4px,env(safe-area-inset-bottom));
}
@font-face{font-family:CodekindBoomchuk;src:url('fonts/boomchuk-wordmark.woff2') format('woff2');font-weight:700;font-style:normal;font-display:swap}
.studio-brand{display:inline-flex;align-items:center;gap:7px;min-height:32px;color:#28352c;text-decoration:none;font:700 17px/.92 CodekindBoomchuk,Arial,sans-serif;letter-spacing:-.065em}
.studio-brand img{width:22px;height:22px}
@media(max-width:690px),(max-height:565px){
 .studio-footer{padding-block:1px max(1px,env(safe-area-inset-bottom))}
 .studio-brand{font-size:15px}
 .studio-brand img{width:19px;height:19px}
}
@media(max-height:450px) and (orientation:landscape){
 body{min-height:0}
}
.codekind-title img{display:block;width:clamp(99px,34vw,202px);height:auto}
@media(max-height:565px) and (orientation:landscape){.codekind-title img{width:123px}}

.padhead:has(#chapter-help-button){align-items:center;padding-block:0}
#chapter-help-button{align-self:stretch;min-height:32px;min-width:44px;padding:3px 5px;border:0;background:transparent;color:#fff7de;font:700 13px/1.2 system-ui,sans-serif}
#chapter-help-button:focus-visible{outline-offset:-3px;outline-color:#ffe185}
@media(pointer:coarse){#chapter-help-button{min-height:38px}}
.chapter-card{
 width:min(380px,calc(100% - 32px));max-height:calc(100dvh - 24px);
 margin:auto;padding:clamp(20px,5vw,32px);overflow:auto;color:#28334b;
 border:2px solid #344055;border-radius:20px;background:#fffaf0;
 box-shadow:0 5px 0 #344055;
}
.chapter-card:not([open]){display:none}
.chapter-card[open]{display:flex;flex-direction:column}
.chapter-card .card-copy{min-height:0;overflow:auto;overscroll-behavior:contain}
.chapter-card::backdrop{background:rgb(39 49 58 / 46%)}
#intro-number,#help-number{margin:0 0 6px;color:#376a60;text-transform:uppercase}
#intro-title,#help-title{font-size:clamp(30px,5vw,38px);line-height:1.1}
#intro-idea{margin:10px 0 17px;line-height:1.4}
#intro-words-label{margin:0 0 6px;color:#59486f;font-size:12px;font-weight:750}
#intro-words{display:flex;flex-wrap:wrap;gap:5px;list-style:none;margin:0;padding:0}
#help-words{display:grid;grid-template-columns:max-content minmax(0,1fr);align-items:baseline;gap:8px 10px;margin:14px 0 0}
#intro-words li,#help-words dt{justify-self:start;padding:3px 7px;border-radius:5px;background:#efe4f8;color:#51396a;font:700 13px/1.4 ui-monospace,monospace;white-space:nowrap}
#help-words dd{margin:0;font-size:14px;line-height:1.4}
.chapter-card form{flex:none;margin:16px 0 0}
.chapter-card button{min-height:44px;padding:6px 21px;background:#bce884;box-shadow:0 2px #394255}

#help-hint code,#goal code,#help-words code{font:700 .98em ui-monospace,monospace;color:#523b69}
.work-line .work-arg input.variable-name{width:13ch}
.work-line .work-arg input.question-field{width:min(29ch,52vw)}

#help-hint{margin:10px 0;font-size:15px;line-height:1.4}
.layout-count{color:#536a56;font:700 11px/1.2 ui-monospace,monospace}
.desk{overflow-y:auto}
.desk #palette{margin-top:0}
#feedback:empty{display:none}

#feedback[data-result="success"],#feedback[data-result="retry"]{font-weight:750;max-height:4em}
#feedback[data-result="success"]{color:#275d3f}
#feedback[data-result="retry"]{color:#824317}

.result-row{display:flex;align-items:center;gap:8px;flex:none}
.result-row #feedback{flex:1;min-width:0}
#show-me{flex:none;min-height:36px;padding:6px 10px;background:#eee0fa;font-size:13px}
body.watching-example #listing .remove,body.watching-example #listing .group-actions,body.watching-example .work-slot,body.watching-example .slot{display:none}

/* Delete controls are pictures, with enough space to tap without hitting the code. */
#listing .remove{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;min-width:28px;min-height:32px;padding:4px;border:0;border-radius:6px;background:transparent;color:#687080;touch-action:manipulation}
#listing .remove svg{display:block;width:18px;height:18px;pointer-events:none}
#listing .remove:hover,#listing .remove:focus-visible{background:#f9e1dc;color:#963e33}
@media(max-width:690px),(pointer:coarse){#listing .remove{min-width:32px;min-height:36px}}

.action-slot{min-width:46px;min-height:32px;padding:3px 7px;border:1px solid #76a59b;border-radius:6px;background:#d9f3eb;color:#28334b;font:800 13px ui-monospace,monospace}
.action-slot:empty{background:#f4fcf8;border-style:dashed}
.action-slot[aria-pressed="true"]{outline:2px solid #38897c;outline-offset:1px}
.code-punct{font:800 17px ui-monospace,monospace;color:#5e467a}
.studio-puzzle .scene{background:#e6e2f5}
.studio-puzzle .scene svg{font-family:ui-rounded,"Trebuchet MS",system-ui,sans-serif;font-weight:700}
.studio-puzzle #reply{width:100%;min-width:0}.studio-puzzle #answer-form>div{min-width:0}
.studio-puzzle .work-arg input{width:clamp(74px,10vw,145px)}
.studio-puzzle .work-arg:has(.question-field){flex:1;min-width:130px}
.studio-puzzle .question-field{width:100%}
.studio-puzzle .work-group{margin-left:17px;padding-left:5px}
.studio-puzzle #memory{max-height:65px}
@keyframes studio-blink{50%{opacity:.4}}
.studio-blink{animation:studio-blink 1.2s ease-in-out infinite}
@media(prefers-reduced-motion:reduce){.studio-blink{animation:none}}
@media(max-width:690px){
 .studio-puzzle .work-line{gap:3px}.studio-puzzle .work-op{padding:5px;font-size:12px}
 .studio-puzzle .work-arg input{width:84px}.studio-puzzle .question-field{width:100%}
 .studio-puzzle .code-field{gap:1px}.studio-puzzle .code-field .field-done{padding:2px 4px}
 .studio-puzzle .code-field .field-literal{padding:2px 3px;font-size:13px}
 .studio-puzzle .work-group{margin-left:10px}.studio-puzzle #listing{padding-inline:4px}
}
