:root {
  color-scheme: light;
  --ink: #15211f;
  --muted: #5c6b66;
  --panel: rgba(255, 255, 255, 0.9);
  --line: rgba(21, 33, 31, 0.14);
  --yellow: #ffd166;
  --green: #2a9d8f;
  --coral: #ef6f6c;
  --blue: #4d8ac8;
  --shadow: 0 24px 80px rgba(33, 54, 50, 0.18);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 12%, rgba(255, 209, 102, 0.42), transparent 28rem),
    linear-gradient(135deg, #d9f3ea 0%, #f7f2df 48%, #ddeaf6 100%);
}

button,
input {
  font: inherit;
}

.app-shell {
  width: min(1120px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  display: grid;
  place-items: center;
  padding: 28px 0;
}

.forecast-panel {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(360px, 1.1fr);
  gap: 18px;
  align-items: start;
}

.topbar,
.location-card,
.current-card,
.hourly-section,
.nights-section {
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
  border-radius: 8px;
}

.topbar {
  grid-column: 1 / -1;
  min-height: 86px;
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.eyebrow,
.status,
label {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(2rem, 6vw, 4.6rem);
  line-height: 0.95;
}

h2 {
  font-size: 1.25rem;
}

.icon-button {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #ffffff;
  color: var(--ink);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: transform 160ms ease, border-color 160ms ease;
}

.icon-button:hover {
  transform: rotate(18deg);
  border-color: rgba(42, 157, 143, 0.5);
}

.location-card {
  padding: 18px;
  display: grid;
  gap: 18px;
}

.primary-action,
.secondary-action {
  border: 0;
  border-radius: 6px;
  color: #ffffff;
  cursor: pointer;
  font-weight: 800;
}

.primary-action {
  min-height: 52px;
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  background: var(--green);
}

.secondary-action {
  padding: 0 16px;
  background: var(--ink);
}

.search-form {
  display: grid;
  gap: 8px;
}

.search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  background: #ffffff;
}

input {
  min-width: 0;
  border: 0;
  padding: 0 14px;
  color: var(--ink);
  outline: 0;
}

.current-card {
  min-height: 420px;
  padding: 24px;
  position: relative;
  overflow: hidden;
  display: grid;
  align-content: end;
}

.weather-art {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(77, 138, 200, 0.22), transparent 60%),
    linear-gradient(135deg, rgba(42, 157, 143, 0.28), rgba(239, 111, 108, 0.16));
}

.sun {
  position: absolute;
  width: 150px;
  height: 150px;
  top: 36px;
  right: 42px;
  border-radius: 50%;
  background: var(--yellow);
  box-shadow: 0 0 60px rgba(255, 209, 102, 0.7);
}

.cloud {
  position: absolute;
  width: 190px;
  height: 64px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 16px 42px rgba(53, 79, 74, 0.18);
}

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

.cloud::before {
  width: 84px;
  height: 84px;
  left: 30px;
  bottom: 22px;
}

.cloud::after {
  width: 104px;
  height: 104px;
  right: 24px;
  bottom: 16px;
}

.cloud-one {
  left: 34px;
  top: 110px;
}

.cloud-two {
  right: -36px;
  top: 188px;
  transform: scale(0.8);
}

.cloud-three {
  left: 86px;
  top: 248px;
  transform: scale(0.62);
  opacity: 0.76;
}

.current-copy {
  position: relative;
  display: grid;
  gap: 8px;
  z-index: 1;
}

#place-label,
#current-summary {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.cloud-value {
  display: flex;
  align-items: end;
  gap: 4px;
  font-size: clamp(4.2rem, 12vw, 8rem);
  font-weight: 900;
  line-height: 0.85;
}

.cloud-value span:last-child {
  font-size: 0.32em;
  padding-bottom: 0.12em;
}

.hourly-section,
.nights-section {
  padding: 18px;
}

.hourly-section {
  grid-column: 2;
  grid-row: 2 / 4;
}

.nights-section {
  grid-column: 1 / -1;
}

.section-heading {
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.hourly-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
  gap: 10px;
}

.hour-card,
.night-hour {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
}

.hour-card {
  min-height: 118px;
  padding: 12px;
  display: grid;
  align-content: space-between;
  gap: 10px;
}

.hour-time,
.night-time {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.mini-cloud {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: rgba(21, 33, 31, 0.1);
  overflow: hidden;
}

.mini-cloud span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--blue));
}

.hour-percent {
  font-size: 1.45rem;
  font-weight: 900;
}

.night-list {
  display: grid;
  gap: 12px;
}

.night-group {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.72);
}

.night-title {
  margin: 0;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  font-size: 1rem;
}

.night-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(82px, 1fr));
  gap: 8px;
  padding: 10px;
}

.night-hour {
  min-height: 82px;
  padding: 10px;
  display: grid;
  gap: 6px;
  background: linear-gradient(180deg, #ffffff, #f4f7f3);
}

.night-hour strong {
  font-size: 1.18rem;
}

.status {
  grid-column: 1 / -1;
  min-height: 20px;
  text-align: center;
}

.is-loading {
  opacity: 0.62;
  pointer-events: none;
}

@media (max-width: 840px) {
  .forecast-panel {
    grid-template-columns: 1fr;
  }

  .hourly-section,
  .nights-section {
    grid-column: auto;
    grid-row: auto;
  }

  .current-card {
    min-height: 360px;
  }
}

@media (max-width: 560px) {
  .app-shell {
    width: min(100% - 20px, 1120px);
    padding: 10px 0 18px;
  }

  .topbar {
    min-height: 72px;
    padding: 16px;
  }

  .search-row {
    grid-template-columns: 1fr;
  }

  .secondary-action {
    min-height: 44px;
  }

  .hourly-strip,
  .night-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
