/* ─── Wink — Liquid Glass ───────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --accent:   #5E8BFF;
    --accent2:  #9B6CFF;
    --grad:     linear-gradient(135deg, var(--accent), var(--accent2));
    --radius:   18px;

    --fg-rgb:   255,255,255;
    --fg:       #ffffff;
    --bg:       #06060f;
    --glass:    rgba(255,255,255,0.06);
    --glass-2:  rgba(255,255,255,0.04);
    --sheet:    rgba(20,20,32,0.85);
    --menu:     rgba(30,28,40,0.94);
    --hint:     rgba(255,255,255,0.5);
    --text:     #ffffff;

    /* отступ сверху: device safe-area + шапка Telegram (выставляется из app.js) */
    --tg-top:   env(safe-area-inset-top);

    --bg-mesh:
        radial-gradient(ellipse 60% 50% at 15% 5%, rgba(94,139,255,0.32), transparent 60%),
        radial-gradient(ellipse 55% 50% at 90% 25%, rgba(155,108,255,0.28), transparent 65%),
        radial-gradient(ellipse 60% 50% at 50% 95%, rgba(255,108,180,0.18), transparent 60%);
}

html.light {
    --fg-rgb:   27,29,39;
    --fg:       #1b1d27;
    --bg:       #eef1f8;
    --glass:    rgba(255,255,255,0.55);
    --glass-2:  rgba(255,255,255,0.4);
    --sheet:    rgba(250,250,254,0.9);
    --menu:     rgba(252,252,255,0.96);
    --hint:     rgba(27,29,39,0.5);
    --text:     #1b1d27;
    --bg-mesh:
        radial-gradient(ellipse 60% 50% at 15% 5%, rgba(94,139,255,0.22), transparent 60%),
        radial-gradient(ellipse 55% 50% at 90% 25%, rgba(155,108,255,0.18), transparent 65%),
        radial-gradient(ellipse 60% 50% at 50% 95%, rgba(255,108,180,0.12), transparent 60%);
}

html, body {
    height: 100%;
    background: var(--bg);
    color: var(--fg);
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
    font-size: 15px;
    line-height: 1.4;
    -webkit-font-smoothing: antialiased;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    inset: -40vh 0;
    background: var(--bg);
    background-image: var(--bg-mesh);
    background-size: 100% 100vh;
    background-position: center center;
    background-repeat: no-repeat;
    pointer-events: none;
    z-index: 0;
}

.bg-noise {
    position: fixed; inset: -40vh 0; pointer-events: none; opacity: 0.4; z-index: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.04 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.app-header, .hero, .ad-banner, .tabs, main { position: relative; z-index: 1; }
/* шапка/баланс/баннер остаются видны поверх оверлея техработ вкладки (z:100) */
.app-header, .hero, .ad-banner { z-index: 200; }

img[src="star.png"],
img[src^="ton-logo"],
img[src^="usdt-logo"],
img[src^="cryptobot-logo"],
img[src^="gift-logo"],
img[src^="fragment-logo"],
img[src^="history-logo"] { filter: drop-shadow(0 0 2px rgba(0,0,0,0.4)) drop-shadow(0 0 1px rgba(0,0,0,0.3)); }

.inline-star { height: 1em; width: auto; vertical-align: middle; position: relative; top: -1px; }
/* звезда в тексте: кегль строчных, оптически по верху и низу букв */
.sell-note .inline-star { height: 1.2em; top: 0; vertical-align: -0.3em; margin: 0 -0.42em; }
/* звезда в статистике: в рост цифр, вплотную */
.sell-stats b img { height: 1.5em !important; top: 0 !important; vertical-align: -0.39em !important; margin: 0 -0.55em !important; }

/* ─── Header ────────────────────────────────────────────────────── */
.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px 0;
    margin-top: calc(var(--tg-top) + 12px);
    position: relative;
    z-index: 50;
}

.brand {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    padding: 5px 11px 5px 12px;
    border-radius: 999px;
    background: var(--glass);
    border: 0.5px solid rgba(var(--fg-rgb),0.14);
    box-shadow: 0 1px 0 rgba(var(--fg-rgb),0.12) inset, 0 4px 14px rgba(0,0,0,0.22);
    transition: transform .14s;
}
.brand:active { transform: scale(.97); }
.brand-ava {
    width: 28px; height: 28px;
    border-radius: 8px;
    overflow: hidden;
    background: var(--grad);
    box-shadow: inset 0 1px 0 rgba(var(--fg-rgb),0.4), 0 2px 8px rgba(123,156,255,0.4);
    display: flex; align-items: center; justify-content: center;
}
.brand-ava img { width: 100%; height: 100%; object-fit: cover; display: block; }
.brand-ava img[src=""], .brand-ava img:not([src]) { display: none; }
.brand-name { font-size: 17px; font-weight: 700; letter-spacing: -0.3px; color: var(--fg); }
.brand-chev { color: var(--fg); opacity: 0.75; }
.header-left { display: flex; align-items: center; gap: 8px; }
.brand-premium {
    display: inline-flex; align-items: center; justify-content: center;
    width: 24px; height: 24px; padding: 0; border: none; cursor: pointer;
    font-size: 13px; line-height: 1; border-radius: 8px; font-family: inherit;
    background: var(--grad);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.3), 0 2px 6px rgba(94,139,255,0.4);
    -webkit-tap-highlight-color: transparent; transition: transform .15s;
}
.brand-premium:active { transform: scale(0.9); }
.brand-premium.hidden { display: none; }

/* Меню Wink Premium */
.prem-info-head { text-align: center; margin-bottom: 18px; }
.prem-info-ico {
    width: 56px; height: 56px; margin: 4px auto 10px; border-radius: 16px;
    display: flex; align-items: center; justify-content: center; font-size: 30px;
    background: var(--grad);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.3), 0 6px 18px rgba(94,139,255,0.45);
}
.prem-info-head h2 { margin: 0; }
.prem-info-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 18px; }
.prem-info-item { display: flex; align-items: center; gap: 12px; }
.prem-info-emoji {
    width: 38px; height: 38px; flex-shrink: 0; border-radius: 11px; font-size: 19px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(var(--fg-rgb),0.06); border: 0.5px solid rgba(var(--fg-rgb),0.1);
}
.prem-info-item > div { display: flex; flex-direction: column; line-height: 1.25; }
.prem-info-item b { font-size: 14.5px; font-weight: 700; color: var(--fg); }
.prem-info-item span { font-size: 12.5px; color: rgba(var(--fg-rgb),0.55); }

.wallet-cluster { position: relative; }

/* ─── Wallet button ─────────────────────────────────────────────── */
.wallet-btn-connect {
    cursor: pointer;
    padding: 6px 12px 6px 10px;
    border-radius: 999px;
    background: var(--glass);
    border: 0.5px solid rgba(var(--fg-rgb),0.18);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    box-shadow: inset 0 1px 0 rgba(var(--fg-rgb),0.18);
    transition: background .18s;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    color: var(--fg);
    white-space: nowrap;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}
.wallet-btn-connect:active { background: rgba(var(--fg-rgb),0.12); }
.wallet-btn-connect.wallet-connected { font-weight: 600; color: rgba(var(--fg-rgb),0.85); }
.wallet-addr { font-size: 12px; font-weight: 600; color: rgba(var(--fg-rgb),0.85); line-height: 1; }
.wallet-dots { display: flex; gap: 4px; align-items: center; }
.wallet-dot { width: 6px; height: 6px; border-radius: 50%; opacity: 0.9; box-shadow: 0 0 4px currentColor; }
.wallet-chev { color: var(--fg); opacity: 0.5; }

.wallet-menu {
    position: absolute;
    top: calc(100% + 6px); right: 0;
    min-width: 184px;
    border-radius: 14px;
    padding: 4px;
    z-index: 60;
    background: var(--menu);
    border: 0.5px solid rgba(var(--fg-rgb),0.12);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    box-shadow: 0 12px 32px rgba(0,0,0,0.45), inset 0 1px 0 rgba(var(--fg-rgb),0.08);
}
.wallet-menu.hidden { display: none; }
.wallet-menu-item {
    display: flex; align-items: center; gap: 8px;
    width: 100%; padding: 9px 10px; border-radius: 10px;
    border: none; background: transparent; cursor: pointer;
    font-size: 13px; color: rgba(var(--fg-rgb),0.9); font-family: inherit;
    transition: background .15s;
}
.wallet-menu-item:active { background: rgba(var(--fg-rgb),0.07); }
.wallet-menu-item.danger { color: #FF6B7A; }

/* ─── Hero balance ──────────────────────────────────────────────── */
.hero { padding: 10px 16px 0; position: relative; }
.hero-aurora { display: none; }
.hero-row {
    position: relative;
    border-radius: 22px;
    background: var(--glass);
    backdrop-filter: blur(28px) saturate(180%);
    -webkit-backdrop-filter: blur(28px) saturate(180%);
    border: 0.5px solid rgba(var(--fg-rgb),0.12);
    box-shadow: 0 1px 0 rgba(var(--fg-rgb),0.18) inset, 0 -1px 0 rgba(0,0,0,0.15) inset, 0 14px 40px rgba(0,0,0,0.32), 0 2px 6px rgba(0,0,0,0.18);
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    overflow: hidden;
}
.hero-row { display: flex; flex-direction: row; align-items: stretch; gap: 0; }
.hero-main { flex: 1 1 0; min-width: 0; position: relative; display: flex; padding-right: 14px; }
.hero-row::before {
    content: '';
    position: absolute; inset: 0; border-radius: 22px;
    background:
        radial-gradient(120% 120% at 28% 8%, rgba(94,139,255,0.22), transparent 60%),
        radial-gradient(120% 120% at 82% 92%, rgba(155,108,255,0.20), transparent 60%);
    pointer-events: none;
}
.hero-row::after {
    content: '';
    position: absolute; top: 0; left: 6%; right: 6%; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.55), transparent);
    pointer-events: none;
}
.hero-info { flex: 1; min-width: 0; position: relative; }
.hero-topup { width: 100%; margin-top: 10px; }
.hero-label {
    font-size: 10px; font-weight: 600; color: var(--hint);
    text-transform: uppercase; letter-spacing: 0.5px;
}
.hero-num-row { margin-top: 2px; line-height: 1; white-space: nowrap; height: 30px; display: flex; align-items: center; }
#hero-num {
    font-size: 25px; font-weight: 800; letter-spacing: -0.8px;
    font-variant-numeric: tabular-nums; line-height: 1; color: var(--fg);
}
/* inline+baseline надёжнее flex в Telegram WebView. Звезда крупнее цифр (оптика тонких лучей),
   поэтому центрируем её по вертикали относительно цифр: top опускает видимый центр звезды на середину cap-box */
.hero-star { height: 31px; width: auto; margin-left: -5px; display: block; position: relative; top: 2px; }
.hero-meta {
    display: flex; gap: 8px; margin-top: 3px; align-items: center;
    font-size: 11px; color: var(--hint); white-space: nowrap; flex-wrap: wrap;
}
.hero-held { display: inline-flex; align-items: center; }
.hero-held::before {
    content: ''; width: 2px; height: 2px; border-radius: 2px;
    background: rgba(var(--fg-rgb),0.3); margin-right: 8px;
}
.hero-held:empty { display: none; }
.hero-topup {
    position: relative;
    padding: 8px 14px; border-radius: 11px; border: none;
    background: var(--grad); color: #fff; font-weight: 700; font-size: 12px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.3), 0 4px 12px rgba(94,139,255,0.35);
    cursor: pointer; white-space: nowrap; flex-shrink: 0;
    font-family: inherit;
}
.hero-topup:active { opacity: .85; transform: scale(.97); }
/* GRAM — вторая строка внутри той же карточки баланса */
.hero-gram-line {
    flex: 1 1 0; min-width: 0; display: flex; position: relative;
    padding-left: 14px;
    border-left: 1px solid rgba(var(--fg-rgb),0.12);
}
.hero-gram-info { flex: 1; min-width: 0; }
.hero-gram-num-row { margin-top: 2px; line-height: 1; white-space: nowrap; height: 30px; display: flex; align-items: center; gap: 6px; }
.hero-gram-logo { width: 18px; height: 18px; border-radius: 5px; display: block; }
#gram-hero-num {
    font-size: 23px; font-weight: 800; letter-spacing: -0.6px;
    font-variant-numeric: tabular-nums; color: var(--fg);
}
#gram-topup-btn > * { pointer-events: none; }
.hero-topup-logo { width: 13px; height: 13px; border-radius: 4px; vertical-align: -2px; margin-left: 1px; }
.hero-topup-ghost {
    padding: 8px 11px; font-size: 11px; border-radius: 11px;
    background: rgba(var(--fg-rgb),0.09); color: var(--fg);
    border: 0.5px solid rgba(var(--fg-rgb),0.12);
    box-shadow: none;
}

/* ─── Ad banner ─────────────────────────────────────────────────── */
.ad-banner { margin: 14px 16px 0; border-radius: 18px; overflow: hidden; position: relative; height: 96px; }
.ad-track {
    display: flex; height: 100%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    scroll-behavior: smooth;
}
.ad-track::-webkit-scrollbar { display: none; }
.ad-slide {
    position: relative;
    flex: 0 0 100%;
    scroll-snap-align: start;
    height: 96px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    background: linear-gradient(135deg, #5E8BFF 0%, #9B6CFF 50%, #FF6B9D 100%);
    border-radius: 18px;
    overflow: hidden;
}
.ad-slide::after {
    content: '';
    position: absolute; inset: 0;
    border-radius: 18px;
    border: 0.5px solid rgba(255,255,255,0.18);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.22), inset 0 -1px 0 rgba(0,0,0,0.2);
    pointer-events: none;
}
.ad-slide[data-url], .ad-slide[data-tab] { cursor: pointer; }
.ad-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ad-slide-text { flex-direction: column; align-items: flex-start; justify-content: center; padding: 12px 16px; }
.ad-content { display: flex; flex-direction: column; gap: 5px; position: relative; z-index: 2; max-width: 78%; }
.ad-title { font-size: 15px; font-weight: 800; color: #fff; letter-spacing: -0.3px; text-shadow: 0 1px 8px rgba(0,0,0,0.4); }
.ad-desc { font-size: 11px; font-weight: 500; color: rgba(255,255,255,0.88); line-height: 1.35; text-shadow: 0 1px 4px rgba(0,0,0,0.35); }
.ad-dots { display: flex; justify-content: center; gap: 4px; position: absolute; bottom: 7px; left: 0; right: 0; pointer-events: none; z-index: 5; }
.ad-dot { width: 4px; height: 4px; border-radius: 2px; background: rgba(255,255,255,0.4); transition: all .3s cubic-bezier(0.32,0.72,0,1); }
.ad-dot.active { width: 14px; background: #fff; box-shadow: 0 0 6px rgba(255,255,255,0.6); }
.ad-cta { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); z-index: 3; display: inline-flex; align-items: center; gap: 4px; padding: 6px 12px; border-radius: 999px; background: rgba(255,255,255,0.95); color: #1a1a2e; font-size: 12px; font-weight: 700; white-space: nowrap; box-shadow: inset 0 1px 0 rgba(255,255,255,0.9), 0 2px 8px rgba(0,0,0,0.22); }
.ad-slide[data-url] .ad-content { max-width: 62%; }
.ad-sparkles { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.ad-sparkles span { position: absolute; width: 3px; height: 3px; border-radius: 2px; background: #fff; opacity: 0; box-shadow: 0 0 6px rgba(255,255,255,0.9); animation: ad-sparkle 3s ease-in-out infinite; }
@keyframes ad-sparkle { 0%,100% { opacity: 0; transform: scale(0.5); } 50% { opacity: 0.85; transform: scale(1.4); } }

/* ─── Tabs (segmented glass pill) ───────────────────────────────── */
.tabs {
    display: flex;
    gap: 2px;
    margin: 14px 16px 8px;
    padding: 4px;
    border-radius: 16px;
    background: var(--glass);
    backdrop-filter: blur(28px) saturate(180%);
    -webkit-backdrop-filter: blur(28px) saturate(180%);
    border: 0.5px solid rgba(var(--fg-rgb),0.12);
    box-shadow: inset 0 1px 0 rgba(var(--fg-rgb),0.14), 0 8px 24px rgba(0,0,0,0.22);
    position: sticky;
    top: calc(var(--tg-top) + 6px);
    z-index: 300;
}
.tab {
    flex: 1;
    padding: 9px 0;
    border-radius: 13px;
    border: none;
    background: transparent;
    color: rgba(var(--fg-rgb),0.6);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    font-family: inherit;
    -webkit-tap-highlight-color: transparent;
}
.tab.active {
    background: var(--grad);
    color: #fff;
    box-shadow: 0 4px 12px rgba(94,139,255,0.35), inset 0 1px 0 rgba(255,255,255,0.25);
}
.tab-ico { height: 1.2em; width: auto; vertical-align: -0.22em; margin-right: -3px; }
.tab-ico-frag { height: 1.5em; vertical-align: -0.4em; margin-right: -4px; }

/* ─── Sections ──────────────────────────────────────────────────── */
main { padding: 6px 16px calc(40px + env(safe-area-inset-bottom)); }
.tab-content { display: none; position: relative; }
.tab-content.active { display: block; }

.section-head { display: flex; justify-content: space-between; align-items: baseline; margin: 10px 4px 12px; }
.section-title { font-size: 17px; font-weight: 700; letter-spacing: -0.3px; }
.section-count { font-size: 12px; color: rgba(var(--fg-rgb),0.45); }

/* ─── Glass card base ───────────────────────────────────────────── */
.gift-card, .shop-card, .history-item, .checks-toggle-btn, .check-item, .frag-card,
.frag-price-row, .recipient-wrap, .recipient-chip, .anon-row,
.amount-btn, .custom-amount-row input, .form-group input, .form-group textarea,
.frag-cb-currency, .settings-group {
    background: var(--glass);
    backdrop-filter: blur(28px) saturate(180%);
    -webkit-backdrop-filter: blur(28px) saturate(180%);
    border: 0.5px solid rgba(var(--fg-rgb),0.12);
    box-shadow: inset 0 1px 0 rgba(var(--fg-rgb),0.14), 0 8px 24px rgba(0,0,0,0.18);
}

/* ─── Buttons ───────────────────────────────────────────────────── */
.btn-primary {
    background: var(--grad);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: opacity .15s, transform .1s;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.3), 0 8px 22px rgba(94,139,255,0.35);
}
.btn-primary:active { opacity: .85; transform: scale(.98); }
.btn-primary:disabled { opacity: .4; cursor: default; box-shadow: none; }
.btn-full { width: 100%; padding: 15px; font-size: 15px; border-radius: 16px; margin-top: 6px; }

/* ─── Gift grid ─────────────────────────────────────────────────── */
.gifts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.gift-card {
    border-radius: 22px;
    padding: 0;
    text-align: center;
    cursor: pointer;
    transition: transform .14s;
    user-select: none;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.gift-card:active { transform: scale(.96); }
.gift-sticker { width: 88px; height: 88px; object-fit: contain; margin: 18px auto 8px; display: block; }
.gift-name { font-size: 12.5px; font-weight: 600; color: rgba(var(--fg-rgb),0.9); padding: 0 12px 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gift-card-foot {
    margin-top: auto;
    padding: 10px 14px;
    background: var(--glass-2);
    border-top: 0.5px solid rgba(var(--fg-rgb),0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.gift-price { display: inline-block; white-space: nowrap; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--fg); }
/* inline+baseline (как у баланса); top центрирует видимую звезду по середине цифр */
.gift-price img { height: 1.4em; width: auto; margin-left: -2px; vertical-align: baseline; position: relative; top: 5px; }
.gift-pick { padding: 5px 11px; border-radius: 9px; background: var(--grad); font-size: 11px; font-weight: 700; color: #fff; box-shadow: 0 2px 8px rgba(94,139,255,0.35), inset 0 1px 0 rgba(255,255,255,0.25); }
.discount-badge {
    position: absolute; top: 10px; right: 10px; z-index: 2;
    padding: 3px 7px; border-radius: 7px; font-size: 10.5px; font-weight: 800;
    background: rgba(255,80,90,0.18); color: #FF6B7A;
    border: 0.5px solid rgba(255,80,90,0.45);
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    box-shadow: inset 0 1px 0 rgba(var(--fg-rgb),0.15);
    letter-spacing: 0.3px; line-height: 1;
}

/* ─── Checks ────────────────────────────────────────────────────── */
.checks-toggle-btn {
    width: 100%; border-radius: 16px; padding: 12px 16px;
    font-size: 14px; font-weight: 600; color: var(--fg);
    text-align: left; cursor: pointer; margin: 4px 0 0;
    display: flex; align-items: center; justify-content: space-between;
    transition: opacity .15s; font-family: inherit;
}
.checks-toggle-btn:active { opacity: .75; }
.checks-toggle-btn::after { content: '▸'; color: var(--hint); transition: transform .2s; font-size: 20px; line-height: 1; }
.checks-toggle-btn.checks-open::after { transform: rotate(90deg); }
#checks-list { margin-top: 8px; }
.check-item { display: flex; align-items: center; gap: 10px; border-radius: 16px; padding: 10px 12px; margin-bottom: 8px; }
.check-icon { width: 40px; height: 40px; object-fit: contain; }
.check-info { flex: 1; min-width: 0; }
.check-name { font-size: 14px; font-weight: 600; }
.check-sub { font-size: 12px; color: var(--hint); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.check-right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.check-price { font-size: 13px; font-weight: 600; color: var(--accent); white-space: nowrap; }
.check-cancel-btn { font-size: 11px; color: #ff453a; background: none; border: none; padding: 0; cursor: pointer; opacity: .75; font-family: inherit; }

/* ─── History ───────────────────────────────────────────────────── */
.history-list { display: flex; flex-direction: column; gap: 8px; }
.history-item { border-radius: 16px; padding: 12px 14px; }
.hi-gift { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.hi-icon { width: 28px !important; height: 28px !important; max-width: 28px !important; max-height: 28px !important; object-fit: contain; flex-shrink: 0; }
.hi-to { font-size: 12.5px; color: var(--accent); margin-bottom: 3px; }
.hi-msg { font-size: 12.5px; color: var(--hint); font-style: italic; margin-bottom: 4px; }
.hi-date { font-size: 11px; color: var(--hint); }
.hi-topup { border-left: 3px solid #FFD774; }
.hi-received { border-left: 3px solid var(--accent); }
.hi-premium { border-left: 3px solid var(--accent2); }
.hi-premium-icon { font-size: 18px; line-height: 1; }
.hi-topup-icon { font-size: 20px; line-height: 1; }
.hi-inline-badge { font-size: 11px; color: var(--hint); margin-bottom: 2px; }

.empty { text-align: center; color: var(--hint); padding: 48px 0; font-size: 15px; }
.loading { text-align: center; color: var(--hint); padding: 40px 0; }

/* ─── Overlay + sheet ───────────────────────────────────────────── */
.overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,.55);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    z-index: 1000;
    display: flex; align-items: flex-end;
}
.overlay.hidden { display: none; }
.sheet {
    width: 100%; max-height: 92vh; overflow-y: auto;
    border-radius: 28px 28px 0 0;
    background: var(--sheet);
    backdrop-filter: blur(40px) saturate(180%); -webkit-backdrop-filter: blur(40px) saturate(180%);
    border: 0.5px solid rgba(var(--fg-rgb),0.15);
    border-bottom: none;
    box-shadow: 0 -20px 50px rgba(0,0,0,0.5), inset 0 1px 0 rgba(var(--fg-rgb),0.18);
    padding: 8px 18px calc(32px + env(safe-area-inset-bottom));
}
.sheet-handle { width: 40px; height: 5px; background: rgba(var(--fg-rgb),0.3); border-radius: 3px; margin: 6px auto 16px; }
.sheet h2 { font-size: 18px; font-weight: 700; text-align: center; margin-bottom: 6px; }
.sheet-sub { text-align: center; color: var(--hint); font-size: 13px; margin-bottom: 16px; }

/* ─── Form ──────────────────────────────────────────────────────── */
.form-group { margin-bottom: 12px; position: relative; }
.form-group > label {
    display: block; font-size: 11px; font-weight: 600; color: var(--hint);
    text-transform: uppercase; letter-spacing: .5px; margin-bottom: 6px; padding-left: 4px;
}
.hint { font-weight: 400; text-transform: none; letter-spacing: 0; }
.form-group input, .form-group textarea {
    width: 100%;
    border-radius: 14px;
    padding: 13px 14px;
    font-size: 15px;
    color: var(--fg);
    outline: none;
    font-family: inherit;
    resize: none;
}
.form-group input:focus, .form-group textarea:focus {
    border-color: rgba(94,139,255,0.7);
    box-shadow: inset 0 1px 0 rgba(var(--fg-rgb),0.14), 0 0 0 3px rgba(94,139,255,0.18);
}
.form-group textarea { height: 84px; padding-bottom: 24px; }
.form-group .recipient-wrap input { background: transparent; border: none; box-shadow: none; border-radius: 0; padding: 13px 0; backdrop-filter: none; -webkit-backdrop-filter: none; width: auto; }
.form-group .recipient-wrap input:focus { border: none; box-shadow: none; }

.qty-row { display: flex !important; flex-wrap: nowrap; align-items: center; gap: 8px; width: 100%; }
.qty-row input[type=number] { flex: 1 1 auto !important; width: auto !important; min-width: 0; text-align: center; font-size: 16px; font-weight: 700; -webkit-appearance: none; -moz-appearance: textfield; }
input[type=number]::-webkit-outer-spin-button, input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
input[type=number] { -moz-appearance: textfield; }
.qty-btn { display: flex !important; align-items: center; justify-content: center; width: 44px !important; height: 44px; min-width: 44px; flex-shrink: 0 !important; border-radius: 12px; border: none; background: var(--grad); color: #fff; font-size: 22px; cursor: pointer; -webkit-appearance: none; appearance: none; box-shadow: 0 3px 12px rgba(94,139,255,0.35); }
.qty-btn:active { opacity: .75; }
.char-count { position: absolute; right: 12px; bottom: 10px; font-size: 11px; color: var(--hint); }

/* ─── Recipient lookup ──────────────────────────────────────────── */
.recipient-wrap { display: flex; align-items: center; border-radius: 14px; padding: 0 14px; transition: border-color .15s, box-shadow .15s; }
.recipient-wrap:focus-within { border-color: rgba(94,139,255,0.7); box-shadow: inset 0 1px 0 rgba(var(--fg-rgb),0.14), 0 0 0 3px rgba(94,139,255,0.18); }
.recipient-at { color: var(--hint); font-size: 15px; font-weight: 600; margin-right: 4px; user-select: none; flex-shrink: 0; }
.recipient-wrap input { flex: 1; font-size: 15px; color: var(--fg); font-family: inherit; outline: none; }
.recipient-chip { display: flex; align-items: center; gap: 10px; border-radius: 14px; padding: 8px 10px; }
.recipient-chip.hidden { display: none; }
.recipient-wrap.hidden { display: none; }
.chip-photo { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; flex-shrink: 0; background: rgba(var(--fg-rgb),0.1); }
.chip-name { flex: 1; font-size: 15px; font-weight: 600; color: var(--fg); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip-clear { width: 28px; height: 28px; border-radius: 50%; border: none; background: rgba(var(--fg-rgb),0.1); color: var(--hint); font-size: 18px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.chip-clear:active { background: rgba(var(--fg-rgb),0.2); }
.recipient-error { font-size: 12px; color: #FF6B7A; margin-top: 6px; padding-left: 4px; }
.recipient-error.hidden { display: none; }

/* ─── Anon toggle ───────────────────────────────────────────────── */
.anon-row { display: flex; align-items: center; justify-content: space-between; border-radius: 14px; padding: 13px 14px; margin-bottom: 12px; }
.anon-label { font-size: 15px; font-weight: 500; color: var(--fg); }
.anon-label .hint { display: block; font-size: 12px; color: var(--hint); margin-top: 1px; font-weight: 400; }
.toggle-switch { position: relative; display: inline-block; width: 50px; height: 30px; flex-shrink: 0; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-track { position: absolute; inset: 0; background: rgba(var(--fg-rgb),0.15); border-radius: 15px; transition: background .22s; cursor: pointer; }
.toggle-track::before { content: ''; position: absolute; width: 24px; height: 24px; left: 3px; top: 3px; background: #fff; border-radius: 50%; box-shadow: 0 2px 8px rgba(0,0,0,0.35); transition: transform .22s cubic-bezier(.4,0,.2,1); }
.toggle-switch input:checked + .toggle-track { background: var(--grad); box-shadow: 0 0 12px rgba(94,139,255,0.45); }
.toggle-switch input:checked + .toggle-track::before { transform: translateX(20px); }

/* ─── Amounts ───────────────────────────────────────────────────── */
.amounts-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; margin-top: 4px; }
.amount-btn { border-radius: 14px; padding: 15px 8px; font-size: 14px; font-weight: 700; color: var(--fg); cursor: pointer; transition: all .15s; font-family: inherit; }
.amount-btn:active { border-color: rgba(94,139,255,0.6); color: var(--accent); box-shadow: 0 0 0 2px rgba(94,139,255,0.2); }
.custom-amount-row { display: flex; gap: 10px; }
.custom-amount-row input { flex: 1; border-radius: 14px; padding: 13px 14px; font-size: 15px; color: var(--fg); outline: none; font-family: inherit; }
.custom-amount-row .btn-primary { padding: 13px 18px; font-size: 14px; white-space: nowrap; border-radius: 14px; }

/* ─── Fragment ──────────────────────────────────────────────────── */
.frag-subtabs {
    display: flex; gap: 2px; padding: 3px; border-radius: 14px;
    background: var(--glass); backdrop-filter: blur(28px) saturate(180%); -webkit-backdrop-filter: blur(28px) saturate(180%);
    border: 0.5px solid rgba(var(--fg-rgb),0.12);
    box-shadow: inset 0 1px 0 rgba(var(--fg-rgb),0.14);
    margin: 8px 0 14px;
}
.frag-subtab {
    flex: 1; padding: 8px 4px; border-radius: 11px; border: none; background: transparent;
    color: rgba(var(--fg-rgb),0.55); font-size: 12.5px; font-weight: 600; cursor: pointer;
    white-space: nowrap; transition: all .2s; font-family: inherit;
}
.frag-subtab.active { background: var(--grad); color: #fff; box-shadow: 0 4px 12px rgba(94,139,255,0.35), inset 0 1px 0 rgba(255,255,255,0.25); }

/* Live TON rate strip */
.frag-rate-strip {
    display: flex; align-items: center; gap: 12px;
    border-radius: 14px; padding: 10px 14px; margin: 0 0 14px;
    background: var(--glass);
    backdrop-filter: blur(28px) saturate(180%); -webkit-backdrop-filter: blur(28px) saturate(180%);
    border: 0.5px solid rgba(var(--fg-rgb),0.12);
    box-shadow: inset 0 1px 0 rgba(var(--fg-rgb),0.14);
}
.frag-rate-strip.hidden { display: none; }
.frag-rate-ico { height: 22px; width: auto; }
.frag-rate-mid { flex: 1; min-width: 0; }
.frag-rate-main { font-size: 13px; font-weight: 600; }
.frag-rate-main span { color: #5EB4FF; }
.frag-rate-sub { font-size: 10.5px; color: var(--hint); margin-top: 1px; }

/* Payment toggle (TON / USDT / CryptoBot) */
.pay-block { margin-bottom: 12px; }
.pay-label { font-size: 11px; font-weight: 600; color: var(--hint); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 6px; padding-left: 4px; }
.pay-pills {
    display: flex; gap: 2px; padding: 3px; border-radius: 14px;
    background: var(--glass);
    backdrop-filter: blur(28px) saturate(180%); -webkit-backdrop-filter: blur(28px) saturate(180%);
    border: 0.5px solid rgba(var(--fg-rgb),0.12);
    box-shadow: inset 0 1px 0 rgba(var(--fg-rgb),0.14);
}
.pay-pill {
    flex: 1; display: flex; align-items: center; justify-content: center; gap: 5px;
    padding: 9px 0; border: none; border-radius: 11px; background: transparent;
    color: rgba(var(--fg-rgb),0.5); font-size: 12.5px; font-weight: 600; cursor: pointer;
    transition: all .18s; white-space: nowrap; font-family: inherit;
}
.pay-pill.active { background: var(--grad); color: #fff; box-shadow: 0 4px 12px rgba(94,139,255,0.35), inset 0 1px 0 rgba(255,255,255,0.25); }
/* TON/USDT: выравниваем иконку по буквам — низ лого на базовой линии, высота = высоте заглавных */
.pay-pill:not(.pay-pill-cb) { align-items: baseline; }
.pay-ico { height: 9px; width: auto; opacity: 0.55; transition: opacity .18s; }
.pay-pill.active .pay-ico { opacity: 1; }
.pay-ico-cb { height: 18px; border-radius: 5px; margin: -3px -3px -3px 0; }
.pay-chev { opacity: 0.65; transition: transform .18s; }
.pay-chev.open { transform: rotate(180deg); }
.pay-expand { display: grid; grid-template-rows: 0fr; opacity: 0; margin-top: 0; transition: grid-template-rows .22s ease, opacity .18s, margin-top .18s; }
.pay-expand.open { grid-template-rows: 1fr; opacity: 1; margin-top: 6px; }
.pay-expand > .pay-sub { overflow: hidden; min-height: 0; }
.pay-sub .pay-pill { padding: 7px 0; }
.frag-content { display: none; }
.frag-content.active { display: block; }

/* ─── Currency toggle (⭐/GRAM) — переиспользует визуал .pay-pills ─── */
.currency-row {
    display: inline-flex; align-items: center; gap: 2px; padding: 2px; border-radius: 11px; margin-bottom: 10px;
    background: var(--glass);
    backdrop-filter: blur(28px) saturate(180%); -webkit-backdrop-filter: blur(28px) saturate(180%);
    border: 0.5px solid rgba(var(--fg-rgb),0.12);
    box-shadow: inset 0 1px 0 rgba(var(--fg-rgb),0.14);
}
.currency-block { margin-bottom: 12px; }
.currency-block.hidden { display: none; }
.currency-label {
    font-size: 11px; font-weight: 700; letter-spacing: 0.3px;
    color: var(--hint); white-space: nowrap; margin-bottom: 6px;
}
.currency-block .currency-row { margin-bottom: 0; }
.currency-pill {
    display: flex; align-items: center; justify-content: center; gap: 4px;
    padding: 6px 12px; border: none; border-radius: 9px; background: transparent;
    color: rgba(var(--fg-rgb),0.5); font-size: 11.5px; font-weight: 700; cursor: pointer;
    transition: all .18s; white-space: nowrap; font-family: inherit;
}
.currency-pill.active { background: var(--grad); color: #fff; box-shadow: 0 3px 9px rgba(94,139,255,0.3), inset 0 1px 0 rgba(255,255,255,0.25); }
.currency-pill .inline-star, .currency-pill img { height: 12px; width: auto; }
.currency-pill .currency-ico { height: 16px; width: 16px; object-fit: contain; border-radius: 4px; position: static; }
/* звезда Stars в пилюле валюты — оптически мельче логотипов, поэтому крупнее */
.currency-pill .currency-ico[src^="star"] { height: 26px; width: 26px; border-radius: 0; margin: -5px -4px; }
.currency-block .currency-pill { padding: 6px 16px; }
.currency-row.small { margin: 8px 0; }

/* ─── GRAM topup payment picker — копия .pay-pill под своими классами,
   чтобы не пересекаться с глобальными обработчиками вкладки Fragment ─── */
.gpay-block { margin-bottom: 12px; }
.gpay-pills {
    display: flex; gap: 2px; padding: 3px; border-radius: 14px;
    background: var(--glass);
    backdrop-filter: blur(28px) saturate(180%); -webkit-backdrop-filter: blur(28px) saturate(180%);
    border: 0.5px solid rgba(var(--fg-rgb),0.12);
    box-shadow: inset 0 1px 0 rgba(var(--fg-rgb),0.14);
}
.gpay-pill {
    flex: 1; display: flex; align-items: baseline; justify-content: center; gap: 5px;
    padding: 9px 0; border: none; border-radius: 11px; background: transparent;
    color: rgba(var(--fg-rgb),0.5); font-size: 12.5px; font-weight: 600; cursor: pointer;
    transition: all .18s; white-space: nowrap; font-family: inherit;
}
.gpay-pill.active { background: var(--grad); color: #fff; box-shadow: 0 4px 12px rgba(94,139,255,0.35), inset 0 1px 0 rgba(255,255,255,0.25); }
.gpay-pill.active .pay-ico { opacity: 1; }
.gpay-pill-cb { align-items: center; }
.gpay-expand { display: grid; grid-template-rows: 0fr; opacity: 0; margin-top: 0; transition: grid-template-rows .22s ease, opacity .18s, margin-top .18s; }
.gpay-expand.open { grid-template-rows: 1fr; opacity: 1; margin-top: 6px; }
.gpay-expand > .gpay-sub { overflow: hidden; min-height: 0; }
.gpay-sub .gpay-pill { padding: 7px 0; }

.frag-payment-method { margin: 0 0 14px; }
.frag-payment-method.hidden { display: none; }
.frag-payment-label { display: block; font-size: 11px; font-weight: 600; color: var(--hint); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 6px; padding-left: 4px; }
.frag-cb-currency { display: flex; gap: 2px; border-radius: 14px; padding: 3px; }
.frag-cb-currency.hidden { display: none; }
.cb-cur-btn { display: flex; align-items: center; justify-content: center; gap: 5px; flex: 1; padding: 9px; border: none; border-radius: 11px; background: transparent; color: rgba(var(--fg-rgb),0.5); font-size: 12.5px; font-weight: 600; cursor: pointer; transition: all .2s; font-family: inherit; }
.cb-cur-btn.active { background: var(--grad); color: #fff; box-shadow: 0 4px 12px rgba(94,139,255,0.35), inset 0 1px 0 rgba(255,255,255,0.25); }
.cb-cur-ico { height: 10px; width: auto; position: relative; top: 0px; }
.cb-cur-btn:not(.active) img { opacity: 0.55; }

.frag-features { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; margin-bottom: 18px; }
.frag-features-single { grid-template-columns: 1fr; }
.frag-card { border-radius: 16px; padding: 14px 12px; font-size: 12px; font-weight: 600; line-height: 1.35; color: var(--fg); display: flex; flex-direction: column; gap: 8px; }
.frag-card-wide { flex-direction: row; align-items: center; font-size: 14px; gap: 14px; }

.frag-price-row { border-radius: 14px; padding: 12px 14px; font-size: 15px; font-weight: 700; color: var(--accent); text-align: center; margin-bottom: 12px; }
.frag-price-row.hidden { display: none; }

.frag-periods {
    display: flex; flex-direction: column; gap: 6px; padding: 6px; border-radius: 14px;
    background: var(--glass);
    backdrop-filter: blur(28px) saturate(180%); -webkit-backdrop-filter: blur(28px) saturate(180%);
    border: 0.5px solid rgba(var(--fg-rgb),0.12);
    box-shadow: inset 0 1px 0 rgba(var(--fg-rgb),0.14), 0 8px 24px rgba(0,0,0,0.18);
}
.frag-period { display: flex; align-items: center; gap: 10px; border-radius: 14px; padding: 12px 14px; cursor: pointer; background: transparent; box-shadow: inset 0 0 0 0.5px rgba(var(--fg-rgb),0.08); transition: background .15s, box-shadow .15s; }
.frag-period.active { background: linear-gradient(135deg, rgba(94,139,255,0.20), transparent); box-shadow: inset 0 0 0 1px rgba(94,139,255,0.55); }
.frag-period input[type="radio"] { width: 18px; height: 18px; accent-color: var(--accent); flex-shrink: 0; cursor: pointer; }
.frag-period-label { font-size: 14px; font-weight: 600; display: flex; align-items: center; }
.frag-period-price { font-size: 14px; font-weight: 700; color: var(--fg); white-space: nowrap; }
.frag-period.active .frag-period-price { color: var(--accent); }
.frag-period input[type="radio"] { position: absolute; opacity: 0; width: 0; height: 0; }
.frag-radio { width: 22px; height: 22px; border-radius: 999px; flex-shrink: 0; border: 2px solid rgba(var(--fg-rgb),0.25); display: flex; align-items: center; justify-content: center; transition: border-color .15s; }
.frag-period.active .frag-radio { border-color: var(--accent); }
.frag-period.active .frag-radio::after { content: ''; width: 10px; height: 10px; border-radius: 999px; background: var(--accent); box-shadow: 0 0 8px var(--accent); }
.frag-period-mid { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.frag-period-permonth { font-size: 11px; color: var(--hint); }
.frag-badge { margin-left: 6px; padding: 2px 6px; border-radius: 6px; font-size: 10px; font-weight: 700; background: var(--grad); color: #fff; vertical-align: middle; }
.frag-connect-wrap { margin-bottom: 8px; }
.frag-buy-btn { margin-top: 8px; }

/* ─── Send modal ────────────────────────────────────────────────── */
.send-header { display: flex; flex-direction: column; align-items: center; margin-bottom: 8px; }
.send-sticker { width: 96px; height: 96px; object-fit: contain; }
.send-header h2 { margin-top: 6px; margin-bottom: 4px; }

/* ─── Wink Premium card ─────────────────────────────────────────── */
.premium-card {
    border-radius: 18px; padding: 14px; margin-bottom: 18px;
    background: rgba(94,139,255,0.10);
    backdrop-filter: blur(28px) saturate(180%); -webkit-backdrop-filter: blur(28px) saturate(180%);
    border: 0.5px solid rgba(var(--fg-rgb),0.12);
    box-shadow: inset 0 1px 0 rgba(var(--fg-rgb),0.14), 0 8px 24px rgba(0,0,0,0.18);
}
.premium-top { display: flex; align-items: center; gap: 12px; }
.premium-ico {
    width: 42px; height: 42px; border-radius: 13px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center; font-size: 22px;
    background: var(--grad);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.3), 0 4px 12px rgba(94,139,255,0.35);
}
.premium-info { flex: 1; min-width: 0; }
.premium-title { font-size: 15px; font-weight: 700; letter-spacing: -0.3px; }
.premium-sub { font-size: 11.5px; color: var(--hint); margin-top: 2px; line-height: 1.35; }
.premium-btn {
    width: 100%; margin-top: 12px; padding: 11px 0; border-radius: 13px; border: none; cursor: pointer;
    background: var(--grad); color: #fff; font-size: 14px; font-weight: 700; font-family: inherit;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.3), 0 4px 14px rgba(94,139,255,0.35);
    display: flex; align-items: center; justify-content: center;
}
.premium-btn:active { opacity: .85; transform: scale(.98); }
.premium-btn img { margin-left: -0.3em; }
.premium-btn:disabled { opacity: .55; }
.premium-card.premium-active .premium-btn {
    background: var(--glass); color: rgba(var(--fg-rgb),0.7);
    border: 0.5px solid rgba(var(--fg-rgb),0.16); box-shadow: none;
}

/* ─── Settings ──────────────────────────────────────────────────── */
.settings-profile { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.settings-ava { width: 52px; height: 52px; border-radius: 50%; overflow: hidden; background: var(--grad); flex-shrink: 0; box-shadow: inset 0 1px 0 rgba(255,255,255,0.3); display: flex; align-items: center; justify-content: center; }
.settings-ava img { width: 100%; height: 100%; object-fit: cover; display: block; }
.settings-ava img[src=""], .settings-ava img:not([src]) { display: none; }
.settings-profile-info { flex: 1; min-width: 0; }
.settings-name { font-size: 17px; font-weight: 700; letter-spacing: -0.3px; }
.settings-username { font-size: 12px; color: var(--hint); margin-top: 2px; }
.settings-group-label { font-size: 11px; font-weight: 600; color: rgba(var(--fg-rgb),0.45); text-transform: uppercase; letter-spacing: .5px; padding: 0 6px 8px; }
.settings-group { border-radius: 18px; margin-bottom: 18px; overflow: visible; position: relative; z-index: 1; }
.settings-group.group-menu-open { z-index: 50; }
.settings-row { display: flex; align-items: center; gap: 12px; padding: 11px 14px; cursor: pointer; position: relative; z-index: 1; }
.settings-row.menu-open { z-index: 5; }
.settings-row + .settings-row { border-top: 0.5px solid rgba(var(--fg-rgb),0.07); }
.settings-toggle { width: 42px; height: 26px; flex-shrink: 0; }
.settings-toggle .toggle-track::before { width: 20px; height: 20px; left: 3px; top: 3px; }
.settings-toggle input:checked + .toggle-track::before { transform: translateX(16px); }
.settings-ico { width: 30px; height: 30px; border-radius: 8px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 15px; box-shadow: inset 0 1px 0 rgba(255,255,255,0.25), 0 1px 3px rgba(0,0,0,0.2); }
.settings-row-main { flex: 1; min-width: 0; }
.settings-row-title { font-size: 14px; font-weight: 500; color: var(--fg); }
.settings-row-detail { font-size: 11.5px; color: var(--hint); margin-top: 1px; }
.settings-chev { color: var(--fg); opacity: 0.4; transition: transform .15s; }
.settings-chev.open { transform: rotate(180deg); }
.settings-chev-right { opacity: 0.3; }
.settings-menu {
    position: absolute; top: calc(100% - 2px); bottom: auto; right: 12px; min-width: 168px;
    border-radius: 14px; padding: 4px; z-index: 30;
    background: var(--menu);
    border: 0.5px solid rgba(var(--fg-rgb),0.12);
    backdrop-filter: blur(40px) saturate(180%); -webkit-backdrop-filter: blur(40px) saturate(180%);
    box-shadow: 0 12px 32px rgba(0,0,0,0.45), inset 0 1px 0 rgba(var(--fg-rgb),0.08);
}
.settings-menu.hidden { display: none; }
.settings-menu-item { display: flex; align-items: center; gap: 9px; width: 100%; padding: 8px 10px; border-radius: 10px; border: none; background: transparent; cursor: pointer; font-size: 13px; font-weight: 500; color: rgba(var(--fg-rgb),0.9); font-family: inherit; }
.settings-menu-item:active { background: rgba(var(--fg-rgb),0.06); }
.smi-emoji { font-size: 14px; width: 16px; text-align: center; }
.settings-menu-item span:nth-child(2) { flex: 1; text-align: left; }
.smi-check { color: var(--accent); opacity: 0; flex-shrink: 0; }
.settings-menu-item.active { color: var(--accent); }
.settings-menu-item.active .smi-check { opacity: 1; }

/* ─── Maintenance ───────────────────────────────────────────────── */
#maintenance-overlay {
    position: fixed; inset: 0;
    background: var(--bg);
    z-index: 999999;
    display: none;
    flex-direction: column; align-items: center; justify-content: center;
    text-align: center; padding: 32px; color: var(--fg);
}
.tab-maintenance-overlay {
    position: fixed; inset: 0; z-index: 100;
    background: var(--bg);
    display: none; flex-direction: column; align-items: center; justify-content: center;
    text-align: center; padding: 32px; color: var(--fg); gap: 8px;
}
.tab-maintenance-overlay h2 { font-size: 20px; font-weight: 700; margin: 0 0 8px; }
.tab-maintenance-overlay p { font-size: 15px; color: var(--hint); line-height: 1.5; margin: 0; }
/* при техработах активной вкладки страница статична — видно только верх */
body.maint-lock { overflow: hidden; height: 100vh; }
body.maint-lock main { overflow: hidden; max-height: 0; }

/* ─── Roulette (casino) ─────────────────────────────────────────── */
#roulette-tab { padding-bottom: 90px; }
#roulette-root { padding-top: 6px; }

.cas-live {
    position: relative; overflow: hidden; margin: 6px 0 12px;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.cas-live-row { display: flex; gap: 8px; width: max-content; animation: tickerScroll 26s linear infinite; }

.cas-cases { display: flex; gap: 10px; overflow-x: auto; padding: 2px 2px 8px; margin: 0 -2px; -webkit-overflow-scrolling: touch; }
.cas-cases::-webkit-scrollbar { display: none; }
.cas-chip-tag {
    position: absolute; top: 8px; right: 8px; font-size: 8.5px; font-weight: 800;
    padding: 2px 6px; border-radius: 999px; letter-spacing: 0.3px;
    text-transform: uppercase; white-space: nowrap;
}

.cas-stage { position: relative; margin-top: 6px; }
.cas-reel {
    position: relative; height: 108px; border-radius: 18px; overflow: hidden;
    background: var(--glass);
    backdrop-filter: blur(28px) saturate(180%); -webkit-backdrop-filter: blur(28px) saturate(180%);
    border: 0.5px solid rgba(var(--fg-rgb),0.12);
    box-shadow: inset 0 1px 0 rgba(var(--fg-rgb),0.14), 0 8px 24px rgba(0,0,0,0.28);
}
.cas-mask {
    position: absolute; inset: 0; display: flex; align-items: center;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.cas-strip { display: flex; gap: 8px; will-change: transform; }
.cas-marker { position: absolute; top: 0; bottom: 0; left: 50%; transform: translateX(-50%); pointer-events: none; z-index: 3; }
.cas-marker-line { position: absolute; top: 6px; bottom: 6px; left: 50%; transform: translateX(-50%); width: 2px; border-radius: 2px; }
.cas-marker-up { position: absolute; top: -1px; left: 50%; transform: translateX(-50%); width: 0; height: 0; border-left: 6px solid transparent; border-right: 6px solid transparent; border-top: 9px solid; }
.cas-marker-dn { position: absolute; bottom: -1px; left: 50%; transform: translateX(-50%); width: 0; height: 0; border-left: 6px solid transparent; border-right: 6px solid transparent; border-bottom: 9px solid; }
.cas-shake { animation: reelShake 0.5s ease; }
.cas-confetti { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 6; }

.cas-spin {
    width: 100%; margin-top: 14px; padding: 16px 0; border-radius: 16px; border: none;
    font-weight: 800; font-size: 16px; letter-spacing: -0.2px; font-family: inherit;
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    transition: all 0.2s; color: #fff;
}

.cas-droplist {
    position: relative; border-radius: 16px; overflow: hidden; margin-top: 14px;
    background: var(--glass);
    backdrop-filter: blur(28px) saturate(180%); -webkit-backdrop-filter: blur(28px) saturate(180%);
    border: 0.5px solid rgba(var(--fg-rgb),0.12);
    box-shadow: inset 0 1px 0 rgba(var(--fg-rgb),0.14), 0 8px 24px rgba(0,0,0,0.22);
}
.cas-droplist-head {
    all: unset; cursor: pointer; display: flex; align-items: center; gap: 8px;
    padding: 12px 14px; width: 100%; box-sizing: border-box;
}
.cas-droplist-chev { opacity: 0.5; transition: transform 0.2s; }
.cas-droplist.open .cas-droplist-chev { transform: rotate(180deg); }
.cas-droplist-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.26s ease; }
.cas-droplist.open .cas-droplist-body { grid-template-rows: 1fr; }

@keyframes tickerScroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes reelShake { 0%,100% { transform: translateX(0); } 20% { transform: translateX(-6px); } 40% { transform: translateX(5px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(3px); } }
@keyframes auraPulse { 0%,100% { transform: scale(0.92); opacity: 0.7; } 50% { transform: scale(1.08); opacity: 1; } }
@keyframes casSpin { to { transform: rotate(360deg); } }
@keyframes caseFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes confBurst {
    0% { transform: translate(-50%,-50%) rotate(0deg); opacity: 1; }
    100% { transform: translate(calc(-50% + var(--tx)), calc(-50% + var(--ty))) rotate(var(--rot)); opacity: 0; }
}

/* ─── Premium badge в профиле настроек ──────────────────────────── */
.settings-name-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.profile-premium-badge {
    display: inline-flex; align-items: center; gap: 3px;
    font-size: 10.5px; font-weight: 800; letter-spacing: 0.2px;
    padding: 2px 8px; border-radius: 999px;
    background: var(--grad);
    color: #fff; white-space: nowrap;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.3);
}
.profile-premium-badge.hidden { display: none; }

/* благодарность за API моделей подарков (в настройках, требование changes.tg) */
.settings-credits { text-align: center; font-size: 11px; color: rgba(var(--fg-rgb),0.38); margin: 18px 4px 4px; line-height: 1.4; }
.settings-credits-link { color: rgba(var(--fg-rgb),0.55); font-weight: 600; cursor: pointer; }

/* ── Промокод (настройки) ── */
.promo-row { cursor: default; gap: 10px; }
.promo-input {
    flex: 1; min-width: 0;
    background: rgba(var(--fg-rgb),0.06);
    border: 1px solid rgba(var(--fg-rgb),0.14);
    border-radius: 10px; padding: 9px 11px;
    color: var(--fg); font-family: inherit; font-size: 14px;
    letter-spacing: .4px; text-transform: uppercase; outline: none;
}
.promo-input::placeholder { color: rgba(var(--fg-rgb),0.4); text-transform: none; letter-spacing: 0; }
.promo-input:focus { border-color: var(--accent); }
.promo-btn {
    flex-shrink: 0; border: none; cursor: pointer;
    background: linear-gradient(135deg,#C792EA,#A66BFF);
    color: #fff; border-radius: 10px; padding: 9px 14px;
    font-family: inherit; font-size: 13px; font-weight: 600;
}
.promo-btn:active { transform: scale(.96); }
.promo-btn:disabled { opacity: .5; }

/* ─── Crash (игра «Краш») ─────────────────────────────────────── */
.game-hub { margin-bottom: 12px; }
#crash-root { padding-bottom: 8px; }

.crash-recent { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 6px; -ms-overflow-style: none; scrollbar-width: none; }
.crash-recent::-webkit-scrollbar { display: none; }
.crash-badge { flex-shrink: 0; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums;
    padding: 4px 9px; border-radius: 9px; border: 1px solid; }

.crash-stage { position: relative; height: 250px; border-radius: 20px; overflow: hidden;
    background: radial-gradient(120% 90% at 20% 100%, rgba(94,139,255,0.10), rgba(var(--fg-rgb),0.02));
    border: 0.5px solid rgba(var(--fg-rgb),0.12);
    box-shadow: inset 0 1px 0 rgba(var(--fg-rgb),0.12); transition: box-shadow .3s; }
.crash-stage.crash-boom { box-shadow: inset 0 0 0 1.5px rgba(255,92,122,0.6), 0 0 30px rgba(255,92,122,0.35); animation: crashShake .4s; }
.crash-stage.crash-cashwin { box-shadow: inset 0 0 0 1.5px rgba(57,217,138,0.6), 0 0 30px rgba(57,217,138,0.3); }
@keyframes crashShake { 0%,100%{transform:translateX(0)} 20%{transform:translateX(-6px)} 40%{transform:translateX(5px)} 60%{transform:translateX(-3px)} 80%{transform:translateX(2px)} }

.crash-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.crash-rocket { position: absolute; transform: translate(-21%, -76%); pointer-events: none;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.4)); transition: opacity .2s; will-change: left, top; }
.crash-rocket img { width: 34px; height: auto; display: block; }
.crash-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
    pointer-events: none; text-align: center; }
.crash-mult { font-size: 52px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -1px;
    color: var(--fg); text-shadow: 0 2px 20px rgba(0,0,0,0.35); transition: color .15s; }
.crash-status { margin-top: 6px; font-size: 13px; font-weight: 600; color: var(--hint); min-height: 18px; padding: 0 16px; }

.crash-bal { text-align: center; font-size: 13px; color: var(--hint); margin: 10px 0 8px; }
.crash-bal b { color: var(--fg); }

.crash-bet-row { display: flex; gap: 8px; align-items: stretch; }
.crash-chip { flex-shrink: 0; min-width: 46px; padding: 0 12px; border-radius: 13px; border: 0.5px solid rgba(var(--fg-rgb),0.14);
    background: var(--glass); color: var(--fg); font-size: 14px; font-weight: 700; cursor: pointer; font-family: inherit;
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); transition: transform .1s; }
.crash-chip:active { transform: scale(.94); }
.crash-chip:disabled { opacity: .4; }
.crash-bet-field { flex: 1; display: flex; align-items: center; gap: 0px; padding: 0 14px; border-radius: 13px;
    background: var(--glass); border: 0.5px solid rgba(var(--fg-rgb),0.14); }
.crash-bet-field span { color: var(--hint); font-size: 15px; }
.crash-bet-input { flex: 1; width: 100%; background: transparent; border: none; outline: none; color: var(--fg);
    font-size: 18px; font-weight: 700; font-family: inherit; padding: 12px 0; -moz-appearance: textfield; }
.crash-bet-input::-webkit-outer-spin-button, .crash-bet-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.crash-auto-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 10px 0 2px; padding: 0 2px; }
.crash-auto-row > span { font-size: 13.5px; font-weight: 600; color: var(--hint); }
.crash-auto-field { display: flex; align-items: center; gap: 4px; padding: 0 12px; border-radius: 12px;
    background: var(--glass); border: 0.5px solid rgba(var(--fg-rgb),0.14); width: 120px; }
.crash-auto-field span { color: var(--hint); font-size: 14px; }
.crash-auto-input { flex: 1; width: 100%; background: transparent; border: none; outline: none; color: var(--fg);
    font-size: 15px; font-weight: 700; font-family: inherit; padding: 9px 0; text-align: right; }

.crash-action { width: 100%; margin-top: 14px; padding: 16px; border-radius: 16px; border: none;
    background: var(--grad); color: #fff; font-size: 16px; font-weight: 700; cursor: pointer; font-family: inherit;
    box-shadow: 0 6px 18px rgba(94,139,255,0.35), inset 0 1px 0 rgba(255,255,255,0.25); transition: transform .1s, filter .2s; }
.crash-action:active { transform: scale(.98); }
.crash-action:disabled { opacity: .7; }
.crash-action.running { background: linear-gradient(135deg, #FFB13D, #FF7A3D);
    box-shadow: 0 6px 18px rgba(255,140,61,0.4), inset 0 1px 0 rgba(255,255,255,0.3); }
.crash-action b { font-weight: 800; }

.crash-fair { text-align: center; font-size: 11.5px; color: var(--hint); opacity: .7; margin-top: 10px; }

/* Crash: строка кнопок + тумблер авто-режима */
.crash-btn-row { display: flex; gap: 8px; margin-top: 14px; }
.crash-btn-row .crash-action { margin-top: 0; flex: 1; }
.crash-auto-btn { flex-shrink: 0; padding: 0 16px; border-radius: 16px; border: 0.5px solid rgba(var(--fg-rgb),0.14);
    background: var(--glass); color: var(--fg); font-size: 14px; font-weight: 700; cursor: pointer; font-family: inherit;
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); white-space: nowrap;
    transition: transform .1s, background .2s, color .2s; }
.crash-auto-btn:active { transform: scale(.96); }
.crash-auto-btn.active { background: linear-gradient(135deg,#FF6B6B,#FF3D6E); color: #fff; border-color: transparent;
    box-shadow: 0 4px 14px rgba(255,61,110,0.4); }

/* Кошелёк общий — строка с суммой и переходом к выводу есть на обоих экранах продажи */
.sell-cash {
    display: flex; align-items: center; gap: 12px; cursor: pointer;
    border-radius: 16px; padding: 11px 14px; margin: 2px 0 14px;
    background: var(--glass); border: 1px solid rgba(var(--fg-rgb),0.09);
    transition: transform .14s;
}
.sell-cash:active { transform: scale(.985); }
.sell-cash.hidden { display: none; }
.sell-cash-mid { flex: 1; min-width: 0; }
.sell-cash-label { font-size: 11px; color: var(--hint); }
.sell-cash-usd { font-size: 20px; font-weight: 700; letter-spacing: -0.3px; margin-top: 1px;
    font-variant-numeric: tabular-nums; }
.sell-cash-cta {
    flex-shrink: 0; padding: 8px 14px; border-radius: 11px; font-size: 12px; font-weight: 700;
    background: linear-gradient(135deg,#48CFAD,#2BB39A); color: #04231a;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.3), 0 4px 12px rgba(43,179,154,0.3);
}
#payout-empty.hidden, #payout-body.hidden { display: none; }
#payout-empty { text-align: center; padding: 22px 8px; font-size: 13px; color: var(--hint); }

/* ─── Продажа звёзд (сабтаб Fragment) ─── */
.sell-hero { border-radius: 18px; padding: 18px 16px; margin-bottom: 14px; text-align: center;
    background: var(--glass); border: 1px solid rgba(var(--fg-rgb),0.08); }
.sell-hero-label { font-size: 12.5px; color: rgba(var(--fg-rgb),0.55); margin-bottom: 4px; }
.sell-hero-usd { font-size: 34px; font-weight: 700; letter-spacing: -0.5px; line-height: 1.1; }
.sell-hero-alt { font-size: 12.5px; color: rgba(var(--fg-rgb),0.5); margin-top: 5px; }

.sell-steps { display: flex; flex-direction: column; gap: 9px; margin-bottom: 12px; }
.sell-step { display: flex; align-items: center; gap: 10px; font-size: 13.5px;
    color: rgba(var(--fg-rgb),0.85); }
.sell-step-n { flex-shrink: 0; width: 21px; height: 21px; border-radius: 50%; background: var(--grad);
    color: #fff; font-size: 11.5px; font-weight: 700; display: flex; align-items: center; justify-content: center; }

.sell-note { font-size: 11.5px; line-height: 1.5; color: rgba(var(--fg-rgb),0.5);
    margin: 12px 2px 14px; }

.sell-stats { display: flex; flex-direction: column; gap: 7px; margin-bottom: 14px; }
.sell-stat { display: flex; justify-content: space-between; align-items: center; font-size: 13px;
    color: rgba(var(--fg-rgb),0.6); }
.sell-stat b { color: rgba(var(--fg-rgb),0.95); font-weight: 600; }

.sell-methods { margin-bottom: 4px; }
.sell-methods .pay-pill { justify-content: center; }

.sell-history { margin-top: 16px; }
.sell-hist-head { font-size: 12.5px; color: rgba(var(--fg-rgb),0.5); margin-bottom: 8px; }
.sell-hist-item { display: flex; justify-content: space-between; align-items: center;
    font-size: 13px; padding: 9px 0; border-bottom: 1px solid rgba(var(--fg-rgb),0.06); }
.sell-hist-date { font-size: 11.5px; color: rgba(var(--fg-rgb),0.4); }

.sell-acc { color: #5e8bff; font-weight: 600; cursor: pointer; }
.sell-acc:active { opacity: 0.6; }

/* в проекте нет глобального .hidden — задаём его для элементов раздела продажи */
#sell-form.hidden, #sell-payout-btn.hidden, #sell-send-btn.hidden,
.sell-hero.hidden, .sell-steps.hidden, .sell-stats.hidden, .sell-history.hidden { display: none; }

/* у .app-header и .hero был одинаковый z-index: 200 — при равенстве выигрывал .hero
   (он ниже в разметке), и меню кошелька проваливалось под карточку баланса */
.app-header { z-index: 300; }

/* ── Промо продажи звёзд (вкладка «Подарки») ── */
.sell-promo {
    display: block;
    border-radius: 18px; padding: 13px 14px; margin: 4px 0 12px;
    background: linear-gradient(135deg, rgba(72,207,173,0.16), rgba(94,139,255,0.10));
    backdrop-filter: blur(28px) saturate(180%); -webkit-backdrop-filter: blur(28px) saturate(180%);
    border: 0.5px solid rgba(72,207,173,0.45);
    box-shadow: inset 0 1px 0 rgba(var(--fg-rgb),0.14), 0 8px 24px rgba(0,0,0,0.18);
    transition: transform .14s;
}
.sell-promo:active { transform: none; }
.sell-promo-top { display: flex; align-items: center; gap: 12px; }
.sell-promo-acts { display: flex; gap: 8px; margin-top: 12px; }
.sell-promo-act {
    flex: 1; min-width: 0; display: flex; align-items: center; justify-content: center; gap: 5px;
    padding: 9px 10px; border-radius: 12px; border: 1px solid rgba(var(--fg-rgb),0.1);
    background: rgba(var(--fg-rgb),0.07); color: var(--fg);
    font-family: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer;
    transition: transform .14s;
}
.sell-promo-act:active { transform: scale(.97); }
.sell-promo-act.hidden { display: none; }
.sell-promo-act .inline-star { height: 13px; }
.sell-promo-act-cash {
    background: linear-gradient(135deg,#48CFAD,#2BB39A); color: #04231a; border-color: transparent;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.3), 0 4px 12px rgba(43,179,154,0.3);
}
.sell-promo-act-usd { font-variant-numeric: tabular-nums; }
.sell-promo-ico {
    width: 40px; height: 40px; border-radius: 12px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg,#48CFAD,#2BB39A);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.3), 0 4px 12px rgba(43,179,154,0.35);
}
.sell-promo-mid { flex: 1; min-width: 0; }
.sell-promo-title { font-size: 14.5px; font-weight: 700; letter-spacing: -0.2px; }
.sell-promo-sub { font-size: 11.5px; color: var(--hint); margin-top: 2px; line-height: 1.35; }
.sell-promo-cta {
    flex-shrink: 0; padding: 8px 14px; border-radius: 11px;
    background: linear-gradient(135deg,#48CFAD,#2BB39A); color: #04231a;
    font-size: 12.5px; font-weight: 800; white-space: nowrap;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.35), 0 4px 12px rgba(43,179,154,0.3);
}

/* ── Экран «Продать звёзды» ── */
.sell-head { display: flex; align-items: center; gap: 10px; margin: 6px 0 14px; }
.sell-back {
    width: 34px; height: 34px; flex-shrink: 0; border-radius: 11px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    background: var(--glass); border: 0.5px solid rgba(var(--fg-rgb),0.14); color: var(--fg);
    box-shadow: inset 0 1px 0 rgba(var(--fg-rgb),0.14); font-family: inherit;
}
.sell-back:active { opacity: .7; }
.sell-head-title { font-size: 17px; font-weight: 700; letter-spacing: -0.3px; }


/* звёзды в кнопках сумм пополнения: в рост цифр, вплотную */
.amount-btn .inline-star { height: 1.5em; top: 0; vertical-align: -0.42em; margin-left: -0.55em; }

/* цена в шите отправки: звезда в рост цифр */
#send-price .inline-star { height: 1.3em; top: 0; vertical-align: -0.32em; margin-left: -0.44em; }

/* звезда в кнопке отправки: в 2× кегля цифр, вплотную */
#send-btn .inline-star { height: 1.45em; top: 0; vertical-align: 0.08em; margin: -0.45em 0 -0.45em -0.5em; }


/* ─── Скупка NFT-подарков: витрина коллекций ─── */
.sell-subtabs { margin-bottom: 14px; }

.nft-search { position: relative; display: flex; align-items: center; margin: 0 0 12px; }
.nft-search-ico { position: absolute; left: 11px; color: rgba(var(--fg-rgb),0.35); pointer-events: none; }
.nft-search input { width: 100%; padding: 9px 30px 9px 32px; border-radius: 12px;
    background: var(--glass); border: 1px solid rgba(var(--fg-rgb),0.08);
    color: rgba(var(--fg-rgb),0.95); font-size: 13.5px; outline: none; }
.nft-search input::placeholder { color: rgba(var(--fg-rgb),0.35); }
.nft-search-clear { position: absolute; right: 6px; width: 22px; height: 22px; border: none;
    background: none; color: rgba(var(--fg-rgb),0.45); font-size: 17px; line-height: 1; cursor: pointer; }
.nft-search-clear.hidden { display: none; }

.nft-empty { font-size: 12.5px; color: rgba(var(--fg-rgb),0.45); text-align: center; padding: 18px 0 24px; }
.nft-empty.hidden { display: none; }

.nft-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 18px; }
/* min-width: 0 обязателен — иначе длинная цена распирает колонку и сетка вылезает за экран */
.nft-card { background: var(--glass); border: 1px solid rgba(var(--fg-rgb),0.07); border-radius: 14px;
    padding: 8px 5px 7px; display: flex; flex-direction: column; align-items: center; gap: 1px;
    overflow: hidden; min-width: 0; }
.nft-img { width: 100%; max-width: 54px; aspect-ratio: 1; object-fit: contain; margin-bottom: 2px; }
.nft-name { font-size: 10px; line-height: 1.2; font-weight: 600; text-align: center;
    color: rgba(var(--fg-rgb),0.85); width: 100%;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nft-price { font-size: 11.5px; font-weight: 700; color: rgba(var(--fg-rgb),0.95); white-space: nowrap; }
.nft-price span { font-size: 8.5px; font-weight: 600; opacity: 0.5; margin-left: 1.5px; }
.nft-usd { font-size: 9.5px; color: rgba(var(--fg-rgb),0.45); margin-bottom: 5px; white-space: nowrap; }
.nft-btn { width: 100%; padding: 5px 2px; border: none; border-radius: 8px; background: var(--grad);
    color: #fff; font-size: 10.5px; font-weight: 700; cursor: pointer; }
.nft-btn:active { opacity: 0.75; }

/* узкие экраны: 4 колонки перестают читаться */
@media (max-width: 340px) {
    .nft-grid { grid-template-columns: repeat(3, 1fr); }
}

#nft-sell-overlay .send-sticker { width: 84px; height: 84px; object-fit: contain; }
#nft-sell-overlay .sell-note { margin-bottom: 16px; }


/* комиссия за оплату пополнения через CryptoBot */
.gram-fee-note { font-size: 11.5px; line-height: 1.4; color: rgba(var(--fg-rgb),0.5);
    margin: -4px 2px 12px; text-align: center; }
.gram-fee-note.hidden { display: none; }

.cb-fee-note { font-size: 11px; line-height: 1.4; color: rgba(var(--fg-rgb),0.45);
    margin: 8px 2px 0; }
.cb-fee-note.hidden { display: none; }

/* пополнение и вывод GRAM — в одну строку, поровну по ширине */
.hero-gram-acts { display: flex; gap: 6px; margin-top: 10px; }
.hero-gram-acts .hero-topup { width: auto; flex: 1 1 0; margin-top: 0; min-width: 0;
    padding-left: 4px; padding-right: 4px; }
.hero-topup-ghost.hidden { display: none; }

/* четыре способа вывода в один ряд не помещаются — раскладываем 2×2 */
.gram-wd-methods { flex-wrap: wrap; }
.gram-wd-methods .pay-pill { flex: 1 1 calc(50% - 6px); min-width: 0; }

/* долг: подарков ушло больше, чем оплачено — гасится следующим пополнением */
.hero-debt { color: #ff6b6b; font-weight: 600; }

/* ─── Апгрейд (третий режим вкладки «Игры») ─────────────────────── */
.upg-stage { position: relative; height: 250px; border-radius: 20px; overflow: hidden; margin-top: 4px;
    background: radial-gradient(120% 90% at 50% 100%, rgba(94,139,255,0.10), rgba(var(--fg-rgb),0.02));
    border: 0.5px solid rgba(var(--fg-rgb),0.12);
    box-shadow: inset 0 1px 0 rgba(var(--fg-rgb),0.12); transition: box-shadow .3s; }
.upg-stage.win { box-shadow: inset 0 0 0 1.5px rgba(57,217,138,0.6), 0 0 30px rgba(57,217,138,0.3); }
.upg-stage.lose { box-shadow: inset 0 0 0 1.5px rgba(255,92,122,0.6), 0 0 30px rgba(255,92,122,0.3); animation: crashShake .4s; }

/* колесо: серый трек + зелёная дуга шанса, отсчёт от 12 часов по часовой */
.upg-wheel { position: absolute; left: 50%; top: 50%; width: 216px; height: 216px; transform: translate(-50%,-50%) rotate(-90deg); }
.upg-track { fill: none; stroke: rgba(var(--fg-rgb),0.10); stroke-width: 13; }
.upg-arc { fill: none; stroke: #39D98A; stroke-width: 13; stroke-linecap: butt;
    filter: drop-shadow(0 0 6px rgba(57,217,138,0.55)); transition: stroke-dasharray .25s; }

/* стрелка: крутится вокруг центра сцены, остриё смотрит в дугу */
.upg-pointer { position: absolute; left: 50%; top: 50%; width: 0; height: 0; transform-origin: center; }
.upg-pointer i { position: absolute; left: -7px; top: -118px; width: 0; height: 0;
    border-left: 7px solid transparent; border-right: 7px solid transparent;
    border-top: 15px solid var(--fg); filter: drop-shadow(0 1px 3px rgba(0,0,0,0.45)); }

.upg-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
    pointer-events: none; text-align: center; }
.upg-chance { font-size: 42px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -1px; color: var(--fg); }
.upg-mult { margin-top: 4px; font-size: 13px; font-weight: 600; color: var(--hint); padding: 0 20px; }

/* слоты «ставка → цель» */
.upg-slots { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.upg-slot { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 4px;
    padding: 12px 8px; border-radius: 16px; background: var(--glass); border: 0.5px solid rgba(var(--fg-rgb),0.14);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }
.upg-slot img { width: 46px; height: 46px; object-fit: contain; }
.upg-slot-amt { height: 46px; display: flex; align-items: center; font-size: 19px; font-weight: 800; color: var(--fg); }
.upg-slot-cap { font-size: 11.5px; font-weight: 600; color: var(--hint); text-align: center;
    max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upg-arrow { flex-shrink: 0; font-size: 18px; font-weight: 800; color: var(--hint); }

.upg-grid-head { margin: 18px 0 8px; font-size: 13px; font-weight: 700; color: var(--hint); }
.upg-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.upg-card { position: relative; min-width: 0; padding: 8px 4px 7px; border-radius: 14px; cursor: pointer; font-family: inherit;
    background: var(--glass); border: 0.5px solid rgba(var(--fg-rgb),0.12); color: var(--fg);
    display: flex; flex-direction: column; align-items: center; gap: 3px; transition: transform .1s, border-color .2s; }
.upg-card:active { transform: scale(.95); }
.upg-card.active { border-color: rgba(94,139,255,0.9); box-shadow: 0 0 0 1px rgba(94,139,255,0.45), 0 4px 14px rgba(94,139,255,0.25); }
.upg-card img { width: 42px; height: 42px; object-fit: contain; }
.upg-card-name { font-size: 10.5px; font-weight: 600; color: var(--hint); max-width: 100%;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upg-card-price { font-size: 11.5px; font-weight: 800; }
.upg-card-chance { font-size: 10px; font-weight: 700; color: #39D98A; }
.upg-field { min-width: 0; }
.upg-input { min-width: 0; width: 100%; }
.upg-fair { text-align: center; font-size: 11.5px; color: var(--hint); opacity: .7; margin-top: 12px; }

/* ─── Инвентарь (четвёртый режим вкладки «Игры») ────────────────── */
.inv-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 4px 2px 10px; }
.inv-title { font-size: 17px; font-weight: 800; }
.inv-sum { font-size: 12.5px; color: var(--hint); }
.inv-sum b { color: var(--fg); }
.inv-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.inv-card { position: relative; min-width: 0; padding: 10px 5px 8px; border-radius: 16px; cursor: pointer;
    font-family: inherit; background: var(--glass); border: 0.5px solid rgba(var(--fg-rgb),0.12);
    color: var(--fg); display: flex; flex-direction: column; align-items: center; gap: 4px;
    transition: transform .1s, border-color .2s; }
.inv-card:active { transform: scale(.96); }
.inv-card.busy { opacity: .55; }
.inv-card img { width: 54px; height: 54px; object-fit: contain; }
.inv-card-name { font-size: 11px; font-weight: 600; color: var(--hint); max-width: 100%;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inv-card-val { font-size: 12.5px; font-weight: 800; }
.inv-card-src { font-size: 9.5px; font-weight: 700; letter-spacing: .3px; text-transform: uppercase;
    color: rgba(var(--fg-rgb),0.35); }
.inv-card-badge { font-size: 9.5px; font-weight: 700; color: #FFC83D; }
.inv-empty { grid-column: 1 / -1; padding: 28px 16px; text-align: center; font-size: 13px;
    color: var(--hint); border-radius: 16px; background: rgba(var(--fg-rgb),0.03);
    border: 0.5px dashed rgba(var(--fg-rgb),0.14); }
.inv-hint { margin-top: 12px; text-align: center; font-size: 11.5px; color: var(--hint); opacity: .75; }

.inv-sheet-img { width: 132px; height: 132px; margin: 0 auto 14px; border-radius: 28px; display: flex;
    align-items: center; justify-content: center; background: rgba(var(--fg-rgb),0.05);
    border: 0.5px solid rgba(var(--fg-rgb),0.14); }
.inv-sheet-img img { width: 92px; height: 92px; object-fit: contain; }
.inv-sheet-name { font-size: 22px; font-weight: 800; letter-spacing: -0.4px; }
.inv-sheet-val { font-size: 13px; color: var(--hint); margin-top: 3px; }
.inv-sheet-val b { color: var(--fg); }
.inv-sheet-note { font-size: 11.5px; color: rgba(var(--fg-rgb),0.45); margin-top: 6px; }
.inv-sheet-actions { display: flex; gap: 10px; margin-top: 20px; }
.inv-btn-primary { flex: 1; padding: 14px 0; border-radius: 15px; border: none; cursor: pointer;
    background: var(--grad); color: #fff; font-weight: 700; font-size: 14.5px; font-family: inherit;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.3), 0 6px 18px rgba(94,139,255,0.33); }
.inv-btn-secondary { flex: 1; padding: 14px 0; border-radius: 15px; cursor: pointer; font-family: inherit;
    border: 0.5px solid rgba(var(--fg-rgb),0.16); background: rgba(var(--fg-rgb),0.06);
    color: var(--fg); font-weight: 700; font-size: 14.5px; }
.inv-btn-ghost { width: 100%; margin-top: 10px; padding: 12px 0; border-radius: 14px; cursor: pointer;
    font-family: inherit; border: 0.5px solid rgba(var(--fg-rgb),0.16); background: rgba(var(--fg-rgb),0.06);
    color: var(--fg); font-weight: 700; font-size: 14px; }
.inv-btn-primary:disabled, .inv-btn-secondary:disabled { opacity: .6; }

/* ─── Пузырь инвентаря (Кейсы и Апгрейд) ────────────────────────── */
.inv-fab { position: fixed; right: 16px; bottom: calc(20px + env(safe-area-inset-bottom)); z-index: 900;
    width: 58px; height: 58px; border-radius: 50%; border: none; cursor: pointer; padding: 0;
    display: flex; align-items: center; justify-content: center; color: #fff;
    background: var(--grad);
    box-shadow: 0 10px 26px rgba(94,139,255,0.45), 0 2px 6px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.35);
    transition: transform .15s, opacity .2s; -webkit-tap-highlight-color: transparent; }
.inv-fab.hidden { display: none; }
.inv-fab:active { transform: scale(.92); }
.inv-fab.bump { animation: invFabBump .55s cubic-bezier(.3,1.6,.5,1); }
@keyframes invFabBump { 0% { transform: scale(1); } 35% { transform: scale(1.22); } 100% { transform: scale(1); } }
.inv-fab-badge { position: absolute; top: -3px; right: -3px; min-width: 21px; height: 21px; padding: 0 6px;
    border-radius: 11px; background: #FF4D6D; color: #fff; font-size: 11.5px; font-weight: 800;
    line-height: 21px; text-align: center; font-variant-numeric: tabular-nums;
    box-shadow: 0 0 0 2px var(--bg, #0b0d14); }
.inv-fab-badge.hidden { display: none; }
/* место под пузырём, чтобы он не закрывал последний ряд карточек */
body.inv-fab-on main { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }

.inv-back { display: inline-flex; align-items: center; margin: -2px 0 6px; padding: 6px 2px; border: none;
    background: transparent; color: var(--hint); font-size: 14px; font-weight: 700; font-family: inherit; cursor: pointer; }

/* Апгрейд: поиск и сортировка целей */
.upg-count { font-weight: 600; opacity: .6; margin-left: 4px; }
.upg-tools { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.upg-search { display: flex; align-items: center; gap: 8px; padding: 0 12px; border-radius: 13px; color: var(--hint);
    background: var(--glass); border: 0.5px solid rgba(var(--fg-rgb),0.14); }
.upg-search input { flex: 1; min-width: 0; background: transparent; border: none; outline: none; color: var(--fg);
    font-size: 15px; font-weight: 600; font-family: inherit; padding: 11px 0; }
.upg-search input::-webkit-search-cancel-button { -webkit-appearance: none; }
.upg-sort { display: flex; gap: 6px; }
.upg-sort button { flex: 1; padding: 8px 0; border-radius: 11px; cursor: pointer; font-family: inherit;
    font-size: 12.5px; font-weight: 700; color: var(--hint); background: rgba(var(--fg-rgb),0.05);
    border: 0.5px solid rgba(var(--fg-rgb),0.10); transition: color .15s, background .15s; }
.upg-sort button.active { color: #fff; background: var(--grad); border-color: transparent; }

/* Инвентарь в режиме выбора ставки: предмет, который не поставить ни на одну цель */
.inv-card.locked { opacity: .42; }
.inv-card-lock { font-size: 9.5px; font-weight: 700; color: #FF8A8A; }


/* ─── Витрина товаров (пока заглушки, только на /dev/) ──────────────── */
.shop-note {
    font-size: 12px;
    color: rgba(var(--fg-rgb),0.55);
    text-align: center;
    margin: 2px 0 12px;
}
.shop-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.shop-card {
    border-radius: 22px;
    padding: 0;
    cursor: pointer;
    user-select: none;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform .14s;
}
.shop-card:active { transform: scale(.96); }
.shop-ico {
    height: 74px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 34px;
    line-height: 1;
}
.shop-body { padding: 10px 12px 0; flex: 1; }
.shop-name {
    font-size: 13px;
    font-weight: 700;
    color: rgba(var(--fg-rgb),0.92);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.shop-desc {
    font-size: 11px;
    color: rgba(var(--fg-rgb),0.55);
    margin-top: 2px;
    line-height: 1.25;
}
.shop-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 12px 11px;
}
.shop-price {
    font-size: 12.5px;
    font-weight: 700;
    color: rgba(var(--fg-rgb),0.9);
    display: inline-flex;
    align-items: center;
    gap: 1px;
}
.shop-price img { height: 1.25em; width: auto; vertical-align: -0.24em; margin-left: -0.1em; }
.shop-go {
    font-size: 11.5px;
    font-weight: 700;
    color: #fff;
    background: var(--grad);
    border-radius: 999px;
    padding: 4px 10px;
}

/* Широкая карточка — GRAM внизу витрины занимает всю строку */
.shop-card-wide { grid-column: 1 / -1; flex-direction: row; align-items: center; }
.shop-card-wide .shop-ico { width: 74px; flex: 0 0 74px; height: 100%; min-height: 64px; }
.shop-card-wide .shop-body { padding: 12px; }
.shop-card-wide .shop-foot { padding: 12px; gap: 10px; flex: 0 0 auto; }

/* ─── Хаб игр: карточка = арт + название + описание ──────────────────
   Классы .frag-subtab и data-game сохранены намеренно: на них висит
   переключение режимов из crash.js, а crash.js и upgrade.js показывают
   и прячут свои кнопки через style.display. */
.frag-subtabs.game-hub {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding: 0;
    background: none;
    border: none;
    box-shadow: none;
    border-radius: 0;
    margin: 8px 0 14px;
}
.game-card {
    flex: none;
    min-width: 0;
    padding: 10px 10px 12px;
    border-radius: 18px;
    text-align: center;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    background: var(--glass);
    backdrop-filter: blur(28px) saturate(180%);
    -webkit-backdrop-filter: blur(28px) saturate(180%);
    border: 0.5px solid rgba(var(--fg-rgb),0.12);
    box-shadow: inset 0 1px 0 rgba(var(--fg-rgb),0.14), 0 8px 22px rgba(0,0,0,0.2);
    transition: transform .14s, border-color .2s;
    -webkit-tap-highlight-color: transparent;
    outline: none;
    white-space: normal;        /* .frag-subtab ставит nowrap — описание распирало колонку */
    overflow: hidden;
}
.game-card:active { transform: scale(.97); }
/* выбранный режим не выделяем: после клика список всё равно прячется */
.game-card, .game-card.active { opacity: 1; }
.game-card.active {
    background: var(--glass);
    color: inherit;
    /* .frag-subtab.active даёт синее свечение — карточкам оно не нужно */
    box-shadow: inset 0 1px 0 rgba(var(--fg-rgb),0.14), 0 8px 22px rgba(0,0,0,0.2);
}

.game-ico {
    height: 132px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    padding: 0;
}
/* арты вытянутые и с прозрачным фоном — показываем целиком, иначе срежет
   нижние плашки с надписями «КЕЙСЫ», «PLINKO», «TOWER» */
.game-ico img {
    height: 100%;
    width: 100%;
    object-fit: contain;
    display: block;
    filter: drop-shadow(0 6px 14px rgba(0,0,0,0.5));
}
.game-body { margin-top: 8px; min-width: 0; }
.game-name {
    font-size: 13px;
    font-weight: 800;
    white-space: normal;
    letter-spacing: .02em;
    color: rgba(var(--fg-rgb),0.95);
}
.game-desc {
    font-size: 11px;
    line-height: 1.3;
    color: rgba(var(--fg-rgb),0.5);
    margin-top: 3px;
    white-space: normal;
    overflow-wrap: anywhere;
    min-height: 2.6em;          /* две строки — карточки стоят ровно */
    padding: 0 2px;
}

/* Кнопка возврата из режима к списку игр */
.game-back {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin: 4px 0 12px;
    padding: 7px 13px 7px 10px;
    border-radius: 999px;
    border: 0.5px solid rgba(var(--fg-rgb),0.12);
    background: var(--glass);
    backdrop-filter: blur(28px) saturate(180%);
    -webkit-backdrop-filter: blur(28px) saturate(180%);
    box-shadow: inset 0 1px 0 rgba(var(--fg-rgb),0.14);
    color: rgba(var(--fg-rgb),0.75);
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    transition: transform .12s;
}
.game-back:active { transform: scale(.95); }


/* ─── Мины ──────────────────────────────────────────────────────────── */
/* выбор валюты — первым блоком, как в остальных играх */
.mines-cur-row { margin: 2px 0 10px; }
.mines-top { display: flex; gap: 10px; margin: 2px 0 12px; }
.mines-stat {
    flex: 1;
    border-radius: 16px;
    padding: 10px 14px;
    background: var(--glass);
    backdrop-filter: blur(28px) saturate(180%);
    -webkit-backdrop-filter: blur(28px) saturate(180%);
    border: 0.5px solid rgba(var(--fg-rgb),0.12);
    box-shadow: inset 0 1px 0 rgba(var(--fg-rgb),0.14);
}
.mines-lbl { display: block; font-size: 11px; color: rgba(var(--fg-rgb),0.55); }
.mines-stat b { font-size: 17px; font-weight: 800; font-variant-numeric: tabular-nums; }

.mines-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 7px; margin-bottom: 14px; }
.mines-cell {
    aspect-ratio: 1;
    border-radius: 14px;
    border: 0.5px solid rgba(var(--fg-rgb),0.12);
    background: var(--glass);
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    box-shadow: inset 0 1px 0 rgba(var(--fg-rgb),0.12);
    font-size: 22px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-family: inherit;
    -webkit-tap-highlight-color: transparent;
    transition: transform .1s, background .2s;
}
.mines-cell:active { transform: scale(.9); }
/* пока сервер отвечает (~80 мс + сеть), клетка должна жить: без этого тап
   выглядит залипшим, хотя запрос уже ушёл */
.mines-opening {
    background: rgba(94,139,255,0.2) !important;
    border-color: rgba(94,139,255,0.5) !important;
    animation: minesPulse .6s ease-in-out infinite;
}
@keyframes minesPulse {
    0%, 100% { opacity: 1; }
    50%      { opacity: .55; }
}
/* символ появляется рывком, а не просто подставляется в клетку */
.mines-safe, .mines-bomb { animation: minesPop .18s cubic-bezier(.2,1.4,.4,1); }
@keyframes minesPop {
    from { transform: scale(.55); opacity: 0; }
    to   { transform: scale(1);   opacity: 1; }
}
/* размер иконки внутри клетки: 56% стороны — так же читается и на мелких экранах */
.mines-svg { width: 56%; height: 56%; display: block; }
.mines-safe { background: rgba(72,207,173,0.18); border-color: rgba(72,207,173,0.45); }
.mines-bomb { background: rgba(255,92,122,0.16); border-color: rgba(255,92,122,0.4); }
.mines-hit  { background: rgba(255,92,122,0.42); border-color: rgba(255,92,122,0.9); }

.mines-panel { margin-bottom: 12px; }
.mines-panel.mines-locked { opacity: .45; pointer-events: none; }
.mines-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 9px; }
.mines-counts, .mines-bet { display: flex; gap: 6px; align-items: center; }
.mines-count, .mines-chip {
    border: 0.5px solid rgba(var(--fg-rgb),0.12);
    background: var(--glass);
    color: rgba(var(--fg-rgb),0.7);
    border-radius: 10px;
    padding: 6px 10px;
    font-size: 12.5px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.mines-count.active { background: var(--grad); color: #fff; border-color: transparent; }
.mines-bet input {
    width: 92px;
    border-radius: 10px;
    border: 0.5px solid rgba(var(--fg-rgb),0.12);
    background: var(--glass);
    color: var(--fg);
    padding: 6px 9px;
    font-size: 13px;
    font-weight: 700;
    font-family: inherit;
    text-align: center;
}
.mines-cur { display: flex; gap: 4px; padding: 3px; border-radius: 12px;
    background: var(--glass); border: 0.5px solid rgba(var(--fg-rgb),0.12); }
.mines-cur .currency-pill {
    border: none; background: transparent; border-radius: 9px;
    padding: 5px 11px; cursor: pointer; line-height: 0;
    -webkit-tap-highlight-color: transparent;
}
.mines-cur .currency-pill.active { background: var(--grad); }
.mines-cur .currency-ico { height: 16px; width: auto; }

.mines-hint { font-size: 12px; color: rgba(var(--fg-rgb),0.6); text-align: center; margin-top: 9px; min-height: 16px; }


/* ─── Пополнение Steam ──────────────────────────────────────────────── */
.steam-head { display: flex; align-items: center; gap: 12px; margin: 4px 0 14px; }
.steam-logo { height: 46px; width: auto; border-radius: 12px; }
.steam-title { font-size: 17px; font-weight: 800; }
.steam-sub { font-size: 12px; color: rgba(var(--fg-rgb),0.55); margin-top: 2px; line-height: 1.3; }
.steam-cur { margin-bottom: 12px; }
.steam-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .04em;
    color: rgba(var(--fg-rgb),0.5);
    margin: 12px 2px 7px;
}
.steam-input {
    width: 100%;
    border-radius: 14px;
    border: 0.5px solid rgba(var(--fg-rgb),0.12);
    background: var(--glass);
    backdrop-filter: blur(28px) saturate(180%);
    -webkit-backdrop-filter: blur(28px) saturate(180%);
    box-shadow: inset 0 1px 0 rgba(var(--fg-rgb),0.14);
    color: var(--fg);
    padding: 13px 14px;
    font-size: 15px;
    font-family: inherit;
    box-sizing: border-box;
}
.steam-input::placeholder { color: rgba(var(--fg-rgb),0.38); }
.steam-sums { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.steam-sum {
    border-radius: 13px;
    border: 0.5px solid rgba(var(--fg-rgb),0.12);
    background: var(--glass);
    color: rgba(var(--fg-rgb),0.8);
    padding: 12px 6px;
    font-size: 15px;
    font-weight: 800;
    font-family: inherit;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: transform .1s;
}
.steam-sum:active { transform: scale(.95); }
.steam-sum.active { background: var(--grad); color: #fff; border-color: transparent; }
.steam-custom { position: relative; margin-top: 8px; }
.steam-cur-sign {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 15px;
    font-weight: 700;
    color: rgba(var(--fg-rgb),0.45);
    pointer-events: none;
}
.steam-amount { padding-left: 30px; font-weight: 700; }
.steam-amount::-webkit-outer-spin-button,
.steam-amount::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.steam-amount { -moz-appearance: textfield; }

.steam-total {
    margin: 14px 2px 12px;
    font-size: 14.5px;
    text-align: center;
    color: rgba(var(--fg-rgb),0.8);
}
.steam-total b { font-size: 17px; font-weight: 800; color: var(--fg); }
.steam-usd { color: rgba(var(--fg-rgb),0.5); font-size: 12.5px; }
.steam-warn {
    margin: 10px 4px 0;
    font-size: 11.5px;
    line-height: 1.35;
    color: rgba(255,170,90,0.85);
    text-align: center;
}
.steam-status {
    margin: 12px 2px 0;
    font-size: 13px;
    text-align: center;
    color: rgba(var(--fg-rgb),0.75);
    min-height: 18px;
}


/* ─── Подписки ИИ ───────────────────────────────────────────────────── */
.ai-ico {
    width: 46px; height: 46px;
    border-radius: 13px;
    display: flex; align-items: center; justify-content: center;
    font-size: 24px;
    background: linear-gradient(135deg, #10a37f, #0b6b53);
}
.ai-ico-claude { background: linear-gradient(135deg, #d97757, #a8452a); }

.ai-plans { display: flex; flex-direction: column; gap: 8px; }
.ai-plan {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    width: 100%;
    border-radius: 14px;
    border: 0.5px solid rgba(var(--fg-rgb),0.12);
    background: var(--glass);
    backdrop-filter: blur(28px) saturate(180%);
    -webkit-backdrop-filter: blur(28px) saturate(180%);
    box-shadow: inset 0 1px 0 rgba(var(--fg-rgb),0.14);
    color: var(--fg);
    padding: 13px 14px;
    font-family: inherit;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: transform .1s, border-color .2s;
}
.ai-plan:active { transform: scale(.98); }
.ai-plan.active { border-color: rgba(94,139,255,0.6); box-shadow: 0 6px 18px rgba(94,139,255,0.28); }
.ai-plan-name { font-size: 14px; font-weight: 700; }
.ai-plan-cost { font-size: 13.5px; font-weight: 800; color: rgba(var(--fg-rgb),0.85); white-space: nowrap; }

.ai-methods { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ai-method {
    border-radius: 13px;
    border: 0.5px solid rgba(var(--fg-rgb),0.12);
    background: var(--glass);
    color: rgba(var(--fg-rgb),0.8);
    padding: 11px 6px;
    font-size: 13px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.ai-method.active { background: var(--grad); color: #fff; border-color: transparent; }
.ai-hint {
    font-size: 11.5px;
    line-height: 1.35;
    color: rgba(var(--fg-rgb),0.55);
    margin: 9px 2px 0;
}


/* ─── Plinko ────────────────────────────────────────────────────────── */
.plinko-cur { margin-bottom: 10px; }
.plinko-stage {
    border-radius: 20px;
    overflow: hidden;
    background: radial-gradient(120% 90% at 50% 0%, rgba(94,139,255,0.12), rgba(var(--fg-rgb),0.02));
    border: 0.5px solid rgba(var(--fg-rgb),0.12);
    box-shadow: inset 0 1px 0 rgba(var(--fg-rgb),0.12);
}
.plinko-stage canvas { display: block; width: 100%; }

/* ряд ячеек переехал в canvas (см. drawSlots в plinko.js): шарик должен падать
   внутрь корзинки, а HTML-блок под канвасом этого не позволял */

.plinko-panel { margin-bottom: 12px; }
.plinko-opts { display: flex; gap: 6px; }
.plinko-opt {
    border: 0.5px solid rgba(var(--fg-rgb),0.12);
    background: var(--glass);
    color: rgba(var(--fg-rgb),0.7);
    border-radius: 10px;
    padding: 6px 11px;
    font-size: 12.5px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.plinko-opt.active { background: var(--grad); color: #fff; border-color: transparent; }
.plinko-recent { display: block; margin-top: 5px; font-size: 11px; }
.plinko-recent i { font-style: normal; margin: 0 4px; font-weight: 700; }


/* ─── Лесенка ───────────────────────────────────────────────────────── */
.ladder-cur { margin-bottom: 10px; }
/* Корень режима не должен выходить за экран: флекс-строки с гридом внутри
   по умолчанию не сжимаются уже содержимого (min-width: auto), и на четырёх
   плитках доска распирала вьюпорт вбок. */
#ladder-root { max-width: 100%; overflow-x: hidden; }
.ladder-board {
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin-bottom: 14px;
    max-width: 100%;
}
.ladder-row {
    display: flex;
    align-items: center;
    gap: 10px;
    opacity: .5;
    min-width: 0;                 /* без этого строка не ужимается под экран */
    transition: opacity .2s;
}
.ladder-row.ladder-now, .ladder-row.ladder-done { opacity: 1; }

/* подпись слева: номер ступени сверху, множитель под ним — как в референсе */
.ladder-label { flex: 0 0 54px; min-width: 0; line-height: 1.15; }
.ladder-lvl {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: rgba(var(--fg-rgb),0.45);
    letter-spacing: .02em;
}
.ladder-mult { display: block; font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; }

/* цвет чередуется по чётности ступени */
.ladder-c0 .ladder-mult { color: #2ec5c5; }
.ladder-c1 .ladder-mult { color: #a855f7; }

.ladder-tiles { flex: 1 1 auto; min-width: 0; display: grid; gap: 7px; }
.ladder-tile {
    aspect-ratio: 1;
    width: 100%;
    max-height: 58px;
    min-width: 0;
    box-sizing: border-box;
    border-radius: 13px;
    border: 1.5px solid;
    background: transparent;
    font-size: 15px;
    font-weight: 800;
    font-family: inherit;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: transform .1s, background .2s, box-shadow .2s;
}
.ladder-c0 .ladder-tile {
    border-color: rgba(46,197,197,0.55);
    background: linear-gradient(160deg, rgba(46,197,197,0.14), rgba(46,197,197,0.03));
}
.ladder-c1 .ladder-tile {
    border-color: rgba(168,85,247,0.5);
    background: linear-gradient(160deg, rgba(168,85,247,0.16), rgba(168,85,247,0.03));
}
.ladder-now .ladder-tile { box-shadow: 0 0 14px rgba(94,139,255,0.25); }
.ladder-tile:active:not(:disabled) { transform: scale(.94); }
.ladder-tile:disabled { cursor: default; }

/* пройденная плитка и вскрытый провал */
.ladder-ok {
    background: rgba(72,207,173,0.3) !important;
    border-color: rgba(72,207,173,0.85) !important;
    box-shadow: inset 0 0 12px rgba(72,207,173,0.35);
}
.ladder-trap {
    background: rgba(255,92,122,0.28) !important;
    border-color: rgba(255,92,122,0.85) !important;
}
.ladder-wait { animation: minesPulse .6s ease-in-out infinite; }
.ladder-panel { margin-bottom: 12px; }

/* Сложности сеткой во всю ширину: в строке рядом с подписью четвёртая кнопка
   («безумный») не помещалась и обрезалась за краем экрана. */
.ladder-field { margin-bottom: 10px; }
.ladder-field .mines-lbl { display: block; margin: 0 2px 6px; }
.ladder-modes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.ladder-mode {
    min-width: 0;
    padding: 8px 2px;
    border-radius: 11px;
    border: 0.5px solid rgba(var(--fg-rgb),0.12);
    background: var(--glass);
    color: rgba(var(--fg-rgb),0.7);
    font-size: 12px;
    font-weight: 700;
    font-family: inherit;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.ladder-mode.active { background: var(--grad); color: #fff; border-color: transparent; }
