/* ============================================
   MR.VIP TMA — Production-Quality Fintech App
   ============================================ */

/* ---- Telegram-style Frame ---- */
body.tma-body {
  margin:0; padding:0; background:var(--bg-page); overflow:hidden;
  height:100vh; height:100dvh;
}
@media(min-width:500px) {
  body.tma-body {
    background:#DFE3E8; display:flex; align-items:center; justify-content:center;
  }
}
.tma-frame {
  width:100%; max-width:100%; height:100vh; height:100dvh;
  display:flex; flex-direction:column; overflow:hidden;
  background:var(--bg-page); position:relative;
}
@media(min-width:500px) {
  .tma-frame {
    width:390px; height:844px; max-height:90vh;
    border-radius:40px; border:6px solid #1C1C1E;
    box-shadow:0 20px 60px rgba(0,0,0,0.15), 0 0 0 1px rgba(0,0,0,0.05);
    overflow:hidden;
  }
}

/* ---- Telegram Status Bar Mock ---- */
.tg-status-bar {
  height:44px; display:flex; align-items:flex-end; justify-content:space-between;
  padding:0 20px 4px; background:var(--bg-primary); flex-shrink:0;
  font-size:var(--fs-12); font-weight:600; color:var(--text-primary);
}
.tg-status-bar__left { display:flex; align-items:center; gap:4px; }
.tg-status-bar__right { display:flex; align-items:center; gap:5px; font-size:11px; }
@media(max-width:499px) { .tg-status-bar { display:none; } }

/* ---- TG Top Bar (back + title + more) ---- */
.tg-topbar {
  height:44px; display:flex; align-items:center; padding:0 12px;
  background:var(--bg-primary); flex-shrink:0; gap:8px;
  border-bottom:0.5px solid var(--border);
}
.tg-topbar__back {
  width:32px; height:32px; display:flex; align-items:center; justify-content:center;
  color:var(--brand); border-radius:50%;
}
.tg-topbar__back svg { width:20px; height:20px; }
.tg-topbar__avatar {
  width:28px; height:28px; border-radius:50%; background:var(--brand);
  display:flex; align-items:center; justify-content:center;
  font-size:11px; font-weight:800; color:white; flex-shrink:0;
}
.tg-topbar__info { flex:1; }
.tg-topbar__name { font-size:var(--fs-14); font-weight:600; color:var(--text-primary); line-height:1.2; }
.tg-topbar__sub { font-size:var(--fs-11); color:var(--text-tertiary); }
.tg-topbar__more {
  width:32px; height:32px; display:flex; align-items:center; justify-content:center;
  color:var(--text-secondary);
}

/* ---- App Header (inside TMA webview) ---- */
.app-header {
  height:48px; display:flex; align-items:center; justify-content:space-between;
  padding:0 16px; background:var(--bg-primary); flex-shrink:0;
}
.app-header__logo { font-size:var(--fs-18); font-weight:800; color:var(--text-primary); letter-spacing:0.3px; }
.app-header__logo b { color:var(--brand); font-weight:800; }
.app-header__right { display:flex; align-items:center; gap:4px; }
.app-header__btn {
  width:36px; height:36px; display:flex; align-items:center; justify-content:center;
  border-radius:50%; color:var(--text-secondary); transition:all var(--ease-fast); position:relative;
}
.app-header__btn:active { background:var(--bg-tertiary); transform:scale(0.92); }
.app-header__btn svg { width:22px; height:22px; }
.app-header__dot {
  position:absolute; top:6px; right:6px; width:7px; height:7px;
  background:var(--danger); border-radius:50%; border:1.5px solid var(--bg-primary);
}

/* ---- Scrollable Content ---- */
.app-scroll {
  flex:1; overflow-y:auto; overflow-x:hidden;
  -webkit-overflow-scrolling:touch;
}
.app-page { display:none; }
.app-page.active { display:block; }

/* ---- Tab Bar ---- */
.app-tabbar {
  height:50px; display:flex; align-items:stretch; background:var(--bg-primary);
  border-top:0.5px solid var(--border); flex-shrink:0; padding-bottom:env(safe-area-inset-bottom,0);
}
.app-tab {
  flex:1; display:flex; flex-direction:column; align-items:center; justify-content:center;
  gap:1px; color:var(--text-tertiary); font-size:10px; font-weight:500;
  transition:color var(--ease-fast); position:relative; -webkit-tap-highlight-color:transparent;
}
.app-tab:active { opacity:0.6; }
.app-tab svg { width:22px; height:22px; stroke-width:1.7; }
.app-tab.active { color:var(--brand); }
.app-tab.active svg { stroke-width:2; }
.app-tab__badge {
  position:absolute; top:4px; right:calc(50% - 18px);
  width:5px; height:5px; background:var(--danger); border-radius:50%;
}

/* ---- Telegram Bottom Safe Area ---- */
.tg-safe-bottom {
  height:env(safe-area-inset-bottom, 0); background:var(--bg-primary); flex-shrink:0;
}
@media(min-width:500px) { .tg-safe-bottom { height:20px; } }

/* ================================================
   HOME PAGE
   ================================================ */
.home-pad { padding:12px 16px 20px; }

/* Balance Card */
.bal-card {
  background:linear-gradient(135deg, #3366FF 0%, #2952CC 100%);
  border-radius:16px; padding:20px; color:white; position:relative; overflow:hidden;
}
.bal-card::after {
  content:''; position:absolute; top:-30%; right:-15%;
  width:160px; height:160px;
  background:radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
  border-radius:50%;
}
.bal-card__row { display:flex; align-items:center; justify-content:space-between; }
.bal-card__label { font-size:13px; opacity:0.75; font-weight:400; }
.bal-card__eye { opacity:0.6; }
.bal-card__eye:active { opacity:1; }
.bal-card__eye svg { width:18px; height:18px; stroke:white; }
.bal-card__amount { font-size:34px; font-weight:800; margin:6px 0 2px; letter-spacing:-0.5px; font-variant-numeric:tabular-nums; }
.bal-card__sub { font-size:12px; opacity:0.55; margin-bottom:16px; }
.bal-card__btns { display:flex; gap:8px; position:relative; z-index:1; }
.bal-btn {
  flex:1; display:flex; flex-direction:column; align-items:center; gap:4px;
  padding:10px 0; background:rgba(255,255,255,0.18); border-radius:12px;
  font-size:11px; font-weight:500; backdrop-filter:blur(4px);
  transition:background var(--ease-fast);
}
.bal-btn:active { background:rgba(255,255,255,0.28); }
.bal-btn svg { width:20px; height:20px; }

/* MR Points */
.mr-strip {
  display:flex; align-items:center; gap:10px;
  margin-top:12px; padding:10px 14px;
  background:var(--bg-primary); border:1px solid #F3E8C0;
  border-radius:12px;
}
.mr-strip__star { font-size:20px; }
.mr-strip__mid { flex:1; }
.mr-strip__pts { font-size:13px; font-weight:700; color:var(--gold); }
.mr-strip .progress { margin-top:5px; height:5px; }

/* Quick Actions */
.quick-actions {
  display:grid; grid-template-columns:repeat(4,1fr); gap:4px; margin-top:16px;
}
.qa {
  display:flex; flex-direction:column; align-items:center; gap:6px;
  padding:14px 4px 10px; border-radius:12px;
  font-size:11px; color:var(--text-secondary); font-weight:500;
  transition:all var(--ease-fast); -webkit-tap-highlight-color:transparent;
}
.qa:active { background:var(--bg-tertiary); transform:scale(0.95); }
.qa__icon {
  width:46px; height:46px; border-radius:14px;
  display:flex; align-items:center; justify-content:center; font-size:24px;
}

/* Section */
.sec { margin-top:20px; }
.sec__head { display:flex; align-items:center; justify-content:space-between; margin-bottom:10px; }
.sec__title { font-size:15px; font-weight:700; }
.sec__link { font-size:12px; color:var(--text-tertiary); }

/* Assets */
.coin-row {
  display:flex; align-items:center; padding:12px 0; gap:12px;
  border-bottom:0.5px solid var(--border-light);
}
.coin-row:last-child { border-bottom:none; }
.coin-logo {
  width:38px; height:38px; border-radius:50%; display:flex; align-items:center;
  justify-content:center; font-size:15px; font-weight:800; color:white; flex-shrink:0;
}
.coin-info { flex:1; min-width:0; }
.coin-name { font-size:14px; font-weight:600; }
.coin-net { font-size:11px; color:var(--text-tertiary); }
.coin-chart { width:52px; height:24px; flex-shrink:0; }
.coin-right { text-align:right; min-width:0; }
.coin-bal { font-size:14px; font-weight:600; font-variant-numeric:tabular-nums; }
.coin-val { font-size:11px; color:var(--text-tertiary); }

/* TX */
.tx-row {
  display:flex; align-items:center; padding:10px 0; gap:10px;
  border-bottom:0.5px solid var(--border-light);
}
.tx-row:last-child { border-bottom:none; }
.tx-ico {
  width:34px; height:34px; border-radius:10px; display:flex;
  align-items:center; justify-content:center; flex-shrink:0; font-size:14px;
}
.tx-mid { flex:1; min-width:0; }
.tx-label { font-size:13px; font-weight:500; }
.tx-time { font-size:11px; color:var(--text-tertiary); }
.tx-amt { font-size:13px; font-weight:600; white-space:nowrap; font-variant-numeric:tabular-nums; }

/* ================================================
   REDPACKET PAGE
   ================================================ */
.rp-wrap { padding:0 16px 20px; }
.rp-hero { text-align:center; padding:24px 0 16px; position:relative; }
.rp-env {
  width:110px; height:142px; margin:0 auto 16px;
  background:linear-gradient(135deg,#EF4444 0%,#DC2626 100%);
  border-radius:18px; display:flex; flex-direction:column;
  align-items:center; justify-content:center;
  animation:rpBounce 3s ease-in-out infinite;
  box-shadow:0 6px 20px rgba(239,68,68,0.2);
}
.rp-env__seal {
  width:40px; height:40px; background:var(--gold-gradient); border-radius:50%;
  display:flex; align-items:center; justify-content:center; font-size:18px;
  box-shadow:0 2px 6px rgba(0,0,0,0.12); margin-bottom:4px;
}
.rp-env__text { color:#FDE68A; font-weight:700; font-size:13px; }
.rp-sparkle {
  position:absolute; width:5px; height:5px; background:var(--gold-light);
  border-radius:50%; animation:sparkle 2s ease-in-out infinite;
}

.rp-types-scroll { display:flex; gap:8px; overflow-x:auto; scrollbar-width:none; padding:2px 0; }
.rp-types-scroll::-webkit-scrollbar { display:none; }
.rp-type-card {
  min-width:90px; padding:12px 8px; background:var(--bg-primary);
  border:1px solid var(--border); border-radius:12px;
  text-align:center; flex-shrink:0; transition:all var(--ease-fast);
}
.rp-type-card:active { border-color:var(--danger); background:var(--danger-bg); }
.rp-type-card__icon { font-size:22px; margin-bottom:4px; }
.rp-type-card__name { font-size:11px; font-weight:600; }
.rp-type-card__sub { font-size:9px; color:var(--text-tertiary); margin-top:1px; }

/* Feed */
.feed-header { display:flex; align-items:center; gap:6px; font-weight:600; font-size:14px; }
.feed-dot { width:6px; height:6px; background:var(--success); border-radius:50%; animation:pulse 2s infinite; }
.feed-row {
  display:flex; align-items:center; gap:10px; padding:8px 10px; margin-bottom:4px;
  background:var(--bg-primary); border:0.5px solid var(--border-light);
  border-radius:10px; font-size:12px; animation:fadeInUp 0.25s ease;
}
.feed-av {
  width:26px; height:26px; border-radius:50%; background:var(--danger-bg);
  display:flex; align-items:center; justify-content:center; font-size:12px; flex-shrink:0;
}
.feed-text { flex:1; color:var(--text-secondary); }
.feed-text strong { color:var(--text-primary); }
.feed-amt { color:var(--gold); font-weight:700; white-space:nowrap; }

/* Stats */
.rp-stats-row { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; }
.rp-stat-box {
  text-align:center; padding:12px 8px; background:var(--bg-primary);
  border:1px solid var(--border); border-radius:12px;
}
.rp-stat-box__num { font-size:20px; font-weight:800; }
.rp-stat-box__txt { font-size:10px; color:var(--text-tertiary); margin-top:2px; }

/* RP Modal */
.sheet-overlay {
  position:fixed; inset:0; background:rgba(0,0,0,0.35); z-index:var(--z-modal);
  display:none; align-items:flex-end; justify-content:center;
  -webkit-tap-highlight-color:transparent;
}
.sheet-overlay.show { display:flex; }
.sheet {
  width:100%; max-width:390px; background:var(--bg-primary);
  border-radius:20px 20px 0 0; padding:0 20px 24px;
  animation:slideUp 0.28s cubic-bezier(0.32,0.72,0,1); max-height:88vh; overflow-y:auto;
}
.sheet__bar {
  width:36px; height:4px; background:var(--border); border-radius:var(--r-full);
  margin:10px auto 20px;
}
.sheet__title { font-size:17px; font-weight:700; text-align:center; margin-bottom:20px; }
.field { margin-bottom:16px; }
.field__label { font-size:13px; color:var(--text-secondary); margin-bottom:6px; display:block; }
.field__input {
  width:100%; padding:12px 14px; background:var(--bg-secondary); border:1px solid var(--border);
  border-radius:10px; color:var(--text-primary); font-size:15px; outline:none;
  transition:border-color var(--ease-fast);
}
.field__input:focus { border-color:var(--brand); background:var(--bg-primary); }
.pill-group { display:flex; gap:6px; }
.pill {
  flex:1; padding:8px; background:var(--bg-secondary); border:1.5px solid transparent;
  border-radius:10px; font-size:13px; text-align:center; color:var(--text-secondary);
  transition:all var(--ease-fast); font-weight:500;
}
.pill.active { background:var(--danger-bg); border-color:var(--danger); color:var(--danger); }
.toggle-row { display:flex; align-items:center; justify-content:space-between; padding:10px 0; }

/* ================================================
   SERVICES PAGE
   ================================================ */
.svc-wrap { padding:0 16px 20px; }

/* Promo Banner Carousel */
.promo-scroll { display:flex; gap:10px; overflow-x:auto; scrollbar-width:none; padding:12px 0 4px; }
.promo-scroll::-webkit-scrollbar { display:none; }
.promo-card {
  min-width:240px; padding:18px; border-radius:16px; flex-shrink:0;
  color:white; position:relative; overflow:hidden;
}
.promo-card__tag {
  position:absolute; top:12px; right:12px; padding:2px 8px;
  background:rgba(255,255,255,0.22); border-radius:var(--r-full);
  font-size:10px; font-weight:600; backdrop-filter:blur(4px);
}
.promo-card__title { font-size:15px; font-weight:700; margin-bottom:2px; }
.promo-card__desc { font-size:11px; opacity:0.75; }

/* Category */
.cat { margin-top:20px; }
.cat__label {
  font-size:11px; color:var(--text-tertiary); font-weight:600;
  margin-bottom:8px; letter-spacing:0.3px;
}
.cat__grid { display:grid; grid-template-columns:repeat(4,1fr); gap:2px; }
.svc-icon {
  display:flex; flex-direction:column; align-items:center; gap:5px;
  padding:12px 2px 8px; border-radius:10px; font-size:10px;
  color:var(--text-secondary); font-weight:500; cursor:pointer;
  -webkit-tap-highlight-color:transparent; transition:all var(--ease-fast);
}
.svc-icon:active { background:var(--bg-tertiary); transform:scale(0.95); }
.svc-icon__circle {
  width:42px; height:42px; border-radius:13px; display:flex;
  align-items:center; justify-content:center; font-size:21px;
}

/* Inline feature cards */
.inline-card {
  margin-top:12px; background:var(--bg-primary); border:1px solid var(--border);
  border-radius:14px; overflow:hidden;
}
.inline-card__head {
  display:flex; align-items:center; justify-content:space-between;
  padding:14px 16px; font-size:14px; font-weight:600;
}
.inline-card__body { padding:0 16px 14px; }
.rate-line {
  display:flex; align-items:center; justify-content:space-between;
  padding:8px 0; border-bottom:0.5px solid var(--border-light); font-size:13px;
}
.rate-line:last-child { border-bottom:none; }

/* vCard preview */
.vcard-preview {
  width:100%; padding:18px; background:linear-gradient(135deg,#1E293B,#334155);
  border-radius:14px; color:white; position:relative; overflow:hidden;
}
.vcard-preview::after {
  content:''; position:absolute; top:-30%; right:-20%;
  width:150px; height:150px; background:radial-gradient(circle,rgba(255,255,255,0.06),transparent);
  border-radius:50%;
}
.vcard-preview__brand { font-size:10px; opacity:0.5; letter-spacing:1px; }
.vcard-preview__num { font-size:15px; letter-spacing:3px; font-family:var(--font-mono); margin:12px 0 8px; }
.vcard-preview__row { display:flex; justify-content:space-between; font-size:10px; opacity:0.5; }

/* ================================================
   VIP PAGE
   ================================================ */
.vip-wrap { padding:0 16px 20px; }

.vip-banner {
  background:linear-gradient(135deg,#1E293B,#0F172A); border-radius:16px;
  padding:20px; color:white; position:relative; overflow:hidden; margin-top:12px;
}
.vip-banner::after {
  content:''; position:absolute; top:-25%; right:-10%;
  width:160px; height:160px; background:radial-gradient(circle,rgba(202,138,4,0.12),transparent);
  border-radius:50%;
}
.vip-banner__top { display:flex; align-items:center; gap:10px; margin-bottom:12px; }
.vip-banner__crown { font-size:26px; }
.vip-banner__level { font-size:20px; font-weight:800; }
.vip-banner__sub { font-size:11px; opacity:0.5; }
.vip-banner__prog-row { display:flex; justify-content:space-between; font-size:10px; opacity:0.6; margin-bottom:5px; }
.vip-banner .progress { background:rgba(255,255,255,0.1); height:7px; }
.vip-banner .progress-fill { background:var(--gold-gradient); }

/* Tier comparison */
.tier-grid {
  border:1px solid var(--border); border-radius:14px; overflow:hidden;
  background:var(--bg-primary); margin-top:16px;
}
.tier-hdr, .tier-row {
  display:grid; grid-template-columns:1.4fr repeat(3,1fr); font-size:11px;
}
.tier-hdr { background:var(--bg-secondary); font-weight:600; color:var(--text-secondary); }
.tier-hdr>div, .tier-row>div { padding:8px 10px; }
.tier-row { border-top:0.5px solid var(--border-light); }
.tier-row>div:not(:first-child) { text-align:center; }
.tier-hi { color:var(--gold); font-weight:700; }

/* Earn */
.earn-row {
  display:flex; align-items:center; gap:10px; padding:10px 0;
  border-bottom:0.5px solid var(--border-light);
}
.earn-row:last-child { border-bottom:none; }
.earn-ico {
  width:34px; height:34px; border-radius:10px; display:flex;
  align-items:center; justify-content:center; font-size:17px; flex-shrink:0;
}
.earn-mid { flex:1; }
.earn-name { font-size:13px; font-weight:600; }
.earn-desc { font-size:10px; color:var(--text-tertiary); }
.earn-pts { color:var(--gold); font-weight:700; font-size:12px; white-space:nowrap; }

/* Store scroll */
.store-row { display:flex; gap:8px; overflow-x:auto; scrollbar-width:none; padding:2px 0; }
.store-row::-webkit-scrollbar { display:none; }
.store-item {
  min-width:110px; padding:14px 10px; background:var(--bg-primary);
  border:1px solid var(--border); border-radius:14px;
  text-align:center; flex-shrink:0; transition:all var(--ease-fast);
}
.store-item:active { border-color:var(--gold); }
.store-item__icon { font-size:26px; margin-bottom:4px; }
.store-item__name { font-size:11px; font-weight:600; }
.store-item__cost { font-size:10px; color:var(--gold); font-weight:700; margin-top:2px; }

/* Checkin */
.checkin-row { display:grid; grid-template-columns:repeat(7,1fr); gap:6px; }
.ck-day {
  aspect-ratio:1; display:flex; flex-direction:column; align-items:center; justify-content:center;
  border-radius:10px; background:var(--bg-primary); border:1.5px solid var(--border);
  font-size:10px; gap:1px; transition:all var(--ease-fast);
  -webkit-tap-highlight-color:transparent;
}
.ck-day--done { background:var(--brand-bg); border-color:var(--brand); color:var(--brand); }
.ck-day--today { border-color:var(--gold); box-shadow:0 0 0 2px rgba(202,138,4,0.15); }
.ck-day:active { transform:scale(0.92); }
.ck-day__ico { font-size:15px; }
.ck-day__txt { font-size:8px; color:var(--text-tertiary); }

/* ================================================
   PROFILE PAGE
   ================================================ */
.prof-wrap { padding:0 16px 20px; }

.prof-header {
  display:flex; align-items:center; gap:14px; padding:16px;
  background:var(--bg-primary); border:1px solid var(--border);
  border-radius:16px; margin-top:12px;
}
.prof-av {
  width:50px; height:50px; border-radius:50%; background:var(--brand);
  display:flex; align-items:center; justify-content:center;
  font-size:20px; font-weight:800; color:white; flex-shrink:0;
}
.prof-name-row { display:flex; align-items:center; gap:6px; }
.prof-name { font-size:16px; font-weight:700; }
.prof-uid { font-size:11px; color:var(--text-tertiary); margin-top:2px; }

/* Stats */
.prof-nums {
  display:grid; grid-template-columns:repeat(4,1fr); gap:6px; margin-top:12px;
}
.prof-num {
  text-align:center; padding:10px 4px; background:var(--bg-primary);
  border:1px solid var(--border); border-radius:12px;
}
.prof-num__v { font-size:14px; font-weight:800; }
.prof-num__l { font-size:9px; color:var(--text-tertiary); margin-top:1px; }

/* Menu */
.menu-sec { margin-top:16px; }
.menu-sec__label {
  font-size:10px; color:var(--text-tertiary); font-weight:600;
  margin-bottom:6px; letter-spacing:0.3px;
}
.menu-list {
  background:var(--bg-primary); border:1px solid var(--border);
  border-radius:14px; overflow:hidden;
}
.menu-row {
  display:flex; align-items:center; gap:10px; padding:12px 14px;
  border-bottom:0.5px solid var(--border-light); transition:background var(--ease-fast);
  -webkit-tap-highlight-color:transparent;
}
.menu-row:last-child { border-bottom:none; }
.menu-row:active { background:var(--bg-secondary); }
.menu-ico {
  width:30px; height:30px; border-radius:8px; display:flex;
  align-items:center; justify-content:center; font-size:15px; flex-shrink:0;
}
.menu-txt { flex:1; font-size:13px; font-weight:500; }
.menu-val { display:flex; align-items:center; gap:4px; font-size:12px; color:var(--text-tertiary); }
.menu-arrow { color:var(--text-tertiary); font-size:14px; opacity:0.5; }

/* Referral */
.ref-box {
  margin-top:16px; padding:20px;
  background:var(--bg-primary); border:1px solid var(--border); border-radius:16px;
}
.ref-box__title { font-size:15px; font-weight:700; margin-bottom:12px; }
.ref-url {
  display:flex; align-items:center; gap:6px; padding:8px 10px;
  background:var(--bg-secondary); border-radius:8px;
  font-size:10px; font-family:var(--font-mono); color:var(--text-secondary);
}
.ref-url__text { flex:1; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ref-url__btn {
  padding:4px 10px; background:var(--brand); color:white;
  border-radius:6px; font-size:10px; font-weight:600; font-family:var(--font);
  flex-shrink:0;
}
.ref-url__btn:active { background:var(--brand-dark); }
.ref-tiers-row { display:flex; align-items:center; justify-content:center; gap:8px; margin-top:16px; }
.ref-tier-box {
  text-align:center; padding:10px 14px; background:var(--bg-secondary); border-radius:10px;
}
.ref-tier-box__pct { font-size:16px; font-weight:800; color:var(--gold); }
.ref-tier-box__label { font-size:9px; color:var(--text-tertiary); }
.ref-arrow { color:var(--text-tertiary); font-size:14px; }

/* ================================================
   OVERLAYS (Sub-pages)
   ================================================ */
.ov {
  position:fixed; inset:0; background:rgba(0,0,0,0.35); z-index:var(--z-modal);
  display:none; align-items:flex-end; justify-content:center;
}
.ov.show { display:flex; }
.ov-sheet {
  width:100%; max-width:390px; background:var(--bg-primary);
  border-radius:20px 20px 0 0; animation:slideUp 0.28s cubic-bezier(0.32,0.72,0,1);
  max-height:90vh; overflow-y:auto; display:flex; flex-direction:column;
}
.ov-head {
  display:flex; align-items:center; justify-content:space-between;
  padding:16px 20px; border-bottom:0.5px solid var(--border-light);
  position:sticky; top:0; background:var(--bg-primary); z-index:1; flex-shrink:0;
}
.ov-head__title { font-size:16px; font-weight:700; }
.ov-close {
  width:28px; height:28px; border-radius:50%; display:flex;
  align-items:center; justify-content:center; background:var(--bg-secondary);
  color:var(--text-secondary); font-size:14px;
}
.ov-body { padding:20px; flex:1; }

/* Swap */
.swap-box {
  background:var(--bg-secondary); border-radius:14px; padding:16px; margin-bottom:8px;
}
.swap-box__top { display:flex; justify-content:space-between; margin-bottom:8px; }
.swap-box__label { font-size:12px; color:var(--text-tertiary); }
.swap-box__bal { font-size:12px; color:var(--text-tertiary); }
.swap-box__row { display:flex; align-items:center; gap:10px; }
.swap-box__input {
  flex:1; background:transparent; border:none; font-size:24px;
  font-weight:700; color:var(--text-primary); outline:none; min-width:0;
}
.swap-box__input::placeholder { color:var(--text-tertiary); }
.swap-box__token {
  display:flex; align-items:center; gap:6px; padding:6px 12px;
  background:var(--bg-primary); border:1px solid var(--border);
  border-radius:var(--r-full); font-weight:600; font-size:13px; white-space:nowrap;
}
.swap-flip {
  display:flex; justify-content:center; margin:4px 0;
}
.swap-flip__btn {
  width:34px; height:34px; border-radius:50%; background:var(--bg-primary);
  border:1px solid var(--border); display:flex; align-items:center; justify-content:center;
  color:var(--text-secondary);
}
.swap-flip__btn:active { border-color:var(--brand); color:var(--brand); }
.swap-meta { display:flex; justify-content:space-between; font-size:11px; color:var(--text-tertiary); margin-top:8px; padding:0 2px; }

/* Tab pills (Deposit/Withdraw coin selector) */
.coin-pills { display:flex; gap:0; background:var(--bg-secondary); border-radius:10px; padding:3px; margin-bottom:16px; }
.coin-pill {
  flex:1; padding:8px; text-align:center; border-radius:8px;
  font-size:13px; font-weight:600; color:var(--text-secondary); transition:all var(--ease-fast);
}
.coin-pill.active { background:var(--bg-primary); color:var(--text-primary); box-shadow:var(--shadow-xs); }
.net-pills { display:flex; gap:6px; margin-bottom:16px; }
.net-pill {
  padding:7px 14px; border:1.5px solid var(--border); border-radius:8px;
  font-size:12px; font-weight:600; color:var(--text-secondary); transition:all var(--ease-fast);
}
.net-pill.active { border-color:var(--brand); color:var(--brand); background:var(--brand-bg); }

/* QR mock */
.qr-mock {
  width:160px; height:160px; margin:16px auto;
  background:var(--bg-secondary); border-radius:12px; border:1px solid var(--border);
  display:flex; align-items:center; justify-content:center; font-size:56px;
}
.addr-box {
  padding:10px; background:var(--bg-secondary); border-radius:8px;
  font-size:11px; font-family:var(--font-mono); color:var(--text-secondary);
  word-break:break-all; text-align:center; margin-bottom:16px;
}
.hint-box {
  padding:10px 12px; background:var(--gold-bg); border-radius:10px;
  font-size:11px; color:var(--gold); line-height:1.5;
}
.hint-box strong { font-weight:700; }

/* Topup amounts */
.amt-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; margin:10px 0; }
.amt-opt {
  padding:12px 4px; text-align:center; background:var(--bg-secondary);
  border:1.5px solid transparent; border-radius:10px; font-weight:600;
  font-size:14px; transition:all var(--ease-fast);
}
.amt-opt:active, .amt-opt.active { border-color:var(--brand); background:var(--brand-bg); color:var(--brand); }
.amt-opt__sub { font-size:10px; color:var(--text-tertiary); font-weight:400; margin-top:2px; }

/* Finance cards */
.fin-card {
  background:var(--bg-primary); border:1px solid var(--border);
  border-radius:14px; padding:16px; margin-bottom:10px;
}
.fin-card__top { display:flex; justify-content:space-between; align-items:center; margin-bottom:10px; }
.fin-card__name { font-weight:600; font-size:14px; }
.fin-card__sub { font-size:11px; color:var(--text-tertiary); }
.fin-card__apy { font-size:22px; font-weight:800; }
.fin-card__meta { display:flex; justify-content:space-between; font-size:11px; color:var(--text-tertiary); margin-bottom:4px; }

/* Wheel */
.wheel-wrap { position:relative; width:260px; height:260px; margin:0 auto 16px; }
.wheel-cv { width:100%; height:100%; }
.wheel-go {
  position:absolute; top:50%; left:50%; transform:translate(-50%,-50%);
  width:56px; height:56px; border-radius:50%; background:var(--brand);
  color:white; display:flex; align-items:center; justify-content:center;
  font-size:13px; font-weight:700; box-shadow:0 2px 10px rgba(37,99,235,0.25);
}
.wheel-go:active { transform:translate(-50%,-50%) scale(0.94); }
.wheel-prize {
  text-align:center; padding:12px; background:var(--gold-bg); border:1px solid #FDE68A;
  border-radius:12px; display:none; margin-top:12px;
}
.wheel-prize.show { display:block; animation:scaleIn 0.3s ease; }

/* Tasks */
.task-row {
  display:flex; align-items:center; gap:10px; padding:12px;
  background:var(--bg-primary); border:1px solid var(--border);
  border-radius:12px; margin-bottom:8px;
}
.task-row__ico { font-size:22px; flex-shrink:0; }
.task-row__mid { flex:1; }
.task-row__name { font-size:13px; font-weight:600; }
.task-row__desc { font-size:10px; color:var(--text-tertiary); }
.task-row__reward { font-size:11px; color:var(--gold); font-weight:700; white-space:nowrap; margin-right:6px; }
.task-btn {
  padding:5px 12px; border-radius:8px; font-size:11px; font-weight:600;
}
.task-btn--go { background:var(--brand); color:white; }
.task-btn--ok { background:var(--bg-secondary); color:var(--text-tertiary); }

/* TX History */
.txh-pills { display:flex; gap:6px; overflow-x:auto; scrollbar-width:none; margin-bottom:12px; padding:2px 0; }
.txh-pills::-webkit-scrollbar { display:none; }
.txh-pill {
  padding:5px 12px; border-radius:var(--r-full); font-size:12px; font-weight:500;
  background:var(--bg-secondary); color:var(--text-secondary); white-space:nowrap;
  transition:all var(--ease-fast);
}
.txh-pill.active { background:var(--brand); color:white; }

/* Generic info rows */
.info-line {
  display:flex; justify-content:space-between; font-size:12px; padding:4px 0;
  color:var(--text-tertiary);
}
.info-line--bold { font-size:14px; font-weight:600; color:var(--text-primary); padding:8px 0; }

/* ---- Games Filter Tabs ---- */
.gf-tab {
  padding:5px 12px; border-radius:20px; font-size:11px; font-weight:600;
  white-space:nowrap; flex-shrink:0; cursor:pointer;
  background:var(--bg-primary); border:1px solid var(--border); color:var(--text-secondary);
  transition: all 0.15s ease;
}
.gf-tab--on {
  background:var(--brand); color:white; border-color:var(--brand);
}

/* Page bottom spacer */
.page-end { height:8px; }
