@media (max-width: 900px) {
    .cwdbc-map-app {
        padding: 22px;
    }
    .cwdbc-map-intro {
        grid-template-columns: 1fr;
    }
    .cwdbc-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    .cwdbc-stat--date {
        grid-column: 1 / -1;
    }
    .cwdbc-map-shell {
        grid-template-columns: 1fr;
        min-height: 0;
        overflow: visible;
    }
    .cwdbc-map-main {
        border-radius: 12px;
        overflow: hidden;
    }
    .cwdbc-map-sidebar {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 10050;
        max-height: 82vh;
        overflow: auto;
        border-radius: 20px 20px 0 0;
        padding: 16px 18px 24px;
        transform: translateY(105%);
        transition: transform 0.22s ease;
        box-shadow: 0 -18px 50px rgba(0, 0, 0, 0.35);
    }
    .cwdbc-map-sidebar.is-open {
        transform: translateY(0);
    }
    .cwdbc-filter-drawer__head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding-bottom: 12px;
        margin-bottom: 5px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.14);
        font-size: 18px;
    }
    .cwdbc-filter-close {
        width: 36px;
        height: 36px;
        border: 1px solid rgba(255, 255, 255, 0.2);
        border-radius: 50%;
        background: transparent;
        color: #fff;
        font-size: 24px;
        line-height: 1;
        cursor: pointer;
    }
    .cwdbc-map-sidebar section {
        margin: 0;
        padding: 14px 0;
    }
    .cwdbc-filter-backdrop {
        position: fixed;
        inset: 0;
        z-index: 10040;
        background: rgba(2, 18, 31, 0.58);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition:
            opacity 0.22s ease,
            visibility 0.22s ease;
    }
    .cwdbc-filter-backdrop.is-open {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }
    .cwdbc-mobile-map-actions {
        display: flex;
        justify-content: flex-end;
        margin-bottom: 9px;
        position: sticky;
        top: 8px;
        z-index: 1001;
        pointer-events: none;
    }
    .cwdbc-filter-toggle {
        pointer-events: auto;
    }
    .cwdbc-filter-toggle {
        display: inline-flex;
        align-items: center;
        gap: 7px;
        border: 1px solid rgba(255, 255, 255, 0.28);
        border-radius: 999px;
        background: #072e4d;
        color: #fff;
        padding: 9px 14px;
        font-weight: 800;
        cursor: pointer;
    }
    .cwdbc-filter-toggle b {
        display: inline-grid;
        place-items: center;
        min-width: 20px;
        height: 20px;
        padding: 0 5px;
        border-radius: 10px;
        background: var(--cwd-gold);
        color: #102234;
        font-size: 11px;
    }
    .cwdbc-map-canvas {
        height: 560px;
    }
    .cwdbc-map-note {
        grid-template-columns: 1fr;
    }
    .cwdbc-filters-open {
        overflow: hidden;
    }

    .cwdbc-region-tabs {
    	padding: 8px 10px;
    }
}
@media (max-width: 650px) {
    .cwdbc-map-app {
        padding: 34px;
        border-radius: 0;
        margin-left: -15px;
        margin-right: -15px;
    }
    .cwdbc-map-intro h1 {
        font-size: 39px;
    }
    .cwdbc-map-intro__copy > p {
        font-size: 16px;
    }
    .cwdbc-notice {
        padding: 13px;
    }
    .cwdbc-stats {
        grid-template-columns: 1fr 1fr;
    }
    .cwdbc-stat {
        grid-template-columns: 38px auto;
        padding: 10px;
        min-height: 70px;
    }
    .cwdbc-stat__icon {
        width: 35px;
        height: 35px;
    }
    .cwdbc-stat strong {
        font-size: 23px;
    }
    .cwdbc-stat > span:last-child,
    .cwdbc-stat div span {
        font-size: 11px;
    }
    .cwdbc-map-searchbar {
        display: grid;
        grid-template-columns: 1fr;
    }
    .cwdbc-near-me {
        height: 43px;
    }
    .cwdbc-search-status {
        margin-bottom: 6px;
    }
    .cwdbc-region-tabs {
        scroll-snap-type: x proximity;
    }
    .cwdbc-region-tabs button {
        padding: 12px;
        scroll-snap-align: start;
    }
    .cwdbc-region-tabs button.is-active {
        margin: 5px;
        padding: 8px 14px;
    }
    .cwdbc-map-canvas {
        height: 64vh;
        min-height: 450px;
        max-height: 650px;
    }
    .cwdbc-map-legend {
        gap: 9px;
        font-size: 10px;
        padding: 9px 10px;
    }
    .cwdbc-mobile-results {
        display: block;
        background: #062b49;
        color: #fff;
        border-radius: 0 0 12px 12px;
        overflow: hidden;
    }
    .cwdbc-mobile-results > button {
        width: 100%;
        border: 0;
        background: #062b49;
        color: #fff;
        padding: 12px 16px;
        text-align: left;
        font-weight: 800;
    }
    .cwdbc-mobile-results > [data-results-list] {
        display: none;
        max-height: 280px;
        overflow: auto;
        padding: 0 16px;
    }
    .cwdbc-mobile-results.is-open > [data-results-list] {
        display: block;
    }
    .cwdbc-map-note {
        padding: 15px 3px;
    }
    .cwdbc-data-credit {
        font-size: 11px !important;
    }
    .cwdbc-map-popup .leaflet-popup-content-wrapper {
        max-height: 58vh;
        overflow: auto;
    }
    .cwdbc-map-popup .leaflet-popup-content {
        min-width: 220px;
    }
    .cwdbc-popup-card {
        min-width: 220px;
    }
    .cwdbc-popup-actions {
        grid-template-columns: 1fr;
    }
    .cwdbc-popup-actions .cwdbc-detail-button,
    .cwdbc-popup-actions .cwdbc-share-button {
        width: 100%;
        box-sizing: border-box;
    }
    .leaflet-popup {
        max-width: calc(100vw - 36px) !important;
    }
    .leaflet-popup-content-wrapper {
        max-width: calc(100vw - 36px) !important;
    }
}
