html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}
#map {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}


/* Larger zoom buttons with Font Awesome icons - right side */
.ol-zoom {
  top: 8px;
  left: auto;
  right: 8px;
}
.ol-zoom button {
  width: 44px;
  height: 44px;
  font-size: 22px;
}


/* Custom layer switcher control - right side, clear of the story panel */
.layer-switcher {
  top: 130px;
  left: auto;
  right: 8px;
}
.layer-switcher button {
  width: 44px;
  height: 44px;
  font-size: 22px;
}
.layer-switcher .panel {
  display: none;
  position: absolute;
  top: 0;
  right: 50px;
  background: white;
  border-radius: 4px;
  padding: 8px 12px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
  white-space: nowrap;
}
.layer-switcher.open .panel {
  display: block;
}
.layer-switcher .panel label {
  display: block;
  padding: 4px 0;
  cursor: pointer;
}

/* Draggable legend */
.map-legend {
  position: absolute;
  right: 8px;
  bottom: 40px;
  z-index: 10;
  background: white;
  border-radius: 4px;
  padding: 10px 14px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
  font-family: sans-serif;
  font-size: 13px;
  cursor: grab;
  user-select: none;
  touch-action: none;
}
.map-legend.hidden {
  display: none;
}
.map-legend .legend-header {
  font-weight: bold;
  margin-bottom: 6px;
}
.map-legend .legend-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 2px 0;
}
.map-legend .legend-swatch {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 3px;
  border: 1px solid rgba(0, 0, 0, 0.2);
}



/* Story map panel */
.ol-storymap {
  width: 34%;
  min-width: 320px;
  max-width: 560px;
  font-family: "Segoe UI", -apple-system, "Helvetica Neue", Arial, sans-serif;
  font-size: large;
}
.ol-storymap .chapter {
  min-height: 70vh;
  padding: 1em;
}
.ol-storymap .chapter img {
  max-width: 100%;
}

.ol-storymap .chapter-location { 
	font-size: 0.9em;
	color: #666;
	margin-top: -0.5em;
}

.ol-storymap .chapter-meta { 
	font-size: 0.8em;
	color: #888;
	border-top: 1px solid #eee;
	padding-top: 0.5em;
}	






/* Splash and outro screens */
#splash, #outro {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(22, 26, 32, 0.82);
  backdrop-filter: blur(5px);
}
.splash-card {
  max-width: 480px;
  background: #ffffff;
  border-radius: 6px;
  padding: 40px 44px 36px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: #1c2128;
}
.splash-disc {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  margin-bottom: 28px;
  background: conic-gradient(
	#e74c3c 0turn 0.34turn,
	#7f8c8d 0.34turn 0.48turn,
	#27ae60 0.48turn 0.68turn,
	#f39c12 0.68turn 1turn
  );
  box-shadow: 0 0 0 3px #ffffff, 0 0 0 4px rgba(0, 0, 0, 0.12);
}
.splash-card h1 {
  margin: 0 0 14px;
  font-size: 30px;
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 600;
}
.splash-card p {
  margin: 0 0 14px;
  font-size: 15.5px;
  line-height: 1.6;
  color: #444c56;
  /* max-width: 46ch; */
  text-align: unset;
}
.splash-button {
  margin-top: 18px;
  padding: 12px 22px;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  color: #ffffff;
  background: #1c2128;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}
.splash-button:hover:enabled {
  background: #2f3742;
}
.splash-button:disabled {
  background: #9aa4b0;
  cursor: default;
}
.splash-button:focus-visible {
  outline: 3px solid #f39c12;
  outline-offset: 2px;
}

#outro {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 400ms ease, visibility 400ms;
}
#outro.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
@media (prefers-reduced-motion: reduce) {
  #outro { transition: none; }
}











/* Pie chart popup */
.chart-popup {
  font-family: "Segoe UI", -apple-system, "Helvetica Neue", Arial, sans-serif;
  font-size: 13px;
  min-width: 170px;
}
.chart-popup-header {
  font-weight: 600;
  margin-bottom: 6px;
}
.chart-popup-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 2px 0;
}
.chart-popup-label {
  flex: 1;
}
.chart-popup-value {
  font-variant-numeric: tabular-nums;
}