/* FULL-SCREEN: force flex chain through all wrappers */
    html, body { height: 100%; overflow: hidden; margin: 0; }
    body { display: flex; flex-direction: column; }
    .navbar { flex-shrink: 0; }
    main, main > div { flex: 1; display: flex; flex-direction: column; min-height: 0; }
    footer, .floating-cta { display: none !important; }

    /* MAP FILLS REMAINING SPACE */
    .map-wrap { flex: 1; position: relative; min-height: 0; }
    #map { position: absolute; top: 0; left: 0; right: 0; bottom: 0; z-index: 1; }

    /* ===== SEARCH BAR (floating top-center) ===== */
    .map-search {
        position: absolute; top: 16px; left: 50%; transform: translateX(-50%);
        z-index: 1000; width: 520px; max-width: calc(100% - 32px);
    }
    .search-box {
        display: flex; align-items: center; gap: 0;
        background: white; border-radius: 28px; box-shadow: 0 4px 24px rgba(0,0,0,.15);
        padding: 4px 6px 4px 18px; border: 2px solid transparent;
        transition: border-color .2s, box-shadow .2s;
    }
    .search-box:focus-within { border-color: var(--green-primary); box-shadow: 0 4px 24px rgba(22,163,74,.2); }
    .search-box i.fa-search { color: var(--grey-400); font-size: .9rem; margin-right: 10px; }
    .search-box input {
        flex: 1; border: none; outline: none; padding: 10px 0; font-size: .9rem;
        font-family: var(--font-body); background: transparent; color: var(--grey-800);
    }
    .search-box input::placeholder { color: var(--grey-400); }
    .search-box .btn-clear {
        background: none; border: none; color: var(--grey-400); cursor: pointer; padding: 6px 10px; font-size: .85rem;
    }
    .search-box .btn-clear:hover { color: var(--grey-700); }

    /* Filter pills under search */
    .filter-row { display: flex; gap: 6px; margin-top: 10px; justify-content: center; flex-wrap: wrap; }
    .fpill {
        padding: 6px 14px; border-radius: 20px; border: none;
        background: white; box-shadow: 0 2px 8px rgba(0,0,0,.1);
        font-size: .8rem; font-weight: 600; color: var(--grey-600);
        cursor: pointer; transition: all .18s; white-space: nowrap;
    }
    .fpill:hover { background: var(--green-light); color: var(--green-dark); }
    .fpill.active { background: var(--green-primary); color: white; box-shadow: 0 2px 12px rgba(22,163,74,.3); }

    /* ===== LEFT PANEL (floating, scrollable) ===== */
    .side-panel {
        position: absolute; top: 16px; left: 16px; bottom: 16px;
        width: 360px; z-index: 900;
        display: flex; flex-direction: column;
        background: white; border-radius: 16px;
        box-shadow: 0 8px 40px rgba(0,0,0,.15);
        overflow: hidden; transition: transform .3s ease;
    }
    .side-panel.hidden { transform: translateX(calc(-100% - 24px)); }
    .panel-head {
        padding: 16px 18px; border-bottom: 1px solid var(--grey-100);
        display: flex; justify-content: space-between; align-items: center; flex-shrink: 0;
    }
    .panel-head h6 { font-family: var(--font-display); font-weight: 700; font-size: .92rem; color: var(--grey-900); margin: 0; }
    .panel-head .btn-close-panel { background: none; border: none; color: var(--grey-400); cursor: pointer; font-size: 1rem; padding: 4px; border-radius: 6px; }
    .panel-head .btn-close-panel:hover { background: var(--grey-100); color: var(--grey-700); }
    .panel-list { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
    .panel-list::-webkit-scrollbar { width: 4px; }
    .panel-list::-webkit-scrollbar-thumb { background: var(--grey-200); border-radius: 4px; }

    /* Venue card in panel */
    .v-card {
        display: flex; gap: 12px; padding: 12px; border-radius: 12px;
        border: 1.5px solid var(--grey-100); cursor: pointer; transition: all .18s;
    }
    .v-card:hover, .v-card.active { border-color: var(--green-primary); background: #f0fdf4; box-shadow: 0 2px 12px rgba(22,163,74,.1); }
    .v-card-img { width: 72px; height: 64px; border-radius: 10px; object-fit: cover; flex-shrink: 0; }
    .v-card-info { flex: 1; min-width: 0; }
    .v-card-name { font-weight: 700; font-size: .85rem; color: var(--grey-900); margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .v-card-addr { font-size: .75rem; color: var(--grey-500); margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .v-card-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
    .v-card-price { font-size: .78rem; font-weight: 700; color: var(--green-primary); }
    .v-card-badge { font-size: .68rem; background: var(--green-light); color: var(--green-dark); padding: 2px 8px; border-radius: 999px; font-weight: 600; }
    .v-card-courts { font-size: .7rem; color: var(--grey-500); }
    .v-card-actions { display: flex; gap: 6px; margin-top: 6px; }
    .v-card-actions a {
        font-size: .73rem; font-weight: 700; padding: 4px 12px; border-radius: 8px;
        text-decoration: none; transition: all .15s;
    }
    .btn-v-book { background: var(--green-primary); color: white; }
    .btn-v-book:hover { background: var(--green-dark); color: white; }
    .btn-v-detail { background: var(--grey-100); color: var(--grey-700); }
    .btn-v-detail:hover { background: var(--grey-200); color: var(--grey-900); }

    /* Toggle panel button */
    .btn-toggle-panel {
        position: absolute; top: 50%; left: 16px; transform: translateY(-50%);
        z-index: 800; width: 36px; height: 64px; border-radius: 0 10px 10px 0;
        background: white; border: none; box-shadow: 0 2px 12px rgba(0,0,0,.12);
        cursor: pointer; color: var(--grey-600); font-size: .85rem;
        display: none; align-items: center; justify-content: center;
    }
    .btn-toggle-panel:hover { background: var(--green-light); color: var(--green-primary); }

    /* ===== CUSTOM LEAFLET MARKERS ===== */
    .venue-marker {
        background: white; border: 3px solid var(--green-primary);
        border-radius: 50%; width: 44px; height: 44px;
        display: flex; align-items: center; justify-content: center;
        font-size: 1.2rem; box-shadow: 0 3px 12px rgba(0,0,0,.2);
        transition: transform .2s, box-shadow .2s;
        cursor: pointer; position: relative;
    }
    .venue-marker:hover, .venue-marker.active {
        transform: scale(1.25); box-shadow: 0 4px 20px rgba(22,163,74,.35);
        border-color: var(--green-dark); z-index: 1000 !important;
    }
    .venue-marker .marker-count {
        position: absolute; top: -6px; right: -6px;
        background: var(--green-primary); color: white;
        font-size: .6rem; font-weight: 800; width: 18px; height: 18px;
        border-radius: 50%; display: flex; align-items: center; justify-content: center;
        border: 2px solid white;
    }

    /* Cluster override */
    .marker-cluster-small, .marker-cluster-medium, .marker-cluster-large {
        background: rgba(22,163,74,.2) !important;
    }
    .marker-cluster-small div, .marker-cluster-medium div, .marker-cluster-large div {
        background: #16a34a !important; color: white !important;
        font-family: var(--font-display); font-weight: 800; font-size: .85rem;
    }

    /* Leaflet popup override */
    .leaflet-popup-content-wrapper { border-radius: 14px !important; padding: 0 !important; overflow: hidden; box-shadow: 0 8px 30px rgba(0,0,0,.18) !important; }
    .leaflet-popup-content { margin: 0 !important; width: 280px !important; }
    .leaflet-popup-tip { display: none; }
    .popup-card-img { width: 100%; height: 120px; object-fit: cover; }
    .popup-card-body { padding: 14px 16px; }
    .popup-card-name { font-family: var(--font-display); font-weight: 700; font-size: .92rem; color: var(--grey-900); margin-bottom: 4px; }
    .popup-card-addr { font-size: .78rem; color: var(--grey-500); margin-bottom: 8px; }
    .popup-card-btns { display: flex; gap: 8px; }
    .popup-card-btns a {
        flex: 1; text-align: center; padding: 8px 10px; border-radius: 8px;
        font-size: .82rem; font-weight: 700; text-decoration: none; transition: all .15s;
    }
    .popup-btn-book { background: var(--green-primary); color: white; }
    .popup-btn-book:hover { background: var(--green-dark); color: white; }
    .popup-btn-view { background: var(--grey-100); color: var(--grey-700); }
    .popup-btn-view:hover { background: var(--grey-200); color: var(--grey-900); }

    /* ===== CONTROLS (bottom-right) ===== */
    .map-controls {
        position: absolute; bottom: 24px; right: 16px; z-index: 800;
        display: flex; flex-direction: column; gap: 8px;
    }
    .map-ctrl {
        width: 42px; height: 42px; border-radius: 12px; background: white;
        border: none; box-shadow: 0 2px 12px rgba(0,0,0,.12);
        color: var(--grey-700); cursor: pointer; font-size: .9rem;
        display: flex; align-items: center; justify-content: center; transition: all .18s;
    }
    .map-ctrl:hover { background: var(--green-light); color: var(--green-primary); }

    /* MAP TYPE SWITCHER */
    .map-type-switcher {
        position: absolute; top: 76px; right: 16px; z-index: 800;
        display: flex; gap: 0; background: white; border-radius: 12px;
        box-shadow: 0 2px 12px rgba(0,0,0,.12); overflow: hidden;
    }
    .map-type-btn {
        background: white; border: none; padding: 8px 12px; cursor: pointer;
        font-size: .78rem; font-weight: 600; color: var(--grey-600);
        display: flex; align-items: center; gap: 6px; transition: all .18s;
        border-right: 1px solid var(--grey-100);
    }
    .map-type-btn:last-child { border-right: none; }
    .map-type-btn:hover { background: var(--green-light); color: var(--green-primary); }
    .map-type-btn.active { background: var(--green-primary); color: white; }
    .map-type-btn i { font-size: .8rem; }
    @media(max-width:768px) {
        .map-type-switcher { top: auto; bottom: 76px; right: 8px; }
        .map-type-btn span { display: none; }
        .map-type-btn { padding: 8px 10px; }
    }

    /* Mobile */
    @media (max-width: 768px) {
        .map-search { top: 10px; width: calc(100% - 24px); }
        .side-panel { top: auto; bottom: 0; left: 0; right: 0; width: 100%; height: 45%; border-radius: 16px 16px 0 0; }
        .side-panel.hidden { transform: translateY(100%); }
        .btn-toggle-panel { display: flex; top: auto; bottom: 16px; left: 50%; transform: translateX(-50%); width: auto; height: auto; padding: 8px 16px; border-radius: 20px; gap: 6px; font-size: .82rem; font-weight: 600; }
        .filter-row { flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start; }
    }
