/* ============================================================
   Mizu Kappa — Premium Dark Fintech Design System
   Mobile-first, glassmorphism, smooth animations
   ============================================================ */

/* ── Google Fonts ─────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;500;600;700;800&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,400&display=swap');

/* ── CSS Variables ────────────────────────────────────────── */
:root {
  /* Colors */
  --bg-primary:   #080b18;
  --bg-secondary: #0d1225;
  --bg-card:      #111827;
  --bg-glass:     rgba(17, 24, 39, 0.6);
  --border:       rgba(255,255,255,0.07);
  --border-glow:  rgba(6,182,212,0.3);

  /* Accent */
  --accent:       #06b6d4;
  --accent-2:     #10b981;
  --accent-3:     #f59e0b;
  --accent-green: #10b981;
  --accent-red:   #ef4444;
  --accent-gold:  #f59e0b;

  /* Gradients */
  --grad-main:    linear-gradient(135deg, #06b6d4 0%, #10b981 55%, #f59e0b 100%);
  --grad-green:   linear-gradient(135deg, #059669 0%, #10b981 100%);
  --grad-red:     linear-gradient(135deg, #dc2626 0%, #ef4444 100%);
  --grad-gold:    linear-gradient(135deg, #d97706 0%, #f59e0b 100%);
  --grad-card:    linear-gradient(145deg, rgba(6,182,212,0.12) 0%, rgba(16,185,129,0.07) 100%);
  --grad-cyan:    linear-gradient(135deg, #0284c7 0%, #06b6d4 100%);

  /* Text */
  --text-primary:   #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted:     #475569;

  /* Typography */
  --font-display: 'Syne', sans-serif;
  --font-body:    'DM Sans', sans-serif;

  /* Spacing */
  --radius-sm:  8px;
  --radius-md:  14px;
  --radius-lg:  20px;
  --radius-xl:  28px;

  /* Shadows */
  --shadow-card:  0 4px 24px rgba(0,0,0,0.4), 0 0 0 1px var(--border);
  --shadow-glow:  0 0 40px rgba(6,182,212,0.16);
  --shadow-green: 0 0 30px rgba(16,185,129,0.2);
  --shadow-red:   0 0 30px rgba(239,68,68,0.2);

  /* Sidebar */
  --sidebar-w: 260px;

  /* Bottom nav */
  --bottom-nav-h: 70px;
  --topbar-h: 62px;

  /* Transitions */
  --t-fast:   0.15s ease;
  --t-normal: 0.25s ease;
  --t-slow:   0.4s ease;
}

/* ── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-tap-highlight-color: transparent;
  width: 100%;
  height: auto;
  min-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
}

body {
  font-family:      var(--font-body);
  background-color: var(--bg-primary);
  color:            var(--text-primary);
  min-height:       100vh;
  min-height:       100dvh;
  overflow-x:       hidden;
  overflow-y:       auto;
  -webkit-overflow-scrolling: touch;
  width:            100%;
  overscroll-behavior-x: none;
  overscroll-behavior-y: auto;
  touch-action:     pan-x pan-y pinch-zoom;
  line-height:      1.6;
  font-size:        15px;
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font-family: inherit; }
img { max-width: 100%; display: block; }

/* ── Scrollbar ────────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 10px; }

/* ── Noise Texture Overlay ────────────────────────────────── */
body::before {
  content: '';
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  opacity: 0.4;
}

/* ── Layout ───────────────────────────────────────────────── */
.app-layout {
  display: flex;
  min-height: 100vh;
  min-height: 100dvh;
  position: relative;
  z-index: 1;
}

.main-content {
  flex: 1;
  min-width: 0;
  max-width: 100%;
  padding: 24px 20px;
  padding-bottom: calc(var(--bottom-nav-h) + 24px);
}

/* ── Sidebar ──────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  transition: transform var(--t-normal);
}

.sidebar-logo {
  padding: 28px 24px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border);
}

.sidebar-logo img { width: 40px; height: 40px; border-radius: 12px; object-fit: contain; flex-shrink: 0; }

.sidebar-logo-text {
  
  font-size: 22px;
  font-weight: 800;
  background: var(--grad-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  overflow-y: auto;
}

.nav-section-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 12px 12px 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--t-fast);
  margin-bottom: 2px;
  position: relative;
}

.nav-item svg { width: 18px; height: 18px; flex-shrink: 0; }

button.nav-item,
button.bottom-nav-item {
  border: 0;
  background: transparent;
  font: inherit;
}

button.nav-item {
  width: 100%;
  text-align: left;
}

.nav-item-chev {
  margin-left: auto;
  opacity: 0.62;
}

.games-trigger-icon {
  filter: drop-shadow(0 0 8px rgba(6,182,212,0.35));
}

.nav-item:hover {
  background: rgba(6,182,212,0.1);
  color: var(--text-primary);
}

.nav-item.active {
  background: rgba(6,182,212,0.15);
  color: var(--accent);
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 3px; height: 60%;
  background: var(--grad-main);
  border-radius: 0 4px 4px 0;
}

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--border);
}

.wallet-pill {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  cursor: pointer;
  transition: border-color var(--t-fast);
}

.wallet-pill:hover { border-color: var(--accent); }

.wallet-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent-green);
  box-shadow: 0 0 8px var(--accent-green);
  flex-shrink: 0;
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* ── Bottom Navigation (Mobile) ──────────────────────────── */
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom, 0px));
  background: rgba(13, 18, 37, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  z-index: 200;
  padding: 0 8px;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.bottom-nav-inner {
  display: flex;
  height: 100%;
  align-items: center;
  justify-content: space-around;
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  gap: 4px;
  min-width: 0;
  padding: 8px 6px;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  isolation: isolate;
  transition: color var(--t-fast), transform var(--t-fast), background var(--t-normal), box-shadow var(--t-normal);
  position: relative;
}

.bottom-nav-item svg {
  width: 20px;
  height: 20px;
  transition: transform var(--t-normal), filter var(--t-normal);
}

button.bottom-nav-item {
  justify-content: center;
}

.bottom-nav-item:active {
  transform: translateY(1px) scale(0.96);
}

.bottom-nav-item.active {
  color: #fff;
  background: linear-gradient(180deg, rgba(6,182,212,0.18), rgba(16,185,129,0.09));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08), 0 10px 26px rgba(6,182,212,0.18);
  animation: bottom-nav-pop 420ms cubic-bezier(.2,.85,.2,1);
}

.bottom-nav-item.active svg {
  color: var(--accent);
  filter: drop-shadow(0 0 10px rgba(6,182,212,0.45));
  transform: translateY(-2px) scale(1.08);
}

.bottom-nav-item.active::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 22px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-green));
  box-shadow: 0 0 14px rgba(6,182,212,0.6);
}

@keyframes bottom-nav-pop {
  0% { transform: translateY(6px) scale(0.92); }
  70% { transform: translateY(-2px) scale(1.03); }
  100% { transform: translateY(0) scale(1); }
}

/* ── Top Bar (Mobile) ─────────────────────────────────────── */
.topbar {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 250;
  background: rgba(8, 11, 24, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  min-height: calc(var(--topbar-h) + env(safe-area-inset-top, 0px));
  padding: calc(env(safe-area-inset-top, 0px) + 10px) max(14px, env(safe-area-inset-right, 0px)) 10px max(14px, env(safe-area-inset-left, 0px));
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  max-width: 100vw;
  overflow: hidden;
}

.topbar-logo {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  flex: 1 1 auto;
  font-size: 20px;
  font-weight: 800;
}

.topbar-logo img {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  object-fit: contain;
  flex-shrink: 0;
}

.topbar-logo span {
  background: var(--grad-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  min-width: 0;
  flex: 0 0 auto;
}

.topbar .wallet-pill {
  max-width: min(142px, 38vw);
  min-height: 40px;
  padding: 8px 11px !important;
  white-space: nowrap;
}

.topbar .wallet-pill [data-wallet-address] {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── Cards ────────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}

.card-glass {
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.card-gradient {
  background: var(--grad-card);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-glow);
  position: relative;
  overflow: hidden;
}

.card-gradient::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 200px; height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(6,182,212,0.12) 0%, transparent 70%);
  pointer-events: none;
}

/* ── Balance Card ─────────────────────────────────────────── */
.balance-card {
  background: var(--grad-main);
  border-radius: var(--radius-xl);
  padding: 28px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(6,182,212,0.35);
}

.balance-card::before {
  content: '';
  position: absolute;
  top: -80px; right: -80px;
  width: 300px; height: 300px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  pointer-events: none;
}

.balance-card::after {
  content: '';
  position: absolute;
  bottom: -100px; left: -40px;
  width: 250px; height: 250px;
  border-radius: 50%;
  background: rgba(255,255,255,0.04);
  pointer-events: none;
}

.balance-label {
  font-size: 13px;
  font-weight: 500;
  opacity: 0.8;
  letter-spacing: 0.03em;
}

.balance-amount {
  
  font-size: 36px;
  font-weight: 800;
  line-height: 1.1;
  margin: 8px 0 4px;
}

.balance-sub {
  font-size: 13px;
  opacity: 0.75;
}

.dashboard-balance-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  gap: 16px;
  min-width: 0;
  max-width: 100%;
}

.dashboard-balance-card {
  min-height: 188px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  scroll-snap-align: start;
}

.dashboard-system-card {
  background: linear-gradient(135deg, #111827 0%, #14532d 100%);
  box-shadow: 0 8px 34px rgba(34,197,94,0.18);
}

.dashboard-card-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  position: relative;
  z-index: 1;
  flex-wrap: wrap;
}

.dashboard-card-actions .btn {
  background: rgba(255,255,255,0.2);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.3);
}

.dashboard-card-actions .btn-soft {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.2);
}

.mobile-fintech-dashboard {
  display: none;
}

@media (max-width: 767px) {
  .dashboard-desktop-stack {
    display: none;
  }

  .mobile-fintech-dashboard {
    display: grid;
    gap: 16px;
    min-width: 0;
  }

  body.dashboard-page .topbar {
    display: none;
  }

  .mobile-fintech-dashboard * {
    min-width: 0;
  }

  .mobile-greeting-row,
  .mobile-header-tools,
  .mobile-profile-chip,
  .mobile-primary-actions,
  .mobile-wallet-card-top,
  .mobile-wallet-card-main,
  .mobile-stake-strip,
  .mobile-referral-card {
    display: flex;
    align-items: center;
  }

  .mobile-greeting-row {
    justify-content: space-between;
    gap: 12px;
    margin-top: 2px;
  }

  body.dashboard-page .mobile-greeting-row {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 250;
    min-height: calc(var(--topbar-h) + env(safe-area-inset-top, 0px));
    width: 100%;
    max-width: 100vw;
    margin-top: 0;
    padding: calc(env(safe-area-inset-top, 0px) + 10px) max(14px, env(safe-area-inset-right, 0px)) 10px max(14px, env(safe-area-inset-left, 0px));
    border-bottom: 1px solid var(--border);
    background: rgba(8, 11, 24, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
  }

  .mobile-profile-chip,
  .mobile-icon-button,
  .mobile-primary-actions a,
  .mobile-primary-actions button,
  .mobile-service-item,
  .mobile-add-money,
  .mobile-referral-card a {
    appearance: none;
    border: 0;
    font: inherit;
    cursor: pointer;
  }

  .mobile-profile-chip {
    flex: 1;
    gap: 11px;
    overflow: hidden;
    background: transparent;
    color: var(--text-primary);
    text-align: left;
  }

  .mobile-avatar {
    position: relative;
    flex: 0 0 auto;
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(6,182,212,0.18), rgba(16,185,129,0.18));
    box-shadow: 0 12px 28px rgba(0,0,0,0.25);
    overflow: hidden;
  }

  .mobile-avatar::after {
    content: '';
    position: absolute;
    right: -1px;
    bottom: -1px;
    width: 16px;
    height: 16px;
    border: 3px solid var(--bg-primary);
    border-radius: 50%;
    background: var(--accent-gold);
  }

  .mobile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .mobile-greeting-copy {
    display: grid;
    gap: 1px;
  }

  .mobile-greeting-copy small {
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 800;
    line-height: 1.15;
  }

  .mobile-greeting-copy strong {
    display: block;
    color: var(--text-primary);
    font-size: clamp(16px, 5vw, 20px);
    font-weight: 800;
    line-height: 1.1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-header-tools {
    flex: 0 0 auto;
    gap: 9px;
  }

  .mobile-icon-button {
    position: relative;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    padding: 0;
    border-radius: 50%;
    background: rgba(255,255,255,0.045);
    color: var(--text-primary);
    line-height: 1;
  }

  .mobile-icon-button svg {
    width: 20px;
    height: 20px;
  }

  .mobile-icon-badge span {
    position: absolute;
    top: -4px;
    right: -3px;
    min-width: 18px;
    height: 18px;
    display: grid;
    place-items: center;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--accent-red);
    color: #fff;
    font-size: 10px;
    font-weight: 900;
    line-height: 1;
  }

  .mobile-wallet-card {
    display: grid;
    gap: 14px;
    padding: 18px;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 18px;
    background:
      radial-gradient(circle at 90% -10%, rgba(255,255,255,0.16), transparent 36%),
      linear-gradient(135deg, #0f172a 0%, #134e4a 54%, #0891b2 100%);
    color: #fff;
    box-shadow: 0 18px 42px rgba(0,0,0,0.28), 0 16px 36px rgba(6,182,212,0.12);
    overflow: hidden;
  }

  .mobile-wallet-card-disconnected {
    background:
      radial-gradient(circle at 90% -10%, rgba(255,255,255,0.16), transparent 36%),
      linear-gradient(135deg, #0f172a 0%, #134e4a 54%, #0891b2 100%);
  }

  .mobile-wallet-card-top,
  .mobile-wallet-card-main {
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    position: relative;
    z-index: 1;
  }

  .mobile-balance-label,
  .mobile-history-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: rgba(255,255,255,0.9);
    font-size: 12px;
    font-weight: 800;
    line-height: 1.2;
  }

  .mobile-balance-label svg,
  .mobile-history-link svg {
    flex: 0 0 auto;
    width: 16px;
    height: 16px;
  }

  .mobile-balance-info {
    width: 26px;
    height: 26px;
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    border: 1px solid rgba(255,255,255,0.16);
    border-radius: 50%;
    background: rgba(255,255,255,0.12);
    color: #fff;
    padding: 0;
    cursor: pointer;
    box-shadow: 0 0 18px rgba(245,158,11,0.18);
    animation: mobile-info-shake 2.8s ease-in-out infinite;
  }

  .mobile-balance-info svg {
    width: 16px;
    height: 16px;
  }

  .mobile-balance-info:active {
    transform: scale(0.94);
  }

  .mobile-balance-eye {
    width: 26px;
    height: 26px;
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    border: 0;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.92);
    padding: 0;
    cursor: pointer;
    transition: transform var(--t-fast), background var(--t-fast), color var(--t-fast);
  }

  .mobile-balance-eye svg {
    grid-area: 1 / 1;
    width: 16px;
    height: 16px;
  }

  .mobile-balance-eye .mobile-eye-closed {
    opacity: 0;
    transform: scale(0.82);
  }

  .mobile-balance-eye.is-hidden .mobile-eye-open {
    opacity: 0;
    transform: scale(0.82);
  }

  .mobile-balance-eye.is-hidden .mobile-eye-closed {
    opacity: 1;
    transform: scale(1);
  }

  .mobile-balance-eye:active {
    transform: scale(0.94);
  }

  .mobile-balance-info-overlay {
    position: fixed;
    inset: 0;
    z-index: 1400;
    display: grid;
    place-items: end center;
    padding: 18px;
    background: rgba(0,0,0,0.66);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--t-normal);
  }

  .mobile-balance-info-overlay[hidden] {
    display: none;
  }

  .mobile-balance-info-overlay.open {
    opacity: 1;
    pointer-events: auto;
  }

  .mobile-balance-info-sheet {
    position: relative;
    width: min(100%, 390px);
    display: grid;
    gap: 12px;
    padding: 20px;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 22px;
    background:
      linear-gradient(145deg, rgba(6,182,212,0.13), rgba(16,185,129,0.08)),
      #0d1225;
    box-shadow: 0 22px 70px rgba(0,0,0,0.62), 0 0 38px rgba(6,182,212,0.13);
    transform: translateY(18px) scale(0.98);
    transition: transform var(--t-normal);
  }

  .mobile-balance-info-overlay.open .mobile-balance-info-sheet {
    transform: translateY(0) scale(1);
  }

  .mobile-balance-info-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: rgba(255,255,255,0.07);
    color: var(--text-secondary);
    padding: 0;
    cursor: pointer;
  }

  .mobile-balance-info-close svg {
    width: 17px;
    height: 17px;
  }

  .mobile-balance-info-mark {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 15px;
    background: var(--grad-main);
    color: #fff;
    box-shadow: 0 14px 30px rgba(6,182,212,0.22);
  }

  .mobile-balance-info-mark svg {
    width: 23px;
    height: 23px;
  }

  .mobile-balance-info-sheet h2 {
    max-width: calc(100% - 44px);
    color: var(--text-primary);
    font-size: 19px;
    line-height: 1.12;
    font-weight: 900;
  }

  .mobile-balance-info-sheet p {
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.45;
  }

  .mobile-balance-info-points {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
  }

  .mobile-balance-info-points span {
    min-height: 30px;
    display: inline-flex;
    align-items: center;
    padding: 0 10px;
    border: 1px solid rgba(6,182,212,0.22);
    border-radius: 999px;
    background: rgba(6,182,212,0.09);
    color: #cffafe;
    font-size: 11px;
    font-weight: 900;
  }

  .mobile-balance-info-action {
    min-height: 46px;
    border: 0;
    border-radius: 14px;
    background: var(--grad-main);
    color: #fff;
    font: inherit;
    font-size: 14px;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 10px 26px rgba(6,182,212,0.2);
  }

  .mobile-history-link {
    white-space: nowrap;
  }

  .mobile-history-link span {
    font-size: 18px;
    line-height: 1;
  }

  .mobile-balance-value {
    display: flex;
    align-items: baseline;
    flex: 1 1 auto;
    gap: 8px;
  }

  .mobile-balance-value strong {
    max-width: 100%;
    color: #fff;
    
    font-size: clamp(15px, 5vw, 22px);
    font-weight: 800;
    line-height: 1;
    overflow-wrap: anywhere;
  }

  .mobile-balance-value small {
    color: rgba(255,255,255,0.82);
    font-size: 13px;
    font-weight: 900;
  }

  .mobile-add-money {
    flex: 0 0 auto;
    min-height: 42px;
    padding: 0 16px;
    border-radius: 999px;
    background: #fff;
    color: #06a66b;
    font-size: 13px;
    font-weight: 900;
    white-space: nowrap;
    box-shadow: 0 8px 22px rgba(0,0,0,0.16);
  }

  .mobile-wallet-metrics-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(220px, 1fr));
    gap: 10px;
    position: relative;
    z-index: 1;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
  }

  .mobile-wallet-metrics-row::-webkit-scrollbar {
    display: none;
  }

  .mobile-wallet-token-tile,
  .mobile-wallet-metrics-row .mobile-stake-strip {
    min-height: 58px;
    margin: 0;
    padding: 10px;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 12px;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.035);
  }

  .mobile-wallet-token-tile {
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(145deg, rgba(6,182,212,0.16), rgba(8,11,24,0.2));
    color: #fff;
  }

  .mobile-wallet-metrics-row .mobile-stake-strip {
    position: relative;
    align-items: center;
    flex-direction: row;
    justify-content: flex-start;
    background: linear-gradient(145deg, rgba(16,185,129,0.14), rgba(8,11,24,0.2));
  }

  .mobile-wallet-token-icon {
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    background: rgba(255,255,255,0.16);
    color: #cffafe;
  }

  .mobile-wallet-token-icon svg {
    width: 18px;
    height: 18px;
  }

  .mobile-wallet-token-copy,
  .mobile-wallet-metrics-row .mobile-stake-strip > span:nth-child(2) {
    min-width: 0;
    display: grid;
    gap: 1px;
  }

  .mobile-wallet-token-copy {
    flex: 1;
  }

  .mobile-wallet-metrics-row .mobile-stake-strip > span:nth-child(2) {
    flex: 1;
    padding-right: 18px;
  }

  .mobile-wallet-token-copy small {
    color: rgba(255,255,255,0.74);
    font-size: 11px;
    font-weight: 800;
    line-height: 1.15;
  }

  .mobile-wallet-token-copy small,
  .mobile-wallet-metrics-row .mobile-stake-strip small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-wallet-token-copy strong {
    display: block;
    color: #fff;
    font-size: 13px;
    font-weight: 900;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-wallet-metrics-row [data-dash-wallet-token-balance],
  .mobile-wallet-metrics-row [data-dash-total-staked] {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    text-overflow: clip;
    white-space: nowrap;
    scrollbar-width: none;
  }

  .mobile-wallet-metrics-row [data-dash-wallet-token-balance]::-webkit-scrollbar,
  .mobile-wallet-metrics-row [data-dash-total-staked]::-webkit-scrollbar {
    display: none;
  }

  .mobile-wallet-token-copy em {
    display: none;
  }

  .mobile-stake-strip {
    justify-content: space-between;
    gap: 10px;
    min-height: 58px;
    margin: 0 -18px -18px;
    padding: 12px 18px;
    background: rgba(255,255,255,0.14);
    color: #fff;
  }

  .mobile-stake-icon {
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    background: rgba(255,255,255,0.2);
  }

  .mobile-stake-icon svg,
  .mobile-stake-arrow {
    width: 18px;
    height: 18px;
  }

  .mobile-stake-strip > span:nth-child(2) {
    flex: 1;
    display: grid;
    gap: 1px;
  }

  .mobile-stake-strip small {
    color: rgba(255,255,255,0.74);
    font-size: 11px;
    font-weight: 800;
  }

  .mobile-stake-strip strong {
    display: block;
    color: #fff;
    font-size: 14px;
    font-weight: 900;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-stake-arrow {
    flex: 0 0 auto;
  }

  .mobile-wallet-metrics-row .mobile-stake-strip strong {
    font-size: 13px;
    overflow-x: auto;
    overflow-y: hidden;
    text-overflow: clip;
    white-space: nowrap;
    scrollbar-width: none;
  }

  .mobile-wallet-metrics-row .mobile-stake-strip strong::-webkit-scrollbar {
    display: none;
  }

  .mobile-wallet-metrics-row .mobile-stake-arrow {
    position: absolute;
    top: 50%;
    right: 9px;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
  }

  .mobile-primary-actions,
  .mobile-service-card,
  .mobile-referral-card {
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 18px;
    background: rgba(17,24,39,0.92);
    box-shadow: var(--shadow-card);
  }

  .mobile-primary-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    padding: 15px 8px;
  }

  .mobile-primary-actions a,
  .mobile-primary-actions button {
    display: grid;
    justify-items: center;
    gap: 9px;
    background: transparent;
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 800;
  }

  .mobile-primary-actions span,
  .mobile-service-item span {
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: rgba(16,185,129,0.1);
    color: var(--accent-green);
  }

  .mobile-primary-actions span {
    width: 52px;
    height: 52px;
  }

  .mobile-primary-actions svg,
  .mobile-service-item svg {
    width: 24px;
    height: 24px;
  }

  .mobile-service-card {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px 8px;
    padding: 20px 10px;
  }

  .mobile-service-item {
    display: grid;
    justify-items: center;
    gap: 8px;
    background: transparent;
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.15;
    text-align: center;
  }

  .mobile-service-item span {
    width: 48px;
    height: 48px;
    background: rgba(6,182,212,0.09);
    color: var(--accent);
  }

  .mobile-referral-card {
    justify-content: space-between;
    gap: 12px;
    padding: 16px;
  }

  .mobile-referral-mark {
    flex: 0 0 auto;
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background:
      linear-gradient(135deg, rgba(6,182,212,0.9), rgba(16,185,129,0.9));
    box-shadow: 0 10px 24px rgba(6,182,212,0.22);
  }

  .mobile-referral-mark span {
    color: #fff;
    font-size: 14px;
    font-weight: 900;
  }

  .mobile-referral-card > div:nth-child(2) {
    flex: 1;
  }

  .mobile-referral-card strong {
    display: block;
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 900;
    line-height: 1.2;
  }

  .mobile-referral-card p {
    margin: 4px 0 0;
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.25;
  }

  .mobile-referral-card a {
    flex: 0 0 auto;
    min-width: 58px;
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--accent-green);
    color: #fff;
    font-weight: 900;
  }

  .mobile-trading-portal {
    position: relative;
    display: grid;
    gap: 13px;
    padding: 15px;
    border: 1px solid rgba(255,255,255,0.09);
    border-radius: 18px;
    background:
      linear-gradient(145deg, rgba(6,182,212,0.13), rgba(16,185,129,0.08)),
      rgba(17,24,39,0.92);
    box-shadow: var(--shadow-card);
    overflow: hidden;
  }

  .mobile-trading-portal::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, transparent 0%, rgba(255,255,255,0.08) 42%, transparent 72%);
    transform: translateX(-120%);
    animation: trading-portal-sheen 4.6s ease-in-out infinite;
    pointer-events: none;
  }

  .mobile-trading-portal > * {
    position: relative;
    z-index: 1;
  }

  .mobile-trading-portal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 11px;
  }

  .mobile-trading-portal-mark {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 13px;
    background: var(--grad-main);
    color: #fff;
    box-shadow: 0 12px 28px rgba(6,182,212,0.2);
    animation: trading-portal-float 3.4s ease-in-out infinite;
  }

  .mobile-trading-portal-mark svg {
    width: 21px;
    height: 21px;
  }

  .mobile-trading-portal-head strong {
    display: block;
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 900;
    line-height: 1.1;
  }

  .mobile-trading-portal-title {
    flex: 1 1 auto;
    min-width: 0;
  }

  .mobile-trading-portal-head p {
    margin: 2px 0 0;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 800;
    line-height: 1.2;
  }

  .mobile-trade-count {
    min-width: 74px;
    display: grid;
    justify-items: end;
    gap: 2px;
    padding: 8px 10px;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    background: rgba(8,11,24,0.5);
  }

  .mobile-trade-count strong {
    color: #fff;
    font-size: 17px;
    font-weight: 900;
    line-height: 1;
  }

  .mobile-trade-count span {
    color: var(--text-secondary);
    font-size: 9px;
    font-weight: 900;
    line-height: 1;
    text-align: right;
    text-transform: uppercase;
  }

  .mobile-trading-portal-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
  }

  .mobile-trading-portal-grid a {
    min-width: 0;
    min-height: 68px;
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 7px;
    padding: 8px 4px;
    border: 1px solid rgba(255,255,255,0.075);
    border-radius: 14px;
    background: rgba(8,11,24,0.48);
    color: var(--text-primary);
    font-size: 11px;
    font-weight: 900;
    line-height: 1;
    text-align: center;
    transition: transform var(--t-fast), border-color var(--t-fast), background var(--t-fast);
  }

  .mobile-trading-portal-grid a span {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    background: rgba(6,182,212,0.1);
    color: var(--accent);
  }

  .mobile-trading-portal-grid a:nth-child(2) span {
    background: rgba(245,158,11,0.1);
    color: var(--accent-gold);
  }

  .mobile-trading-portal-grid a:nth-child(3) span {
    background: rgba(16,185,129,0.1);
    color: var(--accent-green);
  }

  .mobile-trading-portal-grid a:nth-child(4) span {
    background: rgba(239,68,68,0.09);
    color: #f87171;
  }

  .mobile-trading-portal-grid svg {
    width: 18px;
    height: 18px;
  }

  .mobile-trading-portal-grid a:active {
    transform: translateY(1px) scale(0.97);
  }

  @keyframes trading-portal-sheen {
    0%, 52% { transform: translateX(-120%); }
    72%, 100% { transform: translateX(120%); }
  }

  @keyframes trading-portal-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-2px); }
  }

  @keyframes mobile-info-shake {
    0%, 78%, 100% { transform: rotate(0); }
    82% { transform: rotate(-9deg); }
    86% { transform: rotate(8deg); }
    90% { transform: rotate(-5deg); }
    94% { transform: rotate(4deg); }
  }
}

/* ── Pool Card ────────────────────────────────────────────── */
.pool-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  cursor: pointer;
  transition: all var(--t-normal);
  position: relative;
  overflow: hidden;
}

.pool-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(6,182,212,0.2);
}

.pool-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--grad-main);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.pool-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.pool-name {
  
  font-size: 16px;
  font-weight: 700;
}

.pool-apy {
  
  font-size: 22px;
  font-weight: 800;
  background: var(--grad-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.pool-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.pool-stat-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 3px;
}

.pool-stat-value {
  font-size: 14px;
  font-weight: 600;
}

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: all var(--t-fast);
  padding: 12px 24px;
  white-space: nowrap;
  letter-spacing: 0.01em;
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0);
  transition: background var(--t-fast);
}

.btn:hover::after { background: rgba(255,255,255,0.08); }
.btn:active::after { background: rgba(255,255,255,0.12); }

.btn-primary {
  background: var(--grad-main);
  color: #fff;
  box-shadow: 0 4px 20px rgba(6,182,212,0.35);
}

.btn-secondary {
  background: rgba(6,182,212,0.12);
  color: var(--accent);
  border: 1px solid rgba(6,182,212,0.3);
}

.btn-secondary:hover { background: rgba(6,182,212,0.2); }

.btn-danger {
  background: var(--grad-red);
  color: #fff;
  box-shadow: 0 4px 20px rgba(239,68,68,0.3);
}

.btn-success {
  background: var(--grad-green);
  color: #fff;
  box-shadow: 0 4px 20px rgba(16,185,129,0.3);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.btn-ghost:hover { border-color: var(--accent); color: var(--text-primary); }

.btn-sm { padding: 8px 16px; font-size: 13px; }
.btn-lg { padding: 15px 32px; font-size: 15px; }
.btn-full { width: 100%; }

.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── Badges / Status ──────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 50px;
  letter-spacing: 0.04em;
}

.badge-active   { background: rgba(16,185,129,0.15); color: var(--accent-green); }
.badge-inactive { background: rgba(239,68,68,0.12); color: var(--accent-red); }
.badge-pending  { background: rgba(245,158,11,0.12); color: var(--accent-gold); }
.badge-won      { background: rgba(16,185,129,0.15); color: var(--accent-green); }
.badge-lost     { background: rgba(239,68,68,0.12); color: var(--accent-red); }
.badge-refunded { background: rgba(100,116,139,0.15); color: var(--text-secondary); }

.badge::before {
  content: '';
  width: 5px; height: 5px;
  border-radius: 50%;
  background: currentColor;
}

/* ── Progress Bar ─────────────────────────────────────────── */
.progress-wrap {
  background: rgba(255,255,255,0.06);
  border-radius: 50px;
  height: 6px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  border-radius: 50px;
  background: var(--grad-main);
  transition: width 0.6s ease;
}

.progress-bar.green { background: var(--grad-green); }
.progress-bar.gold  { background: var(--grad-gold); }

/* ── Forms / Inputs ───────────────────────────────────────── */
.form-group { margin-bottom: 18px; }

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 7px;
}

.form-input {
  width: 100%;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  color: var(--text-primary);
  font-size: 16px;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
  outline: none;
  appearance: none;
}

.form-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(6,182,212,0.15);
}

.form-input::placeholder { color: var(--text-muted); }

.input-group {
  position: relative;
}

.input-suffix {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  pointer-events: none;
}

.input-prefix {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  max-width: 52px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  color: var(--text-secondary);
  pointer-events: none;
}

.form-input.has-prefix { padding-left: 72px; }
.form-input.has-suffix { padding-right: 60px; }

/* ── Modal ────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t-normal);
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  width: 100%;
  max-width: 480px;
  padding: 32px 24px;
  max-height: 90vh;
  max-height: 90dvh;
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform var(--t-slow) cubic-bezier(0.32, 0.72, 0, 1);
  position: relative;
}

.modal-overlay.open .modal {
  transform: translateY(0);
}

@media (min-width: 640px) {
  .modal-overlay { align-items: center; }
  .modal { border-radius: var(--radius-xl); max-height: 80vh; max-height: 80dvh; }
  .modal-overlay:not(.open) .modal { transform: scale(0.9); }
  .modal-overlay.open .modal { transform: scale(1); }
}

.modal-handle {
  width: 40px; height: 4px;
  background: var(--border);
  border-radius: 50px;
  margin: -20px auto 24px;
}

.modal-title {
  
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 20px;
}

.modal-close {
  position: absolute;
  top: 20px; right: 20px;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background var(--t-fast);
  color: var(--text-secondary);
}

.modal-close:hover { background: var(--border); color: var(--text-primary); }

/* Games Modal */
.modal.games-modal {
  display: flex;
  flex-direction: column;
  max-width: 680px;
  max-height: min(90dvh, 760px);
  padding: 0;
  overflow: hidden;
  background:
    linear-gradient(145deg, rgba(6,182,212,0.14) 0%, rgba(6,182,212,0) 38%),
    linear-gradient(315deg, rgba(245,158,11,0.16) 0%, rgba(245,158,11,0) 42%),
    #0d1426;
  box-shadow: 0 28px 90px rgba(0,0,0,0.58), 0 0 0 1px rgba(255,255,255,0.06);
}

.games-modal::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 28px 28px;
  opacity: 0.24;
  pointer-events: none;
}

.games-modal > * {
  position: relative;
  z-index: 1;
}

.games-modal .modal-handle {
  margin: 12px auto 0;
  background: rgba(255,255,255,0.18);
  flex-shrink: 0;
}

.games-modal-close {
  top: 18px;
  right: 18px;
  width: auto;
  min-width: 86px;
  height: 38px;
  padding: 0 13px;
  gap: 7px;
  border-radius: 999px;
  background: rgba(239,68,68,0.18);
  border-color: rgba(239,68,68,0.42);
  color: #fff;
  box-shadow: 0 10px 28px rgba(239,68,68,0.18);
}

.games-modal-close span {
  font-size: 12px;
  font-weight: 800;
}

.games-modal-close:hover {
  background: rgba(239,68,68,0.28);
  border-color: rgba(239,68,68,0.62);
  color: #fff;
}

.games-modal-hero {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 26px 126px 22px 28px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
}

.games-modal-mark {
  width: 62px;
  height: 62px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(135deg, #06b6d4 0%, #10b981 58%, #f59e0b 100%);
  box-shadow: 0 16px 36px rgba(6,182,212,0.24);
  flex-shrink: 0;
}

.games-modal-mark svg {
  width: 34px;
  height: 34px;
}

.games-modal-kicker,
.games-section-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
  color: var(--accent-gold);
}

.games-modal-hero h2 {
  margin: 3px 0 2px;
  
  font-size: 30px;
  line-height: 1.05;
  font-weight: 800;
}

.games-modal-hero p {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.35;
}

.games-modal-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 22px 28px 28px;
  scrollbar-gutter: stable;
}

.games-modal-body::-webkit-scrollbar {
  width: 6px;
}

.games-modal-body::-webkit-scrollbar-track {
  background: rgba(255,255,255,0.04);
}

.games-modal-body::-webkit-scrollbar-thumb {
  background: rgba(6,182,212,0.65);
  border-radius: 999px;
}

.games-section-label {
  color: var(--text-muted);
  margin: 0 0 10px;
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.game-card,
.games-history-link {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  background: rgba(8,11,24,0.58);
  color: var(--text-primary);
  transition: transform var(--t-fast), border-color var(--t-fast), background var(--t-fast), box-shadow var(--t-fast);
}

.game-card {
  min-height: 128px;
  flex-direction: column;
  align-items: flex-start;
  padding: 14px;
  position: relative;
}

a.game-card:hover,
.games-history-link:hover {
  transform: translateY(-2px);
  border-color: rgba(6,182,212,0.45);
  background: rgba(6,182,212,0.09);
  box-shadow: 0 14px 34px rgba(0,0,0,0.24);
}

.game-card.active,
.games-history-link.active {
  border-color: rgba(6,182,212,0.55);
  background: rgba(6,182,212,0.13);
}

.game-card-icon {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.12);
}

.game-card-icon svg {
  width: 23px;
  height: 23px;
}

.game-card-icon-bet { background: linear-gradient(135deg, #0284c7, #06b6d4); }
.game-card-icon-crash { background: linear-gradient(135deg, #dc2626, #f59e0b); }
.game-card-icon-race { background: linear-gradient(135deg, #7c3aed, #10b981); }
.game-card-icon-dice { background: linear-gradient(135deg, #f59e0b, #06b6d4); }
.game-card-icon-mines { background: linear-gradient(135deg, #64748b, #06b6d4); }
.game-card-icon-plinko { background: linear-gradient(135deg, #ec4899, #f59e0b); }
.game-card-icon-history { background: linear-gradient(135deg, #334155, #10b981); }

.game-card-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.game-card-copy strong,
.games-history-link strong {
  
  font-size: 15px;
  line-height: 1.15;
  font-weight: 800;
}

.game-card-copy small,
.games-history-link small {
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.25;
}

.game-card-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(148,163,184,0.12);
  color: var(--text-secondary);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.game-card-badge.live {
  background: rgba(16,185,129,0.15);
  color: var(--accent-green);
}

.game-card-soon {
  opacity: 0.82;
  cursor: default;
}

.games-history-link {
  min-height: 72px;
  padding: 13px 14px;
}

.games-history-link > span:not(.game-card-icon) {
  display: grid;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.games-history-arrow {
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.games-close-action {
  width: 100%;
  min-height: 48px;
  margin-top: 16px;
  border: 1px solid rgba(239,68,68,0.34);
  border-radius: 8px;
  background: rgba(239,68,68,0.12);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: background var(--t-fast), border-color var(--t-fast), transform var(--t-fast);
}

.games-close-action svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.games-close-action:hover {
  transform: translateY(-1px);
  background: rgba(239,68,68,0.2);
  border-color: rgba(239,68,68,0.54);
}

@media (max-width: 560px) {
  .games-modal-hero {
    align-items: flex-start;
    gap: 13px;
    padding: 22px 112px 18px 18px;
  }

  .games-modal-mark {
    width: 54px;
    height: 54px;
    border-radius: 14px;
  }

  .games-modal-mark svg {
    width: 30px;
    height: 30px;
  }

  .games-modal-hero h2 {
    font-size: 25px;
  }

  .games-modal-body {
    padding: 18px;
  }

  .games-grid {
    grid-template-columns: 1fr;
    gap: 9px;
    margin-bottom: 16px;
  }

  .game-card {
    min-height: 76px;
    flex-direction: row;
    align-items: center;
    padding: 12px 70px 12px 12px;
  }

  .game-card-badge {
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
  }

  .games-history-link {
    min-height: 68px;
  }
}

/* ── Betting UI ───────────────────────────────────────────── */
.crypto-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 10px;
}

.crypto-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 10px;
  text-align: center;
  cursor: pointer;
  transition: all var(--t-fast);
}

.crypto-card:hover, .crypto-card.selected {
  border-color: var(--accent);
  background: rgba(6,182,212,0.1);
}

.crypto-card.selected { box-shadow: 0 0 0 2px var(--accent); }

.crypto-icon { font-size: 24px; margin-bottom: 6px; }
.crypto-name { font-size: 12px; font-weight: 600; }
.crypto-price { font-size: 10px; color: var(--text-muted); }

.direction-btns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.direction-btn {
  padding: 18px;
  border-radius: var(--radius-lg);
  border: 2px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--t-fast);
  text-align: center;
  font-size: 15px;
  font-weight: 600;
}

.direction-btn.rise.selected {
  border-color: var(--accent-green);
  background: rgba(16,185,129,0.12);
  color: var(--accent-green);
  box-shadow: var(--shadow-green);
}

.direction-btn.fall.selected {
  border-color: var(--accent-red);
  background: rgba(239,68,68,0.08);
  color: var(--accent-red);
  box-shadow: var(--shadow-red);
}

.direction-icon { font-size: 28px; margin-bottom: 6px; }

.timeframe-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  padding: 7px 16px;
  border-radius: 50px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--t-fast);
}

.chip:hover, .chip.selected {
  border-color: var(--accent);
  background: rgba(6,182,212,0.12);
  color: var(--accent);
}

.payout-preview {
  background: var(--bg-secondary);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.trade-monitor-modal {
  max-width: 520px;
}

.trade-monitor-head,
.trade-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.trade-monitor-symbol {
  
  font-size: 20px;
  font-weight: 800;
}

.trade-monitor-sub,
.trade-label {
  font-size: 12px;
  color: var(--text-muted);
}

.trade-value {
  
  font-size: 18px;
  font-weight: 800;
}

.trade-track {
  position: relative;
  height: 54px;
  margin: 20px 0;
  border-radius: var(--radius-md);
  background:
    linear-gradient(90deg, rgba(239,68,68,0.12), rgba(255,255,255,0.05) 50%, rgba(16,185,129,0.12)),
    var(--bg-secondary);
  border: 1px solid var(--border);
  overflow: hidden;
}

.trade-track::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(255,255,255,0.22);
}

.trade-entry-marker,
.trade-live-marker {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
}

.trade-entry-marker {
  width: 10px;
  height: 34px;
  border-radius: 999px;
  background: var(--text-secondary);
}

.trade-live-marker {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: var(--accent-gold);
  box-shadow: 0 0 18px rgba(245,158,11,0.45);
  transition: left var(--t-normal);
}

.trade-live-marker.green {
  background: var(--accent-green);
  box-shadow: var(--shadow-green);
}

.trade-live-marker.red {
  background: var(--accent-red);
  box-shadow: var(--shadow-red);
}

.predict-page {
  max-width: 760px;
  margin: 0 auto;
}

.predict-risk {
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

.predict-card {
  overflow: hidden;
}

.predict-card-title {
  color: var(--text-primary);
  line-height: 1.15;
}

@media (max-width: 767px) {
  .predict-page-header {
    margin-bottom: 12px;
  }

  .predict-page-header .page-title {
    font-size: 24px;
    line-height: 1.08;
  }

  .predict-page-header .page-sub {
    font-size: 13px;
    line-height: 1.4;
  }

  .predict-risk {
    margin-bottom: 12px !important;
    padding: 10px 12px !important;
    border-radius: 14px !important;
    line-height: 1.4;
  }

  .predict-page {
    gap: 12px !important;
  }

  .predict-card {
    padding: 14px;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 18px;
    background: rgba(17,24,39,0.92);
    box-shadow: var(--shadow-card);
  }

  .predict-card-title {
    margin-bottom: 14px !important;
    font-size: 16px !important;
  }

  .predict-card .form-group {
    margin-bottom: 14px;
  }

  .predict-card .form-label {
    margin-bottom: 8px;
    font-size: 12px;
    font-weight: 800;
  }

  .predict-card .crypto-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .predict-card .crypto-card {
    min-height: 78px;
    padding: 9px 7px;
    border-radius: 14px;
    background: rgba(8,11,24,0.52);
  }

  .predict-card .crypto-icon {
    margin-bottom: 3px;
    font-size: 18px;
  }

  .predict-card .crypto-name {
    font-size: 11px;
  }

  .predict-card .crypto-price {
    margin-top: 2px;
    font-size: 9px;
  }

  .predict-card .direction-btns {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px;
  }

  .predict-card .direction-btn {
    min-height: 76px;
    padding: 11px 8px;
    border-width: 1px;
    border-radius: 14px;
    font-size: 13px;
  }

  .predict-card .direction-icon {
    margin-bottom: 3px;
    font-size: 18px;
  }

  .predict-card .timeframe-chips {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  .predict-card .timeframe-chips::-webkit-scrollbar {
    display: none;
  }

  .predict-card .chip {
    flex: 0 0 auto;
    min-height: 34px;
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
  }

  .predict-card .payout-preview {
    min-height: 78px;
    align-items: center;
    flex-wrap: nowrap;
    gap: 12px;
    padding: 12px;
    border-radius: 14px;
    background:
      linear-gradient(145deg, rgba(16,185,129,0.14), rgba(8,11,24,0.2)),
      var(--bg-secondary);
  }

  .predict-card .btn-lg {
    min-height: 48px;
    border-radius: 14px;
    font-size: 14px;
  }

  .predict-help-card {
    padding-bottom: 12px;
  }

  .predict-help-card > div:last-child {
    gap: 8px !important;
    font-size: 12px !important;
    line-height: 1.35 !important;
  }
}

/* -- Crash Game ------------------------------------------------ */
.crash-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas:
    "stage"
    "panel"
    "meta";
  gap: 18px;
}

.crash-stage,
.crash-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.crash-stage {
  grid-area: stage;
  overflow: hidden;
}

.crash-stage-top,
.crash-panel-head,
.crash-history-row,
.crash-history-values {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.crash-round-label,
.crash-panel-title {
  
  font-size: 16px;
  font-weight: 800;
}

.crash-proof,
.crash-panel-sub,
.crash-history-meta,
.crash-fairness span,
.crash-meta-grid span {
  color: var(--text-muted);
  font-size: 12px;
}

.crash-status-pill {
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-secondary);
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 6px 10px;
}

.crash-status-pill.active,
.crash-status-pill.won {
  border-color: rgba(16,185,129,0.35);
  color: var(--accent-green);
}

.crash-status-pill.lost {
  border-color: rgba(239,68,68,0.35);
  color: var(--accent-red);
}

.crash-visual {
  position: relative;
  min-height: 260px;
  margin-top: 14px;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius-md);
  background: #0b1022;
  overflow: hidden;
}

.crash-visual canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.crash-multiplier {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: clamp(44px, 13vw, 92px);
  font-weight: 800;
  line-height: 1;
  color: var(--text-primary);
  text-shadow: 0 0 26px rgba(6,182,212,0.28);
  pointer-events: none;
}

.crash-result {
  position: absolute;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  min-height: 22px;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
}

.crash-result.won { color: var(--accent-green); }
.crash-result.lost { color: var(--accent-red); }

.crash-meta-grid {
  grid-area: meta;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.crash-meta-grid > div {
  min-width: 0;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px;
}

.crash-meta-grid strong {
  display: block;
  margin-top: 3px;
  font-size: 15px;
  line-height: 1.2;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.crash-panel {
  grid-area: panel;
  padding: 16px;
  align-self: start;
}

.crash-control-stack {
  min-width: 0;
}

.crash-quick-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: -6px 0 16px;
}

.crash-limit-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 12px;
}

.crash-limit-row strong {
  color: var(--text-secondary);
  font-weight: 700;
}

.crash-actions {
  display: grid;
  gap: 10px;
}

.crash-actions .btn {
  margin: 0;
  min-height: 48px;
}

.crash-fairness {
  display: grid;
  gap: 10px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.crash-fairness code {
  display: block;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  margin-top: 4px;
  padding: 8px 10px;
  overflow-wrap: anywhere;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255,255,255,0.03);
  color: var(--text-secondary);
  font-size: 11px;
  line-height: 1.35;
  white-space: normal;
  word-break: break-word;
}

.crash-history-row {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.crash-history-row:last-child { border-bottom: none; }

.crash-history-title {
  font-weight: 700;
  font-size: 14px;
}

.crash-history-values {
  justify-content: flex-end;
  flex-wrap: wrap;
  font-size: 13px;
  text-align: right;
}

@media (min-width: 980px) {
  .crash-shell {
    grid-template-columns: minmax(0, 1fr) 340px;
    grid-template-areas:
      "stage panel"
      "meta panel";
    align-items: start;
  }

  .crash-stage {
    padding: 18px;
  }
}

@media (max-width: 560px) {
  .crash-stage,
  .crash-panel {
    border-radius: var(--radius-md);
  }

  .crash-shell {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .crash-panel {
    display: contents;
  }

  .crash-control-stack {
    order: 1;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg-card);
    box-shadow: var(--shadow-card);
  }

  .crash-stage {
    order: 2;
  }

  .crash-actions {
    order: 3;
    width: min(100%, 360px);
    margin: 0 auto;
  }

  .crash-meta-grid {
    order: 4;
  }

  .crash-stage-top,
  .crash-history-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .crash-meta-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .crash-meta-grid > div {
    padding: 9px 7px;
  }

  .crash-meta-grid span {
    font-size: 10px;
  }

  .crash-meta-grid strong {
    font-size: clamp(10px, 3.1vw, 13px);
  }

  .crash-visual {
    min-height: 190px;
  }

  .crash-multiplier {
    font-size: clamp(40px, 18vw, 70px);
  }

  .crash-fairness {
    display: none;
  }

  .crash-actions {
    display: grid;
    gap: 8px;
  }

  .crash-actions .btn {
    min-height: 52px;
  }

  .crash-history-values {
    justify-content: flex-start;
    text-align: left;
  }
}

/* ── Leaderboard ──────────────────────────────────────────── */
/* -- Dice Duel Game -------------------------------------------- */
.dice-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas:
    "stage"
    "panel"
    "meta";
  gap: 18px;
}

.dice-stage,
.dice-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.dice-stage {
  grid-area: stage;
  overflow: hidden;
  padding: 14px;
}

.dice-stage-top,
.dice-panel-head,
.dice-history-row,
.dice-history-values {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.dice-round-label,
.dice-panel-title {
  font-size: 16px;
  font-weight: 800;
}

.dice-proof,
.dice-history-meta,
.dice-fairness span,
.dice-meta-grid span,
.dice-rules-card span {
  color: var(--text-muted);
  font-size: 12px;
}

.dice-status-pill {
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-secondary);
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  padding: 6px 10px;
}

.dice-status-pill.rolling { border-color: rgba(245,158,11,0.42); color: var(--accent-gold); }
.dice-status-pill.won { border-color: rgba(16,185,129,0.38); color: var(--accent-green); }
.dice-status-pill.lost { border-color: rgba(239,68,68,0.38); color: var(--accent-red); }

.dice-arena {
  position: relative;
  min-height: 360px;
  margin-top: 14px;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: var(--radius-md);
  background: #07101f;
  overflow: hidden;
}

.dice-arena canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.dice-result-banner {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  min-width: min(82%, 420px);
  padding: 16px 18px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: rgba(8,11,24,0.72);
  color: transparent;
  font-size: 20px;
  font-weight: 900;
  line-height: 1.25;
  pointer-events: none;
  text-align: center;
  text-transform: uppercase;
  white-space: pre-line;
  opacity: 0;
  transition: opacity var(--t-normal), color var(--t-fast), transform var(--t-normal);
}

.dice-result-banner.won,
.dice-result-banner.lost {
  opacity: 1;
  color: #fff;
  transform: translate(-50%, -50%) scale(1);
}

.dice-result-banner.won {
  border-color: rgba(16,185,129,0.45);
  box-shadow: 0 18px 42px rgba(16,185,129,0.22);
}

.dice-result-banner.lost {
  border-color: rgba(239,68,68,0.42);
  box-shadow: 0 18px 42px rgba(239,68,68,0.18);
}

.dice-meta-grid {
  grid-area: meta;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.dice-meta-grid > div,
.dice-rules-card {
  min-width: 0;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px;
}

.dice-meta-grid strong,
.dice-rules-card strong {
  display: block;
  margin-top: 3px;
  font-size: 15px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.dice-panel {
  grid-area: panel;
  padding: 16px;
  align-self: start;
}

.dice-rules-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}

.dice-quick-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: -6px 0 16px;
}

.dice-limit-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 12px;
}

.dice-limit-row strong {
  color: var(--text-secondary);
  font-weight: 700;
}

.dice-actions {
  display: grid;
  gap: 10px;
}

.dice-actions .btn {
  margin: 0;
  min-height: 48px;
}

.dice-fairness {
  display: grid;
  gap: 10px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.dice-fairness code {
  display: block;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  margin-top: 4px;
  padding: 8px 10px;
  overflow-wrap: anywhere;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255,255,255,0.03);
  color: var(--text-secondary);
  font-size: 11px;
  line-height: 1.35;
  white-space: normal;
  word-break: break-word;
}

.dice-history-row {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.dice-history-row:last-child { border-bottom: none; }

.dice-history-title {
  font-weight: 700;
  font-size: 14px;
}

.dice-history-values {
  justify-content: flex-end;
  flex-wrap: wrap;
  font-size: 13px;
  text-align: right;
}

@media (min-width: 980px) {
  .dice-shell {
    grid-template-columns: minmax(0, 1fr) 340px;
    grid-template-areas:
      "stage panel"
      "meta panel";
    align-items: start;
  }

  .dice-stage {
    padding: 18px;
  }
}

@media (max-width: 680px) {
  .dice-stage,
  .dice-panel {
    border-radius: var(--radius-md);
  }

  .dice-shell {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .dice-stage {
    order: 1;
  }

  .dice-panel {
    order: 2;
  }

  .dice-meta-grid {
    order: 3;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .dice-stage-top,
  .dice-history-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .dice-arena {
    min-height: 330px;
    margin-top: 10px;
  }

  .dice-rules-card {
    grid-template-columns: 1fr;
  }

  .dice-result-banner {
    min-width: min(90%, 340px);
    padding: 13px 14px;
    font-size: 17px;
  }

  .dice-history-values {
    justify-content: flex-start;
    text-align: left;
  }
}

/* -- Horse Race ------------------------------------------------ */
.horse-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas:
    "stage"
    "panel"
    "meta";
  gap: 18px;
}

.horse-stage,
.horse-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.horse-stage {
  grid-area: stage;
  overflow: hidden;
  padding: 14px;
}

.horse-stage-top,
.horse-panel-head,
.horse-history-row,
.horse-history-values {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.horse-round-label,
.horse-panel-title {
  font-size: 16px;
  font-weight: 800;
}

.horse-proof,
.horse-panel-sub,
.horse-history-meta,
.horse-fairness span,
.horse-meta-grid span,
.horse-pick small {
  color: var(--text-muted);
  font-size: 12px;
}

.horse-status-pill {
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-secondary);
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 6px 10px;
}

.horse-status-pill.racing {
  border-color: rgba(245,158,11,0.38);
  color: var(--accent-gold);
}

.horse-status-pill.won {
  border-color: rgba(16,185,129,0.35);
  color: var(--accent-green);
}

.horse-status-pill.lost {
  border-color: rgba(239,68,68,0.35);
  color: var(--accent-red);
}

.horse-track {
  position: relative;
  min-height: 320px;
  margin-top: 14px;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius-md);
  background: #7dd3fc;
  overflow: hidden;
}

.horse-track canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.horse-race-banner {
  position: absolute;
  left: 50%;
  top: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  transform: translate(-50%, -50%);
  max-width: calc(100% - 28px);
  min-width: min(520px, calc(100% - 40px));
  min-height: 112px;
  padding: 18px 24px;
  border: 3px solid rgba(255,255,255,0.86);
  border-radius: 8px;
  background: rgba(15,23,42,0.78);
  box-shadow: 0 18px 50px rgba(15,23,42,0.4);
  color: var(--text-primary);
 
  font-size: clamp(26px, 5vw, 54px);
  font-weight: 900;
  line-height: 1.08;
  text-align: center;
  text-shadow: 0 2px 14px rgba(0,0,0,0.48);
  pointer-events: none;
  white-space: pre-line;
  z-index: 3;
}

.horse-race-banner.won,
.horse-race-banner.lost {
  display: flex;
}

.horse-race-banner.won {
  color: #bbf7d0;
  background: rgba(20,83,45,0.82);
}

.horse-race-banner.lost {
  color: #fecaca;
  background: rgba(127,29,29,0.82);
}

.horse-panel {
  grid-area: panel;
  padding: 16px;
  align-self: start;
}

.horse-selector {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 16px 0;
}

.horse-pick {
  min-height: 64px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  color: var(--text-primary);
  cursor: pointer;
  text-align: left;
  transition: border-color var(--t-fast), transform var(--t-fast), background var(--t-fast);
}

.horse-pick strong,
.horse-pick small {
  display: block;
  line-height: 1.25;
}

.horse-pick strong {
  font-size: 13px;
  overflow-wrap: anywhere;
}

.horse-pick.selected,
.horse-pick:hover {
  border-color: rgba(245,158,11,0.5);
  background: rgba(245,158,11,0.08);
}

.horse-pick.selected {
  transform: translateY(-1px);
}

.horse-swatch {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  box-shadow: 0 0 16px rgba(255,255,255,0.18);
  flex-shrink: 0;
}

.horse-quick-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: -6px 0 16px;
}

.horse-limit-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 12px;
}

.horse-limit-row strong {
  color: var(--text-secondary);
  font-weight: 700;
}

.horse-actions {
  display: grid;
  gap: 10px;
}

.horse-actions .btn {
  margin: 0;
  min-height: 48px;
}

.horse-fairness {
  display: grid;
  gap: 10px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.horse-fairness code {
  display: block;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  margin-top: 4px;
  padding: 8px 10px;
  overflow-wrap: anywhere;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255,255,255,0.03);
  color: var(--text-secondary);
  font-size: 11px;
  line-height: 1.35;
  white-space: normal;
  word-break: break-word;
}

.horse-meta-grid {
  grid-area: meta;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.horse-meta-grid > div {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px;
}

.horse-meta-grid strong {
  display: block;
  margin-top: 3px;
  font-size: 15px;
  overflow-wrap: anywhere;
}

.horse-history-row {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.horse-history-row:last-child { border-bottom: none; }

.horse-history-title {
  font-weight: 700;
  font-size: 14px;
}

.horse-history-values {
  justify-content: flex-end;
  flex-wrap: wrap;
  font-size: 13px;
  text-align: right;
}

@media (min-width: 980px) {
  .horse-shell {
    grid-template-columns: minmax(0, 1fr) 360px;
    grid-template-areas:
      "stage panel"
      "meta panel";
    align-items: start;
  }

  .horse-stage {
    padding: 18px;
  }
}

@media (max-width: 680px) {
  .horse-stage,
  .horse-panel {
    border-radius: var(--radius-md);
  }

  .horse-shell {
    grid-template-areas:
      "panel"
      "stage"
      "meta";
    gap: 12px;
    width: calc(100vw - 16px);
    margin-left: calc(50% - 50vw + 8px);
    margin-right: calc(50% - 50vw + 8px);
  }

  .horse-stage,
  .horse-panel {
    padding: 8px;
  }

  .horse-stage-top,
  .horse-history-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .horse-selector,
  .horse-meta-grid {
    grid-template-columns: 1fr;
  }

  .horse-track {
    min-height: 210px;
    margin-top: 10px;
  }

  .horse-fairness {
    display: none;
  }

  .horse-history-values {
    justify-content: flex-start;
    text-align: left;
  }
}

@media (max-width: 767px) {
  .crash-shell,
  .dice-shell,
  .horse-shell {
    gap: 10px;
    width: 100%;
    margin-left: 0;
    margin-right: 0;
  }

  .crash-stage,
  .dice-stage,
  .horse-stage,
  .crash-control-stack,
  .dice-panel,
  .horse-panel,
  .crash-meta-grid > div,
  .dice-meta-grid > div,
  .horse-meta-grid > div {
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 18px;
    background: rgba(17,24,39,0.92);
    box-shadow: var(--shadow-card);
  }

  .crash-stage,
  .dice-stage,
  .horse-stage {
    padding: 10px;
    overflow: hidden;
  }

  .crash-control-stack,
  .dice-panel,
  .horse-panel {
    padding: 12px;
  }

  .dice-panel {
    order: 1;
  }

  .dice-stage {
    order: 2;
  }

  .crash-stage-top,
  .dice-stage-top,
  .horse-stage-top {
    align-items: flex-start;
    flex-direction: row;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
  }

  .crash-round-label,
  .dice-round-label,
  .horse-round-label,
  .crash-panel-title,
  .dice-panel-title,
  .horse-panel-title {
    font-size: 14px;
  }

  .crash-proof,
  .dice-proof,
  .horse-proof {
    font-size: 11px;
    line-height: 1.35;
  }

  .crash-visual,
  .dice-arena,
  .horse-track {
    margin-top: 8px;
    min-height: 188px;
    border-radius: 18px;
  }

  .crash-multiplier {
    font-size: clamp(38px, 15vw, 58px);
  }

  .dice-result-banner {
    min-width: min(88%, 300px);
    font-size: 15px;
  }

  .horse-race-banner {
    min-height: 74px;
    padding: 12px;
    font-size: clamp(20px, 8vw, 34px);
  }

  .crash-meta-grid,
  .dice-meta-grid,
  .horse-meta-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .crash-meta-grid > div,
  .dice-meta-grid > div,
  .horse-meta-grid > div {
    min-height: 58px;
    padding: 10px;
  }

  .crash-meta-grid span,
  .dice-meta-grid span,
  .horse-meta-grid span,
  .dice-rules-card span {
    font-size: 10px;
    line-height: 1.15;
  }

  .crash-meta-grid strong,
  .dice-meta-grid strong,
  .horse-meta-grid strong,
  .dice-rules-card strong {
    font-size: 13px;
    line-height: 1.2;
  }

  .dice-rules-card {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 10px 0;
  }

  .horse-selector {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 10px 0;
  }

  .horse-pick {
    min-height: 54px;
    padding: 8px;
    border-radius: 12px;
  }

  .horse-pick strong {
    font-size: 12px;
  }

  .horse-pick small {
    font-size: 10px;
  }

  .crash-quick-row,
  .dice-quick-row,
  .horse-quick-row {
    gap: 6px;
    margin: -4px 0 12px;
  }

  .crash-actions,
  .dice-actions,
  .horse-actions {
    gap: 8px;
  }

  .crash-actions .btn,
  .dice-actions .btn,
  .horse-actions .btn {
    min-height: 46px;
    border-radius: 14px;
    font-size: 13px;
  }

  .crash-limit-row,
  .dice-limit-row,
  .horse-limit-row {
    font-size: 11px;
    line-height: 1.25;
  }
}

.rank-badge {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  
  font-size: 14px;
  font-weight: 800;
  flex-shrink: 0;
}

.rank-1 { background: var(--grad-gold); color: #fff; box-shadow: 0 4px 16px rgba(245,158,11,0.4); }
.rank-2 { background: linear-gradient(135deg, #64748b, #94a3b8); color: #fff; }
.rank-3 { background: linear-gradient(135deg, #92400e, #b45309); color: #fff; }
.rank-n { background: var(--bg-secondary); color: var(--text-secondary); border: 1px solid var(--border); }

/* ── Transaction Timeline ─────────────────────────────────── */
.tx-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}

.tx-item:last-child { border-bottom: none; }

.tx-icon {
  width: 40px; height: 40px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.tx-icon.stake   { background: rgba(6,182,212,0.15); }
.tx-icon.unstake { background: rgba(245,158,11,0.12); }
.tx-icon.reward  { background: rgba(16,185,129,0.12); }
.tx-icon.bet-win { background: rgba(16,185,129,0.12); }
.tx-icon.bet-loss { background: rgba(239,68,68,0.08); }

.tx-body { flex: 1; min-width: 0; }
.tx-title { font-size: 14px; font-weight: 600; }
.tx-meta { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.tx-amount {  font-size: 15px; font-weight: 700; text-align: right; }
.tx-amount.positive { color: var(--accent-green); }
.tx-amount.negative { color: var(--accent-red); }

/* ── Stats Row ────────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.stat-card {
  min-width: 0;
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px;
}

.stat-icon {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: rgba(6,182,212,0.12);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  margin-bottom: 12px;
}

.stat-value {
  
  font-size: 22px;
  font-weight: 800;
  line-height: 1.12;
  margin-bottom: 3px;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.stat-label {
  font-size: 12px;
  color: var(--text-muted);
}

.stake-summary-grid .stat-value {
  font-size: clamp(15px, 4.8vw, 22px);
}

.stake-summary-grid .stat-label {
  line-height: 1.2;
}

/* ── Countdown Timer ──────────────────────────────────────── */
.countdown {
  display: flex;
  gap: 8px;
  
}

.countdown-unit {
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  text-align: center;
  min-width: 48px;
}

.countdown-num {
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
}

.countdown-label {
  font-size: 9px;
  color: var(--text-muted);
  font-family: var(--font-body);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ── Page Header ──────────────────────────────────────────── */
.page-header {
  margin-bottom: 28px;
}

.page-title {
  
  font-size: 26px;
  font-weight: 800;
  margin-bottom: 4px;
}

.page-sub {
  font-size: 14px;
  color: var(--text-secondary);
}

/* ── Divider ─────────────────────────────────────────────── */
.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 20px 0;
}

/* ── Toast notifications ──────────────────────────────────── */
.toast-container {
  position: fixed;
  top: 20px; right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: toast-in 0.3s ease;
  pointer-events: all;
  max-width: 320px;
}

.toast.success { border-color: var(--accent-green); }
.toast.error   { border-color: var(--accent-red); }
.toast.info    { border-color: var(--accent); }
.toast.warn    { border-color: var(--accent-gold); }

@keyframes toast-in {
  from { opacity: 0; transform: translateX(100%); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ── Empty State ──────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 56px 24px;
  color: var(--text-muted);
}

.empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-title {
  
  font-size: 18px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

/* ── Loading Skeleton ─────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg,
    rgba(255,255,255,0.04) 25%,
    rgba(255,255,255,0.08) 50%,
    rgba(255,255,255,0.04) 75%
  );
  background-size: 200% 100%;
  animation: skeleton-wave 1.5s infinite;
  border-radius: var(--radius-md);
}

@keyframes skeleton-wave {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Connect Wallet Page ──────────────────────────────────── */
.connect-page {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--bg-primary);
}

.connect-card {
  width: 100%;
  max-width: 400px;
}

.wallet-options-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.wallet-option {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--t-fast);
  background: var(--bg-card);
  color: var(--text-primary);
  text-align: left;
  width: 100%;
  min-width: 0;
  min-height: 82px;
  font: inherit;
  appearance: none;
}

.wallet-option:hover {
  border-color: var(--accent);
  transform: translateX(4px);
}

.wallet-option-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
}

.wallet-option-icon img {
  width: 100%;
  height: 100%;
  display: block;
}

.wallet-option-icon-trust { background: #1e88e5; }
.wallet-option-icon-wc { background: linear-gradient(135deg, #3b99fc, #23d18b); }
.wallet-option-icon-other { background: linear-gradient(135deg, #6b7280, #06b6d4); }
.wallet-option-copy { min-width: 0; flex: 1; }
.wallet-option-name { font-size: 15px; font-weight: 600; }
.wallet-option-desc { font-size: 12px; color: var(--text-muted); line-height: 1.35; }
.wallet-option-arrow { color: var(--text-muted); flex-shrink: 0; }

/* -- System Balance Wallet ------------------------------------------ */
.system-balance-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-card);
}

.system-balance-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.system-balance-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
}

.system-balance-amount {
  margin-top: 4px;
  
  font-size: 24px;
  font-weight: 800;
  color: var(--text-primary);
}

.system-balance-sub,
.system-balance-status {
  margin-top: 5px;
  font-size: 12px;
  color: var(--text-muted);
}

.system-balance-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.bet-control-balances {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 14px;
}

.bet-balance-tile {
  min-width: 0;
  min-height: 74px;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
}

.bet-balance-tile span {
  display: block;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.25;
  text-transform: uppercase;
}

.bet-balance-tile strong {
  display: block;
  min-width: 0;
  margin-top: 5px;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.bet-balance-tile-system {
  border-color: rgba(6,182,212,0.24);
  background: rgba(6,182,212,0.06);
}

.bet-balance-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 5px;
  font-size: 11px;
}

.payment-method-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.payment-method-option {
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  color: var(--text-primary);
  border-radius: var(--radius-md);
  padding: 10px;
  text-align: left;
  cursor: pointer;
  font: inherit;
  min-width: 0;
  transition: all var(--t-fast);
}

.payment-method-option > span {
  display: block;
  font-size: 13px;
  font-weight: 800;
}

.payment-method-option small {
  display: block;
  margin-top: 6px;
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.25;
}

.payment-method-option small strong {
  display: block;
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 900;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.payment-method-option em {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
  color: var(--accent);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.payment-method-option em span {
  display: inline-flex;
  width: auto;
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
  cursor: pointer;
}

.payment-method-option.selected {
  border-color: var(--accent);
  background: rgba(6,182,212,0.12);
  box-shadow: 0 0 0 1px rgba(6,182,212,0.18);
}

.system-balance-warning {
  display: none;
  margin-top: 9px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: rgba(245,158,11,0.08);
  border: 1px solid rgba(245,158,11,0.22);
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.45;
}

.system-balance-warning.visible {
  display: block;
}

.inline-link-button {
  appearance: none;
  background: none;
  border: 0;
  color: var(--accent);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
}

.system-balance-modal {
  max-width: 440px;
}

.system-balance-modal-summary {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 14px;
  margin-bottom: 16px;
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
  font-size: 13px;
  color: var(--text-muted);
}

.system-balance-modal-summary strong {
  color: var(--text-primary);
}

.system-balance-modal-status {
  min-height: 18px;
  margin: 0 0 16px;
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.45;
}

/* -- Commerce / P2P -------------------------------------------------- */
.commerce-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.commerce-tab {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  color: var(--text-secondary);
  border-radius: 999px;
  padding: 10px 16px;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.commerce-tab.active {
  border-color: var(--accent);
  background: rgba(6,182,212,0.14);
  color: var(--accent);
}

.commerce-card {
  margin-bottom: 20px;
}

.commerce-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 18px;
}

.commerce-kicker {
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.commerce-title {
  margin-top: 2px;
  
  font-size: 18px;
  font-weight: 800;
}

.commerce-form textarea.form-input {
  min-height: 96px;
  resize: vertical;
}

.commerce-preview,
.commerce-status {
  min-height: 20px;
  margin: 0 0 14px;
  color: var(--text-secondary);
  font-size: 12px;
}

.commerce-preview {
  padding: 12px 14px;
  border: 1px solid rgba(6,182,212,0.22);
  border-radius: var(--radius-md);
  background: rgba(6,182,212,0.08);
  font-weight: 800;
  color: var(--text-primary);
}

.commerce-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
}

.feature-unavailable {
  opacity: 0.56;
}

.commerce-tab.feature-unavailable {
  cursor: not-allowed;
}

.commerce-section-title {
  margin: 16px 0 10px;
  
  font-size: 15px;
  font-weight: 800;
  color: var(--text-primary);
}

.orders-screen {
  width: min(100%, 620px);
  margin: 0 auto 18px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-lg);
  background: #000;
  color: #f8fafc;
  overflow: visible;
  box-shadow: var(--shadow-card);
}

.orders-topbar {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 96px;
  align-items: center;
  min-height: 62px;
  padding: 8px 16px 4px;
}

.orders-topbar strong {
  text-align: center;
  color: #fff;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0;
}

.orders-top-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.orders-icon-btn {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #f8fafc;
  cursor: pointer;
}

.orders-icon-btn svg {
  width: 25px;
  height: 25px;
}

.orders-stage-tabs {
  display: flex;
  align-items: flex-end;
  gap: 26px;
  min-height: 48px;
  padding: 0 22px;
  border-bottom: 1px solid rgba(255,255,255,0.14);
}

.orders-stage-tabs button {
  appearance: none;
  position: relative;
  height: 48px;
  border: 0;
  background: transparent;
  color: #565b66;
  font: inherit;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0;
  cursor: pointer;
}

.orders-stage-tabs button.active {
  color: #f9fafb;
}

.orders-stage-tabs button.active::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  border-radius: 999px;
  background: #f9fafb;
}

.orders-stage-tabs span {
  color: #6b7280;
  font-size: 12px;
}

.orders-status-tabs {
  display: flex;
  gap: 22px;
  padding: 22px 22px 14px;
  overflow-x: auto;
}

.orders-status-tabs button {
  appearance: none;
  min-width: 64px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #555b66;
  padding: 9px 16px;
  font: inherit;
  font-size: 16px;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
}

.orders-status-tabs button.active {
  background: #20232b;
  color: #f8fafc;
}

.orders-list {
  display: grid;
  padding: 0 22px 20px;
}

.orders-card {
  padding: 18px 0 24px;
  border-bottom: 1px solid rgba(255,255,255,0.11);
  color: #f8fafc;
  cursor: default;
}

.orders-card[data-history-href] {
  cursor: pointer;
}

.orders-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.orders-pair {
  color: #f8fafc;
  font-size: 18px;
  font-weight: 800;
}

.orders-pair span {
  margin-right: 5px;
}

.orders-pair .sell {
  color: #ff3b63;
}

.orders-pair .buy {
  color: #16c784;
}

.orders-state {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #8b8f98;
  font-size: 15px;
  font-weight: 800;
  white-space: nowrap;
}

.orders-state.completed {
  color: #16c784;
}

.orders-state.canceled {
  color: #9ca3af;
}

.orders-state.active,
.orders-state.paid {
  color: #f59e0b;
}

.orders-state.disputed {
  color: #ef4444;
}

.orders-state span {
  color: #4b5563;
  font-size: 0;
  line-height: 1;
}

.orders-state span::before {
  content: '\203A';
  font-size: 24px;
}

.orders-detail-grid {
  display: grid;
  grid-template-columns: minmax(82px, 0.7fr) minmax(0, 1fr);
  gap: 10px 14px;
  align-items: center;
}

.orders-detail-grid span {
  color: #777d88;
  font-size: 16px;
  font-weight: 600;
}

.orders-detail-grid strong {
  min-width: 0;
  justify-self: end;
  color: #f7f7f8;
  font-size: 17px;
  font-weight: 700;
  text-align: right;
  overflow-wrap: anywhere;
}

.orders-detail-grid span:first-child + strong {
  font-size: 21px;
  font-weight: 800;
}

.orders-number {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.orders-number button {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 0;
  background: transparent;
  color: #d1d5db;
  padding: 0;
  cursor: pointer;
}

.orders-number svg {
  width: 20px;
  height: 20px;
}

.orders-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
}

.orders-chat-pill {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 54%;
  border: 1px solid #363a42;
  border-radius: 999px;
  padding: 5px 11px;
  color: #d1d5db;
  font-size: 15px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.orders-chat-pill svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.orders-card-foot time {
  color: #575d67;
  font-size: 16px;
  white-space: nowrap;
}

.orders-empty {
  display: grid;
  gap: 7px;
  min-height: 260px;
  align-content: center;
  justify-items: center;
  color: #f8fafc;
  text-align: center;
}

.orders-empty div {
  font-size: 18px;
  font-weight: 800;
}

.orders-empty span {
  max-width: 300px;
  color: #6b7280;
  font-size: 13px;
}

.orders-bottom-nav {
  display: none;
}

.p2p-app-shell {
  position: relative;
  width: min(100%, 640px);
  margin: 0 auto 24px;
  padding-bottom: 0;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-lg);
  background: #000;
  color: #f8fafc;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.p2p-app-view {
  display: none;
  min-height: 620px;
}

.p2p-app-view.active {
  display: block;
}

.p2p-app-shell .p2p-exchange-shell,
.p2p-app-shell .orders-screen {
  width: 100%;
  margin: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.p2p-app-shell .orders-screen {
  min-height: 620px;
}

.p2p-app-header {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 48px;
  align-items: center;
  min-height: 62px;
  padding: 8px 16px 4px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}

.p2p-app-header strong {
  text-align: center;
  color: #fff;
  font-size: 24px;
  font-weight: 800;
}

.p2p-create-short {
  justify-self: end;
  min-height: 34px;
  border: 0;
  border-radius: 8px;
  background: #f0b90b;
  color: #111;
  padding: 0 12px;
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.p2p-ads-view,
.p2p-profile-view {
  padding: 0 18px 20px;
}

.p2p-ads-view .p2p-create-drawer {
  margin-top: 18px;
}

.p2p-app-shell .empty-state {
  padding: 36px 16px;
}

.p2p-app-card,
.p2p-create-card {
  border: 1px solid rgba(255,255,255,0.08);
  background: #070807;
  box-shadow: none;
}

.p2p-app-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.p2p-app-section-head span {
  display: block;
  color: #777d88;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.p2p-app-section-head strong {
  display: block;
  margin-top: 2px;
  color: #f8fafc;
  font-size: 18px;
  font-weight: 800;
}

.p2p-profile-card {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 18px 0 14px;
  padding: 16px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-md);
  background: #070807;
}

.p2p-profile-avatar {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: 50%;
  background: #f59e0b;
  color: #111;
  font-weight: 900;
}

.p2p-profile-name {
  color: #f8fafc;
  font-size: 18px;
  font-weight: 800;
}

.p2p-profile-wallet {
  color: #777d88;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.p2p-profile-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.p2p-profile-stats > div {
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-md);
  background: #070807;
}

.p2p-profile-stats span {
  display: block;
  color: #777d88;
  font-size: 12px;
  font-weight: 700;
}

.p2p-profile-stats strong {
  display: block;
  margin-top: 5px;
  color: #f8fafc;
  font-size: 18px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.p2p-profile-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}

.p2p-app-nav {
  position: sticky;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-around;
  height: 86px;
  padding: 10px 18px;
  border: 1px solid rgba(255,255,255,0.12);
  border-bottom: 0;
  border-radius: 30px 30px 0 0;
  background: rgba(5,5,6,0.98);
  box-shadow: 0 -12px 30px rgba(0,0,0,0.55);
}

.p2p-app-nav button {
  appearance: none;
  display: inline-flex;
  min-width: 58px;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  border: 0;
  background: transparent;
  color: #5f6570;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.p2p-app-nav button.active {
  color: #f8fafc;
}

.p2p-app-nav svg {
  width: 26px;
  height: 26px;
}

.p2p-market-shell {
  min-height: 100%;
  background: #0b0e11;
  color: #eaecef;
}

.p2p-market-header {
  position: sticky;
  top: 0;
  z-index: 12;
  border-bottom: 1px solid #242935;
  background: rgba(11, 14, 17, 0.96);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.p2p-market-topline {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 12px 14px 8px;
}

.p2p-home-btn-market {
  border-color: #242935;
  background: #13161c;
}

.p2p-market-brand {
  min-width: 0;
}

.p2p-market-brand strong {
  display: block;
  color: #f8fafc;
  font-size: 20px;
  font-weight: 900;
  line-height: 1.12;
}

.p2p-market-brand span {
  display: block;
  margin-top: 2px;
  color: #848e9c;
  font-size: 12px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.p2p-market-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.p2p-header-quick {
  min-height: 34px;
  border: 1px solid #242935;
  border-radius: 8px;
  background: #1a1e28;
  color: #eaecef;
  padding: 0 11px;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.p2p-header-quick.active,
.p2p-header-quick:hover {
  border-color: rgba(240,185,11,0.48);
  color: #f0b90b;
}

.p2p-tabs-row {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0 14px;
  border-top: 1px solid rgba(255,255,255,0.04);
  border-bottom: 1px solid #242935;
}

.p2p-tab {
  position: relative;
  min-width: 72px;
  min-height: 48px;
  border: 0;
  background: transparent;
  color: #848e9c;
  padding: 0 20px;
  font: inherit;
  font-size: 15px;
  font-weight: 900;
  cursor: pointer;
}

.p2p-tab::after {
  content: '';
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 0;
  height: 2px;
  border-radius: 999px;
  background: transparent;
}

.p2p-tab.buy.active {
  color: #03a66d;
}

.p2p-tab.sell.active {
  color: #cf304a;
}

.p2p-tab.buy.active::after {
  background: #03a66d;
}

.p2p-tab.sell.active::after {
  background: #cf304a;
}

.p2p-asset-row {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding: 11px 14px;
  scrollbar-width: none;
}

.p2p-asset-row::-webkit-scrollbar {
  display: none;
}

.p2p-asset-chip {
  min-height: 34px;
  border: 1px solid rgba(240,185,11,0.58);
  border-radius: 999px;
  background: rgba(240,185,11,0.12);
  color: #f0b90b;
  padding: 0 16px;
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.p2p-asset-note {
  color: #848e9c;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.p2p-filters-row {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding: 10px 14px 12px;
  border-top: 1px solid #1e2330;
  scrollbar-width: none;
}

.p2p-filters-row::-webkit-scrollbar {
  display: none;
}

.p2p-filter-select,
.p2p-search-wrap input,
.p2p-filter-btn {
  min-height: 38px;
  border: 1px solid #242935;
  border-radius: 8px;
  background: #0f1218;
  color: #eaecef;
  font: inherit;
  font-size: 13px;
}

.p2p-filter-select {
  min-width: 118px;
  padding: 0 34px 0 12px;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23848e9c'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 9px center;
  background-size: 16px;
}

.p2p-search-wrap {
  position: relative;
  min-width: 190px;
  flex: 1 0 190px;
}

.p2p-search-wrap input {
  width: 100%;
  padding: 0 12px 0 34px;
}

.p2p-search-wrap input::placeholder {
  color: #5e6673;
}

.p2p-search-icon {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: #848e9c;
  pointer-events: none;
}

.p2p-filter-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex: 0 0 auto;
  padding: 0 13px;
  color: #848e9c;
  cursor: pointer;
}

.p2p-filter-select:focus,
.p2p-search-wrap input:focus,
.p2p-filter-btn:hover {
  border-color: #f0b90b;
}

.p2p-market-shell .p2p-market-notice {
  margin: 12px 14px 0;
  padding: 10px 12px;
  border: 1px solid rgba(240,185,11,0.18);
  border-radius: 8px;
  background: rgba(240,185,11,0.08);
  color: #d6d9de;
  font-size: 12px;
  line-height: 1.45;
  white-space: normal;
}

.p2p-market-shell .p2p-market-notice::before {
  background: #f0b90b;
}

.p2p-mobile-offers {
  display: grid;
  gap: 10px;
  padding: 12px 14px calc(102px + env(safe-area-inset-bottom, 0px));
}

.p2p-merchant-card {
  min-width: 0;
  border: 1px solid #242935;
  border-radius: 16px;
  background: #1a1e28;
  padding: 16px;
  overflow: hidden;
}

.p2p-merchant-top,
.p2p-merchant-mid,
.p2p-merchant-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.p2p-merchant-user,
.p2p-table-merchant {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.p2p-merchant-avatar,
.p2p-table-avatar {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: 50%;
  color: #050505;
  font-size: 14px;
  font-weight: 900;
}

.p2p-merchant-user strong,
.p2p-table-merchant strong {
  display: block;
  color: #eaecef;
  font-size: 14px;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.p2p-merchant-user span:not(.p2p-merchant-avatar),
.p2p-table-merchant span:not(.p2p-table-avatar) {
  display: block;
  margin-top: 2px;
  color: #848e9c;
  font-size: 11px;
  font-weight: 700;
}

.p2p-trust-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  background: rgba(3,166,109,0.12);
  color: #03a66d;
  padding: 0 9px;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.p2p-merchant-mid {
  align-items: flex-end;
  margin: 15px 0 12px;
}

.p2p-merchant-price {
  color: #eaecef;
  
  font-size: 24px;
  font-weight: 900;
  line-height: 1.05;
}

.p2p-merchant-price span {
  margin-right: 4px;
  color: #848e9c;
  font-size: 13px;
  font-family: var(--font-body);
}

.p2p-merchant-method {
  margin-top: 5px;
  color: #848e9c;
  font-size: 12px;
  font-weight: 700;
}

.p2p-merchant-limits {
  min-width: 0;
  text-align: right;
}

.p2p-merchant-limits span,
.p2p-merchant-stats span {
  display: block;
  color: #848e9c;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.p2p-merchant-limits strong,
.p2p-merchant-stats strong {
  display: block;
  margin-top: 2px;
  color: #eaecef;
  font-size: 12px;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.p2p-merchant-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

.p2p-merchant-stats > div {
  min-width: 0;
  border-radius: 8px;
  background: #13161c;
  padding: 10px;
}

.p2p-payment-tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border: 1px solid #242935;
  border-radius: 999px;
  background: #13161c;
  color: #b8c0cc;
  padding: 0 11px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.p2p-payment-tag::before {
  content: '';
  width: 3px;
  height: 12px;
  margin-right: 7px;
  border-radius: 999px;
  background: #f0b90b;
}

.p2p-trade-btn {
  min-width: 96px;
  min-height: 40px;
  border: 0;
  border-radius: 8px;
  color: #fff;
  padding: 0 16px;
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.p2p-trade-btn.buy {
  background: #03a66d;
}

.p2p-trade-btn.sell {
  background: #cf304a;
}

.p2p-trade-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.p2p-desktop-wrap {
  display: none;
}

.p2p-table-section,
.p2p-side-card {
  border: 1px solid #242935;
  border-radius: 16px;
  background: #13161c;
  overflow: hidden;
}

.p2p-table {
  width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
}

.p2p-table th {
  padding: 13px 16px;
  border-bottom: 1px solid #242935;
  color: #848e9c;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}

.p2p-table td {
  padding: 16px;
  border-bottom: 1px solid #1e2330;
  color: #eaecef;
  vertical-align: middle;
}

.p2p-table tr:last-child td {
  border-bottom: 0;
}

.p2p-table tr:hover td {
  background: #1a1e28;
}

.p2p-table-price {
  color: #f0b90b;
  font-size: 16px;
  font-weight: 900;
  white-space: nowrap;
}

.p2p-table-available,
.p2p-table-limit {
  display: block;
  white-space: nowrap;
}

.p2p-table-available {
  color: #eaecef;
  font-size: 13px;
  font-weight: 900;
}

.p2p-table-limit {
  margin-top: 3px;
  color: #848e9c;
  font-size: 12px;
}

.p2p-right-panel {
  display: grid;
  align-content: start;
  gap: 16px;
}

.p2p-side-card {
  padding: 18px;
}

.p2p-side-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: #eaecef;
  font-size: 14px;
  font-weight: 900;
}

.p2p-side-title::before {
  content: '';
  width: 3px;
  height: 16px;
  border-radius: 999px;
  background: #f0b90b;
}

.p2p-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.p2p-stat-item {
  min-width: 0;
  border-radius: 10px;
  background: #0f1218;
  padding: 12px;
}

.p2p-stat-item strong {
  display: block;
  color: #eaecef;
  font-size: 20px;
  font-weight: 900;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.p2p-stat-item span {
  display: block;
  margin-top: 3px;
  color: #848e9c;
  font-size: 11px;
  font-weight: 800;
}

.p2p-market-feed {
  display: grid;
  gap: 8px;
}

.p2p-feed-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-radius: 10px;
  background: #0f1218;
  padding: 10px 12px;
}

.p2p-feed-row span {
  min-width: 0;
  color: #b8c0cc;
  font-size: 12px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.p2p-feed-row strong {
  color: #eaecef;
  font-size: 12px;
  font-weight: 900;
  text-align: right;
  white-space: nowrap;
}

.p2p-feed-empty {
  color: #848e9c;
  font-size: 12px;
}

.p2p-safety-list {
  display: grid;
  gap: 10px;
}

.p2p-safety-item {
  display: flex;
  gap: 10px;
  border-radius: 10px;
  background: #0f1218;
  padding: 10px;
}

.p2p-safety-item span {
  width: 44px;
  min-width: 44px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: rgba(240,185,11,0.12);
  color: #f0b90b;
  font-size: 10px;
  font-weight: 900;
}

.p2p-safety-item p {
  margin: 0;
  color: #848e9c;
  font-size: 12px;
  line-height: 1.45;
}

.p2p-safety-item strong {
  display: block;
  color: #eaecef;
  font-size: 13px;
}

.p2p-empty-state {
  display: grid;
  align-content: center;
  justify-items: center;
  min-height: 240px;
  padding: 30px 16px;
  color: #848e9c;
  text-align: center;
}

.p2p-empty-state strong {
  display: block;
  color: #eaecef;
  font-size: 17px;
  font-weight: 900;
}

.p2p-empty-state span {
  display: block;
  max-width: 320px;
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.45;
}

.p2p-board {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.75fr);
  gap: 20px;
  align-items: start;
}

.p2p-filter {
  min-width: 150px;
}

.p2p-exchange-shell {
  margin-bottom: 16px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-lg);
  background: #030504;
  color: #f8fafc;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.p2p-exchange-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 18px 10px;
}

.p2p-home-btn {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 50%;
  color: #f8fafc;
  background: rgba(255,255,255,0.04);
}

.p2p-home-btn svg {
  width: 22px;
  height: 22px;
}

.p2p-home-btn span {
  display: none;
}

.p2p-exchange-title {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.p2p-exchange-title strong {
  
  font-size: 24px;
  font-weight: 800;
  color: #fff;
}

.p2p-exchange-title span {
  color: #6b7280;
  font-weight: 800;
}

.p2p-currency-pill select {
  min-width: 84px;
  height: 34px;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 999px;
  background: #050706;
  color: #fff;
  padding: 0 12px;
  font-weight: 800;
}

.p2p-market-notice {
  margin: 0 18px 12px;
  color: #d1d5db;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.p2p-market-notice::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 8px;
  border-radius: 50%;
  background: #f8fafc;
}

.p2p-market-tabs {
  display: inline-flex;
  margin: 0 18px 14px;
  padding: 4px;
  border-radius: 999px;
  background: #171717;
}

.p2p-market-tabs button {
  min-width: 64px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #8b8f98;
  padding: 10px 18px;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
}

.p2p-market-tabs button.active {
  background: #3f444c;
  color: #fff;
}

.p2p-filter-bar {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 12px 18px;
  border-top: 1px solid rgba(255,255,255,0.07);
  border-bottom: 1px solid rgba(255,255,255,0.07);
  color: #f3f4f6;
  overflow-x: auto;
}

.p2p-filter-bar span,
.p2p-filter-bar button {
  white-space: nowrap;
}

.p2p-filter-bar button {
  border: 0;
  background: transparent;
  color: #f3f4f6;
  padding: 0;
  font-size: 14px;
  cursor: default;
}

.p2p-exchange-list {
  display: grid;
}

.p2p-ad-card {
  padding: 18px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  background: #030504;
}

.p2p-ad-head,
.p2p-ad-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.p2p-ad-user {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.p2p-avatar {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #f59e0b;
  color: #111;
  font-size: 12px;
  font-weight: 900;
  flex-shrink: 0;
}

.p2p-ad-user strong {
  display: block;
  color: #e5e7eb;
  font-size: 14px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.p2p-ad-user span,
.p2p-ad-score {
  display: block;
  color: #6b7280;
  font-size: 12px;
  font-weight: 700;
}

.p2p-ad-score {
  border-radius: 999px;
  background: rgba(16,185,129,0.12);
  color: #10b981;
  padding: 4px 8px;
  white-space: nowrap;
}

.p2p-ad-price {
  margin: 16px 0 10px;
  color: #f9fafb;
  font-size: 28px;
  line-height: 1;
  font-weight: 800;
}

.p2p-ad-price span {
  margin-right: 4px;
  font-size: 15px;
}

.p2p-ad-meta {
  display: grid;
  gap: 4px;
  margin-bottom: 8px;
  color: #8b8f98;
  font-size: 13px;
}

.p2p-ad-meta strong {
  color: #d1d5db;
  font-weight: 700;
}

.p2p-payment-line {
  color: #9ca3af;
  font-size: 13px;
}

.p2p-payment-line::before {
  content: '';
  display: inline-block;
  width: 2px;
  height: 12px;
  margin-right: 7px;
  vertical-align: -2px;
  background: #f59e0b;
}

.p2p-action-btn {
  min-width: 96px;
  border-radius: 999px;
  background: #16c784 !important;
  border-color: #16c784 !important;
  color: #fff !important;
}

.p2p-create-drawer {
  margin-bottom: 16px;
}

.p2p-create-drawer > summary {
  list-style: none;
  cursor: pointer;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  color: var(--text-primary);
  font-weight: 800;
}

.p2p-create-drawer > summary::-webkit-details-marker {
  display: none;
}

.p2p-create-drawer[open] > summary {
  margin-bottom: 12px;
  border-color: rgba(6,182,212,0.35);
}

.p2p-side-toggle {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.p2p-side-toggle label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.p2p-side-toggle label:has(input:checked) {
  border-color: var(--accent);
  background: rgba(6,182,212,0.14);
  color: var(--accent);
}

.p2p-board-head,
.p2p-offer-row {
  display: grid;
  grid-template-columns: minmax(140px, 1.2fr) minmax(110px, 0.8fr) minmax(120px, 0.8fr) minmax(130px, 0.9fr) auto;
  gap: 12px;
  align-items: center;
}

.p2p-board-head {
  padding: 0 14px 10px;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.p2p-board-list {
  display: grid;
  gap: 10px;
}

.p2p-offer-row {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
}

.p2p-advertiser,
.p2p-price,
.p2p-limits,
.p2p-available {
  min-width: 0;
}

.p2p-advertiser strong,
.p2p-price strong,
.p2p-limits strong,
.p2p-available strong {
  display: block;
  color: var(--text-primary);
  font-weight: 800;
  overflow-wrap: anywhere;
}

.p2p-price strong {
  color: var(--accent-gold);
  font-size: 18px;
}

.p2p-advertiser span,
.p2p-price span,
.p2p-limits span,
.p2p-available span {
  display: block;
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.p2p-my-offers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.p2p-manage-card {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
}

.p2p-manage-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.p2p-manage-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.p2p-manage-stats > div {
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.03);
  min-width: 0;
}

.p2p-manage-stats span,
.commerce-modal-facts span {
  display: block;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.p2p-manage-stats strong,
.commerce-modal-facts strong {
  display: block;
  margin-top: 4px;
  color: var(--text-primary);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.p2p-manage-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.commerce-action-modal {
  width: min(520px, calc(100vw - 28px));
}

.commerce-offer-edit-modal {
  width: min(720px, calc(100vw - 28px));
  max-height: calc(100vh - 36px);
  max-height: calc(100dvh - 36px);
  overflow-y: auto;
}

.commerce-modal-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 14px 0;
}

.commerce-modal-facts > div {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
}

.commerce-offer-card,
.commerce-history-row {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
  padding: 14px;
  margin-bottom: 10px;
}

.commerce-offer-main,
.commerce-history-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.commerce-offer-title,
.commerce-rate {
  font-weight: 800;
  color: var(--text-primary);
}

.commerce-offer-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 10px 0 12px;
  color: var(--text-muted);
  font-size: 12px;
}

.commerce-muted {
  color: var(--text-muted);
  font-size: 12px;
}

.commerce-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.commerce-detail-grid > div {
  min-width: 0;
  padding: 12px;
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
}

.commerce-detail-grid span {
  display: block;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.commerce-detail-grid strong {
  display: block;
  margin-top: 4px;
  color: var(--text-primary);
  overflow-wrap: anywhere;
}

.commerce-payment-box {
  margin: 16px 0;
  padding: 14px;
  border: 1px solid rgba(245,158,11,0.24);
  border-radius: var(--radius-md);
  background: rgba(245,158,11,0.08);
}

.commerce-payment-box pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin: 8px 0 14px;
  color: var(--text-primary);
  font: inherit;
  font-size: 13px;
}

.commerce-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.p2p-messages {
  height: 390px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
  margin-bottom: 12px;
}

.p2p-message {
  max-width: 86%;
  align-self: flex-start;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  background: var(--bg-card);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.p2p-message.own {
  align-self: flex-end;
  border-color: rgba(6,182,212,0.35);
  background: rgba(6,182,212,0.1);
}

.p2p-message-meta {
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 800;
  margin-bottom: 3px;
  text-transform: uppercase;
}

.p2p-chat-quick {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin: 0 0 12px;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.p2p-chat-quick::-webkit-scrollbar {
  display: none;
}

.p2p-chat-quick button {
  flex: 0 0 auto;
  min-height: 34px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-secondary);
  color: var(--text-secondary);
  padding: 0 12px;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.p2p-chat-quick button:hover {
  border-color: #f0b90b;
  color: #f0b90b;
}

.p2p-message-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.p2p-order-modal-overlay {
  align-items: center;
  padding: 16px;
}

.p2p-order-sheet {
  width: min(520px, 100%);
  max-height: min(920px, calc(100vh - 32px));
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 28px;
  background: #000;
  color: #f8fafc;
  overflow: hidden;
  box-shadow: 0 24px 70px rgba(0,0,0,0.72);
  transform: scale(0.96);
  transition: transform var(--t-normal), opacity var(--t-normal);
  opacity: 0;
}

.p2p-order-modal-overlay.open .p2p-order-sheet {
  transform: scale(1);
  opacity: 1;
}

.p2p-order-topbar,
.p2p-payment-topbar {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 62px;
  padding: 12px 22px 8px;
}

.p2p-order-topbar strong {
  text-align: center;
  font-size: 24px;
  font-weight: 800;
}

.p2p-order-back,
.p2p-payment-back {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #f8fafc;
  cursor: pointer;
}

.p2p-order-back svg,
.p2p-payment-back svg {
  width: 28px;
  height: 28px;
}

.p2p-order-form {
  min-height: 0;
  overflow-y: auto;
  padding: 0 22px 118px;
}

.p2p-order-price-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  margin: 4px 0 8px;
  color: #d1d5db;
  font-size: 16px;
}

.p2p-order-price-row strong {
  color: #16c784;
  font-size: 17px;
  font-weight: 800;
}

.p2p-order-price-row small {
  color: #525866;
  font-size: 13px;
}

.p2p-order-price-row em {
  min-width: 0;
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-radius: 999px;
  background: #1c1d21;
  color: #858b96;
  padding: 3px 8px;
  font-style: normal;
  font-size: 13px;
  white-space: nowrap;
}

.p2p-order-price-row svg {
  width: 16px;
  height: 16px;
  color: #16c784;
}

.p2p-order-warning {
  margin: 10px 0 28px;
  padding: 10px 14px;
  border-radius: 4px;
  background: #1d1205;
  color: #f5f5f4;
  font-size: 16px;
  line-height: 1.3;
}

.p2p-order-amount-card,
.p2p-order-method-card,
.p2p-order-account-card {
  border-radius: 22px;
  background: #171717;
  color: #f8fafc;
}

.p2p-order-amount-card {
  padding: 22px 20px 18px;
}

.p2p-order-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}

.p2p-order-card-head strong {
  position: relative;
  font-size: 19px;
  font-weight: 800;
}

.p2p-order-card-head strong::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -11px;
  width: 82px;
  height: 3px;
  border-radius: 999px;
  background: #f8fafc;
}

.p2p-order-card-head span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #7a808a;
  font-size: 15px;
}

.p2p-order-card-head svg {
  width: 17px;
  height: 17px;
}

.p2p-order-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}

.p2p-order-input-row input {
  width: 100%;
  min-width: 0;
  border: 0;
  background: transparent;
  color: #f8fafc;
  font: inherit;
  font-size: 46px;
  font-weight: 800;
  line-height: 1.05;
  outline: none;
}

.p2p-order-input-row input::placeholder {
  color: #f8fafc;
}

.p2p-order-input-row strong {
  color: #f8fafc;
  font-size: 20px;
  font-weight: 800;
}

.p2p-order-input-row button {
  border: 0;
  border-left: 1px solid rgba(255,255,255,0.12);
  background: transparent;
  color: #f59e0b;
  padding-left: 14px;
  font: inherit;
  font-size: 20px;
  cursor: pointer;
}

.p2p-order-limits,
.p2p-order-receive {
  margin-top: 8px;
  color: #777d88;
  font-size: 15px;
}

.p2p-order-receive {
  color: #f8fafc;
  font-size: 18px;
}

.p2p-order-receive strong {
  font-weight: 900;
}

.p2p-order-method-card {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 64px;
  margin: 16px 0 34px;
  padding: 18px 20px;
}

.p2p-order-method-card span {
  width: 3px;
  height: 16px;
  border-radius: 999px;
  background: #f59e0b;
}

.p2p-order-method-card strong {
  font-size: 18px;
  font-weight: 800;
}

.p2p-order-account-card {
  display: grid;
  gap: 10px;
  margin: -18px 0 26px;
  padding: 16px;
}

.p2p-order-account-card label {
  color: #d1d5db;
  font-size: 14px;
  font-weight: 800;
}

.p2p-order-account-card textarea {
  min-height: 112px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  background: #080808;
  color: #f8fafc;
  padding: 12px;
  font: inherit;
  resize: vertical;
  outline: none;
}

.p2p-order-advertiser {
  padding-bottom: 18px;
}

.p2p-order-advertiser-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
}

.p2p-order-advertiser-head strong {
  display: block;
  color: #f8fafc;
  font-size: 18px;
  font-weight: 800;
}

.p2p-order-advertiser-head span {
  display: block;
  margin-top: 5px;
  color: #777d88;
  font-size: 14px;
}

.p2p-order-advertiser-head > div:last-child {
  min-width: 74px;
  display: grid;
  justify-items: center;
  gap: 5px;
  border-left: 1px solid rgba(255,255,255,0.08);
  color: #a1a1aa;
  font-size: 18px;
  font-weight: 800;
}

.p2p-order-advertiser-head svg {
  width: 22px;
  height: 22px;
}

.p2p-order-advertiser h3 {
  margin-bottom: 10px;
  font-size: 19px;
}

.p2p-order-advertiser p {
  color: #8b8f98;
  font-size: 14px;
  line-height: 1.45;
}

.p2p-order-status {
  margin: 0 0 10px;
  min-height: 20px;
}

.p2p-order-bottom {
  position: sticky;
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(150px, 188px);
  align-items: center;
  gap: 14px;
  margin: 28px -22px -118px;
  padding: 16px 22px 22px;
  background: linear-gradient(180deg, rgba(0,0,0,0), #000 18px, #000 100%);
}

.p2p-order-bottom strong,
.p2p-payment-bottom strong {
  display: block;
  color: #f8fafc;
  font-size: 26px;
  font-weight: 900;
  line-height: 1.05;
}

.p2p-order-bottom span,
.p2p-payment-bottom span {
  display: block;
  color: #777d88;
  font-size: 15px;
  line-height: 1.25;
}

.p2p-order-bottom small {
  display: block;
  margin-top: 3px;
  color: #777d88;
  font-size: 11px;
  line-height: 1.25;
}

.p2p-order-bottom button,
.p2p-payment-primary {
  min-height: 56px;
  border: 0;
  border-radius: 999px;
  background: #ff9f2a;
  color: #111;
  padding: 0 28px;
  font: inherit;
  font-size: 18px;
  font-weight: 900;
  cursor: pointer;
}

.p2p-order-bottom button:disabled,
.p2p-payment-primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.p2p-payment-layout {
  display: grid;
  grid-template-columns: minmax(420px, 620px) minmax(320px, 1fr);
  gap: 20px;
  align-items: start;
  max-width: 1180px;
}

.p2p-payment-screen,
.p2p-payment-chat {
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 24px;
  background: #000;
  color: #f8fafc;
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.p2p-payment-screen {
  position: relative;
  min-height: 720px;
  padding-bottom: 112px;
}

.p2p-payment-topbar {
  grid-template-columns: 44px minmax(0, 1fr) auto;
}

.p2p-payment-cancel {
  justify-self: end;
  border: 0;
  background: transparent;
  color: #f8fafc;
  font: inherit;
  font-size: 18px;
  cursor: pointer;
}

.p2p-payment-progress {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  padding: 0 22px;
}

.p2p-payment-progress span {
  height: 3px;
  border-radius: 999px;
  background: #1a1b1f;
}

.p2p-payment-progress span:first-child {
  background: #f8fafc;
}

.p2p-payment-head {
  padding: 12px 22px 16px;
}

.p2p-payment-head h2 {
  color: #f8fafc;
  font-size: 30px;
  line-height: 1.1;
  font-weight: 900;
}

.p2p-payment-head p {
  margin-top: 10px;
  color: #ff3b63;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.35;
}

.p2p-payment-counterparty {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 14px 22px 28px;
  padding: 16px 20px;
  border-radius: 22px;
  background: #171717;
}

.p2p-payment-counterparty strong {
  display: block;
  font-size: 18px;
  font-weight: 850;
}

.p2p-payment-counterparty button {
  flex-shrink: 0;
  min-height: 48px;
  border: 0;
  border-radius: 999px;
  background: #ff9f2a;
  color: #111;
  padding: 0 22px;
  font: inherit;
  font-size: 16px;
  font-weight: 900;
  cursor: pointer;
}

.p2p-payment-status-pill {
  display: inline-flex;
  margin-top: 4px;
  color: #f59e0b;
  font-size: 13px;
  font-weight: 800;
}

.p2p-payment-status-pill.completed { color: #16c784; }
.p2p-payment-status-pill.canceled { color: #9ca3af; }
.p2p-payment-status-pill.disputed { color: #ef4444; }
.p2p-payment-status-pill.paid { color: #f59e0b; }

.p2p-payment-steps {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 0 10px;
  padding: 0 22px;
}

.p2p-payment-step-marker {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #f8fafc;
  color: #111;
  font-size: 14px;
  font-weight: 900;
  z-index: 1;
}

.p2p-payment-step-body {
  position: relative;
  min-width: 0;
  padding: 0 0 24px 20px;
}

.p2p-payment-step-body::before {
  content: '';
  position: absolute;
  left: -22px;
  top: 24px;
  bottom: 0;
  width: 2px;
  background: #f8fafc;
}

.p2p-payment-step-body:last-child::before {
  display: none;
}

.p2p-payment-step-body h3 {
  margin: 0 0 16px;
  color: #f8fafc;
  font-size: 20px;
  line-height: 1.25;
}

.p2p-payment-detail-list {
  display: grid;
  gap: 16px;
  margin: 0;
}

.p2p-payment-detail-list div {
  display: grid;
  grid-template-columns: minmax(112px, 0.8fr) minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.p2p-payment-detail-list dt {
  color: #757b85;
  font-size: 18px;
}

.p2p-payment-detail-list dd {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin: 0;
  color: #f8fafc;
  text-align: right;
}

.p2p-payment-detail-list strong {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 18px;
  font-weight: 750;
}

.p2p-payment-detail-list button {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 0;
  background: transparent;
  color: #d1d5db;
  cursor: pointer;
}

.p2p-payment-detail-list svg {
  width: 20px;
  height: 20px;
}

.p2p-payment-raw-details {
  margin-top: 18px;
  color: #777d88;
  font-size: 16px;
}

.p2p-payment-raw-details summary {
  cursor: pointer;
}

.p2p-payment-raw-details pre {
  margin-top: 10px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: #d1d5db;
  font: inherit;
  font-size: 13px;
}

.p2p-payment-help {
  margin-top: 18px;
  color: #777d88;
  font-size: 15px;
  line-height: 1.35;
}

.p2p-payment-proof-card {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  padding: 16px;
  border-radius: 18px;
  background: #171717;
}

.p2p-payment-proof-card h3 {
  margin: 0;
  color: #f8fafc;
  font-size: 18px;
}

.p2p-payment-proof-card p {
  margin: 0;
  color: #777d88;
  font-size: 13px;
  line-height: 1.35;
}

.p2p-proof-upload {
  min-height: 56px;
  display: grid;
  align-content: center;
  gap: 3px;
  border: 1px dashed rgba(255,255,255,0.18);
  border-radius: 14px;
  background: #080808;
  color: #f8fafc;
  padding: 12px 14px;
  cursor: pointer;
}

.p2p-proof-upload span {
  font-size: 14px;
  font-weight: 900;
}

.p2p-proof-upload small {
  color: #777d88;
  font-size: 12px;
}

.p2p-payment-seller-panel {
  margin: 0 22px 20px;
  padding: 20px;
  border-radius: 22px;
  background: #171717;
}

.p2p-payment-seller-panel h3 {
  font-size: 22px;
  margin-bottom: 8px;
}

.p2p-payment-seller-panel p {
  color: #a1a1aa;
  margin-bottom: 16px;
}

.p2p-payment-summary-grid,
.p2p-payment-mini-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.p2p-payment-summary-grid > div,
.p2p-payment-mini-summary > div {
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  background: #080808;
}

.p2p-payment-summary-grid span,
.p2p-payment-mini-summary span {
  display: block;
  color: #777d88;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.p2p-payment-summary-grid strong,
.p2p-payment-mini-summary strong {
  display: block;
  margin-top: 4px;
  color: #f8fafc;
  font-size: 14px;
  overflow-wrap: anywhere;
}

.p2p-payment-mini-summary {
  margin: 4px 22px 18px;
}

.p2p-payment-mini-summary > div:last-child {
  grid-column: 1 / -1;
}

.p2p-payment-issue {
  width: calc(100% - 44px);
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 12px 22px 22px;
  border: 0;
  border-radius: 999px;
  background: #171717;
  color: #f8fafc;
  padding: 0 18px;
  font: inherit;
  font-size: 16px;
  cursor: pointer;
}

.p2p-payment-issue svg {
  width: 22px;
  height: 22px;
}

.p2p-payment-bottom {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(190px, 1fr);
  align-items: center;
  gap: 14px;
  padding: 16px 22px 22px;
  background: linear-gradient(180deg, rgba(0,0,0,0), #000 18px, #000 100%);
}

.p2p-payment-chat {
  padding: 18px;
}

.p2p-payment-chat-head {
  margin-bottom: 14px;
}

.p2p-payment-chat-head span {
  display: block;
  color: #777d88;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.p2p-payment-chat-head strong {
  display: block;
  color: #f8fafc;
  font-size: 20px;
  font-weight: 850;
}

@media (max-width: 1100px) and (min-width: 768px) {
  .p2p-payment-layout {
    grid-template-columns: minmax(0, 1fr);
    max-width: 760px;
  }

  .p2p-payment-screen {
    min-height: 680px;
  }
}

/* ── Responsive Breakpoints ───────────────────────────────── */
@media (min-width: 768px) {
  .main-content {
    margin-left: var(--sidebar-w);
    padding: 32px 36px;
    padding-bottom: 32px;
  }
  .sidebar   { display: flex; }
  .bottom-nav { display: none; }
  .topbar    { display: none; }
  .stats-grid { grid-template-columns: repeat(4, 1fr); }
  .page-title { font-size: 32px; }
  .commerce-split { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .p2p-app-shell {
    width: 100%;
    max-width: 1180px;
    display: grid;
    grid-template-columns: 108px minmax(0, 1fr);
    grid-template-areas: "nav main";
    align-items: stretch;
    margin: 0 0 28px;
    border-color: var(--border);
    border-radius: var(--radius-lg);
    background: var(--bg-card);
    overflow: hidden;
  }
  .p2p-app-view {
    grid-area: main;
    min-height: 650px;
    background: #030504;
  }
  .p2p-app-view.active {
    display: block;
  }
  .p2p-app-nav {
    grid-area: nav;
    position: sticky;
    top: 32px;
    align-self: start;
    flex-direction: column;
    justify-content: flex-start;
    gap: 12px;
    min-height: 650px;
    height: auto;
    padding: 22px 14px;
    border: 0;
    border-right: 1px solid rgba(255,255,255,0.08);
    border-radius: 0;
    background: #070807;
    box-shadow: none;
  }
  .p2p-app-nav button {
    width: 100%;
    min-height: 78px;
    border-radius: 18px;
    color: #777d88;
  }
  .p2p-app-nav button.active {
    background: rgba(22,199,132,0.12);
    color: #f8fafc;
  }
  .p2p-app-shell .p2p-exchange-shell,
  .p2p-app-shell .orders-screen {
    min-height: 650px;
    background: #030504;
  }
  .p2p-exchange-top {
    padding: 26px 28px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
  }
  .p2p-home-btn {
    width: auto;
    min-width: 112px;
    padding: 0 14px;
    gap: 8px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
  }
  .p2p-home-btn span {
    display: inline;
  }
  .p2p-market-notice {
    margin: 18px 28px 12px;
  }
  .p2p-market-tabs {
    margin-left: 28px;
  }
  .p2p-filter-bar {
    padding-left: 28px;
    padding-right: 28px;
  }
  .p2p-exchange-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    padding: 18px 28px 28px;
  }
  .p2p-ad-card {
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    background: #070807;
  }
  .orders-screen-embedded .orders-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }
  .orders-screen-embedded .orders-card {
    padding: 18px;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    background: #070807;
  }
  .orders-screen-embedded .orders-card-foot {
    align-items: flex-start;
    flex-direction: column;
  }
  .orders-screen-embedded .orders-chat-pill {
    max-width: 100%;
  }
  .p2p-ads-view.active {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.95fr);
    gap: 18px;
    padding: 0 22px 24px;
  }
  .p2p-ads-view .p2p-app-header {
    grid-column: 1 / -1;
    margin-left: -22px;
    margin-right: -22px;
  }
  .p2p-ads-view .p2p-create-drawer,
  .p2p-ads-view .p2p-app-card {
    align-self: start;
  }
  .p2p-profile-view.active {
    display: grid;
    grid-template-columns: minmax(300px, 0.75fr) minmax(0, 1.25fr);
    grid-template-areas:
      "header header"
      "identity stats"
      "actions stats";
    gap: 18px;
    padding: 0 22px 24px;
  }
  .p2p-profile-view .p2p-app-header {
    grid-area: header;
    margin-left: -22px;
    margin-right: -22px;
  }
  .p2p-profile-card {
    grid-area: identity;
    margin: 0;
    min-height: 150px;
  }
  .p2p-profile-stats {
    grid-area: stats;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 0;
  }
  .p2p-profile-actions {
    grid-area: actions;
  }
}

@media (min-width: 980px) {
  .p2p-market-topline {
    grid-template-columns: auto minmax(0, 1fr) auto;
    padding: 20px 24px 12px;
  }

  .p2p-market-brand strong {
    font-size: 24px;
  }

  .p2p-tabs-row,
  .p2p-asset-row,
  .p2p-filters-row {
    padding-left: 24px;
    padding-right: 24px;
  }

  .p2p-mobile-offers {
    display: none;
  }

  .p2p-desktop-wrap {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 18px;
    padding: 18px 24px 28px;
  }
}

@media (min-width: 1240px) {
  .p2p-desktop-wrap {
    grid-template-columns: minmax(0, 1fr) 350px;
    gap: 22px;
  }
}

@media (max-width: 767px) {
  .app-layout { display: block; }
  .sidebar    { display: none; }
  .bottom-nav { display: block; }
  .topbar     { display: flex; }
  .main-content {
    --main-inline-start: max(16px, env(safe-area-inset-left, 0px));
    --main-inline-end: max(16px, env(safe-area-inset-right, 0px));
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    padding-top: calc(var(--topbar-h) + env(safe-area-inset-top, 0px) + 18px);
    padding-left: var(--main-inline-start);
    padding-right: var(--main-inline-end);
    padding-bottom: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom, 0px) + 20px);
  }
  .dashboard-balance-strip {
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    padding-bottom: 4px;
    margin-left: calc(0px - var(--main-inline-start));
    margin-right: calc(0px - var(--main-inline-end));
    padding-left: var(--main-inline-start);
    padding-right: var(--main-inline-end);
    max-width: none;
    scrollbar-width: none;
  }
  .dashboard-balance-strip::-webkit-scrollbar {
    display: none;
  }
  .dashboard-balance-card {
    flex: 0 0 min(86vw, 360px);
    min-width: 0;
  }
  .balance-amount { font-size: 28px; }
  .crypto-grid { grid-template-columns: repeat(4, 1fr); }
  .pool-header,
  .payout-preview,
  .tx-item {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .card { padding: 18px; border-radius: var(--radius-md); }
  .p2p-board {
    grid-template-columns: minmax(0, 1fr);
  }
  .p2p-exchange-shell {
    margin-left: -16px;
    margin-right: -16px;
    border-left: 0;
    border-right: 0;
    border-radius: 0;
  }
  .p2p-app-shell .p2p-exchange-shell {
    margin-left: 0;
    margin-right: 0;
  }
  .p2p-exchange-top,
  .p2p-market-notice,
  .p2p-market-tabs,
  .p2p-filter-bar,
  .p2p-ad-card {
    padding-left: max(16px, env(safe-area-inset-left, 0px));
    padding-right: max(16px, env(safe-area-inset-right, 0px));
  }
  .p2p-market-notice {
    margin-left: max(16px, env(safe-area-inset-left, 0px));
    margin-right: max(16px, env(safe-area-inset-right, 0px));
    padding-left: 0;
    padding-right: 0;
    white-space: normal;
    line-height: 1.4;
  }
  .p2p-exchange-title {
    align-items: flex-start;
    flex-direction: column;
    gap: 1px;
  }
  .p2p-exchange-title strong {
    font-size: 21px;
    line-height: 1.1;
  }
  .p2p-exchange-title span {
    font-size: 12px;
    line-height: 1.25;
  }
  .p2p-currency-pill select {
    max-width: 120px;
  }
  .p2p-market-tabs {
    margin-left: max(16px, env(safe-area-inset-left, 0px));
    margin-right: 0;
    padding: 4px;
  }
  .p2p-filter-bar {
    gap: 12px;
  }
  .p2p-ad-head {
    align-items: flex-start;
  }
  .p2p-ad-foot {
    align-items: flex-end;
    flex-wrap: wrap;
  }
  .p2p-action-btn {
    width: 96px;
    flex-shrink: 0;
  }
  .p2p-board-head {
    display: none;
  }
  .p2p-offer-row {
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
  }
  .p2p-offer-row .btn {
    width: 100%;
  }
  .p2p-manage-stats,
  .commerce-modal-facts {
    grid-template-columns: minmax(0, 1fr);
  }
  .p2p-filter {
    width: 100%;
  }
  body.commerce-orders-mode {
    background: #000;
  }
  body.commerce-p2p-app-mode {
    background: #000;
  }
  body.commerce-orders-mode::before {
    display: none;
  }
  body.commerce-p2p-app-mode::before {
    display: none;
  }
  body.commerce-orders-mode .topbar,
  body.commerce-orders-mode .bottom-nav,
  body.commerce-orders-mode .page-header,
  body.commerce-orders-mode .system-balance-panel,
  body.commerce-orders-mode .commerce-tabs,
  body.commerce-orders-mode #commerce-status {
    display: none !important;
  }
  body.commerce-p2p-app-mode .topbar,
  body.commerce-p2p-app-mode .bottom-nav,
  body.commerce-p2p-app-mode .page-header,
  body.commerce-p2p-app-mode .system-balance-panel,
  body.commerce-p2p-app-mode .commerce-tabs,
  body.commerce-p2p-app-mode #commerce-status {
    display: none !important;
  }
  body.commerce-orders-mode .main-content {
    min-height: 100vh;
    min-height: 100dvh;
    padding: 0 0 calc(90px + env(safe-area-inset-bottom, 0px));
    background: #000;
  }
  body.commerce-p2p-app-mode .main-content {
    min-height: 100vh;
    min-height: 100dvh;
    padding: 0;
    background: #000;
  }
  body.commerce-orders-mode .orders-screen {
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
  body.commerce-p2p-app-mode .p2p-app-shell {
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0;
    padding-bottom: calc(86px + env(safe-area-inset-bottom, 0px));
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
  body.commerce-p2p-app-mode .p2p-app-view {
    min-height: calc(100vh - 86px - env(safe-area-inset-bottom, 0px));
    min-height: calc(100dvh - 86px - env(safe-area-inset-bottom, 0px));
  }
  body.commerce-p2p-app-mode .p2p-app-nav {
    position: fixed;
    height: calc(86px + env(safe-area-inset-bottom, 0px));
    padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  }
  body.commerce-p2p-app-mode .p2p-exchange-top,
  body.commerce-p2p-app-mode .orders-topbar,
  body.commerce-p2p-app-mode .p2p-app-header {
    padding-top: calc(env(safe-area-inset-top, 0px) + 12px);
  }
  body.commerce-p2p-app-mode .p2p-market-header {
    padding-top: env(safe-area-inset-top, 0px);
  }
  body.p2p-payment-mode {
    background: #000;
  }
  body.p2p-payment-mode::before,
  body.p2p-payment-mode .topbar,
  body.p2p-payment-mode .bottom-nav,
  body.p2p-payment-mode .page-header {
    display: none !important;
  }
  body.p2p-payment-mode .main-content {
    min-height: 100vh;
    min-height: 100dvh;
    padding: 0;
    background: #000;
  }
  body.p2p-payment-mode [data-show-if-disconnected] {
    padding: calc(env(safe-area-inset-top, 0px) + 24px) 16px 24px;
  }
  body.p2p-payment-mode #trade-status {
    position: fixed;
    left: 14px;
    right: 14px;
    top: calc(env(safe-area-inset-top, 0px) + 10px);
    z-index: 320;
    min-height: 0;
    pointer-events: none;
    text-align: center;
  }
  .p2p-order-modal-overlay {
    align-items: stretch;
    justify-content: stretch;
    padding: 0;
  }
  .p2p-order-sheet {
    width: 100%;
    max-width: none;
    height: 100vh;
    height: 100dvh;
    max-height: none;
    border: 0;
    border-radius: 0;
  }
  .p2p-order-topbar {
    padding-top: calc(env(safe-area-inset-top, 0px) + 12px);
  }
  .p2p-order-form {
    padding-bottom: calc(126px + env(safe-area-inset-bottom, 0px));
  }
  .p2p-order-price-row {
    font-size: 15px;
  }
  .p2p-order-price-row em {
    max-width: 48vw;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .p2p-order-input-row input {
    font-size: clamp(36px, 12vw, 46px);
  }
  .p2p-order-bottom {
    position: fixed;
    margin: 0;
    z-index: 330;
    padding-bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  }
  .p2p-payment-layout {
    display: block;
    max-width: none;
  }
  .p2p-payment-screen {
    min-height: 100vh;
    min-height: 100dvh;
    padding-bottom: calc(118px + env(safe-area-inset-bottom, 0px));
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
  .p2p-payment-topbar {
    padding-top: calc(env(safe-area-inset-top, 0px) + 12px);
  }
  .p2p-payment-bottom {
    position: fixed;
    z-index: 300;
    padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  }
  .p2p-payment-chat {
    min-height: 420px;
    padding: 22px 22px calc(132px + env(safe-area-inset-bottom, 0px));
    border: 0;
    border-top: 1px solid rgba(255,255,255,0.09);
    border-radius: 0;
    box-shadow: none;
  }
  .p2p-payment-detail-list {
    gap: 15px;
  }
  .p2p-payment-detail-list div {
    grid-template-columns: minmax(98px, 0.72fr) minmax(0, 1fr);
  }
  .p2p-payment-detail-list dt,
  .p2p-payment-detail-list strong {
    font-size: 17px;
  }
  body.commerce-orders-mode .orders-topbar {
    padding-top: calc(env(safe-area-inset-top, 0px) + 12px);
  }
  body.commerce-orders-mode .orders-list {
    padding-bottom: calc(112px + env(safe-area-inset-bottom, 0px));
  }
  body.commerce-orders-mode .orders-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 260;
    display: flex;
    align-items: center;
    justify-content: space-around;
    height: calc(86px + env(safe-area-inset-bottom, 0px));
    padding: 10px 18px calc(10px + env(safe-area-inset-bottom, 0px));
    border: 1px solid rgba(255,255,255,0.12);
    border-bottom: 0;
    border-radius: 30px 30px 0 0;
    background: rgba(5,5,6,0.98);
    box-shadow: 0 -12px 30px rgba(0,0,0,0.55);
  }
  .orders-bottom-nav button {
    appearance: none;
    display: inline-flex;
    min-width: 58px;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    border: 0;
    background: transparent;
    color: #5f6570;
    font: inherit;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
  }
  .orders-bottom-nav button.active {
    color: #f8fafc;
  }
  .orders-bottom-nav svg {
    width: 26px;
    height: 26px;
  }
  .admin-main { width: 100%; min-width: 0; }
  .admin-table { min-width: 640px; }
  .card:has(.admin-table) { overflow-x: auto; }
  body:has(.admin-main) { display: block !important; }
}

@media (max-width: 480px) {
  .main-content {
    --main-inline-start: max(14px, env(safe-area-inset-left, 0px));
    --main-inline-end: max(14px, env(safe-area-inset-right, 0px));
    padding-top: calc(var(--topbar-h) + env(safe-area-inset-top, 0px) + 16px);
    padding-left: var(--main-inline-start);
    padding-right: var(--main-inline-end);
    padding-bottom: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom, 0px) + 18px);
  }
  body.commerce-orders-mode .main-content {
    padding: 0 0 calc(90px + env(safe-area-inset-bottom, 0px));
  }
  body.commerce-p2p-app-mode .main-content {
    padding: 0;
  }
  .orders-topbar {
    grid-template-columns: 42px minmax(0, 1fr) 84px;
    padding-left: 14px;
    padding-right: 14px;
  }
  .orders-topbar strong {
    font-size: 24px;
  }
  .orders-stage-tabs {
    gap: 25px;
    padding-left: 22px;
    padding-right: 22px;
  }
  .orders-status-tabs {
    gap: 18px;
    padding-left: 22px;
    padding-right: 22px;
  }
  .orders-list {
    padding-left: 22px;
    padding-right: 22px;
  }
  .orders-detail-grid {
    grid-template-columns: 88px minmax(0, 1fr);
  }
  .orders-detail-grid span {
    font-size: 16px;
  }
  .orders-detail-grid strong {
    font-size: 16px;
  }
  .orders-detail-grid span:first-child + strong {
    font-size: 21px;
  }
  .orders-card-foot {
    align-items: flex-start;
  }
  .orders-chat-pill {
    max-width: 42%;
  }
  .orders-card-foot time {
    font-size: 15px;
    text-align: right;
  }
  .p2p-payment-head h2 {
    font-size: 28px;
  }
  .p2p-payment-head p {
    font-size: 15px;
  }
  .p2p-payment-counterparty {
    margin-left: 22px;
    margin-right: 22px;
    padding: 14px 18px;
  }
  .p2p-payment-counterparty button {
    min-height: 44px;
    padding: 0 18px;
    font-size: 15px;
  }
  .p2p-payment-bottom {
    grid-template-columns: minmax(0, 0.9fr) minmax(150px, 1fr);
  }
  .p2p-ad-foot {
    align-items: stretch;
    flex-direction: column;
  }
  .p2p-action-btn {
    width: 100%;
  }
  .p2p-market-topline {
    grid-template-columns: 38px minmax(0, 1fr);
  }
  .p2p-market-actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
  }
  .p2p-header-quick {
    flex: 1;
  }
  .p2p-filters-row {
    align-items: stretch;
    flex-wrap: wrap;
    overflow-x: visible;
  }
  .p2p-filter-select {
    flex: 1 1 calc(50% - 4px);
    min-width: 0;
  }
  .p2p-search-wrap {
    flex: 1 1 100%;
    min-width: 0;
  }
  .p2p-filter-btn {
    flex: 1 1 100%;
  }
  .p2p-merchant-top,
  .p2p-merchant-mid,
  .p2p-merchant-foot {
    align-items: stretch;
    flex-direction: column;
  }
  .p2p-merchant-limits {
    text-align: left;
  }
  .p2p-trade-btn {
    width: 100%;
  }
  .p2p-payment-primary,
  .p2p-order-bottom button {
    padding: 0 18px;
    font-size: 17px;
  }
  .p2p-payment-bottom strong,
  .p2p-order-bottom strong {
    font-size: 24px;
  }
  .p2p-order-warning {
    font-size: 15px;
  }
  .crypto-grid  { grid-template-columns: repeat(3, 1fr); }
  .stats-grid   { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stake-summary-grid {
    gap: 8px;
  }
  .stake-summary-grid .stat-card {
    padding: 12px 10px;
  }
  .stake-summary-grid .stat-icon {
    width: 32px;
    height: 32px;
    margin-bottom: 9px;
  }
  .direction-btns,
  .grid-2,
  [style*="grid-template-columns:1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }
  .bet-control-balances,
  .payment-method-selector {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .bet-balance-tile {
    min-height: 68px;
    padding: 9px 10px;
  }
  .bet-balance-tile strong {
    font-size: 12px;
  }
  .payment-method-option {
    padding: 9px 8px;
  }
  .payment-method-option span {
    font-size: 12px;
  }
  .payment-method-option small {
    font-size: 9px;
  }
  .system-balance-main {
    align-items: flex-start;
    flex-direction: column;
  }
  .system-balance-actions {
    justify-content: flex-start;
    width: 100%;
  }
  .system-balance-actions .btn {
    flex: 1;
  }
  .btn {
    max-width: 100%;
    white-space: normal;
    padding-left: 16px;
    padding-right: 16px;
  }
  .bottom-nav { height: 74px; }
  .topbar-logo { font-size: 17px; }
  .topbar-logo img { width: 30px; height: 30px; }
  .topbar .wallet-pill { max-width: min(118px, 34vw); }
  .bottom-nav-item {
    flex: 1;
    min-width: 0;
    padding: 8px 4px;
  }
  .bottom-nav-item span {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .modal { padding: 28px 18px; }
  .toast-container {
    left: 12px;
    right: 12px;
    top: 12px;
  }
  .toast { max-width: none; }
  .wallet-options-grid { grid-template-columns: 1fr; }
  .wallet-option {
    min-height: 72px;
    padding: 14px;
  }
}

/* ── Utility ──────────────────────────────────────────────── */
.text-accent  { color: var(--accent); }
.text-green   { color: var(--accent-green); }
.text-red     { color: var(--accent-red); }
.text-gold    { color: var(--accent-gold); }
.text-muted   { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }

.font-display { font-family: 'Inter', sans-serif; }
.fw-bold { font-weight: 700; }
.fw-800  { font-weight: 800; }

.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }

.mb-8  { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }

.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }

.w-full { width: 100%; }
.text-center { text-align: center; }
.text-right { text-align: right; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* ── Fade-in animation ────────────────────────────────────── */
.fade-in {
  animation: fade-in 0.4s ease both;
}

@keyframes fade-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.fade-in-delay-1 { animation-delay: 0.1s; }
.fade-in-delay-2 { animation-delay: 0.2s; }
.fade-in-delay-3 { animation-delay: 0.3s; }

/* ── Admin Overrides ──────────────────────────────────────── */
.admin-sidebar { width: 220px; }

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.admin-table th {
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}

.admin-table td {
  padding: 14px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  vertical-align: middle;
}

.admin-table tr:hover td { background: rgba(255,255,255,0.02); }

/* Trade bridge pages */
.trade-page {
  display: grid;
  gap: 18px;
  max-width: 1180px;
  margin: 0 auto;
}

.trade-page * {
  min-width: 0;
}

.trade-tabbar {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(17, 24, 39, 0.72);
  box-shadow: var(--shadow-card);
}

.trade-tabbar a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 10px;
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 800;
  text-align: center;
  transition: background var(--t-fast), color var(--t-fast), box-shadow var(--t-fast);
}

.trade-tabbar a.active,
.trade-tabbar a:hover {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.22), rgba(16, 185, 129, 0.16));
  color: var(--text-primary);
  box-shadow: inset 0 0 0 1px rgba(6, 182, 212, 0.28);
}

.trade-hero,
.trade-card,
.trade-dashboard-grid > article {
  border: 1px solid var(--border);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(6, 182, 212, 0.09), rgba(16, 185, 129, 0.045)),
    var(--bg-card);
  box-shadow: var(--shadow-card);
}

.trade-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 320px);
  align-items: stretch;
  gap: 16px;
  padding: 22px;
}

.trade-hero-compact {
  grid-template-columns: minmax(0, 1fr) minmax(220px, 300px);
}

.trade-hero h1 {
  margin: 8px 0 8px;
  font-family: var(--font-display);
  font-size: 32px;
  line-height: 1.06;
  font-weight: 800;
  letter-spacing: 0;
}

.trade-hero p,
.trade-page .muted {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.55;
}

.trade-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  width: max-content;
  max-width: 100%;
  padding: 0 9px;
  border: 1px solid rgba(6, 182, 212, 0.22);
  border-radius: 999px;
  background: rgba(6, 182, 212, 0.09);
  color: var(--accent);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.trade-hero-panel,
.trade-side-panel,
.trade-two-col,
.trade-card,
.swap-form,
.swap-settings,
.swap-panel,
.swap-summary,
.trade-list,
.trade-tier-list {
  display: grid;
  gap: 12px;
}

.trade-hero-panel > div,
.trade-metric-grid > div,
.trade-info-strip > div,
.swap-metrics > article,
.swap-summary > div,
.trade-claim-panel,
.trade-claim-box {
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 8px;
  background: rgba(8, 11, 24, 0.55);
}

.trade-hero-panel span,
.trade-metric-grid span,
.trade-info-strip span,
.swap-metrics span,
.swap-summary span,
.trade-dashboard-grid span,
.trade-claim-panel span,
.trade-claim-box span {
  display: block;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.trade-hero-panel strong,
.trade-metric-grid strong,
.trade-info-strip strong,
.swap-metrics strong,
.swap-summary strong,
.trade-dashboard-grid strong,
.trade-claim-panel strong,
.trade-claim-box strong {
  display: block;
  margin-top: 6px;
  color: var(--text-primary);
  font-size: 18px;
  line-height: 1.12;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.trade-swap-layout {
  display: grid;
  grid-template-columns: minmax(320px, 480px) minmax(0, 1fr);
  align-items: start;
  gap: 18px;
}

.trade-two-col {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.trade-card {
  padding: 18px;
}

.swap-card {
  padding: 0;
  overflow: hidden;
}

.swap-card-head,
.trade-section-head,
.referral-gate-head,
.swap-panel-top,
.swap-panel-actions,
.swap-panel-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.swap-card-head {
  padding: 18px;
  border-bottom: 1px solid var(--border);
}

.swap-card-head h2,
.trade-section-head h2 {
  margin-top: 6px;
  font-family: var(--font-display);
  font-size: 19px;
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: 0;
}

.swap-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 14px 18px 0;
}

.swap-tab {
  min-height: 42px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(8, 11, 24, 0.45);
  color: var(--text-secondary);
  font-weight: 800;
  cursor: pointer;
}

.swap-tab.is-active,
.swap-tab:hover {
  border-color: rgba(6, 182, 212, 0.42);
  background: rgba(6, 182, 212, 0.13);
  color: var(--accent);
}

.swap-tab[data-trade-tab="sell"].is-active {
  border-color: rgba(239, 68, 68, 0.42);
  background: rgba(239, 68, 68, 0.1);
  color: #f87171;
}

.referral-gate {
  display: grid;
  gap: 10px;
  margin: 14px 18px 0;
  padding: 14px;
  border: 1px solid rgba(245, 158, 11, 0.28);
  border-radius: 8px;
  background: rgba(245, 158, 11, 0.07);
}

.referral-gate.is-active {
  border-color: rgba(16, 185, 129, 0.36);
  background: rgba(16, 185, 129, 0.08);
}

.referral-gate.is-error {
  border-color: rgba(239, 68, 68, 0.44);
  background: rgba(239, 68, 68, 0.09);
}

.referral-gate-head strong {
  display: block;
  margin-top: 4px;
  font-weight: 800;
}

.referral-code-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.swap-form {
  gap: 8px;
  padding: 14px 18px 18px;
}

.swap-settings,
.swap-panel,
.swap-summary {
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 8px;
  background: rgba(8, 11, 24, 0.52);
}

.setting-field {
  display: grid;
  gap: 8px;
}

.setting-field span,
.swap-label,
.swap-balance {
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 700;
}

.swap-balance strong {
  color: var(--accent);
}

.quick-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pill-chip {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(8, 11, 24, 0.62);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.pill-chip.is-active,
.pill-chip:hover {
  border-color: rgba(6, 182, 212, 0.42);
  background: rgba(6, 182, 212, 0.12);
  color: var(--accent);
}

.swap-panel-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.swap-panel-body input {
  width: 100%;
  min-height: 56px;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text-primary);
  font-size: 34px;
  line-height: 1;
  font-weight: 800;
}

.swap-panel-body input::placeholder {
  color: rgba(148, 163, 184, 0.42);
}

.asset-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  max-width: 132px;
  padding: 6px 11px 6px 7px;
  border: 1px solid rgba(6, 182, 212, 0.3);
  border-radius: 999px;
  background: rgba(6, 182, 212, 0.1);
  font-weight: 900;
}

.asset-pill.secondary {
  border-color: rgba(16, 185, 129, 0.28);
  background: rgba(16, 185, 129, 0.1);
}

.asset-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 900;
}

.asset-icon.bnb {
  background: linear-gradient(135deg, #f3ba2f, #f59e0b);
  color: #080b18;
}

.asset-icon.token {
  background: linear-gradient(135deg, var(--accent), var(--accent-green));
  color: #fff;
}

.asset-symbol {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.swap-link-button {
  border: 0;
  background: transparent;
  color: var(--accent);
  font-weight: 900;
  cursor: pointer;
}

.swap-direction-button {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin: -17px auto;
  border: 1px solid rgba(6, 182, 212, 0.36);
  border-radius: 8px;
  background: var(--bg-secondary);
  color: var(--accent);
  font-size: 20px;
  cursor: pointer;
}

.swap-metrics,
.trade-metric-grid,
.trade-info-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.swap-metrics strong {
  font-size: 14px;
}

.swap-summary {
  gap: 8px;
}

.swap-summary > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.swap-summary strong {
  max-width: 58%;
  color: var(--text-secondary);
  font-size: 13px;
  text-align: right;
}

.swap-submit {
  min-height: 52px;
}

.trade-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.trade-dashboard-grid > article {
  padding: 16px;
}

.trade-dashboard-grid small {
  display: block;
  margin-top: 8px;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.35;
}

.trade-ref-link {
  padding: 14px;
  border: 1px dashed rgba(6, 182, 212, 0.32);
  border-radius: 8px;
  background: rgba(6, 182, 212, 0.075);
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.trade-claim-panel strong,
.trade-claim-box strong {
  color: var(--accent-gold);
  font-size: 30px;
}

.trade-tier-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.trade-tier-list li,
.trade-page .list-item,
.trade-page .empty-state {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 8px;
  background: rgba(8, 11, 24, 0.45);
}

.trade-tier-list strong,
.trade-page .list-item strong {
  color: var(--text-primary);
  font-weight: 800;
}

.trade-tier-list span {
  color: var(--accent-gold);
  font-weight: 900;
}

.trade-page .empty-state {
  justify-content: center;
  color: var(--text-secondary);
  text-align: center;
}

.trade-page canvas {
  display: block;
  width: 100%;
  min-height: 220px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 8px;
  background: rgba(8, 11, 24, 0.55);
}

#toast.trade-toast {
  position: fixed;
  right: 18px;
  bottom: calc(var(--bottom-nav-h) + 18px);
  z-index: 1200;
  width: max-content;
  max-width: min(92vw, 420px);
  padding: 13px 16px;
  border: 1px solid rgba(6, 182, 212, 0.32);
  border-radius: 8px;
  background: rgba(13, 18, 37, 0.96);
  color: var(--text-primary);
  box-shadow: var(--shadow-card);
  transform: translateX(calc(100% + 32px));
  transition: transform var(--t-normal);
}

#toast.trade-toast.show {
  transform: translateX(0);
}

.wallet-launcher {
  position: fixed;
  inset: 0;
  z-index: 1250;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(0, 0, 0, 0.76);
  backdrop-filter: blur(10px);
}

.wallet-launcher[hidden] {
  display: none;
}

.wallet-launcher-panel {
  display: grid;
  gap: 14px;
  width: min(100%, 440px);
  max-height: min(86vh, 720px);
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-card);
  box-shadow: 0 20px 64px rgba(0, 0, 0, 0.68);
}

.wallet-launcher-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.wallet-launcher-head h2 {
  margin-top: 8px;
  font-family: var(--font-display);
  font-size: 20px;
  line-height: 1.15;
  font-weight: 800;
}

.wallet-launcher .eyebrow {
  display: inline-flex;
  min-height: 24px;
  padding: 0 9px;
  border: 1px solid rgba(6, 182, 212, 0.22);
  border-radius: 999px;
  background: rgba(6, 182, 212, 0.09);
  color: var(--accent);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.wallet-launcher-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  max-height: min(54vh, 420px);
  overflow-y: auto;
}

.wallet-launcher-button,
.wallet-launcher-close {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(8, 11, 24, 0.58);
  color: var(--text-secondary);
  font-weight: 800;
  cursor: pointer;
}

.wallet-launcher-button {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px;
  text-align: left;
}

.wallet-launcher-button:hover,
.wallet-launcher-button.is-detected,
.wallet-launcher-button.is-connected {
  border-color: rgba(16, 185, 129, 0.36);
  background: rgba(16, 185, 129, 0.1);
  color: var(--accent-green);
}

.wallet-launcher-close {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
}

@media (max-width: 1080px) {
  .trade-swap-layout {
    grid-template-columns: minmax(320px, 480px) minmax(280px, 1fr);
  }

  .trade-dashboard-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .trade-hero,
  .trade-hero-compact,
  .trade-swap-layout,
  .trade-two-col {
    grid-template-columns: 1fr;
  }

  .trade-swap-layout {
    align-items: stretch;
  }
}

@media (max-width: 560px) {
  .trade-page {
    gap: 12px;
  }

  .trade-tabbar {
    gap: 5px;
    padding: 5px;
  }

  .trade-tabbar a {
    min-height: 38px;
    padding: 0 5px;
    font-size: 11px;
  }

  .trade-hero,
  .trade-card {
    padding: 14px;
  }

  .swap-card {
    padding: 0;
  }

  .swap-card-head,
  .swap-tabs,
  .swap-form {
    padding-left: 12px;
    padding-right: 12px;
  }

  .referral-gate {
    margin-left: 12px;
    margin-right: 12px;
  }

  .trade-hero h1 {
    font-size: 25px;
  }

  .trade-hero-compact p {
    display: none;
  }

  .trade-hero-compact .trade-hero-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .trade-hero-compact .trade-hero-panel .btn {
    grid-column: 1 / -1;
  }

  .trade-hero-panel,
  .trade-dashboard-grid,
  .trade-metric-grid,
  .trade-info-strip,
  .swap-metrics {
    grid-template-columns: 1fr;
  }

  .trade-hero-compact .trade-hero-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .swap-panel-body {
    grid-template-columns: 1fr;
  }

  .swap-panel-body input {
    min-height: 46px;
    font-size: 28px;
  }

  .asset-pill {
    justify-content: center;
    width: 100%;
    max-width: none;
  }

  .swap-panel-actions,
  .swap-panel-foot,
  .swap-summary > div,
  .referral-code-row {
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .swap-summary strong {
    max-width: none;
    text-align: left;
  }

  .wallet-launcher-actions {
    grid-template-columns: 1fr;
  }

  #toast.trade-toast {
    left: 12px;
    right: 12px;
    width: auto;
    max-width: none;
  }
}

@media (max-width: 767px) {
  .trade-page {
    gap: 10px;
    width: 100%;
    max-width: 100%;
  }

  .trade-page .trade-tabbar,
  .trade-page > .trade-hero,
  .trade-swap-page .trade-side-panel,
  .trade-dashboard-history,
  .trade-referral-list-card,
  .trade-claim-history-card {
    display: none;
  }

  .trade-swap-layout,
  .trade-two-col,
  .trade-dashboard-actions,
  .trade-referral-main,
  .trade-claim-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  .trade-card,
  .swap-card,
  .referral-gate,
  .swap-panel,
  .swap-settings,
  .swap-summary,
  .trade-dashboard-grid > article,
  .trade-claim-panel,
  .trade-claim-box,
  .trade-info-strip > div {
    border-radius: 18px;
    border-color: rgba(255,255,255,0.08);
    background: rgba(17,24,39,0.92);
    box-shadow: var(--shadow-card);
  }

  .trade-card {
    padding: 12px;
  }

  .trade-section-head {
    margin-bottom: 10px;
  }

  .trade-section-head h2,
  .swap-card-head h2 {
    font-size: 16px;
  }

  .trade-kicker,
  .trade-dashboard-grid span,
  .trade-info-strip span,
  .trade-claim-panel span,
  .trade-claim-box span {
    font-size: 9px;
  }

  .trade-dashboard-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .trade-dashboard-grid > article {
    min-height: 76px;
    padding: 11px;
  }

  .trade-dashboard-grid > article:nth-child(n+5) {
    display: none;
  }

  .trade-dashboard-grid strong,
  .trade-info-strip strong {
    font-size: 14px;
  }

  .trade-dashboard-grid small,
  .trade-dashboard-page .trade-card .muted,
  .trade-claim-page .trade-claim-main .muted,
  .trade-tier-list,
  .trade-claim-main article:not(.trade-claim-spotlight),
  .trade-referral-main article:nth-child(n+2) {
    display: none;
  }

  .trade-ref-link {
    padding: 12px;
    border-radius: 14px;
    font-size: 12px;
  }

  .trade-info-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .trade-claim-panel,
  .trade-claim-box {
    padding: 14px;
  }

  .trade-claim-panel strong,
  .trade-claim-box strong {
    font-size: 28px;
  }

  .trade-claim-spotlight .btn {
    min-height: 48px;
    border-radius: 14px;
  }

  .trade-swap-page .swap-card {
    padding: 0;
    overflow: hidden;
  }

  .trade-swap-page .swap-card-head {
    display: none;
  }

  .trade-swap-page .swap-tabs {
    padding: 12px 12px 0;
  }

  .trade-swap-page .swap-tab {
    min-height: 40px;
    border-radius: 14px;
    font-size: 13px;
  }

  .trade-swap-page .referral-gate {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    margin: 8px 12px 0;
    padding: 8px;
    min-height: 46px;
    border-radius: 14px;
    background:
      linear-gradient(135deg, rgba(245,158,11,0.1), rgba(6,182,212,0.08)),
      rgba(8,11,24,0.5);
  }

  .trade-swap-page .referral-gate-head {
    display: contents;
  }

  .trade-swap-page .referral-gate-head > div,
  .trade-swap-page .referral-gate .muted {
    display: none;
  }

  .trade-swap-page .referral-gate .badge {
    min-height: 30px;
    padding: 0 9px;
    border-radius: 999px;
    font-size: 9px;
    letter-spacing: 0;
    white-space: nowrap;
  }

  .trade-swap-page .referral-code-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px;
  }

  .trade-swap-page .referral-code-row .form-input {
    min-height: 34px;
    padding: 7px 10px;
    border-radius: 11px;
    font-size: 12px;
  }

  .trade-swap-page .referral-code-row .btn {
    min-width: 60px;
    min-height: 34px;
    padding: 0 10px;
    border-radius: 11px;
    font-size: 11px;
    white-space: nowrap;
  }

  .trade-swap-page .swap-form {
    gap: 8px;
    padding: 10px 12px 12px;
  }

  .trade-swap-page .swap-panel {
    padding: 12px;
  }

  .trade-swap-page .swap-settings {
    display: none !important;
  }

  .trade-swap-page .swap-panel-top {
    gap: 8px;
  }

  .trade-swap-page .swap-label,
  .trade-swap-page .swap-balance {
    font-size: 11px;
  }

  .trade-swap-page .swap-panel-body {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
  }

  .trade-swap-page .swap-panel-body input {
    min-height: 44px;
    font-size: 28px;
  }

  .trade-swap-page .asset-pill {
    width: auto;
    max-width: 116px;
    min-height: 36px;
    justify-content: flex-start;
    padding: 6px 9px 6px 6px;
  }

  .trade-swap-page .swap-panel-actions .quick-pills,
  .trade-swap-page .swap-metrics,
  .trade-swap-page .swap-summary {
    display: none;
  }

  .trade-swap-page .swap-panel-actions,
  .trade-swap-page .swap-panel-foot {
    display: flex;
    justify-content: flex-end;
  }

  .trade-swap-page .swap-direction-button {
    width: 34px;
    height: 34px;
    margin: -14px auto;
    border-radius: 12px;
  }

  .trade-swap-page .swap-submit {
    min-height: 48px;
    border-radius: 14px;
    font-size: 14px;
  }
}
