.pg-weather {
  position: relative; overflow: hidden; margin: 20px 0 8px;
  border: 1px solid #4d4021; border-left: 4px solid #ffb300; border-radius: 14px;
  background: linear-gradient(110deg, #0b0b0b, #191919); color: #fff;
}
.pg-weather [hidden] { display: none; }
.weather-content { position: relative; z-index: 1; padding: 18px 22px; }
.pg-weather .weather-eyebrow { margin: 0 0 4px; color: #ffb300; font-size: .875rem; letter-spacing: .08em; font-weight: 700; }
.pg-weather h2 { margin: 0 0 10px; font-size: 1.25rem; line-height: 1.2; }
[data-weather-details] { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 18px; padding-right: 130px; }
.weather-period { margin: 0; font-size: .875rem; color: #dddddd; }
.weather-description { margin: 0; font-size: 1rem; line-height: 1.4; }
.weather-range { display: flex; gap: 14px; flex-wrap: wrap; font-size: 1.125rem; font-weight: 700; color: #fff; }
.weather-range p { margin: 0; }
.weather-extra { margin: 8px 0; font-size: .875rem; color: #dddddd; }
.weather-status { margin: 8px 130px 8px 0; font-size: .875rem; line-height: 1.5; }
.weather-expanded { margin-top: 10px; }
.weather-expanded summary { width: fit-content; padding: 8px 0; min-height: 44px; box-sizing: border-box; color: #ffb300; font-size: .875rem; cursor: pointer; }
.weather-expanded summary:focus-visible, .weather-footer button:focus-visible, .weather-footer a:focus-visible { outline: 2px solid #ffb300; outline-offset: 3px; }
.weather-days { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 10px; }
.weather-day { min-width: 0; padding: 12px; border: 1px solid #403a2d; border-radius: 10px; background: #151515; }
.weather-day time { display: block; color: #dddddd; font-size: .875rem; text-transform: capitalize; }
.weather-day p { font-size: .875rem; line-height: 1.4; margin: 6px 0 0; }
.weather-day .weather-day-range { font-size: 1.125rem; font-weight: 700; color: #ffb300; }
.weather-footer { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 16px; color: #cccccc; font-size: .75rem; }
.weather-footer a { color: #ffb300; text-decoration: underline; text-underline-offset: 3px; }
.weather-footer button { min-height: 44px; padding: 6px 10px; border: 1px solid #5c4b24; border-radius: 7px; background: #0b0b0b; color: #fff; font: inherit; cursor: pointer; }
.weather-scene { position: absolute; width: 280px; height: 280px; right: 0; top: 0; transform: scale(.43); transform-origin: top right; overflow: hidden; pointer-events: none; }
.weather-sun { display: none; position: absolute; width: 96px; height: 96px; top: 50px; right: 80px; border-radius: 50%; background: #ffb300; box-shadow: 0 0 55px 12px #ffb30055; animation: pg-sun 6s ease-in-out infinite; }
.weather-moon { display: none; position: absolute; width: 90px; height: 90px; top: 45px; right: 80px; border-radius: 50%; box-shadow: inset 25px -15px #ffffff; transform: rotate(-18deg); }
.weather-cloud { display: none; position: absolute; width: 170px; height: 54px; border-radius: 70px; background: #eeeeee; top: 117px; left: 24%; filter: drop-shadow(0 12px 20px #0004); animation: pg-cloud 9s ease-in-out infinite; }
.weather-cloud::before, .weather-cloud::after { content: ''; position: absolute; background: inherit; border-radius: 50%; }
.weather-cloud::before { width: 90px; height: 90px; left: 32px; bottom: 8px; }
.weather-cloud::after { width: 65px; height: 65px; right: 18px; bottom: 8px; }
.cloud-back { opacity: .48; transform: scale(.8); top: 75px; left: 44%; animation-delay: -4s; }
.weather-rain { display: none; position: absolute; inset: 160px 10% 0 15%; }
.weather-rain i { position: absolute; left: calc(var(--i) * 7%); top: -10px; width: 3px; height: 18px; background: linear-gradient(transparent, #ffffff); border-radius: 4px; opacity: 0; animation: pg-rain 1.5s linear infinite; animation-delay: calc(var(--i) * -.23s); }
.weather-lightning { display: none; position: absolute; left: 48%; top: 158px; width: 45px; height: 95px; background: #ffb300; clip-path: polygon(36% 0, 94% 0, 63% 35%, 100% 35%, 10% 100%, 35% 51%, 0 51%); opacity: 0; animation: pg-lightning 9s ease-in-out infinite; }
.weather-hills { position: absolute; right: -10%; bottom: -95px; width: 110%; height: 145px; border-radius: 50% 80% 0 0; background: #0b0b0b80; transform: rotate(-7deg); }
.weather-fog { display: none; position: absolute; inset: 130px 10% 30px; background: repeating-linear-gradient(transparent 0 12px, #ffffff44 13px 18px, transparent 19px 33px); border-radius: 50%; animation: pg-cloud 10s ease-in-out infinite; }
.pg-weather[data-condition="clear"] .weather-sun, .pg-weather[data-condition="partly"] .weather-sun { display: block; }
.pg-weather[data-night="true"] .weather-sun { display: none; }
.pg-weather[data-night="true"][data-condition="clear"] .weather-moon, .pg-weather[data-night="true"][data-condition="partly"] .weather-moon { display: block; }
.pg-weather:is([data-condition="partly"], [data-condition="cloudy"], [data-condition="rain"], [data-condition="storm"], [data-condition="snow"], [data-condition="fog"]) .weather-cloud { display: block; }
.pg-weather:is([data-condition="rain"], [data-condition="storm"], [data-condition="snow"]) .weather-rain { display: block; }
.pg-weather[data-condition="storm"] .weather-cloud { background: #aaaaaa; }
.pg-weather[data-condition="storm"] .weather-lightning { display: block; }
.pg-weather[data-condition="snow"] .weather-rain i { width: 6px; height: 6px; background: #fff; border-radius: 50%; animation-duration: 3s; }
.pg-weather[data-condition="fog"] .weather-fog { display: block; }
.pg-weather:is([data-condition="loading"], [data-condition="unavailable"]) .weather-scene { opacity: .3; }
.pg-weather.weather-paused .weather-scene * { animation-play-state: paused !important; }
@keyframes pg-cloud { 0%, 100% { translate: -6px 0; } 50% { translate: 9px 0; } }
@keyframes pg-sun { 0%, 100% { scale: .96; } 50% { scale: 1.04; } }
@keyframes pg-rain { 0% { opacity: 0; transform: translate(12px, 0) rotate(14deg); } 15% { opacity: .85; } 85% { opacity: .6; } 100% { opacity: 0; transform: translate(-20px, 140px) rotate(14deg); } }
@keyframes pg-lightning { 0%, 20%, 32%, 100% { opacity: 0; } 25%, 28% { opacity: .95; } }
@media (max-width: 650px) {
  .weather-content { padding: 16px; }
  [data-weather-details] { display: block; padding-right: 90px; }
  .weather-description { margin: 4px 0 8px; }
  .weather-range { gap: 6px 14px; font-size: 1rem; }
  .weather-scene { transform: scale(.33); top: 26px; }
  .weather-status { margin-right: 90px; }
  .weather-days { grid-template-columns: 1fr; }
  .weather-day { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; }
  .weather-day p:last-child { grid-column: 1 / -1; }
  .weather-day .weather-day-range { margin: 0; }
  .weather-footer { column-gap: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .weather-scene * { animation: none !important; }
  .weather-rain i { opacity: .5; transform: translateY(20px) rotate(14deg); top: calc(var(--i) * 4px); }
  .pg-weather[data-condition="storm"] .weather-lightning { opacity: .8; }
}
