* {
  box-sizing: border-box;
  /* Запрещаем выделение текста зажатием по всему приложению */
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
  tap-highlight-color: transparent;
}
/* Возвращаем выделение только для полей ввода */
input, textarea, [contenteditable="true"] {
  -webkit-user-select: text;
  user-select: text;
}

/* Убираем синюю подсветку тапа/focus в WebView Telegram */
button, a, .nav-btn, .menu-list li, [role="button"], summary {
  outline: none;
  -webkit-focus-ring-color: transparent;
}
button:focus, button:focus-visible,
.nav-btn:focus, .nav-btn:focus-visible,
.menu-list li:focus, summary:focus {
  outline: none;
  box-shadow: none;
}

:root {
  --ink: #09090b;
  --surface: #111114;
  --surface-up: #18181c;
  --stroke: #242428;
  --stroke-lo: #1c1c20;
  --text: #e6e6e6;
  --text-2: #9a9a9a;
  --muted: #5e5e5e;
  --lime: #94b534;
  --lime-hi: #a8c83a;
  --lime-lo: #627a24;
  --lime-ink: #0a0a0a;
  --lime-dim: rgba(163, 203, 56, 0.10);
  --lime-glow: rgba(163, 203, 56, 0.12);
  --err: #e06060;
  --nav-circle: 48px;
  --nav-pad: 12px;
  --nav-dock-h: calc(var(--nav-circle) + var(--nav-pad));
  --tg-top: env(safe-area-inset-top, 0px);
  --tg-bottom: env(safe-area-inset-bottom, 0px);
  --app-vh: 100dvh;
  --nav-gap: 6px;
  /* Радиусы: micro → control → card → shell → pill. Карта в UI_KIT.md */
  --r-xs: 6px;
  --r-sm: 10px;
  --r-md: 12px;
  --r: 14px;
  --r-lg: 18px;
  --r-xl: 22px;
  --r-shell: 36px;
  --r-modal: 38px;
  --r-pill: 999px;
  /* Алиас: семантическое имя для линии-границы */
  --border: var(--stroke);
  --shadow-sm: 0 4px 10px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.45);
  --shadow-modal: 0 24px 64px rgba(0, 0, 0, 0.45);
  --pass-accent: #8ce95b;
  --pass-plaque: #14151b;
  --pass-plaque-2: #1a1f25;
  --nick-gold: #ffc652;
  --nick-cyan: #5be4e9;
  --nick-crimson: #ff4d6d;
  --nick-violet: #c4a0ff;
  --nick-azure: #5eb0ff;
  --nick-orange: #ff8a3d;
  --nick-rose: #ff6b9d;
  --nick-mint: #5dffc0;
  --nick-white: #f3f4f0;
  --nick-ice: #b8dcff;
  --nick-magenta: #ff4ad8;
}

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

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  /* Лочим высоту — иначе при клавиатуре 100% сжимается и градиенты «прыгают» */
  height: var(--app-vh, 100dvh);
  min-height: var(--app-vh, 100dvh);
  overflow: hidden;
  background: var(--ink);
}
/* Containing block для .bg-scene / .app-root — не visualViewport */
html {
  position: relative;
}
body {
  position: relative;
}
html:not([data-theme="light"]) body {
  background:
    radial-gradient(ellipse 90% 55% at 50% -8%, rgba(255,255,255,0.035), transparent 58%),
    radial-gradient(ellipse 45% 35% at 100% 100%, rgba(35,40,52,0.22), transparent 62%),
    linear-gradient(168deg, #0c0c0f 0%, #09090b 48%, #0a0b0a 100%);
}
html[data-theme="light"] body,
body.theme-light {
  background: var(--ink);
}

body {
  font-family: "Tilda Sans", "Rubik", system-ui, sans-serif;
  color: var(--text);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}

/* ── Фон: паттерн-полотно + партикли ── */
/* absolute от html/body с залоченной --app-vh — fixed прыгает вместе с visualViewport */
.bg-scene {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.bg-pattern {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #000;
}
.bg-pattern__zoom {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 0;
  pointer-events: none;
  transform: translate3d(-50%, -50%, 0) scale(1);
  transform-origin: center center;
  backface-visibility: hidden;
  contain: layout style;
}
.bg-pattern__texture {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 280vmax;
  height: 280vmax;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
  backface-visibility: hidden;
  filter: saturate(0.72) brightness(0.76);
  opacity: 0.86;
  transform: translate3d(-50%, -50%, 0);
}
body.boot-bg-zoom .bg-pattern__texture {
  filter: saturate(0.72) brightness(0.76);
  opacity: 0.86;
  transition: none !important;
}
body.theme-light.boot-bg-zoom .bg-pattern__texture,
html[data-theme="light"] body.boot-bg-zoom .bg-pattern__texture {
  filter: saturate(0.86) brightness(0.93);
  opacity: 0.92;
  transition: none !important;
}
body.theme-light .bg-pattern,
html[data-theme="light"] .bg-pattern {
  background: #c5d2e6;
}
body.theme-light .bg-pattern__texture,
html[data-theme="light"] .bg-pattern__texture {
  filter: saturate(0.86) brightness(0.93);
  opacity: 0.92;
}
body.boot-loading .bg-particles {
  opacity: 0;
  pointer-events: none;
}
.bg-pattern__art {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 280vmax;
  height: 280vmax;
  pointer-events: none;
  transform: translate3d(-50%, -50%, 0);
  transform-origin: center center;
  backface-visibility: hidden;
}
.bg-pattern__art .bg-pattern__texture {
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  transform: none;
}
.bg-pattern__shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 1;
  transition: opacity 1.7s ease;
  background:
    radial-gradient(ellipse 90% 55% at 50% -8%, rgba(0,0,0,0.76) 0%, transparent 58%),
    radial-gradient(ellipse 45% 35% at 100% 100%, rgba(0,0,0,0.84) 0%, transparent 62%),
    linear-gradient(168deg, rgba(0,0,0,0.82) 0%, rgba(0,0,0,0.64) 48%, rgba(0,0,0,0.78) 100%),
    rgba(0,0,0,0.38);
}
body.boot-bg-zoom .bg-pattern__shade {
  opacity: 1;
  transition: none !important;
}
body.theme-light .bg-pattern__shade,
html[data-theme="light"] .bg-pattern__shade {
  background:
    radial-gradient(ellipse 90% 55% at 50% -8%, rgba(255,255,255,0.28) 0%, transparent 58%),
    radial-gradient(ellipse 45% 35% at 100% 100%, rgba(150,170,205,0.22) 0%, transparent 62%),
    linear-gradient(168deg, rgba(255,255,255,0.22) 0%, rgba(195,210,230,0.14) 48%, rgba(205,218,235,0.18) 100%);
}
/* Партикли: bg.js синхронизирует bitmap с боксом сцены (иначе на Desktop — овалы) */
.bg-particles {
  position: absolute;
  left: 0;
  top: 0;
  display: block;
  transform: translateZ(0);
  opacity: 1;
  transition: opacity 0.4s ease;
}

/* ── Стеклянные поверхности — граффити просвечивает сквозь ── */
/* CSS-переменные для адаптивных полупрозрачных поверхностей */
:root {
  --glass-nav:    rgba(10, 10, 10, 0.86);
  --glass-card:   rgba(15, 15, 15, 0.84);
  --glass-banner: rgba(18, 18, 18, 0.80);
}
body.theme-light {
  --glass-nav:    rgba(228, 231, 238, 0.84);
  --glass-card:   rgba(232, 235, 242, 0.82);
  --glass-banner: rgba(222, 226, 236, 0.78);
}

/* ── Корневой контейнер: в залоченном html/body, не в visualViewport ── */
.app-root {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  display: flex;
  flex-direction: column;
  padding-top: var(--tg-top);
  box-sizing: border-box;
  overflow: hidden;
  background: transparent;
}
/* Навбар при клавиатуре прячем — он всё равно уходит под неё */
body.keyboard-open .bottom-nav {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s ease;
}

#screen-app {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.app-page {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.app-page.loader-screen {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: stretch;
  gap: 0;
  padding: 0;
  box-sizing: border-box;
  background: transparent;
  opacity: 1;
  transition: opacity 0.32s ease;
}
.app-page.loader-screen.is-leaving {
  opacity: 0;
  pointer-events: none;
}

.web-login-screen {
  position: fixed;
  inset: 0;
  z-index: 45;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--tg-top) + 24px) 24px calc(var(--tg-bottom) + 24px);
  background: transparent;
  box-sizing: border-box;
}
.web-login-inner {
  max-width: 320px;
  width: 100%;
  margin: 0 auto;
  text-align: center;
  max-height: 100%;
  overflow-y: auto;
}
.web-login-kicker {
  margin: 0 0 8px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.web-login-title {
  margin: 0 0 8px;
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.15;
  color: var(--text);
}
.web-login-lead {
  margin: 0 0 20px;
  color: var(--muted);
  line-height: 1.45;
  font-size: 0.92rem;
}
.web-login-widget {
  display: flex;
  justify-content: center;
  min-height: 40px;
  margin-bottom: 12px;
}
.web-login-or {
  margin: 4px 0 14px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.web-login-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
  margin-bottom: 8px;
}
.web-login-form .vml-flow-label {
  margin: 4px 0 0;
}
.web-login-form .action {
  margin-top: 8px;
}
.web-login-err {
  margin: 0 0 12px;
  color: var(--err);
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.4;
}
.web-login-screen .action {
  margin-top: 8px;
}

body.boot-loading #bottom-nav,
body.boot-loading .wallet-fixed {
  visibility: hidden !important;
  pointer-events: none !important;
  opacity: 0 !important;
}

.app-page.hidden { display: none !important; }

.ban-screen {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: var(--app-vh);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--tg-top) + 24px) 24px calc(var(--tg-bottom) + 24px);
  background: var(--ink);
  z-index: 300;
  box-sizing: border-box;
}

body.ban-active .bg-scene {
  display: none;
}

body.ban-active .app-root {
  padding-top: 0;
}

.ban-screen-inner {
  max-width: 360px;
  width: 100%;
  margin: 0 auto;
  text-align: center;
}

.ban-icon-x {
  width: 56px;
  height: 56px;
  margin: 0 auto 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ban-icon-x svg {
  display: block;
  width: 48px;
  height: 48px;
}

.ban-title {
  margin: 0 0 12px;
  font-size: 1.5rem;
  color: #fff;
}

.ban-message {
  margin: 0 0 10px;
  color: #eee;
  font-size: 1rem;
  line-height: 1.5;
}

.ban-until {
  margin: 0 0 16px;
  color: var(--muted, #888);
  font-size: 0.9rem;
}

.ban-hint {
  margin: 0;
  color: var(--muted, #666);
  font-size: 0.82rem;
  line-height: 1.45;
}

.sanction-overlay {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: var(--app-vh);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--tg-top) + 24px) 24px calc(var(--tg-bottom) + 24px);
  background: rgba(0, 0, 0, 0.92);
  z-index: 400;
  box-sizing: border-box;
  opacity: 0;
  transition: opacity 0.28s ease;
}
.sanction-overlay.hidden { display: none !important; }
.sanction-overlay.is-open { opacity: 1; }
.sanction-overlay.is-closing { opacity: 0; }
.sanction-overlay-inner {
  max-width: 360px;
  width: 100%;
  margin: 0 auto;
  text-align: center;
  opacity: 0;
  transform: scale(0.92) translateY(14px);
  transition: opacity 0.3s ease, transform 0.34s cubic-bezier(0.22, 1, 0.36, 1);
}
.sanction-overlay.is-open .sanction-overlay-inner {
  opacity: 1;
  transform: scale(1) translateY(0);
}
.sanction-overlay.is-closing .sanction-overlay-inner {
  opacity: 0;
  transform: scale(0.96) translateY(10px);
}
.sanction-overlay-head {
  margin: 0 0 20px;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  color: #f0c060;
  line-height: 1.35;
}
.sanction-overlay-ico {
  width: 64px;
  height: 64px;
  margin: 0 auto 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(224, 96, 96, 0.15);
  color: #e06060;
}
.sanction-overlay-ico .ico-svg { width: 34px; height: 34px; }
.sanction-overlay-kind {
  margin: 0 0 8px;
  font-size: 1.6rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  color: #e06060;
  text-transform: uppercase;
}
.sanction-overlay-amount {
  margin: 0 0 14px;
  font-size: 2rem;
  font-weight: 900;
  color: #e06060;
}
.sanction-overlay-reason {
  margin: 0 0 24px;
  color: #eee;
  font-size: 0.95rem;
  line-height: 1.5;
}

.deposit-success-overlay {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: var(--app-vh);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--tg-top) + 24px) 24px calc(var(--tg-bottom) + 24px);
  background: rgba(0, 0, 0, 0.92);
  z-index: 410;
  box-sizing: border-box;
  opacity: 0;
  transition: opacity 0.28s ease;
}
.deposit-success-overlay.hidden { display: none !important; }
.deposit-success-overlay.is-open { opacity: 1; }
.deposit-success-overlay.is-closing { opacity: 0; }
.deposit-success-overlay-inner {
  max-width: 360px;
  width: 100%;
  margin: 0 auto;
  text-align: center;
  opacity: 0;
  transform: scale(0.92) translateY(14px);
  transition: opacity 0.3s ease, transform 0.34s cubic-bezier(0.22, 1, 0.36, 1);
}
.deposit-success-overlay.is-open .deposit-success-overlay-inner {
  opacity: 1;
  transform: scale(1) translateY(0);
}
.deposit-success-overlay.is-closing .deposit-success-overlay-inner {
  opacity: 0;
  transform: scale(0.96) translateY(10px);
}
.deposit-success-overlay-ico {
  width: 72px;
  height: 72px;
  margin: 0 auto 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(211, 239, 130, 0.16);
  border: 1px solid rgba(211, 239, 130, 0.35);
  color: var(--accent);
}
.deposit-success-overlay-ico .ico-svg { width: 34px; height: 34px; }
.deposit-success-overlay-kind {
  margin: 0 0 10px;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
}
.deposit-success-overlay-amount {
  margin: 0 0 10px;
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.1;
  color: var(--text);
}
.deposit-success-overlay-subtitle {
  margin: 0 0 28px;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--muted);
}

.loader-screen {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: stretch;
  gap: 0;
}

/* Шапка — обычная часть скролла, не закреплена */
.app-top {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 12px 2px 8px;
}

.app-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 0 12px calc(var(--nav-dock-h) + var(--nav-gap) * 2 + var(--tg-bottom) + 16px);
  background: transparent;
}

/* ── Pull-to-refresh (каталог) ── */
.pull-refresh-indicator {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  height: 0; overflow: hidden; opacity: 0;
  color: var(--muted); font-size: 0.7rem; font-weight: 700;
  will-change: height, opacity;
  pointer-events: none;
}
.pull-refresh-indicator.pulling,
.pull-refresh-indicator.loading { opacity: 1; }
.pull-refresh-indicator.settling {
  transition: height 0.22s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.16s ease;
}
.pull-refresh-spinner {
  width: 16px; height: 16px; flex-shrink: 0;
  border: 2px solid var(--stroke); border-top-color: var(--lime);
  border-radius: 50%;
}
.pull-refresh-indicator.pulling .pull-refresh-spinner {
  transition: transform 0.05s linear;
}
.pull-refresh-indicator.loading .pull-refresh-spinner { animation: pull-refresh-spin 0.7s linear infinite; }
@keyframes pull-refresh-spin { to { transform: rotate(360deg); } }

body.nav-hidden .app-scroll {
  padding-bottom: calc(var(--tg-bottom) + 16px);
}

/* Страница турнира: контент в оболочке Figma, навбар скрыт */
body.tournament-tab-active {
  /* один ряд 36px: назад / share / Набор / баланс — общий top */
  --td-chrome-pad: 35px;
  --td-row-h: 36px;
}
body.tournament-tab-active .app-scroll {
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  /* --tg-top уже на .app-root */
  padding-top: var(--td-chrome-pad);
  padding-bottom: calc(var(--tg-bottom) + 16px);
}
body.tournament-tab-active.brand-hidden .app-scroll {
  padding-top: var(--td-chrome-pad);
}
body.tournament-tab-active #panel-tournament.active {
  flex: 1 1 auto;
  min-height: 0;
}

/* Привязка аккаунтов: inset как у соседних brand-hidden экранов, без скролла.
   HUD Telegram не должен перекрывать «назад»/заголовок. */
body.social-link-tab-active,
body.social-link-tab-active .app-scroll,
body.social-link-tab-active #panel-social-link.active,
body.social-link-tab-active .accounts-page,
body.social-link-tab-active #accounts-form-card {
  overflow: hidden;
  overflow-anchor: none;
  overscroll-behavior: none;
}
body.social-link-tab-active .app-scroll {
  display: flex;
  flex-direction: column;
  padding-top: calc(var(--tg-top) + 8px);
  padding-bottom: calc(var(--tg-bottom) + 8px);
}
body.social-link-tab-active.brand-hidden .app-scroll {
  padding-top: calc(var(--tg-top) + 8px);
  padding-bottom: calc(var(--tg-bottom) + 8px);
}
body.social-link-tab-active #panel-social-link.active {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
body.social-link-tab-active .accounts-page {
  flex: 1 1 auto;
  min-height: 0;
  gap: 6px;
  padding-bottom: 0;
}
body.social-link-tab-active #accounts-form-card {
  flex: 0 1 auto;
  min-height: 0;
}
#panel-social-link .accounts-shell {
  padding: 10px 14px;
  gap: 6px;
}
#panel-social-link .accounts-info {
  padding: 10px 18px;
}
#panel-social-link .accounts-info p {
  line-height: 1.3;
}

/* Баланс — только на нужных экранах */
body.wallet-hidden .wallet-fixed {
  display: none;
}

/* Страница выбора режима: без шапки и без скролла, сетка на весь экран */
body.mode-tab-active .app-scroll {
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
body.mode-tab-active .app-top {
  display: none;
}

/* Логотип только на экранах нижнего навбара */
body.brand-hidden .app-top {
  display: none;
}
/* Без лого — опускаем контент и баланс под хром Telegram */
body.brand-hidden .wallet-fixed {
  top: calc(var(--tg-top) + 12px);
}
body.brand-hidden .app-scroll {
  padding-top: calc(var(--tg-top) + 8px);
}
/* Турнир: баланс в DOM-ряду chrome — не fixed, иначе top вечно разъезжается */
body.tournament-tab-active .wallet-in-td-chrome.wallet-fixed {
  position: static !important;
  top: auto !important;
  right: auto !important;
  left: auto !important;
  z-index: auto;
  align-items: flex-end;
  min-height: var(--td-row-h);
  gap: 6px;
}
body.tournament-tab-active .wallet-in-td-chrome .header-balance {
  height: var(--td-row-h);
  min-height: var(--td-row-h);
  padding: 0 14px;
  box-sizing: border-box;
}
body.mode-tab-active .panel-mode-full.active {
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
  padding: calc(var(--tg-top) + 12px) 12px calc(var(--tg-bottom) + 12px);
}
body.brand-hidden.mode-tab-active .app-scroll {
  padding-top: 0;
}
body.brand-hidden.mode-tab-active .panel-mode-full.active {
  padding-top: calc(var(--tg-top) + 14px);
}

/* ── Баланс: единственный закреплённый элемент сверху ── */
.header-wallet-col {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
}
.wallet-fixed {
  position: fixed;
  top: calc(var(--tg-top) + 46px);
  right: 12px;
  z-index: 25;
}
.wallet-fixed .header-balance {
  background: var(--glass-nav);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}
body.theme-light .wallet-fixed .header-balance {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}
.prize-hold-block {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: linear-gradient(135deg, rgba(200, 255, 80, 0.12), rgba(200, 255, 80, 0.04));
  border: 1px solid rgba(200, 255, 80, 0.35);
  border-radius: 12px;
  max-width: 100%;
}
.prize-hold-ico { display: flex; color: var(--lime); font-size: 0.9rem; }
.prize-hold-body {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.prize-hold-label {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.prize-hold-amount {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--lime-hi);
  font-variant-numeric: tabular-nums;
}
.prize-hold-timer {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--lime);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.prize-hold-profile {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(200, 255, 80, 0.06);
  border: 1px solid rgba(200, 255, 80, 0.2);
}
.prize-hold-profile-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.t-map-chip {
  margin: 4px 0 0;
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 600;
}
.t-map-banner {
  margin-bottom: 10px;
}
.t-map-banner .t-map-chip {
  display: inline-block;
  padding: 6px 10px;
  background: var(--surface);
  border: 1px solid var(--stroke);
  border-radius: 999px;
  margin: 0;
}
.history-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.history-card {
  display: flex;
  gap: 12px;
  padding: 10px;
  border-radius: var(--r-md);
  background: var(--surface-up);
  border: 1px solid var(--stroke);
  align-items: stretch;
}
.history-card-map {
  flex: 0 0 72px;
  width: 72px;
  height: 72px;
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(145deg, #1c1c24 0%, #0e0e14 100%);
  border: 1px solid var(--stroke);
  display: flex;
  align-items: center;
  justify-content: center;
}
.history-card-map img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
}
.history-card-map-fallback {
  color: var(--lime);
  opacity: 0.7;
}
.history-card-map-fallback .ico-svg {
  width: 28px;
  height: 28px;
}
.history-card-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  justify-content: center;
}
.history-card-title-row {
  display: flex;
  align-items: flex-start;
  gap: 6px;
}
.history-medal {
  font-size: 1rem;
  line-height: 1.2;
  flex-shrink: 0;
}
.history-card-title {
  margin: 0;
  font-size: 0.86rem;
  font-weight: 800;
  line-height: 1.25;
  color: var(--text);
}
.history-card-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.history-pill {
  font-size: 0.64rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  line-height: 1.3;
}
.history-pill.place {
  background: rgba(200, 255, 80, 0.12);
  color: var(--lime-hi);
  border: 1px solid rgba(200, 255, 80, 0.25);
}
.history-pill.prize {
  background: rgba(200, 255, 80, 0.2);
  color: var(--lime);
  border: 1px solid rgba(200, 255, 80, 0.35);
}
.history-pill.map {
  background: var(--surface);
  color: var(--muted);
  border: 1px solid var(--stroke);
}
.history-card-foot {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.68rem;
  color: var(--muted);
  font-weight: 600;
}
.history-fee { white-space: nowrap; }
.rating-stats-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px;
  margin-bottom: 4px;
}
.rating-stat {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 10px 4px; background: var(--surface-up); border: 1px solid var(--stroke);
  border-radius: 10px;
}
.rating-stat-val { font-size: 1rem; font-weight: 800; color: var(--lime-hi); font-variant-numeric: tabular-nums; }
.rating-stat-lbl { font-size: 0.56rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); text-align: center; }

.rating-history-list { display: flex; flex-direction: column; gap: 8px; }
.rating-history-row {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 10px 12px; background: var(--surface-up); border: 1px solid var(--stroke);
  border-radius: 10px;
}
.rating-history-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rating-history-place { font-size: 0.76rem; font-weight: 700; color: var(--text); }
.rating-history-date { font-size: 0.62rem; font-weight: 600; color: var(--muted); }
.rating-history-vals { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.rating-history-old { font-size: 0.68rem; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.rating-delta { font-size: 0.78rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.rating-delta.positive { color: var(--lime-hi); }
.rating-delta.negative { color: var(--err); }
.rating-delta.neutral { color: var(--muted); }
.deposit-history-list { display: flex; flex-direction: column; gap: 10px; }
.deposit-history-row {
  padding: 12px;
  border-radius: 12px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--stroke);
}
.deposit-history-main {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 6px;
}
.deposit-history-amount {
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent);
}
.deposit-history-provider { font-size: 0.75rem; color: var(--muted); }
.deposit-history-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.68rem;
  color: var(--muted);
  font-weight: 600;
}
.deposit-history-status.paid { color: #4ade80; }
.deposit-history-row.out .deposit-history-amount { color: #f87171; }
.deposit-history-status.failed { color: #f87171; }
.deposit-history-status.created { color: #fbbf24; }
.deposit-history-status.failed,
.deposit-history-status.expired { color: #f87171; }
.t-map-card-thumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}
.t-map-card-thumb-img {
  flex: 0 0 52px;
  width: 52px;
  height: 52px;
  border-radius: 10px;
  overflow: hidden;
  background: linear-gradient(145deg, #1c1c24 0%, #0e0e14 100%);
  border: 1px solid var(--stroke);
  display: flex;
  align-items: center;
  justify-content: center;
}
.t-map-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
}
.t-map-card-thumb span {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  line-height: 1.2;
}
.header-balance {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 11px;
  background: var(--surface);
  border: 1px solid var(--stroke);
  border-radius: 999px;
  font-family: inherit;
  color: var(--text);
  cursor: pointer;
  flex-shrink: 0;
}
.header-balance .stat-ico { display: flex; color: var(--lime); }
.header-balance .stat-ico .ico-svg { width: 16px; height: 16px; }
.header-balance .value {
  font-size: 0.86rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--lime-hi);
}
.header-balance .value small {
  font-size: 0.58rem;
  font-weight: 600;
  color: var(--muted);
}
.header-balance .balance-held {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--muted);
  margin-left: 2px;
}
.header-balance .balance-held small {
  font-size: 0.52rem;
}
.t-meta.t-done { color: var(--lime-hi); }

/* ── Баланс на главной (legacy) ── */
.home-balance {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  padding: 9px 12px;
  background: var(--surface);
  border: 1px solid var(--stroke);
  border-radius: var(--r);
}
.home-balance .stat-ico { display: flex; color: var(--lime); }
.home-balance .stat-ico .ico-svg { width: 16px; height: 16px; }
.home-balance .stat-data {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}
.home-balance .stat-data .label {
  font-size: 0.52rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.home-balance .stat-data .value {
  font-size: 0.92rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--lime-hi);
}
.home-balance .stat-data .value small {
  font-size: 0.58rem;
  font-weight: 600;
  color: var(--muted);
}

.profile-stats { margin-bottom: 10px; }
.profile-stats .stat-chip .stat-ico { display: flex; color: var(--lime); }
.profile-stats .stat-chip .stat-ico .ico-svg { width: 14px; height: 14px; margin-bottom: 2px; }

#toast { position: fixed; z-index: 60; }

/* ── Brand ── */
.brand { display: flex; align-items: center; gap: 9px; min-width: 0; }
.brand-text { min-width: 0; }

.brand-logo {
  width: 116px;
  height: 42px;
  position: relative;
  overflow: hidden;
  contain: paint;
  flex-shrink: 0;
}
#brand-lottie {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1080px;
  height: 2340px;
  transform: translate(-50%, -50%) scale(0.14);
  transform-origin: center center;
  pointer-events: none;
}
#brand-lottie canvas,
#brand-lottie svg {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

.brand h1 {
  font-size: 1.1rem; font-weight: 900; margin: 0;
  letter-spacing: 0.07em; color: var(--lime-hi);
}
.greeting-line {
  margin: 0; font-size: 0.64rem; font-weight: 600; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.pill-admin, .pill-mod {
  font-size: 0.52rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.05em; padding: 3px 7px; border-radius: 6px;
  background: var(--lime-dim); color: var(--lime); border: 1px solid var(--lime-lo);
}

/* ── Stats bar ── */
.stats-bar {
  flex-shrink: 0;
  display: flex;
  margin: 0 12px 10px;
  background: var(--surface); border: 1px solid var(--stroke);
  border-radius: var(--r); overflow: hidden;
}
.stat-chip {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  gap: 1px; padding: 8px 4px; min-width: 0;
  border-right: 1px solid var(--stroke-lo);
  background: none; border-top: none; border-bottom: none; border-left: none;
  font: inherit; color: inherit; position: relative;
}
.stat-chip:last-child { border-right: none; }
.stat-chip .stat-ico { display: none; }
.stat-chip-clickable { cursor: pointer; -webkit-tap-highlight-color: transparent; padding-right: 22px; }
.stat-chip-clickable:active { background: var(--surface-up); }
.stat-chip-arrow {
  display: flex; position: absolute; top: 50%; right: 8px;
  transform: translateY(-50%);
  width: 14px; height: 14px; color: var(--lime); opacity: 0.8;
}
.stat-chip-arrow .ico-svg { width: 100%; height: 100%; }
.stat-data { display: flex; flex-direction: column; align-items: center; min-width: 0; }
.stat-data .label {
  font-size: 0.48rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--muted);
}
.stat-data .value {
  font-size: 0.82rem; font-weight: 800; font-variant-numeric: tabular-nums;
  color: var(--lime-hi);
}
.stat-data .value small { font-size: 0.52rem; font-weight: 600; color: var(--muted); }

/* ── Panels ── */
.panel { display: none; }
.panel.active { display: block; }
/* Завеса до первого кадра enter: display:none→block в WebView иначе вспыхивает на 1 кадр. */
.panel.active.is-enter-pending {
  opacity: 0 !important;
}
/* Не display:none на главной: WebView сбрасывает bitmap кубка и карт, они «доезжают» после возврата. */
#panel-home.panel:not(.active) {
  display: block;
  visibility: hidden;
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  pointer-events: none;
  z-index: -1;
}

.feed-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 8px;
  margin: 4px 0 10px;
}
.section-title {
  font-size: 0.65rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.14em; color: var(--lime); margin: 0;
}
.feed-count { font-size: 0.65rem; font-weight: 600; color: var(--muted); }
.link-btn {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--lime);
  cursor: pointer;
}

/* ── Card (общий: формы, лобби, меню) ── */
.card {
  background: var(--glass-card);
  border: 1px solid var(--stroke);
  border-radius: var(--r); padding: 12px; margin-bottom: 10px;
}
.card .section-title { margin-bottom: 10px; }
.card.highlight { border-color: var(--lime-lo); }

.info-box {
  font-size: 0.76rem; color: var(--muted); background: var(--ink);
  border-radius: var(--r-sm); padding: 9px 11px; line-height: 1.5;
  border: 1px solid var(--stroke);
}

/* ── Tournament card (Figma 146:113, 1030×473) ── */
.t-card {
  --card-accent: #96c230;
  --card-art: none;
  position: relative;
  width: 100%;
  margin-bottom: 14px;
  padding: 0;
  color: #fff;
  background: transparent;
  border: 0;
  box-shadow: none;
  box-sizing: border-box;
}
.t-card-stage {
  position: relative;
  container-type: inline-size;
  container-name: tcard;
  aspect-ratio: 1030 / 473;
  width: 100%;
  overflow: hidden;
  isolation: isolate;
  background: #0e1408;
  border: 0;
  /*
    Figma corner 52.55×52.55 @ 1030×473.
    % от собственной ширины/высоты — иначе cqw на самом контейнере
    берёт предка и в 2 колонках углы становятся слишком круглыми.
  */
  border-radius: 5.1% / 11.11%;
  box-shadow: 0 4px 14px rgba(0,0,0,0.45);
  box-sizing: border-box;
}
/* Рамка карточки — inline SVG (currentColor), без CSS-mask (mask давала вспышку заливки) */
.t-card-outline {
  position: absolute; inset: 0; z-index: 4;
  width: 100%;
  height: 100%;
  display: block;
  color: var(--card-accent);
  pointer-events: none;
  overflow: visible;
}
.t-card-art {
  position: absolute; inset: 0; z-index: 0;
  background-image: var(--card-art);
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
}
.t-card-gradient {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  /* Figma Gradient (горизонталь) + лёгкий вертикальный scrim */
  background:
    linear-gradient(
      90deg,
      rgba(28, 30, 22, 1) 0%,
      rgba(0, 0, 0, 0.22) 50%,
      rgba(28, 30, 22, 0.58) 100%
    ),
    linear-gradient(
      180deg,
      rgba(0, 0, 0, 0.18) 0%,
      transparent 38%,
      rgba(0, 0, 0, 0.28) 100%
    );
}
.t-card.mode-brawlball .t-card-gradient,
.t-card.mode-3v3 .t-card-gradient {
  background:
    linear-gradient(90deg, rgba(22, 30, 30, 1) 0%, rgba(0, 0, 0, 0.22) 50%, rgba(22, 30, 30, 0.58) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.18) 0%, transparent 38%, rgba(0, 0, 0, 0.28) 100%);
}
.t-card.mode-duels .t-card-gradient {
  background:
    linear-gradient(90deg, rgba(30, 22, 22, 1) 0%, rgba(0, 0, 0, 0.22) 50%, rgba(30, 22, 22, 0.58) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.18) 0%, transparent 38%, rgba(0, 0, 0, 0.28) 100%);
}
.t-card.mode-gemgrab .t-card-gradient {
  background:
    linear-gradient(90deg, rgba(28, 22, 30, 1) 0%, rgba(0, 0, 0, 0.22) 50%, rgba(28, 22, 30, 0.58) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.18) 0%, transparent 38%, rgba(0, 0, 0, 0.28) 100%);
}
.t-card.mode-bounty .t-card-gradient {
  background:
    linear-gradient(90deg, rgba(30, 30, 22, 1) 0%, rgba(0, 0, 0, 0.22) 50%, rgba(30, 30, 22, 0.58) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.18) 0%, transparent 38%, rgba(0, 0, 0, 0.28) 100%);
}
.t-card-glass {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; pointer-events: none;
  /* Figma Glass 146:113 — top 65.56% / H 34.44%; fill opacity 0.25, почти без blur */
  height: 34.44%;
  background: linear-gradient(to bottom left, rgba(54, 66, 47, 0.25) 0%, rgba(0, 0, 0, 0.25) 100%);
  /* в исходнике фрост едва заметен — CSS blur только намёк */
  backdrop-filter: blur(1.5px);
  -webkit-backdrop-filter: blur(1.5px);
}
.t-card-glass::before {
  content: "";
  position: absolute; left: 0; right: 0; top: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.06) 0%,
    rgba(255, 255, 255, 0.22) 18%,
    rgba(255, 255, 255, 0.22) 82%,
    rgba(255, 255, 255, 0.06) 100%
  );
  pointer-events: none;
}
.t-card.mode-showdown { --card-accent: #96c230; --card-art: url("/miniapp/assets/bs/bg/card-showdown.png?v=2"); }
.t-card.mode-brawlball,
.t-card.mode-3v3 { --card-accent: #4b9599; --card-art: url("/miniapp/assets/bs/bg/card-brawlball.png"); }
.t-card.mode-gemgrab { --card-accent: #703cd9; --card-art: url("/miniapp/assets/bs/bg/card-gemgrab.png"); }
.t-card.mode-knockout { --card-accent: #ef7f2a; --card-art: url("/miniapp/assets/bs/bg/card-knockout.png"); }
.t-card.mode-bounty { --card-accent: #e5bd39; --card-art: url("/miniapp/assets/bs/bg/card-bounty.png"); }
.t-card.mode-duels { --card-accent: #b71c1c; --card-art: url("/miniapp/assets/bs/bg/card-duels.png"); }
.t-card.mode-default .t-card-stage {
  aspect-ratio: auto;
  min-height: 120px;
  border: 1px solid var(--stroke);
  background: var(--surface);
  color: var(--text);
  box-shadow: none;
  border-radius: 16px;
}
.t-card.mode-default .t-card-art,
.t-card.mode-default .t-card-gradient,
.t-card.mode-default .t-card-glass,
.t-card.mode-default .t-card-outline,
.t-card.mode-default .t-card-mode-icon { display: none; }

/* PNG-стикер режима поверх зелёного угла Outline (140×158 @ 35,26) */
.t-card-mode-icon {
  position: absolute; z-index: 5;
  left: 3.37%; top: 5.56%;
  width: 13.59%; height: 33.4%;
  object-fit: contain;
  object-position: center;
  pointer-events: none;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.45));
}

/* Режим + название турнира: колонка в потоке — зазор от последней строки режима */
.t-card-text-up {
  position: absolute;
  left: 22.91%;
  top: 7.4%;
  width: 48.5%;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.12em; /* чуть плотнее к режиму */
  pointer-events: none;
}
.t-card .t-title {
  position: static;
  width: 100%;
  margin: 0;
  font-family: "Unbounded", "Tilda Sans", sans-serif;
  font-size: 3.45cqw;
  font-weight: 700;
  line-height: 1.15;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0;
  /* без «…»: одно слово целиком; 2+ слова — через <br> в две строки */
  white-space: nowrap;
  overflow: visible;
  text-overflow: clip;
  text-shadow: 0 1px 3px rgba(0,0,0,0.55);
}
.t-card .t-title.is-multiline {
  white-space: normal;
  line-height: 1.12;
}
.t-card-sub {
  position: static;
  width: 100%;
  margin: 0;
  font-family: "Tilda Sans", "Rubik", sans-serif;
  font-size: 4.08cqw;
  font-weight: 500;
  line-height: 1.26;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

/* Map pin — низ у верхнего края тамба (44.4%); строки растут вверх. left: центр тамба */
.t-card-map-pin {
  position: absolute; z-index: 5;
  left: 82.7%;
  top: auto;
  right: auto;
  bottom: calc(100% - 44.4% + 0.7% + 5px);
  transform: translateX(-50%);
  width: max-content;
  max-width: 30%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 1.2cqw;
  min-height: 15.64%;
  height: auto;
  padding: 1.2cqw 2.4cqw 1.2cqw 1.8cqw;
  border-radius: 999px;
  background: linear-gradient(to top right, rgba(0,0,0,0.25) 0%, rgba(54,66,47,0.25) 100%);
  backdrop-filter: blur(14px) saturate(1.1);
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
  font-family: "Tilda Sans", sans-serif;
  font-size: 3.2cqw;
  font-weight: 500;
  color: #fff;
  white-space: normal;
  box-sizing: border-box;
  text-align: center;
  text-shadow: 0 0.26cqw 1cqw rgba(0,0,0,0.25);
}
.t-card.mode-3v3 .t-card-map-pin,
.t-card.mode-brawlball .t-card-map-pin,
.t-card.mode-duels .t-card-map-pin,
.t-card.mode-gemgrab .t-card-map-pin,
.t-card.mode-bounty .t-card-map-pin,
.t-card.mode-knockout .t-card-map-pin {
  left: 82.5%;
}
.t-card-map-pin .t-card-meta-ico {
  width: 5.15cqw; height: 5.15cqw;
  color: var(--card-accent);
  flex-shrink: 0;
  filter: drop-shadow(0 0.26cqw 1cqw rgba(0,0,0,0.25));
}
.t-card-map-pin-text {
  overflow: visible;
  text-overflow: clip;
  white-space: pre-line;
  line-height: 1.15;
  text-align: left;
  hyphens: none;
  word-break: keep-all;
}

/* Money row — Text center 26,226 / 694×68 */
.t-card-money {
  position: absolute; z-index: 5;
  left: 2.55%; top: 47.78%;
  width: 67.38%; height: 14.38%;
  display: flex; align-items: stretch; gap: 1.55%;
}
.t-pill-fee, .t-pill-prize {
  flex: 1 1 0;
  min-width: 0;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: "Unbounded", "Tilda Sans", sans-serif;
  font-size: 3.57cqw;
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1.25; /* Figma box 46/36.78 */
  border-radius: 999px;
  color: #fff;
  white-space: nowrap;
  padding: 0 1.5cqw;
  box-sizing: border-box;
}
.t-pill-fee {
  /* Figma Left: градиент opacity 0.75 (верх→низ) + стеклянный фрост */
  background: linear-gradient(to bottom left, rgba(54, 66, 47, 0.75) 0%, rgba(0, 0, 0, 0.75) 100%);
  backdrop-filter: blur(10px) saturate(1.1);
  -webkit-backdrop-filter: blur(10px) saturate(1.1);
}
.t-pill-prize {
  /* Figma Right: сплошной accent + зелёное свечение (drop-shadow radius 26px) */
  background: var(--card-accent);
  box-shadow: 0 0 2.55cqw color-mix(in srgb, var(--card-accent) 85%, transparent);
}
.t-pill-prize--empty { visibility: hidden; }

/* Map thumb — Showdown: 231×231 @ 71.4%/44.4%; 3v3/Duels/etc: 154×231 @ 75%/44.4% */
.t-card-map-thumb {
  position: absolute; z-index: 5;
  left: 71.46%; top: 44.4%;
  width: 22.43%;
  aspect-ratio: 1;
  border-radius: var(--r-md);
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--card-accent) 72%, #fff);
  background-color: var(--card-accent);
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  box-sizing: border-box;
  box-shadow: 0 0.5cqw 2cqw rgba(0,0,0,0.28);
}
.t-card-map-thumb img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center;
  border-radius: inherit;
  background: var(--card-accent);
  display: block;
  opacity: 1;
  transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
/* Портретные карты (Gem Grab / Bounty / Brawl Ball / Duels / Knockout): 154×231, aspect ≈ 0.668 */
.t-card.mode-3v3 .t-card-map-thumb,
.t-card.mode-brawlball .t-card-map-thumb,
.t-card.mode-duels .t-card-map-thumb,
.t-card.mode-gemgrab .t-card-map-thumb,
.t-card.mode-bounty .t-card-map-thumb,
.t-card.mode-knockout .t-card-map-thumb {
  left: 75%;
  width: 15%;
  aspect-ratio: 154.5 / 231.22;
}
.t-card.mode-3v3 .t-card-map-thumb img,
.t-card.mode-brawlball .t-card-map-thumb img,
.t-card.mode-duels .t-card-map-thumb img,
.t-card.mode-gemgrab .t-card-map-thumb img,
.t-card.mode-bounty .t-card-map-thumb img,
.t-card.mode-knockout .t-card-map-thumb img {
  inset: 0;
  width: 100%; height: 100%;
  border-radius: inherit;
  object-fit: cover;
  object-position: center;
}

/* Foot — Text down @ 26,326; icon rows top 68.9% / 83.3%, each 53px (11.2%) */
.t-card-foot { position: static; }
.t-card-stat {
  position: absolute; z-index: 5;
  left: 2.55%;
  height: 11.2%;
  display: flex;
  align-items: center;
  gap: 1.55cqw;
  color: #fff;
}
.t-card-foot .t-card-stat:first-child { top: 66.8%; }
.t-card-foot .t-card-stat:last-child { top: 81.2%; }
.t-card-stat .t-card-meta-ico {
  width: 5.15cqw; height: 5.15cqw;
  color: var(--card-accent);
  flex-shrink: 0;
}
.t-card-stat-text {
  font-family: "Tilda Sans", sans-serif;
  font-size: 3.57cqw;
  font-weight: 500;
  line-height: 1.44; /* Figma box 53/36.78 */
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 2px rgba(0,0,0,0.35);
}

.t-card.hero-spotlight { margin-bottom: 14px; }
.t-card.hero-spotlight.mode-default {
  border-color: var(--lime-lo);
  background-image: linear-gradient(160deg, rgba(163,203,56,0.05) 0%, var(--surface) 60%);
}

.t-card-top { display: flex; gap: 10px; align-items: flex-start; position: relative; z-index: 1; }

.t-sticker { flex-shrink: 0; width: 56px; height: 56px; display: flex; align-items: center; justify-content: center; }
.t-sticker.lg { width: 62px; height: 62px; }
.t-mode-img { width: 100%; height: 100%; object-fit: contain; display: block; filter: drop-shadow(1px 2px 0 rgba(0,0,0,0.7)); mix-blend-mode: multiply; }
/* Квадрат иконки турнира: залит цветом дисциплины + обводка */
.t-mode-square {
  width: 50px; height: 50px; border-radius: 13px;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid rgba(255,255,255,0.22);
  box-shadow: 0 4px 12px rgba(0,0,0,0.35);
  overflow: hidden;
}
.t-mode-square.mode-showdown { background: linear-gradient(160deg, #b6e34a, #8fb733); border-color: rgba(0,0,0,0.25); }
.t-mode-square.mode-3v3 { background: linear-gradient(160deg, #14707a, #0c4650); border-color: rgba(255,255,255,0.28); }
.t-mode-square.mode-default { background: var(--surface-up); border-color: var(--stroke); }
.t-mode-square-img {
  width: 92%; height: 92%; object-fit: contain; display: block;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.45));
}
.t-mode-fallback-ico {
  width: 46px; height: 46px; display: flex; align-items: center; justify-content: center;
  border-radius: 12px; background: var(--surface-up); color: var(--lime);
}
.t-mode-fallback-ico .ico-svg { width: 26px; height: 26px; }

.t-card-body { flex: 1; min-width: 0; padding-top: 1px; }
.t-mode-label {
  font-size: 0.56rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--lime); margin-bottom: 3px;
}
.t-card.mode-default .t-title {
  position: relative;
  font-family: "Tilda Sans", "Rubik", sans-serif;
  font-size: 0.95rem; font-weight: 800; line-height: 1.2;
  margin: 0 0 4px; color: var(--text);
  text-transform: none;
}
.t-line { font-size: 0.72rem; font-weight: 600; color: var(--text-2); }
.t-line strong { color: var(--text); font-weight: 800; }
.t-line .prize { color: var(--lime-hi); }
.t-card-status { flex-shrink: 0; padding-top: 1px; }

.t-fill { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.t-fill-bar {
  flex: 1; height: 5px; background: var(--stroke); border-radius: 99px; overflow: hidden;
}
.t-fill-bar > span {
  display: block; height: 100%; background: var(--lime);
  border-radius: 99px; transition: width 0.3s ease;
}
.t-item { padding: 0; }
#my-tournaments .t-card { contain: layout style; }
.t-map-card-thumb { display: none !important; }
.t-meta { font-size: 0.66rem; color: var(--muted); margin-top: 6px; font-weight: 600; }

.t-card-meta-row {
  display: flex; flex-wrap: wrap; align-items: center; gap: 5px;
  margin-top: 7px;
}
.t-card-meta-pill {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 0.67rem; font-weight: 700; color: var(--text-2);
  font-variant-numeric: tabular-nums;
  background: var(--surface-up);
  border: 1px solid var(--stroke);
  border-radius: 20px;
  padding: 3px 8px 3px 6px;
  white-space: nowrap;
}
.t-card-meta-pill-map {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.6rem;
}
/* backward compat alias */
.t-card-meta-item { display: inline-flex; align-items: center; gap: 5px; font-size: 0.72rem; font-weight: 700; color: var(--text-2); }
.t-card-meta-ico { display: inline-flex; width: 12px; height: 12px; color: var(--lime); flex-shrink: 0; }
.t-card-meta-ico .ico-svg { width: 100%; height: 100%; }

/* ── Статусы ── */
.status {
  font-size: 0.5rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.04em; padding: 3px 7px; border-radius: 6px;
  white-space: nowrap; border: 1px solid transparent;
}
.status.filling { background: var(--lime); color: var(--lime-ink); }
.status.full { background: var(--surface-up); color: var(--text); border-color: var(--stroke); }
.status.scheduled { background: var(--surface-up); color: var(--muted); border-color: var(--stroke); }
.status.live { background: var(--lime); color: var(--lime-ink); }
.status.verifying { background: rgba(224,96,96,0.12); color: var(--err); border-color: var(--err); }
.status.completed { background: var(--surface-up); color: var(--muted); }

/* «мой» — правый верхний угол карточки */
.t-card-stage > .badge-mine {
  position: absolute;
  z-index: 6;
  top: 4.2%;
  right: 3.2%;
  left: auto;
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: "Tilda Sans", "Rubik", sans-serif;
  font-size: 2.7cqw;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1;
  padding: 1.4cqw 2.2cqw;
  border-radius: 999px;
  white-space: nowrap;
  border: 0;
  text-shadow: none;
  background: var(--card-accent, var(--lime));
  color: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
  pointer-events: none;
}
.badge-mine {
  display: inline-block;
  font-size: 0.5rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 3px 7px;
  border-radius: 6px;
  white-space: nowrap;
  border: 1px solid transparent;
  text-shadow: none;
  background: var(--card-accent, var(--lime));
  color: #fff;
  box-shadow: none;
}

/* ── Progress (legacy) ── */
.progress { height: 5px; background: var(--stroke); border-radius: 99px; margin-top: 10px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--lime); border-radius: 99px; }

/* ── Inputs ── */
input {
  width: 100%; padding: 11px 12px; margin: 5px 0;
  border-radius: var(--r-sm); border: 1px solid var(--stroke);
  background: var(--surface-up); color: var(--text);
  font-family: inherit; font-size: 0.9rem; font-weight: 600;
}
input:focus { outline: none; border-color: var(--lime); }
input::placeholder { color: var(--muted); }

/* Обёртка поля: лейбл + контрол + подсказка одним блоком */
.field-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 10px;
}
.field-group > input { margin: 0; }

/* Подсказка под полем / под списком */
.hint {
  margin: 6px 0 0;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.45;
  color: var(--muted);
}

/* ── Кнопки ── */
/* Иерархия: primary (лайм) > secondary > ghost > devtool */

button.action {
  width: 100%; padding: 11px 14px;
  border: 1.5px solid var(--lime-lo); border-radius: var(--r-sm);
  font-family: inherit; font-weight: 800; font-size: 0.86rem;
  margin-top: 8px;
  background: var(--lime); color: var(--lime-ink);
  cursor: pointer;
  box-shadow: none;
  transition: transform 0.08s, opacity 0.08s;
}
button.action:active:not(:disabled) {
  transform: scale(0.98);
  opacity: 0.92;
}
button.action:disabled { opacity: 0.4; cursor: not-allowed; box-shadow: none; }
button.action.btn-loading { color: transparent; position: relative; }
button.action.btn-loading::after {
  content: ""; position: absolute;
  width: 16px; height: 16px;
  border: 2px solid rgba(0,0,0,0.15); border-top-color: var(--lime-ink);
  border-radius: 50%; left: 50%; top: 50%; margin: -8px 0 0 -8px;
  animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

button.secondary {
  background: var(--surface-up); color: var(--text);
  border-color: var(--stroke); box-shadow: none;
}
button.action.danger {
  background: transparent;
  color: var(--err);
  border-color: color-mix(in srgb, var(--err) 55%, var(--stroke));
  box-shadow: none;
}
button.action.danger:active:not(:disabled) {
  background: color-mix(in srgb, var(--err) 12%, transparent);
}
button.warn { background: var(--lime-lo); color: #eee; border-color: #4a7020; box-shadow: none; }
button.ghost {
  background: transparent; border-color: var(--stroke);
  color: var(--muted); box-shadow: none;
}
/* Кнопки-тесты в sandbox — минимальные */
button.devtool {
  width: auto; padding: 5px 10px; margin-top: 8px;
  border: 1px solid var(--stroke); border-radius: 6px;
  font-family: inherit; font-size: 0.68rem; font-weight: 600;
  background: transparent; color: var(--muted); cursor: pointer; box-shadow: none;
}
button.devtool:active { opacity: 0.6; }

button.row { flex: 1; margin-top: 0; padding: 10px 8px; font-size: 0.8rem; }
/* Компактная ширина по контенту — для инлайновых действий в строке */
button.action.small {
  width: auto;
  padding: 8px 14px;
  font-size: 0.78rem;
}
.row-btns, .btn-row { display: flex; gap: 8px; margin-top: 8px; }
.btn-row .action { flex: 1; margin-top: 0; }

/* Кнопки действий внутри карточек турниров */
.t-card .btn-row {
  margin-top: 10px;
  justify-content: center;
}
.t-card .btn-row button.action {
  flex: none;
  width: auto;
  min-width: min(100%, 220px);
  padding: 10px 18px;
  font-size: 0.82rem;
  border-radius: 10px;
  box-shadow: none;
  border-width: 1.5px;
  text-align: center;
}
.btn-icon { display: inline-flex; align-items: center; justify-content: center; gap: 5px; }
.btn-icon .ico-svg { width: 15px; height: 15px; }

/* Текстовая ссылка-навигация */
.btn-text-link {
  background: none; border: none; padding: 0; margin-top: 12px;
  font-family: inherit; font-size: 0.8rem; font-weight: 700;
  color: var(--lime); cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; gap: 4px;
}

/* ── Timeline / лобби ── */
.timeline { display: flex; justify-content: space-between; margin: 10px 0; position: relative; }
.timeline::before {
  content: ""; position: absolute; top: 10px; left: 8%; right: 8%;
  height: 1px; background: var(--stroke);
}
.tl-step {
  flex: 1; text-align: center; position: relative; z-index: 1;
  font-size: 0.48rem; font-weight: 700; color: var(--muted);
}
.tl-dot {
  width: 20px; height: 20px; border-radius: 50%; margin: 0 auto 3px;
  background: var(--surface-up); border: 1px solid var(--stroke);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.54rem; font-weight: 900;
}
.tl-step.done .tl-dot { background: var(--lime-dim); border-color: var(--lime-lo); color: var(--lime); }
.tl-step.active .tl-dot { background: var(--lime); border-color: var(--lime); color: var(--lime-ink); }
.tl-step.active { color: var(--text); }

.step-banner {
  border-radius: var(--r-sm); padding: 10px 11px; margin: 8px 0;
  background: var(--glass-banner);
  border-left: 3px solid var(--lime);
  font-size: 0.78rem; font-weight: 600;
}
.step-banner-compact { padding: 7px 11px; font-size: 0.75rem; color: var(--text-2); }
.step-banner strong {
  display: block; margin-bottom: 2px; font-size: 0.55rem;
  text-transform: uppercase; letter-spacing: 0.08em; color: var(--lime); font-weight: 800;
}
.t-card .step-banner {
  border-left-color: var(--card-accent, var(--lime));
  background: color-mix(in srgb, var(--card-accent, var(--lime)) 20%, var(--glass-banner));
}
.t-card .step-banner strong { color: var(--card-accent, var(--lime)); }
.t-dispute-btn { margin-top: 8px; width: 100%; }

.lobby-code-wrap {
  text-align: center; margin: 10px 0; padding: 16px;
  border-radius: var(--r); background: var(--surface-up);
  border: 1px solid var(--lime-lo);
}
.lobby-code {
  font-size: 1.8rem; font-weight: 900; letter-spacing: 0.14em;
  color: var(--lime-hi); font-variant-numeric: tabular-nums;
}
.lobby-link-hint {
  margin: 10px 0 0;
  font-size: 0.72rem;
  line-height: 1.45;
  color: var(--muted);
  text-align: center;
}

.lobby-steps { margin: 8px 0; padding: 0; list-style: none; font-size: 0.76rem; color: var(--text-2); }
.lobby-steps li { display: flex; align-items: flex-start; margin: 5px 0; }
.step-num {
  width: 20px; height: 20px; border-radius: 6px;
  background: var(--lime-dim); color: var(--lime);
  font-size: 0.58rem; font-weight: 900;
  display: inline-flex; align-items: center; justify-content: center;
  margin-right: 7px; flex-shrink: 0;
}

.lobby-list { list-style: none; padding: 0; margin: 8px 0 0; }
.lobby-list li {
  display: flex; justify-content: space-between;
  padding: 8px 0; border-bottom: 1px solid var(--stroke);
  font-size: 0.8rem; font-weight: 600;
}
.lobby-list li:last-child { border-bottom: none; }
.lobby-list .check { color: var(--lime); }

.avatar {
  width: 48px; height: 48px; border-radius: 12px;
  background: var(--surface-up); border: 1px solid var(--lime-lo);
  display: flex; align-items: center; justify-content: center;
  font-weight: 900; color: var(--lime);
}
.profile-row { display: flex; gap: 10px; align-items: flex-start; }

/* ── Icons ── */
.ico-svg { width: 20px; height: 20px; display: block; flex-shrink: 0; }
.empty-art .ico-svg { width: 40px; height: 40px; color: var(--muted); }

/* ── Empty states ── */
.empty-state { text-align: center; padding: 24px 16px; }
.empty-art { display: flex; justify-content: center; margin-bottom: 10px; }
.empty-title { font-size: 0.9rem; font-weight: 800; margin: 0 0 4px; }
.empty-text { font-size: 0.74rem; color: var(--muted); margin: 0 0 4px; font-weight: 600; }
.empty { text-align: center; padding: 18px; color: var(--muted); font-size: 0.8rem; font-weight: 600; }

/* ── Skeleton ── */
.skeleton {
  height: 88px; border-radius: var(--r); margin-bottom: 8px;
  background: linear-gradient(90deg, var(--surface) 25%, var(--surface-up) 50%, var(--surface) 75%);
  background-size: 200% 100%; animation: shimmer 1.2s infinite;
  border: 1px solid var(--stroke);
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ── Навбар: плавающий, поверх контента ── */
.bottom-nav {
  /* absolute от залоченной --app-vh: клавиатура сжимает окно, но не этот контейнер */
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: max(8px, var(--tg-bottom), env(safe-area-inset-bottom, 0px));
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  margin: 0;
  background: var(--glass-nav);
  backdrop-filter: blur(14px) saturate(1.3);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  border: 1px solid var(--stroke);
  border-radius: 999px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
  max-width: calc(100% - 24px);
  overflow-x: auto;
  scrollbar-width: none;
}
.bottom-nav::-webkit-scrollbar { display: none; }

.nav-btn {
  flex: 0 0 auto;
  width: var(--nav-circle); height: var(--nav-circle);
  border: 1px solid var(--stroke); border-radius: 50%;
  background: transparent; color: var(--muted);
  padding: 0; display: flex; align-items: center; justify-content: center;
  cursor: pointer; position: relative;
  transition: border-color 0.12s, color 0.12s, background 0.12s;
  -webkit-appearance: none;
  appearance: none;
}
.nav-btn:active {
  opacity: 0.85;
  transform: scale(0.96);
}
.nav-btn.active {
  border-color: var(--lime); background: var(--lime); color: var(--lime-ink);
}
.nav-ico { display: flex; }
.nav-ico .ico-svg { width: 22px; height: 22px; }
.nav-label { display: none; }
.nav-btn .dot {
  position: absolute; top: 1px; right: 1px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--err); border: 1.5px solid var(--ink); display: none;
}
.nav-btn.active .dot { border-color: var(--lime); }
.nav-btn.has-alert .dot { display: block; }

.chip-alert-dot {
  position: absolute; top: 6px; right: 6px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--err); border: 1.5px solid var(--surface);
  pointer-events: none;
}
.chip-alert-dot.hidden { display: none; }

/* Friends modal */
.friends-modal-sheet #modal-body { max-height: min(70vh, 520px); overflow: auto; }
.friend-tabs {
  display: flex; gap: 4px; margin-bottom: 10px;
  background: var(--surface); border: 1px solid var(--stroke);
  border-radius: 999px; padding: 3px;
}
.friend-tab {
  flex: 1; border: 0; background: transparent; color: var(--muted);
  font: inherit; font-size: 0.72rem; font-weight: 800;
  padding: 7px 6px; border-radius: 999px; cursor: pointer;
  position: relative;
}
.friend-tab.is-active { background: var(--lime); color: var(--lime-ink); }
.friend-tab-dot {
  display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  background: var(--err); margin-left: 4px; vertical-align: middle;
}
.friend-tab.is-active .friend-tab-dot { background: var(--lime-ink); }
.friend-subtabs { display: flex; gap: 6px; margin-bottom: 8px; }
.friend-subtab {
  border: 1px solid var(--stroke); background: var(--surface);
  color: var(--muted); font: inherit; font-size: 0.7rem; font-weight: 700;
  padding: 5px 10px; border-radius: 999px; cursor: pointer;
}
.friend-subtab.is-active { border-color: var(--lime); color: var(--lime-hi); }
.friend-list { display: flex; flex-direction: column; gap: 6px; }
.friend-row {
  position: relative;
  isolation: isolate;
  display: flex; align-items: center; gap: 6px;
  background: var(--surface); border: 1px solid var(--stroke);
  border-radius: var(--r); padding: 8px 10px;
  overflow: hidden;
  min-height: 58px;
}
.friend-row--bg {
  background-color: var(--ink);
  background-image: var(--friend-bg);
  background-size: cover;
  background-position: center;
}
.friend-row--default {
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(140, 233, 91, 0.28), transparent 60%),
    linear-gradient(180deg, #1b1c1f 0%, #121314 100%);
  border-color: transparent;
}
body.theme-light .friend-row--default,
html[data-theme="light"] .friend-row--default {
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(55, 135, 255, 0.38), transparent 58%),
    linear-gradient(180deg, #3a4a5c 0%, #2a3544 100%);
}
.friend-row--bg::after,
.friend-row--default::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.42), rgba(0, 0, 0, 0.18) 55%, rgba(0, 0, 0, 0.32));
}
body.theme-light .friend-row--bg::after,
html[data-theme="light"] .friend-row--bg::after,
body.theme-light .friend-row--default::after,
html[data-theme="light"] .friend-row--default::after {
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.28), rgba(0, 0, 0, 0.1) 55%, rgba(0, 0, 0, 0.22));
}
.friend-row > .pp-media-bg { z-index: 0; border-radius: inherit; }
.friend-row-main {
  position: relative;
  z-index: 2;
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px;
  background: none; border: 0; padding: 0; color: inherit; font: inherit;
  text-align: left; cursor: pointer;
}
.friend-avatar {
  width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem; font-weight: 800; color: #fff;
}
.friend-row--bg .friend-avatar,
.friend-row--default .friend-avatar {
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.22);
}
.friend-row-pill {
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex: 0 1 auto;
  width: max-content;
  min-width: 0;
  max-width: min(100%, 12.5rem);
  padding: 4px 10px 5px;
  border-radius: var(--r-pill);
  background: var(--glass-card);
  border: 1px solid var(--stroke);
}
.friend-row-info { display: flex; flex-direction: column; min-width: 0; }
.friend-row-name {
  font-size: 0.84rem; font-weight: 800; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.friend-row-meta {
  font-size: 0.68rem; color: var(--text-2); white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.friend-row-actions {
  position: relative;
  z-index: 2;
  display: flex; align-items: center; gap: 4px; flex-shrink: 0;
}
.friend-icon-btn {
  width: 30px; height: 30px; border-radius: 8px;
  border: 1px solid var(--stroke); background: var(--surface-up);
  color: var(--text); font-size: 0.85rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  padding: 0;
}
.friend-icon-btn.danger { color: var(--err); }
.friend-icon-btn:active { background: var(--stroke-lo); }
.friend-fav-ico {
  width: 18px;
  height: 18px;
  display: block;
  pointer-events: none;
}
.btn-sm { padding: 6px 10px !important; font-size: 0.72rem !important; }

/* ── Лидерборд ──
   Шапка и док «ваше место» закреплены, скроллится только .lb-scroll. */
body.leaderboard-tab-active .app-scroll {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding-left: 0;
  padding-right: 0;
  padding-bottom: 0;
}
body.leaderboard-tab-active #panel-leaderboard.active {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 8px 0 0;
}
body.battlepass-tab-active .app-root {
  padding-top: 0;
  background: transparent;
}
body.battlepass-tab-active .app-scroll {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 0;
}
body.battlepass-tab-active #panel-battlepass.active {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 0;
}
body.battlepass-tab-active .bottom-nav {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.panel-leaderboard.active { display: block; padding: 8px 12px 24px; }
.lb-page {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
}
.lb-head {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 12px 10px;
}
.lb-page-head { margin: 2px 0 2px; }
.lb-controls { display: flex; flex-direction: column; gap: 8px; }
.lb-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 2px 12px calc(var(--nav-dock-h) + var(--tg-bottom) + 16px);
}
body.nav-hidden .lb-scroll {
  padding-bottom: calc(var(--tg-bottom) + 16px);
}
.lb-page-body { display: flex; flex-direction: column; gap: 12px; }

/* Сегментированный переключатель — по киту: пилюля-контейнер, активный лайм */
.lb-seg {
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: var(--r-pill);
  background: var(--surface);
  border: 1px solid var(--stroke);
}
.lb-seg-btn {
  flex: 1 1 0;
  min-width: 0;
  min-height: 34px;
  padding: 8px 10px;
  border: 0;
  border-radius: var(--r-pill);
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease;
}
.lb-seg-btn.is-active { background: var(--lime); color: var(--lime-ink); }
.lb-board-tabs .lb-seg-btn { font-size: 0.88rem; }
.lb-period-tabs { background: transparent; border-color: transparent; padding: 0 2px; gap: 6px; }
.lb-period-tabs .lb-seg-btn {
  min-height: 32px;
  padding: 6px 12px;
  font-size: 0.72rem;
  border: 1px solid var(--stroke);
  background: var(--surface-up);
}
.lb-period-tabs .lb-seg-btn.is-active {
  background: var(--lime-dim, color-mix(in srgb, var(--lime) 18%, transparent));
  border-color: var(--lime);
  color: var(--lime-hi);
}

/* Режимы: иконки вместо названий */
.lb-mode-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  flex-wrap: nowrap;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding: 2px 2px 0;
}
.lb-mode-tabs::-webkit-scrollbar { display: none; }
.lb-mode-tab {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 6px 14px;
  border-radius: var(--r-pill);
  border: 1px solid var(--stroke);
  background: var(--surface-up);
  color: var(--text-2);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
}
.lb-mode-tab--ico { width: 44px; padding: 4px; }
.lb-mode-ico {
  width: 26px;
  height: 26px;
  object-fit: contain;
  opacity: 0.55;
  transition: opacity 0.18s ease;
  pointer-events: none;
}
.lb-mode-tab.is-active {
  border-color: var(--lime);
  color: var(--lime-hi);
  background: color-mix(in srgb, var(--lime) 14%, var(--surface-up));
}
.lb-mode-tab.is-active .lb-mode-ico { opacity: 1; }

/* Пьедестал */
.lb-podium {
  display: grid;
  grid-template-columns: 1fr 1.12fr 1fr;
  align-items: end;
  gap: 8px;
  margin-top: 2px;
}
.lb-pod {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 0;
  padding: 12px 8px 12px;
  border-radius: var(--r-lg);
  border: 1px solid var(--stroke);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  text-align: center;
  cursor: pointer;
}
.lb-pod--bg {
  background-color: var(--ink);
  background-image: var(--friend-bg);
  background-size: cover;
  background-position: center;
}
.lb-pod--default {
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(140, 233, 91, 0.28), transparent 60%),
    linear-gradient(180deg, #1b1c1f 0%, #121314 100%);
  border-color: transparent;
}
body.theme-light .lb-pod--default,
html[data-theme="light"] .lb-pod--default {
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(55, 135, 255, 0.38), transparent 58%),
    linear-gradient(180deg, #3a4a5c 0%, #2a3544 100%);
}
.lb-pod--bg::after,
.lb-pod--default::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.16) 0%, rgba(0, 0, 0, 0.48) 100%);
}
body.theme-light .lb-pod--bg::after,
html[data-theme="light"] .lb-pod--bg::after,
body.theme-light .lb-pod--default::after,
html[data-theme="light"] .lb-pod--default::after {
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.36) 100%);
}
.lb-pod > .pp-media-bg { z-index: 0; border-radius: inherit; }
.lb-pod > *:not(.pp-media-bg) { position: relative; z-index: 2; }
.lb-pod--1 {
  padding-top: 18px;
  padding-bottom: 16px;
  border-color: color-mix(in srgb, var(--lime) 55%, var(--stroke));
}
.lb-pod--1:not(.lb-pod--bg):not(.lb-pod--default) {
  background: color-mix(in srgb, var(--lime) 10%, var(--surface));
}
.lb-pod.is-me { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--lime) 55%, transparent); }
.lb-pod-place {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: var(--r-pill);
  background: var(--surface-up);
  border: 1px solid var(--stroke);
  color: var(--text-2);
  font-size: 0.72rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}
.lb-pod--1 .lb-pod-place { background: var(--lime); border-color: var(--lime); color: var(--lime-ink); }
.lb-pod-av { display: inline-flex; }
.lb-pod .friend-avatar { width: 46px; height: 46px; }
.lb-pod--1 .friend-avatar { width: 56px; height: 56px; }
.lb-pod--bg .friend-avatar,
.lb-pod--default .friend-avatar {
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.22);
}
.lb-pod .friend-row-pill {
  align-items: center;
  max-width: 100%;
  width: max-content;
}
.lb-pod-name {
  max-width: 100%;
  font-size: 0.78rem;
  font-weight: 800;
}
.lb-pod-score {
  display: inline-flex;
  flex-direction: row;
  align-items: baseline;
  gap: 3px;
  padding: 3px 8px 4px;
  font-size: 0.95rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
.lb-pod--1 .lb-pod-score { color: var(--lime-hi); }
.lb-pod-score small { font-size: 0.62rem; font-weight: 700; color: var(--muted); }
.lb-skel-pod-name { display: block; width: 62px; height: 11px; border: 0; margin: 0; }
.lb-skel-pod-score { display: block; width: 44px; height: 14px; border: 0; margin: 0; }

.lb-list { gap: 8px; }
.lb-row { min-height: 62px; }
.lb-row .friend-row-main .friend-row-pill { max-width: min(100%, 9.5rem); }
.lb-row .friend-row-name { font-size: 0.9rem; }
.lb-row .friend-row-meta { font-size: 0.72rem; }
.lb-rank,
.lb-score {
  position: relative;
  z-index: 2;
  flex: 0 0 auto;
  align-self: center;
  max-width: none;
  width: auto;
}
.lb-rank {
  min-width: 2rem;
  padding-left: 8px;
  padding-right: 8px;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
  color: var(--text);
}
.lb-row--1 .lb-rank { color: var(--lime); }
.lb-row--2 .lb-rank { color: var(--text); }
.lb-row--3 .lb-rank { color: var(--text); }
.lb-score {
  min-width: 3.4rem;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.lb-score-val {
  font-size: 0.92rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  line-height: 1.15;
  white-space: nowrap;
}
.lb-row--1 .lb-score-val { color: var(--lime); }
.lb-score-lbl {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text-2);
  line-height: 1.15;
}
.lb-row.is-me {
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--lime) 55%, transparent);
}
.lb-me-dock {
  flex: 0 0 auto;
  padding: 10px 12px calc(var(--tg-bottom) + 12px);
  background: linear-gradient(180deg, transparent, var(--ink) 14px);
  border-top: 1px solid var(--stroke-lo, var(--stroke));
}
.lb-me-dock[hidden] { display: none; }
.lb-page.has-me-dock .lb-scroll { padding-bottom: 12px; }
.lb-me-hint {
  margin: 0 0 6px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.lb-row .skeleton {
  margin-bottom: 0;
  border: 0;
}
.lb-row .friend-avatar.skeleton {
  width: 40px;
  height: 40px;
  margin: 0;
  border-radius: 50%;
  flex-shrink: 0;
}
.lb-skel-name,
.lb-skel-meta,
.lb-skel-score,
.lb-skel-rank {
  display: block;
  border: 0;
  margin: 2px 0 0;
}
.lb-skel-rank { height: 12px; width: 10px; margin: 0 auto; }
.lb-skel-name { height: 12px; width: 72px; }
.lb-skel-meta { height: 8px; width: 48px; }
.lb-skel-score { height: 14px; width: 36px; }

body.theme-light .lb-me-dock,
html[data-theme="light"] .lb-me-dock {
  background: linear-gradient(180deg, transparent, var(--ink) 18px);
}
body.theme-light .lb-rank,
html[data-theme="light"] .lb-rank,
body.theme-light .lb-score-val,
html[data-theme="light"] .lb-score-val { color: var(--text); }
body.theme-light .lb-row--1 .lb-rank,
html[data-theme="light"] .lb-row--1 .lb-rank,
body.theme-light .lb-row--1 .lb-score-val,
html[data-theme="light"] .lb-row--1 .lb-score-val { color: var(--lime); }

.public-friends-chip {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  width: calc(100% - 20px); margin: 0 10px 10px; padding: 10px 12px;
  border-radius: var(--r); border: 1px solid var(--stroke);
  background: var(--surface-up); color: inherit; font: inherit; cursor: pointer;
}
.public-friends-chip-label { font-size: 0.84rem; font-weight: 800; }
.public-friends-chip-count {
  min-width: 28px; text-align: center; font-size: 0.84rem; font-weight: 900;
  color: var(--lime-hi);
}
.public-friends-chip:active { background: var(--stroke-lo); }

.friend-pick-list { display: flex; flex-direction: column; gap: 6px; max-height: 48vh; overflow-y: auto; }
.friend-pick-row {
  display: flex; align-items: center; gap: 8px; width: 100%;
  background: var(--surface); border: 1px solid var(--stroke);
  border-radius: var(--r); padding: 8px 10px; color: inherit; font: inherit;
  text-align: left; cursor: pointer; box-sizing: border-box;
}
.friend-pick-row.is-selected { border-color: var(--lime-lo); background: var(--surface-up); }
.friend-pick-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.friend-pick-name {
  font-size: 0.84rem; font-weight: 800; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.friend-pick-meta {
  font-size: 0.68rem; color: var(--muted); white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.friend-pick-actions { display: flex; flex-direction: column; gap: 4px; flex-shrink: 0; }

.team-invite-overlay {
  position: fixed;
  inset: 0;
  z-index: 420;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(120% 80% at 50% -10%, rgba(211, 239, 130, 0.14), transparent 55%),
    rgba(8, 12, 10, 0.92);
  padding: calc(var(--tg-top) + 28px) 20px calc(var(--tg-bottom) + 28px);
  box-sizing: border-box;
  opacity: 0;
  transition: opacity 0.28s ease;
}
.team-invite-overlay.hidden { display: none !important; }
.team-invite-overlay.is-open { opacity: 1; }
.team-invite-overlay.is-closing { opacity: 0; }
body.team-invite-open { overflow: hidden; }
.team-invite-sheet {
  margin: auto;
  width: min(100%, 380px);
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: center;
  opacity: 0;
  transform: scale(0.92) translateY(16px);
  transition: opacity 0.32s ease, transform 0.36s cubic-bezier(0.22, 1, 0.36, 1);
}
.team-invite-overlay.is-open .team-invite-sheet {
  opacity: 1;
  transform: scale(1) translateY(0);
}
.team-invite-overlay.is-closing .team-invite-sheet {
  opacity: 0;
  transform: scale(0.96) translateY(10px);
}
.team-invite-kicker {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--lime-hi);
}
.team-invite-title {
  margin: 0;
  font-size: 1.55rem;
  font-weight: 900;
  line-height: 1.2;
  color: var(--text);
}
.team-invite-text {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.45;
  color: var(--text);
}
.team-invite-meta {
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted);
}
.team-invite-facts {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
  text-align: left;
}
.team-invite-fact {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--stroke);
  border-radius: var(--r);
  padding: 8px 10px;
}
.team-invite-fact-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  object-fit: contain;
  flex-shrink: 0;
  background: var(--surface-up);
}
.team-invite-fact-map {
  width: 54px;
  height: 36px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--surface-up);
}
.team-invite-fact-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.team-invite-fact-label {
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.team-invite-fact-value {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.team-invite-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.team-roster-warn { border-color: rgba(240, 192, 96, 0.45); }
.my-team-card {
  background: var(--surface);
  border: 1px solid var(--stroke);
  border-radius: var(--r);
  padding: 10px;
  margin-bottom: 12px;
}
.my-team-name {
  margin: 0 0 8px;
  font-size: 1rem;
  font-weight: 900;
}
.team-slot-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.team-slot-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  width: 100%;
  text-align: left;
  background: var(--surface-up);
  border: 1px dashed var(--stroke);
  border-radius: var(--r);
  padding: 10px 12px;
  color: inherit;
  font: inherit;
  cursor: pointer;
  box-sizing: border-box;
}
.team-slot-card.is-filled {
  border-style: solid;
  cursor: default;
}
.team-slot-card.is-captain { border-color: rgba(211, 239, 130, 0.35); }
.team-slot-card.is-picking { border-color: var(--lime); }
.team-slot-card.is-empty:disabled { opacity: 0.55; cursor: default; }
.team-slot-plus {
  font-size: 1.35rem;
  font-weight: 900;
  color: var(--lime-hi);
  line-height: 1;
}
.team-slot-role {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.team-slot-name {
  font-size: 0.9rem;
  font-weight: 800;
}
.team-slot-meta {
  font-size: 0.72rem;
  color: var(--muted);
}
.team-slot-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

/* ── Toast ── */
.toast {
  bottom: calc(var(--nav-dock-h) + var(--nav-gap) * 2 + var(--tg-bottom) + 16px);
  left: 12px; right: 12px;
  padding: 10px 13px; border-radius: var(--r);
  font-size: 0.82rem; font-weight: 700;
  background: var(--surface-up); border: 1px solid var(--stroke);
  z-index: 99;
}
.toast.ok { border-color: var(--lime-lo); }
.toast.err { border-color: var(--err); }
.hidden { display: none !important; }

/* ── Хэндл шторки ── */
.sheet-handle {
  width: 36px;
  height: 4px;
  margin: 10px auto 4px;
  flex-shrink: 0;
  border-radius: var(--r-pill);
  background: var(--stroke);
}

/* ── In-app announcement (шторка при входе) ── */
.iam-sheet {
  --flow-cta: #8ce95b;
  --flow-cta-text: #1a1a1a;
  --flow-ghost-bg: #1a1a1a;
  --flow-ghost-border: #404040;
  --flow-ghost-text: #ffffff;
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  visibility: hidden;
  pointer-events: none;
}
.iam-sheet.is-open,
.iam-sheet.is-leaving {
  visibility: visible;
  pointer-events: auto;
}
.iam-sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.86);
  opacity: 0;
  transition: opacity 0.36s ease;
}
.iam-sheet.is-open .iam-sheet-backdrop { opacity: 1; }
.iam-sheet.is-leaving .iam-sheet-backdrop { opacity: 0; }
.iam-sheet-panel {
  position: relative;
  z-index: 1;
  width: min(480px, 100%);
  max-height: min(86vh, calc(var(--app-vh, 100dvh) * 0.86));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--surface);
  border: 0;
  border-radius: var(--r-modal) var(--r-modal) 0 0;
  box-shadow: var(--shadow-lg);
  color: var(--text);
  transform: translate3d(0, 100%, 0);
  pointer-events: auto;
  transition: transform 0.44s cubic-bezier(0.32, 0.72, 0, 1);
  will-change: transform;
}
.iam-sheet.is-open .iam-sheet-panel {
  transform: translate3d(0, 0, 0);
}
.iam-sheet.is-leaving .iam-sheet-panel {
  transform: translate3d(0, 100%, 0);
}
.iam-sheet-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
  scrollbar-width: thin;
  scrollbar-color: var(--stroke) transparent;
}
.iam-sheet--noart .iam-art { display: none; }
.iam-art {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: min(56vh, 460px);
  overflow: hidden;
  background: var(--surface);
}
.iam-sheet[data-aspect="square"] .iam-art { aspect-ratio: 1 / 1; }
.iam-sheet[data-aspect="portrait"] .iam-art { aspect-ratio: 3 / 4; }
.iam-sheet[data-aspect="landscape"] .iam-art { aspect-ratio: 16 / 9; }
.iam-art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.iam-fade {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 42%;
  background: linear-gradient(180deg, transparent 0%, var(--surface) 100%);
  pointer-events: none;
}
.iam-copy {
  padding: 4px 18px 14px;
}
.iam-sheet--noart .iam-copy {
  padding: 52px 18px 16px;
}
.iam-title {
  margin: 0 0 8px;
  font-family: Unbounded, "Tilda Sans", Rubik, sans-serif;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 1.2;
  color: var(--text);
}
.iam-text {
  margin: 0;
  font-family: "Tilda Sans", Rubik, sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.45;
  color: var(--text-2);
  white-space: pre-wrap;
}
.iam-actions {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 4px 16px max(16px, var(--tg-bottom), env(safe-area-inset-bottom, 0px));
}
.iam-actions[hidden] { display: none; }
.iam-actions .vml-flow-btn { width: 100%; }
.iam-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--stroke);
  border-radius: 50%;
  background: color-mix(in srgb, var(--surface) 78%, transparent);
  color: var(--text);
  cursor: pointer;
}
.iam-close:active { transform: scale(0.92); }
.iam-close .ico-svg { width: 16px; height: 16px; }
body.iam-sheet-open { overflow: hidden !important; }
body.iam-sheet-open .app-scroll {
  overflow: hidden !important;
  overscroll-behavior: none;
  touch-action: none;
}
body.theme-light .iam-sheet,
html[data-theme="light"] .iam-sheet {
  --flow-cta: #3787ff;
  --flow-cta-text: #eff7ff;
  --flow-ghost-bg: #eff7ff;
  --flow-ghost-border: #707f8e;
  --flow-ghost-text: #000000;
}
body.theme-light .iam-sheet-backdrop,
html[data-theme="light"] .iam-sheet-backdrop {
  background: rgba(8, 16, 32, 0.78);
}
body.theme-light .iam-art,
html[data-theme="light"] .iam-art {
  background: var(--surface);
}
body.theme-light .iam-close,
html[data-theme="light"] .iam-close {
  border-radius: 50%;
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  color: var(--text);
  border-color: var(--stroke);
}
@media (prefers-reduced-motion: reduce) {
  .iam-sheet-backdrop,
  .iam-sheet-panel {
    transition: none !important;
  }
  .iam-sheet.is-open .iam-sheet-panel {
    transform: none;
  }
}

/* ── Boot cover: скрывает переход Telegram в fullscreen ── */
#boot-cover {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: #000;
  opacity: 1;
  transition: opacity 0.45s ease;
}
body.theme-light #boot-cover,
html[data-theme="light"] #boot-cover {
  background: #d6dae4;
}
#boot-cover.hide {
  opacity: 0;
  pointer-events: none;
}

/* ── Loader ── */
.loader-lottie {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  flex: 1 1 auto;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}
#loader-lottie,
#loader-lottie-long {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
#loader-lottie svg,
#loader-lottie canvas,
#loader-lottie-long svg,
#loader-lottie-long canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}
/* Без crossfade: во время встречного fade оба клипа полупрозрачны и лого «просвечивает». */
.loader-lottie-clip {
  position: absolute;
  inset: 0;
  opacity: 1;
}
.loader-lottie-clip.is-hidden {
  opacity: 0;
  pointer-events: none;
}

/* ── Меню ── */
.menu-list { list-style: none; padding: 0; margin: 0; }
.menu-list li {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 0; border-bottom: 1px solid var(--stroke);
  cursor: pointer; font-weight: 700; font-size: 0.9rem;
}
.menu-list li:last-child { border-bottom: none; }
.menu-ico {
  width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
  border-radius: 10px; background: var(--surface-up); color: var(--lime);
  border: 1px solid var(--stroke); flex-shrink: 0;
}
.menu-ico .ico-svg { width: 16px; height: 16px; }
.menu-list .menu-label { flex: 1; }
.menu-list .arrow { opacity: 0.3; }

details.how {
  margin-bottom: 10px; border-radius: var(--r);
  border: 1px solid var(--stroke); background: var(--surface);
}
details.how summary {
  padding: 11px 12px; font-weight: 700; font-size: 0.82rem;
  cursor: pointer; list-style: none; display: flex; align-items: center; gap: 8px;
}
details.how summary::-webkit-details-marker { display: none; }
details.how .how-body { padding: 0 12px 12px; font-size: 0.74rem; color: var(--muted); line-height: 1.55; font-weight: 600; }

.panel-back {
  flex-shrink: 0;
  width: 40px; height: 40px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface-up); border: 1px solid var(--stroke);
  color: var(--text); cursor: pointer; padding: 0; font-family: inherit;
  margin-bottom: 12px;
}
.panel-back:active { background: var(--stroke); }
.panel-back .ico-svg { width: 20px; height: 20px; }

/* ── Profile wizard ── */
.wizard-steps {
  display: flex; gap: 6px; margin-bottom: 14px;
}
.wiz-step {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px;
  opacity: 0.4;
}
.wiz-step.done, .wiz-step.active { opacity: 1; }
.wiz-dot {
  width: 24px; height: 24px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.62rem; font-weight: 900;
  background: var(--surface-up); border: 1px solid var(--stroke); color: var(--muted);
}
.wiz-step.done .wiz-dot { background: var(--lime-dim); border-color: var(--lime-lo); color: var(--lime); }
.wiz-step.active .wiz-dot { background: var(--lime); border-color: var(--lime); color: var(--lime-ink); }
.wiz-label { font-size: 0.48rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.wiz-step.active .wiz-label { color: var(--lime); }

.wizard-hint {
  font-size: 0.74rem; font-weight: 600; color: var(--text-2);
  margin: 0 0 10px; line-height: 1.4;
}

.profile-meta { flex: 1; min-width: 0; }
.profile-tag { font-size: 0.95rem; font-weight: 800; margin: 0 0 2px; color: var(--text); }
.profile-nick { font-size: 0.78rem; font-weight: 600; margin: 0 0 4px; color: var(--text-2); }
.profile-status { font-size: 0.72rem; font-weight: 700; margin: 0; color: var(--lime); }
.profile-status:empty { display: none; }

#profile-verify-block { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--stroke); }
#profile-verify-block .action { margin-top: 8px; }

.verify-icon-wrap { margin-top: 10px; }
.verify-check { margin-top: 12px; }
.verify-tag-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-top: 10px;
}
.verify-tag-row input { margin: 0; }
.verify-tag-row .action { margin: 0; padding: 10px 12px; white-space: nowrap; }
.verify-icon-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 14px;
  border-radius: var(--r);
  border: 1px solid var(--stroke);
  background: var(--surface-up);
}
.verify-icon-card.featured {
  border-color: var(--lime-lo);
  background: var(--lime-dim);
}
.verify-icon-label {
  margin: 0;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.bs-icon-frame {
  flex-shrink: 0;
  width: 80px;
  height: 80px;
  border-radius: 16px;
  overflow: hidden;
  background: #0f1420;
  border: 2px solid var(--lime-lo);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
}
.bs-icon-frame.lg { width: 96px; height: 96px; border-radius: 18px; }
.bs-icon-frame.sm { width: 72px; height: 72px; border-radius: 14px; }
.bs-icon-frame.fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--lime);
}
.bs-icon-frame.plain {
  border: none;
  box-shadow: none;
  background: transparent;
}
.bs-icon-frame.plain.lg { border-radius: 18px; }
.bs-account-avatar-wrap {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 12px;
  overflow: hidden;
}
.bs-account-avatar-wrap .bs-profile-icon {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  border-radius: 12px;
  transform: scale(1.12);
}
.bs-profile-icon {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: transparent;
}
.bs-profile-icon.pp-media-wait {
  opacity: 0;
  transition: opacity 0.4s ease;
}
.bs-profile-icon.is-ready { opacity: 1; }
.bs-icon-frame.plain .bs-profile-icon {
  object-fit: cover;
  border-radius: inherit;
}
.bs-profile-icon.broken { opacity: 0.35; }

.verify-icon-caption {
  margin: 0;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text-2);
  text-align: center;
  line-height: 1.35;
}
.verify-check-result { margin-top: 10px; }
.verify-compare {
  padding: 12px;
  border-radius: var(--r);
  border: 1px solid var(--stroke);
  background: var(--surface-up);
}
.verify-compare.ok { border-color: var(--lime-lo); background: var(--lime-dim); }
.verify-compare.fail { border-color: rgba(224, 96, 96, 0.35); background: rgba(224, 96, 96, 0.08); }
.verify-compare-icons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
  gap: 10px;
}
.verify-compare-icons .verify-icon-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  box-sizing: border-box;
  padding: 12px 8px;
  text-align: center;
}
.verify-compare-icons .verify-icon-label {
  min-height: 2.5em;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  text-align: center;
}
.verify-compare-icons .bs-icon-frame {
  width: 72px;
  height: 72px;
  margin: 0 auto;
  flex-shrink: 0;
}
.verify-compare-icons .bs-profile-icon {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}
.verify-check-msg {
  margin: 10px 0 0;
  font-size: 0.76rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text-2);
}

.verify-flow-steps {
  margin: 10px 0 0;
  padding-left: 18px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  line-height: 1.45;
}
.verify-flow-steps li { margin-bottom: 4px; }
.verify-flow-steps strong { color: var(--text-2); }

.profile-game-accounts { margin-top: 4px; }
.field-label {
  display: block;
  margin: 0 0 6px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.platform-profile-card { padding: 0; overflow: hidden; position: relative; }
.profile-edit-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.42);
  color: #fff;
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.profile-edit-btn:active { opacity: 0.85; }
.profile-edit-btn .ico-svg { width: 18px; height: 18px; }
.platform-profile-banner {
  position: relative;
  min-height: 132px;
  padding: 18px 16px 16px;
  display: flex;
  gap: 14px;
  align-items: flex-end;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
}
.platform-profile-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 100% 0%, rgba(198, 255, 61, 0.18), transparent 45%);
  pointer-events: none;
}
.platform-profile-avatar {
  position: relative;
  z-index: 1;
  width: 72px;
  height: 72px;
  border-radius: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  font-weight: 900;
  color: #111;
  border: 3px solid rgba(255,255,255,0.12);
  box-shadow: 0 10px 24px rgba(0,0,0,0.35);
  background: linear-gradient(135deg, #667eea, #764ba2);
  flex-shrink: 0;
}
.platform-profile-meta { position: relative; z-index: 1; min-width: 0; padding-bottom: 2px; }
.platform-display-name {
  margin: 0 0 4px;
  font-size: 1.15rem;
  font-weight: 900;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.platform-display-sub {
  margin: 0;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.72);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.platform-sub-sep {
  opacity: 0.45;
}
.platform-uid-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(255,255,255,0.16);
  color: rgba(255,255,255,0.92);
  font-variant-numeric: tabular-nums;
}
.profile-social-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}
.profile-social-chip {
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  background: var(--pp-chip, #1a1a1a);
  color: rgba(255,255,255,0.92);
  text-decoration: none;
  cursor: default;
}
a.profile-social-chip {
  cursor: pointer;
}
a.profile-social-chip:hover {
  background: #222;
}
.preset-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.preset-chip {
  border: 2px solid transparent;
  border-radius: 14px;
  padding: 8px;
  background: var(--surface-up);
  cursor: pointer;
  text-align: center;
}
.preset-chip.active { border-color: var(--lime); box-shadow: 0 0 0 1px rgba(198,255,61,0.25); }
.preset-chip-preview {
  height: 42px;
  border-radius: 10px;
  margin-bottom: 6px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  overflow: hidden;
}
.preset-chip-preview img,
.preset-chip-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: inherit;
}
.preset-chip-avatar {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  margin: 0 auto 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  color: #111;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  overflow: hidden;
}
.preset-chip-preview--img,
.preset-chip-avatar--img,
.pp-avatar--img,
.friend-avatar--img {
  color: transparent;
  overflow: hidden;
}
.preset-chip-label { font-size: 0.68rem; color: var(--muted); font-weight: 700; }
.preset-chip.locked { opacity: 0.82; }
.preset-chip-preview { position: relative; display: flex; align-items: center; justify-content: center; }
.preset-chip-avatar { position: relative; }
.preset-lock {
  position: absolute;
  inset: 0;
  margin: auto;
  display: flex;
  width: 22px;
  height: 22px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(0,0,0,0.55);
  color: #fff;
  z-index: 1;
}
.preset-lock .ico-svg { width: 13px; height: 13px; }
.preset-chip-avatar .preset-lock { background: rgba(0,0,0,0.35); }

/* ── Общая полоса прогресса ── */
.bp-progress-track {
  height: 8px;
  border-radius: 999px;
  background: var(--surface-up);
  overflow: hidden;
}
.bp-progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--lime), #8fe000);
}
body.theme-light .bp-progress-fill,
html[data-theme="light"] .bp-progress-fill {
  background: linear-gradient(90deg, #3787ff, #5a9dff);
}
/* Полоса на превью главной: мягкое статичное свечение + бегущий блик (без мигания). */
.bp-progress-glow {
  position: relative;
  box-shadow: 0 0 8px rgba(163,203,56,0.4);
  overflow: hidden;
}
.bp-progress-glow::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0; width: 45%;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.55) 50%, transparent 100%);
  transform: translateX(-160%);
  animation: bp-glow-sweep 2s linear infinite;
}
@keyframes bp-glow-sweep {
  0% { transform: translateX(-160%); }
  100% { transform: translateX(320%); }
}

/* ── Превью VML Pass на главной (Figma) ── */
/* VML Pass — Figma 2043:39 / 2043:159, канвас 1030×225
   Background/Outline cornerRadius = 100 (не пилюля: half-height был бы 112.5) */
.bp-preview-card {
  position: relative;
  display: block;
  width: 100%;
  margin: 0 0 5px;
  padding: 0;
  text-align: left;
  border: 0;
  /* чуть меньше Figma r=100 → ≈82 на 1030×225 */
  border-radius: 8% / 36.4%;
  background: var(--h-vml-bg);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  overflow: hidden;
  aspect-ratio: 1030 / 225;
  /* Постоянный слой: промоушен/демоушен вокруг анимации давал пустой кадр на слабых Android */
  will-change: transform, opacity;
}
#battlepass-home-card.pass-boot-hidden {
  visibility: hidden;
}
/* Белое кольцо отдельным слоем: не крутим transform/opacity на нём — иначе мигает в WebView */
.bp-preview-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 8;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1.85px #fff;
  pointer-events: none;
}
.bp-preview-card:active { transform: scale(0.99); }
/* Обёртка из JS должна заполнять карточку, иначе absolute-% схлопываются */
/* Без container-type: cq-юниты пересчитываются на кадрах анимации и роняют слой карточки */
#battlepass-home-box,
.bp-preview-inner {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
}
/* Confetti 880.5×587 @ (0, -194) */
.bp-preview-confetti {
  position: absolute;
  left: 0;
  top: -86.22%;
  z-index: 0;
  width: 85.49%;
  height: 260.89%;
  background: var(--h-vml-confetti) left center / cover no-repeat;
  pointer-events: none;
}
/* Dark overlay across card */
.bp-preview-shade {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(90deg, rgba(0,0,0,0.5) 0%, rgba(0,0,0,0) 50%, rgba(0,0,0,0.5) 100%);
  pointer-events: none;
}
body.theme-light .bp-preview-shade {
  background: linear-gradient(90deg, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0) 50%, rgba(0,0,0,0.15) 100%);
}
/* Back — чуть левее/ниже кубка, размер чуть крупнее Figma-ноды (без перебора) */
.bp-preview-back {
  position: absolute;
  left: -0.3%;
  top: calc(0.8% - 2px);
  z-index: 2;
  width: 24%;
  height: 116%;
  object-fit: fill;
  pointer-events: none;
}
/* Cup — Figma 2043:46: box 367×367 @ (-50,-59), visual 300 rotate 15° */
.bp-preview-art {
  position: absolute;
  left: -4.85%;
  top: -26.22%;
  z-index: 3;
  width: 35.67%;
  aspect-ratio: 1;
  pointer-events: none;
}
.bp-preview-cup {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.bp-preview-cup::after {
  content: "";
  width: 81.65%;
  height: 81.65%;
  background: var(--h-vml-cup) center / contain no-repeat;
  transform: rotate(15deg) translateZ(0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
/* Title — без прогресса, крупнее и по центру свободной зоны */
.bp-preview-title {
  position: absolute;
  left: 26%;
  right: 14%;
  top: 0;
  bottom: 0;
  z-index: 4;
  width: auto;
  height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-family: "Unbounded", "Tilda Sans", sans-serif;
  font-size: clamp(1.28rem, 6.6vw, 1.95rem);
  font-weight: 700;
  color: #fff;
  line-height: 1;
  text-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}
/* Track больше не на карточке главной */
.bp-preview-track,
.bp-preview-fill,
.bp-preview-sub { display: none; }
/* Стрелка — Figma 75×75, по вертикали по центру карточки */
.bp-preview-arrow {
  position: absolute;
  left: auto;
  right: 3.2%;
  top: 50%;
  z-index: 5;
  width: 7.28%;
  aspect-ratio: 1;
  display: block;
  object-fit: contain;
  pointer-events: none;
  background: none;
  border: 0;
  box-shadow: none;
  transform: translateY(-50%);
}
body:not(.theme-light) .bp-preview-arrow {
  filter: invert(1);
}

/* ── Страница баттлпасса ── */
.panel-battlepass.active { display: flex; padding: 0; }
.vmlpass {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.vmlpass-head {
  position: absolute;
  z-index: 8;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: calc(var(--tg-top, 0px) + 52px) 12px 28px;
  background: linear-gradient(
    180deg,
    rgba(8, 10, 14, 0.72) 0,
    rgba(8, 10, 14, 0.42) calc(var(--tg-top, 0px) + 56px),
    rgba(8, 10, 14, 0.12) calc(var(--tg-top, 0px) + 88px),
    transparent 100%
  );
  pointer-events: none;
}
.vmlpass-head .bp-back-btn,
.vmlpass-elo {
  pointer-events: auto;
}
.vmlpass-title {
  margin: 0;
  flex: 1;
  font-family: Unbounded, "Tilda Sans", Rubik, sans-serif;
  font-size: 1.35rem;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}
.vmlpass-elo {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  min-height: 40px;
  padding: 6px 12px;
  border-radius: var(--r-pill);
  background: rgba(20, 21, 27, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
}
.vmlpass-elo-label {
  font-size: 0.95rem;
  font-weight: 800;
}
.vmlpass-elo-val {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--pass-accent);
  font-variant-numeric: tabular-nums;
}
.vmlpass-port {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  touch-action: none;
  cursor: grab;
  background: transparent;
}
.vmlpass-port:active { cursor: grabbing; }
.vmlpass-stage {
  position: absolute;
  inset: 0;
  overflow: visible;
  transform-origin: 50% 42%;
  opacity: 0;
  will-change: transform, opacity;
}
@keyframes vmlpass-map-in {
  0% {
    opacity: 0;
    transform: translate3d(0, 36px, 0) scale(0.88);
  }
  72% {
    opacity: 1;
    transform: translate3d(0, -5px, 0) scale(1.02);
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
}
@keyframes vmlpass-head-in {
  from {
    opacity: 0;
    transform: translate3d(0, -12px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}
.vmlpass-stage.is-in {
  animation: vmlpass-map-in 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.vmlpass-head.is-in {
  animation: vmlpass-head-in 0.56s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@media (prefers-reduced-motion: reduce) {
  .vmlpass-stage,
  .vmlpass-stage.is-in,
  .vmlpass-head.is-in {
    animation: none;
    opacity: 1;
    transform: none;
  }
}
.vmlpass-world {
  position: absolute;
  left: 0;
  top: 0;
  width: 535px;
  height: 1200px;
  transform-origin: 0 0;
  contain: layout style;
  overflow: visible;
  will-change: transform;
  --plaque-s: 0.2;
}
.vmlpass-island {
  position: absolute;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}
.vmlpass-island-down {
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
}
.vmlpass-island-up {
  left: 5.626%;
  top: 11.542%;
  width: 83.73%;
  height: 71.70%;
  object-fit: fill;
  display: block;
}
.vmlpass-lamps {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.vmlpass-lamp {
  position: absolute;
  width: 22%;
  height: 10%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(255, 196, 92, 0.5) 0%, rgba(255, 168, 48, 0.16) 38%, transparent 70%);
  z-index: 5;
}
.vmlpass-lamp-city {
  width: 26%;
  height: 12%;
  z-index: 3;
  opacity: 0.7;
}
.vmlpass-world.is-ready .vmlpass-lamp {
  animation: vmlpass-lamp-pulse 3.2s ease-in-out infinite;
}
body:not(.battlepass-tab-active) .vmlpass-lamp {
  animation: none;
}
.vmlpass-fx {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  pointer-events: none;
  display: block;
}
@media (prefers-reduced-motion: reduce) {
  .vmlpass-world.is-ready .vmlpass-lamp { animation: none; }
}
@keyframes vmlpass-lamp-pulse {
  0%, 100% { opacity: 0.62; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 1; transform: translate(-50%, -50%) scale(1.07); }
}
.vmlpass-clouds {
  position: absolute;
  left: -12%;
  top: 31.2%;
  width: 124%;
  height: 57%;
  z-index: 4;
  pointer-events: none;
  overflow: visible;
  transform-origin: 50% 20%;
}
.vmlpass-clouds-drift {
  width: 100%;
  height: 100%;
}
body.battlepass-tab-active .vmlpass-world.is-ready .vmlpass-clouds:not(.is-clearing):not(.is-gone) .vmlpass-clouds-drift {
  animation: vmlpass-cloud-drift 22s ease-in-out infinite alternate;
}
body:not(.battlepass-tab-active) .vmlpass-clouds-drift {
  animation: none;
}
@keyframes vmlpass-cloud-drift {
  0% { transform: translate3d(-1.4%, 0.8%, 0) scale(1.015); }
  100% { transform: translate3d(1.6%, -1.2%, 0) scale(1.04); }
}
.vmlpass-clouds img {
  width: 100%;
  height: 100%;
  object-fit: fill;
  overflow: visible;
  display: block;
}
.vmlpass-clouds.is-clearing {
  opacity: 0;
  transform: translateY(-8%) scale(1.08);
  transition: opacity 1.15s ease, transform 1.2s ease;
}
.vmlpass-clouds.is-clearing .vmlpass-clouds-drift {
  animation: none;
}
.vmlpass-clouds.is-gone {
  display: none;
}
@media (prefers-reduced-motion: reduce) {
  body.battlepass-tab-active .vmlpass-clouds-drift { animation: none; }
}
.vmlpass-marks {
  position: absolute;
  inset: 0;
}
.vmlpass-mark {
  position: absolute;
  width: 10.92%;
  height: 4.32%;
  transform: translate(-50%, -100%);
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.vmlpass-mark.is-wasteland { z-index: 5; }
.vmlpass-mark.is-city { z-index: 3; }
.vmlpass-mark.is-fogged {
  visibility: hidden;
  pointer-events: none;
}
.vmlpass-mark.is-fogged .vmlpass-pin,
.vmlpass-mark.is-fogged .vmlpass-plaque {
  visibility: hidden !important;
  opacity: 0 !important;
}
.vmlpass-pin,
.vmlpass-plaque {
  position: absolute;
  left: 50%;
  bottom: 0;
  pointer-events: none;
  transform-origin: 50% 100%;
}
.vmlpass-pin {
  width: 62%;
  height: auto;
  opacity: 1;
  transform: translateX(-50%);
}
.vmlpass-plaque {
  width: 292px;
  height: 259px;
  opacity: 0;
  visibility: hidden;
  transform: translateX(-50%) scale(var(--plaque-s, 0.2));
}
.vmlpass-world.is-close .vmlpass-pin {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.vmlpass-world.is-close .vmlpass-plaque {
  opacity: 1;
  visibility: visible;
}
.vmlpass-world.is-close .vmlpass-plaque-cta { pointer-events: auto; }
.vmlpass-world.is-morphing.is-close .vmlpass-pin {
  transition: opacity 0.2s ease, visibility 0s linear 0.2s;
}
.vmlpass-world.is-morphing.is-close .vmlpass-plaque {
  transition: opacity 0.28s ease 0.1s, visibility 0s linear 0.1s;
}
.vmlpass-world.is-morphing:not(.is-close) .vmlpass-plaque {
  transition: opacity 0.2s ease, visibility 0s linear 0.2s;
}
.vmlpass-world.is-morphing:not(.is-close) .vmlpass-pin {
  transition: opacity 0.28s ease 0.08s, visibility 0s linear 0s;
}
@media (prefers-reduced-motion: reduce) {
  .vmlpass-world.is-morphing .vmlpass-pin,
  .vmlpass-world.is-morphing .vmlpass-plaque {
    transition: none;
  }
}
.vmlpass-plaque-art {
  width: 100%;
  height: 100%;
  display: block;
}
.vmlpass-plaque-ui {
  position: absolute;
  inset: 0;
  color: #fff;
  pointer-events: none;
}
/* Figma Signs / Collect 4043:6164 — Unbounded 22.5 / Tilda 22.5, бокс 292×259 */
.vmlpass-plaque-elo {
  position: absolute;
  left: 7.1%;
  width: 85.7%;
  top: 15.7%;
  height: 9.7%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: Unbounded, "Tilda Sans", Rubik, sans-serif;
  font-size: 22.5px;
  font-weight: 700;
  letter-spacing: 0;
  color: var(--pass-accent);
  line-height: 1;
  white-space: nowrap;
}
.vmlpass-plaque-title {
  position: absolute;
  left: 41.4%;
  width: 47.1%;
  top: 30.2%;
  height: 29%;
  display: flex;
  align-items: center;
  font-family: "Tilda Sans", Rubik, sans-serif;
  font-size: 22.5px;
  font-weight: 700;
  line-height: 1;
  text-align: left;
  color: #fff;
  overflow: hidden;
}
.vmlpass-plaque-title > span {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  width: 100%;
  min-width: 0;
  line-height: 1;
  overflow: hidden;
  overflow-wrap: break-word;
  word-break: break-word;
  white-space: normal;
}
.vmlpass-plaque-cta {
  position: absolute;
  left: 11.2%;
  width: 77.4%;
  top: 62.1%;
  height: 23.2%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Tilda Sans", Rubik, sans-serif;
  font-size: 22.5px;
  font-weight: 700;
  color: var(--pass-plaque);
  line-height: 1;
  white-space: nowrap;
}
.vmlpass-mark.is-locked .vmlpass-plaque-cta {
  font-size: 22.5px;
  color: #e8edf2;
  white-space: normal;
  text-align: center;
  line-height: 1;
  overflow-wrap: break-word;
}
.vmlpass-mark.is-claimed .vmlpass-plaque-cta {
  color: #e8edf2;
}
.kit-demo .vmlpass-plaque {
  opacity: 1;
  visibility: visible;
  transform: none;
  width: 292px;
  height: 259px;
}
.vmlpass-to-top {
  position: absolute;
  z-index: 7;
  right: 14px;
  bottom: calc(14px + var(--tg-bottom));
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(20, 21, 27, 0.78);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}
.vmlpass-to-top .ico-svg {
  width: 20px;
  height: 20px;
  transform: rotate(-90deg);
}
.vmlpass-to-top[hidden] { display: none; }
.vmlpass-reward-sheet #modal-body {
  margin-bottom: 0;
}
.vmlpass-reward-lead {
  margin: 0 0 12px;
  color: var(--text-2);
  font-weight: 700;
  font-size: 0.95rem;
}
.vmlpass-reward-hero {
  margin: 0;
  font-family: Unbounded, "Tilda Sans", Rubik, sans-serif;
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--lime);
  line-height: 1.2;
}
.vmlpass-reward-nick {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 800;
}
.vmlpass-reward-grid {
  display: grid;
  gap: 8px;
  max-height: min(48vh, 360px);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}
.vmlpass-reward-grid--av {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
.vmlpass-reward-grid--bg {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.vmlpass-reward-cell {
  position: relative;
  overflow: hidden;
  background: var(--surface-up);
  border: 1px solid var(--stroke);
}
.vmlpass-reward-cell--av {
  aspect-ratio: 1;
  border-radius: var(--r-sm);
}
.vmlpass-reward-cell--bg {
  aspect-ratio: 16 / 9;
  border-radius: var(--r);
}
.vmlpass-reward-cell .pp-media,
.vmlpass-reward-cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
body.theme-light .vmlpass-reward-cell,
html[data-theme="light"] .vmlpass-reward-cell {
  background: var(--surface);
}

.pp-nick[data-nick-color]:not(.pp-nick--flow) {
  color: var(--nick-solid);
}
html[data-theme="light"] .pp-nick[data-nick-color]:not(.pp-nick--flow),
body.theme-light .pp-nick[data-nick-color]:not(.pp-nick--flow) {
  color: var(--nick-solid-light, var(--nick-solid));
}
@keyframes nick-flow {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}
.pp-nick.pp-nick--flow,
.pp-nick.pp-nick--flow .pp-nick-text {
  background-image: var(--nick-flow);
  background-size: 220% 100%;
  background-position: 0% 50%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  animation: nick-flow 4.2s linear infinite;
}
.pp-nick.pp-nick--flow .pp-nick-smile {
  background: none;
  color: var(--text);
  -webkit-text-fill-color: currentColor;
  animation: none;
  -webkit-background-clip: initial;
  background-clip: initial;
}
.friend-row-name .pp-nick,
.lb-pod-name .pp-nick {
  display: inline;
  margin: 0;
  font-size: inherit;
  font-family: inherit;
  font-weight: inherit;
  text-align: inherit;
  position: static;
  text-shadow: none;
}
.friend-row-name .pp-nick:not([data-nick-color]),
.lb-pod-name .pp-nick:not([data-nick-color]) {
  color: inherit;
}
.friend-row-name .pp-nick.pp-nick--flow,
.lb-pod-name .pp-nick.pp-nick--flow {
  display: inline-block;
  max-width: 100%;
  vertical-align: bottom;
}
.pp-nick-smile {
  display: inline-block;
  margin-left: 4px;
  font-size: 0.92em;
  line-height: 1;
  vertical-align: -0.05em;
}
.pp-nick-pick {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: baseline;
}
.pp-nick-pick--dots {
  gap: 10px;
  max-height: min(52vh, 380px);
  overflow: auto;
  padding: 4px 2px;
  align-items: center;
}
.pp-nick-dot {
  position: relative;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  padding: 0;
  border-radius: 50%;
  border: 2px solid var(--stroke);
  background-color: var(--nick-solid);
  background-image: none;
  overflow: hidden;
  cursor: pointer;
}
.pp-nick-dot--flow {
  background-color: transparent;
  background-image: var(--nick-flow);
  background-size: 220% 100%;
  animation: nick-flow 4.2s linear infinite;
}
.pp-nick-dot.active {
  border-color: var(--lime);
  box-shadow: 0 0 0 2px var(--lime);
}
.pp-nick-dot.locked { opacity: 0.82; }
.pp-nick-dot .preset-lock { background: rgba(0,0,0,0.45); }
html[data-theme="light"] .pp-nick-dot:not(.pp-nick-dot--flow),
body.theme-light .pp-nick-dot:not(.pp-nick-dot--flow) {
  background-color: var(--nick-solid-light, var(--nick-solid));
  background-image: none;
}
.pp-nick-dot--plain {
  background-color: #fff;
  background-image: none;
}
html[data-theme="light"] .pp-nick-dot--plain,
body.theme-light .pp-nick-dot--plain {
  background-color: #243044;
}
.pp-nick-emoji-btn {
  min-width: 48px;
  min-height: 40px;
  border-radius: var(--r-sm);
  border: 1px solid var(--stroke);
  background: var(--surface-up);
  color: var(--text);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}
.pp-nick-emoji-btn.active {
  border-color: var(--lime);
  box-shadow: 0 0 0 1px var(--lime);
}
img.pp-img-in {
  opacity: 0;
  transition: opacity 0.28s ease;
}
img.pp-img-in.is-on { opacity: 1; }

body.theme-light .vmlpass-head,
html[data-theme="light"] .vmlpass-head {
  background: linear-gradient(
    180deg,
    rgba(8, 10, 14, 0.72) 0,
    rgba(8, 10, 14, 0.42) calc(var(--tg-top, 0px) + 56px),
    rgba(8, 10, 14, 0.12) calc(var(--tg-top, 0px) + 88px),
    transparent 100%
  );
}
body.theme-light .vmlpass-title,
html[data-theme="light"] .vmlpass-title {
  color: #fff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

.bp-page-head {
  display: flex; align-items: center;
  gap: 12px; margin: 2px 0 20px;
}
.bp-back-btn {
  flex-shrink: 0;
  width: 40px; height: 40px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface-up); border: 1px solid var(--stroke);
  color: var(--text); cursor: pointer; padding: 0;
}
.bp-back-btn:active { background: var(--stroke); }
.bp-back-btn .ico-svg { width: 20px; height: 20px; }
.bp-page-ico { display: inline-flex; width: 34px; height: 24px; flex-shrink: 0; }
.bp-page-ico img { width: 100%; height: 100%; object-fit: contain; }
.bp-page-title { margin: 0 auto 0 0; font-size: 1.1rem; font-weight: 900; color: var(--text); }
.bp-page-rating {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.95rem; font-weight: 800; color: var(--lime);
  background: var(--surface-up); border: 1px solid var(--stroke);
  padding: 5px 12px; border-radius: 999px;
}
.bp-page-rating-ico { width: 16px; height: 16px; display: inline-flex; }
.bp-page-rating-ico .ico-svg { width: 100%; height: 100%; }

/* ── Вертикальная дорожка ──
   Сетка узла: [рейтинг] [кружок на полосе] [карточка].
   Полоса проходит через центр колонки с кружком. */
.bp-track { position: relative; }
.bp-track-line {
  position: absolute;
  left: 61px; top: 28px; bottom: 28px;
  width: 12px; border-radius: 999px;
  background: var(--surface-up);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04);
  overflow: hidden;
  z-index: 0;
}
.bp-track-fill {
  position: absolute; left: 0; top: 0; width: 100%;
  height: var(--bp-fill, 0%);
  border-radius: 999px;
  background: linear-gradient(180deg, var(--lime) 0%, #cbe86a 100%);
  box-shadow: 0 0 12px rgba(163,203,56,0.55);
  transition: height 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  overflow: hidden;
}
/* Блик, ИДУЩИЙ по направлению прогресса (сверху вниз) вдоль заполненной части */
.bp-track-shine {
  position: absolute; left: 0; right: 0; height: 45%;
  background: linear-gradient(180deg, transparent 0%, rgba(255,255,255,0.75) 50%, transparent 100%);
  transform: translateY(-140%);
  animation: bp-shine-down 1.9s ease-in-out infinite;
}
@keyframes bp-shine-down {
  0% { transform: translateY(-140%); }
  100% { transform: translateY(260%); }
}
.bp-track-nodes { display: flex; flex-direction: column; gap: 16px; position: relative; z-index: 1; }
.bp-node {
  display: grid;
  grid-template-columns: 34px 46px 1fr;
  align-items: center; column-gap: 10px;
}
.bp-node-rating {
  grid-column: 1; justify-self: end;
  font-size: 0.7rem; font-weight: 800; color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.bp-node-dot {
  grid-column: 2; justify-self: center;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--surface);
  box-shadow: inset 0 0 0 2px rgba(255,255,255,0.06);
  position: relative; z-index: 2;
}
.bp-node-card {
  grid-column: 3;
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: 12px;
  background: var(--surface-up); border: 1px solid transparent;
}
.bp-node-preview {
  width: 40px; height: 40px; border-radius: 10px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.bp-node-preview-balance { background: rgba(255,255,255,0.06); color: var(--lime-hi); }
.bp-node-preview-balance .ico-svg { width: 20px; height: 20px; }
.bp-node-preview-bg { border: 1px solid rgba(255,255,255,0.14); }
.bp-node-preview-av {
  border-radius: 50%; font-size: 1.1rem; color: #fff;
  border: 1px solid rgba(255,255,255,0.14);
  text-shadow: 0 1px 3px rgba(0,0,0,0.4);
}
.bp-node-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.bp-node-cat {
  font-size: 0.62rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.04em; color: var(--muted);
}
.bp-node-value { font-size: 0.85rem; font-weight: 800; color: var(--text); }
.bp-node-balance .bp-node-value { color: var(--lime-hi); }
.bp-claim-btn {
  flex-shrink: 0;
  font-family: inherit; font-size: 0.74rem; font-weight: 800;
  padding: 8px 16px; border-radius: 999px; border: none; cursor: pointer;
  background: var(--lime); color: var(--lime-ink);
}
.bp-claim-btn:active { transform: scale(0.96); }
.bp-claim-btn.btn-loading { opacity: 0.6; pointer-events: none; }
.bp-claimed-label {
  flex-shrink: 0; display: inline-flex; align-items: center; gap: 4px;
  font-size: 0.68rem; font-weight: 800; color: var(--lime);
}
.bp-claimed-label .ico-svg { width: 13px; height: 13px; }

/* Состояния узлов (сплошные кружки, без мигания) */
.bp-node-claimed .bp-node-dot {
  background: radial-gradient(circle at 32% 30%, #d6f27a, var(--lime));
  box-shadow: inset 0 0 0 2px rgba(255,255,255,0.25);
}
.bp-node-claimed .bp-node-card { opacity: 0.72; }
.bp-node-claimable .bp-node-dot {
  background: radial-gradient(circle at 32% 30%, #d6f27a, var(--lime));
  box-shadow: 0 0 12px rgba(163,203,56,0.7), inset 0 0 0 2px rgba(255,255,255,0.25);
}
.bp-node-claimable .bp-node-card { border-color: rgba(163,203,56,0.4); }
.bp-node-locked .bp-node-dot { background: var(--surface); }
.bp-node-locked .bp-node-card { opacity: 0.9; }

/* ── ПК: горизонтальная дорожка ── */
@media (min-width: 900px) {
  .bp-track { padding-top: 8px; overflow-x: auto; }
  .bp-track-line {
    left: 24px; right: 24px; top: 36px; bottom: auto;
    width: auto; height: 12px;
  }
  .bp-track-fill {
    top: 0; left: 0; height: 100%;
    width: var(--bp-fill, 0%);
    background: linear-gradient(90deg, var(--lime), #cbe86a);
    transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  }
  .bp-track-shine {
    top: 0; bottom: 0; left: 0; right: auto;
    width: 45%; height: auto;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.75) 50%, transparent 100%);
    transform: translateX(-140%);
    animation: bp-shine-right 1.9s ease-in-out infinite;
  }
  @keyframes bp-shine-right {
    0% { transform: translateX(-140%); }
    100% { transform: translateX(260%); }
  }
  .bp-track-nodes { flex-direction: row; align-items: flex-start; gap: 16px; min-width: max-content; }
  .bp-node {
    grid-template-columns: 1fr; grid-template-rows: 30px 18px auto;
    row-gap: 8px; width: 190px; justify-items: center;
  }
  .bp-node-dot { grid-column: 1; grid-row: 1; }
  .bp-node-rating { grid-column: 1; grid-row: 2; justify-self: center; }
  .bp-node-card { grid-column: 1; grid-row: 3; width: 100%; flex-direction: column; align-items: flex-start; }
  .bp-node-card .bp-claim-btn { align-self: stretch; text-align: center; }
}
.editor-bs-row {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--stroke);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}
.editor-bs-status { margin: 0; font-size: 0.82rem; color: var(--text-2); }
.editor-bs-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.game-accounts-label {
  margin: 0 0 8px;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.bs-account-card {
  position: relative;
  overflow: hidden;
  border-radius: calc(var(--r) + 4px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  padding: 16px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
}
.bs-account-card.loading { min-height: 192px; display: flex; align-items: center; justify-content: center; transition: min-height 0.2s ease; }
.bg-legend-anim {
  background-size: 220% 220% !important;
  animation: legend-gradient-shift 6s ease infinite;
}
@keyframes legend-gradient-shift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
.bs-account-head {
  display: flex;
  gap: 12px;
  align-items: center;
}
.bs-account-meta { flex: 1; min-width: 0; }
.bs-account-game {
  display: inline-flex;
  margin-bottom: 4px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(26, 111, 212, 0.28);
  border: 1px solid rgba(120, 180, 255, 0.25);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #9fd0ff;
}
.bs-account-name {
  margin: 0 0 2px;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.15;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bs-account-tag {
  margin: 0;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--muted);
}
.bs-verified-badge {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--lime-dim);
  border: 1px solid var(--lime-lo);
  color: var(--lime);
  font-size: 0.82rem;
  font-weight: 900;
}
.bs-account-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}
.bs-stat {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 68px;
}
.bs-stat.featured {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  min-height: auto;
  justify-content: flex-start;
  flex-direction: row;
}
.bs-stat-featured-body {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.bs-stat-featured-name {
  display: block;
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--text);
  margin: 0;
  text-transform: none;
  line-height: 1.2;
}
.bs-stat-featured-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
.bs-stat-head {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-bottom: 6px;
}
.bs-stat-ico {
  flex-shrink: 0;
  width: 15px;
  height: 15px;
  color: var(--lime);
  display: inline-flex;
  margin-top: 1px;
}
.bs-stat-ico .ico-svg { width: 15px; height: 15px; }
.bs-stat-ico-img {
  width: 18px;
  height: 18px;
  margin-top: 0;
}
.bs-stat-ico-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.bs-stat:not(.featured) .label {
  display: block;
  margin-bottom: 0;
  min-height: 2.4em;
  line-height: 1.2;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.bs-stat.featured .label {
  margin: 0;
  min-height: 0;
  line-height: 1.2;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.bs-stat .value {
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--text);
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
}
.bs-rank-name {
  font-size: 0.66rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: none;
  letter-spacing: 0.01em;
}
.bs-account-club {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(26, 111, 212, 0.12);
  border: 1px solid rgba(120, 180, 255, 0.22);
  font-size: 0.82rem;
  font-weight: 700;
  color: #dbeafe;
}
.bs-account-club span {
  display: block;
  margin-bottom: 2px;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #9fd0ff;
}
.bs-account-note {
  margin: 12px 0 0;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--muted);
  line-height: 1.35;
}
.bs-top-brawlers { margin-top: 12px; }
.bs-top-brawlers-label {
  margin: 0 0 8px;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.bs-top-brawlers-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.bs-brawler-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 6px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.05);
  text-align: center;
}
.bs-brawler-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  overflow: hidden;
  display: block;
  flex-shrink: 0;
  background: rgba(0, 0, 0, 0.2);
}
.bs-brawler-icon-wrap.sm {
  width: 44px;
  height: 44px;
}
.bs-brawler-icon-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  border-radius: 12px;
}
.bs-brawler-icon-wrap.sm img {
  border-radius: 12px;
}
.bs-brawler-name {
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--text-2);
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
  text-transform: none;
}
.bs-brawler-trophies {
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--lime);
}
.filter-group { margin-bottom: 10px; }
.filter-group:last-of-type { margin-bottom: 12px; }
.filter-label {
  margin: 0 0 6px;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

/* ── Lobby ── */
.lobby-card .lobby-code-wrap { margin-top: 10px; }
.lobby-card .btn-row .action { padding: 9px 12px; font-size: 0.78rem; }
.lobby-card #btn-lobby-submit-code,
.lobby-card #btn-lobby-start,
.lobby-card #btn-lobby-confirm { padding: 10px 14px; font-size: 0.84rem; }

/* ── Фильтры каталога ── */
.filter-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  overflow-x: auto;
  scrollbar-width: none;
}
.filter-bar::-webkit-scrollbar { display: none; }
.filter-chip {
  flex: 0 0 auto;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  background: var(--surface-up);
  color: var(--muted);
  font-family: inherit;
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
}
.filter-chip.active {
  background: var(--lime-dim);
  border-color: var(--lime-lo);
  color: var(--lime);
}

/* ── Каталог (плавающий островок + sheet-панели) ── */
.catalog-top {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  column-gap: 10px;
  margin-bottom: 6px;
  padding-top: 2px;
  min-height: 44px;
}
.catalog-top .panel-back {
  grid-column: 1;
  grid-row: 1;
  z-index: 2;
  margin-bottom: 0;
}
.catalog-title {
  grid-column: 2;
  grid-row: 1;
  margin: 0;
  padding-left: 8px;
  text-align: right;
  font-family: "Unbounded", "Tilda Sans", sans-serif;
  font-size: 1.22rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.01em; word-spacing: 0.12em;
  color: var(--text);
  line-height: 1.15;
}
.catalog-count {
  grid-column: 2;
  grid-row: 1;
  justify-self: end;
  align-self: start;
  font-size: 0.72rem; color: var(--muted); font-weight: 700;
}
.catalog-count[hidden] { display: none !important; }

/* Плавающий островок фильтров — Figma Menu 181:21 на всю ширину */
.catalog-island {
  position: relative;
  z-index: 2;
  /* выходим из padding app-scroll (12px), как Menu на всю ширину 1080 */
  margin: 0 -12px 14px;
  padding: 12px 14px;
  overflow: visible;
  background: #1a1c18;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 28px;
  box-shadow: 0 10px 32px rgba(0,0,0,0.45);
}
.catalog-cat-pills {
  display: flex;
  align-items: stretch;
  /* Figma leftover gaps ≈15px design → ~5px на 390 */
  gap: 5px;
  margin: 0 0 10px;
  padding: 0;
  overflow: visible;
  height: 42px;
}
.catalog-cat-pill {
  /* Figma ширины: 120 / 376 / 239 / 247 — flex по этим долям */
  flex: 1 1 0;
  min-width: 0;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 3px;
  border: 0;
  border-radius: 999px;
  /* чуть плотнее слева — иконка левее и крупнее, справа запас под текст */
  padding: 0 7px 0 5px;
  overflow: hidden;
  box-sizing: border-box;
  font-family: "Tilda Sans", "Rubik", sans-serif;
  font-size: 0.625rem; /* 10px — Figma 36/1080*390≈13, но с иконкой нужно плотнее */
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
  white-space: nowrap;
  color: #fff;
  cursor: pointer;
  background: #262a24;
  box-shadow: 0 2px 10px rgba(0,0,0,0.28);
  transition: transform 0.18s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.22s ease, filter 0.22s ease;
  will-change: transform, box-shadow, filter;
}
.catalog-cat-pill-label {
  overflow: hidden;
  text-overflow: clip;
  max-width: none;
  flex: 1 1 auto;
  min-width: 0;
  line-height: 1;
  text-align: left;
}
.catalog-cat-pill:active { transform: scale(0.96); }
.catalog-cat-pill img {
  width: 24px;
  height: 26px;
  object-fit: contain;
  flex-shrink: 0;
  margin-left: 0;
  /* без drop-shadow — иначе «вторая» обводка на цветной пилюле */
  filter: none;
}
.catalog-cat-pill.cat-3v3 img {
  width: 20px;
  height: 18px;
}
.catalog-cat-pill.cat-duels img {
  width: 26px;
  height: 24px;
}
.catalog-cat-pill.cat-all {
  flex: 0 0 42px;
  width: 42px;
  padding: 0;
  justify-content: center;
  background: #d9dbd6;
  color: #1a1c18;
  font-size: 0.62rem;
  letter-spacing: 0.02em;
  box-shadow: 0 0 0 2px rgba(255,255,255,0.22), 0 2px 10px rgba(0,0,0,0.28);
}
.catalog-cat-pill.cat-all .catalog-cat-pill-label { display: none; }
.catalog-cat-pill.cat-all::after { content: "ВСЕ"; }
.catalog-cat-pill.cat-all.active {
  box-shadow: 0 0 0 2.5px rgba(255,255,255,0.7), 0 0 14px rgba(255,255,255,0.45), 0 4px 14px rgba(0,0,0,0.35);
}
/* Точные доли Figma: 376 : 239 : 247 */
.catalog-cat-pill.cat-showdown {
  flex: 376 1 0;
  background: linear-gradient(180deg, #9ed63a 0%, #6aa815 100%);
  color: #fff;
}
.catalog-cat-pill.cat-3v3 {
  flex: 239 1 0;
  padding-left: 9px; /* иконка+текст чуть правее */
  background: linear-gradient(180deg, #3a9ae8 0%, #14528f 100%);
}
.catalog-cat-pill.cat-duels {
  flex: 247 1 0;
  background: linear-gradient(180deg, #d02424 0%, #7a1212 100%);
}
.catalog-cat-pill.active:not(.cat-all) {
  box-shadow: 0 0 0 1.5px rgba(255,255,255,0.85), 0 4px 16px rgba(0,0,0,0.4);
  filter: saturate(1.12);
  transform: translateY(-1px);
}
.catalog-search-row {
  display: flex; align-items: center; gap: 6px;
  margin-bottom: 10px;
}
.catalog-search {
  flex: 1; min-width: 0;
  display: flex; align-items: center; gap: 8px;
  background: #262a24;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 999px;
  padding: 0 12px;
  height: 40px;
  color: var(--muted);
  transition: border-color 0.15s ease, background 0.15s ease;
}
.catalog-search:focus-within { border-color: var(--lime-lo); background: #2b302a; }
.catalog-search .ico-svg { width: 16px; height: 16px; flex-shrink: 0; }
.catalog-search input {
  flex: 1; border: 0; background: transparent; color: var(--text);
  margin: 0; padding: 0; min-width: 0;
  font-family: "Tilda Sans", sans-serif;
  font-size: 13px; font-weight: 700;
}
.catalog-search input::placeholder { color: var(--muted); }
.catalog-tools-row {
  display: flex; align-items: center; gap: 6px;
}
.catalog-tool-btn {
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.08); background: #3a3f38;
  color: #cdd2c6; display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; flex-shrink: 0;
  transition: transform 0.12s ease, background 0.15s ease, color 0.15s ease;
}
.catalog-tool-btn.catalog-tool-sq { border-radius: 50%; }
.catalog-tool-btn:active { transform: scale(0.92); }
.catalog-tool-btn.is-active { background: var(--lime); color: var(--lime-ink); border-color: transparent; }
.catalog-tool-btn .ico-svg { width: 18px; height: 18px; }
.catalog-reset-btn {
  flex: 1; height: 40px; border-radius: 999px;
  border: none; background: #3a3f38;
  color: #cdd2c6;
  font-family: "Tilda Sans", sans-serif;
  font-size: 12px; font-weight: 700;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: transform 0.12s ease, background 0.15s ease, opacity 0.15s ease;
}
.catalog-reset-btn.is-idle {
  opacity: 0.42;
}
.catalog-reset-btn:not(.is-idle) { opacity: 1; }
.catalog-reset-btn:active { transform: scale(0.97); background: #454b42; }
.catalog-reset-badge {
  min-width: 22px; height: 22px; padding: 0 6px;
  border-radius: 999px;
  background: #9ede2f; color: #14240a;
  font-size: 0.72rem; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center;
  line-height: 1;
}
.catalog-reset-badge[hidden] { display: none !important; }
.catalog-island.is-expanded .catalog-reset-btn { display: inline-flex; }

/* Расширенные слайдеры вход/приз — анимация открытия/закрытия */
.catalog-island-extra {
  display: grid; gap: 14px;
  margin: 0;
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition:
    max-height 0.38s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.28s ease,
    margin 0.28s ease,
    transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}
.catalog-island.is-expanded .catalog-island-extra {
  max-height: 280px;
  opacity: 1;
  margin: 4px 0 12px;
  transform: translateY(0);
  pointer-events: auto;
}
.catalog-range-label {
  margin: 0 0 8px; color: #fff; font-weight: 800; font-size: 0.95rem;
}
.catalog-range-track {
  --range-thumb: 22px;
  --range-pad: 11px;
  position: relative;
  height: 32px;
  margin-bottom: 8px;
}
.catalog-range-rail {
  position: absolute;
  left: var(--range-pad);
  right: var(--range-pad);
  top: 50%;
  height: 6px;
  margin-top: -3px;
  border-radius: 99px;
  background: #34382f;
  pointer-events: none;
  z-index: 0;
}
.catalog-range-fill {
  position: absolute;
  top: 0; height: 100%;
  left: 0; width: 100%;
  border-radius: 99px;
  background: #9ede2f;
  pointer-events: none;
  will-change: left, width;
}
.catalog-range-track input[type="range"] {
  position: absolute;
  left: 0; top: 0;
  width: 100%; height: 32px;
  margin: 0; padding: 0;
  appearance: none; -webkit-appearance: none;
  background: transparent;
  pointer-events: none;
  z-index: 2;
}
.catalog-range-track input[type="range"]#catalog-fee-max,
.catalog-range-track input[type="range"]#catalog-prize-max { z-index: 3; }
.catalog-range-track input[type="range"]::-webkit-slider-runnable-track {
  height: 32px; background: transparent; border: none;
}
.catalog-range-track input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: var(--range-thumb); height: var(--range-thumb);
  margin-top: 5px; /* (32 - 22) / 2 */
  border-radius: 50%;
  background: #fff; border: 0;
  box-shadow: 0 1px 4px rgba(0,0,0,0.45);
  pointer-events: auto; cursor: pointer;
  touch-action: none;
  position: relative;
}
.catalog-range-track input[type="range"]::-moz-range-track {
  height: 32px; background: transparent; border: none;
}
.catalog-range-track input[type="range"]::-moz-range-thumb {
  width: var(--range-thumb); height: var(--range-thumb);
  border-radius: 50%;
  background: #fff; border: 0;
  box-shadow: 0 1px 4px rgba(0,0,0,0.45);
  pointer-events: auto; cursor: pointer;
  touch-action: none;
}
.catalog-range-inputs {
  display: flex; gap: 10px;
}
.catalog-range-inputs label {
  flex: 1; display: flex; align-items: center; gap: 8px;
  color: rgba(255,255,255,0.55); font-size: 0.82rem; font-weight: 700;
}
.catalog-range-inputs input {
  flex: 1; min-width: 0; margin: 0; height: 36px;
  border-radius: 12px; border: 1px solid rgba(255,255,255,0.08);
  background: #262a24; color: #fff; padding: 0 10px;
  font-weight: 700; font-size: 0.85rem;
}

.catalog-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  position: relative;
  overflow: visible;
  transition: gap 0.28s ease;
}
.catalog-list.is-cols-2 {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
  padding: 2px 1px 8px;
  margin: 0 -1px;
}
.catalog-list.is-list-switching {
  pointer-events: none;
}
#tournaments > .t-card.is-filter-hidden {
  display: none !important;
}
#tournaments > .catalog-filter-empty {
  grid-column: 1 / -1;
}
#tournaments.is-filter-animating {
  pointer-events: none;
}
@keyframes catalog-filter-enter {
  from { transform: translateY(8px); }
  to   { transform: translateY(0); }
}
#tournaments .t-card.is-filter-entering,
#tournaments .catalog-filter-empty.is-filter-entering {
  animation: catalog-filter-enter 0.24s cubic-bezier(0.22, 1, 0.36, 1) both;
}
#tournaments.is-filter-motion-off .t-card.is-filter-entering,
#tournaments.is-filter-motion-off .catalog-filter-empty.is-filter-entering {
  animation: none !important;
  transform: none !important;
}
.catalog-list .t-card {
  min-width: 0;
  width: 100%;
  max-width: 100%;
  overflow: visible;
}
.catalog-list.is-cols-2 .t-card { margin-bottom: 0; }
.catalog-list.is-layout-switching .t-card {
  opacity: 0.65;
  transition: opacity 0.2s ease;
}

/* backdrop-filter на карточках в Telegram/Android отрывает слои («летающий» взнос) */
body.tg-mobile .t-card-glass,
body.tg-mobile .t-pill-fee,
body.tg-mobile .t-card-map-pin {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
body.tg-mobile .t-card-glass {
  background: rgba(8, 10, 6, 0.42);
}
body.tg-mobile .t-pill-fee {
  background: rgba(18, 22, 14, 0.92);
}
body.tg-mobile .t-card-map-pin {
  background: rgba(18, 22, 14, 0.88);
}
.catalog-list.is-cols-2 > .empty-state,
.catalog-list.is-cols-2 > .empty,
.catalog-list.is-cols-2 > .info-box,
.catalog-list.is-cols-2 > .skeleton-card {
  grid-column: 1 / -1;
}

/* Центрированные sheet-панели (поверх навбара, вне app-scroll) */
.catalog-sheet {
  position: fixed; inset: 0; z-index: 90;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  padding-bottom: max(16px, env(safe-area-inset-bottom));
  pointer-events: none;
}
.catalog-sheet.is-open { pointer-events: auto; }
.catalog-sheet.hidden {
  visibility: hidden !important;
  pointer-events: none !important;
}
.catalog-sheet-backdrop {
  position: absolute; inset: 0; background: rgba(0,0,0,0.62);
  opacity: 0; transition: opacity 0.28s ease;
}
.catalog-sheet.is-open .catalog-sheet-backdrop { opacity: 1; }
.catalog-sheet-panel {
  position: relative; width: min(420px, 100%);
  max-height: min(82vh, 720px);
  display: flex; flex-direction: column;
  background: #1c1e1a;
  border-radius: 36px;
  padding: 16px 18px 16px;
  border: 1px solid rgba(255,255,255,0.07);
  box-shadow: 0 18px 50px rgba(0,0,0,0.55);
  transform: translateY(28px) scale(0.96);
  opacity: 0;
  transition: transform 0.34s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.28s ease;
  pointer-events: auto;
  touch-action: pan-y;
}
/* Крестик выше строк аккордеона — стрелки Режим/Время на одной линии */
.catalog-filter-panel {
  padding-top: 52px;
}
.catalog-sheet.is-open .catalog-sheet-panel {
  transform: translateY(0) scale(1);
  opacity: 1;
}
.catalog-sheet-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.85);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.12s ease;
}
.catalog-sheet-close:active { transform: scale(0.92); background: rgba(255,255,255,0.14); }
.catalog-sheet-close .ico-svg { width: 18px; height: 18px; }
.catalog-sheet-scroll {
  flex: 1 1 auto; min-height: 0;
  overflow-y: auto; overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding-right: 2px;
  padding-top: 0;
  touch-action: pan-y;
}
.catalog-filter-handle { display: none !important; }
.catalog-filter-acc {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  background: transparent; border: 0; border-top: 1px solid rgba(255,255,255,0.08);
  color: #fff; padding: 18px 2px;
  font-family: "Unbounded", "Tilda Sans", sans-serif; font-size: 1.25rem; font-weight: 700;
  cursor: pointer;
}
.catalog-filter-acc:first-of-type { border-top: 0; }
.catalog-filter-acc-left { display: inline-flex; align-items: center; gap: 12px; color: #fff; }
.catalog-filter-acc-left [data-icon] {
  width: 28px; height: 28px;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.catalog-filter-acc-left .ico-svg { width: 28px; height: 28px; color: #9ede2f; }
.catalog-acc-chevron {
  flex-shrink: 0;
  width: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.catalog-acc-chevron .ico-svg { width: 26px; height: 26px; color: rgba(255,255,255,0.75); }

.catalog-filter-body {
  padding: 0 2px; overflow: hidden;
  display: grid; grid-template-rows: 1fr;
  transition: grid-template-rows 0.3s ease, opacity 0.25s ease;
  opacity: 1;
}
.catalog-filter-body > * { min-height: 0; }
.catalog-filter-body.hidden {
  display: grid !important; grid-template-rows: 0fr; opacity: 0;
}
.catalog-filter-body-inner { padding-bottom: 14px; }

.catalog-mode-radios { display: flex; flex-direction: column; gap: 2px; }
.catalog-mode-radio {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 6px; border-radius: 14px; cursor: pointer;
  color: #fff; font-weight: 600; font-size: 1.02rem;
}
.catalog-mode-radio:active { background: rgba(255,255,255,0.05); }
.catalog-mode-radio input { position: absolute; opacity: 0; pointer-events: none; }
.catalog-mode-radio-box {
  width: 24px; height: 24px; border-radius: 50%; flex-shrink: 0;
  border: 2px solid rgba(255,255,255,0.35); background: transparent;
  display: inline-flex; align-items: center; justify-content: center;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.28s ease,
    transform 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}
.catalog-mode-radio-box::after {
  content: ""; width: 12px; height: 12px; border-radius: 50%;
  background: #14240a; transform: scale(0);
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}
.catalog-mode-radio input:checked + .catalog-mode-radio-box {
  background: #9ede2f; border-color: #9ede2f;
  box-shadow: 0 0 0 4px rgba(158, 222, 47, 0.22);
}
.catalog-mode-radio input:checked + .catalog-mode-radio-box::after { transform: scale(1); }
@keyframes catalog-mode-pop {
  0% {
    transform: scale(0.72);
    box-shadow: 0 0 0 0 rgba(158, 222, 47, 0.55);
  }
  55% {
    transform: scale(1.14);
    box-shadow: 0 0 0 9px rgba(158, 222, 47, 0);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 4px rgba(158, 222, 47, 0.22);
  }
}
.catalog-mode-radio-box.is-pop {
  animation: catalog-mode-pop 0.38s cubic-bezier(0.22, 1, 0.36, 1);
}
.catalog-mode-radio img { width: 30px; height: 30px; object-fit: contain; flex-shrink: 0;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.4)); }

.catalog-filter-sub {
  margin: 6px 0 12px; font-size: 1.02rem; font-weight: 700; color: #fff;
  text-align: center;
}
.catalog-day-grid {
  display: grid; grid-template-columns: repeat(7, 1fr);
  column-gap: 0; row-gap: 10px;
  margin-bottom: 20px;
  position: relative;
}
.catalog-day-range-bar {
  position: absolute;
  z-index: 0;
  pointer-events: none;
  background: #2f3528;
  border-radius: 999px;
  height: var(--day-size, 36px);
}
.catalog-day-btn {
  aspect-ratio: 1; width: 100%; border-radius: 50%; border: 0; position: relative; z-index: 1;
  background: transparent; color: rgba(255,255,255,0.28);
  font-family: inherit; font-size: 0.8rem; font-weight: 700; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  isolation: isolate;
}
.catalog-day-btn.available { color: #fff; background: transparent; }
.catalog-day-btn.available:active { transform: scale(0.88); }
.catalog-day-btn.in-range {
  background: transparent; color: #fff;
}
.catalog-day-btn.range-start,
.catalog-day-btn.range-end,
.catalog-day-btn.selected {
  background: #9ede2f; color: #14240a; border-radius: 50%;
  box-shadow: 0 0 10px rgba(140,220,40,0.4); z-index: 2;
}
.catalog-day-btn.range-start.range-end { border-radius: 50%; }
.catalog-time-row {
  display: flex; align-items: center; justify-content: center; gap: 14px;
}
.catalog-time-row label {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 1rem; font-weight: 700; color: #fff;
}
.catalog-time-row input[type="time"] {
  margin: 0; border-radius: 999px; background: #34382f; border: 1px solid rgba(255,255,255,0.08);
  color: #fff; padding: 10px 16px; font-size: 0.9rem; font-weight: 700;
  min-width: 108px;
}
.catalog-apply-btn {
  margin-top: 12px; width: 100%; border-radius: 999px !important; flex-shrink: 0;
  height: 54px; font-size: 1.05rem; font-weight: 800;
  background: linear-gradient(180deg, #a6e83a 0%, #8ccc28 100%) !important;
  color: #14240a !important; border: none !important;
  box-shadow: 0 6px 20px rgba(140,220,40,0.35);
}
.catalog-apply-btn:active { transform: scale(0.97); }

/* Сортировка */
.catalog-sort-panel { padding-top: 52px; }
.catalog-sort-list { display: flex; flex-direction: column; gap: 2px; padding: 6px 0 8px; }
.catalog-sort-opt {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 6px; border-radius: 14px; cursor: pointer;
  color: #fff; font-weight: 700; font-size: 1.02rem;
}
.catalog-sort-opt input { position: absolute; opacity: 0; pointer-events: none; }
.catalog-sort-radio {
  width: 24px; height: 24px; border-radius: 50%; flex-shrink: 0;
  border: 2px solid rgba(255,255,255,0.35);
  display: inline-flex; align-items: center; justify-content: center;
}
.catalog-sort-radio::after {
  content: ""; width: 12px; height: 12px; border-radius: 50%;
  background: #14240a; transform: scale(0); transition: transform 0.15s;
}
.catalog-sort-opt input:checked + .catalog-sort-radio {
  background: #9ede2f; border-color: #9ede2f;
}
.catalog-sort-opt input:checked + .catalog-sort-radio::after { transform: scale(1); }

body.catalog-sheet-open { overflow: hidden !important; }
body.catalog-sheet-open .app-scroll {
  overflow: hidden !important;
  overscroll-behavior: none;
  touch-action: none;
}
#panel-catalog.active { padding-bottom: calc(var(--nav-dock-h) + 24px); }
body.brand-hidden #panel-catalog.active .catalog-top {
  margin-top: 0;
  padding-top: 4px;
}

/* Светлая тема: островок фильтров + пилюли режимов (Figma Light / Catalog) */
body.theme-light .catalog-island,
html[data-theme="light"] .catalog-island {
  background: #ffffff;
  border-color: rgba(55, 135, 255, 0.12);
  box-shadow: 0 10px 32px rgba(55, 100, 160, 0.14);
}
/* «ВСЕ» — светлая пилюля; цветные режимы сохраняют градиенты (не затирать bg в #fff) */
body.theme-light .catalog-cat-pill.cat-all,
html[data-theme="light"] .catalog-cat-pill.cat-all {
  background: #ffffff;
  color: #000000;
  border-color: #c8d7ea;
  box-shadow: 0 0 0 2px rgba(55, 135, 255, 0.12), 0 2px 10px rgba(55, 100, 160, 0.12);
}
body.theme-light .catalog-cat-pill.cat-all.active,
html[data-theme="light"] .catalog-cat-pill.cat-all.active {
  box-shadow: 0 0 0 2.5px rgba(55, 135, 255, 0.55), 0 0 14px rgba(55, 135, 255, 0.28), 0 4px 14px rgba(55, 100, 160, 0.18);
}
body.theme-light .catalog-cat-pill.cat-showdown,
body.theme-light .catalog-cat-pill.cat-3v3,
body.theme-light .catalog-cat-pill.cat-duels,
html[data-theme="light"] .catalog-cat-pill.cat-showdown,
html[data-theme="light"] .catalog-cat-pill.cat-3v3,
html[data-theme="light"] .catalog-cat-pill.cat-duels {
  color: #fff;
  border-color: transparent;
}
body.theme-light .catalog-search,
html[data-theme="light"] .catalog-search { background: #eff7ff; border-color: #c8d7ea; }
body.theme-light .catalog-search input,
html[data-theme="light"] .catalog-search input { color: #000000; }
body.theme-light .catalog-tool-btn,
body.theme-light .catalog-reset-btn,
html[data-theme="light"] .catalog-tool-btn,
html[data-theme="light"] .catalog-reset-btn { background: #eff7ff; color: #707f8e; border-color: #c8d7ea; }
body.theme-light .catalog-tool-btn.is-active,
html[data-theme="light"] .catalog-tool-btn.is-active { background: #3787ff; color: #fff; border-color: transparent; }

/* ── Главная (Figma) — темы ── */
#panel-home {
  --h-card: #1a1a1a;
  --h-inner: #131313;
  --h-title: #ffffff;
  --h-muted: #404040;
  --h-soon-bg: #131313;
  --h-soon-fg: #404040;
  --h-soon-border: #404040;
  --h-vml-bg: #8ce95b;
  --h-vml-track: #131313;
  --h-vml-sub: #ffffff;
  --h-vml-arrow-bg: #131313;
  --h-vml-arrow-fg: #ffffff;
  --h-vml-confetti: url(/miniapp/assets/main/confetti-green.png?v=3);
  --h-vml-cup: url(/miniapp/assets/main/cup-figma-dark-t.png?v=5);
  --h-news-accent: #8ce95b;
  --h-news-body: #ffffff;
}
body.theme-light #panel-home {
  --h-card: #eff7ff;
  --h-inner: #dbe8fb;
  --h-title: #0a0a0a;
  --h-muted: #7f93ad;
  --h-soon-bg: #82addf;
  --h-soon-fg: #ffffff;
  --h-soon-border: #ffffff;
  --h-vml-bg: #3787ff;
  --h-vml-track: #ffffff;
  --h-vml-sub: #0a0a0a;
  --h-vml-arrow-bg: #ffffff;
  --h-vml-arrow-fg: #0a0a0a;
  --h-vml-confetti: url(/miniapp/assets/main/confetti-blue.png?v=3);
  --h-vml-cup: url(/miniapp/assets/main/cup-figma-light-t.png?v=5);
  --h-news-accent: #3787ff;
  --h-news-body: #0a0a0a;
}

/* ── Главная (Figma) — общие ── */
.home-section { margin-bottom: 14px; }
.home-section-title {
  margin: 0 0 14px;
  font-family: "Unbounded", "Tilda Sans", sans-serif;
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--h-title);
}
#panel-home .card {
  background: var(--h-card);
  border: 1px solid color-mix(in srgb, var(--h-card) 82%, #000 18%);
  border-radius: 22px;
  padding: 18px;
}
/* Зазоры вокруг VML Pass: 5px (у .card иначе ещё +10px снизу) */
#panel-home > .home-section:first-of-type { margin-bottom: 5px; }
#panel-home .home-disc-card { margin-bottom: 0; }
#panel-home .bp-preview-card { margin: 0 0 5px; }

/* ── Первое появление главной после загрузки ── */
/* Без !important: иначе при снятии init на 1 кадр виден «миг» до старта animation. */
/* will-change поднимает слой заранее: без него промоушен происходит на старте
   анимации и WebView теряет внутренние слои карточки на кадр. */
.home-enter-init {
  opacity: 0;
  pointer-events: none;
  will-change: opacity, transform;
}
@keyframes home-enter-brand {
  0% { opacity: 0; transform: translateY(-14px) scale(0.96); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes home-enter-wallet {
  0% { opacity: 0; transform: translateY(-10px) scale(0.9); }
  70% { opacity: 1; transform: translateY(2px) scale(1.03); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes home-enter-nav {
  0% { opacity: 0; transform: translateX(-50%) translateY(28px) scale(0.96); }
  100% { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}
@keyframes home-enter-block {
  0% { opacity: 0; transform: translateY(18px); }
  100% { opacity: 1; transform: translateY(0); }
}
/* Тот же тайминг, что у обычных блоков — иначе VML Pass «доезжает» позже соседей */
@keyframes home-enter-pass {
  0% { opacity: 0; transform: translateY(18px); }
  100% { opacity: 1; transform: translateY(0); }
}
.home-enter-brand {
  transform-origin: left center;
  animation: home-enter-brand 0.48s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.home-enter-wallet {
  transform-origin: right top;
  animation: home-enter-wallet 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.home-enter-nav {
  transform-origin: center bottom;
  animation: home-enter-nav 0.52s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.home-enter-block {
  transform-origin: center top;
  animation: home-enter-block 0.56s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.home-enter-pass {
  transform-origin: center top;
  animation: home-enter-pass 0.56s cubic-bezier(0.22, 1, 0.36, 1) both;
  will-change: opacity, transform;
}
@media (prefers-reduced-motion: reduce) {
  .home-enter-init { opacity: 1; pointer-events: auto; }
}

/* ── Выбор дисциплины (Figma: Brawl Stars арт + Скоро) ── */
.disc-list { display: flex; flex-direction: column; gap: 14px; }
/* Brawl Stars — Figma 2043:61, 930×250 */
.disc-hero {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 930 / 250;
  border: 0;
  padding: 0;
  /* px, не % — иначе на широкой низкой карточке углы становятся эллипсом и «вылезают» */
  border-radius: 18px;
  cursor: pointer;
  color: #fff;
  font: inherit;
  isolation: isolate;
  overflow: hidden;
  container-type: inline-size;
  background: #10140c;
  -webkit-appearance: none;
  appearance: none;
  outline: none;
  box-shadow: none;
}
.disc-hero:active { transform: scale(0.99); }
.disc-hero-clip {
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  overflow: hidden;
  background: #10140c;
}
.disc-hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* Боковая виньетка из Figma */
.disc-hero-vignette {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(90deg,
    rgba(0,0,0,0.75) 0%,
    rgba(0,0,0,0.25) 25%,
    rgba(0,0,0,0.25) 75%,
    rgba(0,0,0,0.75) 100%);
  pointer-events: none;
}
/* Шторка Back 437×80 @ (246, 170) — горизонтальная, из SVG */
.disc-hero-curtain {
  position: absolute;
  left: 26.45%;
  top: 68%;
  z-index: 2;
  width: 46.99%;
  height: 32%;
  object-fit: fill;
  pointer-events: none;
  filter: drop-shadow(0 10px 25px rgba(0, 0, 0, 0.15));
}
/* Icon 120×120 @ (405, 25), radius 25 */
.disc-hero-icon {
  position: absolute;
  z-index: 3;
  left: 43.55%;
  top: 10%;
  width: 12.9%;
  aspect-ratio: 1;
  border-radius: 20.83%;
  object-fit: cover;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}
/* Text center @ y=210 (84%) */
.disc-hero-name {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 84%;
  transform: translate(-50%, -50%);
  text-align: center;
  font-family: "Tilda Sans", sans-serif;
  font-size: clamp(1.1rem, 6.45cqw, 1.5rem);
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  color: #fff;
  text-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}
/* Скоро — Figma 2043:58: stroke 10, dash 61, gap 43, центр обводки на границе блока.
   SVG 1:1 в координатах макета (viewBox 930×250), обводка центрирована на контуре. */
.disc-soon-card {
  position: relative;
  width: 100%;
  aspect-ratio: 930 / 250;
  border-radius: 18px;
  background-color: var(--h-soon-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  /* visible: внешняя половина штриха выходит на контур, а не прячется внутри */
  overflow: visible;
  box-sizing: border-box;
  border: none;
  isolation: isolate;
}
/* Паттерн часов — inline SVG (currentColor), без CSS-mask: mask мигает при enter/theme */
.disc-soon-pattern {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  display: block;
  overflow: hidden;
  border-radius: inherit;
  color: var(--h-soon-fg);
  opacity: 0.18;
  pointer-events: none;
  transform: translateZ(0);
}
body.theme-light .disc-soon-pattern,
html[data-theme="light"] .disc-soon-pattern { opacity: 0.38; }
.disc-soon-outline {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
  color: var(--h-soon-border);
  display: block;
}
.disc-soon-inner {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.disc-soon-ico {
  width: 24px;
  height: 30px;
  display: block;
  flex-shrink: 0;
  color: var(--h-soon-fg);
}
.disc-soon-text {
  font-family: "Tilda Sans", sans-serif;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--h-soon-fg);
}

/* ── Новости недели (Figma: карусель) ── */
.news-card {
  margin-bottom: 12px;
  padding: 14px 12px 12px;
  border-radius: 18px;
}
.news-card-head {
  position: relative;
  display: block;
  margin-bottom: 14px;
  padding-bottom: 10px;
  /* Figma Line под заголовком — stroke 10px #707F8E */
  border-bottom: 3.2px solid #707f8e;
  min-height: 0;
}
.news-card-head .section-title {
  margin: 0;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--lime);
  max-width: 70%;
  line-height: 1.35;
}
.news-week-badge {
  padding: 0;
  border-radius: 0;
  font-size: 0.62rem;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  color: var(--muted);
  background: transparent;
  border: 0;
  text-align: right;
  line-height: 1.2;
}
.news-feed { display: flex; flex-direction: column; gap: 12px; }
.news-feed-compact { gap: 8px; }
.news-feed-carousel { gap: 0; }
.news-carousel-track {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  margin: 0 -2px;
  padding: 0 2px 4px;
  align-items: stretch;
}
.news-carousel-track::-webkit-scrollbar { display: none; }
.news-feed-carousel .news-item {
  flex: 0 0 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-self: stretch;
}
.news-feed-carousel .news-item-btn {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  height: 100%;
  min-height: 100%;
}
.news-dots {
  display: flex;
  justify-content: center;
  gap: 7px;
  margin-top: 12px;
}
.news-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 0;
  padding: 0;
  background: var(--h-muted, #404040);
  cursor: pointer;
}
.news-dot.is-active {
  background: var(--h-title, #fff);
}

.news-item {
  border-radius: var(--r);
  border: 1px solid var(--stroke);
  background: var(--surface-up);
  overflow: hidden;
}
.news-item.featured {
  border-color: rgba(163, 203, 56, 0.35);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}
.news-item-btn {
  display: block;
  width: 100%;
  padding: 0;
  margin: 0;
  border: none;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.news-item-btn:active { opacity: 0.94; }

.news-media {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: linear-gradient(135deg, #1a1a1a 0%, #0a0a0a 100%);
}
.news-item.featured .news-media { aspect-ratio: 2 / 1; }
.news-item.compact .news-media { aspect-ratio: 2.4 / 1; }
.news-media img,
.news-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.news-media-shade {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: -1px;
  background: linear-gradient(180deg, transparent 28%, rgba(0, 0, 0, 0.55) 72%, var(--surface-up) 100%);
  pointer-events: none;
}
.news-tag {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 1;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 0.58rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--lime-ink);
  background: var(--lime);
}
.news-play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  border: 2px solid rgba(255, 255, 255, 0.85);
  color: #fff;
  font-size: 0.9rem;
  padding-left: 3px;
}
.news-media-text {
  min-height: 48px;
  display: flex;
  align-items: flex-start;
  padding: 10px;
}

.news-body { padding: 11px 12px 12px; }
.news-feed-carousel .news-body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}
.news-feed-carousel .news-meta { margin-top: auto; }
.news-item.compact .news-body { padding: 9px 10px 10px; }
.news-title {
  margin: 0 0 5px;
  font-size: 0.88rem;
  font-weight: 800;
  line-height: 1.25;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: calc(2 * 1.25em);
}
.news-item.compact .news-title {
  font-size: 0.8rem;
  margin-bottom: 3px;
  min-height: 0;
}
.news-item.compact .news-excerpt {
  min-height: 0;
}
.news-excerpt {
  margin: 0 0 8px;
  font-size: 0.74rem;
  font-weight: 600;
  line-height: 1.45;
  color: var(--text-2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: calc(2 * 1.45em);
}
.news-item.compact .news-excerpt {
  font-size: 0.7rem;
  -webkit-line-clamp: 1;
  margin-bottom: 6px;
}
.news-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 10px;
  font-size: 0.64rem;
  font-weight: 700;
  color: var(--muted);
}
.news-source {
  color: var(--lime-hi);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.news-link {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  color: var(--text);
}
.news-link-ico { display: inline-flex; opacity: 0.45; }
.news-link-ico .ico-svg { width: 12px; height: 12px; transform: rotate(-90deg); }

.news-rail {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin: 0 -4px;
  padding-left: 4px;
  padding-right: 4px;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.news-rail::-webkit-scrollbar { display: none; }
.news-rail .news-item {
  flex: 0 0 min(78%, 280px);
  scroll-snap-align: start;
}

/* Две главные новости в ряд */
.news-grid-top {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
}
.news-grid-top .news-item {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.news-grid-top .news-item-btn {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.news-grid-top .news-media {
  width: 100%;
  flex-shrink: 0;
  aspect-ratio: 16 / 9;
  max-height: none;
  min-height: 0;
}
.news-grid-top .news-item.featured .news-media {
  aspect-ratio: 16 / 9;
  max-height: none;
}
.news-grid-top .news-media img,
.news-grid-top .news-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.news-grid-top .news-body {
  flex: 1;
  padding: 9px 10px 10px;
}
.news-grid-top .news-title {
  font-size: 0.8rem;
  line-height: 1.25;
  margin-bottom: 4px;
}
.news-grid-top .news-excerpt {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 0.66rem;
  line-height: 1.35;
}

.news-stack { display: flex; flex-direction: column; gap: 8px; }
.news-empty {
  margin: 0;
  padding: 14px 0;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
}

.news-item.is-skeleton .news-item-btn { cursor: default; }
.news-skel-media {
  position: absolute;
  inset: 0;
  display: block;
  height: auto;
  margin: 0;
  border: 0;
  border-radius: 0;
}
.news-skel-title {
  display: block;
  height: calc(2 * 1.25em);
  width: 92%;
  margin: 0;
  border: 0;
}
.news-skel-excerpt {
  display: block;
  height: calc(2 * 1.45em);
  width: 100%;
  margin: 0;
  border: 0;
}
.news-skel-date {
  display: inline-block;
  height: 0.7em;
  width: 4.5em;
  margin: 0;
  border: 0;
  vertical-align: middle;
}

body.theme-light .news-item,
html[data-theme="light"] .news-item { background: #fff; }
body.theme-light .news-media-shade,
html[data-theme="light"] .news-media-shade {
  background: linear-gradient(180deg, transparent 32%, rgba(0, 0, 0, 0.22) 70%, var(--surface-up) 100%);
}

/* ── Шторка новости (каркас как IAM) ── */
.news-sheet { z-index: 121; }
.news-sheet-badge {
  display: inline-flex;
  align-items: center;
  margin: 0 0 10px;
  padding: 4px 9px;
  border-radius: var(--r-pill);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--lime-ink);
  background: var(--lime);
}
.news-sheet-badge[hidden] { display: none; }
.news-sheet-meta {
  margin: 0 0 12px;
  font-family: "Tilda Sans", Rubik, sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
}
.news-sheet-extras {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 0 4px;
}
.news-sheet-extras[hidden] { display: none; }
.news-sheet-extra {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--surface);
}
.news-sheet-extra-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.news-sheet-skel {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: none;
  height: auto;
  margin: 0;
  border: 0;
  border-radius: 0;
}
.news-sheet-skel.is-on {
  display: block;
}
.news-sheet-skel[hidden] {
  display: none !important;
}
.news-sheet .iam-art img.is-pending,
.news-sheet-extra-img.is-pending {
  opacity: 0;
}
.news-sheet .iam-art img.is-ready,
.news-sheet-extra-img.is-ready {
  opacity: 1;
}
body.theme-light .news-sheet-extra,
html[data-theme="light"] .news-sheet-extra {
  background: var(--surface);
}
body.news-sheet-open { overflow: hidden !important; }
body.news-sheet-open .app-scroll {
  overflow: hidden !important;
  overscroll-behavior: none;
  touch-action: none;
}
body.theme-light .news-sheet,
html[data-theme="light"] .news-sheet {
  --flow-cta: #3787ff;
  --flow-cta-text: #eff7ff;
  --flow-ghost-bg: #eff7ff;
  --flow-ghost-border: #707f8e;
  --flow-ghost-text: #000000;
}

/* ── Кликабельные карточки ── */
.is-clickable { cursor: pointer; }
.is-clickable:active { opacity: 0.92; }

/* ── Страница турнира ── */
.tournament-page-card {
  padding: 0;
  overflow: hidden;
  border-radius: var(--r-md);
}

.t-detail-cover {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: #0c0c10;
  border-radius: var(--r) var(--r) 0 0;
  display: flex;
  align-items: stretch;
}
.t-detail-cover-img {
  width: 100%;
  height: min(72vw, 360px);
  object-fit: cover;
  object-position: center center;
  display: block;
  border-radius: var(--r) var(--r) 0 0;
  background: #0c0c10;
}

/* Карта слева, метрики справа (Showdown + 3v3) */
.t-detail-hero-split {
  display: grid;
  grid-template-columns: minmax(108px, 38%) 1fr;
  gap: 10px;
  padding: 12px;
  border-bottom: 1px solid var(--stroke);
  align-items: stretch;
}
.t-detail-hero-3v3 {
  display: grid;
  grid-template-columns: minmax(108px, 38%) 1fr;
  gap: 10px;
  padding: 12px;
  border-bottom: 1px solid var(--stroke);
  align-items: stretch;
}
.t-detail-map-col {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.t-detail-map-frame {
  flex: 0 0 auto;
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface-up);
  border: 1px solid var(--stroke);
  line-height: 0;
}
.t-detail-map-img {
  width: 100%;
  height: auto;
  display: block;
  min-height: 0;
  max-height: none;
}
.t-detail-map-foot {
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.t-detail-map-mode {
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--lime);
}
.t-detail-map-name {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--text-2);
  line-height: 1.25;
}
.t-detail-side-col {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}
.t-detail-hero-split .t-detail-title-row,
.t-detail-hero-3v3 .t-detail-title-row {
  margin-bottom: 10px;
}
.t-detail-hero-split .t-detail-title,
.t-detail-hero-3v3 .t-detail-title {
  font-size: 0.92rem;
  line-height: 1.2;
}
.t-detail-hero-split .t-detail-metrics,
.t-detail-hero-3v3 .t-detail-metrics {
  grid-template-columns: 1fr;
  gap: 6px;
  margin-bottom: 8px;
}
.t-detail-hero-split .t-detail-metric,
.t-detail-hero-3v3 .t-detail-metric {
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: left;
  padding: 8px 10px;
}
.t-detail-hero-split .t-detail-metric-val,
.t-detail-hero-3v3 .t-detail-metric-val {
  font-size: 0.86rem;
}
.t-detail-hero-split .t-detail-metric-lbl,
.t-detail-hero-3v3 .t-detail-metric-lbl {
  margin-top: 0;
  font-size: 0.62rem;
}
.t-detail-hero-split .t-detail-meta,
.t-detail-hero-3v3 .t-detail-meta {
  margin-bottom: 6px;
}
.t-detail-hero-split .t-fill,
.t-detail-hero-3v3 .t-fill {
  margin: 0;
}
.t-detail-cover-fade {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.05) 0%,
    rgba(0, 0, 0, 0) 40%,
    rgba(0, 0, 0, 0.7) 100%
  );
  pointer-events: none;
}
.t-detail-cover-labels {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.t-detail-cover-mode {
  font-size: 0.66rem;
  font-weight: 800;
  color: rgba(255,255,255,0.75);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(6px);
}
.t-detail-cover-map {
  font-size: 0.78rem;
  font-weight: 800;
  color: #fff;
  padding: 4px 10px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.t-detail-summary {
  padding: 14px 14px 12px;
  border-bottom: 1px solid var(--stroke);
}
.t-detail-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.t-detail-mode {
  margin: 0 0 4px;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--lime);
}
.t-detail-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.25;
  color: var(--text);
}
.t-detail-title-row .status {
  flex-shrink: 0;
  margin-top: 2px;
}
.t-detail-title-actions {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.t-share-btn {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid var(--stroke);
  background: var(--surface-up);
  color: var(--lime);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.t-share-btn:active { background: var(--ink); transform: scale(0.94); }
.t-share-btn .ico-svg { width: 18px; height: 18px; }

.t-detail-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 10px;
}
.t-detail-metric {
  text-align: center;
  padding: 10px 6px;
  border-radius: 12px;
  background: var(--surface-up);
  border: 1px solid var(--stroke);
}
.t-detail-metric.accent {
  background: rgba(200, 255, 80, 0.08);
  border-color: rgba(200, 255, 80, 0.22);
}
.t-detail-metric-val {
  display: block;
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--lime-hi);
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}
.t-detail-metric-lbl {
  display: block;
  margin-top: 2px;
  font-size: 0.58rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}
.t-detail-meta {
  margin-bottom: 8px;
}
.t-detail-start {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-2);
}
.t-detail-summary .t-fill {
  margin: 0;
}

.tournament-page-body {
  padding: 0 12px 12px;
}
.tournament-page-body .section-title {
  margin-top: 14px;
  margin-bottom: 8px;
}
.tournament-page-body .section-title:first-child {
  margin-top: 12px;
}
.rules-accordion {
  margin: 14px 0 8px;
  border: 1px solid var(--stroke);
  border-radius: 12px;
  background: var(--surface-up);
  overflow: hidden;
}
.rules-accordion > summary {
  list-style: none;
  cursor: pointer;
  padding: 10px 12px;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--text);
}
.rules-accordion > summary::-webkit-details-marker {
  display: none;
}
.rules-accordion > summary::after {
  content: "▾";
  float: right;
  color: var(--muted);
  transition: transform 0.2s ease;
}
.rules-accordion[open] > summary::after {
  transform: rotate(180deg);
}
.rules-accordion-body {
  padding: 0 0 10px;
}
.tournament-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
  width: 100%;
}
.tournament-lobby-code {
  width: 100%;
}
.tournament-lobby-code .section-title {
  margin: 0 0 6px;
}
.tournament-lobby-code-box {
  margin: 0 0 4px;
}
.tournament-actions .action {
  margin: 0;
  width: 100%;
  box-sizing: border-box;
}
.tournament-map-frame,
.tournament-map {
  display: none;
}
.tournament-head {
  display: flex;
  gap: 10px;
  padding: 12px;
  align-items: flex-start;
}
.tournament-title {
  font-size: 1rem;
  font-weight: 800;
  margin: 0 0 6px;
  line-height: 1.2;
}
.tournament-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 0 12px 12px;
}
.tournament-stat {
  background: var(--surface-up);
  border: 1px solid var(--stroke);
  border-radius: var(--r-sm);
  padding: 8px 10px;
}
.tournament-stat .label {
  display: block;
  font-size: 0.48rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 2px;
}
.tournament-stat .value {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--lime-hi);
}
.tournament-stat .value-sm { font-size: 0.68rem; font-weight: 700; color: var(--text); }
.tournament-page-body .rules-list {
  margin: 0;
  padding-left: 18px;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-2);
  line-height: 1.55;
}
.tournament-page-body .participants-list {
  margin: 0;
}
.tournament-page-body .info-box {
  margin: 0;
}
/* Legacy-отступы только для элементов вне .tournament-page-body */
.tournament-page-card > .section-title,
.tournament-page-card > .rules-list,
.tournament-page-card > .participants-list,
.tournament-page-card > .info-box,
.tournament-page-card > .t-fill,
.tournament-page-card > .action {
  margin-left: 12px;
  margin-right: 12px;
}
.tournament-page-card > .action { margin-bottom: 12px; }
.rules-list {
  margin: 0 12px 0;
  padding-left: 18px;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-2);
  line-height: 1.55;
}
.rules-accordion-body .rules-list {
  margin: 0 12px;
}

/* ── Список участников ── */
.participants-list {
  list-style: none;
  padding: 0;
  margin: 0 12px 12px;
}
.td-acc-body .participants-list {
  margin: 0;
}
.td-acc-body .friend-list {
  gap: 8px;
}
.td-acc-body .team-members.friend-list {
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.td-acc-body .friend-row,
.lobby-list .friend-row {
  min-height: 54px;
}
body.theme-light .td-acc-body .friend-row,
html[data-theme="light"] .td-acc-body .friend-row,
body.theme-light .lobby-list .friend-row,
html[data-theme="light"] .lobby-list .friend-row {
  border-color: var(--stroke);
}
.lobby-list.friend-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}
.lobby-list.friend-list li { border-bottom: none; padding: 0; }
.participant-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--stroke);
  cursor: pointer;
}
.participant-row:last-child { border-bottom: none; }
.participant-avatar {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--surface-up);
  border: 1px solid var(--stroke);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 900;
  color: var(--lime);
  flex-shrink: 0;
}
.participant-meta { flex: 1; min-width: 0; }
.participant-name {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
}
.participant-tag {
  display: block;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--muted);
}

/* ── Модалки ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(0,0,0,0.65);
}
/* Не display:none: смена display в WebView даёт кадр непрозрачной модалки. */
.modal-overlay.hidden {
  visibility: hidden !important;
  pointer-events: none !important;
  opacity: 0 !important;
}
#modal-overlay {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
}
#modal-overlay:not(.hidden) { pointer-events: auto; }
#modal-overlay.is-opening { opacity: 0; }
#modal-overlay.is-open { opacity: 1; }
#modal-overlay.is-leaving { opacity: 0; pointer-events: none; }
#modal-overlay .modal-sheet {
  transition: transform 0.36s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.28s ease;
}
#modal-overlay:not(.vml-flow-center):not(.deposit-center) .modal-sheet,
#modal-overlay.vml-flow-bottom .modal-sheet {
  transform: translateY(16px);
  opacity: 0.72;
}
#modal-overlay:not(.vml-flow-center):not(.deposit-center).is-open .modal-sheet,
#modal-overlay.vml-flow-bottom.is-open .modal-sheet {
  transform: translateY(0);
  opacity: 1;
}
#modal-overlay:not(.vml-flow-center):not(.deposit-center).is-leaving .modal-sheet,
#modal-overlay.vml-flow-bottom.is-leaving .modal-sheet,
#modal-overlay:not(.vml-flow-center):not(.deposit-center).is-opening .modal-sheet,
#modal-overlay.vml-flow-bottom.is-opening .modal-sheet {
  transform: translateY(24%);
  opacity: 0;
}
#modal-overlay.vml-flow-center .modal-sheet,
#modal-overlay.deposit-center .modal-sheet {
  transform: translateY(14px) scale(0.97);
  opacity: 0;
}
#modal-overlay.vml-flow-center.is-open .modal-sheet,
#modal-overlay.deposit-center.is-open .modal-sheet {
  transform: none;
  opacity: 1;
}
#modal-overlay.vml-flow-center.is-leaving .modal-sheet,
#modal-overlay.vml-flow-center.is-opening .modal-sheet,
#modal-overlay.deposit-center.is-leaving .modal-sheet,
#modal-overlay.deposit-center.is-opening .modal-sheet {
  transform: translateY(12px) scale(0.97);
  opacity: 0;
}
@media (prefers-reduced-motion: reduce) {
  #modal-overlay,
  #modal-overlay .modal-sheet {
    transition: none !important;
  }
  #modal-overlay.is-open .modal-sheet {
    transform: none;
    opacity: 1;
  }
}
.modal-overlay.deposit-center {
  align-items: center;
  justify-content: center;
  padding: 20px 16px;
}
.modal-overlay.deposit-center .modal-sheet.deposit-modal {
  width: min(100%, 400px);
  max-height: min(85vh, calc(var(--app-vh, 100dvh) * 0.85));
  margin: 0;
  border: 1px solid var(--stroke);
  border-radius: 20px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
}
.modal-sheet {
  width: 100%;
  max-width: 480px;
  max-height: min(82vh, calc(var(--app-vh, 100dvh) * 0.82));
  overflow-y: auto;
  margin-bottom: 0;
  padding: 16px 14px max(20px, env(safe-area-inset-bottom, 0px));
  border: 1px solid var(--stroke);
  border-bottom: none;
  border-radius: 18px 18px 0 0;
  background: var(--surface);
}
.modal-sheet.deposit-modal {
  max-height: min(88vh, calc(var(--app-vh, 100dvh) * 0.88));
}
.modal-sheet.wallet-modal {
  max-height: min(90vh, calc(var(--app-vh, 100dvh) * 0.9));
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.modal-sheet.wallet-modal .modal-header {
  flex-shrink: 0;
}
.modal-sheet.wallet-modal .modal-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  margin-bottom: 0;
}
.modal-sheet.wallet-modal .wallet-history-head {
  position: sticky;
  top: 0;
  z-index: 3;
  margin: 0 -16px 12px;
  padding: 0 16px 12px;
  background: var(--flow-bg, var(--surface));
  border-radius: 0;
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.modal-header h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
}
.modal-close {
  width: 32px;
  height: 32px;
  border: 1px solid var(--stroke);
  border-radius: 8px;
  background: var(--surface-up);
  color: var(--text);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}
.modal-body { margin-bottom: 12px; }
.modal-actions { display: flex; flex-direction: column; gap: 8px; }
.modal-actions:empty,
.modal-actions[hidden] { display: none; }
.modal-actions .action { margin-top: 0; }
.deposit-asset-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.deposit-method-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}
.deposit-method-row--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.deposit-method.active {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}
.deposit-pack-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.deposit-pack-grid .action {
  margin-top: 0;
}
.deposit-custom-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-bottom: 8px;
}
.ton-deposit-note {
  margin: 12px 0 0;
  font-size: 0.74rem;
  line-height: 1.45;
  color: var(--muted);
}
.ton-deposit-note code {
  font-size: 0.72rem;
  color: var(--accent);
}
.ton-deposit-box {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.ton-deposit-lead {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.45;
}
.ton-deposit-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ton-deposit-label {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.ton-deposit-copy-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: start;
}
.ton-deposit-value {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--surface-up);
  border: 1px solid var(--border);
  font-size: 0.72rem;
  line-height: 1.4;
  word-break: break-all;
  color: var(--text);
}
.ton-deposit-memo {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--accent);
}
.ton-deposit-amount {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}
.ton-deposit-warning {
  margin: 0;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.4;
  color: #ff6b6b;
  background: rgba(255, 80, 80, 0.12);
  border: 1px solid rgba(255, 80, 80, 0.35);
}
.ton-copy-btn {
  margin-top: 0;
  white-space: nowrap;
  padding-inline: 12px;
}
.ton-deposit-hint,
.ton-deposit-status {
  margin: 0;
  font-size: 0.76rem;
  line-height: 1.45;
  color: var(--muted);
}
.deposit-custom-row .input {
  min-width: 0;
}
.deposit-asset,
.deposit-method,
.deposit-pack {
  margin-top: 0;
}
.deposit-asset {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  min-height: 44px;
  font-weight: 700;
}
.deposit-asset.active {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}

/* ── Поддержка — layout (Figma 4017)
   Отступ под navbar уже в .app-scroll padding-bottom — второй раз не добавляем,
   иначе между карточкой и доком остаётся «дыра», а «Мои обращения» обрезается. */
body.support-tab-active .app-scroll {
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
body.support-tab-active #panel-support.active {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
  padding-bottom: 0;
  box-sizing: border-box;
}
body.support-tab-active .support-page {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
  margin-bottom: 0;
  padding-bottom: 0;
}
body.support-tab-active #support-list-view:not(.hidden),
body.support-tab-active #support-new-view:not(.hidden),
body.support-tab-active #support-chat-view:not(.hidden) {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
}
body.support-tab-active #support-list-view:not(.hidden) {
  gap: 12px;
}
body.support-tab-active #support-chat-view:not(.hidden) {
  gap: 10px;
}
#support-chat-view .support-chat {
  flex: 1 1 auto;
  min-height: 120px;
}
.support-new-attach-row {
  margin: 0;
}
.support-intro {
  flex-shrink: 0;
  margin-bottom: 10px;
}
.support-chat {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  margin-bottom: 0;
  padding: 0;
  background: var(--support-panel, var(--ink));
  border: 1px solid var(--support-border, var(--stroke));
  border-radius: 18px;
}
/* Чуть крупнее панели: path вылезал за viewBox, уменьшать — наоборот хуже */
.support-chat-bg {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 100%;
  height: 100%;
  transform: translate(-50%, -50%) scale(1.1);
  object-fit: contain;
  object-position: center;
  pointer-events: none;
  z-index: 0;
  opacity: 1;
}
.support-chat-msgs {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.support-footer {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
  padding-top: 0;
  border-top: 0;
}
.support-compose {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.support-compose-row {
  display: flex;
  gap: 10px;
  align-items: stretch;
}
.support-compose-row textarea { flex: 1; min-width: 0; }
.support-attach-btn {
  flex: 0 0 auto;
  width: 54px;
  height: 54px;
  min-width: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1.5px solid var(--support-accent, var(--lime));
  background: var(--support-shell, var(--surface-up));
  cursor: pointer;
  color: var(--support-accent, var(--lime));
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}
.support-attach-btn img {
  width: 27px;
  height: 24px;
  object-fit: contain;
  display: block;
}
.support-attach-btn:active {
  transform: scale(0.97);
}
.support-attach-btn-wide {
  width: auto;
  min-width: 112px;
  padding: 0 16px;
  gap: 10px;
  justify-content: flex-start;
}
.support-attach-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}
.support-attach-ico .ico-svg {
  width: 24px;
  height: 24px;
}
.support-attach-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
}
.support-media-box,
.support-attach-preview {
  position: relative;
  flex-shrink: 0;
  padding: 10px;
  border-radius: 18px;
  border: 1px solid var(--support-border, var(--stroke));
  background: var(--support-panel, var(--surface-up));
  overflow: hidden;
}
.support-media-box.hidden,
.support-attach-preview.hidden { display: none !important; }
.support-media-box:not(.support-media-grid) .chat-media,
.support-media-box:not(.support-media-grid) img.chat-media,
.support-media-box:not(.support-media-grid) video.chat-media,
.support-attach-preview:not(.support-media-grid) .chat-media,
.support-attach-preview:not(.support-media-grid) img,
.support-attach-preview:not(.support-media-grid) video {
  display: block;
  max-height: 160px;
  max-width: 42%;
  width: auto;
  height: auto;
  margin: 0 auto;
  object-fit: contain;
  border-radius: 14px;
  background: var(--support-border, #404040);
}
.support-media-box--compact .chat-media,
.support-media-box--compact img.chat-media,
.support-media-box--compact video.chat-media {
  max-height: 96px;
}
.support-media-box--compact.support-media-grid .support-media-thumb {
  width: 72px;
  height: 72px;
  max-width: 72px;
  max-height: 72px;
  flex-basis: 72px;
}
.support-attach-clear {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.support-attach-clear img {
  width: 36px;
  height: 36px;
  display: block;
  object-fit: contain;
}
.support-load-hint {
  text-align: center;
  padding: 6px 0 10px;
  font-size: 0.78rem;
  color: var(--muted);
}
.support-load-btn {
  border: 1px solid var(--stroke);
  background: var(--surface-up);
  color: var(--text);
  border-radius: 999px;
  padding: 6px 14px;
  font: inherit;
  font-size: 0.78rem;
  cursor: pointer;
}
.support-load-btn:active {
  background: var(--ink);
}
.chat-author {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--lime);
  margin-bottom: 4px;
  opacity: 0.9;
}
.chat-text { white-space: pre-wrap; word-break: break-word; }
.chat-media {
  display: block;
  max-width: 100%;
  border-radius: 10px;
  margin-bottom: 6px;
}
.chat-bubble time {
  display: block;
  margin-top: 4px;
  font-size: 0.62rem;
  color: var(--muted);
  font-weight: 500;
}
.support-compose .action { margin-top: 0; }
.support-compose textarea,
.support-page .support-input,
.support-page .support-textarea {
  margin: 0;
  resize: none;
}
.support-page .support-textarea { resize: vertical; }
.support-page .support-input:focus,
.support-page .support-textarea:focus,
.support-page #support-input:focus {
  outline: none;
  border-color: var(--support-accent, var(--lime));
}
.support-chat-head .support-status { margin-bottom: 0; }

/* дубль ниже в блоке Figma 4017 — см. .support-appeals-list */
.support-appeal-item {
  width: 100%;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  text-align: left;
  border: 1px solid var(--accounts-row-border, var(--stroke));
  background: var(--accounts-card, var(--surface-up));
  border-radius: 22px;
  padding: 10px 18px 8px 14px;
  color: inherit;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.16);
}
.support-appeal-item:active { opacity: 0.92; }
.support-appeal-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  min-width: 0;
  margin-bottom: 4px;
}
.support-appeal-title-wrap {
  display: flex;
  flex-wrap: nowrap;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
  flex: 1;
  overflow: hidden;
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--support-title, #fff);
}
.support-appeal-id {
  flex-shrink: 0;
  font-size: 1.02rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--accounts-accent, var(--lime));
  font-variant-numeric: tabular-nums;
}
.support-appeal-reason {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.support-appeal-head time {
  font-size: 0.82rem;
  color: var(--accounts-muted, var(--muted));
  white-space: nowrap;
  flex-shrink: 0;
}
.support-status {
  display: inline-block;
  width: fit-content;
  max-width: 100%;
  margin-bottom: 8px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.3;
  background: transparent;
}
.support-status-waiting {
  color: #e5bd39;
  border: 1px solid rgba(229, 189, 57, 0.55);
}
.support-status-answered {
  color: var(--accounts-accent, var(--lime));
  border: 1px solid color-mix(in srgb, var(--accounts-accent, var(--lime)) 55%, transparent);
}
.support-status-closed {
  color: var(--accounts-muted, var(--muted));
  border: 1px solid var(--accounts-row-border, var(--stroke));
}
.support-closed-hint {
  margin-top: 8px;
}
.support-chat-title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 8px;
}
.support-appeal-preview {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--accounts-muted, var(--muted));
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.support-chat-head {
  margin: 0;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}
#support-chat-footer.hidden { display: none !important; }
.support-chat-title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: flex-end;
  gap: 6px;
  margin: 0;
  text-align: right;
  font-family: "Tilda Sans", "Rubik", sans-serif;
  font-size: 1.02rem;
  font-weight: 800;
  color: var(--support-title, #fff);
  line-height: 1.2;
}
.chat-bubble {
  max-width: 78%;
  padding: 12px 14px;
  border-radius: 18px;
  font-family: "Tilda Sans", "Rubik", sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.35;
  margin: 0;
  color: var(--support-title, #fff);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
}
.chat-bubble.mod {
  align-self: flex-start;
  background: rgba(128, 128, 128, 0.05);
  border: 1px solid var(--support-muted, #808080);
}
.chat-bubble.user {
  align-self: flex-end;
  margin-left: auto;
  background: rgba(140, 233, 91, 0.05);
  border: 1px solid var(--support-accent, #8ce95b);
}
body.theme-light .chat-bubble.user,
html[data-theme="light"] .chat-bubble.user {
  background: rgba(55, 135, 255, 0.08);
}
.chat-bubble .chat-text { color: inherit; }
.chat-bubble time {
  display: block;
  margin-top: 6px;
  font-size: 0.72rem;
  font-weight: 500;
  line-height: 1.2;
}
.chat-bubble.mod time { color: var(--support-muted, #808080); }
.chat-bubble.user time { color: var(--support-accent, #8ce95b); }
.chat-author {
  font-size: 0.75rem;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--support-muted, #808080);
}
textarea {
  width: 100%;
  padding: 11px 12px;
  margin: 5px 0;
  border-radius: var(--r-sm);
  border: 1px solid var(--stroke);
  background: var(--surface-up);
  color: var(--text);
  font-family: inherit;
  font-size: 0.86rem;
  font-weight: 600;
  resize: vertical;
}
textarea:focus { outline: none; border-color: var(--lime); }

/* ── Настройки — Figma Settings 2067:69 (Dark) / 2067:369 (Light)
   Макет 1080: карточка 1030×… r=100, иконка 125, ряд 125, заголовок Unbounded 50.
   Отступ под навбар уже в .app-scroll — не дублируем, иначе после кнопок пустой скролл. ── */
body.settings-tab-active .app-scroll {
  padding-bottom: calc(var(--nav-dock-h) + max(8px, var(--tg-bottom)) + 8px);
}
body.settings-tab-active #panel-settings.active {
  padding-bottom: 0;
}
.settings-page {
  --s-card: #1a1a1a;
  --s-title: #ffffff;
  --s-label: #ffffff;
  --s-muted: #404040;
  --s-danger: #e95b5b;
  --s-ico-back: #1a1a1a;
  --s-ico-shadow: 0 4px 9px rgba(0, 0, 0, 0.45);
  --s-card-shadow: 0 4px 9px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.settings-card {
  background: var(--s-card);
  border-radius: 36px;
  padding: 18px 18px 14px;
  box-shadow: var(--s-card-shadow);
  border: 0;
}
.settings-card-title {
  margin: 0 0 14px;
  font-family: "Unbounded", "Tilda Sans", sans-serif;
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--s-title);
  line-height: 1.15;
}
.settings-rows {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.settings-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 45px;
  padding: 0;
  margin: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.settings-row:active {
  opacity: 0.82;
}
.settings-ico {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--s-ico-back);
  box-shadow: var(--s-ico-shadow);
  overflow: hidden;
}
.settings-ico img,
.settings-action-btn img {
  width: 27px;
  height: 27px;
  object-fit: contain;
  display: block;
  pointer-events: none;
}
.settings-ico .ico-svg {
  width: 22px;
  height: 22px;
  color: var(--text);
}
.settings-ico img[data-settings-ico="telegram"],
.settings-ico img[data-settings-ico="tiktok"] {
  width: 28px;
  height: 28px;
}
.settings-ico img[data-settings-ico="devices"],
.settings-ico img[data-settings-ico="link"] {
  width: 22px;
  height: 27px;
}
.settings-label {
  flex: 1 1 auto;
  min-width: 0;
  font-family: "Tilda Sans", "Rubik", sans-serif;
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--s-label);
  line-height: 1.2;
}
.settings-value {
  flex-shrink: 0;
  max-width: 42%;
  text-align: right;
  font-family: "Tilda Sans", "Rubik", sans-serif;
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--s-muted);
  line-height: 1.2;
}
.settings-chevron {
  flex-shrink: 0;
  width: 12px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--s-muted);
  opacity: 1;
}
.settings-chevron .ico-svg {
  width: 16px;
  height: 16px;
}
.settings-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 2px;
}
.settings-action-btn {
  width: 100%;
  height: 54px;
  border: 0;
  border-radius: 999px;
  background: var(--s-card);
  box-shadow: var(--s-card-shadow);
  color: var(--s-danger);
  font-family: "Tilda Sans", "Rubik", sans-serif;
  font-size: 1.05rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  cursor: pointer;
  padding: 0 18px;
  -webkit-tap-highlight-color: transparent;
}
.settings-action-btn:active {
  transform: scale(0.985);
  opacity: 0.9;
}
.settings-action-btn img {
  width: 26px;
  height: 26px;
}

/* Светлая тема настроек — Figma Light */
body.theme-light .settings-page,
html[data-theme="light"] .settings-page {
  --s-card: #ffffff;
  --s-title: #000000;
  --s-label: #000000;
  --s-muted: #707f8e;
  --s-danger: #e95b5b;
  --s-ico-back: #ffffff;
  --s-ico-shadow: 0 4px 10px rgba(55, 100, 160, 0.18);
  --s-card-shadow: 0 4px 14px rgba(55, 100, 160, 0.14);
}
body.theme-light .settings-ico,
html[data-theme="light"] .settings-ico {
  border: 1px solid rgba(55, 135, 255, 0.14);
}
.social-links li.disabled { opacity: 0.45; cursor: default; }
.social-links li.clickable { cursor: pointer; }
.social-links .link-status {
  text-transform: none;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.link-status {
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
}
#profile-bs-hint.ok { color: var(--lime); }

/* ── Анимация переключения темы ── */
.theme-flash {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0;
  background: var(--flash-to, #000);
}
body.theme-switching .theme-flash {
  animation: theme-flash-dip 1.05s cubic-bezier(0.45, 0.05, 0.2, 1) forwards;
}
/* Перекрытие сплошным цветом целевой темы: смена происходит под ним */
@keyframes theme-flash-dip {
  0%   { opacity: 0; }
  32%  { opacity: 1; }
  48%  { opacity: 1; }
  100% { opacity: 0; }
}

/* ── Командные карточки участников ── */
.team-card {
  border: 1px solid var(--stroke);
  border-radius: var(--r-sm);
  overflow: hidden;
  margin-bottom: 8px;
}
.team-card:last-child { margin-bottom: 0; }

/* ── Турнирная сетка ── */
.bracket-tree {
  display: flex;
  align-items: flex-start;
  overflow-x: auto;
  padding: 2px 4px 12px;
}
.bracket-round-col {
  flex: 0 0 auto;
  min-width: 150px;
  position: relative;
}
.bracket-round-slots {
  position: relative;
}
.bracket-match-pos {
  position: absolute;
  left: 0;
  right: 0;
  box-sizing: border-box;
}
.bracket-col-title {
  font-size: 0.6rem;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
  letter-spacing: 0.06em;
  white-space: nowrap;
  text-align: center;
  line-height: 1;
}
.bracket-match {
  height: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--stroke);
  border-radius: 10px;
  padding: 6px 8px;
  box-sizing: border-box;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
}
.bracket-slot {
  width: 100%;
  text-align: left;
  border: 1px solid var(--stroke);
  background: rgba(0,0,0,0.15);
  border-radius: 7px;
  padding: 5px 8px;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  box-sizing: border-box;
}
.bracket-slot.winner { border-color: #d4a017; background: rgba(212,160,23,0.08); }
.bracket-slot.empty { color: var(--muted); font-size: 0.78rem; }
.bracket-team-name { font-weight: 700; font-size: 0.8rem; line-height: 1.15; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bracket-win-badge { font-size: 0.78rem; flex-shrink: 0; }
.bracket-vs { text-align: center; font-size: 0.58rem; color: var(--muted); line-height: 1; }

.team-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: var(--surface-up);
  border-bottom: 1px solid var(--stroke);
}
.team-num {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--lime);
}
.team-cap-label {
  font-size: 0.76rem;
  color: var(--text-2);
}
.team-cap-label strong { color: var(--text); }
.team-members { padding: 4px 0; }
.team-member-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 12px;
  border-bottom: 1px solid var(--stroke-lo);
}
.team-member-row:last-child { border-bottom: none; }
.team-member-avatar {
  width: 30px; height: 30px;
  border-radius: 8px;
  background: var(--surface-up);
  border: 1px solid var(--stroke);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--text-2);
  flex-shrink: 0;
}
.team-member-info { display: flex; flex-direction: column; gap: 1px; }
.team-member-name { font-size: 0.82rem; font-weight: 700; color: var(--text); }
.team-member-tag { font-size: 0.7rem; color: var(--muted); font-family: monospace; }

/* ── Инвайт ссылка ── */
.invite-link-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 12px;
  border-radius: var(--r-sm);
  background: var(--surface-up);
  border: 1px solid var(--stroke);
}
.invite-link-url {
  margin: 0;
  font-size: 0.72rem;
  font-family: monospace;
  color: var(--text-2);
  word-break: break-all;
  line-height: 1.4;
}
.btn-sm { padding: 6px 14px !important; font-size: 0.78rem !important; }

/* ── Сетка выбора режима (2 колонки, 6 режимов) ── */
#mode-list.mode-grid-2x2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: minmax(0, 1fr);
  gap: 8px;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
}
.panel-mode-full.active {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 0 12px 16px;
  background: transparent;
}
.mode-panel-inner {
  max-width: 480px;
  width: 100%;
  margin: 0 auto;
  padding: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.mode-panel-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0 12px;
}
.mode-back-btn {
  flex-shrink: 0;
  margin-bottom: 0;
}
.mode-panel-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text);
  margin: 0;
  line-height: 1.2;
}

/* Анимация открытия страницы выбора режима */
@keyframes mode-header-in {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes mode-tile-in {
  from { opacity: 0; transform: translateY(22px) scale(0.94); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.mode-panel-header.mode-enter {
  animation: mode-header-in 0.34s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.mode-tile.mode-enter {
  animation: mode-tile-in 0.38s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.mode-tile {
  display: flex;
  flex-direction: column;
  border-radius: 14px;
  background: transparent;
  border: 1px solid var(--stroke);
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.mode-tile:active:not(.mode-tile-soon) {
  background: rgba(163,203,56,0.08);
  border-color: var(--lime-lo);
}
.mode-tile-soon {
  opacity: 0.45;
  cursor: default;
}
.mode-tile-img-wrap {
  position: relative;
  height: auto;
  flex: 1 1 auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: rgba(255,255,255,0.03);
  padding: 8px 10px;
}
/* Фон-карта тайла: лёгкие JPEG (~40KB), показ после decode */
.mode-tile-img-wrap.has-bg {
  --mode-bg: none;
  background-color: #1a1f16;
  contain: paint;
}
.mode-tile-img-wrap.has-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: var(--mode-bg);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}
.mode-tile-img-wrap.has-bg.is-ready::after {
  opacity: 1;
}
.mode-tile-img {
  position: relative;
  z-index: 1;
  max-width: 100%;
  max-height: 56px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 3px 6px rgba(0,0,0,0.6));
}
.mode-tile-emoji {
  font-size: 2rem;
  line-height: 1;
}
.mode-tile-soon-icon {
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--muted);
  opacity: 0.35;
}
.mode-tile-footer {
  padding: 8px 10px 10px;
  border-top: 1px solid var(--stroke);
  background: var(--surface);
}
.mode-tile-label {
  margin: 0 0 3px;
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
}
.mode-tile-sub {
  margin: 0;
  font-size: 0.6rem;
  color: var(--text-2);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.mode-tile-soon-badge {
  margin: 0;
  font-size: 0.58rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

/* Старые mode-card (keep for backward compat if any) */
.mode-card { display: none; }

/* ── Призовая сетка на странице турнира ── */
.prize-breakdown {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 4px;
}
.prize-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: var(--r-sm);
  background: var(--surface-up);
  border: 1px solid var(--stroke);
}
.prize-row.accent {
  background: var(--lime-dim);
  border-color: var(--lime-lo);
}
.prize-rank {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
}
.prize-amt {
  font-size: 1rem;
  font-weight: 900;
  color: var(--lime);
}
.prize-row.accent .prize-amt {
  font-size: 1.1rem;
}

/* ── Светлая тема (Figma Light) ──
   Фон #d6dae4 / поверхности #eff7ff / акцент #3787ff вместо лайма. */
/* Переменные светлой темы объявляем на :root при наличии data-theme="light" на <html>
   — это применяется ДО JS, поэтому навбар и все элементы не мигают тёмными цветами */
html[data-theme="light"] { background: #d6dae4; }

html[data-theme="light"],
html[data-theme="light"] body,
body.theme-light {
  --ink: #d6dae4;
  --surface: #eff7ff;
  --surface-up: #e4eef9;
  --stroke: #c8d7ea;
  --stroke-lo: #d9e6f4;
  --text: #000000;
  --text-2: #707f8e;
  --muted: #707f8e;
  /* Акценты Figma Light: яркий синий вместо лаймового */
  --lime: #3787ff;
  --lime-hi: #5a9dff;
  --lime-lo: #82addf;
  --lime-ink: #ffffff;
  --lime-dim: rgba(55, 135, 255, 0.12);
  --lime-glow: rgba(55, 135, 255, 0.18);
  --err: #e06060;
  /* Тени на светлом — холодные и мягче, чем чёрные из dark */
  --shadow-sm: 0 4px 10px rgba(55, 100, 160, 0.12);
  --shadow-md: 0 4px 14px rgba(55, 100, 160, 0.14);
  --shadow-lg: 0 10px 25px rgba(55, 100, 160, 0.18);
  --shadow-modal: 0 18px 50px rgba(55, 100, 160, 0.22);
  --pass-accent: #8ce95b;
  --pass-plaque: #14151b;
  --pass-plaque-2: #1a1f25;
  --nick-gold: #c48412;
  --nick-cyan: #0e8a9a;
  --nick-crimson: #d12648;
  --nick-violet: #7a4ad4;
  --nick-azure: #1a7ad9;
  --nick-orange: #d96a12;
  --nick-rose: #d6457a;
  --nick-mint: #0f9a72;
  --nick-white: #243044;
  --nick-ice: #2f6ca8;
  --nick-magenta: #c21890;
}
body.theme-light .bottom-nav { box-shadow: 0 4px 20px rgba(0,0,0,0.1); }

/* Замена захардкоженных зелёных акцентов на синие в светлой теме */
body.theme-light .bp-progress-fill { background: linear-gradient(90deg, var(--lime), var(--lime-hi)); }
body.theme-light .bp-progress-glow { box-shadow: 0 0 8px rgba(55, 135, 255, 0.4); }
body.theme-light .bp-track-fill {
  background: linear-gradient(180deg, var(--lime) 0%, var(--lime-hi) 100%);
  box-shadow: 0 0 12px rgba(55, 135, 255, 0.5);
}
body.theme-light .bp-node-claimed .bp-node-dot,
body.theme-light .bp-node-claimable .bp-node-dot {
  background: radial-gradient(circle at 32% 30%, #5a9dff, var(--lime));
}
body.theme-light .bp-node-claimable .bp-node-dot {
  box-shadow: 0 0 12px rgba(55, 135, 255, 0.55), inset 0 0 0 2px rgba(255,255,255,0.45);
}
body.theme-light .bp-node-claimable .bp-node-card { border-color: rgba(55, 135, 255, 0.4); }
body.theme-light .mode-tile:active:not(.mode-tile-soon) { background: rgba(55, 135, 255, 0.08); }
body.theme-light .preset-chip.active { box-shadow: 0 0 0 1px rgba(55, 135, 255, 0.25); }
body.theme-light .t-card.hero-spotlight.mode-default {
  background-image: linear-gradient(160deg, rgba(55, 135, 255, 0.06) 0%, var(--surface) 60%);
}

/* ── Каталог: остров фильтров (слайдеры / сброс) — светлая тема ── */
body.theme-light .catalog-reset-btn,
html[data-theme="light"] .catalog-reset-btn {
  background: #ffffff;
  color: #707f8e;
  border: 1px solid #c8d7ea;
}
body.theme-light .catalog-reset-btn:active,
html[data-theme="light"] .catalog-reset-btn:active {
  background: #eff7ff;
}
body.theme-light .catalog-reset-badge,
html[data-theme="light"] .catalog-reset-badge {
  background: #3787ff;
  color: #ffffff;
}
body.theme-light .catalog-range-label,
html[data-theme="light"] .catalog-range-label {
  color: #000000;
}
body.theme-light .catalog-range-rail,
html[data-theme="light"] .catalog-range-rail {
  background: #d9e6f4;
}
body.theme-light .catalog-range-fill,
html[data-theme="light"] .catalog-range-fill {
  background: #3787ff;
}
body.theme-light .catalog-range-track input[type="range"]::-webkit-slider-thumb,
body.theme-light .catalog-range-track input[type="range"]::-moz-range-thumb,
html[data-theme="light"] .catalog-range-track input[type="range"]::-webkit-slider-thumb,
html[data-theme="light"] .catalog-range-track input[type="range"]::-moz-range-thumb {
  background: #ffffff;
  box-shadow: 0 1px 4px rgba(55, 135, 255, 0.35), 0 0 0 1px rgba(55, 135, 255, 0.2);
}
body.theme-light .catalog-range-inputs label,
html[data-theme="light"] .catalog-range-inputs label {
  color: #707f8e;
}
body.theme-light .catalog-range-inputs input,
html[data-theme="light"] .catalog-range-inputs input {
  background: #eff7ff;
  border-color: #c8d7ea;
  color: #000000;
}

/* ── Каталог: панель фильтров/сортировки — Figma Light ── */
body.theme-light .catalog-sheet-backdrop,
html[data-theme="light"] .catalog-sheet-backdrop {
  background: rgba(20, 40, 70, 0.42);
}
body.theme-light .catalog-sheet-panel,
html[data-theme="light"] .catalog-sheet-panel {
  background: #ffffff;
  border-color: rgba(55, 135, 255, 0.12);
  box-shadow: 0 18px 50px rgba(55, 100, 160, 0.22);
}
body.theme-light .catalog-sheet-close,
html[data-theme="light"] .catalog-sheet-close {
  background: #eff7ff;
  color: #707f8e;
}
body.theme-light .catalog-sheet-close:active,
html[data-theme="light"] .catalog-sheet-close:active {
  background: #d9e6f4;
}
body.theme-light .catalog-filter-acc,
html[data-theme="light"] .catalog-filter-acc {
  color: #000000;
  border-top-color: rgba(112, 127, 142, 0.22);
}
body.theme-light .catalog-filter-acc-left,
html[data-theme="light"] .catalog-filter-acc-left {
  color: #000000;
}
body.theme-light .catalog-filter-acc-left .ico-svg,
html[data-theme="light"] .catalog-filter-acc-left .ico-svg {
  color: #3787ff;
}
body.theme-light .catalog-acc-chevron .ico-svg,
html[data-theme="light"] .catalog-acc-chevron .ico-svg {
  color: #707f8e;
}
body.theme-light .catalog-mode-radio,
html[data-theme="light"] .catalog-mode-radio {
  color: #000000;
}
body.theme-light .catalog-mode-radio:active,
html[data-theme="light"] .catalog-mode-radio:active {
  background: rgba(55, 135, 255, 0.06);
}
body.theme-light .catalog-mode-radio-box,
html[data-theme="light"] .catalog-mode-radio-box {
  border-color: rgba(112, 127, 142, 0.45);
}
body.theme-light .catalog-mode-radio input:checked + .catalog-mode-radio-box,
html[data-theme="light"] .catalog-mode-radio input:checked + .catalog-mode-radio-box {
  background: #3787ff;
  border-color: #3787ff;
  box-shadow: 0 0 0 4px rgba(55, 135, 255, 0.22);
}
body.theme-light .catalog-mode-radio-box::after,
html[data-theme="light"] .catalog-mode-radio-box::after {
  background: #ffffff;
}
body.theme-light .catalog-mode-radio-box.is-pop,
html[data-theme="light"] .catalog-mode-radio-box.is-pop {
  animation-name: catalog-mode-pop-light;
}
@keyframes catalog-mode-pop-light {
  0% {
    transform: scale(0.72);
    box-shadow: 0 0 0 0 rgba(55, 135, 255, 0.5);
  }
  55% {
    transform: scale(1.14);
    box-shadow: 0 0 0 9px rgba(55, 135, 255, 0);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 4px rgba(55, 135, 255, 0.22);
  }
}
body.theme-light .catalog-filter-sub,
html[data-theme="light"] .catalog-filter-sub {
  color: #000000;
}
body.theme-light .catalog-day-range-bar,
html[data-theme="light"] .catalog-day-range-bar {
  background: #eff7ff;
}
body.theme-light .catalog-day-btn,
html[data-theme="light"] .catalog-day-btn {
  color: rgba(112, 127, 142, 0.45);
}
body.theme-light .catalog-day-btn.available,
body.theme-light .catalog-day-btn.in-range,
html[data-theme="light"] .catalog-day-btn.available,
html[data-theme="light"] .catalog-day-btn.in-range {
  color: #000000;
}
body.theme-light .catalog-day-btn.range-start,
body.theme-light .catalog-day-btn.range-end,
body.theme-light .catalog-day-btn.selected,
html[data-theme="light"] .catalog-day-btn.range-start,
html[data-theme="light"] .catalog-day-btn.range-end,
html[data-theme="light"] .catalog-day-btn.selected {
  background: #3787ff;
  color: #ffffff;
  box-shadow: 0 0 10px rgba(55, 135, 255, 0.4);
}
body.theme-light .catalog-time-row label,
html[data-theme="light"] .catalog-time-row label {
  color: #000000;
}
body.theme-light .catalog-time-row input[type="time"],
html[data-theme="light"] .catalog-time-row input[type="time"] {
  background: #eff7ff;
  border-color: #c8d7ea;
  color: #000000;
}
body.theme-light .catalog-apply-btn,
html[data-theme="light"] .catalog-apply-btn {
  background: linear-gradient(180deg, #5a9dff 0%, #3787ff 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 6px 20px rgba(55, 135, 255, 0.35);
}
body.theme-light .catalog-sort-opt,
html[data-theme="light"] .catalog-sort-opt {
  color: #000000;
}
body.theme-light .catalog-sort-opt:active,
html[data-theme="light"] .catalog-sort-opt:active {
  background: rgba(55, 135, 255, 0.06);
}
body.theme-light .catalog-sort-radio,
html[data-theme="light"] .catalog-sort-radio {
  border-color: rgba(112, 127, 142, 0.45);
}
body.theme-light .catalog-sort-radio::after,
html[data-theme="light"] .catalog-sort-radio::after {
  background: #ffffff;
}
body.theme-light .catalog-sort-opt input:checked + .catalog-sort-radio,
html[data-theme="light"] .catalog-sort-opt input:checked + .catalog-sort-radio {
  background: #3787ff;
  border-color: #3787ff;
  box-shadow: 0 0 0 4px rgba(55, 135, 255, 0.22);
}

/* ── Анимации появления списков ── */
@keyframes list-item-in {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.list-item-enter {
  animation: list-item-in 0.32s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* Каталог турниров — каскадное появление карточек */
@keyframes catalog-card-in {
  0% {
    opacity: 0;
    transform: translateY(22px) scale(0.94);
  }
  65% {
    opacity: 1;
    transform: translateY(-3px) scale(1.008);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
.catalog-card-anim-init {
  opacity: 0 !important;
  transform: translateY(22px) scale(0.94);
  animation: none !important;
}
#tournaments .t-card.catalog-card-enter {
  transform-origin: center top;
  animation: catalog-card-in 0.46s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* Анимация появления интерфейса поддержки */
@keyframes support-block-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.support-anim-init {
  opacity: 0 !important;
  transform: translateY(12px);
  animation: none !important;
}
.support-enter {
  animation: support-block-in 0.34s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* ── Убрать миниатюру карты с карточки турнира ── */
.t-map-card-thumb { display: none !important; }

/* Имя карты на карточке — текстовый чип */
.t-map-name-inline {
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--muted);
  background: var(--surface-up);
  border: 1px solid var(--stroke);
  border-radius: 6px;
  padding: 2px 7px;
  margin-top: 5px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

/* Запасной игрок */
.team-sub-label {
  font-size: 0.58rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  padding: 2px 6px;
  border: 1px solid var(--stroke);
  border-radius: 5px;
  margin-left: auto;
}
.team-member-row.is-sub .team-member-avatar {
  opacity: 0.6;
}

/* Поле ввода с авто-заглавными буквами */
.input-uppercase { text-transform: uppercase; }
.input-uppercase::placeholder { text-transform: none; }

/* Профиль игрока в модалке */
.player-modal-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}
.player-modal-avatar {
  width: 56px; height: 56px;
  border-radius: 14px;
  background: linear-gradient(135deg, #152010 0%, #243610 100%);
  border: 1px solid var(--lime-lo);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; font-weight: 900; color: var(--lime);
  flex-shrink: 0;
}
.player-modal-meta { min-width: 0; }
.player-modal-name { font-size: 1rem; font-weight: 800; color: var(--text); margin: 0 0 3px; }
.player-modal-tag { font-size: 0.72rem; font-weight: 600; color: var(--muted); font-family: monospace; }

/* ── ПК: двухколоночный layout страницы турнира ── */
@media (min-width: 700px) {
  .tournament-page-card {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    min-height: 400px;
  }

  /* Левая колонка — карта + базовые метрики */
  .t-detail-hero-split,
  .t-detail-summary {
    flex: 0 0 280px;
    width: 280px;
    border-bottom: none;
    border-right: 1px solid var(--stroke);
  }
  .t-detail-hero-split {
    display: flex;
    flex-direction: column;
    grid-template-columns: none;
    padding: 14px;
    gap: 12px;
    justify-content: flex-start;
    align-items: stretch;
  }
  .t-detail-map-col {
    width: 100%;
  }
  .t-detail-map-frame {
    width: 100%;
  }
  .t-detail-map-img {
    width: 100%;
    height: auto;
    max-height: 220px;
    object-fit: cover;
  }
  .t-detail-side-col {
    width: 100%;
    justify-content: flex-start;
  }
  .t-detail-hero-split .t-detail-title {
    font-size: 1rem;
  }
  .t-detail-hero-split .t-detail-metrics {
    grid-template-columns: 1fr;
  }

  /* Правая колонка — призы, правила, участники, кнопки */
  .tournament-page-body {
    flex: 1;
    min-width: 0;
    padding: 16px 20px 20px;
    overflow-y: auto;
  }
  .tournament-page-body .section-title:first-child {
    margin-top: 0;
  }
}

@media (max-width: 540px) {
  .news-grid-top {
    grid-template-columns: 1fr;
  }
}

/* ── Юридические документы — Figma Documents 2067:605 / 2070:2 ── */
body.legal-tab-active .app-scroll {
  overflow: hidden;
  overscroll-behavior: none;
  display: flex;
  flex-direction: column;
  padding-top: calc(var(--tg-top, 0px) + 18px);
  padding-bottom: calc(var(--tg-bottom, 0px) + 18px);
}
body.legal-tab-active #panel-legal.active {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 0;
  margin: 0;
}
.legal-page {
  --legal-title: #ffffff;
  --legal-text: rgba(255, 255, 255, 0.88);
  --legal-muted: #808080;
  --legal-head: #ffffff;
  --legal-base: #151515;
  position: relative;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  margin: 0;
  padding: 22px 18px 20px;
  overflow: hidden;
  border-radius: 32px;
  background: var(--legal-base);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.28);
  overscroll-behavior: none;
  isolation: isolate;
}
body.theme-light .legal-page,
html[data-theme="light"] .legal-page {
  --legal-title: #000000;
  --legal-text: rgba(0, 0, 0, 0.82);
  --legal-muted: #707f8e;
  --legal-head: #000000;
  --legal-base: #c6d2dc;
  box-shadow: 0 4px 18px rgba(55, 100, 160, 0.16);
}
.legal-page-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  pointer-events: none;
  z-index: 0;
  user-select: none;
  border-radius: inherit;
}
.legal-page-chrome {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 1 1 auto;
  min-height: 0;
}
.legal-top {
  display: grid;
  grid-template-columns: 40px 1fr 40px;
  align-items: center;
  column-gap: 8px;
  min-height: 36px;
  flex: 0 0 auto;
  padding-top: 4px;
}
.legal-top .accounts-back {
  color: var(--legal-title);
}
.legal-page-title {
  margin: 0;
  grid-column: 2;
  text-align: center;
  font-family: "Unbounded", "Tilda Sans", sans-serif;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  line-height: 1.2;
  color: var(--legal-title);
}
.legal-page-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: none;
  padding: 2px 2px 12px;
  border-radius: 18px;
}
.legal-doc {
  font-family: "Tilda Sans", "Rubik", sans-serif;
  font-size: 0.92rem;
  line-height: 1.55;
  font-weight: 500;
  color: var(--legal-text);
}
.legal-doc h4 {
  margin: 20px 0 8px;
  font-family: "Unbounded", "Tilda Sans", sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 1.25;
  color: var(--legal-head);
}
.legal-doc h4:first-of-type { margin-top: 12px; }
.legal-doc p { margin: 0 0 10px; }
.legal-doc .legal-meta {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--legal-muted);
  margin: 0 0 16px;
}

@keyframes legal-page-in {
  0% { opacity: 0; transform: translateY(18px) scale(0.975); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes legal-part-in {
  0% { opacity: 0; transform: translateY(10px); }
  100% { opacity: 1; transform: translateY(0); }
}
.legal-page.legal-enter-init {
  opacity: 0;
}
.legal-page.legal-enter {
  animation: legal-page-in 0.42s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.legal-page .legal-part-enter {
  animation: legal-part-in 0.36s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@media (prefers-reduced-motion: reduce) {
  .legal-page.legal-enter-init { opacity: 1; }
  .legal-page.legal-enter,
  .legal-page .legal-part-enter { animation: none !important; }
}

/* ── Привязать аккаунты — Figma 2094:1114 ── */
.accounts-page {
  --accounts-accent: #8ce95b;
  --accounts-shell: #1a1a1a;
  --accounts-panel: #131313;
  --accounts-border: #404040;
  --accounts-title: #ffffff;
  --accounts-muted: #808080;
  --accounts-dim: #404040;
  --accounts-selected-bg: rgba(140, 233, 91, 0.05);
  --accounts-card: var(--accounts-shell);
  --accounts-input-bg: #1a1a1a;
  --accounts-input-border: #404040;
  --accounts-row-border: #404040;
  --accounts-input-text: #ffffff;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-bottom: 4px;
}
.support-page {
  --accounts-accent: var(--support-accent);
  --accounts-card: var(--support-shell);
  --accounts-input-bg: var(--support-panel);
  --accounts-input-border: var(--support-border);
  --accounts-row-border: var(--support-border);
  --accounts-title: var(--support-title);
  --accounts-muted: var(--support-dim);
  --accounts-input-text: var(--support-title);
}
body.theme-light .accounts-page,
html[data-theme="light"] .accounts-page {
  --accounts-accent: #3787ff;
  --accounts-shell: #ffffff;
  --accounts-panel: #eff7ff;
  --accounts-border: #c8d7ea;
  --accounts-title: #000000;
  --accounts-muted: #707f8e;
  --accounts-dim: #707f8e;
  --accounts-selected-bg: rgba(55, 135, 255, 0.08);
  --accounts-card: #ffffff;
  --accounts-input-bg: #eff7ff;
  --accounts-input-border: #c8d7ea;
  --accounts-row-border: #c8d7ea;
  --accounts-input-text: #000000;
}
.accounts-top {
  display: grid;
  grid-template-columns: 40px 1fr 40px;
  align-items: center;
  column-gap: 8px;
  min-height: 36px;
  margin-bottom: 0;
}
.accounts-top .panel-back {
  margin-bottom: 0;
  background: transparent;
  border-color: transparent;
  color: var(--accounts-title);
}
.accounts-back {
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}
.accounts-back img {
  width: 36px;
  height: 36px;
  display: block;
  object-fit: contain;
  pointer-events: none;
}
.accounts-title {
  margin: 0;
  font-family: "Unbounded", "Tilda Sans", sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--accounts-title);
  line-height: 1.15;
  grid-column: 2;
  text-align: center;
}
.accounts-shell {
  background: var(--accounts-shell);
  border-radius: 36px;
  padding: 14px 14px 12px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
body.theme-light .accounts-shell,
html[data-theme="light"] .accounts-shell {
  box-shadow: 0 4px 14px rgba(55, 100, 160, 0.14);
}
.accounts-section-label,
.accounts-field-label {
  display: block;
  margin: 0;
  font-family: "Unbounded", "Tilda Sans", sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--accounts-title);
  line-height: 1.2;
}
.accounts-platform-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.accounts-platform-row {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 54px;
  padding: 8px 10px;
  margin: 0;
  border: 1px solid transparent;
  border-radius: 18px;
  background: transparent;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  box-shadow: none;
}
.accounts-platform-row.is-active {
  border-color: var(--accounts-accent);
  background: var(--accounts-selected-bg);
}
.accounts-platform-row .settings-ico {
  width: 45px;
  height: 45px;
  border-radius: 999px;
  background: var(--accounts-shell);
  border: 1px solid var(--accounts-border);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  overflow: hidden;
}
body.theme-light .accounts-platform-row .settings-ico,
html[data-theme="light"] .accounts-platform-row .settings-ico {
  background: var(--accounts-panel);
  border-color: var(--accounts-border);
  box-shadow: 0 4px 10px rgba(55, 100, 160, 0.1);
}
.accounts-platform-row .settings-ico img {
  width: 24px;
  height: 24px;
}
.accounts-platform-row .settings-ico img[data-settings-ico="youtube"] {
  width: 26px;
  height: 18px;
}
.accounts-platform-row .settings-ico img[data-settings-ico="tiktok"] {
  width: 22px;
  height: 24px;
}
.accounts-platform-row .settings-ico img[data-settings-ico="twitch"] {
  width: 22px;
  height: 24px;
}
.accounts-platform-name {
  flex: 1 1 auto;
  min-width: 0;
  font-family: "Tilda Sans", "Rubik", sans-serif;
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--accounts-title);
}
.accounts-meta {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex: 0 0 auto;
  max-width: 52%;
  min-width: 0;
}
.accounts-status {
  min-width: 0;
  text-align: right;
  font-family: "Tilda Sans", "Rubik", sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.accounts-status--idle { color: var(--accounts-dim); }
.accounts-status--pending { color: #eda827; }
.accounts-status--ok { color: var(--accounts-title); }
.accounts-chevron {
  flex-shrink: 0;
  width: 10px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.accounts-chevron.is-hidden {
  visibility: hidden;
}
.accounts-chevron img {
  width: 10px;
  height: 18px;
  display: block;
  object-fit: contain;
}
.accounts-info {
  background: var(--accounts-panel);
  border: 1px solid var(--accounts-border);
  border-radius: 18px;
  padding: 16px 18px;
}
.accounts-info p {
  margin: 0;
  font-family: "Tilda Sans", "Rubik", sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.4;
  color: var(--accounts-title);
}
.accounts-input,
.support-textarea {
  width: 100%;
  border-radius: 999px;
  border: 1px solid var(--accounts-input-border);
  background: var(--accounts-input-bg);
  color: var(--accounts-input-text);
  padding: 0 18px;
  font-family: "Tilda Sans", "Rubik", sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0;
  box-sizing: border-box;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}
.accounts-input { height: 54px; }
/* Выше за счёт свободного места до HUD: не шире, шрифт/паддинг-x/радиус как были.
   flex-shrink:0 — иначе колонка сжимает height, и 54→60 визуально пропадает. */
#panel-social-link .accounts-input {
  height: 64px;
  min-height: 64px;
  max-height: 64px;
  flex: 0 0 64px;
  padding: 0 18px;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.15;
  appearance: none;
  -webkit-appearance: none;
}
.support-textarea {
  min-height: 110px;
  border-radius: 18px;
  padding: 14px 18px;
  resize: vertical;
  line-height: 1.4;
  font-weight: 500;
  box-shadow: none;
}
.accounts-input::placeholder,
.support-textarea::placeholder {
  color: var(--accounts-muted);
  font-weight: 500;
}
.accounts-file-pick {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0;
  cursor: pointer;
}
.accounts-file-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 54px;
  padding: 0 26px;
  border-radius: 999px;
  background: var(--accounts-shell);
  border: 1.5px solid var(--accounts-accent);
  color: var(--accounts-accent);
  font-family: "Tilda Sans", "Rubik", sans-serif;
  font-size: 1.05rem;
  font-weight: 800;
  flex-shrink: 0;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}
.accounts-file-btn img,
.accounts-file-btn .support-attach-ico {
  width: 27px;
  height: 24px;
  object-fit: contain;
  color: var(--accounts-accent);
}
.social-file-pick-name {
  font-family: "Tilda Sans", "Rubik", sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--accounts-muted);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.accounts-submit {
  width: 100%;
  height: 54px;
  border: 0;
  border-radius: 999px;
  background: var(--accounts-accent);
  color: #1a1a1a;
  font-family: "Tilda Sans", "Rubik", sans-serif;
  font-size: 1.05rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  margin-top: 2px;
}
#panel-social-link .accounts-submit {
  height: 64px;
  min-height: 64px;
  max-height: 64px;
  flex: 0 0 64px;
  margin-top: 0;
  padding: 0 18px;
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.15;
}
.accounts-submit:active { transform: scale(0.985); }
body.theme-light .accounts-submit,
html[data-theme="light"] .accounts-submit {
  color: #fff;
}

/* ── Поддержка — Figma XoKc 4017:396 / 372 / 343 / 316 (+ dark assets) ──
   Макет 1080: shell 1030×2052 r=100, inset 50, CTA h=150, panel r=50.
   Scale ≈ 0.35 → r-shell 36, r-panel 18, CTA 54, pad 18. */
.support-page {
  --support-accent: #8ce95b;
  --support-shell: #1a1a1a;
  --support-panel: #131313;
  --support-panel-solid: #131313;
  --support-border: #404040;
  --support-title: #ffffff;
  --support-muted: #808080;
  --support-placeholder: #808080;
  --support-dim: #808080;
  --support-status: #eda827;
  --support-status-bg: rgba(237, 168, 39, 0.05);
  --support-btn-text: #1a1a1a;
  --support-mod-bg: rgba(128, 128, 128, 0.05);
  --support-mod-border: #808080;
  --support-user-bg: rgba(140, 233, 91, 0.05);
  --support-back-bg: #1a1a1a;
  --support-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  --support-cta-shadow: 0 4px 12.5px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  gap: 0;
  padding-bottom: 0;
}
body.theme-light .support-page,
html[data-theme="light"] .support-page {
  --support-accent: #3787ff;
  --support-shell: #eff7ff;
  --support-panel: rgba(174, 207, 238, 0.25);
  --support-panel-solid: #eff7ff;
  --support-border: #707f8e;
  --support-title: #000000;
  --support-muted: #454d55;
  --support-placeholder: #454d55;
  --support-dim: #707f8e;
  --support-status: #eda827;
  --support-status-bg: rgba(237, 168, 39, 0.05);
  --support-btn-text: #eff7ff;
  --support-mod-bg: rgba(69, 77, 85, 0.05);
  --support-mod-border: #454d55;
  --support-user-bg: rgba(55, 135, 255, 0.08);
  --support-back-bg: #ffffff;
  --support-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  --support-cta-shadow: 0 4px 12.5px rgba(0, 0, 0, 0.15);
}
.support-shell {
  background: var(--support-shell);
  border-radius: 36px;
  padding: 18px 18px 16px;
  box-shadow: var(--support-shadow);
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 0;
  box-sizing: border-box;
}
#support-list-view.support-shell {
  gap: 12px;
  padding: 18px 18px 14px;
}
#support-new-view.support-shell {
  gap: 12px;
  overflow: hidden;
}
.support-new-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.support-new-actions {
  flex: 0 0 auto;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 2px;
  position: relative;
  z-index: 2;
  background: var(--support-shell);
}
#support-chat-view.support-shell {
  gap: 8px;
  padding-top: 14px;
}
.support-title {
  margin: 0;
  text-align: center;
  font-family: "Unbounded", "Tilda Sans", sans-serif;
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--support-title);
  line-height: 1.15;
  text-shadow: 0 4px 9px rgba(0, 0, 0, 0.08);
  flex-shrink: 0;
}
.support-subhead {
  display: grid;
  grid-template-columns: 36px 1fr;
  align-items: center;
  column-gap: 10px;
  min-height: 36px;
  margin-bottom: 2px;
}
.support-subhead .panel-back {
  margin-bottom: 0;
}
.support-title-inline {
  text-align: right;
  font-size: 1.05rem;
  line-height: 1.15;
}
.support-info {
  background: var(--support-panel);
  border: 1px solid var(--support-border);
  border-radius: 18px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-shrink: 0;
}
.support-info p {
  margin: 0;
  font-family: "Tilda Sans", "Rubik", sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.35;
  color: var(--support-title);
  text-shadow: 0 4px 9px rgba(0, 0, 0, 0.08);
}
.support-new-btn {
  width: 100%;
  height: 54px;
  min-height: 54px;
  max-height: 54px;
  border: 0;
  border-radius: 999px;
  background: var(--support-accent);
  color: var(--support-btn-text);
  font-family: "Tilda Sans", "Rubik", sans-serif;
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--support-cta-shadow);
  margin: 0;
  flex: 0 0 54px;
  padding: 0 16px;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}
.support-new-btn:active { transform: scale(0.985); }
.support-new-btn.btn-loading {
  position: relative;
  pointer-events: none;
  opacity: 0.85;
  color: transparent !important;
}
.support-new-btn.btn-loading::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  border: 2.5px solid rgba(0, 0, 0, 0.18);
  border-top-color: var(--support-btn-text, #0a0a0a);
  border-radius: 50%;
  left: 50%;
  top: 50%;
  margin: -10px 0 0 -10px;
  animation: spin 0.65s linear infinite;
}
.support-new-btn--footer {
  margin-top: 0;
}
#support-new-view.is-submitting {
  pointer-events: none;
}
#support-new-view.is-submitting .support-new-scroll {
  opacity: 0.55;
}
.support-divider {
  height: 0;
  border: 0;
  border-top: 1px solid var(--support-border);
  margin: 4px 0 2px;
  opacity: 1;
  flex-shrink: 0;
}
.support-section-label {
  margin: 0;
  text-align: center;
  font-family: "Unbounded", "Tilda Sans", sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--support-title);
  line-height: 1.2;
  flex-shrink: 0;
  text-shadow: 0 4px 9px rgba(0, 0, 0, 0.08);
}
/* Контур зоны «Мои обращения» (Figma Request Back r=50) — не карточки внутри */
.support-appeals-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 0;
  flex: 1 1 auto;
  min-height: 0;
  border-radius: 28px;
  border: 1px solid var(--support-border);
  background: var(--support-panel);
  overflow: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  box-sizing: border-box;
}
.support-appeals-list:has(.support-appeal-item) {
  gap: 8px;
  padding: 10px;
  overflow-y: auto;
  background: transparent;
  border-color: transparent;
}
.support-empty {
  position: relative;
  flex: 1 1 auto;
  align-self: stretch;
  width: 100%;
  min-height: 180px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 28px 18px;
  /* фон/бордер/скругление — у .support-appeals-list */
  border-radius: 0;
  background: transparent;
  border: 0;
  overflow: hidden;
  box-sizing: border-box;
}
/* Без scale: на других пропорциях экрана увеличенный contain обрезался по краям панели */
.support-empty-ico {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  opacity: 1;
  pointer-events: none;
}
.support-empty-text {
  position: relative;
  z-index: 1;
  margin: 0;
  max-width: 300px;
  font-family: "Tilda Sans", "Rubik", sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.4;
  color: var(--support-muted);
  text-shadow: 0 4px 9px rgba(0, 0, 0, 0.12);
}
.support-appeal-item {
  width: 100%;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  text-align: left;
  border: 1px solid var(--support-border);
  background: var(--support-panel);
  border-radius: var(--r-lg);
  padding: 10px 20px 8px 14px;
  color: inherit;
  cursor: pointer;
  box-shadow: none;
  overflow: visible;
}
.support-appeal-item:active { opacity: 0.92; }
.support-appeal-item .chip-alert-dot {
  top: 8px;
  right: 8px;
  border-color: var(--support-panel-solid);
  background: var(--err);
}
.support-appeal-skel-title,
.support-appeal-skel-time {
  height: 0.9em;
  margin: 0;
  border: 0;
  display: inline-block;
  border-radius: var(--r-xs);
}
.support-appeal-skel-title { width: 8.5em; }
.support-appeal-skel-time { width: 4.8em; flex-shrink: 0; }
.support-appeal-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  min-width: 0;
  margin-bottom: 4px;
}
.support-appeal-title-wrap {
  display: flex;
  flex-wrap: nowrap;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
  flex: 1;
  overflow: hidden;
  font-family: "Tilda Sans", "Rubik", sans-serif;
  font-size: 1.02rem;
  font-weight: 800;
  color: var(--support-title);
  line-height: 1.2;
}
.support-appeal-id {
  flex-shrink: 0;
  color: var(--support-accent);
  font-variant-numeric: tabular-nums;
}
.support-appeal-reason {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.support-appeal-head time {
  font-family: "Tilda Sans", "Rubik", sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--support-dim);
  white-space: nowrap;
  line-height: 1.2;
  flex-shrink: 0;
}
.support-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  max-width: 100%;
  margin-bottom: 12px;
  padding: 6px 14px;
  border-radius: 999px;
  font-family: "Tilda Sans", "Rubik", sans-serif;
  font-size: 0.88rem;
  font-weight: 800;
  line-height: 1.25;
  background: transparent;
}
.support-status-waiting {
  color: #eda827;
  background: rgba(237, 168, 39, 0.05);
  border: 1px solid #eda827;
}
.support-status-answered {
  color: var(--support-accent);
  background: color-mix(in srgb, var(--support-accent) 8%, transparent);
  border: 1px solid var(--support-accent);
}
.support-status-closed {
  color: var(--support-dim);
  border: 1px solid var(--support-border);
  background: transparent;
}
.support-appeal-preview {
  font-family: "Tilda Sans", "Rubik", sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--support-muted);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.support-appeal-open {
  align-self: flex-end;
  margin-top: 4px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: "Tilda Sans", "Rubik", sans-serif;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--support-dim);
}
.support-appeal-open::after {
  content: "";
  width: 9px;
  height: 16px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 25 50'%3E%3Cpath fill='%23000' d='M5 5l15 20L5 45'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 25 50'%3E%3Cpath fill='%23000' d='M5 5l15 20L5 45'/%3E%3C/svg%3E") center / contain no-repeat;
  opacity: 0.95;
}
/* Круг и тень уже в SVG — без второго фона у кнопки */
.support-back {
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  margin-bottom: 0;
  overflow: visible;
}
.support-back:active {
  background: transparent;
}
.support-back img {
  width: 36px;
  height: 36px;
  display: block;
  object-fit: contain;
  pointer-events: none;
}
.support-chat-subhead {
  flex-shrink: 0;
  margin-bottom: 0;
}
.support-chat-head {
  margin: 0;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}
.support-chat-title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: flex-end;
  gap: 6px;
  margin: 0;
  text-align: right;
  font-family: "Tilda Sans", "Rubik", sans-serif;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--support-title);
  line-height: 1.15;
}
.support-chat-title .support-appeal-id {
  color: var(--support-accent);
}
.support-chat {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  margin-bottom: 0;
  padding: 0;
  background: var(--support-panel);
  border: 1px solid var(--support-border);
  border-radius: 18px;
}
/* Чуть крупнее панели: path вылезал за viewBox, уменьшать — наоборот хуже */
.support-chat-bg {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 100%;
  height: 100%;
  transform: translate(-50%, -50%) scale(1.1);
  object-fit: contain;
  object-position: center;
  pointer-events: none;
  z-index: 0;
  opacity: 1;
}
.support-chat-msgs {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.chat-bubble {
  max-width: 76%;
  padding: 12px 14px 10px;
  border-radius: 18px;
  font-family: "Tilda Sans", "Rubik", sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.35;
  margin: 0;
  color: var(--support-title);
  box-shadow: none;
}
.chat-bubble.mod {
  align-self: flex-start;
  background: var(--support-mod-bg);
  border: 1px solid var(--support-mod-border);
}
.chat-bubble.user {
  align-self: flex-end;
  margin-left: auto;
  background: var(--support-user-bg);
  border: 1px solid var(--support-accent);
}
.chat-bubble .chat-text { color: inherit; }
.chat-bubble time {
  display: block;
  margin-top: 8px;
  font-size: 0.7rem;
  font-weight: 500;
  line-height: 1.2;
}
.chat-bubble.mod time { color: var(--support-mod-border); }
.chat-bubble.user time { color: var(--support-accent); }
.support-footer {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 2px;
}
.support-compose {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.support-compose-row {
  display: flex;
  gap: 12px;
  align-items: stretch;
}
.support-attach-btn {
  flex: 0 0 auto;
  width: 54px;
  height: 54px;
  min-width: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1.5px solid var(--support-accent);
  background: var(--support-shell);
  cursor: pointer;
  color: var(--support-accent);
  box-shadow: var(--support-cta-shadow);
}
.support-attach-btn img {
  width: 27px;
  height: 24px;
  object-fit: contain;
  display: block;
}
.support-attach-btn:active {
  transform: scale(0.97);
}
.support-field {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-shrink: 0;
}
.support-field-label {
  display: block;
  margin: 0;
  font-family: "Unbounded", "Tilda Sans", sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--support-title);
  line-height: 1.2;
}
.support-input {
  width: 100%;
  height: 54px;
  border-radius: 18px;
  border: 1px solid var(--support-border);
  background: var(--support-panel);
  color: var(--support-title);
  padding: 0 18px;
  font-family: "Tilda Sans", "Rubik", sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0;
  box-sizing: border-box;
  box-shadow: none;
}
.support-input--pill {
  border-radius: 999px;
}
.support-input--compose {
  flex: 1 1 auto;
  min-width: 0;
  height: 54px;
  min-height: 54px;
  border-radius: 999px;
  padding: 14px 18px;
  resize: none;
  font-weight: 700;
  line-height: 1.3;
  background: var(--support-panel);
  border: 1px solid var(--support-border);
}
.support-input::placeholder,
.support-textarea::placeholder {
  color: var(--support-placeholder);
  font-weight: 500;
}
.support-page .support-textarea {
  width: 100%;
  min-height: 160px;
  border-radius: 18px;
  border: 1px solid var(--support-border);
  background: var(--support-panel);
  color: var(--support-title);
  padding: 16px 18px;
  font-family: "Tilda Sans", "Rubik", sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.4;
  resize: vertical;
  margin: 0;
  box-sizing: border-box;
  box-shadow: none;
}
.support-media-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: fit-content;
  height: 54px;
  padding: 0 26px;
  border-radius: 999px;
  border: 1.5px solid var(--support-accent);
  background: var(--support-shell);
  color: var(--support-accent);
  font-family: "Tilda Sans", "Rubik", sans-serif;
  font-size: 1.05rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: var(--support-cta-shadow);
  flex-shrink: 0;
}
.support-media-btn img {
  width: 27px;
  height: 24px;
  object-fit: contain;
}
.support-media-box,
.support-attach-preview {
  position: relative;
  flex-shrink: 0;
  padding: 12px;
  border-radius: 18px;
  border: 1px solid var(--support-border);
  background: var(--support-panel);
  overflow: hidden;
}
.support-media-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-height: 200px;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  min-height: 0;
}
.support-media-thumb {
  position: relative;
  flex: 0 0 calc(33.333% - 6px);
  width: calc(33.333% - 6px);
  height: 96px;
  max-width: 110px;
  max-height: 96px;
  min-width: 0;
  min-height: 0;
  border-radius: 14px;
  overflow: hidden;
  background: var(--support-dim);
}
.support-media-thumb .chat-media,
.support-media-thumb img.chat-media,
.support-media-thumb video.chat-media {
  position: absolute;
  inset: 0;
  display: block;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  margin: 0 !important;
  object-fit: cover !important;
  object-position: center;
  border-radius: 0;
  background: transparent;
}
.support-media-thumb .support-attach-clear {
  position: absolute;
  top: 4px;
  right: 4px;
  z-index: 1;
  width: 28px;
  height: 28px;
}
.support-media-box:not(.support-media-grid) .chat-media,
.support-media-box:not(.support-media-grid) img.chat-media,
.support-media-box:not(.support-media-grid) video.chat-media,
.support-attach-preview:not(.support-media-grid) .chat-media,
.support-attach-preview:not(.support-media-grid) img,
.support-attach-preview:not(.support-media-grid) video {
  display: block;
  max-height: 160px;
  max-width: 42%;
  width: auto;
  height: auto;
  margin: 0 auto;
  object-fit: contain;
  border-radius: 14px;
  background: var(--support-dim);
}
.support-closed-hint {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.4;
  color: var(--support-muted);
}

/* ── Донат / магазин ── */
.donate-page {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding-bottom: 8px;
}
.donate-page--wait {
  min-height: calc(var(--app-vh, 100dvh) - var(--nav-dock-h) - var(--tg-top, 0px) - 36px);
}
.donate-page-title {
  margin: 4px 0 0;
  font-family: Unbounded, "Tilda Sans", Rubik, sans-serif;
  font-size: 1.12rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text);
  line-height: 1.2;
}
.wata-wait-card {
  width: min(100%, 340px);
  margin: auto;
  text-align: center;
  padding: 22px 18px;
}
.wata-wait-card p {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.4;
}
.donate-games-section {
  min-height: calc(var(--app-vh, 100vh) * 0.32);
  display: flex;
  flex-direction: column;
}
.donate-games-section > .section-title {
  margin-bottom: 12px;
}
.donate-games-grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  min-height: 0;
  height: clamp(210px, calc((100vw - 52px) * 0.375), calc(var(--app-vh, 100vh) * 0.34));
}
.donate-game-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 14px 10px 16px;
  border: 1px solid var(--stroke);
  border-radius: calc(var(--r) + 2px);
  overflow: hidden;
  cursor: pointer;
  font-family: inherit;
  text-align: center;
  color: #fff;
  background: #141418;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}
.donate-game-tile:active:not(.soon) {
  transform: scale(0.97);
}
.donate-game-tile--standoff {
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(196, 32, 32, 0.42) 0%, transparent 58%),
    linear-gradient(165deg, #1a1012 0%, #0d0d10 55%, #08080a 100%);
  border-color: rgba(196, 48, 48, 0.35);
  box-shadow: inset 0 0 0 1px rgba(255, 80, 80, 0.08);
}
.donate-game-tile--brawl {
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(255, 196, 32, 0.28) 0%, transparent 58%),
    linear-gradient(165deg, #1a1608 0%, #12100a 55%, #0a0a0c 100%);
  border-color: rgba(255, 196, 32, 0.22);
}
.donate-game-tile-glow {
  position: absolute;
  inset: auto 10% 18% 10%;
  height: 42%;
  border-radius: 50%;
  filter: blur(28px);
  opacity: 0.55;
  pointer-events: none;
}
.donate-game-tile--standoff .donate-game-tile-glow { background: rgba(220, 48, 48, 0.55); }
.donate-game-tile--brawl .donate-game-tile-glow { background: rgba(255, 196, 32, 0.45); }
.donate-game-tile-logo {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 0;
  padding: 8px 6px 0;
}
.donate-game-tile-logo img {
  width: 92%;
  max-width: 168px;
  max-height: 72%;
  object-fit: contain;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.45));
}
.donate-game-tile-fallback .ico-svg {
  width: 42px;
  height: 42px;
  color: var(--lime);
}
.donate-game-tile-name {
  position: relative;
  z-index: 1;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.2;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.55);
}
.donate-game-tile-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  padding: 4px 7px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.52rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.72);
}
.donate-game-tile.soon {
  cursor: default;
}
.donate-deals-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.donate-deals-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
.donate-deals-head .section-title { margin: 0; }
.donate-deals-hint {
  font-size: 0.72rem;
  color: var(--muted);
  white-space: nowrap;
}
.donate-deals-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.donate-deal-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  border-radius: var(--r);
  border: 1px solid var(--stroke);
  background: var(--surface-up);
  min-height: 132px;
}
.donate-deal-card--placeholder {
  opacity: 0.92;
}
.donate-deal-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 1;
  padding: 3px 7px;
  border-radius: 8px;
  background: linear-gradient(135deg, #ff5a5a, #c42020);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  box-shadow: 0 4px 12px rgba(196, 32, 32, 0.35);
}
.donate-deal-thumb {
  margin-top: 18px;
  height: 52px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
  border: 1px dashed rgba(255, 255, 255, 0.08);
}
.donate-deal-title {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 800;
}
.donate-deal-sub {
  margin: 0;
  font-size: 0.66rem;
  color: var(--muted);
  line-height: 1.35;
}
.donate-enter {
  opacity: 1;
  transform: none;
  animation: donateEnter 0.34s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes donateEnter {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Профиль / настройки — каскад блоков при открытии вкладки */
.panel-anim-init {
  opacity: 0 !important;
  transform: translateY(14px);
  pointer-events: none;
}
.panel-enter {
  animation: panel-block-in 0.38s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes panel-block-in {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@media (prefers-reduced-motion: reduce) {
  .panel-anim-init {
    opacity: 1 !important;
    transform: none;
    pointer-events: auto;
  }
  .panel-enter {
    animation: none !important;
  }
}
.donate-game-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  margin: 8px 0 16px;
  padding: 22px 16px 18px;
  border-radius: calc(var(--r) + 2px);
  border: 1px solid var(--stroke);
}
.donate-game-hero--standoff {
  background:
    radial-gradient(90% 70% at 50% 0%, rgba(196, 32, 32, 0.35) 0%, transparent 62%),
    linear-gradient(180deg, #161014 0%, #0d0d10 100%);
  border-color: rgba(196, 48, 48, 0.3);
}
.donate-game-hero-logo {
  width: min(92%, 300px);
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.45));
}
.donate-game-hero-title {
  margin: 4px 0 0;
  font-size: 1.15rem;
  font-weight: 900;
  letter-spacing: 0.02em;
}
.donate-game-hero-sub {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
}
#panel-donate-standoff .panel-back {
  margin-bottom: 4px;
}
#panel-donate-standoff.is-flow-step .donate-game-hero {
  display: none;
}

@keyframes standoffGoldFadeUp {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes standoffGoldShimmer {
  0% { opacity: 0.35; }
  50% { opacity: 0.7; }
  100% { opacity: 0.35; }
}
.standoff-gold-enter {
  animation: standoffGoldFadeUp 0.42s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.standoff-gold-root--enter .standoff-gold-pack {
  animation: standoffGoldFadeUp 0.42s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.standoff-gold-root {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.standoff-gold-skeleton {
  min-height: 120px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  justify-content: center;
}
.standoff-gold-skeleton-line {
  height: 14px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  animation: standoffGoldShimmer 1.2s ease-in-out infinite;
}
.standoff-gold-skeleton-line.short {
  width: 55%;
}
.standoff-gold-card {
  background: var(--card);
  border-radius: 16px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.standoff-gold-custom {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.standoff-gold-custom label {
  font-size: 0.82rem;
  color: var(--muted);
}
.standoff-gold-input-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.standoff-gold-input-row input {
  flex: 1;
  min-width: 0;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.25);
  color: var(--text);
  padding: 12px 14px;
  font-size: 1rem;
}
.standoff-gold-price {
  font-size: 0.9rem;
  color: var(--muted);
}
.standoff-gold-price b {
  color: var(--text);
  transition: opacity 0.28s ease;
}
#standoff-gold-price.is-loading,
#standoff-gold-price.is-updating {
  opacity: 0.45;
  animation: standoffGoldShimmer 1s ease-in-out infinite;
}
.standoff-gold-packs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.standoff-gold-pack {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(160deg, rgba(220, 48, 48, 0.12), rgba(0, 0, 0, 0.2));
  cursor: pointer;
  text-align: center;
}
.standoff-gold-pack:active {
  transform: scale(0.98);
}
.standoff-gold-pack.is-selected {
  border-color: rgba(220, 48, 48, 0.65);
  box-shadow: 0 0 0 1px rgba(220, 48, 48, 0.35);
}
.standoff-gold-pack img {
  width: 72px;
  height: 56px;
  object-fit: contain;
}
.standoff-gold-pack-g {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
}
.standoff-gold-pack-rub {
  font-size: 0.78rem;
  color: rgba(255, 196, 120, 0.85);
  font-weight: 600;
}
.standoff-gold-steps {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.standoff-gold-step-title {
  margin: 0 0 4px;
  font-size: 1rem;
}
.standoff-gold-instruction {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.45;
}
.standoff-gold-highlight {
  color: #ffb347;
  font-weight: 600;
}
.standoff-gold-example {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.standoff-gold-upload {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.standoff-gold-file {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.standoff-gold-file-label {
  font-size: 0.82rem;
  color: var(--muted);
}
.social-platform-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}
.social-platform-pill {
  border: 1px solid var(--stroke);
  background: var(--surface-up);
  color: var(--muted);
  border-radius: 999px;
  padding: 8px 14px;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
}
.social-platform-pill.active {
  background: var(--lime);
  color: var(--lime-ink);
  border-color: transparent;
}
.social-file-pick {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
  cursor: pointer;
  flex-wrap: wrap;
}
.social-file-pick-name {
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 600;
  word-break: break-all;
}

.standoff-file-pick {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  cursor: pointer;
}
.standoff-file-pick input[type="file"] {
  display: none;
}
.standoff-file-pick-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(220, 48, 48, 0.45);
  background: rgba(220, 48, 48, 0.14);
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 600;
  transition: background 0.2s ease, transform 0.15s ease;
}
.standoff-file-pick:active .standoff-file-pick-btn {
  transform: scale(0.98);
  background: rgba(220, 48, 48, 0.22);
}
.standoff-file-pick-name {
  font-size: 0.8rem;
  color: var(--muted);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.standoff-file-pick-name.has-file {
  color: #8eee98;
}
.standoff-gold-success {
  text-align: center;
  padding: 8px 0 4px;
}
.standoff-gold-success h3 {
  margin: 0 0 8px;
}
.standoff-gold-success p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

@media (max-width: 380px) {
  .donate-deals-grid {
    grid-template-columns: 1fr;
  }
  .donate-deal-card {
    min-height: 108px;
  }
}

.balance-split {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  line-height: 1.1;
}
.balance-prize-line {
  font-size: 0.62rem;
  color: var(--muted);
  font-weight: 600;
}
.balance-help {
  font-size: 0.82rem;
  line-height: 1.45;
}
.balance-explain-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}
.balance-explain-card {
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
}
.balance-explain-card--prize {
  background: rgba(211, 239, 130, 0.06);
  border-color: rgba(211, 239, 130, 0.18);
}
.balance-explain-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}
.balance-explain-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text);
}
.balance-explain-amount {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--accent);
  white-space: nowrap;
}
.balance-explain-text {
  margin: 0;
  font-size: 0.76rem;
  line-height: 1.45;
  color: var(--muted);
}
.pay-modal .modal-body {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.pay-order-box {
  padding: 12px 14px;
  margin-bottom: 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
}
.pay-order-desc {
  margin: 0 0 6px;
  font-size: 0.82rem;
  line-height: 1.4;
  color: var(--muted);
}
.pay-order-total {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.35;
}
.pay-section-title {
  margin: 0 0 8px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--muted);
}
.pay-source-cards {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}
.pay-source-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.pay-source-card.is-active {
  border-color: rgba(211, 239, 130, 0.45);
  background: rgba(211, 239, 130, 0.08);
}
.pay-source-card input[type="radio"] {
  flex-shrink: 0;
  margin: 3px 0 0;
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}
.pay-source-card-body {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.pay-source-card-title {
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
}
.pay-source-card-meta {
  font-size: 0.74rem;
  line-height: 1.4;
  color: var(--muted);
}
.pay-split-fields {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 8px;
}
.pay-split-hint {
  margin: 0;
  font-size: 0.76rem;
  line-height: 1.45;
  color: var(--muted);
}
.pay-split-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.pay-split-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
}
.pay-source-modes {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 12px 0;
}
.pay-source-opt {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
}
.pay-split-fields.hidden {
  display: none;
}
.wallet-convert-block {
  margin: 8px 0 12px;
  padding-top: 4px;
  border-top: 1px solid var(--border);
}
.profile-balance-split {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.15;
}
.wallet-history-split {
  margin-bottom: 12px;
}
.wallet-history-head {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 14px;
}
.wallet-scope-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  padding: 4px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
}
.wallet-scope-tab {
  appearance: none;
  border: 0;
  border-radius: 10px;
  padding: 9px 6px;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.wallet-scope-tab.is-active {
  color: var(--text);
  background: rgba(211, 239, 130, 0.14);
  box-shadow: inset 0 0 0 1px rgba(211, 239, 130, 0.22);
}
.wallet-scope-amount-wrap {
  text-align: center;
}
.wallet-scope-amount {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.wallet-scope-amount small {
  font-size: 1rem;
  font-weight: 600;
  opacity: 0.72;
}
.wallet-scope-split {
  margin: 8px 0 0;
  font-size: 0.76rem;
  color: var(--muted);
}
.wallet-scope-help {
  margin: 0;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--muted);
  background: var(--surface-up);
  border: 1px solid var(--border);
}
.wallet-history-split .balance-help {
  margin-top: 8px;
}

/* ── Главная: «Мои турниры» (Figma carousel) ── */
.home-mine-card .feed-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 12px;
}
.home-mine-card .feed-head .home-section-title { margin: 0; }
.home-mine-count {
  font-family: "Tilda Sans", sans-serif;
  font-size: 0.79rem;
  font-weight: 700;
  color: var(--h-muted);
}
.mine-feed-carousel { gap: 0; }
.mine-carousel-track {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  margin: 0 -2px;
  padding: 0 2px 2px;
  align-items: flex-start;
}
.mine-carousel-track::-webkit-scrollbar { display: none; }
.mine-carousel-track > .mine-slide {
  flex: 0 0 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  min-width: 0;
  align-self: flex-start;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.mine-slide.mode-showdown { --card-accent: #97c331; }
.mine-slide.mode-brawlball,
.mine-slide.mode-3v3 { --card-accent: #4b9599; }
.mine-slide.mode-gemgrab { --card-accent: #703cd9; }
.mine-slide.mode-knockout { --card-accent: #ef7f2a; }
.mine-slide.mode-bounty { --card-accent: #e5bd39; }
.mine-slide.mode-duels { --card-accent: #b71c1c; }
.mine-slide .t-card { margin-bottom: 0; width: 100%; }
/* Figma 2067:600 — пилюля статуса над карточкой */
.mine-msg {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 38px;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--card-accent, #97c331);
  color: #fff;
  font-family: "Tilda Sans", sans-serif;
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.15;
  text-align: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  box-sizing: border-box;
}
.mine-dots { margin-top: 12px; }
.mine-dots .news-dot { background: color-mix(in srgb, var(--lime) 35%, transparent); }
.mine-dots .news-dot.is-active { background: var(--lime); }
body.theme-light .mine-dots .news-dot { background: #b7d0f0; }
body.theme-light .mine-dots .news-dot.is-active { background: #2f80ed; }
.home-mine-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  padding: 18px 8px 8px;
}
.home-mine-empty-ico {
  width: 40px;
  height: 40px;
  background-color: var(--h-muted);
  -webkit-mask: url(/miniapp/assets/main/icon-reg.svg?v=2) center / contain no-repeat;
  mask: url(/miniapp/assets/main/icon-reg.svg?v=2) center / contain no-repeat;
}
body.theme-light .home-mine-empty-ico { background-color: #1c2733; }
.home-mine-empty-title {
  margin: 0;
  font-family: "Tilda Sans", sans-serif;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--h-title);
}
.home-mine-empty-text {
  margin: 0;
  max-width: 300px;
  font-size: 0.79rem;
  font-weight: 700;
  line-height: 1.4;
  color: var(--h-muted);
}
.t-card-asset-ico {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  object-fit: contain;
  display: block;
}

/* ── Новостная карточка на главной (Figma) ── */
.news-card-head .home-section-title { max-width: 68%; line-height: 1.3; margin: 0; }
.news-headline {
  display: flex;
  flex-direction: column;
  gap: 1px;
  line-height: 1.1;
}
.news-headline-line,
.news-headline-accent {
  white-space: nowrap;
}
.news-headline-accent { color: var(--h-news-accent); }
#panel-home .news-card-head .news-headline {
  max-width: 72%;
  font-size: 0.92rem;
  line-height: 1.12;
  color: var(--h-title);
}
#panel-home .news-card-head .news-headline .news-headline-accent { color: var(--h-news-accent); }
.news-vml-mark {
  display: none;
  width: 19px;
  height: 9px;
  margin-right: 6px;
  vertical-align: 0;
  background-color: currentColor;
  -webkit-mask: url(/miniapp/assets/main/vml-mark.svg?v=5) center / contain no-repeat;
  mask: url(/miniapp/assets/main/vml-mark.svg?v=5) center / contain no-repeat;
}
#panel-home .news-vml-mark { display: inline-block; }
.news-chevron {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-left: 6px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(1px) rotate(-135deg);
}
/* Figma: «Обновлено» / «20 июля, 00:00» — две строки справа напротив середины заголовка */
#panel-home .news-week-badge {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: auto;
  max-width: 42%;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0;
  box-sizing: border-box;
  padding-left: 8px;
  color: var(--h-muted);
  font-size: 0.79rem;
  font-weight: 700;
  text-align: right;
  line-height: 1.15;
  white-space: nowrap;
}
#panel-home .news-card-head {
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom-color: #707f8e;
}
body.theme-light #panel-home .news-card-head {
  border-bottom-color: #707f8e;
}
body:not(.theme-light) #panel-home .news-card-head {
  border-bottom-color: #404040;
}
/* News card — обводка оверлеем: медиа вплотную к скруглению, без зазора по углам */
#panel-home .news-feed-carousel .news-item.featured,
#panel-home .news-item.featured {
  position: relative;
  border: none;
  border-radius: 18px;
  background: var(--h-inner);
  box-shadow: none;
  overflow: hidden;
  box-sizing: border-box;
}
#panel-home .news-item.featured::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  border: 3.6px solid var(--h-news-accent);
  border-radius: 18px;
  pointer-events: none;
}
#panel-home .news-item.featured .news-media {
  aspect-ratio: 930 / 420;
  max-height: none;
  border-radius: 0;
  margin-bottom: 0;
}
#panel-home .news-item.featured .news-media-shade {
  bottom: -2px;
  background: linear-gradient(180deg, transparent 18%, color-mix(in srgb, var(--h-inner) 35%, transparent) 58%, var(--h-inner) 100%);
}
body.theme-light #panel-home .news-item.featured .news-media-shade,
html[data-theme="light"] #panel-home .news-item.featured .news-media-shade {
  background: linear-gradient(180deg, transparent 18%, color-mix(in srgb, var(--h-inner) 55%, transparent) 62%, var(--h-inner) 100%);
}
#panel-home .news-feed-carousel .news-item.featured .news-body,
#panel-home .news-item.featured .news-body {
  padding: 6px 10px 11px !important;
  margin: -2px 0 0 !important;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  position: relative;
  z-index: 1;
  background: var(--h-inner);
}
#panel-home .news-feed-carousel .news-item.featured .news-excerpt,
#panel-home .news-item.featured .news-excerpt {
  margin: 0 0 2px !important;
}
#panel-home .news-feed-carousel .news-item.featured .news-meta,
#panel-home .news-item.featured .news-meta {
  margin: auto 0 0 !important;
  padding: 0 !important;
  min-height: 0 !important;
  line-height: 1 !important;
  gap: 0 8px;
  align-items: center;
}
#panel-home .news-item.featured .news-date,
#panel-home .news-item.featured .news-link,
#panel-home .news-item.featured .news-vml-mark,
#panel-home .news-item.featured .news-chevron {
  line-height: 1 !important;
  padding: 0 !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}
#panel-home .news-item.featured .news-vml-mark {
  margin-right: 6px !important;
}
#panel-home .news-item.featured .news-chevron {
  margin-left: 6px !important;
}
#panel-home .news-source {
  display: none !important;
}
/* Title + body both 35px in Figma */
#panel-home .news-title {
  font-family: "Unbounded", "Tilda Sans", sans-serif;
  font-size: 0.79rem;
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 6px;
  color: var(--h-news-accent);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: calc(2 * 1.15em);
}
#panel-home .news-excerpt {
  font-family: "Tilda Sans", sans-serif;
  color: var(--h-news-body);
  font-weight: 700;
  font-size: 0.79rem;
  line-height: 1.15;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: calc(2 * 1.15em);
}
#panel-home .news-meta { font-size: 0.79rem; }
#panel-home .news-meta { justify-content: space-between; width: 100%; align-items: center; }
#panel-home .news-date { color: var(--h-muted); font-weight: 700; display: inline-flex; align-items: center; }
#panel-home .news-link { display: inline-flex; align-items: center; }
#panel-home .news-source { display: none; }
#panel-home .news-link {
  margin-left: auto;
  color: var(--h-muted);
  font-weight: 700;
}
#panel-home .news-tag {
  background: var(--h-news-accent);
  color: #0a0a0a;
}


/* ── Страница турнира · Figma Tournament (1080→~0.36) dark/light ── */
.td-page {
  /* chrome ближе к shell — визуально «у кнопки турнира», не под шапкой TG */
  gap: 4px;
  --td-shell: #1a1a1a;
  --td-panel: #131313;
  /* Figma Rules/Table Back: #131313 / #404040 */
  --td-acc: #131313;
  --td-border: #404040;
  --td-bracket-match-bg: rgba(255, 255, 255, 0.04);
  --td-bracket-slot-bg: rgba(0, 0, 0, 0.15);
  --td-accent: #8ce95b;
  --td-accent-ink: #1a1a1a;
  --td-text: #ffffff;
  --td-muted: #808080;
  --td-info-bg: #131313;
  --td-info-mid: rgba(140, 233, 91, 0.05);
  --td-prize1-bg: rgba(248, 233, 30, 0.12);
  --td-prize1: #f8e91e;
  --td-prize1-border: rgba(248, 233, 30, 0.55);
  --td-prize2-bg: rgba(176, 181, 200, 0.05);
  --td-prize2: #b0b5c8;
  --td-prize2-border: rgba(176, 181, 200, 0.45);
  --td-prize3-bg: rgba(214, 111, 32, 0.14);
  --td-prize3: #d66f20;
  --td-prize3-border: rgba(214, 111, 32, 0.55);
  --td-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  padding-bottom: 8px;
}
body.theme-light .td-page,
html[data-theme="light"] .td-page {
  --td-shell: #eff7ff;
  --td-panel: #dfedfb;
  /* Figma Rules/Table Back: #dfedfb / #707f8e */
  --td-acc: #dfedfb;
  --td-border: #707f8e;
  --td-bracket-match-bg: #eff7ff;
  --td-bracket-slot-bg: #ffffff;
  --td-accent: #3787ff;
  --td-accent-ink: #eff7ff;
  --td-text: #000000;
  --td-muted: #707f8e;
  --td-info-bg: rgba(174, 207, 238, 0.25);
  --td-info-mid: rgba(55, 135, 255, 0.25);
  --td-prize1-bg: #fff4b8;
  --td-prize1: #dbac0e;
  --td-prize1-border: rgba(219, 172, 14, 0.55);
  --td-prize2-bg: rgba(176, 181, 200, 0.25);
  --td-prize2: #6e75af;
  --td-prize2-border: rgba(110, 117, 175, 0.45);
  --td-prize3-bg: #f5d5bd;
  --td-prize3: #c95314;
  --td-prize3-border: rgba(201, 83, 20, 0.5);
  --td-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.td-chrome {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  column-gap: 12px;
  height: var(--td-row-h, 36px);
  min-height: var(--td-row-h, 36px);
  padding: 0;
  box-sizing: border-box;
}
.td-chrome-actions {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  height: 100%;
  margin-left: -2px;
  gap: 10px;
  grid-column: 1;
}
.td-chrome .td-status-pill {
  grid-column: 2;
  justify-self: start;
  margin-left: 2px;
}
.td-chrome-wallet {
  grid-column: 3;
  justify-self: end;
  display: flex;
  align-items: center;
  min-height: var(--td-row-h, 36px);
}
/* Hit-area = высота «Набор»; SVG 150×150 с кругом y=15 → оптический сдвиг вниз */
.td-circle-btn {
  width: var(--td-row-h, 36px);
  height: var(--td-row-h, 36px);
  padding: 0;
  border: 0;
  background: transparent;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: visible;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  flex-shrink: 0;
}
/* Тень — CSS-фильтром: SVG-фильтр внутри <img> WebKit растрирует в 1x и на retina он «шакалит» */
.td-circle-btn img {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 54px;
  height: 54px;
  display: block;
  object-fit: contain;
  pointer-events: none;
  transform: translate(-50%, calc(-50% + 4px));
  filter: drop-shadow(0 3.6px 9px rgba(0, 0, 0, 0.15));
}
.td-status-pill {
  min-width: 88px;
  height: var(--td-row-h, 36px);
  padding: 0 18px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: "Tilda Sans", "Rubik", sans-serif;
  font-size: 1.125rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  border: 0 !important;
  box-shadow: var(--td-shadow);
  flex-shrink: 0;
  box-sizing: border-box;
}
.td-status-pill.status.filling,
.td-status-pill.status.live {
  background: var(--td-accent) !important;
  color: var(--td-accent-ink) !important;
}
.td-status-pill.status.full,
.td-status-pill.status.scheduled,
.td-status-pill.status.completed,
.td-status-pill.status.verifying {
  background: var(--td-panel) !important;
  color: var(--td-text) !important;
  border: 1px solid var(--td-border) !important;
}

.td-shell {
  background: var(--td-shell);
  border-radius: 36px;
  box-shadow: var(--td-shadow);
  padding: 18px 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.td-hero {
  display: grid;
  grid-template-columns: minmax(108px, 34%) 1fr;
  gap: 18px;
  align-items: stretch;
}
.td-map {
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--td-shadow);
  background: var(--td-panel);
  aspect-ratio: 329 / 500;
  min-height: 160px;
}
.td-map--empty {
  background:
    linear-gradient(145deg, rgba(140, 233, 91, 0.12), transparent 55%),
    var(--td-panel);
}
body.theme-light .td-map--empty,
html[data-theme="light"] .td-map--empty {
  background:
    linear-gradient(145deg, rgba(55, 135, 255, 0.14), transparent 55%),
    var(--td-panel);
}
.td-map-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.td-side {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 10px;
}
.td-mode {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 4px;
}
.td-mode-ico {
  width: 27px;
  height: 26px;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.25));
  flex-shrink: 0;
}
.td-mode-title {
  margin: 0;
  font-family: "Unbounded", "Tilda Sans", sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--td-text);
  line-height: 1.1;
  text-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  max-width: 100%;
}
.td-info {
  flex: 1 1 auto;
  min-height: 120px;
  border-radius: 18px;
  border: 1px solid var(--td-border);
  background: var(--td-info-bg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-shadow: var(--td-shadow);
}
.td-info-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex: 1 1 auto;
  min-height: 40px;
  padding: 6px 10px;
  font-family: "Tilda Sans", "Rubik", sans-serif;
  font-weight: 800;
  font-size: 0.95rem;
}
.td-info-row--accent {
  background: var(--td-info-mid);
}
.td-info-val {
  color: var(--td-accent);
  font-variant-numeric: tabular-nums;
}
.td-info-lbl {
  color: var(--td-text);
  text-align: right;
  line-height: 1.05;
}

.td-meta {
  display: grid;
  grid-template-columns: minmax(108px, 34%) 1fr;
  gap: 18px;
  align-items: center;
}
.td-meta-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  padding: 4px;
}
.td-meta-ico {
  /* pin/clock.svg 100×100 с паддингом тени — 18px оставляли глиф крошечным */
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  object-fit: contain;
  margin: -4px;
  filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.15));
}
.td-meta-text {
  font-family: "Tilda Sans", "Rubik", sans-serif;
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--td-text);
  line-height: 1.05;
  text-align: left;
  text-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
}

.td-line {
  height: 1px;
  width: 100%;
  background: var(--td-border);
  opacity: 0.9;
  margin: 2px 0;
}

.td-section-title {
  margin: 0 0 10px;
  font-family: "Unbounded", "Tilda Sans", sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--td-text);
  line-height: 1.15;
  text-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
}
.td-prizes { margin: 0; }
.td-prize-list {
  display: flex;
  flex-direction: column;
  border-radius: 18px;
  overflow: hidden;
}
.td-prize-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 54px;
  padding: 12px 18px;
  font-family: "Tilda Sans", "Rubik", sans-serif;
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--td-text);
  background: var(--td-panel);
  border: 1px solid var(--td-border);
  border-bottom-width: 0;
  text-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
}
.td-prize-row:last-child {
  border-bottom-width: 1px;
  border-radius: 0 0 18px 18px;
}
.td-prize-row:first-child {
  border-radius: 18px 18px 0 0;
}
.td-prize-row:only-child {
  border-radius: 18px;
  border-bottom-width: 1px;
}
.td-prize-row--1 {
  background: var(--td-prize1-bg);
  border-color: var(--td-prize1-border);
}
.td-prize-row--1 .td-prize-amt { color: var(--td-prize1); }
.td-prize-row--2 {
  background: var(--td-prize2-bg);
  border-color: var(--td-prize2-border);
}
.td-prize-row--2 .td-prize-amt { color: var(--td-prize2); }
.td-prize-row--3 {
  background: var(--td-prize3-bg);
  border-color: var(--td-prize3-border);
}
.td-prize-row--3 .td-prize-amt { color: var(--td-prize3); }
.td-prize-amt {
  text-align: right;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

.td-acc {
  margin: 0;
  border: 1px solid var(--td-border);
  border-radius: 18px;
  background: var(--td-acc, var(--td-panel));
  overflow: hidden;
  box-shadow: var(--td-shadow);
}
/* Сетка внутри шторки — те же Figma-токены обводки (#707f8e / #404040) */
.td-acc-body .bracket-match {
  background: var(--td-bracket-match-bg);
  border: 1px solid var(--td-border);
}
.td-acc-body .bracket-slot {
  background: var(--td-bracket-slot-bg);
  border: 1px solid var(--td-border);
  color: var(--td-text);
}
.td-acc-body .bracket-slot.winner {
  border-color: var(--td-prize1);
  background: var(--td-prize1-bg);
}
.td-acc-body .bracket-vs,
.td-acc-body .bracket-col-title,
.td-acc-body .bracket-slot.empty {
  color: var(--td-muted);
}
.td-acc > summary {
  list-style: none;
  cursor: pointer;
  display: grid;
  grid-template-columns: 28px 1fr 18px;
  align-items: center;
  column-gap: 10px;
  min-height: 54px;
  padding: 12px 18px;
  -webkit-tap-highlight-color: transparent;
}
.td-acc > summary::-webkit-details-marker { display: none; }
.td-acc-ico {
  width: 18px;
  height: 20px;
  object-fit: contain;
  justify-self: center;
  filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.15));
}
/* rules.svg 90×100: тень снизу + контент выше центра viewBox → чуть опустить */
.td-acc img[data-td-ico="rules"] {
  width: 36px;
  height: 40px;
  margin: -6px -4px -10px -6px;
  transform: translateY(3px);
}
.td-acc img[data-td-ico="bracket"] {
  width: 18px;
  height: 18px;
}
.td-acc-label {
  font-family: "Tilda Sans", "Rubik", sans-serif;
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--td-text);
  text-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
}
.td-acc-chevron {
  width: 18px;
  height: 9px;
  object-fit: contain;
  transition: transform 0.2s ease;
  opacity: 0.9;
  justify-self: end;
}
.td-acc[open] > summary .td-acc-chevron {
  transform: rotate(180deg);
}
.td-acc-panel {
  overflow: hidden;
}
.td-acc-body {
  padding: 0 14px 14px;
}
/* Появление страницы — один мягкий fade всей карточки, без каскада */
@keyframes td-page-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
.td-page-enter {
  animation: td-page-in 0.32s cubic-bezier(0.22, 1, 0.36, 1) both;
}
/* Скелетон вместо «Загрузка…» */
.td-status-pill--ghost {
  min-width: 88px;
  height: 36px;
  background: var(--td-panel) !important;
  border: 1px solid var(--td-border) !important;
  box-shadow: none !important;
  opacity: 0.55;
}
.td-shell--placeholder {
  min-height: 420px;
}
.td-skel {
  border-radius: 14px;
  background: color-mix(in srgb, var(--td-border) 28%, transparent);
  opacity: 0.7;
}
.td-skel--mode { height: 36px; width: 70%; margin: 4px auto; }
.td-info--skel { gap: 0; justify-content: space-evenly; padding: 10px; }
.td-skel--row { height: 14px; width: 72%; margin: 0 auto; border-radius: 8px; }
.td-skel--line { height: 1px; width: 100%; border-radius: 0; opacity: 0.45; }
.td-skel--block { height: 120px; width: 100%; border-radius: 18px; }
.td-skel--acc { height: 54px; width: 100%; border-radius: 18px; }
.td-skel--btn { height: 54px; width: 100%; border-radius: 999px; margin-top: 4px; }
@media (prefers-reduced-motion: reduce) {
  .td-page-enter { animation: none !important; }
}
.td-acc-body .rules-list {
  margin: 0;
  padding-left: 18px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--td-muted);
  line-height: 1.55;
}
.td-acc-body .rules-list strong { color: var(--td-text); }
.td-acc-body .info-box,
.td-acc-body .empty {
  color: var(--td-muted);
}

.td-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 2px;
}
.td-reg-title {
  margin: 0 0 4px;
  font-family: "Unbounded", "Tilda Sans", sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--td-text);
  line-height: 1.25;
  text-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
}
.td-btn {
  width: 100%;
  min-height: 54px;
  border-radius: 999px;
  border: 0;
  padding: 12px 16px;
  font-family: "Tilda Sans", "Rubik", sans-serif;
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.2;
  cursor: pointer;
  box-shadow: var(--td-shadow);
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}
.td-btn--primary {
  background: var(--td-accent);
  color: var(--td-accent-ink);
}
.td-btn--secondary {
  background: var(--td-shell);
  color: var(--td-text);
  border: 1px solid var(--td-border);
}
.td-btn:disabled {
  opacity: 0.45;
  cursor: default;
}
.td-btn:active:not(:disabled) { transform: scale(0.985); }
.td-note {
  margin: 0;
  padding: 12px 14px;
  border-radius: 18px;
  background: var(--td-panel);
  border: 1px solid var(--td-border);
  color: var(--td-muted);
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.4;
}

#panel-tournament .tournament-lobby-code .td-section-title {
  margin-bottom: 8px;
}

#tournament-my-team:empty { display: none; }

/* ── Flow-модалки Figma: регистрация / название / взнос ── */
.modal-overlay.vml-flow-center {
  /* absolute от залоченного body — не visualViewport, иначе окно уезжает вверх с клавиатурой */
  position: absolute;
  inset: 0;
  height: auto;
  align-items: center;
  justify-content: center;
  padding: calc(18px + var(--tg-top, 0px)) 14px 18px;
  background: rgba(0, 0, 0, 0.72);
}
/* Ник: чуть выше центра, одна позиция с клавиатурой и без неё */
.modal-overlay.vml-flow-center.pp-edit-nick-open,
body.keyboard-open .modal-overlay.vml-flow-center.pp-edit-nick-open {
  align-items: center;
  padding-top: calc(18px + var(--tg-top, 0px));
  padding-bottom: min(10vh, 80px);
}
.modal-overlay.vml-flow-bottom {
  /* как center: от залоченного body, без зазора снизу */
  position: absolute;
  inset: 0;
  height: auto;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  background: rgba(0, 0, 0, 0.72);
}
.modal-sheet.vml-flow-modal {
  /* Figma Contribution dark: #1a1a1a / accent #8ce95b */
  --flow-bg: #1a1a1a;
  --flow-text: #ffffff;
  --flow-muted: rgba(255, 255, 255, 0.78);
  --flow-placeholder: #808080;
  --flow-input-bg: #131313;
  --flow-input-border: #404040;
  --flow-card: #131313;
  --flow-card-border: #404040;
  --flow-label-accent: #8ce95b;
  --flow-cta: #8ce95b;
  --flow-cta-text: #1a1a1a;
  --flow-ghost-bg: #1a1a1a;
  --flow-ghost-border: #404040;
  --flow-ghost-text: #ffffff;
  --flow-radio-on: #8ce95b;
  --flow-option-active-bg: rgba(140, 233, 91, 0.05);
  --flow-option-active-border: #8ce95b;
  width: min(100%, 400px);
  max-height: min(88vh, calc(var(--app-vh, 100dvh) * 0.88));
  margin: 0;
  padding: 18px 16px 16px;
  border: none;
  border-radius: 38px;
  background: var(--flow-bg);
  color: var(--flow-text);
  box-shadow: none;
}
.modal-overlay.vml-flow-bottom .modal-sheet.vml-flow-modal {
  width: 100%;
  max-width: 480px;
  margin: 0;
  border-radius: 38px 38px 0 0;
  padding: 18px 16px max(16px, var(--tg-bottom, 0px), env(safe-area-inset-bottom, 0px));
  max-height: min(92vh, calc(var(--app-vh, 100dvh) * 0.92));
  /* добиваем низ экрана, чтобы за модалкой ничего не просвечивало */
  box-shadow: none;
}
body.theme-light .modal-sheet.vml-flow-modal,
html[data-theme="light"] .modal-sheet.vml-flow-modal {
  --flow-bg: #eff7ff;
  --flow-text: #000000;
  --flow-muted: rgba(0, 0, 0, 0.82);
  --flow-placeholder: #707f8e;
  --flow-input-bg: #eff7ff;
  --flow-input-border: #707f8e;
  --flow-card: #dfedfb;
  --flow-card-border: #707f8e;
  --flow-label-accent: #3787ff;
  --flow-cta: #3787ff;
  --flow-cta-text: #eff7ff;
  --flow-ghost-bg: #eff7ff;
  --flow-ghost-border: #707f8e;
  --flow-ghost-text: #000000;
  --flow-radio-on: #3787ff;
  --flow-option-active-bg: rgba(55, 135, 255, 0.25);
  --flow-option-active-border: #3787ff;
  box-shadow: none;
}
.modal-sheet.vml-flow-modal .modal-header {
  margin-bottom: 14px;
  align-items: flex-start;
}
.modal-sheet.vml-flow-modal .modal-header h2.vml-flow-title,
.modal-sheet.vml-flow-modal h2.vml-flow-title {
  font-family: Unbounded, "Tilda Sans", Rubik, sans-serif;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 1.15;
  color: var(--flow-text);
  max-width: calc(100% - 48px);
}
.modal-sheet.vml-flow-modal .modal-close.vml-flow-close {
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 999px;
  background: transparent;
  padding: 0;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.modal-sheet.vml-flow-modal .modal-close.vml-flow-close img {
  width: 38px;
  height: 38px;
  display: block;
}
.modal-sheet.vml-flow-modal .modal-body {
  margin-bottom: 14px;
}
.modal-sheet.vml-flow-modal .modal-actions {
  gap: 10px;
}
.vml-flow-btn[hidden] { display: none !important; }
.vml-flow-btn {
  width: 100%;
  min-height: 54px;
  border-radius: 999px;
  border: none;
  font-family: "Tilda Sans", Rubik, sans-serif;
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.1;
  cursor: pointer;
  box-shadow: none;
}
.vml-flow-btn--primary {
  background: var(--flow-cta);
  color: var(--flow-cta-text);
}
.vml-flow-btn--ghost {
  background: var(--flow-ghost-bg);
  color: var(--flow-ghost-text);
  border: 1px solid var(--flow-ghost-border);
  box-shadow: none;
}
.vml-flow-btn:active { transform: scale(0.985); }

.vml-flow-lead {
  margin: 0 0 16px;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--flow-muted);
}
.vml-flow-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}
.vml-flow-field:last-child { margin-bottom: 0; }
.vml-flow-label {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.3;
  color: var(--flow-text);
}
.vml-flow-label .muted {
  font-weight: 600;
  color: var(--flow-placeholder);
}
.vml-flow-input {
  width: 100%;
  min-height: 54px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid var(--flow-input-border);
  background: var(--flow-input-bg);
  color: var(--flow-text);
  font-size: 0.95rem;
  font-weight: 600;
  box-shadow: none;
  outline: none;
}
.vml-flow-input::placeholder { color: var(--flow-placeholder); }
.vml-flow-input:focus {
  border-color: var(--flow-label-accent);
}

/* Пополнение — Figma 4040:49521 / 4040:52293 */
.modal-sheet.vml-flow-modal.deposit-modal .vml-flow-title {
  white-space: normal;
}
.deposit-figma {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.deposit-figma-hint {
  margin: 0;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid var(--flow-option-active-border);
  background: var(--flow-option-active-bg);
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--flow-text);
}
.deposit-figma-info {
  padding: 14px 16px 16px;
  border-radius: 20px;
  border: 1px solid var(--flow-card-border);
  background: var(--flow-card);
}
.deposit-figma-info-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--flow-text);
}
.deposit-figma-info p {
  margin: 0;
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--flow-text);
}
.deposit-figma-methods {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  padding: 6px;
  border-radius: 20px;
  border: 1px solid var(--flow-card-border);
  background: var(--flow-card);
}
.deposit-figma-method {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 56px;
  padding: 8px 6px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: transparent;
  color: var(--flow-text);
  cursor: pointer;
}
.deposit-figma-method.active {
  border-color: var(--flow-option-active-border);
  background: var(--flow-option-active-bg);
}
.deposit-figma-method-ico {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  object-fit: contain;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.18);
}
.deposit-figma-method-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--lime) 18%, var(--flow-card));
  color: var(--lime);
}
.deposit-figma-method-mark svg {
  width: 16px;
  height: 16px;
  display: block;
}
.deposit-figma-method-name {
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.1;
  text-align: left;
}
.deposit-figma-method-name--2 {
  font-size: 0.7rem;
  line-height: 1.05;
}
.modal-sheet.vml-flow-modal.deposit-modal .vml-flow-label {
  margin: 0 0 8px;
  font-family: Unbounded, "Tilda Sans", Rubik, sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.modal-sheet.vml-flow-modal.deposit-modal .vml-flow-input {
  margin-bottom: 2px;
}
.deposit-figma-chips {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 14px;
}
.deposit-figma-chip {
  min-height: 46px;
  border-radius: 16px;
  border: 1px solid var(--flow-card-border);
  background: var(--flow-card);
  color: var(--flow-text);
  font-size: 0.95rem;
  font-weight: 800;
  cursor: pointer;
}
.deposit-figma-chip.active {
  border-color: var(--flow-option-active-border);
  background: var(--flow-option-active-bg);
}
.deposit-figma-copy {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: stretch;
  margin-bottom: 12px;
}
.deposit-figma-copy-val {
  display: flex;
  align-items: center;
  min-height: 54px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid var(--flow-input-border);
  background: var(--flow-input-bg);
  color: var(--flow-text);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.3;
  word-break: break-all;
}
.deposit-figma-copy-val--memo {
  color: var(--flow-label-accent);
}
.deposit-figma-copy-btn {
  min-width: 112px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--flow-ghost-border);
  background: var(--flow-ghost-bg);
  color: var(--flow-ghost-text);
  font-family: "Tilda Sans", Rubik, sans-serif;
  font-size: 0.88rem;
  font-weight: 800;
  cursor: pointer;
}
.deposit-figma-warn {
  margin: 4px 0 12px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(255, 80, 80, 0.35);
  background: rgba(255, 80, 80, 0.12);
  color: #ff6b6b;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.35;
}
body.theme-light .deposit-figma-warn,
html[data-theme="light"] .deposit-figma-warn {
  border-color: rgba(220, 50, 50, 0.35);
  background: rgba(220, 50, 50, 0.08);
  color: #c62828;
}
.deposit-gram-pay-lead,
.deposit-gram-pay-meta,
.deposit-gram-pay-status {
  margin: 0 0 12px;
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--flow-muted);
}
.deposit-gram-pay-status {
  text-align: center;
  color: var(--flow-text);
}

/* Оплата — карточки балансов / radio */
.modal-sheet.vml-flow-modal.pay-modal .balance-explain-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 10px;
}
.modal-sheet.vml-flow-modal.pay-modal .balance-explain-card {
  padding: 14px 16px;
  border-radius: 20px;
  border: 1px solid var(--flow-card-border);
  background: var(--flow-card);
  box-shadow: none;
  transition: border-color 0.18s ease, background-color 0.18s ease;
}
.modal-sheet.vml-flow-modal.pay-modal .balance-explain-card.is-linked {
  border-color: var(--flow-option-active-border);
  background: var(--flow-option-active-bg);
}
.modal-sheet.vml-flow-modal.pay-modal .balance-explain-card.is-linked .balance-explain-label {
  color: var(--flow-label-accent);
}
.modal-sheet.vml-flow-modal.pay-modal .balance-explain-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.modal-sheet.vml-flow-modal.pay-modal .balance-explain-label {
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--flow-label-accent);
}
.modal-sheet.vml-flow-modal.pay-modal .balance-explain-amount {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--flow-text);
}
.modal-sheet.vml-flow-modal.pay-modal .balance-explain-text {
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--flow-muted);
}
.modal-sheet.vml-flow-modal.pay-modal .pay-order-box {
  margin: 0 0 14px;
  padding: 14px 16px;
  border-radius: 20px;
  border: 1px solid var(--flow-card-border);
  background: var(--flow-card);
}
.modal-sheet.vml-flow-modal.pay-modal .pay-order-desc {
  margin: 0 0 8px;
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--flow-muted);
}
.modal-sheet.vml-flow-modal.pay-modal .pay-order-total {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--flow-text);
}
.modal-sheet.vml-flow-modal.pay-modal .pay-section-title {
  margin: 0 0 10px;
  font-family: Unbounded, "Tilda Sans", Rubik, sans-serif;
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--flow-text);
}
.modal-sheet.vml-flow-modal.pay-modal .pay-source-cards { gap: 10px; }
.modal-sheet.vml-flow-modal.pay-modal .pay-source-card {
  align-items: center;
  gap: 12px;
  padding: 14px 14px 14px 12px;
  border-radius: 20px;
  border: 1px solid var(--flow-card-border);
  background: var(--flow-card);
}
.modal-sheet.vml-flow-modal.pay-modal .pay-source-card.is-active {
  border-color: var(--flow-option-active-border);
  background: var(--flow-option-active-bg);
}
.modal-sheet.vml-flow-modal.pay-modal .pay-source-card input[type="radio"] {
  width: 22px;
  height: 22px;
  margin: 0;
  accent-color: var(--flow-radio-on);
}
.modal-sheet.vml-flow-modal.pay-modal .pay-source-card-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--flow-text);
}
.modal-sheet.vml-flow-modal.pay-modal .pay-source-card-meta {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--flow-muted);
}
.modal-sheet.vml-flow-modal.pay-modal .pay-split-hint,
.modal-sheet.vml-flow-modal.pay-modal .pay-split-label {
  color: var(--flow-muted);
}
.modal-sheet.vml-flow-modal.pay-modal .pay-split-field .input,
.modal-sheet.vml-flow-modal.pay-modal .pay-split-field input {
  min-height: 48px;
  border-radius: 999px;
  border: 1px solid var(--flow-input-border);
  background: var(--flow-input-bg);
  color: var(--flow-text);
  padding: 0 16px;
}

.vml-flow-section {
  margin: 14px 0 10px;
  font-family: Unbounded, "Tilda Sans", Rubik, sans-serif;
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--flow-text);
}
.vml-flow-btn--sm {
  min-height: 44px;
  font-size: 0.95rem;
  margin-top: 10px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12);
}

/* Состав команды — слоты друзей */
.modal-sheet.vml-flow-modal.team-slots-modal .team-slot-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.modal-sheet.vml-flow-modal.team-slots-modal .team-slot-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  width: 100%;
  padding: 14px 16px;
  border-radius: 20px;
  border: 1px solid var(--flow-card-border);
  background: var(--flow-card);
  color: var(--flow-text);
  text-align: left;
  cursor: pointer;
  box-shadow: none;
}
.modal-sheet.vml-flow-modal.team-slots-modal .team-slot-card.is-empty {
  align-items: center;
  flex-direction: row;
  gap: 12px;
}
.modal-sheet.vml-flow-modal.team-slots-modal .team-slot-card.is-picking {
  border-color: var(--flow-option-active-border);
  background: var(--flow-option-active-bg);
}
.modal-sheet.vml-flow-modal.team-slots-modal .team-slot-plus {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--flow-label-accent);
  border: 1px solid var(--flow-card-border);
  flex-shrink: 0;
}
.modal-sheet.vml-flow-modal.team-slots-modal .team-slot-role {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--flow-label-accent);
}
.modal-sheet.vml-flow-modal.team-slots-modal .team-slot-name {
  font-size: 0.98rem;
  font-weight: 800;
  color: var(--flow-text);
}
.modal-sheet.vml-flow-modal.team-slots-modal .team-slot-meta {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--flow-muted);
}
.modal-sheet.vml-flow-modal.team-slots-modal .friend-pick-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.modal-sheet.vml-flow-modal.team-slots-modal .friend-pick-row {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid var(--flow-card-border);
  background: var(--flow-card);
  color: var(--flow-text);
  text-align: left;
  cursor: pointer;
}
.modal-sheet.vml-flow-modal.team-slots-modal .friend-pick-name {
  display: block;
  font-size: 0.95rem;
  font-weight: 800;
}
.modal-sheet.vml-flow-modal.team-slots-modal .friend-pick-meta {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--flow-muted);
}
.modal-sheet.vml-flow-modal.team-slots-modal .hint,
.modal-sheet.vml-flow-modal.team-slots-modal .empty {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--flow-muted);
}

/* ── Профиль · Figma 4025:2826 (light) / 4025:5431 (dark) ── */
.pp-page {
  --pp-accent: #8ce95b;
  --pp-accent-ink: #1a1a1a;
  --pp-shell: #1a1a1a;
  --pp-text: #ffffff;
  --pp-muted: rgba(255, 255, 255, 0.55);
  --pp-border: #404040;
  --pp-glass: rgba(0, 0, 0, 0.25);
  --pp-chip: #1a1a1a;
  --pp-chip-stroke: #404040;
  --pp-game-grad: linear-gradient(229deg, #2a881d 0%, #8ce95b 50%, #2a881d 100%);
  --pp-hero-overlay: rgba(0, 0, 0, 0.15);
  --pp-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-bottom: 8px;
}
.pp-page.pp-page-enter {
  animation: pp-page-in 0.34s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes pp-page-in {
  from { transform: translateY(12px); }
  to { transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .pp-page.pp-page-enter { animation: none !important; }
  .pp-social-ico img.pp-media-wait,
  .bs-profile-icon.pp-media-wait { opacity: 1; transition: none; }
}
body.theme-light .pp-page,
html[data-theme="light"] .pp-page {
  --pp-accent: #3787ff;
  --pp-accent-ink: #eff7ff;
  --pp-shell: #eff7ff;
  --pp-text: #000000;
  --pp-muted: rgba(0, 0, 0, 0.55);
  --pp-border: #707f8e;
  --pp-glass: rgba(0, 0, 0, 0.18);
  --pp-chip: #1a1a1a;
  --pp-chip-stroke: #404040;
  --pp-game-grad: linear-gradient(229deg, #3787ff 0%, #5abaff 50%, #3787ff 100%);
  --pp-hero-overlay: rgba(0, 0, 0, 0.12);
  --pp-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
}

.pp-hero,
.pp-edit-preview {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 14px 12px;
  border-radius: 22px;
  min-height: 168px;
  color: #fff;
  box-shadow: var(--pp-shadow);
  overflow: hidden;
}
.pp-hero {
  background: center / cover no-repeat url("/miniapp/assets/profile/backgrounds/1.png?v=1");
}
.pp-hero.pp-hero--default,
.pp-edit-preview.pp-hero--default {
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(140, 233, 91, 0.28), transparent 60%),
    linear-gradient(180deg, #1b1c1f 0%, #121314 100%);
}
body.theme-light .pp-hero.pp-hero--default,
html[data-theme="light"] .pp-hero.pp-hero--default,
body.theme-light .pp-edit-preview.pp-hero--default,
html[data-theme="light"] .pp-edit-preview.pp-hero--default {
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(55, 135, 255, 0.38), transparent 58%),
    linear-gradient(180deg, #3a4a5c 0%, #2a3544 100%);
}
.pp-edit-preview {
  background-color: #1a1a1a;
  background-image: none;
}
body.theme-light .pp-edit-preview,
html[data-theme="light"] .pp-edit-preview {
  background-color: #cfdceb;
}
.pp-hero::after,
.pp-edit-preview::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: var(--pp-hero-overlay);
  pointer-events: none;
  border-radius: inherit;
}
.pp-uid {
  position: absolute;
  top: 12px;
  left: 14px;
  z-index: 1;
  margin: 0;
  font-size: 0.85rem;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.55);
}
.pp-avatar,
#platform-profile-avatar.pp-avatar {
  position: relative;
  z-index: 1;
  width: 88px;
  height: 88px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 2rem;
  font-weight: 800;
  background: center / cover no-repeat url("/miniapp/assets/profile/avatars/1.png?v=1");
  color: #1a1a1a;
  box-shadow: var(--pp-shadow);
  flex-shrink: 0;
}
.pp-nick {
  position: relative;
  z-index: 1;
  margin: 10px 0 0;
  font-family: Unbounded, "Tilda Sans", Rubik, sans-serif;
  font-size: 1.05rem;
  font-weight: 800;
  text-align: center;
  color: #fff;
  text-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}
.pp-hero .pp-nick:not([data-nick-color]):not(.pp-nick--flow),
.pp-edit-preview .pp-nick:not([data-nick-color]):not(.pp-nick--flow),
.pp-hero .pp-nick:not([data-nick-color]):not(.pp-nick--flow) .pp-nick-text,
.pp-edit-preview .pp-nick:not([data-nick-color]):not(.pp-nick--flow) .pp-nick-text {
  color: #fff;
  -webkit-text-fill-color: #fff;
  background-image: none;
  -webkit-background-clip: initial;
  background-clip: initial;
}
html[data-theme="light"] .pp-edit-page .pp-edit-preview .pp-nick:not([data-nick-color]):not(.pp-nick--flow),
body.theme-light .pp-edit-page .pp-edit-preview .pp-nick:not([data-nick-color]):not(.pp-nick--flow),
html[data-theme="light"] .pp-edit-page .pp-edit-preview .pp-nick:not([data-nick-color]):not(.pp-nick--flow) .pp-nick-text,
body.theme-light .pp-edit-page .pp-edit-preview .pp-nick:not([data-nick-color]):not(.pp-nick--flow) .pp-nick-text {
  color: #243044;
  -webkit-text-fill-color: #243044;
}
.pp-hero-bottom {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
  margin-top: 12px;
  min-height: 34px;
}
.pp-social-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  flex: 1;
  min-width: 0;
}
.pp-social-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--pp-chip-stroke, #404040);
  background: var(--pp-chip, #1a1a1a);
  color: #fff;
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 800;
  max-width: 100%;
}
a.pp-social-chip:hover {
  background: #242424;
}
.pp-social-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 14px;
  flex-shrink: 0;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}
.pp-social-ico img {
  width: 18px;
  height: 14px;
  object-fit: contain;
  display: block;
}
.pp-social-ico img.pp-media-wait {
  opacity: 0;
  transition: opacity 0.32s ease;
}
.pp-social-ico img.is-ready {
  opacity: 1;
}
.pp-social-chip[data-net="twitch"] .pp-social-ico,
.pp-social-chip[data-net="tiktok"] .pp-social-ico {
  width: 14px;
  height: 16px;
}
.pp-social-chip[data-net="twitch"] .pp-social-ico img,
.pp-social-chip[data-net="tiktok"] .pp-social-ico img {
  width: 14px;
  height: 16px;
}
.pp-social-handle {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 7.5rem;
}
.pp-edit-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 0 10px;
  margin-left: auto;
  border: 1px solid var(--pp-chip-stroke, #404040);
  border-radius: 999px;
  background: var(--pp-chip, #1a1a1a);
  color: #fff;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  flex-shrink: 0;
  cursor: pointer;
  box-shadow: var(--pp-shadow);
}
.pp-edit-ico {
  display: inline-flex;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.pp-edit-btn .ico-svg,
.pp-edit-ico .ico-svg {
  width: 16px;
  height: 16px;
  display: block;
}

.pp-friend-slot {
  margin-left: auto;
  flex-shrink: 0;
  display: flex;
  align-items: center;
}
.pp-friend-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 0 12px;
  border: none;
  border-radius: 999px;
  background: var(--pp-accent);
  color: var(--pp-accent-ink);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: var(--pp-shadow);
}
.pp-friend-ico {
  display: inline-flex;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: inherit;
  overflow: visible;
}
.pp-friend-ico .ico-svg {
  width: 16px;
  height: 16px;
  display: block;
  color: inherit;
  overflow: visible;
}
.pp-friend-btn.is-done,
.pp-friend-btn.is-wait {
  background: var(--pp-chip, #1a1a1a);
  color: #fff;
  border: 1px solid var(--pp-chip-stroke, #404040);
  cursor: default;
  box-shadow: none;
}
.pp-friend-btn:disabled:not(.is-done):not(.is-wait) {
  cursor: wait;
  opacity: 0.72;
}
.pp-friend-btn .pp-skel--friend-lbl {
  display: inline-block;
  width: 7.4em;
  height: 0.7em;
  border-radius: 4px;
  vertical-align: middle;
  background: linear-gradient(
    90deg,
    color-mix(in srgb, var(--pp-accent-ink) 18%, transparent) 25%,
    color-mix(in srgb, var(--pp-accent-ink) 36%, transparent) 50%,
    color-mix(in srgb, var(--pp-accent-ink) 18%, transparent) 75%
  );
  background-size: 200% 100%;
  animation: pp-skel-shine 1.15s ease-in-out infinite;
}

.pp-wallet {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 54px;
  padding: 0 16px;
  border: none;
  border-radius: 999px;
  background: var(--pp-shell);
  color: var(--pp-text);
  box-shadow: var(--pp-shadow);
  cursor: pointer;
  text-align: left;
  font-family: "Tilda Sans", Rubik, sans-serif;
}
.pp-row-ico {
  display: inline-flex;
  color: var(--pp-accent);
  width: 22px;
  height: 22px;
}
.pp-row-ico .ico-svg { width: 22px; height: 22px; }
.pp-wallet-label {
  font-size: 0.95rem;
  font-weight: 800;
}
.pp-wallet-value {
  margin-left: auto;
  font-size: 0.95rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.pp-wallet-value small { font-size: 0.8em; font-weight: 700; }
.pp-chevron {
  display: inline-flex;
  color: var(--pp-muted);
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.pp-chevron .ico-svg { width: 16px; height: 16px; }

.pp-game {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: 36px;
  padding: 0;
  background: transparent;
  box-shadow: var(--pp-shadow);
  overflow: hidden;
  color: #fff;
}
.pp-game::before { display: none; }
.pp-up {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 0;
  padding: 8px;
  /* тот же цвет, что у кнопок — без чёрного внешнего контура */
  background: #1a1a1a;
  border-bottom: none;
}
body.theme-light .pp-up,
html[data-theme="light"] .pp-up {
  background: #eff7ff;
}
.pp-up-btn {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 56px;
  padding: 8px 20px 8px 10px;
  border: none;
  border-radius: 0;
  background-color: #1a1a1a;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 100% 100%;
  color: #fff;
  box-shadow: none;
  cursor: pointer;
  font-family: "Tilda Sans", Rubik, sans-serif;
  overflow: visible;
}
/* Figma: у Рейтинга скруглён только верхний левый угол, у Друзей — верхний правый */
.pp-up-btn--rating {
  background-image: url("/miniapp/assets/profile/up/btn-rating.svg?v=4");
}
.pp-up-btn--friends {
  background-image: url("/miniapp/assets/profile/up/btn-friends.svg?v=4");
}
body.theme-light .pp-up-btn,
html[data-theme="light"] .pp-up-btn {
  background-color: #eff7ff;
  color: #000;
}
body.theme-light .pp-up-btn--rating,
html[data-theme="light"] .pp-up-btn--rating {
  background-image: url("/miniapp/assets/profile/up/light/btn-rating.svg?v=2");
}
body.theme-light .pp-up-btn--friends,
html[data-theme="light"] .pp-up-btn--friends {
  background-image: url("/miniapp/assets/profile/up/light/btn-friends.svg?v=2");
}
.pp-up-btn + .pp-up-btn {
  border-left: none;
}
.pp-up-ico {
  display: inline-flex;
  color: var(--pp-accent);
  width: 22px;
  height: 22px;
}
.pp-up-ico .ico-svg { width: 22px; height: 22px; }
.pp-up-label {
  font-size: 0.95rem;
  font-weight: 800;
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  color: #fff;
  line-height: 1.1;
  text-shadow: none;
}
.pp-up-label em {
  font-style: normal;
  color: #8ce95b;
  font-weight: 800;
}
body.theme-light .pp-up-label,
html[data-theme="light"] .pp-up-label {
  color: #000;
  text-shadow: none;
}
body.theme-light .pp-up-label em,
html[data-theme="light"] .pp-up-label em {
  color: #3787ff;
}
body.theme-light .pp-up-ico,
html[data-theme="light"] .pp-up-ico {
  color: #3787ff;
}
.pp-up-chevron {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 9px;
  height: 18px;
  object-fit: contain;
  pointer-events: none;
  opacity: 1;
}
.pp-up-chevron--light { display: none; }
body.theme-light .pp-up-chevron[data-pp-chevron="dark"],
html[data-theme="light"] .pp-up-chevron[data-pp-chevron="dark"] {
  display: none;
}
body.theme-light .pp-up-chevron--light,
html[data-theme="light"] .pp-up-chevron--light {
  display: block;
}
.pp-up-btn .pp-chevron {
  display: none;
}
.pp-up-btn .chip-alert-dot {
  position: absolute;
  top: 10px;
  left: 12px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #e95b5b;
  box-shadow: none;
  z-index: 1;
}

/* Чужой профиль без привязанной игры: кнопки круглые снизу, без острых стыков SVG */
.pp-page.pp-public.pp-page--no-game .pp-game-body {
  display: none !important;
}
.pp-page.pp-public.pp-page--no-game .pp-up {
  border-radius: 0 0 36px 36px;
}
.pp-page.pp-public.pp-page--no-game .pp-up-btn {
  overflow: hidden;
}
.pp-page.pp-public.pp-page--no-game .pp-up-btn--rating {
  border-radius: 0 0 0 28px;
}
.pp-page.pp-public.pp-page--no-game .pp-up-btn--friends {
  border-radius: 0 0 28px 0;
}
body.theme-light .pp-page.pp-public.pp-page--no-game .pp-up,
html[data-theme="light"] .pp-page.pp-public.pp-page--no-game .pp-up {
  background: #eff7ff;
}

/* ── Блок Brawl Stars · Figma «Link game» (dark 4040:52524 / light 4040:49752) ──
   Мастер привязки: фирменный градиент. После верификации поверх — вертикальный
   пресет `game_background`, не горизонтальный фон шапки. */
.pp-game-body {
  --bs-panel-bg: rgba(0, 0, 0, 0.25);
  --bs-panel-border: #404040;
  --bs-cta-bg: #8ce95b;
  --bs-cta-ink: #1a1a1a;
  --bs-input-bg: #1a1a1a;
  --bs-input-ink: #ffffff;
  --bs-input-placeholder: #404040;
  --bs-dot-idle: #1a1a1a;
  --bs-dot-idle-ink: #ffffff;
  --bs-dot-active-ink: #000000;
  position: relative;
  overflow: hidden;
  padding: 14px 12px 16px;
  color: #fff;
  background: linear-gradient(222.5deg, #2a881d 0%, #8ce95b 50%, #2a881d 100%);
}
body.theme-light .pp-game-body,
html[data-theme="light"] .pp-game-body {
  --bs-panel-border: #707f8e;
  --bs-cta-bg: #3787ff;
  --bs-cta-ink: #eff7ff;
  --bs-input-bg: #eff7ff;
  --bs-input-ink: #1a1a1a;
  --bs-input-placeholder: #707f8e;
  background: linear-gradient(222.5deg, #3787ff 0%, #5abaff 50%, #3787ff 100%);
}
/* Затемнение поверх градиента + верхняя тень — как слои Dark/Shadow в Figma */
.pp-game-body::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0)) top / 100% 180px no-repeat,
    rgba(0, 0, 0, 0.25);
  pointer-events: none;
}
body.theme-light .pp-game-body::before,
html[data-theme="light"] .pp-game-body::before {
  background:
    linear-gradient(rgba(0, 0, 0, 0.25), rgba(0, 0, 0, 0)) top / 100% 180px no-repeat,
    rgba(0, 0, 0, 0.15);
}

/* «Дефолт»: статичный фон под тему, без фото. */
.pp-game-body.pp-game-body--default {
  background:
    radial-gradient(120% 70% at 50% -10%, rgba(140, 233, 91, 0.18), transparent 58%),
    linear-gradient(180deg, #1b1c1f 0%, #121314 100%);
}
body.theme-light .pp-game-body.pp-game-body--default,
html[data-theme="light"] .pp-game-body.pp-game-body--default {
  color: #1a1a1a;
  --pp-text: #1a1a1a;
  --pp-muted: rgba(26, 26, 26, 0.62);
  --pp-border: #707f8e;
  --pp-glass: rgba(255, 255, 255, 0.55);
  background:
    radial-gradient(120% 70% at 50% -10%, rgba(55, 135, 255, 0.22), transparent 58%),
    linear-gradient(180deg, #e8f1fb 0%, #d4e3f4 100%);
}
body.theme-light .pp-game-body.pp-game-body--default::before,
html[data-theme="light"] .pp-game-body.pp-game-body--default::before {
  background: rgba(0, 0, 0, 0.04);
}
.pp-game-body.pp-game-body--default::before {
  background: rgba(0, 0, 0, 0.12);
}

/* Кастомное фото: всегда светлый текст + затемнение, чтобы ничего не сливалось. */
.pp-game-body.pp-game-body--photo {
  color: #fff;
  --pp-text: #ffffff;
  --pp-muted: rgba(255, 255, 255, 0.82);
  --pp-border: rgba(255, 255, 255, 0.28);
  --pp-glass: rgba(0, 0, 0, 0.48);
}
.pp-game-body.pp-game-body--photo::before {
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.28) 42%, rgba(0, 0, 0, 0.55) 100%);
}
.pp-game-body.pp-game-body--photo .pp-record,
.pp-game-body.pp-game-body--photo .pp-stats-grid .bs-stat,
.pp-game-body.pp-game-body--photo .pp-bs-info,
.pp-game-body.pp-game-body--photo .pp-bs-panel {
  background: rgba(0, 0, 0, 0.48);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.pp-game-body.pp-game-body--photo .pp-record-name,
.pp-game-body.pp-game-body--photo .pp-record-label,
.pp-game-body.pp-game-body--photo .pp-record-val,
.pp-game-body.pp-game-body--photo .bs-stat .value,
.pp-game-body.pp-game-body--photo .bs-stat .label,
.pp-game-body.pp-game-body--photo .pp-bs-info-title,
.pp-game-body.pp-game-body--photo .pp-bs-info-text,
.pp-game-body.pp-game-body--photo .pp-brawler-name,
.pp-game-body.pp-game-body--photo .pp-brawler-trophies,
.pp-game-body.pp-game-body--photo .pp-top-brawlers-title {
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9), 0 0 10px rgba(0, 0, 0, 0.45);
}
body.theme-light .pp-game-body.pp-game-body--default .bs-stat .value,
body.theme-light .pp-game-body.pp-game-body--default .bs-stat .label,
html[data-theme="light"] .pp-game-body.pp-game-body--default .bs-stat .value,
html[data-theme="light"] .pp-game-body.pp-game-body--default .bs-stat .label,
body.theme-light .pp-game-body.pp-game-body--default .pp-record-name,
body.theme-light .pp-game-body.pp-game-body--default .pp-record-label,
body.theme-light .pp-game-body.pp-game-body--default .pp-record-val,
html[data-theme="light"] .pp-game-body.pp-game-body--default .pp-record-name,
html[data-theme="light"] .pp-game-body.pp-game-body--default .pp-record-label,
html[data-theme="light"] .pp-game-body.pp-game-body--default .pp-record-val {
  color: #1a1a1a;
  text-shadow: none;
  opacity: 1;
}
.pp-game-body > * { position: relative; z-index: 2; }
.pp-game-body > .pp-media { z-index: 0; }

.pp-bs-wrap {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pp-bs-info {
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid var(--bs-panel-border);
  background: var(--bs-panel-bg);
}
.pp-bs-info-title {
  margin: 0 0 8px;
  font-family: Unbounded, "Tilda Sans", Rubik, sans-serif;
  font-size: 1.05rem;
  font-weight: 800;
  color: #fff;
}
.pp-bs-info-text {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.2;
  color: #fff;
}

.pp-bs-steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: start;
  padding: 4px 0 2px;
}
.pp-bs-steps.hidden { display: none; }
.pp-bs-steps-line {
  position: absolute;
  left: 16.66%;
  right: 16.66%;
  top: 27px;
  height: 28px;
  transform: translateY(-50%);
  background: center / 100% 100% no-repeat url("/miniapp/assets/profile/bs/steps-line.svg?v=1");
  pointer-events: none;
}
.pp-bs-step {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.pp-bs-step-dot {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 999px;
  background: var(--bs-dot-idle);
  color: var(--bs-dot-idle-ink);
  font-family: Unbounded, "Tilda Sans", Rubik, sans-serif;
  font-size: 1.5rem;
  font-weight: 500;
}
.pp-bs-step.is-active .pp-bs-step-dot,
.pp-bs-step.is-done .pp-bs-step-dot {
  background: var(--bs-cta-bg);
  color: var(--bs-dot-active-ink);
}
body.theme-light .pp-bs-step.is-active .pp-bs-step-dot,
body.theme-light .pp-bs-step.is-done .pp-bs-step-dot,
html[data-theme="light"] .pp-bs-step.is-active .pp-bs-step-dot,
html[data-theme="light"] .pp-bs-step.is-done .pp-bs-step-dot {
  color: #fff;
}
.pp-bs-step-label {
  font-family: Unbounded, "Tilda Sans", Rubik, sans-serif;
  font-size: 0.95rem;
  font-weight: 800;
  text-transform: uppercase;
  color: #fff;
}

.pp-bs-panel {
  padding: 16px 16px 18px;
  border-radius: 18px 18px 27px 27px;
  border: 1px solid var(--bs-panel-border);
  background: var(--bs-panel-bg);
}
.pp-bs-panel-hint {
  margin: 0 0 12px;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.2;
  color: #fff;
}
.pp-bs-panel-hint:empty { display: none; }
.pp-bs-input {
  width: 100%;
  min-height: 54px;
  margin: 0;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid var(--bs-panel-border);
  background: var(--bs-input-bg);
  color: var(--bs-input-ink);
  font-family: "Tilda Sans", Rubik, sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  outline: none;
  box-shadow: none;
}
.pp-bs-input::placeholder { color: var(--bs-input-placeholder); }
.pp-bs-tag-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
}

.pp-bs-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 54px;
  margin: 0;
  padding: 0 18px;
  border: none;
  border-radius: 999px;
  background: var(--bs-cta-bg);
  color: var(--bs-cta-ink);
  font-family: "Tilda Sans", Rubik, sans-serif;
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.1;
  cursor: pointer;
  box-shadow: none;
}
.pp-bs-cta:active:not(:disabled) { transform: scale(0.985); }
.pp-bs-cta:disabled { opacity: 0.5; cursor: not-allowed; }
.pp-bs-cta.hidden { display: none; }
.pp-bs-cta--dark {
  background: #1a1a1a;
  color: #fff;
}
.pp-bs-cta--ghost {
  background: var(--bs-input-bg);
  color: var(--bs-input-ink);
  border: 1px solid var(--bs-panel-border);
}
.pp-bs-cta--inline {
  width: auto;
  white-space: nowrap;
  font-size: 0.95rem;
}
.pp-bs-cta.btn-loading { color: transparent; position: relative; }
.pp-bs-cta.btn-loading::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 18px;
  height: 18px;
  margin: -9px 0 0 -9px;
  border: 2px solid rgba(0, 0, 0, 0.2);
  border-top-color: var(--bs-cta-ink);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

#profile-none,
#profile-verify-block {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
#profile-none.hidden,
#profile-verify-block.hidden { display: none; }
#profile-verify-block {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}
#profile-verify-block .pp-bs-cta { margin-top: 0; }

.pp-bs-icon-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.pp-bs-icon-panel.hidden { display: none; }
.pp-bs-icon-panel .verify-icon-wrap { margin-top: 0; }
.pp-bs-icon-panel .verify-icon-wrap.hidden { display: none; }
.pp-bs-icon-card.verify-icon-card {
  flex-direction: row;
  align-items: center;
  gap: 14px;
  padding: 0;
  border: none;
  background: transparent;
}
.pp-bs-icon-card .verify-icon-caption {
  margin: 0;
  text-align: left;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.2;
  color: #fff;
}
.pp-bs-icon-card .bs-icon-frame.lg {
  width: 84px;
  height: 84px;
  border-radius: 18px;
  background: var(--bs-input-bg);
}
.pp-bs-steps-list {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: bs-step;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pp-bs-steps-list.hidden { display: none; }
.pp-bs-steps-list li {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.25;
  color: rgba(255, 255, 255, 0.86);
  counter-increment: bs-step;
}
.pp-bs-steps-list li::before {
  content: counter(bs-step) ". ";
  font-weight: 800;
  color: #fff;
}
.pp-bs-steps-list strong { color: #fff; font-weight: 800; }

.pp-bs-card.bs-account-card {
  background: transparent !important;
  border: none;
  box-shadow: none;
  padding: 4px 2px 0;
  color: #fff;
}
.pp-bs-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.pp-bs-head .bs-icon-frame.lg,
.pp-bs-head .bs-account-avatar-wrap {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  overflow: hidden;
  flex-shrink: 0;
  background: transparent;
  box-shadow: var(--pp-shadow);
}
/* чуть крупнее картинка внутри рамки — без роста самой рамки */
.pp-bs-head .bs-account-avatar-wrap .bs-profile-icon,
.pp-bs-head .bs-icon-frame.lg .bs-profile-icon {
  width: calc(100% + 4px);
  height: calc(100% + 4px);
  max-width: none;
  margin: -2px;
  object-fit: cover;
  object-position: center;
  border-radius: inherit;
}
.pp-bs-name {
  margin: 0;
  font-family: Unbounded, "Tilda Sans", Rubik, sans-serif;
  font-size: 1.05rem;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}
.pp-bs-tag {
  margin: 4px 0 0;
  font-size: 0.95rem;
  font-weight: 800;
  color: #fff;
  opacity: 0.5;
  text-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}
.pp-verified,
.pp-bs-card .bs-verified-badge {
  display: none !important;
}

.pp-record,
.pp-record.bs-stat.featured {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  margin-bottom: 10px;
  border-radius: 18px;
  border: 1px solid var(--pp-border);
  background: var(--pp-glass);
  min-height: 0;
  flex-direction: row;
  justify-content: flex-start;
  grid-column: auto;
}
.pp-record-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  overflow: hidden;
  background: transparent;
  flex-shrink: 0;
  box-shadow: var(--pp-shadow);
}
.pp-record-icon img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pp-record-body,
.pp-record .bs-stat-featured-body { flex: 1; min-width: 0; }
.pp-record.bs-stat.featured .pp-record-name,
.pp-record.bs-stat.featured .bs-stat-featured-name,
.pp-record-name {
  display: block;
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: 0;
  text-transform: none;
  color: #fff;
  text-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}
/* выше .bs-stat.featured .label — белый 50% opacity, без uppercase */
.pp-record.bs-stat.featured .pp-record-label,
.pp-record.bs-stat.featured .label,
.pp-record-label {
  display: block;
  margin: 2px 0 0;
  min-height: 0;
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: 0;
  text-transform: none;
  color: #fff;
  opacity: 0.5;
  text-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}
.pp-record.bs-stat.featured .pp-record-val,
.pp-record.bs-stat.featured .value,
.pp-record-val {
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.1;
  color: #fff;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  text-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.pp-stats-grid,
.pp-stats-grid.bs-account-stats {
  --pp-stats-r: 18px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin: 0 0 10px;
  position: relative;
  isolation: isolate;
  border-radius: var(--pp-stats-r);
  /* Свой border + overflow:hidden режет 1px обводку на радиусе */
  border: none;
  background: var(--pp-glass);
  background-clip: padding-box;
  overflow: hidden;
  /* backdrop-filter у ячеек (photo) иначе вылезает квадратом за 18px */
  clip-path: inset(0 round var(--pp-stats-r));
  -webkit-mask-image: radial-gradient(#fff, #fff);
  mask-image: radial-gradient(#fff, #fff);
}
.pp-stats-grid::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  border-radius: inherit;
  border: 1px solid var(--pp-border);
  pointer-events: none;
  box-sizing: border-box;
}
.pp-stat,
.pp-stat.bs-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 12px 8px;
  text-align: center;
  min-height: 0;
  border-radius: 0;
  background: transparent;
  border: none;
  border-right: 1px solid rgba(255, 255, 255, 0.18);
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}
.pp-stat:nth-child(2n),
.pp-stat.bs-stat:nth-child(2n) { border-right: none; }
.pp-stat:nth-child(n + 3),
.pp-stat.bs-stat:nth-child(n + 3) { border-bottom: none; }
.pp-stat-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 28px;
  margin-bottom: -2px;
}
.pp-stat-ico img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.25));
}
/* выше специфичность, чем у .bs-stat:not(.featured) .label / .bs-stat .value */
.pp-stat.bs-stat:not(.featured) .label,
.pp-stat .label {
  display: block;
  margin: 0;
  min-height: 0;
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: 0;
  text-transform: none;
  color: #fff;
  opacity: 0.5;
  text-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}
.pp-stat.bs-stat .value,
.pp-stat .value {
  display: block;
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.05;
  color: #fff;
  text-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.pp-club,
.pp-club.bs-account-club {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 6px 14px;
  margin: 0 0 10px;
  border-radius: 999px;
  border: 1px solid var(--pp-border);
  background: var(--pp-glass);
  font-size: 1.05rem;
  font-weight: 600;
  color: #fff;
}
.pp-club.bs-account-club span {
  display: inline;
  margin: 0;
  letter-spacing: 0;
  text-transform: none;
  font-size: inherit;
  font-weight: inherit;
  color: inherit;
}
.pp-club-ico {
  width: 26px;
  height: 22px;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.25));
}
.pp-club.bs-account-club .pp-club-label,
.pp-club-label {
  font-size: 1.05rem;
  font-weight: 600;
  color: #fff;
  opacity: 0.5;
  text-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}
.pp-club.bs-account-club .pp-club-name,
.pp-club-name {
  margin-left: auto;
  font-size: 1.05rem;
  font-weight: 800;
  color: #fff;
  opacity: 1;
  text-align: right;
  text-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.pp-top-brawlers {
  padding: 12px 8px 8px;
  border-radius: 18px;
  border: 1px solid var(--pp-border);
  background: var(--pp-glass);
}
.pp-top-brawlers-title {
  margin: 0 0 12px;
  text-align: center;
  font-family: Unbounded, "Tilda Sans", Rubik, sans-serif;
  font-size: 0.95rem;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}
.pp-top-brawlers-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.pp-brawler-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
}
.pp-brawler-icon,
.pp-brawler-icon.bs-brawler-icon-wrap,
.pp-brawler-icon.bs-brawler-icon-wrap.sm {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  overflow: hidden;
  background: transparent;
  box-shadow: var(--pp-shadow);
}
.pp-brawler-icon img,
.pp-brawler-icon.bs-brawler-icon-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 12px;
}
.pp-brawler-col.bs-brawler-chip {
  background: transparent;
  border: none;
  padding: 0;
}
.pp-brawler-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
  opacity: 0.5;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}
.pp-brawler-trophies {
  font-size: 0.95rem;
  font-weight: 800;
  color: #fff;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  text-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}
.pp-mini-trophy {
  width: 14px;
  height: 11px;
  object-fit: contain;
}

/* Редактор */
.pp-edit-page {
  display: flex;
  flex-direction: column;
  gap: 12px;
  --pp-accent: #8ce95b;
  --pp-shell: #1a1a1a;
  --pp-text: #ffffff;
  --pp-muted: #808080;
  --pp-border: #404040;
  --pp-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
}
body.theme-light .pp-edit-page,
html[data-theme="light"] .pp-edit-page {
  --pp-accent: #3787ff;
  --pp-shell: #eff7ff;
  --pp-text: #000000;
  --pp-muted: #707f8e;
  --pp-border: #707f8e;
  --pp-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
}
.pp-edit-chrome {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
}
.pp-edit-back {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 999px;
  background: var(--pp-shell);
  color: var(--pp-text);
  display: grid;
  place-items: center;
  box-shadow: var(--pp-shadow);
  cursor: pointer;
  padding: 0;
}
.pp-edit-title {
  flex: 1;
  margin: 0;
  text-align: right;
  font-family: Unbounded, "Tilda Sans", Rubik, sans-serif;
  font-size: 0.95rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--pp-text);
}
.pp-edit-preview {
  min-height: 140px;
  padding-bottom: 18px;
}
.pp-edit-card {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 8px 10px 14px;
  border-radius: 28px;
  background: var(--pp-shell);
  box-shadow: var(--pp-shadow);
  color: var(--pp-text);
}
.pp-edit-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 48px;
  padding: 8px 6px;
  border: none;
  background: transparent;
  color: var(--pp-text);
  cursor: pointer;
  text-align: left;
  font-family: "Tilda Sans", Rubik, sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
}
.pp-edit-row.is-active { color: var(--pp-accent); }
.pp-edit-row-ico {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--pp-accent) 16%, transparent);
  color: var(--pp-accent);
  flex-shrink: 0;
}
.pp-edit-row-ico .ico-svg { width: 18px; height: 18px; }
.pp-edit-row-thumb {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  background-color: color-mix(in srgb, var(--pp-accent) 12%, transparent);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}
.pp-edit-row-thumb--bg {
  border-radius: 10px;
}
.pp-edit-row-thumb--av {
  border-radius: 999px;
}
.pp-edit-row-thumb--game {
  width: 26px;
  height: 40px;
  border-radius: 8px;
}
.pp-edit-row-label { flex: 1; }
.pp-edit-panel {
  display: none;
  flex-direction: column;
  gap: 10px;
  padding: 0 6px 12px;
}
.pp-edit-panel.is-open { display: flex; }
.pp-edit-divider {
  height: 1px;
  margin: 6px 4px 10px;
  background: var(--pp-border);
  opacity: 0.55;
}
.pp-edit-bs {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 6px 2px;
}
.pp-edit-bs-title {
  margin: 0;
  font-family: Unbounded, "Tilda Sans", Rubik, sans-serif;
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase;
}
.editor-bs-status {
  margin: 4px 0 0;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--pp-muted);
}
.pp-unlink-btn {
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid #e95b5b;
  background: rgba(233, 91, 91, 0.08);
  color: #e95b5b;
  font-weight: 800;
  cursor: pointer;
}
.pp-edit-section-title {
  margin: 8px 6px 8px;
  font-family: Unbounded, "Tilda Sans", Rubik, sans-serif;
  font-size: 0.9rem;
  font-weight: 800;
  text-transform: uppercase;
}
.pp-edit-hint {
  margin: 0 6px 12px;
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--pp-text);
}
.pp-edit-cta {
  width: calc(100% - 12px);
  margin: 0 6px;
  min-height: 52px;
  border-radius: 999px;
  border: 1px solid var(--pp-border);
  background: var(--pp-shell);
  color: var(--pp-text);
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: var(--pp-shadow);
}

body.profile-tab-active #panel-profile.active,
body.profile-edit-tab-active #panel-profile-edit.active {
  padding-top: 4px;
}
.pp-edit-page-leave {
  animation: pp-edit-page-leave 0.24s ease both;
}
@keyframes pp-edit-page-leave {
  to {
    opacity: 0;
    transform: translateY(12px);
  }
}
@media (prefers-reduced-motion: reduce) {
  .pp-edit-page-leave { animation: none !important; }
}

/* ── Figma sheets: Друзья / Рейтинг / Баланс ── */
.modal-sheet.pp-sheet.vml-flow-modal {
  --flow-bg: #1a1a1a;
  --flow-text: #fff;
  --flow-card: #131313;
  --flow-card-border: #404040;
  --flow-cta: #8ce95b;
  --flow-cta-text: #1a1a1a;
  --flow-muted: #404040;
  --flow-ghost-bg: #1a1a1a;
  --flow-ghost-border: #404040;
  --flow-ghost-text: #fff;
  --flow-option-active-bg: rgba(140, 233, 91, 0.05);
  --flow-option-active-border: #8ce95b;
}
body.theme-light .modal-sheet.pp-sheet.vml-flow-modal,
html[data-theme="light"] .modal-sheet.pp-sheet.vml-flow-modal {
  --flow-bg: #eff7ff;
  --flow-text: #000000;
  --flow-card: #dfedfb;
  --flow-card-border: #707f8e;
  --flow-cta: #3787ff;
  --flow-cta-text: #eff7ff;
  --flow-muted: #707f8e;
  --flow-ghost-bg: #eff7ff;
  --flow-ghost-border: #707f8e;
  --flow-ghost-text: #000000;
  --flow-option-active-bg: rgba(55, 135, 255, 0.25);
  --flow-option-active-border: #3787ff;
}
.modal-sheet.pp-sheet .modal-header h2.vml-flow-title {
  font-family: Unbounded, "Tilda Sans", Rubik, sans-serif;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: pre-line;
  line-height: 1.15;
}
.modal-sheet.pp-sheet .pp-sheet-section-title {
  margin: 16px 0 10px;
  font-family: Unbounded, "Tilda Sans", Rubik, sans-serif;
  font-size: 0.92rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--flow-text);
}
.modal-sheet.pp-sheet .pp-sheet-note {
  margin: 0;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid var(--flow-card-border);
  background: var(--flow-card);
  color: var(--flow-text);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.35;
}
.modal-sheet.pp-sheet .pp-sheet-empty,
.modal-sheet.pp-sheet .empty {
  color: var(--flow-muted);
  text-align: center;
  font-size: 0.95rem;
  font-weight: 600;
  margin: 18px 0;
}
.modal-sheet.pp-sheet .vml-flow-btn--ghost {
  border: 1px solid var(--flow-ghost-border);
  background: var(--flow-ghost-bg);
  color: var(--flow-ghost-text);
  box-shadow: none;
}

/* Friends */
.modal-sheet.friends-modal-sheet #modal-body {
  max-height: min(70vh, 560px);
  overflow: auto;
}
.modal-sheet.pp-sheet .friend-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin-bottom: 12px;
  padding: 6px;
  background: var(--flow-card);
  border: 1px solid var(--flow-card-border);
  border-radius: 18px;
}
.modal-sheet.pp-sheet .friend-tab {
  flex: none;
  min-height: 36px;
  padding: 8px 4px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--flow-text);
  font-size: 0.78rem;
  font-weight: 800;
}
.modal-sheet.pp-sheet .friend-tab.is-active {
  background: var(--flow-option-active-bg);
  border-color: var(--flow-option-active-border);
  color: var(--flow-text);
}
.modal-sheet.pp-sheet .friend-tab-dot {
  background: #e95b5b;
}
.modal-sheet.pp-sheet .friend-subtabs { gap: 8px; margin-bottom: 10px; }
.modal-sheet.pp-sheet .friend-subtab {
  border: 1px solid var(--flow-card-border);
  background: var(--flow-card);
  color: var(--flow-muted);
  border-radius: 999px;
}
.modal-sheet.pp-sheet .friend-subtab.is-active {
  border-color: var(--flow-cta);
  color: var(--flow-cta);
  background: var(--flow-option-active-bg);
}
.modal-sheet.pp-sheet .friend-list { gap: 8px; }
.modal-sheet.pp-sheet .team-members.friend-list { padding: 0; }
.modal-sheet.pp-sheet .friend-row {
  background: var(--flow-card);
  border: 1px solid var(--flow-card-border);
  border-radius: 18px;
  padding: 8px 10px;
  min-height: 64px;
}
.modal-sheet.pp-sheet .friend-row.friend-row--bg {
  background-color: var(--ink);
  background-image: var(--friend-bg);
  background-size: cover;
  background-position: center;
}
.modal-sheet.pp-sheet .friend-row.friend-row--default {
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(140, 233, 91, 0.28), transparent 60%),
    linear-gradient(180deg, #1b1c1f 0%, #121314 100%);
  border-color: transparent;
}
body.theme-light .modal-sheet.pp-sheet .friend-row.friend-row--default,
html[data-theme="light"] .modal-sheet.pp-sheet .friend-row.friend-row--default {
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(55, 135, 255, 0.38), transparent 58%),
    linear-gradient(180deg, #3a4a5c 0%, #2a3544 100%);
}
.modal-sheet.pp-sheet .friend-row-pill {
  background: color-mix(in srgb, var(--flow-bg) 78%, transparent);
  border-color: var(--flow-card-border);
  max-width: min(100%, 12.5rem);
}
.modal-sheet.pp-sheet .friend-row-name {
  color: var(--flow-text);
  font-weight: 800;
  font-size: 0.92rem;
}
.modal-sheet.pp-sheet .friend-row-meta {
  color: color-mix(in srgb, var(--flow-text) 88%, transparent);
  font-size: 0.78rem;
  font-weight: 600;
}
body.theme-light .modal-sheet.pp-sheet .friend-row-meta,
html[data-theme="light"] .modal-sheet.pp-sheet .friend-row-meta {
  color: color-mix(in srgb, var(--flow-text) 70%, transparent);
}
.modal-sheet.pp-sheet .friend-avatar {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  box-shadow: none;
}
.modal-sheet.pp-sheet .friend-row--bg .friend-avatar,
.modal-sheet.pp-sheet .friend-row--default .friend-avatar {
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.22);
}
.modal-sheet.pp-sheet .friend-icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid var(--flow-card-border);
  background: var(--flow-bg);
  color: var(--flow-muted);
  box-shadow: none;
}
.modal-sheet.pp-sheet .friend-fav-ico {
  width: 18px;
  height: 18px;
}
.modal-sheet.pp-sheet .friend-icon-btn.danger {
  border-color: #e95b5b;
  color: #e95b5b;
  background: rgba(233, 91, 91, 0.08);
}
.modal-sheet.pp-sheet .field-input {
  background: var(--flow-bg);
  border: 1px solid var(--flow-card-border);
  color: var(--flow-text);
  border-radius: 14px;
}
.modal-sheet.pp-sheet .action.btn-sm {
  background: var(--flow-cta);
  color: var(--flow-cta-text);
  border-color: var(--flow-cta);
}
.modal-sheet.pp-sheet .action.secondary.btn-sm {
  background: var(--flow-ghost-bg);
  color: var(--flow-ghost-text);
  border-color: var(--flow-ghost-border);
}

/* Rating */
.modal-sheet.rating-modal-sheet .rating-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 5px;
}
.modal-sheet.rating-modal-sheet .rating-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  height: 40px;
  min-height: 40px;
  max-height: 40px;
  box-sizing: border-box;
  overflow: hidden;
  padding: 6px 3px 5px;
  border-radius: 12px;
  border: 1px solid var(--flow-card-border);
  background: var(--flow-card);
}
.modal-sheet.rating-modal-sheet .rating-stat-val {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--flow-cta);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  text-align: center;
}
.modal-sheet.rating-modal-sheet .rating-stat-val small {
  font-size: 0.62em;
  font-weight: 700;
}
.modal-sheet.rating-modal-sheet .rating-stat-val--mode {
  font-size: 0.64rem;
  letter-spacing: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.modal-sheet.rating-modal-sheet .rating-stat-lbl {
  font-size: 0.58rem;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
  color: var(--flow-muted);
  text-align: center;
  line-height: 1.15;
}
.modal-sheet.rating-modal-sheet .rating-history-row {
  background: var(--flow-card);
  border: 1px solid var(--flow-card-border);
  border-radius: 18px;
  padding: 12px 14px;
}
.modal-sheet.rating-modal-sheet .rating-history-place {
  color: var(--flow-text);
  font-size: 0.95rem;
  font-weight: 800;
}
.modal-sheet.rating-modal-sheet .rating-history-date,
.modal-sheet.rating-modal-sheet .rating-history-old {
  color: var(--flow-muted);
  font-size: 0.82rem;
  font-weight: 600;
}
.modal-sheet.rating-modal-sheet .rating-delta.positive { color: var(--flow-cta); }
.modal-sheet.rating-modal-sheet .rating-delta.negative { color: #e95b5b; }

.modal-sheet.rating-modal-sheet #modal-body {
  position: relative;
  /* Шторка «История матчей» иначе не влезает: отдаём модалке максимум высоты */
  max-height: min(76vh, calc(var(--app-vh, 100dvh) * 0.76));
  overflow: auto;
}
.modal-overlay.vml-flow-bottom .modal-sheet.rating-modal-sheet {
  max-height: min(96vh, calc(var(--app-vh, 100dvh) * 0.96));
  padding-top: 14px;
}
.modal-sheet.rating-modal-sheet .modal-header { margin-bottom: 10px; }
.modal-sheet.rating-modal-sheet .modal-body { margin-bottom: 10px; }
.vml-skel-fade {
  position: absolute;
  inset: 0;
  z-index: 5;
  overflow: hidden;
  background: var(--flow-bg);
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.32s ease;
}
.vml-skel-fade.is-off { opacity: 0; }

.rating-chart {
  position: relative;
  margin: 12px 0 4px;
  border: 1px solid var(--flow-card-border);
  border-radius: 18px;
  background: var(--flow-card);
  overflow: visible;
}
.rating-chart-ranges {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0;
  margin: 10px 10px 0;
  padding: 4px;
  border: 1px solid var(--flow-card-border);
  border-radius: 14px;
  background: var(--flow-bg);
}
.rating-chart-range {
  appearance: none;
  -webkit-appearance: none;
  min-height: 32px;
  padding: 6px 4px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--flow-muted);
  font-family: "Tilda Sans", Rubik, sans-serif;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  cursor: pointer;
  box-shadow: none;
}
.rating-chart-range.is-active {
  background: var(--flow-option-active-bg);
  border-color: var(--flow-option-active-border);
  color: var(--flow-text);
}
.rating-chart-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px 0;
  min-height: 28px;
}
.rating-chart-now-wrap {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}
.rating-chart-now {
  font-family: Unbounded, "Tilda Sans", Rubik, sans-serif;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--flow-text);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.rating-chart-unit {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--flow-muted);
}
.rating-chart-plot {
  position: relative;
  height: 210px;
  min-height: 210px;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  cursor: crosshair;
}
.rating-chart-plot.is-scrubbing { cursor: grabbing; }
.rating-chart-svg {
  display: block;
  width: 100%;
  height: 210px;
}
.rating-chart-gridline {
  stroke: var(--flow-card-border);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}
.rating-chart-axis {
  fill: var(--flow-muted);
  font-family: "Tilda Sans", Rubik, sans-serif;
  font-size: 8px;
  font-weight: 700;
}
.rating-chart-axis-y { text-anchor: end; }
.rating-chart-axis-x { text-anchor: middle; }
.rating-chart-line {
  fill: none;
  stroke: var(--flow-cta);
  stroke-width: 2.4;
  stroke-linejoin: round;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}
.rating-chart-fill {
  fill: var(--flow-cta);
  opacity: 0.14;
}
.rating-chart-dot {
  fill: var(--flow-cta);
  stroke: var(--flow-card);
  stroke-width: 2;
}
.rating-chart-dot.is-now {
  stroke: var(--flow-text);
  stroke-width: 1.6;
}
.rating-chart-cross,
.rating-chart-cursor {
  opacity: 0;
  pointer-events: none;
}
.rating-chart-cross.is-on,
.rating-chart-cursor.is-on { opacity: 1; }
.rating-chart-cross {
  stroke: var(--flow-cta);
  stroke-width: 1.2;
  stroke-dasharray: 3 3;
  vector-effect: non-scaling-stroke;
}
.rating-chart-cursor {
  fill: var(--flow-cta);
  stroke: var(--flow-text);
  stroke-width: 1.6;
}
.rating-chart-tip {
  position: absolute;
  z-index: 3;
  min-width: 112px;
  max-width: calc(100% - 16px);
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid var(--flow-card-border);
  background: var(--flow-bg);
  box-shadow: var(--shadow-sm);
  pointer-events: none;
  transform: translate(-50%, calc(-100% - 8px));
}
.rating-chart-tip[hidden] { display: none !important; }
.rating-chart-tip-elo {
  display: block;
  font-family: Unbounded, "Tilda Sans", Rubik, sans-serif;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--flow-cta);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.rating-chart-tip-meta {
  display: block;
  margin-top: 3px;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--flow-muted);
  line-height: 1.3;
}
.rating-chart-range:disabled {
  cursor: default;
  opacity: 1;
}
.rating-chart-empty-wrap {
  position: absolute;
  left: 11.11%;
  right: 3.33%;
  top: 5.71%;
  bottom: 13.33%;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.rating-chart-empty {
  margin: 0;
  padding: 8px 12px;
  text-align: center;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--flow-muted);
  line-height: 1.35;
  border-radius: 12px;
  background: color-mix(in srgb, var(--flow-card) 88%, transparent);
}
.rating-chart-plot--empty {
  cursor: default;
}
.rating-chart-plot--empty .rating-chart-svg {
  opacity: 0.85;
}
.modal-sheet.rating-modal-sheet .rating-stat--skel {
  min-height: 40px;
  height: 40px;
  max-height: 40px;
  gap: 2px;
}
.modal-sheet.rating-modal-sheet .rating-skel {
  display: block;
  border-radius: 8px;
  background: linear-gradient(
    90deg,
    color-mix(in srgb, var(--flow-text) 6%, var(--flow-card)) 25%,
    color-mix(in srgb, var(--flow-text) 12%, var(--flow-card)) 50%,
    color-mix(in srgb, var(--flow-text) 6%, var(--flow-card)) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.2s infinite;
}
.modal-sheet.rating-modal-sheet .rating-skel--val {
  width: 2.2em;
  height: 0.88rem;
  flex-shrink: 0;
}
.modal-sheet.rating-modal-sheet .rating-skel--lbl {
  width: 3.2em;
  height: 0.58rem;
  flex-shrink: 0;
}
.modal-sheet.rating-modal-sheet .rating-skel--now {
  display: inline-block;
  width: 3.2em;
  height: 1.25rem;
  vertical-align: bottom;
  border-radius: 8px;
}
.modal-sheet.rating-modal-sheet .rating-skel--plot-overlay {
  position: absolute;
  left: 44px;
  right: 16px;
  top: 16px;
  bottom: 32px;
  border-radius: 12px;
  pointer-events: none;
  opacity: 0.72;
}
.modal-sheet.rating-modal-sheet .rating-acc-skel {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 4px 0 8px;
}
.modal-sheet.rating-modal-sheet .rating-skel--row {
  height: 44px;
  border-radius: 12px;
}

.vml-xfade {
  position: relative;
}
.vml-xfade-out {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  z-index: 2;
  opacity: 1;
  pointer-events: none;
  transition: opacity 0.34s ease;
}
.vml-xfade-in {
  position: relative;
  z-index: 1;
  opacity: 0;
  transition: opacity 0.34s ease;
}
.vml-xfade.is-xfade .vml-xfade-out { opacity: 0; }
.vml-xfade.is-xfade .vml-xfade-in { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .vml-xfade-out,
  .vml-xfade-in { transition: none; }
  .vml-xfade.is-xfade .vml-xfade-in { opacity: 1; }
  .vml-xfade.is-xfade .vml-xfade-out { opacity: 0; }
}

.rating-acc-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}
.modal-sheet.rating-modal-sheet .rating-acc-title,
.rating-acc-title {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rating-acc {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 52px;
  padding: 12px 16px;
  border: 1px solid var(--flow-card-border);
  border-radius: 18px;
  background: var(--flow-card);
  color: var(--flow-text);
  font-family: Unbounded, "Tilda Sans", Rubik, sans-serif;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-align: left;
  cursor: pointer;
  box-shadow: none;
}
.rating-acc[data-open="1"] {
  background: var(--flow-option-active-bg);
  border-color: var(--flow-option-active-border);
}
.rating-acc-chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  color: var(--flow-muted);
  transition: transform 0.28s ease;
}
.rating-acc-chevron .ico-svg { width: 22px; height: 22px; }
.rating-acc[data-open="1"] .rating-acc-chevron { transform: rotate(180deg); color: var(--flow-cta); }
.rating-acc[data-open-leaderboard] .rating-acc-chevron { transform: rotate(-90deg); }
.rating-acc-body {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  margin-top: 0;
  overflow: hidden;
  transition: none;
  pointer-events: none;
}
.rating-acc-body.is-open {
  grid-template-rows: 1fr;
  opacity: 1;
  margin-top: 8px;
  pointer-events: auto;
}
.rating-acc-body.is-ready {
  transition: grid-template-rows 0.32s ease, opacity 0.22s ease, margin 0.32s ease;
}
.rating-acc-inner {
  min-height: 0;
  overflow: hidden;
  padding: 0 2px 4px;
}
.modal-sheet.rating-modal-sheet .history-card {
  background: var(--flow-card);
  border-color: var(--flow-card-border);
}
.modal-sheet.rating-modal-sheet .history-card-title,
.modal-sheet.rating-modal-sheet .history-card-title-row {
  color: var(--flow-text);
}

/* Wallet / Balance */
.modal-sheet.wallet-modal.pp-sheet .wallet-scope-tabs {
  background: var(--flow-card);
  border: 1px solid var(--flow-card-border);
  border-radius: 18px;
  padding: 6px;
  gap: 0;
  overflow: hidden;
}
.modal-sheet.wallet-modal.pp-sheet .wallet-scope-tab {
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: var(--flow-text);
  font-weight: 800;
  min-height: 36px;
}
.modal-sheet.wallet-modal.pp-sheet .wallet-scope-tab.is-active {
  background: var(--flow-option-active-bg);
  border-color: var(--flow-option-active-border);
  color: var(--flow-text);
}
.modal-sheet.wallet-modal.pp-sheet .wallet-scope-amount {
  color: var(--flow-text);
  font-size: 1.35rem;
  font-weight: 800;
  text-align: center;
}
.modal-sheet.wallet-modal.pp-sheet .wallet-scope-help {
  margin: 0;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid var(--flow-card-border);
  background: var(--flow-card);
  color: var(--flow-text);
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.35;
  opacity: 0.9;
}
.modal-sheet.wallet-modal.pp-sheet .deposit-history-row {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 10px 0;
}
.modal-sheet.wallet-modal.pp-sheet .deposit-history-amount {
  font-weight: 800;
  font-size: 1rem;
}
.modal-sheet.wallet-modal.pp-sheet .deposit-history-row.in .deposit-history-amount { color: var(--flow-cta); }
.modal-sheet.wallet-modal.pp-sheet .deposit-history-row.out .deposit-history-amount { color: #e95b5b; }
.modal-sheet.wallet-modal.pp-sheet .deposit-history-provider,
.modal-sheet.wallet-modal.pp-sheet .deposit-history-date {
  color: var(--flow-muted);
  font-size: 0.78rem;
}
.modal-sheet.wallet-modal.pp-sheet .deposit-history-status {
  color: #fff;
  font-weight: 700;
}

/* ── Cosmetics media + skeletons ── */
.pp-media {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: inherit;
}
.pp-media-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.pp-edit-preview > .pp-media-bg.is-loading {
  z-index: 1;
}
.pp-media-av {
  position: absolute;
  inset: 0;
  border-radius: inherit;
}
.pp-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 1;
  transition: opacity 0.28s ease;
}
.pp-media.is-loading img { opacity: 0; }
#panel-profile-edit .pp-media img {
  transition-delay: var(--pp-cascade-ms, 0ms);
}
@media (prefers-reduced-motion: reduce) {
  #panel-profile-edit .pp-media img {
    transition: none;
    transition-delay: 0ms;
  }
}
.pp-media .pp-skel {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(110deg, rgba(255,255,255,0.08) 8%, rgba(255,255,255,0.22) 18%, rgba(255,255,255,0.08) 33%);
  background-size: 200% 100%;
  animation: pp-skel-shine 1.15s ease-in-out infinite;
  pointer-events: none;
}
body.theme-light .pp-media .pp-skel,
html[data-theme="light"] .pp-media .pp-skel {
  background: linear-gradient(110deg, rgba(55,135,255,0.08) 8%, rgba(55,135,255,0.2) 18%, rgba(55,135,255,0.08) 33%);
  background-size: 200% 100%;
}
.pp-media:not(.is-loading) .pp-skel { display: none; }
@keyframes pp-skel-shine {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

.pp-surface--img {
  background-image: none !important;
  background-color: #1a1a1a;
}
body.theme-light .pp-surface--img,
html[data-theme="light"] .pp-surface--img {
  background-color: #cfdceb;
}
.pp-avatar.pp-avatar--img {
  background-image: none !important;
  background-color: rgba(255,255,255,0.12);
  overflow: hidden;
}
body.theme-light .pp-edit-preview .pp-avatar.pp-avatar--img,
html[data-theme="light"] .pp-edit-preview .pp-avatar.pp-avatar--img {
  background-color: rgba(0, 0, 0, 0.08);
}

.pp-edit-row-thumb {
  position: relative;
  overflow: hidden;
}
.pp-edit-row-thumb .pp-media {
  border-radius: inherit;
}

.preset-chip-preview .pp-media,
.preset-chip-avatar .pp-media {
  width: 100%;
  height: 100%;
  border-radius: inherit;
}
.preset-chip-preview--img,
.preset-chip-avatar--img {
  background: rgba(255,255,255,0.06);
}

.preset-grid--modal {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  max-height: min(42vh, 320px);
  overflow: auto;
  padding: 2px;
  -webkit-overflow-scrolling: touch;
}
.preset-grid--modal.preset-grid--game {
  grid-template-columns: 1fr 1fr 1fr;
  max-height: min(48vh, 380px);
}
.preset-chip-preview--game {
  height: 96px;
  border-radius: 12px;
}
.preset-chip-preview--default {
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(140, 233, 91, 0.28), transparent 60%),
    linear-gradient(180deg, #1b1c1f, #121314);
}
body.theme-light .preset-chip-preview--default,
html[data-theme="light"] .preset-chip-preview--default {
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(55, 135, 255, 0.28), transparent 60%),
    linear-gradient(180deg, #e8f1fb, #d4e3f4);
}
.preset-chip-preview--hero-default {
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(140, 233, 91, 0.28), transparent 60%),
    linear-gradient(180deg, #1b1c1f, #121314);
}
body.theme-light .preset-chip-preview--hero-default,
html[data-theme="light"] .preset-chip-preview--hero-default {
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(55, 135, 255, 0.38), transparent 58%),
    linear-gradient(180deg, #3a4a5c 0%, #2a3544 100%);
}
.modal-sheet.pp-edit-modal-sheet #modal-body {
  padding-bottom: 4px;
}
.modal-sheet.pp-edit-modal-sheet .preset-chip {
  box-shadow: none;
}
.modal-sheet.pp-edit-modal-sheet .preset-chip.active {
  box-shadow: none;
  border-color: var(--flow-label-accent);
}

.pp-public .pp-hero {
  margin-bottom: 12px;
  background-image: none;
  background-color: #2a2a2a;
}
.pp-public .pp-hero.pp-hero--default {
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(140, 233, 91, 0.28), transparent 60%),
    linear-gradient(180deg, #1b1c1f 0%, #121314 100%);
}
.pp-public .pp-avatar {
  background-image: none;
  background-color: rgba(255, 255, 255, 0.12);
}
body.theme-light .pp-public .pp-hero,
html[data-theme="light"] .pp-public .pp-hero {
  background-color: #d7e4f2;
}
body.theme-light .pp-public .pp-hero.pp-hero--default,
html[data-theme="light"] .pp-public .pp-hero.pp-hero--default {
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(55, 135, 255, 0.38), transparent 58%),
    linear-gradient(180deg, #3a4a5c 0%, #2a3544 100%);
}
body.theme-light .pp-public .pp-avatar,
html[data-theme="light"] .pp-public .pp-avatar {
  background-color: rgba(0, 0, 0, 0.08);
}
.pp-public .pp-game {
  margin: 0;
}

.pp-skel {
  display: block;
  position: static;
  inset: auto;
  border-radius: 10px;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.12) 25%,
    rgba(255, 255, 255, 0.24) 50%,
    rgba(255, 255, 255, 0.12) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.2s infinite;
  pointer-events: none;
}
.pp-skel--hero-av {
  background-image:
    linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.16) 25%,
      rgba(255, 255, 255, 0.28) 50%,
      rgba(255, 255, 255, 0.16) 75%
    );
  background-size: 200% 100%;
  box-shadow: none;
}
.pp-skel--uid {
  width: 3.4em;
  height: 0.85rem;
  display: inline-block;
}
.pp-skel--nick {
  width: 8.5em;
  height: 1.05rem;
  margin: 0 auto;
}
.pp-skel--num {
  display: inline-block;
  width: 2.2em;
  height: 0.85em;
  vertical-align: -0.12em;
  border-radius: 6px;
}
.pp-skel--chip {
  width: 5.2em;
  height: 0.82rem;
}
.pp-skel--chev {
  position: absolute;
  right: 8px;
  top: 50%;
  width: 14px;
  height: 14px;
  margin-top: -7px;
  border-radius: 4px;
  opacity: 0.5;
}
.pp-skel--social {
  width: 100%;
  height: 22px;
}
.bs-account-avatar-wrap .pp-skel--bs-avatar,
.pp-record-icon .pp-skel--record-ico,
.pp-brawler-icon .pp-skel--brawler-ico {
  width: 100%;
  height: 100%;
  display: block;
}
.pp-bs-media-hold .bs-account-avatar-wrap,
.pp-bs-media-hold .pp-record-icon,
.pp-bs-media-hold .pp-brawler-icon {
  position: relative;
}
.pp-bs-media-hold .pp-skel--bs-avatar,
.pp-bs-media-hold .pp-skel--record-ico,
.pp-bs-media-hold .pp-skel--brawler-ico {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: auto;
  height: auto;
  margin: 0;
}
.pp-bs-media-hold .bs-profile-icon,
.pp-bs-media-hold .pp-record-icon img,
.pp-bs-media-hold .pp-brawler-icon img {
  opacity: 0 !important;
  transition: none !important;
}
.pp-bs-card.pp-bs-media-ready .bs-profile-icon,
.pp-bs-card.pp-bs-media-ready .pp-record-icon img,
.pp-bs-card.pp-bs-media-ready .pp-brawler-icon img,
.pp-bs-card.pp-bs-media-ready img.pp-img-in {
  opacity: 1;
  transition: none;
}
.pp-bs-card.pp-bs-media-ready .bs-profile-icon.broken {
  opacity: 0.35;
}
.pp-game-body.pp-bs-stats-pack-hold > .pp-media-bg img {
  opacity: 0 !important;
  transition: none !important;
}
.pp-game-body.pp-bs-stats-pack-ready > .pp-media-bg img {
  opacity: 1;
  transition: none;
}
@media (prefers-reduced-motion: reduce) {
  .pp-bs-media-hold .bs-profile-icon,
  .pp-bs-media-hold .pp-record-icon img,
  .pp-bs-media-hold .pp-brawler-icon img,
  .pp-game-body.pp-bs-stats-pack-hold > .pp-media-bg img {
    opacity: 0 !important;
    transition: none !important;
  }
}
.pp-skel--bs-name {
  width: 7.2em;
  height: 1.05rem;
}
.pp-skel--bs-tag {
  width: 5.4em;
  height: 0.9rem;
  margin-top: 8px;
}
.pp-bs-skel .pp-bs-name .pp-skel--bs-name,
.pp-bs-skel .pp-bs-tag .pp-skel--bs-tag {
  display: inline-block;
  margin-top: 0;
  vertical-align: middle;
}
.pp-skel-record {
  display: flex;
  align-items: center;
  gap: 10px;
}
.pp-skel--record-ico {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  flex-shrink: 0;
}
.pp-skel--record-name {
  flex: 1;
  height: 0.9rem;
}
.pp-skel--record-val {
  width: 3.2em;
  height: 1.05rem;
  flex-shrink: 0;
}
.pp-skel--stat-ico {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  margin: 0 auto;
}
.pp-skel--stat-lbl {
  width: 5.6em;
  height: 0.72rem;
  margin: 4px auto 0;
}
.pp-skel--stat-val {
  width: 2.8em;
  height: 0.95rem;
  margin: 2px auto 0;
}
.pp-bs-skel .pp-stat .pp-skel--stat-val {
  display: inline-block;
  margin: 0;
}
.pp-bs-skel .pp-record-val .pp-skel--record-val {
  display: inline-block;
  vertical-align: middle;
  width: 2.6em;
  height: 0.95rem;
}
.pp-bs-skel .pp-skel--record-name {
  flex: none;
  width: 5.5em;
  margin: 0 0 4px;
}
.pp-skel--club-name {
  width: 6em;
  height: 0.85rem;
  margin-left: auto;
}
.pp-bs-skel .pp-club-name .pp-skel--club-name {
  display: inline-block;
  margin-left: 0;
  vertical-align: middle;
}
.pp-skel--club-ico {
  width: 26px;
  height: 22px;
  border-radius: 6px;
  flex-shrink: 0;
}
.pp-skel--club-lbl {
  width: 2.8em;
  height: 0.85rem;
}
.pp-skel--top-title {
  width: 6.4em;
  height: 0.9rem;
  margin: 0 auto 12px;
}
.pp-skel--brawler-ico {
  width: 44px;
  height: 44px;
  border-radius: 12px;
}
.pp-skel--brawler-name {
  width: 3.6em;
  height: 0.7rem;
}
.pp-skel--brawler-val {
  width: 2.6em;
  height: 0.7rem;
}
.pp-bs-skel .pp-bs-meta {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}
.pp-bs-skel .pp-brawler-col {
  align-items: center;
}
.pp-page--skel:not(.pp-page--has-cos) .pp-hero {
  background: #2a2a2a !important;
  background-image: none !important;
}
.pp-page--skel:not(.pp-page--has-cos) .pp-hero::after {
  background: rgba(0, 0, 0, 0.12);
}
.pp-page--skel:not(.pp-page--has-cos) .pp-avatar {
  background: rgba(255, 255, 255, 0.12) !important;
  background-image: none !important;
  box-shadow: none;
}
body.theme-light .pp-page--skel:not(.pp-page--has-cos) .pp-hero,
html[data-theme="light"] .pp-page--skel:not(.pp-page--has-cos) .pp-hero {
  background: #d7e4f2 !important;
  background-image: none !important;
}
body.theme-light .pp-page--skel:not(.pp-page--has-cos) .pp-avatar,
html[data-theme="light"] .pp-page--skel:not(.pp-page--has-cos) .pp-avatar {
  background: rgba(0, 0, 0, 0.08) !important;
  background-image: none !important;
}
.pp-nick {
  text-shadow: none;
}
.pp-hero,
.pp-edit-preview,
.pp-avatar {
  box-shadow: none;
}
.friend-avatar {
  position: relative;
  overflow: hidden;
}
.friend-avatar--img {
  background: rgba(255,255,255,0.08) !important;
}
