/* One school journey: grade, then school; district is an optional filter. */
body.atlas-school-tool .search-main-fields{display:grid;grid-template-columns:minmax(220px,.7fr) minmax(280px,1.3fr);gap:18px;align-items:start}
body.atlas-school-tool .search-main-fields label{display:block;font-weight:500;margin-bottom:6px;color:#173f32}
body.atlas-school-tool .search-main-fields :is(input,select){display:block;width:100%;min-width:0;margin:6px 0 0;background:#fffdf7;color:#173f32;border:1px solid #9cae97;padding:10px 12px;border-radius:7px}
body.atlas-school-tool .search-main-fields>div{min-width:0;max-width:100%}
.school-filter{display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin-top:12px;min-width:0;max-width:100%}
.school-filter label{font-size:14px!important}
.school-filter select{font-size:15px!important;min-height:44px!important;margin:0!important}
body.atlas-school-tool .school-filter label{flex:0 1 auto;width:auto;min-width:0;max-width:100%;white-space:normal}
body.atlas-school-tool .school-filter #district-select{flex:1 1 220px;width:100%;min-width:0;max-width:100%;box-sizing:border-box}
.school-search-field{position:relative}.school-search-choices{display:grid;gap:5px;margin-top:8px;max-height:300px;overflow-y:auto;padding:6px;background:#fffdf7;border:1px solid #a8b89e;border-radius:7px}
.school-search-choices[hidden]{display:none!important}.school-search-option{width:100%;text-align:left;white-space:normal;min-height:46px;padding:9px 12px;border:1px solid #c9d5c1;background:#fffdf7;color:#173f32;font:500 16px/1.6 var(--yb-sans);border-radius:5px;cursor:pointer}
body.yb-refined .school-search-option:is(:hover,:active,:focus-visible,[aria-selected=true]){background:#174b3c!important;color:#fffdf7!important;border-color:#174b3c!important}
.school-filter label,.school-search-hint,.location-status{font-size:15px;line-height:1.75}.school-search-hint{margin:8px 0 0;color:#4f6256}.onepass-actions{margin-top:16px}.location-status{margin:12px 0 0}.map-search-workspace{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,1fr);gap:24px;align-items:start}.search-map-pane,.search-result-pane{min-width:0}.search-result-pane:has(#planner-result[hidden]):has(#village-result[hidden]){display:none}.map-search-workspace:has(#planner-result[hidden]):has(#village-result[hidden]){grid-template-columns:minmax(0,1fr)}
.map-area-title{font-size:23px!important;margin:0 0 12px}.school-scope-summary{margin:10px 0;padding:12px 14px;border-left:3px solid #174b3c;background:#eef1e6;color:#173f32;line-height:1.8}.map-load-status{font-size:14px!important;line-height:1.7;margin:10px 0}.school-no-guarantee{padding:12px;border-left:3px solid #9b7434;background:#fff4dc;color:#4d3b20!important;font-weight:500!important}.school-known-conditions{border-top:1px solid #cdd8c5;margin-top:20px;padding-top:14px}.school-year-boundary{color:#654a20!important;background:#fff3db;padding:10px 12px}.school-priority-reference{margin-top:10px}.planner-result :is(details,section){max-width:100%}.planner-result details>summary{min-height:44px;padding:9px 0;cursor:pointer}.onepass-school-links{display:flex;flex-wrap:wrap;gap:10px 16px;margin:16px 0}.onepass-school-links a,.planner-sources>a{display:inline-flex;align-items:center;min-height:44px}.planner-contact{display:flex;flex-wrap:wrap;gap:10px;margin-top:10px}.planner-contact a{padding:10px 14px;border:1px solid #174b3c;background:#174b3c!important;color:#fffdf7!important;border-radius:6px;text-decoration:none}.planner-contact a:is(:hover,:active,:focus-visible){background:#123c30!important;color:#fffdf7!important}
.search-school-pin{background:#174b3c;border:2px solid #fffdf7;border-radius:15px 15px 15px 3px;box-shadow:0 2px 6px #173f3260;color:#fffdf7;display:grid!important;place-items:center;font:500 15px/1 var(--yb-sans)}.search-school-label{background:#fffdf7;color:#173f32;border:1px solid #174b3c;font:500 15px/1.6 var(--yb-sans);width:max-content;white-space:normal;max-width:220px;text-align:center}.search-school-label:before{border-top-color:#174b3c!important}
@media(max-width:900px){body.atlas-school-tool .search-main-fields{grid-template-columns:minmax(0,1fr)}.map-search-workspace{display:flex;flex-direction:column}.search-map-pane,.search-result-pane{width:100%}.search-result-pane{order:0}.search-map-pane{order:1}.school-filter{align-items:flex-start}.school-filter select{flex:1;min-width:0}.school-search-choices{max-height:260px}}
@media(max-width:390px){.school-filter{display:block}.school-filter label{margin-bottom:6px!important}.school-search-option{padding:10px 8px;font-size:15px}}

/* Village boundaries and rule overlays remain distinct from school catchment outlines. */
.village-map-legend{display:flex;flex-wrap:wrap;gap:8px 16px;font-size:14px;line-height:1.6;margin:12px 0;color:#294b3d}.village-map-legend>span{display:inline-flex;align-items:center;gap:7px}.village-map-legend i{width:23px;height:14px;display:inline-block;flex:none}.village-border-key{border:2px dashed #58685e}.school-range-key{border:3px solid #205d49;background:#d9e8de}.conditional-range-key{border:1px dashed #79561f;background:repeating-linear-gradient(135deg,#79561f 0 1px,#fff4dc 1px 6px)}
body.atlas-school-tool .village-label{pointer-events:auto;white-space:nowrap;max-width:none;padding:0;border:none;background:none;box-shadow:none;text-shadow:none;font-size:15px;color:#173f32}.village-label button{font:500 15px/1.4 var(--yb-sans);color:#173f32;background:#fffdf7eF;border:1px solid #7e9181;border-radius:5px;padding:5px 8px;min-height:44px;white-space:nowrap;cursor:pointer;box-shadow:0 1px 3px #193b2c25}.village-label.selected-village-label{z-index:1000!important}.village-label.selected-village-label button{color:#fffdf7!important;background:#174b3c!important;border:2px solid #fffdf7;box-shadow:0 0 0 2px #8b5e13;font-weight:700}.village-label button:is(:hover,:focus-visible){background:#174b3c!important;color:#fffdf7!important;outline:2px solid #8b5e13;outline-offset:2px}
.village-result{padding:22px;background:#fffdf7;color:#173f32;border:1px solid #a8b89e;border-radius:10px;line-height:1.8;min-width:0;overflow-wrap:anywhere}.village-result[hidden]{display:none!important}.village-result h2{font-size:24px!important;line-height:1.5}.village-result h3{font-size:18px!important;margin:12px 0 8px}.village-result p{margin:8px 0!important;font-size:16px!important;color:#294b3d!important}.village-school-list{display:flex;flex-wrap:wrap;gap:8px}.village-result .village-school-choice{white-space:normal;text-align:left;min-height:44px;min-width:44px;padding:8px 12px;border:1px solid #557563;border-radius:6px;background:#fffdf7;color:#173f32;font:500 16px/1.6 var(--yb-sans)}body.yb-refined .village-school-choice:is(:hover,:active,:focus-visible){background:#174b3c!important;color:#fffdf7!important}.village-rule-details{margin-top:12px;border-top:1px solid #c9d5c1}.village-rule-details>summary{font-size:17px!important;min-height:44px;padding:10px 0;cursor:pointer}.village-rule-group{padding:12px 0;border-top:1px solid #d7dfd0}.village-rule-group h3{display:flex;align-items:center;gap:8px}.village-rule-swatch{display:inline-block;width:16px;height:16px;flex:none;border:1px solid #294b3d;border-radius:3px}.village-result .village-rule-warning{padding:10px 12px;background:#fff3db;border-left:3px solid #8b5e13;color:#573e1c!important}.village-result>a{display:inline-flex;align-items:center;min-height:44px;color:#174b3c!important}.village-result .village-year,.village-result .village-map-key{font-size:14px!important}
body.atlas-school-tool .planner-transfer-choice{display:flex;align-items:center;gap:9px;margin-top:14px;color:#173f32;font:500 16px/1.6 var(--yb-sans);min-height:44px}body.atlas-school-tool .planner-transfer-choice input{appearance:auto;width:20px!important;height:20px!important;min-height:20px!important;margin:0;padding:0;flex:none;accent-color:#174b3c}.onepass-actions{display:flex;flex-wrap:wrap;align-items:center;gap:10px}.onepass-actions .planner-caption{flex:1 1 230px;margin:0!important}body.atlas-school-tool .school-new-query{background:#fffdf7;color:#173f32;border:1px solid #557563;border-radius:7px;min-height:44px;padding:10px 14px;font:500 16px/1.5 var(--yb-sans)}body.yb-refined .school-new-query:is(:hover,:active,:focus-visible){background:#174b3c!important;color:#fffdf7!important}
body.atlas-school-tool #map{touch-action:none!important}body.atlas-school-tool #map .leaflet-pane,body.atlas-school-tool #map .leaflet-interactive{touch-action:none!important}.map-page-scroll .leaflet-control-zoom a{width:44px;height:44px;line-height:44px}.map-page-scroll .leaflet-control-zoom{margin-top:64px}.map-page-scroll .village-label button{min-height:44px}.maptools{flex-wrap:wrap;justify-content:flex-end;max-width:calc(100% - 24px)}
@media(max-width:900px){.village-result{padding:18px}.village-map-legend{font-size:13px;gap:6px 12px}.village-label button{font-size:14px}.village-result h2{font-size:22px!important}}

body.atlas-school-tool #map .leaflet-interactive[role=button]:focus-visible{outline:3px solid #9b7434;outline-offset:3px;stroke:#8b5e13;stroke-width:3px}

body.atlas-school-tool #map{isolation:isolate}body.atlas-school-tool .maptools{z-index:1001}

/* r2: compact visual nameplates; the village polygon and invisible 44px target remain clickable. */
body.yb-refined.yb-atlas.atlas-school-tool #map .village-label button{position:relative;display:block;width:auto!important;min-width:0!important;min-height:0!important;height:auto!important;font-size:13px!important;line-height:1.35!important;padding:2px 5px!important;letter-spacing:0!important}
body.yb-refined.yb-atlas.atlas-school-tool #map .village-label button::before{content:'';position:absolute;left:50%;top:50%;width:max(100%,44px);height:max(100%,44px);transform:translate(-50%,-50%)}

/* School colors are map-only; gesture capture stays inside #map, leaving the surrounding page scroll unchanged. */
.school-color-tools{margin:14px 0;color:#173f32}.school-color-switch{display:flex;flex-wrap:wrap;gap:8px}.school-color-switch button{min-height:44px;min-width:110px;padding:8px 14px;border:1px solid #557563;border-radius:6px;background:#fffdf7;color:#173f32;font:500 16px/1.5 var(--yb-sans)}body.yb-refined .school-color-switch button[aria-pressed=true]{background:#174b3c!important;color:#fffdf7!important;border-color:#174b3c!important}.school-color-caption{font-size:14px!important;line-height:1.7;margin:8px 0!important;color:#294b3d!important}.school-color-key>summary{min-height:44px;padding:8px 0;font-size:15px;cursor:pointer}.school-color-school-list{display:flex;flex-wrap:wrap;gap:8px 16px;padding:8px 0}.color-school-key{display:inline-flex;align-items:center;gap:7px;font-size:14px;line-height:1.7}.color-school-key i{display:inline-block;flex:none;width:16px;height:16px;border:1px solid #63776d;border-radius:3px}.map-touch-hint{display:none;font-size:14px!important;line-height:1.7;color:#294b3d!important;margin:8px 0!important}#school-color-tools[hidden]{display:none!important}
@media(pointer:coarse),(max-width:900px){.map-touch-hint{display:block}}
