:root {
            --eu-bg: linear-gradient(100deg, #0c4a5c 0%, #0d3d5c 22%, #1a3080 55%, #4c1d95 82%, #581c87 100%);
            --euromaja-bg-base: #4c1d95;
            --theme-gradient: var(--eu-bg);
            --eu-accent: #5effd4;
        }

        /* Clicker lite: no floating theme blobs (continuous CSS heat) */
        body.clicker-lite .eu-blobs {
            display: none !important;
        }

        *, *::before, *::after {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            -webkit-tap-highlight-color: transparent;
            -webkit-touch-callout: none !important;
            /* pan only — do NOT include pinch-zoom (manipulation still allows it) */
            touch-action: pan-x pan-y;
        }

        html {
            min-height: 100%;
            height: auto !important;
            background-color: #4c1d95;
            background-image: none !important;
            overscroll-behavior: none;
            touch-action: pan-x pan-y;
        }

        body.eu-game-theme {
            font-family: 'Nunito', system-ui, sans-serif;
            color: #f0f9ff;
            min-height: 100vh;
            min-height: 100dvh;
            background: transparent !important;
            overflow-x: hidden;
            user-select: none;
            -webkit-user-select: none;
            touch-action: pan-x pan-y;
            -webkit-font-smoothing: antialiased;
        }

        input, textarea {
            -webkit-user-select: text !important;
            user-select: text !important;
        }

        /* Hide shared fixed back — this page uses a sticky top bar */
        a.eu-back-link { display: none !important; }

        .top-bar {
            position: sticky;
            top: 0;
            z-index: 100;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
            padding: max(10px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) 12px max(12px, env(safe-area-inset-left));
            background: rgba(10, 22, 40, 0.82);
            -webkit-backdrop-filter: none;
            backdrop-filter: none;
            border-bottom: 1px solid rgba(255, 255, 255, 0.12);
            box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
        }

        .back-link,
        .top-bar-btn {
            font-family: inherit;
            font-size: 0.72rem;
            font-weight: 700;
            letter-spacing: 0.1em;
            text-transform: uppercase;
            text-decoration: none;
            padding: 10px 16px;
            border-radius: 14px;
            border: 1px solid rgba(255, 255, 255, 0.22);
            background: rgba(255, 255, 255, 0.1);
            color: rgba(255, 255, 255, 0.95);
            cursor: pointer;
            transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
            white-space: nowrap;
            flex-shrink: 0;
        }

        .back-link:hover,
        .top-bar-btn:hover {
            border-color: rgba(94, 255, 212, 0.55);
            background: rgba(255, 255, 255, 0.18);
        }

        .top-bar-btn.accent {
            border-color: rgba(253, 224, 71, 0.4);
            background: linear-gradient(135deg, rgba(253, 224, 71, 0.92), rgba(245, 158, 11, 0.92));
            color: #111;
        }

        .top-bar-actions {
            display: flex;
            align-items: center;
            gap: 8px;
            flex-shrink: 0;
        }

        .page-wrap {
            position: relative;
            z-index: 1;
            width: 100%;
            max-width: 1100px;
            margin: 0 auto;
            padding: clamp(14px, 3vw, 28px) clamp(12px, 3vw, 24px) max(28px, calc(20px + env(safe-area-inset-bottom)));
        }

        .glass-shell {
            position: relative;
            background:
                linear-gradient(180deg,
                    rgba(56, 189, 248, 0.42) 0%,
                    rgba(59, 130, 246, 0.48) 28%,
                    rgba(99, 102, 241, 0.5) 55%,
                    rgba(139, 92, 246, 0.52) 78%,
                    rgba(168, 85, 247, 0.45) 100%);
            backdrop-filter: none;
            -webkit-backdrop-filter: none;
            border: 1px solid rgba(255, 255, 255, 0.22);
            border-radius: clamp(22px, 4vw, 32px);
            padding: clamp(18px, 4vw, 36px) clamp(14px, 3.5vw, 32px);
            box-shadow:
                0 20px 70px rgba(30, 27, 75, 0.45),
                0 0 0 1px rgba(255, 255, 255, 0.08) inset,
                inset 0 1px 0 rgba(255, 255, 255, 0.25);
            animation: cardPop 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) both;
            overflow: hidden;
        }

        .glass-shell::before {
            content: '';
            position: absolute;
            inset: 0;
            border-radius: inherit;
            background: linear-gradient(145deg, rgba(255, 255, 255, 0.14) 0%, transparent 42%, rgba(167, 139, 250, 0.12) 100%);
            pointer-events: none;
        }

        .glass-shell > * {
            position: relative;
            z-index: 1;
        }

        @keyframes cardPop {
            from { opacity: 0; transform: scale(0.94) translateY(20px); }
            to { opacity: 1; transform: scale(1) translateY(0); }
        }

        .title-block {
            text-align: center;
            margin-bottom: clamp(12px, 2.5vw, 18px);
        }

        .title-main {
            font-size: clamp(2.35rem, 11vw, 3.4rem);
            font-weight: 800;
            line-height: 0.95;
            letter-spacing: -0.03em;
            background: linear-gradient(135deg, #ffffff 18%, #a8ffd8 52%, #5effd4 78%, #38bdf8 100%);
            background-size: 200% 200%;
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            filter: drop-shadow(0 0 24px rgba(0, 200, 150, 0.32));
        }

        .title-divider {
            margin: 12px auto 0;
            width: 72px;
            height: 4px;
            border-radius: 99px;
            background: linear-gradient(90deg, #00c896, #0096ff, #a855f7);
            box-shadow: 0 0 14px rgba(0, 200, 150, 0.55);
        }

        .play-grid {
            display: grid;
            grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
            gap: clamp(14px, 2.5vw, 22px);
            align-items: start;
        }

        .panel {
            background: rgba(0, 0, 0, 0.28);
            border: 1px solid rgba(255, 255, 255, 0.14);
            border-radius: 20px;
            box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
            padding: clamp(16px, 3vw, 24px);
        }

        .click-area {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            min-height: min(54vh, 460px);
            gap: 10px;
            overflow: hidden;
            position: relative;
            touch-action: none;
        }

        .click-area::before {
            content: '';
            position: absolute;
            width: min(340px, 78vw);
            height: min(340px, 78vw);
            border-radius: 50%;
            background: radial-gradient(circle, rgba(94, 255, 212, 0.22) 0%, rgba(56, 189, 248, 0.1) 42%, transparent 70%);
            opacity: 0.85;
            pointer-events: none;
        }

        .click-stage {
            position: relative;
            width: min(280px, 68vw);
            height: min(280px, 68vw);
            display: grid;
            place-items: center;
            z-index: 1;
            touch-action: none;
        }

        .click-button {
            width: min(220px, 54vw);
            height: min(220px, 54vw);
            border-radius: 50%;
            background: linear-gradient(145deg, #2ef2b8 0%, #00c896 28%, #0096e0 62%, #7c3aed 100%);
            background-size: 180% 180%;
            border: 5px solid rgba(255, 255, 255, 0.35);
            cursor: pointer;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 4px;
            transition: filter 0.1s ease, box-shadow 0.15s ease, background 0.15s ease;
            box-shadow:
                0 12px 36px rgba(0, 150, 224, 0.38),
                inset 0 3px 0 rgba(255, 255, 255, 0.3),
                inset 0 -10px 24px rgba(76, 29, 149, 0.25);
            position: relative;
            z-index: 2;
            touch-action: none;
            font-family: inherit;
            -webkit-appearance: none;
            appearance: none;
            outline: none;
            color: inherit;
            overflow: visible;
            /* No scale/zoom animations — keeps the stage stable and cooler on phones */
            transform: none !important;
        }

        .click-button::after {
            content: '';
            position: absolute;
            inset: 18%;
            border-radius: 50%;
            background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.35), transparent 55%);
            pointer-events: none;
        }

        .click-button:hover {
            box-shadow:
                0 0 0 6px rgba(94, 255, 212, 0.1),
                0 16px 44px rgba(0, 150, 224, 0.48),
                inset 0 3px 0 rgba(255, 255, 255, 0.35);
        }

        .click-button:active,
        .click-button.pulse-animation {
            filter: brightness(0.92);
        }

        .click-button.hit-2x {
            background: linear-gradient(145deg, #fde047 0%, #f59e0b 55%, #ea580c 100%);
            box-shadow: 0 0 22px rgba(253, 224, 71, 0.55), 0 12px 32px rgba(245, 158, 11, 0.4);
        }

        .click-button.hit-4x {
            background: linear-gradient(145deg, #c084fc 0%, #7c3aed 55%, #4c1d95 100%);
            box-shadow: 0 0 26px rgba(192, 132, 252, 0.6), 0 12px 34px rgba(124, 58, 237, 0.45);
        }

        .click-button.hit-10x {
            background: linear-gradient(145deg, #fb7185 0%, #e11d48 40%, #fde047 100%);
            box-shadow: 0 0 30px rgba(251, 113, 133, 0.65), 0 0 48px rgba(253, 224, 71, 0.28);
        }

        .click-spark {
            position: absolute;
            width: 7px;
            height: 7px;
            margin: -3.5px 0 0 -3.5px;
            border-radius: 50%;
            pointer-events: none;
            z-index: 4;
            background: #fff;
            box-shadow: 0 0 8px currentColor;
            animation: sparkFly 0.45s ease-out forwards;
        }

        @keyframes sparkFly {
            0% { opacity: 1; transform: translate(0, 0) scale(1); }
            100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(0.2); }
        }

        .combo-meter {
            min-height: 28px;
            display: flex;
            align-items: center;
            justify-content: center;
            margin-bottom: 4px;
            z-index: 1;
        }

        .combo-chip {
            display: none;
            align-items: center;
            gap: 8px;
            padding: 6px 14px;
            border-radius: 999px;
            font-size: 0.78rem;
            font-weight: 800;
            letter-spacing: 0.08em;
            text-transform: uppercase;
            color: #041018;
            background: linear-gradient(135deg, #5effd4, #38bdf8);
            box-shadow: 0 6px 20px rgba(56, 189, 248, 0.35);
            animation: comboPop 0.28s cubic-bezier(0.34, 1.6, 0.64, 1);
        }

        .combo-chip.show { display: inline-flex; }

        /* 50 yellow · 250 orange · 500 rose · 750 violet · 1000 nova · 1250 ruby
           1500 sapphire · 2000 platinum · 2500 emerald · 3000 pure gold
           5000 secret · 7500 void · 10000 euroglass */
        .combo-chip.combo-yellow {
            background: linear-gradient(135deg, #fef08a, #facc15);
            color: #3b2f00;
            box-shadow: 0 6px 22px rgba(250, 204, 21, 0.45);
        }

        .combo-chip.combo-orange {
            background: linear-gradient(135deg, #fb923c, #ea580c);
            color: #1a0a02;
            box-shadow: 0 6px 24px rgba(234, 88, 12, 0.45);
        }

        .combo-chip.combo-rose {
            background: linear-gradient(135deg, #fb7185, #e11d48);
            color: #1a0508;
            box-shadow: 0 6px 26px rgba(225, 29, 72, 0.5);
        }

        .combo-chip.combo-violet {
            background: linear-gradient(135deg, #c084fc, #7c3aed);
            color: #0f0618;
            box-shadow: 0 6px 28px rgba(124, 58, 237, 0.5);
        }

        .combo-chip.combo-nova {
            background: linear-gradient(135deg, #fef9c3, #f472b6, #38bdf8);
            color: #0a0612;
            box-shadow: 0 8px 32px rgba(244, 114, 182, 0.55);
        }

        .combo-chip.combo-ruby {
            background: linear-gradient(135deg, #ff4d6d 0%, #c81e3a 45%, #7f1d1d 100%);
            color: #fff5f5;
            border: 1px solid rgba(255, 180, 190, 0.45);
            box-shadow:
                0 0 12px rgba(220, 38, 38, 0.7),
                0 0 28px rgba(185, 28, 28, 0.45),
                0 8px 24px rgba(127, 29, 29, 0.35);
        }

        .combo-chip.combo-sapphire {
            background: linear-gradient(135deg, #93c5fd 0%, #2563eb 45%, #1e3a8a 100%);
            color: #eff6ff;
            border: 1px solid rgba(191, 219, 254, 0.65);
            box-shadow:
                0 0 12px rgba(59, 130, 246, 0.75),
                0 0 32px rgba(37, 99, 235, 0.5),
                0 8px 26px rgba(30, 58, 138, 0.4);
        }

        .combo-chip.combo-platinum {
            background: linear-gradient(135deg, #ffffff 0%, #e8eef5 40%, #b8c4d4 75%, #9aa8bc 100%);
            color: #1a2330;
            border: 1px solid rgba(255, 255, 255, 0.9);
            box-shadow:
                0 0 12px rgba(220, 235, 255, 0.95),
                0 0 32px rgba(180, 200, 230, 0.7),
                0 0 52px rgba(160, 190, 255, 0.4),
                0 8px 28px rgba(140, 170, 210, 0.35);
            animation: comboPop 0.28s cubic-bezier(0.34, 1.6, 0.64, 1), platinumPulse 1.5s ease-in-out infinite;
        }

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

        .combo-chip.combo-emerald {
            background: linear-gradient(135deg, #6ee7b7 0%, #10b981 42%, #047857 100%);
            color: #ecfdf5;
            border: 1px solid rgba(167, 243, 208, 0.7);
            box-shadow:
                0 0 12px rgba(16, 185, 129, 0.7),
                0 0 30px rgba(5, 150, 105, 0.45),
                0 8px 24px rgba(6, 95, 70, 0.35);
        }

        .combo-chip.combo-pure-gold {
            background: linear-gradient(135deg, #fff8dc 0%, #ffe566 35%, #ffd700 70%, #f5c542 100%);
            color: #3b2a00;
            border: 1px solid rgba(255, 248, 220, 0.85);
            box-shadow:
                0 0 10px rgba(255, 215, 0, 0.85),
                0 0 28px rgba(255, 200, 40, 0.7),
                0 0 48px rgba(255, 180, 0, 0.45),
                0 8px 28px rgba(255, 190, 0, 0.35);
            animation: comboPop 0.28s cubic-bezier(0.34, 1.6, 0.64, 1), pureGoldPulse 1.4s ease-in-out infinite;
        }

        @keyframes pureGoldPulse {
            0%, 100% {
                box-shadow:
                    0 0 10px rgba(255, 215, 0, 0.85),
                    0 0 28px rgba(255, 200, 40, 0.7),
                    0 0 48px rgba(255, 180, 0, 0.45),
                    0 8px 28px rgba(255, 190, 0, 0.35);
                filter: brightness(1);
            }
            50% {
                box-shadow:
                    0 0 16px rgba(255, 230, 120, 1),
                    0 0 40px rgba(255, 215, 0, 0.9),
                    0 0 70px rgba(255, 190, 0, 0.55),
                    0 8px 32px rgba(255, 200, 40, 0.45);
                filter: brightness(1.08);
            }
        }

        .combo-chip.combo-secret {
            background: linear-gradient(
                120deg,
                #fff 0%,
                #ffe566 18%,
                #f472b6 36%,
                #a78bfa 54%,
                #38bdf8 72%,
                #fff 100%
            );
            background-size: 220% 220%;
            color: #12081a;
            border: 1px solid rgba(255, 255, 255, 0.95);
            box-shadow:
                0 0 16px rgba(255, 255, 255, 0.9),
                0 0 36px rgba(167, 139, 250, 0.65),
                0 0 60px rgba(56, 189, 248, 0.45),
                0 8px 32px rgba(244, 114, 182, 0.4);
            animation:
                comboPop 0.28s cubic-bezier(0.34, 1.6, 0.64, 1),
                secretShift 2.4s linear infinite,
                secretPulse 1.6s ease-in-out infinite;
        }

        @keyframes secretShift {
            0% { background-position: 0% 50%; }
            50% { background-position: 100% 50%; }
            100% { background-position: 0% 50%; }
        }

        @keyframes secretPulse {
            0%, 100% { filter: brightness(1) saturate(1.05); }
            50% { filter: brightness(1.15) saturate(1.25); }
        }

        /* Elite void (7500+) — abyss black, hairline platinum, deep indigo corona */
        .combo-chip.combo-void {
            background:
                linear-gradient(180deg, rgba(255, 255, 255, 0.12) 0%, transparent 38%),
                linear-gradient(135deg, #050508 0%, #0b0a12 40%, #12081c 72%, #07060a 100%);
            color: #f4f1ea;
            border: 1px solid rgba(232, 220, 186, 0.72);
            box-shadow:
                0 0 0 1px rgba(8, 6, 12, 0.9) inset,
                0 1px 0 rgba(255, 248, 230, 0.35) inset,
                0 0 10px rgba(226, 214, 176, 0.35),
                0 0 28px rgba(88, 60, 160, 0.4),
                0 0 56px rgba(30, 16, 60, 0.55),
                0 10px 28px rgba(0, 0, 0, 0.65);
            animation: comboPop 0.28s cubic-bezier(0.34, 1.6, 0.64, 1), voidPulse 2.2s ease-in-out infinite;
        }

        @keyframes voidPulse {
            0%, 100% {
                box-shadow:
                    0 0 0 1px rgba(8, 6, 12, 0.9) inset,
                    0 1px 0 rgba(255, 248, 230, 0.35) inset,
                    0 0 10px rgba(226, 214, 176, 0.35),
                    0 0 28px rgba(88, 60, 160, 0.4),
                    0 0 56px rgba(30, 16, 60, 0.55),
                    0 10px 28px rgba(0, 0, 0, 0.65);
            }
            50% {
                box-shadow:
                    0 0 0 1px rgba(8, 6, 12, 0.9) inset,
                    0 1px 0 rgba(255, 248, 230, 0.5) inset,
                    0 0 16px rgba(240, 228, 196, 0.5),
                    0 0 40px rgba(110, 80, 190, 0.5),
                    0 0 72px rgba(40, 20, 80, 0.6),
                    0 10px 32px rgba(0, 0, 0, 0.7);
            }
        }

        /* Euromaja euroglass (10000+) — site glass + mint/sky/violet brand */
        .combo-chip.combo-euroglass {
            background:
                linear-gradient(145deg, rgba(255, 255, 255, 0.28) 0%, rgba(255, 255, 255, 0.04) 42%, transparent 70%),
                linear-gradient(100deg, #0c4a5c 0%, #1a3080 42%, #4c1d95 78%, #581c87 100%);
            color: #f0f9ff;
            border: 1px solid rgba(255, 255, 255, 0.38);
            box-shadow:
                0 1px 0 rgba(255, 255, 255, 0.4) inset,
                0 0 12px rgba(94, 255, 212, 0.45),
                0 0 28px rgba(56, 189, 248, 0.4),
                0 0 48px rgba(168, 85, 247, 0.28),
                0 10px 28px rgba(30, 27, 75, 0.5);
            animation: comboPop 0.28s cubic-bezier(0.34, 1.6, 0.64, 1), euroglassPulse 2s ease-in-out infinite;
        }

        @keyframes euroglassPulse {
            0%, 100% {
                box-shadow:
                    0 1px 0 rgba(255, 255, 255, 0.4) inset,
                    0 0 12px rgba(94, 255, 212, 0.45),
                    0 0 28px rgba(56, 189, 248, 0.4),
                    0 0 48px rgba(168, 85, 247, 0.28),
                    0 10px 28px rgba(30, 27, 75, 0.5);
            }
            50% {
                box-shadow:
                    0 1px 0 rgba(255, 255, 255, 0.55) inset,
                    0 0 18px rgba(94, 255, 212, 0.65),
                    0 0 36px rgba(56, 189, 248, 0.5),
                    0 0 60px rgba(168, 85, 247, 0.38),
                    0 10px 32px rgba(30, 27, 75, 0.55);
            }
        }

        @keyframes comboPop {
            from { transform: scale(0.7); opacity: 0; }
            to { transform: scale(1); opacity: 1; }
        }

        .crit-banner {
            position: absolute;
            left: 50%;
            top: 12%;
            transform: translateX(-50%);
            z-index: 6;
            pointer-events: none;
            font-size: clamp(1.1rem, 5vw, 1.55rem);
            font-weight: 800;
            letter-spacing: 0.08em;
            text-transform: uppercase;
            white-space: nowrap;
            animation: critBanner 0.9s cubic-bezier(0.2, 0.9, 0.2, 1) forwards;
            text-shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
        }

        .crit-banner.x2 { color: #fde047; }
        .crit-banner.x4 { color: #e9d5ff; }
        .crit-banner.x10 { color: #fecdd3; filter: drop-shadow(0 0 12px rgba(251, 113, 133, 0.8)); }

        @keyframes critBanner {
            0% { opacity: 0; transform: translate(-50%, 12px) scale(0.6); }
            25% { opacity: 1; transform: translate(-50%, 0) scale(1.12); }
            100% { opacity: 0; transform: translate(-50%, -28px) scale(1); }
        }

        .click-stage.shake {
            animation: stageShake 0.28s ease;
        }

        @keyframes stageShake {
            0%, 100% { transform: translate(0, 0); }
            25% { transform: translate(-3px, 2px); }
            50% { transform: translate(3px, -2px); }
            75% { transform: translate(-2px, -1px); }
        }

        .button-score {
            position: relative;
            z-index: 1;
            font-size: clamp(1.85rem, 7.5vw, 2.65rem);
            font-weight: 800;
            color: #fff;
            text-shadow: 0 2px 14px rgba(0, 0, 0, 0.35), 0 0 18px rgba(94, 255, 212, 0.35);
            font-variant-numeric: tabular-nums;
            line-height: 1.05;
            padding: 0 12px;
            text-align: center;
            white-space: nowrap;
            letter-spacing: -0.02em;
        }

        .button-score.bump {
            /* scoreBump scale removed — no zoom on score updates */
        }

        .button-label {
            position: relative;
            z-index: 1;
            font-size: 0.72rem;
            font-weight: 800;
            letter-spacing: 0.22em;
            text-transform: uppercase;
            color: rgba(255, 255, 255, 0.88);
            text-shadow: 0 1px 8px rgba(0, 0, 0, 0.25);
        }

        .stat-row {
            display: flex;
            flex-wrap: wrap;
            justify-content: center;
            gap: 8px;
            margin-top: 8px;
            width: 100%;
            z-index: 1;
        }

        .stat-pill {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            padding: 9px 15px;
            border-radius: 999px;
            background: rgba(255, 255, 255, 0.12);
            border: 1px solid rgba(255, 255, 255, 0.2);
            font-size: 0.9rem;
            font-weight: 700;
            color: rgba(240, 249, 255, 0.95);
            box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
            backdrop-filter: none;
            -webkit-backdrop-filter: none;
        }

        .stat-pill.live {
            border-color: rgba(94, 255, 212, 0.45);
            box-shadow: 0 0 16px rgba(94, 255, 212, 0.18);
            /* liveTick removed */
        }

        @keyframes liveTick {
            0%, 100% { transform: translateY(0); }
            50% { transform: translateY(-2px); }
        }

        .stat-pill strong {
            color: #5effd4;
            font-variant-numeric: tabular-nums;
        }

        .upgrades-panel {
            max-height: min(72vh, 720px);
            overflow-y: auto;
            -webkit-overflow-scrolling: touch;
            touch-action: pan-y;
        }

        .upgrades-heading-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
            margin-bottom: 14px;
        }

        .upgrades-heading-row .panel-heading {
            margin-bottom: 0;
        }

        .upgrade-info-btn {
            flex-shrink: 0;
            width: 28px;
            height: 28px;
            border-radius: 50%;
            border: 1px solid rgba(255, 255, 255, 0.35);
            background: rgba(255, 255, 255, 0.1);
            color: #e0f2fe;
            font-family: inherit;
            font-size: 0.88rem;
            font-weight: 800;
            line-height: 1;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            padding: 0;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
            transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
        }

        .upgrade-info-btn:hover {
            background: rgba(94, 255, 212, 0.22);
            border-color: rgba(94, 255, 212, 0.6);
        }

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

        .upgrade-info-overlay {
            position: fixed;
            inset: 0;
            z-index: 4000;
            display: none;
            align-items: center;
            justify-content: center;
            padding: 20px;
            background: rgba(6, 12, 24, 0.72);
            backdrop-filter: none;
            -webkit-backdrop-filter: none;
            box-sizing: border-box;
        }

        .upgrade-info-overlay.show {
            display: flex;
        }

        .upgrade-info-card {
            width: min(420px, 100%);
            max-height: min(80vh, 560px);
            overflow-y: auto;
            border-radius: 18px;
            padding: 20px 20px 16px;
            background: linear-gradient(180deg, rgba(28, 40, 72, 0.98), rgba(16, 24, 48, 0.98));
            border: 1px solid rgba(255, 255, 255, 0.16);
            box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
            color: #e8f0ff;
            font-family: inherit;
        }

        .upgrade-info-card h3 {
            margin: 0 0 12px;
            font-size: 1.05rem;
            font-weight: 800;
            color: #fff;
        }

        .upgrade-info-card p {
            margin: 0 0 10px;
            font-size: 0.9rem;
            font-weight: 600;
            line-height: 1.45;
            color: rgba(232, 240, 255, 0.88);
        }

        .upgrade-info-card p:last-of-type {
            margin-bottom: 16px;
        }

        .upgrade-info-card strong {
            color: #5effd4;
            font-weight: 800;
        }

        .upgrade-info-card .upgrade-info-close {
            width: 100%;
            border: none;
            border-radius: 12px;
            padding: 12px 16px;
            font-family: inherit;
            font-size: 0.9rem;
            font-weight: 800;
            cursor: pointer;
            color: #041018;
            background: linear-gradient(135deg, #5effd4, #38bdf8);
        }

        .panel-heading {
            font-size: 0.78rem;
            font-weight: 800;
            letter-spacing: 0.14em;
            text-transform: uppercase;
            color: #fde047;
            text-align: center;
            margin-bottom: 14px;
        }

        .upgrade-section {
            margin-bottom: 14px;
            padding: 9px 12px;
            border-radius: 12px;
            text-align: center;
            font-size: 0.72rem;
            font-weight: 800;
            letter-spacing: 0.12em;
            text-transform: uppercase;
            color: #fff;
            border: 1px solid rgba(255, 255, 255, 0.14);
        }

        .upgrade-section.click {
            background: linear-gradient(135deg, rgba(244, 63, 94, 0.55), rgba(190, 24, 93, 0.55));
        }

        .upgrade-section.auto {
            background: linear-gradient(135deg, rgba(16, 185, 129, 0.55), rgba(5, 150, 105, 0.55));
            margin-top: 18px;
        }

        .upgrade-item {
            background: rgba(255, 255, 255, 0.06);
            border: 1px solid rgba(167, 139, 250, 0.35);
            border-radius: 14px;
            padding: 12px 14px;
            margin-bottom: 10px;
            cursor: pointer;
            transition: background 0.2s ease, transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
            position: relative;
            overflow: hidden;
        }

        .upgrade-item:not(.disabled) {
            border-color: rgba(94, 255, 212, 0.55);
            background: linear-gradient(135deg, rgba(94, 255, 212, 0.14), rgba(56, 189, 248, 0.08));
            box-shadow: 0 0 0 1px rgba(94, 255, 212, 0.12), 0 8px 22px rgba(0, 200, 150, 0.12);
            /* readyPulse removed — continuous scale heated phones */
        }

        .upgrade-item:not(.disabled)::before {
            content: '';
            position: absolute;
            left: 0;
            top: 0;
            bottom: 0;
            width: 4px;
            background: linear-gradient(180deg, #5effd4, #38bdf8);
            border-radius: 14px 0 0 14px;
        }

        @keyframes readyPulse {
            0%, 100% { box-shadow: 0 0 0 1px rgba(94, 255, 212, 0.1), 0 6px 18px rgba(0, 200, 150, 0.1); }
            50% { box-shadow: 0 0 0 1px rgba(94, 255, 212, 0.28), 0 10px 26px rgba(0, 200, 150, 0.22); }
        }

        .upgrade-item:hover:not(.disabled) {
            background: rgba(94, 255, 212, 0.16);
            border-color: rgba(94, 255, 212, 0.7);
        }

        .upgrade-item.disabled {
            opacity: 0.42;
            cursor: not-allowed;
            filter: saturate(0.75);
        }

        .upgrade-item.tier-burst {
            z-index: 4;
            overflow: visible;
            border-color: #fbbf24 !important;
            background: linear-gradient(135deg, rgba(251, 191, 36, 0.42), rgba(245, 158, 11, 0.22)) !important;
            animation: tierBurstCard 1.2s cubic-bezier(0.22, 1, 0.36, 1) both !important;
            box-shadow:
                0 0 0 1px rgba(251, 191, 36, 0.55),
                0 0 28px rgba(251, 191, 36, 0.45),
                0 12px 28px rgba(180, 83, 9, 0.25) !important;
        }

        .upgrade-item.tier-burst::before {
            background: linear-gradient(180deg, #fde68a, #f59e0b) !important;
            width: 5px;
        }

        .upgrade-item.tier-burst .upgrade-count {
            background: linear-gradient(135deg, #fde047 0%, #f59e0b 100%);
            color: #1c1917;
            animation: tierBurstCount 1.2s cubic-bezier(0.22, 1, 0.36, 1) both;
        }

        .upgrade-item.tier-burst .upgrade-name {
            color: #fffbeb;
            text-shadow: 0 0 12px rgba(251, 191, 36, 0.65);
        }

        .tier-burst-label {
            position: absolute;
            left: 50%;
            top: 42%;
            transform: translate(-50%, -50%) scale(0.4);
            font-size: clamp(1.35rem, 4.5vw, 1.85rem);
            font-weight: 900;
            letter-spacing: 0.02em;
            color: #fffbeb;
            text-shadow:
                0 0 10px rgba(251, 191, 36, 0.95),
                0 2px 8px rgba(120, 53, 15, 0.55);
            pointer-events: none;
            z-index: 6;
            animation: tierBurstLabel 1.2s cubic-bezier(0.22, 1, 0.36, 1) both;
            white-space: nowrap;
        }

        .tier-spark {
            position: absolute;
            left: 50%;
            top: 50%;
            width: 7px;
            height: 7px;
            margin: -3.5px 0 0 -3.5px;
            border-radius: 50%;
            background: radial-gradient(circle, #fff7ed 0%, #fbbf24 55%, #d97706 100%);
            box-shadow: 0 0 8px rgba(251, 191, 36, 0.85);
            pointer-events: none;
            z-index: 5;
            animation: tierSpark 0.75s ease-out forwards;
        }

        @keyframes tierBurstCard {
            0% {
                transform: translateX(0) scale(1);
            }
            8% { transform: translateX(-4px) rotate(-0.8deg) scale(1.01); }
            16% { transform: translateX(4px) rotate(0.8deg) scale(1.02); }
            24% { transform: translateX(-5px) rotate(-1deg) scale(1.03); }
            32% { transform: translateX(5px) rotate(1deg) scale(1.04); }
            40% { transform: translateX(-3px) rotate(-0.5deg) scale(1.06); }
            48% { transform: translateX(2px) scale(1.12); }
            58% { transform: translateX(0) scale(1.16); }
            72% { transform: scale(0.97); }
            100% {
                transform: scale(1);
                border-color: rgba(94, 255, 212, 0.55);
                background: linear-gradient(135deg, rgba(94, 255, 212, 0.14), rgba(56, 189, 248, 0.08));
                box-shadow: 0 0 0 1px rgba(94, 255, 212, 0.12), 0 8px 22px rgba(0, 200, 150, 0.12);
            }
        }

        @keyframes tierBurstCount {
            0%, 35% { transform: scale(1); }
            52% { transform: scale(1.45); }
            68% { transform: scale(0.92); }
            100% { transform: scale(1); }
        }

        @keyframes tierBurstLabel {
            0%, 30% {
                opacity: 0;
                transform: translate(-50%, -50%) scale(0.35);
            }
            48% {
                opacity: 1;
                transform: translate(-50%, -54%) scale(1.35);
            }
            70% {
                opacity: 1;
                transform: translate(-50%, -62%) scale(1.1);
            }
            100% {
                opacity: 0;
                transform: translate(-50%, -88%) scale(0.85);
            }
        }

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

        .upgrade-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 10px;
            margin-bottom: 6px;
        }

        .upgrade-name {
            font-size: 1rem;
            font-weight: 800;
            color: #fff;
        }

        .upgrade-count {
            background: linear-gradient(135deg, #00c896 0%, #0096e0 100%);
            padding: 4px 10px;
            border-radius: 999px;
            font-size: 0.78rem;
            color: #fff;
            font-weight: 800;
            min-width: 2rem;
            text-align: center;
        }

        .upgrade-desc {
            color: rgba(240, 249, 255, 0.62);
            font-size: 0.84rem;
            margin-bottom: 6px;
            font-weight: 600;
        }

        .upgrade-cost {
            color: #fde047;
            font-size: 0.95rem;
            font-weight: 800;
            font-variant-numeric: tabular-nums;
        }

        .floating-number {
            position: absolute;
            font-size: clamp(1.4rem, 5vw, 2rem);
            font-weight: 800;
            color: #fff;
            pointer-events: none;
            animation: floatUp 0.85s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
            text-shadow: 0 0 14px rgba(94, 255, 212, 0.9), 0 2px 8px rgba(0, 0, 0, 0.35);
            z-index: 5;
        }

        .floating-number.x2 {
            color: #fde047;
            font-size: clamp(1.55rem, 5.5vw, 2.2rem);
            text-shadow: 0 0 16px rgba(253, 224, 71, 0.95), 0 2px 8px rgba(0, 0, 0, 0.4);
        }

        .floating-number.x4 {
            color: #e9d5ff;
            font-size: clamp(1.7rem, 6vw, 2.4rem);
            text-shadow: 0 0 18px rgba(192, 132, 252, 1), 0 2px 8px rgba(0, 0, 0, 0.4);
        }

        .floating-number.x10 {
            color: #fecdd3;
            font-size: clamp(1.9rem, 7vw, 2.7rem);
            text-shadow: 0 0 22px rgba(251, 113, 133, 1), 0 0 40px rgba(253, 224, 71, 0.5);
            animation: floatUpBig 1s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
        }

        @keyframes floatUp {
            0% { opacity: 1; transform: translate(-50%, 0) scale(0.7); }
            35% { opacity: 1; transform: translate(-50%, -36px) scale(1.15); }
            100% { opacity: 0; transform: translate(-50%, -110px) scale(1); }
        }

        @keyframes floatUpBig {
            0% { opacity: 1; transform: translate(-50%, 0) scale(0.5) rotate(-6deg); }
            30% { opacity: 1; transform: translate(-50%, -40px) scale(1.35) rotate(3deg); }
            100% { opacity: 0; transform: translate(-50%, -130px) scale(1.1) rotate(0deg); }
        }

        .top-players-block {
            margin-top: 22px;
            padding-top: 18px;
            border-top: 1px solid rgba(255, 255, 255, 0.12);
        }

        .top-players-head {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
            flex-wrap: wrap;
            margin-bottom: 12px;
        }

        .auto-save-badge {
            font-size: 0.68rem;
            font-weight: 800;
            letter-spacing: 0.06em;
            text-transform: uppercase;
            background: rgba(94, 255, 212, 0.14);
            color: #5effd4;
            border: 1px solid rgba(94, 255, 212, 0.4);
            border-radius: 999px;
            padding: 4px 10px;
            opacity: 0;
            transition: opacity 0.4s;
        }

        .recycle-card {
            margin-top: 16px;
            padding: 14px 14px 12px;
            border-radius: 16px;
            background:
                linear-gradient(145deg, rgba(255, 255, 255, 0.16) 0%, rgba(255, 255, 255, 0.04) 40%, transparent 70%),
                linear-gradient(100deg, rgba(12, 74, 92, 0.55) 0%, rgba(76, 29, 149, 0.55) 100%);
            border: 1px solid rgba(255, 255, 255, 0.22);
            box-shadow: 0 8px 24px rgba(30, 27, 75, 0.28);
        }

        .recycle-card.disabled {
            opacity: 0.72;
        }

        .recycle-title {
            font-size: 0.78rem;
            font-weight: 800;
            letter-spacing: 0.12em;
            text-transform: uppercase;
            color: #5effd4;
            margin-bottom: 6px;
        }

        .recycle-desc,
        .recycle-meta {
            font-size: 0.78rem;
            font-weight: 600;
            line-height: 1.4;
            color: rgba(240, 249, 255, 0.82);
            margin-bottom: 6px;
        }

        .recycle-meta {
            color: #fde047;
            font-weight: 800;
        }

        .recycle-btn {
            display: block;
            width: 100%;
            margin-top: 8px;
            padding: 10px 14px;
            border: none;
            border-radius: 999px;
            font-family: inherit;
            font-size: 0.75rem;
            font-weight: 800;
            letter-spacing: 0.1em;
            text-transform: uppercase;
            cursor: pointer;
            color: #041018;
            background: linear-gradient(135deg, #5effd4, #38bdf8);
        }

        .recycle-btn:disabled {
            cursor: default;
            filter: grayscale(0.35);
            opacity: 0.7;
        }

        .action-btn {
            display: none;
            width: 100%;
            max-width: 280px;
            margin: 0 auto;
            padding: 11px 18px;
            font-family: inherit;
            font-size: 0.78rem;
            font-weight: 800;
            letter-spacing: 0.08em;
            text-transform: uppercase;
            border-radius: 999px;
            border: none;
            cursor: pointer;
            color: #041018;
            background: linear-gradient(135deg, #00c896, #0096e0);
            box-shadow: 0 6px 20px rgba(0, 150, 224, 0.28);
        }

        .action-btn.save {
            background: linear-gradient(135deg, #fde047, #f59e0b);
            margin-top: 14px;
        }

        .lb-row {
            display: grid;
            grid-template-columns: 2.4ch minmax(0, 1fr) auto;
            align-items: center;
            gap: 8px;
            min-width: 0;
            padding: 9px 11px;
            margin-bottom: 6px;
            border-radius: 10px;
            background: rgba(255, 255, 255, 0.06);
            font-size: 0.82rem;
            border: 1px solid transparent;
        }

        .lb-row.gold {
            background: rgba(253, 224, 71, 0.15);
            border-color: rgba(253, 224, 71, 0.45);
        }

        .lb-row.silver {
            background: rgba(226, 232, 240, 0.12);
            border-color: rgba(226, 232, 240, 0.35);
        }

        .lb-row.bronze {
            background: rgba(251, 146, 60, 0.12);
            border-color: rgba(251, 146, 60, 0.4);
        }

        .lb-rank {
            font-weight: 800;
            color: rgba(255, 255, 255, 0.45);
        }

        .lb-row.gold .lb-rank { color: #fde047; }
        .lb-row.silver .lb-rank { color: #e2e8f0; }
        .lb-row.bronze .lb-rank { color: #fb923c; }

        .lb-mid {
            min-width: 0;
            display: flex;
            flex-direction: column;
            gap: 1px;
        }

        .lb-name {
            min-width: 0;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            color: rgba(255, 255, 255, 0.92);
            font-weight: 700;
        }

        .lb-recycle {
            font-size: 0.68rem;
            font-weight: 700;
            letter-spacing: 0.04em;
            color: rgba(94, 255, 212, 0.75);
        }

        .lb-score {
            flex-shrink: 0;
            font-weight: 800;
            color: #fde047;
            font-variant-numeric: tabular-nums;
        }

        .lb-empty {
            text-align: center;
            color: rgba(255, 255, 255, 0.5);
            font-size: 0.85rem;
            font-weight: 600;
            padding: 16px 8px;
        }

        /* Leaderboard modal */
        .lb-modal {
            display: none;
            position: fixed;
            inset: 0;
            z-index: 9999;
            background: rgba(0, 0, 0, 0.55);
            backdrop-filter: none;
            -webkit-backdrop-filter: none;
            align-items: center;
            justify-content: center;
            padding: 16px;
        }

        .lb-modal-card {
            position: relative;
            width: min(420px, 94vw);
            max-height: min(80vh, 640px);
            overflow-y: auto;
            border-radius: 22px;
            padding: 24px 18px 18px;
            background:
                linear-gradient(165deg,
                    rgba(30, 58, 110, 0.95) 0%,
                    rgba(49, 46, 129, 0.95) 55%,
                    rgba(76, 29, 149, 0.95) 100%);
            border: 1px solid rgba(255, 255, 255, 0.2);
            box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
        }

        .lb-modal-close {
            position: absolute;
            top: 12px;
            right: 14px;
            width: 34px;
            height: 34px;
            border-radius: 50%;
            border: 1px solid rgba(255, 255, 255, 0.2);
            background: rgba(0, 0, 0, 0.25);
            color: rgba(255, 255, 255, 0.75);
            font-size: 1.2rem;
            cursor: pointer;
            line-height: 1;
        }

        .lb-modal-title {
            text-align: center;
            font-size: 0.78rem;
            font-weight: 800;
            letter-spacing: 0.16em;
            text-transform: uppercase;
            color: #fde047;
            margin-bottom: 16px;
            padding-right: 20px;
        }

        .stats-modal-card {
            width: min(400px, 94vw);
        }

        .stats-list {
            display: flex;
            flex-direction: column;
            gap: 8px;
        }

        .stats-row {
            display: flex;
            align-items: baseline;
            justify-content: space-between;
            gap: 12px;
            padding: 10px 12px;
            border-radius: 12px;
            background: rgba(0, 0, 0, 0.22);
            border: 1px solid rgba(255, 255, 255, 0.1);
        }

        .stats-row-label {
            font-size: 0.78rem;
            font-weight: 650;
            color: rgba(240, 249, 255, 0.78);
            letter-spacing: 0.02em;
        }

        .stats-row-value {
            font-size: 0.92rem;
            font-weight: 800;
            color: #fde047;
            font-variant-numeric: tabular-nums;
            text-align: right;
            white-space: nowrap;
        }

        .stats-row.highlight .stats-row-value {
            color: #5effd4;
        }

        .stats-section-label {
            margin: 6px 2px 2px;
            font-size: 0.65rem;
            font-weight: 800;
            letter-spacing: 0.14em;
            text-transform: uppercase;
            color: rgba(255, 255, 255, 0.45);
        }

        .stats-note {
            margin-top: 10px;
            text-align: center;
            font-size: 0.7rem;
            color: rgba(255, 255, 255, 0.45);
        }

        @media (max-width: 860px) {
            .play-grid {
                grid-template-columns: 1fr;
            }

            .click-area {
                min-height: auto;
                padding: 8px 0 4px;
            }

            .upgrades-panel {
                max-height: none;
            }

            .back-link,
            .top-bar-btn {
                border-radius: 99px;
                padding: 10px 14px;
                font-size: 0.68rem;
            }
        }

        @media (min-width: 640px) {
            .back-link,
            .top-bar-btn { border-radius: 99px; }
        }

        @media (prefers-reduced-motion: reduce) {
            .title-main,
            .title-divider,
            .click-area::before,
            .click-button,
            .upgrade-item:not(.disabled),
            .stat-pill.live,
            .upgrade-item.tier-burst,
            .upgrade-item.tier-burst .upgrade-count,
            .tier-burst-label,
            .tier-spark {
                animation: none !important;
            }

            .combo-chip.combo-pure-gold,
            .combo-chip.combo-platinum,
            .combo-chip.combo-void,
            .combo-chip.combo-secret,
            .combo-chip.combo-euroglass {
                animation: none !important;
            }
        }
