:root {
    --sidebar-width: 340px;
    --sidebar-collapsed-width: 22px;
    --sidebar-mobile-width: min(88vw, 360px);
    --sidebar-mobile-peek-width: min(74vw, 320px);
    --sidebar-toggle-size: 34px;
    --sidebar-transition: 220ms ease;
    --border-color: #d8d8d8;
    --text-color: #1f2937;
    --muted-color: #6b7280;
    --bg-soft: #f8fafc;
}

/* Base */
* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    height: 100%;
    overflow: hidden;
    font-family: Arial, sans-serif;
    color: var(--text-color);
}

body {
    background: #fff;
}

/* App layout */
.app-shell {
    position: relative;
    display: flex;
    height: 100vh;
    width: 100%;
    overflow: hidden;
}

.sidebar {
    position: relative;
    z-index: 40;
    width: var(--sidebar-width);
    min-width: var(--sidebar-width);
    max-width: var(--sidebar-width);
    height: 103vh;
    padding: 18px;
    overflow-y: auto;
    overflow-x: hidden;
    border-right: 1px solid var(--border-color);
    background: #fff;
    transition:
        width var(--sidebar-transition),
        min-width var(--sidebar-transition),
        max-width var(--sidebar-transition),
        transform var(--sidebar-transition),
        box-shadow var(--sidebar-transition);
    will-change: width, transform;
}

.map-layout {
    position: relative;
    flex: 1;
    min-width: 0;
    height: 100vh;
    overflow: hidden;
}

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



.compare-loading-overlay {
    position: absolute;
    inset: 0;
    z-index: 12;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(15, 23, 42, 0.18);
    backdrop-filter: blur(1.5px);
    pointer-events: all;
}


.compare-loading-overlay[hidden] {
    display: none !important;
}
.compare-loading-overlay__card {
    min-width: 260px;
    max-width: 360px;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid rgba(203, 213, 225, 0.95);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.22);
    display: grid;
    gap: 8px;
    justify-items: center;
    text-align: center;
}

.compare-loading-overlay__spinner {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    border: 3px solid rgba(148, 163, 184, 0.35);
    border-top-color: #3b82f6;
    animation: compare-loading-spin 0.9s linear infinite;
}

.compare-loading-overlay__title {
    color: #243b53;
    font-size: 14px;
    font-weight: 700;
}

.compare-loading-overlay__text {
    color: #486581;
    font-size: 13px;
    line-height: 1.35;
}

@keyframes compare-loading-spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.compare-map-stack {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

.compare-map-ui {
    position: absolute;
    inset: 0;
    z-index: 7;
    pointer-events: none;
}

.compare-map-stack__map {
    position: absolute;
    inset: 0;
}

.compare-map-stack__map .maplibregl-map,
.compare-map-stack__map .maplibregl-canvas-container,
.compare-map-stack__map .maplibregl-canvas {
    width: 100% !important;
    height: 100% !important;
}

#map {
    position: relative;
    z-index: 4;
}

.compare-slider {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 0;
    z-index: 6;
    pointer-events: none;
}

.compare-slider__divider {
    position: absolute;
    top: 0;
    bottom: 0;
    left: -1px;
    width: 2px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.18), 0 0 14px rgba(15, 23, 42, 0.18);
}

.compare-slider__handle {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translate(-50%, -50%);
    width: 34px;
    height: 34px;
    border: 1px solid rgba(148, 163, 184, 0.85);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.96);
    color: #334155;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.22);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    cursor: ew-resize;
    pointer-events: auto;
}

.compare-basemap-label {
    position: absolute;
    top: 12px;
    z-index: 6;
    padding: 4px 8px;
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.68);
    color: #fff;
    font-size: 12px;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    pointer-events: none;
}

.compare-config {
    display: grid;
    gap: 10px;
}

.compare-config__field {
    display: grid;
    gap: 6px;
}

.compare-config__label,
.compare-config__summary,
.compare-config__status {
    color: #35506f;
    font-size: 13px;
}

.compare-config__label {
    font-weight: 600;
}

.compare-config__status {
    font-weight: 700;
}

.compare-config__checkbox-row {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #35506f;
    font-size: 13px;
}

.compare-config__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.compare-config__button {
    padding: 7px 12px;
    border: 1px solid #c9d7e6;
    border-radius: 10px;
    background: #fff;
    color: #35506f;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.compare-config__button--primary {
    background: #e8f1fe;
    border-color: #9fbfe6;
    color: #1d4ed8;
}

.compare-config__button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.panel-item--basemap .form-control[disabled] {
    background: #f3f7fb;
    color: #7b8da1;
    cursor: not-allowed;
}

@media (min-width: 769px) {
    .maplibregl-ctrl-top-right {
        top: 12px;
        right: 12px;
        display: flex;
        flex-direction: column;
        align-items: flex-end;
    }

    .maplibregl-ctrl-top-right .maplibregl-ctrl {
        float: none;
    }

    .maplibregl-ctrl-top-right .maplibregl-ctrl-attrib {
        order: 1;
        margin: 0 0 8px 0;
    }

    .maplibregl-ctrl-top-right .maplibregl-ctrl-group {
        order: 2;
        margin: 0;
    }

    .maplibregl-ctrl-top-right .maplibregl-ctrl-group.map-reset-view-ctrl {
        order: 3;
        margin: 6px 0 0 0;
    }
}

.map-reset-view-ctrl {
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.14);
}

.map-reset-view-button {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.map-reset-view-button svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

/* Sidebar structure */
.sidebar__header {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
}

.sidebar__header h1 {
    margin: 0;
    min-width: 0;
}

.sidebar h1 {
    margin: 0 0 2px 0;
    font-size: 22px;
}

.sidebar h2 {
    margin: 0 0 10px 0;
    font-size: 16px;
}

.sidebar__section {
    margin-bottom: 17px;
    padding-bottom: 13px;
    border-bottom: 1px solid #ececec;
}

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

.sidebar__tabs {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 18px;
}

.sidebar__tab-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 54px;
    padding: 10px 8px;
    border: 1px solid #d6deea;
    border-radius: 12px;
    background: #fff;
    color: #274c77;
    cursor: pointer;
    user-select: none;
    transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.sidebar__tab-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    line-height: 1;
    flex: 0 0 auto;
}

.sidebar__tab-icon svg,
.sidebar__tab-icon img {
    width: 100%;
    height: 100%;
    display: block;
}

.sidebar__tab-icon img {
    object-fit: contain;
}

.sidebar__tab-label {
    display: none;
}

.sidebar__tab-button:hover,
.sidebar__tab-button:focus-visible {
    border-color: #7aa6d1;
    background: linear-gradient(180deg, #ffffff 0%, #e4f0fb 100%);
    color: #1d4f91;
    box-shadow: 0 3px 10px rgba(37, 99, 235, 0.14);
    outline: none;
    transform: translateY(-1px);
}

.sidebar__tab-button.is-active {
    border-color: #9fb7d6;
    background: #edf5ff;
    color: #163d66;
    box-shadow: inset 0 0 0 1px rgba(22, 61, 102, 0.05);
}

.sidebar__tab-button.is-active:hover,
.sidebar__tab-button.is-active:focus-visible {
    border-color: #5b8fc5;
    background: linear-gradient(180deg, #f8fbff 0%, #dbeafe 100%);
    color: #163d66;
    box-shadow: inset 0 0 0 1px rgba(22, 61, 102, 0.07), 0 3px 10px rgba(37, 99, 235, 0.14);
}

.sidebar__panel-section {
    min-width: 0;
}

.sidebar__panel-section:not(.is-active) {
    display: none;
}

.sidebar__placeholder-results,
.sidebar__placeholder-list,
.sidebar-search-results {
    min-height: 120px;
    margin-top: 12px;
    border: 1px dashed #d6deea;
    border-radius: 10px;
    background: #fbfdff;
}

.sidebar__placeholder-copy {
    margin-bottom: 12px;
}

.sidebar__tools-list {
    display: grid;
    gap: 10px;
}

.sidebar__tool-item {
    width: 100%;
    padding: 10px 12px;
    border: 1px dashed #cfd8e3;
    border-radius: 10px;
    background: #f8fafc;
    color: #6b7280;
    font-size: 14px;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.sidebar__tool-item:hover:not(:disabled) {
    background: #f1f7ff;
    border-color: #9ec5fe;
    color: #1d4f91;
}

.sidebar__tool-item.is-active {
    background: #eaf3ff;
    border-color: #3b82f6;
    color: #11478a;
    box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.16);
}

.sidebar__tool-item:disabled {
    opacity: 1;
    cursor: not-allowed;
}

.sidebar__tool-status {
    min-height: 20px;
    margin: 10px 2px 0;
    color: #1d4f91;
    font-size: 13px;
    line-height: 1.4;
}

.sidebar__intro,
.sidebar p,
.sidebar li,
.legend div {
    font-size: 14px;
    line-height: 1.45;
}

.sidebar__list {
    margin: 0;
    padding-left: 18px;
}

.form-control {
    width: 100%;
    padding: 9px 10px;
    border: 1px solid #cfd8e3;
    border-radius: 8px;
    font-size: 14px;
    background: #fff;
}

.muted {
    margin-top: 8px;
    color: var(--muted-color);
    font-size: 13px;
}


.section-heading {
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-info-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    padding: 0;
    border-radius: 999px;
    border: 1px solid #bfccda;
    color: #35506f;
    background: linear-gradient(180deg, #ffffff 0%, #eef5fb 100%);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    user-select: none;
    flex: 0 0 auto;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.section-info-button:hover,
.section-info-button:focus-visible {
    border-color: #7aa6d1;
    background: linear-gradient(180deg, #ffffff 0%, #e4f0fb 100%);
    box-shadow: 0 3px 10px rgba(37, 99, 235, 0.14);
    outline: none;
    transform: translateY(-1px);
}

.section-info-button[aria-expanded='true'] {
    border-color: #5b8fc5;
    background: linear-gradient(180deg, #eff6ff 0%, #dbeafe 100%);
    color: #1d4ed8;
}

.section-info-tooltip {
    position: fixed;
    z-index: 1000;
    max-width: min(260px, calc(100vw - 16px));
    padding: 12px 14px;
    border: 1px solid #d6deea;
    border-radius: 14px;
    background: #ffffff;
    color: #35506f;
    font-size: 14px;
    line-height: 1.4;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.16);
}

.section-info-tooltip::before {
    content: '';
    position: absolute;
    left: 18px;
    width: 12px;
    height: 12px;
    background: #ffffff;
    border-left: 1px solid #d6deea;
    border-top: 1px solid #d6deea;
    transform: rotate(45deg);
}

.section-info-tooltip[data-position='bottom']::before {
    top: -7px;
}

.section-info-tooltip[data-position='top']::before {
    bottom: -7px;
    transform: rotate(225deg);
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 8px 0;
    font-size: 14px;
    cursor: pointer;
}

.checkbox-row input[type="checkbox"] {
    margin: 0;
}

.checkbox-row__label {
    flex: 1 1 auto;
}

.checkbox-row__info {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    padding: 0;
    border-radius: 999px;
    border: 1px solid #bfccda;
    color: #35506f;
    background: linear-gradient(180deg, #ffffff 0%, #eef5fb 100%);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    user-select: none;
    flex: 0 0 auto;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.checkbox-row__info:hover,
.checkbox-row__info:focus-visible {
    border-color: #7aa6d1;
    background: linear-gradient(180deg, #ffffff 0%, #e4f0fb 100%);
    box-shadow: 0 3px 10px rgba(37, 99, 235, 0.14);
    outline: none;
    transform: translateY(-1px);
}

.checkbox-row__info[aria-expanded='true'] {
    border-color: #5b8fc5;
    background: linear-gradient(180deg, #eff6ff 0%, #dbeafe 100%);
    color: #1d4ed8;
}

.panel-item + .panel-item {
    margin-top: 0;
}

.panel-item__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.panel-item__header .checkbox-row {
    flex: 1 1 auto;
    min-width: 0;
    margin: 8px 0;
}

.panel-item__actions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
}

.item-action-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    padding: 0;
    border-radius: 999px;
    border: 1px solid #bfccda;
    color: #35506f;
    background: linear-gradient(180deg, #ffffff 0%, #eef5fb 100%);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
    font-size: 13px;
    line-height: 1;
    cursor: pointer;
    user-select: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}


.item-action-button svg {
    width: 14px;
    height: 14px;
    display: block;
    fill: currentColor;
    pointer-events: none;
}


.item-action-button--filter {
    position: relative;
}

.item-action-button__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    pointer-events: none;
}

.item-action-button__badge {
    position: absolute;
    top: 0px;
    right: 0px;
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: #2563eb;
    border: 1.5px solid #ffffff;
    box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.18);
    pointer-events: none;
}

.item-action-button--active-filter {
    border-color: #8bb6ea;
    background: linear-gradient(180deg, #ffffff 0%, #e8f1fe 100%);
    color: #1d4ed8;
}

.item-action-button--active-filter:hover,
.item-action-button--active-filter:focus-visible,
.item-action-button--active-filter[aria-expanded='true'] {
    border-color: #5b8fc5;
    background: linear-gradient(180deg, #eff6ff 0%, #dbeafe 100%);
    color: #1d4ed8;
}


.item-action-button:hover,
.item-action-button:focus-visible {
    border-color: #7aa6d1;
    background: linear-gradient(180deg, #ffffff 0%, #e4f0fb 100%);
    box-shadow: 0 3px 10px rgba(37, 99, 235, 0.14);
    outline: none;
    transform: translateY(-1px);
}

.item-action-button[aria-expanded='true'] {
    border-color: #5b8fc5;
    background: linear-gradient(180deg, #eff6ff 0%, #dbeafe 100%);
    color: #1d4ed8;
}

.item-action-detail {
    box-sizing: border-box;
    width: 100%;
    margin: 8px 0 10px;
    padding: 10px 12px;
    border: 1px solid #e5edf6;
    border-radius: 10px;
    background: #f8fbff;
}

.item-action-detail__title {
    margin-bottom: 10px;
    color: #35506f;
    font-size: 13px;
    font-weight: 700;
}

.item-action-detail__text {
    margin: 0;
    color: #35506f;
    font-size: 13px;
    line-height: 1.45;
}

.overlay-opacity {
    display: grid;
    gap: 8px;
}

.overlay-opacity__label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: #35506f;
    font-size: 13px;
    font-weight: 600;
}

.overlay-opacity__value {
    color: #5b708a;
    font-size: 13px;
    font-weight: 600;
}

.overlay-opacity__slider {
    width: 100%;
    margin: 0;
    accent-color: #3b82f6;
    touch-action: pan-y;
}

/* Sidebar collapse controls */
.sidebar__collapse-button {
    position: relative;
    flex: 0 0 auto;
    width: var(--sidebar-toggle-size);
    height: var(--sidebar-toggle-size);
    border: 1px solid #d6deea;
    border-radius: 999px;
    background: #fff;
    color: #274c77;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.sidebar__collapse-chevron,
.sidebar-rail-toggle__chevron {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(135deg);
    transition: transform var(--sidebar-transition);
}

.sidebar-rail-toggle {
    position: absolute;
    top: 12px;
    left: calc(var(--sidebar-width) - 17px);
    z-index: 45;
    display: none;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 52px;
    padding: 0;
    border: 1px solid #d6deea;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.96);
    color: #274c77;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.12);
    transition:
        left var(--sidebar-transition),
        transform var(--sidebar-transition),
        opacity var(--sidebar-transition),
        background-color var(--sidebar-transition);
}

.sidebar-rail-toggle:hover,
.sidebar__collapse-button:hover {
    background: #f8fbff;
}

.sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 35;
    background: rgba(15, 23, 42, 0.28);
}

.app-shell.sidebar-collapsed .sidebar {
    width: var(--sidebar-collapsed-width);
    min-width: var(--sidebar-collapsed-width);
    max-width: var(--sidebar-collapsed-width);
    padding: 0;
    overflow: hidden;
    border-right: 1px solid var(--border-color);
}

.app-shell.sidebar-collapsed .sidebar > * {
    opacity: 0;
    pointer-events: none;
}

.app-shell.sidebar-collapsed .sidebar-rail-toggle {
    display: flex;
    left: 5px;
}

.app-shell.sidebar-collapsed .sidebar-rail-toggle__chevron,
.app-shell.sidebar-collapsed .sidebar__collapse-chevron {
    transform: rotate(-45deg);
}


.terrain-legend {
    display: grid;
    gap: 8px;
    max-height: 260px;
    overflow-y: auto;
    padding-right: 2px;
}

.terrain-legend__item {
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
}

.terrain-legend__icon-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}

.terrain-legend__icon {
    display: block;
    max-width: 20px;
    max-height: 20px;
    object-fit: contain;
}

.terrain-legend__swatch {
    display: inline-block;
    width: 18px;
    height: 13px;
    border-radius: 4px;
    border: 1px solid rgba(15, 23, 42, 0.18);
    box-sizing: border-box;
}

.terrain-legend__swatch--pattern {
    background-image: repeating-linear-gradient(
        0deg,
        var(--legend-pattern-color, #cbd5e1) 0,
        var(--legend-pattern-color, #cbd5e1) 2px,
        transparent 2px,
        transparent 6px
    );
}

.terrain-legend__label {
    color: #334155;
    font-size: 13px;
    line-height: 1.3;
}

.terrain-legend__link {
    display: inline-block;
    margin-top: 10px;
}

/* Legend */
.legend {
    display: grid;
    gap: 8px;
}

.legend__dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    margin-right: 8px;
    border-radius: 50%;
    vertical-align: middle;
}

.legend__dot--photo {
    background: #d60000;
    border: 1px solid #fff;
    box-shadow: 0 0 0 1px #d60000;
}

.legend__line {
    display: inline-block;
    width: 18px;
    height: 0;
    margin-right: 8px;
    border-top: 3px solid #ff8a00;
    vertical-align: middle;
}

.legend__box {
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-right: 8px;
    border: 1px solid #b18700;
    background: rgba(243, 211, 91, 0.35);
    vertical-align: middle;
}

.legend__text {
    display: inline-block;
    min-width: 16px;
    margin-right: 8px;
    color: #0a4fa3;
    font-weight: bold;
}

.legend__terrain {
    display: inline-block;
    min-width: 18px;
    margin-right: 8px;
    font-weight: bold;
    text-align: center;
}

.legend__terrain--peak {
    color: #6b7280;
}

.legend__terrain--boulder {
    color: #8b5a2b;
}

.legend-link {
    color: #0a4fa3;
    font-weight: bold;
    text-decoration: none;
}

.legend-link:hover {
    text-decoration: underline;
}

/* Generic popups */
.maplibregl-popup-content {
    max-width: 340px;
    border-radius: 10px;
}

.popup-title {
    margin-bottom: 8px;
    font-size: 15px;
    font-weight: bold;
}

.popup-meta {
    margin-bottom: 10px;
    color: #374151;
    font-size: 13px;
    line-height: 1.4;
}

.popup-photos {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.popup-photos img {
    width: 92px;
    height: 72px;
    border: 1px solid #d7d7d7;
    border-radius: 6px;
    object-fit: cover;
    background: var(--bg-soft);
}

.photo-hover-popup .maplibregl-popup-content {
    max-width: 220px;
    padding: 10px;
    border-radius: 10px;
}

.popup-hover__description {
    margin-bottom: 8px;
    color: #1f2937;
    font-size: 14px;
    line-height: 1.35;
}

.popup-hover__image-wrap {
    width: 135px;
    margin: 0 auto;
}

.popup-hover__image {
    display: block;
    width: 135px;
    height: auto;
    border: 1px solid #d7d7d7;
    border-radius: 8px;
    background: var(--bg-soft);
}

/* Photo modal */
.photo-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(0, 0, 0, 0.35);
}

.photo-modal--hidden {
    display: none;
}

.photo-modal__dialog {
    position: relative;
    width: min(1070px, calc(100vw - 56px));
    max-height: calc(100vh - 48px);
    overflow: hidden;
    padding: 14px;
    border-radius: 24px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.28);
}

.photo-modal__content {
    overflow: hidden;
}

.photo-modal__close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.08);
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
}

.photo-modal__close:hover {
    background: rgba(0, 0, 0, 0.14);
}

.popup-detail__image-wrap {
    width: 100%;
    margin-top: 8px;
}

.popup-detail__image {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    border: 1px solid #d7d7d7;
    border-radius: 8px;
    background: var(--bg-soft);
    cursor: pointer;
}

/* Map overlays */
.map-info-readout,
.map-coordinates-readout {
    position: absolute;
    bottom: 9px;
    z-index: 30;
    padding: 4px 8px;
    border: 1px solid #cfcfcf;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
    color: #1f2937;
    font-size: 13px;
    line-height: 1.2;
    white-space: nowrap;
    pointer-events: none;
}

.map-coordinates-readout {
    left: 132px;
}

.map-zoom-readout {
    left: 220px;
}

.maplibregl-canvas,
.maplibregl-canvas:active {
    cursor: default !important;
}

.coordinate-copy-tool {
    position: absolute;
    left: 12px;
    bottom: 44px;
    z-index: 31;
    min-width: 260px;
    max-width: min(360px, calc(100vw - 24px));
    padding: 12px;
    border: 1px solid #d6e3f3;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.16);
    color: #0f172a;
}

.coordinate-copy-tool__title {
    font-size: 13px;
    font-weight: 700;
}

.coordinate-copy-tool__hint {
    margin-top: 4px;
    color: #64748b;
    font-size: 13px;
    line-height: 1.35;
}

.coordinate-copy-tool__value {
    margin-top: 10px;
    padding: 8px 10px;
    border: 1px solid #dbe6f2;
    border-radius: 10px;
    background: #f8fbff;
    font-size: 13px;
    font-weight: 600;
    word-break: break-word;
}

.coordinate-copy-tool__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.coordinate-copy-tool__button {
    padding: 8px 10px;
    border: 1px solid #cfd8e3;
    border-radius: 10px;
    background: #ffffff;
    color: #1f2937;
    font-size: 13px;
    cursor: pointer;
}

.coordinate-copy-tool__button:hover:not(:disabled) {
    background: #f8fafc;
}

.coordinate-copy-tool__button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.coordinate-copy-tool__button--primary {
    background: #1d4ed8;
    border-color: #1d4ed8;
    color: #ffffff;
}

.coordinate-copy-tool__button--primary:hover:not(:disabled) {
    background: #1e40af;
}

.coordinate-copy-tool__feedback {
    min-height: 18px;
    margin-top: 8px;
    color: #0f766e;
    font-size: 13px;
    font-weight: 600;
}


.coordinate-copy-tool__feedback--error {
    color: #b91c1c;
}

.elevation-tool .coordinate-copy-tool__value {
    line-height: 1.45;
}

.elevation-tool__row + .elevation-tool__row {
    margin-top: 4px;
}

.elevation-tool__label {
    color: #334155;
    font-weight: 700;
}

.elevation-tool__source {
    margin-top: 8px;
    color: #64748b;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.35;
}


.coordinate-copy-tool__marker {
    width: 18px;
    height: 18px;
    border: 3px solid #ffffff;
    border-radius: 50%;
    background: #2563eb;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.35), 0 4px 12px rgba(15, 23, 42, 0.25);
}

/* Final compact photo popup redesign */
.photo-gallery-map-popup .maplibregl-popup-content {
    width: min(980px, calc(100vw - 20px));
    max-width: min(980px, calc(100vw - 20px));
    padding: 14px;
    border-radius: 24px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    box-shadow: 0 20px 60px rgba(15, 23, 42, 0.22);
}

.photo-gallery-popup {
    width: 100%;
    color: #142033;
}

.photo-gallery-popup__header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 10px 14px;
    margin-bottom: 10px;
}

.photo-gallery-popup__heading {
    min-width: 0;
}

.photo-gallery-popup__eyebrow {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    margin-bottom: 8px;
    border: 1px solid #d7e6f7;
    border-radius: 999px;
    background: linear-gradient(135deg, #edf5ff, #f8fbff);
    color: #335985;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.photo-gallery-popup__title {
    margin: 0 0 3px 0;
    color: #0f172a;
    font-size: 18px;
    line-height: 1.15;
}

.photo-gallery-popup__meta {
    margin: 0;
    color: #64748b;
    font-size: 13px;
}

.photo-gallery-popup__details {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 10px 0;
}

.photo-gallery-popup__card {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    max-width: 100%;
    padding: 7px 11px;
    border: 1px solid #d7e2ee;
    border-radius: 999px;
    background: linear-gradient(180deg, #ffffff, #f4f8fc);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
}

.photo-gallery-popup__card--wide {
    max-width: 100%;
}

.photo-gallery-popup__card span {
    display: inline;
    margin: 0;
    color: #667085;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    white-space: nowrap;
}

.photo-gallery-popup__card strong {
    display: inline;
    color: #172033;
    font-size: 13px;
    line-height: 1.3;
    word-break: break-word;
}

.photo-gallery-popup__image-panel {
    position: relative;
    padding: 10px;
    border: 1px solid #d7e1ee;
    border-radius: 20px;
    background: linear-gradient(180deg, #eef5fc 0%, #e6eef7 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.photo-gallery-popup__image {
    display: block;
    width: 100%;
    max-height: min(64vh, 720px);
    border-radius: 16px;
    object-fit: contain;
    background: #ffffff;
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.14);
}

.photo-gallery-popup__controls {
    position: absolute;
    inset: 50% 16px auto 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transform: translateY(-50%);
    pointer-events: none;
}

.photo-gallery-popup__nav {
    pointer-events: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.52);
    backdrop-filter: blur(8px);
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.22);
    cursor: pointer;
    color: #ffffff;
    font-size: 22px;
    font-weight: 700;
    line-height: 1;
}

.photo-gallery-popup__nav:hover:not(:disabled) {
    transform: scale(1.05);
    background: rgba(15, 23, 42, 0.68);
}

.photo-gallery-popup__nav:disabled {
    opacity: 0.35;
    cursor: default;
    box-shadow: none;
}

.photo-gallery-popup__counter {
    color: #40516a;
    font-size: 13px;
    font-weight: 800;
    text-align: center;
}

.photo-gallery-popup__counter--top {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 66px;
    padding: 7px 11px;
    border: 1px solid #d7e2ee;
    border-radius: 999px;
    background: #f4f8fc;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
}

.photo-gallery-popup__counter--bottom {
    position: absolute;
    left: 50%;
    bottom: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 66px;
    padding: 7px 11px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.58);
    backdrop-filter: blur(8px);
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.22);
    color: #ffffff;
    transform: translateX(-50%);
}

.photo-gallery-modal .popup-detail__image-wrap {
    display: block;
    width: 100%;
}

.photo-gallery-modal .photo-gallery-popup__image-panel {
    position: relative;
    width: 100%;
    padding: 10px;
    border: 1px solid #d7e1ee;
    border-radius: 20px;
    background: linear-gradient(180deg, #eef5fc 0%, #e6eef7 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.photo-gallery-modal .photo-gallery-popup__image {
    display: block;
    width: auto;
    max-width: 100%;
    max-height: calc(100vh - 220px);
    margin: 0 auto;
    border: none;
    border-radius: 16px;
    background: #ffffff;
}

@media (max-width: 640px) {
    .photo-gallery-modal .photo-gallery-popup__image-panel {
        padding: 7px;
        border-radius: 16px;
    }
}

/* Responsive */
@media (max-width: 900px) {
    .app-shell {
        display: block;
        height: 100vh;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: var(--sidebar-mobile-width) !important;
        min-width: var(--sidebar-mobile-width) !important;
        max-width: var(--sidebar-mobile-width) !important;
        height: 100vh !important;
        padding: 16px 14px 18px;
        border-right: 1px solid var(--border-color);
        border-bottom: none !important;
        transform: translateX(-100%);
        box-shadow: none;
    }

    .app-shell.sidebar-mobile-open .sidebar {
        transform: translateX(0);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
    }

    .app-shell.sidebar-mobile-open.sidebar-peek-active .sidebar {
        width: var(--sidebar-mobile-peek-width) !important;
        min-width: var(--sidebar-mobile-peek-width) !important;
        max-width: var(--sidebar-mobile-peek-width) !important;
    }

    .app-shell.sidebar-collapsed .sidebar,
    .app-shell.sidebar-mobile-open.sidebar-collapsed .sidebar {
        width: var(--sidebar-mobile-width) !important;
        min-width: var(--sidebar-mobile-width) !important;
        max-width: var(--sidebar-mobile-width) !important;
        padding: 18px;
    }

    .app-shell.sidebar-collapsed .sidebar > * {
        opacity: 1;
        pointer-events: auto;
    }

    .overlay-opacity {
        margin-left: 0;
    }

    .sidebar__tabs {
        position: sticky;
        top: -1px;
        z-index: 3;
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        justify-content: stretch;
        gap: 14px;
        width: 100%;
        margin: 0 0 16px;
        padding: 6px 0 10px;
        overflow-x: visible;
        overflow-y: hidden;
        background: linear-gradient(180deg, rgba(255, 255, 255, 1) 78%, rgba(255, 255, 255, 0.96) 100%);
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

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

    .sidebar__tab-button {
        width: 100%;
        min-width: 0;
        min-height: 48px;
        padding: 9px;
        white-space: nowrap;
    }

    .sidebar__collapse-button {
        display: none;
    }

    .sidebar-rail-toggle {
        position: fixed;
        top: 14px;
        left: 10px !important;
        display: flex;
        width: 38px;
        height: 38px;
        border-radius: 12px;
        background: rgba(255, 255, 255, 0.96);
    }

    .sidebar-rail-toggle__chevron {
        transform: rotate(-45deg);
    }

    .app-shell.sidebar-mobile-open .sidebar-rail-toggle__chevron {
        transform: rotate(135deg);
    }

    .map-layout {
        flex: none;
        width: 100%;
        height: 100vh !important;
        min-height: 100vh;
    }

    #map {
        width: 100%;
        height: 100vh !important;
        min-height: 100vh;
    }


    .maplibregl-ctrl-bottom-left,
    .maplibregl-ctrl-bottom-right {
        bottom: calc(env(safe-area-inset-bottom, 0px) + 56px);
        z-index: 21;
    }

    .maplibregl-ctrl-bottom-left {
        left: 8px;
    }

    .maplibregl-ctrl-bottom-right {
        right: 0px;
    }

    .maplibregl-ctrl-attrib.maplibregl-compact {
        max-width: calc(100vw - 16px);
        box-shadow: 0 1px 6px rgba(0, 0, 0, 0.22);
    }

    .maplibregl-ctrl-bottom-left .maplibregl-ctrl-scale,
    .map-coordinates-readout,
    .map-zoom-readout,
    .map-info-readout {
        display: none;
    }

    .coordinate-copy-tool {
        left: 8px;
        right: 8px;
        bottom: calc(env(safe-area-inset-bottom, 0px) + 64px);
        min-width: 0;
        max-width: none;
    }

    .photo-gallery-map-popup .maplibregl-popup-content {
        width: calc(100vw - 16px);
        max-width: calc(100vw - 16px);
        padding: 10px;
        border-radius: 18px;
    }

    .photo-gallery-popup__header {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .photo-gallery-popup__counter--top {
        justify-self: start;
    }

    .photo-gallery-popup__image {
        max-height: min(56vh, 560px);
    }
}

@media (max-width: 768px) {
    .sidebar__header {
        justify-content: center;
    }

    .sidebar__header h1 {
        width: 100%;
        padding: 0 56px;
        text-align: center;
        font-size: 20px;
    }

    .sidebar__sections {
        padding-bottom: 18px;
    }

    .sidebar__toggle {
        position: absolute;
        top: 50%;
        left: 0;
        z-index: 2;
        transform: translateY(-50%);
    }
}

@media (max-width: 640px) {
    .photo-modal {
        padding: 12px;
    }

    .photo-modal__dialog {
        width: min(100vw - 24px, 100%);
        max-height: calc(100vh - 24px);
        padding: 16px;
    }

    .photo-gallery-popup__title {
        font-size: 17px;
    }

    .photo-gallery-popup__meta {
        font-size: 13px;
    }

    .photo-gallery-popup__details {
        gap: 6px;
    }

    .photo-gallery-popup__card {
        padding: 6px 10px;
    }

    .photo-gallery-popup__image-panel {
        padding: 7px;
        border-radius: 16px;
    }

    .photo-gallery-popup__controls {
        inset: 50% 10px auto 10px;
    }

    .photo-gallery-popup__nav {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }

    .photo-gallery-popup__counter--bottom {
        bottom: 12px;
        min-width: 58px;
        padding: 6px 10px;
    }
}

@media (max-width: 560px) {
    .sidebar__tabs {
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 12px;
        margin: 0 0 16px;
        padding: 6px 0 10px;
    }

    .sidebar__tab-button {
        width: 100%;
        min-width: 0;
        min-height: 40px;
        padding: 7px;
        border-radius: 11px;
    }

    .sidebar__tab-icon {
        width: 26px;
        height: 26px;
    }
}

@media (max-width: 380px) {
    .sidebar__tabs {
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 8px;
    }

    .sidebar__tab-button {
        width: 100%;
        min-width: 0;
        min-height: 38px;
        padding: 6px;
    }

    .sidebar__tab-icon {
        width: 25px;
        height: 25px;
    }
}


.sidebar-search {
    display: grid;
    gap: 8px;
}

.sidebar-search__row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
}

.sidebar-search__submit {
    padding: 9px 12px;
    border: 1px solid #9fb7d6;
    border-radius: 8px;
    background: #edf5ff;
    color: #163d66;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.sidebar-search__submit:hover {
    background: #e4f0ff;
}

.sidebar-search__hint {
    margin: 0;
}

.sidebar-search-results {
    min-height: 140px;
    padding: 10px;
}

.sidebar-search-results:empty {
    display: none;
}

.sidebar-search-results__state {
    color: #64748b;
    font-size: 14px;
    line-height: 1.45;
}

.sidebar-search-results__section + .sidebar-search-results__section {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid #e6edf5;
}

.sidebar-search-results__section-title {
    margin: 0 0 8px 0;
    font-size: 14px;
    color: #163d66;
}

.sidebar-search-results__list {
    display: grid;
    gap: 8px;
}

.sidebar-search-result {
    display: block;
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d6deea;
    border-radius: 10px;
    background: #ffffff;
    text-align: left;
    cursor: pointer;
    transition: background-color 140ms ease, border-color 140ms ease, transform 140ms ease;
}

.sidebar-search-result:hover {
    background: #f8fbff;
    border-color: #9fb7d6;
    transform: translateY(-1px);
}


.sidebar-search-result__row {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
}

.sidebar-search-result__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: #f1f6fc;
    font-size: 15px;
    line-height: 1;
}

.sidebar-search-result__content {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.sidebar-search-result__title {
    font-size: 14px;
    font-weight: 700;
    color: #142033;
}

.sidebar-search-result__subtitle {
    font-size: 13px;
    color: #64748b;
    line-height: 1.35;
}

@media (max-width: 520px) {
    .sidebar-search__row {
        grid-template-columns: 1fr;
    }
}


.sidebar-search-results__actions {
    display: flex;
    justify-content: center;
    margin-top: 0.5rem;
}

.sidebar-search-results__more {
    appearance: none;
    border: 1px solid rgba(15, 23, 42, 0.12);
    background: rgba(255, 255, 255, 0.92);
    color: #1f2937;
    border-radius: 999px;
    padding: 0.55rem 0.95rem;
    font: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.sidebar-search-results__more:hover {
    background: rgba(255, 255, 255, 1);
    border-color: rgba(15, 23, 42, 0.2);
    transform: translateY(-1px);
}

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


.popup-badge {
    display: inline-block;
    margin-bottom: 8px;
    padding: 3px 8px;
    border-radius: 999px;
    background: #f3efe3;
    color: #6b4f2f;
    font-size: 11px;
    font-weight: 600;
}

.popup-section {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #e5e7eb;
}

.popup-section__title {
    margin-bottom: 5px;
    font-size: 13px;
    font-weight: 700;
    color: #374151;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.popup-section__body {
    color: #1f2937;
    font-size: 13px;
    line-height: 1.45;
}

.popup-section__body--html p,
.popup-section__body--html br {
    line-height: inherit;
}


/* Overview map */
.overview-map {
    position: absolute;
    right: 12px;
    bottom: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    z-index: 10;
    pointer-events: auto;
}

.overview-map__panel {
    position: relative;
    width: 130px;
    height: 130px;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.75);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.18);
    backdrop-filter: blur(2px);
    cursor: default;
    transition: width 180ms ease, height 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.overview-map.is-enlarged .overview-map__panel {
    width: 240px;
    height: 240px;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.22);
}

.overview-map__canvas {
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.overview-map__button,
.overview-map__collapsed-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 1px solid rgba(203, 213, 225, 0.95);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.96);
    color: #1f2937;
    box-shadow: 0 3px 10px rgba(15, 23, 42, 0.14);
    cursor: pointer;
}

.overview-map__button:hover,
.overview-map__collapsed-button:hover {
    background: #f8fbff;
}

.overview-map__button--close {
    position: absolute;
    top: 6px;
    right: 6px;
    font-size: 18px;
    line-height: 1;
    z-index: 2;
}

.overview-map__button--enlarge {
    position: absolute;
    top: 6px;
    right: 40px;
    z-index: 2;
}

.overview-map__collapsed-button {
    font-size: 16px;
}

.overview-map.is-collapsed .overview-map__panel {
    display: none;
}

.overview-map:not(.is-collapsed) .overview-map__collapsed-button {
    display: none;
}

.overview-map .maplibregl-canvas {
    border-radius: 14px;
}

.overview-map .maplibregl-control-container,
.overview-map .maplibregl-ctrl-bottom-right,
.overview-map .maplibregl-ctrl-bottom-left,
.overview-map .maplibregl-ctrl-top-right,
.overview-map .maplibregl-ctrl-top-left {
    display: none !important;
}

@media (max-width: 768px) {
    .overview-map {
        position: fixed;
        right: 10px;
        bottom: 10px;
        bottom: calc(10px + env(safe-area-inset-bottom, 0px));
        max-width: calc(100vw - 20px);
        max-height: calc(100vh - 20px - env(safe-area-inset-bottom, 0px));
    }

    .overview-map__panel {
        width: 126px;
        height: 126px;
        border-radius: 12px;
    }

    .overview-map.is-enlarged .overview-map__panel {
        width: 172px;
        height: 172px;
    }

    .overview-map .maplibregl-canvas {
        border-radius: 12px;
    }

    .overview-map__button,
    .overview-map__collapsed-button {
        width: 26px;
        height: 26px;
    }

    .overview-map__button--close {
        top: 5px;
        right: 5px;
    }
}


.point-marker-tool__marker {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.point-marker-tool__marker-visual {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    transform-origin: center;
}

.point-marker-tool__marker-ring {
    width: 16px;
    height: 16px;
    border: 2px solid #0ea5e9;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 0 0 1px rgba(14, 165, 233, 0.18), 0 4px 12px rgba(15, 23, 42, 0.18);
}

.point-marker-tool__marker-dot {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: #0284c7;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.95);
}

.point-marker-tool__marker:hover .point-marker-tool__marker-ring,
.point-marker-tool__marker:focus-visible .point-marker-tool__marker-ring {
    border-color: #0369a1;
    box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.2), 0 6px 14px rgba(15, 23, 42, 0.22);
}

.point-marker-tool__marker:focus-visible {
    outline: none;
}

.point-marker-tool__marker-visual.is-pop {
    animation: point-marker-pop 180ms ease-out;
}

@keyframes point-marker-pop {
    0% {
        transform: scale(0.72);
        opacity: 0.82;
    }

    72% {
        transform: scale(1.08);
        opacity: 1;
    }

    100% {
        transform: scale(1);
    }
}

.point-marker-map-popup .maplibregl-popup-content {
    padding: 0;
    border-radius: 16px;
    background: transparent;
    box-shadow: none;
}

.point-marker-map-popup .maplibregl-popup-tip {
    border-top-color: #ffffff;
}

.point-marker-tool__popup.coordinate-copy-tool {
    position: static;
    inset: auto;
    min-width: 240px;
    max-width: 280px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.18);
}

.distance-measure-tool__summary-line + .distance-measure-tool__summary-line {
    margin-top: 4px;
}

.distance-measure-tool .coordinate-copy-tool__value {
    line-height: 1.35;
}

.distance-measure-tool .coordinate-copy-tool__button[data-action="clear"] {
    min-width: 124px;
}


.export-map-tool .coordinate-copy-tool__value {
    font-size: 0.9rem;
    line-height: 1.45;
}

.export-map-tool .coordinate-copy-tool__button--primary {
    min-width: 9.75rem;
}


.section-info-tooltip--inline {
    max-width: min(320px, calc(100vw - 16px));
    padding: 12px 14px;
    border-color: rgba(96, 165, 250, 0.35);
    background: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(241,247,255,0.98) 100%);
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.18);
    color: #29405c;
    font-size: 13px;
    line-height: 1.5;
}

.bookmark-tab__intro {
    margin: 0 0 14px 0;
}

.bookmark-form {
    display: grid;
    gap: 10px;
}

.bookmark-form__label {
    font-size: 13px;
    font-weight: 600;
    color: #314155;
}

.bookmark-form__button {
    text-align: center;
    border-style: solid;
    color: #1d4f91;
}

.bookmark-tab__feedback {
    min-height: 18px;
    margin: 0;
    font-size: 13px;
    color: #1d4f91;
}

.bookmark-tab__feedback.is-error {
    color: #b42318;
}

.bookmark-list {
    display: grid;
    gap: 10px;
    margin-top: 16px;
}

.bookmark-item {
    border: 1px solid #d6deea;
    border-radius: 12px;
    background: #fbfdff;
    overflow: hidden;
}

.bookmark-item__header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: stretch;
}

.bookmark-item__open,
.bookmark-item__delete {
    border: 0;
    background: transparent;
}

.bookmark-item__open {
    display: grid;
    gap: 4px;
    padding: 12px 14px;
    text-align: left;
    cursor: pointer;
}

.bookmark-item__open:hover {
    background: #f4f8ff;
}

.bookmark-item__name {
    font-size: 14px;
    font-weight: 700;
    color: #1f2937;
}

.bookmark-item__meta {
    font-size: 12px;
    color: #6b7280;
}

.bookmark-item__delete {
    padding: 12px 14px;
    border-left: 1px solid #e5edf7;
    color: #7b1f1f;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.bookmark-item__delete:hover {
    background: #fff3f2;
}

.bookmark-empty-state {
    margin-top: 16px;
    padding: 14px 14px;
    border: 1px dashed #d6deea;
    border-radius: 12px;
    background: #fbfdff;
}

.bookmark-empty-state__title {
    margin-bottom: 4px;
    font-size: 14px;
    font-weight: 700;
    color: #1f2937;
}

.bookmark-empty-state__text {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.45;
}

@media (max-width: 900px) {
    .bookmark-item__header {
        grid-template-columns: 1fr;
    }

    .bookmark-item__delete {
        border-left: 0;
        border-top: 1px solid #e5edf7;
        text-align: left;
    }
}


.panel-item--basemap .panel-item__header {
    align-items: center;
}

.panel-item__select-wrap {
    flex: 1 1 auto;
    min-width: 0;
}

.panel-item--basemap .muted {
    margin: 8px 0 0;
}


.terrain-filter {
    display: grid;
    gap: 10px;
}

.terrain-filter__toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.terrain-filter__toolbar-button {
    padding: 5px 9px;
    border: 1px solid #cfd8e3;
    border-radius: 999px;
    background: #ffffff;
    color: #35506f;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
}

.terrain-filter__toolbar-button:hover,
.terrain-filter__toolbar-button:focus-visible {
    border-color: #7aa6d1;
    background: #eef6ff;
    outline: none;
}

.terrain-filter__list {
    display: grid;
    gap: 8px;
    max-height: 280px;
    overflow-y: auto;
    padding-right: 2px;
}

.terrain-filter__row {
    display: grid;
    grid-template-columns: 18px 24px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    min-height: 30px;
    color: #334155;
    font-size: 13px;
    cursor: pointer;
}

.terrain-filter__row--no-icon {
    grid-template-columns: 18px minmax(0, 1fr);
    gap: 8px;
}

.terrain-filter__checkbox {
    margin: 0;
}

.terrain-filter__icon-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}

.terrain-filter__icon {
    display: block;
    max-width: 20px;
    max-height: 20px;
    object-fit: contain;
}

.terrain-filter__label {
    line-height: 1.3;
}


.elevation-tool__note {
    margin-top: 6px;
    font-size: 12px;
    line-height: 1.4;
    opacity: 0.82;
}

/* Túlačky po mape */
.sidebar__section--tours {
    display: grid;
    gap: 12px;
}

.tours-tab__intro {
    margin: -2px 0 0;
    line-height: 1.4;
}

.tours-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tours-toolbar__chip {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 3px 8px;
    border: 1px solid #dbeafe;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 12px;
    font-weight: 600;
}

.tours-list {
    display: grid;
    gap: 10px;
}

.tours-list-state,
.tours-feedback {
    color: var(--muted-color);
    font-size: 13px;
    line-height: 1.35;
}

.tours-list-state--error,
.tours-feedback.is-error {
    color: #b91c1c;
}

.tour-card {
    display: grid;
    gap: 8px;
    padding: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
}

.tour-card__category {
    color: #2563eb;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.tour-card__title {
    margin: 0;
    color: #1f2937;
    font-size: 15px;
    line-height: 1.25;
}

.tour-card__description {
    margin: 0;
    color: #4b5563;
    font-size: 13px;
    line-height: 1.4;
}

.tour-card__actions {
    display: flex;
    justify-content: flex-end;
}

.tour-card__start {
    min-height: 34px;
    padding: 7px 12px;
    border: 0;
    border-radius: 10px;
    background: #2563eb;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.tour-card__start:hover {
    background: #1d4ed8;
}

.tour-panel {
    position: absolute;
    left: 8px;
    bottom: 8px;
    z-index: 20;
    width: min(420px, calc(100vw - 32px));
    min-width: 320px;
    max-height: min(70vh, calc(100vh - 64px), 560px);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px;
    border: 1px solid rgba(203, 213, 225, 0.95);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.24);
    overflow: hidden;
    backdrop-filter: blur(6px);
}

.tour-panel.is-dragged {
    right: auto;
    bottom: auto;
}

.tour-panel.is-dragging {
    user-select: none;
}

.tour-panel.is-collapsed {
    width: auto;
    min-width: 300px;
    max-width: min(420px, calc(100vw - 32px));
    max-height: none;
    gap: 0;
    padding: 10px 12px;
    border-radius: 16px;
}

.tour-panel.is-collapsed .tour-panel__body,
.tour-panel.is-collapsed .tour-panel__actions {
    display: none;
}

.tour-panel.is-collapsed .tour-panel__header {
    align-items: center;
}

.tour-panel.is-collapsed .tour-panel__heading {
    min-width: 0;
}

.tour-panel.is-collapsed .tour-panel__title {
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tour-panel__header {
    flex: 0 0 auto;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.tour-panel__heading {
    min-width: 0;
}

.tour-panel__header[data-tour-drag-handle] {
    cursor: grab;
    touch-action: none;
}

.tour-panel.is-dragging .tour-panel__header[data-tour-drag-handle] {
    cursor: grabbing;
}

.tour-panel__eyebrow {
    margin-bottom: 2px;
    color: #2563eb;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.tour-panel__title {
    margin: 0;
    color: #111827;
    font-size: 16px;
    line-height: 1.25;
}

.tour-panel__progress {
    flex: 0 0 auto;
    padding: 4px 8px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #334155;
    font-size: 12px;
    font-weight: 800;
}

.tour-panel__body {
    flex: 1 1 auto;
    min-height: 0;
    display: grid;
    align-content: start;
    gap: 8px;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-right: 4px;
}

.tour-panel__body::-webkit-scrollbar {
    width: 8px;
}

.tour-panel__body::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.7);
}

.tour-panel__body::-webkit-scrollbar-track {
    background: transparent;
}

.tour-panel__step-title {
    margin: 0;
    color: #1f2937;
    font-size: 14px;
    line-height: 1.25;
}

.tour-panel__description {
    margin: 0;
    color: #4b5563;
    font-size: 13px;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.tour-panel__photos {
    display: grid;
    gap: 6px;
    margin-top: 2px;
}

.tour-panel__photos-title {
    color: #334155;
    font-size: 12px;
    font-weight: 800;
}

.tour-panel__photos-list {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    padding-bottom: 4px;
}

.tour-panel__photo-link {
    flex: 0 0 auto;
    display: block;
    width: 104px;
    height: 78px;
    border: 1px solid #d7d7d7;
    border-radius: 12px;
    background: #f8fafc;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.tour-panel__photo-link:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.35);
    outline-offset: 2px;
}

.tour-panel__photo {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tour-panel__actions {
    flex: 0 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 8px;
}

.tour-panel__button {
    min-height: 36px;
    padding: 7px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: #ffffff;
    color: #334155;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
}

.tour-panel__button:disabled {
    cursor: not-allowed;
    opacity: 0.45;
}

.tour-panel__button--primary {
    border-color: #2563eb;
    background: #2563eb;
    color: #ffffff;
}

.tour-panel__button--ghost {
    border-color: transparent;
    color: #b91c1c;
}
@media (max-width: 900px) {
    .tour-panel {
        position: fixed;
        left: 10px;
        right: 10px;
        bottom: 10px;
        bottom: calc(10px + env(safe-area-inset-bottom, 0px));
        width: auto;
        min-width: 0;
        max-height: min(62dvh, calc(100dvh - 96px - env(safe-area-inset-bottom, 0px)));
        border-radius: 18px 18px 14px 14px;
        padding: 12px;
    }

    .tour-panel.is-dragged {
        left: 10px !important;
        right: 10px !important;
        top: auto !important;
        bottom: 10px !important;
        bottom: calc(10px + env(safe-area-inset-bottom, 0px)) !important;
    }

    .tour-panel.is-collapsed {
        position: fixed;
        left: 10px !important;
        right: 10px !important;
        top: auto !important;
        bottom: 10px !important;
        bottom: calc(10px + env(safe-area-inset-bottom, 0px)) !important;
        min-width: 0;
        width: auto;
        max-width: none;
        max-height: calc(100dvh - 20px - env(safe-area-inset-bottom, 0px));
        padding: 10px 12px;
        transform: none;
    }

    .tour-panel.is-collapsed .tour-panel__title {
        max-width: 42vw;
    }

    .tour-panel__header[data-tour-drag-handle] {
        cursor: default;
        touch-action: auto;
    }

    .tour-panel__actions {
        grid-template-columns: 1fr 1fr;
    }

    .tour-panel__button--ghost {
        grid-column: 1 / -1;
    }

    .tour-panel__button {
        min-height: 42px;
    }
}

/* Sprievodca po mape - mobilné ovládanie a zatváranie popupu */
.tour-panel__header-actions {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.tour-panel__collapse,
.tour-panel__close {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    background: #f8fafc;
    color: #334155;
    font-size: 22px;
    line-height: 1;
    font-weight: 800;
    cursor: pointer;
}

.tour-panel__collapse:hover {
    background: #dbeafe;
    color: #1d4ed8;
}

.tour-panel__close:hover {
    background: #fee2e2;
    color: #b91c1c;
}

@media (max-width: 900px) {
    .tour-panel {
        bottom: calc(10px + env(safe-area-inset-bottom, 0px));
        max-height: min(62dvh, calc(100dvh - 96px - env(safe-area-inset-bottom, 0px)));
    }

    .tour-panel.is-dragged,
    .tour-panel.is-collapsed {
        bottom: calc(10px + env(safe-area-inset-bottom, 0px)) !important;
    }

    .tour-panel__header {
        align-items: flex-start;
    }

    .tour-panel__header-actions {
        align-items: flex-start;
    }

    .tour-panel__collapse,
.tour-panel__close {
        width: 34px;
        height: 34px;
        margin-top: -4px;
        margin-right: -4px;
        background: #ffffff;
        box-shadow: 0 6px 16px rgba(15, 23, 42, 0.12);
    }
}

/* Sprievodca: výška popupu je obmedzená, scrolluje iba obsah medzi hlavičkou a tlačidlami. */
@media (max-width: 900px) {
    .tour-panel__body {
        padding-right: 2px;
        -webkit-overflow-scrolling: touch;
    }

    .tour-panel__description {
        font-size: 14px;
        line-height: 1.5;
    }
}

.tour-panel__related {
    display: grid;
    gap: 6px;
    margin-top: 2px;
    padding: 9px;
    border: 1px solid #d1fae5;
    border-radius: 12px;
    background: #f0fdf4;
}

.tour-panel__related-title {
    color: #166534;
    font-size: 12px;
    font-weight: 800;
}

.tour-panel__related-list {
    display: grid;
    gap: 7px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.tour-panel__related-item {
    margin: 0;
}

.tour-panel__related-button {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 7px;
    align-items: flex-start;
    width: 100%;
    padding: 4px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #1f2937;
    font: inherit;
    font-size: 12px;
    line-height: 1.35;
    text-align: left;
    cursor: pointer;
}

.tour-panel__related-button:hover,
.tour-panel__related-button:focus-visible {
    background: rgba(16, 185, 129, 0.12);
    outline: none;
}

.tour-panel__related-content {
    min-width: 0;
}

.tour-panel__related-dot {
    width: 10px;
    height: 10px;
    margin-top: 3px;
    border: 2px solid #10b981;
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.18);
    box-sizing: border-box;
}

.tour-panel__related-meta {
    display: block;
    margin-top: 1px;
    color: #047857;
    font-size: 11px;
    font-weight: 700;
}

.tour-panel__related-description {
    margin: 4px 0 0;
    color: #4b5563;
    font-size: 12px;
    line-height: 1.35;
}

/* Sprievodca - záverečná obrazovka */
.tour-panel__body--ending {
    gap: 10px;
}

.tour-panel__ending-badge {
    justify-self: start;
    padding: 4px 9px;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.tour-panel__ending-title {
    font-size: 15px;
}

.tour-panel__ending-links {
    display: grid;
    gap: 7px;
    margin-top: 2px;
}

.tour-panel__ending-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 7px 10px;
    border: 1px solid #bfdbfe;
    border-radius: 10px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
}

.tour-panel__ending-link:hover,
.tour-panel__ending-link:focus-visible {
    background: #dbeafe;
    outline: none;
}

.tour-panel__next-tours {
    display: grid;
    gap: 7px;
    margin-top: 4px;
    padding: 9px;
    border: 1px solid #e0e7ff;
    border-radius: 12px;
    background: #f8fafc;
}

.tour-panel__next-tours-title {
    color: #334155;
    font-size: 12px;
    font-weight: 900;
}

.tour-panel__next-tours-list {
    display: grid;
    gap: 7px;
}

.tour-panel__next-tour {
    display: grid;
    gap: 2px;
    width: 100%;
    padding: 9px;
    border: 1px solid #cbd5e1;
    border-radius: 11px;
    background: #ffffff;
    color: #1f2937;
    font: inherit;
    font-size: 12px;
    line-height: 1.35;
    text-align: left;
    cursor: pointer;
}

.tour-panel__next-tour:hover,
.tour-panel__next-tour:focus-visible {
    border-color: #93c5fd;
    background: #eff6ff;
    outline: none;
}

.tour-panel__next-tour-kicker {
    color: #2563eb;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* Sprievodca - úvodná obrazovka */
.tour-panel__actions--single {
    grid-template-columns: 1fr;
}

.tour-panel__body--welcome {
    gap: 10px;
}

.tour-panel__welcome-badge {
    justify-self: start;
    padding: 4px 9px;
    border-radius: 999px;
    background: #ecfdf5;
    color: #047857;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.tour-panel__welcome-title {
    font-size: 15px;
}

/* Sprievodca: každý súvisiaci objekt má vlastný blok a vlastný carousel fotiek. */
.tour-panel__related-item {
    display: grid;
    gap: 6px;
    padding: 5px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.55);
}

.tour-panel__related-item .tour-panel__photos {
    margin-top: 0;
    padding-left: 21px;
}

.tour-panel__related-item .tour-panel__photos-title {
    color: #047857;
    font-size: 11px;
}

.tour-panel__related-item .tour-panel__photo-link {
    width: 92px;
    height: 69px;
}

/* Moja poloha */
.user-location-ctrl {
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.14);
}

.user-location-button {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #1d4f91;
    background: #fff;
    transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.user-location-button svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.user-location-button:hover {
    background: #f2f2f2;
    color: #11478a;
}

.user-location-button.is-loading {
    color: #1d4f91;
    background: #fff;
}

.user-location-button.is-loading svg {
    animation: user-location-spin 0.9s linear infinite;
}

.user-location-button.is-active {
    color: #0f5fc7;
    background: #fff;
    box-shadow: inset 0 0 0 1px rgba(47, 128, 237, 0.2);
}

.user-location-button.is-error {
    color: #b42318;
    background: #fff;
    box-shadow: inset 0 0 0 1px rgba(180, 35, 24, 0.2);
}

.user-location-marker {
    width: 15px;
    height: 15px;
    border-radius: 999px;
    background: #2f80ed;
    border: 2px solid #fff;
    box-shadow: 0 0 0 2px rgba(47, 128, 237, 0.32), 0 2px 8px rgba(15, 23, 42, 0.28);
}

@keyframes user-location-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@media (min-width: 769px) {
    .maplibregl-ctrl-top-right .maplibregl-ctrl-group.user-location-ctrl {
        order: 3;
        margin: 6px 0 0 0;
    }

    .maplibregl-ctrl-top-right .maplibregl-ctrl-group.map-reset-view-ctrl {
        order: 4;
    }
}

@media (max-width: 768px) {
    .user-location-button {
        width: 24px;
        height: 24px;
        min-width: 0;
        min-height: 0;
    }
}

.sidebar__title-link {
    color: inherit;
    text-decoration: none;
    cursor: pointer;
}

.sidebar__title-link:hover,
.sidebar__title-link:focus-visible {
    text-decoration: underline;
}

/* Map context menu */
.map-context-menu {
    position: absolute;
    z-index: 30;
    min-width: 210px;
    max-width: min(280px, calc(100vw - 18px));
    padding: 6px;
    border: 1px solid rgba(203, 213, 225, 0.95);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.2);
    color: #1f2937;
    user-select: none;
}

.map-context-menu[hidden] {
    display: none !important;
}

.map-context-menu__item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 8px 10px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: inherit;
    font: inherit;
    font-size: 13px;
    line-height: 1.25;
    text-align: left;
    cursor: pointer;
}

.map-context-menu__item:hover,
.map-context-menu__item:focus-visible {
    background: #f1f5f9;
    outline: none;
}

.map-context-menu__item:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.map-context-menu__icon {
    width: 20px;
    min-width: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #334155;
    font-size: 15px;
}

.map-context-menu__label {
    flex: 1;
    white-space: nowrap;
}

@media (pointer: coarse), (max-width: 768px) {
    .map-context-menu {
        min-width: 230px;
    }

    .map-context-menu__item {
        min-height: 42px;
        padding: 11px 12px;
        font-size: 14px;
    }
}

/* Compact Porastová mapa popup */
.popup-meta--compact {
    margin-bottom: 6px;
}

.popup-forest-stand__facts {
    font-weight: 600;
}

.popup-details {
    margin-top: 6px;
    border-top: 1px solid #e5e7eb;
    padding-top: 8px;
}

.popup-details summary {
    margin-bottom: 8px;
    color: #2563eb;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    list-style-position: inside;
}

.popup-details summary:hover {
    text-decoration: underline;
}

.popup-forest-stand__stages {
    margin-top: 8px;
}

.popup-forest-stand__stage {
    margin: 8px 0 10px;
    padding: 8px 10px;
    border-left: 3px solid #d1d5db;
    background: #f8fafc;
    border-radius: 8px;
}

.popup-details--nested {
    margin-top: 6px;
    border-top: 1px dashed #d1d5db;
    padding-top: 6px;
}

.popup-details--nested summary {
    font-size: 12px;
    margin-bottom: 6px;
}


.popup-forest-stand__section {
    margin-top: 8px;
}

.popup-forest-stand__stage-title {
    margin-bottom: 6px;
    font-size: 15px;
    font-weight: 700;
    color: #1f2937;
}

.popup-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.popup-tabs__input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.popup-tabs__label {
    order: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    background: #ffffff;
    color: #334155;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.popup-tabs__label:hover {
    background: #eff6ff;
    border-color: #93c5fd;
    color: #1d4ed8;
}

.popup-tabs__panel {
    order: 2;
    width: 100%;
    display: none;
    margin-top: 2px;
}

.popup-tabs__input:checked + .popup-tabs__label {
    background: #2563eb;
    border-color: #2563eb;
    color: #ffffff;
}

.popup-tabs__input:checked + .popup-tabs__label + .popup-tabs__panel {
    display: block;
}

.popup-tabs__input:checked + .popup-tabs__label:hover {
    background: #2563eb;
    border-color: #2563eb;
    color: #ffffff;
}
