/* ScorpionX Elite UI v4
   A complete mobile-first pass across home, games, wallet, profile, gifts and money sheets. */

:root {
    --sx-bg: #050607;
    --sx-surface: #101113;
    --sx-surface-2: #171719;
    --sx-line: rgba(255,255,255,.10);
    --sx-line-hot: rgba(255,183,63,.34);
    --sx-gold: #ffbd4a;
    --sx-gold-2: #ff8a1f;
    --sx-ice: #f8f4ec;
    --sx-muted: #9b9893;
    --sx-green: #50e5a1;
    --sx-red: #ff697b;
    --sx-cyan: #61c8ff;
    --sx-radius: 22px;
    --sx-ease: cubic-bezier(.2,.8,.2,1);
}

body { font-size: 16px; }

.arena-atmosphere { z-index: 0; }
.app { position: relative; z-index: 1; display: flex; flex-direction: column; }
.app > .topbar { order: 0; }
.app > .hero { order: 1; }
/* Put playable content ahead of analytics on the home screen. */
.app > section:nth-of-type(3) { order: 2; }
.app > section:nth-of-type(2) { order: 3; }
.app > section:nth-of-type(4) { order: 4; }

/* HOME — reduce ceremony and expose playable content in the first viewport */
.app { max-width: 760px; }

.hero {
    min-height: 300px;
    padding: 112px 22px 22px;
    border-radius: 28px;
    background:
        linear-gradient(180deg, rgba(5,6,7,.02), rgba(5,6,7,.18) 28%, rgba(5,6,7,.96) 72%),
        linear-gradient(115deg, rgba(255,143,32,.08), transparent 45%);
}

.hero h1 { font-size: clamp(42px, 12vw, 66px); }
.hero-description { font-size: 16px; }
.hero-actions .btn { min-height: 54px; font-size: 14px; }

.stats-grid {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(132px, 1fr);
    grid-template-columns: none;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    margin-inline: -14px;
    padding: 0 14px 8px;
}
.stats-grid::-webkit-scrollbar { display: none; }
.stat-card { min-height: 96px; scroll-snap-align: start; }
.stat-label { font-size: 13px; }
.stat-value { font-size: 24px; }
#prizePool { font-size: 19px; white-space: nowrap; }

.games-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
.game-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: stretch;
    width: 100%;
    min-height: 216px;
    padding: 17px;
    border-radius: 25px;
    border: 1px solid rgba(255,255,255,.11);
    background: #0d0e10;
    color: var(--sx-ice);
    text-align: left;
}
.game-card::before, .game-card::after { display: none; }
.game-card-art, .game-card-shade { position: absolute; inset: 0; pointer-events: none; }
.game-card-art {
    z-index: -2;
    background-position: center;
    background-size: cover;
    transition: transform .55s var(--sx-ease), filter .3s ease;
}
.game-card-dice-duel .game-card-art { background-image: url("/assets/game-dice-v3.webp"); }
.game-card-pvp-duel .game-card-art { background-image: url("/assets/game-wheel-v3.webp"); }
.game-card-tournament .game-card-art { background-image: url("/assets/game-tournament-v3.webp"); }
.game-card-shade {
    z-index: -1;
    background: linear-gradient(180deg, rgba(4,5,6,.16), rgba(4,5,6,.20) 30%, rgba(4,5,6,.94) 78%, #050607 100%), linear-gradient(90deg, rgba(4,5,6,.48), transparent 76%);
}
.game-card-topline, .game-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.game-kicker { font-size: 10px; font-weight: 900; letter-spacing: .14em; color: rgba(255,255,255,.72); }
.game-live { display: inline-flex; align-items: center; gap: 5px; padding: 6px 8px; border-radius: 999px; background: rgba(0,0,0,.48); color: #aaa; font-size: 9px; font-weight: 950; letter-spacing: .1em; }
.game-live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.game-live.is-live { color: #81efba; border: 1px solid rgba(80,229,161,.24); }
.game-card-copy { display: grid; gap: 7px; }
.game-name { margin: 0; font-size: 21px; letter-spacing: -.035em; }
.game-description { min-height: 38px; color: rgba(244,239,232,.65); font-size: 12px; line-height: 1.5; }
.game-card-footer { margin-top: 5px; }
.game-mode { padding: 6px 8px; border: 1px solid rgba(255,255,255,.12); border-radius: 9px; background: rgba(255,255,255,.06); color: #d1ccc4; font-size: 9px; font-weight: 900; letter-spacing: .09em; }
.game-enter { color: var(--sx-gold); font-size: 11px; font-weight: 950; letter-spacing: .08em; }
.game-enter b { margin-left: 3px; font-size: 17px; }
.game-card:active .game-card-art { transform: scale(1.04); filter: brightness(1.1); }
.game-card-error { justify-content: center; min-height: 130px; padding: 22px; color: var(--sx-muted); }
#gamesGrid .game-card.gp-card { background: #0d0e10; }
#gamesGrid .game-card.gp-card::after { display: none; }

@media (hover:hover) {
    .game-card:hover .game-card-art { transform: scale(1.045); filter: brightness(1.08); }
}

/* Games lobby */
.gp-hero {
    padding: 21px;
    margin-bottom: 13px;
    border-radius: 25px;
    background: radial-gradient(circle at 90% 5%,rgba(255,145,31,.22),transparent 38%),linear-gradient(145deg,rgba(44,29,15,.95),rgba(8,9,10,.96));
    border-color: rgba(255,184,65,.24);
}
.gp-hero::after { content: ""; }
.gp-kicker { color: var(--sx-gold); font-size: 11px; }
.gp-title { margin: 7px 0; font-size: 29px; letter-spacing: -.04em; }
.gp-sub { max-width: 90%; color: var(--sx-muted); font-size: 14px; }
.gp-launch-grid { display: grid; gap: 10px; margin-bottom: 14px; }
.gp-launch {
    position: relative;
    isolation: isolate;
    display: grid;
    align-content: end;
    width: 100%;
    min-height: 176px;
    overflow: hidden;
    padding: 17px;
    border: 1px solid rgba(255,255,255,.11);
    border-radius: 23px;
    background-position: center;
    background-size: cover;
    color: white;
    text-align: left;
    box-shadow: 0 17px 45px rgba(0,0,0,.30);
}
.gp-launch::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg,rgba(4,5,6,.05),rgba(4,5,6,.26) 32%,rgba(4,5,6,.96)); }
.gp-launch-dice { background-image: url("/assets/game-dice-v3.webp"); }
.gp-launch-wheel { background-image: url("/assets/game-wheel-v3.webp"); }
.gp-launch-tournament { background-image: url("/assets/game-tournament-v3.webp"); }
.gp-launch-kicker { margin-bottom: 5px; color: var(--sx-gold); font-size: 10px; font-weight: 900; letter-spacing: .13em; }
.gp-launch strong { font-size: 22px; letter-spacing: -.03em; }
.gp-launch > span:not(.gp-launch-kicker) { margin-top: 4px; color: rgba(255,255,255,.66); font-size: 13px; }
.gp-launch b { position: absolute; right: 16px; bottom: 17px; color: var(--sx-gold); font-size: 11px; letter-spacing: .08em; }
.gp-launch:active { transform: scale(.98); }
.gp-stats { gap: 8px; margin: 13px 0; }
.gp-stat { min-height: 75px; display: grid; place-content: center; }
.gp-stat b { font-size: 21px; }
.gp-stat span { font-size: 10px; }
.gp-filter { min-height: 40px; font-size: 12px; }
.gp-hname { font-size: 14px; }
.gp-hmeta { font-size: 12px; }
.gp-result { font-size: 11px; }

/* Full-screen navigation surfaces */
#akMainSections,
.gift-center {
    width: 100%;
    max-width: none;
    padding-inline: max(14px, calc((100vw - 720px) / 2));
}

.ak2-head, .gift-head {
    min-height: 64px;
    align-items: center;
    margin-bottom: 10px;
}
.ak2-title, .gift-title { font-size: 26px; }
.gift-subtitle { font-size: 13px; }
.ak2-close, .gift-close {
    width: 46px;
    height: 46px;
    border-radius: 15px;
    font-size: 24px;
}
.ak2-tabs, .gift-tabs { position: sticky; top: 68px; z-index: 9; margin-bottom: 16px; }
.ak2-tab, .gift-tab { min-height: 48px; font-size: 14px; }
.ak2-card { padding: 18px; border-radius: 23px; }
.ak2-label { font-size: 12px; }
.ak2-value { font-size: 25px; }
.ak2-note, .ak2-muted { font-size: 14px; }
.ak2-action { min-height: 54px; font-size: 15px; }
.ak2-history-item { padding: 14px; }

/* DASHBOARDS — replace the old tiny dashboard typography */
.wp-wrap, .pp-wrap, .ap-wrap { gap: 14px; max-width: 720px; margin-inline: auto; }
.wp-hero, .pp-hero, .ap-hero { padding: 20px; border-radius: 26px; }
.wp-kicker, .ap-kicker { font-size: 11px; letter-spacing: .12em; }
.wp-balance { font-size: 34px; }
.wp-sub, .ap-sub, .pp-handle { font-size: 13px; line-height: 1.5; }
.wp-live, .ap-live, .pp-rank { font-size: 11px; }
.wp-action { min-height: 62px; font-size: 13px; }
.wp-action-icon { font-size: 20px; }
.wp-summary-card, .pp-stat, .ap-stat { min-height: 92px; padding: 16px; border-radius: 19px; }
.wp-summary-label, .pp-stat-label, .ap-stat-label { font-size: 11px; }
.wp-summary-value, .pp-stat-value, .ap-stat-value { font-size: 21px; }
.wp-summary-note, .pp-stat-sub, .ap-stat-sub { font-size: 12px; }
.wp-card, .pp-card, .ap-card { padding: 17px; border-radius: 22px; }
.wp-title, .pp-card-title, .ap-card-title { font-size: 16px; }
.wp-note, .pp-card-note, .ap-note { font-size: 12px; }
.wp-filter { min-height: 38px; padding: 9px 13px; font-size: 12px; }
.wp-row, .pp-activity-row, .ap-feed-row, .ap-game { min-height: 64px; padding: 13px; }
.wp-row-title, .pp-activity-title, .ap-feed-title, .ap-game-name { font-size: 14px; }
.wp-row-meta, .pp-activity-meta, .ap-feed-meta, .ap-game-meta { font-size: 12px; }
.wp-row-amount, .pp-activity-value, .ap-feed-value { font-size: 13px; }
.wp-status, .ap-game-badge { font-size: 10px; }
.wp-row-icon, .pp-activity-icon, .ap-feed-icon { width: 42px; height: 42px; }

.pp-user { gap: 14px; }
.pp-avatar-shell { width: 76px; height: 76px; }
.pp-name { font-size: 22px; }
.pp-level-line { font-size: 13px; }
.pp-badge { min-height: 88px; display: grid; align-content: center; }
.pp-badge-icon { font-size: 28px; }
.pp-badge-name { font-size: 12px; }

.ap-title { font-size: 29px; }
.ap-hero-label { font-size: 10px; }
.ap-hero-value { font-size: 20px; }
.ap-mission { padding: 14px; }
.ap-mission-name { font-size: 14px; }
.ap-mission-reward { font-size: 12px; }
.ap-mission-meta { font-size: 11px; }
.ap-action { min-height: 52px; font-size: 14px; }

/* GIFT CENTER */
.gift-summary { padding: 19px; border-radius: 24px; }
.gift-summary-label { font-size: 12px; }
.gift-summary-value { font-size: 27px; }
.gift-deposit-quick { min-height: 48px; font-size: 14px; }
.gift-section-title { font-size: 19px; }
.gift-refresh { min-height: 40px; font-size: 13px; }
.gift-card { padding: 12px; }
.gift-art {
    position: relative;
    display: grid;
    height: 150px;
    place-items: center;
    overflow: hidden;
    font-size: 58px;
    background:
        radial-gradient(circle at 50% 48%, rgba(255,190,74,.24), transparent 28%),
        radial-gradient(circle at 50% 50%, #261d13, #101113 70%);
}
.gift-card:nth-child(2n) .gift-art { background: radial-gradient(circle at 50% 48%,rgba(139,92,246,.3),transparent 30%),radial-gradient(circle at 50% 50%,#1d1730,#101113 70%); }
.gift-card:nth-child(3n) .gift-art { background: radial-gradient(circle at 50% 48%,rgba(80,229,161,.22),transparent 30%),radial-gradient(circle at 50% 50%,#10251e,#101113 70%); }
.gift-art::before { content:""; position:absolute; width:78px; height:78px; border:1px solid rgba(255,255,255,.13); border-radius:24px; transform:rotate(45deg); box-shadow:0 0 42px rgba(255,184,65,.14),inset 0 0 25px rgba(255,255,255,.04); }
.gift-art.has-symbol-backdrop::before,
.gift-detail-hero.has-symbol-backdrop::before {
    inset: -22px;
    width: auto;
    height: auto;
    border: 0;
    border-radius: 0;
    transform: none;
    box-shadow: none;
    background-image: var(--gift-symbol-image);
    background-repeat: repeat;
    background-size: 44px 44px;
    background-position: center;
    opacity: .14;
    filter: saturate(.35) brightness(1.6);
    animation: giftBackdropDrift 14s linear infinite;
}
.gift-card-title { font-size: 15px; }
.gift-card-meta { font-size: 12px; }
.gift-details { font-size: 12px; }
.gift-deposit-card { padding: 21px; }
.gift-deposit-heading { font-size: 23px; }
.gift-deposit-copy { font-size: 14px; }
.gift-vault-label { font-size: 12px; }
.gift-vault-user { font-size: 20px; }
.gift-step { min-height: 66px; padding: 11px; }
.gift-step-title { font-size: 14px; }
.gift-step-copy { font-size: 12px; }
.gift-main-action { min-height: 56px; font-size: 15px; }
.gift-warning, .gift-history-meta { font-size: 12px; }

/* GAME HOST — native fullscreen, one scroll owner, no nested card */
#arenaGamesV2Root {
    align-items: stretch;
    padding: 0;
    background: #050607 !important;
    backdrop-filter: none;
}

#arenaGamesV2Root .ag2-panel {
    width: 100%;
    max-width: 760px;
    height: 100dvh;
    max-height: none;
    margin: 0 auto;
    padding: max(15px, env(safe-area-inset-top)) 15px calc(26px + env(safe-area-inset-bottom));
    border: 0;
    border-radius: 0;
    background:
        radial-gradient(circle at 85% 0%, rgba(255,142,30,.12), transparent 29%),
        linear-gradient(180deg, #0b0b0c, #050607 45%);
    box-shadow: none;
}

#arenaGamesV2Root .ag2-header {
    align-items: center;
    min-height: 63px;
    margin: -15px -15px 0;
    padding: max(10px, env(safe-area-inset-top)) 15px 10px;
    border-bottom: 1px solid var(--sx-line);
    background: rgba(7,8,9,.87);
}
.ag2-title { font-size: 22px; }
.ag2-description { max-width: 520px; font-size: 13px; }
.ag2-close { width: 46px; height: 46px; border-radius: 15px; font-size: 24px; }
.ag3-header-actions { display: flex; align-items: center; gap: 8px; }
.ag3-header-actions .ag3-sound-button { position: static; width: 46px; height: 46px; border-radius: 15px; }
#arenaGamesV2Root[data-active-game="pvp-duel"] .ag3-sound-button { display: none !important; }
.ag2-balance { padding: 13px 15px; }
.ag2-balance-label { font-size: 12px; }
.ag2-balance-value { font-size: 23px; }
.ag2-tab { min-height: 48px; font-size: 14px; }
.ag2-label { font-size: 14px; }
.ag2-input { height: 58px; font-size: 22px; }
.ag2-preset { min-height: 42px; font-size: 13px; }
.ag2-action { min-height: 58px; font-size: 16px; }
.ag2-notice, .ag2-queue { font-size: 13px; line-height: 1.55; }
.ag2-summary-label { font-size: 11px; }
.ag2-summary-value { font-size: 22px; }

/* The wheel package already has everything the host header showed. */
#arenaGamesV2Root[data-active-game="pvp-duel"] .ag2-panel {
    overflow: hidden;
    padding: 0;
}
#arenaGamesV2Root[data-active-game="pvp-duel"] .ag2-panel > .ag2-header,
#arenaGamesV2Root[data-active-game="pvp-duel"] .ag2-panel > .ag2-balance {
    display: none !important;
}
#arenaGamesV2Root[data-active-game="pvp-duel"] #ag2PvpView {
    height: 100dvh;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: none;
}
#arenaGamesV2Root[data-active-game="pvp-duel"] #ag2PvpView::-webkit-scrollbar { display: none; }

#ag2PvpView .ag-wheel-original-shell {
    min-height: 100%;
    padding: 0 0 calc(24px + env(safe-area-inset-bottom));
    background:
        linear-gradient(180deg,rgba(7,6,11,.72),rgba(6,6,8,.91) 48%,#050607 100%),
        radial-gradient(circle at 52% 0%, rgba(113,66,190,.20), transparent 31%),
        url("/assets/scorpion-arena-bg-v2.webp") center top / cover no-repeat !important;
    background-color: #050607 !important;
}
#ag2PvpView #ag2WheelView { min-height: 100%; }

/* WEIGHTED WHEEL — one toolbar, smaller stage, primary action above the fold */
#ag2WheelView .wwg-root {
    width: 100%;
    max-width: 680px;
    min-height: 100dvh;
    padding: 0 14px calc(28px + env(safe-area-inset-bottom));
    background: transparent;
    overflow: visible;
}
#ag2WheelView .wwg-root::before,
#ag2WheelView .wwg-root::after { opacity: .16; }

#ag2WheelView .wwg-topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    min-height: 66px;
    margin: 0 -14px 13px;
    padding: max(10px, env(safe-area-inset-top)) 14px 10px;
    border-bottom: 1px solid var(--sx-line);
    background: rgba(7,8,9,.88);
    backdrop-filter: blur(20px) saturate(1.2);
}
#ag2WheelView .wwg-nav-left { display: flex; align-items: center; gap: 11px; min-width: 0; }
#ag2WheelView .ag-wheel-original-close-float {
    position: static;
    display: grid;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    place-items: center;
    border-radius: 14px;
    font-size: 23px;
}
#ag2WheelView .wwg-title { font-size: 16px; letter-spacing: -.01em; white-space: nowrap; }
#ag2WheelView .wwg-code { max-width: 82px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
#ag2WheelView .wwg-mute-btn { width: 40px; height: 40px; border-radius: 13px; }

#ag2WheelView .wwg-stats { gap: 7px !important; margin-bottom: 10px; }
#ag2WheelView .wwg-stat {
    min-width: 0;
    min-height: 86px;
    padding: 12px !important;
    border-radius: 18px !important;
    background: linear-gradient(145deg,rgba(255,255,255,.07),rgba(255,255,255,.025)) !important;
    border-color: rgba(255,255,255,.10) !important;
}
#ag2WheelView .wwg-stat .wwg-label { font-size: 11px !important; }
#ag2WheelView .wwg-stat .wwg-value,
#ag2WheelView .wwg-stats > .wwg-stat:first-child .wwg-value { font-size: clamp(22px,6vw,28px) !important; }
#ag2WheelView .wwg-stat .wwg-sub { font-size: 11px; }
#ag2WheelView .wwg-banner { min-height: 42px; margin-bottom: 11px; font-size: 13px !important; }

#ag2WheelView .wwg-stage {
    width: min(calc(100vw - 42px), 326px) !important;
    max-width: 326px !important;
    margin: 8px auto 22px !important;
}
#ag2WheelView .wwg-aura { inset: -10%; opacity: .82; }
#ag2WheelView .wwg-ring { padding: 11px; }
#ag2WheelView .wwg-ring-inner { inset: 11px; }
#ag2WheelView .wwg-wheel-canvas { inset: 14px; width: calc(100% - 28px); height: calc(100% - 28px); }
#ag2WheelView .wwg-profile-layer {
    position: absolute;
    inset: 14px;
    z-index: 3;
    border-radius: 50%;
    pointer-events: none;
    transform-origin: 50% 50%;
    will-change: transform;
}
#ag2WheelView .wwg-profile-marker {
    position: absolute;
    width: var(--wwg-avatar-size);
    height: var(--wwg-avatar-size);
    transform: translate(-50%,-50%);
}
#ag2WheelView .wwg-profile-portrait {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,.92);
    background: var(--wwg-avatar-colour);
    color: #fff;
    box-shadow: 0 6px 16px rgba(0,0,0,.78),0 0 0 2px var(--wwg-avatar-colour),0 0 12px rgba(139,92,246,.34);
    font-size: max(10px,calc(var(--wwg-avatar-size) * .34));
    font-weight: 900;
    line-height: 1;
    backface-visibility: hidden;
}
#ag2WheelView .wwg-wheel-canvas,
#ag2WheelView .wwg-profile-layer { transform: translateZ(0); backface-visibility: hidden; }
.wwg-winner-overlay { z-index: 100100 !important; }
#ag2WheelView .wwg-profile-portrait img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
#ag2WheelView .wwg-hub {
    width: 94px !important;
    height: 94px !important;
    margin: -47px 0 0 -47px !important;
    border: 1px solid rgba(255,225,153,.78) !important;
    background: radial-gradient(circle at 36% 22%,rgba(255,255,255,.18),transparent 34%),linear-gradient(145deg,rgba(47,37,64,.98),rgba(7,5,11,.99)) !important;
    box-shadow: 0 9px 26px rgba(0,0,0,.82),0 0 0 5px rgba(5,4,8,.64),0 0 26px rgba(240,194,92,.22),inset 0 1px 1px rgba(255,255,255,.2),inset 0 -14px 22px rgba(0,0,0,.48) !important;
}
#ag2WheelView .wwg-hub-sheen { opacity: .34; }
#ag2WheelView .wwg-hub-label { display: block !important; font-size: 7px !important; }
#ag2WheelView .wwg-hub .wwg-hub-timer,
#ag2WheelView .wwg-hub .wwg-hub-caption { display: block; }
#ag2WheelView .wwg-hub .wwg-hub-timer { font-size: 21px !important; margin: 3px 0 2px !important; }
#ag2WheelView .wwg-hub .wwg-hub-caption { font-size: 6.5px !important; margin: 0 !important; }

#ag2WheelView .wwg-join {
    position: relative;
    padding: 15px;
    margin-bottom: 17px;
    border-radius: 21px;
    background: linear-gradient(145deg,rgba(255,184,65,.09),rgba(255,255,255,.035));
    border-color: rgba(255,184,65,.20);
}
#ag2WheelView .wwg-join-row .wwg-label { font-size: 12px; }
#ag2WheelView .wwg-balance { font-size: 13px; }
#ag2WheelView .wwg-amount { min-height: 58px; border-radius: 15px; font-size: 23px; }
#ag2WheelView .wwg-chip { min-height: 42px; border-radius: 12px; font-size: 13px; }
#ag2WheelView .wwg-join-btn { min-height: 56px; border-radius: 15px; font-size: 16px; }
#ag2WheelView .wwg-section-head h3 { font-size: 13px; }
#ag2WheelView .wwg-count-badge { font-size: 12px; }
#ag2WheelView .wwg-player { min-height: 68px; padding: 12px !important; }
#ag2WheelView .wwg-player-name { font-size: 15px !important; }
#ag2WheelView .wwg-player-user { font-size: 12px !important; }
#ag2WheelView .wwg-hist-row { min-height: 56px; font-size: 13px; }

/* DICE AND TOURNAMENT */
.ag2-dice-stage { min-height: 250px; }
.ag2-dice-name { font-size: 13px; }
.ag2-vs { font-size: 14px; }
.ag4-tournament-status { font-size: 14px; }
.ag4-summary-item { min-height: 78px; }
.ag4-player { min-height: 62px; }
.ag2-tournament {
    min-height: 178px;
    align-content: end;
    overflow: hidden;
    padding: 22px !important;
    text-align: left !important;
    background:
        linear-gradient(180deg,rgba(5,6,7,.05),rgba(5,6,7,.88)),
        url("/assets/game-tournament-v3.webp") center 38% / cover !important;
}
.ag2-tournament-icon { display: none; }
.ag2-tournament-title { font-size: 24px !important; }
.ag2-tournament-text { max-width: 310px; color: rgba(255,255,255,.72) !important; }

/* MONEY SHEETS — stronger hierarchy and touch sizing */
.deposit-panel, .withdraw-clean-panel, .arena-preview-panel, .stars-ton-card {
    width: min(calc(100% - 18px), 560px) !important;
    max-height: calc(100dvh - 18px) !important;
    padding: 21px !important;
}
.deposit-title, .withdraw-clean-title, .arena-preview-title { font-size: 25px; }
.deposit-subtitle, .withdraw-clean-subtitle, .arena-preview-description { font-size: 14px; }
.deposit-input-label, .withdraw-clean-label, .arena-preview-label { font-size: 14px; }
.deposit-input, .withdraw-clean-input, .arena-preview-input { min-height: 62px; font-size: 24px; }
.deposit-preset, .withdraw-clean-quick button, .arena-preview-preset { min-height: 43px; font-size: 13px; }
.deposit-notice, .withdraw-clean-notice, .arena-preview-notice { font-size: 13px; }
.deposit-submit, .withdraw-clean-submit, .arena-preview-button, .stars-ton-buy { min-height: 58px; font-size: 16px; }
.withdraw-clean-method { min-height: 52px; font-size: 14px; }
.withdraw-clean-balance-label { font-size: 12px; }
.withdraw-clean-balance-value { font-size: 22px; }
.withdraw-clean-range { font-size: 12px; }
.withdraw-clean-wallet { font-size: 13px; }
.withdraw-clean-preview-row { font-size: 14px; }
.deposit-history-title { font-size: 15px; }

/* Bottom navigation remains above home only; game and full-screen panels own navigation. */
body:has(#arenaGamesV2Root.ag2-visible) > .bottom-nav,
body:has(#akMainSections.open) > .bottom-nav,
body:has(.gift-center.open) > .bottom-nav,
body:has(.deposit-modal.show) > .bottom-nav,
body:has(.withdraw-modal.show) > .bottom-nav,
body:has(.arena-preview-modal.show) > .bottom-nav,
body:has(.stars-ton-overlay.open) > .bottom-nav,
body:has(.wp-modal.open) > .bottom-nav { opacity: 0; pointer-events: none; transform: translate(-50%, 22px); }

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button { appearance: none; margin: 0; }
input[type="number"] { appearance: textfield; }

@media (max-width: 520px) {
    .hero { min-height: 0; padding: 88px 17px 17px; }
    .hero h1 { font-size: clamp(37px, 11.5vw, 50px); line-height: .94; }
    .hero-description { margin-top: 15px; font-size: 14px; line-height: 1.5; }
    .hero-trust { display: none; }
    .hero-actions { margin-top: 14px; gap: 8px; }
    .hero-actions .btn { min-height: 49px; }
    .hero-actions .btn-primary { grid-column: 1 / -1; }
    .section { margin-top: 23px; }
    .section-title { font-size: 17px; }
    .game-card { min-height: 200px; }
    .wp-summary, .pp-stats, .ap-grid { gap: 8px; }
    .gift-grid { gap: 8px; }
    .gift-art { height: 132px; }
    #ag2WheelView .wwg-root { padding-inline: 10px; }
    #ag2WheelView .wwg-topbar { margin-inline: -10px; padding-inline: 10px; }
    #ag2WheelView .wwg-code { display: none; }
}

@media (max-width: 380px) {
    .hero { min-height: 320px; }
    .games-grid { grid-template-columns: 1fr; }
    .game-card { min-height: 175px; }
    .wp-summary, .pp-stats, .ap-grid { grid-template-columns: 1fr; }
    #ag2WheelView .wwg-title { font-size: 14px; }
    #ag2WheelView .wwg-code { display: none; }
    #ag2WheelView .wwg-stat { padding: 10px 8px !important; }
    #ag2WheelView .wwg-stat .wwg-label { font-size: 10px !important; }
    #ag2WheelView .wwg-stat .wwg-value,
    #ag2WheelView .wwg-stats > .wwg-stat:first-child .wwg-value { font-size: 21px !important; }
    #ag2WheelView .wwg-stage { width: min(calc(100vw - 54px), 300px) !important; }
}

@media (min-width: 720px) {
    .hero { min-height: 390px; padding-top: 160px; }
    .stats-grid { grid-auto-flow: initial; grid-template-columns: repeat(4,1fr); overflow: visible; margin-inline: 0; padding-inline: 0; }
    .games-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
    .gp-launch-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
    .gp-launch { min-height: 230px; }
    .gift-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
}

@media (prefers-reduced-motion: reduce) {
    #arenaGamesV2Root .ag2-panel { animation: none; }
}
