.ch-ai-vmap {
    --vmap-green: #22f58b;
    --vmap-event: #ffbf47;
    --vmap-blue: #4a9eff;
    --vmap-coral: #ff7b63;
    --vmap-purple: #b78cff;
    --vmap-pink: #ff5da8;
    margin: 30px 0;
    padding: 18px;
    overflow: hidden;
    border: 1px solid rgba(83, 255, 183, .18);
    border-radius: 22px;
    background: radial-gradient(circle at 12% 0, rgba(34, 245, 139, .11), transparent 32%), linear-gradient(145deg, #07120f, #0b1715);
    color: #f5fff9;
    box-shadow: 0 24px 70px rgba(0, 0, 0, .22);
}

.ch-ai-vmap * {
    box-sizing: border-box;
}

.ch-ai-vmap__head {
    display: grid;
    gap: 4px;
    margin-bottom: 14px;
}

.ch-ai-vmap__eyebrow {
    width: max-content;
    padding: 4px 9px;
    border: 1px solid rgba(34, 245, 139, .26);
    border-radius: 999px;
    background: rgba(34, 245, 139, .08);
    color: var(--vmap-green);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.ch-ai-vmap h2,
.ch-ai-vmap h3 {
    margin: 0;
    color: #fff;
}

.ch-ai-vmap__head h2 {
    font-size: clamp(22px, 4vw, 34px);
    line-height: 1.08;
}

.ch-ai-vmap__head p {
    margin: 0;
    color: rgba(255, 255, 255, .62);
}

.ch-ai-vmap__map-wrap {
    position: relative;
    overflow: hidden;
    padding: 6px;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 18px;
    background: #030907;
}

.ch-ai-vmap__map,
.ch-ai-vmap .leaflet-container {
    width: 100%;
    height: 470px;
    min-height: 420px;
    border-radius: 13px;
    background-color: #07110f;
    background-image:
        linear-gradient(rgba(255, 255, 255, .028) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .028) 1px, transparent 1px),
        radial-gradient(circle at center, rgba(34, 245, 139, .1), transparent 48%);
    background-size: 30px 30px, 30px 30px, 100% 100%;
}

.ch-ai-vmap .leaflet-map-pane,
.ch-ai-vmap .leaflet-tile-pane,
.ch-ai-vmap .leaflet-marker-pane,
.ch-ai-vmap .leaflet-popup-pane {
    visibility: visible;
}

.ch-ai-vmap .leaflet-tile-pane,
.ch-ai-vmap .leaflet-tile {
    opacity: 1;
}

.ch-ai-vmap .leaflet-tile-pane {
    filter: saturate(.72) brightness(.72) contrast(1.08);
}

.ch-ai-vmap .leaflet-control-attribution {
    border-radius: 8px 0 0 0;
    background: rgba(3, 17, 15, .84);
    color: rgba(255, 255, 255, .62);
    font-size: 9px;
}

.ch-ai-vmap .leaflet-control-attribution a {
    color: #b8ffe0;
}

.ch-ai-vmap__legend {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 11px 2px 0;
    color: rgba(255, 255, 255, .68);
    font-size: 12px;
}

.ch-ai-vmap__legend span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.ch-ai-vmap__legend-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 10px currentColor;
}

.ch-ai-vmap__legend-dot--venue {
    color: var(--vmap-green);
}

.ch-ai-vmap__legend-dot--events {
    color: var(--vmap-event);
}

.ch-ai-vmap__legend-dot--hotels {
    color: var(--vmap-blue);
}

.ch-ai-vmap__legend-dot--restaurants {
    color: var(--vmap-coral);
}

.ch-ai-vmap__legend-dot--cafes {
    color: var(--vmap-purple);
}

.ch-ai-vmap__legend-dot--bars {
    color: var(--vmap-pink);
}

.ch-ai-vmap__events {
    margin-top: 22px;
}

.ch-ai-vmap__events h3 {
    font-size: 17px;
}

.ch-ai-vmap__event-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.ch-ai-vmap__event {
    display: grid;
    gap: 7px;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, .09);
    border-radius: 14px;
    background: rgba(255, 255, 255, .035);
}

.ch-ai-vmap__event strong {
    color: #fff;
    line-height: 1.25;
}

.ch-ai-vmap__event span,
.ch-ai-vmap__event em,
.ch-ai-vmap__muted {
    color: rgba(255, 255, 255, .58);
    font-size: 12px;
}

.ch-ai-vmap__event a,
.ch-ai-vmap__btn {
    display: inline-flex;
    width: max-content;
    min-height: 30px;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    border: 1px solid color-mix(in srgb, var(--marker-color, var(--vmap-green)) 34%, transparent);
    border-radius: 999px;
    background: color-mix(in srgb, var(--marker-color, var(--vmap-green)) 13%, transparent);
    color: var(--marker-color, var(--vmap-green)) !important;
    font-size: 11px;
    font-weight: 900;
    text-decoration: none !important;
}

.ch-ai-vmap .leaflet-marker-icon {
    position: absolute;
    overflow: visible;
    border: 0;
    background: transparent;
    transition: filter .18s ease, transform .18s ease;
}

.ch-ai-vmap .leaflet-marker-icon:hover,
.ch-ai-vmap .leaflet-marker-icon:focus-visible {
    filter: brightness(1.18);
}

.ch-ai-vmap .ch-ai-vmap__marker-place,
.ch-ai-vmap .ch-ai-vmap__marker-event {
    width: 32px;
    height: 32px;
}

.ch-ai-vmap .ch-ai-vmap__marker-core {
    position: absolute;
    left: 50%;
    top: 50%;
    display: grid;
    width: 25px;
    height: 25px;
    place-items: center;
    border: 3px solid #030706;
    border-radius: 50%;
    background: var(--marker-color);
    box-shadow: 0 0 0 5px color-mix(in srgb, var(--marker-color) 23%, transparent), 0 0 22px color-mix(in srgb, var(--marker-color) 70%, transparent);
    color: #07100e;
    transform: translate(-50%, -50%);
}

.ch-ai-vmap .ch-ai-vmap__marker-core b {
    font-size: 10px;
    font-weight: 1000;
    line-height: 1;
}

.ch-ai-vmap .ch-ai-vmap__marker-event .ch-ai-vmap__marker-core {
    border-radius: 8px;
}

.ch-ai-vmap .ch-ai-vmap__marker-venue {
    width: 54px;
    height: 54px;
}

.ch-ai-vmap__venue-core,
.ch-ai-vmap__venue-ring {
    position: absolute;
    left: 50%;
    top: 50%;
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.ch-ai-vmap__venue-core {
    z-index: 3;
    width: 21px;
    height: 21px;
    border: 3px solid #030706;
    background: var(--vmap-green);
    box-shadow: 0 0 0 6px rgba(34, 245, 139, .2), 0 0 28px rgba(34, 245, 139, .95);
    animation: chAiVenueGlow 1.35s ease-in-out infinite alternate;
}

.ch-ai-vmap__venue-ring {
    width: 25px;
    height: 25px;
    border: 2px solid rgba(34, 245, 139, .82);
    background: rgba(34, 245, 139, .13);
    animation: chAiVenuePulse 1.8s cubic-bezier(.2, .8, .2, 1) infinite;
}

.ch-ai-vmap__venue-ring--b {
    animation-delay: .9s;
}

.ch-ai-vmap .leaflet-popup-content-wrapper {
    width: min(320px, calc(100vw - 42px));
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 18px;
    background: rgba(3, 17, 15, .98);
    color: #fff;
    box-shadow: 0 24px 70px rgba(0, 0, 0, .6);
    backdrop-filter: blur(16px);
}

.ch-ai-vmap .leaflet-popup-content {
    width: auto;
    margin: 0;
    padding: 14px;
}

.ch-ai-vmap .leaflet-popup-tip {
    background: rgba(3, 17, 15, .98);
}

.ch-ai-vmap .leaflet-popup-close-button {
    right: 8px;
    top: 8px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .08);
    color: #fff;
    line-height: 27px;
    text-align: center;
}

.ch-ai-vmap__popup {
    display: grid;
    gap: 8px;
}

.ch-ai-vmap__popup-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding-right: 28px;
}

.ch-ai-vmap__popup-badge {
    padding: 4px 8px;
    border: 1px solid color-mix(in srgb, var(--marker-color) 36%, transparent);
    border-radius: 999px;
    background: color-mix(in srgb, var(--marker-color) 14%, transparent);
    color: var(--marker-color);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.ch-ai-vmap__popup-distance {
    color: rgba(255, 255, 255, .55);
    font-size: 11px;
}

.ch-ai-vmap__popup h3 {
    font-size: 15px;
    line-height: 1.18;
}

.ch-ai-vmap__popup p {
    margin: 0;
    color: rgba(255, 255, 255, .66);
    font-size: 12px;
}

.ch-ai-vmap__popup-mini-list {
    display: grid;
    gap: 5px;
}

.ch-ai-vmap__popup-mini-list p {
    display: grid;
    gap: 1px;
    padding: 6px 8px;
    border-radius: 9px;
    background: rgba(255, 255, 255, .045);
}

.ch-ai-vmap__popup-mini-list strong {
    overflow: hidden;
    color: #fff;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ch-ai-vmap__popup-mini-list span {
    color: rgba(255, 255, 255, .5);
    font-size: 10px;
}

.ch-ai-vmap__popup-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.ch-ai-vmap__popup-actions--commercial .ch-ai-vmap__btn {
    border-color: color-mix(in srgb, var(--marker-color) 42%, transparent);
    background: color-mix(in srgb, var(--marker-color) 18%, #07120f);
}

.ch-ai-vmap__popup-actions--utility .ch-ai-vmap__btn {
    border-color: rgba(255, 255, 255, .12);
    background: rgba(255, 255, 255, .055);
    color: rgba(255, 255, 255, .78) !important;
}

.ch-ai-vmap__popup-label {
    margin-top: 3px;
    color: rgba(255, 255, 255, .48);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

/* Venue-only compact popup. Place and event popup structure remains unchanged. */
.ch-ai-vmap .ch-ai-vmap__popup-shell--venue .leaflet-popup-content-wrapper {
    width: min(280px, calc(100vw - 42px));
    border-radius: 13px;
    box-shadow: 0 16px 42px rgba(0, 0, 0, .52);
}

.ch-ai-vmap .ch-ai-vmap__popup-shell--venue .leaflet-popup-content {
    padding: 9px 10px 10px;
}

.ch-ai-vmap .ch-ai-vmap__popup-shell--venue .leaflet-popup-close-button {
    right: 5px;
    top: 5px;
    width: 23px;
    height: 23px;
    line-height: 22px;
}

.ch-ai-vmap .ch-ai-venue-popup--compact {
    gap: 5px;
}

.ch-ai-vmap .ch-ai-venue-popup--compact .ch-ai-vmap__popup-top {
    min-height: 20px;
    gap: 4px;
    padding-right: 22px;
}

.ch-ai-vmap .ch-ai-venue-popup--compact .ch-ai-vmap__popup-badge {
    padding: 2px 6px;
    font-size: 8px;
    letter-spacing: .045em;
}

.ch-ai-vmap .ch-ai-venue-popup--compact h3 {
    font-size: 14px;
    line-height: 1.08;
}

.ch-ai-vmap .ch-ai-venue-popup--compact > p {
    font-size: 10.5px;
    line-height: 1.25;
}

.ch-ai-vmap .ch-ai-venue-popup--compact .ch-ai-vmap__popup-label {
    margin-top: 1px;
    font-size: 8px;
    letter-spacing: .06em;
}

.ch-ai-vmap .ch-ai-venue-popup--compact .ch-ai-vmap__popup-actions {
    gap: 4px;
}

.ch-ai-vmap .ch-ai-venue-popup--compact .ch-ai-vmap__btn {
    min-height: 25px;
    padding: 4px 8px;
    font-size: 9px;
}

.ch-ai-vmap .ch-ai-venue-popup__events {
    max-height: 112px;
    gap: 3px;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-right: 3px;
    scrollbar-color: rgba(34, 245, 139, .45) rgba(255, 255, 255, .04);
    scrollbar-width: thin;
}

.ch-ai-vmap .ch-ai-venue-popup__events::-webkit-scrollbar {
    width: 5px;
}

.ch-ai-vmap .ch-ai-venue-popup__events::-webkit-scrollbar-track {
    border-radius: 999px;
    background: rgba(255, 255, 255, .04);
}

.ch-ai-vmap .ch-ai-venue-popup__events::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(34, 245, 139, .42);
}

.ch-ai-vmap .ch-ai-venue-popup__events p {
    gap: 0;
    padding: 4px 6px;
    border-radius: 6px;
}

.ch-ai-vmap .ch-ai-venue-popup__events strong {
    font-size: 10px;
    line-height: 1.15;
}

.ch-ai-vmap .ch-ai-venue-popup__events span {
    font-size: 9px;
    line-height: 1.15;
}

@keyframes chAiVenuePulse {
    0% {
        opacity: .9;
        transform: translate(-50%, -50%) scale(.6);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(2.65);
    }
}

@keyframes chAiVenueGlow {
    to {
        filter: brightness(1.25);
        box-shadow: 0 0 0 8px rgba(34, 245, 139, .25), 0 0 42px rgba(34, 245, 139, 1);
    }
}

@media (max-width: 800px) {
    .ch-ai-vmap__map,
    .ch-ai-vmap .leaflet-container {
        height: 390px;
        min-height: 360px;
    }
}

@media (max-width: 640px) {
    .ch-ai-vmap {
        margin: 20px -8px;
        padding: 12px;
        border-radius: 16px;
    }

    .ch-ai-vmap__map,
    .ch-ai-vmap .leaflet-container {
        height: 335px;
        min-height: 310px;
    }

    .ch-ai-vmap .leaflet-popup {
        max-width: calc(100vw - 28px);
    }

    .ch-ai-vmap .leaflet-popup-content-wrapper {
        width: min(292px, calc(100vw - 38px));
    }

    .ch-ai-vmap .ch-ai-vmap__popup-shell--venue .leaflet-popup-content-wrapper {
        width: min(264px, calc(100vw - 38px));
    }

    .ch-ai-vmap .ch-ai-venue-popup__events {
        max-height: 102px;
    }

    .ch-ai-vmap__popup-actions {
        flex-wrap: nowrap;
        max-width: 100%;
        overflow-x: auto;
        padding-bottom: 2px;
    }

    .ch-ai-vmap__btn {
        flex: 0 0 auto;
        min-height: 34px;
    }

    .ch-ai-vmap .leaflet-control-attribution {
        max-width: calc(100% - 70px);
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .ch-ai-vmap__event-grid {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ch-ai-vmap__venue-core,
    .ch-ai-vmap__venue-ring {
        animation: none;
    }
}
