:root {
  color-scheme: light;
  font-family: Georgia, "Times New Roman", serif;
  color: #202334;
  background: #dfedff;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-optical-sizing: auto;
  font-weight: 400;
  --muted: #7d8ba2;
  --purple: #7774ee;
  --line: rgb(100 130 170 / 18%);
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background: linear-gradient(135deg, #d3e8ff 0%, #e4f0ff 50%, #c9e0ff 100%);
  background-attachment: fixed;
}

button,
input {
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

.app-shell {
  width: min(100% - 48px, 1020px);
  margin: 0 auto;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 78px;
  border-bottom: 1px solid rgb(100 130 170 / 20%);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #282a3c;
  font-family: Manrope, sans-serif;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -1.2px;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 10px;
  background: #7774ee;
  color: white;
  font-size: 22px;
  line-height: 1;
}

.brand-period {
  color: var(--purple);
}

.topbar-note {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #777d8e;
  font-size: 12px;
  font-weight: 500;
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #53c88e;
  box-shadow: 0 0 0 3px rgb(83 200 142 / 13%);
}

.search-section {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  padding: 37px 0 28px;
}

.eyebrow {
  margin: 0 0 8px;
  color: #858ca0;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.55px;
  line-height: 1.3;
}

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

h1,
h2 {
  font-family: Georgia, "Times New Roman", serif;
}

h1 {
  margin-bottom: 0;
  color: #26283a;
  font-size: clamp(26px, 4vw, 34px);
  font-weight: 800;
  letter-spacing: -1.6px;
  line-height: 1.15;
}

.search-form {
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(470px, 55%);
  padding: 6px;
  border: 1px solid #bed7f1;
  border-radius: 17px;
  background: rgb(255 255 255 / 68%);
  box-shadow: 0 8px 22px rgb(67 105 157 / 12%), inset 0 1px 0 rgb(255 255 255 / 85%);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.search-form:focus-within {
  border-color: #8bb7e7;
  box-shadow: 0 0 0 4px rgb(79 139 206 / 12%), 0 8px 22px rgb(67 105 157 / 12%);
}

.search-box {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 10px;
  min-width: 0;
  height: 42px;
  padding: 0 9px;
  border: 0;
  border-radius: 11px;
  background: transparent;
}

.search-box svg,
.icon-button svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.search-box svg {
  flex: 0 0 auto;
  color: #6c87a8;
}

.search-box input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #35374a;
  font-size: 13px;
}

.search-box input::placeholder {
  color: #7889a1;
}

.search-box kbd {
  flex: 0 0 auto;
  padding: 3px 6px;
  border: 1px solid #d8e3f0;
  border-radius: 5px;
  color: #71839b;
  font-family: inherit;
  font-size: 10px;
}

.search-button {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 0 17px;
  border: 0;
  border-radius: 11px;
  background: linear-gradient(135deg, #587fac, #466a98);
  box-shadow: 0 3px 8px rgb(56 89 132 / 21%);
  color: white;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.search-button:hover {
  transform: translateY(-1px);
  background: linear-gradient(135deg, #5079a9, #3f6391);
  box-shadow: 0 5px 11px rgb(56 89 132 / 26%);
}

.icon-button {
  display: grid;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid #e9eaf0;
  border-radius: 12px;
  background: white;
  color: #74718e;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, color 160ms ease;
}

.icon-button:hover {
  transform: translateY(-1px);
  background: #f0efff;
  color: #6865dc;
}

.location-button {
  width: 42px;
  height: 42px;
  border-color: #d7e3f1;
  border-radius: 11px;
  background: #f8fbff;
  color: #597698;
}

.location-button svg {
  stroke-width: 1.55;
}

.status-message {
  min-height: 0;
  margin: -14px 0 8px;
  color: #bb4957;
  font-size: 12px;
}

.status-message:empty {
  display: none;
}

.weather-content {
  transition: opacity 160ms ease;
}

.weather-content[aria-busy="true"] {
  opacity: 0.55;
  pointer-events: none;
}

.overview-grid {
  display: grid;
  grid-template-columns: 1.13fr 0.87fr;
  gap: 17px;
}

.current-card,
.details-card,
.forecast-section {
  border: 1px solid #ebeaf2;
  border-radius: 20px;
  box-shadow: 0 6px 22px rgb(36 37 68 / 3%);
}

.current-card {
  position: relative;
  display: flex;
  min-height: 263px;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding: 23px 25px 19px;
  border: 0;
  background:
    radial-gradient(ellipse at 92% 19%, rgb(159 157 255 / 27%), transparent 34%),
    linear-gradient(122deg, #373656 0%, #49466f 52%, #615e93 100%);
  box-shadow: 0 13px 28px rgb(65 61 118 / 18%);
  color: white;
}

.current-card::before {
  position: absolute;
  top: -103px;
  right: 96px;
  width: 230px;
  height: 230px;
  border: 1px solid rgb(255 255 255 / 7%);
  border-radius: 50%;
  content: "";
}

.current-card::after {
  position: absolute;
  top: -72px;
  right: 125px;
  width: 167px;
  height: 167px;
  border: 1px solid rgb(255 255 255 / 6%);
  border-radius: 50%;
  content: "";
}

.current-topline,
.current-weather,
.current-footer {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.eyebrow-light {
  color: rgb(223 220 255 / 67%);
}

.city-name {
  max-width: 360px;
  overflow: hidden;
  margin: 0 0 3px;
  font-size: clamp(20px, 3vw, 25px);
  font-weight: 700;
  letter-spacing: -0.9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.location-detail {
  margin: 0;
  color: rgb(230 228 255 / 66%);
  font-size: 11px;
}

.unit-toggle {
  display: flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid rgb(255 255 255 / 13%);
  border-radius: 9px;
  background: rgb(255 255 255 / 8%);
}

.unit-button {
  min-width: 32px;
  height: 27px;
  padding: 0 7px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: rgb(239 237 255 / 70%);
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
}

.unit-button.is-active {
  background: white;
  color: #55517c;
  box-shadow: 0 1px 4px rgb(27 25 55 / 12%);
}

.current-weather {
  justify-content: flex-start;
  gap: 12px;
  margin: 5px 0 4px;
}

.temperature {
  display: flex;
  align-items: flex-start;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(62px, 8vw, 78px);
  font-weight: 700;
  letter-spacing: -7px;
  line-height: 0.95;
}

.temperature-degree {
  margin: 6px 0 0 3px;
  font-size: 33px;
  font-weight: 500;
  letter-spacing: -2px;
}

.weather-description {
  margin: 8px 0 3px;
  font-size: 14px;
  font-weight: 600;
}

.feels-like {
  margin: 0;
  color: rgb(231 230 255 / 67%);
  font-size: 10px;
}

.weather-art {
  align-self: center;
  margin-left: auto;
  padding: 0 25px 0 0;
  filter: drop-shadow(0 8px 15px rgb(19 18 42 / 16%));
  font-size: 73px;
  line-height: 1;
}

.current-footer {
  justify-content: flex-start;
  gap: 18px;
  padding-top: 12px;
  border-top: 1px solid rgb(255 255 255 / 15%);
  color: rgb(229 228 255 / 68%);
  font-size: 10px;
}

.current-footer strong {
  margin-left: 3px;
  color: white;
  font-size: 11px;
  font-weight: 600;
}

.footer-icon {
  margin-right: 2px;
  color: #ffd285;
  font-size: 14px;
  font-weight: 700;
}

.footer-low {
  color: #aec4ff;
}

.updated-label {
  margin-left: auto;
  text-align: right;
}

.details-card {
  border-color: #7889a3;
  min-height: 263px;
  padding: 21px 23px 12px;
  background:
    radial-gradient(ellipse at 100% 0%, rgb(221 229 244 / 15%), transparent 48%),
    linear-gradient(145deg, #8493aa 0%, #7b8ba3 55%, #73849f 100%);
  box-shadow: 0 10px 24px rgb(61 84 119 / 16%);
  color: #f7f9ff;
}

.details-card .eyebrow {
  color: #e1e8f5;
}

.details-card .section-heading h2 {
  color: #fff;
}

.details-card .refresh-button {
  border-color: rgb(255 255 255 / 27%);
  background: rgb(255 255 255 / 13%);
  color: #f5f7ff;
}

.details-card .refresh-button:hover {
  background: rgb(255 255 255 / 23%);
  color: #fff;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.section-heading .eyebrow {
  margin-bottom: 4px;
}

.section-heading h2 {
  margin: 0;
  color: #2a2c3d;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.45px;
}

.refresh-button {
  width: 34px;
  height: 34px;
  border-radius: 10px;
}

.refresh-button svg {
  width: 16px;
  height: 16px;
}

.detail-list {
  margin-top: 12px;
}

.detail-item {
  display: grid;
  min-height: 44px;
  grid-template-columns: 29px 1fr auto;
  align-items: center;
  border-top: 1px solid rgb(255 255 255 / 20%);
}

.detail-icon {
  display: grid;
  width: 23px;
  height: 23px;
  place-items: center;
  border-radius: 8px;
  background: #d7deed;
  color: #526382;
  font-size: 16px;
}

.humidity-icon {
  background: #e4dcef;
  color: #6d578a;
}

.wind-icon {
  background: #d6e7ec;
  color: #486e7d;
}

.rain-icon {
  background: #dce4f2;
  color: #4d648c;
}

.sun-icon {
  background: #ede2d2;
  color: #806747;
}

.detail-label {
  color: #eef2fa;
  font-size: 11px;
}

.detail-item strong {
  color: #fff;
  font-size: 11px;
  font-weight: 600;
}

.forecast-section {
  margin-top: 17px;
  padding: 19px 22px 17px;
  background: rgb(255 255 255 / 88%);
}

.forecast-heading {
  margin-bottom: 15px;
}

.section-note {
  color: #9a9dad;
  font-size: 10px;
}

.hourly-list {
  display: grid;
  grid-auto-columns: minmax(62px, 1fr);
  grid-auto-flow: column;
  overflow-x: auto;
  padding-bottom: 1px;
  scrollbar-color: #deddf0 transparent;
  scrollbar-width: thin;
}

.hour-item {
  display: flex;
  min-height: 103px;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 9px 2px 7px;
  border-right: 1px solid #f1f0f5;
}

.hour-item:last-child {
  border-right: 0;
}

.hour-time {
  color: #888d9e;
  font-size: 10px;
}

.hour-icon {
  font-size: 19px;
  line-height: 1.1;
}

.hour-temperature {
  color: #37394b;
  font-size: 12px;
  font-weight: 600;
}

.weekly-section {
  margin-bottom: 18px;
}

.weekly-list {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.day-item {
  display: grid;
  min-height: 48px;
  grid-template-columns: minmax(35px, 0.8fr) minmax(24px, 0.5fr) minmax(32px, 0.7fr) minmax(45px, 0.7fr);
  align-items: center;
  justify-items: center;
  gap: 3px;
  padding: 7px 2px;
  border-right: 1px solid #f1f0f5;
}

.day-item:last-child {
  border-right: 0;
}

.day-name {
  color: #818699;
  font-size: 10px;
}

.day-icon {
  font-size: 16px;
}

.day-high {
  color: #3b3d4c;
  font-size: 10px;
  font-weight: 600;
}

.day-low {
  color: #a0a3b1;
  font-size: 10px;
}

.day-range {
  display: flex;
  justify-content: center;
  gap: 5px;
}

.app-footer {
  display: flex;
  justify-content: space-between;
  padding: 0 2px 22px;
  color: #858ca0;
  font-size: 10px;
}

.app-footer a {
  color: #7774d8;
  text-decoration: none;
}

.app-footer a:hover {
  text-decoration: underline;
}

@media (min-width: 760px) {
  .hourly-list {
    grid-auto-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .app-shell {
    width: min(100% - 32px, 500px);
  }

  .search-section {
    align-items: stretch;
    flex-direction: column;
    gap: 18px;
    padding: 28px 0 21px;
  }

  .search-form {
    width: 100%;
  }

  .overview-grid {
    grid-template-columns: 1fr;
    gap: 13px;
  }

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

  .details-card {
    min-height: auto;
    padding-bottom: 13px;
  }

  .detail-item {
    min-height: 42px;
  }

  .forecast-section {
    margin-top: 13px;
    padding: 17px 16px 14px;
  }

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

  .day-item {
    min-height: 42px;
    grid-template-columns: 1fr 30px 1fr 1fr;
    justify-items: start;
    padding: 5px 8px;
    border-right: 0;
    border-bottom: 1px solid #f1f0f5;
  }

  .day-item:last-child {
    border-bottom: 0;
  }

  .day-name {
    width: 43px;
  }

  .day-range {
    justify-self: end;
  }
}

@media (max-width: 380px) {
  .app-shell {
    width: calc(100% - 24px);
  }

  .current-card {
    min-height: 240px;
    padding: 20px 19px 16px;
  }

  .weather-art {
    padding-right: 6px;
    font-size: 59px;
  }

  .details-card {
    padding-right: 17px;
    padding-left: 17px;
  }
}
