:root {
  color-scheme: light;
  --ink: #18201f;
  --muted: #66716e;
  --paper: #f7f4ec;
  --surface: #ffffff;
  --line: #d9ded8;
  --field: #edf3ef;
  --green: #1f6f5c;
  --green-dark: #154b40;
  --cream: #fff8e8;
  --sun: #ffc22b;
  --sun-deep: #f09a24;
  --sky: #4d83a8;
  --rain: #2f8fd4;
  --cloud: #d7dde0;
  --cloud-dark: #aeb8bd;
  --storm: #59646d;
  --snow: #7fc8e8;
  --clay: #a95f3d;
  --shadow: 0 16px 46px rgba(24, 32, 31, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  color: var(--ink);
  background: var(--paper);
}

button {
  font: inherit;
}

.app-shell {
  min-height: 100vh;
}

.hero {
  position: relative;
  display: grid;
  min-height: 34vh;
  overflow: hidden;
  isolation: isolate;
}

.hero-image,
.hero-shade,
.hero-content {
  grid-area: 1 / 1;
}

.hero-image {
  width: 100%;
  height: 100%;
  min-height: 300px;
  object-fit: cover;
}

.hero-shade {
  background:
    linear-gradient(90deg, rgba(13, 26, 24, 0.78), rgba(13, 26, 24, 0.32) 56%, rgba(13, 26, 24, 0.08)),
    linear-gradient(0deg, rgba(247, 244, 236, 0.96), rgba(247, 244, 236, 0) 42%);
}

.hero-content {
  align-self: center;
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 42px 0 78px;
  color: #fffaf0;
  text-align: center;
}

.brand-logo {
  display: block;
  width: min(360px, 76vw);
  height: auto;
  margin: 0 auto 22px;
  filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.24));
}

.eyebrow {
  width: fit-content;
  margin: 0 auto 14px;
  padding: 7px 10px;
  border: 1px solid rgba(255, 250, 240, 0.58);
  border-radius: 999px;
  background: rgba(13, 26, 24, 0.28);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  max-width: 720px;
  margin-right: auto;
  margin-bottom: 14px;
  margin-left: auto;
  font-size: clamp(2.25rem, 5vw, 4.75rem);
  line-height: 0.95;
  letter-spacing: 0;
}

.hero-copy {
  max-width: 560px;
  margin-right: auto;
  margin-bottom: 0;
  margin-left: auto;
  color: rgba(255, 250, 240, 0.88);
  font-size: clamp(1rem, 2vw, 1.28rem);
  line-height: 1.55;
}

.dashboard {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  width: min(1120px, calc(100% - 40px));
  margin: -44px auto 48px;
  align-items: start;
}

.location-panel,
.weather-panel {
  border: 1px solid rgba(217, 222, 216, 0.86);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.location-panel {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  padding: 14px 16px 16px;
}

.weather-panel {
  min-height: 430px;
  padding: 18px;
}

.panel-heading,
.section-heading,
.current-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.panel-heading h2,
.section-heading h2 {
  margin-bottom: 4px;
  font-size: 1rem;
}

.panel-heading {
  align-items: center;
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--green-dark);
  background: var(--field);
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease;
}

.icon-button:hover {
  transform: translateY(-1px);
  background: #e0ece6;
}

.location-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  min-width: 0;
  margin-top: 0;
}

.location-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  min-height: 40px;
  padding: 8px 9px;
  border: 1px solid rgba(217, 222, 216, 0.95);
  border-radius: 24px;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(245, 249, 246, 0.92)),
    #fbfcf9;
  cursor: pointer;
  text-align: left;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease, background 160ms ease;
}

.location-button:hover {
  transform: translateY(-1px);
  background: var(--field);
  box-shadow: 0 8px 20px rgba(24, 32, 31, 0.08);
}

.location-button[aria-selected="true"] {
  border-color: rgba(31, 111, 92, 0.5);
  color: #fff;
  background: linear-gradient(135deg, var(--green), var(--green-dark));
  box-shadow: 0 10px 24px rgba(31, 111, 92, 0.22);
}

.city-dot {
  flex: 0 0 auto;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--sun);
  box-shadow: 0 0 0 4px rgba(255, 194, 43, 0.18);
}

.location-button[aria-selected="true"] .city-dot {
  background: #fff8e8;
  box-shadow: 0 0 0 4px rgba(255, 248, 232, 0.18);
}

.city-copy {
  display: grid;
  min-width: 0;
  text-align: center;
}

.city-name {
  overflow: hidden;
  font-size: 0.9rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.source-note {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.status-message {
  display: grid;
  min-height: 220px;
  place-items: center;
  color: var(--muted);
  text-align: center;
}

.loading-card {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 14px 18px;
  border: 1px solid rgba(217, 222, 216, 0.88);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 12px 32px rgba(24, 32, 31, 0.08);
  color: var(--green-dark);
  font-weight: 800;
}

.loading-card-icon {
  min-width: 58px;
  justify-content: center;
  padding: 14px;
}

.loading-sun {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ffe68a 0 24%, var(--sun) 25% 70%, var(--sun-deep) 71%);
  box-shadow:
    0 -10px 0 -7px var(--sun),
    0 10px 0 -7px var(--sun),
    10px 0 0 -7px var(--sun),
    -10px 0 0 -7px var(--sun);
  animation: weatherPulse 1.2s ease-in-out infinite;
}

.is-error-card {
  max-width: 420px;
  border-color: rgba(169, 95, 61, 0.3);
  color: var(--clay);
}

@keyframes weatherPulse {
  0%,
  100% {
    transform: scale(0.92);
    opacity: 0.72;
  }

  50% {
    transform: scale(1);
    opacity: 1;
  }
}

.current-weather {
  position: relative;
  overflow: hidden;
  padding: 24px;
  border: 1px solid rgba(31, 111, 92, 0.14);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(237, 248, 244, 0.96)),
    #ffffff;
  box-shadow: 0 12px 34px rgba(24, 32, 31, 0.08);
}

.current-topline {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.now-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 12px;
  border-radius: 999px;
  color: #fff;
  background: var(--green);
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.current-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 170px;
  align-items: center;
  gap: 20px;
}

.zone-name {
  margin-bottom: 6px;
  color: var(--green-dark);
  font-size: clamp(1.35rem, 3vw, 2rem);
  font-weight: 900;
  line-height: 1;
}

#weatherSummary {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.28rem);
  font-weight: 800;
  line-height: 1.1;
  text-align: left;
}

.condition-block {
  display: grid;
  justify-items: center;
  min-width: 0;
}

.updated-at {
  text-align: left;
}

.updated-at,
#forecastHint {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.45;
}

.temperature-block {
  min-width: 0;
  text-align: left;
}

.temperature {
  display: block;
  color: var(--clay);
  font-size: clamp(4.8rem, 11vw, 7.8rem);
  font-weight: 900;
  line-height: 0.88;
  letter-spacing: 0;
}

.weather-icon-wrap {
  display: grid;
  width: 150px;
  height: 150px;
  place-items: center;
}

.weather-icon {
  display: grid;
  place-items: center;
}

.current-copy {
  flex: 1 1 auto;
  min-width: 0;
}

.forecast-section {
  padding-top: 18px;
}

.forecast-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 16px;
}

.forecast-card {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) 80px 88px 80px;
  align-items: center;
  gap: 14px;
  min-height: 76px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcf9;
  text-align: left;
}

.forecast-icon {
  display: grid;
  min-height: 50px;
  place-items: center;
}

.clima-icon {
  position: relative;
  display: inline-block;
  width: 58px;
  height: 48px;
  filter: drop-shadow(0 5px 7px rgba(45, 60, 64, 0.16));
}

.clima-icon-large {
  width: 146px;
  height: 126px;
}

.clima-icon svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.svg-sun circle {
  fill: var(--sun);
  stroke: var(--sun-deep);
  stroke-width: 2;
}

.svg-sun path {
  fill: none;
  stroke: var(--sun-deep);
  stroke-linecap: round;
  stroke-width: 4;
}

.svg-cloud ellipse,
.svg-cloud circle,
.svg-cloud rect {
  fill: var(--cloud);
  stroke: rgba(139, 151, 157, 0.38);
  stroke-width: 1;
}

.svg-rain path {
  fill: none;
  stroke: var(--rain);
  stroke-linecap: round;
  stroke-width: 5;
}

.svg-rain-light path {
  stroke-width: 4;
}

.svg-bolt {
  fill: #f5b51f;
  stroke: #d48917;
  stroke-linejoin: round;
  stroke-width: 1;
}

.svg-snow path {
  fill: none;
  stroke: var(--snow);
  stroke-linecap: round;
  stroke-width: 4;
}

.svg-fog path {
  fill: none;
  stroke: var(--cloud-dark);
  stroke-linecap: round;
  stroke-width: 5;
}

.clima-icon > span {
  position: absolute;
  display: none;
}

.icon-sun {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ffe68a 0 22%, var(--sun) 23% 62%, var(--sun-deep) 63%);
  box-shadow:
    0 -18px 0 -12px var(--sun),
    0 18px 0 -12px var(--sun),
    18px 0 0 -12px var(--sun),
    -18px 0 0 -12px var(--sun),
    13px 13px 0 -12px var(--sun),
    -13px 13px 0 -12px var(--sun),
    13px -13px 0 -12px var(--sun),
    -13px -13px 0 -12px var(--sun);
}

.icon-cloud {
  width: 44px;
  height: 18px;
  border-radius: 999px;
  background: linear-gradient(#eef1f2, var(--cloud));
  box-shadow: inset 0 -2px 0 rgba(120, 130, 136, 0.12), 0 4px 8px rgba(55, 70, 78, 0.14);
}

.icon-cloud::before,
.icon-cloud::after {
  position: absolute;
  bottom: 8px;
  content: "";
  border-radius: 50%;
  background: inherit;
}

.icon-cloud::before {
  left: 7px;
  width: 19px;
  height: 19px;
}

.icon-cloud::after {
  right: 7px;
  width: 25px;
  height: 25px;
}

.icon-cloud-small {
  width: 30px;
  height: 13px;
  opacity: 0.92;
}

.icon-cloud-small::before {
  width: 13px;
  height: 13px;
}

.icon-cloud-small::after {
  width: 17px;
  height: 17px;
}

.icon-rain {
  width: 4px;
  height: 14px;
  border-radius: 999px;
  background: var(--rain);
  transform: rotate(18deg);
}

.icon-bolt {
  width: 15px;
  height: 27px;
  background: #f5b51f;
  clip-path: polygon(42% 0, 100% 0, 66% 43%, 100% 43%, 28% 100%, 45% 55%, 8% 55%);
}

.icon-snow {
  width: 13px;
  height: 13px;
}

.icon-snow::before,
.icon-snow::after {
  position: absolute;
  inset: 5px 0 auto;
  height: 3px;
  border-radius: 999px;
  background: var(--snow);
  content: "";
}

.icon-snow::after {
  transform: rotate(90deg);
}

.icon-fog {
  width: 44px;
  height: 5px;
  border-radius: 999px;
  background: #aeb8bd;
}

.clima-icon-sun .icon-sun,
.clima-icon-partly .icon-sun,
.clima-icon-cloud .icon-cloud,
.clima-icon-partly .icon-cloud,
.clima-icon-rain .icon-cloud,
.clima-icon-drizzle .icon-cloud,
.clima-icon-storm .icon-cloud,
.clima-icon-snow .icon-cloud,
.clima-icon-fog .icon-cloud,
.clima-icon-fog .icon-fog,
.clima-icon-rain .icon-rain,
.clima-icon-drizzle .icon-rain-one,
.clima-icon-drizzle .icon-rain-three,
.clima-icon-storm .icon-bolt,
.clima-icon-snow .icon-snow {
  display: block;
}

.clima-icon-sun .icon-sun {
  left: 12px;
  top: 7px;
}

.clima-icon-partly .icon-sun {
  left: 6px;
  top: 3px;
}

.clima-icon-partly .icon-cloud {
  left: 15px;
  top: 22px;
}

.clima-icon-cloud .icon-cloud,
.clima-icon-rain .icon-cloud,
.clima-icon-drizzle .icon-cloud,
.clima-icon-storm .icon-cloud,
.clima-icon-snow .icon-cloud,
.clima-icon-fog .icon-cloud {
  left: 7px;
  top: 13px;
}

.clima-icon-fog .icon-cloud {
  opacity: 0.72;
}

.icon-rain-one {
  left: 16px;
  top: 34px;
}

.icon-rain-two {
  left: 27px;
  top: 36px;
}

.icon-rain-three {
  left: 38px;
  top: 34px;
}

.icon-bolt {
  left: 24px;
  top: 30px;
}

.icon-snow-one {
  left: 18px;
  top: 35px;
}

.icon-snow-two {
  left: 35px;
  top: 35px;
}

.icon-fog-one {
  left: 8px;
  top: 35px;
}

.icon-fog-two {
  left: 14px;
  top: 43px;
  width: 34px;
}

.clima-icon-large .icon-sun {
  width: 52px;
  height: 52px;
  box-shadow:
    0 -25px 0 -18px var(--sun),
    0 25px 0 -18px var(--sun),
    25px 0 0 -18px var(--sun),
    -25px 0 0 -18px var(--sun),
    18px 18px 0 -18px var(--sun),
    -18px 18px 0 -18px var(--sun),
    18px -18px 0 -18px var(--sun),
    -18px -18px 0 -18px var(--sun);
}

.clima-icon-large .icon-cloud {
  width: 68px;
  height: 28px;
}

.clima-icon-large .icon-cloud::before {
  width: 30px;
  height: 30px;
}

.clima-icon-large .icon-cloud::after {
  width: 40px;
  height: 40px;
}

.clima-icon-large.clima-icon-sun .icon-sun {
  left: 20px;
  top: 13px;
}

.clima-icon-large.clima-icon-partly .icon-sun {
  left: 7px;
  top: 4px;
}

.clima-icon-large.clima-icon-partly .icon-cloud {
  left: 24px;
  top: 38px;
}

.clima-icon-large.clima-icon-cloud .icon-cloud,
.clima-icon-large.clima-icon-rain .icon-cloud,
.clima-icon-large.clima-icon-drizzle .icon-cloud,
.clima-icon-large.clima-icon-storm .icon-cloud,
.clima-icon-large.clima-icon-snow .icon-cloud,
.clima-icon-large.clima-icon-fog .icon-cloud {
  left: 12px;
  top: 23px;
}

.clima-icon-large .icon-rain {
  width: 5px;
  height: 19px;
}

.clima-icon-large .icon-rain-one {
  left: 27px;
  top: 57px;
}

.clima-icon-large .icon-rain-two {
  left: 44px;
  top: 60px;
}

.clima-icon-large .icon-rain-three {
  left: 61px;
  top: 57px;
}

.clima-icon-large .icon-bolt {
  left: 39px;
  top: 51px;
  width: 21px;
  height: 35px;
}

.clima-icon-large .icon-snow-one {
  left: 31px;
  top: 59px;
}

.clima-icon-large .icon-snow-two {
  left: 56px;
  top: 59px;
}

.clima-icon-large .icon-fog {
  width: 66px;
  height: 6px;
}

.clima-icon-large .icon-fog-one {
  left: 13px;
  top: 58px;
}

.clima-icon-large .icon-fog-two {
  left: 22px;
  top: 69px;
  width: 52px;
}

.forecast-day {
  font-weight: 850;
}

.forecast-condition {
  color: var(--sky);
  font-size: 0.92rem;
  line-height: 1.3;
}

.forecast-temp,
.forecast-temps {
  display: grid;
  gap: 3px;
  text-align: center;
}

.forecast-temp strong,
.forecast-temps strong {
  color: var(--clay);
  font-size: 1.45rem;
  line-height: 1;
}

.forecast-temp small,
.forecast-temps small {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.forecast-temp-min strong {
  color: var(--sky);
}

@media (max-width: 850px) {
  .dashboard {
    margin-top: -40px;
  }

  .location-panel {
    grid-template-columns: 1fr;
  }

  .location-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .forecast-card {
    grid-template-columns: minmax(108px, 1fr) 68px 72px 68px;
  }
}

@media (max-width: 560px) {
  .hero-content,
  .dashboard {
    width: min(100% - 28px, 1120px);
  }

  .hero-image {
    min-height: 330px;
  }

  .hero-content {
    padding: 42px 0 76px;
  }

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

  .forecast-card {
    grid-template-columns: 1fr 52px 58px 52px;
    gap: 8px;
    padding: 12px;
  }

  .forecast-condition {
    font-size: 0.82rem;
  }

  .forecast-temp strong,
  .forecast-temps strong {
    font-size: 1.2rem;
  }

  .current-main {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .temperature-block {
    text-align: left;
  }

  .weather-icon-wrap {
    width: 104px;
    height: 104px;
  }

  .clima-icon-large {
    width: 84px;
    height: 72px;
  }
}
