/* REANE Winter Edition v3 — Rich Festive Pine Garland, Swaying Baubles, Corner Frost Sprigs, Snowdrifts & Parallax Snow */
#reaneWinterCanvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none !important;
  z-index: 2147483000;
  opacity: 0;
  transition: opacity 0.6s ease;
}
html.reane-winter-full #reaneWinterCanvas {
  opacity: 1;
}

#reaneWinterAurora {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 170px;
  pointer-events: none !important;
  z-index: 2147482998;
  opacity: 0;
  transition: opacity 0.8s ease;
  background:
    radial-gradient(58% 100% at 15% 0%, rgba(56, 189, 248, 0.18) 0%, rgba(56, 189, 248, 0) 70%),
    radial-gradient(48% 95% at 50% 0%, rgba(251, 191, 36, 0.12) 0%, rgba(251, 191, 36, 0) 72%),
    radial-gradient(55% 100% at 85% 0%, rgba(52, 211, 153, 0.16) 0%, rgba(52, 211, 153, 0) 70%);
  animation: reaneAuroraDrift 14s ease-in-out infinite alternate;
}
html.reane-winter-full #reaneWinterAurora,
html.reane-winter-light #reaneWinterAurora {
  opacity: 1;
}
@keyframes reaneAuroraDrift {
  0% { transform: translateX(-2%) scaleY(1); }
  50% { transform: translateX(2%) scaleY(1.08); }
  100% { transform: translateX(-1%) scaleY(0.96); }
}

/* Rich Pine Festoon Garland + Swaying Ornaments */
#reaneWinterGarland {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 58px;
  pointer-events: none !important;
  z-index: 2147483002;
  overflow: visible;
  opacity: 0;
  transform: translateY(-16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
html.reane-winter-full #reaneWinterGarland,
html.reane-winter-light #reaneWinterGarland {
  opacity: 0.96;
  transform: translateY(0);
}
#reaneWinterGarland svg {
  width: 100%;
  height: 58px;
  display: block;
  overflow: visible;
}
.rw-bulb {
  transform-box: fill-box;
  transform-origin: center;
  animation: rwTwinkle 3.0s ease-in-out infinite;
}
.rw-bulb-1 { fill: #fde68a; filter: drop-shadow(0 0 6px rgba(253, 230, 138, 0.98)); animation-delay: 0s; }
.rw-bulb-2 { fill: #38bdf8; filter: drop-shadow(0 0 6px rgba(56, 189, 248, 0.98)); animation-delay: 0.65s; }
.rw-bulb-3 { fill: #fb7185; filter: drop-shadow(0 0 6px rgba(251, 113, 133, 0.95)); animation-delay: 1.3s; }
.rw-bulb-4 { fill: #6ee7b7; filter: drop-shadow(0 0 6px rgba(110, 231, 183, 0.95)); animation-delay: 1.95s; }
@keyframes rwTwinkle {
  0%, 100% { opacity: 0.58; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.22); }
}

.rw-bauble-group {
  transform-box: fill-box;
  transform-origin: 50% 0%;
  animation: rwSway 4.8s ease-in-out infinite alternate;
}
.rw-bauble-alt {
  animation-duration: 5.6s;
  animation-direction: alternate-reverse;
}
@keyframes rwSway {
  0% { transform: rotate(-4.5deg); }
  100% { transform: rotate(4.5deg); }
}

/* Corner Pine, Holly & Snowflake Sprigs */
#reaneWinterCorners {
  position: fixed;
  inset: 0;
  pointer-events: none !important;
  z-index: 2147483001;
  opacity: 0;
  transition: opacity 0.65s ease;
}
html.reane-winter-full #reaneWinterCorners,
html.reane-winter-light #reaneWinterCorners {
  opacity: 1;
}
.rw-corner {
  position: fixed;
  top: 0;
  width: 112px;
  height: 112px;
  pointer-events: none !important;
}
.rw-corner-left { left: 0; }
.rw-corner-right { right: 0; transform: scaleX(-1); }

/* Soft Translucent Frosted Bottom Snowdrifts + Tiny Holiday Silhouettes */
#reaneWinterBottom {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 36px;
  pointer-events: none !important;
  z-index: 2147482999;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
html.reane-winter-full #reaneWinterBottom,
html.reane-winter-light #reaneWinterBottom {
  opacity: 0.86;
  transform: translateY(0);
}
#reaneWinterBottom svg {
  width: 100%;
  height: 36px;
  display: block;
}

/* Compact Floating Snowflake Control Pill */
#reaneWinterWidget {
  position: fixed;
  left: 14px;
  bottom: 14px;
  z-index: 2147483500;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  user-select: none;
}
#reaneWinterBtn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 11px;
  border-radius: 999px;
  border: 1px solid rgba(148, 211, 255, 0.42);
  background: rgba(10, 22, 42, 0.82);
  color: #e0f2fe;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 6px 22px rgba(2, 12, 27, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.16);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
#reaneWinterBtn:hover {
  transform: translateY(-1px);
  background: rgba(15, 34, 64, 0.94);
  border-color: rgba(253, 230, 138, 0.7);
  box-shadow: 0 8px 26px rgba(14, 165, 233, 0.34);
}
#reaneWinterBtn .rw-icon {
  display: inline-block;
  font-size: 15px;
  line-height: 1;
}
html.reane-winter-full #reaneWinterBtn .rw-icon {
  animation: rwSpin 12s linear infinite;
}
@keyframes rwSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
#reaneWinterBtn .rw-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #38bdf8;
  box-shadow: 0 0 8px #38bdf8;
}
html.reane-winter-light #reaneWinterBtn .rw-dot {
  background: #fde68a;
  box-shadow: 0 0 8px #fde68a;
}
html.reane-winter-off #reaneWinterBtn .rw-dot {
  background: #64748b;
  box-shadow: none;
}

#reaneWinterMenu {
  position: absolute;
  left: 0;
  bottom: 44px;
  width: 262px;
  padding: 11px;
  border-radius: 16px;
  border: 1px solid rgba(148, 211, 255, 0.3);
  background: rgba(9, 19, 36, 0.95);
  color: #f1f5f9;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 18px 46px rgba(2, 8, 23, 0.65);
  opacity: 0;
  transform: translateY(8px) scale(0.96);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
#reaneWinterWidget.open #reaneWinterMenu {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.rw-menu-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 6px 8px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  margin-bottom: 6px;
}
.rw-menu-title {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #bae6fd;
}
.rw-menu-season {
  font-size: 10px;
  color: #94a3b8;
}
.rw-countdown {
  margin: 4px 2px 8px;
  padding: 7px 10px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.16), rgba(251, 191, 36, 0.14));
  border: 1px solid rgba(253, 230, 138, 0.28);
  font-size: 11.5px;
  font-weight: 700;
  color: #fef3c7;
  text-align: center;
}
.rw-opt {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  margin-top: 3px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: #e2e8f0;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.rw-opt:hover {
  background: rgba(56, 189, 248, 0.14);
}
.rw-opt.active {
  background: rgba(56, 189, 248, 0.22);
  border-color: rgba(56, 189, 248, 0.5);
  color: #ffffff;
  font-weight: 700;
}
.rw-opt-check {
  font-size: 12px;
  color: #38bdf8;
  opacity: 0;
}
.rw-opt.active .rw-opt-check {
  opacity: 1;
}
.rw-spark-btn {
  width: 100%;
  margin-top: 8px;
  padding: 7px 10px;
  border-radius: 10px;
  border: 1px solid rgba(253, 230, 138, 0.38);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.22), rgba(56, 189, 248, 0.2));
  color: #fef3c7;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s, background 0.15s;
}
.rw-spark-btn:hover {
  transform: translateY(-1px);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.34), rgba(56, 189, 248, 0.3));
}

@media (max-width: 768px) {
  #reaneWinterWidget { left: 10px; bottom: 12px; }
  #reaneWinterBtn { height: 32px; padding: 0 9px; font-size: 12px; }
  #reaneWinterGarland { height: 38px; }
  #reaneWinterGarland svg { height: 38px; }
  .rw-corner { width: 68px; height: 68px; opacity: 0.78; }
  #reaneWinterBottom { display: none !important; }
  #reaneWinterAurora { height: 95px; }
}

@media (prefers-reduced-motion: reduce) {
  #reaneWinterAurora,
  .rw-bulb,
  .rw-bauble-group,
  #reaneWinterBtn .rw-icon {
    animation: none !important;
  }
}

/* Suppress global seasonal winter overlay inside Scenario Demo Modal, Builder, and Public Player */
html.reane-suppress-winter #reaneWinterCanvas,
html.reane-suppress-winter #reaneWinterAurora,
html.reane-suppress-winter #reaneWinterGarland,
html.reane-suppress-winter #reaneWinterCorners,
html.reane-suppress-winter #reaneWinterBottom,
html.reane-suppress-winter #reaneWinterWidget {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}
