/* newyear_atmmix 4.0 — ny-story.css: полноэкранный сюжетный диалог «Семь ключей ATMMIX» + Портал. Префикс nys-. */
.nys { position: fixed; inset: 0; z-index: 9800; overflow: hidden; background: #0c0d10; color: #fff; font-family: var(--ny-font); opacity: 0; transition: opacity .3s; }
.nys.is-in { opacity: 1; }
.nys-bg { position: absolute; inset: 0; transition: background .7s; background: radial-gradient(ellipse at 75% 20%, rgba(74,168,255,.45), transparent 60%), linear-gradient(160deg, #0a2a6b, #0c0d10 80%); }
.nys[data-bg="ice"] .nys-bg { background: radial-gradient(ellipse at 80% 30%, rgba(158,224,255,.45), transparent 60%), linear-gradient(160deg, #0c3a63, #0c0d10 80%); }
.nys[data-bg="frost"] .nys-bg { background: radial-gradient(ellipse at 70% 40%, rgba(255,164,18,.25), transparent 55%), linear-gradient(160deg, #10304f, #0c0d10 80%); }
.nys[data-bg="workshop"] .nys-bg { background: radial-gradient(ellipse at 75% 30%, rgba(0,219,46,.22), transparent 60%), linear-gradient(160deg, #0d2b22, #0c0d10 80%); }
.nys[data-bg="tree"] .nys-bg { background: radial-gradient(ellipse at 70% 30%, rgba(255,164,18,.35), transparent 60%), linear-gradient(160deg, #3a1d05, #0c0d10 80%); }
.nys-snow { position: absolute; inset: 0; opacity: .6; background-size: 220px 220px; animation: nys-fall 14s linear infinite;
  background-image: radial-gradient(2px 2px at 20% 30%, #e8f3ff, transparent), radial-gradient(1.5px 1.5px at 60% 70%, #e8f3ff, transparent), radial-gradient(2px 2px at 85% 20%, #e8f3ff, transparent), radial-gradient(1px 1px at 40% 85%, #e8f3ff, transparent); }
@keyframes nys-fall { to { background-position: 0 220px, 0 220px, 0 220px, 0 220px; } }
@keyframes nys-float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes nys-in { from { opacity: 0; transform: translateX(60px); } }
@keyframes nys-shake { 20%,60% { transform: translateX(-8px); } 40%,80% { transform: translateX(8px); } }
@keyframes nys-glow { 50% { box-shadow: 0 0 0 10px rgba(255,164,18,0); } 0%,100% { box-shadow: 0 0 0 0 rgba(255,164,18,.5); } }

.nys-top { position: absolute; left: 0; right: 0; top: 0; z-index: 5; display: flex; align-items: center; gap: 12px; padding: 18px 28px; }
.nys-bar { flex: 1; max-width: 320px; height: 6px; border-radius: 9px; background: rgba(255,255,255,.1); overflow: hidden; }
.nys-bar i { display: block; height: 100%; background: #ffa412; border-radius: 9px; transition: width .5s; }
.nys-keys { display: flex; gap: 6px; }
.nys-keys span { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.15); color: #9a9ca6; font-size: 13px; }
.nys-keys span.is-cur { border-color: #ffa412; color: #ffa412; }
.nys-keys span.is-done { border-color: #ffa412; background: #ffa412; color: #111; }
.nys-sp { flex: 1; }
.nys-ic { width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(255,255,255,.15); background: rgba(0,0,0,.3); color: #fff; font-size: 20px; display: grid; place-items: center; cursor: pointer; }
.nys-ic:hover { border-color: #ffa412; }

.nys-stage { position: absolute; inset: 0; }
.nys-left, .nys-right { position: absolute; bottom: 0; z-index: 2; transition: opacity .5s, filter .5s, transform .5s; opacity: .45; filter: brightness(.5) saturate(.5); transform: scale(.96); }
.nys-left.is-talk, .nys-right.is-talk { opacity: 1; filter: none; transform: none; }
.nys-left { left: 2%; width: 34%; height: 78%; display: flex; align-items: flex-end; }
.nys-right { right: 3%; width: 38%; height: 86%; display: flex; align-items: flex-end; justify-content: flex-end; }
.nys-right.is-enter { animation: nys-in .5s ease-out; }
.nys-me { margin: 0 0 18% 10%; width: 70%; aspect-ratio: 3/4; border-radius: 28px; border: 4px solid #ffa412; background: linear-gradient(#2a1d05, #15161b); box-shadow: 0 0 60px rgba(255,164,18,.3); display: flex; flex-direction: column; align-items: center; justify-content: center; animation: nys-float 5s ease-in-out infinite; }
.nys-me b { width: 128px; height: 128px; border-radius: 50%; background: #ffa412; color: #111; display: grid; place-items: center; font: italic 900 60px Inter, sans-serif; }
.nys-me span { margin-top: 12px; font-weight: 700; }
.nys-me small { color: #9a9ca6; font-size: 12px; }
.nys-art { height: 100%; width: auto; max-width: 100%; object-fit: contain; object-position: bottom; filter: drop-shadow(0 0 40px rgba(74,168,255,.35)); }
.nys-photo { position: relative; margin: 0 8% 18% 0; width: 78%; aspect-ratio: 3/4; border-radius: 28px; overflow: hidden; border: 4px solid var(--c); box-shadow: 0 0 60px color-mix(in srgb, var(--c) 35%, transparent); animation: nys-float 5s ease-in-out infinite; }
.nys-photo img { width: 100%; height: 100%; object-fit: cover; }
.nys-photo span { position: absolute; left: 0; right: 0; bottom: 0; padding: 12px; font-size: 12px; font-weight: 700; background: linear-gradient(transparent, rgba(0,0,0,.8)); }

.nys-dock { position: absolute; z-index: 4; left: 16%; right: 16%; bottom: 32px; }
.nys-box, .nys-chapter { position: relative; background: rgba(21,22,27,.88); backdrop-filter: blur(8px); border: 1px solid color-mix(in srgb, var(--c, #4aa8ff) 55%, transparent); border-radius: 24px; padding: 32px 28px 22px; color: #fff; }
.nys-box.is-me { border-color: rgba(255,164,18,.55); }
.nys-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; }
.nys-box.is-me .nys-name { right: auto; left: 24px; background: #ffa412; }
.nys-text { font-size: 19px; line-height: 1.6; min-height: 3.2em; cursor: pointer; margin: 0; }
.nys-more { display: flex; justify-content: flex-end; align-items: center; gap: 8px; color: #9a9ca6; font-size: 12px; margin-top: 10px; cursor: pointer; }
.nys-more i { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: #ffa412; color: #111; font-size: 20px; animation: nys-glow 2s infinite; }
.nys-chapter { display: block; width: 100%; max-width: 560px; margin: 0 auto; text-align: center; cursor: pointer; border-color: rgba(255,164,18,.4); font: inherit; }
.nys-chapter span { color: #ffa412; font-size: 12px; font-weight: 700; letter-spacing: .12em; }
.nys-chapter h2 { font: italic 900 38px/1.05 Inter, sans-serif; text-transform: uppercase; margin: 8px 0 14px; }
.nys-chapter small { color: #9a9ca6; }
.nys-rk { color: #ffa412; font-size: 12px; font-weight: 700; letter-spacing: .1em; }
.nys-q { font-size: 21px; font-weight: 600; margin: 4px 0 16px; }
.nys-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.nys-opts.is-shake { animation: nys-shake .45s; }
.nys-opts button { text-align: left; padding: 13px 16px; border-radius: 16px; border: 1px solid rgba(255,255,255,.15); background: rgba(0,0,0,.3); color: #fff; font: 600 15px var(--ny-font); cursor: pointer; transition: transform .15s, border-color .15s, background .15s; }
.nys-opts button:hover { transform: translateY(-2px); border-color: #ffa412; background: rgba(255,164,18,.1); }
.nys-opts button b { color: #ffa412; margin-right: 6px; }
.nys-opts button.is-wrong { border-color: #ff4d5e; background: rgba(255,77,94,.15); color: #ff8d98; }
.nys-hint { color: #4aa8ff; font-size: 14px; margin: 12px 0 0; }
.nys-shard { display: inline-flex; gap: 6px; align-items: center; padding: 4px 12px; border-radius: 999px; background: rgba(0,219,46,.15); color: #00db2e; font-size: 12px; font-weight: 700; margin-bottom: 8px; }

.nys-final { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 80px 20px 20px; overflow-y: auto; }
.nys-team { display: flex; align-items: flex-end; margin-bottom: 24px; }
.nys-team img { height: 160px; width: auto; margin: 0 -12px; animation: nys-float 5s ease-in-out infinite; }
.nys-team img.is-photo { width: 110px; height: 110px; border-radius: 50%; object-fit: cover; border: 4px solid var(--c); }
.nys-final h2 { font: italic 900 60px/1 Inter, sans-serif; text-transform: uppercase; margin: 20px 0; }
.nys-final h2 em { color: #ffa412; font-style: inherit; }
.nys-final p { max-width: 580px; color: #b9bcc6; font-size: 18px; line-height: 1.6; }
.nys-unlock { display: flex; gap: 10px; align-items: center; margin: 22px 0; padding: 14px 18px; border-radius: 16px; border: 1px solid rgba(0,219,46,.4); background: rgba(0,219,46,.1); color: #00db2e; font-weight: 600; }
.nys-unlock i { font-size: 22px; }
.nys-go { height: 56px; padding: 0 40px; font-size: 16px; }

@media (max-width: 760px) {
  .nys-top { padding: 12px; }
  .nys-bar, .nys-keys { display: none; }
  .nys-left { left: -6%; width: 52%; height: 60%; }
  .nys-right { right: -6%; width: 56%; height: 64%; }
  .nys-me b { width: 80px; height: 80px; font-size: 38px; }
  .nys-dock { left: 10px; right: 10px; bottom: 10px; }
  .nys-text { font-size: 16px; }
  .nys-q { font-size: 17px; }
  .nys-opts { gap: 8px; }
  .nys-chapter h2 { font-size: 28px; }
  .nys-final h2 { font-size: 36px; }
  .nys-team img { height: 100px; }
  .nys-team img.is-photo { width: 72px; height: 72px; }
}

/* 3.0.1: круглые медальоны для фото (Максим, Дед Енокентий) и аватара игрока */
@keyframes nys-spin { to { transform: rotate(360deg); } }
.nys-left { justify-content: flex-start; }
.nys-medal { position: relative; width: 82%; max-width: 380px; margin: 0 6% 22% 8%; animation: nys-float 5s ease-in-out infinite; }
.nys-right .nys-medal { margin: 0 6% 22% 0; }
.nys-medal-glow { position: absolute; inset: -14%; border-radius: 50%; filter: blur(40px); background: radial-gradient(circle, color-mix(in srgb, var(--c) 40%, transparent), transparent 65%); }
.nys-medal-ring { position: absolute; inset: -5%; border-radius: 50%; border: 2px dashed var(--c); opacity: .55; animation: nys-spin 40s linear infinite; }
.nys-medal-ring::after { content: ""; position: absolute; inset: -7%; border-radius: 50%; border: 1px solid var(--c); opacity: .35; }
.nys-medal-img { position: relative; aspect-ratio: 1; border-radius: 50%; overflow: hidden; border: 5px solid var(--c); box-shadow: 0 0 0 6px rgba(10,12,18,.85), 0 0 70px color-mix(in srgb, var(--c) 40%, transparent); }
.nys-medal-img img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; display: block; }
.nys-medal-img::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 50% 35%, transparent 55%, rgba(5,10,25,.55)), linear-gradient(rgba(255,255,255,.1), transparent 33%); pointer-events: none; }
.nys-sf { position: absolute; color: rgba(255,255,255,.85); text-shadow: 0 0 8px rgba(158,224,255,.9); font-size: 20px; animation: nys-spin 12s linear infinite; }
.nys-sf1 { top: 2%; left: 6%; } .nys-sf2 { top: 14%; right: -2%; font-size: 26px; animation: nys-float 4s ease-in-out infinite; } .nys-sf3 { bottom: 10%; left: -3%; }
.nys-medal-cap { position: absolute; left: 50%; bottom: -24px; transform: translateX(-50%); width: max-content; max-width: 120%; padding: 8px 16px; border-radius: 16px; text-align: center; background: rgba(12,14,20,.85); border: 1px solid color-mix(in srgb, var(--c) 55%, transparent); backdrop-filter: blur(8px); }
.nys-medal-cap b { display: block; font-size: 15px; }
.nys-medal-cap small { color: #9a9ca6; font-size: 12px; }
.nys-team img.is-photo { object-position: 50% 30%; }
@media (max-width: 760px) {
  .nys-medal, .nys-right .nys-medal { margin-bottom: 30%; }
  .nys-medal-cap b { font-size: 13px; } .nys-medal-cap small { font-size: 10px; }
}

/* ================================================================
   4.0 — аватары НАД блоком диалога.
   Сцена делится на две зоны: персонажи (сверху) и диалог (снизу).
   Блок диалога больше не перекрывает медальоны и арты.
   ================================================================ */
.nys-stage { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: minmax(0, 1fr) auto; grid-template-areas: "left right" "dock dock"; padding: 78px 4% 26px; gap: 18px 4%; }
.nys-left, .nys-right { position: relative; inset: auto; bottom: auto; left: auto; right: auto; width: auto; height: auto; min-height: 0; display: flex; align-items: center; }
.nys-left { grid-area: left; justify-content: center; }
.nys-right { grid-area: right; justify-content: center; }
.nys-medal, .nys-right .nys-medal { width: auto; height: min(100%, 360px); max-width: 100%; aspect-ratio: 1; margin: 0 0 34px; }
.nys-art { height: 100%; max-height: 560px; width: auto; }
.nys-dock { position: relative; grid-area: dock; left: auto; right: auto; bottom: auto; width: 100%; max-width: 980px; margin: 0 auto; z-index: 4; }
.nys-text { min-height: 2.4em; }
.nys-bg[data-x] { display: none; }
.nys[data-bg="code"] .nys-bg { background: radial-gradient(ellipse at 75% 30%, rgba(77,163,255,.35), transparent 60%), repeating-linear-gradient(0deg, rgba(77,163,255,.05) 0 1px, transparent 1px 24px), linear-gradient(160deg, #0b1a33, #0c0d10 80%); }
.nys[data-bg="portal"] .nys-bg, .nys[data-bg="portal-open"] .nys-bg { background: radial-gradient(circle at 50% 42%, rgba(255,172,28,.18), transparent 45%), radial-gradient(circle at 50% 42%, rgba(127,216,255,.22), transparent 65%), linear-gradient(180deg, #0a1030, #0c0d10 85%); }

/* ключи в шапке */
.nys-keys span { width: 34px; height: 34px; border-radius: 10px; overflow: hidden; background: rgba(0,0,0,.35); }
.nys-keys span img { width: 30px; height: 30px; object-fit: contain; filter: grayscale(1) brightness(.4); transition: filter .4s, transform .4s; }
.nys-keys span.is-cur { border-color: var(--k); }
.nys-keys span.is-cur img { filter: grayscale(.6) brightness(.8); }
.nys-keys span.is-done { border-color: var(--k); background: color-mix(in srgb, var(--k) 18%, #0c0d10); box-shadow: 0 0 12px color-mix(in srgb, var(--k) 50%, transparent); }
.nys-keys span.is-done img { filter: drop-shadow(0 0 4px var(--k)); transform: rotate(-20deg) scale(1.1); }

/* ключ в заставке главы и при получении */
.nys-chapter__key { display: flex; flex-direction: column; align-items: center; gap: 4px; margin: 0 0 12px; }
.nys-chapter__key img { width: 84px; height: 84px; object-fit: contain; animation: nys-float 3s ease-in-out infinite; filter: drop-shadow(0 0 14px rgba(255,255,255,.25)); }
.nys-gotkey { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; padding: 8px 16px 8px 8px; border-radius: 18px; width: max-content; max-width: 100%; background: color-mix(in srgb, var(--k) 14%, rgba(0,0,0,.3)); border: 1px solid color-mix(in srgb, var(--k) 55%, transparent); }
.nys-gotkey__img { width: 72px; height: 72px; border-radius: 14px; display: grid; place-items: center; background: radial-gradient(circle, color-mix(in srgb, var(--k) 40%, transparent), transparent 70%); }
.nys-gotkey__img img { width: 72px; height: 72px; object-fit: contain; animation: nys-keyin .9s cubic-bezier(.2,1.4,.3,1) both; }
.nys-gotkey small { display: block; color: var(--k); font-size: 11px; font-weight: 800; letter-spacing: .12em; }
.nys-gotkey b { font: italic 900 22px/1.1 Inter, sans-serif; text-transform: uppercase; }
@keyframes nys-keyin { from { transform: scale(.2) rotate(-200deg); opacity: 0; } }

/* ================= ПОРТАЛ ATMMIX.RU ================= */
.nys-stage--portal { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 72px 16px 20px; }
.nys-portal { position: relative; width: min(56vh, 520px, 86vw); aspect-ratio: 1; flex: none; }
.nys-portal__rays { position: absolute; inset: -30%; border-radius: 50%; opacity: calc(.12 + var(--n) * .08); background: conic-gradient(from 0deg, transparent 0 8%, rgba(255,172,28,.35) 10%, transparent 12% 25%, rgba(127,216,255,.35) 27%, transparent 29% 42%, rgba(255,172,28,.3) 44%, transparent 46% 60%, rgba(168,107,255,.3) 62%, transparent 64% 80%, rgba(127,216,255,.3) 82%, transparent 84%); filter: blur(8px); animation: nys-spin 30s linear infinite; transition: opacity .6s; }
.nys-portal__ring { position: absolute; inset: 0; border-radius: 50%; }
.nys-portal__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 0 30px rgba(127,216,255,.35)) saturate(calc(.6 + var(--n) * .08)); animation: nys-spin 120s linear infinite; }
.nys-portal__orbit { position: absolute; inset: 14%; border-radius: 50%; border: 1px dashed rgba(255,172,28,.45); animation: nys-spin 24s linear infinite reverse; }
.nys-portal__orbit--2 { inset: 22%; border-style: dotted; border-color: rgba(127,216,255,.4); animation-duration: 40s; animation-direction: normal; }
.nys-portal__core { position: absolute; inset: 25%; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; background: radial-gradient(circle, rgba(20,26,58,.95), rgba(8,10,20,.98) 70%); box-shadow: inset 0 0 40px rgba(127,216,255,.25), 0 0 calc(10px + var(--n) * 8px) rgba(255,172,28,.35); overflow: hidden; }
.nys-portal__glow { position: absolute; inset: 0; background: radial-gradient(circle, rgba(255,172,28,calc(var(--n) * .06)), transparent 70%); animation: nys-pulse 2.4s ease-in-out infinite; }
.nys-portal__core b { position: relative; font: italic 900 clamp(22px, 4.4vh, 40px)/1 Inter, sans-serif; letter-spacing: -.03em; text-shadow: 0 0 20px rgba(255,172,28,.5); }
.nys-portal__core b em { color: #ffac1c; font-style: inherit; }
.nys-portal__core small { position: relative; margin-top: 6px; color: #cfe6ff; font-weight: 700; font-size: clamp(11px, 1.8vh, 15px); letter-spacing: .14em; text-transform: uppercase; }
.nys-portal__count { position: relative; margin-top: 10px; padding: 3px 12px; border-radius: 999px; background: rgba(255,172,28,.15); color: #ffac1c; font-weight: 800; font-size: 13px; }
@keyframes nys-pulse { 50% { opacity: .5; transform: scale(1.08); } }
.nys-sock { position: absolute; width: 15%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; display: grid; place-items: center; cursor: pointer; background: radial-gradient(circle, rgba(10,14,24,.95) 55%, rgba(10,14,24,.6)); border: 2px dashed color-mix(in srgb, var(--k) 60%, transparent); color: color-mix(in srgb, var(--k) 70%, #fff); font-size: clamp(14px, 2.4vh, 22px); transition: transform .25s, box-shadow .25s, border-color .25s; z-index: 2; }
.nys-sock:hover, .nys-sock.is-hover { transform: translate(-50%, -50%) scale(1.15); box-shadow: 0 0 24px var(--k); border-style: solid; }
.nys-sock.is-on { border: 2px solid var(--k); background: radial-gradient(circle, color-mix(in srgb, var(--k) 35%, #0a0e18), #0a0e18 75%); box-shadow: 0 0 22px var(--k), inset 0 0 14px color-mix(in srgb, var(--k) 60%, transparent); cursor: default; }
.nys-sock img { width: 120%; height: 120%; object-fit: contain; transform: rotate(-35deg); filter: drop-shadow(0 0 6px var(--k)); }
.nys-sock.is-just img { animation: nys-insert .7s cubic-bezier(.2,1.3,.3,1) both; }
.nys-sock.is-just { animation: nys-sockflash .9s ease-out; }
.nys-sock.is-hintme { animation: nys-hint 0.9s ease-in-out 2; }
@keyframes nys-insert { from { transform: translateY(-120%) rotate(-35deg) scale(1.6); opacity: 0; } 70% { transform: translateY(6%) rotate(-35deg) scale(.95); opacity: 1; } }
@keyframes nys-sockflash { 0% { box-shadow: 0 0 0 0 var(--k); } 40% { box-shadow: 0 0 60px 20px var(--k); } }
@keyframes nys-hint { 50% { transform: translate(-50%, -50%) scale(1.3); box-shadow: 0 0 30px var(--k); } }
.nys-portal.is-ready .nys-portal__img { animation-duration: 12s; }
.nys-portal.is-ready .nys-portal__core { box-shadow: inset 0 0 50px rgba(255,172,28,.45), 0 0 80px rgba(255,172,28,.55); }
.nys-portal__flash { position: absolute; inset: 25%; border-radius: 50%; background: radial-gradient(circle, #fff, #ffe7b0 30%, rgba(255,172,28,.6) 55%, transparent 70%); opacity: 0; pointer-events: none; }
.nys-portal.is-open .nys-portal__img { animation: nys-spin 1.6s linear infinite; filter: drop-shadow(0 0 60px #ffac1c) brightness(1.4); }
.nys-portal.is-open .nys-sock { animation: nys-spark 1.2s ease-out forwards; }
.nys-portal.is-open .nys-portal__flash { animation: nys-flash 4.2s ease-in forwards; }
.nys-portal.is-open .nys-portal__rays { opacity: 1; animation-duration: 3s; }
@keyframes nys-spark { to { transform: translate(-50%, -50%) scale(.2); opacity: 0; } }
@keyframes nys-flash { 0% { opacity: 0; transform: scale(.3); } 40% { opacity: 1; transform: scale(1); } 75% { opacity: 1; transform: scale(5); } 100% { opacity: 0; transform: scale(9); } }
.nys-pdock { width: min(980px, 100%); text-align: center; z-index: 9;}
.nys-pdock__hint { color: #b9bcc6; margin: 0 0 10px; font-size: 14px; }
.nys-tray { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; z-index: 9;}
.nys-tkey { width: 104px; padding: 8px 6px; border-radius: 16px; border: 1px solid color-mix(in srgb, var(--k) 45%, transparent); background: rgba(12,14,20,.85); color: #fff; cursor: grab; display: flex; flex-direction: column; align-items: center; gap: 4px; touch-action: none; transition: transform .2s, box-shadow .2s, opacity .3s; font: inherit; }
.nys-tkey:hover { transform: translateY(-4px); box-shadow: 0 10px 30px color-mix(in srgb, var(--k) 40%, transparent); }
.nys-tkey img { width: 64px; height: 64px; object-fit: contain; pointer-events: none; filter: drop-shadow(0 0 8px var(--k)); animation: nys-float 3s ease-in-out infinite; }
.nys-tkey small { font-size: 11px; color: #b9bcc6; line-height: 1.2; }
.nys-tkey.is-used { opacity: .25; cursor: default; transform: none; box-shadow: none; }
.nys-tkey.is-drag { opacity: .35; }
.nys-ghost { position: fixed; left: 0; top: 0; width: 80px; height: 80px; object-fit: contain; z-index: 10000; pointer-events: none; filter: drop-shadow(0 0 14px #ffac1c); }
.nys-pdock__ready p { color: #cfe6ff; margin: 0 0 12px; }
.nys-open { height: 58px; padding: 0 34px; font-size: 17px; animation: nys-glow 1.6s infinite; }

/* финал */
.nys-final__keys { display: flex; gap: 6px; margin: 4px 0 10px; }
.nys-final__keys img { width: 48px; height: 48px; object-fit: contain; animation: nys-keyin .8s cubic-bezier(.2,1.4,.3,1) both; }

@media (max-width: 760px) {
  .nys-stage { grid-template-columns: 1fr 1fr; padding: 62px 10px 10px; gap: 10px; }
  .nys-medal, .nys-right .nys-medal { height: min(100%, 150px); margin-bottom: 30px; }
  .nys-art { max-height: 230px; }
  .nys-dock { left: auto; right: auto; bottom: auto; }
  .nys-tkey { width: 78px; } .nys-tkey img { width: 44px; height: 44px; } .nys-tkey small { display: none; }
  .nys-gotkey b { font-size: 17px; } .nys-gotkey__img, .nys-gotkey__img img { width: 52px; height: 52px; }
}

/* ================================================================
   5.0 — Дед Мороз, Снегурочка и Снеговик: крупно и прижаты к низу
   экрана, за блоком диалога (как в 3.x). Фото-медальоны Максима,
   Деда Енокентия и Данила не меняются.
   ================================================================ */
.nys-right.is-art { position: absolute; z-index: 1; right: 1%; bottom: 0; top: 56px; width: 46%; height: auto; display: flex; align-items: flex-end; justify-content: flex-end; pointer-events: none; }
.nys-right.is-art .nys-art { height: 100%; max-height: none; width: auto; max-width: 100%; object-fit: contain; object-position: right bottom; transform-origin: bottom center; }
.nys-right.is-art.is-talk .nys-art { animation: nys-breath 4.5s ease-in-out infinite; }
@keyframes nys-breath { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.012) translateY(-2px); } }
.nys-stage:has(.nys-right.is-art) .nys-dock { z-index: 4; }
.nys-stage:has(.nys-right.is-art) .nys-left { grid-column: 1 / 2; }
@media (max-width: 760px) {
  .nys-right.is-art { width: 58%; top: 48px; right: -4%; }
  .nys-right.is-art .nys-art { max-height: none; }
}

/* ================================================================
   5.1 — Дед Мороз (и Снегурочка, Снеговик) на экране «ГЛАВА N ИЗ 7»:
   крупно и стоит на нижнем краю экрана, как в диалогах — больше не
   «висит в воздухе». Аватары-медальоны игрока и команды не меняются.
   ================================================================ */
/* причина «парения» в 5.0: у абсолютного блока в grid-сцене containing block — ячейка grid-area: right
   (верхний ряд над диалогом), а не весь экран. grid-area: auto возвращает привязку к краям экрана. */
.nys-stage .nys-right.is-art { grid-area: auto; }
.nys-stage--title .nys-right.is-art { top: 56px; bottom: 0; right: 1%; width: 50%; opacity: 1; filter: none; transform: none; animation: none; }
.nys-stage--title .nys-right.is-art .nys-art { height: 100%; max-height: none; width: auto; object-position: right bottom; animation: nys-breath 4.5s ease-in-out infinite; }
.nys-stage--title .nys-dock { align-self: end; }
.nys-stage--title .nys-chapter {margin-right: auto; }
@media (max-width: 760px) {
  .nys-stage--title .nys-right.is-art { width: 70%; top: 48px; right: -8%; }
  .nys-stage--title .nys-chapter { margin: 0 auto; }
}
