html, body {
min-height: 100%;
margin: 0;
padding: 0;
background-color: var(--bg);
}

.map-main {
flex: 0 0 auto;
max-width: none;
overflow: visible;
padding: 0 !important;
}

.map-page {
width: min(100%, 96rem);
margin: 0 auto;
padding: clamp(1rem, 2vw, 2rem);
}

.map-hero-panel {
display: grid;
grid-template-columns: minmax(0, 1fr) minmax(24rem, 34rem);
gap: 16px;
align-items: end;
margin-bottom: 16px;
padding: 24px;
border-radius: var(--md-sys-shape-corner-extra-large);
background: var(--md-sys-color-surface-container-low);
}

.map-hero-copy {
display: flex;
flex-direction: column;
gap: 0.5rem;
}

.map-page-title {
max-width: 13ch;
margin: 0;
font: var(--md-sys-typescale-display-medium-weight) var(--md-sys-typescale-display-medium-size) / var(--md-sys-typescale-display-medium-line-height) var(--md-sys-typescale-display-medium-font);
color: var(--md-sys-color-on-surface);
}

.map-page-copy {
max-width: 44rem;
margin: 0;
font: var(--md-sys-typescale-body-large-weight) var(--md-sys-typescale-body-large-size) / var(--md-sys-typescale-body-large-line-height) var(--md-sys-typescale-body-large-font);
color: var(--md-sys-color-on-surface-variant);
}

.map-stat-strip {
display: grid;
grid-template-columns: repeat(4, minmax(0, 1fr));
gap: 0.6rem;
}

.map-layout {
display: grid;
grid-template-columns: minmax(0, 1.7fr) minmax(20rem, 28rem);
grid-template-areas:
"map overview"
"list list";
gap: 1rem;
align-items: start;
}

.map-stage {
grid-area: map;
position: relative;
min-width: 0;
}

#map {
height: clamp(34rem, calc(100vh - 16rem), 42rem);
width: 100%;
border: 1px solid var(--border);
border-radius: var(--md-sys-shape-corner-extra-large);
overflow: hidden;
box-shadow: var(--shadow-2);
transition: opacity 0.6s ease-out;
}

.map-sidebar-panel {
display: flex;
flex-direction: column;
gap: 16px;
padding: 16px;
border-radius: var(--md-sys-shape-corner-large);
background: var(--md-sys-color-surface-container-low);
}

.map-overview-panel {
grid-area: overview;
position: static;
}

.map-sidebar-list-panel {
grid-area: list;
gap: 1rem;
align-self: start;
padding: 1.15rem;
}

.map-sidebar-kicker {
font: var(--md-sys-typescale-label-large-weight) var(--md-sys-typescale-label-large-size) / var(--md-sys-typescale-label-large-line-height) var(--md-sys-typescale-label-large-font);
color: var(--md-sys-color-primary);
}

.map-sidebar-title {
margin: 0;
font: var(--md-sys-typescale-headline-medium-weight) var(--md-sys-typescale-headline-medium-size) / var(--md-sys-typescale-headline-medium-line-height) var(--md-sys-typescale-headline-medium-font);
color: var(--md-sys-color-on-surface);
}

.map-sidebar-copy {
margin: 0;
font: var(--md-sys-typescale-body-medium-weight) var(--md-sys-typescale-body-medium-size) / var(--md-sys-typescale-body-medium-line-height) var(--md-sys-typescale-body-medium-font);
color: var(--md-sys-color-on-surface-variant);
}

.map-heat-mode {
display: flex;
flex-direction: column;
gap: 8px;
padding: 12px;
border-radius: var(--md-sys-shape-corner-medium);
background: var(--md-sys-color-surface-container);
}

.map-heat-mode-heading {
font: var(--md-sys-typescale-title-small-weight) var(--md-sys-typescale-title-small-size) / var(--md-sys-typescale-title-small-line-height) var(--md-sys-typescale-title-small-font);
color: var(--md-sys-color-on-surface-variant);
}

.map-heat-mode-options {
display: flex;
flex-wrap: wrap;
gap: 0;
}

.map-heat-mode-btn {
position: relative;
display: inline-flex;
align-items: center;
justify-content: center;
flex: 1 1 5.5rem;
min-height: 40px;
padding: 0 12px;
margin-inline-start: -1px;
border: 1px solid var(--md-sys-color-outline);
border-radius: 0;
background: transparent;
color: var(--md-sys-color-on-surface);
font: var(--md-sys-typescale-label-large-weight) var(--md-sys-typescale-label-large-size) / var(--md-sys-typescale-label-large-line-height) var(--md-sys-typescale-label-large-font);
cursor: pointer;
transition: background-color var(--md-sys-motion-duration-short4) var(--md-sys-motion-easing-standard);
}

.map-heat-mode-btn:first-child { margin-inline-start: 0; border-start-start-radius: var(--md-sys-shape-corner-full); border-end-start-radius: var(--md-sys-shape-corner-full); }
.map-heat-mode-btn:last-child { border-start-end-radius: var(--md-sys-shape-corner-full); border-end-end-radius: var(--md-sys-shape-corner-full); }
.map-heat-mode-btn:hover { background: color-mix(in srgb, var(--md-sys-color-on-surface) 8%, transparent); }
.map-heat-mode-btn.is-active {
background: var(--md-sys-color-secondary-container);
color: var(--md-sys-color-on-secondary-container);
}
.map-heat-mode-btn:focus-visible { outline: var(--md-sys-state-focus-indicator-thickness) solid var(--md-sys-state-focus-indicator-color); outline-offset: 2px; z-index: 1; }

.map-heat-mode-copy {
margin: 0;
font: var(--md-sys-typescale-body-small-weight) var(--md-sys-typescale-body-small-size) / var(--md-sys-typescale-body-small-line-height) var(--md-sys-typescale-body-small-font);
color: var(--md-sys-color-on-surface-variant);
}

.map-date-window {
display: flex;
flex-direction: column;
gap: 8px;
padding: 12px;
border-radius: var(--md-sys-shape-corner-medium);
background: var(--md-sys-color-surface-container);
}

.map-date-window-options {
display: flex;
flex-wrap: wrap;
gap: 8px;
}

.map-date-window-link {
display: inline-flex;
align-items: center;
justify-content: center;
min-height: 32px;
padding: 0 16px;
border: 1px solid var(--md-sys-color-outline-variant);
border-radius: var(--md-sys-shape-corner-small);
background: transparent;
color: var(--md-sys-color-on-surface-variant);
font: var(--md-sys-typescale-label-large-weight) var(--md-sys-typescale-label-large-size) / var(--md-sys-typescale-label-large-line-height) var(--md-sys-typescale-label-large-font);
text-decoration: none;
transition: background-color var(--md-sys-motion-duration-short4) var(--md-sys-motion-easing-standard);
}

.map-date-window-link:hover { background: color-mix(in srgb, var(--md-sys-color-on-surface) 8%, transparent); color: var(--md-sys-color-on-surface); }
.map-date-window-link.is-active {
border-color: transparent;
background: var(--md-sys-color-secondary-container);
color: var(--md-sys-color-on-secondary-container);
}

.map-stat-card {
display: flex;
flex-direction: column;
gap: 4px;
min-height: 5rem;
padding: 12px 16px;
border-radius: var(--md-sys-shape-corner-medium);
background: var(--md-sys-color-surface-container);
}

.map-stat-label {
font: var(--md-sys-typescale-label-large-weight) var(--md-sys-typescale-label-large-size) / var(--md-sys-typescale-label-large-line-height) var(--md-sys-typescale-label-large-font);
color: var(--md-sys-color-on-surface-variant);
}

.map-stat-value {
font: var(--md-sys-typescale-headline-medium-weight) var(--md-sys-typescale-headline-medium-size) / var(--md-sys-typescale-headline-medium-line-height) var(--md-sys-typescale-headline-medium-font);
color: var(--md-sys-color-on-surface);
}

.is-service-map {
padding-top: clamp(1.5rem, 3vw, 3rem);
}

.service-map-header {
display: grid;
grid-template-columns: minmax(0, 1fr) minmax(18rem, 28rem);
gap: 1.5rem;
align-items: end;
padding-bottom: 1.25rem;
border-bottom: 1px solid var(--border);
margin-bottom: 1rem;
}

.is-service-map .map-page-title {
max-width: none;
font-size: clamp(2.5rem, 5vw, 4.5rem);
line-height: 0.98;
}

.service-map-stats {
display: grid;
grid-template-columns: repeat(3, minmax(0, 1fr));
gap: 0.75rem;
margin: 0;
}

.service-map-stats div {
min-width: 0;
}

.service-map-stats dt {
font-size: 0.68rem;
font-weight: 800;
letter-spacing: 0.12em;
text-transform: uppercase;
color: var(--text-muted);
}

.service-map-stats dd {
margin: 0.35rem 0 0;
font-size: 2rem;
font-weight: 800;
line-height: 1;
color: var(--text);
}

.service-map-layout {
display: grid;
grid-template-columns: minmax(0, 1fr) minmax(18rem, 28rem);
gap: 1rem;
align-items: start;
}

.is-service-map #map {
height: clamp(34rem, calc(100vh - 15rem), 46rem);
border-radius: var(--md-sys-shape-corner-medium);
box-shadow: var(--shadow-1);
}

.service-event-list {
display: flex;
flex-direction: column;
gap: 1rem;
padding: 1rem;
border: 1px solid var(--border);
border-radius: var(--md-sys-shape-corner-medium);
background: var(--surface);
}

.service-event-list__header {
display: flex;
align-items: center;
justify-content: space-between;
gap: 1rem;
}

.service-event-list__header h2 {
margin: 0;
font-size: 1rem;
font-weight: 800;
color: var(--text);
}

.service-event-list__header a {
font-size: 0.82rem;
font-weight: 800;
color: var(--primary);
text-decoration: none;
}

.service-event-list__items {
display: flex;
flex-direction: column;
border-top: 1px solid var(--border);
}

.service-event-row {
display: grid;
grid-template-columns: 5.8rem minmax(0, 1fr);
gap: 0.85rem;
padding: 0.9rem 0;
border-bottom: 1px solid var(--border);
text-decoration: none;
color: inherit;
}

.service-event-row__time {
font-size: 0.72rem;
font-weight: 800;
letter-spacing: 0.08em;
text-transform: uppercase;
color: var(--text-muted);
}

.service-event-row.is-live .service-event-row__time {
color: var(--accent);
}

.service-event-row__body {
min-width: 0;
}

.service-event-row__title {
display: block;
font-size: 0.95rem;
font-weight: 800;
line-height: 1.35;
color: var(--text);
}

.service-event-row__place {
display: block;
margin-top: 0.25rem;
font-size: 0.82rem;
color: var(--text-muted);
}

.service-event-list__empty {
margin: 0;
padding-top: 0.75rem;
border-top: 1px solid var(--border);
font-size: 0.9rem;
line-height: 1.5;
color: var(--text-muted);
}

.map-sidebar-highlight {
display: flex;
flex-direction: column;
gap: 0.65rem;
padding: 1rem;
border-radius: var(--md-sys-shape-corner-large);
background: linear-gradient(140deg, color-mix(in srgb, var(--primary) 11%, var(--surface)), var(--surface));
border: 1px solid color-mix(in srgb, var(--primary) 18%, var(--border));
}

.map-sidebar-highlight-copy {
margin: 0;
font-size: 1.05rem;
line-height: 1.35;
color: var(--text);
}

.map-sidebar-highlight-meta {
display: flex;
flex-wrap: wrap;
gap: 0.5rem 0.85rem;
font-size: 0.84rem;
font-weight: 700;
color: var(--text-muted);
}

.map-sidebar-link {
display: inline-flex;
align-items: center;
justify-content: space-between;
gap: 8px;
width: 100%;
min-height: 48px;
padding: 0 16px 0 24px;
border-radius: var(--md-sys-shape-corner-full);
background: var(--md-sys-color-primary);
color: var(--md-sys-color-on-primary);
font: var(--md-sys-typescale-label-large-weight) var(--md-sys-typescale-label-large-size) / var(--md-sys-typescale-label-large-line-height) var(--md-sys-typescale-label-large-font);
text-decoration: none;
}

.map-sidebar-link:hover {
color: var(--md-sys-color-on-primary);
box-shadow: var(--md-sys-elevation-level1);
}

.map-legend {
display: grid;
gap: 0.6rem;
padding: 0.15rem 0 0;
}

.map-legend-row {
display: grid;
grid-template-columns: auto minmax(0, 1fr);
align-items: center;
gap: 0.6rem;
font-size: 0.88rem;
line-height: 1.4;
color: var(--text-muted);
}

.map-legend-bubble {
display: inline-flex;
align-items: center;
justify-content: center;
width: 1.8rem;
height: 1.8rem;
border-radius: 50%;
background: radial-gradient(circle at 30% 30%, color-mix(in srgb, var(--primary) 72%, white), var(--primary) 76%);
color: var(--primary-contrast);
font-size: 0.76rem;
font-weight: 800;
box-shadow: 0 12px 20px -16px rgba(15, 23, 42, 0.5);
}

.map-legend-chip {
display: inline-flex;
align-items: center;
justify-content: center;
padding: 0.28rem 0.62rem;
border-radius: var(--md-sys-shape-corner-full);
background: color-mix(in srgb, var(--primary) 12%, var(--surface));
color: var(--primary);
border: 1px solid color-mix(in srgb, var(--primary) 18%, transparent);
font-size: 0.72rem;
font-weight: 800;
letter-spacing: 0.08em;
text-transform: uppercase;
}

.map-heat-chip {
display: inline-flex;
align-items: center;
justify-content: center;
align-self: flex-start;
padding: 4px 12px;
border-radius: var(--md-sys-shape-corner-small);
font: var(--md-sys-typescale-label-medium-weight) var(--md-sys-typescale-label-medium-size) / var(--md-sys-typescale-label-medium-line-height) var(--md-sys-typescale-label-medium-font);
border: 0;
}

.map-heat-chip.is-surging {
background: var(--md-sys-color-error-container);
color: var(--md-sys-color-on-error-container);
}

.map-heat-chip.is-heating {
background: var(--md-sys-color-warning-container);
color: var(--md-sys-color-on-warning-container);
}

.map-heat-chip.is-active {
background: var(--md-sys-color-primary-container);
color: var(--md-sys-color-on-primary-container);
}

.map-heat-chip.is-watch {
background: var(--md-sys-color-surface-container-highest);
color: var(--md-sys-color-on-surface-variant);
}

.map-hotspot-list {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
gap: 0.9rem;
max-height: none;
overflow: visible;
padding-right: 0;
}

.map-hotspot-card {
display: flex;
flex-direction: column;
gap: 0.85rem;
height: 100%;
padding: 1rem;
border-radius: var(--md-sys-shape-corner-large);
background: var(--surface);
border: 1px solid var(--border);
transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.map-hotspot-card.is-active {
border-color: color-mix(in srgb, var(--primary) 34%, transparent);
box-shadow: 0 20px 36px -26px color-mix(in srgb, var(--primary) 48%, transparent);
transform: translateY(-1px);
}

.map-hotspot-focus {
display: flex;
flex-direction: column;
gap: 0.75rem;
width: 100%;
padding: 0;
border: 0;
background: transparent;
text-align: left;
cursor: pointer;
}

.map-hotspot-top {
display: flex;
align-items: center;
justify-content: space-between;
gap: 0.75rem;
}

.map-hotspot-score {
font-size: 0.9rem;
font-weight: 700;
color: var(--text);
}

.map-hotspot-title {
margin: 0;
font-size: 1.05rem;
font-weight: 700;
line-height: 1.2;
color: var(--text);
}

.map-hotspot-status {
font-size: 0.78rem;
font-weight: 600;
color: var(--text-muted);
text-align: right;
}

.map-hotspot-summary {
display: flex;
flex-wrap: wrap;
gap: 0.45rem 0.9rem;
margin-top: -0.15rem;
font-size: 0.9rem;
font-weight: 600;
color: var(--text-muted);
}

.map-hotspot-counts {
display: flex;
flex-wrap: wrap;
gap: 0.55rem;
}

.map-hotspot-counts span {
display: inline-flex;
align-items: center;
gap: 0.38rem;
padding: 0.34rem 0.55rem;
border-radius: var(--md-sys-shape-corner-full);
background: var(--step-bg);
font-size: 0.82rem;
font-weight: 600;
color: var(--text-muted);
}

.map-hotspot-caption {
margin: 0;
font-size: 0.86rem;
color: var(--primary);
}

.map-hotspot-tags {
display: flex;
flex-wrap: wrap;
gap: 0.45rem;
}

.map-hotspot-tags span {
display: inline-flex;
align-items: center;
padding: 0.28rem 0.6rem;
border-radius: var(--md-sys-shape-corner-full);
background: var(--step-bg);
font-size: 0.78rem;
font-weight: 600;
color: var(--text-muted);
}

.map-list-intro {
display: flex;
flex-direction: column;
gap: 0.35rem;
}

.map-list-title {
margin: 0;
font-family: var(--md-ref-typeface-brand);
font-size: var(--md-sys-typescale-headline-small-size);
line-height: var(--md-sys-typescale-headline-small-line-height);
font-weight: 400;
letter-spacing: 0;
color: var(--md-sys-color-on-surface);
}

.map-list-copy {
margin: 0;
font-size: 0.9rem;
line-height: 1.5;
color: var(--text-muted);
}

.map-hotspot-footer {
display: flex;
align-items: flex-end;
justify-content: space-between;
gap: 0.75rem;
}

.map-hotspot-latest {
display: flex;
flex-direction: column;
gap: 0.18rem;
min-width: 0;
}

.map-hotspot-latest-label {
font-size: 0.72rem;
font-weight: 700;
letter-spacing: 0.08em;
text-transform: uppercase;
color: var(--text-muted);
}

.map-hotspot-latest-copy {
font-size: 0.9rem;
line-height: 1.45;
color: var(--text);
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
}

.map-hotspot-link {
display: inline-flex;
align-items: center;
gap: 0.4rem;
white-space: nowrap;
font-size: 0.88rem;
font-weight: 700;
color: var(--primary);
text-decoration: none;
}

.map-empty-state {
display: flex;
flex-direction: column;
gap: 0.4rem;
padding: 1rem 0 0.2rem;
}

.map-empty-title {
margin: 0;
font-size: 1rem;
font-weight: 700;
color: var(--text);
}

.map-empty-copy {
margin: 0;
font-size: 0.95rem;
line-height: 1.55;
color: var(--text-muted);
}

.leaflet-container {
    background: var(--bg) !important;
}

.leaflet-popup-content-wrapper {
    background: var(--surface) !important;
    color: var(--text) !important;
}

.leaflet-popup-tip {
    background: var(--surface) !important;
}

/* Leaflet UI (controls + attribution) */
.leaflet-control {
  background: var(--surface) !important;
  color: var(--text) !important;
  border: 1px solid var(--border) !important;
  box-shadow: var(--control-shadow) !important;
}

.leaflet-control a {
  color: var(--text) !important;
}

.leaflet-control a:hover {
  background: var(--step-bg) !important;
}

.leaflet-control-attribution {
  background: color-mix(in srgb, var(--surface) 85%, transparent) !important;
  color: var(--text-muted) !important;
  border: 1px solid var(--border) !important;
}
.leaflet-control-attribution a {
  color: var(--primary) !important;
}

.leaflet-popup-content {
  color: var(--text) !important;
}

/* Toast */
.map-toast {
position: fixed;
bottom: 20px;
left: 50%;
transform: translateX(-50%) translateY(20px);
background: var(--toast-bg);
color: var(--toast-text);
padding: 10px 18px;
border-radius: var(--md-sys-shape-corner-medium);
font-size: 0.9rem;
opacity: 0;
transition: opacity 0.4s ease, transform 0.4s ease;
box-shadow: var(--shadow-2);
z-index: 1000;
}
.map-toast.show {
opacity: 1;
transform: translateX(-50%) translateY(0);
}

/* Cluster */
.marker-cluster-small div {
background: linear-gradient(145deg, var(--pin-news-1), var(--pin-news-2));
border: 3px solid var(--cluster-border);
color: var(--cluster-text);
font-weight: 600;
font-size: 14px;
}

/* Fix Leaflet injecting opacity on popup (causing faded button text) */
.leaflet-popup-content-wrapper,
.leaflet-popup-content {
    opacity: 1 !important;
}

/* Fix uneven padding between left/right */
.leaflet-popup-content {
    padding: 0 !important;
}

/* Fix the internal container Leaflet adds */
.leaflet-popup-content > div {
    margin: 0 !important;
    padding: 0 !important;
}

/* Photo styling */
.popup-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-top-left-radius: 14px;
    border-top-right-radius: 14px;
    background: var(--map-surface-2);
}

/* Title */
.popup-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.3;
}

/* Summary text */
.popup-description {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.45;
    margin-bottom: 1.3rem;
}

/* Footer container */
.popup-footer {
    display: flex;
    justify-content: flex-start;
    margin-top: 10px;
}

/* Button — FIXED version */
.popup-button {
    display: inline-block;
    background: var(--primary);
    color: var(--primary-contrast) !important;
    padding: 0.65rem 1.3rem;
    border-radius: var(--md-sys-shape-corner-medium);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 600;
    transition: background 0.15s ease;
}

/* Header row container */
.popup-header {
display: flex;
gap: 14px;
align-items: flex-start;
margin-bottom: 14px;
}

/* Thumbnail */
.popup-thumb {
    width: 70px;
    height: 70px;
    border-radius: var(--md-sys-shape-corner-medium);
    object-fit: cover;
    background: var(--map-surface-2);
    flex-shrink: 0;
}

/* NEWS / EVENT chip */
.popup-type {
    display: inline-block;
    padding: 4px 10px;
    font-size: 0.72rem;
    font-weight: 700;
    border-radius: var(--md-sys-shape-corner-extra-small);
    margin-bottom: 6px;
}

.popup-type.news {
    background: var(--chip-news-bg);
    color: var(--chip-news-text);
}

.popup-type.event {
    background: var(--chip-event-bg);
    color: var(--chip-event-text);
}

.popup-type.figure,
.popup-type.active {
background: color-mix(in srgb, var(--primary) 12%, var(--surface));
color: var(--primary);
}

.popup-type.surging {
    background: color-mix(in srgb, #ef4444 16%, var(--surface));
    color: #b91c1c;
}

.popup-type.heating {
    background: color-mix(in srgb, #f59e0b 18%, var(--surface));
    color: #b45309;
}

.popup-type.watch {
    background: color-mix(in srgb, var(--text-muted) 10%, var(--surface));
    color: var(--text-muted);
}

/* Title + date container */
.popup-info {
    flex: 1;
}

.popup-date {
    font-size: 0.78rem;
    color: var(--map-muted);
    margin-top: 4px;
}

.popup-button:hover {
    background: var(--primary-hover);
}

.popup-chip-row {
display: flex;
flex-wrap: wrap;
gap: 0.45rem;
margin-bottom: 0.75rem;
}

.popup-chip {
display: inline-flex;
align-items: center;
gap: 0.32rem;
padding: 0.3rem 0.55rem;
border-radius: var(--md-sys-shape-corner-full);
background: var(--step-bg);
font-size: 0.75rem;
font-weight: 600;
color: var(--text-muted);
}

.popup-chip .md-icon {
--md-icon-size: 14px;
}

.popup-topic-list {
display: flex;
flex-direction: column;
gap: 0.45rem;
margin-bottom: 1rem;
}

.popup-topic-row {
display: flex;
align-items: center;
justify-content: space-between;
gap: 0.8rem;
padding: 0.65rem 0.8rem;
border-radius: var(--md-sys-shape-corner-medium);
background: var(--step-bg);
text-decoration: none;
}

.popup-topic-name {
font-size: 0.9rem;
font-weight: 700;
color: var(--text);
}

.popup-topic-meta {
font-size: 0.78rem;
font-weight: 600;
color: var(--text-muted);
white-space: nowrap;
}

/* Map Pins */
.custom-pin {
position: relative;
width: 38px;
height: 38px;
background: var(--pin-base);
border-radius: 50% 50% 50% 0;
transform: rotate(-45deg);
box-shadow: var(--shadow-3);
display: flex;
align-items: center;
justify-content: center;
transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.pin-news {
background: linear-gradient(145deg, var(--pin-news-1), var(--pin-news-2));
}
.pin-event {
background: linear-gradient(145deg, var(--pin-event-1), var(--pin-event-2));
}

.pin-event-live {
background: linear-gradient(145deg, var(--accent), var(--primary));
box-shadow: 0 20px 34px -18px color-mix(in srgb, var(--accent) 70%, transparent);
}

.pin-live-ring {
position: absolute;
inset: -0.48rem;
border-radius: 50%;
border: 2px solid color-mix(in srgb, var(--accent) 80%, white);
animation: map-live-pin-pulse 1.55s ease-out infinite;
}

@keyframes map-live-pin-pulse {
0% {
transform: scale(0.74);
opacity: 0.75;
}
70% {
transform: scale(1.3);
opacity: 0;
}
100% {
transform: scale(1.3);
opacity: 0;
}
}

@media (prefers-reduced-motion: reduce) {
.pin-live-ring {
animation: none;
opacity: 0.55;
}
}
.pin-figure {
background: linear-gradient(145deg, #14b8a6, #0f766e);
}
.pin-icon {
display: flex;
transform: rotate(45deg);
color: var(--pin-icon);
}

.pin-icon .md-icon {
--md-icon-size: 18px;
}

/* Controls */
.map-controls {
  position: absolute;
  top: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 2000;
}

.map-btn {
display: inline-flex;
align-items: center;
justify-content: center;
width: 40px;
height: 40px;
border: 0;
border-radius: var(--md-sys-shape-corner-medium);
background: var(--md-sys-color-surface-container-high);
color: var(--md-sys-color-primary);
box-shadow: var(--md-sys-elevation-level3);
cursor: pointer;
transition: box-shadow var(--md-sys-motion-duration-short4) var(--md-sys-motion-easing-standard);
}

.map-btn:hover {
  box-shadow: var(--md-sys-elevation-level4);
}
.map-btn:focus-visible {
  outline: var(--md-sys-state-focus-indicator-thickness) solid var(--md-sys-state-focus-indicator-color);
  outline-offset: var(--md-sys-state-focus-indicator-outer-offset);
}



.transparent-pin,
.transparent-hotspot {
background: transparent;
border: 0;
}

.map-hotspot-bubble {
position: relative;
display: flex;
align-items: center;
justify-content: center;
width: 3.4rem;
height: 3.4rem;
border-radius: 50%;
border: 3px solid rgba(255, 255, 255, 0.82);
box-shadow: 0 18px 28px -18px rgba(15, 23, 42, 0.45);
font-size: 0.92rem;
font-weight: 800;
color: #fff;
transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.map-hotspot-bubble::after {
content: "";
position: absolute;
inset: -0.42rem;
border-radius: 50%;
border: 1px solid currentColor;
opacity: 0.18;
}

.map-hotspot-bubble.is-surging {
background: radial-gradient(circle at 30% 30%, #fb7185, #dc2626 72%);
}

.map-hotspot-bubble.is-heating {
background: radial-gradient(circle at 30% 30%, #fbbf24, #ea580c 72%);
}

.map-hotspot-bubble.is-active {
background: radial-gradient(circle at 30% 30%, color-mix(in srgb, var(--primary) 70%, white), var(--primary) 74%);
}

.map-hotspot-bubble.is-watch {
background: radial-gradient(circle at 30% 30%, #94a3b8, #475569 72%);
}

.map-hotspot-bubble.is-selected {
transform: scale(1.08);
box-shadow: 0 24px 36px -18px color-mix(in srgb, var(--primary) 65%, transparent);
border-color: color-mix(in srgb, #fff 92%, var(--primary));
}

.map-hotspot-ring {
position: absolute;
inset: -0.6rem;
border-radius: 50%;
border: 1px dashed rgba(255, 255, 255, 0.35);
opacity: 0.7;
}

@media (max-width: 980px) {
.map-page {
padding: 1rem;
}

.service-map-header,
.service-map-layout {
grid-template-columns: 1fr;
}

.service-map-stats {
max-width: 28rem;
}

.map-hero-panel {
grid-template-columns: 1fr;
align-items: start;
}

.map-page-title {
max-width: 11ch;
}

.map-stat-strip {
grid-template-columns: repeat(4, minmax(0, 1fr));
}

.map-layout {
grid-template-columns: minmax(0, 1fr);
grid-template-areas:
"map"
"overview"
"list";
}

#map {
height: 30rem;
}

.map-hotspot-list {
grid-template-columns: 1fr;
}

}

@media (max-width: 720px) {
.map-page {
padding: 0.85rem;
}

.map-hero-panel {
margin-bottom: 0.85rem;
padding: 1rem;
border-radius: var(--md-sys-shape-corner-extra-large);
}

.map-page-title {
font-size: clamp(2.05rem, 12vw, 3.3rem);
}

.map-page-copy {
font-size: 1rem;
}

.map-stat-strip {
grid-template-columns: repeat(2, minmax(0, 1fr));
}

.map-layout {
gap: 0.85rem;
}

.map-sidebar-panel {
padding: 1rem;
border-radius: var(--md-sys-shape-corner-extra-large);
}

.map-stat-card {
min-height: 4.35rem;
padding: 0.75rem 0.85rem;
}

.map-stat-value {
font-size: 1.55rem;
}

#map {
height: min(28rem, 62vh);
min-height: 23rem;
border-radius: var(--md-sys-shape-corner-extra-large);
}

.map-hotspot-footer {
flex-direction: column;
align-items: stretch;
}

.map-hotspot-link {
justify-content: space-between;
}

.map-hotspot-top,
.map-legend-row {
align-items: flex-start;
}

.map-hotspot-status {
text-align: left;
}

.map-hotspot-summary,
.map-sidebar-highlight-meta {
flex-direction: column;
gap: 0.35rem;
}
}

.map-topic-cluster-list {
display: flex;
flex-direction: column;
gap: 0.25rem;
padding: 0 1rem;
}

.map-topic-cluster-row {
display: flex;
flex-wrap: wrap;
align-items: baseline;
gap: 0.25rem 0.75rem;
padding: 0.5rem 0.75rem;
border-radius: var(--md-sys-shape-corner-small);
color: var(--md-sys-color-on-surface);
text-decoration: none;
}

.map-topic-cluster-row:hover {
background: color-mix(in srgb, var(--md-sys-color-on-surface) 8%, transparent);
}

.map-topic-cluster-name {
font-size: var(--md-sys-typescale-label-large-size);
font-weight: 500;
}

.map-topic-cluster-meta {
font-size: var(--md-sys-typescale-body-small-size);
color: var(--md-sys-color-on-surface-variant);
}
