/* ==========================================================================
   Case Rush — графитовая тема с синим акцентом
   ========================================================================== */

:root {
    --bg: #15171c;
    --bg-2: #1c1f26;
    --card: #23262d;
    --card-2: #2b2f37;
    --card-3: #343842;
    --border: rgba(255, 255, 255, 0.06);
    --text: #ffffff;
    --muted: #8d919b;
    --dim: #5f636d;

    --blue: #3a86f7;
    --blue-2: #2c6fdc;
    --green: #34c759;
    --red: #ff4d4f;
    --orange: #ff8a1f;
    --gold: #f5c04a;
    --gold-chip: linear-gradient(135deg, #6f5a38 0%, #8c7350 100%);
    --cyan: #22d3ee;
    --violet: #8b5cf6;

    --r-common: #9ca3af;
    --r-rare: #3a86f7;
    --r-epic: #a855f7;
    --r-legendary: #f5a524;
    --r-mythic: #ff4d4f;

    --radius: 22px;
    --radius-sm: 16px;
    --top-safe: calc(var(--tg-safe-area-inset-top, 0px) + var(--tg-content-safe-area-inset-top, 0px));
    --bottom-safe: max(var(--tg-safe-area-inset-bottom, 0px), env(safe-area-inset-bottom, 0px));
    --top-h: 64px;
    --nav-h: 66px;
    --font: 'Montserrat', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
    margin: 0; padding: 0; background: var(--bg); color: var(--text);
    font-family: var(--font); font-size: 15px; font-weight: 500; line-height: 1.35;
    -webkit-font-smoothing: antialiased; overscroll-behavior: none; user-select: none; -webkit-user-select: none;
}
/* документ не скроллится — прокручивается только .view. Так страница «пружинит» вверх и вниз,
   а Telegram не сворачивает мини-приложение при свайпах и смене контента */
html, body { height: 100%; overflow: hidden; }
body { background: linear-gradient(180deg, #1b1e25 0%, #15171c 45%, #121318 100%); }
input, textarea, select { user-select: text; -webkit-user-select: text; font-family: inherit; }
img { -webkit-user-drag: none; user-select: none; }
button { font-family: inherit; }
.hidden { display: none !important; }

/* ------------------------------- иконки -------------------------------- */
.ic { width: 22px; height: 22px; flex: none; display: inline-block; vertical-align: middle; }
.ic.ic-xs { width: 14px; height: 14px; }
.ic-tile { width: 44px; height: 44px; border-radius: 14px; flex: none; display: inline-flex; align-items: center; justify-content: center; color: #fff; }
.ic-tile .ic { width: 23px; height: 23px; }
.ic-tile.sm { width: 34px; height: 34px; border-radius: 11px; }
.ic-tile.sm .ic { width: 19px; height: 19px; }
.t-violet { background: linear-gradient(135deg, #8b5cf6, #6d3fe0); }
.t-blue { background: linear-gradient(135deg, #4b93ff, #2c6fdc); }
.t-gold { background: linear-gradient(135deg, #f7cd5d, #e6a21f); color: #3b2800; }
.t-cyan { background: linear-gradient(135deg, #3fd6ee, #1d9fd8); }
.t-green { background: linear-gradient(135deg, #46d36b, #23a24a); }
.t-red { background: linear-gradient(135deg, #ff6a6a, #e0343a); }
.t-dark { background: var(--card-3); color: var(--muted); }
.star-ico { width: 16px; height: 16px; vertical-align: -3px; }
.ticket-ico { width: 16px; height: 16px; vertical-align: -3px; }

/* -------------------------------- шапка -------------------------------- */
.topbar { position: fixed; top: 0; left: 0; right: 0; z-index: 50; padding: var(--top-safe) 16px 0; height: calc(var(--top-h) + var(--top-safe)); display: flex; align-items: center; gap: 8px; background: linear-gradient(180deg, rgba(27, 30, 37, .98) 70%, rgba(27, 30, 37, 0)); }
.topbar-back { width: 42px; height: 42px; border-radius: 50%; border: 0; background: var(--card); color: var(--text); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.avatar { width: 44px; height: 44px; border-radius: 50%; flex: none; cursor: pointer; overflow: hidden; background: var(--card-2); }
.avatar img, .avatar span { width: 100%; height: 100%; object-fit: cover; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 17px; border-radius: 50%; }   /* скругляем саму картинку: у .has-dot overflow: visible */
.top-spacer { flex: 1; }
.pill { display: inline-flex; align-items: center; gap: 7px; height: 44px; padding: 0 16px 0 12px; border-radius: 22px; background: var(--card); font-weight: 700; font-size: 15px; cursor: pointer; transition: transform .15s; }
.pill:active { transform: scale(.95); }
.pill img { width: 22px; height: 22px; }
.top-deposit { height: 44px; padding: 0 18px 0 14px; border-radius: 22px; border: 0; background: var(--blue); color: #fff; font-weight: 700; font-size: 15px; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.top-deposit .ic { width: 21px; height: 21px; }
.top-deposit:active { transform: scale(.96); }
.bump { animation: bump .5s ease; }
@keyframes bump { 0% { transform: scale(1); } 40% { transform: scale(1.12); } 100% { transform: scale(1); } }

/* -------------------------------- экраны ------------------------------- */
/* снизу запас: под нижним меню и кнопкой «наверх» ничего не прячется */
.view { position: fixed; inset: 0; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; overscroll-behavior-y: auto; padding: calc(var(--top-h) + var(--top-safe) + 4px) 16px calc(var(--nav-h) + var(--bottom-safe) + 130px); }
.view > * { max-width: 100%; }
.view > .roulette { max-width: none; }   /* лента на всю ширину (margin 0 -16px); иначе справа обрезалась на 32px */
/* скроллбар скрыт (на ПК иначе справа появляется светлая полоса), прокрутка колесом/тачпадом работает */
.view, .sheet { scrollbar-width: none; }
.view::-webkit-scrollbar, .sheet::-webkit-scrollbar { display: none; }
html { color-scheme: dark; }
.view.enter { animation: viewIn .28s ease; }
/* «тихая» перерисовка того же экрана: карточки не «выезжают» заново, экран не моргает */
.view.quiet :is(.case-tile, .case-card, .prize, .task, .gw-card, .lb-row, .item, .mcard, .inv) { animation: none; }
@keyframes viewIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.h1 { font-weight: 800; font-size: 26px; margin: 8px 0 4px; letter-spacing: -.02em; }
.h1.center { text-align: center; font-size: 32px; }
.h2 { font-weight: 700; font-size: 18px; margin: 22px 0 10px; display: flex; align-items: center; gap: 10px; }
.h2 .count { color: var(--muted); font-size: 14px; font-weight: 600; }
.sec-head { display: flex; align-items: center; justify-content: space-between; margin: 24px 0 14px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.sec-head b { font-size: 19px; font-weight: 700; }
.sec-head button { border: 0; background: none; color: var(--dim); font-size: 14px; font-weight: 500; display: inline-flex; align-items: center; gap: 4px; cursor: pointer; font-family: inherit; }
.sec-head button .ic { width: 16px; height: 16px; transition: transform .2s; }
.sec-head.collapsed button .ic { transform: rotate(180deg); }
.overline { font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.sub { color: var(--muted); font-size: 13px; margin: 0 0 12px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.card { background: var(--card); border-radius: var(--radius); padding: 18px; }
.card.soft { background: var(--card-2); }
.row { display: flex; align-items: center; gap: 10px; }
.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gap-top { margin-top: 12px; }
.link-btn { border: 0; background: none; color: var(--muted); font-size: 14px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; display: block; margin: 16px auto 0; font-family: inherit; }

/* ------------------------------- кнопки -------------------------------- */
.btn { position: relative; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 8px 18px; border: 0; text-align: center; line-height: 1.15; border-radius: var(--radius-sm); color: #fff; font-weight: 700; font-size: 16px; cursor: pointer; background: var(--blue); transition: transform .12s ease, opacity .2s; }
.btn { white-space: normal; overflow-wrap: normal; word-break: keep-all; min-width: 0; }
/* точка «есть что забрать» */
.has-dot { position: relative; overflow: visible !important; }
.has-dot::after { content: ''; position: absolute; top: 6px; right: 8px; width: 10px; height: 10px; border-radius: 50%; background: var(--red); box-shadow: 0 0 8px rgba(255, 77, 79, .55); animation: dotPulse 1.6s ease-in-out infinite; z-index: 3; pointer-events: none; }
.nav a.has-dot::after { top: 8px; right: calc(50% - 20px); }
.avatar.has-dot::after { top: 0; right: 0; }
@keyframes dotPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.25); } }
#open-btn { white-space: nowrap; font-size: 16px; padding: 0 12px; }
#open-btn .pchip { white-space: nowrap; flex: none; }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .45; pointer-events: none; }
.btn.block { width: 100%; }
.btn.sm { min-height: 38px; padding: 6px 14px; font-size: 13.5px; border-radius: 12px; }
.btn.lg { min-height: 56px; font-size: 17px; border-radius: 18px; }
.btn.ghost { background: var(--card-3); }
.btn.dark { background: var(--card-2); }
.btn.gold { background: var(--gold-chip); color: #fff; }
.btn.green { background: var(--green); }
.btn.cyan { background: var(--blue); }
.btn.red { background: var(--red); }
.btn .ic { width: 20px; height: 20px; }
.btn.shine::after { content: ''; position: absolute; top: 0; bottom: 0; left: 0; width: 40%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .22), transparent); transform: translate3d(-120%, 0, 0) skewX(-20deg); will-change: transform; animation: shine 3.4s ease-in-out infinite; }
@keyframes shine { 0%, 60% { transform: translate3d(-120%, 0, 0) skewX(-20deg); } 100% { transform: translate3d(340%, 0, 0) skewX(-20deg); } }
.pchip { display: inline-flex; align-items: center; gap: 5px; height: 32px; padding: 0 12px 0 8px; border-radius: 11px; background: rgba(0, 0, 0, .28); color: #fff; font-weight: 700; }
.pchip img { width: 19px; height: 19px; }
.btn.sm .pchip { height: 26px; padding: 0 9px 0 6px; }
.btn.sm .pchip img { width: 15px; height: 15px; }
.spinner { width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid rgba(255, 255, 255, .3); border-top-color: #fff; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.badge { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 8px; font-size: 11px; font-weight: 700; letter-spacing: .02em; }
.badge.blue { background: var(--blue); color: #fff; }
.badge.orange { background: var(--orange); color: #fff; }
.badge.gold { background: #f8d77a; color: #4a3200; }
.badge.red { background: var(--red); color: #fff; }
.badge.soft { background: rgba(58, 134, 247, .18); color: #a9c8ff; }
.badge img { width: 13px; height: 13px; }
.rbadge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--red); color: #fff; font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }

.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; height: 44px; padding: 0 16px; border-radius: 14px; border: 0; background: var(--card-2); color: var(--text); font-weight: 600; font-size: 14px; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; }
.chip.active { background: var(--blue); }
.chip .ic { width: 17px; height: 17px; }
.chip img { width: 18px; height: 18px; border-radius: 50%; }
.chip .badge { height: 20px; background: #fff; color: var(--blue); }
.chip:not(.active) .badge { background: rgba(255, 255, 255, .9); color: var(--blue); }

.seg { display: flex; padding: 5px; gap: 5px; background: var(--card); border-radius: 22px; }
.seg button { flex: 1; height: 46px; border: 0; border-radius: 17px; background: transparent; color: var(--muted); font-weight: 600; font-size: 15px; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 6px; }
.seg button.active { background: var(--card-3); color: var(--text); }
.seg.blue button.active { background: var(--blue); }
.seg button img { width: 20px; height: 20px; border-radius: 50%; }

.input, .textarea, .select { width: 100%; min-height: 50px; padding: 0 16px; border-radius: var(--radius-sm); background: var(--card-2); border: 1px solid transparent; color: var(--text); font-size: 16px; font-weight: 600; outline: none; }
.textarea { padding: 12px 16px; min-height: 96px; resize: vertical; font-weight: 500; }
.textarea.mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; }
.input:focus, .textarea:focus, .select:focus { border-color: var(--blue); }
.input::-webkit-outer-spin-button, .input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.input[type=number] { appearance: textfield; -moz-appearance: textfield; }
.select { appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, #8d919b 50%), linear-gradient(135deg, #8d919b 50%, transparent 50%); background-position: calc(100% - 20px) 22px, calc(100% - 15px) 22px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
.label { font-size: 12px; color: var(--muted); font-weight: 600; margin: 12px 0 6px; display: block; }
.switch { width: 52px; height: 32px; border-radius: 16px; background: var(--card-3); position: relative; flex: none; transition: background .2s; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; transition: transform .2s; }
.switch.on { background: var(--blue); }
.switch.on::after { transform: translateX(20px); }

/* --------------------------- нижняя навигация -------------------------- */
.nav { position: fixed; left: 14px; right: 14px; bottom: calc(12px + var(--bottom-safe)); z-index: 60; height: calc(var(--nav-h) + 18px); display: flex; align-items: stretch; gap: 10px; pointer-events: none; }
.nav .nav-pill { pointer-events: auto; flex: 1; border-radius: 34px; display: flex; align-items: center; padding: 6px; gap: 2px; background: rgba(44, 47, 55, .94); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); box-shadow: 0 14px 36px -12px rgba(0, 0, 0, .8); }
.nav a { flex: 1; min-width: 0; height: 100%; border-radius: 28px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--text); font-size: 13px; white-space: nowrap; font-weight: 600; cursor: pointer; position: relative; transition: background .2s; }
.nav a .ic { width: 25px; height: 25px; opacity: .85; stroke-width: 1.4; }
.nav a.active { background: rgba(255, 255, 255, .1); }
.nav a .lbl { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis;
  font-size: clamp(11px, 3.35vw, 13px); letter-spacing: -.01em; }   /* «Tournament» на узких экранах — мельче, а не обрезка */
.nav a .rbadge { height: 18px; min-width: 18px; font-size: 10px; }

.to-top { position: fixed; left: 18px; bottom: calc(var(--nav-h) + var(--bottom-safe) + 40px); z-index: 55; width: 56px; height: 56px; border-radius: 50%; border: 0; background: rgba(52, 56, 66, .95); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 10px 24px -8px rgba(0, 0, 0, .8); opacity: 0; transform: translateY(10px); pointer-events: none; transition: opacity .2s, transform .2s; }
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
.to-top .ic { width: 24px; height: 24px; transform: rotate(90deg); }

/* ------------------------------ live-лента ----------------------------- */
.live { display: flex; align-items: center; gap: 12px; margin: 4px 0 16px; overflow: hidden; border-radius: 22px; background: var(--card); padding: 12px 0 12px 18px; }
.live-label { flex: none; display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--green); letter-spacing: .08em; }
.live-label i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); animation: blink 1.4s infinite; }
@keyframes blink { 50% { opacity: .35; } }
.live-track { display: flex; gap: 12px; overflow: hidden; }
.live-item { flex: none; width: 54px; height: 54px; display: flex; align-items: center; justify-content: center; animation: liveIn .5s ease; }
.live-item img { width: 50px; height: 50px; object-fit: contain; }
/* звезда и сумма — столбиком с отступом (не наезжают друг на друга) */
.live-item.stars { flex-direction: column; gap: 4px; }
.live-item.stars img { width: 34px; height: 34px; }
.live-item.stars span { padding: 1px 7px; border-radius: 8px; line-height: 15px;
  background: rgba(245, 192, 74, .2); color: #f5c04a; font-size: 11px; font-weight: 800; white-space: nowrap; }
@keyframes liveIn { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }

.r-common { --rc: var(--r-common); }
.r-rare { --rc: var(--r-rare); }
.r-epic { --rc: var(--r-epic); }
.r-legendary { --rc: var(--r-legendary); }
.r-mythic { --rc: var(--r-mythic); }

/* -------------------------------- баннер ------------------------------- */
.hero { position: relative; overflow: hidden; border-radius: 26px; padding: 22px 18px; margin-bottom: 6px; min-height: 150px; background: radial-gradient(120% 120% at 100% 0%, rgba(58, 134, 247, .55), transparent 60%), linear-gradient(135deg, #2a2f3a, #1c1f27); }
.hero h3 { margin: 0 0 6px; font-size: 22px; font-weight: 800; position: relative; z-index: 1; max-width: 62%; line-height: 1.15; }
.hero p { margin: 0 0 14px; color: rgba(255, 255, 255, .75); font-size: 13px; position: relative; z-index: 1; max-width: 58%; }
.hero .hero-img { position: absolute; right: 6px; bottom: 6px; width: 140px; z-index: 1; animation: float 3.2s ease-in-out infinite; filter: drop-shadow(0 12px 22px rgba(0, 0, 0, .5)); }
.hero .hero-art { position: absolute; right: 0; top: 50%; transform: translateY(-50%); width: 46%; z-index: 1; }
.hero .hero-art .case-art { background: none; }
.hero .btn { position: relative; z-index: 1; }

/* ---- разовые задания: иконка в карточке и окно с шагами ---- */
.task .tico.ot-ico { width: 44px; height: 44px; border-radius: 12px; object-fit: contain; }
.ot-modal { text-align: center; padding-top: 4px; }
.ot-big { width: 112px; height: 112px; display: block; margin: 0 auto 10px; filter: drop-shadow(0 12px 26px rgba(58, 134, 247, .35)); }
.ot-modal h3 { margin: 0 0 4px; font-size: 21px; font-weight: 800; }
.ot-modal > p { margin: 0 0 14px; font-size: 13px; }
.ot-modal .ot-rew { color: #f3d690; }
.ot-modal .ot-rew .star-ico, .ot-modal > p .star-ico, .ot-steps .star-ico, .task .td .star-ico { width: 14px; height: 14px; vertical-align: -2px; }
.ot-copy { margin-bottom: 12px; text-align: left; }
.ot-steps { border-radius: 18px; background: var(--card-2); overflow: hidden; text-align: left; margin-bottom: 16px; }
.ot-steps > div { display: flex; align-items: center; gap: 14px; padding: 14px 16px; font-size: 14px; line-height: 1.35; }
.ot-steps > div + div { border-top: 1px solid rgba(255, 255, 255, .06); }
.ot-steps b { flex: none; width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: rgba(58, 134, 247, .16); border: 1px solid rgba(58, 134, 247, .35); color: #7fb0ff; font-size: 14px; }
.ot-check { display: block; margin: 12px auto 0; color: #5aa0ff; font-weight: 700; }
.ot-check:disabled { opacity: .6; }
/* все разовые задания выполнены — блок плавно исчезает целиком (без «сжатия» карточек) */
#ot-list { transition: opacity .35s ease; }
#ot-list.fade-out { opacity: 0; pointer-events: none; }
/* все разовые задания выполнены */
.task.ot-done { display: flex; align-items: center; gap: 14px; animation: cardIn .3s ease backwards; }
.ot-done-ico { flex: none; width: 44px; height: 44px; border-radius: 14px; display: flex; align-items: center; justify-content: center;
  background: rgba(47, 191, 113, .16); color: var(--green); }
.ot-done-ico .ic { width: 24px; height: 24px; stroke-width: 2.6; }

/* ---- «Следующий бесплатный кейс через …» (кейс уже открыт): таймер + ссылка на турнир / розыгрыш ---- */
.nf-hero h3 { font-size: 16px; font-weight: 700; color: rgba(255, 255, 255, .8); margin-bottom: 2px; max-width: 64%; }
.nf-hero .hero-art { width: 40%; }
.nf-timer { position: relative; z-index: 1; font-size: 30px; font-weight: 800; letter-spacing: -.01em; margin-bottom: 14px; white-space: nowrap; }
.nf-link { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 8px; max-width: 66%; padding: 9px 12px; border: 0; border-radius: 14px; white-space: nowrap;
  background: rgba(255, 255, 255, .12); color: #fff; font: inherit; font-size: 12px; font-weight: 700; line-height: 1.3; text-align: left; cursor: pointer; }
.nf-link .ic { flex: none; width: 16px; height: 16px; }
.nf-link .ic:last-child { width: 14px; height: 14px; opacity: .7; }

/* ---- акция «Приведи друзей — кейс бесплатно»: баннер в ленте и окно ---- */
.rp-hero { position: relative; overflow: hidden; display: flex; align-items: center; gap: 8px; margin: 10px 0 6px; padding: 18px 16px; border-radius: 26px; cursor: pointer;
  background: radial-gradient(110% 120% at 100% 0%, rgba(155, 107, 242, .55), transparent 60%), radial-gradient(80% 90% at 0% 100%, rgba(245, 192, 74, .18), transparent 60%), linear-gradient(135deg, #2b2640, #1c1f27);
  animation: cardIn .35s ease backwards; }
.rp-hero.ready { background: radial-gradient(110% 120% at 100% 0%, rgba(47, 191, 113, .5), transparent 60%), linear-gradient(135deg, #1f3a2c, #1c1f27); }
.rp-text { flex: 1; min-width: 0; position: relative; z-index: 1; }
.rp-chip { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 10px; background: rgba(255, 255, 255, .12); font-size: 11px; font-weight: 700; letter-spacing: .02em; }
.rp-chip .ic { width: 13px; height: 13px; }
.rp-hero h3 { margin: 10px 0 12px; font-size: 18px; font-weight: 800; line-height: 1.2; }
.rp-hero h3 b { color: #f3d690; }
.rp-bar { height: 8px; border-radius: 6px; background: rgba(255, 255, 255, .12); overflow: hidden; }
.rp-bar i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, #9b6bf2, #f5c04a); transition: width .4s ease; }
.rp-bar.big { height: 10px; margin: 10px 0 8px; }
.rp-count { margin-top: 6px; font-size: 12px; font-weight: 700; color: rgba(255, 255, 255, .8); }
.rp-art { flex: none; width: 112px; position: relative; z-index: 1; }
.rp-art .case-art { background: none; }
.rp-new { width: max-content; margin: -6px auto 4px; padding: 5px 12px; border-radius: 12px; background: rgba(155, 107, 242, .2); color: #d5c0ff; font-size: 13px; font-weight: 700; }
.rp-modal-art { width: 170px; margin: 0 auto; }
.rp-modal-art .case-art { background: none; }
.rp-modal-title { text-align: center; margin: 4px 8px 6px; font-size: 20px; font-weight: 800; line-height: 1.25; }
.rp-modal-title b { color: #f3d690; }
.rp-sub { text-align: center; margin: 0 8px 14px; font-size: 14px; }
.rp-sub .star-ico { width: 15px; height: 15px; vertical-align: -2px; }
.rp-progress b.ok { color: var(--green); }
.rp-rule { display: flex; align-items: flex-start; gap: 10px; padding: 7px 0; font-size: 14px; line-height: 1.35; }
.rp-rule .ic { flex: none; width: 20px; height: 20px; padding: 3px; border-radius: 50%; background: rgba(47, 191, 113, .18); color: var(--green); stroke-width: 2.6; }

/* --------------------------- миниатюры кейсов -------------------------- */
.case-art { position: relative; width: 100%; aspect-ratio: 1 / .9; overflow: hidden; background: radial-gradient(75% 70% at 50% 55%, color-mix(in srgb, var(--frame) 30%, var(--art-bg)) 0%, var(--art-bg) 60%, #191b21 100%); }
.case-art .art-dots { position: absolute; inset: 0; opacity: .35; background-image: radial-gradient(color-mix(in srgb, var(--glow) 60%, transparent) 1px, transparent 1.6px); background-size: 14px 14px; -webkit-mask: radial-gradient(circle at 50% 55%, #000 0%, transparent 70%); mask: radial-gradient(circle at 50% 55%, #000 0%, transparent 70%); }
.case-art .art-halo { position: absolute; left: 50%; top: 52%; width: 70%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--glow) 55%, transparent), transparent 65%); filter: blur(6px); animation: halo 3.6s ease-in-out infinite; }
@keyframes halo { 0%, 100% { opacity: .65; transform: translate(-50%, -50%) scale(.95); } 50% { opacity: 1; transform: translate(-50%, -50%) scale(1.05); } }
.case-art .g { position: absolute; object-fit: contain; filter: drop-shadow(0 10px 12px rgba(0, 0, 0, .55)); }
.case-art .g1 { width: 56%; left: 22%; top: 16%; z-index: 3; animation: gFloat 3.4s ease-in-out infinite; }
.case-art .g2 { width: 36%; left: 2%; top: 38%; z-index: 2; rotate: -14deg; animation: gFloat 3.9s ease-in-out -1.3s infinite; }
.case-art .g3 { width: 36%; right: 2%; top: 34%; z-index: 2; rotate: 14deg; animation: gFloat 3.6s ease-in-out -2.2s infinite; }
@keyframes gFloat { 0%, 100% { translate: 0 0; } 50% { translate: 0 -8px; } }
.case-art .spark { position: absolute; width: 5px; height: 5px; border-radius: 50%; background: #fff; box-shadow: 0 0 10px var(--glow), 0 0 4px #fff; opacity: 0; animation: spark 2.8s ease-in-out infinite; z-index: 4; }
.case-art .s1 { left: 16%; top: 20%; } .case-art .s2 { right: 16%; top: 14%; animation-delay: .9s; } .case-art .s3 { left: 70%; top: 74%; animation-delay: 1.8s; }
@keyframes spark { 0%, 100% { opacity: 0; transform: scale(.3); } 50% { opacity: 1; transform: scale(1); } }
.case-art.mini { width: 62px; height: 62px; aspect-ratio: auto; border-radius: 16px; flex: none; }
.case-art.mini .spark, .case-art.mini .art-dots { display: none; }

/* ------------------------------ кейсы ---------------------------------- */
.case-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.case-tile { position: relative; overflow: hidden; border-radius: 24px; background: var(--card); border: 2px solid color-mix(in srgb, var(--frame) 75%, transparent); cursor: pointer; animation: cardIn .4s ease backwards; transition: transform .15s; }
.case-tile:active { transform: scale(.96); }
.case-tile.disabled { opacity: .55; }
.case-tile .ribbon { position: absolute; top: 10px; left: 10px; z-index: 5; }
.case-tile .ct-bottom { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 11px 10px 11px 12px; min-height: 60px; }
.case-tile .ct-name { flex: 1; font-weight: 700; font-size: 13px; line-height: 1.18; min-width: 0; overflow-wrap: normal; word-break: keep-all; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.case-tile .ct-price { flex: none; display: inline-flex; align-items: center; gap: 3px; height: 32px; padding: 0 9px 0 7px; border-radius: 11px; font-weight: 800; font-size: 13px; color: #fff; background: color-mix(in srgb, var(--frame) 85%, #000); }
.case-tile .ct-price img { width: 17px; height: 17px; }
.case-tile .ct-price.free { background: linear-gradient(135deg, #ffd25a, #f5a524); color: #3b2800; }
.case-tile .ct-price .ic { width: 16px; height: 16px; }
.case-card { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; cursor: pointer; padding: 4px 0 2px; animation: cardIn .4s ease backwards; transition: transform .15s; }
.case-card:active { transform: scale(.96); }
@keyframes cardIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.case-card .case-img-wrap { position: relative; width: 100%; aspect-ratio: 1.1; display: flex; align-items: center; justify-content: center; }
.case-card .case-img-wrap::before { content: ''; position: absolute; width: 70%; height: 55%; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, var(--rc) 55%, transparent), transparent); filter: blur(10px); opacity: .7; }
.case-card .case-img { position: relative; width: 82%; height: 82%; object-fit: contain; filter: drop-shadow(0 14px 18px rgba(0, 0, 0, .55)); animation: float 3.8s ease-in-out infinite; }
.case-card:nth-child(2n) .case-img { animation-delay: -1.3s; }
.case-card .case-name { font-weight: 700; font-size: 17px; margin: 6px 0 10px; max-width: 100%; }
.case-card .price { display: inline-flex; align-items: center; gap: 7px; height: 44px; padding: 0 20px 0 16px; border-radius: 16px; background: var(--card); font-weight: 700; font-size: 16px; }
.case-card .price img { width: 22px; height: 22px; }
.case-card .price.free { background: none; color: var(--green); font-weight: 600; height: 30px; padding: 0; }
.case-card .ribbon { position: absolute; top: 6px; right: 4px; z-index: 2; }
.case-card.disabled { opacity: .55; }
.cat-select { margin: 4px 0 0; }

@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes floatSm { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
.gift-float { animation: floatSm 2.8s ease-in-out infinite; }
.gift-media { position: relative; display: flex; align-items: center; justify-content: center; }
.gift-media img { width: 100%; height: 100%; object-fit: contain; transition: opacity .25s; }
.gift-media .lottie svg { width: 100% !important; height: 100% !important; }

/* --------------------------- страница кейса ---------------------------- */
.case-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.case-head > img { width: 62px; height: 62px; object-fit: contain; }
.case-head > div { min-width: 0; flex: 1; }
.case-head .h1 { font-size: 19px; margin: 0; white-space: nowrap; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; }
.case-head .cprice { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; color: var(--muted); }
.case-head .cprice img { width: 16px; height: 16px; }
.icon-btn { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--card); color: var(--text); display: flex; align-items: center; justify-content: center; cursor: pointer; flex: none; }
.icon-btn:disabled { opacity: .3; pointer-events: none; }
.icon-btn .ic { width: 22px; height: 22px; }
.roulette { position: relative; height: 146px; margin: 0 -16px; overflow: hidden; background: var(--bg-2); }
.roulette::before, .roulette::after { content: ''; position: absolute; top: 0; bottom: 0; width: 16%; z-index: 2; pointer-events: none; }
.roulette::before { left: 0; background: linear-gradient(90deg, var(--bg-2), transparent); }
.roulette::after { right: 0; background: linear-gradient(270deg, var(--bg-2), transparent); }
.roulette .strip { position: absolute; top: 15px; left: 0; display: flex; gap: 8px; padding-left: 14px; }
.r-item { flex: none; width: 96px; height: 116px; border-radius: 18px; position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; background: radial-gradient(90% 60% at 50% 100%, color-mix(in srgb, var(--rc) 35%, transparent), transparent 70%), var(--card); transition: opacity .3s ease, transform .3s ease; }
.r-item::after { content: ''; position: absolute; left: 22%; right: 22%; bottom: 0; height: 3px; border-radius: 3px 3px 0 0; background: var(--rc); }
.r-item img { width: 62px; height: 62px; object-fit: contain; }
.r-item .v { font-size: 12px; font-weight: 700; display: flex; align-items: center; gap: 3px; color: var(--muted); }
.r-item .v img { width: 13px; height: 13px; }
.roulette.done .r-item { opacity: .3; }
.roulette.done .r-item.is-win { opacity: 1; transform: scale(1.06); box-shadow: 0 0 0 2px var(--rc), 0 0 26px color-mix(in srgb, var(--rc) 60%, transparent); }
.marker { position: absolute; top: 0; bottom: 0; left: 50%; width: 3px; margin-left: -1.5px; z-index: 3; background: #fff; border-radius: 2px; box-shadow: 0 0 12px rgba(58, 134, 247, .9); }
.marker::before, .marker::after { content: ''; position: absolute; left: 50%; transform: translateX(-50%); border: 8px solid transparent; }
.marker::before { top: 0; border-top-color: #fff; }
.marker::after { bottom: 0; border-bottom-color: #fff; }
.open-row { display: flex; gap: 8px; margin: 16px 0 6px; }
.open-row .btn { flex: 1; }
.toggle-btn { flex: none; width: 58px; height: 56px; border-radius: 18px; border: 0; background: var(--card); color: var(--muted); font-weight: 600; font-size: 11px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; cursor: pointer; }
.toggle-btn.on { color: #fff; background: var(--blue); }
.toggle-btn:disabled { opacity: .45; cursor: default; }
.item .ch-lang { flex: none; height: 30px; padding: 0 10px; font-size: 12px; }   /* язык постов канала */
.toggle-btn .ic { width: 20px; height: 20px; }
.demo-note { display: flex; align-items: center; gap: 8px; justify-content: center; font-size: 12px; font-weight: 600; color: #a9c8ff; margin-top: 4px; }
.prize-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.prize { position: relative; border-radius: 18px; padding: 12px 6px 10px; text-align: center; cursor: pointer; background: radial-gradient(90% 55% at 50% 100%, color-mix(in srgb, var(--rc) 28%, transparent), transparent 70%), var(--card); animation: cardIn .35s ease backwards; }
.prize .gift-media { width: 62px; height: 62px; margin: 12px auto 6px; }
.prize .name { font-size: 11px; font-weight: 600; color: var(--muted); }
.prize .v { font-size: 13px; font-weight: 700; display: flex; align-items: center; justify-content: center; gap: 3px; margin-top: 2px; }
.prize .ch { position: absolute; top: 8px; left: 8px; z-index: 2; font-size: 10px; font-weight: 700; color: var(--rc); }
.tag { position: absolute; top: 7px; right: 7px; z-index: 2; font-size: 9px; font-weight: 700; padding: 2px 6px; border-radius: 6px; background: rgba(58, 134, 247, .25); color: #a9c8ff; }
.reqs { margin-top: 14px; }
.req { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--border); }
.req:first-of-type { border-top: 0; }
.req .t { font-weight: 700; font-size: 14px; }
.req .d { font-size: 12px; color: var(--muted); }
.req .ok { width: 34px; height: 34px; border-radius: 50%; background: var(--green); display: flex; align-items: center; justify-content: center; flex: none; }
.req .ok .ic { width: 18px; height: 18px; stroke-width: 2.8; }
.req .prog { font-weight: 700; color: var(--muted); font-size: 13px; }

/* ------------------------------ окно выигрыша -------------------------- */
.overlay { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(10, 11, 14, .85); animation: fadeIn .25s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.win { position: relative; width: 100%; max-width: 380px; text-align: center; padding: 26px 18px 18px; border-radius: 30px; overflow: hidden; background: var(--bg-2); animation: winIn .45s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes winIn { from { transform: scale(.7) translateY(30px); opacity: 0; } to { transform: none; opacity: 1; } }
.win .rays { position: absolute; left: 50%; top: 160px; width: 460px; height: 460px; margin: -230px 0 0 -230px; pointer-events: none; border-radius: 50%; background: repeating-conic-gradient(color-mix(in srgb, var(--rc) 22%, transparent) 0deg 9deg, transparent 9deg 22deg); animation: spin 18s linear infinite; will-change: transform; }
.win .rays-fade { position: absolute; left: 50%; top: 160px; width: 460px; height: 460px; margin: -230px 0 0 -230px; pointer-events: none; background: radial-gradient(circle, transparent, var(--bg-2) 62%); }
.win > *:not(.rays):not(.rays-fade):not(.confetti) { position: relative; }
.win .rarity { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--rc); }
.win h2 { margin: 6px 0 0; font-size: 26px; font-weight: 800; }
.win .gift-media { width: 190px; height: 190px; margin: 8px auto 4px; animation: popIn .55s cubic-bezier(.2, 1.6, .4, 1) .1s backwards; }
@keyframes popIn { from { transform: scale(.3) rotate(-20deg); opacity: 0; } to { transform: none; opacity: 1; } }
.win .gname { font-weight: 700; font-size: 19px; }
.win .gval { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; font-size: 23px; margin: 6px 0 18px; }
.win .gval img { width: 23px; height: 23px; }
.win .actions { display: flex; gap: 10px; }
.win .actions .btn { flex: 1; min-width: 0; white-space: nowrap; padding: 8px 10px; gap: 6px; font-size: 15px; }
.win .actions .btn .star-ico { width: 18px; height: 18px; flex: none; }
.win .actions.stack { flex-direction: column-reverse; }
.win .demo-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: #a9c8ff; background: rgba(58, 134, 247, .15); padding: 6px 12px; border-radius: 10px; margin-bottom: 10px; }
.confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 5; }
.confetti i { position: absolute; left: 50%; top: 40%; width: 8px; height: 12px; border-radius: 2px; animation: confetti var(--d) cubic-bezier(.1, .8, .3, 1) forwards; }
@keyframes confetti { 0% { transform: translate(0, 0) rotate(0); opacity: 1; } 100% { transform: translate(var(--x), var(--y)) rotate(var(--r)); opacity: 0; } }

/* ------------------------------- bottom sheet -------------------------- */
.sheet-wrap { position: fixed; inset: 0; z-index: 150; background: rgba(10, 11, 14, .6); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: fadeIn .2s ease; display: flex; align-items: flex-end; }
.sheet { position: relative; width: 100%; max-height: 92vh; overflow-y: auto; padding: 0 18px calc(24px + var(--bottom-safe)); background: var(--bg-2); border-radius: 30px 30px 0 0; animation: sheetUp .32s cubic-bezier(.2, 1, .3, 1); will-change: transform; overscroll-behavior: contain; }
.sheet.dragging { transition: none !important; }
.sheet.closing { transition: transform .22s ease; transform: translateY(100%) !important; }
.sheet.settle { transition: transform .25s cubic-bezier(.2, 1, .3, 1); }
@keyframes sheetUp { from { transform: translateY(100%); } to { transform: none; } }
.sheet .grab { position: sticky; top: 0; z-index: 3; padding: 12px 0 10px; margin: 0 -16px; background: var(--bg-2); cursor: grab; touch-action: none; }
.sheet .handle { width: 44px; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, .2); margin: 0 auto; }
.sheet h3 { margin: 4px 0 16px; font-size: 20px; font-weight: 700; text-align: center; }
.sheet .sheet-close { position: absolute; right: 16px; top: 26px; z-index: 4; width: 42px; height: 42px; border-radius: 50%; border: 0; background: var(--card-2); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.sheet .gift-media.big { width: 150px; height: 150px; margin: 0 auto 6px; }
.presets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 10px 0; }
.presets button { height: 50px; border-radius: 16px; border: 0; background: var(--card-2); color: var(--text); font-weight: 700; font-size: 15px; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 6px; }
.presets button.active { background: var(--blue); }
.presets button img { width: 17px; height: 17px; }
.amount-box { background: var(--card-2); border-radius: 22px; padding: 22px 16px 18px; text-align: center; }
.amount-box .amount-input { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.amount-box input { width: 3.2ch; min-width: 1.6ch; max-width: 70vw; field-sizing: content; border: 0; background: none; color: #fff; font-size: 48px; font-weight: 800; text-align: right; outline: none; padding: 0; font-family: inherit; }
.amount-box .unit { font-size: 30px; font-weight: 800; display: inline-flex; align-items: center; }
.amount-box .unit img { width: 38px; height: 38px; }
.amount-box .hint { margin-top: 6px; font-size: 13px; color: var(--muted); }
.amount-box .hint.gold { color: var(--gold); font-weight: 600; }
.kv { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 13px 0; border-bottom: 1px solid var(--border); font-size: 15px; }
.kv:last-child { border-bottom: 0; }
.kv b { display: inline-flex; align-items: center; gap: 5px; font-weight: 700; }
.kv .lbl { display: inline-flex; align-items: center; gap: 12px; }
.copy-field { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-radius: 14px; background: var(--card-2); font-family: ui-monospace, monospace; font-size: 13px; word-break: break-all; cursor: pointer; }
.copy-field span { flex: 1; }
.copy-field .ic { width: 18px; height: 18px; color: var(--muted); }
.copy-field.memo { color: var(--gold); font-size: 19px; font-weight: 800; letter-spacing: .1em; }
.warn { display: flex; gap: 8px; align-items: flex-start; font-size: 12px; color: #ffd27a; background: rgba(245, 192, 74, .1); border-radius: 14px; padding: 11px 13px; }
.warn .ic { width: 18px; height: 18px; }
.details { margin-top: 12px; }
.details summary { list-style: none; cursor: pointer; color: var(--muted); font-size: 14px; font-weight: 600; text-align: center; padding: 8px 0; }
.details summary::-webkit-details-marker { display: none; }
.steps { counter-reset: st; margin: 12px 0; }
.steps div { counter-increment: st; display: flex; gap: 12px; align-items: center; padding: 8px 0; font-size: 14px; }
.steps div::before { content: counter(st); width: 28px; height: 28px; border-radius: 50%; background: var(--blue); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; flex: none; }

/* ---------------------------- покупка билетов -------------------------- */
.packs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.pack { position: relative; overflow: hidden; border-radius: 22px; padding: 18px 10px 12px; text-align: center; cursor: pointer; background: var(--card); transition: transform .12s ease; }
.pack:active { transform: scale(.97); }
.pack.best { box-shadow: inset 0 0 0 2px var(--gold); }
.pack .stack { position: relative; height: 62px; display: flex; align-items: center; justify-content: center; }
.pack .stack img { width: 52px; height: 52px; position: absolute; filter: drop-shadow(0 0 1.5px rgba(0, 0, 0, .75)) drop-shadow(0 4px 6px rgba(0, 0, 0, .55)); }
.pack .stack img:nth-child(2) { transform: translate(14px, -6px) rotate(14deg); }
.pack .stack img:nth-child(3) { transform: translate(-14px, -4px) rotate(-14deg); }
.pack .cnt { font-weight: 800; font-size: 22px; margin-top: 6px; }
.pack .cnt small { font-size: 12px; color: var(--muted); font-weight: 600; }
.pack .per { font-size: 11px; color: var(--muted); margin: 2px 0 10px; }
.pack .per img { width: 12px; height: 12px; vertical-align: -2px; }
.pack .ribbon { position: absolute; top: 10px; right: 10px; }
.pack .badge2 { position: absolute; top: 10px; left: 10px; }

/* --------------------------------- бонусы ------------------------------ */
.progress-card { padding: 18px; }
.progress-card .big { font-size: 40px; font-weight: 800; line-height: 1; }
.progress-card .big small { font-size: 22px; color: var(--muted); font-weight: 600; }
.segbar { display: flex; gap: 6px; margin-top: 14px; }
.segbar i { flex: 1; height: 7px; border-radius: 4px; background: var(--card-3); }
.segbar i.on { background: var(--blue); }
.reward-chip { display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 16px; border-radius: 16px; background: var(--gold-chip); font-weight: 700; }
.reward-chip span { background: rgba(0, 0, 0, .2); border-radius: 10px; padding: 4px 8px; display: inline-flex; align-items: center; gap: 4px; }
.reward-chip img { width: 15px; height: 15px; }
.task { background: var(--card); border-radius: var(--radius); padding: 18px; animation: cardIn .3s ease backwards; }
.task .tt { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-weight: 700; font-size: 16px; }
.task .td { color: var(--muted); font-size: 13px; line-height: 1.35; margin-top: 4px; }
.task .btn { width: 100%; }
.task .t-head { display: flex; align-items: flex-start; gap: 12px; }
.task .t-main { flex: 1; min-width: 0; }
.task .t-main .tt { display: block; font-size: 15px; line-height: 1.25; }
.task .t-rew { flex: none; display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 10px; border-radius: 9px; background: rgba(58, 134, 247, .16); color: #b5d0ff; font-size: 13px; font-weight: 700; white-space: nowrap; }
.task .t-rew .star-ico { width: 14px; height: 14px; }
.task .t-foot { display: flex; align-items: center; gap: 12px; margin-top: 14px; }
.task .t-foot .act { flex: 1; min-width: 0; display: block; }
.task .t-foot .btn { min-height: 46px; }
.task .t-foot .timer-chip { margin-left: 0; flex: none; height: 46px; padding: 0 12px; border-radius: 14px; background: rgba(255, 159, 67, .1); }
.task.done { opacity: .5; }
.task .tico { width: 36px; height: 36px; border-radius: 10px; object-fit: cover; flex: none; }
.task .timer-chip { margin-left: auto; color: var(--orange); font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
.task .timer-chip .ic { width: 16px; height: 16px; }
.tasks-list { display: flex; flex-direction: column; gap: 12px; }

.gw-card { background: var(--card); border-radius: 26px; padding: 18px; position: relative; cursor: pointer; animation: cardIn .3s ease backwards; }
.gw-card .timer-pill { position: absolute; top: 16px; right: 16px; display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: 18px; background: var(--card-2); font-weight: 700; font-size: 14px; }
.gw-card .timer-pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--red); }
.gw-prizes { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; padding: 6px 0 10px; }
.gw-prize { width: 30%; display: flex; flex-direction: column; align-items: center; }
.gw-prize .gift-media { width: 84px; height: 84px; }
.gw-prize .pv { margin-top: -12px; display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 12px; background: rgba(43, 47, 55, .9); backdrop-filter: blur(6px); font-size: 13px; font-weight: 700; }
.gw-prize .pv img { width: 14px; height: 14px; }
.gw-prize.next { opacity: .45; }
.stats3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 8px; }
.stats3 > div { padding: 14px 8px; border-radius: 18px; background: var(--card-2); text-align: center; }
.stats3 small { display: block; font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.stats3 b { display: block; margin-top: 4px; font-size: 18px; font-weight: 800; }
.stats3 b .star-ico { width: 16px; height: 16px; vertical-align: -2px; margin-right: 4px; }
.stats3 b .ticket-ico { width: 18px; height: 18px; vertical-align: -3px; margin-right: 5px; }
.range { -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border-radius: 3px; background: var(--card-3); outline: none; margin: 18px 0 8px; }
.range::-webkit-slider-thumb { -webkit-appearance: none; width: 28px; height: 28px; border-radius: 50%; background: #8d919b; cursor: pointer; border: 0; }
.range::-moz-range-thumb { width: 28px; height: 28px; border-radius: 50%; background: #8d919b; cursor: pointer; border: 0; }
.range.on::-webkit-slider-thumb { background: var(--blue); }
.timer { display: flex; justify-content: center; gap: 4px; padding: 10px; border-radius: 22px; background: var(--card-2); margin: 0 auto 12px; width: fit-content; }
.timer div { min-width: 62px; text-align: center; }
.timer b { display: block; font-size: 24px; font-weight: 800; }
.timer small { font-size: 10px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.progress { height: 8px; border-radius: 4px; background: var(--card-3); overflow: hidden; }
.progress i { display: block; height: 100%; border-radius: 4px; background: var(--blue); transition: width .6s ease; }


#dep-methods { overflow: visible; }
#dep-methods { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
#dep-methods .chip { flex-direction: column; justify-content: center; height: 64px; padding: 6px 4px; gap: 5px; font-size: 13px; white-space: nowrap; border-radius: 18px; }
#dep-methods .chip img, #dep-methods .chip .ic { width: 22px; height: 22px; margin: 0; }
#dep-methods { padding-top: 10px; }
/* способов больше четырёх — одна лента с прокруткой (выходит за края окна, чтобы было видно, что листается) */
#dep-methods.scroll { display: flex; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; margin: 0 -18px; padding: 10px 18px 2px; scroll-padding: 0 18px; }#dep-methods.scroll::-webkit-scrollbar { display: none; }
#dep-methods.scroll { touch-action: pan-x; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; }   /* листание вбок не трогает окно */
#dep-methods.scroll .chip { flex: 0 0 92px; }
/* СБП / Крипта (Platega): цена в рублях, пояснение, ссылки на документы */
.rub-pay { text-align: center; font-size: 14px; color: var(--muted); margin: -4px 0 12px; }
.rub-pay b { color: var(--text); font-size: 16px; }
.rub-info { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; padding: 12px 14px; border-radius: 16px; background: var(--card-2);
  font-size: 13px; line-height: 1.45; color: var(--muted); }
.rub-info .ic { flex: none; width: 18px; height: 18px; margin-top: 1px; color: #5aa0ff; }
.rub-legal { margin-top: 14px; text-align: center; font-size: 12px; color: var(--muted); }
.rub-docs { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 16px; margin-top: 6px; }
.rub-docs a { color: #5aa0ff; font-weight: 600; text-decoration: none; }
#dep-methods .chip { position: relative; }
#dep-methods .chip .badge { position: absolute; top: -10px; right: -2px; height: 20px; padding: 0 7px; border-radius: 10px; background: var(--green); color: #fff; font-size: 11px; font-weight: 800; box-shadow: 0 4px 12px -4px rgba(0, 0, 0, .6); }
.wd-gifts { text-align: center; }
.wd-gifts .wd-art { width: 64px; height: 64px; border-radius: 20px; margin: 4px auto 0; }
.wd-gifts .wd-art .ic { width: 32px; height: 32px; }
.wd-gifts h3 { margin: 12px 0 6px; }
.wd-gifts p { margin: 0 0 14px; font-size: 14px; line-height: 1.4; }
.wd-gifts .warn { text-align: left; margin-top: 8px; }
.warn.ok { color: #8be3a5; background: rgba(52, 199, 89, .1); }

/* --------------------------------- турнир ------------------------------ */
.tour-hero { background: var(--card); border-radius: 28px; padding: 20px 18px; text-align: center; }
.tour-hero .live-tag { font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: #6aa8ff; margin: 14px 0 6px; }
.tour-hero h2 { margin: 0; font-size: 28px; font-weight: 800; line-height: 1.12; }
.tour-hero p { color: rgba(255, 255, 255, .85); font-size: 14px; margin: 12px 0 16px; }
.tour-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tour-cards > div { background: var(--card-2); border-radius: 22px; padding: 16px 10px; }
.tour-cards img { width: 28px; height: 28px; }
.tour-cards img, .tour-cards .ic { display: block; margin: 0 auto; }
.tour-cards .ic { width: 28px; height: 28px; color: var(--blue); }
.tour-cards b { display: block; font-size: 17px; margin-top: 6px; }
.tour-cards small { display: block; color: var(--muted); font-size: 12px; margin-top: 4px; }
.lb { display: flex; flex-direction: column; gap: 10px; }
.lb-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 22px; background: var(--card); animation: cardIn .3s ease backwards; }
.lb-row.top { padding: 16px 14px; }
.lb-row.me { box-shadow: inset 0 0 0 2px var(--blue); }
.lb-place { width: 46px; height: 46px; border-radius: 14px; flex: none; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 15px; background: var(--card-2); color: var(--muted); }
.lb-row.top .lb-place { width: 56px; height: 56px; border-radius: 18px; background: #fff; color: #15171c; font-size: 20px; }
.lb-ava { width: 44px; height: 44px; border-radius: 50%; overflow: hidden; flex: none; background: var(--card-3); display: flex; align-items: center; justify-content: center; font-weight: 700; }
.lb-ava img { width: 100%; height: 100%; object-fit: cover; }
.lb-name { font-weight: 700; font-size: 15px; }
.lb-xp { color: var(--muted); font-size: 12px; font-weight: 600; margin-top: 2px; }
.lb-prize { flex: none; width: 52px; height: 52px; display: flex; align-items: center; justify-content: center; }
.lb-prize img { max-width: 100%; max-height: 100%; object-fit: contain; }
.lb-prize .st { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; font-weight: 700; color: var(--gold); }
.lb-prize .st img { width: 14px; height: 14px; }

/* -------------------------------- списки ------------------------------- */
.list { display: flex; flex-direction: column; gap: 10px; }
/* строка с непрокрученным бонусом (профиль, маркет) */
.bonus-note { width: 100%; display: flex; align-items: center; gap: 10px; margin-top: 10px; padding: 12px 14px; border: 0; border-radius: 16px; background: rgba(245, 192, 74, .1); color: #f3d690; font: inherit; font-size: 13px; font-weight: 600; line-height: 1.35; text-align: left; cursor: pointer; }
.bonus-note > span { flex: 1; }
.bonus-note b { color: #fff; }
.bonus-note .ic { width: 18px; height: 18px; flex: none; }
.bonus-note .star-ico { width: 14px; height: 14px; vertical-align: -2px; }
.bonus-note + .chips { margin-top: 14px; }   /* маркет: отступ до фильтров */
.bonus-lead { text-align: center; margin: -4px 4px 4px; font-size: 14px; line-height: 1.45; }
.bonus-lead .star-ico { width: 15px; height: 15px; vertical-align: -2px; }
.bonus-srcs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.bonus-src { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 16px; background: var(--card-2); font-size: 13px; font-weight: 600; line-height: 1.3; }
.steps span .star-ico { width: 15px; height: 15px; vertical-align: -2px; }
/* «Где взять билеты»: счётчик просмотров рекламы рядом с кнопкой (как таймер у заданий) */
.task .t-foot .count-chip { flex: none; height: 46px; padding: 0 14px; border-radius: 14px; background: var(--card-2); color: var(--muted); font-size: 14px; font-weight: 700; display: inline-flex; align-items: center; }
.task .t-rew img { width: 16px; height: 16px; }
.item { display: flex; align-items: center; gap: 12px; padding: 16px; border-radius: 20px; background: var(--card); animation: cardIn .3s ease backwards; }
.item .ico { width: 46px; height: 46px; border-radius: 14px; flex: none; display: flex; align-items: center; justify-content: center; background: var(--card-2); overflow: hidden; }
.item .ico img { width: 36px; height: 36px; object-fit: contain; }
.item .ico.round { border-radius: 50%; }
.item .ico.round img { width: 100%; height: 100%; object-fit: cover; }
.item .t { font-weight: 700; font-size: 15px; }
.item .d { font-size: 12px; color: var(--muted); }
.item .count { font-size: 12px; font-weight: 700; color: var(--muted); }
/* сумма справа в строке списка (история, NFT-пополнения): звезда с отступом от числа */
.item > b { flex: none; display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.item > b .star-ico { vertical-align: 0; }
.item .check { width: 34px; height: 34px; border-radius: 50%; background: var(--green); display: flex; align-items: center; justify-content: center; }
.item .check .ic { width: 18px; height: 18px; stroke-width: 2.8; }
.empty { text-align: center; color: var(--muted); padding: 30px 12px; font-weight: 500; }
.empty .ic { width: 44px; height: 44px; display: block; margin: 0 auto 10px; color: var(--dim); }
.empty .btn { margin-top: 14px; }

/* --------------------------------- маркет ------------------------------ */
.market-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.mcard { border-radius: 20px; padding: 12px 6px; text-align: center; cursor: pointer; position: relative; background: radial-gradient(90% 55% at 50% 100%, color-mix(in srgb, var(--rc) 24%, transparent), transparent 70%), var(--card); animation: cardIn .3s ease backwards; }
.mcard .gift-media { width: 72px; height: 72px; margin: 10px auto 6px; }
.mcard .name { font-size: 11px; font-weight: 600; color: var(--muted); }
.mcard .v { display: inline-flex; align-items: center; gap: 4px; margin-top: 8px; height: 30px; padding: 0 12px; border-radius: 10px; background: var(--card-2); font-weight: 700; font-size: 13px; }

/* --------------------------------- профиль ----------------------------- */
.profile-card { background: var(--card); border-radius: 26px; padding: 16px; }
.profile-card .ph { display: flex; gap: 14px; align-items: center; }
.profile-card .pava { width: 76px; height: 76px; border-radius: 22px; overflow: hidden; flex: none; background: var(--card-2); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 28px; }
.profile-card .pava img { width: 100%; height: 100%; object-fit: cover; }
.profile-card .pname { font-size: 19px; font-weight: 700; }
.profile-card .pid { color: var(--muted); font-size: 12px; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; margin-top: 2px; }
.profile-card .pid .ic { width: 15px; height: 15px; }
.profile-card .pstats { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin-top: 14px; border-radius: 18px; overflow: hidden; background: var(--card-2); }
.profile-card .pstats > div { padding: 12px 14px; }
.profile-card .pstats > div + div { border-left: 1px solid var(--border); }
.profile-card .pstats small { display: block; font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.profile-card .pstats b { display: inline-flex; align-items: center; gap: 5px; margin-top: 4px; font-size: 19px; font-weight: 700; }
.profile-card .pstats b img { width: 18px; height: 18px; }
.balance-strip { display: flex; flex-direction: column; align-items: stretch; gap: 12px; background: var(--card); border-radius: 22px; padding: 14px 16px; margin-top: 12px; }
.balance-strip .bv { font-size: 24px; font-weight: 800; display: inline-flex; align-items: center; gap: 6px; }
.balance-strip .bv img { width: 24px; height: 24px; }
.balance-strip .bs-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.balance-strip .bs-btns .btn { min-height: 44px; white-space: nowrap; }
.ref-card { background: var(--card); border-radius: 26px; padding: 18px; }
.ref-card .refbal { font-size: 40px; font-weight: 800; display: inline-flex; align-items: center; gap: 8px; line-height: 1.1; }
.ref-card .refbal img { width: 32px; height: 32px; }
.ref-card .level { position: absolute; right: 18px; top: 18px; width: 108px; padding: 12px 14px; border-radius: 18px; background: var(--gold-chip); text-align: right; }
.ref-card .level small { display: block; font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; opacity: .85; }
.ref-card .level b { font-size: 18px; }
.ref-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 16px 0 12px; }
.ref-tiles > div { padding: 14px; border-radius: 20px; background: var(--card-2); }
.ref-tiles > div.gold { background: var(--gold-chip); }
.ref-tiles small { display: block; font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; opacity: .8; }
.ref-tiles b { display: inline-flex; align-items: center; gap: 5px; margin-top: 6px; font-size: 22px; font-weight: 800; }
.ref-tiles b img { width: 18px; height: 18px; }
.perk { display: flex; align-items: center; gap: 12px; font-size: 14px; font-weight: 600; padding: 6px 0; }
.perk img { width: 17px; height: 17px; vertical-align: -3px; }
.inv-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.inv { border-radius: 22px; padding: 12px; text-align: center; position: relative; background: radial-gradient(90% 55% at 50% 100%, color-mix(in srgb, var(--rc) 22%, transparent), transparent 70%), var(--card); animation: cardIn .3s ease backwards; }
.inv .gift-media { width: 86px; height: 86px; margin: 4px auto 6px; cursor: pointer; }
.inv .name { font-weight: 700; font-size: 14px; }
.inv .v { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 700; color: var(--muted); margin: 2px 0 10px; }
.inv .btns { display: flex; flex-direction: column-reverse; gap: 6px; }
.inv .btns .btn { width: 100%; min-height: 40px; padding: 0 10px; font-size: 14px; white-space: nowrap; border-radius: 13px; }
.inv .btns .btn.ghost { min-height: 36px; font-size: 13px; color: #d5d8e0; }
/* «🔒 Вывод через 21 день»: замок — часть строки текста (при переносе не отрывается от текста) */
.inv .lock { display: block; text-align: center; font-size: 12px; line-height: 1.35; color: var(--muted); margin-top: 8px; }
.inv .lock .ic { width: 13px; height: 13px; vertical-align: -2px; margin-right: 4px; }
.settings-card { background: var(--card); border-radius: 24px; padding: 4px 16px; }
.settings-card .kv { padding: 16px 0; }
.settings .kv { cursor: pointer; }

/* ------------------------------ прелоадеры ------------------------------ */
.preloader { position: fixed; inset: 0; z-index: 1000; display: flex; flex-direction: column; align-items: center; justify-content: center; background: linear-gradient(180deg, #1b1e25 0%, #15171c 45%, #121318 100%); transition: opacity .4s ease, visibility .4s; }
.preloader.gone { opacity: 0; visibility: hidden; }
.preloader .logo { font-family: 'Fredoka', 'Montserrat', sans-serif; font-weight: 700; font-size: 52px; letter-spacing: -.01em; line-height: 1; display: flex; gap: 10px; white-space: nowrap; animation: logoIn .6s cubic-bezier(.2, 1.4, .4, 1); }
.preloader .logo .c { color: #e9e9f4; }
.preloader .logo .r { color: var(--blue); position: relative; }
@keyframes logoIn { from { transform: scale(.7); opacity: 0; } to { transform: none; opacity: 1; } }
.preloader .bar { width: 210px; max-width: 60vw; margin-top: 26px; height: 5px; border-radius: 6px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.preloader .bar i { display: block; height: 100%; width: 0; border-radius: 6px; background: linear-gradient(90deg, var(--blue-2), var(--blue)); transition: width .35s ease; }
.preloader .bar.indeterminate i { width: 35%; animation: loadBar 1.1s ease-in-out infinite; }
@keyframes loadBar { 0% { transform: translateX(-110%); } 100% { transform: translateX(300%); } }
.page-loader { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 40; pointer-events: none; }
.page-loader .ring { width: 46px; height: 46px; border-radius: 50%; border: 4px solid rgba(255, 255, 255, .08); border-top-color: var(--gold); animation: spin .75s linear infinite; }

/* --------------------------------- тосты ------------------------------- */
/* небольшое сообщение в рамке над нижним меню */
.toasts { position: fixed; left: 16px; right: 16px; bottom: calc(var(--nav-h) + var(--bottom-safe) + 34px); z-index: 500; display: flex; flex-direction: column-reverse; align-items: center; gap: 8px; pointer-events: none; }
.toast { position: relative; display: inline-flex; align-items: center; gap: 10px; max-width: 100%; padding: 10px 16px 10px 10px; border-radius: 16px; pointer-events: auto; background: rgba(35, 38, 45, .97); border: 1px solid color-mix(in srgb, var(--tc) 55%, transparent); box-shadow: 0 10px 28px -10px rgba(0, 0, 0, .85); font-weight: 600; font-size: 14px; line-height: 1.3; animation: toastIn .3s cubic-bezier(.2, 1.3, .4, 1); }
.toast.success { --tc: var(--green); }
.toast.error { --tc: var(--red); }
.toast.warning { --tc: var(--gold); }
.toast.out { animation: toastOut .22s ease forwards; }
.toast .tdot { width: 26px; height: 26px; border-radius: 50%; flex: none; display: flex; align-items: center; justify-content: center; background: color-mix(in srgb, var(--tc) 22%, transparent); color: var(--tc); }
.toast .tdot .ic { width: 16px; height: 16px; stroke-width: 2.8; }
.toast .msg img { width: 16px; height: 16px; vertical-align: -3px; margin: 0 1px; }
@keyframes toastIn { from { transform: translateY(16px) scale(.96); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes toastOut { to { transform: translateY(12px); opacity: 0; } }

/* ------------------------------- вход/ошибки --------------------------- */
.fatal, .login { position: fixed; inset: 0; z-index: 70; overflow-y: auto; scrollbar-width: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; text-align: center; padding: 24px; }
.fatal img { width: 140px; }
.fatal h2, .login h2 { margin: 0; font-weight: 800; }
.login .logo { width: 104px; height: 104px; border-radius: 28px; animation: logoPulse 2.4s ease-in-out infinite; }
.login .sub { max-width: 300px; }
.login .tg-widget { min-height: 48px; }

/* -------------------------------- админка ------------------------------ */
.admin-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.admin-stats .st { padding: 14px; border-radius: 18px; background: var(--card); }
.admin-stats .st small { display: block; color: var(--muted); font-size: 11px; font-weight: 600; }
.admin-stats .st b { font-size: 18px; font-weight: 800; }
.admin-row { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 18px; background: var(--card); }
.admin-row .gift-media { width: 44px; height: 44px; }
.badge-s { font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 8px; background: var(--card-3); color: var(--muted); }
.badge-s.ok { background: rgba(52, 199, 89, .15); color: #5ee082; }
.badge-s.warn { background: rgba(245, 192, 74, .15); color: var(--gold); }
.badge-s.bad { background: rgba(255, 77, 79, .15); color: #ff7b7d; }
.pre { white-space: pre-wrap; word-break: break-all; font-family: ui-monospace, monospace; font-size: 12px; background: var(--card-2); border-radius: 14px; padding: 12px; max-height: 260px; overflow: auto; user-select: text; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

@media (min-width: 560px) {
    .view, .topbar, .nav { max-width: 560px; margin-left: auto; margin-right: auto; }
    .nav { left: 0; right: 0; max-width: 532px; }
    .sheet-wrap { justify-content: center; }
    .sheet { max-width: 560px; }
    .case-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; } }

#promo-more { white-space: nowrap; gap: 6px; padding: 8px 12px; }
#promo-more .ic { width: 20px; height: 20px; flex: none; }

.nft-dep .step { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; font-size: 14px; line-height: 1.4; }
.nft-dep .step > b { flex: none; width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: rgba(58, 134, 247, .18); color: #a9c8ff; font-size: 13px; }
.nft-dep .warn { margin-top: 6px; }

.inv-status { display: flex; align-items: center; justify-content: center; gap: 7px; min-height: 40px; border-radius: 13px; background: rgba(58, 134, 247, .12); color: #a9c8ff; font-size: 13px; font-weight: 700; }
.inv-status .ic { width: 16px; height: 16px; animation: sendPulse 1.4s ease-in-out infinite; }
@keyframes sendPulse { 0%, 100% { transform: translateY(0); opacity: 1; } 50% { transform: translateY(-2px); opacity: .55; } }

/* ================================================================ ИГРЫ: шапка, лобби, батлы кейсов */
.pill.pill-plus { padding-right: 6px; }
.pill-plus .plus { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; margin-left: 4px; border-radius: 50%; background: var(--blue); color: #fff; }
.pill-plus .plus .ic { width: 18px; height: 18px; stroke-width: 2.6; }
.top-market { height: 44px; padding: 0 16px 0 13px; border-radius: 22px; border: 0; background: var(--card); color: var(--text); font-weight: 700; font-size: 15px; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.top-market .ic { width: 20px; height: 20px; color: #5aa0ff; }
.top-market:active { transform: scale(.96); }

.game-card { display: flex; align-items: center; gap: 14px; padding: 16px; margin-bottom: 12px; border-radius: 24px; cursor: pointer;
  background: radial-gradient(120% 140% at 100% 0%, rgba(58, 134, 247, .35), transparent 60%), var(--card); }
.game-card > .ic { width: 20px; height: 20px; color: var(--muted); transform: rotate(-90deg); }
.game-card.soon { cursor: default; opacity: .6; background: var(--card); }
.gc-art { flex: none; width: 58px; height: 58px; border-radius: 18px; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #3a86f7, #6a32d8); color: #fff; box-shadow: 0 10px 24px -10px rgba(58, 134, 247, .8); }
.game-card.soon .gc-art { background: var(--card-2); box-shadow: none; color: var(--muted); }
.gc-art .ic { width: 30px; height: 30px; }
.gc-t { font-weight: 800; font-size: 17px; display: flex; align-items: center; gap: 8px; }
.gc-d { margin-top: 3px; font-size: 13px; color: var(--muted); line-height: 1.35; }
.badge-new { font-size: 10px; font-weight: 800; padding: 3px 7px; border-radius: 8px; background: var(--green); color: #fff; letter-spacing: .04em; }

.bt-hero { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.bt-hero-ico { flex: none; width: 52px; height: 52px; border-radius: 16px; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #3a86f7, #6a32d8); color: #fff; }
.bt-hero-ico .ic { width: 28px; height: 28px; }
.bt-list { display: flex; flex-direction: column; gap: 10px; }
.bt-card { padding: 12px; border-radius: 20px; background: var(--card); cursor: pointer; }
.bt-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.bt-foot { margin-top: 10px; }
.bt-cases { display: flex; gap: 6px; min-width: 0; overflow: hidden; align-items: center; }
.bt-thumb .case-art.mini { width: 44px; height: 44px; border-radius: 12px; }
.bt-more { font-size: 12px; font-weight: 700; color: var(--muted); padding: 0 4px; }
.bt-seats { display: flex; gap: 4px; flex: none; }
.bt-seat { width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; overflow: hidden; background: var(--card-2); color: var(--muted); border: 2px dashed rgba(255, 255, 255, .15); font-size: 12px; font-weight: 700; }
.bt-seat.on { border: 2px solid var(--blue); background: var(--card-2); color: var(--text); }
.bt-seat.win { border-color: var(--green); }
.bt-seat img { width: 100%; height: 100%; object-fit: cover; }
.bt-seat .ic { width: 14px; height: 14px; }
.bt-pot { display: inline-flex; align-items: center; gap: 4px; font-weight: 800; }
.bt-card .btn.sm { flex: none; }

.bt-seg { margin-bottom: 14px; }
.bt-picked { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; min-height: 58px; align-items: center; padding: 4px 0 10px; }
.bt-picked::-webkit-scrollbar { display: none; }
.bt-chip { position: relative; flex: none; border: 0; padding: 0; background: none; cursor: pointer; }
.bt-chip .case-art.mini { width: 50px; height: 50px; border-radius: 14px; }
.bt-chip i { position: absolute; top: -4px; right: -4px; width: 20px; height: 20px; border-radius: 50%; background: var(--red, #ff5a5f); color: #fff; display: flex; align-items: center; justify-content: center; }
.bt-chip i .ic { width: 12px; height: 12px; stroke-width: 3; }
.bt-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; max-height: 42vh; overflow-y: auto; padding: 2px; }
.bt-case { border: 0; border-radius: 18px; padding: 10px 6px; background: var(--card-2); color: var(--text); display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer; font: inherit; min-width: 0; }
.bt-case:active { transform: scale(.96); }
.bt-case .name { font-size: 12px; font-weight: 600; max-width: 100%; }
.bt-case .v { font-size: 12px; font-weight: 800; display: flex; align-items: center; gap: 3px; }
.bt-case .v img { width: 13px; height: 13px; }
.bt-sum { text-align: center; margin: 14px 0 12px; font-size: 14px; color: var(--muted); }
.bt-sum b { color: var(--text); }
.bt-sum .star-ico { width: 14px; height: 14px; vertical-align: -2px; }

.bt-top { padding: 12px; border-radius: 20px; background: var(--card); margin-bottom: 12px; }
.bt-rounds { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.bt-rounds::-webkit-scrollbar { display: none; }
.bt-rd { flex: none; border-radius: 14px; opacity: .45; transition: opacity .2s, transform .2s; border: 2px solid transparent; }
.bt-rd .case-art.mini { width: 46px; height: 46px; border-radius: 12px; }
.bt-rd.cur { opacity: 1; border-color: var(--blue); transform: scale(1.04); }
.bt-status { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 10px; font-size: 14px; color: var(--muted); }
.bt-status b { color: var(--text); display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.bt-board { position: relative; display: grid; gap: 8px; }
.bt-board.seats-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.bt-board.seats-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.bt-board.seats-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.bt-col { min-width: 0; border-radius: 20px; background: var(--card); padding: 10px 6px; display: flex; flex-direction: column; align-items: center; gap: 8px; transition: box-shadow .3s, opacity .3s; }
.bt-col.is-winner { box-shadow: 0 0 0 2px var(--green), 0 10px 30px -12px rgba(47, 191, 113, .8); }
.bt-col.is-loser { opacity: .55; }
.bc-head { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 100%; }
.bc-av { width: 38px; height: 38px; border-radius: 50%; overflow: hidden; display: flex; align-items: center; justify-content: center; background: var(--card-2); font-weight: 800; }
.bc-av img { width: 100%; height: 100%; object-fit: cover; }
.bc-av.vacant { border: 2px dashed rgba(255, 255, 255, .18); color: var(--muted); }
.bc-av .ic { width: 16px; height: 16px; }
.bc-name { font-size: 12px; font-weight: 700; max-width: 100%; text-align: center; }
.bc-total { font-size: 14px; font-weight: 800; display: inline-flex; align-items: center; gap: 3px; min-height: 18px; }
.bc-total .star-ico { width: 14px; height: 14px; }
.bc-reel { position: relative; width: 100%; height: 132px; border-radius: 16px; overflow: hidden; background: var(--card-2); display: flex; align-items: center; justify-content: center; }
.bc-reel::before, .bc-reel::after { content: ''; position: absolute; left: 0; right: 0; height: 34px; z-index: 2; pointer-events: none; }
.bc-reel::before { top: 0; background: linear-gradient(var(--card-2), transparent); }
.bc-reel::after { bottom: 0; background: linear-gradient(transparent, var(--card-2)); }
.br-strip { position: absolute; top: 0; left: 0; right: 0; will-change: transform; }
.br-item { height: 66px; display: flex; align-items: center; justify-content: center; position: relative; }
.br-item img { width: 52px; height: 52px; object-fit: contain; transition: transform .3s; }
.br-item.is-win img { transform: scale(1.18); filter: drop-shadow(0 0 12px var(--rc)); }
.br-mark { position: absolute; left: 4px; right: 4px; top: 50%; height: 66px; transform: translateY(-50%); border-radius: 14px; border: 2px solid rgba(58, 134, 247, .7); z-index: 1; pointer-events: none; }
.bt-board.seats-4 .bc-reel { height: 112px; }
.bt-board.seats-4 .br-item { height: 56px; }
.bt-board.seats-4 .br-item img { width: 42px; height: 42px; }
.bt-board.seats-4 .br-mark { height: 56px; }
.bc-won { display: flex; flex-direction: column; gap: 6px; width: 100%; }
.bw-item { display: flex; align-items: center; gap: 6px; padding: 4px 6px; border-radius: 12px; background: var(--card-2); font-size: 12px; font-weight: 700; animation: cardIn .3s ease backwards; border-left: 3px solid var(--rc); }
.bw-item img { width: 28px; height: 28px; object-fit: contain; flex: none; }
.bw-item span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.bt-count { position: absolute; inset: 0; z-index: 5; display: flex; align-items: center; justify-content: center; font-size: 72px; font-weight: 800; color: #fff; text-shadow: 0 8px 30px rgba(0, 0, 0, .6); background: rgba(10, 12, 18, .45); border-radius: 20px; pointer-events: none; }
.bt-count.hidden { display: none; }
.center { text-align: center; }
/* всплывающее уведомление (батл начался / вошёл игрок) */
.nbanner { position: fixed; left: 12px; right: 12px; top: calc(12px + var(--top-safe, 0px)); z-index: 90; display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 14px;
  border-radius: 20px; background: #232a3a; box-shadow: 0 16px 40px -12px rgba(0, 0, 0, .7), 0 0 0 1px rgba(58, 134, 247, .35); font-weight: 700; font-size: 14px;
  animation: nbIn .35s cubic-bezier(.2, 1, .3, 1); transition: opacity .3s, transform .3s; }
.nbanner.out { opacity: 0; transform: translateY(-20px); }
.nb-ico { flex: none; width: 38px; height: 38px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #3a86f7, #6a32d8); color: #fff; }
.nb-ico .ic { width: 20px; height: 20px; }
@keyframes nbIn { from { opacity: 0; transform: translateY(-30px); } to { opacity: 1; transform: none; } }
.bt-spect { display: flex; align-items: center; justify-content: center; gap: 8px; margin: -4px 0 10px; font-size: 13px; font-weight: 700; color: var(--muted); }
.bt-spect .ic { width: 16px; height: 16px; color: #5aa0ff; }
.live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--green); margin-right: 6px; animation: livePulse 1.2s ease-in-out infinite; }
@keyframes livePulse { 50% { opacity: .35; } }
/* батл: экран ожидания (правки дизайна) */
.bt-rd { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 4px; background: var(--card-2); }
.bt-rd .case-art.mini { width: 56px; height: 56px; border-radius: 12px; }
.bt-rd small { display: inline-flex; align-items: center; gap: 2px; font-size: 11px; font-weight: 800; color: var(--muted); }
.bt-rd small .star-ico { width: 11px; height: 11px; }
.bt-rounds.all .bt-rd { opacity: 1; }
.bc-head { min-height: 92px; justify-content: flex-start; }
.bc-av { flex: none; width: 44px; height: 44px; aspect-ratio: 1; box-sizing: border-box; }
.bc-av.vacant { background: transparent; }
.bc-name { min-height: 16px; line-height: 16px; }
.bt-col.vacant { background: transparent; border: 2px dashed rgba(255, 255, 255, .1); }
.bc-reel.is-wait { background: transparent; border: 1px solid rgba(255, 255, 255, .06); }
.bc-reel.is-wait::before, .bc-reel.is-wait::after { display: none; }
.bc-wait { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 8px; text-align: center; font-size: 12px; font-weight: 700; color: var(--muted); }
.bc-wait.ready { color: var(--green); }
.bc-wait.ready .ic { width: 30px; height: 30px; padding: 6px; border-radius: 50%; background: rgba(47, 191, 113, .15); stroke-width: 2.6; box-sizing: content-box; }
.bc-wait .btn.sm { padding: 0 18px; }
.bc-price { display: inline-flex; align-items: center; gap: 3px; color: var(--text); font-size: 13px; font-weight: 800; }
.bc-price .star-ico { width: 13px; height: 13px; }
.dots { display: inline-flex; gap: 5px; }
.dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: dotJump 1.2s ease-in-out infinite; }
.dots i:nth-child(2) { animation-delay: .15s; } .dots i:nth-child(3) { animation-delay: .3s; }
@keyframes dotJump { 0%, 60%, 100% { transform: none; opacity: .4; } 30% { transform: translateY(-5px); opacity: 1; } }
.bc-head { height: 92px; min-height: 0; }
.bc-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bt-col.vacant { padding: 8px 4px; }
/* батл: указатель как в кейсах, итоги, 2×2 для четырёх игроков */
.br-mark { top: 50%; height: 2px; left: 0; right: 0; transform: translateY(-50%); border: 0; border-radius: 0; background: linear-gradient(90deg, transparent, #5aa0ff 18%, #5aa0ff 82%, transparent); box-shadow: 0 0 10px rgba(58, 134, 247, .8); }
.br-mark::before, .br-mark::after { content: ''; position: absolute; top: 50%; width: 0; height: 0; border: 7px solid transparent; transform: translateY(-50%); }
.br-mark::before { left: 0; border-left: 9px solid #5aa0ff; }
.br-mark::after { right: 0; border-right: 9px solid #5aa0ff; }
.bt-board.seats-4 .br-mark { height: 2px; }
.br-item img { transition: transform .35s cubic-bezier(.2, 1.4, .4, 1), opacity .35s, filter .35s; }
.bc-reel.landed .br-item:not(.is-win) img { opacity: .18; filter: grayscale(.6); }
.bc-reel.landed .br-item.is-win img { transform: scale(1.3); filter: drop-shadow(0 0 14px var(--rc)); }
.bt-seat.champ { border-color: var(--green); }
.bt-res { min-width: 0; }

.bt-board.seats-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.bt-board.seats-4 .bc-reel { height: 132px; }
.bt-board.seats-4 .br-item { height: 66px; }
.bt-board.seats-4 .br-item img { width: 52px; height: 52px; }

.bc-crown { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 10px; background: rgba(47, 191, 113, .18); color: var(--green); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.bc-crown .ic { width: 13px; height: 13px; }
.bt-col.is-winner .bc-head { height: auto; min-height: 92px; }
.bc-total { font-size: 16px; }
.bw-item { position: relative; }
.bw-item .bw-v { display: inline-flex; align-items: center; gap: 3px; }
.bw-item .bw-v .star-ico { width: 12px; height: 12px; }
.bw-item.taken { background: rgba(47, 191, 113, .1); }
.bw-from { margin-left: auto; flex: none; width: 20px; height: 20px; border-radius: 50%; overflow: hidden; display: flex; align-items: center; justify-content: center; background: var(--card); font-size: 10px; font-weight: 800; }
.bw-from img { width: 100%; height: 100%; object-fit: cover; }
.bw-item.lost { opacity: .4; }
.bw-item.lost .bw-v { text-decoration: line-through; }
.bw-bonus { border-left-color: var(--gold, #f5c04a); background: rgba(245, 192, 74, .12); flex-wrap: wrap; row-gap: 0; }
.bw-bonus .ic-tile { width: 28px; height: 28px; border-radius: 9px; }
.bw-bonus small { width: 100%; padding-left: 34px; font-size: 10px; color: var(--muted); font-weight: 600; }
.bc-result { width: 100%; margin-top: auto; padding: 8px; border-radius: 14px; background: var(--card-2); display: flex; flex-direction: column; gap: 4px; font-size: 12px; }
.bc-result > div { display: flex; justify-content: space-between; align-items: center; gap: 6px; color: var(--muted); font-weight: 600; }
.bc-result b { color: var(--text); display: inline-flex; align-items: center; gap: 3px; font-size: 13px; }
.bc-result .star-ico { width: 12px; height: 12px; }
.bc-result .take b { color: var(--green); }
.bt-seg button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-weight: 800; }
.bt-seg button .ic { width: 17px; height: 17px; }
.bt-col { position: relative; }
.bc-crown { position: absolute; top: -11px; left: 50%; transform: translateX(-50%); z-index: 3; white-space: nowrap; background: #1f3a2c; box-shadow: 0 0 0 2px var(--green); }
.bt-col.is-winner .bc-head { height: 92px; min-height: 0; }
.bt-board { padding-top: 10px; row-gap: 18px; }
/* лента батла: картинка + номинал; итог колонки с утешительным призом; предметы, ушедшие победителю */
.br-item { flex-direction: column; gap: 1px; }
.br-item img { width: 40px; height: 40px; }
.br-v { font-size: 11px; font-weight: 800; color: var(--muted); line-height: 1; transition: color .3s, transform .3s; }
.bc-reel.landed .br-item:not(.is-win) .br-v { opacity: .2; }
.bc-reel.landed .br-item.is-win img { transform: scale(1.22); }
.bc-reel.landed .br-item.is-win .br-v { color: #fff; font-size: 13px; transform: translateY(5px); }
.bt-board.seats-4 .br-item img { width: 40px; height: 40px; }
.bw-item.lost { opacity: .55; }
.bw-item.lost .bw-v { text-decoration: none; }
.bw-to { margin-left: auto; display: inline-flex; align-items: center; gap: 2px; color: var(--muted); }
.bw-to .ic { width: 12px; height: 12px; }
.bw-to .bw-from { margin-left: 0; }
.bc-result .cons b { color: var(--gold, #f5c04a); }
/* утешительный приз — отдельный блок над предметами проигравшего */
.bw-bonus2 { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 14px; background: linear-gradient(135deg, rgba(245, 192, 74, .18), rgba(245, 192, 74, .06)); border: 1px solid rgba(245, 192, 74, .3); animation: cardIn .35s ease backwards; min-width: 0; }
.bw-bonus2 .ic-tile { flex: none; width: 32px; height: 32px; border-radius: 10px; }
.bw-bonus2 .ic-tile .ic { width: 18px; height: 18px; }
.bw-bonus2 .grow { min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
.bw-bonus2 b { display: inline-flex; align-items: center; gap: 3px; color: #f5c04a; font-size: 14px; font-weight: 800; white-space: nowrap; }
.bw-bonus2 b .star-ico { width: 13px; height: 13px; }
.bw-bonus2 small { font-size: 11px; font-weight: 600; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bt-col.is-loser { opacity: .75; }
/* лобби: «+N» кейсов — отдельный значок, всегда виден */
.bt-cases { flex: 1 1 auto; }
.bt-thumb { flex: none; }
.bt-more { flex: none; display: inline-flex; align-items: center; justify-content: center; min-width: 34px; height: 34px; padding: 0 8px; border-radius: 11px; background: var(--card-2); color: var(--text); font-size: 13px; font-weight: 800; }
.bt-rounds { position: relative; scroll-behavior: smooth; padding: 2px; }
.bt-rd.done { opacity: .75; }
/* цифры звёзд рядом с синей игровой звездой — синие (золото оставлено для бонусов) */
.live-item.stars span { background: rgba(58, 134, 247, .2); color: #8fbcff; }
.lb-prize .st { color: #8fbcff; }
.ot-modal .ot-rew { color: #8fbcff; }
