/* Local observations sit at the bottom right of each landscape hero. */
.local-weather {
  position: absolute;
  z-index: 3;
  right: clamp(20px, 3vw, 48px);
  bottom: 20px;
  left: 20px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  color: #fff;
  pointer-events: none;
  font: 500 13px/1.4 var(--sans);
}
.weather-details { max-width: 100%; pointer-events: auto; }
.weather-details summary, .weather-pause {
  color: #fff;
  background: rgba(14, 39, 46, .88);
  border: 1px solid rgba(213, 242, 243, .4);
  box-shadow: 0 3px 16px rgba(6, 25, 32, .12);
  border-radius: 24px;
}
.weather-details summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px 9px;
  min-height: 42px;
  padding: 9px 14px;
  cursor: pointer;
  list-style: none;
}
.weather-details summary::-webkit-details-marker { display: none; }
.weather-details summary:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; }
.weather-icon { width: 21px; height: 21px; flex-shrink: 0; color: #b7efff; }
.weather-clear-night, :root[data-scene="night"] .weather-clear-day { display: none; }
:root[data-scene="night"] .weather-clear-night { display: inline; }
.weather-location { font-weight: 800; }
.weather-reading { overflow-wrap: anywhere; }
.weather-expand { color: #b7efff; margin-left: 2px; transform: rotate(180deg); }
.weather-details[open] .weather-expand { transform: none; }
.weather-more {
  position: absolute;
  right: 0;
  bottom: calc(100% + 10px);
  width: min(310px, 100%);
  padding: 18px;
  border: 1px solid rgba(213, 242, 243, .4);
  border-radius: 16px;
  color: #fff;
  background: #15313b;
  box-shadow: 0 8px 30px rgba(6, 25, 32, .2);
  line-height: 1.6;
}
.weather-more p { margin: 0 0 5px; font-size: 13px; color: #fff; }
.weather-more a { color: #c6efff; text-underline-offset: 3px; }
.weather-more .weather-credit { margin: 12px 0 0; border-top: 1px solid #45616a; padding-top: 10px; color: #d4e2e7; font-size: 11px; }
.weather-pause { flex-shrink: 0; pointer-events: auto; cursor: pointer; width: 42px; height: 42px; font: 700 14px var(--sans); }
.weather-pause[hidden] { display: none; }
.weather-layer { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.weather-layer::before, .weather-layer::after {
  content: "";
  position: absolute;
  inset: -260px -40px 0;
  pointer-events: none;
  display: none;
  animation-play-state: paused;
}
.weather-layer[data-weather="snow"]::before,
.weather-layer[data-weather="snow"]::after {
  display: block;
  background-image:
    radial-gradient(circle at 26px 28px, #fff 1.5px, transparent 3px),
    radial-gradient(circle at 167px 85px, #fff 1px, transparent 2.5px),
    radial-gradient(circle at 73px 187px, #fff 2px, transparent 3.5px),
    radial-gradient(circle at 239px 212px, #fff 1px, transparent 2.5px);
  background-size: 300px 260px;
  opacity: .65;
  animation: local-snow-fall 13s linear infinite paused;
}
.weather-layer[data-weather="snow"]::after {
  background-position: 120px 90px;
  background-size: 390px 260px;
  opacity: .3;
  filter: blur(.6px);
  animation-duration: 21s;
}
.weather-layer[data-weather="rain"]::before {
  display: block;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='260' viewBox='0 0 300 260'%3E%3Cpath d='M30 24l-5 17M170 81l-4 14M80 185l-5 17M244 207l-4 14' stroke='%23ccebf8' stroke-width='1.2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-size: 300px 260px;
  opacity: .5;
  animation: local-snow-fall 1.1s linear infinite paused;
}
.weather-layer.is-running::before, .weather-layer.is-running::after { animation-play-state: running; }
.hero { padding-bottom: 96px; }
.workshop-page .ws-hero { padding-bottom: 96px; }
@keyframes local-snow-fall { to { transform: translateY(260px); } }
@media (max-width: 480px) {
  .local-weather { bottom: 16px; font-size: 12px; }
  .weather-details summary { display: grid; grid-template-columns: 21px minmax(0, 1fr) 12px; gap: 2px 7px; padding-inline: 11px; border-radius: 18px; }
  .weather-icon { grid-column: 1; grid-row: 1; }
  .weather-location { grid-column: 2; grid-row: 1; }
  .weather-reading { grid-column: 2 / 4; grid-row: 2; }
  .weather-expand { grid-column: 3; grid-row: 1; }
  .weather-more { width: min(310px, calc(100vw - 40px)); }
}
@media (prefers-reduced-motion: reduce) {
  .weather-layer::before, .weather-layer::after { animation: none !important; }
}
@media print { .local-weather, .weather-layer { display: none; } }

/* Snow cover follows the latest observation and the existing image coordinates. */
:root { --settled-snow: #edf6fc; --snow-cloud-light: #dae6ed; --snow-cloud-shadow: #7894a5; }
:root[data-scene="morning"] { --settled-snow: #f8f0e9; }
:root[data-scene="evening"] { --settled-snow: #eadfe9; --snow-cloud-light: #b8b6cd; --snow-cloud-shadow: #6b7293; }
:root[data-scene="night"] { --settled-snow: #bbd7e9; --snow-cloud-light: #708dab; --snow-cloud-shadow: #273f62; }
.snow-scenery { display: none; position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.snow-cloud-light { stop-color: var(--snow-cloud-light); }
.snow-cloud-shadow { stop-color: var(--snow-cloud-shadow); }
.river-snow { display: none; color: var(--settled-snow); }
.sun-cloud-cover, .sun-cloud-day, .sun-cloud-morning, .sun-cloud-evening { display: none; }
:root[data-sun-visible="false"]:not([data-scene="night"]) .snow-scenery { display: block; }
:root[data-sun-visible="false"] .sun-cloud-cover { display: inline; }
:root[data-scene="day"] .sun-cloud-day,
:root[data-scene="morning"] .sun-cloud-morning,
:root[data-scene="evening"] .sun-cloud-evening { display: inline; }
:root[data-sun-visible="false"] .fx-sun,
:root[data-sun-visible="false"] .morning-sun-fx,
:root[data-sun-visible="false"] .evening-sun-fx { display: none; }
:root[data-sun-visible="false"] .hero .q-sun { color: inherit; font-weight: inherit; }
.snow-flower-cap { display: none; fill: var(--settled-snow); pointer-events: none; }
.site-footer .snow-scenery { inset: auto; width: max(100%, 720px); height: auto; aspect-ratio: 1774 / 887; bottom: 0; left: 65%; transform: translateX(-65%); }
:root[data-weather="snow"] .snow-scenery { display: block; }
:root[data-weather="snow"] .snow-flower-cap,
:root[data-weather="snow"] .river-snow { display: inline; }
:root[data-weather="snow"][data-flowers="poppies"] .snow-cap-usual { display: none; }
/* Grass keeps its usual pop-up and sway in every weather condition. */
@media print { :root[data-weather="snow"] .snow-scenery { display: none; } }
@media print { :root[data-sun-visible="false"] .snow-scenery { display: none; } }
