/* Dark frosted glass, with the selected landscape as the actual backdrop. */
:root {
  --glass-fill: rgba(11, 27, 31, .38);
  --glass-compact: rgba(9, 25, 29, .24);
  --glass-solid: #10242a;
  --glass-edge: rgba(224, 244, 233, .27);
  --glass-highlight: rgba(241, 253, 246, .13);
  --glass-shadow: 0 14px 40px rgba(0, 8, 12, .23);
  --muted: #c8d9d2;
  --quiet: #b5c9c0;
}

/* Solid defaults also cover browsers that cannot blur the backdrop. */
.screen--weather, .screen--settings, .screen--os {
  background: #07151c;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.weather-card, .settings-group, .os-tile,
.ambient-temperature.weather-peek, .screen-rail.display-dock {
  border: 1px solid var(--glass-edge);
  border-radius: 16px;
  background: var(--glass-solid);
  box-shadow: inset 0 1px 0 var(--glass-highlight), var(--glass-shadow);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.weather-card, .settings-group { color: var(--text); }
.weather-current.is-unavailable { opacity: 1; }
.ambient-temperature.weather-peek { text-align: left; }
.weather-peek__heading, .weather-peek .ambient-temperature__range { color: #e1ebe5; }
.weather-peek__heading span:last-child { color: #e4faf0; }
.weather-peek:hover { border-color: rgba(211, 242, 226, .65); }
.weather-peek:active { background-color: #1a333b; }

.screen-rail.display-dock { padding: 7px; }
.screen-rail.display-dock button {
  min-height: 44px;
  color: #e0ede6;
  border-radius: 10px;
  transition: background-color 180ms, color 180ms;
}
.screen-rail.display-dock button:hover { background: rgba(220, 244, 233, .13); }
.screen-rail.display-dock button:active { background: rgba(220, 244, 233, .21); }
.screen-rail.display-dock button.is-current {
  background: rgba(229, 246, 235, .18);
  color: #f0fff6;
  box-shadow: inset 0 0 0 1px rgba(229, 246, 235, .32);
}
.screen-rail.display-dock button:focus-visible { outline-color: #e7fff1; outline-offset: 2px; }

.app-shell:not([data-screen="ambient"]) .system-bar {
  background: rgba(5, 18, 24, .96);
  border-bottom: 1px solid rgba(224, 244, 233, .12);
}
.system-status { color: #d6e4dd; }
#header-fullscreen { min-width: 44px; min-height: 44px; }

.weather-layout .section-heading > div {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 20px;
}
.weather-city-label {
  padding: 7px 11px;
  border: 1px solid rgba(224, 244, 233, .25);
  border-radius: 6px;
  background: rgba(4, 18, 22, .42);
  color: #d9eee2;
  font-size: 13px;
  font-weight: 500;
}
.weather-notice { margin: 20px 0 26px; color: var(--muted); }
.forecast-section__heading > span, .weather-attribution { color: var(--muted); }
.weather-current__details { border-color: rgba(224, 244, 233, .20); padding-top: 18px; }
.weekly-row { border-color: rgba(224, 244, 233, .15); }
.hourly-item { border-radius: 8px; background: rgba(236, 248, 240, .045); }
.hourly-item time, .hourly-item small { color: #d1dfd8; }
.temperature-chart text { fill: #e0eee6; }
.sun-arc { border-color: rgba(196, 234, 216, .48); }
.sun-arc span { background: transparent; text-shadow: 0 3px 12px rgba(1, 15, 20, .5); }
.weather-error { background: #1c2c30; }

.tile-grid {
  gap: 16px;
  border: 0;
  background: transparent;
}
.os-heading { margin-bottom: 32px; }
.os-heading__date { color: var(--muted); }
.os-tile { transition: background-color 180ms, border-color 180ms; }
.os-tile::before { display: none; }
.os-tile:hover, .os-tile:focus-visible {
  background-color: #1b343b;
  border-color: rgba(213, 246, 225, .58);
}
.os-tile__icon { color: #c5e5d2; }
.os-tile__icon svg { stroke-width: 1.3; }
.os-tile__copy strong { font-weight: 400; }
.os-tile__copy small { color: #d1e1d7; font-size: clamp(12px, .9vw, 15px); line-height: 1.7; }
.os-tile__arrow { color: #ccdfd5; }
.os-footer { color: var(--muted); font-size: 11px; }

.settings-group__body h2 { margin-top: 0; }
.settings-group__body p { color: var(--muted); }
.select-control > span { color: var(--muted); letter-spacing: .04em; }
.select-control select, .library-search input {
  border-color: rgba(224, 244, 233, .28);
  background-color: rgba(4, 18, 24, .67);
  color: #f0f7f0;
}
.select-control select {
  padding-right: 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%23c8d9d2' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px;
}
.select-control select option { background: #10242a; color: #f0f7f0; }
.library-search input::placeholder { color: #bacec3; opacity: 1; }
.background-card { background: #12272e; }
.background-card__meta { color: var(--muted); }
.background-library__heading p, .background-library__total { color: var(--muted); }

.screen { scrollbar-color: #7faaa0 transparent; }
.hourly-strip { scrollbar-color: #7faaa0 transparent; scrollbar-width: thin; }
:focus-visible { outline-color: #d0f6e0; }
a { text-underline-offset: .2em; }

@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .screen--weather, .screen--settings, .screen--os { background: rgba(4, 16, 21, .68); }
  .weather-card, .settings-group, .os-tile {
    background: var(--glass-fill);
    -webkit-backdrop-filter: blur(24px) saturate(118%);
    backdrop-filter: blur(24px) saturate(118%);
  }
  .ambient-temperature.weather-peek, .screen-rail.display-dock {
    background: var(--glass-compact);
    -webkit-backdrop-filter: blur(8px) saturate(125%);
    backdrop-filter: blur(8px) saturate(125%);
  }
  /* Preserve the photograph's colour and outlines under these small overlays. */
  .ambient-temperature.weather-peek {
    background: linear-gradient(180deg, rgba(9, 25, 29, .38), rgba(9, 25, 29, .24));
    -webkit-backdrop-filter: blur(6px) saturate(125%) brightness(82%);
    backdrop-filter: blur(6px) saturate(125%) brightness(82%);
  }
  .ambient-temperature.weather-peek:active {
    background: linear-gradient(180deg, rgba(19, 43, 49, .46), rgba(19, 43, 49, .32));
  }
  .os-tile--ambient { background: rgba(9, 24, 29, .30); }
  .os-tile:hover, .os-tile:focus-visible { background-color: rgba(22, 45, 49, .74); }
  .app-shell:not([data-screen="ambient"]) .system-bar {
    background: rgba(5, 18, 24, .72);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
  }
}

@media (max-width: 700px) {
  .screen-rail.display-dock { padding: 5px; }
  .screen-rail.display-dock button { height: 44px; font-size: 12px; }
  .weather-card, .settings-group { border-radius: 14px; }
  .weather-layout .section-heading > div { gap: 10px 13px; }
  .weather-city-label { padding: 5px 9px; font-size: 12px; }
  .os-heading { margin-bottom: 26px; gap: 16px; }
  .os-heading h1 { font-size: 32px; }
  .os-heading__date { font-size: 22px; }
  .tile-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: auto; gap: 12px; flex: initial; }
  .os-tile { min-height: 168px; padding: 20px; }
  .os-tile--ambient { grid-column: 1 / -1; grid-row: auto; min-height: 208px; }
  .os-tile--weather, .os-tile--web { grid-column: auto; grid-row: auto; }
  .os-tile--settings { grid-column: 1 / -1; min-height: 126px; }
  .os-tile__copy strong { font-size: 25px; }
  .os-tile__icon { top: 20px; right: 20px; }
  .os-tile__icon svg { width: 34px; }
  .os-tile__arrow { right: 20px; bottom: 22px; }
  .os-footer { margin-top: 24px; }
  .weather-card, .settings-group, .os-tile,
  .ambient-temperature.weather-peek, .screen-rail.display-dock {
    -webkit-backdrop-filter: blur(16px) saturate(115%);
    backdrop-filter: blur(16px) saturate(115%);
  }
  @supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .screen-rail.display-dock {
      -webkit-backdrop-filter: blur(8px) saturate(125%);
      backdrop-filter: blur(8px) saturate(125%);
    }
    .ambient-temperature.weather-peek {
      background: linear-gradient(180deg, rgba(9, 25, 29, .54), rgba(9, 25, 29, .34));
      -webkit-backdrop-filter: blur(8px) saturate(115%) brightness(75%);
      backdrop-filter: blur(8px) saturate(115%) brightness(75%);
    }
  }
}

@media (max-height: 500px) and (min-width: 701px) {
  @supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .ambient-temperature.weather-peek {
      background: linear-gradient(180deg, rgba(9, 25, 29, .56), rgba(9, 25, 29, .34));
      -webkit-backdrop-filter: blur(6px) saturate(115%) brightness(70%);
      backdrop-filter: blur(6px) saturate(115%) brightness(70%);
    }
  }
}

@media (prefers-reduced-transparency: reduce) {
  .screen--weather, .screen--settings, .screen--os { background: #07151c; }
  .weather-card, .settings-group, .os-tile,
  .ambient-temperature.weather-peek, .ambient-temperature.weather-peek:active, .screen-rail.display-dock,
  .app-shell:not([data-screen="ambient"]) .system-bar {
    background: var(--glass-solid);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  .screen-rail.display-dock button.is-current { background: #d9eae0; color: #132e2d; }
}
@media (prefers-reduced-motion: reduce) {
  .os-tile, .screen-rail.display-dock button { transition: none; }
}
@media (forced-colors: active) {
  .screen--weather, .screen--settings, .screen--os,
  .weather-card, .settings-group, .os-tile,
  .ambient-temperature.weather-peek, .ambient-temperature.weather-peek:active, .screen-rail.display-dock,
  .app-shell:not([data-screen="ambient"]) .system-bar {
    background: Canvas;
    color: CanvasText;
    border-color: CanvasText;
    box-shadow: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  .screen-rail.display-dock button.is-current { background: Highlight; color: HighlightText; }
}
