/* Layers share the facade's 1748px world space, not the fixed UI viewport. */
.roof-weather {
  position: absolute;
  inset: 0 auto auto 0;
  width: 1748px;
  height: 900px;
  overflow: hidden;
  pointer-events: none;
  mask-image: linear-gradient(#000 0 76%, transparent 99%);
}

.roof-weather__sky {
  position: absolute;
  inset: 0;
  overflow: hidden;
  /* Open sky only. The PKiN spire, antennae and right chimney stay in front. */
  clip-path: path("M0 0 H1748 V390 L1697 394 1671 384 1671 248 1662 243 1660 142 1656 142 1654 348 1600 356 1593 171 1585 137 1605 116 1617 108 1607 97 1584 90 1546 73 1525 73 1493 86 1462 98 1454 111 1464 119 1488 124 1484 235 1464 238 1463 195 1480 186 1468 180 1440 174 1411 184 1401 190 1409 198 1407 253 1394 251 1398 216 1392 207 1371 199 1345 201 1331 208 1328 195 1344 189 1339 181 1312 172 1286 179 1271 185 1281 196 1278 256 1252 262 1251 242 1242 241 1238 282 1223 295 1204 325 1204 415 1182 406 1177 365 1156 357 1151 387 1145 389 1144 248 1138 248 1135 283 1109 273 1094 274 1096 281 1133 292 1135 388 1105 388 1105 355 1084 348 1080 395 1056 395 1027 388 1000 391 972 393 928 395 876 396 832 400 794 397 759 393 745 392 738 402 695 405 650 404 615 400 591 402 554 398 511 400 479 401 477 356 451 345 449 270 433 263 433 221 423 221 422 197 414 195 413 120 402 113 400 194 391 199 391 224 383 225 382 250 365 263 365 345 340 353 333 356 325 348 303 348 295 355 295 391 260 400 234 402 194 396 191 369 169 362 157 365 128 355 128 346 111 340 111 311 111 268 104 267 96 320 96 335 78 342 52 340 0 344 Z");
  mask-image: linear-gradient(#000 0 22%, #000a 34%, transparent 48%);
}

.roof-weather__sky::before,
.roof-weather__sky::after {
  content: "";
  position: absolute;
  inset: -32px 0 auto;
  height: 340px;
  background: url("/assets/gpdp/v15/cloud-veils.webp") repeat-x 0 0 / 1240px 340px;
  opacity: .36;
  animation: roof-cloud-drift 188s linear infinite paused;
}

.roof-weather__sky::after {
  inset-block-start: 52px;
  height: 245px;
  opacity: .27;
  background-size: 925px 245px;
  --cloud-from: -468px;
  --cloud-to: 457px;
  animation-duration: 132s;
}

@keyframes roof-cloud-drift {
  from { background-position-x: var(--cloud-from, -700px); }
  to { background-position-x: var(--cloud-to, 540px); }
}

.roof-weather[data-running] .roof-weather__sky::before,
.roof-weather[data-running] .roof-weather__sky::after { animation-play-state: running; }

.roof-weather canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100% !important;
  height: 100% !important;
}

@media (max-width: 720px) {
  .roof-weather__sky::before { opacity: .34; }
  .roof-weather__sky::after { opacity: .25; }
}

@media (prefers-reduced-motion: reduce) {
  .roof-weather { display: none; }
}
