/* Seasonal ambience only. Primary crimson, logo, cursor and anime art stay fixed. */
:root{--season-light:#a88ae9;--season-surface:#1b1829;--season-rgb:168,138,233}
:root[data-theme=christmas]{--season-light:#e5efff;--season-surface:#22374b;--season-rgb:165,206,255}
:root[data-theme=newyear]{--season-light:#ffdb88;--season-surface:#45351d;--season-rgb:255,213,123}
:root[data-theme=sakura]{--season-light:#f6b4da;--season-surface:#42283f;--season-rgb:246,154,204}
:root[data-theme=diwali]{--season-light:#ffb85c;--season-surface:#493321;--season-rgb:255,179,86}
:root[data-theme=halloween]{--season-light:#ff9856;--season-surface:#40262a;--season-rgb:255,128,70}
:root[data-theme=lunar]{--season-light:#ffd17b;--season-surface:#48232d;--season-rgb:238,106,81}
:root[data-theme=eid]{--season-light:#83dfbf;--season-surface:#203e36;--season-rgb:111,213,180}
html[data-theme]:not([data-theme=default]) body:not([data-page=watch]){background-image:radial-gradient(ellipse at 92% 0%,rgba(var(--season-rgb),.13),transparent 45%),radial-gradient(ellipse at 0% 65%,rgba(var(--season-rgb),.055),transparent 48%);background-attachment:fixed}
html[data-theme]:not([data-theme=default]) .mast{box-shadow:inset 0 2px var(--season-light),0 5px 24px rgba(var(--season-rgb),.12)}
html[data-theme]:not([data-theme=default]) .mast .festive-trigger{color:var(--season-light);border-color:var(--season-light);background:var(--season-surface)}
html[data-theme]:not([data-theme=default]) body:not([data-page=watch]) :is(.profile-card,.mascot-callout,.anime-note,.empty-collection){background-image:linear-gradient(120deg,var(--season-surface),#171422 75%);border-color:rgba(var(--season-rgb),.32)}
.season-particles{position:fixed;inset:0;pointer-events:none;z-index:100;overflow:hidden;contain:strict}
.season-particles i{position:absolute;top:-20px;left:var(--x);width:var(--s);height:var(--s);border-radius:50%;background:var(--season-light);opacity:.52;box-shadow:0 0 7px rgba(var(--season-rgb),.55);animation:festival-fall var(--d) var(--delay) linear infinite}
@keyframes festival-fall{to{transform:translate(var(--drift),calc(100dvh + 40px)) rotate(var(--turn))}}
html[data-theme=christmas] .season-particles i{background:#fff;opacity:.7}
html[data-theme=sakura] .season-particles i{width:calc(var(--s)*1.5);height:var(--s);border-radius:80% 15% 70% 20%;background:#f6b4da}
html[data-theme=newyear] .season-particles i{border-radius:1px;width:calc(var(--s)*.65);height:calc(var(--s)*1.7)}
html[data-theme=newyear] .season-particles i:nth-child(3n){background:#f2c9ff}
html[data-theme=lunar] .season-particles i:nth-child(2n){background:#ff4659}
html[data-theme=diwali] .season-particles i,html[data-theme=eid] .season-particles i{animation-name:festival-rise;top:auto;bottom:-20px}
@keyframes festival-rise{to{transform:translate(var(--drift),calc(-100dvh - 40px)) rotate(var(--turn))}}
body[data-page=watch] .season-particles{display:none!important}
.theme-dialog{box-sizing:border-box;width:min(760px,calc(100% - 24px));max-height:calc(100dvh - 28px);overflow:auto;padding:clamp(16px,3vw,28px);color:var(--ink);background:#1b1829;border:1px solid #544467;border-radius:19px;box-shadow:0 24px 80px #000a;overscroll-behavior:contain}
.theme-dialog::backdrop{background:#090711c9;backdrop-filter:blur(5px)}
.theme-head{display:flex;justify-content:space-between;gap:12px;align-items:flex-start;margin-bottom:20px}.theme-head h2{font-size:clamp(24px,4vw,34px);margin:6px 0;letter-spacing:-.04em}.theme-head p:not(.eyebrow),.theme-foot p{font-size:13px;color:var(--dim)}.theme-close{width:38px;height:38px;flex:none;display:grid;place-items:center;background:#282237;border:1px solid #51435f;border-radius:9px}
.theme-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;border:0;padding:0;margin:0;min-width:0}.theme-option{display:flex;flex-direction:column;gap:5px;position:relative;min-width:0;padding:9px;background:#14111f;border:1px solid #463b55;border-radius:11px;cursor:pointer}.theme-option:has(input:checked){border-color:#ff4659;box-shadow:inset 0 0 0 1px #ff4659;background:#251b2a}.theme-option:has(input:focus-visible){outline:2px solid #f5f3ff;outline-offset:2px}.theme-option input{position:absolute;top:15px;right:15px;z-index:1;accent-color:#c52d43;margin:0;width:17px;height:17px}.theme-preview{height:66px;position:relative;overflow:hidden;border-radius:7px;background:radial-gradient(ellipse at 75% 25%,var(--sample-b),#100f18 80%);border:1px solid #ffffff1f}.theme-preview i{position:absolute;width:6px;height:6px;border-radius:50%;background:var(--sample-a);box-shadow:0 0 10px var(--sample-a);top:15%;left:22%}.theme-preview i:nth-child(2){top:55%;left:65%;width:4px;height:4px}.theme-preview i:nth-child(3){top:34%;left:47%;width:8px;height:8px}.theme-preview b{position:absolute;height:3px;background:#ff4659;bottom:12px;left:12px;width:36%;border-radius:2px}.theme-preview[data-sample=sakura] i{border-radius:80% 15% 70% 20%;transform:rotate(35deg);width:10px}.theme-preview[data-sample=newyear] i{border-radius:0;transform:rotate(35deg)}.theme-preview[data-sample=default] i{display:none}.theme-name{font-size:13px;font-weight:700;line-height:1.35}.theme-option small{font-size:11px;line-height:1.4;color:var(--dim)}.theme-foot{display:grid;gap:10px;margin-top:20px}.theme-effects{display:flex;gap:9px;align-items:center;font-size:14px}.theme-effects input{accent-color:#c52d43;width:17px;height:17px}.theme-foot .button{justify-self:end;min-width:112px}.theme-dialog .button.primary{background:#c52d43;color:white;border-color:#ff4659}.theme-dialog .button.primary:hover{background:#a72137}.setting-row:has([data-open-themes]){flex-wrap:wrap}
@media(max-width:650px){.theme-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.theme-preview{height:52px}.theme-foot .button{width:100%}}
@media(prefers-reduced-motion:reduce){.season-particles{display:none!important}.season-particles i{animation:none!important}}

/* Layered, sixfold ice crystals plus distant powder snow. */
html[data-theme=christmas] .season-particles i{top:-32px;box-shadow:none;opacity:var(--alpha);animation-name:crystal-fall;will-change:transform}
html[data-theme=christmas] .season-particles .snow-crystal{background:var(--flake) center/contain no-repeat;border-radius:0;filter:drop-shadow(0 0 2px #b7d9ff55)}
html[data-theme=christmas] .season-particles .snow-grain{background:radial-gradient(circle,#fff 20%,#eaf4ffad 50%,transparent 76%);filter:blur(.35px)}
@keyframes crystal-fall{0%{transform:translate(0,0) rotate(0)}35%{transform:translate(calc(var(--drift)*.7),35dvh) rotate(calc(var(--turn)*.35))}68%{transform:translate(calc(var(--drift)*.25),68dvh) rotate(calc(var(--turn)*.68))}100%{transform:translate(var(--drift),calc(100dvh + 64px)) rotate(var(--turn))}}
.theme-preview[data-sample=christmas] i{width:16px;height:16px;background:url(assets/snow-crystal-1.svg) center/contain no-repeat;box-shadow:none;border-radius:0}.theme-preview[data-sample=christmas] i:nth-child(2){width:10px;height:10px}.theme-preview[data-sample=christmas] i:nth-child(3){width:12px;height:12px}

/* Independent viewport canvas. No layout changes or GPU-heavy particle filters. */
.season-canvas{position:fixed;inset:0 0 auto;width:100%;height:100vh;max-width:none;pointer-events:none;z-index:85;contain:strict;display:block}.season-canvas[hidden],.season-decoration[hidden],body[data-page=watch] :is(.season-decoration,.season-canvas){display:none!important}
.season-decoration{position:fixed;inset:0;z-index:3;pointer-events:none;overflow:hidden;contain:strict}.season-decoration i{position:absolute;top:76px;width:clamp(92px,13vw,188px);aspect-ratio:1.35;background-size:contain;background-repeat:no-repeat;opacity:.72}.season-decoration i:first-child{left:0;background-position:top left}.season-decoration i:last-child{right:0;background-position:top right}
.season-decoration[data-kind=christmas] i:first-child{background-image:url(assets/festivals/christmas-left.webp)}.season-decoration[data-kind=christmas] i:last-child{background-image:url(assets/festivals/christmas-right.webp)}.theme-preview[data-sample=christmas]{background-image:url(assets/festivals/christmas-right.webp),linear-gradient(130deg,var(--sample-b),#13101e);background-size:auto 120%,cover;background-repeat:no-repeat;background-position:right top}
.season-decoration[data-kind=halloween] i:first-child{background-image:url(assets/festivals/halloween-left.webp)}.season-decoration[data-kind=halloween] i:last-child{background-image:url(assets/festivals/halloween-right.webp)}.theme-preview[data-sample=halloween]{background-image:url(assets/festivals/halloween-right.webp),linear-gradient(130deg,var(--sample-b),#13101e);background-size:auto 120%,cover;background-repeat:no-repeat;background-position:right top}
.season-decoration[data-kind=sakura] i:first-child{background-image:url(assets/festivals/sakura-left.webp)}.season-decoration[data-kind=sakura] i:last-child{background-image:url(assets/festivals/sakura-right.webp)}.theme-preview[data-sample=sakura]{background-image:url(assets/festivals/sakura-right.webp),linear-gradient(130deg,var(--sample-b),#13101e);background-size:auto 120%,cover;background-repeat:no-repeat;background-position:right top}

.season-decoration[data-kind=christmas]::before,.season-decoration[data-kind=newyear]::before,.season-decoration[data-kind=lunar]::before,.season-decoration[data-kind=diwali]::before,.season-decoration[data-kind=eid]::before{content:"";position:absolute;top:0;left:0;right:0;height:3px;background:repeating-linear-gradient(90deg,transparent 0 21px,var(--season-light) 22px 26px,transparent 27px 39px);opacity:.7;box-shadow:0 1px 12px rgba(var(--season-rgb),.36)}
.season-decoration[data-kind=diwali] i,.season-decoration[data-kind=lunar] i,.season-decoration[data-kind=eid] i,.season-decoration[data-kind=newyear] i{width:48px;height:52px;opacity:.72;top:80px}.season-decoration[data-kind=diwali] i{background-image:url(assets/festivals/diya.png)}.season-decoration[data-kind=lunar] i{background-image:url(assets/festivals/lantern.png)}.season-decoration[data-kind=eid] i{background-image:url(assets/festivals/eid-lantern.png)}.season-decoration[data-kind=newyear] i{background-image:url(assets/festivals/star.png)}
.theme-preview[data-sample=sakura] i{background:url(assets/festivals/petal.png) center/contain no-repeat;width:16px;height:16px;box-shadow:none;border-radius:0}.theme-preview[data-sample=halloween] i{background:url(assets/festivals/bat.png) center/contain no-repeat;width:18px;height:14px;box-shadow:none;border-radius:0}
@media(max-width:1024px){.season-decoration i{top:118px;width:clamp(54px,11vw,110px);opacity:.58}.season-decoration[data-kind=diwali] i,.season-decoration[data-kind=lunar] i,.season-decoration[data-kind=eid] i,.season-decoration[data-kind=newyear] i{top:118px;width:30px;height:34px}html[data-theme]:not([data-theme=default]) body:not([data-page=watch]){background-attachment:scroll}}@media(max-width:480px){.season-decoration i{width:58px;opacity:.55}}@media(prefers-reduced-motion:reduce){.season-canvas{display:none!important}}

/* Keep the festive artwork below the real header, including mobile shortcut rows. */
.season-decoration i,.season-decoration[data-kind] i{top:var(--season-edge,76px)}
@media(max-width:720px){.season-decoration[data-kind=christmas] i,.season-decoration[data-kind=halloween] i,.season-decoration[data-kind=sakura] i{width:clamp(72px,21vw,110px);opacity:.78}}
