/* ==========================================================================
   FROLOV PROJECT HUB — единая дизайн-система
   Цвета: обсидиан + золото + багровый (из логотипа) + неон-изумруд (из баннера)
   ========================================================================== */

/* 6.11: шрифты со своего сервера. Google Fonts из России часто отвечают
   медленно, а страница ждала их перед показом. Файлы урезаны до латиницы
   и кириллицы, все начертания в одном файле (вариативный шрифт). */
@font-face {
  font-family: 'Manrope';
  src: url('/fonts/manrope-var.woff') format('woff');
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Unbounded';
  src: url('/fonts/unbounded-var.woff') format('woff');
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #060506;
  --bg-2: #0d0708;
  --panel: rgba(255, 255, 255, 0.045);
  --panel-2: rgba(255, 255, 255, 0.025);
  --line: rgba(255, 255, 255, 0.09);
  --line-gold: rgba(229, 189, 122, 0.22);

  --ink: #fff6ea;
  --muted: #a99c8f;
  --muted-2: #7d7268;

  --gold: #e5bd7a;
  --gold-2: #ffe9be;
  --gold-deep: #a97f3d;

  --crimson: #c8202a;
  --crimson-2: #ff4b52;
  --crimson-deep: #6d0a0f;

  --neon: #4ffca6;
  --neon-deep: #0e6b45;

  --violet: #8b3dff;
  --violet-2: #c48bff;
  --violet-deep: #34145c;

  --r-lg: 30px;
  --r-md: 22px;
  --r-sm: 16px;

  --shadow: 0 30px 70px rgba(0, 0, 0, 0.5);
  --shadow-soft: 0 18px 44px rgba(0, 0, 0, 0.32);

  --font: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  --display: 'Unbounded', 'Manrope', sans-serif;
  /* Фирменный шрифт плашек и названия — тот же, которым набрано 𝔽 𝕣 𝕠 𝕝 𝕠 𝕧 */
  --deco: 'Cambria Math', 'Segoe UI Symbol', 'Noto Serif', 'DejaVu Serif', Georgia, 'Times New Roman', serif;

  --nav-h: 78px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  overflow-x: hidden;
  padding-bottom: env(safe-area-inset-bottom);
}

/* фон: живые пятна света + сетка */
.bg-fx {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(60% 45% at 88% -5%, rgba(200, 32, 42, 0.28), transparent 70%),
    radial-gradient(50% 40% at 6% 0%, rgba(229, 189, 122, 0.14), transparent 70%),
    radial-gradient(70% 50% at 50% 110%, rgba(79, 252, 166, 0.07), transparent 70%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 45%, var(--bg) 100%);
}

/**
 * Слой над градиентом: мягкое зерно вместо клетки.
 * Клетка читалась как «шаблон», зерно и световые лучи выглядят дороже.
 */
.bg-fx::after {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.55;
  background-image:
    repeating-conic-gradient(from 210deg at 78% -10%,
      rgba(255, 236, 210, 0.05) 0deg 1.6deg, transparent 1.6deg 9deg),
    url("data:image/svg+xml;utf8,\
<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'>\
<filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/>\
<feColorMatrix type='saturate' values='0'/></filter>\
<rect width='180' height='180' filter='url(%23n)' opacity='0.5'/></svg>");
  background-size: 100% 100%, 180px 180px;
  mask-image: radial-gradient(120% 90% at 70% 0%, rgba(0, 0, 0, 0.95), transparent 75%);
  -webkit-mask-image: radial-gradient(120% 90% at 70% 0%, rgba(0, 0, 0, 0.95), transparent 75%);
  mix-blend-mode: soft-light;
}

/* тонкая дуга-блик сверху: даёт ощущение объёма, а не плоской заливки */
.bg-fx::before {
  content: '';
  position: absolute;
  left: 50%;
  top: -60vh;
  width: 160vw;
  height: 120vh;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(229, 189, 122, 0.16), transparent 72%);
  filter: blur(40px);
}

.bg-orb {
  position: fixed;
  z-index: -1;
  width: 44vw;
  height: 44vw;
  max-width: 620px;
  max-height: 620px;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.5;
  pointer-events: none;
  animation: float 18s ease-in-out infinite;
}

.bg-orb.one { top: -14%; right: -12%; background: radial-gradient(circle, rgba(200, 32, 42, 0.6), transparent 66%); }
.bg-orb.two { top: 38%; left: -18%; background: radial-gradient(circle, rgba(139, 61, 255, 0.34), transparent 66%); animation-delay: -6s; }
.bg-orb.three {
  bottom: -18%;
  right: 8%;
  width: 52vw;
  height: 52vw;
  background: radial-gradient(circle, rgba(229, 189, 122, 0.22), transparent 68%);
  animation-delay: -11s;
  opacity: 0.42;
}

@keyframes float {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(0, 40px, 0) scale(1.08); }
}

a { color: inherit; text-decoration: none; }
button, a { -webkit-tap-highlight-color: transparent; }
img { max-width: 100%; }

.wrap { width: min(1220px, calc(100% - 28px)); margin: 0 auto; }
.hidden { display: none !important; }

/* ==========================  ШАПКА  ========================== */

.topbar {
  position: sticky;
  top: 0;
  z-index: 90;
  /* плотный фон: контент под шапкой больше не просвечивает при листании */
  background: #0a0708;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  /* своя графическая плоскость — на iOS убирает дрожание залипшей шапки */
  transform: translateZ(0);
  will-change: transform;
}
/* полупрозрачный вариант с блюром — только там, где блюр реально поддержан
   (в Telegram-браузере на iOS блюр у sticky и вызывал «гуляние») */
@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
  @media (hover: hover) {
    .topbar {
      background: rgba(6, 5, 6, 0.86);
      backdrop-filter: blur(18px);
      -webkit-backdrop-filter: blur(18px);
    }
  }
}

.topbar-inner {
  min-height: var(--nav-h);
  display: flex;
  align-items: center;
  gap: 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  /* ужимается первым: иначе длинное название наезжает на счётчик онлайна */
  flex: 0 1 auto;
  overflow: hidden;
}

.brand > span { min-width: 0; overflow: hidden; }

.brand-logo {
  width: 50px;
  height: 50px;
  border-radius: 16px;
  overflow: hidden;
  flex: none;
  border: 1px solid var(--line-gold);
  background: radial-gradient(circle at 50% 20%, rgba(229, 189, 122, 0.18), transparent 40%), #0b0708;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.4);
}

.brand-logo img { width: 100%; height: 100%; object-fit: cover; display: block; }

.brand-name {
  font-family: var(--deco);
  font-weight: 800;
  font-size: 19px;
  letter-spacing: -0.05em;
  line-height: 1;
  /* название с пробелами между буквами не должно переноситься */
  white-space: nowrap;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 520px) {
  .brand-name { font-size: 15px; }
  .brand-sub { font-size: 8.5px; letter-spacing: 0.2em; }
}

@media (max-width: 400px) {
  .brand-name { font-size: 13px; }
  .brand-sub { display: none; }
}

/**
 * Узкая шапка: логотип и кнопки чуть меньше, отступы плотнее —
 * иначе название с пробелами между буквами не влезает целиком.
 */
@media (max-width: 460px) {
  .topbar-inner { gap: 10px; }
  .top-actions { gap: 8px; }
  .brand { gap: 9px; }
  .brand-logo { width: 40px; height: 40px; border-radius: 13px; }
  .brand-name { font-size: 13.5px; letter-spacing: -0.03em; }
  .search-btn { width: 38px; height: 38px; }
  .lang-btn { height: 38px; padding: 0 9px; }
  .online-chip { height: 38px; padding: 0 9px; font-size: 12px; }
}

.brand-sub {
  font-size: 10px;
  letter-spacing: 0.28em;
  color: var(--muted-2);
  font-weight: 800;
  text-transform: uppercase;
  margin-top: 4px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  /* пилюля лежит под ссылками, но не вылезает за пределы меню */
  position: relative;
  isolation: isolate;
}

.nav a {
  position: relative;
  z-index: 1;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  color: #cdbfb2;
  transition: color 0.18s ease, transform 0.22s cubic-bezier(0.34, 1.5, 0.5, 1);
}

.nav a:hover { color: var(--gold-2); transform: translateY(-1px); }
.nav a.active { color: var(--ink); }

/* Стеклянная пилюля верхнего меню: на месте активного пункта, за курсором — к тому, на что навели */
.nav-pill {
  position: absolute;
  z-index: 0;
  left: 0;
  top: 50%;
  height: 38px;
  margin-top: -19px;
  width: 0;
  border-radius: 12px;
  opacity: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(229, 189, 122, 0.22), rgba(155, 26, 42, 0.18));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 6px 18px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition:
    transform 0.46s cubic-bezier(0.22, 1.12, 0.36, 1),
    width 0.46s cubic-bezier(0.22, 1.12, 0.36, 1),
    opacity 0.22s ease;
  will-change: transform, width;
}

.nav-pill.on { opacity: 1; }
.nav-pill.flow { filter: blur(0.4px); }

.top-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; flex: 0 0 auto; }
.nav + .top-actions { margin-left: 8px; }

/* мини-профиль в шапке */
.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 14px 7px 7px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  cursor: pointer;
  transition: 0.18s ease;
}

.user-chip:hover { border-color: var(--line-gold); }

.user-chip img,
.user-chip .avatar-fallback {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--gold), var(--crimson));
  color: #1a0d04;
  font-weight: 900;
  font-size: 14px;
  flex: none;
}

.user-chip b {
  font-size: 13px;
  font-weight: 800;
  display: block;
  max-width: 22ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-chip small {
  display: block;
  font-size: 11px;
  color: var(--gold);
  font-weight: 800;
  white-space: nowrap;
}

/**
 * На телефоне от мини-профиля остаётся только аватар: пилюля с именем
 * и уровнем занимала половину шапки и ломалась на три строки.
 */
@media (max-width: 720px) {
  .user-chip {
    padding: 0;
    border: 0;
    background: none;
    gap: 0;
  }
  .user-chip .chip-text { display: none; }
  .user-chip img,
  .user-chip .avatar-fallback {
    width: 38px;
    height: 38px;
    font-size: 15px;
    border: 1px solid var(--line-gold);
  }
}

/* ==========================  ПОИСК  ========================== */

.search {
  position: relative;
  flex: none;
}

.search-btn {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  cursor: pointer;
  font-size: 15px;
  display: grid;
  place-items: center;
  transition: 0.18s ease;
}

.search-btn:hover { color: var(--ink); border-color: var(--line-gold); }

.search-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(420px, calc(100vw - 28px));
  z-index: 95;
  padding: 12px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: rgba(12, 10, 11, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
  display: none;
}

.search-panel.open { display: block; }

.search-panel input {
  width: 100%;
  min-height: 46px;
  padding: 10px 14px;
  border-radius: 13px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.4);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  outline: none;
}

.search-panel input:focus { border-color: var(--gold); }
.search-panel input::placeholder { color: var(--muted-2); }

.search-results {
  margin-top: 10px;
  max-height: min(52vh, 380px);
  overflow-y: auto;
  display: grid;
  gap: 4px;
}

.search-results:empty { display: none; }

.search-hit {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border-radius: 12px;
  cursor: pointer;
  transition: 0.14s ease;
  text-align: left;
  border: 0;
  background: transparent;
  color: inherit;
  font-family: var(--font);
  width: 100%;
}

.search-hit:hover, .search-hit.sel { background: rgba(255, 255, 255, 0.06); }
.search-hit i { font-style: normal; font-size: 17px; flex: none; width: 24px; text-align: center; }
.search-hit b { display: block; font-size: 14px; font-weight: 800; }
.search-hit small { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.search-hit .hit-body { flex: 1; min-width: 0; }
.search-hit .hit-kind { margin-left: auto; font-size: 10px; font-weight: 800; letter-spacing: 0.1em; color: var(--muted-2); text-transform: uppercase; flex: none; }

.search-empty { padding: 16px 12px; color: var(--muted); font-size: 14px; text-align: center; }

/* ==========================  КНОПКИ  ========================== */

.btn, .btn-ghost, .btn-dark, .btn-neon, .btn-sm {
  position: relative;
  border: 0;
  cursor: pointer;
  min-height: 50px;
  padding: 0 22px;
  border-radius: var(--r-sm);
  font-family: var(--font);
  font-weight: 800;
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  white-space: nowrap;
  overflow: hidden;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease, opacity 0.16s ease;
}

.btn:hover, .btn-ghost:hover, .btn-dark:hover, .btn-neon:hover, .btn-sm:hover { transform: translateY(-2px); }
.btn:active, .btn-ghost:active, .btn-neon:active, .btn-sm:active { transform: translateY(0); }

.btn {
  color: #1c0f03;
  background: linear-gradient(135deg, var(--gold-2), var(--gold) 55%, var(--gold-deep));
  box-shadow: 0 14px 34px rgba(229, 189, 122, 0.22);
}

/**
 * Ведущая кнопка первого экрана. Раньше три кнопки были одного веса,
 * и глазу не за что было зацепиться — премиальный экран всегда ведёт
 * в одно место, остальное стоит рядом тише.
 */
.btn-lead {
  min-height: 56px;
  padding: 0 30px;
  font-size: 15.5px;
  letter-spacing: 0.01em;
  box-shadow: 0 18px 44px rgba(229, 189, 122, 0.3);
}

/* блик */
.btn::after {
  content: '';
  position: absolute;
  top: 0;
  left: -120%;
  width: 60%;
  height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  transform: skewX(-18deg);
  animation: shine 4.5s ease-in-out infinite;
}

@keyframes shine {
  0%, 65% { left: -120%; }
  85%, 100% { left: 160%; }
}

.btn-neon {
  color: #04170e;
  background: linear-gradient(135deg, #d3ffe8, var(--neon));
  box-shadow: 0 14px 34px rgba(79, 252, 166, 0.2);
}

.btn-ghost {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid var(--line);
}

.btn-ghost:hover { border-color: var(--line-gold); background: rgba(255, 255, 255, 0.08); }

.btn-dark {
  color: var(--ink);
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--line);
}

.btn-sm {
  min-height: 42px;
  padding: 0 15px;
  border-radius: 13px;
  font-size: 13px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
}

.btn[disabled], .btn-neon[disabled], .btn-ghost[disabled], .btn-sm[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none;
}

.btn-block { width: 100%; }

/* ==========================  ТИПОГРАФИКА  ========================== */

.tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  padding: 0 14px;
  border-radius: 999px;
  color: var(--gold-2);
  background: rgba(200, 32, 42, 0.16);
  border: 1px solid var(--line-gold);
  /* тот же шрифт, что у названия в шапке */
  font-family: var(--deco);
  /**
   * Плашки пишутся так, как набраны в тексте («Личный Кабинет»,
   * «Важно ‼️»), а не капсом: капс с разрядкой читался как крик и
   * съедал ширину. Разрядку оставили лёгкую — шрифт с засечками
   * и так держит строку.
   */
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.035em;
  line-height: 1.1;
  white-space: nowrap;
}

.tag.neon { color: #06331f; background: linear-gradient(135deg, #d3ffe8, var(--neon)); border-color: transparent; }
.tag.dim { color: var(--muted); background: rgba(255, 255, 255, 0.05); border-color: var(--line); }

/* фирменным шрифтом набираем и имя человека в шапке */
.user-chip b, .chip-name { font-family: var(--deco); letter-spacing: 0.04em; }

h1, h2, h3 { font-family: var(--display); letter-spacing: -0.05em; line-height: 1; margin: 0; }

.section { padding: 34px 0; }
.section-head { max-width: 760px; margin-bottom: 22px; }
.section-head h2 { margin: 14px 0 12px; font-size: clamp(28px, 4vw, 48px); }
.section-head p { margin: 0; color: var(--muted); line-height: 1.7; font-size: 16px; }

.page-head { padding: 40px 0 8px; }
.page-head h1 { font-size: clamp(34px, 6vw, 68px); margin: 16px 0 14px; }
.page-head p { margin: 0; color: var(--muted); line-height: 1.7; max-width: 640px; font-size: 16px; }

.gold { color: var(--gold-2); }
.neon-text { color: var(--neon); }

/* ==========================  КАРТОЧКИ  ========================== */

.card {
  padding: 24px;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: linear-gradient(160deg, var(--panel), var(--panel-2));
  box-shadow: var(--shadow-soft);
}

.card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 16px;
}

.card-head h3 { font-size: 24px; margin: 10px 0 0; }

/**
 * Левая колонка шапки карточки должна уметь сжиматься.
 * Без min-width: 0 флекс-элемент не даёт себя ужать меньше содержимого,
 * и длинный заголовок распирал карточку вместо того, чтобы подстроиться.
 */
.card-head > div { min-width: 0; }
.card p { color: var(--muted); line-height: 1.7; margin: 0 0 14px; }

.grid { display: grid; gap: 14px; }
/* иначе широкое содержимое растягивает колонку и страница едет вбок на телефоне */
.grid > *, .g2 > *, .g3 > *, .g4 > * { min-width: 0; }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }

/* ==========================  ГЛАВНАЯ: ГЕРОЙ  ========================== */

.hero { padding: 26px 0 10px; }

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 16px;
  align-items: stretch;
}

.hero-copy {
  position: relative;
  z-index: 1;
  padding: 32px;
  min-height: 620px;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at 88% 10%, rgba(229, 189, 122, 0.18), transparent 26%),
    radial-gradient(circle at 10% 8%, rgba(200, 32, 42, 0.22), transparent 32%),
    linear-gradient(150deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018));
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero-title {
  margin: 22px 0 20px;
  /* потолок снижен: на широком экране колонка узкая, и при 88px
     заголовок ломался на четыре строки и съедал весь первый экран */
  font-size: clamp(40px, 4.9vw, 66px);
  line-height: 0.92;
  letter-spacing: -0.05em;
  text-wrap: balance;
}

.hero-title span {
  background: linear-gradient(120deg, var(--gold-2), var(--gold) 40%, var(--crimson-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-text { max-width: 560px; color: #c5b7a9; font-size: 17.5px; line-height: 1.7; margin: 0; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 28px; }

.promo-card {
  position: relative;
  margin-top: 26px;
  padding: 20px;
  border-radius: var(--r-md);
  border: 1px solid rgba(255, 233, 190, 0.26);
  background: linear-gradient(135deg, rgba(229, 189, 122, 0.2), rgba(200, 32, 42, 0.2)), rgba(255, 255, 255, 0.03);
  overflow: hidden;
}

.promo-card::before {
  content: '';
  position: absolute;
  inset: -90px -80px auto auto;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 233, 190, 0.28), transparent 62%);
}

.promo-row {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
}

.promo-code {
  margin: 10px 0;
  font-family: var(--display);
  font-size: clamp(38px, 5vw, 64px);
  line-height: 1;
  letter-spacing: 0.04em;
  color: #fff3da;
  text-shadow: 0 0 40px rgba(255, 233, 190, 0.25);
}

.promo-desc { color: #eddfcb; line-height: 1.6; margin: 0; font-size: 14px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }

.chips span {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 0 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.07);
  color: #e7d7c0;
  font-size: 13px;
  font-weight: 800;
}

.hero-visual {
  position: relative;
  min-height: 620px;
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--line-gold);
  box-shadow: var(--shadow);
  background: linear-gradient(180deg, #1b0c0c, #070707);
}

.hero-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(1.06) contrast(1.06);
}

.hero-visual::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.7)),
    radial-gradient(circle at 50% 22%, transparent 0%, rgba(0, 0, 0, 0.4) 74%);
}

.visual-overlay {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  z-index: 2;
  padding: 20px;
  border-radius: var(--r-md);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(7, 6, 7, 0.6);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.visual-overlay h3 { margin: 10px 0 8px; font-size: 26px; }
.visual-overlay p { margin: 0; color: var(--muted); line-height: 1.55; font-size: 14px; }

/* ==========================  СТАТИСТИКА  ========================== */

/* Плиток бывает от трёх до пяти: те, где ноль, со страницы убираются.
   Поэтому раскладку задаём по содержимому, а не жёстко на четыре. */
.stat-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.stat {
  padding: 20px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  text-align: center;
}

.stat b {
  display: block;
  font-family: var(--display);
  font-size: clamp(24px, 3vw, 34px);
  letter-spacing: -0.05em;
  color: var(--gold-2);
}

.stat small { display: block; margin-top: 6px; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }

/* ==========================  СЛАЙДЕР  ========================== */

.slider-box {
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  background: rgba(255, 255, 255, 0.03);
}

.slider-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.slider-top strong { font-family: var(--display); letter-spacing: -0.04em; font-size: 14px; }
.dots { display: flex; gap: 8px; align-items: center; margin: -14px 0; }

.dot {
  width: 30px;
  /* палец должен попадать: сама полоска тонкая, а область нажатия — нет */
  height: 5px;
  box-sizing: content-box;
  border-top: 14px solid transparent;
  border-bottom: 14px solid transparent;
  background-clip: content-box;
  border-radius: 999px;
  border-left: 0;
  border-right: 0;
  background: rgba(255, 255, 255, 0.16);
  cursor: pointer;
  transition: 0.2s ease;
  padding: 0;
}

.dot.active { background: linear-gradient(90deg, var(--gold-2), var(--gold)); box-shadow: 0 0 16px rgba(229, 189, 122, 0.5); }

.slider { overflow: hidden; }
.track { display: flex; transition: transform 0.55s cubic-bezier(0.65, 0, 0.35, 1); }

.slide {
  position: relative;
  min-width: 100%;
  min-height: 400px;
  padding: 30px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  background: linear-gradient(135deg, #180909, #070607);
}

.slide > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.8;
}

.slide::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.15)),
    linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.75));
}

.slide-content { position: relative; z-index: 2; max-width: 640px; }
.slide-content h3 { margin: 12px 0 12px; font-size: clamp(26px, 4vw, 48px); line-height: 0.98; }
.slide-content p { color: #d6c6b6; line-height: 1.65; margin: 0 0 18px; }

/* ==========================  ПЛИТКИ РАЗДЕЛОВ  ========================== */

.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }

.tile {
  position: relative;
  min-height: 176px;
  padding: 22px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  transition: 0.2s ease;
}

.tile::before {
  content: '';
  position: absolute;
  inset: -60px -60px auto auto;
  width: 170px;
  height: 170px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(229, 189, 122, 0.16), transparent 62%);
  opacity: 0;
  transition: 0.3s ease;
}

.tile:hover { transform: translateY(-4px); border-color: var(--line-gold); }
.tile:hover::before { opacity: 1; }

.tile-icon {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-size: 22px;
  background: linear-gradient(135deg, rgba(229, 189, 122, 0.24), rgba(200, 32, 42, 0.3));
  border: 1px solid rgba(229, 189, 122, 0.18);
}

.tile h3 { margin: 16px 0 7px; font-size: 18px; font-family: var(--deco); letter-spacing: .02em; }
.tile p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }

.tile-arrow {
  position: absolute;
  right: 20px;
  bottom: 20px;
  color: var(--gold);
  font-size: 20px;
  opacity: 0.5;
  transition: 0.2s ease;
}

.tile:hover .tile-arrow { opacity: 1; transform: translateX(3px); }

/* ==========================  ПАРТНЁРЫ  ========================== */

/* ======================  ПОИСК ПО ПАРТНЁРАМ  ======================
   Карточек под восемьдесят — листать их до нужной невозможно.
   ================================================================== */

.psearch {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 12px;
}

.psearch-ico {
  position: absolute;
  left: 16px;
  font-size: 19px;
  line-height: 1;
  color: var(--muted-2);
  pointer-events: none;
}

.psearch input {
  width: 100%;
  min-height: 50px;
  padding: 0 46px 0 44px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  font-weight: 600;
  /* 16px и меньше на айфоне — экран сам подъезжает и зумит; держим 15px
     с запретом зума через viewport, как на остальных полях сайта */
  -webkit-appearance: none;
  appearance: none;
}

.psearch input::placeholder { color: var(--muted-2); font-weight: 600; }
.psearch input:focus { outline: none; border-color: var(--line-gold); background: rgba(255, 255, 255, 0.06); }
/* крестик у type=search браузер рисует свой — он тут лишний */
.psearch input::-webkit-search-cancel-button { display: none; }

.psearch-clear {
  position: absolute;
  right: 7px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.psearch-count {
  margin: -8px 0 14px;
  color: var(--muted-2);
  font-size: 13px;
  font-weight: 700;
}

.filter-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }

.filter-btn {
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-family: var(--font);
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
  transition: 0.18s ease;
}

.filter-btn:hover { color: var(--ink); }
.filter-btn.active { color: #1c0f03; background: linear-gradient(135deg, var(--gold-2), var(--gold)); border-color: transparent; }

.partner-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }

.partner {
  position: relative;
  padding: 22px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: hidden;
  transition: 0.2s ease;
}

.partner::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: var(--accent, var(--gold));
  opacity: 0.85;
}

.partner:hover { transform: translateY(-4px); border-color: var(--line-gold); }

.partner-top { display: flex; align-items: center; gap: 12px; }

.partner-mark {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  flex: none;
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-size: 18px;
  font-weight: 800;
  color: #0a0708;
  background: var(--accent, var(--gold));
  overflow: hidden;
}

/* если у партнёра загружена аватарка — она занимает всю плашку */
.partner-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  /* своё скругление, а не только обрезка родителем: иначе по краям
     оставалась светлая кромка от сглаживания */
  border-radius: inherit;
}

/* плитка чуть крупнее: логотип должен читаться, а не быть значком */
.partner-mark {
  width: 50px;
  height: 50px;
  border-radius: 15px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.38);
}

/**
 * Под настоящим логотипом фирменного фона быть не должно.
 * Раньше плашка всегда красилась в акцент партнёра, а логотип ложился
 * сверху: по скруглённым краям акцент просвечивал тонкой полоской и
 * читался как неряшливая обводка вокруг каждой аватарки. Буквенной
 * заглушке фон по-прежнему нужен — у неё под текстом ничего нет.
 */
.partner-mark.has-logo {
  background: none;
  box-shadow: none;
}

.partner h3 { font-size: 19px; margin: 0 0 4px; }
.partner-cat { font-size: 11px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted-2); }
.partner p { color: var(--muted); font-size: 14px; line-height: 1.6; margin: 0; flex: 1; }

.partner-bonus {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(79, 252, 166, 0.08);
  border: 1px solid rgba(79, 252, 166, 0.16);
  color: var(--neon);
  font-weight: 800;
  font-size: 13px;
}

.partner-actions { display: grid; grid-template-columns: 1fr auto; gap: 8px; }

.promo-mini {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px dashed rgba(229, 189, 122, 0.4);
  background: rgba(229, 189, 122, 0.07);
  color: var(--gold-2);
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: 0.08em;
  cursor: pointer;
  font-size: 15px;
  transition: 0.18s ease;
}

.promo-mini:hover { background: rgba(229, 189, 122, 0.14); }

/* бейдж («ВЫБОР ФРОЛОВА», «ТОП») — отдельной строкой справа над карточкой,
   больше не наезжает на название партнёра */
.partner-badge {
  display: flex;
  justify-content: flex-end;
  margin: 0 0 10px;
}
.badge-corner {
  display: inline-block;
  max-width: 100%;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.14em;
  color: #1c0f03;
  background: linear-gradient(135deg, var(--gold-2), var(--gold));
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==========================  КОЛЕСО  ========================== */

.wheel-layout { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 16px; align-items: start; }

.wheel-stage {
  position: relative;
  padding: 28px;
  border-radius: var(--r-lg);
  border: 1px solid rgba(139, 61, 255, 0.22);
  background:
    radial-gradient(circle at 50% 40%, rgba(139, 61, 255, 0.16), transparent 62%),
    radial-gradient(circle at 50% 100%, rgba(200, 32, 42, 0.14), transparent 60%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
  box-shadow: var(--shadow), inset 0 0 60px rgba(139, 61, 255, 0.06);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  overflow: hidden;
}

.wheel-holder {
  position: relative;
  width: min(460px, 100%);
  aspect-ratio: 1;
  filter: drop-shadow(0 24px 50px rgba(0, 0, 0, 0.55));
}

/* вращающееся неоновое свечение под колесом */
.wheel-holder::before {
  content: '';
  position: absolute;
  inset: -14%;
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    rgba(139, 61, 255, 0.4),
    rgba(229, 189, 122, 0.45),
    rgba(200, 32, 42, 0.45),
    rgba(139, 61, 255, 0.4)
  );
  filter: blur(30px);
  opacity: 0.38;
  pointer-events: none;
  animation: aura 9s linear infinite;
}

/* мягкий ореол поверх */
.wheel-holder::after {
  content: '';
  position: absolute;
  inset: -6%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(229, 189, 122, 0.14), transparent 62%);
  pointer-events: none;
  animation: halo 4.5s ease-in-out infinite;
}

@keyframes aura {
  to { transform: rotate(360deg); }
}

@keyframes halo {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 0.95; transform: scale(1.03); }
}

.wheel-holder canvas {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 50%;
}

/* указатель справа — стрелка с неоновым свечением */
.wheel-pointer {
  position: absolute;
  top: 50%;
  right: -3%;
  transform: translateY(-50%);
  width: 15%;
  max-width: 74px;
  z-index: 4;
  pointer-events: none;
  filter: drop-shadow(0 0 10px rgba(139, 61, 255, 0.85)) drop-shadow(-3px 5px 8px rgba(0, 0, 0, 0.7));
  transition: transform 0.09s ease;
}

.wheel-pointer svg { width: 100%; height: auto; display: block; }
.wheel-holder.kick .wheel-pointer { transform: translateY(-50%) translateX(5px) scale(0.97); }

/* центральная кнопка «Крутить» */
.wheel-hub {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 27%;
  height: 27%;
  border-radius: 50%;
  z-index: 3;
  display: grid;
  place-items: center;
  gap: 0;
  padding: 0;
  border: 3px solid var(--gold-2);
  background:
    radial-gradient(circle at 50% 22%, #5f1fb8, #2c0c52 55%, #120520);
  box-shadow:
    0 8px 26px rgba(0, 0, 0, 0.7),
    0 0 30px rgba(139, 61, 255, 0.38),
    inset 0 2px 12px rgba(255, 233, 190, 0.28);
  color: var(--gold-2);
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
  overflow: hidden;
  text-align: center;
}

.wheel-hub span {
  font-size: clamp(11px, 2.6vw, 17px);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
}

.wheel-hub small {
  display: block;
  margin-top: 3px;
  font-family: var(--font);
  font-size: 9px;
  letter-spacing: 0.16em;
  color: rgba(255, 233, 190, 0.7);
}

.wheel-hub:hover:not(:disabled) { transform: translate(-50%, -50%) scale(1.06); }
.wheel-hub:active:not(:disabled) { transform: translate(-50%, -50%) scale(0.97); }
.wheel-hub:disabled { cursor: default; opacity: 0.75; }

/* лента с главным призом */
.wheel-ribbon {
  position: relative;
  width: min(420px, 100%);
  margin-top: -6px;
  padding: 13px 22px;
  border-radius: 14px;
  text-align: center;
  background: linear-gradient(120deg, var(--crimson-deep) 0%, #4a1470 55%, var(--violet) 130%);
  border: 1px solid rgba(255, 233, 190, 0.32);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.5), 0 0 26px rgba(139, 61, 255, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.wheel-ribbon b {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 246, 234, 0.8);
}

.wheel-ribbon strong {
  font-family: var(--display);
  font-size: clamp(18px, 4vw, 26px);
  letter-spacing: -0.03em;
  color: var(--gold-2);
  text-shadow: 0 0 22px rgba(229, 189, 122, 0.45);
}

/* чипы категорий призов */
.prize-chips {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  width: 100%;
}

.prize-chip {
  padding: 13px 8px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  text-align: center;
  transition: 0.18s ease;
}

.prize-chip:hover { border-color: var(--line-gold); background: rgba(255, 255, 255, 0.07); }
.prize-chip .chip-ico { display: flex; justify-content: center; color: var(--gold-2); }
.prize-chip small { display: block; margin-top: 8px; font-size: 11px; font-weight: 800; color: var(--muted); }
.prize-chip b { display: block; margin-top: 3px; font-size: 12px; color: var(--gold-2); font-variant-numeric: tabular-nums; }

/* список призового фонда */
.prize-list {
  display: grid;
  gap: 7px;
  max-height: 420px;
  overflow-y: auto;
  padding-right: 4px;
}

.prize-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 13px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.prize-row.out { opacity: 0.42; }
.prize-row b { display: block; font-size: 14px; font-weight: 800; line-height: 1.25; }
.prize-row small { display: block; margin-top: 3px; font-size: 12px; color: var(--muted); }
.prize-ico { flex: none; display: flex; }

.prize-out {
  flex: none;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: rgba(200, 32, 42, 0.18);
  color: var(--crimson-2);
}

/* вложенные призы сектора-набора */
.prize-row.parent { border-color: rgba(139, 61, 255, 0.28); background: rgba(139, 61, 255, 0.07); }

.pool-items {
  display: grid;
  gap: 5px;
  margin: -2px 0 4px 0;
  padding-left: 16px;
  border-left: 2px solid rgba(139, 61, 255, 0.3);
}

.pool-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 11px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.022);
}

.pool-item.out { opacity: 0.4; }
.pool-item b { font-size: 13px; font-weight: 700; }
.pool-item small { margin-left: auto; font-size: 11px; color: var(--muted-2); flex: none; }

/* иконка в окне выигрыша */
.prize-icon {
  display: flex;
  justify-content: center;
  margin-bottom: 14px;
  filter: drop-shadow(0 6px 20px rgba(229, 189, 122, 0.35));
}

/* полоска с промокодом в окне выигрыша */
.promo-strip {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px dashed rgba(229, 189, 122, 0.4);
  background: rgba(229, 189, 122, 0.07);
}

.promo-strip span { font-size: 11px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.promo-strip b { flex: 1; font-family: var(--display); font-size: 19px; letter-spacing: 0.04em; color: var(--gold-2); }

/* кнопка звука */
.sound-btn {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 5;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.4);
  color: var(--muted);
  font-size: 17px;
  cursor: pointer;
  transition: 0.18s ease;
}

.sound-btn:hover { color: var(--ink); border-color: var(--line-gold); }
.sound-btn.on { color: var(--gold-2); }

.wheel-status {
  width: 100%;
  text-align: center;
  padding: 18px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.32);
}

.wheel-timer {
  font-family: var(--display);
  font-size: clamp(30px, 5vw, 44px);
  letter-spacing: -0.03em;
  color: var(--gold-2);
  font-variant-numeric: tabular-nums;
}

.wheel-status small { display: block; margin-top: 6px; color: var(--muted); font-size: 13px; }

.feed { display: flex; flex-direction: column; gap: 10px; max-height: 340px; overflow-y: auto; }

.feed-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.feed-item b { font-size: 13px; }
.feed-item span { margin-left: auto; color: var(--gold); font-weight: 800; font-size: 13px; }

/* ==========================  ЗАДАНИЯ  ========================== */

.task {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 20px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  transition: 0.2s ease;
}

.task.done { border-color: rgba(79, 252, 166, 0.3); background: rgba(79, 252, 166, 0.05); }

.task-num {
  width: 46px;
  height: 46px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-weight: 800;
  font-size: 17px;
  background: linear-gradient(135deg, rgba(229, 189, 122, 0.22), rgba(200, 32, 42, 0.28));
  border: 1px solid rgba(229, 189, 122, 0.18);
  flex: none;
}

.task.done .task-num { background: linear-gradient(135deg, #d3ffe8, var(--neon)); color: #04170e; border-color: transparent; }
.task h3 { font-size: 18px; margin: 0 0 6px; }
.task p { margin: 0 0 8px; color: var(--muted); font-size: 14px; line-height: 1.55; }
.task-reward { display: flex; gap: 8px; flex-wrap: wrap; }

.reward-pill {
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  background: rgba(229, 189, 122, 0.12);
  color: var(--gold-2);
  border: 1px solid rgba(229, 189, 122, 0.18);
}

.reward-pill.neon { background: rgba(79, 252, 166, 0.1); color: var(--neon); border-color: rgba(79, 252, 166, 0.2); }

/* ==========================  ПРОГРЕСС / УРОВНИ  ========================== */

.level-bar {
  height: 14px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.07);
  margin: 18px 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.level-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--gold), var(--crimson-2));
  box-shadow: 0 0 22px rgba(229, 189, 122, 0.4);
  transition: width 0.8s cubic-bezier(0.65, 0, 0.35, 1);
  width: 0;
}

.mini-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; margin-top: 16px; }

.mini-stats > div {
  padding: 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.065);
  text-align: center;
}

.mini-stats strong { display: block; font-size: 17px; font-family: var(--display); letter-spacing: -0.04em; }
.mini-stats small { color: var(--muted); font-size: 11px; }

.level-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.level-dot { width: 14px; height: 14px; border-radius: 50%; flex: none; box-shadow: 0 0 16px currentColor; }
.level-row b { font-family: var(--display); font-size: 16px; }
.level-row small { display: block; color: var(--muted); font-size: 12px; margin-top: 3px; }
.level-row .xp-need { margin-left: auto; color: var(--gold); font-weight: 800; font-size: 13px; white-space: nowrap; }
.level-row.reached { border-color: rgba(79, 252, 166, 0.25); background: rgba(79, 252, 166, 0.04); }
.level-row.current { border-color: var(--line-gold); background: rgba(229, 189, 122, 0.09); }

/* привилегия текущего уровня в кабинете */
.perk-box {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(229, 189, 122, 0.3);
  background: linear-gradient(135deg, rgba(229, 189, 122, 0.1), rgba(139, 61, 255, 0.08));
}

.perk-box b {
  display: block;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-2);
  margin-bottom: 5px;
}

.perk-box span { font-size: 14px; color: var(--ink); line-height: 1.5; }
.perk-box.dim { border-color: var(--line); background: rgba(255, 255, 255, 0.03); }
.perk-box.dim b { color: var(--muted-2); }
.perk-box.dim span { color: var(--muted); }

/* ==========================  ФОНОВЫЙ КЛИП  ========================== */

.video-bg {
  position: fixed;
  inset: 0;
  z-index: -3;
  overflow: hidden;
  background: #06050a;
  opacity: 0;
  transition: opacity 1.1s ease;
}

.video-bg.ready { opacity: 1; }

.video-bg video,
.video-bg .video-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(1.06);
  display: block;
}

.video-bg .video-poster {
  background-size: cover;
  background-position: center;
}

/* затемнение + виньетка, чтобы текст читался поверх любого кадра */
.video-scrim {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 90% at 50% 0%, transparent 0%, rgba(6, 5, 10, 0.55) 70%),
    linear-gradient(180deg, rgba(6, 5, 10, 0.55) 0%, rgba(6, 5, 10, 0.2) 35%, rgba(6, 5, 10, 0.92) 100%);
}

/* когда клип включён — родной фон приглушаем, чтобы не мешал */
body.has-video .bg-fx { opacity: 0.35; }
body.has-video .bg-orb { opacity: 0.22; }

body.has-video .card,
body.has-video .track-row {
  background: rgba(10, 8, 14, 0.62);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

/* кнопка звука клипа */
.clip-sound {
  position: fixed;
  right: 18px;
  bottom: calc(96px + env(safe-area-inset-bottom));
  z-index: 60;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(10, 8, 14, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: var(--muted);
  font-family: var(--font);
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
  transition: 0.18s ease;
}

.clip-sound:hover { color: var(--ink); border-color: var(--line-gold); }
.clip-sound.on { color: #14060a; background: linear-gradient(135deg, var(--gold-2), var(--gold)); border-color: transparent; }
.clip-sound i { font-style: normal; font-size: 15px; }

@media (min-width: 1041px) {
  .clip-sound { bottom: 22px; }
}

@media (max-width: 680px) {
  .clip-sound { right: 12px; padding: 0 13px; font-size: 12px; }
  .clip-sound span { display: none; }
}






/* =====================  ЗАСЛОНКА ПОДПИСКИ  ===================== */

body.gated { overflow: hidden; }

.gate {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(4, 3, 7, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  animation: gateIn 0.28s ease both;
}

@keyframes gateIn { from { opacity: 0; } to { opacity: 1; } }

.gate-card {
  width: min(100%, 420px);
  padding: 30px 26px 24px;
  border-radius: var(--r-lg);
  border: 1px solid var(--line-gold);
  text-align: center;
  background:
    radial-gradient(120% 100% at 50% 0%, rgba(168, 18, 28, 0.22) 0%, transparent 62%),
    radial-gradient(100% 100% at 100% 100%, rgba(139, 61, 255, 0.16) 0%, transparent 60%),
    #0b090e;
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.7);
}

.gate-ico {
  width: 62px;
  height: 62px;
  margin: 0 auto 16px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 26px;
  color: #1a0d04;
  background: linear-gradient(135deg, var(--gold-2), var(--gold));
  box-shadow: 0 12px 30px rgba(229, 189, 122, 0.26);
}

.gate-card h3 { font-family: var(--display); font-size: 21px; margin: 0 0 9px; }
.gate-card p { color: var(--muted); font-size: 13.5px; margin: 0 0 20px; }
.gate-card .btn-ghost, .gate-card .btn-sm { margin-top: 9px; }

/* =====================  ОНЛАЙН И ПОДВАЛ  ===================== */

.online-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 42px;
  padding: 0 13px;
  border-radius: 999px;
  border: 1px solid rgba(46, 196, 137, 0.32);
  background: rgba(46, 196, 137, 0.08);
  color: #2ec489;
  font-family: var(--font);
  font-weight: 800;
  font-size: 12.5px;
  flex: 0 0 auto;
}

.online-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #2ec489;
  box-shadow: 0 0 0 0 rgba(46, 196, 137, 0.6);
  animation: onlinePulse 2.2s ease-out infinite;
}

@keyframes onlinePulse {
  0% { box-shadow: 0 0 0 0 rgba(46, 196, 137, 0.55); }
  70% { box-shadow: 0 0 0 7px rgba(46, 196, 137, 0); }
  100% { box-shadow: 0 0 0 0 rgba(46, 196, 137, 0); }
}

@media (max-width: 760px) {
  .online-chip { height: 38px; padding: 0 10px; }
}

.footer-side {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
  /* иначе ряд соцсетей вытягивается и сплющивает текст слева */
  max-width: 560px;
}
.footer-links { display: flex; gap: 8px; flex-wrap: wrap; }

.footer-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-family: var(--display);
  font-weight: 700;
  font-size: 11.5px;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: 0.18s ease;
}

.footer-link:hover { color: var(--ink); border-color: var(--line-gold); background: rgba(229, 189, 122, 0.08); }
.footer-link i { font-style: normal; font-size: 13px; color: var(--gold-2); display: inline-flex; }
.footer-link i svg { display: block; }

/* На узком экране кнопки подвала встают по центру */
@media (max-width: 720px) {
  .footer-side { justify-content: center; }
  .footer-links { justify-content: center; gap: 8px; }
}

/* --- плитки разделов --- */

.tile.soon { cursor: default; opacity: 0.72; }
.tile.soon:hover { transform: none; border-color: var(--line); }

.soon-badge {
  display: inline-block;
  margin-left: 8px;
  vertical-align: middle;
  font-family: var(--font);
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 7px;
  border-radius: 999px;
  color: var(--violet-2);
  border: 1px solid rgba(139, 61, 255, 0.4);
  background: rgba(139, 61, 255, 0.12);
}

.tile-icon { display: inline-grid; place-items: center; color: var(--gold-2); }

/* =====================  FROLOV MONEY  ===================== */

.need-line {
  margin: 4px 0 10px;
  font-size: 12.5px;
  color: var(--muted);
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px dashed var(--line);
  background: rgba(255, 255, 255, 0.02);
}

.perk-box.frozen { border-color: rgba(94, 160, 255, 0.4); background: rgba(94, 160, 255, 0.08); }

/* --- карточка уровня --- */

.level-card {
  padding: 14px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
  transition: 0.2s ease;
}

.level-card.reached { border-color: rgba(229, 189, 122, 0.28); }

.level-card.current {
  border-color: var(--line-gold);
  background: linear-gradient(135deg, rgba(229, 189, 122, 0.1), rgba(139, 61, 255, 0.06));
  box-shadow: 0 0 0 1px rgba(229, 189, 122, 0.14);
}

.level-head { display: flex; align-items: flex-start; gap: 11px; }
.level-head b { display: block; font-size: 14.5px; line-height: 1.3; }
.level-head small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 3px; }

.lvl-title { color: var(--gold-2); font-weight: 700; }

.lvl-invite {
  flex: 0 0 auto;
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 999px;
  color: var(--violet-2);
  border: 1px solid rgba(139, 61, 255, 0.4);
  background: rgba(139, 61, 255, 0.12);
}

.level-req {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 11px 0 0 31px;
}

.level-req span {
  font-size: 11px;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  background: rgba(0, 0, 0, 0.25);
}

.level-req span.gold { color: var(--gold-2); border-color: var(--line-gold); }

.level-benefits {
  margin: 11px 0 0 31px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 5px;
}

.level-benefits li {
  position: relative;
  padding-left: 15px;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.45;
}

.level-benefits li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 7px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold);
  opacity: 0.6;
}

/* --- закреплённые призы --- */

.locked-row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 13px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
}

.locked-row.ready { border-color: rgba(46, 196, 137, 0.45); background: rgba(46, 196, 137, 0.07); }
.locked-row b { display: block; font-size: 13.5px; }
.locked-row small { display: block; color: var(--muted); font-size: 11.5px; margin-top: 2px; }

.lock-state {
  flex: 0 0 auto;
  font-size: 10.5px;
  padding: 4px 9px;
  border-radius: 999px;
  white-space: nowrap;
}

.lock-state.wait { color: var(--muted); border: 1px solid var(--line); }
.lock-state.ready { color: #2ec489; border: 1px solid rgba(46, 196, 137, 0.45); background: rgba(46, 196, 137, 0.1); }
.lock-state.done { color: var(--gold-2); border: 1px solid var(--line-gold); }

/* --- промокод и день рождения --- */

.code-row { display: flex; gap: 8px; margin-top: 10px; }

.code-row input {
  flex: 1;
  min-width: 0;
  height: 46px;
  padding: 0 14px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.3);
  color: var(--ink);
  font-family: var(--font);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.04em;
}

.code-row input:focus { outline: none; border-color: var(--line-gold); }
.code-row input:disabled { opacity: 0.6; }
.code-row .btn, .code-row .btn-ghost { flex: 0 0 auto; }

.bday-row { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.bday-row label { font-size: 12.5px; color: var(--muted); }

/* --- турниры --- */

.tr-card {
  padding: 15px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
}

.tr-card.locked { opacity: 0.55; }
.tr-head { display: flex; align-items: center; gap: 10px; justify-content: space-between; }
.tr-head b { font-size: 15px; }
.tr-card p { font-size: 13px; color: var(--muted); margin: 8px 0 0; }

.tr-prize {
  margin-top: 11px;
  font-size: 13px;
  font-weight: 700;
  color: var(--gold-2);
}

.tr-dates { display: block; margin-top: 6px; color: var(--muted); font-size: 11.5px; }
.tr-table { margin-top: 12px; display: grid; gap: 4px; }

.tr-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.25);
}

.tr-row b { min-width: 18px; color: var(--gold-2); }
.tr-row span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tr-row em { font-style: normal; color: var(--muted); }

/* =====================  ПЕРЕКЛЮЧАТЕЛЬ ЯЗЫКА  ===================== */

.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 42px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-family: var(--font);
  font-weight: 800;
  font-size: 12.5px;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: 0.18s ease;
  flex: 0 0 auto;
}

.lang-btn:hover {
  color: var(--ink);
  border-color: var(--line-gold);
  background: rgba(229, 189, 122, 0.08);
}

.lang-flag { display: inline-flex; line-height: 0; border-radius: 3px; overflow: hidden; }
.lang-flag svg { display: block; }

@media (max-width: 900px) {
  .lang-code { display: none; }
  .lang-btn { padding: 0 10px; }
}

/* =====================  ПЛАСТИНКА И ПЛЕЕР  ===================== */

.player-card { display: grid; gap: 18px; }

.vinyl-wrap {
  position: relative;
  display: grid;
  place-items: center;
  padding: 10px 0 4px;
}

.vinyl {
  position: relative;
  width: min(230px, 62vw);
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, #171319 0 32%, #0c0a0e 32.5% 100%),
    #0b090d;
  box-shadow:
    0 22px 50px rgba(0, 0, 0, 0.62),
    0 0 0 1px rgba(229, 189, 122, 0.22),
    inset 0 0 40px rgba(0, 0, 0, 0.8);
  animation: vinylSpin var(--vinyl-spin, 8s) linear infinite;
  animation-play-state: paused;
}

.vinyl.spinning { animation-play-state: running; }

/* дорожки пластинки */
.vinyl-grooves {
  position: absolute;
  inset: 4%;
  border-radius: 50%;
  background: repeating-radial-gradient(
    circle at 50% 50%,
    rgba(255, 255, 255, 0.055) 0 1px,
    transparent 1px 5px
  );
  mask: radial-gradient(circle at 50% 50%, transparent 0 33%, #000 34% 100%);
  -webkit-mask: radial-gradient(circle at 50% 50%, transparent 0 33%, #000 34% 100%);
}

.vinyl-label {
  position: absolute;
  inset: 33%;
  border-radius: 50%;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: linear-gradient(140deg, var(--crimson), #4a0a10 55%, var(--gold-2));
  border: 1px solid rgba(0, 0, 0, 0.5);
  box-shadow: inset 0 0 18px rgba(0, 0, 0, 0.5);
}

.vinyl-label img { width: 100%; height: 100%; object-fit: cover; display: block; }

.vinyl-label span {
  font-family: var(--display);
  font-size: 13px;
  letter-spacing: 0.14em;
  color: #1a0d04;
}

.vinyl-hole {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 7%;
  height: 7%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: #050406;
  box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.08);
}

/* неподвижный блик поверх — пластинка под ним «вращается» */
.vinyl-shine {
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: 50%;
  background: conic-gradient(
    from 200deg at 50% 50%,
    transparent 0deg,
    rgba(255, 255, 255, 0.07) 24deg,
    transparent 60deg,
    transparent 180deg,
    rgba(255, 255, 255, 0.05) 208deg,
    transparent 250deg
  );
  mask: radial-gradient(circle at 50% 50%, transparent 0 33%, #000 34% 99%, transparent 100%);
  -webkit-mask: radial-gradient(circle at 50% 50%, transparent 0 33%, #000 34% 99%, transparent 100%);
}

@keyframes vinylSpin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .vinyl { animation: none; }
}

/* --- сам плеер --- */

.player { display: grid; gap: 12px; }

.player-head b {
  display: block;
  font-size: 16px;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-head small { color: var(--muted); font-size: 12.5px; }

.player-seek { display: grid; gap: 5px; }

.player-time {
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.player input[type='range'] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  outline: none;
  cursor: pointer;
}

.player input[type='range']::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-2), var(--gold));
  border: none;
  box-shadow: 0 0 0 3px rgba(229, 189, 122, 0.18);
}

.player input[type='range']::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border: none;
  border-radius: 50%;
  background: var(--gold);
}

.player-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pl-btn {
  display: grid;
  place-items: center;
  min-width: 40px;
  height: 40px;
  padding: 0 8px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--ink);
  font-size: 11px;
  letter-spacing: -0.05em;
  cursor: pointer;
  transition: 0.16s ease;
}

.pl-btn:hover { border-color: var(--line-gold); color: var(--gold); }

.pl-btn.main {
  min-width: 52px;
  height: 52px;
  border-radius: 50%;
  font-size: 17px;
  color: #1a0d04;
  border: none;
  background: linear-gradient(135deg, var(--gold-2), var(--gold));
  box-shadow: 0 10px 26px rgba(229, 189, 122, 0.24);
}

.pl-btn.main:hover { color: #1a0d04; filter: brightness(1.06); }

.player-vol {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-left: auto;
  min-width: 96px;
}

.vol-ico { font-size: 13px; opacity: 0.7; }

/* строка трека, который сейчас играет */
.track-row.playing {
  border-color: var(--line-gold);
  background: rgba(229, 189, 122, 0.07);
}

.track-row.playing .track-play { background: linear-gradient(135deg, var(--gold-2), var(--gold)); color: #1a0d04; }

@media (max-width: 680px) {
  .player-vol { display: none; }
}

/* =====================  ФЛАГ КЛУБА  ===================== */

.flag-block {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 28px;
  align-items: center;
  padding: 26px;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background:
    radial-gradient(120% 140% at 12% 0%, rgba(168, 18, 28, 0.16) 0%, transparent 62%),
    radial-gradient(100% 120% at 100% 100%, rgba(139, 61, 255, 0.14) 0%, transparent 60%),
    rgba(255, 255, 255, 0.02);
}

.flag-shot {
  position: relative;
  border-radius: var(--r-md);
  overflow: hidden;
  border: 1px solid var(--line-gold);
  background: #050406;
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.55);
}

.flag-shot::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(105deg, transparent 42%, rgba(255, 255, 255, 0.07) 50%, transparent 58%);
}

.flag-shot img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
}

.flag-copy h2 {
  font-family: var(--display);
  font-size: clamp(24px, 3.4vw, 38px);
  line-height: 1.08;
  margin: 12px 0 10px;
}

.flag-copy p { color: var(--muted); margin: 0 0 18px; }

@media (max-width: 900px) {
  .flag-block { grid-template-columns: 1fr; padding: 16px; gap: 18px; }
}

/* =====================  ПЛОЩАДКИ  ===================== */

.platform-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 14px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.028);
  color: var(--ink);
  font-family: var(--font);
  font-weight: 700;
  font-size: 13.5px;
  text-align: left;
  cursor: pointer;
  transition: 0.18s ease;
}

.platform-btn:hover {
  border-color: var(--line-gold);
  background: rgba(229, 189, 122, 0.08);
  transform: translateY(-1px);
}

.platform-ico {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.35);
  color: var(--gold-2);
}

.platform-btn:hover .platform-ico { background: rgba(139, 61, 255, 0.16); }

/* =====================  КЛИП ЦЕЛИКОМ  ===================== */

.play-dot {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin-right: 9px;
  border-radius: 50%;
  font-size: 10px;
  line-height: 1;
  padding-left: 2px;
  background: rgba(0, 0, 0, 0.28);
  color: inherit;
}

.theater {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 26px;
  background: rgba(4, 3, 7, 0.88);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.theater.open { display: flex; animation: theaterIn 0.25s ease both; }

@keyframes theaterIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.theater-box {
  position: relative;
  width: min(100%, 1020px);
  max-height: 100%;
  border-radius: var(--r-md);
  overflow: hidden;
  border: 1px solid var(--line-gold);
  background: #000;
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(139, 61, 255, 0.18);
}

.theater-box video {
  display: block;
  width: 100%;
  max-height: calc(100vh - 120px);
  background: #000;
  outline: none;
}

.theater-close {
  position: absolute;
  top: calc(14px + env(safe-area-inset-top));
  right: 16px;
  z-index: 2;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(12, 10, 16, 0.85);
  color: var(--ink);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  transition: 0.18s ease;
}

.theater-close:hover { border-color: var(--line-gold); color: var(--gold); transform: rotate(90deg); }

@media (max-width: 680px) {
  .theater { padding: 12px; }
  .theater-box video { max-height: calc(100vh - 90px); }
}

/* ==========================  МУЗЫКА  ========================== */

.eq { display: flex; align-items: flex-end; gap: 8px; height: 180px; padding: 20px; border-radius: var(--r-md); background: rgba(0, 0, 0, 0.3); border: 1px solid var(--line); overflow: hidden; }

.eq i {
  flex: 1;
  min-width: 8px;
  border-radius: 999px 999px 6px 6px;
  background: linear-gradient(180deg, var(--gold-2), var(--crimson));
  animation: eq 1.4s ease-in-out infinite;
}

.eq i:nth-child(2) { animation-delay: 0.1s; }
.eq i:nth-child(3) { animation-delay: 0.2s; }
.eq i:nth-child(4) { animation-delay: 0.3s; }
.eq i:nth-child(5) { animation-delay: 0.4s; }
.eq i:nth-child(6) { animation-delay: 0.5s; }
.eq i:nth-child(7) { animation-delay: 0.6s; }
.eq i:nth-child(8) { animation-delay: 0.7s; }
.eq i:nth-child(9) { animation-delay: 0.8s; }
.eq i:nth-child(10) { animation-delay: 0.9s; }

@keyframes eq {
  0%, 100% { height: 22%; }
  50% { height: 100%; }
}

.track-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.035);
  transition: 0.18s ease;
}

.track-row:hover { border-color: var(--line-gold); transform: translateX(3px); }

.track-play {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  flex: none;
  background: linear-gradient(135deg, var(--gold-2), var(--gold));
  color: #1c0f03;
  font-size: 15px;
}

/* ==========================  ФУТЕР  ========================== */

.footer { padding: 30px 0 130px; }

.footer-inner {
  padding: 26px;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.028);
  display: grid;
  grid-template-columns: auto minmax(220px, 1fr) auto;
  gap: 20px;
  align-items: center;
}

.footer-inner p { margin: 0; color: var(--muted); line-height: 1.6; font-size: 14px; }
.footer-note { margin-top: 14px !important; font-size: 12px !important; color: var(--muted-2) !important; }

/* ==========================  НИЖНЕЕ МЕНЮ (мини-апп)  ========================== */

.tabbar-wrap {
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(12px + env(safe-area-inset-bottom));
  z-index: 80;
  pointer-events: none;
}

.tabbar {
  pointer-events: auto;
  display: grid;
  /* шесть пунктов: «Музыка» раньше в нижнее меню не попадала, и со
     страницы музыки не было понятно, где ты находишься */
  grid-template-columns: repeat(6, 1fr);
  gap: 3px;
  padding: 7px;
  border-radius: 26px;
  /* пилюля-подсветка лежит внутри и ездит между пунктами */
  position: relative;
  isolation: isolate;
  /**
   * Стекло, а не просто тёмная плашка: размытие с усилением цвета даёт
   * тот самый эффект «жидкого стекла» — сквозь панель видно, что под ней,
   * а верхняя кромка ловит свет.
   */
  background: linear-gradient(180deg, rgba(32, 25, 27, 0.72), rgba(9, 8, 9, 0.88));
  border: 1px solid rgba(255, 255, 255, 0.09);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55);
}

.tabbar a {
  min-height: 56px;
  border-radius: 18px;
  color: var(--muted-2);
  display: grid;
  place-items: center;
  gap: 3px;
  /* над пилюлей, иначе подсветка перекрыла бы иконку */
  position: relative;
  z-index: 1;
  transition: color 0.22s ease, transform 0.32s cubic-bezier(0.34, 1.4, 0.5, 1);
}

/* иконка чуть подпрыгивает под пальцем и на наведении */
.tabbar a i { transition: transform 0.32s cubic-bezier(0.34, 1.5, 0.5, 1); }
.tabbar a:hover { color: var(--ink); }
.tabbar a:hover i { transform: translateY(-2px) scale(1.12); }
.tabbar a:active { transform: scale(0.94); }

/**
 * Пилюля-подсветка. Она одна на всё меню и ПЕРЕТЕКАЕТ к нужному пункту,
 * а не зажигается на месте: при движении её слегка растягивает вдоль пути
 * и потом стягивает обратно — как каплю на стекле.
 */
.tab-pill {
  position: absolute;
  top: 7px;
  left: 0;
  height: calc(100% - 14px);
  width: 0;
  border-radius: 18px;
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  background: linear-gradient(180deg, rgba(229, 189, 122, 0.26), rgba(200, 32, 42, 0.14));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    inset 0 -1px 0 rgba(0, 0, 0, 0.25),
    0 6px 18px rgba(229, 189, 122, 0.16);
  transition:
    transform 0.52s cubic-bezier(0.22, 1.12, 0.36, 1),
    width 0.52s cubic-bezier(0.22, 1.12, 0.36, 1),
    opacity 0.25s ease;
}

.tab-pill.on { opacity: 1; }

/* растяжение в момент перелёта — то самое «жидкое» ощущение */
.tab-pill.flow { transform-origin: center; }

/* блик, бегущий по пилюле при перелёте */
.tab-pill::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 246, 234, 0.3) 50%, transparent 65%);
  opacity: 0;
}

.tab-pill.flow::after { animation: tabSheen 0.6s ease-out; }

@keyframes tabSheen {
  from { opacity: 0.9; transform: translateX(-60%); }
  to { opacity: 0; transform: translateX(60%); }
}

.tabbar a i { font-style: normal; font-size: 19px; line-height: 1; }
/* подпись была 9–10 px — мельче, чем читаемо; подняли до 11 */
.tabbar a small { font-size: 11px; font-weight: 800; letter-spacing: -0.01em; }

/* на узких телефонах шесть подписей в ряд не помещаются словами целиком */
@media (max-width: 400px) {
  .tabbar { gap: 2px; padding: 6px; }
  .tabbar a { min-height: 54px; border-radius: 15px; }
  .tabbar a small { font-size: 10px; }
}
.tabbar a.active { color: var(--ink); }
.tabbar a.active i { transform: translateY(-1px); }

/* кому анимация мешает — пилюля просто стоит на активном пункте */
@media (prefers-reduced-motion: reduce) {
  .tab-pill { transition: opacity 0.2s ease; }
  .tab-pill.flow::after { animation: none; }
  .tabbar a, .tabbar a i { transition: none; }
}

/* ==========================  МОДАЛКИ  ========================== */

.modal {
  position: fixed;
  inset: 0;
  z-index: 130;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.modal.open { display: flex; animation: fade 0.22s ease; }

@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.modal-card {
  width: min(460px, 100%);
  padding: 26px;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: radial-gradient(circle at 80% 5%, rgba(229, 189, 122, 0.14), transparent 34%), linear-gradient(180deg, #170a0b, #090809);
  box-shadow: var(--shadow);
  animation: pop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  max-height: 90vh;
  overflow-y: auto;
}

@keyframes pop { from { transform: scale(0.9) translateY(14px); opacity: 0; } to { transform: none; opacity: 1; } }

.modal-card h3 { font-size: 28px; margin: 12px 0 12px; }
.modal-card p { color: var(--muted); line-height: 1.65; margin: 0 0 14px; }

.modal-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; }

.close-btn {
  width: 42px;
  height: 42px;
  flex: none;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink);
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
}

.modal-actions { display: grid; gap: 10px; margin-top: 18px; }

.prize-visual {
  margin: 6px 0 18px;
  padding: 30px 20px;
  border-radius: var(--r-md);
  text-align: center;
  background: radial-gradient(circle at 50% 30%, rgba(229, 189, 122, 0.25), transparent 65%), rgba(0, 0, 0, 0.3);
  border: 1px solid var(--line-gold);
}

.prize-visual .big {
  font-family: var(--display);
  font-size: clamp(30px, 6vw, 46px);
  letter-spacing: -0.04em;
  color: var(--gold-2);
  text-shadow: 0 0 40px rgba(229, 189, 122, 0.4);
}

/* ==========================  ТОСТ  ========================== */

.toast {
  position: fixed;
  left: 50%;
  bottom: 104px;
  transform: translateX(-50%) translateY(24px);
  z-index: 200;
  padding: 14px 20px;
  border-radius: 999px;
  color: #1c0f03;
  background: linear-gradient(135deg, var(--gold-2), var(--gold));
  font-weight: 800;
  opacity: 0;
  pointer-events: none;
  transition: 0.24s ease;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.5);
  max-width: calc(100% - 32px);
  text-align: center;
}

.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.err { background: linear-gradient(135deg, #ff8a8f, var(--crimson)); color: #fff; }
.toast.ok { background: linear-gradient(135deg, #d3ffe8, var(--neon)); color: #04170e; }

/* ==========================  ФОРМЫ  ========================== */

.field { margin-bottom: 14px; }
.field label { display: block; margin-bottom: 7px; font-size: 12px; font-weight: 800; color: var(--muted); letter-spacing: 0.08em; text-transform: uppercase; }

.field input,
.field textarea,
.field select {
  width: 100%;
  min-height: 48px;
  padding: 12px 15px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.32);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  outline: none;
  transition: 0.18s ease;
}

.field textarea { min-height: 100px; resize: vertical; line-height: 1.6; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(229, 189, 122, 0.14); }
.field .hint { margin-top: 6px; font-size: 12px; color: var(--muted-2); line-height: 1.5; }

/* ==========================  СКЕЛЕТОН  ========================== */

.skeleton {
  border-radius: var(--r-md);
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.04));
  background-size: 200% 100%;
  animation: sk 1.3s linear infinite;
  min-height: 120px;
}

@keyframes sk { from { background-position: 200% 0; } to { background-position: -200% 0; } }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ==========================  АДАПТИВ  ========================== */

/* на десктопе нижнее меню не нужно — есть верхняя навигация */
@media (min-width: 1041px) {
  .tabbar-wrap { display: none; }
  .footer { padding-bottom: 40px; }
}

@media (max-width: 1040px) {
  .hero-grid, .wheel-layout, .g2, .g3, .g4 { grid-template-columns: 1fr; }
  .hero-copy { min-height: auto; }
  .hero-visual { min-height: 520px; }
  .tiles, .partner-grid { grid-template-columns: repeat(2, 1fr); }
  .nav { display: none; }
  .stat-strip { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr; text-align: center; justify-items: center; }
}

@media (max-width: 680px) {
  :root { --nav-h: 68px; --r-lg: 24px; --r-md: 18px; }
  .wrap { width: calc(100% - 24px); }
  .hero-copy { padding: 22px; }
  .hero-title { font-size: 42px; }
  .hero-text { font-size: 15px; }
  .promo-row { grid-template-columns: 1fr; }
  .hero-visual { min-height: 440px; }
  .slide { min-height: 420px; padding: 22px; }
  .tiles, .partner-grid, .stat-strip { grid-template-columns: 1fr; }
  .mini-stats, .prize-chips { grid-template-columns: repeat(2, 1fr); }
  .wheel-stage { padding: 18px 14px 22px; }
  .sound-btn { top: 12px; right: 12px; width: 38px; height: 38px; }
  .search-panel { position: fixed; top: calc(var(--nav-h) + 8px); left: 12px; right: 12px; width: auto; }
  .task { grid-template-columns: auto 1fr; }
  .task > .task-action { grid-column: 1 / -1; }
  .task-action .btn, .task-action .btn-ghost, .task-action .btn-sm { width: 100%; }
  .brand-sub { display: none; }
  .section { padding: 26px 0; }
  .page-head { padding: 26px 0 4px; }
  .tabbar a small { font-size: 9px; }
  .footer { padding-bottom: 140px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

.hint.ok { color: #2ec489; }
.hint.warn { color: #e5bd7a; }

.track-row.external .track-play {
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  font-size: 15px;
}

.track-row.external:hover .track-play { color: var(--gold-2); }

/* =====================  РЕГИСТРАЦИИ У ПАРТНЁРОВ  ===================== */

.reg-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 14px 16px;
  margin-bottom: 14px;
  border-radius: var(--r-md);
  border: 1px solid var(--line-gold);
  background: linear-gradient(135deg, rgba(229, 189, 122, 0.08), rgba(139, 61, 255, 0.05));
}

.reg-bar b { display: block; font-size: 14.5px; }
.reg-bar small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 3px; }

.reg-stats { display: flex; gap: 8px; flex-wrap: wrap; }

.reg-stats span {
  font-size: 11.5px;
  color: var(--muted);
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.28);
}

.reg-stats b { display: inline; color: var(--gold-2); font-size: 13px; }

.reg-row {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
}

.reg-row small { color: var(--muted); font-size: 11.5px; }
.reg-row.done small { color: #2ec489; }

.reg-btn {
  width: 100%;
  border-color: rgba(46, 196, 137, 0.45);
  color: #2ec489;
  /* длинный текст награды («… +15 000 frolcoin, +1 спин») переносим, а не
     обрезаем — кнопка подрастает по высоте, но всё читается целиком */
  height: auto;
  min-height: 40px;
  padding: 9px 14px;
  white-space: normal;
  line-height: 1.35;
  text-align: center;
}

.reg-btn:hover { background: rgba(46, 196, 137, 0.12); color: #2ec489; }

/* плашки в карточках и на кнопках — единый шрифт с шапкой */
.badge-corner,
.lvl-invite,
.soon-badge,
.prize-out,
.lock-state { font-family: var(--display); font-weight: 700; }

/* =====================  БЮДЖЕТ ПРОЕКТА  ===================== */

.budget-box {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 20px;
  padding: 18px 20px;
  border-radius: var(--r-md);
  border: 1px solid var(--line-gold);
  background:
    radial-gradient(120% 160% at 0% 0%, rgba(229, 189, 122, 0.14) 0%, transparent 60%),
    rgba(0, 0, 0, 0.3);
}

.budget-ico {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  border-radius: 14px;
  color: #1a0d04;
  background: linear-gradient(135deg, var(--gold-2), var(--gold));
  box-shadow: 0 10px 24px rgba(229, 189, 122, 0.22);
}

.budget-box b {
  display: block;
  font-family: var(--display);
  font-size: clamp(22px, 4vw, 30px);
  letter-spacing: -0.04em;
  line-height: 1.05;
}

.budget-box small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12.5px;
}

.handout-note:empty { display: none; }

.handout-note {
  margin: 10px 0 0;
  padding: 9px 12px;
  border-radius: 10px;
  font-size: 12.5px;
  color: var(--gold-2);
  border: 1px dashed var(--line-gold);
  background: rgba(229, 189, 122, 0.07);
}

/* серия ежедневных заходов: семь точек по дням недели */
.streak-row {
  display: flex;
  gap: 6px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.streak-dot {
  flex: 1 1 0;
  min-width: 30px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .03);
  color: var(--muted-2);
  font-family: var(--display);
  font-size: 13px;
}

.streak-dot.on {
  border-color: var(--line-gold);
  background: linear-gradient(135deg, rgba(240, 185, 96, .22), rgba(240, 185, 96, .08));
  color: var(--gold-2);
}

/* форма отправки нарезок */
.fields-2 {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: 12px;
}

.reward-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

@media (max-width: 620px) {
  .fields-2 { grid-template-columns: 1fr; }
}

/* фон карточки раздела: картинка грузится в админке */
.tile.has-bg {
  background-size: cover;
  background-position: center;
  border-color: rgba(255, 255, 255, .12);
}

/* затемняющая подложка — без неё текст теряется на светлом кадре */
.tile.has-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(6, 5, 6, .48) 0%, rgba(6, 5, 6, .78) 62%, rgba(6, 5, 6, .92) 100%);
  z-index: 0;
}

.tile.has-bg > *,
.tile.has-bg .tile-arrow { position: relative; z-index: 1; }

.tile.has-bg h3,
.tile.has-bg p { text-shadow: 0 1px 12px rgba(0, 0, 0, .55); }

/* видео на фоне первого экрана */
.hero { position: relative; }

.hero-video {
  position: absolute;
  inset: -80px 0 auto 0;
  height: calc(100% + 80px);
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
  background-size: cover;
  background-position: center;
}

.hero-video video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  /* лёгкая приглушённость, чтобы кадр не спорил с золотом интерфейса */
  filter: saturate(.92) contrast(1.02);
}

.hero-video-veil {
  position: absolute;
  inset: 0;
  display: block;
  background: linear-gradient(180deg, rgba(6, 5, 6, .5) 0%, rgba(6, 5, 6, .62) 55%, var(--bg) 100%);
}

/* карточки первого экрана должны читаться поверх ролика */
.hero .wrap { position: relative; z-index: 1; }

@media (max-width: 760px) {
  .hero-video { inset: -60px 0 auto 0; height: calc(100% + 60px); }
  /* на телефоне панель поверх видео плотнее: текста много, кадр мешает */
  .hero-video-veil { background: linear-gradient(180deg, rgba(6, 5, 6, .58) 0%, rgba(6, 5, 6, .72) 45%, var(--bg) 100%); }
}

/* когда включён видеофон — панель героя пропускает кадр сквозь себя */
.hero.with-video .hero-copy {
  background:
    radial-gradient(circle at 88% 10%, rgba(229, 189, 122, .14), transparent 28%),
    linear-gradient(150deg, rgba(10, 8, 10, .62), rgba(10, 8, 10, .74));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-color: rgba(255, 255, 255, .12);
}

.hero.with-video .hero-visual { box-shadow: 0 24px 60px rgba(0, 0, 0, .55); }

/* на телефоне карточка занимает весь экран — делаем её легче,
   иначе ролик видно только узкой полосой сверху */
@media (max-width: 760px) {
  .hero.with-video .hero-copy {
    background:
      radial-gradient(circle at 88% 8%, rgba(229, 189, 122, .12), transparent 30%),
      linear-gradient(160deg, rgba(10, 8, 10, .52), rgba(10, 8, 10, .68));
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
  }

  /* внутренние карточки тоже прозрачнее, чтобы кадр читался насквозь */
  .hero.with-video .promo-card { background: rgba(10, 8, 10, .42); }
}

/* ================= личный кабинет: ровная сетка ================== */

/* две равные колонки, карточки одной высоты — без рваных дыр */
.cab-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
}

/* без этого длинная ссылка внутри распирает колонку шире экрана */
.cab-grid > * { min-width: 0; }

.cab-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-width: 0;
}

.cab-card > * { min-width: 0; }

/* подпись под заголовком карточки — везде одинаковая */
.cab-lead {
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.6;
  margin: -4px 0 14px;
}

/* шапка профиля */
.cab-top {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.cab-ava {
  width: 74px;
  height: 74px;
  border-radius: 24px;
  object-fit: cover;
  flex: none;
}

.cab-ava.letter {
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-size: 28px;
  color: #1a0d04;
  background: linear-gradient(135deg, var(--gold), var(--crimson));
}

.cab-who { flex: 1 1 200px; min-width: 0; }
.cab-who h3 {
  font-size: 24px;
  margin: 0;
  /* длинный @username — обычное дело в Telegram. Без переноса он растягивал
     страницу шире экрана, и нижнее меню уезжало за край: до «Кабинета»
     было физически не дотянуться */
  overflow-wrap: anywhere;
  word-break: break-word;
}

.cab-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.cab-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* два кошелька: SF и frolcoin */
.wallets {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0;
}

.wallet {
  padding: 16px 18px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .03);
  min-width: 0;
}

.wallet-top {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.wallet-top small { color: var(--muted-2); font-size: 11.5px; }

.wallet b {
  display: block;
  font-family: var(--display);
  font-size: clamp(26px, 6vw, 38px);
  letter-spacing: -.05em;
  line-height: 1;
}

.wallet p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.55;
}

.wallet.sf {
  border-color: var(--line-gold);
  background: linear-gradient(150deg, rgba(229, 189, 122, .12), rgba(229, 189, 122, .03));
}
.wallet.sf b { color: var(--gold-2); }

.wallet.coin {
  border-color: rgba(139, 61, 255, .32);
  background: linear-gradient(150deg, rgba(139, 61, 255, .14), rgba(139, 61, 255, .03));
}
.wallet.coin b { color: var(--violet-2); }

.cab-progress { margin-bottom: 16px; }
.cab-progress-line { font-size: 14px; margin: 10px 0 0; }

.level-bar.big { height: 10px; }

.cab-foot {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

/* откуда берутся frolcoin */
.ways { display: grid; gap: 6px; margin-bottom: 16px; }

.way {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .025);
  font-size: 13px;
}

.way span { color: var(--muted); min-width: 0; }
.way b { font-family: var(--display); color: var(--violet-2); white-space: nowrap; }

/* скриншот к заявке */
.proof-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.proof-preview {
  width: 86px;
  height: 60px;
  flex: none;
  border-radius: 12px;
  border: 1px dashed var(--line);
  background: rgba(0, 0, 0, .3);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.proof-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* список своих заявок */
.claim-list { display: grid; gap: 8px; margin-top: 14px; }
.claim-list:empty { display: none; }

/* кнопки в карточке прижимаем к низу, чтобы соседи совпали по высоте */
.cab-card .btn-block { margin-top: auto; }
.cab-card .need-line { margin-top: 10px; }

@media (max-width: 760px) {
  .cab-grid { grid-template-columns: 1fr; }
  .wallets { grid-template-columns: 1fr; }
  .cab-actions { width: 100%; }
  .cab-actions > * { flex: 1 1 0; text-align: center; }
  .cab-top { gap: 12px; }
  .cab-ava { width: 60px; height: 60px; border-radius: 20px; }
  .cab-who h3 { font-size: 20px; }
}

/* шесть показателей в профиле: три в ряд, чтобы не было хвоста из двух */
.mini-stats.six { grid-template-columns: repeat(3, minmax(0, 1fr)); }

@media (max-width: 560px) {
  .mini-stats, .mini-stats.six { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* атрибут hidden должен побеждать display у кнопок и плашек */
[hidden] { display: none !important; }

/* ============ окно промокода с видеоинструкцией ============ */

.promo-modal { max-width: 420px; text-align: center; position: relative; }

/* крестик в угол, а не по центру шапки */
.promo-modal > .close-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
}

/* шапка окна промокода: слева логотип партнёра, справа сам код.
   Текст в окне по центру, но здесь — по левому краю: иначе строка
   ломается вокруг логотипа и выглядит криво. */
.promo-head {
  display: flex;
  align-items: center;
  gap: 13px;
  margin: 2px 44px 16px 0;
  text-align: left;
}

.promo-head > div { min-width: 0; flex: 1; }
.promo-head .promo-done { margin: 3px 0 0; }

/* ----------------------------- кейсы ----------------------------- */
.case-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  margin-top: 4px;
}

.case-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  position: relative;
  overflow: hidden;
}

/* тонкая полоса цвета кейса сверху — бронза, золото и так далее */
.case-card::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: var(--accent, var(--gold));
}

.case-top { display: flex; align-items: center; gap: 12px; }
.case-top b { display: block; font-family: var(--display); font-size: 15px; }
.case-top small { display: block; color: var(--muted); font-size: 12.5px; line-height: 1.5; margin-top: 3px; }

.case-mark {
  width: 46px;
  height: 46px;
  flex: none;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 20px;
  color: #0a0708;
  background: var(--accent, var(--gold));
}

/* картинка кейса — без фона и тени под ней, по той же причине,
   что и у логотипов партнёров: кромка выглядела обводкой */
.case-img { width: 46px; height: 46px; flex: none; border-radius: 14px; object-fit: cover; display: block; }

.case-inside { display: flex; flex-wrap: wrap; gap: 6px; }

.case-chip {
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 700;
}

.case-card .need-line { margin: 0; }

/* ======================= ОТКРЫТИЕ КЕЙСА =========================
   Лента едет справа налево и тормозит на выпавшем призе, как в
   играх с кейсами: человек успевает увидеть, мимо чего пронесло.
   Приз всегда тот, что назвал сервер, — лента только показывает его.
   ================================================================ */

.case-modal { width: min(520px, 100%); }
.case-modal .modal-top { margin-bottom: 16px; }

.reel-box {
  position: relative;
  height: 128px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(0, 0, 0, 0.32));
  overflow: hidden;
  /* чтобы лента не «дёргала» страницу под собой на слабых телефонах */
  contain: paint;
}

.reel-track {
  display: flex;
  gap: 0;
  height: 100%;
  align-items: center;
  will-change: transform;
}

.reel-cell {
  width: 112px;
  flex: none;
  height: 104px;
  margin: 0 4px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(0, 0, 0, 0.25));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 6px;
  text-align: center;
}

.reel-cell i {
  font-style: normal;
  font-size: 22px;
  line-height: 1;
}

.reel-cell span {
  font-size: 11px;
  font-weight: 800;
  line-height: 1.25;
  color: var(--muted);
  /* длинные названия режем в две строки, а не растягиваем ячейку */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* редкость: чем крупнее приз, тем заметнее ячейка */
.reel-cell.r-dud   { opacity: 0.55; }
.reel-cell.r-spin  { border-color: rgba(79, 252, 166, 0.35); background: linear-gradient(180deg, rgba(79, 252, 166, 0.12), rgba(0, 0, 0, 0.3)); }
.reel-cell.r-spin span { color: var(--neon); }
.reel-cell.r-epic  { border-color: rgba(196, 139, 255, 0.4); background: linear-gradient(180deg, rgba(139, 61, 255, 0.2), rgba(0, 0, 0, 0.3)); }
.reel-cell.r-epic span { color: var(--violet-2); }
.reel-cell.r-legend {
  border-color: rgba(229, 189, 122, 0.55);
  background: linear-gradient(180deg, rgba(229, 189, 122, 0.24), rgba(0, 0, 0, 0.3));
}
.reel-cell.r-legend span { color: var(--gold-2); }

/* стрелка-указатель по центру: на неё и приезжает приз */
.reel-needle {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  margin-left: -1px;
  background: linear-gradient(180deg, transparent, var(--gold), transparent);
  box-shadow: 0 0 14px rgba(229, 189, 122, 0.8);
  pointer-events: none;
}

.reel-needle::before,
.reel-needle::after {
  content: '';
  position: absolute;
  left: 50%;
  margin-left: -6px;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
}

.reel-needle::before { top: 0; border-top: 8px solid var(--gold); }
.reel-needle::after { bottom: 0; border-bottom: 8px solid var(--gold); }

/* лента встала — полоса больше не нужна и только режет надпись на призе */
.reel-box.hit .reel-needle {
  opacity: 0.2;
  transition: opacity 0.5s ease 0.35s;
}

/* края подтуманиваем, чтобы ячейки не обрубались ровной линией */
.reel-edge {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 58px;
  pointer-events: none;
}

.reel-edge-l { left: 0; background: linear-gradient(90deg, #100a0b, transparent); }
.reel-edge-r { right: 0; background: linear-gradient(270deg, #100a0b, transparent); }

/* разгон до ответа сервера: лента просто едет, приз ещё неизвестен */
@keyframes reelIdle { from { transform: translateX(0); } to { transform: translateX(-1200px); } }
.reel-track.idle { animation: reelIdle 3.4s linear infinite; }

/* вспышка в момент остановки */
@keyframes reelFlash {
  0% { opacity: 0; }
  12% { opacity: 1; }
  100% { opacity: 0; }
}

.reel-box.hit::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 50% 50%, rgba(255, 246, 234, 0.95), rgba(229, 189, 122, 0.45) 30%, transparent 62%);
  animation: reelFlash 0.75s ease-out forwards;
}

/* выигравшая ячейка выдвигается вперёд и светится */
@keyframes cellPop {
  0% { transform: scale(1); }
  45% { transform: scale(1.16); }
  100% { transform: scale(1.09); }
}

.reel-cell.won {
  animation: cellPop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  box-shadow: 0 0 0 2px var(--gold), 0 10px 30px rgba(229, 189, 122, 0.45);
  z-index: 2;
}

.reel-cell.won span { color: var(--ink); }

/* искры: расходятся от центра ленты */
.spark {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  pointer-events: none;
  background: var(--gold-2);
  animation: sparkFly 0.85s ease-out forwards;
}

@keyframes sparkFly {
  from { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  to { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(0.2); opacity: 0; }
}

/* подпись под лентой: что именно выпало */
.case-win {
  margin-top: 16px;
  text-align: center;
  animation: pop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.case-win b {
  display: block;
  font-family: var(--display);
  font-size: clamp(20px, 5.4vw, 27px);
  line-height: 1.25;
  color: var(--gold-2);
}

.case-win small {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.55;
}

.case-win.dud b { color: var(--muted); }

@media (max-width: 420px) {
  .reel-box { height: 116px; }
  .reel-cell { width: 96px; height: 94px; }
  .reel-edge { width: 40px; }
}

/* кому анимация мешает — сразу показываем итог, без гонки ленты */
@media (prefers-reduced-motion: reduce) {
  .reel-track.idle { animation: none; }
  .reel-cell.won { animation: none; }
  .reel-box.hit::after { animation: none; opacity: 0; }
  .spark { display: none; }
}

/* свод правил в кабинете */
.rules-list {
  margin: 4px 0 0;
  padding: 0 0 0 22px;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.65;
}

.rules-list li { margin: 0 0 10px; }
.rules-list li:last-child { margin-bottom: 0; }
.rules-list li::marker { color: var(--gold-2); font-weight: 800; }

/* пошаговая инструкция там, где своего ролика нет */
.promo-steps {
  margin: 0 0 14px;
  padding: 14px 16px 14px 34px;
  text-align: left;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.65;
}

.promo-steps li { margin: 0 0 7px; }
.promo-steps li:last-child { margin-bottom: 0; }
.promo-steps b { color: var(--ink); }
.promo-steps b.gold { color: var(--gold-2); }

.promo-warn {
  margin: 0 0 14px;
  font-size: 12.5px;
  color: var(--muted-2);
}

/* имя партнёра над кодом — мелкой строкой, чтобы не спорило с самим кодом */
.promo-who {
  font-family: var(--display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin-bottom: 3px;
}

/* логотип партнёра в окнах — та же плитка, что на карточке */
.promo-logo {
  width: 54px;
  height: 54px;
  flex: none;
  border-radius: 16px;
  object-fit: cover;
  display: block;
  /* тени нет: на почти чёрном фоне она читалась не как объём,
     а как тёмный контур по краю логотипа */
}

/* в окне проверки регистрации логотип стоит рядом с заголовком */
.modal-who { display: flex; align-items: center; gap: 14px; min-width: 0; }
.modal-who > div { min-width: 0; }

@media (max-width: 420px) {
  .promo-logo { width: 46px; height: 46px; border-radius: 14px; }
  .promo-head { gap: 11px; margin-right: 40px; }
  .modal-who { gap: 11px; }
}

.promo-head h3 {
  font-size: clamp(20px, 5vw, 26px);
  line-height: 1.25;
  margin: 0;
}

/* сам код — заметной плашкой, как на витрине казино */
.promo-chip {
  display: inline-block;
  margin-left: 6px;
  padding: 4px 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--gold-2), var(--gold));
  color: #1c0f03;
  font-family: var(--display);
  font-size: .78em;
  letter-spacing: .04em;
  white-space: nowrap;
}

.promo-done {
  margin: 10px 0 0;
  font-family: var(--display);
  font-size: 15px;
  color: #4ffca6;
}

.promo-hint {
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.6;
  margin: 0 0 16px;
}

/* ролик: вертикальный, как съёмка с телефона */
.promo-video {
  border-radius: var(--r-md);
  overflow: hidden;
  border: 1px solid var(--line);
  background: #000;
  margin-bottom: 16px;
  max-height: 46vh;
  display: flex;
  justify-content: center;
  /* кнопка «включить звук» ложится поверх ролика */
  position: relative;
}

/**
 * Запасная кнопка звука. Появляется только если браузер отказался
 * запускать ролик со звуком сам — иначе человек смотрел бы озвученную
 * инструкцию молча и не понял, почему.
 */
.promo-unmute {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid var(--line-gold);
  background: rgba(9, 8, 9, 0.9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--gold-2);
  font: inherit;
  font-size: 13.5px;
  font-weight: 800;
  cursor: pointer;
  z-index: 2;
}

.promo-video video {
  width: 100%;
  max-width: 100%;
  max-height: 46vh;
  height: auto;
  display: block;
  object-fit: contain;
}

.promo-go { margin-top: 0; }

@media (max-width: 460px) {
  .promo-video, .promo-video video { max-height: 38vh; }
  .promo-head h3 { font-size: 19px; }
  .promo-chip { font-size: .8em; padding: 3px 11px; }
}

/* ======================  ФОКУС С КЛАВИАТУРЫ  ======================
   Правил :focus-visible не было ни одного: при ходьбе по Tab браузерная
   рамка на почти чёрном фоне не читалась, и понять, где ты находишься,
   было нельзя. Показываем только клавиатурный фокус — на нажатие мышью
   рамка не появляется и вид не портит.
   ================================================================== */

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 10px;
}

/* на золотых кнопках золотая рамка сливается — берём светлую */
.btn:focus-visible,
.btn-lead:focus-visible,
.btn-neon:focus-visible {
  outline-color: var(--ink);
}

/* в нижнем меню рамка должна лежать по форме кнопки */
.tabbar a:focus-visible { outline-offset: -2px; border-radius: 15px; }

/**
 * Условие задания. Появилось вместе с проверкой выполнения: раньше
 * награда падала по таймеру и объяснять было нечего, а теперь человек
 * должен видеть, чего именно от него ждут, до нажатия кнопки.
 */
.task-need {
  margin: 8px 0 0;
  padding: 7px 11px;
  border-radius: 10px;
  border: 1px dashed var(--line);
  background: rgba(255, 255, 255, 0.02);
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.5;
}

/* =========================================================================
   ЖИВЫЕ МЕЛОЧИ (assets/js/fx.js)
   Всё в этом блоке — украшение. Ни один элемент отсюда не несёт смысла и
   не ловит клики, поэтому при выключенной анимации блок гасится целиком
   и страница работает ровно так же.
   ========================================================================= */

/* --- полоса прочтения --- */
.fx-progress {
  position: fixed;
  z-index: 60;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--crimson), var(--gold) 45%, var(--gold-2));
  box-shadow: 0 0 14px rgba(229, 189, 122, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

/* --- кнопка «наверх» --- */
.fx-top {
  position: fixed;
  z-index: 55;
  right: 18px;
  bottom: calc(var(--nav-h) + 92px);
  width: 46px;
  height: 46px;
  border: 1px solid var(--line-gold);
  border-radius: 16px;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: var(--gold-2);
  font-size: 19px;
  background: linear-gradient(180deg, rgba(38, 30, 24, 0.9), rgba(10, 8, 9, 0.92));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.45);
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px) scale(0.85);
  transition: opacity 0.28s ease, transform 0.28s cubic-bezier(0.34, 1.5, 0.5, 1), visibility 0.28s;
}

.fx-top.on { opacity: 1; visibility: visible; transform: none; }
.fx-top:hover { color: #1c0f03; background: linear-gradient(135deg, var(--gold-2), var(--gold)); }
.fx-top span { display: block; transition: transform 0.22s ease; }
.fx-top:hover span { transform: translateY(-2px); }

@media (min-width: 1041px) { .fx-top { bottom: 26px; } }

/* --- волна от нажатия --- */
.fx-ripple {
  position: absolute;
  z-index: 0;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0) 65%);
  transform: scale(0);
  opacity: 0.75;
  animation: fxRipple 0.62s ease-out forwards;
}

@keyframes fxRipple {
  to { transform: scale(1); opacity: 0; }
}

/* --- наклон карточки и блик за курсором --- */
.fx-tilt {
  /* блик считается от самой карточки, поэтому ей нужна своя система координат */
  position: relative;
  overflow: hidden;
  transform-style: preserve-3d;
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.2s ease, box-shadow 0.25s ease;
}

/* блик рисуем фоном самого элемента поверх его собственного градиента,
   чтобы не добавлять внутрь карточек лишних узлов */
.fx-tilt::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: var(--fx-o, 0);
  transition: opacity 0.25s ease;
  background: radial-gradient(240px circle at var(--fx-x, 50%) var(--fx-y, 50%), rgba(255, 233, 190, 0.13), transparent 62%);
}

.fx-tilt:hover { border-color: var(--line-gold); box-shadow: 0 26px 60px rgba(0, 0, 0, 0.45); }

/* у плитки и кейса ::after уже занят картинкой-подложкой — там блик не нужен */
.tile.has-bg.fx-tilt::after { background: linear-gradient(180deg, rgba(6, 5, 6, 0.15), rgba(6, 5, 6, 0.72)); opacity: 1; }

/* --- салют --- */
.fx-burst {
  position: fixed;
  z-index: 120;
  width: 0;
  height: 0;
  pointer-events: none;
}

.fx-burst i {
  position: absolute;
  left: 0;
  top: 0;
  width: 8px;
  height: 8px;
  margin: -4px 0 0 -4px;
  border-radius: 2px;
  opacity: 0;
  animation: fxFly 1.05s cubic-bezier(0.18, 0.7, 0.3, 1) forwards;
}

@keyframes fxFly {
  0% { transform: translate(0, 0) rotate(0deg) scale(0.4); opacity: 1; }
  70% { opacity: 1; }
  100% { transform: translate(var(--dx), calc(var(--dy) + 90px)) rotate(var(--rot)) scale(0.9); opacity: 0; }
}

/* --- дождь из конфетти --- */
.fx-rain {
  position: fixed;
  z-index: 120;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.fx-rain i {
  position: absolute;
  top: -22px;
  width: 9px;
  height: 14px;
  border-radius: 2px;
  opacity: 0;
  animation: fxFall linear forwards;
}

@keyframes fxFall {
  0% { transform: translate(0, -20px) rotate(0deg); opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { transform: translate(var(--sway, 0), 105vh) rotate(680deg); opacity: 0; }
}

/* --- галочка вместо подписи на кнопке --- */
.fx-ok { position: relative; color: transparent !important; pointer-events: none; }
.fx-ok > * { opacity: 0; }

.fx-ok::before {
  content: '✓';
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  font-size: 19px;
  font-weight: 900;
  color: #1c0f03;
  animation: fxPop 0.32s cubic-bezier(0.34, 1.6, 0.5, 1);
}

.btn-ghost.fx-ok::before, .btn-dark.fx-ok::before { color: var(--neon); }

@keyframes fxPop {
  0% { transform: scale(0.3); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

/* --- свет за курсором на первом экране --- */
.hero-copy.fx-lit::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: var(--fx-o, 0);
  transition: opacity 0.35s ease;
  background: radial-gradient(420px circle at var(--fx-x, 50%) var(--fx-y, 50%), rgba(229, 189, 122, 0.11), transparent 60%);
}

.hero-copy.fx-lit > * { position: relative; z-index: 1; }

/* --- страница проявляется --- */
.fx-in body { opacity: 0; }
.fx-in.fx-ready body { opacity: 1; transition: opacity 0.22s ease; }

/* --- у кого выключена анимация, тому ничего из этого не показываем --- */
@media (prefers-reduced-motion: reduce) {
  .fx-progress, .fx-burst, .fx-rain { display: none; }
  .fx-top { transition: none; }
  .fx-in body, .fx-in.fx-ready body { opacity: 1; transition: none; }
}

/* --- карточки выезжают по очереди --- */
.fx-pop {
  animation: fxPopIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes fxPopIn {
  from { opacity: 0; transform: translateY(16px) scale(0.97); }
  to { opacity: 1; transform: none; }
}

/* --- вспышка на изменившемся числе --- */
.fx-flash { animation: fxFlash 0.85s ease-out; }

@keyframes fxFlash {
  0% { color: var(--gold-2); text-shadow: 0 0 18px rgba(255, 233, 190, 0.85); transform: scale(1.18); }
  45% { color: var(--gold-2); text-shadow: 0 0 10px rgba(255, 233, 190, 0.5); }
  100% { text-shadow: none; transform: none; }
}

/* --- перелив по промокоду: он главный на странице, пусть блестит --- */
.promo-code {
  background: linear-gradient(100deg, #fff3da 20%, #ffffff 34%, var(--gold) 48%, #fff3da 62%);
  background-size: 260% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: fxGold 5.5s ease-in-out infinite;
}

@keyframes fxGold {
  0%, 55% { background-position: 130% 0; }
  95%, 100% { background-position: -30% 0; }
}

/* --- иконка колеса на плитке крутится, когда на неё смотрят --- */
.tile:hover .tile-icon { transform: rotate(8deg) scale(1.08); }
.tile .tile-icon { transition: transform 0.4s cubic-bezier(0.34, 1.5, 0.5, 1); }

@media (prefers-reduced-motion: reduce) {
  .fx-pop, .fx-flash, .promo-code { animation: none; }
  .promo-code { -webkit-text-fill-color: #fff3da; }
  .tile:hover .tile-icon { transform: none; }
}

/* ==========  ВТОРОЙ СЛОЙ ЖИВЫХ МЕЛОЧЕЙ  ========== */

/* --- кнопка звука в шапке --- */
.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted-2);
  font-size: 17px;
  cursor: pointer;
  transition: 0.18s ease;
}

.icon-btn:hover { color: var(--ink); border-color: var(--line-gold); background: rgba(229, 189, 122, 0.08); }
.icon-btn.on { color: var(--gold-2); border-color: var(--line-gold); background: rgba(229, 189, 122, 0.12); }
.icon-btn.on span { animation: fxBeat 1.8s ease-in-out infinite; }

@keyframes fxBeat {
  0%, 100% { transform: none; }
  50% { transform: scale(1.18); }
}

@media (max-width: 900px) { .icon-btn { width: 38px; height: 38px; font-size: 15px; } }

/* --- кольцо прогресса вокруг аватарки --- */
.chip-ava {
  position: relative;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  line-height: 0;
}

.chip-ava.ringed {
  padding: 3px;
  border-radius: 50%;
  /* доля до выплаты: золотой сектор до --p, дальше — тёмный ободок */
  background: conic-gradient(var(--gold) var(--p, 0%), rgba(255, 255, 255, 0.1) 0);
}

.chip-ava.ringed::after {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(9, 8, 9, 0.9);
  pointer-events: none;
}

/* число монет в шапке — обычным начертанием: тег <i> взят ради того,
   чтобы подсветка изменения цеплялась именно за цифру, а не за всю строку */
.chip-coins { font-style: normal; }

/* --- монетки летят на баланс --- */
.fx-coin {
  position: fixed;
  z-index: 130;
  width: 13px;
  height: 13px;
  margin: -6px 0 0 -6px;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle at 34% 30%, #fff3da, var(--gold) 55%, var(--gold-deep));
  box-shadow: 0 0 10px rgba(229, 189, 122, 0.7);
  opacity: 0;
  animation: fxCoin 0.95s cubic-bezier(0.55, 0, 0.35, 1) forwards;
}

@keyframes fxCoin {
  0% { transform: translate(0, 0) scale(0.5); opacity: 0; }
  14% { transform: translate(var(--sx), var(--sy)) scale(1.1); opacity: 1; }
  100% { transform: translate(var(--dx), var(--dy)) scale(0.35); opacity: 0; }
}

/* --- быстрый переход --- */
.fx-pal {
  position: fixed;
  z-index: 200;
  inset: 0;
  display: none;
  padding: 12vh 16px 16px;
  background: rgba(4, 3, 4, 0.66);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.fx-pal.open { display: block; }

.fx-pal-box {
  max-width: 560px;
  margin: 0 auto;
  border-radius: 22px;
  border: 1px solid var(--line-gold);
  background: linear-gradient(180deg, rgba(30, 24, 22, 0.98), rgba(10, 8, 9, 0.99));
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.6);
  overflow: hidden;
  animation: fxPalIn 0.22s cubic-bezier(0.22, 1.1, 0.36, 1);
}

@keyframes fxPalIn {
  from { opacity: 0; transform: translateY(-14px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

.fx-pal-inp {
  width: 100%;
  height: 58px;
  padding: 0 20px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  font-weight: 700;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.fx-pal-inp::placeholder { color: var(--muted-2); font-weight: 600; }
.fx-pal-inp::-webkit-search-cancel-button { display: none; }

.fx-pal-list { max-height: min(56vh, 420px); overflow-y: auto; padding: 6px; }

.fx-pal-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  width: 100%;
  padding: 10px 14px;
  border: 0;
  border-radius: 13px;
  background: transparent;
  color: var(--ink);
  font-family: var(--font);
  text-align: left;
  cursor: pointer;
}

.fx-pal-row b { font-size: 14.5px; font-weight: 800; }
.fx-pal-row small { color: var(--muted-2); font-size: 12px; margin-left: auto; white-space: nowrap; }
.fx-pal-row.on, .fx-pal-row:hover { background: rgba(229, 189, 122, 0.14); }
.fx-pal-row.on b { color: var(--gold-2); }

.fx-pal-empty { padding: 26px 16px; text-align: center; color: var(--muted); font-size: 14px; }

.fx-pal-foot {
  padding: 10px 18px;
  border-top: 1px solid var(--line);
  color: var(--muted-2);
  font-size: 11.5px;
  letter-spacing: 0.02em;
}

@media (max-width: 680px) {
  .fx-pal { padding: 8vh 12px 12px; }
  .fx-pal-foot { display: none; }
}

/* --- подсказка при свайпе между разделами --- */
.fx-swipe {
  position: fixed;
  z-index: 140;
  top: 50%;
  padding: 10px 16px;
  border-radius: 14px;
  border: 1px solid var(--line-gold);
  background: rgba(20, 15, 14, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--gold-2);
  font-weight: 800;
  font-size: 13.5px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-50%);
}

.fx-swipe.on { visibility: visible; }
.fx-swipe.left { left: 14px; }
.fx-swipe.right { right: 14px; }

@media (prefers-reduced-motion: reduce) {
  .fx-coin, .fx-swipe { display: none; }
  .fx-pal-box { animation: none; }
  .icon-btn.on span { animation: none; }
}

/* Шапка на телефоне: кнопок стало больше (поиск, звук, язык, вход), и
   название проекта начало сжиматься до «F..». Название важнее отступов —
   поэтому его не даём сжимать, а промежутки и кнопки чуть ужимаем. */
@media (max-width: 680px) {
  .topbar-inner { gap: 8px; }
  .brand { flex: 0 0 auto; }
  .brand-name { flex: 0 0 auto; min-width: max-content; }
  .top-actions { gap: 6px; }
  .icon-btn { width: 34px; height: 34px; font-size: 14px; }
  .search-btn { width: 34px; height: 34px; }
  .lang-btn { height: 34px; padding: 0 8px; }
  .online-chip { padding: 0 8px; height: 34px; }
  #topActions .btn-sm { min-height: 34px; padding: 0 13px; font-size: 13px; }
}

@media (max-width: 380px) {
  /* совсем узкие экраны: счётчик онлайна уходит, он есть на главной в цифрах */
  .online-chip { display: none !important; }
  .topbar-inner { gap: 6px; }
  .top-actions { gap: 4px; }
  .icon-btn, .search-btn { width: 30px; height: 30px; font-size: 13px; }
  .lang-btn { height: 30px; padding: 0 6px; }
  #topActions .btn-sm { min-height: 30px; padding: 0 10px; font-size: 12px; }
  .brand-logo { width: 34px; height: 34px; }
}

/* ==========================================================================
   6.6 — правки по скринам: строки в одну линию, плашки, тексты, звук
   ========================================================================== */

/* Строка «в одну линию»: шрифт сам уменьшается под ширину (см. FH.fitAll) */
.fit-line {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
  max-width: 100%;
}
.fit-line.fit-wrapped { white-space: normal; overflow: visible; }
h1.fit-line, h2.fit-line, h3.fit-line { display: block; }

/* Пилюля справа в шапке карточки («пока ноль», «+300 frolcoin»)
   больше не сжимается в две строки — ужимается заголовок слева */
.card-head > .reward-pill,
.card-head > .btn-sm,
.card-head > .lock-state,
.tr-head > .lock-state { flex: none; white-space: nowrap; }
.card-head > div:first-child { flex: 1 1 auto; }
.reward-pill { white-space: nowrap; }

/* Приветствие в кабинете — чуть скромнее общего заголовка страницы */
#hello { font-size: clamp(28px, 7.4vw, 54px); }

/* Описания заданий — чуть мельче и без переносов по слогам */
.task p { font-size: 13px; line-height: 1.5; hyphens: manual; -webkit-hyphens: manual; overflow-wrap: normal; word-break: normal; text-wrap: pretty; }
.task p.task-need { font-size: 12.5px; }
.task h3 { line-height: 1.12; }
/* описание и лид карточек — тоже без переносов посреди слова */
.cab-lead, .page-head p, .perk-box span, .wallet p { hyphens: manual; -webkit-hyphens: manual; text-wrap: pretty; }

/* Турнир: название в одну строку рядом с плашкой уровня */
.tr-head > b { flex: 1 1 auto; min-width: 0; }

/* Значение в мини-статистике словами («без уровня») — мельче цифр */
.mini-stats strong.word { font-size: 14px; letter-spacing: -0.02em; }

/* Свод правил: подпункты «Вариант А / Б» и примечание */
.rules-list li b { color: var(--ink); }
.rules-list .rule-sub { display: block; margin-top: 6px; padding-left: 14px; position: relative; }
.rules-list .rule-sub::before { content: '•'; position: absolute; left: 0; color: var(--gold-2); }
.rules-list .rule-note { display: block; margin-top: 6px; font-size: 13px; color: var(--muted-2); }
/* «* Важно: …» в правилах — выделяем красным, чтобы сразу бросалось в глаза */
.rules-list .rule-note { color: var(--crimson-2); font-weight: 700; }

/* Условия приёма роликов — по пунктам, с жирной подписью */
.clip-terms { display: grid; gap: 7px; font-size: 12.5px; line-height: 1.55; color: var(--muted); }
.clip-terms p { margin: 0; }
.clip-terms b { color: var(--ink); font-weight: 800; }
.clip-terms .note { margin-top: 3px; color: var(--muted-2); font-size: 12px; }
/* «*Примечание» в условиях роликов (Задания) — красным, чтобы выделялось */
.clip-terms .note { color: var(--crimson-2); font-weight: 700; }

/* Метки на нижнем меню: готовый спин и награды, которые ждут */
.tab-badge {
  position: absolute;
  top: 5px;
  right: calc(50% - 22px);
  min-width: 17px;
  height: 17px;
  padding: 0 5px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-style: normal;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  color: #fff;
  background: linear-gradient(135deg, var(--crimson-2), var(--crimson));
  box-shadow: 0 0 0 2px #0b0708, 0 4px 12px rgba(200, 32, 42, 0.5);
  pointer-events: none;
  animation: tabBadgeIn 0.45s cubic-bezier(0.34, 1.6, 0.5, 1) both;
}
.tab-badge.is-dot { min-width: 10px; width: 10px; height: 10px; padding: 0; top: 8px; right: calc(50% - 16px); animation: tabBadgeIn 0.45s cubic-bezier(0.34, 1.6, 0.5, 1) both, tabBadgePulse 1.8s ease-in-out 0.5s infinite; }
.nav a .tab-badge { top: 2px; right: 2px; }
@keyframes tabBadgeIn { from { transform: scale(0); } to { transform: scale(1); } }
@keyframes tabBadgePulse {
  0%, 100% { box-shadow: 0 0 0 2px #0b0708, 0 0 0 0 rgba(255, 75, 82, 0.6); }
  50% { box-shadow: 0 0 0 2px #0b0708, 0 0 0 7px rgba(255, 75, 82, 0); }
}

/* ---------- колесо: указатель-трещотка, огни, вспышка выигрыша ---------- */

/* Указатель отгибается на каждом секторе — сильнее, когда колесо летит */
.wheel-pointer { transform-origin: 85% 50%; transition: transform 0.07s ease-out; }
.wheel-holder.kick .wheel-pointer {
  transform: translateY(-50%) rotate(calc(var(--kick, 12) * 1deg)) translateX(2px);
}

/* Кнопка крутить дышит, когда бесплатный спин готов */
.wheel-holder.ready .wheel-hub { animation: hubReady 1.6s ease-in-out infinite; }
@keyframes hubReady {
  0%, 100% { box-shadow: 0 0 0 0 rgba(229, 189, 122, 0.55), 0 8px 26px rgba(0, 0, 0, 0.7), 0 0 30px rgba(139, 61, 255, 0.38), inset 0 2px 12px rgba(255, 233, 190, 0.28); }
  50% { box-shadow: 0 0 0 14px rgba(229, 189, 122, 0), 0 8px 26px rgba(0, 0, 0, 0.7), 0 0 44px rgba(139, 61, 255, 0.6), inset 0 2px 12px rgba(255, 233, 190, 0.28); }
}
#spinBtn.ready { animation: spinBtnGlow 1.6s ease-in-out infinite; }
@keyframes spinBtnGlow {
  0%, 100% { box-shadow: 0 10px 30px rgba(229, 189, 122, 0.25); }
  50% { box-shadow: 0 10px 44px rgba(229, 189, 122, 0.6); }
}

/* Во время прокрута аура под колесом разгоняется и разгорается */
.wheel-holder.spinning::before { animation-duration: 1.4s; opacity: 0.75; transition: opacity 0.4s ease; }

/* Вспышка на весь экран при крупном выигрыше */
.fx-flash {
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  background: radial-gradient(circle at 50% 45%, rgba(255, 233, 190, 0.55), rgba(229, 189, 122, 0.12) 40%, transparent 70%);
  animation: fxFlash 0.9s ease-out forwards;
}
@keyframes fxFlash { from { opacity: 1; } to { opacity: 0; } }

/* Встряска экрана — на джекпоте */
.fx-shake { animation: fxShake 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97) both; }
@keyframes fxShake {
  10%, 90% { transform: translate3d(-1px, 0, 0); }
  20%, 80% { transform: translate3d(2px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
  40%, 60% { transform: translate3d(4px, 0, 0); }
}

/* Кнопка звука прямо под колесом */
.wheel-sound {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 10px auto 0;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font: 700 12.5px var(--font);
  cursor: pointer;
  transition: 0.2s ease;
}
.wheel-sound.on { color: var(--gold-2); border-color: var(--line-gold); background: rgba(229, 189, 122, 0.1); }
.wheel-sound i { font-style: normal; font-size: 15px; }

/* Цифры в модалке приза пересчитываются вверх */
.prize-visual .big.count { font-variant-numeric: tabular-nums; }

/* Нажатие на карточку задания/кейса ощущается */
.task { transition: transform 0.18s ease, border-color 0.2s ease, background 0.2s ease; }
.task.just-done { animation: taskDone 0.9s cubic-bezier(0.34, 1.4, 0.5, 1); }
@keyframes taskDone {
  0% { transform: scale(1); }
  30% { transform: scale(1.025); border-color: rgba(79, 252, 166, 0.6); box-shadow: 0 0 0 4px rgba(79, 252, 166, 0.12); }
  100% { transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .tab-badge, .tab-badge.is-dot, .wheel-holder.ready .wheel-hub, #spinBtn.ready,
  .fx-flash, .fx-shake, .task.just-done { animation: none !important; }
}
.rules-list .rule-line { display: block; margin-top: 6px; }

/* Колонка текста в карточке задания должна ужиматься, иначе заголовок
   «в одну строку» распирает сетку шире экрана */
.task > div { min-width: 0; }

/**
 * Шапка карточки с пилюлей справа («пока ноль», «300 frolcoin»):
 * плашка и пилюля — в первой строке, заголовок — во всю ширину под ними.
 * Так заголовок «в одну линию» не ужимается до мелкого шрифта.
 */
.card-head:has(> .reward-pill, > .btn-sm) {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 10px;
  row-gap: 8px;
}
.card-head:has(> .reward-pill, > .btn-sm) > div:first-child { display: contents; }
.card-head:has(> .reward-pill, > .btn-sm) > div:first-child > .tag { order: 1; flex: 0 1 auto; min-width: 0; }
/* пилюля прижата вправо; если рядом с длинной плашкой не влезает — уходит строкой ниже */
.card-head:has(> .reward-pill, > .btn-sm) > .reward-pill,
.card-head:has(> .reward-pill, > .btn-sm) > .btn-sm { order: 2; margin-left: auto; }
.card-head:has(> .reward-pill, > .btn-sm) > div:first-child > h3 { order: 3; flex: 1 0 100%; min-width: 0; margin-top: 2px; }

/* На телефоне номер задания компактнее — названию больше места в строке */
@media (max-width: 520px) {
  .task { gap: 12px; padding: 16px; }
  .task-num { width: 38px; height: 38px; border-radius: 12px; font-size: 15px; }
}
/* длинная плашка рядом с пилюлей не наезжает на неё */
.card-head .tag { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
/* «по приглашению» на узком экране уходит отдельной строкой, а не
   сжимает название уровня в столбик */
.level-head { flex-wrap: wrap; }
.level-head > div { flex: 1 1 190px !important; }
.lvl-invite { white-space: nowrap; }
@media (max-width: 520px) { .level-head > .lvl-invite { margin-left: 21px; } }
.reward-pill:empty { display: none; }

/* ==========================================================================
   6.7 — вторая пачка правок
   ========================================================================== */

/**
 * Карточка задания на телефоне: номер — «стикер» на верхней кромке,
 * а название получает всю ширину карточки. Иначе «Подпишись на мой канал
 * Twitch» в одну строку влезало бы только совсем мелким шрифтом.
 */
@media (max-width: 620px) {
  #taskList { gap: 20px !important; padding-top: 8px; }
  .task { grid-template-columns: 1fr; position: relative; padding: 22px 16px 16px; gap: 12px; }
  .task > .task-action { grid-column: 1; }
  .task-num {
    position: absolute;
    top: -11px;
    left: 16px;
    width: auto;
    min-width: 30px;
    height: 24px;
    padding: 0 9px;
    border-radius: 999px;
    font-size: 11.5px;
    letter-spacing: 0;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.45);
    background: linear-gradient(135deg, #3a1a14, #5a1418);
  }
  .task h3 { font-size: 18px; }
}

/* Подписи под заголовками страниц и разделов — чуть мельче и без переносов по слогам */
.page-head p, .section-head p, .teaser-desc {
  hyphens: manual;
  -webkit-hyphens: manual;
  text-wrap: pretty;
}
@media (max-width: 620px) {
  .page-head p, .section-head p { font-size: 14px; line-height: 1.6; }
  .teaser-desc { font-size: 13px; line-height: 1.55; color: var(--muted); }
}

/* Заголовок первого экрана: длинное слово не вылезает за карточку */
.hero-title { max-width: 100%; overflow-wrap: normal; }

/* Подпись к «вложено в проект» — законченная фраза, читается как текст */
.budget-box small { line-height: 1.45; }

/* переход между разделами убран: из-за него шапка «гуляла» при листании */

/* Пропал интернет — плашка сверху */
.fx-offline {
  position: fixed;
  left: 50%;
  top: calc(env(safe-area-inset-top) + 10px);
  z-index: 120;
  transform: translate(-50%, -140%);
  padding: 9px 16px;
  border-radius: 999px;
  font: 700 12.5px var(--font);
  color: #fff;
  background: linear-gradient(135deg, #7a1016, var(--crimson));
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
  pointer-events: none;
  max-width: calc(100vw - 32px);
  text-align: center;
  /**
   * Скрытое состояние — ПОЛНОСТЬЮ невидимое. Раньше плашка пряталась только
   * сдвигом вверх на 140% своей высоты. В Telegram на iPhone верхний отступ
   * под «чёлку» большой, а текст переносится в две строки — сдвига не хватало,
   * и нижняя строка «…появится, всё продолжит работать» висела вверху экрана
   * даже при нормальном интернете. Теперь без связи — плашка выезжает, а со
   * связью её нет совсем (opacity + visibility), независимо от отступов.
   */
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, -24px);
  transition: opacity 0.25s ease, transform 0.35s cubic-bezier(0.34, 1.4, 0.5, 1), visibility 0s linear 0.35s;
}
.fx-offline.on {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
  transition: opacity 0.25s ease, transform 0.35s cubic-bezier(0.34, 1.4, 0.5, 1), visibility 0s;
}

/* Кнопки «проседают» под пальцем — нажатие чувствуется сразу */
.btn:active:not(:disabled), .btn-ghost:active:not(:disabled), .btn-neon:active:not(:disabled),
.btn-dark:active:not(:disabled), .btn-sm:active:not(:disabled), .platform-btn:active, .footer-link:active {
  transform: scale(0.97);
  transition-duration: 0.06s;
}

@media (prefers-reduced-motion: reduce) {
}

/* ==========================================================================
   6.9 — заставка проекта: кнопка на первом экране + окно с клипом
   ========================================================================== */

/* верхняя строка героя: плашка слева, кнопка «Смотреть заставку» справа */
.hero-eyebrow-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.intro-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 15px 8px 11px;
  border-radius: 999px;
  border: 1px solid var(--line-gold);
  background: linear-gradient(135deg, rgba(229, 189, 122, 0.16), rgba(139, 61, 255, 0.14));
  color: var(--gold-2);
  font: 800 13px var(--font);
  letter-spacing: 0.01em;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.18s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}
.intro-btn:hover { transform: translateY(-1px); border-color: var(--gold); box-shadow: 0 8px 22px rgba(229, 189, 122, 0.22); }
.intro-btn:active { transform: scale(0.97); }

/* треугольник «play» в золотом кружке */
.intro-btn-play {
  position: relative;
  width: 22px;
  height: 22px;
  flex: none;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-2), var(--gold));
  box-shadow: 0 0 0 3px rgba(229, 189, 122, 0.14);
}
.intro-btn-play::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 54%;
  transform: translate(-50%, -50%);
  border-style: solid;
  border-width: 5px 0 5px 8px;
  border-color: transparent transparent transparent #1a1015;
}
/* лёгкая пульсация, чтобы кнопку заметили */
.intro-btn-play { animation: introPulse 2.2s ease-in-out infinite; }
@keyframes introPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(229, 189, 122, 0.5); }
  50% { box-shadow: 0 0 0 7px rgba(229, 189, 122, 0); }
}

@media (max-width: 460px) {
  .intro-btn { padding: 7px 13px 7px 9px; font-size: 12px; }
  .intro-btn-play { width: 20px; height: 20px; }
}

/* окно с клипом-заставкой */
.intro-modal { align-items: center; }
.intro-card {
  position: relative;
  width: min(420px, 92vw);
  max-height: 88vh;
  border-radius: var(--r-md);
  overflow: hidden;
  background: #000;
  box-shadow: var(--shadow), 0 0 0 1px var(--line-gold);
  transform: scale(0.94);
  opacity: 0;
  transition: transform 0.28s cubic-bezier(0.34, 1.4, 0.5, 1), opacity 0.24s ease;
}
.intro-modal.open .intro-card { transform: scale(1); opacity: 1; }

.intro-video {
  display: block;
  width: 100%;
  max-height: 88vh;
  background: #000;
  border-radius: var(--r-md);
}

.intro-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
  backdrop-filter: blur(6px);
}
.intro-close:hover { background: rgba(0, 0, 0, 0.75); }

@media (prefers-reduced-motion: reduce) {
  .intro-btn-play { animation: none; }
  .intro-card { transition: opacity 0.2s ease; }
}

/* картинки, которые появляются плавно (без промелька старой) */
.img-reveal { opacity: 0; transition: opacity .3s ease; }
.img-reveal.ready { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .img-reveal { transition: none; } }

/* ==========================================================================
   6.10 — мини-апп: дашборд, сундук, ачивки, друзья, уведомления,
   компактные партнёры и нативность Telegram
   ========================================================================== */

/* ---------- Telegram: безопасные зоны и полноэкранный режим ----------
   telegram-web-app.js сам выставляет переменные отступов. В полноэкранном
   режиме сверху лежат системные кнопки Telegram — шапку опускаем под них. */
body.tg-full .topbar {
  padding-top: calc(var(--tg-safe-area-inset-top, 0px) + var(--tg-content-safe-area-inset-top, 0px));
}
body.in-telegram .tabbar-wrap {
  padding-bottom: max(env(safe-area-inset-bottom), var(--tg-safe-area-inset-bottom, 0px));
}

/* Плавный переход между страницами (Chrome/Android и новые iOS).
   Шапка и нижнее меню стоят на месте, меняется только содержимое. */
@view-transition { navigation: auto; }
.topbar { view-transition-name: fh-top; }
/* имя перехода — на самом фиксированном слое меню: на обёртке оно делало
   её отдельным слоем, и первый экран главной перекрывал меню */
.tabbar-wrap { view-transition-name: fh-tabs; }
::view-transition-old(root) { animation: 160ms ease-out both fhVtOut; }
::view-transition-new(root) { animation: 220ms cubic-bezier(.2,.7,.2,1) both fhVtIn; }
@keyframes fhVtOut { to { opacity: 0; transform: translateY(-6px); } }
@keyframes fhVtIn { from { opacity: 0; transform: translateY(10px); } }
@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
}

/* ------------------------------- дашборд ------------------------------- */
.dash { position: relative; z-index: 2; padding: 18px 0 4px; }
.dash-card {
  position: relative;
  padding: 18px;
  border-radius: var(--r-lg);
  border: 1px solid var(--line-gold);
  background:
    radial-gradient(120% 80% at 100% 0%, rgba(200, 32, 42, 0.18), transparent 60%),
    linear-gradient(165deg, rgba(229, 189, 122, 0.08), rgba(255, 255, 255, 0.02)),
    var(--bg-2);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}
.dash-who { display: flex; align-items: center; gap: 12px; }
.dash-ava {
  width: 46px; height: 46px; flex: 0 0 46px; border-radius: 50%;
  object-fit: cover; border: 1px solid var(--line-gold);
  display: grid; place-items: center;
  font: 700 18px var(--display); color: #1b1206;
  background: linear-gradient(135deg, var(--gold-2), var(--gold));
}
.dash-who > div { min-width: 0; flex: 1; }
.dash-name { display: block; font-weight: 800; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-lvl { font-size: 12.5px; color: var(--muted); }
.dash-lvl b { color: var(--gold); font-weight: 800; }
.dash-cab {
  width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center;
  border: 1px solid var(--line); background: rgba(255,255,255,.04); color: var(--gold);
  text-decoration: none; font-size: 16px;
}
.dash-bar { height: 6px; border-radius: 99px; background: rgba(255,255,255,.07); margin: 14px 0 6px; overflow: hidden; }
.dash-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--gold-deep), var(--gold-2)); }
.dash-bar-line { margin: 0; font-size: 12px; color: var(--muted); }
.dash-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 14px 0; }
.dash-stats > div {
  padding: 10px 10px 9px; border-radius: 14px;
  background: rgba(0, 0, 0, 0.28); border: 1px solid var(--line);
}
.dash-stats b { display: block; font: 700 18px/1.15 var(--display); letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.dash-stats small { color: var(--muted); font-size: 11px; }

/* «Главное сейчас» — единственный яркий элемент экрана */
.dash-now {
  display: flex; align-items: center; gap: 12px;
  padding: 14px; border-radius: 18px; text-decoration: none; color: #1b1206;
  background: linear-gradient(135deg, var(--gold-2), var(--gold) 55%, #c99a50);
  box-shadow: 0 14px 34px rgba(229, 189, 122, 0.25), inset 0 1px 0 rgba(255,255,255,.6);
  transition: transform .18s ease;
}
.dash-now:active { transform: scale(.98); }
.dash-now.calm {
  color: var(--ink);
  background: rgba(255,255,255,.04);
  border: 1px solid var(--line);
  box-shadow: none;
}
.dash-now-ico { font-size: 26px; line-height: 1; }
.dash-now > span:nth-child(2) { flex: 1; min-width: 0; }
.dash-now b { display: block; font-weight: 800; font-size: 15px; }
.dash-now small { display: block; font-size: 12px; opacity: .75; }
.dash-now-go {
  flex: 0 0 auto; padding: 9px 14px; border-radius: 12px; font-weight: 800; font-size: 13px;
  background: #1b1206; color: var(--gold-2);
}
.dash-now.calm .dash-now-go { background: rgba(255,255,255,.08); color: var(--ink); }
.dash-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.dash-tile {
  position: relative; padding: 11px 10px; border-radius: 16px; text-decoration: none; color: var(--ink);
  background: rgba(255,255,255,.035); border: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 2px; min-width: 0;
}
.dash-tile i { font-style: normal; font-size: 20px; line-height: 1.2; }
.dash-tile b { font-size: 13px; font-weight: 800; }
.dash-tile small { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.dash-tile.hot { border-color: rgba(79, 252, 166, .45); background: rgba(79, 252, 166, .06); }
.dash-tile.hot small { color: var(--neon); }
.dash-tile.hot::after {
  content: ''; position: absolute; top: 9px; right: 9px; width: 7px; height: 7px; border-radius: 50%;
  background: var(--neon); box-shadow: 0 0 10px var(--neon);
}
.dash-skel { height: 312px; border-radius: var(--r-lg); }

/* -------------------------------- сундук -------------------------------- */
.chest-card { display: grid; grid-template-columns: 150px 1fr; gap: 18px; align-items: center; }
@media (max-width: 520px) { .chest-card { grid-template-columns: 1fr; text-align: center; justify-items: center; } }
.chest-stage { position: relative; width: 150px; height: 128px; }
.chest-svg { width: 100%; height: 100%; overflow: visible; }
.chest-lid { transform-box: fill-box; transform-origin: 50% 100%; transition: transform .55s cubic-bezier(.3,1.6,.5,1); }
.chest-glow { opacity: 0; transition: opacity .4s ease; }
.chest-stage.ready .chest-svg { animation: chestIdle 2.8s ease-in-out infinite; }
.chest-stage.shake .chest-svg { animation: chestShake .5s linear; }
.chest-stage.open .chest-lid { transform: translateY(-14px) rotate(-14deg); }
.chest-stage.open .chest-glow { opacity: 1; }
.chest-stage.closed { filter: saturate(.55) brightness(.8); }
@keyframes chestIdle { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@keyframes chestShake {
  0%, 100% { transform: rotate(0); } 20% { transform: rotate(-4deg); } 40% { transform: rotate(4deg); }
  60% { transform: rotate(-3deg); } 80% { transform: rotate(2deg); }
}
.chest-prize {
  position: absolute; left: 50%; top: 4px; transform: translate(-50%, 10px) scale(.7); opacity: 0;
  font: 800 22px var(--display); color: var(--gold-2); white-space: nowrap;
  text-shadow: 0 4px 18px rgba(229,189,122,.6);
  transition: transform .6s cubic-bezier(.2,1.4,.4,1) .25s, opacity .3s ease .25s;
  pointer-events: none;
}
.chest-stage.open .chest-prize { opacity: 1; transform: translate(-50%, -26px) scale(1); }
.chest-info h3 { margin: 6px 0 6px; font-size: 22px; }
.chest-info p { margin: 0 0 12px; color: var(--muted); font-size: 14px; line-height: 1.6; }
.chest-odds { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
@media (max-width: 520px) { .chest-odds { justify-content: center; } }
.chest-odds span {
  font-size: 11.5px; padding: 4px 9px; border-radius: 99px;
  border: 1px solid var(--line); color: var(--muted); background: rgba(255,255,255,.03);
}
@media (prefers-reduced-motion: reduce) {
  .chest-stage.ready .chest-svg, .chest-stage.shake .chest-svg { animation: none; }
}

/* -------------------------------- ачивки -------------------------------- */
.ach-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.ach-count { color: var(--muted); font-size: 13px; white-space: nowrap; }
.ach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; margin-top: 14px; }
.ach {
  display: grid; grid-template-columns: 46px 1fr; gap: 12px; align-items: center;
  padding: 12px; border-radius: 18px; border: 1px solid var(--line); background: rgba(255,255,255,.03);
}
.ach-ico {
  width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font-size: 22px;
  background: rgba(255,255,255,.05); border: 1px solid var(--line); filter: grayscale(1); opacity: .55;
}
.ach.ready .ach-ico, .ach.done .ach-ico { filter: none; opacity: 1; border-color: var(--line-gold); background: rgba(229,189,122,.1); }
.ach.ready { border-color: rgba(79,252,166,.4); background: rgba(79,252,166,.05); }
.ach b { display: block; font-size: 14px; }
.ach small { display: block; color: var(--muted); font-size: 12px; line-height: 1.4; }
.ach-prog { height: 4px; border-radius: 99px; background: rgba(255,255,255,.07); margin-top: 7px; overflow: hidden; }
.ach-prog i { display: block; height: 100%; background: var(--gold); border-radius: inherit; }
.ach-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 6px; font-size: 11.5px; color: var(--muted); }
.ach-foot .btn-sm { padding: 6px 10px; font-size: 12px; }
.ach.done .ach-foot span:last-child { color: var(--neon); }

/* ---------------------------- уведомления ------------------------------ */
.notif-row {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 12px 0; border-bottom: 1px solid var(--line);
}
.notif-row:last-of-type { border-bottom: 0; }
.notif-row b { display: block; font-size: 14.5px; }
.notif-row small { color: var(--muted); font-size: 12.5px; line-height: 1.45; }
.tgl { position: relative; flex: 0 0 auto; width: 50px; height: 30px; }
.tgl input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.tgl span {
  position: absolute; inset: 0; border-radius: 99px; background: rgba(255,255,255,.12);
  border: 1px solid var(--line); transition: background .2s ease;
}
.tgl span::after {
  content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%;
  background: #fff; transition: transform .22s cubic-bezier(.3,1.4,.5,1);
}
.tgl input:checked + span { background: linear-gradient(135deg, var(--neon), #1fbf78); border-color: transparent; }
.tgl input:checked + span::after { transform: translateX(20px); }
.tgl input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }
.notif-home { margin-top: 14px; }

/* -------------------------------- друзья -------------------------------- */
.fr-link { display: flex; gap: 8px; margin-top: 14px; }
.fr-link input {
  flex: 1; min-width: 0; padding: 13px 14px; border-radius: 14px; border: 1px solid var(--line);
  background: rgba(0,0,0,.3); color: var(--ink); font: 600 13px var(--font);
}
.fr-share { width: 100%; margin-top: 10px; }
.fr-goal { margin-top: 16px; }
.fr-goal-line { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }
.fr-goal-line b { color: var(--ink); }
.fr-list { display: grid; gap: 8px; margin-top: 14px; }
.fr-row {
  display: grid; grid-template-columns: 38px 1fr auto; gap: 12px; align-items: center;
  padding: 10px 12px; border-radius: 16px; border: 1px solid var(--line); background: rgba(255,255,255,.03);
}
.fr-ava {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  font: 700 15px var(--display); background: rgba(229,189,122,.12); color: var(--gold); border: 1px solid var(--line-gold);
}
.fr-row b { display: block; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fr-row small { color: var(--muted); font-size: 12px; }
.fr-state { font-size: 11.5px; font-weight: 800; padding: 4px 9px; border-radius: 99px; white-space: nowrap; }
.fr-state.ok { color: #06331f; background: var(--neon); }
.fr-state.wait { color: var(--muted); border: 1px solid var(--line); }
.fr-empty { text-align: center; padding: 26px 12px; color: var(--muted); font-size: 14px; line-height: 1.6; }
.fr-empty b { display: block; color: var(--ink); font-size: 16px; margin-bottom: 4px; }

/* ------------------------ партнёры: компактный список ------------------------ */
.ptop { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(230px, 78%); gap: 10px; overflow-x: auto;
  scroll-snap-type: x mandatory; padding: 2px 2px 10px; margin: 0 -2px 6px; scrollbar-width: none; }
.ptop::-webkit-scrollbar { display: none; }
@media (min-width: 900px) { .ptop { grid-auto-flow: row; grid-template-columns: repeat(3, 1fr); overflow: visible; } }
.ptop-card {
  scroll-snap-align: start; position: relative; padding: 16px; border-radius: 22px; overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--accent, #e5bd7a) 45%, transparent);
  background:
    radial-gradient(90% 70% at 100% 0%, color-mix(in srgb, var(--accent, #e5bd7a) 30%, transparent), transparent 65%),
    rgba(255,255,255,.03);
}
.ptop-rank { position: absolute; top: 12px; right: 14px; font: 800 13px var(--display); color: var(--gold); }
.ptop-card .partner-mark { width: 48px; height: 48px; }
.ptop-card h3 { margin: 10px 0 2px; font-size: 18px; }
.ptop-card .partner-cat { margin-bottom: 12px; }
.ptop-card .btn { width: 100%; }
.ptop-title { display: flex; justify-content: space-between; align-items: baseline; margin: 6px 0 10px; }
.ptop-title b { font-size: 15px; }
.ptop-title small { color: var(--muted); font-size: 12px; }

.partner-grid.rows { display: grid; grid-template-columns: 1fr; gap: 8px; }
@media (min-width: 900px) { .partner-grid.rows { grid-template-columns: 1fr 1fr; } }
.prow {
  --accent: #e5bd7a;
  border-radius: 18px; border: 1px solid var(--line); background: rgba(255,255,255,.03);
  overflow: hidden; transition: border-color .2s ease;
}
.prow.open { border-color: color-mix(in srgb, var(--accent) 50%, transparent); }
.prow-main { display: grid; grid-template-columns: 44px 1fr auto auto; gap: 10px; align-items: center; padding: 10px 10px 10px 12px; }
.prow .partner-mark { width: 44px; height: 44px; border-radius: 13px; font-size: 14px; }
.prow-text { min-width: 0; cursor: pointer; }
.prow-text b { display: block; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prow-text small { display: block; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prow-text small em { font-style: normal; color: var(--gold); }
.prow-fav {
  width: 34px; height: 34px; border-radius: 10px; border: 1px solid transparent; background: none;
  color: var(--muted-2); font-size: 18px; cursor: pointer; line-height: 1;
}
.prow-fav.on { color: var(--gold); }
.prow-fav:focus-visible { outline: 2px solid var(--gold); }
.prow-go { padding: 9px 13px; font-size: 13px; border-radius: 12px; }
.prow-more { display: none; padding: 0 12px 12px; }
.prow.open .prow-more { display: block; }
.prow-more p { margin: 0 0 10px; color: var(--muted); font-size: 13.5px; line-height: 1.55; }
.prow-more .partner-actions { margin: 0; }
.prow-more .reg-row { margin-top: 10px; }
.prow-done { font-size: 11px; color: var(--neon); font-weight: 800; }
.filter-btn.fav-btn.active { color: #1b1206; }

/* фильтры партнёров на телефоне — одна лента вбок, а не четыре строки */
@media (max-width: 760px) {
  .filter-row { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-right: -14px; padding-right: 14px; }
  .filter-row::-webkit-scrollbar { display: none; }
  .filter-row .filter-btn { flex: 0 0 auto; }
}
.ach-grid > .btn-block { grid-column: 1 / -1; }

/* ==========================================================================
   6.11 — правки по отзыву: панель профиля и нижнее меню
   ========================================================================== */

/* ---- Панель профиля: тот же рецепт, что у всех карточек сайта ----
   Раньше: сплошной тёмный прямоугольник с красным пятном и золотой рамкой —
   на живом фоне с бликами он читался как вклеенный. Теперь стекло: фон
   страницы под панелью размывается и продолжается сквозь неё. */
.dash { padding: 14px 0 0; }
.dash-card {
  padding: 18px 16px 16px;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
  -webkit-backdrop-filter: blur(22px) saturate(140%);
  backdrop-filter: blur(22px) saturate(140%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), var(--shadow-soft);
}
.dash-ava { box-shadow: 0 0 0 3px rgba(229, 189, 122, 0.12); }
.dash-cab { background: rgba(255, 255, 255, 0.05); border-color: var(--line); }
.dash-bar { background: rgba(255, 255, 255, 0.08); }
.dash-stats > div {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.dash-tile { background: rgba(255, 255, 255, 0.04); border-color: rgba(255, 255, 255, 0.06); }
.dash-now { box-shadow: 0 10px 26px rgba(229, 189, 122, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.55); }
.dash-now.calm { background: rgba(255, 255, 255, 0.04); border-color: rgba(255, 255, 255, 0.07); }

/* ---- Нижнее меню: сплошное, как шапка, и пристыковано к низу ----
   Прозрачное стекло пропускало текст страницы, и его обрывки
   налезали на иконки. Теперь меню — зеркало шапки: тот же цвет,
   та же тонкая линия, а над ним — мягкое затемнение, в которое
   уходит прокручиваемый контент. */
.tabbar-wrap {
  bottom: 0;
  padding-bottom: 0;
}
.tabbar-wrap > .wrap { width: 100%; max-width: none; }
.tabbar-wrap::before {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 100%;
  height: 34px;
  background: linear-gradient(to top, #0a0708, rgba(10, 7, 8, 0));
  pointer-events: none;
}
.tabbar {
  border-radius: 22px 22px 0 0;
  padding: 7px 10px calc(7px + max(env(safe-area-inset-bottom), var(--tg-safe-area-inset-bottom, 0px)));
  background: #0a0708;
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.45);
}
body.in-telegram .tabbar-wrap { padding-bottom: 0; }
.tab-pill { top: 7px; height: calc(100% - 14px - max(env(safe-area-inset-bottom), var(--tg-safe-area-inset-bottom, 0px))); }
.tab-badge { box-shadow: 0 0 0 2px #0a0708, 0 4px 12px rgba(200, 32, 42, 0.45); }
@media (max-width: 680px) {
  .tabbar { padding-left: 6px; padding-right: 6px; }
}

/* Фон первого экрана (видео/кадр) растягивался на 60–80 px вверх и под
   панелью профиля обрывался жёсткой линией — тот самый «вклеенный» вид.
   Теперь верх фона плавно растворяется, а под панелью профиля фон не
   поднимается вовсе. */
/* 6.11.1: без mask-image — на iPhone маска не действует на <video>, а слой
   ролика вылезал поверх нижнего меню, пока первый экран не уедет вверх.
   Растворение сверху теперь делает обычный градиент поверх кадра. */
.hero { isolation: isolate; }
.hero-video::after {
  content: '';
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 180px;
  background: linear-gradient(to bottom, var(--bg) 0%, rgba(6, 5, 6, .85) 35%, rgba(6, 5, 6, 0) 100%);
  pointer-events: none;
}
.dash:not(.hidden) + .hero .hero-video { inset: 0 0 auto 0; height: 100%; }
/* нижнее меню — отдельный слой поверх всего, включая видео */
.tabbar-wrap {
  z-index: 85;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

/* панель профиля на широком экране — две колонки вместо растянутой ленты */
@media (min-width: 900px) {
  .dash-card {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    column-gap: 24px;
    grid-template-areas: "who now" "bar now" "line now" "stats tiles";
    align-items: start;
  }
  .dash-who { grid-area: who; }
  .dash-bar { grid-area: bar; }
  .dash-bar-line { grid-area: line; }
  .dash-stats { grid-area: stats; margin-bottom: 0; }
  .dash-now { grid-area: now; align-self: stretch; padding: 18px 20px; }
  .dash-now b { font-size: 17px; }
  .dash-tiles { grid-area: tiles; margin-top: 14px; }
}

/* =====================================================================
   6.12 · ТОКЕН FROLOV (SF) — /token.html
   Та же система: карточки, золото + кармин, акцент фиолетом.
   ===================================================================== */

.tk-hero { padding: 26px 0 6px; }

.tk-hero-card {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 18px;
  padding: 34px;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at 82% 30%, rgba(229, 189, 122, 0.2), transparent 34%),
    radial-gradient(circle at 8% 6%, rgba(200, 32, 42, 0.24), transparent 34%),
    radial-gradient(circle at 70% 100%, rgba(139, 61, 255, 0.16), transparent 40%),
    linear-gradient(150deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018));
  box-shadow: var(--shadow);
  overflow: hidden;
  isolation: isolate;
}

.tk-hero-copy { position: relative; z-index: 2; min-width: 0; }
.tk-title {
  margin: 18px 0 16px;
  font-size: clamp(42px, 6.4vw, 78px);
  line-height: 0.95;
  text-wrap: balance;
}
.tk-title span {
  background: linear-gradient(120deg, var(--gold-2), var(--gold) 40%, var(--crimson-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.tk-lead { margin: 0; max-width: 560px; color: #c5b7a9; font-size: 16.5px; line-height: 1.7; }
.tk-hero .hero-actions { margin-top: 24px; }
.tk-hero .hero-actions:empty { display: none; }

/* --- монета --- */
.tk-coin-stage {
  position: relative;
  height: 320px;
  display: grid;
  place-items: center;
  perspective: 900px;
}
.tk-coin-stage::before {
  content: '';
  position: absolute;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(229, 189, 122, 0.34), rgba(200, 32, 42, 0.12) 60%, transparent);
  filter: blur(6px);
  pointer-events: none;
}
.tk-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(229, 189, 122, 0.2);
  pointer-events: none;
}
.tk-ring.r1 { width: 270px; height: 270px; animation: tk-pulse 4.8s ease-in-out infinite; }
.tk-ring.r2 {
  width: 330px; height: 330px;
  border-style: dashed;
  border-color: rgba(196, 139, 255, 0.18);
  animation: tk-spin 38s linear infinite;
}
.tk-coin {
  --d: 190px;
  --t: 14px;
  position: relative;
  width: var(--d);
  height: var(--d);
  transform-style: preserve-3d;
  animation: tk-flip 9s cubic-bezier(0.45, 0, 0.55, 1) infinite;
}
.tk-face {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  background:
    radial-gradient(circle at 32% 26%, rgba(255, 255, 255, 0.7), transparent 22%),
    radial-gradient(circle at 50% 50%, #ffe9be 0%, #e5bd7a 46%, #a97f3d 78%, #6f4f20 100%);
  box-shadow:
    inset 0 0 0 7px rgba(111, 79, 32, 0.55),
    inset 0 0 0 9px rgba(255, 233, 190, 0.5),
    inset 0 -16px 30px rgba(80, 50, 10, 0.45);
  background-size: cover;
  background-position: center;
}
.tk-face.front { transform: translateZ(calc(var(--t) / 2)); }
.tk-face.back { transform: rotateY(180deg) translateZ(calc(var(--t) / 2)); }
.tk-face-txt {
  font-family: var(--display);
  font-weight: 800;
  font-size: 62px;
  letter-spacing: -0.06em;
  color: #3a2408;
  text-shadow: 0 1px 0 rgba(255, 240, 210, 0.75), 0 -1px 0 rgba(60, 35, 5, 0.4);
}
.tk-face.back .tk-face-txt { font-size: 84px; }
.tk-coin.has-img .front .tk-face-txt { display: none; }
.tk-edge {
  position: absolute;
  left: calc(50% - var(--t) / 2);
  top: 0;
  width: var(--t);
  height: 100%;
  border-radius: calc(var(--t) / 2);
  transform: rotateY(90deg);
  background: repeating-linear-gradient(0deg, #8a6428 0 3px, #c99a52 3px 6px);
}
.tk-coin-shadow {
  position: absolute;
  bottom: 18px;
  width: 150px;
  height: 18px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(0, 0, 0, 0.55), transparent);
  animation: tk-shadow 9s cubic-bezier(0.45, 0, 0.55, 1) infinite;
}
@keyframes tk-flip {
  0% { transform: translateY(0) rotateY(-18deg) rotateX(8deg); }
  25% { transform: translateY(-10px) rotateY(18deg) rotateX(4deg); }
  50% { transform: translateY(0) rotateY(198deg) rotateX(8deg); }
  75% { transform: translateY(-10px) rotateY(162deg) rotateX(4deg); }
  100% { transform: translateY(0) rotateY(342deg) rotateX(8deg); }
}
@keyframes tk-shadow { 0%, 50%, 100% { transform: scaleX(1); opacity: 0.9; } 25%, 75% { transform: scaleX(0.82); opacity: 0.6; } }
@keyframes tk-spin { to { transform: rotate(360deg); } }
@keyframes tk-pulse { 0%, 100% { transform: scale(1); opacity: 0.7; } 50% { transform: scale(1.06); opacity: 1; } }

/* --- общие для секций --- */
.tk-sec .section-head .tag.hidden { display: none; }
.tk-sec { padding: 22px 0; }
.tk-ico {
  flex: none;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-gold);
  background: linear-gradient(145deg, rgba(229, 189, 122, 0.16), rgba(200, 32, 42, 0.1));
}

/* --- баланс --- */
.tk-balance {
  border-color: var(--line-gold);
  background:
    radial-gradient(circle at 100% 0%, rgba(229, 189, 122, 0.16), transparent 40%),
    linear-gradient(160deg, var(--panel), var(--panel-2));
}
.tk-bal { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.tk-bal-main { min-width: 0; }
.tk-bal-num { display: flex; align-items: baseline; gap: 10px; margin: 14px 0 8px; }
.tk-bal-num b {
  font-family: var(--display);
  font-size: clamp(44px, 9vw, 72px);
  letter-spacing: -0.06em;
  line-height: 1;
  background: linear-gradient(120deg, var(--gold-2), var(--gold) 60%, var(--gold-deep));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-variant-numeric: tabular-nums;
}
.tk-bal-num span { font-family: var(--display); font-size: 20px; color: var(--gold); letter-spacing: -0.03em; }
.tk-bal-lvl { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.tk-bal-lvl b { font-family: var(--display); letter-spacing: -0.03em; }
.tk-bal-lvl span:not(.level-dot) { color: var(--muted); }
.tk-bal-lvl .level-dot { width: 10px; height: 10px; }
.tk-bal-side { display: flex; gap: 10px; }
.tk-bal-side > div {
  min-width: 118px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
}
.tk-bal-side b { display: block; font-family: var(--display); font-size: 17px; letter-spacing: -0.04em; }
.tk-bal-side small { color: var(--muted); font-size: 11.5px; }
.tk-bal-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.tk-bal-guest { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.tk-bal-guest > div:nth-child(2) { flex: 1 1 260px; min-width: 0; }
.tk-bal-guest p { margin: 10px 0 0; }
.tk-bal-ico {
  width: 60px; height: 60px; border-radius: 20px;
  display: grid; place-items: center;
  border: 1px solid var(--line-gold);
  background: linear-gradient(145deg, rgba(229, 189, 122, 0.18), rgba(139, 61, 255, 0.12));
}

/* --- цифры --- */
.tk-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.tk-stat { padding: 18px 14px; }
.tk-stat b { font-variant-numeric: tabular-nums; }
.tk-stat span { display: block; margin-top: 6px; color: var(--muted); font-size: 12.5px; line-height: 1.4; }

/* --- что такое SF --- */
.tk-about .section-head { margin-bottom: 18px; }
.tk-about .section-head p { color: #c5b7a9; }
.tk-points { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tk-point {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}
.tk-point b { display: block; font-family: var(--display); font-size: 15px; letter-spacing: -0.03em; margin-top: 2px; }
.tk-point small { display: block; color: var(--muted); font-size: 12.5px; line-height: 1.5; margin-top: 4px; }

/* --- что открывает --- */
.tk-util { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.tk-util-item { min-height: 0; }
.tk-util-item h3 { font-size: 17px; margin: 14px 0 8px; line-height: 1.15; letter-spacing: -0.03em; }
.tk-util-item p { color: var(--muted); font-size: 13.5px; line-height: 1.6; margin: 0; }
.tk-util-item.soon { border-style: dashed; border-color: rgba(196, 139, 255, 0.3); }
.tk-util-item .soon-badge { margin-left: 8px; vertical-align: middle; }

/* --- шаги --- */
.tk-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; counter-reset: none; }
.tk-step {
  position: relative;
  display: flex; flex-direction: column;
  padding: 20px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  overflow: hidden;
}
.tk-step-num {
  position: absolute; right: 14px; top: 8px;
  font-family: var(--display); font-size: 54px; letter-spacing: -0.06em;
  color: rgba(229, 189, 122, 0.12);
  pointer-events: none;
}
.tk-step-body { display: flex; flex-direction: column; gap: 10px; flex: 1; position: relative; }
.tk-step-head { display: flex; align-items: center; gap: 12px; padding-right: 58px; }
.tk-step-head b { font-family: var(--display); font-size: 16px; letter-spacing: -0.03em; line-height: 1.2; }
.tk-step p { margin: 0; color: var(--muted); font-size: 13.5px; line-height: 1.6; flex: 1; }
.tk-step .btn-ghost { align-self: flex-start; }

/* --- лестница уровней --- */
.tk-ladder { display: grid; gap: 8px; }
.tk-rung { padding: 12px 14px; gap: 12px; }
.tk-rung-n {
  flex: none;
  width: 34px; height: 34px; border-radius: 12px;
  display: grid; place-items: center;
  font-family: var(--display); font-size: 14px;
  color: var(--c);
  border: 1px solid color-mix(in srgb, var(--c) 45%, transparent);
  background: color-mix(in srgb, var(--c) 12%, transparent);
}
.tk-rung small { overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.tk-rung.reached .xp-need { color: var(--neon); }
.tk-rung.current .xp-need { color: var(--gold-2); }

/* --- дорожная карта --- */
.tk-road { position: relative; display: grid; gap: 12px; padding-left: 26px; }
.tk-road::before {
  content: '';
  position: absolute; left: 8px; top: 10px; bottom: 10px; width: 2px;
  background: linear-gradient(180deg, var(--neon), var(--gold) 50%, rgba(196, 139, 255, 0.35));
  border-radius: 2px;
}
.tk-mile { position: relative; }
.tk-mile-dot {
  position: absolute; left: -24px; top: 20px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--muted-2);
}
.tk-mile.done .tk-mile-dot { border-color: var(--neon); background: var(--neon); box-shadow: 0 0 14px rgba(79, 252, 166, 0.5); }
.tk-mile.now .tk-mile-dot { border-color: var(--gold); background: var(--gold); box-shadow: 0 0 0 0 rgba(229, 189, 122, 0.6); animation: tk-beacon 2.2s ease-out infinite; }
.tk-mile.soon .tk-mile-dot { border-color: var(--violet-2); }
@keyframes tk-beacon { 0% { box-shadow: 0 0 0 0 rgba(229, 189, 122, 0.55); } 100% { box-shadow: 0 0 0 14px rgba(229, 189, 122, 0); } }
.tk-mile-card {
  padding: 16px 18px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
}
.tk-mile.now .tk-mile-card { border-color: var(--line-gold); background: linear-gradient(150deg, rgba(229, 189, 122, 0.1), var(--panel-2)); }
.tk-mile-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 8px; }
.tk-mile-top span { color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.tk-mile-top em {
  font-style: normal; font-size: 11px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 4px 9px; border-radius: 99px;
  color: var(--violet-2); background: rgba(139, 61, 255, 0.12); border: 1px solid rgba(196, 139, 255, 0.3);
}
.tk-mile.done .tk-mile-top em { color: var(--neon); background: rgba(79, 252, 166, 0.1); border-color: rgba(79, 252, 166, 0.3); }
.tk-mile.now .tk-mile-top em { color: #1c0f03; background: linear-gradient(135deg, var(--gold-2), var(--gold)); border-color: transparent; }
.tk-mile-card b { display: block; font-family: var(--display); font-size: 17px; letter-spacing: -0.03em; }
.tk-mile-card p { margin: 6px 0 0; color: var(--muted); font-size: 13.5px; line-height: 1.6; }

/* --- вопросы --- */
.tk-faq { display: grid; gap: 8px; }
.tk-qa {
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  transition: border-color 0.2s ease, background 0.2s ease;
}
.tk-qa[open] { border-color: var(--line-gold); background: rgba(229, 189, 122, 0.05); }
.tk-qa summary {
  list-style: none;
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 16px 18px;
  cursor: pointer;
  font-weight: 800; font-size: 15px; line-height: 1.4;
  -webkit-tap-highlight-color: transparent;
}
.tk-qa summary::-webkit-details-marker { display: none; }
.tk-qa summary:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 18px; }
.tk-qa summary i {
  flex: none; position: relative; width: 26px; height: 26px; border-radius: 50%;
  border: 1px solid var(--line-gold);
}
.tk-qa summary i::before, .tk-qa summary i::after {
  content: ''; position: absolute; left: 50%; top: 50%; width: 10px; height: 2px; border-radius: 2px;
  background: var(--gold); transform: translate(-50%, -50%); transition: transform 0.25s ease;
}
.tk-qa summary i::after { transform: translate(-50%, -50%) rotate(90deg); }
.tk-qa[open] summary i::after { transform: translate(-50%, -50%) rotate(0deg); }
.tk-qa p { margin: 0; padding: 0 18px 16px; color: var(--muted); line-height: 1.7; font-size: 14px; }

/* --- призыв --- */
.tk-cta {
  display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap;
  padding: 28px;
  border-radius: var(--r-lg);
  border: 1px solid var(--line-gold);
  background:
    radial-gradient(circle at 0% 0%, rgba(200, 32, 42, 0.28), transparent 45%),
    radial-gradient(circle at 100% 100%, rgba(229, 189, 122, 0.22), transparent 45%),
    linear-gradient(150deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
  box-shadow: var(--shadow);
}
.tk-cta > div:first-child { flex: 1 1 320px; min-width: 0; }
.tk-cta h2 { font-size: clamp(24px, 3.6vw, 38px); }
.tk-cta p { margin: 10px 0 0; color: #c5b7a9; line-height: 1.6; }
.tk-cta #tkCtaBtn:empty { display: none; }
.tk-note { margin: 16px 4px 0; color: var(--muted-2); font-size: 12px; line-height: 1.6; text-align: center; }
.tk-note:empty { display: none; }

/* --- адаптив --- */
@media (max-width: 980px) {
  .tk-util, .tk-steps { grid-template-columns: repeat(2, 1fr); }
  .tk-points { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .tk-hero { padding-top: 14px; }
  .tk-hero-card { grid-template-columns: 1fr; padding: 24px 20px 22px; gap: 0; }
  .tk-coin-stage { order: -1; height: 230px; margin: -6px 0 4px; }
  .tk-coin { --d: 138px; --t: 11px; }
  .tk-face-txt { font-size: 46px; }
  .tk-face.back .tk-face-txt { font-size: 62px; }
  .tk-ring.r1 { width: 196px; height: 196px; }
  .tk-ring.r2 { width: 236px; height: 236px; }
  .tk-coin-shadow { width: 110px; bottom: 14px; }
  .tk-coin-stage::before { width: 190px; height: 190px; }
  .tk-title { margin-top: 14px; }
  .tk-lead { font-size: 15.5px; }
  .tk-stats { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .tk-util, .tk-steps { grid-template-columns: 1fr; }
  .tk-util-item { padding: 18px; }
  .tk-util-item .tile-icon { width: 42px; height: 42px; }
  .tk-bal-side { width: 100%; }
  .tk-bal-side > div { flex: 1; min-width: 0; }
  .tk-bal-actions > * { flex: 1 1 auto; text-align: center; }
  .tk-cta { padding: 22px 20px; }
  .tk-cta #tkCtaBtn, .tk-cta #tkCtaBtn .btn { width: 100%; }
  .tk-hero .hero-actions > * { flex: 1 1 auto; }
}

@media (prefers-reduced-motion: reduce) {
  .tk-coin, .tk-coin-shadow, .tk-ring, .tk-mile.now .tk-mile-dot { animation: none; }
  .tk-coin { transform: rotateY(-16deg) rotateX(8deg); }
}
