:root[data-christmas] {
  --primary: #c94355 !important;
  --purple-glow: #d95563;
  --purple-bright: #ff9f9d;
  --purple-soft: #f5c3bf;
  --purple-pale: #ffe6d7;
  --purple-3: #873448;
  --purple-2: #512032;
  --purple-1: #321322;
  --winter-sky-top: #741e32;
  --winter-sky-bottom: #461528;
  --bg-deep: #210d14;
  --bg-panel: #3b1521;
  --bg-raised: #4b1c2c;
  --bg-dock: #231219;
  --bg-glass-top: #542431;
  --text-hi: #fff6ef;
  --text-mid: #e8cfc9;
  --text-faint: #be9d9e;
  --text-low: #c9aba9;
}
:root[data-christmas]:not([data-glass="on"]) {
  --sky-base: var(--bg-panel);
  --surface-underlay: var(--bg-panel);
  --surface-base: var(--surface-underlay);
  --nested-surface-base: var(--surface-underlay);
  --glass: var(--bg-panel);
  --glass-2: var(--bg-raised);
  --glass-fill: var(--bg-panel);
  --glass-filter: none;
  --surface-tint: linear-gradient(var(--bg-panel), var(--bg-panel));
  --navigation-tint: linear-gradient(var(--bg-dock), var(--bg-dock));
  --ua-sheet-background: var(--bg-panel);
}
html[data-christmas] .starfield {
  background: radial-gradient(ellipse at 12% 0%, var(--winter-sky-top), transparent 60%),
              radial-gradient(ellipse at 95% 90%, var(--winter-sky-bottom), transparent 48%), var(--bg-deep);
}
html[data-christmas] .starfield > i { display: none; }
.christmas-sky { position:absolute; inset:0; width:100%; height:100%; pointer-events:none; }
html[data-christmas] #theme-primary .theme-color-swatch { background-color: var(--primary) !important; }

html[data-christmas] .starfield::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('/img/christmas-pine.svg') right top / clamp(110px, 18vw, 255px) auto no-repeat;
}
#christmas-preview[aria-pressed="true"] { border-color: var(--purple-soft); color: var(--text-hi); }


.christmas-access { display: flex; gap: .5rem; margin-block: .75rem; }
.christmas-access input { min-width: 0; flex: 1; }
#christmas-preview[aria-pressed="true"] { background: var(--purple-2); }

:where(html[data-christmas] :is(.moon-badge,.dr-pill,.big-cell,.mc-tile,.card,.am-surface,.dialog-panel,.btn-primary,.btn-ghost,.cube-corners)) { position: relative; }
html[data-christmas] [data-snow-bank]:not(:where(#tabbar))::after,
html[data-christmas] :where(#tabbar)[data-mobile-bank]::after {
  content: '';
  position: absolute;
  inset: -9px var(--cube-face-radius, min(5%, 12px)) auto;
  height: 9px;
  pointer-events: auto;
  background: var(--snow-bank) center / 100% 100% no-repeat;
  transform-origin: center bottom;
}
html[data-christmas] [data-snow-cleared]::after {
  animation: christmas-refill 32s ease-out both;
}
@keyframes christmas-refill {
  0%, 16% { transform: scaleY(0); }
  100% { transform: scaleY(1); }
}
.christmas-snowfall-piece {
  position: absolute;
  width: 9px;
  height: 4px;
  border-radius: 65% 35% 60% 40%;
  background: var(--text-hi);
  box-shadow: 5px -3px 0 -1px var(--text-hi), -4px 4px 0 -1px var(--text-mid);
  pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
  html[data-christmas] [data-snow-cleared]::after { animation-timing-function: steps(1, end); }
}
