/* Hot Fun Spin TWA styles — synced from production index.html 2026-09-12 */
        :root {
            --tg-theme-bg-color: #0a0b0d;
            --tg-theme-text-color: #f8fafc;
            --tg-theme-hint-color: #8a919e;
            --tg-theme-button-color: #0052ff;
            --tg-theme-button-text-color: #ffffff;
            --primary: #0052ff;
            --primary-glow: rgba(0, 82, 255, 0.35);
            --card-bg: #161719;
            --card-border: rgba(255, 255, 255, 0.06);
            --surface: rgba(22, 23, 25, 0.85);
            --surface-raised: rgba(30, 32, 36, 0.9);
            --text-primary: #f8fafc;
            --text-secondary: #8a919e;
            --text-tertiary: #5b616e;
            --text-light: #e2e8f0;
            --border: rgba(255, 255, 255, 0.06);
            --border-divider: rgba(255, 255, 255, 0.04);
            --success: #10b981;
            --success-bg: rgba(16, 185, 129, 0.15);
            --danger: #ef4444;
            --overlay-bg: rgba(2, 6, 23, 0.85);
            --modal-bg: #161719;
            --input-bg: #0a0b0d;
            --disabled-bg: #1e2025;
            --disabled-text: #5b616e;
            --subtle-bg: rgba(255, 255, 255, 0.04);
            --subtle-bg-hover: rgba(255, 255, 255, 0.08);
            --subtle-bg-active: rgba(255, 255, 255, 0.12);
            --nav-bg: rgba(10, 11, 13, 0.95);
            --btn-on-accent: #0a0b0d;
        }
        [data-theme="light"] {
            --tg-theme-bg-color: #f5f5f5;
            --tg-theme-text-color: #1a1a1a;
            --tg-theme-hint-color: #6b7280;
            --primary-glow: rgba(0, 82, 255, 0.18);
            --card-bg: #ffffff;
            --card-border: rgba(0, 0, 0, 0.08);
            --surface: rgba(255, 255, 255, 0.92);
            --surface-raised: rgba(243, 244, 246, 0.95);
            --text-primary: #1a1a1a;
            --text-secondary: #6b7280;
            --text-tertiary: #9ca3af;
            --text-light: #374151;
            --border: rgba(0, 0, 0, 0.08);
            --border-divider: rgba(0, 0, 0, 0.05);
            --success-bg: rgba(16, 185, 129, 0.1);
            --overlay-bg: rgba(0, 0, 0, 0.5);
            --modal-bg: #ffffff;
            --input-bg: #f3f4f6;
            --disabled-bg: #e5e7eb;
            --disabled-text: #9ca3af;
            --subtle-bg: rgba(0, 0, 0, 0.03);
            --subtle-bg-hover: rgba(0, 0, 0, 0.06);
            --subtle-bg-active: rgba(0, 0, 0, 0.1);
            --nav-bg: rgba(255, 255, 255, 0.95);
            --btn-on-accent: #ffffff;
        }

        body {
            font-family: 'Outfit', -apple-system, sans-serif;
            background: var(--tg-theme-bg-color);
            color: var(--text-primary);
            margin: 0;
            padding: 16px;
            min-height: 100vh;
            box-sizing: border-box;
            user-select: none;
            -webkit-tap-highlight-color: transparent;
        }

        /* 骨架屏加载态 */
        .loading-screen {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            height: 80vh;
        }
        body.ns-casino .loading-screen {
            height: 100vh;
            background: #16122a;
        }

        #splash-screen {
            position: fixed;
            inset: 0;
            z-index: 100000;
            display: flex;
            align-items: center;
            justify-content: center;
            background: #16122a;
            transition: opacity .28s ease;
        }
        #splash-hero, #splash-dock, #splash-fomo { display: none; }
        #splash-spinner,
        #boot-spinner {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 48px;
            height: 48px;
        }
        #splash-spinner i,
        #boot-spinner i {
            display: block;
            width: 28px;
            height: 28px;
            border: 3px solid rgba(245, 197, 66, 0.18);
            border-top-color: #f5c542;
            border-radius: 50%;
            animation: spin 0.8s linear infinite;
        }

        .loading-icon {
            margin-bottom: 28px;
        }

        .loading-icon img {
            width: 96px;
            height: 96px;
            border-radius: 20px;
        }

        .loading-dots {
            display: inline-block;
            width: 1.35em;
            text-align: left;
        }

        .spinner {
            width: 40px;
            height: 40px;
            border: 4px solid var(--card-border);
            border-top: 4px solid var(--primary);
            border-radius: 50%;
            animation: spin 1s linear infinite;
        }

        @keyframes spin {
            100% {
                transform: rotate(360deg);
            }
        }

        #app {
            display: none;
            flex-direction: column;
            gap: 20px;
            animation: fadeIn 0.5s ease-out;
            max-width: 600px;
            margin: 0 auto;
        }

        @keyframes fadeIn {
            from {
                opacity: 0;
                transform: translateY(10px);
            }

            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        /* Header */
        .header {
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .btn-settings {
            margin-left: auto;
            width: 32px;
            height: 32px;
            border-radius: 50%;
            background: var(--card-bg);
            border: 1px solid var(--card-border);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 16px;
            cursor: pointer;
            transition: background 0.2s, transform 0.15s;
            text-decoration: none;
            flex-shrink: 0;
            position: relative;
        }
        .btn-settings:active { transform: scale(0.92); background: rgba(0, 82, 255, 0.2); }
        /* World Tasks toggle 未开 & 使用者 skipped/未 verified 时 齿轮上显红点 */
        .btn-settings .settings-dot {
            display: none;
            position: absolute;
            top: 2px;
            right: 2px;
            width: 8px;
            height: 8px;
            border-radius: 50%;
            background: #ef4444;
            border: 2px solid var(--bg);
            box-sizing: content-box;
        }
        .btn-settings.has-dot .settings-dot { display: block; }
        /* Settings 内一个 toggle switch (World Tasks) */
        .sdi-toggle-switch {
            margin-left: auto;
            position: relative;
            display: inline-block;
            width: 36px;
            height: 20px;
            flex-shrink: 0;
        }
        .sdi-toggle-switch input { opacity: 0; width: 0; height: 0; }
        .sdi-toggle-track {
            position: absolute;
            cursor: pointer;
            top: 0; left: 0; right: 0; bottom: 0;
            background: var(--text-tertiary);
            transition: 0.2s;
            border-radius: 20px;
        }
        .sdi-toggle-knob {
            position: absolute;
            left: 2px;
            top: 2px;
            width: 16px;
            height: 16px;
            background: #fff;
            border-radius: 50%;
            transition: transform 0.2s;
        }
        .sdi-toggle-switch input:checked + .sdi-toggle-track { background: #22c55e; }
        .sdi-toggle-switch input:checked + .sdi-toggle-track .sdi-toggle-knob { transform: translateX(16px); }

        .settings-dropdown {
            position: fixed;
            top: 46px;
            right: 16px;
            background: var(--modal-bg);
            border: 1px solid var(--card-border);
            border-radius: 14px;
            padding: 6px 0;
            min-width: 200px;
            max-width: calc(100vw - 32px);
            box-shadow: 0 8px 32px rgba(0,0,0,0.5);
            z-index: 100;
            display: none;
            animation: popIn 0.2s ease;
        }
        .settings-dropdown.open { display: block; }
        .settings-dropdown-item {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 11px 16px;
            font-size: 13px;
            font-weight: 500;
            color: var(--text-light);
            cursor: pointer;
            transition: background 0.15s;
            border: none;
            background: none;
            width: 100%;
            box-sizing: border-box;
            text-align: left;
            font-family: 'Outfit', sans-serif;
        }
        .settings-dropdown-item:active { background: var(--subtle-bg-active); }
        .settings-dropdown-item .sdi-icon { font-size: 16px; width: 22px; text-align: center; }

        .sdi-lang { cursor: pointer; }
        .lang-submenu {
            display: none;
            padding: 0 6px 4px;
        }
        .lang-submenu.open { display: flex; flex-wrap: wrap; gap: 4px; }
        .lang-option {
            display: flex; align-items: center; gap: 6px;
            padding: 7px 10px; font-size: 12px; font-weight: 500;
            color: var(--text-secondary); cursor: pointer; border: none;
            background: var(--subtle-bg); border-radius: 8px;
            font-family: 'Outfit', sans-serif; flex: 1; min-width: 45%;
            transition: background 0.15s;
        }
        .lang-option:active { background: rgba(0,82,255,0.15); }
        .lang-check { margin-left: auto; font-size: 12px; color: #22c55e; }
        .lang-check::after { content: ''; }
        .lang-check.active::after { content: '✓'; }

        @keyframes ctaPulse {
            0%, 100% { box-shadow: 0 0 0 0 rgba(0, 82, 255, 0.5); }
            50% { box-shadow: 0 0 0 8px rgba(0, 82, 255, 0); }
        }

        .avatar {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            background: var(--card-bg);
            border: 2px solid var(--primary);
            box-shadow: none;
            object-fit: cover;
        }

        .user-info h1 {
            margin: 0;
            font-size: 15px;
            font-weight: 700;
        }

        .user-info p {
            margin: 2px 0 0;
            font-size: 11px;
            color: var(--tg-theme-hint-color);
        }

        /* Stats Grid — compact inline bar */
        /* Ticket 进度条 + Spin 按钮: 单一布局, 够票时按钮亮起可点 */
        .stats-grid {
            display: block;
            padding: 0;
            background: transparent;
            border: none;
            margin-bottom: 8px;
        }
        .ticket-bar {
            display: flex;
            align-items: center;
            gap: 8px;
            width: 100%;
            box-sizing: border-box;
            -webkit-tap-highlight-color: transparent;
        }
        .ticket-bar-progress {
            position: relative;
            flex: 1 1 auto;
            min-width: 0;
            height: 36px;
            border-radius: 10px;
            background: var(--card-bg);
            border: 1px solid var(--card-border);
            overflow: hidden;
        }
        .ticket-bar-fill {
            position: absolute;
            inset: 0 auto 0 0;
            width: 0%;
            max-width: 100%;
            background: linear-gradient(90deg, rgba(0,82,255,0.28), rgba(99,102,241,0.38));
            transition: width 0.35s ease;
            pointer-events: none;
        }
        .ticket-bar-label {
            position: relative;
            z-index: 1;
            display: flex;
            align-items: center;
            gap: 4px;
            height: 100%;
            padding: 0 12px;
        }
        .ticket-bar-emoji { font-size: 14px; line-height: 1; }
        .ticket-bar-count {
            font-size: 14px;
            font-weight: 800;
            color: var(--text-primary);
            line-height: 1;
            position: relative;
        }
        .ticket-bar-sep {
            font-size: 12px;
            font-weight: 600;
            color: var(--text-tertiary);
            margin: 0 1px;
        }
        .ticket-bar-tps {
            font-size: 12px;
            font-weight: 700;
            color: var(--text-secondary);
            line-height: 1;
        }
        .ticket-spin-btn {
            flex: 0 0 auto;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 4px;
            height: 36px;
            min-width: 78px;
            padding: 0 12px;
            border-radius: 10px;
            border: 1px solid var(--card-border);
            background: var(--card-bg);
            color: var(--text-tertiary);
            font-size: 13px;
            font-weight: 800;
            letter-spacing: 0.2px;
            cursor: not-allowed;
            opacity: 0.55;
            transition: background 0.2s, border-color 0.2s, color 0.2s, opacity 0.2s, transform 0.12s, box-shadow 0.2s;
            -webkit-tap-highlight-color: transparent;
        }
        .ticket-spin-btn .ticket-spin-meta {
            font-size: 10px;
            font-weight: 700;
            opacity: 0.85;
        }
        .ticket-spin-btn.ready {
            cursor: pointer;
            opacity: 1;
            color: #fff;
            background: linear-gradient(135deg, #0052ff, #6366f1);
            border-color: transparent;
            box-shadow: 0 2px 10px rgba(99,102,241,0.35);
        }
        .ticket-spin-btn.ready:active { transform: scale(0.96); }
        /* 兼容旧 class */
        .stat-item, .stat-item-spin, .ticket-bar-ready { display: contents; }

        /* Checkin card in stats bar */
        .checkin-card {
            cursor: pointer;
            position: relative;
        }
        .checkin-card .checkin-badge {
            position: absolute;
            top: -6px;
            right: -8px;
            width: 10px;
            height: 10px;
            border-radius: 50%;
            background: #ef4444;
            animation: checkinPulse 1.5s infinite;
        }
        @keyframes checkinPulse {
            0%, 100% { transform: scale(1); opacity: 1; }
            50% { transform: scale(1.4); opacity: 0.7; }
        }

        /* ═══ Checkin Modal (design: light glass sheet) ═══ */
        #checkin-modal .checkin-modal-sheet {
            position: relative;
            background: linear-gradient(165deg, #f7fbff 0%, #eef5ff 48%, #f4f7fc 100%);
            border: 1px solid rgba(148, 163, 184, 0.28);
            border-radius: 28px;
            padding: 22px 18px 18px;
            max-width: 380px;
            width: 100%;
            max-height: min(90vh, 720px);
            overflow-y: auto;
            -webkit-overflow-scrolling: touch;
            box-shadow: 0 24px 48px rgba(15, 23, 42, 0.18), 0 2px 0 rgba(255,255,255,0.7) inset;
            color: #0f172a;
            animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
        }
        .checkin-close {
            position: absolute;
            top: 12px; right: 12px;
            width: 32px; height: 32px;
            border: none;
            border-radius: 50%;
            background: rgba(148, 163, 184, 0.22);
            color: #64748b;
            font-size: 20px;
            line-height: 1;
            cursor: pointer;
            display: flex; align-items: center; justify-content: center;
            padding: 0;
            z-index: 2;
        }
        .checkin-close:active { background: rgba(148, 163, 184, 0.35); color: #334155; }
        .checkin-hero {
            display: flex;
            align-items: center;
            gap: 12px;
            padding-right: 28px;
            margin-bottom: 16px;
        }
        .checkin-cal {
            width: 52px; height: 52px;
            border-radius: 14px;
            background: linear-gradient(180deg, #fff 0%, #f1f5f9 100%);
            box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12), 0 0 0 1px rgba(148,163,184,0.25);
            display: flex; flex-direction: column; align-items: stretch;
            overflow: hidden;
            flex-shrink: 0;
        }
        .checkin-cal-top {
            height: 16px;
            background: linear-gradient(180deg, #f87171, #ef4444);
            display: flex; align-items: center; justify-content: center;
            gap: 8px;
        }
        .checkin-cal-top::before, .checkin-cal-top::after {
            content: '';
            width: 5px; height: 8px;
            border-radius: 3px;
            background: #cbd5e1;
            box-shadow: 0 -3px 0 #94a3b8;
            margin-top: -6px;
        }
        .checkin-cal-num {
            flex: 1;
            display: flex; align-items: center; justify-content: center;
            font-family: 'Outfit', sans-serif;
            font-size: 22px; font-weight: 800;
            color: #1e293b;
            line-height: 1;
        }
        .checkin-hero-text { min-width: 0; }
        .checkin-hero-text h3 {
            margin: 0 0 4px;
            font-family: 'Outfit', sans-serif;
            font-size: 20px; font-weight: 800;
            color: #0f172a;
            letter-spacing: -0.3px;
        }
        .checkin-hero-text p {
            margin: 0;
            font-size: 12px;
            color: #64748b;
            line-height: 1.35;
            font-weight: 500;
        }
        .checkin-modal-body { padding: 0; }
        .checkin-week {
            display: grid;
            grid-template-columns: repeat(7, 1fr);
            gap: 5px;
            margin: 0 0 16px;
        }
        .checkin-day {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 5px;
            padding: 8px 2px 7px;
            border-radius: 14px;
            background: #fff;
            border: 1.5px solid #e2e8f0;
            box-shadow: 0 4px 10px rgba(15, 23, 42, 0.04);
            transition: transform 0.15s, box-shadow 0.15s;
            min-width: 0;
            overflow: hidden;
        }
        .checkin-day.done {
            background: linear-gradient(180deg, #e8fbf1 0%, #d1fae5 100%);
            border-color: #6ee7b7;
            box-shadow: 0 4px 12px rgba(16, 185, 129, 0.15);
        }
        .checkin-day.today {
            background: linear-gradient(180deg, #eef2ff 0%, #e0e7ff 100%);
            border-color: #818cf8;
            box-shadow: 0 4px 14px rgba(99, 102, 241, 0.22);
            transform: translateY(-1px);
        }
        .checkin-day.today.done {
            background: linear-gradient(180deg, #e8fbf1 0%, #d1fae5 100%);
            border-color: #6ee7b7;
            box-shadow: 0 4px 12px rgba(16, 185, 129, 0.15);
            transform: none;
        }
        .checkin-day-label {
            font-size: 9px;
            color: #64748b;
            font-weight: 700;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            max-width: 100%;
        }
        .checkin-day.done .checkin-day-label { color: #047857; }
        .checkin-day.today .checkin-day-label { color: #4f46e5; }
        .checkin-day.today.done .checkin-day-label { color: #047857; }
        .checkin-day:not(.done):not(.today) .checkin-day-label { color: #6366f1; }
        .checkin-day-icon {
            font-size: 15px;
            line-height: 1;
            width: 28px; height: 28px;
            display: flex; align-items: center; justify-content: center;
            border-radius: 50%;
            font-weight: 800;
            font-family: 'Outfit', sans-serif;
            background: transparent;
            color: #6366f1;
        }
        .checkin-day.done .checkin-day-icon {
            background: linear-gradient(180deg, #34d399, #10b981);
            color: #fff;
            font-size: 14px;
            box-shadow: 0 4px 10px rgba(16, 185, 129, 0.35);
        }
        .checkin-day.today:not(.done) .checkin-day-icon {
            background: linear-gradient(180deg, #818cf8, #6366f1);
            color: #fff;
            box-shadow: 0 4px 10px rgba(99, 102, 241, 0.35);
        }
        .checkin-day-reward {
            display: inline-flex;
            align-items: center;
            gap: 1px;
            font-size: 10px;
            font-weight: 800;
            color: #475569;
            white-space: nowrap;
            line-height: 1;
        }
        .checkin-day.done .checkin-day-reward { color: #059669; }
        .checkin-day.today:not(.done) .checkin-day-reward { color: #4f46e5; }
        .checkin-day-reward .ci-tix { font-size: 11px; line-height: 1; }
        .checkin-claim-stack {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 12px;
            margin-top: 2px;
        }
        .checkin-claim-btn {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            width: 100%;
            padding: 14px 18px;
            border: none;
            border-radius: 999px;
            font-family: 'Outfit', sans-serif;
            font-size: 15px;
            font-weight: 800;
            cursor: pointer;
            transition: transform 0.15s, opacity 0.2s, box-shadow 0.2s;
            letter-spacing: 0.2px;
            text-align: center;
            box-sizing: border-box;
        }
        .checkin-claim-btn:active { transform: scale(0.98); }
        .checkin-claim-btn .ci-gift {
            width: 28px; height: 28px;
            border-radius: 8px;
            display: inline-flex; align-items: center; justify-content: center;
            font-size: 20px;
            line-height: 1;
            flex-shrink: 0;
        }
        .checkin-claim-btn .ci-claim-copy {
            display: inline-flex;
            flex-direction: column;
            align-items: center;
            gap: 2px;
            min-width: 0;
        }
        .checkin-claim-btn .ci-claim-title {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
            font-size: 15px;
            font-weight: 800;
            line-height: 1.2;
        }
        .checkin-claim-btn .ci-claim-title .ci-check-badge {
            width: 18px; height: 18px;
            border-radius: 5px;
            background: #22c55e;
            color: #fff;
            font-size: 12px;
            display: inline-flex; align-items: center; justify-content: center;
            box-shadow: 0 2px 6px rgba(34, 197, 94, 0.4);
        }
        .checkin-claim-btn .ci-claim-sub {
            font-size: 11px;
            font-weight: 500;
            line-height: 1.3;
            opacity: 0.85;
        }
        .checkin-claim-btn.active {
            background: linear-gradient(135deg, #6366f1 0%, #4f46e5 45%, #0ea5e9 100%);
            color: #fff;
            box-shadow: 0 10px 24px rgba(79, 70, 229, 0.35);
        }
        .checkin-claim-btn.active .ci-claim-sub { color: rgba(255,255,255,0.85); }
        .checkin-claim-btn.claimed {
            background: linear-gradient(135deg, rgba(167, 243, 208, 0.75), rgba(110, 231, 183, 0.55));
            border: 1px solid rgba(52, 211, 153, 0.55);
            color: #047857;
            cursor: default;
            box-shadow: 0 8px 20px rgba(16, 185, 129, 0.12), inset 0 1px 0 rgba(255,255,255,0.65);
            border-radius: 18px;
            justify-content: flex-start;
            text-align: left;
            gap: 12px;
            padding: 12px 14px;
        }
        .checkin-claim-btn.claimed .ci-gift {
            width: 44px; height: 44px;
            border-radius: 14px;
            font-size: 28px;
            background: radial-gradient(circle at 40% 30%, rgba(255,255,255,0.55), transparent 55%);
            filter: drop-shadow(0 4px 8px rgba(16, 185, 129, 0.25));
        }
        .checkin-claim-btn.claimed .ci-claim-copy { align-items: flex-start; flex: 1; }
        .checkin-claim-btn.claimed .ci-claim-title { justify-content: flex-start; }
        .checkin-claim-btn.claimed .ci-claim-sub { color: #065f46; opacity: 0.9; }
        .checkin-claim-btn.ad {
            background: linear-gradient(135deg, #6366f1 0%, #4f46e5 45%, #0ea5e9 100%);
            color: #fff;
            box-shadow: 0 10px 24px rgba(79, 70, 229, 0.35);
        }
        .checkin-claim-btn.ad:disabled,
        .checkin-claim-btn.active:disabled { opacity: 0.65; }
        .checkin-streak-info {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
            margin: 14px auto 0;
            padding: 8px 14px;
            width: fit-content;
            max-width: 100%;
            border-radius: 999px;
            background: #fff;
            border: 1px solid rgba(148, 163, 184, 0.35);
            box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
            font-size: 12px;
            font-weight: 600;
            color: #475569;
            text-align: center;
        }
        .checkin-streak-info .ci-streak-n {
            color: #f97316;
            font-weight: 800;
        }
        .earn-more-btn {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
            width: 100%;
            margin-top: 12px;
            padding: 11px;
            border: none;
            border-radius: 12px;
            background: linear-gradient(135deg, #3b82f6, #2563eb);
            color: #fff;
            font-family: 'Outfit', sans-serif;
            font-size: 13px;
            font-weight: 700;
            cursor: pointer;
            box-shadow: 0 3px 10px rgba(59,130,246,0.28);
            transition: transform 0.15s;
        }
        .earn-more-btn:active { transform: scale(0.97); }

        /* Missions Modal — row list */
        .mission-section-title {
            font-size: 11px;
            font-weight: 700;
            color: var(--text-tertiary);
            text-transform: uppercase;
            letter-spacing: 0.5px;
            margin: 12px 4px 6px;
        }
        .mission-section-title:first-child { margin-top: 4px; }
        .mission-row {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 10px 12px;
            background: var(--subtle-bg);
            border-radius: 12px;
            margin-bottom: 6px;
        }
        .mission-row-icon {
            width: 36px;
            height: 36px;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
        }
        .mission-row-main { flex: 1; min-width: 0; text-align: left; }
        .mission-row-title {
            font-size: 13px;
            font-weight: 600;
            color: var(--text-primary);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .mission-row-sub {
            font-size: 11px;
            color: var(--text-secondary);
            margin-top: 2px;
        }
        .mission-row-btn {
            position: relative;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 5px;
            flex-shrink: 0;
            box-sizing: border-box;
            width: 92px;
            min-width: 92px;
            height: 36px;
            padding: 0 10px;
            border: none;
            border-radius: 56px;
            font-family: 'Outfit', sans-serif;
            font-size: 12px;
            font-weight: 700;
            line-height: 1;
            cursor: pointer;
            overflow: hidden;
        }
        .mission-row-btn .cta-label { position: relative; z-index: 1; white-space: nowrap; }
        .mission-row-btn .cta-ico {
            position: relative; z-index: 1;
            display: inline-flex; width: 14px; height: 14px; flex-shrink: 0; color: #fff;
        }
        .mission-row-btn .cta-ico svg { display: block; width: 14px; height: 14px; }
        .mission-row-btn.primary {
            --cta-cut: #4f46e5;
            background: linear-gradient(135deg, #6366f1 0%, #4f46e5 42%, #0ea5e9 100%);
            color: #fff;
            box-shadow: 0 4px 14px rgba(79, 70, 229, 0.35);
            animation: none;
        }
        .mission-row-btn.primary::before,
        .mission-row-btn.primary::after {
            content: '';
            position: absolute;
            pointer-events: none;
            border-radius: 50%;
            background: radial-gradient(circle, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0.35) 35%, rgba(255,255,255,0) 70%);
        }
        .mission-row-btn.primary::before { width: 10px; height: 10px; top: 3px; left: 9px; opacity: 0.9; }
        .mission-row-btn.primary::after { width: 7px; height: 7px; right: 8px; bottom: 4px; opacity: 0.55; }
        .mission-row-btn.locked {
            background: var(--subtle-bg-active);
            color: var(--text-tertiary);
            cursor: default;
            width: auto;
            min-width: 64px;
            border-radius: 10px;
        }
        .mission-row-btn.done {
            background: linear-gradient(135deg, #22c55e, #16a34a);
            color: #fff;
            cursor: default;
            box-shadow: none;
        }
        /* 广告冷却态：按钮显示 Ns 倒计时，禁用点击，视觉上灰化 */
        .btn-play.ad-cooldown-active,
        .mission-row-btn.ad-cooldown-active {
            background: var(--subtle-bg-active, #334155) !important;
            color: var(--text-tertiary, #94a3b8) !important;
            cursor: default !important;
            opacity: 0.75;
            box-shadow: none !important;
            animation: none !important;
            pointer-events: none;
        }

        /* Spin HUD — 任务入口贴在游戏主界面，不再占独立 HOME */
        .spin-hud {
            display: flex;
            flex-direction: column;
            gap: 8px;
            margin-bottom: 10px;
        }
        .spin-hud-tickets { margin-bottom: 0; }
        .spin-hud .ticket-spin-btn { display: none; }
        .spin-hud-qa.quick-actions {
            grid-template-columns: repeat(auto-fit, minmax(52px, 1fr));
            margin-bottom: 0;
            padding: 4px 2px;
            background: rgba(255,255,255,0.04);
        }
        .spin-hud-qa .qa-icon { width: 28px; height: 28px; border-radius: 8px; }
        .spin-hud-qa .qa-label { font-size: 9px; letter-spacing: 0.01em; }
        .spin-hud-qa .qa-btn { padding: 6px 2px; gap: 3px; }

        /* Quick Actions Grid (金刚区) — 合并到一个卡片里 */
        .quick-actions {
            display: grid;
            grid-template-columns: repeat(5, 1fr);
            gap: 0;
            margin-bottom: 10px;
            background: var(--card-bg);
            border: 1px solid var(--card-border);
            border-radius: 14px;
            padding: 6px 4px;
        }
        .qa-btn {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 4px;
            padding: 8px 2px;
            background: transparent;
            border: none;
            border-radius: 10px;
            cursor: pointer;
            -webkit-tap-highlight-color: transparent;
            transition: background 0.15s, transform 0.15s;
            position: relative;
        }
        .qa-btn:active {
            transform: scale(0.96);
            background: var(--surface-raised);
        }
        .qa-icon {
            width: 40px; height: 40px;
            display: block;
            object-fit: contain;
            border-radius: 12px;
            -webkit-user-drag: none;
            user-select: none;
            pointer-events: none;
        }

        /* Rank tab */
        .rank-header { padding: 2px 0 12px; text-align: center; }
        .rank-title-row {
            display: flex; align-items: center; justify-content: center; gap: 10px;
            margin-bottom: 10px;
        }
        .rank-laurel {
            width: 22px; height: 28px; color: var(--text-tertiary); flex-shrink: 0;
        }
        .rank-laurel.right { transform: scaleX(-1); }
        .rank-title {
            margin: 0; font-size: 22px; font-weight: 800; color: var(--text-primary);
            letter-spacing: -0.3px;
        }
        .rank-period-pill {
            display: inline-flex; align-items: center; gap: 6px;
            padding: 6px 12px; border-radius: 999px;
            background: var(--subtle-bg); border: 1px solid var(--card-border);
            font-size: 11px; font-weight: 600; color: var(--text-secondary);
            margin-bottom: 12px;
        }
        .rank-period-pill svg { width: 12px; height: 12px; color: var(--text-tertiary); flex-shrink: 0; }
        .rank-dims {
            display: flex; gap: 6px; background: var(--card-bg);
            border: 1px solid var(--card-border); border-radius: 14px; padding: 4px;
        }
        .rank-dim-btn {
            flex: 1; border: none; background: transparent; color: var(--text-secondary);
            font-size: 12px; font-weight: 700; padding: 9px 6px; border-radius: 11px;
            cursor: pointer; -webkit-tap-highlight-color: transparent;
            display: inline-flex; align-items: center; justify-content: center; gap: 5px;
        }
        .rank-dim-btn img {
            width: 14px; height: 14px; border-radius: 50%; object-fit: cover; display: block;
        }
        .rank-dim-btn .rank-dim-ico { width: 14px; height: 14px; display: block; }
        .rank-dim-btn.active {
            background: var(--text-primary); color: var(--tg-theme-bg-color);
        }
        .rank-dim-btn.active img { box-shadow: 0 0 0 1px rgba(128,128,128,0.25); }
        .rank-body { margin-top: 14px; }
        .rank-podium {
            display: flex; align-items: stretch; justify-content: center;
            gap: 8px; min-height: 210px; padding: 4px 0 0;
        }
        .rank-pod-card {
            flex: 1; min-width: 0;
            display: flex; flex-direction: column; align-items: center;
            background: var(--card-bg); border: 1px solid var(--card-border);
            border-radius: 16px 16px 10px 10px; padding: 10px 6px 12px;
            position: relative;
        }
        .rank-pod-card.rank-pod-1 {
            margin-top: 0; padding-top: 14px;
            background: linear-gradient(180deg, rgba(245,215,110,0.22) 0%, var(--card-bg) 72%);
            border-color: rgba(212,175,55,0.45);
            box-shadow: 0 8px 20px rgba(0,0,0,0.08);
        }
        .rank-pod-card.rank-pod-2 {
            margin-top: 18px;
            background: linear-gradient(180deg, rgba(156,163,175,0.20) 0%, var(--card-bg) 72%);
            border-color: rgba(148,163,184,0.40);
        }
        .rank-pod-card.rank-pod-3 {
            margin-top: 28px;
            background: linear-gradient(180deg, rgba(180,120,60,0.18) 0%, var(--card-bg) 72%);
            border-color: rgba(180,120,60,0.35);
        }
        [data-theme="light"] .rank-pod-card.rank-pod-1 {
            background: linear-gradient(180deg, #fff6d6 0%, #ffffff 70%);
        }
        [data-theme="light"] .rank-pod-card.rank-pod-2 {
            background: linear-gradient(180deg, #eef1f5 0%, #ffffff 70%);
        }
        [data-theme="light"] .rank-pod-card.rank-pod-3 {
            background: linear-gradient(180deg, #f5e6d4 0%, #ffffff 70%);
        }
        .rank-pod-medal {
            width: 28px; height: 28px; border-radius: 50%;
            display: flex; align-items: center; justify-content: center;
            font-size: 12px; font-weight: 800; color: #111; margin-bottom: 8px;
        }
        .rank-pod-1 .rank-pod-medal { background: linear-gradient(160deg,#f5d76e,#c9a227); }
        .rank-pod-2 .rank-pod-medal { background: linear-gradient(160deg,#e8e8e8,#9ca3af); }
        .rank-pod-3 .rank-pod-medal { background: linear-gradient(160deg,#e0b089,#a16207); }
        .rank-pod-avatar, .rank-row-avatar, .rank-my-avatar {
            border-radius: 50%; object-fit: cover; background: var(--subtle-bg);
            flex-shrink: 0;
        }
        .rank-pod-avatar { width: 48px; height: 48px; margin-bottom: 8px; border: 2px solid var(--card-border); }
        .rank-pod-1 .rank-pod-avatar { width: 56px; height: 56px; border-color: rgba(212,175,55,0.55); }
        .rank-row-avatar, .rank-my-avatar { width: 34px; height: 34px; }
        .rank-my-avatar.rank-avatar-fallback, .rank-row-avatar.rank-avatar-fallback { font-size: 11px; }
        .rank-avatar-fallback {
            display: flex; align-items: center; justify-content: center;
            font-weight: 800; color: var(--text-secondary); background: var(--subtle-bg-hover);
        }
        .rank-pod-name {
            font-size: 11px; font-weight: 700; color: var(--text-primary);
            max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
            text-align: center;
        }
        .rank-pod-name.me { color: var(--primary); }
        .rank-pod-user {
            font-size: 10px; font-weight: 500; color: var(--text-tertiary);
            max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
            margin-top: 2px; text-align: center;
        }
        .rank-pod-score {
            margin-top: 8px; font-size: 12px; font-weight: 800; color: var(--text-primary);
            text-align: center; line-height: 1.2;
        }
        .rank-list {
            background: var(--card-bg); border: 1px solid var(--card-border);
            border-radius: 16px; padding: 4px 8px; margin-top: 12px;
        }
        .rank-row {
            display: flex; align-items: center; gap: 10px;
            padding: 11px 6px;
            border-bottom: 1px solid var(--border-divider);
        }
        .rank-row:last-child { border-bottom: none; }
        .rank-row.me { background: rgba(0,82,255,0.08); border-radius: 10px; border-bottom-color: transparent; }
        .rank-row-num {
            width: 28px; text-align: center; font-size: 12px; font-weight: 700; color: var(--text-tertiary);
        }
        .rank-row-avatar { width: 34px; height: 34px; }
        .rank-row-meta { flex: 1; min-width: 0; }
        .rank-row-name {
            font-size: 13px; font-weight: 700; color: var(--text-light);
            overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
        }
        .rank-row.me .rank-row-name { color: var(--primary); }
        .rank-row-user {
            font-size: 11px; color: var(--text-tertiary); font-weight: 500;
            overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
        }
        .rank-row-score {
            font-size: 12px; color: var(--text-secondary); font-weight: 700; white-space: nowrap;
        }
        .rank-my {
            position: sticky; bottom: 72px; z-index: 20;
            margin: 10px 0 0; padding: 10px 12px;
            background: var(--card-bg); border: 1px solid rgba(0,82,255,0.35);
            border-radius: 14px; box-shadow: 0 8px 24px rgba(0,0,0,0.18);
            display: flex; align-items: center; gap: 10px;
        }

        .qa-streak { display: none !important; }
        .qa-label {
            font-size: 10px;
            font-weight: 600;
            color: var(--text-secondary);
            text-align: center;
            line-height: 1.2;
        }
        .qa-icon-wrap {
            position: relative;
            width: 40px;
            height: 40px;
            flex-shrink: 0;
        }
        .qa-icon-wrap .qa-icon {
            width: 100%;
            height: 100%;
        }
        .qa-badge {
            position: absolute;
            top: -2px;
            right: -2px;
            width: 8px;
            height: 8px;
            border-radius: 50%;
            background: #ef4444;
            display: none;
            z-index: 1;
        }
        .qa-badge.active { display: block; box-shadow: 0 0 0 0 rgba(239,68,68,0.7); animation: qaBadgePulse 1.6s infinite; }
        @keyframes qaBadgePulse {
            0%   { box-shadow: 0 0 0 0 rgba(239,68,68,0.6); }
            70%  { box-shadow: 0 0 0 8px rgba(239,68,68,0); }
            100% { box-shadow: 0 0 0 0 rgba(239,68,68,0); }
        }

        /* Products Section */
        .section-title {
            font-size: 15px;
            font-weight: 700;
            margin: 14px 0 6px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            color: var(--text-primary);
        }

        /* Top-level Earn / Offers section switcher */
        .earn-section-tabs {
            display: flex;
            gap: 8px;
            margin-bottom: 12px;
        }
        .ess-tab {
            flex: 1;
            padding: 10px 0;
            text-align: center;
            font-size: 14px;
            font-weight: 700;
            color: var(--text-tertiary);
            background: var(--card-bg);
            border: 1px solid var(--card-border);
            border-radius: 12px;
            cursor: pointer;
            transition: all 0.2s ease;
        }
        .ess-tab.active {
            background: linear-gradient(135deg, #2563eb, #0052ff);
            color: #fff;
            border-color: #0052ff;
            box-shadow: 0 4px 14px rgba(0,82,255,0.45);
        }
        .ess-tab { position: relative; }
        .ess-dot {
            position: absolute;
            top: 6px;
            right: 10px;
            width: 8px; height: 8px;
            border-radius: 50%;
            background: #ef4444;
            box-shadow: 0 0 0 2px var(--card-bg);
            display: none;
        }
        .ess-tab.has-new .ess-dot { display: block; }
        .ess-tab.active .ess-dot { box-shadow: 0 0 0 2px #0052ff; }

        /* v24: Spin currency toggle (WLD / TON) — same look as ess-tab */
        .spin-currency-tabs {
            display: flex;
            gap: 8px;
            margin-bottom: 12px;
        }
        .scur-tab {
            flex: 1;
            padding: 9px 0;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 7px;
            font-size: 13px;
            font-weight: 700;
            color: var(--text-tertiary);
            background: var(--card-bg);
            border: 1px solid var(--card-border);
            border-radius: 10px;
            cursor: pointer;
            transition: all 0.2s ease;
            user-select: none;
        }
        .scur-tab.active {
            background: linear-gradient(135deg, #2563eb, #0052ff);
            color: #fff;
            border-color: #0052ff;
            box-shadow: 0 4px 14px rgba(0,82,255,0.45);
        }
        .scur-tab[data-cur="ton"].active {
            background: linear-gradient(135deg, #0098EA, #0077B6);
            border-color: #0098EA;
            box-shadow: 0 4px 14px rgba(0,152,234,0.45);
        }
        /* v24: 切卡内的代币图标（WLD logo / TON logo） */
        .scur-tab-icon {
            width: 18px;
            height: 18px;
            border-radius: 50%;
            object-fit: cover;
            flex-shrink: 0;
        }

        /* v24: SPIN 页头部行 — 币种 tabs + 内联设置按钮（同一水平面）
           SPIN 页隐藏全局 header（avatar/name 纯展示），仅保留功能性 ⚙️ */
        .spin-header-row {
            display: flex;
            align-items: center;
            gap: 8px;
            margin-bottom: 8px;
        }
        .spin-header-row > .spin-currency-tabs {
            flex: 1;
            margin-bottom: 0; /* 父行已带 margin-bottom，避免双重间距 */
        }
        .btn-settings.spin-inline-settings {
            margin-left: auto; /* 当 currency tabs 隐藏（非白名单用户）时仍贴右 */
            flex-shrink: 0;
        }
        /* SPIN tab active 时隐藏全局 header（avatar + 名称 + 全局 settings 一起） */
        body.tab-spin-active .header { display: none !important; }

        /* Offers list cards */
        .offers-grid { display: flex; flex-direction: column; gap: 10px; }
        .btn-offers-retry {
            display: inline-flex; align-items: center; justify-content: center;
            min-width: 120px;
            padding: 11px 22px;
            border-radius: 999px;
            background: linear-gradient(135deg, #2563eb, #0052ff);
            color: #ffffff;
            border: none;
            font-size: 13px;
            font-weight: 600;
            letter-spacing: 0.2px;
            cursor: pointer;
            box-shadow: 0 4px 16px rgba(0, 82, 255, 0.32);
            transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s;
        }
        .btn-offers-retry:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(0, 82, 255, 0.42); }
        .btn-offers-retry:active { transform: translateY(0); opacity: 0.9; }
        .offer-card {
            background: var(--card-bg);
            border: 1px solid var(--card-border);
            border-radius: 16px;
            padding: 12px 14px;
            display: flex;
            align-items: center;
            gap: 10px;
            transition: transform 0.15s;
        }
        .offer-card:active { transform: scale(0.99); }
        .offer-icon {
            width: 40px; height: 40px; border-radius: 10px;
            background: rgba(255,255,255,0.04);
            object-fit: cover; flex-shrink: 0;
            display: flex; align-items: center; justify-content: center;
            font-size: 22px;
            position: relative; overflow: hidden;
        }
        .offer-icon[data-icon-wrap],
        .offer-modal-cover[data-icon-wrap] {
            background-size: cover;
            background-position: center;
            background-repeat: no-repeat;
        }
        /* 有 url 时隐藏 emoji */
        .offer-icon[data-icon-wrap].has-img > .offer-icon-emoji,
        .offer-modal-cover[data-icon-wrap].has-img > .offer-icon-emoji { display: none; }
        /* 兜底首字母图标 */
        .offer-icon-letter {
            width: 100%; height: 100%;
            display: flex; align-items: center; justify-content: center;
            font-weight: 700; color: #fff;
            text-shadow: 0 1px 2px rgba(0,0,0,0.2);
            letter-spacing: 0.5px;
            text-transform: uppercase;
        }
        .offer-icon .offer-icon-letter { font-size: 18px; }
        .offer-modal-cover .offer-icon-letter { font-size: 28px; }
        .offer-info { flex: 1; min-width: 0; }
        .offer-title {
            font-size: 13px; font-weight: 600; color: var(--text-primary);
            margin-bottom: 2px; line-height: 1.3;
            display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical;
            overflow: hidden;
        }
        .offer-sub {
            font-size: 11px; color: var(--text-secondary);
            display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
        }
        .offer-sub .reward { color: #fbbf24; font-weight: 700; }
        .offer-btn {
            border: none; padding: 8px 16px; border-radius: 56px;
            font-family: 'Outfit', sans-serif; font-weight: 700; font-size: 12px;
            cursor: pointer; flex-shrink: 0; min-width: 80px;
            color: #fff;
            transition: transform 0.08s ease, opacity 0.15s;
        }
        .offer-btn:active:not(.btn-claimed):not(.btn-expired) { transform: scale(0.94); opacity: 0.85; }
        .offer-btn.btn-claim { background: linear-gradient(135deg, #3b82f6, #2563eb); }
        .offer-btn.btn-continue { background: linear-gradient(135deg, #f59e0b, #d97706); }
        .offer-btn.btn-claim-now { background: linear-gradient(135deg, #22c55e, #16a34a); }
        .offer-btn.btn-claimed, .offer-btn.btn-expired { background: #475569; cursor: default; opacity: 0.6; }
        .offer-card.is-disabled { opacity: 0.55; }

        /* Offers detail modal */
        .offer-modal-backdrop {
            position: fixed; inset: 0; background: rgba(0,0,0,0.65);
            backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
            z-index: 1000; display: none; align-items: flex-end; justify-content: center;
        }
        .offer-modal-backdrop.active { display: flex; }
        .offer-modal {
            background: var(--card-bg, #161719);
            color: var(--text-primary);
            border: 1px solid var(--card-border, rgba(255,255,255,0.06));
            border-bottom: none;
            border-radius: 24px 24px 0 0;
            width: 100%; max-width: 480px;
            max-height: 88vh; overflow-y: auto;
            padding: 24px 20px 28px;
            position: relative;
            box-shadow: 0 -12px 40px rgba(0,0,0,0.25);
            animation: offerModalIn 0.28s cubic-bezier(0.2, 0.9, 0.3, 1);
        }
        .offer-modal::before {
            content: ''; position: absolute; top: 8px; left: 50%;
            transform: translateX(-50%);
            width: 36px; height: 4px; border-radius: 2px;
            background: var(--text-tertiary); opacity: 0.35;
        }
        @keyframes offerModalIn { from { transform: translateY(100%); } to { transform: translateY(0); } }
        .offer-modal-close {
            position: absolute; top: 14px; right: 16px;
            width: 32px; height: 32px; border-radius: 50%;
            background: var(--card-border, rgba(127,127,127,0.15));
            border: none; color: var(--text-secondary);
            font-size: 20px; line-height: 1; cursor: pointer;
            display: flex; align-items: center; justify-content: center;
            transition: opacity 0.15s;
        }
        .offer-modal-close:active { opacity: 0.7; }
        .offer-modal-header {
            display: flex; align-items: center; gap: 14px;
            margin: 6px 0 16px;
        }
        .offer-modal-cover {
            width: 64px; height: 64px; border-radius: 16px;
            background: var(--card-border, rgba(127,127,127,0.12));
            object-fit: cover; flex-shrink: 0;
            display: flex; align-items: center; justify-content: center;
            font-size: 30px;
            position: relative; overflow: hidden;
            box-shadow: 0 4px 12px rgba(0,0,0,0.12);
        }
        .offer-modal-headtext { flex: 1; min-width: 0; }
        .offer-modal-title {
            font-size: 17px; font-weight: 700; color: var(--text-primary);
            line-height: 1.3; margin-bottom: 4px;
            display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
        }
        .offer-modal-reward-pill {
            display: inline-flex; align-items: center; gap: 4px;
            background: linear-gradient(135deg, rgba(251,191,36,0.18), rgba(245,158,11,0.12));
            border: 1px solid rgba(251,191,36,0.32);
            color: #fbbf24; font-weight: 700; font-size: 13px;
            padding: 4px 10px; border-radius: 999px;
        }
        .offer-modal-reward-pill.unsupported {
            background: rgba(239,68,68,0.12); border-color: rgba(239,68,68,0.3); color: #ef4444;
        }
        .offer-type-chip {
            display: inline-flex; align-items: center;
            background: rgba(99,102,241,0.14);
            border: 1px solid rgba(99,102,241,0.28);
            color: #818cf8; font-weight: 600; font-size: 11px;
            padding: 2px 8px; border-radius: 999px;
            letter-spacing: 0.2px;
        }
        .offer-modal-desc {
            font-size: 13px; color: var(--text-secondary); line-height: 1.55;
            margin-bottom: 16px;
            background: var(--card-border, rgba(127,127,127,0.06));
            border-radius: 12px;
            padding: 12px 14px;
        }
        .offer-modal-meta {
            display: flex; gap: 8px; margin-bottom: 18px;
        }
        .offer-modal-meta .stat {
            flex: 1; background: var(--card-border, rgba(127,127,127,0.08));
            border-radius: 12px; padding: 10px 12px;
            display: flex; flex-direction: column; gap: 4px;
        }
        .offer-modal-meta .stat .label {
            font-size: 10px; color: var(--text-tertiary);
            text-transform: uppercase; letter-spacing: 0.5px;
        }
        .offer-modal-meta .stat .value {
            font-size: 14px; color: var(--text-primary); font-weight: 700;
        }
        .offer-modal-publisher {
            display: flex; align-items: center; gap: 8px;
            font-size: 12px; color: var(--text-secondary); margin-bottom: 14px;
        }
        .offer-modal-publisher img { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; }
        .offer-modal-action {
            width: 100%; padding: 15px; border-radius: 16px; border: none;
            font-size: 16px; font-weight: 700; cursor: pointer;
            color: #fff;
            display: flex; align-items: center; justify-content: center; gap: 6px;
            transition: transform 0.1s;
        }
        .offer-modal-action.btn-go { background: linear-gradient(135deg, #3b82f6, #2563eb); box-shadow: 0 6px 18px rgba(59,130,246,0.35); }
        .offer-modal-action.btn-refresh { background: linear-gradient(135deg, #f59e0b, #d97706); box-shadow: 0 6px 18px rgba(245,158,11,0.35); }
        .offer-modal-action.btn-claim-now { background: linear-gradient(135deg, #22c55e, #16a34a); box-shadow: 0 6px 18px rgba(34,197,94,0.35); }
        .offer-modal-action.btn-claimed { background: #475569; cursor: default; opacity: 0.7; box-shadow: none; }
        .offer-modal-action:active { transform: scale(0.98); }
        .offer-modal-action.is-loading {
            pointer-events: none; opacity: 0.85;
            position: relative; color: transparent !important;
        }
        .offer-modal-action.is-loading::after {
            content: ''; position: absolute; left: 50%; top: 50%;
            width: 22px; height: 22px;
            margin: -11px 0 0 -11px;
            border: 2.5px solid rgba(255,255,255,0.35);
            border-top-color: #fff;
            border-radius: 50%;
            animation: offerBtnSpin 0.7s linear infinite;
        }
        @keyframes offerBtnSpin { to { transform: rotate(360deg); } }
        .offer-modal-msg {
            font-size: 12px; color: #ef4444; text-align: center;
            margin-top: 10px; min-height: 18px;
        }
        .offer-modal-msg.success { color: #22c55e; }

        /* Tab switcher for Earn Tickets - 弱化底纹样式 */
        .earn-tabs {
            display: flex;
            gap: 4px;
            margin-bottom: 12px;
            border-bottom: 1px solid var(--card-border);
            overflow-x: auto;
            scrollbar-width: none;
        }
        .earn-tabs::-webkit-scrollbar { display: none; }
        .earn-tab {
            flex: 0 0 auto;
            padding: 8px 14px;
            text-align: center;
            font-size: 13px;
            font-weight: 600;
            color: var(--text-tertiary);
            cursor: pointer;
            transition: color 0.2s ease;
            position: relative;
            white-space: nowrap;
        }
        .earn-tab.active {
            color: var(--text-primary);
        }
        .earn-tab.active::after {
            content: '';
            position: absolute;
            left: 12px; right: 12px; bottom: -1px;
            height: 2px;
            background: rgba(0,82,255,0.85);
            border-radius: 2px;
        }
        .earn-tab .tab-count {
            font-size: 10px;
            font-weight: 600;
            color: #fbbf24;
            margin-left: 3px;
        }

        .products-grid {
            display: flex;
            flex-direction: column;
            gap: 10px;
        }

        .product-card {
            background: var(--card-bg);
            border: 1px solid var(--card-border);
            border-radius: 16px;
            padding: 16px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            overflow: hidden;
            /* 防止跑马灯溢出卡片 */
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
            transition: transform 0.2s, box-shadow 0.2s;
        }

        .product-card:active {
            transform: scale(0.98);
        }

        .product-card.featured {
            border-color: rgba(245, 158, 11, 0.4);
            background: var(--card-bg);
            box-shadow: none;
        }

        .product-card.ton-wallet-card {
            border-color: rgba(0, 136, 204, 0.4);
            background: var(--card-bg);
            box-shadow: none;
        }

        .product-card.join-task-card {
            border-color: rgba(139, 92, 246, 0.4);
            background: var(--card-bg);
            box-shadow: none;
        }

        .product-card.invite-task-card {
            border-color: rgba(34, 197, 94, 0.4);
            background: var(--card-bg);
            box-shadow: none;
        }

        .product-card.homescreen-task-card {
            border-color: rgba(245, 158, 11, 0.4);
            background: var(--card-bg);
            box-shadow: none;
        }

        .section-header {
            font-size: 13px;
            font-weight: 700;
            color: var(--text-secondary);
            letter-spacing: 0.5px;
            padding: 2px 0 6px;
        }

        .featured-badge {
            font-size: 9px;
            font-weight: 700;
            color: #f59e0b;
            background: rgba(245, 158, 11, 0.15);
            padding: 2px 6px;
            border-radius: 4px;
            margin-left: 6px;
            vertical-align: middle;
            letter-spacing: 0.3px;
        }

        .product-info {
            flex: 1;
            min-width: 0;
            /* 这是 Flex 子元素内文字截断/跑马灯必须的属性 */
            margin-right: 12px;
        }

        .product-info h3 {
            margin: 0 0 4px;
            font-size: 14px;
            font-weight: 600;
            color: var(--text-primary);
            /* 单行不换行 */
            white-space: nowrap;
            overflow: hidden;
            display: block;
            width: 100%;
        }

        /* 当文字超出时，内部 span 滚动 */
        .marquee-wrapper {
            display: inline-block;
            white-space: nowrap;
        }

        .marquee-text {
            display: inline-block;
            white-space: nowrap;
            /* 我们稍后通过 JS 动态赋予动画，避免不长的时候也滚动 */
        }

        @keyframes scrollText {
            0% {
                transform: translateX(0);
            }

            10% {
                transform: translateX(0);
            }

            100% {
                transform: translateX(calc(-100% + 120px));
            }

            /* 120px 大约是预留的可见视口宽度 */
        }

        .product-info p {
            margin: 0;
            font-size: 11px;
            color: var(--text-secondary);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .btn-play {
            --cta-grad: linear-gradient(135deg, #6366f1 0%, #4f46e5 42%, #0ea5e9 100%);
            --cta-cut: #4f46e5;
            position: relative;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
            flex-shrink: 0;
            box-sizing: border-box;
            width: 92px;
            min-width: 92px;
            height: 36px;
            padding: 0 12px;
            border: none;
            border-radius: 56px;
            background: var(--cta-grad);
            color: #fff;
            font-family: 'Outfit', sans-serif;
            font-weight: 700;
            font-size: 12px;
            line-height: 1;
            letter-spacing: 0.01em;
            cursor: pointer;
            overflow: hidden;
            box-shadow: 0 4px 14px rgba(79, 70, 229, 0.35);
            -webkit-tap-highlight-color: transparent;
        }
        .btn-play::before,
        .btn-play::after {
            content: '';
            position: absolute;
            pointer-events: none;
            border-radius: 50%;
            background: radial-gradient(circle, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0.35) 35%, rgba(255,255,255,0) 70%);
        }
        .btn-play::before {
            width: 10px; height: 10px;
            top: 3px; left: 9px;
            opacity: 0.9;
        }
        .btn-play::after {
            width: 7px; height: 7px;
            right: 8px; bottom: 4px;
            opacity: 0.55;
        }
        .btn-play .cta-label {
            position: relative;
            z-index: 1;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            max-width: 52px;
        }
        .btn-play .cta-ico {
            position: relative;
            z-index: 1;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 14px;
            height: 14px;
            flex-shrink: 0;
            color: #fff;
        }
        .btn-play .cta-ico svg { display: block; width: 14px; height: 14px; }

        /* Earn-Apps 二段式: GO 跳走后回来变 Claim（绿色脉冲） */
        .btn-play.btn-claim-ready {
            --cta-grad: linear-gradient(135deg, #22c55e, #16a34a);
            --cta-cut: #15803d;
            background: var(--cta-grad);
            box-shadow: 0 0 0 0 rgba(34,197,94,0.7);
            animation: claimReadyPulse 1.6s infinite;
        }
        .btn-play.btn-muted {
            --cta-grad: linear-gradient(135deg, #475569, #64748b);
            --cta-cut: #334155;
            background: var(--cta-grad);
            box-shadow: none;
        }
        .btn-play.btn-muted::before,
        .btn-play.btn-muted::after { opacity: 0.25; }
        @keyframes claimReadyPulse {
            0%   { box-shadow: 0 0 0 0 rgba(34,197,94,0.55); }
            70%  { box-shadow: 0 0 0 10px rgba(34,197,94,0); }
            100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); }
        }

        .btn-invite {
            background: rgba(0, 82, 255, 0.08);
            border: 1px solid rgba(0, 82, 255, 0.3);
            color: var(--primary);
            padding: 16px;
            border-radius: 56px;
            text-align: center;
            font-family: 'Outfit', sans-serif;
            font-weight: 600;
            font-size: 14px;
            cursor: pointer;
            margin-top: 8px;
        }

        /* ── Invite Redesign: hero banner + compact CTA row ── */
        .invite-reward-banner {
            margin: 0 0 10px; padding: 0; border: none; background: none;
            width: 100%;
        }
        .invite-hero {
            position: relative; border-radius: 18px; overflow: hidden;
            /* exactly 2× invite button height (btn min-height: 48px) */
            height: 96px;
            box-shadow: 0 4px 14px rgba(0, 40, 120, 0.10);
            background: linear-gradient(120deg, #dbeafe 0%, #eff6ff 45%, #fef3c7 100%);
        }
        .invite-hero-bg {
            position: absolute; inset: 0; width: 100%; height: 100%;
            object-fit: cover; object-position: center 42%; display: block;
        }
        .invite-hero-scrim {
            position: absolute; inset: 0; pointer-events: none;
            background: linear-gradient(180deg, rgba(15,23,42,0.18) 0%, rgba(15,23,42,0.40) 55%, rgba(15,23,42,0.25) 100%);
        }
        .invite-hero-body {
            position: relative; z-index: 1; height: 100%;
            display: flex; flex-direction: column; align-items: center; justify-content: center;
            gap: 4px; padding: 8px 16%; box-sizing: border-box; text-align: center;
        }
        .invite-hero-body .ih-line1 {
            font-size: 14px; font-weight: 800; color: #fff; line-height: 1.2;
            text-shadow: 0 1px 3px rgba(0,0,0,0.4); letter-spacing: -0.2px;
        }
        .invite-hero-body .ih-line2 {
            font-size: 12px; font-weight: 700; color: #fde68a; line-height: 1.2;
            text-shadow: 0 1px 2px rgba(0,0,0,0.35);
        }
        .invite-cta-row {
            display: flex; align-items: stretch; gap: 6px; margin-bottom: 12px;
        }
        .btn-invite-main {
            flex: 1 1 0; min-width: 0; display: flex; align-items: center; gap: 7px;
            background: linear-gradient(135deg, #0052ff 0%, #2563eb 100%);
            color: #fff; border: none; border-radius: 14px;
            padding: 7px 8px 7px 9px; cursor: pointer;
            font-family: 'Outfit', sans-serif;
            box-shadow: 0 4px 12px rgba(0, 82, 255, 0.2);
            text-align: left; min-height: 48px;
        }
        .btn-invite-main:active { transform: scale(0.99); opacity: 0.95; }
        .btn-invite-main .bim-rocket { flex-shrink: 0; width: 28px; height: 28px; }
        .btn-invite-main .bim-rocket img {
            width: 28px; height: 28px; display: block; object-fit: contain;
            filter: drop-shadow(0 1px 2px rgba(0,0,0,0.2));
        }
        .btn-invite-main .bim-copy {
            flex: 1 1 auto; min-width: 0; padding-right: 2px;
        }
        .btn-invite-main .bim-title {
            display: block; font-size: 12px; font-weight: 800; line-height: 1.15;
            white-space: nowrap;
        }
        .btn-invite-main .bim-sub {
            display: block; font-size: 9px; font-weight: 600; opacity: 0.9; margin-top: 1px;
            white-space: nowrap;
        }
        .btn-invite-main .bim-chevron {
            width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0; margin-left: auto;
            background: rgba(255,255,255,0.2); border: 1.5px solid rgba(255,255,255,0.45);
            display: flex; align-items: center; justify-content: center;
            box-shadow: inset 0 1px 0 rgba(255,255,255,0.25);
        }
        .btn-invite-main .bim-chevron svg {
            width: 12px; height: 12px; display: block;
        }
        .invite-share-row {
            display: flex; gap: 5px; flex: 0 0 auto; align-items: stretch;
        }
        .invite-icon-btn {
            width: 48px; min-height: 48px; height: 48px; border-radius: 12px; border: 1px solid var(--border);
            background: var(--card-bg); display: flex; flex-direction: column;
            align-items: center; justify-content: center; gap: 2px;
            font-size: 14px; cursor: pointer; transition: background 0.15s, transform 0.1s;
            box-shadow: 0 2px 8px rgba(0,0,0,0.04); padding: 4px 2px;
            box-sizing: border-box;
        }
        .invite-icon-btn .isb-disc {
            width: 24px; height: 24px; border-radius: 50%;
            background: #eceff3; display: flex; align-items: center; justify-content: center;
            flex-shrink: 0;
        }
        [data-theme="dark"] .invite-icon-btn .isb-disc { background: rgba(255,255,255,0.12); }
        .invite-icon-btn .isb-disc svg,
        .invite-icon-btn .isb-disc img { display: block; width: 12px; height: 12px; }
        .invite-icon-btn .isb-label {
            font-size: 7px; font-weight: 700; color: var(--text-secondary);
            line-height: 1; letter-spacing: -0.1px; white-space: nowrap;
        }
        .invite-icon-btn:active { background: var(--subtle-bg-active); transform: scale(0.97); }
        [data-theme="dark"] .invite-icon-btn img.invert-dark { filter: invert(1); }
        .invite-stats-bar {
            display: flex; align-items: center; justify-content: space-between;
            height: 48px; box-sizing: border-box;
            padding: 0 10px; background: var(--card-bg); border: 1px solid var(--card-border);
            border-radius: 14px; margin-bottom: 14px;
            box-shadow: 0 2px 10px rgba(0,0,0,0.04);
        }
        .invite-stats-bar .iss-side {
            flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px;
            padding: 0 4px; min-width: 0;
        }
        .invite-stats-bar .iss-icon {
            width: 28px; height: 28px; flex-shrink: 0;
            object-fit: contain; display: block;
            filter: drop-shadow(0 1px 2px rgba(0,0,0,0.08));
        }
        .invite-stats-bar .iss-copy { min-width: 0; }
        .invite-stats-bar .iss-val {
            display: block; color: var(--text-primary); font-weight: 800; font-size: 13px; line-height: 1.1;
        }
        .invite-stats-bar .iss-label {
            display: block; color: var(--text-secondary); font-weight: 600; font-size: 10px; margin-top: 1px;
        }
        .invite-stats-bar .iss-div {
            width: 1px; background: var(--border); height: 28px; align-self: center;
        }
        .invite-tabs-card {
            background: var(--card-bg); border: 1px solid var(--card-border);
            border-radius: 18px; overflow: hidden; margin-top: 4px;
            box-shadow: 0 4px 16px rgba(0,0,0,0.05);
        }
        .invite-recent-head {
            display: flex; align-items: center; justify-content: space-between;
            gap: 10px; padding: 14px 14px 0;
        }
        .invite-recent-title {
            margin: 0; font-size: 14px; font-weight: 700; color: var(--text-primary);
            flex: 1; min-width: 0;
        }
        .invite-mission-btn {
            flex-shrink: 0; padding: 6px 12px; border-radius: 999px;
            border: 1px solid var(--card-border);
            background: rgba(0,82,255,0.08);
            color: var(--primary); font-size: 12px; font-weight: 700;
            cursor: pointer; font-family: 'Outfit', sans-serif;
        }
        .invite-mission-btn:active { background: rgba(0,82,255,0.16); }
        .invite-tabs {
            display: flex; border-bottom: 1px solid var(--border);
        }
        .invite-tab-btn {
            flex: 1; padding: 13px 8px; text-align: center; font-size: 13px; font-weight: 600;
            color: var(--text-tertiary); background: none; border: none; cursor: pointer;
            border-bottom: 2px solid transparent; transition: all 0.2s;
            font-family: 'Outfit', sans-serif;
        }
        .invite-tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }
        .invite-tab-body { padding: 12px 14px; }
        .invite-lb-row {
            display: grid;
            grid-template-columns: 26px 30px minmax(0, 1fr) 48px;
            align-items: center;
            column-gap: 8px;
            padding: 10px 0;
            box-sizing: border-box;
        }
        .invite-lb-row + .invite-lb-row { border-top: 1px solid var(--border-divider); }
        .invite-lb-row.me {
            background: rgba(0,82,255,0.08);
            border-radius: 10px;
            border-top: none;
            margin: 4px 0 0;
            padding: 10px 0;
        }
        .invite-lb-rank {
            width: 28px; text-align: center; font-size: 16px; line-height: 1; justify-self: center;
        }
        .invite-lb-rank.num {
            font-size: 12px; font-weight: 700; color: var(--text-tertiary);
        }
        .invite-lb-avatar, .invite-lb-avatar.rank-avatar-fallback {
            width: 32px; height: 32px; border-radius: 50%;
            object-fit: cover; display: block; justify-self: center;
        }
        .invite-lb-avatar.rank-avatar-fallback {
            display: flex; align-items: center; justify-content: center;
            background: linear-gradient(135deg, #93c5fd, #6366f1);
            color: #fff; font-size: 11px; font-weight: 800;
        }
        .invite-lb-meta {
            min-width: 0; display: flex; flex-direction: column; gap: 1px;
        }
        .invite-lb-name {
            min-width: 0; font-size: 13px; font-weight: 600; color: var(--text-light);
            overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
        }
        .invite-lb-name.me { color: #0052ff; }
        .invite-lb-count {
            font-size: 10px; font-weight: 600; color: var(--text-secondary);
            white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
        }
        .invite-lb-reward {
            display: inline-flex; align-items: center; justify-content: center; gap: 2px;
            justify-self: end; box-sizing: border-box;
            width: 48px; min-width: 48px; padding: 2px 4px; border-radius: 8px;
            background: rgba(251, 191, 36, 0.14);
            border: 1px solid rgba(245, 158, 11, 0.28);
            color: #b45309; font-size: 10px; font-weight: 700; white-space: nowrap;
            pointer-events: none; box-shadow: none;
        }
        [data-theme="dark"] .invite-lb-reward {
            background: rgba(251, 191, 36, 0.12);
            border-color: rgba(251, 191, 36, 0.22);
            color: #fbbf24;
        }
        .btn-invite-full-lb {
            display: block; width: 100%; margin-top: 12px;
            background: rgba(0,82,255,0.1); border: none; color: var(--primary);
            border-radius: 12px; padding: 12px; font-size: 13px; font-weight: 700;
            cursor: pointer; font-family: 'Outfit', sans-serif;
        }
        .btn-invite-full-lb:active { background: rgba(0,82,255,0.16); }
        .invite-ri-row {
            display: grid;
            grid-template-columns: 22px 30px minmax(0, 1fr) auto auto;
            align-items: center;
            column-gap: 8px;
            padding: 8px 0;
            box-sizing: border-box;
        }
        .invite-ri-row + .invite-ri-row { border-top: 1px solid var(--border-divider); }
        .invite-ri-num {
            font-size: 12px; font-weight: 700; color: var(--text-tertiary);
            text-align: center; justify-self: center;
        }
        .invite-ri-name {
            min-width: 0; font-size: 13px; font-weight: 500; color: var(--text-light);
            overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
        }
        .invite-ri-reward {
            font-size: 12px; font-weight: 600; color: #10b981; white-space: nowrap;
        }
        .invite-ri-ago {
            font-size: 11px; color: var(--text-tertiary); white-space: nowrap;
        }

        /* +1 Ticket Animation */
        .ticket-holder {
            position: relative;
            display: inline-block;
        }

        .plus-one {
            position: absolute;
            top: -10px;
            right: -25px;
            color: #10b981;
            font-size: 18px;
            font-weight: 800;
            opacity: 0;
            pointer-events: none;
            z-index: 10;
        }

        @keyframes floatUpFade {
            0% {
                opacity: 0;
                transform: translateY(0) scale(0.5);
            }

            20% {
                opacity: 1;
                transform: translateY(-10px) scale(1.3);
            }

            80% {
                opacity: 1;
                transform: translateY(-30px) scale(1);
            }

            100% {
                opacity: 0;
                transform: translateY(-40px) scale(0.9);
            }
        }

        /* Rules Card */
        .rules-card {
            background: var(--surface);
            border: 1px dashed var(--card-border);
            border-radius: 16px;
            padding: 16px;
            margin: 16px 0;
        }

        .rules-card h3 {
            margin: 0 0 12px;
            font-size: 13px;
            color: var(--text-primary);
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .rules-card ul {
            margin: 0;
            padding-left: 20px;
            color: var(--text-secondary);
            font-size: 12px;
            line-height: 1.6;
        }

        .rules-card li {
            margin-bottom: 6px;
        }

        .highlight {
            color: #fbbf24;
            font-weight: 600;
        }

        /* Rules Help Button */
        .rules-help-btn {
            width: 22px;
            height: 22px;
            border-radius: 50%;
            border: 1.5px solid var(--text-tertiary);
            color: var(--text-secondary);
            font-size: 13px;
            font-weight: 700;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.2s;
            flex-shrink: 0;
        }

        .rules-help-btn:active {
            background: var(--subtle-bg-active);
            color: var(--text-primary);
            border-color: var(--text-primary);
        }

        /* Rules Modal */
        .modal-backdrop {
            position: fixed;
            top: 0; left: 0; right: 0; bottom: 0;
            background: var(--overlay-bg);
            backdrop-filter: blur(8px);
            -webkit-backdrop-filter: blur(8px);
            display: none;
            align-items: center;
            justify-content: center;
            z-index: 2000;
            padding: 24px;
            opacity: 0;
            transition: opacity 0.25s ease;
        }

        /* v24 Phase 6+: TonConnect UI 在 TWA 中全屏弹出，与提现 modal-backdrop 共存会冲突。
           connectWalletForWithdraw 采用“先关提现弹窗 → onStatusChange 监听 → 连成后重开”策略，
           不再需要 z-index hack，以免干扰 TC 内部 layout */

        .modal-backdrop.active {
            display: flex;
            opacity: 1;
        }

        .modal-content {
            background: var(--modal-bg);
            border: 1px solid var(--card-border);
            border-radius: 20px;
            padding: 24px;
            max-width: 360px;
            width: 100%;
            animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
        }

        .modal-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 16px;
        }

        .modal-header h3 {
            margin: 0;
            font-size: 15px;
            color: var(--text-primary);
        }

        .modal-close {
            font-size: 24px;
            color: var(--text-tertiary);
            cursor: pointer;
            line-height: 1;
            padding: 0 4px;
            transition: color 0.2s;
        }

        .modal-close:active {
            color: var(--text-primary);
        }

        .modal-content ul {
            margin: 0;
            padding-left: 20px;
            color: var(--text-secondary);
            font-size: 13px;
            line-height: 1.8;
        }

        .modal-content li {
            margin-bottom: 8px;
        }

        /* ─── How It Works Modal ─── */
        .hiw-modal-content {
            padding: 20px 22px 18px;
            max-height: min(82vh, 720px);
            overflow-y: auto;
            -webkit-overflow-scrolling: touch;
        }
        .hiw-steps { display: flex; flex-direction: column; gap: 0; }
        .hiw-step {
            display: flex;
            align-items: flex-start;
            gap: 14px;
            position: relative;
            padding-bottom: 18px;
        }
        .hiw-step.last { padding-bottom: 0; }
        .hiw-num {
            width: 34px; height: 34px;
            border-radius: 50%;
            display: flex; align-items: center; justify-content: center;
            font-size: 14px; font-weight: 800; color: var(--text-primary);
            flex-shrink: 0;
            position: relative;
            z-index: 1;
        }
        .hiw-line {
            position: absolute;
            left: 16px; top: 34px;
            width: 2px;
            height: calc(100% - 34px);
            background: linear-gradient(180deg, var(--subtle-bg-active) 0%, var(--subtle-bg) 100%);
        }
        .hiw-text {
            display: flex; flex-direction: column; gap: 3px;
            padding-top: 5px;
        }
        .hiw-text b {
            color: var(--text-primary); font-size: 13.5px; font-weight: 700;
        }
        .hiw-text > span {
            color: var(--text-secondary); font-size: 11.5px; line-height: 1.45;
        }
        .hiw-bonus {
            margin-top: 16px;
            padding: 12px 14px;
            background: var(--tg-theme-bg-color);
            border: 1px solid var(--border);
            border-radius: 12px;
            display: flex; flex-direction: column; gap: 10px;
        }
        .hiw-bonus-row {
            display: flex; align-items: center; gap: 10px;
        }
        .hiw-bonus-icon {
            width: 28px; height: 28px;
            border-radius: 8px;
            display: flex; align-items: center; justify-content: center;
            font-size: 14px; flex-shrink: 0;
        }
        .hiw-bonus-text {
            color: var(--text-primary); font-size: 12.5px; font-weight: 500;
        }
        .hiw-bonus-text em {
            font-style: normal; color: #fbbf24; font-weight: 700;
        }

        /* ─── History Modal ─── */
        .history-modal .modal-content {
            max-width: 400px;
            max-height: 80vh;
            display: flex;
            flex-direction: column;
            padding: 0;
        }
        .history-header {
            display: flex; justify-content: space-between; align-items: center;
            padding: 16px 20px 12px;
            border-bottom: 1px solid var(--card-border);
        }
        .history-header h3 { margin: 0; font-size: 15px; color: var(--text-primary); }
        .history-body {
            flex: 1; overflow-y: auto; padding: 12px 16px 20px;
            -webkit-overflow-scrolling: touch;
        }
        .history-date-group { margin-bottom: 16px; }
        .history-date-label {
            font-size: 11px; font-weight: 700; color: var(--text-secondary);
            text-transform: uppercase; letter-spacing: 0.5px;
            margin-bottom: 8px; padding-bottom: 4px;
            border-bottom: 1px solid rgba(148,163,184,0.15);
        }
        .history-item {
            display: flex; align-items: center; gap: 10px;
            padding: 8px 0;
            border-bottom: 1px solid rgba(148,163,184,0.06);
        }
        .history-item:last-child { border-bottom: none; }
        .history-icon {
            width: 32px; height: 32px; border-radius: 10px;
            display: flex; align-items: center; justify-content: center;
            font-size: 15px; flex-shrink: 0;
        }
        .history-icon.earn { background: rgba(34,197,94,0.12); }
        .history-icon.spend { background: rgba(239,68,68,0.12); }
        .history-icon.reward { background: rgba(168,85,247,0.12); }
        .history-info { flex: 1; min-width: 0; }
        .history-title {
            font-size: 13px; font-weight: 600; color: var(--text-light);
            white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
        }
        .history-sub {
            font-size: 11px; color: var(--text-tertiary); margin-top: 1px;
        }
        .history-amount {
            font-size: 13px; font-weight: 700; flex-shrink: 0; text-align: right;
        }
        .history-amount.positive { color: #22c55e; }
        .history-amount.negative { color: #ef4444; }
        .history-amount.neutral { color: var(--text-secondary); }
        .history-empty {
            text-align: center; padding: 40px 20px; color: var(--text-tertiary); font-size: 13px;
        }

        /* ─── Spin Wheel ─── */
        .balance-card {
            background: var(--card-bg);
            border: 1px solid var(--card-border);
            border-radius: 16px;
            padding: 12px;
            display: flex;
            flex-direction: column;
            gap: 8px;
            margin-bottom: 8px;
        }

        .balance-row-top {
            display: flex;
            justify-content: space-between;
            align-items: center;
            width: 100%;
        }

        .balance-left { display: flex; flex-direction: column; gap: 2px; }
        .balance-label { font-size: 10px; color: var(--text-tertiary); font-weight: 700; letter-spacing: 1px; text-transform: uppercase; }

        .balance-amount {
            font-size: 22px;
            font-weight: 800;
            display: flex;
            align-items: baseline;
            gap: 6px;
        }

        .balance-unit { font-size: 13px; color: var(--text-secondary); font-weight: 600; }

        .balance-progress {
            width: 100%;
            display: flex;
            flex-direction: row;
            align-items: center;
            gap: 8px;
        }

        .balance-progress-row {
            display: flex;
            align-items: center;
            gap: 10px;
            flex: 1;
            min-width: 0;
        }

        #wp-text {
            flex-shrink: 0;
            white-space: nowrap;
        }

        .btn-withdraw {
            background: linear-gradient(135deg, #a855f7, #7c3aed);
            color: white;
            border: none;
            padding: 10px 22px;
            border-radius: 56px;
            font-family: 'Outfit', sans-serif;
            font-weight: 700;
            font-size: 13px;
            cursor: pointer;
            box-shadow: 0 2px 8px rgba(168,85,247,0.3);
            transition: transform 0.15s, box-shadow 0.15s;
        }
        .btn-withdraw:active { transform: scale(0.97); }

        .btn-withdraw:disabled {
            background: var(--disabled-bg);
            box-shadow: none;
            color: var(--disabled-text);
            cursor: default;
            animation: none;
            filter: none;
        }

        @keyframes wdReadyPulse {
            0%, 100% {
                box-shadow: 0 2px 8px rgba(168,85,247,0.4), 0 0 0 0 rgba(168,85,247,0.5);
                filter: brightness(1);
            }
            50% {
                box-shadow: 0 4px 18px rgba(168,85,247,0.75), 0 0 0 7px rgba(168,85,247,0);
                filter: brightness(1.12);
            }
        }
        .btn-withdraw.ready:not(:disabled) {
            animation: wdReadyPulse 1.6s ease-in-out infinite;
        }
        @media (prefers-reduced-motion: reduce) {
            .btn-withdraw.ready:not(:disabled) { animation: none; }
        }

        .pending-badge {
            font-size: 11px;
            color: #fbbf24;
            background: rgba(251, 191, 36, 0.12);
            border: 1px solid rgba(251,191,36,0.2);
            padding: 6px 14px;
            border-radius: 56px;
            font-weight: 700;
        }

        .balance-actions {
            display: flex;
            align-items: center;
            gap: 8px;
            flex-shrink: 0;
        }
        .btn-wd-history {
            background: transparent;
            color: var(--text-secondary);
            border: 1px solid var(--border-color, rgba(148,163,184,0.25));
            padding: 9px 12px;
            border-radius: 56px;
            font-family: 'Outfit', sans-serif;
            font-weight: 600;
            font-size: 12px;
            cursor: pointer;
            white-space: nowrap;
        }
        .btn-wd-history:active { transform: scale(0.97); opacity: 0.85; }

        .wd-history-list {
            display: flex;
            flex-direction: column;
            gap: 10px;
            max-height: min(60vh, 420px);
            overflow-y: auto;
            padding: 4px 2px 8px;
        }
        .wd-history-item {
            background: var(--subtle-bg, rgba(148,163,184,0.06));
            border: 1px solid rgba(148,163,184,0.12);
            border-radius: 12px;
            padding: 12px 14px;
        }
        .wd-history-top {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            gap: 10px;
            margin-bottom: 6px;
        }
        .wd-history-amt {
            font-weight: 700;
            font-size: 15px;
            color: var(--text-primary, #f1f5f9);
        }
        .wd-history-time {
            font-size: 11px;
            color: var(--text-tertiary, #64748b);
            margin-top: 2px;
        }
        .wd-history-badge {
            font-size: 10px;
            font-weight: 700;
            padding: 3px 8px;
            border-radius: 56px;
            white-space: nowrap;
            flex-shrink: 0;
        }
        .wd-history-badge.review { color: #fbbf24; background: rgba(251,191,36,0.12); }
        .wd-history-badge.processing { color: #60a5fa; background: rgba(96,165,250,0.12); }
        .wd-history-badge.completed { color: #4ade80; background: rgba(74,222,128,0.12); }
        .wd-history-badge.rejected,
        .wd-history-badge.failed { color: #f87171; background: rgba(248,113,113,0.12); }
        .wd-history-badge.exception { color: #fb923c; background: rgba(251,146,60,0.12); }
        .wd-history-meta {
            font-size: 11px;
            color: var(--text-secondary, #94a3b8);
            line-height: 1.45;
            word-break: break-all;
        }
        .wd-history-meta a { color: #60a5fa; text-decoration: none; }
        .wd-history-eta {
            font-size: 12px;
            color: var(--text-secondary, #94a3b8);
            background: rgba(251, 191, 36, 0.1);
            border: 1px solid rgba(251, 191, 36, 0.22);
            border-radius: 10px;
            padding: 10px 12px;
            margin: 0 0 12px;
            line-height: 1.45;
        }
        .wd-history-eta-line {
            color: #fbbf24;
            margin-top: 4px;
            word-break: normal;
        }
        .wd-history-empty {
            text-align: center;
            color: var(--text-tertiary, #64748b);
            font-size: 13px;
            padding: 36px 16px;
        }

        /* ─── Wallet page (2026-08-29): Shop tab 替换成 Wallet, 承接提现 + 余额 + 交易记录 ─── */
        .wallet-page {
            display: flex;
            flex-direction: column;
            gap: 12px;
            padding-bottom: 100px;
        }
        .wallet-balance-card {
            background: linear-gradient(135deg, rgba(37,99,235,0.14), rgba(0,82,255,0.06));
            border: 1px solid var(--card-border);
            border-radius: 20px;
            padding: 20px 20px 18px;
            display: flex;
            flex-direction: column;
            gap: 14px;
            transition: background 0.3s ease;
        }
        .wallet-balance-card[data-cur="ton"] {
            background: linear-gradient(135deg, rgba(0,152,234,0.16), rgba(0,119,182,0.06));
        }
        .wallet-balance-label {
            font-size: 11px;
            color: var(--text-tertiary);
            font-weight: 700;
            letter-spacing: 1.5px;
            text-transform: uppercase;
        }
        .wallet-balance-amount {
            font-size: 36px;
            font-weight: 800;
            line-height: 1;
            display: flex;
            align-items: baseline;
            gap: 8px;
            color: var(--text-primary);
        }
        .wallet-balance-unit {
            font-size: 17px;
            color: var(--text-secondary);
            font-weight: 700;
        }
        .wallet-progress {
            display: flex;
            flex-direction: column;
            gap: 6px;
        }
        .wallet-progress-bar-wrap {
            background: rgba(148,163,184,0.18);
            border-radius: 8px;
            height: 8px;
            overflow: hidden;
        }
        .wallet-progress-bar-fill {
            height: 100%;
            background: #0052ff;
            border-radius: 8px;
            transition: width 0.4s ease, background 0.3s ease;
            width: 0%;
        }
        .wallet-progress-text {
            font-size: 11px;
            color: var(--text-secondary);
            font-weight: 600;
        }
        .wallet-btn-row {
            display: flex;
            gap: 10px;
            margin-top: 2px;
        }
        .wallet-btn-primary {
            flex: 1;
            background: linear-gradient(135deg, #a855f7, #7c3aed);
            color: #fff;
            border: none;
            border-radius: 14px;
            padding: 14px 0;
            font-family: 'Outfit', sans-serif;
            font-weight: 700;
            font-size: 15px;
            cursor: pointer;
            letter-spacing: 0.3px;
            box-shadow: 0 4px 14px rgba(168,85,247,0.3);
            transition: transform 0.15s, filter 0.15s;
        }
        .wallet-btn-primary:active:not(:disabled) { transform: scale(0.97); }
        .wallet-btn-primary:disabled {
            background: var(--disabled-bg);
            color: var(--disabled-text);
            cursor: default;
            box-shadow: none;
            filter: none;
            animation: none;
        }
        .wallet-btn-primary.ready:not(:disabled) {
            animation: wdReadyPulse 1.6s ease-in-out infinite;
        }
        .wallet-btn-pending {
            flex: 1;
            font-size: 13px;
            color: #fbbf24;
            background: rgba(251, 191, 36, 0.12);
            border: 1px solid rgba(251,191,36,0.25);
            padding: 14px 0;
            border-radius: 14px;
            font-weight: 700;
            text-align: center;
            font-family: 'Outfit', sans-serif;
        }
        .wallet-btn-ghost {
            flex: 0 0 auto;
            background: rgba(148,163,184,0.08);
            color: var(--text-primary);
            border: 1px solid var(--card-border);
            border-radius: 14px;
            padding: 14px 18px;
            font-family: 'Outfit', sans-serif;
            font-weight: 600;
            font-size: 13px;
            cursor: pointer;
            transition: transform 0.15s;
        }
        .wallet-btn-ghost:active { transform: scale(0.97); opacity: 0.85; }
        .wallet-section {
            background: var(--card-bg);
            border: 1px solid var(--card-border);
            border-radius: 16px;
            padding: 14px 16px;
        }
        .wallet-section-title {
            font-size: 11px;
            color: var(--text-tertiary);
            font-weight: 700;
            letter-spacing: 1.5px;
            text-transform: uppercase;
            margin-bottom: 12px;
        }
        .wallet-addr-row {
            display: flex;
            align-items: center;
            gap: 8px;
            background: rgba(148,163,184,0.07);
            border-radius: 10px;
            padding: 10px 12px;
        }
        .wallet-addr {
            flex: 1;
            font-family: Menlo, Consolas, monospace;
            font-size: 12px;
            color: var(--text-primary);
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            min-width: 0;
        }
        .wallet-addr-btn {
            background: transparent;
            border: 1px solid var(--card-border);
            color: var(--text-secondary);
            border-radius: 8px;
            padding: 6px 11px;
            font-size: 11px;
            font-weight: 600;
            cursor: pointer;
            white-space: nowrap;
            transition: opacity 0.15s;
        }
        .wallet-addr-btn:active { opacity: 0.7; }
        .wallet-addr-empty {
            font-size: 12px;
            color: var(--text-tertiary);
            text-align: center;
            padding: 8px 4px;
        }
        .wallet-addr-empty-actions {
            display: flex;
            flex-direction: column;
            gap: 8px;
        }
        .wallet-addr-cta {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            padding: 12px 14px;
            border: 1px solid var(--card-border);
            border-radius: 12px;
            background: rgba(148,163,184,0.06);
            color: var(--text-primary);
            font-family: 'Outfit', sans-serif;
            font-weight: 600;
            font-size: 13px;
            cursor: pointer;
            transition: transform 0.15s, opacity 0.15s;
        }
        .wallet-addr-cta:active { transform: scale(0.98); opacity: 0.85; }
        .wallet-addr-cta-primary {
            background: linear-gradient(135deg, #2563eb, #0052ff);
            color: #fff;
            border-color: #0052ff;
            box-shadow: 0 4px 14px rgba(0,82,255,0.35);
        }
        .wallet-addr-edit {
            display: flex;
            flex-direction: column;
            gap: 8px;
        }
        .wallet-addr-input {
            width: 100%;
            box-sizing: border-box;
            padding: 11px 12px;
            border-radius: 10px;
            border: 1px solid var(--card-border);
            background: rgba(148,163,184,0.07);
            color: var(--text-primary);
            font-family: Menlo, Consolas, monospace;
            font-size: 12.5px;
            outline: none;
            transition: border-color 0.15s;
        }
        .wallet-addr-input:focus { border-color: #0052ff; }
        .wallet-addr-edit-actions {
            display: flex;
            gap: 8px;
            justify-content: flex-end;
        }
        .wallet-addr-btn-save {
            background: linear-gradient(135deg, #2563eb, #0052ff);
            color: #fff;
            border-color: #0052ff;
        }
        .wallet-first-badge {
            display: inline-block;
            margin-left: 6px;
            font-size: 10px;
            font-weight: 700;
            color: #fbbf24;
            background: rgba(251,191,36,0.14);
            border: 1px solid rgba(251,191,36,0.28);
            border-radius: 999px;
            padding: 2px 8px;
            vertical-align: middle;
            white-space: nowrap;
        }
        .wallet-faq-list { display: flex; flex-direction: column; gap: 10px; }
        .wallet-faq-item {
            display: flex;
            gap: 10px;
            align-items: flex-start;
            font-size: 12.5px;
            color: var(--text-secondary);
            line-height: 1.5;
        }
        .wallet-faq-icon {
            flex: 0 0 auto;
            width: 20px;
            height: 20px;
            background: rgba(59,130,246,0.12);
            color: #3b82f6;
            border-radius: 50%;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            font-size: 11px;
            font-weight: 700;
            margin-top: 1px;
        }
        .wallet-faq-item b { color: var(--text-primary); font-weight: 600; }
        .wallet-wd-preview-item {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 10px 12px;
            background: rgba(148,163,184,0.06);
            border-radius: 10px;
            margin-bottom: 8px;
            font-size: 12.5px;
        }
        .wallet-wd-preview-item:last-child { margin-bottom: 0; }
        .wallet-wd-preview-date {
            color: var(--text-tertiary);
            flex: 0 0 auto;
            min-width: 60px;
            font-size: 11px;
        }
        .wallet-wd-preview-amount {
            color: var(--text-primary);
            font-weight: 700;
            flex: 1;
            text-align: left;
        }
        .wallet-wd-preview-status {
            font-weight: 700;
            font-size: 10px;
            padding: 3px 8px;
            border-radius: 8px;
            flex: 0 0 auto;
            white-space: nowrap;
        }
        .wallet-wd-preview-status.done { color: #4ade80; background: rgba(74,222,128,0.12); }
        .wallet-wd-preview-status.pending { color: #fbbf24; background: rgba(251,191,36,0.12); }
        .wallet-wd-preview-status.processing { color: #60a5fa; background: rgba(96,165,250,0.12); }
        .wallet-wd-preview-status.rejected { color: #f87171; background: rgba(239,68,68,0.12); }
        .wallet-view-all {
            display: block;
            text-align: center;
            padding: 10px;
            color: #3b82f6;
            font-size: 12.5px;
            font-weight: 600;
            cursor: pointer;
            margin-top: 4px;
            border-top: 1px solid var(--card-border);
        }
        .wallet-view-all:active { opacity: 0.7; }
        .wallet-wd-preview-empty {
            text-align: center;
            padding: 24px 12px;
            color: var(--text-tertiary);
            font-size: 12px;
            line-height: 1.5;
        }

        .wheel-area {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            flex: 1 1 auto;
            min-height: 0;
            width: 100%;
            gap: 0;
            margin: 4px 0 0;
        }

        .wheel-container {
            position: relative;
            width: min(340px, 88vw);
            height: min(340px, 88vw);
        }

        .wheel-pointer {
            position: absolute;
            top: -10px;
            left: 50%;
            transform: translateX(-50%);
            font-size: clamp(20px, 6vw, 28px);
            z-index: 10;
            filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.5));
            line-height: 1;
        }

        .wheel {
            width: 100%;
            height: 100%;
            border-radius: 50%;
            position: relative;
            box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.06), 0 0 30px rgba(0, 82, 255, 0.15);
            overflow: hidden;
        }

        .wheel-inner {
            width: 100%;
            height: 100%;
            border-radius: 50%;
            position: relative;
            will-change: transform;
            transition: none;
        }

        .wheel-center {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            width: 22%;
            height: 22%;
            min-width: 44px;
            min-height: 44px;
            border-radius: 50%;
            background: #0a0b0d;
            border: 3px solid rgba(251, 191, 36, 0.55);
            z-index: 5;
            display: flex;
            align-items: center;
            justify-content: center;
            overflow: hidden;
            box-shadow: 0 0 0 2px rgba(0,0,0,0.35);
        }
        .wheel-center-logo {
            width: 100%;
            height: 100%;
            object-fit: cover;
            border-radius: 50%;
            display: block;
        }

        .wheel-segment-label {
            position: absolute;
            top: 50%;
            left: 50%;
            width: 0;
            height: 0;
            z-index: 3;
        }

        .wheel-segment-label .seg-inner {
            position: absolute;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 1px;
            transform-origin: center center;
        }

        .seg-emoji { font-size: 18px; }
        .seg-text { font-size: 8px; font-weight: 700; color: rgba(255, 255, 255, 0.9); text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8); line-height: 1.1; text-align: center; }

        .spin-controls {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 4px;
            visibility: hidden;
            opacity: 0;
            pointer-events: none;
            position: fixed;
            left: 12px;
            right: 12px;
            bottom: calc(80px + 36px + 2px);
            z-index: 91;
            width: auto;
            max-width: 576px;
            margin: 0 auto;
            min-height: 0;
            padding: 0 12px;
            box-sizing: border-box;
            background: linear-gradient(transparent, var(--tg-theme-bg-color) 42%);
        }
        body.tab-spin-active .spin-controls {
            visibility: visible;
            opacity: 1;
            pointer-events: auto;
        }

        .spin-avail {
            font-size: 12px;
            font-weight: 600;
            color: var(--text-secondary);
            margin: 0;
        }

        .spin-avail strong { color: var(--text-primary); font-size: 15px; }

        .spin-cta-row {
            display: flex;
            align-items: stretch;
            justify-content: center;
            gap: 8px;
            width: min(320px, 92%);
        }

        .btn-spin {
            flex: 1.45;
            width: auto;
            max-width: none;
            min-width: 0;
            padding: 7px 10px;
            border-radius: 56px;
            border: none;
            background: #0052ff;
            color: white;
            font-family: 'Outfit', sans-serif;
            font-weight: 700;
            font-size: 14px;
            letter-spacing: 1.5px;
            cursor: pointer;
            box-shadow: none;
            transition: transform 0.15s, box-shadow 0.15s;
        }

        .btn-spin:active:not(:disabled) { transform: scale(0.97); }

        .btn-spin:disabled {
            background: var(--disabled-bg);
            box-shadow: none;
            color: var(--disabled-text);
            cursor: default;
        }

        .btn-spin.get-tickets {
            background: #f59e0b;
            box-shadow: none;
            color: var(--btn-on-accent);
            cursor: pointer;
            letter-spacing: 0.4px;
            font-size: 12px;
            animation: ctaPulse 2s infinite;
        }
        .btn-spin.get-tickets:active { transform: scale(0.97); }

        .spin-hint {
            font-size: 11px;
            color: var(--text-tertiary);
            text-align: center;
            margin: 0;
        }

        .btn-buy-tickets {
            flex: 1;
            min-width: 0;
            margin-top: 0;
            background: transparent;
            border: 1px solid rgba(245,158,11,0.45);
            color: #fbbf24;
            border-radius: 56px;
            padding: 7px 10px;
            font-size: 12px;
            font-weight: 700;
            cursor: pointer;
            letter-spacing: 0.2px;
            white-space: nowrap;
            font-family: 'Outfit', sans-serif;
        }
        .btn-buy-tickets:active { transform: scale(0.97); }

        .boost-banner {
            background: linear-gradient(135deg, rgba(249, 115, 22, 0.15), rgba(234, 88, 12, 0.1));
            border: 1px solid rgba(249, 115, 22, 0.3);
            border-radius: 12px;
            padding: 6px 12px;
            display: flex;
            align-items: center;
            gap: 8px;
            color: #f97316;
        }

        .boost-banner .boost-icon { font-size: 18px; line-height: 1; flex-shrink: 0; }
        .boost-banner .boost-copy {
            display: flex;
            flex-direction: row;
            align-items: baseline;
            gap: 8px;
            min-width: 0;
            white-space: nowrap;
            overflow: hidden;
        }
        .boost-banner .boost-title {
            font-size: 13px;
            font-weight: 700;
            line-height: 1.25;
            color: #fb923c;
        }
        .boost-banner .boost-title #boost-count { font-weight: 800; color: #fdba74; }
        .boost-banner .boost-sub {
            font-size: 11px;
            font-weight: 500;
            line-height: 1.3;
            color: rgba(251, 146, 60, 0.85);
            overflow: hidden;
            text-overflow: ellipsis;
        }

        /* Welcome Overlay */
        .welcome-overlay {
            position: fixed;
            inset: 0;
            background: rgba(2, 6, 23, 0.92);
            backdrop-filter: blur(16px);
            -webkit-backdrop-filter: blur(16px);
            display: none;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            z-index: 3000;
            opacity: 0;
            transition: opacity 0.4s;
            padding: 24px;
        }
        .welcome-overlay.active { display: flex; opacity: 1; }
        .welcome-box {
            text-align: center;
            max-width: 340px;
            position: relative;
            animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
        }
        .welcome-title {
            font-size: 24px; font-weight: 800; margin: 0 0 8px;
            background: linear-gradient(135deg, #fbbf24, #f97316);
            -webkit-background-clip: text; -webkit-text-fill-color: transparent;
        }
        .welcome-subtitle { font-size: 15px; color: var(--text-secondary); margin: 0 0 6px; line-height: 1.5; }
        .welcome-highlight {
            font-size: 18px; font-weight: 700; color: #fbbf24; margin: 16px 0;
            padding: 12px 20px; background: rgba(251, 191, 36, 0.08);
            border: 1px solid rgba(251, 191, 36, 0.3); border-radius: 12px;
        }
        .btn-welcome-spin {
            background: #f59e0b;
            color: var(--btn-on-accent); border: none; padding: 16px 48px; border-radius: 56px;
            font-family: 'Outfit', sans-serif; font-weight: 700; font-size: 16px;
            cursor: pointer; margin-top: 8px; letter-spacing: 0.5px;
            box-shadow: none;
            transition: transform 0.15s, box-shadow 0.15s;
        }
        .btn-welcome-spin:active { transform: scale(0.96); }
        .btn-welcome-spin:disabled { opacity: 0.55; cursor: default; transform: none; }
        .welcome-close {
            position: absolute; top: -8px; right: -8px;
            width: 32px; height: 32px; border-radius: 50%;
            border: 1px solid rgba(148,163,184,0.35);
            background: rgba(15,23,42,0.9);
            color: #94a3b8; font-size: 18px; line-height: 1;
            cursor: pointer; display: flex; align-items: center; justify-content: center;
            z-index: 2;
        }
        .welcome-close:active { transform: scale(0.94); }
        .welcome-mini-wheel {
            width: 176px; height: 176px; margin: 4px auto 14px;
            border-radius: 50%;
            position: relative;
            display: block;
            border: 3px solid rgba(251, 191, 36, 0.55);
            box-shadow: 0 0 0 6px rgba(251, 191, 36, 0.12);
            background: #0f172a;
            overflow: hidden;
        }
        .welcome-wheel-inner {
            position: absolute; inset: 0;
            border-radius: 50%;
            transition: none;
        }
        .welcome-wheel-label {
            position: absolute; top: 50%; left: 50%; width: 0; height: 0; z-index: 2;
            pointer-events: none;
        }
        .welcome-wheel-label .seg-inner {
            position: absolute;
            display: flex; flex-direction: column; align-items: center; gap: 1px;
            transform-origin: center center;
            pointer-events: none;
        }
        .welcome-wheel-label .seg-emoji { font-size: 14px; line-height: 1; }
        .welcome-wheel-label .seg-text {
            font-size: 8px; font-weight: 800; color: rgba(255,255,255,0.95);
            text-shadow: 0 1px 2px rgba(0,0,0,0.85); line-height: 1.1; text-align: center;
        }
        .welcome-wheel-center {
            position: absolute; inset: 32%;
            border-radius: 50%;
            background: #0f172a;
            border: 2px solid rgba(251, 191, 36, 0.45);
            z-index: 3;
            display: flex; align-items: center; justify-content: center;
            font-size: 18px;
        }
        .welcome-mini-wheel::after {
            content: '';
            position: absolute; left: 50%; top: -2px; transform: translateX(-50%);
            border-left: 8px solid transparent; border-right: 8px solid transparent;
            border-top: 14px solid #fbbf24;
            z-index: 4;
        }
        .welcome-result {
            display: none;
            margin: 8px 0 4px;
            padding: 14px 18px;
            border-radius: 14px;
            background: rgba(56, 189, 248, 0.1);
            border: 1px solid rgba(56, 189, 248, 0.35);
            color: #7dd3fc;
            font-size: 20px;
            font-weight: 800;
        }
        .welcome-result.show { display: block; animation: popIn 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards; }
        @keyframes bounce {
            0%, 100% { transform: translateY(0); }
            50% { transform: translateY(-10px); }
        }

        /* Spin Result Overlay */
        .spin-result-overlay {
            position: fixed;
            inset: 0;
            background: rgba(2, 6, 23, 0.88);
            backdrop-filter: blur(12px);
            -webkit-backdrop-filter: blur(12px);
            display: none;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            z-index: 2500;
            opacity: 0;
            transition: opacity 0.3s;
        }

        .spin-result-overlay.active { display: flex; opacity: 1; }
        /* 强制浅色文字: overlay 背景是固定深色, 不能跟随主题变量, 否则浅色主题下黑字看不清 */
        .spin-result-overlay .spin-result-title { color: #f8fafc; }
        .spin-result-overlay .spin-result-value { color: #cbd5e1; }
        .spin-result-overlay .spin-invite-txt h4 { color: #f8fafc !important; }
        .spin-result-overlay .spin-invite-txt p { color: #cbd5e1 !important; }
        .spin-result-overlay .spin-invite-divider span { color: #64748b; }

        .spin-result-box {
            text-align: center;
            animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
            width: 100%;
            max-width: 360px;
            padding: 0 20px;
            display: flex;
            flex-direction: column;
            align-items: stretch;
            gap: 10px;
        }

        .spin-result-emoji { font-size: 64px; margin: 0 0 -4px; text-align: center; }

        .spin-result-title {
            font-size: 24px;
            font-weight: 800;
            margin: 0;
            text-align: center;
            letter-spacing: 0.2px;
        }

        .spin-result-value {
            font-size: 15px;
            color: var(--text-secondary);
            margin: 0 0 6px;
            text-align: center;
            line-height: 1.4;
        }

        .spin-result-value.wld { color: #fbbf24; font-size: 20px; font-weight: 700; }

        /* Spin Result Invite Card */
        .spin-invite-card {
            background: linear-gradient(135deg, rgba(59,130,246,0.12), rgba(99,102,241,0.08));
            border: 1px solid rgba(59,130,246,0.25);
            border-radius: 14px;
            padding: 14px 16px;
            margin: 0;
            text-align: left;
            animation: spinInviteSlide 0.35s ease-out 0.3s both;
        }
        @keyframes spinInviteSlide { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
        .spin-invite-card.almost {
            background: linear-gradient(135deg, rgba(251,191,36,0.10), rgba(245,158,11,0.06));
            border-color: rgba(251,191,36,0.25);
        }
        .spin-invite-card.almost .spin-invite-share { background: #f59e0b; }
        .spin-invite-card.almost .spin-invite-share:hover { background: #d97706; }
        .spin-invite-card.almost .spin-invite-copy { color: #f59e0b; border-color: rgba(245,158,11,0.3); background: rgba(245,158,11,0.1); }
        .spin-invite-hdr { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
        .spin-invite-icon { font-size: 26px; }
        .spin-invite-txt h4 { font-size: 14px; font-weight: 700; color: var(--text-primary); margin: 0; }
        .spin-invite-txt p { font-size: 11px; color: var(--text-secondary); margin: 2px 0 0; line-height: 1.4; }
        .spin-invite-txt .reward-hl { color: #fbbf24; font-weight: 700; }
        .spin-invite-btns { display: flex; gap: 8px; }
        .spin-invite-share {
            flex: 1; padding: 10px; background: #3b82f6; color: white;
            border: none; border-radius: 10px; font-size: 13px; font-weight: 600;
            cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 6px;
        }
        .spin-invite-share:hover { background: #2563eb; }
        .spin-invite-copy {
            padding: 10px 14px; background: rgba(59,130,246,0.15); color: #3b82f6;
            border: 1px solid rgba(59,130,246,0.3); border-radius: 10px; font-size: 13px;
            cursor: pointer; display: flex; align-items: center; justify-content: center;
        }
        .spin-invite-copy:hover { background: rgba(59,130,246,0.25); }
        .spin-invite-copy img { width: 16px; height: 16px; }
        [data-theme="dark"] .spin-invite-copy img { filter: invert(1); }
        /* spin overlay 内强制提高对比度: 深色背景下 copy 按钮文字/图标必须白色清晰 */
        .spin-result-overlay .spin-invite-copy {
            background: rgba(255,255,255,0.18) !important;
            border-color: rgba(255,255,255,0.35) !important;
            color: #ffffff !important;
            min-width: 44px;
            min-height: 40px;
            font-size: 20px;
        }
        .spin-result-overlay .spin-invite-copy:hover { background: rgba(255,255,255,0.28) !important; }
        .spin-result-overlay .spin-invite-copy img {
            width: 20px; height: 20px;
            filter: brightness(0) invert(1) !important;
        }
        .spin-result-overlay .spin-invite-card.almost .spin-invite-copy {
            background: rgba(251,191,36,0.22) !important;
            border-color: rgba(251,191,36,0.55) !important;
            color: #fbbf24 !important;
        }
        .spin-result-overlay .spin-invite-card.almost .spin-invite-copy img {
            filter: none !important;
        }
        .spin-invite-divider { display: none; }

        .btn-spin-continue {
            background: transparent;
            color: #94a3b8;
            border: 1px solid rgba(148, 163, 184, 0.28);
            padding: 11px 24px;
            border-radius: 14px;
            font-family: 'Outfit', sans-serif;
            font-weight: 600;
            font-size: 13px;
            cursor: pointer;
            width: 100%;
            margin: 4px 0 0;
            opacity: 0.85;
            transition: background 0.15s ease, color 0.15s ease, opacity 0.15s ease;
        }
        .btn-spin-continue:hover { opacity: 1; }
        .btn-spin-continue:active { background: rgba(148,163,184,0.12); color: #cbd5e1; opacity: 1; }
        .btn-spin-earn-more {
            background: linear-gradient(135deg, #f59e0b, #d97706);
            color: #ffffff;
            border: none;
            padding: 13px 32px;
            border-radius: 14px;
            font-family: 'Outfit', sans-serif;
            font-weight: 700;
            font-size: 14px;
            cursor: pointer;
            margin: 0;
            width: 100%;
            box-shadow: 0 4px 14px rgba(245, 158, 11, 0.4);
            transition: transform 0.15s ease, box-shadow 0.15s ease;
        }
        .btn-spin-earn-more:active { transform: translateY(1px); box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3); }

        /* Spin 看广告增收按钮 (Ticket 翻倍 / Almost 再转 共用一套样式) */
        .btn-spin-ad-action {
            background: linear-gradient(135deg, #a855f7, #7c3aed);
            color: #ffffff;
            border: none;
            padding: 13px 18px;
            border-radius: 14px;
            font-family: 'Outfit', sans-serif;
            font-weight: 700;
            font-size: 14px;
            cursor: pointer;
            margin: 0;
            width: 100%;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            box-shadow: 0 4px 14px rgba(168, 85, 247, 0.4);
            transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.2s ease, background 0.3s ease;
        }
        .btn-spin-ad-action:active { transform: translateY(1px); box-shadow: 0 2px 8px rgba(168, 85, 247, 0.3); }
        .btn-spin-ad-action:disabled { opacity: 0.6; cursor: not-allowed; }
        .btn-spin-ad-action.loading { background: linear-gradient(135deg, #6366f1, #4f46e5); }
        .btn-spin-ad-action.success { background: linear-gradient(135deg, #10b981, #059669); box-shadow: 0 4px 14px rgba(16, 185, 129, 0.45); }
        .btn-spin-ad-action .ad-icon { font-size: 16px; }
        .btn-spin-ad-action .ad-limit-hint { font-size: 11px; font-weight: 500; opacity: 0.85; margin-left: 4px; }
        /* 看广告完成 ・ 右侧勾勾动画 (success 状态才显示) */
        .btn-spin-ad-action .ad-check {
            display: none;
            font-size: 20px;
            margin-left: auto;
            line-height: 1;
            color: #ffffff;
            text-shadow: 0 0 8px rgba(255,255,255,0.6);
        }
        .btn-spin-ad-action.success .ad-check {
            display: inline-block;
            animation: ad-check-pop 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
        }
        .btn-spin-ad-action.success .ad-icon,
        .btn-spin-ad-action.success .ad-limit-hint { display: none; }
        @keyframes ad-check-pop {
            0%   { transform: scale(0) rotate(-90deg); opacity: 0; }
            55%  { transform: scale(1.45) rotate(15deg); opacity: 1; }
            80%  { transform: scale(0.92) rotate(-4deg); opacity: 1; }
            100% { transform: scale(1) rotate(0deg); opacity: 1; }
        }

        /* Withdraw Modal */
        .withdraw-body { display: flex; flex-direction: column; gap: 16px; }

        .withdraw-amount {
            text-align: center;
            font-size: 24px;
            font-weight: 700;
            padding: 12px 0;
        }
        .withdraw-payout-label {
            display: block;
            font-size: 11px;
            font-weight: 700;
            letter-spacing: 0.08em;
            text-transform: uppercase;
            color: var(--text-secondary);
            margin-bottom: 4px;
        }
        .withdraw-payout-label:empty { display: none; }

        .withdraw-amount small { font-size: 14px; color: var(--text-secondary); font-weight: 600; }

        .withdraw-input-wrap {
            position: relative;
            width: 100%;
        }
        .withdraw-input {
            width: 100%;
            padding: 14px 40px 14px 16px;
            border-radius: 12px;
            border: 1px solid var(--border);
            background: var(--input-bg);
            color: var(--text-primary);
            font-size: 14px;
            font-family: monospace;
            outline: none;
            box-sizing: border-box;
        }

        .withdraw-input:focus { border-color: #a855f7; }
        .withdraw-input-clear {
            display: none;
            position: absolute;
            top: 50%;
            right: 10px;
            transform: translateY(-50%);
            width: 22px;
            height: 22px;
            padding: 0;
            border: 0;
            border-radius: 50%;
            background: var(--text-tertiary);
            color: var(--card-bg);
            font-size: 14px;
            line-height: 22px;
            text-align: center;
            cursor: pointer;
            opacity: 0.75;
        }
        .withdraw-input-clear:active { opacity: 1; transform: translateY(-50%) scale(0.96); }
        .withdraw-network-hint {
            font-size: 11px;
            font-weight: 500;
            color: var(--text-secondary);
            line-height: 1.45;
            margin: 0;
            padding: 8px 10px;
            border-radius: 8px;
            background: rgba(0, 82, 255, 0.08);
            border: 1px solid rgba(0, 82, 255, 0.22);
        }

        /* ─── KYC Form Styles ─── */
        #kyc-form {
            display: flex;
            flex-direction: column;
            gap: 14px;
        }
        #kyc-form .kyc-section-title {
            font-size: 14px;
            font-weight: 700;
            color: var(--text-primary);
            letter-spacing: 0.2px;
            margin: 4px 0 2px;
            padding: 6px 12px;
            border-left: 3px solid #3b82f6;
            border-radius: 0 6px 6px 0;
            background: linear-gradient(90deg, rgba(59,130,246,0.08), transparent);
        }
        #kyc-form .kyc-section-title:first-child { margin-top: 0; }
        #kyc-form .kyc-row {
            display: flex;
            gap: 10px;
            width: 100%;
        }
        #kyc-form .kyc-row > * { flex: 1; min-width: 0; }
        #kyc-form input,
        #kyc-form select {
            width: 100%;
            padding: 13px 16px;
            border-radius: 12px;
            border: 1px solid var(--card-border);
            background: var(--card-bg);
            color: var(--text-primary);
            font-size: 14px;
            font-family: 'Outfit', -apple-system, sans-serif;
            outline: none;
            box-sizing: border-box;
            transition: border-color 0.2s, box-shadow 0.2s;
            -webkit-appearance: none;
        }
        #kyc-form select {
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23888' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
            background-repeat: no-repeat;
            background-position: right 14px center;
            padding-right: 38px;
        }
        #kyc-form input::placeholder {
            color: var(--text-tertiary);
            font-size: 13px;
        }
        #kyc-form input:focus,
        #kyc-form select:focus {
            border-color: #3b82f6;
            box-shadow: 0 0 0 3px rgba(59,130,246,0.12);
        }
        #kyc-form input[type="file"] { display: none; }
        #kyc-form .kyc-prefix {
            flex: 0 0 72px;
            min-width: 72px;
            text-align: center;
            font-weight: 600;
            border-right: none;
            border-radius: 12px 0 0 12px;
        }
        #kyc-form .kyc-row .kyc-prefix + input {
            border-radius: 0 12px 12px 0;
            border-left: none;
        }
        #kyc-form .kyc-upload-row {
            display: flex;
            gap: 10px;
            margin-top: 2px;
        }
        #kyc-form .kyc-upload-col { flex: 1; min-width: 0; }
        #kyc-form .kyc-upload-label {
            display: block;
            font-size: 13px;
            font-weight: 600;
            color: var(--text-secondary);
            margin-bottom: 8px;
            padding: 0 2px;
        }
        #kyc-form .kyc-upload-box {
            border: 2px dashed var(--card-border);
            border-radius: 12px;
            padding: 20px 8px;
            text-align: center;
            cursor: pointer;
            font-size: 12px;
            color: var(--text-tertiary);
            min-height: 64px;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: border-color 0.25s, background 0.25s, transform 0.15s;
            overflow: hidden;
            background: var(--subtle-bg);
        }
        #kyc-form .kyc-upload-box:hover { border-color: rgba(59,130,246,0.4); background: rgba(59,130,246,0.04); }
        #kyc-form .kyc-upload-box:active { border-color: #3b82f6; background: rgba(59,130,246,0.08); transform: scale(0.97); }
        #kyc-form .kyc-upload-box.has-file {
            border-style: solid;
            border-color: rgba(74,222,128,0.4);
            background: rgba(74,222,128,0.04);
            position: relative;
        }
        #kyc-form .kyc-upload-box.has-file::after {
            content: '✓';
            position: absolute;
            top: 6px;
            right: 8px;
            font-size: 12px;
            color: #4ade80;
            font-weight: 700;
            background: rgba(0,0,0,0.3);
            width: 20px;
            height: 20px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        #kyc-form .kyc-upload-box img {
            max-width: 100%;
            max-height: 110px;
            border-radius: 8px;
            object-fit: cover;
        }
        #kyc-form .kyc-field-label {
            display: block;
            font-size: 13px;
            font-weight: 600;
            color: var(--text-secondary);
            margin-bottom: 8px;
            padding: 0 2px;
        }
        #kyc-submit-btn {
            margin-top: 6px;
            padding: 14px;
            border-radius: 56px;
            border: none;
            background: linear-gradient(135deg, #0052ff, #00a3ff);
            color: #fff;
            font-size: 15px;
            font-weight: 700;
            font-family: 'Outfit', -apple-system, sans-serif;
            cursor: pointer;
            transition: opacity 0.2s;
            width: 100%;
            box-sizing: border-box;
        }
        #kyc-submit-btn:active { opacity: 0.85; }
        #kyc-submit-btn:disabled { opacity: 0.5; cursor: default; }

        /* ── Card Landing Page ── */
        #kyc-landing {
            padding: 10px 0 110px; /* 预留底部空间避免被固定按钮+nav遮住 */
        }
        .kyc-landing-hero {
            text-align: center;
            margin-bottom: 24px;
        }
        .kyc-landing-card-img {
            max-width: 280px;
            margin: 0 auto 18px;
            border-radius: 16px;
            overflow: hidden;
        }
        .kyc-landing-card-img img {
            width: 100%;
            display: block;
            border-radius: 16px;
        }
        .kyc-landing-logo-img {
            display: block;
            max-width: 360px;
            width: 100%;
            height: auto;
            margin: 28px auto 0;
        }
        .kyc-landing-card-visual {
            width: 280px;
            height: 170px;
            background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
            border-radius: 16px;
            padding: 20px;
            color: #fff;
            position: relative;
            box-shadow: 0 12px 40px rgba(0,0,0,0.35);
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            overflow: hidden;
        }
        .kyc-landing-card-visual::before {
            content: '';
            position: absolute;
            top: -30px; right: -30px;
            width: 120px; height: 120px;
            border-radius: 50%;
            background: rgba(255,255,255,0.06);
        }
        .kyc-landing-card-visual::after {
            content: '';
            position: absolute;
            bottom: -40px; left: -20px;
            width: 140px; height: 140px;
            border-radius: 50%;
            background: rgba(255,255,255,0.04);
        }
        .kyc-landing-card-chip {
            width: 36px; height: 26px;
            background: linear-gradient(135deg, #e6c200, #f0d000);
            border-radius: 5px;
        }
        .kyc-landing-card-logo {
            position: absolute;
            top: 18px; right: 20px;
            font-size: 16px;
            font-weight: 800;
            letter-spacing: 2px;
            opacity: 0.9;
        }
        .kyc-landing-card-number {
            font-size: 16px;
            letter-spacing: 3px;
            font-family: monospace;
            opacity: 0.8;
        }
        .kyc-landing-card-bottom {
            display: flex;
            justify-content: space-between;
            font-size: 10px;
            opacity: 0.6;
            text-transform: uppercase;
        }
        .kyc-landing-title {
            font-size: 20px;
            font-weight: 800;
            color: var(--text-primary);
            margin: 0 0 6px;
        }
        .kyc-landing-subtitle {
            font-size: 13px;
            color: var(--text-secondary);
            margin: 0;
            line-height: 1.5;
            padding: 0 10px;
        }
        .kyc-landing-features {
            display: flex;
            flex-direction: column;
            gap: 12px;
            margin-bottom: 24px;
        }
        .kyc-landing-feature {
            display: flex;
            align-items: flex-start;
            gap: 12px;
            background: var(--card-bg);
            border: 1px solid var(--card-border);
            border-radius: 14px;
            padding: 14px;
        }
        .kyc-landing-feature-icon {
            font-size: 24px;
            flex-shrink: 0;
            width: 40px;
            height: 40px;
            display: flex;
            align-items: center;
            justify-content: center;
            background: var(--subtle-bg);
            border-radius: 10px;
        }
        .kyc-landing-feature-title {
            font-size: 14px;
            font-weight: 700;
            color: var(--text-primary);
            margin-bottom: 2px;
        }
        .kyc-landing-feature-desc {
            font-size: 12px;
            color: var(--text-secondary);
            line-height: 1.4;
        }
        #kyc-apply-now-btn {
            width: 100%;
            padding: 15px;
            border-radius: 56px;
            border: none;
            background: linear-gradient(135deg, #0052ff, #00a3ff);
            color: #fff;
            font-size: 15px;
            font-weight: 700;
            cursor: pointer;
            transition: opacity 0.2s, transform 0.15s;
            box-sizing: border-box;
            box-shadow: 0 4px 16px rgba(0,82,255,0.3);
            font-family: 'Outfit', -apple-system, sans-serif;
        }
        #kyc-apply-now-btn:active { opacity: 0.85; transform: scale(0.98); }

        /* ── Card 页面底部固定按钮区 (参考 .shop-buy-fixed) ── */
        .kyc-fixed-cta {
            position: fixed;
            left: 0;
            right: 0;
            bottom: 80px; /* 避开 bottom-nav (高约 80px) */
            padding: 12px 16px 14px;
            background: linear-gradient(transparent, var(--bg) 30%);
            z-index: 99;
        }

        /* KYC Form Tabs — 步骤条样式 (无 emoji, 数字点连线) */
        .kyc-form-tabs {
            display: flex;
            align-items: center;
            margin: 4px 0 22px;
            padding: 0 6px;
        }
        .kyc-form-tab {
            flex: 0 0 auto;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 6px;
            padding: 4px 0;
            background: transparent;
            border: none;
            cursor: pointer;
            font-family: 'Outfit', -apple-system, sans-serif;
            color: var(--text-secondary);
            transition: color 0.2s;
        }
        .kyc-form-tab .kyc-tab-num {
            width: 28px;
            height: 28px;
            border-radius: 50%;
            background: var(--subtle-bg);
            border: 1.5px solid var(--card-border);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 13px;
            font-weight: 700;
            color: var(--text-secondary);
            transition: all 0.25s;
        }
        .kyc-form-tab .kyc-tab-label {
            font-size: 11px;
            font-weight: 600;
            letter-spacing: 0.2px;
        }
        .kyc-form-tab.active { color: var(--text-primary); }
        .kyc-form-tab.active .kyc-tab-num {
            background: linear-gradient(135deg, #0052ff, #00a3ff);
            border-color: transparent;
            color: #fff;
            box-shadow: 0 3px 10px rgba(0,82,255,0.35);
        }
        .kyc-form-tab.completed { color: #22c55e; }
        .kyc-form-tab.completed .kyc-tab-num {
            background: #22c55e;
            border-color: transparent;
            color: #fff;
            font-size: 0;
        }
        .kyc-form-tab.completed .kyc-tab-num::after {
            content: '✓';
            font-size: 14px;
            font-weight: 800;
        }
        .kyc-form-tab-line {
            flex: 1;
            height: 2px;
            background: var(--card-border);
            margin: 0 6px;
            position: relative;
            top: -10px; /* 与圆点中心对齐 */
            border-radius: 1px;
            transition: background 0.25s;
        }
        .kyc-form-tab-line.completed { background: #22c55e; }

        .kyc-form-panel { display: none; }
        .kyc-form-panel.active { display: flex; flex-direction: column; gap: 14px; }
        /* 输入框聚焦时, 底部留出额外滚动空间, 避免软键盘弹起遮挡下方字段 */
        #kyc-form:focus-within { padding-bottom: 40vh; }
        /* Form 底部导航按钮 — 固定在页面底部 */
        .kyc-form-nav {
            display: flex;
            gap: 10px;
        }
        .kyc-form-nav button {
            flex: 1;
            padding: 14px;
            border-radius: 56px;
            border: none;
            font-size: 15px;
            font-weight: 700;
            cursor: pointer;
            transition: opacity 0.2s, transform 0.15s;
            font-family: 'Outfit', -apple-system, sans-serif;
        }
        .kyc-form-nav button:active { opacity: 0.85; transform: scale(0.97); }
        .kyc-btn-prev {
            background: var(--card-bg);
            color: var(--text-primary);
            border: 1px solid var(--card-border) !important;
            flex: 0.7;
        }
        .kyc-btn-next {
            background: linear-gradient(135deg, #0052ff, #00a3ff);
            color: #fff;
            box-shadow: 0 4px 16px rgba(0,82,255,0.25);
            flex: 1.3;
        }
        #kyc-submit-btn.loading {
            pointer-events: none;
            opacity: 0.85;
        }
        #kyc-submit-btn.loading::before {
            content: '';
            display: inline-block;
            width: 14px; height: 14px;
            margin-right: 8px;
            vertical-align: -2px;
            border: 2px solid rgba(255,255,255,0.35);
            border-top-color: #fff;
            border-radius: 50%;
            animation: spin 0.8s linear infinite;
        }
        @keyframes spin { to { transform: rotate(360deg); } }

        /* KYC 提交进度 overlay (Android 慢网络也有即时反馈) */
        #kyc-submit-overlay {
            display: none;
            position: fixed;
            inset: 0;
            z-index: 99999;
            background: radial-gradient(ellipse at center, rgba(15,23,42,0.85) 0%, rgba(0,0,0,0.92) 100%);
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
            align-items: center;
            justify-content: center;
            flex-direction: column;
            animation: kycSubmitFadeIn 0.18s ease;
        }
        #kyc-submit-overlay.show { display: flex; }
        @keyframes kycSubmitFadeIn { from { opacity: 0; } to { opacity: 1; } }
        #kyc-submit-overlay .kso-card {
            background: linear-gradient(180deg, rgba(30,41,59,0.95), rgba(15,23,42,0.95));
            border: 1px solid rgba(99,102,241,0.3);
            border-radius: 20px;
            padding: 28px 24px;
            width: min(320px, 84vw);
            text-align: center;
            box-shadow: 0 20px 60px rgba(0,0,0,0.5);
        }
        #kyc-submit-overlay .kso-spin {
            width: 52px; height: 52px;
            margin: 0 auto 16px;
            border: 4px solid rgba(99,102,241,0.2);
            border-top-color: #6366f1;
            border-radius: 50%;
            animation: spin 0.9s linear infinite;
        }
        #kyc-submit-overlay .kso-title {
            font-size: 15px;
            font-weight: 700;
            color: #f1f5f9;
            margin-bottom: 18px;
        }
        #kyc-submit-overlay .kso-steps {
            display: flex;
            flex-direction: column;
            gap: 8px;
            text-align: left;
        }
        #kyc-submit-overlay .kso-step {
            display: flex;
            align-items: center;
            gap: 10px;
            font-size: 13px;
            color: #94a3b8;
            transition: color .2s;
        }
        #kyc-submit-overlay .kso-step .kso-dot {
            width: 16px; height: 16px;
            border-radius: 50%;
            background: rgba(148,163,184,0.2);
            border: 1px solid rgba(148,163,184,0.4);
            display: flex; align-items: center; justify-content: center;
            font-size: 10px;
            color: transparent;
            flex-shrink: 0;
        }
        #kyc-submit-overlay .kso-step.active { color: #c7d2fe; }
        #kyc-submit-overlay .kso-step.active .kso-dot {
            background: #6366f1;
            border-color: #6366f1;
            color: #fff;
            box-shadow: 0 0 0 4px rgba(99,102,241,0.18);
            animation: ksoPulse 1.2s ease-in-out infinite;
        }
        #kyc-submit-overlay .kso-step.done { color: #4ade80; }
        #kyc-submit-overlay .kso-step.done .kso-dot {
            background: #4ade80;
            border-color: #4ade80;
            color: #052e16;
        }
        @keyframes ksoPulse { 0%,100% { box-shadow: 0 0 0 4px rgba(99,102,241,0.18); } 50% { box-shadow: 0 0 0 8px rgba(99,102,241,0.08); } }

        .withdraw-note { font-size: 11px; color: var(--text-tertiary); text-align: center; margin: 0; }

        .btn-withdraw-submit {
            width: 100%;
            padding: 14px;
            border-radius: 56px;
            border: none;
            background: #a855f7;
            color: white;
            font-family: 'Outfit', sans-serif;
            font-weight: 600;
            font-size: 15px;
            cursor: pointer;
        }

        .btn-withdraw-submit:disabled { background: var(--disabled-bg); color: var(--disabled-text); cursor: default; }

        /* v24 Phase 6+: 提现弹窗同行双按钮 (TON Connect | Submit) */
        .withdraw-btn-row { display: flex; gap: 8px; width: 100%; margin-top: 4px; }
        .withdraw-btn-row .btn-ton-connect {
            flex: 0 0 auto;
            padding: 14px 18px;
            border-radius: 56px;
            border: none;
            background: linear-gradient(135deg, #0098ea, #0080d0);
            color: #fff;
            font-family: 'Outfit', sans-serif;
            font-weight: 600;
            font-size: 14px;
            cursor: pointer;
            white-space: nowrap;
        }
        .withdraw-btn-row .btn-withdraw-submit { flex: 1 1 auto; margin: 0; }

        /* v24 Phase 6+: TON 提现钱包展示块 (代替输入框，强制走 TON Connect 防地址手输错) */
        .ton-wallet-display {
            display: flex; align-items: center; gap: 8px;
            padding: 12px 14px;
            border-radius: 12px;
            border: 1px solid var(--border);
            background: var(--input-bg);
            font-family: monospace;
            font-size: 13px;
        }
        .ton-wallet-display .twd-label { color: var(--text-tertiary); font-size: 11px; }
        .ton-wallet-display .twd-addr { color: #22d3ee; flex: 1; word-break: break-all; line-height: 1.3; }
        .ton-wallet-display .twd-change {
            flex: 0 0 auto;
            background: rgba(0,152,234,0.18);
            color: #5fc6ff;
            border: 1px solid rgba(0,152,234,0.4);
            border-radius: 14px;
            padding: 5px 12px;
            font-size: 11px;
            font-weight: 600;
            cursor: pointer;
            font-family: 'Outfit', sans-serif;
        }
        .ton-wallet-display .twd-change:active { transform: scale(0.97); }
        .ton-wallet-display .twd-clear {
            flex: 0 0 auto;
            width: 22px;
            height: 22px;
            padding: 0;
            border: 0;
            border-radius: 50%;
            background: var(--text-tertiary);
            color: var(--card-bg);
            font-size: 14px;
            line-height: 22px;
            text-align: center;
            cursor: pointer;
            opacity: 0.75;
            font-family: 'Outfit', sans-serif;
        }
        .ton-wallet-display .twd-clear:active { opacity: 1; transform: scale(0.96); }
        .ton-no-wallet-hint {
            display: flex; flex-direction: column; align-items: center; gap: 6px;
            padding: 14px 12px;
            border-radius: 12px;
            border: 1px dashed rgba(0,152,234,0.45);
            background: rgba(0,152,234,0.06);
            color: #94a3b8;
            font-size: 12px;
            text-align: center;
            line-height: 1.45;
        }
        .ton-no-wallet-hint .twh-icon { font-size: 22px; }
        .btn-ton-connect-primary {
            width: 100%;
            padding: 14px;
            border-radius: 56px;
            border: none;
            background: linear-gradient(135deg, #0098ea, #0080d0);
            color: #fff;
            font-family: 'Outfit', sans-serif;
            font-weight: 600;
            font-size: 15px;
            cursor: pointer;
            box-shadow: 0 6px 22px rgba(0,152,234,0.32);
        }
        .btn-ton-connect-primary:active { transform: scale(0.98); }

/* Winners Marquee — fixed overlay above bottom-nav; keep in layout so tab switch does not collapse height */
   .winners-marquee {
       display: flex;
       align-items: center;
       visibility: hidden;
       opacity: 0;
       position: fixed;
       left: 12px;
       right: 12px;
       bottom: 80px;
       z-index: 90;
       height: 36px;
       max-width: 576px;
       margin: 0 auto;
       overflow: hidden;
       border-radius: 10px;
       background: var(--card-bg);
       border: 1px solid var(--card-border);
       padding: 0 8px;
       box-sizing: border-box;
       pointer-events: none;
   }
   body.tab-spin-active .winners-marquee {
       visibility: visible;
       opacity: 1;
   }
   .winners-marquee::before,
   .winners-marquee::after {
       content: '';
       position: absolute; top: 0; bottom: 0; width: 24px; z-index: 1;
       pointer-events: none;
   }
   .winners-marquee::before { left: 0; background: linear-gradient(to right, var(--card-bg), transparent); }
   .winners-marquee::after { right: 0; background: linear-gradient(to left, var(--card-bg), transparent); }
   .marquee-track {
       display: flex;
       gap: 20px;
       white-space: nowrap;
       animation: marquee-scroll 60s linear infinite;
       width: max-content;
       will-change: transform;
   }
   .marquee-item {
       display: inline-flex;
       align-items: center;
       gap: 4px;
       font-size: 11px;
       color: var(--text-secondary);
   }
   .marquee-item .mi-name { color: var(--text-light); font-weight: 600; }
   .marquee-item .mi-amount { color: #fbbf24; font-weight: 700; }
   @keyframes marquee-scroll {
       0% { transform: translateX(0); }
       100% { transform: translateX(-50%); }
   }

        /* Bottom Nav */
        .bottom-nav {
            position: fixed;
            bottom: 0;
            left: 0;
            right: 0;
            background: var(--nav-bg);
            backdrop-filter: blur(20px);
            -webkit-backdrop-filter: blur(20px);
            border-top: 1px solid var(--card-border);
            display: flex;
            justify-content: space-around;
            padding: 12px 16px 24px;
            z-index: 100;
        }

        .nav-item {
            display: flex;
            flex-direction: column;
            align-items: center;
            color: var(--text-tertiary);
            cursor: pointer;
            transition: color 0.2s;
            width: 80px;
        }

        .nav-item.active {
            color: var(--primary);
        }

        .nav-icon {
            font-size: 20px;
            margin-bottom: 4px;
            filter: grayscale(1);
            opacity: 0.7;
            transition: all 0.2s;
        }

        .nav-item.active .nav-icon {
            filter: grayscale(0);
            opacity: 1;
            transform: scale(1.1);
        }

        /* 2026-08-29: SVG nav 图标 (SPIN + WALLET) — 颜色跟随 .nav-item 的 color, 不走 emoji 灰度 */
        .nav-icon.nav-icon-svg {
            filter: none;
            opacity: 0.7;
            line-height: 0;
            display: inline-flex;
            align-items: center;
            justify-content: center;
        }
        .nav-icon.nav-icon-svg svg { display: block; }
        .nav-item.active .nav-icon.nav-icon-svg { filter: none; opacity: 1; }

        .nav-text {
            font-size: 10px;
            font-weight: 600;
        }

        /* Views */
        .view-content {
            display: none;
            animation: fadeIn 0.3s;
        }
        /* Wheel must never leak onto Tasks/Share/Top/Me */
        body:not(.tab-spin-active) .wheel-area,
        body:not(.tab-spin-active) .wheel-stage {
            display: none !important;
        }

        .view-content.active {
            display: block;
        }

        #view-spin.active {
            display: flex;
            flex-direction: column;
            height: var(--tg-viewport-stable-height, 100dvh);
            max-height: var(--tg-viewport-stable-height, 100dvh);
            box-sizing: border-box;
            overflow: hidden;
            /* nav + marquee + pinned spin controls */
            padding-bottom: calc(80px + 36px + 72px);
        }

        /* 资料页左上角返回按钮 */
        #kyc-back-btn {
            display: inline-flex;
            align-items: center;
            gap: 4px;
            margin: 16px 0 16px;
            padding: 7px 14px 7px 10px;
            background: var(--subtle-bg, rgba(0,0,0,0.05));
            border: 1px solid var(--card-border, rgba(0,0,0,0.08));
            color: var(--text-primary);
            font-size: 13px;
            font-weight: 600;
            border-radius: 999px;
            cursor: pointer;
            transition: background 0.18s, transform 0.1s, box-shadow 0.18s;
            box-shadow: 0 1px 2px rgba(0,0,0,0.04);
            -webkit-tap-highlight-color: transparent;
        }
        #kyc-back-btn:hover { background: var(--card-bg, rgba(0,0,0,0.08)); }
        #kyc-back-btn:active { transform: scale(0.96); }
        #kyc-back-btn .kyc-back-arrow {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 18px; height: 18px;
            border-radius: 50%;
            background: var(--primary, #0052ff);
            color: #fff;
            font-size: 12px;
            font-weight: 700;
            line-height: 1;
        }

        /* 支付待处理卡片 (status=3) */
        .kyc-payment-pending {
            margin-top: 24px;
            background: linear-gradient(135deg, rgba(167,139,250,0.12), rgba(124,58,237,0.08));
            border: 1px solid rgba(167,139,250,0.3);
            border-radius: 18px;
            padding: 28px 22px;
            text-align: center;
            box-shadow: 0 4px 20px rgba(124,58,237,0.08);
        }
        .kyc-payment-pending-icon {
            width: 64px; height: 64px;
            margin: 0 auto 16px;
            border-radius: 50%;
            background: linear-gradient(135deg, #a78bfa, #7c3aed);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 30px;
            box-shadow: 0 8px 20px rgba(124,58,237,0.3);
        }
        .kyc-payment-pending-title {
            font-size: 17px;
            font-weight: 700;
            color: var(--text-primary);
            margin-bottom: 8px;
            letter-spacing: -0.2px;
        }
        .kyc-payment-pending-desc {
            font-size: 13px;
            color: var(--text-secondary);
            line-height: 1.55;
            margin-bottom: 20px;
        }
        .kyc-payment-pending-fee {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            background: rgba(255,255,255,0.5);
            border: 1px solid rgba(167,139,250,0.25);
            padding: 8px 16px;
            border-radius: 999px;
            font-size: 13px;
            font-weight: 700;
            color: #7c3aed;
            margin-bottom: 20px;
        }
        .kyc-payment-pending-cta {
            display: block;
            width: 100%;
            padding: 14px;
            border-radius: 14px;
            background: linear-gradient(135deg, #7c3aed, #a78bfa);
            color: #fff;
            font-size: 15px;
            font-weight: 700;
            border: none;
            cursor: pointer;
            box-shadow: 0 6px 16px rgba(124,58,237,0.3);
            transition: transform 0.1s, box-shadow 0.2s, opacity 0.2s;
        }
        .kyc-payment-pending-cta:hover { box-shadow: 0 8px 22px rgba(124,58,237,0.4); }
        .kyc-payment-pending-cta:active { transform: scale(0.98); }
        .kyc-payment-pending-cta:disabled { opacity: 0.6; cursor: default; transform: none; }
        .kyc-payment-pending-note {
            margin-top: 14px;
            font-size: 11px;
            color: var(--text-tertiary);
            line-height: 1.5;
        }

        /* 审核中卡片 (status=0) — 橙色变体, 复用 .kyc-payment-pending 大部分样式 */
        .kyc-review-pending {
            margin-top: 24px;
            background: linear-gradient(135deg, rgba(251,191,36,0.12), rgba(245,158,11,0.08));
            border: 1px solid rgba(251,191,36,0.35);
            border-radius: 18px;
            padding: 28px 22px;
            text-align: center;
            box-shadow: 0 4px 20px rgba(245,158,11,0.08);
        }
        .kyc-review-pending-icon {
            width: 64px; height: 64px;
            margin: 0 auto 16px;
            border-radius: 50%;
            background: linear-gradient(135deg, #fbbf24, #f59e0b);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 30px;
            box-shadow: 0 8px 20px rgba(245,158,11,0.3);
            animation: kyc-review-spin 2.4s linear infinite;
        }
        @keyframes kyc-review-spin {
            from { transform: rotate(0deg); }
            to   { transform: rotate(360deg); }
        }
        .kyc-review-pending-title {
            font-size: 17px;
            font-weight: 700;
            color: var(--text-primary);
            margin-bottom: 8px;
            letter-spacing: -0.2px;
        }
        .kyc-review-pending-desc {
            font-size: 13px;
            color: var(--text-secondary);
            line-height: 1.55;
            margin-bottom: 18px;
        }
        .kyc-review-pending-meta {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            background: rgba(255,255,255,0.5);
            border: 1px solid rgba(251,191,36,0.3);
            padding: 8px 16px;
            border-radius: 999px;
            font-size: 12px;
            font-weight: 600;
            color: #b45309;
            margin-bottom: 16px;
        }
        .kyc-review-pending-steps {
            display: flex;
            justify-content: space-between;
            gap: 8px;
            margin-top: 20px;
            padding-top: 18px;
            border-top: 1px dashed rgba(251,191,36,0.3);
        }
        .kyc-review-step {
            flex: 1;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 5px;
            font-size: 11px;
            color: var(--text-tertiary);
            line-height: 1.3;
        }
        .kyc-review-step-icon {
            width: 26px; height: 26px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 13px;
            font-weight: 700;
            background: rgba(0,0,0,0.06);
            color: var(--text-tertiary);
        }
        .kyc-review-step.done .kyc-review-step-icon {
            background: #4ade80;
            color: #fff;
        }
        .kyc-review-step.done {
            color: var(--text-secondary);
            font-weight: 600;
        }
        .kyc-review-step.active .kyc-review-step-icon {
            background: #fbbf24;
            color: #fff;
            box-shadow: 0 0 0 4px rgba(251,191,36,0.2);
        }
        .kyc-review-step.active {
            color: #b45309;
            font-weight: 700;
        }

        /* Fullscreen Overlay Mask */
        #overlay {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: var(--overlay-bg);
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
            display: none;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            z-index: 1000;
            color: white;
            opacity: 0;
            transition: opacity 0.3s ease;
        }

        #overlay.active {
            display: flex;
            opacity: 1;
        }

        /* 炫酷动画雷达 */
        .radar {
            width: 80px;
            height: 80px;
            border-radius: 50%;
            background: var(--primary);
            position: relative;
            box-shadow: 0 0 0 0 var(--primary-glow);
            animation: pulse 2s infinite;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 32px;
            margin-bottom: 24px;
        }

        @keyframes pulse {
            0% {
                box-shadow: 0 0 0 0 rgba(0, 82, 255, 0.7);
            }

            70% {
                box-shadow: 0 0 0 40px rgba(0, 82, 255, 0);
            }

            100% {
                box-shadow: 0 0 0 0 rgba(0, 82, 255, 0);
            }
        }

        #overlay-text {
            font-size: 18px;
            font-weight: 600;
            text-align: center;
            padding: 0 20px;
        }

        .success-checkmark {
            display: none;
            width: 60px;
            height: 60px;
            background: #10b981;
            border-radius: 50%;
            align-items: center;
            justify-content: center;
            font-size: 30px;
            color: white;
            animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
        }

        @keyframes popIn {
            0% {
                transform: scale(0);
            }

            100% {
                transform: scale(1);
            }
        }

        /* Spin 可用数 +/- 飘字动画 */
        @keyframes spinCountDelta {
            0%   { opacity: 0; transform: translate(-50%, 6px) scale(0.85); }
            18%  { opacity: 1; transform: translate(-50%, -6px) scale(1.18); }
            100% { opacity: 0; transform: translate(-50%, -42px) scale(1); }
        }
        .spin-count-delta {
            position: fixed;
            pointer-events: none;
            z-index: 10000;
            font-family: 'Outfit', sans-serif;
            font-weight: 800;
            font-size: 20px;
            text-shadow: 0 1px 6px rgba(0,0,0,0.35), 0 0 12px currentColor;
            animation: spinCountDelta 1.1s cubic-bezier(0.22, 1, 0.36, 1) forwards;
            will-change: transform, opacity;
        }
        .spin-count-delta.plus  { color: #22c55e; }
        .spin-count-delta.minus { color: #94a3b8; }
        /* 数字本身轻微脉冲 (变化时高亮) */
        @keyframes spinCountPulse {
            0%, 100% { transform: scale(1); }
            40%      { transform: scale(1.18); }
        }
        #val-avail-spins.pulse {
            display: inline-block;
            animation: spinCountPulse 0.45s ease-out;
        }

        /* SHOP Tab */
        .shop-header {
            text-align: center;
            padding: 8px 16px 6px;
        }
        .shop-method-tabs {
            display: flex;
            justify-content: center;
            gap: 0;
            margin: 12px 16px 0;
            background: var(--subtle-bg, rgba(255,255,255,0.06));
            border-radius: 12px;
            padding: 3px;
        }
        .shop-method-tab {
            flex: 1;
            padding: 8px 12px;
            border: none;
            border-radius: 10px;
            font-size: 13px;
            font-weight: 600;
            cursor: pointer;
            background: transparent;
            color: var(--text-secondary);
            transition: all 0.2s;
        }
        .shop-method-tab.active {
            background: var(--card-bg);
            color: var(--text-primary);
            box-shadow: 0 1px 4px rgba(0,0,0,0.15);
        }
        .shop-method-tab.active.method-stars {
            color: #f59e0b;
        }
        .shop-method-tab.active.method-ton {
            color: #0ea5e9;
        }
        .shop-header h2 {
            font-size: 22px;
            font-weight: 800;
            margin: 0;
            background: linear-gradient(135deg, #fbbf24, #f59e0b);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
        }
        .shop-header p {
            font-size: 12px;
            color: var(--text-secondary);
            margin: 6px 0 0;
        }
        .shop-packages {
            display: flex;
            flex-direction: column;
            gap: 10px;
            padding: 12px 16px;
        }

        /* ── Section label ── */
        .shop-section-label {
            font-size: 11px;
            font-weight: 700;
            letter-spacing: 1px;
            text-transform: uppercase;
            color: var(--text-tertiary);
            margin: 8px 0 2px;
        }
        .shop-section-label:first-child { margin-top: 0; }

        /* ── Card base ── */
        .shop-card {
            background: var(--card-bg);
            border: 1px solid var(--card-border);
            border-radius: 16px;
            padding: 16px 18px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            transition: transform 0.15s;
            position: relative;
            overflow: hidden;
        }
        .shop-card:active {
            transform: scale(0.98);
        }

        /* ── Featured / popular card ── */
        .shop-card.shop-featured {
            border-color: rgba(245,158,11,0.4);
            background: linear-gradient(135deg, rgba(245,158,11,0.08), var(--card-bg) 60%);
        }
        .shop-card.shop-welcome {
            border-color: rgba(34,197,94,0.4);
            background: linear-gradient(135deg, rgba(34,197,94,0.08), var(--card-bg) 60%);
        }

        /* ── Badge (POPULAR / BEST VALUE / WELCOME) ── */
        .shop-badge {
            position: absolute;
            top: 0; left: 0;
            font-size: 8px;
            font-weight: 800;
            letter-spacing: 0.5px;
            padding: 3px 10px 4px 10px;
            border-radius: 14px 0 10px 0;
            color: #fff;
        }
        .shop-badge.badge-popular { background: linear-gradient(135deg, #f59e0b, #d97706); }
        .shop-badge.badge-best    { background: linear-gradient(135deg, #8b5cf6, #6d28d9); }
        .shop-badge.badge-welcome { background: linear-gradient(135deg, #22c55e, #16a34a); }

        /* ── Card left ── */
        .shop-card-info {
            flex: 1;
            min-width: 0;
        }
        .shop-card-info h3 {
            font-size: 15px;
            font-weight: 700;
            margin: 0 0 3px;
            color: var(--text-primary);
            display: flex;
            align-items: center;
            gap: 6px;
        }
        .shop-card-info .shop-sub {
            font-size: 11px;
            color: var(--text-secondary);
            margin: 0;
        }
        .shop-save {
            display: inline-block;
            font-size: 10px;
            font-weight: 700;
            color: #22c55e;
            background: rgba(34,197,94,0.12);
            padding: 1px 6px;
            border-radius: 4px;
            margin-left: 2px;
        }

        /* ── Buy button ── */
        .shop-buy-btn {
            background: linear-gradient(135deg, #f59e0b, #d97706);
            color: #fff;
            border: none;
            border-radius: 56px;
            padding: 10px 20px;
            font-size: 13px;
            font-weight: 700;
            cursor: pointer;
            white-space: nowrap;
            letter-spacing: 0.3px;
            flex-shrink: 0;
            min-width: 72px;
            text-align: center;
            box-shadow: 0 2px 8px rgba(245,158,11,0.25);
            transition: transform 0.15s;
        }
        .shop-buy-btn:active { transform: scale(0.96); }
        .shop-buy-btn.btn-welcome {
            background: linear-gradient(135deg, #22c55e, #16a34a);
            box-shadow: 0 2px 8px rgba(34,197,94,0.25);
            color: #fff;
        }
        .shop-buy-btn:disabled {
            opacity: 0.5;
        }

        /* ── Selected card state ── */
        .shop-card.shop-selected {
            border-color: rgba(59,130,246,0.6);
            background: linear-gradient(135deg, rgba(59,130,246,0.08), var(--card-bg) 60%);
        }
        .shop-card.shop-featured.shop-selected { border-color: rgba(59,130,246,0.6); }
        .shop-card.shop-welcome.shop-selected { border-color: rgba(59,130,246,0.6); }
        .shop-card.shop-best {
            border-color: rgba(139,92,246,0.4);
            background: linear-gradient(135deg, rgba(139,92,246,0.08), var(--card-bg) 60%);
        }
        .shop-card.shop-best.shop-selected { border-color: rgba(59,130,246,0.6); }

        /* ── Radio dot ── */
        .shop-radio {
            width: 18px; height: 18px;
            border-radius: 50%;
            border: 2px solid var(--text-secondary);
            opacity: 0.55;
            flex-shrink: 0;
            display: flex; align-items: center; justify-content: center;
            box-sizing: border-box;
        }
        .shop-radio.checked {
            border-color: #3b82f6;
            opacity: 1;
        }
        .shop-radio.checked::after { content: ''; width: 9px; height: 9px; border-radius: 50%; background: #3b82f6; }

        /* ── Price column (right side) ── */
        .shop-price-col { text-align: right; flex-shrink: 0; }
        .shop-price-main {
            font-size: 14px; font-weight: 700; color: var(--text-primary);
            white-space: nowrap; display: flex; align-items: center; gap: 4px; justify-content: flex-end;
        }
        .shop-price-sub { font-size: 10px; color: var(--text-secondary); margin-top: 1px; }

        /* ── Crypto SVG icons ── */
        .icon-ton-svg, .icon-usdt-svg { width: 14px; height: 14px; display: inline-block; vertical-align: middle; flex-shrink: 0; }
        .icon-ton-svg-lg, .icon-usdt-svg-lg { width: 22px; height: 22px; display: inline-block; vertical-align: middle; flex-shrink: 0; }

        /* ── Payment method section ── */
        .shop-pay-section { padding: 0 16px 8px; }
        .shop-pay-title {
            font-size: 11px; font-weight: 700; color: var(--text-secondary);
            text-transform: uppercase; letter-spacing: 1px; margin: 12px 0 6px;
        }
        .shop-pay-option {
            background: var(--card-bg); border: 1px solid var(--card-border);
            border-radius: 12px; padding: 10px 14px;
            display: flex; align-items: center; gap: 10px;
            cursor: pointer; transition: border-color 0.2s; margin-bottom: 6px;
        }
        .shop-pay-option.pay-selected { border-color: rgba(59,130,246,0.6); }
        .shop-pay-icon {
            width: 28px; height: 28px; border-radius: 50%;
            display: flex; align-items: center; justify-content: center;
            background: rgba(255,255,255,0.04); flex-shrink: 0;
        }
        .shop-pay-name { font-size: 13px; font-weight: 600; color: var(--text-primary); }
        .shop-pay-desc { font-size: 10px; color: var(--text-secondary); }

        /* ── Fixed buy button (above bottom-nav) ── */
        .shop-buy-fixed {
            position: fixed; bottom: 80px; left: 0; right: 0;
            padding: 10px 16px 14px;
            background: linear-gradient(transparent, var(--bg) 30%);
            z-index: 99;
        }
        .shop-buy-main {
            width: 100%; padding: 13px; border-radius: 14px; border: none;
            font-size: 14px; font-weight: 700; cursor: pointer;
            color: #fff; text-align: center;
            display: flex; align-items: center; justify-content: center; gap: 5px;
            white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
        }
        .shop-buy-main.pay-ton { background: linear-gradient(135deg, #0098EA, #0077cc); box-shadow: 0 4px 14px rgba(0,152,234,0.3); }
        .shop-buy-main.pay-stars { background: linear-gradient(135deg, #f59e0b, #d97706); box-shadow: 0 4px 14px rgba(245,158,11,0.3); }
        .shop-buy-main.pay-usdt { background: linear-gradient(135deg, #26A17B, #1a8a68); box-shadow: 0 4px 14px rgba(38,161,123,0.3); }
        .shop-buy-main:active { transform: scale(0.98); }

        /* ── Unit price hint ── */
        .shop-unit {
            font-size: 10px;
            color: var(--text-tertiary);
            margin-top: 2px;
            text-align: right;
        }
        /* TON buy button */
        .shop-buy-btn.btn-ton {
            background: linear-gradient(135deg, #0ea5e9, #0284c7);
            box-shadow: 0 2px 8px rgba(14,165,233,0.25);
        }
        .shop-buy-btn.btn-ton-usdt {
            background: linear-gradient(135deg, #22c55e, #16a34a);
            box-shadow: 0 2px 8px rgba(34,197,94,0.25);
        }
        /* TON coin selector in shop card */
        .shop-coin-toggle {
            display: flex;
            gap: 4px;
            margin-bottom: 6px;
        }
        .shop-coin-btn {
            padding: 4px 10px;
            border: 1px solid var(--card-border);
            border-radius: 8px;
            font-size: 11px;
            font-weight: 600;
            cursor: pointer;
            background: transparent;
            color: var(--text-secondary);
            transition: all 0.15s;
        }
        .shop-coin-btn.active {
            border-color: #0ea5e9;
            color: #0ea5e9;
            background: rgba(14,165,233,0.1);
        }
        .shop-coin-btn.active.usdt {
            border-color: #22c55e;
            color: #22c55e;
            background: rgba(34,197,94,0.1);
        }
        /* TON payment pending modal */
        .ton-pending-overlay {
            position: fixed;
            inset: 0;
            background: rgba(0,0,0,0.6);
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 9999;
            backdrop-filter: blur(4px);
        }
        .ton-pending-box {
            background: var(--card-bg);
            border: 1px solid var(--card-border);
            border-radius: 20px;
            padding: 28px 24px;
            text-align: center;
            max-width: 300px;
            width: 90%;
        }
        .ton-pending-box .spinner {
            width: 40px;
            height: 40px;
            border: 3px solid var(--card-border);
            border-top-color: #0ea5e9;
            border-radius: 50%;
            animation: spin 0.8s linear infinite;
            margin: 0 auto 16px;
        }
        @keyframes spin { to { transform: rotate(360deg); } }
        .ton-pending-box h3 {
            font-size: 16px;
            font-weight: 700;
            margin: 0 0 8px;
            color: var(--text-primary);
        }
        .ton-pending-box p {
            font-size: 12px;
            color: var(--text-secondary);
            margin: 0 0 16px;
        }
        .ton-pending-box .btn-cancel {
            padding: 8px 20px;
            border: 1px solid var(--card-border);
            border-radius: 10px;
            background: transparent;
            color: var(--text-secondary);
            font-size: 13px;
            cursor: pointer;
        }
        .quick-buy-section {
            margin-top: 10px;
            background: linear-gradient(135deg, rgba(245,158,11,0.1), rgba(217,119,6,0.05));
            border: 1px solid rgba(245,158,11,0.2);
            border-radius: 12px;
            padding: 12px 16px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
        }
        .quick-buy-section .qb-text {
            font-size: 12px;
            color: #fbbf24;
            font-weight: 600;
            flex: 1;
            line-height: 1.3;
        }
        .quick-buy-btn {
            background: #f59e0b;
            color: var(--btn-on-accent);
            border: none;
            border-radius: 56px;
            padding: 8px 16px;
            font-size: 12px;
            font-weight: 700;
            cursor: pointer;
            white-space: nowrap;
            flex-shrink: 0;
        }

        /* Invite Milestones */
        #invite-milestone-track { position:relative; }
        .im-progress-bg {
            position:absolute; top:15px; left:16px; right:16px; height:4px;
            background:var(--subtle-bg-hover); border-radius:2px; z-index:0;
        }
        .im-progress-fill {
            height:100%; background:#0052ff; border-radius:2px;
            transition:width 0.4s ease;
        }
        .im-node {
            position:relative; z-index:1; display:flex; flex-direction:column;
            align-items:center; gap:4px; flex:1;
        }
        .im-dot {
            width:32px; height:32px; border-radius:50%; display:flex;
            align-items:center; justify-content:center; font-size:12px;
            font-weight:700; background:var(--surface-raised); color:var(--text-tertiary);
            border:2px solid var(--border); transition:all 0.3s;
        }
        .im-dot.im-reached { background:#0052ff; color:#fff; border-color:#0052ff; }
        .im-dot.im-claimable {
            background:#0052ff; color:#fff; border-color:#0052ff;
            animation:ctaPulse 2s infinite; cursor:pointer;
        }
        .im-dot.im-claimed { background:#22c55e; color:#fff; border-color:#22c55e; }
        .im-label { font-size:10px; color:var(--text-secondary); font-weight:600; white-space:nowrap; }
        .im-count { font-size:9px; color:var(--text-tertiary); }

        /* Onboarding Overlay */
        .onboarding-overlay {
            position:fixed; inset:0; z-index:3500;
            background:rgba(2,6,23,0.94);
            backdrop-filter:blur(20px); -webkit-backdrop-filter:blur(20px);
            display:none; flex-direction:column; align-items:center; justify-content:center;
            opacity:0; transition:opacity 0.4s; padding:24px;
        }
        .onboarding-overlay.active { display:flex; opacity:1; }
        .onboarding-card {
            text-align:center; max-width:340px; width:100%;
            animation:popIn 0.5s cubic-bezier(0.175,0.885,0.32,1.275) forwards;
        }
        .ob-icon { font-size:72px; margin-bottom:16px; }
        .ob-step-label {
            font-size:11px; font-weight:700; letter-spacing:1.5px;
            color:var(--primary); margin-bottom:8px; text-transform:uppercase;
        }
        .ob-title { font-size:22px; font-weight:800; margin:0 0 10px; color:#fff; line-height:1.3; }
        .ob-desc { font-size:14px; color:rgba(255,255,255,0.6); margin:0 0 32px; line-height:1.6; }
        .ob-dots { display:flex; justify-content:center; gap:8px; margin-bottom:24px; }
        .ob-dot {
            width:8px; height:8px; border-radius:50%;
            background:rgba(255,255,255,0.2); transition:all 0.3s;
        }
        .ob-dot.active { background:var(--primary); width:24px; border-radius:4px; }
        .ob-btn-row { display:flex; gap:12px; justify-content:center; }
        .ob-btn-next {
            background:var(--primary); color:#fff; border:none;
            padding:14px 48px; border-radius:56px;
            font-family:'Outfit',sans-serif; font-weight:700; font-size:15px;
            cursor:pointer; letter-spacing:0.3px;
            transition:transform 0.15s;
        }
        .ob-btn-next:active { transform:scale(0.96); }
        .ob-btn-skip {
            background:none; border:none; color:rgba(255,255,255,0.4);
            font-family:'Outfit',sans-serif; font-size:13px; font-weight:500;
            cursor:pointer; padding:14px 16px;
        }
        .ob-btn-skip:active { color:rgba(255,255,255,0.6); }

        /* ── World App Modal ── */
        .wa-modal-overlay { display:none; position:fixed; top:0; left:0; right:0; bottom:0; background:rgba(0,0,0,0.7); z-index:200; align-items:center; justify-content:center; }
        .wa-modal-overlay.active { display:flex; }
        .wa-modal-card { background:var(--card-bg); border-radius:16px; padding:24px; width:340px; max-width:90vw; text-align:center; position:relative; animation:waModalIn 0.25s ease-out; }
        @keyframes waModalIn { from { opacity:0; transform:translateY(20px); } to { opacity:1; transform:translateY(0); } }
        .wa-modal-card .wa-icon { font-size:48px; margin-bottom:12px; }
        .wa-modal-card .wa-icon img { width:56px; height:56px; }
        .wa-modal-card h3 { font-size:17px; margin-bottom:8px; color:var(--text-primary); }
        .wa-modal-card p { font-size:13px; color:var(--text-secondary); line-height:1.6; margin-bottom:16px; }
        .wa-modal-card .highlight { color:#3b82f6; font-weight:600; }
        .wa-btn-primary { display:block; width:100%; padding:12px; background:#3b82f6; color:white; border:none; border-radius:10px; font-size:15px; font-weight:600; cursor:pointer; margin-bottom:8px; font-family:inherit; }
        .wa-btn-primary:hover { background:#2563eb; }
        .wa-btn-primary.green { background:#10b981; }
        .wa-btn-primary.green:hover { background:#059669; }
        .wa-btn-secondary { display:block; width:100%; padding:10px; background:transparent; color:var(--text-tertiary); border:1px solid var(--border-color); border-radius:10px; font-size:13px; cursor:pointer; font-family:inherit; }
        .wa-btn-secondary:hover { color:var(--text-secondary); border-color:var(--text-tertiary); }
        .wa-checklist { text-align:left; margin:12px 0; }
        .wa-checklist div { display:flex; align-items:center; gap:8px; padding:6px 0; font-size:13px; color:var(--text-secondary); }
        .wa-checklist div .check { color:#10b981; }
        /* AdsGram Task 原生广告卡片 — 与 .product-card 风格对齐 */
        .adsgram-task-card {
            /* 注: SDK 内部会 max(40px, --adsgram-task-button-width) 强制列宽,
               所以 button-width 必须 >= 我们 slot 实际宽度, 否则溢出 */
            --adsgram-task-font-size: 14px;
            --adsgram-task-title-color: var(--text-primary);
            --adsgram-task-description-color: var(--text-secondary);
            --adsgram-task-icon-size: 40px;
            --adsgram-task-icon-border-radius: 10px;
            --adsgram-task-icon-title-gap: 10px;
            --adsgram-task-button-width: 92px;   /* 与 .btn-play 固定宽度对齐 */
            --adsgram-task-background: transparent;
            --adsgram-task-padding: 0;
            display: block;
            background: var(--card-bg);
            border: 1px solid var(--card-border);
            border-radius: 16px;
            padding: 14px 16px;
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
            color: var(--text-primary);
        }
        .adsgram-task-reward { color: #f59e0b; font-weight: 600; font-size: 11px; white-space: nowrap; }
        .adsgram-task-btn {
            --cta-grad: linear-gradient(135deg, #6366f1 0%, #4f46e5 42%, #0ea5e9 100%);
            --cta-cut: #4f46e5;
            position: relative;
            display: inline-flex; align-items: center; justify-content: center;
            gap: 6px;
            box-sizing: border-box;
            width: 100%;
            min-width: 0;
            height: 36px;
            padding: 0 12px;
            border-radius: 56px;
            font-family: 'Outfit', sans-serif;
            font-size: 12px; font-weight: 700;
            line-height: 1;
            color: #fff;
            background: var(--cta-grad);
            cursor: pointer;
            border: none;
            overflow: hidden;
            box-shadow: 0 4px 14px rgba(79, 70, 229, 0.35);
        }
        .adsgram-task-btn::before,
        .adsgram-task-btn::after {
            content: '';
            position: absolute;
            pointer-events: none;
            border-radius: 50%;
            background: radial-gradient(circle, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0.35) 35%, rgba(255,255,255,0) 70%);
        }
        .adsgram-task-btn::before { width: 10px; height: 10px; top: 3px; left: 9px; opacity: 0.9; }
        .adsgram-task-btn::after { width: 7px; height: 7px; right: 8px; bottom: 4px; opacity: 0.55; }
        .adsgram-task-btn .cta-label { position: relative; z-index: 1; white-space: nowrap; }
        .adsgram-task-btn .cta-ico {
            position: relative; z-index: 1;
            display: inline-flex; width: 14px; height: 14px; flex-shrink: 0; color: #fff;
        }
        .adsgram-task-btn .cta-ico svg { display: block; width: 14px; height: 14px; }
        .adsgram-task-claim {
            --cta-grad: linear-gradient(135deg,#22c55e,#16a34a);
            --cta-cut: #15803d;
            background: var(--cta-grad);
            animation: claimReadyPulse 1.6s infinite;
        }
        .adsgram-task-done {
            --cta-grad: linear-gradient(135deg, #475569, #64748b);
            --cta-cut: #334155;
            background: var(--cta-grad);
            color: #e2e8f0;
            box-shadow: none;
            cursor: default;
            animation: none;
        }
        .adsgram-task-done::before, .adsgram-task-done::after { opacity: 0.2; }
        #adsgram-task-wrap, .adsgram-task-wrap { margin-top: 4px; }
        .bitmedia-banner-slot {
            display: none;
            justify-content: center;
            align-items: center;
            margin: 10px 0 12px;
            min-height: 0;
        }
        .bitmedia-banner-slot.is-on { display: flex; min-height: 50px; }
        .bitmedia-banner-slot ins,
        .bitmedia-banner-slot iframe { max-width: 100%; }
        .bitmedia-banner-slot.bitmedia-in-modal {
            margin: 8px 12px;
            flex-shrink: 0;
        }
        .checkin-modal-body .bitmedia-banner-slot {
            margin: 12px 0 4px;
        }
        .bitmedia-banner-ph {
            width: 320px;
            max-width: 100%;
            height: 50px;
            border-radius: 8px;
            border: 1px dashed rgba(255,255,255,0.2);
            color: var(--text-tertiary, #64748b);
            font-size: 11px;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        /* 粘性卡：独立 product-card；按钮固定宽，禁止继承 .adsgram-task-btn 的 width:100% 拉满整卡 */
        .adsgram-task-sticky {
            display: none;
            align-items: center;
            gap: 10px;
            padding: 14px 16px;
            margin-top: 4px;
        }
        .adsgram-task-sticky .adsgram-task-sticky-btn,
        .adsgram-task-sticky .adsgram-task-btn {
            width: 92px;
            flex: 0 0 92px;
            max-width: 92px;
        }
        .adsgram-task-sticky-ico {
            width: 40px; height: 40px; border-radius: 10px; flex-shrink: 0;
            display: flex; align-items: center; justify-content: center;
            font-family: 'Outfit', sans-serif; font-size: 13px; font-weight: 800;
            letter-spacing: -0.02em; color: #fff;
            background: linear-gradient(135deg, #4f46e5 0%, #2563eb 55%, #0ea5e9 100%);
        }

        /* —— Raw 对比模式 (?adsgram_raw=1) ——
           不套外壳, 不填 slot → 完全使用 AdsGram 默认样式
           便于产品对比“自定义 vs 原生”哪个好看 */
        .adsgram-task-card.adsgram-task-raw {
            background: transparent;
            border: none;
            padding: 12px 4px;
            --adsgram-task-icon-size: 30px;
            --adsgram-task-icon-border-radius: 5px;
            --adsgram-task-button-width: 40px;
            --adsgram-task-icon-title-gap: 5px;
        }
        .wa-restore-bar { display:none; background:var(--card-bg); border:1px solid rgba(59,130,246,0.3); border-radius:12px; padding:12px 14px; cursor:pointer; margin-bottom:10px; }
        .wa-restore-bar:hover { border-color:rgba(59,130,246,0.6); }
        .wa-restore-bar.visible { display:flex; align-items:center; gap:10px; }
        .wa-restore-bar .restore-icon { font-size:20px; line-height:0; display:flex; align-items:center; }
        .wa-restore-bar .restore-text { flex:1; }
        .wa-restore-bar .restore-text .main { font-size:13px; font-weight:600; color:var(--text-primary); }
        .wa-restore-bar .restore-text .sub { font-size:11px; color:var(--text-tertiary); }
        .wa-restore-bar .restore-arrow { color:#3b82f6; font-size:16px; }

            @keyframes adLoadingFadeIn { from { opacity: 0 } to { opacity: 1 } }
            @keyframes adLoadingSpin { to { transform: rotate(360deg) } }
            @keyframes adLoadingPulse {
                0%, 100% { opacity: 0.35; transform: scale(0.9); }
                50%      { opacity: 1;    transform: scale(1.05); }
            }
            @keyframes adLoadingShimmer {
                0%   { background-position: -200% 0; }
                100% { background-position: 200% 0; }
            }
            #ad-loading-overlay .alo-card {
                position: relative;
                background: linear-gradient(180deg, rgba(30,41,59,0.95) 0%, rgba(15,23,42,0.98) 100%);
                border: 1px solid rgba(255,255,255,0.06);
                border-radius: 20px;
                padding: 32px 28px 26px;
                display: flex; flex-direction: column; align-items: center; gap: 16px;
                width: 300px;
                min-height: 220px;
                box-sizing: border-box;
                box-shadow: 0 24px 60px rgba(0,0,0,0.5), 0 0 0 1px rgba(59,130,246,0.08);
                overflow: hidden;
            }
            /* 顶部高光描边 */
            #ad-loading-overlay .alo-card::before {
                content: '';
                position: absolute;
                inset: 0 0 auto 0;
                height: 1px;
                background: linear-gradient(90deg, transparent 0%, rgba(59,130,246,0.5) 50%, transparent 100%);
            }
            #ad-loading-overlay .alo-spin-wrap {
                position: relative;
                width: 52px; height: 52px;
                display: flex; align-items: center; justify-content: center;
            }
            #ad-loading-overlay .alo-spin {
                width: 100%; height: 100%; border-radius: 50%;
                border: 3px solid rgba(255,255,255,0.08);
                border-top-color: #3b82f6;
                border-right-color: #60a5fa;
                animation: adLoadingSpin 0.9s cubic-bezier(0.65, 0, 0.35, 1) infinite;
            }
            #ad-loading-overlay .alo-spin-dot {
                position: absolute;
                width: 8px; height: 8px;
                border-radius: 50%;
                background: #3b82f6;
                box-shadow: 0 0 12px rgba(59,130,246,0.6);
                animation: adLoadingPulse 1.4s ease-in-out infinite;
            }
            #ad-loading-overlay .alo-title {
                color: #f8fafc; font-size: 16px; font-weight: 600;
                margin: 0; min-height: 22px;
                letter-spacing: -0.2px;
                text-align: center;
            }
            #ad-loading-overlay .alo-hint {
                color: #94a3b8; font-size: 13px; line-height: 1.5;
                margin: 0; text-align: center; min-height: 38px;
                max-width: 240px;
            }
            /* 底部进度条 (shimmer) */
            #ad-loading-overlay .alo-bar {
                width: 100%;
                height: 2px;
                background: rgba(255,255,255,0.05);
                border-radius: 2px;
                overflow: hidden;
                margin-top: 4px;
            }
            #ad-loading-overlay .alo-bar::after {
                content: '';
                display: block;
                width: 100%; height: 100%;
                background: linear-gradient(90deg, transparent 0%, #3b82f6 50%, transparent 100%);
                background-size: 200% 100%;
                animation: adLoadingShimmer 1.6s linear infinite;
            }
            #ad-loading-overlay .alo-tip {
                color: #64748b; font-size: 11px; line-height: 1.4;
                margin: 2px 0 0; text-align: center; min-height: 16px;
                font-style: italic;
            }
            /* 全屏广告 SDK 拉起中 — 保留背景 spinner，收起卡片 */
            #ad-loading-overlay.alo-backdrop-only {
                pointer-events: none;
                background: rgba(0, 0, 0, 0.42);
                backdrop-filter: blur(4px);
                -webkit-backdrop-filter: blur(4px);
            }
            #ad-loading-overlay.alo-backdrop-only .alo-card {
                background: transparent;
                border: none;
                box-shadow: none;
                padding: 0;
                min-height: auto;
                width: auto;
                gap: 0;
            }
            #ad-loading-overlay.alo-backdrop-only .alo-card::before { display: none; }
            #ad-loading-overlay.alo-backdrop-only .alo-spin-wrap,
            #ad-loading-overlay.alo-backdrop-only .alo-title,
            #ad-loading-overlay.alo-backdrop-only .alo-hint,
            #ad-loading-overlay.alo-backdrop-only .alo-bar,
            #ad-loading-overlay.alo-backdrop-only .alo-tip { display: none; }

/* ═══ newspin midnight-gold homepage (scoped) ═══ */
body.ns-casino {
    --ns-bg: #16122a;
    --ns-bg-deep: #100d1c;
    --ns-card: #1e1836;
    --ns-gold: #f5c542;
    --ns-gold-2: #e8b22e;
    --tg-theme-bg-color: #16122a;
    --tg-theme-text-color: #f6f1e3;
    --tg-theme-hint-color: #b3a48c;
    --primary: #f5c542;
    --primary-glow: rgba(245, 197, 66, 0.35);
    --card-bg: #1e1836;
    --card-border: rgba(245, 197, 66, 0.12);
    --modal-bg: #1e1836;
    --nav-bg: rgba(16, 13, 28, 0.94);
    --overlay-bg: rgba(10, 8, 18, 0.72);
    --input-bg: #100d1c;
    background: var(--ns-bg) !important;
    color: #f6f1e3;
    padding: 6px 10px 0;
}
body.ns-casino #app { gap: 8px; padding: 0; }
body.tab-spin-active.ns-casino #app {
    height: var(--tg-viewport-stable-height, 100dvh);
    overflow: hidden;
}
body.tab-spin-active.ns-casino .header { display: flex !important; }
body.ns-casino .header.ns-topbar {
    align-items: center;
    gap: 8px;
    padding: 2px 0 4px;
}
body.ns-casino .btn-settings.ns-lang {
    margin-left: 0;
    width: auto;
    min-width: 40px;
    height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(245,197,66,0.18);
    color: #f6f1e3;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.04em;
}
body.ns-casino .btn-settings.ns-lang:active { background: rgba(245,197,66,0.22); }
body.ns-casino .ns-lang #ns-lang-code { font-family: 'Outfit', sans-serif; }
body.ns-casino .avatar {
    width: 32px; height: 32px;
    border-width: 1.5px;
    border-color: #f5c542;
}
body.ns-casino .user-info { min-width: 0; flex: 1; }
body.ns-casino .user-info h1 {
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
body.ns-casino .user-info p {
    font-size: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
body.ns-casino .ns-resources {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}
body.ns-casino .ns-pill {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 4px 7px;
    border-radius: 999px;
    background: rgba(0,0,0,0.28);
    border: 1px solid rgba(245,197,66,0.16);
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}
body.ns-casino .ns-pill b { font-family: 'Outfit', sans-serif; font-size: 12px; }
body.ns-casino .ns-pill-tickets .ticket-holder { position: relative; }
body.ns-casino .settings-dropdown {
    left: auto;
    right: 12px;
    top: 52px;
    max-height: min(70vh, 440px);
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 3000;
    min-width: 210px;
    max-width: min(240px, calc(100vw - 16px));
}
body.ns-casino .settings-dropdown.open {
    display: flex;
    flex-direction: column;
}
body.ns-casino .settings-dropdown .lang-option {
    display: flex;
    width: 100%;
    flex: none;
    min-width: 0;
    justify-content: flex-start;
    gap: 8px;
    padding: 10px 14px;
    color: #f6f1e3;
    box-sizing: border-box;
    border-radius: 0;
    background: transparent;
}

body.ns-casino #view-spin .spin-header-row,
body.ns-casino #view-spin .spin-hud-tickets { display: none !important; }
body.ns-casino .spin-controls { display: none !important; }

body.ns-casino #view-spin .winners-marquee {
    position: relative;
    left: auto; right: auto; bottom: auto;
    visibility: visible;
    opacity: 1;
    width: 100%;
    max-width: none;
    height: 28px;
    margin: 0;
    border-radius: 8px;
    background: rgba(0,0,0,0.28);
    pointer-events: none;
}
body.ns-casino #view-spin .winners-marquee::before {
    background: linear-gradient(to right, #16122a, transparent);
}
body.ns-casino #view-spin .winners-marquee::after {
    background: linear-gradient(to left, #16122a, transparent);
}

body.ns-casino .spin-hud { margin-bottom: 0; gap: 0; }
body.ns-casino .spin-hud-qa.quick-actions {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;
    gap: 4px;
}
body.ns-casino .spin-hud-qa .qa-btn {
    padding: 4px 0 2px;
    gap: 2px;
    background: transparent;
}
body.ns-casino .spin-hud-qa .qa-icon {
    width: 36px; height: 36px;
    border-radius: 10px;
}
body.ns-casino .spin-hud-qa .qa-icon-wrap {
    width: 36px;
    height: 36px;
}
body.ns-casino .spin-hud-qa .qa-icon-wrap .qa-badge {
    top: -3px;
    right: -3px;
}
body.ns-casino .spin-hud-qa .qa-label {
    font-size: 9px;
    color: #d4c6a8;
    font-weight: 700;
}

body.ns-casino #view-spin .balance-card {
    background: rgba(0,0,0,0.22);
    border: 1px solid rgba(245,197,66,0.14);
    border-radius: 14px;
    padding: 10px 12px 8px;
    margin: 0;
}
body.ns-casino #view-spin .balance-actions,
body.ns-casino #view-spin .balance-label { display: none; }
body.ns-casino #view-spin .balance-row-top { margin-bottom: 6px; }
body.ns-casino #view-spin .balance-amount {
    font-size: 15px;
    font-weight: 800;
    color: #f6f1e3;
}
body.ns-casino #view-spin #wp-bar-wrap {
    background: rgba(255,255,255,0.1) !important;
    height: 8px !important;
    border-radius: 999px !important;
}
body.ns-casino #view-spin #wp-bar-fill {
    background: linear-gradient(90deg, #e8b22e, #f5c542) !important;
}

body.ns-casino .wheel {
    box-shadow: 0 0 0 6px rgba(245,197,66,0.12), 0 12px 32px rgba(0,0,0,0.4);
}
body.ns-casino .wheel-center {
    width: 28%;
    height: 28%;
    min-width: 64px;
    min-height: 64px;
    overflow: visible;
    background: transparent;
    border: none;
    box-shadow: none;
}
body.ns-casino .btn-spin.ns-wheel-spin {
    flex: none;
    width: 100%;
    height: 100%;
    min-width: 0;
    padding: 0 0 2px;
    border-radius: 50%;
    border: 2px solid #fff1b8;
    background: linear-gradient(180deg, #ffe89a 0%, #f5c542 42%, #c4921a 100%);
    color: #1a1230;
    font-size: 13px;
    letter-spacing: 0.08em;
    font-weight: 800;
    text-shadow: 0 1px 0 rgba(255,255,255,0.4);
    box-shadow:
        inset 0 3px 4px rgba(255,255,255,0.55),
        inset 0 -5px 8px rgba(120,70,0,0.38),
        0 1px 0 #fff6c8,
        0 8px 0 #7a5608,
        0 14px 18px rgba(0,0,0,0.45);
    transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
}
body.ns-casino .btn-spin.ns-wheel-spin.get-tickets {
    background: linear-gradient(180deg, #ffe89a 0%, #f5c542 42%, #c4921a 100%);
    color: #1a1230;
    font-size: 13px;
    letter-spacing: 0.08em;
    line-height: 1.05;
    white-space: nowrap;
    padding: 0 0 2px;
    animation: none;
}
body.ns-casino .btn-spin.ns-wheel-spin:active:not(:disabled) {
    transform: translateY(5px);
    box-shadow:
        inset 0 2px 3px rgba(255,255,255,0.35),
        inset 0 -3px 6px rgba(120,70,0,0.4),
        0 1px 0 #e8c86a,
        0 3px 0 #7a5608,
        0 6px 10px rgba(0,0,0,0.4);
}
body.ns-casino .btn-spin.ns-wheel-spin:disabled {
    background: linear-gradient(180deg, #e8d48a 0%, #d4b24a 48%, #b08620 100%);
    color: rgba(26, 18, 48, 0.55);
    cursor: default;
    filter: saturate(0.85);
}

body.ns-casino .ns-invite-strip {
    display: none;
}
body.tab-spin-active.ns-casino .ns-invite-strip {
    display: flex;
    align-items: center;
    gap: 10px;
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(8px + 56px + 8px + env(safe-area-inset-bottom, 0px));
    width: auto;
    max-width: 576px;
    margin: 0 auto;
    padding: 10px 12px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(245,197,66,0.16), rgba(0,0,0,0.22));
    border: 1px solid rgba(245,197,66,0.28);
    z-index: 95;
    box-sizing: border-box;
}
body.ns-casino .ns-invite-copy {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
body.ns-casino .ns-invite-copy strong {
    font-size: 12px;
    font-weight: 800;
    color: #f6f1e3;
}
body.ns-casino .ns-invite-copy span {
    font-size: 11px;
    color: #b3a48c;
}
body.ns-casino .ns-invite-cta {
    flex-shrink: 0;
    border: none;
    border-radius: 999px;
    padding: 8px 14px;
    background: linear-gradient(180deg, #f8d56a, #e8b22e);
    color: #1a1230;
    font-weight: 800;
    font-size: 12px;
    cursor: pointer;
}

body.ns-casino .bottom-nav.ns-island {
    left: 12px;
    right: 12px;
    bottom: calc(8px + env(safe-area-inset-bottom, 0px));
    width: auto;
    max-width: 576px;
    margin: 0 auto;
    padding: 8px 10px 10px;
    border-radius: 28px;
    border: 1px solid rgba(245,197,66,0.16);
    background: rgba(16, 13, 28, 0.94);
    box-shadow: 0 10px 28px rgba(0,0,0,0.4);
    justify-content: space-between;
    align-items: center;
}
body.ns-casino .bottom-nav.ns-island .nav-item { width: 56px; }
body.ns-casino .bottom-nav.ns-island .nav-item.active { color: #f5c542; }
body.ns-casino .bottom-nav.ns-island .nav-item.active .nav-icon { transform: none; }

body.ns-casino #checkin-modal.modal-backdrop {
    align-items: flex-end;
    justify-content: center;
    padding: 0;
    background: rgba(10, 8, 18, 0.62);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
body.ns-casino #checkin-modal .checkin-modal-sheet {
    width: 100%;
    max-width: 600px;
    max-height: min(88vh, 720px);
    margin: 0 auto;
    border-radius: 24px 24px 0 0;
    border: 1px solid rgba(245,197,66,0.16);
    border-bottom: none;
    background: linear-gradient(180deg, #241b42 0%, #1a1530 48%, #141022 100%);
    color: #f6f1e3;
    box-shadow: 0 -18px 40px rgba(0,0,0,0.4);
    animation: nsSheetUp 0.38s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    padding: 20px 16px calc(18px + env(safe-area-inset-bottom, 0px));
}
@keyframes nsSheetUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}
body.ns-casino .checkin-close {
    background: rgba(255,255,255,0.1);
    color: #f6f1e3;
}
body.ns-casino .checkin-hero {
    display: block;
    padding: 4px 40px 0;
    margin-bottom: 18px;
    text-align: center;
}
body.ns-casino .checkin-cal,
body.ns-casino #checkin-modal-sub,
body.ns-casino .checkin-day-icon { display: none !important; }
body.ns-casino .checkin-hero-text h3 {
    margin: 0;
    text-align: center;
    font-size: 18px;
    line-height: 1.25;
    color: #f6f1e3;
}
body.ns-casino .checkin-hero-text p { display: none !important; }
body.ns-casino .checkin-week {
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}
body.ns-casino .checkin-day {
    gap: 6px;
    padding: 10px 4px 9px;
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.08);
    box-shadow: none;
    color: #e8dcc4;
}
body.ns-casino .checkin-day-label,
body.ns-casino .checkin-day:not(.done):not(.today) .checkin-day-label {
    color: rgba(212, 198, 168, 0.78);
}
body.ns-casino .checkin-day-reward,
body.ns-casino .checkin-day:not(.done):not(.today) .checkin-day-reward {
    color: rgba(246, 241, 227, 0.88);
    font-weight: 800;
}
body.ns-casino .checkin-day.done,
body.ns-casino .checkin-day.today.done {
    background: rgba(255,255,255,0.035);
    border-color: rgba(255,255,255,0.05);
    box-shadow: none;
    transform: none;
    opacity: 0.5;
}
body.ns-casino .checkin-day.done .checkin-day-label,
body.ns-casino .checkin-day.today.done .checkin-day-label,
body.ns-casino .checkin-day.done .checkin-day-reward,
body.ns-casino .checkin-day.today.done .checkin-day-reward {
    color: rgba(179, 164, 140, 0.55);
}
body.ns-casino .checkin-day.today:not(.done) {
    background: linear-gradient(180deg, #3a2d18 0%, #2a2114 100%);
    border-color: #f5c542;
    box-shadow: 0 8px 20px rgba(245, 197, 66, 0.28);
    transform: translateY(-2px);
}
body.ns-casino .checkin-day.today:not(.done) .checkin-day-label {
    color: #ffe9a8;
    font-weight: 800;
}
body.ns-casino .checkin-day.today:not(.done) .checkin-day-reward {
    color: #fff6d6;
    font-weight: 800;
}
body.ns-casino .checkin-claim-btn {
    background: linear-gradient(180deg, #f8d56a, #e8b22e) !important;
    color: #1a1230 !important;
    border: none;
    border-radius: 999px;
    font-weight: 800;
}
body.ns-casino .checkin-claim-btn.claimed {
    background: rgba(255,255,255,0.1) !important;
    color: #d4c6a8 !important;
}
body.ns-casino .checkin-claim-btn.claimed .ci-claim-sub { color: #b3a48c; }
body.ns-casino .checkin-streak-info {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 8px auto 0 !important;
    font-size: 11px;
    font-weight: 500;
    color: rgba(179, 164, 140, 0.7);
    line-height: 1.3;
}
body.ns-casino .checkin-streak-info .ci-streak-n {
    color: rgba(245, 197, 66, 0.9);
    font-weight: 600;
}

body.ns-casino .ns-identity {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex: 1;
    cursor: pointer;
}
body.ns-casino .ns-pill-ico { color: #f5c542; display: block; }
body.ns-casino .ns-pill-ton { display: block; border-radius: 50%; }

body.ns-casino #view-spin.active {
    flex: 1 1 auto;
    height: auto;
    max-height: none;
    min-height: 0;
    overflow: hidden;
    padding-bottom: calc(128px + env(safe-area-inset-bottom, 0px));
    gap: 6px;
}
body.ns-casino #view-spin .wheel-area {
    flex: 1 1 auto;
    min-height: 220px;
    max-height: none;
    margin: 0;
    justify-content: center;
}
body.ns-casino #view-spin .wheel-container {
    max-width: none;
    max-height: none;
}

body.ns-casino #view-spin .winners-marquee {
    height: 26px;
    cursor: pointer;
    pointer-events: auto;
    overflow: hidden;
}
body.ns-casino #view-spin .winners-marquee::before,
body.ns-casino #view-spin .winners-marquee::after { display: none; }
body.ns-casino .marquee-track.ns-marquee-y {
    display: flex;
    flex-direction: column;
    gap: 0;
    width: 100%;
    white-space: nowrap;
    animation: ns-marquee-y 14s linear infinite;
}
body.ns-casino .marquee-track.ns-marquee-y .marquee-item {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 26px;
    flex-shrink: 0;
    font-size: 11px;
}
body.ns-casino .marquee-track.ns-marquee-y .mi-ago { opacity: 0.5; margin-left: 4px; }
@keyframes ns-marquee-y {
    0% { transform: translateY(0); }
    100% { transform: translateY(-50%); }
}

body.ns-casino #ns-news-modal.modal-backdrop {
    align-items: flex-end;
    justify-content: center;
    padding: 0;
    background: rgba(10, 8, 18, 0.62);
}
body.ns-casino .ns-news-sheet {
    width: 100%;
    max-width: 600px;
    max-height: min(72vh, 560px);
    margin: 0 auto;
    border-radius: 24px 24px 0 0;
    border: 1px solid rgba(245,197,66,0.16);
    border-bottom: none;
    background: linear-gradient(180deg, #241b42 0%, #1a1530 48%, #141022 100%);
    color: #f6f1e3;
    padding: 20px 16px calc(16px + env(safe-area-inset-bottom, 0px));
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: nsSheetUp 0.32s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
body.ns-casino .ns-news-title {
    margin: 0 36px 14px 0;
    font-size: 16px;
    font-weight: 800;
}
body.ns-casino .ns-news-list {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
body.ns-casino .ns-news-row {
    display: grid;
    grid-template-columns: 22px 1fr auto auto;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(255,255,255,0.05);
    font-size: 12px;
}
body.ns-casino .ns-news-name { font-weight: 700; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.ns-casino .ns-news-amt { color: #f5c542; font-weight: 800; }
body.ns-casino .ns-news-ago { color: #b3a48c; font-size: 10px; }
body.ns-casino .ns-news-empty { text-align: center; color: #b3a48c; padding: 24px 8px; }

body.ns-casino .ns-me-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 14px;
}
body.ns-casino .ns-me-bar-title {
    font-size: 16px;
    font-weight: 800;
    color: #f6f1e3;
}

body.ns-casino .spin-hud-qa .ns-qa-svg {
    color: #f5c542;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
body.ns-casino .spin-hud-qa .qa-icon.ns-qa-svg {
    background: rgba(0,0,0,0.28);
    border: 1px solid rgba(245,197,66,0.22);
    color: #f5c542;
}

body.ns-casino #view-spin .ns-wd-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}
body.ns-casino #view-spin .ns-wd-need {
    font-size: 12px;
    font-weight: 800;
    color: #f6f1e3;
    margin: 0;
    min-width: 0;
    flex: 1;
}
body.ns-casino #view-spin .ns-wd-cta {
    flex-shrink: 0;
    height: 28px;
    padding: 0 12px;
    border: none;
    border-radius: 999px;
    background: linear-gradient(180deg, #f8d56a, #e8b22e);
    color: #1a1230;
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 12px;
    cursor: pointer;
    box-shadow: 0 2px 0 #9a6b12;
}
body.ns-casino #view-spin .ns-wd-cta:active {
    transform: translateY(1px);
    box-shadow: 0 1px 0 #9a6b12;
}
body.ns-casino #view-spin .ns-wd-cta[hidden] { display: none !important; }
body.ns-casino #view-spin .ns-wd-row { display: none !important; }
body.ns-casino #view-spin .ns-wd-track {
    display: flex;
    align-items: center;
    gap: 8px;
}
body.ns-casino #view-spin .ns-wd-cur {
    font-size: 12px !important;
    font-weight: 800;
    flex-shrink: 0;
    min-width: 3.4em;
    color: #f6f1e3;
}
body.ns-casino #view-spin .ns-wd-cur .balance-unit { display: none; }
body.ns-casino #view-spin .ns-wd-min {
    flex-shrink: 0;
    font-size: 11px;
    font-weight: 700;
    color: #b3a48c;
}
body.ns-casino #view-spin #wp-text,
body.ns-casino #view-spin #fw-hint { display: none !important; }

body.ns-casino .wheel-container { --ns-wheel: 240px; }
body.ns-casino .seg-ton {
    width: clamp(14px, calc(var(--ns-wheel) * 0.055), 20px);
    height: clamp(14px, calc(var(--ns-wheel) * 0.055), 20px);
    display: block;
}
body.ns-casino .seg-emoji {
    font-size: clamp(16px, calc(var(--ns-wheel) * 0.072), 24px);
}
body.ns-casino .wheel-segment-label .seg-text {
    font-size: clamp(11px, calc(var(--ns-wheel) * 0.048), 16px);
    font-weight: 800;
    color: #fff6d6;
}

body.ns-casino .ns-invite-strip {
    margin: 0;
}
body.ns-casino .nav-icon-svg {
    display: inline-flex;
    color: inherit;
}
body.ns-casino #checkin-modal .checkin-modal-sheet {
    max-height: min(92vh, 780px);
    padding: 26px 18px calc(22px + env(safe-area-inset-bottom, 0px));
}
body.ns-casino .checkin-week { gap: 10px; }
body.ns-casino .checkin-day { padding: 14px 4px 12px; }

body.tab-wallet-active.ns-casino .header { display: none !important; }
body.ns-casino .ns-me-hero {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 4px 2px 6px;
}
body.ns-casino .ns-me-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 2px solid #f5c542;
    object-fit: cover;
    flex-shrink: 0;
}
body.ns-casino .ns-me-id { flex: 1; min-width: 0; }
body.ns-casino .ns-me-id h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 800;
    color: #f6f1e3;
}
body.ns-casino .ns-me-id p {
    margin: 3px 0 0;
    font-size: 12px;
    color: #b3a48c;
}
body.ns-casino .ns-me-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}
body.ns-casino .ns-me-stat {
    background: rgba(0,0,0,0.22);
    border: 1px solid rgba(245,197,66,0.14);
    border-radius: 12px;
    padding: 10px 6px 8px;
    text-align: center;
}
body.ns-casino .ns-me-stat b {
    display: block;
    font-size: 16px;
    font-weight: 800;
    color: #f6f1e3;
}
body.ns-casino .ns-me-stat span {
    font-size: 10px;
    color: #b3a48c;
    font-weight: 600;
}
body.ns-casino .wallet-balance-card.ns-me-cash {
    background: rgba(0,0,0,0.22);
    border: 1px solid rgba(245,197,66,0.16);
    border-radius: 16px;
    padding: 14px 14px 12px;
    gap: 10px;
}
body.ns-casino .wallet-balance-card[data-cur="ton"].ns-me-cash {
    background: rgba(0,0,0,0.22);
}
body.ns-casino .ns-me-cash-main {
    display: flex;
    align-items: center;
    gap: 12px;
}
body.ns-casino .ns-me-cash-info { flex: 1; min-width: 0; }
body.ns-casino .ns-me-cash .wallet-balance-label {
    letter-spacing: 0.04em;
    text-transform: none;
    font-size: 11px;
    font-weight: 700;
    color: #b3a48c;
}
body.ns-casino .ns-me-cash .wallet-balance-amount {
    font-size: 22px;
    margin-top: 2px;
    color: #f6f1e3;
}
body.ns-casino .ns-me-cash .wallet-balance-unit {
    font-size: 13px;
    color: #b3a48c;
}
body.ns-casino .ns-me-cash .wallet-btn-row {
    margin: 0;
    flex: 0 0 auto;
}
body.ns-casino .ns-me-cash .wallet-btn-primary,
body.ns-casino .ns-me-cash .wallet-btn-pending {
    flex: 0 0 auto;
    min-width: 108px;
    padding: 11px 16px;
    border-radius: 999px;
    font-size: 13px;
}
body.ns-casino .wallet-btn-primary {
    background: linear-gradient(180deg, #f8d56a, #e8b22e);
    color: #1a1230;
    box-shadow: none;
}
body.ns-casino .wallet-btn-primary.ready:not(:disabled) { animation: none; }
body.ns-casino .wallet-progress-bar-wrap { height: 5px; background: rgba(255,255,255,0.08); }
body.ns-casino .wallet-progress-bar-fill { background: #f5c542 !important; }
body.ns-casino .wallet-progress-text { color: #8a7d68; font-weight: 600; }
body.ns-casino .ns-me-eta {
    margin: 0;
    padding: 0 4px;
    font-size: 12px;
    font-weight: 600;
    color: #8a7d68;
    line-height: 1.45;
}
body.ns-casino .ns-me-addr {
    background: rgba(0,0,0,0.22);
    border: 1px solid rgba(245,197,66,0.12);
    border-radius: 14px;
    padding: 12px 14px;
}
body.ns-casino .ns-me-addr .wallet-section-title {
    letter-spacing: 0.04em;
    text-transform: none;
    font-size: 11px;
    color: #b3a48c;
    margin-bottom: 8px;
}
body.ns-casino .wallet-addr-cta-primary {
    background: linear-gradient(180deg, #f8d56a, #e8b22e);
    color: #1a1230;
    border-color: transparent;
    box-shadow: none;
}
body.ns-casino .wallet-addr-cta {
    border-color: rgba(245,197,66,0.2);
    background: rgba(0,0,0,0.18);
    color: #f6f1e3;
}
body.ns-casino .ns-me-payouts {
    background: rgba(0,0,0,0.22);
    border: 1px solid rgba(245,197,66,0.12);
    border-radius: 14px;
    overflow: hidden;
}
body.ns-casino .ns-me-payouts-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px 6px;
}
body.ns-casino .ns-me-payouts-head h4 {
    margin: 0;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #b3a48c;
}
body.ns-casino .ns-me-payouts-all {
    padding: 0;
    border: none;
    background: none;
    color: #f5c542;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    font-family: inherit;
}
body.ns-casino .ns-me-payouts-all:active { opacity: 0.7; }
body.ns-casino #wal-wd-preview-body { padding: 4px 10px 10px; }
body.ns-casino .wallet-wd-preview-item {
    display: grid;
    grid-template-columns: 48px 1fr auto;
    align-items: center;
    gap: 8px;
    padding: 10px 8px;
    margin: 0;
    border-radius: 10px;
    background: transparent;
    border-bottom: 1px solid rgba(245,197,66,0.1);
}
body.ns-casino .wallet-wd-preview-item:last-child { border-bottom: none; }
body.ns-casino .wallet-wd-preview-date { color: #8a7d68; font-size: 11px; }
body.ns-casino .wallet-wd-preview-amount { color: #f6f1e3; font-weight: 700; }
body.ns-casino .wallet-wd-preview-empty {
    color: #8a7d68;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    padding: 18px 8px 12px;
}
body.ns-casino .ns-me-menu {
    display: flex;
    flex-direction: column;
    background: rgba(0,0,0,0.22);
    border: 1px solid rgba(245,197,66,0.12);
    border-radius: 14px;
    overflow: hidden;
}
body.ns-casino .ns-me-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 14px 16px;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    color: #f6f1e3;
    font-size: 14px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
}
body.ns-casino .ns-me-menu-item:last-child { border-bottom: none; }

body.ns-casino #view-spin .winners-marquee.ns-mq-tap {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 30px;
    padding: 0 8px 0 10px;
    border: 1px solid rgba(245,197,66,0.28);
    cursor: pointer;
    pointer-events: auto;
}
body.ns-casino .ns-mq-live {
    flex-shrink: 0;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: #1a1230;
    background: #f5c542;
    border-radius: 4px;
    padding: 2px 5px;
    line-height: 1.2;
}
body.ns-casino .ns-mq-chevron {
    flex-shrink: 0;
    color: #f5c542;
    display: inline-flex;
}
body.ns-casino .ns-mq-tap .marquee-track.ns-marquee-y {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}
body.ns-casino .ns-news-list { max-height: min(52vh, 420px); }

body.ns-casino .wheel-stage {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
body.ns-casino .ns-wheel-ornament {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    pointer-events: none;
    background: repeating-conic-gradient(from 6deg, #ffe89a 0 6deg, transparent 6.2deg 18deg);
    -webkit-mask: radial-gradient(circle, transparent 67%, #000 68%, #000 74%, transparent 75%);
            mask: radial-gradient(circle, transparent 67%, #000 68%, #000 74%, transparent 75%);
    filter: drop-shadow(0 0 8px rgba(245,197,66,0.4));
}
body.ns-casino .wheel-stage::before {
    content: '';
    position: absolute;
    inset: 7px;
    border-radius: 50%;
    border: 3px solid #c4921a;
    box-shadow: inset 0 0 0 3px #2a2114, 0 0 0 2px #120f1e, 0 12px 28px rgba(0,0,0,0.45);
    pointer-events: none;
    z-index: 1;
}
body.ns-casino .ns-wheel-pin {
    top: -8px;
    font-size: 0;
    line-height: 0;
    z-index: 12;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.5));
}
body.ns-casino .wheel-center {
    width: 34%;
    height: 34%;
    min-width: 86px;
    min-height: 86px;
    z-index: 8;
}
body.ns-casino .btn-spin.ns-wheel-spin {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    line-height: 1.05;
    white-space: nowrap;
}
body.ns-casino .ns-spin-main {
    font-size: clamp(15px, calc(var(--ns-wheel) * 0.062), 22px);
    font-weight: 800;
    letter-spacing: 0.06em;
}
body.ns-casino .ns-spin-cost {
    font-size: clamp(10px, calc(var(--ns-wheel) * 0.038), 14px);
    font-weight: 700;
    color: #6b4a12;
    letter-spacing: 0.02em;
}
body.ns-casino .btn-spin.ns-wheel-spin.get-tickets .ns-spin-main {
    font-size: clamp(15px, calc(var(--ns-wheel) * 0.062), 22px);
    letter-spacing: 0.06em;
}

body.ns-casino .bottom-nav.ns-island {
    padding: 8px 10px 10px;
    z-index: 100;
}
body.ns-casino #spin-currency-tabs,
body.ns-casino #wal-currency-tabs { display: none !important; }

/* ── Quests / Rules / Log sheets ── */
body.ns-casino #mission-modal.modal-backdrop,
body.ns-casino #hiw-modal.modal-backdrop,
body.ns-casino #history-modal.modal-backdrop {
    align-items: flex-end;
    justify-content: center;
    padding: 0;
    background: rgba(10, 8, 18, 0.62);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
body.ns-casino .ns-sheet {
    position: relative;
    width: 100%;
    max-width: 600px;
    max-height: min(84vh, 680px);
    margin: 0 auto;
    border-radius: 24px 24px 0 0;
    border: 1px solid rgba(245,197,66,0.16);
    border-bottom: none;
    background: linear-gradient(180deg, #241b42 0%, #1a1530 48%, #141022 100%);
    color: #f6f1e3;
    padding: 20px 16px calc(16px + env(safe-area-inset-bottom, 0px));
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 -18px 40px rgba(0,0,0,0.4);
    animation: nsSheetUp 0.34s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
body.ns-casino .ns-sheet-title {
    margin: 0 40px 14px 0;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #f6f1e3;
}
body.ns-casino .ns-sheet-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0 0 4px;
}
body.ns-casino .ns-quest-sheet .mission-section-title {
    margin: 14px 2px 8px;
    color: #b3a48c;
    font-size: 11px;
    letter-spacing: 0.08em;
}
body.ns-casino .ns-quest-sheet .mission-row {
    background: rgba(0,0,0,0.22);
    border: 1px solid rgba(245,197,66,0.12);
    border-radius: 14px;
    margin-bottom: 8px;
    padding: 12px;
}
body.ns-casino .ns-quest-sheet .mission-row-title { color: #f6f1e3; }
body.ns-casino .ns-quest-sheet .mission-row-sub { color: #b3a48c; }
body.ns-casino .ns-quest-sheet .mission-row-btn.primary {
    --cta-cut: #c4921a;
    background: linear-gradient(180deg, #f8d56a, #e8b22e);
    color: #1a1230;
    box-shadow: none;
}
body.ns-casino .ns-quest-sheet .mission-row-btn.primary::before,
body.ns-casino .ns-quest-sheet .mission-row-btn.primary::after { display: none; }
body.ns-casino .ns-quest-sheet .mission-row-btn.locked {
    background: rgba(255,255,255,0.06);
    color: #8a7d68;
    border-radius: 12px;
}
body.ns-casino .ns-quest-sheet .mission-row-btn.done {
    background: rgba(245,197,66,0.16);
    color: #f5c542;
    box-shadow: none;
}
body.ns-casino .ns-rules-sheet .hiw-steps { gap: 8px; }
body.ns-casino .ns-rules-sheet .hiw-step {
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(0,0,0,0.22);
    border: 1px solid rgba(245,197,66,0.12);
    border-radius: 14px;
}
body.ns-casino .ns-rules-sheet .hiw-step.last { padding: 12px; }
body.ns-casino .ns-rules-sheet .hiw-line { display: none; }
body.ns-casino .ns-rules-sheet .hiw-num {
    width: 28px;
    height: 28px;
    background: rgba(245,197,66,0.16) !important;
    color: #f5c542 !important;
    box-shadow: none !important;
    border: 1px solid rgba(245,197,66,0.32);
    font-size: 13px;
}
body.ns-casino .ns-rules-sheet .hiw-text { padding-top: 0; }
body.ns-casino .ns-rules-sheet .hiw-text b { color: #f6f1e3; font-size: 14px; }
body.ns-casino .ns-rules-sheet .hiw-text > span { color: #b3a48c; }
body.ns-casino .ns-rules-sheet #hiw-tps2,
body.ns-casino .ns-rules-sheet #hiw-wt { color: #f5c542; font-weight: 800; }
body.ns-casino .ns-rules-sheet .hiw-bonus {
    margin-top: 10px;
    background: rgba(245,197,66,0.08);
    border: 1px solid rgba(245,197,66,0.16);
}
body.ns-casino .ns-rules-sheet .hiw-bonus-icon {
    background: rgba(245,197,66,0.14) !important;
}
body.ns-casino .ns-rules-sheet .hiw-bonus-text { color: #f6f1e3; }
body.ns-casino .ns-log-sheet .history-date-label {
    color: #b3a48c;
    border-bottom-color: rgba(245,197,66,0.12);
}
body.ns-casino .ns-log-sheet .history-item { border-bottom-color: rgba(255,255,255,0.05); }
body.ns-casino .ns-log-sheet .history-title { color: #f6f1e3; }
body.ns-casino .ns-log-sheet .history-sub { color: #8a7d68; }
body.ns-casino .ns-log-sheet .history-icon.earn { background: rgba(245,197,66,0.14); }
body.ns-casino .ns-log-sheet .history-icon.spend { background: rgba(245,197,66,0.1); }
body.ns-casino .ns-log-sheet .history-icon.reward { background: rgba(245,197,66,0.14); }
body.ns-casino .ns-log-sheet .history-amount.positive { color: #f5c542; }
body.ns-casino .ns-log-sheet .history-amount.negative { color: #e8a0a0; }
body.ns-casino .ns-log-sheet .history-empty { color: #8a7d68; }
body.ns-casino .ns-log-sheet .history-body { padding: 0; }
body.ns-casino .boost-banner {
    background: linear-gradient(135deg, rgba(245,197,66,0.16), rgba(0,0,0,0.22));
    border: 1px solid rgba(245,197,66,0.28);
    color: #f6f1e3;
}
body.ns-casino .boost-banner .boost-title { color: #f5c542; }
body.ns-casino .boost-banner .boost-title #boost-count { color: #ffe89a; }
body.ns-casino .boost-banner .boost-sub { color: #b3a48c; }

body.ns-casino #ns-need-coins-modal.modal-backdrop {
    align-items: flex-end;
    justify-content: center;
    padding: 0;
    background: rgba(10, 8, 18, 0.62);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
body.ns-casino .ns-need-coins-sheet {
    max-height: none;
    padding: 28px 20px calc(22px + env(safe-area-inset-bottom, 0px));
    text-align: center;
}
body.ns-casino .ns-need-coins-sheet .ns-sheet-title {
    margin: 0 36px 10px;
    text-align: center;
}
body.ns-casino .ns-need-coins-desc {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #f6f1e3;
}
body.ns-casino .ns-need-coins-have {
    margin: 6px 0 18px;
    font-size: 13px;
    color: #b3a48c;
}
body.ns-casino .ns-need-coins-cta {
    width: 100%;
    height: 46px;
    border: none;
    border-radius: 14px;
    background: linear-gradient(180deg, #f8d56a, #e8b22e);
    color: #1a1230;
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 15px;
    cursor: pointer;
}

/* ── Spin result sheet ── */
body.ns-casino .spin-result-overlay {
    align-items: center;
    justify-content: center;
    padding: 12px 12px calc(12px + env(safe-area-inset-bottom, 0px));
    box-sizing: border-box;
    background: rgba(10, 8, 18, 0.72);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
body.ns-casino .spin-result-box {
    position: relative;
    box-sizing: border-box;
    width: 100%;
    max-width: min(360px, 100%);
    max-height: calc(100dvh - 24px - env(safe-area-inset-bottom, 0px));
    margin: 0 auto;
    padding: 16px 16px 14px;
    gap: 10px;
    overflow-x: hidden;
    overflow-y: auto;
    border-radius: 22px;
    border: 1px solid rgba(245,197,66,0.16);
    background: linear-gradient(180deg, #241b42 0%, #1a1530 48%, #141022 100%);
    box-shadow: 0 18px 40px rgba(0,0,0,0.45);
    animation: popIn 0.34s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
body.ns-casino .spin-result-box::before { display: none; }
body.ns-casino .spin-result-overlay .spin-result-emoji {
    width: 56px;
    height: 56px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    border-radius: 50%;
    background: radial-gradient(circle at 38% 28%, #3a3258, #1a1530 70%);
    border: 2px solid #f5c542;
    box-shadow: 0 3px 0 #8a6410, inset 0 2px 0 rgba(255,232,154,0.2);
    flex-shrink: 0;
}
body.ns-casino .spin-result-overlay .spin-result-emoji img {
    width: 32px !important;
    height: 32px !important;
    border-radius: 8px !important;
}
body.ns-casino .spin-result-overlay .spin-result-title {
    color: #f6f1e3;
    font-size: 22px;
    letter-spacing: -0.02em;
}
body.ns-casino .spin-result-overlay .spin-result-value {
    color: #b3a48c;
    margin: 0;
}
body.ns-casino .spin-result-overlay .spin-result-value.wld {
    color: #f5c542;
}
body.ns-casino .spin-invite-card,
body.ns-casino .spin-invite-card.almost {
    background: rgba(0,0,0,0.28);
    border: 1px solid rgba(245,197,66,0.18);
    border-radius: 16px;
    padding: 14px;
}
body.ns-casino .spin-result-overlay .spin-invite-txt h4 {
    color: #f6f1e3 !important;
    font-size: 14px;
}
body.ns-casino .spin-result-overlay .spin-invite-txt p {
    color: #b3a48c !important;
}
body.ns-casino .spin-invite-txt .reward-hl {
    color: #f5c542;
}
body.ns-casino .spin-invite-share,
body.ns-casino .spin-invite-card.almost .spin-invite-share {
    background: linear-gradient(180deg, #f8d56a, #e8b22e);
    color: #1a1230;
    font-weight: 800;
    border-radius: 12px;
    box-shadow: 0 3px 0 #9a6b12;
}
body.ns-casino .spin-invite-share:hover,
body.ns-casino .spin-invite-card.almost .spin-invite-share:hover {
    background: linear-gradient(180deg, #ffe89a, #f5c542);
}
body.ns-casino .spin-result-overlay .spin-invite-copy,
body.ns-casino .spin-result-overlay .spin-invite-card.almost .spin-invite-copy {
    background: rgba(245,197,66,0.12) !important;
    border: 1px solid rgba(245,197,66,0.35) !important;
    color: #f5c542 !important;
    border-radius: 12px;
    min-width: 46px;
}
body.ns-casino .spin-result-overlay .spin-invite-copy:hover {
    background: rgba(245,197,66,0.2) !important;
}
body.ns-casino .spin-result-overlay .spin-invite-copy img,
body.ns-casino .spin-result-overlay .spin-invite-card.almost .spin-invite-copy img {
    filter: none !important;
}
body.ns-casino .btn-spin-earn-more {
    background: linear-gradient(180deg, #f8d56a, #e8b22e);
    color: #1a1230;
    border-radius: 14px;
    font-weight: 800;
    box-shadow: 0 4px 0 #9a6b12;
}
body.ns-casino .btn-spin-earn-more:active {
    transform: translateY(3px);
    box-shadow: 0 1px 0 #9a6b12;
}
body.ns-casino .btn-spin-continue {
    background: transparent;
    color: #8a7d68;
    border: 1px solid rgba(245,197,66,0.18);
    border-radius: 14px;
}
body.ns-casino .btn-spin-continue:active {
    background: rgba(245,197,66,0.08);
    color: #f6f1e3;
}
body.ns-casino .btn-spin-ad-action {
    background: linear-gradient(180deg, #f8d56a, #e8b22e);
    color: #1a1230;
    box-shadow: 0 4px 0 #9a6b12;
}
body.ns-casino .btn-spin-ad-action:active {
    transform: translateY(3px);
    box-shadow: 0 1px 0 #9a6b12;
}
body.ns-casino .btn-spin-ad-action.loading,
body.ns-casino .btn-spin-ad-action.success {
    background: linear-gradient(180deg, #f8d56a, #e8b22e);
}
body.ns-casino #withdraw-modal .modal-content {
    background: linear-gradient(180deg, #241b42 0%, #1a1530 100%);
    border: 1px solid rgba(245,197,66,0.18);
}
body.ns-casino #withdraw-modal .modal-header h3 { color: #f6f1e3; }
body.ns-casino #withdraw-modal .withdraw-body { gap: 12px; }
body.ns-casino #withdraw-modal .withdraw-payout-label { display: none; }
body.ns-casino #withdraw-modal .withdraw-amount {
    color: #f6f1e3;
    padding: 4px 0 2px;
    font-size: 26px;
    font-weight: 800;
}
body.ns-casino #withdraw-modal .withdraw-amount small { color: #b3a48c; }
body.ns-casino #withdraw-modal .withdraw-input {
    background: rgba(0,0,0,0.28);
    border-color: rgba(245,197,66,0.18);
    color: #f6f1e3;
}
body.ns-casino #withdraw-modal .withdraw-input:focus { border-color: rgba(245,197,66,0.45); }
body.ns-casino #withdraw-modal .withdraw-note {
    font-size: 12px;
    font-weight: 500;
    color: #b3a48c;
    text-align: left;
    line-height: 1.5;
    margin: 0;
}
body.ns-casino #withdraw-modal .withdraw-note b {
    color: #f6f1e3;
    font-weight: 800;
}
body.ns-casino #withdraw-modal .withdraw-btn-row { gap: 10px; margin-top: 2px; }
body.ns-casino #withdraw-modal .withdraw-btn-row .btn-ton-connect,
body.ns-casino #withdraw-modal .withdraw-btn-row .btn-withdraw-submit {
    flex: 1 1 0;
    padding: 13px 10px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
    box-shadow: none;
}
body.ns-casino #withdraw-modal .withdraw-btn-row .btn-ton-connect {
    background: transparent;
    border: 1.5px solid rgba(245,197,66,0.42);
    color: #f6f1e3;
}
body.ns-casino #withdraw-modal .withdraw-btn-row .btn-withdraw-submit {
    background: linear-gradient(180deg, #f8d56a, #e8b22e);
    color: #1a1230;
    border: 1.5px solid transparent;
}

/* ── Tasks page ── */
body.ns-casino #view-earn {
    padding: 4px 2px 108px;
}
body.ns-casino #earn-section-tabs,
body.ns-casino #earn-tabs-bar,
body.ns-casino #view-earn .bitmedia-banner-slot { display: none !important; }
.ns-tasks-head { display: none; }
body.ns-casino .ns-tasks-head {
    display: block;
    margin: 4px 2px 14px;
}
body.ns-casino .ns-tasks-head h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #f6f1e3;
}
body.ns-casino .ns-tasks-head p {
    margin: 4px 0 0;
    font-size: 13px;
    font-weight: 600;
    color: #b3a48c;
}
body.ns-casino #view-earn .products-grid {
    gap: 8px;
}
body.ns-casino #view-earn .product-card,
body.ns-casino #view-earn .product-card.featured,
body.ns-casino #view-earn .product-card.ton-wallet-card,
body.ns-casino #view-earn .product-card.join-task-card,
body.ns-casino #view-earn .product-card.invite-task-card,
body.ns-casino #view-earn .product-card.homescreen-task-card,
body.ns-casino #view-earn .product-card.bind-bot-card,
body.ns-casino #view-earn .product-card.ad-watch-card {
    position: relative;
    align-items: center;
    gap: 10px;
    padding: 12px 12px 12px 14px;
    border-radius: 16px;
    border: 1px solid rgba(245,197,66,0.14);
    background: rgba(0,0,0,0.28);
    box-shadow: none;
    backdrop-filter: none;
}
body.ns-casino #view-earn .product-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    bottom: 10px;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: #f5c542;
}
body.ns-casino #view-earn .ns-task-ico {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(245,197,66,0.12);
    border: 1px solid rgba(245,197,66,0.28);
    color: #f5c542;
    font-size: 20px;
    overflow: hidden;
}
body.ns-casino #view-earn .ns-task-ico img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
body.ns-casino #view-earn .product-info { margin-right: 0; }
body.ns-casino #view-earn .product-info h3 {
    color: #f6f1e3;
    font-size: 14px;
    font-weight: 700;
    margin: 0 0 3px;
}
body.ns-casino #view-earn .product-info p {
    color: #f5c542;
    font-size: 12px;
    font-weight: 800;
}
body.ns-casino #view-earn .btn-play {
    --cta-grad: linear-gradient(180deg, #f8d56a, #e8b22e);
    --cta-cut: #1a1230;
    width: auto;
    min-width: 76px;
    height: 34px;
    border-radius: 12px;
    background: linear-gradient(180deg, #f8d56a, #e8b22e) !important;
    color: #1a1230 !important;
    box-shadow: 0 3px 0 #9a6b12 !important;
    font-weight: 800;
}
body.ns-casino #view-earn .btn-play::before,
body.ns-casino #view-earn .btn-play::after { display: none; }
body.ns-casino #view-earn .btn-play.btn-muted,
body.ns-casino #view-earn .btn-play.btn-claim-ready {
    background: rgba(245,197,66,0.16) !important;
    color: #f5c542 !important;
    box-shadow: none !important;
}
body.ns-casino #view-earn .completed-tasks-toggle {
    background: rgba(245,197,66,0.08) !important;
    border: 1px solid rgba(245,197,66,0.2) !important;
}
body.ns-casino #view-earn .completed-tasks-toggle span { color: #f5c542 !important; }
body.ns-casino #view-earn .ns-tasks-empty {
    text-align: center;
    padding: 48px 16px;
    color: #8a7d68;
    font-size: 14px;
    font-weight: 600;
}
body.ns-casino .featured-badge {
    color: #1a1230;
    background: #f5c542;
}

/* ── Invite page ── */
body.ns-casino #view-invite {
    padding: 4px 2px 108px;
}
body.ns-casino .ns-invite-head {
    margin: 4px 2px 16px;
}
body.ns-casino .ns-invite-head h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #f6f1e3;
}
body.ns-casino .ns-invite-head p {
    margin: 4px 0 0;
    font-size: 13px;
    font-weight: 600;
    color: #b3a48c;
}
body.ns-casino .ns-inv-board {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 14px;
}
body.ns-casino .ns-inv-rule {
    background: rgba(0,0,0,0.28);
    border: 1px solid rgba(245,197,66,0.16);
    border-radius: 16px;
    padding: 14px 12px 12px;
    text-align: center;
    min-width: 0;
}
body.ns-casino .ns-inv-rule b {
    display: block;
    font-family: 'Outfit', sans-serif;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #f5c542;
    line-height: 1.1;
}
body.ns-casino .ns-inv-rule span {
    display: block;
    margin-top: 6px;
    font-size: 11px;
    font-weight: 600;
    color: #b3a48c;
    line-height: 1.35;
}
body.ns-casino #view-invite .btn-invite-main {
    display: flex;
    width: 100%;
    min-height: 52px;
    margin: 0 0 10px;
    padding: 10px 16px;
    border-radius: 16px;
    border: none;
    background: linear-gradient(180deg, #f8d56a, #e8b22e);
    color: #1a1230;
    box-shadow: 0 4px 0 #9a6b12;
    text-align: center;
    justify-content: center;
    gap: 0;
}
body.ns-casino #view-invite .btn-invite-main:active {
    transform: translateY(3px);
    box-shadow: 0 1px 0 #9a6b12;
    opacity: 1;
}
body.ns-casino #view-invite .btn-invite-main .bim-copy {
    flex: none;
    padding: 0;
}
body.ns-casino #view-invite .btn-invite-main .bim-title {
    font-size: 16px;
    font-weight: 800;
    letter-spacing: 0.04em;
    color: #1a1230;
}
body.ns-casino #view-invite .btn-invite-main .bim-sub {
    font-size: 11px;
    font-weight: 700;
    opacity: 0.72;
    color: #1a1230;
}
body.ns-casino #view-invite .invite-share-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
    margin-bottom: 14px;
}
body.ns-casino #view-invite .invite-icon-btn {
    width: auto;
    height: auto;
    min-height: 64px;
    padding: 10px 6px 8px;
    border-radius: 14px;
    border: 1px solid rgba(245,197,66,0.16);
    background: rgba(0,0,0,0.28);
    box-shadow: none;
    gap: 6px;
    color: #f6f1e3;
}
body.ns-casino #view-invite .invite-icon-btn:active {
    background: rgba(245,197,66,0.12);
}
body.ns-casino #view-invite .invite-icon-btn.copied {
    border-color: rgba(245,197,66,0.45);
    background: rgba(245,197,66,0.16);
}
body.ns-casino #view-invite .invite-icon-btn .isb-disc {
    width: 28px;
    height: 28px;
    background: rgba(245,197,66,0.12);
    border: 1px solid rgba(245,197,66,0.28);
    color: #f5c542;
}
body.ns-casino #view-invite .invite-icon-btn .isb-disc svg,
body.ns-casino #view-invite .invite-icon-btn .isb-disc img {
    width: 14px;
    height: 14px;
}
body.ns-casino #view-invite .invite-icon-btn .isb-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #d4c6a8;
}
body.ns-casino #view-invite .invite-icon-btn img.invert-dark { filter: invert(1) sepia(1) saturate(4) hue-rotate(8deg); }
body.ns-casino #view-invite .invite-stats-bar {
    height: auto;
    min-height: 0;
    display: grid;
    grid-template-columns: 1fr 1px 1fr;
    align-items: stretch;
    padding: 16px 8px;
    margin-bottom: 14px;
    border-radius: 16px;
    border: 1px solid rgba(245,197,66,0.16);
    background: rgba(0,0,0,0.28);
    box-shadow: none;
}
body.ns-casino #view-invite .invite-stats-bar .iss-side {
    flex: none;
    flex-direction: column;
    gap: 4px;
    padding: 0 8px;
}
body.ns-casino #view-invite .invite-stats-bar .iss-val {
    font-family: 'Outfit', sans-serif;
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.04em;
    color: #f5c542;
    line-height: 1;
}
body.ns-casino #view-invite .invite-stats-bar .iss-label {
    font-size: 11px;
    font-weight: 700;
    color: #b3a48c;
    margin: 0;
}
body.ns-casino #view-invite .invite-stats-bar .iss-div {
    width: 1px;
    height: auto;
    align-self: stretch;
    margin: 4px 0;
    background: rgba(245,197,66,0.18);
}
body.ns-casino #view-invite .invite-tabs-card {
    margin: 0;
    border-radius: 16px;
    border: 1px solid rgba(245,197,66,0.14);
    background: rgba(0,0,0,0.22);
    box-shadow: none;
    overflow: hidden;
}
body.ns-casino #view-invite .invite-recent-head {
    padding: 14px 14px 8px;
}
body.ns-casino #view-invite .invite-recent-title {
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #b3a48c;
}
body.ns-casino #view-invite .invite-mission-btn {
    padding: 0;
    border: none;
    background: none;
    color: #f5c542;
    font-size: 12px;
    font-weight: 800;
}
body.ns-casino #view-invite .invite-mission-btn:active { background: none; opacity: 0.7; }
body.ns-casino #view-invite .invite-tab-body { padding: 4px 10px 10px; }
body.ns-casino #view-invite .ns-inv-empty {
    color: #8a7d68;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    padding: 22px 8px 16px;
}
body.ns-casino #view-invite .invite-ri-row {
    position: relative;
    grid-template-columns: 22px 30px minmax(0, 1fr) auto auto;
    padding: 10px 8px 10px 12px;
    border-radius: 12px;
}
body.ns-casino #view-invite .invite-ri-row + .invite-ri-row { border-top: none; margin-top: 4px; }
body.ns-casino #view-invite .invite-ri-row::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    bottom: 8px;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: #f5c542;
}
body.ns-casino #view-invite .invite-ri-num { color: #8a7d68; }
body.ns-casino #view-invite .invite-ri-name { color: #f6f1e3; font-weight: 600; }
body.ns-casino #view-invite .invite-ri-reward {
    color: #f5c542;
    font-weight: 800;
    background: rgba(245,197,66,0.12);
    border: 1px solid rgba(245,197,66,0.28);
    border-radius: 8px;
    padding: 2px 7px;
    font-size: 11px;
}
body.ns-casino #view-invite .invite-ri-ago { color: #8a7d68; }
body.ns-casino #view-invite .invite-lb-avatar,
body.ns-casino #view-invite .invite-lb-avatar.rank-avatar-fallback {
    border: 1px solid rgba(245,197,66,0.28);
}
body.ns-casino #view-invite .invite-lb-avatar.rank-avatar-fallback {
    background: linear-gradient(180deg, #f8d56a, #e8b22e);
    color: #1a1230;
}

/* ── Rank page ── */
body.ns-casino #view-rank {
    padding: 4px 2px 118px;
}
body.ns-casino .rank-header {
    text-align: left;
    padding: 4px 2px 0;
}
body.ns-casino .rank-title-row,
body.ns-casino .rank-laurel { display: none; }
body.ns-casino .rank-title {
    margin: 0;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #f6f1e3;
}
body.ns-casino .rank-period-pill {
    display: block;
    margin: 4px 0 14px;
    padding: 0;
    border: none;
    background: none;
    border-radius: 0;
    font-size: 13px;
    font-weight: 600;
    color: #b3a48c;
    line-height: 1.35;
}
body.ns-casino .rank-dims {
    gap: 0;
    padding: 3px;
    border-radius: 14px;
    border: 1px solid rgba(245,197,66,0.16);
    background: rgba(0,0,0,0.28);
}
body.ns-casino .rank-dim-btn {
    color: #b3a48c;
    font-size: 12px;
    font-weight: 800;
    padding: 9px 8px;
    border-radius: 11px;
    gap: 0;
}
body.ns-casino .rank-dim-btn .rank-dim-ico { display: none; }
body.ns-casino .rank-dim-btn.active {
    background: linear-gradient(180deg, #f8d56a, #e8b22e);
    color: #1a1230;
    box-shadow: 0 2px 0 #9a6b12;
}
body.ns-casino .rank-body { margin-top: 14px; }
body.ns-casino .rank-podium {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-areas: "p1 p1" "p2 p3";
    gap: 8px;
    min-height: 0;
    padding: 0;
    align-items: stretch;
}
body.ns-casino .rank-podium:has(.ns-rank-empty) {
    display: block;
}
body.ns-casino .ns-rank-empty {
    color: #8a7d68;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    padding: 36px 12px;
}
body.ns-casino .rank-pod-card {
    margin: 0 !important;
    padding: 12px;
    border-radius: 16px;
    border: 1px solid rgba(245,197,66,0.14);
    background: rgba(0,0,0,0.28);
    box-shadow: none;
}
body.ns-casino .rank-pod-1 {
    grid-area: p1;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding: 14px 14px 14px 12px;
    border-color: rgba(245,197,66,0.4);
    background: linear-gradient(135deg, rgba(245,197,66,0.18) 0%, rgba(0,0,0,0.28) 55%);
}
body.ns-casino .rank-pod-2 { grid-area: p2; }
body.ns-casino .rank-pod-3 { grid-area: p3; }
body.ns-casino .rank-pod-medal {
    width: 26px;
    height: 26px;
    margin: 0 0 8px;
    color: #1a1230;
    background: linear-gradient(180deg, #f8d56a, #e8b22e);
}
body.ns-casino .rank-pod-1 .rank-pod-medal {
    margin: 0;
    width: 28px;
    height: 28px;
    font-size: 13px;
}
body.ns-casino .rank-pod-2 .rank-pod-medal,
body.ns-casino .rank-pod-3 .rank-pod-medal {
    background: rgba(245,197,66,0.2);
    color: #f5c542;
}
body.ns-casino .rank-pod-avatar {
    width: 40px;
    height: 40px;
    margin: 0 0 8px;
    border: 1px solid rgba(245,197,66,0.28);
}
body.ns-casino .rank-pod-1 .rank-pod-avatar {
    width: 48px;
    height: 48px;
    margin: 0;
    border-color: #f5c542;
}
body.ns-casino .rank-pod-name {
    font-size: 12px;
    color: #f6f1e3;
    text-align: center;
}
body.ns-casino .rank-pod-1 .rank-pod-name {
    font-size: 15px;
    text-align: left;
    flex: 1;
    min-width: 0;
}
body.ns-casino .rank-pod-name.me { color: #f5c542; }
body.ns-casino .rank-pod-user { color: #8a7d68; text-align: center; }
body.ns-casino .rank-pod-1 .rank-pod-user { display: none; }
body.ns-casino .rank-pod-score {
    margin-top: 6px;
    font-size: 12px;
    font-weight: 800;
    color: #f5c542;
}
body.ns-casino .rank-pod-1 .rank-pod-score {
    margin: 0 0 0 auto;
    font-size: 14px;
    white-space: nowrap;
}
body.ns-casino .rank-list {
    margin-top: 10px;
    padding: 6px;
    border-radius: 16px;
    border: 1px solid rgba(245,197,66,0.14);
    background: rgba(0,0,0,0.22);
}
body.ns-casino .rank-row {
    position: relative;
    gap: 10px;
    padding: 11px 8px 11px 14px;
    border-bottom: none;
    border-radius: 12px;
}
body.ns-casino .rank-row + .rank-row { margin-top: 4px; }
body.ns-casino .rank-row::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    bottom: 8px;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: #f5c542;
}
body.ns-casino .rank-row.me {
    background: rgba(245,197,66,0.12);
    border: 1px solid rgba(245,197,66,0.28);
}
body.ns-casino .rank-row-num { color: #8a7d68; }
body.ns-casino .rank-row-name { color: #f6f1e3; }
body.ns-casino .rank-row.me .rank-row-name { color: #f5c542; }
body.ns-casino .rank-row-user { color: #8a7d68; }
body.ns-casino .rank-row-score { color: #f5c542; }
body.ns-casino .rank-row-avatar,
body.ns-casino .rank-my-avatar,
body.ns-casino .rank-avatar-fallback {
    border: 1px solid rgba(245,197,66,0.28);
}
body.ns-casino .rank-avatar-fallback {
    background: linear-gradient(180deg, #f8d56a, #e8b22e);
    color: #1a1230;
}
body.ns-casino .rank-my {
    position: sticky;
    bottom: calc(72px + env(safe-area-inset-bottom, 0px));
    z-index: 20;
    margin: 12px 0 0;
    padding: 10px 12px;
    border-radius: 16px;
    border: 1px solid rgba(245,197,66,0.4);
    background: rgba(22, 18, 42, 0.96);
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
body.ns-casino .rank-my .rank-row-num,
body.ns-casino .rank-my .rank-row-name { color: #f5c542; }
body.ns-casino .rank-my .rank-row-score { color: #f8d56a; font-weight: 800; }
body.ns-casino .rank-my .rank-row-user { color: #b3a48c; }
