#code-app .game-title{display:flex;gap:14px;align-items:flex-end;justify-content:flex-start}
#code-app .game-title>label{display:grid;gap:6px;min-width:0;flex:1 1 250px;max-width:100%;font-weight:700}
#code-app select{max-width:100%;min-height:44px;font:inherit}
#code-app .game-title select{width:100%}
#code-app .code-criteria{padding-left:24px;line-height:1.6}
#code-app .code-criteria:empty{display:none}
#code-app .code-example,.code-overview{padding:12px 16px;border:1px solid #c8d4ed;border-radius:16px;background:#f0f4ff;margin:16px 0}
#code-app .code-example summary,.code-overview summary{cursor:pointer;min-height:44px;display:list-item;align-content:center;font-weight:700}
#code-app .workbench{align-items:start}
#code-app .code-scene,#code-app .code-editor{min-width:0}
#code-app .step-meta{flex-wrap:wrap;gap:8px}
#code-app .step-meta label{display:grid;gap:4px;max-width:100%}
#code-app #code-position{font-size:.9rem;line-height:1.5;color:#354667}
#code-app .program-grid{max-width:390px;width:100%}
#code-app .program-cell{position:relative;aspect-ratio:1;min-height:0}
#code-app .program-cell img{position:absolute;inset:15%;width:70%;height:70%}
#code-app .code-marker{font-size:1rem;font-weight:900;color:#44207f;background:#ede2ff;border:2px solid #68469b;border-radius:50%;min-width:26px;min-height:26px;display:grid;place-items:center}
#code-app .code-legend{font-size:.85rem;color:#52617a;line-height:1.5}
#code-app .code-prediction-label{font-weight:700;display:block;margin-top:18px;margin-bottom:8px}
#code-app #code-prediction{width:100%;font-size:.94rem}
#code-app .code-builder-options{display:flex;gap:10px;flex-wrap:wrap;align-items:flex-end;padding:10px 0}
#code-app .code-builder-options label{display:grid;gap:4px;min-width:0;max-width:100%;font-size:.9rem}
#code-app .code-builder-options button,#code-app .code-enter,#code-app #code-close,#code-app #code-else,#code-app #code-undo{min-height:44px;padding:8px 10px;font:inherit;color:#273b70;background:#fff;border:1px solid #b5c5e4;border-radius:10px}
#code-app .code-editing{padding:8px 10px;background:#fff5d9;border:1px solid #e7cd80;border-radius:10px;font-size:.9rem;overflow-wrap:anywhere}
#code-app #code-program{max-height:540px;overflow:auto;padding:5px;scroll-padding:8px}
#code-app #code-program li{display:block;padding:8px;margin:8px 0;border:1px solid #d0dcf2;border-radius:10px;background:#edf2ff}
#code-app .code-program-row{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px;line-height:1.4}
#code-app .code-program-row>span{flex:1 1 130px;overflow-wrap:anywhere;font-size:.94rem;font-weight:700}
#code-app .code-program-tools{display:flex;gap:6px;flex-wrap:wrap}
#code-app #code-program .code-program-tools button{width:44px;height:44px;min-width:44px;min-height:44px;font-size:1.15rem;line-height:1}
#code-app #code-program select{margin-top:8px;width:auto;max-width:100%;font-size:.9rem}
#code-app .code-branch-label{display:block;font-size:.85rem;margin-top:12px}
#code-app .code-enter{margin:4px 0;font-size:.85rem}
#code-app .code-block-children{padding:0 0 0 9px;margin:0;border-left:3px solid #7c94c6;list-style:none}
#code-app #code-program .active{outline:3px solid #3555c7;background:#e2ebff}
#code-app #code-help,#code-app #code-solution-view{margin:12px 0}
#code-app #code-solution-view pre{white-space:pre-wrap;overflow-wrap:anywhere}
#code-app .code-view{white-space:pre-wrap;overflow-wrap:anywhere}
#code-app button:disabled{opacity:.65;cursor:default}
#code-app aside.note>a{display:inline-flex;align-items:center;min-height:44px;max-width:100%;margin-top:12px;padding:6px 0;line-height:1.4;overflow-wrap:anywhere}
@media(max-width:700px){#code-app .game-title{display:grid;grid-template-columns:minmax(0,1fr)}#code-app .game-title>label{width:100%}#code-app .program-grid{max-width:290px}#code-app .code-builder-options{align-items:stretch}#code-app .code-builder-options label{flex:1 1 170px}#code-app .code-builder-options select{width:100%}#code-app #code-program{max-height:480px}#code-app .code-block-children{padding-left:5px}#code-app #code-program li{padding:6px}}
@media(prefers-reduced-motion:reduce){#code-app *,#code-app *::before,#code-app *::after{animation:none!important;transition:none!important}}
