/* ═══════════ Токены ═══════════ */
:root {
  --ink: #07060a;
  --ink2: #100b0f;
  --bone: #ece3d6;
  --dim: #a3958a;
  --ember: #ff8a3d;
  --gold: #d6a35c;
  --blood: #9a1024;
  --neon: #ff2d95;
  --neon2: #ff7ac3;
  --violet: #a58cff;
  --uni: 'Cormorant Unicase', 'Cormorant Garamond', serif;
  --serif: 'Cormorant Garamond', serif;
  --body: 'Spectral', Georgia, serif;
  --hand: 'Marck Script', cursive;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--ink); color: var(--bone); overflow-x: clip; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 300 18px/1.65 var(--body); overflow-x: clip; background: var(--ink); }
body.locked, html.modal { overflow: hidden; }
img, video { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
/* Android рисует серый прямоугольник при касании — убираем */
* { -webkit-tap-highlight-color: transparent; }
::selection { background: var(--neon); color: #fff; }

/* виньетка + зерно плёнки */
body::before { content: ''; position: fixed; inset: 0; z-index: 80; pointer-events: none;
  background: radial-gradient(ellipse at 50% 50%, transparent 55%, rgba(0,0,0,.65) 100%); }
body::after { content: ''; position: fixed; inset: -10%; z-index: 81; pointer-events: none; opacity: .09;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1s steps(6) infinite; }
@keyframes grain { 0%{transform:translate(0,0)} 20%{transform:translate(-3%,2%)} 40%{transform:translate(2%,-4%)} 60%{transform:translate(-4%,-1%)} 80%{transform:translate(3%,3%)} 100%{transform:translate(0,0)} }

#embers { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 70; pointer-events: none; }

/* ═══════════ Курсор ═══════════ */
.cursor-dot, .cursor-ring { position: fixed; left: 0; top: 0; z-index: 2000; pointer-events: none; border-radius: 50%; translate: -50% -50%; opacity: 0; transition: opacity .3s; }
html.fine.moved .cursor-dot, html.fine.moved .cursor-ring { opacity: 1; }
html.fine, html.fine * { cursor: none !important; }
.cursor-dot { width: 6px; height: 6px; background: #fff; box-shadow: 0 0 8px var(--neon), 0 0 18px var(--neon); }
.cursor-ring { width: 38px; height: 38px; border: 1px solid rgba(255,122,195,.55); transition: width .35s var(--ease), height .35s var(--ease), background .35s, border-color .35s, opacity .3s; }
.cursor-ring.big { width: 74px; height: 74px; background: rgba(255,45,149,.08); border-color: rgba(255,122,195,.9); }
.cursor-ring.torch { width: 14px; height: 14px; border-color: rgba(255,170,90,.9); }
/* над сургучом кольцо курсора не нужно — оно ложилось на печать «теневым» кругом */
html.fine.moved .cursor-ring.hide { opacity: 0; }

/* ═══════════ Заставка ═══════════ */
.splash { position: fixed; inset: 0; z-index: 1000; overflow: hidden; }
.splash-inner { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; overflow: hidden;
  background: radial-gradient(ellipse at 50% 62%, rgba(120,20,50,.38), transparent 62%), #050405; }
.splash-bg { position: absolute; inset: -5%; background: url(opt/cover-480.webp) center 22%/cover; opacity: .15; animation: breathe 10s ease-in-out infinite alternate; }
@keyframes breathe { to { transform: scale(1.08); opacity: .24; } }
.splash-center { position: relative; padding: 0 16px; }
.splash-kicker { font: 400 12px/1 var(--body); letter-spacing: .5em; text-transform: uppercase; color: var(--gold); margin: 0 0 28px; opacity: 0; animation: fadeUp 1.2s 1.6s var(--ease-out) forwards; }
.splash-title { margin: 0; font-family: var(--uni); font-weight: 500; line-height: .86; }
.splash-title .row { display: block; white-space: nowrap; }
.splash-title .r1 { font-size: clamp(54px, 12vw, 150px); letter-spacing: .04em; }
.splash-title .r2 { font-size: clamp(62px, 14vw, 176px); letter-spacing: .08em; color: var(--neon); }
.splash-title .ch { display: inline-block; opacity: 0; animation: shardIn 1.5s var(--d) var(--ease-out) forwards; }
.splash-title .r2 .ch { text-shadow: 0 0 14px var(--neon), 0 0 46px rgba(255,45,149,.7); }
/* только transform/opacity: filter и clip-path в анимации дают «квадраты» вокруг букв в Chrome */
@keyframes shardIn {
  from { opacity: 0; transform: translate(var(--tx), var(--ty)) rotate(var(--r)) scale(1.6); }
  to { opacity: 1; transform: none; }
}
/* пока шрифт не загрузился (нет .go) — всё на паузе, иначе буквы прыгают со шрифта на шрифт */
.splash:not(.go) * { animation-play-state: paused !important; }
.settled .splash-title .ch { animation: none; opacity: 1; }
.settled .splash-title .r2 { animation: flicker 5s infinite; }
.splash-hint { margin: 18px 0 0; font: italic 300 15px var(--body); color: var(--dim); letter-spacing: .1em; opacity: 0; animation: fadeUp 1s 2.6s var(--ease-out) forwards; }
.settled .splash-kicker, .settled .splash-hint { animation: none; opacity: 1; }
.splash .seal { margin: 46px auto 0; opacity: 0; animation: sealIn 1.2s 2.2s var(--ease-out) forwards; }
/* печать зовёт сломать её лёгким «дыханием» (без круглого свечения: оно ложилось кругом вокруг неровного воска) */
.settled .seal { animation: sealBreath 2.8s ease-in-out infinite; }
.settled .seal.broken, .shard-clone .seal { animation: none; }
@keyframes sealBreath { 50% { transform: scale(1.05); } }
.settled .seal { opacity: 1; }
@keyframes sealIn { from { opacity: 0; transform: scale(2.2) rotate(-25deg); } to { opacity: 1; transform: none; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

.shard { position: absolute; overflow: hidden; transition: transform 1.5s var(--ease-out), opacity 1.2s ease; }
/* в копиях-осколках никаких фильтров и бесконечных анимаций — экономим видеопамять */
.shard-clone .splash-bg { filter: none; animation: none; opacity: .2; }
.shard-clone .splash-title .r2, .shard-clone .seal { animation: none; }
.splash-flash { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(circle at var(--fx) var(--fy), rgba(255,255,255,.9), rgba(255,45,149,.5) 18%, transparent 55%); animation: flash .9s ease-out forwards; }
@keyframes flash { from { opacity: 1; } to { opacity: 0; } }
body.shake main, body.shake .nav { animation: shake .45s; }
@keyframes shake { 20%{transform:translate(-8px,4px)} 40%{transform:translate(6px,-6px)} 60%{transform:translate(-4px,3px)} 80%{transform:translate(3px,-2px)} }

/* ═══════════ Печать ═══════════ */
.seal { position: relative; display: block; width: 108px; height: 108px; border-radius: 50%; }
/* сургуч — готовая картинка с рельефом и тенью (tools/render-seal.js); капля занимает ~3/4 кадра, поэтому половинки шире кнопки */
.seal-half { position: absolute; inset: -17%; background: url(opt/seal.webp) center / contain no-repeat; transition: transform 1s var(--ease-out), opacity 1s; }
.seal-half.l { clip-path: polygon(0 0, 54% 0, 45% 28%, 58% 52%, 44% 76%, 50% 100%, 0 100%); }
.seal-half.r { clip-path: polygon(54% 0, 100% 0, 100% 100%, 50% 100%, 44% 76%, 58% 52%, 45% 28%); }
@media (hover: hover) {
  html.fine .seal:hover .seal-half.l { transform: translateX(-2px) rotate(-2deg); }
  html.fine .seal:hover .seal-half.r { transform: translateX(2px) rotate(2deg); }
}
.seal.broken .seal-half.l { transform: translate(-60px, 90px) rotate(-40deg); opacity: 0; }
.seal.broken .seal-half.r { transform: translate(60px, 110px) rotate(35deg); opacity: 0; }
.seal:focus-visible { outline: 2px solid var(--neon2); outline-offset: 8px; }

/* ═══════════ Навигация + фитиль ═══════════ */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 300; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 4vw;
  transform: translateY(-110%); transition: transform 1s .6s var(--ease-out), padding .4s, background .4s; }
body.entered .nav { transform: none; }
.nav.scrolled { padding: 10px 4vw; background: linear-gradient(rgba(7,6,10,.96), rgba(7,6,10,.82)); border-bottom: 1px solid rgba(255,45,149,.12); }
.nav-logo { font: 500 22px/1 var(--uni); text-decoration: none; white-space: nowrap; }
.nav-logo b { font-weight: 500; color: var(--neon); text-shadow: 0 0 12px rgba(255,45,149,.7); }
.nav-links { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.nav-links::-webkit-scrollbar { display: none; }
.nav-links a { position: relative; padding: 8px 12px; color: var(--dim); text-decoration: none; font: 400 12px/1 var(--body); letter-spacing: .22em; text-transform: uppercase; white-space: nowrap; transition: color .3s; }
.nav-links a::after { content: ''; position: absolute; left: 12px; right: 12px; bottom: 2px; height: 1px; background: var(--neon); box-shadow: 0 0 8px var(--neon); transform: scaleX(0); transition: transform .5s var(--ease); }
/* все эффекты наведения — только с мышкой (html.fine): на телефоне касание «залипало» как наведение и включало анимацию задетого трека/карточки */
html.fine .nav-links a:hover, .nav-links a.active { color: var(--bone); }
.nav-links a.active::after { transform: scaleX(1); }

.fuse { position: fixed; right: 22px; top: 22vh; bottom: 22vh; width: 1px; z-index: 290; background: rgba(236,227,214,.1); opacity: 0; transition: opacity 1s 1s; }
body.entered .fuse { opacity: 1; }
.fuse i { position: absolute; left: 0; top: 0; width: 1px; height: calc(var(--p, 0) * 100%); background: linear-gradient(transparent, var(--ember), var(--neon)); }
.fuse i::after { content: ''; position: absolute; left: 50%; bottom: -5px; width: 9px; height: 9px; translate: -50% 0; border-radius: 50%; background: #ffd2a0; box-shadow: 0 0 8px 2px var(--ember), 0 0 22px 6px rgba(255,45,149,.5); animation: flicker 2.5s infinite; }

/* ═══════════ Общие ═══════════ */
.kicker { margin: 0; font: 400 12px/1.2 var(--body); letter-spacing: .42em; text-transform: uppercase; color: var(--gold); }
.sec { position: relative; padding: 20vh 6vw 14vh; }
.sec-head { position: relative; max-width: 1240px; margin: 0 auto 8vh; }
.sec-head.center { text-align: center; }
.sec-num { position: absolute; top: -.5em; left: -.05em; z-index: -1; font: 700 clamp(120px, 20vw, 300px)/1 var(--uni); color: transparent; -webkit-text-stroke: 1px rgba(214,163,92,.13); pointer-events: none; }
.sec-head.center .sec-num { left: 50%; translate: -50% 0; }
.sec-title { margin: .25em 0 0; font: 500 clamp(42px, 6.6vw, 104px)/.98 var(--uni); letter-spacing: .01em; }
.sec-title.small { font-size: clamp(36px, 4.6vw, 70px); }
.sec-title em { font-style: normal; color: var(--neon); text-shadow: 0 0 18px rgba(255,45,149,.55); }
.lead { max-width: 520px; color: var(--dim); font-size: 19px; }

.btn { display: inline-flex; align-items: center; gap: 12px; margin-top: 34px; padding: 15px 30px; border: 1px solid rgba(255,45,149,.6); color: var(--bone); text-decoration: none;
  font: 400 13px/1 var(--body); letter-spacing: .28em; text-transform: uppercase; position: relative; overflow: hidden; transition: color .4s, border-color .4s, box-shadow .4s; }
.btn::before { content: ''; position: absolute; inset: 0; background: var(--neon); transform: scaleX(0); transform-origin: right; transition: transform .6s var(--ease); z-index: -1; }
html.fine .btn:hover { box-shadow: 0 0 30px rgba(255,45,149,.45); color: #fff; }
html.fine .btn:hover::before { transform: scaleX(1); transform-origin: left; }
.btn.ghost { border-color: rgba(214,163,92,.5); }
.btn span { transition: transform .4s; }
html.fine .btn:hover span { transform: translateY(3px); }

[data-reveal] { opacity: 0; transform: translateY(50px); transition: opacity 1.1s var(--ease-out) calc(var(--i, 0) * 90ms), transform 1.3s var(--ease-out) calc(var(--i, 0) * 90ms); }
[data-reveal].in { opacity: 1; transform: none; }

@keyframes flicker { 0%,100%{opacity:1} 8%{opacity:.85} 9%{opacity:1} 41%{opacity:1} 42%{opacity:.55} 43%{opacity:1} 44%{opacity:.8} 45%{opacity:1} 76%{opacity:.95} }
@keyframes kenburns { from { transform: scale(1.04) translate(0, 0); } to { transform: scale(1.18) translate(-2%, -2%); } }

/* ═══════════ Герой ═══════════ */
.hero { position: relative; min-height: 100svh; display: grid; grid-template-columns: 1.15fr .85fr; align-items: center; gap: 4vw; padding: 90px 6vw 40px; overflow: hidden; isolation: isolate; }
.hero-copy { position: relative; z-index: 3; will-change: transform, opacity; }
.hero-title { margin: 18px 0 0; font: 500 clamp(60px, 10.5vw, 178px)/.84 var(--uni); letter-spacing: .01em; }
/* строки всплывают и проявляются — без маски: маска срезала неоновое свечение «ХАОСА» ровной линией */
.hero-title > span { display: block; padding: 0 .05em .06em; opacity: 0; transition: opacity 1.1s var(--ease-out); }
.hero-title .l2 { transition-delay: .15s; }
body.entered .hero-title > span { opacity: 1; }
.hero-title > span > span { display: block; transform: translateY(45%); transition: transform 1.4s var(--ease-out); }
.hero-title .l2 { color: var(--neon); }
.hero-title .l2 > span { text-shadow: 0 0 18px var(--neon), 0 0 70px rgba(255,45,149,.55); animation: flicker 7s 3s infinite; transition-delay: .15s; }
body.entered .hero-title > span > span { transform: none; }
.hero-kicker, .hero-tag, .hero-copy .btn { opacity: 0; transform: translateY(20px); transition: opacity 1.2s .7s var(--ease-out), transform 1.2s .7s var(--ease-out); }
.hero-tag { max-width: 460px; margin: 28px 0 0; color: var(--dim); font-size: clamp(17px, 1.5vw, 20px); transition-delay: .9s; }
.hero-copy .btn { transition-delay: 1.1s, 1.1s, 0s, 0s; }
body.entered .hero-kicker, body.entered .hero-tag, body.entered .hero-copy .btn { opacity: 1; transform: none; }

.hero-portrait { position: relative; justify-self: center; height: min(84svh, 900px); aspect-ratio: 784 / 1168; opacity: 0; transform: scale(.94); transition: opacity 1.6s .2s, transform 2s .2s var(--ease-out); }
body.entered .hero-portrait { opacity: 1; transform: none; }
.hero-glow { position: absolute; inset: -12%; background: radial-gradient(ellipse at 50% 20%, rgba(255,138,61,.45), transparent 45%), radial-gradient(ellipse at 50% 70%, rgba(255,45,149,.28), transparent 60%); animation: flicker 4s infinite; }
.hero-core { position: absolute; inset: 4%; background: radial-gradient(ellipse at 52% 36%, #ffd0a0, var(--neon) 30%, #3a0820 75%); box-shadow: 0 0 60px rgba(255,45,149,.6); opacity: min(.85, calc(var(--hp, 0) * 1.4)); will-change: opacity; }
.hero-shards { position: absolute; inset: 0; }
/* осколок — готовая картинка с прозрачностью (opt/hero-shard-N.webp), без масок */
.hero-shard { position: absolute; display: block; max-width: none; will-change: transform; }
/* телефон: разлёт от прокрутки считает браузер (см. heroCss в app.js); спред 3→83px, как в JS */
.sda .hero-shard { animation: shardOut linear both; animation-timeline: scroll(root); animation-range: 0 100svh; }
.sda .hero-copy { animation: copyOut linear both; animation-timeline: scroll(root); animation-range: 0 100svh; }
.sda .hero-core { animation: coreIn linear both; animation-timeline: scroll(root); animation-range: 0 100svh; }
@keyframes shardOut { from { transform: translate3d(calc(var(--dx) * 3px), calc(var(--dy) * 3px), 0); } to { transform: translate3d(calc(var(--dx) * 83px), calc(var(--dy) * 83px), 0) rotate(var(--rot)); } }
@keyframes copyOut { 83% { opacity: 0; } to { opacity: 0; transform: translate3d(0, -80px, 0); } }
@keyframes coreIn { from { opacity: 0; } 60%, to { opacity: .85; } }
.hero-flame { position: absolute; left: 33%; top: 3%; width: 36%; height: 16%; pointer-events: none;
  background: radial-gradient(ellipse at 50% 70%, rgba(255,190,90,.6), rgba(255,100,30,.25) 35%, transparent 68%); animation: flame 1.6s infinite alternate ease-in-out; }
@keyframes flame { 0%{opacity:.55; transform: scale(1) translateY(0);} 30%{opacity:.9;} 60%{opacity:.6; transform: scale(1.12, 1.25) translateY(-6%);} 100%{opacity:.85; transform: scale(.96) translateY(2%);} }

.fog { position: absolute; z-index: 1; pointer-events: none; width: 140vw; height: 50vh; left: -20vw; opacity: .5; will-change: transform; }
.fog.f1 { bottom: -12vh; background: radial-gradient(ellipse at 30% 50%, rgba(140,110,130,.35), transparent 60%); animation: drift 28s linear infinite alternate; }
.fog.f2 { bottom: 10vh; background: radial-gradient(ellipse at 70% 50%, rgba(120,30,60,.35), transparent 60%); animation: drift 36s linear infinite alternate-reverse; }
@keyframes drift { to { transform: translateX(18vw); } }

.scroll-cue { position: absolute; left: 50%; bottom: 26px; translate: -50% 0; z-index: 3; width: 22px; height: 36px; border: 1px solid rgba(236,227,214,.35); border-radius: 12px; }
.scroll-cue span { position: absolute; left: 50%; top: 7px; width: 2px; height: 7px; translate: -50% 0; background: var(--neon); border-radius: 2px; animation: cue 2s infinite; }
@keyframes cue { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateY(14px); } }

/* ═══════════ Пролог ═══════════ */
.prologue { position: relative; height: 320vh; }
.prologue-sticky { position: sticky; top: 0; height: 100svh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 36px; padding: 0 7vw; text-align: center; }
.prologue-text { max-width: 1120px; margin: 0; font: 400 clamp(26px, 3.5vw, 54px)/1.28 var(--serif); }
.prologue-text .w { opacity: .12; transition: opacity .5s, color .5s, text-shadow .5s; }
.prologue-text .w.lit { opacity: 1; }
.prologue-text .w.hot.lit { color: var(--neon2); text-shadow: 0 0 18px rgba(255,45,149,.7); font-style: italic; }

/* ═══════════ Персонажи ═══════════ */
.filters { display: flex; flex-wrap: wrap; gap: 10px; max-width: 1240px; margin: 0 auto 40px; }
.filters button { padding: 10px 22px; border: 1px solid rgba(236,227,214,.18); border-radius: 40px; font: 400 12px/1 var(--body); letter-spacing: .25em; text-transform: uppercase; color: var(--dim); transition: all .4s; }
html.fine .filters button:hover { color: var(--bone); border-color: rgba(255,45,149,.5); }
.filters button.active { color: #fff; background: rgba(255,45,149,.16); border-color: var(--neon); box-shadow: 0 0 20px rgba(255,45,149,.3); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 26px; max-width: 1240px; margin: 0 auto; }
.card { position: relative; perspective: 1000px; cursor: pointer; }
/* свечение цвета героя: пульсирует в такт его темы (opacity пишет tickBeat — дешёвый слой, без перерисовки тени) */
/* наклоняется вместе с карточкой (те же --rx/--ry), иначе рамка свечения расходилась с краем полосой */
.card-glow { position: absolute; inset: 0; border-radius: 3px; pointer-events: none; opacity: 0; box-shadow: 0 0 0 1px var(--aura), 0 0 40px 4px var(--aura);
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: opacity .6s, transform .6s var(--ease); will-change: opacity, transform; }
html.fine .card:hover .card-glow { transition: opacity .6s, transform .15s linear; }
.card.sing .card-glow { transition: opacity .08s linear, transform .15s linear; }
/* поющая карточка поверх соседей — иначе соседняя карточка срезала свечение ровной линией */
.card.sing { z-index: 2; }
/* пока звучит тема — всё в цвете героя: рамка, бейдж песни, кнопка */
.card.sing .card-in, html.fine .card.sing:hover .card-in { box-shadow: 0 40px 70px -25px rgba(0,0,0,.95), 0 0 0 1px var(--aura); }
.card.sing .card-sing { border-color: var(--aura); }
.card.sing .card-play, html.fine .card.sing .card-play:hover { background: var(--aura); border-color: var(--aura); box-shadow: 0 0 18px var(--aura); color: #0b0809; }
.card.out { display: none; }
.card.pop { animation: pop .7s var(--ease-out) both; animation-delay: calc(var(--k, 0) * 70ms); }
@keyframes pop { from { opacity: 0; transform: translateY(30px) scale(.96); } }
.card-in { position: relative; aspect-ratio: 2 / 3; overflow: hidden; border-radius: 3px; background: var(--ink2); transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .6s var(--ease), box-shadow .6s; box-shadow: 0 20px 40px -20px rgba(0,0,0,.9); }
html.fine .card:hover .card-in { transition: transform .15s linear, box-shadow .6s; box-shadow: 0 40px 70px -25px rgba(0,0,0,.95), 0 0 0 1px var(--fc), 0 0 50px -8px var(--fc); }
.card-media { position: absolute; inset: -4%; }
.card-in { will-change: transform; }
.card-media img, .card-media video { width: 100%; height: 100%; object-fit: cover; transform: translate(calc(var(--mx, 0) * -12px), calc(var(--my, 0) * -12px)) scale(1.02); transition: transform .6s var(--ease); }
html.fine .card:hover .card-media img, html.fine .card:hover .card-media video { transform: translate(calc(var(--mx, 0) * -12px), calc(var(--my, 0) * -12px)) scale(1.08); }
/* затемнение слоем, а не filter по видео — дешевле для GPU */
.card-media video { position: absolute; inset: 0; opacity: 0; transition: opacity .45s, transform .6s var(--ease); }
.card-media video.on { opacity: 1; }
.card-media::after { content: ''; position: absolute; inset: 0; background: rgba(7,6,10,.32); transition: opacity .8s; }
html.fine .card:hover .card-media::after, .card.sing .card-media::after { opacity: 0; }
.card-glare { position: absolute; inset: 0; background: radial-gradient(circle at var(--gx, 50%) var(--gy, 30%), rgba(255,255,255,.14), transparent 45%); opacity: 0; transition: opacity .4s; pointer-events: none; }
html.fine .card:hover .card-glare { opacity: 1; }
.card-frame { position: absolute; inset: 10px; border: 1px solid rgba(214,163,92,.22); pointer-events: none; transition: inset .6s var(--ease), border-color .6s; }
.card-frame::before, .card-frame::after { content: ''; position: absolute; width: 14px; height: 14px; border: 1px solid var(--gold); }
.card-frame::before { top: -4px; left: -4px; border-right: 0; border-bottom: 0; }
.card-frame::after { bottom: -4px; right: -4px; border-left: 0; border-top: 0; }
html.fine .card:hover .card-frame { inset: 16px; border-color: rgba(214,163,92,.5); }
.card-body { position: absolute; left: 0; right: 0; bottom: 0; padding: 70px 24px 26px; background: linear-gradient(transparent, rgba(5,4,6,.92) 60%); transform: translateZ(30px); }
.card-tag { display: inline-block; font: 400 10px/1 var(--body); letter-spacing: .3em; text-transform: uppercase; color: var(--fc); margin-bottom: 8px; }
.card h3 { margin: 0; font: 500 34px/1 var(--uni); }
.card-ep { margin: 8px 0 0; color: var(--dim); font: italic 300 15px/1.3 var(--body); max-height: 0; opacity: 0; overflow: hidden; transition: max-height .6s var(--ease), opacity .6s; }
html.fine .card:hover .card-ep { max-height: 50px; opacity: 1; }
.card[data-faction="otryad"] { --fc: rgba(255,45,149,.85); }
.card[data-faction="dvor"] { --fc: rgba(214,163,92,.9); }
.card[data-faction="teni"] { --fc: rgba(165,140,255,.85); }

/* ═══════════ Хроника ═══════════ */
.chron { position: relative; }
.chron-sticky { position: sticky; top: 0; height: 100svh; overflow: hidden; display: flex; flex-direction: column; justify-content: center; }
.chron-head { position: relative; padding: 0 8vw; margin-bottom: 4vh; }
.chron-era { margin: 10px 0 0; font: italic 400 15px var(--serif); color: var(--dim); letter-spacing: .04em; }
.chron-head .sec-num { font-size: clamp(100px, 14vw, 200px); top: -.35em; left: 7vw; }
.chron-track { display: flex; gap: 7vw; padding: 0 8vw; will-change: transform; }
.chron-panel { flex: 0 0 min(80vw, 1000px); display: grid; grid-template-columns: .9fr 1.1fr; gap: 44px; align-items: center; cursor: pointer; }
.chron-img { position: relative; aspect-ratio: 4 / 5; max-height: 58svh; overflow: hidden; clip-path: polygon(5% 0, 100% 3%, 95% 100%, 0 96%); background: var(--ink2); transition: clip-path .8s var(--ease); }
html.fine .chron-panel:hover .chron-img { clip-path: polygon(0 2%, 97% 0, 100% 97%, 3% 100%); }
.chron-img img, .chron-img video { width: 100%; height: 100%; object-fit: cover; animation: kenburns 18s ease-in-out infinite alternate; filter: saturate(.85); }
.chron-year { font: 700 clamp(48px, 7vw, 120px)/.9 var(--uni); color: transparent; -webkit-text-stroke: 1px rgba(214,163,92,.75); white-space: nowrap; }
html.fine .chron-panel:hover .chron-year { color: rgba(214,163,92,.12); }
.chron-panel h3 { margin: 14px 0 12px; font: 500 clamp(30px, 3vw, 46px)/1 var(--uni); }
.chron-panel p { margin: 0; color: var(--dim); font-size: 17px; max-width: 460px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.chip { padding: 6px 13px; border: 1px solid rgba(255,45,149,.35); border-radius: 30px; background: rgba(255,45,149,.06); font: 400 13px/1.2 var(--body); color: var(--neon2); transition: all .3s; }
html.fine .chip:hover { background: rgba(255,45,149,.2); border-color: var(--neon); color: #fff; box-shadow: 0 0 18px rgba(255,45,149,.35); }
.chip.gold { color: var(--gold); border-color: rgba(214,163,92,.35); background: rgba(214,163,92,.06); }
html.fine .chip.gold:hover { background: rgba(214,163,92,.18); border-color: var(--gold); color: #fff; box-shadow: 0 0 18px rgba(214,163,92,.3); }
.chip.violet { color: var(--violet); border-color: rgba(165,140,255,.35); background: rgba(165,140,255,.06); }
html.fine .chip.violet:hover { background: rgba(165,140,255,.18); border-color: var(--violet); color: #fff; }
.chron-future { display: grid; place-items: center; aspect-ratio: 4/5; max-height: 58svh; border: 1px dashed rgba(255,45,149,.35); font: 700 180px/1 var(--uni); color: var(--neon); text-shadow: 0 0 30px var(--neon); animation: flicker 3s infinite; }
.chron-fuse { position: absolute; left: 8vw; right: 8vw; bottom: 7svh; height: 1px; background: rgba(236,227,214,.12); }
.chron-fuse i { position: absolute; left: 0; top: 0; height: 1px; width: calc(var(--p, 0) * 100%); background: linear-gradient(90deg, transparent, var(--ember), var(--neon)); }
.chron-fuse i::after { content: ''; position: absolute; right: -6px; top: -5px; width: 11px; height: 11px; border-radius: 50%; background: #ffe0b8; box-shadow: 0 0 10px 3px var(--ember), 0 0 30px 8px rgba(255,45,149,.5); animation: flicker 1.8s infinite; }

/* ═══════════ Сцены событий ═══════════ */
#events > .sec-head { padding-bottom: 6vh; margin-bottom: 0; }
.scene { position: relative; }
.scene-sticky { position: sticky; top: 0; height: 100svh; overflow: hidden; display: flex; align-items: center; }
.scene-bg { position: absolute; inset: 0; }
.scene-bg img, .scene-bg video { width: 100%; height: 100%; object-fit: cover; }
.scene-text { position: relative; z-index: 4; max-width: 560px; margin: 0 8vw; }
.scene-text h2 { margin: 14px 0 18px; font: 500 clamp(46px, 6.5vw, 108px)/.92 var(--uni); }
.scene-text p { margin: 0; font-size: clamp(17px, 1.4vw, 20px); color: #d6cabd; }
.scene-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.scene-actions .btn { margin-top: 30px; }

/* — кровь — */
.scene-blood { height: 300vh; }
/* только transform/opacity: на каждом кадре прокрутки не перерисовываем ни фильтры, ни градиенты */
.scene-blood .scene-bg img, .scene-blood .scene-bg video { transform: scale(calc(1.05 + var(--p, 0) * .3)); filter: saturate(.85) brightness(.5); transform-origin: 40% 70%; will-change: transform; }
.blood-veil { position: absolute; inset: 0; z-index: 1; background: radial-gradient(ellipse at 40% 70%, transparent, rgba(12,0,4,.45) 75%); }
.blood-veil::after { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse at 40% 70%, rgba(154,16,36,.55), rgba(12,0,4,.9) 75%); opacity: var(--p, 0); will-change: opacity; }
.drips { position: absolute; inset: 0; z-index: 2; pointer-events: none; overflow: hidden; }
/* капля «вытекает» сверху сдвигом (а не ростом высоты — рост пересчитывал раскладку) */
.drip { position: absolute; top: 0; width: var(--w); height: calc(var(--len) * 1vh); will-change: transform;
  transform: translate3d(0, calc((clamp(0, calc((var(--p, 0) - var(--s)) * 2.2), 1) - 1) * 100% - var(--w) * 3), 0);
  background: linear-gradient(rgba(15,0,3,.75), transparent 45%), linear-gradient(90deg, #33020a, #6d0a1a 18%, #a8172e 34%, #d0475c 40%, #a8172e 46%, #7a0b1b 70%, #2a0208); }
/* набухшая капля на конце: одна фигура с шейкой (SVG), её верх совпадает со струйкой по ширине и цвету — шва не видно */
.drip::after { content: ''; position: absolute; left: 50%; bottom: calc(var(--w) * -2.8); width: calc(var(--w) * 2); height: calc(var(--w) * 3.2); translate: -50% 0; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 32'%3E%3Cdefs%3E%3ClinearGradient id='h' gradientUnits='userSpaceOnUse' x1='5' x2='15'%3E%3Cstop offset='0' stop-color='%2333020a'/%3E%3Cstop offset='.18' stop-color='%236d0a1a'/%3E%3Cstop offset='.34' stop-color='%23a8172e'/%3E%3Cstop offset='.4' stop-color='%23d0475c'/%3E%3Cstop offset='.46' stop-color='%23a8172e'/%3E%3Cstop offset='.7' stop-color='%237a0b1b'/%3E%3Cstop offset='1' stop-color='%232a0208'/%3E%3C/linearGradient%3E%3ClinearGradient id='v' gradientUnits='userSpaceOnUse' y1='17' y2='31.5' x1='0' x2='0'%3E%3Cstop offset='0' stop-color='%23140003' stop-opacity='0'/%3E%3Cstop offset='1' stop-color='%23140003' stop-opacity='.6'/%3E%3C/linearGradient%3E%3CradialGradient id='g' fx='.38' fy='.36'%3E%3Cstop offset='0' stop-color='%23ff6e80' stop-opacity='.45'/%3E%3Cstop offset='1' stop-color='%23ff6e80' stop-opacity='0'/%3E%3C/radialGradient%3E%3Cpath id='d' d='M5 0H15C15 7 14.6 11 15.6 14C17.6 17.5 18.4 21 18 24C17.4 29 13.8 31.5 10 31.5C6.2 31.5 2.6 29 2 24C1.6 21 2.4 17.5 4.4 14C5.4 11 5 7 5 0Z'/%3E%3C/defs%3E%3Cuse href='%23d' fill='url(%23h)'/%3E%3Cuse href='%23d' fill='url(%23v)'/%3E%3Cellipse cx='9' cy='22' rx='6' ry='6.5' fill='url(%23g)'/%3E%3Cellipse cx='7.3' cy='20.5' rx='1' ry='1.9' transform='rotate(-18 7.3 20.5)' fill='%23ffd9de' opacity='.65'/%3E%3Cpath d='M16.4 23.5C16.2 27.6 13.6 30 10.6 30.3' fill='none' stroke='%23ff7080' stroke-opacity='.18' stroke-width='1.1' stroke-linecap='round'/%3E%3C/svg%3E") center/100% 100% no-repeat; }
.drip-top { position: absolute; inset: 0 0 auto; height: 9vh; z-index: 2; background: linear-gradient(#1a0004, #7a0b1b); border-radius: 0 0 40% 60% / 0 0 20px 30px; transform: scaleY(var(--p, 0)); transform-origin: top; will-change: transform; }
.scene-blood .scene-text > * { opacity: clamp(0, calc((var(--p, 0) - var(--t)) * 6), 1); transform: translateY(calc((1 - clamp(0, calc((var(--p, 0) - var(--t)) * 6), 1)) * 50px)); }
.blood-title { color: #f3e2d6; text-shadow: 0 0 30px rgba(154,16,36,.9), 0 4px 0 #3a0008; }

/* — факел — */
.scene-torch { height: 120svh; overflow: hidden; display: flex; align-items: flex-end; padding-bottom: 14vh; }
.scene-torch .scene-bg img, .scene-torch .scene-bg video { filter: sepia(.35) saturate(1.15) contrast(1.1); }
/* тьма — один большой готовый градиент, который двигается за факелом (transform), а не перерисовывается */
.torch-dark { position: absolute; inset: 0; z-index: 2; pointer-events: none; overflow: hidden; }
.torch-light { position: absolute; left: 0; top: 0; width: 260vmax; height: 260vmax; will-change: transform;
  background: radial-gradient(circle 280px at 50% 50%, rgba(255,150,60,.16) 0, rgba(20,8,2,.35) 112px, rgba(2,1,1,.97) 280px); }
.scene-torch .scene-text { padding: 30px 0; text-shadow: 0 2px 20px #000; }
.torch-hint { position: absolute; z-index: 4; top: 14vh; right: 8vw; font: italic 300 15px var(--body); letter-spacing: .15em; color: rgba(255,190,130,.75); transition: opacity 1s; }
.torch-hint.gone { opacity: 0; }

/* — письмо — */
.scene-letter { min-height: 120svh; display: grid; grid-template-columns: 1.05fr .95fr; align-items: center; gap: 5vw; padding: 12vh 6vw;
  background: radial-gradient(ellipse at 30% 50%, rgba(255,138,61,.13), transparent 55%), radial-gradient(ellipse at 80% 80%, rgba(154,16,36,.18), transparent 50%); }
.scene-letter .scene-text { margin: 0; }
.letter-stage { position: relative; height: min(86svh, 820px); display: grid; place-items: center; perspective: 1600px; }
.envelope { position: relative; z-index: 2; width: min(440px, 82vw); aspect-ratio: 1.45; transition: transform 1.2s 1.1s var(--ease-out), opacity .8s 1.3s;
  background: linear-gradient(160deg, #d8c29a, #b99a6a); box-shadow: 0 40px 80px -20px rgba(0,0,0,.85), inset 0 0 40px rgba(90,55,20,.45); animation: hover 5s ease-in-out infinite; }
@keyframes hover { 50% { transform: translateY(-10px) rotate(-1deg); } }
.envelope::before { content: ''; position: absolute; inset: 0; background: linear-gradient(to top right, transparent 49.6%, rgba(90,55,20,.25) 50%, transparent 50.4%), linear-gradient(to top left, transparent 49.6%, rgba(90,55,20,.25) 50%, transparent 50.4%); }
.env-flap { position: absolute; left: 0; right: 0; top: 0; height: 60%; transform-origin: top; transition: transform 1s .35s var(--ease); z-index: 1;
  background: linear-gradient(#c7ab7c, #a98a5a 80%, #8f7349); clip-path: polygon(0 0, 100% 0, 50% 100%); }
.envelope .seal { position: absolute; left: 50%; top: 60%; translate: -50% -50%; z-index: 3; width: 92px; height: 92px; }
.letter-hint { position: absolute; bottom: 4%; left: 0; right: 0; text-align: center; font: italic 300 15px var(--body); color: var(--dim); letter-spacing: .12em; transition: opacity .6s; }
.parchment { position: absolute; z-index: 1; width: min(500px, 88vw); max-height: 100%; overflow-y: auto; scrollbar-width: thin; padding: 44px 44px 50px;
  font: 400 clamp(17px, 1.45vw, 21px)/1.5 var(--hand); color: #3b2414;
  background: radial-gradient(ellipse at 50% 40%, #ecd9b0, #d1b483 60%, #9d7c4f 100%);
  box-shadow: inset 0 0 70px rgba(70,35,10,.65), 0 40px 90px rgba(0,0,0,.75);
  clip-path: inset(50% 0 50% 0); opacity: 0; transition: clip-path 1.5s 1.5s var(--ease-out), opacity .3s 1.5s; }
.parchment .ln { display: block; clip-path: inset(0 100% 0 0); transition: clip-path 1s calc(2.6s + var(--i) * .3s) linear; }
.parchment .gap { display: block; height: .7em; }
.letter-stage.open .envelope { transform: translateY(70%) scale(.85) rotateX(20deg); opacity: 0; animation: none; }
.letter-stage.open .env-flap { transform: rotateX(180deg); }
.letter-stage.open .parchment { clip-path: inset(0 0 0 0); opacity: 1; }
.letter-stage.open .parchment .ln { clip-path: inset(0 0 0 0); }
.letter-stage.open .letter-hint { opacity: 0; }

/* — обычная сцена — */
.scene-plain { height: 100svh; display: flex; align-items: center; overflow: hidden; }
.scene-plain .scene-bg img { animation: kenburns 20s infinite alternate; filter: brightness(.45); }

/* ═══════════ Карта ═══════════ */
.map-wrap { position: relative; max-width: 1240px; margin: 0 auto; }
/* рисунок — одна картинка (map.js); поверх — лёгкие HTML-слои: путь, туман, подписи, метки */
.map-stage { position: relative; aspect-ratio: 16 / 10; overflow: hidden; perspective: 1600px; background: #120d09;
  border: 1px solid rgba(214,163,92,.3); box-shadow: 0 50px 100px -40px #000, 0 0 0 6px rgba(214,163,92,.04), 0 0 80px -20px rgba(154,16,36,.35); }
.map-tilt { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform .7s var(--ease-out); }
.map-world { position: absolute; inset: 0; transform-origin: 0 0; transition: transform 1.3s cubic-bezier(.65,.05,.2,1); container-type: size; }
.map-art { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transform: scale(1.04); transition: opacity 1.4s, transform 2.4s var(--ease-out); }
.map-wrap.ready .map-art { opacity: 1; transform: none; }
.map-route { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.route-draw { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 4.5s .8s ease-in-out; }
.map-wrap.in.ready .route-draw { stroke-dashoffset: 0; }
.map-fog { position: absolute; pointer-events: none; width: 70%; height: 60%; will-change: transform; }
.map-fog.f1 { left: -12%; top: 34%; background: radial-gradient(closest-side, rgba(210,190,170,.14), transparent); animation: mfog 42s linear infinite alternate; }
.map-fog.f2 { right: -18%; top: 4%; background: radial-gradient(closest-side, rgba(120,50,130,.16), transparent); animation: mfog 55s linear infinite alternate-reverse; }
@keyframes mfog { to { transform: translate3d(30%, -12%, 0); } }
.map-labels > span { position: absolute; translate: -50% -50%; white-space: nowrap; pointer-events: none; text-shadow: 0 1px 0 #000, 0 0 12px #000, 0 0 4px #000; }
.map-title { font: 500 max(13px, 1.75cqw)/1 var(--uni); color: #f3dcae; letter-spacing: .12em; }
.map-region { font: italic 500 max(10px, 1.15cqw)/1 var(--serif); color: rgba(240,217,168,.72); letter-spacing: .34em; text-transform: uppercase; }
.map-region.river { font-size: max(9px, .85cqw); letter-spacing: .45em; rotate: -78deg; color: rgba(143,184,196,.8); }
.map-north { font: 700 max(12px, 1.3cqw)/1 var(--uni); color: #d6a35c; }
.map-note { font: italic 400 max(10px, .9cqw)/1.2 var(--serif); color: rgba(236,227,214,.72); }
.map-note.hot { color: var(--neon2); text-shadow: 0 0 10px rgba(255,45,149,.6), 0 1px 0 #000, 0 0 4px #000; }
.map-pin { position: absolute; width: 46px; height: 46px; translate: -50% -50%; z-index: 2; transition: scale .6s var(--ease-out); }
.map-pin .pin-dot, .map-pin .pin-ring { position: absolute; left: 50%; top: 50%; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%; }
.map-pin .pin-dot { background: radial-gradient(circle, #fff 0 18%, var(--neon) 32%, rgba(255,45,149,.35) 72%); box-shadow: 0 0 14px var(--neon), 0 0 0 2px rgba(255,255,255,.2); transition: transform .35s var(--ease-out); }
.map-pin .pin-ring { border: 2px solid var(--neon); animation: ping 2.4s infinite; }
.map-pin .pin-name { position: absolute; left: 50%; top: 40px; translate: -50% 0; padding: 5px 11px; white-space: nowrap; font: 500 max(11px, 1.05cqw)/1 var(--uni); letter-spacing: .08em; color: #f3dcae;
  background: rgba(10,7,9,.78); border: 1px solid rgba(214,163,92,.4); transition: border-color .3s, box-shadow .3s, color .3s; }
html.fine .map-pin:hover .pin-dot, .map-pin.active .pin-dot { transform: scale(1.4); }
.map-pin.active .pin-name { color: #fff; border-color: var(--neon); box-shadow: 0 0 20px rgba(255,45,149,.5); }
.map-pin:focus-visible .pin-name { outline: 2px solid var(--neon2); outline-offset: 2px; }
.map-wrap.zoomed .map-pin { scale: .62; } /* при приближении метки не раздуваются */
@keyframes ping { from { transform: scale(.6); opacity: 1; } to { transform: scale(3); opacity: 0; } }
.map-reset { position: absolute; left: 18px; top: 18px; z-index: 3; padding: 10px 18px; background: rgba(10,7,9,.9); border: 1px solid rgba(255,45,149,.5); color: var(--bone); font: 400 12px/1 var(--body); letter-spacing: .2em; text-transform: uppercase; transition: box-shadow .3s; }
html.fine .map-reset:hover { box-shadow: 0 0 20px rgba(255,45,149,.5); }
.map-tip { margin: 14px 0 0; text-align: center; font: italic 300 14px var(--body); color: var(--dim); letter-spacing: .06em; }
html.fine .tip-touch, html:not(.fine) .tip-pc { display: none; }
.map-panel { position: absolute; top: 6%; right: 2.5%; z-index: 3; width: min(320px, 34%); padding: 14px; background: rgba(10,7,9,.92); border: 1px solid rgba(255,45,149,.25); box-shadow: 0 20px 50px -10px #000;
  opacity: 0; transform: translateX(24px); pointer-events: none; transition: opacity .45s, transform .6s var(--ease-out); }
.map-panel.left { right: auto; left: 2.5%; transform: translateX(-24px); }
.map-panel.on { opacity: 1; transform: none; pointer-events: auto; }
.map-panel .mp-img { aspect-ratio: 16/10; overflow: hidden; }
.map-panel img, .map-panel video { width: 100%; height: 100%; object-fit: cover; animation: kenburns 16s infinite alternate; }
.map-panel h3 { margin: 14px 0 6px; font: 500 28px/1 var(--uni); }
.map-panel p { margin: 0; color: var(--dim); font-size: 15px; line-height: 1.5; }
.map-panel .btn { margin-top: 16px; padding: 11px 18px; font-size: 11px; }
.map-panel.swap > * { animation: fadeUp .6s var(--ease-out) both; }

/* ═══════════ Гадание ═══════════ */
.oracle-sec { overflow: hidden; }
.oracle { display: grid; grid-template-columns: .75fr 1.25fr; gap: 6vw; align-items: center; max-width: 1240px; margin: 0 auto; }
.oracle-portrait { position: relative; }
.oracle-portrait::before { content: ''; position: absolute; inset: -15%; background: radial-gradient(circle, rgba(165,140,255,.28), transparent 62%); animation: flicker 6s infinite; }
.oracle-portrait img { position: relative; border-radius: 200px 200px 4px 4px; animation: hover 7s ease-in-out infinite; box-shadow: 0 0 0 1px rgba(165,140,255,.25), 0 30px 80px -20px #000; }
.oracle-side .sec-title em { color: var(--violet); text-shadow: 0 0 20px rgba(165,140,255,.6); }
.oracle-side header { position: relative; margin-bottom: 40px; }
.oracle-side .sec-num { top: -.6em; }
.ocards { display: flex; gap: 18px; perspective: 1200px; }
.ocard { position: relative; flex: 1; max-width: 200px; aspect-ratio: 1 / 1.9; transform-style: preserve-3d; transition: transform 1.1s var(--ease-out), opacity .8s; animation: bob 4s ease-in-out infinite; animation-delay: calc(var(--i) * -1.3s); }
@keyframes bob { 50% { translate: 0 -8px; } }
html.fine .ocard:hover:not(.flipped) { transform: translateY(-14px) rotate(-2deg); }
.ocard-face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 10px; display: grid; place-items: center; padding: 18px; text-align: center; }
/* рубашка — готовый рисунок (opt/card-back-N.webp, своя рамка и скруглённые углы) */
.ocard-back { background: var(--back) center / 100% 100% no-repeat; border-radius: 9px; box-shadow: 0 20px 40px -15px #000; }
.ocard-front { transform: rotateY(180deg); align-content: center; gap: 12px; color: #3a2312;
  background: radial-gradient(ellipse at 50% 40%, #eedcb8, #cdb083 70%, #9c7b50); box-shadow: inset 0 0 40px rgba(70,35,10,.5), 0 0 50px rgba(165,140,255,.45); }
/* лицевая сторона: знак Ока и название карты */
.ocard-front svg { width: 42%; height: auto; opacity: .55; }
.ocard-front b { font: 500 clamp(13px, 1.35vw, 19px)/1.15 var(--uni); letter-spacing: .06em; }
.ocard.flipped { transform: rotateY(180deg) translateY(-16px) scale(1.06); animation: none; z-index: 2; }
.ocards.drawn .ocard:not(.flipped) { opacity: .2; transform: scale(.9); }
#oracle-again { margin-top: 22px; }
/* пророчество крупно под картами */
.oracle-reading { min-height: 0; margin: 30px 0 0; font: italic 400 clamp(21px, 2vw, 27px)/1.35 var(--serif); color: var(--bone); text-shadow: 0 0 22px rgba(165,140,255,.45); opacity: 0; }
.oracle-reading.show { animation: fadeUp .9s var(--ease-out) forwards; }
.oracle-reading .or-card { display: block; margin-bottom: 8px; font: 500 12px/1 var(--body); font-style: normal; letter-spacing: .3em; text-transform: uppercase; color: var(--violet); }
.oracle-reading .or-note { display: block; margin-bottom: 10px; font: italic 400 15px var(--serif); color: var(--dim); text-shadow: none; }
.oracle-left { margin: 18px 0 0; font: 400 13px/1.4 var(--body); letter-spacing: .12em; color: var(--dim); }
.oracle-left.tired { color: var(--violet); font: italic 400 18px var(--serif); letter-spacing: 0; }
.sealed .oracle-reading, .sealed .oracle-left { display: none; }
#oracle:not(.sealed) .oracle-msg { display: none; } /* «Не время…» — только пока карты запечатаны */
/* запечатанное гадание */
.ocard-lock { position: absolute; left: 50%; bottom: 12%; width: 40px; height: 40px; translate: -50% 0; border-radius: 47% 53% 50% 50%;
  background: url(opt/seal.webp) center / 135% no-repeat; }
.sealed .ocard-back::after { content: ''; position: absolute; inset: 0; border-radius: 9px; pointer-events: none;
  background: linear-gradient(35deg, transparent 46%, rgba(165,140,255,.35) 47%, rgba(165,140,255,.35) 49%, transparent 50%), linear-gradient(-35deg, transparent 46%, rgba(165,140,255,.35) 47%, rgba(165,140,255,.35) 49%, transparent 50%); }
.ocard.deny { animation: deny .55s; }
@keyframes deny { 20% { transform: translateX(-9px) rotate(-3deg); } 40% { transform: translateX(8px) rotate(2deg); } 60% { transform: translateX(-5px); } 80% { transform: translateX(3px); } }
.oracle-msg { margin: 26px 0 0; min-height: 1.5em; font: italic 400 22px var(--serif); color: var(--violet); text-shadow: 0 0 16px rgba(165,140,255,.6); opacity: 0; }
.oracle-msg.show { animation: msg 3.8s var(--ease-out) forwards; }
@keyframes msg { 0% { opacity: 0; transform: translateY(10px); } 15%, 80% { opacity: 1; transform: none; } 100% { opacity: 0; } }

/* ═══════════ Песни ═══════════ */
.songs { display: grid; grid-template-columns: 1.25fr .75fr; gap: 6vw; max-width: 1240px; margin: 0 auto; align-items: start; }
.song-list { list-style: none; margin: 0; padding: 0; counter-reset: s; }
.song { position: relative; display: grid; grid-template-columns: 64px 1fr auto; align-items: center; gap: 12px; padding: 24px 6px; border-top: 1px solid rgba(236,227,214,.1); cursor: pointer; }
.song:last-child { border-bottom: 1px solid rgba(236,227,214,.1); }
.song::before { content: ''; position: absolute; left: 0; right: 0; top: -1px; height: 1px; background: linear-gradient(90deg, var(--neon), transparent); transform: scaleX(0); transform-origin: left; transition: transform .7s var(--ease); }
html.fine .song:hover::before, .song.playing::before { transform: scaleX(1); }
.song-num { font: 500 20px/1 var(--uni); color: var(--gold); }
.song-title { display: block; font: 500 clamp(26px, 3vw, 44px)/1 var(--uni); transition: transform .6s var(--ease), color .4s; }
.song-sub { display: block; margin-top: 6px; font-size: 14px; color: var(--dim); max-height: 0; opacity: 0; overflow: hidden; transition: max-height .5s, opacity .5s; }
html.fine .song:hover .song-title, .song.playing .song-title { transform: translateX(16px); color: var(--neon2); }
html.fine .song:hover .song-sub, .song.playing .song-sub { max-height: 40px; opacity: 1; transform: translateX(16px); }
.song-thumb { display: none; }
.eq { display: flex; align-items: flex-end; gap: 3px; height: 20px; opacity: .3; transition: opacity .3s; }
.eq i { width: 3px; height: 100%; background: var(--neon); transform-origin: bottom; transform: scaleY(.2); animation: eq .9s ease-in-out infinite alternate paused; }
.eq i:nth-child(2) { animation-delay: -.3s; } .eq i:nth-child(3) { animation-delay: -.6s; } .eq i:nth-child(4) { animation-delay: -.15s; }
html.fine .song:hover .eq, .song.playing .eq { opacity: 1; }
html.fine .song:hover .eq i, .song.playing .eq i { animation-play-state: running; }
@keyframes eq { to { transform: scaleY(1); } }
.song-badge { font: 400 10px/1 var(--body); letter-spacing: .2em; text-transform: uppercase; color: var(--gold); border: 1px solid rgba(214,163,92,.35); padding: 4px 7px; margin-right: 10px; }
.song-right { display: flex; align-items: center; }

.song-play { width: 46px; height: 46px; margin-left: 16px; border-radius: 50%; border: 1px solid rgba(255,45,149,.5); color: var(--neon2); font-size: 14px; transition: all .3s; flex: none; }
html.fine .song-play:hover, .song.playing .song-play { background: var(--neon); color: #fff; box-shadow: 0 0 14px rgba(255,45,149,.8); }
/* пульс в такт — прозрачность готового ореола, а не перерисовка тени каждый кадр (на телефоне это и давало лаги) */
.song-play { position: relative; }
.song.playing .song-play::after { content: ''; position: absolute; inset: -3px; border-radius: 50%; box-shadow: 0 0 26px 6px rgba(255,45,149,.75); opacity: var(--beat, 0); pointer-events: none; will-change: opacity; }
.song.playing .eq i { animation: none; transition: transform .08s; }
.song.playing .song-title { text-shadow: 0 0 14px rgba(255,45,149,.45); }
.songs .vinyl-label::before { content: ''; position: absolute; inset: -6%; border-radius: 50%; box-shadow: 0 0 34px 8px rgba(255,45,149,.85); opacity: var(--beat, 0); pointer-events: none; will-change: opacity; }
.now { position: fixed; left: 20px; bottom: 20px; z-index: 550; display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 10px; max-width: calc(100vw - 40px); overflow: hidden;
  background: rgba(10,7,9,.94); border: 1px solid rgba(255,45,149,.35); border-radius: 40px;
  box-shadow: 0 10px 40px -10px #000, 0 0 24px rgba(255,45,149,.3); transform: translateY(140%); transition: transform .6s var(--ease-out); }
.now.on { transform: none; }
.now-disc { width: 30px; height: 30px; border-radius: 50%; flex: none; background: radial-gradient(circle, var(--neon) 0 18%, #111 20%), repeating-radial-gradient(circle, #151515 0 1px, #222 2px 3px); animation: spin 3s linear infinite; }
.now-title { font: 500 18px/1 var(--uni); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.now-toggle { width: 34px; height: 34px; flex: none; border-radius: 50%; background: var(--neon); color: #fff; font-size: 11px; }
.now-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--neon); transform-origin: left; transform: scaleX(0); }
.song-preview { position: sticky; top: 18vh; aspect-ratio: 1; }
.sleeve { position: absolute; inset: 0 14% 0 0; background: var(--ink2) center/cover; box-shadow: 0 30px 60px -20px #000, 0 0 0 1px rgba(214,163,92,.2); transition: background-image .4s; z-index: 2; }
.sleeve::after { content: ''; position: absolute; inset: 0; background: linear-gradient(120deg, rgba(255,255,255,.1), transparent 40%); }
.vinyl { position: absolute; top: 4%; bottom: 4%; right: 0; aspect-ratio: 1; border-radius: 50%; transition: transform 1s var(--ease-out);
  background: radial-gradient(circle, transparent 0 17%, #0c0c0c 17.5%), repeating-radial-gradient(circle, #121212 0 1px, #1c1c1c 2px 3px); box-shadow: 0 20px 50px #000; animation: spin 5s linear infinite; }
.vinyl::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(from 30deg, transparent, rgba(255,255,255,.08) 10%, transparent 20%, transparent 50%, rgba(255,255,255,.06) 60%, transparent 70%); }
.vinyl-label { position: absolute; inset: 33%; border-radius: 50%; background: var(--blood) center/cover; box-shadow: 0 0 0 3px #0c0c0c; }
.vinyl-label::after { content: ''; position: absolute; inset: 44%; border-radius: 50%; background: var(--ink); }
.songs.hovering .vinyl { transform: translateX(16%); }
@keyframes spin { to { rotate: 360deg; } }

/* ═══════════ Финал ═══════════ */
.finale { position: relative; padding: 20vh 6vw 10vh; text-align: center; overflow: hidden; }
.finale-q { position: relative; display: inline-block; font: 700 clamp(160px, 30vw, 380px)/1 var(--uni); color: var(--neon); text-shadow: 0 0 40px var(--neon), 0 0 120px rgba(255,45,149,.5); animation: flicker 4s infinite; }
.finale-q::before, .finale-q::after { content: attr(data-text); position: absolute; inset: 0; color: var(--neon); }
.finale-q::before { color: #3cf; mix-blend-mode: screen; animation: glitchA 3.5s infinite steps(1); }
.finale-q::after { color: #ff0; mix-blend-mode: screen; animation: glitchB 3.5s infinite steps(1); }
@keyframes glitchA { 0%,92%,100% { transform: none; clip-path: none; opacity: 0; } 93% { opacity: .7; transform: translate(-6px, 2px); clip-path: inset(20% 0 50% 0); } 96% { opacity: .7; transform: translate(5px, -3px); clip-path: inset(60% 0 10% 0); } }
@keyframes glitchB { 0%,90%,100% { transform: none; clip-path: none; opacity: 0; } 91% { opacity: .6; transform: translate(6px, 0); clip-path: inset(40% 0 30% 0); } 95% { opacity: .6; transform: translate(-4px, 2px); clip-path: inset(10% 0 70% 0); } }
.finale-text { margin: 10px 0 0; font: 400 clamp(26px, 3.2vw, 46px)/1.2 var(--serif); font-style: italic; }
.finale-small { margin: 12vh 0 0; font-size: 12px; letter-spacing: .3em; text-transform: uppercase; color: rgba(163,149,138,.6); }

/* ═══════════ Страница кодекса ═══════════ */
.entry { position: fixed; inset: 0; z-index: 500; overflow-y: auto; overscroll-behavior: contain; background: #060507;
  clip-path: circle(0 at var(--cx, 50%) var(--cy, 50%)); transition: clip-path .9s var(--ease-out); }
.entry.open { clip-path: circle(150% at var(--cx, 50%) var(--cy, 50%)); }
.entry-close, .entry-arrow { position: fixed; z-index: 3; width: 52px; height: 52px; border-radius: 50%; border: 1px solid rgba(236,227,214,.25); background: rgba(10,7,9,.85); font-size: 18px; transition: all .3s; }
html.fine .entry-close:hover, html.fine .entry-arrow:hover { border-color: var(--neon); color: #fff; box-shadow: 0 0 20px rgba(255,45,149,.5); }
.entry-close { top: 22px; right: 22px; }
.entry-arrow { bottom: 22px; }
.entry-arrow.prev { right: 86px; } .entry-arrow.next { right: 22px; }
.entry-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 100vh; transition: opacity .35s; }
.entry-body.swap { opacity: 0; }
.entry-media { position: sticky; top: 0; height: 100svh; overflow: hidden; }
.entry-media img, .entry-media video { width: 100%; height: 100%; object-fit: cover; animation: kenburns 22s ease-in-out infinite alternate; }
.entry-media::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent 55%, rgba(6,5,7,.98)), linear-gradient(transparent 70%, rgba(6,5,7,.6)); }
.entry-media .crack { position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: .55; }
.entry-noimg { display: grid; place-items: center; font: 700 200px var(--uni); color: var(--neon); text-shadow: 0 0 40px var(--neon); }
.entry-info { padding: 14vh 8vw 14vh 3vw; max-width: 760px; }
.entry-info > * { opacity: 0; transform: translateY(30px); }
.entry.open .entry-info > * { animation: fadeUp .9s var(--ease-out) forwards; animation-delay: calc(.35s + var(--i, 0) * .08s); }
.entry-info h2 { margin: 16px 0 6px; font: 500 clamp(52px, 6.5vw, 116px)/.92 var(--uni); }
.entry-ep { margin: 0 0 26px; font: italic 400 24px var(--serif); color: var(--neon2); }
.entry-text { font-size: 19px; color: #d9cfc3; margin: 0 0 10px; }
.entry-text::first-letter { float: left; font: 700 78px/.8 var(--uni); color: var(--gold); margin: 8px 10px 0 0; }
.entry-quote { margin: 0 0 28px; padding: 4px 0 4px 22px; border-left: 2px solid var(--neon); font: italic 400 clamp(22px, 2vw, 28px)/1.3 var(--serif); color: var(--bone); text-shadow: 0 0 20px rgba(255,45,149,.35); }
.entry-quote::before { content: '«'; } .entry-quote::after { content: '»'; }
.entry-info .scene-actions .btn { margin-top: 12px; }
.clip { margin-top: 34px; }
.clip video { width: 100%; margin-top: 12px; aspect-ratio: 16 / 9; background: #000; border: 1px solid rgba(255,45,149,.3); box-shadow: 0 0 40px -10px rgba(255,45,149,.5); }
.song-badge.hot { color: var(--neon2); border-color: rgba(255,45,149,.5); box-shadow: 0 0 12px -2px rgba(255,45,149,.5); }
.finale-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 14px; }
.btn.listen { gap: 10px; padding: 11px 22px 11px 12px; text-transform: none; letter-spacing: .06em; font-size: 15px; border-color: rgba(236,227,214,.25); border-radius: 40px; }
.btn.listen .li { width: 26px; height: 26px; flex: none; }
.btn.listen::before { background: rgba(255,255,255,.08); }
html.fine .btn.listen:hover { border-color: var(--bone); box-shadow: 0 0 24px rgba(255,255,255,.12); }
.btn.listen span { transform: none !important; opacity: .6; }
.nav-social, #nav-social { display: flex; align-items: center; gap: 8px; }
.sound-toggle { display: flex; align-items: flex-end; justify-content: center; gap: 2px; width: 26px; height: 26px; padding: 6px 5px; border-radius: 50%; border: 1px solid rgba(255,45,149,.5); margin-right: 4px; }
.sound-toggle i { width: 2px; height: 100%; background: var(--neon2); transform-origin: bottom; animation: eq .8s ease-in-out infinite alternate; }
.sound-toggle i:nth-child(2) { animation-delay: -.3s; } .sound-toggle i:nth-child(3) { animation-delay: -.6s; } .sound-toggle i:nth-child(4) { animation-delay: -.15s; }
.sound-toggle.off { border-color: rgba(236,227,214,.25); }
.sound-toggle.ask { animation: ask 1s ease-in-out infinite; }
@keyframes ask { 50% { box-shadow: 0 0 0 6px rgba(255,45,149,.25), 0 0 20px var(--neon); } }
.sound-toggle.off i { animation: none; transform: scaleY(.2); background: var(--dim); }
.sound-toggle:not(.off) i { animation-play-state: paused; transform: scaleY(.45); }
html:has(.card.sing) .sound-toggle:not(.off) i { animation-play-state: running; }
.card-sing { position: absolute; top: 18px; left: 18px; z-index: 2; padding: 5px 10px; border-radius: 20px; background: rgba(7,6,10,.7); border: 1px solid var(--fc); color: #fff; font: 400 12px/1 var(--body); letter-spacing: .05em; opacity: 0; transform: translateY(-6px); transition: opacity .4s, transform .4s; pointer-events: none; }
.card.sing .card-sing { opacity: 1; transform: none; }
/* ♪ на карточке: тема героя по нажатию (на телефоне — всегда видна, на ПК — при наведении) */
.card-play { position: absolute; top: 14px; right: 14px; z-index: 3; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(7,6,10,.72); border: 1px solid var(--fc); color: #fff; font-size: 16px; line-height: 1; transition: opacity .3s, background .3s, box-shadow .3s; }
html.fine .card-play:hover { background: var(--neon); border-color: var(--neon); box-shadow: 0 0 18px rgba(255,45,149,.6); }
html.fine .card-play { opacity: 0; }
html.fine .card:hover .card-play, html.fine .card.sing .card-play, html.fine .card-play:focus-visible { opacity: 1; }
.card-sing { right: 64px; overflow: hidden; text-overflow: ellipsis; }
html:not(.fine) .sound-toggle { display: none; }
/* громкость: кнопка в шапке, по нажатию — ползунок */
.vol-wrap { position: relative; display: flex; }
.vol-btn { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; border: 1px solid rgba(236,227,214,.3); color: var(--bone); opacity: .8; transition: opacity .3s, border-color .3s; }
.vol-btn .ic { width: 15px; height: 15px; fill: currentColor; }
html.fine .vol-btn:hover, .vol-btn[aria-expanded="true"] { opacity: 1; border-color: var(--neon2); }
.vol-btn.mute .vol-w { opacity: 0; }
.vol-pop { position: absolute; top: calc(100% + 10px); right: -8px; z-index: 5; padding: 12px 14px; border-radius: 12px; background: rgba(12,9,16,.94); border: 1px solid rgba(236,227,214,.14); box-shadow: 0 14px 30px -10px #000; }
.vol-pop[hidden] { display: none; }
#vol { -webkit-appearance: none; appearance: none; display: block; width: 140px; height: 22px; background: transparent; cursor: pointer; }
#vol::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: linear-gradient(90deg, var(--neon) var(--v, 100%), rgba(236,227,214,.18) 0); }
#vol::-moz-range-track { height: 4px; border-radius: 2px; background: linear-gradient(90deg, var(--neon) var(--v, 100%), rgba(236,227,214,.18) 0); }
#vol::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; margin-top: -6px; border-radius: 50%; background: var(--bone); box-shadow: 0 0 10px var(--neon); }
#vol::-moz-range-thumb { width: 16px; height: 16px; border: 0; border-radius: 50%; background: var(--bone); box-shadow: 0 0 10px var(--neon); }
.nav-social a { display: block; width: 26px; height: 26px; opacity: .75; transition: opacity .3s, transform .3s; }
html.fine .nav-social a:hover { opacity: 1; transform: translateY(-2px); }
.nav-social .li { width: 100%; height: 100%; }
.lyrics { margin: 34px 0 0; padding: 30px 32px; white-space: pre-line; font: 400 21px/1.5 var(--hand); color: #3b2414; background: radial-gradient(ellipse at 50% 40%, #ecd9b0, #c9ab7a 80%); box-shadow: inset 0 0 50px rgba(70,35,10,.55); }
.rel { margin-top: 30px; }
.rel h4 { margin: 0 0 10px; font: 400 11px/1 var(--body); letter-spacing: .35em; text-transform: uppercase; color: var(--dim); }
.gal { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 34px; }
.gal button { width: 92px; height: 120px; overflow: hidden; border: 1px solid rgba(214,163,92,.25); transition: all .4s; }
html.fine .gal button:hover { border-color: var(--neon); transform: translateY(-4px); box-shadow: 0 10px 30px -10px var(--neon); }
.gal img { width: 100%; height: 100%; object-fit: cover; }
.play-btn { margin-top: 26px; }

.lightbox { position: fixed; inset: 0; z-index: 600; display: grid; place-items: center; background: rgba(0,0,0,.95); animation: fadeIn .4s; }
.lightbox img { max-width: 94vw; max-height: 94svh; object-fit: contain; animation: zoomIn .6s var(--ease-out); box-shadow: 0 0 80px rgba(255,45,149,.2); }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes zoomIn { from { transform: scale(.9); opacity: 0; } }

/* ═══════════ Пасхалка: «хаос» ═══════════ */
body.glitch main { animation: glitch .1s steps(2) 12; }
@keyframes glitch { 0% { transform: translate(0); filter: none; } 50% { transform: translate(-7px, 3px) skewX(3deg); filter: hue-rotate(80deg) saturate(3) contrast(1.4); } 100% { transform: translate(6px, -2px); filter: invert(.1); } }

/* ═══════════ Адаптив ═══════════ */
@media (max-width: 900px) {
  body { font-size: 17px; }
  .sec { padding: 14vh 16px 10vh; }
  .nav { padding: 14px 16px; flex-direction: column; align-items: stretch; gap: 8px; }
  .nav.scrolled { padding: 8px 16px; }
  .nav-logo { text-align: center; font-size: 19px; }
  .nav-social { position: absolute; top: 12px; right: 14px; }
  .nav.scrolled .nav-social { top: 6px; }
  .btn.listen { font-size: 14px; }
  .nav-links { justify-content: flex-start; margin: 0 -16px; padding: 0 10px; }
  .fuse { display: none; }

  .hero { grid-template-columns: 1fr; padding: 0 16px 90px; align-items: end; }
  .fog { display: none; }
  .hero-portrait { position: absolute; inset: 0; width: auto; height: auto; aspect-ratio: auto; justify-self: stretch; z-index: 0; }
  .hero-portrait::after { content: ''; position: absolute; inset: 0; background: linear-gradient(rgba(7,6,10,.2), rgba(7,6,10,.35) 40%, var(--ink) 92%); }
  .hero-flame { left: 30%; top: 4%; width: 40%; }
  .hero-portrait { container-type: size; }
  .hero-shards { inset: auto; left: 50%; translate: -50% 0; width: max(100cqw, 100cqh * .6712); height: max(100cqh, 100cqw * 1.4898); top: calc((100cqh - max(100cqh, 100cqw * 1.4898)) * .2); }

  .prologue { height: 260vh; }
  .prologue-sticky { padding: 0 16px; }

  .cards { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .card-body { padding: 50px 14px 16px; }
  .card h3 { font-size: 24px; }
  .card-ep { display: none; }
  .card-tag { display: block; letter-spacing: .18em; line-height: 1.4; }
  .now { left: 12px; bottom: 12px; }

  .chron-head { padding: 0 16px; }
  .chron-track { padding: 0 16px; gap: 24px; }
  .chron-panel { flex-basis: 84vw; grid-template-columns: 1fr; gap: 16px; }
  .chron-img, .chron-future { aspect-ratio: 16 / 10; max-height: 30svh; }
  .chron-future { font-size: 110px; }
  .chron-panel p { font-size: 15px; }
  .chron-fuse { left: 16px; right: 16px; bottom: 4svh; }

  .scene-text { margin: 0 16px; }
  .scene-letter { grid-template-columns: 1fr; padding: 10vh 16px; }
  .letter-stage { height: 80svh; }
  .parchment { padding: 30px 26px; }
  .torch-hint { right: 16px; top: 10vh; }
  .torch-light { background: radial-gradient(circle 175px at 50% 50%, rgba(255,150,60,.16) 0, rgba(20,8,2,.35) 70px, rgba(2,1,1,.97) 175px); }

  /* карта на телефоне: высокая полоса, листается пальцем по горизонтали */
  .map-stage { aspect-ratio: auto; height: 62svh; overflow-x: auto; overflow-y: hidden; perspective: none; scrollbar-width: none; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; margin: 0 -16px; border-left: 0; border-right: 0; }
  .map-stage::-webkit-scrollbar { display: none; }
  .map-tilt { position: relative; width: calc((62svh - 2px) * 1.6); height: 100%; }
  .map-panel { position: static; width: auto; margin-top: 14px; }
  .map-reset { display: none; }

  .oracle { grid-template-columns: 1fr; }
  .oracle-portrait { max-width: 260px; margin: 0 auto; }
  .ocards { gap: 10px; }

  .songs { grid-template-columns: 1fr; }
  .song-preview { display: none; }
  .song { grid-template-columns: 54px 1fr auto; padding: 18px 4px; }
  .song-thumb { display: block; width: 44px; height: 44px; object-fit: cover; border-radius: 50%; }
  .song.playing .song-thumb { animation: spin 6s linear infinite; } /* крутится только играющая */
  .finale-q::before, .finale-q::after { display: none; } /* RGB-глитч с режимом смешивания — только на ПК */
  .song-num { display: none; }
  .song-badge { display: none; }

  .entry-body { grid-template-columns: 1fr; }
  .entry-media { position: relative; height: 62svh; }
  .entry-media::after { background: linear-gradient(transparent 50%, rgba(6,5,7,.98)); }
  .entry-info { padding: 0 20px 110px; margin-top: -60px; position: relative; }
  .entry-close { top: 14px; right: 14px; }
  /* стрелки — наверх, к крестику: внизу они перекрывали текст */
  .entry-arrow { top: 14px; bottom: auto; width: 46px; height: 46px; }
  .entry-arrow.prev { left: 14px; right: auto; } .entry-arrow.next { left: 68px; right: auto; }
  .entry-close { width: 46px; height: 46px; }
  /* полоса под кнопками: прокручиваемый текст уходит под неё, а не смешивается с кнопками */
  .entry::before { content: ''; position: fixed; left: 0; right: 0; top: 0; height: 100px; z-index: 2; pointer-events: none; background: linear-gradient(rgba(6,5,7,.97) 68%, rgba(6,5,7,0)); }
  body::after { display: none; } /* зерно на телефоне не нужно: лишний полноэкранный слой */
  /* кодекс на телефоне открывается проявлением: clip-path-круг перерисовывал весь экран каждый кадр */
  .entry { clip-path: none; opacity: 0; transition: opacity .4s ease; }
  .entry.open { clip-path: none; opacity: 1; }
  .entry-body { transform: translateY(26px); transition: transform .55s var(--ease-out), opacity .35s; }
  .entry.open .entry-body { transform: none; }
  .card-in { will-change: auto; }
  .card-sing { top: 12px; left: 10px; right: 56px; font-size: 11px; }
  .card-play { top: 10px; right: 10px; width: 38px; height: 38px; }
}

/* бесконечные анимации вне экрана — на паузе (класс .off ставит IntersectionObserver) */
.off, .off * { animation-play-state: paused !important; }
/* видимый фокус для клавиатуры */
:focus-visible { outline: 2px solid var(--neon2); outline-offset: 3px; }
.card:focus-visible { outline: none; }
.card:focus-visible .card-in { box-shadow: 0 0 0 2px var(--neon2), 0 0 40px -6px var(--neon); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
  html { scroll-behavior: auto; }
  #embers { display: none; }
}

/* векторные иконки в кнопках (вместо ▶ ❚❚ ♪: на Android это цветные эмодзи) */
.ic { width: 1em; height: 1em; fill: currentColor; vertical-align: -.14em; flex: none; pointer-events: none; }
.card-play .ic, .song-play .ic, .now-toggle .ic { vertical-align: middle; }

/* ── новинка (новая песня / раскрытый герой): newDays дней после выхода ── */
.new-tag { display: inline-block; margin: 0 10px 6px 0; padding: 4px 9px 3px; border-radius: 20px; background: var(--neon); color: #fff; font: 600 9.5px/1 var(--body); letter-spacing: .22em; text-transform: uppercase; box-shadow: 0 0 16px rgba(255,45,149,.7); vertical-align: middle; }
.card.is-new .card-in { box-shadow: 0 20px 40px -20px rgba(0,0,0,.9), 0 0 0 1px rgba(255,45,149,.75), 0 0 30px -6px rgba(255,45,149,.8); }
.song.is-new { background: linear-gradient(90deg, rgba(255,45,149,.1), transparent 70%); }
.song.is-new .song-num { color: var(--neon); text-shadow: 0 0 12px var(--neon); }
.song-badge.new { border-color: var(--neon); background: var(--neon); color: #fff; }
.nav-links a.has-new { position: relative; }
.nav-links a.has-new::after { content: ''; position: absolute; top: -3px; right: -9px; width: 6px; height: 6px; border-radius: 50%; background: var(--neon); box-shadow: 0 0 10px var(--neon); animation: newPing 1.8s ease-in-out infinite; }
@keyframes newPing { 50% { opacity: .35; transform: scale(.7); } }
.news { display: flex; align-items: center; gap: 10px; margin-top: 18px; padding: 10px 18px 10px 14px; border: 1px solid rgba(255,45,149,.55); border-radius: 30px; background: rgba(10,7,9,.6); color: var(--bone); font: 400 15px/1 var(--body); letter-spacing: .04em;
  opacity: 0; transform: translateY(20px); transition: opacity 1.2s 1.3s var(--ease-out), transform 1.2s 1.3s var(--ease-out), border-color .3s, box-shadow .3s; }
body.entered .news { opacity: 1; transform: none; }
html.fine .news:hover { border-color: var(--neon); box-shadow: 0 0 24px rgba(255,45,149,.45); }
.news-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--neon); box-shadow: 0 0 10px var(--neon); animation: newPing 1.8s ease-in-out infinite; }
