/* --- ГЛОБАЛЬНЫЕ ПЕРЕМЕННЫЕ (ALTUSHKA COLORS) --- */
:root {
    --bg-deep: #0a0a0f;
    --bg-card: #12121a;
    --accent-pink: #ef02cb;
    --accent-purple: #b602ce;
    --neon-blue: #c04dff;
    --text-main: #ffffff;
    --text-dim: #8a8a9e;
    --gold: #ffffff;
    --danger: #ff3b30;
    --success: #00ff88;
    --glass: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --safe-top: env(safe-area-inset-top, 0px);
}

.case-bonus-note {
    position: absolute;
    left: 88px;
    bottom: 10px;
    font-size: 9px;
    font-style: normal;
    font-weight: 900;
    letter-spacing: .45px;
    color: #ffe9b0;
    opacity: .9;
    text-shadow: 0 0 10px rgba(255,184,86,.45);
}

.prizes-modal-card {
    max-height: 78vh;
    overflow: auto;
}

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

.prize-item {
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    background: rgba(255,255,255,.04);
    padding: 8px;
    text-align: center;
}

.prize-item img {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

.prize-item span {
    display: block;
    margin-top: 4px;
    font-size: 11px;
    font-weight: 800;
    color: var(--gold);
}

.case-win-overlay {
    background: radial-gradient(circle at top, #2d0a4a, #120817 62%, #09090d 100%);
}

.case-win-card {
    width: min(88vw, 420px);
    text-align: center;
}

.case-win-card h2 {
    font-size: 46px;
    font-weight: 900;
    color: #fff;
    text-shadow: 0 14px 44px rgba(0,0,0,.25);
}

#case-win-image {
    width: 140px;
    height: 140px;
    margin-top: 8px;
    object-fit: contain;
}

.case-win-sum {
    margin-top: 8px;
    font-size: 32px;
    color: #ff7de6;
    font-weight: 900;
}

.case-win-card .btn-main {
    margin-top: 20px;
    background: linear-gradient(45deg, var(--accent-purple), var(--accent-pink));
    color: #fff;
    border: 1px solid rgba(255,255,255,.12);
}

.case-win-actions {
    margin-top: 14px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.case-win-actions .btn-main {
    margin-top: 0;
}

/* --- СБРОС И БАЗА --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Montserrat', 'RubupCurrency', sans-serif;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

body {
    background-color: var(--bg-deep);
    color: var(--text-main);
    overflow: hidden; /* Скролл только внутри контента */
    height: 100vh;
    min-height: 100dvh;
    min-height: 100svh;
    width: 100vw;
    position: relative;
}

body::before {
    content: "";
    position: fixed;
    inset: -20%;
    background: radial-gradient(circle at 20% 10%, rgba(239,2,203,.22), transparent 35%), radial-gradient(circle at 80% 20%, rgba(0,212,255,.16), transparent 40%), radial-gradient(circle at 50% 90%, rgba(182,2,206,.22), transparent 38%);
    animation: bgShift 14s ease-in-out infinite;
    z-index: -1;
    will-change: transform, opacity;
    transform: translateZ(0);
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    opacity: .22;
    background-image:
        linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.015) 1px, transparent 1px),
        radial-gradient(circle at 50% 50%, rgba(255,255,255,.05), transparent 42%);
    background-size: 100% 3px, 3px 100%, 100% 100%;
    mix-blend-mode: screen;
    animation: grainShift 18s linear infinite;
    will-change: transform;
    transform: translateZ(0);
}

.loader {
    position: fixed;
    inset: 0;
    z-index: 6000;
    background: #07070d;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    transition: opacity .35s ease;
    animation: loaderAutoHide 0.01s linear 4s forwards;
}
@keyframes loaderAutoHide {
    to { opacity: 0; pointer-events: none; visibility: hidden; }
}

.loader-bg {
    position: absolute;
    inset: 0;
    background: url('assets/newic/fon/fon1.png') center/cover no-repeat;
    transform: scale(1.04);
    filter: saturate(1.08) contrast(1.05);
}

.loader-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 22% 14%, rgba(239,2,203,.24), transparent 38%),
        radial-gradient(circle at 78% 24%, rgba(0,212,255,.2), transparent 42%),
        linear-gradient(to bottom, rgba(5, 6, 15, .25), rgba(5, 6, 15, .74));
    backdrop-filter: blur(1.5px);
}

.loader-card {
    position: relative;
    z-index: 2;
    width: min(88vw, 390px);
    padding: 20px 18px 16px;
    border-radius: 24px;
    border: 1px solid rgba(255,255,255,.2);
    background: linear-gradient(165deg, rgba(10,13,28,.8), rgba(10,13,28,.56));
    box-shadow: 0 18px 40px rgba(0,0,0,.42), 0 0 30px rgba(182,2,206,.24);
    text-align: center;
}

.loader-kicker {
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .9px;
    color: #ffd9fa;
    opacity: .95;
}

.loader-title {
    margin-top: 6px;
    font-size: clamp(24px, 5.6vw, 34px);
    line-height: 1.04;
    font-weight: 900;
    color: #fff;
    text-shadow: 0 0 18px rgba(239,2,203,.34);
}

.loader-subtitle {
    margin-top: 8px;
    font-size: 12px;
    font-weight: 600;
    color: #d1d9ea;
    opacity: .92;
}

.loader-progress {
    margin-top: 12px;
    height: 10px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,.18);
    background: rgba(255,255,255,.08);
    overflow: hidden;
}

.loader-progress-bar {
    width: 42%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #8a3bff, #ef02cb, #73d8ff);
    box-shadow: 0 0 16px rgba(239,2,203,.45);
    animation: loaderBarPulse 1.6s ease-in-out infinite;
}

.loader-text {
    margin-top: 10px;
    font-size: 11px;
    font-weight: 800;
    color: #f3f7ff;
    letter-spacing: .9px;
    opacity: .94;
}

@keyframes loaderBarPulse {
    0%, 100% { width: 34%; filter: saturate(1); }
    50% { width: 76%; filter: saturate(1.3); }
}

@keyframes caseFloat {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-4px) scale(1.006); }
}

@keyframes caseNeonPulse {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.14); }
}

/* Кастомный скроллбар */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb { 
    background: linear-gradient(var(--accent-pink), var(--accent-purple)); 
    border-radius: 10px;
}

/* --- ГЛАВНЫЙ КОНТЕЙНЕР ПРИЛОЖЕНИЯ --- */
#app {
    display: flex;
    flex-direction: column;
    height: 100dvh;
    height: 100svh;
    min-height: 100vh;
    max-width: 500px; /* Для ПК-версии */
    margin: 0 auto;
    background: radial-gradient(circle at top, #1a1a2e 0%, #0a0a0f 100%);
    position: relative;
}

.content-scroll {
    flex: 1;
    min-height: 0;
}

/* --- HEADER (TOP BAR) --- */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--glass-border);
    z-index: 1000;
}

.music-toggle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--glass-border);
    background: var(--glass);
    color: var(--gold);
    font-weight: 900;
    font-size: 18px;
    transition: transform .2s ease, box-shadow .3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.music-toggle.active {
    box-shadow: 0 0 16px rgba(255, 204, 0, .4);
    transform: scale(1.06);
}

.back-btn {
    position: fixed;
    left: 14px;
    top: var(--topbar-h);
    z-index: 1200;
    width: 44px;
    height: 44px;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(12, 12, 19, .84);
    color: #fff;
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    font-size: 20px;
    font-weight: 900;
    line-height: 1;
    box-shadow: 0 8px 18px rgba(0,0,0,.35);
}

.back-btn:active {
    transform: scale(0.94);
}

.user-block { display: flex; align-items: center; gap: 10px; }
.avatar-wrapper {
    cursor: pointer;
}
.avatar-wrapper img {
    width: 40px; height: 40px;
    border-radius: 12px;
    border: 2px solid var(--accent-pink);
    box-shadow: 0 0 15px rgba(239, 2, 203, 0.3);
}

.nickname { font-weight: 800; font-size: 14px; display: block; }
.status { font-size: 9px; color: var(--success); text-transform: uppercase; letter-spacing: 1px; }

.balance-block {
    background: var(--glass);
    padding: 8px 15px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--glass-border);
    transition: transform 0.2s;
}
.balance-block:active { transform: scale(0.95); }

.deposit-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(45deg, var(--accent-pink), var(--accent-purple));
    color: #fff;
    font-weight: 900;
    font-size: 16px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

#balance { font-weight: 900; color: var(--gold); font-size: 16px; }
.coin-icon { width: 20px; height: 20px; animation: pulse 2s infinite; }

/* --- КНОПКИ --- */
.btn-main {
    background: linear-gradient(45deg, var(--accent-purple), var(--accent-pink));
    border: none;
    border-radius: 16px;
    color: white;
    font-weight: 800;
    font-size: 16px;
    padding: 15px;
    width: 100%;
    min-height: 46px;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(182, 2, 206, 0.42), inset 0 0 0 1px rgba(255,255,255,.08);
    transition: transform .18s ease, filter .18s ease, box-shadow .2s ease;
}
.btn-main:hover:not(:disabled) {
    transform: translateY(-1px);
    filter: brightness(1.08) saturate(1.06);
    box-shadow: 0 12px 30px rgba(182, 2, 206, .5), inset 0 0 0 1px rgba(255,255,255,.12);
}
.btn-main:active { transform: scale(0.94); filter: brightness(1.14); transition: transform .08s ease, filter .08s ease; }

.btn-main:disabled {
    opacity: .65;
    box-shadow: none;
}

/* Button ripple effect */
.btn-ripple {
    position: relative;
    overflow: hidden;
}

.btn-ripple .ripple-circle {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.35);
    pointer-events: none;
    animation: rippleExpand 0.6s ease-out forwards;
}

@keyframes rippleExpand {
    0% { transform: scale(0); opacity: 1; }
    100% { transform: scale(4); opacity: 0; }
}

/* --- КАРТОЧКИ ИГР (ГРИД) --- */
.game-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    padding: 20px;
}

#screen-games {
    position: relative;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
    padding-bottom: calc(84px + var(--safe-bottom));
}

#screen-games::before,
#screen-games::after {
    content: "";
    position: absolute;
    width: 72vw;
    height: 72vw;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    filter: blur(22px);
    opacity: .44;
}

#screen-games::before {
    left: -26vw;
    top: -18vw;
    background: radial-gradient(circle, rgba(182, 2, 206, .45), transparent 68%);
    animation: liveBlobOne 12s ease-in-out infinite;
}

#screen-games::after {
    right: -24vw;
    bottom: -22vw;
    background: radial-gradient(circle, rgba(239, 2, 203, .42), transparent 68%);
    animation: liveBlobTwo 14s ease-in-out infinite;
}

#screen-games .main-banner::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(135deg, transparent 18%, rgba(255,255,255,.06) 50%, transparent 82%);
    opacity: .7;
    animation: sheenSweep 9s ease-in-out infinite;
}

#screen-games .main-banner,
#screen-games .game-grid,
#screen-games .feed-wrap {
    position: relative;
    z-index: 1;
}

.main-banner {
    text-align: center;
    padding: 20px 20px 6px;
}

.neon-text {
    font-size: clamp(28px, 7vw, 40px);
    font-weight: 900;
    color: #fff;
    text-shadow: 0 0 20px rgba(182,2,206,.6), 0 0 40px rgba(239,2,203,.4);
    letter-spacing: 1px;
    line-height: 1.1;
}

.neon-text .pink {
    color: var(--accent-pink);
    text-shadow: 0 0 20px rgba(239,2,203,.7), 0 0 40px rgba(239,2,203,.35);
}

.main-banner p {
    margin-top: 4px;
    font-size: 12px;
    color: #b0b5cc;
    font-weight: 600;
    letter-spacing: .3px;
}

.feed-wrap {
    margin: 0 20px 16px;
    background: rgba(255,255,255,.03);
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    padding: 10px;
}

.feed-head {
    font-size: 11px;
    font-weight: 900;
    color: var(--text-dim);
    margin-bottom: 8px;
}

.feed-list {
    display: grid;
    gap: 6px;
}

.feed-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 7px 8px;
    border-radius: 9px;
    font-size: 11px;
    background: rgba(0,0,0,.2);
}

.feed-row b {
    color: var(--gold);
    font-size: 11px;
}

.game-item {
    background: var(--bg-card);
    border-radius: 24px;
    padding: 20px;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease, background .22s ease;
    min-height: 164px;
    cursor: pointer;
    isolation: isolate;
    transform: translateZ(0);
}
.game-item::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(circle at 50% 12%, rgba(255,255,255,.12), transparent 42%), linear-gradient(135deg, transparent 18%, rgba(255,255,255,.04) 50%, transparent 82%);
    opacity: .6;
    z-index: 0;
    animation: cardSheen 7.5s ease-in-out infinite;
    will-change: transform, opacity;
    transform: translateZ(0);
}
.game-item > * {
    position: relative;
    z-index: 2;
}
.game-item::after {
    content: "";
    position: absolute;
    inset: auto 14px 10px 14px;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.28), transparent);
    opacity: .55;
    filter: blur(.2px);
    z-index: 1;
    animation: cardPulseLine 4.8s ease-in-out infinite;
}
.game-item:hover {
    transform: translateY(-6px) scale(1.02);
    border-color: rgba(255,255,255,.18);
    box-shadow: 0 20px 44px rgba(0,0,0,.32), 0 0 30px rgba(182,2,206,.22);
    transition: transform .28s cubic-bezier(.34,1.56,.64,1), border-color .28s ease, box-shadow .28s ease, background .28s ease;
}
.game-item:hover img {
    transform: translateY(-2px) scale(1.07);
    filter: drop-shadow(0 10px 20px rgba(0,0,0,.6));
    transition: transform .28s cubic-bezier(.34,1.56,.64,1), filter .28s ease;
}

.game-item:active {
    transform: translateY(1px) scale(.985);
    border-color: rgba(239, 2, 203, .72);
    background: #161622;
    box-shadow: 0 0 26px rgba(182,2,206,.18);
}

.game-item img {
    width: 80px; height: 80px;
    object-fit: contain;
    margin-bottom: 10px;
    filter: drop-shadow(0 5px 15px rgba(0,0,0,0.5));
    transition: transform .22s ease, filter .22s ease;
    display: block;
    transform: translateZ(0);
}

.game-item h3 { font-size: 14px; font-weight: 800; text-transform: uppercase; position: relative; z-index: 2; margin-bottom: 4px; }
.game-item span { font-size: 10px; color: #b0b5cc; position: relative; z-index: 2; }

.game-item-thimbles {
    background: url('assets/MENUFON/NAPERST.png') center/cover no-repeat;
    border: none;
    justify-content: flex-end;
    padding: 8px;
    background-size: 120% 120%;
    background-position: center center;
}
.game-item-thimbles::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(0,0,0,.2) 0%, rgba(0,0,0,.55) 70%, rgba(0,0,0,.85) 100%);
    pointer-events: none;
    z-index: 1;
}
.game-item-thimbles h3,
.game-item-thimbles span {
    position: relative;
    z-index: 2;
    text-shadow: 0 2px 8px rgba(0,0,0,.9), 0 0 4px rgba(0,0,0,.7);
    padding-bottom: 0;
    margin-top: auto;
}
.game-item-thimbles h3 { color: #fff; margin-bottom: 0; }
.game-item-thimbles span { color: rgba(255,255,255,.85); }
.game-item-thimbles .badge { z-index: 2; }
.game-item-thimbles:active {
    background: url('assets/MENUFON/NAPERST.png') center/cover no-repeat;
    border-color: rgba(255,255,255,.15);
}

/* Crash full background */
.game-item-crash {
    background: url('assets/MENUFON/krashs.png') center/cover no-repeat;
    border: none;
    justify-content: flex-end;
    padding: 8px;
    background-position: center center;
}
.game-item-crash::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,.75) 0%, rgba(0,0,0,.2) 55%, transparent 100%);
    border-radius: 24px;
    pointer-events: none;
    z-index: 1;
}
.game-item-crash h3,
.game-item-crash span {
    position: relative;
    z-index: 2;
    text-shadow: 0 2px 8px rgba(0,0,0,.9), 0 0 4px rgba(0,0,0,.7);
    padding-bottom: 0;
    margin-top: auto;
}
.game-item-crash h3 { color: #fff; margin-bottom: 0; }
.game-item-crash span { color: rgba(255,255,255,.85); }
.game-item-crash .badge { z-index: 2; }
.game-item-crash:active {
    background: url('assets/MENUFON/krashs.png') center/cover no-repeat;
    border-color: rgba(255,255,255,.15);
}

/* Mines full background */
.game-item-mines {
    background: url('assets/MENUFON/mines.png') center/cover no-repeat;
    border: none;
    justify-content: flex-end;
    padding: 8px;
    background-size: 120% 120%;
    background-position: center center;
}
.game-item-mines::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,.75) 0%, rgba(0,0,0,.2) 55%, transparent 100%);
    border-radius: 24px;
    pointer-events: none;
    z-index: 1;
}
.game-item-mines h3,
.game-item-mines span {
    position: relative;
    z-index: 2;
    text-shadow: 0 2px 8px rgba(0,0,0,.9), 0 0 4px rgba(0,0,0,.7);
    padding-bottom: 0;
    margin-top: auto;
}
.game-item-mines h3 { color: #fff; margin-bottom: 0; }
.game-item-mines span { color: rgba(255,255,255,.85); }
.game-item-mines .badge { z-index: 2; }
.game-item-mines:active {
    background: url('assets/MENUFON/mines.png') center/cover no-repeat;
    border-color: rgba(255,255,255,.15);
}

/* Cases full background */
.game-item-cases {
    background: url('assets/MENUFON/cases.png') center/cover no-repeat;
    border: none;
    justify-content: flex-end;
    padding: 8px;
    background-size: 120% 120%;
    background-position: center center;
}
.game-item-cases::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,.75) 0%, rgba(0,0,0,.2) 55%, transparent 100%);
    border-radius: 24px;
    pointer-events: none;
    z-index: 1;
}
.game-item-cases h3,
.game-item-cases span {
    position: relative;
    z-index: 2;
    text-shadow: 0 2px 8px rgba(0,0,0,.9), 0 0 4px rgba(0,0,0,.7);
    padding-bottom: 0;
    margin-top: auto;
}
.game-item-cases h3 { color: #fff; margin-bottom: 0; }
.game-item-cases span { color: rgba(255,255,255,.85); }
.game-item-cases .badge { z-index: 2; }
.game-item-cases:active {
    background: url('assets/MENUFON/cases.png') center/cover no-repeat;
    border-color: rgba(255,255,255,.15);
}

.badge {
    position: absolute; top: 10px; right: 10px;
    background: var(--danger);
    padding: 3px 7px; border-radius: 6px;
    font-size: 8px; font-weight: 900; color: white;
    z-index: 3;
}
.badge.dev {
    background: linear-gradient(135deg, #ff3b30, #ff6b5b);
    color: #fff;
    font-size: 7px;
    letter-spacing: .4px;
    padding: 4px 8px;
    border-radius: 8px;
    box-shadow: 0 0 14px rgba(255, 59, 48, .45), inset 0 1px 0 rgba(255, 255, 255, .25);
    text-shadow: 0 1px 2px rgba(0, 0, 0, .35);
    animation: devPulse 2.2s ease-in-out infinite;
}
@keyframes devPulse {
    0%, 100% { box-shadow: 0 0 14px rgba(255, 59, 48, .45), inset 0 1px 0 rgba(255, 255, 255, .25); }
    50% { box-shadow: 0 0 22px rgba(255, 59, 48, .7), inset 0 1px 0 rgba(255, 255, 255, .25); }
}

/* --- НИЖНЯЯ НАВИГАЦИЯ --- */
.bottom-menu {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 500px;
    z-index: 900;
    background: linear-gradient(180deg, rgba(8, 8, 14, 0.72), rgba(8, 8, 14, 0.98));
    backdrop-filter: blur(26px) saturate(1.22);
    display: flex;
    justify-content: space-around;
    align-items: center;
    gap: 6px;
    padding: 8px 10px calc(10px + var(--safe-bottom));
    border-top: 1px solid rgba(255,255,255,.08);
    box-shadow: 0 -16px 34px rgba(0,0,0,.34);
}

.nav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    color: var(--text-dim);
    transition: transform .18s ease, color .18s ease, background .18s ease, box-shadow .18s ease, border-color .18s ease;
    flex: 1;
    min-height: 52px;
    justify-content: center;
    border-radius: 16px;
    position: relative;
    overflow: hidden;
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 4px 2px;
}

.nav-btn::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top, rgba(182,2,206,.22), transparent 64%);
    opacity: 0;
    transition: opacity .2s ease;
    pointer-events: none;
}

.nav-btn::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 6px;
    width: 34px;
    height: 3px;
    border-radius: 999px;
    transform: translateX(-50%) scaleX(0.35);
    background: linear-gradient(90deg, rgba(239,2,203,0), rgba(239,2,203,.92), rgba(182,2,206,.92), rgba(239,2,203,0));
    opacity: 0;
    transition: opacity .2s ease, transform .2s ease;
    box-shadow: 0 0 12px rgba(239,2,203,.35);
}

.nav-btn.active {
    color: #fff;
    background: radial-gradient(circle at top, rgba(239,2,203,.15), transparent 70%);
    transform: translateY(-2px);
}

.nav-btn.active::before {
    opacity: 1;
}

.nav-btn.active::after {
    opacity: 1;
    transform: translateX(-50%) scaleX(1);
}

.nav-btn:active {
    transform: translateY(1px) scale(.99);
}
.nav-icon {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background-size: 150% 150%;
    background-repeat: no-repeat;
    background-position: center;
    background-color: transparent;
    opacity: .95;
    z-index: 1;
    transition: opacity .2s ease, transform .3s ease;
    transform-origin: center;
}
.nav-btn.active .nav-icon {
    opacity: 1;
    transform: scale(1.08);
}

/* Иконки (PNG из assets/newic/cnopa) */
.home { background-image: url("assets/newic/cnopa/gaming.png"); }
.tops { background-image: url("assets/newic/cnopa/top-10.png"); }
.shop { background-image: url("assets/newic/cnopa/shop.png"); }
.user { background-image: url("assets/newic/cnopa/profile.png"); }

.nav-btn span {
    position: relative;
    z-index: 2;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .3px;
    line-height: 1;
    text-shadow: 0 2px 8px rgba(0,0,0,.9), 0 0 4px rgba(0,0,0,.7);
    margin-top: auto;
    padding-bottom: 2px;
}

.nav-btn.active span {
    text-shadow: 0 0 12px rgba(239,2,203,.32), 0 2px 8px rgba(0,0,0,.9);
}

/* Центральная кнопка-сердце */
.nav-btn-center {
    flex: 0 0 auto;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(239,2,203,.95), rgba(182,2,206,.95));
    border: 3px solid rgba(255,255,255,.25);
    box-shadow: 0 4px 18px rgba(239,2,203,.45), inset 0 1px 0 rgba(255,255,255,.3);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease;
    margin-top: -22px;
    position: relative;
    z-index: 5;
}
.nav-btn-center:active {
    transform: scale(.92);
}
.nav-btn-center .heart {
    font-size: 26px;
    color: #fff;
    text-shadow: 0 2px 6px rgba(0,0,0,.4);
    line-height: 1;
}

/* --- АНИМАЦИИ --- */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); filter: brightness(1.2); }
    100% { transform: scale(1); }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes bgShift {
    0%,100% { transform: translate(0,0) scale(1); }
    50% { transform: translate(2%, -1.5%) scale(1.06); }
}

@keyframes battlePulse {
    0%,100% { box-shadow: 0 0 40px rgba(182,2,206,.3); }
    50% { box-shadow: 0 0 70px rgba(239,2,203,.45); }
}

@keyframes arenaBurst {
    0% { transform: translate(0, 0) scale(1); opacity: 1; }
    100% { transform: translate(calc(var(--ax, 0) * 8px), calc(var(--ay, 0) * 8px)) scale(0); opacity: 0; }
}

@keyframes thimblesSpark {
    0% { transform: translate(0, 0) scale(1); opacity: 1; }
    100% { transform: translate(var(--sx, 0), var(--sy, -60px)) scale(0); opacity: 0; }
}

@keyframes fridgeSteam {
    0% { transform: translate(0, 0) scale(0.6); opacity: 0.8; }
    100% { transform: translate(var(--dx, 0), var(--dy, -60px)) scale(1.5); opacity: 0; }
}

/* ===== DAILY BONUS ===== */
.daily-modal-card {
    background: linear-gradient(180deg, #1a0a2e, #0d0520) !important;
    border: 2px solid #ffd700 !important;
    max-width: 380px !important;
    padding: 24px 20px !important;
    text-align: center;
}

.daily-title {
    color: #ffd700;
    font-size: 22px;
    font-weight: 900;
    margin-bottom: 6px;
    text-shadow: 0 0 15px rgba(255,215,0,0.4);
}

.daily-sub {
    color: #aaa;
    font-size: 13px;
    margin-bottom: 16px;
}

.daily-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
    margin-bottom: 18px;
}

.daily-day {
    background: rgba(255,255,255,0.05);
    border-radius: 10px;
    padding: 10px 4px;
    text-align: center;
    transition: all 0.3s;
    border: 1px solid transparent;
}

.daily-day.today {
    border-color: #ffd700;
    background: rgba(255,215,0,0.15);
    box-shadow: 0 0 12px rgba(255,215,0,0.3);
}

.daily-day.claimed {
    border-color: #00ff88;
    background: rgba(0,255,136,0.08);
    opacity: 0.7;
}

.daily-day-num {
    display: block;
    font-size: 10px;
    color: #888;
    margin-bottom: 4px;
}

.daily-day-reward {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
}

.daily-check { color: #00ff88; font-weight: 900; }
.daily-arrow { color: #ffd700; animation: pulse .8s ease-in-out infinite; }

.daily-claim-btn {
    background: linear-gradient(135deg, #ffd700, #b602ce) !important;
    color: #000 !important;
    font-weight: 900 !important;
    font-size: 16px !important;
    padding: 14px !important;
    box-shadow: 0 4px 20px rgba(255,215,0,0.4) !important;
}

/* ===== PROFILE ===== */
.profile-stat-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin: 12px 14px;
}

.pstat-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 12px 8px;
    text-align: center;
}

.pstat-label {
    display: block;
    font-size: 10px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: 4px;
}

.pstat-val {
    display: block;
    font-size: 16px;
    font-weight: 900;
    color: #fff;
}

.profile-exp-section {
    margin: 8px 14px 16px;
    text-align: center;
}

.exp-bar-wrap {
    height: 8px;
    background: rgba(255,255,255,.08);
    border-radius: 4px;
    overflow: hidden;
}

.exp-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #b602ce, #ef02cb);
    border-radius: 4px;
    transition: width .6s ease;
    box-shadow: 0 0 10px rgba(182,2,206,.5);
}

.exp-text {
    font-size: 11px;
    color: var(--text-dim);
    margin-top: 6px;
    display: block;
}

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

.ach-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 12px 8px;
    text-align: center;
    transition: all .3s;
}

.ach-card.unlocked {
    border-color: rgba(255,215,0,.4);
    background: linear-gradient(135deg, rgba(255,215,0,.1), rgba(255,215,0,.04));
}

.ach-card.locked {
    opacity: .5;
    filter: grayscale(.6);
}

.ach-icon {
    font-size: 24px;
    display: block;
    margin-bottom: 4px;
}

.ach-name {
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    display: block;
}

.ach-desc {
    font-size: 9px;
    color: var(--text-dim);
    display: block;
    margin-top: 2px;
}

.ach-check { color: #00ff88; font-weight: 900; font-size: 14px; }
.ach-lock { font-size: 12px; opacity: .5; }

@keyframes liveBlobOne {
    0%, 100% { transform: translate(0, 0) scale(1); opacity: .34; }
    50% { transform: translate(6vw, 4vw) scale(1.16); opacity: .55; }
}

@keyframes liveBlobTwo {
    0%, 100% { transform: translate(0, 0) scale(1.02); opacity: .3; }
    50% { transform: translate(-7vw, -5vw) scale(1.18); opacity: .56; }
}

body.perf-lite::before {
    animation-duration: 22s;
    opacity: .42;
}

body.perf-lite #screen-games::before,
body.perf-lite #screen-games::after {
    animation-duration: 22s;
    filter: blur(16px);
    opacity: .32;
}

body.perf-lite .spinner,
body.perf-lite .coin-icon,
body.perf-lite .result-image,
body.perf-lite .result-image-wrap::after,
body.perf-lite .case-live-icons,
body.perf-lite .canvas-container.battle,
body.perf-lite .case-card-ui {
    animation: none !important;
}

body.perf-lite::after,
body.perf-lite #screen-games .main-banner::after,
body.perf-lite .case-opening-vfx::before,
body.perf-lite .case-viewport::after,
body.perf-lite .item-card.is-win::after,
body.perf-lite .toast-item.success {
    animation: none !important;
}

body.perf-lite .page.active.enter {
    animation-duration: .18s;
}

body.perf-lite .btn-main,
body.perf-lite .game-item,
body.perf-lite .case-card-ui,
body.perf-lite .modal-card,
body.perf-lite .crash-area .crash-rocket {
    transition-duration: .14s !important;
}

@media (prefers-reduced-motion: reduce) {
    body::before,
    body::after,
    #screen-games::before,
    #screen-games::after,
    #screen-games .main-banner::after,
    .spinner,
    .coin-icon,
    .result-image,
    .result-image-wrap::after,
    .case-live-icons,
    .canvas-container.battle,
    .case-card-ui,
    .case-opening-vfx::before,
    .case-viewport::after,
    .item-card.is-win::after,
    .toast-item.success {
        animation: none !important;
    }

    .page.active.enter {
        animation-duration: .18s;
    }
}

.page {
    display: none;
    height: 100%;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: calc(84px + var(--safe-bottom));
    overscroll-behavior-y: contain;
    opacity: 0;
    transform: translateY(8px) scale(.995);
}
.page.active {
    display: block;
    opacity: 1;
    transform: translateY(0) scale(1);
}
.page.active.enter { animation: pageFade .32s ease-out forwards; }

@keyframes pageFade {
    from { opacity: 0; transform: translateY(8px) scale(.995); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Конец 7 части (Первая половина CSS). Далее пойдут стили для Краша, Мин и Арены. */
/* --- MINES GAME (СЕТКА 5x5) --- */
.mines-container {
    padding: 14px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    min-height: calc(100vh - 210px);
}

.mines-selects-row {
    display: flex;
    gap: 10px;
    margin-bottom: 6px;
}
.mines-select-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.mines-select-wrap label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-dim);
    padding-left: 4px;
}
.mines-select-inner {
    position: relative;
    display: flex;
    align-items: center;
}
.mines-select-inner select {
    width: 100%;
    appearance: none;
    -webkit-appearance: none;
    background: rgba(8, 15, 30, .9);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 16px;
    padding: 14px 40px 14px 16px;
    color: #fff;
    font-size: 15px;
    font-weight: 800;
    font-family: Montserrat, sans-serif;
    cursor: pointer;
    outline: none;
    transition: border-color .2s ease, box-shadow .2s ease;
}
.mines-select-inner select:focus {
    border-color: rgba(182,2,206,.5);
    box-shadow: 0 0 16px rgba(182,2,206,.18);
}
.mines-select-inner select option {
    background: #0d0f1a;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
}
.mines-select-arrow {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 10px;
    color: rgba(255,255,255,.55);
    pointer-events: none;
}

.mines-status {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.mines-status span {
    background: rgba(8, 11, 22, .9);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 12px;
    padding: 8px 6px;
    text-align: center;
    font-size: 11px;
    font-weight: 800;
    color: #d6dfef;
}

.mines-bet-panel {
    display: grid;
    gap: 8px;
}

.mines-bet-row {
    display: grid;
    grid-template-columns: minmax(122px, 1fr) minmax(0, 1.8fr);
    gap: 8px;
}

.bet-boost-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    padding: 6px;
    border-radius: 14px;
    background: linear-gradient(145deg, rgba(182,2,206,.08), rgba(239,2,203,.05));
    border: 1px solid rgba(255,255,255,.08);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.03);
}

.bet-boost-row > button {
    min-height: 44px;
    padding: 0 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .35px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    background: linear-gradient(145deg, rgba(182,2,206,.22), rgba(239,2,203,.14));
    border: 1px solid rgba(255,255,255,.14);
    color: #fff;
    box-shadow: 0 6px 16px rgba(0,0,0,.16), inset 0 0 0 1px rgba(255,255,255,.02);
}

.bet-boost-row > button:active {
    transform: translateY(1px) scale(.99);
}

.mines-bet-input-wrap {
    background: rgba(7, 9, 20, .92);
    border: 1px solid rgba(255,255,255,.15);
    border-radius: 12px;
    padding: 9px 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.mines-bet-input-wrap input {
    width: 100%;
    border: none;
    outline: none;
    background: transparent;
    color: #fff;
    font-size: 15px;
    font-weight: 900;
}

.mines-bet-input-wrap span {
    color: var(--gold);
    font-size: 13px;
    font-weight: 900;
}

.mines-action-btn {
    min-height: 44px;
}

.mines-quick-bets {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
}

.mines-q-btn {
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 10px;
    background: linear-gradient(145deg, rgba(182,2,206,.16), rgba(239,2,203,.1));
    color: #e9e4ff;
    font-size: 11px;
    font-weight: 800;
    min-height: 36px;
}

.mines-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    grid-auto-rows: 1fr;
    gap: 5px;
    width: 100%;
    max-width: 100%;
    aspect-ratio: 1;
    max-height: 44vh;
    background: radial-gradient(ellipse at 50% 40%, rgba(90,0,140,.55), rgba(8,6,18,.98));
    border-radius: 18px;
    padding: 5px;
    box-sizing: border-box;
    overflow: hidden;
}

/* Grid sizes 1x1 .. 7x7 */
.mines-grid.size-1 {
    grid-template-columns: repeat(1, 1fr);
    max-width: min(120px, 40vw);
    margin: 0 auto;
}
.mines-grid.size-4 {
    grid-template-columns: repeat(2, 1fr);
    max-width: min(240px, 58vw);
    margin: 0 auto;
}
.mines-grid.size-9 {
    grid-template-columns: repeat(3, 1fr);
    max-width: min(320px, 64vw);
    margin: 0 auto;
}
.mines-grid.size-16 {
    grid-template-columns: repeat(4, 1fr);
    max-width: min(400px, 82vw);
    margin: 0 auto;
}
.mines-grid.size-25 {
    grid-template-columns: repeat(5, 1fr);
    max-width: min(460px, 94vw);
    margin: 0 auto;
    max-height: 54vh;
    gap: 11px;
}
.mines-grid.size-36 {
    grid-template-columns: repeat(6, 1fr);
    max-width: min(420px, 92vw);
    margin: 0 auto;
    gap: 8px;
}
.mines-grid.size-49 {
    grid-template-columns: repeat(7, 1fr);
    max-width: min(440px, 96vw);
    margin: 0 auto;
    gap: 7px;
}

/* Smaller cells for dense grids */
.mines-grid.size-36 .mine-cell,
.mines-grid.size-49 .mine-cell {
    border-radius: 10px;
    border-width: 1px;
    font-size: 20px;
}

.mine-cell {
    background: none;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,.08);
    aspect-ratio: 1 / 1;
    min-height: 0;
    min-width: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: transform .16s ease, border-color .18s ease, box-shadow .18s ease;
    position: relative;
    overflow: hidden;
    color: #b7c1d9;
    font-size: 28px;
    font-weight: 900;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    line-height: 0;
    padding: 0;
}

.mine-cell-closed-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    pointer-events: none;
    border-radius: 10px;
    z-index: 0;
    display: block;
    transform: scale(1.95);
    transform-origin: center center;
}

.mine-cell.opening {
    /* MINES1024-3: у них нет переворота — плитка мягко «снимает крышку» (лид гаснет),
       внутри появляется арт. Переворот по Y убран: владелец справедливо не понял,
       «нахуя у нас хуйня которая вращается». */
    animation: mineOpen .18s ease-out;
    will-change: transform, opacity;
    z-index: 1;
}

/* арт открытой клетки — их `.mn-gem` (72 % плитки), мягкое появление */
.mine-open-img {
    width: 72%;
    height: 72%;
    object-fit: contain;
    object-position: center center;
    pointer-events: none;
    display: block;
    filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .45));
    animation: mineGemIn .22s cubic-bezier(.2, .8, .2, 1) both;
}

.mine-cell:not(.revealed):not(.boom)::before {
    display: none;
}

.mine-cell::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0), rgba(0,0,0,.35));
    opacity: .7;
    pointer-events: none;
    z-index: 1;
}

.mine-cell:active { transform: scale(0.94); }

.mine-cell.revealed {
    /* как у них: тёмная плитка + лёгкий фиолетовый оттенок, арт по центру */
    background: radial-gradient(circle at 50% 45%, rgba(239,2,203,.16), rgba(22,12,32,.96) 70%);
    border-color: rgba(239,2,203,.45);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.06), 0 0 18px rgba(182,2,206,.18);
}

.mine-cell.revealed::before,
.mine-cell.boom::before {
    display: none;
}

.mine-cell.boom {
    background: radial-gradient(circle at 30% 20%, rgba(255,59,48,.26), rgba(35,15,18,.96));
    border-color: rgba(255,59,48,.64);
    color: #ffd6d3;
    box-shadow: 0 0 20px rgba(255,59,48,.2);
}


@keyframes mineOpen {
    from { transform: scale(1.03); opacity: .55; }
    to   { transform: scale(1); opacity: 1; }
}

@keyframes mineGemIn {
    from { transform: scale(.72); opacity: 0; }
    to   { transform: scale(1); opacity: 1; }
}

/* Эффект для алмаза */
.mine-cell .gem { width: 70%; filter: drop-shadow(0 0 10px var(--accent-pink)); animation: bounce 2s infinite; }
/* Эффект для бомбы */
.mine-cell .bomb { width: 70%; filter: drop-shadow(0 0 10px var(--danger)); }

.mine-bomb-img {
    width: 90%;
    height: 90%;
    object-fit: contain;
    object-position: center center;
    filter: drop-shadow(0 0 10px rgba(255,59,48,.65));
    pointer-events: none;
    animation: mineBombPop .35s cubic-bezier(.175,.885,.32,1.275) forwards;
    display: block;
    transform: scale(1);
    transform-origin: center center;
}
.mine-closed-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    opacity: .9;
    pointer-events: none;
    animation: mineCellPop .25s cubic-bezier(.175,.885,.32,1.275) forwards;
    display: block;
    transform: scale(1.95);
    transform-origin: center center;
}
@keyframes mineBombPop {
    from { transform: scale(.6); opacity: 0; }
    to   { transform: scale(1); opacity: 1; }
}
@keyframes mineCellPop {
    from { transform: scale(.78); opacity: 0; }
    to   { transform: scale(1.95); opacity: 1; }
}

@keyframes cardSheen {
    0%, 100% { transform: translateX(0); opacity: .5; }
    50% { transform: translateX(2px); opacity: .8; }
}

@keyframes cardPulseLine {
    0%, 100% { opacity: .35; transform: scaleX(.96); }
    50% { opacity: .72; transform: scaleX(1); }
}

/* --- CRASH ENGINE (PRO VISUAL) --- */
#screen-crash {
    flex-direction: column;
    gap: 8px;
    padding-top: 6px;
}

#screen-crash.page.active {
    display: flex;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: calc(92px + var(--safe-bottom));
}

.crash-area {
    flex: 0 0 auto;
    height: clamp(200px, 30dvh, 280px);
    margin: 4px 14px 0;
    background: radial-gradient(circle at 60% 20%, rgba(182, 2, 206, 0.15), rgba(4, 7, 28, 0.92) 56%, rgba(3, 4, 14, 0.98));
    border-radius: 26px;
    position: relative;
    border: 2px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    box-shadow: inset 0 0 50px rgba(182, 2, 206, 0.1), 0 16px 32px rgba(0, 0, 0, 0.35);
}

.crash-area > * {
    position: relative;
    z-index: 2;
}

.crash-area::after {
    content: "";
    position: absolute;
    inset: auto 0 0 0;
    height: 72px;
    background: linear-gradient(to top, rgba(3,4,14,.95), transparent);
    pointer-events: none;
    z-index: 1;
}

.crash-area::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, rgba(255,255,255,.9) 1px, transparent 1px);
    background-size: 60px 60px;
    opacity: .25;
    pointer-events: none;
}

.crash-area .crash-multiplier {
    position: absolute;
    left: 50%;
    bottom: 6px;
    transform: translateX(-50%);
    font-size: 18px;
    font-weight: 900;
    z-index: 20;
    text-shadow: 0 0 12px var(--accent-purple);
    font-variant-numeric: tabular-nums;
    transition: color .2s ease;
    pointer-events: none;
}

.crash-area .timer-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    z-index: 15;
    background: rgba(3, 4, 14, .55);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    border-radius: inherit;
    pointer-events: none;
}
.crash-area .timer-overlay span {
    font-size: clamp(28px, 8vw, 42px);
    font-weight: 900;
    color: #fff;
    text-shadow: 0 2px 10px rgba(0,0,0,.6);
    line-height: 1;
}
.crash-area .timer-overlay p {
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 1.2px;
    color: var(--text-dim);
    text-transform: uppercase;
    margin: 0;
}

.crash-area .crash-rocket {
    position: absolute !important;
    width: clamp(100px, 35vw, 160px);
    left: 50%;
    bottom: 34px;
    transform: translateX(-50%);
    z-index: 12;
    filter: drop-shadow(0 14px 28px rgba(27, 133, 255, 0.45));
    will-change: transform;
    transform-origin: 50% 72%;
}

.crash-history-panel {
    margin: 8px 14px 0;
    padding: 10px 12px 12px;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.02));
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(12px);
    box-shadow: 0 8px 24px rgba(0,0,0,.25), inset 0 1px 0 rgba(255,255,255,.04);
}

.crash-history-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.crash-history-title {
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .6px;
    color: var(--text-dim);
}

.crash-history-status {
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .4px;
    color: rgba(255,255,255,.8);
    padding: 3px 10px;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(182,2,206,.25), rgba(182,2,206,.08));
    border: 1px solid rgba(182,2,206,.4);
    box-shadow: 0 0 10px rgba(182,2,206,.2);
    animation: crashStatusPulse 2s ease-in-out infinite;
}

@keyframes crashFlash {
    0% { opacity: 1; }
    100% { opacity: 0; }
}

@keyframes crashStatusPulse {
    0%, 100% { box-shadow: 0 0 8px rgba(182,2,206,.15); }
    50% { box-shadow: 0 0 14px rgba(182,2,206,.4); }
}

.crash-history-pills {
    display: flex;
    gap: 7px;
    flex-wrap: nowrap;
    overflow: hidden;
}

.history-item {
    flex: 1 1 0;
    min-width: 0;
    padding: 6px 4px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 900;
    text-align: center;
    white-space: nowrap;
    letter-spacing: .3px;
    font-variant-numeric: tabular-nums;
    background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.02));
    border: 1px solid rgba(255,255,255,.10);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.02);
    color: #cfd6e8;
    transition: transform .15s ease, box-shadow .2s ease;
}
.history-item:hover {
    transform: translateY(-2px);
}
.history-item.tier-bust {
    color: #ff7a8a;
    background: linear-gradient(180deg, rgba(255,46,80,.22), rgba(255,46,80,.06));
    border-color: rgba(255,46,80,.45);
    box-shadow: 0 0 10px rgba(255,46,80,.18);
}
.history-item.tier-low {
    color: #c5cee0;
    background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.02));
    border-color: rgba(255,255,255,.14);
}
.history-item.tier-mid {
    color: #6ee7b7;
    background: linear-gradient(180deg, rgba(0,217,139,.22), rgba(0,217,139,.05));
    border-color: rgba(0,217,139,.4);
    box-shadow: 0 0 10px rgba(0,217,139,.18);
}
.history-item.tier-high {
    color: #b39bff;
    background: linear-gradient(180deg, rgba(182,2,206,.28), rgba(182,2,206,.08));
    border-color: rgba(182,2,206,.5);
    box-shadow: 0 0 12px rgba(182,2,206,.28);
}
.history-item.tier-mega {
    color: #ffe27a;
    background: linear-gradient(180deg, rgba(255,204,0,.32), rgba(255,128,0,.10));
    border-color: rgba(255,204,0,.55);
    box-shadow: 0 0 14px rgba(249, 181, 204, .35);
}
.history-item.win { color: var(--success); }
.history-item.lose { color: var(--danger); }

.crash-bets-card {
    order: 3;
    margin: 0 14px 0;
    padding: 10px;
    border-radius: 18px;
    background: rgba(30, 36, 62, 0.72);
    border: 1px solid rgba(255,255,255,.09);
}

.crash-bets-head {
    display: grid;
    grid-template-columns: 1fr auto;
    color: var(--text-dim);
    font-size: 12px;
    font-weight: 800;
    margin-bottom: 8px;
}

.crash-live-bets {
    display: grid;
    gap: 7px;
    padding-right: 2px;
}

.crash-cashout-preview {
    margin-top: 10px;
    padding: 10px;
    border-radius: 14px;
    border: 1px solid rgba(255, 204, 0, .18);
    background: linear-gradient(145deg, rgba(182,2,206,.18), rgba(239,2,203,.08));
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.03), 0 8px 24px rgba(0,0,0,.18);
}

.crash-cashout-preview-label {
    font-size: 10px;
    font-weight: 900;
    color: var(--gold);
    letter-spacing: .6px;
    margin-bottom: 8px;
}

.crash-cashout-preview-body {
    display: flex;
    align-items: center;
    gap: 10px;
}

.crash-cashout-preview-body img {
    width: 54px;
    height: 54px;
    border-radius: 12px;
    object-fit: cover;
    background: rgba(0,0,0,.2);
    border: 1px solid rgba(255,255,255,.1);
    box-shadow: 0 0 16px rgba(182,2,206,.18);
}

.crash-cashout-preview-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.crash-cashout-preview-meta span {
    font-size: 13px;
    font-weight: 900;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
}

.crash-cashout-preview-meta b {
    font-size: 12px;
    color: var(--gold);
    font-weight: 900;
}

/* --- SLOTS ENGINE --- */
#screen-slots {
    flex-direction: column;
    gap: 10px;
    padding-top: 6px;
}
#screen-slots.page.active {
    display: flex;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: calc(92px + var(--safe-bottom));
}

.slots-live-strip {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 14px;
    padding: 8px 12px;
    border-radius: 16px;
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.08);
    overflow: hidden;
}
.slots-live-icons {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
}
.slots-live-icons img {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid rgba(255,255,255,.12);
    background: rgba(0,0,0,.25);
}

.slots-machine {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 8px 14px 0;
    padding: 14px;
    border-radius: 22px;
    background: radial-gradient(circle at 50% 30%, rgba(182,2,206,.10), rgba(4,7,28,.92) 60%, rgba(3,4,14,.98));
    border: 2px solid var(--glass-border);
    box-shadow: inset 0 0 50px rgba(182,2,206,.08), 0 16px 32px rgba(0,0,0,.35);
    position: relative;
}

.slots-reel-wrap {
    width: clamp(78px, 24vw, 100px);
    height: clamp(78px, 24vw, 100px);
    border-radius: 16px;
    background: rgba(0,0,0,.35);
    border: 1px solid rgba(255,255,255,.12);
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 4px 12px rgba(0,0,0,.4);
}
.slots-reel-wrap::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    box-shadow: inset 0 0 18px rgba(182,2,206,.15);
    pointer-events: none;
}

.slots-reel {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform .35s cubic-bezier(.23,1,.32,1), filter .25s ease;
    will-change: transform;
    transform: translateZ(0);
}
.slots-reel img {
    width: 70%;
    height: 70%;
    object-fit: contain;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,.4));
    transition: transform .3s ease;
}

.slots-reel.is-spinning img {
    animation: slotsBlur .22s linear infinite;
    filter: blur(2px) brightness(1.15);
}
.slots-reel.is-snapping {
    transform: scale(1.06);
}
.slots-reel.is-win-glow {
    animation: slotsWinPulse .8s ease-in-out 2;
}
.slots-reel.is-near-miss {
    animation: slotsNearMiss .55s ease-in-out;
}

@keyframes slotsBlur {
    0% { transform: translateY(-6px) scale(.92); opacity: .7; }
    50% { transform: translateY(6px) scale(1.04); opacity: 1; }
    100% { transform: translateY(-6px) scale(.92); opacity: .7; }
}
@keyframes slotsWinPulse {
    0%, 100% { box-shadow: inset 0 0 0 0 rgba(0,217,139,0); border-color: rgba(255,255,255,.12); }
    50% { box-shadow: inset 0 0 30px rgba(0,217,139,.35); border-color: rgba(0,217,139,.6); }
}
@keyframes slotsNearMiss {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-6px); }
    40% { transform: translateX(6px); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(4px); }
}

@keyframes slotCoinDrop {
    0% { transform: translateY(0) scale(1) rotate(0deg); opacity: 1; }
    80% { opacity: 1; }
    100% { transform: translateY(80vh) scale(0.4) rotate(360deg); opacity: 0; }
}

.slots-divider {
    height: 1px;
    margin: 0 24px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.12), transparent);
}

.slots-prizes-btn {
    margin: 0 14px;
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: .3px;
    border: 1px solid rgba(255,255,255,.12);
    background: rgba(255,255,255,.06);
    color: #d4dce8;
    cursor: pointer;
    transition: transform .12s ease, background .2s ease, border-color .2s ease;
}
.slots-prizes-btn:active {
    transform: scale(.97);
}
.slots-prizes-btn:hover {
    background: rgba(255,255,255,.10);
    border-color: rgba(255,255,255,.18);
}

.slots-prizes-head {
    font-size: 12px;
    font-weight: 900;
    color: var(--text-dim);
    letter-spacing: .35px;
    margin: 0 16px;
    text-align: center;
}
.slots-prizes-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin: 0 14px;
    padding: 8px;
    border-radius: 16px;
    background: rgba(255,255,255,.03);
    border: 1px solid rgba(255,255,255,.06);
}
.slots-prize-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1 / 1;
    border-radius: 12px;
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.08);
    overflow: hidden;
}
.slots-prize-cell img {
    width: 68%;
    height: 68%;
    object-fit: contain;
    filter: drop-shadow(0 3px 6px rgba(0,0,0,.35));
}

.slots-tiers {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin: 0 14px;
}
.slots-tier-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 0;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,.12);
    background: rgba(255,255,255,.05);
    color: #b7c1d9;
    font-size: 12px;
    font-weight: 900;
    cursor: pointer;
    transition: transform .12s ease, border-color .18s ease, background .18s ease, color .18s ease;
}
.slots-tier-btn:active { transform: scale(.96); }
.slots-tier-btn.active {
    background: linear-gradient(180deg, rgba(182,2,206,.28), rgba(182,2,206,.10));
    border-color: rgba(182,2,206,.5);
    color: #fff;
    box-shadow: 0 0 14px rgba(182,2,206,.22);
}

.slots-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0 16px;
    font-size: 11px;
    font-weight: 800;
    color: var(--text-dim);
}
.slots-rtp {
    color: #6ee7b7;
    background: rgba(0,217,139,.12);
    padding: 3px 8px;
    border-radius: 999px;
    border: 1px solid rgba(0,217,139,.25);
}
.slots-info {
    cursor: pointer;
    opacity: .7;
    transition: opacity .2s ease;
}
.slots-info:hover { opacity: 1; }

.slots-spin-btn {
    margin: 0 14px 6px;
    padding: 14px;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 900;
    letter-spacing: .4px;
    background: linear-gradient(45deg, #2b6aff, #8a3bff);
    box-shadow: 0 8px 24px rgba(43, 106, 255, .35);
    position: relative;
    overflow: hidden;
}
.slots-spin-btn:disabled {
    opacity: .55;
    filter: grayscale(.4);
    cursor: not-allowed;
}
.slots-spin-btn::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.12), transparent);
    transform: translateX(-100%);
}
.slots-spin-btn:not(:disabled):active::after {
    transform: translateX(100%);
    transition: transform .45s ease;
}

.slots-result-modal .result-modal-card.is-win {
    border-color: rgba(0,217,139,.45);
    box-shadow: 0 0 40px rgba(0,217,139,.18);
}

@media (max-width: 380px) {
    .slots-reel-wrap {
        width: clamp(64px, 22vw, 84px);
        height: clamp(64px, 22vw, 84px);
    }
    .slots-tier-btn {
        font-size: 11px;
        padding: 8px 0;
    }
    .slots-prizes-grid {
        gap: 6px;
    }
}

.crash-bet-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    align-items: center;
    padding: 8px 10px;
    border-radius: 12px;
    background: rgba(8, 10, 22, 0.55);
    border: 1px solid rgba(255,255,255,.06);
}

.crash-bet-row.is-live {
    border-color: rgba(182,2,206,.18);
    background: linear-gradient(145deg, rgba(18, 16, 38, 0.72), rgba(8, 10, 22, 0.56));
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.02);
}

.crash-bet-row.is-live .crash-status.pending {
    animation: crashLivePulse 1.05s ease-in-out infinite;
}

.crash-x-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: flex-end;
    min-width: 58px;
    padding: 4px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .3px;
    border: 1px solid rgba(255,255,255,.08);
    background: rgba(255,255,255,.04);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.03);
}

.crash-x-badge.is-live {
    color: #ffffff;
    background: linear-gradient(145deg, rgba(182,2,206,.35), rgba(239,2,203,.18));
    border-color: rgba(182,2,206,.26);
    box-shadow: 0 0 14px rgba(182,2,206,.22), inset 0 0 0 1px rgba(255,255,255,.04);
}

.crash-x-badge.is-cashout {
    color: var(--success);
    background: linear-gradient(145deg, rgba(0,255,136,.18), rgba(0,255,136,.08));
    border-color: rgba(0,255,136,.24);
    box-shadow: 0 0 14px rgba(0,255,136,.14), inset 0 0 0 1px rgba(255,255,255,.04);
}

.crash-x-badge.is-lost {
    color: var(--danger);
    background: linear-gradient(145deg, rgba(255,59,48,.18), rgba(255,59,48,.08));
    border-color: rgba(255,59,48,.24);
    box-shadow: 0 0 14px rgba(255,59,48,.14), inset 0 0 0 1px rgba(255,255,255,.04);
}

.crash-bet-row.is-cashout {
    border-color: rgba(0,255,136,.28);
    background: linear-gradient(145deg, rgba(0, 255, 136, 0.14), rgba(8, 10, 22, 0.6));
    box-shadow: 0 0 18px rgba(0,255,136,.08), inset 0 0 0 1px rgba(0,255,136,.06);
}

.crash-bet-row.is-lost {
    border-color: rgba(255,59,48,.28);
    background: linear-gradient(145deg, rgba(255,59,48,.12), rgba(8, 10, 22, 0.6));
    box-shadow: 0 0 18px rgba(255,59,48,.08), inset 0 0 0 1px rgba(255,59,48,.06);
}

.crash-bet-row.is-crash-impact {
    animation: crashImpactShake .42s ease-in-out var(--impact-delay, 0ms) 1 both;
}

.crash-bet-row.is-crash-impact .crash-user-dot {
    animation: crashDotFlash .42s ease-in-out var(--impact-delay, 0ms) 1 both;
}

.crash-bet-row.is-crash-impact .crash-x-badge,
.crash-bet-row.is-crash-impact .crash-prize,
.crash-bet-row.is-crash-impact .crash-status {
    animation: crashTextFlash .42s ease-in-out var(--impact-delay, 0ms) 1 both;
}

@keyframes crashImpactShake {
    0% {
        transform: translateX(0) scale(1);
        filter: saturate(1);
    }
    15% {
        transform: translateX(-4px) scale(1.01);
        filter: saturate(1.15);
    }
    30% {
        transform: translateX(4px) scale(1.01);
    }
    45% {
        transform: translateX(-3px) scale(1);
    }
    60% {
        transform: translateX(3px) scale(1);
    }
    100% {
        transform: translateX(0) scale(1);
        filter: saturate(1.05);
    }
}

@keyframes crashDotFlash {
    0% {
        background: linear-gradient(145deg, rgba(239,2,203,.3), rgba(64, 130, 255, .35));
        box-shadow: 0 0 0 rgba(255,59,48,0);
    }
    35% {
        background: linear-gradient(145deg, rgba(255,59,48,.45), rgba(255,59,48,.2));
        box-shadow: 0 0 16px rgba(255,59,48,.3);
    }
    100% {
        background: linear-gradient(145deg, rgba(255,59,48,.24), rgba(255,59,48,.12));
        box-shadow: 0 0 10px rgba(255,59,48,.18);
    }
}

@keyframes crashTextFlash {
    0% {
        opacity: 1;
        transform: translateY(0);
        text-shadow: none;
    }
    35% {
        opacity: 1;
        transform: translateY(-1px);
        text-shadow: 0 0 10px rgba(255,59,48,.32);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
        text-shadow: 0 0 6px rgba(255,59,48,.18);
    }
}

.crash-bet-left {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.crash-user-dot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

.crash-user-dot {
    overflow: hidden;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(145deg, rgba(239,2,203,.3), rgba(64, 130, 255, .35));
    border: 1px solid rgba(255,255,255,.14);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
}

.crash-user-meta {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.crash-user-name {
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
}

.crash-user-bet {
    font-size: 12px;
    color: var(--gold);
    font-weight: 800;
}

.crash-bet-right {
    text-align: right;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.crash-prize {
    font-size: 12px;
    color: #fff;
    font-weight: 800;
}

.crash-status {
    font-size: 12px;
    font-weight: 900;
}

.crash-status.pending { color: #9aa3b8; }
.crash-status.cashout { color: var(--success); }
.crash-status.lost { color: var(--danger); }

@keyframes crashLivePulse {
    0%, 100% {
        color: #c6ccdd;
        text-shadow: 0 0 0 rgba(182,2,206,0);
        transform: translateY(0);
    }
    50% {
        color: #ffffff;
        text-shadow: 0 0 10px rgba(182,2,206,.35);
        transform: translateY(-1px);
    }
}

.crash-bet-row.is-empty {
    display: block;
    text-align: center;
    color: var(--text-dim);
    font-size: 12px;
    font-weight: 700;
}

/* --- ARENA PvP (БИТВА) --- */
.arena-header {
    background: linear-gradient(135deg, rgba(239,2,203,.18), rgba(182,2,206,.34));
    margin: 14px 14px 10px;
    padding: 16px 18px;
    border-radius: 22px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.45), inset 0 0 0 1px rgba(255,255,255,.06);
}

.arena-pot-title { font-size: 10px; font-weight: 800; opacity: 0.8; }
.arena-pot-value { font-size: 24px; font-weight: 900; }

.canvas-container {
    position: relative;
    width: min(92vw, 390px);
    margin: 0 auto;
    border-radius: 30px;
    border: 1px solid rgba(255,255,255,.08);
    overflow: hidden;
    box-shadow: 0 0 40px rgba(0,0,0,0.72), inset 0 0 30px rgba(182,2,206,.08);
}

#territoryCanvas { width: 100%; display: block; background: #070814; }

.arena-ball {
    position: absolute;
    left: 50%;
    top: 22%;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: radial-gradient(circle at 32% 32%, #ffffff, #edf2ff 34%, #b8c3d9 60%, #4a5264 100%);
    border: 1px solid rgba(255,255,255,.85);
    box-shadow:
        0 0 0 4px rgba(255,255,255,.06),
        0 0 18px rgba(255,255,255,.42),
        0 0 30px rgba(182,2,206,.22);
    transform: translate(-50%, -50%);
    z-index: 5;
    pointer-events: none;
    transition: none;
}

.canvas-container.battle .arena-ball {
    box-shadow:
        0 0 0 4px rgba(255,255,255,.08),
        0 0 20px rgba(255,255,255,.55),
        0 0 34px rgba(255, 181, 61, .45);
}

.arena-bet-panel {
    margin: 12px 14px 0;
    padding: 10px;
    border-radius: 16px;
    border: 1px solid var(--glass-border);
    background: rgba(10,12,22,.82);
}

.arena-bet-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    align-items: center;
}

.arena-bet-step {
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    background: rgba(255,255,255,.06);
    color: #fff;
    font-size: 20px;
    font-weight: 800;
    height: 38px;
}

.crash-bet-step,
.mines-bet-step {
    width: 38px;
    min-width: 38px;
}

.arena-bet-input-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    background: rgba(0,0,0,.35);
    padding: 0 12px;
    height: 38px;
}

.arena-bet-input-wrap input {
    width: 100%;
    border: none;
    background: transparent;
    color: #fff;
    font-size: 14px;
    font-weight: 900;
    outline: none;
}

.arena-bet-input-wrap span {
    color: var(--gold);
    font-weight: 900;
}

.arena-quick-bets {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-top: 8px;
}

.arena-q-btn {
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    background: rgba(255,255,255,.06);
    color: #d7deef;
    font-size: 12px;
    font-weight: 800;
    padding: 8px 0;
}

.arena-join-btn {
    margin-top: 10px;
    background: linear-gradient(45deg, var(--accent-purple), var(--accent-pink));
    color: #fff;
    box-shadow: 0 8px 26px rgba(182,2,206,.35);
}

.canvas-container.battle {
    animation: battlePulse .9s linear infinite;
}

.arena-players-card {
    margin: 12px 14px;
    padding: 12px;
    border-radius: 16px;
    border: 1px solid var(--glass-border);
    background: rgba(255,255,255,.04);
}

.arena-players-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    font-weight: 800;
    color: var(--text-dim);
    margin-bottom: 8px;
}

.arena-participants {
    display: grid;
    gap: 7px;
}

.arena-p-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.03));
    border: 1px solid rgba(255,255,255,.06);
    padding: 9px 11px;
}

.arena-p-left {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.arena-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 900;
    color: #fff;
    border: 1px solid rgba(255,255,255,.22);
    box-shadow: 0 0 0 3px rgba(255,255,255,.04), 0 0 14px rgba(182,2,206,.16);
    flex: none;
    overflow: hidden;
}

.arena-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

.arena-name-wrap {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.arena-name {
    font-size: 13px;
    font-weight: 800;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
}

.arena-sub {
    font-size: 11px;
    font-weight: 700;
    color: #aeb4c9;
}

.bot-badge {
    margin-left: 6px;
    font-size: 9px;
    font-weight: 800;
    color: #ff9bf4;
    background: rgba(182,2,206,.2);
    border: 1px solid rgba(255,255,255,.16);
    padding: 2px 5px;
    border-radius: 999px;
}

.arena-p-right {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #ffd9a6;
    font-weight: 900;
}

.arena-chance {
    font-size: 11px;
    color: #ffd4fb;
    font-weight: 800;
}

/* --- ПАНЕЛЬ СТАВОК (ОБЩАЯ) --- */
.bet-panel {
    position: relative;
    bottom: auto;
    left: auto;
    right: auto;
    width: calc(100% - 32px);
    margin: 12px 16px 0;
    padding: 13px 16px;
    background: rgba(14, 17, 34, 0.95);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.bet-panel-title {
    font-size: 12px;
    color: var(--text-dim);
    font-weight: 900;
    letter-spacing: .35px;
}

.input-row { display: flex; gap: 10px; }
.bet-input-wrap {
    flex: 1;
    background: #000;
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 10px 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.bet-input-wrap input {
    background: transparent;
    border: none;
    color: white;
    font-weight: 800;
    width: 100%;
    outline: none;
}

.bet-input-suffix {
    color: var(--gold);
    font-weight: 900;
    font-size: 14px;
    line-height: 1;
}

#bet-panel .input-row {
    display: grid;
    grid-template-columns: minmax(132px, 1fr) minmax(0, 1.45fr);
    align-items: stretch;
}

#bet-panel .input-row .btn-main {
    width: auto;
}

.crash-controls {
    display: grid;
    grid-template-columns: 1fr 1fr minmax(96px, 1fr);
    gap: 8px;
    align-items: center;
}

.crash-cashout-btn {
    background: linear-gradient(45deg, #00d98b, #00b56f);
}

.crash-cashout-main {
    display: block;
    font-weight: 900;
    line-height: 1.05;
}

.crash-cashout-sub {
    margin-top: 2px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 800;
    opacity: .92;
}

.crash-cashout-sub img {
    width: 16px;
    height: 16px;
    border-radius: 5px;
    object-fit: cover;
    border: 1px solid rgba(255,255,255,.45);
    box-shadow: 0 0 10px rgba(255,255,255,.22);
}

.crash-auto-toggle.active {
    border-color: rgba(239, 2, 203, .55);
    box-shadow: 0 0 18px rgba(239, 2, 203, .2);
}

.crash-auto-stop-wrap {
    height: 100%;
    min-height: 46px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,.14);
    background: rgba(6,8,22,.82);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    padding: 8px 10px;
}

.crash-auto-stop-wrap span {
    color: var(--text-dim);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .4px;
}

.crash-auto-stop-wrap input {
    width: 68px;
    border: none;
    outline: none;
    background: transparent;
    color: #fff;
    font-size: 14px;
    font-weight: 900;
    text-align: right;
}

.quick-bets { display: flex; gap: 5px; width: 100%; }
.q-btn {
    flex: 1;
    background: linear-gradient(145deg, rgba(182,2,206,.16), rgba(239,2,203,.1));
    border: 1px solid rgba(255,255,255,.18);
    color: #e9e4ff;
    font-size: 11px;
    padding: 8px 6px;
    border-radius: 999px;
    font-weight: 800;
    min-height: 44px;
    letter-spacing: .25px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    white-space: nowrap;
}

.arena-q-btn,
.case-soft-btn,
.inv-actions button {
    min-height: 38px;
}

button,
.game-item,
.nav-btn,
.gift-card,
.case-card-ui {
    touch-action: manipulation;
}

/* --- МОДАЛКИ (РЕЗУЛЬТАТЫ) --- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.9);
    z-index: 2000;
    display: none;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(8px);
}

#modal-confirm,
#modal-input,
#modal-prizes,
#modal-case-win {
    opacity: 0;
    transition: opacity .2s ease, backdrop-filter .2s ease;
}

#modal-confirm.show,
#modal-input.show,
#modal-prizes.show,
#modal-case-win.show {
    opacity: 1;
}

.modal-overlay-soft {
    background: rgba(5,5,8,0.78);
}

.modal-card {
    position: relative;
    background: var(--bg-card);
    width: 85%;
    border-radius: 32px;
    padding: 30px;
    text-align: center;
    border: 2px solid var(--accent-pink);
    box-shadow: 0 0 50px rgba(239, 2, 203, 0.2);
}

#modal-input .input-modal-card,
#modal-prizes .prizes-modal-card,
#modal-case-win .case-win-card {
    transform: translateY(16px) scale(.96);
    opacity: 0;
    transition: transform .26s cubic-bezier(.21,.81,.29,.98), opacity .2s ease, border-color .2s ease, box-shadow .2s ease;
}

#modal-input.show .input-modal-card,
#modal-prizes.show .prizes-modal-card,
#modal-case-win.show .case-win-card {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.quick-modal-card {
    width: min(92vw, 420px);
    padding: 24px 20px 18px;
    text-align: left;
    transform: translateY(14px) scale(.97);
    opacity: 0;
    transition: transform .28s cubic-bezier(.21,.81,.29,.98), opacity .22s ease;
}

#quick-info-modal {
    opacity: 0;
    transition: opacity .18s ease;
}

#quick-info-modal.show {
    opacity: 1;
}

#quick-info-modal.show .quick-modal-card {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.quick-modal-card h2 {
    margin: 6px 28px 14px 0;
    font-size: 22px;
    font-weight: 900;
    text-align: left;
}

.quick-modal-body {
    display: grid;
    gap: 12px;
}

.quick-modal-copy-wrap {
    display: grid;
    gap: 10px;
}

.quick-modal-copy-wrap p,
.quick-modal-subtext,
.quick-faq-item p {
    margin: 0;
    color: #d0d4e2;
    font-size: 12px;
    line-height: 1.55;
}

.quick-modal-subtext {
    color: var(--text-dim);
}

.quick-modal-link {
    width: 100%;
    border: 1px solid rgba(255,255,255,.12);
    background: rgba(255,255,255,.04);
    color: #fff;
    border-radius: 14px;
    padding: 12px 14px;
    font-size: 12px;
    font-weight: 800;
    outline: none;
}

.quick-modal-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin-top: 2px;
}

.quick-modal-btn {
    border: 1px solid rgba(255,255,255,.12);
    background: rgba(255,255,255,.05);
    color: #fff;
    border-radius: 14px;
    padding: 12px 14px;
    font-size: 12px;
    font-weight: 900;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease;
}

.quick-modal-btn:active {
    transform: scale(.98);
}

.quick-modal-btn.primary {
    background: linear-gradient(90deg, rgba(182,2,206,.62), rgba(239,2,203,.48));
    border-color: rgba(182,2,206,.34);
    box-shadow: 0 0 20px rgba(182,2,206,.18);
}

.quick-faq-item {
    display: grid;
    gap: 4px;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.08);
}

.quick-faq-item b {
    font-size: 12px;
    color: #fff;
}

.result-modal-card {
    position: relative;
    width: min(88vw, 360px);
    padding: 24px 20px 18px;
    border-radius: 24px;
    transform: translateY(22px) scale(.94);
    opacity: 0;
    transition: transform .35s cubic-bezier(.21,.81,.29,.98), opacity .26s ease, border-color .24s ease, box-shadow .24s ease;
}

#modal-res.is-open .result-modal-card {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.result-modal-card.is-win {
    border-color: rgba(0, 255, 136, .62);
    box-shadow: 0 0 46px rgba(0, 255, 136, .16);
}

.result-modal-card.is-lose {
    border-color: rgba(255, 59, 48, .65);
    box-shadow: 0 0 46px rgba(255, 59, 48, .16);
}

.result-game-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,.16);
    background: rgba(255,255,255,.05);
    color: var(--text-dim);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .6px;
}

.result-image-wrap {
    position: relative;
    width: 124px;
    height: 124px;
    margin: 2px auto 10px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.result-image-wrap::after {
    content: "";
    position: absolute;
    inset: 6px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,.16), transparent 70%);
    filter: blur(8px);
    z-index: 0;
    animation: resultHalo 1.8s ease-in-out infinite;
}

.result-image {
    position: relative;
    z-index: 1;
    width: 110px;
    height: 110px;
    object-fit: contain;
    filter: drop-shadow(0 14px 26px rgba(0,0,0,.44));
    animation: resultFloat 1.5s ease-in-out infinite;
    will-change: transform;
    transform: translateZ(0);
}

.result-text {
    margin: 2px 0 14px;
    color: #cfd4e3;
    font-size: 12px;
    font-weight: 700;
}

.result-modal-card.is-win .win-sum {
    color: var(--success);
    text-shadow: 0 0 14px rgba(0,255,136,.28);
}

.result-modal-card.is-lose .win-sum {
    color: var(--danger);
    text-shadow: 0 0 14px rgba(255,59,48,.22);
}

.result-modal-card.is-win .result-image-wrap::after {
    background: radial-gradient(circle, rgba(0,255,136,.32), transparent 72%);
}

.result-modal-card.is-lose .result-image-wrap::after {
    background: radial-gradient(circle, rgba(255,59,48,.3), transparent 72%);
}

.modal-card h2 { font-size: 28px; margin-bottom: 10px; font-weight: 900; }
.modal-card .win-sum { font-size: 32px; color: var(--success); font-weight: 900; margin: 15px 0; }

.modal-close {
    position: absolute;
    right: 16px;
    top: 12px;
    width: 44px;
    height: 44px;
    border: none;
    background: transparent;
    color: #fff;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.input-modal-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* --- DEPOSIT MODAL --- */
.deposit-modal-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: min(92vw, 400px);
    max-height: 90vh;
    overflow-y: auto;
    padding: 22px 18px 18px;
}
.deposit-close-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 59, 48, .15);
    color: #ff3b30;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .2s ease;
    z-index: 2;
}
.deposit-close-btn:hover {
    background: rgba(255, 59, 48, .25);
    transform: scale(1.08);
}
.deposit-close-btn:active {
    transform: scale(.95);
}
.deposit-title {
    font-size: 22px;
    font-weight: 900;
    margin: 0;
    text-align: center;
}
.deposit-tabs {
    display: flex;
    gap: 6px;
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 14px;
    padding: 4px;
}
.deposit-tab {
    flex: 1;
    padding: 8px 4px;
    border-radius: 12px;
    border: none;
    background: transparent;
    color: var(--text-dim);
    font-size: 11px;
    font-weight: 800;
    font-family: Montserrat, sans-serif;
    cursor: pointer;
    transition: all .2s ease;
    white-space: nowrap;
}
.deposit-tab.active {
    background: linear-gradient(180deg, rgba(182,2,206,.55), rgba(239,2,203,.4));
    color: #fff;
    box-shadow: 0 0 14px rgba(182,2,206,.3);
}
.deposit-panel {
    display: flex;
    flex-direction: column;
    gap: 12px;
    animation: depositFadeIn .2s ease;
}
@keyframes depositFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}
.deposit-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 30px 10px;
    text-align: center;
}
.deposit-placeholder-icon {
    font-size: 48px;
    opacity: .35;
}
.deposit-placeholder p {
    color: var(--text-dim);
    font-size: 13px;
    font-weight: 700;
    margin: 0;
}
.deposit-amount-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 16px;
    padding: 10px 14px;
}
.deposit-amount-icon {
    font-size: 22px;
    line-height: 1;
}
.deposit-amount-wrap input {
    flex: 1;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 18px;
    font-weight: 800;
    font-family: Montserrat, sans-serif;
    outline: none;
    min-width: 0;
}
.deposit-amount-wrap input::placeholder {
    color: rgba(255,255,255,.25);
}
.deposit-info-row {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-dim);
    font-weight: 600;
    padding: 0 4px;
}
.deposit-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-radius: 14px;
    background: linear-gradient(90deg, rgba(182,2,206,.2), rgba(239,2,203,.12));
    border: 1px solid rgba(182,2,206,.3);
    font-size: 12px;
    font-weight: 700;
    color: #e8d4ff;
    cursor: pointer;
    transition: transform .15s ease;
}
.deposit-bar:active {
    transform: scale(.985);
}
.deposit-bar-arrow {
    font-size: 11px;
    color: rgba(255,255,255,.7);
}
.deposit-quick {
    display: flex;
    gap: 8px;
}
.deposit-quick button {
    flex: 1;
    padding: 10px 4px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,.1);
    background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.02));
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    font-family: Montserrat, sans-serif;
    cursor: pointer;
    transition: all .15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}
.deposit-quick button span {
    font-size: 13px;
}
.deposit-quick button:active {
    transform: scale(.95);
    background: rgba(182,2,206,.2);
    border-color: rgba(182,2,206,.4);
}
.deposit-promo {
    display: flex;
    gap: 8px;
}
.deposit-promo input {
    flex: 1;
    padding: 10px 14px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,.1);
    background: rgba(255,255,255,.04);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    font-family: Montserrat, sans-serif;
    outline: none;
}
.deposit-promo input::placeholder {
    color: rgba(255,255,255,.3);
}
.deposit-promo button {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    border: none;
    background: linear-gradient(135deg, rgba(0,212,255,.6), rgba(0,150,220,.5));
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    transition: transform .15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}
.deposit-promo button:active {
    transform: scale(.92);
}
.deposit-submit {
    width: 100%;
    padding: 14px;
    border-radius: 16px;
    border: none;
    background: linear-gradient(90deg, rgba(182,2,206,.75), rgba(239,2,203,.55));
    color: #fff;
    font-size: 15px;
    font-weight: 900;
    font-family: Montserrat, sans-serif;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .2s ease;
    box-shadow: 0 0 20px rgba(182,2,206,.25);
    margin-top: 4px;
}
.deposit-submit:active {
    transform: scale(.97);
}

.confirm-modal-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    transform: translateY(12px) scale(.98);
    opacity: 0;
    transition: transform .22s ease, opacity .22s ease, border-color .2s ease, box-shadow .2s ease;
}

.confirm-modal-card.show {
    transform: translateY(0) scale(1);
    opacity: 1;
}

#modal-confirm.show .confirm-modal-card {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.confirm-modal-card.variant-sell {
    border-color: rgba(0,255,136,.45);
    box-shadow: 0 0 40px rgba(0,255,136,.12);
}

.confirm-modal-card.variant-withdraw {
    border-color: rgba(182,2,206,.45);
    box-shadow: 0 0 40px rgba(182,2,206,.15);
}

.confirm-modal-card.variant-buy {
    border-color: rgba(255,204,0,.5);
    box-shadow: 0 0 40px rgba(255,204,0,.16);
}

.confirm-modal-card.variant-buy .confirm-preview {
    background: linear-gradient(145deg, rgba(255,204,0,.08), rgba(182,2,206,.08));
}

.confirm-modal-card.variant-buy .confirm-text {
    color: #f3e9ff;
}

.confirm-preview {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255,255,255,.03);
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    padding: 10px;
}

.confirm-preview img {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    object-fit: contain;
    background: rgba(255,255,255,.04);
    transform: scale(.96);
    transition: transform .22s ease;
}

.confirm-modal-card.show .confirm-preview img {
    transform: scale(1);
}

@keyframes resultFloat {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-4px) scale(1.02); }
}

@keyframes openingRise {
    from { opacity: 0; transform: translateY(14px) scale(.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes sheenSweep {
    0% { transform: translateX(-120%); opacity: 0; }
    35% { opacity: .8; }
    100% { transform: translateX(120%); opacity: 0; }
}

@keyframes vfxPulse {
    0%, 100% { transform: scale(1); opacity: .8; }
    50% { transform: scale(1.03); opacity: 1; }
}

@keyframes grainShift {
    0% { transform: translate3d(0,0,0); }
    50% { transform: translate3d(1.5%, -.8%, 0); }
    100% { transform: translate3d(0,0,0); }
}

@keyframes resultHalo {
    0%, 100% { transform: scale(.92); opacity: .66; }
    50% { transform: scale(1.06); opacity: 1; }
}

.confirm-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.confirm-meta span {
    font-size: 12px;
    font-weight: 700;
}

.confirm-meta b {
    font-size: 12px;
    color: var(--gold);
}

.confirm-text {
    font-size: 12px;
    color: var(--text-dim);
}

#input-modal-field {
    width: 100%;
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    background: rgba(255,255,255,.03);
    color: #fff;
    font-size: 16px;
    font-weight: 800;
    padding: 12px;
    outline: none;
}

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

.btn-ghost {
    background: rgba(255,255,255,.06);
    box-shadow: none;
}

.toast-root {
    position: fixed;
    left: 50%;
    bottom: calc(100px + var(--safe-bottom));
    transform: translateX(-50%);
    z-index: 6500;
    display: grid;
    gap: 8px;
    width: min(92vw, 360px);
    pointer-events: none;
}

.big-win-root {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 6600;
    pointer-events: none;
}

.big-win-card {
    min-width: 240px;
    max-width: 88vw;
    background: linear-gradient(145deg, rgba(239,2,203,.18), rgba(182,2,206,.18));
    border: 1px solid rgba(255,255,255,.24);
    border-radius: 14px;
    padding: 10px 12px;
    opacity: 0;
    transform: translateY(-8px) scale(.98);
    transition: opacity .26s ease, transform .26s ease;
    box-shadow: 0 14px 30px rgba(0,0,0,.35);
}

.big-win-card.show {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.big-win-title {
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 1.2px;
    color: #ffd2f5;
}

.big-win-text {
    margin-top: 3px;
    font-size: 12px;
    color: #fff;
}

.big-win-val {
    margin-top: 5px;
    font-size: 14px;
    font-weight: 900;
    color: #ff93ea;
}

.toast-item {
    background: linear-gradient(180deg, rgba(18,18,28,.96), rgba(10,10,16,.92));
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 12px;
    padding: 10px 12px;
    font-size: 12px;
    font-weight: 700;
    opacity: 0;
    transform: translateY(8px) scale(.98);
    box-shadow: 0 10px 26px rgba(0,0,0,.24), inset 0 1px 0 rgba(255,255,255,.03);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: opacity .24s ease, transform .24s ease, box-shadow .24s ease;
    pointer-events: auto;
}

.toast-item.show {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.toast-item.success {
    border-color: rgba(0,255,136,.45);
    color: #b8ffd8;
    box-shadow: 0 10px 26px rgba(0,0,0,.24), 0 0 18px rgba(0,255,136,.08), inset 0 1px 0 rgba(255,255,255,.03);
    animation: toastSlideIn .26s ease-out, toastBreath 2.8s ease-in-out infinite;
}

.toast-item.error {
    border-color: rgba(255,59,48,.45);
    color: #ffd2cf;
}

.toast-item.info {
    border-color: rgba(0,212,255,.28);
    color: #d8f6ff;
}

@keyframes toastBreath {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-1px) scale(1.01); }
}

@keyframes toastSlideIn {
    from { transform: translateY(8px) scale(.96); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}

.mine-cell.boom {
    background: rgba(255, 59, 48, .2);
    border-color: rgba(255, 59, 48, .8);
}

/* Конец 8 части. Стили готовы. Переходим к верстке структуры! */

.section-head {
    padding: 18px 20px 10px;
}

.section-head h2 {
    font-size: 20px;
    font-weight: 900;
}

.section-head p {
    margin-top: 6px;
    font-size: 12px;
    color: var(--text-dim);
}

.gift-shop-head {
    padding: 20px 20px 10px;
    text-align: center;
}

.gift-shop-head h2 {
    font-size: 32px;
    font-weight: 900;
}

.gift-shop-head p {
    margin-top: 8px;
    font-size: 14px;
    color: var(--text-dim);
}

.gift-sort-row {
    margin-top: 10px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.gift-sort-btn {
    border: 1px solid rgba(255,255,255,.16);
    background: rgba(255,255,255,.04);
    color: #aeb7c8;
    border-radius: 10px;
    min-height: 34px;
    font-size: 11px;
    font-weight: 800;
}

.gift-sort-btn.active {
    color: #ffe4fd;
    border-color: rgba(239,2,203,.5);
    box-shadow: inset 0 0 16px rgba(182,2,206,.22), 0 0 14px rgba(239,2,203,.16);
}

.gift-shop-grid {
    margin: 10px 14px 24px;
    padding: 14px;
    border-radius: 28px;
    border: 1px solid var(--glass-border);
    background: rgba(22, 26, 44, .82);
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px 12px;
    content-visibility: auto;
    contain-intrinsic-size: 520px;
}

.gift-card {
    border: none;
    background: transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: #fff;
    contain: layout paint;
}

.gift-card img {
    width: 92px;
    height: 92px;
    object-fit: contain;
    filter: drop-shadow(0 12px 22px rgba(0,0,0,.34));
    backface-visibility: hidden;
}

.gift-price {
    width: 100%;
    border-radius: 14px;
    background: rgba(255,255,255,.18);
    border: 1px solid rgba(255,255,255,.14);
    padding: 7px 6px;
    text-align: center;
    font-size: 30px;
    font-weight: 900;
}

.gift-card.loading {
    grid-column: 1 / -1;
    min-height: 92px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: rgba(0,0,0,.24);
    border: 1px dashed rgba(255,255,255,.22);
    color: var(--text-dim);
    font-size: 12px;
    font-weight: 800;
}

.case-grid {
    padding: 10px 20px 24px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    position: relative;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,.08);
    background: linear-gradient(155deg, rgba(8,10,22,.72), rgba(16,12,30,.48));
    box-shadow: inset 0 0 24px rgba(182,2,206,.08), 0 0 28px rgba(182,2,206,.16);
}

.case-grid.case-grid-regular {
    padding-top: 8px;
    margin: 0 20px 20px;
    padding-left: 12px;
    padding-right: 12px;
    background: linear-gradient(165deg, rgba(8,10,22,.6), rgba(12,8,26,.42));
}

.case-subhead {
    margin: 2px 20px 0;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .35px;
    color: var(--text-dim);
    text-transform: uppercase;
    text-shadow: 0 0 12px rgba(182,2,206,.26);
}

.cases-live-strip {
    margin: 10px 20px 0;
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,.04);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 7px 10px;
    overflow: hidden;
}

.live-label {
    font-size: 11px;
    font-weight: 900;
    color: #fff;
}

.case-live-icons {
    display: flex;
    gap: 7px;
    white-space: nowrap;
    animation: feedScroll 18s linear infinite;
}

.case-live-icons span,
.case-live-icons img {
    flex-shrink: 0;
}
.case-live-icons span {
    font-size: 14px;
    opacity: .95;
}
.case-live-icons img {
    width: 30px;
    height: 30px;
    object-fit: cover;
    border-radius: 6px;
    animation: rotateIcon 4s linear infinite;
}

@keyframes feedScroll {
    from { transform: translateX(0); }
    to { transform: translateX(-40%); }
}

@keyframes rotateIcon {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.case-hero-wrap {
    position: relative;
    margin: 18px auto 8px;
    width: min(260px, 72vw);
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.case-hero-glow {
    position: absolute;
    inset: 18%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(239,2,203,.25), rgba(182,2,206,.1));
    filter: blur(16px);
}

.case-hero-image {
    position: relative;
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 12px 28px rgba(0,0,0,.45));
}

.case-actions-row {
    margin: 0 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.case-soft-btn {
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    background: rgba(255,255,255,.06);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    padding: 10px;
}

.case-speed-row {
    margin: 10px 20px 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.case-speed-btn {
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    background: rgba(255,255,255,.04);
    color: #d9deef;
    font-size: 12px;
    font-weight: 800;
    padding: 9px 10px;
    transition: border-color .18s ease, box-shadow .2s ease, transform .14s ease, color .18s ease, background .18s ease;
}

.case-speed-btn:active {
    transform: scale(.98);
}

.case-speed-btn.active {
    color: #fff;
    border-color: rgba(239, 2, 203, .55);
    background: linear-gradient(145deg, rgba(182,2,206,.35), rgba(239,2,203,.2));
    box-shadow: 0 0 16px rgba(182,2,206,.3);
}

.case-open-btn {
    margin: 12px 20px 0;
    width: calc(100% - 40px);
    background: linear-gradient(45deg, var(--accent-purple), var(--accent-pink));
    color: #fff;
    box-shadow: 0 6px 22px rgba(182,2,206,.35);
}

.case-card-ui {
    position: relative;
    background: linear-gradient(145deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01));
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
    animation: caseFloat 4.8s ease-in-out infinite;
    will-change: transform;
    transform: translateZ(0);
}

.case-card-ui:hover {
    transform: translateY(-2px);
    border-color: rgba(255,255,255,.18);
    box-shadow: 0 14px 30px rgba(0,0,0,.24), 0 0 24px rgba(182,2,206,.18);
}

.case-card-ui:nth-child(2n) { animation-delay: .55s; }
.case-card-ui:nth-child(3n) { animation-delay: 1.1s; }

.case-card-ui:active {
    transform: scale(.98);
    border-color: rgba(255,255,255,.2);
    box-shadow: 0 0 24px rgba(182,2,206,.2);
}

.case-card-ui.active {
    border-color: rgba(255,255,255,.28);
    box-shadow: 0 0 24px rgba(182,2,206,.24);
    animation: caseFloat 4.8s ease-in-out infinite, caseNeonPulse 2.25s ease-in-out infinite;
}

.case-card-ui.bonus {
    position: relative;
    border-color: rgba(255, 215, 90, .5);
    background: linear-gradient(145deg, rgba(255,204,0,.13), rgba(239,2,203,.12) 58%, rgba(182,2,206,.1));
    box-shadow: 0 0 24px rgba(255, 204, 0, .17), 0 0 28px rgba(182,2,206,.2);
}

.case-card-ui.bonus.locked {
    border-color: rgba(255, 149, 0, .62);
    box-shadow: 0 0 24px rgba(255, 149, 0, .24), 0 0 28px rgba(182,2,206,.14);
}

.case-card-ui.bonus::before {
    content: "BONUS";
    position: absolute;
    top: -8px;
    right: 10px;
    padding: 2px 8px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,.32);
    background: linear-gradient(145deg, rgba(255,204,0,.8), rgba(255,131,0,.72));
    color: #19110a;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .35px;
}

.case-card-ui.bonus-top-1 { order: -2; }
.case-card-ui.bonus-top-2 { order: -1; }

.case-cooldown {
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 7px;
    padding: 4px 8px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,.18);
    background: rgba(5, 7, 16, .72);
    color: #ffd792;
    font-size: 10px;
    font-weight: 900;
    text-align: center;
    letter-spacing: .25px;
    backdrop-filter: blur(5px);
}

.case-card-ui.regular {
    border-color: rgba(255,255,255,.12);
    background: linear-gradient(145deg, rgba(255,255,255,.05), rgba(255,255,255,.015));
}

.case-card-ui.regular.tone-violet { box-shadow: 0 0 20px rgba(182,2,206,.24), inset 0 0 16px rgba(182,2,206,.12); border-color: rgba(182,2,206,.45); }
.case-card-ui.regular.tone-azure { box-shadow: 0 0 20px rgba(0,160,255,.22), inset 0 0 16px rgba(0,160,255,.12); border-color: rgba(0,160,255,.44); }
.case-card-ui.regular.tone-pink { box-shadow: 0 0 20px rgba(239,2,203,.24), inset 0 0 16px rgba(239,2,203,.12); border-color: rgba(239,2,203,.46); }
.case-card-ui.regular.tone-gold { box-shadow: 0 0 20px rgba(255,193,7,.24), inset 0 0 16px rgba(255,193,7,.12); border-color: rgba(255,193,7,.46); }
.case-card-ui.regular.tone-cyan { box-shadow: 0 0 20px rgba(0,212,255,.24), inset 0 0 16px rgba(0,212,255,.12); border-color: rgba(0,212,255,.46); }
.case-card-ui.regular.tone-red { box-shadow: 0 0 20px rgba(255,82,82,.23), inset 0 0 16px rgba(255,82,82,.12); border-color: rgba(255,82,82,.44); }

.case-card-ui.regular.active {
    filter: saturate(1.15);
    transform: translateY(-1px);
}

.case-card-ui img {
    width: 64px;
    height: 64px;
    object-fit: contain;
}

.case-card-ui h3 {
    font-size: 14px;
    font-weight: 900;
}

.case-card-ui span {
    margin-left: auto;
    font-weight: 900;
    color: var(--gold);
    font-size: 13px;
}

.leaders-wrap {
    margin: 14px;
    padding: 12px;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
}

.leaders-title {
    font-size: 12px;
    color: var(--text-dim);
    margin-bottom: 8px;
    font-weight: 800;
}

.leaders-list {
    display: grid;
    gap: 7px;
}

.leader-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    background: rgba(0,0,0,0.2);
    border-radius: 10px;
    padding: 8px 10px;
    font-size: 12px;
    border: 1px solid rgba(255,255,255,.05);
}

.leader-row b {
    color: var(--gold);
}

.leader-row > div {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.leader-row small {
    font-size: 10px;
    color: var(--text-dim);
    font-weight: 600;
}

.leader-row.demo {
    background: linear-gradient(145deg, rgba(239,2,203,.09), rgba(182,2,206,.09));
    border-color: rgba(255,255,255,.12);
}

.demo-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 6px;
    padding: 1px 6px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,.22);
    background: rgba(182,2,206,.22);
    color: #ffd2f5;
    font-size: 9px;
    font-style: normal;
    font-weight: 800;
}

/* --- ТОПЫ / ЛИДЕРБОРД --- */
.tops-head {
    padding: 16px 16px 6px;
}
.tops-head h1 {
    font-size: 24px;
    font-weight: 900;
    margin: 0;
    letter-spacing: -0.3px;
}

.tops-countdown {
    margin: 0 16px 12px;
}
.tops-countdown > p {
    font-size: 11px;
    color: var(--text-dim);
    margin: 0 0 8px;
    font-weight: 600;
}
.tops-countdown-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}
.tops-countdown-cell {
    background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.02));
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 14px;
    padding: 10px 4px;
    text-align: center;
}
.tops-countdown-cell b {
    display: block;
    font-size: 22px;
    font-weight: 900;
    line-height: 1;
    margin-bottom: 4px;
}
.tops-countdown-cell span {
    font-size: 10px;
    color: var(--text-dim);
    font-weight: 700;
}

.tops-tabs {
    display: flex;
    gap: 8px;
    margin: 0 16px 14px;
}
.tops-tab {
    flex: 1;
    padding: 10px 8px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,.08);
    background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.02));
    color: var(--text-dim);
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    transition: all .2s ease;
}
.tops-tab.active {
    background: linear-gradient(180deg, rgba(182,2,206,.35), rgba(239,2,203,.18));
    border-color: rgba(182,2,206,.45);
    color: #fff;
    box-shadow: 0 0 16px rgba(182,2,206,.25);
}
.tops-tab:active {
    transform: scale(.97);
}

.tops-podium {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 14px;
    margin: 0 16px 16px;
    padding: 8px 0 0;
    min-height: 160px;
}
.tops-podium-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}
.tops-podium-item.pos-1 {
    order: 2;
    margin-bottom: 10px;
}
.tops-podium-item.pos-2 {
    order: 1;
    margin-bottom: 2px;
}
.tops-podium-item.pos-3 {
    order: 3;
    margin-bottom: 0;
}
.tops-podium-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 900;
    color: #fff;
    background: linear-gradient(135deg, rgba(182,2,206,.5), rgba(239,2,203,.35));
    border: 2px solid rgba(255,255,255,.18);
    box-shadow: 0 4px 14px rgba(0,0,0,.4);
    overflow: hidden;
}
.tops-podium-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.tops-podium-score {
    margin-top: 6px;
    padding: 3px 10px;
    border-radius: 999px;
    background: rgba(0,0,0,.45);
    border: 1px solid rgba(255,255,255,.1);
    font-size: 11px;
    font-weight: 900;
    color: var(--gold);
    display: flex;
    align-items: center;
    gap: 3px;
}
.tops-podium-name {
    margin-top: 5px;
    font-size: 11px;
    font-weight: 800;
    color: rgba(255,255,255,.85);
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.tops-podium-block {
    margin-top: 10px;
    width: 64px;
    height: 44px;
    border-radius: 10px 10px 4px 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 900;
    color: rgba(255,255,255,.85);
    background: linear-gradient(180deg, rgba(182,2,206,.35), rgba(80,0,160,.45));
    border: 1px solid rgba(182,2,206,.3);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
    text-shadow: 0 1px 2px rgba(0,0,0,.3);
}

.tops-list-wrap {
    margin: 0 14px 14px;
    padding: 10px 10px 14px;
    background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.01));
    border: 1px solid rgba(255,255,255,.06);
    border-radius: 18px;
}
.tops-list {
    display: grid;
    gap: 7px;
}
.tops-row {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(0,0,0,.25);
    border-radius: 14px;
    padding: 9px 12px;
    border: 1px solid rgba(255,255,255,.05);
}
.tops-rank {
    font-size: 13px;
    font-weight: 900;
    color: var(--text-dim);
    min-width: 26px;
    text-align: left;
    flex-shrink: 0;
}
.tops-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 900;
    color: #fff;
    border: 2px solid rgba(255,255,255,.1);
    overflow: hidden;
}
.tops-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.tops-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.tops-username {
    font-size: 13px;
    font-weight: 800;
    color: #fff;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.tops-score {
    font-size: 11px;
    font-weight: 800;
    color: var(--gold);
    display: flex;
    align-items: center;
    gap: 3px;
}
.tops-reward-emoji {
    font-size: 28px;
    line-height: 1;
    flex-shrink: 0;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,.4));
    margin-left: 4px;
}

.profile-head {
    padding: 16px 16px 6px;
}
.profile-head h1 {
    font-size: 24px;
    font-weight: 900;
    margin: 0;
    letter-spacing: -0.3px;
}

.profile-inventory-card {
    margin: 4px 16px 16px;
    padding: 14px 14px 12px;
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.02));
    border: 1px solid rgba(255,255,255,.08);
    box-shadow: 0 8px 24px rgba(0,0,0,.2);
}

.profile-prize-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 12px;
}
.profile-prize-slot {
    aspect-ratio: 1;
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.02));
    border: 1px solid rgba(255,255,255,.08);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}
.profile-prize-slot.empty span {
    font-size: 32px;
    opacity: .25;
    filter: grayscale(1);
}
.profile-prize-slot.all {
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    transition: transform .15s ease, border-color .2s ease, box-shadow .18s ease;
}
.profile-prize-slot.all:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(182,2,206,.12);
}
.profile-prize-slot.all:active {
    transform: scale(.96);
}
.profile-prize-grid-icon {
    font-size: 24px;
    opacity: .55;
}
.profile-prize-grid-label {
    font-size: 10px;
    font-weight: 800;
    color: rgba(255,255,255,.55);
}

.profile-gift-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-radius: 14px;
    background: linear-gradient(90deg, rgba(182,2,206,.2), rgba(239,2,203,.12));
    border: 1px solid rgba(182,2,206,.3);
    font-size: 12px;
    font-weight: 700;
    color: #e8d4ff;
    cursor: pointer;
    transition: transform .15s ease, filter .18s ease;
}
.profile-gift-bar:hover { filter: brightness(1.06); }
.profile-gift-bar:active {
    transform: scale(.985);
}
.profile-gift-arrow {
    font-size: 11px;
    color: rgba(255,255,255,.7);
}

.profile-section {
    margin: 0 16px 14px;
}
.profile-section h2 {
    font-size: 20px;
    font-weight: 900;
    margin: 0 0 10px;
    letter-spacing: -0.2px;
}

.profile-menu-list {
    display: grid;
    gap: 0;
    background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.01));
    border: 1px solid rgba(255,255,255,.06);
    border-radius: 18px;
    overflow: hidden;
}
.profile-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    cursor: pointer;
    transition: background .15s ease, transform .18s ease, box-shadow .18s ease;
    border-bottom: 1px solid rgba(255,255,255,.05);
}
.profile-menu-item:last-child {
    border-bottom: none;
}
.profile-menu-item:hover {
    background: rgba(255,255,255,.045);
    transform: translateX(2px);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.03);
}
.profile-menu-item:active {
    background: rgba(255,255,255,.04);
    transform: translateX(1px) scale(.995);
}
.profile-menu-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
    transition: transform .18s ease, filter .18s ease;
}
.profile-menu-item:hover .profile-menu-icon { transform: scale(1.05); filter: brightness(1.1); }
.profile-menu-label {
    flex: 1;
    font-size: 13px;
    font-weight: 700;
    color: rgba(255,255,255,.9);
}
.profile-menu-arrow {
    font-size: 13px;
    color: rgba(255,255,255,.3);
    font-weight: 700;
}

/* --- ПРОФИЛЬ: ИНВЕНТАРЬ --- */
.profile-empty-state {
    margin: 10px 16px 20px;
    padding: 30px 20px 24px;
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.01));
    border: 1px solid rgba(255,255,255,.06);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}
.profile-empty-icon {
    font-size: 64px;
    line-height: 1;
    margin-bottom: 4px;
    filter: drop-shadow(0 0 20px rgba(182,2,206,.4));
}
.profile-empty-state h3 {
    font-size: 18px;
    font-weight: 900;
    margin: 0;
    color: #fff;
}
.profile-empty-state p {
    font-size: 12px;
    color: var(--text-dim);
    line-height: 1.6;
    margin: 0;
    max-width: 260px;
}
.profile-empty-bot {
    color: #c084fc;
    font-weight: 800;
}
.profile-empty-btn {
    width: 100%;
    max-width: 280px;
    padding: 12px 16px;
    border-radius: 14px;
    border: none;
    font-size: 13px;
    font-weight: 800;
    font-family: Montserrat, sans-serif;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .2s ease, filter .18s ease;
}
.profile-empty-btn:hover { filter: brightness(1.06); }
.profile-empty-btn:active {
    transform: scale(.97);
}
.profile-empty-btn-primary {
    background: linear-gradient(90deg, rgba(182,2,206,.6), rgba(239,2,203,.45));
    color: #fff;
    box-shadow: 0 0 20px rgba(182,2,206,.25);
}
.profile-empty-btn-secondary {
    background: linear-gradient(90deg, rgba(182,2,206,.35), rgba(239,2,203,.25));
    color: #e8d4ff;
    border: 1px solid rgba(182,2,206,.3);
}
.profile-empty-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    max-width: 280px;
    margin: 4px 0;
    color: rgba(255,255,255,.25);
    font-size: 11px;
    font-weight: 800;
}
.profile-empty-divider::before,
.profile-empty-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255,255,255,.08);
}
.profile-empty-hint {
    font-size: 11px !important;
    color: rgba(255,255,255,.45) !important;
}

.profile-prize-slot.has-item {
    cursor: pointer;
    transition: transform .15s ease, box-shadow .18s ease, border-color .18s ease;
    background: linear-gradient(180deg, rgba(182,2,206,.1), rgba(239,2,203,.05));
    border-color: rgba(182,2,206,.2);
    padding: 8px;
}
.profile-prize-slot.has-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 22px rgba(182,2,206,.14);
    border-color: rgba(182,2,206,.35);
}
.profile-prize-slot.has-item:active {
    transform: scale(.95);
}
.profile-prize-slot.has-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,.4));
}

/* Full inventory overlay inside profile */
.profile-full-inv {
    margin: 4px 16px 16px;
    animation: profileFadeIn .25s ease;
}
@keyframes profileFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
.profile-full-inv-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    gap: 8px;
}
.profile-full-inv-head h2 {
    font-size: 16px;
    font-weight: 900;
    margin: 0;
    flex: 1;
    text-align: center;
}
.profile-full-inv-back {
    background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.03));
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 12px;
    padding: 8px 12px;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    font-family: Montserrat, sans-serif;
    cursor: pointer;
    transition: all .15s ease;
    flex-shrink: 0;
}
.profile-full-inv-back:hover {
    transform: translateY(-1px);
}
.profile-full-inv-back:active {
    transform: scale(.95);
    background: rgba(182,2,206,.2);
    border-color: rgba(182,2,206,.4);
}
.profile-full-inv-count {
    font-size: 11px;
    color: var(--text-dim);
    font-weight: 700;
    flex-shrink: 0;
}
.profile-full-inv-list {
    display: grid;
    gap: 8px;
    max-height: 60vh;
    overflow-y: auto;
    padding-right: 4px;
}
.profile-full-inv-item {
    display: grid;
    grid-template-columns: 56px 1fr auto;
    gap: 10px;
    align-items: center;
    background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.02));
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 16px;
    padding: 10px 12px;
}
.profile-full-inv-item img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    border-radius: 10px;
}
.profile-full-inv-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}
.profile-full-inv-name {
    font-size: 12px;
    font-weight: 800;
    color: #fff;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.profile-full-inv-price {
    font-size: 11px;
    font-weight: 800;
    color: var(--gold);
}
.profile-full-inv-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-shrink: 0;
}
.profile-inv-btn {
    padding: 6px 10px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,.12);
    font-size: 10px;
    font-weight: 800;
    font-family: Montserrat, sans-serif;
    cursor: pointer;
    transition: all .15s ease;
    white-space: nowrap;
}
.profile-inv-btn:active {
    transform: scale(.95);
}
.profile-inv-btn-sell {
    background: linear-gradient(180deg, rgba(255,46,80,.25), rgba(255,46,80,.1));
    border-color: rgba(255,46,80,.35);
    color: #ff7a8a;
}
.profile-inv-btn-withdraw {
    background: linear-gradient(180deg, rgba(0,212,255,.25), rgba(0,212,255,.1));
    border-color: rgba(0,212,255,.35);
    color: #a5f3fc;
}

.profile-sell-all-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(180deg, rgba(255,46,80,.12), rgba(255,46,80,.04));
    border: 1px solid rgba(255,46,80,.25);
    border-radius: 14px;
    padding: 10px 14px;
    margin-bottom: 12px;
    gap: 10px;
}
.profile-sell-all-text {
    font-size: 12px;
    font-weight: 800;
    color: #ff7a8a;
}
.profile-sell-all-btn {
    background: linear-gradient(180deg, rgba(255,46,80,.35), rgba(255,46,80,.15));
    border: 1px solid rgba(255,46,80,.45);
    border-radius: 10px;
    padding: 7px 14px;
    font-size: 11px;
    font-weight: 900;
    font-family: Montserrat, sans-serif;
    color: #fff;
    cursor: pointer;
    transition: all .15s ease;
    flex-shrink: 0;
}
.profile-sell-all-btn:active {
    transform: scale(.95);
    background: linear-gradient(180deg, rgba(255,46,80,.5), rgba(255,46,80,.25));
}

.inv-item img {
    width: 42px;
    height: 42px;
    object-fit: contain;
    grid-row: 1 / 3;
}

.inv-name {
    font-size: 12px;
    font-weight: 800;
}

.inv-price {
    font-size: 11px;
    color: var(--gold);
}

.inv-actions {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.inv-actions button {
    border: 1px solid var(--glass-border);
    background: rgba(255,255,255,0.04);
    color: white;
    border-radius: 10px;
    padding: 8px;
    font-size: 11px;
    font-weight: 700;
}

.empty-text {
    color: var(--text-dim);
    font-size: 12px;
}

.case-opening-vfx {
    position: fixed;
    inset: 0;
    z-index: 5000;
    background: radial-gradient(circle at center, rgba(20,20,28,.95), rgba(8,8,12,.98));
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
    transition: opacity .32s ease;
}

.case-opening-vfx::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(circle at 50% 44%, rgba(182,2,206,.16), transparent 34%), radial-gradient(circle at 50% 54%, rgba(239,2,203,.08), transparent 44%);
    animation: vfxPulse 4.6s ease-in-out infinite;
}

.case-opening-vfx.done {
    opacity: 0;
}

.opening-content-box {
    width: 100%;
    max-width: 420px;
    padding: 0 16px;
    position: relative;
    z-index: 2;
    animation: openingRise .52s cubic-bezier(.2,.9,.24,1) both;
}

.opening-title {
    text-align: center;
    font-size: 14px;
    letter-spacing: 1.6px;
    color: var(--text-dim);
}

.case-viewport {
    position: relative;
    width: 100%;
    height: 128px;
    margin-top: 14px;
    border-radius: 18px;
    border: 1px solid var(--glass-border);
    overflow: hidden;
    background: rgba(255,255,255,.02);
    mask-image: linear-gradient(to right, transparent, black 12%, black 88%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 12%, black 88%, transparent);
}

.case-viewport::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.05), transparent);
    opacity: .7;
    animation: sheenSweep 8s ease-in-out infinite;
}

.case-reel {
    position: absolute;
    left: 0;
    top: 14px;
    display: flex;
    align-items: center;
    transition: transform var(--case-spin-duration, 5.8s) cubic-bezier(.06,.82,.17,1);
    will-change: transform;
}

.case-opening-vfx .case-reel {
    transition-duration: var(--case-spin-duration, 5.8s) !important;
}

.item-card {
    width: 90px;
    min-width: 90px;
    height: 90px;
    margin: 0 5px;
    border-radius: 14px;
    background: #1d1d27;
    border: 1px solid rgba(255,255,255,.08);
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.03);
}

.item-card img {
    width: 64px;
    height: 64px;
    object-fit: contain;
    pointer-events: none;
    user-select: none;
    filter: drop-shadow(0 10px 18px rgba(0,0,0,.4));
}

.item-card.is-near-win {
    border-color: rgba(255,255,255,.08);
}

.item-card.is-win {
    border-color: rgba(255,255,255,.08);
    box-shadow: none;
}

.item-card.is-win.reveal {
    border-color: rgba(255, 204, 0, .9);
    box-shadow: 0 0 24px rgba(255, 204, 0, .45), inset 0 0 22px rgba(255, 204, 0, .22);
    animation: caseWinReveal .58s cubic-bezier(.18,.92,.22,1) both;
}

.item-card.is-near-win {
    filter: saturate(1.06) brightness(1.04);
}

.item-card.is-win::after {
    content: "";
    position: absolute;
    inset: -1px;
    background: linear-gradient(135deg, transparent 22%, rgba(255,255,255,.12) 50%, transparent 78%);
    opacity: .7;
    pointer-events: none;
    animation: sheenSweep 2.8s ease-in-out infinite;
}

@keyframes caseWinReveal {
    0% {
        transform: scale(1);
        filter: brightness(1);
        box-shadow: 0 0 16px rgba(249, 181, 204, .35), inset 0 0 18px rgba(255, 204, 0, .16);
    }
    48% {
        transform: scale(1.1);
        filter: brightness(1.25);
        box-shadow: 0 0 26px rgba(255, 204, 0, .62), 0 0 42px rgba(239, 2, 203, .28), inset 0 0 24px rgba(255, 204, 0, .25);
    }
    100% {
        transform: scale(1.04);
        filter: brightness(1.12);
        box-shadow: 0 0 20px rgba(255, 204, 0, .48), 0 0 30px rgba(239, 2, 203, .2), inset 0 0 20px rgba(255, 204, 0, .18);
    }
}

.item-card img {
    width: 58px;
    height: 58px;
    object-fit: contain;
}

.case-pointer {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 2px;
    transform: translateX(-50%);
    background: linear-gradient(to bottom, transparent, var(--gold), transparent);
    box-shadow: 0 0 18px rgba(255,204,0,.5);
    animation: casePointerPulse 1.2s ease-in-out infinite;
    z-index: 3;
}

@keyframes casePointerPulse {
    0%, 100% { opacity: .68; box-shadow: 0 0 14px rgba(255,204,0,.34); }
    50% { opacity: 1; box-shadow: 0 0 22px rgba(255,204,0,.62); }
}

@media (max-width: 430px) {
    .top-bar {
        padding: calc(10px + var(--safe-top)) 12px 10px;
    }

    .back-btn {
        top: calc(58px + var(--safe-top));
        left: 10px;
    }

    .game-grid {
        gap: 10px;
        padding: 14px;
    }

    .game-item {
        min-height: 144px;
        border-radius: 18px;
        padding: 14px 10px;
    }

    .game-item img {
        width: 64px;
        height: 64px;
    }

    .input-row {
        gap: 8px;
    }

    #bet-panel .input-row {
        grid-template-columns: minmax(120px, 1fr) minmax(0, 1.25fr);
    }

    .mines-bet-row {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
    }

    .bet-boost-row {
        gap: 5px;
    }

    .bet-boost-row > button,
    .q-btn,
    .mines-q-btn,
    .arena-q-btn {
        min-height: 40px;
        font-size: 11px;
        padding: 6px 8px;
    }

    .crash-area {
        height: clamp(184px, 28dvh, 244px);
    }

    .crash-area .crash-rocket {
        width: clamp(96px, 32vw, 140px);
        bottom: 28px;
    }

    .crash-history-panel {
        padding: 8px 10px 10px;
    }
    .history-item {
        font-size: 10px;
        padding: 5px 3px;
    }

    .crash-live-bets {
        gap: 6px;
    }

    .crash-cashout-preview-body img {
        width: 48px;
        height: 48px;
    }

    .crash-cashout-preview-meta span {
        max-width: 140px;
    }

    .crash-controls {
        grid-template-columns: 1fr 1fr;
    }

    .crash-auto-stop-wrap {
        grid-column: 1 / -1;
    }

    .bet-panel {
        padding: 10px 12px;
    }

    .bottom-menu {
        padding-top: 7px;
    }

    .mines-container {
        padding: 12px;
        gap: 8px;
        min-height: calc(100vh - 198px);
    }

    .mines-grid {
        max-height: 40vh;
    }

    .mines-grid.size-1 {
        max-width: min(100px, 36vw);
    }
    .mines-grid.size-4 {
        max-width: min(210px, 54vw);
    }
    .mines-grid.size-9 {
        max-width: min(290px, 68vw);
        max-height: 34vh;
    }
    .mines-grid.size-16 {
        max-width: min(360px, 78vw);
    }
    .mines-grid.size-25 {
        max-height: 48vh;
    }
    .mines-grid.size-36 {
        max-width: min(380px, 90vw);
        max-height: 50vh;
        gap: 6px;
    }
    .mines-grid.size-49 {
        max-width: min(400px, 92vw);
        max-height: 52vh;
        gap: 6px;
    }

    .crash-area .crash-multiplier {
        font-size: 38px;
    }

    .gift-shop-head h2 {
        font-size: 26px;
    }

    .gift-shop-head p {
        font-size: 12px;
    }

    .gift-card img {
        width: 78px;
        height: 78px;
    }

    .gift-price {
        font-size: 20px;
    }

    .btn-main {
        font-size: 15px;
    }

    .arena-pot-value {
        font-size: 20px;
    }

    .modal-card {
        width: 92%;
        padding: 22px;
        border-radius: 22px;
    }
}

/* --- ШКАЛА (SCALE GAME) --- */

.scale-header {
    text-align: center;
    padding: 16px 14px 8px;
}

.scale-header h2 {
    font-size: 22px;
    font-weight: 900;
    color: #fff;
    margin: 0 0 4px;
    letter-spacing: .5px;
}

.scale-header p {
    font-size: 13px;
    color: var(--text-dim);
    margin: 0;
}

.scale-empty-msg {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
}

.scale-empty-msg img {
    width: 80px;
    height: 80px;
    margin-bottom: 16px;
    opacity: .5;
}

.scale-empty-msg h3 {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 8px;
}

.scale-empty-msg p {
    font-size: 13px;
    color: var(--text-dim);
    margin: 0 0 20px;
}

.scale-content {
    padding: 0 14px 20px;
}

.scale-section {
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 20px;
    padding: 16px;
    margin-bottom: 12px;
}

.scale-section-title {
    font-size: 13px;
    font-weight: 700;
    color: rgba(255,255,255,.7);
    text-align: center;
    margin: 0 0 12px;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.scale-gifts-row,
.scale-desired-row {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 80px;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
}

.scale-gift-chip {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 6px;
    flex-shrink: 0;
    border-radius: 16px;
    background: rgba(255, 255, 255, .08);
    border: 2px solid rgba(255, 255, 255, .12);
    cursor: pointer;
    transition: all .2s ease;
}

.scale-gift-chip:active {
    transform: scale(.95);
}

.scale-gift-chip img {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    object-fit: cover;
}

.scale-gift-price {
    font-size: 11px;
    font-weight: 700;
    color: #ffd700;
    background: rgba(0,0,0,.4);
    padding: 2px 8px;
    border-radius: 999px;
}

.scale-add-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 72px;
    height: 72px;
    border-radius: 16px;
    border: 2px dashed rgba(255, 255, 255, .25);
    background: transparent;
    cursor: pointer;
    transition: all .2s ease;
    flex-shrink: 0;
}

.scale-add-btn span {
    font-size: 24px;
    font-weight: 300;
    color: rgba(255,255,255,.6);
}

.scale-add-btn small {
    font-size: 10px;
    color: rgba(255,255,255,.4);
    text-align: center;
    line-height: 1.1;
}

.scale-add-btn:active {
    background: rgba(255,255,255,.05);
}

/* Chance panel */
.scale-chance-panel {
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 20px;
    padding: 16px;
    margin-bottom: 12px;
}

.scale-chance-value {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.scale-chance-value span:first-child {
    font-size: 20px;
    font-weight: 900;
    color: #fff;
}

.scale-risk-text {
    font-size: 12px;
    font-weight: 600;
    color: rgba(255,255,255,.6);
}

.scale-chance-bar {
    position: relative;
    height: 32px;
    border-radius: 12px;
    background: rgba(255,255,255,.1);
    overflow: hidden;
    margin-bottom: 10px;
}

.scale-chance-fill {
    height: 100%;
    border-radius: 12px;
    background: linear-gradient(90deg, #00c853, #64dd17);
    transition: width .6s cubic-bezier(.23,1,.32,1);
    box-shadow: 0 0 12px rgba(0,200,83,.3);
}

.scale-chance-marker {
    position: absolute;
    left: 0%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 22px;
    height: 22px;
    background: #fff;
    border: 3px solid #00ff88;
    border-radius: 50%;
    box-shadow: 0 0 16px rgba(0,255,136,.8), 0 0 8px rgba(255,255,255,.6);
    opacity: 0;
    transition: opacity .2s;
    z-index: 2;
    pointer-events: none;
}

.scale-chance-marker.active {
    opacity: 1;
}

.scale-chance-marker.animating {
    transition: none;
}

.scale-warning {
    text-align: center;
    font-size: 11px;
    color: rgba(255,255,255,.4);
    margin: 0;
}

.scale-upgrade-btn {
    width: 100%;
    padding: 16px;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 900;
    background: linear-gradient(45deg, #2962ff, #448aff);
    border: none;
    color: #fff;
    cursor: pointer;
    transition: all .2s ease;
    box-shadow: 0 8px 24px rgba(41, 98, 255, .35);
}

.scale-upgrade-btn:disabled {
    opacity: .5;
    filter: grayscale(.4);
    cursor: not-allowed;
}

.scale-upgrade-btn:not(:disabled):active {
    transform: scale(.98);
}

/* Result screen */
.scale-result {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 14px 20px;
}

.scale-result-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px;
    border-radius: 14px;
    margin-bottom: 12px;
    font-size: 15px;
    font-weight: 700;
}

.scale-result-banner.win {
    background: rgba(0, 200, 83, .2);
    color: #69f0ae;
    border: 1px solid rgba(0, 200, 83, .3);
}

.scale-result-banner.lose {
    background: rgba(255, 50, 50, .2);
    color: #ff8a80;
    border: 1px solid rgba(255, 50, 50, .3);
}

.scale-result-banner span:first-child {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 900;
}

/* Picker modal */
.scale-picker-card {
    max-height: 75vh;
    display: flex;
    flex-direction: column;
    padding-bottom: calc(16px + var(--safe-bottom));
}

.scale-picker-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    overflow-y: auto;
    padding: 4px;
    margin: 12px 0;
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
}

.scale-picker-card .btn-main {
    flex-shrink: 0;
    margin-top: auto;
}

.scale-picker-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px;
    border-radius: 14px;
    background: rgba(255, 255, 255, .04);
    border: 2px solid rgba(255, 255, 255, .08);
    cursor: pointer;
    transition: all .2s ease;
}

.scale-picker-item.selected {
    background: rgba(182, 2, 206, .15);
    border-color: rgba(182, 2, 206, .5);
    box-shadow: 0 0 16px rgba(182, 2, 206, .2);
}

.scale-picker-item img {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    object-fit: cover;
}

.scale-picker-name {
    font-size: 10px;
    font-weight: 600;
    color: #fff;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

.scale-picker-price {
    font-size: 10px;
    font-weight: 700;
    color: #ffd700;
}

@media (max-width: 380px) {
    .scale-picker-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .scale-gift-chip img {
        width: 48px;
        height: 48px;
    }

    .scale-header h2 {
        font-size: 18px;
    }

    .scale-chance-value span:first-child {
        font-size: 16px;
    }
}

/* --- FORTUNE GAME (CYBER-NEON) --- */
#screen-fortune {
    position: relative;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(182,2,206,.55) rgba(0,0,0,.2);
}

#screen-fortune::-webkit-scrollbar {
    width: 8px;
}

#screen-fortune::-webkit-scrollbar-track {
    background: rgba(0,0,0,.15);
    border-radius: 4px;
}

#screen-fortune::-webkit-scrollbar-thumb {
    background: rgba(182,2,206,.55);
    border-radius: 4px;
    border: 2px solid transparent;
    background-clip: content-box;
}

.fortune-mesh-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}
.fortune-mesh-1, .fortune-mesh-2, .fortune-mesh-3 {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: .35;
}
.fortune-mesh-1 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(182,2,206,.6), transparent);
    top: -60px;
    left: -80px;
    animation: fortuneMeshMove1 12s ease-in-out infinite alternate;
}
.fortune-mesh-2 {
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(239,2,203,.5), transparent);
    bottom: -40px;
    right: -60px;
    animation: fortuneMeshMove2 15s ease-in-out infinite alternate;
}
.fortune-mesh-3 {
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(0,212,255,.4), transparent);
    top: 40%;
    left: 50%;
    transform: translateX(-50%);
    animation: fortuneMeshMove3 10s ease-in-out infinite alternate;
}
@keyframes fortuneMeshMove1 {
    0% { transform: translate(0, 0); }
    100% { transform: translate(40px, 30px); }
}
@keyframes fortuneMeshMove2 {
    0% { transform: translate(0, 0); }
    100% { transform: translate(-30px, -40px); }
}
@keyframes fortuneMeshMove3 {
    0% { transform: translateX(-50%) translateY(0); }
    100% { transform: translateX(-50%) translateY(-20px); }
}

.fortune-head {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 16px 0 8px;
}
.fortune-head h2 {
    font-size: 24px;
    font-weight: 900;
    color: #fff;
    margin: 0;
}
@keyframes fortuneTextShine {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}
.fortune-head p {
    color: var(--text-dim);
    font-size: 12px;
    margin: 4px 0 0;
}

.fortune-mode-row {
    position: relative;
    z-index: 1;
    display: flex;
    gap: 10px;
    padding: 0 16px;
    margin-bottom: 18px;
}
.fortune-mode-btn {
    flex: 1;
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 16px;
    padding: 12px 4px;
    color: var(--text-main);
    cursor: pointer;
    transition: all .25s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    backdrop-filter: blur(8px);
}
.fortune-mode-btn.active {
    border-color: rgba(182,2,206,.6);
    background: linear-gradient(180deg, rgba(182,2,206,.15), rgba(239,2,203,.08));
    box-shadow: 0 0 24px rgba(182,2,206,.25), inset 0 1px 0 rgba(255,255,255,.1);
}
.fortune-mode-btn .mode-name {
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .8px;
}
.fortune-mode-btn .mode-price {
    font-size: 14px;
    font-weight: 700;
    color: var(--gold);
}

.fortune-wheel-wrap {
    position: relative;
    width: 280px;
    height: 280px;
    margin: 0 auto 18px;
    z-index: 1;
}
.fortune-wheel-glow {
    position: absolute;
    inset: -10px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(182,2,206,.2), transparent 70%);
    opacity: .6;
    animation: fortuneWheelPulse 2.5s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}
@keyframes fortuneWheelPulse {
    0%, 100% { opacity: .4; transform: scale(1); }
    50% { opacity: .8; transform: scale(1.04); }
}
#fortune-wheel {
    width: 280px;
    height: 280px;
    border-radius: 50%;
    display: block;
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 0 12px rgba(182,2,206,.3));
    will-change: transform;
    transform: translateZ(0);
}

.fortune-arrow {
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
    border-top: 22px solid #fff;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,.6)) drop-shadow(0 0 8px rgba(255,255,255,.4));
    z-index: 3;
    transition: transform .08s ease;
}
.fortune-arrow.bump {
    animation: fortuneArrowBump .15s ease;
}
@keyframes fortuneArrowBump {
    0% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(6px); }
    100% { transform: translateX(-50%) translateY(0); }
}

.fortune-center-hub {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background: rgba(255,255,255,.08);
    border: 2px solid rgba(255,255,255,.2);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
    box-shadow: 0 0 30px rgba(182,2,206,.3), inset 0 1px 2px rgba(255,255,255,.15);
    cursor: pointer;
    transition: all .2s ease;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}
.fortune-center-hub:active {
    transform: translate(-50%, -50%) scale(.92);
    box-shadow: 0 0 40px rgba(182,2,206,.5), inset 0 1px 2px rgba(255,255,255,.2);
}
.fortune-center-hub span {
    font-size: 11px;
    font-weight: 900;
    color: #fff;
    letter-spacing: 1px;
    text-shadow: 0 0 12px rgba(182,2,206,.8);
}

.fortune-speed-row {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 16px;
}
.fortune-speed-label {
    font-size: 12px;
    color: var(--text-dim);
    font-weight: 600;
}
.fortune-toggle-mini {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}
.fortune-toggle-track-mini {
    width: 40px;
    height: 22px;
    border-radius: 11px;
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.12);
    position: relative;
    transition: all .25s ease;
}
.fortune-toggle-track-mini.active {
    background: linear-gradient(45deg, var(--accent-purple), var(--accent-pink));
    border-color: transparent;
}
.fortune-toggle-thumb-mini {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,.3);
    transition: transform .25s cubic-bezier(.4,0,.2,1);
}
.fortune-toggle-track-mini.active .fortune-toggle-thumb-mini {
    transform: translateX(18px);
}
#fortune-speed-text {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-main);
    min-width: 68px;
}

.fortune-spin-btn {
    position: relative;
    z-index: 1;
    display: block;
    width: calc(100% - 32px);
    margin: 0 auto 14px;
    padding: 16px;
    border: none;
    border-radius: 18px;
    background: linear-gradient(45deg, var(--accent-purple), var(--accent-pink));
    color: #fff;
    font-size: 16px;
    font-weight: 900;
    letter-spacing: 1px;
    cursor: pointer;
    box-shadow: 0 8px 32px rgba(182,2,206,.4);
    transition: transform .15s ease, box-shadow .2s ease;
    font-family: Montserrat, sans-serif;
}
.fortune-spin-btn:active {
    transform: scale(.96);
}
.fortune-spin-btn:disabled {
    opacity: .45;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.fortune-legend {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
    padding: 0 16px 24px;
}
.fortune-legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    color: var(--text-dim);
    font-weight: 600;
}
.legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.fortune-win-flash {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 3px solid rgba(0,255,136,.8);
    box-shadow: 0 0 30px rgba(0,255,136,.5), inset 0 0 30px rgba(0,255,136,.2);
    opacity: 0;
    pointer-events: none;
    z-index: 2;
    animation: fortuneWinFlash 1.2s ease-in-out;
}
@keyframes fortuneWinFlash {
    0% { opacity: 0; transform: scale(.9); }
    30% { opacity: 1; transform: scale(1.02); }
    70% { opacity: .6; }
    100% { opacity: 0; transform: scale(1.05); }
}

.fortune-multiply-anim {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
    text-align: center;
    pointer-events: none;
}
.fortune-multiply-anim .multiply-value {
    font-size: 64px;
    font-weight: 900;
    color: var(--success);
    text-shadow: 0 0 40px rgba(0,255,136,.5);
    animation: fortuneMultiplyPop .8s cubic-bezier(.175,.885,.32,1.275) forwards;
}
.fortune-multiply-anim .multiply-label {
    font-size: 18px;
    color: #fff;
    margin-top: 8px;
    animation: fortuneFadeUp .6s .3s ease forwards;
    opacity: 0;
}
.inline-star {
    width: .85em;
    height: .85em;
    vertical-align: middle;
    margin: 0 2px;
    display: inline-block;
}
@keyframes fortuneMultiplyPop {
    0% { transform: scale(0); opacity: 0; }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); opacity: 1; }
}
@keyframes fortuneFadeUp {
    0% { opacity: 0; transform: translateY(10px); }
    100% { opacity: 1; transform: translateY(0); }
}
/* --- THIMBLES GAME --- */
.thimbles-head {
    text-align: center;
    padding: 16px 0 8px;
}
.thimbles-head h2 {
    font-size: 22px;
    font-weight: 900;
    color: #fff;
    margin: 0;
}
.thimbles-head p {
    color: var(--text-dim);
    font-size: 12px;
    margin: 4px 0 0;
}

.thimbles-bet-panel {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 14px;
    margin: 0 16px 12px;
}
.thimbles-bet-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}
.thimbles-bet-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-main);
    min-width: 52px;
}
.thimbles-bet-input-wrap {
    flex: 1;
    position: relative;
}
.thimbles-bet-input-wrap input {
    width: 100%;
    padding: 10px 36px 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,.12);
    background: rgba(255,255,255,.05);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    font-family: Montserrat, sans-serif;
    outline: none;
}
.thimbles-bet-suffix {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 13px;
    color: var(--gold);
    font-weight: 700;
}
.thimbles-quick-bets {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.thimbles-qbtn {
    flex: 1;
    min-width: 52px;
    padding: 8px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,.1);
    background: rgba(255,255,255,.06);
    color: var(--text-main);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    font-family: Montserrat, sans-serif;
    transition: all .15s ease;
}
.thimbles-qbtn:active {
    background: rgba(182,2,206,.2);
    border-color: var(--accent-purple);
}

.thimbles-speed-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 16px;
}
.thimbles-speed-label {
    font-size: 12px;
    color: var(--text-dim);
}

.thimbles-table {
    background: linear-gradient(180deg, rgba(0,212,255,.06), rgba(182,2,206,.06));
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    margin: 0 10px 16px;
    padding: 24px 10px 16px;
    position: relative;
    overflow: visible;
}
.thimbles-track {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: clamp(6px, 2vw, 14px);
    position: relative;
    width: 100%;
    height: clamp(220px, 52vw, 300px);
    margin: 0 auto;
    padding: 10px;
    overflow: hidden;
    background: radial-gradient(circle at 50% 10%, rgba(255,255,255,.05), transparent 60%),
        linear-gradient(180deg, rgba(20,12,36,.8), rgba(9,5,18,.95));
    border-radius: 20px;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.08);
}
.thimbles-cup {
    position: relative;
    width: clamp(105px, 32vw, 155px);
    height: clamp(95px, 28vw, 145px);
    cursor: pointer;
    flex-shrink: 1;
    will-change: transform;
    transition: transform .25s ease;
}
.thimbles-cup-body {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('assets/NAPERST/stakan.png') center/contain no-repeat;
    border: none;
    border-radius: 0;
    box-shadow: none;
    filter: drop-shadow(0 8px 18px rgba(0,0,0,.45));
    transition: transform .3s ease, opacity .3s ease, filter .3s ease;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    z-index: 3;
}
.thimbles-cup.lifting .thimbles-cup-body {
    transform: translateY(-55%);
    opacity: .7;
    filter: drop-shadow(0 14px 24px rgba(0,0,0,.3));
}
.thimbles-cup.revealed .thimbles-cup-body {
    transform: translateY(-60%);
    opacity: .45;
    filter: drop-shadow(0 16px 28px rgba(0,0,0,.25));
}
.thimbles-ball {
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%) scale(0);
    width: clamp(48px, 14vw, 72px);
    height: clamp(48px, 14vw, 72px);
    border-radius: 0;
    background: url('assets/NAPERST/altuxa.png') center/contain no-repeat;
    box-shadow: none;
    filter: drop-shadow(0 0 10px rgba(0,255,136,.55));
    transition: transform .35s cubic-bezier(.175,.885,.32,1.275), filter .25s ease;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    will-change: transform;
}
.thimbles-cup.revealed .thimbles-ball,
.thimbles-cup.lifting .thimbles-ball {
    transform: translateX(-50%) scale(1);
}
.thimbles-cup.winner .thimbles-ball {
    background: url('assets/NAPERST/altuxa.png') center/contain no-repeat;
    width: clamp(56px, 16vw, 84px);
    height: clamp(56px, 16vw, 84px);
    filter: drop-shadow(0 0 14px rgba(0,255,136,.85));
}
.thimbles-cup.loser .thimbles-ball {
    background: url('assets/NAPERST/skuf.png') center/contain no-repeat;
    width: clamp(60px, 17vw, 90px);
    height: clamp(60px, 17vw, 90px);
    bottom: 4px;
    filter: drop-shadow(0 0 14px rgba(255,59,48,.85));
}

.thimbles-cup.ready {
    animation: thimblesPulse .8s ease-in-out infinite;
}

.thimbles-cup.closing .thimbles-cup-body {
    animation: thimblesSlam .3s ease-in forwards;
}

@keyframes thimblesBounce {
    0% { transform: translate(-50%, -50%) scale(0.5); }
    60% { transform: translate(-50%, -50%) scale(1.3); }
    100% { transform: translate(-50%, 0) scale(1); }
}

@keyframes thimblesPulse {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.3); box-shadow: 0 0 15px rgba(255,215,0,.3); }
}

@keyframes thimblesSlam {
    0% { transform: translateY(-8px); }
    100% { transform: translateY(0); }
}

.thimbles-status {
    text-align: center;
    margin-top: 12px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-dim);
    min-height: 20px;
}

.thimbles-info-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px 20px;
}
.thimbles-prizes-btn {
    padding: 8px 14px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,.12);
    background: rgba(255,255,255,.06);
    color: var(--text-dim);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    font-family: Montserrat, sans-serif;
}
.thimbles-multiplier {
    font-size: 14px;
    font-weight: 900;
    color: var(--success);
}

.thimbles-lose-anim {
    animation: thimblesShake .5s ease;
}
@keyframes thimblesShake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-6px) rotate(-3deg); }
    40% { transform: translateX(6px) rotate(3deg); }
    60% { transform: translateX(-4px) rotate(-2deg); }
    80% { transform: translateX(4px) rotate(2deg); }
}


/* --- SKUFDER (Tinder-like game) --- */
.skufder-head {
    text-align: center;
    padding: 14px 0 6px;
}
.skufder-head h2 {
    font-size: 22px;
    font-weight: 900;
    color: #fff;
    margin: 0;
}
.skufder-head p {
    color: var(--text-dim);
    font-size: 12px;
    margin: 4px 0 0;
}

.skufder-bet-panel {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 12px 14px;
    margin: 0 16px 12px;
}
.skufder-bet-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}
.skufder-bet-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-main);
    min-width: 52px;
}

.skufder-card-wrap {
    display: flex;
    justify-content: center;
    padding: 0 16px;
    margin-bottom: 16px;
}
.skufder-card {
    width: 100%;
    max-width: 320px;
    background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.02));
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 24px;
    overflow: hidden;
    backdrop-filter: blur(12px);
    box-shadow: 0 12px 40px rgba(0,0,0,.35);
    position: relative;
    transition: transform .5s cubic-bezier(.4,0,.2,1), opacity .35s ease;
}
.skufder-card.swipe-left {
    transform: translateX(-120%) rotate(-12deg);
    opacity: 0;
}
.skufder-card.swipe-right {
    transform: translateX(120%) rotate(12deg);
    opacity: 0;
}
.skufder-card.reset {
    transition: none;
    transform: translateX(0) rotate(0);
    opacity: 0;
}
.skufder-card.enter {
    transition: all .4s cubic-bezier(.4,0,.2,1);
    opacity: 1;
}

.skufder-card-photo {
    width: 100%;
    aspect-ratio: 3/4;
    background: linear-gradient(135deg, rgba(30,15,40,.8), rgba(10,8,20,.9));
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}
/* Like/Dislike overlays on photo — full half-width rectangles */
.skufder-photo-overlay { display: none !important; }
.skufder-reveal-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    opacity: 0;
    transform: scale(1.1);
    transition: opacity .4s ease, transform .5s ease;
}
.skufder-reveal-img.show {
    opacity: 1;
    transform: scale(1);
}
.skufder-question {
    position: relative;
    z-index: 1;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255,255,255,.1), rgba(255,255,255,.04));
    border: 2px solid rgba(255,255,255,.2);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: skufderPulse 2s ease-in-out infinite;
    transition: opacity .3s ease, transform .3s ease;
}
.skufder-question.hide {
    opacity: 0;
    transform: scale(.6);
}
.skufder-question span {
    font-size: 44px;
    font-weight: 900;
    color: rgba(255,255,255,.4);
}
@keyframes skufderPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255,255,255,.1); }
    50% { transform: scale(1.06); box-shadow: 0 0 0 12px rgba(255,255,255,0); }
}

.skufder-info {
    padding: 14px 18px;
    text-align: center;
}
.skufder-name {
    font-size: 18px;
    font-weight: 900;
    color: #fff;
    margin-bottom: 2px;
    transition: opacity .25s ease;
}
.skufder-distance {
    font-size: 11px;
    color: var(--text-dim);
    margin-bottom: 8px;
}
.skufder-phrase {
    font-size: 12px;
    color: rgba(255,255,255,.75);
    margin-bottom: 8px;
    line-height: 1.4;
}
.skufder-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
}
.skufder-tag {
    font-size: 10px;
    font-weight: 700;
    color: rgba(255,255,255,.6);
    background: rgba(255,255,255,.08);
    padding: 3px 8px;
    border-radius: 8px;
}

.skufder-result {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: rgba(0,0,0,.55);
    backdrop-filter: blur(6px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s ease;
    border-radius: 24px;
    z-index: 3;
}
.skufder-result.show {
    opacity: 1;
    pointer-events: auto;
}
.skufder-result-type {
    font-size: 28px;
    font-weight: 900;
    color: #fff;
    text-shadow: 0 2px 12px rgba(0,0,0,.5);
}
.skufder-result-type.is-alt { color: var(--success); text-shadow: 0 0 20px rgba(0,255,136,.4); }
.skufder-result-type.is-skuf { color: var(--danger); text-shadow: 0 0 20px rgba(255,59,48,.4); }
.skufder-result-multiplier {
    font-size: 20px;
    font-weight: 800;
    color: #fff;
}

.skufder-name-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 2px;
}
.skufder-actions-inline {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}
.skufder-actions-inline .skufder-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,.14);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform .18s cubic-bezier(.4,0,.2,1), box-shadow .18s ease, border-color .18s ease;
    padding: 0;
    overflow: hidden;
    position: relative;
    background: rgba(255,255,255,.05);
}
.skufder-actions-inline .skufder-btn img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}
.skufder-actions-inline .skufder-btn:active {
    transform: scale(.9);
}
.skufder-actions-inline .skufder-btn:disabled {
    opacity: .4;
    cursor: not-allowed;
    transform: none;
}
.skufder-dislike {
    background: linear-gradient(135deg, rgba(255,59,48,.95), rgba(200,30,20,.95));
    border-color: rgba(255,80,70,.9);
    box-shadow: 0 4px 14px rgba(255,59,48,.4), inset 0 1px 0 rgba(255,255,255,.2);
}
.skufder-dislike:hover {
    transform: scale(1.08);
    box-shadow: 0 0 22px rgba(255,59,48,.6), 0 4px 18px rgba(255,59,48,.4), inset 0 1px 0 rgba(255,255,255,.25);
    border-color: rgba(255,110,100,1);
}
.skufder-dislike:active {
    box-shadow: 0 0 28px rgba(255,59,48,.7), inset 0 0 22px rgba(255,59,48,.3);
}
.skufder-like {
    background: linear-gradient(135deg, rgba(0,230,120,.95), rgba(0,170,80,.95));
    border-color: rgba(40,255,140,.9);
    box-shadow: 0 4px 14px rgba(0,255,136,.4), inset 0 1px 0 rgba(255,255,255,.2);
}
.skufder-like:hover {
    transform: scale(1.08);
    box-shadow: 0 0 22px rgba(0,255,136,.6), 0 4px 18px rgba(0,255,136,.4), inset 0 1px 0 rgba(255,255,255,.25);
    border-color: rgba(80,255,160,1);
}
.skufder-like:active {
    box-shadow: 0 0 28px rgba(0,255,136,.7), inset 0 0 22px rgba(0,255,136,.3);
}

.skufder-odds {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 0 16px 20px;
    align-items: center;
}
.skufder-odds-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: var(--text-dim);
}
.skufder-odds-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}
.like-dot { background: linear-gradient(135deg, #00ff88, #00cc66); }
.dislike-dot { background: linear-gradient(135deg, #ff3b30, #ff6b6b); }


/* --- FRIDGE (Skuf Fridge) --- */
.fridge-head {
    text-align: center;
    padding: 14px 0 6px;
}
.fridge-head h2 {
    font-size: 20px;
    font-weight: 900;
    color: #fff;
    margin: 0;
}
.fridge-head p {
    color: var(--text-dim);
    font-size: 12px;
    margin: 4px 0 0;
}

.fridge-bet-panel {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 12px 14px;
    margin: 0 16px 14px;
}
.fridge-bet-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}
.fridge-bet-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-main);
    min-width: 52px;
}

.fridge-scene {
    position: relative;
    width: 220px;
    height: 280px;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fridge-door {
    width: 180px;
    height: 240px;
    background: linear-gradient(145deg, #c0c0c0, #909090);
    border: 4px solid #606060;
    border-radius: 16px 16px 8px 8px;
    position: relative;
    z-index: 2;
    transition: transform .4s ease;
    box-shadow: 0 8px 24px rgba(0,0,0,.4), inset 0 2px 4px rgba(255,255,255,.3);
}
.fridge-door.shaking {
    animation: fridgeShake .5s ease-in-out;
}
@keyframes fridgeShake {
    0%, 100% { transform: translateX(0); }
    15% { transform: translateX(-6px) rotate(-2deg); }
    30% { transform: translateX(5px) rotate(2deg); }
    45% { transform: translateX(-4px) rotate(-1.5deg); }
    60% { transform: translateX(3px) rotate(1.5deg); }
    75% { transform: translateX(-2px) rotate(-1deg); }
    90% { transform: translateX(1px) rotate(.5deg); }
}
.fridge-door.open {
    transform: perspective(600px) rotateY(-45deg);
    transform-origin: left center;
}

.fridge-body {
    width: 100%;
    height: 100%;
    position: relative;
    background: linear-gradient(145deg, #d0d0d0, #a0a0a0);
    border-radius: 12px 12px 4px 4px;
    overflow: hidden;
}
.fridge-logo {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 22px;
    font-weight: 900;
    color: #606060;
    letter-spacing: 3px;
    opacity: .6;
}
.fridge-handle {
    position: absolute;
    right: 12px;
    top: 60px;
    width: 10px;
    height: 80px;
    background: linear-gradient(180deg, #505050, #303030);
    border-radius: 5px;
    box-shadow: 2px 2px 6px rgba(0,0,0,.3);
}

.fridge-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120px;
    height: 160px;
    background: radial-gradient(ellipse, rgba(255,255,255,.9), rgba(200,220,255,.4), transparent);
    opacity: 0;
    z-index: 1;
    transition: opacity .3s ease;
    pointer-events: none;
}
.fridge-glow.active {
    opacity: 1;
}

.fridge-item {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    z-index: 3;
    text-align: center;
    transition: transform .5s cubic-bezier(.175,.885,.32,1.275);
    pointer-events: none;
}
.fridge-item.show {
    transform: translate(-50%, -50%) scale(1);
}
#fridge-item-emoji {
    display: block;
    font-size: 64px;
    line-height: 1;
}
#fridge-item-name {
    display: block;
    margin-top: 6px;
    font-size: 13px;
    font-weight: 800;
    color: #fff;
    text-shadow: 0 2px 8px rgba(0,0,0,.5);
    white-space: nowrap;
}

.fridge-near-miss {
    position: absolute;
    bottom: -36px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 11px;
    font-weight: 700;
    color: #b602ce;
    opacity: 0;
    transition: opacity .3s ease;
    white-space: nowrap;
    text-shadow: 0 1px 4px rgba(0,0,0,.5);
}
.fridge-near-miss.show {
    opacity: 1;
}

.fridge-result {
    text-align: center;
    min-height: 48px;
    margin-bottom: 10px;
}
.fridge-result-multiplier {
    font-size: 36px;
    font-weight: 900;
    line-height: 1;
}
.fridge-result-multiplier.win {
    color: var(--success);
    text-shadow: 0 0 20px rgba(0,255,136,.4);
}
.fridge-result-multiplier.lose {
    color: #ff3b30;
}
.fridge-result-multiplier.near {
    color: #b602ce;
}
.fridge-result-win {
    font-size: 14px;
    font-weight: 700;
    margin-top: 4px;
}

.fridge-eat-btn {
    display: block;
    width: calc(100% - 32px);
    margin: 0 auto 14px;
    padding: 16px;
    border: none;
    border-radius: 16px;
    background: linear-gradient(45deg, #b602ce, #ffcc00);
    color: #1a0a00;
    font-size: 18px;
    font-weight: 900;
    letter-spacing: 1px;
    cursor: pointer;
    box-shadow: 0 6px 24px rgba(182, 2, 206,.4);
    transition: transform .15s ease, box-shadow .2s ease;
    font-family: Montserrat, sans-serif;
}
.fridge-eat-btn:active {
    transform: scale(.96);
}
.fridge-eat-btn:disabled {
    opacity: .5;
    cursor: not-allowed;
    transform: none;
}

.fridge-history {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 16px 16px;
    flex-wrap: wrap;
}
.fridge-history-label {
    font-size: 11px;
    color: var(--text-dim);
    font-weight: 700;
}
.fridge-history-items {
    display: flex;
    gap: 6px;
}
.fridge-history-item {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: all .2s ease;
}
.fridge-history-item.gold {
    background: linear-gradient(135deg, rgba(255,204,0,.2), rgba(255,204,0,.08));
    border-color: rgba(255,204,0,.4);
    box-shadow: 0 0 12px rgba(255,204,0,.2);
}

.fridge-happy-hour {
    position: fixed;
    top: 60px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background: linear-gradient(135deg, #ffcc00, #b602ce);
    color: #1a0a00;
    padding: 8px 20px;
    border-radius: 20px;
    text-align: center;
    z-index: 100;
    box-shadow: 0 4px 20px rgba(255,204,0,.4);
    transition: transform .4s cubic-bezier(.175,.885,.32,1.275);
}
.fridge-happy-hour.show {
    transform: translateX(-50%) translateY(0);
}
.fridge-happy-hour span {
    display: block;
    font-size: 14px;
    font-weight: 900;
    letter-spacing: .5px;
}
.fridge-happy-hour small {
    font-size: 10px;
    font-weight: 700;
    opacity: .8;
}

/* --- SKELETON LOADING OVERLAY --- */
.skeleton-loading-overlay {
    position: absolute;
    inset: 0;
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(10, 10, 15, 0.7);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border-radius: inherit;
}
.skeleton-spinner {
    width: 42px;
    height: 42px;
    border: 3px solid rgba(255,255,255,.1);
    border-top-color: var(--accent-pink);
    border-radius: 50%;
    animation: skeletonSpin 0.8s linear infinite;
}
@keyframes skeletonSpin {
    to { transform: rotate(360deg); }
}

/* --- OFFLINE BANNER --- */
.offline-banner {
    position: sticky;
    top: 0;
    z-index: 2000;
    width: 100%;
    padding: 8px 14px;
    background: linear-gradient(135deg, rgba(255,59,48,.9), rgba(200,30,30,.9));
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    text-align: center;
    letter-spacing: .3px;
    animation: offlineBannerIn .35s ease;
}
@keyframes offlineBannerIn {
    from { transform: translateY(-100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* ===== PROFILE TABS ===== */
.profile-tabs {
    display: flex;
    margin: 12px 14px 0;
    gap: 4px;
}
.profile-tab {
    flex: 1;
    padding: 10px;
    border: 1px solid var(--glass-border);
    border-radius: 10px 10px 0 0;
    background: rgba(255,255,255,.03);
    color: var(--text-dim);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
    transition: all .2s;
    border-bottom: none;
}
.profile-tab.active {
    background: var(--bg-card);
    color: #fff;
    border-color: var(--accent-purple);
}
.profile-tab-content {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-top: none;
    border-radius: 0 0 12px 12px;
    margin: 0 14px;
    padding: 10px;
    min-height: 80px;
    overflow: hidden;
}

/* ===== INVENTORY CLEAN ===== */
.profile-inv-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 8px;
}

/* ── ALTUSHKA: карточка-вход в НОВЫЙ инвентарь (профиль) ─────────────────────
   Сам инвентарь теперь один — их страница кадром (`nav('inventory')`). В профиле
   осталась вот эта карточка: сколько предметов, общая сумма и «Открыть». */
.inv-teaser {
    position: relative;
    display: block;
    padding: 14px 14px 12px;
    border-radius: 20px;
    cursor: pointer;
    background:
        radial-gradient(120% 140% at 0% 0%, rgba(239, 2, 203, .18), transparent 55%),
        radial-gradient(120% 140% at 100% 0%, rgba(182, 2, 206, .18), transparent 55%),
        linear-gradient(180deg, rgba(32, 20, 48, .92), rgba(18, 11, 27, .92));
    border: 1px solid rgba(239, 2, 203, .24);
    box-shadow: 0 18px 40px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .07);
    transition: transform .16s ease, box-shadow .16s ease;
    -webkit-tap-highlight-color: transparent;
}
.inv-teaser:active {
    transform: scale(.988);
    box-shadow: 0 10px 26px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 255, 255, .07);
}
.inv-teaser__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
}
.inv-teaser__t { font: 800 16px/1.2 Montserrat, sans-serif; color: #fff; }
.inv-teaser__n { font: 600 12.5px/1.2 Montserrat, sans-serif; color: #c9a6ff; }
.inv-teaser__arts { display: flex; gap: 8px; }
.inv-teaser__art {
    flex: 1 1 0;
    min-width: 0;
    aspect-ratio: 1 / 1;
    border-radius: 14px;
    overflow: hidden;
    background: #241636;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .07);
}
.inv-teaser__art img { width: 100%; height: 100%; object-fit: contain; display: block; }
.inv-teaser__empty { font: 600 12.5px/1.4 Montserrat, sans-serif; color: #8f7fa8; }
.inv-teaser__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 12px;
}
.inv-teaser__worth { font: 800 14px/1 Montserrat, sans-serif; color: #ffd54a; }
.inv-teaser__go {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 34px;
    padding: 0 14px;
    border-radius: 12px;
    font: 800 13px/1 Montserrat, sans-serif;
    color: #fff;
    background: linear-gradient(135deg, #ef02cb 0%, #b602ce 100%);
    box-shadow: 0 8px 20px rgba(239, 2, 203, .28), inset 0 1px 0 rgba(255, 255, 255, .26);
}
.inv-teaser__go i { font-style: normal; font-size: 15px; opacity: .9; }
.profile-inv-stats {
    display: flex;
    gap: 12px;
}
/* ============================================================
   UNIFIED CONTROL LAYER
   До этого слоя одни и те же по смыслу контролы рисовались
   по-разному: .q-btn — пилюля 44px с фиолетовым тинтом,
   .thimbles-qbtn — прямоугольник ~33px на плоском сером,
   .arena-q-btn/.case-soft-btn/.mines-feed-tab — отдельная группа
   38px, а .crash-auto-stop-wrap имел свой радиус 12px рядом с
   кнопкой на 16px. Здесь всё сводится к одной шкале.
   Правила идут после исходных, поэтому выигрывают по порядку.
   ============================================================ */
:root {
    --ctl-h: 46px;
    --ctl-h-sm: 44px;
    --ctl-r: 14px;
    --ctl-r-pill: 999px;
    --ctl-fs: 13px;
    --ctl-fs-main: 16px;
    --ctl-border: 1px solid rgba(255,255,255,.16);
    --ctl-chip-bg: linear-gradient(145deg, rgba(182,2,206,.16), rgba(239,2,203,.10));
}

/* 1. Чипы и мелкие кнопки: одна форма, один тон, один шрифт */
.q-btn,
.thimbles-qbtn,
.arena-q-btn,
.case-soft-btn,
.inv-actions button,
.bet-boost-row > button,
.crash-bet-step {
    min-height: var(--ctl-h-sm);
    padding: 10px 12px;
    border-radius: var(--ctl-r-pill);
    border: var(--ctl-border);
    background: var(--ctl-chip-bg);
    color: #eae5ff;
    font-size: var(--ctl-fs);
    font-weight: 800;
    letter-spacing: .2px;
    font-family: Montserrat, sans-serif;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    white-space: nowrap;
}

/* 2. Основные кнопки действия: одна геометрия, свой цвет сохраняется */
.btn-main,
.deposit-submit,
.fridge-eat-btn,
#main-action-btn {
    min-height: var(--ctl-h);
    border-radius: var(--ctl-r);
    font-size: var(--ctl-fs-main);
    font-weight: 800;
    letter-spacing: .2px;
    padding: 14px 18px;
}

/* 3. Поля ввода и составные контролы: одна высота и один радиус */
.bet-input-wrap input,
#crash-auto-stop,
.thimbles-bet-input-wrap input,
.deposit-amount-wrap input {
    font-size: 15px;
    font-weight: 800;
    font-family: Montserrat, sans-serif;
}
.bet-input-wrap,
.thimbles-bet-input-wrap {
    min-height: var(--ctl-h-sm);
    border-radius: var(--ctl-r);
    border: var(--ctl-border);
    background: rgba(6,8,22,.82);
}
/* AUTO X стоит в одной строке с кнопкой кэшаута — выравниваем под неё */
.crash-auto-stop-wrap {
    min-height: var(--ctl-h);
    border-radius: var(--ctl-r);
    border: var(--ctl-border);
    background: rgba(6,8,22,.82);
}

/* ============================================================
   UNIFIED LAYER, PART 2 — карточки, отступы, типографика, меню
   Замер показал разнобой: 15 разных border-radius (4/5/6/8/9/10/
   12/14/16/18/20/22/24 + пилюли), больше 20 размеров шрифта
   (вплоть до нечитаемых 7px и 8px) и 11 разных gap. Здесь всё
   сводится к короткой шкале. Правила идут после исходных.
   ============================================================ */
:root {
    /* радиусы: мелкие плитки -> крупные контейнеры */
    --ui-r-xs: 8px;
    --ui-r-sm: 12px;
    --ui-r-md: 16px;
    --ui-r-lg: 20px;
    /* отступы */
    --ui-gap-xs: 6px;
    --ui-gap-sm: 10px;
    --ui-gap-md: 14px;
    /* типографика: минимальный читаемый размер — 11px */
    --ui-fs-label: 11px;
    --ui-fs-body: 13px;
    --ui-fs-title: 16px;
    --ui-fs-h2: 20px;
    --ui-text-dim: #b6bcd2;
}

/* --- 1. Крупные контейнеры: один радиус --- */
.gift-shop-grid,
.crash-bets-card,
.crash-history-panel,
.bet-panel,
.modal-card,
.case-win-card,
.profile-card,
.profile-tab-content,
.profile-inv-card,
.profile-full-inv-card,
.ach-card,
.profile-empty-state,
.mines-container,
.feed-wrap,
.skufder-card,
.fridge-scene {
    border-radius: var(--ui-r-lg);
}

/* --- 2. Плитки и ячейки: средний радиус --- */
.pstat-card,
.crash-bet-row,
.gift-price,
.case-card-ui,
.prize-item,
.daily-day,
.profile-empty-btn {
    border-radius: var(--ui-r-sm);
}

/* --- 3. Отступы сеток: одна величина вместо 5/6/7/8/10/12/14 --- */
.gift-shop-grid,
.game-grid,
.profile-stat-cards,
.prizes-grid,
.daily-grid,
.feed-list {
    gap: var(--ui-gap-sm);
}

/* --- 4. Типографика: подписи не мельче 11px и заметнее по цвету --- */
.pstat-label,
.gift-shop-head p,
.crash-history-status,
.mines-status,
.feed-head,
.empty-text,
.tops-row.empty,
[class$="-label"],
[class$="-hint"],
[class$="-kicker"] {
    font-size: var(--ui-fs-label);
    color: var(--ui-text-dim);
    letter-spacing: .2px;
}

/* заголовки экранов: вместо 22/24/26/28/32 — одна ступень */
.pstat-val,
.gift-shop-head h2,
.fridge-head h2,
.skufder-head h2 {
    font-size: var(--ui-fs-title);
    font-weight: 800;
    letter-spacing: .2px;
}

/* --- 5. Нижнее меню: иконка отдельно, подпись под ней --- */
.bottom-menu {
    gap: var(--ui-gap-xs);
    padding: 8px 10px calc(10px + var(--safe-bottom));
}

.nav-btn {
    gap: 3px;
    min-height: 56px;
    padding: 6px 2px 7px;
    border-radius: var(--ui-r-md);
}

/* Ключевая правка: раньше иконка растягивалась на всю плитку
   (position:absolute; inset:0; background-size:150%) и подпись
   лежала поверх арта. Теперь это отдельный квадрат, подпись — под ним. */
.nav-icon {
    position: static;
    inset: auto;
    width: 30px;
    height: 30px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: .55;
    filter: saturate(.65);
    transition: opacity .2s ease, filter .2s ease, transform .3s ease;
}

.nav-btn.active .nav-icon {
    opacity: 1;
    filter: none;
    transform: scale(1.08);
}

.nav-btn span {
    position: static;
    font-size: var(--ui-fs-label);
    font-weight: 800;
    letter-spacing: .2px;
    color: rgba(255,255,255,.66);
    margin-top: 0;
    padding-bottom: 0;
    text-shadow: none;
}

.nav-btn.active span {
    color: #fff;
    text-shadow: 0 0 10px rgba(239,2,203,.35);
}

/* индикатор активности не должен наезжать на подпись */
.nav-btn::after {
    bottom: 2px;
    width: 26px;
    height: 2px;
}

/* ============================================================
   ДОБИВКА ПОСЛЕ АУДИТА ЖИВОГО ИНТЕРФЕЙСА
   ============================================================ */
/* Бейдж «БЕТА» на карточках игр был 7px — на телефоне не читался вообще */
.badge,
.badge.dev {
    font-size: 9px;
    letter-spacing: .3px;
}
/* Строка «ONLINE ~» в шапке была 9px */
.status {
    font-size: 10px;
}
/* Карточки игр выбивались радиусом 24 при общей шкале 20 */
.game-grid .game-item,
.game-grid .game-item::after {
    border-radius: var(--ui-r-lg);
}

.profile-inv-count, .profile-inv-worth {
    font-size: 13px;
    font-weight: 700;
    color: #ddd;
}
.profile-inv-actions-row { display: flex; gap: 6px; }
.profile-inv-action-btn {
    padding: 7px 12px;
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    background: rgba(255,255,255,.04);
    color: #ccc;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
}
.profile-inv-action-btn.sell { border-color: rgba(255,160,0,.3); color: #ffa000; }

.profile-inv-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}
.profile-inv-card {
    background: rgba(255,255,255,.03);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 10px;
    padding: 8px;
    text-align: center;
    cursor: pointer;
    transition: all .2s;
}
.profile-inv-card:hover { background: rgba(255,255,255,.06); }
.profile-inv-card.legendary { border-color: rgba(255,215,0,.4); }
.profile-inv-card.exotic { border-color: rgba(255,0,128,.4); }
.profile-inv-card.epic { border-color: rgba(182,2,206,.4); }

.profile-inv-img-wrap {
    position: relative;
    background: rgba(0,0,0,.2);
    border-radius: 6px;
    padding: 4px;
    margin-bottom: 4px;
}
.profile-inv-img-wrap img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: contain;
    display: block;
}
.profile-inv-rarity {
    position: absolute;
    bottom: 2px;
    right: 2px;
    font-size: 7px;
    font-weight: 900;
    padding: 1px 4px;
    border-radius: 3px;
    background: rgba(0,0,0,.8);
    color: #aaa;
}
.profile-inv-rarity.legendary, .profile-inv-rarity.exotic, .profile-inv-rarity.epic { color: #ffd700; }

.profile-inv-card-name {
    display: block;
    font-size: 10px;
    color: #ccc;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.profile-inv-card-price {
    display: block;
    font-size: 10px;
    font-weight: 900;
    color: #ffd700;
    margin-top: 2px;
}
.profile-inv-more {
    text-align: center;
    padding: 8px;
    color: var(--accent-purple);
    font-size: 12px;
    cursor: pointer;
}

/* Full inventory view */
.profile-full-inv-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}
.profile-full-inv-card {
    background: rgba(255,255,255,.03);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 10px;
    overflow: hidden;
}
.profile-full-inv-card.legendary { border-color: rgba(255,215,0,.5); }
.profile-full-inv-card.exotic { border-color: rgba(255,0,128,.5); }
.profile-full-inv-card.epic { border-color: rgba(182,2,206,.4); }

.profile-full-inv-img {
    padding: 10px;
    background: rgba(0,0,0,.25);
    text-align: center;
}
.profile-full-inv-img img {
    width: 100%;
    max-width: 100%;
    max-height: 100px;
    object-fit: contain;
    border-radius: 4px;
    display: block;
}
.profile-full-inv-rarity {
    display: block;
    text-align: center;
    font-size: 8px;
    font-weight: 900;
    padding: 2px 0;
    letter-spacing: .5px;
    color: #aaa;
}
.profile-full-inv-rarity.legendary { color: #ffd700; }
.profile-full-inv-rarity.exotic { color: #ef02cb; }
.profile-full-inv-rarity.epic { color: #b602ce; }

.profile-full-inv-info {
    padding: 8px 10px 10px;
}
.profile-full-inv-name {
    font-size: 12px;
    font-weight: 700;
    color: #fff;
}
.profile-full-inv-price {
    display: block;
    font-size: 13px;
    font-weight: 900;
    color: #ffd700;
    margin: 3px 0 6px;
}
.profile-full-inv-btns {
    display: flex;
    gap: 5px;
}
.profile-inv-btn {
    flex: 1;
    padding: 7px;
    border: none;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 700;
    cursor: pointer;
}
.profile-inv-btn.sell { background: rgba(255,160,0,.15); color: #ffa000; }
.profile-inv-btn.withdraw { background: rgba(182,2,206,.15); color: #b602ce; }

.profile-full-inv-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}
.profile-full-inv-back {
    background: none;
    border: 1px solid var(--glass-border);
    color: #ccc;
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
}
.profile-full-inv-count { font-size: 11px; color: var(--text-dim); }
.profile-full-inv-actions-bar { margin-bottom: 8px; }
.profile-full-inv-actions-bar .profile-inv-action-btn { width: 100%; }

/* === TOPS V2 (clean) === */
.tops-podium-wrap {
    display: flex; justify-content: center; align-items: flex-end;
    gap: 12px; width: 100%; padding: 10px 0;
}
.tops-pod-item {
    display: flex; flex-direction: column; align-items: center;
    gap: 5px; flex: 1; max-width: 105px;
}
.tops-pod-item.pod-1 { order: 2; }
.tops-pod-item.pod-2 { order: 1; }
.tops-pod-item.pod-3 { order: 3; }
.tops-pod-avatar {
    border-radius: 50%; overflow: hidden; display: flex;
    align-items: center; justify-content: center;
    background: #1a1a2e; font-size: 24px; font-weight: 900; color: #fff;
}
.tops-pod-avatar img { width: 100%; height: 100%; object-fit: cover; }
.tops-pod-name { font-size: 11px; font-weight: 700; color: #ddd; text-align: center; word-break: break-all; }
.tops-pod-score { font-size: 12px; font-weight: 900; color: #ffd700; }
.tops-pod-medal { font-size: 24px; line-height: 1; }
.tops-pod-prize { font-size: 9px; color: #999; background: rgba(255,255,255,.06); padding: 2px 8px; border-radius: 10px; }

.tops-list-row {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 14px; border-bottom: 1px solid rgba(255,255,255,.03);
}
.tops-list-rank { font-size: 12px; font-weight: 900; color: #555; width: 26px; flex-shrink: 0; }
.tops-list-avatar {
    width: 30px; height: 30px; border-radius: 50%; display: flex;
    align-items: center; justify-content: center;
    font-size: 12px; font-weight: 900; color: #fff; flex-shrink: 0;
}
.tops-list-name { flex: 1; font-size: 12px; font-weight: 600; color: #ccc; }
.tops-list-score { font-size: 12px; font-weight: 900; color: #ffd700; }
.tops-list-empty { text-align: center; padding: 30px; color: #555; }

/* --- ГЛАВНОЕ МЕНЮ: единые карточки-обложки -------------------------------
   Обложки взяты из материала (192x192, фиолетово-неоновые — в нашей палитре).
   Карточка теперь всегда одной формы: картинка сверху, подпись на затемнении.
   Раньше часть карточек была с картинкой, часть без — сетка выглядела рвано. */
.game-grid { gap: 12px; padding: 16px; }
.game-item {
    padding: 0;
    min-height: 0;
    border-radius: var(--ui-r-lg, 20px);
    overflow: hidden;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
}
.game-item .game-cover { width: 100%; aspect-ratio: 1 / 1; overflow: hidden; }
.game-item .game-cover img {
    width: 100%; height: 100%;
    object-fit: cover;
    margin: 0; filter: none; transform: none;
    display: block;
}
.game-item .game-meta {
    position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
    padding: 26px 10px 10px;
    text-align: center;
    background: linear-gradient(to top, rgba(10, 7, 24, .95) 34%, rgba(10, 7, 24, 0));
}
.game-item .game-meta h3 { margin: 0 0 3px; font-size: 13px; line-height: 1.15; }
.game-item .game-meta span {
    display: block;
    font-size: 10px; line-height: 1.25;
    color: var(--ui-text-dim, #b6bcd2);
}
.game-item .badge { position: absolute; top: 8px; left: 8px; z-index: 3; }
.game-item:active { transform: scale(.97); }
/* --- МЕНЮ: карточки-анонсы («скоро») -------------------------------------
   Игры, арт которых уже есть в проекте, но механики ещё нет. Карточка ведёт
   себя честно: по нажатию говорит, что игра скоро появится, а не молчит
   и не открывает пустой экран. */
.game-item.is-soon .game-cover img { filter: saturate(.72) brightness(.78); }
.game-item.is-soon .game-meta h3 { color: #cfd3e6; }
.game-item.is-soon .game-meta span { color: #8f95ad; }
.badge.soon { background: rgba(124, 92, 226, .92); color: #fff; }

/* ── Плинко: ИХ страница игры в кадре (`games/plinko/`) ────────────────────────
   Их плинко — отдельный документ со своим CSS (`games/plinko/game.css`) и своим
   canvas-полем, поэтому кадру нужна вся площадь экрана: без нашего скролла и без
   отступов сверху. Место под нижнее меню остаётся от `.page` — его `padding-bottom`. */
#screen-plinko.page {
    overflow: hidden;
    padding-top: 0;
}
#screen-plinko .pl-frame {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    background: #0b0b0e;
    color-scheme: dark;
}

/* --- ВИТРИНА: фильтр, счётчик, догрузка -----------------------------------
   Каталог — 7578 моделей в 120 подарках. Раньше витрина рисовала всё сразу,
   отчего телефон задыхался; теперь показывает по 60 плиток, даёт выбрать
   подарок и догружает остальное по кнопке. */
.gift-filter-row { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.gift-filter-select {
    flex: 1 1 auto;
    min-width: 0; height: var(--ctl-h-sm, 38px);
    padding: 0 10px;
    border-radius: var(--ctl-r, 12px);
    border: 1px solid var(--glass-border);
    background: var(--bg-card);
    color: #e8eaf6;
    font-size: 12px; font-weight: 600;
}
.gift-filter-select option { background: #14102a; color: #e8eaf6; }
.gift-shop-count { flex: 0 0 auto; font-size: 11px; color: var(--ui-text-dim, #b6bcd2); white-space: nowrap; }
.gift-more-wrap { display: flex; justify-content: center; padding: 4px 16px 22px; }
.gift-more-btn { width: 100%; max-width: 320px; }
.gift-card .gift-gift {
    display: block;
    font-size: 9px; line-height: 1.2;
    color: var(--ui-text-dim, #b6bcd2);
    text-transform: uppercase; letter-spacing: .03em;
    margin-top: 3px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.gift-card .gift-model {
    display: block;
    font-size: 11px; font-weight: 600; line-height: 1.2;
    color: #e8eaf6;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* --- МЕНЮ: обложки одним спрайтом ----------------------------------------
   17 обложек отдельными файлами — это 17 запросов, а через туннель каждый
   стоит около 700 мс: меню открывалось 12 секунд. Спрайт — один запрос. */
.game-item .game-cover {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background-image: url('assets/newic/covers-sprite.webp');
    background-size: 600% 300%;
    background-repeat: no-repeat;
    background-position: 0 0;
}.game-item .game-cover.cv-0 { background-position: 0% 0%; }
.game-item .game-cover.cv-1 { background-position: 20% 0%; }
.game-item .game-cover.cv-2 { background-position: 40% 0%; }
.game-item .game-cover.cv-3 { background-position: 60% 0%; }
.game-item .game-cover.cv-4 { background-position: 80% 0%; }
.game-item .game-cover.cv-5 { background-position: 100% 0%; }
.game-item .game-cover.cv-6 { background-position: 0% 50%; }
.game-item .game-cover.cv-7 { background-position: 20% 50%; }
.game-item .game-cover.cv-8 { background-position: 40% 50%; }
.game-item .game-cover.cv-9 { background-position: 60% 50%; }
.game-item .game-cover.cv-10 { background-position: 80% 50%; }
.game-item .game-cover.cv-11 { background-position: 100% 50%; }
.game-item .game-cover.cv-12 { background-position: 0% 100%; }
.game-item .game-cover.cv-13 { background-position: 20% 100%; }
.game-item .game-cover.cv-14 { background-position: 40% 100%; }
.game-item .game-cover.cv-15 { background-position: 60% 100%; }
.game-item .game-cover.cv-16 { background-position: 80% 100%; }

/* ============================================================
   ПЕРЕРАБОТКА ШАПКИ И НИЖНЕГО МЕНЮ
   Иконки меню — из материала, одним спрайтом: 5 иконок = 1 запрос
   вместо 5, а через туннель каждый запрос стоит около 700 мс.
   ============================================================ */

/* --- Шапка --- */
.top-bar {
    padding: 10px 12px;
    gap: 10px;
    background: linear-gradient(180deg, rgba(22, 13, 38, .94), rgba(11, 8, 20, .82));
    border-bottom: 1px solid rgba(255, 255, 255, .07);
    box-shadow: 0 6px 20px rgba(0, 0, 0, .35);
}
.user-block { gap: 9px; cursor: pointer; min-width: 0; }
.user-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.avatar-wrapper {
    position: relative;
    padding: 2px;
    border-radius: 15px;
    background: linear-gradient(140deg, var(--accent-pink), var(--accent-purple));
    box-shadow: 0 0 14px rgba(239, 2, 203, .32);
    flex: 0 0 auto;
}
.avatar-wrapper img {
    width: 40px; height: 40px;
    border-radius: 13px;
    border: 0;
    display: block;
    object-fit: cover;
}
.nickname {
    font-size: 15px; line-height: 1.15; letter-spacing: .2px;
    max-width: 34vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.status { font-size: 11px; text-transform: none; letter-spacing: .2px; color: #5fe08a; }
.status b { color: #b8ffcf; }
.balance-block {
    background: linear-gradient(135deg, rgba(255, 204, 0, .18), rgba(239, 2, 203, .10));
    border: 1px solid rgba(255, 204, 0, .34);
    padding: 5px 6px 5px 13px;
    border-radius: 22px;
    gap: 7px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .10), 0 4px 14px rgba(0, 0, 0, .30);
}
#balance { font-size: 17px; letter-spacing: .3px; text-shadow: 0 0 12px rgba(249, 181, 204, .35); }
.coin-icon { width: 18px; height: 18px; }
.deposit-btn {
    width: 30px; height: 30px; font-size: 19px;
    box-shadow: 0 4px 12px rgba(239, 2, 203, .45), inset 0 1px 0 rgba(255, 255, 255, .35);
}
.music-toggle { width: 34px; height: 34px; font-size: 15px; flex: 0 0 auto; }

/* --- Нижнее меню --- */
.bottom-menu {
    padding: 6px 8px calc(8px + var(--safe-bottom));
    background: linear-gradient(180deg, rgba(14, 10, 26, .92), rgba(9, 7, 16, .98));
    border-top: 1px solid rgba(255, 255, 255, .07);
    box-shadow: 0 -6px 22px rgba(0, 0, 0, .45);
}
.bottom-menu .nav-btn { min-height: 54px; gap: 4px; border-radius: 14px; }
.bottom-menu .nav-btn .nav-icon {
    width: 26px; height: 26px;
    background-image: url('assets/newic/nav-sprite.webp');
    background-size: 500% 100%;
    background-repeat: no-repeat;
    background-position: 0% 50%;
    opacity: .48;
    filter: saturate(.45) brightness(.85);
    transition: opacity .2s ease, filter .2s ease, transform .3s ease;
}
.bottom-menu .nav-btn.active .nav-icon { opacity: 1; filter: none; transform: translateY(-1px) scale(1.12); }
.bottom-menu .nav-btn .nav-ic-games { background-position: 0% 50%; }
.bottom-menu .nav-btn .nav-ic-tops { background-position: 25% 50%; }
.bottom-menu .nav-btn .nav-ic-shop { background-position: 50% 50%; }
.bottom-menu .nav-btn .nav-ic-user { background-position: 75% 50%; }
.bottom-menu .nav-btn .nav-ic-altushka { background-position: 100% 50%; }
.bottom-menu .nav-btn span {
    font-size: 10.5px; font-weight: 800; letter-spacing: .2px;
    color: rgba(255, 255, 255, .62);
}
.bottom-menu .nav-btn.active span { color: #fff; text-shadow: 0 0 10px rgba(239, 2, 203, .4); }
.bottom-menu .nav-btn::after { width: 22px; height: 2.5px; border-radius: 2px; bottom: 1px; }

/* Центральная кнопка. Сердечко заменено на лицо самой Альтушки: openAltushka()
   живая (определена инлайн в index.html) и открывает персонажа с проверкой 18+. */
.nav-btn-center {
    width: 52px; height: 52px;
    margin: -16px 4px 0;
    border-radius: 50%;
    flex: 0 0 auto;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(140deg, var(--accent-pink), var(--accent-purple));
    border: 2px solid rgba(255, 255, 255, .16);
    box-shadow: 0 8px 22px rgba(239, 2, 203, .45), inset 0 1px 0 rgba(255, 255, 255, .35);
    transition: transform .2s ease, box-shadow .3s ease;
}
.nav-btn-center:active { transform: scale(.93); }
.bottom-menu .nav-btn-center .nav-icon {
    width: 28px; height: 28px;
    opacity: 1;
    filter: none;
    transform: none;
    background-image: url('assets/newic/nav-sprite.webp');
    background-size: 500% 100%;
    background-repeat: no-repeat;
    background-position: 100% 50%;
}
/* ============================================================
   ШРИФТЫ: Onest + Unbounded из материала (локально, проект не ходит в сеть
   даже за шрифтами) — кириллица, латиница, знак валюты.
   ============================================================ */
/* Unbounded + Onest (кириллица, латиница, ₽) локально: игра не ходит в сеть даже за шрифтами */
@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(assets/fonts/onest-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(assets/fonts/onest-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(assets/fonts/onest-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(assets/fonts/onest-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(assets/fonts/onest-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(assets/fonts/onest-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(assets/fonts/onest-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(assets/fonts/onest-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(assets/fonts/onest-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(assets/fonts/onest-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(assets/fonts/onest-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(assets/fonts/onest-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url(assets/fonts/onest-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url(assets/fonts/onest-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url(assets/fonts/onest-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Unbounded';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(assets/fonts/unbounded-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Unbounded';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(assets/fonts/unbounded-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Unbounded';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(assets/fonts/unbounded-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Unbounded';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(assets/fonts/unbounded-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Unbounded';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(assets/fonts/unbounded-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Unbounded';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(assets/fonts/unbounded-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Unbounded';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(assets/fonts/unbounded-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Unbounded';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(assets/fonts/unbounded-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Unbounded';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(assets/fonts/unbounded-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Unbounded';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url(assets/fonts/unbounded-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Unbounded';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url(assets/fonts/unbounded-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Unbounded';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url(assets/fonts/unbounded-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

html, body, button, input, select, textarea { font-family: 'Onest', 'Segoe UI', system-ui, sans-serif; }
.brand, .logo, h1, h2, .screen-title { font-family: 'Unbounded', 'Onest', sans-serif; }


/* --- ВИТРИНА: картинки подарков одним спрайтом ---------------------------
   124 подарка в одном файле. Отдельными картинками это 120 запросов, а
   через туннель каждый стоит около 700 мс. Дефолтные подарки взяты из
   rocket (материал-2) — по одной картинке на подарок, без скинов. */
.gift-card .gift-art {
    width: 92px;
    height: 92px;
    display: block;
    background-image: url('nft/gifts-sprite.webp');
    background-size: 1600% 800%;
    background-repeat: no-repeat;
    background-position: 0 0;
    backface-visibility: hidden;
}
.gift-card .gift-model {
    font-weight: 700;
    letter-spacing: .2px;
    max-width: 92px;
    text-align: center;
}
.gift-card .gift-price {
    font-weight: 800;
    font-size: 12px;
    color: var(--gold);
    letter-spacing: .2px;
}


/* --- ВИТРИНА ПОДАРКА: перебор оформлений --------------------------------
   В игре и инвентаре подарок показывается дефолтной картинкой, а тут
   игрок видит, какие оформления в него входят. Слоёв два: пока один
   гаснет, второй проявляется — переход получается плавным, без рывка. */
.gift-showcase {
    position: fixed;
    inset: 0;
    z-index: 4200;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity .28s ease;
}
.gift-showcase.show { opacity: 1; }
.gs-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(6, 4, 12, .78);
    backdrop-filter: blur(6px);
}
.gs-card {
    position: relative;
    width: min(88vw, 340px);
    padding: 22px 20px 20px;
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(30, 18, 50, .98), rgba(16, 11, 28, .98));
    border: 1px solid rgba(255, 255, 255, .10);
    box-shadow: 0 24px 60px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .07);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    transform: translateY(14px) scale(.96);
    transition: transform .32s cubic-bezier(.22, 1.15, .36, 1);
}
.gift-showcase.show .gs-card { transform: translateY(0) scale(1); }
.gs-close {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .12);
    background: rgba(255, 255, 255, .06);
    color: rgba(255, 255, 255, .75);
    font-size: 13px;
    line-height: 1;
    cursor: pointer;
}
.gs-stage {
    position: relative;
    width: 172px;
    height: 172px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.gs-stage::before {
    content: "";
    position: absolute;
    inset: -12%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(239, 2, 203, .22), rgba(120, 80, 255, .10) 55%, transparent 72%);
}
.gs-layer {
    position: absolute;
    inset: 0;
    background-repeat: no-repeat;
    background-position: 0 50%;
    transition: opacity .6s ease;
    will-change: opacity;
}
.gs-plain { background-size: contain !important; }
.gs-counter {
    position: absolute;
    bottom: -4px;
    padding: 3px 10px;
    border-radius: 12px;
    background: rgba(0, 0, 0, .45);
    border: 1px solid rgba(255, 255, 255, .10);
    font-size: 11px;
    font-weight: 700;
    color: rgba(255, 255, 255, .72);
    letter-spacing: .4px;
}
.gs-name {
    font-family: 'Unbounded', 'Onest', sans-serif;
    font-size: 17px;
    font-weight: 700;
    text-align: center;
    color: #fff;
    letter-spacing: .2px;
}
.gs-sub {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, .48);
}
.gs-price {
    font-size: 21px;
    font-weight: 900;
    color: var(--gold);
    text-shadow: 0 0 16px rgba(249, 181, 204, .35);
}
.gs-buy {
    width: 100%;
    margin-top: 4px;
    padding: 13px 0;
    border: none;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--accent-pink), var(--accent-purple));
    color: #fff;
    font-family: 'Onest', sans-serif;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 1px;
    box-shadow: 0 10px 24px rgba(239, 2, 203, .38), inset 0 1px 0 rgba(255, 255, 255, .28);
    cursor: pointer;
}
.gs-buy:active { transform: scale(.97); }

/* --- ЛЁГКИЙ РЕЖИМ: что он гасит ------------------------------------------
   Обложки карточек игр — это 18 карточек по два анимированных псевдоэлемента,
   то есть 36 постоянно живущих анимаций только на главном экране. Плюс blur
   шапки и нижнего меню работает ВСЕГДА: фон под ними почти непрозрачный,
   поэтому визуально мы почти ничего не теряем, а GPU освобождаем. */
body.perf-lite .game-item::before,
body.perf-lite .game-item::after,
body.perf-lite .mine-cell .gem,
body.perf-lite .daily-arrow,
body.perf-lite .badge.dev,
body.perf-lite .loader-progress-bar {
    animation: none !important;
}

body.perf-lite .top-bar,
body.perf-lite .bottom-menu,
body.perf-lite .modal-overlay,
body.perf-lite .toast-item,
body.perf-lite .bet-panel,
body.perf-lite .crash-history-panel,
body.perf-lite .case-cooldown,
body.perf-lite .fortune-mode-btn,
body.perf-lite .crash-area .timer-overlay,
body.perf-lite .gs-backdrop,
body.perf-lite .loader-overlay {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

/* --- РАЗДЕЛ «ЗАРАБОТОК» В ПРОФИЛЕ ----------------------------------------
   Иконки — из материала, одним спрайтом: 8 иконок = 1 запрос. Отдельные
   файлы через туннель стоили бы 8 x 700 мс. */
.earn-section { margin: 14px 0 4px; }
.earn-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 9px;
    padding: 0 2px;
}
.earn-title {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1.6px;
    color: rgba(255, 255, 255, .55);
}
.earn-tier { font-size: 11px; font-weight: 700; color: var(--gold); letter-spacing: .3px; }
.earn-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}
.earn-tile {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 10px 4px 9px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, .07);
    background: linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .015));
    color: #fff;
    cursor: pointer;
    transition: transform .18s ease, border-color .2s ease;
}
.earn-tile:active { transform: scale(.95); border-color: rgba(239, 2, 203, .35); }
.earn-ic {
    width: 34px;
    height: 34px;
    background-image: url('assets/newic/earn-sprite.webp');
    background-size: 800% 100%;
    background-repeat: no-repeat;
    background-position: 0 50%;
}
.earn-name { font-size: 11px; font-weight: 800; letter-spacing: .2px; }
.earn-sub { font-size: 9px; color: rgba(255, 255, 255, .42); letter-spacing: .2px; }
.earn-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    font-size: 9px;
    font-weight: 900;
    color: #0b0818;
    background: var(--gold);
    border-radius: 8px;
    padding: 1px 5px;
    display: none;
}
.earn-badge.on { display: block; }

.earn-modal { display: flex; flex-direction: column; gap: 7px; align-items: center; text-align: center; }
.earn-sum {
    font-family: 'Unbounded', 'Onest', sans-serif;
    font-size: 26px;
    font-weight: 700;
    color: var(--gold);
    text-shadow: 0 0 18px rgba(249, 181, 204, .35);
}
.earn-line { font-size: 12.5px; color: rgba(255, 255, 255, .8); line-height: 1.45; }
.earn-line.dim { color: rgba(255, 255, 255, .45); font-size: 11.5px; }
.earn-claim {
    width: 100%;
    margin-top: 12px;
    padding: 13px 0;
    border: none;
    border-radius: 15px;
    background: linear-gradient(135deg, var(--accent-pink), var(--accent-purple));
    color: #fff;
    font-family: 'Onest', sans-serif;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 1px;
    box-shadow: 0 10px 22px rgba(239, 2, 203, .36), inset 0 1px 0 rgba(255, 255, 255, .28);
    cursor: pointer;
}
.earn-claim:active { transform: scale(.97); }

.vip-table { width: 100%; display: flex; flex-direction: column; gap: 3px; }
.vip-row {
    display: grid;
    grid-template-columns: 1.1fr 1fr 1.3fr;
    gap: 4px;
    padding: 6px 8px;
    border-radius: 10px;
    font-size: 11px;
    color: rgba(255, 255, 255, .72);
    background: rgba(255, 255, 255, .035);
}
.vip-row.head { background: none; color: rgba(255, 255, 255, .4); font-size: 10px; text-transform: uppercase; letter-spacing: .6px; }
.vip-row.on { background: rgba(255, 204, 0, .13); color: #fff; border: 1px solid rgba(249, 181, 204, .3); }


/* --- ЗАДАНИЯ --- */
.task-list { display: flex; flex-direction: column; gap: 9px; width: 100%; }
.task-row {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(255, 255, 255, .035);
    border: 1px solid rgba(255, 255, 255, .06);
}
.task-row.is-claimed { opacity: .5; }
.task-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.task-title { font-size: 12.5px; font-weight: 800; color: #fff; }
.task-desc { font-size: 11px; color: rgba(255, 255, 255, .5); line-height: 1.35; }
.task-bar {
    height: 5px;
    border-radius: 3px;
    background: rgba(255, 255, 255, .09);
    overflow: hidden;
}
.task-fill {
    display: block;
    height: 100%;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--accent-pink), var(--accent-purple));
}
.task-prog { font-size: 10px; color: rgba(255, 255, 255, .42); letter-spacing: .4px; }
.task-state { font-size: 10.5px; font-weight: 900; color: var(--gold); letter-spacing: .4px; }
.task-state.done { color: #5fe08a; }
.task-claim {
    border: none;
    border-radius: 10px;
    padding: 6px 12px;
    background: linear-gradient(135deg, var(--accent-pink), var(--accent-purple));
    color: #fff;
    font-family: 'Onest', sans-serif;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .6px;
    cursor: pointer;
    box-shadow: 0 6px 14px rgba(239, 2, 203, .3);
}
.task-claim:active { transform: scale(.95); }

/* --- ТУРНИР --- */
.tour-table { display: flex; flex-direction: column; gap: 3px; width: 100%; margin: 4px 0; }
.tour-row {
    display: grid;
    grid-template-columns: 26px 1fr auto;
    gap: 8px;
    align-items: center;
    padding: 7px 10px;
    border-radius: 10px;
    background: rgba(255, 255, 255, .035);
    font-size: 12px;
    color: rgba(255, 255, 255, .8);
}
.tour-row.is-me { background: rgba(255, 204, 0, .13); border: 1px solid rgba(249, 181, 204, .3); color: #fff; }
.tour-place { font-weight: 900; color: var(--gold); text-align: center; }
.tour-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tour-score { font-weight: 800; color: #fff; }


/* --- TON В ШАПКЕ ----------------------------------------------------------
   Отдельная валюта рядом со звёздами. Иконка — из материала (pay1001/ton.svg,
   0,5 КБ), поэтому она одна и не тянет спрайт. */
.ton-block {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 11px 5px 8px;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(0, 152, 234, .20), rgba(0, 152, 234, .06));
    border: 1px solid rgba(0, 152, 234, .38);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .10);
    cursor: pointer;
    flex: 0 0 auto;
    transition: transform .2s ease;
}
.ton-block:active { transform: scale(.95); }
.ton-icon { width: 17px; height: 17px; display: block; }
.ton-block #ton-balance {
    font-size: 14px;
    font-weight: 800;
    color: #7ed2ff;
    letter-spacing: .2px;
}

/* --- ШАПКА: ужимаем под три валютных блока -------------------------------
   После добавления TON в шапке стало пять элементов на 430 px, и статус
   «Игроков онлайн: 1486» разъехался на три строки. Убираем лишние отступы
   и длинный текст — теперь всё в одну строку. */
.top-bar { padding: 9px 10px; gap: 7px; }
.user-block { gap: 7px; }
.avatar-wrapper img { width: 38px; height: 38px; }
.nickname { font-size: 14px; max-width: 25vw; }
.status { font-size: 10.5px; white-space: nowrap; }
.ton-block { padding: 4px 9px 4px 7px; gap: 4px; }
.ton-icon { width: 15px; height: 15px; }
.ton-block #ton-balance { font-size: 13px; }
.balance-block { padding: 4px 5px 4px 11px; gap: 6px; }
#balance { font-size: 16px; }
.coin-icon { width: 16px; height: 16px; }
.deposit-btn { width: 27px; height: 27px; font-size: 17px; }
.music-toggle { width: 30px; height: 30px; font-size: 13px; }

/* --- АРЕНА: интерфейс -----------------------------------------------------
   Фон и сетка — ассеты из материала (assets/arena/). Канвас теперь
   полупрозрачный, поэтому фон виден сквозь зоны, а не глухая заливка. */
.arena-stage {
    position: relative;
    overflow: hidden;
    border-radius: 22px;
    border: 1px solid rgba(120, 200, 255, .18);
    box-shadow: 0 18px 44px rgba(0, 0, 0, .5), inset 0 0 60px rgba(0, 40, 80, .35);
    background: #071018;
}
.arena-stage-bg,
.arena-stage-grid {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}
.arena-stage-bg { object-fit: cover; opacity: .9; }
.arena-stage-grid { object-fit: cover; opacity: .22; mix-blend-mode: screen; }
.arena-stage canvas { position: relative; z-index: 2; display: block; }
.arena-stage .arena-ball { z-index: 3; }

.arena-rake-note {
    margin: 4px 0 0;
    font-size: 10.5px;
    line-height: 1.35;
    font-weight: 700;
    color: rgba(255, 255, 255, .72);
}
.arena-rake-note span { color: var(--gold); font-weight: 900; }

.arena-header { border-radius: 20px; }
.arena-players-card { border-radius: 18px; }


/* --- КОРОВКА (Gift Road) --------------------------------------------------
   Дорога: горизонтальная лента из полос. Арт из материала — корова, машины
   по обочинам. Корову двигаем CSS-переходом, поэтому шаг выглядит плавным. */
/* Только нижний отступ: верхний задан классом .page, иначе заголовок
   уезжает под фиксированную шапку. */
#screen-cow { padding-bottom: 110px; }
.cow-head {
    display: flex; align-items: flex-end; justify-content: space-between;
    /* Верхний отступ — как у остальных экранов: у .page его нет, а шапка
       приложения фиксированная, иначе заголовок уезжает под неё. */
    /* Кнопка «назад» висит фиксированно в левом верхнем углу (до 108 px),
       поэтому контент начинаем ниже неё. */
    padding: 42px 16px 10px;
}
.cow-label { font-size: 11px; color: rgba(255,255,255,.5); margin: 0 0 2px; font-weight: 700; }
.cow-mult {
    font-family: 'Unbounded', 'Onest', sans-serif;
    font-size: 30px; font-weight: 700; color: #fff; letter-spacing: .5px;
    text-shadow: 0 0 20px rgba(239,2,203,.35);
}
.cow-payout { font-size: 20px; font-weight: 900; color: var(--gold); }

/* --- КОРОВКА: сцена улицы — перенос их .cr-* (game.css) один в один ------
   Их index.html пустой, всю сцену строит game.js, а рисует game.css.
   Геометрия из их game.js: SIDE 146, LANE 120, MH 84, PILL_H 34, PILL_DY 74,
   CAR_H 146, SPR_H 709, GIFT_BOT 112, GIFT_DISC 76. Всё в «u»: пиксели = u × s,
   где s считается от размера поля — поэтому на телефоне пропорции те же.
   Слева газон с коровой (road-left.png), справа финиш-дом (road-right.png),
   между ними асфальт, по полосам едут машины. */

.cow-road-wrap {
    position: relative;
    margin: 0 12px;
    /* их поле — 376 x 444: пропорция сцены, а не мои 300 px */
    aspect-ratio: 376 / 444;
    max-height: 62vh;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .08);
    background: #212440;
    /* значения по умолчанию — как в их .cr; JS подставляет свои под размер поля */
    --s: 1;
    --lane: 120px;
    --side: 146px;
    --row: 50%;
    --spr-h: 709px;
    --spr-y: 0px;
    --end-y: 0px;
    --road: #212440;
    --dash: rgba(128, 138, 196, .30);
    --cr-win: #5fe08a;
    --cr-danger: #ff4860;
    --cr-primary: #f236ea;
    --font-display: 'Unbounded', 'Onest', sans-serif;
    isolation: isolate;
    user-select: none;
    -webkit-user-select: none;
}

/* обочина слева: газон, по нему идёт корова */
.cow-side {
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: var(--side);
    background: url(/assets/cow/road-left.png) 0 var(--spr-y) / var(--side) var(--spr-h) repeat-y, #3B7573;
}
/* дорога: асфальт от обочины до финиша */
/* Их `.cr` — корень сцены. У нас это `#cow-road` (класс занят разметкой). */
.cow-road {
    position: absolute;
    inset: 0;
    overflow: hidden;
    background: var(--road);
    isolation: isolate;
    user-select: none;
    -webkit-user-select: none;
}
/* Дорога — контейнер полос. Их `.cr-road`: left: var(--side), ширина = полос
   × LANE, а полосы внутри стоят на left: i × LANE (от края ДОРОГИ, не сцены).
   Имя `cow-ways`, а не `cow-road`: класс `cow-road` уже занят корнем сцены
   (`#cow-road` из index.html) — с одинаковым именем стили дрались. */
.cow-ways {
    position: absolute;
    top: 0; bottom: 0;
    background: var(--road);
}
/* трек — то, что едет под коровой: полосы, машины, финиш */
/* Их `.cr-track`: в нём ВСЁ — обочина, дорога, машины, подарки, финиш.
   Ширина задаётся в JS (sideW + полосы × LANE + хвост под финиш). */
.cow-track {
    position: absolute;
    left: 0; top: 0;
    height: 100%;
    will-change: transform;
    transition: transform .55s cubic-bezier(.3, 1.1, .4, 1);
}
/* финиш справа: дом (road-right.png) + полоса дороги под ним */
.cow-end {
    position: absolute;
    top: 0; bottom: 0;
    z-index: 2;
    background: url(/assets/cow/road-right.png) 0 var(--end-y) / auto var(--spr-h) no-repeat,
                url(/assets/cow/road-right-walk.png) 0 calc(var(--end-y) + var(--spr-h) * 56 / 709) / calc(var(--spr-h) * 126 / 709) auto repeat-y,
                #3B7573;
}

/* полоса дороги: вертикальная лента во всю высоту */
.cow-lane {
    position: absolute;
    top: 0; bottom: 0;
    width: var(--lane);
}
/* разметка — пунктир между полосами, как у них: градиентом, а не картинкой */
.cow-lane + .cow-lane::before {
    content: "";
    position: absolute;
    left: calc(-2px * var(--s));
    top: 0; bottom: 0;
    width: calc(4px * var(--s));
    border-radius: 2px;
    background: repeating-linear-gradient(180deg,
        var(--dash) 0 calc(34px * var(--s)),
        transparent calc(34px * var(--s)) calc(62px * var(--s)));
    background-position: 0 calc(var(--row) - 17px * var(--s));
}

/* люк, шлагбаум, плашка, кольцо — все по центру полосы */
.cow-mh, .cow-bar, .cow-pill, .cow-ring {
    position: absolute;
    left: 50%;
    pointer-events: none;
}
.cow-mh {
    z-index: 1;
    top: var(--row);
    width: calc(84px * var(--s));
    aspect-ratio: 96 / 84;
    transform: translate(-50%, -50%);
}
.cow-mh img {
    position: absolute;
    inset: 0;
    width: 100%; height: 100%;
}
.cow-mh__g { opacity: 0; }
.cow-lane.is-done .cow-mh__g,
.cow-lane.is-cur .cow-mh__g { opacity: 1; }
.cow-lane.is-done .cow-mh__d,
.cow-lane.is-cur .cow-mh__d { opacity: 0; }
.cow-lane.is-flip .cow-mh { animation: cowFlip .42s cubic-bezier(.3, .7, .3, 1); }
@keyframes cowFlip {
    0%   { transform: translate(-50%, -50%) scale(1, 1); }
    35%  { transform: translate(-50%, -50%) scale(1.12, .82); }
    100% { transform: translate(-50%, -50%) scale(1, 1); }
}

/* шлагбаум поднимается, когда полосу прошли */
.cow-bar {
    z-index: 5;
    top: calc(var(--row) - 108px * var(--s));
    width: calc(86px * var(--s));
    transform: translate(-50%, 0);
    opacity: 0;
    transition: opacity .2s ease, transform .3s cubic-bezier(.3, 1.4, .5, 1);
    transform-origin: 50% 100%;
}
.cow-lane.is-done .cow-bar,
.cow-lane.is-cur .cow-bar {
    opacity: 1;
    animation: cowBar .35s cubic-bezier(.3, 1.5, .5, 1) both;
}
@keyframes cowBar {
    from { transform: translate(-50%, calc(-26px * var(--s))) scale(.7); opacity: 0; }
    to   { transform: translate(-50%, 0) scale(1); opacity: 1; }
}

/* кольцо на следующей полосе — пульсирует, зовёт шагнуть */
.cow-ring {
    top: var(--row);
    width: calc(98px * var(--s));
    height: calc(98px * var(--s));
    transform: translate(-50%, -50%);
    border-radius: 50%;
    opacity: 0;
    box-shadow: 0 0 0 calc(3px * var(--s)) rgba(255, 79, 216, .55),
                0 0 calc(26px * var(--s)) rgba(255, 79, 216, .28);
}
.cow-lane.is-next .cow-ring { animation: cowRing 1.6s ease-in-out infinite; }
@keyframes cowRing {
    0%, 100% { opacity: .35; transform: translate(-50%, -50%) scale(.94); }
    50%      { opacity: .95; transform: translate(-50%, -50%) scale(1.02); }
}

/* плашка множителя — НАД слоем машин, фон непрозрачный: машина проезжает под ней */
.cow-pill {
    top: calc(var(--row) + 74px * var(--s));
    transform: translate(-50%, -50%);
    z-index: 5;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: calc(88px * var(--s));
    max-width: calc(var(--lane) - 10px);
    height: calc(34px * var(--s));
    padding: 0 clamp(3px, calc(24px * var(--s) - 8px), calc(12px * var(--s)));
    border-radius: calc(11px * var(--s));
    background: #2f3560;
    color: #C3C8E4;
    font: 700 max(13px, calc(15px * var(--s)))/1 var(--font-display);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    letter-spacing: -.02em;
    transition: background-color .2s ease, color .2s ease;
}
.cow-lane.is-done .cow-pill { background: #253a2e; color: var(--cr-win); }
.cow-lane.is-cur .cow-pill    { background: #1f8f4e; color: #fff; }
.cow-lane.is-next .cow-pill   { background: #43244a; color: #ffd6f6; }
.cow-lane.is-lost .cow-pill { background: #8c1f34; color: #fff; }

/* слой машин — под плашками (z-index 3), машины двигает код */
.cow-cars {
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
}
.cow-car {
    position: absolute;
    left: 0; top: 0;
    object-fit: contain;
    will-change: transform;
    filter: drop-shadow(0 calc(12px * var(--s)) calc(10px * var(--s)) rgba(4, 6, 16, .5));
}

/* карточка подарка: низ висит над люком, растёт вверх — диск + сумма */
.cow-gift {
    position: absolute;
    z-index: 4;
    top: calc(var(--row) - 112px * var(--s));
    left: 0;
    display: grid;
    justify-items: center;
    gap: calc(4px * var(--s));
    transform: translate(-50%, -100%);
    transition: opacity .25s ease, visibility 0s linear 0s;
}
.cow-gift__disc {
    position: relative;
    display: grid;
    place-items: center;
    width: calc(72px * var(--s));
    height: calc(72px * var(--s));
    border-radius: 50%;
    background: radial-gradient(closest-side, #262a4d 0%, #181b36 72%, #14172e 100%);
    box-shadow: inset 0 0 0 calc(2px * var(--s)) rgba(128, 138, 196, .26),
                0 calc(6px * var(--s)) calc(14px * var(--s)) rgba(6, 8, 20, .42);
    overflow: hidden;
    transition: box-shadow .2s ease, opacity .2s ease;
}
.cow-gift__disc img {
    width: calc(56px * var(--s));
    height: calc(56px * var(--s));
    object-fit: contain;
    transform-origin: 50% 60%;
    transition: opacity .2s ease, filter .2s ease;
}
.cow-gift__disc .cow-coin { opacity: .9; }
.cow-lane.is-next .cow-gift__disc img { animation: cowGiftBob 1.1s ease-in-out infinite; }
@keyframes cowGiftBob {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(calc(-4px * var(--s))) scale(1.04); }
}
/* сумма шага — крупная плашка под диском */
.cow-gift__sum {
    display: inline-flex;
    align-items: center;
    height: max(20px, calc(24px * var(--s)));
    padding: 0 max(5px, calc(8px * var(--s)));
    border-radius: 999px;
    max-width: calc(var(--lane) - 6px);
    box-sizing: border-box;
    overflow: hidden;
    background: #14172e;
    box-shadow: inset 0 0 0 1px rgba(128, 138, 196, .24);
    color: #D5D9EE;
    font: 800 max(13px, calc(15px * var(--s)))/1 var(--font-display);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    letter-spacing: -.02em;
    transition: background-color .2s ease, color .2s ease;
}
.cow-lane.is-next .cow-gift__sum { background: #43244a; color: #ffd6f6; }
.cow-lane.is-done .cow-gift__sum { background: #253a2e; color: var(--cr-win); }

/* корова — на газоне слева, как у них: она на месте, дорога едет под ней */
/* Их `.cr-cow`: позицию держит КОНТЕЙНЕР (transform), а прыжок и
   расплющивание идут по ВНУТРЕННЕМУ спрайту. Пока у нас был один элемент,
   transform дрался сам с собой — отсюда дёрганье. */
.cow-cow {
    position: absolute;
    left: 0; top: 0;
    z-index: 2;
    width: calc(150px * var(--s));
    height: auto;
    aspect-ratio: 2 / 1;
    pointer-events: none;
    transform-origin: 50% 88%;
    filter: drop-shadow(0 calc(8px * var(--s)) calc(8px * var(--s)) rgba(6, 8, 20, .45));
    will-change: transform;
}
.cow-cow__sprite {
    display: block;
    width: 100%; height: 100%;
    object-fit: contain;
    transform-origin: 50% 80%;
}
/* Их `cowRubupBreathe` — только когда корова СТОИТ (`:not(.is-walking)`) */
.cow-cow:not(.is-walking):not(.is-flat) .cow-cow__sprite { animation: cowBreathe 2.8s ease-in-out infinite; }
/* Их `cowStepSprite` — прыжок на шаг, 500 мс (их HOP_MS) */
.cow-cow.is-walking .cow-cow__sprite { animation: cowHop 500ms linear both; }
/* Их `cowRubupFlat` — расплющивание */
.cow-cow.is-flat .cow-cow__sprite { animation: cowFlat 333ms ease-out both; }
/* Их `.cr.is-shake .cr-track` — тряска всей сцены при ударе */
.cow-road.is-shake .cow-track { animation: cowShake .38s ease-in-out; }
@keyframes cowShake {
    0%, 100% { translate: 0 0; }
    20% { translate: -5px 3px; }
    45% { translate: 5px -3px; }
    70% { translate: -3px 2px; }
}
/* Старый <img id="cow-hero"> из index.html больше не нужен — корову строит сцена */
.cow-hero { display: none !important; }


.cow-modes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; margin: 12px 12px 0; }
.cow-mode {
    border: 1px solid rgba(255,255,255,.08); border-radius: 14px;
    background: rgba(255,255,255,.04); color: #fff; padding: 8px 4px;
    display: flex; flex-direction: column; gap: 2px; align-items: center; cursor: pointer;
}
.cow-mode span { font-size: 11px; font-weight: 800; }
.cow-mode b { font-size: 9px; font-weight: 700; color: rgba(255,255,255,.45); }
.cow-mode.is-on { border-color: rgba(255,79,216,.55); background: rgba(255,79,216,.14); }

.cow-panel { margin: 12px 12px 0; display: flex; flex-direction: column; gap: 9px; }
.cow-bet-row {
    display: flex; align-items: center; gap: 8px;
    border: 1px solid var(--glass-border); border-radius: 12px;
    background: rgba(0,0,0,.28); padding: 10px 12px;
}
.cow-bet-row input { flex: 1; border: none; background: transparent; color: #fff; font-size: 15px; font-weight: 900; outline: none; }
.cow-bet-row span { color: var(--gold); font-weight: 900; }
.cow-chips { display: grid; grid-template-columns: repeat(5, 1fr); gap: 7px; }
.cow-chip {
    border: 1px solid var(--glass-border); border-radius: 11px; background: rgba(255,255,255,.05);
    color: #d7deef; font-size: 12px; font-weight: 800; min-height: 38px; cursor: pointer;
}
.cow-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.cow-step, .cow-cash {
    min-height: 50px; border: none; border-radius: 16px; color: #fff;
    font-family: 'Onest', sans-serif; font-size: 15px; font-weight: 900; letter-spacing: .6px; cursor: pointer;
}
.cow-step { background: linear-gradient(135deg, var(--accent-pink), var(--accent-purple)); box-shadow: 0 10px 24px rgba(239,2,203,.35); }
.cow-cash { background: linear-gradient(135deg, #2fbf6a, #1d8f4e); box-shadow: 0 10px 24px rgba(47,191,106,.30); }
.cow-cash.is-off { opacity: .4; box-shadow: none; }
.cow-step:active, .cow-cash:active { transform: scale(.97); }

.cow-fair {
    margin: 12px 14px 0; padding: 10px 12px; border-radius: 12px;
    background: rgba(255,255,255,.035); border: 1px solid rgba(255,255,255,.06);
    font-size: 10.5px; color: rgba(255,255,255,.55); display: flex; flex-direction: column; gap: 3px;
}
.cow-fair code { font-size: 10px; color: #9fd7ff; word-break: break-all; }
.cow-fair.is-bad { border-color: rgba(255,72,72,.5); color: #ff8f8f; }


.cow-fly-coin {
    position: absolute;
    width: 26px; height: 26px;
    pointer-events: none;
    z-index: 9;
    animation: cowCoinFly 1.1s ease-out forwards;
}
@keyframes cowCoinFly {
    0% { transform: translate(0, 0) scale(.7); opacity: 0; }
    18% { opacity: 1; }
    100% { transform: translate(var(--dx), var(--dy)) scale(1.1); opacity: 0; }
}
/* Выпавший подарок вылетает из-под коровы вверх и там же остаётся видимым
   дольше монет: игрок должен успеть разглядеть, ЧТО именно ему упало —
   вещь уходит в инвентарь, а не превращается в звёзды. */
.cow-fly-gift {
    position: absolute;
    width: 52px; height: 52px;
    object-fit: contain;
    pointer-events: none;
    z-index: 10;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .55));
    animation: cowGiftPop 2.4s cubic-bezier(.22, 1, .36, 1) forwards;
}
@keyframes cowGiftPop {
    0%   { transform: translateY(10px) scale(.4); opacity: 0; }
    18%  { transform: translateY(-18px) scale(1.18); opacity: 1; }
    32%  { transform: translateY(-14px) scale(1); opacity: 1; }
    78%  { transform: translateY(-16px) scale(1); opacity: 1; }
    100% { transform: translateY(-46px) scale(.92); opacity: 0; }
}

/* Порядок слоёв как у них: люк 1 < машины 3 < подарки 4 < плашка 5. Слой
   подарков отдельный — в их разметке карточки НЕ внутри полосы. */
.cow-gifts {
    position: absolute;
    inset: 0;
    z-index: 4;
    pointer-events: none;
}
.cow-lane .cow-pill { z-index: 5; }


/* Их `fold()`: в раунде режимы и ставку сворачиваем — остаются только
   «ВПЕРЁД» и «ЗАБРАТЬ». */
#screen-cow.is-round .cow-modes,
#screen-cow.is-round .cow-bet-row,
#screen-cow.is-round .cow-chips { display: none; }

/* Их R11/ALL1006: редкость подарка — слабый свет сверху + дуга снизу цветом
   редкости. Пороги (game.js): 100 / 1000 / 3000 / 6000 / 10000. */
.cow-gift.is-r0 { --rc: 150,162,196; }
.cow-gift.is-r1 { --rc: 52,116,255; }
.cow-gift.is-r2 { --rc: 138,78,255; }
.cow-gift.is-r3 { --rc: 226,64,222; }
.cow-gift.is-r4 { --rc: 242,58,72; }
.cow-gift.is-r5 { --rc: 239,2,203; }
.cow-gift[class*="is-r"] .cow-gift__disc {
    background:
        radial-gradient(80% 60% at 50% 0%, rgba(var(--rc), .24) 0%, rgba(var(--rc), 0) 72%),
        radial-gradient(closest-side, #262a4d 0%, #181b36 72%, #14172e 100%);
    box-shadow: inset 0 calc(-3px * var(--s)) 0 rgb(var(--rc)),
                inset 0 0 0 1px rgba(var(--rc), .32),
                0 calc(6px * var(--s)) calc(14px * var(--s)) rgba(6, 8, 20, .42);
}
.cow-gift.is-next[class*="is-r"] .cow-gift__disc {
    box-shadow: inset 0 calc(-3px * var(--s)) 0 rgb(var(--rc)),
                inset 0 0 0 calc(2px * var(--s)) rgba(255, 255, 255, .7),
                0 calc(6px * var(--s)) calc(14px * var(--s)) rgba(6, 8, 20, .42);
}
.cow-gift.is-cur[class*="is-r"] .cow-gift__disc {
    box-shadow: inset 0 calc(-3px * var(--s)) 0 rgb(var(--rc)),
                inset 0 0 0 calc(3px * var(--s)) var(--accent-pink),
                0 0 calc(22px * var(--s)) rgba(239, 2, 203, .38);
}
.cow-gift.is-cash .cow-gift__disc {
    background: radial-gradient(closest-side, #1f2342 0%, #161932 100%);
}

/* Их `.cr-edge--r`: затемнение правого края поля. */
.cow-edge {
    position: absolute;
    top: 0; bottom: 0; right: 0;
    width: 48px;
    z-index: 4;
    pointer-events: none;
    background: linear-gradient(90deg, rgba(33, 36, 64, 0), rgba(18, 21, 40, .55));
}

/* Их `.cr-feathers`: слой перьев при сбитии (SVG, рисует JS). */
.cow-feathers {
    position: absolute;
    inset: 0;
    width: 100%; height: 100%;
    z-index: 6;
    overflow: visible;
    pointer-events: none;
}

/* Их кнопки поверх поля: `.gk-field__corner--tl/--tr/--br`. Звук слева
   сверху, «?» справа сверху, щит честности справа снизу. */
.cow-corner {
    position: absolute;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 6px;
    pointer-events: none;
}
.cow-corner > * { pointer-events: auto; }
.cow-corner--tl { top: 10px; left: 10px; }
.cow-corner--tr { top: 10px; right: 10px; }
.cow-corner--br { bottom: 8px; right: 12px; }
.cow-tool {
    width: 34px; height: 34px;
    display: grid; place-items: center;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,.12);
    background: rgba(12,12,19,.72);
    color: #fff; font-size: 16px; line-height: 1; cursor: pointer;
    transition: opacity .2s ease;
}
.cow-tool[aria-pressed="false"] { opacity: .5; }
.cow-tool:active { transform: scale(.94); }
.cow-badge {
    display: flex; align-items: center; gap: 6px;
    padding: 5px 10px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,.12);
    background: rgba(12,12,19,.72);
    color: #9fe3b0;
    font-size: 11.5px; font-weight: 700;
}

/* Их окно «Честная игра»: короткий текст, «Проверить раунд», хеши свёрнуты. */
.cow-dlg {
    position: fixed;
    inset: 0;
    margin: auto;
    width: calc(100% - 24px);
    max-width: 400px;
    height: fit-content;
    border: 0;
    padding: 0;
    background: transparent;
    color: #F4F5F7;
}
.cow-dlg::backdrop { background: rgba(6, 8, 16, .74); }
.cow-dlg__box {
    display: flex; flex-direction: column; gap: 12px;
    padding: 16px;
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,.1);
    background: #161A2B;
}
.cow-dlg__head { display: flex; align-items: center; gap: 10px; }
.cow-dlg__head h2 { flex: 1; margin: 0; font-size: 17px; font-weight: 800; }
.cow-dlg__x { border: 0; background: none; color: #8D919E; font-size: 22px; line-height: 1; cursor: pointer; }
.cow-fair__intro { margin: 0; font-size: 14px; line-height: 1.45; color: #C9CCD6; }
.cow-fair__box {
    display: flex; flex-direction: column; gap: 10px;
    padding: 14px 16px;
    border-radius: 16px;
    background: #1A2238;
}
.cow-fair__go {
    width: 100%; min-height: 48px;
    border: 0; border-radius: 14px; cursor: pointer;
    background: linear-gradient(135deg, #00c853, #00e676);
    color: #fff; font-size: 15px; font-weight: 800;
}
.cow-fair__go:disabled { opacity: .55; cursor: default; }
.cow-fair__res { display: flex; flex-direction: column; gap: 6px; }
.cow-fair__res[hidden] { display: none; }
.cow-fair__verdict { margin: 0; font-size: 15px; font-weight: 800; color: #fff; }
.cow-fair__verdict.is-bad { color: #FF8A9B; }
.cow-fair__line { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 13.5px; font-weight: 600; color: #C9CCD6; }
.cow-fair__line.is-bad { color: #FF8A9B; }
.cow-fair__more { border-top: 1px solid rgba(255,255,255,.07); padding-top: 8px; }
.cow-fair__more > summary { cursor: pointer; list-style: none; font-size: 13px; font-weight: 600; color: #8D919E; }
.cow-fair__more > summary::-webkit-details-marker { display: none; }
.cow-fair__more > summary::after { content: " \25BE"; font-size: 11px; }
.cow-fair__more[open] > summary::after { content: " \25B4"; }
.cow-dlg__list { margin: 8px 0 0; display: flex; flex-direction: column; gap: 6px; }
.cow-dlg__list > div { display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; color: #8D919E; }
.cow-dlg__list dt { flex: none; }
.cow-dlg__list dd { margin: 0; color: #C9CCD6; word-break: break-all; text-align: right; }
.cow-dlg__list dd.is-mono { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 11.5px; }
.cow-dlg__row { margin-top: 10px; }
.cow-dlg__btn { width: 100%; min-height: 42px; border-radius: 12px; border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.05); color: #D7DEEF; font-size: 13.5px; font-weight: 700; cursor: pointer; }
.cow-fair__empty { margin: 0; font-size: 14px; color: #8D919E; }

/* ── Экран Коровки как страница их игры ───────────────────────────────────
   Их `gkShell` считает высоту от вьюпорта (`--gk-h`, `--gk-top`), а у нас
   экран был длинной прокручиваемой страницей — поэтому их `bottom`-каркас
   обрезался снизу. Даём экрану высоту окна: поле растягивается, панель
   занимает своё внизу. */
/* 12.10.2026: под игрой теперь их лента ставок (`gkBets`), поэтому экран снова
   прокручивается; каркас игры (`gk-shell`) занимает ровно один экран, лента —
   ниже и доезжает прокруткой. Место под нижнее меню — свой padding-bottom. */
#screen-cow.active {
    display: block;
    height: 100%;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: calc(84px + var(--safe-bottom));
}
#screen-cow .gk-shell {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    border-radius: 0;
}
#screen-cow .gk-stage {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    padding: 0 8px;
}
#screen-cow .gk-panel {
    flex: none;
    padding: 10px 12px 12px;
}
/* поле внутри штага тянется на всю его высоту */
#screen-cow .gk-stage > .cow-road-wrap {
    flex: 1 1 auto;
    width: 100%;
    max-height: none;
    aspect-ratio: auto;
    margin: 0;
}
/* Их каркас берёт высоту из `--gk-h` (вьюпорт минус 120) — вместе с нашим
   заголовком это вылезало за экран. Прижимаем его к остатку. */
#screen-cow .gk-shell,
#screen-cow .gk-shell--bottom,
#screen-cow .gk-shell--side {
    height: 100% !important;
    max-height: none !important;
}
#screen-cow .gk-shell > .gk-stage { height: auto !important; max-height: none !important; }

/* ── Коровка: `body.cow-full` — метка «открыт экран Коровки» ──────────────
   12.10.2026: шапку приложения и нижнее меню на экране Коровки больше НЕ
   прячем, и наш `cow-head` (множитель + выплата) вернулся: вставку их
   `gk-head` ВНУТРЬ игры убрали — шапка их сайта переехала в основу
   приложения (правило владельца). Правила ниже — только раскладка их
   панели `gk-panel` под нашу ширину. */
#screen-cow.active { padding-top: 0; }

/* Их `gk-panel__body` на широком экране — две колонки (`1fr 1fr`). На телефоне
   должна быть одна: из-за двух колонок ставка и режимы сжимались в узкие
   полоски. Их `@media` до нашего контейнера не достаёт, поэтому задаём явно. */
body.cow-full .gk-shell .gk-panel__body,
/* `:not([hidden])` — иначе наш `display: flex !important` перебивал их же
   `.gk-pane[hidden] { display: none !important }`, и обе панели режима
   (Ручная/Авто) показывались одновременно. */
body.cow-full .gk-shell .gk-pane:not([hidden]) {
    display: flex !important;
    flex-direction: column !important;
    gap: var(--gk-gap, 14px) !important;
}
/* поле ввода ставки — на всю ширину, как у них */
body.cow-full .gk-amount__box { display: flex !important; align-items: center; gap: 8px; }
body.cow-full .gk-amount__input {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    text-align: center;
    font-weight: 700;
}
/* снято: их же сетка `repeat(var(--gk-seg-n), 1fr)` вернее */
/* снято: их же сетка `repeat(var(--gk-seg-n), 1fr)` вернее */

/* Панель Коровки: их `.gk-quick` и `.gk-seg` — сетки по счётчику, который
   ставит их JS (`--gk-quick-n`, `--gk-seg-n`). Мы счётчики теперь передаём,
   а свои перебивки сеток сняли — из-за них кнопки и поле сжимались в полоски. */
body.cow-full .gk-quick,
body.cow-full .gk-seg { display: grid !important; }
body.cow-full .gk-amount__box { display: flex !important; align-items: center; gap: 8px; }
body.cow-full .gk-amount__input { flex: 1 1 auto !important; min-width: 0 !important; }
body.cow-full .gk-amount__btn,
body.cow-full .gk-quick__btn,
body.cow-full .gk-seg__opt { min-width: 0 !important; }

/* Их `.gk-panel` в каком-то слое становится сеткой из двух колонок
   (`44px 320px`): тело панели зажималось в 44 px, а 320 отдавалось низу —
   от этого ½/2×/МАКС, поле ставки и режимы выглядели полосками.
   У них базовое — колонка, её и ставим. */
#screen-cow .gk-panel {
  display: flex !important;
  flex-direction: column !important;
  width: 100% !important;
  min-width: 0 !important;
}
#screen-cow .gk-panel__body,
#screen-cow .gk-panel__foot,
#screen-cow .gk-pane { width: 100% !important; min-width: 0 !important; }

/* Кнопка панели — во всю ширину (их `.gk-ctarow` может сжимать) */
#screen-cow .gk-ctarow { width: 100% !important; display: block !important; }
#screen-cow .gk-cta { width: 100% !important; }
#screen-cow .gk-ctarow .gk-btn { width: 100% !important; margin-top: 8px; }


/* ── Их корень `.gk` (контейнер их кита) ──────────────────────────────────
   Их `.gk` объявляет `container: gk / inline-size` — на нём держатся все их
   @container-правила (телефонные колонки ленты, размеры слайдера и таблиц).
   Штаг игры и лента живут внутри него, как у них: штаг — один экран, лента —
   ниже и доезжает прокруткой экрана. */
#screen-cow > .gk {
    display: flex;
    flex-direction: column;
    /* Остаток места после НАШЕГО заголовка с множителем и щита честности
       (сколько именно — считает `cowRender` и кладёт в `--cow-chrome`).
       Каркас игры не сжимается флексом: иначе поле схлопывалось в полоску. */
    height: calc(100% - var(--cow-chrome, 176px));
}
#screen-cow .gk-shell { flex: 0 0 auto; }
#screen-cow .gk > .gk-bets { height: auto; }


/* ── Их `cw-focus` (в раунде и автоигре тело панели свёрнуто) ─────────────
   Их правило из `game.css` (@container gk max-width 639.98) — у нас та же
   роль: под дорогой остаются только «Забрать» / «Шаг» / «Остановить авто»,
   а поле получает всё освободившееся место (иначе оно сжималось в полоску). */
#screen-cow .gk.cw-focus .gk-panel > .gk-panel__body {
    height: 0;
    min-height: 0;
    margin-block: 0;
    padding-block: 0;
    overflow: hidden;
    opacity: 0;
}
#screen-cow .gk.cw-focus .gk-panel > .gk-panel__foot { margin-bottom: 0; }

/* ── Блэкджек: ИХ страница игры в кадре (`games/blackjack/`) ───────────────────
   Их блэкджек — отдельный документ со своим CSS (`games/blackjack/game.css`),
   своими картами (`cards.js`) и своим китом, поэтому кадру нужна вся площадь
   экрана: без нашего скролла и без отступов сверху. Место под нижнее меню
   остаётся от `.page` — его `padding-bottom`. */
#screen-blackjack.page {
    overflow: hidden;
    padding-top: 0;
}
#screen-blackjack .bj-frame {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    background: #0b0b0e;
    color-scheme: dark;
}

/* ── Меню валюты в шапке: фон пунктов ─────────────────────────────────────────
   Их `.menu__item` (пункт меню валюты) фон не задаёт — на их сайте его снимает
   общий сброс кнопок сайта, которого у нас нет. Без него браузер рисует
   системную светло-серую кнопку (#f0f0f0) с белым текстом: «TON» и «USDT» в
   меню становились нечитаемыми. Пункт с выбранной валютой — их же
   `--surface-active` (это правило у них есть). */
#app-topbar .menu__item {
    background: transparent;
    border: 0;
    color: var(--text, #fff);
}
#app-topbar .menu__item:hover,
#app-topbar .menu__item:focus-visible { background: var(--surface-4, rgba(255,255,255,.08)); }
#app-topbar .menu__item[aria-checked="true"] { background: var(--surface-active, rgba(255,255,255,.12)); }
#app-topbar .menu__item .cur-mark { flex: none; display: block; }

/* ── Коровка: суммы на полосах в валюте шапки ─────────────────────────────────
   В звёздах рядом с числом стоит звёздная монета (их вид). В TON/USDT монета
   была бы чужой — её убираем, сумма идёт со своим значком («0,28 ∇»). */
#screen-cow .cow-gift.is-vcur .cow-gift__disc { display: none; }
#screen-cow .cow-gift.is-vcur .cow-gift__sum { font-size: 12px; letter-spacing: 0; white-space: nowrap; }
/* `.rc-g` — их же класс: ставит шрифт значков валюты (`RubupCurrency`) первым,
   иначе TON/звёзды рисуются пустым квадратом */
#screen-cow .rc-g { font-family: RubupCurrency, Unbounded, Onest, sans-serif; }

/* ── Коровка: панель над клавиатурой Telegram ─────────────────────────────────
   Их же правило (`games/cow/game.css`, `.gk-panel.cw-amount-keyboard`): когда
   игрок вводит сумму, панель поднимается на высоту клавиатуры. Сдвиг считает
   `cowAmountViewport()` в app_v2.js (перенос их `panel-1003.js`). */
#screen-cow .gk-panel.cw-amount-keyboard {
    position: relative;
    z-index: 8;
    transform: translateY(var(--cw-keyboard-y, 0px));
}

/* ── Коровка: ставка подарком (их `gift-round.js`) ────────────────────────────
   Переключатель «Балансом | Подарком» и лента подарков из инвентаря: подарок
   становится ставкой, звёзды не тратятся. Лента — своя, у нас нет их блока. */
#screen-cow .cow-giftbox { display: flex; flex-direction: column; gap: 8px; }
#screen-cow .cow-giftlist {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
    gap: 8px;
    max-height: 168px;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 2px;
}
#screen-cow .cow-giftlist__empty { margin: 0; padding: 10px 2px; font-size: 12px; color: var(--ui-text-dim, #b6bcd2); }
#screen-cow .cow-giftcard {
    display: flex; flex-direction: column; align-items: center; gap: 4px;
    padding: 8px 6px; min-width: 0;
    border-radius: 14px; border: 1px solid rgba(255,255,255,.08);
    background: rgba(255,255,255,.04); color: #fff; cursor: pointer;
}
#screen-cow .cow-giftcard img,
#screen-cow .cow-giftcard__noimg {
    width: 44px; height: 44px; object-fit: contain; border-radius: 10px;
    background: rgba(255,255,255,.06);
}
#screen-cow .cow-giftcard b {
    font-size: 11.5px; font-weight: 700; line-height: 1.2; text-align: center;
    overflow: hidden; text-overflow: ellipsis; display: -webkit-box;
    -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
#screen-cow .cow-giftcard span { font-size: 12px; font-weight: 800; color: #ffd977; }
#screen-cow .cow-giftcard.is-on { border-color: #ef02cb; box-shadow: 0 0 0 1px #ef02cb inset; }

/* ── Коровка: телефонная шапка панели (их `cowPhonePanel`) ────────────────────
   На телефоне вместо вкладок «Ручная | Авто» — одна строка: сегмент
   «Балансом | Подарком» и переключатель «Авто». */
#screen-cow .cw-head { display: flex; align-items: center; gap: 8px; }
#screen-cow .cw-head .gk-seg { flex: 1 1 auto; min-width: 0; }
#screen-cow .cw-auto {
    display: inline-flex; align-items: center; gap: 7px; flex: none;
    height: 38px; padding: 0 10px; border-radius: 12px;
    border: 1px solid rgba(255,255,255,.09); background: rgba(255,255,255,.04);
    color: #fff; font-size: 12.5px; font-weight: 800; cursor: pointer;
}
#screen-cow .cw-auto__track {
    position: relative; width: 26px; height: 15px; border-radius: 999px;
    background: rgba(255,255,255,.18); transition: background .16s ease;
}
#screen-cow .cw-auto__track::after {
    content: ""; position: absolute; top: 2px; left: 2px;
    width: 11px; height: 11px; border-radius: 50%; background: #fff;
    transition: transform .16s ease;
}
#screen-cow .cw-auto[aria-checked="true"] { border-color: #ef02cb; }
#screen-cow .cw-auto[aria-checked="true"] .cw-auto__track { background: #ef02cb; }
#screen-cow .cw-auto[aria-checked="true"] .cw-auto__track::after { transform: translateX(11px); }

/* ── Коровка на телефоне: поле не должно сжиматься в полоску ──────────────────
   Панель у нас высокая (шапка + сумма + сложность), и от поля оставалось 187 px
   при экране 896 — «игра как будто не вылазит». Держим минимум под поле, а
   настройки при нехватке прокручиваются внутри панели (кнопка внизу остаётся). */
@media (max-width: 639.98px) {
    #screen-cow .gk-stage { min-height: 46vh; }
    #screen-cow .gk-panel__body { overflow-y: auto; overscroll-behavior: contain; }
    /* значок валюты в подписи главной кнопки — их шрифтом, иначе пустой квадрат */
    #screen-cow .gk-cta__sub { font-family: RubupCurrency, Unbounded, Onest, sans-serif; }
}

/* ── Рейс (Самолётик): их страница в кадре ────────────────────────────────────
   Их движок сам решает раскладку (телефон / ПК по `rs-wide`), поэтому кадру
   отдаём всю площадь экрана — как у блэкджека и плинко. */
#screen-reys.page { padding: 0; overflow: hidden; }
/* Высота кадра — ровно между нашей шапкой (64) и нижним меню (69): их движок
   считает свою раскладку от размера кадра (100dvh внутри кадра), иначе низ
   («СТАВКА» и колесо) уезжал под меню. */
#screen-reys .reys-frame {
    display: block; width: 100%;
    height: calc(100dvh - var(--topbar-h) - 69px);   /* запасной вариант для старых WebView */
    height: calc(100svh - var(--topbar-h) - 69px);   /* ALTUSHKA: стабильная высота — без мигания в Telegram */
    border: 0; background: #07182f; border-radius: 18px;
}

/* ── ПК: игры на весь экран ──────────────────────────────────────────────────
   Их игры (и наши кадры) рассчитаны на ширину: у Рейса — `rs-wide` от 900 px,
   у плинко/блэкджека — свои ПК-раскладки. На телефоне всё как было, на ПК
   отдаём игре весь экран, а не узкую колонку мини-аппа. */
@media (min-width: 1024px) {
    #screen-plinko.page,
    #screen-blackjack.page,
    #screen-reys.page {
        position: fixed;
        top: var(--topbar-h); left: 0; right: 0; bottom: 69px;
        width: auto; max-width: none;
        height: auto;              /* иначе общий `.page{height:100%}` растягивает кадр под меню */
        margin: 0; padding: 0;
        transform: none;
        z-index: 5;
    }
    #screen-plinko .pl-frame,
    #screen-blackjack .bj-frame,
    #screen-reys .reys-frame {
        width: 100%;
        height: 100%;
        border-radius: 14px;
        margin: 0 auto;
    }
}
@media (max-width: 639.98px) {
    #screen-reys .reys-frame { border-radius: 0; }
}
/* обложка карточки в лобби — постер их же игры */
.game-cover.cv-reys {
    background-image: url("games/reys/assets/cross-promo/aviamasters_poster_5tabLQX8.png");
    background-size: cover;
    background-position: center;
}

/* ── Витрина кейсов: их каталог (370 штук), карточки и открытие ──────────────
   Сетка как у их витрины: две карточки в ряд, крупная картинка приза, цена
   плашкой; открытие — лента призов, которая встаёт ровно на победный. */
#screen-caseshow.page { padding: 0; }
.ch-screen { padding: 12px 12px 90px; }
.ch-head h1 { margin: 0 0 2px; font-size: 24px; font-weight: 900; letter-spacing: .3px; }
.ch-head p { margin: 0 0 12px; font-size: 12px; color: #93a8c9; }

.ch-cats { display: flex; gap: 8px; overflow-x: auto; padding: 0 0 10px; scrollbar-width: none; }
.ch-cats::-webkit-scrollbar { display: none; }
.ch-cat {
    flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 12px; border-radius: 999px; border: 1px solid rgba(255,255,255,.10);
    background: rgba(255,255,255,.05); color: #cfdcf2; font-size: 13px; font-weight: 700;
}
.ch-cat.is-on { background: linear-gradient(135deg, #ef02cb, #75027f); border-color: transparent; color: #fff; }
.ch-cat__n { font-size: 11px; opacity: .65; }

.ch-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.ch-card {
    position: relative; display: flex; flex-direction: column; gap: 4px; padding: 10px;
    border-radius: 18px; border: 1px solid rgba(255,255,255,.08); cursor: pointer;
    background: linear-gradient(160deg, color-mix(in srgb, var(--c1) 22%, #10131c), #0d1017 70%);
    text-align: left; overflow: hidden;
}
.ch-card:active { transform: scale(.985); }
.ch-card__art { display: flex; align-items: center; justify-content: center; height: 96px; }
.ch-card__art img { max-width: 100%; max-height: 96px; object-fit: contain; filter: drop-shadow(0 6px 10px rgba(0,0,0,.45)); }
.ch-card__name { font-size: 13px; font-weight: 800; color: #f2f6ff; line-height: 1.2; }
.ch-card__top { font-size: 11px; color: #ffd75e; }
.ch-card__price {
    align-self: flex-start; margin-top: 2px; padding: 4px 9px; border-radius: 9px;
    font-size: 12px; font-weight: 800; color: #fff;
    background: linear-gradient(135deg, var(--c2), var(--c1));
}
.ch-empty { grid-column: 1 / -1; padding: 24px; text-align: center; color: #93a8c9; font-size: 13px; }

/* открытие */
.ch-ov { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center;
         background: rgba(4,6,12,.82); backdrop-filter: blur(4px); padding: 16px; }
/* `display:flex` перебивает атрибут hidden — и оверлей висел поверх витрины */
.ch-ov[hidden] { display: none !important; }
.ch-ov__panel { width: 100%; max-width: 420px; border-radius: 22px; padding: 14px;
                background: linear-gradient(180deg, #171c28, #0c0f16); border: 1px solid rgba(255,255,255,.10); }
.ch-ov__top { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 10px; }
.ch-ov__title { font-size: 16px; font-weight: 900; }
.ch-ov__price { font-size: 13px; color: #ffd75e; }

.ch-reel { position: relative; overflow: hidden; border-radius: 14px; background: rgba(0,0,0,.45);
           border: 1px solid rgba(255,255,255,.08); height: 104px; }
.ch-reel__track { display: flex; gap: 8px; padding: 8px; will-change: transform; }
.ch-reel__cell { flex: 0 0 88px; height: 88px; border-radius: 12px; background: rgba(255,255,255,.05);
                 display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.ch-reel__cell img { width: 52px; height: 52px; object-fit: contain; }
.ch-reel__cell b { font-size: 11px; color: #cfdcf2; }
.ch-reel__cell.is-win { background: rgba(255,215,94,.16); box-shadow: inset 0 0 0 2px #ffd75e; }
.ch-reel__mark { position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; margin-left: -1px;
                 background: linear-gradient(180deg, transparent, #ffd75e, transparent); pointer-events: none; }

.ch-ov__result { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 0 6px; }
.ch-ov__win { font-size: 26px; font-weight: 900; color: #ffd75e; }
.ch-ov__sub { font-size: 11px; color: #93a8c9; }
.ch-ov__btns { display: flex; gap: 8px; margin-top: 8px; }
.ch-ov__again { flex: 1; padding: 12px; border-radius: 14px; border: 0; cursor: pointer;
                background: linear-gradient(135deg, #ef02cb, #75027f); color: #fff; font-weight: 800; }
.ch-ov__again[disabled] { opacity: .5; }

/* Лоадер поверх кадра кейсов: их витрина стартует не мгновенно */
.rub-loader {
    position: absolute; inset: 0; z-index: 1000000; display: flex; flex-direction: column;
    align-items: center; justify-content: center; gap: 10px;
    background: #0d0f16; color: #9db0cc; font-size: 13px; z-index: 999999;
    transition: opacity .25s ease;
}
.rub-loader__spin {
    width: 26px; height: 26px; border-radius: 50%;
    border: 3px solid rgba(255,255,255,.18); border-top-color: #75027f;
    animation: rub-spin .9s linear infinite;
}
@keyframes rub-spin { to { transform: rotate(360deg); } }
#screen-casesrub.is-ready .rub-loader { opacity: 0; pointer-events: none; }
#screen-casesrub { position: relative; }

/* ── Лидерборд: скролл, чёрный фон, стекло ───────────────────────────────────
   Их экран тёмный, кнопки «стеклянные» (полупрозрачные с тонкой рамкой и
   размытием). Раскладка призовых мест — 1-е выше, 2-е ниже, 3-е ещё ниже. */
#screen-tops.page:not(.active) { display: none; }
/* ALT-TOPSFIT (29.11.2026, владелец: «в лидерборде половина экрана чёрная»). Экран начинается
   с y=0 и уже получает `padding-top: ~148px` от `html.is-tg .page` (контент едет под капсулой
   шапки). Старая высота `100svh - var(--topbar-h) - 69px` вычитала шапку ВТОРОЙ раз: на 812 px
   получалось 613 px, снизу оставалась чёрная полоса 199 px, а список обрезался. Теперь высота —
   до полосы меню (69 px), как у остальных экранов. */
#screen-tops.page.active {
    display: block;
    height: calc(100svh - 69px);
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    background:
        radial-gradient(120% 60% at 50% -10%, rgba(124, 77, 255, .18), transparent 60%),
        radial-gradient(90% 50% at 80% 110%, rgba(255, 77, 157, .12), transparent 60%),
        #07070c;
}
#screen-tops .lb { padding-bottom: 18px; }

/* стеклянные кнопки */
.lb-how, .lb-tabs .tops-tab, .lb-row, .lb-mypos, .lb-top {
    -webkit-backdrop-filter: blur(14px) saturate(1.2);
    backdrop-filter: blur(14px) saturate(1.2);
}
.lb-row, .lb-mypos {
    background: rgba(255, 255, 255, .045);
    border: 1px solid rgba(255, 255, 255, .08);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 8px 22px rgba(0, 0, 0, .5);
}
.lb-how {
    background: rgba(255, 255, 255, .07);
    border: 1px solid rgba(255, 255, 255, .12);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1);
}
.lb-tabs .tops-tab {
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .1);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08);
}
.lb-tabs .tops-tab.active {
    background: linear-gradient(135deg, rgba(124, 77, 255, .95), rgba(255, 77, 157, .95));
    border-color: rgba(255, 255, 255, .22);
    box-shadow: 0 8px 24px rgba(255, 77, 157, .35), inset 0 1px 0 rgba(255, 255, 255, .25);
}

/* ступени пьедестала: 2-е ниже 1-го, 3-е ниже 2-го */
.lb-pod {
    align-items: stretch;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    overflow: visible;
}
.lb-pod__item { overflow: visible; }
/* ступени: 1-е место выше, 2-е ниже, 3-е ещё ниже — за счёт отступа СВЕРХУ,
   поэтому нижний край стендов совпадает и ничего не обрывается */
.lb-pod__item--1 .lb-pod__head { margin-top: 0; }
.lb-pod__item--2 { padding-top: 40px; }
.lb-pod__item--3 { padding-top: 88px; }
.lb-pod__pedestal {
    background: linear-gradient(180deg, rgba(255, 255, 255, .1), rgba(10, 8, 16, .78));
    border: 1px solid rgba(255, 255, 255, .12);
    border-bottom: 0;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12);
}
.lb-pod { padding-bottom: 0; }
.lb-pod__item--1 .lb-pod__pedestal {
    /* золотой стеклянный стенд: заметно длиннее в ширину, чем у 2 и 3 */
    background: linear-gradient(180deg, rgba(255, 205, 70, .34), rgba(120, 80, 10, .16) 45%, rgba(10, 8, 16, .86));
    border-color: rgba(255, 211, 77, .6);
    width: 100%; margin-left: 0; margin-right: 0;
    padding: 14px 12px 16px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 0 26px rgba(255, 200, 60, .3), 0 12px 28px rgba(0, 0, 0, .5);
}
.lb-pod__item--1 .lb-pod__pedestal::before {
    content: ""; position: absolute; inset: 0 0 auto; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 226, 140, .9), transparent);
}
.lb-pod__prize { font-size: 10.5px; color: #cbb8ff; font-weight: 700; }
.lb-pod__ava.is-free { background: rgba(255, 255, 255, .06); color: #6b7280; font-size: 20px; }

/* ── Шапка: порядок и вид ─────────────────────────────────────────────────────
   ← глобус · логотип · баланс · аватар в фиолетовом свечении. Музыки и кнопки
   «Пополнить» в шапке больше нет. */
.topbar__brand { gap: 6px; }
/* их правило прятало логотип на внутренних экранах — владелец просил вернуть */
html[data-inner] .topbar__logo { display: inline-flex !important; }
.topbar__logo { flex: 0 0 auto !important; }
.topbar__logo img { max-height: 42px; width: auto; }
.topbar__back { order: 1; }
.topbar__globe { order: 2; margin-right: 0; }
.topbar__logo { order: 3; }
.topbar__actions { order: 5; }
.topbar__spacer { order: 4; }
#music-toggle, .music-toggle { display: none !important; }
.topbar__topup, .topbar__plus { display: none !important; }

/* аватар в шапке — с фиолетовым свечением, как ободок */
.topbar__avatar .avatar, .topbar__avatar img.avatar {
    border-radius: 50% !important;
    box-shadow:
        0 0 0 2px rgba(124, 77, 255, .95),
        0 0 14px rgba(124, 77, 255, .65),
        0 0 26px rgba(160, 110, 255, .35) !important;
    background: #14101f;
}
.profile-wrap { display: inline-flex !important; align-items: center; }

/* контент не должен уезжать под нижнее меню: иначе его кнопки не нажимаются */
.page { padding-bottom: 96px; }
#screen-tops .lb { padding-bottom: 6px; }
#screen-tops .tops-list-wrap { padding-bottom: 96px; }
.bottom-menu { z-index: 60; }

/* аватар в шапке: их телефонные правила (`topbar-kit.css`) его прятали,
   а по решению владельца он должен быть виден рядом с балансом */
@media (max-width: 1023.98px) {
    .topbar .profile-wrap { display: flex !important; }
    .topbar__avatar { display: inline-flex !important; }
    .topbar__avatar .avatar { width: 34px !important; height: 34px !important; }
    .topbar__actions { gap: 6px !important; }
    .topbar .hwal .balance-btn { padding: 0 6px 0 4px !important; }
}

/* «+» рядом с балансом вместо «Пополнить» */
.topbar__plus {
    width: 34px; height: 34px; border-radius: 50%; border: 0; flex: none;
    margin-left: 6px; cursor: pointer; line-height: 1;
    font-size: 20px; font-weight: 700; color: #fff;
    background: linear-gradient(135deg, #75027f, #ff4d9d);
    box-shadow: 0 6px 18px rgba(255, 77, 157, .38), inset 0 1px 0 rgba(255, 255, 255, .35);
}
.topbar__topup { display: none !important; }

/* глобус в шапке */
.topbar__globe {
    width: 34px; height: 34px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .14);
    background: rgba(255, 255, 255, .07); color: #cfd8e8; flex: none; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center; margin-right: 6px;
    -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.topbar__globe:hover { color: #fff; background: rgba(255, 255, 255, .12); }

/* лист выбора страны */
.country-sheet {
    position: fixed; inset: 0; z-index: 1200; display: flex; align-items: flex-end;
    justify-content: center; background: rgba(0, 0, 0, .55);
    opacity: 0; transition: opacity .18s ease;
}
.country-sheet.is-open { opacity: 1; }
.country-sheet__panel {
    width: 100%; max-width: 560px; max-height: 78vh; overflow-y: auto;
    padding: 16px 14px 22px; border-radius: 22px 22px 0 0;
    background: rgba(16, 14, 24, .96);
    border: 1px solid rgba(255, 255, 255, .1); border-bottom: 0;
    -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
    transform: translateY(12px); transition: transform .18s ease;
}
.country-sheet.is-open .country-sheet__panel { transform: translateY(0); }
.country-sheet__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.country-sheet__head b { color: #fff; font-size: 17px; }
.country-sheet__x {
    width: 32px; height: 32px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .12);
    background: rgba(255, 255, 255, .06); color: #cfd8e8; cursor: pointer;
}
.country-sheet__hint { margin: 0 0 12px; color: #8e9bb0; font-size: 12.5px; }
.country-sheet__list { display: flex; flex-direction: column; gap: 8px; }
.country-row {
    display: flex; align-items: center; gap: 12px; padding: 12px 14px; cursor: pointer;
    border-radius: 16px; border: 1px solid rgba(255, 255, 255, .08);
    background: rgba(255, 255, 255, .045); color: #fff; font-size: 15px; text-align: left;
}
.country-row:hover { background: rgba(255, 255, 255, .09); }
.country-row__flag { font-size: 20px; }
.country-row__name { flex: 1 1 auto; }
.country-row__note { color: #ff9dc9; font-size: 12px; }

/* ── Лидерборд звёзд ──────────────────────────────────────────────────────────
   Раскладка по их странице лидерборда (плашка игрока, «как попасть», топ-3
   пьедесталом, список с 4-го места, своя строка «до ТОП-25»). Палитра наша:
   фиолетовый / чёрный / розовый. */
#screen-tops { padding-bottom: 24px; }
.lb { max-width: 640px; margin: 0 auto; padding: 12px 12px 0; display: flex; flex-direction: column; gap: 10px; }

/* плашка игрока сверху */
.lb-top {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px; border-radius: 18px;
    background: linear-gradient(135deg, #171325 0%, #0f0d18 100%);
    border: 1px solid rgba(124, 77, 255, .35);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .45);
}
.lb-me {
    width: 44px; height: 44px; border-radius: 50%; overflow: hidden; flex: none;
    background: linear-gradient(135deg, #75027f, #ff4d9d);
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; color: #fff; font-size: 17px;
    border: 2px solid rgba(255, 255, 255, .18);
}
.lb-me img, .lb-pod__ava img, .lb-row__ava img, .lb-mypos__ava img {
    width: 100%; height: 100%; object-fit: cover; display: block;
}
.lb-lvl { flex: 1 1 auto; min-width: 0; }
.lb-lvl__row { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #9aa7bd; }
.lb-lvl__row b { color: #fff; font-size: 12px; }
.lb-lvl__bar {
    flex: 1 1 auto; height: 8px; border-radius: 99px; overflow: hidden;
    background: rgba(255, 255, 255, .1); font-style: normal;
}
.lb-lvl__bar u {
    display: block; height: 100%; width: 0; border-radius: 99px;
    background: linear-gradient(90deg, #75027f, #ff4d9d);
    transition: width .35s ease; text-decoration: none;
}
.lb-top__money { font-weight: 800; font-size: 15px; color: #fff; white-space: nowrap; }
.lb-top__money i { font-style: normal; color: #f9b5cc; }
.lb-plus {
    width: 40px; height: 40px; border-radius: 50%; border: 0; flex: none;
    background: linear-gradient(135deg, #ff4d9d, #75027f);
    color: #fff; font-size: 22px; font-weight: 700; line-height: 1; cursor: pointer;
    box-shadow: 0 6px 18px rgba(255, 77, 157, .4);
}

/* «как попасть» + отсчёт */
.lb-how {
    align-self: center; display: inline-flex; align-items: center; gap: 8px;
    padding: 9px 16px; border-radius: 99px; cursor: pointer;
    background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .08);
    color: #cdd6e6; font-size: 13px;
}
.lb-how i {
    width: 18px; height: 18px; border-radius: 50%; font-style: normal;
    display: inline-flex; align-items: center; justify-content: center;
    background: rgba(124, 77, 255, .35); color: #fff; font-size: 12px;
}
.lb-left { align-self: center; color: #8e9bb0; font-size: 13px; }
.lb-left b { color: #fff; font-weight: 700; }

.lb-title { margin: 4px 0 0; text-align: center; font-size: 26px; font-weight: 900; color: #fff; letter-spacing: .2px; }
.lb-sub { margin: 0 0 4px; text-align: center; color: #8e9bb0; font-size: 12.5px; line-height: 1.45; }

/* топ-3 */
.lb-pod { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; gap: 8px; padding: 8px 0 0; overflow: visible; }
.lb-pod__item {
    display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
    gap: 6px; min-width: 0; height: 100%;
}
.lb-pod__head { display: flex; align-items: center; gap: 6px; max-width: 100%; }
.lb-pod__rank {
    width: 18px; height: 18px; border-radius: 50%; flex: none; font-size: 11px; font-weight: 800;
    display: inline-flex; align-items: center; justify-content: center;
    background: rgba(255, 255, 255, .12); color: #fff;
}
.lb-pod__item--1 .lb-pod__rank { background: linear-gradient(135deg, #f9b5cc, #ff9d2e); color: #241a00; }
.lb-pod__item--2 .lb-pod__rank { background: linear-gradient(135deg, #dfe6f2, #9fb0c8); color: #1a2030; }
.lb-pod__item--3 .lb-pod__rank { background: linear-gradient(135deg, #e8a06a, #b87333); color: #2a1503; }
.lb-pod__name {
    font-size: 11.5px; color: #cfd8e8; white-space: nowrap; overflow: hidden;
    text-overflow: ellipsis; max-width: 96px;
}
.lb-pod__ava {
    width: 56px; height: 56px; border-radius: 50%; overflow: hidden; flex: none;
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; color: #fff; font-size: 20px;
    border: 2px solid rgba(255, 255, 255, .2);
}
.lb-pod__item--1 .lb-pod__ava {
    width: 72px; height: 72px; font-size: 26px;
    border-color: #f9b5cc; box-shadow: 0 0 26px rgba(255, 211, 77, .45);
}
.lb-pod__item--2 .lb-pod__ava { border-color: #cfd8e8; box-shadow: 0 0 18px rgba(207, 216, 232, .25); }
.lb-pod__item--3 .lb-pod__ava { border-color: #b87333; box-shadow: 0 0 16px rgba(184, 115, 51, .3); }
.lb-pod__item.is-me .lb-pod__ava { outline: 2px solid #ff4d9d; outline-offset: 2px; }
.lb-pod__pedestal {
    position: relative;
    box-sizing: border-box;
    flex: 1 1 auto;                 /* тянется до самого низа пьедестала */
    align-self: stretch;
    width: 100%; display: flex; flex-direction: column; align-items: center;
    justify-content: flex-end; gap: 4px;
    padding: 10px 6px 10px; border-radius: 14px 14px 0 0;
    background: linear-gradient(180deg, rgba(124, 77, 255, .22), rgba(20, 16, 32, .9));
    border: 1px solid rgba(124, 77, 255, .28); border-bottom: 0;
}
.lb-pod__item--1 .lb-pod__pedestal {
    background: linear-gradient(180deg, rgba(255, 77, 157, .26), rgba(20, 16, 32, .92));
    border-color: rgba(255, 77, 157, .4); padding-bottom: 14px;
}
.lb-pod__score { font-size: 12.5px; font-weight: 800; color: #fff; white-space: nowrap; }
.lb-pod__score i { font-style: normal; color: #fff; }
.lb-gift { width: 34px; height: 34px; object-fit: contain; }

/* ALT-PRIZESTARS (01.12.2026): награда звёздами — вместо картинки подарка иконка звезды */
.lb-gift--stars,
.lb-row__gift .lb-gift--stars,
.lb-pod__nft.lb-gift--stars {
  width: 34px;
  height: 34px;
  object-fit: contain;
  filter: drop-shadow(0 3px 10px rgba(249, 181, 204, .55));
}
.lb-pod__item--1 .lb-gift { width: 42px; height: 42px; }

/* экран «Топы»: список сразу под табами, без старой обёртки с рамкой */
#screen-tops { display: block; height: auto; }
#screen-tops .tops-list-wrap { margin: 0; padding: 0; background: none; border: 0; }
#screen-tops .tops-podium { min-height: 0; margin: 0; }

/* ── Плашки приза и баланса на пьедестале ────────────────────────────────────
   Стеклянные блоки в цвет медали: 1-е — золотой и крупнее, 2-е — серебро,
   3-е — бронза. На плашке подпись «Приз» и цена в валюте баланса; баланс
   игрока подписан отдельно у аватарки, чтобы их не путали. */
.lb-pod__ava-wrap { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.lb-pod__bal {
    display: inline-flex; align-items: center; gap: 3px; white-space: nowrap;
    max-width: 100%; overflow: hidden;
    padding: 2px 8px; border-radius: 99px; font-size: 11px; font-weight: 700; color: #fff;
    background: rgba(124, 77, 255, .22);
    border: 1px solid rgba(124, 77, 255, .45);
    -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.lb-pod__bal-tag { font-size: 9.5px; letter-spacing: .3px; text-transform: uppercase; color: #b9a7ff; }
/* у 2-го и 3-го места подпись убираем: там тесно, число говорит само за себя */
.lb-pod__item--2 .lb-pod__bal-tag, .lb-pod__item--3 .lb-pod__bal-tag { display: none; }
.lb-pod__bal i { font-style: normal; color: #fff; }

.lb-prize {
    position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px;
    padding: 8px 8px 6px; border-radius: 14px; width: 100%; box-sizing: border-box;
    background: rgba(255, 255, 255, .06);
    /* рамка приза — белая со светом, независимо от места */
    border: 1.5px solid rgba(255, 255, 255, .92);
    -webkit-backdrop-filter: blur(12px) saturate(1.2); backdrop-filter: blur(12px) saturate(1.2);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, .22),
        0 0 16px rgba(255, 255, 255, .4),
        0 0 30px rgba(255, 255, 255, .16),
        inset 0 1px 0 rgba(255, 255, 255, .45),
        0 8px 20px rgba(0, 0, 0, .45);
}
.lb-prize--1 {
    padding: 10px 12px 8px; border-radius: 16px;
}
.lb-prize--2 { padding: 8px 8px 6px; }
.lb-prize--3 { padding: 8px 8px 6px; }
.lb-prize__tag {
    position: absolute; top: -7px; left: 50%; transform: translateX(-50%);
    padding: 1px 7px; border-radius: 99px; font-size: 9px; font-weight: 800;
    letter-spacing: .4px; text-transform: uppercase; color: #0d0a14;
    background: rgba(255, 255, 255, .9);
}
.lb-prize--1 .lb-prize__tag { background: linear-gradient(135deg, #ffe27a, #ffb62e); }
.lb-prize--2 .lb-prize__tag { background: linear-gradient(135deg, #f0f4fb, #c3cede); }
.lb-prize--3 .lb-prize__tag { background: linear-gradient(135deg, #f0b083, #c37a3d); }

.lb-prize .lb-gift { width: 34px; height: 34px; }
.lb-prize--1 .lb-gift { width: 46px; height: 46px; }
.lb-prize__price {
    display: inline-flex; align-items: center; gap: 3px;
    font-size: 11px; font-weight: 800; color: #fff; white-space: nowrap;
}
.lb-prize__price .lb-cur { width: 12px; height: 12px; }
.lb-cur { width: 13px; height: 13px; vertical-align: -2px; }

/* приз в строке списка — компактно справа */
.lb-row__prize {
    display: flex; flex-direction: column; align-items: center; gap: 1px;
    padding: 5px 7px 3px; border-radius: 12px; flex: none; position: relative;
    background: rgba(255, 255, 255, .06);
    border: 1.5px solid rgba(255, 255, 255, .9);
    box-shadow: 0 0 10px rgba(255, 255, 255, .34), inset 0 1px 0 rgba(255, 255, 255, .4);
    -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.lb-row__prize .lb-prize__tag { top: -6px; font-size: 8px; padding: 1px 6px; }
.lb-row__prize .lb-gift { width: 26px; height: 26px; }
.lb-row__prize .lb-prize__price { font-size: 10px; }
.lb-row__prize .lb-cur { width: 11px; height: 11px; }

/* плавающая «назад» под шапкой — в нашей палитре */
#back-btn {
    display: none; top: 74px; left: 12px; z-index: 1150;
    width: 42px; height: 42px; padding: 0; color: #fff;
    border: 1px solid rgba(160, 120, 255, .6);
    background:
        radial-gradient(120% 120% at 30% 20%, rgba(124, 77, 255, .55), rgba(20, 16, 32, .88) 70%);
    border-radius: 50%;
    -webkit-backdrop-filter: blur(12px) saturate(1.2); backdrop-filter: blur(12px) saturate(1.2);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, .08),
        0 0 16px rgba(124, 77, 255, .45),
        0 10px 22px rgba(0, 0, 0, .5),
        inset 0 1px 0 rgba(255, 255, 255, .22);
    transition: transform .15s ease, box-shadow .15s ease;
}
#back-btn:active { transform: scale(.93); }
#back-btn svg { display: block; }

/* аватар: буква под фото (фото — верхним слоем) */
.lb-me, .lb-pod__ava, .lb-row__ava, .lb-mypos__ava { position: relative; }
.lb-me span, .lb-pod__ava span, .lb-row__ava span, .lb-mypos__ava span {
    position: relative; z-index: 1; line-height: 1;
}
.lb-me img, .lb-pod__ava img, .lb-row__ava img, .lb-mypos__ava img {
    position: absolute; inset: 0; z-index: 2;
}

/* свой результат */
.lb-mypos {
    display: flex; align-items: center; gap: 10px; margin-top: 12px;
    padding: 10px 12px; border-radius: 16px;
    background: linear-gradient(135deg, rgba(255, 77, 157, .16), rgba(124, 77, 255, .12));
    border: 1px solid rgba(255, 77, 157, .45);
}
.lb-mypos__ava {
    width: 38px; height: 38px; border-radius: 50%; overflow: hidden; flex: none;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #75027f, #ff4d9d); color: #fff; font-weight: 800;
}
.lb-mypos__main { display: flex; flex-direction: column; gap: 2px; }
.lb-mypos__main b { color: #fff; font-size: 15px; }
.lb-mypos__main b i { font-style: normal; color: #f9b5cc; }
.lb-mypos__main span { color: #ffb3d4; font-size: 12px; }

/* список с 4-го места */
.lb-tabs { display: flex; gap: 8px; margin: 14px 0 8px; }
.lb-tabs .tops-tab {
    padding: 7px 16px; border-radius: 99px; border: 1px solid rgba(255, 255, 255, .1);
    background: rgba(255, 255, 255, .04); color: #a9b4c6; font-size: 13px; cursor: pointer;
}
.lb-tabs .tops-tab.active {
    background: linear-gradient(135deg, #75027f, #ff4d9d); color: #fff; border-color: transparent;
    font-weight: 700;
}
#screen-tops .tops-list { display: flex; flex-direction: column; gap: 8px; }
.lb-row {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 12px; border-radius: 18px;
    background: linear-gradient(135deg, #161324 0%, #0f0d18 100%);
    border: 1px solid rgba(255, 255, 255, .06);
}
.lb-row.is-me { border-color: rgba(255, 77, 157, .55); }
.lb-row__rank { width: 22px; text-align: center; color: #8e9bb0; font-size: 13px; font-weight: 700; flex: none; }
.lb-row__ava {
    width: 40px; height: 40px; border-radius: 50%; overflow: hidden; flex: none;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-weight: 800; font-size: 16px;
}
.lb-row__main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.lb-row__main b { color: #fff; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-row__main span { color: #9aa7bd; font-size: 12.5px; }
.lb-row__main span i { font-style: normal; color: #f9b5cc; }
.lb-row .lb-gift { width: 32px; height: 32px; flex: none; }
.lb-empty { padding: 22px 14px; text-align: center; color: #8e9bb0; font-size: 13px; }

/* ── Кейсы: их страница из их SPA в кадре (`/rub/#/cases`) ────────────────────
   Их вёрстка считает раскладку от размера кадра, поэтому кадру отдаём всю
   площадь между нашей шапкой и нижним меню. */
#screen-casesrub.page:not(.active) { display: none; }
#screen-casesrub.page { padding: 0; overflow: hidden; }
#screen-casesrub .rub-frame {
    display: block; width: 100%;
    height: calc(100dvh - var(--topbar-h) - 69px);   /* запасной вариант для старых WebView */
    height: calc(100svh - var(--topbar-h) - 69px);   /* ALTUSHKA: стабильная высота — без мигания */
    border: 0; background: #0d0f16; border-radius: 18px;
}
@media (max-width: 639.98px) {
    #screen-casesrub .rub-frame { border-radius: 0; }
}
@media (min-width: 1024px) {
    #screen-casesrub.page {
        position: fixed; top: var(--topbar-h); left: 0; right: 0; bottom: 69px;
        width: auto; max-width: none; height: auto;
        margin: 0; padding: 0; transform: none; z-index: 5;
    }
    #screen-casesrub .rub-frame { width: 100%; height: 100%; border-radius: 14px; }
}


/* ── UFC: их страница боя из randomgames.win в кадре (`games/ufc/ufcgame.html`) ─
   Правила кадра те же, что у кейсов: их вёрстка считает раскладку от размера
   кадра, поэтому он занимает всё место между нашей шапкой и низом. */
#screen-ufc.page:not(.active) { display: none; }
#screen-ufc.page { padding: 0; overflow: hidden; }
#screen-ufc .rub-frame {
    display: block; width: 100%;
    height: calc(100dvh - var(--topbar-h) - 69px);   /* запасной вариант для старых WebView */
    height: calc(100svh - var(--topbar-h) - 69px);   /* стабильная высота — без мигания */
    border: 0; background: #09090f; border-radius: 18px;
}
@media (max-width: 639.98px) {
    #screen-ufc .rub-frame { border-radius: 0; }
}
@media (min-width: 1024px) {
    #screen-ufc.page {
        position: fixed; top: var(--topbar-h); left: 0; right: 0; bottom: 0;
        width: auto; max-width: none; height: auto;
        margin: 0; padding: 0; transform: none; z-index: 5;
    }
    #screen-ufc .rub-frame { width: 100%; height: 100%; border-radius: 14px; }
}


/* ── «КИРКА»: их игра Falling Pickaxe отдельным приложением в кадре ──────────
   Их клиент рисует себя в canvas и сам считает раскладку от размера окна,
   поэтому кадру нужна та же высота, что у UFC: от нашей шапки до низа. */
#screen-kirka.page:not(.active) { display: none; }
#screen-kirka.page { padding: 0; overflow: hidden; }
#screen-kirka .rub-frame {
    display: block; width: 100%;
    height: calc(100dvh - var(--topbar-h) - 69px);
    height: calc(100svh - var(--topbar-h) - 69px);
    border: 0; background: #09090f; border-radius: 18px;
}
@media (max-width: 639.98px) {
    #screen-kirka .rub-frame { border-radius: 0; }
}
@media (min-width: 1024px) {
    #screen-kirka.page {
        position: fixed; top: var(--topbar-h); left: 0; right: 0; bottom: 0;
        width: auto; max-width: none; height: auto;
        margin: 0; padding: 0; transform: none; z-index: 5;
    }
    #screen-kirka .rub-frame { width: 100%; height: 100%; border-radius: 14px; }
}


/* ── Битва кейсов: их страница из их SPA в кадре (`/rub/#/case-battle`) ───────
   Те же правила кадра, что у кейсов: их вёрстка считает раскладку от размера кадра. */
#screen-casebattle.page:not(.active) { display: none; }
#screen-casebattle.page { position: relative; padding: 0; overflow: hidden; }
#screen-casebattle .rub-frame {
    display: block; width: 100%;
    /* их раздел дорисовывает свою нижнюю панель, а у нас внизу своё меню —
       оставляем кадру место до него, иначе их кнопка «Играть» уходит под меню */
    height: calc(100dvh - 150px);
    height: calc(100svh - 150px);
    border: 0; background: #0d0f16; border-radius: 18px;
}
#screen-casebattle.is-ready .rub-loader { opacity: 0; pointer-events: none; }
@media (max-width: 639.98px) {
    #screen-casebattle .rub-frame { border-radius: 0; }
}
@media (min-width: 1024px) {
    #screen-casebattle.page {
        position: fixed; top: var(--topbar-h); left: 0; right: 0; bottom: 69px;
        width: auto; max-width: none; height: auto;
        margin: 0; padding: 0; transform: none; z-index: 5;
    }
    #screen-casebattle .rub-frame { width: 100%; height: 100%; border-radius: 14px; }
}

/* ── Инвентарь: их страница в кадре (`/rub/#/inventory`) ──────────────────────
   ALTUSHKA: инвентарь теперь ОДИН — их экран с нашим цветом и нашей плашкой замка.
   Правила кадра те же, что у битвы кейсов. */
#screen-inventory.page:not(.active) { display: none; }
#screen-inventory.page { position: relative; padding: 0; overflow: hidden; }
#screen-inventory .rub-frame {
    display: block; width: 100%;
    height: calc(100dvh - 150px);
    height: calc(100svh - 150px);
    border: 0; background: #0d0f16; border-radius: 18px;
}
#screen-inventory.is-ready .rub-loader { opacity: 0; pointer-events: none; }
@media (max-width: 639.98px) {
    #screen-inventory .rub-frame { border-radius: 0; }
}
@media (min-width: 1024px) {
    #screen-inventory.page {
        position: fixed; top: var(--topbar-h); left: 0; right: 0; bottom: 69px;
        width: auto; max-width: none; height: auto;
        margin: 0; padding: 0; transform: none; z-index: 5;
    }
    #screen-inventory .rub-frame { width: 100%; height: 100%; border-radius: 14px; }
}

/* ── Скретч: их игра в кадре (`games/scratch/`) ───────────────────────────────
   Их страница сама считает раскладку от размера кадра, поэтому отдаём ей всю
   площадь между нашей шапкой и нижним меню — как Рейсу и Плинко. */
#screen-scratch.page { padding: 0; overflow: hidden; }
#screen-scratch .scratch-frame {
    display: block; width: 100%;
    height: calc(100dvh - var(--topbar-h) - 69px);   /* запасной вариант для старых WebView */
    height: calc(100svh - var(--topbar-h) - 69px);   /* ALTUSHKA: стабильная высота — без мигания в Telegram */
    border: 0; background: #0d0f16; border-radius: 18px;
}
@media (max-width: 639.98px) {
    #screen-scratch .scratch-frame { border-radius: 0; }
}
@media (min-width: 1024px) {
    #screen-scratch.page {
        position: fixed;
        top: var(--topbar-h); left: 0; right: 0; bottom: 69px;
        width: auto; max-width: none; height: auto;
        margin: 0; padding: 0; transform: none; z-index: 5;
    }
    #screen-scratch .scratch-frame { width: 100%; height: 100%; border-radius: 14px; margin: 0 auto; }
}

/* обложка карточки — их `scratch-thumb.webp` */
.game-cover.cv-scratch {
    background-image: url("assets/img/covers/scratch-thumb.webp");
    background-size: cover;
    background-position: center;
}

/* ── Слот VIRUS: их автомат в кадре (`games/slot-virus/`) ─────────────────────
   Картинок у их слота нет — символы рисуются кодом, поэтому обложка карточки
   собрана из их же символов и их палитры (poster.svg). */
.game-cover.cv-slotvirus {
    background-image: url("games/slot-virus/poster.svg");
    background-size: cover;
    background-position: center;
}

#screen-slotvirus.page { padding: 0; overflow: hidden; }

/* Высота кадра — между нашей шапкой (64) и нижним меню (69), как у Рейса:
   их экран считает раскладку от 100dvh внутри кадра. */
#screen-slotvirus .slot-virus-frame {
    display: block; width: 100%;
    height: calc(100dvh - var(--topbar-h) - 69px);   /* запасной вариант для старых WebView */
    height: calc(100svh - var(--topbar-h) - 69px);   /* ALTUSHKA: стабильная высота — без мигания в Telegram */
    border: 0; background: #05010a; border-radius: 18px;
}

@media (max-width: 639.98px) {
    #screen-slotvirus .slot-virus-frame { border-radius: 0; }
}

@media (min-width: 1024px) {
    #screen-slotvirus.page {
        position: fixed;
        top: var(--topbar-h); left: 0; right: 0; bottom: 69px;
        width: auto; max-width: none;
        height: auto;
        margin: 0; padding: 0;
        transform: none;
        z-index: 5;
    }
    #screen-slotvirus .slot-virus-frame {
        width: 100%;
        height: 100%;
        border-radius: 14px;
        margin: 0 auto;
    }
}

/* ── Коровка на ПК: дорога слева, панель справа ──────────────────────────────
   Их каркас `gk-shell--side` мы уже включаем на широком экране, но наши же
   правила (`gk-stage` и `gk-panel` на всю ширину) сжимали панель в полоску
   22 px. Возвращаем их двухколоночную раскладку: поле тянется, панель — 380 px. */
@media (min-width: 1024px) {
    #screen-cow.page {
        position: fixed;
        top: var(--topbar-h); left: 0; right: 0; bottom: 69px;
        width: auto; max-width: none; height: auto;
        margin: 0; padding: 0; transform: none;
        z-index: 5;
    }
    #screen-cow .gk-shell--side {
        display: flex;
        flex-direction: row;
        align-items: stretch;
        gap: 14px;
        width: 100%;
        height: 100% !important;
        max-height: none !important;
        padding: 10px 14px;
        box-sizing: border-box;
    }
    #screen-cow .gk-shell--side > .gk-stage {
        flex: 1 1 auto;
        min-width: 0; min-height: 0;
        height: auto !important;
        max-height: none !important;
    }
    #screen-cow .gk-shell--side > .gk-panel {
        flex: 0 0 380px;
        width: 380px; max-width: 380px;
        height: auto !important;
        overflow-y: auto;
        overscroll-behavior: contain;
    }
}

/* ── Арена: их страница в кадре (`games/arena/`) ──────────────────────────────
   Пока без нашего серверного движка кадр работает в их демо-режиме; раскладку
   рисует их `game.css`, высоту отдаём всю площадь между шапкой и меню. */
#screen-arena.page { padding: 0; overflow: hidden; }
#screen-arena .arena-frame {
    display: block; width: 100%;
    height: calc(100dvh - var(--topbar-h) - 69px);   /* запасной вариант для старых WebView */
    height: calc(100svh - var(--topbar-h) - 69px);   /* ALTUSHKA: стабильная высота — без мигания в Telegram */
    border: 0; background: #121929; border-radius: 18px;
}
@media (max-width: 639.98px) {
    #screen-arena .arena-frame { border-radius: 0; }
}
@media (min-width: 1024px) {
    #screen-arena.page {
        position: fixed;
        top: var(--topbar-h); left: 0; right: 0; bottom: 69px;
        width: auto; max-width: none; height: auto;
        margin: 0; padding: 0; transform: none;
        z-index: 5;
    }
    #screen-arena .arena-frame { width: 100%; height: 100%; border-radius: 14px; }
}
/* обложка карточки в лобби */
.game-cover.cv-arena {
    background-image: radial-gradient(circle at 50% 45%, #1d3a63 0%, #0d1626 70%), none;
    background-color: #0d1626;
}

/* ── Кадры игр: не мигать на телефоне ─────────────────────────────────────────
   Их поле переписывает классы ~17 раз в секунду (canvas-анимация). Если кадр
   лежит в скруглённой маске поверх нашей шапки/меню с `backdrop-filter`, WebView
   перекомпоновывает весь экран каждый кадр — снаружи это «проскакивает загрузка».
   Убираем маску (в полноэкранном кадре углы всё равно не видны) и выносим кадры
   в собственный слой. */
#screen-arena .arena-frame,
#screen-reys .reys-frame,
#screen-plinko .pl-frame,
#screen-blackjack .bj-frame {
    border-radius: 0 !important;
    overflow: hidden;   /* без transform/will-change/contain: они и вызвали быстрое мигание */
}

/* ALTUSHKA: непрозрачная подложка под кадром игры. Если фон прозрачный, WebView
   при перекомпоновке показывает белое полотно — снаружи это «вспышка загрузки». */
#screen-arena.page, #screen-reys.page, #screen-plinko.page, #screen-blackjack.page,
#screen-arena .arena-frame, #screen-reys .reys-frame,
#screen-plinko .pl-frame, #screen-blackjack .bj-frame {
    background-color: #121929 !important;
}

/* ALTUSHKA: в игре кадр перерисовывается ~25 раз в секунду, а наша шапка и меню
   лежат над ним с `backdrop-filter: blur(...)` — WebView пересобирает размытие
   каждый кадр, и экран мигает. На время игр размытие выключаем (фон плотный,
   визуально почти не отличается).
   ALT-ROLLBACK (25.11.2026): вернул ровно как было — после попытки сделать фон
   полупрозрачным владелец увидел мигание шапки/кнопок на телефоне. */
body.has-game-frame #app-topbar,
body.has-game-frame .bottom-menu,
body.has-game-frame .topbar {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: rgba(8, 8, 14, 0.98) !important;
}



/* ── НАСТОЯЩАЯ ПРИЧИНА МИГАНИЯ ────────────────────────────────────────────────
   Наш стартовый экран `#main-loader.loader`: position:fixed; inset:0;
   background:#07070d; z-index:6000 — и автоскрытие через
   `animation: loaderAutoHide 0.01s linear 4s forwards`.
   Анимация с задержкой 4 с живёт на элементе: как только её перезапускает
   любая перерисовка/пересборка стилей, экран снова накрывает тёмная плёнка
   с спиннером — снаружи это ровно «мигает прогрузка на весь экран», причём
   неравномерно (3–5 с), и скриншотом не ловится (плёнка полупрозрачная).
   После загрузки приложения он не нужен вообще: гасим окончательно. */
#main-loader,
.loader {
    animation: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    display: none !important;
}

/* ALTUSHKA: скелетон-оверлей больше не используется (см. app_v2.js) */
.skeleton-loading-overlay { display: none !important; }

#screen-pixlman.page { padding: 0; overflow: hidden; }
#screen-pixlman .pix-frame {
    display: block; width: 100%; height: calc(100svh - var(--topbar-h) - 69px);
    border: 0; background: #0b1220; border-radius: 0;
}
@media (min-width: 1024px) {
    #screen-pixlman.page {
        position: fixed; top: var(--topbar-h); left: 0; right: 0; bottom: 69px;
        width: auto; max-width: none; height: auto;
        margin: 0; padding: 0; transform: none; z-index: 5;
    }
    #screen-pixlman .pix-frame { width: 100%; height: 100%; }
}
.game-cover.cv-pix {
    background-image:
        linear-gradient(180deg, rgba(11,17,29,.05) 40%, rgba(11,17,29,.72) 100%),
        url("../assets/pix/pixlman-cover.png");
    background-size: cover, 165%;
    background-position: center, center 46%;
    background-repeat: no-repeat, no-repeat;
}

/* ── Pickaxe Drop: наша полоса истории под кадром ─────────────────────────── */
#screen-pixlman.page { padding-bottom: 0; }
#screen-pixlman .pix-frame { display: block; width: 100%; height: calc(100svh - var(--topbar-h) - 69px); }
.pix-history-list {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    max-height: calc(74svh - 130px);
    padding: 0 2px 6px;
}
.pix-history-head {
    display: flex; align-items: center; justify-content: space-between;
    font-size: 11px; letter-spacing: .04em; text-transform: uppercase;
    color: rgba(255,255,255,.55); margin-bottom: 4px;
}
.pix-hist-refresh {
    background: none; border: 0; color: #8ab4ff; font-size: 11px;
    text-transform: uppercase; letter-spacing: .04em; cursor: pointer; padding: 2px 4px;
}
.pix-hist-empty { font-size: 12px; color: rgba(255,255,255,.45); padding: 6px 0; }
.pix-hist-row {
    display: flex; align-items: center; gap: 10px;
    padding: 5px 0; border-bottom: 1px solid rgba(255,255,255,.05);
    font-size: 13px; color: #e8eefc;
}
.pix-hist-row:last-child { border-bottom: 0; }
.pix-hist-bet { min-width: 66px; color: rgba(255,255,255,.75); }
.pix-hist-tier { flex: 1 1 auto; color: rgba(255,255,255,.5); font-size: 12px; }
.pix-hist-plus { color: #65e08a; font-weight: 600; }
.pix-hist-zero { color: rgba(255,255,255,.35); }
.pix-hist-check {
    background: rgba(138,180,255,.12); border: 1px solid rgba(138,180,255,.28);
    color: #8ab4ff; border-radius: 999px; font-size: 11px; padding: 3px 9px; cursor: pointer;
}
@media (min-width: 1024px) {
    .pix-history-list { max-height: 320px; }
}

/* ── История раундов: кнопка в игре + шторка ──────────────────────────────── */
.pix-hist-btn {
    position: fixed;
    right: 12px;
    bottom: 84px;                 /* над нижним меню */
    width: 42px; height: 42px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,.18);
    background: rgba(12,18,32,.72);
    color: #cfe0ff;
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 14px rgba(0,0,0,.35);
    cursor: pointer;
    z-index: 90;           /* выше iframe игры */
    transition: transform .15s ease, opacity .15s ease;
}
.pix-hist-btn:active { transform: scale(.94); }
.pix-hist-btn.hidden { opacity: 0; pointer-events: none; transform: scale(.9); }

.pix-hist-backdrop {
    position: fixed; inset: 0;
    background: rgba(5,8,16,.55);
    opacity: 0; pointer-events: none;
    transition: opacity .18s ease;
    z-index: 91;
}
.pix-hist-backdrop.open { opacity: 1; pointer-events: auto; }

.pix-hist-sheet {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    background: #0f1626;
    border-radius: 18px 18px 0 0;
    border-top: 1px solid rgba(255,255,255,.1);
    box-shadow: 0 -12px 30px rgba(0,0,0,.45);
    padding: 8px 14px calc(78px + env(safe-area-inset-bottom, 0px));
    max-height: 74svh;
    transform: translateY(105%);
    transition: transform .22s ease;
    z-index: 92;
}
.pix-hist-sheet.open { transform: translateY(0); }
.pix-hist-grip {
    width: 42px; height: 4px; border-radius: 999px;
    background: rgba(255,255,255,.22);
    margin: 2px auto 8px;
}
@media (min-width: 1024px) {
    .pix-hist-btn { bottom: 84px; right: 18px; }
    .pix-hist-sheet { left: 50%; right: auto; width: 520px; margin-left: -260px; }
}

/* ── Их «Помощь с выводом» (`wallet.css`: `.w-fine` / `.w-help`) ───────────── */
.w-fine { margin: 10px 0 0; font-size: 12.5px; line-height: 1.45; color: var(--text-3, rgba(255,255,255,.55)); }
.w-fine:first-of-type { margin-top: 0; }
.w-help { display: flex; align-items: center; gap: 6px; margin: 2px 4px 0; }
.w-help > svg { flex: none; color: var(--text-3, rgba(255,255,255,.55)); }
.w-help a { color: var(--text, #e8eefc); font-weight: 700; }

/* ── Апгрейд: их движок в кадре ───────────────────────────────────────────── */
#screen-upgrade.page { padding: 0; overflow: hidden; }
#screen-upgrade .up-frame {
    display: block; width: 100%; height: calc(100svh - var(--topbar-h) - 69px);
    border: 0; background: #0b1220;
}
@media (min-width: 1024px) {
    #screen-upgrade.page {
        position: fixed; top: var(--topbar-h); left: 0; right: 0; bottom: 69px;
        width: auto; max-width: none; height: auto;
        margin: 0; padding: 0; transform: none; z-index: 5;
    }
    #screen-upgrade .up-frame { width: 100%; height: 100%; }
}
/* Карточка «Апгрейд»: обложка из ИХ материала (assets/img/covers/upgrade-thumb.webp),
   раньше был пустой градиент — карточка выглядела сломанной. */
.game-cover.cv-up {
    background-image:
        linear-gradient(180deg, rgba(11,17,29,.05) 40%, rgba(11,17,29,.75) 100%),
        url('assets/newic/upgrade.webp'),
        radial-gradient(circle at 50% 42%, #3b2a6b 0%, #1b1430 60%, #0d0a18 100%);
    background-size: cover, cover, cover;
    background-position: center, center, center;
    background-repeat: no-repeat;
    background-color: #1b1430;
}
/* В апгрейде у них низ занят кнопкой «Улучшить» — ставим нашу кнопку
   в свободное место верхнего ряда (между ⚡ и ⓘ). */
#screen-upgrade .pix-hist-btn {
    top: 72px; bottom: auto;
    left: 88px; right: auto;
    width: 38px; height: 38px;
}
@media (min-width: 1024px) {
    #screen-upgrade .pix-hist-btn { top: 76px; left: 96px; }
}
/* шторка «Мои раунды»: сводка сверху и крестик закрытия */
.pix-hist-acts { display: inline-flex; align-items: center; gap: 8px; }
.pix-hist-close {
    width: 28px; height: 28px; border-radius: 50%;
    border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.06);
    color: #cfe0ff; font-size: 18px; line-height: 1; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
}
.pix-hist-close:active { transform: scale(.94); }
.pix-hist-sum {
    padding: 6px 2px 10px; font-size: 12px; font-weight: 600;
    color: #8fa6c8; letter-spacing: .2px;
}
/* ALTUSHKA: низ профиля уходил под нижнюю навигацию («Инвентарь пуст» было
   не дочитать). Даём экрану запас снизу, как у остальных длинных экранов. */
#screen-profile.page {
    padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px));
}
@media (min-width: 1024px) {
    #screen-profile.page { padding-bottom: 40px; }
}
/* ALTUSHKA: в Коровке их `.gk-shell` стоит с overflow:hidden и высотой в экран —
   панель ставки обрезалась, а жест уходил в этот контейнер, поэтому страница
   не скроллилась и до кнопок было не достать. Отдаём высоту странице. */
body.cow-full #screen-cow .gk-shell {
    overflow: visible !important;
    height: auto !important;
    max-height: none !important;
}
body.cow-full #screen-cow .gk {
    height: auto !important;
    max-height: none !important;
}
body.cow-full #screen-cow .gk-panel__body {
    overflow: visible !important;
}
/* Экран «Заработок» (перенос их раздела #/tasks) */
.earn-screen { padding: 12px 14px 110px; }
.earn-screen__head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.earn-screen__head h1 { font-size: 22px; font-weight: 900; margin: 0; }
.earn-back {
    width: 34px; height: 34px; border-radius: 50%; border: 1px solid rgba(255,255,255,.12);
    background: rgba(255,255,255,.05); color: #cfe0ff; display: inline-flex;
    align-items: center; justify-content: center; cursor: pointer;
}
.earn-partner {
    border-radius: 18px; padding: 16px;
    background: linear-gradient(160deg, rgba(255,196,0,.14), rgba(255,196,0,.03) 60%, rgba(0,0,0,0));
    border: 1px solid rgba(255,196,0,.28); margin-bottom: 14px;
}
.earn-partner__top { display: flex; justify-content: space-between; align-items: baseline; }
.earn-partner__name { font-weight: 900; letter-spacing: .5px; font-size: 18px; color: #ffc400; }
.earn-partner__country { font-size: 12px; color: #9db0cc; }
.earn-partner__payout { margin-top: 8px; font-size: 15px; color: #e9f1ff; }
.earn-partner__payout b { color: #ffd75e; }
.earn-partner__sub { font-size: 11px; color: #8fa6c8; margin-top: 2px; }
.earn-stages { display: flex; flex-direction: column; gap: 10px; }
.earn-stage {
    display: flex; gap: 10px; align-items: flex-start; padding: 12px;
    border-radius: 16px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.07);
}
.earn-stage__n {
    flex: 0 0 26px; width: 26px; height: 26px; border-radius: 50%;
    background: linear-gradient(135deg, #ef02cb, #75027f); color: #fff;
    font-weight: 800; font-size: 13px; display: flex; align-items: center; justify-content: center;
}
.earn-stage__body { flex: 1 1 auto; min-width: 0; }
.earn-stage__txt { font-size: 13px; line-height: 1.35; color: #e6eeff; }
.earn-stage__meta { font-size: 11px; color: #93a8c9; margin-top: 4px; }
.earn-stage__btn {
    flex: 0 0 auto; padding: 8px 12px; border-radius: 12px; border: 0; cursor: pointer;
    background: linear-gradient(135deg, #ef02cb, #75027f); color: #fff; font-weight: 800; font-size: 12px;
}
.earn-friends {
    margin-top: 14px; padding: 14px; border-radius: 16px;
    background: rgba(124,77,255,.12); border: 1px solid rgba(124,77,255,.32);
}
.earn-friends__title { font-weight: 800; font-size: 15px; }
.earn-friends__line { font-size: 12px; color: #b8c8e4; margin: 4px 0 10px; }
.earn-friends__btn {
    width: 100%; padding: 12px; border-radius: 14px; border: 0; cursor: pointer;
    background: linear-gradient(135deg, #ef02cb, #75027f); color: #fff; font-weight: 800;
}
.earn-faqs { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.earn-faq {
    border-radius: 14px; background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.07); padding: 10px 12px;
}
.earn-faq summary { cursor: pointer; font-weight: 700; font-size: 13px; }
.earn-faq p { margin: 8px 0 0; font-size: 12px; line-height: 1.45; color: #b9c8e2; }
.earn-note { margin-top: 14px; font-size: 11px; color: #7f93b4; line-height: 1.45; }
/* ── Заработок: их картинки (знак BETBOOM, иконки этапов, арт друзей) ──────
   Разметку и классы взяли их, картинки — их файлы: `partners/betboom.png`,
   `earn-icons1002/*`, `promo/optimized0927/friends-gifts-768.webp`. */
.earn-partner {
    display: flex; align-items: center; gap: 12px;
}
.earn-partner__logo {
    flex: 0 0 56px; width: 56px; height: 56px; border-radius: 14px;
    object-fit: contain; background: #ffd400; padding: 6px;
}
.earn-partner__body { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 auto; }
.earn-partner__payout {
    flex: 0 0 auto; margin: 0; padding: 6px 10px; border-radius: 10px;
    background: rgba(255,196,0,.16); border: 1px solid rgba(255,196,0,.38);
    font-size: 12px; color: #ffd75e; white-space: nowrap;
}
.earn-partner__payout b { font-size: 13px; }

.earn-stage__art {
    flex: 0 0 40px; width: 40px; height: 40px; border-radius: 12px;
    overflow: hidden; background: rgba(255,255,255,.06);
    display: flex; align-items: center; justify-content: center;
}
.earn-stage__art img { width: 100%; height: 100%; object-fit: contain; }

.earn-offer__pay--soon {
    background: rgba(255,255,255,.10) !important;
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 10px; padding: 4px 8px; font-size: 11px;
    color: #cfdcf2 !important;
}
.earn-friends__head { display: flex; align-items: center; gap: 10px; }
.earn-friends__art {
    flex: 0 0 56px; width: 56px; height: 56px; border-radius: 14px; object-fit: cover;
}
.earn-friends__rows { margin: 10px 0 0; }
.earn-friends__row {
    display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
    padding: 6px 0; font-size: 12px; color: #cfdcf2;
    border-bottom: 1px solid rgba(255,255,255,.07);
}
.earn-friends__row b { color: #ffd75e; white-space: nowrap; }
.earn-friends__cap { margin: 10px 0 6px; font-size: 11px; color: #8fa6c8; }
.earn-friends__cells { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.earn-friends__cell {
    display: flex; flex-direction: column; align-items: center; gap: 2px;
    padding: 8px 4px; border-radius: 12px;
    background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08);
}
.earn-friends__cell span { font-size: 10px; color: #93a8c9; }
.earn-friends__cell b { font-size: 12px; color: #e9f1ff; }

/* Их переменные редкости (`assets/css/tokens.css` мы не грузим — он меняет всю
   палитру приложения). Без них у карточек «Бонусы за пополнение» пропадал их
   синий градиент под подарком: в их CSS цвет берётся из `--rar*-c`. */
:root {
    --rar0-c: 150,162,196; --rar0-h: 222,228,244;
    --rar1-c: 52,116,255;  --rar1-h: 170,205,255;
    --rar2-c: 138,78,255;  --rar2-h: 214,190,255;
    --rar3-c: 226,64,222;  --rar3-h: 255,186,250;
    --rar4-c: 242,58,72;   --rar4-h: 255,186,180;
    --rar5-c: 239,2,203;  --rar5-h: 255,244,204;
}

/* Способы пополнения — большие строки их вида: логотип крупно слева,
   название и «от N» рядом, у выбранной синяя обводка и галочка.
   Классы свои (`w-dep`), потому что их `.ds-method` живёт в их сетке. */
.wallet .ds-deposit .ds-methods .w-mts {
    display: flex !important; flex-direction: column !important; gap: 10px !important;
    grid-template-columns: none !important;
}
.w-dep {
    position: relative; display: flex; align-items: center; gap: 16px;
    min-height: 96px; padding: 12px 16px; border-radius: 20px; cursor: pointer;
    background: #1f2635; box-shadow: inset 0 0 0 1px rgba(255,255,255,.06);
    transition: box-shadow .18s ease, background .18s ease, transform .12s ease;
}
.w-dep:active { transform: scale(.99); }
.w-dep.is-on {
    background: color-mix(in srgb, #337af6 18%, #1f2635);
    box-shadow: inset 0 0 0 2px #337af6;
}
.w-dep input { position: absolute; opacity: 0; pointer-events: none; }
.w-dep__logo {
    flex: 0 0 84px; width: 84px; height: 72px;
    display: flex; align-items: center; justify-content: center;
}
.w-dep__logo img { width: 84px; height: 72px; object-fit: contain; }
.w-dep__body { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1 1 auto; }
.w-dep__name { font-size: 19px; line-height: 1.2; font-weight: 800; color: #f2f6ff; }
.w-dep__min {
    align-self: flex-start; font-size: 13px; padding: 4px 9px; border-radius: 9px;
    background: rgba(255,255,255,.10); color: #b9c8e2;
}
.w-dep__mark {
    flex: 0 0 26px; width: 26px; height: 26px; border-radius: 999px;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; font-weight: 900; color: #fff;
    background: #337af6; opacity: 0; transition: opacity .15s ease;
}
.w-dep.is-on .w-dep__mark { opacity: 1; }

/* Плитки пополнения: длинные названия («Мобильная связь») не должны
   выдавливать плашку «от 100» за край плитки */
.w-mt.wd-method .ds-method-name { font-size: 14px; line-height: 1.15; text-align: center; }
.w-mt.wd-method .ds-method-min { margin-top: 4px; }

/* Вывод: их строки под способом — срок и «списываем с баланса» */
.w-wd-foot { margin: 10px 0 0; }
.w-wd-foot__row {
    display: flex; align-items: center; gap: 10px; padding: 10px 0;
    border-top: 1px solid rgba(255,255,255,.08);
}
.w-wd-foot__row--plain { justify-content: space-between; color: #b9c8e2; font-size: 13px; }
.w-wd-foot__row--plain i { font-style: normal; color: #7f93b4; }
.w-wd-foot__art { flex: 0 0 34px; display: flex; }
.w-wd-foot__body { display: flex; flex-direction: column; gap: 1px; }
.w-wd-foot__body b { font-size: 14px; }
.w-wd-foot__body span { font-size: 12px; color: #93a8c9; }
/* Апгрейд живёт кадром на всю высоту — скроллить нечего, иначе экран
   «прокручивается» вхолостую на 146 px. */
#screen-upgrade.page { overflow: hidden; padding-bottom: 0; }

/* ═══════════════════════════════════════════════════════════════════════
   ULTRA-MENU-2026: живые обложки игр, нижнее меню и карточки.
   Картинки — из нашего материала `assets/newic/covers` и `cnopa`,
   никаких чужих ассетов. Всё остальное — CSS (свечение, блик, подъём).
   ═══════════════════════════════════════════════════════════════════════ */

/* ── 1. Обложки игр: индивидуальные картинки вместо спрайта ─────────── */
.game-cover.cv-13,   /* КРАШ */      .game-cover.cv-rocket,
.game-cover.cv-10,   /* МИНЫ */      .game-cover.cv-mines,
.game-cover.cv-0,    /* АРЕНА */     .game-cover.cv-arena,
.game-cover.cv-14,   /* ФОРТУНА */   .game-cover.cv-fortune,
.game-cover.cv-5,    /* НАПЁРСТКИ */ .game-cover.cv-cups,
.game-cover.cv-reys, .game-cover.cv-11, .game-cover.cv-2, .game-cover.cv-4 {
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
}
.game-cover.cv-13, .game-cover.cv-rocket  { background-image: url('assets/newic/covers/rocket-thumb.webp') !important; }
.game-cover.cv-10, .game-cover.cv-mines   { background-image: url('assets/newic/covers/mines-thumb.webp') !important; }
.game-cover.cv-0,  .game-cover.cv-arena   { background-image: url('assets/newic/covers/arena-thumb.webp') !important; }
.game-cover.cv-14, .game-cover.cv-fortune { background-image: url('assets/newic/covers/roulette-thumb.webp') !important; }
.game-cover.cv-5,  .game-cover.cv-cups    { background-image: url('assets/newic/covers/cups-thumb.png') !important; }
.game-cover.cv-reys                       { background-image: url('assets/newic/covers/reys-thumb.webp') !important; }
.game-cover.cv-11                         { background-image: url('assets/newic/covers/plinko-thumb.webp') !important; }
.game-cover.cv-2                          { background-image: url('assets/newic/covers/blackjack-thumb.webp') !important; }
.game-cover.cv-4                          { background-image: url('assets/newic/covers/cow-thumb.webp') !important; }

/* ── 2. Карточка игры: подъём, свечение, плавная рамка ──────────────── */
.game-item {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    transition: transform .18s ease, box-shadow .24s ease, border-color .24s ease;
    border: 1px solid rgba(255, 255, 255, .06);
}
.game-item:active { transform: scale(.975); }
.game-item::after {
    content: "";
    position: absolute; inset: 0;
    border-radius: inherit;
    pointer-events: none;
    background: linear-gradient(160deg, rgba(255,255,255,.16), rgba(255,255,255,0) 42%);
    opacity: 0;
    transition: opacity .22s ease;
}
.game-item:active::after { opacity: 1; }
@media (hover: hover) {
    .game-item:hover {
        transform: translateY(-3px);
        box-shadow: 0 12px 28px rgba(255, 0, 128, .22), 0 2px 8px rgba(0, 0, 0, .5);
        border-color: rgba(255, 0, 128, .38);
    }
    .game-item:hover::after { opacity: 1; }
}

/* ── 3. Нижнее меню: капсула активного пункта, блик, отклик ─────────── */
.bottom-menu {
    backdrop-filter: blur(16px) saturate(1.2);
    -webkit-backdrop-filter: blur(16px) saturate(1.2);
    border-top: 1px solid rgba(255, 255, 255, .07);
}
.bottom-menu .nav-btn {
    position: relative;
    transition: transform .16s ease;
}
.bottom-menu .nav-btn:active { transform: scale(.93); }
.bottom-menu .nav-btn::before {
    content: "";
    position: absolute;
    left: 50%; top: 2px;
    width: 56px; height: 46px;
    transform: translateX(-50%) scale(.82);
    border-radius: 16px;
    background: radial-gradient(circle at 50% 30%, rgba(255, 0, 128, .38), rgba(124, 77, 255, .16) 62%, transparent 72%);
    opacity: 0;
    transition: opacity .22s ease, transform .26s ease;
    pointer-events: none;
}
.bottom-menu .nav-btn.active::before { opacity: 1; transform: translateX(-50%) scale(1); }
.bottom-menu .nav-btn.active .nav-icon { transform: scale(1.1); }
.bottom-menu .nav-btn.active span {
    color: #fff;
    text-shadow: 0 0 10px rgba(255, 0, 128, .55);
}
.bottom-menu .nav-btn.active::after {
    content: "";
    position: absolute;
    left: 50%; bottom: 2px;
    width: 18px; height: 3px; border-radius: 3px;
    transform: translateX(-50%);
    background: linear-gradient(90deg, #ef02cb, #75027f);
    box-shadow: 0 0 10px rgba(255, 0, 128, .8);
    animation: ultraNavPulse 2.4s ease-in-out infinite;
}
@keyframes ultraNavPulse {
    0%, 100% { opacity: .85; box-shadow: 0 0 8px rgba(255, 0, 128, .55); }
    50%      { opacity: 1;   box-shadow: 0 0 16px rgba(255, 0, 128, .95); }
}

/* ── 4. Шапка: аккуратный блик по кнопке «Пополнить» ────────────────── */
.topbar__topup { position: relative; overflow: hidden; }
.topbar__topup::after {
    content: "";
    position: absolute; top: 0; left: -60%;
    width: 45%; height: 100%;
    background: linear-gradient(100deg, transparent, rgba(255,255,255,.45), transparent);
    transform: skewX(-18deg);
    animation: ultraShine 4.6s ease-in-out infinite;
    pointer-events: none;
}
@keyframes ultraShine {
    0%, 62% { left: -60%; }
    82%, 100% { left: 130%; }
}

/* ── 5. Профиль: баннер-шапка из их фона ────────────────────────────── */
#screen-profile .profile-head {
    position: relative;
    border-radius: 20px;
    padding: 18px 16px;
    overflow: hidden;
    background:
        linear-gradient(120deg, rgba(255, 0, 128, .28), rgba(124, 77, 255, .22) 55%, rgba(0, 0, 0, .1)),
        url('assets/newic/fon/fon1.png') center/cover no-repeat;
    border: 1px solid rgba(255, 255, 255, .08);
    box-shadow: 0 10px 26px rgba(0, 0, 0, .35);
}
#screen-profile .profile-head h1 {
    position: relative;
    text-shadow: 0 2px 12px rgba(0, 0, 0, .55);
}

/* ── 6. Кнопки: единый «сочный» вид ─────────────────────────────────── */
.btn-main, .earn-friends__btn, .earn-stage__btn {
    position: relative;
    overflow: hidden;
    transition: transform .15s ease, box-shadow .22s ease, filter .22s ease;
}
.btn-main:active, .earn-friends__btn:active, .earn-stage__btn:active {
    transform: scale(.97);
    filter: brightness(.95);
}
.btn-main::after {
    content: "";
    position: absolute; top: 0; left: -55%;
    width: 40%; height: 100%;
    background: linear-gradient(100deg, transparent, rgba(255,255,255,.35), transparent);
    transform: skewX(-18deg);
    animation: ultraShine 5.2s ease-in-out infinite;
    pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
    .topbar__topup::after, .btn-main::after,
    .bottom-menu .nav-btn.active::after { animation: none; }
}

/* ═══════════════════════════════════════════════════════════════════════
   WALLET-POLISH-2026: «Пополнить / Вывести / История» — живые табы,
   выбранный способ, кнопки и итог. Только CSS, без чужих ассетов.
   ═══════════════════════════════════════════════════════════════════════ */

/* табы-капсулы */
#screen-wallet .seg {
    display: flex; gap: 6px; padding: 5px;
    border-radius: 18px;
    background: rgba(255, 255, 255, .045);
    border: 1px solid rgba(255, 255, 255, .07);
}
#screen-wallet .seg__item {
    flex: 1 1 0; border: 0; border-radius: 14px; padding: 11px 8px;
    background: transparent; color: #9db0cc; font-weight: 800; font-size: 13px;
    transition: color .18s ease, transform .16s ease, background .22s ease, box-shadow .22s ease;
    position: relative; overflow: hidden;
}
#screen-wallet .seg__item:active { transform: scale(.97); }
#screen-wallet .seg__item[aria-selected="true"] {
    color: #fff;
    background: linear-gradient(135deg, #ef02cb, #75027f);
    box-shadow: 0 6px 18px rgba(255, 0, 128, .34), inset 0 1px 0 rgba(255,255,255,.22);
}
#screen-wallet .seg__item[aria-selected="true"]::after {
    content: ""; position: absolute; top: 0; left: -60%; width: 45%; height: 100%;
    background: linear-gradient(100deg, transparent, rgba(255,255,255,.45), transparent);
    transform: skewX(-18deg);
    animation: ultraShine 5s ease-in-out infinite;
    pointer-events: none;
}

/* способы пополнения */
#screen-wallet .w-mt {
    position: relative;
    transition: transform .16s ease, border-color .2s ease, box-shadow .22s ease, background .22s ease;
    border-radius: 16px;
}
#screen-wallet .w-mt:active { transform: scale(.975); }
@media (hover: hover) {
    #screen-wallet .w-mt:hover {
        border-color: rgba(255, 0, 128, .35);
        box-shadow: 0 8px 22px rgba(255, 0, 128, .18);
    }
}
#screen-wallet .w-mt:has(input:checked) {
    border-color: rgba(255, 0, 128, .75) !important;
    background: linear-gradient(160deg, rgba(255, 0, 128, .16), rgba(124, 77, 255, .10)) !important;
    box-shadow: 0 8px 22px rgba(255, 0, 128, .22), inset 0 0 0 1px rgba(255, 0, 128, .3);
}
#screen-wallet .w-mt:has(input:checked)::after {
    content: "✓";
    /* ALT-WALLET-LIVE3: как в их живом кошельке — галочка СЛЕВА сверху, а справа сверху
       висит бейдж комиссии (раньше они наезжали друг на друга). */
    position: absolute; top: 7px; left: 8px;
    width: 18px; height: 18px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 900; color: #4b3bd8;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 2px 8px rgba(10, 6, 26, .45);
}

/* суммы-пресеты */
#screen-wallet .preset {
    transition: transform .14s ease, border-color .2s ease, background .2s ease, color .2s ease;
}
#screen-wallet .preset:hover { border-color: rgba(255, 0, 128, .4); }
#screen-wallet .preset:active { transform: scale(.95); }

/* итог и кнопка */
#screen-wallet .w-sum {
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, .07);
    background: linear-gradient(170deg, rgba(124, 77, 255, .12), rgba(0, 0, 0, .18));
    box-shadow: 0 10px 26px rgba(0, 0, 0, .28);
}
#screen-wallet .btn--deposit {
    position: relative; overflow: hidden;
    background: linear-gradient(135deg, #ef02cb, #75027f) !important;
    box-shadow: 0 10px 26px rgba(255, 0, 128, .3);
    transition: transform .15s ease, box-shadow .2s ease, filter .2s ease;
}
#screen-wallet .btn--deposit:active { transform: scale(.975); filter: brightness(.96); }
#screen-wallet .btn--deposit::after {
    content: ""; position: absolute; top: 0; left: -60%; width: 45%; height: 100%;
    background: linear-gradient(100deg, transparent, rgba(255,255,255,.4), transparent);
    transform: skewX(-18deg);
    animation: ultraShine 4.8s ease-in-out infinite;
    pointer-events: none;
}

/* ── Магазин NFT: карточки подарков ─────────────────────────────────── */
#screen-cases .gift-card,
#screen-cases .shop-card,
#screen-cases .case-card {
    transition: transform .16s ease, box-shadow .22s ease, border-color .22s ease;
}
#screen-cases .gift-card:active,
#screen-cases .shop-card:active,
#screen-cases .case-card:active { transform: scale(.97); }
@media (hover: hover) {
    #screen-cases .gift-card:hover,
    #screen-cases .shop-card:hover,
    #screen-cases .case-card:hover {
        transform: translateY(-2px);
        border-color: rgba(255, 0, 128, .32);
        box-shadow: 0 10px 24px rgba(255, 0, 128, .18);
    }
}

/* ── Экран открытия кейса: кнопка «Открыть» ─────────────────────────── */
#screen-casegame .open-case-btn,
#screen-casegame .btn-open {
    position: relative; overflow: hidden;
    transition: transform .15s ease, box-shadow .2s ease;
}
#screen-casegame .open-case-btn:active,
#screen-casegame .btn-open:active { transform: scale(.97); }

/* ═══════════════════════════════════════════════════════════════════════
   SHOP-POLISH-2026: магазин NFT и экран кейса.
   ═══════════════════════════════════════════════════════════════════════ */

/* сортировка — капсулы */
#screen-cases .gift-sort-row { display: flex; gap: 8px; }
#screen-cases .gift-sort-btn {
    flex: 1 1 0; border-radius: 14px; padding: 11px 10px;
    font-weight: 800; font-size: 13px; color: #9db0cc;
    border: 1px solid rgba(255, 255, 255, .09);
    background: rgba(255, 255, 255, .04);
    transition: color .18s ease, background .22s ease, border-color .22s ease, box-shadow .22s ease, transform .15s ease;
}
#screen-cases .gift-sort-btn:active { transform: scale(.97); }
#screen-cases .gift-sort-btn.active {
    color: #fff;
    background: linear-gradient(135deg, #ef02cb, #75027f);
    border-color: transparent;
    box-shadow: 0 8px 20px rgba(255, 0, 128, .3);
}

/* сетка подарков: у каждого своя плитка */
#screen-cases .gift-shop-grid { gap: 10px; }
#screen-cases .gift-card {
    border-radius: 18px;
    padding: 10px 8px 8px;
    background: linear-gradient(180deg, rgba(255, 255, 255, .055), rgba(255, 255, 255, .02));
    border: 1px solid rgba(255, 255, 255, .07);
    transition: transform .16s ease, border-color .2s ease, box-shadow .22s ease, background .22s ease;
    position: relative;
    overflow: hidden;
}
#screen-cases .gift-card::before {
    content: "";
    position: absolute; inset: 0;
    background: radial-gradient(circle at 50% 0%, rgba(255, 0, 128, .18), transparent 62%);
    opacity: 0;
    transition: opacity .22s ease;
    pointer-events: none;
}
#screen-cases .gift-card:active { transform: scale(.97); }
@media (hover: hover) {
    #screen-cases .gift-card:hover {
        transform: translateY(-3px);
        border-color: rgba(255, 0, 128, .38);
        box-shadow: 0 12px 26px rgba(255, 0, 128, .18);
    }
    #screen-cases .gift-card:hover::before { opacity: 1; }
}
#screen-cases .gift-art img { transition: transform .22s ease; }
#screen-cases .gift-card:hover .gift-art img { transform: scale(1.06) rotate(-1.5deg); }
#screen-cases .gift-model { font-weight: 700; }

/* цена — сочная кнопка */
#screen-cases .gift-price {
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, .1);
    background: linear-gradient(135deg, rgba(255, 0, 128, .22), rgba(124, 77, 255, .18));
    color: #fff; font-weight: 800;
    transition: background .2s ease, box-shadow .2s ease, transform .15s ease;
}
#screen-cases .gift-price:active { transform: scale(.96); }
@media (hover: hover) {
    #screen-cases .gift-price:hover {
        background: linear-gradient(135deg, #ef02cb, #75027f);
        box-shadow: 0 8px 18px rgba(255, 0, 128, .35);
    }
}
#screen-cases .gift-more-btn {
    position: relative; overflow: hidden;
    background: linear-gradient(135deg, #ef02cb, #75027f) !important;
    box-shadow: 0 10px 24px rgba(255, 0, 128, .28);
}
#screen-cases .gift-more-btn::after {
    content: ""; position: absolute; top: 0; left: -60%; width: 45%; height: 100%;
    background: linear-gradient(100deg, transparent, rgba(255,255,255,.4), transparent);
    transform: skewX(-18deg);
    animation: ultraShine 5s ease-in-out infinite;
    pointer-events: none;
}

/* ── Экран открытия кейса: верхние табы и кнопка «Открыть» ──────────── */
#screen-casegame .case-top-tab,
#screen-casegame .case-tool {
    transition: transform .15s ease, background .2s ease, color .2s ease, box-shadow .2s ease;
    border-radius: 12px;
}
#screen-casegame .case-top-tab:active,
#screen-casegame .case-tool:active { transform: scale(.95); }
#screen-casegame .case-top-tab.active,
#screen-casegame .case-tool.active {
    background: linear-gradient(135deg, #ef02cb, #75027f);
    color: #fff;
    box-shadow: 0 8px 18px rgba(255, 0, 128, .28);
}
#screen-casegame .case-open,
#screen-casegame .case-cta {
    position: relative; overflow: hidden;
    transition: transform .15s ease, box-shadow .2s ease;
    box-shadow: 0 12px 28px rgba(255, 0, 128, .3);
}
#screen-casegame .case-open:active,
#screen-casegame .case-cta:active { transform: scale(.97); }
/* Быстрые действия в профиле */
.profile-quick {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
    margin: 10px 0 14px;
}
.pq {
    display: flex; flex-direction: column; align-items: center; gap: 4px;
    padding: 12px 6px; border-radius: 16px; cursor: pointer;
    border: 1px solid rgba(255, 255, 255, .09);
    background: rgba(255, 255, 255, .045);
    color: #e7efff; transition: transform .15s ease, background .2s ease, box-shadow .22s ease, border-color .2s ease;
}
.pq:active { transform: scale(.96); }
.pq-ic { font-size: 17px; line-height: 1; }
.pq-t { font-size: 12px; font-weight: 800; }
.pq--top {
    background: linear-gradient(150deg, rgba(255, 0, 128, .26), rgba(124, 77, 255, .18));
    border-color: rgba(255, 0, 128, .38);
}
.pq--wd { background: linear-gradient(150deg, rgba(124, 77, 255, .24), rgba(0, 200, 255, .12)); }
.pq--earn { background: linear-gradient(150deg, rgba(255, 196, 0, .22), rgba(255, 0, 128, .14)); }
@media (hover: hover) {
    .pq:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(255, 0, 128, .18); }
}
/* ПК: магазин и профиль не должны жаться в узкую колонку */
@media (min-width: 1024px) {
    .content-scroll { max-width: 1120px; margin: 0 auto; }
    #screen-cases .gift-shop-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
    #screen-profile .profile-quick { grid-template-columns: repeat(3, minmax(0, 220px)); justify-content: start; }
    .bottom-menu { left: 50%; transform: translateX(-50%); max-width: 640px; border-radius: 22px 22px 0 0; }
}

/* ═══════════════════════════════════════════════════════════════════════
   ULTRA-FINISH-2026: появление карточек и прогресс в «Заработке».
   ═══════════════════════════════════════════════════════════════════════ */
@keyframes ultraCardIn {
    from { opacity: 0; transform: translateY(10px) scale(.985); }
    to   { opacity: 1; transform: none; }
}
#screen-games.active .game-item {
    animation: ultraCardIn .34s ease both;
}
#screen-games.active .game-item:nth-child(1)  { animation-delay: .02s; }
#screen-games.active .game-item:nth-child(2)  { animation-delay: .05s; }
#screen-games.active .game-item:nth-child(3)  { animation-delay: .08s; }
#screen-games.active .game-item:nth-child(4)  { animation-delay: .11s; }
#screen-games.active .game-item:nth-child(5)  { animation-delay: .14s; }
#screen-games.active .game-item:nth-child(6)  { animation-delay: .17s; }
#screen-games.active .game-item:nth-child(7)  { animation-delay: .20s; }
#screen-games.active .game-item:nth-child(8)  { animation-delay: .23s; }
#screen-games.active .game-item:nth-child(n+9) { animation-delay: .26s; }
@media (prefers-reduced-motion: reduce) {
    #screen-games.active .game-item { animation: none; }
}

/* прогресс этапов «Заработка» */
.earn-progress {
    margin: 12px 0 4px; padding: 12px 14px; border-radius: 16px;
    background: rgba(255, 255, 255, .045);
    border: 1px solid rgba(255, 255, 255, .07);
}
.earn-progress__top {
    display: flex; justify-content: space-between; align-items: baseline;
    font-size: 12px; color: #a8bcd9; margin-bottom: 8px;
}
.earn-progress__top b { color: #fff; font-size: 13px; }
.earn-progress__bar {
    height: 8px; border-radius: 8px; overflow: hidden;
    background: rgba(255, 255, 255, .08);
}
.earn-progress__fill {
    height: 100%; width: 0%;
    border-radius: 8px;
    background: linear-gradient(90deg, #ef02cb, #75027f);
    box-shadow: 0 0 12px rgba(255, 0, 128, .55);
    transition: width .5s ease;
}
/* Заработок: «Как получить ещё», друзья, розыгрыш */
.earn-extra { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.earn-extra__head { font-size: 13px; font-weight: 800; color: #cfe0ff; margin-bottom: 2px; }
.earn-offer {
    display: flex; align-items: center; gap: 10px; width: 100%;
    padding: 12px; border-radius: 16px; cursor: pointer; text-align: left;
    border: 1px solid rgba(255, 255, 255, .07);
    background: linear-gradient(140deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .02));
    color: #e9f1ff; transition: transform .15s ease, border-color .2s ease, box-shadow .22s ease;
}
.earn-offer:active { transform: scale(.98); }
@media (hover: hover) {
    .earn-offer:hover { border-color: rgba(255, 0, 128, .35); box-shadow: 0 8px 20px rgba(255, 0, 128, .16); }
}
.earn-offer__ic {
    flex: 0 0 34px; width: 34px; height: 34px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center; font-size: 17px;
    background: linear-gradient(135deg, rgba(255, 0, 128, .28), rgba(124, 77, 255, .22));
}
.earn-offer__body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.earn-offer__t { font-weight: 800; font-size: 13px; }
.earn-offer__s { font-size: 11px; color: #9db0cc; }
.earn-offer__pay {
    flex: 0 0 auto; font-size: 11px; font-weight: 800; color: #ffd75e;
    background: rgba(255, 215, 94, .12); border: 1px solid rgba(255, 215, 94, .3);
    padding: 4px 8px; border-radius: 10px; white-space: nowrap;
}
.earn-friend-rows { display: flex; flex-direction: column; gap: 6px; margin: 8px 0 10px; }
.earn-friend-row {
    display: flex; justify-content: space-between; gap: 8px;
    font-size: 12px; color: #b8c8e4; padding: 6px 8px; border-radius: 10px;
    background: rgba(255, 255, 255, .04);
}
.earn-friend-row b { color: #ffd75e; white-space: nowrap; }
.earn-raffle {
    margin-top: 14px; padding: 14px; border-radius: 16px;
    display: flex; align-items: center; gap: 10px;
    background: linear-gradient(150deg, rgba(255, 0, 128, .18), rgba(124, 77, 255, .12));
    border: 1px solid rgba(255, 0, 128, .3);
}
.earn-raffle__badge {
    position: absolute; margin-top: -46px; margin-left: 4px;
    font-size: 10px; font-weight: 800; color: #fff;
    background: linear-gradient(135deg, #ef02cb, #75027f);
    padding: 3px 8px; border-radius: 8px;
}
.earn-raffle__body { flex: 1 1 auto; min-width: 0; }
.earn-raffle__t { font-weight: 800; font-size: 14px; }
.earn-raffle__s { font-size: 11px; color: #b8c8e4; margin-top: 2px; }
.earn-raffle__pay { font-size: 15px; font-weight: 900; color: #ffd75e; margin-top: 4px; }
.earn-raffle__btn {
    flex: 0 0 auto; padding: 10px 14px; border-radius: 14px; border: 0; cursor: pointer;
    font-weight: 800; font-size: 12px; color: #fff;
    background: linear-gradient(135deg, #ef02cb, #75027f);
    box-shadow: 0 8px 18px rgba(255, 0, 128, .3);
}
.earn-raffle__btn:active { transform: scale(.96); }

/* Промокод в профиле */
.profile-promo {
    display: flex; align-items: center; gap: 8px;
    margin: 0 0 14px; padding: 8px 10px; border-radius: 16px;
    background: rgba(255, 255, 255, .045);
    border: 1px solid rgba(255, 255, 255, .08);
}
.profile-promo__ic { font-size: 16px; }
.profile-promo__in {
    flex: 1 1 auto; min-width: 0; background: transparent; border: 0; outline: none;
    color: #e9f1ff; font-size: 13px; font-weight: 600;
}
.profile-promo__in::placeholder { color: #7f93b4; }
.profile-promo__btn {
    flex: 0 0 auto; padding: 9px 12px; border-radius: 12px; border: 0; cursor: pointer;
    font-weight: 800; font-size: 12px; color: #fff;
    background: linear-gradient(135deg, #ef02cb, #75027f);
}
.profile-promo__btn:active { transform: scale(.96); }
/* их картинки: иконки офферов, приз розыгрыша, иконки заработка */
.earn-offer__ic img { width: 26px; height: 26px; object-fit: contain; display: block; }
.earn-raffle__art {
    flex: 0 0 52px; width: 52px; height: 52px; object-fit: contain;
    filter: drop-shadow(0 6px 14px rgba(255, 0, 128, .35));
}
.earn-ic { display: inline-flex; align-items: center; justify-content: center; }
.earn-ic img { width: 34px; height: 34px; object-fit: contain; display: block; }
.earn-ic-sprite {
    display: block; width: 34px; height: 34px;
    background-image: url('assets/newic/earn-sprite.webp');
    background-size: 700% 100%;
    background-repeat: no-repeat;
}
/* Их баннеры: пополнение и турниры + картинка пустой истории */
.w-banner, .tops-banner {
    position: relative; margin: 0 0 12px; border-radius: 18px; overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .08);
    box-shadow: 0 10px 26px rgba(0, 0, 0, .3);
}
.w-banner img, .tops-banner img {
    display: block; width: 100%; height: 96px; object-fit: cover;
}
.w-banner__txt, .tops-banner__txt {
    position: absolute; inset: auto 0 0 0; padding: 10px 14px;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, .72));
    display: flex; flex-direction: column; gap: 2px;
}
.w-banner__txt b, .tops-banner__txt b { font-size: 14px; font-weight: 900; color: #fff; }
.w-banner__txt span, .tops-banner__txt span { font-size: 11px; color: #cfd9ea; }

.pix-hist-empty {
    display: flex; flex-direction: column; align-items: center; gap: 8px;
    padding: 18px 12px; text-align: center; color: #8fa6c8; font-size: 13px;
}
.pix-hist-art { opacity: .9; filter: drop-shadow(0 8px 18px rgba(124, 77, 255, .3)); }
/* Экран «Турнир по билетам» (их логика) */
.tour { padding: 12px 14px 110px; }
.tour__head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.tour__back {
    width: 34px; height: 34px; border-radius: 50%; border: 1px solid rgba(255,255,255,.12);
    background: rgba(255,255,255,.05); color: #cfe0ff; display: inline-flex;
    align-items: center; justify-content: center; cursor: pointer; flex: 0 0 34px;
}
.tour__title { font-size: 19px; font-weight: 900; }
.tour__sub { font-size: 12px; color: #9db0cc; margin-top: 2px; }
.tour__me {
    display: flex; justify-content: space-between; align-items: center;
    padding: 14px 16px; border-radius: 18px; margin-bottom: 8px;
    background: linear-gradient(140deg, rgba(255,0,128,.22), rgba(124,77,255,.16));
    border: 1px solid rgba(255,0,128,.35);
}
.tour__num { font-size: 26px; font-weight: 900; }
.tour__lbl { display: block; font-size: 11px; color: #cfd9ea; }
.tour__place { font-size: 12px; font-weight: 800; color: #ffd75e; }
.tour__break {
    display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px;
    font-size: 11px; color: #a8bcd9;
}
.tour__break span {
    padding: 5px 9px; border-radius: 10px;
    background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.07);
}
.tour__free {
    width: 100%; padding: 12px; border-radius: 14px; border: 0; cursor: pointer;
    font-weight: 800; font-size: 13px; color: #fff; margin-bottom: 14px;
    background: linear-gradient(135deg, #ef02cb, #75027f);
    box-shadow: 0 8px 20px rgba(255,0,128,.28);
}
.tour__free:active { transform: scale(.98); }
.tour__sec { font-size: 13px; font-weight: 800; color: #cfe0ff; margin: 14px 0 8px; }
.tour-board { display: flex; flex-direction: column; gap: 6px; }
.tour-row {
    display: flex; align-items: center; gap: 8px;
    padding: 9px 10px; border-radius: 12px;
    background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.06);
}
.tour-row.is-me { border-color: rgba(255,0,128,.5); background: rgba(255,0,128,.1); }
.tour-row__p { flex: 0 0 34px; font-weight: 900; font-size: 12px; color: #9db0cc; }
.tour-row__ava { flex: 0 0 26px; width: 26px; height: 26px; border-radius: 50%; object-fit: cover; }
.tour-row__ava--txt {
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #ef02cb, #75027f); color: #fff; font-size: 12px; font-weight: 900;
}
.tour-row__n { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.tour-row__t { flex: 0 0 auto; font-weight: 800; color: #ffd75e; font-size: 12px; }
.tour-empty { padding: 16px; text-align: center; font-size: 12px; color: #8fa6c8;
    border: 1px dashed rgba(255,255,255,.12); border-radius: 12px; }
.tour-prizes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.tour-prize {
    padding: 10px; border-radius: 14px; text-align: center;
    background: rgba(255,255,255,.045); border: 1px solid rgba(255,255,255,.08);
}
.tour-prize.is-first { border-color: rgba(255,215,0,.5); box-shadow: 0 8px 20px rgba(255,215,0,.12); }
.tour-prize__p { font-size: 10px; color: #9db0cc; font-weight: 800; }
.tour-prize__img { width: 56px; height: 56px; object-fit: contain; margin: 4px auto; display: block; }
.tour-prize__n { font-size: 12px; font-weight: 800; }
.tour-prize__m { font-size: 10px; color: #9db0cc; }
.tour-prize__v { font-size: 12px; font-weight: 800; color: #ffd75e; margin-top: 2px; }
.tour-group {
    display: flex; justify-content: space-between; gap: 8px;
    margin-top: 8px; padding: 9px 11px; border-radius: 12px;
    font-size: 12px; background: rgba(124,77,255,.1); border: 1px solid rgba(124,77,255,.25);
}
.tour-group__n { color: #9db0cc; font-size: 11px; }
.tour-earns { display: flex; flex-direction: column; gap: 6px; }
.tour-earn {
    display: flex; align-items: center; gap: 8px;
    padding: 9px 11px; border-radius: 12px; font-size: 12px;
    background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.06);
}
.tour-earn b { color: #ffd75e; margin-left: auto; }
.tour-earn__d { font-size: 10px; color: #8fa6c8; }
.tour-rules { margin: 0; padding-left: 18px; font-size: 11px; line-height: 1.5; color: #a8bcd9; }
.tour__load { padding: 24px; text-align: center; color: #8fa6c8; font-size: 13px; }

/* ── Обложки игр — ИХ баннеры (`assets/img/covers/*-hero.webp`) ────────────
   Их же картинки с их сайта: каждый `cv-*` теперь показывает свой hero,
   а не наш градиент. Ничего не рисовали — только их файлы. */
.game-cover.cv-13 {
    background-image: url("assets/img/covers/rocket-hero.webp");
    background-size: cover;
    background-position: center;
}
.game-cover.cv-10 {
    background-image: url("assets/img/covers/mines-hero.webp");
    background-size: cover;
    background-position: center;
}
.game-cover.cv-up {
    background-image: url("assets/img/covers/upgrade-hero.webp");
    background-size: cover;
    background-position: center;
}
.game-cover.cv-0 {
    background-image: url("assets/img/covers/arena-hero.webp");
    background-size: cover;
    background-position: center;
}
.game-cover.cv-reys {
    background-image: url("assets/img/covers/reys-hero.webp");
    background-size: cover;
    background-position: center;
}
.game-cover.cv-11 {
    background-image: url("assets/img/covers/plinko-hero.webp");
    background-size: cover;
    background-position: center;
}
.game-cover.cv-2 {
    background-image: url("assets/img/covers/blackjack-hero.webp");
    background-size: cover;
    background-position: center;
}
.game-cover.cv-6 {
    background-image: url("assets/img/covers/giftstorm-hero.webp");
    background-size: cover;
    background-position: center;
}
.game-cover.cv-4 {
    background-image: url("assets/img/covers/cow-hero.webp");
    background-size: cover;
    background-position: center;
}
.game-cover.cv-15 {
    background-image: url("assets/img/covers/scratch-hero.webp");
    background-size: cover;
    background-position: center;
}
.game-cover.cv-8 {
    background-image: url("assets/img/covers/jumper-hero.webp");
    background-size: cover;
    background-position: center;
}
.game-cover.cv-9 {
    background-image: url("assets/img/covers/merge-hero.webp");
    background-size: cover;
    background-position: center;
}
.game-cover.cv-1 {
    background-image: url("assets/img/covers/giftstorm-hero.webp");
    background-size: cover;
    background-position: center;
}
.game-cover.cv-12 {
    background-image: url("assets/img/covers/rocket-hero.webp");
    background-size: cover;
    background-position: center;
}
.game-cover.cv-5 {
    background-image: url("assets/img/covers/gifthunters-hero.webp");
    background-size: cover;
    background-position: center;
}


/* ── Главный экран игр: карточки как у них ───────────────────────────────────
   Крупная обложка, тёмный градиент снизу, название капсом, подпись под ним.
   Игры, которых ещё нет, затемнены и помечены красной плашкой «В РАЗРАБОТКЕ». */
#screen-games .game-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    padding: 12px;
}


#screen-games .game-item {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 20px;
    aspect-ratio: 1 / 0.82;
    background: #101018;
    border: 1px solid rgba(255, 255, 255, .07);
    box-shadow: 0 10px 26px rgba(0, 0, 0, .45);
    cursor: pointer;
    isolation: isolate;
}
#screen-games .game-item .game-cover {
    position: absolute; inset: 0;
    background-size: 300% 300%;            /* спрайт их обложек */
    background-repeat: no-repeat;
    transform: scale(1.02);
    transition: transform .35s ease;
}
#screen-games .game-item:active .game-cover { transform: scale(1.06); }
/* затемнение снизу — под текст */
#screen-games .game-item::after {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 35%, rgba(0, 0, 0, .55) 68%, rgba(0, 0, 0, .92) 100%);
}
#screen-games .game-item .game-meta {
    position: absolute; left: 0; right: 0; bottom: 0;
    padding: 12px 12px 13px;
    z-index: 2;
    display: flex; flex-direction: column; gap: 3px;
}
#screen-games .game-item .game-meta h3 {
    margin: 0; font-size: 17px; line-height: 1.1; font-weight: 900;
    text-transform: uppercase; letter-spacing: .3px; color: #fff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, .8);
}
#screen-games .game-item .game-meta span {
    font-size: 12px; color: rgba(255, 255, 255, .72);
    text-shadow: 0 1px 8px rgba(0, 0, 0, .8);
}
/* плашка NEW остаётся сверху */
#screen-games .game-item .badge {
    position: absolute; top: 10px; right: 10px; left: auto; z-index: 3;
    width: auto; max-width: calc(100% - 20px);  /* иначе плашка растягивалась на всю карточку */
    padding: 3px 8px; border-radius: 99px; font-size: 10px; font-weight: 800;
    letter-spacing: .5px; color: #ffffff;
    background: linear-gradient(135deg, #f236ea, #ef02cb);
}
#screen-games .game-item .badge.soon { background: linear-gradient(135deg, #ff4d4d, #b3001b); color: #fff; }

/* «В РАЗРАБОТКЕ»: затемняем и пишем красным */
#screen-games .game-item.is-soon .game-cover { filter: grayscale(.55) brightness(.42); }
#screen-games .game-item.is-soon .rk-cover { filter: grayscale(.55) brightness(.42); }
/* «В РАЗРАБОТКЕ» / «ОБНОВЛЕНИЕ»: плашка на всю карточку.
   Раньше это была мелкая пилюля по центру (::before) — владелец попросил
   крупнее и во всю карточку. Теперь это элемент .game-lock внутри разметки,
   чтобы не воевать с декоративными ::before/::after самой карточки. */
#screen-games .game-item .game-lock {
    position: absolute; inset: 0; z-index: 4;
    display: flex; align-items: center; justify-content: center;
    border-radius: inherit; pointer-events: none;
    background: linear-gradient(180deg, rgba(6, 4, 10, .34) 0%, rgba(6, 4, 10, .72) 58%, rgba(6, 4, 10, .9) 100%);
    -webkit-backdrop-filter: blur(1.5px);
    backdrop-filter: blur(1.5px);
}
#screen-games .game-item .game-lock span {
    padding: 9px 16px; border-radius: 13px;
    font-size: 13.5px; font-weight: 900; letter-spacing: 1.4px;
    text-align: center; white-space: nowrap;
    color: #ff5a5a; background: rgba(26, 0, 0, .8);
    border: 1.5px solid rgba(255, 59, 59, .9);
    box-shadow: 0 0 24px rgba(255, 40, 40, .5), inset 0 0 18px rgba(255, 40, 40, .18);
}
#screen-games .game-item.is-update .game-lock span {
    color: #f9b5cc; background: rgba(30, 22, 0, .82);
    border-color: rgba(255, 196, 60, .92);
    box-shadow: 0 0 24px rgba(255, 196, 60, .45), inset 0 0 18px rgba(255, 196, 60, .16);
}
#screen-games .game-item.is-update .game-cover,
#screen-games .game-item.is-update .rk-cover { filter: grayscale(.5) brightness(.5); }
#screen-games .game-item.is-update .game-meta { opacity: .72; }

#screen-games .game-item.is-soon .game-meta { opacity: .55; }
#screen-games .game-item.is-soon { cursor: default; }

/* карточка без картинки — честная заглушка */
#screen-games .game-item.no-cover .game-cover {
    background: repeating-linear-gradient(45deg, #15121f, #15121f 10px, #1b1729 10px, #1b1729 20px);
}
#screen-games .game-item.no-cover::first-line { color: transparent; }
#screen-games .game-item.no-cover .game-meta span::before { content: "НЕТ КАРТИНКИ · "; color: #ff9d9d; }


/* ── Обложки карточек из их слоёв (rocket-app) ───────────────────────────────
   У них карточка собрана из отдельных webp: фон, герой, заголовок, мелочь.
   Слои «живут»: фон медленно дышит, мелочь плавает, при нажатии всё
   подпрыгивает — как в их приложении. */
#screen-games .game-item .rk-cover {
    position: absolute; inset: 0; overflow: hidden;
}
#screen-games .game-item .rk-cover .rk-l {
    position: absolute;
    pointer-events: none;
    user-select: none;
    will-change: transform;
}
/* фон — на всю карточку */
#screen-games .game-item .rk-cover .rk-bg {
    inset: 0; width: 100%; height: 100%;
    object-fit: cover;
    animation: rk-breathe 9s ease-in-out infinite;
}
@keyframes rk-breathe {
    0%, 100% { transform: scale(1.02); }
    50%      { transform: scale(1.08); }
}
/* заголовок и подписи — по центру-низу */
#screen-games .game-item .rk-cover .rk-l-title {
    left: 8%; right: 8%; bottom: 18%; width: 84%;
    object-fit: contain;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .55));
}
#screen-games .game-item .rk-cover .rk-l-subtitle,
#screen-games .game-item .rk-cover .rk-l-caption,
#screen-games .game-item .rk-cover .rk-l-desc {
    left: 8%; right: 8%; bottom: 8%; width: 84%;
    object-fit: contain; opacity: .9;
}
/* герой и мелочь плавают */
#screen-games .game-item .rk-cover .rk-l-hero {
    inset: 4% 4% auto 4%; width: 92%;
    animation: rk-float 6s ease-in-out infinite;
}
#screen-games .game-item .rk-cover .rk-l-coin-1,
#screen-games .game-item .rk-cover .rk-l-coin-2,
#screen-games .game-item .rk-cover .rk-l-coin-3,
#screen-games .game-item .rk-cover .rk-l-gem-1,
#screen-games .game-item .rk-cover .rk-l-gem-2,
#screen-games .game-item .rk-cover .rk-l-lantern {
    width: 18%;
    animation: rk-float 5s ease-in-out infinite;
}
#screen-games .game-item .rk-cover .rk-l-coin-1   { left: 10%; top: 18%; animation-delay: -.4s; }
#screen-games .game-item .rk-cover .rk-l-coin-2   { right: 12%; top: 26%; width: 14%; animation-delay: -1.2s; }
#screen-games .game-item .rk-cover .rk-l-coin-3   { left: 26%; bottom: 30%; width: 12%; animation-delay: -2s; }
#screen-games .game-item .rk-cover .rk-l-gem-1    { right: 18%; bottom: 34%; width: 13%; animation-delay: -.8s; }
#screen-games .game-item .rk-cover .rk-l-gem-2    { left: 14%; top: 44%; width: 11%; animation-delay: -1.6s; }
#screen-games .game-item .rk-cover .rk-l-lantern  { right: 8%; top: 12%; width: 12%; animation-delay: -2.4s; }
@keyframes rk-float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50%      { transform: translateY(-6px) rotate(-1.5deg); }
}
/* «семёрки» в слотах — лёгкое покачивание */
#screen-games .game-item .rk-cover .rk-l-seven-left,
#screen-games .game-item .rk-cover .rk-l-seven-middle,
#screen-games .game-item .rk-cover .rk-l-seven-right {
    width: 26%; top: 12%;
    animation: rk-spin-slot 4.5s ease-in-out infinite;
}
#screen-games .game-item .rk-cover .rk-l-seven-left   { left: 6%;  animation-delay: 0s; }
#screen-games .game-item .rk-cover .rk-l-seven-middle { left: 37%; animation-delay: .25s; }
#screen-games .game-item .rk-cover .rk-l-seven-right  { right: 6%; animation-delay: .5s; }
@keyframes rk-spin-slot {
    0%, 100% { transform: translateY(0); }
    45%      { transform: translateY(-4px); }
    55%      { transform: translateY(2px); }
}
/* арена: ракета уезжает и возвращается */
#screen-games .game-item .rk-cover .rk-l-rocket {
    width: 46%; right: 6%; top: 12%;
    animation: rk-rocket 7s ease-in-out infinite;
}
@keyframes rk-rocket {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50%      { transform: translate(-10px, -8px) rotate(-4deg); }
}
/* рука/глаз апгрейда */
#screen-games .game-item .rk-cover .rk-l-arm {
    width: 40%; right: 4%; top: 10%;
    animation: rk-float 6.5s ease-in-out infinite;
}
#screen-games .game-item .rk-cover .rk-l-eye {
    width: 16%; left: 12%; top: 16%;
    animation: rk-float 4.5s ease-in-out infinite reverse;
}
/* ── Обложки-картинки (их mode-арт и их анимированные превью) ─────────────────
   Мины, Плинко, Напёрстки, Фортуна — их квадратные mode-обложки из приложения;
   Краш, Рейс, Блэкджек, Скретч, Коровка, Мерж, Прыгун — их же анимированные
   превью (animated WebP) из витрины игр. Кроп по центру, без искажений. */
#screen-games .game-item .rk-cover .rk-art {
    position: absolute; inset: 0; display: block;
    width: 100%; height: 100%;
    object-fit: cover; object-position: center;
    pointer-events: none; user-select: none;
}

/* ── PICKAXE DROP: их mode-арт один в один ───────────────────────────────────
   Слои, проценты и keyframes сняты с их CSS-модуля PickaxeDropModeArt
   (сцена 167×167). Кирка бьёт раз в 3 с: замах → удар на 40 % → отдача,
   в момент удара вспышка, мелкий камень отлетает, сцена «толкается». */
#screen-games .game-item .rk-pix {
    position: absolute; left: 50%; top: 50%;
    width: 100%; aspect-ratio: 1 / 1;
    transform: translate(-50%, -50%);
    background: #00030d;
}
#screen-games .game-item .rk-pix img,
#screen-games .game-item .rk-pix i {
    position: absolute; display: block;
    pointer-events: none; user-select: none;
}
#screen-games .game-item .rk-pix__bg {
    inset: 0; width: 100%; height: 100%;
    transform-origin: 57.485% 51.497%;
    will-change: transform;
    animation: rk-pix-scene 3s infinite;
}
#screen-games .game-item .rk-pix__flash {
    left: 21.557%; top: 15.569%; width: 71.856%; height: 71.856%;
    border-radius: 50%;
    background: radial-gradient(closest-side, rgba(240, 255, 170, .95) 0%, rgba(239, 2, 203, .7) 32%, rgba(120, 230, 0, .22) 62%, rgba(120, 230, 0, 0) 100%);
    opacity: 0; will-change: transform, opacity;
    animation: rk-pix-flash 3s infinite;
}
#screen-games .game-item .rk-pix__rock2 {
    left: 4.192%; top: 62.874%; width: 37.725%; height: 25.150%;
    transform-origin: 50% 100%; will-change: transform;
    animation: rk-pix-rockhop 3s infinite;
}
#screen-games .game-item .rk-pix__rockkick {
    left: 67.066%; top: 22.755%; width: 19.162%; height: 19.760%;
    will-change: transform;
    animation: rk-pix-rockkick 3s infinite;
}
#screen-games .game-item .rk-pix__rockkick img {
    inset: 0; width: 100%; height: 100%;
    will-change: transform;
    animation: rk-pix-rockfloat 4.3s ease-in-out infinite;
}
#screen-games .game-item .rk-pix__axe {
    left: 0; top: 0; width: 62.275%; height: 50.299%;
    transform-origin: 8.654% 90.476%; will-change: transform;
    animation: rk-pix-axe 3s infinite;
}
#screen-games .game-item .rk-pix__shade {
    left: 0; right: 0; bottom: 0; height: 46%;
    background: linear-gradient(to top, rgba(0, 3, 13, .92) 0%, rgba(0, 3, 13, .78) 30%, rgba(0, 3, 13, .4) 62%, rgba(0, 3, 13, 0) 100%);
}
@keyframes rk-pix-axe {
    0%   { animation-timing-function: cubic-bezier(.37, 0, .63, 1); transform: translate(0) rotate(0); }
    30%  { animation-timing-function: cubic-bezier(.55, 0, 1, .45); transform: translateY(4%) rotate(-4deg); }
    40%  { animation-timing-function: cubic-bezier(.33, 1, .68, 1); transform: translate(0) rotate(8deg); }
    48%  { animation-timing-function: cubic-bezier(.37, 0, .63, 1); transform: translate(0) rotate(4.5deg); }
    to   { transform: translate(0) rotate(0); }
}
@keyframes rk-pix-flash {
    0%, 40% { opacity: 0; animation-timing-function: cubic-bezier(.33, 1, .68, 1); transform: scale(.4); }
    44%     { opacity: 1; animation-timing-function: cubic-bezier(.37, 0, .63, 1); transform: scale(1); }
    62%     { opacity: 0; transform: scale(1.3); }
    to      { opacity: 0; transform: scale(.4); }
}
@keyframes rk-pix-scene {
    0%, 40% { animation-timing-function: cubic-bezier(.33, 1, .68, 1); transform: scale(1); }
    44%     { animation-timing-function: cubic-bezier(.37, 0, .63, 1); transform: scale(1.035); }
    58%, to { transform: scale(1); }
}
@keyframes rk-pix-rockkick {
    0%, 40% { animation-timing-function: cubic-bezier(.33, 1, .68, 1); transform: translate(0) rotate(0); }
    50%     { animation-timing-function: cubic-bezier(.37, 0, .63, 1); transform: translate(16%, -22%) rotate(16deg); }
    80%, to { transform: translate(0) rotate(0); }
}
@keyframes rk-pix-rockfloat {
    0%, to { transform: translateY(0) rotate(0); }
    50%    { transform: translateY(-6%) rotate(-3deg); }
}
@keyframes rk-pix-rockhop {
    0%, 40% { animation-timing-function: cubic-bezier(.33, 1, .68, 1); transform: translateY(0) rotate(0); }
    46%     { animation-timing-function: cubic-bezier(.32, 0, .67, 0); transform: translateY(-10%) rotate(-3deg); }
    53%     { animation-timing-function: cubic-bezier(.33, 1, .68, 1); transform: translateY(0) rotate(0); }
    57%     { animation-timing-function: cubic-bezier(.32, 0, .67, 0); transform: translateY(-3%) rotate(0); }
    61%, to { transform: translateY(0) rotate(0); }
}
@media (prefers-reduced-motion: reduce) {
    #screen-games .game-item .rk-pix * { animation: none !important; }
}

/* нажатие — вся карточка «пружинит» */
#screen-games .game-item:active .rk-cover { transform: scale(1.04); transition: transform .18s ease; }
/* без анимаций для тех, кто просил меньше движения */
@media (prefers-reduced-motion: reduce) {
    #screen-games .game-item .rk-cover * { animation: none !important; }
}


/* их текстовые слои дублируют наши подписи (КЕЙСЫ, СЛОТЫ, АПГРЕЙД) — прячем,
   оставляем арт: фон, герой, монеты/камни. Название пишем своим шрифтом. */
#screen-games .game-item .rk-cover .rk-l-title,
#screen-games .game-item .rk-cover .rk-l-subtitle,
#screen-games .game-item .rk-cover .rk-l-caption,
#screen-games .game-item .rk-cover .rk-l-desc,
#screen-games .game-item .rk-cover .rk-l-button { display: none !important; }


/* ── Верхний ряд плиток и широкий баннер — как у них ───────────────────────── */
#screen-games .rk-tiles {
    display: grid; grid-template-columns: 1.15fr repeat(4, 1fr);
    gap: 8px; padding: 12px 12px 0;
}
#screen-games .rk-tile {
    position: relative; overflow: hidden; border-radius: 16px;
    background: #14121c; border: 1px solid rgba(255, 255, 255, .08);
    aspect-ratio: 1 / 1.12; display: flex; flex-direction: column;
    align-items: center; justify-content: flex-end; padding: 6px;
    cursor: pointer;
}
#screen-games .rk-tile img { width: 84%; object-fit: contain; margin-bottom: 4px; }
#screen-games .rk-tile__price { font-size: 10.5px; font-weight: 800; color: #fff; opacity: .92; }
#screen-games .rk-tile--live {
    background: linear-gradient(160deg, #1b2410, #0f130a);
    border-color: rgba(182, 255, 92, .35);
    justify-content: center; gap: 10px;
}
#screen-games .rk-tile__live {
    font-size: 11px; font-weight: 900; letter-spacing: .4px; color: #ffffff;
    background: linear-gradient(135deg, #f236ea, #ef02cb);
    padding: 4px 8px; border-radius: 99px;
}
#screen-games .rk-tile__best { font-size: 11.5px; font-weight: 800; color: #cfd8e8; }

#screen-games .rk-banner {
    position: relative; margin: 10px 12px 0; border-radius: 20px; overflow: hidden;
    aspect-ratio: 16 / 7.4; cursor: pointer;
    border: 1px solid rgba(255, 255, 255, .1);
    box-shadow: 0 12px 30px rgba(0, 0, 0, .5);
}
#screen-games .rk-banner img { position: absolute; pointer-events: none; }
#screen-games .rk-banner__bg {
    inset: 0; width: 100%; height: 100%; object-fit: cover;
    animation: rk-breathe 10s ease-in-out infinite;
}
#screen-games .rk-banner__pepe {
    right: 2%; bottom: -4%; width: 46%;
    animation: rk-float 6s ease-in-out infinite;
}
#screen-games .rk-banner__title { left: 5%; top: 18%; width: 42%; }
#screen-games .rk-banner__sub   { left: 5%; top: 46%; width: 40%; }
#screen-games .rk-banner__badge { right: 6%; top: 6%; width: 15%; animation: rk-float 4.5s ease-in-out infinite; }
#screen-games .rk-banner__price { left: 5%; bottom: 12%; width: 17%; }
#screen-games .rk-banner__ghost { left: 46%; top: 8%; width: 8%; animation: rk-float 7s ease-in-out infinite reverse; }
#screen-games .rk-banner__spider { right: 26%; top: 4%; width: 6%; animation: rk-float 5.5s ease-in-out infinite; }




/* ── Скелет главного экрана: как у них на любом телефоне ──────────────────── */
#screen-games .game-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px;
    padding: 12px;
}
#screen-games .rk-tiles {
    display: grid !important;
    grid-template-columns: minmax(0, 0.95fr) repeat(4, minmax(0, 1fr)) !important;
    gap: 7px;
    padding: 12px 12px 0;
}
/* на узком экране не ломаем сетку — просто мельче отступы и шрифт */
@media (max-width: 400px) {
    #screen-games .game-grid { gap: 9px; padding: 9px; }
    #screen-games .rk-tiles { gap: 5px; padding: 9px 9px 0; }
    #screen-games .rk-tile { border-radius: 13px; padding: 4px; }
    #screen-games .rk-tile__price { font-size: 9px; }
    #screen-games .rk-tile__live { font-size: 9px; padding: 3px 6px; }
    #screen-games .rk-tile__best { font-size: 10px; }
    #screen-games .rk-banner { margin: 8px 9px 0; }
    #screen-games .game-item { border-radius: 16px; }
    #screen-games .game-item .game-meta { padding: 9px 9px 10px; }
    #screen-games .game-item .game-meta h3 { font-size: 14.5px; }
    #screen-games .game-item .game-meta span { font-size: 10.5px; }
    #screen-games .game-item .badge { font-size: 8.5px; padding: 2px 6px; top: 7px; right: 7px; }
}
/* совсем узкий — карточки остаются в два столбца, но компактнее */
@media (max-width: 340px) {
    #screen-games .game-grid { gap: 7px; padding: 7px; }
    #screen-games .game-item .game-meta h3 { font-size: 13px; }
    #screen-games .game-item .game-meta span { display: none; }
}


/* ── Точные размеры с их экрана (замеры Playwright, 390×844) ────────────────
   карточки 173×173, зазор 12, поля 16, баннер 358×177, меню 56 */
#screen-games .game-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
    padding: 0 16px 16px !important;
}
#screen-games .game-item {
    aspect-ratio: 1 / 1 !important;      /* у них карточки квадратные */
    border-radius: 18px;
}
#screen-games .rk-tiles {
    padding: 16px 16px 10px !important;
    gap: 12px !important;
}
#screen-games .rk-banner {
    margin: 0 16px 12px !important;
    aspect-ratio: 358 / 177 !important;  /* их пропорция */
    border-radius: 18px;
}
@media (max-width: 400px) {
    #screen-games .game-grid { gap: 10px !important; padding: 0 14px 14px !important; }
    #screen-games .rk-tiles { padding: 14px 14px 8px !important; gap: 9px !important; }
    #screen-games .rk-banner { margin: 0 14px 10px !important; }
}


/* ── Карусель баннеров — их slick-слайдер (358×178, радиус 15, автопрокрутка) ─ */
#screen-games .rk-carousel {
    display: flex; gap: 12px; margin: 16px 16px 12px;
    overflow-x: auto; scroll-snap-type: x mandatory;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
#screen-games .rk-carousel::-webkit-scrollbar { display: none; }
#screen-games .rk-slide { flex: 0 0 100%; scroll-snap-align: center; }
#screen-games .rk-b {
    position: relative; overflow: hidden; border-radius: 15px;
    width: 100%; height: 178px; cursor: pointer;
    border: 1px solid rgba(255, 255, 255, .08);
    box-shadow: 0 10px 24px rgba(0, 0, 0, .45);
}
#screen-games .rk-b img { position: absolute; pointer-events: none; }
#screen-games .rk-b__background {
    inset: 0; width: 100%; height: 100%; object-fit: cover;
    animation: rk-breathe 10s ease-in-out infinite;
}
/* halloween */
#screen-games .rk-b__pepe   { right: 2%; bottom: -6%; width: 46%; animation: rk-float 6s ease-in-out infinite; }
#screen-games .rk-b__title-limited { left: 5%; top: 14%; width: 42%; }
#screen-games .rk-b__title-halloween { left: 5%; top: 40%; width: 40%; }
#screen-games .rk-b__badge-new { right: 6%; top: 6%; width: 15%; animation: rk-float 4.5s ease-in-out infinite; }
#screen-games .rk-b__price { left: 5%; bottom: 10%; width: 16%; }
#screen-games .rk-b__ghost-1 { left: 45%; top: 8%; width: 8%; animation: rk-float 7s ease-in-out infinite reverse; }
#screen-games .rk-b__spider { right: 27%; top: 4%; width: 6%; animation: rk-float 5.5s ease-in-out infinite; }
/* cash-farming */
#screen-games .rk-b__hero { right: 0; bottom: 0; width: 52%; animation: rk-float 6s ease-in-out infinite; }
#screen-games .rk-b__bird { left: 8%; bottom: 8%; width: 16%; animation: rk-float 5s ease-in-out infinite reverse; }
#screen-games .rk-b__title-stars { left: 6%; top: 16%; width: 44%; }
#screen-games .rk-b__title-farming { left: 6%; top: 38%; width: 44%; }
#screen-games .rk-b__tagline { left: 6%; bottom: 10%; width: 40%; }
#screen-games .rk-b__tagline-rocket { left: 6%; bottom: 4%; width: 26%; }
/* creators */
/* sbp */
#screen-games .rk-b__title { left: 6%; top: 16%; width: 46%; }
#screen-games .rk-b__logo { right: 10%; top: 14%; width: 18%; }
#screen-games .rk-b__percent-20 { right: 12%; top: 40%; width: 16%; animation: rk-float 5s ease-in-out infinite; }
#screen-games .rk-b__props { right: 4%; bottom: 4%; width: 24%; }
#screen-games .rk-b__bonus { left: 8%; bottom: 12%; width: 30%; }

/* ритм их экрана: шапка 70, пилюля 54, плитки 80, баннер 178, меню 56 */
#screen-games .rk-tiles { min-height: 80px; }
#screen-games .rk-tile { border-radius: 14px; }
#screen-games .game-item { border-radius: 16px; }


/* ── Карточки без их арта: вместо заглушки-спрайта — большая надпись ───────── */
#screen-games .game-item:not(:has(.rk-cover)) .game-cover { display: none !important; }
#screen-games .game-item:not(:has(.rk-cover)) {
    background:
        repeating-linear-gradient(45deg, #15121f, #15121f 12px, #1a1626 12px, #1a1626 24px);
}
#screen-games .game-item:not(:has(.rk-cover)):not(.is-soon)::before {
    content: "НЕТ КАРТИНКИ";
    position: absolute; inset: 0; z-index: 1;
    display: flex; align-items: center; justify-content: center;
    text-align: center; padding: 0 10px;
    font-size: 19px; font-weight: 900; letter-spacing: 1.2px;
    color: rgba(255, 255, 255, .26);
    text-shadow: 0 2px 12px rgba(0, 0, 0, .6);
}
#screen-games .game-item:not(:has(.rk-cover)) .game-meta { z-index: 2; }

/* ── Шрифты и тени карточек под их вид ─────────────────────────────────────── */
#screen-games .game-item {
    box-shadow: 0 10px 26px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 255, 255, .05);
}
#screen-games .game-item .game-meta h3 {
    font-size: 16px; font-weight: 900; letter-spacing: .2px; line-height: 1.12;
    text-transform: uppercase;
}
#screen-games .game-item .game-meta span {
    font-size: 11.5px; font-weight: 500; color: rgba(255, 255, 255, .74);
}
@media (max-width: 340px) {
    #screen-games .game-item:not(:has(.rk-cover)):not(.is-soon)::before { font-size: 15px; }
}


/* ── Карточки как у них: арт на всю карточку, текст только наш снизу ───────── */
#screen-games .game-item .rk-cover--plain {
    background:
        radial-gradient(120% 90% at 70% 20%, rgba(124, 77, 255, .55), transparent 60%),
        radial-gradient(90% 80% at 20% 90%, rgba(255, 77, 157, .35), transparent 60%),
        #14101f;
}
/* заглушка без полос: мягкая тёмная виньетка, как у них пустые блоки */
#screen-games .game-item:not(:has(.rk-cover)) {
    background:
        radial-gradient(120% 100% at 50% 0%, rgba(124, 77, 255, .18), transparent 65%),
        radial-gradient(100% 90% at 50% 100%, rgba(255, 77, 157, .12), transparent 60%),
        #100d18;
}
#screen-games .game-item:not(:has(.rk-cover)):not(.is-soon)::before {
    font-size: 20px; letter-spacing: 1.6px;
    color: rgba(255, 255, 255, .3);
}
/* название и подпись — ровно как у них: крупно, белым, без капслока у подписи */
#screen-games .game-item .game-meta h3 {
    text-transform: none;
    font-size: 17px; font-weight: 800;
}


/* `title.webp` у разных игр — то надпись, то сам арт. Там, где это арт
   (PICKAXE DROP), оставляем его видимым: иначе карточка пустая. */
#screen-games .game-item .rk-cover .rk-l-title { display: none !important; }
#screen-games .game-item .rk-cover.rk-keep-title .rk-l-title {
    display: block !important;
    inset: 6% 6% auto 6%; width: 88%;
    filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .55));
}


/* их title.webp = кирка + английская надпись; надпись отрезаем клипом */
#screen-games .game-item .rk-cover.rk-keep-title .rk-l-title {
    inset: 5% 5% auto 5%; width: 90%; height: auto;
    object-fit: contain; object-position: 50% 0;
    filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .5));
}


/* карточки из modes: арт приближен, чтобы заполнял карточку как у них */
#screen-games .game-item .rk-cover .rk-l-background { transform: scale(1.14); }
#screen-games .game-item .rk-cover .rk-l-axe   { width: 68%; top: 0; }
#screen-games .game-item .rk-cover .rk-l-rock1 { width: 42%; bottom: 8%; }
#screen-games .game-item .rk-cover .rk-l-rock2 { width: 46%; bottom: 4%; }

/* ══ Топы: пьедестал как у них — их свет и их 3D-столбы ═══════════════════════
   У них пьедестал — одна картинка (leaderboard_bg, 786×542): три 3D-блока со
   скошенными верхними углами, светлая «крышка» сверху (трапеция), тело уходит
   из оливкового #414C17 в чёрный #080A04, за ними лимонный свет #ef02cb.
   Их косяк — левый столб нарисован поверх среднего; здесь столбы в сетке.
   Свет: у .page overflow-y:auto (то есть и по X режется), поэтому свет
   гасим маской — он уходит за края экрана, а не обрубается по границе. */
.lb-pod { position: relative; padding-top: 18px; }
.lb-pod::before {
    content: ""; position: absolute; z-index: 0; pointer-events: none;
    left: -30%; right: -30%; top: -60px; bottom: -6px;
    background:
        radial-gradient(38% 44% at 50% 40%, rgba(239, 2, 203, .38), rgba(239, 2, 203, .14) 54%, rgba(239, 2, 203, 0) 76%),
        radial-gradient(24% 32% at 92% 62%, rgba(239, 2, 203, .18), rgba(239, 2, 203, 0) 74%),
        radial-gradient(20% 26% at 6% 66%, rgba(239, 2, 203, .12), rgba(239, 2, 203, 0) 76%);
    -webkit-mask-image: radial-gradient(112% 100% at 50% 42%, #000 44%, rgba(0, 0, 0, .5) 68%, transparent 100%);
    mask-image: radial-gradient(112% 100% at 50% 42%, #000 44%, rgba(0, 0, 0, .5) 68%, transparent 100%);
}

/* сам столб — цвет по медали: золото / серебро / бронза (ALT-PODMEDAL, 25.11.2026)
   Раньше все три столба были зелёными (#414c17…) — вернул цвет медалек и убрал
   «квадрат»-крышку, которая перекрывала пьедестал. */
.lb-pod__pedestal {
    position: relative; z-index: 1;
    flex: 0 0 auto; align-self: stretch;
    border-radius: 14px 14px 4px 4px;
    border: 1px solid transparent;
    --pod-top: #cfd6e4; --pod-mid: #8a93a6; --pod-low: #3a4150; --pod-glow: rgba(255,255,255,.55);
    background:
        linear-gradient(180deg, var(--pod-top) 0%, var(--pod-mid) 30%, var(--pod-low) 70%, #0a0c12 100%) padding-box,
        linear-gradient(180deg, var(--pod-glow), rgba(255,255,255,.10) 45%, rgba(255,255,255,.03) 100%) border-box;
    box-shadow:
        inset 0 2px 0 rgba(255,255,255,.35),
        inset 6px 0 14px -12px var(--pod-glow),
        inset -10px 0 18px -14px rgba(0,0,0,.9),
        0 16px 30px -14px rgba(0,0,0,.8);
    padding: 14px 8px 14px;
}
.lb-pod__item--1 .lb-pod__pedestal {
    --pod-top: #f6d465; --pod-mid: #d4a72c; --pod-low: #6b4a10; --pod-glow: rgba(255,220,120,.7);
    background:
        linear-gradient(180deg, var(--pod-top) 0%, var(--pod-mid) 30%, var(--pod-low) 70%, #0a0c12 100%) padding-box,
        linear-gradient(180deg, var(--pod-glow), rgba(255,255,255,.10) 45%, rgba(255,255,255,.03) 100%) border-box;
    border-color: rgba(255,220,120,.6);
}
.lb-pod__item--3 .lb-pod__pedestal {
    --pod-top: #e0a06a; --pod-mid: #b5743a; --pod-low: #5e3616; --pod-glow: rgba(255,190,120,.6);
    background:
        linear-gradient(180deg, var(--pod-top) 0%, var(--pod-mid) 30%, var(--pod-low) 70%, #0a0c12 100%) padding-box,
        linear-gradient(180deg, var(--pod-glow), rgba(255,255,255,.10) 45%, rgba(255,255,255,.03) 100%) border-box;
    border-color: rgba(255,190,120,.5);
}
/* крышка-трапеция в цвет медали (тонкая, контент не перекрывает) */
.lb-pod__pedestal::after,
.lb-pod__item--1 .lb-pod__pedestal::after {
    content: ""; position: absolute; z-index: 0; pointer-events: none;
    left: -1px; right: -1px; top: -11px; height: 13px;
    clip-path: polygon(11% 0, 89% 0, 100% 100%, 0 100%);
    background: linear-gradient(180deg, var(--pod-mid), var(--pod-low));
    box-shadow: inset 0 1px 0 var(--pod-glow);
}
.lb-pod__pedestal::before,
.lb-pod__item--1 .lb-pod__pedestal::before {
    content: ""; position: absolute; z-index: 1; pointer-events: none;
    inset: 0 0 auto 0; height: 3px; border-radius: 4px 4px 0 0;
    background: linear-gradient(180deg, var(--pod-glow), rgba(255,255,255,0));
}
.lb-pod__item--1 .lb-pod__pedestal { min-height: 132px; padding: 16px 8px 16px; }
.lb-pod__pedestal { margin-top: 16px; }
.lb-pod__item--2 .lb-pod__pedestal { min-height: 96px; }
.lb-pod__item--3 .lb-pod__pedestal { min-height: 76px; }

/* приз на столбе: наша логика (подарок + «Приз» + цена), но обводка чище —
   тонкая градиентная кромка и подсветка сверху вместо белого гало */
.lb-pod .lb-prize {
    z-index: 2;
    border: 1px solid transparent;
    background:
        linear-gradient(180deg, rgba(26, 29, 16, .82) 0%, rgba(11, 12, 7, .92) 100%) padding-box,
        linear-gradient(180deg,
            rgba(255, 255, 255, .82) 0%,
            rgba(255, 255, 255, .30) 38%,
            rgba(255, 255, 255, .10) 100%) border-box;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .34),
        0 0 18px rgba(255, 255, 255, .10),
        0 10px 20px -10px rgba(0, 0, 0, .85);
}
.lb-pod__item--1 .lb-prize { padding: 12px 13px 9px; }

/* подарок покачивается, как у них: 3 с, вверх на 6 px, задержки 0 / .5 / 1 с */
@keyframes lb-pod-bob {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-6px); }
}
.lb-pod .lb-gift,
.lb-pod .lb-prize .lb-gift {
    animation: lb-pod-bob 3s ease-in-out infinite;
    will-change: transform;
}
.lb-pod__item--1 .lb-gift { animation-delay: 0s; }
.lb-pod__item--2 .lb-gift { animation-delay: .5s; }
.lb-pod__item--3 .lb-gift { animation-delay: 1s; }
@media (prefers-reduced-motion: reduce) {
    .lb-pod .lb-gift, .lb-pod .lb-prize .lb-gift { animation: none; }
}

/* `hidden` у своей строки не срабатывал: авторский display:flex перебивал
   атрибут, и под табами висела пустая розовая плашка */
#screen-tops .lb-mypos[hidden] { display: none !important; }

/* ── LIVE-лента дропов (перенос их блока LiveDrops из экрана игр) ────────────
   Их разметка и метрики: контейнер 14 px радиус, слева две кнопки LIVE/BEST
   52×33, справа лента карточек 64×70 с подарком 48 px, подписью и полоской.
   Цвет карточки — по цене дропа (их шкала):
     ≥ 50 000 — золото #f5b83d, ≥ 10 000 — фиолет #b26bff,
     ≥ 2 000 — синий #3da9ff, ≥ 500 — зелёный #2ee59d, остальное — серый #9aa3ad.
   Подпись меняется на цену их же анимацией: 6.7 с, вторая подпись со сдвигом
   −3350 мс (LiveDrops-module__label). */
.live-drops {
    display: flex; align-items: center; gap: 4px;
    margin: 10px 12px 0;
    padding: 4px 4px 4px 8px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, .07);
    background: linear-gradient(90deg, #16171d, #101116);
    overflow: hidden;
    min-height: 79px;
}
.live-drops__modes { display: flex; flex-direction: column; gap: 4px; flex: none; }
.live-drops__mode {
    width: 52px; height: 33px; padding: 0;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    border-radius: 11px; border: 1px solid rgba(255, 255, 255, .07);
    background: #14151a; color: rgba(255, 255, 255, .62);
    font-size: 10px; font-weight: 800; line-height: 11px; letter-spacing: .4px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06);
    cursor: pointer;
}
.live-drops__mode img { width: 12px; height: 12px; display: block; }
.live-drops__mode.is-active {
    border-color: transparent;
    background: linear-gradient(180deg, #f236ea, #ef02cb);
    color: #ffffff;
    box-shadow: 0 2px 12px rgba(239, 2, 203, .40), inset 0 1px 0 rgba(255, 255, 255, .6);
}
.live-drops__track {
    flex: 1 1 auto; min-width: 0;
    display: flex; gap: 4px;
    overflow-x: auto; overflow-y: hidden;
    padding-right: 4px;
    scrollbar-width: none; -ms-overflow-style: none;
}
.live-drops__track::-webkit-scrollbar { display: none; }
.live-drops__card {
    position: relative; flex: none;
    width: 64px; height: 70px;
    border-radius: 11px;
    border: 1px solid rgba(255, 255, 255, .06);
    background: linear-gradient(180deg, var(--tier-42, rgba(154, 163, 173, .42)), var(--tier-02, rgba(154, 163, 173, .02)));
    overflow: hidden;
}
.live-drops__card img {
    position: absolute; top: 1px; left: 7px;
    width: 48px; height: 48px; object-fit: contain;
}
.live-drops__labels {
    position: absolute; top: 51px; left: 4px; right: 4px; height: 11px;
    overflow: hidden;
}
.live-drops__label {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center; gap: 2px;
    font-size: 9px; font-weight: 600; line-height: 1; white-space: nowrap;
    color: rgba(255, 255, 255, .92);
    animation: ld-label 6.7s linear infinite both;
}
.live-drops__label span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
/* ALT-LIVESTAR (14.11.2026): звезда в подписи цены наследовала правило
   `.live-drops__card img` (position:absolute; top:1px; left:7px) — из-за этого она висела
   поверх первой цифры суммы («⭐9 479» вместо «29 479»). Возвращаем её в поток подписи. */
.live-drops__label img {
    position: static; top: auto; left: auto;
    width: 9px; height: 9px; flex: none; object-fit: contain;
}
.live-drops__label.is-value { animation: none; }
.live-drops__label.is-value span { font-weight: 700; }
.live-drops__label:nth-child(2) { animation-delay: -3350ms; }
.live-drops__card i {
    position: absolute; bottom: 1.5px; left: 50%; transform: translateX(-50%);
    width: 26px; height: 2.5px; border-radius: 2px;
    background: currentColor;
    box-shadow: 0 0 6px currentColor;
}
@keyframes ld-label {
    0%      { opacity: 1; transform: translateY(0); }
    44.776% { opacity: 1; animation-timing-function: cubic-bezier(.4, 0, .2, 1); transform: translateY(0); }
    50%     { opacity: 0; transform: translateY(-100%); }
    50.001% { opacity: 0; transform: translateY(100%); }
    94.776% { opacity: 0; animation-timing-function: cubic-bezier(.4, 0, .2, 1); transform: translateY(100%); }
    to      { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
    .live-drops__label { animation: none; }
    .live-drops__label:nth-child(2) { display: none; }
}

/* ── «Друзья» → меню и вкладка «Партнёры» (перенос их /friends из RocketX) ───
   Их метрики: карточки статистики — фон rgba(21,22,27,.4) + блюр 30 px,
   радиус 14.7 px, число 36 px жирное с градиентом белый→лимонный, подпись
   14 px opacity .4, водяной знак бренда на фоне; правила — плашка радиус 13 px,
   блюр 60 px, заголовок 20 px, текст 14 px #919191. */
.fr { display: flex; flex-direction: column; gap: 12px; }
.fr-menu {
    display: flex; gap: 4px; padding: 4px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, .07);
    background: linear-gradient(90deg, #16171d, #101116);
}
.fr-menu__tab {
    flex: 1 1 0; height: 36px; padding: 0 10px;
    border-radius: 11px; border: 1px solid transparent;
    background: transparent; color: rgba(255, 255, 255, .6);
    font-size: 12.5px; font-weight: 800; letter-spacing: .3px;
    cursor: pointer;
}
.fr-menu__tab.is-active {
    background: linear-gradient(180deg, #f236ea, #ef02cb);
    color: #ffffff;
    box-shadow: 0 2px 12px rgba(239, 2, 203, .4), inset 0 1px 0 rgba(255, 255, 255, .6);
}
.fr-pane { display: flex; flex-direction: column; gap: 12px; }

/* вкладка «Друзья» — наши прежние цифры */
.fr-sum {
    font-size: 34px; font-weight: 900; line-height: 1.1;
    color: #fff;
}
.fr-sum i { font-style: normal; color: #fff; }
.fr-line { font-size: 13px; color: rgba(255, 255, 255, .62); }
.fr-line b { color: #fff; }

/* вкладка «Партнёры» — их блоки */
.fr-h2 { margin: 2px 0 0; font-size: 18px; font-weight: 800; letter-spacing: -.02em; color: #fff; }
.fr-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fr-stat {
    position: relative; overflow: hidden;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 2px; min-height: 100px; padding: 10px 8px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, .06);
    background: rgba(21, 22, 27, .55);
    -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.fr-stat__wm {
    position: absolute; left: -18px; top: -26px;
    font-size: 76px; line-height: 1; font-weight: 700;
    color: #3b3b3b; opacity: .12; pointer-events: none; user-select: none;
    white-space: nowrap;
}
.fr-stat b {
    position: relative; z-index: 1;
    font-size: 30px; font-weight: 800; line-height: 1.1; text-transform: uppercase;
    color: #fff;
}
.fr-stat b i { font-style: normal; font-size: 20px; color: #fff; }
.fr-stat__cap { position: relative; z-index: 1; font-size: 12.5px; font-weight: 500; color: rgba(255, 255, 255, .42); }

.fr-earn {
    border-radius: 13px; padding: 12px;
    border: 1px solid rgba(255, 255, 255, .06);
    background: #0f120c;
    display: flex; flex-direction: column; gap: 8px;
}
.fr-earn__cap { font-size: 12.5px; font-weight: 700; color: #fff; }
.fr-empty { padding: 14px 10px; text-align: center; font-size: 15px; font-weight: 600; color: #7c8388; }

.fr-rules {
    border-radius: 13px; padding: 12px;
    border: 1px solid rgba(255, 255, 255, .06);
    background: rgba(21, 22, 27, .5);
    -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
}
.fr-rules h3 { margin: 0; font-size: 16px; font-weight: 800; line-height: 1.1; color: #fff; }
.fr-rules p { margin: 6px 0 0; font-size: 13px; line-height: 1.25; color: #919191; }

.fr-btn {
    width: 100%; height: 44px;
    border: 0; border-radius: 14px;
    background: linear-gradient(180deg, #f236ea, #ef02cb);
    color: #ffffff; font-size: 14px; font-weight: 800;
    box-shadow: 0 6px 18px rgba(239, 2, 203, .25), inset 0 1px 0 rgba(255, 255, 255, .5);
    cursor: pointer;
}
.fr-btn--ghost {
    background: rgba(255, 255, 255, .06);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, .1);
    box-shadow: none;
}

/* ── Страница «Друзья»: их вёрстка (RubUP/RocketX), наш цвет ──────────────────
   Их метрики: карточка-герой с цепочкой шагов (кружок 30 px на вертикальной
   линии 2 px, между шагами 12 px), крупный % под цепочкой, строка-галочка,
   строки «Моя ссылка» / промокод с кнопкой справа. Цвета — наши: тёмный
   фиолетово-синий фон, лимонный акцент, розовый второй тон. */
.fr-page {
    /* сверху отступ под круглую кнопку «назад» — иначе она наезжает на заголовок */
    padding: 46px 14px calc(96px + var(--safe-bottom));
    display: flex; flex-direction: column; gap: 12px;
}
.fr-page__title {
    margin: 2px 0 2px -2px;
    font-size: 30px; font-weight: 900; letter-spacing: -.5px; color: #fff;
}

/* герой-карточка */
.fr-hero {
    position: relative; overflow: hidden;
    display: flex; flex-direction: column; gap: 10px;
    padding: 14px 14px 12px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, .08);
    background:
        radial-gradient(120% 90% at 100% 0%, rgba(182, 2, 206, .30), transparent 62%),
        radial-gradient(90% 80% at 0% 100%, rgba(239, 2, 203, .18), transparent 60%),
        linear-gradient(180deg, #1a1730, #131022);
    box-shadow: 0 14px 32px rgba(0, 0, 0, .45);
}
.fr-hero__art {
    position: absolute; right: -6px; top: -6px;
    width: 104px; height: 104px; object-fit: contain;
    filter: drop-shadow(0 8px 18px rgba(0, 0, 0, .5));
    pointer-events: none;
}

/* цепочка шагов */
.fr-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.fr-step { position: relative; display: flex; align-items: flex-start; gap: 10px; padding-right: 96px; }
.fr-step + .fr-step::before {
    content: ""; position: absolute; left: 14px; top: -13px;
    width: 2px; height: 13px; border-radius: 2px;
    background: rgba(255, 255, 255, .16);
}
.fr-step__n {
    flex: none; width: 29px; height: 29px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 900; color: #fff;
    border: 2px solid rgba(255, 255, 255, .22);
    background: linear-gradient(135deg, #b602ce, #ef02cb);
    box-shadow: 0 4px 12px rgba(182, 2, 206, .45);
}
.fr-step--n1 .fr-step__n { background: linear-gradient(135deg, #75027f, #5b2be0); }
.fr-step--n2 .fr-step__n { background: linear-gradient(135deg, #4d8bff, #2b5be0); }
.fr-step--n3 .fr-step__n { background: linear-gradient(135deg, #ff8a3d, #e04b2b); }
.fr-step.is-done .fr-step__n {
    background: linear-gradient(135deg, #f236ea, #ef02cb);
    color: #ffffff; border-color: rgba(255, 255, 255, .55);
    box-shadow: 0 4px 14px rgba(239, 2, 203, .5);
}
.fr-step__body { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.fr-step__body b { font-size: 19px; font-weight: 900; line-height: 1.15; color: #fff; }
.fr-step__body span { font-size: 12px; line-height: 1.3; color: rgba(255, 255, 255, .55); }

/* процент и подпись-галочка */
.fr-pct {
    display: flex; align-items: baseline; gap: 8px;
    margin: 2px 0 0; padding: 9px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .07);
}
.fr-pct b {
    font-size: 19px; font-weight: 900;
    color: #fff;
}
.fr-pct span { font-size: 12px; color: rgba(255, 255, 255, .55); }
.fr-hero__ok {
    display: flex; align-items: center; gap: 7px; margin: 0;
    font-size: 12px; font-weight: 600; color: rgba(255, 255, 255, .55);
}
.fr-hero__ok i { color: #2ee59d; font-style: normal; font-weight: 900; }

/* строки «Моя ссылка» / промокод */
.fr-lines { display: flex; flex-direction: column; gap: 8px; }
.fr-ln {
    display: flex; align-items: center; gap: 10px;
    padding: 11px 12px; border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, .07);
    background: rgba(255, 255, 255, .04);
}
.fr-lt { flex: 1; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.fr-lt b, .fr-lt label { font-size: 13.5px; font-weight: 800; color: #fff; }
.fr-lt small {
    font-size: 12px; font-weight: 600; color: rgba(255, 255, 255, .45);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    -webkit-user-select: all; user-select: all; cursor: text;
}
.fr-input {
    width: 100%; height: 30px; padding: 0 10px;
    border-radius: 9px; border: 1px solid rgba(255, 255, 255, .1);
    background: rgba(0, 0, 0, .35); color: #fff;
    font-size: 13px; font-weight: 700; letter-spacing: .4px;
    text-transform: uppercase; outline: none;
}
.fr-input::placeholder { color: rgba(255, 255, 255, .3); }
.fr-copy {
    flex: none; height: 34px; padding: 0 14px;
    border-radius: 11px; border: 1px solid rgba(255, 255, 255, .12);
    background: rgba(255, 255, 255, .08); color: #fff;
    font-size: 12.5px; font-weight: 800; cursor: pointer;
}
.fr-copy:active { transform: scale(.98); }
.fr-hint { margin: 0; font-size: 12px; color: rgba(255, 255, 255, .45); text-align: center; }

/* ══ «Друзья» — единая страница: стекло + наш стиль (розовый/фиолетовый/чёрный) ══
   Перекрывает предыдущие блоки .fr-* (табы убраны, содержимое сведено в один
   экран). Основа — их вёрстка (RubUP hero + RocketX отчисления), цвет — наш. */
.fr-page {
    padding: 46px 14px calc(96px + var(--safe-bottom));
    display: flex; flex-direction: column; gap: 12px;
    background:
        radial-gradient(90% 45% at 8% 0%, rgba(182, 2, 206, .18), transparent 62%),
        radial-gradient(80% 40% at 100% 12%, rgba(239, 2, 203, .14), transparent 60%);
}
.fr-page__title {
    margin: 0 0 2px -2px;
    font-size: 30px; font-weight: 900; letter-spacing: -.5px; color: #fff;
    text-shadow: 0 0 22px rgba(239, 2, 203, .35);
}
.fr-pane { display: flex; flex-direction: column; gap: 12px; }

/* ── стеклянные карточки ─────────────────────────────────────────────────── */
.fr-hero, .fr-ln, .fr-stat, .fr-earn, .fr-rules {
    position: relative;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, .10);
    background: linear-gradient(180deg, rgba(34, 24, 46, .62), rgba(16, 12, 22, .72));
    -webkit-backdrop-filter: blur(18px) saturate(1.25);
    backdrop-filter: blur(18px) saturate(1.25);
    box-shadow:
        0 10px 28px rgba(0, 0, 0, .45),
        inset 0 1px 0 rgba(255, 255, 255, .12);
}

/* герой */
.fr-hero {
    display: flex; flex-direction: column; gap: 12px;
    padding: 14px 14px 12px; overflow: hidden;
    background:
        radial-gradient(120% 90% at 100% 0%, rgba(182, 2, 206, .34), transparent 62%),
        radial-gradient(90% 80% at 0% 100%, rgba(239, 2, 203, .20), transparent 62%),
        linear-gradient(180deg, rgba(30, 21, 42, .72), rgba(14, 10, 20, .82));
}
.fr-hero__art {
    position: absolute; right: -4px; top: -4px;
    width: 100px; height: 100px; object-fit: contain;
    filter: drop-shadow(0 8px 18px rgba(0, 0, 0, .55));
    pointer-events: none;
}

/* цепочка шагов */
.fr-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.fr-step { position: relative; display: flex; align-items: flex-start; gap: 10px; padding-right: 92px; }
.fr-step + .fr-step::before {
    content: ""; position: absolute; left: 14px; top: -13px;
    width: 2px; height: 13px; border-radius: 2px;
    background: linear-gradient(180deg, rgba(239, 2, 203, .55), rgba(182, 2, 206, .35));
}
.fr-step__n {
    flex: none; width: 29px; height: 29px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 900; color: #fff;
    border: 2px solid rgba(255, 255, 255, .22);
    background: linear-gradient(135deg, #ef02cb, #b02bff);
    box-shadow: 0 4px 14px rgba(176, 43, 255, .45);
}
.fr-step.is-done .fr-step__n {
    background: linear-gradient(135deg, #ff4fd0, #8e2bff);
    border-color: rgba(255, 255, 255, .5);
    box-shadow: 0 4px 16px rgba(255, 79, 208, .55);
}
.fr-step__body { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.fr-step__body b { font-size: 19px; font-weight: 900; line-height: 1.15; color: #fff; }
.fr-step__body span { font-size: 12px; line-height: 1.3; color: rgba(255, 255, 255, .58); }

/* процент и галочка */
.fr-pct {
    display: flex; align-items: baseline; gap: 8px; margin: 0;
    padding: 9px 12px; border-radius: 12px;
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .08);
}
.fr-pct b {
    font-size: 19px; font-weight: 900;
    color: #fff;
}
.fr-pct span { font-size: 12px; color: rgba(255, 255, 255, .58); }
.fr-hero__ok {
    display: flex; align-items: center; gap: 7px; margin: 0;
    font-size: 12px; font-weight: 600; color: rgba(255, 255, 255, .6);
}
.fr-hero__ok i { color: #ff4fd0; font-style: normal; font-weight: 900; }

/* строки «Моя ссылка» / промокод */
.fr-lines { display: flex; flex-direction: column; gap: 8px; }
.fr-ln { display: flex; align-items: center; gap: 10px; padding: 11px 12px; }
.fr-lt { flex: 1; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.fr-lt b, .fr-lt label { font-size: 13.5px; font-weight: 800; color: #fff; }
.fr-lt small {
    font-size: 12px; font-weight: 600; color: rgba(255, 255, 255, .5);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    -webkit-user-select: all; user-select: all; cursor: text;
}
.fr-input {
    width: 100%; height: 32px; padding: 0 10px;
    border-radius: 10px; border: 1px solid rgba(255, 255, 255, .12);
    background: rgba(0, 0, 0, .38); color: #fff;
    font-size: 13px; font-weight: 700; letter-spacing: .4px;
    text-transform: uppercase; outline: none;
}
.fr-input::placeholder { color: rgba(255, 255, 255, .32); }
.fr-copy {
    flex: none; height: 34px; padding: 0 14px;
    border-radius: 11px; border: 1px solid rgba(255, 255, 255, .14);
    background: linear-gradient(180deg, rgba(239, 2, 203, .28), rgba(182, 2, 206, .28));
    color: #fff; font-size: 12.5px; font-weight: 800; cursor: pointer;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18);
}
.fr-copy:active { transform: scale(.98); }

/* плитки итогов */
.fr-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fr-stat {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 2px; min-height: 92px; padding: 10px 8px; overflow: hidden;
}
.fr-stat__wm {
    position: absolute; left: -18px; top: -26px;
    font-size: 72px; line-height: 1; font-weight: 700;
    color: #fff; opacity: .05; pointer-events: none; user-select: none; white-space: nowrap;
}
.fr-stat b {
    position: relative; z-index: 1;
    font-size: 26px; font-weight: 900; line-height: 1.15; text-align: center;
    color: #fff;
}
.fr-stat__cap { position: relative; z-index: 1; font-size: 12.5px; font-weight: 600; color: rgba(255, 255, 255, .45); }
.fr-hint { margin: 0; font-size: 12px; color: rgba(255, 255, 255, .45); text-align: center; }

/* отчисления партнёра */
.fr-earn { padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.fr-earn__cap { font-size: 12.5px; font-weight: 800; letter-spacing: .3px; color: #fff; text-transform: uppercase; }
.fr-rows { display: flex; flex-direction: column; gap: 10px; }
.fr-row { display: flex; align-items: center; gap: 10px; }
.fr-row__ava {
    flex: none; width: 36px; height: 36px; border-radius: 50%; overflow: hidden;
    display: flex; align-items: center; justify-content: center;
    font-size: 15px; font-weight: 900; color: #fff;
    background: linear-gradient(135deg, rgba(239, 2, 203, .55), rgba(182, 2, 206, .55));
    border: 1px solid rgba(255, 255, 255, .16);
}
.fr-row__ava img { width: 100%; height: 100%; object-fit: cover; }
.fr-row__main { flex: 1; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.fr-row__main b { font-size: 13.5px; font-weight: 800; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fr-row__main span { font-size: 11.5px; color: rgba(255, 255, 255, .48); }
.fr-row__right { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; flex: none; }
.fr-row__right b { font-size: 13.5px; font-weight: 900; color: #ff7bdc; white-space: nowrap; }
.fr-row__right span { font-size: 10.5px; color: rgba(255, 255, 255, .38); white-space: nowrap; }
.fr-empty { padding: 14px 10px; text-align: center; font-size: 12.5px; line-height: 1.4; color: rgba(255, 255, 255, .45); }

/* правила */
.fr-rules { padding: 12px; }
.fr-rules h3 { margin: 0; font-size: 15px; font-weight: 800; line-height: 1.15; color: #fff; }
.fr-rules p { margin: 6px 0 0; font-size: 12.5px; line-height: 1.3; color: rgba(255, 255, 255, .5); }

/* главная кнопка — наш градиент */
.fr-btn {
    width: 100%; height: 48px;
    border: 0; border-radius: 16px;
    background: linear-gradient(135deg, #ef02cb, #b602ce);
    color: #fff; font-size: 14.5px; font-weight: 900; letter-spacing: .2px;
    box-shadow: 0 10px 26px rgba(239, 2, 203, .28), inset 0 1px 0 rgba(255, 255, 255, .3);
    cursor: pointer;
}
.fr-btn:active { transform: scale(.99); }
.fr-btn--ghost {
    background: rgba(255, 255, 255, .07);
    border: 1px solid rgba(255, 255, 255, .12);
    box-shadow: none; color: #fff;
}

/* ссылка в строке — переносится, а не обрезается многоточием */
.fr-lt small {
    white-space: normal;
    word-break: break-all;
    line-height: 1.25;
}

/* ══ «Заработок» — их структура, наш стиль (стекло, розовый/фиолетовый/чёрный) ══
   Блоки повторяют их экран (скрины владельца): баннер с паками и билетами,
   карточка ежедневного пака с таймером, табы ЗАДАНИЯ/РОЗЫГРЫШИ, строки
   заданий с прогрессом, лента розыгрышей. Цвета — наши. */
.earn-root {
    display: flex; flex-direction: column; gap: 12px;
    padding: 46px 14px calc(96px + var(--safe-bottom));
    background:
        radial-gradient(90% 40% at 10% 0%, rgba(182, 2, 206, .18), transparent 62%),
        radial-gradient(80% 40% at 100% 10%, rgba(239, 2, 203, .14), transparent 60%);
}
/* Раньше тут стояло `display:block; height:auto` — страница растягивалась по
   контенту (1426 px при экране 844), а `body` не скроллится: на телефоне до
   заданий было не доскроллить. Экран «Заработок» — обычная `.page` со своей
   прокруткой, поэтому переопределение убрано. */

/* стеклянная база для всех карточек */
.earn-hero, .earn-daily, .earn-task, .earn-raffle, .earn-cash {
    position: relative; overflow: hidden;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, .10);
    background: linear-gradient(180deg, rgba(34, 24, 46, .62), rgba(16, 12, 22, .74));
    -webkit-backdrop-filter: blur(18px) saturate(1.25);
    backdrop-filter: blur(18px) saturate(1.25);
    box-shadow: 0 10px 28px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .12);
}

/* баннер */
.earn-hero { padding: 16px 14px 14px; min-height: 148px; display: flex; flex-direction: column; gap: 6px; }
.earn-hero__art {
    position: absolute; right: -8px; top: -10px; width: 148px; height: 148px;
    object-fit: contain; transform: rotate(8deg);
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, .55));
    pointer-events: none;
}
.earn-hero__title {
    margin: 0; font-size: 26px; line-height: 1.05; font-weight: 900; letter-spacing: -.4px; color: #fff;
    text-shadow: 0 0 22px rgba(239, 2, 203, .35);
}
.earn-hero__title span { color: #fff; }
.earn-hero__sub { margin: 0; max-width: 60%; font-size: 12.5px; line-height: 1.3; color: rgba(255, 255, 255, .6); }
.earn-hero__pill {
    align-self: flex-start; margin-top: 4px;
    padding: 6px 12px; border-radius: 99px;
    font-size: 11px; font-weight: 900; letter-spacing: .4px; color: #ffffff;
    background: linear-gradient(135deg, #ef02cb, #b602ce);
    color: #fff;
    box-shadow: 0 6px 18px rgba(239, 2, 203, .32), inset 0 1px 0 rgba(255, 255, 255, .35);
}
.earn-hero__won { margin: 2px 0 0; font-size: 11.5px; color: rgba(255, 255, 255, .55); }
.earn-hero__won b { color: #ff7bdc; }

/* ежедневный пак */
.earn-daily { padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.earn-daily__art {
    position: absolute; right: -6px; top: -4px; width: 96px; height: 96px;
    object-fit: contain; transform: rotate(-10deg); pointer-events: none; opacity: .95;
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, .5));
}
.earn-daily__top { display: flex; align-items: baseline; gap: 8px; }
.earn-daily__top h2 { margin: 0; font-size: 18px; font-weight: 900; letter-spacing: -.2px; color: #fff; }
.earn-daily__streak { font-size: 11.5px; font-weight: 700; color: rgba(255, 255, 255, .45); }
.earn-daily__row { display: flex; align-items: center; gap: 9px; }
.earn-ic {
    display: inline-flex; align-items: center; justify-content: center;
    width: 26px; height: 26px; border-radius: 50%; font-style: normal; font-size: 13px;
    background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .1);
}
.earn-daily__row b { display: block; font-size: 16px; font-weight: 900; color: #fff; }
.earn-daily__row small { font-size: 11px; color: rgba(255, 255, 255, .45); }

/* главные кнопки — наш градиент */
.earn-cta, .earn-claim {
    border: 0; border-radius: 14px; cursor: pointer;
    background: linear-gradient(135deg, #ef02cb, #b602ce);
    color: #fff; font-weight: 900;
    box-shadow: 0 8px 22px rgba(239, 2, 203, .28), inset 0 1px 0 rgba(255, 255, 255, .3);
}
.earn-cta { height: 44px; font-size: 13.5px; letter-spacing: .3px; }
.earn-claim { height: 32px; padding: 0 14px; font-size: 11.5px; letter-spacing: .3px; flex: none; }
.earn-cta[disabled], .earn-claim[disabled] {
    background: rgba(255, 255, 255, .07); color: rgba(255, 255, 255, .45);
    box-shadow: none; border: 1px solid rgba(255, 255, 255, .08); cursor: default;
}
.earn-cta:active, .earn-claim:active { transform: scale(.99); }

/* табы */
.earn-tabs { display: flex; gap: 8px; }
.earn-tab {
    flex: 1 1 0; height: 44px; border-radius: 14px; cursor: pointer;
    font-size: 12.5px; font-weight: 900; letter-spacing: .4px;
    color: rgba(255, 255, 255, .62);
    background: rgba(255, 255, 255, .05);
    border: 1px solid rgba(255, 255, 255, .08);
}
.earn-tab.is-active {
    color: #fff; border-color: transparent;
    background: linear-gradient(135deg, #ef02cb, #b602ce);
    box-shadow: 0 8px 22px rgba(239, 2, 203, .28), inset 0 1px 0 rgba(255, 255, 255, .3);
}

/* задания */
.earn-cards { display: flex; flex-direction: column; gap: 10px; }
.earn-task { padding: 12px 13px; display: flex; flex-direction: column; gap: 7px; }
.earn-task__head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.earn-task__head b { font-size: 14.5px; font-weight: 800; color: #fff; }
.earn-task__reward { font-size: 12.5px; font-weight: 900; color: #ff7bdc; white-space: nowrap; }
.earn-task__desc { margin: 0; font-size: 11.5px; line-height: 1.3; color: rgba(255, 255, 255, .5); }
.earn-bar { height: 6px; border-radius: 99px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.earn-bar i {
    display: block; height: 100%; border-radius: 99px;
    background: linear-gradient(90deg, #ef02cb, #b602ce);
    box-shadow: 0 0 12px rgba(239, 2, 203, .45);
    transition: width .3s ease;
}
.earn-task__foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.earn-task__foot > span { font-size: 11px; color: rgba(255, 255, 255, .45); }
.earn-task__done { color: #2ee59d !important; font-weight: 800; }
.earn-task.is-claimed { opacity: .72; }
.earn-task.is-ready { border-color: rgba(239, 2, 203, .35); }

/* кэшбэк и рейкбэк */
.earn-cash { padding: 12px 13px; display: flex; flex-direction: column; gap: 6px; }
.earn-cash__head { display: flex; align-items: baseline; justify-content: space-between; }
.earn-cash__head b { font-size: 14px; font-weight: 800; color: #fff; }
.earn-cash__head span { font-size: 12px; font-weight: 900; color: #ff7bdc; }
.earn-cash p { margin: 0; font-size: 11.5px; color: rgba(255, 255, 255, .5); }
.earn-cash__row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 2px; }
.earn-cash__row b { font-size: 16px; font-weight: 900; color: #fff; }

/* розыгрыши */
.earn-raffle { padding: 13px; display: flex; flex-direction: column; gap: 10px; }
.earn-raffle__head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.earn-raffle__head h2 { margin: 0; font-size: 16px; font-weight: 900; color: #fff; }
.earn-raffle__pool { font-size: 11.5px; font-weight: 800; color: #ff7bdc; }
.earn-raffle-list { display: flex; flex-direction: column; gap: 8px; }
.earn-raffle-row { display: flex; align-items: center; gap: 10px; }
.earn-raffle-row__n {
    flex: none; width: 24px; height: 24px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 11.5px; font-weight: 900; color: #fff;
    background: linear-gradient(135deg, rgba(239, 2, 203, .55), rgba(182, 2, 206, .55));
    border: 1px solid rgba(255, 255, 255, .16);
}
.earn-raffle-row__main { flex: 1; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.earn-raffle-row__main b { font-size: 13px; font-weight: 800; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.earn-raffle-row__main span { font-size: 11.5px; color: rgba(255, 255, 255, .5); }
.earn-empty { padding: 16px 10px; text-align: center; font-size: 12.5px; line-height: 1.4; color: rgba(255, 255, 255, .45); }

/* ============================================================
   НИЖНЯЯ ПАНЕЛЬ — их геометрия, наш розовый (30.10.2026).

   Вид взят из их компонента (материал-2/site/chunks/bd602072d539fb54.js):
   плавающая панель, стеклянная подложка с четырьмя внутренними бликами,
   отдельная круглая кнопка с геймпадом. Их пилюля цельня — по решению
   владельца у нас две пилюли (слева/справа), а круглая кнопка «Игры»
   стоит между ними по центру: одной цельной таблетке она мешала.

   Прозрачность: владелец просил «прозрачнее». Режим производительности
   (body.perf-lite) гасит backdrop-filter только у .bottom-menu, поэтому
   блюр вешаем на сами пилюли (.nav-pill) — он работает и там.

   Иконки — их SVG-глифы Games/Top/Friends/Profile; «Заработок» — наш глиф
   (монета со звездой), в их наборе иконки для этого пункта нет.
   ============================================================ */
.bottom-menu {
    left: 50%;
    right: auto;
    bottom: calc(12px + var(--safe-bottom, 0px));
    width: calc(100% - 24px);
    max-width: 480px;
    z-index: 60;
    transform: translateX(-50%);
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 8px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
    animation: bmFloat 5.6s ease-in-out infinite;
}
@keyframes bmFloat {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-2px); }
}
@media (prefers-reduced-motion: reduce) {
    .bottom-menu { animation: none; }
}
/* две стеклянные пилюли по бокам от круглой кнопки */
.nav-pill {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    align-items: flex-end;
    gap: 2px;
    padding: 6px 6px 7px;
    border-radius: 24px;
    background: rgba(10, 7, 16, .34);
    backdrop-filter: blur(18px) saturate(1.4);
    -webkit-backdrop-filter: blur(18px) saturate(1.4);
    box-shadow:
        inset 1.8px 3px 0 -2px rgba(255, 255, 255, .22),
        inset -1.8px -3px 0 -2px rgba(255, 255, 255, .22),
        inset 2px 2px 0 -2px rgba(255, 255, 255, .16),
        inset -2px -2px 2px -2px rgba(255, 255, 255, .16),
        0 10px 26px rgba(0, 0, 0, .40);
}
.bottom-menu .nav-btn {
    flex: 1 1 0;
    min-width: 0;
    min-height: 0;
    gap: 3px;
    padding: 4px 2px 2px;
    border-radius: 14px;
    background: transparent;
    box-shadow: none;
    overflow: visible;
    color: rgba(255, 255, 255, .46);
}
.bottom-menu .nav-btn::before,
.bottom-menu .nav-btn::after { display: none !important; }
.bottom-menu .nav-btn .nav-ic {
    display: block;
    width: 23px;
    height: 23px;
    color: inherit;
    transition: color .18s ease, transform .24s ease, filter .24s ease;
}
.bottom-menu .nav-btn .nav-ic svg { display: block; width: 100%; height: 100%; fill: currentColor; }
.bottom-menu .nav-btn span {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .2px;
    color: inherit;
    text-shadow: 0 1px 6px rgba(0, 0, 0, .55);
}
.bottom-menu .nav-btn.active {
    color: var(--accent-pink, #ef02cb);
    background: transparent;
    transform: none;
}
.bottom-menu .nav-btn.active .nav-ic {
    transform: translateY(-1px);
    filter: drop-shadow(0 0 7px rgba(239, 2, 203, .55));
}
/* круглая кнопка «Игры» по центру: ниже и мягче (просьба владельца).
   Класс .active включён в селектор, иначе он съедал градиент кнопки. */
.bottom-menu .nav-btn-main,
.bottom-menu .nav-btn-main.active {
    flex: 0 0 auto;
    width: 52px;
    height: 52px;
    margin: -8px 2px 0;
    padding: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(140deg, rgba(214, 34, 170, .72), rgba(120, 62, 200, .72));
    border: 1px solid rgba(255, 255, 255, .14);
    box-shadow: 0 4px 14px rgba(150, 20, 120, .28), inset 0 1px 0 rgba(255, 255, 255, .16);
    color: rgba(255, 255, 255, .92);
    z-index: 5;
}
.bottom-menu .nav-btn-main .nav-ic { width: 25px; height: 25px; }
.bottom-menu .nav-btn-main span { display: none; }
.bottom-menu .nav-btn-main.active .nav-ic { filter: none; }
/* в игре панели нет — их правило: на игровых экранах меню не рисуется
   (список экранов-игр — в assets/bottom-menu.js) */
body.is-in-game .bottom-menu { display: none !important; }
/* «Витрина NFT» в профиле — отдельная кнопка под рядом быстрых действий */
.profile-quick .pq--shop {
    grid-column: 1 / -1;
    flex-direction: row;
    justify-content: center;
    gap: 8px;
    padding: 11px 14px;
    background: linear-gradient(150deg, rgba(239, 2, 203, .24), rgba(124, 77, 255, .20));
    border-color: rgba(239, 2, 203, .34);
}
.profile-quick .pq--shop .pq-ic { font-size: 15px; }
/* ============================================================
   Экран «Игры»: горизонтальный скролл страницы не нужен.
   Причина была в переливе содержимого (scrollWidth 523 при 420):
   страница ехала вбок при свайпе. Баннерную карусель не трогаем —
   она скроллится внутри себя и остаётся листаемой.
   ============================================================ */
#screen-games { overflow-x: hidden; }

/* ── Шторм подарков: ИХ игра в кадре (games/giftstorm/) — как у Рейса ──────
   Кадр занимает место между нашей шапкой (64) и нижним меню (69), иначе их
   движок считает раскладку от 100dvh и низ уезжает под меню. */
#screen-giftstorm.page {
  position: fixed;
  top: var(--topbar-h); left: 0; right: 0; bottom: 69px;
  width: auto; max-width: none;
  height: auto;
  margin: 0; padding: 0;
  transform: none;
  overflow: hidden;
  display: none;
}

#screen-giftstorm.page.active { display: block; }

#screen-giftstorm .giftstorm-frame {
  display: block;
  width: 100%;
  height: calc(100dvh - var(--topbar-h) - 69px);
  height: calc(100svh - var(--topbar-h) - 69px);
  border: 0;
  background: #0b0710;
  border-radius: 18px;
}

/* «Шторм»: нижнюю панель в игре не рисуем (их экран отдаёт место игре),
   поэтому кадр тянется до низа, а не до меню. */
body.is-in-game #screen-giftstorm.page {
  bottom: 0;
}

body.is-in-game #screen-giftstorm .giftstorm-frame {
  height: calc(100dvh - var(--topbar-h));
  height: calc(100svh - var(--topbar-h));
  border-radius: 0;
}

/* ── НИЖНЯЯ ПАНЕЛЬ В ИГРАХ: её нет ───────────────────────────────────────────
   Воля владельца 01.11.2026: «нижнюю шапку убираем со всех игр; где убрали —
   чёрного квадрата остаться не должно». Панель прячет `bottom-menu.js` классом
   `is-in-game`, а здесь освободившееся место отдаём игре: экран до низа, кадр на
   всю высоту, без чёрных полос и скруглений по краям. */
body.is-in-game .page.active {
    bottom: 0 !important;
    padding-bottom: 0 !important;
}

body.is-in-game .page.active iframe {
    height: calc(100dvh - var(--topbar-h)) !important;
    height: calc(100svh - var(--topbar-h)) !important;
    border-radius: 0 !important;
    border: 0 !important;
    background: transparent !important;
}

/* экраны-игры без кадра (Арена, Коровка, Мины, Апгрейд, Скретч, Пиксельман):
   им тоже отдаём освободившиеся 69 px и убираем чёрную подложку */
body.is-in-game .page.active > .game-shell,
body.is-in-game .page.active > .game-wrap {
    padding-bottom: 0 !important;
}

/* ── Профиль: ИХ страница кадром (/rub/#/profile) ──────────────────────────
   ALTUSHKA: профиль больше не самописный — их экран в кадре, наш только цвет.
   Правила кадра те же, что у битвы кейсов и инвентаря. */
#screen-profile.page { position: relative; padding: 0; overflow: hidden; }
#screen-profile .rub-frame {
    display: block; width: 100%;
    height: calc(100dvh - 150px);
    height: calc(100svh - 150px);
    border: 0; background: #0d0f16; border-radius: 18px;
}
#screen-profile.is-ready .rub-loader { opacity: 0; pointer-events: none; }
@media (max-width: 639.98px) { #screen-profile .rub-frame { border-radius: 0; } }
@media (min-width: 1024px) {
    #screen-profile.page {
        position: fixed; top: var(--topbar-h); left: 0; right: 0; bottom: 69px;
        width: auto; max-width: none; height: auto;
        margin: 0; padding: 0; transform: none; z-index: 5;
    }
    #screen-profile .rub-frame { width: 100%; height: 100%; border-radius: 14px; }
}

/* ── Статистика: ИХ профиль игрока кадром (`/rub/#/player/p:<id>-<hash>`) ───── */
#screen-stats.page:not(.active) { display: none; }
#screen-stats.page { position: relative; padding: 0; overflow: hidden; }
#screen-stats .rub-frame {
    display: block; width: 100%;
    height: calc(100dvh - 150px);
    height: calc(100svh - 150px);
    border: 0; background: #0d0f16; border-radius: 18px;
}
#screen-stats.is-ready .rub-loader { opacity: 0; pointer-events: none; }
@media (max-width: 639.98px) { #screen-stats .rub-frame { border-radius: 0; } }
@media (min-width: 1024px) {
    #screen-stats.page {
        position: fixed; top: var(--topbar-h); left: 0; right: 0; bottom: 69px;
        width: auto; max-width: none; height: auto;
        margin: 0; padding: 0; transform: none; z-index: 5;
    }
    #screen-stats .rub-frame { width: 100%; height: 100%; border-radius: 14px; }
}

/* ── Бонусы и VIP-клуб: ИХ страницы кадром (наш цвет — китом профиля) ─────── */
#screen-bonuses.page:not(.active), #screen-vip.page:not(.active) { display: none; }
#screen-bonuses.page, #screen-vip.page { position: relative; padding: 0; overflow: hidden; }
#screen-bonuses .rub-frame, #screen-vip .rub-frame {
    display: block; width: 100%;
    height: calc(100dvh - 150px);
    height: calc(100svh - 150px);
    border: 0; background: #0d0f16; border-radius: 18px;
}
#screen-bonuses.is-ready .rub-loader, #screen-vip.is-ready .rub-loader { opacity: 0; pointer-events: none; }
@media (max-width: 639.98px) {
    #screen-bonuses .rub-frame, #screen-vip .rub-frame { border-radius: 0; }
}
@media (min-width: 1024px) {
    #screen-bonuses.page, #screen-vip.page {
        position: fixed; top: var(--topbar-h); left: 0; right: 0; bottom: 69px;
        width: auto; max-width: none; height: auto;
        margin: 0; padding: 0; transform: none; z-index: 5;
    }
    #screen-bonuses .rub-frame, #screen-vip .rub-frame { width: 100%; height: 100%; border-radius: 14px; }
}

/* ── Замок «подарок за друзей» в инвентаре (наш стиль) ─────────────────────
   Владелец 02.11.2026: в инвентаре должно быть видно и сколько друзей, и сколько
   осталось времени (как в плашке). Данные даёт /api/inventory (locked,
   friends_have, friends_needed, friends_left_seconds). */
.fg-lock {
  position: absolute; left: 8px; right: 8px; bottom: 8px;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 7px 8px; border-radius: 12px;
  background: rgba(18, 10, 28, .82);
  border: 1px solid rgba(255, 90, 190, .35);
  box-shadow: 0 8px 22px rgba(0, 0, 0, .45), 0 0 18px rgba(255, 60, 170, .18);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  color: #fff; text-align: center; pointer-events: none; z-index: 3;
}
.fg-lock > i { font-style: normal; font-size: 13px; line-height: 1; opacity: .95; }
.fg-lock > b { font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.fg-lock > span { font-size: 10.5px; opacity: .85; line-height: 1.15; }
.fg-lock .fg-lock__time { color: #ff5ab2; font-weight: 700; font-variant-numeric: tabular-nums; }
[class*=inv-card].is-locked { position: relative; }
[class*=inv-card].is-locked .card-art,
[class*=inv-card].is-locked img { filter: grayscale(.35) brightness(.75); }


/* ── «Витрина NFT» в инвентаре (владелец 02.11.2026) ─────────────────────────
   Инвентарь — их кадр, кнопка лежит поверх него: ведёт в их «Магазин NFT». */
.inv-nft-shop {
  position: fixed;
  right: 14px;
  /* ALT-INVFIX (04.11.2026): кнопку «Витрина NFT» не было видно — она стояла на
     84 px от низа, а нижнее меню выше (и с z-index 900 против её 40), поэтому на
     телефоне с большой безопасной зоной кнопка оказывалась ПОД меню. Поднимаем
     над меню и ставим выше по слою. */
  bottom: calc(96px + env(safe-area-inset-bottom, 0px));
  z-index: 950;
  /* ALT-INVPILL: в разметке кнопка осталась на экране инвентаря, но по факту
     её переносит в корень приложения `nav()` — иначе `transform` у `.page`
     утаскивал её при прокрутке. Видна только на инвентаре. */
  display: none;
  padding: 12px 18px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: linear-gradient(135deg, #ef02cb, #75027f);
  color: #fff;
  font: 800 14px/1 "Montserrat", system-ui, sans-serif;
  letter-spacing: 0.2px;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(255, 0, 128, 0.38);
  -webkit-tap-highlight-color: transparent;
}
.inv-nft-shop:active { transform: scale(0.97); }
body.on-inventory .inv-nft-shop { display: block; }
@media (min-width: 1024px) {
  .inv-nft-shop { right: 28px; bottom: 28px; }
}

/* ALT-FRAMEFIX (04.11.2026)
   Экраны, внутри которых живёт кадр игры: на телефоне они фиксированы от шапки до нижнего
   меню. Раньше у них была высота `calc(100svh - --topbar-h - 69px)`, но общее правило `.page`
   добавляло ещё `padding-bottom: 84px + safe-area` — сумма переполняла экран, страница
   прокручивалась и sticky-шапка уезжала вверх («шапка улетает выше кнопок Телеграма»). */
@media (max-width: 1023.98px) {
  #screen-ufc.page,
  #screen-cow.page,
  #screen-reys.page,
  #screen-crash.page,
  #screen-kirka.page,
  #screen-casesrub.page,
  #screen-casebattle.page,
  #screen-inventory.page,
  #screen-stats.page,
  #screen-bonuses.page,
  #screen-vip.page,
  #screen-plinko.page,
  #screen-blackjack.page,
  #screen-scratch.page,
  #screen-slots.page,
  #screen-slotvirus.page,
  #screen-giftstorm.page,
  #screen-arena.page,
  #screen-upgrade.page,
  #screen-pixlman.page,
  #screen-profile.page,
  #screen-cases.page {
    position: fixed;
    top: var(--topbar-h);
    left: 0;
    right: 0;
    bottom: 69px;
    height: auto;
    min-height: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
    transform: none !important;
    animation: none !important;
  }
  #screen-ufc .rub-frame,
  #screen-ufc .reys-frame,
  #screen-ufc .pl-frame,
  #screen-ufc .bj-frame,
  #screen-ufc .scratch-frame,
  #screen-ufc .slot-virus-frame,
  #screen-ufc .giftstorm-frame,
  #screen-ufc .arena-frame,
  #screen-ufc .up-frame,
  #screen-ufc .pix-frame,
  #screen-cow .rub-frame,
  #screen-cow .reys-frame,
  #screen-cow .pl-frame,
  #screen-cow .bj-frame,
  #screen-cow .scratch-frame,
  #screen-cow .slot-virus-frame,
  #screen-cow .giftstorm-frame,
  #screen-cow .arena-frame,
  #screen-cow .up-frame,
  #screen-cow .pix-frame,
  #screen-reys .rub-frame,
  #screen-reys .reys-frame,
  #screen-reys .pl-frame,
  #screen-reys .bj-frame,
  #screen-reys .scratch-frame,
  #screen-reys .slot-virus-frame,
  #screen-reys .giftstorm-frame,
  #screen-reys .arena-frame,
  #screen-reys .up-frame,
  #screen-reys .pix-frame,
  #screen-crash .rub-frame,
  #screen-crash .reys-frame,
  #screen-crash .pl-frame,
  #screen-crash .bj-frame,
  #screen-crash .scratch-frame,
  #screen-crash .slot-virus-frame,
  #screen-crash .giftstorm-frame,
  #screen-crash .arena-frame,
  #screen-crash .up-frame,
  #screen-crash .pix-frame,
  #screen-kirka .rub-frame,
  #screen-kirka .reys-frame,
  #screen-kirka .pl-frame,
  #screen-kirka .bj-frame,
  #screen-kirka .scratch-frame,
  #screen-kirka .slot-virus-frame,
  #screen-kirka .giftstorm-frame,
  #screen-kirka .arena-frame,
  #screen-kirka .up-frame,
  #screen-kirka .pix-frame,
  #screen-casesrub .rub-frame,
  #screen-casesrub .reys-frame,
  #screen-casesrub .pl-frame,
  #screen-casesrub .bj-frame,
  #screen-casesrub .scratch-frame,
  #screen-casesrub .slot-virus-frame,
  #screen-casesrub .giftstorm-frame,
  #screen-casesrub .arena-frame,
  #screen-casesrub .up-frame,
  #screen-casesrub .pix-frame,
  #screen-casebattle .rub-frame,
  #screen-casebattle .reys-frame,
  #screen-casebattle .pl-frame,
  #screen-casebattle .bj-frame,
  #screen-casebattle .scratch-frame,
  #screen-casebattle .slot-virus-frame,
  #screen-casebattle .giftstorm-frame,
  #screen-casebattle .arena-frame,
  #screen-casebattle .up-frame,
  #screen-casebattle .pix-frame,
  #screen-inventory .rub-frame,
  #screen-inventory .reys-frame,
  #screen-inventory .pl-frame,
  #screen-inventory .bj-frame,
  #screen-inventory .scratch-frame,
  #screen-inventory .slot-virus-frame,
  #screen-inventory .giftstorm-frame,
  #screen-inventory .arena-frame,
  #screen-inventory .up-frame,
  #screen-inventory .pix-frame,
  #screen-stats .rub-frame,
  #screen-stats .reys-frame,
  #screen-stats .pl-frame,
  #screen-stats .bj-frame,
  #screen-stats .scratch-frame,
  #screen-stats .slot-virus-frame,
  #screen-stats .giftstorm-frame,
  #screen-stats .arena-frame,
  #screen-stats .up-frame,
  #screen-stats .pix-frame,
  #screen-bonuses .rub-frame,
  #screen-bonuses .reys-frame,
  #screen-bonuses .pl-frame,
  #screen-bonuses .bj-frame,
  #screen-bonuses .scratch-frame,
  #screen-bonuses .slot-virus-frame,
  #screen-bonuses .giftstorm-frame,
  #screen-bonuses .arena-frame,
  #screen-bonuses .up-frame,
  #screen-bonuses .pix-frame,
  #screen-vip .rub-frame,
  #screen-vip .reys-frame,
  #screen-vip .pl-frame,
  #screen-vip .bj-frame,
  #screen-vip .scratch-frame,
  #screen-vip .slot-virus-frame,
  #screen-vip .giftstorm-frame,
  #screen-vip .arena-frame,
  #screen-vip .up-frame,
  #screen-vip .pix-frame,
  #screen-plinko .rub-frame,
  #screen-plinko .reys-frame,
  #screen-plinko .pl-frame,
  #screen-plinko .bj-frame,
  #screen-plinko .scratch-frame,
  #screen-plinko .slot-virus-frame,
  #screen-plinko .giftstorm-frame,
  #screen-plinko .arena-frame,
  #screen-plinko .up-frame,
  #screen-plinko .pix-frame,
  #screen-blackjack .rub-frame,
  #screen-blackjack .reys-frame,
  #screen-blackjack .pl-frame,
  #screen-blackjack .bj-frame,
  #screen-blackjack .scratch-frame,
  #screen-blackjack .slot-virus-frame,
  #screen-blackjack .giftstorm-frame,
  #screen-blackjack .arena-frame,
  #screen-blackjack .up-frame,
  #screen-blackjack .pix-frame,
  #screen-scratch .rub-frame,
  #screen-scratch .reys-frame,
  #screen-scratch .pl-frame,
  #screen-scratch .bj-frame,
  #screen-scratch .scratch-frame,
  #screen-scratch .slot-virus-frame,
  #screen-scratch .giftstorm-frame,
  #screen-scratch .arena-frame,
  #screen-scratch .up-frame,
  #screen-scratch .pix-frame,
  #screen-slots .rub-frame,
  #screen-slots .reys-frame,
  #screen-slots .pl-frame,
  #screen-slots .bj-frame,
  #screen-slots .scratch-frame,
  #screen-slots .slot-virus-frame,
  #screen-slots .giftstorm-frame,
  #screen-slots .arena-frame,
  #screen-slots .up-frame,
  #screen-slots .pix-frame,
  #screen-slotvirus .rub-frame,
  #screen-slotvirus .reys-frame,
  #screen-slotvirus .pl-frame,
  #screen-slotvirus .bj-frame,
  #screen-slotvirus .scratch-frame,
  #screen-slotvirus .slot-virus-frame,
  #screen-slotvirus .giftstorm-frame,
  #screen-slotvirus .arena-frame,
  #screen-slotvirus .up-frame,
  #screen-slotvirus .pix-frame,
  #screen-giftstorm .rub-frame,
  #screen-giftstorm .reys-frame,
  #screen-giftstorm .pl-frame,
  #screen-giftstorm .bj-frame,
  #screen-giftstorm .scratch-frame,
  #screen-giftstorm .slot-virus-frame,
  #screen-giftstorm .giftstorm-frame,
  #screen-giftstorm .arena-frame,
  #screen-giftstorm .up-frame,
  #screen-giftstorm .pix-frame,
  #screen-arena .rub-frame,
  #screen-arena .reys-frame,
  #screen-arena .pl-frame,
  #screen-arena .bj-frame,
  #screen-arena .scratch-frame,
  #screen-arena .slot-virus-frame,
  #screen-arena .giftstorm-frame,
  #screen-arena .arena-frame,
  #screen-arena .up-frame,
  #screen-arena .pix-frame,
  #screen-upgrade .rub-frame,
  #screen-upgrade .reys-frame,
  #screen-upgrade .pl-frame,
  #screen-upgrade .bj-frame,
  #screen-upgrade .scratch-frame,
  #screen-upgrade .slot-virus-frame,
  #screen-upgrade .giftstorm-frame,
  #screen-upgrade .arena-frame,
  #screen-upgrade .up-frame,
  #screen-upgrade .pix-frame,
  #screen-pixlman .rub-frame,
  #screen-pixlman .reys-frame,
  #screen-pixlman .pl-frame,
  #screen-pixlman .bj-frame,
  #screen-pixlman .scratch-frame,
  #screen-pixlman .slot-virus-frame,
  #screen-pixlman .giftstorm-frame,
  #screen-pixlman .arena-frame,
  #screen-pixlman .up-frame,
  #screen-pixlman .pix-frame,
  #screen-profile .rub-frame,
  #screen-profile .reys-frame,
  #screen-profile .pl-frame,
  #screen-profile .bj-frame,
  #screen-profile .scratch-frame,
  #screen-profile .slot-virus-frame,
  #screen-profile .giftstorm-frame,
  #screen-profile .arena-frame,
  #screen-profile .up-frame,
  #screen-profile .pix-frame,
  #screen-cases .rub-frame,
  #screen-cases .reys-frame,
  #screen-cases .pl-frame,
  #screen-cases .bj-frame,
  #screen-cases .scratch-frame,
  #screen-cases .slot-virus-frame,
  #screen-cases .giftstorm-frame,
  #screen-cases .arena-frame,
  #screen-cases .up-frame,
  #screen-cases .pix-frame {
    width: 100% !important;
    height: 100% !important;
    max-height: none !important;
    border-radius: 0 !important;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   ALT-PCFIT (07.11.2026): на ПК содержимое вылезало за пределы #app.
   #app ограничен 500 px (телефонная ширина, по центру), но .content-scroll —
   флекс-элемент с min-width:auto — не сжимался, и сетка карточек раздувала его
   до 910 px. Из-за этого шапка (500) не совпадала с контентом («шапка уезжает»,
   смещение), карточки становились 433 px, меню выглядело криво.
   Теперь всё живёт в ширине приложения, а сетка подстраивается сама.
   ═══════════════════════════════════════════════════════════════════════════ */
html, body { max-width: 100%; overflow-x: hidden; }
#app { min-width: 0; }
.content-scroll { width: 100%; max-width: 100%; min-width: 0; }
.page { min-width: 0; max-width: 100%; }
#screen-games, #screen-games .game-grid, #screen-games .game-item { min-width: 0; }
#screen-games .game-grid { width: auto; max-width: 100%; }
.topbar { width: 100%; max-width: 500px; margin-left: auto; margin-right: auto; }
/* ПК: нижнее меню — ровно по ширине приложения (на телефоне его не трогаем) */
@media (min-width: 1024px) {
  .bottom-menu { width: 500px; max-width: 500px; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   ALT-PCWIDE (07.11.2026): владелец — «хочу, чтобы на ПК мини-апп открывался
   во весь экран сразу, а не как телефон». До этого `#app` был зажат в 500 px.
   Теперь на широком экране приложение занимает всю ширину, а сетка игр сама
   набирает столько колонок, сколько влезает (карточки не раздуваются).
   ═══════════════════════════════════════════════════════════════════════════ */
@media (min-width: 1024px) {
  html body #app { max-width: none !important; width: 100% !important; }
  html body .topbar { max-width: none !important; width: 100% !important; margin: 0 !important; padding-left: 28px; padding-right: 28px; }
  html body .content-scroll { max-width: none !important; width: 100% !important; padding: 0 28px; }
  html body #screen-games .game-grid {
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)) !important;
    gap: 18px !important;
    padding: 18px 0 110px !important;
  }
  html body #screen-games .game-item { aspect-ratio: 1 / 1 !important; }
  html body .bottom-menu { width: min(760px, calc(100% - 40px)) !important; max-width: 760px !important; }
  /* внутренние экраны (профиль, кошелёк и т.п.) — не растягиваем текст на всю ширину */
  html body .page > * { max-width: 1180px; margin-left: auto; margin-right: auto; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   ALT-GAMEFS (08.11.2026): владелец — «игры на ПК почему-то не на весь экран».
   Причина: у игровых кадров (`<iframe class="rub-frame|reys-frame|pl-frame">`) на ПК
   не было ширины — iframe брал дефолтные 300 px (Коровка) или упирался в
   `.page > * { max-width: 1180px }` (Рейс, Плинко). Теперь все игры — во весь экран.
   ═══════════════════════════════════════════════════════════════════════════ */
@media (min-width: 1024px) {
  html body .page > iframe,
  html body .page > .rub-frame,
  html body .page > .reys-frame,
  html body .page > .pl-frame {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    height: 100% !important;
    flex: 1 1 auto !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
  }
  html body .page:has(> iframe) { padding: 0 !important; }
  html body .page:has(> iframe) > * { max-width: none !important; margin-left: 0 !important; margin-right: 0 !important; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   ALT-BANNERFIT / ALT-NOHERO (08.11.2026) — по просьбе владельца:
   1) убрать заголовок «ALTUSHKA CASINO» с подписью на экране «Игры» (и телефон, и ПК);
   2) баннер перестал «подгоняться»: у `.rk-b` была ЖЁСТКАЯ высота 178px, поэтому на ПК
      он растягивался в полосу 1180×178 (6.6:1 вместо 2:1) и внутренние элементы разъезжались.
      Теперь высота считается по пропорции слайда (358×178), на ПК ширина ограничена и он
      центрируется;
   3) на ПК блоки экрана «Игры» выровнены по одной ширине (до этого лента 130px, карусель 44px,
      сетка 28px — отсюда «не ровно»).
   ═══════════════════════════════════════════════════════════════════════════ */
.main-banner { display: none !important; }
#screen-games .rk-b { height: auto !important; aspect-ratio: 358 / 178; }

@media (min-width: 1024px) {
  html body #screen-games > * { max-width: none !important; margin-left: 0 !important; margin-right: 0 !important; }
  html body #screen-games .live-drops { width: 100% !important; }
  html body #screen-games .rk-carousel { width: 100% !important; margin: 14px 0 12px !important; }
  html body #screen-games .rk-b { max-width: 760px; margin: 0 auto; }
}

/* ═══ ALT-NONFT (11.11.2026) ══════════════════════════════════════════════════
   Воля владельца: «витрину NFT из нашего мини-аппа вообще вырежи — сам пункт
   оставь, но у игроков её нигде не должно быть». Закрыто ВСЕМ (включая админа).
   Что скрыто:
     1) «🎁 Витрина NFT» в инвентаре — `#inv-nft-shop` (её показывало правило
        `body.on-inventory .inv-nft-shop{display:block}`, поэтому `!important`);
     2) «🎁 Открыть кейсы» в пустом экране «Обмен NFT» — `.alt-nft-off`
        (кнопка вела `nav('cases')`, то есть в ту же витрину);
     3) кнопка витрины в профиле — её больше не вставляет `assets/profile-shop.js`
        (флаг `SHOW_NFT_SHOP = false`), правило ниже — на случай старого DOM.
   САМ ЭКРАН `#screen-cases` и его разметка ОСТАЛИСЬ в коде: вернуть витрину =
   убрать этот блок и поставить флаг в `true`. */
#inv-nft-shop,
.inv-nft-shop,
.alt-nft-off,
#profile-shop-btn { display: none !important; }

/* ═══ ALT-BANNERS (11.11.2026) ═══════════════════════════════════════════════
   Новый слайд «ALT SLOTS» (арт владельца из assets/rk/assets/banners/slots777/)
   и точки-индикатор карусели. Позиции — в процентах, как у остальных их слайдов;
   семёрки ставим в белые окна барабанов на фоне (их и рисовали под это). */
#screen-games .rk-b__slots-title { left: 3.5%; top: 10%; width: 35%; animation: rk-float 7s ease-in-out infinite; }
#screen-games .rk-b__slots-desc  { left: 3.5%; top: 36%; width: 29%; }
#screen-games .rk-b__slots-btn   { left: 3.5%; bottom: 10%; width: 21%; animation: rk-pulse-soft 3.2s ease-in-out infinite; }

/* семёрки стоят в окнах барабанов: центры и наклон сняты с самого фона
   (окна: 50.2/57.9 %, 61.56/55.7 %, 73.84/53.3 %, общий наклон -5.5°) */
#screen-games .rk-b__7-l  { --r7: -5.5deg; left: 46.76%; top: 49.33%; width: 6.88%; animation: rk-7-in 6s ease-in-out infinite; }
#screen-games .rk-b__7-m  { --r7: -5.5deg; left: 57.95%; top: 47.02%; width: 7.22%; animation: rk-7-in 6s ease-in-out .25s infinite; }
#screen-games .rk-b__7-r  { --r7: -5.5deg; left: 70.08%; top: 44.96%; width: 7.52%; animation: rk-7-in 6s ease-in-out .5s infinite; }
#screen-games .rk-b__7blur-l { --r7: -5.5deg; left: 45.05%; top: 37.5%; width: 10.3%; opacity: .7; }
#screen-games .rk-b__7blur-m { --r7: -5.5deg; left: 56.16%; top: 34.9%; width: 10.8%; opacity: .7; }
#screen-games .rk-b__7blur-r { --r7: -5.5deg; left: 68.19%; top: 33.3%; width: 11.3%; opacity: .7; }

#screen-games .rk-b__lamp  { right: 3%;  bottom: 5%; width: 9%;  animation: rk-float 6.4s ease-in-out infinite reverse; }
#screen-games .rk-b__watch { right: 14%; bottom: 7%; width: 7.5%; animation: rk-float 5.6s ease-in-out infinite; }

/* баннер «Креаторы»: монеты в свободной полосе неба + иконки соцсетей */
#screen-games .rk-b__coin-1 { left: 45.5%; top: 17%; width: 7%;   animation: rk-float 5s ease-in-out infinite; }
#screen-games .rk-b__coin-2 { left: 54.5%; top: 25%; width: 6.4%; animation: rk-float 6s ease-in-out infinite reverse; }
#screen-games .rk-b__coin-3 { left: 57.5%; top: 16%; width: 6.6%; animation: rk-float 7s ease-in-out infinite; }
#screen-games .rk-b__coin-4 { left: 47%;   top: 33%; width: 6.2%; animation: rk-float 6.2s ease-in-out infinite reverse; }
#screen-games .rk-b__coin-5 { left: 56.5%; top: 37%; width: 6.6%; animation: rk-float 5.5s ease-in-out infinite reverse; }
#screen-games .rk-b__soc-instagram { left: 41.5%; top: 7%;   width: 5.2%; animation: rk-float 4.6s ease-in-out infinite; }
#screen-games .rk-b__soc-tiktok    { left: 47.8%; top: 5.5%; width: 5%;   animation: rk-float 5.4s ease-in-out infinite reverse; }
#screen-games .rk-b__soc-youtube   { left: 54%;   top: 7.5%; width: 5.4%; animation: rk-float 6.1s ease-in-out infinite; }

@keyframes rk-7-in {
  0%, 100% { transform: rotate(var(--r7, 0deg)) translateY(0) scale(1); }
  45% { transform: rotate(var(--r7, 0deg)) translateY(-2%) scale(1.03); }
}
@keyframes rk-pulse-soft {
  0%, 100% { transform: scale(1); filter: brightness(1); }
  50% { transform: scale(1.03); filter: brightness(1.12); }
}

/* точки под каруселью */
#screen-games .rk-dots {
  display: flex; gap: 6px; justify-content: center; align-items: center;
  margin: -2px 0 10px;
}
#screen-games .rk-dot {
  width: 6px; height: 6px; padding: 0; border: 0; border-radius: 999px;
  background: rgba(232, 209, 225, .28); cursor: pointer;
  transition: width .22s ease, background .22s ease;
}
#screen-games .rk-dot.is-on {
  width: 18px; background: linear-gradient(90deg, #f236ea, #ef02cb);
  box-shadow: 0 0 10px rgba(239, 2, 203, .55);
}
html body.perf-lite #screen-games .rk-dot.is-on { box-shadow: none; }

@media (prefers-reduced-motion: reduce) {
  #screen-games .rk-b__slots-title,
  #screen-games .rk-b__slots-btn,
  #screen-games .rk-b__7-l, #screen-games .rk-b__7-m, #screen-games .rk-b__7-r,
  #screen-games .rk-b__lamp, #screen-games .rk-b__watch { animation: none; }
}
/* БАРАБАНЫ slots777 (11.11.2026): семёрки больше не «наклейки» — окно барабана
   вырезано из фона (размер и наклон -5.66° сняты с самого арта), внутри лежит полоса
   из трёх одинаковых кадров с семёркой и крутится бесконечно (rk-reel). */
#screen-games .rk-b__drum {
  position: absolute; overflow: hidden;
  transform: rotate(-5.66deg);
  border-radius: 10px;
}
#screen-games .rk-b__drum-l { left: 43.96%; top: 50.27%; width: 10.91%; height: 17.76%; }
#screen-games .rk-b__drum-m { left: 54.93%; top: 51.4%; width: 11.64%; height: 19.57%; }
#screen-games .rk-b__drum-r { left: 67.09%; top: 53.06%; width: 11.92%; height: 20.14%; }
#screen-games .rk-b__reel {
  position: absolute; left: 0; top: 0; width: 100%; height: auto; display: block;
  animation: rk-reel 1.7s linear infinite;
  will-change: transform;
}
#screen-games .rk-b__bg-static { animation: none; }
@keyframes rk-reel {
  from { transform: translateY(0); }
  to   { transform: translateY(-25%); }
}

/* ALT-CURICO (13.11.2026): значок валюты в шапке — ровно 24×24 и не «схлопывается»,
   пока картинка грузится (было: при переключении иконка на миг исчезала и текст прыгал). */
.balance-btn .cur-mark { width: 24px; height: 24px; flex: none; display: block; }

/* ALT-CURGLYPH (13.11.2026): их `RubCur.money()` пишет знак GRAM/звёзд служебным
   символом U+E000/U+E001 из этого крошечного шрифта. В кадрах игр он подключён
   (`assets/game-kit/win-fx.css`), а в мини-аппе объявления не было — поэтому в
   LIVE-ленте вместо значка показывался «квадратик» (тофу). */
@font-face {
  font-family: 'RubupCurrency';
  font-style: normal;
  font-weight: 400;
  font-display: block;
  src: url(assets/game-kit/currency-icons-stars1002.woff2) format('woff2');
  unicode-range: U+E000-E001;
}

/* ============================================================
   ALT-BACKSTYLE (13.11.2026). Владелец: кнопка «назад» выглядела грубо и
   перекрывала важное. Теперь это компактная «встроенная» плашка-стекло
   (36×36, скругление 12), без большого свечения; в играх, где сверху свои
   панели, она сдвинута (см. BACK_POS в app_v2.js), а под кадрами оставлена
   полоса 44 px, чтобы кнопка стояла в пустом месте, а не поверх контента.
   ============================================================ */
#back-btn {
    width: 36px; height: 36px; min-width: 36px; padding: 0;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, .16);
    background: rgba(18, 12, 24, .52);
    color: #fff;
    -webkit-backdrop-filter: blur(14px) saturate(1.25);
    backdrop-filter: blur(14px) saturate(1.25);
    box-shadow: 0 6px 18px rgba(0, 0, 0, .38), inset 0 1px 0 rgba(255, 255, 255, .14);
    transition: transform .14s ease, background .14s ease, border-color .14s ease;
}
#back-btn svg { width: 18px; height: 18px; }
#back-btn:active { transform: scale(.94); background: rgba(34, 22, 44, .74); border-color: rgba(255, 255, 255, .26); }
@media (hover: hover) {
    #back-btn:hover { background: rgba(30, 20, 40, .68); }
}

/* полоса под «назад» внутри кадров их SPA: кнопка стоит в пустом месте */
.alt-back-pad { padding-top: 44px !important; }

/* ------------------------------------------------------------
   ALT-BOTTOMSCRIM (13.11.2026). Владелец: «в играх снизу белый блок,
   должно быть прозрачно». Кадры успевают показать свой белый фон, пока
   грузятся/в safe-area — под нижним меню теперь тёмная подложка, а сами
   кадры красятся в наш фон.
   ------------------------------------------------------------ */
.rub-frame, .arena-frame, .cow-frame, iframe.game-frame, iframe.rub-frame {
    background: #0b0710;
}
#app::after {
    content: "";
    position: fixed;
    left: 0; right: 0; bottom: 0;
    height: calc(92px + var(--safe-bottom, 0px));
    pointer-events: none;
    z-index: 55;
    background: linear-gradient(180deg,
        rgba(10, 7, 16, 0) 0%,
        rgba(10, 7, 16, .55) 45%,
        rgba(10, 7, 16, .92) 100%);
}
/* в самих кадрах их нижняя полоса/фон тоже тёмные */
#screen-casesrub iframe, #screen-casebattle iframe, #screen-inventory iframe,
#screen-profile iframe, #screen-stats iframe, #screen-wallet iframe {
    color-scheme: dark;
}

/* ALT-BACKSTRIP (13.11.2026): над кадром их SPA — своя полоса 40 px, в ней стоит
   кнопка «назад». Раньше она висела поверх контента (перекрывала ленту LIVE и
   кнопки), теперь кадр начинается ниже и перекрывать нечего. */
#screen-casesrub .rub-frame,
#screen-casebattle .rub-frame,
#screen-inventory .rub-frame,
#screen-profile .rub-frame,
#screen-stats .rub-frame,
#screen-wallet .rub-frame {
    margin-top: 40px;
    height: calc(100svh - var(--topbar-h) - 69px - 40px);
}
@supports not (height: 100svh) {
    #screen-casesrub .rub-frame,
    #screen-casebattle .rub-frame,
    #screen-inventory .rub-frame,
    #screen-profile .rub-frame,
    #screen-stats .rub-frame,
    #screen-wallet .rub-frame {
        height: calc(100dvh - var(--topbar-h) - 69px - 40px);
    }
}
@media (min-width: 1024px) {
    #screen-casesrub .rub-frame,
    #screen-casebattle .rub-frame,
    #screen-inventory .rub-frame,
    #screen-profile .rub-frame,
    #screen-stats .rub-frame,
    #screen-wallet .rub-frame {
        height: calc(100% - 40px);
    }
}

/* ALT-TGLAYOUT (15.11.2026): если в шапке Telegram показана нативная «назад» (BackButton),
   свою плавающую круглую кнопку не рисуем — две «назад» на экране не нужны. */
/* ALT-NOBACKBTN (22.11.2026, слово владельца: «кнопку назад нашу игровую убрать отовсюду,
   там же кнопка наша есть, зачем вторая») — плавающую «назад» не рисуем вообще:
   возврат делает нативная кнопка Telegram (BackButton, tg-layout.js). */
#back-btn { display: none !important; }

/* ── ALT-PCBANNER (19.11.2026): карусель баннеров на ПК ────────────────────────
   Было: слайд = ширина всей страницы (1512 px), а сам баннер внутри — 760 px,
   поэтому при листании по краям торчали куски соседних слайдов и баннер «съезжал».
   Теперь карусель на ПК по центру и шириной с баннер, слайд = её ширина. */
@media (min-width: 1024px) {
  /* !important обязателен: выше по файлу есть `html body #screen-games > * { max-width: none !important }`,
     которое иначе растягивает карусель на всю страницу (тогда по краям торчали соседние слайды). */
  /* ALT-PCGRID (22.11.2026, слово владельца: «внизу баннера должны быть игры»).
     Было: баннер float:left, а `.game-grid` — отдельный грид-контейнер. Грид-контейнер
     создаёт свой контекст форматирования, поэтому рядом с float он НЕ обтекал баннер:
     игры стояли только справа, а под баннером оставалась большая пустота.
     Теперь на ПК экран «Игры» сам является сеткой (как сам .game-grid), а .game-grid
     растворяется (`display: contents`) — его карточки становятся ячейками этой сетки и
     спокойно текут под баннером. Баннер занимает 2 колонки ровно в размер 2 карточек.
     Телефон не тронут: там всё остаётся как было (баннер во всю ширину, 2 колонки). */
  /* ALT-PCACTIVE (22.11.2026): без `.active` это правило держало «Игры» видимыми
     ВСЕГДА, и остальные разделы (Друзья/Топы/Заработок) уезжали за нижний край
     экрана — владелец видел «разделы не грузятся». */
  html body #screen-games.active {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)) !important;
    /* высоту строк задаём по содержимому: у карточки нет потока внутри (обложка и
       подпись absolute), поэтому с обычным auto строка сжималась до 109 px и карточки
       наезжали друг на друга (проверено замером: 19 пересечений → 0) */
    grid-auto-rows: max-content !important;
    gap: 18px !important;
    align-content: start;
    padding-bottom: calc(110px + var(--safe-bottom));
  }
  html body #screen-games > .game-grid { display: contents !important; }
  html body #screen-games > #rk-carousel {
    float: none !important;
    grid-column: span 2;
    grid-row: span 1;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0;
    align-self: start;
  }
  /* лента LIVE — во всю ширину сетки */
  html body #screen-games > #live-drops { grid-column: 1 / -1; }
  /* точки-переключатели баннера на ПК не нужны — там листание автоматом */
  html body #screen-games > .rk-dots {
    display: none !important;
  }
  html body #screen-games > #rk-carousel .rk-slide {
    flex: 0 0 100%;
    width: 100%;
  }
  html body #screen-games > #rk-carousel .rk-b {
    max-width: none;
  }

  /* Лента LIVE на ПК — в контейнере, как на их сайте (1376 px по центру),
     а не растянутая на всю страницу с пустотой справа. */
  html body #screen-games .live-drops {
    width: min(1376px, calc(100% - 56px)) !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
}

/* ALT-FRAME40 (22.11.2026). Кадры их страниц на телефоне сдвинуты вниз на 40 px (место под их
   кнопку «назад»), а высота оставалась равна высоте экрана: низ кадра (40 px) уходил под нижнее
   меню (дамп владельца: кадр 160 + 623 = 783, меню начинается на 744). На ПК правило уже было. */
@media (max-width: 1023.98px) {
    #screen-casesrub .rub-frame,
    #screen-casebattle .rub-frame,
    #screen-inventory .rub-frame,
    #screen-profile .rub-frame,
    #screen-stats .rub-frame,
    #screen-wallet .rub-frame {
        height: calc(100% - 40px);
        max-height: calc(100% - 40px);
    }
}

/* ALT-FRAME40-fix (22.11.2026): в style.min.css правило `height: calc(100svh - 150px)` оказалось
   ПОЗЖЕ группового, поэтому на телефоне побеждало оно — кадр был на 40 px выше положенного и его
   низ уходил под нижнее меню (дамп владельца: 160 + 623 = 783 при меню на 744). Ставим !important,
   чтобы не зависеть от порядка правил в минифицированном файле. */
@media (max-width: 1023.98px) {
    #screen-casesrub .rub-frame,
    #screen-casebattle .rub-frame,
    #screen-inventory .rub-frame,
    #screen-profile .rub-frame,
    #screen-stats .rub-frame,
    #screen-wallet .rub-frame {
        height: calc(100svh - var(--topbar-h) - 69px - 40px) !important;
        max-height: none !important;
    }
}


/* ── ALT-PCCOLS (22.11.2026, слово владельца: «на ПК разделы можно красиво расположить —
   где-то слева, где-то справа») ─────────────────────────────────────────────────
   Топы: слева пьедестал и вкладки, справа прокручиваемый список игроков.
   Заработок: слева банер/табы/офферы/кэшбэк, справа задания.
   Друзья: слева банер и уровни процентов, справа статистика и заработок. */
@media (min-width: 1024px) {
    /* ТОПЫ */
    #screen-tops.page.active {
        display: grid !important;
        /* на ПК экран начинается ниже (свой padding-top), поэтому высоту считаем как раньше —
           от верха страницы, а не до полосы меню (см. ALT-TOPSFIT) */
        height: calc(100svh - var(--topbar-h) - 69px);
        grid-template-columns: minmax(0, 660px) minmax(0, 1fr);
        grid-auto-flow: row;
        gap: 20px 22px;
        align-content: start;
        align-items: start;
        padding: 18px 28px 110px;
    }
    #screen-tops .lb { width: 100% !important; margin: 0 !important; }
    #screen-tops .tops-list-wrap {
        width: 100% !important;
        max-height: calc(100vh - 250px);
        overflow-y: auto;
        border-radius: 18px;
    }

    /* ЗАРАБОТОК */
    #screen-earn .er-root {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
        gap: 16px 22px;
        align-items: start;
    }
    #screen-earn .er-hero,
    #screen-earn .er-ex,
    #screen-earn .er-tabs,
    #screen-earn .er-offers,
    #screen-earn .er-cash { grid-column: 1; }
    #screen-earn .er-section { grid-column: 2; }

    /* ДРУЗЬЯ */
    #screen-friends .fr-pane {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 16px 20px;
        align-items: start;
    }
    #screen-friends .fr-hero { grid-column: 1 / -1; }
    #screen-friends .fr-lines { grid-column: 1; }
    #screen-friends .fr-stats,
    #screen-friends .fr-earn,
    #screen-friends .fr-rules,
    #screen-friends .fr-btn { grid-column: 2; }
}

/* ALT-PCCOLS-fix3 (22.11.2026): «Заработок» на ПК — две независимые колонки (обёртки в JS). */
@media (min-width: 1024px) {
    #screen-earn .er-root {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
        gap: 16px 22px;
        align-items: start;
    }
    #screen-earn .er-col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
}


/* ALT-CARDCLEAN (23.11.2026): владелец — «убери надписи снизу на карточках (объяснение режима),
   названия игр оставить жирными, включая русские».
   Подпись под названием прячем полностью, название — жирное, с тенью для читаемости на арте. */
#screen-games .game-meta > span,
#screen-games .game-item .game-meta span:not([data-keep]),
#screen-games .game-name-sub,
#screen-games .game-desc {
  display: none !important;
}
#screen-games .game-meta h3,
#screen-games .game-item h3 {
  font-weight: 900 !important;
  letter-spacing: .3px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, .65);
}


/* ALT-NOSCROLLBAR (23.11.2026): владелец — «скролл должен быть невидимым везде, где он есть,
   и у баннеров не должно быть видно точек-индикаторов».
   Прячем ТОЛЬКО полосы прокрутки, сама прокрутка работает как раньше (колесо, свайп). */
html, body, * {
  scrollbar-width: none;          /* Firefox */
  -ms-overflow-style: none;       /* старый Edge */
}
html::-webkit-scrollbar,
body::-webkit-scrollbar,
*::-webkit-scrollbar { width: 0 !important; height: 0 !important; display: none !important; }

/* точки-индикаторы карусели баннеров */
.banners-dots, .banner-dots, .banners-carousel__dots, .alt-bn-dots, [data-bn-dots] {
  display: none !important;
}


/* ALT-RKDOTS (23.11.2026): точки карусели баннеров — классы `rk-dots` / `rk-dot` (нашлись замером).
   Владелец: «чтобы не было видно, что там есть баннеры». */
.rk-dots, .rk-dot, #rk-dots, [class*="rk-dots"] { display: none !important; }


/* ══════════════════ ALT-SMOOTH (28.11.2026) ══════════════════
   Жалоба владельца с телефона: «нажимаю кнопку меню — кнопки начинают вилять,
   экран дёргается, потом медленно прогружает меню, иногда не загружает».

   Что показали замеры (perf_samples в БД): его телефон 10–30 fps, ПК 60–86 fps,
   и на ДРУГИХ телефонах тоже 13–30 fps — дело не в одном устройстве. В A/B на
   360×812 при DPR 3 кадр стоил в 4–8 раз дороже, пока в нём работали бесконечные
   анимации и backdrop-filter.

   Здесь — ТОЛЬКО телефон (≤1023.98px) и только то, что вида не меняет:
     1) меню больше не качается: `bmFloat` двигал всю панель каждые 5.6 с — это
        ровно «кнопки виляют»; на телефоне 15 fps вместо плавного покачивания
        выходит дёргание;
     2) у пилюль меню вместо блюра плотная подложка — кнопки не «пропадают»,
        пока GPU считает размытие (стекло по PREFERENCES держится на цвете
        подложки, блюр — бонус);
     3) плашки «ОБНОВЛЕНИЕ» на карточках (7 шт., ~63 % площади экрана) без
        blur(1.5px) — разницы не видно, они и так затемнены градиентом;
     4) круги-свечения `#screen-games::before/::after` не двигаются: у них
        `filter: blur(22px)`, и движение заставляло пересчитывать размытие
        каждый кадр;
     5) модалка «Как тянет твоё устройство?» без полноэкранного blur(10px).

   Сверка «как было» на устройстве: открыть со `?v=<сборка>&smooth=0` —
   включится `html.alt-nosmooth` и всё вернётся. */
@media (max-width: 1023.98px) {
  html:not(.alt-nosmooth) .bottom-menu { animation: none !important; }
  html:not(.alt-nosmooth) .nav-pill {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: rgba(10, 7, 16, .52);
  }
  html:not(.alt-nosmooth) #screen-games .game-lock {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
  html:not(.alt-nosmooth) #screen-games::before,
  html:not(.alt-nosmooth) #screen-games::after { animation: none !important; }
  html:not(.alt-nosmooth) .alt-dc {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
}

/* ══════════════ ALT-FRIENDS2 (28.11.2026) — «Друзья» по макету владельца ══════════════
   Владелец: «надо получить что-то типо второго фото справа, только без фона того файла…
   попробуй взять фон 506e64c1-…png, и чтобы всё по красоте было во вкладке „Друзья“».
   Фон раньше был картинкой `assets/friends/bg.webp` (720×1279, 41 КБ) из ICON\506e64c1-…png;
   ALT-LIVEBG-MENU (04.12.2026, слово владельца: «фон в менюшке Друзья и Лидеры — картинки убрать,
   надо живое и эффектное»): картинка и глухая заливка убраны, здесь теперь играет живой фон
   приложения (assets/live-bg.js + assets/live-bg.css).
   Карточки процентов: номер 1/2/3, крупный +%, подпись, неоновая иконка из нашего листа
   `Неоновая панель с кроликом и иконками.png` (assets/me/icon-*.webp).
   Стиль — как у карточек меню/«Настроек»: розовый radial + светлое кольцо + чёрная кромка. */
#screen-friends { background: transparent; }
/* ALT-BGMENU-СТИЛЬ: сам фон ставим на .fr-page, потому что секция .page бывает display:none */
.fr-page {
    position: relative;
    /* ALT-LIVEBG-MENU (04.12.2026): картинка bg.webp и глухая заливка убраны — здесь играет
       живой фон приложения (assets/live-bg.js), подложку под контент даёт assets/live-bg.css */
    background: none;
}
.fr-page__title {
    margin: 0 0 0 -2px;
    font-size: 34px;
    font-weight: 900;
    letter-spacing: -.6px;
    color: #fff;
    background: linear-gradient(180deg, #ffffff 0%, #ffd6f2 46%, #ef02cb 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 16px rgba(239, 2, 203, .55));
}
/* герой-карточка: почти прозрачная, чтобы под ней был виден арт */
.fr-hero {
    border-radius: 22px;
    border: 2px solid rgba(0, 0, 0, .9);
    background:
        linear-gradient(160deg, rgba(255, 155, 230, .16) 0%, rgba(239, 2, 203, .07) 44%, rgba(10, 4, 16, .58) 100%);
    box-shadow:
        inset 0 0 0 1px rgba(249, 181, 204, .26),
        0 14px 30px rgba(0, 0, 0, .45);
    padding: 12px 12px 14px;
    gap: 12px;
}
.fr-hero__sub {
    margin: -2px 0 2px;
    font-size: 12.5px;
    line-height: 1.3;
    font-weight: 600;
    color: rgba(255, 255, 255, .62);
}
/* три карточки процентов в ряд */
.fr-tiers {
    list-style: none; margin: 0; padding: 0;
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px;
}
.fr-tier {
    position: relative; overflow: hidden;
    display: flex; flex-direction: column; gap: 4px;
    min-height: 128px; padding: 26px 9px 10px;
    border-radius: 16px;
    border: 2px solid rgba(0, 0, 0, .88);
    background:
        linear-gradient(146deg, rgba(255, 255, 255, .20) 0%, rgba(255, 255, 255, .04) 34%, rgba(255, 255, 255, 0) 58%),
        radial-gradient(120% 130% at -6% -18%, rgba(255, 155, 230, .34), rgba(239, 2, 203, .16) 42%, rgba(117, 2, 127, 0) 70%),
        linear-gradient(180deg, rgba(46, 10, 42, .9), rgba(14, 6, 20, .92));
    box-shadow: inset 0 0 0 1px rgba(249, 181, 204, .3), 0 10px 22px rgba(0, 0, 0, .45);
}
.fr-tier.is-done {
    border-color: rgba(239, 2, 203, .85);
    box-shadow: inset 0 0 0 1px rgba(255, 214, 242, .55), 0 10px 24px rgba(239, 2, 203, .35);
}
.fr-tier__n {
    position: absolute; left: 8px; top: 6px;
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 20px; height: 20px; padding: 0 5px;
    border-radius: 7px;
    font: 900 11px/1 Unbounded, Montserrat, system-ui, sans-serif;
    color: #fff;
    background: linear-gradient(135deg, #f236ea, #b602ce);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .4), 0 4px 10px rgba(182, 2, 206, .5);
}
.fr-tier__pct {
    font: 900 21px/1 Unbounded, Montserrat, system-ui, sans-serif;
    letter-spacing: -.6px; color: #fff;
    text-shadow: 0 0 16px rgba(239, 2, 203, .6);
}
.fr-tier__cap {
    font-size: 10.5px; line-height: 1.25; font-weight: 600;
    color: rgba(255, 255, 255, .66);
}
.fr-tier__ico {
    position: absolute; right: -6px; bottom: -8px;
    width: 56px; height: 56px; object-fit: contain;
    opacity: .95; pointer-events: none;
    filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .5));
}
/* «5 % с пополнений друзей — навсегда» — широкая строка под карточками */
.fr-wide {
    display: flex; align-items: center; gap: 8px;
    margin: 0; padding: 11px 12px;
    border-radius: 14px;
    border: 1.5px solid rgba(0, 0, 0, .85);
    background: linear-gradient(120deg, rgba(239, 2, 203, .26), rgba(20, 8, 26, .82));
    box-shadow: inset 0 0 0 1px rgba(249, 181, 204, .28);
}
.fr-wide b {
    font: 900 18px/1 Unbounded, Montserrat, system-ui, sans-serif;
    color: #fff; text-shadow: 0 0 14px rgba(239, 2, 203, .6);
}
.fr-wide span { font-size: 12px; font-weight: 600; color: rgba(255, 255, 255, .74); }
/* строки «Моя ссылка» / «Ввести промокод» — как на макете: тёмная плашка + розовая кнопка */
.fr-lines { gap: 9px; }
.fr-ln {
    border-radius: 15px;
    border: 1.5px solid rgba(0, 0, 0, .85);
    background: linear-gradient(160deg, rgba(38, 12, 40, .88), rgba(12, 5, 18, .92));
    box-shadow: inset 0 0 0 1px rgba(249, 181, 204, .2), 0 8px 18px rgba(0, 0, 0, .4);
}
.fr-lt small { color: rgba(255, 255, 255, .55); }
.fr-copy {
    border: 0;
    border-radius: 11px;
    background: linear-gradient(180deg, #f236ea, #ef02cb);
    color: #fff; font-weight: 800;
    box-shadow: 0 6px 16px rgba(239, 2, 203, .4), inset 0 1px 0 rgba(255, 255, 255, .55);
}
.fr-input {
    border: 1px solid rgba(249, 181, 204, .3);
    background: rgba(0, 0, 0, .45);
}
/* статистика и правила — те же неоновые плашки, чтобы экран был однородным */
.fr-stats { gap: 9px; }
.fr-stat {
    border-radius: 16px;
    border: 1.5px solid rgba(0, 0, 0, .85);
    background:
        linear-gradient(146deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, .02) 46%, rgba(255, 255, 255, 0) 60%),
        linear-gradient(180deg, rgba(40, 12, 44, .9), rgba(12, 5, 18, .94));
    box-shadow: inset 0 0 0 1px rgba(249, 181, 204, .22), 0 10px 22px rgba(0, 0, 0, .4);
    -webkit-backdrop-filter: none; backdrop-filter: none;
}
.fr-earn, .fr-rules {
    border-radius: 16px;
    border: 1.5px solid rgba(0, 0, 0, .85);
    background: linear-gradient(180deg, rgba(30, 9, 34, .92), rgba(11, 4, 16, .94));
    box-shadow: inset 0 0 0 1px rgba(249, 181, 204, .18);
    -webkit-backdrop-filter: none; backdrop-filter: none;
}
/* большая кнопка «Пригласить друга» — контурная, как на макете */
.fr-btn {
    height: 50px;
    border-radius: 16px;
    border: 2px solid rgba(249, 120, 220, .8);
    background: linear-gradient(180deg, rgba(239, 2, 203, .32), rgba(117, 2, 127, .5));
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, .22),
        0 12px 26px rgba(0, 0, 0, .45),
        0 0 22px rgba(239, 2, 203, .35);
    font: 900 15px/1 Unbounded, Montserrat, system-ui, sans-serif;
    letter-spacing: -.01em;
}
.fr-btn:active { transform: scale(.99); }

/* ══════════════ ALT-FRIENDS3 (28.11.2026) — «Отчисления партнёра» и панель правил ══════════════
   Макет владельца: шапка блока с монетами и короной, ниже витрина уровней клетками
   «людей → %», текущий уровень подсвечен; правила — готовой неоновой панелью с кроликом.
   Иконки нарезаны из `ICON/Неоновая панель правил приглашения с кроликом.png`
   в `assets/friends/i-*.webp` (128 px, альфа), панель — `assets/friends/rules-panel.webp`. */
.fr-earn2 {
    border-radius: 18px;
    border: 2px solid rgba(0, 0, 0, .9);
    padding: 12px 12px 14px;
    background:
        radial-gradient(120% 90% at 100% 0%, rgba(239, 2, 203, .26), transparent 64%),
        radial-gradient(90% 80% at 0% 100%, rgba(117, 2, 127, .3), transparent 62%),
        linear-gradient(180deg, rgba(32, 9, 36, .94), rgba(10, 4, 14, .96));
    box-shadow:
        inset 0 0 0 1px rgba(249, 181, 204, .28),
        0 12px 26px rgba(0, 0, 0, .45);
    display: flex; flex-direction: column; gap: 10px;
}
.fr-earn2__head { display: flex; align-items: center; gap: 8px; }
.fr-earn2__head b {
    flex: 1 1 auto; min-width: 0;
    font: 800 15px/1.15 Unbounded, Montserrat, system-ui, sans-serif;
    letter-spacing: -.02em; color: #fff;
}
.fr-earn2__coins { flex: none; width: 30px; height: 30px; object-fit: contain; }
.fr-earn2__crown {
    flex: none; width: 34px; height: 34px; object-fit: contain;
    filter: drop-shadow(0 0 10px rgba(239, 2, 203, .5));
}
/* витрина уровней */
.fr-lvl {
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px;
}
.fr-lvl__cell {
    position: relative; overflow: hidden;
    display: flex; flex-direction: column; align-items: flex-start; gap: 5px;
    padding: 9px 9px 10px;
    border-radius: 14px;
    border: 1.5px solid rgba(255, 255, 255, .1);
    background: linear-gradient(160deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, 0) 58%), rgba(12, 5, 18, .72);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12);
}
.fr-lvl__n {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 12px; font-weight: 800; color: rgba(255, 255, 255, .78);
}
.fr-lvl__n img { width: 15px; height: 15px; object-fit: contain; }
.fr-lvl__pct {
    font: 900 16px/1 Unbounded, Montserrat, system-ui, sans-serif;
    color: #fff; letter-spacing: -.03em;
}
/* текущий уровень — как на макете: розовая рамка + свечение */
.fr-lvl__cell.is-now {
    border-color: rgba(249, 120, 220, .95);
    background: linear-gradient(160deg, rgba(239, 2, 203, .34), rgba(70, 6, 66, .8));
    box-shadow:
        inset 0 0 0 1px rgba(255, 214, 242, .55),
        0 0 18px rgba(239, 2, 203, .45);
}
.fr-lvl__cell.is-past { opacity: .72; }
.fr-lvl__cell.is-past .fr-lvl__pct::after {
    content: "✓"; margin-left: 3px; font-size: 11px; color: #5ee04a;
}
/* панель правил картинкой */
.fr-rules2 {
    border-radius: 20px;
    overflow: hidden;
    background: #0b0410;
    border: 2px solid rgba(0, 0, 0, .9);
    box-shadow: inset 0 0 0 1px rgba(249, 181, 204, .22), 0 12px 26px rgba(0, 0, 0, .45);
}
.fr-rules2 img { display: block; width: 100%; height: auto; }

/* ALT-FRIENDS4 (28.11.2026): клетки уровней стали кнопками (4 уровня: 1/6/21/100 → 5/10/15/20 %),
   выбранная клетка подсвечивается, под витриной появляется подпись «Уровень N % — сколько» */
.fr-lvl { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.fr-lvl__cell {
    appearance: none; -webkit-appearance: none;
    font: inherit; color: inherit; text-align: left;
    cursor: pointer;
    padding: 8px 7px 9px;
    transition: transform .12s ease, box-shadow .18s ease, border-color .18s ease;
}
.fr-lvl__cell:active { transform: scale(.97); }
.fr-lvl__n { font-size: 11px; gap: 3px; }
.fr-lvl__n img { width: 13px; height: 13px; }
.fr-lvl__pct { font-size: 13.5px; letter-spacing: -.04em; }
.fr-lvl__cell.is-sel {
    border-color: rgba(255, 255, 255, .85);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .4), 0 0 20px rgba(239, 2, 203, .6);
}
.fr-earn2__cap {
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
    margin: -2px 0 0;
    font-size: 12px; font-weight: 700; color: rgba(255, 255, 255, .8);
}
.fr-earn2__reset {
    appearance: none; border: 1px solid rgba(249, 181, 204, .4);
    background: rgba(255, 255, 255, .08); color: #fff;
    border-radius: 9px; padding: 3px 8px;
    font: 700 11px/1 Montserrat, system-ui, sans-serif;
    cursor: pointer;
}

/* ALT-FRIENDS5 (28.11.2026): «активные / неактивные» вместо голых цифр.
   В клетке уровня — крупный процент и диапазон друзей текстом; под клетками три чипа-фильтра,
   ниже список друзей: сколько каждый пополнил и сколько принёс. */
.fr-lvl__rng {
    display: block;
    font-size: 9.5px; line-height: 1.15; font-weight: 700;
    color: rgba(255, 255, 255, .6);
    letter-spacing: -.01em;
}
.fr-lvl__ok {
    position: absolute; right: 6px; top: 5px;
    font-style: normal; font-size: 10px; font-weight: 900; color: #5ee04a;
    filter: drop-shadow(0 0 6px rgba(94, 224, 74, .6));
}
.fr-lvl__cell { padding-right: 14px; }
.fr-earn2__sum {
    display: block; margin-top: 2px;
    font: 700 10.5px/1.2 Montserrat, system-ui, sans-serif;
    color: rgba(255, 255, 255, .55);
    letter-spacing: 0;
}
.fr-chips { display: flex; gap: 6px; flex-wrap: wrap; margin: -2px 0 2px; }
.fr-chip {
    appearance: none; -webkit-appearance: none; cursor: pointer;
    display: inline-flex; align-items: center; gap: 5px;
    padding: 6px 10px;
    border-radius: 11px;
    border: 1px solid rgba(255, 255, 255, .12);
    background: rgba(255, 255, 255, .06);
    color: rgba(255, 255, 255, .78);
    font: 700 11.5px/1 Montserrat, system-ui, sans-serif;
    transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.fr-chip b { font-weight: 900; color: #fff; }
.fr-chip.is-on {
    border-color: rgba(249, 120, 220, .95);
    background: linear-gradient(180deg, rgba(239, 2, 203, .5), rgba(117, 2, 127, .62));
    color: #fff;
    box-shadow: inset 0 0 0 1px rgba(255, 214, 242, .4), 0 0 16px rgba(239, 2, 203, .4);
}
/* строки друзей: активный — обычный, неактивный — приглушённый */
.fr-row.is-off { opacity: .62; }
.fr-row__off { color: rgba(255, 255, 255, .42) !important; font-style: italic; }
.fr-row__dash { color: rgba(255, 255, 255, .45) !important; }
.fr-row.is-on .fr-row__main span { color: rgba(255, 255, 255, .62); }

/* ══════════════ ALT-FRIENDS7 (28.11.2026) — «Отчисления партнёра» по макету владельца ══════════════
   Макет: неоновая карточка, зайчик с короной в правом верхнем углу, монеты + заголовок и
   подзаголовок, плита итогов (заработано в валюте шапки / друзей / активных), чипы-таблетки
   с точками, список друзей плашками (место, аватарка, @ник, ID снизу, статус, «когда заходил»,
   сумма) и листание по 10 человек стрелочками.
   Арт: `assets/friends/bunny.webp`, иконки `assets/friends/g-*.webp` — нарезаны из листа
   владельца «Неоновый зайчик и набор глянцевых иконок.png». */
.fr-earn2 {
    position: relative;
    border-radius: 22px;
    border: 2px solid rgba(249, 120, 220, .5);
    padding: 12px 11px 11px;
    background:
        radial-gradient(120% 80% at 100% 0%, rgba(239, 2, 203, .3), transparent 62%),
        radial-gradient(90% 70% at 0% 100%, rgba(117, 2, 127, .34), transparent 60%),
        linear-gradient(180deg, rgba(38, 10, 43, .96), rgba(11, 4, 15, .97));
    box-shadow:
        inset 0 0 0 1px rgba(255, 214, 242, .22),
        inset 0 0 34px rgba(239, 2, 203, .16),
        0 0 22px rgba(239, 2, 203, .28),
        0 14px 30px rgba(0, 0, 0, .5);
    display: flex; flex-direction: column; gap: 9px;
    overflow: hidden;
}
/* зайчик с короной — в правом верхнем углу, как на макете (шапка под ним не растягивается) */
.fr-earn2__bunny {
    position: absolute; top: -12px; right: -12px;
    width: 104px; height: auto;
    pointer-events: none;
    filter: drop-shadow(0 6px 16px rgba(0, 0, 0, .55));
}
/* шапка выше зайчика: иначе его лапы налезают на плиту итогов («Активных») */
.fr-earn2__head {
    display: flex; align-items: flex-start; gap: 7px;
    position: relative; z-index: 1;
    padding-right: 88px; min-height: 78px; padding-top: 5px;
}
.fr-earn2__coins { flex: none; width: 30px; height: 30px; object-fit: contain; }
.fr-earn2__titles { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.fr-earn2__titles b {
    font: 800 13px/1.2 Unbounded, Montserrat, system-ui, sans-serif;
    letter-spacing: -.02em; color: #fff; white-space: nowrap;
}
.fr-earn2__titles span {
    font-size: 10px; font-weight: 700; color: rgba(255, 255, 255, .62);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* плита итогов — три колонки с разделителями */
.fr-totals {
    display: grid; grid-template-columns: 1.35fr 1fr 1fr;
    align-items: center;
    border-radius: 16px;
    border: 1px solid rgba(249, 120, 220, .55);
    background: linear-gradient(180deg, rgba(239, 2, 203, .18), rgba(17, 5, 20, .82));
    box-shadow: inset 0 0 0 1px rgba(255, 214, 242, .14), 0 0 16px rgba(239, 2, 203, .22);
    padding: 9px 8px;
    position: relative; z-index: 1;
}
.fr-tot { display: flex; align-items: center; gap: 6px; padding: 0 5px; min-width: 0; }
.fr-tot + .fr-tot { border-left: 1px solid rgba(255, 255, 255, .14); }
.fr-tot__ico { flex: none; width: 22px; height: 22px; object-fit: contain; }
.fr-tot__txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.fr-tot__txt i {
    font-style: normal; font-size: 9.5px; font-weight: 700;
    color: rgba(255, 255, 255, .66); white-space: nowrap;
}
.fr-tot__txt b {
    font: 900 17px/1 Unbounded, Montserrat, system-ui, sans-serif;
    color: #fff; letter-spacing: -.03em; white-space: nowrap;
}
.fr-tot:first-child .fr-tot__txt b { font-size: 18px; text-shadow: 0 0 12px rgba(249, 181, 204, .55); }
/* чипы-таблетки */
.fr-chips { display: flex; gap: 6px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; position: relative; z-index: 1; }
.fr-chips::-webkit-scrollbar { display: none; }
.fr-chip {
    flex: none;
    display: inline-flex; align-items: center; gap: 5px;
    padding: 7px 11px; border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, .16);
    background: linear-gradient(180deg, rgba(255, 255, 255, .1), rgba(255, 255, 255, .03));
    font-size: 11px; font-weight: 800; color: #fff; white-space: nowrap;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12);
}
.fr-chip img { width: 14px; height: 14px; object-fit: contain; }
.fr-chip b { font-weight: 900; }
.fr-chip.is-on {
    border-color: rgba(249, 120, 220, .95);
    background: linear-gradient(180deg, rgba(239, 2, 203, .82), rgba(150, 3, 160, .9));
    box-shadow: inset 0 0 0 1px rgba(255, 214, 242, .45), 0 0 14px rgba(239, 2, 203, .5);
}
.fr-dot {
    flex: none; width: 7px; height: 7px; border-radius: 50%;
    background: rgba(255, 255, 255, .32);
}
.fr-dot.is-on { background: #45e06a; box-shadow: 0 0 8px rgba(69, 224, 106, .9); }
/* список друзей плашками */
.fr-rows { display: flex; flex-direction: column; gap: 6px; position: relative; z-index: 1; }
.fr-row {
    display: flex; align-items: center; gap: 6px;
    padding: 6px 7px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, .13);
    background: linear-gradient(180deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .02));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1);
}
.fr-row.is-off { opacity: .62; }
/* место: 1–3 короны (золото/серебро/бронза), дальше номер */
.fr-rank {
    flex: none; width: 22px; height: 22px; border-radius: 8px;
    display: inline-flex; align-items: center; justify-content: center;
    background: rgba(0, 0, 0, .45);
    border: 1px solid rgba(255, 255, 255, .16);
    font: 900 12px/1 Unbounded, Montserrat, system-ui, sans-serif; color: rgba(255, 255, 255, .82);
}
.fr-rank img { width: 17px; height: 17px; object-fit: contain; }
.fr-rank.is-1 { border-color: rgba(255, 205, 90, .9); box-shadow: 0 0 10px rgba(255, 190, 60, .55); }
.fr-rank.is-1 img { filter: hue-rotate(-28deg) saturate(1.7) brightness(1.25); }
.fr-rank.is-2 { border-color: rgba(215, 220, 235, .85); box-shadow: 0 0 10px rgba(200, 210, 230, .45); }
.fr-rank.is-2 img { filter: grayscale(1) brightness(1.45); }
.fr-rank.is-3 { border-color: rgba(214, 138, 74, .9); box-shadow: 0 0 10px rgba(206, 126, 62, .45); }
.fr-rank.is-3 img { filter: sepia(1) hue-rotate(-18deg) saturate(1.6) brightness(.95); }
.fr-row__ava {
    flex: none; width: 30px; height: 30px; border-radius: 50%; overflow: hidden;
    display: inline-flex; align-items: center; justify-content: center;
    background: linear-gradient(160deg, #ef02cb, #75027f);
    border: 1px solid rgba(255, 214, 242, .45);
    font: 800 13px/1 Unbounded, Montserrat, system-ui, sans-serif; color: #fff;
}
.fr-row__ava img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fr-row__mid { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.fr-row__top { display: flex; align-items: center; gap: 6px; min-width: 0; }
.fr-row__top > b {
    font-size: 13px; font-weight: 800; color: #fff; min-width: 0;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.fr-row__meta { display: flex; align-items: center; gap: 0; min-width: 0; flex-wrap: wrap; }
.fr-state {
    flex: none; display: inline-flex; align-items: center; gap: 4px;
    padding: 2px 7px 2px 6px; border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, .16);
    background: rgba(0, 0, 0, .34);
    font-size: 9.5px; font-weight: 800; color: rgba(255, 255, 255, .72); white-space: nowrap;
}
.fr-state i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, .35); }
.fr-state.is-on { border-color: rgba(69, 224, 106, .6); color: #d6ffe0; }
.fr-state.is-on i { background: #45e06a; box-shadow: 0 0 7px rgba(69, 224, 106, .9); }
.fr-row__id, .fr-row__when {
    font-style: normal; font-size: 9.5px; font-weight: 700;
    color: rgba(255, 255, 255, .45); white-space: nowrap;
    overflow: hidden; text-overflow: ellipsis;
}
/* ID обрезать нельзя никогда — владелец просил показывать его полностью, сжимается текст «был …» */
.fr-row__id { flex: 0 0 auto; }
.fr-row__when { flex: 0 1 auto; min-width: 0; }
.fr-row__when::before { content: "·"; margin-right: 5px; color: rgba(255, 255, 255, .3); }
.fr-row__sum {
    flex: none;
    display: inline-flex; align-items: center; gap: 4px;
    padding: 6px 8px; border-radius: 11px;
    border: 1px solid rgba(249, 120, 220, .75);
    background: linear-gradient(180deg, rgba(239, 2, 203, .34), rgba(117, 2, 127, .5));
    box-shadow: inset 0 0 0 1px rgba(255, 214, 242, .3), 0 0 12px rgba(239, 2, 203, .32);
    font: 900 12.5px/1 Unbounded, Montserrat, system-ui, sans-serif;
    color: #fff; letter-spacing: -.02em; white-space: nowrap;
}
.fr-row__sum img { flex: none; width: 11px; height: 11px; object-fit: contain; }
.fr-row__sum.is-off {
    border-color: rgba(255, 255, 255, .13);
    background: rgba(255, 255, 255, .05);
    box-shadow: none; color: rgba(255, 255, 255, .45);
}
/* листание списка */
.fr-pager { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 2px; }
.fr-pager__b {
    width: 34px; height: 34px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid rgba(249, 120, 220, .8);
    background: linear-gradient(180deg, rgba(239, 2, 203, .5), rgba(117, 2, 127, .7));
    box-shadow: inset 0 0 0 1px rgba(255, 214, 242, .3), 0 0 14px rgba(239, 2, 203, .38);
    color: #fff; font-size: 20px; font-weight: 900; line-height: 1;
    padding-bottom: 3px;
}
.fr-pager__b:disabled {
    opacity: .35; box-shadow: none;
    background: rgba(255, 255, 255, .06);
    border-color: rgba(255, 255, 255, .16);
}
.fr-pager__b:active { transform: scale(.94); }
/* на ПК карточка шире — зайчик и плита чуть крупнее */
@media (min-width: 1024px) {
    .fr-earn2 { padding: 16px 16px 14px; gap: 11px; }
    .fr-earn2__bunny { width: 168px; top: -14px; right: -16px; }
    .fr-earn2__head { padding-right: 150px; min-height: 130px; }
    .fr-earn2__titles b { font-size: 19px; }
    .fr-earn2__titles span { font-size: 12px; }
    .fr-tot__txt i { font-size: 11px; }
    .fr-tot__txt b, .fr-tot:first-child .fr-tot__txt b { font-size: 22px; }
    .fr-tot__ico { width: 28px; height: 28px; }
    .fr-row { padding: 8px 12px; gap: 10px; }
    .fr-row__ava { width: 38px; height: 38px; }
    .fr-row__mid > b { font-size: 15px; }
    .fr-state, .fr-row__id, .fr-row__when { font-size: 11px; }
    .fr-row__sum { font-size: 14px; padding: 7px 12px; }
    .fr-rank { width: 28px; height: 28px; font-size: 13px; }
    .fr-chip { font-size: 12.5px; padding: 8px 14px; }
}

/* ══════════════ ALT-TOPSPEDESTAL (29.11.2026) — новые неоновые пьедесталы лидерборда ══════════════
   Владелец: «прошлые стенды из лидерборда убирай, ставь новые неоновые пьедесталы; в нижнем
   будет сама NFT и её цена, наверху баланс — там второй квадратик, аватарка сама знаешь где».
   Арт нарезан из `ICON/Неоновые пьедесталы лидерборда (1).png` в `assets/tops/ped-1..3.webp`
   (1 — золотой, 2 — серебряный, 3 — розовый). Координаты в процентах от самой картинки
   посчитаны по альфе (кольцо — дырка в альфе, окно — тёмная область в теле):
     место 1: кольцо y 31.4 %, аватар 45.8 % ширины, плашка баланса y 50.0 %, окно y 70.5 %
     место 2: 29.0 / 37.2 / 46.4 / 68.1
     место 3: 28.9 / 35.3 / 46.1 / 67.9
   Позиции — переменные `--ring-y / --ava-w / --bal-y / --win-y` на `.lb-pod__item--N`. */
.lb-pod {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.22fr) minmax(0, 1fr);
    align-items: end;
    gap: 4px;
    padding-bottom: 0;
}
/* ступени больше не отступами — они получаются сами: золотой арт выше остальных,
   а низ у всех выровнен по одной линии */
.lb-pod__item,
.lb-pod__item--2,
.lb-pod__item--3 { padding-top: 0 !important; }
.lb-pod__item {
    display: flex; flex-direction: column; align-items: center;
    gap: 5px; min-width: 0;
}
.lb-pod__head { display: flex; align-items: center; justify-content: center; gap: 5px; width: 100%; min-width: 0; }
.lb-pod__name { max-width: 100%; font-size: 11px; }
.lb-pod__item.is-me .lb-pod__name { color: #ffd3e4; }

/* сцена = сама картинка пьедестала; остальное лежит поверх в процентах */
.lb-pod__stage { position: relative; width: 100%; line-height: 0; }
.lb-pod__art { display: block; width: 100%; height: auto; user-select: none; -webkit-user-drag: none; }

/* аватарка — в кольце */
.lb-pod__ava {
    position: absolute;
    left: 50%;
    top: var(--ring-y, 29%);
    width: var(--ava-w, 38%);
    aspect-ratio: 1 / 1;
    height: auto;
    transform: translate(-50%, -50%);
    border: 0;
    border-radius: 50%;
    overflow: hidden;
    display: flex; align-items: center; justify-content: center;
    background: radial-gradient(circle at 50% 35%, #2b0c35, #120617 70%);
    font: 800 14px/1 Unbounded, Montserrat, system-ui, sans-serif; color: #fff;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, .65);
}
.lb-pod__ava img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lb-pod__ava.is-free { color: rgba(255, 255, 255, .45); font-size: 13px; }

/* старые размеры аватарок (72/56 px) перебивались правилами `.lb-pod__item--N .lb-pod__ava`
   с большей специфичностью — снимаем их: размер теперь из `--ava-w` (в % от картинки) */
.lb-pod__item--1 .lb-pod__ava,
.lb-pod__item--2 .lb-pod__ava,
.lb-pod__item--3 .lb-pod__ava {
    width: var(--ava-w);
    height: auto;
    aspect-ratio: 1 / 1;
    border: 0;
    font-size: 14px;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, .65);
}
/* (ALT-TOPSPED2: размер аватарки теперь только из --ava-w/--ava-h места) */

/* баланс — на «втором квадратике» (полка между кольцом и окном) */
.lb-pod__bal {
    position: absolute;
    left: 50%;
    top: var(--bal-y, 46%);
    transform: translate(-50%, -50%);
    max-width: 96%;
    font: 800 10.5px/1 Unbounded, Montserrat, system-ui, sans-serif;
    color: #fff; white-space: nowrap;
    letter-spacing: -.02em;
    text-shadow: 0 1px 3px rgba(0, 0, 0, .95), 0 0 8px rgba(0, 0, 0, .6);
    background: none; border: 0; padding: 0; border-radius: 0;
}
/* приз — в окне: сама NFT и её цена */
.lb-pod__prize {
    position: absolute;
    left: 50%;
    top: var(--win-y, 68%);
    transform: translate(-50%, -50%);
    width: 62%;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 1px; line-height: 1;
}
.lb-pod__nft {
    width: 74%; max-height: 34px; object-fit: contain;
    filter: drop-shadow(0 3px 7px rgba(0, 0, 0, .7));
}
.lb-pod__price {
    font: 800 9.5px/1 Unbounded, Montserrat, system-ui, sans-serif;
    color: #fff; white-space: nowrap; letter-spacing: -.02em;
    text-shadow: 0 1px 3px rgba(0, 0, 0, .9);
}

/* координаты по местам (из замера картинок) */
.lb-pod__item--1 { --ring-y: 31.4%; --ava-w: 45.8%; --bal-y: 50%;   --win-y: 70.5%; }
.lb-pod__item--2 { --ring-y: 29%;   --ava-w: 37.2%; --bal-y: 45.8%; --win-y: 68.1%; }
.lb-pod__item--3 { --ring-y: 28.9%; --ava-w: 35.3%; --bal-y: 45.5%; --win-y: 67.9%; }
/* на серебряном и розовом полка уже — баланс мельче, иначе вылезает за пьедестал */
.lb-pod__item--2 .lb-pod__bal,
.lb-pod__item--3 .lb-pod__bal { font-size: 9.5px; letter-spacing: -.03em; }

@media (min-width: 1024px) {
    .lb-pod { gap: 14px; }
    .lb-pod__name { font-size: 13px; }
    .lb-pod__ava { font-size: 17px; }
    .lb-pod__bal { font-size: 12.5px; }
    .lb-pod__nft { max-height: 44px; }
    .lb-pod__price { font-size: 11px; }
}

/* ══════════════ ALT-TOPSPED2 (29.11.2026) — аватарка ПОД артом, стеклянные строки, таблетки ══════════════
   Владелец: «можно сделать так, что сначала растягиваем аватарку, а поверх уже сам стенд — краёв
   не будет видно; в топ-4 и т.д. сделай стеклянные кнопки как в других менюшках (по типу настроек
   устройства); добавь сюда живой фон; юзеры в таблетках, баланс в таблетках, надписи в таблетках». */

/* 1) аватарка ЗА пьедесталом: рисуем её эллипсом чуть больше отверстия кольца, сверху ложится
   сам арт (z-index 1) — края аватарки прячутся под кольцом, стыка не видно.
   Размеры = отверстие кольца ×1.12 (замер по альфе листа). */
.lb-pod__art { position: relative; z-index: 1; }
.lb-pod__ava {
    z-index: 0;
    width: var(--ava-w);
    height: var(--ava-h);
    aspect-ratio: auto;
    border: 0;
    box-shadow: none;
}
.lb-pod__item--1 .lb-pod__ava,
.lb-pod__item--2 .lb-pod__ava,
.lb-pod__item--3 .lb-pod__ava {
    width: var(--ava-w);
    height: var(--ava-h);
    aspect-ratio: auto;
    border: 0;
    box-shadow: none;
}
.lb-pod__bal, .lb-pod__prize { z-index: 2; }
.lb-pod__item--1 { --ava-w: 55.6%; --ava-h: 32.1%; }
.lb-pod__item--2 { --ava-w: 46.6%; --ava-h: 28.2%; }
.lb-pod__item--3 { --ava-w: 44.1%; --ava-h: 27.8%; }

/* 2) живой фон — тот же canvas, что на экране настроек (`assets/settings-bg.js`) */
#screen-tops { position: relative; }
#screen-tops .alt-sbg {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    display: block; pointer-events: none; z-index: 1; will-change: transform;
}
#screen-tops .lb, #screen-tops .tops-list-wrap { position: relative; z-index: 2; }

/* 3) строки топ-4 и ниже — стеклянные кнопки как `.ui-cat` в настройках устройства */
.lb-row {
    position: relative;
    display: flex; align-items: center; gap: 7px;
    padding: 8px 9px;
    border: 0;
    border-radius: 18px;
    overflow: hidden;
    color: #fff;
    background:
        linear-gradient(146deg, rgba(255, 255, 255, .22) 0%, rgba(255, 255, 255, .05) 34%, rgba(255, 255, 255, 0) 56%),
        radial-gradient(120% 130% at -6% -18%, rgba(255, 155, 230, .34), rgba(239, 2, 203, .14) 42%, rgba(117, 2, 127, 0) 68%),
        radial-gradient(130% 150% at 0% 0%, rgba(239, 2, 203, .24), rgba(117, 2, 127, .16) 52%, rgba(22, 9, 28, .42));
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    backdrop-filter: blur(18px) saturate(160%);
    box-shadow:
        inset 0 0 0 1px rgba(249, 181, 204, .3),
        inset 0 1px 0 rgba(255, 255, 255, .34),
        0 12px 26px rgba(0, 0, 0, .4);
    transition: transform .14s ease, box-shadow .2s ease;
}
.lb-row::after {
    content: ""; position: absolute; inset: 0 0 auto; height: 44%;
    background: linear-gradient(180deg, rgba(255, 255, 255, .14), rgba(255, 255, 255, 0));
    pointer-events: none;
}
.lb-row:active { transform: scale(.985); }
.lb-row.is-me { box-shadow: inset 0 0 0 1.5px rgba(255, 77, 157, .85), inset 0 1px 0 rgba(255, 255, 255, .34), 0 12px 26px rgba(0, 0, 0, .4); }
.lb-row__rank {
    position: relative; z-index: 1;
    width: 22px; height: 22px; flex: none;
    border-radius: 8px;
    display: inline-flex; align-items: center; justify-content: center;
    background: rgba(0, 0, 0, .42);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14);
    font: 900 11px/1 Unbounded, Montserrat, system-ui, sans-serif;
    color: rgba(255, 255, 255, .85);
}
.lb-row__ava { position: relative; z-index: 1; flex: none; width: 34px; height: 34px; font-size: 14px; }
.lb-row__who { position: relative; z-index: 1; flex: 1 1 auto; min-width: 0; display: flex; }
.lb-row__gift {
    position: relative; z-index: 1;
    flex: none; display: inline-flex; flex-direction: column; align-items: center; gap: 2px;
}
.lb-row__gift .lb-gift { width: 26px; height: 26px; }
.lb-row__gift .lb-prize__tag, .lb-row__gift .lb-prize__price { display: none; }

/* 4) таблетки: ник, баланс, цена приза */
.lb-pill {
    position: relative; z-index: 1;
    display: inline-flex; align-items: center; gap: 4px;
    padding: 5px 10px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, .16);
    background: rgba(0, 0, 0, .34);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14);
    font: 800 11px/1 Unbounded, Montserrat, system-ui, sans-serif;
    letter-spacing: -.02em; color: #fff; white-space: nowrap;
    max-width: 100%;
}
.lb-pill--name { overflow: hidden; text-overflow: ellipsis; display: block; line-height: 1.35; }
.lb-pill--bal {
    flex: none;
    border-color: rgba(249, 120, 220, .6);
    background: linear-gradient(180deg, rgba(239, 2, 203, .38), rgba(117, 2, 127, .5));
    box-shadow: inset 0 0 0 1px rgba(255, 214, 242, .26);
}
.lb-pill--price {
    font-size: 9px; font-weight: 800; padding: 3px 7px;
    border-color: rgba(255, 255, 255, .22);
    background: rgba(0, 0, 0, .42);
}
.lb-pill__ico { width: 11px; height: 11px; object-fit: contain; flex: none; }

/* ник на пьедестале — тоже таблеткой */
.lb-pod__name {
    display: inline-block;
    max-width: 100%;
    padding: 3px 9px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, .14);
    background: rgba(0, 0, 0, .34);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12);
    font: 800 10px/1.3 Unbounded, Montserrat, system-ui, sans-serif;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

@media (min-width: 1024px) {
    .lb-row { padding: 12px 16px; gap: 12px; }
    .lb-row__rank { width: 30px; height: 30px; font-size: 14px; }
    .lb-row__ava { width: 46px; height: 46px; }
    .lb-pill { font-size: 13.5px; padding: 7px 14px; }
    .lb-gift--stars { width: 44px; height: 44px; }
    .lb-pod__name { font-size: 12.5px; padding: 5px 12px; }
}

/* строки топ-4+ больше не во всю ширину: подравниваем по 12 px, как блок над ними (`.lb`) */
@media (max-width: 1023.98px) {
    #screen-tops #tops-leaders-list { padding: 0 12px; }
}

/* ══════════════ ALT-TOPSROW2 (29.11.2026) — строка списка: баланс над ником, приз в строку ══════════════
   Владелец: «нфт картинка слева, справа уже цена нфт, а баланс над юзером — и картинка нфт увеличится». */
.lb-row__mid {
    position: relative; z-index: 1;
    flex: 1 1 auto; min-width: 0;
    display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
}
.lb-row__mid .lb-pill--bal { align-self: flex-start; }
.lb-row__mid .lb-pill--name { display: block; max-width: 100%; }
/* приз: картинка слева, цена справа — рядом, а не друг под другом */
.lb-row__gift {
    position: relative; z-index: 1;
    /* flex-direction сбрасываем: выше (ALT-TOPSPED2) приз стоял колонкой «картинка над ценой»,
       теперь цена справа от картинки, в одну строку — из-за этого NFT и стала крупнее */
    flex: none; display: inline-flex; flex-direction: row; align-items: center; gap: 7px;
}
.lb-row__gift .lb-gift { width: 38px; height: 38px; }
.lb-row__gift .lb-pill--price { flex: none; }

@media (min-width: 1024px) {
    .lb-row__mid { gap: 5px; }
    .lb-row__gift { gap: 9px; }
    .lb-row__gift .lb-gift { width: 46px; height: 46px; }
}

/* ALT-TOPSROW3 (29.11.2026, владелец: «таблетку где цена нфт сделай больше, нфт чутка больше;
   юза и баланс поменяй местами»): ник теперь сверху, баланс под ним (порядок в разметке),
   цена приза крупнее, картинка NFT крупнее. */
.lb-row__mid .lb-pill--name { font-size: 11.5px; padding: 5px 11px; }
.lb-row__mid .lb-pill--bal { font-size: 11px; padding: 5px 11px; }
.lb-row__gift .lb-gift { width: 42px; height: 42px; }
.lb-row__gift .lb-pill--price {
    font-size: 11px; font-weight: 900; padding: 6px 10px;
    border-color: rgba(255, 255, 255, .26);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16);
}
.lb-row__gift .lb-pill__ico { width: 12px; height: 12px; }

@media (min-width: 1024px) {
    .lb-row__mid .lb-pill--name { font-size: 13px; padding: 6px 13px; }
    .lb-row__mid .lb-pill--bal { font-size: 12.5px; padding: 6px 13px; }
    /* ALT-PRIZEBIG (01.12.2026, владелец: «таблетка на компе слишком маленькая»):
       на ПК приз 56 px, цифра 15 px — раньше было 52 / 12,5 */
    .lb-row__gift .lb-gift,
    .lb-row__gift .lb-gift--stars { width: 56px; height: 56px; }
    .lb-row__gift .lb-pill--price { font-size: 15px; padding: 8px 14px; }
    .lb-row__gift .lb-pill__ico { width: 18px; height: 18px; }
}

/* ══════════════ ALT-TOPSROW4 (29.11.2026) — крупная аватарка, световая рамка «это я», таблетки позиции ══════════════
   Владелец: «аватарку надо сделать больше — по границы таблеток юз и баланс; моя таблетка обведена
   розовым как пометка места — сделай её световой, чёрно-фиолетовой, с одной стороны такой цвет,
   с другой такой, и он плавно меняется местами; "баланс: 97к" и "ты в топ-25" — в таблетки,
   "ты в топ-25" белой и жирной, у баланса жирный шрифт». */

/* 1) аватарка в строке — по высоте двух таблеток (ник + баланс) */
.lb-row__ava { width: 50px; height: 50px; font-size: 18px; }
@media (min-width: 1024px) {
    .lb-row__ava { width: 60px; height: 60px; font-size: 21px; }
}

/* 2) своя строка: световая переливающаяся рамка (чёрно-фиолетовый градиент, цвета меняются местами) */
@keyframes lbMeBorderMove {
    0%   { background-position: 0% 50%; }
    100% { background-position: 250% 50%; }
}
@keyframes lbMeGlowPulse {
    0%, 100% { box-shadow: 0 12px 26px rgba(0, 0, 0, .4), 0 0 16px rgba(239, 2, 203, .26); }
    50%      { box-shadow: 0 12px 26px rgba(0, 0, 0, .4), 0 0 26px rgba(117, 2, 127, .58); }
}
.lb-row.is-me {
    border: 0;
    box-shadow: 0 12px 26px rgba(0, 0, 0, .4), 0 0 18px rgba(239, 2, 203, .3);
    animation: lbMeGlowPulse 4.6s ease-in-out infinite;
}
.lb-row.is-me::before {
    content: "";
    position: absolute; inset: 0; z-index: 3;
    border-radius: inherit;
    padding: 1.6px;
    background: linear-gradient(100deg,
        #ef02cb 0%, #75027f 16%, #1c0524 34%, #490b4b 52%, #b602ce 74%, #ef02cb 100%);
    background-size: 250% 100%;
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: lbMeBorderMove 6s linear infinite;
    pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
    .lb-row.is-me { animation: none; }
    .lb-row.is-me::before { animation: none; background-position: 40% 50%; }
}

/* 3) своя позиция внизу: баланс и «ты в топ-25» — таблетками, текст белый жирный */
.lb-mypos__main { align-items: flex-start; gap: 5px; }
/* цвет белый — старое правило `.lb-mypos__main span { color: #ffb3d4 }` (специфичность 0,1,1)
   перебивало наши классы, поэтому пишем через родителя */
.lb-mypos__main .lb-mypos__bal,
.lb-mypos__main .lb-mypos__top { color: #fff; }
.lb-mypos__bal {
    font: 900 12.5px/1 Unbounded, Montserrat, system-ui, sans-serif;
}
.lb-mypos__bal .lb-pill__ico { width: 12px; height: 12px; }
.lb-mypos__top {
    font: 900 11.5px/1.2 Unbounded, Montserrat, system-ui, sans-serif;
    color: #fff;
    background: rgba(0, 0, 0, .42);
    border-color: rgba(255, 255, 255, .2);
}
@media (min-width: 1024px) {
    .lb-mypos__bal { font-size: 14px; }
    .lb-mypos__top { font-size: 12.5px; }
}

/* ══════════════ ALT-TOPSROW5 (29.11.2026) — своя таблетка «мигает» целиком ══════════════
   Владелец: «хочу, чтобы вся таблетка мигала плавно с красивой анимацией, чтобы точно понимать,
   что я в топе и на таком месте». Поверх уже есть переливающаяся рамка-кольцо (`::before`):
   добавляем световой блик, который плавно проходит по карточке, мягкий пульс свечения
   и подкрашенный бейдж места. */
@keyframes lbMeShine {
    0%   { background-position: 165% 0; opacity: 0; }
    12%  { opacity: 1; }
    70%  { opacity: 1; }
    100% { background-position: -65% 0; opacity: 0; }
}
@keyframes lbMeGlowPulse {
    0%, 100% { box-shadow: 0 12px 26px rgba(0, 0, 0, .4), 0 0 14px rgba(239, 2, 203, .22); }
    50%      { box-shadow: 0 12px 26px rgba(0, 0, 0, .4), 0 0 30px rgba(239, 2, 203, .5), 0 0 48px rgba(117, 2, 127, .36); }
}
.lb-row.is-me { animation: lbMeGlowPulse 4.6s ease-in-out infinite; }

.lb-row__shine {
    position: absolute; inset: 0; z-index: 2;
    border-radius: inherit;
    pointer-events: none;
    background: linear-gradient(100deg,
        rgba(255, 255, 255, 0) 32%,
        rgba(249, 181, 204, .26) 45%,
        rgba(255, 255, 255, .34) 50%,
        rgba(239, 2, 203, .3) 56%,
        rgba(255, 255, 255, 0) 69%);
    background-size: 260% 100%;
    background-repeat: no-repeat;
    animation: lbMeShine 3.8s ease-in-out infinite;
    will-change: background-position, opacity;
}
/* бейдж места в своей строке — тоже подкрашен, чтобы номер был виден сразу */
.lb-row.is-me .lb-row__rank {
    background: linear-gradient(150deg, #ef02cb, #75027f);
    color: #fff;
    box-shadow: inset 0 0 0 1px rgba(255, 214, 242, .45), 0 0 10px rgba(239, 2, 203, .45);
}
.lb-row.is-me .lb-pill--name { border-color: rgba(249, 181, 204, .4); }

@media (prefers-reduced-motion: reduce) {
    .lb-row__shine { animation: none; opacity: .35; background-position: 50% 0; }
}

/* ══════════════ ALT-SEASON (29.11.2026) — баннер сезона на «Лидерах» ══════════════
   Владелец: «надо сделать вот такое, естественно счётчик таймера и сезон; сами собираем,
   детали есть, там даже анимации — папка ICON/ЕЩЗЫ». Собрано из `Неоновый набор UI «Сезон №12».png`:
   корона, две лавровые ветви, звёздочки и капсула-таблетка (assets/season/*.webp), плюс анимации
   часов и сундука, пережатые из GIF в animated WebP 220 px (9 кадров, ~100 КБ вместо 340–390).
   Числа таймера — те же id `tops-d/h/m/s`: их считает существующий tick() в app_v2.js
   (конец периода = последний день текущего месяца). */
.lb-season {
    position: relative;
    margin: 2px 0 10px;
    padding-top: 22px;                 /* воздух под корону */
    isolation: isolate;
}
.lb-season__card {
    position: relative;
    padding: 28px 6px 13px;
    border-radius: 26px;
    text-align: center;
    background:
        linear-gradient(180deg, rgba(126, 22, 138, .55) 0%, rgba(58, 8, 66, .72) 46%, rgba(28, 5, 34, .9) 100%),
        radial-gradient(120% 90% at 50% -10%, rgba(255, 155, 230, .28), rgba(255, 155, 230, 0) 68%);
    border: 1.5px solid rgba(239, 2, 203, .55);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .22),
        inset 0 -14px 26px rgba(239, 2, 203, .12),
        0 0 22px rgba(239, 2, 203, .34),
        0 14px 30px rgba(0, 0, 0, .5);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}
.lb-season__crown {
    position: absolute; left: 50%; top: 0; z-index: 3;
    width: 84px; height: auto;
    transform: translate(-50%, 0);
    filter: drop-shadow(0 0 12px rgba(255, 190, 60, .5));
    pointer-events: none;
}
/* часы и сундук (анимации) стоят В СТРОКЕ ЗАГОЛОВКА рядом с лавровыми ветками —
   владелец: «анимации надо было добавить где написано сезон, рядом с перышками» */
.lb-season__anim {
    flex: none;
    width: 34px; height: auto;
    align-self: center;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .55));
    pointer-events: none;
}
.lb-season__anim--chest { width: 38px; }
.lb-season__spark { position: absolute; z-index: 0; pointer-events: none; opacity: .85; }
.lb-season__spark--a { left: 30px; top: 30px; width: 22px; }
.lb-season__spark--b { right: 40px; top: 60px; width: 16px; }
.lb-season__title {
    display: flex; align-items: center; justify-content: center; gap: 6px;
    font: 900 19px/1.1 Unbounded, Montserrat, system-ui, sans-serif;
    color: #fff;
    text-shadow: 0 0 14px rgba(255, 90, 225, .65), 0 2px 4px rgba(0, 0, 0, .5);
}
.lb-season__title b { font-weight: 900; }
.lb-season__laurel { width: 22px; height: auto; flex: none; }
.lb-season__cap {
    margin: 5px 0 9px;
    font: 700 11.5px/1.2 Unbounded, Montserrat, system-ui, sans-serif;
    color: #efd9ea;
    text-shadow: 0 1px 3px rgba(0, 0, 0, .6);
}
.lb-season__timer { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.lb-season__pill {
    display: flex; align-items: baseline; justify-content: center; gap: 3px;
    padding: 9px 2px 8px;
    border-radius: 14px;
    background-image: url(assets/season/pill.webp?v=sz01);
    background-size: 100% 100%;
    background-repeat: no-repeat;
    min-width: 0;
}
.lb-season__pill b {
    font: 900 15px/1 Unbounded, Montserrat, system-ui, sans-serif;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, .55);
}
.lb-season__pill i {
    font: 700 8.5px/1 Unbounded, Montserrat, system-ui, sans-serif;
    font-style: normal;
    color: #ffd7f4;
    white-space: nowrap;
}

@media (min-width: 1024px) {
    .lb-season { margin: 6px 0 14px; padding-top: 30px; max-width: 640px; margin-left: auto; margin-right: auto; }
    .lb-season__card { padding: 40px 14px 18px; border-radius: 30px; }
    .lb-season__crown { width: 112px; }
    .lb-season__anim { width: 44px; }
    .lb-season__anim--chest { width: 50px; }
    .lb-season__spark--a { width: 34px; left: 62px; top: 10px; }
    .lb-season__spark--b { width: 24px; right: 72px; top: 54px; }
    .lb-season__title { font-size: 25px; gap: 10px; }
    .lb-season__laurel { width: 28px; }
    .lb-season__cap { font-size: 13.5px; margin: 7px 0 12px; }
    .lb-season__timer { gap: 10px; }
    .lb-season__pill { padding: 12px 4px 10px; }
    .lb-season__pill b { font-size: 19px; }
    .lb-season__pill i { font-size: 10.5px; }
}

/* ALT-TOPSPED4 (29.11.2026): пока арт пьедестала не пришёл, аватарка (она лежит ПОД артом) торчала
   цветным кружком. Прячем её, пока картинка не загрузилась; класс `is-art` ставит onload/onerror. */
.lb-pod__stage:not(.is-art) .lb-pod__ava { opacity: 0; }

/* ALT-TOPSROW6 (29.11.2026): ник в нижнем списке — без таблетки, обычным жирным текстом */
.lb-row__nick {
    display: block;
    max-width: 100%;
    font: 800 12px/1.25 Unbounded, Montserrat, system-ui, sans-serif;
    letter-spacing: -.02em;
    color: #fff;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    text-shadow: 0 1px 3px rgba(0, 0, 0, .6);
}
.lb-row.is-me .lb-row__nick { color: #ffd3e4; }
.lb-row__mid .lb-pill--bal { margin-top: 1px; }
@media (min-width: 1024px) {
    .lb-row__nick { font-size: 13.5px; }
}
/* ══════════════ ALT-FLATFRAMES (29.11.2026) ══════════════
   Владелец: «видишь, за этими кнопками фон как бы цветной — надо рамку за ней убрать прям; во вкладке
   друзья тоже надо такое убрать, и в других менюшках посмотри, где портит вид». Снимаем неоновые
   розовые рамки/обводки с плашек: остаётся обычное стекло с тонкой светлой обводкой и верхним бликом.
   Исключения (оставлены намеренно): кнопки-заливки (Копировать/Принять/Пригласить) — они кнопки, а не
   рамки; своя строка в лидерборде и карточка TikTok — там рамка анимированная и владелец её просил. */
.fr-hero,
.fr-tier,
.fr-tier.is-done,
.fr-wide,
.fr-ln,
.fr-stat,
.fr-earn,
.fr-rules,
.fr-earn2,
.fr-btn {
    border: 1px solid rgba(255, 255, 255, .12);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .09), 0 10px 22px rgba(0, 0, 0, .42);
}
/* достигнутый уровень виден свечением, но без жирной розовой обводки */
.fr-tier.is-done {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 0 18px rgba(239, 2, 203, .26),
                0 10px 22px rgba(0, 0, 0, .42);
}
.fr-lvl__cell, .fr-input { border: 1px solid rgba(255, 255, 255, .14); }
/* панель правил: убираем лишнюю тёмную рамку с розовой обводкой вокруг арта — картинка заподлицо */
/* Панель правил — ОТДЕЛЬНЫЙ арт с прозрачным фоном: никакой подложки, рамки, скругления и тени за ним.
   Владелец 29.11.2026: «нахуя ты рамку взаде него поставил большую? это же отдельный арт с прозрачным
   фоном». Поэтому снимаем и `background: #0b0410` из ALT-FRIENDS3, и `overflow: hidden` с радиусом
   (они обрезали бы свечение арта по краям). */
.fr-rules2 {
    border: 0;
    border-radius: 0;
    background: none;
    overflow: visible;
    box-shadow: none;
}

/* ALT-FLATFRAMES (29.11.2026, «пройдись по профилю, кошельку, бонусам, VIP»): у строки VIP-уровня
   нет розовой рамки — текущий уровень виден мягким свечением, а не обводкой. */
.vip-row.on {
    border-color: rgba(255, 255, 255, .16);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 0 18px rgba(239, 2, 203, .22);
}

/* ══════════════ ALT-EARN2AIR (29.11.2026) — «Отчисления партнёра» без большой рамки ══════════════
   Владелец: «и тут нахуя такая большая рамка? убирай». У карточки отчислений больше нет ни заливки,
   ни обводки, ни тени — заголовок, плита итогов, чипы и список друзей лежат прямо на фоне и
   выровнены по краям экрана, как остальные блоки. Розовые обводки плиты итогов и сумм тоже сняты:
   это плашки с числами, а не рамки. Заливки-состояния (активный чип, точка «Активен») не трогаем. */
.fr-earn2 {
    border: 0;
    border-radius: 0;
    padding: 0;
    background: none;
    box-shadow: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}
.fr-earn2__bunny { right: 0; }
.fr-totals {
    border: 1px solid rgba(255, 255, 255, .12);
    background: linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(16, 6, 20, .72));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .10), 0 8px 18px rgba(0, 0, 0, .35);
}
.fr-row__sum {
    border: 1px solid rgba(255, 255, 255, .16);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14);
}

/* ═══════════════════════════════════════════════════════════════════════════
   ALT-UPNOBAR (04.12.2026, слово владельца): «шапку в апгрейдере скрываем — я так подумал,
   она нам там не нужна; а лайф опускаем ниже кнопок Телеграма по самую шапку».
   На телефоне в Апгрейде шапки нет: кадр начинается сразу под панелью клиента, поэтому
   первой строкой идёт лента LIVE (кадр резервирует место по краям под наши плавающие
   кнопки: «Мои раунды» слева, «Честная игра» справа). На ПК шапка остаётся — там своя
   раскладка с балансом и навигацией.
   ═══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 1023.98px) {
  /* ALT-UPNOBAR2 (04.12.2026, поправка владельца): лента LIVE должна стоять НИЖЕ кнопок
     Telegram — ровно там, где раньше была наша шапка. `--alt-topbar-safe` в его клиенте 0
     (панель клиента не приходит), поэтому берём `--tg-top`: реальный инсет панели Telegram
     (его ставит assets/tg-layout.js, в fullscreen минимум 56 px, в браузере — 0). */
  html.alt-up-nobar { --up-nobar-top: calc(var(--tg-top, 0px) + 6px); }
  html.alt-up-nobar.is-tg #app-topbar.topbar,html.alt-up-nobar #app-topbar.topbar{display:none!important}
  html.alt-up-nobar #screen-upgrade.page { top: var(--up-nobar-top) !important; }
  /* «Честная игра» встаёт в ту же полосу, что и лента LIVE (кадр резервирует ей место справа) */
  html.alt-up-nobar .alt-fair-btn { top: calc(var(--up-nobar-top) + 8px); }
  /* «Мои раунды» на телефоне убраны совсем (слово владельца 04.12.2026) */
  html.alt-up-nobar #screen-upgrade .pix-hist-btn { display: none !important; }
}

/* ══════════════ ALT-NOART (04.12.2026) ══════════════
   Владелец: «из анимации убрать наши картинки, которые мы туда нарезали» (речь про разделы
   «Друзья» и «Лидеры»). Убраны НАШИ нарезки:
     • «Лидеры», сезонная карточка: корона, искры, песочные часы, лавровые ветки, сундук
       (assets/season/*.webp) — остались текст «Сезон № N», подпись и таймер;
     • «Друзья»: неоновые иконки в карточках процентов (assets/me/icon-*.webp), зайчик с короной
       и монеты (assets/friends/bunny.webp, g-coins.webp), иконки в плите итогов/чипах (g-people,
       g-spark), корона места в списке (g-crown). Панель «Правила приглашения» оставлена: это текст
       правил, а не декор.
   Карточка сезона без короны сверху — убираем резерв под неё, чтобы не было пустой полосы. */
.lb-season { padding-top: 0; }
.lb-season__card { padding-top: 18px; }
/* карточки процентов на «Друзьях»: иконки были в углу — без них низ карточки не пустует, но
   воздуха под подпись меньше не нужно, оставляем как есть (высота задана min-height) */


/* ══════════════ ALT-NODARK (04.12.2026) ══════════════
   Владелец (скриншот «Друзей» на ПК): «квадрат, который перекрывает фон / затемняет — уберём?».
   Речь про блок «Приглашай друзей и получай бонусы»: панель была залита почти непрозрачным тёмным,
   а карточки процентов — вообще чёрными (rgba(46,10,42,.9) → rgba(14,6,20,.92)), из-за чего живой
   фон под ними пропадал. Теперь это лёгкое стекло: маджентовая дымка + тонкая рамка, фон виден,
   белый текст и мелкие подписи остаются читаемыми. */
.fr-hero {
    background:
        radial-gradient(120% 90% at 100% 0%, rgba(182, 2, 206, .20), transparent 62%),
        radial-gradient(90% 80% at 0% 100%, rgba(239, 2, 203, .13), transparent 62%),
        rgba(10, 4, 16, .06) !important;
    border-color: rgba(249, 181, 204, .26) !important;
    box-shadow:
        inset 0 0 0 1px rgba(249, 181, 204, .12),
        0 18px 34px rgba(0, 0, 0, .26) !important;
}
.fr-tier {
    background:
        linear-gradient(146deg, rgba(255, 255, 255, .16) 0%, rgba(255, 255, 255, .04) 34%, rgba(255, 255, 255, 0) 58%),
        radial-gradient(120% 130% at -6% -18%, rgba(255, 155, 230, .24), rgba(239, 2, 203, .12) 42%, rgba(117, 2, 127, 0) 70%),
        rgba(10, 4, 16, .16) !important;
    border-color: rgba(249, 181, 204, .28) !important;
    box-shadow:
        inset 0 0 0 1px rgba(249, 181, 204, .18),
        0 10px 22px rgba(0, 0, 0, .28) !important;
}
/* «5 % с пополнений друзей — навсегда» и подписи внутри панели: та же логика, без глухой заливки */
.fr-wide {
    background: rgba(239, 2, 203, .12) !important;
    border-color: rgba(249, 181, 204, .26) !important;
}
