html[data-holiday] body {
  background: var(--holiday-sky);
  background-attachment: fixed;
  background-size: 240% 240%;
  animation: holiday-drift 40s ease-in-out infinite alternate;
  color: var(--text);
}
@keyframes holiday-drift {
  0% { background-position: 0% 20%; }
  50% { background-position: 70% 60%; }
  100% { background-position: 100% 0%; }
}

body[data-holiday] #app,
body[data-holiday] .ide { position: relative; z-index: 1; }

body[data-holiday="newyear"] {
  --holiday-sky: radial-gradient(circle at 50% -10%, #263a5e 0%, #101b30 46%, #070b14 100%);
  --text: #fff8e1; --dim: #d8c8a0;
  --acc: #ffd166; --acc2: #86e3ff; --err: #ff7b72;
  --line: #3b3320; --card: rgba(16, 20, 32, .82);
  --holiday-inset: rgba(8, 12, 22, .75);
  --holiday-bar: linear-gradient(90deg, #1b2a47, #131f36 60%, #0d1626);
  --holiday-side: linear-gradient(180deg, #182742, #111c30);
  --holiday-side-text: #ffe9b0;
}

body[data-holiday="carnival"] {
  --holiday-sky: linear-gradient(150deg, #2a0f3d 0%, #4b1450 42%, #1b0f2e 100%);
  --text: #fff0fb; --dim: #d9b3d6;
  --acc: #ff4fa3; --acc2: #4de1ff; --err: #ff6b6b;
  --line: #5a2a63; --card: rgba(40, 12, 52, .80);
  --holiday-inset: rgba(24, 8, 34, .75);
  --holiday-bar: linear-gradient(90deg, #4a1450, #361043 60%, #24092e);
  --holiday-side: linear-gradient(180deg, #3d1148, #2a0c37);
  --holiday-side-text: #ffd8f4;
}

body[data-holiday="easter"] {
  --holiday-sky: linear-gradient(160deg, #e9fff0 0%, #fff9d9 46%, #ffe8f2 100%);
  --text: #234232; --dim: #52705c;
  --acc: #6fbf73; --acc2: #e88fb1; --err: #d9534f;
  --line: #cfe3cf; --card: rgba(255, 255, 255, .80);
  --holiday-inset: rgba(255, 255, 255, .72);
  --holiday-bar: linear-gradient(90deg, #d9f2d4, #eafbe4 60%, #f6ffe9);
  --holiday-side: linear-gradient(180deg, #e3f6dd, #eefbe6);
  --holiday-side-text: #2c4a36;
}

body[data-holiday="halloween"] {
  --holiday-sky: linear-gradient(165deg, #07070a 0%, #140c1d 45%, #0a0710 100%);
  --text: #f3e9ff; --dim: #b9a6cc;
  --acc: #ff8c1a; --acc2: #b76cff; --err: #ff5c5c;
  --line: #4a2b5e; --card: rgba(16, 10, 24, .85);
  --holiday-inset: rgba(10, 6, 16, .80);
  --holiday-bar: linear-gradient(90deg, #1e1029, #160c1f 60%, #0e0816);
  --holiday-side: linear-gradient(180deg, #1b0f26, #120a1b);
  --holiday-side-text: #e6d3ff;
}

body[data-holiday="christmas"] {
  --holiday-sky: linear-gradient(165deg, #031a12 0%, #0a2f22 45%, #06121f 100%);
  --text: #eafff2; --dim: #a9cbb8;
  --acc: #ffd98a; --acc2: #ff6b6b; --err: #ff8080;
  --line: #23543c; --card: rgba(6, 34, 26, .85);
  --holiday-inset: rgba(4, 24, 18, .80);
  --holiday-bar: linear-gradient(90deg, #0d3a2a, #092c20 60%, #07231a);
  --holiday-side: linear-gradient(180deg, #0b3325, #08261c);
  --holiday-side-text: #d8f5e3;
}

body[data-holiday] .card,
body[data-holiday] .modal { background: var(--card); border-color: var(--line); }
body[data-holiday] .modal-backdrop { background: rgba(2, 4, 8, .66); }
body[data-holiday] input,
body[data-holiday] .chatbox,
body[data-holiday] .hwrow,
body[data-holiday] .changelogbox,
body[data-holiday] .uncrow code,
body[data-holiday] .oshelp .cmdline,
body[data-holiday] .bar,
body[data-holiday] .chk,
body[data-holiday] .drop,
body[data-holiday] .newmenu-pop,
body[data-holiday] .btn:not(.primary):not(.update-btn) {
  background: var(--holiday-inset);
  color: var(--text);
}
body[data-holiday] .btn:not(.primary):not(.update-btn) { border-color: var(--line); }

body[data-holiday] .btn.danger:not(.primary):not(.update-btn) { color: var(--err); border-color: var(--err); background: none; }
body[data-holiday] .btn.ghost:not(.primary):not(.update-btn) { color: var(--dim); border-color: transparent; background: none; }
body[data-holiday] .btn.primary { background: var(--acc); border-color: var(--acc); color: #08130c; }
body[data-holiday] .chatfile { color: var(--acc); }
body[data-holiday] .chatfile:hover { color: var(--acc2); }
body[data-holiday] .dot { color: var(--acc); }

body[data-holiday="easter"] .namebtn:hover,
body[data-holiday="easter"] .namebtn:focus-visible,
body[data-holiday="easter"] .newmenu-item:hover,
body[data-holiday="easter"] .newmenu-item:focus-visible,
body[data-holiday="easter"] .drop.over,
body[data-holiday="easter"] #fs tr.isdir:hover td {
  background: rgba(255, 255, 255, .72);
}
body[data-holiday="easter"] .uncrow code,
body[data-holiday="easter"] input,
body[data-holiday="easter"] .chk { border-color: var(--line); }

body[data-holiday] .titlebar { background: var(--holiday-bar); border-bottom-color: rgba(0, 0, 0, .45); }
body[data-holiday] .sidebar { background: var(--holiday-side); border-right-color: rgba(0, 0, 0, .45); }
body[data-holiday] .tabs { background: var(--holiday-side); }
body[data-holiday] .brand,
body[data-holiday] .sidehead,
body[data-holiday] .sidetitle,
body[data-holiday] .tree .row,
body[data-holiday] .tree .row.dir .name { color: var(--holiday-side-text); }
body[data-holiday] .tree .row:hover { background: rgba(255, 255, 255, .08); }
body[data-holiday] .tree .row.active { background: rgba(255, 255, 255, .14); color: #fff; }
body[data-holiday] .statusbar { background: var(--holiday-bar); }
body[data-holiday] .sidebar .empty { color: var(--holiday-side-text); opacity: .7; }

body[data-holiday="easter"] .brand,
body[data-holiday="easter"] .sidehead,
body[data-holiday="easter"] .sidetitle,
body[data-holiday="easter"] .tree .row,
body[data-holiday="easter"] .tbtn,
body[data-holiday="easter"] .iconbtn,
body[data-holiday="easter"] .tab,
body[data-holiday="easter"] .statusbar { color: var(--holiday-side-text); }
body[data-holiday="easter"] .tbtn:hover,
body[data-holiday="easter"] .iconbtn:hover { background: rgba(0, 0, 0, .08); }
body[data-holiday="easter"] .tree .row:hover { background: rgba(0, 0, 0, .06); }
body[data-holiday="easter"] .tree .row.active { background: rgba(0, 0, 0, .12); color: #14251b; }
body[data-holiday="easter"] .tab { background: #dcefd6; }
body[data-holiday="easter"] .tab.active { background: #f7fbf3; color: #14251b; }

body[data-holiday="christmas"] .topbar,
body[data-holiday="christmas"] .titlebar { position: relative; padding-top: 7px; }
body[data-holiday="christmas"] .topbar::before,
body[data-holiday="christmas"] .titlebar::before {
  content: "";
  position: absolute; left: 0; right: 0; top: 0; height: 8px;
  pointer-events: none; z-index: 3;
  background-image:
    radial-gradient(circle at 6px 2px, #fff6cf 0 2.4px, rgba(255, 246, 207, 0) 3.2px),
    radial-gradient(circle at 6px 4px, rgba(255, 214, 102, .55) 0 4.6px, rgba(255, 214, 102, 0) 6.6px);
  background-size: 22px 9px;
  animation: holiday-lights 2.6s ease-in-out infinite alternate;
}
body[data-holiday="christmas"] .topbar::after,
body[data-holiday="christmas"] .titlebar::after {
  content: "";
  position: absolute; left: 0; right: 0; top: 3px; height: 1px;
  background: linear-gradient(90deg, #2f6b45, #63b47a, #2f6b45);
  pointer-events: none; z-index: 3;
}
@keyframes holiday-lights {
  from { filter: drop-shadow(0 0 3px rgba(255, 211, 107, .55)) brightness(.82); }
  to { filter: drop-shadow(0 0 9px rgba(255, 226, 150, .95)) brightness(1.25); }
}

.holiday-countdown {
  position: fixed; inset: 0; z-index: 35;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 20px; text-align: center; pointer-events: none;
}
.holiday-countdown .cd-panel {
  display: inline-flex; flex-direction: column; align-items: center;
  max-width: min(92vw, 560px); padding: 20px 34px 18px;
  border: 1px solid rgba(255, 209, 102, .38); border-radius: 18px;
  background: rgba(7, 12, 24, .82);
  box-shadow: 0 18px 60px rgba(0, 0, 0, .55), inset 0 0 40px rgba(120, 200, 255, .06);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.holiday-countdown .cd-label {
  font-size: .82rem; letter-spacing: .38em; text-transform: uppercase;
  color: #ffd98a; text-shadow: 0 0 12px rgba(255, 200, 90, .7);
}
.holiday-countdown .cd-time {
  margin: .12em 0;
  font: 800 clamp(2rem, 8.5vw, 4.1rem)/1.05 ui-monospace, SFMono-Regular, Consolas, monospace;
  letter-spacing: .05em; color: #ffffff;
  text-shadow: 0 0 18px rgba(255, 214, 120, .75), 0 0 48px rgba(120, 200, 255, .5);
  overflow-wrap: anywhere;
}
.holiday-countdown .cd-note {
  font-size: .68rem; letter-spacing: .24em; text-transform: uppercase; color: #d8c9a0;
}
.holiday-canvas {
  position: fixed; inset: 0; width: 100vw; height: 100vh;
  z-index: 45; pointer-events: none;
}
body[data-holiday="newyear"] .nameemoji.nl-emoji {
  display: inline-block; animation: holiday-emoji .9s ease-in-out infinite;
  filter: drop-shadow(0 0 6px rgba(255, 214, 102, .8));
}
@keyframes holiday-emoji {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.22); }
}

.holiday-floor {
  position: fixed; left: 0; right: 0; bottom: 0; height: 92px;
  z-index: 0; pointer-events: none; overflow: hidden;
}
.holiday-floor::before {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 56px;
  background:
    radial-gradient(ellipse at 50% 120%, rgba(111, 191, 115, .62), rgba(111, 191, 115, 0) 72%),
    repeating-linear-gradient(90deg, #6fbf73 0 2px, rgba(111, 191, 115, 0) 2px 8px);
  -webkit-mask-image: linear-gradient(transparent, #000 52%);
  mask-image: linear-gradient(transparent, #000 52%);
  animation: holiday-grass 5.5s ease-in-out infinite alternate;
  transform-origin: 50% 100%;
}
@keyframes holiday-grass {
  from { transform: scaleY(.94); }
  to { transform: scaleY(1.04); }
}
.holiday-floor .fg {
  position: absolute; bottom: 6px; line-height: 1;
  animation: holiday-flower var(--d, 3.6s) ease-in-out var(--delay, 0s) infinite alternate;
  transform-origin: 50% 100%;
}
@keyframes holiday-flower {
  from { transform: rotate(-5deg) translateY(0); }
  to { transform: rotate(5deg) translateY(-3px); }
}

.holiday-fog {
  position: fixed; left: -10%; right: -10%; bottom: -6vh; height: 48vh;
  z-index: 0; pointer-events: none;
}
.holiday-fog i {
  position: absolute; inset: 0; display: block; border-radius: 50%;
  filter: blur(14px); opacity: .55;
  background:
    radial-gradient(50% 60% at 25% 100%, rgba(160, 110, 255, .45), rgba(160, 110, 255, 0) 70%),
    radial-gradient(45% 55% at 72% 100%, rgba(255, 140, 26, .22), rgba(255, 140, 26, 0) 72%);
  animation: holiday-fogmove 22s ease-in-out infinite alternate;
}
.holiday-fog i:nth-child(2) { animation-duration: 31s; animation-direction: alternate-reverse; opacity: .4; }
.holiday-fog i:nth-child(3) { animation-duration: 17s; opacity: .3; }
@keyframes holiday-fogmove {
  from { transform: translate3d(-6%, 4%, 0) scale(1.05); }
  to { transform: translate3d(6%, -3%, 0) scale(1.18); }
}
.hl-bat {
  position: fixed; top: var(--y); left: -8vw; font-size: var(--s);
  z-index: 0; pointer-events: none; opacity: 0;
  animation: holiday-bat var(--d) linear forwards;
}
@keyframes holiday-bat {
  0% { transform: translate3d(0, 0, 0) rotate(0deg); opacity: 0; }
  12% { opacity: .9; }
  50% { transform: translate3d(55vw, -5vh, 0) rotate(-9deg); }
  100% { transform: translate3d(116vw, 4vh, 0) rotate(7deg); opacity: 0; }
}
.hl-mask {
  position: fixed; left: var(--x); top: var(--y); z-index: 4;
  font-size: 52px; pointer-events: none; opacity: 0;
  filter: drop-shadow(0 0 16px rgba(183, 108, 255, .8));
  animation: holiday-mask 2.4s ease-out forwards;
}
@keyframes holiday-mask {
  0% { opacity: 0; transform: scale(.4) rotate(var(--r)); }
  18% { opacity: 1; transform: scale(1.18) rotate(var(--r)); }
  60% { opacity: .95; transform: scale(1) rotate(var(--r)); }
  100% { opacity: 0; transform: scale(.8) translateY(-16px) rotate(var(--r)); }
}

@media (prefers-reduced-motion: reduce) {
  html[data-holiday] body { animation: none !important; }
  .holiday-floor::before,
  .holiday-floor .fg,
  .holiday-fog i,
  .hl-bat,
  .hl-mask,
  body[data-holiday="christmas"] .topbar::before,
  body[data-holiday="christmas"] .titlebar::before { animation: none !important; }
  .holiday-canvas { display: none; }
}

.hl-ribbon {
  position: absolute; top: -20vh; left: var(--x);
  width: 5px; height: var(--h); border-radius: 4px;
  background: linear-gradient(180deg, var(--c), rgba(255, 255, 255, 0));
  opacity: 0; pointer-events: none;
  animation: holiday-ribbon var(--d) linear var(--delay) infinite;
}
@keyframes holiday-ribbon {
  0% { transform: translate3d(0, -20vh, 0) rotate(8deg); opacity: 0; }
  10% { opacity: .85; }
  50% { transform: translate3d(30px, 55vh, 0) rotate(-14deg); }
  100% { transform: translate3d(-20px, 115vh, 0) rotate(20deg); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .hl-ribbon { animation: none !important; display: none; }
}

body[data-holiday="halloween"] .btn.primary {
  background: var(--acc);
  border-color: var(--acc);
  color: #1a0d00;
  box-shadow: 0 0 14px rgba(255, 140, 26, .55);
}
body[data-holiday="halloween"] .btn.primary:hover {
  box-shadow: 0 0 20px rgba(255, 163, 64, .8);
}
body[data-holiday="halloween"] .card,
body[data-holiday="halloween"] .modal {
  border-color: #59306f;
  box-shadow: 0 0 26px rgba(183, 108, 255, .12);
}
body[data-holiday="halloween"] .topbar,
body[data-holiday="halloween"] .titlebar { box-shadow: 0 1px 0 rgba(183, 108, 255, .35); }
