/* Dota 2 Grid Studio — сайт: главная, каталог, гайды, «Угадайка», профиль.
   Тёмный «графит» и градиент «Огня» из трёх цветов (c1 → c2 → c3). */
:root {
  --h: 35;                                  /* оттенок графита */
  --c1: oklch(0.6 0.21 27);                 /* кровавый красный */
  --c2: oklch(0.68 0.19 38);                /* оранжевый штрих */
  --c3: oklch(0.84 0.13 82);                /* золото */
  --accent-hi: oklch(0.76 0.16 45);
  --accent-line: oklch(0.47 0.13 36);
  --accent-ink: #160b07;
  --bg: oklch(0.14 0.008 var(--h));
  --bg-2: oklch(0.17 0.009 var(--h));
  --card: oklch(0.19 0.01 var(--h));
  --card-2: oklch(0.235 0.011 var(--h));
  --line: oklch(0.27 0.012 var(--h));
  --line-strong: oklch(0.35 0.014 var(--h));
  --ink: oklch(0.96 0.006 60);
  --ink-2: oklch(0.82 0.012 60);
  --muted: oklch(0.66 0.014 50);
  --faint: oklch(0.5 0.014 45);
  --dot: oklch(0.32 0.014 var(--h));
  --red: var(--c1);
  --accent: var(--c2);
  --gold: var(--c3);
  --accent-soft: color-mix(in oklab, var(--c2) 13%, transparent);
  --grad: linear-gradient(100deg, var(--c1) 0%, var(--c2) 48%, var(--c3) 100%);
  --heart: oklch(0.7 0.19 15);
  --ok: oklch(0.78 0.15 150);
  --danger: oklch(0.68 0.17 30);
  --r: 16px;
  --nav-h: 76px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.34, 1.4, .64, 1);
  --font: "Onest", "Segoe UI", system-ui, sans-serif;
  --mono: "IBM Plex Mono", "JetBrains Mono", Consolas, monospace;
  --disp: "Unbounded", "Onest", "Segoe UI", sans-serif;      /* заглавные метки: «Мозаика · 3 302 категории», «Мастерская», бейджи */
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--bg); scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--ink); font: 15px/1.55 var(--font); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button:focus { outline: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
::selection { background: color-mix(in oklab, var(--c1) 40%, transparent); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }
.wrap { width: min(1240px, 100% - 64px); margin: 0 auto; }
.i { width: 17px; height: 17px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- знак ---------- */
.mk-bg { fill: #221b18; }
.mk-dot { fill: oklch(0.55 0.02 45); }
.mk-stroke { stroke: var(--accent); stroke-linecap: round; fill: none; }

/* ---------- меню сверху: знак слева, разделы и вход справа; при прокрутке — стеклянная полоса ---------- */
.navbar { position: fixed; z-index: 50; top: 0; left: 0; right: 0; border-bottom: 1px solid transparent; animation: navIn .7s var(--ease) both; transition: background .3s, border-color .3s, box-shadow .3s; }
@keyframes navIn { from { opacity: 0; transform: translateY(-14px); } }
.navbar.scrolled { background: oklch(0.14 0.007 var(--h) / .86); -webkit-backdrop-filter: blur(18px) saturate(1.4); backdrop-filter: blur(18px) saturate(1.4); border-bottom-color: oklch(1 0 0 / .07); box-shadow: 0 12px 40px -24px rgba(0, 0, 0, .9); }
/* тонкая полоска градиента Доты по нижнему краю, когда меню прилипло */
.navbar::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: linear-gradient(90deg, transparent, color-mix(in oklab, var(--c1) 50%, transparent), color-mix(in oklab, var(--c3) 40%, transparent), transparent); opacity: 0; transition: opacity .3s; }
.navbar.scrolled::after { opacity: 1; }
.nav-pill { position: relative; display: flex; align-items: center; gap: 10px; width: min(1320px, 100% - 64px); height: var(--nav-h); margin: 0 auto; transition: height .3s var(--ease); }
.navbar.scrolled .nav-pill { height: 62px; }
.logo { display: flex; align-items: center; gap: 11px; text-decoration: none; font: 500 17px/1 var(--font); letter-spacing: .01em; text-transform: uppercase; white-space: nowrap; }
.logo b { font-weight: 800; }
.logo svg { width: 32px; height: 32px; flex: none; overflow: visible; transition: transform .55s var(--spring), filter .4s var(--ease); }
.logo .mk-bg { transition: fill .4s var(--ease); }
.logo .mk-stroke { stroke-width: 7; stroke-dasharray: 32; animation: strokeIn .8s var(--ease) .3s both; transition: stroke .4s; }
/* наведение на логотип: знак подпрыгивает с поворотом и загорается, штрих перерисовывается, по надписи пробегает блик */
.logo:hover svg { transform: rotate(-14deg) scale(1.14); filter: drop-shadow(0 0 12px color-mix(in oklab, var(--accent) 60%, transparent)); }
.logo:hover .mk-bg { fill: #2e221c; }
.logo:hover .mk-stroke { stroke: var(--accent-hi); animation: strokeRedraw .6s var(--ease); }
.logo:active svg { transform: rotate(-14deg) scale(1.02); transition-duration: .15s; }
.logo span { background: linear-gradient(100deg, var(--ink) 42%, var(--accent-hi) 50%, var(--ink) 58%) 100% 0 / 260% 100% no-repeat; -webkit-background-clip: text; background-clip: text; color: transparent; transition: letter-spacing .5s var(--ease); }
.logo:hover span { letter-spacing: .04em; animation: logoShine .9s var(--ease); }
@keyframes logoShine { from { background-position: 100% 0; } to { background-position: 0 0; } }
@media (prefers-reduced-motion: reduce) { .logo svg, .logo span { transition: none; animation: none !important; } .logo:hover svg { transform: none; } }
.nav-links { position: relative; display: flex; align-items: center; gap: 2px; margin-left: auto; }
.nav-links a { position: relative; z-index: 1; display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border-radius: 11px; color: var(--muted); text-decoration: none; font-size: 15px; font-weight: 500; white-space: nowrap; transition: color .2s; }
.nav-links a .i { width: 17px; height: 17px; opacity: .75; transition: transform .35s var(--spring), color .2s, opacity .2s; }
.nav-links a:hover, .nav-links a[aria-current] { color: var(--ink); }
.nav-links a:hover .i { transform: rotate(-8deg) scale(1.1); opacity: 1; }
.nav-links a[aria-current] .i { color: var(--accent-hi); opacity: 1; }
.nav-links a.nav-studio .i:last-child { width: 15px; height: 15px; transform: none; transition: transform .25s var(--ease); }
.nav-links a.nav-studio:hover .i:last-child { transform: translateX(3px); }
/* подсветка переезжает под ссылку под курсором и возвращается к текущей странице */
.nav-hl { position: absolute; z-index: 0; left: 0; top: 0; height: 40px; width: 0; border-radius: 11px; background: oklch(1 0 0 / .06); opacity: 0; transition: transform .45s var(--spring), width .45s var(--spring), opacity .2s; pointer-events: none; }
.nav-hl::after { content: ""; position: absolute; left: 32%; right: 32%; bottom: -6px; height: 2px; border-radius: 2px; background: var(--grad); box-shadow: 0 0 10px color-mix(in oklab, var(--c2) 80%, transparent); }
.nav-badge { min-width: 20px; height: 18px; padding: 0 6px; display: inline-grid; place-items: center; border-radius: 9px; background: var(--accent-soft); color: var(--accent-hi); font: 600 9.5px var(--disp); letter-spacing: .02em; }
.nav-acc { display: flex; align-items: center; margin-left: 8px; }
/* Telegram: чат и новости — таблетка в тон меню, рядом с «Войти» */
.nav-tg { display: inline-flex; align-items: center; gap: 9px; height: 44px; padding: 0 14px; margin-left: 14px; border-radius: 13px; border: 1px solid oklch(1 0 0 / .1); background: oklch(1 0 0 / .035); color: var(--ink-2); text-decoration: none; font-size: 14.5px; font-weight: 550; white-space: nowrap; transition: border-color .2s, background .2s, color .2s, transform .25s var(--spring); }
.nav-tg .i { width: 18px; height: 18px; color: oklch(0.8 0.11 232); transition: transform .35s var(--spring); }
.nav-tg:hover { color: var(--ink); border-color: oklch(0.8 0.11 232 / .45); background: oklch(0.8 0.11 232 / .09); transform: translateY(-1px); }
.nav-tg:hover .i { transform: translate(2px, -2px) rotate(-8deg); }
@media (max-width: 1360px) { .nav-tg { padding: 0; width: 44px; justify-content: center; } .nav-tg span { display: none; } }
.nav-acc .btn .i { width: 16px; height: 16px; }
.nav-login { height: 44px; padding: 0 20px; border-radius: 13px; background: oklch(0.2 0.009 var(--h) / .8); border-color: oklch(1 0 0 / .12); font-weight: 600; font-size: 15px; }
.nav-user { display: flex; align-items: center; gap: 9px; height: 44px; padding: 0 16px 0 5px; border-radius: 99px; border: 1px solid oklch(1 0 0 / .1); background: oklch(1 0 0 / .04); color: var(--ink); text-decoration: none; font-size: 14.5px; font-weight: 600; transition: border-color .2s, background .2s; }
.nav-user:hover, .nav-user.on { border-color: var(--accent-line); background: var(--accent-soft); }
.nav-user .ava { width: 34px; height: 34px; }
.nav-user .nav-nick { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-burger { display: none; width: 44px; height: 44px; border: 0; border-radius: 12px; background: oklch(1 0 0 / .06); cursor: pointer; flex-direction: column; align-items: center; justify-content: center; gap: 5px; }
.nav-burger i { display: block; width: 16px; height: 1.75px; border-radius: 2px; background: var(--ink); transition: transform .3s var(--ease); }
.navbar.open .nav-burger i:first-child { transform: translateY(3.4px) rotate(45deg); }
.navbar.open .nav-burger i:last-child { transform: translateY(-3.4px) rotate(-45deg); }
/* аватар: картинка или первая буква ника на градиенте */
.ava, .sh-ava, .pf-ava { position: relative; display: inline-grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 50%; overflow: hidden; background: var(--grad); color: var(--accent-ink); font-weight: 750; font-size: 13px; }
.ava img, .sh-ava img, .pf-ava img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------- кнопки ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; height: 42px; padding: 0 18px; border-radius: 12px; border: 1px solid var(--line-strong); background: linear-gradient(180deg, oklch(1 0 0 / .05), oklch(1 0 0 / .02)); color: var(--ink); font-size: 14px; font-weight: 550; line-height: 1; text-decoration: none; cursor: pointer; white-space: nowrap; box-shadow: inset 0 1px 0 oklch(1 0 0 / .05); transition: background .15s, border-color .15s, transform .2s var(--spring), box-shadow .25s, color .15s; }
.btn:hover { background: linear-gradient(180deg, oklch(1 0 0 / .09), oklch(1 0 0 / .04)); border-color: oklch(0.5 0.016 40); transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn:focus-visible { outline: 2px solid var(--accent-hi); outline-offset: 3px; border-radius: 12px; }
.btn.primary { position: relative; background: var(--grad); background-size: 160% 100%; background-position: 0 0; color: var(--accent-ink); border-color: oklch(0.78 0.14 50 / .55); font-weight: 700;
  box-shadow: inset 0 1px 0 oklch(1 0.05 80 / .45), 0 8px 22px -12px color-mix(in oklab, var(--c1) 90%, transparent); transition: background-position .5s var(--ease), transform .2s var(--spring), box-shadow .25s; }
.btn.primary:hover { background: var(--grad); background-size: 160% 100%; background-position: 100% 0; border-color: oklch(0.85 0.13 60 / .7); box-shadow: inset 0 1px 0 oklch(1 0.05 80 / .55), 0 12px 28px -10px color-mix(in oklab, var(--c1) 100%, transparent); transform: translateY(-1px); }
.btn.primary:active { transform: translateY(0) scale(.98); }
.btn.glass { background: oklch(1 0 0 / .045); border-color: oklch(1 0 0 / .1); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.btn.glass:hover { background: oklch(1 0 0 / .08); border-color: oklch(1 0 0 / .18); }
.btn.sm { height: 36px; padding: 0 14px; font-size: 13.5px; border-radius: 10px; gap: 7px; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: oklch(1 0 0 / .05); }
.btn:disabled { opacity: .45; pointer-events: none; }
.btn.on { color: var(--heart); border-color: oklch(0.7 0.19 15 / .4); background: oklch(0.7 0.19 15 / .08); }
.btn .ico-box { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 7px; transition: transform .35s var(--spring); }
.btn:hover .ico-box { transform: rotate(-8deg) scale(1.08); }
.btn.primary .ico-box { background: oklch(0.2 0.05 30 / .16); }
.btn:not(.primary) .ico-box { background: oklch(1 0 0 / .07); }
.btn .i { transition: transform .25s var(--ease); }
.btn:hover > .i:last-child:not(:first-child) { transform: translateX(3px); }

/* ---------- первый экран: слева заголовок и разделы, справа ноутбук с редактором ---------- */
.landing { position: relative; min-height: max(760px, 100vh); display: flex; flex-direction: column; padding-top: var(--nav-h); overflow: hidden; }
.hero-bg { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
/* фон: сполохи цветов «Огня», поле ASCII-символов (рисует site.js), зерно и виньетка.
   Сполохи — радиальные градиенты без filter: blur: их двигает видеокарта, перерисовки нет. */
.aurora { position: absolute; border-radius: 50%; will-change: transform; }
.au-1 { width: 1100px; height: 900px; left: -380px; top: -440px; background: radial-gradient(closest-side, var(--c1), transparent); opacity: .3; animation: auA 18s ease-in-out infinite alternate; }
.au-2 { width: 920px; height: 760px; right: -320px; top: -6%; background: radial-gradient(closest-side, var(--c3), transparent); opacity: .16; animation: auB 23s ease-in-out infinite alternate; }
.au-3 { width: 1300px; height: 720px; left: 18%; bottom: -440px; background: radial-gradient(closest-side, var(--c2), transparent); opacity: .2; animation: auC 27s ease-in-out infinite alternate; }
@keyframes auA { to { transform: translate(160px, 110px) scale(1.18); } }
@keyframes auB { to { transform: translate(-140px, 160px) scale(1.25); } }
@keyframes auC { to { transform: translate(-180px, -60px) scale(1.1); } }
/* под всем фоном — фон из Мастерской «На главную», если он есть. Любой ролик
   тонируется под тему — тёплый графит, приглушено, слева темнее, чтобы заголовок читался. */
.bg-media { position: absolute; inset: 0; background: var(--bg); }
.bg-media > video, .bg-media > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1.6s var(--ease);
  filter: grayscale(.4) sepia(.55) hue-rotate(-16deg) saturate(1.7) brightness(var(--bgk, .95)) contrast(1.2); }
.bg-media > .on { opacity: 1; }
.bg-media > .top { z-index: 1; } /* копия ролика на стыке цикла проявляется поверх (crossLoop в site.js) */
/* фон из Мастерской: чуть размыт, чтобы мелкие детали не спорили с заголовком; увеличен — края размытия за экраном */
.bg-media > .feat { filter: grayscale(.4) sepia(.55) hue-rotate(-16deg) saturate(1.5) brightness(var(--bgk, .45)) contrast(1.15) blur(2px); transform: scale(1.03); }
.bg-media::after { content: ""; position: absolute; z-index: 2; inset: 0;
  background: linear-gradient(90deg, oklch(0.14 0.008 var(--h) / .78) 0%, oklch(0.14 0.008 var(--h) / .35) 45%, transparent 75%),
    linear-gradient(180deg, oklch(0.14 0.008 var(--h) / .5) 0%, transparent 22%); }
/* сполохи над фоном — тише, иначе красный забивает картинку; пока фона нет — обычной яркости */
.au-1, .au-2, .au-3 { transition: opacity 1.6s var(--ease); }
.bg-media.has ~ .au-1 { opacity: .18; }
.bg-media.has ~ .au-2 { opacity: .1; }
.bg-media.has ~ .au-3 { opacity: .12; }
.hero-credit { position: absolute; z-index: 4; right: 24px; top: calc(var(--nav-h) + 6px); display: flex; align-items: center; gap: 6px; max-width: min(360px, 60vw); padding: 5px 11px; border-radius: 99px; background: oklch(0.14 0.008 var(--h) / .6); border: 1px solid oklch(1 0 0 / .07); color: var(--muted); font-size: 12px; text-decoration: none; backdrop-filter: blur(8px); animation: fade .6s var(--ease) both; transition: color .2s, border-color .2s; }
.hero-credit span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hero-credit .i { width: 14px; height: 14px; }
.hero-credit:hover { color: var(--ink); border-color: var(--accent-line); }
/* затухание к краям считает сам site.js — CSS-маска на анимированном холсте дорогая */
.bg-glyphs { position: absolute; inset: 0; width: 100%; height: 100%; }
/* зерно неподвижное и без mix-blend-mode: иначе браузер пересчитывает смешивание каждый кадр фона */
.bg-grain { position: absolute; inset: 0; opacity: .035; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  }
.bg-vignette { position: absolute; inset: 0; background: radial-gradient(ellipse 130% 100% at 50% 35%, transparent 60%, oklch(0.09 0.008 var(--h) / .85)), linear-gradient(180deg, transparent 78%, var(--bg)); }
/* заголовок: градиент темы медленно переливается */
.landing h1 .grad { background-image: linear-gradient(100deg, var(--c1), var(--c2), var(--c3), var(--c2), var(--c1)); background-size: 300% 100%; animation: wordIn .8s var(--ease) calc(var(--i, 1) * .07s) both, shine 9s ease-in-out 1s infinite alternate; }
@keyframes shine { to { background-position: 100% 0; } }
.landing-grid { position: relative; z-index: 2; flex: 1; display: grid; grid-template-columns: minmax(0, 740px) minmax(0, 1fr); gap: 48px; align-items: center; width: min(1320px, 100% - 64px); }
.landing-copy { position: relative; z-index: 3; padding: 16px 0 0; }
.landing h1 { margin: 0 0 18px; font-size: clamp(46px, 5.9vw, 88px); line-height: .94; letter-spacing: -.055em; font-weight: 800; }
.landing h1 .w { display: inline-block; animation: wordIn .8s var(--ease) calc(var(--i, 0) * .07s) both; }
/* заголовки сменяют друг друга (heroTitles в site.js): слова улетают вверх по очереди, новые выезжают снизу */
.landing h1.out .w { animation: wordOut .38s var(--ease) calc(var(--i, 0) * .04s) both; }
@keyframes wordOut { to { opacity: 0; transform: translateY(-.35em) rotate(-2deg); filter: blur(8px); } }
.lead { margin: 0 0 26px; max-width: 480px; color: var(--muted); font-size: 18.5px; line-height: 1.5; animation: rise .7s var(--ease) .28s both; }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; padding-bottom: .06em; }
.btn.lg { height: 48px; padding: 0 22px; font-size: 15px; border-radius: 14px; }
.btn.lg:focus-visible { border-radius: 14px; }
.btn.block { width: 100%; }

/* панели разделов. Стекла (backdrop-filter) нет: под панелями анимированный фон, и размытие
   пересчитывалось бы каждый кадр — главная из-за этого и лагала. Вместо него плотный фон и «прожектор» за курсором. */
.fcards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.fcard, .fwide { position: relative; isolation: isolate; border-radius: 22px; background: oklch(0.17 0.008 var(--h) / .94); border: 1px solid var(--line);
  animation: rise .7s var(--ease) var(--d, .3s) both; transition: border-color .25s, transform .35s var(--ease), box-shadow .35s var(--ease); }
.fcard::before, .fwide::before { content: ""; position: absolute; z-index: -1; inset: 0; border-radius: inherit; pointer-events: none; opacity: var(--hov, 0);
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 0%), color-mix(in oklab, var(--c2) 16%, transparent), transparent 70%); }
.fcard::after, .fwide::after { content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; pointer-events: none; opacity: var(--hov, 0);
  background: radial-gradient(200px circle at var(--mx, 50%) var(--my, 0%), var(--c3), var(--c1) 45%, transparent 75%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
.fcard:hover, .fwide:hover { border-color: oklch(0.32 0.014 var(--h)); transform: translateY(-4px); box-shadow: 0 26px 50px -30px color-mix(in oklab, var(--c1) 85%, transparent); }
.fcard { display: flex; flex-direction: column; gap: 6px; padding: 12px 12px 14px; }
.fc-media { position: relative; height: 112px; margin-bottom: 8px; border-radius: 14px; overflow: hidden; background: #120d0b; transition: transform .45s var(--ease); }
.fcard:hover .fc-media { transform: scale(1.025); }
.fc-media::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px oklch(1 0 0 / .05); pointer-events: none; }
.fc-faces-grid { display: flex; flex-direction: column; justify-content: center; gap: 6px; padding: 0; -webkit-mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent); mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent); }
.ff-row { overflow: hidden; }
.ff-track { display: flex; gap: 6px; width: max-content; animation: ffRun 34s linear infinite; }
.ff-row:nth-child(2) .ff-track { animation-direction: reverse; animation-duration: 40s; }
.fc-faces-grid img { flex: none; width: 46px; height: 46px; object-fit: cover; object-position: 50% 15%; border-radius: 7px; filter: saturate(.85); transition: transform .3s var(--spring), filter .2s; }
@keyframes ffRun { to { transform: translateX(calc(-50% - 3px)); } }
@media (prefers-reduced-motion: reduce) { .ff-track { animation: none; } }
.fcard:hover .fc-faces-grid img { filter: none; }
.fc-faces-grid img:hover { transform: scale(1.12); }
/* арты по очереди (порядок случайный): сначала картинка, потом по ней проходит луч и остаётся line-art */
.fl-slide { position: absolute; inset: 0; opacity: 0; transition: opacity .7s var(--ease); }
.fl-slide.on { opacity: 1; }
.fl-slide img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%; transition: transform .6s var(--ease); }
.fl-slide .out { clip-path: inset(0 100% 0 0); }
.fl-slide.on .out { animation: flWipe 4.8s var(--ease) forwards; }
.fl-slide::after { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 2px; background: var(--accent-hi); box-shadow: 0 0 14px 2px var(--accent-hi); opacity: 0; }
.fl-slide.on::after { animation: flScan 4.8s var(--ease) forwards; }
.fcard:hover .fl-slide img { transform: scale(1.06); }
@keyframes flWipe { 0%, 14% { clip-path: inset(0 100% 0 0); } 58%, 100% { clip-path: inset(0 0 0 0); } }
@keyframes flScan { 0%, 13.9% { left: 0; opacity: 0; } 14% { left: 0; opacity: 1; } 58% { left: calc(100% - 2px); opacity: 1; } 58.1%, 100% { left: 0; opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .fl-slide .out { animation: none; clip-path: none; } .fl-slide::after { display: none; } }
.fc-braille { display: block; }
.fc-braille canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.fcard > b { font-size: 18px; font-weight: 700; letter-spacing: -.01em; }
.fcard > span { flex: 1; margin-bottom: 12px; color: var(--muted); font-size: 13.5px; line-height: 1.45; }
.fc-more { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 8px; color: var(--muted); font-size: 13.5px; text-decoration: none; transition: color .15s; }
.fc-more .i { width: 15px; height: 15px; order: 2; transition: transform .25s var(--ease); }
.fc-more:hover { color: var(--ink); }
.fc-more:hover .i { transform: translateX(3px); }

/* вторая строка: две широкие панели — фоны меню и «Угадайка» дня */
.frow { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.fwide { display: flex; align-items: center; gap: 14px; min-width: 0; padding: 12px 18px 12px 12px; text-decoration: none; }
.wc-art { position: relative; display: grid; place-content: center; flex: none; width: 60px; height: 60px; border-radius: 14px; overflow: hidden; background: #120d0b; box-shadow: inset 0 0 0 1px oklch(1 0 0 / .06); transition: transform .4s var(--spring); }
.fwide:hover .wc-art { transform: rotate(-4deg) scale(1.06); }
.wc-text { min-width: 0; }
.wc-text b { display: flex; align-items: center; gap: 8px; font-size: 17px; font-weight: 700; white-space: nowrap; }
.wc-text b em { padding: 2px 7px; border-radius: 6px; background: var(--grad); color: var(--accent-ink); font: 600 9px/1.5 var(--disp); font-style: normal; letter-spacing: .06em; text-transform: uppercase; }
.wc-text small { display: block; color: var(--muted); font-size: 13.5px; line-height: 1.35; }
.wc-go { margin-left: auto; color: var(--muted); }
.wc-go .i { width: 20px; height: 20px; transition: transform .25s var(--ease), color .2s; }
.fwide:hover .wc-go .i { transform: translateX(4px); color: var(--ink); }
/* мини-«главное меню»: небо переливается (сдвигается слой — без перерисовки), сверху и снизу полоски интерфейса */
.wc-sky { position: absolute; top: 0; bottom: 0; left: 0; width: 200%; background: linear-gradient(100deg, oklch(0.32 0.09 280), oklch(0.45 0.16 330) 25%, oklch(0.62 0.17 40) 50%, oklch(0.45 0.16 330) 75%, oklch(0.32 0.09 280)); animation: sky 7s linear infinite; }
@keyframes sky { to { transform: translateX(-50%); } }
.wc-hud { position: absolute; left: 7px; right: 7px; top: 7px; height: 5px; border-radius: 3px; background: oklch(0.12 0.01 40 / .7); }
.wc-bg img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.22); transition: opacity .8s, transform 4s linear; }
.wc-bg img.on { opacity: 1; transform: scale(1); }
.wc-hud.b { top: auto; bottom: 7px; left: 32px; height: 9px; background: oklch(0.6 0.15 145 / .9); }
.gc-art { font: 600 12px/1.15 var(--mono); color: var(--gold); letter-spacing: 1.5px; text-align: center; }
.gc-art i { font-style: normal; display: block; }
.gc-art i:nth-child(2) { color: var(--accent-hi); }
.gc-art i:nth-child(3) { color: oklch(0.7 0.18 30); }

/* ноутбук: наклонён к центру и уходит за правый край, чуть поворачивается за курсором */
.landing-device { position: relative; align-self: stretch; min-height: 560px; perspective: 2400px; }
.landing-device::before { content: ""; position: absolute; left: -10%; top: 0; width: 130%; height: 100%; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in oklab, var(--c2) 60%, transparent), transparent); opacity: .3; }
.laptop { position: absolute; left: 0; top: 50%; width: 1000px; transform-style: preserve-3d; transform-origin: 0 50%;
  transform: translateY(-54%) rotateY(calc(-24deg + var(--mx, 0) * 5deg)) rotateX(calc(7deg - var(--my, 0) * 4deg)) rotateZ(2.5deg); transition: transform .8s var(--ease); animation: laptopIn 1.2s var(--ease) .25s both; }
@keyframes laptopIn { from { opacity: 0; translate: 80px 30px; } }
.lt-lid { padding: 14px 14px 18px; border-radius: 24px 24px 10px 10px; background: linear-gradient(150deg, oklch(0.31 0.012 var(--h)), oklch(0.16 0.008 var(--h)) 55%, oklch(0.2 0.009 var(--h)));
  box-shadow: 0 0 0 1px oklch(1 0 0 / .08), 0 1px 0 oklch(1 0 0 / .16) inset, -40px 60px 120px -30px rgba(0, 0, 0, .95); }
.lt-screen { position: relative; aspect-ratio: 16 / 10; border-radius: 10px; overflow: hidden; background: #0f0d0c; }
.lt-screen img { display: block; width: 100%; height: 100%; object-fit: cover; }
.lt-screen::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(115deg, oklch(1 0 0 / .08) 0%, transparent 32%, transparent 70%, rgba(0, 0, 0, .3)); }
.lt-base { position: relative; height: 20px; margin: 0 -46px; border-radius: 4px 4px 28px 28px; background: linear-gradient(180deg, oklch(0.36 0.012 var(--h)), oklch(0.2 0.009 var(--h)) 60%, oklch(0.13 0.007 var(--h))); box-shadow: 0 34px 60px -14px rgba(0, 0, 0, .95); }
.lt-base::before { content: ""; position: absolute; left: 50%; top: 0; width: 150px; height: 7px; margin-left: -75px; border-radius: 0 0 9px 9px; background: oklch(0.14 0.007 var(--h)); }
/* экран ноутбука: редактор, собранный разметкой; размеры — от ширины экрана (cqw) */
.lt-screen { container-type: inline-size; }
.mock { position: absolute; inset: 0; overflow: hidden; font: 500 1.05cqw/1.3 var(--font); color: oklch(0.82 0.012 60);
  background: #080706 radial-gradient(oklch(0.3 0.005 60) 0.09cqw, transparent 0.11cqw) 0 0 / 1.6cqw 1.6cqw; }
.mock .i { width: 1.25em; height: 1.25em; stroke-width: 1.9; }
.mk-pill { position: absolute; display: flex; align-items: center; background: oklch(0.2 0.005 60 / .94); border: 1px solid oklch(0.28 0.005 60); border-radius: 1.1em; box-shadow: 0 1em 2.5em -1em rgba(0, 0, 0, .7); }
.mk-label { position: absolute; left: 18%; top: 17.6%; color: oklch(0.5 0.01 60); font: 0.85em var(--mono); }
.mk-sheet { position: absolute; left: 18%; top: 21%; width: 61%; aspect-ratio: 1204 / 612; border-radius: 0.5em; overflow: hidden;
  background: #0f0d0c linear-gradient(oklch(1 0 0 / .035) 1px, transparent 1px) 0 0 / 0.84% 1.64%, #0f0d0c linear-gradient(90deg, oklch(1 0 0 / .035) 1px, transparent 1px) 0 0 / 0.84% 1.64%;
  box-shadow: 0 0 0 1px oklch(1 0 0 / .06), 0 2.5em 5em -1.5em rgba(0, 0, 0, .8); }
.mk-sheet img, .mk-sheet canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.mock.drawing .mk-sheet :is(img, canvas) { animation: mkDraw 2.6s cubic-bezier(.45, 0, .2, 1) both; }
@keyframes mkDraw { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
.mk-scan { position: absolute; top: 0; bottom: 0; left: 0; width: 2px; background: var(--c2); box-shadow: 0 0 1.2em 0.3em color-mix(in oklab, var(--c2) 70%, transparent); opacity: 0; }
.mock.drawing .mk-scan { animation: mkScan 2.6s cubic-bezier(.45, 0, .2, 1) both; }
@keyframes mkScan { 0% { left: 0; opacity: 1; } 92% { opacity: 1; } 100% { left: 100%; opacity: 0; } }
.mk-brand { left: 1.6%; top: 2.6%; gap: 0.7em; padding: 0.45em 0.6em 0.45em 0.45em; }
.mk-logo { width: 2.1em; height: 2.1em; border-radius: 0.6em; background: oklch(0.27 0.006 60); position: relative; }
.mk-logo::after { content: ""; position: absolute; left: 22%; right: 22%; top: 50%; height: 0.32em; margin-top: -0.16em; border-radius: 1em; background: var(--c2); transform: rotate(-45deg); }
.mk-brand b { display: block; color: oklch(0.95 0.005 60); font-weight: 650; }
.mk-brand small { color: oklch(0.62 0.01 60); font-size: 0.82em; }
.mk-brand em { font-style: normal; }
.mk-chev .i, .mk-chev { width: 1em; height: 1em; color: oklch(0.62 0.01 60); }
.mk-seg { left: 50%; top: 2.6%; transform: translateX(-50%); padding: 0.25em; gap: 0.15em; }
.mk-seg span { display: flex; align-items: center; gap: 0.4em; padding: 0.55em 1em; border-radius: 0.75em; color: oklch(0.62 0.01 60); }
.mk-seg span.on { background: oklch(0.3 0.005 60); color: oklch(0.95 0.005 60); }
.mk-right { position: absolute; right: 1.6%; top: 2.6%; display: flex; gap: 0.6em; }
.mk-right > span { position: static; display: flex; align-items: center; gap: 0.45em; height: 2.9em; padding: 0 1em; border-radius: 0.8em; }
.mk-sq { width: 2.9em; justify-content: center; padding: 0 !important; }
.mk-btn.pri { background: oklch(0.96 0.005 60); color: #141210; font-weight: 650; border: 0; }
.mk-layers { left: 1.6%; top: 13%; width: 15%; flex-direction: column; align-items: stretch; gap: 0.25em; padding: 0.9em 0.7em; }
.mk-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.4em; color: oklch(0.62 0.01 60); font-size: 0.92em; }
.mk-h b { padding: 0.1em 0.5em; border-radius: 0.45em; background: oklch(0.25 0.005 60); font: 500 0.9em var(--mono); color: oklch(0.8 0.01 60); }
.mk-row { display: flex; align-items: center; gap: 0.55em; padding: 0.5em 0.55em; border-radius: 0.55em; }
.mk-row b { margin-left: auto; font: 400 0.9em var(--mono); color: oklch(0.62 0.01 60); }
.mk-row.on { background: oklch(0.28 0.005 60); color: oklch(0.95 0.005 60); }
.mk-row.on .i { color: var(--c2); }
.mk-layers p { margin: 0.5em 0 0; color: oklch(0.48 0.01 60); font-size: 0.85em; line-height: 1.4; }
.mk-insp { right: 1.6%; top: 13%; width: 17.5%; flex-direction: column; align-items: stretch; gap: 0.8em; padding: 0.9em; }
.mk-chips { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.25em; padding: 0.22em; border-radius: 0.7em; background: oklch(0.25 0.005 60); }
.mk-chips span { padding: 0.4em 0; border-radius: 0.5em; text-align: center; font: 600 0.88em var(--mono); color: oklch(0.62 0.01 60); }
.mk-chips span.on { background: var(--c2); color: var(--accent-ink); box-shadow: 0 0.3em 0.9em -0.3em var(--c2); }
.mk-sl { display: flex; flex-direction: column; gap: 0.45em; font-size: 0.92em; }
.mk-sl i { position: relative; height: 0.3em; border-radius: 1em; background: oklch(0.32 0.005 60); }
.mk-sl i::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: calc(var(--v) * 100%); border-radius: inherit; background: var(--c2); }
.mk-sl i::after { content: ""; position: absolute; top: 50%; left: calc(var(--v) * 100%); width: 0.95em; height: 0.95em; margin: -0.475em 0 0 -0.475em; border-radius: 50%; background: #fff; box-shadow: 0 0.1em 0.3em rgba(0, 0, 0, .4); }
.mk-add { display: flex; align-items: center; justify-content: center; gap: 0.4em; padding: 0.65em; border-radius: 0.7em; background: var(--c2); color: var(--accent-ink); font-weight: 650; }
.mk-dock { left: 50%; bottom: 3%; transform: translateX(-50%); gap: 0.15em; padding: 0.35em; border-radius: 1em; }
.mk-dock span { display: grid; place-items: center; width: 2.7em; height: 2.7em; border-radius: 0.7em; }
.mk-dock span .i { width: 1.35em; height: 1.35em; }
.mk-dock span.on { background: var(--c2); color: var(--accent-ink); box-shadow: 0 0.35em 1em -0.3em var(--c2); }
.mk-dock b { width: 1px; height: 1.6em; margin: 0 0.3em; background: oklch(0.28 0.005 60); }

/* случайная сетка из каталога — плашка поверх ноутбука */
.random-grid { position: absolute; z-index: 4; left: 8%; bottom: 3%; display: flex; align-items: center; gap: 12px; max-width: min(560px, 92%); padding: 10px 18px; border-radius: 99px; background: oklch(0.17 0.008 var(--h) / .92); border: 1px solid oklch(1 0 0 / .08); box-shadow: 0 20px 50px -18px rgba(0, 0, 0, .9); text-decoration: none; font-size: 14px; white-space: nowrap; animation: rise .7s var(--ease) .2s both; transition: border-color .2s, transform .3s var(--ease); }
.random-grid:hover { border-color: var(--accent-line); transform: translateY(-2px); }
.random-grid b { overflow: hidden; text-overflow: ellipsis; font-weight: 650; }
.rg-likes { display: flex; align-items: center; gap: 5px; color: var(--heart); font: 600 13px var(--mono); }
.rg-likes .i { width: 16px; height: 16px; }
.rg-note { color: var(--muted); }

/* ---------- полоса снизу: автор, поддержка, Telegram, реклама, GitHub, версия ---------- */
.bottom-bar { position: relative; z-index: 3; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px 24px; padding: 22px 0 26px; color: var(--muted); font-size: 14px; }
.landing > .bottom-bar { width: min(1320px, 100% - 64px); padding: 18px 0 20px; }
.bb-left, .bb-right { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 24px; }
.bb-authors { display: flex; align-items: center; gap: 10px; }
.bb-author { display: inline-flex; align-items: center; gap: 8px; padding: 0; border: 0; background: none; color: var(--ink-2); font-weight: 650; cursor: pointer; transition: color .15s; }
.bb-author .ava { width: 30px; height: 30px; box-shadow: 0 0 0 2px var(--bg), 0 0 0 3px oklch(1 0 0 / .1); transition: box-shadow .2s; }
.bb-author:hover .ava { box-shadow: 0 0 0 2px var(--bg), 0 0 0 3px var(--accent); }
.bb-link { display: inline-flex; align-items: center; gap: 7px; padding: 0; border: 0; background: none; color: var(--muted); text-decoration: none; font-size: 14px; cursor: pointer; transition: color .15s; }
.bb-link .i { width: 17px; height: 17px; }
.bb-link .i:last-child:not(:first-child) { width: 14px; height: 14px; opacity: .7; }
.bb-link:hover, .bb-author:hover { color: var(--ink); }
.bb-ver { position: relative; padding: 4px 10px; border-radius: 8px; border: 1px solid #ff9db566; background: linear-gradient(135deg, #ff9db514, transparent 70%); color: #ffc4d2; font: 12.5px var(--mono); text-decoration: none; cursor: default; box-shadow: 0 0 14px -4px #ff9db555, inset 0 0 8px -4px #ff9db555; transition: color .2s, border-color .2s, box-shadow .2s; }
.bb-ver::before, .bb-ver::after { content: ""; position: absolute; width: 9px; height: 9px; background: #ffb3c6; border-radius: 80% 0 80% 0; opacity: .9; pointer-events: none; }
.bb-ver::before { top: -5px; left: -4px; transform: rotate(-20deg); }
.bb-ver::after { right: -4px; bottom: -5px; width: 7px; height: 7px; transform: rotate(150deg); background: #ff9db5; }
.bb-ver:hover { color: #fff0f4; border-color: #ff9db5; box-shadow: 0 0 18px -2px #ff9db577, inset 0 0 10px -3px #ff9db577; }

/* ---------- секции ниже ---------- */
.section { padding: 96px 0 20px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.section-head h2 { margin: 0; font-size: clamp(28px, 3.2vw, 40px); letter-spacing: -.03em; font-weight: 700; }
.section-head p { margin: 6px 0 0; color: var(--muted); }
.section-head.center { justify-content: center; text-align: center; }
.head-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.kicker { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 10px; font: 600 11px var(--disp); letter-spacing: .1em; text-transform: uppercase; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.kicker::before { content: ""; width: 14px; height: 3px; border-radius: 2px; background: var(--accent); transform: rotate(-45deg); }

/* появление при прокрутке */
[data-reveal] { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease), transform .7s var(--ease); transition-delay: var(--d, 0s); }
[data-reveal].in { opacity: 1; transform: none; }

/* ---------- карточки сеток ----------
   Карточка — плотная плитка с отступом 10px; превью внутри со своим скруглением, без плашек поверх арта.
   Ниже: название и автор слева, скачивания и лайк справа; строкой мельче — что внутри сетки и теги. */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 16px; }
.gcard { position: relative; display: flex; flex-direction: column; padding: 10px 10px 12px; border-radius: 18px; background: var(--card); border: 1px solid oklch(1 0 0 / .05); cursor: pointer; text-align: left; color: inherit; outline-offset: 3px; transition: transform .3s var(--ease), border-color .2s, background .2s, box-shadow .3s; animation: rise .5s var(--ease) both; }
.gcard:hover { transform: translateY(-3px); background: oklch(0.205 0.01 var(--h)); border-color: oklch(1 0 0 / .09); box-shadow: 0 24px 50px -28px rgba(0, 0, 0, .95); }
.gthumb { position: relative; display: block; width: 100%; aspect-ratio: 1204 / 612; border-radius: 12px; background: #0f1819; overflow: hidden; isolation: isolate; }
.gthumb::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; box-shadow: inset 0 0 0 1px oklch(1 0 0 / .05); pointer-events: none; }
.gthumb img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.gcard:hover .gthumb img { transform: scale(1.03); }
.gmine { position: absolute; z-index: 3; right: 8px; top: 8px; padding: 2px 8px; border-radius: 6px; background: var(--accent); color: var(--accent-ink); font: 600 11px var(--font); box-shadow: 0 2px 10px #0009, inset 0 0 0 1px #ffffff2e; }
/* огонёк автора у лайков: сетка поднята в «Популярных» */
/* буст огонька: огненная стрелка вверх в левом нижнем углу превью — подпрыгивает, хвост пламени дрожит, по плашке бежит блик */
.gboost { position: absolute; z-index: 3; left: 8px; bottom: 8px; display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 10px 0 6px; overflow: hidden; border: 0; border-radius: 999px; cursor: pointer;
  background: linear-gradient(135deg, #ffb340, #ff5a1f 55%, #d42d1a); color: #fff; font: 800 12.5px/1 var(--mono); letter-spacing: -.02em; text-shadow: 0 1px 2px #7a1d0080;
  box-shadow: 0 0 0 1px #ffd59a66 inset, 0 4px 14px -2px #ff5a1fa6, 0 2px 8px #0008; animation: gbGlow 2.6s ease-in-out infinite; transition: transform .35s var(--spring); }
.gboost svg { width: 16px; height: 16px; overflow: visible; }
.gboost .bi-arrow { fill: #fff; animation: gbHop 1.6s var(--ease) infinite; }
.gboost .bi-tail { fill: #ffe27a; transform-origin: 50% 0; transform-box: fill-box; animation: gbTail .35s ease-in-out infinite alternate; }
.gboost::after { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 30%, #fff8 50%, transparent 70%) -150% 0 / 60% 100% no-repeat; animation: gbShine 3.2s var(--ease) infinite; pointer-events: none; }
.gboost:hover { transform: scale(1.12) rotate(-3deg); }
.gboost:active { transform: scale(.96); }
@keyframes gbGlow { 50% { box-shadow: 0 0 0 1px #ffd59a99 inset, 0 4px 22px 0 #ff5a1fd9, 0 2px 8px #0008; } }
@keyframes gbHop { 0%, 60%, 100% { transform: none; } 30% { transform: translateY(-2.5px); } }
@keyframes gbTail { from { transform: scaleY(.75); opacity: .8; } to { transform: scaleY(1.15); opacity: 1; } }
@keyframes gbShine { 0%, 55% { background-position: -150% 0; } 100% { background-position: 250% 0; } }
@media (prefers-reduced-motion: reduce) { .gboost, .gboost *, .gboost::after { animation: none !important; } }
/* окно буста */
.boost-sheet .sk-num { font-size: 56px; }
.bst-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; width: 100%; margin-top: 6px; }
.bst-steps span { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 6px; border-radius: 14px; border: 1px solid var(--line); color: var(--muted); animation: rise .5s var(--ease) calc(.4s + var(--i) * .08s) both; }
.bst-steps b { color: var(--ink-2); font: 700 18px/1 var(--mono); }
.bst-steps small { font-size: 11.5px; }
.bst-steps .on { border-color: color-mix(in oklab, var(--glow) 55%, transparent); background: color-mix(in oklab, var(--glow) 12%, transparent); color: var(--ink-2); box-shadow: 0 0 24px -8px var(--glow); }
.bst-steps .on b { color: var(--f2); }
.bst-steps em { font-style: normal; font: 600 10.5px var(--mono); color: var(--faint); }
.bst-steps .on em { color: var(--ink-2); }
.bst-pick { width: 100%; margin-top: 10px; }
/* окно огонька: кнопка в окно выбора сеток для буста */
.sk-pick { display: flex; align-items: center; gap: 12px; width: 100%; margin-top: 8px; padding: 10px 14px 10px 10px; border-radius: 16px; border: 1px solid color-mix(in oklab, var(--glow) 45%, transparent); background: color-mix(in oklab, var(--glow) 10%, transparent); color: var(--ink); text-align: left; cursor: pointer; animation: rise .6s var(--ease) .66s both; transition: background .25s, transform .25s var(--spring); }
.sk-pick:hover { background: color-mix(in oklab, var(--glow) 18%, transparent); transform: translateY(-1px); }
.sk-pick > span:nth-child(2) { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.sk-pick b { font-size: 14px; }
.sk-pick small { color: var(--muted); font-size: 12px; }
.sk-pick em { font-style: normal; font: 700 12px var(--mono); color: var(--f2); }
.bpk-ico { display: grid; place-items: center; flex: none; width: 38px; height: 38px; border-radius: 12px; background: linear-gradient(135deg, #ffb340, #ff5a1f 55%, #d42d1a); box-shadow: 0 4px 16px -4px #ff5a1fb0; }
.bpk-ico svg { width: 20px; height: 20px; overflow: visible; }
.bpk-ico .bi-arrow { fill: #fff; animation: gbHop 1.6s var(--ease) infinite; }
.bpk-ico .bi-tail { fill: #ffe27a; transform-origin: 50% 0; transform-box: fill-box; animation: gbTail .35s ease-in-out infinite alternate; }
/* окно выбора сеток для буста */
.modal.sheet.bpk-modal { width: min(880px, 100%); }
.bpk { display: flex; flex-direction: column; max-height: calc(100vh - 40px); }
.bpk-head { display: flex; align-items: flex-start; gap: 14px; padding: 24px 56px 16px 24px; border-bottom: 1px solid var(--line); }
.bpk-head .bpk-ico { width: 46px; height: 46px; border-radius: 14px; }
.bpk-head > div:nth-child(2) { flex: 1; min-width: 0; }
.bpk-head h2 { margin: 0; font-size: 22px; letter-spacing: -.02em; }
.bpk-head p { margin: 4px 0 0; color: var(--muted); font-size: 13.5px; line-height: 1.5; }
.bpk-slots { display: flex; align-items: center; gap: 6px; flex: none; align-self: center; }
.bpk-slots i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line-strong); transition: background .3s, border-color .3s, box-shadow .3s, transform .4s var(--spring); }
.bpk-slots i.on { border-color: #ffb340; background: radial-gradient(circle at 35% 35%, #ffe27a, #ff5a1f); box-shadow: 0 0 12px #ff5a1fa0; transform: scale(1.1); }
.bpk-slots b { margin-left: 4px; font: 700 13px var(--mono); color: var(--ink-2); }
.bpk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; padding: 18px 24px; overflow-y: auto; min-height: 120px; }
.bpk-empty { grid-column: 1 / -1; color: var(--muted); font-size: 14px; padding: 20px 0; text-align: center; }
.bpk-item { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 8px 8px 10px; border: 1px solid var(--line); border-radius: 16px; background: var(--bg-2); color: var(--ink-2); text-align: left; cursor: pointer; transition: border-color .3s, background .3s, box-shadow .35s, opacity .3s, transform .25s var(--ease); animation: rise .45s var(--ease) calc(.1s + var(--i) * .04s) both; }
.bpk-item:hover:not(:disabled) { border-color: var(--line-strong); transform: translateY(-2px); }
.bpk-item .gthumb { border-radius: 10px; }
.bpk-info { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 4px; }
.bpk-info b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14.5px; }
.bpk-info small { display: flex; align-items: center; gap: 4px; flex: none; color: var(--faint); font: 11.5px var(--mono); }
.bpk-info small .i { width: 13px; height: 13px; }
.bpk-state { padding: 0 4px; font: 600 11.5px var(--mono); color: var(--faint); }
.bpk-state::before { content: "Нажми, чтобы поднять"; }
.bpk-badge { position: absolute; z-index: 4; left: 16px; top: 16px; display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 10px 0 6px; border-radius: 999px; background: linear-gradient(135deg, #ffb340, #ff5a1f 55%, #d42d1a); color: #fff; font: 800 12.5px var(--mono); box-shadow: 0 4px 14px -2px #ff5a1fa6; opacity: 0; transform: scale(.6) translateY(-4px); transition: opacity .25s, transform .45s var(--spring); }
.bpk-badge svg { width: 16px; height: 16px; overflow: visible; }
.bpk-badge .bi-arrow { fill: #fff; } .bpk-badge .bi-tail { fill: #ffe27a; }
.bpk-item.on { border-color: #ff7a2a; background: color-mix(in oklab, #ff5a1f 12%, var(--bg-2)); box-shadow: 0 0 0 1px #ff7a2a inset, 0 12px 36px -14px #ff5a1fb0; color: var(--ink); }
.bpk-item.on .bpk-badge { opacity: 1; transform: none; }
.bpk-item.on .bpk-state { color: #ffb36b; }
.bpk-item.on .bpk-state::before { content: "Поднята · нажми, чтобы снять"; }
.bpk-item.wait .bpk-state::before { content: "Ждёт места · нажми, чтобы снять"; }
.bpk-item:disabled { opacity: .4; cursor: not-allowed; }
.bpk-item:disabled .bpk-state::before { content: "Места заняты"; }
.bpk-item.busy { opacity: .6; pointer-events: none; }
.bpk-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 24px 20px; border-top: 1px solid var(--line); }
.bpk-foot small { color: var(--muted); font-size: 12.5px; }
@media (max-width: 640px) { .bpk-head { flex-wrap: wrap; padding: 20px 48px 14px 18px; } .bpk-slots { width: 100%; } .bpk-grid { padding: 14px 18px; grid-template-columns: 1fr 1fr; gap: 10px; } .bpk-foot { padding: 12px 18px 16px; } .bpk-foot small { display: none; } }
@media (prefers-reduced-motion: reduce) { .bpk-ico *, .bpk-item { animation: none !important; } }
.ginfo { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 11px 4px 0; }
.gmain { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.gtitle { color: inherit; text-decoration: none; font-size: 17px; font-weight: 700; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gby { display: flex; align-items: center; gap: 7px; min-width: 0; color: var(--muted); font-size: 13.5px; white-space: nowrap; overflow: hidden; }
.gby i { font-style: normal; color: var(--faint); overflow: hidden; text-overflow: ellipsis; }
.gava { width: 20px; height: 20px; font-size: 10px; }
.gacts { display: flex; align-items: center; gap: 2px; flex: none; color: var(--muted); }
.gdl, .glike { display: inline-flex; align-items: center; gap: 5px; height: 34px; padding: 0 8px; font: 500 13.5px var(--font); }
.gdl .i, .glike .i { width: 17px; height: 17px; }
.glike { border: 0; border-radius: 9px; background: none; color: var(--muted); cursor: pointer; transition: color .15s, background .15s; }
.glike:hover { color: var(--ink); background: oklch(1 0 0 / .05); }
.glike.liked { color: var(--heart); }
.glike.liked .i { fill: currentColor; animation: heartPop .45s var(--spring); }
.gfoot { display: flex; justify-content: space-between; gap: 12px; padding: 6px 4px 0; color: var(--faint); font-size: 12px; line-height: 1.45; }
.gfoot span:first-child { flex: none; }
.gtagline { min-width: 0; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* карточка работы в профиле — тот же каркас, свои подписи */
.gkind { position: absolute; z-index: 2; left: 8px; top: 8px; padding: 3px 8px; border-radius: 7px; background: rgba(10, 8, 6, .72); color: oklch(0.9 0.005 60); font: 500 11px var(--mono); }
.gbody { display: flex; flex-direction: column; gap: 3px; padding: 11px 4px 0; }
.gmeta { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12.5px; }
.gmeta .by { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cards-empty { grid-column: 1 / -1; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 64px 20px; border-radius: var(--r); border: 1.5px dashed var(--line-strong); color: var(--muted); text-align: center; }
.cards-empty b { color: var(--ink); font-size: 17px; font-weight: 600; }
.cards-empty .empty-mark { width: 56px; height: 56px; margin-bottom: 6px; }
.cards-empty .empty-mark .mk-stroke { stroke-width: 6; stroke-dasharray: 32; animation: strokeIn 1s var(--ease) .2s both; }
.skeleton { aspect-ratio: 1204 / 612; border-radius: 12px; background: linear-gradient(100deg, var(--card-2) 30%, oklch(0.27 0.011 var(--h)) 50%, var(--card-2) 70%); background-size: 300% 100%; animation: shimmer 1.4s linear infinite; }
.gcard.sk { pointer-events: none; }
.gcard.sk .ginfo { flex-direction: column; gap: 8px; }
.gcard.sk .ginfo span { display: block; width: 60%; height: 12px; border-radius: 5px; background: var(--card-2); }
.gcard.sk .ginfo span + span { width: 38%; }

/* ---------- Мастерская: сетки и фоны ---------- */
body[data-page="workshop"] { padding-top: calc(var(--nav-h) + 20px); background: transparent; }
body[data-page="workshop"]::before { content: ""; position: absolute; z-index: -1; left: 50%; top: -260px; width: 1100px; height: 520px; margin-left: -550px; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in oklab, var(--c1) 22%, transparent), transparent); pointer-events: none; }
.ws-head { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 10px 20px; padding: 28px 0 22px; }
.ws-title { display: flex; align-items: center; flex-wrap: wrap; gap: 14px 18px; animation: rise .6s var(--ease) both; }
.ws-ico { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 15px; background: var(--card-2); border: 1px solid var(--line-strong); color: var(--accent-hi); box-shadow: 0 10px 30px -14px color-mix(in oklab, var(--c1) 80%, transparent); }
.ws-ico .i { width: 24px; height: 24px; }
.ws-head h1 { margin: 0; font-size: 46px; line-height: 1; letter-spacing: -.04em; font-weight: 750; }
.ws-actions { display: flex; gap: 10px; animation: rise .6s var(--ease) .1s both; }
.ws-head p { grid-column: 1 / -1; margin: 0; color: var(--muted); animation: rise .6s var(--ease) .06s both; }
.ws-head .demo-note { grid-column: 1 / -1; margin: 6px 0 0; }
.demo-note { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: oklch(0.82 0.13 80 / .08); border: 1px solid oklch(0.82 0.13 80 / .22); color: oklch(0.85 0.09 80); font-size: 13.5px; }

/* сегмент-переключатель: «таблетка» переезжает под выбранную кнопку */
.seg { position: relative; display: inline-flex; gap: 2px; padding: 4px; border-radius: 13px; background: var(--card); border: 1px solid var(--line); }
.seg button { position: relative; z-index: 1; height: 34px; padding: 0 16px; border: 0; border-radius: 9px; background: none; color: var(--muted); font-size: 14px; font-weight: 550; cursor: pointer; white-space: nowrap; transition: color .2s; }
.seg button:hover, .seg button.on { color: var(--ink); }
.seg-ind { position: absolute; top: 4px; left: 0; height: 34px; border-radius: 9px; background: var(--card-2); box-shadow: 0 0 0 1px var(--line-strong), 0 6px 16px -8px rgba(0, 0, 0, .8); transition: transform .4s var(--spring), width .4s var(--spring); pointer-events: none; }
.seg.ghost { background: none; border-color: transparent; padding-left: 0; }
.seg.ghost .seg-ind { background: var(--card); }
.seg.sm button { height: 28px; padding: 0 11px; font-size: 12.5px; }
.seg.sm .seg-ind { height: 28px; }

.ws-bar { position: sticky; top: calc(var(--nav-h) - 6px); z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 0; border-bottom: 1px solid var(--line); transition: background-color .25s; animation: rise .6s var(--ease) .14s both; }
/* прилипла к меню при прокрутке — подложка, чтобы карточки не просвечивали; на месте — прозрачная поверх фона */
.ws-bar.stuck { background: color-mix(in oklab, var(--bg) 82%, transparent); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.search { position: relative; flex: 0 1 340px; }
.search .i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); transition: color .15s; }
.search:focus-within .i { color: var(--accent); }
.input { width: 100%; height: 40px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--ink); transition: border-color .15s, background .15s, box-shadow .15s; }
.input:hover { border-color: var(--line-strong); }
.input:focus { outline: 0; border-color: var(--accent); background: var(--card-2); box-shadow: 0 0 0 3px color-mix(in oklab, var(--c2) 15%, transparent); }
.search .input { padding-left: 38px; }
.ws-filters { display: flex; justify-content: space-between; align-items: center; gap: 10px 20px; flex-wrap: wrap; padding: 16px 0 8px; animation: rise .6s var(--ease) .18s both; }
.tchips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.tchip { height: 32px; padding: 0 13px; border-radius: 99px; border: 1px solid var(--line); background: var(--card); color: var(--muted); font-size: 13px; cursor: pointer; transition: color .15s, border-color .15s, background .15s, transform .2s var(--spring); }
.tchip:hover { color: var(--ink); border-color: var(--line-strong); }
.tchip:active { transform: scale(.96); }
.tchip.on { color: var(--ink); background: var(--card-2); border-color: var(--accent-line); box-shadow: inset 0 -2px 0 var(--accent); }
.tchip[data-v="18+"] { font-weight: 650; }
.ws-aspect > span { margin-right: 4px; color: var(--faint); font: 600 11px var(--mono); letter-spacing: 1px; text-transform: uppercase; }
.ws-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 8px 0 18px; }
.ws-meta .count { color: var(--muted); font: 12.5px var(--mono); }
.more { display: flex; justify-content: center; padding: 30px 0; }
/* чипсы-вкладки (профиль) */
.chips { position: relative; display: flex; gap: 4px; padding: 4px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); }
.chip { position: relative; z-index: 1; height: 32px; padding: 0 13px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-size: 13.5px; cursor: pointer; transition: color .2s; }
.chip:hover { color: var(--ink); }
.chip.on { color: var(--ink); }
.chip-ind { position: absolute; top: 4px; left: 0; height: 32px; border-radius: 8px; background: var(--card-2); box-shadow: 0 0 0 1px var(--line-strong); transition: transform .4s var(--spring), width .4s var(--spring); pointer-events: none; }
.chip-ind::after { content: ""; position: absolute; left: 30%; right: 30%; bottom: 3px; height: 2px; border-radius: 2px; background: var(--grad); }

/* превью сетки: живой холст поверх «загружаем» */
.gthumb canvas, .gthumb > img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease), opacity .4s; }
.gthumb canvas { opacity: 0; }
.gthumb.ready canvas { opacity: 1; }
.gcard:hover .gthumb canvas, .gcard:hover .gthumb > img { transform: scale(1.03); }
.g-load { position: absolute; inset: 0; display: grid; place-items: center; color: oklch(0.6 0.02 60); font: 12px var(--mono); transition: opacity .3s; }
.gthumb.ready .g-load { opacity: 0; }
.g18, .btags .t18 { padding: 3px 7px; border-radius: 7px; background: oklch(0.6 0.2 25); color: #fff; font: 700 11px var(--mono); }
.g18 { position: absolute; z-index: 3; left: 8px; top: 8px; box-shadow: 0 2px 10px #0009, inset 0 0 0 1px #ffffff2e; }
.gtags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.gtags i { padding: 2px 8px; border-radius: 6px; background: var(--card-2); color: var(--ink-2); font: 500 11.5px var(--font); font-style: normal; }
/* 18+: размыто, пока не нажали */
.hide18 .gthumb > :not(.nsfw-cover):not(.gmine):not(.g18):not(.gboost), .hide18 .bpic > :not(.nsfw-cover), .hide18.bg-view > :not(.nsfw-cover), .hide18.modal-view > :not(.nsfw-cover), .hide18.gp-view > :not(.nsfw-cover) { filter: blur(9px) saturate(.75); }
/* показали — плашка «18+ Нажми» больше не нужна */
:is(.gcard, .bcard, .modal-view, .gp-view):not(.hide18) .nsfw-cover { display: none; }
.nsfw-cover { position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; background: oklch(0.12 0.01 30 / .3); color: #fff; cursor: pointer; overflow: hidden; }
.spoiler-fx { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.nsfw-cover b { position: relative; padding: 6px 15px; border-radius: 999px; background: #0009; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); box-shadow: inset 0 0 0 1px #ffffff2e; font: 800 15px var(--mono); letter-spacing: .04em; transition: transform .25s var(--ease), background .25s; }
.nsfw-cover:hover b { transform: scale(1.08); background: oklch(0.6 0.2 25 / .85); }
/* окно «мне есть 18» */
.modal.sheet:has(.adult-dlg) { width: min(360px, 100%); }
.adult-dlg { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 34px 26px 24px; text-align: center; }
.ad-badge { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: oklch(0.6 0.2 25); box-shadow: 0 0 0 6px oklch(0.6 0.2 25 / .16), 0 10px 30px -8px oklch(0.6 0.2 25 / .7); color: #fff; font: 800 20px var(--mono); }
.adult-dlg h2 { margin: 14px 0 0; font-size: 21px; letter-spacing: -.02em; }
.adult-dlg p { margin: 0 0 8px; color: var(--muted); font-size: 14px; line-height: 1.55; }
.ad-row { display: grid; grid-template-columns: 1fr 1.3fr; gap: 8px; width: 100%; }
.ad-row .btn { justify-content: center; }
.ad-remember { display: inline-flex; align-items: center; gap: 8px; margin-top: 8px; color: var(--muted); font-size: 12.5px; cursor: pointer; }
.ad-remember input { accent-color: var(--accent); }
.ad-remember:hover { color: var(--ink-2); }

/* карточки фонов */
.bcards { grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); }
.bcard { position: relative; display: flex; flex-direction: column; padding: 10px 10px 8px; border-radius: 18px; background: var(--card); border: 1px solid oklch(1 0 0 / .05); cursor: pointer; outline-offset: 3px; animation: rise .5s var(--ease) both; transition: transform .3s var(--ease), border-color .2s, box-shadow .3s; }
.bcard:hover { transform: translateY(-3px); background: oklch(0.205 0.01 var(--h)); border-color: oklch(1 0 0 / .09); box-shadow: 0 24px 50px -28px rgba(0, 0, 0, .95); }
.bpic { position: relative; aspect-ratio: 16 / 10; border-radius: 12px; background: #000; overflow: hidden; isolation: isolate; }
.bpic img, .bpic video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease), opacity .3s; }
.bpic video { opacity: 0; }
.bpic.playing video { opacity: 1; }
.bcard:hover .bpic img, .bcard:hover .bpic video { transform: scale(1.04); }
.bplay { position: absolute; left: 50%; top: 50%; display: grid; place-items: center; width: 42px; height: 42px; margin: -21px 0 0 -21px; border-radius: 50%; background: rgba(0, 0, 0, .55); color: #fff; transition: opacity .25s, transform .3s var(--spring); }
.bplay .i { width: 18px; height: 18px; fill: currentColor; }
.bpic.playing .bplay { opacity: 0; transform: scale(.7); }
.btags { position: absolute; left: 10px; top: 10px; display: flex; gap: 5px; }
.btags i { padding: 3px 7px; border-radius: 7px; background: rgba(10, 8, 6, .72); color: oklch(0.92 0.005 60); font: 600 11px var(--font); font-style: normal; }
.bfacts { position: absolute; right: 10px; bottom: 10px; display: flex; align-items: center; gap: 8px; padding: 3px 8px; border-radius: 7px; background: rgba(10, 8, 6, .72); color: oklch(0.92 0.005 60); font: 500 11px var(--mono); }
.bfacts span { display: inline-flex; align-items: center; gap: 3px; }
.bfacts .i { width: 12px; height: 12px; }
.bbody { display: flex; flex-direction: column; gap: 2px; padding: 11px 4px 0; }
.btitle { color: inherit; text-decoration: none; font-size: 17px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bby { display: flex; align-items: center; gap: 6px; min-width: 0; color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.bby > span:last-child { overflow: hidden; text-overflow: ellipsis; }
.bby .gava { width: 18px; height: 18px; font-size: 9px; }
.bacts { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; }
.blike { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 10px; border: 0; border-radius: 9px; background: none; color: var(--muted); font: 600 13px var(--mono); cursor: pointer; transition: color .15s, background .15s; }
.blike:hover { color: var(--ink); background: oklch(1 0 0 / .05); }
.blike.liked { color: var(--heart); }
.blike.liked .i { fill: currentColor; animation: heartPop .45s var(--spring); }
.bg-view { min-height: 300px; background: #000; }
.bg-view img, .bg-view video { display: block; width: 100%; max-height: calc(100vh - 40px); object-fit: contain; }

/* окна-листы: шаги «как установить», загрузка фона */
.sh-steps { margin: 0; padding-left: 20px; color: var(--ink-2); text-align: left; }
.sh-steps li { margin: 6px 0; }
.sh-steps code, .sh-body .hint code { font: 12px var(--mono); padding: 1px 5px; border-radius: 5px; background: var(--bg-2); color: var(--ink-2); word-break: break-all; }
.sh-ico.sh-18 { font: 800 18px var(--mono); color: #fff; background: oklch(0.6 0.2 25); }
.up-body { text-align: left; align-items: stretch; }
.up-body h2 { text-align: center; }
.up-body .field { display: flex; flex-direction: column; gap: 6px; }
.up-body .field > span { color: var(--muted); font-size: 12.5px; }
.drop { position: relative; display: grid; place-items: center; min-height: 170px; border-radius: 14px; border: 1.5px dashed var(--line-strong); background: var(--bg-2); overflow: hidden; cursor: pointer; transition: border-color .2s, background .2s; }
.drop:hover, .drop.over { border-color: var(--accent); background: color-mix(in oklab, var(--c2) 6%, var(--bg-2)); }
.drop.busy { opacity: .6; pointer-events: none; }
.drop-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 20px; color: var(--muted); font-size: 13px; text-align: center; }
.drop-empty .i { width: 26px; height: 26px; color: var(--accent-hi); }
.drop-empty b { color: var(--ink); font-size: 15px; }
.drop.has .drop-empty { display: none; }
.drop-prev { display: block; width: 100%; max-height: 260px; object-fit: contain; background: #000; }
.drop-facts { position: absolute; left: 10px; bottom: 10px; padding: 3px 8px; border-radius: 7px; background: rgba(10, 8, 6, .75); color: oklch(0.92 0.005 60); font: 500 11.5px var(--mono); }
.check { display: flex; align-items: flex-start; gap: 9px; color: var(--muted); font-size: 13px; cursor: pointer; }
.check input { margin-top: 3px; accent-color: var(--c2); }
.check b { color: var(--ink); }
.up-bar { height: 6px; border-radius: 3px; background: var(--card-2); overflow: hidden; }
.up-bar i { display: block; width: 0; height: 100%; background: var(--grad); transition: width .2s; }

/* ---------- окно сетки ---------- */
.modal-root { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; background: oklch(0.1 0.006 var(--h) / .75); backdrop-filter: blur(8px); animation: fade .2s; }
.modal-root:empty { display: none; }
.modal { position: relative; width: min(1120px, 100%); max-height: calc(100vh - 40px); display: grid; grid-template-columns: minmax(0, 1fr) 330px; border-radius: 20px; background: var(--card); border: 1px solid var(--line-strong); box-shadow: 0 40px 120px rgba(0, 0, 0, .7); overflow: hidden; animation: modalIn .35s var(--spring); }
.modal-view { position: relative; background: #0f1819; display: grid; place-items: center; min-height: 0; }
.modal-view canvas { display: block; width: 100%; height: auto; aspect-ratio: 1204 / 612; animation: fade .4s var(--ease); }
.modal-side { display: flex; flex-direction: column; gap: 16px; padding: 24px; overflow: auto; }
.modal-side > * { animation: rise .45s var(--ease) both; }
.modal-side > :nth-child(2) { animation-delay: .04s; }
.modal-side > :nth-child(3) { animation-delay: .08s; }
.modal-side > :nth-child(4) { animation-delay: .12s; }
.modal-side > :nth-child(5) { animation-delay: .16s; }
.modal-side h2 { margin: 0; font-size: 22px; letter-spacing: -.02em; line-height: 1.2; font-weight: 650; word-break: break-word; }
.modal-side .by { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; color: var(--muted); font-size: 13.5px; }
.modal-side .by .gava { margin-right: 4px; }
.modal-side .by b { color: var(--ink-2); font-weight: 500; }
.modal-side .desc { color: var(--ink-2); font-size: 14px; white-space: pre-wrap; word-break: break-word; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stats div { padding: 10px 11px; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--line); }
.stats b { display: block; font: 600 15px var(--mono); }
.stats span { color: var(--muted); font-size: 11.5px; }
.actions { display: flex; flex-direction: column; gap: 8px; margin-top: auto; }
.actions .row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.actions .btn { width: 100%; }
#gLike.on .i { animation: heartPop .45s var(--spring); fill: currentColor; }
.side-links { display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; }
.side-links button { border: 0; background: none; padding: 6px 8px; margin: -6px -8px; border-radius: 8px; color: var(--muted); font: inherit; cursor: pointer; transition: color .15s, background .15s; }
.side-links button:hover { color: var(--ink); background: oklch(1 0 0 / .05); }
.bg-view video { pointer-events: none; }
.side-links button.danger:hover { color: var(--danger); }
.modal-x { position: absolute; right: 12px; top: 12px; z-index: 3; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line-strong); background: rgba(14, 12, 10, .7); backdrop-filter: blur(6px); cursor: pointer; transition: background .15s, transform .2s var(--spring); }
.modal-x:hover { background: oklch(0.26 0.009 var(--h) / .95); transform: rotate(90deg); }
.hint { color: var(--muted); font-size: 12.5px; }
.hint code { font: 11.5px var(--mono); padding: 1px 5px; border-radius: 5px; background: var(--bg-2); color: var(--ink-2); }
.loading { color: var(--muted); font: 13px var(--mono); }

/* ---------- тосты ---------- */
.toasts { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { max-width: min(460px, calc(100vw - 32px)); padding: 10px 15px; border-radius: 11px; background: oklch(0.24 0.009 var(--h)); border: 1px solid var(--line-strong); color: #fff; box-shadow: 0 20px 50px rgba(0, 0, 0, .5); font-size: 13.5px; animation: toastIn .35s var(--spring); }
.toast.err { border-color: oklch(0.68 0.17 30 / .5); }
.toast.ok { border-color: oklch(0.78 0.15 150 / .4); }
.toast.out { animation: fadeOut .22s var(--ease) forwards; }

@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
@keyframes wordIn { from { opacity: 0; transform: translateY(.45em) rotate(2deg); filter: blur(8px); } }
@keyframes fade { from { opacity: 0; } }
@keyframes fadeOut { to { opacity: 0; transform: translateY(6px); } }
@keyframes modalIn { from { opacity: 0; transform: translateY(16px) scale(.97); } }
@keyframes toastIn { from { opacity: 0; transform: translateY(12px) scale(.94); } }
@keyframes shimmer { to { background-position: -150% 0; } }
@keyframes strokeIn { from { stroke-dashoffset: 32; } }
@keyframes strokeRedraw { 0% { stroke-dashoffset: 0; } 45% { stroke-dashoffset: -32; } 46% { stroke-dashoffset: 32; } 100% { stroke-dashoffset: 0; } }
@keyframes gridPan { to { background-position: 24px 24px; } }
@keyframes heartPop { 40% { transform: scale(1.35); } }
@keyframes drift { to { transform: translate(-60px, 40px) scale(1.12); } }
@keyframes bob { 50% { translate: 0 -8px; } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 oklch(0.78 0.15 150 / .55); } 100% { box-shadow: 0 0 0 8px oklch(0.78 0.15 150 / 0); } }
@keyframes scroll-x { to { transform: translateX(-50%); } }
@keyframes bar { 50% { transform: scaleY(.45); } }

/* ================= главная: возможности ================= */
/* бенто с возможностями */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); grid-auto-rows: 250px; gap: 16px; }
.tile { position: relative; display: flex; flex-direction: column; border-radius: 22px; background: var(--card); border: 1px solid var(--line); overflow: hidden; transition: border-color .25s, transform .3s var(--ease); }
.tile:hover { border-color: var(--line-strong); }
.tile-text { position: relative; z-index: 2; margin-top: auto; padding: 20px 22px 22px; }
.tile-text b { display: block; margin: 12px 0 5px; font-size: 17px; font-weight: 600; }
.tile-text > span:last-child { color: var(--muted); font-size: 14px; }
.tile-text code { font: 12.5px var(--mono); color: var(--ink-2); background: var(--bg-2); padding: 1px 6px; border-radius: 5px; }
.tile-ico { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); transition: transform .35s var(--spring), background .2s, color .2s; }
.tile:hover .tile-ico { transform: rotate(-8deg) scale(1.08); background: var(--grad); color: var(--accent-ink); }
.t-compare { grid-column: span 3; grid-row: span 2; }
.t-mosaic { grid-column: span 3; }
.t-ingame { grid-column: span 3; }
.t-tools { grid-column: span 2; }
.t-catalog { grid-column: span 4; }
.t-mosaic, .t-ingame { flex-direction: row; }
.t-mosaic .tile-text, .t-ingame .tile-text { width: 46%; flex: none; }

.compare { position: relative; flex: 1; min-height: 0; overflow: hidden; background: #1a1614; user-select: none; }
.compare img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.compare .after { clip-path: inset(0 0 0 var(--pos)); background: #141210; }
.cmp-line { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 2px; margin-left: -1px; background: var(--accent); box-shadow: 0 0 20px color-mix(in oklab, var(--c2) 80%, transparent); pointer-events: none; }
.cmp-knob { position: absolute; top: 50%; left: 50%; display: grid; place-items: center; width: 38px; height: 38px; margin: -19px 0 0 -19px; border-radius: 50%; background: var(--grad); color: var(--accent-ink); box-shadow: 0 6px 20px rgba(0, 0, 0, .5); transition: transform .25s var(--spring); }
.compare:hover .cmp-knob { transform: scale(1.1); }
.cmp-tag { position: absolute; top: 14px; padding: 4px 9px; border-radius: 8px; background: rgba(10, 8, 6, .65); backdrop-filter: blur(6px); font: 500 11.5px var(--mono); color: var(--ink-2); pointer-events: none; }
.cmp-tag.l { left: 14px; }
.cmp-tag.r { right: 14px; }
.compare input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; }
.compare img { transition: opacity .35s var(--ease); }
.compare.swap img { opacity: 0; }
.cmp-picks { position: absolute; z-index: 3; left: 50%; bottom: 14px; transform: translateX(-50%); display: flex; gap: 4px; padding: 4px; border-radius: 13px; background: rgba(10, 8, 6, .72); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); border: 1px solid oklch(1 0 0 / .08); }
.cmp-picks { max-width: calc(100% - 20px); }
@media (max-width: 640px) { .cmp-picks button { font-size: 0; gap: 0; padding: 0 4px; } }
.cmp-picks button { display: flex; align-items: center; gap: 7px; white-space: nowrap; height: 34px; padding: 0 11px 0 4px; border: 0; border-radius: 9px; background: none; color: var(--muted); font-size: 13px; cursor: pointer; transition: background .2s, color .2s; }
.cmp-picks button img { position: static; width: 26px; height: 26px; border-radius: 6px; object-fit: cover; opacity: 1 !important; clip-path: none; }
.cmp-picks button:hover { color: var(--ink); }
.cmp-picks button.on { background: oklch(1 0 0 / .1); color: var(--ink); box-shadow: inset 0 0 0 1px var(--accent-line); }
.t-compare .tile-text { border-top: 1px solid var(--line); }

.mosaic { flex: 1; display: grid; grid-template-columns: repeat(8, 1fr); gap: 3px; padding: 16px 0 16px 16px; align-content: center; -webkit-mask-image: linear-gradient(90deg, #000 70%, transparent); mask-image: linear-gradient(90deg, #000 70%, transparent); }
.mosaic img { width: 100%; aspect-ratio: 43 / 75; object-fit: cover; border-radius: 3px; filter: saturate(.7); opacity: 0; transform: scale(.85); transition: opacity .5s, transform .5s var(--ease); }
.mosaic.in img { opacity: 1; transform: none; }
.tile-img { flex: 1; min-width: 0; position: relative; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, #000 70%, transparent); mask-image: linear-gradient(90deg, #000 70%, transparent); }
.tile-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%; transform: scale(1.25); transition: transform .6s var(--ease); }
.tile:hover .tile-img img { transform: scale(1.32); }

/* док инструментов, как в редакторе: оранжевая «таблетка» сама переезжает по инструментам */
.tools { position: relative; display: flex; flex-wrap: wrap; justify-content: center; align-self: center; gap: 2px; margin-top: 30px; padding: 5px; border-radius: 14px; background: var(--bg-2); border: 1px solid var(--line); box-shadow: 0 12px 40px rgba(0, 0, 0, .35); }
.tools span { position: relative; z-index: 1; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; color: var(--ink-2); transition: color .25s; }
.tools span.on { color: var(--accent-ink); }
.tools span.on .i { animation: toolPop .35s var(--spring); }
.tools kbd { position: absolute; right: 4px; bottom: 2px; font: 8px/1 var(--mono); color: var(--faint); transition: color .25s; }
.tools span.on kbd { color: rgba(20, 12, 8, .6); }
.tools-ind { position: absolute; z-index: 0; left: 0; top: 0; width: 38px; height: 38px; border-radius: 10px; background: var(--grad); box-shadow: 0 4px 16px -4px color-mix(in oklab, var(--c1) 70%, transparent); transition: transform .45s var(--spring); }
@keyframes toolPop { 0% { transform: scale(.7) rotate(-12deg); } }
.t-catalog { background: radial-gradient(500px 250px at 85% 20%, color-mix(in oklab, var(--c1) 20%, transparent), transparent 70%), var(--card); flex-direction: row; align-items: stretch; }
.big-num { order: 2; margin-left: auto; padding: 24px 28px; display: flex; flex-direction: column; justify-content: center; text-align: right; }
.big-num b { font: 800 76px/1 var(--font); letter-spacing: -.05em; background: linear-gradient(180deg, #fff, var(--gold) 70%, var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.big-num span { color: var(--muted); font-size: 13px; }
.tile-link { position: absolute; inset: 0; z-index: 3; border-radius: inherit; }
.t-catalog:hover { transform: translateY(-3px); border-color: var(--accent-line); }

/* подвал на всех страницах — та же полоса, что внизу главной */
.site-foot { margin-top: 90px; padding: 8px 0 30px; border-top: 1px solid var(--line); }
.foot-note { display: block; font-size: 12.5px; color: var(--faint); }

/* ---------- небольшие окна: автор, поддержка, реклама ---------- */
.modal.sheet { display: block; width: min(440px, 100%); grid-template-columns: none; overflow: visible; }
.sh-body { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 36px 28px 28px; text-align: center; }
.sh-body h2 { margin: 4px 0 0; font-size: 23px; letter-spacing: -.02em; }
.sh-body p { margin: 0 0 8px; color: var(--muted); font-size: 14.5px; line-height: 1.55; }
.sh-ava { width: 84px; height: 84px; font-size: 32px; box-shadow: 0 0 0 3px var(--card), 0 0 0 5px var(--accent); }
.sh-ico { display: grid; place-items: center; width: 62px; height: 62px; border-radius: 18px; background: var(--accent-soft); color: var(--accent); }
.sh-ico .i { width: 28px; height: 28px; }
.sh-actions { display: flex; flex-direction: column; gap: 8px; width: 100%; margin-top: 6px; }
.sh-actions .btn { justify-content: flex-start; }
.sh-note { margin-left: auto; color: var(--faint); font-size: 12px; font-weight: 400; }

/* ---------- «Поддержать разработку»: шапка с пульсирующим сердцем, криптовалюта с QR, остальные способы ---------- */
.modal.sheet.sup { width: min(600px, 100%); max-height: min(92vh, 860px); overflow: auto; scrollbar-width: thin; }
.sup .modal-x { z-index: 3; }
.sup-body { display: flex; flex-direction: column; gap: 22px; padding: 0 0 26px; }
.sup-head { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 38px 32px 8px; text-align: center; overflow: hidden; border-radius: inherit; }
.sup-head::before { content: ""; position: absolute; inset: -40% -10% auto; height: 230px; background: radial-gradient(closest-side, color-mix(in oklab, var(--c1) 30%, transparent), transparent); pointer-events: none; }
.sup-head h2 { position: relative; margin: 10px 0 0; font-size: 26px; letter-spacing: -.03em; }
.sup-head p { position: relative; max-width: 440px; margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.55; }
.sup-heart { position: relative; display: grid; place-items: center; width: 64px; height: 64px; border-radius: 20px; background: var(--grad); color: var(--accent-ink); box-shadow: 0 14px 34px -12px color-mix(in oklab, var(--c1) 100%, transparent); }
.sup-heart .i { position: relative; width: 28px; height: 28px; fill: currentColor; animation: heartBeat 1.8s ease-in-out infinite; }
.sup-heart i { position: absolute; inset: 0; border-radius: inherit; border: 2px solid color-mix(in oklab, var(--c2) 70%, transparent); animation: heartRing 2.4s ease-out infinite; }
.sup-heart i + i { animation-delay: 1.2s; }
@keyframes heartBeat { 0%, 100% { transform: scale(1); } 12% { transform: scale(1.18); } 24% { transform: scale(1); } 36% { transform: scale(1.12); } 48% { transform: scale(1); } }
@keyframes heartRing { from { transform: scale(1); opacity: .8; } to { transform: scale(1.7); opacity: 0; } }
.sup-sec { display: flex; flex-direction: column; gap: 12px; margin: 0 24px; padding: 18px; border-radius: 18px; background: var(--bg-2); border: 1px solid var(--line); }
.sup-sec h3 { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--ink-2); font: 600 11px var(--disp); letter-spacing: .1em; text-transform: uppercase; }
.sup-sec h3 .i { width: 17px; height: 17px; color: var(--accent-hi); }

.coin-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.coin-tab { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px 0 6px; border: 1px solid var(--line); border-radius: 99px; background: var(--card); color: var(--ink-2); font: 600 13px var(--mono); cursor: pointer; transition: border-color .2s, background .2s, color .2s, transform .25s var(--spring); }
.coin-tab i { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--cc); color: #fff; font: 700 14px/1 var(--font); font-style: normal; text-shadow: 0 1px 2px rgba(0, 0, 0, .35); }
.coin-tab:hover { color: var(--ink); border-color: var(--line-strong); transform: translateY(-1px); }
.coin-tab.on { color: var(--ink); border-color: color-mix(in oklab, var(--cc) 70%, transparent); background: color-mix(in oklab, var(--cc) 14%, var(--card)); box-shadow: 0 0 0 1px color-mix(in oklab, var(--cc) 40%, transparent); }
.coin-panel { --cc: var(--accent); display: grid; grid-template-columns: 148px minmax(0, 1fr); gap: 18px; align-items: center; padding: 14px; border-radius: 14px; background: var(--card); border: 1px solid color-mix(in oklab, var(--cc) 35%, var(--line)); animation: fade .3s var(--ease); }
.coin-qr { display: grid; place-items: center; width: 148px; height: 148px; border-radius: 12px; background: #fff; overflow: hidden; }
.coin-qr svg { display: block; width: 100%; height: 100%; }
.coin-qr .loading { color: #8a7f78; }
.coin-info { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.coin-name { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; }
.coin-name b { font-size: 17px; font-weight: 650; letter-spacing: -.01em; }
.coin-name em { padding: 2px 9px; border-radius: 99px; background: color-mix(in oklab, var(--cc) 16%, transparent); color: color-mix(in oklab, var(--cc) 55%, #fff); font: 600 11.5px var(--font); font-style: normal; }
.coin-addr { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; width: 100%; padding: 10px 12px; border: 1px dashed var(--line-strong); border-radius: 11px; background: var(--bg-2); color: var(--ink); text-align: left; cursor: pointer; transition: border-color .2s, background .2s; }
.coin-addr:hover { border-color: var(--cc); background: color-mix(in oklab, var(--cc) 8%, var(--bg-2)); }
.coin-addr code { display: block; width: 100%; font: 500 12.5px/1.45 var(--mono); color: var(--ink); word-break: break-all; user-select: all; }
.coin-addr > span { display: inline-flex; align-items: center; gap: 6px; color: var(--accent-hi); font-size: 12.5px; font-weight: 600; }
.coin-addr > span .i { width: 15px; height: 15px; }
.coin-addr small { color: var(--faint); font: 600 10.5px var(--disp); letter-spacing: .06em; text-transform: uppercase; }
.coin-addr.memo { flex-direction: row; align-items: center; gap: 10px; padding: 8px 12px; }
.coin-addr.memo code { width: auto; flex: 1; }
.coin-warn { display: flex; gap: 8px; margin: 0; color: var(--faint); font-size: 12.5px; line-height: 1.45; }
.coin-warn .i { width: 16px; height: 16px; margin-top: 1px; color: var(--ok); }
.coin-soon { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 20px 16px; border-radius: 14px; border: 1px dashed var(--line-strong); text-align: center; }
.coin-soon .i { width: 26px; height: 26px; margin-bottom: 4px; color: var(--accent-hi); }
.coin-soon b { font-weight: 650; }
.coin-soon span { max-width: 380px; color: var(--muted); font-size: 13.5px; }

.sup-ways { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.sup-way { position: relative; display: grid; grid-template-columns: 32px 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: 13px; background: var(--card); color: var(--ink); text-align: left; text-decoration: none; cursor: pointer; transition: border-color .2s, background .2s, transform .25s var(--spring); }
.sup-way .i { grid-row: 1 / span 2; width: 32px; height: 32px; padding: 7px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-hi); transition: transform .35s var(--spring), background .2s, color .2s; }
.sup-way b { font-size: 14px; font-weight: 600; }
.sup-way span { color: var(--faint); font-size: 12.5px; }
.sup-way:hover { border-color: var(--accent-line); transform: translateY(-2px); }
.sup-way:hover .i { transform: rotate(-8deg) scale(1.08); background: var(--grad); color: var(--accent-ink); }
.sup-way.pri { grid-column: 1 / -1; border-color: var(--accent-line); background: linear-gradient(100deg, color-mix(in oklab, var(--c1) 16%, var(--card)), var(--card)); }
.sup-thanks { margin: -4px 0 0; color: var(--faint); font-size: 13px; text-align: center; }
@media (max-width: 560px) {
  .coin-panel { grid-template-columns: 1fr; justify-items: center; }
  .coin-info { width: 100%; }
  .sup-ways { grid-template-columns: 1fr; }
  .sup-sec { margin: 0 14px; padding: 14px; }
}

/* холст с частицами (код из старых игр) лежит поверх страницы и не ловит клики */
.fx { position: fixed; inset: 0; z-index: 150; width: 100vw; height: 100vh; pointer-events: none; }

/* плитка «Как в игре»: экран «Герои» Доты. Всё в долях ширины экрана (cqw), экран 16:9 «обложкой» заполняет плитку */
.t-ingame .tile-img { -webkit-mask-image: linear-gradient(90deg, #000 84%, transparent); mask-image: linear-gradient(90deg, #000 84%, transparent); container-type: size; min-height: 180px; }
.ig-fallback { transition: opacity .6s var(--ease); }
.ig.live .ig-fallback { opacity: 0; }
.ig-screen { position: absolute; left: 50%; top: 50%; width: max(100cqw, 177.78cqh); aspect-ratio: 16 / 9; transform: translate(-50%, -50%); container-type: inline-size; overflow: hidden; opacity: 0; transition: opacity .6s var(--ease), transform .7s var(--ease);
  font: 600 1.05cqw/1 var(--font); letter-spacing: .12em; color: #aab4c0;
  background: radial-gradient(ellipse 70% 80% at 56% 46%, #223436, #121c1d 60%, #0b1112), #0f1819; }
.ig.live .ig-screen { opacity: 1; }
.t-ingame:hover .ig-screen { transform: translate(-50%, -50%) scale(1.04); }
.ig-screen > * { position: absolute; }
.ig-top { left: 0; right: 0; top: 0; height: 5.8%; display: flex; align-items: center; gap: 2.6%; padding: 0 2.4%; background: linear-gradient(180deg, rgba(8, 11, 14, .92), rgba(8, 11, 14, .55)); }
.ig-top span { opacity: .55; font-size: 1.15cqw; }
.ig-top .on { opacity: 1; color: #f2f4f7; }
.ig-logo { width: 2.2cqw; height: 2.2cqw; margin-right: 3.6%; border-radius: 4px; background: linear-gradient(135deg, #c63a30, #6f150e); }
.ig-crumbs { left: 0; right: 0; top: 8.4%; display: flex; justify-content: center; align-items: center; gap: 1cqw; font-size: .95cqw; letter-spacing: .2em; }
.ig-crumbs span { opacity: .55; }
.ig-crumbs span:first-child { opacity: 1; color: #e6e9ee; }
.ig-crumbs i { opacity: .35; font-style: normal; }
.ig-bans { right: 5%; top: 11.5%; display: flex; align-items: center; gap: .7cqw; }
.ig-bans small { margin-right: .8cqw; font-size: .9cqw; letter-spacing: .18em; opacity: .75; }
.ig-bans i { width: 3.2cqw; height: 2.4cqw; border-radius: 2px; background: rgba(8, 12, 14, .65); border: 1px solid rgba(255, 255, 255, .08); }
.ig-stage { left: 14.2%; top: 16%; width: 72.2%; aspect-ratio: 1204 / 612; }
.ig-cv { position: absolute; inset: 0; width: 100%; height: auto; opacity: 0; transition: opacity .9s var(--ease); }
.ig-cv.on { opacity: 1; }
.ig-hidden { left: 50%; top: 81.8%; transform: translateX(-50%); padding: .5cqw 1.6cqw; border-radius: 2px; background: rgba(6, 10, 12, .55); font-size: 1cqw; letter-spacing: .14em; white-space: nowrap; color: #c9d0d8; }
.ig-bar { left: 0; right: 0; top: 86%; height: 6.4%; border-top: 1px solid rgba(255, 255, 255, .05); background: linear-gradient(180deg, rgba(8, 11, 14, .55), rgba(8, 11, 14, .25)); display: flex; align-items: center; justify-content: space-between; padding: 0 21% 0 9%; }
.ig-sort { display: flex; align-items: center; gap: 1cqw; }
.ig-sort small, .ig-filters small { font-size: .8cqw; letter-spacing: .14em; opacity: .7; }
.ig-sort b { display: block; min-width: 11cqw; padding: .8cqw 1.2cqw; border-radius: 2px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .1); font-size: 1cqw; letter-spacing: 0; color: #e4e8ee; font-weight: 500; }
.ig-filters { display: flex; gap: 2.6cqw; }
.ig-slots { left: 2.4%; bottom: 2%; display: flex; gap: .5cqw; padding: .6cqw; border-radius: 3px; background: rgba(6, 9, 11, .7); border: 1px solid rgba(255, 255, 255, .06); }
.ig-slots i { width: 2.6cqw; height: 2.6cqw; border-radius: 2px; background: rgba(255, 255, 255, .06); }
.ig-slots i:first-child { background: linear-gradient(135deg, #8a96a6, #3c4552); }
.ig-chat { left: 34%; bottom: 3%; width: 32%; padding: .7cqw 1cqw; border-radius: 2px; background: rgba(6, 9, 11, .7); font-size: .78cqw; letter-spacing: 0; font-weight: 500; opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ig-play { right: 2.6%; bottom: 2.4%; width: 16%; padding: 1.1cqw 0; border-radius: 2px; background: linear-gradient(180deg, #55954a, #2d5f27); border: 1px solid rgba(160, 230, 140, .35); color: #eef8ea; font-size: 1.5cqw; letter-spacing: .2em; text-align: center; box-shadow: 0 .5cqw 2cqw rgba(0, 0, 0, .5); }
.ig-cap { display: flex; flex-direction: column; margin-top: 12px; padding: 7px 11px; border-radius: 11px; background: var(--bg-2); border: 1px solid var(--line); color: var(--ink-2); font-size: 13px; text-decoration: none; transition: border-color .2s, color .2s; animation: fade .5s var(--ease); }
.ig-cap span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ig-cap small { color: var(--faint); font-size: 11.5px; }
.ig-cap:hover { border-color: var(--accent-line); color: var(--ink); }
.t-ingame .tile-text { display: flex; flex-direction: column; }
.t-ingame .tile-text b { margin-top: 10px; }
.t-ingame .tile-text .ig-cap { margin-top: auto; }
@media (max-width: 640px) { .t-ingame .tile-img { height: 190px; flex: none; } }

/* ---------- гайды ---------- */
.guide-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 18px; }
.guide-card { position: relative; display: flex; flex-direction: column; border-radius: 20px; background: linear-gradient(180deg, var(--card), oklch(0.19 0.008 var(--h) / .5)); border: 1px solid var(--line); text-decoration: none; overflow: hidden; }
.guide-card::after { content: ""; position: absolute; left: 22px; right: 22px; top: 0; height: 1px; background: var(--grad); opacity: .5; z-index: 2; }
.guide-card.in { transition: border-color .25s, transform .4s var(--ease), box-shadow .4s var(--ease), opacity .7s var(--ease); }
.guide-card.in:hover { border-color: var(--accent-line); transform: translateY(-4px); box-shadow: 0 24px 50px -28px oklch(0 0 0 / .9); }
.gc-cover { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--bg-2); }
.gc-cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, oklch(0.19 0.01 var(--h) / .85)); }
.gc-cover img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .8s var(--ease), filter .5s; filter: saturate(.9); }
.guide-card:hover .gc-cover img { transform: scale(1.06); filter: saturate(1.1); }
.gc-body { display: flex; flex: 1; flex-direction: column; gap: 8px; padding: 6px 22px 18px; margin-top: -18px; position: relative; z-index: 1; }
.gc-tag { align-self: flex-start; padding: 3px 9px; border-radius: 7px; background: var(--accent-soft); color: var(--accent-hi); font: 600 10px var(--disp); letter-spacing: .07em; text-transform: uppercase; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.guide-card b { font-size: 18.5px; font-weight: 700; letter-spacing: -.015em; line-height: 1.25; }
.gc-body > span:not(.gc-tag) { flex: 1; color: var(--muted); font-size: 14px; }
.guide-card small { display: flex; align-items: center; gap: 6px; margin-top: 6px; color: var(--faint); font: 12px var(--mono); }
.guide-card small .i { width: 14px; height: 14px; }

.page-head { position: relative; padding: calc(var(--nav-h) + 48px) 0 36px; }
.page-head::before { content: ""; position: absolute; z-index: -1; left: -10%; top: -200px; width: 900px; height: 500px; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in oklab, var(--c1) 24%, transparent), transparent); pointer-events: none; }
.page-head .kicker { margin-bottom: 14px; }
.page-head h1 { margin: 0; font-size: clamp(38px, 5.4vw, 66px); line-height: 1; letter-spacing: -.045em; font-weight: 800; animation: rise .6s var(--ease) both; }
.page-head p { margin: 16px 0 0; max-width: 640px; color: var(--muted); font-size: 18px; animation: rise .6s var(--ease) .08s both; }

/* ---------- профиль и вход ---------- */
.profile { min-height: 72vh; padding-top: calc(var(--nav-h) + 34px); }
.auth-card { display: flex; flex-direction: column; align-items: center; gap: 12px; width: min(440px, 100%); margin: 40px auto; padding: 36px 30px 28px; border-radius: 26px; background: var(--card); border: 1px solid var(--line); box-shadow: 0 40px 100px -40px rgba(0, 0, 0, .9); text-align: center; animation: rise .6s var(--ease) both; }
.auth-card > svg { width: 54px; height: 54px; }
.auth-card > svg .mk-stroke { stroke-width: 7; stroke-dasharray: 32; animation: strokeIn .9s var(--ease) .2s both; }
.auth-card h1 { margin: 6px 0 0; font-size: 27px; letter-spacing: -.025em; }
.auth-card p { margin: 0 0 8px; color: var(--muted); line-height: 1.55; }
.auth-prov, .auth-form { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.auth-or { display: flex; align-items: center; gap: 12px; width: 100%; margin: 4px 0; color: var(--faint); font-size: 12.5px; }
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth-field { position: relative; display: block; }
.auth-field .i { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.auth-field .input { height: 48px; padding-left: 40px; font-size: 15px; }
.input.code { height: 50px; text-align: center; font: 600 18px var(--mono); letter-spacing: .25em; }
.link { padding: 0; border: 0; background: none; color: var(--accent-hi); font-size: 13.5px; cursor: pointer; }
.link:hover { text-decoration: underline; text-underline-offset: 3px; }
.pf-head { --pfp: 28px; position: relative; overflow: hidden; margin-bottom: 22px; padding: var(--pfp); border-radius: 26px; background: radial-gradient(640px 220px at 0% 0%, color-mix(in oklab, var(--c1) 20%, transparent), transparent 70%), var(--card); border: 1px solid var(--line); animation: rise .5s var(--ease) both; }
.pf-ava { width: 116px; height: 116px; font-size: 44px; box-shadow: 0 0 0 5px var(--card), 0 0 0 7px color-mix(in oklab, var(--c2) 55%, transparent), 0 18px 40px -18px rgba(0, 0, 0, .9); }
.pf-nick { width: 100%; max-width: 440px; margin: 0 0 0 -9px; padding: 2px 8px; border: 1px solid transparent; border-radius: 10px; background: transparent; color: var(--ink); font: 750 32px/1.15 var(--font); letter-spacing: -.03em; }
input.pf-nick:hover { border-color: var(--line); }
input.pf-nick:focus { outline: 0; border-color: var(--accent); background: var(--bg-2); }
.pf-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-height: 22px; color: var(--muted); font-size: 13.5px; }
.pf-meta .i { width: 14px; height: 14px; }
.pf-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.pf-actions .i { width: 16px; height: 16px; }
.pf-tabs { display: inline-flex; margin-bottom: 18px; }
.chip { display: inline-flex; align-items: center; gap: 7px; }
.chip .i { width: 15px; height: 15px; }
.chip b { font: 600 11px var(--mono); color: var(--faint); }
.wcard { text-decoration: none; }
.gkind { display: inline-flex; align-items: center; gap: 5px; }
.gkind .i { width: 12px; height: 12px; }
.gmeta .by .i { width: 13px; height: 13px; margin-right: 4px; vertical-align: -2px; }
.w-del { display: grid; place-items: center; flex: none; width: 30px; height: 30px; margin: -6px -6px -6px auto; border: 0; border-radius: 8px; background: transparent; color: var(--faint); cursor: pointer; transition: background .15s, color .15s; }
.w-del .i { width: 16px; height: 16px; }
.w-del:hover { background: oklch(0.68 0.17 30 / .14); color: var(--danger); }
/* профиль: аватар с кнопкой смены, «о себе», цифры, действия с работой */
.pf-ava-wrap { position: relative; }
.pf-ava-edit { position: absolute; right: -2px; bottom: -2px; display: grid; place-items: center; width: 32px; height: 32px; border: 3px solid var(--card); border-radius: 50%; background: var(--grad); color: var(--accent-ink); cursor: pointer; transition: transform .25s var(--spring); }
.pf-ava-edit .i { width: 15px; height: 15px; }
.pf-ava-edit:hover { transform: scale(1.12) rotate(-8deg); }
.pf-bio { width: 100%; max-width: 560px; margin: 0 0 0 -9px; padding: 4px 8px; border: 1px solid transparent; border-radius: 10px; background: transparent; color: var(--ink-2); font: 15px/1.5 var(--font); resize: none; overflow: hidden; }
p.pf-bio { margin: 0; padding: 0; }
textarea.pf-bio:hover { border-color: var(--line); }
textarea.pf-bio:focus { outline: 0; border-color: var(--accent); background: var(--bg-2); }
.pf-stats { display: flex; gap: 6px; }
.pf-stats div { min-width: 82px; padding: 9px 12px; border-radius: 12px; background: oklch(0 0 0 / .2); border: 1px solid var(--line); text-align: center; }
.pf-stats b { display: block; font: 700 18px var(--mono); }
.pf-stats span { color: var(--muted); font-size: 11.5px; }
.w-acts { position: absolute; right: 8px; top: 8px; display: flex; gap: 4px; opacity: 0; transform: translateY(-4px); transition: opacity .2s, transform .2s var(--ease); }
.wcard:hover .w-acts, .wcard:focus-within .w-acts { opacity: 1; transform: none; }
.w-acts button { display: grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: 9px; background: rgba(10, 8, 6, .78); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); color: var(--ink-2); cursor: pointer; transition: background .15s, color .15s; }
.w-acts button .i { width: 15px; height: 15px; }
.w-acts button:hover { background: var(--card-2); color: var(--ink); }
.w-acts button.danger:hover { color: var(--danger); }
.w-open { display: inline-flex; align-items: center; gap: 4px; color: var(--accent-hi); font-size: 12.5px; font-weight: 600; }
.w-open .i { width: 13px; height: 13px; transition: transform .2s var(--ease); }
.wcard:hover .w-open .i { transform: translateX(3px); }
@media (hover: none) { .w-acts { opacity: 1; transform: none; } }
/* выбор аватара */
.ava-sheet { gap: 12px; }
.ava-heroes-head { display: flex; align-items: center; gap: 10px; width: 100%; margin-top: 8px; }
.ava-heroes-head b { flex: none; font-size: 14px; }
.ava-heroes-head .input { height: 36px; }
.ava-heroes { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; width: 100%; max-height: 236px; overflow-y: auto; padding: 2px; }
.ava-heroes button { padding: 0; border: 0; border-radius: 10px; background: var(--bg-2); cursor: pointer; overflow: hidden; aspect-ratio: 1; transition: transform .2s var(--spring), box-shadow .2s; }
.ava-heroes button:hover { transform: scale(1.08); box-shadow: 0 0 0 2px var(--accent); }
.ava-heroes img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; display: block; }
.ava img[src*="_vert"], .sh-ava img[src*="_vert"], .pf-ava img[src*="_vert"] { object-position: 50% 18%; }
@media (max-width: 760px) {
  .pf-stats { width: 100%; } .pf-stats div { flex: 1; min-width: 0; }
  .pf-top { margin-top: -52px; } .pf-ava { width: 96px; height: 96px; font-size: 36px; }
  .pf-top .pf-actions { width: 100%; padding-bottom: 0; }
}
.modal-side .by a { color: var(--accent-hi); font-weight: 600; text-decoration: none; }
.modal-side .by a:hover { text-decoration: underline; }

/* ---------- «Угадайка» ---------- */
.game-head { padding-bottom: 28px; }
.game-modes { display: inline-flex; margin-top: 26px; }
.game-grid { display: grid; grid-template-columns: minmax(0, 400px) minmax(0, 1fr); gap: 40px; align-items: start; }
.game-art { position: relative; aspect-ratio: 43 / 75; border-radius: 22px; overflow: hidden; background: #1d140e; border: 1px solid var(--line); box-shadow: 0 40px 90px -40px rgba(0, 0, 0, .9), 0 0 60px -30px color-mix(in oklab, var(--c1) 60%, transparent); }
.game-art canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.game-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: saturate(.85); animation: revealIn .9s var(--ease) both; }
@keyframes revealIn { from { opacity: 0; filter: blur(14px) saturate(.4); transform: scale(1.05); } }
.g-stage { position: absolute; left: 12px; bottom: 12px; padding: 5px 10px; border-radius: 8px; background: rgba(10, 8, 6, .72); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); color: var(--ink-2); font: 600 12px var(--mono); }
.game-side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.game-side h2 { margin: 0; font-size: 28px; letter-spacing: -.025em; }
.g-tries { display: flex; align-items: center; gap: 6px; }
.g-tries i { width: 34px; height: 8px; border-radius: 4px; background: var(--card-2); transition: background .3s; }
.g-tries i.miss { background: var(--c1); }
.g-tries i.win { background: var(--ok); box-shadow: 0 0 14px oklch(0.78 0.15 150 / .6); }
.g-tries span { margin-left: 10px; color: var(--muted); font-size: 13.5px; }
.g-hints { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.g-hint { display: flex; flex-direction: column; gap: 3px; padding: 12px 14px; border-radius: 14px; background: var(--card); border: 1px dashed var(--line-strong); }
.g-hint small { color: var(--faint); font: 600 11px var(--mono); letter-spacing: .06em; text-transform: uppercase; }
.g-hint b { color: var(--faint); font-size: 14px; font-weight: 500; }
.g-hint.open { border-style: solid; border-color: var(--accent-line); background: linear-gradient(135deg, var(--accent-soft), var(--card) 70%); animation: rise .4s var(--ease); }
.g-hint.open b { color: var(--ink); font-size: 15px; font-weight: 700; line-height: 1.3; }
.g-guess { position: relative; display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.g-input { position: relative; }
.g-input .i { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.g-input .input { height: 50px; padding-left: 40px; font-size: 15.5px; }
.g-guess .btn { height: 50px; padding: 0 22px; }
.g-sugg { position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 6px); display: flex; flex-direction: column; padding: 6px; border-radius: 14px; background: var(--card-2); border: 1px solid var(--line-strong); box-shadow: 0 24px 60px -16px rgba(0, 0, 0, .85); }
.g-sugg button { display: flex; align-items: center; gap: 12px; padding: 6px 8px; border: 0; border-radius: 9px; background: none; color: var(--ink-2); font-size: 14.5px; text-align: left; cursor: pointer; }
.g-sugg button.on, .g-sugg button:hover { background: oklch(1 0 0 / .07); color: var(--ink); }
.g-sugg img, .g-log img, .g-result img { width: 30px; height: 44px; flex: none; border-radius: 6px; object-fit: cover; background: var(--bg-2); }
.g-log { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; list-style: none; }
.g-log li { display: flex; align-items: center; gap: 12px; padding: 7px 14px 7px 7px; border-radius: 13px; background: var(--card); border: 1px solid var(--line); animation: rise .35s var(--ease); }
.g-log li .g-row { display: flex; flex: 1; flex-wrap: wrap; align-items: center; gap: 6px 10px; min-width: 0; }
.g-log li b { font-weight: 600; margin-right: 4px; }
.g-cmp { display: flex; flex-wrap: wrap; gap: 5px; }
.g-sugg small { margin-left: auto; color: var(--faint); font: 11.5px var(--mono); }
.g-color { position: absolute; right: 12px; bottom: 12px; display: flex; align-items: center; gap: 7px; padding: 5px 10px 5px 6px; border: 0; border-radius: 8px; background: rgba(10, 8, 6, .72); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); color: var(--ink-2); font: 600 12px var(--mono); cursor: pointer; }
.g-color i { width: 26px; height: 15px; border-radius: 8px; background: var(--card-2); position: relative; transition: background .2s; }
.g-color i::after { content: ""; position: absolute; left: 2px; top: 2px; width: 11px; height: 11px; border-radius: 50%; background: #fff; transition: left .25s var(--spring); }
.g-color.on i { background: var(--grad); }
.g-color.on i::after { left: 13px; }
.g-log li.win { border-color: oklch(0.78 0.15 150 / .5); background: oklch(0.78 0.15 150 / .08); }
.g-attr { padding: 3px 8px; border-radius: 7px; background: var(--card-2); color: var(--muted); font: 500 11.5px var(--mono); }
.g-attr.same { background: oklch(0.78 0.15 150 / .14); color: var(--ok); }
.g-mark { width: 20px; text-align: center; font-weight: 800; }
.g-log li.miss .g-mark { color: oklch(0.68 0.19 28); }
.g-log li.win .g-mark { color: var(--ok); }
.g-result { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; padding: 16px; border-radius: 18px; border: 1px solid var(--line); background: var(--card); animation: rise .45s var(--ease); }
.g-result.win { border-color: oklch(0.78 0.15 150 / .45); background: radial-gradient(400px 120px at 0% 0%, oklch(0.78 0.15 150 / .14), transparent 70%), var(--card); }
.g-result.lose { border-color: color-mix(in oklab, var(--c1) 40%, transparent); }
.g-result img { width: 46px; height: 68px; border-radius: 9px; }
.g-result small { display: block; color: var(--muted); font-size: 13px; }
.g-result b { font-size: 22px; letter-spacing: -.02em; }
.g-res-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-left: auto; }
.g-res-actions .i { width: 15px; height: 15px; }
.g-next { color: var(--faint); font: 12.5px var(--mono); }
.g-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 8px; margin-top: 4px; }
.g-stats div { padding: 12px 14px; border-radius: 13px; background: var(--bg-2); border: 1px solid var(--line); }
.g-stats b { display: block; font: 700 20px var(--mono); }
.g-stats span { color: var(--muted); font-size: 12px; }
@media (max-width: 860px) {
  .g-hints { grid-template-columns: 1fr 1fr; }
  .game-grid { grid-template-columns: 1fr; }
  .game-art { width: min(340px, 100%); margin: 0 auto; }
}

/* ---------- узкие экраны ---------- */
@media (max-width: 1180px) {
  .landing-grid { grid-template-columns: 1fr; gap: 0; }
  .landing-device { min-height: 0; height: 52vw; max-height: 520px; margin: 30px -32px 0; }
  .laptop { left: 10%; width: 86%; transform: translateY(-50%) rotateY(-16deg) rotateX(6deg) rotateZ(1.5deg); }
  .random-grid { left: 50%; bottom: 0; transform: translateX(-50%); }
  .random-grid:hover { transform: translateX(-50%) translateY(-2px); }
}
@media (max-width: 980px) {
  .nav-links a { padding: 0 10px; }
  .nav-links a .i { display: none; }
  .modal { grid-template-columns: 1fr; overflow: auto; }
  .modal-side { overflow: visible; }
  .bento { grid-template-columns: 1fr 1fr; grid-auto-rows: auto; }
  .t-compare, .t-mosaic, .t-ingame, .t-tools, .t-catalog { grid-column: span 2; grid-row: auto; }
  .compare { height: 420px; flex: none; }
  .t-mosaic, .t-ingame { min-height: 230px; }
  .t-tools .tools { margin: 24px 16px 0; }
}
/* меню прячется в «бургер»: ссылки выпадают листом под полосой */
@media (max-width: 820px) {
  .nav-burger { display: flex; }
  .nav-tg { margin-left: auto; }
  .nav-acc { margin-left: 0; }
  .nav-links { position: absolute; left: 0; right: 0; top: calc(100% + 6px); flex-direction: column; align-items: stretch; gap: 2px; margin: 0; padding: 8px; border-radius: 18px;
    background: oklch(0.165 0.008 var(--h)); border: 1px solid oklch(1 0 0 / .08); box-shadow: 0 24px 60px -12px rgba(0, 0, 0, .8);
    opacity: 0; transform: translateY(-8px) scale(.98); transform-origin: top center; pointer-events: none; transition: opacity .2s, transform .25s var(--ease); }
  .navbar.open .nav-links { opacity: 1; transform: none; pointer-events: auto; }
  .nav-links a { height: 48px; padding: 0 14px; font-size: 15.5px; }
  .nav-links a .i { display: block; }
  .nav-links a[aria-current] { background: oklch(1 0 0 / .07); }
  .nav-hl { display: none; }
  .nav-badge, .nav-links a.nav-studio .i:last-child { margin-left: auto; }
  .fcards { grid-template-columns: 1fr; }
  .fcard { display: grid; grid-template-columns: 120px 1fr; grid-template-rows: auto auto 1fr auto; column-gap: 16px; }
  .fc-media { grid-row: 1 / span 4; height: 100%; min-height: 150px; margin: 0; }
  .fcard > span { margin-bottom: 10px; }
  .fc-more { justify-content: flex-start; }
}
@media (max-width: 640px) {
  .wrap, .nav-pill, .landing-grid, .landing > .bottom-bar { width: calc(100% - 32px); }
  .logo span { display: none; }
  .landing { padding-top: calc(var(--nav-h) + 10px); }
  .landing-device { height: 64vw; margin: 20px -16px 0; }
  .random-grid .rg-note { display: none; }
  .nav-user .nav-nick { display: none; }
  .nav-user { padding: 0 5px; }
  .bottom-bar { flex-direction: column; align-items: flex-start; }
  .fcard { grid-template-columns: 96px 1fr; }
  .frow { grid-template-columns: 1fr; }
  .section-head { flex-direction: column; align-items: flex-start; }
  .ws-head { grid-template-columns: 1fr; }
  .ws-head h1 { font-size: 34px; }
  .ws-ico { width: 42px; height: 42px; }
  .search { flex-basis: 100%; }
  .chips { overflow-x: auto; max-width: 100%; }
  .ws-bar { position: static; }
  .seg.ghost { overflow-x: auto; max-width: 100%; }
  .modal-root { padding: 0; align-items: end; }
  .modal { max-height: 92vh; border-radius: 20px 20px 0 0; }
  .t-mosaic, .t-ingame, .t-catalog { flex-direction: column; }
  .t-mosaic .tile-text, .t-ingame .tile-text { width: auto; }
  .mosaic { padding: 16px; min-height: 180px; }
  .tile-img { min-height: 180px; }
  .tools span { width: 34px; height: 34px; }
  .tools-ind { width: 34px; height: 34px; }
  .big-num { order: 0; margin: 0; text-align: left; padding-bottom: 0; }
  .big-num b { font-size: 56px; }
  .pf-head { --pfp: 18px; }
  .pf-nick { font-size: 26px; }
}

/* ---------- админ: значок, плашка в окне сетки/фона, метки в «Модерации» ---------- */
.adm-tag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px 2px 6px; border-radius: 7px; background: var(--accent-soft); color: var(--accent-hi); font: 650 11.5px var(--font); letter-spacing: .02em; }
.adm-tag .i { width: 13px; height: 13px; }
.pf-meta .adm-tag { margin-right: 4px; }
.adm-box { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 10px 12px; border-radius: 12px; background: var(--bg-2); border: 1px dashed var(--accent-line); }
.adm-box.off { border-color: color-mix(in oklab, var(--danger) 60%, transparent); }
.adm-state { color: var(--ink-2); font-size: 13px; }
.adm-box.off .adm-state { color: var(--danger); }
.adm-acts { display: flex; gap: 6px; width: 100%; }
.adm-acts .btn { flex: 1; }
.adm-acts .btn .i { width: 15px; height: 15px; }
.btn.danger:hover { color: var(--danger); }
.adm-flag { position: absolute; z-index: 3; right: 8px; bottom: 8px; padding: 3px 8px; border-radius: 7px; background: rgba(10, 8, 6, .8); color: oklch(0.92 0.005 60); font: 600 11px var(--mono); }
.adm-flag.off { background: var(--danger); color: #fff; }
.bpic .adm-flag { top: 10px; right: 10px; bottom: auto; }

/* ---------- кадрирование своей аватарки ---------- */
.pf-ava-wrap .pf-ava { cursor: pointer; }
.ava-crop { gap: 12px; }
.crop-cv { width: min(280px, 100%); aspect-ratio: 1; border-radius: 18px; background: #000; cursor: grab; touch-action: none; }
.crop-cv:active { cursor: grabbing; }
.crop-zoom { display: flex; align-items: center; gap: 10px; width: min(280px, 100%); color: var(--muted); }
.crop-zoom .i { width: 16px; height: 16px; flex: none; }
.crop-zoom input { flex: 1; accent-color: var(--accent); }
.crop-acts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; width: 100%; margin-top: 4px; }
.crop-acts .i { width: 16px; height: 16px; }

/* ---------- баннер профиля: своя картинка или GIF; без него — мягкий градиент ---------- */
.pf-banner { position: relative; height: 130px; margin: calc(var(--pfp) * -1) calc(var(--pfp) * -1) 0; background: radial-gradient(520px 160px at 85% 0%, color-mix(in oklab, var(--c2) 26%, transparent), transparent 70%), radial-gradient(640px 200px at 0% 0%, color-mix(in oklab, var(--c1) 30%, transparent), transparent 70%); overflow: hidden; }
.pf-banner.on { height: clamp(120px, 22vw, 300px); background: var(--bg-2); }
.pf-banner img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pf-banner::after { content: ""; position: absolute; inset: auto 0 0; height: 45%; background: linear-gradient(transparent, var(--card)); pointer-events: none; }
/* верх: аватар наезжает на баннер, рядом ник, справа действия */
.pf-top { position: relative; z-index: 1; display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px 20px; margin-top: -64px; }
.pf-id { display: flex; flex: 1; flex-direction: column; gap: 4px; min-width: 220px; padding-bottom: 4px; }
.pf-top .pf-actions { padding-bottom: 6px; }
/* низ: «о себе», ссылки, приватная почта — слева, цифры — справа */
.pf-body { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 18px 28px; margin-top: 18px; }
.pf-about { display: flex; flex: 1; flex-direction: column; align-items: flex-start; gap: 12px; min-width: 260px; }
.pf-links { display: flex; flex-wrap: wrap; gap: 8px; }
.pf-link { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 14px 0 11px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg-2); color: var(--ink-2); font: 600 13.5px var(--font); text-decoration: none; cursor: pointer; transition: border-color .2s, color .2s, transform .25s var(--spring); }
.pf-link .i { width: 17px; height: 17px; }
.pf-link:hover { border-color: var(--accent-line); color: var(--ink); transform: translateY(-1px); }
.pf-link.tg .i { color: oklch(0.72 0.12 235); }
.pf-link.add { border-style: dashed; background: transparent; color: var(--muted); }
.pf-private { display: inline-flex; align-items: center; gap: 6px; color: var(--faint); font-size: 12.5px; }
.pf-private .i { width: 13px; height: 13px; }
/* окно «Ссылки в профиле» */
.links-sheet { gap: 12px; }
.ln-field { display: flex; flex-direction: column; gap: 6px; width: 100%; text-align: left; }
.ln-field span { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; font-weight: 600; }
.ln-field .i { width: 15px; height: 15px; }
.pf-banner-edit { position: absolute; z-index: 2; right: 14px; top: 14px; display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border: 0; border-radius: 10px; background: rgba(10, 8, 6, .62); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); color: #fff; font: 600 13px var(--font); cursor: pointer; transition: background .15s, transform .2s var(--spring); }
.pf-banner-edit .i { width: 15px; height: 15px; }
.pf-banner-edit:hover { background: rgba(10, 8, 6, .82); transform: translateY(-1px); }
.ban-sheet { gap: 12px; }
.ban-prev { width: 100%; aspect-ratio: 3 / 1; border-radius: 12px; background: radial-gradient(320px 100px at 0% 0%, color-mix(in oklab, var(--c1) 30%, transparent), transparent 70%), var(--bg-2); overflow: hidden; }
.ban-prev img { width: 100%; height: 100%; object-fit: cover; display: block; }
.modal.sheet:has(.ban-crop) { width: min(720px, 100%); }
.ban-crop .crop-cv { width: 100%; aspect-ratio: 3 / 1; border-radius: 12px; }
.ban-crop .crop-zoom { width: min(360px, 100%); }

/* ---------- Мастерская: фон как на главной, только за шапкой ---------- */
.hero-bg.ws-bg { position: absolute; z-index: -1; inset: 0 0 auto; height: 720px; }
.ws-bg .au-1 { opacity: .22; }
.ws-bg .au-2 { opacity: .12; }
.ws-bg .bg-vignette { background: radial-gradient(ellipse 120% 90% at 50% 20%, transparent 55%, oklch(0.09 0.008 var(--h) / .7)), linear-gradient(180deg, transparent 45%, var(--bg)); }
body[data-page="workshop"]::before { display: none; }

/* ---------- фон в Dota: сборка pak02_dir.vpk и шаги установки ---------- */
/* окно выше экрана — прокручивается целиком (margin: auto держит его по центру, пока влезает) */
.modal-root:has(.db-body) { overflow-y: auto; place-items: normal; }
.modal.sheet:has(.db-body) { width: min(520px, 100%); max-height: none; margin: auto; }
.db-body { text-align: left; align-items: stretch; }
.db-body h2, .db-body > .sh-ico { align-self: center; text-align: center; }
.db-body .db-lead { text-align: center; }
.db-body code, .db-body .hint code { font: 12px var(--mono); padding: 1px 5px; border-radius: 5px; background: var(--bg-2); color: var(--ink-2); word-break: normal; white-space: nowrap; }
.db-body .sh-steps li { margin: 8px 0; line-height: 1.5; }
.db-left { margin: 0; text-align: left; }
.db-prev { cursor: default; }
.db-prev:hover { border-color: var(--line-strong); background: var(--bg-2); }
.db-screens { align-self: flex-start; }
.db-prog { display: flex; flex-direction: column; gap: 6px; color: var(--muted); font-size: 12.5px; }
.modal.busy .drop, .modal.busy .seg, .modal.busy .check { opacity: .55; pointer-events: none; }
.db-warn { display: flex; gap: 10px; padding: 12px 14px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line); color: var(--muted); font-size: 13px; line-height: 1.5; }
.db-warn .i { flex: none; width: 19px; height: 19px; margin-top: 1px; color: var(--gold); }
.db-warn b { color: var(--ink); }

/* схема главного меню Доты поверх фона — в долях экрана (cqw — доли ширины превью) */
.dm { position: absolute; inset: 0; z-index: 2; pointer-events: none; font: 600 1cqw var(--font); color: #c9ced6; }
.dm-top { position: absolute; left: 0; right: 0; top: 0; height: 5.2%; display: flex; align-items: center; gap: 2.2%; padding: 0 1.2%; background: linear-gradient(180deg, rgba(14, 17, 23, .96), rgba(10, 12, 16, .9)); border-bottom: 1px solid rgba(255, 255, 255, .06); letter-spacing: .12em; }
.dm-top span { opacity: .6; font-size: 1.05cqw; }
.dm-top span.on { opacity: 1; }
.dm-top b { flex: 1; }
.dm-logo { width: 2cqw; height: 2cqw; border-radius: 3px; background: linear-gradient(135deg, #b8322a, #7a1a12); }
.dm-ico { width: 1.5cqw; height: 1.5cqw; border-radius: 3px; background: rgba(160, 170, 185, .35); }
.dm-ava { width: 2.2cqw; height: 2.2cqw; border-radius: 3px; background: linear-gradient(135deg, #4a5d7a, #2a3446); }
.dm-friends { position: absolute; left: 0; top: 5.2%; bottom: 0; width: 15.5%; padding: .8cqw; display: flex; flex-direction: column; gap: .55cqw; background: linear-gradient(90deg, rgba(8, 10, 14, .9), rgba(8, 10, 14, .72)); border-right: 1px solid rgba(255, 255, 255, .05); }
.dm-me { display: flex; gap: .6cqw; align-items: center; padding-bottom: .6cqw; border-bottom: 1px solid rgba(255, 255, 255, .07); }
.dm-me i, .dm-f i { width: 2.2cqw; height: 2.2cqw; border-radius: 3px; background: linear-gradient(135deg, #556a8a, #2b3547); flex: none; }
.dm-me span { display: flex; flex-direction: column; gap: .35cqw; flex: 1; }
.dm-me b, .dm-me s, .dm-f s { display: block; height: .5cqw; border-radius: 2px; background: rgba(200, 210, 225, .35); }
.dm-me s, .dm-f s { width: 60%; background: rgba(120, 200, 140, .4); }
.dm-friends p { margin: .2cqw 0 0; height: .45cqw; width: 45%; border-radius: 2px; background: rgba(200, 210, 225, .22); }
.dm-f { display: flex; gap: .6cqw; align-items: center; }
.dm-f s { flex: 1; max-width: 60%; }
.dm-f.off i { opacity: .45; }
.dm-f.off s { background: rgba(200, 210, 225, .18); }
.dm-news { position: absolute; right: 3%; top: 9.5%; width: 17.5%; display: flex; flex-direction: column; gap: 1.2cqw; transition: opacity .3s var(--ease), transform .3s var(--ease); }
.dm-news[hidden] { display: flex !important; opacity: 0; transform: translateX(12px); }
.dm-card { position: relative; height: 11cqw; border-radius: 3px; background: linear-gradient(160deg, rgba(40, 46, 66, .92), rgba(16, 18, 28, .95)); border: 1px solid rgba(255, 255, 255, .07); box-shadow: 0 .6cqw 2.4cqw rgba(0, 0, 0, .5); }
.dm-card.big { height: 19cqw; background: linear-gradient(160deg, rgba(92, 52, 110, .92), rgba(28, 18, 40, .95)); }
.dm-card span { position: absolute; left: .8cqw; bottom: .7cqw; font-size: .9cqw; letter-spacing: .1em; opacity: .75; }
.dm-chat { position: absolute; left: 15.5%; bottom: 0; width: 36%; height: 3.4%; background: rgba(8, 10, 14, .78); border-top: 1px solid rgba(255, 255, 255, .06); }
.dm-play { position: absolute; right: 1.2%; bottom: 1.6%; width: 16%; height: 6.2%; display: grid; place-items: center; border-radius: 2px; background: linear-gradient(180deg, #4d8a3d, #2c5a22); border: 1px solid rgba(160, 230, 140, .35); color: #eaf6e4; font-size: 1.4cqw; letter-spacing: .14em; box-shadow: 0 .5cqw 2cqw rgba(0, 0, 0, .55); }

.home-hint { grid-column: 1 / -1; margin: 0 0 4px; }
.home-hint b { color: var(--ink); }
.adm-flag.feat { background: oklch(0.2 0.01 40 / .78); color: var(--ink-2); }
.bcard.is-feat { border-color: var(--accent-line); box-shadow: 0 0 0 1px var(--accent-line); }
.bcard.is-feat .adm-flag.feat { background: var(--grad); color: var(--accent-ink); }

/* ---------- страница сетки (grid.html): шапка с действиями, большое превью, описание, установка, ещё сетки ---------- */
body[data-page="grid"] { padding-top: calc(var(--nav-h) + 18px); background: radial-gradient(ellipse 60% 420px at 50% -80px, color-mix(in oklab, var(--c1) 16%, transparent), transparent), var(--bg); }
.gp-loading { display: grid; place-items: center; min-height: 60vh; }
.gp-crumbs { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 22px 0 0; color: var(--faint); font-size: 13.5px; animation: rise .5s var(--ease) both; }
.gp-crumbs a { display: inline-flex; align-items: center; gap: 6px; flex: none; color: var(--muted); text-decoration: none; transition: color .15s; }
.gp-crumbs a:hover { color: var(--ink); }
.gp-crumbs a:first-child .i { width: 16px; height: 16px; transform: rotate(180deg); transition: transform .25s var(--spring); }
.gp-crumbs a:first-child:hover .i { transform: rotate(180deg) translateX(3px); }
.gp-crumbs i { font-style: normal; }
.gp-crumbs span { min-width: 0; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.gp-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 18px 28px; padding: 18px 0 24px; }
.gp-title { min-width: 0; animation: rise .55s var(--ease) .04s both; }
.gp-kind { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 12px; color: var(--accent-hi); font: 600 11px var(--disp); letter-spacing: .1em; text-transform: uppercase; }
.gp-kind .i { width: 16px; height: 16px; }
.gp-kind .g18 { position: static; margin-left: 4px; letter-spacing: 0; }
.gp-title h1 { margin: 0; font-size: clamp(30px, 4.2vw, 50px); line-height: 1.04; letter-spacing: -.035em; font-weight: 750; word-break: break-word; }
.gp-by { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; color: var(--muted); font-size: 14.5px; }
.gp-by i { font-style: normal; color: var(--faint); }
.gp-by a { color: var(--accent-hi); font-weight: 600; text-decoration: none; }
.gp-by a:hover { text-decoration: underline; }
.gp-by b { color: var(--ink-2); font-weight: 550; }
.gp-cta { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; animation: rise .55s var(--ease) .1s both; }
.gp-cta .btn { flex: none; }
.gp-like { min-width: 84px; }
.gp-like span { font-weight: 650; font-variant-numeric: tabular-nums; }
.gp-like.on .i { fill: currentColor; animation: heartPop .45s var(--spring); }

/* превью: панель над холстом, холст в рамке; в 2× рамка та же, а сетка внутри прокручивается и таскается */
.gp-stage { padding: 10px; border-radius: 22px; background: var(--card); border: 1px solid var(--line); box-shadow: 0 30px 80px -40px rgba(0, 0, 0, .9); animation: rise .6s var(--ease) .14s both; }
.gp-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 0 0 10px; }
.gp-tools { display: flex; align-items: center; gap: 8px; }
.gp-view { position: relative; aspect-ratio: 1204 / 612; border-radius: 14px; background: #0f1819; overflow: hidden; isolation: isolate; }
.gp-view.zoomed { overflow: auto; cursor: grab; scrollbar-width: thin; }
.gp-view.drag { cursor: grabbing; user-select: none; }
.gp-canvas { width: calc(100% * var(--z, 1)); }
.gp-canvas canvas { display: block; width: 100%; height: auto; aspect-ratio: 1204 / 612; animation: fade .5s var(--ease); }
.gp-stage:fullscreen { display: flex; flex-direction: column; padding: 14px; border: 0; border-radius: 0; background: oklch(0.1 0.006 var(--h)); }
.gp-stage:fullscreen .gp-view { flex: 1; display: flex; aspect-ratio: auto; border-radius: 10px; background: #070b0b; }
.gp-stage:fullscreen .gp-canvas { flex: none; margin: auto; width: calc(min(100vw - 28px, (100vh - 86px) * 1204 / 612) * var(--z, 1)); }
.gp-cap { margin: 10px 4px 0; color: var(--faint); font-size: 12.5px; }

/* ниже: слева описание, «что внутри», установка; справа — цифры и действия, прилипают при прокрутке */
.gp-body { display: grid; grid-template-columns: minmax(0, 1fr) 300px; align-items: start; gap: 24px; margin-top: 30px; }
.gp-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.gp-block { padding: 24px 26px; border-radius: var(--r); background: var(--card); border: 1px solid var(--line); }
.gp-block h2 { margin: 0 0 14px; font-size: 19px; letter-spacing: -.02em; font-weight: 650; }
.gp-desc { color: var(--ink-2); font-size: 15px; white-space: pre-wrap; word-break: break-word; }
.gp-none { margin: 0; color: var(--faint); }
.gp-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.gp-tags a { display: inline-flex; align-items: center; height: 30px; padding: 0 12px; border-radius: 99px; border: 1px solid var(--line); background: var(--bg-2); color: var(--ink-2); font-size: 13px; text-decoration: none; transition: color .15s, border-color .15s, transform .2s var(--spring); }
.gp-tags a::before { content: "#"; margin-right: 2px; color: var(--accent); }
.gp-tags a:hover { color: var(--ink); border-color: var(--accent-line); transform: translateY(-1px); }
.gp-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(132px, 1fr)); gap: 10px; }
.gp-facts div, .gp-stats div { padding: 14px 14px 12px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line); }
.gp-facts b, .gp-stats b { display: block; font: 600 22px/1.15 var(--mono); letter-spacing: -.02em; }
.gp-facts span, .gp-stats span { display: block; margin-top: 2px; color: var(--ink-2); font-size: 13px; }
.gp-facts small { display: block; color: var(--faint); font-size: 12px; }
.gp-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0 0 14px; padding: 0; list-style: none; counter-reset: st; }
.gp-steps li { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 46px 14px 14px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line); counter-increment: st; font-size: 13.5px; }
.gp-steps li::before { content: counter(st); position: absolute; left: 14px; top: 13px; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 8px; background: var(--grad); color: var(--accent-ink); font: 700 12.5px var(--mono); }
.gp-steps b { font-weight: 650; }
.gp-steps span { color: var(--muted); word-break: break-word; }
.gp-steps code { font: 11.5px var(--mono); padding: 1px 5px; border-radius: 5px; background: var(--card-2); color: var(--ink-2); }
.gp-block .hint { margin: 0; }
.gp-block .hint a { color: var(--accent-hi); }
.gp-side { position: sticky; top: calc(var(--nav-h) + 16px); display: flex; flex-direction: column; gap: 12px; }
.gp-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.gp-side-acts { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: var(--r); background: var(--card); border: 1px solid var(--line); }
.gp-side-acts .btn { justify-content: flex-start; }
.gp-side .hint { margin: 0 4px; }

.gp-more { margin-top: 64px; }
.gp-more-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.gp-more-head h2 { margin: 0; font-size: clamp(22px, 2.4vw, 28px); letter-spacing: -.03em; font-weight: 700; }

.gp-empty { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 120px 20px 40px; text-align: center; }
.gp-empty .empty-mark { width: 64px; height: 64px; margin-bottom: 8px; }
.gp-empty h1 { margin: 0; font-size: 34px; letter-spacing: -.03em; }
.gp-empty p { margin: 0; color: var(--muted); }
.gp-empty-acts { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 14px; }

/* страница фона: превью в пропорциях файла, а «В меню Доты» — экран 16:9, фон «заполняет» его, сверху схема меню */
.bp-view { --ar: var(--ar0, 16 / 9); width: min(100%, 76vh * (var(--ar))); margin: 0 auto; aspect-ratio: var(--ar); background: #000; }
.bp-view.menu { --ar: 16 / 9; }
.bp-screen { position: absolute; inset: 0; overflow: hidden; container-type: inline-size; }
.bp-screen img, .bp-screen video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; pointer-events: none; animation: fade .5s var(--ease); }
.bp-view.menu .bp-screen img, .bp-view.menu .bp-screen video { object-fit: cover; }
.bp-screen .dm { opacity: 0; transition: opacity .3s var(--ease); }
.bp-view.menu .dm { opacity: 1; }
.gp-stage:fullscreen .bp-view { width: auto; margin: 0; }
.gp-stage:fullscreen .bp-screen { position: relative; inset: auto; flex: none; margin: auto; width: min(100vw - 28px, (100vh - 86px) * (var(--ar))); aspect-ratio: var(--ar); }
.gp-details { margin-top: 4px; }
.gp-details summary { width: fit-content; color: var(--accent-hi); font-size: 13.5px; cursor: pointer; }
.gp-details .db-body { padding-top: 10px; color: var(--ink-2); font-size: 14px; }
.gp-details .sh-steps li { margin: 8px 0; line-height: 1.5; }
.gp-details .db-warn { margin-top: 12px; }

@media (max-width: 980px) {
  .gp-head { grid-template-columns: 1fr; align-items: start; }
  .gp-cta { justify-content: flex-start; }
  .gp-body { grid-template-columns: 1fr; }
  .gp-side { position: static; }
}
@media (max-width: 640px) {
  .gp-cta .btn { flex: 1 1 auto; }
  .gp-cta .btn.primary { flex-basis: 100%; }
  .gp-facts { grid-template-columns: 1fr 1fr; }
  .gp-facts b { font-size: 18px; }
  .gp-stage { padding: 8px; border-radius: 18px; }
  .gp-bar .seg { overflow-x: auto; max-width: 100%; scrollbar-width: none; }
  .gp-tools { width: 100%; justify-content: space-between; }
  #gpFull span { display: none; }
  .gp-block { padding: 20px 18px; }
  .gp-steps { grid-template-columns: 1fr; }
}

/* ---------- Угадайка: конкурс недели ---------- */
.g-contest { margin-top: 56px; padding: 30px; border: 1px solid var(--line); border-radius: 24px; background: radial-gradient(ellipse at 100% 0, color-mix(in oklab, var(--c2) 10%, transparent), transparent 60%), var(--card); }
.g-contest-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; flex-wrap: wrap; }
.g-contest-head > div:first-child { max-width: 560px; }
.g-eyebrow { color: var(--accent-hi); font: 600 11px var(--mono); letter-spacing: .12em; text-transform: uppercase; }
.g-contest h2 { margin: 8px 0 10px; font-size: 30px; letter-spacing: -.03em; }
.g-contest-head p { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.6; }
.g-contest-head p b { color: var(--ink-2); font-weight: 600; }
.g-prize { display: flex; flex-direction: column; gap: 6px; min-width: 220px; padding: 16px 18px; border: 1px solid var(--accent-line); border-radius: 16px; background: var(--accent-soft); }
.g-prize span { display: inline-flex; align-items: center; gap: 7px; color: var(--accent-hi); font: 600 11px var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.g-prize .i { width: 15px; height: 15px; }
.g-prize b { font-size: 17px; line-height: 1.35; }
.g-contest-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 26px 0 12px; }
.g-week { color: var(--faint); font: 12px var(--mono); }
.g-rows { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; counter-reset: none; }
.g-rows li { display: grid; grid-template-columns: 38px 34px minmax(0, 1fr) auto auto; align-items: center; gap: 12px; padding: 10px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg-2); }
.g-rows li.top1 { border-color: color-mix(in oklab, #f3b93a 60%, var(--line)); background: linear-gradient(90deg, #f3b93a1c, transparent 70%), var(--bg-2); }
.g-rows li.me { border-color: var(--accent-line); box-shadow: inset 0 0 0 1px var(--accent-line); }
.g-place { color: var(--muted); font: 700 15px var(--mono); font-style: normal; text-align: center; }
.g-ava { width: 34px; height: 34px; border-radius: 50%; font-size: 13px; }
.g-rows b { min-width: 0; overflow: hidden; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.g-rows b em { margin-left: 6px; padding: 1px 7px; border-radius: 6px; background: var(--accent-soft); color: var(--accent-hi); font: 600 10px var(--mono); font-style: normal; }
.g-meta { color: var(--faint); font: 12px var(--mono); }
.g-rows strong { min-width: 62px; font: 700 20px var(--mono); text-align: right; }
.g-rows strong small { margin-left: 4px; color: var(--faint); font: 11px var(--font); }
.g-board-note { margin: 6px 0; padding: 26px 0; color: var(--muted); font-size: 14px; text-align: center; }
.g-cta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 16px; }
.g-cta:empty { display: none; }
.g-cta small { color: var(--faint); font-size: 12.5px; }
@media (max-width: 640px) {
  .g-contest { padding: 22px 18px; border-radius: 18px; }
  .g-rows li { grid-template-columns: 30px 30px minmax(0, 1fr) auto; gap: 9px; padding: 9px 12px; }
  .g-meta { display: none; }
}

/* ---------- наведение на карточки: наклон, свет и параллакс ----------
   Карточка под мышью приподнимается и чуть наклоняется за курсором, под курсором — мягкий свет и светящийся край,
   превью внутри едет навстречу (параллакс) и ловит блик. --hov/--rx/--ry/--px/--py/--mx/--my плавно ведёт site.js
   (пружина в rAF) и вешает .tilting, пока карточка в движении; поэтому transform здесь без transition — иначе «вязнет».
   Только мышь; при «меньше анимации» остаётся свет без наклона. */
@media (hover: hover) and (pointer: fine) {
  :is(.gcard:not(.sk), .bcard, .tile, .guide-card, .ach-item) { isolation: isolate; }
  :is(.gcard:not(.sk), .bcard, .tile, .guide-card, .ach-item)::before {
    content: ""; position: absolute; z-index: -1; inset: 0; border-radius: inherit; pointer-events: none; opacity: var(--hov, 0);
    background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), color-mix(in oklab, var(--c2) 13%, transparent), transparent 60%);
  }
  /* светящийся край: та же точка света, но только в рамке толщиной 1px */
  :is(.gcard:not(.sk), .bcard, .tile, .ach-item)::after {
    content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; pointer-events: none; opacity: var(--hov, 0);
    background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), color-mix(in oklab, var(--accent-hi) 85%, transparent), transparent 70%);
    -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);
  }
  .tile::after { inset: 0; z-index: 4; } /* у плиток overflow: hidden — рамку рисуем внутри */
  :is(.gcard:not(.sk), .bcard):hover { border-color: color-mix(in oklab, var(--accent-line) 45%, var(--line-strong)); box-shadow: 0 34px 60px -34px #000e, 0 22px 50px -30px color-mix(in oklab, var(--c1) 60%, transparent); }
  :is(.gcard, .bcard) :is(.gtitle, .btitle) { transition: color .35s var(--ease); }
  :is(.gcard, .bcard):hover :is(.gtitle, .btitle) { color: var(--accent-hi); }
  /* блик по превью */
  :is(.gthumb, .bpic)::before {
    content: ""; position: absolute; z-index: 1; inset: 0; pointer-events: none; opacity: calc(var(--hov, 0) * .9); mix-blend-mode: soft-light;
    background: radial-gradient(70% 90% at var(--mx, 50%) var(--my, 50%), #fff9, transparent 70%);
  }
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .tilting {
    transform: perspective(1100px) translateY(calc(var(--hov, 0) * -6px)) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) scale(calc(1 - var(--prs, 0) * .016)) !important;
    transition-property: border-color, background-color, box-shadow, color, opacity !important; will-change: transform;
  }
  /* превью: лёгкий зум и сдвиг против наклона — картинка будто лежит глубже рамки */
  .tilting :is(.gthumb > canvas, .gthumb > img, .bpic > img, .bpic > video) {
    transform: translate3d(calc(var(--px, 0) * -7px), calc(var(--py, 0) * -5px), 0) scale(calc(1.002 + var(--hov, 0) * .055)) !important;
    transition: opacity .4s !important;
  }
}

/* ---------- достижения (achievements.js) ----------
   Медаль: кольцо прогресса цвета редкости (как предметы в Доте) и диск со значком. Не получено — серый диск и замок,
   кольцо показывает, сколько осталось. Открытие: кольцо дозаполняется, замок слетает, медаль переворачивается уже
   в цвете, вокруг — волна и искры; для легендарных и выше за медалью ещё крутятся лучи. */
@property --p { syntax: "<number>"; inherits: true; initial-value: 0; }
.ach { margin: -6px 0 34px; }
.ach-head { align-items: flex-end; }
.ach-sum { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; flex: none; }
.ach-sum b { font: 600 25px/1 var(--mono); letter-spacing: -.06em; font-variant-numeric: tabular-nums; }
.ach-sum b span { color: var(--faint); font-size: 15px; letter-spacing: -.02em; }
.ach-bar { display: block; width: 150px; height: 5px; border-radius: 3px; background: var(--card-2); overflow: hidden; }
.ach-bar > i { display: block; height: 100%; border-radius: inherit; background: var(--grad); transform-origin: left; animation: achBar 1.2s var(--ease) .2s both; }
@keyframes achBar { from { transform: scaleX(0); } }
.ach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 268px), 1fr)); gap: 12px; }
.ach-item { --rc: #b0c3d9; position: relative; display: flex; align-items: center; gap: 14px; min-width: 0; padding: 14px 16px 14px 14px; border-radius: 16px; border: 1px solid var(--line); background: var(--card); outline-offset: 3px; transition: border-color .35s var(--ease), background-color .35s var(--ease), box-shadow .5s var(--ease); }
.ach-item[hidden] { display: none; }
.ach-item.done { border-color: color-mix(in oklab, var(--rc) 26%, var(--line)); background: linear-gradient(120deg, color-mix(in oklab, var(--rc) 11%, var(--card)), var(--card) 62%); }
.ach-item.done:hover { border-color: color-mix(in oklab, var(--rc) 55%, var(--line)); box-shadow: 0 22px 44px -30px color-mix(in oklab, var(--rc) 80%, #000); }
.ach-item.rise { animation: rise .45s var(--ease) calc(var(--k, 0) * 35ms) both; }
.ach-txt { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ach-txt b { font-size: 14.5px; font-weight: 650; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ach-txt > span { color: var(--muted); font-size: 12px; line-height: 1.4; }
.ach-txt small { display: flex; align-items: center; gap: 8px; margin-top: 3px; color: var(--faint); font: 500 10.5px var(--mono); }
.ach-txt small em { color: var(--rc); font-style: normal; }
.ach-txt small i { display: inline-flex; align-items: center; gap: 3px; font-style: normal; }
.ach-txt small .i { width: 12px; height: 12px; }
.ach-item:not(.done) .ach-txt b { color: var(--ink-2); }
.ach-item:not(.done) .ach-txt small em { opacity: .6; }
.ach-new { position: absolute; top: -8px; right: 12px; padding: 2px 8px; border-radius: 6px; background: var(--rc); color: #0b0a0a; font: 700 9.5px var(--disp); letter-spacing: .08em; text-transform: uppercase; opacity: 0; transform: translateY(4px) scale(.8); }
.ach-item.fresh.play .ach-new { animation: achNew .5s var(--spring) .9s forwards; }
@keyframes achNew { to { opacity: 1; transform: none; } }
.ach-more { display: flex; margin: 16px auto 0; }
.ach-more .i { width: 15px; height: 15px; order: 2; transition: transform .3s var(--ease); }
.ach-more[aria-expanded="true"] .i { transform: rotate(180deg); }

/* медаль */
.ach-medal { --p: 0; position: relative; display: grid; place-items: center; flex: none; width: 54px; height: 54px; perspective: 400px; }
.ach-ring { position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(var(--rc) calc(var(--p) * 360deg), oklch(1 0 0 / .07) 0);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2.5px)); mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2.5px)); }
.ach-core { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; color: var(--faint); background: var(--card-2); box-shadow: inset 0 0 0 1px var(--line); transition: background .3s, color .3s; }
.ach-core .i { width: 21px; height: 21px; }
.done > .ach-medal .ach-core, .ach-medal.unlock .ach-core { color: #fff; background: radial-gradient(circle at 34% 28%, color-mix(in oklab, var(--rc) 70%, #fff), color-mix(in oklab, var(--rc) 62%, #000) 75%);
  box-shadow: inset 0 1px 0 #ffffff59, inset 0 -7px 12px #00000059, 0 6px 18px -6px var(--rc); }
.done > .ach-medal .ach-core .i, .ach-medal.unlock .ach-core .i { filter: drop-shadow(0 1px 1px #0007); }
.ach-lock { position: absolute; right: -2px; bottom: -2px; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--bg-2); box-shadow: 0 0 0 2px var(--card); color: var(--muted); }
.ach-lock .i { width: 11px; height: 11px; }
.ach-item:not(.done) .ach-ring { opacity: .75; }

/* открытие прямо в сетке достижений */
.ach-item.fresh:not(.play) .ach-core { color: var(--faint); background: var(--card-2); box-shadow: inset 0 0 0 1px var(--line); }
.ach-item.fresh:not(.play) .ach-ring { --p: 0; }
.ach-item.fresh.play .ach-ring { animation: achFill .8s var(--ease) both; }
.ach-item.fresh.play .ach-core { animation: achFlip .9s var(--spring) .6s both; }
.ach-item.fresh.play { animation: achGlow 1.6s var(--ease) .7s; }
@keyframes achFill { from { --p: 0; } to { --p: 1; } }
@keyframes achFlip { 0% { transform: rotateY(0) scale(1); filter: grayscale(1) brightness(.6); } 45% { transform: rotateY(200deg) scale(1.18); } 100% { transform: rotateY(360deg) scale(1); filter: none; } }
@keyframes achGlow { 0% { box-shadow: 0 0 0 0 color-mix(in oklab, var(--rc) 70%, transparent); } 100% { box-shadow: 0 0 0 14px transparent; } }

/* окно «Достижение открыто» */
.ach-pop { --rc: #b0c3d9; position: fixed; z-index: 300; left: 50%; top: calc(var(--nav-h) + 14px); display: flex; align-items: center; gap: 18px; width: min(440px, calc(100vw - 32px)); padding: 16px 22px 16px 16px; overflow: hidden; border-radius: 20px; text-decoration: none; color: var(--ink); cursor: pointer;
  border: 1px solid color-mix(in oklab, var(--rc) 45%, var(--line-strong)); background: radial-gradient(260px 140px at 15% 50%, color-mix(in oklab, var(--rc) 22%, transparent), transparent 75%), oklch(0.2 0.01 var(--h) / .97);
  box-shadow: 0 30px 80px -20px #000d, 0 0 0 1px #0006, 0 0 60px -20px color-mix(in oklab, var(--rc) 70%, transparent);
  opacity: 0; transform: translate(-50%, -26px) scale(.92); transition: opacity .45s var(--ease), transform .7s var(--spring); }
.ach-pop.in { opacity: 1; transform: translate(-50%, 0); }
.ach-pop.out { opacity: 0; transform: translate(-50%, -14px) scale(.97); transition: opacity .35s var(--ease), transform .4s var(--ease); }
.ach-pop-medal { position: relative; display: grid; place-items: center; flex: none; width: 76px; height: 76px; }
.ach-medal.big { width: 72px; height: 72px; }
.ach-medal.big .ach-core { width: 56px; height: 56px; }
.ach-medal.big .ach-core .i { width: 28px; height: 28px; }
.ach-medal.big .ach-lock { width: 24px; height: 24px; box-shadow: 0 0 0 2px oklch(0.2 0.01 var(--h)); }
.ach-pop.in .ach-medal .ach-ring { animation: achFill .85s var(--ease) .2s both; }
.ach-pop.in .ach-medal .ach-lock { animation: achShake .4s ease-in-out .6s 2; }
.ach-medal.unlock .ach-lock { animation: achLockOff .5s var(--ease) forwards !important; }
.ach-medal.unlock .ach-core { animation: achFlip .95s var(--spring) both; }
@keyframes achShake { 25% { transform: rotate(-14deg); } 75% { transform: rotate(14deg); } }
@keyframes achLockOff { to { opacity: 0; transform: translate(14px, 18px) rotate(40deg) scale(.6); } }
.ach-wave { position: absolute; inset: 2px; border-radius: 50%; border: 2px solid var(--rc); opacity: 0; pointer-events: none; }
.ach-pop.burst .ach-wave { animation: achWave .9s var(--ease) forwards; }
@keyframes achWave { 0% { opacity: .9; transform: scale(.8); } 100% { opacity: 0; transform: scale(2.1); border-width: 1px; } }
.ach-sparks { position: absolute; left: 50%; top: 50%; width: 0; height: 0; pointer-events: none; }
.ach-sparks i { position: absolute; left: -2.5px; top: -2.5px; width: 5px; height: 5px; border-radius: 50%; background: var(--rc); box-shadow: 0 0 8px var(--rc); opacity: 0; }
.ach-pop.burst .ach-sparks i { animation: achSpark .95s cubic-bezier(.15, .7, .3, 1) var(--t) forwards; }
@keyframes achSpark { 0% { opacity: 1; transform: rotate(var(--a)) translateX(10px) scale(var(--s)); } 70% { opacity: .9; } 100% { opacity: 0; transform: rotate(var(--a)) translateX(var(--d)) scale(0); } }
.ach-rays { position: absolute; inset: -34px; border-radius: 50%; pointer-events: none; opacity: 0;
  background: repeating-conic-gradient(from 0deg, color-mix(in oklab, var(--rc) 55%, transparent) 0 7deg, transparent 7deg 22deg);
  -webkit-mask: radial-gradient(closest-side, #000 25%, transparent); mask: radial-gradient(closest-side, #000 25%, transparent); }
.ach-pop.burst .ach-rays { animation: achRays 5s linear forwards; }
@keyframes achRays { 0% { opacity: 0; transform: rotate(0) scale(.6); } 12% { opacity: 1; transform: rotate(20deg) scale(1); } 100% { opacity: .55; transform: rotate(160deg) scale(1); } }
.ach-pop-txt { position: relative; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ach-pop-txt small { color: var(--rc); font: 600 9.5px var(--disp); letter-spacing: .14em; text-transform: uppercase; }
.ach-pop-txt b { font-size: 19px; font-weight: 700; letter-spacing: -.02em; }
.ach-pop-txt span { color: var(--muted); font-size: 12.5px; line-height: 1.4; }
.ach-pop-txt em { margin-top: 3px; color: var(--faint); font: 500 10.5px var(--mono); font-style: normal; }
.ach-pop-txt > * { opacity: 0; transform: translateY(6px); filter: blur(4px); }
.ach-pop.in .ach-pop-txt > * { animation: achText .6s var(--ease) forwards; }
.ach-pop.in .ach-pop-txt small { animation-delay: .25s; }
.ach-pop.in .ach-pop-txt b { animation-delay: 1.1s; }
.ach-pop.in .ach-pop-txt span { animation-delay: 1.2s; }
.ach-pop.in .ach-pop-txt em { animation-delay: 1.3s; }
@keyframes achText { to { opacity: 1; transform: none; filter: none; } }
.ach-shine { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(105deg, transparent 35%, #ffffff24 48%, transparent 60%); transform: translateX(-110%); }
.ach-pop.burst .ach-shine { animation: achShine 1.1s var(--ease) .15s forwards; }
@keyframes achShine { to { transform: translateX(110%); } }
.ach-pop.epic { border-color: color-mix(in oklab, var(--rc) 70%, var(--line-strong)); }
@media (max-width: 640px) {
  .ach-head { flex-direction: column; align-items: flex-start; }
  .ach-sum { flex-direction: row-reverse; align-items: center; gap: 12px; }
  .ach-pop { gap: 14px; padding: 13px 16px 13px 12px; top: calc(var(--nav-h) + 8px); }
  .ach-pop-medal { width: 64px; height: 64px; }
  .ach-medal.big { width: 60px; height: 60px; }
  .ach-medal.big .ach-core { width: 46px; height: 46px; }
}
@media (prefers-reduced-motion: reduce) {
  .ach-pop, .ach-pop.out { transition: opacity .3s; transform: translate(-50%, 0); }
  .ach-pop *, .ach-item.fresh.play, .ach-item.fresh.play * { animation-duration: .01s !important; animation-delay: 0s !important; }
  .ach-rays, .ach-sparks, .ach-wave { display: none; }
}

/* ---------- огонёк в меню: дни подряд ----------
   Пламя из двух слоёв (внешний и внутренний язык) чуть колышется; цвет растёт с серией:
   t1 угольки, t2 огонь, t3 яркое пламя со свечением, t4 (30+ дней) — синее «аркановое». */
.nav-acc { position: relative; }
.nav-streak { --f1: #ff9a3c; --f2: #ffd36b; --glow: #ff7a1a; display: inline-flex; align-items: center; gap: 3px; height: 26px; margin: 0 -8px 0 2px; padding: 0 9px 0 5px; border-radius: 99px; background: color-mix(in oklab, var(--glow) 13%, transparent); box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--glow) 30%, transparent); font: 700 12.5px var(--mono); color: var(--f2); letter-spacing: -.02em; }
.nav-streak.t1 { --f1: #c9773f; --f2: #f0b27a; --glow: #a8582a; }
.nav-streak.t3 { --f1: #ff5a1f; --f2: #ffd23c; --glow: #ff4d12; }
.nav-streak.t4 { --f1: #3d7bff; --f2: #a8e6ff; --glow: #4d8dff; }
.ns-flame { position: relative; display: grid; place-items: center; width: 18px; height: 18px; }
.ns-flame svg { width: 100%; height: 100%; overflow: visible; transform-origin: 50% 90%; animation: nsFlick 2.4s ease-in-out infinite; }
.ns-flame .fl-o { fill: var(--f1); }
.ns-flame .fl-i { fill: var(--f2); transform-origin: 50% 90%; animation: nsFlick 1.3s ease-in-out infinite reverse; }
.nav-streak.t3 .ns-flame svg, .nav-streak.t4 .ns-flame svg { filter: drop-shadow(0 0 4px var(--glow)); }
@keyframes nsFlick { 0%, 100% { transform: scale(1) skewX(0); } 30% { transform: scale(1.04, .96) skewX(-3deg); } 60% { transform: scale(.97, 1.05) skewX(2deg); } }
/* число перекатывается: вчерашнее уезжает вверх, сегодняшнее приезжает снизу */
.ns-num { display: inline-flex; flex-direction: column; height: 1.25em; line-height: 1.25em; overflow: hidden; font-variant-numeric: tabular-nums; }
.ns-num span { display: block; transition: transform .55s var(--spring); }
.ns-num.roll span { transform: translateY(-100%); }
/* вспышка: пламя подпрыгивает, вокруг — кольцо жара */
.nav-streak.lit { animation: nsPill 1.2s var(--ease); }
.nav-streak.lit .ns-flame svg { animation: nsBurst .9s var(--spring), nsFlick 2.4s ease-in-out .9s infinite; }
.nav-streak.lit .ns-flame::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--f1); opacity: 0; animation: nsRing .8s var(--ease) .1s; pointer-events: none; }
@keyframes nsBurst { 0% { transform: scale(1); } 35% { transform: scale(1.65) translateY(-2px); filter: drop-shadow(0 0 9px var(--glow)) brightness(1.3); } 100% { transform: scale(1); } }
@keyframes nsRing { 0% { opacity: .9; transform: scale(.6); } 100% { opacity: 0; transform: scale(2.2); } }
@keyframes nsPill { 30% { box-shadow: inset 0 0 0 1px var(--glow), 0 0 22px -2px var(--glow); background: color-mix(in oklab, var(--glow) 28%, transparent); } }
/* подсказка под кнопкой профиля: «5 дней подряд!» */
.ns-bubble { --f1: #ff9a3c; --f2: #ffd36b; --glow: #ff7a1a; position: absolute; z-index: 60; right: 0; top: calc(100% + 12px); display: flex; align-items: center; gap: 11px; width: max-content; max-width: 280px; padding: 11px 16px 11px 12px; border-radius: 14px;
  border: 1px solid color-mix(in oklab, var(--glow) 40%, var(--line-strong)); background: radial-gradient(160px 80px at 10% 50%, color-mix(in oklab, var(--glow) 22%, transparent), transparent 80%), oklch(0.2 0.01 var(--h) / .97);
  box-shadow: 0 22px 50px -18px #000c; pointer-events: none; opacity: 0; transform: translateY(-8px) scale(.94); transform-origin: 85% 0; transition: opacity .35s var(--ease), transform .55s var(--spring); }
.ns-bubble::before { content: ""; position: absolute; right: 30px; top: -6px; width: 10px; height: 10px; border-left: 1px solid color-mix(in oklab, var(--glow) 40%, var(--line-strong)); border-top: 1px solid color-mix(in oklab, var(--glow) 40%, var(--line-strong)); background: oklch(0.2 0.01 var(--h)); transform: rotate(45deg); }
.ns-bubble.t1 { --f1: #c9773f; --f2: #f0b27a; --glow: #a8582a; }
.ns-bubble.t3 { --f1: #ff5a1f; --f2: #ffd23c; --glow: #ff4d12; }
.ns-bubble.t4 { --f1: #3d7bff; --f2: #a8e6ff; --glow: #4d8dff; }
.ns-bubble.in { opacity: 1; transform: none; }
.ns-bubble.out { opacity: 0; transform: translateY(-4px); }
.ns-bubble .ns-flame { width: 30px; height: 30px; }
.ns-bubble .ns-flame svg { filter: drop-shadow(0 0 6px var(--glow)); }
.ns-bubble b { display: block; color: var(--ink); font-size: 14px; font-weight: 700; }
.ns-bubble small { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; }
@media (max-width: 640px) { .nav-streak { margin-right: 0; } .ns-bubble { max-width: calc(100vw - 32px); } }
@media (prefers-reduced-motion: reduce) { .ns-flame svg, .ns-flame .fl-i, .nav-streak.lit, .nav-streak.lit .ns-flame svg { animation: none !important; } .ns-num span { transition: none; } }

/* огонёк — отдельная кнопка поверх правого края «таблетки» профиля (внутри ссылки кнопку класть нельзя) */
.nav-user.has-streak { padding-right: calc(var(--sw, 50px) + 14px); }
.nav-acc > .nav-streak { position: absolute; right: 9px; top: 50%; margin: 0; border: 0; cursor: pointer; translate: 0 -50%; transition: background .2s, box-shadow .2s, scale .25s var(--spring); }
.nav-acc > .nav-streak:hover { background: color-mix(in oklab, var(--glow) 24%, transparent); box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--glow) 55%, transparent), 0 0 16px -4px var(--glow); }
.nav-acc > .nav-streak:active { scale: .94; }
.nav-acc > .nav-streak:focus-visible { outline: 2px solid var(--accent-hi); outline-offset: 2px; }

/* ---------- окно огонька ---------- */
.modal.sheet:has(.streak-sheet) { width: min(400px, 100%); overflow: hidden; }
.streak-sheet { --f0: #c2410c; --f1: #ff8a1f; --f2: #ffd36b; --glow: #ff7a1a; position: relative; gap: 4px; padding-top: 20px;
  background: radial-gradient(320px 230px at 50% 0%, color-mix(in oklab, var(--glow) 24%, transparent), transparent 75%); }
.streak-sheet.t1 { --f0: #7c2d12; --f1: #c9773f; --f2: #f0b27a; --glow: #a8582a; }
.streak-sheet.t3 { --f0: #b91c1c; --f1: #ff5a1f; --f2: #ffd23c; --glow: #ff4d12; }
.streak-sheet.t4 { --f0: #1e3a8a; --f1: #3d7bff; --f2: #a8e6ff; --glow: #4d8dff; }
.sk-fire { position: relative; width: 150px; height: 170px; margin-bottom: -6px; }
.sk-glow { position: absolute; left: 50%; bottom: 8px; width: 170px; height: 120px; margin-left: -85px; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in oklab, var(--glow) 60%, transparent), transparent); filter: blur(6px); animation: skGlow 2.2s ease-in-out infinite; }
.sk-flame { position: absolute; left: 50%; bottom: 0; width: 120px; height: 150px; margin-left: -60px; overflow: visible; transform-origin: 50% 100%; animation: skIn .9s var(--spring) both; filter: drop-shadow(0 0 14px color-mix(in oklab, var(--glow) 70%, transparent)); }
.sk-flame path { transform-origin: 50% 100%; transform-box: fill-box; }
.sk-l1 { animation: skSway 2.6s ease-in-out infinite; }
.sk-l2 { animation: skSway 1.9s ease-in-out -.6s infinite reverse; }
.sk-l3 { animation: skLick 1.3s ease-in-out infinite; }
@keyframes skIn { 0% { transform: scale(.15); opacity: 0; } 60% { opacity: 1; } 100% { transform: none; } }
@keyframes skSway { 0%, 100% { transform: scale(1, 1) skewX(0); } 25% { transform: scale(1.03, .96) skewX(-4deg); } 50% { transform: scale(.97, 1.05) skewX(2deg); } 75% { transform: scale(1.02, .98) skewX(4deg); } }
@keyframes skLick { 0%, 100% { transform: scale(1); } 50% { transform: scale(.9, 1.12); } }
@keyframes skGlow { 0%, 100% { opacity: .75; transform: scale(1); } 50% { opacity: 1; transform: scale(1.08); } }
/* искры летят вверх */
.sk-embers { position: absolute; left: 50%; bottom: 40px; width: 0; height: 0; }
.sk-embers i { position: absolute; left: var(--x); bottom: 0; width: var(--sz); height: var(--sz); border-radius: 50%; background: var(--f2); box-shadow: 0 0 6px var(--f1); opacity: 0; animation: skEmber var(--du) ease-out var(--dl) infinite; }
@keyframes skEmber { 0% { opacity: 0; transform: translate(0, 0) scale(1); } 15% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--dx), -130px) scale(.3); } }
.sk-num { font: 700 64px/1 var(--disp); letter-spacing: -.05em; font-variant-numeric: tabular-nums; background: linear-gradient(180deg, #fff 20%, var(--f2) 60%, var(--f1)); -webkit-background-clip: text; background-clip: text; color: transparent; animation: rise .6s var(--ease) .25s both; }
.sk-label { color: var(--ink); font-size: 16px; font-weight: 650; animation: rise .6s var(--ease) .32s both; }
.sk-tier { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 6px; padding: 4px 11px; border-radius: 99px; background: color-mix(in oklab, var(--glow) 16%, transparent); box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--glow) 35%, transparent); color: var(--f2); font: 600 10px var(--disp); letter-spacing: .08em; text-transform: uppercase; animation: rise .6s var(--ease) .38s both; }
.streak-sheet .sk-msg { margin: 12px 0 6px; font-size: 14px; animation: rise .6s var(--ease) .44s both; }
/* неделя: дни серии загораются по очереди */
.sk-week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; width: 100%; margin: 4px 0 8px; }
.sk-week span { display: flex; flex-direction: column; align-items: center; gap: 5px; }
.sk-week i { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--card-2); box-shadow: inset 0 0 0 1px var(--line); }
.sk-week small { color: var(--faint); font: 500 10.5px var(--mono); }
.sk-week .on i { background: radial-gradient(circle at 50% 70%, color-mix(in oklab, var(--glow) 45%, transparent), color-mix(in oklab, var(--glow) 14%, var(--card-2))); box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--glow) 50%, transparent); animation: skDay .5s var(--spring) calc(.55s + var(--i) * 70ms) both; }
.sk-week .on svg { width: 19px; height: 19px; }
.sk-week .on .fl-o { fill: var(--f1); }
.sk-week .on .fl-i { fill: var(--f2); }
.sk-week .today small { color: var(--f2); font-weight: 700; }
.sk-week .today i { box-shadow: inset 0 0 0 1.5px var(--f1), 0 0 14px -2px var(--glow); }
@keyframes skDay { from { transform: scale(.3); opacity: 0; } }
.sk-goal { width: 100%; padding: 12px 14px; border-radius: 14px; background: var(--bg-2); text-align: left; animation: rise .6s var(--ease) .6s both; }
.sk-goal-top { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 9px; color: var(--ink-2); font-size: 12.5px; }
.sk-goal-top b { flex: none; color: var(--f2); font: 600 12px var(--mono); }
.sk-bar { display: block; height: 6px; border-radius: 3px; background: var(--card-2); overflow: hidden; }
.sk-bar > i { display: block; width: var(--w); height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--f0), var(--f1), var(--f2)); box-shadow: 0 0 10px var(--glow); transform-origin: left; animation: achBar 1.1s var(--ease) .8s both; }
.sk-boost { display: flex; align-items: center; gap: 10px; width: 100%; margin-top: 8px; padding: 10px 14px; border-radius: 14px; border: 1px dashed var(--line); color: var(--muted); font-size: 12.5px; text-align: left; animation: rise .6s var(--ease) .66s both; }
.sk-boost.on { border-style: solid; border-color: color-mix(in oklab, var(--glow) 40%, transparent); background: color-mix(in oklab, var(--glow) 9%, transparent); color: var(--ink-2); }
.sk-boost b { flex: none; color: var(--f2); font: 700 20px/1 var(--mono); letter-spacing: -.05em; }
.sk-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; width: 100%; margin-top: 8px; animation: rise .6s var(--ease) .7s both; }
.sk-stats div { display: flex; flex-direction: column; gap: 2px; padding: 11px; border-radius: 14px; border: 1px solid var(--line); }
.sk-stats b { font: 600 22px/1.1 var(--mono); letter-spacing: -.05em; }
.sk-stats span { color: var(--muted); font-size: 11.5px; }
@media (prefers-reduced-motion: reduce) { .streak-sheet *, .streak-sheet *::before { animation: none !important; } }

/* ---------- фон выложен (bgPublished в site.js): галочка с волной и искрами, превью, ссылка ---------- */
.bpub { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.bpub > * { animation: rise .5s var(--ease) both; }
.bpub > :nth-child(2) { animation-delay: .25s; } .bpub > :nth-child(3) { animation-delay: .3s; } .bpub > :nth-child(4) { animation-delay: .35s; }
.bpub > :nth-child(5) { animation-delay: .42s; } .bpub > :nth-child(6) { animation-delay: .48s; } .bpub > :nth-child(7) { animation-delay: .54s; }
.bpub h2 { margin: 0; font-size: 22px; letter-spacing: -.02em; }
.bpub .kicker { margin: 6px 0 0; }
.bpub p { margin: 0; max-width: 400px; color: var(--muted); font-size: 14px; line-height: 1.55; }
.bpub-ok { position: relative; display: grid; place-items: center; width: 80px; height: 80px; margin: 4px 0; border-radius: 50%; background: var(--grad); color: #fff; box-shadow: inset 0 1px 0 #ffffff55, 0 16px 44px -12px var(--c1); animation: bpubPop .6s var(--spring) both; }
.bpub-ok::before { content: ""; position: absolute; inset: 6px; border-radius: 50%; border: 1.5px solid #ffffff4d; }
.bpub-ok svg { position: relative; width: 40px; height: 40px; overflow: visible; fill: none; stroke: currentColor; stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 0; filter: drop-shadow(0 2px 3px #6a1a0a88); animation: bpubDraw .5s var(--ease) .35s both; }
.bpub-wave { position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--c2); animation: bpubWave 1s var(--ease) .15s both; }
.bpub-prev { display: block; width: 100%; max-width: 360px; aspect-ratio: 16 / 9; margin-top: 6px; overflow: hidden; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--bg-2); box-shadow: 0 24px 50px -30px #000; }
.bpub-prev img { width: 100%; height: 100%; object-fit: cover; display: block; animation: bpubZoom 6s var(--ease) both; }
.bpub-link { display: flex; gap: 8px; width: 100%; margin-top: 4px; }
.bpub-link .input { flex: 1; min-width: 0; font: 12px var(--mono); }
@keyframes bpubPop { from { transform: scale(.3) rotate(-30deg); opacity: 0; } }
@keyframes bpubDraw { from { stroke-dashoffset: 1; } }
@keyframes bpubWave { from { transform: scale(1); opacity: .9; } to { transform: scale(2.1); opacity: 0; } }
@keyframes bpubZoom { from { transform: scale(1.12); } }

/* ---------- поздравление с огоньком: раз в день, когда серия обновилась ---------- */
.modal.sheet:has(.sk-congrats) { width: min(420px, 100%); overflow: hidden; }
.sk-congrats { padding-top: 26px; }
.sk-congrats::before { content: ""; position: absolute; inset: -40% -20% auto; height: 340px; z-index: -1; background: radial-gradient(closest-side, color-mix(in oklab, var(--glow) 32%, transparent), transparent); animation: skcAura 3s ease-in-out .4s infinite alternate both; pointer-events: none; }
@keyframes skcAura { from { opacity: .55; transform: scale(.92); } to { opacity: 1; transform: scale(1.06); } }
.skc-stage { position: relative; display: grid; place-items: center; width: 220px; height: 180px; }
.skc-stage .sk-fire { animation: skcIgnite 1s var(--spring) .1s both; }
@keyframes skcIgnite { 0% { transform: scale(.2) translateY(30px); opacity: 0; filter: brightness(2.5); } 55% { transform: scale(1.12); opacity: 1; } 100% { transform: none; filter: none; } }
.skc-ring { position: absolute; left: 50%; top: 58%; width: 60px; height: 60px; margin: -30px 0 0 -30px; border-radius: 50%; border: 2px solid var(--f2); box-shadow: 0 0 18px var(--glow), inset 0 0 12px var(--glow); opacity: 0; animation: skcRing 1.1s cubic-bezier(.2, .8, .2, 1) .55s both; }
.skc-ring.r2 { border-color: var(--f1); animation-delay: .72s; animation-duration: 1.3s; }
@keyframes skcRing { 0% { transform: scale(.3); opacity: .95; } 100% { transform: scale(4.2); opacity: 0; } }
.skc-sparks { position: absolute; left: 50%; top: 58%; width: 0; height: 0; }
.skc-sparks i { position: absolute; left: 0; top: 0; width: var(--sz); height: var(--sz); margin: calc(var(--sz) / -2); border-radius: 50%; background: var(--f2); box-shadow: 0 0 8px var(--f1), 0 0 2px #fff; opacity: 0; animation: skcSpark 1.2s cubic-bezier(.15, .7, .3, 1) var(--dl) both; }
@keyframes skcSpark { 0% { transform: translate(0, 0) scale(1.4); opacity: 1; } 70% { opacity: 1; } 100% { transform: translate(var(--tx), calc(var(--ty) + 40px)) scale(.2); opacity: 0; } }
.skc-kicker { margin-top: 2px; color: var(--f2); font: 700 12px var(--disp); letter-spacing: .1em; text-transform: uppercase; text-shadow: 0 0 18px var(--glow); animation: rise .6s var(--ease) .5s both; }
.skc-num { animation-delay: .6s; }
.skc-roll { display: inline-flex; flex-direction: column; height: 1em; overflow: hidden; vertical-align: top; }
.skc-num:has(.skc-roll) { background: none; }
.skc-roll span { display: block; line-height: 1; background: linear-gradient(180deg, #fff 20%, var(--f2) 60%, var(--f1)); -webkit-background-clip: text; background-clip: text; color: transparent; animation: skcRoll .7s var(--spring) 1.15s both; }
@keyframes skcRoll { from { transform: translateY(0); } to { transform: translateY(-100%); } }
.sk-congrats .sk-label { animation-delay: .68s; }
.sk-congrats .sk-tier { animation-delay: .74s; }
.skc-up { animation: rise .6s var(--ease) .74s both, skcPulse 1.6s ease-in-out 1.6s 3; }
@keyframes skcPulse { 50% { box-shadow: inset 0 0 0 1px var(--glow), 0 0 22px color-mix(in oklab, var(--glow) 60%, transparent); } }
.sk-congrats .sk-msg { animation-delay: .8s; }
.sk-congrats .skc-today i { animation: skcDay .8s var(--spring) 1.5s both; }
@keyframes skcDay { 0% { transform: scale(0); filter: brightness(3); } 60% { transform: scale(1.35); } 100% { transform: none; filter: none; } }
.skc-actions { display: flex; gap: 8px; width: 100%; margin-top: 10px; animation: rise .6s var(--ease) .95s both; }
.skc-actions .btn { flex: 1; }
@media (prefers-reduced-motion: reduce) { .skc-ring, .skc-sparks { display: none; } }
