/* Estilos del visor cartográfico. Complementa styles.css. */
.viewer-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--night);
}
.viewer-head {
  position: static;
  width: min(calc(100% - 48px), var(--max));
  padding: 18px 0;
}
.viewer-main {
  flex: 1;
  display: grid;
  grid-template-columns: 330px 1fr;
  gap: 1px;
  min-height: 0;
  background: #ffffff22;
  border-top: 1px solid #ffffff22;
}
.viewer-aside {
  overflow-y: auto;
  padding: 26px 24px 40px;
  color: #fff;
  background: var(--deep);
}
.viewer-aside h1 {
  margin: 0 0 6px;
  font: 400 30px/1.1 Georgia, serif;
  letter-spacing: -0.03em;
}
.viewer-aside .sub {
  margin: 0 0 24px;
  color: #ffffff8c;
  font-size: 13px;
}
.control {
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid #ffffff1f;
}
.control:last-of-type { border-bottom: 0; }
.control > h2 {
  margin: 0 0 12px;
  color: var(--mint);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.segmented {
  display: grid;
  grid-auto-flow: column;
  gap: 6px;
}
.segmented button {
  padding: 11px 10px;
  color: #ffffffbd;
  background: #ffffff0f;
  border: 1px solid #ffffff2b;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: 0.15s;
}
.segmented button:hover { background: #ffffff1c; }
.segmented button[aria-pressed="true"] {
  color: var(--night);
  background: var(--mint);
  border-color: var(--mint);
}
.months {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 5px;
}
.months button {
  padding: 9px 0;
  color: #ffffffb5;
  background: #ffffff0d;
  border: 1px solid #ffffff24;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: 0.15s;
}
.months button:hover { background: #ffffff1f; }
.months button[aria-pressed="true"] {
  color: var(--night);
  background: var(--sun);
  border-color: var(--sun);
}
.playbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}
.playbar button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 15px;
  color: #fff;
  background: #ffffff12;
  border: 1px solid #ffffff30;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}
.playbar button:hover { background: #ffffff22; }
.playbar span { color: #ffffff70; font-size: 11px; }
.field {
  display: grid;
  gap: 7px;
  margin-top: 14px;
  color: #ffffff9e;
  font-size: 12px;
}
.field input[type="range"] { width: 100%; accent-color: var(--mint); }
.field label { display: flex; justify-content: space-between; gap: 10px; }
.switch {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #ffffffb5;
  font-size: 12px;
  cursor: pointer;
}
.switch input { accent-color: var(--mint); }
.legend-scale {
  height: 14px;
  margin: 10px 0 7px;
  border: 1px solid #ffffff2e;
  border-radius: 4px;
}
.legend-ticks {
  display: flex;
  justify-content: space-between;
  color: #ffffff8c;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.readout {
  display: grid;
  gap: 3px;
  padding: 15px;
  background: #ffffff0d;
  border: 1px solid #ffffff24;
  border-radius: 12px;
}
.readout b {
  font: 400 30px/1 Georgia, serif;
  font-variant-numeric: tabular-nums;
}
.readout small { color: #ffffff7a; font-size: 11px; }
.viewer-map {
  position: relative;
  min-height: 420px;
  background: #0a2129;
}
#map { position: absolute; inset: 0; }
.map-note {
  position: absolute;
  z-index: 500;
  right: 12px;
  bottom: 24px;
  max-width: 300px;
  padding: 11px 14px;
  color: var(--night);
  background: var(--sun);
  border-radius: 10px;
  box-shadow: var(--shadow);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.45;
}
.map-status {
  position: absolute;
  z-index: 500;
  top: 12px;
  left: 50%;
  padding: 8px 16px;
  color: #fff;
  background: #061c22e0;
  border: 1px solid #ffffff30;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 700;
  transform: translateX(-50%);
  transition: opacity 0.2s;
}
.map-status[hidden] { display: none; }
.map-status.error { color: #ffd9d0; border-color: #ff9d85; background: #5d1b12ee; }
.leaflet-container { background: #0a2129; font: inherit; }
.leaflet-control-attribution {
  color: #33454a;
  background: #ffffffd4;
  font-size: 10px;
}
@media (max-width: 900px) {
  .viewer-main { grid-template-columns: 1fr; }
  .viewer-aside { max-height: none; }
  .viewer-map { min-height: 65vh; }
}
