:root{color-scheme:light;font-family:system-ui,-apple-system,sans-serif;background:#efe8db;color:#253c34}*{box-sizing:border-box}body{margin:0}[hidden]{display:none!important}header,main{max-width:1440px;margin:auto;padding:18px 30px}header{padding-bottom:5px}header strong{letter-spacing:.20em;font-size:12px;color:#44614f}.tag{float:right;font-size:10px;letter-spacing:.13em;color:#777363}h1{font-family:Georgia,serif;font-weight:400;font-size:clamp(26px,4vw,38px);margin:10px 0 5px}header p,footer,.note{color:#6c756c;font-size:13px;line-height:1.6}nav,.controls{display:flex;flex-wrap:wrap;gap:7px;margin-bottom:12px}button{font:inherit;font-size:12px;border:1px solid #c1bba9;background:#f8f2e6;color:#2d4639;border-radius:6px;padding:10px 15px;min-height:44px;cursor:pointer}button:hover{background:#e4ddc8}button[aria-pressed=true],#start{background:#315343;color:#fff3d9;border-color:#315343}button:disabled{opacity:.5;cursor:default}button:focus-visible,a:focus-visible,input:focus-visible{outline:3px solid #a97129;outline-offset:3px}.stage{position:relative;height:clamp(420px,52vw,720px);overflow:hidden;border:1px solid #796b50;border-radius:10px;background:#223b30;box-shadow:0 6px 30px #473c241c}canvas{width:100%;height:100%;display:block}.scene-label{position:absolute;top:12px;left:12px;right:12px;display:flex;justify-content:space-between;gap:10px;font-size:10px;letter-spacing:.08em;pointer-events:none}.scene-label span{background:#203d32e8;color:#fff3d6;padding:8px 11px;border:1px solid #b49a6a66;border-radius:4px}#board{position:absolute;display:none;white-space:pre-wrap;color:#f2eedb;background:transparent;border:0;padding:8px 5px;font-family:Georgia,serif;font-size:16px;line-height:1.38;overflow:auto;pointer-events:auto;text-shadow:0 0 1px #ffffff66;scrollbar-width:thin;scrollbar-color:#99ae96 #284d3b;max-height:80%}#board-title{display:block;color:#f3e5bc;margin-bottom:10px;padding-bottom:8px;border-bottom:1px solid #d7ddc580;font-size:1.18em;font-weight:400}#board-text span.pending{visibility:hidden}#labels span{position:absolute;background:#122c30e6;border:1px solid #cbb17c;color:#fff;padding:7px 10px;font-size:11px;transform:translate(-50%,-50%);white-space:nowrap}#fallback{position:absolute;top:40%;left:10%;right:10%;background:#102126;padding:20px}.controls{margin-top:12px}.controls label{display:flex;align-items:center;gap:7px;font-size:12px;padding:6px}.controls input{min-width:24px;min-height:24px}#student-status{font-size:10px;letter-spacing:.04em;color:#657267;margin:10px 2px}.lesson{border-top:1px solid #c7c1b2;margin-top:20px;padding:20px 0}.eyebrow{font-size:10px;letter-spacing:.16em;color:#7c602e}h2{font-family:Georgia,serif;font-weight:400}#text{white-space:pre-wrap;line-height:1.75;max-width:65ch}a{color:#365c4b}footer{border-top:1px solid #c7c1b2;padding-top:15px}#startup-status,#static-lesson{padding:16px;border:1px solid #bcb6a7;border-radius:8px;margin:14px 0}#static-lesson p{line-height:1.65}#static-lesson summary{cursor:pointer;font-size:1rem}#board.focused{max-height:none;line-height:1.6;padding:18px;border:7px solid #a77944;background:#254938;box-shadow:0 3px 20px #0005;z-index:3;font-family:Georgia,serif}#board.focused #board-title{font-size:1.05em}
@media(max-width:600px){header,main{padding:12px}.tag{float:none;display:block;margin-top:6px;font-size:9px}header p{font-size:12px;margin-bottom:4px}.stage{height:460px}.scene-label span:last-child{display:none}nav button{flex:1;padding:10px 5px;font-size:11px}#board{padding:4px 2px;line-height:1.3}#board-title{margin-bottom:6px;padding-bottom:5px}button{padding:10px}.controls{gap:6px}#student-status{font-size:9px}}
@media(max-height:500px) and (orientation:landscape){header{padding:8px 15px}header h1,header p{display:none}main{padding:6px 15px}.stage{height:72vh}nav{margin-bottom:6px}nav button{min-height:36px;padding:6px 12px}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto}}

#board.readable-panel{background:#193d30f5;border:2px solid #b38b53;padding:12px;max-height:none;line-height:1.5}#focus{font-weight:700;border-width:2px}#board:focus-visible{outline:3px solid #f6d99b}

/* Compact reading panel is below the actual scene, never over the teacher. */
.stage.reading-below{height:auto;overflow:hidden}.stage.reading-below canvas{height:360px}.stage.reading-below #board.readable-panel{position:relative!important;left:auto!important;top:auto!important;width:100%!important;height:220px!important;border-width:2px 0 0;border-radius:0;padding:14px;background:#193d30;max-height:none}
@media(max-height:500px) and (orientation:landscape){.stage.reading-below canvas{height:65vh;min-height:220px}}
.preview-disclosure{border-left:4px solid #58735a;padding:0 16px;margin:18px 0}.preview-disclosure p,.course-picker p,#selection-status{line-height:1.6}.course-picker{display:flex;flex-direction:column;gap:7px;padding:16px;border:1px solid #bcb6a7;border-radius:8px;margin-bottom:14px}.course-picker select{font:inherit;background:#fffaf0;color:#253c34;border:1px solid #796b50;border-radius:5px;min-height:44px;padding:8px;width:100%;max-width:100%}.course-picker select:focus-visible{outline:3px solid #a97129;outline-offset:3px}#launch{font-size:1rem;background:#315343;color:#fff3d9}#course-controls{margin:16px 0}#static-lesson p{white-space:pre-wrap}#existing-courses{margin:22px 0}#existing-courses li{line-height:1.7;margin-bottom:8px}#startup-status p{line-height:1.6}
/* Scene-first navigation; controls occupy their own rows, never the canvas. */
.campus-header{padding-top:14px}.campus-header h1{font-size:clamp(25px,3vw,34px)}.campus-header nav{margin:10px 0 0;gap:18px;font-size:14px}.scene-toolbar{position:sticky;top:0;z-index:25;display:flex;flex-wrap:wrap;align-items:center;gap:7px;padding:9px;background:#efe8dbf5;border:1px solid #bab6a5;border-radius:9px;margin:10px 0}.scene-toolbar button{min-height:44px;font-size:14px;padding:9px 12px}.scene-toolbar .school-screen-toolbar{position:static;padding:0;border:0;background:transparent;gap:6px}.scene-toolbar .school-screen-toolbar [role=status]{color:#314d3f;font-size:12px;max-width:30ch}.scene-toolbar .school-screen-toolbar [role=status]:empty{display:none}.scene-toolbar .school-screen-toolbar button{font-size:14px}#fullscreen-slot{display:contents}#campus-map-preview svg{display:block;width:100%;max-height:520px;background:#dfe6cf;border-radius:10px}#startup-status{padding:8px 12px;margin:8px 0}#startup-status p{margin:4px 0}#preview-summary{font-size:13px;line-height:1.45;margin:6px 0}.building-choices{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}.building-choices button{min-height:56px;font-size:15px;text-align:left}.building-choices button span{display:block;font-size:12px;opacity:.8;margin-top:4px}.campus-choices{margin:12px 0}#campus-hint{font-size:13px;line-height:1.5}.building-heading{display:flex;flex-wrap:wrap;align-items:baseline;gap:10px}.building-heading h2{font-size:22px;margin:12px 0}.building-heading p{font-size:13px}.building-courses{display:flex;flex-wrap:wrap;gap:7px;margin-bottom:12px}.building-courses button{font-size:14px;min-height:44px;max-width:100%;text-align:left}.course-picker{padding:12px;margin-top:10px;gap:5px}.course-fields{display:grid;grid-template-columns:1fr 1fr;gap:12px}.course-fields label{font-size:13px;display:flex;flex-direction:column;gap:5px;min-width:0}.class-actions{display:flex;align-items:center;flex-wrap:wrap;gap:12px}.class-actions a{font-size:14px}#start{font-size:16px;min-height:48px;padding:10px 18px}#selection-status{margin:5px 0;font-size:13px}.preview-disclosure summary,#existing-courses summary{min-height:44px;padding:10px 0;cursor:pointer}.preview-disclosure{margin:18px 0;padding:0 12px}body.school-screen-expanded .scene-toolbar{top:0;padding-top:max(8px,env(safe-area-inset-top));border-radius:0}body.school-screen-expanded .scene-toolbar .school-screen-toolbar{position:static;padding:0}body.school-screen-expanded:not(.world-ready) .stage{height:calc(100dvh - 170px);min-height:300px}.stage{height:clamp(360px,48vw,650px)}
@media(max-width:600px){.building-choices{grid-template-columns:repeat(2,minmax(0,1fr))}.scene-toolbar{gap:5px;padding:6px}.scene-toolbar button{font-size:13px;padding:8px 9px;min-height:44px}.course-fields{grid-template-columns:1fr}.stage{height:360px}#campus-map-preview svg{min-height:260px;max-height:360px}.campus-header nav{font-size:13px;gap:14px}.building-courses{display:grid;grid-template-columns:1fr}.building-courses button{width:100%}body.school-screen-expanded main{padding:6px}body.school-screen-expanded:not(.world-ready) .stage{height:calc(100dvh - 190px);min-height:260px}}
@media(max-height:500px) and (orientation:landscape){.stage{height:65vh;min-height:240px}.building-choices{grid-template-columns:repeat(4,minmax(0,1fr))}.scene-toolbar button{min-height:44px}}

.controls button{font-size:14px;min-height:44px}

body.school-screen-expanded:not(.world-ready) .stage.reading-below{height:auto;min-height:0;overflow:visible}

/* Campus architecture candidate: compact, in-flow controls; zoom/scroll remain native. */
.campus-header{display:flex;flex-wrap:wrap;align-items:center;gap:8px 20px;padding:12px 24px 0}.campus-header>div{width:100%}.campus-header h1{font-size:24px;margin:0}.campus-header nav{margin:0 0 0 auto;align-items:center}.campus-header nav a{min-height:44px;display:inline-flex;align-items:center}.campus-header .tag{font-size:9px}main{padding-top:8px}#preview-summary{font-size:12px;margin:0 0 7px}.scene-toolbar{margin:7px 0;padding:6px}.scene-toolbar button{font-size:13px}.scene-label{top:8px;left:8px;right:8px;font-size:10px;letter-spacing:0}.scene-label span{padding:6px 8px}.scene-label span:last-child{display:none}.stage{height:clamp(440px,49vw,680px);background:#a6c6d3}.building-heading h2{margin:5px 0}.building-heading p{margin:4px 0}.campus-choices{margin:8px 0}.building-choices button{min-height:48px;font-size:13px;padding:7px 10px}.building-choices button span{display:inline;font-size:11px;margin-left:7px}.building-courses{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;margin:6px 0}.building-courses button{font-size:12px;line-height:1.35;padding:8px}.course-picker{margin-top:7px}.course-picker #selection-status{font-size:12px}.building-choices button:focus-visible,select:focus-visible{outline:3px solid #a97129;outline-offset:2px}
#campus-labels{position:absolute;inset:0;pointer-events:none}#campus-labels>*{position:absolute;display:flex;align-items:center;justify-content:center;text-align:center;font:600 11px/1.2 system-ui,sans-serif;padding:5px 7px;color:#f8f1df;background:#24493fee;border:1px solid #e9dec3;border-radius:5px;box-shadow:0 2px 5px #152b3330}#campus-labels button{pointer-events:auto;min-height:44px}#campus-labels button[aria-pressed=true]{background:#f2d597;color:#223e36;border:2px solid #fff2cf}#campus-labels button:hover{background:#416451;color:white}#campus-labels span{background:#eee6d7e8;color:#314d42;font-weight:500;border-color:#b8bba4;pointer-events:none}#campus-labels button:focus-visible{outline:3px solid #fff4d5;outline-offset:3px}
@media(max-width:600px){.campus-header{padding:10px 12px 0;gap:3px 12px}.campus-header>div{width:auto}.campus-header .tag{display:none}.campus-header h1{font-size:20px;margin-left:auto}.campus-header nav{margin:0;gap:15px;width:100%;font-size:12px}.campus-header nav a{min-height:36px}main{padding:6px 10px 12px}.scene-toolbar{gap:4px}.scene-toolbar button{font-size:12px;padding:7px 8px}.stage{height:440px;max-height:65svh;min-height:360px}.building-courses{grid-template-columns:repeat(2,minmax(0,1fr))}.building-choices{gap:5px}.building-choices button span{display:block;margin:2px 0 0}.building-heading h2{font-size:20px}.course-fields{gap:7px}.scene-toolbar .school-screen-toolbar button{font-size:12px}#campus-map-preview svg{max-height:440px;min-height:300px}}
@media(max-height:500px) and (orientation:landscape){.campus-header{padding-top:4px}.campus-header>div{width:auto}.campus-header h1,.campus-header .tag{display:none}.campus-header nav{margin-left:auto}.campus-header nav a{min-height:30px}#preview-summary{font-size:11px}.scene-toolbar{position:relative}.stage{height:65vh;min-height:240px;max-height:none}.building-courses{grid-template-columns:repeat(3,minmax(0,1fr))}}

/* The campus viewport cap must never crop the classroom reading panel. */
.stage.reading-below{max-height:none}

/* The campus is the page. This is available viewport layout, not a fullscreen API claim. */
#world-hud{display:none}.world-panel{max-width:900px;margin:auto;padding:18px}.panel-heading{display:flex;justify-content:space-between;align-items:center;gap:10px}.panel-heading h1{margin:0;font-size:26px}.panel-tools{display:flex;flex-wrap:wrap;align-items:center;gap:8px}.panel-tools label{display:flex;align-items:center;gap:5px;min-height:44px}.panel-tools .school-screen-toolbar{position:static;padding:0;border:0;background:none;color:inherit}.panel-tools .school-screen-toolbar button{font-size:13px;color:#253c34;background:#f8f2e6}.panel-tools .school-screen-toolbar [role=status]{font-size:12px;max-width:25ch;color:#314d3f}
body.world-ready{overflow:hidden;margin:0}.world-ready #world-shell{position:fixed;left:var(--world-left,0px);top:var(--world-top,0px);width:var(--world-width,100%);height:var(--world-height,100dvh);max-width:none;margin:0;padding:0;overflow:hidden;background:#a6c6d3}.world-ready #interactive,.world-ready .stage,.world-ready .stage.reading-below{position:absolute;inset:0;width:100%;height:100%;max-height:none;min-height:0;border:0;border-radius:0;overflow:hidden}.world-ready .stage canvas,.world-ready .stage.reading-below canvas{width:100%;height:100%;min-height:0}.world-ready canvas:focus-visible{outline:3px solid #f6d99b;outline-offset:-4px}.world-ready #world-hud{display:block;position:absolute;inset:0;pointer-events:none}.world-ready #world-hud button,.world-ready #world-hud a{pointer-events:auto;min-height:44px;touch-action:manipulation}.world-ready .scene-toolbar{position:absolute;top:max(8px,env(safe-area-inset-top));left:max(8px,env(safe-area-inset-left));right:max(8px,env(safe-area-inset-right));display:flex;flex-wrap:wrap;gap:5px;margin:0;padding:5px;background:#f4eddfed;border:1px solid #faf5e8;border-radius:12px;box-shadow:0 2px 12px #102a3330;z-index:5}.world-ready .scene-toolbar button,.world-ready .scene-toolbar a{font-size:13px;min-height:44px;padding:9px 11px}.world-brand{align-self:center;font-size:12px;letter-spacing:.12em;padding:0 5px}.world-ready #exit-school{margin-left:auto;display:flex;align-items:center;color:#254938;text-decoration:none;font-weight:600}.world-ready .scene-label{top:calc(max(8px,env(safe-area-inset-top)) + 67px);left:12px;right:12px}.world-ready #campus-labels{top:30px;bottom:65px}.world-ready #campus-labels>*{font-size:12px}.world-ready #movement-controls{position:absolute;left:max(14px,env(safe-area-inset-left));bottom:max(16px,env(safe-area-inset-bottom));display:grid;grid-template:repeat(2,52px)/repeat(3,52px);gap:5px;pointer-events:auto;touch-action:none;user-select:none;-webkit-user-select:none}.world-ready #movement-controls button{font-size:25px;background:#f5efdedf;border:1px solid #fff8e8;box-shadow:0 2px 5px #193b3340;touch-action:none}.world-ready #movement-controls [data-move=north]{grid-column:2}.world-ready #movement-controls [data-move=west]{grid-row:2;grid-column:1}.world-ready #movement-controls [data-move=south]{grid-row:2;grid-column:2}.world-ready #movement-controls [data-move=east]{grid-row:2;grid-column:3}.world-ready .door-action{position:absolute;right:max(14px,env(safe-area-inset-right));bottom:calc(max(16px,env(safe-area-inset-bottom)) + 10px);max-width:calc(100% - 195px);text-align:right}.door-action p{font-size:12px;margin:0 0 5px;text-shadow:0 1px 2px white}.door-action button{background:#315343;color:#fff8e5;font-weight:650;max-width:100%;font-size:13px}.world-ready #reader-toolbar{position:absolute;left:max(8px,env(safe-area-inset-left));right:max(8px,env(safe-area-inset-right));bottom:max(8px,env(safe-area-inset-bottom));display:flex;justify-content:center;flex-wrap:wrap;gap:5px;padding:4px;background:#f3ecdfed;border-radius:10px;pointer-events:auto}.world-ready #reader-toolbar button{font-size:12px;padding:8px 10px}.world-ready .world-panel{position:absolute;top:max(72px,calc(env(safe-area-inset-top) + 64px));right:max(10px,env(safe-area-inset-right));bottom:max(12px,env(safe-area-inset-bottom));width:min(520px,calc(100% - 20px));max-width:none;margin:0;padding:15px;background:#f4eddf;border:1px solid #fff8e8;border-radius:13px;overflow:auto;overscroll-behavior:contain;z-index:10;box-shadow:0 7px 40px #122b3355}.world-ready .panel-heading{position:sticky;top:-15px;background:#f4eddf;z-index:1;padding:8px 0}.world-ready .world-panel nav{font-size:13px;margin:10px 0;gap:14px}.world-ready .world-panel .building-courses{grid-template-columns:repeat(2,minmax(0,1fr))}.world-ready .world-panel .course-fields{grid-template-columns:1fr}.world-ready .world-panel .class-actions{align-items:flex-start;flex-direction:column}.world-ready .world-panel #start{font-size:14px}.world-ready .world-panel .school-screen-toolbar{position:static}.world-ready #board,.world-ready .stage.reading-below #board.readable-panel{position:absolute!important;max-height:none;min-height:0;margin:0;line-height:1.5;padding:12px;background:#193d30f2;border:2px solid #b38b53;border-radius:8px;z-index:2;overflow:auto;pointer-events:auto}.world-ready #board.focused{padding:16px;font-size:18px}.world-ready #board-title{font-size:1.02em}.world-ready .stage.reading-below #board.readable-panel{left:12px!important;top:48%!important;width:calc(100% - 24px)!important;height:calc(52% - 82px)!important}.world-ready .stage.reading-below #board.focused{top:76px!important;height:calc(100% - 158px)!important}
@media(max-width:430px){.world-ready .world-brand{display:none}.world-ready .scene-toolbar{gap:3px;padding:4px}.world-ready .scene-toolbar button,.world-ready .scene-toolbar a{font-size:12px;padding:8px}.world-ready #campus{font-size:11px}.world-ready #reader-toolbar{gap:3px}.world-ready #reader-toolbar button{font-size:11px;padding:8px}.world-ready #movement-controls{grid-template:repeat(2,48px)/repeat(3,48px)}.world-ready .door-action{max-width:calc(100% - 180px)}}
@media(max-height:500px){.world-ready .scene-toolbar{top:4px}.world-ready .scene-label{top:63px}.world-ready .world-panel{top:64px;bottom:8px}.world-ready #movement-controls{grid-template:repeat(2,44px)/repeat(3,44px);gap:3px;bottom:8px}.world-ready .stage.reading-below #board.readable-panel{left:42%!important;top:70px!important;width:calc(58% - 12px)!important;height:calc(100% - 140px)!important}.world-ready .stage.reading-below #board.focused{left:12px!important;width:calc(100% - 24px)!important}}

/* HUD can wrap under text zoom: reserve its measured height, not a guessed row. */
.world-ready .world-panel{top:calc(max(8px,env(safe-area-inset-top)) + var(--hud-height,56px) + 8px)}
.world-ready .scene-label{top:calc(max(8px,env(safe-area-inset-top)) + var(--hud-height,56px) + 8px)}

/* Departure feedback shares the positioned door-status zone, never the handheld toolbar row. */
#teacher-reaction{max-width:100%;padding:4px 8px;border-radius:6px;background:#17242bd9;color:#fff;font-size:12px;line-height:1.4;white-space:normal;overflow-wrap:anywhere;text-shadow:none}
#teacher-reaction:empty{display:none}

/* Suppress native long-press callouts only on walking controls, not readable lesson text. */
#movement-controls,#movement-controls button,#world,#world-hud,#world-hud *{user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}

/* Touch visuals only: no overlay receives events or covers reading controls. */
.floating-stick{position:fixed;width:108px;height:108px;margin:-54px 0 0 -54px;border:2px solid #ffffffa6;border-radius:50%;background:#182c4d38;box-shadow:0 0 0 1px #17253f66;pointer-events:none;z-index:4;user-select:none;-webkit-user-select:none;}
.floating-stick[hidden]{display:none!important}.floating-stick span{position:absolute;left:32px;top:32px;width:40px;height:40px;border:2px solid #fff9;border-radius:50%;background:#e7efff70;pointer-events:none}

#world.touch-walk{touch-action:none}

#student-customizer{width:min(36rem,calc(100vw - 32px));max-height:85dvh;overflow:auto;border:2px solid #38574a;border-radius:12px;padding:20px;background:#fff9ed;color:#20382e;font:16px/1.5 system-ui,sans-serif}#student-customizer::backdrop{background:#10251ccc}#student-customizer label{display:flex;flex-direction:column;gap:6px;margin:10px 0}#student-customizer select,#student-customizer button{font:inherit;min-height:44px;color:#20382e;background:#fff;border:1px solid #667b70;border-radius:6px;padding:8px}#student-customizer input[type=checkbox]{width:24px;height:24px}#student-customizer :focus-visible{outline:3px solid #805712;outline-offset:3px}.appearance-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 16px}.appearance-actions{display:flex;flex-wrap:wrap;gap:8px}#appearance-status{font-weight:600}@media(max-width:420px){.appearance-fields{grid-template-columns:1fr}}

/* Classroom rectangles are measured against actual HUD/reader bounds in app.mjs. */
.world-ready #board{overflow-wrap:anywhere;overscroll-behavior:contain}

/* Shared notebook controls, scoped here so classroom styles cannot alter the
   standalone lesson player. The existing notebook controller owns all saving. */
#classroom-notebook{width:min(60rem,calc(100vw - 16px));max-width:calc(100vw - 16px);max-height:calc(100dvh - 16px);padding:16px;border:2px solid #94713f;border-radius:10px;background:#f8f3e5;color:#25342f;overflow:auto;overscroll-behavior:contain;font:16px/1.5 system-ui,sans-serif}
#classroom-notebook::backdrop{background:#081710b8}.classroom-notebook-heading{position:sticky;top:-16px;z-index:2;display:flex;align-items:center;justify-content:space-between;gap:8px;background:#f8f3e5;padding:8px 0;border-bottom:1px solid #ad906b}.classroom-notebook-heading h2{font-size:1.1rem;margin:0;overflow-wrap:anywhere}.classroom-notebook-heading button{flex-shrink:0}
#classroom-notebook .lesson-notebook{min-width:0;padding:12px 0;color:#25342f}#classroom-notebook textarea{display:block;width:100%;max-width:100%;color:#1e302a;background:repeating-linear-gradient(#fffdf5 0px,#fffdf5 31px,#d8ded3 32px);line-height:32px;min-height:10rem;resize:vertical;border:1px solid #698777;padding:8px;font:16px/32px system-ui,sans-serif;user-select:text;-webkit-user-select:text}#classroom-notebook label{display:block;font-weight:700}#classroom-notebook .notebook-controls,#classroom-notebook .ink-controls{display:flex;flex-wrap:wrap;gap:8px;margin:8px 0}#classroom-notebook button,#classroom-notebook a{min-height:44px;max-width:100%;overflow-wrap:anywhere}#classroom-notebook button{font-size:14px}#classroom-notebook .ink-surface{display:block;width:100%;aspect-ratio:4/3;background:#fffdf5;border:2px solid #698777;user-select:none}#classroom-notebook .lesson-notebook[data-size=expanded] textarea{height:45dvh}#classroom-notebook [data-notebook-status]{font-weight:650}#classroom-notebook a{color:#17523c}#classroom-notebook :is(a,button,textarea):focus-visible{outline:3px solid #123e2a;outline-offset:3px}#class-desk{display:flex;align-items:center;text-decoration:underline;font-weight:600}
@media(max-width:430px){#classroom-notebook{padding:10px}.classroom-notebook-heading{top:-10px;flex-wrap:wrap}#classroom-notebook h3{font-size:1rem}}

#classroom-exit-choice{width:min(32rem,calc(100vw - 24px));max-height:85dvh;overflow:auto;border:2px solid #94713f;border-radius:12px;padding:20px;color:#25342f;background:#f8f3e5;font:16px/1.5 system-ui,sans-serif}#classroom-exit-choice::backdrop{background:#081710b8}#classroom-exit-choice button{margin:6px;min-height:44px}#lesson-end-signal{flex-basis:100%;margin:0;background:#f8f3e5;color:#25342f;border:2px solid #94713f;padding:10px;pointer-events:auto;font:14px/1.4 system-ui,sans-serif}

#map-picker{position:absolute;bottom:max(8px,env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);display:flex;gap:5px;max-width:calc(100% - 20px);padding:5px;background:#f4eddfed;border-radius:10px;pointer-events:auto;z-index:5}#map-picker button{min-height:44px}#map-selection{min-width:130px}#campus-labels button[data-map-current=true]{outline:3px solid #fff3bd;outline-offset:3px;box-shadow:0 0 0 6px #193d30;background:#f2d597;color:#223e36}

/* Gamepad focus uses DOM focus, including when :focus-visible is not inferred. */
#world-shell button:focus,#world-shell a:focus,#world-shell select:focus,#world-shell input:focus,#world-shell textarea:focus,#world-shell summary:focus{outline:3px solid #f4b942;outline-offset:3px}
#controller-ui-status:empty{display:none}#controller-ui-status{background:#17382e;color:#fff;padding:6px 10px;max-width:38rem;font-size:.85rem;pointer-events:auto}

dialog button:focus,dialog a:focus,dialog select:focus,dialog input:focus,dialog textarea:focus,dialog summary:focus{outline:3px solid #b45d00;outline-offset:3px}

.world-ready #movement-controls #jump{grid-row:1;grid-column:3;font-size:14px;font-weight:700;min-width:44px;min-height:44px;touch-action:manipulation;background:#315343;color:#fff8e5}

/* The first menu action always returns to the existing scene, without starting a lesson. */
.world-ready .panel-heading{display:flex;flex-direction:column;align-items:stretch;gap:6px;top:0;padding:8px 0 10px;isolation:isolate;z-index:30}
.world-ready .panel-heading h1{font-size:20px;line-height:1.2;margin:0}
.world-ready .panel-heading #panel-close{order:-1;width:100%;min-height:48px;padding:10px 12px;background:#315343;color:#fff3d9;border:2px solid #315343;font-size:15px;font-weight:700;line-height:1.3;white-space:normal}
.world-ready .panel-heading #panel-close:hover{background:#243f33}
.world-ready .panel-heading #panel-close:focus-visible{outline:3px solid #a97129;outline-offset:2px}

/* Optional classroom audio: native modal, no replacement scene or hidden text. */
#classroom-audio{box-sizing:border-box;width:min(94vw,38rem);max-height:85dvh;overflow:auto;padding:1rem;border:2px solid #274238;border-radius:.6rem;background:#fffdf4;color:#172a24;overscroll-behavior:contain}
#classroom-audio::backdrop{background:#11231bb3}
#classroom-audio button,#classroom-audio select{min-height:44px;max-width:100%;margin:.25rem .25rem .25rem 0;font:inherit}
#classroom-audio label{display:block;margin-top:.5rem}
#classroom-audio p{overflow-wrap:anywhere}
#classroom-audio .narration-controls{border-block:1px solid #87958c;padding:.65rem 0;margin:.6rem 0}
#classroom-audio :focus-visible{outline:3px solid #075fa0;outline-offset:3px}
/* Optional practice controls never overlap the left movement pad. */
.world-ready #recreation-hud{position:absolute;right:max(12px,env(safe-area-inset-right));bottom:max(16px,env(safe-area-inset-bottom));width:min(230px,calc(100% - 190px));padding:6px;background:#f4eddfed;border-radius:8px;pointer-events:auto}
#recreation-status{font-size:12px;line-height:1.35;margin:0 0 5px}#recreation-hud button{font-size:12px;padding:7px;min-height:44px;width:100%;margin:2px 0}#recreation-settings{margin:12px 0;padding:8px;border:1px solid #bcb6a7;border-radius:8px}#recreation-settings summary{min-height:44px;cursor:pointer}#recreation-settings label{display:flex;flex-wrap:wrap;gap:8px;align-items:center}#recreation-season{font:inherit;min-height:44px;max-width:100%}#recreation-settings p{font-size:13px;line-height:1.5}

/* Game-menu enhancement: one panel at a time; no content or saved state replaced. */
.world-ready .world-panel.game-menu{display:grid;grid-template-rows:auto auto minmax(0,1fr) auto;width:min(820px,calc(100% - 20px));overflow:hidden;background:#102b29;color:#f1f5ed;border:1px solid #6c8877;border-radius:16px;padding:14px;box-shadow:0 14px 60px #071c2470}
.world-ready .game-menu .panel-heading{position:static;display:flex;flex-direction:row;align-items:center;background:#102b29;padding:0 0 12px;gap:12px;z-index:auto}
.world-ready .game-menu .panel-heading h1{font:700 12px/1.3 system-ui,sans-serif;letter-spacing:.18em;color:#b9d0c1;max-width:14ch}
.world-ready .game-menu .panel-heading #panel-close{order:0;width:auto;margin-left:auto;background:#f0d499;color:#17382f;border-color:#f0d499;font-size:14px;min-height:48px}
.world-ready .game-menu .game-menu-nav{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:5px;margin:0 0 12px;font-size:13px}
.world-ready .game-menu button,.world-ready .game-menu select{background:#20443b;color:#f1f5ed;border:1px solid #658675;border-radius:9px;font:600 14px/1.35 system-ui,sans-serif;min-height:44px;max-width:100%;overflow-wrap:anywhere}
.world-ready .game-menu button:hover,.world-ready .game-menu .game-action:hover{background:#31594a}
.world-ready .game-menu button[aria-pressed=true],.world-ready .game-menu #start{background:#ecd39d;color:#17382f;border-color:#ecd39d}
.world-ready .game-menu :focus-visible{outline:3px solid #ffdf8b;outline-offset:2px;box-shadow:0 0 0 5px #102b29}
.world-ready .game-menu .game-menu-tab{padding:8px 3px;font-size:12px}
.game-menu-body{min-height:0;min-width:0;overflow:auto;overscroll-behavior:contain;padding:4px 5px 8px;scroll-padding:8px}
.game-menu-pane{min-width:0;overflow-wrap:anywhere}.game-menu-pane>h2{font:700 24px/1.2 system-ui,sans-serif;margin:8px 0 14px}
.game-current{border-left:4px solid #edcf8e;padding:16px;background:#1d4037;border-radius:0 12px 12px 0;margin:0 0 16px}.game-current h2{font:700 clamp(23px,4vw,34px)/1.12 system-ui,sans-serif;margin:7px 0 10px}.game-current p{margin:5px 0;line-height:1.45}.game-eyebrow{font-size:10px;letter-spacing:.17em;color:#e5c98e}.game-caption{font-size:12px;line-height:1.5;color:#c0d3c7}
.game-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:12px 0}.world-ready .game-menu .game-action{display:flex;flex-direction:column;justify-content:center;gap:5px;min-width:0;min-height:84px;text-decoration:none;text-align:left;padding:14px;background:#21483d;border:1px solid #668976;border-radius:10px;color:#f1f5ed;font:600 16px/1.3 system-ui,sans-serif}.game-action span{font-size:12px;font-weight:400;color:#c7dacd}.game-menu-pane>a.game-action{min-height:48px;margin:8px 0}
.game-menu a{color:#f4d99b}.game-menu h2,.game-menu h3{color:#f1f5ed}.game-menu #course-overview{margin-top:12px;padding:14px;border:1px solid #668976;border-radius:12px;background:#183b33}.game-menu #course-overview h2{font:700 24px/1.2 system-ui,sans-serif}.game-menu #course-overview h3{font:700 16px/1.3 system-ui,sans-serif}.game-menu #course-overview p,.game-menu #course-overview li{font-size:14px;line-height:1.55}.game-menu .game-course-outline{padding:10px;border:1px solid #668976;border-radius:8px}.game-menu summary{min-height:44px;padding:10px 0;cursor:pointer}.game-menu .course-picker{background:#183b33}.game-menu .course-picker select{background:#20443b;color:#f1f5ed;border-color:#658675}.game-menu .panel-tools{gap:10px}.game-menu .panel-tools label{font-size:14px}.game-menu #preview-summary,.game-menu footer,.game-menu .school-screen-toolbar [role=status]{color:#c0d3c7}.game-menu .game-menu-hint{font-size:11px;line-height:1.3;color:#c0d3c7;margin:9px 0 0;padding-top:8px;border-top:1px solid #476a59}.game-menu #startup-status{margin:0 0 10px;color:#f1f5ed}
@media(max-width:430px){.world-ready .world-panel.game-menu{padding:10px}.world-ready .game-menu .panel-heading{gap:6px}.world-ready .game-menu .panel-heading h1{font-size:10px;max-width:9ch}.world-ready .game-menu .panel-heading #panel-close{font-size:12px;padding:8px;max-width:75%}.game-current{padding:12px}.game-actions{gap:8px}.world-ready .game-menu .game-action{font-size:14px;padding:10px;min-height:84px}.game-action span{font-size:11px}.world-ready .game-menu .game-menu-tab{font-size:11px}.game-menu .game-menu-hint{font-size:10px}}
@media(max-height:500px){.world-ready .game-menu .panel-heading{padding-bottom:5px}.world-ready .game-menu-nav{margin-bottom:5px}.game-menu .game-menu-hint{display:none}.world-ready .world-panel.game-menu{grid-template-rows:auto auto minmax(0,1fr)}.game-current h2{font-size:22px}}

/* Recovery stays readable even when WebGL removes world-ready. */
.world-panel.game-menu{background:#102b29;color:#f1f5ed;border:1px solid #6c8877;border-radius:16px}
.game-menu .panel-heading{background:#102b29;color:#f1f5ed}
@media(max-width:360px){.world-ready .game-menu .game-menu-nav{grid-template-columns:repeat(3,minmax(0,1fr))}.game-actions{grid-template-columns:1fr}}
@media(max-width:240px){.world-ready .game-menu .game-menu-nav{grid-template-columns:repeat(2,minmax(0,1fr))}.world-ready .game-menu .panel-heading{flex-direction:column;align-items:stretch}.world-ready .game-menu .panel-heading h1{max-width:none}.world-ready .game-menu .panel-heading #panel-close{max-width:100%;width:100%;margin:0}}

.world-ready #bench-hud{position:absolute;right:max(12px,env(safe-area-inset-right));bottom:max(16px,env(safe-area-inset-bottom));width:min(260px,calc(100% - 190px));padding:8px;background:#102b29;color:#f1f5ed;border:1px solid #6c8877;border-radius:10px;pointer-events:auto}
#bench-status{font-size:12px;line-height:1.4;margin:0 0 6px}.world-ready #bench-toggle{font-size:13px;line-height:1.35;min-height:44px;width:100%;padding:9px;background:#f0d499;color:#17382f;font-weight:700;border-color:#f0d499}

.world-ready #bench-hud.is-seated{width:min(280px,calc(100% - 24px))}

/* Canonical lesson outline: selectable without starting or writing progress. */
.game-course-outline li{margin-block:10px}.game-course-outline li button{display:block;width:100%;min-height:44px;text-align:left;white-space:normal;overflow-wrap:anywhere}.game-course-outline li button[aria-current="true"]{border:2px solid #315343;font-weight:700}.game-course-outline li button:focus-visible{outline:3px solid #315343;outline-offset:3px}.game-course-outline li p{margin:5px 0 12px;font-size:13px}

/* Full authored titles may already contain lesson numbers. Do not duplicate them. */
.game-course-outline .course-unit-lessons{list-style:none;padding-left:0}.game-course-outline h3{margin:18px 0 8px;overflow-wrap:anywhere}

.study-reader-controls{position:sticky;top:0;z-index:1;display:flex;flex-wrap:wrap;gap:6px;padding:8px 0;background:#f4eddf}.study-reader-controls button{min-height:44px}.study-reader-text{white-space:pre-wrap;overflow-wrap:anywhere}.study-reader-lesson{margin-block:16px}.study-reader-lesson summary{min-height:44px;padding:8px 0;font-weight:700}
#game-menu-study{background:#102b29;color:#f1f5ed}#game-menu-study h2,#game-menu-study h3,#game-menu-study h4,#game-menu-study p,#game-menu-study li,#game-menu-study summary{color:#f1f5ed}#game-menu-study .study-reader-controls{background:#102b29}#game-menu-study .study-reader-controls button{background:#21483d;color:#f1f5ed;border:1px solid #668976}#game-menu-study :focus-visible{outline:3px solid #f4d99b;outline-offset:2px}

/* Brule pause menu: concise game actions over the unchanged rendered world.
   Catalogue, forms and reading are secondary; no scene screenshot or fake game state. */
.world-ready #world-shell #world-panel.game-menu--pause{
 position:absolute;left:max(16px,env(safe-area-inset-left));right:auto;
 top:calc(max(8px,env(safe-area-inset-top)) + 50px);bottom:12px;
 width:min(660px,calc(100% - 32px));max-width:none;max-height:calc(var(--world-height,100dvh) - max(8px,env(safe-area-inset-top)) - 70px);
 display:grid;grid-template-rows:auto auto minmax(0,1fr) auto;gap:0;
 padding:14px;background:#111925f2;color:#f3f3ee;border:1px solid #ffffff40;
 border-radius:5px;box-shadow:0 16px 48px #03071070;isolation:isolate;overflow:visible;
}
.world-ready #world-shell #world-panel.game-menu--pause::before{
 content:"";position:fixed;inset:0;background:#07101a55;z-index:-1;pointer-events:none;
}
.world-ready #world-shell #world-panel.game-menu--pause[data-game-menu-pane=home]{
 bottom:auto;width:min(320px,calc(100% - 32px));grid-template-rows:auto minmax(0,1fr) auto;
}
.world-ready #world-panel.game-menu--pause .panel-heading{
 display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:8px;
 position:static;padding:0 0 10px;margin:0;background:transparent;color:inherit;
}
.world-ready #world-panel.game-menu--pause[data-game-menu-pane=home] .panel-heading{grid-template-columns:minmax(0,1fr)}
.world-ready #world-panel.game-menu--pause .panel-heading h1{
 max-width:none;margin:0;font:750 14px/1.3 system-ui,sans-serif;letter-spacing:.14em;color:#f3f3ee;
}
.world-ready #world-panel.game-menu--pause .panel-heading #panel-close{
 order:0;margin:0;width:auto;max-width:none;min-height:44px;border:1px solid #e6cb91;border-radius:2px;
 padding:10px 12px;background:#e6cb91;color:#18202c;font:750 14px/1.2 system-ui,sans-serif;text-align:left;
}
.world-ready #world-panel.game-menu--pause[data-game-menu-pane=home] .panel-heading #panel-close{width:100%;font-size:16px}
.world-ready #world-panel.game-menu--pause .game-menu-nav{
 display:flex;flex-wrap:nowrap;overflow-x:auto;gap:3px;margin:0 0 10px;padding:0 0 3px;
 scrollbar-width:thin;min-width:0;
}
.world-ready #world-panel.game-menu--pause .game-menu-tab{
 flex:1 0 auto;min-width:44px;min-height:44px;padding:8px;font-size:11px;
 border:0;border-bottom:2px solid transparent;border-radius:0;background:transparent;color:#d7dfe9;
}
.world-ready #world-panel.game-menu--pause .game-menu-tab[aria-pressed=true]{color:#ffe4a9;background:#273249;border-bottom-color:#ffe4a9}
.world-ready #world-panel.game-menu--pause .game-menu-body{padding:0;scroll-padding:8px;min-height:0;overflow:auto;overscroll-behavior:contain}
.world-ready #world-panel.game-menu--pause .pause-actions{display:grid;grid-template-columns:minmax(0,1fr);gap:2px}
.world-ready #world-panel.game-menu--pause .pause-action{
 display:block;width:100%;min-height:44px;margin:0;padding:10px 12px;text-align:left;
 border:0;border-left:3px solid transparent;border-radius:0;background:transparent;color:#f3f3ee;
 font:700 16px/1.2 system-ui,sans-serif;letter-spacing:.015em;
}
.world-ready #world-panel.game-menu--pause .pause-action:hover{background:#29354c}
.world-ready #world-panel.game-menu--pause .pause-action:focus,
.world-ready #world-panel.game-menu--pause .game-action:focus,
.world-ready #world-panel.game-menu--pause .game-menu-tab:focus{
 outline:2px solid #fff1c2;outline-offset:-2px;box-shadow:none;background:#e6cb91;color:#18202c;border-left-color:#fff1c2;
}
.world-ready #world-panel.game-menu--pause button:disabled{opacity:.45;cursor:default}
.world-ready #world-panel.game-menu--pause .game-menu-hint{margin:10px 0 0;padding:8px 0 0;border-top:1px solid #ffffff30;font-size:10px;line-height:1.4;color:#c7d0dc}
.world-ready #world-panel.game-menu--pause .game-menu-pane:not(#game-menu-study)>h2{font:700 20px/1.25 system-ui,sans-serif;margin:4px 0 12px;color:#f3f3ee}
.world-ready #world-panel.game-menu--pause .game-actions{display:grid;grid-template-columns:minmax(0,1fr);gap:4px;margin:10px 0}
.world-ready #world-panel.game-menu--pause .game-action{
 display:flex;flex-direction:row;align-items:center;justify-content:space-between;gap:8px;
 min-height:44px;margin:0;padding:10px 12px;background:#222e41;border:1px solid #ffffff30;border-radius:3px;
 color:#f3f3ee;font:600 14px/1.3 system-ui,sans-serif;text-decoration:none;
}
.world-ready #world-panel.game-menu--pause .game-action span{display:none}
.world-ready #world-panel.game-menu--pause .game-current{margin:0 0 10px;padding:0;background:transparent;border:0;border-radius:0}
.world-ready #world-panel.game-menu--pause .game-current .game-eyebrow{margin:0;color:#c2cee0;font-size:10px}
.world-ready #world-panel.game-menu--pause .game-current h2{margin:3px 0;font-size:16px;line-height:1.3}
.world-ready #world-panel.game-menu--pause .game-current p{margin:3px 0;font-size:12px;line-height:1.4}
.world-ready #world-panel.game-menu--pause .game-menu-pane:not(#game-menu-study) .game-caption{font-size:12px;line-height:1.45;color:#c7d0dc}
.world-ready #world-panel.game-menu--pause .pause-building-picker{margin:0 0 10px;border:1px solid #ffffff35;border-radius:3px;padding:0 10px}
.world-ready #world-panel.game-menu--pause .pause-building-picker>summary{min-height:44px;padding:10px 0;font-weight:650}
.world-ready #world-panel.game-menu--pause .pause-building-picker #campus-hint{font-size:12px;line-height:1.4}
.world-ready #world-panel.game-menu--pause .building-heading{gap:4px}
.world-ready #world-panel.game-menu--pause .building-heading h2{margin:4px 0;font-size:18px}
.world-ready #world-panel.game-menu--pause .building-heading p{font-size:12px;line-height:1.4}
.world-ready #world-panel.game-menu--pause .building-choices{grid-template-columns:repeat(2,minmax(0,1fr));gap:4px}
.world-ready #world-panel.game-menu--pause .building-choices button{min-height:44px;padding:8px;font-size:13px}
.world-ready #world-panel.game-menu--pause .building-courses{display:grid;grid-template-columns:minmax(0,1fr);gap:4px;margin:8px 0}
.world-ready #world-panel.game-menu--pause .building-courses button{
 min-height:44px;padding:10px 12px;font-size:14px;line-height:1.3;text-align:left;border-radius:3px;background:#222e41;color:#f3f3ee;
}
.world-ready #world-panel.game-menu--pause .building-courses button[aria-pressed=true]{background:#e6cb91;color:#18202c}
.world-ready #world-panel.game-menu--pause .course-picker{padding:10px;background:#192638;border:1px solid #ffffff35}
.world-ready #world-panel.game-menu--pause #course-overview{padding:12px;background:#192638;border-color:#ffffff35}
.world-ready #world-panel.game-menu--pause #start{min-height:48px;background:#e6cb91;color:#18202c;font-weight:750}
.world-ready #world-panel.game-menu--pause .panel-tools{gap:8px}
@media(max-height:500px) and (min-width:500px){
 .world-ready #world-shell #world-panel.game-menu--pause{top:max(8px,env(safe-area-inset-top));bottom:8px;max-height:calc(var(--world-height,100dvh) - 16px);padding:10px}
 .world-ready #world-shell #world-panel.game-menu--pause[data-game-menu-pane=home]{width:min(520px,calc(100% - 32px));bottom:auto}
 .world-ready #world-panel.game-menu--pause[data-game-menu-pane=home] .panel-heading{grid-template-columns:minmax(0,1fr) minmax(120px,1fr)}
 .world-ready #world-panel.game-menu--pause .pause-actions{grid-template-columns:repeat(2,minmax(0,1fr));gap:3px 12px}
 .world-ready #world-panel.game-menu--pause .game-menu-hint{display:none}
 .world-ready #world-panel.game-menu--pause .panel-heading{padding-bottom:6px}
}
@media(max-width:360px){
 .world-ready #world-shell #world-panel.game-menu--pause{left:max(10px,env(safe-area-inset-left));width:calc(100% - 20px);padding:10px}
 .world-ready #world-shell #world-panel.game-menu--pause[data-game-menu-pane=home]{width:calc(100% - 20px)}
 .world-ready #world-panel.game-menu--pause .pause-action{font-size:15px}
 .world-ready #world-panel.game-menu--pause .panel-heading{grid-template-columns:minmax(0,1fr)}
}

/* Menu size changes only this existing panel, never the world/classroom viewport.
   Repeated Menu: small → expanded → close; Resume remains an immediate return. */
.world-ready #world-panel.game-menu--pause .panel-heading,
.world-ready #world-panel.game-menu--pause[data-game-menu-pane=home] .panel-heading{grid-template-columns:minmax(0,1fr) auto}
.world-ready #world-panel.game-menu--pause .panel-heading h1{grid-column:1 / -1;grid-row:1}
.world-ready #world-panel.game-menu--pause .panel-heading #panel-close{grid-column:1;grid-row:2;width:100%}
.world-ready #world-panel.game-menu--pause .pause-size-action{grid-column:2;grid-row:2}
.world-ready #world-panel.game-menu--pause .panel-heading #launch{grid-column:1 / -1;width:100%}
.world-ready #world-panel.game-menu--pause .pause-size-action{min-width:104px;min-height:44px;padding:8px 10px;border:1px solid #ffffff60;border-radius:2px;background:#273249;color:#f3f3ee;font:650 12px/1.2 system-ui,sans-serif}
.world-ready #world-panel.game-menu--pause .pause-size-action:focus{outline:2px solid #fff1c2;outline-offset:-2px;background:#e6cb91;color:#18202c}
.world-ready #world-shell #world-panel.game-menu--pause[data-game-menu-size=expanded]{width:min(960px,calc(100% - 32px));bottom:max(12px,env(safe-area-inset-bottom));grid-template-rows:auto auto minmax(0,1fr) auto}
.world-ready #world-shell #world-panel.game-menu--pause[data-game-menu-size=expanded][data-game-menu-pane=home]{grid-template-rows:auto minmax(0,1fr) auto}
.world-ready #world-panel.game-menu--pause[data-game-menu-size=expanded] .pause-action{min-height:54px;font-size:20px;line-height:1.3}
.world-ready #world-panel.game-menu--pause[data-game-menu-size=expanded] .panel-heading h1{font-size:18px}
@media(max-height:500px) and (min-width:500px){
 .world-ready #world-panel.game-menu--pause .panel-heading,
 .world-ready #world-panel.game-menu--pause[data-game-menu-pane=home] .panel-heading{grid-template-columns:minmax(0,1fr) auto auto}
 .world-ready #world-panel.game-menu--pause .panel-heading #panel-close{grid-column:3;grid-row:1;width:auto;min-width:100px}
 .world-ready #world-panel.game-menu--pause .pause-size-action{grid-column:2;grid-row:1}
 .world-ready #world-panel.game-menu--pause .panel-heading h1{grid-column:1;grid-row:1}
 .world-ready #world-shell #world-panel.game-menu--pause[data-game-menu-size=expanded]{bottom:8px}
}
@media(max-width:360px){.world-ready #world-shell #world-panel.game-menu--pause[data-game-menu-size=expanded]{width:calc(100% - 20px)}}

/* Opt-in setup reuses Pause Help. Initial discovery disappears after campus entry. */
#campus-entry-actions{position:absolute;z-index:12;left:50%;bottom:18px;transform:translateX(-50%);width:max-content;max-width:calc(100% - 24px);display:grid;gap:6px}
#campus-entry-actions button{min-height:44px;white-space:normal;font-weight:700;line-height:1.25;border:1px solid #fff4d5;border-radius:6px;color:#fff4d5;background:#182536;padding:10px 16px}
#campus-entry-actions #enter-campus{min-height:48px;color:#173d30;background:#fff4d5}
#campus-entry-actions button:focus-visible{outline:3px solid #fff;outline-offset:2px}
#world-panel #controller-setup{margin:0 0 18px;padding:0 0 12px;border-bottom:1px solid #ffffff40;overflow-wrap:anywhere}
#world-panel #controller-setup h2{font:700 20px/1.3 system-ui,sans-serif;margin:4px 0 12px}
#world-panel #controller-setup p,#world-panel #controller-setup li{font:400 14px/1.5 system-ui,sans-serif}
#world-panel #controller-setup ol{padding-left:22px}
#world-panel #controller-setup li{margin-bottom:10px}
#world-panel #controller-setup-status{padding:10px;border-left:3px solid currentColor}
#world-panel #controller-setup-check,#world-panel #controller-setup summary{min-height:44px;font-weight:700}
#world-panel #controller-setup summary{padding:12px 0;cursor:pointer}
#world-panel #controller-setup dl{display:grid;grid-template-columns:minmax(88px,.7fr) minmax(0,1fr);gap:8px;font-size:14px;line-height:1.4}
#world-panel #controller-setup dt{font-weight:700}#world-panel #controller-setup dd{margin:0}
#world-panel #controller-setup .controller-setup-links{display:grid;gap:4px}
#world-panel #controller-setup a{display:flex;align-items:center;min-height:44px;font-weight:650;color:inherit}
@media(max-height:520px) and (min-width:560px){
 #campus-entry-actions{grid-template-columns:repeat(2,minmax(0,1fr));width:min(560px,calc(100% - 24px));bottom:12px}
}

/* Game overlays: fixed exits, one scroll body; native dialog remains the top layer. */
#classroom-audio.brule-game-overlay,#student-customizer.brule-game-overlay{width:min(40rem,calc(100vw - 24px));height:min(44rem,calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom)));max-height:calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom));padding:0;overflow:hidden;border:2px solid #8b9ab1;border-radius:10px;background:#172336;color:#f3f3ee;font:16px/1.45 system-ui,sans-serif;overscroll-behavior:contain}
.brule-game-overlay[open]{display:flex;flex-direction:column}
.brule-overlay-header{display:flex;flex-wrap:wrap;align-items:center;gap:8px;flex:none;padding:10px 12px;background:#142033;border-bottom:1px solid #8190a5}
.brule-overlay-header h2{flex:1 1 100%;font:700 18px/1.3 system-ui,sans-serif;margin:0;color:#f3f3ee}
.brule-overlay-body{min-height:0;flex:1;overflow:auto;overscroll-behavior:contain;touch-action:pan-y pinch-zoom;padding:12px;scroll-padding-block:12px;overflow-wrap:anywhere}
#student-customizer.brule-game-overlay form{display:flex;flex-direction:column;flex:1;min-height:0;overflow:hidden}
#student-customizer.brule-game-overlay .appearance-actions{flex:none;margin:0;padding:10px 12px;border-top:1px solid #8190a5;background:#142033;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
#student-customizer.brule-game-overlay .appearance-actions #appearance-apply{grid-column:1 / -1;background:#e6cb91;color:#18202c;font-weight:700}
#classroom-audio.brule-game-overlay button,#student-customizer.brule-game-overlay button{margin:0;min-height:44px;padding:10px 12px;white-space:normal;background:#27374d;color:#fff7e7;border:1px solid #9ba8ba;border-radius:5px}
#classroom-audio.brule-game-overlay select,#student-customizer.brule-game-overlay select{display:block;width:100%;min-width:0;max-width:100%;min-height:44px;background:#fffdf5;color:#172a24;font-size:16px}
.brule-game-overlay .brule-overlay-body p{font-size:14px;line-height:1.5;margin:.6rem 0}.brule-game-overlay summary{min-height:44px;padding:10px 0;cursor:pointer}
.brule-game-overlay .brule-overlay-help{border-top:1px solid #8190a5;margin-top:12px}.brule-game-overlay h3{font-size:16px}.brule-game-overlay :focus-visible{outline:3px solid #ffe19b!important;outline-offset:-3px}
#classroom-audio.brule-game-overlay #lesson-narration>div{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0}
#classroom-audio.brule-game-overlay .brule-overlay-header #audio-close{background:#e6cb91;color:#18202c;font-weight:700}
@media(max-height:460px){.brule-overlay-header h2{flex:1 1 auto}.brule-overlay-header{padding:6px 8px;gap:6px}.brule-overlay-body{padding:8px}#student-customizer.brule-game-overlay .appearance-actions{padding:6px 8px;grid-template-columns:repeat(3,minmax(0,1fr))}#student-customizer.brule-game-overlay .appearance-actions #appearance-apply{grid-column:auto}}
/* Suppress accidental long-press selection only on gameplay controls, never lesson text or editors. */
#world-shell .handheld-deck,#world-shell .handheld-bar,#movement-controls,#world-hud button,#scene-toolbar button,.brule-overlay-header button{user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}
#world-hud button,#scene-toolbar button,.brule-overlay-header button{touch-action:manipulation}

body.world-ready{overscroll-behavior:contain}
canvas.touch-walk{touch-action:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}

/* Text-view action details sit on the light native button, not the dark 3D menu. */
body:not(.world-ready) .game-menu button.game-action span{color:#2d4639}

/* Readable Classic controls: labels fit the targets even in short windows. */
.world-ready #movement-controls button{display:grid;place-items:center;padding:0;min-width:0;line-height:1.2}
.world-ready #movement-controls #jump{padding:4px;font-size:13px;white-space:normal;overflow-wrap:anywhere}
.world-ready #world-shell[data-handheld-skin=classic][data-classic-pad=hidden] #movement-controls{display:none!important}
#desktop-controls-hint{position:absolute;left:max(16px,env(safe-area-inset-left));bottom:max(14px,env(safe-area-inset-bottom));max-width:calc(100% - 32px);margin:0;padding:9px 12px;border:1px solid #ffffff35;border-radius:8px;background:#162e2be8;color:#f5f2e9;font:500 12px/1.5 system-ui,sans-serif;pointer-events:none}
.world-ready #world-shell[data-practice-visible=true] #desktop-controls-hint{bottom:66px}
.classic-touch-setting{display:flex;align-items:center;gap:10px;min-height:44px;line-height:1.4}
.classic-touch-setting input{width:24px;height:24px;flex:none}
.world-ready .scene-toolbar{background:#1c3531ed;border:1px solid #d6e0d34d;box-shadow:0 4px 18px #09221d30;border-radius:10px;color:#f5f3e9;gap:6px}
.world-ready .scene-toolbar .world-brand{color:#e4d4ad}
.world-ready .scene-toolbar button,.world-ready .scene-toolbar a{border-color:#9aaea052;background:#ecede4;color:#223d34;line-height:1.2}
.world-ready .scene-toolbar button:hover{background:#fff8e8}
.world-ready .scene-toolbar #menu-toggle{background:#e6cb91;color:#18202c;font-weight:750}
.world-ready .scene-toolbar #exit-school{color:#f5f3e9;background:transparent}
.world-ready .scene-toolbar button:disabled{opacity:.6}
.world-ready .scene-toolbar #fullscreen-slot .school-screen-toolbar{color:#f5f3e9}
.world-ready .scene-toolbar #fullscreen-slot [role=status]{color:#f5f3e9}
@media(pointer:coarse){#desktop-controls-hint{display:none}}
@media(max-width:500px){#desktop-controls-hint{font-size:11px;max-width:calc(100% - 24px);left:12px;bottom:12px}}

/* Run occupies the unused D-pad cell: no additional mobile footprint. */
.world-ready #movement-controls [data-run]{grid-row:1;grid-column:1;font-size:13px;font-weight:700;padding:4px;background:#315343;color:#fff8e5}
.world-ready #movement-controls [data-run][aria-pressed=true]{background:#f3d38a;color:#193d30;box-shadow:inset 0 0 0 2px #315343}
/* Brule command menu: one linear focus order across touch, keys and controller. */
.game-menu--pause .pause-intro{font:500 13px/1.5 system-ui;color:#bed0df;margin:0 0 12px}
.game-menu--pause .pause-more{margin:10px 0 0;border-top:1px solid #416174;padding-top:4px}
.game-menu--pause .pause-more>summary{padding:12px;min-height:44px;box-sizing:border-box;color:#cce6ee;font-weight:700;cursor:pointer}
.game-menu--pause .pause-secondary{display:grid;gap:4px}
.game-menu--pause .pause-back{min-height:44px;text-align:left;background:#203749;color:#e5f6fa;border:1px solid #547787;border-radius:8px;margin:8px 0;padding:10px 14px}
.world-ready #world-shell #world-panel.game-menu--pause[data-game-menu-pane=home]{width:min(440px,calc(100% - 32px));background:linear-gradient(150deg,#142b3c,#101b2b);border:1px solid #537487;border-radius:16px;box-shadow:0 18px 70px #0009}
.world-ready #world-panel.game-menu--pause .pause-actions{display:grid;grid-template-columns:minmax(0,1fr);gap:6px}
.world-ready #world-panel.game-menu--pause .pause-action{display:flex;align-items:center;gap:12px;min-height:60px;padding:10px 12px;border:1px solid #416174;border-radius:9px;background:#203749}
.game-menu--pause .pause-icon{display:grid;place-items:center;flex:0 0 32px;font-size:23px;color:#80dddc}
.game-menu--pause .pause-copy{display:flex;flex-direction:column;gap:4px;min-width:0}
.game-menu--pause .pause-copy strong{font:700 16px/1.2 system-ui}
.game-menu--pause .pause-description{display:block;font:400 12px/1.35 system-ui;color:#c3d5e1;letter-spacing:0}
.world-ready #world-panel.game-menu--pause .pause-action:focus{background:#e6cb91;color:#18202c;outline:3px solid #fff1c2;outline-offset:-3px}
.world-ready #world-panel.game-menu--pause .pause-action:focus .pause-description,.world-ready #world-panel.game-menu--pause .pause-action:focus .pause-icon{color:#243c4a}
.game-menu--pause .pause-more>summary:focus-visible,.game-menu--pause .pause-back:focus-visible{outline:3px solid #fff1c2;outline-offset:-3px}
.world-ready #world-panel.game-menu--pause .game-action span{display:block;font-size:12px;line-height:1.4}
.world-ready #world-panel.game-menu--pause .game-action{flex-direction:column;align-items:flex-start}
.world-ready #world-panel.game-menu--pause .game-menu-nav{flex-wrap:wrap}
@media(max-width:360px){.world-ready #world-shell #world-panel.game-menu--pause[data-game-menu-pane=home]{width:calc(100% - 20px)}.game-menu--pause .pause-description{font-size:11px}}
@media(max-height:500px){.world-ready #world-panel.game-menu--pause .pause-action{min-height:52px;padding:7px 10px}.game-menu--pause .pause-intro{margin-bottom:6px}}
.world-ready #world-shell #world-panel.game-menu--pause[data-game-menu-size=expanded][data-game-menu-pane=home]{width:min(960px,calc(100% - 32px))}
.world-ready #world-panel.game-menu--pause .game-menu-nav{grid-template-columns:repeat(3,minmax(0,1fr))}
.world-ready #world-panel.game-menu--pause .pause-back{margin:0;grid-column:1 / -1}
.world-ready #world-panel.game-menu--pause .game-menu-nav{display:grid}
body:not(.world-ready) .game-menu--pause .pause-intro,body:not(.world-ready) .game-menu--pause .pause-description,body:not(.world-ready) .game-menu--pause .pause-icon,body:not(.world-ready) .game-menu--pause .pause-more>summary{color:#304d48}
body:not(.world-ready) .game-menu--pause .pause-action{display:flex;align-items:center;gap:12px;text-align:left;width:100%;margin-bottom:6px;min-height:60px}

/* Original Brule phone: the existing menu is the phone, not a second overlay.
   Core apps retain their real nodes. No fake time, battery, messages or network state. */
.world-ready #world-shell #world-panel.game-menu--phone,
.world-ready #world-shell #world-panel.game-menu--phone[data-game-menu-pane=home]{
 left:auto;right:max(18px,env(safe-area-inset-right));top:max(16px,env(safe-area-inset-top));bottom:auto;
 width:min(356px,calc(100% - 32px));max-height:calc(var(--world-height,100dvh) - 32px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
 padding:26px 14px 14px;border:5px solid #111c27;border-radius:34px;background:linear-gradient(155deg,#1d4351 0%,#142838 48%,#172335 100%);
 box-shadow:0 0 0 1px #78929d,0 20px 60px #020d1c99,inset 0 0 0 1px #57717c;overflow:hidden;
 display:grid;grid-template-rows:auto auto minmax(0,1fr) auto;
}
.world-ready #world-shell #world-panel.game-menu--phone[data-game-menu-pane=home]{grid-template-rows:auto minmax(0,1fr) auto}
.world-ready #world-shell #world-panel.game-menu--phone::before{position:absolute;inset:7px auto auto 50%;width:54px;height:5px;transform:translateX(-50%);border-radius:5px;background:#07111b;z-index:0}
.world-ready #world-shell #world-panel.game-menu--phone[data-game-menu-size=expanded],
.world-ready #world-shell #world-panel.game-menu--phone[data-game-menu-size=expanded][data-game-menu-pane=home]{width:min(680px,calc(100% - 32px));bottom:max(16px,env(safe-area-inset-bottom));grid-template-rows:auto auto minmax(0,1fr) auto}
.world-ready #world-shell #world-panel.game-menu--phone[data-game-menu-size=expanded][data-game-menu-pane=home]{grid-template-rows:auto minmax(0,1fr) auto}
.world-ready #world-panel.game-menu--phone .panel-heading,
.world-ready #world-panel.game-menu--phone[data-game-menu-pane=home] .panel-heading{grid-template-columns:minmax(0,1fr) auto;gap:8px;padding:0 0 10px}
.world-ready #world-panel.game-menu--phone .panel-heading h1{grid-column:1 / -1;grid-row:1;font:800 13px/1.4 system-ui,sans-serif;letter-spacing:.16em;color:#edf8ff}
.world-ready #world-panel.game-menu--phone .panel-heading #panel-close,
.world-ready #world-panel.game-menu--phone[data-game-menu-pane=home] .panel-heading #panel-close{grid-row:2;grid-column:1;width:100%;min-height:44px;border-radius:10px;border:1px solid #8de2d5;background:#bcefe2;color:#123a3c;font-size:14px;text-align:center}
.world-ready #world-panel.game-menu--phone .pause-size-action{grid-row:2;grid-column:2;border-radius:10px;min-width:104px;min-height:44px;background:#243d4e;color:#ecf7ff;border-color:#728d9a}
.world-ready #world-panel.game-menu--phone .pause-intro{margin:0 0 12px;color:#cce3ec;font:500 13px/1.5 system-ui}
.world-ready #world-panel.game-menu--phone .pause-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;align-content:start}
.world-ready #world-panel.game-menu--phone .pause-actions>.pause-action{display:flex;flex-direction:column;justify-content:flex-start;align-items:center;gap:7px;min-width:0;min-height:98px;margin:0;padding:8px 3px;border:1px solid transparent;border-radius:13px;background:transparent;color:#f4fbff;text-align:center;letter-spacing:0}
.world-ready #world-panel.game-menu--phone .pause-actions>.pause-action:hover{background:#284658;border-color:#678b9d}
.world-ready #world-panel.game-menu--phone .pause-icon{display:grid;place-items:center;flex:0 0 auto;width:47px;height:47px;border:1px solid #b2e9e855;border-radius:14px;background:#326a79;color:#e4ffff;box-shadow:inset 0 1px 0 #ffffff25,0 3px 8px #030c1933}
.game-menu--phone .pause-icon svg{display:block;width:28px;height:28px;fill:none;stroke:currentColor;stroke-width:1.65;stroke-linecap:round;stroke-linejoin:round}
.world-ready #world-panel.game-menu--phone [data-menu-action=catalogue] .pause-icon{background:#53699c;color:#f0f2ff}
.world-ready #world-panel.game-menu--phone [data-menu-action=pathways] .pause-icon{background:#7960a0;color:#fbecff}
.world-ready #world-panel.game-menu--phone [data-menu-action=notebook] .pause-icon{background:#957246;color:#fff4d9}
.world-ready #world-panel.game-menu--phone [data-menu-action=desk] .pause-icon{background:#8b5a51;color:#ffebe5}
.world-ready #world-panel.game-menu--phone [data-menu-action=student] .pause-icon{background:#4c7662;color:#e7ffed}
.world-ready #world-panel.game-menu--phone [data-menu-action=settings] .pause-icon{background:#586b7e;color:#f2f9ff}
.world-ready #world-panel.game-menu--phone [data-menu-action=taxi] .pause-icon{background:#e3bb56;color:#253132}
.world-ready #world-panel.game-menu--phone .pause-copy{display:flex;align-items:center;gap:0;max-width:100%}
.world-ready #world-panel.game-menu--phone .pause-copy strong{font:650 12px/1.3 system-ui,sans-serif;overflow-wrap:normal;word-break:normal}
.world-ready #world-panel.game-menu--phone .pause-actions>.pause-action .pause-description{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.world-ready #world-panel.game-menu--phone .pause-action:focus{outline:3px solid #ffedb0;outline-offset:-3px;background:#314f61;color:#fff}
.world-ready #world-panel.game-menu--phone .pause-action:focus .pause-icon{outline:2px solid #fff5cf;outline-offset:2px;background:#326a79;color:#f2ffff}
.world-ready #world-panel.game-menu--phone .pause-action:focus .pause-description{color:#dceaf3}
.world-ready #world-panel.game-menu--phone .pause-more{grid-column:1 / -1;margin:3px 0 0;border-color:#71879666}
.world-ready #world-panel.game-menu--phone .pause-more>summary{padding:12px 8px;color:#d7e9f2;font-size:13px}
.world-ready #world-panel.game-menu--phone .pause-secondary{grid-template-columns:minmax(0,1fr);gap:6px}
.world-ready #world-panel.game-menu--phone .pause-secondary .pause-action{flex-direction:row;min-height:64px;padding:8px;border-radius:10px;background:#21394b;border:1px solid #526c7e}
.world-ready #world-panel.game-menu--phone .pause-secondary .pause-icon{width:38px;height:38px;border-radius:10px;box-shadow:none}
.world-ready #world-panel.game-menu--phone .pause-secondary .pause-icon svg{width:24px;height:24px}
.world-ready #world-panel.game-menu--phone .pause-secondary .pause-copy{align-items:flex-start;gap:3px}
.world-ready #world-panel.game-menu--phone .pause-secondary .pause-copy strong{font-size:13px}
.world-ready #world-panel.game-menu--phone .pause-secondary .pause-description{font-size:11px;line-height:1.4;color:#c6dce8}
.world-ready #world-panel.game-menu--phone .pause-actions>p{grid-column:1 / -1;font:400 12px/1.45 system-ui;color:#c6dce8;margin:8px 0}
.world-ready #world-panel.game-menu--phone .game-menu-nav{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:0 0 10px;padding:0;overflow:visible}
.world-ready #world-panel.game-menu--phone .pause-back,
.world-ready #world-panel.game-menu--phone .game-menu-tab{grid-column:auto;min-height:44px;margin:0;border:1px solid #738b9b;border-radius:9px;padding:9px 12px;background:#233c4e;color:#eef8ff;font:650 13px/1.3 system-ui;text-align:center}
.world-ready #world-panel.game-menu--phone .game-menu-hint{margin:8px 0 0;padding:9px 2px 0;color:#cbdce7;border-color:#7a90a255;font-size:10px;line-height:1.5}
.game-menu--phone .phone-status{font:500 13px/1.5 system-ui;border-left:3px solid #eac66b;padding:8px;margin:10px 0;color:inherit}
body:not(.world-ready) #world-panel.game-menu--phone{background:#102b29;color:#f1f5ed;border-color:#6c8877}
body:not(.world-ready) #world-panel.game-menu--phone .pause-intro,body:not(.world-ready) #world-panel.game-menu--phone .pause-more>summary{color:#cce3ec}
body:not(.world-ready) #world-panel.game-menu--phone .panel-heading{background:transparent;color:inherit}
body:not(.world-ready) #world-panel.game-menu--phone .pause-icon{width:32px;height:32px;flex:0 0 32px}
body:not(.world-ready) #world-panel.game-menu--phone .game-menu-nav{gap:8px}
@media(max-width:360px){.world-ready #world-shell #world-panel.game-menu--phone,.world-ready #world-shell #world-panel.game-menu--phone[data-game-menu-pane=home],.world-ready #world-shell #world-panel.game-menu--phone[data-game-menu-size=expanded]{left:auto;right:8px;width:calc(100% - 16px);padding:24px 10px 12px}.world-ready #world-panel.game-menu--phone .pause-actions{gap:5px}.world-ready #world-panel.game-menu--phone .pause-actions>.pause-action{min-height:92px}}
@media(max-height:500px){.world-ready #world-shell #world-panel.game-menu--phone,.world-ready #world-shell #world-panel.game-menu--phone[data-game-menu-pane=home],.world-ready #world-shell #world-panel.game-menu--phone[data-game-menu-size=expanded]{top:8px;bottom:8px;max-height:calc(var(--world-height,100dvh) - 16px);padding-top:22px}.world-ready #world-panel.game-menu--phone .pause-intro{margin-bottom:6px}.world-ready #world-panel.game-menu--phone .pause-actions>.pause-action{min-height:86px}.world-ready #world-panel.game-menu--phone .game-menu-hint{display:none}}
@media(max-width:260px){.world-ready #world-panel.game-menu--phone .pause-actions{grid-template-columns:repeat(2,minmax(0,1fr))}.world-ready #world-panel.game-menu--phone .panel-heading,.world-ready #world-panel.game-menu--phone[data-game-menu-pane=home] .panel-heading{grid-template-columns:minmax(0,1fr)}.world-ready #world-panel.game-menu--phone .pause-size-action{grid-column:1;grid-row:3}.world-ready #world-panel.game-menu--phone .game-menu-nav{grid-template-columns:minmax(0,1fr)}}

/* Exploration keeps a small command row; Tools restores the existing full shelf and guidance. */
.world-ready #scene-toolbar[data-toolbar-minimized=true]{background:#152e32ed;border-color:#c5dfd644;border-radius:13px;box-shadow:0 5px 18px #081c2538}
.world-ready #scene-toolbar[data-toolbar-minimized=true] button,.world-ready #scene-toolbar[data-toolbar-minimized=true] a{border-radius:9px;background:#29434a;color:#f0f7f3;border-color:#a3c1b938;font-weight:600;line-height:1.2}
.world-ready #scene-toolbar[data-toolbar-minimized=true] #menu-toggle{background:#e6cb91;color:#18202c;border-color:#f8e0a5;font-weight:750}
.world-ready #scene-toolbar[data-toolbar-minimized=true] [data-toolbar-toggle]{background:transparent;color:#e2ece7;border-color:transparent}
.world-ready #scene-toolbar[data-toolbar-minimized=true] button:hover{background:#3c5860;color:#fff}
.world-ready #scene-toolbar[data-toolbar-minimized=true] #menu-toggle:hover{background:#f5dfaf;color:#18202c}
.world-ready #scene-toolbar[data-toolbar-minimized=true]~#desktop-controls-hint{display:none}
#game-experience-settings{min-width:0;padding:14px;border:1px solid #688074;border-radius:12px;margin:12px 0}
#game-experience-settings legend{font-weight:700;padding:0 6px}
#game-experience-settings label{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:12px 0;line-height:1.4}
#game-experience-settings input[type=range]{flex:1 1 120px;min-width:80px;min-height:36px;max-width:250px}
#game-experience-settings output{min-width:3em;font-variant-numeric:tabular-nums}
#game-experience-settings select{max-width:100%;min-height:44px}
#game-experience-settings p{font-size:.85rem;line-height:1.5;max-width:52ch}

/* The same persistent menu action is visibly the Phone, including the compact HUD.
   No extra overlay, hidden shortcut, input owner or travel capability is introduced. */
.world-ready #scene-toolbar #menu-toggle[data-phone-open]{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:44px;min-width:76px;background:#bcefe2;color:#123a3c;border:2px solid #83d9c9;border-radius:10px;font-weight:800;box-shadow:inset 0 1px 0 #edfff9}
.world-ready #scene-toolbar #menu-toggle[data-phone-open]::before{content:"";display:inline-block;width:11px;height:18px;border:2px solid currentColor;border-radius:3px;box-shadow:inset 0 -3px 0 currentColor;flex:none}
.world-ready #scene-toolbar #menu-toggle[data-phone-open]:hover{background:#dcfff3;color:#123a3c}
.world-ready #scene-toolbar #menu-toggle[data-phone-open]:focus-visible{outline:3px solid #ffe9a5;outline-offset:2px}

/* v501: recognizable worlds and learning first; the existing phone actions stay intact. */
.nova-world-switch,.nova-explore-actions{display:flex;flex-wrap:wrap;gap:10px;margin:10px 0}.nova-world-switch>*{display:inline-flex;align-items:center;min-height:44px;padding:8px 10px}.nova-world-switch [aria-current]{background:#dcebe3;border-radius:8px;font-weight:700}.nova-explore-actions button{flex:1;min-height:54px;padding:12px;font:700 1rem system-ui;border:1px solid #91b4ad;border-radius:10px;background:#fff;color:#164b56}.start-location-picker details>summary{min-height:44px;padding:12px 0;font-weight:700}.start-location-picker details>a{display:block;padding:10px;min-height:44px}.start-location-picker details>button{min-height:44px;padding:10px;font:inherit}.explore-world-links{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:10px 0}.explore-world-links a{min-height:44px;margin:0!important;padding:10px!important;font-size:14px!important;line-height:1.4}.explore-world-links a:first-child{grid-column:1/-1}.game-menu--phone [data-explore-world]{display:block;width:100%;min-height:64px;margin-bottom:12px;background:#bcefe2;color:#123a3c;border:1px solid #8de2d5;border-radius:10px;padding:12px;text-align:left}.game-menu--phone [data-explore-world] strong,.game-menu--phone [data-explore-world] span{display:block}.game-menu--phone [data-explore-world] span{font-size:13px;margin-top:4px}.game-menu--phone [data-explore-world]:disabled{opacity:.6}.world-ready #world-panel.game-menu--phone .panel-heading h1{grid-column:1;grid-row:1;font:700 20px/1.2 system-ui;letter-spacing:0}.world-ready #world-panel.game-menu--phone .panel-heading #panel-close,.world-ready #world-panel.game-menu--phone[data-game-menu-pane=home] .panel-heading #panel-close{grid-column:2;grid-row:1;width:auto;padding:8px 12px;min-height:44px}.world-ready #world-panel.game-menu--phone .pause-size-action{grid-row:2;grid-column:1/-1;justify-self:start;min-width:0;padding:8px 12px}.world-ready #world-panel.game-menu--phone [data-menu-action=destinations]{grid-column:1/-1;flex-direction:row;justify-content:flex-start;min-height:64px;padding:10px;background:#214b54;text-align:left}.world-ready #world-panel.game-menu--phone [data-menu-action=destinations] .pause-description{position:static;width:auto;height:auto;clip-path:none;white-space:normal;font-size:13px;margin-top:4px}.world-ready #world-panel.game-menu--phone [data-menu-action=destinations] .pause-copy{display:block}.world-ready #world-panel.game-menu--phone [data-menu-action=destinations] .pause-copy strong{font-size:16px}
.start-location-picker h2{font-family:system-ui,sans-serif;font-weight:750;line-height:1.25}

.school-screen-toolbar{display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding:8px max(16px,env(safe-area-inset-right)) 8px max(16px,env(safe-area-inset-left));background:#142b29;color:#f5f2e9;border-bottom:1px solid #66877b;position:relative;z-index:20}
.school-screen-toolbar button{font:600 16px/1.3 system-ui,sans-serif;min-width:44px;min-height:44px;padding:10px 14px;border:1px solid #abcbbb;border-radius:8px;color:#f5f2e9;background:#244b3e;cursor:pointer}
.school-screen-toolbar button:focus-visible{outline:3px solid #ffe1a1;outline-offset:3px}
.school-screen-toolbar [role=status]{font:14px/1.4 system-ui,sans-serif;max-width:48em}
body.school-screen-expanded{box-sizing:border-box;width:100%;max-width:none;height:100vh;height:100svh;height:100dvh;overflow:auto;overscroll-behavior:contain;padding-bottom:env(safe-area-inset-bottom);background:#efe8db}
body.school-screen-expanded[data-school-screen-mode=window]{position:fixed;inset:0;z-index:1000;margin:0}
body.school-screen-expanded .school-screen-toolbar{position:sticky;top:0;padding-top:max(8px,env(safe-area-inset-top))}
body.school-screen-expanded main{min-width:0;overflow-wrap:anywhere}
@media print{.school-screen-toolbar{display:none!important}body.school-screen-expanded{position:static!important;height:auto!important;overflow:visible!important}}

/* Prototype layout only; native/full-window semantics remain the reviewed helper. */
body.school-screen-expanded header{display:none}body.school-screen-expanded main{max-width:none;padding:8px}body.school-screen-expanded nav{margin-bottom:8px}

/* Gameplay action stays beside Walk, not inside the hidden Settings panel. */
.scene-toolbar #fullscreen-slot{display:inline-flex;flex:0 0 auto}
.scene-toolbar .school-screen-toolbar{padding:0;border:0;background:transparent;gap:0;position:static}
.scene-toolbar .school-screen-toolbar button{min-height:44px;background:#244b3e;color:#fff;border:2px solid #557c65;font-weight:700}
.scene-toolbar .school-screen-toolbar [role=status]{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.control-overview details{border:1px solid #8b9b8f;border-radius:8px;padding:8px;margin:8px 0;background:#fffdf7;color:#172d24}.control-overview summary{cursor:pointer;font-weight:700;min-height:32px}.control-overview p{line-height:1.5}

/* Handheld presentation is opt-in on desktop, default on phones. Native DOM controls,
   not a screenshot: all control geometry is owned by layoutHandheldControls(). */
.handheld-bar,.handheld-deck{display:none}
.handheld-settings{background:#f5f0e9;color:#292337;width:100%;min-width:0;margin:8px 0;padding:10px;border:1px solid #b8afc4;border-radius:10px}
.handheld-settings legend{font-weight:650;font-size:14px}.handheld-settings label{display:inline-flex;flex-wrap:wrap;gap:6px;align-items:center;min-height:44px;margin:3px 10px 3px 0;font-size:13px}
.handheld-settings select{font:inherit;min-height:44px;max-width:100%;border:1px solid #93859e;border-radius:7px;background:#fffaf0;color:#292337;padding:7px}
.handheld-settings input{width:24px;height:24px}.handheld-settings p{font-size:12px;line-height:1.5;margin:6px 0;color:#51495b}
#world-shell[data-handheld-skin=handheld]{--handheld-shell:#167b83;--handheld-shell-edge:#0b4e55;--handheld-stick:#0b4e55;--handheld-shell-ink:#fff;--handheld-key:#28272e;--handheld-key-ink:#fff;--handheld-a:var(--handheld-shell-edge);--handheld-b:var(--handheld-stick)}
.world-ready #world-shell[data-handheld-skin=handheld][data-handheld-class=false]{padding:max(8px,env(safe-area-inset-top)) max(8px,env(safe-area-inset-right)) max(8px,env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left));background:var(--handheld-shell)}
.world-ready #world-shell[data-handheld-skin=handheld][data-handheld-class=false] #interactive{inset:auto;top:calc(max(8px,env(safe-area-inset-top)) + 48px);left:calc(max(8px,env(safe-area-inset-left)) + 6px);right:calc(max(8px,env(safe-area-inset-right)) + 6px);bottom:calc(max(8px,env(safe-area-inset-bottom)) + var(--handheld-deck-height,280px));height:auto;width:auto;border:5px solid #24212b;border-radius:18px 18px 24px 24px;box-shadow:0 2px 0 #ffffff45;overflow:hidden}
.world-ready #world-shell[data-handheld-skin=handheld][data-handheld-class=false] .handheld-bar{position:absolute;top:max(8px,env(safe-area-inset-top));left:max(8px,env(safe-area-inset-left));right:max(8px,env(safe-area-inset-right));height:48px;display:flex;align-items:center;gap:4px;padding:2px 6px;color:var(--handheld-shell-ink);z-index:5}
.handheld-brand{font-size:11px;letter-spacing:.12em;margin-right:auto;white-space:nowrap}.handheld-bar button{min-height:44px;min-width:44px;padding:7px 10px;border:1px solid #ffffff70;border-radius:9px;background:#28272e;color:#fff;font-size:12px;white-space:nowrap}.handheld-bar button:hover{background:#3c3e44}.handheld-bar button:focus-visible{outline:3px solid #fff1ab;outline-offset:-3px}
.world-ready #world-shell[data-handheld-skin=handheld][data-handheld-class=false] .handheld-deck{position:absolute;left:max(8px,env(safe-area-inset-left));right:max(8px,env(safe-area-inset-right));bottom:max(8px,env(safe-area-inset-bottom));display:block;background:var(--handheld-shell);color:var(--handheld-shell-ink);border-radius:14px 14px 24px 24px;box-shadow:inset 0 2px 2px #ffffff35,inset 0 -3px 3px #0003;z-index:2;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}
.handheld-deck .handheld-control,.handheld-deck .handheld-stick,.handheld-deck .handheld-zoom-slot{position:absolute;margin:0;min-width:44px;min-height:44px;touch-action:none;user-select:none;-webkit-user-select:none;box-sizing:border-box}
.handheld-deck .handheld-control{border:2px solid #16151c;border-radius:10px;padding:2px;background:var(--handheld-key);color:var(--handheld-key-ink);box-shadow:inset 0 2px 1px #ffffff40,0 3px 0 #19151e;line-height:1.1;font-size:10px;font-weight:650;white-space:pre-line}
.handheld-deck .handheld-control:hover{background:#3c3a44}.handheld-deck .handheld-control:active,.handheld-deck .handheld-control.is-held{box-shadow:inset 0 2px 3px #0009;filter:brightness(1.18)}
.handheld-deck .handheld-control:disabled{opacity:.45}.handheld-deck .handheld-control:focus-visible{outline:3px solid #fff1ab;outline-offset:1px;z-index:2}
.handheld-deck [data-handheld-action=interact],.handheld-deck [data-handheld-action=back]{border-radius:50%;font-size:26px;font-weight:600;background:var(--handheld-a)}
.handheld-deck [data-handheld-action=back]{background:var(--handheld-b)}
.handheld-deck [data-handheld-action=jump]{font-size:11px;background:#f3ecd9;color:#252331;border-color:#51465e}
.handheld-deck [data-handheld-action=camera],.handheld-deck [data-handheld-action=menu]{font-size:10px;border-radius:18px;font-weight:600}
.handheld-stick{border:2px solid #211c2e;border-radius:50%;background:var(--handheld-stick);box-shadow:inset 0 3px 5px #0006,0 1px 1px #ffffff75;display:flex;align-items:center;justify-content:center;cursor:grab;overflow:hidden}
.handheld-thumb{position:absolute;left:calc(50% - 17px);top:calc(50% - 17px);width:34px;height:34px;border:2px solid #15151c;border-radius:50%;background:#35343c;box-shadow:inset 0 2px 3px #ffffff55,0 2px 4px #0008;pointer-events:none}
.handheld-stick-label{position:absolute;bottom:4px;left:0;right:0;text-align:center;font-size:9px;font-weight:750;letter-spacing:.04em;color:#fff;pointer-events:none}.handheld-stick.is-held{cursor:grabbing;border-color:#fff0b3}
/* Longer one-hand captions need room above the circle's narrow lower edge.
   Keep the existing hit target, thumb travel and paired MOVE/LOOK labels intact. */
#world-shell[data-handheld-one-hand=left] [data-handheld-stick=move] .handheld-stick-label,
#world-shell[data-handheld-one-hand=right] [data-handheld-stick=move] .handheld-stick-label{left:16px;right:16px;bottom:16px;line-height:1.2}
.world-ready #world-shell[data-handheld-skin=handheld][data-handheld-class=false] #scene-toolbar,
.world-ready #world-shell[data-handheld-skin=handheld][data-handheld-class=false] #movement-controls,
.world-ready #world-shell[data-handheld-skin=handheld][data-handheld-class=false] .floating-stick,
.world-ready #world-shell[data-handheld-skin=handheld][data-handheld-class=false] .door-action>button{display:none!important}
.world-ready #world-shell[data-handheld-skin=handheld][data-handheld-class=false] .scene-label{top:6px;left:6px;right:6px;font-size:10px}
.world-ready #world-shell[data-handheld-skin=handheld][data-handheld-class=false] .door-action{left:calc(max(8px,env(safe-area-inset-left)) + 18px);right:calc(max(8px,env(safe-area-inset-right)) + 18px);bottom:calc(max(8px,env(safe-area-inset-bottom)) + var(--handheld-deck-height,280px) + 12px);max-width:none;text-align:center;pointer-events:none}
.world-ready #world-shell[data-handheld-skin=handheld][data-handheld-class=false] .door-action p:not(:empty){display:inline-block;max-width:100%;margin:0;padding:4px 8px;border-radius:6px;background:#17242bd9;color:#fff;font-size:11px;text-shadow:none}
.world-ready #world-shell[data-handheld-skin=handheld][data-handheld-class=false] #bench-hud,
.world-ready #world-shell[data-handheld-skin=handheld][data-handheld-class=false] #recreation-hud{bottom:calc(max(8px,env(safe-area-inset-bottom)) + var(--handheld-deck-height,280px) + 42px);max-width:calc(100% - 32px);left:16px;right:16px}
.world-ready #world-shell[data-handheld-skin=handheld][data-handheld-class=false] #map-picker{bottom:calc(max(8px,env(safe-area-inset-bottom)) + var(--handheld-deck-height,280px) + 12px)}
.world-ready #world-shell[data-handheld-skin=handheld][data-handheld-class=false] .world-panel{top:calc(max(8px,env(safe-area-inset-top)) + 54px);bottom:max(8px,max(8px,env(safe-area-inset-bottom)));z-index:10}
/* CLASS is the existing reader stretched to the full viewport. No reparenting,
   audio stop/restart, lesson reset, notebook mount, avatar rebuild or storage. */
.world-ready #world-shell[data-handheld-skin=handheld][data-handheld-class=true] #view-bird,
.world-ready #world-shell[data-handheld-skin=handheld][data-handheld-class=true] #view-ground,
.world-ready #world-shell[data-handheld-skin=handheld][data-handheld-class=true] .world-brand,
.world-ready #world-shell[data-handheld-skin=handheld][data-handheld-class=true] #class-desk,
.world-ready #world-shell[data-handheld-skin=handheld][data-handheld-class=true] #exit-school,
.world-ready #world-shell[data-handheld-skin=handheld][data-handheld-class=true] #my-student{display:none}
@media(prefers-reduced-motion:reduce){.handheld-deck *{transition:none;animation:none}}
.handheld-face-symbol,.handheld-face-label{display:block;pointer-events:none}.handheld-face-symbol{font-size:23px;line-height:1}.handheld-face-label{font-size:9px;line-height:1.2;margin-top:2px;font-weight:650}

/* Practice reset/options live in Menu → Recreation. Handheld score uses its
   existing top bar and A is Kick/Shoot: the old scene card is not faded. */
.world-ready #world-shell[data-handheld-skin=handheld] #recreation-hud{display:none!important}
.handheld-bar .handheld-brand[role=status]{font-size:10px;letter-spacing:0;white-space:normal;line-height:1.2;max-width:90px}
/* Classic retains an explicit touch Kick in a reserved footer OUTSIDE its canvas. */
.world-ready #world-shell[data-handheld-skin=classic][data-practice-visible=true] #interactive{bottom:calc(48px + max(8px,env(safe-area-inset-bottom)));height:auto}
.world-ready #world-shell[data-handheld-skin=classic] #recreation-hud{left:0;right:0;bottom:0;width:auto;max-width:none;min-height:48px;padding:2px 8px max(2px,max(8px,env(safe-area-inset-bottom)));display:flex;align-items:center;gap:8px;border-radius:0;background:#172b29;color:#f1f5ed}
.world-ready #world-shell[data-handheld-skin=classic] #recreation-status{flex:1;margin:0;font-size:11px;line-height:1.25}
.world-ready #world-shell[data-handheld-skin=classic] #recreation-strike{width:auto;min-width:100px;margin:0;min-height:44px}
.world-ready #world-shell[data-handheld-skin=classic][data-practice-visible=true] #movement-controls{bottom:calc(64px + max(8px,env(safe-area-inset-bottom)))}
.world-ready #world-shell[data-handheld-skin=classic][data-practice-visible=true] .door-action{bottom:calc(64px + max(8px,env(safe-area-inset-bottom)))}

/* Three physical face labels plus one plain touch-only Sprint toggle.
   No new physical-pad mapping; Start continues to own the Menu shortcut. */
#world-shell[data-handheld-face=playstation] .handheld-deck :is([data-handheld-action=jump],[data-handheld-action=interact],[data-handheld-action=back]){border-radius:50%;background:#28272e;color:#fff;border-color:#16151c;padding:2px;white-space:normal}
#world-shell[data-handheld-face=playstation] .handheld-face-symbol{font:600 24px/1 system-ui,sans-serif}
#world-shell[data-handheld-face=playstation] [data-handheld-action=jump] .handheld-face-symbol{color:#a9d3ff}
#world-shell[data-handheld-face=playstation] [data-handheld-action=interact] .handheld-face-symbol{color:#ffb4df}
#world-shell[data-handheld-face=playstation] [data-handheld-action=back] .handheld-face-symbol{color:#ffb8ae}
#world-shell[data-handheld-face=playstation] .handheld-face-label{font-size:8px;line-height:1.1;margin-top:1px;color:#fff}
#world-shell[data-handheld-face=ab] [data-handheld-action=jump] .handheld-face-symbol{font-size:11px;line-height:1.1}

/* Keep five header items inside the narrow 280px shell without shrinking targets. */
@media(max-width:420px){.handheld-bar{gap:2px!important;padding-inline:4px!important}.handheld-bar button{padding-inline:4px}.handheld-bar .handheld-brand{min-width:0;overflow:hidden;text-overflow:ellipsis;letter-spacing:0;font-size:9px}}
.handheld-bar [data-handheld-run][aria-pressed=true]{background:#fff1ab;color:#231d32;border-color:#231d32}

/* The deck is gameplay-only. Empty gaps must not start page pan or text selection. */
.handheld-deck{touch-action:none;overscroll-behavior:contain}
.handheld-bar{touch-action:manipulation;-webkit-touch-callout:none;user-select:none;-webkit-user-select:none}

/* Selected mode is explicit text as well as colour; MOVE still owns travel. */
.handheld-bar [data-handheld-run]{white-space:pre-line;line-height:1.1}
.handheld-deck [data-handheld-action=sprint]{font-size:10px;white-space:pre-line}
.handheld-deck [data-handheld-action=sprint][aria-pressed=true]{background:#fff1ab;color:#231d32;border-color:#231d32}

/* Keep the existing one-tap Phone targets distinct without enlarging the narrow bar. */
.world-ready #world-shell .handheld-bar [data-phone-open],
.world-ready #world-shell .handheld-deck [data-handheld-action=menu]{background:#bcefe2;color:#123a3c;border:2px solid #83d9c9;font-weight:800}
.world-ready #world-shell .handheld-deck [data-handheld-action=menu]{font-size:12px;letter-spacing:.04em}
.world-ready #world-shell .handheld-bar [data-phone-open]:hover,
.world-ready #world-shell .handheld-deck [data-handheld-action=menu]:hover{background:#dcfff3;color:#123a3c}

/* Scoped progressive enhancement; native controls remain usable without this file. */
.library-reading-index{color:#253f35;background:#f5eddd;padding:clamp(12px,3vw,24px);border:1px solid #8d795d;border-radius:12px;overflow:auto;max-height:80dvh;overflow-wrap:anywhere;line-height:1.5}
.library-reading-index[hidden],.library-reading-index [hidden]{display:none!important}
.library-reading-index button{font:inherit;text-align:left;min-height:44px;max-width:100%;padding:10px 12px;border:1px solid #857054;border-radius:7px;color:#244437;background:#fffaf0;cursor:pointer;overflow-wrap:anywhere;white-space:normal}
.library-reading-index button[aria-pressed=true]{background:#244c40;color:#fff7e7;border-color:#244c40}
.library-reading-index button:disabled{opacity:.55;cursor:default}
.library-reading-index :focus-visible{outline:3px solid #8c410b;outline-offset:3px}
.library-reading-index input[type=search]{box-sizing:border-box;display:block;width:100%;min-height:44px;padding:10px;font:inherit;background:#fffdf6;color:#253f35;border:1px solid #857054;border-radius:7px}
.library-categories,.library-room-actions{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0}
.library-room-actions h3{flex-basis:100%;margin-bottom:0}
.library-index-columns{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.35fr);gap:20px}
.library-index-columns section{min-width:0}
.library-index-columns button{display:block;width:100%;margin:7px 0}
.library-index-columns ol{padding-left:1.6em}
@media(max-width:620px){.library-index-columns{grid-template-columns:minmax(0,1fr)}.library-reading-index{max-height:85dvh}.library-categories button{flex:1 1 42%}}

/* Scoped Library peer surface. Native controls also work without WebGL. */
.library-pane{position:fixed;z-index:40;inset:max(12px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) auto auto;box-sizing:border-box;width:min(54rem,calc(100vw - 24px));max-height:calc(100dvh - 24px - env(safe-area-inset-bottom));overflow:auto;background:#f5eddd;color:#253f35;border:2px solid #857054;border-radius:12px;padding:12px;box-shadow:0 10px 40px #0005;line-height:1.5;overflow-wrap:anywhere;overscroll-behavior:contain}
.library-pane[hidden],.library-pane [hidden]{display:none!important}
.library-pane button,.library-pane a{font:inherit;min-height:44px;max-width:100%;white-space:normal;overflow-wrap:anywhere}
.library-pane button{padding:8px 12px;border:1px solid #857054;border-radius:7px;background:#fffaf0;color:#244437;cursor:pointer}
.library-pane button:disabled{opacity:.55;cursor:default}
.library-pane a{color:#244c40;display:inline-flex;align-items:center;margin:6px 12px 6px 0;text-decoration:underline}
.library-pane :focus-visible{outline:3px solid #8c410b;outline-offset:2px}
.library-service-actions,.library-reader-toolbar,.library-section-links{display:flex;gap:8px;flex-wrap:wrap}
.library-reader-toolbar{position:sticky;top:0;z-index:1;background:#f5eddd;padding:8px 0}
.library-pane h2{font-size:1.35rem;margin:12px 0}.library-pane h3{font-size:1.1rem}
.library-reader-content{max-height:48dvh;min-height:6rem;overflow:auto;overscroll-behavior:contain;padding:0 12px;border:1px solid #c8b894;border-radius:8px;background:#fffaf0}
.library-reader-content p{white-space:pre-wrap}.library-reader-content section{scroll-margin-top:10px}
.library-section-links{margin:12px 0}.library-section-links button{flex:1 1 30%;text-align:left}
.library-pane .library-reading-index{max-height:none;overflow:visible;padding:8px;border:0}
@media(max-width:620px){.library-section-links button{flex-basis:45%}.library-pane{inset:max(8px,env(safe-area-inset-top)) 8px auto;width:calc(100vw - 16px);max-height:calc(100dvh - 16px - env(safe-area-inset-bottom));padding:8px}}
@media(max-height:430px){.library-reader-content{max-height:40dvh}.library-pane{max-height:calc(100dvh - 16px)}}

.registrar-pane{position:fixed;z-index:45;inset:max(12px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) auto auto;width:min(58rem,calc(100vw - 24px));box-sizing:border-box;max-height:calc(100dvh - 24px - env(safe-area-inset-bottom));overflow:auto;padding:16px;border:2px solid #45614e;border-radius:12px;background:#f2eee2;color:#173d30;line-height:1.5;overflow-wrap:anywhere;box-shadow:0 10px 40px #0005;overscroll-behavior:contain}
.registrar-pane[hidden],.registrar-pane [hidden]{display:none!important}
.registrar-pane button{font:inherit;min-height:44px;padding:8px 12px;margin:4px;border:1px solid #45614e;border-radius:7px;color:#173d30;background:#fffaf0;white-space:normal;max-width:100%;cursor:pointer}
.registrar-pane button[aria-pressed=true]{background:#244c40;color:#fff7e7}.registrar-pane button:disabled{opacity:.55;cursor:default}
.registrar-pane :focus-visible{outline:3px solid #8c410b;outline-offset:2px}
.registrar-pane a{color:#244c40;display:inline-flex;align-items:center;min-height:44px;margin:4px 12px 4px 0;text-decoration:underline}
.registrar-pane input{display:block;box-sizing:border-box;width:100%;min-height:44px;padding:8px;font:inherit;color:#173d30;background:#fffaf0;border:1px solid #45614e}
.registrar-toolbar{position:sticky;top:0;z-index:1;display:flex;gap:8px;flex-wrap:wrap;background:#f2eee2}
.registrar-content{max-height:53dvh;overflow:auto;overscroll-behavior:contain;padding:8px 4px}
.registrar-pane article{border-top:1px solid #b8ac93;padding:12px 0}.registrar-pane h2{font-size:1.4rem}.registrar-pane h3{font-size:1.15rem}.registrar-pane h4{margin-bottom:4px}
.registrar-pane summary{padding:10px 0;cursor:pointer;min-height:44px;box-sizing:border-box}
.registrar-pane table{table-layout:fixed;width:100%;border-collapse:collapse;font-size:.94rem}.registrar-pane td,.registrar-pane th{border:1px solid #b8ac93;padding:8px;vertical-align:top;text-align:left}.registrar-pane th:first-child{width:18%}.registrar-pane td ul{padding-left:1.2em}.registrar-pane caption{text-align:left;padding:8px 0;font-weight:600}
@media(max-width:620px){.registrar-pane{inset:max(8px,env(safe-area-inset-top)) 8px auto;width:calc(100vw - 16px);padding:10px}.registrar-pane td,.registrar-pane th{padding:5px;font-size:.88rem}}

/* The searchable directory owns one scroll region; opening it is explicit. */
.registrar-pane{display:flex;flex-direction:column;overflow:hidden}.registrar-pane>h2{margin:8px 0}.registrar-pane>p{margin:4px 0 12px;font-size:.94rem}.registrar-content{min-height:0;max-height:none;flex:1 1 auto;overflow-y:auto}.registrar-discovery-filters{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:10px 0}.registrar-discovery-filters label{min-width:0}.registrar-pane select{display:block;width:100%;max-width:100%;min-height:44px;box-sizing:border-box;padding:8px;font:inherit;color:#173d30;background:#fffaf0;border:1px solid #45614e}.registrar-discovery-filters button{justify-self:start;margin:0}.registrar-pane [data-official-discovery]{border:1px solid #b8ac93;border-radius:8px;padding:10px;margin:12px 0}.registrar-pane [data-official-discovery] h3{margin:0}.registrar-pane [data-official-discovery] p{font-size:.9rem;margin:6px 0}.registrar-pane [data-official-discovery] nav{display:flex;flex-wrap:wrap;gap:4px 12px}.registrar-pane [data-official-discovery] a{margin:0;font-weight:600}.registrar-pane [data-dal-reference]{border-top:1px solid #b8ac93;padding:2px 0}.registrar-pane [data-dal-reference]>summary{font-weight:600}.registrar-pane [data-dal-reference]>summary span{display:block;font-size:.85rem;font-weight:400}.registrar-pane [data-dal-reference] ul{padding-left:20px}.registrar-pane [data-discovery-planning]{margin-top:20px;border-top:1px solid #b8ac93}@media(max-width:420px){.registrar-discovery-filters{grid-template-columns:1fr}.registrar-pane{max-height:calc(100dvh - 16px - env(safe-area-inset-bottom))}}

.people-pane[hidden],.people-pane [hidden]{display:none!important}
.people-pane{position:fixed;z-index:60;inset:max(.5rem,env(safe-area-inset-top)) max(.5rem,env(safe-area-inset-right)) max(.5rem,env(safe-area-inset-bottom)) max(.5rem,env(safe-area-inset-left));box-sizing:border-box;max-width:52rem;margin:auto;display:flex;flex-direction:column;gap:.4rem;padding:clamp(.6rem,2vw,1.2rem);border:2px solid #49674e;border-radius:1rem;background:#f8f3e6;color:#152e24;box-shadow:0 .6rem 3rem #001a18aa;font:1rem/1.5 system-ui,sans-serif;overflow:hidden;overscroll-behavior:contain}
.people-toolbar,.people-choices{display:flex;flex-wrap:wrap;gap:.45rem}.people-toolbar{flex-shrink:0}
.people-pane h2,.people-pane p{margin:.25rem 0}.people-pane h2{font-size:1.2rem;line-height:1.3}.people-pane h3{font-size:1.15rem}.people-pane h4{font-size:1rem}
.people-pane button,.people-pane input,.people-pane a{font:inherit;min-height:44px;max-width:100%;box-sizing:border-box;overflow-wrap:anywhere}
.people-pane button{background:#fffdf6;border:1px solid #52715b;border-radius:.5rem;padding:.5rem .7rem;color:#153e2c;text-align:left;cursor:pointer}
.people-pane button:disabled{color:#62675e;background:#e9e8df;cursor:default;border-style:dashed}
.people-pane :focus-visible{outline:3px solid #145ab8;outline-offset:2px}.people-pane a{display:inline-block;color:#084a99;padding:.4rem;margin-right:.4rem;text-decoration:underline}
.people-pane input{width:100%;border:1px solid #52715b;background:white;color:#142c23;padding:.5rem;border-radius:.3rem}.people-pane label{display:block;margin:.5rem 0}
.people-content{min-height:0;flex:1;overflow:auto;overscroll-behavior:contain;padding:.4rem .6rem .8rem .2rem;overflow-wrap:anywhere;scrollbar-gutter:stable}.people-content button{margin:.2rem}.people-content [data-people-results]{display:grid;gap:.3rem}.people-content dl{display:grid;grid-template-columns:minmax(4rem,1fr) minmax(0,3fr);gap:.3rem}.people-content dd{margin:0;overflow-wrap:anywhere}.people-content dt{font-weight:700}.people-status:empty{display:none}.people-status{font-weight:600;flex-shrink:0}
.people-pane>div:last-child:not([hidden]){min-height:0;flex:1;overflow:auto}.people-pane .library-reader{max-height:none}.people-pane .library-reader-content{max-height:50vh;min-height:4rem}
@media(max-height:480px){.people-pane{gap:.15rem;padding:.4rem}.people-pane>h2{font-size:1rem}.people-pane>p:not(.people-status){font-size:.8rem;margin:0}.people-toolbar{gap:.2rem}.people-toolbar button{padding:.2rem .5rem}.people-pane .library-reader-content{max-height:35vh}}
@media(prefers-reduced-motion:reduce){.people-pane *{scroll-behavior:auto!important;transition:none!important;animation:none!important}}
@media(forced-colors:active){.people-pane{border:2px solid CanvasText}.people-pane button{border:1px solid ButtonText}}

.destination-map[hidden]{display:none!important}.destination-map{position:fixed;inset:0;z-index:145;box-sizing:border-box;background:#152a25;color:#f7edd5;font:16px/1.45 system-ui,sans-serif;padding:max(10px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) max(10px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left));overflow:auto;overscroll-behavior:contain;color-scheme:dark}
.destination-map *{box-sizing:border-box}.destination-map header{display:flex;align-items:center;justify-content:space-between;gap:12px;position:sticky;top:-1px;background:#152a25;z-index:1;padding:4px 0}.destination-map h2{font-size:1.15rem;margin:0}.destination-map h3{font-size:1.05rem}.destination-map p{margin:.5em 0}.destination-map button,.destination-map input,.destination-map select{font:inherit;max-width:100%;color:#f7edd5;background:#29443a;border:1px solid #acaa8b;border-radius:5px;padding:9px 12px;min-height:44px;overflow-wrap:normal;word-break:normal;hyphens:none}.destination-map button{cursor:pointer;white-space:normal;text-align:left}.destination-map button:disabled{opacity:.65;cursor:default}.destination-map :focus-visible{outline:3px solid #ffda75;outline-offset:2px}.destination-map [aria-pressed=true]{background:#75602b;border-color:#ffe095}
.map-layout{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(270px,1fr);gap:14px}.map-controls{display:flex;flex-wrap:wrap;gap:6px;align-items:center}.map-controls button{padding:7px 10px}.map-viewport{height:clamp(240px,52vh,620px);background:#e7eadf;border:2px solid #b6bd9c;border-radius:7px;margin-top:10px;overflow:hidden;touch-action:none;user-select:none}.map-viewport svg{display:block;pointer-events:none}.map-viewport>p{color:#152a25;padding:12px}.map-side{min-width:0}.map-side label{display:block;margin-bottom:8px}.map-side input,.map-side select{display:block;width:100%}.map-results{display:grid;gap:5px;max-height:32vh;overflow:auto;padding:4px;overscroll-behavior:contain}.map-card{border-top:1px solid #9ba78b;margin-top:10px;padding-top:4px;overflow-wrap:anywhere}.map-card dl{display:grid;grid-template-columns:auto minmax(0,1fr);gap:4px 12px}.map-card dt{font-weight:700}.map-card dd{margin:0}.map-card ul{padding-left:22px}.map-instructions,.map-legend{font-size:.875rem}.map-status{min-height:1.45em}.map-zoom{font-variant-numeric:tabular-nums}.map-building{fill:#d4c6a0;stroke:#3e4f3b;stroke-width:1}.map-lawn{fill:#9caf85}.map-street{fill:#687874}.map-paving{fill:#e0d5b6}.map-label{fill:#11261e;stroke:#fff7db;stroke-width:3px;paint-order:stroke;stroke-linejoin:round;font:bold 13px system-ui,sans-serif;text-anchor:middle}.map-entrance{fill:#213e37;stroke:#fff2c8;stroke-width:1}.map-target{fill:#ffda75;stroke:#30280e;stroke-width:2}.map-student{fill:#1b58b1;stroke:white;stroke-width:2}.map-proxy{stroke-dasharray:3 2}
@media(max-width:700px){.map-layout{grid-template-columns:1fr}.map-viewport{height:clamp(280px,52vh,560px);height:clamp(280px,52svh,560px)}.map-results{max-height:230px}.map-controls button{font-size:.9rem}}
@media(max-height:480px){.map-viewport{height:220px}.map-instructions,.map-legend{font-size:.8rem}.map-results{max-height:180px}.destination-map{padding-top:6px}}
@media(prefers-reduced-motion:reduce){.destination-map,.destination-map *{scroll-behavior:auto!important;animation:none!important;transition:none!important}}
@media(forced-colors:active){.map-building{fill:Canvas;stroke:CanvasText}.map-label{fill:CanvasText;stroke:Canvas}.map-student{fill:Highlight;stroke:CanvasText}.map-target{fill:Mark;stroke:CanvasText}.map-entrance{fill:CanvasText;stroke:Canvas}}

#map-picker.campus-destination-picker{flex-wrap:wrap;justify-content:center}#map-picker.campus-destination-picker [data-map-entry=overview]{flex:1 0 100%;white-space:normal}
.map-navigation{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}.map-navigation [data-map-action=waterfront]{background:#a34b13;border-color:#ffcf85;font-weight:700}.map-location{font-weight:700}.map-student-heading{fill:#1556b5;stroke:#fff;stroke-width:2;stroke-linejoin:round}.map-route-outline{stroke:#382309;stroke-width:7;stroke-linejoin:round;stroke-linecap:round}.map-waterfront-route{stroke:#ffb34f;stroke-width:4;stroke-linejoin:round;stroke-linecap:round}.map-checked-connector{stroke:#1764c4;stroke-width:4;stroke-dasharray:6 4}.map-waypoint{fill:#e5a1df;stroke:#492344}.map-compass{font:bold 14px system-ui,sans-serif;fill:#162e23;stroke:#fff7db;stroke-width:3;paint-order:stroke}.map-viewport[data-marking=true]{cursor:crosshair;border-color:#ffe095}.map-card[data-guidance=unavailable]{border-color:#ffc578}.map-card[data-guidance=ready]{border-color:#92d3b1}
@media(forced-colors:active){.map-waterfront-route,.map-checked-connector{stroke:Highlight}.map-route-outline{stroke:CanvasText}.map-student-heading{fill:Highlight;stroke:Canvas}.map-waypoint{fill:Mark;stroke:CanvasText}.map-compass{fill:CanvasText;stroke:Canvas}}

/* Orientation context is not an available walking route. */
.map-context-road-casing{stroke:#89968b;stroke-width:7;stroke-linecap:round;stroke-linejoin:round}.map-context-road{stroke:#fffdf4;stroke-width:4;stroke-linecap:round;stroke-linejoin:round}.map-context-label{fill:#35424a;font-size:12px;font-weight:600}.map-scale-bar{stroke:#11261e;stroke-width:2}.map-scale-label{font-size:11px}
@media(forced-colors:active){.map-context-road-casing,.map-scale-bar{stroke:CanvasText}.map-context-road{stroke:Canvas}.map-context-label{fill:CanvasText;stroke:Canvas}}

.destination-map [data-map-action=resume]{background:#ffda75;color:#152a25;font-weight:700;border-color:#ffda75}.map-card [data-map-action=resume]{width:100%}

.map-central-support{stroke:#24483c;stroke-width:3;stroke-linecap:round}.map-selected-central-route{stroke:#ffb34f;stroke-width:4;stroke-linejoin:round;stroke-linecap:round}@media(forced-colors:active){.map-central-support{stroke:CanvasText}.map-selected-central-route{stroke:Highlight}}

.map-city-building-context{fill:#c4ccbd;stroke:#8a9685;stroke-width:.65;pointer-events:none}.map-city-context{pointer-events:none}.map-context-status{font-size:.85rem;color:#dfdec8}@media(forced-colors:active){.map-city-building-context{fill:Canvas;stroke:GrayText}}

/* Map-first native composition: preserve actions, disclose secondary controls. */
.map-header-actions{display:flex;gap:6px;align-items:center}.map-header-actions button{font-size:.9rem;padding:7px 10px}.destination-map header h2{white-space:nowrap}
.map-visual{min-width:0}.map-primary-controls{display:grid;gap:8px;min-width:0}.map-primary-controls button{padding:9px 10px;text-align:left;min-width:0;line-height:1.3}
.map-title>span{display:block;font-size:.65rem;letter-spacing:.16em;color:#b4d4c8;font-weight:700}.map-title h2{font:700 1.15rem/1.3 system-ui,sans-serif}.map-view-controls{display:flex;gap:10px;align-items:stretch}.map-view-controls>[data-map-action=me]{display:flex;align-items:center;gap:9px;flex:1;background:#e7efdf;color:#163c32;border-color:#d0dfc4}.map-action-copy{display:block;min-width:0}.map-action-copy strong{display:block;font-size:.94rem;font-weight:700}.map-action-copy>span{display:block;font-size:.75rem;font-weight:400;margin-top:3px;line-height:1.35}.map-action-icon{font-size:1.5rem;line-height:1;flex:0 0 22px;text-align:center}
.map-zoom-controls{flex:0 0 auto;align-self:center}.map-zoom-controls>span{display:block;text-align:center;font-size:.7rem;color:#d9e6db;margin-bottom:3px}.map-zoom-buttons{display:flex;gap:6px}.map-primary-controls .map-zoom-buttons button{width:44px;padding:7px 4px;text-align:center;font-size:1.4rem;line-height:1;background:#203a32;border-color:#718f7c}
.map-browse-controls{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.map-browse-controls button{display:flex;align-items:center;gap:8px;background:#23463f;border-color:#5b8271}.map-browse-controls .map-action-icon{color:#b7dbce}.map-browse-controls .map-action-copy>span{color:#d1e0d6}
.map-quick-destinations{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.map-primary-controls .map-quick-destinations button{background:#f2ecdc;color:#253c32;border-color:#c6c5a4;border-left:4px solid #a9b98f;min-height:44px;overflow-wrap:normal;word-break:normal;hyphens:none}.map-quick-destinations .map-action-copy>span{color:#4f6253}.map-primary-controls .map-quick-places{margin:0;border-color:#5f7e6d;background:#1b352e}.map-quick-places>p{font-size:.8rem;color:#d1e0d6}.map-travel-help{font-size:.8rem;color:#d1e0d6;line-height:1.45}.map-route-disclosure{margin-top:14px}
.destination-map [hidden]{display:none!important}
.map-disclosure{margin:8px 0;border:1px solid #809383;border-radius:6px}.map-disclosure>summary{min-height:44px;padding:10px 12px;cursor:pointer;font-weight:650}.map-disclosure[open]{padding:0 10px 10px}.map-disclosure[open]>summary{margin:0 -10px 8px}.map-disclosure .map-controls,.map-disclosure .map-navigation{margin:6px 0}
.map-route-choices{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}.map-route-choices [data-map-action=waterfront]{background:#a34b13;border-color:#ffcf85;font-weight:700}.map-route-choices button{font-size:.9rem}.map-side>h3{margin:6px 0 8px}.map-side>.map-card{margin-bottom:16px}.map-coverage-note{font-size:.8rem;color:#dfdec8}.map-visual>.map-status{font-size:.85rem;min-height:0}.map-visual>.map-location{font-size:.85rem}
@media(max-width:700px){.destination-map{padding-left:max(10px,env(safe-area-inset-left));padding-right:max(10px,env(safe-area-inset-right))}.map-layout{gap:10px}.destination-map header{gap:6px}.destination-map header h2{font-size:1.05rem}.map-viewport{margin-top:8px}.map-side{scroll-margin-top:66px}.map-header-actions button{font-size:.8rem}.map-primary-controls{font-size:.9rem}}
@media(max-height:480px){.destination-map .map-viewport{height:clamp(180px,48vh,260px);height:clamp(180px,48svh,260px)}}

/* Shared place keeps a concise card adjacent to the framed map, not a travel action. */
[data-map-shared-summary]{padding:8px 10px;margin:8px 0;border:1px solid #9ba78b;border-radius:7px;font-size:.9rem}
[data-map-shared-summary] h3,[data-map-shared-summary] p{margin:4px 0}
[data-map-shared-summary] button{min-height:44px;margin-top:6px}
.destination-map[data-shared-place=true] .map-viewport{height:clamp(180px,34svh,360px)}
.map-city-building-context.map-context-selected{fill:#ffda75;stroke:#30280e;stroke-width:2}
@media(forced-colors:active){.map-city-building-context.map-context-selected{fill:Mark;stroke:CanvasText}}

/* Explicit travel stays visible at the top of the selected-place card on phones. */
.map-card{scroll-margin-top:76px}.map-instant-action [data-instant-go]{width:100%;min-height:44px;font-weight:700}.map-instant-action [data-instant-go]:not(:disabled){background:#ad9b53;color:#152a25;border-color:#d9cc8b}

/* Keep the header and readable button labels usable on narrow phones and at text zoom. */
.destination-map header{flex-wrap:wrap;border-bottom:1px solid #486354;margin-bottom:10px;padding-bottom:9px;z-index:2}.map-header-actions{flex-wrap:wrap;margin-left:auto}.map-header-actions button{white-space:normal}.map-card{background:#1d382f;border:1px solid #71836a;border-radius:9px;padding:12px}.map-card h3:first-child{margin-top:0}.map-side>h3{font-size:.9rem;color:#c0d9c8}.map-results button{border-color:#526c5b;background:#1d382f}.map-disclosure>summary{list-style-position:outside;margin-left:22px;padding-left:0}.map-disclosure[open]>summary{margin-left:12px}.map-viewport{border-color:#a8bb9b;box-shadow:0 3px 14px #071a1666}.map-title{min-width:0}
@media(max-width:360px){.map-quick-destinations{grid-template-columns:1fr}.map-card,.map-side{scroll-margin-top:130px}.map-header-actions{gap:5px}.map-header-actions button{padding:7px 8px;font-size:.75rem}.map-browse-controls button{gap:5px;padding:9px 8px}.map-browse-controls .map-action-icon{display:none}.map-action-copy strong{font-size:.88rem}.map-action-copy>span{font-size:.73rem}}
@media(forced-colors:active){.map-primary-controls button,.map-card,.map-quick-places{border-color:ButtonText}.map-primary-controls button{color:ButtonText;background:ButtonFace}.map-action-copy>span,.map-title>span,.map-side>h3,.map-travel-help{color:CanvasText}.map-viewport{box-shadow:none}}

/* Browse first without summoning the mobile keyboard; explicit search dismisses it. */
.map-search-form{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:end;gap:8px;margin-bottom:8px}.map-search-form label{margin:0}.map-search-form button{padding:9px 10px}.map-side>h3,.map-results{scroll-margin-top:76px}.map-results:focus-visible{outline:3px solid #ffda75;outline-offset:2px}
@media(max-width:360px){.map-search-form{grid-template-columns:minmax(0,1fr)}.map-search-form button{text-align:center}.map-side>h3,.map-results{scroll-margin-top:130px}}

.map-area-controls{display:grid;gap:8px;margin-top:14px}.map-area-controls label{display:grid;gap:6px;color:#edf4ed}.map-area-controls select{min-height:44px;width:100%;max-width:100%;padding:9px;color:#253c32;background:#f2ecdc;border:1px solid #c6c5a4;border-radius:8px;font:inherit}.map-search-coverage{font-size:.8rem;line-height:1.45;color:#bacec0}

/* Host sets --minimap-top below its measured HUD; attach to the positioned world shell.
   Host must hide this widget for overlays/indoor views and reserve its corner. */
.compact-minimap{--minimap-offset:var(--minimap-top,calc(max(8px,env(safe-area-inset-top)) + var(--hud-height,56px) + 8px));position:absolute;top:var(--minimap-offset);display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:44px minmax(0,1fr) auto;height:min(246px,calc(100% - var(--minimap-offset) - 8px));min-height:112px;right:var(--minimap-right,max(8px,env(safe-area-inset-right)));width:164px;max-width:calc(100% - 16px);box-sizing:border-box;z-index:4;border:1px solid #acaa8b;border-radius:9px;background:#152a25ed;color:#f7edd5;font:11px/1.3 system-ui,sans-serif;overflow:hidden;pointer-events:auto}
.compact-minimap[hidden],.compact-minimap [hidden]{display:none!important}
.compact-minimap-controls{display:flex;justify-content:space-between}
.compact-minimap .compact-minimap-controls button{box-sizing:border-box;min-width:44px;min-height:44px;margin:0;padding:4px 8px;border:0;border-radius:0;background:#29443a;color:#f7edd5;font:600 13px/1 system-ui,sans-serif;cursor:pointer;touch-action:manipulation}
.compact-minimap .compact-minimap-controls button:disabled{opacity:.65;cursor:default}
.compact-minimap button:focus-visible{outline:3px solid #ffda75;outline-offset:-3px}
.compact-minimap svg{display:block;width:100%;height:100%;min-height:0;aspect-ratio:1;background:#e7eadf;pointer-events:none}
.compact-minimap-caption{padding:4px;margin:0;text-align:center;overflow-wrap:anywhere}
.compact-minimap-lawn{fill:#9caf85}.compact-minimap-street{fill:#687874}.compact-minimap-paving{fill:#e0d5b6}.compact-minimap-water{fill:#a6c6d3}.compact-minimap-building{fill:#d4c6a0;stroke:#3e4f3b;stroke-width:.6}
.compact-minimap [data-minimap-player]{fill:#1b58b1;stroke:#fff;stroke-width:1.5}
@media(max-width:600px),(max-height:500px){
 .compact-minimap{width:144px;height:min(226px,calc(100% - var(--minimap-offset) - 8px))}
}
.compact-minimap[data-collapsed="true"]{height:46px;min-height:46px;grid-template-rows:44px}
@media(prefers-reduced-motion:reduce){.compact-minimap,.compact-minimap *{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
@media(forced-colors:active){.compact-minimap{border-color:CanvasText;background:Canvas;color:CanvasText}.compact-minimap [data-minimap-player]{fill:Highlight;stroke:CanvasText}.compact-minimap-building{fill:Canvas;stroke:CanvasText}}

.compact-minimap-title{display:flex;align-items:center;padding:4px 8px;min-height:44px;box-sizing:border-box;font-weight:600;font-size:13px}

/* Readable source context; these lines are not additional walking support. */
.compact-minimap-controls [data-minimap-map]{flex:1;text-align:left;text-decoration:underline;text-underline-offset:3px}
.compact-minimap-location{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:650}
.compact-minimap-caption{min-width:0;padding:5px 6px;font-size:11px;line-height:1.35}
.compact-minimap-road{fill:none;stroke:#87928d;stroke-width:3;stroke-linecap:round;stroke-linejoin:round}
.compact-minimap-paving{stroke:#456456;stroke-width:.65}
.compact-minimap-scale-bar{fill:none;stroke:#17362c;stroke-width:1.5}
.compact-minimap-scale-label{fill:#17362c;stroke:#f6f5ec;stroke-width:3;paint-order:stroke;font:10px system-ui,sans-serif}
@media(forced-colors:active){.compact-minimap-road,.compact-minimap-paving,.compact-minimap-scale-bar{stroke:CanvasText}.compact-minimap-scale-label{fill:CanvasText;stroke:Canvas}}

/* Size changes are presentation only; the host owns the paused full map. */
.compact-minimap{grid-template-rows:44px minmax(0,1fr) auto 44px;height:min(246px,calc(100% - var(--minimap-offset) - 8px))}
.compact-minimap[data-size="larger"]{width:min(260px,42vw);height:min(380px,calc(100% - var(--minimap-offset) - 8px))}
.compact-minimap [data-minimap-reset]{min-height:44px;border:0;border-top:1px solid #acaa8b;background:#29443a;color:#f7edd5;font:600 12px system-ui;touch-action:manipulation}
.compact-minimap[data-collapsed="true"]{height:90px;min-height:90px;grid-template-rows:44px 44px}
@media(max-width:600px),(max-height:500px){.compact-minimap{width:144px;height:min(226px,calc(100% - var(--minimap-offset) - 8px))}.compact-minimap[data-size="larger"]{width:min(210px,44vw);height:min(310px,calc(100% - var(--minimap-offset) - 8px))}}

/* Retain the size-cycle state when a small screen must cap the enlarged plot. */
.compact-minimap[data-fit="compact"]{width:144px;height:min(226px,calc(100% - var(--minimap-offset) - 8px))}
.compact-minimap[data-fit="compact"][data-collapsed="true"]{height:90px}
.compact-minimap[data-size][data-collapsed="true"]{height:90px;min-height:90px;grid-template-rows:44px 44px}

/* Hidden means only a thumb-sized restore target, never an empty wide panel. */
.compact-minimap[data-size][data-collapsed="true"]{width:46px;max-width:46px;height:46px;min-height:46px;grid-template-rows:44px;background:transparent}
.compact-minimap[data-collapsed="true"] .compact-minimap-controls{width:44px}
.compact-minimap[data-collapsed="true"] [data-minimap-toggle]{width:44px;padding:0;font-size:12px}

/* Course discovery stays available beside the walking scene, including hidden-map mode. */
.compact-minimap[data-classes=true]{grid-template-rows:44px minmax(0,1fr) auto 44px 44px}
.compact-minimap [data-minimap-classes]{min-height:44px;border:0;border-top:1px solid #acaa8b;background:#29443a;color:#f7edd5;font:600 12px system-ui;touch-action:manipulation}
.compact-minimap[data-classes=true][data-size][data-collapsed=true]{width:64px;max-width:64px;height:90px;min-height:90px;grid-template-rows:44px 44px}
.compact-minimap[data-classes=true][data-collapsed=true] .compact-minimap-controls,.compact-minimap[data-classes=true][data-collapsed=true] [data-minimap-toggle]{width:62px}

/* Brief, smaller preview; auto-hidden state is one recoverable 44px target.
   Classes and Reset remain in Phone and return here when Map is opened. */
.compact-minimap{width:140px;height:min(230px,calc(100% - var(--minimap-offset) - 8px))}
@media(max-width:600px),(max-height:500px){.compact-minimap{width:128px;height:min(220px,calc(100% - var(--minimap-offset) - 8px))}}
.compact-minimap[data-classes=true][data-size][data-collapsed=true]{width:46px;max-width:46px;height:46px;min-height:46px;grid-template-rows:44px}
.compact-minimap[data-classes=true][data-collapsed=true] .compact-minimap-controls,.compact-minimap[data-classes=true][data-collapsed=true] [data-minimap-toggle]{width:44px}

.compact-minimap,.compact-minimap[data-classes=true]{grid-template-rows:44px minmax(0,1fr) auto 44px}
.compact-minimap-shortcuts{display:flex;min-width:0}
.compact-minimap-shortcuts>button{flex:1;min-width:44px;min-height:44px;padding:4px;font-size:11px}
.compact-minimap-shortcuts>button+button{border-left:1px solid #acaa8b}
.compact-minimap[data-size][data-collapsed=true],.compact-minimap[data-classes=true][data-size][data-collapsed=true]{grid-template-rows:44px}

.classroom-tv-panel{box-sizing:border-box;width:min(48rem,calc(100vw - 24px));max-height:calc(100vh - 24px);max-height:calc(100dvh - 24px);padding:0;border:2px solid #47624e;border-radius:12px;background:#fff9ed;color:#173d30}
.classroom-tv-panel[open]{display:flex;flex-direction:column}
.classroom-tv-panel::backdrop{background:#152a24b3}
.classroom-tv-header{flex-shrink:0;display:flex;align-items:center;gap:12px;padding:8px 12px;border-bottom:1px solid #a9b39f;background:#f2eee2}
.classroom-tv-header h2{font-size:1.1rem;margin:0}
.classroom-tv-panel button,.classroom-tv-panel a{min-height:44px;display:inline-flex;align-items:center;padding:8px 12px;box-sizing:border-box;color:#173d30;background:#fff9ed;border:1px solid #47624e;border-radius:7px;font:inherit}
.classroom-tv-content{overflow:auto;min-height:0;padding:0 16px 16px;overscroll-behavior:contain;line-height:1.6}
.classroom-tv-content section section{border-top:1px solid #ccd1c2;margin-top:16px}
.classroom-tv-panel :focus-visible{outline:3px solid #785127;outline-offset:3px}
@media(max-height:300px){.classroom-tv-header{padding:4px 8px}.classroom-tv-header h2{font-size:.9rem}}
