#clima.weather {
  --ow-purple: #30263c;
  --ow-lilac: #e0c9fc;
  --ow-orange: #f6a167;
  --ow-green: #b8edc3;
  --ow-panel-border: #e0c9fc52;
  position: relative;
  isolation: isolate;
  background: var(--ow-purple);
  color: #fff5e7;
}

#clima.weather::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 60% 600px at 93% 16%, #9a74d069, transparent),
    radial-gradient(ellipse 62% 500px at 10% 350px, #af71523b, transparent),
    linear-gradient(112deg, #30263cf5 10%, #46385aed 65%, #443d73d9),
    url('/noche.jpg') center 45% / cover;
}

#clima.weather > * { position: relative; }
#clima.weather .eyebrow { display: flex; align-items: center; gap: 9px; color: #ffcca9; }
#clima.weather .eyebrow::before {
  content: '';
  width: 19px;
  height: 2px;
  border-radius: 10px;
  background: var(--ow-orange);
}

#clima [data-outdoor-weather] {
  max-width: 1200px;
  font-variant-numeric: tabular-nums;
}

#clima .ow-location {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: stretch;
  gap: 15px;
  margin: 30px 0 22px;
}
#clima .ow-location:empty { display: none; }
#clima :is(.ow-map-card, .ow-current) {
  border: 1px solid var(--ow-panel-border);
  border-radius: 23px;
  box-shadow: 0 12px 34px #170f233b;
}
#clima .ow-map-card {
  min-width: 0;
  padding: clamp(14px, 2.4vw, 26px);
  background: linear-gradient(145deg, #28273de6, #3d3159b5);
}
#clima .ow-map-header h3,
#clima :is(.ow-weekly, .ow-detail-metrics) > h3 {
  margin: 0;
  font: 500 clamp(1.3rem, 2.4vw, 1.65rem)/1.15 Oswald, sans-serif;
}
#clima .ow-map-header p {
  margin: 7px 0 14px;
  color: #ebddf8;
  font-size: .83rem;
  line-height: 1.5;
}
#clima .ow-map-choice {
  display: grid;
  gap: 5px;
  width: min(100%, 345px);
  margin: 0 0 12px;
  color: #f1e3fa;
  font: 600 .8rem/1.4 Poppins, sans-serif;
}
#clima .ow-map-select {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid #e0c9fc;
  border-radius: 9px;
  background: #f5e9ff;
  color: #352744;
  color-scheme: light;
  font: 500 .85rem/1.35 Poppins, sans-serif;
  cursor: pointer;
}
#clima .ow-map-stage {
  position: relative;
  width: 100%;
  max-width: 530px;
  margin-inline: auto;
  aspect-ratio: 2540.17 / 2483.42;
}
#clima :is(.ow-map-image, .ow-map-flags, .ow-map-leaders) {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
#clima .ow-map-image {
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 8px 10px #151d236e);
}
#clima .ow-map-leaders { pointer-events: none; }
#clima .ow-map-leaders line { stroke: #eee1f5bc; stroke-width: 1; }
#clima .ow-map-leaders circle { fill: #eee1f5; stroke: #30263c; stroke-width: .8; }
#clima .ow-map-leaders line.is-selected { stroke: #ffad6e; stroke-width: 2; }
#clima .ow-map-leaders circle.is-selected { fill: #ffad6e; }
#clima :is(.ow-map-pin, .ow-map-inset) {
  position: absolute;
  display: grid;
  align-items: center;
  justify-items: center;
  padding: 0;
  border: 1px solid #f8eaff;
  border-radius: 50%;
  background: #4c3570;
  color: #f6e8ff;
  box-shadow: 0 2px 4px #241a2bc9;
  font: 600 .72rem Poppins, sans-serif;
  cursor: pointer;
}
#clima .ow-map-pin {
  top: 50%;
  left: 50%;
  width: clamp(28px, 6.5vw, 34px);
  height: clamp(28px, 6.5vw, 34px);
  transform: translate(-50%, -50%);
}
#clima :is(.ow-map-pin, .ow-map-inset) svg { width: 18px; height: 18px; }
#clima :is(.ow-map-pin, .ow-map-inset):is(:hover, :focus-visible) { z-index: 3; }
#clima :is(.ow-map-pin, .ow-map-inset)[aria-pressed="true"] {
  z-index: 2;
  border-color: #ffedda;
  background: #ffad6e;
  color: #36223c;
}
#clima .ow-pin-label {
  display: none;
  position: absolute;
  left: 50%;
  top: calc(100% + 5px);
  transform: translateX(-50%);
  width: max-content;
  max-width: 155px;
  padding: 4px 7px;
  border-radius: 5px;
  background: #2a2035;
  color: #fff8ed;
  pointer-events: none;
}
#clima .ow-map-pin:is(:hover, :focus-visible) .ow-pin-label { display: block; }
#clima .ow-map-inset {
  left: 3px;
  bottom: 3px;
  display: inline-flex;
  gap: 4px;
  min-height: 37px;
  padding: 4px 9px;
  border: 1px dashed #dfc5f5;
  border-radius: 9px;
}

#clima .ow-current-slot, #clima .ow-current-title { min-width: 0; }
#clima .ow-current {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 19px;
  min-height: 100%;
  padding: clamp(15px, 3.2vw, 36px);
  background:
    radial-gradient(ellipse at 82% 24%, #b89ae45c, transparent 48%),
    linear-gradient(135deg, #573d77c7, #392d5bcc 70%, #302b4cda);
}
#clima .ow-current-head {
  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(80px,.83fr);
  align-items: center;
  gap: 10px;
}
#clima .ow-current h3 {
  margin: 2px 0;
  overflow-wrap: anywhere;
  font: 500 clamp(1.7rem,3.4vw,3.4rem)/1.08 Oswald, sans-serif;
}
#clima .ow-current-date, #clima .ow-current-region, #clima .ow-current-condition {
  margin: 0;
  font: 600 .84rem/1.5 Poppins, sans-serif;
}
#clima .ow-current-date { color: #f2daf7; }
#clima .ow-current-region { color: #f1e2f5; }
#clima .ow-current-condition { margin-top: 10px; color: #ffd1a7; }
#clima .ow-current-illustration {
  display: block;
  width: min(100%, 212px);
  height: auto;
  justify-self: center;
  filter: drop-shadow(0 9px 16px #2b234a72);
}
#clima .ow-temperatures {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin: 13px 0 0;
}
#clima .ow-temperatures dt { color: #e8daf4; font-size: .69rem; }
#clima .ow-temperatures dd {
  margin: 2px 0 0;
  font: 500 clamp(1.03rem, 2.2vw, 1.6rem)/1.1 Oswald, sans-serif;
  white-space: nowrap;
}
#clima .ow-placeholder { align-items: center; text-align: center; }
#clima .ow-placeholder p { margin: 0; font-size: .88rem; }
#clima .ow-quick {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 8px;
  margin: 0;
}
#clima .ow-quick > div {
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid #e7cdf756;
  border-radius: 11px;
  background: #f3def017;
}
#clima .ow-quick dt { color: #f2e4fa; font: 600 .71rem/1.45 Poppins, sans-serif; }
#clima .ow-quick dd { margin: 3px 0 0; font-size: .97rem; font-weight: 700; }
#clima .ow-quick .ow-icon { color: #e4c7fc; }
#clima .ow-caption { display: flex; align-items: center; gap: 7px; }
#clima .ow-caption .ow-icon, #clima .ow-action .ow-icon { flex: 0 0 1.1em; }

#clima .ow-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 9px 14px;
  border: 0;
  border-radius: 9px;
  background: var(--ow-green);
  color: #252333;
  font: 700 .83rem Poppins, sans-serif;
  cursor: pointer;
}
#clima .ow-action:hover:not(:disabled) { background: #b6edbf; }
#clima .ow-download { align-self: flex-start; background: var(--ow-orange); color: #352739; }
#clima .ow-download:hover:not(:disabled) { background: #ffbb8c; }
#clima .ow-action:disabled { opacity: .6; cursor: default; }
#clima .ow-action[hidden] { display: none; }
#clima [data-outdoor-weather] :is(button, input, summary, a):focus-visible {
  outline: 3px solid #f6a167;
  outline-offset: 3px;
}

#clima :is(.ow-weekly, .ow-recommendations, .ow-detail-metrics) { padding: 0; margin: 22px 0 16px; }
#clima :is(.ow-weekly, .ow-detail-metrics) > h3 { margin-bottom: 11px; }
#clima .ow-week {
  display: grid;
  grid-template-columns: repeat(var(--ow-days, 7), minmax(112px,1fr));
  gap: 8px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  padding: 4px;
}
#clima .ow-week button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 0;
  padding: 10px 5px;
  border: 1px solid #e4d0f772;
  border-radius: 11px;
  background: linear-gradient(150deg,#c49cea43,#8e6fb031);
  color: #f9effb;
  font: 600 .73rem Poppins, sans-serif;
  text-align: center;
  scroll-snap-align: start;
  cursor: pointer;
}
#clima .ow-week button:hover { background-color: #9f75b14f; }
#clima .ow-week button[aria-pressed="true"] {
  border-color: #f7dfff;
  background: linear-gradient(150deg,#d6b5fb82,#8e6fb07a);
  box-shadow: inset 0 -3px #f0b77f;
}
#clima .ow-week-illustration { width: 52px; height: auto; }
#clima .ow-week-temperature { white-space: nowrap; }
#clima .ow-week-condition { font-size: .64rem; line-height: 1.4; color: #f4dcf4; }

/* Activity guidance: pick one activity instead of scanning three dense cards. */
#clima .ow-recommendations {
  --ow-tip-accent: #e3d0fa;
  padding: clamp(15px, 3vw, 26px);
  border: 1px solid var(--ow-panel-border);
  border-radius: 24px;
  background: #342641;
}
#clima .ow-recommendations > .ow-note { margin: 0 0 16px; color: #efdcf5; }
#clima .ow-activity-chooser {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 8px;
  max-width: 640px;
}
#clima .ow-activity-choice {
  display: flex;
  position: relative;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  min-height: 66px;
  align-items: center;
  justify-content: center;
  padding: 8px 3px;
  border: 1px solid #e6cdf978;
  border-radius: 16px;
  background: #fff5e70a;
  color: #fff5e7;
  font: 600 clamp(.64rem, 2.6vw, .85rem)/1.25 Poppins, sans-serif;
  text-align: center;
  overflow-wrap: anywhere;
  cursor: pointer;
}
#clima .ow-activity-choice:hover { background: #fff5e722; }
#clima .ow-activity-choice[aria-pressed="true"] {
  background: var(--ow-tip-accent);
  border-color: var(--ow-tip-accent);
  color: #352448;
}
#clima .ow-activity-icon { display: block; flex: none; width: 27px; height: 27px; }
#clima .ow-activity-check {
  display: none;
  position: absolute;
  top: 7px;
  right: 7px;
  font: 700 .75rem/1 system-ui,sans-serif;
}
#clima .ow-activity-choice[aria-pressed="true"] .ow-activity-check { display: block; }
#clima .ow-activity-advice {
  margin-top: 14px;
  padding: 12px 15px;
  border-radius: 16px;
  background: #fff5e70e;
}
#clima .ow-activity-title { margin: 0 0 4px; color: var(--ow-tip-accent); font-size: .88rem; }
#clima .ow-activity-copy { margin: 0; color: #fff5e7; font-size: .84rem; line-height: 1.55; }
#clima .ow-forecast-meta {
  margin: 12px 0;
  border-bottom: 1px solid var(--ow-panel-border);
}
#clima .ow-forecast-meta summary {
  min-height: 48px;
  padding: 12px 4px;
  color: #f1daf6;
  cursor: pointer;
  font-weight: 600;
  font-size: .86rem;
}
#clima .ow-forecast-meta-body { padding: 0 4px 12px; }
#clima .ow-forecast-meta-body .ow-note { margin: 4px 0; }

#clima .ow-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(min(100%,225px),1fr));
  gap: 10px;
  margin: 0;
}
#clima .ow-metrics > div {
  --ow-card-accent: #ddc4f5;
  --ow-icon-color: #633b81;
  padding: 14px;
  border-radius: 12px;
  background: linear-gradient(154deg,#fffaf1ed 36%,#f2e3faeb);
  box-shadow: inset 0 3px var(--ow-card-accent);
  color: #342840;
}
#clima .ow-metrics > div:has(.ow-icon:is([data-icon="thermometer"],[data-icon="sun"])) {
  --ow-card-accent: #f3a874;
  --ow-icon-color: #914322;
  background: linear-gradient(154deg,#fffaf1ed 36%,#ffe8d5eb);
}
#clima .ow-metrics > div:has(.ow-icon:is([data-icon="terrain"],[data-icon="wind"])) {
  --ow-card-accent: #afe4b4;
  --ow-icon-color: #276247;
  background: linear-gradient(154deg,#fffaf1ed 36%,#e8f5e7eb);
}
#clima .ow-metrics dt { margin-bottom: 5px; font-size: .86rem; font-weight: 700; }
#clima .ow-metrics dt .ow-icon { color: var(--ow-icon-color); }
#clima .ow-metrics dd { margin: 0; font-size: .8rem; line-height: 1.52; }

#clima .ow-scale {
  border: 1px solid #e0c9fc66;
  border-radius: 11px;
  padding: 11px 14px;
  background: linear-gradient(120deg,#482f60d6,#30263ce8);
  font-size: .84rem;
}
#clima .ow-scale summary { cursor: pointer; font-weight: 700; }
#clima .ow-scale ul { display: grid; gap: 9px; list-style: none; margin: 11px 0 0; padding: 0; }
#clima .ow-scale li { display: flex; align-items: baseline; flex-wrap: wrap; gap: 5px 13px; }
#clima .ow-scale li strong { display: block; }
#clima .ow-scale .ow-stars { color: #ffd09e; }
#clima .ow-note, #clima .ow-status { font-size: .8rem; line-height: 1.55; }
#clima .ow-status:empty { display: none; }
#clima .ow-download-status { margin: -9px 0 0; }

@media (max-width: 760px) {
  #clima .ow-location { grid-template-columns: minmax(0,1fr); }
  #clima .ow-current { min-height: 295px; }
  #clima .ow-map-pin svg { width: 16px; height: 16px; }
}
@media (max-width: 400px) {
  #clima .ow-current { gap: 12px; }
  #clima .ow-current-head { grid-template-columns: minmax(0,1fr) minmax(60px,.64fr); }
  #clima .ow-quick > div { padding: 8px 7px; }
  #clima .ow-quick dt { font-size: .65rem; }
}

#clima .ow-no-illustration { display: block; }
#clima .ow-week .ow-no-illustration { min-height: 43px; }

#clima .ow-download-status:empty { display: none; }

/* Selected date is identified by both a labeled mark and its surface. */
#clima .ow-week button { border-radius: 15px; }
#clima .ow-week button[aria-pressed="true"] {
  background: #593c76;
  border-color: #e6cdfb;
}
#clima .ow-week-marker {
  min-height: 1.4em;
  color: #f2ddff;
  font: 600 .64rem/1.4 Poppins, sans-serif;
}
