html,
body {
    margin: 0;
    width: 100%;
    height: 100%;
    font-family: Arial, sans-serif;
    background: #0f172a;
    color: #e5e7eb;
}

.webmap-layout {
    display: flex;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

.webmap-sidebar {
    width: 360px;
    height: 100vh;
    background: rgba(15, 23, 42, 0.96);
    border-right: 1px solid rgba(148, 163, 184, 0.25);
    padding: 20px;
    box-sizing: border-box;
    overflow-y: auto;
    z-index: 10;
}

.webmap-brand {
    margin-bottom: 22px;
}

.webmap-title {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.webmap-subtitle {
    margin-top: 6px;
    font-size: 12px;
    color: #94a3b8;
    line-height: 1.4;
}

.webmap-mode-switcher {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin-bottom: 18px;
}

.webmap-mode-switcher button,
.quick-periods button,
.webmap-tools button {
    background: rgba(30, 41, 59, 0.95);
    color: #e5e7eb;
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 8px;
    padding: 9px 10px;
    cursor: pointer;
}

.webmap-tools button.active {
    background: #2563eb;
    border-color: #3b82f6;
    color: #ffffff;
}

.measure-tooltip {
    position: relative;
    padding: 5px 8px;
    color: #e5e7eb;
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 7px;
    font-size: 12px;
    white-space: nowrap;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
}

.measure-tooltip-static {
    background: rgba(37, 99, 235, 0.95);
    border-color: rgba(59, 130, 246, 0.8);
}

.measure-help {
    position: absolute;
    right: 72px;
    bottom: 18px;
    z-index: 40;
    padding: 9px 12px;
    color: #cbd5e1;
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 10px;
    font-size: 12px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

.measure-help.hidden {
    display: none;
}

.webmap-mode-switcher button.active,
.quick-periods button.active {
    background: #2563eb;
    border-color: #3b82f6;
}

.webmap-search {
    margin-bottom: 22px;
}

.webmap-search input {
    width: 100%;
    box-sizing: border-box;
    padding: 11px 12px;
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, 0.3);
    background: rgba(15, 23, 42, 0.8);
    color: #e5e7eb;
}

.webmap-section {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid rgba(148, 163, 184, 0.2);
}

.webmap-section h3 {
    margin: 0 0 12px;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #94a3b8;
}

.webmap-section label {
    display: block;
    margin: 11px 0;
    font-size: 14px;
}

.quick-periods {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.webmap-main {
    position: relative;
    flex: 1;
    height: 100vh;
    background: #020617;
}

.webmap-map {
    width: 100%;
    height: 100%;
}

.map-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    font-size: 18px;
}

.webmap-tools {
    position: absolute;
    right: 18px;
    top: 18px;
    display: grid;
    gap: 8px;
    z-index: 20;
}

.webmap-tools button {
    width: 42px;
    height: 42px;
    padding: 0;
    font-size: 18px;
}

.basemap-panel {
    position: absolute;
    right: 72px;
    top: 138px;
    width: 190px;
    padding: 12px;
    background: rgba(15, 23, 42, 0.96);
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 12px;
    z-index: 30;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

.basemap-panel.hidden {
    display: none;
}

.basemap-panel-title {
    margin-bottom: 10px;
    font-size: 12px;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.basemap-option {
    display: block;
    width: 100%;
    margin-top: 8px;
    padding: 9px 10px;
    text-align: left;
    color: #e5e7eb;
    background: rgba(30, 41, 59, 0.9);
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 8px;
    cursor: pointer;
}

.basemap-option.active {
    background: #2563eb;
    border-color: #3b82f6;
}

.feature-panel {
    position: absolute;
    right: 72px;
    top: 18px;
    width: 340px;
    max-height: calc(100vh - 36px);
    padding: 18px;
    box-sizing: border-box;
    background: rgba(15, 23, 42, 0.97);
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 16px;
    z-index: 35;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.42);
    overflow-y: auto;
}

.feature-panel.hidden {
    display: none;
}

.feature-panel-close {
    position: absolute;
    right: 12px;
    top: 10px;
    width: 30px;
    height: 30px;
    color: #e5e7eb;
    background: rgba(30, 41, 59, 0.9);
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 8px;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
}

.feature-panel-kicker {
    margin-bottom: 8px;
    padding-right: 36px;
    color: #94a3b8;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.feature-panel h2 {
    margin: 0 36px 16px 0;
    font-size: 20px;
    line-height: 1.25;
}

.feature-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 16px;
}

.feature-meta div {
    padding: 10px;
    background: rgba(30, 41, 59, 0.7);
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 10px;
}

.feature-meta span {
    display: block;
    margin-bottom: 4px;
    color: #94a3b8;
    font-size: 11px;
}

.feature-meta strong {
    display: block;
    color: #e5e7eb;
    font-size: 13px;
}

.feature-description {
    margin: 0 0 18px;
    color: #cbd5e1;
    font-size: 14px;
    line-height: 1.55;
}

.feature-actions {
    display: grid;
    gap: 8px;
}

.feature-actions a {
    display: block;
    padding: 10px 12px;
    border-radius: 10px;
    text-align: center;
    text-decoration: none;
    font-size: 14px;
}

.feature-action-primary {
    color: #ffffff;
    background: #2563eb;
    border: 1px solid #3b82f6;
}

.feature-action-secondary {
    color: #e5e7eb;
    background: rgba(30, 41, 59, 0.9);
    border: 1px solid rgba(148, 163, 184, 0.25);
}

.ol-popup-cursor {
    cursor: pointer;
}


.map-state-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 14px;
}

.map-state-summary div {
    padding: 9px 10px;
    background: rgba(30, 41, 59, 0.65);
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 8px;
}

.map-state-summary span {
    display: block;
    margin-bottom: 4px;
    color: #94a3b8;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.map-state-summary strong {
    display: block;
    color: #e5e7eb;
    font-size: 13px;
}


.layers-panel {
    display: grid;
    gap: 14px;
}

.layer-setting-label {
    margin-top: 7px;
    margin-bottom: 7px;
    color: #94a3b8;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.layer-choice-group {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}

.layer-choice {
    padding: 7px 8px;
    color: #cbd5e1;
    background: rgba(30, 41, 59, 0.9);
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 8px;
    font-size: 12px;
    cursor: pointer;
}

.layer-choice.active {
    color: #ffffff;
    background: #2563eb;
    border-color: #3b82f6;
}

.layer-range {
    width: 100%;
}

.layer-opacity-value {
    margin-top: 4px;
    color: #94a3b8;
    font-size: 11px;
}

.layers-loading,
.layers-empty {
    color: #94a3b8;
    font-size: 13px;
}


.focus-area {
    margin-bottom: 22px;
    padding: 12px;
    background: rgba(15, 23, 42, 0.55);
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 12px;
}

.focus-area-label {
    margin-bottom: 8px;
    color: #94a3b8;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.focus-area-current {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

#focus-area-name {
    color: #e5e7eb;
    font-size: 15px;
    font-weight: 600;
}

.focus-area-clear {
    padding: 4px 8px;
    color: #cbd5e1;
    background: rgba(30, 41, 59, 0.9);
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 7px;
    font-size: 11px;
    cursor: pointer;
}

.focus-area-clear.hidden {
    display: none;
}

.focus-area-select {
    width: 100%;
    padding: 9px 10px;
    color: #e5e7eb;
    background: rgba(30, 41, 59, 0.9);
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
}

.focus-area-select:hover,
.focus-area-clear:hover {
    border-color: rgba(59, 130, 246, 0.75);
}

.focus-country-select {
    width: 100%;
    padding: 9px 10px;
    color: #e5e7eb;
    background: rgba(30, 41, 59, 0.9);
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
}

.focus-country-select:focus {
    outline: none;
    border-color: rgba(59, 130, 246, 0.85);
}


.layer-group {
    padding: 0;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.48);
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 14px;
}

.layer-group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    padding: 11px 12px;
    color: #e5e7eb;
    background: rgba(30, 41, 59, 0.62);
    border: none;
    cursor: pointer;
    text-align: left;
}

.layer-group-header:hover {
    background: rgba(30, 41, 59, 0.85);
}

.layer-group-title-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.layer-group-chevron {
    color: #94a3b8;
    font-size: 12px;
    transition: transform 0.18s ease;
}

.layer-group.collapsed .layer-group-chevron {
    transform: rotate(-90deg);
}

.layer-group-title {
    margin: 0;
    color: #e5e7eb;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.layer-group-count {
    flex-shrink: 0;
    padding: 3px 7px;
    color: #93c5fd;
    background: rgba(37, 99, 235, 0.16);
    border: 1px solid rgba(59, 130, 246, 0.22);
    border-radius: 999px;
    font-size: 11px;
}

.layer-group-body {
    padding: 10px;
    display: grid;
    gap: 10px;
}

.layer-group.collapsed .layer-group-body {
    display: none;
}

.layer-card {
    margin-top: 0;
    padding: 12px;
    background: rgba(15, 23, 42, 0.62);
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 12px;
}

.layer-card.disabled {
    opacity: 0.72;
}

.layer-card.disabled .layer-settings {
    display: none;
}

.layer-card-header {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.layer-card-checkbox {
    margin-top: 3px;
    width: 16px;
    height: 16px;
    accent-color: #38bdf8;
}

.layer-card-main {
    flex: 1;
    min-width: 0;
}

.layer-card-title {
    color: #e5e7eb;
    font-size: 14px;
    font-weight: 650;
    line-height: 1.3;
}

.layer-card-description {
    margin-top: 4px;
    color: #94a3b8;
    font-size: 12px;
    line-height: 1.35;
}

.layer-settings {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid rgba(148, 163, 184, 0.14);
}

.focus-panel {
    position: absolute;
    right: 72px;
    top: 18px;
    width: 340px;
    max-height: calc(100vh - 36px);
    padding: 18px;
    box-sizing: border-box;
    background: rgba(15, 23, 42, 0.97);
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 16px;
    z-index: 34;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.42);
    overflow-y: auto;
}

.focus-panel.hidden {
    display: none;
}

.focus-panel-close {
    position: absolute;
    right: 12px;
    top: 10px;
    width: 30px;
    height: 30px;
    color: #e5e7eb;
    background: rgba(30, 41, 59, 0.9);
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 8px;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
}

.focus-panel-kicker {
    margin-bottom: 8px;
    padding-right: 36px;
    color: #94a3b8;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.focus-panel h2 {
    margin: 0 36px 16px 0;
    font-size: 20px;
    line-height: 1.25;
}

.focus-panel-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 16px;
}

.focus-panel-meta div {
    padding: 10px;
    background: rgba(30, 41, 59, 0.7);
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 10px;
}

.focus-panel-meta span {
    display: block;
    margin-bottom: 4px;
    color: #94a3b8;
    font-size: 11px;
}

.focus-panel-meta strong {
    display: block;
    color: #e5e7eb;
    font-size: 13px;
}

.focus-panel-description {
    margin: 0 0 18px;
    color: #cbd5e1;
    font-size: 14px;
    line-height: 1.55;
}

.focus-panel-actions {
    display: grid;
    gap: 8px;
}

.focus-panel-actions button,
.focus-panel-actions a {
    display: block;
    padding: 10px 12px;
    border-radius: 10px;
    text-align: center;
    font-size: 14px;
    cursor: pointer;
}

.focus-panel-actions .feature-action-secondary {
    color: #e5e7eb;
    background: rgba(30, 41, 59, 0.9);
    border: 1px solid rgba(148, 163, 184, 0.25);
}

.focus-panel-note {
    margin: 0 0 18px;
    padding: 10px 12px;
    color: #cbd5e1;
    background: rgba(30, 41, 59, 0.55);
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 10px;
    font-size: 12px;
    line-height: 1.45;
}

.focus-panel-actions a,
.focus-panel-actions button {
    text-decoration: none;
}

.feature-kicker {
    margin-bottom: 8px;
    padding-right: 36px;
    color: #94a3b8;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.feature-title {
    margin: 0 36px 16px 0;
    font-size: 20px;
    line-height: 1.25;
    color: #e5e7eb;
}

.feature-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 16px;
}

.feature-grid-item {
    padding: 10px;
    background: rgba(30, 41, 59, 0.7);
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 10px;
}

.feature-grid-item span {
    display: block;
    margin-bottom: 4px;
    color: #94a3b8;
    font-size: 11px;
}

.feature-grid-item strong {
    display: block;
    color: #e5e7eb;
    font-size: 13px;
}

.feature-text {
    margin: 0 0 18px;
    color: #cbd5e1;
    font-size: 14px;
    line-height: 1.55;
}

.feature-actions {
    display: grid;
    gap: 8px;
}

.feature-actions a,
.feature-actions button {
    display: block;
    padding: 10px 12px;
    border-radius: 10px;
    text-align: center;
    text-decoration: none;
    font-size: 14px;
}

.feature-action-primary {
    color: #ffffff;
    background: #2563eb;
    border: 1px solid #3b82f6;
}

.feature-action-secondary {
    color: #e5e7eb;
    background: rgba(30, 41, 59, 0.9);
    border: 1px solid rgba(148, 163, 184, 0.25);
}


.layer-legend {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid rgba(148, 163, 184, 0.14);
}

.layer-legend-title {
    margin-bottom: 8px;
    color: #94a3b8;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.layer-legend-list {
    display: grid;
    gap: 7px;
}

.layer-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #cbd5e1;
    font-size: 12px;
    line-height: 1.35;
}

.layer-legend-symbol {
    display: inline-block;
    flex-shrink: 0;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.75);
}

.layer-legend-symbol.small {
    width: 8px;
    height: 8px;
}

.layer-legend-symbol.medium {
    width: 11px;
    height: 11px;
}

.layer-legend-symbol.large {
    width: 15px;
    height: 15px;
}

.layer-legend-line {
    width: 18px;
    height: 3px;
    border-radius: 999px;
}

.layer-legend-square {
    width: 11px;
    height: 11px;
    border-radius: 3px;
}

.layer-card.disabled .layer-legend {
    display: none;
}