:root{font-family:"PingFang SC","Microsoft YaHei",system-ui,sans-serif;color:#1d3948;background:#eaf0f0;font-size:16px;--navy:#173747;--orange:#dc6d2b;--teal:#137f88}*{box-sizing:border-box}body{margin:0}button,input,textarea,select{font:inherit}button{cursor:pointer;min-height:42px;border:1px solid #cdd8dc;background:#fff;color:#243f4d;border-radius:9px;padding:9px 14px;font-weight:600}button:hover{border-color:#278692;background:#edf7f8}button:focus-visible,input:focus-visible,textarea:focus-visible{outline:3px solid #eeaa56;outline-offset:2px}button.primary,.active{background:var(--navy);color:#fff;border-color:var(--navy)}button.orange{background:var(--orange);color:#fff;border-color:var(--orange)}button.small{font-size:14px;padding:7px 10px;min-height:36px}button:disabled{opacity:.4;cursor:default}header{height:78px;background:var(--navy);color:white;display:flex;align-items:center;justify-content:space-between;padding:0 26px;gap:20px}header strong{font-size:26px;letter-spacing:2px}header .brand{display:flex;gap:16px;align-items:center}header .number{background:#ef8c48;border-radius:12px;padding:9px 12px;letter-spacing:-1px;font-size:24px}header small{font-size:14px;color:#bdced5}header button{background:transparent;color:#fff;border-color:#5b7582}nav.phases{display:flex;background:white;border-bottom:1px solid #d5dfe2;padding:12px 24px;gap:10px}nav.phases button{flex:1;text-align:left;border:0;border-radius:9px;padding:11px 18px}nav.phases span{opacity:.65;font-size:14px;margin-left:8px}main.teacher{height:calc(100dvh - 145px);display:grid;grid-template-columns:minmax(0,1fr) 340px;gap:0}.scene-column{position:relative;display:flex;flex-direction:column;min-height:0}.scene-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:18px 24px;background:#f5f8f8}.eyebrow{font-size:13px;letter-spacing:2px;font-weight:700;color:#778c94;margin-bottom:5px}h1,h2,h3,p{margin:0}h1{font-size:23px}h2{font-size:20px}h3{font-size:17px}.scene-heading p{margin-top:7px;font-size:14px;line-height:1.6;max-width:900px}.world-wrap{position:relative;flex:1;min-height:280px}#world{position:absolute;inset:0}#world canvas{display:block;touch-action:none}.canvas-hint{position:absolute;bottom:15px;left:20px;pointer-events:none;font-size:13px;background:#ffffffdd;padding:8px 14px;border-radius:20px}.view-tools{position:absolute;top:14px;left:18px;display:flex;gap:7px;flex-wrap:wrap;right:16px}.scene-bottom{display:flex;align-items:center;gap:7px;padding:12px 20px;background:#fff;overflow-x:auto}.scene-bottom .label{white-space:nowrap;font-size:14px;color:#6d818b}aside{padding:22px;overflow-y:auto;background:#fff;border-left:1px solid #d5dfe2}aside p{line-height:1.75;font-size:15px;color:#4c6470}aside h2{margin-bottom:14px}.card{background:#f3f7f7;border:1px solid #dce6e7;border-radius:12px;padding:16px;margin:14px 0}.card.orange{background:#fff4e6;border-color:#f1d2ac}.card.teal{background:#eaf5f1;border-color:#beded5}.list{display:grid;gap:9px;margin:15px 0}.list button{text-align:left}.muted{color:#6e838d;font-size:14px}.badge{display:inline-block;font-size:13px;font-weight:600;padding:5px 9px;background:#e1edf0;color:#2f5b6b;border-radius:6px}.row{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.spread{justify-content:space-between}.full{width:100%}hr{border:0;border-top:1px solid #dfE6e8;margin:18px 0}.toast{position:fixed;bottom:25px;left:50%;transform:translateX(-50%);background:#173747;color:#fff;padding:14px 22px;border-radius:11px;z-index:200;box-shadow:0 5px 30px #163b4930;max-width:90vw}.modal-overlay{position:fixed;inset:0;background:#0e293da6;display:grid;place-items:center;z-index:50;padding:20px}.modal{background:#fff;border-radius:20px;width:min(1050px,96vw);max-height:94dvh;overflow:auto;padding:26px;box-shadow:0 25px 80px #08263840}.modal.narrow{max-width:580px}.modal header{height:auto;background:white;color:var(--navy);padding:0 0 20px}.modal header button{color:var(--navy);border-color:#d1dcde}.modal p{line-height:1.7;margin:10px 0}input,textarea,select{border:1px solid #bbcdd3;background:#fff;padding:11px 12px;border-radius:8px;min-width:0;width:100%;color:#173747}label{font-size:14px;display:block;margin-bottom:6px}textarea{resize:vertical;min-height:90px}.form-field{margin:14px 0}.alarm-grid{display:grid;grid-template-columns:40% 1fr;gap:25px}.avatar{width:100%;aspect-ratio:4/3;object-fit:cover;border-radius:14px;background:#dbe5e8}.transcript{max-height:220px;min-height:160px;overflow:auto;display:grid;align-content:start;gap:10px;background:#f4f7f8;padding:14px;border-radius:12px;margin:15px 0}.bubble{padding:10px 13px;border-radius:10px;background:white;border:1px solid #dde7e9;line-height:1.6}.bubble.user{background:#e5f2ee;margin-left:32px}.bubble small{display:block;color:#6d8390;font-size:12px;margin-bottom:3px}.slots{display:grid;grid-template-columns:1fr 1fr;gap:8px}.slot{border:1px solid #d8e3e5;border-radius:9px;padding:10px;font-size:14px}.slot.filled{background:#e7f3ed;border-color:#bad8ca}.slot strong{display:block;margin-bottom:6px}.student{max-width:1300px;margin:auto;padding:22px}.student-grid{display:grid;grid-template-columns:minmax(0,1fr) 310px;gap:20px}.map-shell{position:relative;background:white;border:1px solid #d0dcdf;border-radius:13px;overflow:hidden}canvas.plan{display:block;width:100%;aspect-ratio:1.4;touch-action:none}.toolbar{display:flex;gap:7px;flex-wrap:wrap;padding:12px;background:white;border-top:1px solid #d5dfe2}.condition-banner{padding:17px 20px;border-left:5px solid #d87933;background:#fff8ed;border-radius:10px;margin:15px 0;line-height:1.7}.student-panel{background:white;padding:20px;border:1px solid #d0dcdf;border-radius:13px}.student-panel p{line-height:1.7;font-size:15px}.route-thumb{width:100%;border:1px solid #ddd;border-radius:8px}.action-card{padding:11px 13px;margin:9px 0;border-radius:9px;border:1px solid #ccdcda;background:#eef7f1;cursor:grab;line-height:1.6;font-size:14px}.dropzone{border:2px dashed #9db8bd;border-radius:12px;padding:20px;text-align:center;margin-top:14px;background:#f6faf9;line-height:1.7}.dropzone.over{border-color:#dd7c33;background:#fff4e4}.reveal-label{font-size:38px;letter-spacing:6px;font-weight:700;margin:8px 0;color:#1c6676}.phase-states{display:flex;gap:7px;flex-wrap:wrap;margin-bottom:14px}.join{max-width:520px;margin:65px auto;padding:30px;background:white;border-radius:18px;box-shadow:0 10px 45px #27465310}.empty{padding:25px 10px;text-align:center;color:#778d96;line-height:1.8}.hazard-title{margin:18px 0 10px;color:#b5532d}.progress-dots{display:flex;gap:6px;margin:15px 0}.progress-dots i{height:8px;background:#dce6e8;border-radius:5px;flex:1}.progress-dots i.done{background:#197e79}a{color:#157482}footer{font-size:13px;color:#71848d;line-height:1.7}.danger{color:#b74929}.checkrow{display:flex;gap:8px;align-items:flex-start;line-height:1.7;margin:12px 0}.checkrow input{width:18px;height:18px;margin-top:4px}.status-line{min-height:24px;margin:9px 0;font-size:14px}.connection-map{display:flex;gap:10px;align-items:center;padding:14px;background:#edf5f1;border-radius:10px;margin:12px 0}.pulse{display:inline-block;width:9px;height:9px;border-radius:50%;background:#e88945;animation:pulse 1s infinite}@keyframes pulse{50%{opacity:.35}}@media(max-width:1000px){main.teacher{grid-template-columns:minmax(0,1fr) 285px}aside{padding:16px}.scene-heading{padding:15px}.scene-heading h1{font-size:20px}.student-grid{grid-template-columns:1fr 270px}nav.phases{padding:10px}nav.phases button{padding:10px;font-size:14px}nav.phases span{display:none}}@media(max-width:720px){header{height:70px;padding:0 15px}header strong{font-size:20px}header small{display:none}header .number{font-size:20px}header .brand{gap:9px}nav.phases{flex-wrap:wrap;gap:4px}nav.phases button{flex:1 1 40%}main.teacher{height:auto;display:flex;flex-direction:column}.world-wrap{height:55dvh;min-height:380px;flex:none}.scene-column{height:auto}.scene-heading .row{display:none}.student{padding:13px}.student-grid,.alarm-grid{grid-template-columns:1fr}.modal{padding:18px}.alarm-grid .avatar{max-height:200px;object-position:center 35%}.student-panel{padding:16px}.view-tools{top:8px;left:8px;gap:4px}.view-tools button{font-size:12px;padding:7px}.scene-bottom{padding:10px}.join{margin:25px 15px}aside{border-left:0;border-top:1px solid #ccc}.slots{font-size:13px}}
.modal-overlay.hazard-overlay{background:#17374715;justify-items:end}.hazard-overlay .modal{max-width:370px;box-shadow:0 12px 50px #17374730}button.active:hover,button.primary:hover{color:white;background:#285568}button.orange:hover{color:white;background:#c75b20}@media(max-width:720px){.modal-overlay.hazard-overlay{align-items:end}.hazard-overlay .modal{max-width:100%;max-height:65dvh}}
/* Immersive revision: the residence fills the screen; teaching tools are a tray. */
body.immersive-mode{background:#171e20;overflow:hidden}.immersive-mode> #app>header{position:absolute;z-index:20;left:0;top:0;right:0;height:90px;background:linear-gradient(#0c182bd9,transparent);border:none;padding:0 34px;pointer-events:none}.immersive-mode> #app>header .brand{pointer-events:auto}.immersive-mode> #app>header>.row{display:none}.immersive-mode header strong{font-size:22px;letter-spacing:3px}.immersive-mode header .number{font-size:19px;background:#db793e}.immersive-mode nav.phases{position:absolute;z-index:25;top:96px;right:22px;width:345px;display:none;background:#f7f8f4ef;border-radius:14px;padding:10px;flex-wrap:wrap;backdrop-filter:blur(18px)}.immersive-mode nav.phases button{flex:1 1 40%;font-size:14px}.immersive-mode nav.phases span{display:none}.immersive-mode main.teacher{height:100dvh;display:block}.immersive-mode .scene-column{height:100dvh}.immersive-mode .scene-heading{position:absolute;z-index:18;left:35px;top:105px;padding:0;background:none;max-width:440px;color:#fff;text-shadow:0 2px 8px #0008;pointer-events:none}.immersive-mode .scene-heading .eyebrow{display:none}.immersive-mode .scene-heading h1{font-size:16px;font-weight:500;letter-spacing:1px}.immersive-mode .scene-heading p{display:none}.immersive-mode .scene-heading>.row{display:none}.immersive-mode .world-wrap{height:100dvh;min-height:100dvh}.immersive-mode .view-tools,.immersive-mode .scene-bottom,.immersive-mode .canvas-hint{display:none}.immersive-mode aside{position:absolute;z-index:24;right:22px;top:210px;bottom:25px;width:345px;border:1px solid #ffffff60;border-radius:16px;background:#f6f7f3f0;backdrop-filter:blur(20px);display:none;box-shadow:0 20px 60px #061c2a40}.immersive-mode.teaching-open aside,.immersive-mode.teaching-open nav.phases{display:block}.immersive-mode.teaching-open nav.phases{display:flex}.immersive-mode.teaching-open .view-tools{display:flex;top:auto;bottom:105px;left:30px;right:390px;z-index:22}.immersive-mode.teaching-open .scene-heading{display:none}.immersive-mode.teaching-open> #app>header>.row{display:flex;pointer-events:auto;margin-right:200px}.immersive-mode.teaching-open .scene-bottom{position:absolute;left:25px;bottom:168px;right:400px;display:flex;border-radius:14px;background:#f5f7f1df;z-index:24}.immersive-mode #immersiveHUD{position:absolute;inset:0;pointer-events:none;background:radial-gradient(ellipse at center,transparent 45%,#05101923 100%)}.scene-location{position:absolute;top:154px;left:35px;color:white;display:flex;gap:10px;align-items:center;font-size:14px;text-shadow:0 1px 7px #000b}.live-line{width:20px;height:2px;background:#dbab76}.location-sub{color:#ded9cc;padding-left:10px;border-left:1px solid #ffffff66;font-size:12px}.immersive-top-actions{position:absolute;top:25px;right:32px;display:flex;gap:8px;pointer-events:auto}.immersive-top-actions button,.immersive-bottom button{background:#14202977;color:#fff;border:1px solid #ffffff40;backdrop-filter:blur(12px);font-size:14px;font-weight:500}.immersive-top-actions button:hover,.immersive-bottom button:hover{background:#263d4dcc}.reticle{position:absolute;top:50%;left:50%;width:5px;height:5px;transform:translate(-50%,-50%);border-radius:50%;background:#fff9;box-shadow:0 0 0 1px #0003}.overview .reticle{display:none}#interactHint{position:absolute;top:55%;left:50%;transform:translateX(-50%);padding:10px 17px;color:white;background:#172328aa;border:1px solid #ffffff40;border-radius:8px;font-size:14px;opacity:0;transition:opacity .15s}#interactHint.shown{opacity:1}.walk-help{position:absolute;bottom:33px;left:35px;display:flex;gap:18px;color:#fff;font-size:13px;text-shadow:0 2px 5px #0009}.immersive-bottom{position:absolute;bottom:27px;right:32px;display:flex;gap:7px;pointer-events:auto}#touchMove{position:absolute;left:25px;bottom:75px;pointer-events:auto;text-align:center;display:none}#touchMove button{background:#13252a66;color:white;min-width:48px;min-height:48px;border:1px solid #fff5;margin:2px;touch-action:none}#loadingWorld{position:absolute;bottom:80px;left:35px;padding:10px 16px;border-radius:10px;color:white;background:#152b3c99;font-size:14px}.immersive-mode .hazard-overlay{background:transparent}.immersive-mode .modal-overlay{backdrop-filter:blur(3px)}.immersive-mode .modal-overlay.hazard-overlay{backdrop-filter:none}.immersive-mode .hazard-overlay .modal{max-width:360px;background:#f4f6f1f0;backdrop-filter:blur(15px)}.immersive-mode .modal-overlay header{background:none}.immersive-mode .modal-overlay header strong{color:var(--navy)}@media(pointer:coarse){#touchMove{display:block}.walk-help{display:none}}@media(max-width:800px){.immersive-top-actions{right:16px;top:90px}.immersive-top-actions button{font-size:12px;padding:7px}.immersive-mode> #app>header{padding-left:20px}.immersive-mode .scene-heading{left:20px;top:150px}.scene-location{left:20px;top:184px}.immersive-bottom{right:15px;bottom:17px;gap:4px}.immersive-bottom button{font-size:12px;padding:8px}.walk-help{bottom:75px;left:20px;font-size:11px;gap:10px}.immersive-mode.teaching-open aside{right:12px;width:320px;top:250px}.immersive-mode.teaching-open nav.phases{right:12px;width:320px;top:135px}.immersive-mode.teaching-open .scene-bottom{display:none}.immersive-mode.teaching-open .view-tools{right:350px;bottom:130px}.immersive-mode.teaching-open> #app>header>.row{display:none}}
.immersive-mode.teaching-open> #app>header>.row{position:absolute;left:370px;top:25px;margin:0;right:auto}@media(max-width:800px){.immersive-mode.teaching-open> #app>header>.row{display:none}}
