/* Shared in-world weather for 第七天. */
.weather-layer,
.weather-window-layer{
  position:absolute;inset:0;overflow:hidden;pointer-events:none;z-index:5;
  --weather-cloud:#81869a;
  --weather-rain:#aebbd0;
  --weather-snow:#e0e3db;
  --weather-haze:rgba(78,82,112,.11);
}
.weather-window-layer{z-index:1}
.window-leaf{z-index:2}
body.morning .weather-layer,body.morning .weather-window-layer{
  --weather-cloud:#9ca59f;--weather-rain:#b7c5c6;--weather-snow:#ece8d5;--weather-haze:rgba(92,105,107,.10)
}
body.day .weather-layer,body.day .weather-window-layer{
  --weather-cloud:#899692;--weather-rain:#92adb3;--weather-snow:#e8ebe1;--weather-haze:rgba(63,80,85,.09)
}
body.dusk .weather-layer,body.dusk .weather-window-layer{
  --weather-cloud:#76677a;--weather-rain:#91a5bd;--weather-snow:#e6dbc4;--weather-haze:rgba(67,50,73,.14)
}
body.night .weather-layer,body.night .weather-window-layer{
  --weather-cloud:#444a7d;--weather-rain:#8798c6;--weather-snow:#cfd6dd;--weather-haze:rgba(18,18,63,.18)
}

.weather-haze{position:absolute;inset:0;background:var(--weather-haze)}
.weather-cloud{
  position:absolute;left:var(--cloud-x,12%);top:var(--cloud-y,12%);
  width:82px;height:20px;background:var(--weather-cloud);opacity:var(--cloud-opacity,.62);
  box-shadow:18px -14px 0 var(--weather-cloud),42px -8px 0 var(--weather-cloud),58px 0 0 var(--weather-cloud);
  animation:weather-cloud-drift var(--cloud-speed,34s) steps(24) infinite alternate;
}
.weather-cloud.small{transform:scale(.72);transform-origin:left top;opacity:.46}
@keyframes weather-cloud-drift{from{margin-left:-18px}to{margin-left:72px}}

.weather-drop{
  position:absolute;left:var(--x);top:-24px;width:2px;height:var(--len,14px);
  background:var(--weather-rain);opacity:var(--o,.65);
  animation:weather-rain-fall var(--speed,.9s) steps(7) infinite;
  animation-delay:var(--delay,0s);
}
@keyframes weather-rain-fall{from{transform:translate(0,-18px)}to{transform:translate(-22px,760px)}}

.weather-snow{
  position:absolute;left:var(--x);top:-14px;width:var(--size,6px);height:var(--size,6px);
  background:var(--weather-snow);opacity:var(--o,.8);
  box-shadow:calc(var(--size,6px) * .75) calc(var(--size,6px) * .45) 0 color-mix(in srgb,var(--weather-snow) 72%,transparent);
  animation:weather-snow-fall var(--speed,7s) steps(18) infinite;
  animation-delay:var(--delay,0s);
}
@keyframes weather-snow-fall{
  0%{transform:translate(0,-12px) rotate(0deg)}
  30%{transform:translate(18px,220px) rotate(90deg)}
  60%{transform:translate(-10px,450px) rotate(180deg)}
  100%{transform:translate(24px,760px) rotate(270deg)}
}

.weather-flash{
  position:absolute;inset:0;background:#e8e4d7;opacity:0;
  animation:weather-lightning 13.7s steps(1) infinite;
}
@keyframes weather-lightning{
  0%,71%,73%,75%,100%{opacity:0}
  72%{opacity:.18}
  74%{opacity:.08}
}

.weather-readout{
  color:var(--ui-muted,var(--muted,#8381a2));font-size:9px;letter-spacing:.1em;
  white-space:nowrap;text-align:right;
}
.timebox .weather-readout,.room-clock .weather-readout{grid-column:1/-1}

body[data-weather="cloudy"] .stars-pixel,
body[data-weather="cloudy"] .terrace-stars-pixel,
body[data-weather="cloudy"] .moon-pixel{opacity:.28}
body[data-weather="rain"] .stars-pixel,
body[data-weather="rain"] .terrace-stars-pixel,
body[data-weather="rain"] .moon-pixel,
body[data-weather="snow"] .stars-pixel,
body[data-weather="snow"] .terrace-stars-pixel,
body[data-weather="snow"] .moon-pixel{opacity:.12}
body[data-weather="storm"] .stars-pixel,
body[data-weather="storm"] .terrace-stars-pixel,
body[data-weather="storm"] .moon-pixel{opacity:.04}
body[data-weather="rain"] .shooting-star,
body[data-weather="rain"] .terrace-shooting-star,
body[data-weather="storm"] .shooting-star,
body[data-weather="storm"] .terrace-shooting-star,
body[data-weather="snow"] .shooting-star,
body[data-weather="snow"] .terrace-shooting-star{display:none!important}

@media(prefers-reduced-motion:reduce){
  .weather-cloud,.weather-drop,.weather-snow,.weather-flash{animation:none!important}
  .weather-drop,.weather-snow,.weather-flash{display:none}
}
