:root {
            --color-bg: #f5f5f5;
            --color-white: #ffffff;
            --color-text: #111111;
            --color-muted: #6e6e6e;
            --color-border: #d7d7d7;
            --color-green: #187229;
            --color-green-dark: #125c20;
            --radius-xl: 28px;
            --radius-lg: 22px;
            --radius-md: 16px;
            --shadow-soft: 0 18px 40px rgba(0, 0, 0, 0.18);
        }

        html,
        body {
            margin: 0;
            padding: 0;
            height: 100%;
            font-family: 'Inter', sans-serif;
            background: #f3f3f3;
        }

        body {
            overflow: hidden;
        }

        #map {
            width: 100%;
            height: 100vh;
        }

        #modal {
            display: flex;
            position: fixed;
            inset: 0;
            background: rgba(17, 17, 17, 0.45);
            backdrop-filter: blur(8px);
            -webkit-backdrop-filter: blur(8px);
            z-index: 99999;
            justify-content: center;
            align-items: center;
            padding: 24px;
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.35s ease;
        }

        #modal.active {
            opacity: 1;
            pointer-events: auto;
        }

        #box {
            width: min(1100px, 100%);
            height: min(88vh, 900px);
            background: rgba(255, 255, 255, 0.95);
            border: 1px solid rgba(255, 255, 255, 0.7);
            border-radius: var(--radius-xl);
            box-shadow: var(--shadow-soft);
            display: flex;
            flex-direction: column;
            overflow: hidden;
            transform: translateY(40px) scale(0.96);
            opacity: 0;
            transition:
                transform 0.4s cubic-bezier(.22, .61, .36, 1),
                opacity 0.35s ease;
        }

        #modal.active #box {
            transform: translateY(0) scale(1);
            opacity: 1;
        }

        #topbar {
            min-height: 64px;
            padding: 12px 22px 10px;
            background: rgba(255, 255, 255, 0.96);
            border-bottom: 1px solid #ececec;
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            gap: 18px;
            flex-shrink: 0;
        }

        #modelTitle {
            font-size: 24px;
            line-height: 1.15;
            font-weight: 700;
            color: var(--color-text);
            max-width: 900px;
            margin-top: -2px;
        }

        #btnClose {
            border: none;
            background: var(--color-green);
            color: #fff;
            padding: 12px 18px;
            border-radius: 999px;
            cursor: pointer;
            font-size: 15px;
            font-weight: 600;
            transition: background 0.2s ease, transform 0.2s ease;
            flex-shrink: 0;
        }

        #btnClose:hover {
            background: var(--color-green-dark);
            transform: translateY(-1px);
        }

        #scroll-content {
            flex: 1;
            overflow-y: auto;
            padding: 7px 24px 24px;
            background: linear-gradient(180deg, #fafafa 0%, #f3f3f3 100%);
        }

        .modal-content-grid {
            display: grid;
            grid-template-columns: 1.2fr 0.8fr;
            gap: 20px;
            align-items: start;
        }

        .video-card,
        .description-card {
            background: rgba(255, 255, 255, 0.86);
            border: 1px solid var(--color-border);
            border-radius: var(--radius-lg);
            padding: 22px;
            box-shadow: 0 10px 24px rgba(0, 0, 0, 0.05);
        }

        .video-card {
            position: sticky;
            top: 3px;
            align-self: start;
            max-height: calc(88vh - 140px);
            display: flex;
            flex-direction: column;
        }

        .description-card {
            position: static;
        }

        .modal-section-title {
            font-size: 15px;
            font-weight: 700;
            color: #111;
            margin-bottom: 14px;
            letter-spacing: 0.01em;
        }

        #description-text {
            font-size: 15px;
            line-height: 1.7;
            color: #333;
            white-space: normal;
        }

        #description-text b,
        #description-text strong {
            color: #111;
            font-weight: 700;
        }

        #description-text br+br {
            display: block;
            content: "";
            margin-top: 8px;
        }

        .video-wrapper {
            width: 100%;
            background: #000;
            border-radius: 18px;
            overflow: hidden;
            box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
        }

        video {
            width: 100%;
            display: block;
            background: #000;
        }

        #scroll-content::-webkit-scrollbar {
            width: 9px;
        }

        #scroll-content::-webkit-scrollbar-track {
            background: rgba(0, 0, 0, 0.05);
            border-radius: 20px;
        }

        #scroll-content::-webkit-scrollbar-thumb {
            background: #b8b8b8;
            border-radius: 20px;
        }

        #scroll-content::-webkit-scrollbar-thumb:hover {
            background: #999;
        }

        .modal-coords-accordion {
            margin-top: 16px;
            border: 1px solid var(--color-border);
            border-radius: 16px;
            overflow: hidden;
            background: rgba(255, 255, 255, 0.72);
            display: flex;
            flex-direction: column;
            min-height: 0;
        }

        .modal-coords-toggle {
            width: 100%;
            min-height: 48px;
            padding: 14px 16px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            background: #f8f8f8;
            color: #111;
            font-size: 15px;
            font-weight: 600;
            cursor: pointer;
            border: none;
        }

        .modal-coords-body {
            display: none;
            border-top: 1px solid #ececec;
            background: #fff;
            min-height: 0;
        }

        .modal-coords-accordion.open .modal-coords-body {
            display: block;
        }

        .modal-coords-arrow {
            font-size: 20px;
            line-height: 1;
            transition: transform 0.25s ease;
        }

        .modal-coords-accordion.open .modal-coords-arrow {
            transform: rotate(180deg);
        }

        .modal-coords-list {
            max-height: 220px;
            overflow-y: auto;
            padding: 10px 0;
            overscroll-behavior: contain;
        }

        .modal-coords-item {
            padding: 10px 16px;
            border-bottom: 1px solid #f1f1f1;
            font-size: 13px;
            line-height: 1.5;
            color: #333;
        }

        .modal-coords-item:last-child {
            border-bottom: none;
        }

        .modal-coords-item strong {
            color: #111;
            display: inline-block;
            min-width: 26px;
        }

        .modal-coords-list::-webkit-scrollbar {
            width: 8px;
        }

        .modal-coords-list::-webkit-scrollbar-track {
            background: rgba(0, 0, 0, 0.04);
            border-radius: 20px;
        }

        .modal-coords-list::-webkit-scrollbar-thumb {
            background: #b8b8b8;
            border-radius: 20px;
        }

        @media (max-width: 900px) {
            #modal {
                padding: 14px;
            }

            #box {
                height: min(92vh, 1000px);
            }

            #topbar {
                padding: 16px;
                align-items: flex-start;
                flex-direction: column;
            }

            #modelTitle {
                font-size: 20px;
                max-width: 100%;
            }

            #scroll-content {
                padding: 16px;
            }

            .modal-content-grid {
                grid-template-columns: 1fr;
                gap: 16px;
            }

            .description-card,
            .video-card {
                padding: 16px;
            }

            .video-card {
                position: static;
                max-height: none;
            }
        }

        .map-stats-overlay {
            position: absolute;
            bottom: 20px;
            left: 20px;

            display: flex;
            gap: 14px;

            z-index: 1000;
        }

        .map-stat-pill {
            display: flex;
            align-items: center;
            gap: 12px;

            padding: 14px 22px;
            /* было меньше */

            background: rgba(255, 255, 255, 0.92);
            backdrop-filter: blur(8px);

            border-radius: 30px;

            box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);

            font-size: 16px;
            /* текст больше */
        }

        .map-stat-pill strong {
            font-size: 18px;
        }

        .map-stat-pill span {
            color: #555;
        }

        .map-stat-pill img {
            width: 16px;
            height: 26px;
        }
