:root {
  color-scheme: dark;
  --panel: rgb(13 19 23 / 0.88);
  --panel-strong: rgb(9 14 18 / 0.96);
  --line: rgb(122 138 150 / 0.42);
  --line-soft: rgb(122 138 150 / 0.24);
  --text: #f6f8fb;
  --muted: #aab3bc;
  --dim: #7f8a94;
  --cyan: #49b7ff;
  --cyan-soft: #1d6d9c;
  --amber: #ffb32c;
  --orange: #ff8a30;
  --font-base: "Avenir Next", Roboto, "Helvetica Neue", Arial, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-instrument: "Avenir Next Condensed", "Roboto Condensed", "Arial Narrow", "Helvetica Neue", Arial, ui-sans-serif, system-ui, sans-serif;
  font-family: var(--font-base);
  background: #05080b;
  color: var(--text);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #05080b;
}

body {
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.console-shell {
  position: relative;
  width: 100vw;
  height: 100vh;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: linear-gradient(180deg, #080c10 0%, #030506 100%);
}

.boot-screen,
.console-frame {
  width: 100%;
  height: 100%;
}

.boot-screen,
.loading-screen,
.setup-required,
.placeholder-panel {
  display: grid;
  place-items: center;
  text-align: center;
}

.boot-screen p,
.loading-screen p,
.setup-required p,
.placeholder-panel p {
  margin: 0;
  color: #aeb7c1;
  font-size: 2rem;
}

.boot-mark {
  width: 6rem;
  height: 6rem;
  border: 0.35rem solid #1e3344;
  border-top-color: #49b7ff;
  border-radius: 50%;
}

.console-frame {
  padding: 2rem;
  border: 0.4rem solid #141a20;
  box-shadow: inset 0 0 0 0.15rem #3a4249;
}

.top-line {
  display: flex;
  gap: 2rem;
  align-items: baseline;
  color: #f7f8fa;
}

.clock {
  font-size: 4rem;
  font-weight: 800;
}

.date-line {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.placeholder-panel h1,
.loading-screen h1,
.setup-required h1 {
  margin: 0 0 1rem;
  font-size: 5rem;
}

.instrument-console {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  grid-template-rows: 4.35rem minmax(14.8rem, 0.98fr) minmax(8rem, 0.48fr) minmax(5.05rem, 0.3fr) minmax(10.25rem, 0.64fr);
  gap: 0.55rem;
  width: 1280px;
  height: 800px;
  padding: 0.95rem 1.2rem 1rem;
  overflow: hidden;
  transform: translate(-50%, -50%) scale(var(--console-scale, 1));
  transform-origin: center;
  font-family: var(--font-instrument);
  background:
    linear-gradient(180deg, rgb(255 255 255 / 0.035), transparent 20%),
    linear-gradient(180deg, #070b0e 0%, #020405 100%);
  border: 0.34rem solid #111820;
  box-shadow:
    inset 0 0 0 0.11rem #51606a,
    inset 0 0 2.4rem rgb(255 255 255 / 0.07),
    0 0 0 0.2rem #030506;
}

.instrument-header {
  display: grid;
  grid-template-columns: auto 0.18rem auto 1fr;
  gap: 1.65rem;
  align-items: center;
  min-height: 0;
  padding-bottom: 0.55rem;
  border-bottom: 0.14rem solid var(--cyan-soft);
}

.header-clock {
  white-space: nowrap;
  font-size: 3rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
  color: var(--text);
  text-shadow: 0 0.1rem 0.7rem rgb(255 255 255 / 0.16);
}

.header-rule {
  width: 0.16rem;
  height: 3.2rem;
  background: var(--cyan);
  opacity: 0.92;
}

.header-date {
  align-self: center;
  white-space: nowrap;
  font-size: 1.65rem;
  font-weight: 650;
  line-height: 1;
  color: #e7ebef;
  text-transform: uppercase;
}

.header-updated {
  justify-self: end;
  color: var(--muted);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.1;
  text-align: right;
  text-transform: uppercase;
}

.hero-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(18.6rem, 0.28fr);
  gap: 0.15rem;
  min-height: 0;
}

.current-panel,
.wind-panel,
.rain-panel,
.metric-band,
.forecast-rail {
  background: linear-gradient(180deg, rgb(18 27 33 / 0.92), rgb(7 11 14 / 0.94));
  border: 0.12rem solid var(--line);
  box-shadow:
    inset 0 0 0 0.06rem rgb(255 255 255 / 0.06),
    inset 0 -1rem 3rem rgb(0 0 0 / 0.2);
}

.current-panel {
  display: grid;
  grid-template-columns: minmax(9.8rem, 0.22fr) minmax(0, 1fr);
  align-items: center;
  min-width: 0;
  padding: 0.3rem 1.35rem 0.45rem 0.9rem;
  border-color: transparent;
  border-right: 0.12rem solid var(--line);
  background: transparent;
  box-shadow: none;
}

.hero-weather-icon {
  justify-self: center;
  width: 10.9rem;
  height: 10.9rem;
  filter: drop-shadow(0 0 1.1rem rgb(255 179 44 / 0.24));
}

.temperature-lockup {
  min-width: 0;
  display: grid;
  justify-items: center;
  text-align: center;
}

.temperature-value {
  font-size: 13.1rem;
  font-weight: 700;
  line-height: 0.72;
  letter-spacing: 0;
  color: var(--text);
  text-shadow: 0 0.18rem 1rem rgb(255 255 255 / 0.16);
}

.condition-line {
  margin-top: 0.35rem;
  font-size: 2.55rem;
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
}

.current-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  align-items: center;
  justify-content: center;
  margin-top: 0.6rem;
  color: var(--muted);
  font-size: 1.32rem;
  font-weight: 650;
  line-height: 1;
  text-transform: uppercase;
}

.current-meta strong,
.warm {
  color: var(--amber);
}

.current-meta .cool,
.cool {
  color: #76beff;
}

.meta-divider {
  width: 0.12rem;
  height: 1.65rem;
  background: var(--line);
}

.wind-panel {
  display: grid;
  place-items: center;
  min-height: 0;
  padding-left: 0.25rem;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

.wind-compass {
  position: relative;
  width: min(17rem, 100%);
  aspect-ratio: 1;
}

.wind-compass-face {
  width: 100%;
  height: 100%;
  overflow: visible;
  filter: drop-shadow(0 0 1rem rgb(73 183 255 / 0.08));
}

.compass-face-bg {
  fill: rgb(15 21 25 / 0.45);
}

.compass-outer-ring {
  fill: none;
  stroke: rgb(178 190 200 / 0.5);
  stroke-width: 3;
}

.compass-ring {
  fill: none;
  stroke: rgb(178 190 200 / 0.45);
  stroke-width: 2.5;
}

.compass-axis {
  stroke: var(--cyan);
  stroke-linecap: round;
  stroke-width: 2.8;
  opacity: 0.86;
}

.compass-axis-ns {
  stroke-dasharray: 22 70 22;
}

.compass-axis-ew {
  stroke-dasharray: 22 70 22;
}

.compass-ticks line {
  stroke: rgb(223 234 242 / 0.72);
  stroke-linecap: round;
}

.wind-bearing {
  filter: drop-shadow(0 0 0.55rem rgb(255 179 44 / 0.5));
}

.wind-marker-line {
  stroke: #ffb32c;
  stroke-linecap: round;
  stroke-width: 2.3;
  opacity: 0.72;
}

.wind-marker-head {
  fill: url("#wind-marker-gold");
  stroke: #ffe08a;
  stroke-linejoin: round;
  stroke-width: 0.8;
}

.compass-label {
  fill: #e7edf3;
  font-size: 23px;
  font-weight: 650;
  paint-order: stroke;
  stroke: rgb(0 0 0 / 0.55);
  stroke-width: 5px;
  text-anchor: middle;
}

.compass-label-n,
.compass-label-s {
  dominant-baseline: middle;
}

.compass-label-e,
.compass-label-w,
.compass-label-ne,
.compass-label-se,
.compass-label-sw,
.compass-label-nw {
  dominant-baseline: central;
}

.wind-center {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  display: grid;
  justify-items: center;
  width: 9.2rem;
  padding: 0.35rem 0.35rem 0.5rem;
  transform: translate(-50%, -46%);
  background: radial-gradient(ellipse at center, rgb(6 10 13 / 0.92) 0 58%, rgb(6 10 13 / 0.72) 72%, transparent 73%);
  text-align: center;
}

.wind-direction {
  font-size: 2.05rem;
  font-weight: 700;
  line-height: 1;
}

.wind-speed {
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 0.25rem;
  margin-top: 0.15rem;
  line-height: 0.86;
}

.wind-speed strong {
  color: var(--text);
  font-size: 3.55rem;
  font-weight: 700;
}

.wind-speed span {
  color: var(--text);
  font-size: 1rem;
  font-weight: 600;
}

.wind-gust {
  display: flex;
  gap: 0.35rem;
  align-items: baseline;
  justify-content: center;
  min-width: 5.8rem;
  margin-top: 0.55rem;
  padding-top: 0.32rem;
  border-top: 0.14rem solid var(--cyan);
  color: var(--muted);
  font-weight: 650;
  line-height: 1;
  text-transform: uppercase;
}

.wind-gust span {
  font-size: 0.92rem;
}

.wind-gust strong {
  color: var(--text);
  font-size: 1.35rem;
}

.rain-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.62fr) minmax(30rem, 1fr);
  align-items: stretch;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border-radius: 0.45rem;
}

.rain-summary {
  display: grid;
  grid-template-rows: 3.2rem minmax(0, 1fr);
  min-width: 0;
  height: 100%;
  border-right: 0.12rem solid var(--line);
}

.rain-readouts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  min-width: 0;
  height: 100%;
}

.rain-stat,
.rain-next {
  position: relative;
  display: grid;
  align-content: center;
  min-width: 0;
  height: 100%;
  padding: 0.2rem 0.7rem 0.5rem;
  border-right: 0.12rem solid var(--line);
}

.rain-next {
  border-right: 0;
}

.rain-title {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  min-width: 0;
  padding: 0.45rem 1rem 0;
  color: var(--cyan);
  font-size: 1.56rem;
  font-weight: 650;
  letter-spacing: 0.055em;
  line-height: 1.05;
  text-transform: uppercase;
}

.section-icon {
  flex: 0 0 auto;
  width: 3.1rem;
  height: 3.1rem;
}

.rain-stat {
  grid-template-columns: minmax(0, max-content) auto;
  column-gap: 0.35rem;
  justify-content: center;
  justify-items: center;
  text-align: center;
}

.rain-next {
  justify-items: center;
  text-align: center;
}

.rain-stat span,
.rain-next span {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 1.05rem;
  font-weight: 650;
  line-height: 1;
  text-transform: uppercase;
}

.rain-stat strong {
  margin-top: 0.2rem;
  color: var(--text);
  font-size: 3.05rem;
  font-weight: 600;
  line-height: 0.92;
}

.rain-stat em {
  position: static;
  align-self: end;
  margin-bottom: 0.28rem;
  color: var(--text);
  font-size: 1.25rem;
  font-style: normal;
  font-weight: 600;
}

.rain-next strong {
  margin-top: 0.4rem;
  color: var(--text);
  font-size: 2.35rem;
  font-weight: 650;
  line-height: 0.98;
  text-transform: uppercase;
}

.rain-bars {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: end;
  height: 100%;
  min-width: 0;
  padding: 0.55rem 0.8rem 0.55rem;
}

.rain-day {
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 0.25rem;
  justify-items: center;
  height: 100%;
  min-width: 0;
  border-left: 0.08rem solid var(--line-soft);
  color: #dfe8f0;
}

.rain-day span {
  font-size: 1.15rem;
  font-weight: 650;
  line-height: 1;
  text-transform: uppercase;
}

.rain-day strong {
  color: var(--cyan);
  font-size: 1.35rem;
  font-weight: 650;
  line-height: 1;
}

.rain-bar-track {
  position: relative;
  align-self: stretch;
  width: 3.2rem;
  border-radius: 0.14rem;
  background: rgb(73 183 255 / 0.1);
  overflow: hidden;
}

.rain-bar-track i {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: block;
  background: linear-gradient(180deg, #67c9ff, #147cc3);
  box-shadow: inset 0 0 1rem rgb(255 255 255 / 0.22);
}

.metric-band {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  min-height: 0;
  border-radius: 0.42rem;
}

.metric-band-with-indoor {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.metric-tile {
  display: grid;
  grid-template-columns: minmax(3.9rem, auto) auto;
  gap: 1rem;
  align-items: center;
  justify-content: center;
  align-content: center;
  min-width: 0;
  padding: 0.45rem 0.85rem;
  border-right: 0.12rem solid var(--line);
}

.metric-tile:last-child {
  border-right: 0;
}

.metric-icon {
  width: 4.15rem;
  height: 4.15rem;
}

.metric-band-with-indoor .metric-tile {
  grid-template-columns: minmax(3.3rem, auto) auto;
  gap: 0.72rem;
  padding: 0.42rem 0.55rem;
}

.metric-band-with-indoor .metric-icon {
  width: 3.65rem;
  height: 3.65rem;
}

.metric-copy {
  min-width: 0;
}

.metric-tile span,
.metric-tile em {
  display: block;
  color: var(--muted);
  font-size: 1.08rem;
  font-style: normal;
  font-weight: 650;
  line-height: 1;
  text-transform: uppercase;
}

.metric-tile strong {
  display: block;
  margin-top: 0.12rem;
  color: var(--text);
  font-size: 2.45rem;
  font-weight: 650;
  line-height: 1;
}

.metric-band-with-indoor .metric-tile span,
.metric-band-with-indoor .metric-tile em {
  font-size: 0.95rem;
}

.metric-band-with-indoor .metric-tile strong {
  font-size: 2.15rem;
}

.metric-tile em {
  margin-top: 0.05rem;
  color: var(--amber);
}

.metric-tile-uv {
  grid-template-columns: minmax(4.9rem, auto) auto;
  gap: 0.85rem;
}

.metric-band-with-indoor .metric-tile-uv {
  grid-template-columns: minmax(4.1rem, auto) auto;
  gap: 0.58rem;
}

.metric-tile-uv .metric-icon {
  width: 4.8rem;
  height: 4.8rem;
}

.metric-band-with-indoor .metric-tile-uv .metric-icon {
  width: 4.2rem;
  height: 4.2rem;
}

.metric-tile-uv .metric-copy {
  display: grid;
  grid-template-columns: auto auto;
  column-gap: 0.55rem;
  align-items: end;
}

.metric-tile-uv span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.metric-tile-uv strong {
  margin-top: 0;
  font-size: 3.25rem;
  line-height: 0.9;
}

.metric-band-with-indoor .metric-tile-uv strong {
  font-size: 2.85rem;
}

.metric-tile-uv em {
  align-self: end;
  margin: 0 0 0.18rem;
  font-size: 1.45rem;
  line-height: 1;
}

.metric-band-with-indoor .metric-tile-uv em {
  margin-bottom: 0.12rem;
  font-size: 1.22rem;
}

.forecast-rail {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  min-height: 0;
  border-radius: 0.42rem;
}

.forecast-day {
  display: grid;
  grid-template-rows: 3.1rem 2.3rem auto auto;
  gap: 0.2rem;
  min-width: 0;
  padding: 0.5rem 0.75rem 0.55rem;
  border-right: 0.12rem solid var(--line);
}

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

.forecast-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  min-width: 0;
}

.forecast-head strong {
  font-size: 1.42rem;
  font-weight: 650;
  line-height: 1;
  text-transform: uppercase;
}

.forecast-icon {
  flex: 0 0 auto;
  width: 3.85rem;
  height: 3.05rem;
}

.forecast-day > span {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.12;
  text-transform: uppercase;
  white-space: normal;
}

.forecast-temps {
  display: flex;
  gap: 0.45rem;
  align-items: baseline;
  justify-content: center;
  min-width: 0;
  font-size: 2.08rem;
  font-weight: 650;
  line-height: 1;
}

.forecast-temps b {
  color: var(--amber);
}

.forecast-temps b.cool {
  color: var(--cyan);
}

.forecast-temps i {
  color: var(--muted);
  font-style: normal;
  font-weight: 700;
}

.forecast-rain {
  display: grid;
  grid-template-columns: auto auto;
  gap: 0.38rem;
  align-items: center;
  justify-content: center;
  min-width: 0;
  color: var(--cyan);
  font-size: 1.1rem;
  font-weight: 650;
  line-height: 1;
}

.forecast-drop {
  width: 1.05rem;
  height: 1.28rem;
  filter: drop-shadow(0 0 0.35rem rgb(73 183 255 / 0.28));
}

@media (max-height: 720px) {
  .instrument-console {
    grid-template-rows: 4.2rem minmax(14.7rem, 0.96fr) minmax(8.1rem, 0.48fr) minmax(5.2rem, 0.3fr) minmax(10.2rem, 0.64fr);
    gap: 0.55rem;
    padding: 0.9rem 1.1rem 1rem;
  }

  .temperature-value {
    font-size: 11.4rem;
  }

  .wind-compass {
    width: min(15.8rem, 100%);
  }

.rain-stat strong {
    font-size: 3.05rem;
  }
}
