/* Weather decoration never participates in layout or hit testing. */
.weather-vibe, .weather-vibe *, .weather-vibe::before {
  pointer-events: none !important;
  user-select: none;
}
.weather-vibe {
  position: fixed;
  inset: 0;
  z-index: 20;
  overflow: hidden;
  contain: strict;
}
.weather-vibe canvas { display: block; width: 100%; height: 100%; }
.weather-vibe::before {
  content: '';
  position: absolute;
  inset: 0;
}
.weather-vibe[data-condition='sunny']::before {
  background: radial-gradient(ellipse at 15% 8%, #ffc66c16, transparent 65%);
}
.weather-vibe[data-condition='rainy']::before {
  background: linear-gradient(125deg, #67839908, transparent 70%);
}
.weather-vibe[data-condition='cloudy']::before {
  background: radial-gradient(ellipse at 65% 15%, #52616b0c, transparent 75%);
}
/* Night stays independent of daytime weather; static layers also cover fallback. */
.weather-vibe[data-night='true'][data-condition='sunny']::before { background: none; }
.weather-vibe[data-renderer='css'][data-condition='rainy']::before {
  background: repeating-linear-gradient(105deg, transparent 0 70px, #69849b0b 71px 72px, transparent 73px 145px);
}
@media (prefers-reduced-motion: reduce) {
  .weather-vibe canvas { display: none; }
}
@media (max-width: 840px) { .weather-vibe { display: none; } }
/* Desktop keeps the existing 1485:1169 composition inside the window. */
@media (min-width: 841px) {
  html, body { overflow: hidden; }
  .desk { width: 100%; height: 100dvh; min-height: 0; overflow: hidden; }
  .app {
    flex: none;
    width: min(100%, calc(100dvh * 1485 / 1169));
    height: auto;
  }
}

.weather-vibe[data-condition='windy']::before {
  background: linear-gradient(115deg, #a8b67a0b, transparent 65%);
}
.weather-vibe[data-night='true'] {
  background:
    radial-gradient(circle at 12% 14%, #fff4b8d9 0 1.5px, transparent 3px),
    radial-gradient(circle at 31% 8%, #eff5ffb0 0 1.2px, transparent 2.5px),
    radial-gradient(circle at 88% 36%, #fff4b8d9 0 1.5px, transparent 3px),
    linear-gradient(90deg, #030917eb 0%, #08152dc7 9%, #12264652 22%, #192d4800 34%, #192d4800 66%, #12264652 78%, #08152dc7 91%, #030917eb 100%),
    radial-gradient(ellipse at center, #1c2d4512 45%, #09132440 100%);
}
.weather-vibe[data-night='true']::after {
  content: '';
  position: absolute;
  top: 7%; right: 7%;
  width: 64px; height: 64px;
  border-radius: 50%;
  border: 1px solid #fffbeac9;
  background:
    radial-gradient(circle at 64% 38%, #b5c4d347 0 5px, transparent 6px),
    radial-gradient(circle at 30% 66%, #b5c4d333 0 7px, transparent 8px),
    radial-gradient(circle at 72% 70%, #b5c4d32e 0 4px, transparent 5px),
    radial-gradient(circle at 35% 30%, #fffbe8, #e0e8ef 65%, #b6c6da);
  box-shadow: 0 0 23px 7px #cfe2ff70, 0 0 65px 24px #aec8ff33;
  pointer-events: none;
}
.weather-vibe[data-renderer='css'][data-windy='true']::before {
  background:
    radial-gradient(ellipse 5px 12px at 8% 30%, #879b6455 90%, transparent),
    radial-gradient(ellipse 5px 12px at 89% 62%, #a7a26955 90%, transparent),
    radial-gradient(ellipse 4px 10px at 20% 82%, #879b6455 90%, transparent);
}
/* Local-only controls sit outside the pointer-transparent atmosphere. */
.weather-debug {
  position: fixed;
  right: 12px; bottom: 12px;
  z-index: 30;
  width: 278px;
  padding: 9px 11px;
  border: 1px solid #cbb9a5;
  border-radius: 12px;
  background: #fff9eeef;
  box-shadow: 0 3px 18px #59453320;
  color: #574b52;
  font: 12px/1.5 "Mali", sans-serif;
}
.weather-debug summary { cursor: pointer; font-weight: 700; }
.weather-debug-buttons {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  margin-top: 8px;
}
.weather-debug button {
  padding: 5px 4px;
  border: 1px solid #d5c9ba;
  border-radius: 6px;
  background: #fffdf7;
  color: inherit;
  font: inherit;
}
.weather-debug button[aria-pressed='true'] { background: #e5d5e8; border-color: #b59bbc; }
.weather-debug button:focus-visible, .weather-debug summary:focus-visible { outline: 2px solid #8e6b99; outline-offset: 2px; }
.weather-debug p { margin: 8px 0 3px; font-size: 11px; }
.weather-debug small { font-size: 10px; }
@media (max-width: 840px) { .weather-debug { display: none; } }

/* WebGL owns these atmospheres; CSS is only the static fallback. */
.weather-vibe[data-renderer='webgl'][data-condition='sunny']::before,
.weather-vibe[data-renderer='webgl'][data-condition='rainy']::before,
.weather-vibe[data-renderer='webgl'][data-condition='cloudy']::before { background: none; }
