:root {
  --primary: #f5b400;
  --primary-dim: rgba(245, 180, 0, 0.15);
  --gold-gradient: linear-gradient(135deg, #ffe082 0%, #f5b400 45%, #c89400 100%);
  --radius: 22px;
  --radius-sm: 16px;
  --nav-h: 78px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

html.tyrex-dark {
  --bg: #0e0e0e;
  --bg-elevated: #161616;
  --card: rgba(255, 255, 255, 0.06);
  --card-border: rgba(255, 255, 255, 0.1);
  --glass: rgba(22, 22, 22, 0.72);
  --text: #ffffff;
  --muted: rgba(255, 255, 255, 0.55);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
  --shadow-gold: 0 8px 28px rgba(245, 180, 0, 0.22);
  --nav-bg: rgba(14, 14, 14, 0.88);
  --nav-border: rgba(255, 255, 255, 0.08);
  --dropdown-bg: #1c1c1c;
  --modal-bg: #1a1a1a;
  --avatar-inner: #1a1a1a;
  --surface-subtle: rgba(255, 255, 255, 0.04);
  --input-bg: rgba(255, 255, 255, 0.04);
  --divider: rgba(255, 255, 255, 0.06);
  --backdrop: rgba(0, 0, 0, 0.65);
  --link-box-bg: rgba(0, 0, 0, 0.3);
  --ambient-a: rgba(245, 180, 0, 0.12);
  --ambient-b: rgba(245, 180, 0, 0.08);
  --placeholder: rgba(255, 255, 255, 0.25);
  --theme-color: #0e0e0e;
}

html.tyrex-light {
  --bg: #f2f2f7;
  --bg-elevated: #ffffff;
  --card: rgba(255, 255, 255, 0.92);
  --card-border: rgba(0, 0, 0, 0.08);
  --glass: rgba(255, 255, 255, 0.78);
  --text: #1c1c1e;
  --muted: rgba(60, 60, 67, 0.6);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  --shadow-gold: 0 8px 24px rgba(245, 180, 0, 0.18);
  --nav-bg: rgba(255, 255, 255, 0.92);
  --nav-border: rgba(0, 0, 0, 0.06);
  --dropdown-bg: #ffffff;
  --modal-bg: #ffffff;
  --avatar-inner: #f2f2f7;
  --surface-subtle: rgba(0, 0, 0, 0.04);
  --input-bg: rgba(0, 0, 0, 0.03);
  --divider: rgba(0, 0, 0, 0.06);
  --backdrop: rgba(0, 0, 0, 0.35);
  --link-box-bg: rgba(245, 180, 0, 0.08);
  --ambient-a: rgba(245, 180, 0, 0.18);
  --ambient-b: rgba(245, 180, 0, 0.1);
  --placeholder: rgba(60, 60, 67, 0.35);
  --theme-color: #f2f2f7;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  min-height: 100%;
  color: var(--text);
  font-family: Inter, -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

html.tyrex-dark body {
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 280px 280px at calc(100% - 40px) -40px, var(--ambient-a), transparent 70%),
    radial-gradient(ellipse 220px 220px at -60px calc(100% - 140px), var(--ambient-b), transparent 70%);
}

html.tyrex-light body {
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 280px 280px at calc(100% - 40px) -40px, var(--ambient-a), transparent 70%),
    radial-gradient(ellipse 220px 220px at -60px calc(100% - 140px), var(--ambient-b), transparent 70%);
}

body {
  padding-bottom: calc(var(--nav-h) + var(--safe-b));
  overflow-x: hidden;
}

.hidden { display: none !important; }

/* Gold sand — single SVG layer, no transforms (Telegram WebView safe) */
.gold-dust {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: url('/assets/gold-dust.svg') center / cover no-repeat;
  opacity: var(--dust-opacity, 0.55);
}
html.tyrex-light { --dust-opacity: 0.38; }
html.tyrex-dark { --dust-opacity: 0.55; }

#app { position: relative; z-index: 1; min-height: 100vh; }

.loading {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 85vh; gap: 12px;
}
.logo-ring {
  width: 96px; height: 96px; border-radius: 50%;
  overflow: hidden; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-gold), 0 0 0 2px rgba(245,180,0,.25);
  background: #0a0a0a;
  padding: 5px;
  box-sizing: border-box;
}
.tyrex-logo-img {
  width: 100%; height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
  transform: scale(0.94);
}
.loading-title { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; }
.loading-sub { font-size: 13px; color: var(--muted); }

.tyrex-header { padding: 12px 20px 8px; }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.header-brand { display: flex; align-items: center; gap: 14px; flex: 1; min-width: 0; }
.header-logo {
  width: 48px; height: 48px; border-radius: 50%; flex-shrink: 0;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-gold), 0 0 0 1.5px rgba(245,180,0,.28);
  background: #0a0a0a;
  padding: 5px;
  box-sizing: border-box;
}
.header-logo .tyrex-logo-img { border-radius: 0; transform: scale(0.88); }
.header-title { font-size: 20px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.15; }
.header-sub { font-size: 12px; color: var(--muted); margin-top: 3px; font-weight: 500; }
.header-actions { display: flex; align-items: flex-start; gap: 8px; flex-shrink: 0; }
.header-user-stack {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.icon-btn-sm {
  width: 34px; height: 34px; border-radius: 11px; font-size: 15px;
}
.header-lang-dropdown { position: relative; }
.header-lang-toggle {
  display: flex; align-items: center; gap: 5px;
  height: 42px; padding: 0 11px;
  border-radius: 14px; border: 1px solid var(--card-border);
  background: var(--card); backdrop-filter: blur(12px);
  color: var(--text); font-size: 12px; font-weight: 800;
  cursor: pointer; letter-spacing: 0.02em;
}
.header-lang-toggle.open { border-color: rgba(245, 180, 0, 0.35); }
.header-lang-chev { font-size: 10px; color: var(--muted); transition: transform .15s; }
.header-lang-toggle.open .header-lang-chev { transform: rotate(180deg); }
.header-lang-menu {
  position: absolute; top: calc(100% + 6px); right: 0; z-index: 200;
  min-width: 148px; padding: 6px;
  background: var(--card); border: 1px solid var(--card-border);
  border-radius: 14px; box-shadow: var(--shadow), 0 12px 32px rgba(0,0,0,.28);
  backdrop-filter: blur(16px);
}
.header-lang-option {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 10px 10px; border: none; border-radius: 10px;
  background: transparent; color: var(--text);
  font-size: 13px; font-weight: 700; cursor: pointer; text-align: left;
}
.header-lang-option-name { flex: 1; font-weight: 600; font-size: 12px; color: var(--muted); }
.header-lang-option.active { background: rgba(245, 180, 0, 0.14); color: var(--primary); }
.header-lang-option.active .header-lang-option-name { color: var(--text); }
.lang-spacer { height: 44px; margin-bottom: 16px; }

.icon-btn {
  width: 42px; height: 42px; border-radius: 14px;
  border: 1px solid var(--card-border);
  background: var(--card);
  backdrop-filter: blur(12px);
  color: var(--text); font-size: 17px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.icon-btn:active { transform: scale(0.94); }
.icon-btn.profile-btn { font-size: 13px; font-weight: 800; color: var(--primary); }

.content { padding: 0 20px 24px; }

.glass-card {
  background: var(--glass);
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,.06);
  margin-bottom: 16px;
}
.glass-card.highlight {
  border-color: rgba(245, 180, 0, 0.25);
  box-shadow: var(--shadow), var(--shadow-gold), inset 0 1px 0 rgba(255,255,255,.08);
  position: relative;
  padding-top: 28px;
}
.calc-vip-badge {
  position: absolute;
  top: -11px;
  left: 14px;
  z-index: 3;
  max-width: calc(100% - 28px);
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.25;
  color: #1a1408;
  background: linear-gradient(135deg, #f5b400 0%, #e09a00 100%);
  border: 1px solid rgba(255, 220, 120, 0.55);
  box-shadow: 0 4px 14px rgba(245, 180, 0, 0.28);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.field { margin-bottom: 14px; }
.label {
  font-size: 11px; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 8px; display: block;
}
.label-row { display: inline-flex; align-items: center; gap: 6px; }

.select, .currency-select {
  width: 100%; padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--card-border);
  background: var(--input-bg);
  color: var(--text);
  font-size: 15px; font-weight: 600;
  text-align: left; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between;
}

.swap-wrap { display: flex; justify-content: center; margin: -4px 0 4px; position: relative; z-index: 2; }
.swap-btn {
  width: 44px; height: 44px; border-radius: 50%;
  border: 2px solid rgba(245,180,0,.45);
  background: var(--bg-elevated);
  color: var(--primary); font-size: 20px; cursor: pointer;
  box-shadow: var(--shadow-gold);
  transition: transform .25s;
}
.swap-btn:active { transform: rotate(180deg) scale(0.92); }

.input {
  width: 100%; padding: 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--card-border);
  background: var(--input-bg);
  color: var(--text);
  font-size: 22px; font-weight: 700;
}
.input::placeholder { color: var(--placeholder); font-weight: 500; font-size: 16px; }
.input.amount-invalid {
  border-color: #ff4d4f;
  box-shadow: 0 0 0 2px rgba(255, 77, 79, 0.24);
  color: #ff6b6b;
}
html.tyrex-light .input.amount-invalid { color: #e03131; border-color: #fa5252; }

.amount-row { display: flex; gap: 10px; align-items: stretch; }
.amount-under-currency { margin-top: -4px; margin-bottom: 8px; }
.amount-under-currency .amount-exchange-input { width: 100%; font-size: 1.15rem; font-weight: 600; padding: 14px 16px; }
.amount-input-wrap { position: relative; }

.amount-kb-bar {
  position: fixed;
  left: 0; right: 0;
  z-index: 350;
  padding: 10px 16px calc(10px + var(--safe-b));
  background: var(--nav-bg);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--nav-border);
  display: flex;
  justify-content: flex-end;
  transform: translateY(110%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.amount-kb-bar.visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}
.amount-kb-done-btn {
  min-width: 120px;
  padding: 12px 20px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--gold-gradient);
  color: #1a1200;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
}

body.amount-keyboard-open { overflow: hidden; }
body.amount-keyboard-open #app .content {
  padding-bottom: calc(72px + var(--safe-b));
}
body.amount-keyboard-open .feature-grid,
body.amount-keyboard-open .rates-card,
body.amount-keyboard-open .copyright,
body.amount-keyboard-open .btn-secondary { display: none; }
body.amount-keyboard-open .glass-card.highlight {
  margin-bottom: 8px;
}
.toggle-group {
  display: flex; flex-direction: column; border-radius: var(--radius-sm);
  overflow: hidden; border: 1px solid var(--card-border); min-width: 56px;
}
.toggle-group button {
  flex: 1; padding: 8px 10px; border: none;
  background: transparent; color: var(--muted);
  font-size: 10px; font-weight: 700; cursor: pointer;
}
.toggle-group button.active { background: var(--primary-dim); color: var(--primary); }
.wallet-net-toggle { flex-direction: row; min-width: 0; }
.wallet-net-toggle button { flex: 1; padding: 10px 6px; font-size: 11px; }

.quote-meta { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--card-border); min-height: 108px; }
.quote-placeholder { font-size: 13px; line-height: 1.45; color: var(--text-muted); padding: 4px 0; }
.quote-loading { color: var(--gold); font-weight: 600; }
.quote-preview { margin-top: 8px; padding: 14px 16px; border-radius: var(--radius-sm); background: var(--surface-subtle); }
.quote-preview-title { font-size: 13px; font-weight: 800; margin-bottom: 10px; color: var(--primary); }
.exchange-try-notes { margin: 10px 0 4px; padding: 10px 12px; border-radius: 12px; background: rgba(245,180,0,.06); border: 1px solid rgba(245,180,0,.18); }
.exchange-note { font-size: 12px; line-height: 1.45; color: var(--muted); margin: 0 0 6px; }
.exchange-note:last-child { margin-bottom: 0; }
.amount-actions-row { display: flex; justify-content: flex-end; margin: 4px 0 8px; }
.exchange-reset-btn { font-size: 13px; color: var(--muted); padding: 4px 0; background: none; border: none; cursor: pointer; }
.min-amount-row {
  display: flex;
  justify-content: flex-start;
  margin: 8px 0 2px;
}
.btn-min-amount {
  appearance: none;
  border: 1px solid rgba(245, 180, 0, 0.35);
  background: rgba(245, 180, 0, 0.12);
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 8px 12px;
  border-radius: 999px;
  cursor: pointer;
  line-height: 1.2;
}
.btn-min-amount:active:not(:disabled) { transform: scale(0.97); }
.btn-min-amount:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
html.tyrex-light .btn-min-amount {
  background: rgba(200, 140, 0, 0.1);
  border-color: rgba(180, 120, 0, 0.3);
}
.delivery-payout-note { margin-top: 12px; padding: 12px 14px; border-radius: 12px; background: rgba(212, 175, 55, 0.08); border: 1px solid rgba(212, 175, 55, 0.22); }
.delivery-payout-title { font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.delivery-payout-note p { margin: 0; font-size: 12px; line-height: 1.45; color: var(--text-muted); }
.amount-min-hint {
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.35;
  color: var(--text-muted, #8e8e93);
  display: none;
}
.amount-min-hint.visible { display: block; }
.amount-min-hint.amount-min-error { color: #ff6b6b; }
html.tyrex-light .amount-min-hint.amount-min-error { color: #e03131; }
.amount-row .input { min-width: 0; }
.meta-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 8px 0;
  font-size: 13px;
}
.meta-row .meta-label {
  color: var(--muted);
  flex: 0 0 auto;
  max-width: 42%;
  line-height: 1.35;
}
.meta-row .meta-value {
  flex: 1 1 auto;
  text-align: right;
  line-height: 1.35;
  overflow-wrap: anywhere;
  word-break: normal;
}
.meta-row.highlight b.meta-value {
  color: var(--primary);
  font-size: 15px;
  white-space: nowrap;
}
.volume-hint { font-size: 11px; color: var(--muted); margin: 8px 0 0; line-height: 1.4; }
.volume-tier-row span:last-child { color: var(--primary); font-weight: 700; }

.btn-primary {
  width: 100%; padding: 17px 20px; border: none;
  border-radius: var(--radius-sm);
  background: var(--gold-gradient);
  color: #1a1200;
  font-size: 16px; font-weight: 800;
  cursor: pointer;
  box-shadow: var(--shadow-gold);
  margin: 8px 0;
}
.btn-primary:active { transform: scale(0.98); }
.btn-primary:disabled, .wallet-send-btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn-secondary {
  width: 100%; padding: 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--card-border);
  background: var(--card); color: var(--text);
  font-size: 14px; font-weight: 600; cursor: pointer;
}

.feature-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 16px 0; }
.feature-card {
  padding: 16px 14px; border-radius: var(--radius-sm);
  background: var(--card); border: 1px solid var(--card-border);
}
.feature-card .ico { font-size: 22px; margin-bottom: 8px; }
.feature-card .ttl { font-size: 13px; font-weight: 700; margin-bottom: 4px; }
.feature-card .sub { font-size: 11px; color: var(--muted); line-height: 1.35; }

.card, .rates-card {
  background: var(--glass);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 18px; margin: 12px 0;
}
.rate-row {
  display: flex; justify-content: space-between; gap: 10px;
  padding: 10px 0; border-bottom: 1px solid var(--divider); font-size: 12px;
}
.rate-row:last-child { border-bottom: none; }
.rate-row span { color: var(--muted); }
.rate-row b { color: var(--primary); text-align: right; }

.dropdown { position: relative; }
.dropdown-menu {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 60;
  background: var(--dropdown-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm); max-height: 220px; overflow: auto;
  box-shadow: var(--shadow);
}
.dropdown-item {
  width: 100%; padding: 12px 14px; border: none; background: none;
  text-align: left; cursor: pointer; color: var(--text); font-size: 14px;
}
.dropdown-item:active { background: var(--primary-dim); }
.dropdown-item-locked {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  opacity: .55; cursor: not-allowed; user-select: none;
}
.dropdown-item-main { flex: 1; min-width: 0; }
.dropdown-item-badge {
  flex-shrink: 0; font-size: 10px; font-weight: 700;
  color: var(--muted); white-space: nowrap;
}

.lang-switch {
  display: flex; gap: 6px; margin-bottom: 16px; padding: 4px;
  background: var(--surface-subtle); border-radius: 14px;
  border: 1px solid var(--card-border);
}
.lang-btn {
  flex: 1; padding: 8px; border: none; border-radius: 10px;
  background: transparent; color: var(--muted);
  font-size: 12px; font-weight: 700; cursor: pointer;
}
.lang-btn.active { background: var(--gold-gradient); color: #1a1200; }

.error { color: #ff6b6b; font-size: 13px; margin: 8px 0; }

.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
  height: calc(var(--nav-h) + var(--safe-b));
  padding-bottom: var(--safe-b);
  display: flex;
  background: var(--nav-bg);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--nav-border);
}
.bottom-nav button {
  flex: 1; border: none; background: none; color: var(--muted);
  font-size: 10px; font-weight: 600; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px;
}
.bottom-nav button.active { color: var(--primary); }
.nav-ico { font-size: 20px; }

.hero-compact {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  margin-bottom: 14px;
}
.hero-compact-logo {
  width: 44px; height: 44px; flex-shrink: 0;
  border-radius: 50%; overflow: hidden;
  box-shadow: var(--shadow-gold), 0 0 0 1.5px rgba(245,180,0,.22);
  background: #0a0a0a;
}
html.tyrex-light .hero-compact-logo { background: #fff; }
.hero-compact-text { min-width: 0; }
.hero-compact-title { font-size: 16px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; }
.hero-compact-sub { font-size: 12px; color: var(--muted); margin-top: 3px; line-height: 1.35; }
.rates-card-title { display: block; margin-bottom: 4px; font-size: 13px; }
.rates-board-note { font-size: 11px; color: var(--muted); margin-bottom: 10px; line-height: 1.35; }
.rates-group-title {
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px;
  font-size: 12px; font-weight: 800; color: var(--primary);
  letter-spacing: 0.02em; margin-top: 14px; padding-top: 12px;
  border-top: 1px solid var(--card-border);
}
.rates-give-label {
  font-size: 11px; font-weight: 700; color: var(--muted);
  letter-spacing: 0.03em; text-transform: uppercase;
}
.rates-give-currency { display: inline-flex; align-items: center; gap: 6px; color: var(--primary); }
.rates-group-title:first-of-type { margin-top: 4px; padding-top: 0; border-top: none; }
.rates-card .rate-row { padding-left: 4px; }

.hero-card { text-align: center; padding: 28px 20px; margin-bottom: 16px; }
.hero-logo {
  width: 80px; height: 80px; margin: 0 auto 16px; border-radius: 50%;
  overflow: hidden; box-shadow: var(--shadow-gold), 0 0 0 2px rgba(245,180,0,.22);
  background: #0a0a0a;
}
html.tyrex-light .hero-logo { background: #fff; }
.hero-card h2 { font-size: 24px; font-weight: 800; margin-bottom: 8px; }
.hero-card p { color: var(--muted); font-size: 14px; line-height: 1.5; }

.order-card, .cyber-order {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 14px 16px; margin-bottom: 10px;
  border-radius: var(--radius-sm);
  background: var(--card); border: 1px solid var(--card-border);
}
.order-pair, .cyber-order-pair { font-weight: 700; font-size: 14px; }
.order-amt, .cyber-order-amt { font-size: 12px; color: var(--muted); margin-top: 4px; }
.badge, .cyber-badge {
  font-size: 10px; font-weight: 700; padding: 5px 10px; border-radius: 999px;
  border: 1px solid rgba(245,180,0,.4); color: var(--primary);
  background: var(--primary-dim);
}
.badge.done, .cyber-badge.done { border-color: rgba(74,222,128,.4); color: #4ade80; background: rgba(74,222,128,.1); }
.badge.cancel, .cyber-badge.cancel { border-color: rgba(248,113,113,.4); color: #f87171; background: rgba(248,113,113,.1); }
.empty-state, .cyber-empty { text-align: center; padding: 40px 20px; color: var(--muted); }

.profile-screen { padding: 0 20px 28px; }
.profile-topnav { display: flex; justify-content: space-between; padding: 12px 0; }
.profile-nav-btn { background: none; border: none; color: var(--primary); font-size: 14px; font-weight: 600; cursor: pointer; }
.profile-identity { text-align: center; padding: 16px 0 28px; }
.profile-avatar-wrap { position: relative; width: 104px; margin: 0 auto 16px; }
.profile-avatar-ring { width: 104px; height: 104px; border-radius: 50%; padding: 4px; background: var(--gold-gradient); box-shadow: var(--shadow-gold); }
.profile-avatar-circle {
  width: 100%; height: 100%; border-radius: 50%; background: var(--avatar-inner);
  display: flex; align-items: center; justify-content: center;
  font-size: 32px; font-weight: 800; color: var(--primary);
}
.profile-online { position: absolute; bottom: 6px; right: 6px; width: 14px; height: 14px; border-radius: 50%; background: #4ade80; border: 2px solid var(--bg); }
.profile-display-name { font-size: 20px; font-weight: 700; }
.profile-id-pill {
  display: inline-block; margin-top: 12px; padding: 6px 14px; border-radius: 999px;
  font-size: 12px; font-weight: 600; background: var(--primary-dim); color: var(--primary);
  border: 1px solid rgba(245,180,0,.3);
}
.profile-section-card {
  background: var(--glass); border: 1px solid var(--card-border);
  border-radius: var(--radius-sm); padding: 4px 18px; margin-bottom: 12px;
}
.profile-section-head { font-size: 11px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--primary); padding: 14px 0 6px; }
.profile-row { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--divider); font-size: 14px; }
.profile-row.last { border-bottom: none; }
.profile-row-label { color: var(--muted); }
.profile-footer { margin-top: 12px; padding: 14px; text-align: center; font-size: 11px; color: var(--muted); border-radius: 12px; border: 1px solid var(--card-border); }

.account-tabs { display: flex; gap: 8px; margin-bottom: 16px; }
.account-tab {
  flex: 1; padding: 10px; border-radius: 12px;
  border: 1px solid var(--card-border); background: transparent;
  color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; cursor: pointer;
}
.account-tab.active { background: var(--primary-dim); color: var(--primary); border-color: rgba(245,180,0,.4); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat-card, .cyber-stat { padding: 18px; text-align: center; border-radius: var(--radius-sm); background: var(--card); border: 1px solid var(--card-border); }
.stat-num { font-size: 28px; font-weight: 800; color: var(--primary); }
.stat-label { font-size: 10px; color: var(--muted); text-transform: uppercase; margin-top: 4px; }
.cyber-card { background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius-sm); padding: 16px; margin-bottom: 12px; }
.profile-hero { text-align: center; padding: 20px; }
.profile-avatar {
  width: 80px; height: 80px; border-radius: 50%; margin: 0 auto 12px;
  background: var(--gold-gradient); color: #1a1200;
  font: bold 28px/80px system-ui; text-align: center;
}
.profile-name { font-size: 18px; font-weight: 700; }
.profile-handle { color: var(--primary); font-size: 13px; margin-top: 4px; }
.cyber-section-title { font-size: 11px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--primary); margin: 16px 0 10px; }
.cyber-page-header { margin-bottom: 16px; }
.cyber-back { background: none; border: 1px solid var(--card-border); color: var(--primary); padding: 8px 14px; border-radius: 12px; cursor: pointer; }
.cyber-page-title { font-size: 20px; font-weight: 800; margin-top: 12px; }
.cyber-lang-grid { display: flex; gap: 8px; }
.cyber-lang-btn { flex: 1; padding: 10px; border-radius: 12px; border: 1px solid var(--card-border); background: transparent; color: var(--muted); cursor: pointer; }
.cyber-lang-btn.active { background: var(--gold-gradient); color: #1a1200; border: none; }
.cyber-settings-row { display: flex; justify-content: space-between; align-items: center; padding-top: 16px; margin-top: 16px; border-top: 1px solid var(--card-border); }
.cyber-referral-banner { padding: 20px; border-radius: var(--radius-sm); margin-bottom: 12px; background: linear-gradient(135deg, rgba(245,180,0,.15), rgba(245,180,0,.04)); border: 1px solid rgba(245,180,0,.3); }
.cyber-link-box { font-family: ui-monospace, monospace; font-size: 11px; word-break: break-all; padding: 12px; background: var(--link-box-bg); border-radius: 12px; border: 1px dashed rgba(245,180,0,.35); margin: 10px 0; color: var(--primary); }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: center; }
.cyber-notify { display: flex; gap: 10px; padding: 12px; }
.info-tip { width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--primary); background: var(--primary-dim); color: var(--primary); font-size: 10px; font-weight: 800; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.exchange-notice { margin-bottom: 14px; padding: 14px; border-radius: var(--radius-sm); border: 1px solid rgba(245,180,0,.25); background: rgba(245,180,0,.08); font-size: 12px; }
.exchange-notice-head { display: flex; gap: 8px; color: var(--primary); font-weight: 700; margin-bottom: 6px; }
.exchange-notice p { color: var(--muted); margin: 0; line-height: 1.5; }
.info-modal-backdrop { position: fixed; inset: 0; z-index: 200; background: var(--backdrop); display: flex; align-items: center; justify-content: center; padding: 24px; }
.info-modal { max-width: 360px; width: 100%; padding: 20px; background: var(--modal-bg); border: 1px solid var(--card-border); border-radius: var(--radius); }
.info-modal-head { position: relative; color: var(--primary); font-weight: 700; margin-bottom: 12px; padding-right: 28px; }
.info-modal-close { position: absolute; top: 0; right: 0; background: none; border: none; color: var(--muted); font-size: 24px; cursor: pointer; }
.info-modal p { font-size: 13px; color: var(--muted); line-height: 1.55; margin: 0; }
.theme-switch { display: flex; gap: 8px; margin-top: 4px; }

/* Wallet */
.wallet-hero { text-align: center; padding: 22px 18px; margin-bottom: 14px; }
.wallet-hero-label { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.wallet-hero-balance { font-size: 36px; font-weight: 800; margin: 6px 0 10px; line-height: 1.1; }
.wallet-hero-balance span { font-size: 16px; color: var(--muted); font-weight: 600; }
.wallet-hero-meta { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.wallet-spread-badge { display: inline-block; margin-top: 12px; padding: 4px 12px; border-radius: 999px; background: var(--primary-dim); color: var(--primary); font-size: 11px; font-weight: 700; }
.wallet-region { padding: 14px 16px; margin-bottom: 14px; border: 1px solid rgba(245,180,0,.28); }
.wallet-region-title { font-size: 13px; font-weight: 800; color: var(--primary); margin-bottom: 6px; line-height: 1.4; }
.wallet-region-subtitle { font-size: 12px; font-weight: 600; color: var(--text); opacity: 0.85; margin-bottom: 10px; }
.wallet-region-list { display: flex; flex-direction: column; gap: 8px; margin: 0; }
.wallet-region-item { font-size: 12px; color: var(--muted); line-height: 1.45; }
.wallet-region-text { margin: 0; }
.wallet-region-list.wallet-region-inline { align-items: center; gap: 6px; padding: 0 8px; margin-top: 12px; }
.wallet-region-list.wallet-region-inline .wallet-region-item { font-size: 10px; text-align: center; line-height: 1.45; }
.wallet-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.wallet-how { padding: 16px 18px; margin-bottom: 16px; }
.wallet-how-title { font-size: 15px; font-weight: 800; margin-bottom: 12px; }
.wallet-how p { font-size: 13px; color: var(--muted); line-height: 1.55; margin: 0 0 8px; }
.wallet-how-highlight { color: var(--primary) !important; font-weight: 600; }
.wallet-back { background: none; border: none; color: var(--primary); font-weight: 600; cursor: pointer; padding: 0; margin-bottom: 8px; }
.wallet-page-title { font-size: 20px; font-weight: 800; margin-bottom: 14px; }
.wallet-deposit-receive { text-align: center; margin-bottom: 16px; }
.wallet-deposit-warn {
  font-size: 12px; line-height: 1.45; color: #b8860b; background: rgba(245,180,0,.1);
  border: 1px solid rgba(245,180,0,.25); border-radius: 12px; padding: 10px 12px; margin-bottom: 14px; text-align: left;
}
.wallet-deposit-net { font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 12px; }
.wallet-deposit-qr { display: block; margin: 0 auto 8px; border-radius: 16px; background: #fff; padding: 8px; }
.wallet-deposit-qr-hint { font-size: 12px; color: var(--muted); margin: 0 0 12px; }
.wallet-address-box { margin-top: 4px; padding: 12px; border-radius: 12px; background: var(--surface-subtle); text-align: left; }
.wallet-address-box code { display: block; font-size: 11px; word-break: break-all; margin: 0 0 6px; color: var(--primary); font-weight: 600; }
.wallet-deposit-memo { font-size: 11px; color: var(--muted); margin: 0 0 10px; }
.wallet-copy-full { width: 100%; }
.wallet-qr-text { resize: vertical; min-height: 72px; font-family: ui-monospace, monospace; font-size: 11px; }
.wallet-deposit-method-toggle { flex-wrap: wrap; margin-bottom: 12px; }
.wallet-deposit-method-toggle button { font-size: 11px; padding: 8px 10px; flex: 1 1 30%; }
.wallet-fiat-deposit-card { margin-bottom: 12px; }
.wallet-fiat-quote { margin-top: 12px; padding: 12px 14px; }
.wallet-fiat-hint { font-size: 12px; line-height: 1.45; color: var(--muted); margin: 10px 0 0; }
.wallet-type-toggle button { font-size: 11px; padding: 8px 10px; }
.wallet-quote { margin-top: 12px; }
.wallet-pay-row { margin-bottom: 8px; }
.wallet-warn { color: var(--muted); font-size: 12px; margin-top: 8px; }
.btn-sm { padding: 8px 12px !important; font-size: 12px !important; }
.btn-text { font-size: 14px; }
.wallet-how-short { text-align: center; font-size: 12px; color: var(--muted); margin: 0 0 16px; line-height: 1.4; }
.aml-notice {
  margin: 12px 0 16px; padding: 10px 12px; border: 1px solid rgba(245,180,0,.22);
  background: rgba(245,180,0,.06); border-radius: 12px;
}
.aml-title { font-size: 11px; font-weight: 800; letter-spacing: 0.08em; color: #b8860b; margin-bottom: 4px; text-transform: uppercase; }
.aml-text { font-size: 12px; line-height: 1.45; color: var(--muted); margin: 0; }
.wallet-pay-page { padding-bottom: 8px; }
.wallet-pay-balance { text-align: center; font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.wallet-scan-zone {
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 200px; padding: 20px; margin-bottom: 12px; cursor: pointer;
  border: 2px dashed rgba(245,180,0,.35); transition: border-color .2s, background .2s;
}
.wallet-scan-zone.scanned { border-style: solid; border-color: rgba(245,180,0,.5); }
.wallet-scan-input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.wallet-scan-icon { font-size: 48px; margin-bottom: 10px; opacity: .9; }
.wallet-scan-preview { max-width: 100%; max-height: 140px; border-radius: 12px; object-fit: contain; margin-bottom: 10px; }
.wallet-scan-label { font-size: 16px; font-weight: 700; color: var(--primary); }
.wallet-scan-hint { font-size: 12px; color: var(--muted); margin-top: 6px; text-align: center; }
.wallet-pay-summary { text-align: center; padding: 18px; margin-bottom: 12px; }
.wallet-pay-type { font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.wallet-pay-local { font-size: 28px; font-weight: 800; line-height: 1.2; }
.wallet-pay-usdt { font-size: 15px; color: var(--primary); font-weight: 700; margin-top: 6px; }
.wallet-amount-fallback { padding: 14px 16px; margin-bottom: 12px; }
.wallet-amount-fallback-hint { font-size: 12px; color: var(--muted); margin: 0 0 10px; }
.wallet-amount-row { display: flex; align-items: center; gap: 10px; }
.wallet-amount-input { flex: 1; font-size: 22px !important; font-weight: 700; text-align: center; padding: 12px !important; }
.wallet-amount-ccy { font-size: 16px; font-weight: 700; color: var(--muted); min-width: 40px; }
.wallet-manual-card { margin-bottom: 12px; padding: 16px 18px; }
.wallet-send-btn { width: 100%; margin-top: 4px; }
.wallet-send-btn-wait { opacity: .72; }
.wallet-send-btn:disabled { opacity: .45; cursor: not-allowed; }

.wallet-dev-banner {
  text-align: center;
  padding: 18px 16px;
  margin-bottom: 14px;
  border: 1px solid rgba(245, 180, 0, 0.45);
  background: linear-gradient(180deg, rgba(245, 180, 0, 0.12) 0%, rgba(245, 180, 0, 0.04) 100%);
}
.wallet-dev-icon { font-size: 28px; margin-bottom: 8px; }
.wallet-dev-title { display: block; font-size: 15px; font-weight: 800; color: var(--primary); margin-bottom: 8px; }
.wallet-dev-text { font-size: 13px; color: var(--muted); line-height: 1.5; margin: 0 0 14px; }
.wallet-dev-btn { margin: 0; }
.wallet-main-locked .wallet-hero,
.wallet-main-locked .wallet-region-muted,
.wallet-main-locked .wallet-actions-disabled {
  opacity: 0.55;
  pointer-events: none;
  user-select: none;
}
.wallet-main-locked .wallet-dev-banner { opacity: 1; pointer-events: auto; user-select: auto; }
.wallet-actions-disabled .btn-primary,
.wallet-actions-disabled .btn-secondary { cursor: not-allowed; }
.theme-btn {
  flex: 1; padding: 12px 10px; border-radius: 12px;
  border: 1px solid var(--card-border); background: var(--surface-subtle);
  color: var(--muted); font-size: 13px; font-weight: 600; cursor: pointer;
}
.copyright { text-align: center; font-size: 11px; color: var(--muted); padding: 20px 0 8px; }
.back { color: var(--primary); background: none; border: none; font-size: 14px; cursor: pointer; }
