:root{font-family:system-ui,-apple-system,"Segoe UI","Noto Sans JP","Yu Gothic",sans-serif;color:#283d34;background:#f7f5ed;font-synthesis:none}*{box-sizing:border-box}body{margin:0}button,input{font:inherit}button,a{-webkit-tap-highlight-color:transparent}button{cursor:pointer;border:1px solid #d9dfd4;border-radius:10px;background:#fffdf7;color:#314c3e;padding:10px 14px;font-weight:650;transition:background .12s,transform .12s}button:hover{background:#edf2e8}button:active{transform:translateY(1px)}button:focus-visible,a:focus-visible,input:focus-visible,canvas:focus-visible{outline:3px solid #dbac49;outline-offset:3px}button:disabled{opacity:.45;cursor:default}button.primary{background:#315e4b;border-color:#315e4b;color:#fff}button.primary:hover{background:#224735}.secondary{background:#fbfaf5;border:1px solid #b8c5b5}.text-button{border:0;background:transparent;text-decoration:underline;text-underline-offset:4px}.eyebrow{font-size:12px;letter-spacing:.15em;font-weight:750;color:#62816a}a{color:inherit}h1,h2,h3,p{margin-top:0}[hidden]{display:none!important}.welcome{min-height:100svh;display:flex;flex-direction:column;max-width:1600px;margin:auto}.welcome-nav{display:flex;justify-content:space-between;padding:32px 5vw;font-size:14px}.welcome-nav a{text-decoration:none}.welcome-nav a:first-child{font-family:Georgia,serif;font-size:24px;font-weight:700}.welcome-body{display:grid;grid-template-columns:.9fr 1.2fr;align-items:center;flex:1;padding:20px 0 35px 8vw;overflow:hidden;min-height:620px}.intro{z-index:1}h1{font-size:clamp(44px,5.8vw,82px);line-height:1.22;letter-spacing:-.07em;margin:22px 0 24px;font-weight:850}h1 span{color:#58805a}.intro p{font-size:16px;line-height:1.9;color:#657468}.big{display:flex;justify-content:space-between;align-items:center;width:300px;max-width:95%;padding:17px 22px;margin-top:12px;border-radius:12px;font-size:16px}.big span{font-size:22px}.intro-notes{display:flex;flex-wrap:wrap;gap:15px;font-size:11px;color:#7c897b;margin-top:28px}.intro-notes span:before{content:'✓';margin-right:5px}.hero{height:570px;position:relative;align-self:center}.hero img{display:block;width:100%;height:100%;object-fit:cover;border-radius:32px 0 0 32px}.hero-label{position:absolute;bottom:25px;left:25%;background:#fffdf5e8;border:1px solid #fff;border-radius:14px;padding:16px 24px;box-shadow:0 12px 30px #304b3812;font-size:16px;transform:rotate(-3deg);font-weight:700}.hero-label small{display:block;font-size:11px;color:#73806e;margin-top:6px;font-weight:400}.welcome footer{padding:20px 5vw;border-top:1px solid #e5e7dc;color:#7a8576;font-size:12px}.topbar{height:72px;display:flex;align-items:center;justify-content:space-between;padding:0 22px;gap:16px;background:#fbfaf4;border-bottom:1px solid #dbe0d4}.brand-button{border:0;background:none;font:bold 23px Georgia,serif;padding:0}.brand-button span{font:600 11px system-ui;display:block;text-align:left;margin-top:3px;color:#7d8878}.mode-tabs{display:flex;background:#ebeee4;border-radius:12px;padding:4px}.mode-tabs button{border:0;background:none;padding:9px 18px;font-size:13px}.mode-tabs button.active{background:#fffdf8;box-shadow:0 2px 8px #42503a12}.header-actions{display:flex;gap:8px}.header-actions button{font-size:12px;padding:10px 13px}.workspace{display:flex;height:calc(100svh - 122px);min-height:420px}aside{width:285px;flex-shrink:0;background:#fbfaf4;border-right:1px solid #dbe0d4;display:flex;flex-direction:column;overflow:hidden}.sidebar-title{padding:22px 18px 10px}.sidebar-title h2{font-size:18px;margin-bottom:8px}.sidebar-title p{font-size:11px;line-height:1.8;color:#84907f;margin-bottom:0}.tools{display:grid;grid-template-columns:1fr 1fr;gap:7px;padding:4px 16px 17px;border-bottom:1px solid #e5e6db}.tools button{font-size:12px;text-align:left;padding:9px 12px}.tools span{display:inline-block;width:23px;font-size:17px;vertical-align:middle}.tools button.active,.catalog button.active,[data-size].active,#grid[aria-pressed=true]{border-color:#5f8661;background:#e6efdc;color:#315b38}.palette-head{display:flex;align-items:center;justify-content:space-between;padding:16px 17px 10px}.palette-head h3{font-size:13px;margin:0}.palette-head span{font-size:10px;color:#6f826c;background:#edf0e5;border-radius:10px;padding:4px 8px}.search{margin:0 16px 10px;border:1px solid #dde1d7;border-radius:8px;padding:10px;font-size:10px;width:calc(100% - 32px);background:#fffef9}.catalog{overflow-y:auto;display:grid;grid-template-columns:1fr 1fr;align-content:start;gap:8px;padding:0 14px 20px;overscroll-behavior:contain}.catalog button{padding:4px 4px 9px;border-radius:10px;position:relative;min-height:118px;touch-action:pan-y}.catalog canvas{display:block;width:100%;height:68px;pointer-events:none}.catalog strong{font-size:11px;display:block;line-height:1.25}.catalog small{display:block;font-size:9px;color:#889080;margin-top:3px}.catalog .check{position:absolute;top:5px;right:7px;color:#4c8557;font-size:12px}.catalog .footprint{position:absolute;top:6px;left:6px;font-size:9px;color:#95a08e}.map-panel{position:relative;overflow:hidden;flex:1;background:#e9efe5;min-width:0}.map-panel>canvas{width:100%;height:100%;display:block;touch-action:none}.map-top,.map-bottom{position:absolute;left:22px;right:22px;display:flex;justify-content:space-between;align-items:center;z-index:2;pointer-events:none;gap:12px}.map-top{top:18px}.map-bottom{bottom:30px}.map-top button,.map-bottom button{pointer-events:auto}.tool-hint{font-size:12px;padding:10px 15px;background:#fffdf4e8;border:1px solid #fff9;border-radius:25px;box-shadow:0 3px 16px #31452e0a}.map-actions{display:flex;gap:7px}.map-actions button{font-size:11px;padding:8px 11px;background:#fbfcf0e8}.empty-note{position:absolute;top:40%;left:50%;transform:translate(-50%,-50%);text-align:center;pointer-events:none;white-space:nowrap;color:#456540}.empty-note span{font-size:18px;font-weight:700}.empty-note small{display:block;font-size:11px;margin-top:10px;color:#6c8760}.view-controls{display:flex;background:#fffff4e8;border:1px solid #fff;border-radius:10px;padding:3px;box-shadow:0 3px 16px #31452e12}.view-controls button{border:0;background:none;border-radius:7px;min-width:34px;padding:8px;font-size:14px}.view-controls button:hover{background:#dae4d1}#fit-view{font-size:11px}#map-status{font-size:10px;color:#6a8060;background:#f8fbedb0;border-radius:10px;padding:8px 12px}.pan-hint{position:absolute;bottom:8px;right:23px;font-size:9px;color:#7c8f70;pointer-events:none}.selection-bar{position:absolute;bottom:84px;left:50%;transform:translateX(-50%);display:flex;align-items:center;gap:7px;padding:9px 12px;background:#fffdf6f5;box-shadow:0 8px 28px #304a3824;border:1px solid #fff;border-radius:12px;white-space:nowrap;z-index:3}.selection-bar strong{font-size:12px}.selection-bar button{font-size:10px;padding:7px}#park-sizes{display:flex;gap:3px}#toast{position:absolute;top:78px;left:50%;transform:translate(-50%,-7px);opacity:0;transition:.2s;background:#2f554beF;color:#fff;padding:12px 22px;border-radius:12px;font-size:13px;max-width:90%;text-align:center;pointer-events:none;z-index:6}#toast.show{opacity:1;transform:translate(-50%,0)}.readiness-bar{height:50px;display:flex;align-items:center;justify-content:space-between;padding:0 22px;background:#fbfaf4;border-top:1px solid #dce2d5;gap:12px;font-size:11px;color:#75816b}.readiness-bar button{padding:7px 12px;font-size:11px}#walk-panel{padding:25px 22px;overflow:auto}#walk-panel h2{font-size:20px;margin:12px 0}#walk-panel p{font-size:12px;line-height:1.9;color:#73826d}.discovery{margin-top:20px;font-size:12px;color:#71856a}.discovery strong{font-size:38px;color:#315e4b}.progress-track{height:6px;background:#e1e7d8;border-radius:6px;margin:8px 0 25px;overflow:hidden}.progress-track div{height:100%;background:#8caf66;width:0;transition:width .3s}.walk-guide{text-align:center}kbd{display:inline-flex;align-items:center;justify-content:center;width:29px;height:29px;border:1px solid #d7decf;border-bottom:3px solid #c8d1bf;border-radius:6px;background:#fffdf7;margin:2px;font-family:inherit}.walk-guide p{font-size:10px!important;margin-top:10px}#walk-panel>button{font-size:12px;margin-bottom:9px}#found-list{display:flex;flex-wrap:wrap;gap:5px;margin-top:20px}#found-list span{font-size:10px;background:#e9efdf;padding:5px 8px;border-radius:6px}.dpad{position:absolute;right:24px;bottom:90px;display:grid;grid-template-columns:repeat(3,42px);grid-template-rows:repeat(2,42px);gap:4px;z-index:4}.dpad button{padding:5px;font-size:22px;background:#fffdf4ed;touch-action:none}.dpad button:first-child{grid-column:2}.dpad button:nth-child(2){grid-column:1}.dpad button:active{background:#d5e4ca}dialog{border:1px solid #dce2d4;background:#fffef7;color:#2c4538;border-radius:20px;width:min(520px,calc(100% - 30px));max-height:85svh;padding:26px;box-shadow:0 25px 100px #24392b40}dialog::backdrop{background:#243b315c;backdrop-filter:blur(4px)}.modal-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:18px;gap:15px}.modal-header h2{font-size:21px;margin:0}.modal-header button{padding:4px 9px;font-size:22px;border:0}.modal-content p,#modal-content p{font-size:13px;line-height:1.9;color:#71806b}#modal-content ol{font-size:13px;line-height:2;padding-left:22px}#modal-content .primary{width:100%;margin-top:12px}.code-input{font:700 24px ui-monospace,monospace;letter-spacing:3px;text-align:center;width:100%;padding:17px 9px;border:2px solid #bccbb3;border-radius:12px;text-transform:uppercase;background:#f8faef;color:#2c533b}.save-code{font:800 clamp(23px,5vw,32px) ui-monospace,monospace;letter-spacing:2px;text-align:center;background:#eaf1df;border:1px solid #cddbbf;border-radius:13px;padding:23px 8px;margin:18px 0;user-select:all}.code-note{background:#f6efda;padding:12px;border-radius:8px;font-size:12px!important}.error{color:#b75541!important}.check-list{display:grid;gap:10px;font-size:12px;margin-bottom:12px}.check-row{padding:12px;border-radius:10px;background:#f0f3e8}.check-row.bad{background:#fbefdf}.check-row small{display:block;margin-top:7px;line-height:1.7;color:#8c765a}.modal-buttons{display:flex;gap:8px;margin-top:15px}.modal-buttons button{flex:1}.speech-warning{font-size:11px!important;color:#94754e!important}.ghost-drag{position:fixed;pointer-events:none;width:100px;height:80px;z-index:100;background:#fffef5ba;border:1px solid #8aa277;border-radius:10px;box-shadow:0 8px 20px #0002}#resume{font-size:12px;margin-top:12px}
@media(max-width:1000px){aside{width:238px}.topbar{padding:0 14px;gap:10px}.header-actions{gap:4px}.mode-tabs button{padding:9px 12px}.selection-bar{flex-wrap:wrap;max-width:94%;justify-content:center;white-space:normal;width:max-content}.welcome-body{padding-left:6vw}.hero{height:500px}.welcome-nav{padding:25px 6vw}}
@media(max-width:720px){.welcome-body{grid-template-columns:1fr;min-height:0;padding:35px 24px 0}.intro h1{font-size:50px}.intro{margin:auto;width:100%;max-width:400px}.hero{height:340px}.hero-label{bottom:5px;left:25%}.welcome footer{font-size:10px}.topbar{height:100px;flex-wrap:wrap;gap:8px;padding:10px 12px}.brand-button{font-size:20px}.mode-tabs{order:3;width:100%;justify-content:center}.mode-tabs button{width:50%;padding:6px}.header-actions button{font-size:10px;padding:8px}.workspace{height:calc(100svh - 155px);min-height:450px}aside{width:160px}.sidebar-title{padding:13px 10px 7px}.sidebar-title h2{font-size:14px}.sidebar-title p{font-size:9px}.tools{gap:4px;padding:4px 8px 10px}.tools button{font-size:9px;padding:7px 5px}.tools span{width:15px}.palette-head{padding:10px 8px;display:block}.palette-head h3{font-size:11px;margin-bottom:6px}.palette-head span{font-size:9px}.search{margin:0 8px 8px;width:calc(100% - 16px);padding:7px 4px;font-size:8px}.catalog{gap:5px;padding:0 7px 12px;grid-template-columns:1fr}.catalog button{min-height:100px}.catalog canvas{height:60px}.map-top{top:10px;left:8px;right:8px;flex-wrap:wrap;gap:7px}.tool-hint{font-size:9px;padding:8px 10px;max-width:100%}.map-actions button{font-size:9px;padding:6px}.map-bottom{left:8px;right:8px;bottom:22px;align-items:flex-end;gap:5px;flex-wrap:wrap}.view-controls button{min-width:27px;padding:5px}.pan-hint{font-size:8px;right:9px;bottom:5px;max-width:90%}.empty-note{white-space:normal;width:90%}.empty-note span{font-size:13px}.empty-note small{font-size:9px;line-height:1.8}.readiness-bar{height:55px;padding:6px 10px;font-size:9px}.readiness-bar button{font-size:9px;max-width:125px;padding:6px;flex-shrink:0}.selection-bar{bottom:105px;padding:8px;gap:5px}.selection-bar strong{font-size:10px}.selection-bar button{font-size:9px}#walk-panel{padding:15px 10px}#walk-panel h2{font-size:15px}#walk-panel p{font-size:10px}.dpad{right:12px;bottom:105px;grid-template-columns:repeat(3,35px);grid-template-rows:repeat(2,35px)}#map-status{font-size:8px;padding:6px}.header-actions #sound{font-size:9px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{transition:none!important;scroll-behavior:auto!important}}

.river-widths{display:flex;align-items:center;gap:5px;padding:9px 16px;font-size:10px;background:#e9f4ee}.river-widths button{padding:6px;font-size:10px}.river-widths button.active,#pan-map.active{background:#dcebd7;border-color:#65865e}#art-status{display:inline-block;margin-right:18px;color:#548161}.dpad{grid-template-rows:repeat(3,42px)}.dpad [data-dir=upleft]{grid-area:1/1}.dpad [data-dir=up]{grid-area:1/2}.dpad [data-dir=upright]{grid-area:1/3}.dpad [data-dir=left]{grid-area:2/1}.dpad [data-dir=right]{grid-area:2/3}.dpad [data-dir=downleft]{grid-area:3/1}.dpad [data-dir=down]{grid-area:3/2}.dpad [data-dir=downright]{grid-area:3/3}.catalog canvas{filter:none}.model-drag-image{background:transparent;border:0;box-shadow:none}@media(max-width:720px){.dpad{grid-template-rows:repeat(3,35px)}.river-widths{padding:8px;gap:3px;flex-wrap:wrap}.tools button{font-size:8px}}

.tools [data-tool=pan]{grid-column:1/-1}.dpad{grid-template-rows:repeat(2,42px)}.dpad [data-dir=up]{grid-area:1/2}.dpad [data-dir=left]{grid-area:2/1}.dpad [data-dir=down]{grid-area:2/2}.dpad [data-dir=right]{grid-area:2/3}.selection-bar{max-width:95%}@media(max-width:720px){.dpad{grid-template-rows:repeat(2,35px)}}

/* Green cards identify vocabulary that still needs a place in the town. */
.catalog button.unplaced{background:#def2d8;border-color:#8ebc80;color:#275638}.catalog button.unplaced:hover{background:#cde9c5;border-color:#5c9851}.catalog button.placed{background:#f3f2eb;border-color:#d8ddcf}.catalog button.active{outline:2px solid #315e4b;outline-offset:-2px;border-color:#315e4b;background:#cce5bb}.catalog button.unplaced .check{font-size:8px;background:#3f7c4e;color:white;border-radius:5px;padding:2px 4px}.catalog button.placed .check{font-size:9px;color:#647861}.catalog button.unplaced small{color:#4f7654}

.variant-choices{display:flex;gap:4px}.variant-choices button.active{background:#d5e9c6;border-color:#5f8661;color:#315b38}.selection-bar #house-design-note{font-size:9px;color:#66795d;max-width:150px;white-space:normal;line-height:1.5}.selection-bar{flex-wrap:wrap;justify-content:center}

/* Single-screen destination driving alongside the existing room mode. */
.mode-tabs{flex-wrap:wrap;justify-content:center}.mode-tabs button{padding:9px 11px;white-space:nowrap;width:auto;flex:1}.local-route-dialog{width:min(980px,95vw);max-width:980px}.local-route-dialog .destination-actions{bottom:-24px}.local-target{text-align:center;margin:8px 0 18px;padding:12px;background:#edf3e4;border-radius:12px}.local-target img{display:block;width:100%;height:100px;object-fit:contain}.local-target strong,.local-target small{display:block}.local-target small{color:#6c8065;margin-top:4px}.local-win{text-align:center}.local-win img{width:220px;max-width:100%;height:160px;object-fit:contain}.local-win button{margin:6px}.local-route-dialog .destination-choices{margin-top:18px}@media(max-width:1050px){.topbar{height:auto;min-height:100px;flex-wrap:wrap;padding:10px 14px;gap:8px}.mode-tabs{order:3;width:100%}.workspace{height:calc(100svh - 150px)}body.room-host .workspace{height:calc(100svh - 100px)}}@media(max-width:480px){.mode-tabs button{font-size:10px;padding:9px 6px}.local-target img{height:75px}}

#print-sheet{display:none}.print-preview{background:white;border:1px solid #bbb;margin:12px 0}.print-preview svg{display:block;width:100%;max-height:65vh}.header-actions{flex-wrap:wrap}#print-now{margin-top:12px}
@media print{@page{size:A4 landscape;margin:10mm}html,body{background:white!important;margin:0!important;padding:0!important}body>*,dialog,#modal::backdrop{display:none!important}body>#print-sheet{display:block!important;width:100%;text-align:center;color:#000;print-color-adjust:exact;-webkit-print-color-adjust:exact}#print-sheet h1{font:700 15pt 'Noto Sans CJK JP','Yu Gothic',sans-serif;margin:0 0 3mm;letter-spacing:0}#print-sheet svg{display:block;width:100%;height:166mm;margin:auto}#print-sheet p{font:9pt 'Noto Sans CJK JP','Yu Gothic',sans-serif;margin:3mm 0 0}#print-sheet{break-inside:avoid;page-break-inside:avoid}}


/* Keep the full-height building library separate from the compact map tools. */
.workspace{position:relative}
#sidebar{position:absolute;left:12px;top:12px;width:184px;height:auto;max-height:calc(100% - 100px);z-index:3;border:1px solid #dbe0d4;border-radius:14px;box-shadow:0 5px 18px #304a3818;overflow-y:auto}
#sidebar .sidebar-title{padding:12px 12px 7px}
#sidebar .sidebar-title h2{font-size:14px;margin:0}
#sidebar .tools{padding:6px 9px 12px;gap:5px;border:0;grid-template-columns:1fr}
#sidebar .tools button{padding:7px 9px;font-size:11px}
#building-panel{order:3;width:280px;min-height:0;border-right:0;border-left:1px solid #dbe0d4}
#building-panel .palette-head{flex-shrink:0;padding:14px}
#building-panel .catalog{min-height:0;flex:1;grid-template-columns:repeat(2,minmax(0,1fr));padding:0 10px 14px}
#building-panel .catalog button{min-height:104px}
body:not(.room-host) #sidebar:not([hidden])~.map-panel .map-top{left:210px;align-items:flex-start;flex-wrap:wrap}
@media(max-width:1000px){
 #building-panel{width:220px}
 #sidebar{width:150px;left:8px;top:8px}
 body:not(.room-host) #sidebar:not([hidden])~.map-panel .map-top{left:166px;right:10px}
 #building-panel .catalog{gap:5px;padding:0 6px 10px}
}
@media(max-width:720px){
 #building-panel{width:150px}
 #building-panel .catalog{grid-template-columns:1fr}
 #sidebar{width:125px}
 #sidebar .tools button{font-size:10px;padding:6px}
 #sidebar .sidebar-title h2{font-size:12px}
 body:not(.room-host) #sidebar:not([hidden])~.map-panel .map-top{left:140px}
 #building-panel .palette-head{padding:10px 7px}
}

/* Picture choices stay beside the building library instead of occupying the map. */
.variant-popover{position:fixed;z-index:20;width:360px;max-width:calc(100vw - 24px);max-height:calc(100svh - 24px);overflow:auto;padding:12px;background:#fffdf5;border:1px solid #a7b99d;border-radius:14px;box-shadow:0 12px 38px #203c3540}
.variant-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:9px}.variant-heading strong{font-size:14px}.variant-heading button{padding:2px 9px;font-size:22px;background:transparent;border:0}
.variant-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}.variant-options button{padding:5px 4px 8px;background:#eff4e7;min-width:0}.variant-options img{display:block;width:100%;height:74px;object-fit:contain;pointer-events:none}.variant-options strong{display:block;font-size:10px;line-height:1.4}.variant-options button:hover,.variant-options button:focus-visible{background:#d8eac9;border-color:#5f8661}.variant-popover p{font-size:10px;line-height:1.6;color:#66795d;margin:10px 0 0}
.catalog .variant-count{position:absolute;right:5px;top:52px;border-radius:5px;background:#fffef2e8;color:#4b6944;padding:2px 4px;font-size:8px;pointer-events:none}.flower-widths{background:#f4efdb}
@media(max-width:720px){.variant-options img{height:62px}.variant-popover{padding:9px}.variant-heading strong{font-size:12px}}

.variant-options small{display:block;font-size:9px;color:#78866e;margin-top:2px}

/* Student identity and teacher roster */
select{font:inherit;color:inherit;background:#fffdf7;border:1px solid #becbbb;border-radius:9px;padding:11px;min-width:0;width:100%}select:focus-visible{outline:3px solid #dbac49;outline-offset:2px}.student-form label,.teacher-filters label{display:grid;gap:7px;font-size:14px;font-weight:650}.student-form{display:grid;gap:18px}.student-fields,.teacher-filters{display:grid;grid-template-columns:1fr 1fr;gap:15px}.student-form button{width:100%}.save-status{max-width:210px}.save-status[data-status=offline],.save-status[data-status=conflict]{background:#fff0d2;color:#79451a}.teacher-train-hotspot{position:absolute;z-index:2;background:transparent!important;border:0;padding:0;box-shadow:none;transform:none}.teacher-link{position:absolute;z-index:3;left:20px;top:20px;background:#fffdf5f5;padding:12px 16px;border-radius:10px;font-size:13px;box-shadow:0 3px 15px #283d3430}.teacher-school-group{margin:20px 0}.teacher-school-group h3{font-size:18px;margin-bottom:8px}.teacher-school-group details{border:1px solid #d4decf;border-radius:10px;margin:8px 0;padding:12px}.teacher-school-group summary{cursor:pointer;font-weight:700;padding:4px 0 10px}.teacher-student-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(135px,1fr));gap:8px;margin-top:12px}.teacher-student-list button{text-align:left;font-size:13px}.teacher-filters{margin-bottom:18px}#teacher-status{margin-top:12px}.class-print-page{break-after:page;page-break-after:always}.class-print-page:last-child{break-after:auto;page-break-after:auto}@media print{#print-sheet{break-inside:auto;page-break-inside:auto}#print-sheet .class-print-page svg{height:155mm} .class-print-page{width:100%;height:180mm;display:flex;flex-direction:column;justify-content:center}.class-print-page h1{font-size:17pt;margin:0 0 5mm;letter-spacing:0}.class-print-page svg{max-width:100%;height:155mm}.class-print-page p{font-size:8pt;margin:3mm 0 0}}

.teacher-actions{display:flex;gap:12px;flex-wrap:wrap}.student-form input{font:inherit;padding:12px;border:1px solid #b7c9c4;border-radius:10px;max-width:100%}#teacher-toggle{margin-top:12px;align-self:flex-start}

/* English labels and paired teacher actions stay readable on narrow screens. */
.mode-tabs{flex-wrap:wrap}.tools button{white-space:normal}.teacher-student-list{grid-template-columns:minmax(0,1fr) minmax(120px,.7fr)}.student-form [hidden]{display:none!important}.catalog small{white-space:normal}

/* Touch driving: no selectable text or long-press menus on the controls. */
.driving-controls{position:absolute;inset:0;pointer-events:none;z-index:4;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}
.driving-controls *{user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;-webkit-tap-highlight-color:transparent}
.steering-stick{position:absolute;left:18px;bottom:78px;width:114px;height:114px;border-radius:50%;background:radial-gradient(circle,#adc2b9cf,#eef2e5df);border:3px solid #ffffeddd;box-shadow:inset 0 3px 12px #294a4130,0 3px 10px #223e3325;pointer-events:auto;touch-action:none;display:grid;place-items:center}
.stick-axis{width:75%;height:3px;border-radius:2px;background:#69897a55;pointer-events:none}.stick-knob{position:absolute;width:52px;height:52px;border-radius:50%;background:radial-gradient(circle at 35% 25%,#8db9a5,#315e4b);border:2px solid #d9e8d5;box-shadow:0 5px 12px #24463555;pointer-events:none}
.drive-pedals{position:absolute;right:18px;bottom:78px;display:flex;flex-direction:column;gap:8px;pointer-events:auto}
.drive-pedal{width:76px;height:76px;border:0;padding:0;border-radius:18px;background-image:url('/assets/v14/driving-pedals.webp');background-size:190% 200%;background-color:#fff9e9;touch-action:none;box-shadow:0 3px 8px #20392b40}
.pedal-go{background-position:center top}.pedal-back{background-position:center bottom}.drive-pedal.pressed{transform:translateY(3px) scale(.95);filter:brightness(.87)}
.keyboard-drive-note{position:absolute;left:0;right:0;bottom:5px;text-align:center;font-size:10px;color:#264b3e;text-shadow:0 1px 2px #fff;background:#fffdf2cb;padding:4px;pointer-events:none}
@media(max-width:720px){.steering-stick{left:10px;bottom:92px;width:96px;height:96px}.drive-pedals{right:10px;bottom:92px;gap:6px}.drive-pedal{width:66px;height:66px}.stick-knob{width:44px;height:44px}}
.driving-controls .pedal-go{background:#fff9e9 url('/assets/v14/driving-pedals.webp') center top/190% 200% no-repeat}.driving-controls .pedal-back{background:#fff9e9 url('/assets/v14/driving-pedals.webp') center bottom/190% 200% no-repeat}

.welcome[lang="ja"] h1{font-size:clamp(2.5rem,4.8vw,4.4rem);line-height:1.35;letter-spacing:-.035em}.welcome[lang="ja"] .eyebrow{letter-spacing:.04em}

/* The rotation row sits at the map's bottom edge, below the view controls. */
#game{height:100svh;display:flex;flex-direction:column;overflow:hidden}.topbar{flex-shrink:0}#game .workspace{height:auto;flex:1;min-height:0}
.map-bottom{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px 12px}.map-bottom .view-controls{justify-self:end}
.map-bottom .selection-bar{position:static;transform:none;grid-column:1/-1;justify-self:center;max-width:100%;width:max-content;white-space:normal;pointer-events:auto;margin:0;gap:7px;padding:8px 10px}
.map-panel:has(#selection-bar:not([hidden])) .map-bottom{bottom:max(8px,env(safe-area-inset-bottom))}.map-panel:has(#selection-bar:not([hidden])) .pan-hint{display:none}
@media(max-width:720px){.map-bottom #map-status{display:none}.map-bottom .view-controls{grid-column:1/-1}.map-bottom .selection-bar{gap:5px;padding:7px}.map-bottom .view-controls button{min-width:24px;padding:4px}}

.view-controls button[aria-pressed="true"]{background:#315e4b;color:#fff;border-color:#315e4b;box-shadow:inset 0 0 0 1px #fff5}

.vehicle-picker{margin:16px 0;padding:14px;background:#eff3eb;border:1px solid #cbd6c6;border-radius:14px}.vehicle-picker h2{font-size:17px;margin:0 0 10px}.vehicle-picker-row{display:flex;gap:16px;align-items:center}.vehicle-picture{object-fit:contain;max-width:35%;height:110px}.vehicle-picker-row>div{flex:1;min-width:0}.vehicle-picker label{display:block;font-size:14px}.vehicle-picker select{display:block;width:100%;font:inherit;padding:8px;margin-top:5px;border:1px solid #b9c8b4;border-radius:8px;background:white}.vehicle-colours{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}.vehicle-colours button{width:32px;height:32px;padding:0;border:2px solid #fff;border-radius:50%;box-shadow:0 0 0 1px #a8b6a0}.vehicle-colours button[aria-pressed="true"]{box-shadow:0 0 0 3px #315e4b, inset 0 0 0 2px #fff}.vehicle-colour-name{font-size:13px;margin:8px 0 0}@media(max-width:500px){.vehicle-picker-row{gap:10px}.vehicle-picture{width:100px;height:85px}.vehicle-colours{gap:9px}}

.points-panel{flex:none;border-top:1px solid #ccd9c7;background:#edf2e6;padding:8px;max-height:52%;overflow:auto}.points-panel>button{width:100%;text-align:left;padding:10px 12px;background:#e0ebce;border-color:#a7ba93}.points-panel>button::before{content:'▸';display:inline-block;margin-right:8px}.points-panel>button[aria-expanded=true]::before{transform:rotate(90deg)}.points-tray{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));justify-items:center;gap:12px;padding:14px 4px 4px}.points-tray[hidden],.point-markers[hidden],.point-drag[hidden]{display:none!important}.point-token{--coin:#f2bf43;--edge:#a56c19;position:relative;display:grid;place-items:center;width:48px;height:48px;padding:0;border:3px solid #fff0b0;border-radius:50%;background:radial-gradient(circle at 32% 25%,#fff8dc 0, var(--coin) 40%);color:#fffdf0;box-shadow:inset 0 0 0 2px #fff7,0 5px 0 var(--edge),0 8px 9px #263a343b;text-shadow:1px 1px 0 var(--edge),2px 2px 0 var(--edge),3px 3px 0 var(--edge);font-size:28px;font-weight:950;line-height:1;cursor:grab;touch-action:none;user-select:none;transform:rotate(-8deg);transition:outline .1s,opacity .1s}.point-token[data-value="2"]{--coin:#55b5dc;--edge:#267493;border-color:#c8f0ff}.point-token[data-value="3"]{--coin:#ed87a8;--edge:#a64168;border-color:#ffe2ec}.point-token[data-value="5"]{--coin:#af8be5;--edge:#6a449b;border-color:#edddff}.point-token:hover{background:radial-gradient(circle at 32% 25%,#fff8dc 0,var(--coin) 50%)}.point-token.point-placed{opacity:.23;cursor:default;box-shadow:none}.point-token.point-active{outline:3px solid #3c8656;outline-offset:4px}.points-help{grid-column:1/-1;font-size:11px;line-height:1.6;margin:2px 0;color:#456044}.point-markers{position:absolute;inset:0;pointer-events:none;overflow:hidden;z-index:2}.point-marker{position:absolute;pointer-events:auto;margin-left:-24px;margin-top:-58px}.point-marker::after{content:'';position:absolute;top:calc(100% + 7px);left:20px;width:3px;height:12px;background:#fff9;box-shadow:0 1px 2px #304a3855;pointer-events:none}.point-drag{position:fixed;z-index:1000;pointer-events:none;margin-left:12px;margin-top:-60px;cursor:grabbing}.points-score{display:block;border-radius:10px;background:#fff0bc;color:#664b12;padding:10px;font-weight:800;font-size:15px}.points-award{font-size:22px!important;font-weight:850;color:#315e4b!important}@media(max-width:480px){.point-token{width:38px;height:38px;font-size:23px}.points-tray{gap:10px 4px;padding:12px 0}.point-marker{margin-left:-19px;margin-top:-48px}.point-marker::after{left:15px}.points-panel{padding:5px}.points-panel>button{font-size:11px;padding:9px 5px}.points-help{font-size:9px}.points-score{font-size:12px}}

.point-markers .point-marker{width:48px;height:48px;font-size:28px;margin:0;transform:translate(-50%,-100%) scale(var(--point-scale,1)) rotate(-8deg);transform-origin:50% 100%}.point-markers .point-marker::after{left:20px}

.point-markers .point-marker{opacity:.82;filter:drop-shadow(0 0 7px var(--coin));animation:point-bob 3s ease-in-out infinite;animation-delay:var(--point-phase,0s)}.point-markers .point-marker:is(:hover,:focus-visible,.point-active){animation-play-state:paused;opacity:.95}@keyframes point-bob{0%,100%{translate:0 calc(-2px * var(--point-scale,1))}50%{translate:0 calc(-10px * var(--point-scale,1))}}@media(prefers-reduced-motion:reduce){.point-markers .point-marker{animation:none;translate:none}}

.model-loading{position:absolute;top:76px;left:50%;transform:translateX(-50%);z-index:4;max-width:calc(100% - 32px);padding:8px 14px;border:1px solid #c4d2c8;border-radius:20px;background:#fffdf3eb;color:#426352;box-shadow:0 3px 12px #253d2514;font-size:12px;pointer-events:none;text-align:center}
.graphics-recovery{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);z-index:10;max-width:80%;padding:14px 20px;border-radius:12px;background:#fffdf3;color:#315542;box-shadow:0 3px 16px #253d2544;text-align:center;pointer-events:none}

.directions-notice{margin:0;padding:.65rem 1.2rem;background:#fff3d7;color:#5b4420;border-bottom:1px solid #ddc58d;line-height:1.5}

.header-actions #teacher-class-town{font:inherit;font-size:12px;max-width:170px;min-width:0;padding:9px 6px;border:1px solid #cddbbf;border-radius:9px;background:#fffef7;color:#2c4538}.header-actions #teacher-class-town[hidden]{display:none}@media(max-width:720px){.header-actions{flex-wrap:wrap}.header-actions #teacher-class-town{font-size:10px;max-width:140px;padding:7px 4px}}

/* Spoken directions stay readable without displaying the instruction transcript. */
.gps-repeat{width:100%;min-height:54px;font-size:1.15rem;margin-top:12px}.gps-status{min-height:3.2em;font-size:.92rem;line-height:1.5;color:#416353}.mode-tabs button.locked{opacity:.65}.mode-tabs button.locked::after{content:' 🔒';font-size:.8em}
/* Earned catalogue access; existing placed buildings remain editable. */
.catalog button.progress-locked{opacity:.52;filter:grayscale(.85);cursor:not-allowed;}
.catalog button.progress-locked .check{color:#485d55;}

.gps-feedback{position:absolute;z-index:5;left:50%;top:42%;transform:translate(-50%,-50%);width:min(90%,560px);display:flex;align-items:center;flex-direction:column;gap:12px;pointer-events:none;text-align:center}.gps-feedback img{width:clamp(140px,25vw,260px);max-height:32svh;object-fit:contain;filter:drop-shadow(0 4px 8px #0005)}.gps-feedback p{margin:0;background:#fffdf5f5;color:#8f2424;border:2px solid #f0b7ac;border-radius:14px;padding:14px 20px;font-size:clamp(16px,2vw,24px);font-weight:800;line-height:1.6;box-shadow:0 5px 22px #0002}.gps-feedback[data-kind="rerouting"] p{color:#294f42;border-color:#a7c5b5}

.police-feedback{position:fixed;z-index:70;top:90px;left:50%;transform:translateX(-50%);max-width:min(620px,86vw);padding:13px 20px;border-radius:14px;background:#fff3e8;color:#641d32;border:2px solid #d54b58;box-shadow:0 4px 22px #17253638;text-align:center;font-weight:750;pointer-events:none}.police-feedback[hidden]{display:none}.police-feedback[data-phase=caught]{background:#edf3ff;border-color:#536fa5;color:#243b60}

.graphics-recovered{top:12px;transform:translateX(-50%);padding:8px 12px;font-size:13px}

/* The road fills the display; essential controls float above it. */
body.directions-driving{overflow:hidden}
body.directions-driving #game{position:fixed;inset:0;width:100%;height:100svh;height:100dvh;z-index:30;background:#dbe9e0}
body.directions-driving #game>.topbar,body.directions-driving #directions-notice,body.directions-driving .map-top,body.directions-driving #map-status,body.directions-driving .pan-hint,body.directions-driving .keyboard-drive-note{display:none!important}
body.directions-driving .workspace{position:relative;width:100%;height:100%!important;min-height:0;flex:1}
body.directions-driving .map-panel{position:absolute;inset:0;width:100%;height:100%}
body.directions-driving #walk-panel{position:absolute;z-index:6;top:max(12px,env(safe-area-inset-top));left:max(12px,env(safe-area-inset-left));width:min(224px,calc(100% - 124px));max-height:calc(100% - 220px);overflow:auto;padding:10px;border:1px solid #ffffffb8;border-radius:14px;background:#fffdf3e8;box-shadow:0 3px 16px #193b3022;pointer-events:auto}
body.directions-driving #walk-panel>:not(.local-target):not(#local-repeat):not(#local-gps-status):not(.drive-actions):not(#local-score):not(#taxi-hud){display:none!important}
body.directions-driving .local-target{display:grid;grid-template-columns:56px minmax(0,1fr);gap:8px;align-items:center;text-align:left;padding:0;margin:0;background:none}
body.directions-driving .local-target img{width:56px;height:52px;object-fit:contain}
body.directions-driving #local-target-name{font-size:16px;line-height:1.25;overflow-wrap:anywhere}
body.directions-driving #local-target-ja{display:none}
body.directions-driving #local-repeat{width:100%;min-height:40px;font-size:14px;margin:8px 0 0;padding:8px}
body.directions-driving #local-score{font-size:12px;line-height:1.3;margin:7px 0 0;color:#315e4b}
body.directions-driving #local-gps-status{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);margin:0;min-height:0}
body.directions-driving #local-gps-status:is([data-state=error],[data-state=unavailable],[data-state=muted]){position:static;width:auto;height:auto;clip-path:none;font-size:12px;line-height:1.4;color:#8a392c;margin:8px 0 0}
body.directions-driving .drive-actions{position:fixed;z-index:7;top:max(12px,env(safe-area-inset-top));right:max(12px,env(safe-area-inset-right));display:grid;gap:8px;width:96px}
body.directions-driving #back-build,body.directions-driving #drive-fullscreen{margin:0;min-height:42px;padding:9px 7px;border:1px solid #fff;border-radius:10px;background:#fffdf3ed;font-size:12px;line-height:1.35;box-shadow:0 3px 12px #193b3022}
body.directions-driving .map-bottom{left:50%;right:auto;bottom:max(14px,env(safe-area-inset-bottom));transform:translateX(-50%);display:block;width:max-content;max-width:calc(100% - 208px)}
body.directions-driving #fit-view{min-height:42px;font-size:12px}
body.directions-driving .steering-stick{left:max(14px,env(safe-area-inset-left));bottom:max(18px,env(safe-area-inset-bottom))}
body.directions-driving .drive-pedals{right:max(14px,env(safe-area-inset-right));bottom:max(18px,env(safe-area-inset-bottom))}
body.directions-driving .graphics-recovered{top:auto;bottom:168px;font-size:11px}
@media(max-width:480px){body.directions-driving #walk-panel{left:8px;top:max(8px,env(safe-area-inset-top));width:calc(100% - 120px);padding:8px}body.directions-driving .drive-actions{right:8px;top:max(8px,env(safe-area-inset-top));width:96px}body.directions-driving .local-target{grid-template-columns:44px minmax(0,1fr);gap:6px}body.directions-driving .local-target img{width:44px;height:44px}body.directions-driving #local-target-name{font-size:14px}}
@media(max-height:440px){body.directions-driving #walk-panel{max-height:calc(100% - 112px)}body.directions-driving .steering-stick{width:80px;height:80px}body.directions-driving .drive-pedals{flex-direction:row}body.directions-driving .drive-pedal{width:58px;height:58px}body.directions-driving .map-bottom{bottom:12px}}

/* Taxi shares the fullscreen driving controls and leaves the street view clear. */
body.taxi-driving #walk-panel>:not(#taxi-hud):not(.drive-actions){display:none!important}
body.taxi-driving #taxi-hud{display:grid!important;gap:7px}
#taxi-status{font-size:16px;line-height:1.45;color:#275a3d}
#taxi-request{margin:0;font-size:15px;line-height:1.4;font-weight:700;color:#4b4330}
#taxi-request:empty{display:none}
#taxi-clock{background:#eef3dc;padding:7px;border-radius:9px;font-size:12px;font-variant-numeric:tabular-nums}
#taxi-time{font-size:27px;line-height:1;color:#315e4b}
#taxi-time-bar{display:block;width:100%;height:6px;margin-top:5px;accent-color:#4e9b60}
#taxi-clock.urgent{background:#ffe6d5}#taxi-clock.urgent #taxi-time{color:#b43b22}#taxi-clock.urgent progress{accent-color:#d44a31}
.taxi-totals{display:flex;justify-content:space-between;gap:10px;color:#315e4b;font-size:12px;font-weight:700}
body.taxi-driving #walk-panel{border-color:#f2cf58;background:#fffbeaee}

#aroha-roster{margin:12px 0}#aroha-roster section{margin:14px 0;padding:12px;border:1px solid #bfd0c8;border-radius:8px}
#aroha-roster form{margin:10px 0}#aroha-roster button{margin:3px}#aroha-roster-content{overflow-wrap:anywhere}
#aroha-roster table,.roster-print table{border-collapse:collapse;width:100%;margin:8px 0}
#aroha-roster :is(td,th),.roster-print :is(td,th){padding:4px 8px;border:1px solid #888;text-align:left}
@media print{#print-sheet article.roster-print{font:10pt system-ui,sans-serif;text-align:left;break-inside:auto}
.roster-print tr{break-inside:avoid}.roster-print thead{display:table-header-group}}
