/* Эмилия — сайт: три блока. Сетка 8 px · шкала 13/15/17/20/24/40/64/96/160 · одни кривые и длительности.
   Лёгкость: без backdrop-filter и фильтров на двигающихся слоях; свет — статичные градиенты; двигаются только transform и opacity. */
@font-face { font-family: 'Onest'; src: url(../assets/fonts/Onest.woff2) format('woff2'); font-weight: 100 900; font-display: block; }
@font-face { font-family: 'Unbounded'; src: url(../assets/fonts/Unbounded.woff2) format('woff2'); font-weight: 200 900; font-display: block; }
@font-face { font-family: 'Cormorant'; src: url(../assets/fonts/Cormorant-Italic.woff2) format('woff2'); font-weight: 300 700; font-style: italic; font-display: block; }
:root {
  --bg: #0a090e; --panel: #131119; --panel-2: #18151f;
  --line: rgba(255, 255, 255, .07); --line-2: rgba(255, 255, 255, .12); --hi: rgba(255, 255, 255, .07);
  --text: #f3f0f8; --text-2: #bcb5c9; --text-3: #8d869b;
  --lilac: #c9a0ff; --name: #ffd9f2; --pink: #ff7ad9;
  --sans: 'Onest', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --head: 'Unbounded', 'Onest', system-ui, sans-serif; --serif: 'Cormorant', Georgia, serif;
  --e-out: cubic-bezier(.16, 1, .3, 1); --e-spring: cubic-bezier(.34, 1.4, .64, 1);
  --d-1: .16s; --d-2: .32s; --d-3: .7s;
  --wrap: 1120px; --pad: 20px;
  --murk: #050408; --gap: 96px;   /* мрак в конце второго акта; --gap — зазор между вторым и третьим актом */
}
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html { background: var(--bg); color: var(--text); font: 400 16px/1.5 var(--sans); -webkit-font-smoothing: antialiased; scroll-behavior: smooth; scroll-padding-top: 72px; }
body { overflow-x: clip; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--lilac); outline-offset: 3px; border-radius: 8px; }
::selection { background: rgba(201, 160, 255, .35); }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--pad); }
.only-desk { display: none !important; }
.skip { position: fixed; z-index: 200; left: 16px; top: -60px; padding: 10px 14px; border-radius: 10px; background: var(--text); color: #120f18; font-weight: 600; transition: top var(--d-2) var(--e-out); }
.skip:focus { top: 12px; }
.eyebrow { font: 600 13px/1 var(--sans); color: var(--lilac); letter-spacing: .02em; }
.note { margin-top: 16px; font: 400 13px/1.5 var(--sans); color: var(--text-3); }

/* ── шапка: сплошной полупрозрачный фон после начала прокрутки (без размытия) ── */
.top { position: fixed; z-index: 50; inset: 0 0 auto; border-bottom: 1px solid transparent; transition: background var(--d-2), border-color var(--d-2), opacity .9s var(--e-out); }
.js:not(.go) .top { opacity: 0; }   /* шапка выходит вместе с первым экраном, а не раньше него */
.top.solid { background: rgba(10, 9, 14, .92); border-color: var(--line); }
.top .wrap { height: 64px; display: flex; align-items: center; gap: 24px; }
.logo { display: flex; align-items: center; gap: 10px; font: 700 15px/1 var(--sans); letter-spacing: -.01em; }
.logo .wm { width: auto; height: 17px; transition: opacity var(--d-2); } .logo:hover .wm { opacity: .8; }
/* в шапке — значок (имя крупно уже на первом экране, второе «Эмилия» рядом лишнее); тот же файл, что иконка вкладки — уже в кэше */
.logo .mark { width: auto; height: 28px; display: block; transition: opacity var(--d-2); } .logo:hover .mark { opacity: .85; }   /* логотип — в самой странице, не отдельной загрузкой */   /* надпись-логотип: «Э»-луна + Unbounded 700 */
.nav { display: none; gap: 4px; font: 500 14px/1 var(--sans); color: var(--text-2); }
.nav a { padding: 8px 12px; border-radius: 8px; transition: color var(--d-1), background var(--d-1); }
.nav a:hover { color: var(--text); background: rgba(255, 255, 255, .05); }
.grow { flex: 1; }

/* ── кнопки: приятное нажатие (пружина на отпускании) ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 10px; font: 600 14px/1 var(--sans); white-space: nowrap;
  transition: transform var(--d-2) var(--e-spring), background var(--d-2); }
.btn:active { transform: scale(.96); transition-duration: var(--d-1); }
.btn svg { width: 16px; height: 16px; flex: none; }
.btn-light { background: var(--text); color: #120f18; box-shadow: 0 1px 0 rgba(255, 255, 255, .7) inset, 0 8px 24px -14px rgba(0, 0, 0, .8); }
.btn-light:hover { background: #fff; }
.btn-ghost { background: rgba(255, 255, 255, .04); box-shadow: 0 0 0 1px var(--line-2) inset; }
.btn-ghost:hover { background: rgba(255, 255, 255, .08); }
.btn-lg { height: 54px; padding: 0 24px; font-size: 16px; border-radius: 15px; }
.btn-sm { height: 36px; padding: 0 14px; font-size: 13px; border-radius: 10px; }
.btn em, .chan em { font: 600 11px/1 var(--sans); font-style: normal; padding: 4px 7px; border-radius: 6px; background: rgba(18, 15, 24, .1); }
.btn.is-off { cursor: default; opacity: .6; box-shadow: none; } .btn.is-off:active { transform: none; }

/* ── появление: один рецепт на всё ── */
@keyframes up { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes islandUp { from { opacity: 0; transform: translate(-50%, 16px); } }   /* у плашки свой сдвиг на центр — его не затирать */
@keyframes rise { from { opacity: 0; transform: translateY(42%) scale(.94); } }
/* загрузка: первый экран ждёт шрифт и её первый кадр (.go, не дольше 3 с), потом выходит по порядку:
   акт и подпись → имя по буквам → ленты → островок → кнопка; она вылезает последней (site.js) */
.js .in { animation: up 1s var(--e-out) both; animation-delay: calc(var(--d, 0) * 90ms + 80ms); }
.js:not(.go) .in, .js:not(.go) .hero-title .ch { animation-play-state: paused; }
.js .hero-name .act, .js .tape, .js .hero-copy { opacity: 0; transition: opacity 1s var(--e-out), transform 1s var(--e-out); }
.js .hero-name .act, .js .hero-copy { transform: translateY(10px); }
.go .hero-name .act { opacity: 1; transform: none; }
.go .tape { opacity: .38; transition-duration: 1.6s; transition-delay: .5s; }
.go .hero-copy { opacity: 1; transform: none; transition-delay: .9s; }
.js .island.in { animation-name: islandUp; } .hero .island.in { --d: 8; }   /* островок первого экрана выходит восьмым */
.sprite { position: absolute; }

/* ═══ 1. скачать ═══ */
.hero { position: relative; min-height: max(100svh, 680px); padding-top: 96px; overflow: clip; isolation: isolate; }
/* свет сцены — отдельным слоем: загорается вместе с островком, а не раньше всего (.go) */
.hero::before { content: ''; position: absolute; z-index: 0; inset: 0; pointer-events: none;
  background:
    radial-gradient(60% 34% at 50% 92%, rgba(255, 122, 217, .24), transparent 72%),
    radial-gradient(70% 45% at 50% 100%, rgba(160, 104, 214, .4), rgba(160, 104, 214, .08) 55%, transparent 80%),
    radial-gradient(50% 35% at 50% 0%, rgba(255, 217, 242, .07), transparent 70%); }
.js .hero::before, .js #hero .halo { opacity: 0; transition: opacity 1.4s ease .6s; } .go .hero::before, .go #hero .halo { opacity: 1; }
.hero::after { content: ''; position: absolute; z-index: 0; left: 0; right: 0; bottom: 0; height: 180px; background: linear-gradient(rgba(10, 9, 14, 0), var(--bg)); pointer-events: none; }
.hero-copy { position: relative; z-index: 3; text-align: center; }
/* акт пьесы: курсив и орнамент-линии с ромбиком по бокам (как плашки имени в игровых анонсах) */
.act { display: flex; align-items: center; justify-content: center; gap: 14px; font: italic 500 19px/1 var(--serif); color: var(--lilac); }
.act::before, .act::after { content: ''; width: 72px; height: 10px; flex: none; opacity: .75; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='10'%3E%3ClinearGradient id='g'%3E%3Cstop offset='0' stop-color='%23c9a0ff' stop-opacity='0'/%3E%3Cstop offset='1' stop-color='%23c9a0ff'/%3E%3C/linearGradient%3E%3Crect x='0' y='4.5' width='60' height='1' fill='url(%23g)'/%3E%3Crect x='63.5' y='2.5' width='5' height='5' fill='%23c9a0ff' transform='rotate(45 66 5)'/%3E%3C/svg%3E") center / 72px 10px no-repeat; }
.act::after { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='10'%3E%3ClinearGradient id='g'%3E%3Cstop offset='0' stop-color='%23c9a0ff'/%3E%3Cstop offset='1' stop-color='%23c9a0ff' stop-opacity='0'/%3E%3C/linearGradient%3E%3Crect x='12' y='4.5' width='60' height='1' fill='url(%23g)'/%3E%3Crect x='3.5' y='2.5' width='5' height='5' fill='%23c9a0ff' transform='rotate(45 6 5)'/%3E%3C/svg%3E"); }
.sec .act, .v2 .act { margin-bottom: 14px; }
.hero-name { position: relative; z-index: 2; text-align: center; padding: 0 var(--pad); }
.hero-name .act { margin-bottom: 18px; }
.epithet { margin: 0 0 18px; font: italic 500 clamp(18px, 4.6vw, 24px)/1.2 var(--serif); color: #f3e3f6; text-shadow: 0 0 18px rgba(255, 217, 242, .35); }
/* первый экран «кричит»: насыщенное свечение её цветов, аниме-растр точками, косые ленты с именем бегут навстречу */
.tape { position: absolute; left: -10%; right: -10%; height: 64px; display: flex; overflow: hidden; pointer-events: none; opacity: .38;
  border-block: 1px solid rgba(255, 217, 242, .22); background: rgba(255, 122, 217, .05); }
.tape-1 { top: 58%; transform: rotate(-7deg); }
.tape-2 { top: 66%; transform: rotate(5deg); border-color: rgba(201, 160, 255, .22); background: rgba(201, 160, 255, .05); }
.tape div { display: flex; align-items: center; flex: none; animation: tape 26s linear infinite paused; }
.tape-2 div { animation-direction: reverse; animation-duration: 32s; }
.tape span { padding: 0 22px; font: 800 26px/1 var(--head); letter-spacing: .04em; text-transform: uppercase; color: transparent; -webkit-text-stroke: 1px rgba(255, 217, 242, .55); }
.tape-2 span { -webkit-text-stroke-color: rgba(201, 160, 255, .55); }
/* «Э»-луна контуром — как буквы ленты */
.tape .te { display: inline-block; width: .6695em; height: .784em; vertical-align: -.0172em; margin: 0 .034em 0 .026em; overflow: visible;
  fill: none; stroke: rgba(255, 217, 242, .55); stroke-width: 1px; }
.tape-2 .te { stroke: rgba(201, 160, 255, .55); }
.tape i { width: 7px; height: 7px; flex: none; transform: rotate(45deg); background: rgba(255, 217, 242, .6); }
@keyframes tape { to { transform: translateX(-100%); } }
.hero.live .tape div { animation-play-state: running; }
/* облегчённый режим (кадры не успевают): без дыма, пыльцы, крупной пыли; ленты стоят */
.lite .fog, .lite .dust .bk, .lite .glare, .lite .murk i, .lite .moth:nth-child(n+5) { display: none; }   /* мотыльков в облегчённом — четыре */ .lite .tape div, .lite .beam, .lite .v2-sway, .lite .p-al, .lite .p-ar { animation: none !important; }
/* второй экран — минимум: тьма и стеклянный колпак вокруг её окна — одна тонкая светящаяся линия (js/jar.js);
   под стеклом — мотыльки и редкая пыль; в бит колпак вспыхивает */
#play { position: relative; overflow-x: clip; }
.rig-box { position: absolute; z-index: 0; left: 0; right: 0; top: 0; bottom: calc(-1 * var(--gap)); overflow: hidden; pointer-events: none; }
#play .wrap { position: relative; z-index: 1; }
.jar { position: absolute; left: 0; top: 0; overflow: visible; opacity: .85; }
/* второй экран появляется одним движением (site.js: #play.shown, когда он показался; .drawn — после, чтобы перестройка колпака
   при смене размеров не рисовала его заново): заголовок → стекло прорисовывается от шарика вниз → сцена, блики → мотыльки → кнопка */
.jar .ln { stroke-dasharray: 1 1; }
.js #play:not(.shown) .jar .ln { stroke-dashoffset: 1; } .js #play:not(.shown) .jar .lt, .js #play:not(.shown) .win-stage { opacity: 0; }
.js #play:not(.shown) .wrap > .act, .js #play:not(.shown) .sec-title, .js #play:not(.shown) .sec-note, .js #play:not(.shown) .bell-ctl, .js #play:not(.shown) .credit { opacity: 0; }
.js #play.shown:not(.drawn) .jar .ln { animation: jarDraw 1.7s cubic-bezier(.45, 0, .2, 1) .25s both; }
.js #play.shown:not(.drawn) .jar .lt { animation: fadeIn 1.2s ease 1.3s both; }
.js #play.shown:not(.drawn) .win-stage { animation: fadeIn 1s ease .5s both; }
.js #play.shown:not(.drawn) .wrap > .act, .js #play.shown:not(.drawn) .sec-title, .js #play.shown:not(.drawn) .sec-note { animation: up 1s var(--e-out) both; }
.js #play.shown:not(.drawn) .bell-ctl, .js #play.shown:not(.drawn) .credit { animation: up 1s var(--e-out) 1.1s both; }
@keyframes jarDraw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
.hero-fx { position: absolute; z-index: 1; inset: 0; pointer-events: none; }
/* мотыльки (js/moths.js): летают под колпаком, в окно и на текст не залетают; у стекла тают */
.moths { position: absolute; z-index: 0; inset: 0; opacity: 0; transition: opacity 2.4s ease 1.4s; } #play.shown .moths.on { opacity: 1; }   /* проявляются плавно, все разом — когда стекло уже нарисовано */
.moth { position: absolute; left: 0; top: 0; opacity: 0; will-change: transform, opacity; }
.moth b { position: absolute; top: 0; left: 0; width: 50%; height: 100%; background: url(../assets/img/moth-wing.webp) 0 0 / 100% 100%; transform-origin: 100% 50%;
  animation: flapL var(--f) ease-in-out var(--fd) infinite paused; }
.moth b:nth-child(2) { animation-name: flapR; }   /* то же крыло, отражённое через ось тела */
.moth b:nth-child(3) { left: 40%; width: 20%; background-image: url(../assets/img/moth-body.webp); animation: none; }
/* взмахи: три подряд — и планирует */
@keyframes flapL { 0%, 20%, 40%, 62%, 100% { transform: scaleX(1); } 10%, 30%, 50% { transform: scaleX(.2); } }
@keyframes flapR { 0%, 20%, 40%, 62%, 100% { transform: scaleX(-1); } 10%, 30%, 50% { transform: scaleX(-.2); } }
#play.live .moth b { animation-play-state: running; }
/* мрак к концу второго акта: снизу темнеет и ползёт тёмный дым — и без шва уходит в тёмную сцену V2.
   Спад сверху запечён в текстуру дыма (tools/murk.py) — слои только едут вбок, без масок */
.murk { position: absolute; z-index: 0; left: 0; right: 0; bottom: calc(-1 * var(--gap)); height: 64%; overflow: hidden; pointer-events: none;
  background: linear-gradient(rgba(5, 4, 8, 0), rgba(5, 4, 8, .2) 30%, rgba(5, 4, 8, .6) 62%, var(--murk)); }
.murk i { position: absolute; top: 0; left: 0; width: calc(100% + 512px); height: 100%; background: url(../assets/img/murk.webp) 0 0 / 512px 100% repeat-x; opacity: .95;
  animation: fogA 64s linear infinite paused; will-change: transform; }
.murk i + i { left: -800px; width: calc(100% + 800px); background-size: 800px 100%; opacity: .8; animation: fogB 100s linear infinite paused; }
#play.live .murk i { animation-play-state: running; }
.js #play:not(.near) .murk i, .js .v2:not(.near) .fog i { background-image: none; }   /* текстуры дыма — когда блок рядом, не при открытии */
.hero-title { margin-top: 0; font: 800 clamp(56px, 16.5vw, 132px)/.95 var(--head); letter-spacing: -.035em; padding-bottom: .06em; color: #fff3fa; text-shadow: 0 0 44px rgba(255, 217, 242, .3); }
/* «Э»-луна в имени: размеры буквы Unbounded 800 (высота .784em, ниже линии .017em, поля .026/.034em) */
.hero-title .ch-e svg { display: inline-block; width: .6695em; height: .784em; vertical-align: -.0172em; margin: 0 .034em 0 .026em; fill: currentColor; overflow: visible;
  filter: drop-shadow(0 0 22px rgba(255, 217, 242, .3)); }
/* пока имя не разбито на буквы (скрипт ещё грузится) — его не видно: иначе оно мелькало целым и пропадало перед выходом */
.js .hero-title:not(.split) { visibility: hidden; }
.hero-title .ch { display: inline-block; animation: rise 1.1s var(--e-out) both; animation-delay: calc(var(--i) * 55ms + 200ms); }
.hero-cta { margin: 24px auto 0; display: grid; gap: 10px; max-width: 340px; } .hero-cta .btn { width: 100%; }
.req { margin-top: 16px; font: 400 14px/1.5 var(--sans); color: var(--text-3); }
.dl-note { min-height: 20px; margin-top: 8px; font: 500 13px/1.5 var(--sans); color: var(--name); opacity: 0; transition: opacity var(--d-2); }
.dl-note.on { opacity: 1; }
.how-link { margin-top: 6px; font: 500 13.5px/1.4 var(--sans); } .how-link a { color: var(--text-2); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; } .how-link a:hover { color: var(--text); }
/* установка — в «Программке»: две карточки рядом (на телефоне — друг под другом) */
.how-sub { margin: 48px auto 0; font: 700 22px/1.2 var(--head); letter-spacing: -.02em; scroll-margin-top: 88px; }
.install-grid { max-width: 880px; margin: 20px auto 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); text-align: left; }
.install-card { padding: 20px 22px; border-radius: 14px; box-shadow: 0 0 0 1px var(--line-2) inset; font: 400 14px/1.55 var(--sans); color: var(--text-2); }
.install-card h3 { font: 600 16px/1.2 var(--sans); color: var(--text); }
.install-card ol { margin: 12px 0 0; padding-left: 20px; display: grid; gap: 8px; } .install-card p { margin-top: 10px; color: var(--text-3); }
.install-card code { font: 500 12.5px/1.4 ui-monospace, monospace; color: var(--text-2); background: rgba(255, 255, 255, .05); padding: 1px 5px; border-radius: 5px; overflow-wrap: anywhere; }/* сцена: низ — «край экрана», на нём островок; она на островке. Пустой верх её кадра может заходить под кнопки */
.stage { --fw: min(calc((100vw - 24px) / .86), 560px, calc((100svh - 560px) / .44)); --ih: clamp(22px, calc(var(--fw) * .052), 40px); position: absolute; z-index: 1; left: 0; right: 0; bottom: 0; height: calc(var(--fw) * .547 + 72px); }
/* её кадр целиком (768×468), линия ролика (y = 419) — ровно по верхней кромке плашки; она поверх плашки, кисти лежат на ней — как в программе */
.emi { position: absolute; z-index: 4; left: 50%; bottom: calc(24px + var(--ih) - var(--fw) * 49 / 768); width: var(--fw); aspect-ratio: 768 / 468; transform: translateX(-50%); overflow: hidden; pointer-events: none; }
.emi canvas { position: absolute; left: 0; top: 0; display: block; width: 100%; height: 100%; }
.halo { position: absolute; z-index: 0; left: 50%; bottom: 40px; width: calc(var(--fw) * 1.1); aspect-ratio: 1.7; transform: translateX(-50%); border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(170, 120, 255, .34), rgba(150, 100, 255, .1) 55%, transparent); }
/* островок — капсула со статусами, как в программе (без размытия фона) */
/* ширина — под её размах у линии (в программе островок закрывает линию среза кадра: крылья до 83 % ширины кадра) */
/* толщина плашки — от её размера (как в программе: ~5 % ширины кадра), на телефоне тоньше */
.island { position: absolute; z-index: 3; left: 50%; bottom: 24px; width: calc(var(--fw) * .86); height: var(--ih); padding: 0 calc(var(--ih) * .45); transform: translateX(-50%); display: flex; align-items: center; justify-content: space-between; gap: 16px; border-radius: calc(var(--ih) * .35);
  background: linear-gradient(180deg, #1f1a2a, #14111b); box-shadow: 0 0 0 1px rgba(255, 255, 255, .1) inset, 0 1px 0 rgba(201, 160, 255, .4) inset, 0 16px 32px -16px #000;
  font: 600 clamp(10px, calc(var(--ih) * .33), 13px)/1 var(--sans); color: #d9d2e6; white-space: nowrap; }
.ig { display: inline-flex; align-items: center; gap: clamp(10px, calc(var(--ih) * .4), 16px); }
.il { display: inline-flex; align-items: center; gap: 5px; font-variant-numeric: tabular-nums; } .il svg { width: clamp(11px, calc(var(--ih) * .35), 14px); height: clamp(11px, calc(var(--ih) * .35), 14px); } .il:first-child svg { color: var(--lilac); }
.island .flash { position: absolute; inset: -1px; border-radius: inherit; pointer-events: none; opacity: 0; box-shadow: 0 0 0 1px rgba(232, 218, 255, .6) inset, 0 0 32px rgba(201, 160, 255, .55); }
/* плашка в окне «Попробуй» — из того же тёмного стекла, что окно: зерно, свет сверху по кромке (как у окна), сиреневое свечение */
#play .island { background: url(../assets/img/grain.webp) 0 0 / 160px, linear-gradient(180deg, rgba(46, 33, 70, .82), rgba(17, 13, 25, .9) 60%, rgba(12, 10, 18, .92));
  box-shadow: 0 0 0 1px rgba(201, 160, 255, .12) inset, 0 -10px 30px -8px rgba(170, 120, 255, .22), 0 14px 30px -14px #000; color: #e4dcf2; }
#play .island::before { content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 217, 242, .6), rgba(201, 160, 255, .22) 55%, rgba(255, 255, 255, .05));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); }
#play .island::after { content: ''; position: absolute; left: 14%; right: 14%; top: 0; height: 1px; pointer-events: none; background: linear-gradient(90deg, transparent, rgba(255, 244, 252, .85), transparent); }

/* ═══ 2. потыкать ═══ */
.sec { padding-top: 112px; }
@media (max-width: 759px) { .sec { padding-top: 56px; } }
.sec-title { font: 800 clamp(34px, 9vw, 56px)/1 var(--head); letter-spacing: -.03em; text-align: center; }
.sec-note { margin: 12px auto 0; max-width: 30em; text-align: center; font: 400 14px/1.45 var(--sans); color: var(--text-3); text-wrap: balance; }
/* матовое стекло без размытия на лету: за окном — те же кольца, а внутри окна — их заранее размытая копия,
   крутится синхронно (то же место, размер и анимация); сверху — зерно стекла и свет сверху по кромке */
/* она под стеклянным колпаком (js/jar.js) — без окна; кнопка и состояние — под подставкой */
.bell { position: relative; margin: 52px auto 0; }   /* шарик колпака — не вплотную к подписи */
@media (max-width: 759px) { .bell { margin-top: 40px; } }
#play .halo { width: min(calc(var(--fw) * 1.1), 100%); }   /* свечение за ней — внутри сцены, без обрезанных краёв (на телефоне сцена уже) */
.bell-ctl { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-top: 30px; }
.bell-ctl .key { width: min(100%, 340px); }
/* выбор трека — два тихих переключателя под кнопкой */
.tracks { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.tracks button { height: 34px; padding: 0 14px; border-radius: 999px; font: 500 13px/1 var(--sans); color: var(--text-3); box-shadow: 0 0 0 1px var(--line-2) inset; transition: color var(--d-2), box-shadow var(--d-2), background var(--d-2); }
.tracks button:hover { color: var(--text-2); }
.tracks button[aria-checked="true"] { color: var(--text); background: rgba(201, 160, 255, .06); box-shadow: 0 0 0 1px rgba(201, 160, 255, .4) inset; }
.win-state { display: inline-flex; align-items: center; gap: 8px; font: 500 13px/1 var(--sans); color: var(--text-3); font-variant-numeric: tabular-nums; }
.win-state::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--text-3); transition: background var(--d-2); }
.win-state.live::before { background: var(--lilac); }
.win-state b { color: var(--name); font-weight: 600; }
.win-stage { --fw: min(calc((100vw - 2 * var(--pad) - 24px - 2 * var(--ring, 0px)) / .86), 520px); --ih: clamp(22px, calc(var(--fw) * .052), 40px); position: relative; height: calc(var(--fw) * .547 + 80px); overflow: hidden; isolation: isolate;
}   /* сцена окна — прозрачная; свет только ореол за ней */
.key { height: 60px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; border-radius: 14px; font: 600 16px/1.2 var(--sans); color: var(--text);
  background: transparent; box-shadow: 0 0 0 1px rgba(255, 255, 255, .1) inset; transition: transform var(--d-2) var(--e-spring), background var(--d-2), box-shadow var(--d-2); }
.key:hover { background: rgba(255, 255, 255, .04); box-shadow: 0 0 0 1px rgba(255, 255, 255, .18) inset; } .key:active { transform: scale(.96); transition-duration: var(--d-1); }
.key svg { width: 20px; height: 20px; flex: none; color: var(--lilac); }
.key-music { box-shadow: 0 0 0 1px rgba(255, 217, 242, .32) inset; } .key-music:hover { box-shadow: 0 0 0 1px rgba(255, 217, 242, .5) inset; } .key-music svg { color: var(--name); }
.lbl-s { display: none; }
@media (max-width: 759px) { .act { font-size: 16px; gap: 8px; white-space: nowrap; } .act::before, .act::after { width: 26px; background-size: 72px 10px; } .act::before { background-position: right center; } .act::after { background-position: left center; } .key { font-size: 15px; } }
.key-music.on { background: rgba(201, 160, 255, .06); color: var(--text); box-shadow: 0 0 0 1px rgba(201, 160, 255, .4) inset; }
.eq { display: none; align-items: flex-end; gap: 3px; height: 16px; color: var(--lilac); }
.key-music.on .eq { display: flex; } .key-music.on .ic-play { display: none; }
.eq i { width: 3px; height: 100%; border-radius: 2px; background: currentColor; transform-origin: bottom; transform: scaleY(var(--h, .3)); }

.credit { margin-top: 12px; text-align: center; font: 400 12.5px/1.5 var(--sans); color: var(--text-3); }


/* ═══ 3. Emilia V2: сцена. Темнота, один луч сверху, пыльца в луче, силуэт с контровым светом. Двигаются только
   прозрачность луча и пылинки (transform/opacity) — и только пока сцена на экране (.live) ═══ */
.v2 { position: relative; isolation: isolate; margin-top: var(--gap); padding-bottom: 8px; overflow: clip; text-align: center;
  background: radial-gradient(60% 50% at 50% 40%, #130e1d, var(--bg) 72%); }
.v2::before, .v2::after { content: ''; position: absolute; z-index: 3; left: 0; right: 0; height: 220px; pointer-events: none; }
.v2::before { top: 0; background: linear-gradient(var(--murk), transparent); }
.v2::after { bottom: 0; background: linear-gradient(transparent, var(--bg)); }
.v2-stage { position: relative; height: clamp(420px, 116vw, 580px); }
/* луч прожектора: широкий конус с мягкими краями и яркое ядро */
.beam { position: absolute; z-index: 0; inset: 0; pointer-events: none;
  background:
    conic-gradient(from 144deg at 50% -6%, transparent 0deg, rgba(222, 204, 255, .07) 10deg, rgba(232, 218, 255, .15) 25deg, rgba(240, 230, 255, .22) 36deg, rgba(232, 218, 255, .15) 47deg, rgba(222, 204, 255, .07) 62deg, transparent 72deg);
  -webkit-mask-image: linear-gradient(#000 20%, rgba(0, 0, 0, .7) 60%, transparent 98%); mask-image: linear-gradient(#000 20%, rgba(0, 0, 0, .7) 60%, transparent 98%);
  animation: breathe 7s ease-in-out infinite alternate paused; }
.beam-core { background: conic-gradient(from 168deg at 50% -6%, transparent 0deg, rgba(255, 248, 255, .14) 7deg, rgba(255, 250, 255, .2) 12deg, rgba(255, 248, 255, .14) 17deg, transparent 24deg); animation-duration: 5.2s; }
.glare { position: absolute; z-index: 1; left: 50%; top: -60px; width: 360px; height: 160px; transform: translateX(-50%); pointer-events: none;
  background: radial-gradient(closest-side, rgba(255, 250, 255, .5), rgba(232, 214, 255, .14) 45%, transparent 75%); }
.pool { position: absolute; z-index: 1; left: 50%; bottom: -8%; width: min(1100px, 170vw); height: 46%; transform: translateX(-50%); pointer-events: none;
  background: radial-gradient(closest-side, rgba(214, 190, 255, .2), rgba(170, 130, 255, .06) 55%, transparent); }
/* живой дым: слои тумана в конусе луча, едут с разной скоростью (только transform — дёшево) */
.fog { position: absolute; z-index: 0; inset: 0; overflow: hidden; pointer-events: none;
  -webkit-mask-image: conic-gradient(from 146deg at 50% -6%, transparent 0deg, #000 18deg, #000 50deg, transparent 68deg), linear-gradient(#000 25%, transparent 95%);
  mask-image: conic-gradient(from 146deg at 50% -6%, transparent 0deg, #000 18deg, #000 50deg, transparent 68deg), linear-gradient(#000 25%, transparent 95%);
  -webkit-mask-composite: source-in; mask-composite: intersect; }
.fog i { position: absolute; top: -10%; left: 0; width: calc(100% + 512px); height: 120%; background: url(../assets/img/fog.webp) 0 0 / 512px repeat; opacity: .26;
  animation: fogA 48s linear infinite paused; will-change: transform; }
.fog i + i { width: calc(100% + 900px); left: -900px; background-size: 900px; opacity: .17; animation: fogB 80s linear infinite paused; }
@keyframes fogA { to { transform: translateX(-512px); } }
@keyframes fogB { to { transform: translateX(900px); } }
.v2.live .fog i { animation-play-state: running; }
.dust .bk { box-shadow: none; background: radial-gradient(circle, rgba(244, 234, 255, .55), rgba(244, 234, 255, .12) 45%, transparent 70%); animation-name: driftNear; }
@keyframes driftNear { 0% { opacity: 0; transform: translate(0, -30px); } 25% { opacity: .7; } 75% { opacity: .45; } 100% { opacity: 0; transform: translate(-18px, 140px); } }
@keyframes breathe { from { opacity: .7; } to { opacity: 1; } }
.dust { position: absolute; z-index: 1; inset: 0; pointer-events: none; }
/* места и ритм пылинок (раньше — атрибутами style в разметке; строгая CSP их не пускает) */
.dust i:nth-child(1) { --x:44%; --y:22%; --s:2px; --t:11s; --w:-3s; }
.dust i:nth-child(2) { --x:52%; --y:35%; --s:1.5px; --t:14s; --w:-8s; }
.dust i:nth-child(3) { --x:48%; --y:48%; --s:2.5px; --t:12s; --w:-1s; }
.dust i:nth-child(4) { --x:57%; --y:18%; --s:1.5px; --t:16s; --w:-11s; }
.dust i:nth-child(5) { --x:41%; --y:62%; --s:2px; --t:13s; --w:-6s; }
.dust i:nth-child(6) { --x:55%; --y:58%; --s:1.5px; --t:15s; --w:-2s; }
.dust i:nth-child(7) { --x:47%; --y:30%; --s:1px; --t:10s; --w:-7s; }
.dust i:nth-child(8) { --x:60%; --y:44%; --s:2px; --t:17s; --w:-4s; }
.dust i:nth-child(9) { --x:38%; --y:40%; --s:1.5px; --t:12s; --w:-9s; }
.dust i:nth-child(10) { --x:51%; --y:70%; --s:2px; --t:14s; --w:-12s; }
.dust i:nth-child(11) { --x:45%; --y:12%; --s:1.5px; --t:13s; --w:-5s; }
.dust i:nth-child(12) { --x:58%; --y:66%; --s:1px; --t:11s; --w:-10s; }
.dust i:nth-child(13) { --x:36%; --y:56%; --s:1px; --t:15s; --w:-13s; }
.dust i:nth-child(14) { --x:63%; --y:28%; --s:1.5px; --t:12s; --w:-3s; }
.dust i:nth-child(15) { --x:40%; --y:30%; --s:14px; --t:19s; --w:-4s; }
.dust i:nth-child(16) { --x:58%; --y:46%; --s:10px; --t:23s; --w:-11s; }
.dust i:nth-child(17) { --x:47%; --y:64%; --s:18px; --t:21s; --w:-7s; }
.dust i:nth-child(18) { --x:62%; --y:24%; --s:8px; --t:17s; --w:-2s; }
.dust i:nth-child(19) { --x:36%; --y:52%; --s:11px; --t:25s; --w:-15s; }
.dust i { position: absolute; left: var(--x); top: var(--y); width: calc(var(--s) * 5); height: calc(var(--s) * 5); border-radius: 50%; background: radial-gradient(closest-side, #f6efff 18%, rgba(226, 206, 255, .5) 32%, transparent); opacity: 0;
  animation: drift var(--t) linear var(--w) infinite paused; }
@keyframes drift { 0% { opacity: 0; transform: translate(0, -20px); } 20% { opacity: .85; } 80% { opacity: .5; } 100% { opacity: 0; transform: translate(12px, 110px); } }
.v2.live .beam, .v2.live .dust i { animation-play-state: running; }
.light { position: absolute; inset: 0; pointer-events: none; }
.js .v2 .light, .js .v2 .dust, .js .v2 .v2-back, .js .v2 .v2-fig, .js .v2-txt > * { opacity: 0; }
.js .v2.lit .light { animation: spotOn 1.5s linear both; }
.js .v2.lit .v2-back { animation: fadeIn 1.6s var(--e-out) .5s both; }
.js .v2.lit .v2-fig { animation: emerge 2s var(--e-out) .45s both; }
.js .v2.lit .dust { animation: fadeIn 2s ease .7s both; }
.js .v2.txt .act { animation: up 1s var(--e-out) both; }
.js .v2.txt .v2-title { animation: unveil 1.8s var(--e-out) .15s both; }
.js .v2.txt .v2-line { animation: up 1.1s var(--e-out) .7s both; }
.js .v2.txt .v2-list, .js .v2.txt .v2-txt .btn, .js .v2.txt .v2-txt .note { animation: up 1s var(--e-out) 1.2s both; }
@keyframes spotOn { 0% { opacity: 0; } 6% { opacity: .9; } 10% { opacity: .08; } 17% { opacity: .65; } 22% { opacity: .12; } 34% { opacity: 1; } 100% { opacity: 1; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes emerge { from { opacity: 0; transform: translate(-50%, 18px); } to { opacity: 1; transform: translate(-50%, 0); } }
.v2-back { position: absolute; z-index: 1; left: 50%; bottom: 8%; width: min(820px, 130vw); aspect-ratio: 1.5; transform: translateX(-50%); border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(220, 198, 255, .34), rgba(170, 130, 255, .11) 48%, transparent 76%); }
.v2-fig { position: absolute; z-index: 2; left: 50%; bottom: 0; width: min(940px, 150vw); aspect-ratio: 1296 / 632; transform: translateX(-50%);
  -webkit-mask-image: linear-gradient(#000 52%, transparent 92%); mask-image: linear-gradient(#000 52%, transparent 92%); }
.v2-fig img { position: absolute; inset: 0; width: 100%; height: 100%; }
/* «живой» силуэт без настоящей анимации: дышит и покачивается целиком, усики колышутся каждый сам по себе вокруг
   своего основания (слои нарезаны заранее, контровой свет запечён — tools/silhouette.py; основание усика — под головой) */
.v2-sway { position: absolute; inset: 0; transform-origin: 50% 100%; animation: sway 6.5s ease-in-out infinite alternate paused; }
.p-al { transform-origin: 48.2% 26.1%; animation: antL 3.6s ease-in-out infinite alternate paused; }
.p-ar { transform-origin: 59.4% 29.7%; animation: antR 4.2s ease-in-out -1.6s infinite alternate paused; }
@keyframes sway { from { transform: rotate(-.6deg) scaleY(.995); } to { transform: rotate(.65deg) scaleY(1.016); } }
@keyframes antL { from { transform: rotate(-3.6deg); } to { transform: rotate(4.2deg); } }
@keyframes antR { from { transform: rotate(3.6deg); } to { transform: rotate(-4.4deg); } }
.v2.live .v2-sway, .v2.live .p-al, .v2.live .p-ar { animation-play-state: running; }
.v2-txt { position: relative; z-index: 4; margin-top: -88px; padding-bottom: 40px; }
.v2-title { margin-top: 20px; font: 800 clamp(40px, 13vw, 132px)/.92 var(--head); letter-spacing: -.03em; text-transform: uppercase; white-space: nowrap;
  background: linear-gradient(180deg, #fff 18%, #dccdf2 58%, #7d6a96 104%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.v2-title b { font-weight: 800; background: linear-gradient(180deg, #fff1fa 10%, #ffd9f2 45%, #b98cff 100%); -webkit-background-clip: text; background-clip: text; }
@keyframes unveil { from { opacity: 0; letter-spacing: .25em; filter: blur(10px); } to { opacity: 1; } }
.v2-line { margin-top: 16px; font: italic 500 clamp(26px, 7vw, 40px)/1.15 var(--serif); color: #eadff7; }
.v2-list { margin: 24px auto 0; max-width: 30em; font: 400 17px/1.5 var(--sans); color: var(--text-2); text-wrap: balance; }
.v2-soon { margin-top: 8px; font-size: 15px; color: var(--text-3); }   /* скоро — стук (в сборке его пока нет) */
.v2 .btn { margin-top: 36px; }
.btn-veil { background: rgba(255, 255, 255, .02); box-shadow: 0 0 0 1px rgba(232, 218, 255, .3) inset; color: var(--text); }
.btn-veil.is-off { opacity: .75; box-shadow: 0 0 0 1px rgba(232, 218, 255, .22) inset; } .btn-veil em { background: rgba(255, 255, 255, .07); color: var(--text-2); }

/* ── поклон: одна строка и кнопка поддержки ── */
/* ── программка: как это работает ── */
.how { padding-top: 112px; text-align: center; }
.how-list { max-width: 640px; margin: 32px auto 0; padding: 0; list-style: none; counter-reset: how; display: grid; gap: 20px; text-align: left; }
.how-list li { position: relative; padding-left: 44px; font: 400 15.5px/1.6 var(--sans); color: var(--text-2); counter-increment: how; text-wrap: pretty; }
/* номер — ровно по центру кружка (прямые цифры, без наклона и выносных элементов) и по середине первой строки */
.how-list li::before { content: counter(how); position: absolute; left: 0; top: calc(.8em - 14px); width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font: 600 13px/1 var(--sans); font-variant-numeric: tabular-nums; color: var(--name); box-shadow: 0 0 0 1px rgba(232, 218, 255, .3) inset; }
.how-list b { color: var(--text); font-weight: 600; }
@media (max-width: 759px) { .how { padding-top: 72px; } .how-list li { padding-left: 40px; font-size: 15px; } }
.bow { padding-top: 96px; text-align: center; }
.bow-line { margin-top: 4px; font: italic 500 clamp(22px, 5.4vw, 30px)/1.25 var(--serif); color: #eadff7; }
.bow-acts { margin-top: 24px; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; } .bow .btn svg { color: var(--lilac); }
/* отзыв автору: раскрывается под кнопками, тем же тёмным стеклом; ловушка для ботов спрятана */
.fb { max-width: 480px; margin: 20px auto 0; display: grid; gap: 10px; text-align: left; animation: up .6s var(--e-out) both; }
.fb[hidden] { display: none; }
.fb-hint { font: 400 14px/1.45 var(--sans); color: var(--text-2); text-align: center; text-wrap: balance; }
.fb textarea, .fb input { width: 100%; border-radius: 12px; padding: 12px 14px; font: 400 15px/1.45 var(--sans); color: var(--text); background: rgba(255, 255, 255, .03);
  border: 1px solid var(--line-2); outline: none; resize: vertical; transition: border-color var(--d-2), background var(--d-2); }
.fb textarea:focus, .fb input:focus { border-color: rgba(201, 160, 255, .5); background: rgba(255, 255, 255, .045); }
.fb textarea::placeholder, .fb input::placeholder { color: var(--text-3); }
.fb .hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.fb .btn { justify-self: center; min-width: 180px; } .fb .btn:disabled { opacity: .6; cursor: default; }
.fb-st { min-height: 20px; font: 400 12.5px/1.45 var(--sans); color: var(--text-3); text-align: center; text-wrap: balance; } .fb-st.ok { color: var(--name); font-size: 14px; }

/* ── подвал: одна строка ── */
.foot { margin-top: 96px; padding: 28px 0 calc(28px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); }
.foot .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; font: 400 14px/1 var(--sans); color: var(--text-3); }
.foot .logo { color: var(--text); margin-right: auto; }
.chan:hover { color: var(--text); }
.chan { display: inline-flex; align-items: center; gap: 8px; color: var(--text-2); } .chan svg { width: 16px; height: 16px; } .chan em { color: var(--text-3); background: rgba(255, 255, 255, .05); }
.copy { width: 100%; }

@media (max-width: 759px) {
  .fog i + i { display: none; }   /* телефон: один слой дыма */
  .hero { min-height: 0; padding: 84px 0 28px; }
  .stage { --fw: min(calc((100vw - 24px) / .86), 520px); position: relative; margin-top: 4px; }
  .hero-copy { margin-top: 20px; }
  .tape-1 { top: 41%; } .tape-2 { top: 52%; } .tape span { font-size: 30px; }
}
@media (min-width: 760px) {
  :root { --pad: 32px; }
  .nav { display: flex; }
  .only-desk { display: inline-flex !important; } .only-phone { display: none !important; }
  .hero { padding-top: 112px; }
  .hero-cta { display: flex; justify-content: center; gap: 12px; max-width: none; } .hero-cta .btn { width: auto; min-width: 176px; }
  .stage { --fw: min(880px, 76vw, calc((100svh - 480px) / .44)); height: calc(var(--fw) * .547 + 80px); }
  .emi { bottom: calc(32px + var(--ih) - var(--fw) * 49 / 768); } .island { bottom: 32px; } .halo { bottom: 48px; }
  .win-stage { --fw: min(640px, 70vw); }
  .key { height: 64px; }
  .copy { width: auto; }
  :root { --gap: 128px; }
  .v2-stage { height: clamp(560px, 54vw, 720px); }
}
/* широкий экран: текст слева, она крупно справа на островке */
@media (min-width: 1100px) {
  .hero { display: block; padding: 0; min-height: max(100svh, 760px); }
  .hero-name { position: absolute; z-index: 3; left: 0; right: 0; top: max(84px, 13svh); pointer-events: none; }
  .hero-title { font-size: clamp(150px, 16.5vw, 290px); line-height: .88; white-space: nowrap;
    -webkit-mask-image: linear-gradient(#000 50%, rgba(0, 0, 0, .45) 100%); mask-image: linear-gradient(#000 50%, rgba(0, 0, 0, .45) 100%); }
  .stage { --fw: min(860px, 56vw, calc((100svh - 130px) / .62)); left: 0; right: 0; z-index: 2; height: calc(var(--fw) * .547 + 88px); }
  .hero-copy { position: absolute; left: max(var(--pad), calc(50% - 660px)); bottom: 64px; width: 400px; padding: 0; text-align: left; }
  .hero-cta { margin: 0; justify-content: flex-start; } .dl-note { text-align: left; }
  .hero::before { background: radial-gradient(34% 40% at 50% 88%, rgba(255, 122, 217, .26), transparent 70%), radial-gradient(50% 58% at 50% 100%, rgba(160, 104, 214, .4), rgba(160, 104, 214, .08) 55%, transparent 80%), radial-gradient(40% 30% at 50% 22%, rgba(255, 217, 242, .08), transparent 70%); }
  .tape { height: 104px; left: 18%; right: 18%; -webkit-mask-image: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent); mask-image: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent); }
  .tape span { font-size: 58px; padding: 0 34px; } .tape-1 { top: 50%; } .tape-2 { top: 63%; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .in, .hero-title .ch { animation: none; }
  .js .hero-name .act, .js .hero-copy { opacity: 1; transform: none; transition: none; } .js .tape { opacity: .38; transition: none; }
  .js .v2 .light, .js .v2 .dust, .js .v2 .v2-back, .js .v2 .v2-fig, .js .v2-txt > * { opacity: 1; animation: none !important; }
  .fog i, .v2-sway, .p-al, .p-ar, .tape div, .murk i { animation: none !important; } .moths { display: none; }
  .beam, .dust i { animation: none !important; } .dust { display: none; }
  .emi canvas { transition: none; }
  .jar .ln { stroke-dashoffset: 0 !important; } .jar .lt, #play .win-stage, #play .wrap > *, #play .bell-ctl { opacity: 1 !important; animation: none !important; } .moths { transition: none; }
}
