:root{color-scheme:light;--ink:#173c3d;--paper:#f7f0db;--green:#205e5c;--gold:#b28a40;--line:#d5cbb0;--muted:#627170}*{box-sizing:border-box}body{margin:0;background:#e8e1cd;color:var(--ink);font-family:'Microsoft YaHei','微软雅黑',sans-serif;font-size:15px}button,select{font:inherit;color:inherit}button{cursor:pointer;min-height:38px;padding:8px 12px;border:1px solid #b9c2af;background:#faf6e7;border-radius:9px;font-weight:700;transition:background .15s}button:hover:not(:disabled){background:#e5eddb;border-color:#367168}button:focus-visible,select:focus-visible{outline:3px solid #f1b632;outline-offset:3px}button:disabled{cursor:default;opacity:.42}button.primary{background:var(--green);color:#fff5d8;border-color:var(--green)}[hidden]{display:none!important}.topbar{height:76px;padding:10px 26px;display:flex;align-items:center;justify-content:space-between;gap:18px;background:#173c3d;color:#fff3d3}.brand{display:flex;align-items:center;gap:13px}.brand p{margin:0 0 3px;font-size:12px;letter-spacing:1.5px;color:#d3c9a9}.brand h1{font-size:25px;line-height:1.2;margin:0;letter-spacing:3px}.seal{height:45px;width:45px;border:1px solid #c1ac6d;border-radius:12px 2px;display:grid;place-items:center;color:#e3c271;font-size:28px;font-family:serif}.top-actions{display:flex;gap:8px;align-items:center}.top-actions button{background:#214749;border-color:#516561;color:#f3e9cb;min-height:36px;font-size:13px}.roundbar{display:flex;gap:18px;align-items:center;padding:10px 24px;min-height:58px;border-bottom:1px solid #c4c4aa;background:#ede8d6}.round-buttons{display:flex;gap:7px}.round-buttons button{font-size:14px;min-height:35px;padding:7px 16px}.round-buttons [aria-pressed=true]{background:var(--green);color:#fff4d5;border-color:var(--green)}#stage-name{font-size:13px;color:#536965}.next-person{margin-left:auto;font-size:13px;color:#627170}.workspace{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:14px;padding:14px 18px 0;min-height:540px;height:calc(100vh - 169px)}.scene-panel{position:relative;min-width:0;min-height:470px;overflow:hidden;border-radius:19px;background:#597d7a;box-shadow:0 2px 3px #2e3f3826;border:1px solid #8eaa96}#scene{position:absolute;inset:0}#scene canvas{display:block;width:100%;height:100%}#scene-labels{position:absolute;inset:0;pointer-events:none}.scene-top{position:absolute;left:21px;right:21px;top:17px;display:flex;justify-content:space-between;gap:10px;pointer-events:none}.scene-tag{align-self:start;background:#163f42da;color:#e6dec4;border:1px solid #cbb97d77;padding:7px 10px;border-radius:5px;font-size:12px;letter-spacing:1.1px}.objective{display:flex;gap:6px;flex-direction:column;text-align:right;background:#fbf3dce8;border:1px solid #a9996b;padding:10px 15px;border-radius:2px 12px 2px 12px;box-shadow:0 4px 0 #203c3733}.objective span{font-size:12px}.objective strong{font-size:21px;color:#35665a}.scene-bottom{position:absolute;left:19px;right:19px;bottom:13px;display:flex;flex-direction:column;gap:5px;pointer-events:none}.scene-bottom>span{align-self:flex-start;border-radius:5px;padding:5px 10px;color:#f8edcf;background:#193e40e8;font-size:14px;font-weight:700}.scene-bottom small{max-width:620px;font-size:10px;color:#f5efdc;text-shadow:0 1px 3px #173332;background:#234945ba;padding:4px 7px;align-self:flex-start;border-radius:3px}.peg-label{position:absolute;transform:translate(-50%,-50%);display:flex;align-items:center;gap:5px;color:#fff5d5;background:#183f41;border:1px solid #bcab6d;border-radius:5px;font-size:15px;padding:5px 12px;white-space:nowrap;box-shadow:0 2px 0 #0b252657}.peg-label.target{background:#f2dd9a;color:#224841;border-color:#7c7039}.peg-label.selected{outline:3px solid #fff3b4;outline-offset:3px}.peg-label small{font-size:10px}.disk-number{position:absolute;transform:translate(-50%,-50%);height:23px;min-width:23px;text-align:center;padding:1px 5px;border:1px solid #283d37aa;border-radius:50%;background:#fff5d4;color:#26443d;font-weight:900;font-size:14px;line-height:20px;box-shadow:0 1px 1px #233e3866}#peg-controls{position:absolute;inset:0;pointer-events:none}#peg-controls button{position:absolute;transform:translate(-50%,-100%);border:0;border-radius:25px 25px 9px 9px;background:transparent;pointer-events:auto;z-index:1;padding:0;min-height:90px;color:transparent}#peg-controls button:hover:not(:disabled){background:#fff4bb0b;box-shadow:inset 0 0 0 1px #fff3b54a}#peg-controls button:focus-visible{background:#fff4bb12;outline:3px solid #ffe5a0;outline-offset:-4px}.controls{overflow:auto;scrollbar-width:thin;background:#f8f2e1;border:1px solid #ccc3a7;border-radius:17px;padding:18px;box-shadow:0 2px 3px #2e3f381a}.eyebrow{margin:0 0 5px;font-size:11px;letter-spacing:2px;color:#947235}.task-title h2,#demo-controls h2{font-size:24px;line-height:1.3;margin:0 0 10px;font-weight:800}.task-title>p:last-child{margin:0 0 13px;line-height:1.6;font-size:14px}.rules{border-block:1px solid #d3c9ac;padding:11px 0;display:grid;gap:9px;font-size:13px}.rules b{display:inline-grid;place-items:center;width:21px;height:21px;border-radius:50%;background:#d9e3cb;font-size:11px;margin-right:5px}.settings{display:grid;grid-template-columns:1fr 1fr;gap:9px;padding:13px 0 10px}label{font-size:11px;color:#61706a;display:flex;flex-direction:column;gap:5px}select{max-width:100%;border:1px solid #b7c1ac;border-radius:7px;padding:8px 6px;background:#fffbed;font-size:12px;font-weight:700}.turn-stat{display:flex;justify-content:space-between;align-items:center;font-size:12px;margin:2px 0 12px}.turn-stat strong{font-size:24px;margin:0 2px}.turn-stat>span:last-child{font-size:11px;color:#637267}.feedback{padding:13px 14px;background:#e5ecdc;border:1px solid #b9ccb4;border-left:4px solid #487d68;border-radius:9px;min-height:90px}.feedback strong{font-size:16px}.feedback p{font-size:12px;line-height:1.6;margin:6px 0 0}.feedback[data-tone=error]{background:#f5e6d1;border-color:#d5b084;border-left-color:#b47743}.feedback[data-tone=success]{background:#f4e6b7;border-color:#c3aa60;border-left-color:#937b35}.recovery{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:12px 0}.recovery button{font-size:12px;padding:8px 5px}.input-hint{font-size:10px;line-height:1.6;color:#6c776b;margin:6px 0}.hint-button{font-size:11px;border:0;background:none;text-decoration:underline;text-underline-offset:3px;padding:1px;min-height:26px;color:#687962}.page-footer{padding:8px 24px;display:flex;justify-content:space-between;font-size:10px;color:#6b786a;height:35px}.demo-settings{display:grid;grid-template-columns:1.4fr 1fr 1fr;gap:8px;margin:14px 0}.tree-hint{font-size:12px;line-height:1.5;color:#61756a}.tree-node{margin:5px 0}.tree-row{display:flex;align-items:center;gap:5px;padding:8px 7px;background:#e7ebdd;border:1px solid #c5cfb9;border-radius:7px;font-size:12px;min-height:39px}.tree-row button{font-size:12px;min-height:24px;padding:0;width:22px;border:0;border-radius:4px;background:transparent;flex-shrink:0}.tree-row .task-name{flex:1}.tree-row .task-state{font-size:9px;color:#6e7e6b;white-space:nowrap}.tree-row.active{background:#f6e3a6;border:2px solid #a3863c;padding:7px 6px}.tree-row.done{background:#e1eada;border-color:#bdcbb0}.tree-row.done .task-state{color:#357157}.tree-children{margin-left:12px;padding-left:8px;border-left:1px solid #c1c8ad}.leaf-dot{width:22px;flex-shrink:0;text-align:center;color:#638574}.demo-status{padding:12px;margin-top:12px;border-radius:8px;background:#ede5cb;font-size:12px;line-height:1.6;min-height:60px}.demo-actions{display:grid;grid-template-columns:1fr 1.4fr;gap:8px;margin-top:12px}.demo-actions button{font-size:12px}.demo-actions button:last-child{grid-column:1/-1}body.demo .roundbar{min-height:45px}body.demo .round-buttons{display:none}body.demo .next-person{display:none}body.demo .workspace{height:calc(100vh - 156px);grid-template-columns:minmax(0,1fr) 355px}body.demo #peg-controls{display:none}body.demo .student-controls{display:none}dialog{border:1px solid #bdb996;border-radius:18px;background:#faf4e1;padding:27px;max-width:470px;color:var(--ink);box-shadow:0 15px 80px #092d3960}dialog::backdrop{background:#142e32a0}dialog h2{font-size:24px;margin:0 0 14px}dialog p{font-size:15px;line-height:1.8}dialog>div:last-child{display:flex;gap:10px;justify-content:flex-end}.hint-picture{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);gap:12px;align-items:center;padding:12px 0}.hint-picture span{min-width:0;text-align:center;font-weight:700;background:#dae5ca;border:1px solid #a5ba9c;padding:14px 8px;border-radius:9px}.hint-picture small{display:block;font-size:12px;font-weight:400;margin-bottom:6px;color:#536b52}.hint-picture b{font-size:22px}#hint-dialog{width:min(470px,calc(100vw - 28px));max-height:calc(100dvh - 28px);overflow:auto}#render-warning{position:absolute;bottom:65px;left:20px;right:20px;background:#fff0c1;color:#60451a;padding:8px;border-radius:6px;font-size:12px}#fallback{position:absolute;inset:90px 15px 90px;display:flex;align-items:flex-end;justify-content:space-around;background:#dde6cb;border:4px solid #527268;border-bottom:18px solid #765f3c;border-radius:14px}.fallback-peg{position:relative;width:31%;height:90%;display:flex;justify-content:flex-end;align-items:center;flex-direction:column;padding-bottom:20px}.fallback-peg:before{content:'';position:absolute;width:10px;top:10%;bottom:0;background:#aa8d55;border:2px solid #4e5944;border-radius:8px}.fallback-disk{height:34px;position:relative;z-index:1;display:grid;place-items:center;border:2px solid #345349;border-radius:10px;background:#e6bb66;flex-shrink:0;font-size:15px;font-weight:800}.fallback-disk:nth-child(even){background:#86b8a6}body.fallback #scene-labels .disk-number{display:none}body.fallback #peg-controls button{left:var(--fallback-x)!important;top:78%!important;width:29%!important;height:62%!important}body.fallback #scene-labels .peg-label{left:var(--fallback-x)!important;top:82%!important}
@media(min-height:850px){.controls{padding:23px}.rules{padding:15px 0}.task-title>p:last-child{font-size:15px}.feedback{padding:17px 15px;min-height:105px}.feedback p{font-size:13px}.recovery button{font-size:13px;min-height:43px}.settings{padding-block:18px}body.demo .tree-row{font-size:14px}}
@media(max-width:1050px){.workspace{grid-template-columns:minmax(0,1fr) 265px;gap:10px;padding-inline:10px}.controls{padding:14px}.topbar{padding-inline:18px}.next-person{display:none}body.demo .workspace{grid-template-columns:minmax(0,1fr) 305px}.scene-top{left:14px;right:14px}.scene-tag{font-size:10px}.objective{padding:8px 10px}.objective strong{font-size:18px}.peg-label{padding:4px 10px;font-size:13px}}
@media(max-width:760px){body{font-size:14px}.topbar{height:auto;min-height:72px;flex-wrap:wrap;padding:10px 13px}.brand h1{font-size:22px}.seal{width:37px;height:37px}.top-actions{gap:5px;flex-wrap:wrap}.top-actions button{font-size:11px;padding:6px 8px;min-height:31px}.roundbar{padding:8px 12px;gap:8px;flex-wrap:wrap}.round-buttons button{padding:6px 10px;font-size:12px}.workspace,body.demo .workspace{display:flex;flex-direction:column;height:auto;padding:10px;gap:10px}.scene-panel{min-height:470px;height:65vh;max-height:670px;flex:none}.controls{overflow:visible}.student-controls{display:grid;grid-template-columns:1fr 1fr;column-gap:15px}.task-title,.rules,.feedback,.input-hint,.hint-button{grid-column:1/-1}.settings{grid-column:1/-1}.recovery{grid-column:1/-1}.turn-stat{grid-column:1/-1}.task-title h2{font-size:22px}.task-title>p:last-child{margin-bottom:9px}.rules{grid-template-columns:1fr 1fr}.page-footer{height:auto;font-size:9px;padding:6px 12px}.scene-tag{max-width:100px;font-size:9px;line-height:1.6}.scene-bottom small{font-size:9px}.objective strong{font-size:17px}.scene-bottom>span{font-size:12px}.peg-label{padding:4px 8px}body.demo .controls{max-height:none}.tree-row{font-size:13px}}
@media(prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important}}
#scene-labels{z-index:2}#peg-controls{z-index:3}.scene-top,.scene-bottom,#render-warning{z-index:4}#fallback{pointer-events:none}
body.fallback #render-warning{top:77px;bottom:auto}
button.primary:hover:not(:disabled){background:#33796f;color:#fff7dc;border-color:#33796f}.top-actions button:hover:not(:disabled){background:#386465;color:#fff4d6;border-color:#8caa98}
.disk-number{--badge:clamp(17px,2.5vh,23px);height:var(--badge);min-width:var(--badge);padding:0 3px;font-size:clamp(12px,1.8vh,16px);line-height:calc(var(--badge) - 2px)}
body.demo .controls{overflow:hidden}#demo-controls{height:100%;display:flex;flex-direction:column}#demo-controls>.eyebrow,#demo-controls>h2,.demo-settings,.tree-hint,.demo-status,.demo-actions{flex-shrink:0}#task-tree{min-height:92px;overflow:auto;flex:1;scrollbar-width:thin}.demo-settings{margin:8px 0}.tree-hint{margin:6px 0 9px}.demo-status{margin-top:8px;padding:10px;min-height:52px}.demo-actions{margin-top:8px}.tree-row{min-height:33px;padding-block:5px}.tree-row.active{padding-block:4px}
@media(max-width:760px){body.demo .controls{overflow:visible}#demo-controls{height:auto}#task-tree{min-height:220px;max-height:420px}.disk-number{height:13px;min-width:13px;font-size:9px;line-height:11px;padding:0 2px}.peg-label{font-size:12px}}
@media(min-width:761px) and (max-height:690px){.topbar{height:61px;padding-block:7px}.brand h1{font-size:21px}.brand p{font-size:10px}.seal{width:36px;height:36px;font-size:23px}.roundbar{min-height:43px;padding-block:5px}.round-buttons button{min-height:31px;padding-block:5px}.workspace{height:calc(100vh - 131px);min-height:380px;padding-top:9px}.scene-panel{min-height:360px}.page-footer{height:27px;padding-block:6px}body.demo .roundbar{min-height:32px}body.demo .workspace{height:calc(100vh - 120px)}.controls{padding:13px}.scene-bottom small{font-size:9px}.scene-bottom>span{font-size:12px}.task-title h2,#demo-controls h2{font-size:21px}}

/* Lesson07 immersive scene; original real-state rules retained. */
html[data-look=deep]{--ink:#332e28;--paper:#eee8d8;--green:#644638;--gold:#a68145;--line:#c9bd9f;--muted:#6d6b60}
html[data-look=deep] body{background:#d9d5c8}
html[data-look=deep] .topbar{background:#302823}
html[data-look=deep] .top-actions button{background:#443831;border-color:#756657}
html[data-look=deep] .top-actions button:hover{background:#685343}
html[data-look=deep] .roundbar{background:#e5dfcf;border-color:#b7ad97}
html[data-look=deep] .scene-panel{border-color:#6b685d}
html[data-look=deep] .controls{background:#eee8d9;border-color:#c0b49a}
html[data-look=deep] .scene-tag,html[data-look=deep] .scene-bottom>span{background:#302720e8}
html[data-look=deep] .scene-bottom small{background:#332c24ba}
html[data-look=deep] .peg-label{background:#3d3027;border-color:#b89b62}
html[data-look=deep] .peg-label.target{background:#edcf86;color:#3a3020}
html[data-look=deep] .objective strong{color:#704b2f}
html[data-look=deep] .feedback{background:#e1e4d7;border-color:#b3bda9;border-left-color:#697b59}
.lighting-control{display:flex;gap:8px;align-items:center;padding:2px 9px;border:1px solid #bfb398;border-radius:9px;background:#f4eedf;flex-shrink:0}
.lighting-control label{font-size:11px;white-space:nowrap;color:#635443}
.lighting-control select{padding:5px 7px;font-size:12px;min-height:30px;border-color:#b8a88b;color:#46382c;background:#fff8e8;max-width:123px}
.lighting-control output{font-size:11px;color:#705337;min-width:24px;white-space:nowrap}
html[data-look=current] .lighting-control output{max-width:78px;white-space:normal;font-size:10px}
@media(max-width:1050px){.roundbar{gap:10px}.lighting-control{gap:6px;padding-inline:7px}}
@media(max-width:760px){.lighting-control{margin-left:0}.lighting-control select{max-width:130px}}
body.demo .roundbar{padding-block:4px}
@media(min-width:761px) and (max-height:690px){.lighting-control{padding-block:0}.lighting-control select{min-height:27px;padding-block:3px}body.demo .roundbar{padding-block:3px}body.demo .lighting-control select{min-height:22px;padding-block:2px}}

/* The discoverable bird is outside all three tower hit areas. Its response is
   driven by the same controlled scene clock; these elements never animate. */
#bird-secret{position:absolute;z-index:5;transform:translate(-50%,-50%);width:44px;height:44px;padding:0;min-height:44px;border:1px solid transparent;border-radius:50%;background:transparent}
#bird-secret span{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
#bird-secret:hover{background:#fff2ba12;border-color:#e8cd8a88}
#bird-secret:focus-visible{outline:3px solid #f9db84;outline-offset:1px;background:#fff2ba1a}
#bird-greeting{position:absolute;z-index:6;transform:translateX(-50%);width:186px;padding:10px 12px;border:1px solid #a68750;border-radius:12px 12px 3px 12px;background:#fff6dfeF;box-shadow:0 3px 12px #20180924;text-align:center;pointer-events:none;color:#4b3725}
#bird-greeting strong{font-size:17px;display:block}#bird-greeting span{font-size:11px;display:block;margin-top:3px}
body.fallback #bird-secret{top:116px;right:22px;left:auto;transform:none;background:#f5dfab;border-color:#ac8c50;width:76px;border-radius:10px}
body.fallback #bird-secret span{position:static;clip-path:none;width:auto;height:auto;font-size:12px}body.fallback #bird-secret:before{content:'🐦';display:block;font-size:25px}
body.fallback #bird-greeting{top:114px;right:108px;left:auto;transform:none}
@media(min-width:761px){.rules{font-size:14px}.settings label{font-size:12px}.settings select{font-size:13px}.turn-stat{font-size:13px}.feedback p{font-size:13px}.recovery button{font-size:13px}.input-hint,.hint-button{font-size:11px}.tree-hint{font-size:13px}.tree-row{font-size:13px}.demo-status{font-size:13px}}
@media(min-width:761px) and (max-height:780px){.controls{padding:15px}.task-title h2{font-size:23px;margin-bottom:6px}.task-title>p:last-child{margin-bottom:8px;line-height:1.5}.rules{padding:9px 0;gap:6px}.settings{padding:9px 0}.turn-stat{margin-bottom:8px}.feedback{padding:10px 11px;min-height:79px}.feedback p{margin-top:4px}.recovery{margin:9px 0;gap:6px}.recovery button{min-height:36px;padding:7px 4px}.input-hint{margin:4px 0}.hint-button{min-height:24px}}
@media(min-width:761px) and (min-height:691px) and (max-height:780px){.controls{padding:13px}.input-hint{font-size:10px;white-space:nowrap}.feedback{min-height:75px}}
@media(min-width:761px) and (max-height:690px){.student-controls .task-title>p:last-child,.student-controls .input-hint{display:none}.student-controls .settings{padding:7px 0}.student-controls .feedback{min-height:70px}.student-controls .recovery{margin:7px 0}.student-controls .eyebrow{margin-bottom:2px}}
body.fallback #peg-controls button{top:87%!important;height:71%!important}
@media(min-width:761px){#app{height:100vh;display:grid;grid-template-rows:auto auto minmax(0,1fr) auto}.workspace,body.demo .workspace{height:auto;min-height:0}.scene-panel{min-height:0}}

/* Real completion is a durable modal result; ordinary rule errors stay inline. */
#result-dialog{width:min(510px,calc(100vw - 32px));max-width:510px;max-height:calc(100vh - 32px);overflow:auto;text-align:center;padding:28px}
#result-dialog h2{font-size:28px}#result-dialog p{margin:12px 0;font-size:16px;line-height:1.65}
#result-dialog .result-mark{margin:0 auto 16px;width:56px;height:56px;border-radius:50%;background:#2e6652;color:#fff5d7;display:grid;place-items:center;font-size:36px;font-weight:800}
#result-dialog .result-keep{font-size:13px;color:#6d6557;border-top:1px solid #d7cdb2;padding-top:13px}
#result-close{width:100%;margin-top:10px;min-height:45px}
#handoff{grid-column:1/-1}#result-review{grid-column:1/-1}.demo-actions #demo-reset,.demo-actions #demo-result-review{grid-column:1/-1}
.demo-question{font-size:14px;line-height:1.55;margin:6px 0 8px;padding:9px 11px;border-left:3px solid #a4864f;background:#eee5cd;flex-shrink:0}
@media(min-width:761px) and (max-height:780px){.student-controls .task-title>p:last-child{font-size:13px}.student-controls .recovery{gap:5px}.student-controls .recovery button{min-height:32px;padding:5px 4px}.student-controls #handoff{grid-column:auto}.student-controls #result-review{grid-column:auto}.demo-question{font-size:12px;padding:7px 9px;margin:4px 0}.demo-status{font-size:12px}.demo-actions button{min-height:32px;padding:6px}.tree-hint{font-size:11px}}
@media(min-width:761px) and (max-height:780px){.student-controls .input-hint{display:none}}
@media(min-width:761px) and (max-height:690px){.controls{padding:10px}.student-controls .task-title h2{font-size:21px}.student-controls .rules{padding-block:6px}.student-controls .settings select{padding-block:6px}.student-controls .feedback{min-height:64px}.demo-question{font-size:12px;padding-block:5px}.demo-status{min-height:44px;padding:7px}.demo-actions{gap:5px}#task-tree{min-height:65px}}

/* Shared levels reuse the same board; grade only selects the entry board. */
#challenge-dialog{width:min(560px,calc(100vw - 28px));max-width:560px;max-height:calc(100dvh - 28px);overflow:auto;padding:24px}
#challenge-dialog h2{font-size:25px}#challenge-dialog p{font-size:14px;line-height:1.65;margin:10px 0}
#challenge-list{display:grid;gap:12px;margin:17px 0}#challenge-list button{display:flex;flex-direction:column;text-align:left;gap:7px;padding:17px;background:#f5edda;border-color:#b2a17c;min-height:90px}
#challenge-list button strong{font-size:19px}#challenge-list button span{font-size:13px;font-weight:400;line-height:1.7}#challenge-list button[aria-pressed=true]{border:2px solid #70523d;background:#eadbbd}
#challenge-dialog .challenge-help{font-size:12px;color:#6d6557}#challenge-close{width:100%;margin-top:8px}
#challenge-dialog{width:min(820px,calc(100vw - 28px));max-width:820px}
#challenge-list{gap:18px}.level-group h3{font-size:18px;margin:0;color:#65472e}
#challenge-dialog .level-group>p{margin:4px 0 9px;font-size:12px;color:#746447}
.level-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}
#challenge-list .level-grid button{padding:13px;gap:5px;min-height:130px}
#challenge-list button strong{font-size:17px}#challenge-list button small{font-size:11px;color:#75623f;font-weight:500}
#extra-condition{margin:9px 0 0;padding:8px 9px;border:1px solid #b9894e;background:#f7e2b8;border-radius:4px;font-size:13px;line-height:1.5;font-weight:700;color:#694428}
#extra-condition[data-done=true]{border-color:#718460;background:#e3e6c6;color:#3d583d}
@media(max-width:520px){.level-grid{grid-template-columns:1fr}#challenge-list .level-grid button{min-height:0}}
#challenge-note{margin:9px 0 12px;padding:10px 12px;border-radius:9px;background:#e4dcc9;border:1px solid #c4b48e}
#challenge-record{font-size:12px;line-height:1.5;margin:0 0 7px;color:#66533b}#challenge-think summary{cursor:pointer;font-size:13px;font-weight:700}#challenge-think p{font-size:13px;line-height:1.6;margin:8px 0 0}
#undo-stat{display:block;font-size:11px;font-weight:400;color:#786d5c;margin-top:2px}
#result-comparison{background:#e6eadb;border-radius:9px;padding:12px}#result-retry{width:100%;min-height:42px;margin-top:9px;background:#e9dfc3;border-color:#a38d5d}
body.challenge .task-title h2{font-size:22px}body.challenge .turn-stat{margin-top:9px}
@media(min-width:761px) and (max-width:1240px){.next-person{display:none}.roundbar{gap:10px}.round-buttons button{padding-inline:10px}}
@media(max-width:760px){#challenge-note{grid-column:1/-1}.round-buttons{flex-wrap:wrap}.roundbar #stage-name{font-size:12px}.challenge .task-title>p:last-child{display:block}}
@media(min-width:761px) and (max-height:690px){body.challenge .task-title>p:last-child{display:block;font-size:12px}#challenge-note{padding:7px 9px;margin:7px 0}#challenge-record{margin-bottom:5px}.challenge .task-title h2{font-size:19px}}

/* Controlled story inset shares the playable 3D table without student controls. */
#story-feedback{display:none}
body.story #app{display:block;height:100vh;overflow:hidden}
body.story .topbar,body.story .roundbar,body.story .controls,body.story .page-footer,body.story .scene-bottom,body.story #peg-controls,body.story #bird-secret,body.story #bird-greeting{display:none!important}
body.story .workspace{display:block;height:100vh;min-height:0;padding:0}
body.story .scene-panel{height:100%;min-height:0;max-height:none;border:0;border-radius:0}
body.story .scene-top{top:12px;left:14px;right:14px}
body.story .scene-tag{font-size:12px;max-width:none}
body.story .objective{padding:7px 11px;gap:2px}
body.story .objective strong{font-size:20px}
body.story #story-feedback{display:flex;position:absolute;z-index:6;bottom:10px;left:12px;right:12px;gap:14px;align-items:center;padding:9px 12px;border:1px solid #bba375;border-radius:8px;background:#fbf1daf2;color:#433528;box-shadow:0 3px 10px #21150f28;pointer-events:none}
.story-feedback-copy{display:flex;flex-direction:column;gap:3px;flex:1;min-width:0}
.story-feedback-copy strong{font-size:17px;line-height:1.3}
.story-feedback-copy span{font-size:14px;line-height:1.35}
.story-step-count{font-size:13px;white-space:nowrap;border-left:1px solid #cdb98f;padding-left:13px}
.story-step-count b{font-size:24px}
body.story #story-feedback[data-tone=error]{background:#fff0ddf5;border-color:#b8844e}
body.story .disk-number{height:20px;min-width:20px;font-size:13px;line-height:18px}
body.story .peg-label{font-size:14px;padding:4px 10px}
body.story #render-warning{bottom:88px}
@media(max-width:600px){body.story .scene-tag{font-size:10px}.story-feedback-copy strong{font-size:15px}.story-feedback-copy span{font-size:12px}.story-step-count{font-size:11px;padding-left:8px}.story-step-count b{font-size:20px}}
