/* newyear_atmmix 5.0 — сюжетные финалы «Посох Деда Мороза» и «Звезда на ёлке» */
html.nyq-lock { overflow: hidden; }
.nyq { position: fixed; inset: 0; z-index: 100000; color: #fff; font-family: var(--ny-font, "Golos Text", system-ui, sans-serif); opacity: 0; transition: opacity .35s; overflow: hidden; }
.nyq.is-in { opacity: 1; }
.nyq-bg { position: absolute; inset: 0; background: radial-gradient(ellipse at 70% 20%, rgba(74,168,255,.28), transparent 55%), radial-gradient(ellipse at 20% 90%, rgba(255,172,28,.14), transparent 50%), linear-gradient(180deg, #08142c, #0c0d10 85%); }
.nyq--tree .nyq-bg { background: radial-gradient(ellipse at 50% 30%, rgba(61,220,132,.2), transparent 55%), radial-gradient(ellipse at 50% 100%, rgba(255,172,28,.18), transparent 50%), linear-gradient(180deg, #071a14, #0c0d10 85%); }
.nyq[data-step="finale"] .nyq-bg { background: radial-gradient(circle at 50% 35%, rgba(255,172,28,.3), transparent 50%), radial-gradient(circle at 50% 35%, rgba(127,216,255,.18), transparent 70%), linear-gradient(180deg, #0a1030, #0c0d10 85%); }
.nyq-flakes { position: absolute; inset: 0; pointer-events: none; }
.nyq-flakes i { position: absolute; top: -10px; width: 6px; height: 6px; border-radius: 50%; background: #fff; opacity: .7; animation: nyq-fall linear infinite; }
.nyq-flakes i:nth-child(3n) { width: 3px; height: 3px; opacity: .5; }
.nyq-flakes i:nth-child(4n) { width: 8px; height: 8px; opacity: .35; filter: blur(1px); }
@keyframes nyq-fall { to { transform: translate3d(40px, 105vh, 0); } }
.nyq-flakes i:nth-child(1){left:3%;animation-duration:9s}.nyq-flakes i:nth-child(2){left:9%;animation-duration:12s;animation-delay:-3s}.nyq-flakes i:nth-child(3){left:15%;animation-duration:8s;animation-delay:-6s}.nyq-flakes i:nth-child(4){left:21%;animation-duration:14s;animation-delay:-2s}.nyq-flakes i:nth-child(5){left:27%;animation-duration:10s;animation-delay:-7s}.nyq-flakes i:nth-child(6){left:33%;animation-duration:11s;animation-delay:-1s}.nyq-flakes i:nth-child(7){left:39%;animation-duration:9s;animation-delay:-5s}.nyq-flakes i:nth-child(8){left:45%;animation-duration:13s;animation-delay:-8s}.nyq-flakes i:nth-child(9){left:51%;animation-duration:8s;animation-delay:-4s}.nyq-flakes i:nth-child(10){left:57%;animation-duration:12s;animation-delay:-9s}.nyq-flakes i:nth-child(11){left:63%;animation-duration:10s;animation-delay:-2s}.nyq-flakes i:nth-child(12){left:69%;animation-duration:9s;animation-delay:-6s}.nyq-flakes i:nth-child(13){left:75%;animation-duration:14s;animation-delay:-3s}.nyq-flakes i:nth-child(14){left:81%;animation-duration:11s;animation-delay:-7s}.nyq-flakes i:nth-child(15){left:87%;animation-duration:8s;animation-delay:-1s}.nyq-flakes i:nth-child(16){left:93%;animation-duration:12s;animation-delay:-5s}.nyq-flakes i:nth-child(17){left:6%;animation-duration:15s;animation-delay:-10s}.nyq-flakes i:nth-child(18){left:18%;animation-duration:10s;animation-delay:-4s}.nyq-flakes i:nth-child(19){left:30%;animation-duration:13s;animation-delay:-11s}.nyq-flakes i:nth-child(20){left:42%;animation-duration:9s;animation-delay:-2s}.nyq-flakes i:nth-child(21){left:54%;animation-duration:14s;animation-delay:-6s}.nyq-flakes i:nth-child(22){left:66%;animation-duration:11s;animation-delay:-9s}.nyq-flakes i:nth-child(23){left:78%;animation-duration:8s;animation-delay:-3s}.nyq-flakes i:nth-child(24){left:90%;animation-duration:12s;animation-delay:-7s}.nyq-flakes i:nth-child(25){left:97%;animation-duration:10s;animation-delay:-5s}.nyq-flakes i:nth-child(26){left:48%;animation-duration:16s;animation-delay:-12s}.nyq-flakes i:nth-child(27){left:72%;animation-duration:15s;animation-delay:-8s}

.nyq-top { position: absolute; z-index: 5; top: 0; left: 0; right: 0; display: flex; align-items: center; gap: 14px; padding: 16px 22px; background: linear-gradient(rgba(0,0,0,.5), transparent); }
.nyq-kicker { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: rgba(255,172,28,.14); color: #ffac1c; font-size: 11px; font-weight: 700; letter-spacing: .12em; }
.nyq-ttl { font: italic 900 20px/1 Inter, sans-serif; text-transform: uppercase; }
.nyq-sp { flex: 1; }
.nyq-ic { width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(255,255,255,.15); background: rgba(0,0,0,.35); color: #fff; font-size: 22px; display: grid; place-items: center; cursor: pointer; }
.nyq-ic:hover { border-color: #ffac1c; }

.nyq-stage { position: absolute; inset: 0; }
/* персонажи-арты: крупно, прижаты к низу */
.nyq-npc { position: absolute; z-index: 1; right: 1%; bottom: 0; top: 60px; width: 46%; display: flex; align-items: flex-end; justify-content: flex-end; pointer-events: none; animation: nyq-in .5s ease-out; }
.nyq-npc img { height: 100%; width: auto; max-width: 100%; object-fit: contain; object-position: right bottom; filter: drop-shadow(0 0 40px rgba(74,168,255,.35)); }
@keyframes nyq-in { from { opacity: 0; transform: translateX(30px); } }
.nyq-me { position: absolute; z-index: 2; left: 6%; top: 18%; display: flex; flex-direction: column; align-items: center; gap: 14px; opacity: .5; filter: saturate(.6); transition: opacity .4s, filter .4s; }
.nyq-me.is-talk { opacity: 1; filter: none; }
.nyq-medal { width: min(26vh, 220px); aspect-ratio: 1; border-radius: 50%; overflow: hidden; border: 5px solid #ffac1c; box-shadow: 0 0 0 6px rgba(10,12,18,.85), 0 0 60px rgba(255,172,28,.35); animation: nyq-float 5s ease-in-out infinite; }
.nyq-medal img { width: 100%; height: 100%; object-fit: cover; }
.nyq-me b { padding: 6px 14px; border-radius: 14px; background: rgba(12,14,20,.85); border: 1px solid rgba(255,172,28,.5); font-size: 14px; }
@keyframes nyq-float { 50% { transform: translateY(-8px); } }
.nyq-dock { position: absolute; z-index: 4; left: 50%; bottom: 30px; transform: translateX(-50%); width: min(980px, calc(100% - 32px)); }
.nyq-box { position: relative; background: rgba(21,22,27,.9); backdrop-filter: blur(8px); border: 1px solid color-mix(in srgb, var(--c) 55%, transparent); border-radius: 24px; padding: 30px 28px 20px; }
.nyq-name { position: absolute; top: -15px; right: 24px; padding: 6px 16px; border-radius: 999px; background: var(--c); color: #111; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.nyq-box.is-me .nyq-name { right: auto; left: 24px; }
.nyq-text { font-size: 19px; line-height: 1.6; min-height: 2.4em; margin: 0; cursor: pointer; }
.nyq-more { display: flex; justify-content: flex-end; align-items: center; gap: 8px; color: #9a9ca6; font-size: 12px; margin-top: 8px; cursor: pointer; }
.nyq-more i { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: #ffac1c; color: #111; font-size: 20px; animation: nyq-pulse 2s infinite; }
@keyframes nyq-pulse { 50% { box-shadow: 0 0 0 8px rgba(255,172,28,.15); } }

.nyq-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 22px; border-radius: 999px; border: 1px solid rgba(255,255,255,.15); background: rgba(255,255,255,.06); color: #fff; font: 700 15px var(--ny-font, sans-serif); cursor: pointer; transition: transform .15s, filter .15s; }
.nyq-btn:hover { transform: translateY(-2px); }
.nyq-btn--hot { background: linear-gradient(135deg, #ffac1c, #ff8a00); border-color: transparent; color: #121212; box-shadow: 0 10px 30px rgba(255,138,0,.35); }
.nyq-btn--big { height: 54px; padding: 0 32px; font-size: 17px; }
.nyq-btn[disabled] { opacity: .5; pointer-events: none; }

/* ------------- посох ------------- */
.nyq-stage--staff, .nyq-stage--tree { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 70px 16px 20px; }
.nyq-staff { position: relative; width: min(340px, 70vw); height: min(56vh, 520px); }
.nyq-staff__aura { position: absolute; inset: -10% -40%; border-radius: 50%; background: radial-gradient(circle at 50% 30%, rgba(127,216,255, calc(.08 + var(--p) * .35)), transparent 60%); filter: blur(10px); transition: background .6s; }
.nyq-staff__rod { position: absolute; left: 50%; top: 16%; bottom: 0; width: 16px; transform: translateX(-50%); border-radius: 8px; background: linear-gradient(90deg, #5a3a1d, #a8743e 40%, #6b4423); box-shadow: inset 0 0 0 1px rgba(255,255,255,.12), 0 0 20px rgba(0,0,0,.6); }
.nyq-staff__rod::before { content: ""; position: absolute; inset: 0; border-radius: 8px; background: repeating-linear-gradient(170deg, transparent 0 22px, rgba(200,235,255,.5) 22px 26px); opacity: var(--p); transition: opacity .6s; }
.nyq-staff__crown { position: absolute; left: 50%; top: 8%; width: 90px; height: 70px; transform: translateX(-50%); }
.nyq-staff__crown::before, .nyq-staff__crown::after, .nyq-staff__crown i { content: ""; position: absolute; bottom: 0; width: 14px; height: 60px; border-radius: 8px 8px 2px 2px; background: linear-gradient(#e8f6ff, #8fd4ff); box-shadow: 0 0 14px rgba(127,216,255,.6); }
.nyq-staff__crown::before { left: 8px; transform: rotate(-24deg); transform-origin: bottom; }
.nyq-staff__crown::after { right: 8px; transform: rotate(24deg); transform-origin: bottom; }
.nyq-staff__crown i { left: 38px; height: 70px; }
.nyq-staff__orb { position: absolute; left: 50%; top: 4%; width: 64px; height: 64px; transform: translateX(-50%); border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff, #bfe9ff 30%, #4aa8ff 70%, #12356e); box-shadow: 0 0 calc(20px + var(--p) * 60px) rgba(127,216,255,.9); transition: box-shadow .6s; }
.nyq-staff.is-awake .nyq-staff__orb { animation: nyq-orb 1.2s ease-in-out infinite alternate; }
.nyq-staff.is-awake .nyq-staff__aura { background: radial-gradient(circle at 50% 30%, rgba(255,255,255,.45), rgba(127,216,255,.25) 35%, transparent 65%); animation: nyq-orb 1.6s ease-in-out infinite alternate; }
@keyframes nyq-orb { to { filter: brightness(1.5); transform: translateX(-50%) scale(1.08); } }
.nyq-staff.is-awake .nyq-staff__aura { transform: none; }
.nyq-sock { position: absolute; left: 50%; width: 0; height: 0; }
.nyq-sock__link { position: absolute; top: -1px; height: 2px; width: 76px; }
.nyq-sock.is-l .nyq-sock__link { right: 8px; background: linear-gradient(270deg, color-mix(in srgb, var(--rc) 70%, transparent), color-mix(in srgb, var(--rc) 20%, transparent)); }
.nyq-sock.is-r .nyq-sock__link { left: 8px; background: linear-gradient(90deg, color-mix(in srgb, var(--rc) 70%, transparent), color-mix(in srgb, var(--rc) 20%, transparent)); }
.nyq-sock__hole { position: absolute; top: -32px; width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; border: 2px dashed color-mix(in srgb, var(--rc) 70%, transparent); background: rgba(8,12,24,.75); box-shadow: inset 0 0 18px rgba(0,0,0,.6); transition: transform .3s, border-color .3s; }
.nyq-sock.is-l .nyq-sock__hole { right: 84px; }
.nyq-sock.is-r .nyq-sock__hole { left: 84px; }
.nyq-sock__hole small { font-size: 10px; color: color-mix(in srgb, var(--rc) 80%, #fff); text-align: center; line-height: 1.1; padding: 2px; }
.nyq-sock.is-on .nyq-sock__hole { border-style: solid; border-color: var(--rc); background: radial-gradient(circle, color-mix(in srgb, var(--rc) 35%, transparent), rgba(8,12,24,.8) 70%); box-shadow: 0 0 24px color-mix(in srgb, var(--rc) 60%, transparent); }
.nyq-sock.is-on .nyq-sock__link { height: 3px; background: var(--rc); box-shadow: 0 0 10px var(--rc); }
.nyq-sock__hole img { width: 80px; height: 80px; object-fit: contain; filter: drop-shadow(0 0 10px var(--rc)); }
.nyq-sock.is-just .nyq-sock__hole { animation: nyq-pop .5s ease-out; }
.nyq-sock.is-hint .nyq-sock__hole { animation: nyq-shake .45s; border-color: #ff4d5e; }
@keyframes nyq-pop { 0% { transform: scale(1.5); } 100% { transform: scale(1); } }
@keyframes nyq-shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.nyq-staff__count { position: absolute; left: 50%; bottom: -6px; transform: translateX(-50%); padding: 6px 14px; border-radius: 999px; background: rgba(12,14,20,.85); border: 1px solid rgba(127,216,255,.4); font-weight: 700; font-size: 14px; }
.nyq-pdock { width: min(860px, 100%); text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.nyq-pdock p { margin: 0; color: #c9d6ea; }
.nyq-hint { font-size: 14px; }
.nyq-tray { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.nyq-rune { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 92px; padding: 8px 6px; border-radius: 18px; border: 1px solid color-mix(in srgb, var(--rc) 45%, transparent); background: rgba(12,14,20,.75); color: #fff; cursor: grab; touch-action: none; transition: transform .15s, box-shadow .15s; font: inherit; }
.nyq-rune:hover { transform: translateY(-4px); box-shadow: 0 10px 26px color-mix(in srgb, var(--rc) 35%, transparent); }
.nyq-rune img { width: 64px; height: 64px; object-fit: contain; pointer-events: none; }
.nyq-rune small { font-size: 12px; font-weight: 700; }
.nyq-rune.is-used { opacity: .25; pointer-events: none; }
.nyq-rune--star img { width: 70px; height: 70px; }
.nyq-ghost { position: fixed; left: 0; top: 0; width: 80px; height: 80px; object-fit: contain; z-index: 100001; pointer-events: none; filter: drop-shadow(0 0 16px rgba(255,255,255,.6)); }

/* ------------- ёлка ------------- */
.nyq-tree { position: relative; height: min(58vh, 540px); aspect-ratio: 700 / 1128; }
.nyq-tree__glow { position: absolute; inset: 10% -20% -5%; border-radius: 50%; background: radial-gradient(circle, rgba(61,220,132,.2), transparent 65%); filter: blur(20px); transition: background .8s; }
.nyq-tree.is-lit .nyq-tree__glow { background: radial-gradient(circle, rgba(255,210,59,.45), rgba(255,138,0,.15) 45%, transparent 70%); }
.nyq-tree__img { position: relative; width: 100%; height: 100%; object-fit: contain; filter: brightness(.75) saturate(.8); transition: filter .8s; }
.nyq-tree.has-star .nyq-tree__img { filter: brightness(.9); }
.nyq-tree.is-lit .nyq-tree__img { filter: brightness(1.08) saturate(1.1); }
.nyq-bulb { position: absolute; width: 10px; height: 10px; margin: -5px; border-radius: 50%; background: #333; transition: background .3s; }
.nyq-tree.is-lit .nyq-bulb { background: var(--bc); box-shadow: 0 0 12px var(--bc), 0 0 24px var(--bc); animation: nyq-blink 1.4s ease-in-out infinite alternate; animation-delay: var(--d); }
@keyframes nyq-blink { to { opacity: .35; } }
.nyq-tree__top { position: absolute; left: 50%; top: 2%; width: 86px; height: 86px; transform: translate(-50%, -30%); display: grid; place-items: center; border-radius: 50%; border: 2px dashed rgba(255,210,59,.6); color: #ffd23b; font-size: 32px; animation: nyq-pulse 2s infinite; }
.nyq-tree.has-star .nyq-tree__top { border: 0; animation: none; }
.nyq-tree__top img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 0 20px #ffd23b); animation: nyq-pop .6s ease-out; }
.nyq-tree.is-lit .nyq-tree__top img { animation: nyq-star 2s ease-in-out infinite alternate; }
@keyframes nyq-star { to { filter: drop-shadow(0 0 40px #ffd23b) brightness(1.3); transform: scale(1.06) rotate(4deg); } }

/* ------------- финал ------------- */
.nyq-stage--finale { display: flex; align-items: center; justify-content: center; padding: 70px 16px 20px; overflow-y: auto; }
.nyq-fin { width: min(720px, 100%); text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; animation: nyq-up .6s ease-out; }
@keyframes nyq-up { from { opacity: 0; transform: translateY(30px); } }
.nyq-fin__badge { position: relative; width: 150px; height: 150px; display: grid; place-items: center; }
.nyq-fin__badge img { position: relative; width: 130px; height: 130px; object-fit: contain; filter: drop-shadow(0 0 30px rgba(255,210,59,.8)); animation: nyq-star 2s ease-in-out infinite alternate; }
.nyq-fin__rays { position: absolute; inset: -40px; border-radius: 50%; background: repeating-conic-gradient(rgba(255,172,28,.25) 0 6deg, transparent 6deg 18deg); mask: radial-gradient(circle, #000 30%, transparent 70%); animation: nyq-spin 20s linear infinite; }
@keyframes nyq-spin { to { transform: rotate(360deg); } }
.nyq-fin__kicker { color: #ffac1c; font-size: 12px; font-weight: 700; letter-spacing: .2em; }
.nyq-fin h2 { margin: 0; font: italic 900 clamp(30px, 5vw, 48px)/1.05 Inter, sans-serif; text-transform: uppercase; }
.nyq-fin__lead { margin: 0; font-size: 19px; }
.nyq-fin__lead b { color: #ffac1c; }
.nyq-fin__text { margin: 0; color: #b9bcc6; max-width: 560px; }
.nyq-fin__rewards { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.nyq-fin__rewards span { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; background: rgba(255,172,28,.12); border: 1px solid rgba(255,172,28,.35); color: #ffd28a; font-weight: 700; }
.nyq-fin__team { margin-top: 6px; padding: 16px 18px; border-radius: 20px; background: rgba(21,22,27,.85); border: 1px solid rgba(255,255,255,.1); }
.nyq-fin__faces { display: flex; justify-content: center; align-items: flex-end; margin-bottom: 10px; }
.nyq-fin__faces img { width: 64px; height: 64px; object-fit: contain; margin: 0 -4px; }
.nyq-fin__faces img.is-photo { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; object-position: 50% 30%; border: 3px solid #ffac1c; margin: 0 2px 6px; }
.nyq-fin__team p { margin: 0; color: #d6d8de; line-height: 1.55; }
.nyq-fin__team b { color: #ffac1c; }

@media (max-width: 760px) {
  .nyq-npc { width: 58%; right: -4%; top: 56px; }
  .nyq-me { left: 4%; top: 14%; }
  .nyq-medal { width: 110px; }
  .nyq-text { font-size: 16px; }
  .nyq-sock__hole { width: 52px; height: 52px; top: -26px; }
  .nyq-sock.is-l .nyq-sock__hole { right: 64px; } .nyq-sock.is-r .nyq-sock__hole { left: 64px; }
  .nyq-sock__link { width: 60px; }
  .nyq-sock__hole img { width: 64px; height: 64px; }
  .nyq-rune { width: 76px; } .nyq-rune img { width: 50px; height: 50px; }
}
@media (prefers-reduced-motion: reduce) { .nyq *, .nyq { animation: none !important; } }
