*{box-sizing:border-box}html,body{margin:0;min-height:100%;font-family:ui-rounded,"PingFang TC",sans-serif;color:#29443f}button,select{font:inherit;touch-action:manipulation}button{cursor:pointer;border:0}.student{background:#162e2d;overflow:hidden;height:100vh;display:grid;place-items:center}.student #stage{position:relative;width:min(100vw,160vh);height:min(100vh,62.5vw);overflow:hidden;background:#dce6dd}.student #stage>div{position:absolute;inset:0}#environment svg{width:100%;height:100%}#actors .actor{position:absolute;width:15.5%;height:25%;will-change:transform,opacity;transform-origin:50% 80%}.actor svg{width:100%;height:100%;filter:drop-shadow(0 15px 9px #29443f15)}.actor.focus svg{filter:drop-shadow(0 0 2px white) drop-shadow(0 0 12px #fff4bf)}.actor.focus:after{content:"";position:absolute;left:5%;right:5%;bottom:0;height:9%;border:4px solid #fff3ca;border-radius:50%}#numerals{pointer-events:none;display:flex;justify-content:center;align-items:flex-end;padding-bottom:3%;gap:1.2%}#numerals span{font-size:clamp(28px,6vw,90px);font-weight:800;line-height:1;color:#35504a;background:#fff9e9;min-width:7%;text-align:center;border-radius:22%;padding:.7% .8%;box-shadow:0 8px 0 #0000000b}#paper-preview{pointer-events:none}#paper-preview .card{position:absolute;width:14%;height:28%;bottom:13%;left:43%;background:#fffdf7;box-shadow:0 8px 25px #1c30332a;transform:rotate(-5deg);padding:1%}#paper-preview .card svg{width:100%;height:100%}#transition{pointer-events:none;z-index:6}#response{pointer-events:none;z-index:5}.response-ring{position:absolute;inset:18% 30%;border:10px solid #fff5cf;border-radius:50%;animation:response 1s ease-out forwards}@keyframes response{from{transform:scale(.4);opacity:.8}to{transform:scale(1.5);opacity:0}}#unlock{position:absolute;width:140px;height:140px;border-radius:50%;background:#fffcf0;box-shadow:0 10px 60px #153a3944;z-index:20}#unlock svg{width:65%;fill:#507c70}.teacher{max-width:850px;margin:auto;background:#f4f0e6;padding:22px 18px 60px}header{display:flex;justify-content:space-between;align-items:center;gap:12px}h1{font-size:27px;margin:6px 0 20px}.eyebrow{font-size:13px;letter-spacing:2px;color:#73877a}#clock{font-variant-numeric:tabular-nums;font-size:14px;white-space:nowrap}.transport{display:flex;gap:9px}.transport button,.mode button,details button,dialog button{border-radius:14px;background:#e1e5d9;padding:14px 18px;min-height:48px}.transport #play{background:#386d60;color:white;flex:1;font-weight:700}.transport #print-preview-btn{background:#ead5ad}#teacher-cue{font-size:14px;line-height:1.6;color:#5b7066;min-height:44px}.mode{display:flex;gap:10px;align-items:center;flex-wrap:wrap;font-size:13px;margin:20px 0}.mode select{padding:10px;border:0;border-radius:9px;background:white}.mode button{font-size:13px;padding:9px 12px;min-height:40px}#hand-over.locked{background:#ba7b52;color:white}#student-buttons{display:grid;grid-template-columns:repeat(2,1fr);gap:18px}.student-button{min-height:180px;background:#fffcf3;border-radius:28px;box-shadow:0 5px 0 #d7decd;display:flex;align-items:center;justify-content:center;position:relative;border:3px solid transparent;overflow:hidden}.student-button:active{transform:translateY(4px);box-shadow:0 1px 0 #d7decd}.student-button.name{grid-column:1/-1;min-height:230px;background:#e4ecdf}.student-button svg{width:75%;height:170px}.student-button .number{font-size:90px;font-weight:800}.student-button .replay{font-size:70px;color:#577c6b}.student-button .speaker{position:absolute;right:15px;bottom:12px;font-size:20px;opacity:.5}.student-button.pressed{border-color:#6c9b83}details{margin-top:28px;border-top:1px solid #d2dbca;padding-top:22px}details label,details select{display:block;margin:15px 0}details select{max-width:100%;padding:12px;font-size:15px}details p{font-size:13px;line-height:1.7;color:#6e7f71}dialog{width:min(92vw,520px);border:0;border-radius:24px;background:#f7f4ec;padding:25px}dialog::backdrop{background:#163c3566}#print-card{background:#fff;aspect-ratio:576/660;width:100%;padding:2%}#print-card svg{width:100%;height:100%}dialog p{font-size:13px;color:#6d7a6b}#close-print{float:right}@media(max-width:440px){.teacher{padding:16px 14px}.transport button{padding:12px}h1{font-size:22px}#student-buttons{gap:14px}.student-button{min-height:160px}.student-button.name{min-height:220px}.student-button svg{height:155px}}
#unlock{left:50%;top:50%;transform:translate(-50%,-50%)}
.teacher.handed header,.teacher.handed .transport,.teacher.handed #teacher-cue,.teacher.handed details,.teacher.handed .mode label,.teacher.handed #hand-over,.teacher.handed #participation-status{display:none}.teacher.handed .mode{justify-content:flex-end;margin:0 0 14px}.teacher.handed #finish{background:transparent;color:#7e8b80;font-size:12px;min-height:32px}.teacher.handed #student-buttons .name{min-height:48vh}.teacher.handed #student-buttons svg{height:32vh}.teacher.handed #student-buttons .number{font-size:100px}
#student-progress{display:flex;gap:12px;justify-content:center;margin:12px 0}#student-progress i{width:20px;height:20px;border-radius:50%;background:#d8dfd1;transition:background .12s}#student-progress i.filled{background:#4b8069;box-shadow:0 0 0 4px #e5eddf}

.response-object{position:absolute;top:25%;width:21%;aspect-ratio:1;transform:translateX(-50%);border-radius:30%;background:#fffdf0e8;box-shadow:0 12px 45px #183a3330;display:grid;place-items:center;animation:response-object 1.8s ease-out forwards}.response-object svg{width:95%;height:95%}.response-object span{font-size:clamp(50px,12vw,170px);font-weight:800}@keyframes response-object{0%{opacity:0;scale:.7}10%,75%{opacity:1;scale:1}100%{opacity:0;scale:1.07}}

button#print-card{display:block;width:min(75vw,440px);margin:15px auto;padding:0;background:white;border:3px solid #a9c1b5;border-radius:20px;overflow:hidden;touch-action:manipulation}#print-card img{width:100%;max-height:60vh;object-fit:contain;display:block}#print-card.pressed{transform:scale(.96)}#print-dialog.student-print{width:100vw;max-width:100vw;height:100dvh;max-height:100dvh;margin:0;border:0;border-radius:0;display:flex;flex-direction:column;align-items:center;justify-content:center;background:#e5eddf}#print-dialog.student-print h2,#print-dialog.student-print .print-instruction,#print-dialog.student-print #print-handoff,#print-dialog.student-print #download-svg{display:none}#print-dialog.student-print #close-print{position:absolute;bottom:12px;right:12px;font-size:0;padding:10px 18px}#print-dialog.student-print #close-print:after{content:'⌂';font-size:20px}#print-dialog.student-print #print-result{font-size:42px;margin:0}

/* Teacher remote presents one current object and four everyday actions. */
.simple-remote{max-width:520px;padding:22px 22px 40px}.simple-remote header{margin-top:18px}.simple-remote h1{font-size:24px;margin-bottom:8px}.screen-link{display:none;color:#486e61;font-size:14px;text-decoration:none}.simple-remote #current-picture{height:min(25vh,200px);display:grid;place-items:center;margin:18px 0 0}.simple-remote #current-picture svg{height:100%;max-width:100%}.simple-remote #teacher-cue{min-height:0;text-align:center;margin:10px 0 22px}.simple-remote .transport{display:grid;grid-template-columns:1fr 1fr;gap:12px}.simple-remote .transport button,.participate button{min-height:66px;font-size:18px;font-weight:650;border-radius:18px}.participate{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:12px}.participate #hand-over{background:#e0e9da;color:#315d4e}.participate #print-preview-btn{background:#ead4aa;color:#58482d}.simple-remote:not(.handed) #student-buttons,.simple-remote:not(.handed) #student-progress,.simple-remote:not(.handed) #participation-status,.simple-remote:not(.handed) #finish{display:none}.simple-remote details{margin-top:26px;padding-top:18px;color:#627869}.simple-remote details summary{cursor:pointer}.simple-remote.handed{height:100dvh;max-width:none;display:flex;flex-direction:column;padding:18px}.simple-remote.handed .screen-link,.simple-remote.handed .participate,.simple-remote.handed #current-picture{display:none}.simple-remote.handed #student-buttons{flex:1;align-content:stretch}.simple-remote.handed #finish{align-self:flex-end;background:transparent;color:#627869;font-size:24px;padding:10px 18px}.simple-remote.handed #student-progress{margin:8px 0 20px}.simple-remote.handed #student-buttons button{min-height:30vh}.simple-remote.handed #student-buttons .name{min-height:55vh}.simple-remote.handed #student-buttons svg{height:min(45vh,400px)}
#print-dialog:not([open]){display:none!important}#print-dialog.student-print .download-option{display:none}#print-dialog h2{font-size:22px}#print-dialog #close-print{font-size:22px;background:transparent}#print-dialog #print-card{max-width:100%}
@media(min-width:768px){.screen-link{display:block}.simple-remote{padding-top:32px}}

#backup-toggle{position:fixed;right:16px;bottom:16px;width:40px;height:40px;border-radius:50%;background:#ffffff20;color:#ffffff88;font-size:24px;z-index:21}#backup{position:fixed;right:22px;bottom:70px;padding:16px;background:#f5f2e9f5;border-radius:20px;z-index:22;box-shadow:0 12px 40px #16302c33}#backup button{background:#dce6d9;border-radius:12px;padding:16px;font-size:17px;margin:4px}#backup[hidden]{display:none}

.response-voice{position:absolute;bottom:5%;width:5%;color:#345f50;background:#fffcf2df;border-radius:50%;padding:.4%;animation:voice-ack 1.2s ease-out forwards}.response-voice svg{display:block;width:100%}@keyframes voice-ack{0%{opacity:.5;transform:translateY(5px)}15%,75%{opacity:1;transform:translateY(0)}100%{opacity:0;transform:translateY(-3px)}}

/* Scene mechanics and paper demonstration share one unambiguous counting region. */
#environment{z-index:0}#props-back{z-index:1;pointer-events:none}#actors{z-index:2}#props-front{z-index:3;pointer-events:none}#props-back svg,#props-front svg{width:100%;height:100%}#numerals{z-index:4}#paper-preview{z-index:5}#response{z-index:7}
#paper-preview .card{height:39%;bottom:25%;transform:rotate(0);padding:1%;border:2px solid #d2d6c9;border-radius:2%;box-shadow:0 9px 23px #1c30331a}
#paper-preview .paper-empty{position:absolute;inset:25% 15%;border:3px dashed #7d9988;border-radius:5%;background:#fffdf730}

/* Keep the previous choices visible but inert until a teacher hands out the next scene. */
#turn-expired[hidden]{display:none!important}.simple-remote.handed #turn-expired{display:block;min-height:25vh;font-size:80px;background:#ead4aa;color:#315d4e;border:3px solid #b0bca6;border-radius:24px}.simple-remote.handed.turn-expired #student-buttons{flex:0;opacity:.3;pointer-events:none}.simple-remote.handed.turn-expired #student-buttons button{min-height:12vh;max-height:20vh}.simple-remote.handed.turn-expired #student-buttons svg{height:10vh}.simple-remote.handed.turn-expired #student-buttons .number{font-size:50px}
.simple-remote.handed{height:100dvh;min-height:0;overflow:hidden;padding:12px}.simple-remote.handed #finish{min-width:44px;min-height:44px;flex:none}.simple-remote.handed #student-progress{flex:none;margin:8px 0 14px}.simple-remote.handed #student-buttons,.simple-remote.handed.turn-expired #student-buttons{flex:1;min-height:0;grid-template-rows:minmax(44px,1.6fr) minmax(44px,1fr);gap:12px}.simple-remote.handed #student-buttons:has(>button:only-child){grid-template-rows:minmax(44px,1fr)}.simple-remote.handed #student-buttons button,.simple-remote.handed #student-buttons .name{min-height:44px;height:100%;max-height:none;min-width:44px;padding:4px}.simple-remote.handed #student-buttons svg{height:100%;max-height:100%;width:75%}.simple-remote.handed #turn-expired{flex:0 0 25%;min-height:44px;font-size:clamp(44px,10vh,80px);margin-bottom:12px}
.simple-remote button:disabled{opacity:.5;cursor:default}
