/* DEV New Year layer. Every rule is gated by the seasonal attribute. */
html[data-season="newyear"] { --ny-gold: #e9c58e; --ny-snow: #e8f7ff; --ny-ink: #061320; }
html[data-season="newyear"] body { background: #050d16; }
html[data-season="newyear"] .app-shell { background: radial-gradient(ellipse 120% 400px at 75% 0, #144a6633, transparent), #0b121b; }
html[data-season="newyear"] .club-wordmark { color: #bdd8e7; }
html[data-season="newyear"] .club-wordmark-line { background: linear-gradient(90deg, transparent, #e5c79388, transparent); }
html[data-season="newyear"] .topbar { position: relative; }
html[data-season="newyear"] .tabs { border-top-color: #b8d4dd4d; background: linear-gradient(0deg,#0d1926fa,#122535f5); box-shadow: 0 -8px 35px #07203348; }
html[data-season="newyear"] .tabs .is-active { box-shadow: inset 0 1px #d2edff18; }

/* Readable live copy stays above the art and decorative snow. */
html[data-season="newyear"] .ny-hero { position: relative; isolation: isolate; min-height: 0; margin: 4px 0 24px; overflow: hidden; border-radius: 24px; border: 1px solid #8db8c95e; background: #061727; box-shadow: 0 16px 32px #02071366, inset 0 1px #effaff1a; }
html[data-season="newyear"] .ny-hero-art { position: absolute; inset: 0; z-index: -3; width: 100%; height: 100%; object-fit: cover; object-position: 68% center; }
html[data-season="newyear"] .ny-hero::before { content: ""; position: absolute; inset: 0; z-index: -2; background: linear-gradient(90deg,#03101ce8 0%,#03101c99 40%,#03101c12 74%),linear-gradient(0deg,#04101c99,transparent 35%); }
html[data-season="newyear"] .ny-hero-copy { position: relative; z-index: 2; padding: 23px 20px 12px; }
html[data-season="newyear"] .ny-eyebrow { display: block; margin: 0 0 14px; font-size: 8px; line-height: 1.6; font-weight: 700; letter-spacing: .13em; color: var(--ny-gold); }
html[data-season="newyear"] .ny-hero h2 { margin: 0; font-size: clamp(32px,9vw,42px); line-height: 1.02; font-weight: 760; letter-spacing: -.045em; color: #f0f8ff; text-shadow: 0 3px 20px #00101c; }
html[data-season="newyear"] .ny-hero h2 em { font-style: normal; color: #ccecff; }
html[data-season="newyear"] .ny-hero-sub { margin: 13px 0 0; font-size: 12px; line-height: 1.55; color: #c2d4df; text-shadow: 0 2px 9px #00101c; }
html[data-season="newyear"] .ny-card:focus-visible { outline: 2px solid #f1d7ac; outline-offset: 3px; }
html[data-season="newyear"] .ny-hero-warmth { position: absolute; inset: 0 0 0 43%; z-index: -1; background: radial-gradient(ellipse at 76% 45%,#ffbf5740,transparent 68%); opacity: .85; pointer-events: none; }


html[data-season="newyear"] .ny-card { position: relative; isolation: isolate; display: block; width: 100%; min-height: 192px; margin-bottom: 23px; border: 1px solid #9fbdbb63; border-radius: 21px; overflow: hidden; color: #e8f6ff; background: #0a1623; text-decoration: none; }
html[data-season="newyear"] .ny-card::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: linear-gradient(90deg,#061322da,#06132256 46%,transparent 73%); }
html[data-season="newyear"] .ny-card-art { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; object-fit: cover; object-position: 65% center; }
html[data-season="newyear"] .ny-card-copy { position: relative; padding: 23px 20px; width: 68%; z-index: 1; text-shadow: 0 2px 12px #05111f; }
html[data-season="newyear"] .ny-card-copy :is(strong,h3) { display: block; margin: 0; font-size: 26px; line-height: 1.07; letter-spacing: -.035em; font-weight: 750; }
html[data-season="newyear"] .ny-card .ny-eyebrow { margin-bottom: 10px; }
html[data-season="newyear"] .ny-card-detail { display: block; margin: 14px 0 0; font-size: 11px; line-height: 1.6; color: #bed3e0; }
html[data-season="newyear"] .ny-card-arrow { position: absolute; right: 14px; bottom: 14px; display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid #d5ceae6e; border-radius: 50%; color: #e5f5ff; background: #061c2fb0; }
html[data-season="newyear"] .ny-card-arrow svg { width: 18px; height: 18px; }
html[data-season="newyear"] .ny-trainer { cursor: pointer; }
html[data-season="newyear"] .ny-teams { min-height: 218px; }
html[data-season="newyear"] .ny-teams .ny-card-art { object-position: 64% center; }
html[data-season="newyear"] .ny-teams .ny-card-copy { padding-top: 28px; }
html[data-season="newyear"] :is(.clan-own,.clan-hero) { border-color: #a4c8da61; background: linear-gradient(100deg,#132c3ded,#071726b3),url('./assets/newyear/forest-v1.webp') center 64% / cover; }

/* Seasonal default covers; custom uploaded art is retained. */
/* A background underneath uploaded art also covers unavailable DEV snapshot images. */
html[data-season="newyear"] .event-card:not([style*="--ny-card-bg"]) { background: linear-gradient(90deg,#051422df,#0514225e 55%,#05142210),var(--card-bg,none) center / cover no-repeat,url('./assets/newyear/cards-v1.webp') 65% center / cover no-repeat,#061725; }
html[data-season="newyear"] .event-card[style*="--ny-card-bg"] { background: linear-gradient(90deg,#051422df,#0514225e 55%,#05142210),var(--ny-card-bg) 65% center / cover no-repeat,#061725; border-color: #88c5df80; }
html[data-season="newyear"] .event-card[style*="--ny-card-bg"]::before { background: linear-gradient(0deg,#030d18b3,transparent 65%); }
html[data-season="newyear"] .event-card[style*="--ny-card-bg"]::after { border-color: #b2e5f280; box-shadow: inset 0 0 14px #9fd7ed22; animation: none; }
html[data-season="newyear"] .event-card .event-copy { text-shadow: 0 2px 10px #000a; }
html[data-season="newyear"] .event-card .meta-chip { background: #061625d1; border-color: #a9d7e85c; }
html[data-season="newyear"] .event-card .event-kicker { color: #c4e4f2; }
html[data-season="newyear"] .ny-empty { background: linear-gradient(90deg,#051422f0,#05142266),url('./assets/newyear/cards-v1.webp') 65% center / cover!important; }

html[data-season="newyear"] .rating-showcase-panel { border-color: #8cb9cf69; }
html[data-season="newyear"] .rating-showcase-panel[data-sky="aurora"]::before { background: linear-gradient(180deg,#06132180,transparent 30%,#06132199),url('./assets/newyear/forest-v1.webp') center 68% / cover; }
html[data-season="newyear"] .rating-podium-card { border-color: #adceda88; }
html[data-season="newyear"] .rating-podium-card.is-first { box-shadow: 0 14px 35px #08132888,0 0 20px #e8c99620,inset 0 1px #fce5b650; }
html[data-season="newyear"] .rating-podium-card.is-first .rating-podium-score { color: #f2d09e; }
/* A seasonal backdrop only for profiles without an equipped background. */
html[data-season="newyear"] .profile-showcase.ny-profile { margin: 0 -4px 18px; padding: 23px 12px 5px; border: 1px solid #88bed14f; border-radius: 24px; background: linear-gradient(180deg,#0413211a,#06132066),url('./assets/newyear/forest-v1.webp') center 60% / cover; }
html[data-season="newyear"] .ny-profile .profile-scoreboard { background: #0c2334eb; border-color: #a9d3e75e; }
html[data-season="newyear"] .ny-profile .profile-identity { background: transparent; }

/* Snow is decorative, never captures input, and pauses when hidden/reduced. */
html[data-season="newyear"] .ny-snow { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
html[data-season="newyear"] .ny-snow i { position: absolute; left: var(--x); top: -8%; width: var(--size); height: var(--size); border-radius: 50%; background: #e5f5ff; opacity: 0; animation: ny-snowfall var(--duration) var(--delay) linear infinite; }
html[data-season="newyear"] .ny-app-snow { position: fixed; inset: 0; z-index: 8; width: min(100%,480px); margin: auto; pointer-events: none; user-select: none; opacity: .9; -webkit-mask-image: linear-gradient(180deg,transparent,#000 10%,#000 79%,transparent 94%); mask-image: linear-gradient(180deg,transparent,#000 10%,#000 79%,transparent 94%); }
html[data-season="newyear"] .ny-app-snow .ny-snow i { animation-name: ny-edge-fall; }
html[data-season="newyear"] .ny-app-snow .ny-snow i:nth-child(4n) { filter: blur(.65px); }
/* The loader covers these layers itself. Keep them painted underneath its fade. */
html[data-season="newyear"]:not([data-ny-decor="true"]) :is(.ny-app-snow,.ny-hanging-ornament,.ny-header-garland) { display: none; }
html[data-season="newyear"] .ny-launch-snow { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
html[data-season="newyear"] .launch-screen { background: #061321; }
html[data-season="newyear"] .launch-sky { background: url('./assets/newyear/forest-v1.webp') center center / cover; opacity: 1; inset: 0; animation: none; }
html[data-season="newyear"] .launch-screen::before { background: linear-gradient(180deg,#03122000,#04131f40 62%,#04131fa0); }
html[data-season="newyear"] .launch-brand { z-index: 1; }
html[data-season="newyear"] .ny-launch-label { margin: 0 0 26px; color: #ebd1aa; letter-spacing: .22em; font-size: 9px; font-weight: 650; }
html[data-season="newyear"] .launch-sub { color: #b8d2e1; }
html[data-season="newyear"] .launch-horizon { background: linear-gradient(90deg,transparent,#d2b88577,transparent); }
html[data-season="newyear"] .launch-bottom { z-index: 2; }
html[data-season="newyear"] .launch-loader::after { background: linear-gradient(90deg,transparent,#f0d3a4,transparent); }
@keyframes ny-snowfall { 0%{opacity:0;transform:translate3d(0,0,0)} 12%{opacity:.55} 85%{opacity:.4} 100%{opacity:0;transform:translate3d(var(--drift),340px,0)} }
@keyframes ny-edge-fall { 0%{opacity:0;transform:translate3d(0,0,0)} 12%{opacity:.5} 85%{opacity:.38} 100%{opacity:0;transform:translate3d(var(--drift),100vh,0)} }

html[data-season="newyear"][data-season-motion="paused"] :is(.ny-snow i,.ny-hero-warmth,.ny-ornament-rig,.ny-garland-bulb) { animation-play-state: paused; }
@media (min-width:650px) { html[data-season="newyear"] .ny-hero { min-height:0; } html[data-season="newyear"] .ny-hero-copy { padding:26px 28px 14px; } html[data-season="newyear"] .ny-hero-art { object-position:center; } }
@media (max-width:350px) { html[data-season="newyear"] .ny-hero-copy { padding-inline:16px; } html[data-season="newyear"] .ny-eyebrow { font-size:7px; letter-spacing:.1em; } html[data-season="newyear"] .ny-hero h2 { font-size:32px; } html[data-season="newyear"] .ny-card-copy { padding-inline:16px; } html[data-season="newyear"] .ny-card-copy :is(strong,h3) { font-size:23px; } }
@media (max-height:540px) { html[data-season="newyear"] .ny-launch-label { margin-bottom:12px; font-size:8px; } }
@media (prefers-reduced-motion:reduce) { html[data-season="newyear"] .ny-snow { display:none; } html[data-season="newyear"] .ny-hero-warmth { animation:none!important; transition:none; } }

/* Three satin-blue club ornaments hang at staggered heights in the header. */
html[data-season="newyear"] .ny-hanging-ornament { position: absolute; top: 0; left: 0; right: 0; height: 108px; z-index: 12; width: min(100%,480px); margin: 0 auto; pointer-events: none; user-select: none; }
html[data-season="newyear"] .ny-ornament-rig { --ny-thread: 45px; --ny-ball: 22px; position: absolute; top: 0; left: calc(36% - 11px); width: var(--ny-ball); height: calc(var(--ny-thread) + var(--ny-ball) + 5px); transform-origin: 50% 0; animation: ny-ornament-sway 7s ease-in-out infinite alternate; }
html[data-season="newyear"] .ny-ornament-rig.is-middle { --ny-thread: 69px; --ny-ball: 26px; left: calc(50% - 13px); animation-duration: 8.3s; animation-delay: -2.8s; }
html[data-season="newyear"] .ny-ornament-rig.is-right { --ny-thread: 44px; left: calc(63% - 11px); animation-duration: 7.6s; animation-delay: -4s; }
html[data-season="newyear"] .ny-ornament-thread { position: absolute; top: 0; left: calc(50% - .5px); width: 1px; height: var(--ny-thread); background: linear-gradient(#e1c69780,#b6d5e8b3); }
html[data-season="newyear"] .ny-ornament-cap { position: absolute; top: calc(var(--ny-thread) - 1px); left: calc(50% - 3px); width: 6px; height: 4px; border: 1px solid #c6ae7c; border-radius: 2px 2px 1px 1px; background: repeating-linear-gradient(90deg,#a89266 0 1px,#e0c996 1px 3px); }
html[data-season="newyear"] .ny-ornament-ball { position: absolute; top: calc(var(--ny-thread) + 3px); left: 0; display: grid; place-items: center; width: var(--ny-ball); height: var(--ny-ball); border-radius: 50%; border: 1px solid #82bbd885; background: radial-gradient(ellipse at 32% 24%,#3c7192,#173e5e 50%,#0b233c 85%); box-shadow: inset -2px -3px 6px #04112080,0 3px 7px #0005; }
html[data-season="newyear"] .ny-ornament-ball img { display: block; width: calc(var(--ny-ball) - 2px); height: calc(var(--ny-ball) - 2px); object-fit: contain; mix-blend-mode: screen; opacity: .94; }
@keyframes ny-ornament-sway { from { transform: rotate(-2.5deg); } to { transform: rotate(2.5deg); } }

/* Warm lights with a few ice-blue accents; slow, staggered fades, never flashes. */
html[data-season="newyear"] .ny-header-garland { position: absolute; top: 0; left: 0; right: 0; width: min(100%,480px); height: 20px; margin: 0 auto; z-index: 13; pointer-events: none; user-select: none; }
html[data-season="newyear"] .ny-header-garland svg { display: block; width: 100%; height: 100%; overflow: visible; }
html[data-season="newyear"] .ny-garland-lamp { position: absolute; width: 0; height: 0; transform: rotate(var(--ny-tilt)); }
html[data-season="newyear"] .ny-garland-socket { position: absolute; left: -1.5px; top: 0; width: 3px; height: 2.5px; border-radius: .7px; background: #81918a; }
html[data-season="newyear"] .ny-garland-bulb { position: absolute; top: -4px; left: -8px; width: 16px; height: 18px; background: url('./assets/newyear/garland-warm-v1.svg') center / 100% 100% no-repeat; opacity: .85; will-change: opacity; animation: ny-garland-twinkle var(--ny-twinkle,4s) var(--ny-phase,0s) ease-in-out infinite; }
html[data-season="newyear"] .ny-garland-bulb.is-ice { background-image: url('./assets/newyear/garland-ice-v1.svg'); }
html[data-season="newyear"] .profile-metrics { position: relative; }
html[data-season="newyear"] .ny-profile-garland { position: absolute; inset: 0; border: 1px solid #9aa99380; border-radius: inherit; z-index: 4; pointer-events: none; user-select: none; }
html[data-season="newyear"] .ny-profile-lamp { position: absolute; width: 0; height: 0; }
html[data-season="newyear"] .ny-profile-lamp .ny-garland-bulb { top: -8px; }
@keyframes ny-garland-twinkle { 0%,100% { opacity: .5; } 45%,60% { opacity: 1; } }
@media (prefers-reduced-motion:reduce) { html[data-season="newyear"] .ny-garland-bulb { animation: none; opacity: .8; } }

/* Real powder texture rests ABOVE the card rim, with a small contact overlap. */
html[data-season="newyear"] { --ny-drift-art: url('./assets/newyear/snow-drift-v2.webp'); }
html[data-season="newyear"] .ny-snow-host:not(.rating-podium-card) { position: relative; }
html[data-season="newyear"] .ny-snow-host { overflow: visible; }
html[data-season="newyear"] :is(.ny-hero-art,.ny-hero-warmth,.ny-card-art),
html[data-season="newyear"] .ny-hero::before,
html[data-season="newyear"] .ny-card::after,
html[data-season="newyear"] .event-card::before,
html[data-season="newyear"] .event-card::after { border-radius: inherit; }
html[data-season="newyear"] .ny-hero > .ny-snow { border-radius: inherit; }
html[data-season="newyear"] .profile-score-hero { border-radius: 15px 15px 0 0; }
html[data-season="newyear"] .profile-metrics { border-radius: 0 0 15px 15px; }
html[data-season="newyear"] .event-carousel { padding-top: 16px; margin-top: -16px; border-radius: 0 0 20px 20px; }
/* The anchor is the OUTER rim, independent of the card's border thickness.
   The artwork's opaque foot is at ~85% height; compensate per drift height,
   including the smaller right-hand drifts, instead of sinking the whole image. */
html[data-season="newyear"] .ny-snow-host { --ny-rim-width: 1px; }
html[data-season="newyear"] .profile-showcase.has-profile-background { --ny-rim-width: 0px; }
html[data-season="newyear"] .rating-podium-card { --ny-rim-width: 2px; }
html[data-season="newyear"] .ny-snow-host > .ny-snowcap {
  --ny-cap-height: 15px;
  position: absolute;
  top: calc(1px - var(--ny-rim-width));
  left: 20px;
  right: 20px;
  height: 0;
  z-index: 7;
  display: block;
  margin: 0;
  padding: 0;
  border: 0;
  pointer-events: none;
  user-select: none;
  color: transparent;
}
/* Keep powder on the straight rim, clear of the rounded corners. */
html[data-season="newyear"] :is(.ny-hero,.ny-card,.profile-showcase,.empty-hero,.clan-own,.clan-hero) > .ny-snowcap { left: 26px; right: 26px; }
html[data-season="newyear"] .ny-snowcap::before,
html[data-season="newyear"] .ny-snowcap::after {
  --ny-drift-height: var(--ny-cap-height);
  content: "";
  position: absolute;
  bottom: calc(var(--ny-drift-height) * -.15);
  height: var(--ny-drift-height);
  width: 43%;
  max-width: 165px;
  background: var(--ny-drift-art) center bottom / 100% 100% no-repeat;
  filter: drop-shadow(0 .5px .6px #03132655);
}
html[data-season="newyear"] .ny-snowcap::before { left: 0; }
html[data-season="newyear"] .ny-snowcap::after { --ny-drift-height: calc(var(--ny-cap-height) * .7); right: 0; width: 25%; max-width: 100px; transform: scaleX(-1); }
html[data-season="newyear"] [data-ny-drift="1"] > .ny-snowcap::before { --ny-drift-height: calc(var(--ny-cap-height) * .78); width: 29%; }
html[data-season="newyear"] [data-ny-drift="1"] > .ny-snowcap::after { --ny-drift-height: calc(var(--ny-cap-height) * .95); width: 39%; max-width: 145px; }
html[data-season="newyear"] [data-ny-drift="2"] > .ny-snowcap::before { --ny-drift-height: calc(var(--ny-cap-height) * .9); width: 48%; max-width: 175px; transform: scaleX(-1); }
html[data-season="newyear"] [data-ny-drift="2"] > .ny-snowcap::after { --ny-drift-height: calc(var(--ny-cap-height) * .6); width: 20%; }
html[data-season="newyear"] :is(.profile-menu,.profile-clan) > .ny-snowcap { --ny-cap-height: 8px; left: 20px; right: 20px; }
html[data-season="newyear"] :is(.profile-menu,.profile-clan) > .ny-snowcap::before { width: 25%; max-width: 80px; }
html[data-season="newyear"] :is(.profile-menu,.profile-clan) > .ny-snowcap::after { width: 17%; max-width: 55px; }
html[data-season="newyear"] .rating-podium-card > .ny-snowcap { --ny-cap-height: 8px; left: 24%; right: 24%; }
html[data-season="newyear"] .rating-podium-card.is-first > .ny-snowcap { left: 28%; right: 28%; }
html[data-season="newyear"] .rating-podium-card > .ny-snowcap::before { --ny-drift-height: var(--ny-cap-height); width: 100%; }
html[data-season="newyear"] .rating-podium-card > .ny-snowcap::after { display: none; }
/* Preserve every visible effect; only suspend work after it leaves the viewport. */
html[data-season="newyear"] .ny-hero[data-ny-in-view="false"] .ny-snow i,
html[data-season="newyear"] .ny-hanging-ornament[data-ny-in-view="false"] .ny-ornament-rig,
html[data-season="newyear"] :is(.ny-header-garland,.ny-profile-garland)[data-ny-in-view="false"] .ny-garland-bulb { animation-play-state: paused; }
html[data-season="newyear"] :is(.ny-header-garland,.ny-profile-garland)[data-ny-in-view="false"] .ny-garland-bulb { will-change: auto; }
@media (prefers-reduced-motion:reduce) { html[data-season="newyear"] .ny-ornament-rig { animation: none; } }

@media (max-width:350px) { html[data-season="newyear"] .ny-ornament-rig.is-left { left: calc(40% - 11px); } html[data-season="newyear"] .event-card { min-height: 240px; aspect-ratio: auto; } }

/* One winter hero, one event entrance: keep the tree visible behind the copy. */
html[data-season="newyear"] .ny-event-entry { display:flex; align-items:center; gap:12px; width:100%; min-height:66px; margin:17px 0 2px; padding:13px 0 0; border:0; border-top:1px solid #e3c5914d; border-radius:0; background:none; color:#e6f4ff; text-align:left; cursor:pointer; }
html[data-season="newyear"] .ny-event-gift { flex:none; color:#e9c58e; }
html[data-season="newyear"] .ny-event-gift svg { display:block; width:30px; height:30px; }
html[data-season="newyear"] .ny-event-copy { display:grid; gap:5px; flex:1; min-width:0; text-shadow:0 2px 12px #00101c; }
html[data-season="newyear"] .ny-event-copy strong { font-size:clamp(14px,3.9vw,18px); line-height:1.2; letter-spacing:-.02em; }
html[data-season="newyear"] .ny-event-copy small { color:#bdd2de; font-size:clamp(10px,2.7vw,12px); line-height:1.4; }
html[data-season="newyear"] .ny-event-arrow { color:#b3dcf0; flex:none; }
html[data-season="newyear"] .ny-event-arrow svg { display:block; width:19px; height:19px; }
html[data-season="newyear"] .ny-event-entry:hover { color:#fff; }
html[data-season="newyear"] .ny-event-entry:focus-visible { outline:2px solid #efd5a7; outline-offset:5px; border-radius:8px; }
@media(max-width:350px) { html[data-season="newyear"] .ny-event-entry { gap:8px; } html[data-season="newyear"] .ny-event-gift svg { width:25px; height:25px; } }

/* Keep the card snow behind every companion, including animated hands and feet.
   The card gets its own painting context; its snow cannot cover sibling actors. */
html[data-season="newyear"] .profile-score-scene > .profile-scoreboard { isolation: isolate; }
/* Edge bulb halos must not create a horizontal scroll pixel on narrow phones. */
html[data-season="newyear"] .ny-header-garland { overflow-x: clip; overflow-y: visible; }
