* {
  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;
  --r: 14px;
  --r-sm: 10px;
}

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

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  min-height: 100%;
  overflow: hidden;
  background: var(--ink);
}
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;
}

/* ── Фон: паттерн-полотно + партикли ── */
.bg-scene {
  position: fixed;
  inset: 0;
  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-loading:not(.boot-bg-zoom) .bg-pattern__texture {
  filter: none;
  opacity: 0.84;
}
html[data-theme="light"] body.boot-loading:not(.boot-bg-zoom) .bg-pattern__texture,
body.theme-light.boot-loading:not(.boot-bg-zoom) .bg-pattern__texture {
  filter: saturate(0.86) brightness(0.93);
  opacity: 0.84;
}
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;
}
body.boot-bg-zoom .bg-particles {
  opacity: 1;
  transition: none !important;
}
body.boot-loading .bg-pattern__sweep::before {
  animation-play-state: paused;
  opacity: 0;
}
body.boot-bg-zoom .bg-pattern__sweep::before {
  opacity: 1;
  animation-play-state: running;
  transition: none !important;
}
.bg-pattern__sweep {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.bg-pattern__sweep::before {
  content: "";
  position: absolute;
  top: -20%;
  left: 0;
  width: 82%;
  height: 140%;
  background: linear-gradient(
    100deg,
    transparent 0%,
    rgba(255,255,255,0.03) 34%,
    rgba(255,255,255,0.11) 50%,
    rgba(255,255,255,0.03) 66%,
    transparent 100%
  );
  transform: translateX(-160%) skewX(-12deg);
  animation: bg-pattern-beam 12s ease-in-out infinite;
  will-change: transform;
}
@keyframes bg-pattern-beam {
  0%   { transform: translateX(-160%) skewX(-12deg); }
  55%  { transform: translateX(340%) skewX(-12deg); }
  100% { transform: translateX(340%) skewX(-12deg); }
}
body.theme-light .bg-pattern__sweep::before,
html[data-theme="light"] .bg-pattern__sweep::before {
  background: linear-gradient(
    100deg,
    transparent 0%,
    rgba(255,255,255,0.03) 34%,
    rgba(255,255,255,0.09) 50%,
    rgba(255,255,255,0.03) 66%,
    transparent 100%
  );
}
.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-loading:not(.boot-bg-zoom) .bg-pattern__shade {
  opacity: 0.42;
}
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%);
}
html[data-theme="light"] body.boot-loading:not(.boot-bg-zoom) .bg-pattern__shade {
  opacity: 0.5;
}
/* Партикли */
.bg-particles {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  transform: translateZ(0);
}

/* ── Стеклянные поверхности — граффити просвечивает сквозь ── */
/* 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);
}

/* ── Корневой контейнер: на весь viewport Telegram ── */
.app-root {
  position: fixed;
  inset: 0;
  width: 100%;
  z-index: 1;
  display: flex;
  flex-direction: column;
  padding-top: var(--tg-top);
  box-sizing: border-box;
  overflow: hidden;
  background: transparent;
}

#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: center;
  justify-content: center;
  gap: 14px;
  padding-top: var(--tg-top);
  padding-bottom: var(--tg-bottom);
  box-sizing: border-box;
  background: transparent;
}

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: center;
  justify-content: center;
  gap: 14px;
}

/* Шапка — обычная часть скролла, не закреплена */
.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);
}

/* Баланс — только на нужных экранах */
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);
}
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(4, 1fr); gap: 8px;
  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;
  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; }

.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: 4.08cqw;
  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 — якорь по центру миниатюры (showdown 71.46+11.2≈82.7; portrait 75+7.5=82.5) */
.t-card-map-pin {
  position: absolute; z-index: 5;
  left: 82.7%;
  top: 17.5%;
  right: auto;
  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: 5.1cqw; /* Figma r=52.55 / 1030 */
  overflow: hidden;
  border: 0;
  background: var(--card-accent);
  box-sizing: border-box;
  box-shadow: 0 0.5cqw 2cqw rgba(0,0,0,0.28);
}
.t-card-map-thumb img {
  position: absolute;
  left: 4.55%; top: 4.55%;
  width: 90.9%; height: 90.9%;
  object-fit: cover;
  border-radius: 3.6cqw;
  background: var(--card-accent);
  display: block;
}
/* Портретные карты (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;
  border-radius: 5.1cqw;
}
.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 ~10.5px → 6.8% / 4.55% от рамки 154×231 */
  left: 6.8%; top: 4.55%;
  width: 86.4%; height: 90.9%;
  border-radius: 3.6cqw;
  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.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); }

/* ── Кнопки ── */
/* Иерархия: 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: 2px 2px 0 var(--lime-lo);
  transition: transform 0.08s, box-shadow 0.08s;
}
button.action:active:not(:disabled) {
  transform: scale(0.98);
  box-shadow: none;
  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; }
.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-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-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 {
  position: fixed;
  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(--lime-hi); border: 1.5px solid var(--ink); display: none;
}
.nav-btn.active .dot { border-color: var(--lime); }
.nav-btn.has-alert .dot { display: block; }

/* ── 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; }

/* ── 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 {
  width: 216px;
  height: 76px;
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
}
#loader-lottie {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1080px;
  height: 2340px;
  transform: translate(-50%, -50%) scale(0.26);
  transform-origin: center center;
  pointer-events: none;
}
#loader-lottie svg {
  display: block;
  width: 100% !important;
  height: 100% !important;
}
.loader-bar { width: 90px; height: 3px; background: var(--stroke); border-radius: 99px; overflow: hidden; }
.loader-bar span { display: block; height: 100%; width: 35%; background: var(--lime); animation: loadSlide 1s ease-in-out infinite; }
@keyframes loadSlide { 0% { transform: translateX(-100%); } 100% { transform: translateX(400%); } }
.loader-text { font-size: 0.66rem; font-weight: 800; color: var(--muted); letter-spacing: 0.1em; text-transform: uppercase; margin: 0; }

/* ── Меню ── */
.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-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-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: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.verify-compare-icons .verify-icon-card { padding: 10px; }
.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);
}
.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: rgba(255,255,255,0.14);
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  cursor: default;
}
a.profile-social-chip {
  cursor: pointer;
}
a.profile-social-chip:hover {
  background: rgba(255,255,255,0.22);
}
.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;
}
.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;
}
.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-lock {
  display: flex;
  width: 22px;
  height: 22px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(0,0,0,0.55);
  color: #fff;
}
.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);
}
/* Полоса на превью главной: мягкое статичное свечение + бегущий блик (без мигания). */
.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: 1.85px solid #fff;
  /* чуть меньше 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;
  container-type: inline-size;
}
.bp-preview-card:active { transform: scale(0.99); }
/* Обёртка из JS должна заполнять карточку, иначе absolute-% схлопываются */
#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);
  filter: drop-shadow(0 10px 25px rgba(0, 0, 0, 0.15));
}
/* Title @ (290, 50) size 565×50 */
.bp-preview-title {
  position: absolute;
  left: 28.16%;
  top: 22.22%;
  z-index: 4;
  width: 54.85%;
  height: 22.22%;
  display: flex;
  align-items: center;
  font-family: "Unbounded", "Tilda Sans", sans-serif;
  font-size: clamp(0.95rem, 4.85cqw, 1.35rem);
  font-weight: 700;
  color: #fff;
  line-height: 1;
  text-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}
/* Track @ (290, 125) size 690×50 */
.bp-preview-track {
  position: absolute;
  left: 28.16%;
  top: 55.56%;
  z-index: 4;
  width: 67%;
  height: 22.22%;
  border-radius: 999px;
  background: var(--h-vml-track);
  overflow: hidden;
  display: flex;
  align-items: center;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}
.bp-preview-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #8ce95b, #62d43a);
}
.bp-preview-sub {
  position: relative;
  z-index: 1;
  padding-left: 3.6%;
  font-family: "Tilda Sans", sans-serif;
  font-size: clamp(0.7rem, 3.4cqw, 0.95rem);
  font-weight: 700;
  color: var(--h-vml-sub);
  line-height: 1;
  white-space: nowrap;
}
/* Стрелка — Figma 75×75 @ (905, 25), ассет с шевроном из макета */
.bp-preview-arrow {
  position: absolute;
  left: 87.86%;
  top: 11.11%;
  z-index: 5;
  width: 7.28%;
  aspect-ratio: 1;
  display: block;
  object-fit: contain;
  pointer-events: none;
  background: none;
  border: 0;
  box-shadow: none;
  filter: drop-shadow(0 10px 25px rgba(0, 0, 0, 0.15));
}
/* В тёмной теме инвертируем: белый круг → чёрный, шеврон → белый */
body:not(.theme-light) .bp-preview-arrow {
  filter: invert(1) drop-shadow(0 10px 25px rgba(0, 0, 0, 0.15));
}

/* ── Страница баттлпасса ── */
.panel-battlepass.active { display: block; padding: 8px 12px 24px; }
.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 { display: 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;
}

/* Светлая тема: контролы каталога адаптируем под светлый фон */
body.theme-light .catalog-cat-pill,
html[data-theme="light"] .catalog-cat-pill { background: #fff; color: #1a1f2b; border-color: #c8ced9; }
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-cat-pill.cat-3v3,
html[data-theme="light"] .catalog-cat-pill.cat-3v3 { color: #fff; }
body.theme-light .catalog-search,
html[data-theme="light"] .catalog-search { background: #fff; border-color: #c8ced9; }
body.theme-light .catalog-search input,
html[data-theme="light"] .catalog-search input { color: #1a1f2b; }
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: #fff; color: #4a5266; border-color: #c8ced9; }
body.theme-light .catalog-tool-btn.is-active,
html[data-theme="light"] .catalog-tool-btn.is-active { background: var(--lime); color: #fff; }

/* ── Главная (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; }

/* ── Первое появление главной после загрузки ── */
.home-enter-init {
  opacity: 0 !important;
  pointer-events: none;
}
@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: translateY(28px) scale(0.96); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes home-enter-block {
  0% { opacity: 0; transform: translateY(26px) scale(0.94); }
  68% { opacity: 1; transform: translateY(-3px) scale(1.01); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes home-enter-pass {
  0% { opacity: 0; transform: translateY(18px) scale(0.92); }
  62% { opacity: 1; transform: translateY(-4px) scale(1.02); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
.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 center;
  animation: home-enter-pass 0.58s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@media (prefers-reduced-motion: reduce) {
  .home-enter-init { opacity: 1 !important; 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;
}
.disc-hero:active { transform: scale(0.99); }
.disc-hero-clip {
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  overflow: hidden;
}
.disc-hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* Боковая виньетка из 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;
}
.disc-soon-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  background-color: var(--h-soon-fg);
  opacity: 0.18;
  -webkit-mask: url(/miniapp/assets/main/clock-tile.svg?v=2) 0 0 / 42px 42px repeat;
  mask: url(/miniapp/assets/main/clock-tile.svg?v=2) 0 0 / 42px 42px repeat;
  pointer-events: none;
}
body.theme-light .disc-soon-card::before { 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;
  background-color: var(--h-soon-fg);
  -webkit-mask: url(/miniapp/assets/main/icon-time.svg?v=2) center / contain no-repeat;
  mask: url(/miniapp/assets/main/icon-time.svg?v=2) center / contain no-repeat;
}
.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: flex-start;
}
.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;
  align-self: flex-start;
}
.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;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(0, 0, 0, 0.82) 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-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);
}
.news-item.compact .news-title { font-size: 0.8rem; margin-bottom: 3px; }
.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;
}
.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);
}

body.theme-light .news-item { background: #fff; }
body.theme-light .news-media-shade {
  background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, 0.55) 100%);
}

/* ── Кликабельные карточки ── */
.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;
}
.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);
}
.modal-overlay.hidden { display: none !important; }
.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));
}
.modal-sheet.wallet-modal .wallet-history-head {
  position: sticky;
  top: 0;
  z-index: 2;
  padding-bottom: 4px;
  background: linear-gradient(var(--surface) 70%, transparent);
}
.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 .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);
}

/* ── Поддержка ── */
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;
}
body.support-tab-active .support-card {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  margin-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;
}
#support-chat-view .support-chat {
  flex: 1 1 auto;
  min-height: 120px;
}
.support-new-attach-row {
  margin: 8px 0;
}
.support-intro {
  flex-shrink: 0;
  margin-bottom: 10px;
}
.support-chat {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  margin-bottom: 0;
  padding: 10px;
  background: var(--ink);
  border: 1px solid var(--stroke);
  border-radius: var(--r-sm);
}
.support-footer {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--stroke);
}
.support-compose {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.support-compose-row {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}
.support-compose-row textarea { flex: 1; min-width: 0; }
.support-attach-btn {
  flex: 0 0 auto;
  min-width: 56px;
  width: 56px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  border: 1px solid var(--stroke);
  background: var(--surface-up);
  cursor: pointer;
  color: var(--lime);
  transition: border-color 0.15s, background 0.15s;
}
.support-attach-btn:active {
  background: var(--ink);
}
.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-attach-preview {
  position: relative;
  flex-shrink: 0;
  max-height: min(132px, 22vh);
  overflow: hidden;
  padding: 8px;
  border-radius: var(--r-sm);
  border: 1px solid var(--stroke);
  background: var(--surface-up);
}
.support-attach-preview.hidden { display: none !important; }
.support-attach-preview .chat-media,
.support-attach-preview img,
.support-attach-preview video {
  display: block;
  max-height: 116px;
  max-width: 100%;
  width: auto;
  height: auto;
  margin: 0 auto;
  object-fit: contain;
  border-radius: 8px;
}
.support-attach-clear {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: none;
  background: rgba(0,0,0,0.65);
  color: #fff;
  cursor: pointer;
}
.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 { margin: 0; resize: none; }

.support-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.support-list-head .section-title { margin: 0; }
.support-appeals-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.support-appeal-item {
  width: 100%;
  text-align: left;
  border: 1px solid var(--stroke);
  background: var(--surface-up);
  border-radius: 12px;
  padding: 12px;
  color: inherit;
  cursor: pointer;
}
.support-appeal-item:active { background: var(--stroke); }
.support-appeal-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: flex-start;
  margin-bottom: 6px;
}
.support-appeal-title-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
}
.support-appeal-id {
  flex-shrink: 0;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--lime);
  font-variant-numeric: tabular-nums;
}
.support-appeal-head time {
  font-size: 0.72rem;
  opacity: 0.65;
  white-space: nowrap;
}
.support-status {
  display: inline-block;
  width: fit-content;
  max-width: 100%;
  margin-bottom: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.3;
}
.support-status-waiting {
  color: #ffb020;
  background: rgba(255, 176, 32, 0.12);
  border: 1px solid rgba(255, 176, 32, 0.25);
}
.support-status-answered {
  color: var(--lime);
  background: var(--lime-dim);
  border: 1px solid var(--lime-lo);
}
.support-status-closed {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid 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.85rem;
  opacity: 0.85;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.support-chat-head {
  margin: 8px 0 12px;
}
#support-chat-footer.hidden { display: none !important; }
.chat-bubble {
  max-width: 88%;
  padding: 8px 11px;
  border-radius: 12px;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 8px;
}
.chat-bubble.mod {
  background: var(--surface-up);
  color: var(--text-2);
  border: 1px solid var(--stroke);
}
.chat-bubble.user {
  margin-left: auto;
  background: var(--lime-dim);
  color: var(--lime);
  border: 1px solid var(--lime-lo);
}
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); }

/* ── Настройки ── */
.settings-list li.danger .menu-label { color: var(--err); }
.settings-list li.danger .menu-ico { color: var(--err); }
.setting-value {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
}
.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(--border);
  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(--border);
  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;
}

/* ── Светлая тема ──
   Мягкий сине-серый фон (не режущий белый) + тёмно-синие акценты вместо зелёных. */
/* Переменные светлой темы объявляем на :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: #e8ebf2;
  --surface-up: #dfe3ec;
  --stroke: #c8ced9;
  --stroke-lo: #d4d9e4;
  --text: #1a1f2b;
  --text-2: #525c6e;
  --muted: #727c8e;
  /* Акценты: тёмно-синий вместо лаймового */
  --lime: #2a4078;
  --lime-hi: #334d8f;
  --lime-lo: #7a8ab0;
  --lime-ink: #ffffff;
  --lime-dim: rgba(34,67,156,0.10);
  --lime-glow: rgba(34,67,156,0.14);
}
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(34,67,156,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(34,67,156,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%, #4d6cd6, var(--lime));
}
body.theme-light .bp-node-claimable .bp-node-dot {
  box-shadow: 0 0 12px rgba(34,67,156,0.6), inset 0 0 0 2px rgba(255,255,255,0.45);
}
body.theme-light .bp-node-claimable .bp-node-card { border-color: rgba(34,67,156,0.4); }
body.theme-light .mode-tile:active:not(.mode-tile-soon) { background: rgba(34,67,156,0.08); }
body.theme-light .preset-chip.active { box-shadow: 0 0 0 1px rgba(34,67,156,0.25); }
body.theme-light .t-card.hero-spotlight.mode-default {
  background-image: linear-gradient(160deg, rgba(34,67,156,0.06) 0%, var(--surface) 60%);
}

/* ── Каталог: панель фильтров/сортировки под светлую тему ── */
body.theme-light .catalog-sheet-panel {
  background: #ffffff;
  border-color: rgba(0,0,0,0.08);
  box-shadow: 0 18px 50px rgba(20,30,60,0.28);
}
body.theme-light .catalog-sheet-close {
  background: rgba(0,0,0,0.06);
  color: rgba(20,31,43,0.75);
}
body.theme-light .catalog-sheet-close:active { background: rgba(0,0,0,0.12); }
body.theme-light .catalog-filter-acc {
  color: var(--text);
  border-top-color: rgba(0,0,0,0.08);
}
body.theme-light .catalog-filter-acc-left { color: var(--text); }
body.theme-light .catalog-filter-acc-left .ico-svg { color: var(--lime); }
body.theme-light .catalog-acc-chevron .ico-svg { color: rgba(20,31,43,0.55); }
body.theme-light .catalog-mode-radio { color: var(--text); }
body.theme-light .catalog-mode-radio:active { background: rgba(0,0,0,0.04); }
body.theme-light .catalog-mode-radio-box { border-color: rgba(0,0,0,0.28); }
body.theme-light .catalog-mode-radio input:checked + .catalog-mode-radio-box {
  background: var(--lime); border-color: var(--lime);
  box-shadow: 0 0 0 4px rgba(163, 203, 56, 0.28);
}
body.theme-light .catalog-mode-radio-box::after { background: #ffffff; }
body.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(163, 203, 56, 0.5);
  }
  55% {
    transform: scale(1.14);
    box-shadow: 0 0 0 9px rgba(163, 203, 56, 0);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 4px rgba(163, 203, 56, 0.28);
  }
}
body.theme-light .catalog-filter-sub { color: var(--text); }
body.theme-light .catalog-day-range-bar { background: #dfe4ee; }
body.theme-light .catalog-day-btn { color: rgba(20,31,43,0.28); }
body.theme-light .catalog-day-btn.available,
body.theme-light .catalog-day-btn.in-range { color: var(--text); }
body.theme-light .catalog-day-btn.range-start,
body.theme-light .catalog-day-btn.range-end,
body.theme-light .catalog-day-btn.selected {
  background: var(--lime); color: #ffffff;
  box-shadow: 0 0 10px rgba(34,67,156,0.35);
}
body.theme-light .catalog-time-row label { color: var(--text); }
body.theme-light .catalog-time-row input[type="time"] {
  background: #eef1f6; border-color: rgba(0,0,0,0.08); color: var(--text);
}
body.theme-light .catalog-apply-btn {
  background: linear-gradient(180deg, var(--lime-hi) 0%, var(--lime) 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 6px 20px rgba(34,67,156,0.32);
}
body.theme-light .catalog-sort-opt { color: var(--text); }
body.theme-light .catalog-sort-radio { border-color: rgba(0,0,0,0.28); }
body.theme-light .catalog-sort-radio::after { background: #ffffff; }
body.theme-light .catalog-sort-opt input:checked + .catalog-sort-radio {
  background: var(--lime); border-color: var(--lime);
}

/* ── Анимации появления списков ── */
@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;
  }
}

/* ── Юридические документы ── */
.legal-doc {
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--text-2);
}
.legal-doc h4 {
  margin: 16px 0 6px;
  font-size: 0.86rem;
  font-weight: 800;
  color: var(--text);
}
.legal-doc p { margin: 0 0 8px; }
.legal-doc .legal-meta {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 14px;
}

/* ── Донат / магазин ── */
.donate-page {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding-bottom: 8px;
}
.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);
  }
}
.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) ── */
.home-mine-card .feed-head { margin: 0 0 4px; }
.home-mine-count {
  font-family: "Tilda Sans", sans-serif;
  font-size: 0.79rem;
  font-weight: 700;
  color: var(--h-muted);
}
.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;
}
#panel-home .news-feed-carousel .news-item.featured .news-body,
#panel-home .news-item.featured .news-body {
  padding: 6px 10px 11px !important;
  margin: 0 !important;
}
#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: 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);
}
#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;
}
#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;
}

