:root {
  --ink: #17363b;
  --muted: #688087;
  --line: rgba(31, 68, 74, 0.16);
  --panel: rgba(250, 252, 251, 0.9);
  --panel-strong: rgba(252, 254, 253, 0.97);
  --accent: #0d918b;
  --accent-dark: #076a67;
  --shadow: 0 14px 42px rgba(43, 68, 73, 0.16);
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #dbe6e4;
}

body,
button,
input {
  font-family: Inter, "Segoe UI", Helvetica, Arial, sans-serif;
}

button,
input {
  color: inherit;
}

button {
  cursor: pointer;
}

.weather-app {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 520px;
  overflow: hidden;
  color: var(--ink);
  background: #dbe6e4;
}

.map,
.cloud-density-canvas,
.cloud-motion-canvas,
.particle-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.map {
  z-index: 1;
}

.particle-canvas {
  z-index: 4;
  display: block;
  opacity: 1;
  visibility: visible;
  pointer-events: none;
}

.cloud-motion-canvas {
  z-index: 3;
  display: block;
  pointer-events: none;
}

.cloud-density-canvas {
  z-index: 2;
  display: block;
  pointer-events: none;
}

.texture-source {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.topbar,
.search-box,
.point-readout,
.wind-farm-panel,
.solar-farm-panel,
.farm-map-hint,
.legend,
.cloud-overlay-legend,
.timeline,
.hover-readout,
.data-error {
  backdrop-filter: blur(18px) saturate(1.12);
  -webkit-backdrop-filter: blur(18px) saturate(1.12);
}

.topbar {
  position: absolute;
  z-index: 10;
  top: 14px;
  right: 16px;
  left: 16px;
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 17px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.brand {
  min-width: 212px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 8px 0 2px;
  border: 0;
  background: transparent;
  text-align: left;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  flex: none;
  border-radius: 12px;
  color: #f8fffe;
  background: linear-gradient(145deg, #13a49d, #0a7773);
  font-size: 27px;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 8px 18px rgba(9, 122, 117, 0.22);
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 12px;
  letter-spacing: 0.15em;
}

.brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.13em;
}

.layer-switcher {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(221, 234, 232, 0.62);
}

.layer-button {
  min-width: 61px;
  min-height: 32px;
  padding: 0 12px;
  border: 0;
  border-radius: 9px;
  color: #5a7278;
  background: transparent;
  font-size: 11px;
  font-weight: 700;
}

.layer-button:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.58);
}

.layer-button.active {
  color: #fff;
  background: var(--accent-dark);
  box-shadow: 0 5px 14px rgba(6, 103, 99, 0.22);
}

.map-toggle {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 4px;
  color: #49646a;
  font-size: 11px;
  font-weight: 700;
  user-select: none;
  cursor: pointer;
}

.map-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.map-toggle span {
  position: relative;
  width: 32px;
  height: 18px;
  flex: none;
  border-radius: 999px;
  background: #cbd9d7;
  transition: background 160ms ease;
}

.map-toggle span::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(26, 57, 62, 0.2);
  transition: transform 160ms ease;
}

.map-toggle input:checked + span {
  background: var(--accent);
}

.map-toggle input:checked + span::after {
  transform: translateX(14px);
}

.map-toggle input:focus-visible + span,
.layer-button:focus-visible,
.brand:focus-visible,
.play-button:focus-visible,
.search-box button:focus-visible,
.search-box input:focus-visible {
  outline: 3px solid rgba(13, 145, 139, 0.3);
  outline-offset: 2px;
}

.farm-mode button:focus-visible,
.wind-farm-panel > button:focus-visible,
.solar-farm-panel > button:focus-visible,
.wind-farm-marker:focus-visible {
  outline: 3px solid rgba(13, 145, 139, 0.34);
  outline-offset: 2px;
}

.forecast-status {
  min-width: 158px;
  margin-left: auto;
  padding-right: 6px;
  text-align: right;
}

.forecast-status strong,
.forecast-status small {
  display: block;
}

.forecast-status strong {
  font-size: 11px;
}

.forecast-status small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

.search-box {
  position: absolute;
  z-index: 9;
  top: 86px;
  left: 16px;
  width: 286px;
  padding: 11px;
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 15px;
  background: var(--panel);
  box-shadow: 0 10px 30px rgba(43, 68, 73, 0.13);
}

.search-box label {
  display: block;
  margin: 0 2px 7px;
  color: #526c72;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.search-box form > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
}

.search-box input {
  width: 100%;
  min-width: 0;
  height: 36px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: none;
  background: rgba(255, 255, 255, 0.9);
  font-size: 11px;
}

.search-box button {
  min-width: 55px;
  border: 0;
  border-radius: 10px;
  color: #fff;
  background: var(--accent-dark);
  font-size: 10px;
  font-weight: 800;
}

.search-results {
  max-height: 216px;
  margin-top: 7px;
  overflow: auto;
  border-top: 1px solid var(--line);
  padding-top: 6px;
}

.search-result {
  width: 100%;
  display: block;
  padding: 8px 7px;
  border: 0;
  border-radius: 8px;
  color: var(--ink);
  background: transparent;
  text-align: left;
}

.search-result:hover {
  background: rgba(207, 229, 225, 0.58);
}

.search-result strong,
.search-result small {
  display: block;
}

.search-result strong {
  font-size: 11px;
}

.search-result small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
}

.search-message {
  padding: 8px 5px 3px;
  color: var(--muted);
  font-size: 10px;
}

.point-readout {
  position: absolute;
  z-index: 9;
  top: 86px;
  right: 16px;
  width: 278px;
  padding: 15px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 16px;
  background: var(--panel-strong);
  box-shadow: var(--shadow);
}

.point-readout > button {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 27px;
  height: 27px;
  border: 0;
  border-radius: 8px;
  color: #688087;
  background: rgba(221, 234, 232, 0.62);
  font-size: 18px;
}

.point-readout > small,
.point-readout > strong {
  display: block;
}

.point-readout > small {
  max-width: 190px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.point-readout > strong {
  margin-top: 8px;
  font-size: 27px;
  letter-spacing: -0.04em;
}

.point-readout dl {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
  margin: 13px 0 0;
}

.point-readout dl div {
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.point-readout dt {
  color: var(--muted);
  font-size: 8px;
}

.point-readout dd {
  margin: 3px 0 0;
  font-size: 10px;
  font-weight: 800;
}

.wind-farm-panel {
  position: absolute;
  z-index: 11;
  top: 86px;
  right: 16px;
  width: min(390px, calc(100% - 32px));
  max-height: calc(100% - 194px);
  padding: 16px;
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 18px;
  background: var(--panel-strong);
  box-shadow: 0 18px 48px rgba(31, 60, 68, 0.22);
}

.solar-farm-panel {
  position: absolute;
  z-index: 11;
  top: 86px;
  right: 16px;
  width: min(390px, calc(100% - 32px));
  max-height: calc(100% - 194px);
  padding: 16px;
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 18px;
  background: var(--panel-strong);
  box-shadow: 0 18px 48px rgba(31, 60, 68, 0.22);
}

.solar-farm-panel > button {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 29px;
  height: 29px;
  border: 0;
  border-radius: 9px;
  color: #688087;
  background: rgba(221, 234, 232, 0.7);
  font-size: 19px;
}

.solar-farm-panel header {
  display: grid;
  gap: 3px;
  padding-right: 34px;
}

.solar-farm-panel header small {
  color: #a3610c;
  font-size: 8px;
  font-weight: 850;
  letter-spacing: 0.11em;
}

.solar-farm-panel header strong {
  font-family: Consolas, "SFMono-Regular", monospace;
  font-size: 22px;
  letter-spacing: 0.035em;
}

.solar-farm-panel header span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
}

.solar-farm-metrics article:first-child strong,
.solar-farm-metrics article:nth-child(3) strong,
.solar-farm-metrics article:nth-child(4) strong {
  color: #b0640b;
}

.solar-farm-model-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin-top: 10px;
}

.solar-farm-model-card > div {
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid rgba(165, 97, 8, 0.16);
  border-radius: 11px;
  background: rgba(255, 245, 224, 0.68);
}

.solar-farm-model-card span,
.solar-farm-model-card strong {
  display: block;
}

.solar-farm-model-card span {
  color: #92734a;
  font-size: 7px;
  font-weight: 850;
  letter-spacing: 0.07em;
}

.solar-farm-model-card strong {
  margin-top: 4px;
  color: #704e20;
  font-size: 11px;
}

.farm-data-note {
  margin: 8px 1px 0;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.45;
}

.wind-farm-panel > button {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 29px;
  height: 29px;
  border: 0;
  border-radius: 9px;
  color: #688087;
  background: rgba(221, 234, 232, 0.7);
  font-size: 19px;
}

.wind-farm-panel header {
  display: grid;
  gap: 3px;
  padding-right: 34px;
}

.wind-farm-panel header small {
  color: var(--accent-dark);
  font-size: 8px;
  font-weight: 850;
  letter-spacing: 0.11em;
}

.wind-farm-panel header strong {
  font-family: Consolas, "SFMono-Regular", monospace;
  font-size: 22px;
  letter-spacing: 0.035em;
}

.wind-farm-panel header span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
}

.farm-mode {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin-top: 13px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(221, 234, 232, 0.58);
}

.farm-mode button {
  min-height: 31px;
  border: 0;
  border-radius: 9px;
  color: #587076;
  background: transparent;
  font-size: 10px;
  font-weight: 800;
}

.farm-mode button.active {
  color: #fff;
  background: var(--accent-dark);
  box-shadow: 0 5px 13px rgba(6, 103, 99, 0.2);
}

.farm-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin-top: 10px;
}

.farm-metrics article {
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(31, 68, 74, 0.11);
  border-radius: 11px;
  background: rgba(241, 248, 246, 0.82);
}

.farm-metrics span,
.farm-metrics strong,
.farm-metrics small {
  display: block;
}

.farm-metrics span {
  color: var(--muted);
  font-size: 7px;
  font-weight: 850;
  letter-spacing: 0.07em;
}

.farm-metrics strong {
  margin-top: 5px;
  font-size: 17px;
  letter-spacing: -0.025em;
}

.farm-metrics small {
  min-height: 12px;
  margin-top: 3px;
  overflow: hidden;
  color: #6d858a;
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.farm-chart-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 13px;
  color: var(--muted);
  font-size: 8px;
}

.farm-chart-heading strong {
  color: var(--ink);
  font-size: 9px;
}

.farm-chart-heading span {
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.farm-chart-heading i {
  width: 12px;
  height: 3px;
  display: inline-block;
  margin-left: 3px;
  border-radius: 99px;
}

.farm-chart-heading .actual-line {
  background: #263f52;
}

.farm-chart-heading .forecast-line {
  background: var(--accent);
}

#farm-chart {
  width: 100%;
  height: 170px;
  display: block;
  margin-top: 7px;
  border: 1px solid rgba(31, 68, 74, 0.1);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.68);
}

#farm-data-note {
  margin: 8px 1px 0;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.45;
}

.farm-map-hint {
  position: absolute;
  z-index: 8;
  top: 172px;
  left: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 11px;
  color: #4e686e;
  background: rgba(250, 252, 251, 0.88);
  box-shadow: 0 8px 20px rgba(43, 68, 73, 0.13);
  font-size: 9px;
}

.farm-key {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.farm-key-symbol {
  display: inline-flex;
  width: 20px;
  height: 20px;
  color: #0d918b;
}

.farm-key-symbol[data-farm-symbol="solar"] { color: #d99018; }
.farm-key-help { color: #6b8089; }

.wind-farm-marker,
.solar-farm-marker {
  /* MapLibre owns this origin and transform. Only the inner badge animates. */
  position: absolute;
  top: 0;
  left: 0;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  transition: none;
}

.wind-farm-marker { color: var(--farm-colour, #0d918b); }
.solar-farm-marker {
  color: var(--solar-farm-colour, #ed9e1b);
}

.farm-marker-icon {
  display: block;
  width: 20px;
  height: 20px;
  overflow: visible;
  filter: drop-shadow(0 1px 1.5px rgba(32, 47, 61, 0.4));
  transform-origin: center;
  transition: transform 130ms ease;
  pointer-events: none;
}

.wind-farm-marker:hover,
.wind-farm-marker.selected,
.wind-farm-marker:focus-visible,
.solar-farm-marker:hover,
.solar-farm-marker.selected,
.solar-farm-marker:focus-visible {
  z-index: 2;
}

.wind-farm-marker:hover .farm-marker-icon,
.wind-farm-marker.selected .farm-marker-icon,
.wind-farm-marker:focus-visible .farm-marker-icon,
.solar-farm-marker:hover .farm-marker-icon,
.solar-farm-marker.selected .farm-marker-icon,
.solar-farm-marker:focus-visible .farm-marker-icon {
  transform: scale(1.18);
}

.farm-marker-selection { opacity: 0; transition: opacity 130ms ease; }
.wind-farm-marker.selected .farm-marker-selection,
.solar-farm-marker.selected .farm-marker-selection { opacity: 1; }

.wind-farm-marker:focus-visible,
.solar-farm-marker:focus-visible {
  outline: 2px solid #193f55;
  outline-offset: 3px;
}

.wind-farm-marker[hidden],
.solar-farm-marker[hidden] {
  display: none;
}

.hover-readout {
  position: absolute;
  z-index: 8;
  min-width: 116px;
  padding: 7px 9px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 10px;
  background: rgba(250, 253, 252, 0.88);
  box-shadow: 0 8px 20px rgba(43, 68, 73, 0.14);
  pointer-events: none;
  font-size: 9px;
  font-weight: 700;
}

.hover-readout strong,
.hover-readout small {
  display: block;
}

.hover-readout strong {
  color: #193b51;
  font-size: 10px;
  line-height: 1.2;
}

.hover-readout small {
  margin-top: 3px;
  color: #5a7280;
  font-size: 8px;
  font-weight: 600;
  line-height: 1.3;
}

.legend {
  position: absolute;
  z-index: 8;
  bottom: 103px;
  left: 18px;
  width: 250px;
  padding: 10px 12px 9px;
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: 13px;
  background: rgba(250, 252, 251, 0.84);
  box-shadow: 0 9px 26px rgba(43, 68, 73, 0.12);
}

.cloud-overlay-legend {
  position: absolute;
  z-index: 8;
  bottom: 170px;
  left: 18px;
  width: 250px;
  padding: 9px 12px 8px;
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: 13px;
  background: rgba(250, 252, 251, 0.88);
  box-shadow: 0 9px 26px rgba(43, 68, 73, 0.12);
}

.cloud-overlay-legend[hidden] {
  display: none;
}

.legend-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 7px;
}

.legend-heading strong {
  font-size: 9px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.legend-heading span {
  color: var(--muted);
  font-size: 9px;
}

.legend-gradient {
  height: 8px;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgba(30, 62, 69, 0.13);
}

.wind-gradient {
  background: linear-gradient(
    90deg,
    #7e57e8 0% 7.49%,
    #2c70f4 7.5% 14.99%,
    #00bede 15% 29.99%,
    #23be65 30% 49.99%,
    #ff8f18 50% 79.99%,
    #e52b77 80% 100%
  );
}

.selection-pin {
  width: 30px;
  height: 42px;
  pointer-events: none;
}

.selection-pin-visual {
  position: relative;
  width: 30px;
  height: 42px;
  filter: drop-shadow(0 5px 5px rgba(25, 55, 61, 0.32));
  transform-origin: 50% 100%;
}

.selection-pin-visual::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 4px;
  width: 22px;
  height: 22px;
  border: 3px solid #fff;
  border-radius: 50% 50% 50% 0;
  background: #0c918b;
  box-shadow: inset 0 0 0 5px #19b4ac;
  transform: rotate(-45deg);
}

.selection-pin-visual::after {
  content: "";
  position: absolute;
  right: 7px;
  bottom: 0;
  left: 7px;
  height: 5px;
  border-radius: 50%;
  background: rgba(31, 62, 68, 0.28);
  filter: blur(1px);
}

.selection-pin-visual.pin-drop {
  animation: pin-drop 360ms cubic-bezier(0.2, 0.82, 0.35, 1.18);
}

@keyframes pin-drop {
  0% {
    opacity: 0;
    transform: translateY(-30px) scale(0.86);
  }
  72% {
    opacity: 1;
    transform: translateY(2px) scale(1.04);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.cloud-gradient {
  background: linear-gradient(
    90deg,
    #e8fcf8 0% 20%,
    #22d3c5 20% 40%,
    #009fe2 40% 60%,
    #444bde 60% 80%,
    #c51873 80% 100%
  );
}

.cloud-impact-gradient {
  background: linear-gradient(
    90deg,
    #e8fcf8 0% 20%,
    #22d3c5 20% 40%,
    #009fe2 40% 60%,
    #444bde 60% 80%,
    #c51873 80% 100%
  );
}

.cloud-impact-labels {
  gap: 5px;
  font-size: 7px;
}

.cloud-impact-labels span {
  min-width: 0;
  flex: 1;
  text-align: center;
}

.wind-speed-labels {
  position: relative;
  display: block;
  height: 10px;
}

.wind-speed-labels span {
  position: absolute;
  transform: translateX(-50%);
}

.wind-speed-labels span:nth-child(1) {
  left: 0;
  transform: none;
}

.wind-speed-labels span:nth-child(2) {
  left: 7.5%;
}

.wind-speed-labels span:nth-child(3) {
  left: 15%;
}

.wind-speed-labels span:nth-child(4) {
  left: 30%;
}

.wind-speed-labels span:nth-child(5) {
  left: 50%;
}

.wind-speed-labels span:nth-child(6) {
  right: 0;
  transform: none;
}

.legend-meaning {
  display: flex;
  justify-content: space-between;
  margin-top: 5px;
  padding-top: 5px;
  border-top: 1px solid rgba(31, 68, 74, 0.1);
  color: #415e65;
  font-size: 7px;
  font-weight: 750;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.legend-meaning[hidden] {
  display: none;
}

.solar-gradient {
  background: linear-gradient(90deg, #493b7d, #506ca5 18%, #3298b7 35%, #33b99e 52%, #a8cb58 68%, #f0c044 82%, #ee713f 92%, #bd3854);
}

.base-gradient {
  background: linear-gradient(90deg, #d8e8e3, #f2f0da, #c9ddd6);
}

.legend-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 5px;
  color: #617a80;
  font-size: 8px;
}

.timeline {
  position: absolute;
  z-index: 10;
  right: 18px;
  bottom: 16px;
  left: 18px;
  min-height: 82px;
  display: grid;
  grid-template-columns: auto minmax(180px, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 17px;
  background: var(--panel-strong);
  box-shadow: var(--shadow);
}

.play-button {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: var(--accent-dark);
  box-shadow: 0 8px 18px rgba(6, 103, 99, 0.22);
}

.timeline-main {
  min-width: 0;
}

.timeline-meta,
.timeline-ends {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.timeline-meta {
  margin-bottom: 5px;
}

.timeline-meta strong {
  font-size: 10px;
}

.timeline-meta span,
.timeline-ends {
  color: var(--muted);
  font-size: 8px;
}

.timeline input[type="range"] {
  width: 100%;
  height: 5px;
  display: block;
  margin: 0;
  border-radius: 999px;
  outline: none;
  appearance: none;
  background: linear-gradient(90deg, var(--accent) 0 var(--progress, 0%), #cbdad7 var(--progress, 0%));
}

.timeline input[type="range"]::-webkit-slider-thumb {
  width: 16px;
  height: 16px;
  border: 3px solid #fff;
  border-radius: 50%;
  appearance: none;
  background: var(--accent-dark);
  box-shadow: 0 2px 8px rgba(6, 103, 99, 0.3);
}

.timeline input[type="range"]::-moz-range-thumb {
  width: 11px;
  height: 11px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--accent-dark);
}

.timeline-ends {
  margin-top: 5px;
}

.timeline-ends span:nth-child(2) {
  min-width: 0;
  color: #65727f;
  overflow: hidden;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.day-night-strip {
  height: 7px;
  display: grid;
  gap: 1px;
  margin-top: 7px;
  overflow: hidden;
  border: 1px solid rgba(48, 72, 89, 0.14);
  border-radius: 999px;
  background: #d5dfe1;
}

.day-night-strip span {
  min-width: 0;
}

.day-night-strip .night {
  background: #3e4d73;
}

.day-night-strip .twilight {
  background: #9f7397;
}

.day-night-strip .day {
  background: #e7bb4d;
}

.day-night-strip .current {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.95);
}

.source-credit {
  min-width: 132px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  color: #587177;
  font-size: 9px;
  font-weight: 700;
}

.live-dot {
  width: 7px;
  height: 7px;
  flex: none;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(13, 145, 139, 0.12);
}

.data-error {
  position: absolute;
  z-index: 20;
  top: 50%;
  left: 50%;
  max-width: 360px;
  padding: 17px 20px;
  border: 1px solid rgba(170, 79, 52, 0.25);
  border-radius: 14px;
  color: #743b2a;
  background: rgba(255, 244, 239, 0.95);
  box-shadow: var(--shadow);
  transform: translate(-50%, -50%);
  text-align: center;
  font-size: 12px;
  font-weight: 700;
}

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

.maplibregl-ctrl-attrib {
  color: #617a80;
  background: rgba(249, 252, 251, 0.72) !important;
  font-size: 9px;
}

.maplibregl-ctrl-group {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 12px !important;
  background: rgba(250, 252, 251, 0.9) !important;
  box-shadow: 0 8px 22px rgba(43, 68, 73, 0.14) !important;
}

.maplibregl-ctrl-top-right {
  top: 76px;
  right: 6px;
}

@media (max-width: 860px) {
  .topbar {
    right: 10px;
    left: 10px;
    gap: 8px;
  }

  .brand {
    min-width: 172px;
  }

  .brand small,
  .forecast-status {
    display: none;
  }

  .layer-button {
    min-width: 58px;
    padding: 0 8px;
  }

  .search-box {
    top: 84px;
    left: 10px;
  }

  .point-readout {
    top: 84px;
    right: 10px;
  }

  .wind-farm-panel {
    top: 84px;
    right: 10px;
  }
  .solar-farm-panel { left: 10px; right: 10px; top: 112px; width: auto; padding: 15px; bottom: calc(var(--timeline-height) + 22px); }
}

@media (max-width: 680px) {
  .weather-app {
    min-height: 460px;
  }

  .topbar {
    align-items: center;
    padding: 7px;
  }

  .brand {
    min-width: 40px;
    width: 40px;
    padding: 0;
  }

  .brand > span:last-child {
    display: none;
  }

  .layer-switcher {
    flex: 1;
  }

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

  .map-toggle {
    font-size: 0;
  }

  .search-box {
    top: 82px;
    width: min(286px, calc(100% - 20px));
  }

  .point-readout {
    top: auto;
    right: 10px;
    bottom: 101px;
    left: 10px;
    width: auto;
  }

  .wind-farm-panel {
    top: auto;
    right: 10px;
    bottom: 101px;
    left: 10px;
    width: auto;
    max-height: min(62vh, calc(100% - 190px));
    padding: 13px;
  }

  .wind-farm-panel header strong {
    font-size: 18px;
  }

  .farm-map-hint {
    display: none;
  }

  .legend {
    display: none;
  }

  .cloud-overlay-legend {
    display: none;
  }

  .timeline {
    right: 10px;
    bottom: 10px;
    left: 10px;
    min-height: 86px;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
    padding: 9px 10px;
  }

  .source-credit {
    display: none;
  }

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

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
