@media (max-width: 768px) {
    html, body {
        overflow-x: hidden;
    }

    /* Bản đồ chiếm toàn bộ màn hình */
    .main-container { overflow: hidden; width: 100vw; max-width: 100%; }

    /* Chuyển 2 sidebar thành ngăn kéo (Drawer) */
    .sidebar, .sidebar-right {
        position: fixed;
        top: 0; bottom: 0;
        width: 75%;
        max-width: 300px;
        z-index: 2000;
        transition: transform .3s ease;
        box-shadow: 2px 0 15px rgba(0,0,0,0.2);
    }
    .sidebar {
        left: 0;
        transform: translateX(-100%); /* Ẩn về bên trái */
    }
    .sidebar-right {
        right: 0;
        transform: translateX(100%);  /* Ẩn về bên phải */
        box-shadow: -2px 0 15px rgba(0,0,0,0.2);
        /* Mobile: sidebar phải scroll toàn bộ, không chia đôi cứng */
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }
    /* Lớp class .open giúp drawer trượt ra */
    .sidebar.open { transform: translateX(0); }
    .sidebar-right.open { transform: translateX(0); }

    /* Trên mobile: mỗi section có chiều cao tối thiểu và scroll */
    .sidebar-section {
        min-height: 200px;
        max-height: 50%;
        flex: 1;
    }

    /* Lớp nền tối khi mở drawer - bỏ blur để không làm mờ bản đồ */
    .mobile-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.35);
        z-index: 1999;
        /* backdrop-filter: blur(2px); -- da xoa, giua nguyen ban do */
    }
    .mobile-overlay.show { display: block; }

    /* ---- Nút bấm nổi (FAB Buttons) ---- */
    /* Đặt top:72px để không đè lên nút zoom +/- của Leaflet */
    .mobile-fab {
        display: flex;
        position: absolute;
        width: 48px; height: 48px;
        border-radius: 50%;
        background: var(--primary);
        color: #fff;
        align-items: center;
        justify-content: center;
        font-size: 1.1rem;
        box-shadow: 0 3px 10px rgba(0,0,0,0.3);
        cursor: pointer;
        z-index: 500;
        border: none;
        top: 72px; /* Dưới nút zoom của Leaflet */
    }
    .fab-left  { left: 12px; }
    .fab-right { right: 12px; background: #1565c0; }
    .fab-map   { left: 50%; transform: translateX(-50%); background: #37474f; }

    /* ---- Bảng thông tin dạng Bottom Sheet ---- */
    /* Thay vì hiện ở góc phải, trên mobile bật từ dưới lên */
    .info-panel {
        position: fixed !important;
        top: auto !important;
        right: 0 !important;
        left: 0 !important;
        bottom: -100%;
        width: 100% !important;
        max-height: 50vh;
        border-radius: 20px 20px 0 0;
        transition: bottom .3s ease, opacity 0s;
        opacity: 1 !important;
        transform: none !important;
        pointer-events: none;
        overflow-y: auto;
    }
    .info-panel.show {
        bottom: 0 !important;
        pointer-events: all;
    }
    /* ---- Commune view: bottomPanel hien tren infoPanel ---- */
    /* Khi ca 2 panel deu hien (xem xa), dat bottomPanel len tren */
    .bottom-panel.show.commune-mode {
        bottom: 50vh !important; /* tren infoPanel (50vh) */
        max-height: 42vh;
        border-radius: 16px 16px 0 0;
    }
    .bottom-panel.show.commune-mode .bottom-panel-content {
        max-height: calc(42vh - 65px);
    }
    /* Bo nut expand tren mobile (khong can thiet) */
    #btnExpand { display: none; }
}
