    html, body {
        height: 100%;
        padding: 0;
        margin: 0;
    }
    #map {
        width: 100%;
        height: 100%;
    }
    .leaflet-control-attribution > a {
        display: none;
    }

    .user-name-label {
        display: flex;
        justify-content: center;
        align-items: center;
        white-space: nowrap;
        pointer-events: none;
        text-align: center;
    }

    .user-name-text {
        color: rgba(58, 58, 58, 0.47);
        font-size: 8px;
        font-weight: 500;
    }

    .msg {
        position: absolute;
        font-size: 2em;
        color: #ffffff;
        z-index: 10000;
        margin-left: 40%;
        margin-top: 5%;
        background-color: rgba(63, 62, 62, 0.55);
    }

    @keyframes screen-blink {
        0% { background-color: rgba(255, 0, 0, 0.1); }
        50% { background-color: rgba(255, 0, 0, 0.5); }
        100% { background-color: rgba(255, 0, 0, 0.1); }
    }

    .screen-blink {
        display: none;
        font-size: 2em;
        color: #ffffff;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: 1000;
        pointer-events: none; /* Не блокировать клики */
        animation: screen-blink 0.5s linear infinite;
    }

    #overlay-text {
        position: absolute;
        top: 45%;
        left: 50%;
        transform: translate(-50%, -50%);
        color: white;
        font-size: 24px;
        font-weight: bold;
        text-align: center;
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
    }

    #bg-text {
        display: none;
        position: fixed;
        top: 0;
        width: 100%;
        height: 12%;
        z-index: 99999;
        pointer-events: none;
        background-color: rgba(0, 0, 0, 0.7); /* Более темный фон для четкости */
    }

    .downloadGPX, .custom-button {
        font-size: 0.8em;
        background-color: white;
        padding: 5px;
        width: 115px;
        border-radius: 5px;
        border: none;
        cursor: pointer;
        margin-bottom: 0;
    }

    .one-gpx-download {
        background-color: #e8e7e7;
        margin-top: 10px;
        border-radius: 5px;
        border: solid 1px #850202;
    }

    .main-menu-buttons {
        background-color: #e8e7e7;
        margin-top: 10px;
        border-radius: 5px;
        border: solid 1px #850202;
        display: flex;
        flex-direction: column;
        height: 2.5em;
        width: 10em;
        justify-content: center;
        align-items: center;
    }

    .main-menu-buttons:hover {
        background-color: #b5b5b5;
    }

    .hide {
        display: none;
    }

    .leaflet-control-measure {
        background: white;
        padding: 5px 10px;
        border-radius: 4px;
        cursor: pointer;
        font-size: 14px;
        font-weight: bold;
        border: 1px solid #333;
        user-select: none;
    }
    .leaflet-control-measure.active {
        background: #ff4d4d;
        color: white;
    }
    .distance-label {
        background: white;
        padding: 4px;
        border-radius: 4px;
        font-size: 14px;
        font-weight: bold;
        border: 1px solid #333;
    }

    .load-history {
        margin-top: 0.7em;
    }

    #points-info {
        position: absolute;
        bottom: 20px;
        right: 10px;
        background: rgba(255,255,255,0.35);
        padding: 10px;
        border-radius: 4px;
        z-index: 10000;

        @media screen and (max-width: 710px) {
            font-size: 10px;
        }
    }

    #noInstall {
        display: inline-block; /* Делаем элемент блочно-строчным */
        padding: 5px 10px; /* Внутренние отступы */
        font-size: 14px; /* Размер текста */
        font-weight: bold; /* Жирный текст */
        color: #2b2a2a; /* Цвет текста */
        background-color: #c6c4c4; /* Цвет фона */
        border: none; /* Убираем границу */
        border-radius: 5px; /* Закругляем углы */
        cursor: pointer; /* Меняем курсор на указатель */
        text-align: center; /* Выравниваем текст по центру */
        text-decoration: none; /* Убираем подчеркивание текста */
        transition: background-color 0.3s ease; /* Плавное изменение цвета фона */

        @media screen and (max-width: 710px) {
            font-size: 10px;
        }
    }

    #noInstall:hover {
        background-color: #9a9a99;
    }

    /* Крестик в центре карты */
    .map-crosshair {
        position: absolute;
        top: 50%;
        left: 50%;
        width: 30px;
        height: 30px;
        transform: translate(-50%, -50%);
        pointer-events: none;
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 10000;
    }

    .map-crosshair::before,
    .map-crosshair::after {
        content: "";
        position: absolute;
        background: #888686;
    }

    /* Горизонтальная линия */
    .map-crosshair::before {
        width: 20px;
        height: 2px;
        border-radius: 15%;
    }

    /* Вертикальная линия */
    .map-crosshair::after {
        width: 2px;
        height: 20px;
        border-radius: 15%;
    }


    /* Окно с координатами */
    .coord-display {
        position: absolute;
        bottom: 10px;
        left: 50%;
        transform: translateX(-50%);
        background-color: rgba(230, 229, 229, 0.6);
        color: #1b1b1b;
        padding: 5px 10px;
        border-radius: 5px;
        font-size: 14px;
        pointer-events: auto;
        z-index: 10000;
        cursor: pointer;

        @media screen and (max-width: 710px) {
            bottom: 19em;
            left: 87%;
            width: 9em;
            height: 2em;
            font-size: 8px;
            display: flex;
            align-items: center;
        }
    }

    #auth-container {
        display: none;
        z-index: 100000;
    }

    .start-button {
        background-color: #b7f65a;
        color: #000000;
        padding: 5px 10px;
        cursor: pointer;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
        border-radius: 8px;
        font-weight: bold;
        font-family: sans-serif;
        user-select: none;
        transition: background-color 0.3s ease;
    }

    .start-button:hover {
        background-color: #f8e94d;
    }

    .popup-btn {
        width: 100%;
        margin-top: 6px;
        padding: 8px 12px;
        font-size: 13px;
        font-weight: 500;
        border-radius: 14px;
        border: none;
        background: #f2f2f7;
        color: #111;
        cursor: pointer;
        text-align: center;
    }

    .popup-btn:hover {
        background: #e5e5ea;
    }

    .popup-btn:active {
        background: #d1d1d6;
    }

    .popup-btn-link {
        display: block;
        text-decoration: none;
        color: #007aff;
        background: #eaf3ff;
    }

    /* Текстовые мелочи */
    .popup-link {
        color: #007aff;
        cursor: pointer;
    }

    .popup-comment {
        margin: 6px 0;
        padding: 6px 8px;
        background: #f2f2f7;
        border-radius: 10px;
        font-size: 13px;
    }

    .popup-time {
        font-size: 12px;
        color: #666;
        margin-bottom: 4px;
    }

    .popup-toggle {
        display: flex;
        align-items: center;
        gap: 6px;
        font-size: 12px;
        margin-top: 6px;
    }

    .popup-image {
        width: 100%;
        margin-top: 6px;
        border-radius: 12px;
        cursor: pointer;
    }

    .popup-actions-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 6px;
        margin-top: 6px;
    }

    .popup-btn {
        padding: 7px 0;
        font-size: 13px;
        font-weight: 500;
        border-radius: 12px;
        border: none;
        background: #f2f2f7;
        color: #111;
        cursor: pointer;
        text-align: center;
    }

    .popup-btn:hover {
        background: #e5e5ea;
    }

    .popup-btn:active {
        background: #d1d1d6;
    }

    .popup-btn-link {
        display: block;
        text-decoration: none;
        color: #007aff;
        background: #eaf3ff;
        margin-top: 6px;
    }

    .popup-btn-full {
        width: 100%;
    }

    .popup-image {
        width: 100%;
        max-height: 220px;
        object-fit: contain;
        border-radius: 12px;
        background: #f2f2f7;
        cursor: zoom-in;
    }

    .circle-toggle {
        display: flex;
        align-items: center;
        margin: 1em 0 1em 0;
        gap: 5px; /* расстояние между чекбоксом и текстом */
        cursor: pointer;
    }

    .circle-toggle input[type="checkbox"] {
        margin: 0;
        vertical-align: middle;
    }

    /* ============================= */
    /* GLASS CONTAINER (BUTTON + SLIDER) */
    /* ============================= */

    .glass-control,
    .leaflet-control-layers.glass-control {
        box-sizing: border-box;
        position: relative;
        width: 130px;
        padding: 6px;

        background: rgba(255, 255, 255, 0.55);
        backdrop-filter: blur(10px) saturate(1.3);
        -webkit-backdrop-filter: blur(10px) saturate(1.3);

        border-radius: 10px;

        display: flex;
        flex-direction: column;
        gap: 4px;
    }

    /* ============================= */
    /* BUTTON */
    /* ============================= */

    .glass-button {
        width: 100%;
        padding: 4px 0;

        background: transparent;
        border: none;
        border-radius: 6px;

        font-size: 11px;
        font-weight: 600;
        line-height: 1.2;
        color: rgba(0, 0, 0, 0.9);

        cursor: pointer;
    }

    .glass-button:hover {
        background: rgba(255, 255, 255, 0.25);
    }

    .glass-button:active {
        transform: scale(0.96);
    }

    /* ============================= */
    /* LEAFLET CLEANUP */
    /* ============================= */

    .leaflet-control-layers-toggle,
    .leaflet-control-layers-separator {
        display: none;
    }

    .leaflet-control-layers-base,
    .leaflet-control-layers-overlays,
    .leaflet-control-layers-list {
        margin: 0;
        padding: 0;
    }

    /* ============================= */
    /* SLIDER LABEL */
    /* ============================= */

    .leaflet-control-layers span {
        margin-bottom: 4px;

        font-size: 11px;
        font-weight: 600;
        line-height: 1.2;
        color: rgba(0,0,0,0.85);

        white-space: nowrap;

        display: flex;
        justify-content: center;
        align-items: center;

        text-align: center;
    }

    /* ============================= */
    /* RANGE SLIDER (VISUAL) */
    /* ============================= */

    .leaflet-control-layers input[type='range'] {
        -webkit-appearance: none;
        appearance: none;

        width: 100%;
        height: 6px;

        margin: 0;
        border-radius: 999px;
        border: none;

        background: linear-gradient(
                to right,
                rgba(255,255,255,0.9),
                rgba(255,255,255,0.4)
        );

        outline: none;
        cursor: default;

        position: relative;
        z-index: 2;
    }

    /* ============================= */
    /* RANGE THUMB */
    /* ============================= */

    .leaflet-control-layers input[type='range']::-webkit-slider-thumb {
        -webkit-appearance: none;

        width: 14px;
        height: 14px;
        border-radius: 50%;

        background: rgba(42,108,255,0.85);
        cursor: pointer;
    }

    .leaflet-control-layers input[type='range']::-moz-range-thumb {
        width: 14px;
        height: 14px;
        border-radius: 50%;
        border: none;

        background: rgba(42,108,255,0.85);
        cursor: pointer;
    }

    /* ============================= */
    /* 🔑 SLIDER HIT AREA (MAGIC) */
    /* ============================= */

    /* Невидимая зона захвата по всей карточке */
    .leaflet-control-layers.glass-control::after {
        content: '';
        position: absolute;

        left: 0;
        right: 0;
        bottom: 0;

        height: 36px;              /* 👈 зона касания пальцем */
        cursor: pointer;
    }

    /* ============================= */
    /* MOBILE */
    /* ============================= */

    @media (max-width: 768px) {
        .glass-control,
        .leaflet-control-layers.glass-control {
            width: 140px;
        }

        .leaflet-control-layers input[type='range'] {
            height: 7px;
        }

        .leaflet-control-layers input[type='range']::-webkit-slider-thumb,
        .leaflet-control-layers input[type='range']::-moz-range-thumb {
            width: 18px;
            height: 18px;
        }
    }
