/* =========================================================================
   ПокерСистема — Onboarding (первый вход)
   Тёмный премиальный poker SaaS. Всё заскоуплено под #ps-onboarding,
   чтобы не конфликтовать с main.css. Переиспользуем переменные темы
   (--bg-primary, --accent, --accent-3, --transition и т.д.) с фолбэками.
   ========================================================================= */

#ps-onboarding {
  --ps-ob-bg: var(--bg-primary, #0a0e13);
  --ps-ob-bg-2: var(--bg-secondary, #0f1419);
  --ps-ob-card: var(--bg-elevated, #151d26);
  --ps-ob-accent: var(--accent, #ef4444);
  --ps-ob-accent-2: #A32632;          /* глубокий винный акцент (red luxe) */
  --ps-ob-gold: var(--accent-3, #E0B24F);
  --ps-ob-text: var(--text, #f1f5f9);
  --ps-ob-text-2: var(--text-2, #cbd5e1);
  --ps-ob-muted: var(--muted, #94a3b8);
  --ps-ob-brd: var(--brd, #1e293b);
  --ps-ob-grad: linear-gradient(135deg, var(--ps-ob-accent) 0%, var(--ps-ob-accent-2) 100%);
  --ps-ob-t: 240ms cubic-bezier(.4, 0, .2, 1);

  position: fixed;
  inset: 0;
  z-index: 100000;
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(239,68,68,.11), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(163,38,50,.18), transparent 55%),
    var(--ps-ob-bg);
  color: var(--ps-ob-text);
  font-family: inherit;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  transition: opacity var(--ps-ob-t);
  -webkit-tap-highlight-color: transparent;
}
#ps-onboarding.ps-ob-visible { opacity: 1; }
#ps-onboarding[hidden] { display: none !important; }

html.ps-ob-lock, body.ps-ob-lock { overflow: hidden !important; }

/* ---------- Top bar ---------- */
.ps-ob-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding:
    calc(var(--tg-csafe-top, env(safe-area-inset-top, 0px)) + 14px)
    18px 8px;
  flex: 0 0 auto;
}
.ps-ob-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  letter-spacing: .2px;
  font-size: 15px;
}
.ps-ob-brand i {
  font-size: 18px;
  background: var(--ps-ob-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.ps-ob-skip {
  border: 0;
  background: transparent;
  color: var(--ps-ob-muted);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 8px 10px;
  border-radius: 10px;
  transition: color var(--ps-ob-t), background var(--ps-ob-t);
}
.ps-ob-skip:hover { color: var(--ps-ob-text); background: rgba(255,255,255,.05); }
.ps-ob-skip:active { transform: scale(.97); }

/* ---------- Carousel ---------- */
.ps-ob-viewport { flex: 1 1 auto; overflow: hidden; position: relative; }
.ps-ob-track {
  display: flex;
  height: 100%;
  width: 100%;
  transition: transform var(--ps-ob-t);
  will-change: transform;
}
.ps-ob-panel {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 8px 20px 24px;
  display: flex;
  flex-direction: column;
}
.ps-ob-panel::-webkit-scrollbar { width: 0; height: 0; }

/* generic intro animation when a panel becomes active */
.ps-ob-panel .ps-ob-rise {
  opacity: 0;
  transform: translateY(14px);
}
.ps-ob-panel.is-active .ps-ob-rise {
  opacity: 1;
  transform: none;
  transition: opacity 360ms ease, transform 360ms cubic-bezier(.2,.7,.2,1);
}
.ps-ob-panel.is-active .ps-ob-rise:nth-child(2) { transition-delay: 50ms; }
.ps-ob-panel.is-active .ps-ob-rise:nth-child(3) { transition-delay: 100ms; }
.ps-ob-panel.is-active .ps-ob-rise:nth-child(4) { transition-delay: 150ms; }
.ps-ob-panel.is-active .ps-ob-rise:nth-child(5) { transition-delay: 200ms; }

.ps-ob-kicker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  align-self: flex-start;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--ps-ob-accent);
  background: rgba(239,68,68,.10);
  border: 1px solid rgba(239,68,68,.25);
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 14px;
}
.ps-ob-h1 {
  font-size: clamp(26px, 8vw, 38px);
  line-height: 1.08;
  font-weight: 800;
  margin: 0 0 12px;
  letter-spacing: -.5px;
}
.ps-ob-h1 .ps-ob-grad-text {
  background: linear-gradient(120deg, var(--ps-ob-accent) 0%, var(--ps-ob-gold) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.ps-ob-sub {
  font-size: 16px;
  font-weight: 700;
  color: var(--ps-ob-text);
  margin: 0 0 8px;
}
.ps-ob-text {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ps-ob-text-2);
  margin: 0 0 16px;
  max-width: 38ch;
}

/* ---------- Buttons ---------- */
.ps-ob-btn {
  -webkit-appearance: none;
  appearance: none;
  border: 0;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  font-size: 16px;
  color: #fff;
  background: var(--ps-ob-grad);
  padding: 16px 22px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  box-shadow: 0 10px 26px -8px rgba(163,38,50,.5);
  transition: transform var(--ps-ob-t), box-shadow var(--ps-ob-t), filter var(--ps-ob-t), opacity var(--ps-ob-t);
}
.ps-ob-btn:hover { transform: translateY(-1px); box-shadow: 0 16px 32px -8px rgba(163,38,50,.62); filter: brightness(1.04); }
.ps-ob-btn:active { transform: translateY(0) scale(.985); }
.ps-ob-btn[disabled] { opacity: .45; cursor: not-allowed; box-shadow: none; filter: grayscale(.3); transform: none; }

.ps-ob-btn--ghost {
  background: rgba(255,255,255,.05);
  color: var(--ps-ob-text);
  border: 1px solid var(--ps-ob-brd);
  box-shadow: none;
}
.ps-ob-btn--ghost:hover { background: rgba(255,255,255,.09); box-shadow: none; filter: none; }

.ps-ob-btn--tg { background: linear-gradient(135deg, #2aabee 0%, #229ED9 100%); box-shadow: 0 10px 26px -8px rgba(34,158,217,.6); }
.ps-ob-btn--tg:hover { box-shadow: 0 16px 32px -8px rgba(34,158,217,.7); }

.ps-ob-link {
  border: 0;
  background: transparent;
  color: var(--ps-ob-text-2);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  padding: 12px;
  text-decoration: none;
  display: inline-block;
  transition: color var(--ps-ob-t);
}
.ps-ob-link u { text-underline-offset: 3px; }
.ps-ob-link:hover { color: var(--ps-ob-text); }

/* sticky CTA area — pinned to the bottom of the panel, always visible even when the panel scrolls */
.ps-ob-cta {
  margin-top: auto;
  position: sticky;
  bottom: 0;
  z-index: 5;
  /* cancel the panel's own bottom padding so the CTA reaches the panel edge, then re-add it inside */
  margin-bottom: -24px;
  padding: 22px 0 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  /* fade the scrolling content out behind the button instead of letting it show through */
  background: linear-gradient(to bottom, transparent 0%, var(--ps-ob-bg) 32%, var(--ps-ob-bg) 100%);
}
/* небольшой отступ сверху у кнопки «Далее» */
.ps-ob-cta .ps-ob-btn[data-next] { margin-top: 10px; }
.ps-ob-hint {
  margin-top: 12px;
  font-size: 12.5px;
  color: var(--ps-ob-muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: center;
}
.ps-ob-hint i { animation: ps-ob-nudge 1.4s ease-in-out infinite; }
@keyframes ps-ob-nudge { 0%,100%{ transform: translateX(0);} 50%{ transform: translateX(5px);} }

/* ---------- Hero artwork — премиальная карточка-плашка с логотипом ---------- */
.ps-ob-hero-art {
  position: relative;
  align-self: center;
  width: clamp(168px, 46vw, 216px);
  aspect-ratio: 1 / 1;
  margin: clamp(2px, 1.2vw, 10px) auto clamp(16px, 4vw, 24px);
  border-radius: clamp(26px, 7vw, 38px);
  display: grid;
  place-items: center;
  isolation: isolate;
  /* НЕТ overflow:hidden — логотип внутри НИКОГДА не обрезается */
  overflow: visible;
  background:
    radial-gradient(130% 130% at 28% 16%, rgba(239,68,68,.30), transparent 56%),
    radial-gradient(130% 130% at 82% 90%, rgba(163,38,50,.42), transparent 58%),
    linear-gradient(160deg, #1f2a37 0%, var(--ps-ob-card) 56%, #0b1016 100%);
  border: 1px solid rgba(255,255,255,.12);
  box-shadow:
    0 30px 60px -22px rgba(0,0,0,.82),
    0 0 70px -12px rgba(239,68,68,.40),
    inset 0 1px 0 rgba(255,255,255,.16),
    inset 0 0 0 1px rgba(255,255,255,.04);
}
/* Мягкий вращающийся блик ВНУТРИ карточки (заклипован её радиусом, не выходит за форму) */
.ps-ob-hero-art::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: .5;
  background: conic-gradient(from 0deg,
    transparent 0deg,
    rgba(224,178,79,.10) 40deg,
    rgba(239,68,68,.18) 92deg,
    transparent 156deg,
    transparent 360deg);
  animation: ps-ob-spin 18s linear infinite;
}
.ps-ob-hero-art .ps-ob-spark {
  position: absolute; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.9), transparent 70%);
}

/* ---------- Dots ---------- */
.ps-ob-dots {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 0 calc(var(--tg-csafe-bottom, env(safe-area-inset-bottom, 0px)) + 14px);
}
.ps-ob-dot {
  width: 7px; height: 7px;
  border-radius: 999px;
  border: 0;
  padding: 0;
  background: rgba(255,255,255,.22);
  cursor: pointer;
  transition: width var(--ps-ob-t), background var(--ps-ob-t);
}
.ps-ob-dot.is-active { width: 22px; background: var(--ps-ob-grad); }

/* ---------- Gallery (screen 2) ---------- */
.ps-ob-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 2px 12px;
  margin: 0 -4px 4px;
  scrollbar-width: none;
}
.ps-ob-chips::-webkit-scrollbar { display: none; }
.ps-ob-chip {
  flex: 0 0 auto;
  border: 1px solid var(--ps-ob-brd);
  background: rgba(255,255,255,.04);
  color: var(--ps-ob-text-2);
  font: inherit; font-size: 13px; font-weight: 600;
  padding: 9px 14px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--ps-ob-t), color var(--ps-ob-t), border-color var(--ps-ob-t);
}
.ps-ob-chip.is-active { background: var(--ps-ob-grad); color: #fff; border-color: transparent; }

.ps-ob-shot {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--ps-ob-brd);
  background: var(--ps-ob-card);
  cursor: pointer;
  display: block;
}
.ps-ob-shot--big { margin-bottom: 12px; }
.ps-ob-shot img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 400ms ease;
}
.ps-ob-shot:hover img { transform: scale(1.04); }
.ps-ob-shot .ps-ob-ph {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  background:
    radial-gradient(120% 120% at 20% 0%, rgba(239,68,68,.28), transparent 55%),
    radial-gradient(120% 120% at 100% 100%, rgba(163,38,50,.26), transparent 55%),
    var(--ps-ob-card);
}
.ps-ob-shot .ps-ob-ph i { font-size: 54px; color: rgba(255,255,255,.85); }
.ps-ob-shot .ps-ob-cap {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 26px 14px 12px;
  font-size: 13px; font-weight: 600;
  background: linear-gradient(to top, rgba(0,0,0,.78), transparent);
}
.ps-ob-shot .ps-ob-zoom {
  position: absolute; top: 10px; right: 10px;
  width: 32px; height: 32px; border-radius: 10px;
  display: grid; place-items: center;
  background: rgba(0,0,0,.45); backdrop-filter: blur(4px);
  font-size: 16px; color: #fff;
}

.ps-ob-thumbs {
  display: flex; gap: 9px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}
.ps-ob-thumbs::-webkit-scrollbar { display: none; }
.ps-ob-thumb {
  flex: 0 0 84px;
  width: 84px; height: 64px;
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid transparent;
  background: var(--ps-ob-card);
  cursor: pointer;
  position: relative;
  transition: border-color var(--ps-ob-t), transform var(--ps-ob-t);
}
.ps-ob-thumb.is-active { border-color: var(--ps-ob-accent); }
.ps-ob-thumb:active { transform: scale(.96); }
.ps-ob-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ps-ob-thumb .ps-ob-ph { position: absolute; inset: 0; display: grid; place-items: center; background: var(--ps-ob-bg-2); }
.ps-ob-thumb .ps-ob-ph i { font-size: 22px; color: rgba(255,255,255,.65); }

/* ---------- Fullscreen viewer ---------- */
.ps-ob-viewer {
  position: fixed;
  inset: 0;
  z-index: 100010;
  background: rgba(4,7,11,.96);
  display: flex;
  flex-direction: column;
  opacity: 0;
  transition: opacity var(--ps-ob-t);
}
.ps-ob-viewer.is-open { opacity: 1; }
.ps-ob-viewer[hidden] { display: none !important; }
.ps-ob-viewer-top {
  display: flex; justify-content: flex-end;
  padding: calc(var(--tg-csafe-top, env(safe-area-inset-top, 0px)) + 12px) 16px 4px;
}
.ps-ob-viewer-close {
  width: 42px; height: 42px; border-radius: 12px; border: 0;
  background: rgba(255,255,255,.08); color: #fff; font-size: 22px;
  cursor: pointer; display: grid; place-items: center;
  transition: background var(--ps-ob-t), transform var(--ps-ob-t);
}
.ps-ob-viewer-close:hover { background: rgba(255,255,255,.16); }
.ps-ob-viewer-close:active { transform: scale(.94); }
.ps-ob-viewer-stage {
  flex: 1 1 auto;
  position: relative;
  display: grid;
  place-items: center;
  padding: 0 12px;
  overflow: hidden;
}
.ps-ob-viewer-img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 14px;
  border: 1px solid var(--ps-ob-brd);
  background: var(--ps-ob-card);
  object-fit: contain;
  transition: opacity 200ms ease;
}
.ps-ob-viewer-ph {
  width: min(92%, 520px);
  aspect-ratio: 16/10;
  border-radius: 16px;
  display: grid; place-items: center;
  background:
    radial-gradient(120% 120% at 20% 0%, rgba(239,68,68,.28), transparent 55%),
    var(--ps-ob-card);
  border: 1px solid var(--ps-ob-brd);
}
.ps-ob-viewer-ph i { font-size: 80px; color: rgba(255,255,255,.85); }
.ps-ob-nav {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; border-radius: 50%;
  border: 0; background: rgba(255,255,255,.1); color: #fff;
  font-size: 24px; cursor: pointer;
  display: grid; place-items: center;
  transition: background var(--ps-ob-t), transform var(--ps-ob-t);
}
.ps-ob-nav:hover { background: rgba(255,255,255,.2); }
.ps-ob-nav:active { transform: translateY(-50%) scale(.92); }
.ps-ob-nav--prev { left: 8px; }
.ps-ob-nav--next { right: 8px; }
.ps-ob-viewer-meta {
  flex: 0 0 auto;
  padding: 14px 22px calc(var(--tg-csafe-bottom, env(safe-area-inset-bottom, 0px)) + 22px);
  text-align: center;
}
.ps-ob-viewer-meta b { display: block; font-size: 15px; margin-bottom: 4px; }
.ps-ob-viewer-meta span { font-size: 13px; color: var(--ps-ob-text-2); }
.ps-ob-viewer-count { font-size: 12px; color: var(--ps-ob-muted); margin-top: 8px; }

/* ---------- Tournament cards (screen 3) ---------- */
.ps-ob-list { display: flex; flex-direction: column; gap: 12px; }
.ps-ob-tcard {
  background: var(--ps-ob-card);
  border: 1px solid var(--ps-ob-brd);
  border-radius: 16px;
  padding: 16px;
  transition: border-color var(--ps-ob-t), transform var(--ps-ob-t);
}
.ps-ob-tcard:hover { border-color: var(--ps-ob-brd-2, #334155); }
.ps-ob-tcard h3 { margin: 0 0 10px; font-size: 16px; font-weight: 800; }
.ps-ob-trow { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-bottom: 14px; }
.ps-ob-tmeta { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ps-ob-text-2); }
.ps-ob-tmeta i { color: var(--ps-ob-accent); font-size: 15px; }
.ps-ob-tprice { color: var(--ps-ob-gold); font-weight: 700; }
.ps-ob-seats {
  height: 6px; border-radius: 999px; background: rgba(255,255,255,.08);
  overflow: hidden; margin-bottom: 12px;
}
.ps-ob-seats > span { display: block; height: 100%; background: var(--ps-ob-grad); border-radius: 999px; transition: width var(--ps-ob-t); }
.ps-ob-tcard .ps-ob-btn { font-size: 14.5px; padding: 12px 18px; }
.ps-ob-empty {
  text-align: center; color: var(--ps-ob-muted);
  padding: 28px 12px; font-size: 14px;
}
.ps-ob-empty i { font-size: 38px; display: block; margin-bottom: 10px; color: rgba(255,255,255,.4); }

/* ---------- Rating placeholder (screen 4) ---------- */
.ps-ob-podium {
  display: flex; align-items: flex-end; justify-content: center; gap: 12px;
  margin: 6px 0 18px;
}
.ps-ob-pod {
  flex: 0 0 84px;
  background: var(--ps-ob-card);
  border: 1px solid var(--ps-ob-brd);
  border-radius: 14px 14px 0 0;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
  padding: 14px 6px 12px;
  position: relative;
}
.ps-ob-pod .ps-ob-medal {
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 800; font-size: 16px;
  margin-bottom: 10px; color: #1a1206;
}
.ps-ob-pod--1 { height: 150px; }
.ps-ob-pod--1 .ps-ob-medal { background: linear-gradient(135deg,#ffe08a,#E0B24F); box-shadow: 0 0 20px rgba(224,178,79,.5); }
.ps-ob-pod--2 { height: 120px; }
.ps-ob-pod--2 .ps-ob-medal { background: linear-gradient(135deg,#e8edf3,#aab6c4); }
.ps-ob-pod--3 { height: 100px; }
.ps-ob-pod--3 .ps-ob-medal { background: linear-gradient(135deg,#f0b483,#c97b4a); }
.ps-ob-pod .ps-ob-lock { font-size: 18px; color: var(--ps-ob-muted); }
.ps-ob-rating-note {
  text-align: center;
  background: rgba(255,255,255,.04);
  border: 1px dashed var(--ps-ob-brd);
  border-radius: 14px;
  padding: 16px;
  color: var(--ps-ob-text-2);
  font-size: 14px;
}
.ps-ob-rating-note b { color: var(--ps-ob-text); display:block; margin-bottom: 4px; }

/* ---------- Feature grid (screen 5) ---------- */
.ps-ob-features { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 4px; }
.ps-ob-feat {
  background: var(--ps-ob-card);
  border: 1px solid var(--ps-ob-brd);
  border-radius: 14px;
  padding: 14px;
  transition: transform var(--ps-ob-t), border-color var(--ps-ob-t);
}
.ps-ob-feat:hover { transform: translateY(-2px); border-color: rgba(239,68,68,.4); }
.ps-ob-feat i {
  font-size: 22px;
  background: var(--ps-ob-grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  margin-bottom: 8px; display: block;
}
.ps-ob-feat b { font-size: 13.5px; font-weight: 700; display: block; }

/* ---------- FAQ accordion (screen 6) ---------- */
.ps-ob-faq { display: flex; flex-direction: column; gap: 8px; }
.ps-ob-acc {
  background: var(--ps-ob-card);
  border: 1px solid var(--ps-ob-brd);
  border-radius: 14px;
  overflow: hidden;
}
.ps-ob-acc-q {
  width: 100%; text-align: left;
  border: 0; background: transparent; color: var(--ps-ob-text);
  font: inherit; font-size: 14.5px; font-weight: 700;
  padding: 15px 16px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.ps-ob-acc-q i { transition: transform var(--ps-ob-t); color: var(--ps-ob-accent); flex: 0 0 auto; }
.ps-ob-acc.is-open .ps-ob-acc-q i { transform: rotate(180deg); }
.ps-ob-acc-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--ps-ob-t);
}
.ps-ob-acc-a > div {
  padding: 0 16px 15px;
  font-size: 14px; line-height: 1.5; color: var(--ps-ob-text-2);
}

/* ---------- Registration panel ---------- */
.ps-ob-reg { align-items: center; text-align: center; }
.ps-ob-reg-logo {
  width: 76px; height: 76px; border-radius: 20px;
  display: grid; place-items: center; margin: 8px 0 16px;
  background: var(--ps-ob-grad);
  box-shadow: 0 14px 30px -8px rgba(163,38,50,.55);
}
.ps-ob-reg-logo i { font-size: 38px; color: #fff; }
.ps-ob-reg .ps-ob-h1 { text-align: center; }
.ps-ob-reg-actions { width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.ps-ob-or {
  display: flex; align-items: center; gap: 12px;
  color: var(--ps-ob-muted); font-size: 12px; font-weight: 600;
  margin: 6px 0;
}
.ps-ob-or::before, .ps-ob-or::after { content: ""; flex: 1; height: 1px; background: var(--ps-ob-brd); }

.ps-ob-consent {
  width: 100%; max-width: 380px;
  text-align: left;
  background: rgba(255,255,255,.03);
  border: 1px solid var(--ps-ob-brd);
  border-radius: 14px;
  padding: 14px;
  margin: 16px 0 4px;
  display: flex; flex-direction: column; gap: 12px;
}
.ps-ob-check { display: flex; gap: 11px; align-items: flex-start; cursor: pointer; }
.ps-ob-check input {
  flex: 0 0 auto;
  width: 20px; height: 20px;
  margin-top: 1px;
  accent-color: var(--ps-ob-accent);
  cursor: pointer;
}
.ps-ob-check span { font-size: 12.5px; line-height: 1.45; color: var(--ps-ob-text-2); }
.ps-ob-check a { color: var(--ps-ob-accent); text-underline-offset: 2px; }
.ps-ob-back {
  position: absolute;
  top: calc(var(--tg-csafe-top, env(safe-area-inset-top, 0px)) + 8px);
  left: 12px;
  z-index: 2;
  width: 40px; height: 40px; border-radius: 12px;
  border: 0; background: rgba(255,255,255,.06); color: var(--ps-ob-text);
  font-size: 22px; cursor: pointer; display: none;
  place-items: center;
  transition: background var(--ps-ob-t);
}
.ps-ob-back:hover { background: rgba(255,255,255,.12); }
#ps-onboarding.ps-ob-on-reg .ps-ob-back { display: grid; }
#ps-onboarding.ps-ob-on-reg .ps-ob-top,
#ps-onboarding.ps-ob-on-reg .ps-ob-dots { visibility: hidden; }

/* preview mode (повторный просмотр «О приложении») — прячем «решающие» CTA */
#ps-onboarding.ps-ob-preview .ps-ob-resolve { display: none !important; }

@media (min-width: 720px) {
  .ps-ob-panel { padding-left: max(20px, calc(50vw - 340px)); padding-right: max(20px, calc(50vw - 340px)); }
  .ps-ob-features { grid-template-columns: 1fr 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  #ps-onboarding, .ps-ob-track, .ps-ob-panel .ps-ob-rise, .ps-ob-viewer { transition: none !important; }
  .ps-ob-hint i { animation: none !important; }
}


/* ---------- Лого клуба (поверх иконки-фолбэка) + бренд платформы ПокерСистема ---------- */
.ps-ob-logo-img { z-index: 1; }
.ps-ob-reg-logo .ps-ob-logo-img,
.ps-ob-brand-mark .ps-ob-logo-img {
  position: absolute;
  object-fit: contain;
  display: block;
}
.ps-ob-reg-logo { position: relative; overflow: hidden; }
.ps-ob-reg-logo .ps-ob-logo-img { inset: 15%; }
.ps-ob-brand-mark {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 20px; height: 20px;
}
.ps-ob-brand-mark .ps-ob-logo-img { inset: 0; width: 100%; height: 100%; }

/* монограмма «PS» — логотип платформы (масштабируется, в фирменном red luxe) */
.ps-ob-ps-badge {
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  width: 30px; height: 30px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: -.5px;
  color: #fff;
  background: linear-gradient(135deg, var(--ps-ob-accent), var(--ps-ob-accent-2));
  box-shadow: 0 3px 10px -2px rgba(163,38,50,.55), inset 0 1px 0 rgba(255,255,255,.28);
}
.ps-ob-ps-badge--sm { width: 18px; height: 18px; border-radius: 5px; font-size: 9px; }

.ps-ob-credit {
  margin-top: 10px;
  align-self: center;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ps-ob-muted);
}

.ps-ob-poweredby {
  margin-top: 16px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 14px;
  border: 1px solid var(--ps-ob-brd);
  background: rgba(255,255,255,.03);
  border-radius: 14px;
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--ps-ob-text-2);
}
.ps-ob-poweredby b { color: var(--ps-ob-text); }


/* ---------- Живая статистика клуба (онбординг) ---------- */
.ps-ob-stats {
  display: flex;
  gap: clamp(7px, 2vw, 10px);
  width: 100%;
  align-self: center;
  margin: 2px 0 16px;
}
.ps-ob-stats[hidden] { display: none; }
.ps-ob-stat {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.02));
  border: 1px solid var(--ps-ob-brd);
  border-radius: clamp(11px, 3vw, 14px);
  padding: clamp(9px, 2.4vw, 13px) clamp(5px, 2vw, 9px);
  text-align: center;
}
.ps-ob-stat b {
  display: block;
  font-size: clamp(14px, 4.6vw, 20px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -.3px;
  white-space: nowrap;
  background: linear-gradient(120deg, var(--ps-ob-accent) 0%, var(--ps-ob-gold) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.ps-ob-stat span {
  display: block;
  margin-top: 5px;
  font-size: clamp(9px, 2.7vw, 11px);
  font-weight: 600;
  letter-spacing: .2px;
  color: var(--ps-ob-muted);
}


/* =========================================================================
   v2 — улучшенный HERO, слайд-шоу клуба (экран 1), живой рейтинг (экран 3),
   корректное отображение логотипа (без «двух логотипов»).
   ========================================================================= */

/* Лого клуба идёт перед иконкой-фолбэком: при наличии картинки иконка скрыта —
   остаётся ОДИН логотип. Если фото не загрузилось (onerror удаляет <img>),
   иконка снова проявляется. */
#ps-onboarding .ps-ob-logo-img + i { display: none !important; }

/* ---------- HERO: премиальная подача логотипа (стеклянная карточка + рамка + halo) ---------- */
.ps-ob-hero-art { position: relative; }

/* Мягкое пульсирующее свечение-halo ЗА карточкой (выходит за её пределы — премиальный glow) */
.ps-ob-hero-glow {
  position: absolute;
  inset: -14%;
  z-index: 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(239,68,68,.55), rgba(224,178,79,.16) 46%, transparent 70%);
  filter: blur(22px);
  animation: ps-ob-pulse 4.8s ease-in-out infinite;
  pointer-events: none;
}

/* Премиальная градиентная рамка по краю карточки (red -> gold), повторяет её форму.
   Это ДЕКОР по периметру — он не пересекает и не закрывает логотип. */
.ps-ob-hero-ring {
  position: absolute;
  inset: clamp(5px, 1.7vw, 9px);
  z-index: 1;
  border-radius: clamp(20px, 5.6vw, 31px);
  padding: 1.5px;
  background: linear-gradient(135deg,
    var(--ps-ob-accent) 0%,
    rgba(255,120,90,1) 38%,
    var(--ps-ob-gold) 72%,
    rgba(255,255,255,.22) 100%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
          mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
          mask-composite: exclude;
  opacity: .9;
  filter: drop-shadow(0 0 6px rgba(239,68,68,.45)) drop-shadow(0 0 10px rgba(224,178,79,.25));
  pointer-events: none;
}
.ps-ob-hero-ring::before { content: none; }

/* Контейнер логотипа: прозрачный, просто центрирует лого на стекле карточки.
   Отступ задаём через inset (НЕ через большой padding / height / transform) — лого крупное и НЕ режется. */
.ps-ob-hero-mark {
  position: absolute;
  inset: clamp(18px, 6vw, 30px);
  z-index: 2;
  display: grid;
  /* явный 1fr-трек: высота области определена -> height:100% лого резолвится одинаково во всех браузерах */
  grid-template: 1fr / 1fr;
  place-items: center;
  background: none;
  border: 0;
  /* осознанно: НИКАКОГО overflow:hidden / transform / фикс. height, что могло бы обрезать лого */
}
.ps-ob-hero-mark::before { content: none; }

/* Иконка-фолбэк (нет лого клуба) — фирменная пика в red/gold */
.ps-ob-hero-art .ps-ob-hero-mark i {
  position: relative;
  font-size: clamp(46px, 15vw, 88px);
  line-height: 1;
  color: var(--ps-ob-gold);
  filter:
    drop-shadow(0 6px 14px rgba(0,0,0,.55))
    drop-shadow(0 0 16px rgba(224,178,79,.40))
    drop-shadow(0 0 26px rgba(239,68,68,.30));
}

/* Логотип клуба: вписан в карточку, object-fit:contain — НЕ режется и НЕ сплющивается.
   Никаких aspect-ratio/cover/жёстких размеров, ломающих пропорции. */
.ps-ob-hero-mark .ps-ob-logo-img {
  position: relative;
  inset: auto;
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
  filter: drop-shadow(0 8px 18px rgba(0,0,0,.5));
}

/* ---------- Композиция ПЕРВОГО экрана (premium intro, без пустых дыр) ---------- */
.ps-ob-panel[data-panel="0"] {
  /* центрируем блок целиком; safe — не прячем верх при переполнении на низких экранах */
  justify-content: safe center;
  align-items: center;
  text-align: center;
  gap: clamp(4px, 1.4vw, 12px);
  padding-top: clamp(10px, 3vw, 22px);
  padding-bottom: clamp(16px, 4vw, 26px);
}
/* premium-ширина колонки на планшете/desktop — контент не растягивается как попало */
.ps-ob-panel[data-panel="0"] > * { max-width: 440px; }
.ps-ob-panel[data-panel="0"] .ps-ob-h1 { margin: 0; }
.ps-ob-panel[data-panel="0"] .ps-ob-sub { margin: 4px 0 0; }
.ps-ob-panel[data-panel="0"] .ps-ob-text { margin: 6px auto 0; max-width: 34ch; }
.ps-ob-panel[data-panel="0"] .ps-ob-stats { margin: clamp(10px, 2.6vw, 16px) 0 0; }
/* CTA первого экрана НЕ приклеиваем к низу — идёт логично сразу после статистики */
.ps-ob-panel[data-panel="0"] .ps-ob-cta {
  position: static;
  width: 100%;
  align-self: center;
  margin: clamp(14px, 3.2vw, 22px) 0 0;
  padding: 0;
  background: none;
}

/* ---------- Экран «Атмосфера клуба» (слайд-шоу) — центрированная композиция ---------- */
.ps-ob-panel[data-panel="1"] {
  align-items: center;
  text-align: center;
}
.ps-ob-panel[data-panel="1"] .ps-ob-kicker { align-self: center; }
.ps-ob-panel[data-panel="1"] .ps-ob-text {
  margin-left: auto;
  margin-right: auto;
}
.ps-ob-panel[data-panel="1"] .ps-ob-slideshow { align-self: center; }
/* липкую CTA-плашку оставляем во всю ширину (фон-градиент перекрывает контент под кнопкой) */
.ps-ob-panel[data-panel="1"] .ps-ob-cta { align-self: stretch; }

@keyframes ps-ob-pulse { 0%,100% { opacity:.65; transform:scale(.98); } 50% { opacity:1; transform:scale(1.06); } }
@keyframes ps-ob-spin { to { transform: rotate(360deg); } }

/* ---------- Слайд-шоу клуба (экран 1) — адаптивная premium-карточка ---------- */
.ps-ob-slideshow {
  position: relative;
  width: 100%;
  max-width: 460px;                 /* на широких экранах галерея не растягивается */
  margin: clamp(2px, 1vw, 6px) 0 2px;
  display: flex;
  flex-direction: column;
}
/* Визуальная карточка: скругление/клиппинг/фон/тень здесь (а не на контейнере) */
.ps-ob-slides {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: clamp(16px, 4.5vw, 22px);
  overflow: hidden;
  background: var(--ps-ob-card);
  border: 1px solid var(--ps-ob-brd);
  box-shadow: var(--shadow-lg, 0 18px 40px -16px rgba(0,0,0,.7));
}
@media (min-width: 600px) { .ps-ob-slides { aspect-ratio: 16 / 10; } }

.ps-ob-slide {
  position: absolute; inset: 0; margin: 0;
  opacity: 0; transform: scale(1.05);
  transition: opacity 700ms ease, transform 6000ms ease;
  pointer-events: none;
}
.ps-ob-slide.is-active { opacity: 1; transform: scale(1); pointer-events: auto; }
.ps-ob-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ps-ob-slide.is-ph img { display: none; }

/* Плейсхолдер-контент — СТРОГО по центру слайда при любой высоте карточки */
.ps-ob-slide-ph {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: clamp(8px, 2vw, 12px);
  padding: clamp(16px, 5vw, 26px);
  background:
    radial-gradient(120% 120% at 20% 0%, rgba(239,68,68,.30), transparent 55%),
    radial-gradient(120% 120% at 100% 100%, rgba(163,38,50,.30), transparent 55%),
    var(--ps-ob-card);
}
.ps-ob-slide.is-ph .ps-ob-slide-ph { display: flex; }
.ps-ob-slide-ph i {
  font-size: clamp(34px, 8vw, 58px);
  line-height: 1;
  color: rgba(255,255,255,.92);
  filter: drop-shadow(0 6px 16px rgba(0,0,0,.45));
}
.ps-ob-slide-ph span {
  font-size: clamp(13px, 3.4vw, 17px);
  line-height: 1.2;
  font-weight: 700;
  color: var(--ps-ob-text);
  max-width: min(260px, 72%);
}

/* Подпись — отдельная нижняя плашка по центру, не мешает центральному тексту */
.ps-ob-slide figcaption {
  position: absolute;
  left: clamp(14px, 4vw, 22px);
  right: clamp(14px, 4vw, 22px);
  bottom: clamp(14px, 4vw, 22px);
  z-index: 3;
  text-align: center;
  font-size: clamp(11px, 2.8vw, 14px);
  line-height: 1.25;
  font-weight: 600;
  color: #fff;
  background: rgba(0,0,0,.42);
  -webkit-backdrop-filter: blur(3px);
          backdrop-filter: blur(3px);
  padding: clamp(7px, 2vw, 10px) clamp(10px, 3vw, 14px);
  border-radius: clamp(10px, 3vw, 14px);
  border: 1px solid rgba(255,255,255,.10);
  text-shadow: 0 1px 4px rgba(0,0,0,.5);
}

.ps-ob-slide-zoom {
  position: absolute; top: 10px; right: 10px;
  width: 32px; height: 32px; border-radius: 10px;
  display: grid; place-items: center;
  background: rgba(0,0,0,.40);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  color: #fff; font-size: 15px; z-index: 3;
  opacity: 0; transition: opacity var(--ps-ob-t);
}
.ps-ob-slide.is-active .ps-ob-slide-zoom { opacity: .9; }
.ps-ob-slide.is-ph .ps-ob-slide-zoom { display: none; }

/* Стрелки — по вертикальному центру КАРТОЧКИ (лежат внутри .ps-ob-slides) */
.ps-ob-snav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: clamp(30px, 8vw, 40px); height: clamp(30px, 8vw, 40px);
  border-radius: 50%;
  border: 0; background: rgba(0,0,0,.42); color: #fff;
  font-size: clamp(18px, 5vw, 22px); cursor: pointer; z-index: 4;
  display: grid; place-items: center;
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  transition: background var(--ps-ob-t), transform var(--ps-ob-t);
}
.ps-ob-snav:hover { background: rgba(0,0,0,.64); }
.ps-ob-snav:active { transform: translateY(-50%) scale(.92); }
.ps-ob-snav--prev { left: clamp(6px, 2vw, 10px); }
.ps-ob-snav--next { right: clamp(6px, 2vw, 10px); }

/* Точки — ПОД карточкой, по центру, в потоке (не поверх текста/подписи) */
.ps-ob-slide-dots {
  display: flex;
  justify-content: center;
  gap: 7px;
  margin-top: clamp(10px, 2.8vw, 16px);
}
.ps-ob-sdot {
  width: 7px; height: 7px; border-radius: 999px; border: 0; padding: 0;
  background: rgba(255,255,255,.30); cursor: pointer;
  transition: width var(--ps-ob-t), background var(--ps-ob-t);
}
.ps-ob-sdot.is-active { width: 20px; background: var(--ps-ob-grad); }

/* ---------- Живой рейтинг (экран 3) ---------- */
.ps-ob-rating { display: flex; flex-direction: column; gap: 14px; }
.ps-ob-podium--live { align-items: flex-end; justify-content: center; margin: 18px 0 4px; gap: 10px; }
.ps-ob-podium--live .ps-ob-pod {
  flex: 1 1 0; min-width: 0;
  padding: 12px 8px 14px;
  justify-content: flex-start;
}
.ps-ob-podium--live .ps-ob-pod--1 { height: 172px; }
.ps-ob-podium--live .ps-ob-pod--2 { height: 142px; }
.ps-ob-podium--live .ps-ob-pod--3 { height: 120px; }
.ps-ob-podium--live .ps-ob-pod .ps-ob-medal { margin-bottom: 6px; width: 34px; height: 34px; font-size: 14px; }
.ps-ob-pod-crown {
  position: absolute; top: -15px; left: 50%; transform: translateX(-50%);
  font-size: 24px; color: var(--ps-ob-gold);
  filter: drop-shadow(0 2px 8px rgba(224,178,79,.6));
}
.ps-ob-pod-name {
  max-width: 100%;
  font-size: 12.5px; font-weight: 700; color: var(--ps-ob-text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  text-align: center; line-height: 1.2;
}
.ps-ob-pod-pts {
  margin-top: 3px;
  font-size: 15px; font-weight: 800; line-height: 1;
  background: linear-gradient(120deg, var(--ps-ob-accent) 0%, var(--ps-ob-gold) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.ps-ob-pod-pts span {
  font-size: 10px; font-weight: 600; margin-left: 3px;
  color: var(--ps-ob-muted); -webkit-text-fill-color: var(--ps-ob-muted);
}
.ps-ob-rank { display: flex; flex-direction: column; gap: 6px; }
.ps-ob-rank-row {
  display: flex; align-items: center; gap: 12px;
  background: rgba(255,255,255,.03);
  border: 1px solid var(--ps-ob-brd);
  border-radius: 12px;
  padding: 11px 14px;
}
.ps-ob-rank-pos { flex: 0 0 22px; text-align: center; font-size: 13px; font-weight: 800; color: var(--ps-ob-muted); }
.ps-ob-rank-name {
  flex: 1 1 auto; min-width: 0;
  font-size: 14px; font-weight: 600; color: var(--ps-ob-text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ps-ob-rank-pts { flex: 0 0 auto; font-size: 14px; font-weight: 800; color: var(--ps-ob-gold); }

/* ---- Компактный premium-hero на смартфонах (<=480px): меньше карточка, крупный логотип ---- */
@media (max-width: 480px) {
  .ps-ob-hero-art {
    width: clamp(150px, 44vw, 188px);
    margin: 2px auto 14px;
  }
  .ps-ob-hero-mark { inset: clamp(15px, 5.4vw, 24px); }
  .ps-ob-hero-glow { filter: blur(16px); opacity: .9; }
  /* кнопки на телефоне не гигантские */
  .ps-ob-btn { padding: 14px 20px; font-size: 15.5px; }
  .ps-ob-top { padding-left: 14px; padding-right: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .ps-ob-hero-glow, .ps-ob-hero-ring, .ps-ob-hero-art::after { animation: none !important; }
  .ps-ob-slide { transition: opacity 300ms ease !important; transform: none !important; }
  .ps-ob-slide.is-active { transform: none !important; }
}

/* ---- Кликабельная ссылка на платформу ПокерСистема ---- */
.ps-ob-ps-link {
  color: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 6px;
  transition: color var(--ps-ob-t);
}
.ps-ob-ps-link:hover { color: var(--ps-ob-text); text-decoration: underline; text-underline-offset: 2px; }
.ps-ob-poweredby .ps-ob-ps-link { color: var(--ps-ob-text); display: inline; }
