:root {
  color-scheme: light;
  --ink: #0f172a;
  --muted: #475569;
  --line: rgba(15, 23, 42, 0.1);
  --panel: rgba(255, 255, 255, 0.78);
  --panel-strong: rgba(255, 255, 255, 0.92);
  --accent: #2563eb;
  --accent-soft: rgba(37, 99, 235, 0.12);
  --shadow: 0 24px 60px rgba(15, 23, 42, 0.12);
  --bg-1: #dbeafe;
  --bg-2: #eff6ff;
  --bg-3: #f8fafc;
  --hero-overlay: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.55));
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "DM Sans", ui-sans-serif, system-ui, sans-serif;
  background: linear-gradient(135deg, var(--bg-2), var(--bg-3));
  overflow-x: hidden;
}

#weather-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

body[data-theme="clear"][data-day="true"] {
  --bg-1: rgba(251, 191, 36, 0.45);
  --bg-2: #fff7ed;
  --bg-3: #fffbeb;
}

body[data-theme="clear"][data-day="false"] {
  --bg-1: rgba(59, 130, 246, 0.35);
  --bg-2: #0f172a;
  --bg-3: #1e293b;
  --ink: #f8fafc;
  --muted: #cbd5e1;
  --accent: #93c5fd;
  --accent-soft: rgba(147, 197, 253, 0.15);
  --panel: rgba(15, 23, 42, 0.72);
  --panel-strong: rgba(30, 41, 59, 0.88);
  --line: rgba(148, 163, 184, 0.18);
  --hero-overlay: linear-gradient(135deg, rgba(15, 23, 42, 0.82), rgba(30, 41, 59, 0.45));
}

body[data-theme="partly"] {
  --bg-1: rgba(125, 211, 252, 0.45);
  --bg-2: #ecfeff;
  --bg-3: #f0f9ff;
}

body[data-theme="cloudy"],
body[data-theme="fog"] {
  --bg-1: rgba(148, 163, 184, 0.35);
  --bg-2: #f1f5f9;
  --bg-3: #e2e8f0;
}

body[data-theme="rain"],
body[data-theme="drizzle"] {
  --bg-1: rgba(96, 165, 250, 0.4);
  --bg-2: #dbeafe;
  --bg-3: #eff6ff;
}

body[data-theme="snow"] {
  --bg-1: rgba(191, 219, 254, 0.55);
  --bg-2: #f8fafc;
  --bg-3: #f1f5f9;
}

body[data-theme="storm"] {
  --bg-1: rgba(99, 102, 241, 0.35);
  --bg-2: #e0e7ff;
  --bg-3: #eef2ff;
}

body[data-loading="true"] .search button {
  cursor: progress;
}

button,
input {
  font: inherit;
}

.app-shell {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 24px));
  max-width: 100%;
  margin: 0 auto;
  padding: clamp(16px, 3vw, 36px) 0 40px;
}

.hero-panel,
.panel {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero-panel {
  position: relative;
  overflow: visible;
  padding: clamp(18px, 3vw, 28px);
}

.hero-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--hero-overlay);
  border-radius: inherit;
  pointer-events: none;
}

.hero-panel > * {
  position: relative;
  z-index: 1;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  position: relative;
  z-index: 30;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand strong {
  display: block;
  font-size: 1.1rem;
  font-weight: 700;
}

.brand-sub {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
}

.brand-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(135deg, #38bdf8, #2563eb);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.search {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  justify-content: flex-end;
  max-width: 420px;
  min-width: 0;
  position: relative;
}

.search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 48px;
  gap: 10px;
  align-items: start;
}

.search-field {
  position: relative;
  z-index: 40;
  min-width: 0;
}

.city-suggestions {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 50;
  margin: 0;
  padding: 6px;
  list-style: none;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 14px;
  background-color: #ffffff;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.16);
  max-height: min(280px, 42vh);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  isolation: isolate;
}

body[data-theme="clear"][data-day="false"] .city-suggestions {
  background-color: #1e293b;
  border-color: rgba(148, 163, 184, 0.22);
  box-shadow: 0 18px 42px rgba(2, 6, 23, 0.45);
}

body[data-theme="clear"][data-day="false"] .city-suggestion {
  color: #f8fafc;
}

body[data-theme="clear"][data-day="false"] .city-suggestion.is-active,
body[data-theme="clear"][data-day="false"] .city-suggestion:hover {
  color: #93c5fd;
}

.city-suggestion {
  padding: 11px 12px;
  border-radius: 10px;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.35;
  cursor: pointer;
}

.city-suggestion.is-active,
.city-suggestion:hover {
  background: var(--accent-soft);
  color: var(--accent);
}

.city-suggestion.is-empty {
  color: var(--muted);
  cursor: default;
  pointer-events: none;
}

.search input,
.search button {
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel-strong);
}

.search input {
  width: 100%;
  padding: 0 16px;
  color: var(--ink);
  font-family: "JetBrains Mono", ui-monospace, monospace;
}

.search input::placeholder {
  color: var(--muted);
  opacity: 1;
}

.search input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-color: var(--accent);
}

.search button {
  display: grid;
  place-items: center;
  cursor: pointer;
  color: var(--accent);
  transition: transform 0.15s ease, background 0.15s ease;
}

.search button:hover {
  background: var(--accent-soft);
  transform: translateY(-1px);
}

.search button svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.status-banner {
  margin: 14px 0 0;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 0.92rem;
  font-weight: 600;
}

.status-banner.error {
  color: #991b1b;
  background: rgba(254, 226, 226, 0.9);
}

.status-banner.loading {
  color: #1d4ed8;
  background: rgba(219, 234, 254, 0.9);
}

.hero-content {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) auto;
  align-items: end;
  gap: 20px;
  margin-top: clamp(24px, 5vw, 42px);
  position: relative;
  z-index: 1;
}

.hero-copy h1 {
  margin: 0;
  max-width: 14ch;
  font-size: clamp(2rem, 6vw, 4.2rem);
  line-height: 1.02;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.city-region {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: clamp(0.88rem, 2.2vw, 1rem);
  font-weight: 600;
  line-height: 1.35;
}

.eyebrow,
.condition,
.section-title span,
.metric-label,
.hour-card span,
.hour-card small,
.daily span,
.daily small {
  color: var(--muted);
}

.eyebrow {
  margin: 0 0 8px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.condition {
  margin: 12px 0 0;
  font-size: clamp(1rem, 2.4vw, 1.35rem);
  font-weight: 700;
}

.hero-visual {
  display: flex;
  align-items: center;
  gap: clamp(8px, 2vw, 18px);
}

.hero-scene-wrap {
  position: relative;
  width: clamp(108px, 22vw, 168px);
  height: clamp(108px, 22vw, 168px);
  flex-shrink: 0;
  border-radius: 28px;
  overflow: hidden;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0.12));
  border: 1px solid rgba(255, 255, 255, 0.45);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.65),
    0 16px 34px rgba(15, 23, 42, 0.12);
  backdrop-filter: blur(10px);
  transition: box-shadow 0.2s ease;
}

#hero-weather-canvas {
  display: block;
  width: 100%;
  height: 100%;
}

body[data-theme="clear"][data-day="false"] .hero-scene-wrap {
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.75), rgba(15, 23, 42, 0.35));
  border-color: rgba(148, 163, 184, 0.25);
}

body[data-theme="storm"] .hero-scene-wrap {
  background: linear-gradient(145deg, rgba(30, 27, 75, 0.7), rgba(15, 23, 42, 0.45));
  border-color: rgba(129, 140, 248, 0.28);
}

body[data-theme="rain"] .hero-scene-wrap,
body[data-theme="drizzle"] .hero-scene-wrap {
  background: linear-gradient(145deg, rgba(219, 234, 254, 0.75), rgba(191, 219, 254, 0.25));
}

.temp-lockup {
  display: flex;
  align-items: flex-start;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.temp-lockup span {
  font-size: clamp(3.8rem, 12vw, 7rem);
  line-height: 0.9;
}

.temp-lockup sup {
  margin-top: 0.5rem;
  font-size: clamp(1.2rem, 3vw, 2rem);
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 28px;
}

.metrics article {
  padding: 16px;
  border-radius: 18px;
  background: var(--panel-strong);
  border: 1px solid var(--line);
}

.metric-label,
.metrics strong {
  display: block;
}

.metrics strong {
  margin-top: 8px;
  font-size: clamp(1.2rem, 2.5vw, 1.55rem);
}

.forecast-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 16px;
  margin-top: 16px;
  min-width: 0;
}

.panel {
  padding: clamp(16px, 2.5vw, 22px);
  min-width: 0;
  max-width: 100%;
}

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

h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
}

.hourly {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
  width: 100%;
  min-width: 0;
}

.hour-card {
  min-height: 132px;
  display: grid;
  align-content: space-between;
  justify-items: center;
  text-align: center;
  padding: 12px 8px;
  border-radius: 18px;
  background: var(--panel-strong);
  border: 1px solid var(--line);
}

.hour-card strong {
  font-size: 1.55rem;
}

.hour-card small::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 5px;
  border-radius: 50%;
  background: #3b82f6;
}

.daily {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.daily article {
  display: grid;
  grid-template-columns: 52px 28px 1fr auto auto;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 8px 10px;
  border-radius: 14px;
  background: var(--panel-strong);
  border: 1px solid var(--line);
}

.day-label {
  font-weight: 700;
}

.daily strong {
  min-width: 88px;
  text-align: right;
  white-space: nowrap;
}

.daily small {
  min-width: 38px;
  text-align: right;
  font-weight: 600;
}

.bar {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.14);
}

.bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #22c55e, #3b82f6);
}

.mini-icon,
.weather-icon {
  line-height: 1;
}

.mini-icon {
  display: inline-grid;
  place-items: center;
  width: 1.5rem;
  min-width: 1.5rem;
  flex-shrink: 0;
}

.weather-icon[data-icon="clear"],
.mini-icon[data-icon="clear"] {
  --weather-icon: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.7%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Ccircle%20cx%3D%2212%22%20cy%3D%2212%22%20r%3D%224%22%2F%3E%3Cpath%20d%3D%22M12%202v2m0%2016v2M2%2012h2m16%200h2M4.9%204.9l1.4%201.4m11.4%2011.4%201.4%201.4M4.9%2019.1l1.4-1.4M17.7%206.3l1.4-1.4%22%2F%3E%3C%2Fsvg%3E");
}

.weather-icon[data-icon="partly"],
.mini-icon[data-icon="partly"] {
  --weather-icon: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.7%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M8%202v2M2%208h2m-.2-4.2%201.4%201.4M12.2%203.8l-1.4%201.4%22%2F%3E%3Ccircle%20cx%3D%228%22%20cy%3D%228%22%20r%3D%223%22%2F%3E%3Cpath%20d%3D%22M7%2020a4%204%200%200%201-1-7.9%205.5%205.5%200%200%201%2010.5-1.7A4.8%204.8%200%200%201%2017%2020Z%22%2F%3E%3C%2Fsvg%3E");
}

.weather-icon[data-icon="cloudy"],
.mini-icon[data-icon="cloudy"] {
  --weather-icon: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.7%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M6%2019a4.5%204.5%200%200%201-.7-8.9%206.5%206.5%200%200%201%2012.4-1.6A5.3%205.3%200%200%201%2018%2019Z%22%2F%3E%3C%2Fsvg%3E");
}

.weather-icon[data-icon="rain"],
.mini-icon[data-icon="rain"] {
  --weather-icon: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.7%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M6%2015a4%204%200%200%201-.6-7.9%205.6%205.6%200%200%201%2010.7-1.3A4.7%204.7%200%200%201%2018%2015M7%2018l-1%203m6-3-1%203m6-3-1%203%22%2F%3E%3C%2Fsvg%3E");
}

.weather-icon[data-icon="drizzle"],
.mini-icon[data-icon="drizzle"] {
  --weather-icon: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.7%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M6%2014a4%204%200%200%201-.6-7.9%205.6%205.6%200%200%201%2010.7-1.3A4.7%204.7%200%200%201%2018%2014M7%2017v.2m5-.2v.2m5-.2v.2M6%2021v.2m5-.2v.2m5-.2v.2%22%2F%3E%3C%2Fsvg%3E");
}

.weather-icon[data-icon="snow"],
.mini-icon[data-icon="snow"] {
  --weather-icon: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.7%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M12%202v20M3.3%207l17.4%2010M3.3%2017%2020.7%207M9%204l3%203%203-3M9%2020l3-3%203%203M3.5%2010.5%207.6%209.4%206.5%205.3M17.5%2018.7l-1.1-4.1%204.1-1.1M3.5%2013.5l4.1%201.1-1.1%204.1M17.5%205.3l-1.1%204.1%204.1%201.1%22%2F%3E%3C%2Fsvg%3E");
}

.weather-icon[data-icon="storm"],
.mini-icon[data-icon="storm"] {
  --weather-icon: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.7%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M6%2015a4%204%200%200%201-.6-7.9%205.6%205.6%200%200%201%2010.7-1.3A4.7%204.7%200%200%201%2018%2015M13%2011l-4%207h4l-2%205%206-8h-4l2-4%22%2F%3E%3C%2Fsvg%3E");
}

.weather-icon[data-icon="fog"],
.mini-icon[data-icon="fog"] {
  --weather-icon: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.7%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M5%2012a3.5%203.5%200%200%201%20.6-6.9%205.5%205.5%200%200%201%2010.3-.6A4.2%204.2%200%200%201%2020%2012M3%2016h18M5%2020h14%22%2F%3E%3C%2Fsvg%3E");
}

.mini-icon[data-icon="clear"][data-day="false"],
body[data-theme="clear"][data-day="false"] .weather-icon[data-icon="clear"],
body[data-theme="clear"][data-day="false"] .hero-fallback[data-icon="clear"] {
  --weather-icon: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.7%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M20.5%2014A8.5%208.5%200%200%201%2010%203.5%208.5%208.5%200%201%200%2020.5%2014Z%22%2F%3E%3C%2Fsvg%3E");
}

.mini-icon[data-icon="partly"][data-day="false"],
body[data-day="false"] .hero-fallback[data-icon="partly"] {
  --weather-icon: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.7%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M10%203a5%205%200%201%200%204%207A5%205%200%200%201%2010%203Z%22%2F%3E%3Cpath%20d%3D%22M8%2021a3.5%203.5%200%200%201-.5-6.9%205%205%200%200%201%209.5-1.2A4.1%204.1%200%200%201%2018%2021Z%22%2F%3E%3C%2Fsvg%3E");
}

.weather-icon::before,
.mini-icon::before {
  content: "";
  display: block;
  width: 1.5rem;
  height: 1.5rem;
  background-color: currentColor;
  -webkit-mask: var(--weather-icon) center / contain no-repeat;
  mask: var(--weather-icon) center / contain no-repeat;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 960px) {
  .hero-content {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .hero-visual {
    justify-content: flex-start;
  }

  .forecast-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 640px) {
  .app-shell {
    width: min(100% - 16px, 1180px);
    padding-top: 12px;
    padding-bottom: 28px;
  }

  .hero-panel,
  .panel {
    border-radius: 20px;
  }

  .hero-panel {
    padding: 16px;
  }

  .panel {
    padding: 14px;
  }

  .topbar {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .brand-icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
  }

  .search {
    max-width: none;
    width: 100%;
  }

  .search-row {
    grid-template-columns: minmax(0, 1fr) 48px;
  }

  .city-suggestions {
    position: static;
    top: auto;
    left: auto;
    right: auto;
    width: 100%;
    max-height: min(240px, 32vh);
    margin-top: 0;
  }

  .city-suggestion {
    min-height: 44px;
    display: flex;
    align-items: center;
  }

  .hero-content {
    margin-top: 20px;
  }

  .hero-copy h1 {
    max-width: none;
    font-size: clamp(1.75rem, 8vw, 2.4rem);
    line-height: 1.08;
  }

  .city-region {
    margin-top: 4px;
    font-size: 0.86rem;
  }

  .condition {
    margin-top: 8px;
    font-size: 1rem;
  }

  .hero-visual {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
  }

  .hero-scene-wrap {
    width: 112px;
    height: 112px;
    border-radius: 22px;
  }

  .temp-lockup span {
    font-size: clamp(3rem, 14vw, 4.2rem);
  }

  .temp-lockup sup {
    margin-top: 0.35rem;
    font-size: 1.1rem;
  }

  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 18px;
  }

  .metrics article {
    padding: 12px;
  }

  .metrics strong {
    margin-top: 6px;
    font-size: 1.15rem;
  }

  .section-title {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .section-title span {
    font-size: 0.82rem;
  }

  .hourly {
    gap: 8px;
  }

  .hour-card {
    min-height: 118px;
    padding: 10px 6px;
  }

  .hour-card strong {
    font-size: 1.2rem;
  }

  .daily article {
    grid-template-columns: 2.75rem 1.75rem minmax(0, 1fr) auto;
    grid-template-areas:
      "day icon temps rain"
      "day icon bar bar";
    align-items: center;
    gap: 6px 8px;
    min-height: auto;
    padding: 10px 12px;
  }

  .day-label {
    grid-area: day;
    font-size: 0.92rem;
  }

  .daily .mini-icon {
    grid-area: icon;
    justify-self: center;
    width: 1.75rem;
    min-width: 1.75rem;
  }

  .daily strong {
    grid-area: temps;
    min-width: 0;
    text-align: left;
    font-size: 0.95rem;
    white-space: nowrap;
  }

  .daily .bar {
    grid-area: bar;
    min-width: 0;
  }

  .daily small {
    grid-area: rain;
    min-width: 2.5rem;
    text-align: right;
    font-size: 0.82rem;
  }
}

@media (max-width: 380px) {
  .app-shell {
    width: min(100% - 12px, 1180px);
  }

  .hero-panel,
  .panel {
    border-radius: 18px;
  }

  .metrics strong {
    font-size: 1.05rem;
  }

  .metric-label {
    font-size: 0.85rem;
    hyphens: auto;
  }

  .hourly {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.data-sources {
  margin-top: 20px;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
}

.data-sources a {
  color: inherit;
  text-underline-offset: 3px;
}

/* Text must stay readable with long location names and enlarged text. */
h1,
h2,
.brand strong {
  font-family: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
}

.hero-copy,
.metrics article {
  min-width: 0;
}

.hero-copy,
.metric-label,
.city-suggestion,
.status-banner,
.data-sources {
  overflow-wrap: anywhere;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.forecast-empty {
  grid-column: 1 / -1;
  color: var(--muted);
  margin: 0;
  line-height: 1.5;
}

.hero-fallback.mini-icon {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
}

.hero-fallback.mini-icon::before {
  width: 3.5rem;
  height: 3.5rem;
}

[hidden] {
  display: none !important;
}
