:root {
  color-scheme: dark;
  --ink: #f8fafc;
  --muted: #94a3b8;
  --panel: rgba(15, 23, 42, 0.82);
  --panel-strong: rgba(30, 41, 59, 0.92);
  --line: rgba(226, 232, 240, 0.14);
  --sun: #fbbf24;
  --sky: #38bdf8;
  --green: #34d399;
  --rose: #fb7185;
  --shadow: 0 24px 80px rgba(2, 6, 23, 0.42);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 20% 18%, rgba(56, 189, 248, 0.28), transparent 28rem),
    radial-gradient(circle at 86% 8%, rgba(251, 191, 36, 0.22), transparent 24rem),
    linear-gradient(145deg, #0f172a 0%, #132238 48%, #1f2937 100%);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.phone-shell {
  width: min(100%, 430px);
  min-height: 100vh;
  margin: 0 auto;
  padding: max(12px, env(safe-area-inset-top)) 12px max(16px, env(safe-area-inset-bottom));
}

.app-screen {
  min-height: calc(100vh - 24px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 30px;
  background:
    linear-gradient(180deg, rgba(8, 13, 28, 0.36), rgba(15, 23, 42, 0.84)),
    url("https://images.unsplash.com/photo-1500530855697-b586d89ba3ee?auto=format&fit=crop&w=900&q=80") center / cover;
  box-shadow: var(--shadow);
  padding: 18px 16px 20px;
}

.top-bar,
.search-bar,
.section-heading,
.temperature-row,
.daily-item,
.hour-card {
  display: flex;
  align-items: center;
}

.top-bar {
  justify-content: space-between;
  gap: 12px;
  min-height: 58px;
}

.brand-lockup {
  min-width: 0;
  text-align: center;
}

.eyebrow,
.condition,
.feels-like,
.metric span,
.section-heading span,
.daily-date,
.hour-time {
  color: var(--muted);
}

.eyebrow {
  display: block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 1rem;
  line-height: 1.3;
}

h2 {
  font-size: 1rem;
}

.icon-button,
.unit-toggle {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  background: rgba(15, 23, 42, 0.62);
  backdrop-filter: blur(18px);
}

.search-bar {
  gap: 8px;
  margin: 18px 0 12px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.66);
  backdrop-filter: blur(18px);
}

.search-bar input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  padding: 0 8px;
}

.search-bar input::placeholder {
  color: #cbd5e1;
}

.primary-action,
.text-button,
.quick-place {
  border: 0;
  color: #082f49;
  font-weight: 800;
}

.primary-action {
  min-width: 82px;
  min-height: 40px;
  border-radius: 13px;
  background: var(--sky);
}

.quick-places {
  display: flex;
  gap: 8px;
  min-height: 34px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.quick-places::-webkit-scrollbar,
.hourly-strip::-webkit-scrollbar {
  display: none;
}

.quick-place {
  flex: 0 0 auto;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(248, 250, 252, 0.88);
}

.hero-panel {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-top: 14px;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 26px;
  background: linear-gradient(145deg, rgba(14, 165, 233, 0.74), rgba(20, 184, 166, 0.46) 48%, rgba(251, 191, 36, 0.5));
  box-shadow: 0 20px 50px rgba(8, 47, 73, 0.25);
}

.condition {
  font-weight: 700;
}

.temperature-row {
  gap: 12px;
  margin-top: 10px;
}

.weather-mark {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 18px;
  color: #082f49;
  background: rgba(248, 250, 252, 0.9);
  font-size: 2rem;
}

#temperature {
  font-size: 4rem;
  line-height: 0.95;
  letter-spacing: 0;
}

.feels-like {
  margin-top: 8px;
  color: rgba(248, 250, 252, 0.82);
  font-weight: 700;
}

.unit-toggle {
  color: #082f49;
  background: rgba(248, 250, 252, 0.88);
  font-weight: 900;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.metric {
  min-width: 0;
  padding: 12px 8px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--panel);
  backdrop-filter: blur(18px);
  text-align: center;
}

.metric span,
.metric strong {
  display: block;
  overflow-wrap: anywhere;
}

.metric span {
  font-size: 0.72rem;
}

.metric strong {
  margin-top: 5px;
  font-size: 0.9rem;
}

.forecast-section {
  margin-top: 18px;
}

.section-heading {
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.text-button {
  padding: 7px 10px;
  border-radius: 999px;
  background: var(--green);
}

.hourly-strip {
  display: grid;
  grid-auto-columns: 72px;
  grid-auto-flow: column;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 3px;
  scrollbar-width: none;
}

.hour-card {
  min-height: 112px;
  flex-direction: column;
  justify-content: space-between;
  padding: 11px 8px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  backdrop-filter: blur(18px);
}

.hour-card strong {
  font-size: 1.08rem;
}

.hour-icon {
  font-size: 1.45rem;
}

.daily-list {
  display: grid;
  gap: 8px;
}

.daily-item {
  justify-content: space-between;
  min-height: 56px;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--panel-strong);
  backdrop-filter: blur(18px);
}

.daily-main {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.daily-date {
  font-size: 0.78rem;
}

.daily-condition {
  display: block;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 800;
}

.daily-temp {
  flex: 0 0 auto;
  font-weight: 900;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 20px;
  z-index: 20;
  max-width: min(360px, calc(100vw - 32px));
  transform: translate(-50%, 120px);
  opacity: 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--ink);
  background: rgba(2, 6, 23, 0.92);
  box-shadow: var(--shadow);
  transition: transform 180ms ease, opacity 180ms ease;
}

.toast.is-visible {
  transform: translate(-50%, 0);
  opacity: 1;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

@media (max-width: 360px) {
  .phone-shell {
    padding: 0;
  }

  .app-screen {
    min-height: 100vh;
    border-radius: 0;
    padding-inline: 12px;
  }

  #temperature {
    font-size: 3.2rem;
  }

  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 760px) {
  body {
    display: grid;
    place-items: center;
    padding: 24px;
  }

  .phone-shell {
    min-height: auto;
    padding: 0;
  }

  .app-screen {
    min-height: 860px;
  }
}