.winter-setting { display: none; }
:root[data-season="winter"] .bg-lines.stars {
  z-index: 85;
  pointer-events: none;
}
:root[data-winter-available="1"] .winter-setting { display: flex; }
:root:not([data-season="winter"]) .winter-snow-setting { display: none; }

/* Личные палитра и контраст остаются в LOOK. Ночью поверхности темнеют
   по обычным правилам app.css, включая выбор темы внутри Telegram.
   Эксклюзивные темы (тетрадь, кибер, терминал, комикс) сохраняют свои цвета. */
:root[data-season="winter"]:not([data-skin="paper"], [data-skin="cyber"], [data-skin="terminal"], [data-skin="comic"]) {
  --brand-1: #6827c6;
  --brand-2: #b651dd;
  --brand-3: #ffa8d8;
  --neon: #d3c8ff;
  --neon-glow: rgba(207, 148, 255, .52);
  --brand-grad: linear-gradient(115deg, #5226a9, #8735bc 62%, #ad3f92);
  --btn-grad: linear-gradient(115deg, #5d24bb, #8a32b7 58%, #a13790);
  --glow: 0 4px 16px rgba(111, 39, 180, .28);
  --bg-strength: .40;
}
:root[data-season="winter"]:not([data-skin="cyber"], [data-skin="terminal"]) #hd,
:root[data-season="winter"]:not([data-skin="cyber"], [data-skin="terminal"]) .sheet > header {
  color: #fff;
  background: radial-gradient(ellipse at 8% 15%, rgba(128, 47, 201, .52), transparent 64%),
              #39294f url("./winter-night.webp")
              center 58% / cover no-repeat !important;
  border-bottom: 1px solid #cbb9dd;
  box-shadow: 0 4px 15px rgba(55, 33, 84, .19);
}
:root[data-season="winter"]:not([data-skin="cyber"], [data-skin="terminal"]) :is(#hd, .sheet > header)::after { display: none; }
:root[data-season="winter"]:not([data-skin="cyber"], [data-skin="terminal"]) :is(#hd, .sheet > header) {
  overflow: visible;
  z-index: 4;
}
:root[data-season="winter"]:not([data-skin="cyber"], [data-skin="terminal"]) :is(#hd .hd-ic, .sheet > header .sh-bk, .sheet > header .sh-x) {
  background: rgba(20, 10, 38, .48);
  color: #fff;
  border-color: rgba(255, 255, 255, .24);
}
:root[data-season="winter"]:not([data-skin="cyber"], [data-skin="terminal"]) :is(body:not([data-sched-mode="table"]) #view, .sheet > header + *) {
  margin-top: 26px;
}
lumi-garland { display:none; }
:root[data-season="winter"]:not([data-skin="cyber"], [data-skin="terminal"]) lumi-garland {
  display:block; position:absolute; inset:0 0 -38px;
  pointer-events:none; max-width:none;
}
:root[data-season="winter"]:not([data-skin="cyber"], [data-skin="terminal"]) .sheet > header lumi-garland {
  inset:0 0 -28px;
}
lumi-garland canvas { position:absolute; inset:0; width:100%; height:100%; }
lumi-garland i {
  position:absolute; width:9px; height:19px; transform-origin:center top;
}
lumi-garland i::before {
  content:""; position:absolute; inset:2px -8px -5px;
  background:radial-gradient(ellipse, var(--lit), transparent 66%);
  opacity:.46;
}
lumi-garland i::after {
  content:""; position:absolute; inset:0;
  background:url("./winter-bulb.webp") center / contain no-repeat;
  filter:hue-rotate(var(--hue)) saturate(1.35) brightness(1.65)
    drop-shadow(0 1px 1px #202025);
}
@media (prefers-reduced-motion: no-preference) {
  :root:not([data-motion="off"]) lumi-garland i::before {
    animation:winter-lamp 4.6s ease-in-out var(--phase) infinite;
  }
}
@keyframes winter-lamp {
  0%,100% { opacity:.28; }
  50% { opacity:.84; }
}
:root[data-season="winter"] #hd .hd-sub { color: #f6eefb; opacity: 1; }
:root[data-season="winter"] .bg {
  background: radial-gradient(ellipse at 12% 90%, #9fc9f4, transparent 38%),
              radial-gradient(ellipse at 90% 16%, #d695ef, transparent 42%);
}
:root[data-season="winter"] nav {
  border-color: color-mix(in srgb, #bb9dcc 52%, var(--bg));
}
