:root {
  color-scheme: light dark;
  --bg: #f7f5ef;
  --fg: #172026;
  --muted: #66707a;
  --accent: #f5b84b;
  --panel: #ffffff;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101418;
    --fg: #f2f1ec;
    --muted: #a8b0b8;
    --accent: #8ed1c6;
    --panel: #171d22;
  }
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: var(--bg);
  color: var(--fg);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.weather {
  position: relative;
  width: min(100%, 520px);
  text-align: center;
}

.locate {
  position: absolute;
  top: 0;
  right: 0;
  width: 44px;
  height: 44px;
  display: inline-grid;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--muted), transparent 55%);
  border-radius: 8px;
  background: transparent;
  color: var(--fg);
  cursor: pointer;
}

.locate:hover,
.locate:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
  outline: none;
}

.locate:disabled {
  color: var(--muted);
  cursor: default;
  opacity: 0.7;
}

.locate svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
}

.icon {
  width: 112px;
  height: 112px;
  margin: 0 auto 20px;
  color: var(--accent);
}

.icon svg {
  width: 100%;
  height: 100%;
  display: block;
  stroke: currentColor;
}

.city,
.updated {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
}

.temperature {
  margin: 12px 0;
  font-size: clamp(4rem, 18vw, 7.5rem);
  line-height: 0.95;
  font-weight: 750;
}

.message {
  max-width: 20rem;
  min-height: 4.8rem;
  margin: 0 auto 24px;
  font-size: clamp(1.5rem, 7vw, 2.4rem);
  line-height: 1.15;
  font-weight: 700;
}

.updated {
  font-size: 0.95rem;
}
