:root {
    color-scheme: light dark;
}

html,
body,
.leaflet-container {
    font-family: 'IBM Plex Sans', 'Segoe UI', system-ui, sans-serif;
}

html,
body {
    margin: 0;
    padding: 0;
    height: 100%;
    overflow: hidden;
}

#map {
    width: 100%;
    height: 100vh;
    background: #a9bcc4;
}

:root {
    --map-chrome-bg: #f6f9fd;
    --map-chrome-border: #c3d1e2;
    --map-chrome-hover: #dfe8f3;
    --map-chrome-text: #36516f;
}

@media (prefers-color-scheme: dark) {:root:not([data-theme="light"]) {
        --map-chrome-bg: #1d2836;
        --map-chrome-border: #36485f;
        --map-chrome-hover: #2a3a4f;
        --map-chrome-text: #c6d9ee;
    }
}
:root[data-theme="dark"] {
        --map-chrome-bg: #1d2836;
        --map-chrome-border: #36485f;
        --map-chrome-hover: #2a3a4f;
        --map-chrome-text: #c6d9ee;
    }


.leaflet-control-attribution,
.leaflet-control-attribution a {
    color: var(--map-chrome-text);
    font-size: 9px;
}

.leaflet-control-attribution {
    background: var(--map-chrome-bg) !important;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
    padding: 1px 7px;
    line-height: 1.5;
    margin: 0 5px 5px 0 !important;
}

.leaflet-popup-pane {
    z-index: 1100;
}

.leaflet-tooltip-pane {
    z-index: 1050;
}

.kyiv-mask-shape {
    filter: blur(24px);
}

.kyiv-fade-layer {
    transition: opacity 0.45s ease;
}

.occupied-territory-shape,
.region-label,
.raion-label,
.city-label,
.city-dot,
.river-line,
.river-area {
    transition: opacity 0.45s ease;
}

.alert-status-shape {
    transition:
        opacity 0.38s ease,
        fill 0.38s ease,
        fill-opacity 0.38s ease,
        stroke 0.38s ease,
        stroke-opacity 0.38s ease,
        stroke-width 0.38s ease;
}

.threat-icon-wrapper {
    transition: opacity 0.6s ease;
}

.threat-trail {
    transition: opacity 0.6s ease;
}

.threat-uncertainty-circle {
    transition: opacity 0.6s ease;
}

.leaflet-raionBorders-pane,
.leaflet-osmLabelsPane-pane {
    transition: opacity 0.45s ease;
}

.map-transitioning .leaflet-raionBorders-pane,
.map-transitioning .leaflet-osmLabelsPane-pane,
.map-transitioning .alert-status-shape,
.map-transitioning .occupied-territory-shape,
.map-transitioning .region-label,
.map-transitioning .raion-label,
.map-transitioning .city-label,
.map-transitioning .city-dot,
.map-transitioning .river-line,
.map-transitioning .river-area,
.map-transitioning .threat-icon-wrapper,
.map-transitioning .threat-trail,
.map-transitioning .threat-uncertainty-circle {
    opacity: 0 !important;
}

.trails-wait .threat-trail {
    opacity: 0 !important;
    transition: none !important;
}

.zoom-no-fill-animate .alert-status-shape {
    transition: none !important;
}

.map-transitioning-instant .leaflet-raionBorders-pane,
.map-transitioning-instant .leaflet-osmLabelsPane-pane,
.map-transitioning-instant .alert-status-shape,
.map-transitioning-instant .occupied-territory-shape,
.map-transitioning-instant .region-label,
.map-transitioning-instant .raion-label,
.map-transitioning-instant .city-label,
.map-transitioning-instant .city-dot,
.map-transitioning-instant .river-line,
.map-transitioning-instant .river-area,
.map-transitioning-instant .threat-icon-wrapper,
.map-transitioning-instant .threat-trail,
.map-transitioning-instant .threat-uncertainty-circle {
    transition: none !important;
}

.leaflet-tooltip {
    white-space: normal !important;
    overflow-wrap: break-word;
}

.threat-icon {
    position: relative;
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 0 1.5px rgba(0, 0, 0, 0.9)) drop-shadow(0 0 3px rgba(0, 0, 0, 0.55))
        drop-shadow(3px 5px 3px rgba(0, 0, 0, 0.45));
}

.kyiv-mode-active .leaflet-map-pane .threat-icon {
    filter: drop-shadow(0 0 2px rgba(0, 0, 0, 1)) drop-shadow(0 0 4.5px rgba(0, 0, 0, 0.85))
        drop-shadow(4px 6px 5px rgba(0, 0, 0, 0.7));
}

.threat-icon-rotate {
    width: 100%;
    height: 100%;
}

.threat-cluster {
    cursor: pointer;
}

.threat-cluster-badge {
    position: absolute;
    right: -7px;
    bottom: -7px;
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    box-sizing: border-box;
    border-radius: 9px;
    border: 1.5px solid #ffffff;
    background: #1f2937;
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    line-height: 14px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.55);
    pointer-events: none;
}

.threat-group-badge {
    position: absolute;
    left: -6px;
    bottom: -6px;
    min-width: 13px;
    height: 13px;
    padding: 0 3px;
    box-sizing: border-box;
    border-radius: 7px;
    border: 1px solid #1f2937;
    background: #ffffff;
    color: #1f2937;
    font-size: 9px;
    font-weight: 700;
    line-height: 11px;
    text-align: center;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
    pointer-events: none;
}

.threat-explosion {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.threat-explosion-flash {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 10px;
    height: 10px;
    margin: -5px 0 0 -5px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 240, 180, 1) 0%, rgba(255, 160, 60, 0.8) 45%, rgba(255, 80, 40, 0) 75%);
    opacity: 1;
    transform: scale(0.4);
    transition: transform 950ms ease-in-out, opacity 950ms ease-in-out;
}

.threat-explosion-flash.exploding {
    transform: scale(6);
    opacity: 0;
}

.threat-debris {
    position: absolute;
    top: 50%;
    left: 50%;
    background: #ffc020;
    box-shadow: 0 0 5px rgba(255, 140, 0, 0.95);
    border-radius: 1px;
    opacity: 1;
    transform: translate(-50%, -50%) translate(0, 0) rotate(0deg) scale(1);
    transition: transform 1900ms ease-in-out, opacity 1900ms ease-in-out;
}

.threat-debris.exploding {
    transform: translate(-50%, -50%) translate(var(--dx), var(--dy)) rotate(var(--rot)) scale(0.3);
    opacity: 0;
}

.leaflet-bar {
    box-shadow: none !important;
}

.leaflet-bar a,
.leaflet-control-fullscreen,
.leaflet-control-layers-toggle {
    box-sizing: border-box !important;
    width: 36px !important;
    height: 36px !important;
    line-height: 34px !important;
    background-color: var(--map-chrome-bg) !important;
    color: var(--map-chrome-text);
    border: 1px solid var(--map-chrome-border) !important;
    border-radius: 10px !important;

    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4) !important;
}

.leaflet-control-fullscreen,
.leaflet-control-layers-toggle {
    background-size: 22px 22px !important;
}

.leaflet-bar a:hover,
.leaflet-control-fullscreen:hover,
.leaflet-control-layers-toggle:hover {
    background-color: var(--map-chrome-hover) !important;
}

.leaflet-control-layers-toggle {
    background-color: var(--map-chrome-bg) !important;
}

.leaflet-bar.leaflet-control:not(.leaflet-control-fullscreen):not(.leaflet-control-layers-toggle) {
    border: none !important;
}

.leaflet-control-layers:not(.leaflet-control-layers-expanded) {
    background: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    border: none !important;
}

.leaflet-control-zoom-in,
.leaflet-control-zoom-out {
    font-size: 20px !important;
}

.leaflet-control-zoom a + a {
    margin-top: 10px;
}

.leaflet-bar a.leaflet-control-center,
.leaflet-bar a.leaflet-control-screenshot {
    display: flex;
    align-items: center;
    justify-content: center;
}

.leaflet-bar a.leaflet-control-kyiv-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.kyiv-toggle-text {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.5px;
    line-height: 1;
}

.screenshot-hide-controls .leaflet-control-zoom,
.screenshot-hide-controls .leaflet-control-fullscreen,
.screenshot-hide-controls .leaflet-control-layers,
.screenshot-hide-controls .leaflet-control-center-wrapper,
.screenshot-hide-controls .leaflet-control-kyiv-toggle-wrapper,
.screenshot-hide-controls .leaflet-control-screenshot-wrapper,
.screenshot-hide-controls .threat-hint {
    visibility: hidden !important;
}

#screenshotToast {
    position: absolute;
    left: 50%;
    bottom: 24px;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: min(420px, calc(100% - 32px));
    background: var(--map-chrome-bg);
    color: var(--map-chrome-text);
    border: 1px solid var(--map-chrome-border);
    padding: 8px 16px 8px 8px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
    z-index: 1000;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

#screenshotToast.screenshot-toast-error {
    padding-left: 16px;
    background: #7a2e2e;
    border-color: #a14a4a;
    color: #ffffff;
}

.screenshot-toast-thumb {
    display: block;
    width: 112px;
    height: auto;
    max-height: 72px;
    object-fit: cover;
    border-radius: 7px;
    border: 1px solid var(--map-chrome-border);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.screenshot-toast-text {
    line-height: 1.3;
}

#screenshotToast.hidden {
    opacity: 0;
    pointer-events: none;
}

#appAttribution,
#alertsAttribution,
#neptunAttribution,
#deepStateAttribution {
    color: inherit;
}

.river-line {
    stroke: #3f8fc0;
}

.river-area {
    stroke: #3f8fc0;
    fill: #3f8fc0;
}

.map-label-anchor {
    pointer-events: none;
}

.region-label {
    position: absolute;
    left: 0;
    top: 0;
    transform: translate(-50%, -50%);
    white-space: nowrap;
    pointer-events: none;
}

.raion-label {
    position: absolute;
    left: 0;
    top: 0;
    transform: translate(-50%, calc(-100% - 4px));
    white-space: nowrap;
    pointer-events: none;
}

.region-label {
    font-size: 11px;
    font-weight: 700;
    color: #2e2a1f;
    opacity: 0.5;
    text-shadow:
        -1px -1px 2px #d9d3c1,
        1px -1px 2px #d9d3c1,
        -1px 1px 2px #d9d3c1,
        1px 1px 2px #d9d3c1;
}

.region-label.region-label-small {
    font-size: 9px;
}

.region-label.region-label-tiny {
    font-size: 8px;
}

.kyiv-raion-labels {
    pointer-events: none;
}

.kyiv-raion-label {
    position: absolute;
    left: 0;
    top: 0;
    width: 0;
    height: 0;
}

.kyiv-raion-label > span {
    position: absolute;
    left: 0;
    top: 0;
    transform: translate(-50%, -50%);
    white-space: nowrap;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #3a3629;
    text-shadow:
        -1px -1px 2px #f3f1ea,
        1px -1px 2px #f3f1ea,
        -1px 1px 2px #f3f1ea,
        1px 1px 2px #f3f1ea;
}

.raion-border {
    stroke: #5e5238;
}

.raion-label {
    font-size: 9px;
    font-weight: 400;
    font-style: italic;
    color: #4f6459;
    opacity: 0.55;
    text-shadow:
        -1px -1px 2px #d9d3c1,
        1px -1px 2px #d9d3c1,
        -1px 1px 2px #d9d3c1,
        1px 1px 2px #d9d3c1;
}

.city-border {
    stroke: #7a3b2e;
    fill: #7a3b2e;
}

.city-dot {
    position: absolute;
    left: 0;
    top: 0;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #7a3b2e;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.85);
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.city-label {
    position: absolute;
    left: 0;
    top: 5px;
    transform: translate(-50%, 0);
    font-size: 10px;
    font-weight: 700;
    color: #7a3b2e;
    opacity: 0.6;
    white-space: nowrap;
    pointer-events: none;
    text-shadow:
        -1px -1px 2px #d9d3c1,
        1px -1px 2px #d9d3c1,
        -1px 1px 2px #d9d3c1,
        1px 1px 2px #d9d3c1;
}

#statusBar {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 1000;
    background: var(--map-chrome-bg);
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
    padding: 8px 14px;
    text-align: center;
    font-family: 'IBM Plex Sans', 'Segoe UI', system-ui, sans-serif;
    color: var(--map-chrome-text);
    pointer-events: none;
}

#statusClock {
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.15);
    line-height: 1.25;

    font-variant-numeric: tabular-nums;
}

#statusAlertCount {
    margin-top: 4px;
    padding-top: 4px;
    border-top: 1px solid rgba(127, 127, 127, 0.25);
}

.status-count-row {
    font-size: 12px;
    font-weight: 500;
    color: #b3261e;
    padding: 1px 0;
}

.leaflet-top.leaflet-right {
    margin-top: calc(var(--status-bar-height, 58px) + 20px);
}

.threat-legend,
.threat-hint,
.leaflet-control-layers-expanded {
    background: var(--map-chrome-bg);
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
    padding: 10px 14px;
    font-size: 12px;
    color: var(--map-chrome-text);
}

.threat-legend,
.threat-hint {
    user-select: none;
    pointer-events: none;
}

.threat-hint {
    max-width: 230px;
    padding: 8px 12px;
}

.hint-title {
    font-weight: 600;
    margin-bottom: 4px;
}

.hint-row {
    padding: 0;
    font-size: 11px;
    line-height: 1.3;
    opacity: 0.75;
}

.threats-zoom-hidden .threat-icon-wrapper,
.threats-zoom-hidden .threat-uncertainty-circle,
.threats-zoom-hidden .threat-trail {
    opacity: 0 !important;
    transition: none !important;
}

.hint-disclaimer {
    margin-top: 4px;
    padding-top: 4px;
    border-top: 1px solid rgba(128, 128, 128, 0.35);
    font-size: 11px;
    line-height: 1.3;
    opacity: 0.75;
}

.leaflet-control-layers label:has(input:disabled) {
    opacity: 0.5;
}

.legend-title {
    font-weight: 600;
    margin-bottom: 8px;
}

.legend-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 3px 0;
}

.legend-row .threat-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.legend-row .threat-icon svg {
    width: 100%;
    height: 100%;
}

.legend-swatch {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.leaflet-popup-content {
    font-size: 13px;
    line-height: 1.5;
}

@media (prefers-color-scheme: dark) {:root:not([data-theme="light"]) #map {
        background: #101720;
    }:root:not([data-theme="light"]) .leaflet-tile-pane,
:root:not([data-theme="light"]) .leaflet-overlay-pane,
:root:not([data-theme="light"]) .leaflet-outsideMaskPane-pane,
:root:not([data-theme="light"]) .leaflet-raionBordersPane-pane {
        filter: none;
    }:root:not([data-theme="light"]) .kyiv-raion-label > span {
        color: #d6dbe4;
        text-shadow:
            -1px -1px 2px #162030,
            1px -1px 2px #162030,
            -1px 1px 2px #162030,
            1px 1px 2px #162030;
    }:root:not([data-theme="light"]) .threat-icon {
        filter: drop-shadow(0 0 1px rgba(0, 0, 0, 0.7)) drop-shadow(2px 4px 4px rgba(0, 0, 0, 0.6));
    }:root:not([data-theme="light"]) .leaflet-popup-content-wrapper,
:root:not([data-theme="light"]) .leaflet-popup-tip {
        background: var(--map-chrome-bg);
        color: #e6e6e6;
    }:root:not([data-theme="light"]) #statusClock {
        text-shadow: 0 1px 1px rgba(0, 0, 0, 0.5);
    }:root:not([data-theme="light"]) #statusAlertCount {
        color: #ff6b60;
    }:root:not([data-theme="light"]) .leaflet-bar a,
:root:not([data-theme="light"]) .leaflet-control-fullscreen,
:root:not([data-theme="light"]) .leaflet-control-layers-toggle {
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.6) !important;
    }:root:not([data-theme="light"]) .leaflet-tooltip {
        background: var(--map-chrome-bg) !important;
        border-color: #3a4048 !important;
        color: #e6e6e6 !important;
    }:root:not([data-theme="light"]) .leaflet-tooltip-top:before {
        border-top-color: var(--map-chrome-bg) !important;
    }:root:not([data-theme="light"]) .leaflet-control-attribution {
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
    }:root:not([data-theme="light"]) .threat-legend,
:root:not([data-theme="light"]) .threat-hint,
:root:not([data-theme="light"]) .leaflet-control-layers-expanded {
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
    }:root:not([data-theme="light"]) .river-line {
        stroke: #6ea8fe;
    }:root:not([data-theme="light"]) .river-area {
        stroke: #6ea8fe;
        fill: #6ea8fe;
    }:root:not([data-theme="light"]) .region-label {
        color: #e3e8ee;
        text-shadow:
            -1px -1px 2px #333a42,
            1px -1px 2px #333a42,
            -1px 1px 2px #333a42,
            1px 1px 2px #333a42;
    }:root:not([data-theme="light"]) .raion-border {
        stroke: #a8b1bd;
    }:root:not([data-theme="light"]) .raion-label {
        color: #9fc2b0;
        text-shadow:
            -1px -1px 2px #333a42,
            1px -1px 2px #333a42,
            -1px 1px 2px #333a42,
            1px 1px 2px #333a42;
    }:root:not([data-theme="light"]) .city-border {
        stroke: #e2836f;
        fill: #e2836f;
    }:root:not([data-theme="light"]) .city-dot {
        background: #e2836f;
        box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.6);
    }:root:not([data-theme="light"]) .city-label {
        color: #ef9a86;
        text-shadow:
            -1px -1px 2px #333a42,
            1px -1px 2px #333a42,
            -1px 1px 2px #333a42,
            1px 1px 2px #333a42;
    }
}
:root[data-theme="dark"] #map {
        background: #101720;
    }:root[data-theme="dark"] .leaflet-tile-pane,
:root[data-theme="dark"] .leaflet-overlay-pane,
:root[data-theme="dark"] .leaflet-outsideMaskPane-pane,
:root[data-theme="dark"] .leaflet-raionBordersPane-pane {
        filter: none;
    }:root[data-theme="dark"] .kyiv-raion-label > span {
        color: #d6dbe4;
        text-shadow:
            -1px -1px 2px #162030,
            1px -1px 2px #162030,
            -1px 1px 2px #162030,
            1px 1px 2px #162030;
    }:root[data-theme="dark"] .threat-icon {
        filter: drop-shadow(0 0 1px rgba(0, 0, 0, 0.7)) drop-shadow(2px 4px 4px rgba(0, 0, 0, 0.6));
    }:root[data-theme="dark"] .leaflet-popup-content-wrapper,
:root[data-theme="dark"] .leaflet-popup-tip {
        background: var(--map-chrome-bg);
        color: #e6e6e6;
    }:root[data-theme="dark"] #statusClock {
        text-shadow: 0 1px 1px rgba(0, 0, 0, 0.5);
    }:root[data-theme="dark"] #statusAlertCount {
        color: #ff6b60;
    }:root[data-theme="dark"] .leaflet-bar a,
:root[data-theme="dark"] .leaflet-control-fullscreen,
:root[data-theme="dark"] .leaflet-control-layers-toggle {
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.6) !important;
    }:root[data-theme="dark"] .leaflet-tooltip {
        background: var(--map-chrome-bg) !important;
        border-color: #3a4048 !important;
        color: #e6e6e6 !important;
    }:root[data-theme="dark"] .leaflet-tooltip-top:before {
        border-top-color: var(--map-chrome-bg) !important;
    }:root[data-theme="dark"] .leaflet-control-attribution {
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
    }:root[data-theme="dark"] .threat-legend,
:root[data-theme="dark"] .threat-hint,
:root[data-theme="dark"] .leaflet-control-layers-expanded {
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
    }:root[data-theme="dark"] .river-line {
        stroke: #6ea8fe;
    }:root[data-theme="dark"] .river-area {
        stroke: #6ea8fe;
        fill: #6ea8fe;
    }:root[data-theme="dark"] .region-label {
        color: #e3e8ee;
        text-shadow:
            -1px -1px 2px #333a42,
            1px -1px 2px #333a42,
            -1px 1px 2px #333a42,
            1px 1px 2px #333a42;
    }:root[data-theme="dark"] .raion-border {
        stroke: #a8b1bd;
    }:root[data-theme="dark"] .raion-label {
        color: #9fc2b0;
        text-shadow:
            -1px -1px 2px #333a42,
            1px -1px 2px #333a42,
            -1px 1px 2px #333a42,
            1px 1px 2px #333a42;
    }:root[data-theme="dark"] .city-border {
        stroke: #e2836f;
        fill: #e2836f;
    }:root[data-theme="dark"] .city-dot {
        background: #e2836f;
        box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.6);
    }:root[data-theme="dark"] .city-label {
        color: #ef9a86;
        text-shadow:
            -1px -1px 2px #333a42,
            1px -1px 2px #333a42,
            -1px 1px 2px #333a42,
            1px 1px 2px #333a42;
    }


.detail-map-on .leaflet-image-layer {
    opacity: 0 !important;
    transition: opacity 0.25s ease;
}

.sat-map-on .leaflet-image-layer {
    opacity: 0 !important;
}

.sat-basemap:not(.detail-map-on) .city-label-kyiv {
    display: none;
}

.sat-basemap .region-label,
.sat-basemap .raion-label,
.sat-basemap .city-label,
.sat-basemap .kyiv-raion-label > span {
    color: #23282c;
    opacity: 1;
    font-style: normal;
    letter-spacing: 0.03em;
    text-shadow:
        0 0 3px #eef0f0,
        0 0 3px #eef0f0,
        -1px -1px 2px #eef0f0,
        1px -1px 2px #eef0f0,
        -1px 1px 2px #eef0f0,
        1px 1px 2px #eef0f0;
}

@media (prefers-color-scheme: dark) {:root:not([data-theme="light"]) .sat-basemap .region-label,
:root:not([data-theme="light"]) .sat-basemap .raion-label,
:root:not([data-theme="light"]) .sat-basemap .city-label,
:root:not([data-theme="light"]) .sat-basemap .kyiv-raion-label > span {
        color: #e6e9eb;
        text-shadow:
            0 0 3px #0c0f12,
            0 0 3px #0c0f12,
            -1px -1px 2px #0c0f12,
            1px -1px 2px #0c0f12,
            -1px 1px 2px #0c0f12,
            1px 1px 2px #0c0f12;
    }
}
:root[data-theme="dark"] .sat-basemap .region-label,
:root[data-theme="dark"] .sat-basemap .raion-label,
:root[data-theme="dark"] .sat-basemap .city-label,
:root[data-theme="dark"] .sat-basemap .kyiv-raion-label > span {
        color: #e6e9eb;
        text-shadow:
            0 0 3px #0c0f12,
            0 0 3px #0c0f12,
            -1px -1px 2px #0c0f12,
            1px -1px 2px #0c0f12,
            -1px 1px 2px #0c0f12,
            1px 1px 2px #0c0f12;
    }


.sat-basemap .region-label {
    font-size: 13px;
    font-weight: 700;
}

.sat-basemap .region-label.region-label-small {
    font-size: 11px;
}

.sat-basemap .region-label.region-label-tiny {
    font-size: 10px;
}

.sat-basemap .raion-label {
    font-size: 11px;
    font-weight: 600;
}

.sat-basemap .city-label {
    font-size: 12px;
    font-weight: 600;
}

.sat-basemap .kyiv-raion-label > span {
    font-size: 14px;
    font-weight: 700;
}

.sat-map-on .river-line,
.sat-map-on .river-area,
.detail-map-on .river-line,
.detail-map-on .river-area {
    display: none;
}

.detail-map-on .city-label,
.detail-map-on .city-dot {
    display: none;
}

#map.awaiting-data {
    background: var(--map-chrome-bg);
}

#map.awaiting-data #statusBar,
#map.awaiting-data .leaflet-control-container {
    visibility: hidden;
}

.data-gate {
    position: absolute;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    box-sizing: border-box;
    pointer-events: none;
}

.data-gate-text {
    max-width: 420px;
    padding: 16px 22px;
    box-sizing: border-box;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--map-chrome-text);
    background: var(--map-chrome-bg);
    border: 1px solid var(--map-chrome-border);
    border-radius: 12px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.22);
}

.awaiting-outline {
    filter: blur(7px);
    opacity: 0.8;
}

.leaflet-bottom.leaflet-right .threat-hint {
    width: 290px;
    max-width: none;
    box-sizing: border-box;
}

.leaflet-bottom.leaflet-right .threat-hint:has(+ .leaflet-control-attribution) {
    margin-bottom: 0 !important;
    padding-bottom: 4px;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.threat-hint + .leaflet-control-attribution {
    position: relative;
    width: 290px;
    box-sizing: border-box;
    margin: -1px 10px 10px 0 !important;
    padding: 4px 12px 8px;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
    clip-path: inset(0 -8px -8px -8px);
    font-size: 11px;
    line-height: 1.3;
}

.threat-hint + .leaflet-control-attribution {
    font-size: 0;
}

.threat-hint + .leaflet-control-attribution,
.threat-hint + .leaflet-control-attribution a {
    color: color-mix(in srgb, var(--map-chrome-text) 75%, transparent);
}

.threat-hint + .leaflet-control-attribution .attr-item,
.threat-hint + .leaflet-control-attribution .attr-item a {
    font-size: 11px;
    line-height: 1.3;
}

.threat-hint + .leaflet-control-attribution .attr-item {
    display: block;
}

.threat-hint + .leaflet-control-attribution::before {
    content: '';
    position: absolute;
    top: 0;
    left: 12px;
    right: 12px;
    height: 1px;
    background: rgba(128, 128, 128, 0.35);
}

.screenshot-hide-controls .threat-hint {
    display: none;
}

.screenshot-hide-controls .threat-hint + .leaflet-control-attribution {
    width: auto;
    margin: 0 5px 5px 0 !important;
    padding: 1px 7px;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
    clip-path: none;
    font-size: 9px;
    line-height: 1.5;
}

.screenshot-hide-controls .threat-hint + .leaflet-control-attribution::before {
    display: none;
}

.screenshot-hide-controls .threat-hint + .leaflet-control-attribution .attr-item,
.screenshot-hide-controls .threat-hint + .leaflet-control-attribution .attr-item a {
    display: inline;
    font-size: 9px;
    line-height: 1.5;
}

.map-search {
    position: relative;
}

.leaflet-bar a.map-search-button {
    display: flex;
    align-items: center;
    justify-content: center;
}

.map-search-panel {
    position: absolute;
    left: calc(100% + 8px);
    top: 0;
    width: min(320px, calc(100vw - 86px));
    background: var(--map-chrome-bg);
    border: 1px solid var(--map-chrome-border);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    z-index: 1100;
}

.map-search-panel[hidden] {
    display: none;
}

.map-search-input {
    box-sizing: border-box;
    width: 100%;
    height: 34px;
    padding: 0 10px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--map-chrome-text);
    font: inherit;
    font-size: 14px;
    outline: none;
}

@media (pointer: coarse) {
    .map-search-input {
        font-size: 16px;
    }
}

.map-search-input::placeholder {
    color: var(--map-chrome-text);
    opacity: 0.6;
}

.map-search-results {
    margin: 0;
    padding: 0;
    list-style: none;
    max-height: 288px;
    overflow-y: auto;
}

.map-search-results:not(:empty) {
    border-top: 1px solid var(--map-chrome-border);
}

.map-search-item,
.map-search-empty {
    display: flex;
    flex-direction: column;
    gap: 1px;
    padding: 6px 10px;
    color: var(--map-chrome-text);
    font-size: 13px;
}

.map-search-item {
    cursor: pointer;
}

.map-search-item.active {
    background: var(--map-chrome-hover);
}

.map-search-name {
    font-weight: 600;
}

.map-search-extra {
    font-size: 11px;
    opacity: 0.7;
}

.map-search-empty {
    opacity: 0.7;
}

.screenshot-hide-controls .map-search {
    visibility: hidden !important;
}

.kyiv-mode-active .map-search {
    display: none;
}

.outside-mask-shape {
    filter: blur(var(--outside-blur, 24px));
}

.threat-hint .hint-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    margin: 0 0 4px;
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
    pointer-events: auto;
}

.threat-hint .hint-head .hint-title {
    margin: 0;
}

.threat-hint .hint-chevron {
    flex: none;
    opacity: 0.7;
    transition: transform 0.2s ease;
}

.threat-hint.hint-expanded .hint-chevron {
    transform: rotate(180deg);
}

.threat-hint .hint-head:hover .hint-chevron {
    opacity: 1;
}

.threat-hint:not(.hint-expanded) .hint-rows,
.threat-hint:not(.hint-expanded) .hint-disclaimer-full,
.threat-hint.hint-expanded .hint-disclaimer-short {
    display: none;
}

.threat-hint:not(.hint-expanded) .hint-disclaimer-short {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
}

.threat-hint:not(.hint-expanded) + .leaflet-control-attribution .attr-item:not(:has(#osmDetailAttribution, #osmAttribution, #neptunAttribution)) {
    display: none;
}

.threat-hint .hint-toggle {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    flex: none;
    font-size: 11px;
    font-weight: 500;
    opacity: 0.8;
}

.threat-hint .hint-head:hover .hint-toggle {
    opacity: 1;
}

.threat-hint .hint-toggle .hint-chevron {
    opacity: 1;
}

.threat-hint:not(.hint-expanded) .hint-label-collapse,
.threat-hint.hint-expanded .hint-label-expand {
    display: none;
}

.threat-hint {
    pointer-events: auto;
    cursor: pointer;
}

.threat-hint .hint-head {
    padding: 2px 0;
}

.threat-hint:hover .hint-toggle {
    opacity: 1;
}
