/* --- BASE --- */
html,
body {
    width: 100%;
    height: 100%;
}

body {
    margin: 0;
    padding: 0;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
        sans-serif;
    font-optical-sizing: auto;
    font-variation-settings: "slnt" 0;
    letter-spacing: -0.01em;
    overflow: hidden;
    background: #e7e7df;
}

#map {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

/* --- LOADER --- */
.loader-overlay {
    position: fixed;
    inset: 0;
    background: #fefffd;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.loader-overlay p {
    margin-top: 18px;
    color: #232c26;
    font-size: 14px;
    font-weight: 650;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #cac4b7;
    border-top: 4px solid #c9fb00;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* --- MAIN MAP UI --- */
.ui-layout {
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    bottom: 20px;
    z-index: 1500;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    pointer-events: none;
}

.left-panel,
.right-panel {
    display: flex;
    flex-direction: column;
    gap: 15px;
    pointer-events: auto;
}

.left-panel {
    width: fit-content;
    align-items: flex-start;
    transition:
        transform 0.6s cubic-bezier(0.16, 1, 0.3, 1),
        opacity 0.5s ease;
}

.left-panel.hidden-up {
    transform: translateY(-150%);
    opacity: 0;
    pointer-events: none;
}

.right-panel {
    width: 300px;
    align-items: flex-end;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- BRAND BENTO --- */
.map-brand-bento {
    width: 248px;
    padding: 16px;
    border-radius: 28px;
    background: rgba(19, 21, 10, 0.92);
    backdrop-filter: blur(24px);
    border: 1px solid rgba(202, 251, 0, 0.16);
    box-shadow: 0 18px 50px rgba(19, 21, 10, 0.28);
    display: flex;
    flex-direction: column;
    gap: 14px;
    box-sizing: border-box;
    flex-shrink: 0;
}

.map-brand-main {
    display: block;
    text-decoration: none;
}

.map-brand-logo-img {
    display: block;
    width: 150px;
    max-width: 100%;
    height: auto;
}

.map-brand-subtitle {
    margin-top: 6px;
    color: rgba(244, 244, 246, 0.52);
    font-size: 10px;
    font-weight: 750;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.map-brand-actions {
    display: grid;
    grid-template-columns: 1fr 1fr 38px;
    gap: 8px;
    align-items: center;
}

.map-account-pill {
    position: relative;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(244, 244, 246, 0.08);
    color: #f4f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    border: 1px solid rgba(244, 244, 246, 0.1);
    box-shadow: none;
    box-sizing: border-box;
    transition:
        transform 0.25s ease,
        background 0.25s ease,
        color 0.25s ease,
        border-color 0.25s ease;
}

.map-account-pill:hover {
    transform: translateY(-1px);
    background: rgba(244, 244, 246, 0.14);
}


.map-account-dot {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(244, 244, 246, 0.72);
    box-shadow: 0 0 0 2px #292b23;
}

/* active account */
.map-account-pill.active {
    background: #c9fb00;
    color: #13150a;
    border-color: #c9fb00;
}

.map-account-pill.active:hover {
    background: #c9fb00;
    color: #13150a;
}

.map-account-pill.active .map-account-dot {
    background: #13150a;
    box-shadow: 0 0 0 2px #c9fb00;
}

.map-brand-action {
    height: 38px;
    border-radius: 15px;
    background: rgba(244, 244, 246, 0.08);
    color: #f4f4f6;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 850;
    transition:
        background 0.25s ease,
        transform 0.25s ease;
}

.map-brand-action:hover {
    background: rgba(244, 244, 246, 0.14);
    transform: translateY(-1px);
}

.map-brand-action.prime {
    background: #c9fb00;
    color: #13150a;
}

/* --- FILTERS --- */
.vertical-filters-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
    max-height: calc(100vh - 250px);
    padding-bottom: 5px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    order: 1;
    flex-grow: 1;
}

.vertical-filters-container::-webkit-scrollbar {
    display: none;
}

.filter-btn {
    flex-shrink: 0;
    background: rgba(254, 255, 253, 0.62);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(202, 196, 183, 0.6);
    border-radius: 20px;
    padding: 0 20px;
    height: 48px;
    font-size: 14px;
    font-weight: 750;
    color: #13150a;
    cursor: pointer;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
    transition:
        background 0.25s ease,
        border-color 0.25s ease,
        transform 0.25s ease;
}

.filter-btn:hover {
    transform: translateY(-1px);
    background: rgba(254, 255, 253, 0.78);
}

.filter-btn.active {
    background: #c9fb00;
    color: #13150a;
    border-color: #c9fb00;
}

.filter-btn.prime-locked:hover {
    border-color: rgba(201, 251, 0, 0.55);
    background: rgba(254, 255, 253, 0.76);
}

.lock-icon {
    margin-left: 6px;
    font-size: 12px;
    opacity: 0.7;
}

.search-item svg,
.filter-btn svg {
    width: 18px;
    height: 18px;
}

/* --- SEARCH --- */
.search-wrapper {
    position: relative;
    flex-shrink: 0;
    width: 100%;
    display: flex;
    justify-content: flex-end;
    z-index: 600;
    order: 2;
}

.search-box {
    position: relative;
    background: rgba(254, 255, 253, 0.9);
    backdrop-filter: blur(20px);
    border: 2px solid rgba(202, 196, 183, 0.6);
    border-radius: 30px;
    width: 48px;
    height: 48px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    box-shadow: 0 8px 32px rgba(19, 21, 10, 0.1);
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
    cursor: pointer;
    box-sizing: border-box;
}

.search-box:hover,
.search-box:focus-within {
    width: 300px;
    padding: 0 18px;
    gap: 12px;
    border-color: #c9fb00;
    box-shadow: 0 0 20px rgba(201, 251, 0, 0.2);
    cursor: text;
}

#map-search {
    background: transparent;
    border: none;
    outline: none;
    width: 0;
    padding: 0;
    margin: 0;
    overflow: hidden;
    opacity: 0;
    font-size: 16px;
    font-weight: 550;
    color: #13150a;
    transition: all 0.4s ease;
}

.search-box:hover #map-search,
.search-box:focus-within #map-search {
    width: 100%;
    opacity: 1;
}

.search-results-dropdown {
    position: absolute;
    top: 58px;
    left: 0;
    right: 0;
    background: #fefffd;
    border-radius: 20px;
    border: 1px solid rgba(19, 21, 10, 0.05);
    max-height: 280px;
    overflow-y: auto;
    display: none;
    box-shadow: 0 15px 45px rgba(19, 21, 10, 0.15);
    z-index: 9999 !important;
}

.search-item {
    padding: 14px 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid #e7e7df;
}

.search-item:hover {
    background: #faf7f4;
}

.search-item .item-title {
    font-weight: 650;
    font-size: 14px;
    color: #13150a;
}

/* --- SIDEBAR --- */
.sidebar {
    position: absolute;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    transform: translateX(130%);
    background: #fefffd;
    box-shadow: -10px 0 40px rgba(19, 21, 10, 0.15);
    border-left: 1px solid rgba(202, 196, 183, 0.5);
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.sidebar::-webkit-scrollbar {
    display: none;
}

@media (min-width: 769px) {
    .sidebar {
        top: 90px;
        right: 20px;
        width: 380px;
        max-height: calc(100vh - 120px);
        border-radius: 36px;
    }

    .sidebar.active {
        transform: translateX(0);
    }
}

#sb-img {
    width: 100%;
    margin: 0;
    border-radius: 0;
    height: 280px;
    object-fit: cover;
    flex-shrink: 0;
}

.sidebar-content {
    padding: 24px 28px 60px;
    overflow-y: visible;
    flex-grow: 1;
}

.tags-wrapper {
    display: flex;
    gap: 8px;
    align-items: center;
}

.tag {
    background: #232c26;
    color: #c9fb00;
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 850;
    display: inline-block;
}

.tag.price-tag {
    background: #232c26;
    color: #c9fb00;
}

h2 {
    font-size: 24px;
    margin: 15px 0 10px;
    color: #13150a;
    font-weight: 850;
    letter-spacing: -0.03em;
}

p {
    line-height: 1.6;
    color: #232c26;
    font-size: 16px;
    margin-bottom: 25px;
}

.close-btn {
    position: sticky;
    top: 20px;
    align-self: flex-end;
    margin-top: 20px;
    margin-right: 20px;
    margin-bottom: -56px;
    background: rgba(254, 255, 253, 0.75);
    backdrop-filter: blur(10px);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    color: #13150a;
    z-index: 10;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
}

.action-btn {
    width: 100%;
    background: #c9fb00;
    color: #13150a;
    border: none;
    padding: 18px;
    border-radius: 20px;
    font-weight: 850;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(201, 251, 0, 0.25);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.action-btn svg {
    width: 18px;
    height: 18px;
}

/* --- GUIDE TIP --- */
.guide-tip-container {
    background: #e7e7df;
    border-radius: 24px;
    padding: 20px;
    margin-bottom: 20px;
    color: #13150a;
}

.guide-header {
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.guide-avatar {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(202, 196, 183, 0.3);
    flex-shrink: 0;
}

.guide-name {
    font-size: 16px;
    font-weight: 850;
    color: #13150a;
    margin-bottom: 2px;
}

.guide-status {
    font-size: 11px;
    font-weight: 650;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #787664;
    margin-bottom: 10px;
}

.guide-text {
    font-size: 14px;
    line-height: 1.5;
    margin: 0 0 12px 0;
    font-weight: 500;
    color: #232c26;
}

.guide-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #13150a;
    text-decoration: none;
    font-size: 13px;
    font-weight: 750;
    transition: opacity 0.2s;
}

.guide-link:hover {
    opacity: 0.8;
}

.link-icon {
    font-size: 14px;
    color: #13150a;
    display: inline-flex;
    align-items: center;
}

.link-icon svg {
    color: #13150a;
    stroke: currentColor;
}

/* --- AUDIO PLAYER --- */
.apple-audio-player {
    background: #13150a;
    border-radius: 22px;
    padding: 12px 16px;
    margin-bottom: 25px;
    border: 1px solid rgba(254, 255, 253, 0.1);
    box-shadow: 0 10px 25px rgba(19, 21, 10, 0.15);
}

.player-body {
    display: flex;
    align-items: center;
    gap: 15px;
}

.play-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: #c9fb00;
    color: #13150a;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    transition: transform 0.2s ease;
}

.play-btn:active {
    transform: scale(0.9);
}

.audio-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.audio-label {
    font-size: 11px;
    font-weight: 750;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #fefffd;
}

.progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(254, 255, 253, 0.15);
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    width: 0%;
    height: 100%;
    background: #c9fb00;
    transition: width 0.1s linear;
}

/* --- MARKERS --- */
.custom-marker {
    background: #fefffd;
    color: #13150a;
    border-radius: 50%;
    width: 54px;
    height: 54px;
    display: flex;
    justify-content: center;
    align-items: center;
    line-height: 0;
    cursor: pointer;
    box-shadow: 0 12px 24px rgba(19, 21, 10, 0.15);
    border: 2px solid #fefffd;
    transition:
        border-color 0.3s,
        box-shadow 0.3s,
        background 0.3s,
        transform 0.3s;
    will-change: transform;
}

.custom-marker:hover {
    transform: scale(1.15);
    border-color: #c9fb00;
}

.custom-marker.active-marker {
    background: #13150a !important;
    color: #c9fb00 !important;
    border-color: #c9fb00 !important;
    box-shadow: 0 0 25px rgba(201, 251, 0, 0.5);
    transform: scale(1.25);
    z-index: 999;
}

.custom-marker svg {
    width: 24px;
    height: 24px;
    transition: color 0.3s ease;
}

/* --- MAP STYLE SWITCHER --- */
.style-switcher {
    position: absolute;
    bottom: 30px;
    left: 20px;
    z-index: 100;
    background: #fefffd;
    color: #13150a;
    border: none;
    min-height: 44px;
    padding: 0 16px;
    border-radius: 15px;
    font-weight: 750;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(19, 21, 10, 0.1);
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.style-switcher svg {
    width: 18px;
    height: 18px;
}

.mapboxgl-ctrl-bottom-left {
    bottom: 80px !important;
    left: 10px !important;
    z-index: 100;
}

/* --- PRIME TEASER MODAL --- */
.prime-teaser-modal {
    position: fixed;
    inset: 0;
    z-index: 3000;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.prime-teaser-modal.active {
    opacity: 1;
    pointer-events: auto;
}

.prime-teaser-overlay {
    position: absolute;
    inset: 0;
    background: rgba(19, 21, 10, 0.34);
    backdrop-filter: blur(14px);
}

.prime-teaser-card {
    position: absolute;
    left: 24px;
    top: 24px;
    width: 360px;
    max-width: calc(100vw - 48px);
    background: #13150a;
    color: #f4f4f6;
    border-radius: 34px;
    padding: 28px;
    box-shadow: 0 30px 90px rgba(19, 21, 10, 0.36);
    border: 1px solid rgba(202, 251, 0, 0.18);
    transform: translateY(12px) scale(0.98);
    transition: transform 0.55s cubic-bezier(0.16, 1, 0.3, 1);
    box-sizing: border-box;
}

.prime-teaser-modal.active .prime-teaser-card {
    transform: translateY(0) scale(1);
}

.prime-teaser-close {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: rgba(244, 244, 246, 0.08);
    color: #f4f4f6;
    cursor: pointer;
}

.prime-teaser-kicker {
    font-size: 11px;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #c9fb00;
    font-weight: 800;
    margin-bottom: 18px;
}

.prime-teaser-card h2 {
    color: #f4f4f6;
    font-size: 30px;
    line-height: 0.95;
    letter-spacing: -0.05em;
    margin: 0 0 16px;
}

.prime-teaser-card p {
    color: rgba(244, 244, 246, 0.72);
    font-size: 15px;
    line-height: 1.55;
    margin: 0 0 22px;
}

.prime-teaser-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 22px;
}

.prime-teaser-mini {
    min-height: 76px;
    border-radius: 22px;
    background: rgba(244, 244, 246, 0.07);
    border: 1px solid rgba(244, 244, 246, 0.08);
    padding: 14px 12px;
    box-sizing: border-box;
}

.prime-teaser-mini span {
    display: block;
    color: #f4f4f6;
    font-weight: 900;
    font-size: 15px;
    margin-bottom: 8px;
}

.prime-teaser-mini small {
    color: rgba(244, 244, 246, 0.56);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    line-height: 1.2;
}

.prime-teaser-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
}

.prime-teaser-primary,
.prime-teaser-secondary {
    min-height: 52px;
    width: 100%;
    border-radius: 18px;
    padding: 0 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 850;
    font-size: 13px;
    text-decoration: none;
    cursor: pointer;
    box-sizing: border-box;
    line-height: 1;
    white-space: normal;
    text-align: center;
}

.prime-teaser-primary {
    background: #c9fb00;
    color: #13150a;
}

.prime-teaser-secondary {
    border: 1px solid rgba(244, 244, 246, 0.14);
    background: transparent;
    color: #f4f4f6;
}

/* --- SIDEBAR SWIPE ANIMATION --- */
.sidebar-swipe-anim {
    animation: appleSwipe 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes appleSwipe {
    0% {
        opacity: 0;
        transform: translateX(30px) scale(0.98);
        filter: blur(5px);
    }

    100% {
        opacity: 1;
        transform: translateX(0) scale(1);
        filter: blur(0);
    }
}

/* --- MOBILE --- */
@media (max-width: 768px) {
    .ui-layout {
        flex-direction: column;
        top: 15px;
        left: 10px;
        right: 10px;
        bottom: auto;
        justify-content: flex-start;
    }

    .left-panel {
        width: 100%;
        align-items: stretch;
    }

    .map-brand-bento {
        width: 100%;
        border-radius: 24px;
        padding: 12px;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
    }

    .map-brand-logo-img {
        width: 128px;
    }

    .map-brand-subtitle {
        font-size: 9px;
        margin-top: 4px;
    }

    .map-brand-actions {
        width: 138px;
        flex-shrink: 0;
    }

    .map-brand-action {
        height: 34px;
        font-size: 11px;
        border-radius: 13px;
    }

    .vertical-filters-container {
        display: flex;
        flex-direction: row;
        width: calc(100% + 20px);
        margin-left: -10px;
        padding-left: 10px;
        padding-right: 20px;
        box-sizing: border-box;
        overflow-x: auto;
        overflow-y: hidden;
        max-height: none;
    }

    .right-panel {
        width: 100%;
    }

    .right-panel.focus-up {
        transform: translateY(-115px);
    }

    .search-box:hover,
    .search-box:focus-within {
        width: 100%;
    }

    .sidebar {
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        max-height: 75vh;
        border-radius: 40px 40px 0 0;
        transform: translateY(110%);
        border-left: none;
        border-top: 1px solid rgba(202, 196, 183, 0.5);
    }

    .sidebar.active {
        transform: translateY(0);
    }

    .prime-teaser-card {
        left: 12px;
        right: 12px;
        top: auto;
        bottom: 18px;
        width: auto;
        max-width: none;
        border-radius: 32px;
        padding: 24px;
    }

    .prime-teaser-card h2 {
        font-size: 26px;
    }

    .prime-teaser-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .prime-teaser-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .prime-teaser-primary,
    .prime-teaser-secondary {
        min-height: 54px;
        width: 100%;
        padding: 0 20px;
        font-size: 14px;
        border-radius: 19px;
        display: flex;
        flex: none;
    }

    .prime-teaser-primary {
        box-shadow: 0 14px 28px rgba(201, 251, 0, 0.22);
    }
}

/* =========================================================
   NEARBY PLACES — FINAL STABLE VERSION
   Desktop: vertical compact list
   Mobile: edge-to-edge horizontal swipe
========================================================= */

/* Чуть уменьшаем общие отступы карточки */
.sidebar-content {
    padding-left: 22px !important;
    padding-right: 22px !important;
}

/* На desktop блок "Рядом" обычный, без горизонтального скролла */
.nearby-block {
    margin-top: 26px !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    overflow: visible !important;
}

.nearby-header {
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
    margin-bottom: 12px !important;
    padding: 0 !important;
}

.nearby-header span {
    font-size: 12px !important;
    font-weight: 850 !important;
    color: #13150a !important;
    text-transform: uppercase !important;
    letter-spacing: 0.08em !important;
}

.nearby-header small {
    font-size: 12px !important;
    color: #787664 !important;
    font-weight: 550 !important;
}

/* DESKTOP: вертикальный список */
.nearby-list {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;

    width: 100% !important;
    max-width: 100% !important;

    overflow: visible !important;
    padding: 0 !important;

    scroll-snap-type: none !important;
    touch-action: auto !important;
}

.nearby-card {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    flex: none !important;

    border: 1px solid rgba(202, 196, 183, 0.55) !important;
    background: #f4f4f6 !important;
    border-radius: 22px !important;

    padding: 14px !important;
    box-sizing: border-box !important;

    display: flex !important;
    align-items: flex-start !important;
    gap: 12px !important;

    text-align: left !important;
    cursor: pointer !important;

    transition:
        transform 0.25s ease,
        background 0.25s ease,
        border-color 0.25s ease !important;
}

.nearby-card:hover {
    transform: translateY(-2px) !important;
    background: #fefffd !important;
    border-color: rgba(201, 251, 0, 0.75) !important;
}

.nearby-card-icon {
    width: 36px !important;
    height: 36px !important;
    border-radius: 50% !important;
    background: #13150a !important;
    color: #c9fb00 !important;

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

    flex-shrink: 0 !important;
}

.nearby-card-icon svg {
    width: 18px !important;
    height: 18px !important;
}

.nearby-card-content {
    min-width: 0 !important;
    flex: 1 !important;
}

.nearby-card-title {
    font-size: 13px !important;
    font-weight: 750 !important;
    line-height: 1.25 !important;
    color: #13150a !important;

    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;

    margin-bottom: 6px !important;
}

.nearby-card-meta {
    font-size: 11px !important;
    color: #787664 !important;
    font-weight: 600 !important;
}

/* MOBILE: edge-to-edge horizontal swipe */
@media (max-width: 768px) {
    .sidebar-content {
        padding-left: 18px !important;
        padding-right: 18px !important;
    }

.nearby-block {
    margin-left: -18px !important;
    margin-right: -18px !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    overflow: hidden !important;
}

.nearby-header {
    padding-left: 18px !important;
    padding-right: 18px !important;
}

.nearby-list {
    display: flex !important;
    flex-direction: row !important;
    gap: 10px !important;

    width: 100% !important;
    max-width: none !important;

    overflow-x: auto !important;
    overflow-y: hidden !important;

    padding-left: 18px !important;
    padding-right: 18px !important;
    padding-bottom: 6px !important;

        scroll-snap-type: x proximity !important;
        scrollbar-width: none !important;
        -ms-overflow-style: none !important;
        -webkit-overflow-scrolling: touch !important;
        touch-action: pan-x !important;
    }

    .nearby-list::-webkit-scrollbar {
        display: none !important;
    }

    .nearby-card {
    flex: 0 0 calc(100vw - 72px) !important;
    width: calc(100vw - 72px) !important;
    min-width: calc(100vw - 72px) !important;
    max-width: 320px !important;

    scroll-snap-align: start !important;
    touch-action: pan-x !important;
}
}

/* =========================================================
   iOS SAFARI MOBILE VIEWPORT / SIDEBAR FIX
   Fixes hidden card peeking from bottom on iPhone Safari
========================================================= */

html,
body {
    height: 100%;
    min-height: 100%;
    overflow: hidden;
}

body {
    min-height: 100svh;
}

#map {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100svh;
}

@supports (height: 100dvh) {
    body {
        min-height: 100dvh;
    }

    #map {
        height: 100dvh;
    }
}

@media (max-width: 768px) {
    .sidebar {
        position: fixed !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;

        width: 100% !important;
        max-height: min(75dvh, 680px) !important;

        border-radius: 40px 40px 0 0 !important;
        border-left: none !important;
        border-top: 1px solid rgba(202, 196, 183, 0.5) !important;

        transform: translate3d(
            0,
            calc(100% + env(safe-area-inset-bottom, 0px) + 32px),
            0
        ) !important;

        will-change: transform;
        overflow-y: auto !important;
        overflow-x: hidden !important;

        padding-bottom: env(safe-area-inset-bottom, 0px);
    }

    .sidebar.active {
        transform: translate3d(0, 0, 0) !important;
    }

    .sidebar-content {
        padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px)) !important;
    }

    .style-switcher {
        bottom: calc(82px + env(safe-area-inset-bottom, 0px)) !important;
    }

    .mapboxgl-ctrl-bottom-left {
        bottom: calc(136px + env(safe-area-inset-bottom, 0px)) !important;
    }
}

/* =========================================================
   MOBILE TOP UI SOFT COMPACT POLISH
   Only reduces height/gaps. Does not change search logic.
========================================================= */

@media (max-width: 768px) {
    .ui-layout {
        top: 10px !important;
    }

    .left-panel,
    .right-panel {
        gap: 8px !important;
    }

    /* Black logo bento: lower height, same structure */
    .map-brand-bento {
        padding: 9px 12px !important;
        border-radius: 22px !important;
        min-height: 54px !important;
        gap: 8px !important;
    }

    .map-brand-logo-img {
        width: 122px !important;
    }

    /* Hide subtitle to save vertical space */
    .map-brand-subtitle {
        display: none !important;
    }

   .map-brand-actions {
    width: 172px !important;
    grid-template-columns: 1fr 1fr 32px !important;
    gap: 6px !important;
    flex-shrink: 0;
}

.map-account-pill {
    width: 32px !important;
    height: 32px !important;
}

.map-account-pill svg {
    width: 15px !important;
    height: 15px !important;
}

.map-account-dot {
    top: 5px !important;
    right: 5px !important;
    width: 7px !important;
    height: 7px !important;
}

    /* Filters closer to logo block, still edge-scrollable */
    .vertical-filters-container {
        gap: 8px !important;
        margin-top: 0 !important;
        padding-top: 0 !important;
    }

    .filter-btn {
        height: 42px !important;
        padding: 0 16px !important;
        border-radius: 18px !important;
        font-size: 13px !important;
        font-weight: 800 !important;
        gap: 7px !important;
    }

    .filter-btn svg {
        width: 16px !important;
        height: 16px !important;
    }

    .lock-icon svg {
        width: 13px !important;
        height: 13px !important;
    }

    /* Search: keep original expand behavior, only slightly compact height */
.search-wrapper {
    margin-top: 0 !important;
}

.search-box {
    height: 44px !important;
    min-height: 44px !important;
}

.search-box:hover,
.search-box:focus-within {
    width: 100% !important;
    height: 44px !important;
    border-radius: 22px !important;
}

#map-search {
    font-size: 15px !important;
}

.search-results-dropdown {
    top: 52px !important;
}
}

/* =========================================================
   ITAPROFILE — CONVERSION & MOBILE-CLARITY LAYER
   Дополнение к существующей дизайн-системе (НЕ переписывает её).
   Токены: #13150a тёмный · #c9fb00 акцент · #f4f4f6 светлый · Inter.
========================================================= */

/* ---- Prime-тизер: скролл на случай высокого контента ---- */
.prime-teaser-card {
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.prime-teaser-card::-webkit-scrollbar {
    display: none;
}

/* ---- Тизер качества Prime: 2–3 точки с «размытым низом» ---- */
.prime-teaser-preview {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}
.prime-preview-card {
    position: relative;
    display: block;
    text-align: left;
    text-decoration: none;
    background: rgba(244, 244, 246, 0.05);
    border: 1px solid rgba(244, 244, 246, 0.09);
    border-radius: 20px;
    padding: 14px 16px 40px;
    overflow: hidden;
    cursor: pointer;
    transition:
        background 0.25s ease,
        border-color 0.25s ease,
        transform 0.25s ease;
}
.prime-preview-card:hover {
    background: rgba(244, 244, 246, 0.08);
    border-color: rgba(201, 251, 0, 0.4);
    transform: translateY(-1px);
}
.prime-preview-kicker {
    font-size: 9.5px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 800;
    color: #c9fb00;
    margin-bottom: 6px;
}
.prime-preview-title {
    font-size: 14px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.01em;
    color: #f4f4f6;
    margin-bottom: 6px;
}
.prime-preview-text {
    font-size: 12.5px;
    line-height: 1.5;
    color: rgba(244, 244, 246, 0.6);
    margin: 0;
}
.prime-preview-fade {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 44px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 16px;
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 0.02em;
    color: rgba(244, 244, 246, 0.82);
    background: linear-gradient(
        to top,
        rgba(19, 21, 10, 0.97) 42%,
        rgba(19, 21, 10, 0)
    );
    backdrop-filter: blur(1.5px);
}
.prime-preview-fade svg {
    width: 13px;
    height: 13px;
    color: #c9fb00;
}

/* ---- Цена прямо в тизере ---- */
.prime-teaser-price {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin: 2px 0 18px;
}
.prime-teaser-price b {
    font-size: 22px;
    font-weight: 900;
    letter-spacing: -0.02em;
    color: #f4f4f6;
}
.prime-teaser-price span {
    font-size: 11px;
    font-weight: 600;
    color: rgba(244, 244, 246, 0.55);
}

/* ---- Честная строка доверия ---- */
.prime-teaser-proof {
    margin-top: 14px;
    text-align: center;
    font-size: 10.5px;
    font-weight: 600;
    line-height: 1.4;
    color: rgba(244, 244, 246, 0.42);
}

/* ---- Отзыв (рендерится ТОЛЬКО если заполнен PRIME_TESTIMONIALS) ---- */
.prime-teaser-quote {
    margin: 0 0 18px;
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(201, 251, 0, 0.06);
    border: 1px solid rgba(201, 251, 0, 0.16);
}
.prime-teaser-quote p {
    margin: 0 0 8px;
    font-size: 13px;
    line-height: 1.5;
    color: #f4f4f6;
}
.prime-teaser-quote small {
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 700;
    color: rgba(244, 244, 246, 0.5);
}

/* ---- Заметнее «премиальные» фильтры (приглашение тапнуть) ---- */
.filter-btn.prime-locked {
    border-color: rgba(201, 251, 0, 0.45);
}

/* ---- Постоянная Prime-таблетка: всегда видимый апсейл + цена ---- */
.prime-pill {
    position: fixed;
    right: 20px;
    bottom: 30px;
    z-index: 1400;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 46px;
    padding: 0 8px 0 16px;
    border: 1px solid rgba(201, 251, 0, 0.22);
    border-radius: 24px;
    background: #13150a;
    color: #f4f4f6;
    font-family: inherit;
    font-size: 13px;
    font-weight: 850;
    letter-spacing: -0.01em;
    cursor: pointer;
    box-shadow: 0 14px 34px rgba(19, 21, 10, 0.32);
    animation: primePillPulse 3.6s ease-in-out infinite;
    transition:
        transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
        opacity 0.3s ease,
        background 0.25s ease;
}
.prime-pill:hover {
    transform: translateY(-2px);
    background: #1d2010;
}
.prime-pill-spark {
    display: flex;
    color: #c9fb00;
}
.prime-pill-price {
    color: #c9fb00;
}
.prime-pill-close {
    margin-left: 2px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(244, 244, 246, 0.1);
    color: rgba(244, 244, 246, 0.7);
    font-size: 11px;
    line-height: 1;
}
.prime-pill-close:hover {
    background: rgba(244, 244, 246, 0.18);
    color: #f4f4f6;
}
.prime-pill.collapsed {
    width: 46px;
    padding: 0;
    justify-content: center;
    border-radius: 50%;
}
.prime-pill.collapsed .prime-pill-label,
.prime-pill.collapsed .prime-pill-price,
.prime-pill.collapsed .prime-pill-close {
    display: none;
}

@keyframes primePillPulse {
    0%,
    100% {
        box-shadow:
            0 14px 34px rgba(19, 21, 10, 0.32),
            0 0 0 0 rgba(201, 251, 0, 0);
    }
    50% {
        box-shadow:
            0 14px 34px rgba(19, 21, 10, 0.32),
            0 0 0 6px rgba(201, 251, 0, 0.1);
    }
}

/* Прячем таблетку, когда открыта карточка места или сам тизер */
body:has(.sidebar.active) .prime-pill,
body:has(.prime-teaser-modal.active) .prime-pill {
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
}

/* ---- Coach mark: одноразовая подсказка про тап по точке ---- */
.coach-mark {
    position: fixed;
    left: 50%;
    bottom: 96px;
    z-index: 1390;
    max-width: min(420px, calc(100vw - 32px));
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 18px;
    background: rgba(19, 21, 10, 0.92);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(201, 251, 0, 0.18);
    color: #f4f4f6;
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.35;
    box-shadow: 0 16px 40px rgba(19, 21, 10, 0.3);
    opacity: 0;
    pointer-events: none;
    transform: translateX(-50%) translateY(8px);
    transition:
        opacity 0.5s ease,
        transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.coach-mark.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
.coach-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #c9fb00;
    flex-shrink: 0;
    box-shadow: 0 0 0 4px rgba(201, 251, 0, 0.18);
}

/* Прячем coach mark при открытой карточке */
body:has(.sidebar.active) .coach-mark {
    opacity: 0 !important;
    pointer-events: none;
}

/* ---- Доступность: видимый фокус с клавиатуры ---- */
.filter-btn:focus-visible,
.map-brand-action:focus-visible,
.map-account-pill:focus-visible,
.action-btn:focus-visible,
.play-btn:focus-visible,
.style-switcher:focus-visible,
.prime-pill:focus-visible,
.prime-preview-card:focus-visible,
.prime-teaser-primary:focus-visible,
.prime-teaser-secondary:focus-visible,
.prime-teaser-close:focus-visible,
#map-search:focus-visible {
    outline: 3px solid rgba(201, 251, 0, 0.6);
    outline-offset: 2px;
}

/* ---- Мобильная посадка таблетки и coach mark (safe-area) ---- */
@media (max-width: 768px) {
    .prime-pill {
        right: 12px;
        bottom: calc(18px + env(safe-area-inset-bottom, 0px));
        height: 44px;
        font-size: 12.5px;
    }
    .coach-mark {
        bottom: calc(86px + env(safe-area-inset-bottom, 0px));
        font-size: 12px;
        padding: 11px 14px;
    }
    .prime-teaser-card {
        max-height: 86dvh;
    }
}

/* ---- Уважение к prefers-reduced-motion ---- */
@media (prefers-reduced-motion: reduce) {
    .prime-pill {
        animation: none !important;
    }
    .sidebar-swipe-anim {
        animation: none !important;
    }
    .coach-mark {
        transition: opacity 0.2s ease !important;
    }
}


/* =========================================================
   ФАЗА 1 — CITY NOW (погода + сигналы). Плавающий виджет.
   Десктоп: сверху по центру. Мобайл: снизу по центру, раскрытие вверх.
   ========================================================= */
.city-now {
  position: fixed;
  z-index: 1600;
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  pointer-events: none;
}
.city-now > * {
  pointer-events: auto;
}

@media (min-width: 769px) {
  .city-now {
    top: 22px;
    left: 50%;
    transform: translateX(-50%);
  }
  .city-now__panel {
    top: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
  }
}

@media (max-width: 768px) {
  .city-now {
    left: 50%;
    transform: translateX(-50%);
    bottom: calc(148px + env(safe-area-inset-bottom, 0px));
  }
  .city-now__panel {
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
  }
}

.city-now__chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 15px;
  border: 1px solid rgba(202, 251, 0, 0.16);
  border-radius: 22px;
  background: rgba(19, 21, 10, 0.82);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  color: #f4f4f6;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  position: relative;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s ease;
}
.city-now__chip:hover {
  transform: translateY(-1px);
  border-color: rgba(202, 251, 0, 0.4);
}
.city-now__chip-icon {
  display: inline-flex;
  width: 20px;
  height: 20px;
}
.city-now__chip-icon svg {
  width: 20px;
  height: 20px;
}
.city-now__chip-temp {
  font-variant-numeric: tabular-nums;
}
.city-now__chip-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #c9fb00;
  color: #161616;
  font-size: 11px;
  font-weight: 700;
  border-radius: 9px;
  box-shadow: 0 0 0 2px rgba(19, 21, 10, 0.9);
}

.city-now__panel {
  position: absolute;
  width: 320px;
  max-width: calc(100vw - 24px);
  border-radius: 26px;
  overflow: hidden;
  background: rgba(19, 21, 10, 0.92);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  opacity: 0;
  translate: 0 6px;
  transition: opacity 0.28s ease, translate 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}
.city-now--open .city-now__panel {
  opacity: 1;
  translate: 0 0;
}

.city-now__weather {
  padding: 18px;
  background-image: linear-gradient(135deg, #5b6470, #8a94a6);
  background-size: cover;
  color: #fff;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  position: relative;
}
.city-now__weather::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 45%, rgba(0, 0, 0, 0.2) 100%);
  pointer-events: none;
}
.city-now__weather > * {
  position: relative;
  z-index: 1;
}
.city-now__weather-main {
  display: flex;
  align-items: center;
  gap: 12px;
}
.city-now__weather-icon {
  width: 34px;
  height: 34px;
  display: inline-flex;
}
.city-now__weather-icon svg {
  width: 34px;
  height: 34px;
}
.city-now__weather-temp {
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.city-now__weather-cond {
  font-size: 13px;
  opacity: 0.92;
  margin-top: 3px;
}
.city-now__weather-meta {
  text-align: right;
}
.city-now__weather-city {
  font-size: 14px;
  font-weight: 600;
}
.city-now__weather-now {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.8;
  margin-top: 2px;
}

.city-now__signals {
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 46vh;
  overflow-y: auto;
}
.city-now__signals-empty {
  color: rgba(244, 244, 246, 0.6);
  font-size: 13px;
  padding: 10px 8px;
}
.city-now__signal {
  border-radius: 16px;
  padding: 11px 13px;
  background: rgba(255, 255, 255, 0.05);
  border-left: 3px solid rgba(202, 251, 0, 0.5);
}
.city-now__signal--warn {
  border-left-color: #ffcf4d;
}
.city-now__signal--alert {
  border-left-color: #ff7a59;
}
.city-now__signal-title {
  color: #f4f4f6;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.3;
}
.city-now__signal-body {
  color: rgba(244, 244, 246, 0.7);
  font-size: 12.5px;
  line-height: 1.4;
  margin-top: 3px;
}

/* Прячем виджет, когда открыта карточка места или тизер Prime — чтобы не мешал. */
body:has(.sidebar.active) .city-now,
body:has(.prime-teaser-modal.active) .city-now {
  opacity: 0;
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .city-now__chip,
  .city-now__panel {
    transition: none;
  }
}


/* =========================================================
   ФАЗА 4 — кнопка «Поделиться» (вторичная) + тост
   ========================================================= */
.action-btn--ghost {
  margin-top: 10px;
  background: #1b1d12;
  color: #c9fb00;
  border: 1px solid #c9fb00;
  box-shadow: none;
}
.action-btn--ghost:hover {
  background: #13150a;
  border-color: #c9fb00;
}

.ita-toast {
  position: fixed;
  left: 50%;
  bottom: calc(150px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%) translateY(10px);
  z-index: 1800;
  max-width: calc(100vw - 32px);
  padding: 11px 16px;
  border-radius: 16px;
  background: rgba(19, 21, 10, 0.95);
  border: 1px solid rgba(202, 251, 0, 0.25);
  color: #f4f4f6;
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  font-size: 13.5px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease, transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}
.ita-toast--show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .ita-toast {
    transition: none;
  }
}


/* =========================================================
   EMAIL CAPTURE in Prime teaser (subscribe non-buyers)
   ========================================================= */
.prime-teaser-sub {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
}
.prime-teaser-sub-label {
  display: block;
  font-size: 12.5px;
  color: rgba(244, 244, 246, 0.6);
  margin-bottom: 10px;
}
.prime-teaser-sub-form {
  display: flex;
  gap: 8px;
  max-width: 360px;
  margin: 0 auto;
}
.prime-teaser-sub-input {
  flex: 1;
  min-width: 0;
  height: 40px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: #f4f4f6;
  font-family: inherit;
  font-size: 14px;
}
.prime-teaser-sub-input::placeholder {
  color: rgba(244, 244, 246, 0.4);
}
.prime-teaser-sub-input:focus {
  outline: none;
  border-color: rgba(202, 251, 0, 0.5);
}
.prime-teaser-sub-btn {
  flex-shrink: 0;
  height: 40px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.08);
  color: #f4f4f6;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.prime-teaser-sub-btn:hover {
  border-color: rgba(202, 251, 0, 0.5);
  background: rgba(255, 255, 255, 0.12);
}
.prime-teaser-sub-status {
  display: block;
  margin-top: 8px;
  font-size: 12px;
  color: rgba(202, 251, 0, 0.85);
}

/* Image loading: avoid white flash before the place photo loads */
#sb-img {
  background-color: #13150a;
}