body {
            margin: 0;
            padding: 24px 16px 40px;
            font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
            background-color: #f4f6fb;
            display: flex;
            justify-content: center;
        }

        .page {
            width: 100%;
            max-width: 1200px;
            text-align: center;
        }

        h1 {
            margin: 0 0 16px;
            font-weight: 600;
            font-size: 24px;
        }

        .map-container {
            position: relative;
            width: 100%;
        }

        .map-wrap {
            width: 100%;
            border-radius: 20px;
            overflow: hidden;
            box-shadow: 0 12px 30px rgba(15, 23, 42, 0.18);
        }

        #map {
            height: 600px;
            width: 100%;
        }

        .filters {
            position: absolute;
            top: 12px;
            right: 12px;
            z-index: 1000;
            display: flex;
            flex-direction: column;
            align-items: flex-end;
            gap: 8px;
            padding: 8px 10px;
            border-radius: 12px;
            background-color: rgba(255, 255, 255, 0.95);
            width: max-content;
        }

        .legend {
            margin-top: 16px;
            padding: 12px 16px;
            border-radius: 20px;
            background-color: #ffffff;
            box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
            display: inline-flex;
            gap: 16px;
            align-items: center;
            justify-content: center;
            flex-wrap: wrap;
        }

        .legend-item {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            font-size: 14px;
        }

        .legend-icon {
            width: 24px;
            height: 24px;
            object-fit: contain;
        }

        .filter-toggle {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            padding: 6px 14px;
            border-radius: 999px;
            background-color: #ffffff;
            border: 1px solid #d0d7e2;
            box-shadow: 0 4px 10px rgba(15, 23, 42, 0.08);
            font-size: 14px;
            cursor: pointer;
            user-select: none;
        }

        .filter-icon {
            width: 26px;
            height: 26px;
            object-fit: contain;
            display: none; /* по умолчанию иконку используем только на мобилке */
        }

        .filter-toggle input[type="checkbox"] {
            width: 18px;
            height: 18px;
            cursor: pointer;
        }

        /* Маркеры на карте: иконка в белом кружке с тенью */
        .marker-badge-wrap {
            background: transparent !important;
            border: none !important;
        }

        .marker-badge {
            width: 36px;
            height: 36px;
            border-radius: 50%;
            background: #ffffff;
            border: 2px solid rgba(0, 0, 0, 0.35);
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 3px; /* меньше паддинг — иконка внутри ~15% крупнее */
            box-sizing: border-box;
        }

        .marker-badge img {
            width: 100%;
            height: 100%;
            object-fit: contain;
        }

        /* Иконка палатки (mobile heating) чуть меньше, чем остальные */
.marker-badge img[src*="heating-mobile"] {
            width: 90%;
            height: 90%;
        }

        /* Кластеры: без жёлтых кружков с цифрами, та же иконка что и у маркеров */
        .marker-cluster,
        .marker-cluster-small,
        .marker-cluster-medium,
        .marker-cluster-large,
        .leaflet-cluster-anim .marker-cluster {
            background: transparent !important;
            border: none !important;
        }
        .marker-cluster div {
            margin: 0 !important;
            background: transparent !important;
            border: none !important;
        }

        /* Мобильная верстка: фильтры отдельным блоком над картой */
        @media (max-width: 768px) {
            .map-container {
                display: flex;
                flex-direction: column;
                gap: 0;
            }

            .filters {
                position: static;
                order: 0;
                flex-direction: row;
                flex-wrap: wrap;
                align-items: center;
                justify-content: center;
                width: auto;
                max-width: none;
                margin-bottom: 12px;
                padding: 0;
                background: none;
                border-radius: 0;
                gap: 8px;
            }

            .map-wrap {
                margin-left: auto;
                margin-right: auto;
                max-width: 100%;
            }

            /* На мобилке карта ниже делается ниже, чтобы легенда всегда умещалась в экран */
            #map {
                height: 45vh;
            }

            .filter-toggle {
                padding: 6px 10px;
                font-size: 12px;
            }

            .filter-toggle .filter-icon {
                width: 28px;
                height: 28px;
            }

            /* на мобилке у всех фильтров — иконка вместо текста */
            .filter-toggle .filter-label {
                display: none;
            }

            .filter-toggle .filter-icon {
                display: inline-block;
            }

            .page {
                margin: 0 auto;
                padding: 0 12px;
            }

            /* Легенда списком на мобилке */
            .legend {
                display: flex;
                flex-direction: column;
                align-items: flex-start;
                text-align: left;
                width: 100%;
                max-width: 100%; /* по ширине как карта */
                margin-left: 0;
                margin-right: 0;
                /* по горизонтали как карта: опираемся только на паддинг .page (0 12px) */
                padding: 12px 0;
            }

            .legend-item {
                display: flex;
                align-items: center;
                gap: 8px;
                padding-left: 10px; /* сильнее смещаем иконку и текст левее внутри блока */
            }
        }

.map-error {
    margin: 0;
    padding: 16px;
    color: #9b1c1c;
    background: #fff;
    text-align: center;
}
