/* Phone panels use the visible viewport and never share the same hit area. */
#finderToggle,#detailToggle{display:none}.detail-header{display:flex;gap:8px;align-items:flex-start}.detail-heading{min-width:0;flex:1}.detail-body{min-height:0}.detail-header .close{flex:none;position:static;min-width:36px;min-height:36px}.detail-body .detail-tags{margin-top:15px}
.mobile-layout{--viewport-height:100dvh;--viewport-width:100vw;--map-top:130px;--map-bottom:80px;--map-left:12px;--dock-bottom:80px}
.mobile-layout #app{position:fixed;top:var(--viewport-top,0px);left:var(--viewport-left,0px);width:var(--viewport-width);height:var(--viewport-height);min-height:0;overflow:hidden}
.mobile-layout .topbar{top:calc(6px + env(safe-area-inset-top,0px));left:calc(12px + env(safe-area-inset-left,0px));right:calc(12px + env(safe-area-inset-right,0px));height:46px;align-items:center;gap:8px}
.mobile-layout .brand{gap:8px}.mobile-layout .brand-mark{height:36px;width:30px;font-size:12px;line-height:15px}.mobile-layout .brand b{font-size:16px;letter-spacing:2px}.mobile-layout .brand small{display:none}.mobile-layout #mapBtn{min-width:44px;min-height:44px;padding:8px;font-size:23px}.mobile-layout #mapBtn span{display:none}
.mobile-layout .finder{left:calc(12px + env(safe-area-inset-left,0px));right:calc(12px + env(safe-area-inset-right,0px));top:calc(60px + env(safe-area-inset-top,0px));width:auto;bottom:auto;display:flex;flex-direction:column;background:#fbfef7f5;border:1px solid #d4e0ce;border-radius:13px;padding:4px;box-shadow:0 4px 20px #2443310b;z-index:15;overflow:hidden}
.mobile-layout .finder-heading,.mobile-layout .directory-source{display:none}.mobile-layout #searchForm{display:flex;align-items:center;gap:4px;flex-shrink:0}.mobile-layout .search-field{flex:1;min-width:0;border:0;box-shadow:none;margin:0;background:transparent;padding:0 7px;gap:6px;min-height:48px}.mobile-layout .search-field input{font-size:16px;padding:11px 0;min-height:44px}.mobile-layout .search-field>span{font-size:24px}.mobile-layout .search-field button{min-height:44px;min-width:40px;padding:5px}.mobile-layout #finderToggle{display:inline-flex;align-items:center;justify-content:center;min-width:48px;min-height:48px;font-size:14px;padding:8px;border-radius:9px;background:#e4eddf;color:#35664c}
.mobile-layout:not(.search-open) .category-filters,.mobile-layout:not(.search-open) .results-heading,.mobile-layout:not(.search-open) .results-scroll{display:none!important}
.mobile-layout.list-open .finder{bottom:calc(76px + env(safe-area-inset-bottom,0px));box-shadow:0 12px 32px #193f3522}
.mobile-layout .category-filters{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px;margin:6px 4px 0;padding:0;overflow:visible;flex-shrink:0}
.mobile-layout .category-filters button{min-height:44px;font-size:14px;padding:7px 2px;line-height:1.3}.mobile-layout .results-heading{display:flex;flex-shrink:0;margin:3px 7px 0;min-height:44px;height:auto;font-size:12px;gap:5px}.mobile-layout #resetSearch{min-height:44px;padding:6px;font-size:12px;margin:0 0 0 auto}.mobile-layout #resultsToggle{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;min-height:44px;padding:6px;font-size:13px;color:#285d4b;font-weight:600}
.mobile-layout:not(.list-open) .results-scroll{display:none!important}
.mobile-layout .results-scroll{position:static;display:block;flex:1;min-height:0;max-height:none;overflow:auto;border:0;border-radius:0;background:transparent;box-shadow:none;padding:0 4px 4px;overscroll-behavior:contain}.mobile-layout .result-button{padding:12px 8px;min-height:62px;gap:10px}.mobile-layout .result-text b{font-size:15px}.mobile-layout .result-text small{font-size:12px}.mobile-layout .result-text .college-match{font-size:11px}.mobile-layout .empty-results{padding:20px 10px}.mobile-layout .empty-results .btn{min-height:44px}
.mobile-layout .flat-workspace{top:var(--map-top);left:var(--map-left);right:calc(12px + env(safe-area-inset-right,0px));bottom:var(--map-bottom);border-radius:13px;min-height:80px;box-shadow:none}
.mobile-layout .map-watermark,.mobile-layout .flat-footer{display:none}.mobile-layout .map-north{left:10px;right:auto;top:10px;opacity:.65}.mobile-layout .map-north b{font-size:24px;line-height:25px}.mobile-layout .map-north small{display:none}
.mobile-layout .flat-tools{top:auto;bottom:calc(var(--map-bottom) + 10px);right:calc(20px + env(safe-area-inset-right,0px));transform:none;gap:0;z-index:5}.mobile-layout .flat-tools .tool-group{display:grid;grid-template-columns:repeat(2,44px);gap:2px;padding:4px;border-radius:12px;background:#fcfff8ed}.mobile-layout .flat-tools .tool-group button{width:44px;height:44px;font-size:23px;touch-action:manipulation}.mobile-layout .flat-tools .tool-group button:last-child{font-size:15px}.mobile-layout .flat-tools .tool-group>span,.mobile-layout #zoomLevel{display:none}
.mobile-layout .view-switch{top:auto;bottom:calc(10px + env(safe-area-inset-bottom,0px));left:50%;right:auto;transform:translateX(-50%);width:min(340px,calc(100% - 24px - env(safe-area-inset-left,0px) - env(safe-area-inset-right,0px)));height:56px;min-height:56px;display:flex;padding:5px;z-index:30;box-shadow:0 4px 18px #204c3112}.mobile-layout .view-switch button{min-height:44px;flex:1;padding:10px 6px;font-size:14px}
.mobile-layout .flat-detail{top:auto;left:calc(12px + env(safe-area-inset-left,0px));right:calc(12px + env(safe-area-inset-right,0px));bottom:var(--dock-bottom);width:auto;max-width:none;max-height:none;min-height:0;padding:12px;border-radius:15px;background:#fffef8fa;display:flex;flex-direction:column;overflow:hidden;z-index:10;box-shadow:0 4px 20px #193e2d15}
.mobile-layout .detail-header{align-items:center;flex-shrink:0;gap:4px}.mobile-layout .detail-header .close{position:static;min-width:44px;min-height:44px;padding:0;font-size:27px;line-height:44px;border-radius:8px}.mobile-layout .detail-header .eyebrow{font-size:11px;line-height:1.5;letter-spacing:.6px}.mobile-layout .detail-header h2{font-size:20px;line-height:1.4;margin:4px 0 0;padding:0;overflow-wrap:anywhere}.mobile-layout .detail-actions{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) 66px;gap:6px;margin-top:10px;flex-shrink:0}.mobile-layout .detail-actions .btn{min-height:44px;font-size:14px;padding:10px 3px}.mobile-layout #detailToggle{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:7px 3px;background:#e6eee0;border-radius:9px;color:#426a4c;font-size:13px}
.mobile-layout .flat-detail:not(.expanded) .detail-body{display:none}.mobile-layout .flat-detail.expanded{height:var(--detail-expanded-height,320px)}.mobile-layout .detail-body{overflow:auto;overscroll-behavior:contain;flex:1;min-height:0;margin-top:10px;padding:0 2px 4px;scrollbar-width:thin;border-top:1px solid #e1e8d8}.mobile-layout .detail-body #detailDesc{font-size:14px;line-height:1.8}.mobile-layout .detail-body .detail-colleges dd{font-size:14px}.mobile-layout .nearby-block button{font-size:12px;min-height:44px;padding:8px}.mobile-layout #detailSource{min-height:44px;font-size:12px}.mobile-layout .detail-tags span{font-size:11px}.mobile-layout .flat-detail .detail-note{font-size:12px!important}
.mobile-layout.search-open .flat-detail,.mobile-layout.keyboard-open .flat-detail{display:none!important}.mobile-layout.list-open .flat-tools,.mobile-layout.keyboard-open .flat-tools{visibility:hidden}
.mobile-layout .view-progress{top:calc(62px + env(safe-area-inset-top,0px));font-size:12px;padding:8px 10px;max-width:calc(100% - 24px);width:max-content}.mobile-layout #cancel3d{min-height:44px;padding:8px}.mobile-layout .toast{bottom:calc(78px + env(safe-area-inset-bottom,0px));font-size:13px;line-height:1.6;z-index:40;white-space:normal;max-width:90%}
.mobile-layout[data-view="3d"] #sceneFrame{width:100%;height:calc(100% - 76px - env(safe-area-inset-bottom,0px));min-height:0}.mobile-layout[data-view="3d"] .view-switch{top:auto;bottom:calc(10px + env(safe-area-inset-bottom,0px))}
/* Landscape reserves a real left column, rather than compressing the desktop list. */
.mobile-layout.is-landscape .finder{right:auto;width:clamp(240px,40vw,320px)}.mobile-layout.is-landscape .category-filters{display:flex;overflow:auto;scrollbar-width:none;gap:5px;margin:5px 4px 0;flex-shrink:0}.mobile-layout.is-landscape .category-filters button{flex:0 0 auto;min-width:52px;padding:7px}.mobile-layout.is-landscape .results-heading{min-height:38px}.mobile-layout.is-landscape .finder{top:calc(58px + env(safe-area-inset-top,0px))}.mobile-layout.is-landscape .flat-detail{left:calc(12px + env(safe-area-inset-left,0px));right:auto;width:clamp(240px,40vw,320px)}.mobile-layout.is-landscape .flat-detail.expanded{top:calc(58px + env(safe-area-inset-top,0px));height:auto;bottom:var(--dock-bottom)}.mobile-layout.is-landscape.detail-expanded:not(.search-open) .finder{visibility:hidden}.mobile-layout.is-landscape .view-switch{left:auto;right:calc(12px + env(safe-area-inset-right,0px));width:min(340px,calc(100% - var(--map-left) - 24px - env(safe-area-inset-right,0px)));transform:none}.mobile-layout.is-landscape[data-view="3d"] .view-switch{width:min(340px,calc(100% - 24px));left:50%;right:auto;transform:translateX(-50%)}
/* VisualViewport changes are applied by mobile-layout.js while the keyboard is open. */
.mobile-layout.keyboard-open .topbar,.mobile-layout.keyboard-open .view-switch{display:none!important}.mobile-layout.keyboard-open .finder{top:calc(6px + env(safe-area-inset-top,0px));bottom:auto;width:auto;right:calc(12px + env(safe-area-inset-right,0px));visibility:visible}.mobile-layout.keyboard-open.list-open .finder{bottom:calc(6px + env(safe-area-inset-bottom,0px))}.mobile-layout.keyboard-open .category-filters{display:none!important}.mobile-layout.keyboard-open .results-scroll{max-height:none}.mobile-layout.keyboard-open .toast{bottom:12px}
.mobile-layout dialog{width:calc(100% - 24px);max-height:calc(var(--viewport-height) - 24px);padding:14px}.mobile-layout .dialog-head button{min-width:44px;min-height:44px}.mobile-layout dialog img{max-height:calc(var(--viewport-height) - 160px)}
