@font-face {
  font-family: "Instrument Serif";
  src: url("/static/fonts/instrument-serif-regular.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Sans";
  src: url("/static/fonts/ibm-plex-sans-regular.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Sans";
  src: url("/static/fonts/ibm-plex-sans-medium.woff2") format("woff2");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Sans";
  src: url("/static/fonts/ibm-plex-sans-semibold.woff2") format("woff2");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("/static/fonts/ibm-plex-mono-regular.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("/static/fonts/ibm-plex-mono-medium.woff2") format("woff2");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}

/* Warm-Mediterranean palette from redesign spec §6. */
:root {
  color-scheme: light;
  --font-display: "Instrument Serif", Georgia, serif;
  --font-ui: "IBM Plex Sans", Arial, sans-serif;
  --font-numeric: "IBM Plex Mono", "Courier New", monospace;
  --page-bg: #16130F;
  --surface: #1E1915;
  --surface-alt: #241E18;
  --border: #33291F;
  --ink: #F5EFE7;
  --muted: #A0958A;
  --accent: #E4785A;
  --sea: #5FA79E;
  --color-icon: var(--ink);
  --color-sun: var(--band-text-medium);
  --color-rain: #60C0A0;
  --color-wind: #6088C0;
  --color-humidity: #A08060;
  --color-danger: var(--band-text-very-high);
  --band-fill-very-low: #4C6E8C;
  --band-fill-low: #7BB661;
  --band-fill-medium: #F2C14E;
  --band-fill-high: #E8833A;
  --band-fill-very-high: #D0442C;
  --band-fill-extreme: #8E5AA8;
  /* Derived from the blue very-low fill by lightening it until it clears
     4.5:1 on every dark §6 surface; §6 omits this required text step. */
  --band-text-very-low: #82ADD0;
  --band-text-low: #8CC470;
  --band-text-medium: #E0B44A;
  --band-text-high: #DC7B36;
  --band-text-very-high: #E4785A;
  --band-text-extreme: #C48BE0;
  --color-link: var(--sea);
  --color-body-wash: rgba(228, 120, 90, 0.08);
  --color-focus-ring: rgba(228, 120, 90, 0.16);
  --color-focus-ring-soft: rgba(228, 120, 90, 0.14);
  --color-footer-bg: rgba(22, 19, 15, 0.92);
  --color-footer-border: rgba(51, 41, 31, 0.82);
  --color-legend-border: rgba(245, 239, 231, 0.28);
  --color-chart-shadow: rgba(22, 19, 15, 0.72);
  --color-chart-night: rgba(0, 0, 0, 0.2);
  --color-backdrop: rgba(0, 0, 0, 0.48);
  --color-backdrop-soft: rgba(0, 0, 0, 0.36);
  --color-header-control-bg: rgba(36, 30, 24, 0.88);
  --color-flag-border: rgba(245, 239, 231, 0.58);
  --color-toggle-inset: rgba(245, 239, 231, 0.04);
  --color-toggle-shadow: rgba(0, 0, 0, 0.35);
  --color-hour-selection: rgba(95, 167, 158, 0.26);
  --color-hour-selection-border: #5FA79E;
  --chart-left-color: var(--band-text-very-high);
  --chart-right-color: var(--band-text-medium);
  --shadow-sticky: 0 10px 28px rgba(0, 0, 0, 0.3);
  --space-1: 2px;
  --space-2: 4px;
  --space-3: 8px;
  --space-4: 12px;
  --space-5: 16px;
  --space-6: 24px;
  --attribution-footer-reserved-height: 48px;
  --bottom-nav-height: 56px;
  --day-strip-height: 61px;
  --safe-area-inset-top: env(safe-area-inset-top, 0px);
  --safe-area-inset-right: env(safe-area-inset-right, 0px);
  --safe-area-inset-bottom: env(safe-area-inset-bottom, 0px);
  --safe-area-inset-left: env(safe-area-inset-left, 0px);
  --app-shell-narrow-max-width: 440px;
  --font-size-headline-number: 2rem;
  --font-size-body: 15px;
  --font-size-title: 1rem;
  --font-size-section-title: 1rem;
  --font-size-label: 0.9rem;
  --font-size-small-label: 0.78rem;
  --font-size-caption: 0.82rem;
  --font-size-micro-label: 0.76rem;
  --font-weight-body: 400;
  --font-weight-supporting-label: 500;
  --font-weight-headline-number: 500;
  --font-weight-strong: 600;
  font-family: var(--font-ui);
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-body);
  font-synthesis: none;
}

:root.attribution-footer-dismissed {
  --attribution-footer-reserved-height: 0px;
}

html[data-theme="dark"] {
  color-scheme: dark;
}

html[data-theme="light"] {
  color-scheme: light;
  --page-bg: #FBF6EF;
  --surface: #FFFFFF;
  --surface-alt: #F3EADC;
  --border: #EADFCF;
  --ink: #23201C;
  --muted: #7A7168;
  --accent: #C4553B;
  --sea: #2E6F6A;
  --color-icon: var(--ink);
  --color-sun: var(--band-text-medium);
  --color-rain: #2E6F6A;
  --color-wind: #4B5680;
  --color-humidity: #596B35;
  --color-danger: var(--band-text-very-high);
  --band-fill-very-low: #4C6E8C;
  --band-fill-low: #7BB661;
  --band-fill-medium: #F2C14E;
  --band-fill-high: #E8833A;
  --band-fill-very-high: #D0442C;
  --band-fill-extreme: #8E5AA8;
  /* Derived from the blue very-low fill by darkening it until it clears
     4.5:1 on every light §6 surface; §6 omits this required text step. */
  --band-text-very-low: #456987;
  --band-text-low: #2F6B22;
  --band-text-medium: #7A5A10;
  --band-text-high: #8A4A12;
  --band-text-very-high: #A8362A;
  --band-text-extreme: #6B3FA0;
  --color-link: var(--sea);
  --color-body-wash: rgba(196, 85, 59, 0.08);
  --color-focus-ring: rgba(196, 85, 59, 0.2);
  --color-focus-ring-soft: rgba(196, 85, 59, 0.18);
  --color-footer-bg: rgba(251, 246, 239, 0.94);
  --color-footer-border: rgba(234, 223, 207, 0.82);
  --color-legend-border: rgba(35, 32, 28, 0.35);
  --color-chart-shadow: rgba(255, 255, 255, 0.84);
  --color-chart-night: rgba(35, 32, 28, 0.08);
  --color-backdrop: rgba(35, 32, 28, 0.38);
  --color-backdrop-soft: rgba(35, 32, 28, 0.28);
  --color-header-control-bg: rgba(243, 234, 220, 0.9);
  --color-flag-border: rgba(35, 32, 28, 0.48);
  --color-toggle-inset: rgba(35, 32, 28, 0.08);
  --color-toggle-shadow: rgba(35, 32, 28, 0.25);
  --color-hour-selection: rgba(46, 111, 106, 0.22);
  --color-hour-selection-border: #2E6F6A;
  --chart-left-color: var(--band-text-very-high);
  --chart-right-color: var(--band-text-medium);
  --shadow-sticky: 0 10px 28px rgba(23, 33, 43, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--page-bg);
}

body {
  overflow-x: hidden;
  min-height: 100%;
  margin: 0;
  background:
    linear-gradient(180deg, var(--color-body-wash), transparent 240px),
    var(--page-bg);
  color: var(--ink);
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-body);
}

button,
input,
select {
  font: inherit;
}

/* §5b display roles. */
:where(.wordmark, .brand-wordmark) {
  font-family: var(--font-display);
  font-size: clamp(20px, 5.5vw, 22px);
  font-weight: 400;
  line-height: 0.95;
}

.verdict-window {
  font-family: var(--font-display);
  font-size: clamp(40px, 11.3vw, 44px);
  font-weight: 400;
  line-height: 0.9;
}

:where(.hour-sheet-header, .hour-sheet-title) {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 400;
  line-height: 0.95;
}

/* Numeric values have an explicit mono assignment instead of inheriting the
   UI face. This list mirrors every current value/time role in the static and
   dynamically generated forecast, chart, and threshold UI. */
:is(
  .summary-card-value,
  .context-card-metric-value,
  .location-meta time,
  .day-pill-date,
  .hour-sheet-uv-value,
  .hour-sheet-value-number,
  .peak-range-hours,
  .peak-range-peak-value,
  .overlay-chart-tick-label,
  .overlay-chart-x-label,
  .overlay-chart-peak-label,
  .overlay-chart-now-label,
  .overlay-chart-sun-label,
  .uv-threshold-tick-label,
  .uv-threshold-legend-label,
  .hour-time,
  .metric-value,
  .threshold-band-range,
  .threshold-cutoff-item,
  .threshold-input,
  .daylight-ribbon-bracket-label,
  .daylight-ribbon-fallback-label,
  .daylight-ribbon-end,
  .next-hour-time,
  .next-hour-temperature
) {
  font-family: var(--font-numeric);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

.app-shell {
  width: min(100%, var(--app-shell-narrow-max-width));
  margin: 0 auto;
  padding: 0 var(--space-5) calc(var(--space-6) + var(--attribution-footer-reserved-height) + var(--bottom-nav-height) + var(--day-strip-height) + env(safe-area-inset-bottom));
}

.forecast-answer {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.forecast-answer[hidden] {
  display: none;
}

.weather-header {
  position: relative;
  margin: 0 calc(0px - var(--space-5));
  padding: calc(var(--space-5) + var(--space-1)) var(--space-5) calc(var(--space-4) + var(--space-1));
  background: var(--page-bg);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sticky);
  color: var(--ink);
  backdrop-filter: blur(18px);
}

.weather-header[hidden] {
  display: none;
}

.brand-top-row {
  display: flex;
  width: 100%;
  max-height: 44px;
  margin: 0 0 var(--space-3);
  align-items: center;
  justify-content: space-between;
  color: var(--ink);
}

.brand-identity {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: var(--space-2);
}

.brand-mark {
  display: block;
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
}

.brand-mark-sun {
  fill: #f2a65a;
}

.brand-mark-cutout {
  fill: var(--page-bg);
}

.brand-mark-sea {
  fill: var(--sea);
}

:root[data-theme="light"] .brand-mark-sun {
  fill: #e8833a;
}

:is(.header-top, .settings-header, .location-search-overlay-header) {
  display: flex;
  align-items: center;
}

.header-top {
  min-width: 0;
}

.header-location-line {
  display: flex;
  min-width: 0;
  max-width: 100%;
  align-items: center;
  gap: var(--space-2);
  overflow: hidden;
  font-size: 15px;
  line-height: 20px;
  white-space: nowrap;
}

.metric-label,
.toggle-caption {
  color: var(--muted);
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: var(--font-size-title);
  font-weight: var(--font-weight-strong);
}

#location-name {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  font-size: 15px;
  line-height: 20px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#location-name[data-switcher-enabled="true"] {
  position: relative;
  box-sizing: border-box;
  padding-right: 14px;
  cursor: pointer;
  text-decoration-line: underline;
  text-decoration-style: dotted;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 4px;
}

#location-name[data-switcher-enabled="true"]::after {
  position: absolute;
  right: 0;
  color: var(--accent);
  content: "\25be";
  font-size: 11px;
  line-height: 20px;
  text-decoration: none;
}

#location-name[data-switcher-enabled="true"]:focus-visible {
  border-radius: 3px;
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.location-meta {
  max-width: 45%;
  flex: 0 1 auto;
  flex-shrink: 4;
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 15px;
  line-height: 20px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.icon-button,
.close-button {
  border: 1px solid var(--border);
  background: var(--surface-alt);
  color: var(--color-icon);
}

.icon-button {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  place-items: center;
  border-radius: 50%;
}

.icon-button svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.settings-menu-button svg {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.icon-button:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--color-focus-ring);
  outline: 0;
}

.icon-button:disabled {
  color: var(--muted);
  opacity: 0.66;
}

.verdict-card-placeholder {
  --verdict-hue: var(--band-text-very-high);
  position: relative;
  display: grid;
  width: 100%;
  max-width: var(--app-shell-narrow-max-width);
  min-height: 156px;
  margin: var(--space-4) 0 0;
  padding: var(--space-4) 0 32px;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: center;
  overflow: hidden;
  touch-action: pan-y;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.verdict-card-placeholder[hidden] {
  display: none;
}

.verdict-card-placeholder[data-tone="sea"] {
  --verdict-hue: var(--sea);
}

.verdict-card-placeholder[data-tone="olive"] {
  --verdict-hue: var(--color-humidity);
}

.daylight-ribbon[hidden],
.daylight-ribbon-bracket[hidden],
.daylight-ribbon-activity-underlines[hidden],
.daylight-ribbon-now[hidden],
.daylight-ribbon-fallback-labels[hidden] {
  display: none;
}

.five-days-ribbon[hidden],
.places-ribbon[hidden],
.metric-ribbon-container[hidden] {
  display: none;
}

.daylight-ribbon {
  position: relative;
  width: 100%;
  max-width: var(--app-shell-narrow-max-width);
  margin-top: var(--space-4);
  padding-top: 32px;
  color: var(--muted);
}

.daylight-ribbon-title {
  position: absolute;
  top: 0;
  left: 0;
  color: var(--muted);
  font-size: var(--font-size-micro-label);
  line-height: 1;
}

.metric-ribbon-container {
  position: relative;
  display: block;
  width: 100%;
  min-width: 0;
  color: var(--muted);
}

.daylight-ribbon-track,
.metric-ribbon-track {
  --ribbon-track-tint: var(--border);
  display: flex;
  width: 100%;
  height: 28px;
  gap: 1px;
  overflow: visible;
  border-radius: 6px;
}

.metric-ribbon-track {
  /* Shared severity ramps; filled-cell inline styles select the active step. */
  --ribbon-fill-very-low: var(--band-fill-very-low);
  --ribbon-fill-low: var(--band-fill-low);
  --ribbon-fill-medium: var(--band-fill-medium);
  --ribbon-fill-high: var(--band-fill-high);
  --ribbon-fill-very-high: var(--band-fill-very-high);
  --ribbon-fill-extreme: var(--band-fill-extreme);
  --ribbon-text-very-low: var(--band-text-very-low);
  --ribbon-text-low: var(--band-text-low);
  --ribbon-text-medium: var(--band-text-medium);
  --ribbon-text-high: var(--band-text-high);
  --ribbon-text-very-high: var(--band-text-very-high);
  --ribbon-text-extreme: var(--band-text-extreme);
}

.daylight-ribbon-cell {
  position: relative;
  min-width: 0;
  height: 100%;
  flex-basis: 0;
}

.daylight-ribbon-cell-band {
  position: absolute;
  inset: 0;
  display: block;
  transition: opacity 120ms ease;
}

.daylight-ribbon-cell:first-child .daylight-ribbon-cell-band {
  border-radius: 6px 0 0 6px;
}

.daylight-ribbon-cell:last-child .daylight-ribbon-cell-band {
  border-radius: 0 6px 6px 0;
}

.touch-target-44 {
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
}

.daylight-ribbon-cell-target {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  margin: -22px 0 0 -22px;
  color: transparent;
  cursor: pointer;
}

.daylight-ribbon-cell:focus-within {
  z-index: 4;
}

.daylight-ribbon-cell-target:focus-visible {
  border-radius: 6px;
  outline: 2px solid var(--ink);
  outline-offset: -3px;
}

.daylight-ribbon-activity-underlines {
  position: absolute;
  top: 62px;
  left: 0;
  width: 100%;
  height: 2px;
  overflow: hidden;
}

.daylight-ribbon-activity-underline {
  position: absolute;
  top: 0;
  height: 2px;
  border-radius: 999px;
  background: var(--activity-underline-color, var(--accent));
}

.daylight-ribbon-bracket {
  position: absolute;
  top: 0;
  height: 27px;
  min-width: 2px;
  pointer-events: none;
}

.daylight-ribbon-bracket-line {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 8px;
  color: var(--ribbon-bracket-color, var(--accent));
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  border-left: 2px solid currentColor;
}

.daylight-ribbon-bracket-label {
  position: absolute;
  top: 0;
  color: var(--ribbon-bracket-text-color, var(--accent));
  font-size: var(--font-size-micro-label);
  line-height: 1;
  white-space: nowrap;
}

.daylight-ribbon-bracket-start {
  left: 0;
}

.daylight-ribbon-bracket-end {
  right: 0;
}

.daylight-ribbon-now {
  position: absolute;
  top: 28px;
  z-index: 3;
  width: 2px;
  height: 49px;
  transform: translateX(-1px);
  pointer-events: none;
}

.daylight-ribbon-now-line {
  display: block;
  height: 36px;
  border-left: 2px dashed var(--ink);
}

.daylight-ribbon-ends {
  display: flex;
  margin-top: var(--space-2);
  align-items: center;
  justify-content: space-between;
}

.daylight-ribbon-end {
  color: var(--muted);
  font-size: var(--font-size-micro-label);
  line-height: 1;
}

.daylight-ribbon-end [aria-hidden="true"] {
  color: var(--color-sun);
}

.daylight-ribbon-fallback-labels {
  position: relative;
  height: 28px;
  margin-top: var(--space-2);
}

.daylight-ribbon-fallback-label {
  position: absolute;
  top: 0;
  color: var(--muted);
  font-size: clamp(0.55rem, 2.4vw, var(--font-size-micro-label));
  line-height: 1;
  transform: translateX(-50%);
  white-space: nowrap;
}

.daylight-ribbon-fallback-label:first-child {
  transform: none;
}

.daylight-ribbon-fallback-label:last-child {
  transform: translateX(-100%);
}

.daylight-ribbon[data-axis-mode="fallback"] .daylight-ribbon-ends {
  display: none;
}

.verdict-copy {
  min-width: 0;
  text-align: center;
}

.verdict-window {
  overflow-wrap: anywhere;
  color: var(--verdict-hue);
}

.verdict-headline {
  margin-top: var(--space-3);
  color: var(--verdict-hue);
  font-size: 15px;
  font-weight: var(--font-weight-strong);
  line-height: 1.2;
}

.verdict-window[hidden] + .verdict-headline {
  margin-top: 0;
}

.verdict-body {
  max-width: 46ch;
  margin: var(--space-2) auto 0;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.35;
}

.verdict-note {
  max-width: 46ch;
  margin: var(--space-2) auto 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
}

.verdict-note[hidden] {
  display: none;
}

.verdict-arrow,
.verdict-dot {
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  background: transparent;
  border: 0;
  color: var(--verdict-hue);
  cursor: pointer;
}

.verdict-arrow {
  display: grid;
  margin-block: -6px;
  place-items: center;
  font-size: 34px;
  line-height: 1;
}

.verdict-arrow-glyph {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
}

.verdict-arrow:focus-visible,
.verdict-dot:focus-visible {
  border-radius: 50%;
  box-shadow: inset 0 0 0 2px var(--verdict-hue);
  outline: 0;
}

.verdict-dots {
  position: absolute;
  bottom: 0;
  left: 50%;
  display: flex;
  height: 44px;
  align-items: center;
  transform: translateX(-50%);
}

.verdict-dot {
  position: relative;
  display: grid;
  place-items: center;
}

.verdict-dot::before {
  width: 6px;
  height: 6px;
  background: var(--muted);
  border-radius: 50%;
  content: "";
}

.verdict-dot.is-active::before {
  width: 9px;
  height: 9px;
  background: var(--verdict-hue);
}

.summary-cards {
  display: grid;
  width: 100%;
  max-width: var(--app-shell-narrow-max-width);
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: var(--space-4);
  align-items: stretch;
}

.summary-card {
  position: relative;
  min-width: 0;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
}

.next-hours {
  min-width: 0;
  margin-top: var(--space-5);
}

.next-hours[hidden] {
  display: none;
}

.next-hours-label {
  margin: 0 0 10px;
  color: var(--muted);
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: var(--font-weight-strong);
  letter-spacing: 0.1em;
  line-height: 1.2;
}

.next-hours-row {
  display: flex;
  min-width: 0;
  max-width: 100%;
  gap: var(--space-3);
  overflow-x: auto;
  padding: 0;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
}

.next-hours-row::-webkit-scrollbar {
  display: none;
}

.next-hour-pebble {
  display: flex;
  width: 62px;
  min-width: 62px;
  flex: 0 0 62px;
  flex-direction: column;
  align-items: center;
  padding: 11px 0;
  background: var(--surface-alt);
  border-radius: 12px;
  color: var(--ink);
  text-align: center;
}

.next-hour-time {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
}

.next-hour-temperature {
  margin: 4px 0 6px;
  color: var(--ink);
  font-size: 19px;
  font-weight: var(--font-weight-headline-number);
  line-height: 1.2;
}

.next-hour-uv-band {
  width: 22px;
  height: 5px;
  border-radius: 3px;
  background: var(--next-hour-uv-fill, var(--muted));
}

.summary-card-heading,
.context-columns-heading {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
}

.summary-card-heading {
  margin-bottom: 6px;
}

.columns-sheet-trigger {
  display: inline-grid;
  width: 44px;
  min-width: 44px;
  height: 44px;
  place-items: center;
  padding: 0;
  margin: -11px -11px -11px 0;
  background: transparent;
  border: 0;
  border-radius: 10px;
  color: var(--muted);
  font-family: var(--font-ui);
  font-size: 22px;
  line-height: 1;
}

.columns-sheet-trigger:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.context-card-metrics {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 0;
  margin: 6px 0 0;
  padding: 0;
  list-style: none;
}

.context-card-metric {
  display: flex;
  min-width: 0;
  min-height: 24px;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-2);
  padding: 3px 0;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.35;
}

.context-card-metric-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.context-card-metric-value {
  flex: 0 0 auto;
  color: var(--ink);
  font-family: var(--font-numeric);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.metric-label {
  display: block;
  margin-bottom: var(--space-2);
  font-size: var(--font-size-small-label);
  font-weight: var(--font-weight-supporting-label);
  line-height: 1.1;
}

.metric-label-unit {
  white-space: nowrap;
}

.summary-card-label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: var(--font-weight-supporting-label);
  line-height: 1.1;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.summary-card-value {
  display: block;
  min-width: 0;
  font-size: clamp(1.7rem, 7.7vw, 1.875rem);
  font-weight: var(--font-weight-headline-number);
  line-height: 1.1;
  white-space: nowrap;
}

.summary-card-value::after {
  content: attr(data-value-unit);
}

.summary-card-range {
  display: flex;
  align-items: baseline;
  gap: 0;
  font-size: clamp(1.3rem, 6.7vw, 1.7rem);
}

.summary-card-range-divider {
  color: var(--muted);
  font-family: var(--font-ui);
}

.attribution-footer {
  position: fixed;
  z-index: 10;
  bottom: 0;
  left: 50%;
  width: min(100%, var(--app-shell-narrow-max-width));
  transform: translateX(-50%);
  padding: var(--space-2) calc(var(--space-5) + 44px) calc(var(--space-2) + env(safe-area-inset-bottom)) var(--space-5);
  background: var(--color-footer-bg);
  border-top: 1px solid var(--color-footer-border);
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: var(--font-weight-body);
  line-height: 1.35;
  text-align: center;
  backdrop-filter: blur(14px);
}

:root.attribution-footer-dismissed .attribution-footer {
  display: none;
}

.attribution-footer-copy {
  display: block;
}

.attribution-footer-dismiss {
  position: absolute;
  top: 2px;
  right: var(--space-2);
  display: grid;
  width: 44px;
  height: 44px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-family: var(--font-ui);
  font-size: 1.4rem;
  line-height: 1;
}

.attribution-footer-dismiss:focus-visible {
  box-shadow: 0 0 0 3px var(--color-focus-ring);
  outline: 2px solid var(--accent);
  outline-offset: -4px;
}

.attribution-footer a {
  color: var(--color-link);
  font-weight: var(--font-weight-supporting-label);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.attribution-footer a:focus-visible {
  border-radius: 3px;
  outline: 2px solid var(--accent);
  outline-offset: var(--space-1);
}

.bottom-nav {
  position: fixed;
  z-index: 20;
  bottom: calc(var(--attribution-footer-reserved-height) + env(safe-area-inset-bottom));
  left: 50%;
  display: grid;
  grid-template-columns: repeat(4, minmax(44px, 1fr));
  width: min(100%, var(--app-shell-narrow-max-width));
  min-height: var(--bottom-nav-height);
  overflow: hidden;
  transform: translateX(-50%);
  background: var(--color-footer-bg);
  border-top: 1px solid var(--color-footer-border);
  box-shadow: var(--shadow-sticky);
  backdrop-filter: blur(14px);
}

.bottom-nav-tab {
  min-width: 44px;
  min-height: 44px;
  padding: var(--space-2) var(--space-1);
  background: transparent;
  border: 0;
  border-top: 2px solid transparent;
  color: var(--muted);
  font-family: var(--font-ui);
  font-size: var(--font-size-small-label);
  font-weight: var(--font-weight-strong);
  line-height: 1.1;
}

.bottom-nav-tab[aria-current="page"] {
  background: var(--surface-alt);
  border-top-color: var(--accent);
  color: var(--accent);
}

.bottom-nav-tab:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -4px;
}

.bottom-nav-label {
  font-family: var(--font-ui);
}

.forecast-view-panel {
  display: contents;
}

.first-run-empty-state {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: var(--app-shell-narrow-max-width);
  min-height: calc(100dvh - 116px - var(--bottom-nav-height) - env(safe-area-inset-bottom));
  margin: 0 auto;
  padding: clamp(56px, 17vh, 128px) var(--space-5) var(--space-5);
}

.first-run-empty-state[hidden] {
  display: none;
}

.first-run-empty-copy {
  text-align: center;
}

.first-run-empty-headline {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 11vw, 3rem);
  font-weight: 400;
  line-height: 0.98;
}

.first-run-empty-payoff {
  margin: var(--space-3) 0 0;
  color: var(--muted);
  font-size: clamp(0.72rem, 3.2vw, var(--font-size-label));
  line-height: 1.35;
  white-space: nowrap;
}

.first-run-empty-actions {
  display: grid;
  width: 100%;
  margin-top: var(--space-6);
  gap: var(--space-2);
}

.first-run-empty-action {
  min-height: 48px;
  padding: 0 var(--space-4);
  border: 1px solid var(--accent);
  border-radius: 10px;
  font-family: var(--font-ui);
  font-size: var(--font-size-label);
  font-weight: var(--font-weight-strong);
}

.first-run-empty-primary {
  background: var(--accent);
  color: var(--page-bg);
}

.first-run-empty-secondary {
  background: transparent;
  color: var(--accent);
}

.first-run-empty-action:focus-visible {
  box-shadow: 0 0 0 3px var(--color-focus-ring);
  outline: 0;
}

.first-run-empty-action:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.first-run-geolocation-status {
  min-height: 1.25rem;
  margin: 0;
  color: var(--muted);
  font-size: var(--font-size-caption);
  line-height: 1.25;
  text-align: center;
}

.first-run-empty-attribution {
  margin: auto 0 0;
  padding-top: var(--space-6);
  color: var(--muted);
  font-family: var(--font-numeric);
  font-size: var(--font-size-caption);
  line-height: 1.3;
  text-align: center;
}

:root.first-run-empty .attribution-footer {
  display: none;
}

:root.first-run-empty {
  --attribution-footer-reserved-height: 0px;
}

.charts-view-panel {
  width: 100%;
  min-width: 0;
}

.five-days-view-panel {
  width: 100%;
  min-width: 0;
  padding: 18px var(--space-5) var(--space-6);
}

.context-columns-heading {
  width: 100%;
  max-width: var(--app-shell-narrow-max-width);
  min-height: 44px;
  margin: 0 auto var(--space-2);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 24px;
  line-height: 1.1;
}

.places-view-panel {
  width: 100%;
  min-width: 0;
  padding:
    18px var(--space-5)
    calc(var(--space-6) + var(--day-strip-height) + env(safe-area-inset-bottom));
}

.places-manage-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 100%;
  max-width: var(--app-shell-narrow-max-width);
  margin: 0 auto var(--space-5);
  gap: var(--space-3);
}

.places-manage-action {
  min-height: 44px;
  padding: 0 var(--space-3);
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: var(--font-size-label);
  font-weight: var(--font-weight-strong);
}

.places-manage-action:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--color-focus-ring);
  outline: 0;
}

.places-edit-action[aria-pressed="true"] {
  background: var(--color-body-wash);
  border-color: var(--accent);
}

.location-search-geolocation-status {
  width: 100%;
  max-width: var(--app-shell-narrow-max-width);
  min-height: 1.25rem;
  margin: calc(-1 * var(--space-2)) 0 0;
  color: var(--muted);
  font-size: var(--font-size-caption);
  line-height: 1.25;
}

.location-search-use-location-button {
  width: 100%;
  min-height: 44px;
  padding: 0 var(--space-3);
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: var(--font-size-label);
  font-weight: var(--font-weight-strong);
}

.location-search-use-location-button:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--color-focus-ring);
  outline: 0;
}

.places-list {
  display: grid;
  width: 100%;
  max-width: var(--app-shell-narrow-max-width);
  margin: 0 auto;
  gap: var(--space-3);
}

.places-row {
  display: block;
  width: 100%;
  min-width: 0;
  overflow: hidden;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--ink);
  font-family: var(--font-ui);
  text-align: left;
}

.places-row:hover {
  border-color: color-mix(in srgb, var(--border), var(--ink) 22%);
}

.places-row[data-active="true"] {
  border-color: color-mix(in srgb, var(--accent), var(--border) 52%);
}

.places-row-main {
  display: grid;
  width: 100%;
  min-width: 0;
  min-height: 104px;
  grid-template-rows: auto auto auto;
  gap: var(--space-3);
  padding: var(--space-4);
  cursor: pointer;
  touch-action: pan-y;
  background: transparent;
  border: 0;
  color: inherit;
  font: inherit;
  text-align: left;
}

.places-top-line,
.five-days-top-line {
  padding: 0;
  background: transparent;
  border: 0;
  color: inherit;
  cursor: pointer;
  font: inherit;
  text-align: inherit;
}

.places-top-line:focus-visible,
.places-manage-button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -3px;
}

.places-row-controls {
  display: grid;
  width: 100%;
  min-width: 0;
  min-height: 60px;
  grid-template-columns: minmax(0, 1fr) max-content repeat(3, 44px);
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-2);
}

.places-row-main[hidden],
.places-row-controls[hidden] {
  display: none;
}

.places-manage-button {
  display: inline-grid;
  width: 44px;
  min-width: 44px;
  height: 44px;
  place-items: center;
  padding: 0;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--muted);
  font-family: var(--font-ui);
  font-size: 22px;
  line-height: 1;
}

.places-manage-button:disabled {
  opacity: 0.32;
}

.places-remove {
  color: var(--band-text-high);
}

.places-identity {
  min-width: 0;
  padding-left: 11px;
}

.places-top-line {
  display: flex;
  min-width: 0;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-3);
}

.places-name-line {
  position: relative;
  display: flex;
  min-width: 0;
  align-items: center;
}

.places-active-dot {
  position: absolute;
  left: -11px;
  display: none;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

.places-row[data-active="true"] .places-active-dot {
  display: block;
}

.places-name {
  overflow: hidden;
  font-size: 14px;
  font-weight: var(--font-weight-strong);
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.places-edit-name {
  min-width: 0;
  overflow: hidden;
  padding-left: 11px;
  font-size: 13px;
  font-weight: var(--font-weight-strong);
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.places-current,
.places-bar-summary,
.places-metric-value {
  font-family: var(--font-numeric);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.places-current {
  flex: 0 0 auto;
  overflow: visible;
  color: var(--ink);
  font-size: 12.5px;
  line-height: 1.2;
  text-overflow: clip;
}

.places-bar-summary {
  flex: 0 0 auto;
  font-size: 14px;
  font-weight: var(--font-weight-strong);
  line-height: 1;
}

.places-ribbon.metric-ribbon-track {
  --ribbon-fill-very-low: var(--band-fill-very-low);
  --ribbon-fill-low: var(--band-fill-low);
  --ribbon-fill-medium: var(--band-fill-medium);
  --ribbon-fill-high: var(--band-fill-high);
  --ribbon-fill-very-high: var(--band-fill-very-high);
  --ribbon-fill-extreme: var(--band-fill-extreme);
  --ribbon-text-very-low: var(--band-text-very-low);
  --ribbon-text-low: var(--band-text-low);
  --ribbon-text-medium: var(--band-text-medium);
  --ribbon-text-high: var(--band-text-high);
  --ribbon-text-very-high: var(--band-text-very-high);
  --ribbon-text-extreme: var(--band-text-extreme);
  height: 18px;
  gap: 1px;
  overflow: hidden;
  border-radius: 5px;
}

.places-ribbon .daylight-ribbon-cell:first-child .daylight-ribbon-cell-band {
  border-radius: 5px 0 0 5px;
}

.places-ribbon .daylight-ribbon-cell:last-child .daylight-ribbon-cell-band {
  border-radius: 0 5px 5px 0;
}

.places-ribbon[data-ribbon-mode="hourly"] {
  overflow: visible;
}

.places-ribbon[data-ribbon-mode="hourly"]
  .daylight-ribbon-cell:first-child .hourly-bar-cell-target,
.five-days-ribbon[data-ribbon-mode="hourly"]
  .daylight-ribbon-cell:first-child .hourly-bar-cell-target {
  left: 0;
  margin-left: 0;
}

.places-ribbon[data-ribbon-mode="hourly"]
  .daylight-ribbon-cell:last-child .hourly-bar-cell-target,
.five-days-ribbon[data-ribbon-mode="hourly"]
  .daylight-ribbon-cell:last-child .hourly-bar-cell-target {
  right: 0;
  left: auto;
  margin-right: 0;
  margin-left: 0;
}

.places-underneath {
  display: flex;
  min-width: 0;
  align-items: baseline;
  overflow: hidden;
  margin-top: var(--space-2);
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.2;
  white-space: nowrap;
}

.places-underneath[hidden] {
  display: none;
}

.places-metric {
  display: inline-flex;
  min-width: 0;
  flex: 1 1 0;
  align-items: baseline;
  gap: 4px;
  overflow: hidden;
}

.places-metric + .places-metric {
  justify-content: center;
  padding-left: var(--space-2);
}

.places-metric:last-child:not(:first-child) {
  justify-content: flex-end;
}

.places-metric-label,
.places-metric-value {
  overflow: hidden;
  text-overflow: ellipsis;
}

.places-metric-value {
  flex: 0 0 auto;
  font-weight: var(--font-weight-strong);
}

.five-days-list {
  display: grid;
  width: 100%;
  max-width: var(--app-shell-narrow-max-width);
  margin: 0 auto;
  gap: var(--space-3);
}

.five-days-columns-trigger,
.places-columns-trigger {
  margin: 0;
  font-size: 22px;
}

.five-days-row {
  display: grid;
  width: 100%;
  min-width: 0;
  min-height: 104px;
  grid-template-rows: auto auto auto;
  gap: var(--space-3);
  padding: var(--space-4);
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-alt);
  color: var(--ink);
  cursor: pointer;
  font-family: var(--font-ui);
  text-align: left;
}

.five-days-row:hover {
  border-color: color-mix(in srgb, var(--border), var(--ink) 22%);
}

.five-days-row[data-today="true"] {
  border-color: color-mix(in srgb, var(--accent), var(--border) 52%);
}

.five-days-top-line:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.five-days-top-line {
  display: flex;
  min-width: 0;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-3);
}

.five-days-day {
  min-width: 0;
  overflow: hidden;
  font-size: 14px;
  font-weight: var(--font-weight-strong);
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.five-days-bar-summary {
  flex: 0 0 auto;
  font-family: var(--font-numeric);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  font-weight: var(--font-weight-strong);
  line-height: 1;
  white-space: nowrap;
}

.five-days-ribbon.metric-ribbon-track {
  --ribbon-fill-very-low: var(--band-fill-very-low);
  --ribbon-fill-low: var(--band-fill-low);
  --ribbon-fill-medium: var(--band-fill-medium);
  --ribbon-fill-high: var(--band-fill-high);
  --ribbon-fill-very-high: var(--band-fill-very-high);
  --ribbon-fill-extreme: var(--band-fill-extreme);
  --ribbon-text-very-low: var(--band-text-very-low);
  --ribbon-text-low: var(--band-text-low);
  --ribbon-text-medium: var(--band-text-medium);
  --ribbon-text-high: var(--band-text-high);
  --ribbon-text-very-high: var(--band-text-very-high);
  --ribbon-text-extreme: var(--band-text-extreme);
  height: 18px;
  gap: 1px;
  overflow: hidden;
  border-radius: 5px;
}

.five-days-ribbon .daylight-ribbon-cell:first-child .daylight-ribbon-cell-band {
  border-radius: 5px 0 0 5px;
}

.five-days-ribbon .daylight-ribbon-cell:last-child .daylight-ribbon-cell-band {
  border-radius: 0 5px 5px 0;
}

.five-days-ribbon[data-ribbon-mode="hourly"] {
  overflow: visible;
}

.five-days-underneath {
  display: flex;
  min-width: 0;
  align-items: baseline;
  overflow: hidden;
  margin-top: var(--space-2);
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.2;
  white-space: nowrap;
}

.five-days-underneath[hidden] {
  display: none;
}

.five-days-metric {
  display: inline-flex;
  min-width: 0;
  flex: 1 1 0;
  align-items: baseline;
  gap: 3px;
}

.five-days-metric + .five-days-metric::before {
  flex: 0 0 auto;
  margin: 0 6px 0 3px;
  color: var(--muted);
  content: "\00b7";
}

.five-days-metric-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.five-days-metric-value {
  flex: 0 0 auto;
  font-family: var(--font-numeric);
  font-variant-numeric: tabular-nums;
}

.nav-view-panel[hidden] {
  display: none;
}

.placeholder-view-panel {
  min-height: calc(100dvh - var(--attribution-footer-reserved-height) - var(--bottom-nav-height));
  place-items: center;
  background: var(--surface);
  color: var(--muted);
  text-align: center;
}

.placeholder-view-panel:not([hidden]) {
  display: grid;
}

.placeholder-view-panel p {
  margin: 0;
  font-size: var(--font-size-label);
  font-weight: var(--font-weight-strong);
}

.day-strip {
  position: fixed;
  z-index: 19;
  bottom: calc(var(--attribution-footer-reserved-height) + var(--bottom-nav-height) + env(safe-area-inset-bottom));
  left: 50%;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  width: min(100%, var(--app-shell-narrow-max-width));
  height: var(--day-strip-height);
  gap: var(--space-3);
  align-items: center;
  margin: 0;
  padding: var(--space-3) var(--space-5);
  transform: translateX(-50%);
  background: var(--page-bg);
  border-top: 1px solid var(--border);
  backdrop-filter: blur(14px);
}

.day-pills {
  display: flex;
  min-width: 0;
  gap: var(--space-3);
  overflow-x: auto;
  max-width: 100%;
  padding: 0;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
  cursor: grab;
}

.day-pills[data-dragging="true"] {
  cursor: grabbing;
}

.day-pills::-webkit-scrollbar {
  display: none;
}

.day-pill {
  min-width: 64px;
  min-height: 44px;
  flex: 0 0 auto;
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
}

.day-pill[aria-current="date"] {
  border-color: var(--accent);
  background: var(--surface-alt);
  box-shadow:
    inset 0 0 0 1px var(--accent),
    0 0 0 3px var(--color-focus-ring-soft);
}

.day-pill-label,
.day-pill-date {
  display: block;
}

.day-pill-label {
  font-size: var(--font-size-label);
  font-weight: var(--font-weight-strong);
}

.day-pill-date {
  color: var(--muted);
  font-size: var(--font-size-micro-label);
}

.day-pill[aria-current="date"] .day-pill-date {
  color: var(--ink);
}

.day-strip[hidden],
.hourly-list[hidden] {
  display: none;
}

.hourly-charts[hidden] {
  display: none;
}

.hourly-charts {
  overflow-x: clip;
  padding: var(--space-4) 0 var(--space-3);
}

.chart-page-strip,
.chart-page-tabs {
  display: flex;
  min-width: 0;
  align-items: center;
}

.chart-page-strip {
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}

.chart-page-tabs {
  flex: 1 1 auto;
  gap: var(--space-2);
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: none;
}

.chart-page-tabs::-webkit-scrollbar {
  display: none;
}

.chart-page-tab-item {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
}

.chart-page-tab,
.chart-page-menu,
.chart-page-add {
  border: 0;
  background: transparent;
  color: var(--muted);
}

.chart-page-tab {
  min-height: 42px;
  padding: 0 var(--space-4);
  font-size: var(--font-size-label);
  font-weight: var(--font-weight-strong);
  white-space: nowrap;
}

.chart-page-tab[aria-selected="true"] {
  color: var(--ink);
}

.chart-page-menu {
  display: grid;
  width: 28px;
  height: 28px;
  margin-right: 6px;
  place-items: center;
  border-radius: 50%;
  color: var(--ink);
  font-size: 18px;
  line-height: 1;
}

.chart-page-add {
  flex: 0 0 44px;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--ink);
  font-size: 22px;
}

.chart-widget-stack {
  display: grid;
  gap: var(--space-4);
}

.chart-widget {
  min-width: 0;
}

.chart-widget-header {
  display: flex;
  min-height: 32px;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-2);
}

.chart-widget-title {
  min-width: 0;
  color: var(--muted);
  font-size: var(--font-size-label);
  font-weight: var(--font-weight-strong);
}

.chart-widget-menu {
  display: grid;
  width: 22px;
  height: 22px;
  min-width: 22px;
  padding: 0;
  place-items: center;
  background: transparent;
  border: 0;
  border-radius: 50%;
  color: var(--ink);
  font-size: 18px;
  line-height: 1;
}

.chart-widget-menu:focus-visible,
.chart-page-menu:focus-visible,
.chart-page-tab:focus-visible,
.chart-page-add:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.chart-widget-add {
  width: 100%;
  min-height: 48px;
  margin-top: var(--space-4);
  border: 1px dashed var(--border);
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  font-size: var(--font-size-label);
  font-weight: var(--font-weight-strong);
}

.chart-widget-empty {
  margin: 0;
  padding: var(--space-5);
  border: 1px dashed var(--border);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
}

.overlay-chart {
  --chart-left-color: var(--band-text-very-high);
  --chart-right-color: var(--band-text-medium);
  min-width: 0;
  max-width: 100%;
  margin: 0;
  padding: var(--space-3) var(--space-2) var(--space-2);
  overflow-x: clip;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.overlay-chart[hidden] {
  display: none;
}

.hour-sheet {
  position: fixed;
  z-index: 22;
  box-sizing: border-box;
  width: min(320px, calc(100vw - 32px));
  height: auto;
  max-height: min(400px, calc(100dvh - 32px));
  padding: 12px;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 12px 30px var(--color-toggle-shadow);
  color: var(--ink);
}

.place-switcher-sheet,
.place-day-sheet {
  position: fixed;
  z-index: 20;
  right: 0;
  bottom: 0;
  left: 0;
  box-sizing: border-box;
  width: 100%;
  max-height: 70dvh;
  padding: 10px 20px max(22px, env(safe-area-inset-bottom));
  overflow-y: auto;
  background: var(--surface);
  border: 0;
  border-top: 1px solid var(--border);
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -12px 30px var(--color-toggle-shadow);
  color: var(--ink);
}

.columns-sheet {
  position: fixed;
  z-index: 22;
  right: 0;
  bottom: 0;
  left: 0;
  box-sizing: border-box;
  width: 100%;
  max-height: 82dvh;
  padding: 10px 20px max(22px, env(safe-area-inset-bottom));
  overflow-y: auto;
  background: var(--surface);
  border: 0;
  border-top: 1px solid var(--border);
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -12px 30px var(--color-toggle-shadow);
  color: var(--ink);
}

.columns-sheet[hidden],
.columns-sheet-backdrop[hidden] {
  display: none;
}

.columns-sheet-backdrop {
  position: fixed;
  z-index: 21;
  inset: 0;
  width: 100%;
  min-height: 100%;
  padding: 0;
  background: rgb(0 0 0 / 42%);
  border: 0;
}

.columns-sheet-handle {
  width: 38px;
  height: 4px;
  margin: 0 auto 14px;
  background: var(--border);
  border-radius: 999px;
}

.columns-sheet-header {
  display: flex;
  gap: var(--space-4);
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 4px;
}

.columns-sheet-title {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 400;
  line-height: 1.1;
}

.columns-sheet-counter,
.columns-sheet-sample {
  color: var(--muted);
  font-family: var(--font-numeric);
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.columns-sheet-rule {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.45;
}

.columns-sheet-config-section {
  margin: var(--space-4) 0 var(--space-5);
}

.columns-sheet-bar-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
}

.columns-sheet-section-title {
  margin: 0 0 var(--space-1);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: var(--font-size-label);
  font-weight: var(--font-weight-strong);
  line-height: 1.3;
}

.columns-sheet-values {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  list-style: none;
}

.columns-sheet-row {
  min-height: 44px;
  border-bottom: 1px solid var(--border);
}

.columns-sheet-row:last-child {
  border-bottom: 0;
}

.columns-sheet-row-label {
  display: grid;
  min-height: 44px;
  grid-template-columns: 20px minmax(0, 1fr) max-content;
  gap: 10px;
  align-items: center;
  padding: 0 4px;
  cursor: pointer;
}

.columns-sheet-checkbox {
  width: 18px;
  height: 18px;
  margin: 0;
}

.columns-sheet-label {
  min-width: 0;
  font-size: 13.5px;
}

.columns-sheet-row[data-always-on="true"] .columns-sheet-row-label,
.columns-sheet-row[data-cap-disabled="true"] .columns-sheet-row-label {
  cursor: default;
}

.columns-sheet-row[data-cap-disabled="true"] {
  opacity: 0.45;
}

.columns-sheet-row[data-always-on="true"] .columns-sheet-checkbox {
  opacity: 0.7;
}

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

.chart-config-sheet {
  position: fixed;
  z-index: 24;
  right: 0;
  bottom: 0;
  left: 0;
  box-sizing: border-box;
  width: 100%;
  max-height: 86dvh;
  padding: 10px 20px max(22px, env(safe-area-inset-bottom));
  overflow-y: auto;
  background: var(--surface);
  border: 0;
  border-top: 1px solid var(--border);
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -12px 30px var(--color-toggle-shadow);
  color: var(--ink);
}

.chart-config-sheet[hidden],
.chart-config-sheet-backdrop[hidden] {
  display: none;
}

.chart-config-sheet-backdrop {
  position: fixed;
  z-index: 23;
  inset: 0;
  width: 100%;
  min-height: 100%;
  padding: 0;
  background: rgb(0 0 0 / 42%);
  border: 0;
}

.chart-config-sheet-body,
.chart-config-form,
.chart-config-actions {
  display: grid;
  gap: var(--space-3);
}

.chart-config-form {
  margin-top: var(--space-3);
}

.chart-config-label {
  display: grid;
  gap: var(--space-2);
  color: var(--muted);
  font-size: var(--font-size-label);
}

.chart-config-input,
.chart-config-select {
  width: 100%;
  min-height: 46px;
  padding: 0 var(--space-3);
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--page-bg);
  color: var(--ink);
  font: inherit;
}

.chart-config-fieldset {
  display: grid;
  gap: var(--space-3);
  margin: 0;
  padding: var(--space-3);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.chart-config-fieldset legend {
  padding: 0 var(--space-2);
  color: var(--ink);
  font-size: var(--font-size-label);
  font-weight: var(--font-weight-strong);
}

.chart-table-columns-editor {
  max-height: 34dvh;
  overflow-y: auto;
}

.chart-config-check-row {
  display: flex;
  min-height: 40px;
  align-items: center;
  gap: var(--space-3);
  border-bottom: 1px solid var(--border);
  color: var(--ink);
  font-size: var(--font-size-label);
}

.chart-config-check-row:last-child {
  border-bottom: 0;
}

.chart-config-appearance-check {
  min-height: 46px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0 var(--space-3);
}

.chart-config-appearance-check input {
  width: 18px;
  height: 18px;
  margin: 0;
}

.chart-config-hint {
  margin: 0;
  padding: var(--space-3);
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-alt);
  color: var(--muted);
  font-size: var(--font-size-label);
  line-height: 1.45;
}

.chart-config-hint[hidden] {
  display: none;
}

.chart-config-inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.chart-config-action {
  min-height: 46px;
  padding: 0 var(--space-4);
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-alt);
  color: var(--ink);
  font-size: var(--font-size-label);
  font-weight: var(--font-weight-strong);
  text-align: left;
}

.chart-config-action:disabled {
  opacity: 0.4;
}

.chart-config-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--page-bg);
  text-align: center;
}

.chart-config-danger {
  color: var(--color-danger);
}

.place-switcher-sheet[hidden],
.place-switcher-backdrop[hidden],
.place-day-sheet[hidden],
.place-day-backdrop[hidden] {
  display: none;
}

.place-switcher-backdrop,
.place-day-backdrop {
  position: fixed;
  z-index: 19;
  inset: 0;
  width: 100%;
  min-height: 100%;
  padding: 0;
  background: rgb(0 0 0 / 42%);
  border: 0;
}

.place-switcher-handle,
.place-day-handle {
  width: 38px;
  height: 4px;
  margin: 0 auto 14px;
  background: var(--border);
  border-radius: 999px;
}

.place-switcher-header {
  display: flex;
  gap: var(--space-4);
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 14px;
}

.place-day-header {
  display: flex;
  gap: var(--space-2);
  flex-direction: column;
  margin-bottom: 14px;
}

.place-day-place-name {
  margin: 0;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 400;
  line-height: 1.1;
}

.place-day-day-label {
  margin: 0;
  color: var(--muted);
  font-family: var(--font-ui);
  font-size: 12px;
  line-height: 1.25;
}

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

.place-day-values .hour-sheet-value[data-key="current_temperature"] {
  grid-column: 1 / -1;
}

.place-switcher-title {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 400;
  line-height: 1.1;
}

.place-switcher-manage {
  min-height: 44px;
  padding: 0;
  background: transparent;
  border: 0;
  color: var(--accent);
  font-family: var(--font-ui);
  font-size: 11.5px;
  font-weight: var(--font-weight-strong);
}

.place-switcher-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.place-switcher-row {
  display: grid;
  grid-template-columns: 6px minmax(0, 1fr) 54px 48px;
  gap: 10px;
  width: 100%;
  min-height: 48px;
  align-items: center;
  padding: 0 14px;
  background: var(--surface-alt);
  border: 1px solid transparent;
  border-radius: 12px;
  color: var(--ink);
  font-family: var(--font-ui);
  text-align: left;
}

.place-switcher-row[aria-current="true"] {
  background: var(--surface);
  border-color: var(--border);
}

.place-switcher-row:focus-visible,
.place-switcher-manage:focus-visible,
.place-switcher-use-location:focus-visible,
.place-day-switch:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.place-switcher-active-dot {
  width: 6px;
  height: 6px;
  background: transparent;
  border-radius: 50%;
}

.place-switcher-row[aria-current="true"] .place-switcher-active-dot {
  background: var(--accent);
}

.place-switcher-name {
  overflow: hidden;
  font-size: 13.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.place-switcher-row[aria-current="true"] .place-switcher-name {
  font-weight: var(--font-weight-strong);
}

.place-switcher-temperature,
.place-switcher-uv {
  font-family: var(--font-numeric);
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}

.place-switcher-temperature {
  font-size: 14px;
}

.place-switcher-uv {
  font-size: 12px;
}

.place-switcher-row:not([data-status="ready"]) :where(.place-switcher-temperature, .place-switcher-uv) {
  color: var(--muted);
}

.place-switcher-footer,
.place-day-footer {
  margin-top: 12px;
}

.place-day-switch {
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 12px;
  color: var(--page-bg);
  font-family: var(--font-ui);
  font-size: 12.5px;
  font-weight: var(--font-weight-strong);
  text-align: center;
}

.place-switcher-use-location {
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  background: transparent;
  border: 1px dashed var(--border);
  border-radius: 12px;
  color: var(--muted);
  font-family: var(--font-ui);
  font-size: 12.5px;
  text-align: left;
}

.place-switcher-use-location:disabled {
  opacity: 0.55;
}

.place-switcher-geolocation-status {
  min-height: 1.25rem;
  margin: var(--space-2) 0 0;
  color: var(--muted);
  font-size: var(--font-size-caption);
  line-height: 1.25;
}

.hour-sheet[hidden] {
  display: none;
}

.hour-sheet-backdrop {
  position: fixed;
  z-index: 21;
  inset: 0;
  width: 100%;
  min-height: 100%;
  padding: 0;
  background: rgb(0 0 0 / 42%);
  border: 0;
}

.hour-sheet-backdrop[hidden] {
  display: none;
}

.hour-sheet-header {
  display: grid;
  grid-template-columns: minmax(72px, 1fr) auto minmax(72px, 1fr);
  gap: var(--space-3);
  align-items: center;
  margin-bottom: 14px;
}

.hour-sheet-heading {
  display: flex;
  flex-direction: column;
  gap: 3px;
  align-items: center;
  min-width: 0;
  text-align: center;
}

.hour-sheet-title {
  min-width: 0;
  font-variant-numeric: tabular-nums;
}

.hour-sheet-day {
  color: var(--muted);
  font-family: var(--font-ui);
  font-size: 12px;
  line-height: 1.25;
  text-align: center;
}

.hour-sheet-stepper {
  min-width: 44px;
  min-height: 44px;
  padding: 0 6px;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-radius: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.hour-sheet-stepper:last-child {
  justify-self: end;
}

.hour-sheet-stepper[aria-disabled="true"] {
  color: var(--muted);
  opacity: 0.45;
  pointer-events: none;
}

.hour-sheet-uv {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) max-content max-content;
  gap: 10px;
  align-items: center;
  padding: 12px 14px;
  margin-bottom: 10px;
  background: var(--surface-alt);
  border-radius: 12px;
}

.hour-sheet-uv-dot {
  width: 10px;
  height: 10px;
  background: var(--hour-sheet-band-fill, var(--muted));
  border-radius: 50%;
}

.hour-sheet-uv-label,
.hour-sheet-value-label {
  color: var(--muted);
}

.hour-sheet-uv-label {
  font-size: 12px;
}

.hour-sheet-uv-value {
  font-size: 22px;
  font-weight: 500;
  line-height: 1;
}

.hour-sheet-uv-band {
  color: var(--hour-sheet-band-text, var(--ink));
  font-size: 11px;
  font-weight: var(--font-weight-strong);
  line-height: 1.2;
}

.hour-sheet-values {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.hour-sheet-value {
  display: flex;
  gap: var(--space-2);
  align-items: baseline;
  justify-content: space-between;
  min-width: 0;
  padding: 10px 12px;
  background: var(--surface-alt);
  border-radius: 10px;
  font-size: 11.5px;
}

.hour-sheet-value-number {
  flex: 0 0 auto;
  color: var(--ink);
  font-size: 15px;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
}

.secondary-overlay-chart {
  margin-top: var(--space-2);
}

.secondary-chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-4);
  align-items: center;
  padding: var(--space-1) var(--space-2) 0;
  color: var(--muted);
  font-size: var(--font-size-micro-label);
  font-weight: var(--font-weight-supporting-label);
  line-height: 1.2;
}

.secondary-chart-legend[hidden] {
  display: none;
}

.secondary-chart-legend-entry {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: var(--space-2);
  color: var(--ink);
}

.secondary-chart-legend-swatch {
  flex: 0 0 auto;
  width: 12px;
  height: 8px;
  background: var(--legend-color, var(--border));
  border: 1px solid var(--color-legend-border);
  border-radius: 999px;
}

.secondary-chart-legend-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.peak-ranges-panel {
  display: block;
  min-width: 0;
  max-width: 100%;
  margin: 0;
  padding: var(--space-3);
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.peak-ranges-panel[hidden] {
  display: none;
}

.peak-range-list {
  display: grid;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.peak-range-row {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr);
  align-items: start;
  gap: var(--space-3);
  min-height: 48px;
  padding: var(--space-3);
  background: var(--page-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.peak-range-swatch {
  width: 10px;
  height: 100%;
  min-height: 34px;
  background: var(--peak-range-fill-color, var(--border));
  border-radius: 999px;
}

.peak-range-copy,
.peak-range-peak {
  display: grid;
  min-width: 0;
}

.peak-range-copy {
  gap: var(--space-2);
}

.peak-range-trigger {
  display: block;
  width: 100%;
  min-width: 0;
  margin: calc(-1 * var(--space-2));
  padding: var(--space-2);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  color: inherit;
  font: inherit;
  text-align: left;
  outline: 0;
  cursor: pointer;
}

.peak-range-trigger:hover {
  border-color: var(--border);
  background: var(--surface);
}

.peak-range-trigger:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--color-focus-ring);
}

.peak-range-options {
  display: grid;
  gap: var(--space-1);
  margin-top: var(--space-1);
  padding: var(--space-1);
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.peak-range-options[hidden] {
  display: none;
}

.peak-range-option {
  min-width: 0;
  padding: var(--space-2) var(--space-3);
  border-radius: 6px;
  color: var(--ink);
  font-size: var(--font-size-caption);
  font-weight: var(--font-weight-supporting-label);
  line-height: 1.2;
  cursor: pointer;
}

.peak-range-option[data-active="true"],
.peak-range-option[aria-selected="true"] {
  background: var(--surface);
}

.peak-range-option[data-active="true"] {
  box-shadow: inset 0 0 0 1px var(--accent);
}

.peak-range-title {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: var(--font-size-label);
  font-weight: var(--font-weight-strong);
  line-height: 1.25;
}

.peak-range-band {
  color: var(--peak-range-text-color, var(--ink));
}

.peak-range-hours,
.peak-range-peak-label,
.peak-ranges-empty {
  color: var(--muted);
  font-size: var(--font-size-micro-label);
  font-weight: var(--font-weight-supporting-label);
  line-height: 1.2;
}

.peak-range-title .peak-range-hours {
  color: var(--ink);
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
}

.peak-range-hours,
.peak-range-peak-value {
  font-variant-numeric: tabular-nums;
}

.peak-range-peak {
  justify-items: end;
  gap: var(--space-1);
}

.peak-range-peak-value {
  color: var(--ink);
  font-size: var(--font-size-label);
  font-weight: var(--font-weight-strong);
  line-height: 1.1;
}

.peak-ranges-empty {
  margin: 0;
  padding: var(--space-4);
  text-align: center;
}

.overlay-chart-svg {
  display: block;
  width: 100%;
  height: 232px;
  overflow: visible;
  touch-action: pan-y;
}

.secondary-overlay-chart-svg {
  height: 150px;
}

.threshold-chart .overlay-chart-svg {
  height: var(--threshold-chart-height, 150px);
}

.overlay-chart-grid-line,
.overlay-chart-vertical-tick {
  stroke: var(--muted);
  stroke-opacity: 0.16;
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.overlay-chart-vertical-tick {
  stroke-opacity: 0.11;
}

.overlay-chart-selected-hour-band {
  fill: var(--color-hour-selection);
  pointer-events: none;
}

.overlay-chart-series-point {
  fill: transparent;
  stroke: transparent;
  stroke-width: 2;
  pointer-events: none;
  vector-effect: non-scaling-stroke;
}

.overlay-chart-series-point.is-selected {
  fill: var(--surface-alt);
  stroke: var(--chart-series-color);
}

.overlay-chart-night-layer,
.overlay-chart-annotations {
  pointer-events: none;
}

.overlay-chart-night-panel {
  fill: var(--color-chart-night);
}

.overlay-chart-sun-label,
.overlay-chart-now-label,
.overlay-chart-peak-label {
  paint-order: stroke;
  stroke: var(--surface-alt);
  stroke-linejoin: round;
  stroke-width: 3px;
}

.overlay-chart-sun-label {
  fill: var(--muted);
  font-size: 0.62rem;
  font-weight: var(--font-weight-supporting-label);
}

.overlay-chart-now-label {
  fill: var(--ink);
  font-size: 0.66rem;
  font-weight: var(--font-weight-strong);
}

.overlay-chart-peak-rule {
  stroke: var(--chart-annotation-color, var(--ink));
  stroke-dasharray: 1 4;
  stroke-linecap: round;
  stroke-opacity: 0.7;
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
}

.overlay-chart-peak-point {
  fill: var(--surface-alt);
  stroke: var(--chart-annotation-color, var(--ink));
  stroke-dasharray: 1 2;
  stroke-linecap: round;
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}

.overlay-chart-peak-label {
  fill: var(--chart-annotation-color, var(--ink));
  font-size: 0.72rem;
  font-weight: var(--font-weight-strong);
}

.overlay-chart-hour-hit-region {
  fill: transparent;
  cursor: pointer;
  pointer-events: all;
}

.colour-bar-selected-hour-band {
  fill: var(--color-hour-selection);
  stroke: var(--color-hour-selection-border);
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}

.uv-threshold-segment[data-hour-time]:not([data-hour-time=""]) {
  cursor: pointer;
}

.secondary-overlay-chart-lane-divider {
  stroke: var(--border);
  stroke-opacity: 0.75;
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.overlay-chart-now-marker {
  stroke: var(--ink);
  stroke-dasharray: 4 5;
  stroke-linecap: round;
  stroke-opacity: 0.38;
  stroke-width: 1.35;
  vector-effect: non-scaling-stroke;
}

.overlay-chart-axis-line,
.overlay-chart-axis-tick {
  stroke: currentColor;
  stroke-opacity: 0.5;
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.overlay-chart-axis-left {
  color: var(--chart-left-color);
}

.overlay-chart-axis-right {
  color: var(--chart-right-color);
}

.secondary-overlay-chart-axis {
  color: var(--chart-lane-color);
}

.overlay-chart-x-axis {
  color: var(--muted);
}

.overlay-chart-axis-label,
.overlay-chart-tick-label,
.overlay-chart-x-label {
  fill: currentColor;
  font-variant-numeric: tabular-nums;
}

.overlay-chart-axis-label {
  font-size: var(--font-size-micro-label);
  font-weight: var(--font-weight-strong);
}

.overlay-chart-tick-label,
.overlay-chart-x-label {
  font-size: 0.68rem;
  font-weight: var(--font-weight-supporting-label);
}

.overlay-chart-x-label {
  fill: var(--muted);
}

.uv-threshold-title,
.uv-threshold-tick-label,
.uv-threshold-legend-label {
  fill: var(--muted);
  font-variant-numeric: tabular-nums;
}

.uv-threshold-title {
  font-size: var(--font-size-small-label);
  font-weight: var(--font-weight-strong);
}

.uv-threshold-tick-label {
  font-size: 0.68rem;
  font-weight: var(--font-weight-supporting-label);
}

.uv-threshold-legend-label {
  font-size: 0.7rem;
  font-weight: var(--font-weight-supporting-label);
}

.uv-threshold-tick-line {
  stroke: var(--muted);
  stroke-opacity: 0.12;
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.uv-threshold-segment {
  stroke: var(--page-bg);
  stroke-opacity: 0.78;
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.temperature-threshold-segment {
  vector-effect: non-scaling-stroke;
}

.temperature-threshold-legend-swatch {
  vector-effect: non-scaling-stroke;
}

.uv-threshold-no-data-fill {
  fill: var(--border);
}

.uv-threshold-no-data-stripe {
  stroke: var(--muted);
  stroke-opacity: 0.5;
  stroke-width: 1;
}

.uv-threshold-legend-swatch {
  stroke: var(--page-bg);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.uv-threshold-legend-swatch.uv-threshold-no-data {
  fill: var(--border);
}

.uv-threshold-now-marker {
  stroke: var(--ink);
  stroke-dasharray: 4 5;
  stroke-linecap: round;
  stroke-opacity: 0.48;
  stroke-width: 1.35;
  vector-effect: non-scaling-stroke;
}

.overlay-chart-series {
  color: var(--chart-series-color, var(--accent));
  opacity: 1;
}

.overlay-chart-axis {
  opacity: 1;
}

.overlay-chart-series.is-dimmed,
.overlay-chart-axis.is-dimmed {
  opacity: 0.24;
}

.overlay-chart-axis.is-selected .overlay-chart-axis-label {
  font-weight: var(--font-weight-strong);
}

.overlay-chart-series-area {
  pointer-events: none;
}

.overlay-chart-series-line {
  fill: none;
  filter: drop-shadow(0 1px 2px var(--color-chart-shadow));
  pointer-events: stroke;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
  vector-effect: non-scaling-stroke;
}

.overlay-chart-series-temperature .overlay-chart-series-line {
  stroke-width: 3.25;
}

.overlay-chart-series-uv .overlay-chart-series-line {
  stroke-width: 3;
}

.overlay-chart-series-rain .overlay-chart-series-line {
  stroke-width: 2.35;
}

.overlay-chart-series-wind .overlay-chart-series-line {
  stroke-width: 2.2;
}

.secondary-overlay-chart .overlay-chart-series-humidity .overlay-chart-series-line {
  stroke-linecap: round;
  stroke-width: 2.25;
}

.overlay-chart-series.is-selected .overlay-chart-series-line {
  filter: drop-shadow(0 1px 2px var(--color-chart-shadow))
    drop-shadow(0 0 3px currentColor);
  stroke-width: 4;
}

.overlay-chart-empty-hint {
  fill: var(--muted);
  font-size: var(--font-size-caption);
  font-weight: var(--font-weight-supporting-label);
}

.hourly-list {
  --hourly-list-height: clamp(260px, calc(100dvh - 270px), 620px);
  display: grid;
  gap: var(--space-2);
  height: var(--hourly-list-height);
  max-height: calc(100dvh - var(--space-6));
  overflow-y: auto;
  margin: 0;
  padding-top: var(--space-3);
  padding-bottom: max(var(--space-3), calc(var(--hourly-list-height) - 64px));
  padding-left: 0;
  list-style: none;
  overscroll-behavior-y: contain;
  scrollbar-gutter: stable;
  -webkit-overflow-scrolling: touch;
}

.hourly-table-heading {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: space-between;
  color: var(--ink);
  font-size: var(--font-size-label);
  font-weight: var(--font-weight-strong);
}

.hourly-table-view .hourly-list {
  height: auto;
  max-height: var(--hourly-list-height);
  padding-top: var(--space-2);
  padding-bottom: var(--space-2);
}

.hour-row {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  min-height: 64px;
  align-items: center;
  gap: var(--space-3);
  padding: 10px var(--space-4);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
}

.hour-row.is-selected {
  background: var(--color-hour-selection);
  border-color: var(--color-hour-selection-border);
}

.hour-row[aria-current="time"] {
  border-color: var(--accent);
  background: var(--surface-alt);
  box-shadow:
    inset 0 0 0 1px var(--accent),
    0 0 0 3px var(--color-focus-ring-soft);
}

.hour-row.is-selected[aria-current="time"] {
  background: var(--color-hour-selection);
}

.hour-row:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--color-focus-ring);
  outline: 0;
}

.hour-time {
  min-width: 0;
  color: var(--muted);
  font-size: var(--font-size-caption);
  font-weight: var(--font-weight-supporting-label);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.hour-metrics {
  display: grid;
  min-width: 0;
  width: 100%;
  align-items: center;
  grid-template-columns: repeat(auto-fit, minmax(56px, 1fr));
  gap: var(--space-2) var(--space-3);
}

.hour-metric {
  display: grid;
  align-content: center;
  min-width: 0;
  min-height: 38px;
  gap: var(--space-1);
}

.hour-row .metric-label {
  margin-bottom: 0;
  font-size: var(--font-size-micro-label);
  line-height: 1.05;
}

.metric-value {
  display: block;
  min-height: 1.2rem;
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-body);
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
  white-space: nowrap;
}

.metric-value-temperature {
  color: var(--metric-color);
}

.metric-value-uv {
  color: var(--metric-color);
}

.metric-value-temperature,
.metric-value-uv {
  font-weight: var(--font-weight-headline-number);
}

.metric-value-rain {
  color: var(--color-rain);
}

.metric-value-wind {
  color: var(--color-wind);
}

.metric-value-humidity {
  color: var(--color-humidity);
}

.metric-value-rain,
.metric-value-wind,
.metric-value-humidity {
  font-size: var(--font-size-caption);
  font-weight: var(--font-weight-supporting-label);
}

.settings-sheet[hidden] {
  display: none;
}

.settings-sheet {
  position: fixed;
  inset: 0;
  z-index: 20;
  color: var(--ink);
}

.settings-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: var(--color-backdrop);
}

.settings-panel {
  position: absolute;
  z-index: 1;
  right: 0;
  bottom: 0;
  left: 0;
  width: min(100%, var(--app-shell-narrow-max-width));
  max-height: min(92dvh, 760px);
  overflow-y: auto;
  margin: 0 auto;
  padding: calc(var(--space-5) + var(--space-1)) var(--space-5) calc(var(--space-6) + var(--space-1));
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px 8px 0 0;
  box-shadow: var(--shadow-sticky);
  color: var(--ink);
}

.settings-header {
  justify-content: space-between;
  margin-bottom: calc(var(--space-4) + var(--space-1));
}

.about-modal[hidden] {
  display: none;
}

.about-modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  color: var(--ink);
}

.about-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: var(--color-backdrop);
}

.about-panel {
  position: absolute;
  z-index: 1;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  width: min(100%, var(--app-shell-narrow-max-width));
  max-height: min(86dvh, 640px);
  overflow-y: auto;
  gap: var(--space-4);
  margin: 0 auto;
  padding: calc(var(--space-5) + var(--space-1)) var(--space-5) calc(var(--space-6) + var(--space-1));
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px 8px 0 0;
  box-shadow: var(--shadow-sticky);
}

.about-panel:focus {
  outline: 0;
}

.about-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

.about-body {
  display: grid;
  gap: var(--space-4);
}

.about-summary {
  color: var(--ink);
  font-size: var(--font-size-label);
  font-weight: var(--font-weight-supporting-label);
  line-height: 1.35;
}

.about-source-list {
  display: grid;
  gap: var(--space-3);
  margin: 0;
  padding: 0;
  list-style: none;
}

.about-source-item {
  display: grid;
  gap: var(--space-2);
  padding: var(--space-4);
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.about-source-title {
  color: var(--ink);
  font-size: var(--font-size-label);
  font-weight: var(--font-weight-strong);
  line-height: 1.2;
}

.about-source-line {
  color: var(--ink);
  font-size: var(--font-size-caption);
  font-weight: var(--font-weight-body);
  line-height: 1.35;
}

.about-source-label {
  color: var(--ink);
  font-weight: var(--font-weight-supporting-label);
}

.about-source-line a {
  color: var(--color-link);
  font-weight: var(--font-weight-supporting-label);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.about-source-line a:focus-visible {
  border-radius: 3px;
  outline: 2px solid var(--accent);
  outline-offset: var(--space-1);
}

h2 {
  font-size: var(--font-size-section-title);
  font-weight: var(--font-weight-strong);
}

h3 {
  margin: 0;
}

.close-button {
  min-height: 36px;
  padding: 0 var(--space-4);
  border-radius: 8px;
  font-size: var(--font-size-label);
  font-weight: var(--font-weight-supporting-label);
}

.close-button:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--color-focus-ring);
  outline: 0;
}

.settings-section {
  display: grid;
  gap: var(--space-3);
}

.settings-section + .settings-section {
  margin-top: var(--space-5);
}

.settings-action-row {
  display: flex;
  width: 100%;
  min-height: 52px;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: 0 var(--space-4);
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--ink);
  text-align: left;
}

.settings-action-row:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--color-focus-ring);
  outline: 0;
}

.settings-row-chevron {
  color: var(--muted);
  font-size: 24px;
  line-height: 1;
}

.settings-section-title,
.location-search-label {
  color: var(--muted);
  font-size: var(--font-size-small-label);
  font-weight: var(--font-weight-supporting-label);
  text-transform: uppercase;
}

.location-search {
  display: grid;
  gap: var(--space-3);
}

.location-search-trigger {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-self: start;
  gap: var(--space-2);
  padding: 0 var(--space-3);
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--ink);
  font-size: var(--font-size-label);
  font-weight: var(--font-weight-strong);
}

.location-search-trigger svg {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  fill: currentColor;
}

.location-search-trigger:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--color-focus-ring);
  outline: 0;
}

.location-actions {
  display: grid;
  gap: var(--space-2);
}

.use-location-button {
  display: inline-flex;
  width: 100%;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  padding: 0 var(--space-4);
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--ink);
  font-weight: var(--font-weight-strong);
}

.use-location-button svg {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  fill: currentColor;
}

.use-location-button:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--color-focus-ring);
  outline: 0;
}

.use-location-button:disabled {
  color: var(--muted);
  opacity: 0.66;
}

.geolocation-status {
  min-height: 1.25rem;
  color: var(--muted);
  font-size: var(--font-size-caption);
  font-weight: var(--font-weight-supporting-label);
  line-height: 1.25;
}

.location-search-input {
  width: 100%;
  min-height: 52px;
  padding: 0 var(--space-4);
  background: var(--page-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--ink);
  outline: 0;
}

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

.location-search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--color-focus-ring);
}

.location-search-status {
  min-height: 1.25rem;
  color: var(--muted);
  font-size: var(--font-size-caption);
  font-weight: var(--font-weight-supporting-label);
  line-height: 1.25;
}

.location-search-retry[hidden] {
  display: none;
}

.location-search-retry {
  justify-self: start;
  min-height: 40px;
  padding: 0 var(--space-4);
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--ink);
  font-size: var(--font-size-label);
  font-weight: var(--font-weight-strong);
}

.location-search-retry:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--color-focus-ring);
  outline: 0;
}

.location-search-results {
  display: grid;
  min-height: 172px;
  max-height: min(34dvh, 260px);
  overflow-y: auto;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  list-style: none;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
}

.location-search-overlay[hidden] {
  display: none;
}

.location-search-overlay {
  position: fixed;
  inset: 0;
  z-index: 30;
  color: var(--ink);
}

.location-search-overlay-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: var(--color-backdrop-soft);
}

.location-search-overlay-panel {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  width: min(100%, var(--app-shell-narrow-max-width));
  max-height: min(86dvh, 640px);
  overflow-y: auto;
  gap: var(--space-3);
  margin: 0 auto;
  padding: var(--space-5);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px 8px 0 0;
  box-shadow: var(--shadow-sticky);
}

.location-search-overlay-header {
  justify-content: space-between;
  gap: var(--space-3);
}

.location-result {
  display: grid;
  width: 100%;
  min-height: 58px;
  gap: var(--space-1);
  justify-items: start;
  padding: var(--space-3) var(--space-4);
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--ink);
  text-align: left;
}

.location-result:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--color-focus-ring);
  outline: 0;
}

.location-result:disabled {
  color: var(--muted);
  opacity: 0.68;
}

.location-result-name,
.location-result-meta {
  max-width: 100%;
  overflow-wrap: anywhere;
}

.location-result-name {
  font-size: var(--font-size-label);
  font-weight: var(--font-weight-strong);
  line-height: 1.2;
}

.location-result-meta {
  color: var(--muted);
  font-size: var(--font-size-caption);
  font-weight: var(--font-weight-supporting-label);
  line-height: 1.2;
}

.storage-consent-form {
  display: grid;
  gap: var(--space-3);
}

.storage-choice-row {
  position: relative;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  min-height: 64px;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4);
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--ink);
}

.storage-choice-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  appearance: none;
}

.storage-choice-indicator {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  background: var(--page-bg);
  border: 1px solid var(--border);
  border-radius: 50%;
}

.storage-choice-indicator::after {
  display: block;
  width: 10px;
  height: 10px;
  background: transparent;
  border-radius: 50%;
  content: "";
}

.storage-choice-input:checked + .storage-choice-indicator {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--color-focus-ring-soft);
}

.storage-choice-input:checked + .storage-choice-indicator::after {
  background: var(--accent);
}

.storage-choice-input:focus-visible + .storage-choice-indicator {
  outline: 2px solid var(--ink);
  outline-offset: var(--space-2);
}

.storage-choice-copy {
  min-width: 0;
}

.storage-consent-status {
  min-height: 1.25rem;
  color: var(--muted);
  font-size: var(--font-size-caption);
  font-weight: var(--font-weight-supporting-label);
  line-height: 1.25;
}

.language-options {
  position: relative;
  width: max-content;
  max-width: 100%;
}

.language-selector-trigger {
  display: inline-flex;
  min-width: 148px;
  min-height: 40px;
  align-items: center;
  justify-content: flex-start;
  gap: var(--space-2);
  padding: 0 var(--space-2) 0 var(--space-3);
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--ink);
  cursor: pointer;
  font-size: var(--font-size-label);
  font-weight: var(--font-weight-strong);
}

.language-selector-trigger[aria-expanded="true"] {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--color-focus-ring-soft);
}

.language-selector-trigger:focus-visible,
.language-selector-item:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: var(--space-2);
}

.language-selector-trigger-name {
  flex: 1 1 auto;
  text-align: left;
}

.language-selector-caret {
  margin-left: auto;
  color: var(--muted);
  font-size: 0.85em;
  transition: transform 120ms ease;
}

.language-selector-trigger[aria-expanded="true"] .language-selector-caret {
  transform: rotate(180deg);
}

.language-selector-menu {
  position: absolute;
  z-index: 20;
  top: calc(100% + var(--space-2));
  left: 0;
  display: grid;
  min-width: 100%;
  padding: var(--space-1);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow-sticky);
}

.language-selector-menu[hidden] {
  display: none;
}

.language-selector-item {
  display: flex;
  min-width: 164px;
  min-height: 40px;
  align-items: center;
  gap: var(--space-2);
  padding: 0 var(--space-3);
  background: transparent;
  border: 0;
  border-radius: 6px;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: var(--font-size-label);
  text-align: left;
}

.language-selector-item:hover,
.language-selector-item:focus-visible {
  background: var(--surface-alt);
}

.language-selector-item[aria-checked="true"] {
  color: var(--accent);
  font-weight: var(--font-weight-strong);
}

.language-flag {
  display: grid;
  width: 24px;
  height: 16px;
  flex: 0 0 24px;
  place-items: center;
  font-size: 18px;
  line-height: 1;
}

.language-name {
  min-width: 0;
  overflow-wrap: anywhere;
}

.toggle-title,
.toggle-caption {
  display: block;
}

.toggle-title {
  font-size: var(--font-size-label);
  font-weight: var(--font-weight-strong);
  line-height: 1.2;
}

.toggle-caption {
  margin-top: var(--space-1);
  color: var(--ink);
  font-size: var(--font-size-caption);
  font-weight: var(--font-weight-supporting-label);
  line-height: 1.25;
}

.threshold-form {
  display: grid;
  gap: var(--space-3);
  padding: var(--space-4);
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.threshold-form + .threshold-form {
  margin-top: var(--space-4);
}

.threshold-form-title {
  margin: 0;
  color: var(--ink);
  font-size: var(--font-size-label);
  font-weight: var(--font-weight-strong);
}

.activity-threshold-group {
  display: grid;
  gap: var(--space-3);
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.activity-threshold-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
}

.activity-threshold-group:last-of-type .activity-threshold-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 420px) {
  .activity-threshold-grid,
  .activity-threshold-group:last-of-type .activity-threshold-grid {
    grid-template-columns: 1fr;
  }
}

.threshold-picker-grid {
  display: grid;
  gap: var(--space-3);
}

.threshold-select-label,
.threshold-mode-legend {
  color: var(--muted);
  font-size: var(--font-size-caption);
  font-weight: var(--font-weight-supporting-label);
  line-height: 1.2;
}

.threshold-select-label {
  display: grid;
  gap: var(--space-2);
}

.threshold-select {
  width: 100%;
  min-height: 48px;
  padding: 0 var(--space-4);
  background: var(--page-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--ink);
  outline: 0;
}

.threshold-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--color-focus-ring);
}

.threshold-mode-fieldset {
  display: grid;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  border: 0;
}

.threshold-mode-control {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-1);
  padding: var(--space-1);
  background: var(--page-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.threshold-mode-option {
  position: relative;
  min-width: 0;
}

.threshold-mode-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  appearance: none;
}

.threshold-mode-label {
  display: flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  padding: 0 var(--space-2);
  border-radius: 6px;
  color: var(--muted);
  font-size: var(--font-size-caption);
  font-weight: var(--font-weight-strong);
  line-height: 1.1;
  text-align: center;
}

.threshold-mode-input:checked + .threshold-mode-label {
  background: var(--accent);
  color: var(--page-bg);
}

.threshold-mode-input:focus-visible + .threshold-mode-label {
  outline: 2px solid var(--ink);
  outline-offset: var(--space-1);
}

.threshold-mode-grid {
  display: grid;
  gap: var(--space-3);
}

.threshold-summary {
  display: grid;
  gap: var(--space-2);
  padding: var(--space-4);
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.threshold-summary-label,
.threshold-input-label {
  color: var(--muted);
  font-size: var(--font-size-caption);
  font-weight: var(--font-weight-supporting-label);
  line-height: 1.2;
}

.threshold-input-label {
  display: grid;
  gap: var(--space-2);
}

.threshold-band-list {
  display: grid;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.threshold-band-row {
  display: grid;
  grid-template-areas:
    "swatch name input"
    "swatch range input";
  grid-template-columns: 12px minmax(0, 1fr) minmax(98px, 116px);
  align-items: center;
  gap: var(--space-1) var(--space-3);
  min-height: 62px;
  padding: var(--space-3);
  background: var(--page-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.threshold-band-swatch {
  grid-area: swatch;
  width: 12px;
  height: 100%;
  min-height: 36px;
  background: var(--threshold-band-color, var(--accent));
  border-radius: 999px;
}

.threshold-band-name {
  grid-area: name;
  min-width: 0;
  color: var(--ink);
  font-size: var(--font-size-label);
  font-weight: var(--font-weight-strong);
  line-height: 1.15;
}

.threshold-band-range {
  grid-area: range;
  min-height: 1rem;
  color: var(--muted);
  font-size: var(--font-size-micro-label);
  font-weight: var(--font-weight-supporting-label);
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.threshold-cutoff-label {
  display: grid;
  grid-area: input;
  gap: var(--space-1);
  color: var(--muted);
  font-size: var(--font-size-micro-label);
  font-weight: var(--font-weight-supporting-label);
  line-height: 1.1;
}

.threshold-terminal-label {
  grid-area: input;
  align-self: center;
  color: var(--muted);
  font-size: var(--font-size-caption);
  font-weight: var(--font-weight-supporting-label);
  text-align: right;
}

.threshold-cutoff-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.threshold-cutoff-item {
  min-width: 42px;
  padding: var(--space-2) var(--space-3);
  background: var(--page-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--ink);
  font-size: var(--font-size-label);
  font-weight: var(--font-weight-strong);
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  text-align: center;
}

.threshold-input {
  width: 100%;
  min-height: 48px;
  padding: 0 var(--space-4);
  background: var(--page-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  outline: 0;
}

.threshold-cutoff-input {
  min-height: 38px;
  padding: 0 var(--space-3);
}

.threshold-cutoff-input:disabled {
  background: var(--surface-alt);
  color: var(--muted);
  cursor: not-allowed;
  opacity: 0.72;
}

.threshold-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--color-focus-ring);
}

.threshold-input[aria-invalid="true"] {
  border-color: var(--color-danger);
}

.threshold-help,
.threshold-uv-fixed-note,
.threshold-feedback {
  min-height: 1.2rem;
  color: var(--muted);
  font-size: var(--font-size-caption);
  font-weight: var(--font-weight-supporting-label);
  line-height: 1.25;
}

.threshold-uv-fixed-note {
  margin: 0;
}

.threshold-feedback[data-tone="error"] {
  color: var(--color-danger);
}

.threshold-feedback[data-tone="notice"],
.threshold-feedback[data-tone="success"] {
  color: var(--accent);
}

.threshold-actions {
  display: grid;
  grid-template-columns: minmax(92px, 0.7fr) minmax(0, 1.3fr);
  gap: var(--space-3);
}

.threshold-save,
.threshold-reset {
  min-width: 0;
  min-height: 46px;
  padding: 0 var(--space-4);
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--ink);
  font-size: var(--font-size-label);
  font-weight: var(--font-weight-strong);
}

.threshold-save {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--page-bg);
}

.threshold-save:disabled {
  background: var(--surface-alt);
  border-color: var(--border);
  color: var(--muted);
  cursor: not-allowed;
}

.threshold-save:focus,
.threshold-reset:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--color-focus-ring);
  outline: 0;
}

.consent-banner[hidden] {
  display: none;
}

.consent-banner {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 15;
  padding: var(--space-4) var(--space-5) calc(var(--space-4) + var(--attribution-footer-reserved-height) + var(--bottom-nav-height) + var(--day-strip-height) + env(safe-area-inset-bottom));
  pointer-events: none;
}

.consent-panel {
  position: relative;
  display: grid;
  width: min(100%, var(--app-shell-narrow-max-width));
  gap: var(--space-4);
  margin: 0 auto;
  padding: var(--space-5);
  padding-right: calc(var(--space-5) + 36px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow-sticky);
  color: var(--ink);
  pointer-events: auto;
}

.consent-copy {
  display: grid;
  gap: var(--space-2);
}

.consent-title {
  font-size: var(--font-size-section-title);
  font-weight: var(--font-weight-strong);
  line-height: 1.2;
}

.consent-text {
  color: var(--muted);
  font-size: var(--font-size-caption);
  font-weight: var(--font-weight-body);
  line-height: 1.35;
}

.consent-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
}

.consent-choice {
  min-width: 0;
  min-height: 48px;
  padding: 0 var(--space-4);
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--ink);
  font-size: var(--font-size-label);
  font-weight: var(--font-weight-strong);
}

.consent-choice:focus,
.consent-dismiss:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--color-focus-ring);
  outline: 0;
}

.consent-dismiss {
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--ink);
  font-size: 1.25rem;
  font-weight: var(--font-weight-supporting-label);
  line-height: 1;
}

/* The portrait single-column layout intentionally applies at every viewport. */
