/* === FONTS (self-hosted, без обращений к Google Fonts) === */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('/assets/fonts/inter/Inter-Regular.woff2') format('woff2');
}
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('/assets/fonts/inter/Inter-Medium.woff2') format('woff2');
}
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('/assets/fonts/inter/Inter-SemiBold.woff2') format('woff2');
}
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('/assets/fonts/inter/Inter-Bold.woff2') format('woff2');
}

/* EB Garamond — серифный display для заголовков (даёт «чайный» характер) */
@font-face {
    font-family: 'EB Garamond';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('/assets/fonts/eb-garamond/eb-garamond-regular.woff2') format('woff2');
}
@font-face {
    font-family: 'EB Garamond';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('/assets/fonts/eb-garamond/eb-garamond-semibold.woff2') format('woff2');
}

/* === RESET === */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

:root {
    /* Brand */
    --brand: #1a3d1f;
    --brand-fg: #f5f3ee;
    --cta: #1a3d1f;
    --accent: #b45309;

    /* Surfaces */
    --bg-page: #f5f3ee;
    --bg-soft: #efece6;
    --bg-warm: #e8e6df;
    --surface: #fff;

    /* Text */
    --text: #1a1a1a;
    --text-2: #2a2a2a;
    --text-muted: #6b6862;
    --text-subtle: #8a8780;

    /* Borders */
    --border: #e5e2da;
    --border-strong: #d8d4ca;

    /* User marker (отдельный цвет, не пересекается с категориями) */
    --user-marker: #0ea5e9;

    /* Spacing scale */
    --s-1: 4px;
    --s-2: 8px;
    --s-3: 12px;
    --s-4: 16px;
    --s-5: 24px;
    --s-6: 32px;

    /* Radius scale */
    --r-1: 8px;    /* chip / small */
    --r-2: 12px;   /* card */
    --r-3: 16px;   /* modal / sheet */
    --r-pill: 9999px;
}


/* Accessibility: видимый фокус для клавиатуры (WCAG AA) */
:focus {
    outline: none;
}
:focus-visible {
    outline: 3px solid var(--brand);
    outline-offset: 2px;
    border-radius: 4px;
    box-shadow: 0 0 0 5px rgba(26, 61, 31, 0.18);
}
/* Круглые элементы — кластеры, FAB, маркеры */
.tea-cluster-wrapper:focus-visible,
.fab:focus-visible,
.leaflet-marker-icon:focus-visible {
    outline-offset: 3px;
    border-radius: 50%;
    box-shadow: 0 0 0 6px rgba(26, 61, 31, 0.22);
}
/* На тёмном фоне (cookie-баннер) фокус светлый */
.cookie-notice :focus-visible {
    outline-color: #f0ece2;
    box-shadow: 0 0 0 5px rgba(240, 236, 226, 0.25);
}
/* Снять обводку у элементов с собственным focus-стилем (input'ы) */
.search__input:focus-visible,
.filter__select:focus-visible,
.filter__input:focus-visible {
    outline-offset: 0;
}

/* По умолчанию (десктоп) мобильный TG-блок в шторке скрыт */
.sidebar__channels-mobile {
    display: none;
}

/* Уважаем системную настройку «уменьшить движение» */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text);
    background: var(--bg-page);
    -webkit-font-smoothing: antialiased;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

a {
    color: inherit;
    text-decoration: none;
}

ul {
    list-style: none;
}

/* === LAYOUT === */
.app {
    display: flex;
    height: 100vh;
    width: 100vw;
}

.sidebar {
    width: 280px;
    flex-shrink: 0;
    background: var(--bg-page);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    z-index: 10;
}

.map-container {
    flex: 1;
    position: relative;
    background: var(--bg-warm);
}

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

/* === SIDEBAR HEADER === */
.sidebar__header {
    padding: 18px 24px 14px;
    background: var(--brand);
    color: var(--bg-page);
    border-bottom: none;
}

.sidebar__title {
    font-family: 'EB Garamond', Georgia, 'Times New Roman', serif;
    font-size: 28px;
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: 0;
    color: var(--bg-page);
    margin-bottom: 4px;
}

.sidebar__subtitle {
    font-size: 12px;
    color: rgba(245, 243, 238, 0.7);
    line-height: 1.4;
    margin-bottom: 10px;
}

.sidebar__channels {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sidebar__tg {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: rgba(245, 243, 238, 0.14);
    border: 1px solid rgba(245, 243, 238, 0.28);
    border-radius: 18px;
    color: var(--bg-page);
    font-size: 14px;
    font-weight: 500;
    transition: background 0.15s ease;
}

.sidebar__tg:hover {
    background: rgba(245, 243, 238, 0.26);
}

.sidebar__tg svg {
    flex-shrink: 0;
}

/* === SEARCH === */
.search {
    padding: 10px 20px 0;
    position: relative;
}

.search__input {
    width: 100%;
    padding: 8px 36px 8px 14px;
    border: 1px solid var(--border-strong);
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    color: var(--text);
    background: var(--surface) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14' fill='none' stroke='%238a8780' stroke-width='1.6' stroke-linecap='round'><circle cx='6' cy='6' r='4.5'/><path d='M9.5 9.5L13 13'/></svg>") no-repeat right 12px center;
    transition: border-color 0.15s ease;
}

.search__input::-webkit-search-cancel-button {
    -webkit-appearance: none;
    appearance: none;
}

.search__input:focus {
    outline: none;
    border-color: var(--brand);
    background-color: var(--surface);
}

.search__input:not(:placeholder-shown) {
    background-image: none;
    padding-right: 36px;
}

.search__clear {
    position: absolute;
    right: 32px;
    top: 50%;
    transform: translateY(-50%);
    margin-top: 7px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--border);
    color: var(--text-muted);
    font-size: 16px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease;
}

.search__clear:hover {
    background: var(--border-strong);
    color: var(--text);
}

/* === FILTERS (SELECTS) === */
.filters {
    padding: 10px 16px 10px;
    border-bottom: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex-shrink: 0;
}

.filter {
    display: flex;
    flex-direction: column;
    gap: 4px;
    position: relative;
}

/* === CHIP FILTER (категория, тип, особенности) === */
.filter--chips .filter__label {
    margin-bottom: 4px;
}
.chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}
.chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: 9999px;
    font-size: 12.5px;
    color: var(--text);
    cursor: pointer;
    transition: all 0.12s ease;
    line-height: 1.3;
    white-space: nowrap;
    user-select: none;
}
.chip:hover {
    border-color: var(--text-muted);
    background: var(--bg-soft);
}
.chip.is-active {
    background: var(--chip-color, var(--brand));
    border-color: var(--chip-color, var(--brand));
    color: #fff;
    font-weight: 500;
}
.chip__icon {
    display: inline-flex;
    align-items: center;
}
/* Скрытые селекты — для совместимости с handler-логикой */
.filter__select-hidden {
    display: none;
}


.autocomplete {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    max-height: 240px;
    overflow-y: auto;
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    z-index: 100;
    display: none;
}

.autocomplete.is-open {
    display: block;
}

.autocomplete__item {
    padding: 9px 12px;
    font-size: 14px;
    color: var(--text);
    cursor: pointer;
    transition: background 0.1s ease;
    border-bottom: 1px solid #f0ede5;
}

.autocomplete__item:last-child {
    border-bottom: none;
}

.autocomplete__item:hover {
    background: var(--bg-page);
}

.filter__label {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.filter__chip {
    display: none;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-left: 6px;
    vertical-align: middle;
    background: currentColor;
}

.filter__chip.is-visible {
    display: inline-block;
}

.filter__select {
    appearance: none;
    -webkit-appearance: none;
    background: var(--surface) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'><path fill='%231a1a1a' d='M6 9L1.5 4.5h9z'/></svg>") no-repeat right 10px center;
    border: 1px solid var(--border-strong);
    border-radius: 8px;
    padding: 8px 32px 8px 12px;
    font-size: 14px;
    font-family: inherit;
    color: var(--text);
    cursor: pointer;
    transition: border-color 0.15s ease;
}

.filter__select:hover {
    border-color: var(--brand);
}

.filter__select:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(26, 61, 31, 0.12);
}

.filter__input {
    appearance: none;
    -webkit-appearance: none;
    border: 1px solid var(--border-strong);
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 14px;
    font-family: inherit;
    color: var(--text);
    background: var(--surface);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.filter__input::placeholder {
    color: #a8a59f;
}

.filter__input:hover {
    border-color: var(--brand);
}

.filter__input:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(26, 61, 31, 0.12);
}

.filter__reset {
    margin-top: 8px;
    padding: 9px 16px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    border: 1px solid var(--border-strong);
    border-radius: 9999px;
    background: var(--surface);
    cursor: pointer;
    transition: all 0.15s ease;
    align-self: flex-start;
}

.filter__reset:hover {
    color: var(--brand);
    border-color: var(--brand);
    background: var(--bg-soft);
}
.filter__reset:active {
    transform: translateY(1px);
}

/* === COUNTER === */
.counter {
    padding: 9px 24px;
    font-size: 12px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
    background: var(--bg-soft);
}

/* === ICON LEGEND (в зелёной шапке, только десктоп) === */
.sidebar__legend {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    list-style: none;
    padding: 0;
}

.sidebar__legend-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: rgba(245, 243, 238, 0.85);
    line-height: 1.4;
    white-space: nowrap;
}

.sidebar__legend-dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    flex-shrink: 0;
    background: var(--accent);
}

.sidebar__legend-dot--bw {
    filter: grayscale(100%);
    opacity: 0.7;
}

.sidebar__legend-note {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(245, 243, 238, 0.18);
    font-size: 11px;
    color: rgba(245, 243, 238, 0.7);
    line-height: 1.45;
}

/* === MOBILE LEGEND (полоска в топбаре под «Список», только мобильный) === */
.mobile-legend {
    display: none;
}

.mobile-legend__toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 14px;
    background: transparent;
    border: none;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    color: #3a4a3d;
    cursor: pointer;
}

.mobile-legend__chevron {
    font-size: 14px;
    line-height: 1;
    transition: transform 0.2s ease;
}

.mobile-legend.is-open .mobile-legend__chevron {
    transform: rotate(180deg);
}

.mobile-legend__body {
    display: none;
}

.mobile-legend.is-open .mobile-legend__body {
    display: block;
}

.mobile-legend__row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-2);
    line-height: 1.4;
}

.mobile-legend__row + .mobile-legend__row {
    margin-top: 5px;
}

.mobile-legend__dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
    background: var(--accent);
}

.mobile-legend__dot--bw {
    filter: grayscale(100%);
    opacity: 0.6;
}

.mobile-legend__note {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed #cfcabf;
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.45;
}

/* === COOKIE NOTICE (152-ФЗ explicit consent, Variant B) === */
.cookie-notice[hidden] {
    display: none !important;
}
.cookie-notice {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 2000;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 18px;
    background: #1a3d1f;
    color: #f0ece2;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    font-size: 14px;
    line-height: 1.5;
    max-width: 880px;
    margin: 0 auto;
}

.cookie-notice__body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cookie-notice__title {
    font-size: 14px;
    font-weight: 700;
}

.cookie-notice__text {
    font-size: 13px;
    color: #e0dbd0;
}

.cookie-notice__text a {
    color: #f0ece2;
    text-decoration: underline;
}

.cookie-notice__actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-shrink: 0;
}

.cookie-notice__btn {
    padding: 9px 20px;
    background: #f0ece2;
    color: #1a3d1f;
    border: 1px solid #f0ece2;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s ease;
}

.cookie-notice__btn:hover {
    background: #fff;
}

.cookie-notice__btn--ghost {
    background: transparent;
    color: rgba(240, 236, 226, 0.75);
    border-color: transparent;
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 3px;
    padding: 9px 12px;
}

.cookie-notice__btn--ghost:hover {
    color: #fff;
    background: transparent;
}

/* По умолчанию (десктоп) — полная версия текста видна, короткая скрыта */
.cookie-notice__text-short {
    display: none;
}
.cookie-notice__text-full {
    display: inline;
}

@media (max-width: 600px) {
    .cookie-notice {
        flex-direction: column;
        align-items: stretch;
        text-align: left;
        font-size: 12.5px;
        padding: 10px 12px;
        gap: 8px;
        bottom: 8px;
        left: 8px;
        right: 8px;
        border-radius: 10px;
    }
    /* На мобильном — компактная версия: убираем заголовок, сокращаем текст */
    .cookie-notice__title {
        display: none;
    }
    .cookie-notice__text {
        font-size: 12.5px;
        line-height: 1.4;
    }
    /* Сокращённая версия текста (полная скрыта) */
    .cookie-notice__text-full {
        display: none;
    }
    .cookie-notice__text-short {
        display: inline;
    }
    .cookie-notice__actions {
        flex-direction: row;
        gap: 6px;
    }
    .cookie-notice__btn {
        flex: 1;
        padding: 8px 12px;
        font-size: 13px;
    }
}

/* === PLACES LIST === */
.places-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
    min-height: 0;
}

/* На десктопе список мест скрыт — пользователь работает с маркерами на карте.
   Только empty-state / error-state видны, если фильтр ничего не дал. */
@media (min-width: 769px) {
    .places-list {
        flex: 0 0 auto;
        max-height: 0;
        padding: 0;
        overflow: visible;
    }
    .places-list .place-item:not(.place-item--empty):not(.place-item--error) {
        display: none;
    }
    .places-list:has(.place-item--empty),
    .places-list:has(.place-item--error) {
        max-height: none;
        padding: 8px 0;
    }
}

.places-list::-webkit-scrollbar {
    width: 6px;
}

.places-list::-webkit-scrollbar-track {
    background: transparent;
}

.places-list::-webkit-scrollbar-thumb {
    background: var(--border-strong);
    border-radius: 3px;
}

.place-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 24px;
    cursor: pointer;
    transition: background 0.12s ease, transform 0.12s ease;
    border-bottom: 1px solid var(--border);
    position: relative;
}

.place-item:hover {
    background: var(--bg-soft);
}
.place-item:hover .place-item__name {
    color: var(--brand);
}
.place-item:hover .place-item__avatar {
    transform: scale(1.05);
}
.place-item__avatar {
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.place-item.is-active {
    background: var(--brand);
    color: var(--bg-page);
}

.place-item.is-active .place-item__meta,
.place-item.is-active .place-item__address {
    color: #c4d4c7;
}

.place-item__avatar {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--avatar-color, var(--brand));
    color: var(--surface);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    margin-top: 2px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    border: 1px solid transparent;
}
/* С лого — белый фон, padding, contain (не обрезается) */
.place-item__avatar--logo {
    background: #fff;
    border-color: var(--border);
    padding: 4px;
}
/* Без лого — цветной круг с инициалами */
.place-item__avatar--initials {
    border-radius: 50%;
}
.place-item__avatar img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.place-item.is-active .place-item__avatar {
    box-shadow: 0 0 0 2px var(--bg-page), 0 0 0 4px var(--avatar-color, var(--brand));
    border-color: var(--avatar-color, var(--brand));
}

.place-item__body {
    flex: 1;
    min-width: 0;
}

.place-item__name {
    font-size: 14px;
    font-weight: 600;
    color: inherit;
    margin-bottom: 4px;
    line-height: 1.3;
}

.place-item__address {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.4;
    margin-bottom: 4px;
}

.place-item__meta {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}


/* === MAP MARKERS === */
.tea-marker {
    background: var(--marker-color, var(--brand));
    color: var(--surface);
    border-radius: 50%;
    width: 38px !important;
    height: 38px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 700;
    border: 3px solid var(--surface);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    cursor: pointer;
    overflow: hidden;
    position: relative;
}

.tea-marker img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.tea-marker:hover {
    transform: scale(1.15);
    z-index: 1000 !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.tea-marker.is-active {
    transform: scale(1.25);
    z-index: 1000 !important;
    box-shadow: 0 0 0 3px var(--marker-color, var(--brand)), 0 4px 16px rgba(0, 0, 0, 0.3);
    border-color: var(--surface);
}

/* === LEAFLET OVERRIDES === */
.leaflet-container {
    background: var(--bg-warm) !important;
    font-family: 'Inter', sans-serif;
}

.leaflet-control-zoom {
    border: none !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08) !important;
    border-radius: 8px !important;
    overflow: hidden;
}

.leaflet-control-zoom a {
    background: var(--surface) !important;
    color: var(--text) !important;
    border: none !important;
    width: 36px !important;
    height: 36px !important;
    line-height: 36px !important;
    font-size: 18px !important;
    font-weight: 400 !important;
}

.leaflet-control-zoom a:hover {
    background: var(--bg-page) !important;
}

.leaflet-control-attribution {
    background: rgba(255, 255, 255, 0.6) !important;
    font-size: 10px !important;
    padding: 2px 6px !important;
    border-radius: 4px !important;
    margin: 8px !important;
    text-align: right;
    line-height: 1.5;
    opacity: 0.6;
    transition: opacity 0.15s ease;
}
.leaflet-control-attribution:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.92) !important;
}

.leaflet-control-attribution__privacy {
    color: #1a3d1f !important;
    text-decoration: none;
    font-weight: 500;
}

.leaflet-control-attribution__privacy:hover {
    text-decoration: underline;
}

.leaflet-attribution-flag {
    display: none !important;
}

.is-grayscale {
    filter: grayscale(100%);
}

/* === MODAL === */
.modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal[hidden] {
    display: none !important;
}

.modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.modal__content {
    position: relative;
    background: var(--bg-page);
    border-radius: 16px;
    max-width: 520px;
    width: calc(100% - 32px);
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    animation: modalIn 0.2s ease;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal__close {
    position: absolute;
    top: 16px;
    right: 12px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    font-size: 22px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease;
    z-index: 2;
    backdrop-filter: blur(4px);
}

.modal__close:hover {
    background: rgba(255, 255, 255, 0.32);
}

/* === MODAL: side-panel mode on desktop === */
@media (min-width: 901px) {
    .modal {
        /* Side-panel прижат к правому краю карты, не блокирует её */
        justify-content: flex-end;
        align-items: stretch;
        pointer-events: none; /* пропускаем клики по карте */
    }
    .modal__overlay {
        /* На desktop overlay не нужен — пользователь должен видеть карту */
        display: none;
    }
    .modal__content {
        pointer-events: auto;
        width: 420px;
        max-width: 420px;
        max-height: none;
        height: 100%;
        border-radius: 16px 0 0 16px;
        box-shadow: -12px 0 32px rgba(0, 0, 0, 0.18);
        animation: sidePanelIn 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
    }
    @keyframes sidePanelIn {
        from { transform: translateX(100%); }
        to { transform: translateX(0); }
    }
}

.place-detail {
    padding: 0 0 32px;
}

/* === HERO STRIPE === */
.place-detail__hero {
    position: relative;
    padding: 24px 32px 0;
    margin-bottom: 56px; /* место под аватар, который "выезжает" из hero вниз */
}
.place-detail__hero-bg {
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 88px;
    background: linear-gradient(135deg, var(--avatar-color, var(--brand)) 0%, var(--avatar-color, var(--brand)) 70%, rgba(0,0,0,0.12) 100%);
    background-blend-mode: multiply;
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
    z-index: 0;
}
.place-detail__hero .place-detail__avatar {
    position: relative;
    z-index: 1;
    width: 72px;
    height: 72px;
    margin-top: 48px; /* "выезжает" из hero вниз */
    border: 3px solid var(--bg-page);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
}
/* Hero на десктопе (side-panel) — закругление только сверху-слева */
@media (min-width: 901px) {
    .place-detail__hero-bg {
        border-top-right-radius: 0;
    }
}

.place-detail__header {
    padding: 0 32px;
    margin-bottom: 16px;
}

.place-detail__share {
    position: absolute;
    top: 16px;
    right: 56px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.15s ease;
    z-index: 2;
    backdrop-filter: blur(4px);
}

.place-detail__share:hover {
    background: rgba(255, 255, 255, 0.32);
}

.place-detail__share:active {
    transform: scale(0.95);
}

.toast {
    position: fixed;
    left: 50%;
    bottom: 32px;
    transform: translate(-50%, 16px);
    background: var(--text);
    color: var(--bg-page);
    padding: 10px 18px;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    z-index: 3000;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

.place-detail__avatar {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: var(--avatar-color, var(--brand));
    color: var(--surface);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
    flex-shrink: 0;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    border: 1px solid transparent;
}
.place-detail__avatar--logo {
    background: #fff;
    border-color: var(--border);
    padding: 6px;
}
.place-detail__avatar--initials {
    border-radius: 50%;
}
.place-detail__avatar img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.place-detail__title {
    font-family: 'EB Garamond', Georgia, 'Times New Roman', serif;
    font-size: 32px;
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: 0;
}

.place-detail__tags,
.place-detail__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 20px;
    padding: 0 32px;
    align-items: center;
}

.place-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 4px 10px;
    border-radius: 12px;
    min-width: 110px;
    text-align: center;
}

.place-tag__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.place-detail__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 14px;
    padding: 0 32px;
}

.place-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #4a4844;
    background: var(--bg-page);
    border: 1px solid var(--border);
    padding: 3px 10px;
    border-radius: 10px;
    line-height: 1.3;
}

.place-badge--warn {
    background: #fef6e4;
    border-color: #e8d8a8;
    color: #6b5018;
}

.place-badge--chain {
    background: #eef0ec;
    border-color: #cdd3c8;
    color: #2c3a26;
    font-weight: 500;
}

.place-detail__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
}

.place-detail__chip {
    display: inline-flex;
    align-items: center;
    font-size: 12px;
    color: #4a4844;
    background: var(--surface);
    border: 1px solid var(--border-strong);
    padding: 3px 10px;
    border-radius: 12px;
    line-height: 1.3;
}

.place-detail__verified {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid #ede9df;
}

.place-detail__section {
    padding: 16px 32px;
    border-top: 1px solid var(--border);
}

.place-detail__section:first-of-type {
    border-top: none;
    padding-top: 0;
}

.place-detail__label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 6px;
}

.place-detail__value {
    font-size: 14px;
    color: var(--text);
    line-height: 1.5;
}

.place-detail__value a {
    color: var(--brand);
    border-bottom: 1px solid var(--brand);
    transition: opacity 0.15s ease;
}

.place-detail__value a:hover {
    opacity: 0.7;
}

.place-detail__description {
    font-size: 14px;
    color: var(--text);
    line-height: 1.55;
}

.place-detail__description p,
.place-detail__value p {
    margin-bottom: 8px;
}

.place-detail__description p:last-child,
.place-detail__value p:last-child {
    margin-bottom: 0;
}

.place-detail__section--intro .place-detail__description {
    font-weight: 400;
}

/* CTA для карточек без описания → подписка на TG */
.place-detail__section--cta {
    background: var(--bg-soft);
    border-radius: var(--r-2);
    padding: 20px 18px;
    text-align: center;
    border: 1px dashed var(--border-strong);
}
.place-detail__cta-emoji {
    font-size: 32px;
    line-height: 1;
    margin-bottom: 10px;
}
.place-detail__cta-text {
    font-size: 14px;
    color: var(--text-2);
    line-height: 1.5;
    margin-bottom: 14px;
}
.place-detail__cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--brand);
    color: var(--brand-fg);
    padding: 10px 18px;
    border-radius: var(--r-pill);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s ease, transform 0.15s ease;
}
.place-detail__cta-btn:hover {
    background: #265a2c;
    transform: translateY(-1px);
}

/* Empty-state и error-state в списке */
.place-item--empty,
.place-item--error {
    background: var(--bg-soft);
    border-radius: var(--r-2);
    margin: 8px;
    padding: 16px;
    cursor: default;
}
.place-item--empty .place-item__name,
.place-item--error .place-item__name {
    color: var(--text);
    font-weight: 600;
    margin-bottom: 6px;
}
.place-item--empty .place-item__address,
.place-item--error .place-item__address {
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 12px;
}
.place-item--error .place-item__address a {
    color: var(--brand);
    text-decoration: underline;
}
.empty-state__reset {
    display: inline-block;
    background: var(--brand);
    color: var(--brand-fg);
    border: none;
    padding: 8px 16px;
    border-radius: var(--r-1);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s ease;
}
.empty-state__reset:hover {
    background: #265a2c;
}

/* === AMENITIES (особенности заведения) === */
.amenity-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    line-height: 0;
    flex-shrink: 0;
}
.amenity-icon svg {
    width: 100%;
    height: 100%;
}
.place-item__name-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.place-item__amenities {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--brand);
}
.place-item__amenities .amenity-icon {
    color: var(--brand);
}
.place-badge--amenity {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.amenity-icon--badge {
    width: 14px;
    height: 14px;
    color: currentColor;
}

/* === FILTER: amenities group === */
.filter--amenities {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.filter__amenity {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text);
    padding: 4px 0;
    user-select: none;
}
.filter__amenity input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: var(--brand);
    cursor: pointer;
}
.filter__amenity-icon {
    display: inline-flex;
    align-items: center;
    color: var(--brand);
    line-height: 0;
}

/* === SIDEBAR FOOTER (авторы карты) === */
.sidebar__footer {
    flex-shrink: 0;
    padding: 14px 16px 16px;
    border-top: 1px solid var(--border);
    background: var(--bg-soft);
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.sidebar__footer-label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 2px;
}
.sidebar__footer-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text);
    text-decoration: none;
    padding: 4px 0;
    transition: color 0.15s ease;
    min-width: 0;
}
.sidebar__footer-link svg {
    color: var(--brand);
    flex-shrink: 0;
}
.sidebar__footer-link-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.2;
}
.sidebar__footer-link-name {
    font-size: 13.5px;
    font-weight: 500;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.sidebar__footer-link-author {
    font-size: 11.5px;
    color: var(--text-muted);
    margin-top: 1px;
}
.sidebar__footer-link:hover .sidebar__footer-link-name {
    color: var(--brand);
}
.sidebar__footer-link:hover .sidebar__footer-link-author {
    color: var(--text);
}
.sidebar__footer-meta {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--border);
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}
.sidebar__footer-meta-link {
    color: var(--text-muted);
    text-decoration: none;
}
.sidebar__footer-meta-link:hover {
    color: var(--brand);
    text-decoration: underline;
}
.sidebar__footer-meta-sep {
    color: var(--text-muted);
}

.place-detail__list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.place-detail__list li {
    position: relative;
    padding-left: 16px;
    margin-bottom: 6px;
    font-size: 14px;
    line-height: 1.5;
}

.place-detail__list li:last-child {
    margin-bottom: 0;
}

.place-detail__list li::before {
    content: "•";
    position: absolute;
    left: 2px;
    color: var(--brand);
    font-weight: 700;
}

.place-detail__sublabel {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 12px;
    margin-bottom: 8px;
}

.route-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.route-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px 7px 8px;
    border: 1px solid var(--border-strong);
    border-radius: 18px;
    background: var(--surface);
    color: var(--text);
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.15s ease;
}

.route-btn:hover {
    border-color: var(--text);
    background: var(--bg-soft);
    transform: translateY(-1px);
}

.route-btn__pin {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--brand-soft, #efece6);
    flex-shrink: 0;
}
.route-btn__icon {
    width: 14px;
    height: 14px;
    line-height: 1;
}

/* Бренд-цвета по сервису */
.route-btn[data-route-app="yandex"] .route-btn__pin {
    background: #FFCC00; /* Yandex yellow */
    color: #FC3F1D;       /* Yandex red */
}
.route-btn[data-route-app="2gis"] .route-btn__pin {
    background: #E8F7EF;
    color: #19AA1E;       /* 2ГИС green */
}
.route-btn[data-route-app="google"] .route-btn__pin {
    background: #E8F0FE;
    color: #1A73E8;       /* Google blue */
}
.route-btn[data-route-app="apple"] .route-btn__pin {
    background: #F2F2F7;
    color: #555;          /* Apple gray */
}

/* === MOBILE TOPBAR === */
.mobile-topbar {
    display: none;
}

.mobile-topbar__action {
    display: none;
}

/* === FAB (near-me) === */
.fab {
    position: absolute;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--surface);
    color: var(--brand);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.18);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
    z-index: 1002;
}

.fab:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.24);
}

.fab:active {
    transform: scale(0.96);
}

.fab.is-loading {
    pointer-events: none;
    opacity: 0.55;
    cursor: wait;
}

.fab.is-loading .fab__icon {
    animation: fabSpin 0.9s linear infinite;
}

.fab.is-active {
    background: var(--brand);
    color: var(--bg-page);
}

@keyframes fabSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.fab--near-me {
    bottom: 24px;
    right: 24px;
}

/* === USER LOCATION MARKER === */
.user-marker {
    width: 16px !important;
    height: 16px !important;
    background: var(--user-marker);
    border: 3px solid var(--surface);
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.25), 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* === MOBILE TOGGLE === */
.mobile-toggle {
    display: none;
    background: var(--brand);
    color: var(--bg-page);
    padding: 10px 28px;
    border-radius: 22px;
    font-size: 14px;
    font-weight: 600;
    align-items: center;
    justify-content: center;
    gap: 8px;
    white-space: nowrap;
    width: 100%;
    max-width: 320px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: background 0.15s ease;
}

.mobile-toggle:active {
    background: #2a5530;
}

/* === MOBILE === */
@media (max-width: 768px) {
    body {
        display: flex;
        flex-direction: column;
    }

    .app {
        flex: 1;
        min-height: 0;
        height: auto;
    }

    .mobile-topbar {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        position: relative;
        flex-shrink: 0;
        z-index: 1500;
        padding: 6px 12px 6px;
        padding-top: calc(6px + env(safe-area-inset-top));
        background: var(--brand);
        color: var(--bg-page);
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
    }

    .mobile-topbar__head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        min-height: 36px;
    }

    .mobile-topbar__title {
        font-size: 15px;
        font-weight: 600;
        letter-spacing: -0.01em;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        flex: 1 1 auto;
        text-align: left;
    }

    .mobile-topbar__menu-btn {
        width: 36px;
        height: 36px;
        flex-shrink: 0;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        background: rgba(245, 243, 238, 0.14);
        border: 1px solid rgba(245, 243, 238, 0.28);
        border-radius: 10px;
        color: var(--bg-page);
        cursor: pointer;
        transition: background 0.15s ease;
    }
    .mobile-topbar__menu-btn:active { background: rgba(245, 243, 238, 0.28); }
    .mobile-topbar__menu-btn[aria-expanded="true"] {
        background: rgba(245, 243, 238, 0.28);
    }

    .mobile-topbar__menu-panel {
        position: absolute;
        top: 100%;
        right: 8px;
        margin-top: 4px;
        z-index: 1500;
        background: var(--surface, #fff);
        color: var(--text-primary, #1a1a1a);
        border-radius: 12px;
        box-shadow: 0 10px 32px rgba(0,0,0,0.22);
        padding: 6px;
        min-width: 220px;
        display: flex;
        flex-direction: column;
        gap: 2px;
    }
    .mobile-topbar__menu-panel[hidden] { display: none; }

    .mobile-topbar__menu-link {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 10px 12px;
        color: inherit;
        text-decoration: none;
        border-radius: 8px;
        font-size: 14px;
        font-weight: 500;
    }
    .mobile-topbar__menu-link:active {
        background: var(--bg-warm, #f5f3ee);
    }
    .mobile-topbar__menu-link svg {
        flex-shrink: 0;
        color: var(--brand);
    }
    .mobile-topbar__menu-link--sub {
        border-top: 1px solid var(--border, #e8e2d3);
        font-size: 13px;
        color: var(--text-muted, #6b6862);
        margin-top: 2px;
        padding-top: 12px;
    }

    .mobile-topbar__channels {
        display: none;
    }

    /* legacy — оставлено для обратной совместимости, скрываем */
    .mobile-topbar__tg-text {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    /* «Места» — теперь floating pill внизу карты, а не в шапке */
    .mobile-topbar__action {
        position: fixed;
        bottom: max(20px, calc(env(safe-area-inset-bottom) + 12px));
        left: 16px;
        right: auto;
        margin: 0;
        padding: 0;
        background: transparent;
        z-index: 1000;
        display: flex;
    }
    .mobile-toggle {
        display: inline-flex;
        width: auto;
        max-width: none;
        padding: 10px 18px;
        font-size: 14px;
        font-weight: 600;
        border-radius: 9999px;
        box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22);
    }
    .mobile-toggle::before {
        content: '';
        width: 16px;
        height: 16px;
        margin-right: 6px;
        background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%23f5f3ee" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="8" y1="6" x2="21" y2="6"/><line x1="8" y1="12" x2="21" y2="12"/><line x1="8" y1="18" x2="21" y2="18"/><line x1="3" y1="6" x2="3.01" y2="6"/><line x1="3" y1="12" x2="3.01" y2="12"/><line x1="3" y1="18" x2="3.01" y2="18"/></svg>');
        background-size: contain;
        background-repeat: no-repeat;
    }

    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border);
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 78dvh;
        transform: translateY(100%);
        transition: transform 0.3s ease;
        z-index: 1001;
        border-radius: 16px 16px 0 0;
        box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.18);
    }

    .sidebar.is-open {
        transform: translateY(0);
    }

    .sidebar__header {
        display: none;
    }

    /* Legacy: легенда-стрелка под топбаром убрана на мобильном — она теперь в гамбургер-меню */
    .mobile-legend {
        display: none;
    }

    /* Легенда внутри гамбургер-меню */
    .mobile-topbar__menu-legend {
        padding: 10px 12px 8px;
        border-bottom: 1px solid var(--border);
        margin-bottom: 4px;
    }
    .mobile-topbar__menu-legend-title {
        font-size: 11px;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        color: var(--text-muted);
        margin-bottom: 6px;
    }
    .mobile-topbar__menu-legend-row {
        display: flex;
        align-items: center;
        gap: 8px;
        font-size: 13px;
        color: var(--text);
        padding: 3px 0;
    }
    .mobile-topbar__menu-legend-row .mobile-legend__dot {
        flex-shrink: 0;
    }
    /* Сами точки (sm circles) для легенды */
    .mobile-topbar__menu-legend .mobile-legend__dot {
        width: 14px;
        height: 14px;
        border-radius: 50%;
        background: var(--accent);
        display: inline-block;
    }
    .mobile-topbar__menu-legend .mobile-legend__dot--bw {
        background: #c9c4ba;
    }

    .leaflet-control-zoom {
        display: none !important;
    }

    .fab--near-me {
        position: fixed;
        bottom: max(20px, calc(env(safe-area-inset-bottom) + 12px));
        right: 16px;
    }

    .sidebar.is-open ~ .map-container .fab--near-me,
    .sidebar.is-open + .map-container .fab--near-me {
        bottom: calc(78dvh + 12px);
    }
    /* Когда шторка-сайдбар открыта, FAB «Места» поднимается над ней и переключает текст на «Карта» */
    body:has(.sidebar.is-open) .mobile-topbar__action {
        bottom: calc(78dvh + 12px);
    }

    /* Если cookie-баннер виден — поднимаем FAB и pill «Места» над ним (баннер ~80 px) */
    body:has(#cookie-notice:not([hidden])) .fab--near-me,
    body:has(#cookie-notice:not([hidden])) .mobile-topbar__action {
        bottom: calc(80px + env(safe-area-inset-bottom) + 16px);
    }

    .map-container {
        min-height: 0;
        width: 100%;
    }

    .filters {
        padding: 12px 16px 10px;
        gap: 10px;
    }

    .places-list {
        min-height: 140px;
    }

    .place-detail {
        padding: 24px 20px;
    }

    /* iOS Safari зумит на focus при font-size < 16px — поднимаем все инпуты */
    .search__input,
    .filter__select,
    .filter__input {
        font-size: 16px;
    }

    /* Touch target ≥ 44px для кнопки очистки поиска */
    .search__clear {
        width: 28px;
        height: 28px;
        right: 28px;
        font-size: 18px;
    }

    /* TG-каналы убираем из топбара, чтобы карта получала больше экрана.
       Они теперь видны при открытии списка (см. .sidebar__channels-mobile). */
    .mobile-topbar__channels {
        display: none;
    }

    /* TG-каналы внутри шторки списка (только мобайл) */
    .sidebar__channels-mobile {
        display: flex;
        flex-direction: column;
        gap: 8px;
        padding: 14px 20px 10px;
        background: var(--brand);
        border-radius: 16px 16px 0 0;
        margin: 0;
    }

    .sidebar__tg-mobile {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        min-height: 44px;
        padding: 10px 16px;
        background: rgba(245, 243, 238, 0.14);
        border: 1px solid rgba(245, 243, 238, 0.28);
        border-radius: 22px;
        color: var(--bg-page);
        font-size: 14px;
        font-weight: 500;
        white-space: nowrap;
        transition: background 0.15s ease;
    }

    .sidebar__tg-mobile:active {
        background: rgba(245, 243, 238, 0.26);
    }

    .sidebar__tg-mobile svg {
        flex-shrink: 0;
    }
}

/* === MARKER CLUSTER === */
.tea-cluster-wrapper {
    background: transparent;
    border: none;
}

.tea-cluster {
    border-radius: 50%;
    background: var(--brand);
    color: var(--bg-page);
    border: 3px solid var(--bg-page);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.22);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-family: 'Inter', -apple-system, sans-serif;
    transition: transform 0.15s ease;
}

.tea-cluster--sm {
    width: 38px;
    height: 38px;
    font-size: 13px;
}

.tea-cluster--md {
    width: 44px;
    height: 44px;
    font-size: 14px;
}

.tea-cluster--lg {
    width: 48px;
    height: 48px;
    font-size: 15px;
}

.tea-cluster-wrapper:hover .tea-cluster {
    transform: scale(1.06);
}

/* === FEEDBACK FORM === */
button.sidebar__footer-meta-link {
    font-size: inherit;
    padding: 0;
}

/* Пункт «Написать нам» в мобильном бургер-меню — кнопка, а не ссылка */
button.mobile-topbar__menu-link {
    width: 100%;
    text-align: left;
}

.modal--feedback .modal__content {
    max-width: 440px;
    padding: 24px;
}

/* На desktop модалка места становится side-panel — фидбеку это не нужно,
   возвращаем центрированный диалог с overlay */
@media (min-width: 901px) {
    .modal--feedback {
        justify-content: center;
        align-items: center;
        pointer-events: auto;
    }
    .modal--feedback .modal__overlay {
        display: block;
    }
    .modal--feedback .modal__content {
        width: calc(100% - 32px);
        height: auto;
        max-height: 85vh;
        border-radius: var(--r-3);
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
        animation: modalIn 0.2s ease;
    }
}

/* Крестик закрытия: у формы нет тёмной обложки, нужен тёмный на светлом */
.modal--feedback .modal__close {
    background: var(--bg-soft);
    color: var(--text-muted);
}

.modal--feedback .modal__close:hover {
    background: var(--bg-warm);
}

.feedback-form__title {
    font-size: 20px;
    font-weight: 700;
    margin: 0 40px 4px 0;
}

.feedback-form__hint {
    font-size: 13px;
    color: var(--text-muted);
    margin: 0 0 12px;
}

.feedback-form__label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin: 12px 0 6px;
}

.feedback-form__label span {
    font-weight: 400;
    color: var(--text-subtle);
}

.feedback-form__field {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border-strong);
    border-radius: var(--r-1);
    font-family: inherit;
    font-size: 14px;
    color: var(--text);
    background: var(--surface);
    transition: border-color 0.15s ease;
}

.feedback-form__field:focus {
    outline: none;
    border-color: var(--brand);
}

textarea.feedback-form__field {
    resize: vertical;
    min-height: 110px;
}

/* Honeypot: скрытое поле-ловушка для ботов */
.feedback-form__hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.feedback-form__submit {
    margin-top: 16px;
    width: 100%;
    padding: 10px 20px;
    background: var(--cta);
    color: var(--brand-fg);
    border-radius: var(--r-1);
    font-size: 14px;
    font-weight: 600;
    transition: opacity 0.15s ease;
}

.feedback-form__submit:hover {
    opacity: 0.9;
}

.feedback-form__submit:disabled {
    opacity: 0.6;
    cursor: default;
}

.feedback-form__status {
    margin-top: 10px;
    font-size: 13px;
    color: var(--accent);
}

.feedback-form__status:empty {
    display: none;
}

.feedback-form__success {
    font-size: 15px;
    color: var(--text-2);
    padding: 8px 0 4px;
}
