/* ============================================================
   НАСЛЕДИЕ — КАРТА ПАМЯТИ
   Part 1 / 3 — DESKTOP ONLY
   ============================================================ */

/* ── 1. ШРИФТЫ ── */
@font-face {
    font-family: 'Widock Trial';
    src: url('/nasledie_static/fonts/Widock-Trial.woff2') format('woff2'),
         url('/nasledie_static/fonts/Widock-Trial.woff') format('woff');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@import url('https://fonts.googleapis.com/css2?family=Spectral:ital,wght@1,700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@500;600;700&display=swap');

/* ── 2. ПЕРЕМЕННЫЕ ── */
:root {
    --n-green:   #3B4D2B;
    --n-road:    #A9AD94;
    --n-water:   #7DA5A5;
    --n-brown:   #A65E33;
    --n-focus:   #F3D2AF;
    --n-gold:    #9F7251;
    --n-orange:  #F18F48;
    --n-maroon:  #781E07;
    --n-paper:   #F6F3E0;
    --n-paper-2: #FBF8EE;
    --n-text:    #223127;
    --n-line:    rgba(34,49,39,0.14);

    --map-panel-w: 280px;
    --map-sidebar-w: 400px;
    --map-radius: 8px;
}

/* ── 3. БАЗА ── */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body.nasledie-body {
    margin: 0;
    background: var(--n-paper);
    color: var(--n-text);
    overflow-x: hidden;
    font-family: 'Montserrat', sans-serif;
}

.nasledie-shell { min-height: 100vh; display: flex; flex-direction: column; }
.nasledie-main { flex: 1; }

/* Типографика по брендбуку */
h1, h2, h3, h4, h5, h6,
.nasledie-brand-main,
.nasledie-footer-title,
.n-btn,
.nasledie-nav a,
.nav-cta {
    font-family: 'Widock Trial', 'Unbounded', sans-serif;
    font-style: normal;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

body, p, li,
.n-hero-lead,
.legend-text,
.spot-info h4 {
    font-family: 'Spectral', serif;
    font-style: italic;
    font-weight: 700;
}

/* ── 4. HEADER ── */
.nasledie-header {
    position: sticky;
    top: 0;
    z-index: 9999;
    background: rgba(246, 243, 224, 0.94);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--n-line);
}
.nasledie-header-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}
.nasledie-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    color: inherit;
}
.nasledie-brand img { width: 54px; height: 54px; object-fit: contain; display: block; }
.nasledie-brand-main { font-size: 0.9rem; color: var(--n-green); line-height: 1; }
.nasledie-brand-sub {
    font-family: 'Spectral', serif !important;
    font-style: italic; font-weight: 700;
    font-size: 0.64rem;
    color: var(--n-brown);
    line-height: 1.15;
}
.nasledie-nav ul {
    margin: 0; padding: 0; list-style: none;
    display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
}
.nasledie-nav a {
    text-decoration: none;
    font-size: 0.78rem;
    color: var(--n-text);
    opacity: 0.92;
    transition: 0.2s ease;
}
.nasledie-nav a:hover { color: var(--n-orange); }
.nasledie-nav .nav-cta {
    display: inline-flex; align-items: center; justify-content: center;
    min-height: 40px; padding: 0 14px;
    border: 2px solid var(--n-green);
    background: var(--n-green);
    color: var(--n-paper);
    font-size: 0.68rem;
    letter-spacing: 0.08em;
}
.nasledie-nav .nav-cta:hover { background: transparent; color: var(--n-green); }

/* ── 5. FOOTER ── */
.nasledie-footer {
    border-top: 1px solid var(--n-line);
    background: rgba(255,255,255,0.25);
}
.nasledie-footer-inner {
    max-width: 1280px; margin: 0 auto; padding: 24px;
    display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap;
}
.nasledie-footer-title { font-size: 0.84rem; color: var(--n-green); margin-bottom: 8px; }
.nasledie-footer p { font-size: 0.9rem; color: var(--n-text); max-width: 420px; line-height: 1.65; }

/* ============================================================
   6. КАРТА ПАМЯТИ — DESKTOP
   ============================================================ */

.nasledie-map-wrapper {
    position: relative;
    width: 100%;
    height: calc(100vh - 82px);
    overflow: hidden;
    background: #e5e3db;
    font-family: 'Montserrat', sans-serif;
}
body.style-map .nasledie-map-wrapper {
    height: 100vh;
    height: 100dvh;
}

#map {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* Левая плавающая панель */
.map-left-panel {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 1000;
    width: var(--map-panel-w);
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--n-gold) transparent;
}
.map-left-panel::-webkit-scrollbar { width: 4px; }
.map-left-panel::-webkit-scrollbar-thumb { background: var(--n-gold); border-radius: 4px; }

.map-panel-card {
    background: var(--n-paper);
    border: 1px solid var(--n-line);
    border-radius: var(--map-radius);
    box-shadow: 0 4px 15px rgba(0,0,0,0.12);
    overflow: hidden;
}
.map-panel-card-header {
    padding: 12px 15px;
    background: var(--n-paper-2);
    border-bottom: 1px solid var(--n-line);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
}
.map-panel-card-header:hover { background: var(--n-focus); }
.map-panel-card-header h3 {
    font-family: 'Widock Trial', sans-serif;
    font-size: 0.72rem;
    color: var(--n-text);
    text-transform: uppercase;
    margin: 0;
    letter-spacing: 0.05em;
}
.toggle-icon { font-size: 0.65rem; color: var(--n-gold); transition: transform 0.25s; }
.map-panel-card.collapsed .toggle-icon { transform: rotate(-90deg); }
.map-panel-card.collapsed .map-panel-card-body { display: none; }
.map-panel-card-body { padding: 12px 15px; display: flex; flex-direction: column; gap: 6px; }

/* Хронограф эпох */
.era-checkbox {
    display: flex; align-items: center; gap: 8px;
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--n-text);
    padding: 4px 0;
    user-select: none;
}
.era-checkbox input[type="checkbox"] { accent-color: var(--n-maroon); width: 14px; height: 14px; }
.era-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }

/* Фильтр легенд */
.filter-toggles { display: flex; flex-direction: column; gap: 4px; }
.filter-toggle {
    display: flex; align-items: center; gap: 8px;
    padding: 9px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.76rem;
    font-weight: 600;
    color: var(--n-text);
    background: var(--n-paper-2);
    border: 1px solid var(--n-line);
    transition: all 0.2s;
    user-select: none;
}
.filter-toggle:hover { background: var(--n-focus); }
.filter-toggle.active {
    background: var(--n-green);
    color: #fff;
    border-color: var(--n-green);
}

/* Кнопки действий в левой панели */
.map-action-btn {
    width: 100%;
    padding: 11px 14px;
    background: var(--n-paper-2);
    border: 1px solid var(--n-line);
    border-radius: var(--map-radius);
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 0.78rem;
    color: var(--n-text);
    display: flex; align-items: center; gap: 8px;
    transition: 0.2s;
    box-shadow: 0 1px 4px rgba(34,49,39,0.06);
}
.map-action-btn:hover { background: var(--n-focus); border-color: var(--n-green); }
.map-action-btn .btn-icon { font-size: 1rem; }
.map-action-btn--admin {
    background: var(--n-maroon);
    color: #fff;
    border-color: var(--n-maroon);
}
.map-action-btn--admin:hover { background: var(--n-brown); color: #fff; }
.map-action-btn--admin.active {
    background: var(--n-orange);
    border-color: var(--n-orange);
    animation: nPulseBtn 1.5s ease-in-out infinite;
}
@keyframes nPulseBtn {
    0%,100% { box-shadow: 0 0 0 0 rgba(241,143,72,0.4); }
    50% { box-shadow: 0 0 0 8px rgba(241,143,72,0); }
}

/* Mobile toggle — скрыт на ПК */
.map-mobile-toggle { display: none; }

/* ── Правая колонка ── */
.map-right-sidebar {
    position: absolute;
    top: 0; right: 0;
    z-index: 1000;
    width: var(--map-sidebar-w);
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 20px;
    box-sizing: border-box;
    pointer-events: none;
    overflow: hidden;
}

/* Поиск */
.map-search-floating {
    pointer-events: auto;
    width: 100%;
    background: var(--n-paper);
    border: 1px solid var(--n-line);
    border-radius: 10px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.14);
    margin-bottom: 14px;
    flex-shrink: 0;
    overflow: hidden;
}
.map-search-input {
    width: 100%;
    height: 50px;
    border: none;
    padding: 0 15px 0 42px;
    background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%239F7251' viewBox='0 0 16 16'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85zm-5.242.656a5 5 0 1 1 0-10 5 5 0 0 1 0 10z'/%3E%3C/svg%3E") no-repeat 15px center;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.85rem;
    color: var(--n-text);
    outline: none;
}
.map-search-input::placeholder { color: var(--n-gold); opacity: 0.85; }
.map-search-results {
    max-height: 340px;
    overflow-y: auto;
    background: #fff;
    border-top: 1px solid var(--n-line);
    display: none;
}
.map-search-results.active { display: block; }

.search-section-label {
    background: var(--n-paper-2);
    padding: 10px 14px 6px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.6rem;
    font-weight: 700;
    color: var(--n-maroon);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border-bottom: 1px solid var(--n-line);
}
.map-search-result {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 14px;
    cursor: pointer;
    border-bottom: 1px solid #f0eee5;
    transition: background 0.15s;
    font-family: 'Montserrat', sans-serif;
}
.map-search-result:hover { background: var(--n-focus); }
.map-search-result:last-child { border-bottom: none; }
.geo-icon { width: 20px; height: 20px; flex-shrink: 0; background-size: contain; background-repeat: no-repeat; background-position: center; }
.geo-result-active .geo-icon {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%233B4D2B'%3E%3Cpath d='M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z'/%3E%3C/svg%3E");
}
.geo-result-inactive .geo-icon {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23A9AD94'%3E%3Cpath d='M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z'/%3E%3C/svg%3E");
}
.geo-result-active strong { color: var(--n-green); font-size: 0.82rem; }
.geo-result-inactive strong { color: var(--n-road); font-size: 0.82rem; }
.map-search-result span { font-size: 0.72rem; color: #888; }

/* ── Выезжающая панель "Дело объекта" ── */
.sidebar-content-wrapper {
    pointer-events: auto;
    flex: 1;
    min-height: 0;
    background: var(--n-paper);
    border: 1px solid var(--n-line);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.18);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(calc(100% + 40px));
    transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}
.sidebar-content-wrapper.active { transform: translateY(0); }

.sidebar-header {
    padding: 16px 18px;
    border-bottom: 1px solid var(--n-line);
    display: flex; justify-content: space-between; align-items: flex-start;
    background: var(--n-paper-2);
    flex-shrink: 0;
}
.sidebar-header h2 {
    margin: 0; padding-right: 12px;
    font-family: 'Widock Trial', sans-serif;
    font-size: 1.05rem;
    color: var(--n-green);
    text-transform: uppercase;
    line-height: 1.25;
}
.sidebar-close {
    width: 30px; height: 30px;
    border-radius: 50%;
    border: 1px solid var(--n-line);
    background: #fff;
    font-size: 14px;
    color: var(--n-gold);
    cursor: pointer;
    flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.2s;
}
.sidebar-close:hover { background: var(--n-focus); color: var(--n-text); }

.sidebar-scroll-area { flex: 1; overflow-y: auto; padding-bottom: 24px; }
.sidebar-scroll-area::-webkit-scrollbar { width: 5px; }
.sidebar-scroll-area::-webkit-scrollbar-thumb { background: var(--n-gold); border-radius: 4px; }

.sidebar-section { padding: 16px 18px; border-bottom: 1px solid rgba(34,49,39,0.08); }
.sidebar-section:last-child { border-bottom: none; }

.sidebar-label {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--n-maroon);
    margin-bottom: 10px;
}
.legend-text {
    font-family: 'Spectral', serif;
    font-style: italic; font-weight: 700;
    font-size: 0.92rem;
    line-height: 1.6;
    color: var(--n-text);
}

/* Было / Стало слайдер */
.before-after-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 4/3;
    overflow: hidden;
    border-radius: 6px;
    border: 1px solid var(--n-line);
    background: var(--n-road);
    cursor: ew-resize;
    user-select: none;
    touch-action: none;
}
.before-after-wrap img {
    position: absolute; top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover; pointer-events: none;
}
.ba-img-after { z-index: 1; }
.ba-img-before { z-index: 2; clip-path: inset(0 50% 0 0); }
.ba-slider-line {
    position: absolute; top: 0; left: 50%; width: 2px; height: 100%;
    background: var(--n-focus);
    box-shadow: 0 0 6px rgba(0,0,0,0.25);
    z-index: 3; pointer-events: none;
}
.ba-slider-handle {
    position: absolute; top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 34px; height: 34px;
    border-radius: 50%;
    background: var(--n-maroon);
    border: 2px solid var(--n-focus);
    color: #fff; font-size: 12px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    z-index: 4; pointer-events: none;
}
.ba-label {
    position: absolute; bottom: 8px;
    padding: 3px 9px; border-radius: 4px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.62rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.05em;
    z-index: 5; pointer-events: none;
}
.ba-label--before { left: 8px; background: var(--n-text); color: #fff; }
.ba-label--after { right: 8px; background: var(--n-gold); color: #fff; }

/* Галерея в сайдбаре */
.spot-gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}
.spot-gallery-item {
    aspect-ratio: 1;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid var(--n-line);
    cursor: pointer;
}
.spot-gallery-item img {
    width: 100%; height: 100%; object-fit: cover; display: block;
    transition: transform 0.25s;
}
.spot-gallery-item:hover img { transform: scale(1.04); }

/* Аудиогид */
.audio-guide-btn {
    width: 100%; min-height: 44px;
    background: var(--n-paper-2);
    border: 1px solid var(--n-line);
    border-radius: 6px;
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600; font-size: 0.78rem;
    color: var(--n-text);
    transition: 0.2s;
}
.audio-guide-btn:hover { background: var(--n-focus); border-color: var(--n-green); }

/* Место силы */
.power-checklist { list-style: none; padding: 0; margin: 0; }
.power-checklist li {
    padding: 7px 0 7px 20px;
    position: relative;
    font-family: 'Spectral', serif;
    font-style: italic; font-weight: 700;
    font-size: 0.84rem;
    color: var(--n-text);
    border-bottom: 1px dashed rgba(34,49,39,0.12);
}
.power-checklist li:last-child { border-bottom: none; }
.power-checklist li::before {
    content: ''; position: absolute; left: 2px; top: 13px;
    width: 7px; height: 7px; border-radius: 50%;
    background: var(--n-green);
}

/* Кнопки в сайдбаре */
.detail-btn, .share-btn {
    width: 100%;
    min-height: 44px;
    border-radius: 6px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 0.76rem;
    cursor: pointer;
    transition: 0.2s;
}
.detail-btn {
    background: var(--n-green); color: #fff;
    border: 1px solid var(--n-green);
    text-transform: uppercase; letter-spacing: 0.05em;
    margin-bottom: 8px;
}
.detail-btn:hover { background: var(--n-orange); border-color: var(--n-orange); }
.share-btn {
    background: var(--n-paper-2);
    color: var(--n-text);
    border: 1px solid var(--n-line);
}
.share-btn:hover { background: var(--n-focus); }

/* Админ-кнопки в сайдбаре */
.sa-btn-edit, .sa-btn-delete {
    flex: 1;
    min-height: 36px;
    border-radius: 4px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 0.75rem;
    cursor: pointer;
}
.sa-btn-edit { background: var(--n-green); color: #fff; border: none; }
.sa-btn-edit:hover { background: #4a5e36; }
.sa-btn-delete { background: transparent; color: #c0392b; border: 1px solid #c0392b; }
.sa-btn-delete:hover { background: #fde8e6; }

.map-mobile-close-rs { display: none; }

/* ── Hover-balloon (Яндекс) ── */
.ymaps-2-1-79-balloon__content { padding: 0 !important; margin: 0 !important; }
.ymaps-2-1-79-balloon {
    border-radius: 10px !important;
    overflow: hidden !important;
    box-shadow: 0 10px 30px rgba(34,49,39,0.18) !important;
    border: 1px solid var(--n-line) !important;
}
.hover-card { padding: 16px; width: 240px; background: var(--n-paper); }
.hover-card-title {
    font-family: 'Widock Trial', sans-serif;
    font-size: 1rem;
    color: var(--n-green);
    text-transform: uppercase;
    margin-bottom: 8px;
    line-height: 1.2;
}
.hover-card-desc {
    font-family: 'Spectral', serif;
    font-style: italic; font-weight: 700;
    font-size: 0.82rem;
    line-height: 1.45;
    color: var(--n-text);
    opacity: 0.9;
    margin-bottom: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.hover-card-btn {
    display: block; width: 100%; text-align: center;
    padding: 10px 0;
    background: var(--n-green); color: #fff;
    border: none; border-radius: 6px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600; font-size: 0.72rem;
    text-transform: uppercase; letter-spacing: 0.06em;
    cursor: pointer; transition: background 0.2s;
}
.hover-card-btn:hover { background: var(--n-orange); }

/* Яндекс копирайты — обязательно оставляем */
.ymaps-2-1-79-copyright,
.ymaps-2-1-79-logo-container {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    z-index: 10 !important;
}

/* ============================================================
   7. АДМИН-МОДАЛКА "Полевая фиксация"
   ============================================================ */

.map-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(34,49,39,0.55);
    z-index: 10001;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.map-modal-overlay.open { display: flex; }

.map-modal {
    background: #fff;
    border-radius: 12px;
    width: 100%;
    max-width: 720px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(0,0,0,0.28);
}
.map-modal-header {
    padding: 16px 22px;
    background: var(--n-paper-2);
    border-bottom: 1px solid var(--n-line);
    display: flex; justify-content: space-between; align-items: center;
    flex-shrink: 0;
}
.map-modal-header h3 {
    margin: 0;
    font-family: 'Widock Trial', sans-serif;
    font-size: 0.88rem;
    text-transform: uppercase;
    color: var(--n-text);
}
.map-modal-body {
    overflow-y: auto;
    padding: 22px;
    flex: 1;
}
.map-modal-footer {
    padding: 14px 22px;
    background: var(--n-paper-2);
    border-top: 1px solid var(--n-line);
    display: flex; justify-content: flex-end; gap: 10px;
    flex-shrink: 0;
}

/* Поля формы */
.mf-section { margin-bottom: 22px; }
.mf-section-title {
    font-family: 'Widock Trial', sans-serif;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--n-maroon);
    padding-bottom: 8px;
    border-bottom: 2px solid var(--n-focus);
    margin-bottom: 14px;
}
.mf-group { margin-bottom: 14px; }
.mf-group:last-child { margin-bottom: 0; }

.mf-group > label,
.sidebar-label {
    display: block;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 0.66rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--n-maroon);
    margin-bottom: 6px;
}
.mf-counter { font-weight: 500; color: var(--n-gold); margin-left: 4px; }

.mf-input, .mf-textarea, select.mf-input {
    width: 100%;
    height: 42px;
    padding: 0 12px;
    border: 1px solid #d5d0c5;
    border-radius: 6px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.84rem;
    color: var(--n-text);
    background: #fff;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.2s;
}
.mf-input:focus, .mf-textarea:focus, select.mf-input:focus { border-color: var(--n-green); }
.mf-textarea { height: auto; min-height: 96px; padding: 10px 12px; resize: vertical; }

.mf-row { display: flex; gap: 12px; margin-bottom: 14px; }
.mf-row--2 > .mf-group { flex: 1; min-width: 0; }
.mf-coords-row { display: flex; gap: 10px; }
.mf-coords-row .mf-input { flex: 1; background: #f7f5ef; }

.mf-input--sub { margin-top: 6px; background: var(--n-paper-2); border-style: dashed; }
.mf-input--inline { width: 90px; display: inline-block; margin: 0 5px; height: 34px; }

.mf-category-block { animation: mfFadeIn 0.22s ease; }
@keyframes mfFadeIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }

/* Галерея превью */
.mf-gallery-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
    margin-top: 8px;
    min-height: 10px;
}
.mf-gallery-grid img {
    width: 100%; aspect-ratio: 1; object-fit: cover;
    border-radius: 4px; border: 1px solid var(--n-line);
}

/* Расписание (Организация) */
.mf-schedule {
    background: var(--n-paper-2);
    border: 1px solid var(--n-line);
    border-radius: 8px;
    padding: 12px;
    display: flex; flex-direction: column; gap: 7px;
}
.mf-schedule-row { display: flex; align-items: center; gap: 8px; }
.mf-schedule-day {
    width: 48px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.78rem;
    display: flex; align-items: center; gap: 4px;
    cursor: pointer; color: var(--n-text);
}
.mf-schedule-day input { accent-color: var(--n-green); }
.mf-schedule-row .mf-input { flex: 1; height: 34px; text-align: center; padding: 0; }
.mf-schedule-row span { color: var(--n-gold); }

/* Билеты (Мероприятие) */
.mf-ticket-system {
    background: var(--n-paper-2);
    border: 1px solid var(--n-line);
    border-radius: 8px;
    padding: 14px;
    display: flex; flex-direction: column; gap: 10px;
}
.mf-radio {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.84rem;
    color: var(--n-text);
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.mf-radio input[type="radio"] { accent-color: var(--n-green); width: 15px; height: 15px; flex-shrink: 0; }

/* Кнопки модалки */
.map-modal-footer .detail-btn,
.map-modal-footer .share-btn {
    width: auto; min-width: 130px;
    margin: 0; padding: 0 22px; height: 42px;
}

/* ── Z-index порядок ── */
.nasledie-header { z-index: 9999; }
.map-left-panel,
.map-right-sidebar { z-index: 1000; }
.map-modal-overlay { z-index: 10001; }

/* Конец Part 1 — ПК версия */

/* ============================================================
   НАСЛЕДИЕ
   Part 2 / 3 — DESKTOP ONLY
   Главная, Деталь локации, Редактор, CTA
   ============================================================ */

/* ── 1. ACCESS GUARD ── */
.n-access-guard,
.access-guard {
    min-height: calc(100vh - 160px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 16px;
    background: var(--n-paper);
    text-align: center;
}
.access-card {
    width: 100%;
    max-width: 760px;
    background: var(--n-paper-2);
    border: 1px solid var(--n-line);
    box-shadow: 0 18px 38px rgba(34,49,39,0.07);
    padding: 36px 30px;
}
.access-label {
    font-family: 'Widock Trial', sans-serif;
    font-size: 0.7rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--n-brown);
    margin-bottom: 12px;
}
.access-card h1 {
    color: var(--n-green);
    font-size: clamp(1.6rem, 3vw, 2.5rem);
    line-height: 1.15;
    margin: 0 0 14px;
    font-family: 'Widock Trial', sans-serif;
    text-transform: uppercase;
}
.access-card p {
    font-family: 'Spectral', serif;
    font-style: italic; font-weight: 700;
    font-size: 1rem;
    max-width: 600px;
    margin: 0 auto 12px;
    color: var(--n-text);
    line-height: 1.6;
}
.role-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 10px;
    padding: 9px 16px;
    background: var(--n-paper);
    border: 1px solid var(--n-line);
    font-family: 'Widock Trial', sans-serif;
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--n-maroon);
}
.access-actions {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}
.access-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    text-decoration: none;
    font-family: 'Widock Trial', sans-serif;
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border: 2px solid var(--n-green);
    background: var(--n-green);
    color: var(--n-paper);
    transition: .2s ease;
}
.access-btn:hover { background: transparent; color: var(--n-green); }
.access-btn.secondary { background: transparent; color: var(--n-green); }
.access-btn.secondary:hover { background: var(--n-green); color: var(--n-paper); }

/* ── 2. HERO ── */
.n-index { box-sizing: border-box; }
.n-index .wrap { max-width: 1280px; margin: 0 auto; padding: 0 24px; }

.n-hero {
    position: relative;
    min-height: 88vh;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
}
.n-hero-overlay {
    position: absolute; inset: 0; z-index: 1;
    background: linear-gradient(160deg, rgba(34,49,39,0.72) 0%, rgba(120,30,7,0.52) 100%);
}
.n-hero-inner,
.n-hero .wrap.n-hero-inner {
    position: relative; z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
    padding: 72px 24px;
    width: 100%;
    display: grid;
    grid-template-columns: 1.08fr 0.92fr;
    gap: 40px;
    align-items: center;
}
.n-hero-left { max-width: 680px; }
.n-hero-kicker,
.n-kicker {
    display: inline-block;
    margin-bottom: 16px;
    font-family: 'Widock Trial', sans-serif;
    font-size: 0.68rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--n-focus);
}
.n-hero-title,
.n-hero h1 {
    color: #fff;
    font-family: 'Widock Trial', sans-serif;
    font-size: clamp(2rem, 4.1vw, 3.6rem);
    line-height: 1.04;
    margin: 0 0 18px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.n-hero-lead {
    max-width: 620px;
    color: rgba(251,248,238,.94);
    font-family: 'Spectral', serif;
    font-style: italic; font-weight: 700;
    font-size: 1.05rem;
    line-height: 1.58;
}
.n-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 26px; }

.n-btn {
    display: inline-flex; align-items: center; justify-content: center;
    min-height: 48px; padding: 0 20px;
    text-decoration: none;
    font-family: 'Widock Trial', sans-serif;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border: 2px solid transparent;
    transition: .22s ease;
}
.n-btn-primary { background: var(--n-orange); color: #fff; }
.n-btn-primary:hover { background: var(--n-brown); }
.n-btn-ghost {
    border-color: #fff;
    background: rgba(251,248,238,.08);
    color: #fff;
}
.n-btn-ghost:hover { background: #fff; color: var(--n-text); }

/* Паспорт-карта в hero */
.n-hero-right { display: flex; justify-content: center; }
.n-passport-card,
.n-hero-card {
    background: rgba(251,248,238,.94);
    border: 1px solid var(--n-line);
    padding: 24px;
    box-shadow: 0 22px 40px rgba(34,49,39,.12);
    max-width: 360px;
    width: 100%;
    position: relative;
}
.n-passport-card::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0;
    height: 4px;
    background: var(--n-maroon);
}
.n-passport-label,
.n-card-label {
    font-family: 'Widock Trial', sans-serif;
    font-size: 0.62rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--n-gold);
    margin-bottom: 10px;
}
.n-passport-title,
.n-hero-card h3 {
    color: var(--n-green);
    font-family: 'Widock Trial', sans-serif;
    font-size: 1.18rem;
    text-transform: uppercase;
    margin: 0 0 10px;
    line-height: 1.2;
}
.n-passport-text,
.n-hero-card p {
    color: var(--n-text);
    font-family: 'Spectral', serif;
    font-style: italic; font-weight: 700;
    font-size: 0.94rem;
    line-height: 1.55;
    margin: 0;
}

/* Покачивание паспорта */
@keyframes nRock {
    0%,100% { transform: rotate(0deg) translateY(0); }
    25% { transform: rotate(0.3deg) translateY(-1px); }
    75% { transform: rotate(-0.3deg) translateY(1px); }
}
.n-rocking { animation: nRock 10s ease-in-out infinite; transform-origin: center center; }
@media (prefers-reduced-motion: reduce) { .n-rocking { animation: none; } }

/* ── 3. ОБЩИЕ СЕКЦИИ ГЛАВНОЙ ── */
.n-section { padding: 72px 0; }
.n-section.alt,
.n-section:nth-child(even) { background: rgba(251,248,238,.55); border-top: 1px solid var(--n-line); border-bottom: 1px solid var(--n-line); }

.n-container,
.n-section .wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

.n-section-head {
    text-align: center;
    margin-bottom: 36px;
}
.n-section-title,
.n-section-head h2 {
    margin: 0 0 10px;
    color: var(--n-green);
    font-family: 'Widock Trial', sans-serif;
    font-size: clamp(1.35rem, 2.2vw, 2rem);
    text-transform: uppercase;
    line-height: 1.15;
}
.n-section-note,
.n-head-note {
    font-family: 'Spectral', serif;
    font-style: italic; font-weight: 700;
    font-size: 1rem;
    color: var(--n-text);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.55;
    opacity: 0.92;
}

/* Карточки 3 колонки */
.n-cards-row,
.n-grid-3,
.n-cards-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.n-card {
    background: #fff;
    border: 1px solid var(--n-line);
    border-radius: 4px;
    padding: 22px;
    transition: box-shadow 0.25s;
}
.n-card:hover { box-shadow: 0 8px 28px rgba(34,49,39,0.09); }
.n-card .mono {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--n-maroon);
    margin-bottom: 10px;
}
.n-card-title,
.n-card h3 {
    color: var(--n-green);
    font-family: 'Widock Trial', sans-serif;
    font-size: 1.02rem;
    text-transform: uppercase;
    margin: 0 0 10px;
    line-height: 1.25;
}
.n-card-text,
.n-card p {
    color: var(--n-text);
    font-family: 'Spectral', serif;
    font-style: italic; font-weight: 700;
    font-size: 0.92rem;
    line-height: 1.55;
    margin: 0;
}

/* ── 4. PILOT / FEATURES ── */
.n-pilot-grid,
.n-feature-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 26px;
    align-items: stretch;
}
.n-pilot-photo {
    position: relative;
    min-height: 380px;
    border: 1px solid var(--n-line);
    overflow: hidden;
    background: var(--n-road);
}
.n-pilot-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }

.n-list { display: grid; gap: 12px; margin-top: 16px; }
.n-list-item {
    background: rgba(251,248,238,.85);
    border-left: 4px solid var(--n-orange);
    padding: 12px 14px;
    color: var(--n-text);
    font-family: 'Spectral', serif;
    font-style: italic; font-weight: 700;
    line-height: 1.55;
}

/* Features band */
.n-feature-band {
    background: var(--n-green);
    color: var(--n-paper);
}
.n-feature-band .n-section-title,
.n-feature-band h2,
.n-feature-band h3,
.n-feature-band p,
.n-feature-band li { color: var(--n-paper); }

.n-features-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.n-features-box,
.n-feature-box {
    background: rgba(251,248,238,.07);
    border: 1px solid rgba(251,248,238,.15);
    padding: 22px;
    border-radius: 4px;
}
.n-features-box-label {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.6rem; font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--n-focus);
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(251,248,238,.15);
}
.n-features-list { list-style: none; padding: 0; margin: 0; }
.n-features-list li,
.n-feature-box li {
    font-family: 'Spectral', serif;
    font-style: italic; font-weight: 700;
    font-size: 0.92rem;
    line-height: 1.55;
    color: var(--n-paper);
    padding: 5px 0 5px 16px;
    position: relative;
}
.n-features-list li::before {
    content: '';
    position: absolute; left: 0; top: 0.9em;
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--n-orange);
}

/* ── 5. ROADMAP / ЗАДАЧИ ── */
.n-roadmap {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}
.n-step {
    background: var(--n-paper-2);
    border: 1px solid var(--n-line);
    padding: 20px;
    border-radius: 4px;
}
.n-step-num {
    font-family: 'Widock Trial', sans-serif;
    font-size: 1.6rem;
    color: var(--n-orange);
    margin-bottom: 8px;
}
.n-step h3 {
    color: var(--n-green);
    font-family: 'Widock Trial', sans-serif;
    font-size: 0.95rem;
    text-transform: uppercase;
    margin: 0 0 8px;
}
.n-step p {
    color: var(--n-text);
    font-family: 'Spectral', serif;
    font-style: italic; font-weight: 700;
    font-size: 0.88rem;
    line-height: 1.55;
    margin: 0;
}

/* Динамические задачи */
.n-tasks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}
.n-task-card { position: relative; }
.n-task-card-actions {
    display: flex; gap: 6px;
    margin-top: 12px; padding-top: 10px;
    border-top: 1px solid var(--n-line);
}
.n-task-action {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.75rem;
    width: 30px; height: 30px;
    border: 1px solid var(--n-line);
    border-radius: 4px;
    background: var(--n-paper-2);
    color: var(--n-text);
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: 0.15s;
}
.n-task-action:hover { background: var(--n-focus); border-color: var(--n-gold); }
.n-task-action--del:hover { background: #fde8e6; border-color: var(--n-maroon); color: var(--n-maroon); }

.n-tasks-admin-bar { text-align: center; margin-top: 22px; }
.n-btn-add {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.78rem; font-weight: 600;
    letter-spacing: 0.06em;
    padding: 10px 20px;
    border: 2px dashed var(--n-maroon);
    border-radius: 4px;
    background: transparent;
    color: var(--n-maroon);
    cursor: pointer;
    transition: 0.2s;
}
.n-btn-add:hover { background: var(--n-maroon); color: #fff; }

/* ── 6. КАРТА СЁЛ (SVG) ── */
.n-villages-map {
    background: var(--n-paper);
    border: 1px solid var(--n-line);
    border-radius: 6px;
    overflow: hidden;
    position: relative;
}
.n-villages-map-bg { width: 100%; padding: 16px; }
.n-villages-svg { width: 100%; height: auto; display: block; }

.n-village-point { cursor: pointer; }
.n-village-dot {
    fill: var(--n-maroon);
    stroke: var(--n-focus);
    stroke-width: 2;
    transition: r 0.18s;
}
.n-village-point:hover .n-village-dot { r: 11; }
.n-village-dot-pulse {
    fill: none;
    stroke: var(--n-orange);
    stroke-width: 1.5;
    opacity: 0;
    animation: nDotPulse 3s ease-out infinite;
}
@keyframes nDotPulse {
    0% { r: 8; opacity: 0.55; }
    100% { r: 22; opacity: 0; }
}
.n-village-tooltip-fo { pointer-events: none; opacity: 0; transition: opacity 0.2s; }
.n-village-point:hover .n-village-tooltip-fo { opacity: 1; pointer-events: auto; }
.n-village-tooltip {
    background: var(--n-paper);
    border: 1px solid var(--n-line);
    border-radius: 4px;
    padding: 10px;
    box-shadow: 0 4px 20px rgba(34,49,39,0.14);
    min-width: 160px;
}
.n-village-tooltip-img {
    width: 48px; height: 48px; object-fit: cover;
    border-radius: 3px; margin-bottom: 6px;
    border: 1px solid var(--n-line);
}
.n-village-tooltip-title {
    font-family: 'Widock Trial', sans-serif;
    font-size: 0.8rem;
    color: var(--n-text);
    margin-bottom: 3px;
}
.n-village-tooltip-desc {
    font-family: 'Spectral', serif;
    font-style: italic; font-weight: 700;
    font-size: 0.72rem;
    line-height: 1.35;
    color: var(--n-road);
}
.n-village-del {
    position: absolute; top: 4px; right: 4px;
    width: 20px; height: 20px;
    border: none; border-radius: 50%;
    background: rgba(120,30,7,0.08);
    color: var(--n-maroon);
    font-size: 0.65rem;
    cursor: pointer;
}
.n-village-del:hover { background: var(--n-maroon); color: #fff; }

/* Админ-форма сёл */
.n-villages-admin { margin-top: 20px; }
.n-villages-admin-toggle {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.72rem; font-weight: 600;
    letter-spacing: 0.06em;
    color: var(--n-maroon);
    cursor: pointer;
    padding: 6px 12px;
    border: 1px dashed var(--n-line);
    border-radius: 4px;
    background: transparent;
}
.n-villages-add-form {
    background: var(--n-paper);
    border: 1px solid var(--n-line);
    border-radius: 4px;
    padding: 16px;
    margin-top: 12px;
}
.n-villages-form-row {
    display: flex; gap: 12px; margin-bottom: 12px;
    flex-wrap: wrap; align-items: flex-end;
}
.n-input, .n-input-sm {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.82rem;
    padding: 8px 10px;
    border: 1px solid var(--n-line);
    border-radius: 4px;
    background: #fff;
    color: var(--n-text);
    outline: none;
}
.n-input:focus, .n-input-sm:focus { border-color: var(--n-maroon); }
.n-input { flex: 1; min-width: 140px; }
.n-input-sm { width: 80px; text-align: center; }
.n-input-file-label { font-family: 'Montserrat', sans-serif; font-size: 0.68rem; color: var(--n-gold); }
.n-hint { font-family: 'Montserrat', sans-serif; font-size: 0.68rem; color: var(--n-road); margin-top: 6px; }

/* ── 7. CTA ФЕДЕРАЛЬНОГО УРОВНЯ ── */
.n-cta {
    position: relative;
    min-height: 72vh;
    display: flex; align-items: center; justify-content: center;
    background-size: cover; background-position: center;
    overflow: hidden;
}
.n-cta-overlay {
    position: absolute; inset: 0; z-index: 1;
    background: linear-gradient(135deg, rgba(59,77,43,0.88) 0%, rgba(120,30,7,0.78) 55%, rgba(159,114,81,0.72) 100%);
}
.n-cta-particles { position: absolute; inset: 0; z-index: 2; pointer-events: none; overflow: hidden; }
.n-cta-particle {
    position: absolute; bottom: -10px;
    background: rgba(243,210,175,0.45);
    border-radius: 50%;
    animation: nParticleFloat linear infinite;
}
@keyframes nParticleFloat {
    0% { transform: translateY(0) scale(1); opacity: 0; }
    10% { opacity: 0.55; }
    90% { opacity: 0.1; }
    100% { transform: translateY(-85vh) scale(0.3); opacity: 0; }
}
.n-cta-inner { position: relative; z-index: 3; text-align: center; max-width: 780px; padding: 48px 24px; }
.n-cta-line {
    width: 0; height: 2px; margin: 0 auto;
    background: var(--n-focus);
    transition: width 1.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.n-cta-line-top { margin-bottom: 24px; }
.n-cta-line-bottom { margin-top: 24px; }
.n-cta-visible .n-cta-line { width: 180px; }
.n-cta-title {
    font-family: 'Widock Trial', sans-serif;
    font-size: clamp(1.6rem, 3.8vw, 2.6rem);
    color: #fff;
    line-height: 1.2;
    margin: 0 0 14px;
    text-transform: uppercase;
}
.n-cta-sub {
    font-family: 'Spectral', serif;
    font-style: italic; font-weight: 700;
    font-size: clamp(0.92rem, 1.6vw, 1.1rem);
    line-height: 1.55;
    color: rgba(255,255,255,0.86);
    max-width: 580px;
    margin: 0 auto 24px;
}
.n-cta-btn {
    display: inline-block;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.76rem; font-weight: 700;
    letter-spacing: 0.16em;
    color: var(--n-text);
    background: var(--n-focus);
    border: none;
    padding: 14px 28px;
    border-radius: 4px;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    transition: transform 0.25s, box-shadow 0.25s;
}
.n-cta-btn::before {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.35), transparent);
    transform: translateX(-100%);
    transition: transform 0.55s;
}
.n-cta-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(243,210,175,0.35); }
.n-cta-btn:hover::before { transform: translateX(100%); }

/* S3 кнопки в hero/cta */
.n-s3-form { position: absolute; z-index: 5; bottom: 16px; left: 16px; }
.n-s3-form--cta { position: absolute; z-index: 5; bottom: 16px; right: 16px; }
.n-s3-btn {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.66rem; font-weight: 500;
    letter-spacing: 0.08em;
    color: rgba(255,255,255,0.58);
    cursor: pointer;
    padding: 5px 10px;
    border: 1px dashed rgba(255,255,255,0.28);
    border-radius: 3px;
    background: transparent;
    transition: 0.2s;
}
.n-s3-btn:hover { color: #fff; border-color: rgba(255,255,255,0.55); }

/* ── 8. СТРАНИЦА ДЕТАЛИ ЛОКАЦИИ ── */
.spot-detail-page { background: var(--n-paper); }
.spot-detail-wrap { max-width: 820px; margin: 0 auto; padding: 28px 24px 56px; }
.spot-detail-back {
    display: inline-flex; align-items: center; gap: 8px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.72rem; font-weight: 600;
    color: var(--n-maroon);
    text-decoration: none;
    margin-bottom: 18px;
    padding: 7px 12px;
    background: var(--n-paper-2);
    border: 1px solid var(--n-line);
    border-radius: 6px;
    transition: background 0.18s;
}
.spot-detail-back:hover { background: var(--n-focus); color: var(--n-text); }
.spot-detail-hero { margin-bottom: 22px; }
.spot-detail-hero-img {
    width: 100%; aspect-ratio: 16/9;
    border-radius: 10px; overflow: hidden;
    border: 1px solid var(--n-line);
    margin-bottom: 16px; background: var(--n-road);
}
.spot-detail-hero-img img { width: 100%; height: 100%; object-fit: cover; }
.spot-detail-cat-tag {
    display: inline-block;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.6rem; font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--n-maroon);
    background: rgba(120,30,7,0.07);
    padding: 5px 10px;
    border-radius: 20px;
    margin-bottom: 10px;
}
.spot-detail-title {
    font-family: 'Widock Trial', sans-serif;
    font-size: clamp(1.4rem, 3.2vw, 2.1rem);
    color: var(--n-text);
    margin: 0 0 10px;
    line-height: 1.15;
    text-transform: uppercase;
}
.spot-detail-meta {
    display: flex; flex-wrap: wrap; gap: 14px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.78rem;
    color: var(--n-gold);
}
.spot-detail-meta-item { display: flex; align-items: center; gap: 6px; }
.spot-detail-section {
    background: var(--n-paper-2);
    border: 1px solid var(--n-line);
    border-radius: 8px;
    padding: 18px;
    margin-bottom: 14px;
}
.spot-detail-section-title {
    font-family: 'Widock Trial', sans-serif;
    font-size: 0.72rem;
    color: var(--n-maroon);
    margin: 0 0 10px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.spot-detail-text {
    font-family: 'Spectral', serif;
    font-style: italic; font-weight: 700;
    font-size: 1rem;
    line-height: 1.65;
    color: var(--n-text);
}
.spot-detail-text p { margin: 0 0 12px; }
.spot-detail-text p:last-child { margin-bottom: 0; }

.spot-contact-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 9px; }
.spot-contact-list li {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.82rem;
    color: var(--n-text);
    display: flex; align-items: flex-start; gap: 9px;
    line-height: 1.45;
}
.spot-contact-list li a { color: var(--n-green); text-decoration: none; word-break: break-word; }
.spot-contact-list li a:hover { color: var(--n-orange); text-decoration: underline; }
.spot-contact-icon {
    width: 26px; height: 26px;
    background: var(--n-paper);
    border: 1px solid var(--n-line);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; font-size: 0.78rem;
}

/* Галерея на детальной */
.spot-detail-page .spot-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 10px;
}
.spot-detail-page .spot-gallery-item {
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 1px solid var(--n-line);
}
.spot-detail-page .spot-gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.22s; }
.spot-detail-page .spot-gallery-item:hover img { transform: scale(1.03); }

.spot-links-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.spot-links-list a {
    display: flex; align-items: center; gap: 10px;
    padding: 11px 14px;
    background: var(--n-paper);
    border: 1px solid var(--n-line);
    border-radius: 6px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.8rem;
    color: var(--n-text);
    text-decoration: none;
    transition: all 0.18s;
}
.spot-links-list a:hover { border-color: var(--n-green); background: rgba(59,77,43,0.045); color: var(--n-green); }

/* ── 9. INLINE РЕДАКТОР (админ главной) ── */
.editable-field {
    outline: none;
    border-radius: 2px;
    transition: box-shadow 0.18s, background-color 0.18s;
}
.editable-field:hover { box-shadow: inset 0 0 0 1px rgba(241,143,72,0.22); background: rgba(251,248,238,0.05); }
.editable-field:focus { box-shadow: 0 0 0 2px rgba(241,143,72,0.45); background: rgba(251,248,238,0.08); }
.editable-field[contenteditable="true"]:empty::before {
    content: attr(data-placeholder);
    opacity: 0.45; pointer-events: none;
}

.floating-editor-toolbar {
    position: fixed;
    left: 50%;
    bottom: -80px;
    transform: translateX(-50%);
    z-index: 9998;
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(34,49,39,0.95);
    border: 1px solid rgba(246,243,224,0.16);
    border-radius: 12px;
    padding: 8px 12px;
    box-shadow: 0 16px 36px rgba(0,0,0,0.28);
    backdrop-filter: blur(8px);
    transition: bottom 0.32s cubic-bezier(0.16, 1, 0.3, 1);
    flex-wrap: wrap;
    justify-content: center;
    max-width: 96vw;
}
.floating-editor-toolbar.visible { bottom: 18px; }
.floating-editor-toolbar.dirty { box-shadow: 0 16px 36px rgba(0,0,0,0.28), 0 0 0 2px rgba(241,143,72,0.45); }

.editor-toolbar-group { display: flex; gap: 4px; }
.editor-toolbar-divider { width: 1px; height: 24px; background: rgba(255,255,255,0.18); margin: 0 4px; }

.editor-btn {
    min-width: 34px; height: 34px;
    padding: 0 8px;
    border: 1px solid rgba(246,243,224,0.16);
    background: rgba(251,248,238,0.07);
    color: #fff;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.78rem; font-weight: 700;
    cursor: pointer;
    border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
    transition: 0.15s;
}
.editor-btn:hover { background: var(--n-orange); border-color: var(--n-orange); }
.editor-save-btn {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.74rem; font-weight: 600;
    letter-spacing: 0.04em;
    padding: 0 14px;
    height: 34px;
    border: none;
    border-radius: 6px;
    background: var(--n-orange);
    color: #fff;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.18s;
}
.editor-save-btn:hover { background: var(--n-maroon); }
.editor-save-btn:disabled { opacity: 0.55; cursor: not-allowed; }

/* Промпт ссылки */
.n-link-prompt,
#editor-link-prompt {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: none;
    align-items: center; justify-content: center;
    background: rgba(34,49,39,0.55);
}
.n-link-prompt.open,
#editor-link-prompt.open { display: flex; }

.n-link-prompt-inner {
    background: var(--n-paper);
    border-radius: 8px;
    padding: 20px;
    min-width: 320px;
    max-width: 92vw;
    box-shadow: 0 12px 40px rgba(0,0,0,0.28);
}
.n-link-prompt-inner label,
#editor-link-prompt label {
    display: block;
    margin-bottom: 7px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.76rem; font-weight: 700;
    color: var(--n-green);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
#editor-link-input,
.n-link-prompt-inner input[type="url"] {
    width: 100%;
    min-height: 40px;
    border: 1px solid var(--n-line);
    background: #fff;
    color: var(--n-text);
    padding: 0 10px;
    border-radius: 6px;
    outline: none;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.88rem;
    margin-bottom: 12px;
    box-sizing: border-box;
}
#editor-link-input:focus,
.n-link-prompt-inner input[type="url"]:focus { border-color: var(--n-orange); }

.n-link-prompt-btns { display: flex; gap: 8px; justify-content: flex-end; }
.n-link-prompt-btns button,
#editor-link-apply {
    min-height: 36px;
    padding: 0 14px;
    border-radius: 6px;
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.74rem; font-weight: 600;
}
.n-link-prompt-btns button:first-child,
#editor-link-apply {
    background: var(--n-maroon);
    color: #fff;
    border: 1px solid var(--n-maroon);
}
.n-link-prompt-btns button:first-child:hover,
#editor-link-apply:hover { background: var(--n-brown); }
.n-link-prompt-btns button:last-child {
    background: var(--n-paper-2);
    color: var(--n-text);
    border: 1px solid var(--n-line);
}
.n-link-prompt-btns button:last-child:hover { background: var(--n-focus); }

/* Конец Part 2 — ПК версия */


/* ============================================================
   НАСЛЕДИЕ
   Part 3 / 3 — MOBILE ADAPTATION
   Подключать ПОСЛЕ Part 1 и Part 2
   ============================================================ */

/* ── 1080px ── */
@media (max-width: 1080px) {
  .n-hero-inner,
  .n-pilot-grid,
  .n-feature-grid { grid-template-columns: 1fr; }
  
  .n-cards-row,
  .n-grid-3,
  .n-cards-3,
  .n-roadmap { grid-template-columns: 1fr 1fr; }

  .n-hero-right { max-width: 420px; margin: 0 auto; }
  .n-features-row { grid-template-columns: 1fr; }
}

/* ── 900px — шапка в колонку ── */
@media (max-width: 900px) {
  .nasledie-header-inner {
    flex-direction: column;
    align-items: flex-start;
    padding: 12px 18px;
    gap: 10px;
  }
  .nasledie-nav { width: 100%; }
  .nasledie-nav ul { gap: 10px 14px; width: 100%; }

  .n-section-head { flex-direction: column; align-items: flex-start; text-align: left; }
  .n-section-note, .n-head-note { margin-left: 0; }

  .map-right-sidebar { width: 360px; }
  .sidebar-content-wrapper { border-radius: 10px; }
}

/* ============================================================
   768px — основной мобильный брейкпоинт
   ============================================================ */
@media (max-width: 768px) {

  /* --- Общие --- */
  .n-index .wrap,
  .n-container,
  .n-section .wrap { padding: 0 16px; }

  .n-section { padding: 48px 0; }

  .n-hero { min-height: auto; }
  .n-hero-inner { min-height: auto; padding: 52px 0 40px; gap: 22px; }
  .n-hero h1, .n-hero-title { font-size: 1.82rem; }
  .n-hero-lead { font-size: 0.94rem; line-height: 1.5; }
  .n-actions { flex-direction: column; align-items: stretch; }
  .n-btn { width: 100%; }

  .n-cards-row,
  .n-grid-3,
  .n-cards-3,
  .n-roadmap,
  .n-tasks-grid { grid-template-columns: 1fr; }

  .n-card, .n-step, .n-features-box, .n-hero-card,
  .n-passport-card { padding: 16px; }

  .n-pilot-photo { min-height: 260px; }

  .n-section-head h2,
  .n-section-title { font-size: 1.25rem; }

  .n-card h3,
  .n-card-title,
  .n-step h3 { font-size: 0.95rem; }

  .n-card p, .n-card-text,
  .n-step p,
  .n-list-item,
  .n-feature-box li,
  .n-features-list li { font-size: 0.88rem; }

  /* CTA */
  .n-cta { min-height: 68vh; }
  .n-cta-inner { padding: 36px 16px; }
  .n-cta-title { font-size: 1.55rem; }
  .n-cta-sub { font-size: 0.92rem; }
  .n-cta-btn { padding: 12px 20px; font-size: 0.68rem; }

  /* Access guard */
  .access-card { padding: 22px 16px; }
  .access-card h1 { font-size: 1.35rem; }

  /* Villages admin form */
  .n-villages-form-row { flex-direction: column; align-items: stretch; }
  .n-input-sm { width: 100%; }

  /* Spot detail */
  .spot-detail-wrap { padding: 18px 16px 40px; }
  .spot-detail-title { font-size: 1.35rem; }
  .spot-detail-section { padding: 14px; }
  .spot-detail-page .spot-gallery-grid { grid-template-columns: repeat(2, 1fr); }

  /* Inline editor toolbar */
  .floating-editor-toolbar {
    width: calc(100vw - 12px);
    left: 6px; right: 6px;
    transform: none;
    bottom: 8px;
    padding: 6px 8px;
    border-radius: 10px;
    gap: 4px;
    justify-content: flex-start;
  }
  .floating-editor-toolbar.visible { bottom: 8px; }
  .editor-toolbar-divider { display: none; }
  .editor-btn { min-width: 34px; height: 34px; font-size: 0.72rem; border-radius: 6px; }
  .editor-save-btn { font-size: 0.68rem; padding: 0 12px; height: 34px; }
  .n-link-prompt-inner { min-width: auto; width: calc(100vw - 24px); padding: 16px; }

  /* ============================================================
     КАРТА — MOBILE 2GIS-STYLE
     ============================================================ */

  /* Скрываем шапку/футер на странице карты */
  body.style-map .nasledie-header,
  body.style-map .main-header,
  body.style-map .nasledie-footer,
  body.style-map .main-footer,
  body.style-map .floating-editor-toolbar { display: none !important; }

  body.style-map .nasledie-main,
  body.style-map .main-content {
    padding: 0 !important; margin: 0 !important;
    max-width: none !important; width: 100% !important;
    height: 100vh !important; height: 100dvh !important;
    overflow: hidden !important;
  }
  body.style-map .nasledie-map-wrapper {
    position: fixed !important;
    inset: 0 !important;
    width: 100% !important; height: 100% !important; height: 100dvh !important;
    z-index: 1 !important;
  }
  body.style-map .nasledie-shell { min-height: auto !important; }

  /* Левая панель → bottom sheet */
  .map-left-panel {
    position: fixed !important;
    top: auto !important; bottom: 0 !important;
    left: 0 !important; right: 0 !important;
    width: 100% !important;
    max-height: 58vh;
    z-index: 900;
    background: var(--n-paper);
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -8px 32px rgba(0,0,0,0.18);
    padding: 12px 12px calc(12px + env(safe-area-inset-bottom,0px));
    transform: translateY(calc(100% - 52px));
    transition: transform 0.35s cubic-bezier(.22,.61,.36,1);
    overflow-y: auto;
    gap: 8px;
  }
  .map-left-panel.mobile-open { transform: translateY(0); }

  /* Ручка для смахивания */
  .map-left-panel::before {
    content: '';
    display: block;
    width: 36px; height: 4px;
    background: var(--n-line);
    border-radius: 2px;
    margin: 2px auto 8px;
    flex-shrink: 0;
  }
  .map-panel-card { box-shadow: none; }
  .map-panel-card-header { padding: 10px 12px; }
  .map-panel-card-body { padding: 10px 12px; }

  /* Кнопка открытия левого меню */
  .map-mobile-toggle {
    display: flex !important;
    align-items: center; justify-content: center;
    position: fixed;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 950;
    width: 52px; height: 52px;
    border-radius: 50%;
    border: none;
    background: var(--n-green);
    color: #fff;
    font-size: 22px;
    font-family: 'Widock Trial', sans-serif;
    cursor: pointer;
    box-shadow: 0 6px 22px rgba(0,0,0,0.22);
    transition: background 0.2s, transform 0.2s;
  }
  .map-mobile-toggle:hover { transform: translateX(-50%) scale(1.04); }
  .map-mobile-toggle.open { background: var(--n-maroon); }

  /* Правая колонка → bottom sheet 88vh */
  .map-right-sidebar {
    position: fixed !important;
    top: auto !important; bottom: 0 !important;
    left: 0 !important; right: 0 !important;
    width: 100% !important;
    height: 88vh; height: 88dvh;
    padding: 0;
    z-index: 920;
    pointer-events: none;
    transform: none !important;
  }

  /* Поиск — плавающая пилюля сверху */
  .map-search-floating {
    position: fixed;
    top: calc(10px + env(safe-area-inset-top,0px));
    left: 10px; right: 10px;
    width: auto;
    margin: 0;
    border-radius: 12px;
    z-index: 450;
    pointer-events: auto;
  }
  .map-search-input { height: 46px; font-size: 0.82rem; }
  .map-search-results { max-height: 42vh; }

  /* Панель деталей */
  .sidebar-content-wrapper {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    width: 100%;
    max-height: 88vh;
    border-radius: 16px 16px 0 0;
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(.22,.61,.36,1);
    box-shadow: 0 -8px 32px rgba(0,0,0,0.18);
    pointer-events: auto;
  }
  .sidebar-content-wrapper.active { transform: translateY(0); }

  /* Ручка закрытия сайдбара */
  .map-mobile-close-rs {
    display: block !important;
    width: 36px; height: 4px;
    background: var(--n-line);
    border-radius: 2px;
    margin: 10px auto 4px;
    cursor: grab;
    flex-shrink: 0;
  }

  .sidebar-header { padding: 12px 14px; }
  .sidebar-header h2 { font-size: 0.98rem; }
  .sidebar-section { padding: 12px 14px; }
  .legend-text { font-size: 0.86rem; }

  .before-after-wrap { height: auto; aspect-ratio: 4/3; }

  /* Баллуны Яндекса — отключаем на мобиле, только сайдбар */
  .ymaps-2-1-79-balloon,
  .ymaps-2-1-79-balloon__layout,
  .ymaps-2-1-79-balloon__content,
  .ymaps-2-1-79-balloon__close,
  .ymaps-2-1-79-balloon__tail { display: none !important; }

  /* Копирайт Яндекса — поднимаем над нижней панелью */
  .ymaps-2-1-79-copyright {
    bottom: 68px !important;
    right: 8px !important; left: auto !important;
    font-size: 9px !important;
  }
  .ymaps-2-1-79-logo-container {
    bottom: 68px !important;
    left: 8px !important; right: auto !important;
  }

  /* Админ-модалка — bottom sheet */
  .map-modal-overlay { align-items: flex-end; padding: 0; }
  .map-modal {
    width: 100%;
    max-width: 100%;
    max-height: 92vh;
    border-radius: 14px 14px 0 0;
    margin-bottom: 0;
  }
  .map-modal-body { padding: 14px; }
  .map-modal-header { padding: 12px 14px; }
  .map-modal-footer { padding: 12px 14px; }

  .mf-row--2 { flex-direction: column; gap: 0; }
  .mf-row--files > .mf-group { min-width: 100%; }
  .mf-gallery-grid { grid-template-columns: repeat(3, 1fr); }
  .mf-schedule-row { flex-wrap: wrap; }
  .mf-ticket-system { padding: 10px; }
}

/* ── 640px ── */
@media (max-width: 640px) {
  .nasledie-header-inner,
  .nasledie-footer-inner { padding-left: 14px; padding-right: 14px; }

  .nasledie-brand img { width: 40px !important; height: 40px !important; }
  .nasledie-brand-main { font-size: 0.78rem !important; }
  .nasledie-brand-sub { font-size: 0.56rem !important; }
  .nasledie-nav a { font-size: 0.7rem; }

  .n-hero h1, .n-hero-title { font-size: 1.55rem; }
  .n-hero-lead { font-size: 0.88rem; }

  .n-section-head h2, .n-section-title { font-size: 1.15rem; }
  .n-card h3, .n-card-title, .n-step h3 { font-size: 0.88rem; }

  .spot-detail-title { font-size: 1.25rem; }
  .spot-detail-page .spot-gallery-grid { grid-template-columns: repeat(2, 1fr); }

  /* Карта — компактнее */
  .map-left-panel { max-height: 52vh; }
  .map-action-btn { padding: 10px 12px; font-size: 0.74rem; }
  .filter-toggle { padding: 8px 10px; font-size: 0.72rem; }
}

/* ── 420px ── */
@media (max-width: 420px) {
  .n-index .wrap,
  .n-container { padding: 0 12px; }

  .n-hero-inner { padding: 40px 0 32px; }
  .n-hero h1, .n-hero-title { font-size: 1.38rem; }
  .n-hero-lead { font-size: 0.84rem; }

  .nasledie-nav ul { gap: 6px 8px; }
  .nasledie-nav .nav-cta { width: 100%; justify-content: center; }

  .n-section { padding: 36px 0; }
  .n-section-head h2, .n-section-title { font-size: 1.05rem; }
  .n-card p, .n-card-text,
  .n-step p,
  .n-list-item,
  .n-features-list li { font-size: 0.82rem; }

  .n-cta-title { font-size: 1.35rem; }
  .n-cta-btn { padding: 10px 16px; font-size: 0.64rem; }

  .spot-detail-wrap { padding: 14px 12px 32px; }
  .spot-detail-title { font-size: 1.15rem; }

  /* Карта */
  .map-left-panel { max-height: 48vh; }
  .map-right-sidebar { height: 92vh; height: 92dvh; }
  .sidebar-content-wrapper { max-height: 92vh; }
  .sidebar-header h2 { font-size: 0.88rem; }
  .legend-text { font-size: 0.82rem; }
  .map-search-input { height: 42px; font-size: 0.78rem; }
  .hover-card { width: 210px; padding: 12px; }

  /* Редактор */
  .editor-btn { min-width: 30px; height: 30px; font-size: 0.66rem; }
  .editor-save-btn { font-size: 0.64rem; padding: 0 10px; }

  /* Модалка */
  .map-modal-body { padding: 12px; }
  .mf-gallery-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── Safe-area fix для iOS ── */
@supports (padding: max(0px)) {
  @media (max-width: 768px) {
    body.style-map {
      padding-top: env(safe-area-inset-top);
      padding-bottom: env(safe-area-inset-bottom);
    }
  }
}

/* Конец Part 3 */

/* ============================================================
   НАСЛЕДИЕ — НОВОВВЕДЕНИЯ КАРТЫ
   Бренд-блок, музейный логотип, превью файлов, галерея с сортировкой
   ============================================================ */

/* ── 1. БРЕНД-БЛОК (логотип проекта + Домой) ── */

.map-brand-block {
  padding: 14px 14px 10px;
  background: var(--n-paper);
  border: 1px solid var(--n-line);
  border-radius: var(--map-radius);
  box-shadow: 0 4px 15px rgba(0,0,0,0.12);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.map-brand-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  flex: 1;
  min-width: 0;
}

.map-brand-logo {
  width: 42px;
  height: 42px;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
}

.map-brand-title {
  font-family: 'Widock Trial', sans-serif;
  font-size: 0.85rem;
  color: var(--n-green);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  line-height: 1.1;
  white-space: nowrap;
}

.map-home-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  background: var(--n-paper-2);
  border: 1px solid var(--n-line);
  border-radius: 6px;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.66rem;
  font-weight: 600;
  color: var(--n-text);
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
}

.map-home-btn:hover {
  background: var(--n-focus);
  border-color: var(--n-gold);
  color: var(--n-green);
}

.map-home-icon {
  font-size: 0.85rem;
  line-height: 1;
}

/* ── 2. ЛОГОТИП МУЗЕЯ (ВНИЗУ ЛЕВОЙ ПАНЕЛИ) ── */

.map-museum-brand {
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid var(--n-line);
}

.map-museum-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--n-paper-2);
  border: 1px solid var(--n-line);
  border-radius: var(--map-radius);
  text-decoration: none;
  transition: background 0.2s;
}

.map-museum-link:hover {
  background: var(--n-focus);
}

.map-museum-logo {
  width: 34px;
  height: 34px;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
}

.map-museum-label {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.62rem;
  font-weight: 600;
  color: var(--n-gold);
  line-height: 1.3;
  min-width: 0;
}

/* ── 3. ПРЕВЬЮ ЗАГРУЖАЕМЫХ ФАЙЛОВ ── */

.mf-file-preview {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  min-height: 10px;
}

.mf-file-preview img {
  max-width: 80px;
  max-height: 50px;
  border-radius: 4px;
  object-fit: cover;
  border: 1px solid var(--n-line);
  box-shadow: 0 1px 4px rgba(34,49,39,0.08);
}

/* ── 4. ГАЛЕРЕЯ — СОРТИРУЕМЫЕ ЭЛЕМЕНТЫ ── */

.mf-gallery-grid--sortable {
  position: relative;
  min-height: 40px;
}

.mf-gallery-grid--sortable .mf-gallery-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: 4px;
  overflow: hidden;
  border: 2px solid transparent;
  transition: border-color 0.15s, transform 0.15s;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}

.mf-gallery-grid--sortable .mf-gallery-item:active {
  cursor: grabbing;
}

.mf-gallery-grid--sortable .mf-gallery-item:hover {
  border-color: var(--n-gold);
  transform: scale(1.03);
  z-index: 2;
}

.mf-gallery-grid--sortable .mf-gallery-item.dragging {
  opacity: 0.5;
  border-color: var(--n-orange);
  transform: scale(0.95);
}

.mf-gallery-grid--sortable .mf-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

.mf-gallery-grid--sortable .mf-gallery-item .mf-gallery-del {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: none;
  background: rgba(192, 57, 43, 0.85);
  color: #fff;
  font-size: 12px;
  line-height: 22px;
  text-align: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s;
  z-index: 3;
}

.mf-gallery-grid--sortable .mf-gallery-item:hover .mf-gallery-del {
  opacity: 1;
}

.mf-gallery-grid--sortable .mf-gallery-item .mf-gallery-del:hover {
  background: var(--n-maroon);
  transform: scale(1.1);
}

/* ── 5. ДОП. СТИЛИ ДЛЯ MOBILE (брейкпоинт 768px) ── */

@media (max-width: 768px) {

  .map-brand-block {
    padding: 10px 10px 8px;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .map-brand-link {
    justify-content: center;
  }

  .map-brand-logo {
    width: 36px;
    height: 36px;
  }

  .map-brand-title {
    font-size: 0.78rem;
  }

  .map-home-btn {
    justify-content: center;
    padding: 8px 12px;
    font-size: 0.68rem;
  }

  .map-museum-link {
    padding: 8px 10px;
  }

  .map-museum-logo {
    width: 28px;
    height: 28px;
  }

  .map-museum-label {
    font-size: 0.58rem;
  }

  .mf-file-preview img {
    max-width: 60px;
    max-height: 40px;
  }

  .mf-gallery-grid--sortable .mf-gallery-item .mf-gallery-del {
    opacity: 1;
    width: 26px;
    height: 26px;
    font-size: 14px;
    line-height: 26px;
  }

}

/* ── 6. МИНИ-ПОДСКАЗКИ ДЛЯ МОДАЛКИ ── */

.mf-icon-preview {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.mf-icon-preview img {
  max-width: 64px;
  max-height: 64px;
  border-radius: 4px;
  object-fit: contain;
  border: 1px solid var(--n-line);
  background: var(--n-paper-2);
  padding: 4px;
}

/* ── 7. ПОРЯДОК ФОТО (ИНДИКАТОР) ── */

.mf-gallery-item[data-order]::after {
  content: attr(data-order);
  position: absolute;
  bottom: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--n-green);
  color: #fff;
  font-family: 'Montserrat', sans-serif;
  font-size: 10px;
  font-weight: 700;
  line-height: 20px;
  text-align: center;
  z-index: 3;
  opacity: 0.85;
}

/* ── 8. АНИМАЦИЯ СМЕНЫ КАТЕГОРИИ ── */

.mf-category-block {
  animation: mfFadeSlide 0.22s ease;
}

@keyframes mfFadeSlide {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================================
   НАСЛЕДИЕ — МОБИЛЬНАЯ КАРТА
   Mobile-first, Bottom Sheet, Поиск с фильтрами
   Использует переменные из nasledie.css
   ============================================================ */

/* ── 1. БАЗА ── */

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

body.nasledie-body.nasledie-mobile {
  margin: 0;
  padding: 0;
  overflow: hidden;
  height: 100vh;
  height: 100dvh;
  width: 100vw;
  font-family: 'Montserrat', sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* ── 2. КАРТА ── */

.nm-map-container {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

#nmMap {
  width: 100%;
  height: 100%;
}

/* ── 3. ПОИСКОВАЯ ПАНЕЛЬ ── */

.nm-search-panel {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  pointer-events: none;
}

.nm-search-bar {
  display: flex;
  align-items: center;
  margin: 12px 16px 0;
  background: var(--n-paper);
  border: 1px solid var(--n-line);
  border-radius: 14px;
  box-shadow: 0 4px 20px rgba(34,49,39,0.12);
  pointer-events: auto;
  overflow: hidden;
  height: 50px;
  position: relative;
  transition: border-color 0.2s;
}

.nm-search-panel--open .nm-search-bar {
  border-color: var(--n-green);
  border-radius: 14px 14px 0 0;
}

.nm-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%239F7251'%3E%3Cpath d='M15.5 14h-.79l-.28-.27A6.471 6.471 0 0 0 16 9.5 6.5 6.5 0 1 0 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  z-index: 1;
}

.nm-search-input {
  flex: 1;
  height: 100%;
  border: none;
  background: transparent;
  padding: 0 14px 0 44px;
  font-family: 'Montserrat', sans-serif;
  font-size: 16px;
  font-weight: 500;
  color: var(--n-text);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.nm-search-input::placeholder {
  color: var(--n-gold);
  opacity: 0.85;
}

.nm-search-close {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin-right: 6px;
  border: none;
  border-radius: 50%;
  background: rgba(34,49,39,0.06);
  color: var(--n-text);
  font-size: 14px;
  cursor: pointer;
  flex-shrink: 0;
  pointer-events: auto;
  transition: background 0.15s;
}

.nm-search-close:active {
  background: rgba(34,49,39,0.12);
}

/* Разворачиваемая часть */
.nm-search-body {
  display: none;
  flex-direction: column;
  margin: 0 16px;
  background: var(--n-paper);
  border: 1px solid var(--n-line);
  border-top: none;
  border-radius: 0 0 14px 14px;
  box-shadow: 0 8px 28px rgba(34,49,39,0.14);
  pointer-events: auto;
  max-height: 65vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.nm-search-panel--open .nm-search-body {
  display: flex;
}

/* ── 4. ФИЛЬТРЫ ВНУТРИ ПОИСКА ── */

.nm-search-filters {
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--n-line);
}

.nm-filter-label {
  font-family: 'Montserrat', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--n-maroon);
  margin-bottom: 8px;
}

.nm-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.nm-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 12px;
  background: var(--n-paper-2);
  border: 1px solid var(--n-line);
  border-radius: 20px;
  font-family: 'Montserrat', sans-serif;
  font-size: 11px;
  font-weight: 600;
  color: var(--n-text);
  cursor: pointer;
  transition: all 0.2s;
  user-select: none;
  white-space: nowrap;
}

.nm-filter-chip:active {
  transform: scale(0.96);
}

.nm-filter-chip.active {
  background: var(--n-green);
  border-color: var(--n-green);
  color: #fff;
}

.nm-filter-chip--era {
  padding: 6px 12px;
}

.nm-filter-chip--era .nm-era-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ── 5. РЕЗУЛЬТАТЫ ПОИСКА И СЁЛА ── */

.nm-search-results {
  padding: 0;
}

.nm-search-section-label {
  padding: 10px 16px 6px;
  font-family: 'Montserrat', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--n-maroon);
  border-bottom: 1px solid var(--n-line);
}

.nm-search-loading,
.nm-search-empty {
  padding: 20px 16px;
  text-align: center;
  font-family: 'Spectral', serif;
  font-style: italic;
  font-weight: 700;
  font-size: 14px;
  color: var(--n-gold);
}

/* Сёла */
.nm-villages-list {
  padding: 4px 0;
}

.nm-village-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  cursor: pointer;
  transition: background 0.15s;
  border-bottom: 1px solid rgba(34,49,39,0.04);
}

.nm-village-item:active {
  background: rgba(243,210,175,0.3);
}

.nm-village-item:last-child {
  border-bottom: none;
}

.nm-village-icon {
  font-size: 22px;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--n-paper-2);
  border-radius: 8px;
  border: 1px solid var(--n-line);
}

.nm-village-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.nm-village-name {
  font-family: 'Montserrat', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--n-text);
}

.nm-village-count {
  font-family: 'Spectral', serif;
  font-style: italic;
  font-weight: 700;
  font-size: 12px;
  color: var(--n-gold);
}

/* Разделитель */
.nm-search-divider {
  height: 1px;
  background: var(--n-line);
  margin: 0 16px;
}

/* Гео-результаты */
.nm-geo-results {
  padding: 4px 0;
}

.nm-geo-result {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  cursor: pointer;
  transition: background 0.15s;
  border-bottom: 1px solid rgba(34,49,39,0.04);
}

.nm-geo-result:active {
  background: rgba(243,210,175,0.3);
}

.nm-geo-result:last-child {
  border-bottom: none;
}

.nm-geo-icon {
  font-size: 20px;
  flex-shrink: 0;
}

.nm-geo-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.nm-geo-info strong {
  font-family: 'Montserrat', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--n-text);
}

.nm-geo-result--heritage strong {
  color: var(--n-green);
}

.nm-geo-info span {
  font-family: 'Spectral', serif;
  font-style: italic;
  font-weight: 700;
  font-size: 11px;
  color: var(--n-gold);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 70vw;
}

/* ── 6. FAB ── */

.nm-fab {
  position: fixed;
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  right: 20px;
  z-index: 100;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid var(--n-line);
  background: var(--n-paper);
  box-shadow: 0 4px 16px rgba(34,49,39,0.16);
  color: var(--n-green);
  font-size: 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s, box-shadow 0.2s;
}

.nm-fab:active {
  transform: scale(0.92);
  box-shadow: 0 2px 8px rgba(34,49,39,0.1);
}

.nm-fab-icon {
  line-height: 1;
}

/* ── 7. BOTTOM SHEET ── */

.nm-sheet-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(34,49,39,0.35);
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

.nm-sheet-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.nm-bottom-sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 400;
  background: var(--n-paper);
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -8px 32px rgba(34,49,39,0.18);
  display: flex;
  flex-direction: column;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
  overflow: hidden;
  touch-action: pan-y;
}

/* Скрыто по умолчанию */
.nm-bottom-sheet.nm-sheet--hidden {
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Peek — 42% экрана */
.nm-bottom-sheet.nm-sheet--peek {
  transform: translateY(0);
  height: 42vh;
  min-height: 42vh;
}

/* Full — 92% */
.nm-bottom-sheet.nm-sheet--full {
  transform: translateY(0);
  height: 92vh;
  height: 92dvh;
}

/* ── 8. ВЕРХНЯЯ ПОЛОСА ШТОРКИ ── */

.nm-sheet-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 12px 0;
  flex-shrink: 0;
}

.nm-sheet-handle-wrap {
  flex: 1;
  display: flex;
  justify-content: center;
  padding: 4px 0;
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.nm-sheet-handle-wrap:active {
  cursor: grabbing;
}

.nm-sheet-handle {
  width: 40px;
  height: 5px;
  border-radius: 3px;
  background: var(--n-line);
}

.nm-sheet-close-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: var(--n-paper-2);
  color: var(--n-text);
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s;
}

.nm-sheet-close-btn:active {
  background: rgba(34,49,39,0.1);
}

/* ── 9. КОНТЕНТ ШТОРКИ ── */

.nm-sheet-scroll {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0 20px 0;
  scrollbar-width: thin;
  scrollbar-color: var(--n-line) transparent;
}

.nm-sheet-scroll::-webkit-scrollbar {
  width: 4px;
}

.nm-sheet-scroll::-webkit-scrollbar-thumb {
  background: var(--n-line);
  border-radius: 4px;
}

.nm-sheet-header {
  padding: 8px 0 16px;
  border-bottom: 1px solid var(--n-line);
  margin-bottom: 4px;
}

.nm-sheet-title {
  margin: 0 0 6px;
  font-family: 'Widock Trial', sans-serif;
  font-size: 20px;
  line-height: 1.2;
  color: var(--n-green);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.nm-sheet-short {
  font-family: 'Spectral', serif;
  font-style: italic;
  font-weight: 700;
  font-size: 14px;
  color: var(--n-gold);
  line-height: 1.4;
}

/* Секции */
.nm-sheet-section {
  padding: 14px 0;
  border-bottom: 1px solid var(--n-line);
}

.nm-sheet-section:last-child,
.nm-sheet-section--actions {
  border-bottom: none;
}

.nm-section-label {
  font-family: 'Montserrat', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--n-maroon);
  margin-bottom: 10px;
}

/* Легенда */
.nm-legend-text {
  font-family: 'Spectral', serif;
  font-style: italic;
  font-weight: 700;
  font-size: 16px;
  line-height: 1.65;
  color: var(--n-text);
}

/* Контакты */
.nm-contacts-text {
  font-family: 'Montserrat', sans-serif;
  font-size: 14px;
  line-height: 1.6;
  color: var(--n-text);
}

.nm-phone-link {
  color: var(--n-green);
  text-decoration: none;
  font-weight: 600;
}

.nm-phone-link:active {
  color: var(--n-accent, var(--n-orange, #F18F48));
  text-decoration: underline;
}

/* ── 10. СЛАЙДЕР ДО/ПОСЛЕ ── */

.nm-ba-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 4/3;
  overflow: hidden;
  border-radius: 10px;
  border: 1px solid var(--n-line);
  background: var(--n-road, #A9AD94);
  cursor: ew-resize;
  user-select: none;
  touch-action: none;
}

.nm-ba-wrap img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.nm-ba-after {
  z-index: 1;
}

.nm-ba-before {
  z-index: 2;
  clip-path: inset(0 50% 0 0);
}

.nm-ba-line {
  position: absolute;
  top: 0;
  left: 50%;
  width: 4px;
  height: 100%;
  background: var(--n-orange, #F18F48);
  box-shadow: 0 0 8px rgba(241,143,72,0.4);
  z-index: 3;
  pointer-events: none;
}

.nm-ba-handle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--n-orange, #F18F48);
  border: 3px solid #fff;
  box-shadow: 0 2px 12px rgba(0,0,0,0.25);
  z-index: 4;
  pointer-events: none;
}

.nm-ba-handle::after {
  content: '↔';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 18px;
  color: #fff;
  font-weight: 700;
}

.nm-ba-tag {
  position: absolute;
  bottom: 10px;
  padding: 4px 10px;
  border-radius: 4px;
  font-family: 'Montserrat', sans-serif;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  z-index: 5;
  pointer-events: none;
}

.nm-ba-tag--before {
  left: 10px;
  background: var(--n-text);
  color: #fff;
}

.nm-ba-tag--after {
  right: 10px;
  background: var(--n-orange, #F18F48);
  color: #fff;
}

/* ── 11. ГАЛЕРЕЯ ── */

.nm-gallery-scroll-x {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 2px 0;
  touch-action: pan-x;
}

.nm-gallery-scroll-x::-webkit-scrollbar {
  display: none;
}

.nm-gallery-item {
  flex-shrink: 0;
  width: 120px;
  height: 120px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--n-line);
  background: var(--n-paper-2);
}

.nm-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ── 12. АУДИОГИД ── */

.nm-audio-btn {
  width: 100%;
  min-height: 48px;
  background: var(--n-green);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-family: 'Montserrat', sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.nm-audio-btn:active {
  background: var(--n-orange, #F18F48);
}

/* ── 13. СОВЕТЫ ── */

.nm-power-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nm-power-list li {
  padding: 10px 0 10px 24px;
  position: relative;
  font-family: 'Spectral', serif;
  font-style: italic;
  font-weight: 700;
  font-size: 15px;
  color: var(--n-text);
  line-height: 1.45;
  border-bottom: 1px dashed var(--n-line);
}

.nm-power-list li:last-child {
  border-bottom: none;
}

.nm-power-list li::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 17px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--n-green);
}

/* ── 14. КНОПКИ ДЕЙСТВИЙ ── */

.nm-detail-btn,
.nm-share-btn {
  width: 100%;
  min-height: 48px;
  border-radius: 10px;
  font-family: 'Montserrat', sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nm-detail-btn {
  background: var(--n-green);
  color: #fff;
  border: none;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.nm-detail-btn:active {
  background: var(--n-orange, #F18F48);
  transform: scale(0.98);
}

.nm-share-btn {
  background: var(--n-paper-2);
  color: var(--n-text);
  border: 1px solid var(--n-line);
}

.nm-share-btn:active {
  background: var(--n-focus, #F3D2AF);
  border-color: var(--n-gold);
}

/* Safe-area */
.nm-sheet-safe-bottom {
  height: calc(8px + env(safe-area-inset-bottom, 0px));
  flex-shrink: 0;
}

/* ── 15. ЯНДЕКС КАРТЫ ── */

.ymaps-2-1-79-copyright {
  bottom: 120px !important;
  right: 8px !important;
  left: auto !important;
  font-size: 9px !important;
  z-index: 50 !important;
}

.ymaps-2-1-79-logo-container {
  bottom: 120px !important;
  left: 8px !important;
  right: auto !important;
  z-index: 50 !important;
}

.ymaps-2-1-79-zoom {
  transform: scale(1.2);
  transform-origin: bottom right;
}

/* Скрываем баллуны — только шторка */
.ymaps-2-1-79-balloon,
.ymaps-2-1-79-balloon__layout,
.ymaps-2-1-79-balloon__content,
.ymaps-2-1-79-balloon__close,
.ymaps-2-1-79-balloon__tail {
  display: none !important;
}

/* ── 16. АДАПТАЦИЯ ── */

@media (max-width: 420px) {
  .nm-search-bar {
    height: 46px;
    margin: 10px 12px 0;
    border-radius: 12px;
  }

  .nm-search-input {
    font-size: 14px;
    padding: 0 12px 0 40px;
  }

  .nm-search-icon {
    width: 16px;
    height: 16px;
    left: 12px;
  }

  .nm-search-body {
    margin: 0 12px;
  }

  .nm-filter-chip {
    font-size: 10px;
    padding: 6px 10px;
  }

  .nm-bottom-sheet.nm-sheet--peek {
    height: 38vh;
    min-height: 38vh;
  }

  .nm-sheet-title {
    font-size: 18px;
  }

  .nm-legend-text {
    font-size: 14px;
  }

  .nm-gallery-item {
    width: 100px;
    height: 100px;
  }

  .nm-fab {
    width: 46px;
    height: 46px;
    font-size: 18px;
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    right: 14px;
  }
}

/* ── 17. PREFERS REDUCED MOTION ── */

@media (prefers-reduced-motion: reduce) {
  .nm-bottom-sheet,
  .nm-sheet-overlay {
    transition: none !important;
  }
}


/* ── КАСТОМНЫЕ КЛАСТЕРЫ ── */

.ymaps-2-1-79-cluster-icon {
  filter: drop-shadow(0 2px 8px rgba(34,49,39,0.2));
}

/* Если используется pieChart — подкрашиваем */
.ymaps-2-1-79-cluster-icon svg path:first-child {
  fill: var(--n-green) !important;
}

.ymaps-2-1-79-cluster-icon svg path:last-child {
  stroke: var(--n-gold) !important;
  stroke-width: 2 !important;
}

/* Число на кластере */
.ymaps-2-1-79-cluster-icon text {
  font-family: 'Widock Trial', 'Unbounded', sans-serif !important;
  font-size: 13px !important;
  fill: var(--n-paper) !important;
  font-weight: 700 !important;
}

/* ============================================================
   НАСЛЕДИЕ — АДМИН-ПАНЕЛЬ КАРТЫ
   Стиль: единый брендбук проекта
   ============================================================ */

/* ── 1. ОБЩАЯ СТРУКТУРА ── */

.admin-nasledie {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px 40px;
  font-family: 'Montserrat', sans-serif;
  color: var(--n-text);
}

.admin-header {
  padding: 24px 0 16px;
  border-bottom: 1px solid var(--n-line);
  margin-bottom: 20px;
}

.admin-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.admin-title {
  font-family: 'Widock Trial', 'Unbounded', sans-serif;
  font-size: 1.2rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--n-green);
  margin: 0;
  line-height: 1.2;
}

.admin-header-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* ── 2. КНОПКИ ── */

.admin-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 18px;
  border-radius: 6px;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  border: 1px solid var(--n-line);
  background: var(--n-paper-2);
  color: var(--n-text);
  white-space: nowrap;
}

.admin-btn:hover {
  background: var(--n-focus);
  border-color: var(--n-gold);
}

.admin-btn:active {
  transform: scale(0.97);
}

.admin-btn--primary {
  background: var(--n-green);
  color: #fff;
  border-color: var(--n-green);
}

.admin-btn--primary:hover {
  background: #4a5e36;
  border-color: #4a5e36;
}

.admin-btn--outline {
  background: transparent;
  border-color: var(--n-green);
  color: var(--n-green);
}

.admin-btn--outline:hover {
  background: var(--n-green);
  color: #fff;
}

.admin-btn--small {
  min-height: 34px;
  padding: 0 14px;
  font-size: 0.72rem;
}

.admin-btn--cancel {
  background: transparent;
  color: var(--n-maroon);
  border-color: var(--n-line);
}

.admin-btn--cancel:hover {
  background: rgba(120,30,7,0.06);
  border-color: var(--n-maroon);
}

.admin-btn--ghost {
  background: transparent;
  border: 1px dashed var(--n-line);
  color: var(--n-gold);
}

.admin-btn--ghost:hover {
  border-color: var(--n-gold);
  background: rgba(159,114,81,0.06);
}

.admin-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* ── 3. ТАБЫ ── */

.admin-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--n-line);
  padding-bottom: 0;
}

.admin-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--n-text);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
  opacity: 0.6;
  white-space: nowrap;
}

.admin-tab:hover {
  opacity: 0.85;
  background: var(--n-paper-2);
}

.admin-tab.active {
  opacity: 1;
  border-bottom-color: var(--n-green);
  color: var(--n-green);
}

.admin-tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 11px;
  background: var(--n-line);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--n-text);
}

.admin-tab.active .admin-tab-badge {
  background: var(--n-green);
  color: #fff;
}

.admin-tab-content {
  display: none;
}

.admin-tab-content.active {
  display: block;
}

/* ── 4. ФИЛЬТРЫ ── */

.admin-filters {
  margin-bottom: 16px;
}

.admin-filters-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.admin-input {
  height: 40px;
  padding: 0 14px;
  border: 1px solid var(--n-line);
  border-radius: 6px;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.82rem;
  color: var(--n-text);
  background: #fff;
  outline: none;
  transition: border-color 0.2s;
  box-sizing: border-box;
}

.admin-input:focus {
  border-color: var(--n-green);
  box-shadow: 0 0 0 2px rgba(59,77,43,0.1);
}

.admin-input--search {
  flex: 1;
  min-width: 200px;
  padding-left: 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%239F7251'%3E%3Cpath d='M15.5 14h-.79l-.28-.27A6.471 6.471 0 0 0 16 9.5 6.5 6.5 0 1 0 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 12px center;
  background-size: 16px;
}

.admin-input--select {
  min-width: 160px;
  appearance: auto;
  -webkit-appearance: auto;
  cursor: pointer;
}

.admin-input--half {
  width: calc(50% - 6px);
  flex: 1;
}

.admin-input[readonly] {
  background: var(--n-paper-2);
  cursor: default;
}

.admin-textarea {
  height: auto;
  min-height: 100px;
  padding: 12px 14px;
  resize: vertical;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.82rem;
}

/* ── 5. ТАБЛИЦЫ ── */

.admin-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--n-line);
  border-radius: 8px;
  background: #fff;
  -webkit-overflow-scrolling: touch;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.admin-table th {
  padding: 12px 14px;
  text-align: left;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--n-maroon);
  background: var(--n-paper-2);
  border-bottom: 1px solid var(--n-line);
  white-space: nowrap;
}

.admin-table th.sortable {
  cursor: pointer;
  user-select: none;
}

.admin-table th.sortable:hover {
  color: var(--n-green);
}

.admin-table td {
  padding: 10px 14px;
  border-bottom: 1px solid rgba(34,49,39,0.06);
  vertical-align: middle;
  color: var(--n-text);
}

.admin-table tr:last-child td {
  border-bottom: none;
}

.admin-table tr:hover td {
  background: rgba(243,210,175,0.12);
}

.admin-table-empty {
  text-align: center;
  padding: 40px 20px !important;
  font-family: 'Spectral', serif;
  font-style: italic;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--n-gold);
}

.admin-table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  font-size: 0.78rem;
  color: var(--n-gold);
  flex-wrap: wrap;
  gap: 10px;
}

/* Колонки таблицы точек */
.col-id { width: 50px; text-align: center; font-family: monospace; color: var(--n-gold); font-size: 0.75rem; }
.col-icon { width: 50px; text-align: center; }
.col-actions { width: 90px; text-align: center; white-space: nowrap; }
.col-coords { width: 130px; font-family: monospace; font-size: 0.75rem; color: var(--n-gold); }
.col-coords code { font-size: 0.75rem; }
.col-village { min-width: 100px; }

.admin-spot-icon {
  width: 28px;
  height: 28px;
  object-fit: contain;
  display: inline-block;
  vertical-align: middle;
}

/* ── 6. ТЕГИ И СТАТУСЫ ── */

.admin-tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 4px;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.68rem;
  font-weight: 600;
  white-space: nowrap;
}

.admin-tag--landmark { background: rgba(59,77,43,0.1); color: var(--n-green); }
.admin-tag--photo    { background: rgba(159,114,81,0.1); color: var(--n-gold); }
.admin-tag--org      { background: rgba(166,94,51,0.1); color: var(--n-brown); }
.admin-tag--event    { background: rgba(241,143,72,0.1); color: var(--n-orange); }
.admin-tag--nature   { background: rgba(125,165,165,0.1); color: var(--n-water); }

.admin-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.78rem;
  font-weight: 600;
}

.admin-status--pub { color: var(--n-green); }
.admin-status--draft { color: var(--n-gold); }

/* ── 7. КНОПКИ ДЕЙСТВИЙ В ТАБЛИЦЕ ── */

.admin-action-btn {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: 1px solid var(--n-line);
  background: var(--n-paper-2);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  font-size: 0.9rem;
}

.admin-action-btn:hover {
  background: var(--n-focus);
  border-color: var(--n-gold);
  transform: scale(1.05);
}

.admin-action-btn--edit:hover {
  border-color: var(--n-green);
  background: rgba(59,77,43,0.08);
}

.admin-action-btn--delete:hover {
  border-color: var(--n-maroon);
  background: rgba(120,30,7,0.08);
}

/* ── 8. УПРАВЛЕНИЕ СЁЛАМИ ── */

.admin-villages-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.admin-hint {
  font-family: 'Spectral', serif;
  font-style: italic;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--n-gold);
  line-height: 1.5;
  margin: 0;
  max-width: 600px;
}

.admin-hint a {
  color: var(--n-green);
  text-decoration: underline;
}

.admin-hint a:hover {
  color: var(--n-orange);
}

/* Форма добавления села */
.admin-village-form {
  background: var(--n-paper-2);
  border: 1px solid var(--n-line);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
}

.admin-village-form-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.admin-village-form-row .admin-input {
  flex: 1;
  min-width: 140px;
}

.admin-village-form-row .admin-input--half {
  min-width: 100px;
  max-width: 160px;
}

/* Вкладка сёл — таблица */
#villagesTable th:first-child { min-width: 160px; }
#villagesTable td:last-child { text-align: center; }

/* ── 9. МОДАЛКА ── */

.admin-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(34,49,39,0.55);
  z-index: 10001;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.admin-modal-overlay.open {
  display: flex;
}

.admin-modal {
  background: #fff;
  border-radius: 12px;
  width: 100%;
  max-width: 960px;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0,0,0,0.28);
}

.admin-modal-header {
  padding: 16px 22px;
  background: var(--n-paper-2);
  border-bottom: 1px solid var(--n-line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}

.admin-modal-header h3 {
  margin: 0;
  font-family: 'Widock Trial', 'Unbounded', sans-serif;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--n-green);
}

.admin-modal-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--n-line);
  background: var(--n-paper-2);
  color: var(--n-gold);
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.admin-modal-close:hover {
  background: var(--n-focus);
  color: var(--n-text);
}

.admin-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 0;
}

.admin-modal-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  min-height: 400px;
}

.admin-modal-form {
  padding: 22px;
  overflow-y: auto;
  max-height: 65vh;
}

.admin-modal-map {
  border-left: 1px solid var(--n-line);
  display: flex;
  flex-direction: column;
  position: relative;
}

.admin-modal-map-label {
  padding: 10px 16px;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--n-maroon);
  background: var(--n-paper-2);
  border-bottom: 1px solid var(--n-line);
  text-align: center;
  flex-shrink: 0;
}

#adminMiniMap {
  flex: 1;
  min-height: 300px;
  width: 100%;
}

.admin-modal-map-coords {
  padding: 8px 16px;
  font-family: monospace;
  font-size: 0.78rem;
  color: var(--n-gold);
  background: var(--n-paper-2);
  border-top: 1px solid var(--n-line);
  text-align: center;
  flex-shrink: 0;
}

.admin-modal-footer {
  padding: 14px 22px;
  background: var(--n-paper-2);
  border-top: 1px solid var(--n-line);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-shrink: 0;
}

.admin-modal-error {
  flex: 1;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.78rem;
  color: var(--n-maroon);
  font-weight: 600;
}

/* ── 10. ПОЛЯ ФОРМЫ В МОДАЛКЕ ── */

.admin-field-group {
  margin-bottom: 14px;
}

.admin-field-group:last-child {
  margin-bottom: 0;
}

.admin-label {
  display: block;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--n-maroon);
  margin-bottom: 6px;
}

.admin-field-row {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}

.admin-field-row:last-child {
  margin-bottom: 0;
}

.admin-field-row .admin-field-group {
  flex: 1;
  min-width: 0;
  margin-bottom: 0;
}

.admin-field-row--files {
  flex-wrap: wrap;
}

.admin-field-row--files .admin-field-group {
  min-width: 140px;
}

/* ── 11. RESPONSIVE ── */

@media (max-width: 900px) {
  .admin-modal-split {
    grid-template-columns: 1fr;
  }

  .admin-modal-map {
    border-left: none;
    border-top: 1px solid var(--n-line);
    min-height: 280px;
  }

  #adminMiniMap {
    min-height: 250px;
  }

  .admin-title {
    font-size: 1rem;
  }

  .admin-header-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .admin-filters-row {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-input--search {
    min-width: auto;
  }

  .admin-input--select {
    min-width: auto;
  }
}

@media (max-width: 640px) {
  .admin-nasledie {
    padding: 0 12px 24px;
  }

  .admin-modal-overlay {
    padding: 0;
    align-items: flex-end;
  }

  .admin-modal {
    max-height: 96vh;
    border-radius: 12px 12px 0 0;
  }

  .admin-modal-form {
    padding: 14px;
  }

  .admin-modal-header {
    padding: 12px 14px;
  }

  .admin-modal-footer {
    padding: 12px 14px;
  }

  .admin-table th,
  .admin-table td {
    padding: 8px 10px;
    font-size: 0.72rem;
  }

  .col-coords { display: none; }
  .col-icon { display: none; }

  .admin-tab {
    padding: 10px 14px;
    font-size: 0.75rem;
  }

  .admin-village-form-row {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-village-form-row .admin-input--half {
    max-width: none;
  }
}

@media (max-width: 420px) {
  .admin-title {
    font-size: 0.88rem;
  }

  .admin-btn {
    font-size: 0.72rem;
    min-height: 36px;
    padding: 0 12px;
  }

  .admin-table {
    font-size: 0.7rem;
  }

  .admin-table th {
    font-size: 0.6rem;
    padding: 8px 6px;
  }

  .admin-table td {
    padding: 6px;
  }
}

/* ── 12. PREFERS REDUCED MOTION ── */

@media (prefers-reduced-motion: reduce) {
  .admin-btn,
  .admin-tab,
  .admin-action-btn,
  .admin-modal-overlay,
  .admin-modal {
    transition: none !important;
  }
}

/* ── 13. ДОПОЛНИТЕЛЬНО ── */

/* Стилизация datalist (ограниченно) */
input[list]::-webkit-calendar-picker-indicator {
  opacity: 0.4;
  cursor: pointer;
}

/* Плавное появление модалки */
.admin-modal-overlay.open {
  animation: adminFadeIn 0.2s ease;
}

.admin-modal-overlay.open .admin-modal {
  animation: adminSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes adminFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes adminSlideIn {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── РЕЗУЛЬТАТЫ ПОИСКА ── */

.nm-search-result--village { border-left: 3px solid var(--n-gold); }
.nm-search-result--spot { border-left: 3px solid var(--n-green); }
.nm-search-result--geo { border-left: 3px solid var(--n-road); }
.nm-search-result--heritage { background: rgba(59,77,43,0.04); }

.nm-search-result-icon {
  font-size: 1.2rem;
  width: 32px;
  text-align: center;
  flex-shrink: 0;
}

.nm-search-result-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.nm-search-result-info strong {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--n-text);
}

.nm-search-result-meta {
  font-family: 'Spectral', serif;
  font-style: italic;
  font-weight: 700;
  font-size: 0.7rem;
  color: var(--n-gold);
}

.nm-search-result {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  cursor: pointer;
  border-bottom: 1px solid rgba(34,49,39,0.04);
  transition: background 0.15s;
}

.nm-search-result:active {
  background: var(--n-focus);
}

.nm-search-result:last-child {
  border-bottom: none;
}

/* ── РЕЗУЛЬТАТЫ ПОИСКА ── */

.nm-search-result--village { border-left: 3px solid var(--n-gold); }
.nm-search-result--spot { border-left: 3px solid var(--n-green); }
.nm-search-result--geo { border-left: 3px solid var(--n-road); }
.nm-search-result--heritage { background: rgba(59,77,43,0.04); }

.nm-search-result-icon {
  font-size: 1.2rem;
  width: 32px;
  text-align: center;
  flex-shrink: 0;
}

.nm-search-result-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.nm-search-result-info strong {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--n-text);
}

.nm-search-result-meta {
  font-family: 'Spectral', serif;
  font-style: italic;
  font-weight: 700;
  font-size: 0.7rem;
  color: var(--n-gold);
}

.nm-search-result {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  cursor: pointer;
  border-bottom: 1px solid rgba(34,49,39,0.04);
  transition: background 0.15s;
}

.nm-search-result:active {
  background: var(--n-focus);
}

.nm-search-result:last-child {
  border-bottom: none;
}

/* ============================================================
   КНОПКА ТУР-ПРОГУЛКИ — КОМПЬЮТЕР
   ============================================================ */

.map-action-btn--tour {
  position: relative;

  background:
    linear-gradient(
      135deg,
      var(--n-green),
      #4d6339
    );

  border-color: var(--n-green);

  color: #fff;

  overflow: hidden;
}

.map-action-btn--tour::after {
  content: '';

  position: absolute;

  top: -20px;
  right: -18px;

  width: 54px;
  height: 54px;

  border: 1px solid
    rgba(243, 210, 175, 0.25);

  border-radius: 50%;
}

.map-action-btn--tour:hover {
  background: var(--n-orange);

  border-color: var(--n-orange);

  color: #fff;
}

.map-action-btn--tour .btn-icon {
  color: var(--n-focus);

  font-size: 1.1rem;
}

/* ============================================================
   КРУГЛАЯ КНОПКА ТУР-ПРОГУЛКИ — МОБИЛЬНАЯ КАРТА
   ============================================================ */

.nm-tour-fab {
  position: fixed;

  right: 16px;

  /*
   * Кнопка находится над кнопкой
   * «Моё местоположение».
   */
  bottom:
    calc(
      78px +
      env(
        safe-area-inset-bottom,
        0px
      )
    );

  z-index: 260;

  display: flex;

  width: 52px;
  height: 52px;

  padding: 0;

  align-items: center;
  justify-content: center;

  border: 2px solid
    var(--n-focus, #F3D2AF);

  border-radius: 50%;

  background:
    var(--n-green, #3B4D2B);

  color: #fff;

  box-shadow:
    0 6px 22px
    rgba(34, 49, 39, 0.28);

  cursor: pointer;

  -webkit-appearance: none;
  appearance: none;

  transition:
    transform 0.18s ease,
    background 0.18s ease,
    box-shadow 0.18s ease;
}

.nm-tour-fab:active {
  transform: scale(0.92);

  background:
    var(--n-orange, #F18F48);

  box-shadow:
    0 3px 12px
    rgba(34, 49, 39, 0.22);
}

.nm-tour-fab-icon {
  width: 28px;
  height: 28px;

  overflow: visible;

  fill:
    var(--n-focus, #F3D2AF);

  stroke: #fff;

  stroke-width: 2;

  stroke-linecap: round;
  stroke-linejoin: round;
}

.nm-tour-fab-icon circle {
  stroke:
    var(--n-focus, #F3D2AF);

  stroke-width: 1.5;
}

/* ============================================================
   ИСПРАВЛЕНИЕ ЗАГОЛОВКОВ СВОРАЧИВАЕМЫХ КАРТОЧЕК
   ============================================================ */

button.map-panel-card-header {
  width: 100%;

  margin: 0;
  padding: 12px 15px;

  border: 0;
  border-bottom:
    1px solid var(--n-line);

  border-radius: 0;

  background:
    var(--n-paper-2);

  color:
    var(--n-text);

  font: inherit;
  text-align: left;

  cursor: pointer;

  -webkit-appearance: none;
  appearance: none;

  box-sizing: border-box;
}

button.map-panel-card-header:hover {
  background:
    var(--n-focus);
}

button.map-panel-card-header:focus {
  outline: none;
}

button.map-panel-card-header:focus-visible {
  outline:
    2px solid var(--n-orange);

  outline-offset: -2px;
}

button.map-panel-card-header h3 {
  margin: 0;
  padding: 0;

  pointer-events: none;
}

button.map-panel-card-header .toggle-icon {
  margin-left: auto;

  pointer-events: none;
}

/* ============================================================
   НАСЛЕДИЕ — КОНСТРУКТОР МАРШРУТОВ В АДМИН-ПАНЕЛИ

   Добавить в конец nasledie.css.
   ============================================================ */

/* ── 1. ВКЛАДКА И ТАБЛИЦА МАРШРУТОВ ── */

.admin-routes-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.admin-routes-title {
  margin: 0 0 7px;
  color: var(--n-green, #3B4D2B);
  font-family: 'Widock Trial', 'Montserrat', sans-serif;
  font-size: 1rem;
  line-height: 1.25;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.admin-route-filters {
  padding: 14px;
  border: 1px solid var(--n-line, rgba(34, 49, 39, .14));
  border-radius: 9px;
  background: var(--n-paper-2, #FBF8EE);
}

#routesTable th:first-child {
  min-width: 230px;
}

#routesTable td {
  vertical-align: top;
}

#routesTable td:last-child {
  vertical-align: middle;
  text-align: center;
}

.route-table-description {
  display: -webkit-box;
  max-width: 320px;
  margin-top: 4px;
  overflow: hidden;
  color: var(--n-gold, #9F7251);
  font-family: 'Spectral', serif;
  font-size: .72rem;
  font-style: italic;
  font-weight: 700;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

/* ── 2. ОБЩАЯ МОДАЛКА КОНСТРУКТОРА ── */

.route-editor-overlay {
  z-index: 12000;
  padding: 14px;
}

.route-editor-overlay.open {
  display: flex;
}

.admin-modal.route-editor-modal {
  width: min(1500px, calc(100vw - 28px));
  max-width: 1500px;
  height: min(94vh, 960px);
  max-height: 94vh;
  border: 1px solid rgba(34, 49, 39, .18);
  border-radius: 14px;
  background: #fff;
}

.route-editor-kicker {
  margin-bottom: 4px;
  color: var(--n-brown, #A65E33);
  font-family: 'Spectral', serif;
  font-size: .72rem;
  font-style: italic;
  font-weight: 700;
}

.route-editor-body {
  min-height: 0;
  overflow: hidden;
  background: var(--n-paper-2, #FBF8EE);
}

.route-editor-layout {
  display: grid;
  grid-template-columns: minmax(390px, 450px) minmax(560px, 1fr);
  width: 100%;
  height: 100%;
  min-height: 0;
}

/* ── 3. ЛЕВАЯ КОЛОНКА ── */

.route-editor-sidebar {
  min-width: 0;
  overflow-y: auto;
  padding: 16px;
  border-right: 1px solid var(--n-line, rgba(34, 49, 39, .14));
  background: var(--n-paper, #F6F3E0);
  scrollbar-width: thin;
  scrollbar-color: var(--n-gold, #9F7251) transparent;
}

.route-editor-sidebar::-webkit-scrollbar {
  width: 5px;
}

.route-editor-sidebar::-webkit-scrollbar-thumb {
  border-radius: 5px;
  background: var(--n-gold, #9F7251);
}

.route-editor-section {
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid var(--n-line, rgba(34, 49, 39, .14));
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 3px 12px rgba(34, 49, 39, .04);
}

.route-editor-section:last-child {
  margin-bottom: 0;
}

.route-editor-section-title {
  margin-bottom: 11px;
  color: var(--n-maroon, #781E07);
  font-family: 'Widock Trial', 'Montserrat', sans-serif;
  font-size: .72rem;
  line-height: 1.25;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.route-editor-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 11px;
}

.route-editor-section-head .route-editor-section-title {
  margin-bottom: 4px;
}

.route-editor-help {
  color: var(--n-gold, #9F7251);
  font-family: 'Spectral', serif;
  font-size: .74rem;
  font-style: italic;
  font-weight: 700;
  line-height: 1.4;
}

.route-editor-counter {
  display: inline-flex;
  min-width: 26px;
  height: 26px;
  padding: 0 7px;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: 13px;
  background: var(--n-green, #3B4D2B);
  color: #fff;
  font-family: 'Montserrat', sans-serif;
  font-size: .68rem;
  font-weight: 700;
}

/* ── 4. СЕЗОНЫ ── */

.route-season-fieldset {
  min-width: 0;
  margin: 0 0 14px;
  padding: 0;
  border: 0;
}

.route-season-fieldset legend {
  padding: 0;
}

.route-season-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.route-season-option {
  position: relative;
  display: block;
  cursor: pointer;
  user-select: none;
}

.route-season-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.route-season-option span {
  display: flex;
  min-height: 38px;
  padding: 7px 10px;
  align-items: center;
  border: 1px solid var(--n-line, rgba(34, 49, 39, .14));
  border-radius: 6px;
  background: var(--n-paper-2, #FBF8EE);
  color: var(--n-text, #223127);
  font-family: 'Montserrat', sans-serif;
  font-size: .72rem;
  font-weight: 600;
  transition: background .18s ease, border-color .18s ease, color .18s ease;
}

.route-season-option span:hover {
  border-color: var(--n-gold, #9F7251);
  background: var(--n-focus, #F3D2AF);
}

.route-season-option input:checked + span {
  border-color: var(--n-green, #3B4D2B);
  background: var(--n-green, #3B4D2B);
  color: #fff;
}

.route-season-option input:focus-visible + span {
  outline: 2px solid var(--n-orange, #F18F48);
  outline-offset: 2px;
}

/* ── 5. ПУСТЫЕ СОСТОЯНИЯ И КНОПКИ ── */

.route-editor-empty {
  padding: 16px 12px;
  border: 1px dashed var(--n-line, rgba(34, 49, 39, .14));
  border-radius: 7px;
  background: var(--n-paper-2, #FBF8EE);
  color: var(--n-gold, #9F7251);
  font-family: 'Spectral', serif;
  font-size: .78rem;
  font-style: italic;
  font-weight: 700;
  text-align: center;
}

.route-editor-inline-actions {
  display: flex;
  gap: 7px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.route-editor-inline-actions .admin-btn {
  flex: 1;
}

/* ── 6. СПИСОК ТОЧЕК ── */

.route-points-list,
.route-segments-list,
.route-hints-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.route-point-row {
  display: grid;
  grid-template-columns: 18px 28px minmax(120px, 1fr) auto 28px 28px 28px;
  gap: 6px;
  align-items: center;
  padding: 8px;
  border: 1px solid var(--n-line, rgba(34, 49, 39, .14));
  border-radius: 7px;
  background: var(--n-paper-2, #FBF8EE);
  transition: border-color .15s ease, opacity .15s ease, transform .15s ease;
}

.route-point-row:hover {
  border-color: var(--n-gold, #9F7251);
}

.route-point-row.dragging {
  opacity: .5;
  transform: scale(.98);
  border-color: var(--n-orange, #F18F48);
}

.route-point-drag {
  color: var(--n-gold, #9F7251);
  font-size: 1rem;
  line-height: 1;
  cursor: grab;
  user-select: none;
}

.route-point-number,
.route-segment-number {
  display: inline-flex;
  width: 26px;
  height: 26px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--n-green, #3B4D2B);
  color: #fff;
  font-family: 'Montserrat', sans-serif;
  font-size: .68rem;
  font-weight: 700;
}

.route-point-main,
.route-segment-main,
.route-hint-main {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.route-point-main strong,
.route-segment-main strong,
.route-hint-main strong {
  overflow: hidden;
  color: var(--n-text, #223127);
  font-family: 'Montserrat', sans-serif;
  font-size: .72rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.route-point-main span,
.route-segment-main span,
.route-hint-main span {
  overflow: hidden;
  color: var(--n-gold, #9F7251);
  font-family: 'Spectral', serif;
  font-size: .66rem;
  font-style: italic;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.route-point-radius {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--n-gold, #9F7251);
  font-family: 'Montserrat', sans-serif;
  font-size: .62rem;
}

.route-point-radius input {
  width: 58px;
  height: 28px;
  padding: 0 5px;
  border: 1px solid var(--n-line, rgba(34, 49, 39, .14));
  border-radius: 4px;
  background: #fff;
  color: var(--n-text, #223127);
  font-family: 'Montserrat', sans-serif;
  font-size: .66rem;
  text-align: center;
}

.route-row-action {
  display: inline-flex;
  width: 28px;
  height: 28px;
  padding: 0;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--n-line, rgba(34, 49, 39, .14));
  border-radius: 5px;
  background: #fff;
  color: var(--n-green, #3B4D2B);
  font-family: 'Montserrat', sans-serif;
  font-size: .72rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, transform .15s ease;
}

.route-row-action:hover {
  border-color: var(--n-green, #3B4D2B);
  background: rgba(59, 77, 43, .08);
  transform: translateY(-1px);
}

.route-row-action--delete {
  color: var(--n-maroon, #781E07);
}

.route-row-action--delete:hover {
  border-color: var(--n-maroon, #781E07);
  background: rgba(120, 30, 7, .08);
}

/* ── 7. УЧАСТКИ ПУТИ ── */

.route-segment-row {
  display: grid;
  grid-template-columns: 28px minmax(140px, 1fr) 30px 30px;
  gap: 7px;
  align-items: center;
  padding: 9px;
  border: 1px solid rgba(59, 77, 43, .2);
  border-left: 4px solid var(--n-green, #3B4D2B);
  border-radius: 7px;
  background: rgba(59, 77, 43, .04);
}

.route-segment-row--manual {
  border-color: rgba(241, 143, 72, .35);
  border-left-color: var(--n-orange, #F18F48);
  background: rgba(241, 143, 72, .06);
}

.route-segment-row--manual .route-segment-number {
  background: var(--n-orange, #F18F48);
}

/* ── 8. МЕТКИ-ПОДСКАЗКИ ── */

.route-hint-draft {
  margin-top: 10px;
  padding: 12px;
  border: 1px solid rgba(241, 143, 72, .35);
  border-radius: 8px;
  background: rgba(243, 210, 175, .18);
}

.route-hint-draft-title {
  margin-bottom: 10px;
  color: var(--n-maroon, #781E07);
  font-family: 'Widock Trial', 'Montserrat', sans-serif;
  font-size: .7rem;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.route-hints-list {
  margin-top: 10px;
}

.route-hint-row {
  display: grid;
  grid-template-columns: 34px minmax(140px, 1fr) 30px 30px;
  gap: 8px;
  align-items: center;
  padding: 8px;
  border: 1px solid var(--n-line, rgba(34, 49, 39, .14));
  border-radius: 7px;
  background: var(--n-paper-2, #FBF8EE);
}

.route-hint-row img {
  width: 30px;
  height: 30px;
  object-fit: contain;
}

/* ── 9. ПРАВАЯ КОЛОНКА И КАРТА ── */

.route-editor-map-column {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
  background: #e5e3db;
}

.route-editor-map-toolbar {
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--n-line, rgba(34, 49, 39, .14));
  background: var(--n-paper, #F6F3E0);
}

.route-editor-map-toolbar .admin-btn.active {
  border-color: var(--n-maroon, #781E07);
  background: var(--n-maroon, #781E07);
  color: #fff;
}

.route-editor-map-status {
  min-height: 38px;
  padding: 9px 13px;
  border-bottom: 1px solid var(--n-line, rgba(34, 49, 39, .14));
  background: var(--n-paper-2, #FBF8EE);
  color: var(--n-brown, #A65E33);
  font-family: 'Spectral', serif;
  font-size: .78rem;
  font-style: italic;
  font-weight: 700;
  line-height: 1.35;
}

#routeEditorMap {
  width: 100%;
  min-height: 440px;
  flex: 1;
  background: #dfe5d2;
}

.route-editor-map-legend {
  display: flex;
  gap: 12px 18px;
  padding: 9px 12px;
  flex-wrap: wrap;
  border-top: 1px solid var(--n-line, rgba(34, 49, 39, .14));
  background: var(--n-paper-2, #FBF8EE);
  color: var(--n-text, #223127);
  font-family: 'Montserrat', sans-serif;
  font-size: .64rem;
  font-weight: 600;
}

.route-editor-map-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.route-legend-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.route-legend-dot--spot {
  background: var(--n-gold, #9F7251);
}

.route-legend-dot--selected {
  background: var(--n-green, #3B4D2B);
}

.route-legend-dot--hint {
  background: var(--n-orange, #F18F48);
}

.route-legend-line {
  display: inline-block;
  width: 22px;
  height: 4px;
  border-radius: 2px;
}

.route-legend-line--auto {
  background: var(--n-green, #3B4D2B);
}

.route-legend-line--manual {
  background: var(--n-orange, #F18F48);
}

.route-editor-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  border-top: 1px solid var(--n-line, rgba(34, 49, 39, .14));
  background: var(--n-line, rgba(34, 49, 39, .14));
}

.route-editor-summary > div {
  padding: 10px 12px;
  background: var(--n-paper, #F6F3E0);
  text-align: center;
}

.route-editor-summary span {
  display: block;
  margin-bottom: 3px;
  color: var(--n-gold, #9F7251);
  font-family: 'Montserrat', sans-serif;
  font-size: .58rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.route-editor-summary strong {
  color: var(--n-green, #3B4D2B);
  font-family: 'Widock Trial', 'Montserrat', sans-serif;
  font-size: .82rem;
}

/* ── 10. НИЖНЯЯ ПАНЕЛЬ ── */

.route-editor-footer {
  position: relative;
  z-index: 2;
}

.route-editor-footer .admin-modal-error {
  max-height: 54px;
  overflow-y: auto;
}

/* ── 11. АДАПТАЦИЯ ── */

@media (max-width: 1180px) {
  .admin-modal.route-editor-modal {
    width: calc(100vw - 18px);
    max-width: none;
    height: 96vh;
    max-height: 96vh;
  }

  .route-editor-layout {
    grid-template-columns: minmax(350px, 410px) minmax(480px, 1fr);
  }
}

@media (max-width: 980px) {
  .route-editor-body {
    overflow-y: auto;
  }

  .route-editor-layout {
    display: flex;
    height: auto;
    flex-direction: column;
  }

  .route-editor-sidebar {
    max-height: none;
    overflow: visible;
    border-right: 0;
    border-bottom: 1px solid var(--n-line, rgba(34, 49, 39, .14));
  }

  .route-editor-map-column {
    min-height: 600px;
  }

  #routeEditorMap {
    min-height: 470px;
  }
}

@media (max-width: 680px) {
  .route-editor-overlay {
    padding: 0;
    align-items: flex-end;
  }

  .admin-modal.route-editor-modal {
    width: 100%;
    height: 100vh;
    height: 100dvh;
    max-height: 100vh;
    max-height: 100dvh;
    border: 0;
    border-radius: 0;
  }

  .route-editor-sidebar {
    padding: 10px;
  }

  .route-editor-section {
    padding: 11px;
  }

  .route-season-grid {
    grid-template-columns: 1fr;
  }

  .route-point-row {
    grid-template-columns: 16px 26px minmax(100px, 1fr) 28px;
  }

  .route-point-radius {
    grid-column: 3 / -1;
    justify-self: start;
  }

  .route-point-row .route-row-action {
    grid-row: 2;
  }

  .route-segment-row {
    grid-template-columns: 28px minmax(100px, 1fr) 30px 30px;
  }

  .route-editor-map-toolbar {
    display: grid;
    grid-template-columns: 1fr;
  }

  .route-editor-map-toolbar .admin-btn {
    width: 100%;
  }

  .route-editor-map-column {
    min-height: 520px;
  }

  #routeEditorMap {
    min-height: 390px;
  }

  .route-editor-map-legend {
    gap: 7px 12px;
  }

  .route-editor-summary > div {
    padding: 9px 5px;
  }

  .route-editor-footer {
    flex-wrap: wrap;
  }

  .route-editor-footer .admin-modal-error {
    width: 100%;
    flex-basis: 100%;
  }
}

@media (max-width: 430px) {
  .admin-routes-header .admin-btn {
    width: 100%;
  }

  .route-hint-row {
    grid-template-columns: 30px minmax(100px, 1fr) 28px 28px;
  }

  .route-editor-summary span {
    font-size: .52rem;
  }

  .route-editor-summary strong {
    font-size: .72rem;
  }
}

/* ── 12. ДОСТУПНОСТЬ И УМЕНЬШЕННАЯ АНИМАЦИЯ ── */

@media (prefers-reduced-motion: reduce) {
  .route-point-row,
  .route-row-action,
  .route-season-option span {
    transition: none !important;
  }
}


/* =============================================================
   «НАСЛЕДИЕ» — ПОИСК И ПУБЛИЧНЫЙ РЕЖИМ МАРШРУТА

   Подключить ПОСЛЕ nasledie.css, чтобы правила ниже имели приоритет.
   Линия маршрута Яндекс.Карт задаётся в JavaScript, а не через CSS.
   Её цвет в исправленном модуле: #781E07.
   ============================================================= */

:root {
  --n-tour-path: #781E07;
  --n-search-bg: #F9F7F2;
  --n-search-card: #FFFFFF;
  --n-search-text: #2A2A2A;
  --n-search-muted: #8A6755;
  --n-search-line: rgba(120, 30, 7, 0.13);
  --n-search-hover: rgba(120, 30, 7, 0.055);
  --n-search-shadow: 0 16px 40px rgba(42, 42, 42, 0.16);
}

/* =============================================================
   ДЕСКТОПНЫЙ ПОИСК
   ============================================================= */

.style-map .map-search-results {
  overflow: hidden;
  width: 100%;
  max-height: min(560px, calc(100vh - 150px));
  margin-top: 8px;
  padding: 0;
  border: 1px solid var(--n-search-line);
  border-radius: 14px;
  background: var(--n-search-card);
  box-shadow: var(--n-search-shadow);
  color: var(--n-search-text);
}

.style-map .map-search-results:not(.active) {
  display: none;
}

.style-map .map-search-results.active {
  display: block;
  overflow-x: hidden;
  overflow-y: auto;
}

.style-map .search-section-label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  margin: 0;
  padding: 9px 14px;
  border: 0;
  border-bottom: 1px solid var(--n-search-line);
  background: var(--n-search-bg);
  color: var(--n-tour-path);
  font-family: 'Montserrat', sans-serif;
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.style-map .map-search-result {
  box-sizing: border-box;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  width: 100% !important;
  min-height: 66px;
  margin: 0 !important;
  padding: 11px 14px !important;
  border: 0 !important;
  border-bottom: 1px solid var(--n-search-line) !important;
  border-radius: 0 !important;
  outline: 0;
  background: var(--n-search-card) !important;
  box-shadow: none !important;
  color: var(--n-search-text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  transition: background-color 160ms ease, transform 160ms ease;
}

.style-map .map-search-result:last-child {
  border-bottom: 0 !important;
}

.style-map .map-search-result:hover,
.style-map .map-search-result:focus-visible {
  background: var(--n-search-hover) !important;
}

.style-map .map-search-result:active {
  transform: translateY(1px);
}

.style-map .map-search-result-copy {
  display: block;
  min-width: 0;
}

.style-map .map-search-result-copy strong {
  display: block;
  overflow-wrap: anywhere;
  color: var(--n-search-text);
  font-family: 'Montserrat', sans-serif;
  font-size: 0.79rem;
  font-weight: 700;
  line-height: 1.35;
}

.style-map .map-search-result-meta {
  display: block;
  margin-top: 3px;
  overflow-wrap: anywhere;
  color: var(--n-search-muted);
  font-family: 'Montserrat', sans-serif;
  font-size: 0.68rem;
  font-weight: 500;
  line-height: 1.4;
}

.style-map .map-search-result-icon {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border: 1px solid var(--n-search-line);
  border-radius: 50%;
  background: var(--n-search-bg);
}

.style-map .map-search-result-icon img {
  display: block;
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.style-map .search-section-label .map-search-result-icon {
  width: 22px;
  height: 22px;
  flex-basis: 22px;
  border: 0;
  background: transparent;
}

.style-map .search-section-label .map-search-result-icon img {
  width: 18px;
  height: 18px;
}

.style-map .map-search-result-icon--village {
  background: rgba(107, 112, 92, 0.10);
}

.style-map .map-search-result-icon--spot,
.style-map .map-search-result-icon--geo {
  background: rgba(120, 30, 7, 0.07);
}

.style-map .map-search-status {
  padding: 16px;
  color: var(--n-search-muted);
  font-family: 'Montserrat', sans-serif;
  font-size: 0.74rem;
  font-weight: 600;
  line-height: 1.4;
  text-align: center;
}

/* =============================================================
   МОБИЛЬНЫЙ ПОИСК
   ============================================================= */

.style-map-mobile .nm-search-results,
.nasledie-mobile-map .nm-search-results,
.nm-search-panel .nm-search-results {
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--n-search-line);
  border-radius: 14px;
  background: var(--n-search-card);
  box-shadow: 0 10px 28px rgba(42, 42, 42, 0.10);
}

.style-map-mobile .nm-search-section-label,
.nasledie-mobile-map .nm-search-section-label,
.nm-search-panel .nm-search-section-label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 9px 13px;
  border: 0;
  border-bottom: 1px solid var(--n-search-line);
  background: var(--n-search-bg);
  color: var(--n-tour-path);
  font-family: 'Montserrat', sans-serif;
  font-size: 0.67rem;
  font-style: normal;
  font-weight: 700;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.style-map-mobile .nm-search-result,
.nasledie-mobile-map .nm-search-result,
.nm-search-panel .nm-search-result {
  box-sizing: border-box;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  width: 100% !important;
  min-height: 64px;
  margin: 0 !important;
  padding: 11px 13px !important;
  border: 0 !important;
  border-bottom: 1px solid var(--n-search-line) !important;
  border-radius: 0 !important;
  background: var(--n-search-card) !important;
  box-shadow: none !important;
  color: var(--n-search-text);
  font: inherit;
  text-align: left;
  appearance: none;
  -webkit-appearance: none;
}

.style-map-mobile .nm-search-result:last-child,
.nasledie-mobile-map .nm-search-result:last-child,
.nm-search-panel .nm-search-result:last-child {
  border-bottom: 0 !important;
}

.style-map-mobile .nm-search-result:active,
.nasledie-mobile-map .nm-search-result:active,
.nm-search-panel .nm-search-result:active {
  background: var(--n-search-hover) !important;
}

.nm-search-result-info {
  display: block;
  min-width: 0;
}

.nm-search-result-info strong {
  display: block;
  overflow-wrap: anywhere;
  color: var(--n-search-text);
  font-family: 'Montserrat', sans-serif;
  font-size: 0.79rem;
  font-weight: 700;
  line-height: 1.35;
}

.nm-search-result-meta {
  display: block;
  margin-top: 3px;
  overflow-wrap: anywhere;
  color: var(--n-search-muted);
  font-family: 'Montserrat', sans-serif;
  font-size: 0.67rem;
  font-weight: 500;
  line-height: 1.4;
}

.nm-search-result-icon {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border: 1px solid var(--n-search-line);
  border-radius: 50%;
  background: var(--n-search-bg);
}

.nm-search-result-icon img {
  display: block;
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.nm-search-section-label .nm-search-result-icon {
  width: 22px;
  height: 22px;
  flex-basis: 22px;
  border: 0;
  background: transparent;
}

.nm-search-section-label .nm-search-result-icon img {
  width: 18px;
  height: 18px;
}

.nm-search-result-icon--village {
  background: rgba(107, 112, 92, 0.10);
}

.nm-search-result-icon--spot,
.nm-search-result-icon--geo {
  background: rgba(120, 30, 7, 0.07);
}

.nm-search-loading,
.nm-search-empty {
  padding: 18px 14px;
  color: var(--n-search-muted);
  font-family: 'Montserrat', sans-serif;
  font-size: 0.74rem;
  font-weight: 600;
  line-height: 1.45;
  text-align: center;
}

/* =============================================================
   ПУБЛИЧНАЯ КАРТОЧКА ТУРА
   ============================================================= */

.interactive-route-card {
  border-color: rgba(120, 30, 7, 0.18) !important;
  background: var(--n-search-bg) !important;
  box-shadow: 0 18px 48px rgba(42, 42, 42, 0.22) !important;
}

.interactive-route-kicker,
.interactive-route-progress {
  color: var(--n-tour-path) !important;
}

.interactive-route-btn--primary {
  border-color: var(--n-tour-path) !important;
  background: var(--n-tour-path) !important;
  color: #FFFFFF !important;
}

.interactive-route-btn--primary:hover,
.interactive-route-btn--primary:focus-visible {
  background: #5F1806 !important;
}

@media (max-width: 600px) {
  .style-map .map-search-results {
    max-height: min(62vh, 520px);
    border-radius: 12px;
  }

  .style-map .map-search-result,
  .nm-search-panel .nm-search-result {
    min-height: 62px;
  }
}
/* =============================================================
   ПРОСМОТР ИЗОБРАЖЕНИЯ ПОВЕРХ КАРТЫ
   ============================================================= */

.map-image-viewer {
  position: fixed;
  inset: 0;
  z-index: 20000;

  display: none;
  align-items: center;
  justify-content: center;

  box-sizing: border-box;
  padding: 28px;

  background: rgba(20, 18, 16, 0.88);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.map-image-viewer.open {
  display: flex;
}

.map-image-viewer-dialog {
  position: relative;

  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;

  width: min(1100px, 100%);
  height: min(820px, calc(100vh - 56px));

  outline: none;
}

.map-image-viewer-image {
  display: block;

  max-width: 100%;
  max-height: calc(100% - 54px);

  border-radius: 8px;
  object-fit: contain;

  background: #161412;
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.42);
}

.map-image-viewer-close {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 2;

  min-height: 40px;
  padding: 0 18px;

  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 6px;

  background: #F9F7F2;
  color: #781E07;

  font-family: 'Montserrat', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;

  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.map-image-viewer-close:hover,
.map-image-viewer-close:focus-visible {
  border-color: #FFFFFF;
  background: #FFFFFF;
}

.map-image-viewer-title {
  min-height: 24px;
  margin-top: 12px;

  color: #FFFFFF;

  font-family: 'Montserrat', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.4;
  text-align: center;
}

body.map-image-viewer-open {
  overflow: hidden;
}

@media (max-width: 700px) {
  .map-image-viewer {
    padding: 14px;
  }

  .map-image-viewer-dialog {
    height: calc(100vh - 28px);
  }

  .map-image-viewer-image {
    max-height: calc(100% - 62px);
  }

  .map-image-viewer-close {
    top: 4px;
    right: 4px;
  }
}

/* =============================================================
   «НАСЛЕДИЕ» — ГЛАВНАЯ СТРАНИЦА V2
   Подключается после nasledie.css и переопределяет только .n-home-v2.
   ============================================================= */

.n-home-v2 {
  --home-ink: #182219;
  --home-paper: #F6F3E0;
  --home-paper-light: #FBF8EE;
  --home-green: #3B4D2B;
  --home-maroon: #781E07;
  --home-orange: #F18F48;
  --home-gold: #9F7251;
  --home-focus: #F3D2AF;
  --home-line: rgba(34, 49, 39, .14);
  background: var(--home-paper);
  color: var(--home-ink);
  overflow: clip;
}

.n-home-v2 * {
  box-sizing: border-box;
}

.n-home-v2 .n-container {
  width: min(1240px, calc(100% - 48px));
  margin: 0 auto;
  padding: 0;
}

/* =============================================================
   HERO: КООРДИНАТНОЕ ПОЛЕ
   ============================================================= */

.n-home-v2 .n-hero-v2 {
  position: relative;
  min-height: max(720px, calc(100svh - 76px));
  display: grid;
  align-items: end;
  overflow: hidden;
  isolation: isolate;
  cursor: crosshair;
  background-color: #1d291e;
  background-size: cover;
  background-position: center;
}

.n-home-v2 .n-hero-v2::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -3;
  background:
    linear-gradient(90deg, rgba(14, 24, 16, .92) 0%, rgba(14, 24, 16, .66) 45%, rgba(14, 24, 16, .25) 100%),
    linear-gradient(0deg, rgba(10, 16, 11, .82), transparent 62%);
}

.n-home-v2 .n-hero-v2::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -2;
  opacity: .23;
  background-image:
    linear-gradient(rgba(246, 243, 224, .22) 1px, transparent 1px),
    linear-gradient(90deg, rgba(246, 243, 224, .22) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to right, #000, transparent 88%);
}

.n-home-v2 .n-hero-noise {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .13;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.86' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.38'/%3E%3C/svg%3E");
}

.n-home-v2 .n-coordinate-crosshair {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  transition: opacity .2s ease;
}

.n-home-v2 .n-hero-v2:hover .n-coordinate-crosshair {
  opacity: 1;
}

.n-home-v2 .n-coordinate-line-x,
.n-home-v2 .n-coordinate-line-y {
  position: absolute;
  background: rgba(243, 210, 175, .5);
  filter: drop-shadow(0 0 3px rgba(243, 210, 175, .2));
}

.n-home-v2 .n-coordinate-line-x {
  left: 0;
  right: 0;
  top: var(--cross-y, 50%);
  height: 1px;
}

.n-home-v2 .n-coordinate-line-y {
  top: 0;
  bottom: 0;
  left: var(--cross-x, 50%);
  width: 1px;
}

.n-home-v2 .n-coordinate-target {
  position: absolute;
  left: var(--cross-x, 50%);
  top: var(--cross-y, 50%);
  width: 28px;
  height: 28px;
  transform: translate(-50%, -50%);
  border: 1px solid var(--home-focus);
  border-radius: 50%;
}

.n-home-v2 .n-coordinate-target::before,
.n-home-v2 .n-coordinate-target::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  background: var(--home-focus);
  transform: translate(-50%, -50%);
}

.n-home-v2 .n-coordinate-target::before { width: 38px; height: 1px; }
.n-home-v2 .n-coordinate-target::after { width: 1px; height: 38px; }

.n-home-v2 .n-coordinate-readout {
  position: absolute;
  left: min(calc(var(--cross-x, 50%) + 18px), calc(100% - 245px));
  top: min(calc(var(--cross-y, 50%) + 18px), calc(100% - 82px));
  min-width: 218px;
  padding: 10px 12px;
  border: 1px solid rgba(243, 210, 175, .35);
  background: rgba(14, 24, 16, .82);
  backdrop-filter: blur(8px);
  color: #fff;
  font-family: 'Montserrat', sans-serif;
  font-size: .66rem;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.n-home-v2 .n-coordinate-readout span {
  display: block;
  margin-top: 2px;
  color: var(--home-focus);
  font-size: .78rem;
  letter-spacing: .05em;
}

.n-home-v2 .n-hero-v2-inner {
  position: relative;
  z-index: 4;
  width: min(1240px, calc(100% - 48px));
  margin: 0 auto;
  padding: 110px 0 54px;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, .75fr);
  gap: clamp(38px, 7vw, 110px);
  align-items: end;
}

.n-home-v2 .n-hero-v2-copy {
  max-width: 800px;
}

.n-home-v2 .n-hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  color: var(--home-focus);
  font-family: 'Montserrat', sans-serif;
  font-size: .65rem;
  font-style: normal;
  font-weight: 700;
  letter-spacing: .17em;
  text-transform: uppercase;
}

.n-home-v2 .n-hero-kicker::before {
  content: '';
  width: 32px;
  height: 1px;
  background: currentColor;
}

.n-home-v2 .n-hero-title {
  max-width: 900px;
  margin: 0;
  color: #fff;
  font-family: 'Widock Trial', 'Montserrat', sans-serif;
  font-size: clamp(2.7rem, 6.4vw, 6.7rem);
  font-style: normal;
  font-weight: 700;
  line-height: .93;
  letter-spacing: -.025em;
  text-wrap: balance;
  text-transform: uppercase;
}

.n-home-v2 .n-hero-lead {
  max-width: 700px;
  margin: 25px 0 0;
  color: rgba(255, 255, 255, .86);
  font-family: 'Spectral', serif;
  font-size: clamp(1rem, 1.45vw, 1.22rem);
  line-height: 1.65;
}

.n-home-v2 .n-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
}

.n-home-v2 .n-home-button {
  display: inline-flex;
  min-height: 50px;
  padding: 0 20px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, .45);
  color: #fff;
  background: transparent;
  font-family: 'Montserrat', sans-serif;
  font-size: .68rem;
  font-style: normal;
  font-weight: 700;
  letter-spacing: .1em;
  text-decoration: none;
  text-transform: uppercase;
  transition: background .2s ease, color .2s ease, transform .2s ease;
}

.n-home-v2 .n-home-button--accent {
  border-color: var(--home-focus);
  background: var(--home-focus);
  color: var(--home-ink);
}

.n-home-v2 .n-home-button:hover {
  transform: translateY(-2px);
  background: #fff;
  color: var(--home-ink);
}

.n-home-v2 .n-hero-v2-side {
  display: grid;
  gap: 12px;
}

.n-home-v2 .n-coordinate-card,
.n-home-v2 .n-passport-card-v2 {
  position: relative;
  padding: 20px;
  border: 1px solid rgba(243, 210, 175, .32);
  background: rgba(20, 31, 21, .66);
  backdrop-filter: blur(10px);
  color: #fff;
}

.n-home-v2 .n-coordinate-card-label,
.n-home-v2 .n-passport-label {
  margin-bottom: 8px;
  color: var(--home-focus);
  font-family: 'Montserrat', sans-serif;
  font-size: .59rem;
  font-style: normal;
  font-weight: 700;
  letter-spacing: .15em;
  text-transform: uppercase;
}

.n-home-v2 .n-coordinate-card-value {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(1.1rem, 2vw, 1.6rem);
  font-style: normal;
  font-weight: 700;
  letter-spacing: .04em;
}

.n-home-v2 .n-coordinate-card-meta {
  margin-top: 7px;
  color: rgba(255, 255, 255, .68);
  font-family: 'Spectral', serif;
  font-size: .8rem;
  line-height: 1.45;
}

.n-home-v2 .n-passport-title {
  margin: 0 0 8px;
  color: #fff;
  font-family: 'Widock Trial', 'Montserrat', sans-serif;
  font-size: 1.05rem;
  text-transform: uppercase;
}

.n-home-v2 .n-passport-text {
  color: rgba(255, 255, 255, .75);
  font-size: .86rem;
  line-height: 1.55;
}

.n-home-v2 .n-hero-stats {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid rgba(255, 255, 255, .2);
}

.n-home-v2 .n-hero-stat {
  padding: 18px 18px 0 0;
}

.n-home-v2 .n-hero-stat strong {
  display: block;
  color: #fff;
  font-family: 'Widock Trial', 'Montserrat', sans-serif;
  font-size: 1.1rem;
  text-transform: uppercase;
}

.n-home-v2 .n-hero-stat span {
  color: rgba(255, 255, 255, .56);
  font-family: 'Montserrat', sans-serif;
  font-size: .58rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.n-home-v2 .n-s3-form { z-index: 8; }

/* =============================================================
   ОБЩИЕ СЕКЦИИ
   ============================================================= */

.n-home-v2 .n-section-v2 {
  position: relative;
  padding: clamp(82px, 10vw, 150px) 0;
}

.n-home-v2 .n-section-v2--light {
  background: var(--home-paper-light);
}

.n-home-v2 .n-section-v2--dark {
  background: var(--home-green);
  color: #fff;
}

.n-home-v2 .n-section-heading-v2 {
  display: grid;
  grid-template-columns: minmax(0, .7fr) minmax(300px, 1.3fr);
  gap: 40px;
  align-items: end;
  margin-bottom: clamp(38px, 6vw, 76px);
}

.n-home-v2 .n-section-index {
  color: var(--home-maroon);
  font-family: 'Montserrat', sans-serif;
  font-size: .62rem;
  font-style: normal;
  font-weight: 700;
  letter-spacing: .15em;
  text-transform: uppercase;
}

.n-home-v2 .n-section-title {
  margin: 8px 0 0;
  color: var(--home-green);
  font-family: 'Widock Trial', 'Montserrat', sans-serif;
  font-size: clamp(2rem, 4.4vw, 4.4rem);
  font-style: normal;
  line-height: 1;
  letter-spacing: -.02em;
  text-align: left;
  text-transform: uppercase;
}

.n-home-v2 .n-section-note {
  max-width: 680px;
  margin: 0;
  justify-self: end;
  color: var(--home-ink);
  font-family: 'Spectral', serif;
  font-size: clamp(.98rem, 1.35vw, 1.16rem);
  line-height: 1.65;
  text-align: left;
}

.n-home-v2 .n-section-v2--dark .n-section-index,
.n-home-v2 .n-section-v2--dark .n-section-title {
  color: var(--home-focus);
}

.n-home-v2 .n-section-v2--dark .n-section-note {
  color: rgba(255, 255, 255, .76);
}

.n-home-v2 .n-reveal {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity .8s ease, transform .8s cubic-bezier(.16, 1, .3, 1);
}

.n-home-v2 .n-reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ABOUT */
.n-home-v2 .n-about-grid-v2 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--home-line);
  border-left: 1px solid var(--home-line);
}

.n-home-v2 .n-story-card {
  min-height: 360px;
  padding: clamp(24px, 3.2vw, 42px);
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--home-line);
  border-bottom: 1px solid var(--home-line);
  background: rgba(255, 255, 255, .3);
  transition: background .25s ease, transform .25s ease;
}

.n-home-v2 .n-story-card:hover {
  background: #fff;
  transform: translateY(-5px);
}

.n-home-v2 .n-story-card-number {
  color: var(--home-gold);
  font-family: 'Montserrat', sans-serif;
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .15em;
}

.n-home-v2 .n-card-label {
  margin-top: auto;
  color: var(--home-maroon);
  font-family: 'Montserrat', sans-serif;
  font-size: .6rem;
  font-style: normal;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.n-home-v2 .n-card-title {
  margin: 10px 0 12px;
  color: var(--home-green);
  font-family: 'Widock Trial', 'Montserrat', sans-serif;
  font-size: clamp(1.15rem, 2vw, 1.65rem);
  line-height: 1.15;
  text-transform: uppercase;
}

.n-home-v2 .n-card-text {
  color: var(--home-ink);
  font-family: 'Spectral', serif;
  font-size: .94rem;
  line-height: 1.65;
}

/* FEATURES */
.n-home-v2 .n-features-grid-v2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: rgba(255, 255, 255, .18);
  border: 1px solid rgba(255, 255, 255, .18);
}

.n-home-v2 .n-feature-panel-v2 {
  padding: clamp(28px, 4.4vw, 56px);
  background: var(--home-green);
}

.n-home-v2 .n-features-box-label {
  margin-bottom: 25px;
  padding-bottom: 13px;
  border-bottom: 1px solid rgba(255, 255, 255, .17);
  color: var(--home-focus);
  font-family: 'Montserrat', sans-serif;
  font-size: .62rem;
  font-style: normal;
  font-weight: 700;
  letter-spacing: .15em;
  text-transform: uppercase;
}

.n-home-v2 .n-features-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.n-home-v2 .n-features-list li {
  position: relative;
  padding: 13px 0 13px 27px;
  border-bottom: 1px solid rgba(255, 255, 255, .1);
  color: rgba(255, 255, 255, .87);
  font-family: 'Spectral', serif;
  font-size: .94rem;
  line-height: 1.45;
}

.n-home-v2 .n-features-list li::before {
  content: '';
  position: absolute;
  left: 1px;
  top: 20px;
  width: 9px;
  height: 9px;
  border: 1px solid var(--home-orange);
  transform: rotate(45deg);
}

/* TASKS */
.n-home-v2 .n-tasks-grid-v2 {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
}

.n-home-v2 .n-task-card-v2 {
  grid-column: span 4;
  min-height: 250px;
  padding: 25px;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--home-line);
  background: #fff;
}

.n-home-v2 .n-task-card-v2:nth-child(4n + 1) { grid-column: span 5; }
.n-home-v2 .n-task-card-v2:nth-child(4n + 2) { grid-column: span 7; }

.n-home-v2 .n-task-card-v2 .n-card-label { margin-top: 0; }
.n-home-v2 .n-task-card-v2 .n-card-title { margin-top: auto; }

.n-home-v2 .n-task-card-actions {
  display: flex;
  gap: 6px;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--home-line);
}

.n-home-v2 .n-task-action {
  width: 32px;
  height: 32px;
  border: 1px solid var(--home-line);
  background: var(--home-paper-light);
  color: var(--home-ink);
  cursor: pointer;
}

/* =============================================================
   ЖИВАЯ КАРТА СЁЛ — OPENFREEMAP
   ============================================================= */

.n-home-v2 .n-villages-stage {
  display: grid;
  grid-template-columns: minmax(280px, .42fr) minmax(0, 1.58fr);
  min-height: 680px;
  border: 1px solid var(--home-line);
  background: #e6eadb;
}

.n-home-v2 .n-villages-copy {
  position: relative;
  z-index: 2;
  padding: clamp(28px, 4vw, 50px);
  display: flex;
  flex-direction: column;
  background: var(--home-maroon);
  color: #fff;
}

.n-home-v2 .n-villages-copy-kicker {
  color: var(--home-focus);
  font-family: 'Montserrat', sans-serif;
  font-size: .6rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.n-home-v2 .n-villages-copy-title {
  margin: auto 0 14px;
  color: #fff;
  font-family: 'Widock Trial', 'Montserrat', sans-serif;
  font-size: clamp(1.75rem, 3.5vw, 3.5rem);
  line-height: 1;
  text-transform: uppercase;
}

.n-home-v2 .n-villages-copy-text {
  color: rgba(255, 255, 255, .76);
  font-family: 'Spectral', serif;
  font-size: .92rem;
  line-height: 1.6;
}

.n-home-v2 .n-villages-count {
  margin-top: 25px;
  color: var(--home-focus);
  font-family: 'Montserrat', sans-serif;
  font-size: .64rem;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.n-home-v2 .n-villages-map-v2 {
  position: relative;
  min-height: 680px;
  overflow: hidden;
}

.n-home-v2 #heritageVillagesMap {
  position: absolute;
  inset: 0;
}

.n-home-v2 .maplibregl-canvas { outline: none; }

.n-home-v2 .n-village-map-attribution {
  position: absolute;
  right: 8px;
  bottom: 6px;
  z-index: 3;
  padding: 4px 7px;
  background: rgba(255, 255, 255, .86);
  color: #405044;
  font-family: Arial, sans-serif;
  font-size: 10px;
}

.n-home-v2 .n-village-map-attribution a { color: inherit; }

.n-home-v2 .n-village-marker {
  position: relative;
  width: 44px;
  height: 52px;
  border: 0;
  background: transparent;
  cursor: pointer;
  filter: drop-shadow(0 7px 9px rgba(24, 34, 25, .24));
  transition: transform .2s ease, filter .2s ease;
}

.n-home-v2 .n-village-marker:hover,
.n-home-v2 .n-village-marker:focus-visible {
  transform: translateY(-5px) scale(1.06);
  filter: drop-shadow(0 11px 13px rgba(24, 34, 25, .32));
}

.n-home-v2 .n-village-marker img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.n-home-v2 .n-village-marker-label {
  position: absolute;
  left: 50%;
  top: 45px;
  min-width: max-content;
  padding: 5px 8px;
  transform: translateX(-50%);
  border: 1px solid rgba(120, 30, 7, .16);
  background: rgba(251, 248, 238, .94);
  color: var(--home-maroon);
  font-family: 'Montserrat', sans-serif;
  font-size: .62rem;
  font-weight: 700;
  white-space: nowrap;
  pointer-events: none;
}

.n-home-v2 .n-villages-empty {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px;
  color: var(--home-maroon);
  font-family: 'Spectral', serif;
  text-align: center;
}

/* =============================================================
   КИНЕМАТОГРАФИЧЕСКИЙ CTA
   ============================================================= */

.n-home-v2 .n-cinematic-cta {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  overflow: hidden;
  isolation: isolate;
  background-color: #050605;
  background-size: cover;
  background-position: center;
  color: #fff;
}

.n-home-v2 .n-cinematic-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(circle at 50% 45%, rgba(120, 30, 7, .18), transparent 45%),
    linear-gradient(180deg, rgba(0, 0, 0, .72), rgba(0, 0, 0, .88));
}

.n-home-v2 .n-cinematic-curtain {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: grid;
  place-items: center;
  background: #030403;
  transition: opacity 1.35s ease, visibility 1.35s ease;
}

.n-home-v2 .n-cinematic-origin {
  margin: 0;
  padding: 24px;
  color: #fff;
  font-family: 'Widock Trial', 'Montserrat', sans-serif;
  font-size: clamp(1.8rem, 5vw, 5rem);
  line-height: 1.04;
  letter-spacing: .04em;
  text-align: center;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 1s ease, transform 1s cubic-bezier(.16, 1, .3, 1);
}

.n-home-v2 .n-cinematic-cta.is-entered .n-cinematic-origin {
  opacity: 1;
  transform: none;
}

.n-home-v2 .n-cinematic-cta.is-revealing .n-cinematic-curtain {
  opacity: 0;
  visibility: hidden;
}

.n-home-v2 .n-cinematic-particles {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1s ease .45s;
}

.n-home-v2 .n-cinematic-cta.is-revealing .n-cinematic-particles { opacity: 1; }

.n-home-v2 .n-cinematic-particle {
  position: absolute;
  bottom: -20px;
  width: var(--particle-size, 3px);
  height: var(--particle-size, 3px);
  border-radius: 50%;
  background: rgba(243, 210, 175, .55);
  animation: nCinematicParticle var(--particle-duration, 10s) linear infinite;
  animation-delay: var(--particle-delay, 0s);
}

@keyframes nCinematicParticle {
  0% { transform: translate3d(0, 0, 0); opacity: 0; }
  12% { opacity: .7; }
  100% { transform: translate3d(var(--particle-drift, 20px), -110vh, 0); opacity: 0; }
}

.n-home-v2 .n-cinematic-content {
  position: relative;
  z-index: 3;
  width: min(900px, calc(100% - 42px));
  padding: 70px 0;
  text-align: center;
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 1.1s ease .65s, transform 1.1s cubic-bezier(.16, 1, .3, 1) .65s;
}

.n-home-v2 .n-cinematic-cta.is-revealing .n-cinematic-content {
  opacity: 1;
  transform: none;
}

.n-home-v2 .n-cinematic-kicker {
  color: var(--home-focus);
  font-family: 'Montserrat', sans-serif;
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.n-home-v2 .n-cta-title {
  margin: 18px 0 16px;
  color: #fff;
  font-family: 'Widock Trial', 'Montserrat', sans-serif;
  font-size: clamp(2.2rem, 6.5vw, 6.6rem);
  line-height: .95;
  letter-spacing: -.02em;
  text-transform: uppercase;
}

.n-home-v2 .n-cta-sub {
  max-width: 650px;
  margin: 0 auto 30px;
  color: rgba(255, 255, 255, .74);
  font-family: 'Spectral', serif;
  font-size: clamp(.98rem, 1.5vw, 1.16rem);
  line-height: 1.65;
}

.n-home-v2 .n-cta-btn {
  display: inline-flex;
  min-height: 54px;
  padding: 0 26px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--home-focus);
  background: var(--home-focus);
  color: var(--home-ink);
  font-family: 'Montserrat', sans-serif;
  font-size: .67rem;
  font-weight: 700;
  letter-spacing: .13em;
  text-decoration: none;
  text-transform: uppercase;
  transition: background .2s ease, color .2s ease, transform .2s ease;
}

.n-home-v2 .n-cta-btn:hover {
  transform: translateY(-3px);
  background: transparent;
  color: #fff;
}

/* EDITOR */
.n-home-v2 .editable-field[contenteditable="false"] {
  box-shadow: none !important;
  cursor: default;
}

/* =============================================================
   RESPONSIVE
   ============================================================= */

@media (max-width: 980px) {
  .n-home-v2 .n-hero-v2-inner {
    grid-template-columns: 1fr;
    padding-top: 80px;
  }
  .n-home-v2 .n-hero-v2-side {
    grid-template-columns: 1fr 1fr;
  }
  .n-home-v2 .n-section-heading-v2 {
    grid-template-columns: 1fr;
  }
  .n-home-v2 .n-section-note { justify-self: start; }
  .n-home-v2 .n-about-grid-v2 { grid-template-columns: 1fr; }
  .n-home-v2 .n-story-card { min-height: 280px; }
  .n-home-v2 .n-villages-stage { grid-template-columns: 1fr; }
  .n-home-v2 .n-villages-copy { min-height: 300px; }
  .n-home-v2 .n-villages-map-v2 { min-height: 570px; }
}

@media (max-width: 720px) {
  .n-home-v2 .n-container,
  .n-home-v2 .n-hero-v2-inner {
    width: min(100% - 28px, 1240px);
  }
  .n-home-v2 .n-hero-v2 { min-height: 760px; }
  .n-home-v2 .n-hero-title { font-size: clamp(2.2rem, 12vw, 4.3rem); }
  .n-home-v2 .n-hero-v2-side { grid-template-columns: 1fr; }
  .n-home-v2 .n-hero-stats { grid-template-columns: 1fr; gap: 10px; }
  .n-home-v2 .n-section-v2 { padding: 72px 0; }
  .n-home-v2 .n-section-title { font-size: clamp(1.8rem, 10vw, 3.2rem); }
  .n-home-v2 .n-features-grid-v2 { grid-template-columns: 1fr; }
  .n-home-v2 .n-task-card-v2,
  .n-home-v2 .n-task-card-v2:nth-child(n) { grid-column: span 12; }
  .n-home-v2 .n-villages-map-v2 { min-height: 480px; }
  .n-home-v2 .n-coordinate-readout { display: none; }
  .n-home-v2 .n-coordinate-crosshair { opacity: .45; }
}

@media (prefers-reduced-motion: reduce) {
  .n-home-v2 *,
  .n-home-v2 *::before,
  .n-home-v2 *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .n-home-v2 .n-reveal,
  .n-home-v2 .n-cinematic-content,
  .n-home-v2 .n-cinematic-origin {
    opacity: 1;
    transform: none;
  }
}
/* =============================================================
   ПАТЧ V2 ДЛЯ ГЛАВНОЙ «НАСЛЕДИЕ»
   Добавить В КОНЕЦ projects/nasledie/static/css/nasledie.css
   ============================================================= */

/* Исправление слишком крупного заголовка секций. */
.n-home-v2 .n-section-heading-v2 {
  grid-template-columns: minmax(420px, 1.08fr) minmax(300px, .92fr);
  gap: clamp(32px, 5vw, 76px);
}

.n-home-v2 .n-section-title {
  max-width: 760px;
  font-size: clamp(1.75rem, 3.15vw, 3.45rem);
  line-height: 1.06;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
  text-wrap: balance;
}

.n-home-v2 .n-section-note {
  align-self: end;
  padding-bottom: 5px;
}

/* =============================================================
   О ПРОЕКТЕ — ВЫЕЗЖАЮЩАЯ ГЕОМЕТКА
   ============================================================= */

.n-home-v2 .n-about-section-v2 {
  overflow: hidden;
}

.n-home-v2 .n-about-section-v2 .n-container {
  position: relative;
}

.n-home-v2 .n-about-geo-ornament {
  position: absolute;
  top: 46%;
  right: clamp(-118px, -6vw, -62px);
  z-index: 4;
  width: clamp(150px, 14vw, 230px);
  transform: translate3d(180px, -50%, 0) rotate(13deg);
  opacity: 0;
  pointer-events: none;
  filter: drop-shadow(0 26px 30px rgba(34, 49, 39, .2));
  transition:
    transform 1.15s cubic-bezier(.16, 1, .3, 1) .28s,
    opacity .75s ease .28s;
}

.n-home-v2 .n-about-section-v2.is-visible .n-about-geo-ornament {
  transform: translate3d(0, -50%, 0) rotate(-5deg);
  opacity: .92;
}

.n-home-v2 .n-about-geo-ornament::before,
.n-home-v2 .n-about-geo-ornament::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  border: 1px solid rgba(120, 30, 7, .2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: nAboutGeoRing 3.2s ease-out infinite;
}

.n-home-v2 .n-about-geo-ornament::before {
  width: 120%;
  aspect-ratio: 1;
}

.n-home-v2 .n-about-geo-ornament::after {
  width: 155%;
  aspect-ratio: 1;
  animation-delay: 1.2s;
}

@keyframes nAboutGeoRing {
  0% { opacity: .7; transform: translate(-50%, -50%) scale(.68); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.14); }
}

.n-home-v2 .n-about-geo-ornament img {
  position: relative;
  z-index: 2;
  display: block;
  width: 100%;
  height: auto;
  max-height: 230px;
  object-fit: contain;
}

.n-home-v2 .n-about-icon-admin {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 8;
  pointer-events: auto;
}

.n-home-v2 .n-about-icon-admin-label {
  display: inline-flex;
  min-height: 36px;
  padding: 0 12px;
  align-items: center;
  border: 1px dashed rgba(120, 30, 7, .35);
  background: rgba(251, 248, 238, .94);
  color: var(--home-maroon);
  font-family: 'Montserrat', sans-serif;
  font-size: .61rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  cursor: pointer;
}

.n-home-v2 .n-about-icon-admin-status {
  display: block;
  max-width: 250px;
  margin-top: 5px;
  color: var(--home-maroon);
  font-family: 'Montserrat', sans-serif;
  font-size: .6rem;
  text-align: right;
}

/* =============================================================
   ВОЗМОЖНОСТИ — CSS-КАРТА СПРАВА
   ============================================================= */

.n-home-v2 .n-features-composition {
  display: grid;
  grid-template-columns: minmax(430px, 1.08fr) minmax(420px, .92fr);
  gap: 28px;
  align-items: stretch;
}

.n-home-v2 .n-features-composition .n-features-grid-v2 {
  grid-template-columns: 1fr;
}

.n-home-v2 .n-platform-map-art {
  position: relative;
  min-height: 650px;
  overflow: hidden;
  border: 1px solid rgba(243, 210, 175, .2);
  background:
    linear-gradient(rgba(243, 210, 175, .07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(243, 210, 175, .07) 1px, transparent 1px),
    radial-gradient(circle at 52% 40%, rgba(125, 165, 165, .12), transparent 45%),
    #304025;
  background-size: 46px 46px, 46px 46px, auto, auto;
  isolation: isolate;
}

.n-home-v2 .n-platform-map-art::before {
  content: 'СХЕМА ТЕРРИТОРИИ / 56.499530 · 68.062761';
  position: absolute;
  left: 22px;
  top: 20px;
  z-index: 5;
  color: var(--home-focus);
  font-family: 'Montserrat', sans-serif;
  font-size: .57rem;
  font-weight: 700;
  letter-spacing: .12em;
}

.n-home-v2 .n-platform-map-art::after {
  content: '';
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(243, 210, 175, .12);
  pointer-events: none;
}

.n-home-v2 .n-css-road,
.n-home-v2 .n-css-trail {
  position: absolute;
  z-index: 2;
  height: 90px;
  border-top: 5px solid var(--home-focus);
  border-radius: 50%;
  transform-origin: left center;
  transform: rotate(var(--road-angle, 0deg)) scaleX(0);
  opacity: 0;
}

.n-home-v2 .n-css-road::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 7px;
  border-top: 1px solid rgba(243, 210, 175, .46);
}

.n-home-v2 .n-css-road--one {
  left: -8%; top: 31%; width: 102%; --road-angle: 10deg;
}
.n-home-v2 .n-css-road--two {
  left: 22%; top: 72%; width: 88%; --road-angle: -28deg;
}
.n-home-v2 .n-css-road--three {
  left: 49%; top: 3%; width: 80%; --road-angle: 68deg;
}

.n-home-v2 .n-css-trail {
  z-index: 3;
  height: 45px;
  border-top: 3px dashed var(--home-orange);
}
.n-home-v2 .n-css-trail::after { display: none; }
.n-home-v2 .n-css-trail--one {
  left: 9%; top: 62%; width: 48%; --road-angle: -18deg;
}
.n-home-v2 .n-css-trail--two {
  left: 55%; top: 51%; width: 44%; --road-angle: 31deg;
}

.n-home-v2 .n-css-lake {
  position: absolute;
  z-index: 1;
  width: 104px;
  height: 58px;
  border: 1px solid rgba(243, 210, 175, .38);
  border-radius: 62% 38% 56% 44% / 49% 62% 38% 51%;
  background: rgba(125, 165, 165, .72);
  transform: scale(0) rotate(var(--lake-angle, 0deg));
  opacity: 0;
}
.n-home-v2 .n-css-lake--one { left: 12%; top: 18%; --lake-angle: -12deg; }
.n-home-v2 .n-css-lake--two { right: 8%; bottom: 13%; width: 138px; height: 75px; --lake-angle: 16deg; }

.n-home-v2 .n-css-house {
  position: absolute;
  z-index: 4;
  width: 31px;
  height: 27px;
  border: 2px solid var(--home-focus);
  background: rgba(243, 210, 175, .12);
  transform: translateY(25px) scale(.65);
  opacity: 0;
}

.n-home-v2 .n-css-house::before {
  content: '';
  position: absolute;
  left: 50%;
  top: -18px;
  width: 22px;
  height: 22px;
  border-left: 2px solid var(--home-focus);
  border-top: 2px solid var(--home-focus);
  background: #304025;
  transform: translateX(-50%) rotate(45deg);
}

.n-home-v2 .n-css-house::after {
  content: '';
  position: absolute;
  left: 10px;
  bottom: 0;
  width: 8px;
  height: 15px;
  background: var(--home-orange);
}

.n-home-v2 .n-css-house--one { left: 19%; top: 39%; }
.n-home-v2 .n-css-house--two { left: 40%; top: 54%; transform-origin: bottom; }
.n-home-v2 .n-css-house--three { right: 21%; top: 28%; }
.n-home-v2 .n-css-house--four { right: 13%; top: 62%; }
.n-home-v2 .n-css-house--five { left: 54%; bottom: 11%; }

.n-home-v2 .n-css-map-pin {
  position: absolute;
  left: 51%;
  top: 39%;
  z-index: 6;
  width: 56px;
  height: 56px;
  transform: translate(-50%, -50%) scale(0);
  border: 2px solid var(--home-orange);
  border-radius: 50% 50% 50% 0;
  background: var(--home-maroon);
  rotate: -45deg;
  opacity: 0;
  box-shadow: 0 18px 28px rgba(0, 0, 0, .22);
}

.n-home-v2 .n-css-map-pin::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 14px;
  height: 14px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: var(--home-focus);
}

.n-home-v2 .n-css-map-caption {
  position: absolute;
  left: 24px;
  bottom: 20px;
  z-index: 7;
  color: rgba(255, 255, 255, .7);
  font-family: 'Spectral', serif;
  font-size: .78rem;
  opacity: 0;
  transform: translateY(12px);
}

/* Последовательность: дороги → тропы → вода → дома → метка. */
.n-home-v2 .n-section-v2--dark.is-visible .n-css-road {
  animation: nDrawRoad 1.2s cubic-bezier(.16, 1, .3, 1) forwards;
}
.n-home-v2 .n-section-v2--dark.is-visible .n-css-road--two { animation-delay: .22s; }
.n-home-v2 .n-section-v2--dark.is-visible .n-css-road--three { animation-delay: .42s; }
.n-home-v2 .n-section-v2--dark.is-visible .n-css-trail { animation-delay: 1.08s; }
.n-home-v2 .n-section-v2--dark.is-visible .n-css-trail--two { animation-delay: 1.28s; }

@keyframes nDrawRoad {
  from { opacity: 0; transform: rotate(var(--road-angle, 0deg)) scaleX(0); }
  to { opacity: 1; transform: rotate(var(--road-angle, 0deg)) scaleX(1); }
}

.n-home-v2 .n-section-v2--dark.is-visible .n-css-lake {
  animation: nRevealLake .8s cubic-bezier(.16, 1, .3, 1) forwards;
  animation-delay: 1.85s;
}
.n-home-v2 .n-section-v2--dark.is-visible .n-css-lake--two { animation-delay: 2.05s; }

@keyframes nRevealLake {
  to { opacity: 1; transform: scale(1) rotate(var(--lake-angle, 0deg)); }
}

.n-home-v2 .n-section-v2--dark.is-visible .n-css-house {
  animation: nRaiseHouse .62s cubic-bezier(.16, 1, .3, 1) forwards;
  animation-delay: 2.45s;
}
.n-home-v2 .n-section-v2--dark.is-visible .n-css-house--two { animation-delay: 2.6s; }
.n-home-v2 .n-section-v2--dark.is-visible .n-css-house--three { animation-delay: 2.75s; }
.n-home-v2 .n-section-v2--dark.is-visible .n-css-house--four { animation-delay: 2.9s; }
.n-home-v2 .n-section-v2--dark.is-visible .n-css-house--five { animation-delay: 3.05s; }

@keyframes nRaiseHouse {
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.n-home-v2 .n-section-v2--dark.is-visible .n-css-map-pin {
  animation: nDropCssPin .72s cubic-bezier(.16, 1, .3, 1) 3.45s forwards;
}

@keyframes nDropCssPin {
  0% { opacity: 0; transform: translate(-50%, -100%) scale(.35); }
  70% { opacity: 1; transform: translate(-50%, -45%) scale(1.12); }
  100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

.n-home-v2 .n-section-v2--dark.is-visible .n-css-map-caption {
  opacity: 1;
  transform: none;
  transition: opacity .7s ease 3.7s, transform .7s ease 3.7s;
}

@media (max-width: 1100px) {
  .n-home-v2 .n-features-composition {
    grid-template-columns: 1fr;
  }
  .n-home-v2 .n-platform-map-art { min-height: 520px; }
  .n-home-v2 .n-about-geo-ornament { right: -65px; width: 165px; }
}

@media (max-width: 720px) {
  .n-home-v2 .n-section-heading-v2 {
    grid-template-columns: 1fr;
  }
  .n-home-v2 .n-section-title {
    max-width: none;
    font-size: clamp(1.65rem, 8.5vw, 2.75rem);
  }
  .n-home-v2 .n-about-geo-ornament {
    position: relative;
    top: auto;
    right: auto;
    width: 126px;
    margin: -28px auto 28px;
    transform: translateX(100px) rotate(10deg);
  }
  .n-home-v2 .n-about-section-v2.is-visible .n-about-geo-ornament {
    transform: translateX(0) rotate(-4deg);
  }
  .n-home-v2 .n-about-icon-admin {
    position: static;
    margin: -16px 0 25px;
    text-align: center;
  }
  .n-home-v2 .n-about-icon-admin-status { text-align: center; margin-inline: auto; }
  .n-home-v2 .n-platform-map-art { min-height: 460px; }
}

@media (prefers-reduced-motion: reduce) {
  .n-home-v2 .n-about-geo-ornament,
  .n-home-v2 .n-css-road,
  .n-home-v2 .n-css-trail,
  .n-home-v2 .n-css-lake,
  .n-home-v2 .n-css-house,
  .n-home-v2 .n-css-map-pin,
  .n-home-v2 .n-css-map-caption {
    opacity: 1 !important;
    animation: none !important;
    transition: none !important;
  }
  .n-home-v2 .n-about-geo-ornament { transform: translate3d(0, -50%, 0) !important; }
  .n-home-v2 .n-css-road,
  .n-home-v2 .n-css-trail { transform: rotate(var(--road-angle, 0deg)) scaleX(1) !important; }
  .n-home-v2 .n-css-lake { transform: scale(1) rotate(var(--lake-angle, 0deg)) !important; }
  .n-home-v2 .n-css-house { transform: none !important; }
  .n-home-v2 .n-css-map-pin { transform: translate(-50%, -50%) scale(1) !important; }
}


/* =============================================================
   НАСЛЕДИЕ — УЛУЧШЕНИЯ ГЛАВНОЙ v2.1
   Подключать В КОНЕЦ файла nasledie.css.
   Патч решает четыре задачи:
     1) уменьшить огромный заголовок в HERO;
     2) осветлить затемнение фона HERO (проявление из темноты ~10–15 %);
     3) переделать «карту-декор» в разделе «Возможности» —
        маленький орнамент в правом верхнем углу вместо панели на полсекции;
     4) CTA снизу: убрать двухэтапное появление
        («История начинается с тебя» больше не растягивается на всю ширину).
   ============================================================= */


/* -------------------------------------------------------------
   1. HERO — заголовок и фон
   ------------------------------------------------------------- */

/* Осветлённый градиент: фон почти виден, тонировка ~10–20 %. */
.n-home-v2 .n-hero-v2::before {
  background:
    linear-gradient(
      90deg,
      rgba(14, 24, 16, 0.38) 0%,
      rgba(14, 24, 16, 0.18) 55%,
      rgba(14, 24, 16, 0.05) 100%
    ),
    linear-gradient(
      0deg,
      rgba(10, 16, 11, 0.30),
      transparent 62%
    );
}

/* Убираем плотную сетку — только лёгкий намёк. */
.n-home-v2 .n-hero-v2::after {
  opacity: 0.10;
}

/* Заголовок стал заметно компактнее. */
.n-home-v2 .n-hero-title {
  max-width: 780px;
  font-size: clamp(1.85rem, 3.6vw, 3.6rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
}

/* Лид тоже соразмерно уменьшаем. */
.n-home-v2 .n-hero-lead {
  max-width: 620px;
  margin-top: 20px;
  font-size: clamp(0.95rem, 1.15vw, 1.08rem);
  line-height: 1.6;
}

/* Кикер — тоньше и меньше, чтобы не спорил с заголовком. */
.n-home-v2 .n-hero-kicker {
  margin-bottom: 16px;
  font-size: 0.6rem;
  letter-spacing: 0.18em;
}

/* Мобильные размеры. */
@media (max-width: 720px) {
  .n-home-v2 .n-hero-title {
    font-size: clamp(1.55rem, 7vw, 2.4rem);
  }
  .n-home-v2 .n-hero-lead {
    font-size: 0.94rem;
  }
}


/* -------------------------------------------------------------
   2. ВОЗМОЖНОСТИ — маленькая карта-орнамент в правом верхнем углу
   ------------------------------------------------------------- */

/* Композиция раздела: две колонки списков + декор поверх. */
.n-home-v2 .n-features-composition {
  position: relative;
  display: block;
  padding-top: 20px;
}

.n-home-v2 .n-features-composition .n-features-grid-v2 {
  grid-template-columns: 1fr 1fr;
  gap: 1px;
}

/* Сам «холст» карты — компактный, без рамок и фона-сетки. */
.n-home-v2 .n-platform-map-art {
  position: absolute;
  top: -78px;
  right: -8px;
  z-index: 5;
  width: 240px;
  height: 150px;
  min-height: 0;
  border: none;
  background: transparent;
  overflow: visible;
  pointer-events: none;
  opacity: 0.85;
}

/* Убираем крупные атрибуты декоративной панели. */
.n-home-v2 .n-platform-map-art::before,
.n-home-v2 .n-platform-map-art::after {
  content: none;
}

/* Скрываем лишние элементы, оставляем: 2 дороги, 1 тропинку,
   1 небольшое озеро, 3 домика. Без геометки и подписей. */
.n-home-v2 .n-css-road--three,
.n-home-v2 .n-css-trail--two,
.n-home-v2 .n-css-lake--one,
.n-home-v2 .n-css-house--four,
.n-home-v2 .n-css-house--five,
.n-home-v2 .n-css-map-pin,
.n-home-v2 .n-css-map-caption {
  display: none !important;
}

/* Аккуратные линии дорог: тоньше и без пунктирной подложки. */
.n-home-v2 .n-platform-map-art .n-css-road {
  height: 24px;
  border-top-width: 2px;
  border-top-color: rgba(243, 210, 175, 0.55);
}
.n-home-v2 .n-platform-map-art .n-css-road::after {
  display: none;
}
.n-home-v2 .n-platform-map-art .n-css-road--one {
  left: 4%;
  top: 38%;
  width: 92%;
  --road-angle: 8deg;
}
.n-home-v2 .n-platform-map-art .n-css-road--two {
  left: 12%;
  top: 78%;
  width: 74%;
  --road-angle: -12deg;
  border-top-color: rgba(243, 210, 175, 0.4);
}

/* Тропинка — одна, тонкая, пунктирная. */
.n-home-v2 .n-platform-map-art .n-css-trail {
  height: 18px;
  border-top-width: 2px;
  border-top-style: dashed;
  border-top-color: var(--home-orange);
  opacity: 0.75;
}
.n-home-v2 .n-platform-map-art .n-css-trail--one {
  left: 22%;
  top: 58%;
  width: 44%;
  --road-angle: -6deg;
}

/* Небольшое озеро в углу. */
.n-home-v2 .n-platform-map-art .n-css-lake--two {
  right: 8%;
  bottom: 6%;
  width: 58px;
  height: 30px;
  --lake-angle: 14deg;
  border-color: rgba(243, 210, 175, 0.35);
  background: rgba(125, 165, 165, 0.55);
}

/* Домики — три маленьких квадрата без окошек и крыш-палок. */
.n-home-v2 .n-platform-map-art .n-css-house {
  width: 16px;
  height: 14px;
  border-width: 2px;
}
.n-home-v2 .n-platform-map-art .n-css-house::before {
  width: 11px;
  height: 11px;
  top: -9px;
  border-width: 2px;
}
.n-home-v2 .n-platform-map-art .n-css-house::after {
  display: none;
}
.n-home-v2 .n-platform-map-art .n-css-house--one   { left: 22%;  top: 12%; }
.n-home-v2 .n-platform-map-art .n-css-house--two   { left: 48%;  top: 22%; }
.n-home-v2 .n-platform-map-art .n-css-house--three { right: 20%; top: 8%;  }

/* На узком экране прячем декор совсем — он мешает списку. */
@media (max-width: 1100px) {
  .n-home-v2 .n-features-composition .n-features-grid-v2 {
    grid-template-columns: 1fr;
  }
  .n-home-v2 .n-platform-map-art {
    top: -60px;
    right: -4px;
    width: 190px;
    height: 120px;
  }
}
@media (max-width: 720px) {
  .n-home-v2 .n-platform-map-art {
    display: none;
  }
}


/* -------------------------------------------------------------
   3. CTA снизу — единое появление контента
   ------------------------------------------------------------- */

/* Полностью снимаем «занавес» — он и создавал двухэтапный эффект,
   когда «История начинается с тебя» сначала растягивалась во всю
   ширину, а потом коллапсировала в другую вёрстку. */
.n-home-v2 .n-cinematic-curtain {
  display: none !important;
}

/* Более лёгкое затемнение фона — фон проявляется из темноты,
   но остаётся читаемым (10–20 % тона). */
.n-home-v2 .n-cinematic-cta::before {
  background:
    radial-gradient(
      circle at 50% 45%,
      rgba(120, 30, 7, 0.12),
      transparent 60%
    ),
    linear-gradient(
      180deg,
      rgba(0, 0, 0, 0.22),
      rgba(0, 0, 0, 0.38)
    );
}

/* Контент плавно и одноэтапно проявляется вместе с частицами,
   как только секция попадает в область видимости. */
.n-home-v2 .n-cinematic-content {
  opacity: 0;
  transform: translateY(30px);
  transition:
    opacity 1s ease,
    transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}
.n-home-v2 .n-cinematic-cta.is-entered .n-cinematic-content,
.n-home-v2 .n-cinematic-cta.is-revealing .n-cinematic-content {
  opacity: 1;
  transform: none;
  transition-delay: 0.15s;
}

.n-home-v2 .n-cinematic-particles {
  opacity: 0;
  transition: opacity 1.2s ease 0.3s;
}
.n-home-v2 .n-cinematic-cta.is-entered .n-cinematic-particles,
.n-home-v2 .n-cinematic-cta.is-revealing .n-cinematic-particles {
  opacity: 1;
}

/* CTA-заголовок тоже подрежем — под общий, более сдержанный тон. */
.n-home-v2 .n-cta-title {
  font-size: clamp(1.8rem, 4.2vw, 3.8rem);
  line-height: 1;
}


/* -------------------------------------------------------------
   4. Уважение к пониженной анимации
   ------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .n-home-v2 .n-cinematic-content,
  .n-home-v2 .n-cinematic-particles {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}


/* -------------------------------------------------------------
   4. СЁЛА НА КАРТЕ — переработка блока
   Решаем: перекрытие заголовка и карты, тесную левую колонку,
   мелкую карту, «болтающийся» пустой стейт, узкий контейнер.
   ------------------------------------------------------------- */

/* Расширяем контейнер именно у секции сёл — блок становится шире. */
.n-home-v2 #villagesSection .n-container {
  width: min(1440px, calc(100% - 40px));
}

/* Заголовок секции — левая колонка чуть уже, чтобы название
   «Сёла на карте Наследия» не переносилось так криво на 90 %. */
.n-home-v2 #villagesSection .n-section-heading-v2 {
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.7fr);
  gap: clamp(28px, 4vw, 60px);
  align-items: end;
}
.n-home-v2 #villagesSection .n-section-title {
  max-width: 720px;
  font-size: clamp(1.6rem, 2.8vw, 2.8rem);
  line-height: 1.08;
}

/* Сама «сцена» — новая сетка: левая панель фиксированной ширины,
   карта занимает всё оставшееся место и стала выше. */
.n-home-v2 .n-villages-stage {
  grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
  min-height: 620px;
  border-radius: 6px;
  overflow: hidden;
}

/* Левая маруновая колонка: аккуратные пропорции текста,
   ничего не переливается в карту. */
.n-home-v2 .n-villages-copy {
  padding: clamp(26px, 3vw, 40px);
  overflow: hidden;
  min-width: 0;
}
.n-home-v2 .n-villages-copy-kicker {
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  margin-bottom: 20px;
}
.n-home-v2 .n-villages-copy-title {
  margin: 0 0 18px;
  font-size: clamp(1.4rem, 2.2vw, 2.2rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
  overflow-wrap: break-word;
  hyphens: none;
  text-wrap: balance;
}
.n-home-v2 .n-villages-copy-text {
  font-size: 0.95rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.82);
}
.n-home-v2 .n-villages-count {
  margin-top: auto;
  padding-top: 24px;
  border-top: 1px solid rgba(243, 210, 175, 0.22);
  font-size: 0.66rem;
  letter-spacing: 0.12em;
}

/* Карта — выше, спокойнее по фону. */
.n-home-v2 .n-villages-map-v2 {
  min-height: 620px;
  background: #eef1e4;
}

/* Пустое состояние — компактный «чип» вверху карты,
   больше НЕ перекрывает геометку. */
.n-home-v2 .n-villages-empty {
  position: absolute;
  inset: auto;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  border: 1px solid rgba(120, 30, 7, 0.22);
  border-radius: 999px;
  background: rgba(251, 248, 238, 0.95);
  backdrop-filter: blur(6px);
  color: var(--home-maroon);
  font-family: 'Spectral', serif;
  font-size: 0.82rem;
  font-style: italic;
  font-weight: 700;
  white-space: nowrap;
  z-index: 4;
}

/* Атрибуция карты — выровнена и не наезжает на подложку. */
.n-home-v2 .n-village-map-attribution {
  right: 10px;
  bottom: 8px;
  padding: 4px 8px;
  border-radius: 3px;
  font-size: 10px;
}

/* Мобильная адаптация — сцена собирается в один столбец. */
@media (max-width: 980px) {
  .n-home-v2 .n-villages-stage {
    grid-template-columns: 1fr;
    min-height: 0;
  }
  .n-home-v2 .n-villages-copy {
    min-height: 260px;
    padding: 28px;
  }
  .n-home-v2 .n-villages-map-v2 {
    min-height: 500px;
  }
}
@media (max-width: 720px) {
  .n-home-v2 #villagesSection .n-container {
    width: min(100% - 24px, 1440px);
  }
  .n-home-v2 .n-villages-copy-title {
    font-size: clamp(1.35rem, 6.5vw, 2rem);
  }
  .n-home-v2 .n-villages-map-v2 {
    min-height: 420px;
  }
}


/* -------------------------------------------------------------
   5. Уважение к пониженной анимации
   ------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .n-home-v2 .n-cinematic-content,
  .n-home-v2 .n-cinematic-particles {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}


/* ═══════════════════════════════════════════════════════════════
   ПАТЧ CSS — добавить в существующий <style> блок
   ═══════════════════════════════════════════════════════════════ */

    .spot-meta-row { display:flex; flex-wrap:wrap; gap:6px; }
    .meta-badge {
      display:inline-block; padding:3px 10px; border-radius:12px;
      font-size:11px; font-weight:600; border:1.5px solid #ccc; color:#555;
    }
    .meta-badge--cat { background:#f0ede6; border-color:#d0ccc0; }
    .meta-badge--era { background:#fefefe; }
    .meta-badge--partner { background:var(--n-gold,#9F7251); color:#fff; border-color:var(--n-gold,#9F7251); }
    .sidebar-short-desc { font-size:14px; color:#555; line-height:1.5; }
    .detail-row { display:flex; gap:8px; margin-bottom:6px; font-size:13px; }
    .detail-key { color:#999; white-space:nowrap; min-width:120px; }
    .spot-legal-name { font-size:12px; color:#999; margin-bottom:4px; }
    .spot-public-name { font-size:14px; font-weight:600; color:#444; margin-bottom:4px; }
    .spot-phone-link { display:block; font-size:14px; color:var(--n-green,#3B4D2B); text-decoration:none; margin-bottom:4px; }
    .spot-phone-link:hover { text-decoration:underline; }
    .spot-address-text { font-size:13px; color:#555; margin-bottom:4px; }
    .work-hours-text { font-size:13px; color:#555; margin-bottom:4px; }
    .check-hours-notice { font-size:12px; color:var(--n-orange,#F18F48); font-style:italic; padding:4px 0; }
    .spot-vk-link {
      display:inline-block; padding:6px 14px; background:#4a76a8;
      color:#fff; border-radius:6px; font-size:13px; text-decoration:none;
      margin-bottom:8px; transition:background .2s;
    }
    .spot-vk-link:hover { background:#3b6596; }
    .spot-external-links { list-style:none; padding:0; margin:0; }
    .spot-external-links li { margin-bottom:4px; }
    .spot-external-links a { font-size:13px; color:var(--n-green,#3B4D2B); text-decoration:none; }
    .spot-external-links a:hover { text-decoration:underline; }
    .loyalty-text { font-size:13px; color:var(--n-gold,#9F7251); font-style:italic; line-height:1.5; }

    /* Динамические редакторы в форме */
    .mf-repeatable-row { display:flex; gap:6px; align-items:center; margin-bottom:6px; }
    .mf-repeatable-row .mf-input { flex:1; min-width:0; }
    .mf-repeatable-row-del {
      width:28px; height:28px; border:none; border-radius:6px;
      background:#fde8e8; color:var(--n-maroon,#781E07);
      font-size:14px; cursor:pointer; flex-shrink:0;
      display:flex; align-items:center; justify-content:center;
      transition:background .15s;
    }
    .mf-repeatable-row-del:hover { background:#f8c8c8; }


/* ═══════════════════════════════════════════════════════════════
   CSS — Добавить в существующий <style> блок В КОНЕЦ,
   перед закрывающим </style>
   ═══════════════════════════════════════════════════════════════ */

    /* Мета-бейджи (категория / эпоха / партнёр) */
    .spot-meta-row { display:flex; flex-wrap:wrap; gap:6px; }
    .meta-badge {
      display:inline-block; padding:3px 10px; border-radius:12px;
      font-size:11px; font-weight:600; border:1.5px solid #ccc; color:#555;
    }
    .meta-badge--cat { background:#f0ede6; border-color:#d0ccc0; }
    .meta-badge--era { background:#fefefe; }
    .meta-badge--partner { background:var(--n-gold,#9F7251); color:#fff; border-color:var(--n-gold,#9F7251); }

    /* Краткое описание */
    .sidebar-short-desc { font-size:14px; color:#555; line-height:1.5; }

    /* Строки деталей в категорийных секциях */
    .detail-row { display:flex; gap:8px; margin-bottom:6px; font-size:13px; }
    .detail-key { color:#999; white-space:nowrap; min-width:120px; }

    /* Контакты — расширенная структура */
    .spot-legal-name { font-size:12px; color:#999; margin-bottom:4px; }
    .spot-public-name { font-size:14px; font-weight:600; color:#444; margin-bottom:4px; }
    .spot-phone-link { display:block; font-size:14px; color:var(--n-green,#3B4D2B); text-decoration:none; margin-bottom:4px; }
    .spot-phone-link:hover { text-decoration:underline; }
    .spot-address-text { font-size:13px; color:#555; margin-bottom:4px; }
    .work-hours-text { font-size:13px; color:#555; margin-bottom:4px; }
    .check-hours-notice { font-size:12px; color:var(--n-orange,#F18F48); font-style:italic; padding:4px 0; }

    /* Ссылки */
    .spot-vk-link {
      display:inline-block; padding:6px 14px; background:#4a76a8;
      color:#fff; border-radius:6px; font-size:13px; text-decoration:none;
      margin-bottom:8px; transition:background .2s;
    }
    .spot-vk-link:hover { background:#3b6596; }
    .spot-external-links { list-style:none; padding:0; margin:0; }
    .spot-external-links li { margin-bottom:4px; }
    .spot-external-links a { font-size:13px; color:var(--n-green,#3B4D2B); text-decoration:none; }
    .spot-external-links a:hover { text-decoration:underline; }

    /* Бонусный текст */
    .loyalty-text { font-size:13px; color:var(--n-gold,#9F7251); font-style:italic; line-height:1.5; }

    /* Динамические редакторы в админ-форме (внешние ссылки / советы) */
    .mf-repeatable-row { display:flex; gap:6px; align-items:center; margin-bottom:6px; }
    .mf-repeatable-row .mf-input { flex:1; min-width:0; }
    .mf-repeatable-row-del {
      width:28px; height:28px; border:none; border-radius:6px;
      background:#fde8e8; color:var(--n-maroon,#781E07);
      font-size:14px; cursor:pointer; flex-shrink:0;
      display:flex; align-items:center; justify-content:center;
      transition:background .15s;
    }
    .mf-repeatable-row-del:hover { background:#f8c8c8; }

/* ═══════════════════════════════════════════════
   HOVER-CARD — всплывающая карточка при наведении на метку
   Добавить в <style> блок map.html
   ═══════════════════════════════════════════════ */

.hover-card {
  min-width: 220px;
  max-width: 300px;
  padding: 0;
  font-family: 'Montserrat', sans-serif;
  color: var(--n-text, #223127);
  background: transparent;
  border: none;
}

.hover-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 8px;
}

.hover-card-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .04em;
  line-height: 1.4;
}

.hover-card-badge--cat {
  background: #f0ede6;
  border: 1px solid #d0ccc0;
  color: #555;
}

.hover-card-badge--era {
  background: #fefefe;
  border: 1px solid #ddd;
  color: #777;
}

.hover-card-badge--partner {
  background: var(--n-gold, #9F7251);
  color: #fff;
  border: 1px solid var(--n-gold, #9F7251);
}

.hover-card-title {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--n-text, #223127);
  margin-bottom: 5px;
}

.hover-card-desc {
  font-size: 12px;
  font-weight: 500;
  line-height: 1.5;
  color: #666;
  margin-bottom: 8px;

  /* Обрезка длинного текста */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hover-card-info {
  font-size: 11px;
  font-weight: 500;
  color: #888;
  margin-bottom: 6px;
}

.hover-card-info a {
  color: var(--n-green, #3B4D2B);
  text-decoration: none;
}

.hover-card-info a:hover {
  text-decoration: underline;
}

.hover-card-btn {
  display: inline-block;
  padding: 6px 14px;
  border: none;
  border-radius: 6px;
  background: var(--n-green, #3B4D2B);
  color: #fff;
  font-family: 'Montserrat', sans-serif;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s;
}

.hover-card-btn:hover {
  background: #4a5e36;
}

/* ═══════════════════════════════════════════════════════════════
   HOVER TOOLTIP — всплывающая карточка при наведении на метку
   Добавить в <style> блок map.html
   ═══════════════════════════════════════════════════════════════ */

.hover-tooltip {
  position: fixed;
  z-index: 9000;
  min-width: 240px;
  max-width: 320px;
  padding: 14px 16px;
  background: var(--n-paper, #F6F3E0);
  border: 1px solid rgba(34, 49, 39, .14);
  border-radius: 10px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, .18), 0 2px 6px rgba(0, 0, 0, .08);
  font-family: 'Montserrat', sans-serif;
  color: var(--n-text, #223127);
  pointer-events: none;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .18s ease, transform .18s ease;
  visibility: hidden;
}

.hover-tooltip.active {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
  pointer-events: auto;
}

/* ─── Карточка внутри ─── */

.hover-tooltip .ht-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 8px;
}

.hover-tooltip .ht-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .03em;
  line-height: 1.5;
}

.ht-badge--cat {
  background: #f0ede6;
  border: 1px solid #d0ccc0;
  color: #555;
}

.ht-badge--era {
  background: #fefefe;
  border: 1px solid #ddd;
  color: #777;
}

.ht-badge--partner {
  background: var(--n-gold, #9F7251);
  color: #fff;
  border: 1px solid var(--n-gold, #9F7251);
}

.hover-tooltip .ht-title {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--n-text, #223127);
  margin-bottom: 5px;
}

.hover-tooltip .ht-desc {
  font-size: 12px;
  font-weight: 500;
  line-height: 1.55;
  color: #666;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hover-tooltip .ht-info {
  font-size: 11px;
  font-weight: 500;
  color: #888;
  margin-bottom: 8px;
}

.hover-tooltip .ht-info a {
  color: var(--n-green, #3B4D2B);
  text-decoration: none;
}

.hover-tooltip .ht-btn {
  display: inline-block;
  padding: 6px 14px;
  border: none;
  border-radius: 6px;
  background: var(--n-green, #3B4D2B);
  color: #fff;
  font-family: 'Montserrat', sans-serif;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s;
}

.hover-tooltip .ht-btn:hover {
  background: #4a5e36;
}


/* ═══════════════════════════════════════════════════════════════
   BASE LAYOUT — шапка, подвал, shell
   Палитра: #3B4D2B зелёный, #F6F3E0 бежевый, #781E07 марун,
            #F18F48 оранжевый-акцент, #223127 тёмный текст
   ═══════════════════════════════════════════════════════════════ */

/* ── Shell ── */
.nasledie-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.nasledie-main {
  flex: 1 0 auto;
}

/* ═══════════════════════════════════════════════════════════════
   ШАПКА — тёмно-зелёная
   ═══════════════════════════════════════════════════════════════ */
.n-header {
  background: #3B4D2B;
  border-bottom: 1px solid rgba(0,0,0,.15);
  position: sticky;
  top: 0;
  z-index: 9000;
}
.n-header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

/* Бренд */
.n-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #F6F3E0;
  flex-shrink: 0;
}
.n-brand-logo {
  width: 36px;
  height: 36px;
  object-fit: contain;
  border-radius: 6px;
}
.n-brand-name {
  font: 700 1.1rem/1.2 'Widock Trial', 'Montserrat', sans-serif;
  letter-spacing: .02em;
}
.n-brand-sub {
  font: 400 .68rem/1.3 'Montserrat', sans-serif;
  color: rgba(246,243,224,.55);
  letter-spacing: .04em;
  margin-top: 1px;
}

/* Навигация */
.n-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}
.n-nav-link {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 6px;
  font: 600 .78rem/1 'Montserrat', sans-serif;
  letter-spacing: .03em;
  text-decoration: none;
  color: rgba(246,243,224,.75);
  transition: background .15s, color .15s;
}
.n-nav-link:hover {
  background: rgba(255,255,255,.1);
  color: #F6F3E0;
}
.n-nav-link--active {
  background: rgba(255,255,255,.15);
  color: #fff;
}

/* ═══════════════════════════════════════════════════════════════
   ПОДВАЛ
   ═══════════════════════════════════════════════════════════════ */
.n-footer {
  background: #2e3d22;
  color: #F6F3E0;
  font: 400 .88rem/1.65 'Montserrat', sans-serif;
  margin-top: auto;
}
.n-footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 52px 24px 40px;
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 44px;
}

/* Логотип в подвале */
.n-footer-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}
.n-footer-logo-img {
  width: 34px;
  height: 34px;
  object-fit: contain;
  border-radius: 5px;
  opacity: .9;
}
.n-footer-logo-name {
  font: 700 1.05rem/1.2 'Widock Trial', 'Montserrat', sans-serif;
  color: #F6F3E0;
}
.n-footer-logo-sub {
  font: 400 .68rem/1.3 'Montserrat', sans-serif;
  color: rgba(246,243,224,.6);
}
.n-footer-copy {
  font-size: .78rem;
  color: rgba(246,243,224,.5);
  line-height: 1.5;
}

/* ── Заголовки колонок — марун #781E07, как «Возможности платформы» ── */
.n-footer-heading {
  margin: 0 0 16px;
  font: 700 .72rem/1 'Montserrat', sans-serif;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #F18F48;
}

/* ── Ссылки — светлые, контрастные на тёмном фоне ── */
.n-footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
}
.n-footer-links li {
  margin-bottom: 10px;
}
.n-footer-links a {
  color: rgba(246,243,224,.85);
  text-decoration: none;
  transition: color .15s;
}
.n-footer-links a:hover {
  color: #F6F3E0;
}

/* Нижняя полоса */
.n-footer-bottom {
  max-width: 1280px;
  margin: 0 auto;
  padding: 20px 24px;
  border-top: 1px solid rgba(246,243,224,.1);
  font-size: .76rem;
  color: rgba(246,243,224,.45);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.n-footer-bottom a {
  color: rgba(246,243,224,.5);
  text-decoration: none;
  transition: color .15s;
}
.n-footer-bottom a:hover {
  color: rgba(246,243,224,.8);
}
.n-footer-sep {
  color: rgba(246,243,224,.2);
}

/* ═══════════════════════════════════════════════════════════════
   МОБИЛЬНАЯ АДАПТАЦИЯ
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
  .n-header-inner {
    height: 56px;
    padding: 0 16px;
  }
  .n-brand-sub {
    display: none;
  }
  .n-nav-link {
    padding: 5px 10px;
    font-size: .74rem;
  }

  .n-footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    padding: 40px 16px 32px;
  }
  .n-footer-col--brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 520px) {
  .n-footer-inner {
    grid-template-columns: 1fr;
    gap: 26px;
    padding: 32px 16px 24px;
  }
  .n-nav {
    gap: 2px;
  }
  .n-nav-link {
    padding: 5px 8px;
    font-size: .7rem;
  }
}

/* ═══════════════════════════════════════════════════════════════
   ПАТЧ: Мобильная версия карты — ТОЛЬКО ПРОСМОТР
   
   Вставить В КОНЕЦ nasledie.css
   
   1. Убираем всю админку (фиксация, править, удалить, модалка)
   2. Возвращаем кнопки в левую панель (не FAB внизу справа)
   3. Кнопка ✕ на drawer и на правом сайдбаре
   ═══════════════════════════════════════════════════════════════ */


/* ── Десктоп: правый сайдбар показывается через .open ── */
.map-right-sidebar.open {
  transform: translateX(0) !important;
}

/* ── Кнопка ✕ в левом drawer: скрыта на десктопе ── */
.map-panel-close {
  display: none;
}

/* ── Мобильная шапка правого сайдбара: ручка + ✕ ── */
.mobile-rs-handle {
  display: block;
  width: 40px;
  height: 4px;
  border-radius: 2px;
  background: #ccc;
  flex-shrink: 0;
}

.mobile-rs-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #f0f0f0;
  border: none;
  font-size: 16px;
  cursor: pointer;
  color: #666;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background .15s, color .15s;
  line-height: 1;
}

.mobile-rs-close:hover {
  background: #e0e0e0;
  color: #333;
}


/* ═══════════════════════════════════════════════════════════════
   МОБИЛЬНЫЙ (< 900px)
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 900px) {

  /* ── Левая панель: поверх всего, без оверлея ── */
  .map-left-panel {
    z-index: 25000 !important;
  }

  .map-left-panel.mobile-open::after {
    display: none !important;
  }

  /* ── Бургер поверх всего ── */
  .map-mobile-toggle {
    z-index: 25001 !important;
  }

  /* ── Кнопка ✕ в левом drawer ── */
  .map-panel-close {
    display: flex;
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f0f0f0;
    border: none;
    font-size: 18px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    color: #666;
    z-index: 5;
    transition: background .15s, color .15s;
    line-height: 1;
  }

  .map-panel-close:hover {
    background: #e0e0e0;
    color: #333;
  }

  /* ══════════════════════════════════════════════════════════════
     ВОЗВРАЩАЕМ КНОПКИ В ЛЕВУЮ ПАНЕЛЬ (убираем FAB внизу справа)
     ══════════════════════════════════════════════════════════════ */

  #btnMyLocation {
    position: static !important;
    bottom: auto !important;
    right: auto !important;
    z-index: auto !important;
    width: 100% !important;
    height: auto !important;
    border-radius: 8px !important;
    padding: 10px 14px !important;
    justify-content: flex-start !important;
    background: #fff !important;
    box-shadow: none !important;
    font-size: 13px !important;
  }

  #btnGeoTour {
    position: static !important;
    bottom: auto !important;
    right: auto !important;
    z-index: auto !important;
    width: 100% !important;
    height: auto !important;
    border-radius: 8px !important;
    padding: 10px 14px !important;
    justify-content: flex-start !important;
    background: #fff !important;
    box-shadow: none !important;
    font-size: 13px !important;
  }

  .map-consent-settings {
    position: static !important;
    bottom: auto !important;
    left: auto !important;
    z-index: auto !important;
    box-shadow: none !important;
  }

  /* ══════════════════════════════════════════════════════════════
     АДМИНКА — УБРАТЬ ПОЛНОСТЬЮ
     ══════════════════════════════════════════════════════════════ */

  #btnFixate {
    display: none !important;
  }

  .sa-btn-edit,
  .sa-btn-delete,
  #saEdit,
  #saDelete {
    display: none !important;
  }

  .map-modal-overlay {
    display: none !important;
  }

  /* ── Мобильная шапка правого сайдбара ── */
  .map-mobile-close-rs {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 5;
    background: #f6f6f3;
    border-bottom: 1px solid #eee;
    width: 100%;
    height: 44px;
    border-radius: 20px 20px 0 0;
    padding: 0 16px;
    box-sizing: border-box;
  }

  .map-mobile-close-rs::after {
    display: none !important;
  }

  .sidebar-close {
    display: none !important;
  }

  .map-right-sidebar.open {
    transform: translateX(0) !important;
  }
}



/* ============================================================
   ПАТЧ v2: Временные рамки + эпохи + статус
   Безопасный: не ломает существующую вёрстку.
   Заменить предыдущий nasledie_timeline_patch.css
   ============================================================ */

/* ── 1. Панель эпох — подписи диапазонов ── */

.era-layer-hint {
  margin: 0 0 10px;
  font: 500 .72rem/1.45 'Montserrat', sans-serif;
  color: #6b6b6b;
}

.era-checkbox-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.era-checkbox-name {
  font: 600 .82rem/1.3 'Montserrat', sans-serif;
  color: var(--n-text, #223127);
}

.era-checkbox-range {
  font: 500 .68rem/1.2 'Montserrat', sans-serif;
  color: #888;
  letter-spacing: .02em;
}

/*
 * ВАЖНО: НЕ меняем .era-checkbox глобально!
 * align-items: flex-start применяем ТОЛЬКО если внутри
 * есть .era-checkbox-text (новая структура).
 */
.era-checkbox:has(.era-checkbox-text) {
  align-items: flex-start;
}

.era-checkbox:has(.era-checkbox-text) > input[type="checkbox"] {
  margin-top: 3px;
}

.era-checkbox:has(.era-checkbox-text) > .era-dot {
  margin-top: 4px;
}

/* ── 2. Мульти-бейджи эпох ── */

.ht-badge--era-multi,
.meta-badge--era-multi {
  display: inline-flex;
  gap: 4px;
  align-items: center;
}

.ht-badge--era-multi .era-mini-dot,
.meta-badge--era-multi .era-mini-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
}

/* ── 3. Временной период (rsTimeline) ── */

.timeline-display {
  font: 500 .85rem/1.5 'Montserrat', sans-serif;
  color: var(--n-text, #223127);
  padding: 4px 0;
}

.timeline-display .timeline-from,
.timeline-display .timeline-to {
  font-weight: 700;
  color: var(--n-maroon, #781E07);
}

.timeline-display .timeline-separator {
  color: #888;
  margin: 0 6px;
}

/* ── 4. Статус разрушения (rsDestructionStatus) ── */

.destruction-status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 7px;
  background: rgba(120, 30, 7, .06);
  border: 1px solid rgba(120, 30, 7, .12);
  font: 600 .82rem/1.4 'Montserrat', sans-serif;
  color: var(--n-maroon, #781E07);
}

.destruction-status .status-icon {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

/* ── 5. Hover tooltip — исправленный мостик ── */

.hover-tooltip::after {
  content: '';
  position: absolute;
  left: -10px;
  right: -10px;
  bottom: -80px;
  height: 80px;
  background: transparent;
  pointer-events: auto;
}

/* ── 6. Секция «Временные рамки» в админ-модалке ──
 *    НЕ используем border-left — он ломает flex-layout.
 *    Вместо этого — верхняя полоса-акцент через ::before.
 */

.mf-section--timeline {
  position: relative;
}

.mf-section--timeline::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 40px;
  height: 3px;
  background: var(--n-gold, #9F7251);
  border-radius: 2px;
}

.mf-input--precision {
  margin-bottom: 6px;
  font-size: .78rem;
}

.mf-input--timeline {
  margin-top: 4px;
}

/* Чекбокс статуса — НЕ перекрываем .mf-check-option,
 * а только добавляем визуальное выделение. */
.mf-check-option--status {
  padding: 10px 12px;
  margin-bottom: 8px;
  border: 1px solid rgba(120, 30, 7, .14);
  border-radius: 7px;
  background: rgba(255, 255, 255, .35);
}

.mf-sub-field {
  margin-top: 8px;
  padding-left: 26px;
}

.mf-event-dates-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.mf-event-date-label {
  display: block;
  margin-bottom: 4px;
  font: 600 .74rem/1.3 'Montserrat', sans-serif;
  color: var(--n-text, #223127);
}

/* ── 7. Мобильная адаптация ── */

@media (max-width: 768px) {
  .era-layer-hint {
    font-size: .68rem;
    margin-bottom: 8px;
  }

  .era-checkbox-name {
    font-size: .78rem;
  }

  .era-checkbox-range {
    font-size: .64rem;
  }

  .timeline-display {
    font-size: .82rem;
  }

  .destruction-status {
    font-size: .78rem;
    padding: 8px 10px;
  }

  .mf-event-dates-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 420px) {
  .era-checkbox-name {
    font-size: .74rem;
  }

  .era-checkbox-range {
    font-size: .6rem;
  }

  .timeline-display {
    font-size: .78rem;
  }

  .destruction-status {
    font-size: .74rem;
  }
}
