/* зарегистрированы, чтобы скрипт получал готовые пиксели, а не calc() */
@property --w { syntax: '<length>'; inherits: true; initial-value: 300px; }
@property --glow { syntax: '<color>'; inherits: true; initial-value: #1f5bd6; }
@property --flow-glow { syntax: '<color>'; inherits: true; initial-value: #d6402b; }

:root {
  --hall: #0b0b0d; --panel: #151518; --raise: #1f1f24; --line: #2a2a31;
  --white: #f5f5f2; --mute: #9b9ba4; --paper: #e8e9ec; --ink-dark: #0d0d10;
  --display: 'Dela Gothic One', 'Arial Black', sans-serif;
  --spine: 'Sofia Sans Extra Condensed', 'Arial Narrow', sans-serif;
  --body: 'Golos Text', system-ui, sans-serif;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --pad: clamp(16px, 4vw, 56px);
  --island: rgb(21 21 24 / .78); --float: rgb(17 17 20 / .94); --edge: var(--veil);
  --veil: rgb(255 255 255 / .08); --veil-2: rgb(255 255 255 / .18); --seg: #08080a; --text-2: #cfcfd6;
  --sh-bg: #17171b; --sh-ink: #f5f5f2; --sh-row: #232329; --sh-mute: #9b9ba4; --sh-badge: #34343b; --sh-hi: #f5f5f2; --sh-hi-ink: #0d0d10;
  color-scheme: dark;
}
[data-theme='light'] {
  --hall: #f0efeb; --panel: #fbfbf9; --raise: #e7e6e1; --line: #d6d5cf;
  --white: #111114; --mute: #666670; --ink-dark: #f5f5f2;
  --island: rgb(255 255 255 / .84); --float: rgb(255 255 255 / .96); --edge: rgb(0 0 0 / .08);
  --veil: rgb(0 0 0 / .06); --veil-2: rgb(0 0 0 / .13); --seg: #e3e2dd; --text-2: #3b3b44;
  --sh-bg: #e8e9ec; --sh-ink: #0d0d10; --sh-row: #fff; --sh-mute: #5f5f68; --sh-badge: #e8e9ec; --sh-hi: #0d0d10; --sh-hi-ink: #fff;
  color-scheme: light;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; }
body { background: var(--hall); color: var(--white); font: 400 16px/1.5 var(--body); overflow-x: clip; transition: --glow .7s ease; -webkit-font-smoothing: antialiased; }
button, input { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--white); outline-offset: 3px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.muted { color: var(--mute); }
h2 { font: 400 clamp(28px, 4.6vw, 60px)/1.08 var(--display); letter-spacing: -.01em; }

/* ---------- шапка: три островка ---------- */
.top { position: fixed; inset: 12px var(--pad) auto; z-index: 500; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; pointer-events: none; }
.island { pointer-events: auto; display: flex; align-items: center; min-height: 48px; border-radius: 999px; background: var(--island); backdrop-filter: blur(18px) saturate(1.3); box-shadow: 0 0 0 1px var(--edge) inset; }
.logo { justify-self: start; padding: 0 22px; font: 400 17px/1 var(--display); letter-spacing: -.01em; }
.nav { gap: 4px; padding: 4px; font-weight: 500; font-size: 15px; }
.nav-btn, .nav-link, .nav-icon { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 16px; border-radius: 999px; color: var(--mute); white-space: nowrap; transition: color .2s, background .2s; }
.nav-btn:hover, .nav-link:hover, .nav-icon:hover, .nav-btn[aria-expanded='true'] { color: var(--white); background: var(--veil); }
.nav-btn .chev { transition: transform .3s var(--ease); }
.nav-btn[aria-expanded='true'] .chev { transform: rotate(180deg); }
.nav-icon { padding: 0 12px; }
.i-sun { display: none; }
[data-theme='light'] .i-sun { display: block; }
[data-theme='light'] .i-moon { display: none; }
.level { justify-self: end; padding: 4px; }
.seg-sm { background: transparent; padding: 0; }
.seg-sm button { padding: 6px 11px; font-size: 13px; }
.seg-sm .seg-pill { top: 0; bottom: 0; }

/* ---------- выпадающая «Библиотека» ---------- */
.mega { position: fixed; z-index: 490; top: 68px; left: 50%; translate: -50% 0; width: min(1040px, calc(100vw - 2 * var(--pad))); display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 10px; padding: 12px; border-radius: 28px; background: var(--float); backdrop-filter: blur(24px) saturate(1.3); box-shadow: 0 0 0 1px var(--edge) inset, 0 40px 80px -20px #000; animation: mega .35s var(--ease); }
@keyframes mega { from { opacity: 0; translate: -50% -10px; } }
.mega-cats { display: flex; flex-direction: column; gap: 2px; }
.mega-cats button { display: flex; align-items: center; justify-content: space-between; padding: 11px 14px; border-radius: 14px; color: var(--mute); font-weight: 600; font-size: 15px; text-align: left; transition: color .2s, background .2s; }
.mega-cats button span { font-size: 12px; font-weight: 500; opacity: .7; }
.mega-cats button[aria-pressed='true'] { background: var(--raise); color: var(--white); }
.mega-body { display: flex; flex-direction: column; gap: 12px; min-width: 0; padding: 6px 6px 2px; }
.mega-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; }
.mini { display: block; width: 100%; text-align: left; }
.mini .cover { transition: transform .4s var(--ease); }
.mini:hover .cover, .mini:focus-visible .cover { transform: translateY(-5px) rotate(-1.5deg); }
.mini-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 8px; font-size: 13px; font-weight: 600; line-height: 1.25; }
.mega-all { align-self: flex-end; padding: 8px 14px; border-radius: 999px; color: var(--mute); font-size: 14px; font-weight: 600; transition: color .2s, background .2s; }
.mega-all:hover { color: var(--white); background: var(--veil); }

/* ---------- поиск из шапки ---------- */
.finder { width: min(640px, calc(100vw - 24px)); margin: 10vh auto auto; padding: 0; border: 0; border-radius: 28px; background: var(--panel); color: var(--white); overflow: hidden; box-shadow: 0 0 0 1px var(--edge) inset, 0 40px 80px -20px rgb(0 0 0 / .5); }
.finder::backdrop { background: rgb(5 5 7 / .7); backdrop-filter: blur(8px); }
.finder[open] { animation: rise .4s var(--ease); }
.finder-box { display: flex; flex-direction: column; gap: 6px; padding: 12px; max-height: 80dvh; }
.finder-field input { width: 100%; min-height: 54px; padding: 0 22px; border: 0; border-radius: 999px; background: var(--hall); font-size: 17px; }
.finder-field input::placeholder { color: var(--mute); }
.finder-field input:focus-visible { outline-offset: 0; }
.finder-note { padding: 6px 14px 0; font-size: 13px; color: var(--mute); }
.finder-note:empty { display: none; }
.finder-list { overflow: auto; display: grid; gap: 2px; scrollbar-width: thin; }
.f-row { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 14px; width: 100%; padding: 8px 12px 8px 8px; border-radius: 16px; text-align: left; transition: background .2s; }
.f-row:hover, .f-row:focus-visible { background: var(--raise); }
.f-cover { display: block; }
.f-name { display: grid; min-width: 0; }
.f-name b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.f-name i { font-style: normal; font-size: 13px; color: var(--mute); }
.finder-all { margin: 4px auto 2px; padding: 10px 18px; border-radius: 999px; background: var(--veil); font-weight: 600; font-size: 14px; }

/* ---------- подписка на Boosty ---------- */
.join-wrap { padding: clamp(56px, 9vh, 110px) var(--pad) 0; }
.join { position: relative; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: center; gap: 24px; min-height: 340px; padding: clamp(28px, 4vw, 56px); border-radius: 44px; background: linear-gradient(120deg, color-mix(in srgb, var(--glow) 38%, var(--panel)), var(--panel) 70%); overflow: hidden; }
.join-text { display: grid; justify-items: start; gap: 18px; position: relative; z-index: 1; }
.join-text p { max-width: 520px; color: var(--text-2); }
.join-text .join-note { font-size: 14px; color: var(--mute); }
.join-fan { position: relative; align-self: stretch; min-height: 260px; }
.join-fan .cover { position: absolute; left: 50%; top: 50%; width: min(46%, 200px); box-shadow: 0 24px 44px -10px #000; transition: transform .55s var(--ease); }
.join-fan .cover:nth-child(1) { transform: translate(-130%, -48%) rotate(-12deg); }
.join-fan .cover:nth-child(2) { transform: translate(-50%, -56%); z-index: 1; }
.join-fan .cover:nth-child(3) { transform: translate(30%, -48%) rotate(12deg); }
.join:hover .join-fan .cover:nth-child(1) { transform: translate(-145%, -50%) rotate(-16deg); }
.join:hover .join-fan .cover:nth-child(3) { transform: translate(45%, -50%) rotate(16deg); }
.join-strip { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 16px 16px 28px; border-radius: 999px; background: var(--panel); }
.join-strip p { color: var(--mute); }
.join-strip b { color: var(--white); }
.btn-sm { flex: none; min-height: 40px; padding: 0 22px; font-size: 14px; }

.seg { position: relative; display: inline-flex; padding: 4px; border-radius: 999px; background: var(--seg); max-width: 100%; }
.seg button { position: relative; z-index: 1; padding: 8px 18px; border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--mute); white-space: nowrap; transition: color .25s; }
.seg button:hover { color: var(--white); }
.seg button[aria-pressed='true'] { color: var(--ink-dark); }
.seg-pill { position: absolute; top: 4px; bottom: 4px; left: 0; border-radius: 999px; background: var(--white); transition: transform .45s var(--ease), width .45s var(--ease); }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 34px; border-radius: 999px; background: var(--white); color: var(--ink-dark); font-weight: 700; transition: transform .18s var(--ease), box-shadow .3s; }
.btn:hover { box-shadow: 0 10px 40px -8px rgb(255 255 255 / .35); transform: translateY(-2px); }
.btn:active { transform: scale(.97); }
.arrow { flex: none; width: 52px; height: 52px; border-radius: 50%; background: var(--veil); font-size: 20px; transition: background .2s, transform .18s var(--ease); }
.arrow:hover { background: var(--veil-2); }
.arrow:active { transform: scale(.92); }
.badge { display: inline-block; padding: 4px 12px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--white); color: var(--ink-dark); white-space: nowrap; }
.badge[data-price='300'] { background: #ffc94d; }
.badge[data-price='777'] { background: #c3a2ff; }
.badge[data-price='0'] { background: #8ef0c2; }

/* ---------- главный экран ---------- */
.hero { position: relative; isolation: isolate; min-height: max(100svh, 780px); display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: clamp(18px, 3vh, 34px); padding: 108px 0 clamp(24px, 5vh, 52px); overflow: hidden; --white: #f5f5f2; --mute: #9b9ba4; --ink-dark: #0d0d10; --veil: rgb(255 255 255 / .08); --veil-2: rgb(255 255 255 / .18); color: var(--white); }
.backdrop { position: absolute; inset: 0; z-index: -1; background: radial-gradient(62% 52% at 50% 46%, color-mix(in srgb, var(--glow) 52%, transparent), transparent 72%); }
/* поверх сцены: свечение под цвет кассеты и затемнение, чтобы читались полка и подписи */
.backdrop::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to bottom, rgb(11 11 13 / .55), transparent 28% 52%, rgb(11 11 13 / .78) 78%, var(--hall) 99%), radial-gradient(48% 44% at 50% 46%, color-mix(in srgb, var(--glow) 34%, transparent), transparent 74%); }
.backdrop i { position: absolute; inset: 0; opacity: 0; transition: opacity .8s ease; display: grid; place-items: center; overflow: hidden; }
.backdrop i.on { opacity: 1; }
.backdrop i::before { content: attr(data-word); font: 400 clamp(90px, 17vw, 270px)/1 var(--display); font-style: normal; white-space: nowrap; color: transparent; -webkit-text-stroke: 1px rgb(255 255 255 / .09); transform: translateY(-4vh); }
.backdrop img, .backdrop video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }


.shelf { --w: 300px; --h: 450px; --s: 62px; --g: 12px; position: relative; width: 100%; height: calc(var(--h) + 40px); touch-action: pan-y; user-select: none; cursor: grab; perspective: 1400px; }
.shelf:active { cursor: grabbing; }
.shelf:focus-visible { outline-offset: -4px; }
.tape { position: absolute; left: 50%; top: 20px; width: var(--w); height: var(--h); margin-left: calc(var(--w) / -2); pointer-events: none; transition: transform .7s var(--ease); }
.tape-in { position: absolute; inset: 0; display: block; animation: drop .8s var(--ease) backwards; animation-delay: var(--d); }
@keyframes drop { from { opacity: 0; translate: 0 -60px; } }
.tape-spine { position: absolute; top: 18px; bottom: 18px; left: calc(50% - var(--s) / 2); width: var(--s); display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 0; border-radius: 10px; background: var(--c); color: var(--ink); pointer-events: auto; box-shadow: inset 7px 0 12px -6px rgb(255 255 255 / .35), inset -10px 0 16px -8px rgb(0 0 0 / .6), 0 24px 40px -18px #000; transition: opacity .35s, transform .7s var(--ease), filter .25s; transform-origin: center; filter: brightness(.82) saturate(.9); }
.tape-spine::after { content: ''; position: absolute; inset: 0; border-radius: inherit; background: repeating-linear-gradient(0deg, transparent 0 3px, rgb(0 0 0 / .07) 3px 4px); pointer-events: none; }
.tape-spine b { font: 900 15px/1 var(--spine); border: 2px solid currentColor; border-radius: 4px; padding: 3px 4px 2px; }
.tape-spine span { flex: 1; min-height: 0; writing-mode: vertical-rl; font: 800 25px/1 var(--spine); text-transform: uppercase; letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; width: 28px; }
.tape-spine i { font: 800 15px/1 var(--spine); font-style: normal; background: var(--ink); color: var(--c); border-radius: 999px; padding: 5px 7px; }
.tape:not(.is-active) .tape-spine:hover { filter: brightness(1.08); transform: translateY(-16px); }
.tape > .tape-in > .cover { position: absolute; inset: 0; opacity: 0; transform: rotateY(74deg) scale(.82); transition: opacity .3s, transform .7s var(--ease); box-shadow: 0 40px 70px -24px #000; }
.tape.is-left > .tape-in > .cover { transform: rotateY(-74deg) scale(.82); }
.tape-cassette { position: absolute; top: 4%; bottom: 4%; right: 6px; width: 62%; border-radius: 14px; background: linear-gradient(110deg, #26262b, #0a0a0c 60%, #1b1b1f); box-shadow: inset 0 0 0 2px #34343b, 0 30px 50px -20px #000; opacity: 0; transition: transform .6s var(--ease), opacity .3s; }
.tape-cassette i { position: absolute; right: 14px; width: 46px; height: 46px; border-radius: 50%; border: 8px dotted #5a5a63; background: #000; }
.tape-cassette i:first-child { top: 26%; }
.tape-cassette i:last-child { bottom: 26%; }
.tape.is-active .tape-spine { opacity: 0; pointer-events: none; transform: scaleX(2.4); }
.tape.is-active > .tape-in > .cover { opacity: 1; transform: rotate(-2.5deg); pointer-events: auto; }
.tape.is-active .tape-cassette { opacity: 1; transition-delay: .18s; transform: translateX(54px) rotate(2deg); }
.tape.is-active:hover .tape-cassette { transform: translateX(78px) rotate(3.5deg); transition-delay: 0s; }
.jump, .jump * { transition: none !important; }

.now { display: flex; align-items: center; justify-content: center; gap: clamp(8px, 4vw, 56px); width: 100%; padding-inline: var(--pad); }
.now-info { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 12px; width: min(620px, 100%); min-height: 158px; text-align: center; }
.now-title { font: 400 clamp(21px, 2.6vw, 34px)/1.15 var(--display); text-wrap: balance; }
.now-meta { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px; color: var(--mute); font-size: 15px; }
.now-info .btn { margin-top: auto; }

/* ---------- обложка ---------- */
.cover { container-type: inline-size; position: relative; display: flex; flex-direction: column; aspect-ratio: 2 / 3; width: 100%; overflow: hidden; border-radius: 16px; background: var(--c); color: var(--ink); text-align: left; isolation: isolate; }
.cover::after { content: ''; position: absolute; inset: 0; z-index: 3; pointer-events: none; border-radius: inherit; background: linear-gradient(115deg, rgb(255 255 255 / .22), transparent 26% 74%, rgb(0 0 0 / .22)), repeating-linear-gradient(0deg, transparent 0 3px, rgb(0 0 0 / .05) 3px 4px); box-shadow: inset 0 0 0 1px rgb(255 255 255 / .16); }
.cover img { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .3s; }
.cover img.ready { opacity: 1; }
.cover-top { display: flex; justify-content: space-between; align-items: center; gap: 4cqw; padding: 6cqw 7cqw 0; }
.cover-top b { font: 900 8cqw/1 var(--spine); border: .8cqw solid currentColor; border-radius: 1.6cqw; padding: 1.4cqw 2cqw 1cqw; }
.cover-top i { font: 600 6cqw/1 var(--spine); font-style: normal; text-transform: uppercase; text-align: right; }
.cover-shape { flex: 1; min-height: 0; margin: 5cqw 7cqw; border-radius: 4cqw; background: var(--ink); opacity: .9; }
.art-0 .cover-shape { background: repeating-conic-gradient(from 0deg at 50% 100%, var(--ink) 0 7deg, transparent 7deg 15deg); }
.art-1 .cover-shape { background: radial-gradient(circle at 50% 50%, var(--c) 0 9%, var(--ink) 9.5% 19%, var(--c) 19.5% 29%, var(--ink) 29.5% 39%, var(--c) 39.5% 49%, var(--ink) 49.5% 59%, transparent 60%); }
.art-2 .cover-shape { background: repeating-linear-gradient(180deg, var(--ink) 0 7cqw, transparent 7cqw 9cqw, var(--ink) 9cqw 13cqw, transparent 13cqw 17cqw, var(--ink) 17cqw 19cqw, transparent 19cqw 25cqw); }
.art-3 .cover-shape { background: var(--ink); clip-path: polygon(50% 0, 62% 34%, 100% 22%, 74% 52%, 100% 80%, 62% 68%, 50% 100%, 38% 68%, 0 80%, 26% 52%, 0 22%, 38% 34%); }
.cover-title { padding: 0 7cqw; font: 400 var(--fs)/1.08 var(--display); text-transform: uppercase; overflow-wrap: break-word; }
.cover-sub { padding: 3cqw 7cqw 6cqw; font: 600 6.6cqw/1.2 var(--spine); text-transform: uppercase; letter-spacing: .03em; }

/* ---------- свежее ---------- */
.fresh { position: relative; overflow: hidden; padding: clamp(80px, 12vh, 140px) 0 40px; text-align: center; transition: --flow-glow .7s ease; }
.flow { --cw: 220px; position: relative; height: calc(var(--cw) * 1.5 + 160px); touch-action: pan-y; user-select: none; cursor: grab; background: radial-gradient(46% 50% at 50% 50%, color-mix(in srgb, var(--flow-glow) 55%, transparent), transparent 74%); }
.flow:focus-visible { outline-offset: -4px; }
.card { position: absolute; left: 50%; top: 64px; width: var(--cw); margin-left: calc(var(--cw) / -2); transition: transform .65s var(--ease), opacity .4s; }
.card .cover { border-radius: 20px; transition: filter .45s; filter: brightness(.45) saturate(.7); box-shadow: 0 30px 50px -22px #000; }
.card.is-active .cover { filter: none; }
.card .badge { position: absolute; top: -13px; right: 12px; z-index: 4; opacity: 0; transition: opacity .3s; }
.card.is-active .badge { opacity: 1; }
.flow-nav { display: flex; justify-content: center; align-items: center; gap: 16px; }

/* ---------- фигурки: цветная сцена на всю секцию ---------- */
.figures { position: relative; isolation: isolate; overflow: hidden; display: flex; flex-direction: column; height: clamp(620px, 100svh, 900px); margin: clamp(60px, 10vh, 110px) 12px 0; padding-top: 108px; border-radius: 44px; background: var(--fig-bg, #e46aa8); color: #fff; text-align: center; transition: background-color .7s ease; }
.figures h2 { position: relative; z-index: 3; font-size: clamp(22px, 2.6vw, 34px); }
.figures-word { position: absolute; inset: 0; z-index: -1; display: grid; place-items: center; font: 400 calc(106vw / var(--len, 4))/1 var(--display); letter-spacing: -.03em; white-space: nowrap; pointer-events: none; animation: word .7s var(--ease); }
@keyframes word { from { opacity: 0; transform: translateX(8%); } }
.stage { position: relative; flex: 1; min-height: 0; touch-action: pan-y; user-select: none; cursor: grab; }
.stage:focus-visible { outline-offset: -6px; }
.fig { position: absolute; left: 50%; bottom: 0; height: 100%; aspect-ratio: 3 / 4; translate: -50% 0; transform-origin: 50% 100%; transition: transform .75s var(--ease), opacity .5s, filter .5s; }
.fig[data-pos='center'] { z-index: 2; transform: none; }
.fig[data-pos='left'] { transform: translate(-36vw, -9%) scale(.34); filter: blur(5px); opacity: .85; }
.fig[data-pos='right'] { transform: translate(36vw, -9%) scale(.34); filter: blur(5px); opacity: .85; }
.fig[data-pos='back'] { transform: translateY(-20%) scale(.2); opacity: 0; pointer-events: none; }
.fig-body { position: absolute; inset: 0; display: block; }
.fig-body img { width: 100%; height: 100%; object-fit: contain; object-position: bottom; filter: drop-shadow(0 24px 24px rgb(0 0 0 / .28)); }
.fig-body svg { width: 100%; height: 100%; fill: #101014; filter: drop-shadow(0 24px 24px rgb(0 0 0 / .28)); }
.fig-body b { position: absolute; left: 0; right: 0; top: 20%; font: 400 clamp(40px, 8vh, 84px)/1 var(--display); color: rgb(255 255 255 / .9); }
.fig[data-pos='center'] .fig-body { animation: idle 5s ease-in-out infinite; transform-origin: 50% 100%; }
@keyframes idle { 50% { transform: scale(1.012, .992); } }
.fig-nav { position: relative; z-index: 4; display: flex; justify-content: center; align-items: center; gap: clamp(10px, 4vw, 48px); padding: 18px 12px 24px; background: var(--hall); color: var(--white); border-radius: 36px 36px 0 0; width: min(640px, 100%); margin-inline: auto; }
.fig-info { display: flex; flex-direction: column; align-items: center; gap: 12px; min-width: 210px; }
.fig-name { font: 400 20px/1.2 var(--display); }

.sticker { position: absolute; z-index: 5; left: calc(50% + min(19vw, 250px)); top: 190px; padding: 12px 22px; border-radius: 999px; background: #fff; color: var(--ink-dark); font: 400 16px/1.2 var(--display); rotate: 8deg; box-shadow: 0 14px 30px -10px rgb(0 0 0 / .45); transition: scale .2s var(--ease), rotate .2s var(--ease); }
.sticker:hover { scale: 1.07; rotate: -3deg; }
.sticker:active { scale: .96; }

/* ---------- пасхалки ---------- */
.egg { position: fixed; z-index: 600; right: 20px; bottom: 20px; width: min(360px, calc(100vw - 24px)); padding: 26px 28px 22px; border-radius: 30px; background: #e8e9ec; color: #0d0d10; box-shadow: 0 30px 60px -16px rgb(0 0 0 / .7); rotate: -2deg; animation: egg .55s var(--ease); }
@keyframes egg { from { opacity: 0; translate: 0 40px; scale: .92; } }
.egg-title { margin: 0 40px 8px 0; font: 400 24px/1.15 var(--display); }
.egg-source { margin-top: 14px; font-size: 12px; color: #63636d; }
.egg-close { position: absolute; top: 16px; right: 16px; width: 36px; height: 36px; border-radius: 50%; background: #0d0d10; color: #fff; }
.egg .egg-close:focus-visible { outline-color: #0d0d10; }
.egg.stamp .egg-title { display: inline-block; padding: 4px 14px; border: 4px solid #c92a1c; border-radius: 12px; color: #c92a1c; rotate: -6deg; text-transform: uppercase; animation: stamp .45s .25s cubic-bezier(.2, 1.6, .4, 1) backwards; }
@keyframes stamp { from { opacity: 0; scale: 2.4; } }
.rain { position: fixed; z-index: 590; top: -60px; font: 400 44px/1 var(--display); color: #fff; pointer-events: none; animation: rain 1.7s cubic-bezier(.4, 0, 1, 1) both; }
@keyframes rain { to { translate: 0 calc(100vh + 120px); rotate: 40deg; } }
.empty-hint { font-size: 14px; text-align: center; }

/* ---------- разделы ---------- */
.sections, .catalog { padding: clamp(64px, 10vh, 120px) var(--pad) 0; }
.sections h2 { margin-bottom: 40px; }
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; padding-top: 30px; }
.tile { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; height: 400px; padding: 32px; border-radius: 36px; background: var(--panel); text-align: left; transition: background .3s; }
.tile:hover { background: var(--raise); }
.tile-name { font: 400 clamp(20px, 2.1vw, 30px)/1.15 var(--display); }
.tile-count { color: var(--mute); font-size: 15px; }
.fan { position: absolute; inset: 120px 0 0; overflow: hidden; border-radius: 0 0 36px 36px; -webkit-mask-image: linear-gradient(#000 62%, transparent 99%); mask-image: linear-gradient(#000 62%, transparent 99%); }
.fan .cover { position: absolute; left: 50%; top: 46px; width: 46%; max-width: 190px; translate: -50% 0; transform-origin: 50% 130%; transition: transform .55s var(--ease); box-shadow: 0 20px 40px -10px #000; }
.fan .cover:nth-child(1) { transform: translateX(-52%) rotate(-11deg); }
.fan .cover:nth-child(2) { transform: translateY(-4px); z-index: 1; }
.fan .cover:nth-child(3) { transform: translateX(52%) rotate(11deg); }
.tile:hover .fan .cover:nth-child(1), .tile:focus-visible .fan .cover:nth-child(1) { transform: translateX(-70%) rotate(-17deg); }
.tile:hover .fan .cover:nth-child(2), .tile:focus-visible .fan .cover:nth-child(2) { transform: translateY(-26px); }
.tile:hover .fan .cover:nth-child(3), .tile:focus-visible .fan .cover:nth-child(3) { transform: translateX(70%) rotate(17deg); }
/* персонаж выходит за верхнюю рамку плитки */
/* подписи стоят под ногами фигурки, чтобы она их не закрывала */
.tile-hero { position: absolute; right: -3%; bottom: 100px; z-index: 2; height: calc(100% - 44px); pointer-events: none; transform-origin: 50% 100%; transition: transform .55s var(--ease); }
.tile:hover .tile-hero { transform: translateY(-8px) scale(1.04); }
.tile.has-hero { justify-content: flex-end; padding-bottom: 24px; }
.tile.has-hero .fan { inset: 20px 30% 100px 0; border-radius: 36px 0 0; -webkit-mask-image: none; mask-image: none; }
.tile.has-hero .fan .cover { top: 76px; }

/* ---------- каталог ---------- */
.catalog { min-height: 60vh; }
.catalog-head { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-bottom: 44px; }
.catalog-head h2 { margin-right: auto; }
.search input { width: min(380px, calc(100vw - 2 * var(--pad))); min-height: 48px; padding: 0 22px; border: 1px solid var(--line); border-radius: 999px; background: var(--raise); }
.search input::placeholder { color: var(--mute); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 44px 22px; }
.item { position: relative; display: block; width: 100%; }
.item .cover { transition: transform .45s var(--ease), box-shadow .45s; }
.item:hover .cover, .item:focus-visible .cover { transform: translateY(-10px) rotate(-1.5deg); box-shadow: 0 30px 40px -20px color-mix(in srgb, var(--c) 70%, #000); }
.item:active .cover { transform: translateY(-4px) scale(.98); }
.item > .badge { position: absolute; bottom: -12px; right: 12px; z-index: 4; box-shadow: 0 4px 16px rgb(0 0 0 / .5); }
.empty { display: flex; flex-direction: column; align-items: center; gap: 20px; padding: 60px 0; color: var(--mute); }

.foot { margin-top: 140px; padding: 56px var(--pad) 40px; border-radius: 44px 44px 0 0; background: var(--panel); display: grid; gap: 16px; }
.foot p { max-width: 640px; }
.foot .foot-big { max-width: none; font: 400 clamp(40px, 11.5vw, 180px)/1 var(--display); }

.more { display: flex; justify-content: center; padding-top: 64px; }

/* ---------- карточка тайтла: светлая ---------- */
.sheet { width: min(1060px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); margin: auto; padding: 0; border: 0; border-radius: 40px; background: var(--sh-bg); color: var(--sh-ink); overflow: auto; scrollbar-width: none; }
.sheet::-webkit-scrollbar { display: none; }
.sheet::backdrop { background: rgb(5 5 7 / .72); backdrop-filter: blur(10px); }
.sheet[open] { animation: rise .5s var(--ease); }
@keyframes rise { from { opacity: 0; transform: translateY(40px) scale(.97); } }
.sheet-body { position: relative; display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 40px; padding: 20px; }
.sheet-art { align-self: start; padding: 28px; border-radius: 28px; background: var(--c); }
.sheet-art .cover { box-shadow: 0 30px 50px -14px rgb(0 0 0 / .6); transform: rotate(-3deg); }
.sheet-main { display: flex; flex-direction: column; gap: 16px; padding: 60px 20px 20px 0; }
.sheet h2 { font-size: clamp(30px, 4.6vw, 58px); text-wrap: balance; overflow-wrap: break-word; }
.sheet h2.long { font-size: clamp(24px, 3vw, 38px); }
.sheet-meta { color: var(--sh-mute); }
.episodes { display: grid; gap: 10px; margin-top: 14px; }
.episodes a { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; align-items: center; gap: 14px; padding: 16px 16px 16px 24px; border-radius: 999px; background: var(--sh-row); transition: background .2s, color .2s, transform .2s var(--ease); }
.episodes a:hover, .episodes a:focus-visible { background: var(--sh-hi); color: var(--sh-hi-ink); transform: translateX(-4px); }
.episodes a:focus-visible { outline-color: var(--sh-ink); }
.episodes a.locked { opacity: .5; }
.episodes span:not(.badge) { color: var(--sh-mute); font-size: 14px; }
.episodes a:hover span:not(.badge), .episodes a:focus-visible span:not(.badge) { color: inherit; opacity: .7; }
.episodes .badge { background: var(--sh-badge); color: var(--sh-ink); }
.episodes .badge[data-price='300'] { background: #ffc94d; }
.episodes i { font-style: normal; }
.sheet-close { position: absolute; top: 24px; right: 24px; width: 48px; height: 48px; border-radius: 50%; background: var(--sh-hi); color: var(--sh-hi-ink); z-index: 5; }

/* ---------- узкие экраны ---------- */
@media (max-width: 1000px) {
  .nav-link { display: none; }
  .mega-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .mega-grid li:nth-child(n+4) { display: none; }
}
@media (min-width: 761px) and (max-height: 940px) {
  /* кассеты ужимаются по высоте окна, чтобы кнопка под ними оставалась на первом экране */
  .shelf { --h: clamp(270px, calc(100svh - 408px), 450px); --w: calc(var(--h) / 1.5); --s: 54px; }
  .hero { min-height: max(100svh, 680px); gap: 14px; padding-top: 96px; padding-bottom: 20px; }
}
@media (max-width: 900px) {
  .tiles { grid-template-columns: 1fr; gap: 50px; }
  .tile { height: 340px; }
  .sheet-body { grid-template-columns: 1fr; gap: 8px; }
  .sheet-art { padding: 28px; }
  .sheet-art .cover { width: min(200px, 70%); margin-inline: auto; }
  .sheet-main { padding: 18px 6px 8px; }
  .episodes a { grid-template-columns: minmax(0, 1fr) auto auto; padding-left: 20px; }
  .episodes span:not(.badge) { display: none; }
}
@media (max-width: 760px) {
  .top { inset: 8px 8px auto; gap: 6px; }
  .logo { padding: 0 14px; font-size: 14px; }
  .seg button { padding: 8px 11px; font-size: 13px; }
  .seg-sm button { padding: 6px 9px; }
  .nav-btn { padding: 0 12px; }
  .mega { top: 64px; width: calc(100vw - 16px); grid-template-columns: 1fr; gap: 4px; }
  .mega-cats { flex-direction: row; overflow-x: auto; scrollbar-width: none; }
  .mega-cats button { flex: none; gap: 8px; }
  .join { grid-template-columns: 1fr; border-radius: 32px; }
  .join-fan { min-height: 220px; order: -1; }
  .join-strip { flex-direction: column; align-items: flex-start; border-radius: 28px; padding: 18px 20px; }
  #catSeg { overflow-x: auto; scrollbar-width: none; }
  .hero { min-height: max(100svh, 700px); padding-top: 76px; gap: 12px; }
  .shelf { --w: 220px; --h: 330px; --s: 42px; --g: 8px; }
  .tape-spine span { font-size: 19px; width: 22px; }
  .tape-spine b { font-size: 11px; padding: 2px; }
  .tape-spine i { font-size: 12px; padding: 4px; }
  .tape.is-active .tape-cassette { transform: translateX(30px) rotate(2deg); }
  .now { gap: 4px; padding-inline: 10px; }
  .now .arrow { width: 40px; height: 40px; align-self: flex-end; margin-bottom: 6px; }
  .now-info { min-height: 176px; }
  .now-info .btn { padding: 0 22px; }
  .flow { --cw: 180px; }
  .figures { height: 640px; margin-inline: 6px; border-radius: 32px; padding-top: 40px; }
  .figures-word { font-size: calc(112vw / var(--len, 4)); bottom: 52%; }
  .fig { height: 82%; }
  .fig[data-pos='left'] { transform: translate(-40vw, -44%) scale(.36); }
  .fig[data-pos='right'] { transform: translate(40vw, -44%) scale(.36); }
  .fig-nav .arrow { width: 40px; height: 40px; }
  .fig-info { min-width: 0; }
  .fig-info .btn { padding: 0 20px; }
  .sticker { left: auto; right: 18px; top: 82px; font-size: 13px; padding: 9px 16px; }
  .egg { right: 12px; bottom: 12px; }
  .flow-nav { gap: 10px; }
  .search, .search input { width: 100%; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px 12px; }
}
@media (max-width: 420px) {
  .top { grid-template-columns: auto 1fr; }
  .logo { display: none; }
  .nav { justify-self: start; }
  .nav-btn { padding: 0 10px; font-size: 14px; }
  .seg-sm button { padding: 6px 7px; font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
}
