/* Map-first experiment. Only /test-next/ loads this stylesheet. */
body.prototype-map { --overlay-top:calc(env(safe-area-inset-top,0px) + 8px); padding:0; overflow:hidden; }
.prototype-map .app-shell {width:100%;height:100dvh;min-height:0;border-radius:0;margin:0;display:block;background:#e8eef3;}
.prototype-map .app-header {position:absolute;z-index:60;inset:var(--overlay-top) 12px auto;min-height:44px;height:44px;padding:0;background:transparent;border:0;backdrop-filter:none;display:flex;gap:8px;flex-wrap:nowrap;}
.prototype-map .test-banner {display:none;}
.prototype-map .navigation-back {margin:0;width:44px;height:44px;min-height:44px;padding:0;font-size:0;border-radius:15px;background:#fff;box-shadow:0 3px 14px #17365c15;}
.prototype-map .navigation-back::after {content:'‹';font-size:28px;}
.prototype-map .brand-button {margin-right:auto;min-height:44px;background:#fff;padding:0 12px;border-radius:15px;box-shadow:0 3px 14px #17365c15;gap:5px;}
.prototype-map .brand-logo {width:45px;height:auto;}
.prototype-map .service-name {font-size:11px;}
.prototype-map .emergency-call {min-width:68px;height:44px;min-height:44px;padding:0 10px;background:#fff2f1;border-radius:15px;font-size:13px;white-space:nowrap;box-shadow:0 3px 14px #17365c15;}
.prototype-map .nearby-screen {position:absolute;inset:0;display:block;height:100%;min-height:0;overflow:hidden;background:transparent;}
.prototype-map .nearby-intro {display:none;}
.prototype-map .nearby-screen .map-stage,.prototype-map.result-map-view .nearby-screen .map-stage {position:absolute;inset:0;height:100%;min-height:0;max-height:none;margin:0;border-radius:0;}
.prototype-map .map-canvas {position:absolute;inset:0;border-radius:0;}
.prototype-map .nearby-screen .location-bar {position:absolute;z-index:50;top:calc(var(--overlay-top) + 52px);left:12px;right:12px;min-height:26px;padding:0;background:transparent;border:0;box-shadow:none;display:block;}
.prototype-map .location-icon,.prototype-map .location-label,.prototype-map .location-copy small,.prototype-map .location-bar .text-button {display:none;}
.prototype-map .location-copy {width:fit-content;max-width:100%;border-radius:12px;background:#fffffff2;padding:5px 10px;box-shadow:0 2px 8px #17365c10;}
.prototype-map .location-copy strong {font-size:12px!important;font-weight:500;line-height:1.4!important;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap!important;}
.prototype-map .category-grid {position:absolute;z-index:55;top:calc(var(--overlay-top) + 90px);left:0;right:0;padding:0 12px;display:flex!important;gap:6px;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:none;min-height:44px;grid-template-columns:none;}
.prototype-map .category-grid::-webkit-scrollbar {display:none;}
.category-chip {flex:0 0 auto;min-height:44px;padding:0 16px;border:1px solid #dce5ed;background:#fff;border-radius:16px;font-size:14px;font-weight:650;box-shadow:0 3px 12px #17365c12;}
.category-chip[aria-pressed='true'] {background:#096ee8;color:#fff;border-color:#096ee8;}
.prototype-map .nearby-screen .map-action-bar {position:absolute;z-index:45;top:calc(var(--overlay-top) + 146px);right:12px;left:auto;display:flex;flex-direction:column;align-items:flex-end;gap:8px;}
.prototype-map .map-action-bar button {min-height:44px;background:#fff;border:1px solid #e3eaf1;border-radius:15px;box-shadow:0 3px 14px #17365c18;max-width:190px;font-size:13px;}
.prototype-map .my-location-map-button {display:flex!important;}
.prototype-map .nearby-screen .bottom-sheet,.prototype-map .nearby-screen .bottom-sheet.has-results {position:absolute;z-index:50;inset:auto 0 0;width:100%;height:55dvh;max-height:55dvh;min-height:0;transform:none;padding:0 14px calc(8px + env(safe-area-inset-bottom,0px));border-radius:26px 26px 0 0;display:flex;flex-direction:column;overflow:hidden;box-shadow:0 -6px 25px #0f355c16;transition:transform .2s ease;}
.prototype-map .nearby-screen .bottom-sheet.is-collapsed {transform:translateY(calc(100% - 68px - env(safe-area-inset-bottom,0px)));}
.prototype-map .nearby-screen .sheet-handle-button {position:absolute;z-index:3;top:0;left:16px;display:block;min-height:66px;height:66px;width:calc(100% - 136px);margin:0;padding:0;touch-action:none;background:transparent;}
.prototype-map .nearby-screen .sheet-handle {position:absolute;top:9px;left:calc(50% - 17px);display:block;width:34px;height:4px;border-radius:4px;background:#c3ccd7;margin:0;}
.prototype-map .sheet-toggle-label,.prototype-map .sheet-toggle-icon {display:none;}
.prototype-map .sheet-heading {flex:0 0 44px;min-height:44px;margin:22px 0 0!important;display:flex;justify-content:space-between;align-items:center;pointer-events:none;}
.prototype-map .sheet-heading .eyebrow {display:none;}
.prototype-map .sheet-heading h2 {font-size:17px!important;margin:0;}
.prototype-map .result-summary {font-size:12px;}
.prototype-map .sheet-heading button {position:relative;z-index:4;pointer-events:auto;min-height:44px;flex:0 0 auto;border:0;background:#eff6ff;color:#086bd9;font-size:11px;border-radius:12px;padding:0 9px;}
.prototype-map .results-panel {min-height:0;flex:1;overflow:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;touch-action:pan-y;}
.prototype-map .results-header {display:none;}
.prototype-map .result-view-switch {display:none;}
.prototype-map .department-filter {padding:8px 0;margin:0;border:0;background:transparent;display:flex;align-items:center;gap:8px;flex-wrap:wrap;}
.prototype-map .department-filter label {font-size:12px;margin:0;}
.prototype-map .department-filter select {min-height:40px;width:auto;flex:1;min-width:100px;font-size:13px;}
.prototype-map .department-filter p {font-size:11px;margin:0;flex-basis:100%;}
.prototype-map .department-filter:has(select:not(:disabled)) p {display:none;}
.prototype-map .facility-address {display:none;}
.prototype-map .facility-hours {margin:3px 0;font-size:11px;gap:4px;}
.prototype-map .facility-hours strong {font-size:11px;line-height:1.2;}
.prototype-map .hours-status {min-height:20px;padding:2px 6px;font-size:10px;}
.prototype-map .facility-actions {margin-top:4px;}
.prototype-map .radius-controls {display:flex;gap:6px;overflow-x:auto;margin:6px 0 10px;}
.prototype-map .radius-button {min-height:36px;font-size:12px;padding:4px 10px;flex:0 0 auto;}
.prototype-map .open-now-filter {min-height:36px;font-size:12px;}
.prototype-map .facility-list,.prototype-map.result-map-view .facility-list {display:grid!important;grid-template-columns:1fr;gap:8px;}
.prototype-map .facility-card {padding:10px 12px;border-radius:16px;}
.prototype-map .facility-card-heading strong {font-size:15px!important;line-height:1.35!important;}
.prototype-map .facility-type-label {display:none;}
.prototype-map .facility-card p {font-size:11px;margin:5px 0;}
.prototype-map .facility-card .facility-actions {display:flex;gap:6px;}
.prototype-map .facility-card a,.prototype-map .facility-card button {min-height:44px;font-size:13px;}
.prototype-map .safety-notice,.prototype-map .nearby-copyright {font-size:11px;margin:14px 0 6px;}
.prototype-map .bottom-sheet>.safety-notice,.prototype-map .bottom-sheet>.nearby-copyright {display:none;}
.prototype-map .list-information {padding:12px 2px;color:#718093;font-size:11px;line-height:1.6;}
.prototype-map .toast {top:calc(var(--overlay-top) + 198px);bottom:auto;max-width:calc(100% - 24px);font-size:12px;}
/* prototype.2: shared controls have individual opaque surfaces, no top scrim. */
.prototype-map .app-header,.prototype-map .location-bar,.prototype-map .category-grid,.prototype-map .map-action-bar {background:none!important;background-image:none!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;}
.prototype-map .location-copy,.prototype-map .brand-button,.prototype-map .map-action-bar button {background:#fff;border:1px solid #e1e7ef;backdrop-filter:none;-webkit-backdrop-filter:none;}
.prototype-map .bottom-sheet {background:#fff;backdrop-filter:none!important;}
.prototype-map .emergency-call {min-width:62px;padding:0 9px;background:#fff2f1;border:1px solid #ffd5d2;}
.prototype-map .nearby-screen .map-action-bar {inset:auto 12px calc(68px + env(safe-area-inset-bottom,0px) + 16px) auto;pointer-events:none;}
.prototype-map .map-action-bar button {pointer-events:auto;}
.prototype-map .my-location-map-button {width:44px;height:44px;min-width:44px;padding:0!important;border-radius:50%!important;font-size:24px!important;justify-content:center;}
.prototype-map .map-center-search-button {position:fixed;top:calc(var(--overlay-top) + 146px);right:12px;}
.prototype-map:has(.bottom-sheet:not(.is-collapsed)) .map-action-bar {bottom:calc(45dvh + 16px + env(safe-area-inset-bottom,0px));}
.prototype-map .nearby-screen .bottom-sheet,.prototype-map .nearby-screen .bottom-sheet.has-results {height:45dvh;max-height:45dvh;}
@media (min-width:768px) and (max-width:1023px) {
 .prototype-map .nearby-screen .bottom-sheet,.prototype-map .nearby-screen .bottom-sheet.has-results {left:50%;right:auto;width:min(560px,calc(100% - 32px));max-width:560px;transform:translateX(-50%);}
 .prototype-map .nearby-screen .bottom-sheet.is-collapsed {transform:translate(-50%,calc(100% - 68px - env(safe-area-inset-bottom,0px)));}
 .prototype-map .nearby-screen .map-action-bar,.prototype-map:has(.bottom-sheet:not(.is-collapsed)) .map-action-bar {bottom:24px;right:24px;}
}
@media (min-width:1024px) {
 .prototype-map {--side-width:400px;}
 .prototype-map .nearby-screen::before {content:'';position:absolute;z-index:10;inset:0 auto 0 0;width:var(--side-width);background:#fff;border-right:1px solid #e0e7ef;}
 .prototype-map .nearby-screen .map-stage,.prototype-map.result-map-view .nearby-screen .map-stage {left:var(--side-width);right:0;width:calc(100% - var(--side-width));}
 .prototype-map .app-header {left:16px;right:auto;width:calc(var(--side-width) - 32px);top:16px;height:52px;}
 .prototype-map .brand-button {padding:0 12px;box-shadow:none;border:0;}
 .prototype-map .brand-logo {width:72px;}
 .prototype-map .service-name {font-size:16px;letter-spacing:1px;}
 .prototype-map .emergency-call {position:fixed;right:20px;top:20px;}
 .prototype-map .nearby-screen .location-bar {left:16px;right:auto;width:calc(var(--side-width) - 32px);top:78px;}
 .prototype-map .location-copy {max-width:100%;}
 .prototype-map .category-grid {left:0;right:auto;width:var(--side-width);top:122px;padding:0 16px;}
 .prototype-map .nearby-screen .bottom-sheet,.prototype-map .nearby-screen .bottom-sheet.has-results,.prototype-map .nearby-screen .bottom-sheet.is-collapsed {left:0;right:auto;top:182px;bottom:0;width:var(--side-width);height:calc(100dvh - 182px);max-height:none;transform:none;border:0;border-radius:0;box-shadow:none;padding:0 16px 16px;transition:none;}
 .prototype-map .nearby-screen .sheet-handle-button {display:none!important;}
 .prototype-map .sheet-heading {margin:0!important;min-height:44px;}
 .prototype-map .results-panel {overflow-y:auto;touch-action:pan-y;}
 .prototype-map .open-now-filter,.prototype-map .radius-controls {display:flex!important;}
 .prototype-map .facility-address {display:block!important;}
 .prototype-map .nearby-screen .map-action-bar,.prototype-map:has(.bottom-sheet:not(.is-collapsed)) .map-action-bar {bottom:24px;right:24px;}
 .prototype-map .map-center-search-button {top:80px;right:20px;}
 .prototype-map .facility-detail-sheet {max-width:640px;}
}
/* prototype.3: direct compact filters and independent map controls. */
.prototype-map .compact-filter-row {display:flex;align-items:flex-start;gap:6px;margin:6px 0 10px;flex-wrap:wrap;}
.prototype-map .compact-filter-row .department-filter {flex:1 1 120px;min-width:0;padding:0;gap:0;}
.prototype-map .department-filter label {position:absolute;width:1px;height:1px;clip-path:inset(50%);overflow:hidden;}
.prototype-map .department-filter select {width:100%;min-width:0;min-height:44px;margin:0;border-radius:12px;font-size:13px;padding:0 24px 0 10px;}
.prototype-map .compact-filters {display:flex;gap:6px;flex:0 0 auto;}
.prototype-map .compact-filters .open-now-filter {display:flex!important;align-items:center;justify-content:center;min-height:44px;height:44px;white-space:nowrap;font-size:12px;padding:0 9px;margin:0;border-radius:12px;}
.prototype-map .radius-select {min-height:44px;height:44px;width:80px;background:#fff;border:1px solid #dce5ed;border-radius:12px;font-size:13px;padding:0 20px 0 9px;}
.prototype-map .nearby-screen .sheet-handle-button {left:0;width:100%;}
.prototype-map .nearby-screen .sheet-handle {left:50%;transform:translateX(-50%);}
.prototype-map .sheet-heading button {z-index:5;}
.prototype-map .map-center-search-button {left:50%;right:auto;transform:translateX(-50%);top:calc(var(--overlay-top) + 146px);border-radius:24px!important;white-space:nowrap;max-width:none;}
@media (min-width:1024px) {
 .prototype-map .map-center-search-button {left:calc(var(--side-width) + (100% - var(--side-width))/2);right:auto;top:20px;}
 .prototype-map .compact-filter-row {flex-wrap:nowrap;}
}

/* CG-1013-07: one map/list surface, aligned controls and shared accents. */
.prototype-map .department-filter select,.prototype-map .compact-filters .open-now-filter,.prototype-map .radius-select {height:44px;min-height:44px;max-height:44px;box-sizing:border-box;align-self:center;line-height:normal;}
.prototype-map .department-filter select,.prototype-map .radius-select {appearance:none;-webkit-appearance:none;padding:0 26px 0 10px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='m1 1 5 5 5-5' stroke='%23546475' stroke-width='2' fill='none'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 9px center;}
.category-chip {color:color-mix(in srgb,var(--category-accent) 65%,#162536);border-color:color-mix(in srgb,var(--category-accent) 35%,#fff);background:#fff;}
.category-chip[aria-pressed='true'] {background:color-mix(in srgb,var(--category-accent) 75%,#000);color:#fff;border-color:var(--category-accent);box-shadow:inset 0 0 0 1px var(--category-accent);font-weight:750;}
.category-chip[aria-pressed='true']::before {content:'✓';margin-right:4px;font-size:12px;}
.handset-icon {width:18px;height:18px;flex:0 0 18px;}
.prototype-map .emergency-call {gap:5px;min-height:44px;}
.prototype-map .nearby-screen .location-bar {display:flex;align-items:center;gap:5px;top:calc(var(--overlay-top) + 52px);padding:0 4px;min-height:30px;}
.prototype-map .address-pin {width:13px;height:16px;flex:0 0 13px;color:#536477;}
.prototype-map .location-copy {width:auto;min-width:0;max-width:calc(100% - 18px);background:#fff;border:0;border-radius:4px;box-shadow:none;padding:3px 4px;}
.prototype-map .location-copy strong {display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap!important;}
@media (min-width:768px) and (max-width:1023px) {
 .prototype-map .app-header,.prototype-map .nearby-screen .location-bar,.prototype-map .category-grid {left:50%;right:auto;width:560px;max-width:calc(100% - 32px);transform:translateX(-50%);}
 .prototype-map .category-grid {padding:0;}
}
@media (min-width:1024px) {
 .prototype-map .nearby-screen .location-bar {top:78px;}
}

/* CG-1014-01: logical snaps, capped below the measured top control stack. */
@media (max-width:1023px) {
 .prototype-map .nearby-screen .bottom-sheet {transition:height .2s ease,transform .2s ease;--sheet-top-limit:calc(env(safe-area-inset-top,0px) + 202px);}
 .prototype-map .nearby-screen .bottom-sheet.is-expanded {height:calc(100dvh - var(--sheet-top-limit));max-height:calc(100dvh - var(--sheet-top-limit));transform:none;}
 .prototype-map:has(.bottom-sheet.is-expanded) .map-action-bar {bottom:calc(100dvh - var(--sheet-top-limit,202px) + 8px);}
}
@media (min-width:768px) and (max-width:1023px) {
 .prototype-map .nearby-screen .bottom-sheet.is-expanded {transform:translateX(-50%);}
 .prototype-map:has(.bottom-sheet.is-expanded) .map-action-bar {bottom:24px;}
}
@media (prefers-reduced-motion:reduce) {
 .prototype-map .nearby-screen .bottom-sheet {transition:none;}
}
