.atlas-filters #atlas-chapter {
    min-width: 110px;
}

.atlas-filters .is-disabled {
    opacity: .55;
}

#atlas-map {
    width: 100%;
    height: 640px;
    border: 1px solid #dee2e6;
    z-index: 1;
}

.atlas-note {
    margin-top: 10px;
    color: #6c757d;
    font-size: 12px;
}

.atlas-popup-title {
    font-size: 17px;
    font-weight: 600;
    line-height: 1.25;
}

.atlas-popup-en,
.atlas-popup-type,
.atlas-popup-meta,
.atlas-popup-coords {
    margin-top: 3px;
    color: #6c757d;
    font-size: 13px;
}

.atlas-popup-refs {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 9px;
    margin-top: 9px;
}

.atlas-popup-refs a {
    color: #006ecc;
    text-decoration: none;
    white-space: nowrap;
}

.atlas-popup-more {
    color: #6c757d;
}

.atlas-popup-coords {
    margin-top: 9px;
}

.atlas-mobile-card {
    display: none;
}

.atlas-location-icon-wrap {
    background: transparent;
    border: 0;
}

.atlas-location-icon {
    display: block;
    width: 14px;
    height: 14px;
    margin: 2px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: #006ecc;
    box-shadow: 0 0 0 2px rgba(0, 110, 204, .22);
}

.atlas-location-icon-wrap:hover .atlas-location-icon,
.atlas-location-icon.is-active {
    background: #006ecc;
    border-color: #fff;
    box-shadow: 0 0 0 2px #f90;
}

.marker-cluster-small,
.marker-cluster-medium,
.marker-cluster-large {
    background: rgba(0, 110, 204, .18);
}

.marker-cluster-small div,
.marker-cluster-medium div,
.marker-cluster-large div {
    background: #006ecc;
    color: #fff;
}

.atlas-head {
    display: block;
}

.atlas-filters {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 14px;
}

.atlas-filters label {
    min-width: 0;
}

.atlas-filters select,
.atlas-filters #atlas-chapter,
.atlas-filters .atlas-search-select,
.atlas-filters .atlas-search-trigger {
    width: 100%;
    min-width: 0;
}

.atlas-resource-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 1200px) {
    .atlas-head {
        display: flex;
        align-items: flex-end;
        justify-content: space-between;
        gap: 24px;
    }

    .atlas-filters {
        flex: 1 1 auto;
        grid-template-columns: 120px minmax(190px, 1fr) 110px minmax(220px, 1fr);
        margin-top: 0;
    }

    .atlas-resource-filters {
        flex: 0 1 auto;
        grid-template-columns: repeat(2, minmax(180px, 1fr));
    }
}

@media (max-width: 575.98px) {
    .atlas-filters,
    .atlas-resource-filters {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767.98px) {
    .atlas-head h1 {
        font-size: 26px;
    }

    .atlas-filters select,
    .atlas-filters #atlas-chapter,
    .atlas-search-trigger,
    .atlas-search-input {
        font-size: 16px;
    }

    #atlas-map {
        height: 480px;
    }

    .atlas-mobile-card {
        display: block;
        margin-top: 10px;
        padding: 12px 14px;
        border: 1px solid #dee2e6;
        background: #fff;
    }

    .atlas-mobile-card[hidden] {
        display: none;
    }

    .leaflet-popup {
        display: none;
    }
}

/* Подпись одиночной location: видна только когда markercluster показывает сам маркер. */
.atlas-location-label {
    padding: 1px 4px;
    background: rgba(255, 255, 255, .88);
    border: 0;
    box-shadow: none;
    color: #2d3439;
    font-family: Roboto, Arial, sans-serif;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.2;
    white-space: nowrap;
}

.atlas-location-label::before {
    display: none;
}

/* Русские географические ориентиры. */
.atlas-geo-label-wrap {
    background: transparent;
    border: 0;
}

.atlas-geo-label {
    position: absolute;
    transform: translate(-50%, -50%);
    white-space: nowrap;
    pointer-events: none;
    text-shadow:
        -1px -1px 0 rgba(255,255,255,.94),
         1px -1px 0 rgba(255,255,255,.94),
        -1px  1px 0 rgba(255,255,255,.94),
         1px  1px 0 rgba(255,255,255,.94);
}

.atlas-geo-label.region.major {
    color: #777;
    font-family: Roboto, Arial, sans-serif;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: .16em;
}

.atlas-geo-label.region.local {
    color: #888;
    font-family: Roboto, Arial, sans-serif;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: .12em;
}

.atlas-geo-label.water {
    color: #2f73a8;
    font-family: Roboto, Arial, sans-serif;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: .08em;
}

.atlas-geo-label.water.local {
    font-size: 12px;
}

.atlas-geo-label.city {
    color: #666;
    font-family: Roboto, Arial, sans-serif;
    font-size: 14px;
    font-weight: 600;
}

@media (max-width: 767.98px) {
    .atlas-location-label {
        font-size: 11px;
    }

    .atlas-geo-label.region.major {
        font-size: 13px;
    }

    .atlas-geo-label.region.local,
    .atlas-geo-label.water {
        font-size: 12px;
    }

    .atlas-geo-label.city {
        font-size: 11px;
    }
}

/* С ростом масштаба ориентиры остаются, но уходят в фон. */
#atlas-map .leaflet-atlasGeoLabels-pane {
    transition: opacity .15s ease;
}

#atlas-map .leaflet-atlasGeoLabels-pane.atlas-geo-normal {
    opacity: 1;
}

#atlas-map .leaflet-atlasGeoLabels-pane.atlas-geo-muted {
    opacity: .70;
}

#atlas-map .leaflet-atlasGeoLabels-pane.atlas-geo-faint {
    opacity: .40;
}

/* Свой searchable select для книги и места. */
.atlas-native-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.atlas-search-select {
    position: relative;
    width: 100%;
    min-width: 0;
}

.atlas-search-trigger {
    position: relative;
    width: 100%;
    min-width: 0;
    overflow: hidden;
    padding-right: 32px;
    text-align: left;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: pointer;
}

.atlas-search-trigger::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 11px;
    width: 0;
    height: 0;
    margin-top: -2px;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid #6c757d;
}

.atlas-search-panel {
    position: absolute;
    z-index: 1100;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    width: auto;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
    padding: 7px;
    border: 1px solid #ced4da;
    background: #fff;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .12);
}

.atlas-search-input {
    width: 100%;
}

.atlas-search-options {
    max-height: 280px;
    margin-top: 6px;
    overflow-y: auto;
}

.atlas-search-option {
    display: block;
    width: 100%;
    box-sizing: border-box;
    white-space: normal;
    overflow-wrap: anywhere;
    padding: 7px 8px;
    border: 0;
    background: transparent;
    color: #212529;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.atlas-search-option:hover,
.atlas-search-option.is-selected {
    background: #f1f3f5;
}

.atlas-search-option.is-selected {
    font-weight: 500;
}

.atlas-search-empty {
    padding: 9px 8px;
    color: #6c757d;
    font-size: 14px;
}

@media (max-width: 767.98px) {
    .atlas-search-trigger,
    .atlas-search-input,
    .atlas-search-option {
        font-size: 16px;
    }

    .atlas-search-panel {
        left: 0;
        right: 0;
        width: auto;
        max-width: 100%;
    }
}

.atlas-title-link {
    color: inherit;
    text-decoration: none;
}

.atlas-title-link:hover,
.atlas-title-link:focus {
    color: inherit;
    text-decoration: none;
}

/* Карта + универсальная рабочая панель Атласа. */
.atlas-workspace {
    min-width: 0;
}

.atlas-workspace #atlas-map {
    flex: 1 1 auto;
    min-width: 0;
}

.atlas-side-panel {
    flex: 0 0 390px;
    width: 390px;
    height: 640px;
    overflow-y: auto;
    box-sizing: border-box;
    padding: 18px 20px;
    border: 1px solid #dee2e6;
    border-left: 0;
    background: #fff;
}

.atlas-side-panel[hidden] {
    display: none;
}

.atlas-side-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.atlas-side-title {
    font-size: 22px;
    font-weight: 600;
    line-height: 1.2;
}

.atlas-side-en,
.atlas-side-type,
.atlas-side-meta {
    margin-top: 4px;
    color: #6c757d;
    font-size: 13px;
}

.atlas-side-close {
    flex: 0 0 auto;
    padding: 0 3px;
    border: 0;
    background: transparent;
    color: #6c757d;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

.atlas-side-section {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #e9ecef;
}

.atlas-side-section-title {
    margin-bottom: 9px;
    font-weight: 600;
}

.atlas-side-refs {
    display: block;
    line-height: 1.65;
}

.atlas-side-ref-sep {
    margin-right: .3em;
}

.atlas-side-ref {
    color: #006ecc;
    text-decoration: none;
    white-space: nowrap;
}

.atlas-side-ref.active {
    color: #212529;
    font-weight: 600;
    text-decoration: none;
}

.atlas-verse-preview {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid #e9ecef;
}

.atlas-verse-preview[hidden] {
    display: none;
}

@media (max-width: 767.98px) {
    .atlas-workspace {
        display: block;
    }

    .atlas-workspace #atlas-map {
        height: 520px;
    }

    .atlas-workspace:has(.atlas-side-panel:not([hidden])) #atlas-map {
        height: 280px;
    }

    .atlas-side-panel {
        width: 100%;
        height: 280px;
        max-height: 280px;
        margin-top: 0;
        overflow-y: auto;
        padding: 14px;
        border: 1px solid #dee2e6;
        border-top: 0;
    }

    .atlas-side-title {
        font-size: 20px;
    }

    .atlas-mobile-card {
        display: none !important;
    }
}

.atlas-panel-top-wrap {
    margin-top: 14px;
}

.atlas-panel-top-wrap[hidden] {
    display: none;
}

.atlas-panel-top {
    color: #006ecc;
    text-decoration: none;
}

.atlas-side-strong {
    margin-top: 6px;
    font-size: 13px;
}

.atlas-side-strong-label {
    color: #6c757d;
}

.atlas-side-strong a {
    color: #006ecc;
    text-decoration: none;
}

/* Атрибуция карты: весь текст и ссылки визуально одинаковые. */
.leaflet-control-attribution,
.leaflet-control-attribution a,
.leaflet-control-attribution a:visited,
.leaflet-control-attribution a:hover,
.leaflet-control-attribution a:focus {
    color: #777 !important;
}

.leaflet-control-attribution a,
.leaflet-control-attribution a:visited,
.leaflet-control-attribution a:hover,
.leaflet-control-attribution a:focus {
    text-decoration: none !important;
}

/* Не даём браузеру самому дёргать внутренний скролл панели при вставке цитаты. */
.atlas-side-panel {
    overflow-anchor: none;
}

/* Если тайл задержался, карта не проваливается в серый фон. */
.leaflet-container {
    background: #fbfaf7;
}

.atlas-resource-filters select {
    min-width: 280px;
}


@media (max-width: 767.98px) {

    .atlas-resource-filters {
        width: 100%;
    }

    .atlas-resource-filters label {
        width: 100%;
    }

    .atlas-resource-filters select {
        width: 100%;
        min-width: 0;
    }
}

/* Режимы Пути / Жизнь / События / Схемы — постоянная панель навигации. */
.atlas-side-panel.atlas-story-panel {
    display: block;
    overflow: hidden;
    padding: 0;
    background: #fff;
}

.atlas-story-panel #atlas-side-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
}

.atlas-story-list-wrap {
    flex: 0 0 48%;
    min-height: 0;
    display: flex;
    flex-direction: column;
    border-bottom: 1px solid #dee2e6;
}

.atlas-story-panel-head {
    flex: 0 0 auto;
    padding: 16px 18px 12px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.atlas-story-panel-title {
    font-size: 20px;
    font-weight: 600;
    line-height: 1.25;
}

.atlas-story-timeline-summary {
    margin-top: 5px;
    color: #6c757d;
    font-size: 12px;
    line-height: 1.35;
}

.atlas-story-list {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 8px 0;
}

.atlas-story-group {
    padding: 9px 16px 5px;
    color: #6c757d;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .02em;
}

.atlas-story-stop {
    position: relative;
    display: flex;
    width: 100%;
    gap: 10px;
    align-items: flex-start;
    padding: 9px 16px;
    border: 0;
    border-left: 3px solid transparent;
    background: transparent;
    color: #212529;
    text-align: left;
    cursor: pointer;
}

.atlas-story-stop:hover {
    background: #f8f9fa;
}

.atlas-story-stop.active {
    border-left-color: #f90;
    background: #fff8ee;
}

.atlas-story-stop-num {
    flex: 0 0 24px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #006ecc;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    line-height: 24px;
    text-align: center;
}

.atlas-story-stop-body {
    min-width: 0;
    display: block;
}

.atlas-story-stop-title,
.atlas-story-stop-place,
.atlas-story-stop-ref {
    display: block;
}

.atlas-story-stop-title {
    font-weight: 600;
    line-height: 1.3;
}

.atlas-story-stop-place {
    margin-top: 2px;
    color: #6c757d;
    font-size: 13px;
}

.atlas-story-stop-ref {
    margin-top: 2px;
    color: #6c757d;
    font-size: 12px;
}

.atlas-story-detail {
    flex: 1 1 52%;
    min-height: 0;
    overflow-y: auto;
    padding: 16px 18px 18px;
    overflow-anchor: none;
}

.atlas-story-detail-title {
    font-size: 19px;
    font-weight: 600;
    line-height: 1.25;
}

.atlas-story-detail-place,
.atlas-story-detail-category {
    margin-top: 3px;
    color: #6c757d;
    font-size: 13px;
}

.atlas-story-description {
    margin-top: 14px;
    line-height: 1.5;
}

.atlas-story-map-label-wrap {
    background: transparent !important;
    border: 0 !important;
}

.atlas-story-map-label {
    display: inline-block;
    padding: 1px 4px;
    background: rgba(255, 255, 255, .88);
    color: #343a40;
    font-size: 12px;
    line-height: 1.25;
    white-space: nowrap;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, .04);
}

.atlas-story-empty {
    padding: 18px;
    color: #6c757d;
}

@media (max-width: 767.98px) {
    .atlas-side-panel.atlas-story-panel {
        height: 380px;
        max-height: 380px;
    }

    .atlas-story-list-wrap {
        flex-basis: 48%;
    }

    .atlas-story-panel-head {
        padding: 12px 14px 9px;
    }

    .atlas-story-panel-title {
        font-size: 18px;
    }

    .atlas-story-stop {
        padding: 8px 12px;
    }

    .atlas-story-detail {
        padding: 12px 14px 14px;
    }
}


/* Подписи ключевых точек. */
.atlas-story-map-label.active {
    font-weight: 600;
}

.atlas-read-full {
    margin-top: 12px;
}

.atlas-read-full a {
    color: #006ecc;
    text-decoration: none;
}

/* Полноэкранный режим карты + рабочей панели. */
.atlas-fullscreen-control a {
    font-size: 20px;
    line-height: 30px;
    text-align: center;
    text-decoration: none;
}

.atlas-fullscreen-control a:hover,
.atlas-fullscreen-control a:focus {
    text-decoration: none;
}

body.atlas-fullscreen-open {
    overflow: hidden;
}

.atlas-workspace.is-fullscreen {
    position: fixed;
    inset: 0;
    z-index: 1040;
    display: flex !important;
    width: 100vw !important;
    height: 100vh !important;
    background: #fff;
}

.atlas-workspace.is-fullscreen #atlas-map {
    height: 100vh !important;
    border-radius: 0;
}

.atlas-workspace.is-fullscreen .atlas-side-panel {
    height: 100vh !important;
    max-height: none !important;
    border-top: 0;
    border-right: 0;
    border-bottom: 0;
}

/* Справочная информация о местах. */
.atlas-side-description {
    margin-top: 16px;
    line-height: 1.5;
}

.atlas-side-description-sep {
    height: 8px;
}

.atlas-side-modern,
.atlas-side-dictionaries {
    margin-top: 8px;
    font-size: 13px;
}

.atlas-side-modern-label,
.atlas-side-dictionaries-label {
    color: #6c757d;
}

.atlas-side-dictionaries a {
    color: #006ecc;
    text-decoration: none;
}

.atlas-side-dictionary-sep {
    color: #adb5bd;
}

.atlas-popup-modern {
    margin-top: 5px;
    color: #495057;
    font-size: 13px;
}

.atlas-popup-modern span {
    color: #6c757d;
}

.atlas-popup-description {
    margin-top: 8px;
    color: #343a40;
    font-size: 13px;
    line-height: 1.4;
}

