/* SAIKYO Exchange вЂ” official fintech style */
:root {
  --bg: #121214;
  --bg-2: #18181b;
  --bg-3: #1f1f23;
  --card: rgba(255,255,255,0.04);
  --card-hover: rgba(255,255,255,0.07);
  --border: rgba(255,255,255,0.08);
  --border-strong: rgba(255,255,255,0.14);
  --text: #e8e8ec;
  --text-muted: #8f8f96;
  --text-dim: #5c5c64;
  --accent: #16a34a;        /* serious green */
  --accent-2: #22c55e;
  --accent-glow: rgba(34,197,94,.20);
  --blue: #3b82f6;
  --warn: #f59e0b;
  --danger: #ef4444;
  --success: #16a34a;
  --radius: 12px;
  --radius-lg: 18px;
  --shadow-lg: 0 20px 60px -20px rgba(0,0,0,.7);
  --shadow-card: 0 1px 0 rgba(255,255,255,.03) inset, 0 6px 18px -6px rgba(0,0,0,.4);
}

* { box-sizing: border-box; }
*::before,*::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: -.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
  min-height: 100vh;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; transition: color .12s; }
a:hover { color: var(--accent-2); }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select, textarea { font-family: inherit; }
code, pre, kbd, samp, .mono, .order-num, .tx-hash, .wallet-address {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-weight: 400;
  letter-spacing: -.02em;
}
hr { border: none; border-top: 1px solid var(--border); margin: 24px 0; }

.container { max-width: 1240px; margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 860px; }
.container-tight { max-width: 540px; }

/* ====== HEADER ====== */
.hdr {
  position: sticky; top: 0; z-index: 50;
  background: rgba(5,7,11,0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,.05);
}
.hdr-row {
  display: flex; align-items: center; justify-content: space-between;
  height: 44px; gap: 18px;
  padding-left: 2px;
}
.logo { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; letter-spacing: -.2px; color: var(--text); transition: transform .3s ease; flex-shrink: 0; white-space: nowrap; }
.logo:hover { color: var(--text); transform: scale(1.03); }
.logo-mark {
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent;
  flex-shrink: 0;
}
.logo-mark .saikyo-logo-svg {
  width: 100%; height: 100%; display: block;
}
.logo-mark .saikyo-logo-img {
  width: 100%; height: 100%; display: block; object-fit: contain; border-radius: 4px;
}
.logo-text {
  color: var(--text);
  font-weight: 800; letter-spacing: .5px;
}
/* (legacy crown-coin animation removed) */
.nav { display: flex; gap: 18px; margin-right: auto; }
.nav a { font-size: 12px; color: var(--text-muted); font-weight: 500; }
.nav a:hover, .nav a.active { color: var(--text); }
.hdr-actions { display: flex; align-items: center; gap: 8px; }
.hdr-status {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 11px; color: var(--text-muted);
  padding-right: 10px; border-right: 1px solid var(--border);
}
.hdr-status::before {
  content:''; width: 8px; height: 8px; border-radius: 50%;
  background: var(--success);
  display: none;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(22,163,74,.4); }
  70% { box-shadow: 0 0 0 8px rgba(22,163,74,0); }
  100% { box-shadow: 0 0 0 0 rgba(22,163,74,0); }
}
.hdr-user {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 10px; border-radius: 8px;
  background: var(--card); border: 1px solid var(--border);
  font-size: 12px; font-weight: 500;
  position: relative;
}
.hdr-user:hover { background: var(--card-hover); }
.hdr-user-ava {
  width: 26px; height: 26px; border-radius: 50%;
  background: #16a34a;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: #fff;
}
.hdr-user-menu {
  position: absolute; right: 0; top: calc(100% + 6px);
  min-width: 220px;
  background: var(--bg-3); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 8px;
  box-shadow: var(--shadow-lg);
  z-index: 100;
}
.hdr-user-menu a, .hdr-user-menu button {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 10px 12px;
  font-size: 14px; color: var(--text); text-align: left;
  border-radius: 8px;
}
.hdr-user-menu a:hover, .hdr-user-menu button:hover { background: var(--card-hover); }
.hdr-user-menu hr { margin: 6px 0; }
.hamburger { display: none; background: none; border: none; color: var(--text); cursor: pointer; padding: 6px; border-radius: 6px; }
.hamburger:hover { background: var(--card-hover); }
@media (max-width: 1080px) {
  .nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--bg-2); border-bottom: 1px solid var(--border); box-shadow: 0 12px 32px rgba(0,0,0,.4); padding: 12px 20px; flex-direction: column; gap: 4px; z-index: 200; }
  .nav.nav-open { display: flex; animation: navSlide .2s ease-out; }
  @keyframes navSlide { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
  .nav.nav-open a { padding: 10px 12px; border-radius: 8px; font-size: 14px; }
  .nav.nav-open a:hover { background: var(--card-hover); }
  .nav.nav-open a.active { background: rgba(22,163,74,.12); color: var(--success); }
  .hamburger { display: flex; align-items: center; justify-content: center; }
  .hdr-status { display: none; }
}

.hdr .btn { padding: 7px 12px; font-size: 12px; border-radius: 7px; }

/* ====== BUTTONS ====== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: var(--radius);
  padding: 11px 18px;
  font-weight: 600; font-size: 14px;
  transition: transform .1s, box-shadow .15s, background .15s, opacity .15s;
  white-space: nowrap;
  border: 1px solid transparent;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-sm { padding: 8px 14px; font-size: 13px; border-radius: 9px; }
.btn-lg { padding: 14px 22px; font-size: 15px; border-radius: 13px; }
.btn-block { width: 100%; }
.btn-primary {
  background: #16a34a;
  color: #fff;
  box-shadow: none;
}
.btn-primary:hover { background: #15803d; }
.btn-ghost {
  background: var(--card);
  border-color: var(--border);
  color: var(--text);
}
.btn-ghost:hover { background: var(--card-hover); border-color: var(--border-strong); }
.btn-outline {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--text);
}
.btn-outline:hover { background: var(--card); }
.btn-danger {
  background: rgba(239,68,68,.12);
  border-color: rgba(239,68,68,.3);
  color: #fca5a5;
}
.btn-danger:hover { background: rgba(239,68,68,.2); }
.btn-icon {
  width: 36px; height: 36px; padding: 0;
  border-radius: 10px;
}

/* ====== UTILITIES ====== */
.grad-text {
  color: var(--accent-2);
}
.muted { color: var(--text-muted); }
.dim { color: var(--text-dim); }
.text-success { color: var(--success); }
.text-warn { color: var(--warn); }
.text-danger { color: var(--danger); }
.text-center { text-align: center; }
.flex { display: flex; }
.flex-1 { flex: 1; }
.gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; }
.mt-2{margin-top:8px}.mt-3{margin-top:12px}.mt-4{margin-top:16px}.mt-6{margin-top:24px}.mt-8{margin-top:32px}
.mb-2{margin-bottom:8px}.mb-3{margin-bottom:12px}.mb-4{margin-bottom:16px}.mb-6{margin-bottom:24px}.mb-8{margin-bottom:32px}
.tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 9px; border-radius: 6px;
  font-size: 12px; font-weight: 600;
  background: var(--card); border: 1px solid var(--border);
}
.tag-success { background: rgba(22,163,74,.12); border-color: rgba(22,163,74,.3); color: var(--accent-2); }
.tag-warn { background: rgba(245,158,11,.12); border-color: rgba(245,158,11,.3); color: var(--warn); }
.tag-danger { background: rgba(239,68,68,.12); border-color: rgba(239,68,68,.3); color: #fca5a5; }
.tag-info { background: rgba(59,130,246,.12); border-color: rgba(59,130,246,.3); color: #93c5fd; }

/* ====== HERO ====== */
.hero {
  position: relative;
  padding: 56px 0 100px;
  min-height: calc(100vh - 80px);
  display: flex;
  align-items: flex-start;
}
.hero-bg {
  position: fixed; left: 0; right: 0; top: 0; z-index: 0;
  height: 150vh;
  background: linear-gradient(180deg, var(--bg-2) 0%, var(--bg) 100%);
  pointer-events: none;
}
.hero-grid {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, 480px);
  gap: 48px; align-items: center;
  margin-top: auto; margin-bottom: auto;
}
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .hero { padding: 32px 0 48px; }
}
.hero-left h1 {
  font-size: clamp(32px, 4.4vw, 50px);
  line-height: 1.08;
  margin: 16px 0 18px;
  letter-spacing: -1.1px;
  font-weight: 800;
}
.lead { font-size: 16.5px; color: var(--text-muted); max-width: 560px; }
.badge.hero {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(22,163,74,.10);
  border: 1px solid rgba(22,163,74,.30);
  color: var(--accent-2);
  padding: 6px 12px; border-radius: 99px;
  font-size: 12.5px; font-weight: 600;
}
.badge-hero .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent-2);
}
.hero-stats {
  display: flex; gap: 36px; margin-top: 32px; flex-wrap: wrap;
}
.hero-stats div { display: flex; flex-direction: column; }
.hero-stats b { font-size: 26px; font-weight: 800; color: var(--text); letter-spacing: -.4px; }
.hero-stats span { font-size: 12.5px; color: var(--text-muted); margin-top: 2px; }

/* ====== EXCHANGE WIDGET ====== */
.exchange {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 22px;
  box-shadow: var(--shadow-lg);
}
.ex-tabs {
  display: flex; gap: 4px;
  background: rgba(0,0,0,.3);
  border-radius: 11px; padding: 4px;
  margin-bottom: 14px;
}
.ex-tab {
  flex: 1; padding: 10px;
  font-size: 14px; font-weight: 600;
  border-radius: 8px;
  color: var(--text-muted);
  transition: background .15s, color .15s;
}
.ex-tab.active { background: rgba(255,255,255,.07); color: var(--text); }

.ex-card {
  background: rgba(255,255,255,.025);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 16px;
}
.ex-label {
  display: flex; justify-content: space-between;
  font-size: 12.5px; color: var(--text-muted);
  margin-bottom: 6px;
}
.ex-balance { color: var(--accent-2); font-weight: 500; }
.ex-row { display: flex; align-items: center; gap: 10px; }
.ex-row input {
  flex: 1; min-width: 0;
  background: transparent; border: none; outline: none;
  font-size: 24px; font-weight: 700;
  color: var(--text); letter-spacing: -.4px;
  padding: 4px 0;
}
.ex-row input::placeholder { color: var(--text-dim); }
.ex-coin {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,.05);
  border: 1px solid var(--border);
  padding: 8px 12px;
  border-radius: 10px;
  font-weight: 600; font-size: 14px;
  transition: background .15s;
  flex-shrink: 0;
}
.ex-coin:hover { background: var(--card-hover); }
.ex-coin-icon {
  width: 26px; height: 26px;
  display: inline-flex; align-items: center; justify-content: center;
  background: #16a34a;
  border-radius: 50%;
  font-size: 13px; font-weight: 700; color: #fff;
}
.ex-network { margin-top: 10px; }
.ex-network-label { font-size: 12px; color: var(--text-muted); display: block; margin-bottom: 6px; }
.ex-networks { display: flex; flex-wrap: wrap; gap: 6px; }
.ex-net {
  padding: 6px 11px;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 12px; font-weight: 500;
  color: var(--text-muted);
  transition: background .15s, color .15s, border-color .15s;
}
.ex-net:hover { background: var(--card-hover); color: var(--text); }
.ex-net.active {
  background: rgba(22,163,74,.18);
  color: var(--accent-2);
  border-color: rgba(22,163,74,.45);
}
.ex-swap {
  display: block;
  margin: -8px auto;
  width: 38px; height: 38px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 50%;
  position: relative; z-index: 2;
  color: var(--text-muted);
  transition: transform .25s, color .15s;
}
.ex-swap:hover { color: var(--text); transform: rotate(180deg); }
.ex-swap svg { display: block; margin: 0 auto; }
.ex-rate {
  margin-top: 14px;
  padding: 12px 14px;
  background: rgba(0,0,0,.3);
  border-radius: 12px;
  font-size: 13px;
}
.ex-rate-row {
  display: flex; justify-content: space-between;
  padding: 4px 0;
}
.ex-rate-row:not(:last-child) { border-bottom: 1px dashed rgba(255,255,255,.05); }
.ex-rate-row span:first-child { color: var(--text-muted); }
.ex-rate-row span:last-child { color: var(--text); font-weight: 500; }
.ex-rate-row.small { font-size: 11px; }
.ex-rate-row.small span { color: var(--text-dim) !important; font-weight: 400; }

/* Rate refresh timer (circular countdown) */
#rate-timer {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 24px;
  height: 24px;
  min-width: 24px;
  min-height: 24px;
  margin-left: 8px;
  vertical-align: middle;
  cursor: default;
  flex-shrink: 0;
}
.rate-timer-svg {
  width: 24px;
  height: 24px;
  min-width: 24px;
  min-height: 24px;
  transform: rotate(-90deg);
  position: absolute;
  top: 0;
  left: 0;
}
.rate-timer-bg {
  fill: none;
  stroke: rgba(255,255,255,.1);
  stroke-width: 2.5;
}
.rate-timer-fg {
  fill: none;
  stroke: #a78bfa;
  stroke-width: 2.5;
  stroke-linecap: round;
  transition: stroke-dashoffset .3s linear, stroke .3s;
}
.rate-timer-fg.rate-timer-refreshing {
  stroke: #4ade80;
}
.rate-timer-num {
  position: absolute;
  top: 0;
  left: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 700;
  color: rgba(255,255,255,.6);
  pointer-events: none;
  line-height: 1;
}

.ex-reserve {
  margin-top: 8px; padding: 8px 12px;
  background: rgba(22,163,74,.07);
  border: 1px solid rgba(22,163,74,.2);
  border-radius: 10px;
  font-size: 12.5px;
  display: flex; justify-content: space-between;
}
.ex-reserve span:first-child { color: var(--text-muted); }
.ex-reserve span:last-child { color: var(--accent-2); font-weight: 600; }
#create-order { margin-top: 14px; }
.legal-badge {
  margin-top: 14px;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(59,130,246,.10);
  border: 1px solid rgba(96,165,250,.35);
  color: #bfdbfe;
  font-size: 12.5px;
  font-weight: 500;
  text-align: center;
  line-height: 1.5;
}
.ex-foot {
  text-align: center; font-size: 12px; color: var(--text-muted);
  margin-top: 12px;
  display: flex; align-items: center; justify-content: center; gap: 12px;
  flex-wrap: wrap;
}

/* ====== SECTIONS ====== */
.section { padding: 72px 0; }
.section-alt { background: rgba(255,255,255,.018); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-title {
  font-size: clamp(26px, 3.2vw, 36px);
  font-weight: 800;
  letter-spacing: -.8px;
  text-align: center;
  margin: 0 0 14px;
}
.section-sub {
  text-align: center; color: var(--text-muted);
  max-width: 620px; margin: 0 auto 44px;
  font-size: 15px;
}

/* ====== ADVANTAGES ====== */
.adv-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
@media (max-width: 880px) { .adv-grid { grid-template-columns: 1fr; } }
.adv {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: transform .2s, border-color .2s;
}
.adv:hover { transform: translateY(-3px); border-color: rgba(22,163,74,.3); }
.adv-ico {
  width: 44px; height: 44px;
  background: rgba(22,163,74,.12);
  border: 1px solid rgba(22,163,74,.28);
  border-radius: 11px;
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
  color: var(--accent-2);
}
.adv h3 { font-size: 17px; font-weight: 700; margin: 0 0 6px; }
.adv p { color: var(--text-muted); font-size: 14px; margin: 0; }

/* ====== HOW ====== */
.how-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
@media (max-width: 980px) { .how-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .how-grid { grid-template-columns: 1fr; } }
.how-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
}
.how-num {
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  background: #16a34a;
  border-radius: 10px;
  font-weight: 800; color: #fff; font-size: 15px;
  margin-bottom: 14px;
}
.how-card h3 { font-size: 16px; font-weight: 700; margin: 0 0 6px; }
.how-card p { color: var(--text-muted); font-size: 13.5px; margin: 0; }

/* ====== REVIEWS ====== */
.rev-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
@media (max-width: 980px) { .rev-grid { grid-template-columns: 1fr; } }
.rev {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
}
.rev-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.rev-ava {
  width: 40px; height: 40px;
  background: #16a34a;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; color: #fff; font-size: 15px;
}
.rev-head b { display: block; font-size: 14px; }
.rev-head span { font-size: 12px; color: var(--text-muted); }
.rev-stars { margin-left: auto; color: #facc15; font-size: 13px; letter-spacing: 1px; }
.rev p { color: #cfd2dc; font-size: 14px; margin: 0; }
.rev-reply {
  margin-top: 12px; padding: 10px 12px;
  background: rgba(22,163,74,.07);
  border-left: 2px solid var(--accent);
  border-radius: 0 8px 8px 0;
  font-size: 13px;
}
.rev-reply b { color: var(--accent-2); font-size: 12.5px; display: block; margin-bottom: 2px; }
.rev-reply p { color: var(--text-muted); margin: 0; font-size: 13px; }

/* ====== FAQ ====== */
.faq details {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  margin-bottom: 10px;
  overflow: hidden;
}
.faq summary {
  padding: 16px 50px 16px 20px;
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  position: relative;
  font-size: 14.5px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+';
  position: absolute; right: 20px; top: 50%; transform: translateY(-50%);
  font-size: 22px; color: var(--text-muted);
  transition: transform .2s;
}
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq p { padding: 0 20px 18px; margin: 0; color: var(--text-muted); font-size: 14px; }

/* ====== FOOTER (minimal, trae-style) ====== */
.footer {
  background: #000;
  border-top: none;
  padding: 40px 0 20px;
  margin-top: 40px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2.4fr 1fr 1fr 1.3fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--border);
}
@media (max-width: 880px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; gap: 28px; } }
.footer-brand { max-width: 380px; }
.footer-brand .logo { font-size: 18px; }
.footer-desc { color: var(--text-muted); font-size: 13.5px; line-height: 1.6; margin: 16px 0 0; }
.footer h4 {
  font-size: 11px; margin: 0 0 18px; color: var(--text-dim);
  text-transform: uppercase; letter-spacing: 1.4px; font-weight: 600;
}
.footer-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.footer-list li { color: var(--text-muted); font-size: 14px; line-height: 1.4; padding: 0; }
.footer-list a { color: var(--text-muted); transition: color .15s; text-decoration: none; }
.footer-list a:hover { color: var(--text); }
.footer-bot {
  padding-top: 28px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  font-size: 12.5px;
  color: var(--text-dim);
}
.footer-bot a { color: var(--text-dim); }
.footer-bot a:hover { color: var(--text-muted); }
.footer-banners {
  margin-top: 18px;
  display: flex; gap: 14px; justify-content: center; flex-wrap: wrap;
  opacity: .5;
  transition: opacity .2s;
}
.footer-banners:hover { opacity: 1; }
.footer-banners img { display: block; border-radius: 3px; }
.footer-badges { display: flex; gap: 10px; flex-wrap: wrap; }
.footer-badge {
  padding: 4px 10px;
  background: rgba(255,255,255,.03);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 11.5px;
  color: var(--text-muted);
}

/* ====== MODALS ====== */
.modal {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.modal[hidden] { display: none; }
.modal-bg {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.7);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.modal-card {
  position: relative; z-index: 1;
  width: 100%; max-width: 460px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 22px;
  max-height: 88vh;
  display: flex; flex-direction: column;
  animation: slideUp .25s ease;
  overflow-y: auto;
}
.modal-card-wide { max-width: 540px; }
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 16px; flex-shrink: 0;
}
.modal-head h3 { margin: 0; font-size: 19px; }
.modal-close {
  width: 36px; height: 36px;
  font-size: 22px; line-height: 1;
  border-radius: 10px;
  background: var(--card); color: var(--text-muted);
  transition: background .15s, color .15s;
}
.modal-close:hover { background: var(--card-hover); color: var(--text); }

/* ====== COIN PICKER ====== */
.coin-search {
  width: 100%;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 11px 14px;
  font-size: 14px;
  color: var(--text); outline: none;
  margin-bottom: 12px;
}
.coin-search:focus { border-color: rgba(22,163,74,.5); }
.coin-list {
  overflow-y: auto; flex: 1;
  margin: 0 -8px; padding: 0 8px;
}
.coin-item {
  display: flex; align-items: center; gap: 12px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  text-align: left;
  transition: background .12s;
}
.coin-item:hover { background: var(--card-hover); }
.coin-item-icon {
  width: 34px; height: 34px;
  background: #16a34a;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px; color: #fff;
}
.coin-item-name { flex: 1; }
.coin-item-name b { display: block; font-size: 14px; }
.coin-item-name span { font-size: 12px; color: var(--text-muted); }
.coin-item-price { font-size: 12.5px; color: var(--text-muted); font-variant-numeric: tabular-nums; }

/* ====== FORMS ====== */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field > label, .field > .field-label { font-size: 13px; color: var(--text-muted); font-weight: 500; }
.field em { color: #ef4444; font-style: normal; }
.field input, .field select, .field textarea {
  background: rgba(255,255,255,.04);
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 11px 14px;
  font-size: 14px;
  color: var(--text); outline: none;
  transition: border-color .15s;
  width: 100%;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: rgba(22,163,74,.5); }
/* Fix native <option> rendering on dark theme */
select option, select optgroup {
  background: #0d0d14;
  color: #e9e9f1;
  padding: 8px 12px;
}
select option:checked,
select option:hover,
select option:focus {
  background: #1c1c28;
  color: #fff;
}
select option:disabled {
  color: #70708a;
  background: #0a0a10;
}
.field-hint { font-size: 12px; color: var(--text-dim); margin-top: 2px; }
.field-error { font-size: 12.5px; color: #fca5a5; margin-top: 2px; }
.field-ok { font-size: 12.5px; color: #86efac; margin-top: 2px; }
.field input.field-valid { border-color: rgba(34,197,94,.75); box-shadow: 0 0 0 3px rgba(34,197,94,.10); }
.field input.field-invalid { border-color: rgba(239,68,68,.8); box-shadow: 0 0 0 3px rgba(239,68,68,.10); }
.field-check {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 13px; color: var(--text-muted);
}
.field-check input { margin-top: 2px; width: auto; }
.field-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 540px) { .field-grid-2 { grid-template-columns: 1fr; } }

/* ====== TOAST ====== */
.toast-stack {
  position: fixed; bottom: 24px; right: 24px;
  display: flex; flex-direction: column; gap: 10px;
  z-index: 999;
  max-width: 360px;
}
.toast {
  padding: 13px 16px; border-radius: 12px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  font-size: 14px;
  display: flex; align-items: flex-start; gap: 10px;
  animation: slideIn .25s;
}
.toast.toast-success { border-color: rgba(22,163,74,.4); }
.toast.toast-error { border-color: rgba(239,68,68,.4); }
.toast.toast-info { border-color: rgba(59,130,246,.4); }
.toast-ico { font-size: 18px; flex-shrink: 0; }
.toast-success .toast-ico { color: var(--accent-2); }
.toast-error .toast-ico { color: #fca5a5; }
.toast-info .toast-ico { color: #93c5fd; }
@keyframes slideIn { from { transform: translateX(120%); opacity: 0; } to { transform: none; opacity: 1; } }

/* ====== AUTH PAGES ====== */
.auth-wrap {
  min-height: calc(100vh - 68px);
  display: flex; align-items: center; justify-content: center;
  padding: 40px 20px;
  background:
    radial-gradient(900px 420px at 18% 10%, rgba(34,197,94,.16), transparent 62%),
    radial-gradient(760px 360px at 88% 92%, rgba(45,212,191,.10), transparent 58%),
    linear-gradient(180deg, rgba(255,255,255,.025), transparent 44%),
    var(--bg-2);
}
.auth-shell {
  width: 100%;
  max-width: 980px;
  display: grid;
  grid-template-columns: minmax(280px, .9fr) minmax(360px, 440px);
  gap: 18px;
  align-items: stretch;
}
.auth-shell-wide { max-width: 1160px; grid-template-columns: minmax(300px, .85fr) minmax(560px, 1.15fr); }
.auth-brand-panel {
  position: relative;
  overflow: hidden;
  padding: 34px;
  min-height: 420px;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(145deg, rgba(22,163,74,.18), rgba(10,10,16,.72) 44%),
    radial-gradient(360px 240px at 20% 15%, rgba(34,197,94,.20), transparent 70%),
    rgba(255,255,255,.035);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.auth-brand-panel::after {
  content: '';
  position: absolute;
  inset: auto -80px -110px auto;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  border: 1px solid rgba(34,197,94,.18);
  background: rgba(34,197,94,.06);
}
.auth-brand-mark {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  font-size: 30px;
  font-weight: 800;
  color: #dcfce7;
  background: linear-gradient(135deg, #16a34a, #0f766e);
  box-shadow: 0 18px 42px rgba(22,163,74,.24);
}
.auth-kicker {
  color: #86efac;
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: 11px;
  font-weight: 800;
}
.auth-brand-panel h2 { margin: 18px 0 10px; font-size: 34px; line-height: 1.05; letter-spacing: -1px; }
.auth-brand-panel p { color: var(--text-muted); margin: 0; line-height: 1.65; max-width: 360px; }
.auth-benefits { display: flex; flex-wrap: wrap; gap: 10px; position: relative; z-index: 1; }
.auth-benefits span {
  padding: 9px 12px;
  border-radius: 999px;
  background: rgba(0,0,0,.22);
  border: 1px solid rgba(255,255,255,.10);
  color: #d1fae5;
  font-size: 12.5px;
}
.auth-card {
  background: rgba(16,16,24,.86);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: var(--radius-lg);
  padding: 32px;
  width: 100%; max-width: 440px;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(18px);
}
.auth-card h1 { font-size: 26px; margin: 0 0 6px; letter-spacing: -.5px; }
.auth-card .auth-sub { color: var(--text-muted); margin: 0 0 24px; font-size: 14px; }
.auth-card-head { margin-bottom: 18px; }
.auth-foot { text-align: center; margin-top: 18px; font-size: 13.5px; color: var(--text-muted); }
.auth-card-wide { max-width: 620px; }
.auth-id-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 54px;
  background: linear-gradient(135deg, #22c55e, #0f766e);
  box-shadow: 0 16px 36px rgba(22,163,74,.22);
}
.auth-id-icon {
  width: 26px;
  height: 26px;
  border-radius: 9px;
  display: inline-grid;
  place-items: center;
  background: rgba(255,255,255,.16);
  font-weight: 900;
}
.auth-social-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0 16px; }
.auth-social-btn {
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 12px;
  padding: 11px 12px;
  color: var(--text-muted);
  background: rgba(255,255,255,.035);
  font: inherit;
}
.auth-social-btn:disabled { cursor: not-allowed; opacity: .68; }
.auth-divider { display: flex; align-items: center; gap: 12px; color: var(--text-dim); font-size: 12px; margin: 16px 0; }
.auth-divider::before, .auth-divider::after { content: ''; height: 1px; flex: 1; background: var(--border); }
.acc-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 0 22px; }
.acc-switch-btn {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  background: var(--bg-2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer; text-align: left;
  color: var(--text); font-family: inherit;
  transition: all .15s;
}
.acc-switch-btn:hover { border-color: rgba(22,163,74,.35); }
.acc-switch-btn.active { border-color: var(--accent); background: rgba(22,163,74,.08); box-shadow: 0 0 0 3px rgba(22,163,74,.12); }
.acc-switch-btn > div { display: flex; flex-direction: column; gap: 2px; }
.acc-switch-btn b { font-size: 14px; }
.acc-switch-btn span:last-child { font-size: 11.5px; color: var(--text-muted); }
.acc-switch-ico { font-size: 24px; width: 40px; text-align: center; }
.legal-block-title { font-weight: 700; font-size: 13px; color: var(--accent-2); letter-spacing: .5px; text-transform: uppercase; margin: 20px 0 12px; padding-top: 16px; border-top: 1px dashed var(--border); }
.radio-row { display: flex; gap: 18px; padding: 10px 0 2px; }
.radio-row label { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px; }
.legal-notice {
  margin-top: 14px; padding: 12px 14px;
  background: rgba(59,130,246,.08);
  border: 1px solid rgba(59,130,246,.28);
  border-radius: 10px;
  color: #bfdbfe; font-size: 12.5px; line-height: 1.55;
}
@media (max-width: 640px) {
  .acc-switch { grid-template-columns: 1fr; }
}
@media (max-width: 1080px) {
  .auth-shell, .auth-shell-wide { grid-template-columns: 1fr; max-width: 620px; }
  .auth-brand-panel { min-height: auto; gap: 28px; }
  .auth-card, .auth-card-wide { max-width: none; }
}
@media (max-width: 520px) {
  .auth-wrap { padding: 24px 12px; }
  .auth-brand-panel { padding: 24px; border-radius: 16px; }
  .auth-brand-panel h2 { font-size: 26px; }
  .auth-social-row { grid-template-columns: 1fr; }
}

/* ====== PAGE LAYOUT (account, admin) ====== */
.page {
  padding: 36px 0 80px;
  min-height: calc(100vh - 68px);
}
.page h1 { font-size: 28px; letter-spacing: -.5px; margin: 0 0 8px; }
.page-sub { color: var(--text-muted); margin: 0 0 28px; }

/* sidebar layout */
.sidebar-layout {
  display: grid; grid-template-columns: 240px 1fr; gap: 28px;
}
@media (max-width: 880px) { .sidebar-layout { grid-template-columns: 1fr; } }
.side {
  display: flex; flex-direction: column; gap: 4px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 12px;
  height: fit-content;
  position: sticky; top: 84px;
}
@media (max-width: 880px) { .side { position: static; } }
.side a {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 9px;
  font-size: 14px; color: var(--text-muted); font-weight: 500;
}
.side a:hover { background: var(--card-hover); color: var(--text); }
.side a.active { background: rgba(22,163,74,.12); color: var(--accent-2); }
.side-divider { height: 1px; background: var(--border); margin: 8px 4px; }
.side-label { font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: var(--text-dim); padding: 8px 12px 4px; }

/* ====== CARD ====== */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
}
.card-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.card-head h2 { font-size: 18px; margin: 0; font-weight: 700; }

/* ====== TABLES ====== */
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table thead th {
  text-align: left; padding: 10px 12px;
  background: rgba(255,255,255,.025);
  font-weight: 600; color: var(--text-muted);
  font-size: 12px; text-transform: uppercase; letter-spacing: .4px;
  border-bottom: 1px solid var(--border);
}
.table tbody td {
  padding: 12px;
  border-bottom: 1px solid var(--border);
}
.table tbody tr:hover { background: rgba(255,255,255,.02); }
.table tbody tr:last-child td { border-bottom: none; }
.table-wrap { overflow-x: auto; margin: 0 -12px; }
.table-wrap table { min-width: 600px; }

/* ====== PROGRESS / STEPS ====== */
.steps {
  display: flex; gap: 8px;
  margin: 16px 0 22px;
}
.step {
  flex: 1;
  padding: 10px 12px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 12px;
  color: var(--text-dim);
  position: relative;
}
.step.done { border-color: rgba(22,163,74,.4); background: rgba(22,163,74,.08); color: var(--accent-2); }
.step.active { border-color: var(--accent); background: rgba(22,163,74,.12); color: var(--text); }
.step b { display: block; font-size: 13px; color: inherit; margin-bottom: 2px; }

/* ====== STATS ====== */
.stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px;
  margin-bottom: 24px;
}
@media (max-width: 880px) { .stats-grid { grid-template-columns: 1fr 1fr; } }
.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
}
.stat-card .stat-label { font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .4px; margin-bottom: 8px; }
.stat-card .stat-val { font-size: 24px; font-weight: 800; letter-spacing: -.4px; }
.stat-card .stat-delta { font-size: 12px; margin-top: 4px; }
.stat-card .stat-delta.up { color: var(--success); }
.stat-card .stat-delta.down { color: var(--danger); }

/* ====== KYC ====== */
.kyc-stage {
  padding: 20px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--card);
  margin-bottom: 14px;
}
.kyc-stage-head {
  display: flex; align-items: center; gap: 12px; margin-bottom: 8px;
}
.kyc-stage-num {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--card-hover);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; color: var(--text-muted);
  font-size: 14px;
}
.kyc-stage.done .kyc-stage-num { background: var(--accent); color: #fff; }
.kyc-stage.active .kyc-stage-num { background: rgba(22,163,74,.15); color: var(--accent-2); border: 2px solid var(--accent); }
.kyc-stage h3 { margin: 0; font-size: 16px; flex: 1; }
.kyc-upload-zone {
  border: 2px dashed var(--border-strong);
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  font-size: 13.5px; color: var(--text-muted);
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.kyc-upload-zone:hover { border-color: var(--accent); background: rgba(22,163,74,.05); }
.kyc-upload-zone.has-file { border-color: var(--accent); background: rgba(22,163,74,.07); color: var(--accent-2); }

/* ====== CHAT WIDGET ====== */
.chat-fab {
  position: fixed; bottom: 22px; right: 22px;
  width: 58px; height: 58px;
  border-radius: 50%;
  background: linear-gradient(135deg, #16a34a, #22c55e);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; z-index: 9999;
  box-shadow: 0 8px 32px -4px rgba(22,163,74,.45), 0 4px 14px rgba(0,0,0,.4);
  transition: transform .2s cubic-bezier(.34,1.56,.64,1), box-shadow .2s;
  overflow: visible;
}
.chat-fab:hover { transform: scale(1.08); box-shadow: 0 12px 36px -4px rgba(22,163,74,.55), 0 6px 18px rgba(0,0,0,.45); }
.chat-fab:active { transform: scale(.96); }
.chat-fab-icon { position: relative; z-index: 1; transition: transform .2s; }
.chat-fab:hover .chat-fab-icon { transform: rotate(-5deg); }
.chat-fab-pulse {
  position: absolute; inset: -4px;
  border-radius: 50%;
  border: 2px solid rgba(22,163,74,.4);
  animation: fabPulse 2s ease-out infinite;
}
@keyframes fabPulse {
  0% { transform: scale(1); opacity: 1; }
  100% { transform: scale(1.5); opacity: 0; }
}
.chat-fab .badge-num {
  position: absolute; top: -4px; right: -4px;
  min-width: 22px; height: 22px;
  background: #ef4444; color: #fff;
  border: 2px solid var(--bg);
  border-radius: 11px;
  font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  padding: 0 6px;
  z-index: 2;
  animation: badgePop .3s cubic-bezier(.34,1.56,.64,1);
}
@keyframes badgePop {
  0% { transform: scale(0); }
  100% { transform: scale(1); }
}
.chat-window {
  position: fixed;
  bottom: 92px; right: 22px;
  width: 390px;
  max-width: calc(100vw - 44px);
  height: 580px;
  max-height: calc(100vh - 130px);
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 20px;
  display: flex; flex-direction: column;
  box-shadow: 0 20px 60px rgba(0,0,0,.5), 0 0 0 1px rgba(255,255,255,.05) inset;
  z-index: 91;
  overflow: hidden;
  animation: chatSlideIn .3s cubic-bezier(.34,1.56,.64,1);
  touch-action: pan-x pan-y pinch-zoom;
  will-change: transform;
}
@keyframes chatSlideIn {
  0% { opacity: 0; transform: translateY(20px) scale(.95); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
.chat-window[hidden] { display: none; }
.chat-window.dragging {
  animation: none;
  user-select: none;
  box-shadow: 0 28px 90px rgba(0,0,0,.72);
}
.chat-header {
  padding: 14px 16px;
  background: linear-gradient(135deg, #15803d, #16a34a);
  color: #fff;
  display: flex; align-items: center; gap: 12px;
  cursor: grab;
  user-select: none;
}
.chat-window.dragging .chat-header { cursor: grabbing; }
.chat-header-ava {
  width: 40px; height: 40px;
  background: rgba(255,255,255,.18);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  position: relative;
  backdrop-filter: blur(4px);
}
.chat-header-ava svg { opacity: .9; }
.chat-header-info { flex: 1; }
.chat-header-info b { display: block; font-size: 14.5px; font-weight: 600; letter-spacing: -.2px; }
.chat-header-info span { font-size: 12px; opacity: .85; display: inline-flex; align-items: center; gap: 6px; }
.chat-status-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #4ade80;
  display: inline-block;
  box-shadow: 0 0 6px rgba(74,222,128,.6);
  transition: background .3s, box-shadow .3s;
}
.chat-status-dot.thinking {
  background: #fbbf24;
  box-shadow: 0 0 8px rgba(251,191,36,.6);
  animation: dotPulse .8s ease-in-out infinite;
}
@keyframes dotPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.5); }
}
.chat-header-close {
  background: rgba(255,255,255,.12);
  width: 32px; height: 32px; border-radius: 10px;
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s;
}
.chat-header-close:hover { background: rgba(255,255,255,.22); }
.chat-body {
  flex: 1; overflow-y: auto;
  padding: 16px;
  display: flex; flex-direction: column; gap: 8px;
  background: var(--bg);
  scroll-behavior: smooth;
}
.chat-body::-webkit-scrollbar { width: 4px; }
.chat-body::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
.chat-msg {
  display: flex; flex-direction: column; max-width: 82%;
  animation: msgIn .35s cubic-bezier(.34,1.56,.64,1);
}
@keyframes msgIn {
  0% { opacity: 0; transform: translateY(12px); }
  100% { opacity: 1; transform: translateY(0); }
}
.chat-msg.me { align-self: flex-end; align-items: flex-end; }
.chat-msg.them { align-self: flex-start; align-items: flex-start; }
.chat-msg-row {
  display: flex; align-items: flex-end; gap: 6px;
}
.chat-msg.me .chat-msg-row { flex-direction: row-reverse; }
.chat-msg-bubble {
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 14px; line-height: 1.45;
  word-break: break-word;
  white-space: pre-wrap;
  position: relative;
}
.chat-msg.me .chat-msg-bubble {
  background: linear-gradient(135deg, #16a34a, #15803d);
  color: #fff;
  border-bottom-right-radius: 6px;
  box-shadow: 0 2px 8px rgba(22,163,74,.25);
}
.chat-msg.them .chat-msg-bubble {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-bottom-left-radius: 6px;
}
.chat-msg.system .chat-msg-bubble {
  background: linear-gradient(135deg, rgba(59,130,246,.08), rgba(139,92,246,.08));
  border: 1px solid rgba(59,130,246,.2);
  color: #93c5fd;
  font-size: 13px;
  text-align: center;
}
.chat-msg.system { align-self: center; max-width: 92%; }
.chat-msg-sender {
  font-size: 11px;
  color: var(--text-dim);
  margin: 0 8px 3px;
  font-weight: 500;
}
.chat-msg.me .chat-msg-sender {
  color: var(--text-dim);
  text-align: right;
}
.chat-msg.them .chat-msg-sender {
  color: var(--success);
}
.chat-sender-ai,
.chat-sender-op {
  display: flex; align-items: center; gap: 5px;
  font-weight: 600; letter-spacing: .01em;
}
.chat-sender-ai { color: #a78bfa !important; }
.chat-sender-op { color: #4ade80 !important; }
.chat-sender-ai .chat-sender-icon,
.chat-sender-op .chat-sender-icon {
  width: 14px; height: 14px; flex-shrink: 0;
}
.chat-msg-meta {
  font-size: 10.5px;
  color: var(--text-dim);
  margin-top: 3px;
  padding: 0 6px;
  opacity: .7;
}
/* typing indicator */
.chat-bubble-typing {
  display: flex; align-items: center; gap: 5px;
  padding: 12px 18px !important;
  min-height: 38px;
}
.typing-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--text-dim);
  opacity: .5;
  animation: typingBounce 1.4s infinite ease-in-out both;
}
.typing-dot:nth-child(1) { animation-delay: 0s; }
.typing-dot:nth-child(2) { animation-delay: .2s; }
.typing-dot:nth-child(3) { animation-delay: .4s; }
@keyframes typingBounce {
  0%, 80%, 100% { transform: scale(.6); opacity: .4; }
  40% { transform: scale(1); opacity: 1; }
}
.chat-input-wrap {
  padding: 10px 12px;
  border-top: 1px solid var(--border);
  background: var(--bg-2);
  display: flex; gap: 8px; align-items: flex-end;
}
.chat-input {
  flex: 1;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 14px;
  color: var(--text);
  outline: none;
  resize: none;
  max-height: 100px;
  min-height: 40px;
  font-family: inherit;
  transition: border-color .2s, box-shadow .2s;
}
.chat-input:focus {
  border-color: rgba(22,163,74,.5);
  box-shadow: 0 0 0 3px rgba(22,163,74,.1);
}
.chat-send {
  width: 42px; height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, #16a34a, #22c55e);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: transform .15s, box-shadow .15s;
}
.chat-send:hover { transform: scale(1.05); box-shadow: 0 4px 16px -2px rgba(22,163,74,.45); }
.chat-send:active { transform: scale(.95); }
.chat-attach {
  width: 42px; height: 42px;
  border-radius: 12px;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text-muted);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: color .15s, background .15s;
}
.chat-attach:hover { color: var(--text); background: var(--card-hover); }
.chat-quick {
  padding: 8px 12px;
  display: flex; gap: 6px; flex-wrap: wrap;
  background: var(--bg-2);
  border-top: 1px solid var(--border);
}
.chat-quick-label {
  width: 100%;
  font-size: 11px; color: var(--text-dim);
  margin-bottom: 2px;
  font-weight: 500;
}
.chat-quick button {
  padding: 6px 12px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 12px; color: var(--text-muted);
  transition: all .15s;
  white-space: nowrap;
}
.chat-quick button:hover {
  background: rgba(22,163,74,.1);
  border-color: rgba(22,163,74,.3);
  color: #16a34a;
}

/* full chat page */
.chat-page {
  display: grid; grid-template-columns: 280px 1fr; gap: 18px;
  height: calc(100vh - 68px - 36px);
}
@media (max-width: 880px) { .chat-page { grid-template-columns: 1fr; } }
.chat-list {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow-y: auto;
}
.chat-list-item {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  display: flex; gap: 10px; align-items: center;
  cursor: pointer; transition: background .12s;
}
.chat-list-item:hover, .chat-list-item.active { background: var(--card-hover); }
.chat-list-item-ava {
  width: 38px; height: 38px; border-radius: 50%;
  background: #2563eb;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; color: #fff; font-size: 14px;
  flex-shrink: 0;
}
.chat-list-item-info { flex: 1; min-width: 0; }
.chat-list-item-info b { display: block; font-size: 14px; }
.chat-list-item-info span { display: block; font-size: 12px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-list-item-time { font-size: 11px; color: var(--text-dim); }

/* hide chat fab on chat/admin pages if needed */
body.no-chat-fab .chat-fab, body.no-chat-fab .chat-window { display: none !important; }

/* ====== TARIFF SWITCHER ====== */
.ex-tariff {
  margin: 14px 0 8px;
  padding: 10px 12px;
  background: rgba(255,255,255,.025);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.ex-tariff-label {
  display: block;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--text-dim);
  margin-bottom: 8px;
}
.ex-tariff-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.ex-tariff-tab {
  padding: 9px 8px;
  font-size: 12.5px;
  font-weight: 600;
  background: rgba(255,255,255,.03);
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: 9px;
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ex-tariff-tab:hover:not(:disabled) {
  background: rgba(22,163,74,.08);
  border-color: rgba(22,163,74,.3);
  color: var(--text);
}
.ex-tariff-tab.active {
  background: rgba(22,163,74,.20);
  border-color: rgba(22,163,74,.55);
  color: #fff;
}
.ex-tariff-tab:disabled { cursor: not-allowed; }
@media (max-width: 540px) {
  .ex-tariff-tabs { grid-template-columns: 1fr; }
  .ex-tariff-tab { padding: 10px 12px; font-size: 13px; }
}

/* ====== ORDER SUMMARY ROWS ====== */
.sum-row {
  display: flex; justify-content: space-between; gap: 10px;
  padding: 6px 0;
  font-size: 13.5px;
}
.sum-row:not(:last-child) { border-bottom: 1px dashed rgba(255,255,255,.06); }
.sum-row span:first-child { color: var(--text-muted); }
.sum-row span:last-child  { color: var(--text); font-weight: 500; text-align: right; }

/* ====== CRYPTO ICONS (cryptocurrency-icons CDN) ====== */
.ex-coin-icon img,
.coin-item-icon img {
  display: block;
  border-radius: 50%;
  background: transparent;
}
.ex-coin-icon {
  background: transparent !important;
  padding: 0;
  overflow: hidden;
}
.ex-coin-icon.is-fiat {
  background: #16a34a !important;
  color: #fff;
  font-weight: 800;
}
.coin-item-icon {
  background: transparent !important;
  width: 36px; height: 36px;
}
.ex-coin-fallback {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px;
  background: #16a34a;
  border-radius: 50%;
  color: #fff; font-weight: 800; font-size: 11px;
}

/* ====== COOKIE BANNER ====== */
.cookie-banner {
  position: fixed;
  left: 22px; right: 22px; bottom: 22px;
  z-index: 9999;
  background: var(--bg-3);
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  padding: 14px 18px;
  display: flex; align-items: center; gap: 14px;
  box-shadow: var(--shadow-lg);
  max-width: 920px;
  margin-left: auto; margin-right: auto;
  animation: slideUp .3s ease;
  font-size: 13.5px;
}
.cookie-banner-text { flex: 1; color: var(--text-muted); line-height: 1.5; }
.cookie-banner-text a { color: var(--accent-2); }
.cookie-banner-actions { display: flex; gap: 8px; flex-shrink: 0; }
@media (max-width: 640px) {
  .cookie-banner { left: 10px; right: 10px; bottom: 10px; padding: 12px 14px; flex-direction: column; align-items: stretch; }
  .cookie-banner-actions { justify-content: flex-end; }
  .chat-fab { width: 50px; height: 50px; bottom: 80px; }
  .chat-window { bottom: 138px; height: calc(100vh - 200px); }
}

/* ====== MOBILE ADAPT (РѕР±С‰РёРµ РїСЂР°РІРєРё) ====== */
@media (max-width: 640px) {
  body { font-size: 13.5px; -webkit-text-size-adjust: 100%; }
  * { -webkit-tap-highlight-color: transparent; }
  html { scroll-behavior: smooth; -webkit-overflow-scrolling: touch; }
  .container { width: 100%; padding: 0 12px; }
  .hdr { position: sticky; }
  .hdr-row { height: 58px; gap: 8px; min-width: 0; }
  .logo { font-size: 15px; gap: 7px; min-width: 0; }
  .logo span:last-child { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .footer-brand .logo span:last-child, .footer-brand .logo-text { max-width: none; overflow: visible; }
  .logo-mark { width: 30px; height: 30px; flex: 0 0 30px; }
  .hdr-actions { gap: 6px; min-width: 0; }
  .hdr-actions .btn { padding: 7px 9px; font-size: 11.5px; white-space: nowrap; }
  .hdr-user span:not(.hdr-user-ava) { display: none; }
  .hdr-user { padding: 4px 7px; }
  .hdr-user-ava { width: 24px; height: 24px; }
  .hero { padding: 18px 0 30px; min-height: auto; }
  .hero-bg canvas { display: none !important; }
  .hero-bg {
    background:
      radial-gradient(circle at 80% 10%, rgba(22,163,74,.14), transparent 32%),
      radial-gradient(circle at 10% 40%, rgba(34,197,94,.08), transparent 34%),
      var(--bg-2);
  }
  .hero-grid { gap: 18px; }
  .hero-left { text-align: left; }
  .hero-left h1 { font-size: clamp(24px, 8vw, 31px); line-height: 1.08; margin: 10px 0 12px; }
  .lead { font-size: 14px; line-height: 1.5; }
  .hero-stats { gap: 18px; margin-top: 18px; }
  .hero-stats b { font-size: 22px; }
  .exchange {
    width: 100%;
    max-width: 100%;
    padding: 14px;
    border-radius: 18px;
    box-shadow: 0 14px 40px rgba(0,0,0,.35);
  }
  .ex-tabs { gap: 3px; padding: 3px; border-radius: 10px; }
  .ex-tab { min-width: 0; padding: 9px 6px; font-size: 12.5px; line-height: 1.15; white-space: normal; }
  .ex-card { padding: 12px; border-radius: 13px; }
  .ex-row { gap: 8px; align-items: stretch; }
  .ex-row input { font-size: clamp(20px, 7vw, 26px); min-width: 0; width: 100%; }
  .ex-coin { padding: 8px 9px; gap: 6px; font-size: 13px; max-width: 118px; }
  .ex-coin-icon { width: 22px; height: 22px; font-size: 11px; flex: 0 0 22px; }
  .ex-network { margin-top: 9px; }
  .ex-networks { gap: 5px; }
  .ex-net { padding: 7px 9px; font-size: 11.5px; border-radius: 8px; flex: 1 1 calc(33.333% - 6px); text-align: center; }
  .ex-swap { width: 34px; height: 34px; margin: -7px auto; }
  .ex-rate { font-size: 12.5px; }
  .ex-rate-row { gap: 12px; }
  .reserve { padding: 10px 12px; font-size: 12.5px; }
  .exchange .btn-block { min-height: 48px; font-size: 14.5px; }
  .ex-under { gap: 10px; font-size: 11.5px; flex-wrap: wrap; justify-content: center; }
  .section { padding: 44px 0; }
  .section-title { font-size: 24px; }
  .section-sub { font-size: 14px; margin-bottom: 26px; }
  .modal { padding: 12px; }
  .modal-card { padding: 16px; border-radius: 16px; }
  .footer { padding: 36px 0 18px; margin-top: 36px; }
  .footer-grid { gap: 22px; padding-bottom: 22px; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat-card { padding: 14px; }
  .stat-card .stat-val { font-size: 20px; }
  .field input, .field select, .field textarea { font-size: 16px; } /* РїСЂРµРґРѕС‚РІСЂР°С‰Р°РµС‚ Р·СѓРј РЅР° iOS */
  .auth-card { padding: 22px 18px; border-radius: 14px; }
  .auth-card h1 { font-size: 22px; }
  .acc-switch-btn { padding: 12px; }
  .acc-switch-btn b { font-size: 13px; }
  .acc-switch-btn span:last-child { font-size: 11px; }
  .page { padding: 22px 0 60px; }
  .page h1 { font-size: 22px; }
  .table-wrap { margin: 0 -14px; }
  .table-wrap table { font-size: 12.5px; }
  .ex-tab { padding: 8px; font-size: 13px; }
  .toast-stack { left: 12px; right: 12px; bottom: 12px; max-width: none; }
  .steps { gap: 5px; }
  .step { padding: 8px; font-size: 11px; }
  .ex-tariff-tabs { grid-template-columns: 1fr 1fr; }
  .ex-tariff-tab { padding: 8px; font-size: 12px; }
  .footer-grid { grid-template-columns: 1fr; }
  .sidebar-layout { grid-template-columns: 1fr; }
  .chat-window { width: 100%; max-width: calc(100vw - 24px); right: 12px; bottom: 12px; height: calc(100vh - 120px); }
  body:has(.chat-window:not([hidden])) .chat-fab { display: none !important; }
  .chat-fab { width: 48px; height: 48px; bottom: 12px; right: 12px; }
}

@media (max-width: 380px) {
  .container { padding: 0 10px; }
  .logo span:last-child { max-width: 76px; }
  .hdr-actions .btn { padding: 6px 8px; font-size: 11px; }
  .ex-tariff-tabs { grid-template-columns: 1fr; }
  .ex-tab { font-size: 12px; padding: 6px; }
  .hero-left h1 { font-size: 24px; }
  .exchange { padding: 10px; border-radius: 14px; }
  .ex-card { padding: 10px; }
  .ex-row input { font-size: 18px; }
  .ex-coin { max-width: 104px; padding: 7px 8px; }
  .ex-net { flex-basis: calc(50% - 5px); }
}

/* === Quick links section (index) === */
.quick-links-section { padding-top: 32px; padding-bottom: 48px; }
.quick-links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.quick-link-card {
  position: relative; display: block; padding: 28px 26px;
  background: linear-gradient(135deg, rgba(45,212,191,.04), rgba(20,184,166,.02));
  border: 1px solid var(--border); border-radius: 18px;
  color: var(--text); transition: all .25s ease; overflow: hidden;
}
.quick-link-card:hover {
  border-color: rgba(45,212,191,.4); transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(45,212,191,.12);
}
.quick-link-card .ql-icon { font-size: 36px; margin-bottom: 14px; }
.quick-link-card h3 { margin: 0 0 8px; font-size: 18px; font-weight: 700; }
.quick-link-card p { color: var(--text-muted); font-size: 14px; line-height: 1.5; margin: 0; }
.quick-link-card .ql-arrow {
  position: absolute; top: 24px; right: 22px; font-size: 22px;
  color: var(--text-muted); transition: transform .25s, color .25s;
}
.quick-link-card:hover .ql-arrow { color: #2dd4bf; transform: translateX(4px); }
@media (max-width: 780px) { .quick-links { grid-template-columns: 1fr; } }

/* === Page hero (about/how/faq) === */
.page.hero {
  padding: 60px 0 36px;
  background: radial-gradient(ellipse at 50% 0%, rgba(45,212,191,.10), transparent 60%);
  border-bottom: 1px solid var(--border);
}
.page-hero-title { font-size: 42px; font-weight: 800; margin: 0 0 14px; letter-spacing: -1px; line-height: 1.1; }
.page-hero-sub { font-size: 17px; color: var(--text-muted); max-width: 640px; margin: 0 auto; line-height: 1.55; }
@media (max-width: 640px) {
  .page.hero { padding: 36px 0 22px; }
  .page-hero-title { font-size: 30px; }
  .page-hero-sub { font-size: 15px; }
}

/* === FAQ categories === */
.faq-cat-title { font-size: 22px; font-weight: 700; margin: 0 0 14px; color: var(--text); display: flex; align-items: center; gap: 8px; }
.faq-categories > .faq { margin-bottom: 8px; }

/* === Reset old experimental styles === */
.page-hero, .page-hero-title, .page-hero-sub, .quick-links-section, .quick-links { display: none !important; }


/* ====== TRAE-STYLE PAGES (about / how / faq) ====== */
.ts.hero {
  padding: 96px 0 64px;
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(1200px 400px at 50% -100px, rgba(34,197,94,.10), transparent 60%),
    linear-gradient(180deg, rgba(255,255,255,0.01), transparent 60%);
}
.ts-hero-inner { max-width: 880px; }
.ts-eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: #22c55e;
  padding: 6px 12px;
  border: 1px solid rgba(34,197,94,.25);
  border-radius: 999px;
  background: rgba(34,197,94,.06);
  margin-bottom: 22px;
}
.ts-h1 {
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -1.5px;
  margin: 0 0 22px;
}
.ts-h1-mute { color: var(--text-muted); font-weight: 700; }
.ts-h2 {
  font-size: clamp(26px, 3.2vw, 40px);
  font-weight: 700;
  letter-spacing: -.6px;
  margin: 0 0 12px;
}
.ts-h3 {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -.2px;
  margin: 0 0 18px;
  color: var(--text);
  text-transform: uppercase;
  font-size: 13px;
  letter-spacing: 1.4px;
  color: var(--text-muted);
  font-weight: 600;
}
.ts-lead {
  font-size: clamp(15px, 1.4vw, 18px);
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 640px;
  margin: 0;
}
.ts-section { padding: 80px 0; }
.ts-section-alt { background: rgba(255,255,255,0.02); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.ts-section-head { margin-bottom: 48px; max-width: 720px; }
.ts-section-sub { color: var(--text-muted); font-size: 16px; line-height: 1.55; margin: 0; }
.ts-narrow { max-width: 880px; margin: 0 auto; }
.ts-body { font-size: 16px; line-height: 1.7; color: var(--text-muted); margin: 0 0 18px; }

.ts-grid { display: grid; gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: 0; overflow: hidden; }
.ts-grid-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) { .ts-grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .ts-grid-3 { grid-template-columns: 1fr; } }
.ts-feature {
  padding: 32px 28px;
  background: var(--bg, #0a0d14);
  transition: background .2s;
}
.ts-feature:hover { background: rgba(34,197,94,.03); }
.ts-feature-num {
  font-size: 13px;
  font-weight: 600;
  color: #22c55e;
  letter-spacing: 1px;
  margin-bottom: 14px;
}
.ts-feature h3 {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 10px;
  letter-spacing: -.2px;
}
.ts-feature p {
  color: var(--text-muted);
  font-size: 14.5px;
  line-height: 1.6;
  margin: 0;
}
.ts-feature-plain .ts-feature-num { display: none; }

/* Steps (how-it-works) */
.ts-steps {
  display: grid;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}
.ts-step {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 32px;
  padding: 36px 32px;
  background: var(--bg, #0a0d14);
  align-items: start;
}
.ts-step-num {
  font-size: 48px;
  font-weight: 800;
  color: #22c55e;
  letter-spacing: -1px;
  line-height: 1;
}
.ts-step-body h3 { font-size: 22px; font-weight: 700; margin: 0 0 10px; letter-spacing: -.3px; }
.ts-step-body p { color: var(--text-muted); font-size: 15.5px; line-height: 1.65; margin: 0; }
@media (max-width: 700px) {
  .ts-step { grid-template-columns: 1fr; gap: 12px; padding: 28px 22px; }
  .ts-step-num { font-size: 36px; }
}

/* Tags */
.ts-tags { display: flex; flex-wrap: wrap; gap: 10px; }
.ts-tag {
  display: inline-flex;
  align-items: center;
  padding: 10px 18px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  background: rgba(255,255,255,0.02);
  transition: all .2s;
}
.ts-tag:hover { border-color: rgba(34,197,94,.4); color: #22c55e; }

/* Contacts list */
.ts-contacts { margin: 0; padding: 0; display: grid; gap: 0; border-top: 1px solid var(--border); }
.ts-contacts > div {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 32px;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}
.ts-contacts dt { color: var(--text-muted); font-size: 14px; font-weight: 500; margin: 0; }
.ts-contacts dd { color: var(--text); font-size: 15px; margin: 0; }
.ts-contacts a { color: #22c55e; text-decoration: none; }
.ts-contacts a:hover { text-decoration: underline; }
@media (max-width: 600px) {
  .ts-contacts > div { grid-template-columns: 1fr; gap: 6px; }
}

/* FAQ */
.ts-faq-group { margin-bottom: 44px; }
.ts-faq { border-top: 1px solid var(--border); }
.ts-faq details {
  border-bottom: 1px solid var(--border);
  padding: 0;
}
.ts-faq summary {
  list-style: none;
  cursor: pointer;
  padding: 22px 32px 22px 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  position: relative;
  display: flex;
  align-items: center;
  transition: color .2s;
}
.ts-faq summary::-webkit-details-marker { display: none; }
.ts-faq summary::after {
  content: '';
  position: absolute;
  right: 4px;
  top: 50%;
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--text-muted);
  border-bottom: 2px solid var(--text-muted);
  transform: translateY(-70%) rotate(45deg);
  transition: transform .2s;
}
.ts-faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.ts-faq summary:hover { color: #22c55e; }
.ts-faq-body { padding: 0 0 22px; }
.ts-faq-body p { color: var(--text-muted); font-size: 15px; line-height: 1.7; margin: 0; max-width: 720px; }

/* CTA */
.ts-cta {
  padding: 96px 0;
  border-top: 1px solid var(--border);
  background:
    radial-gradient(1200px 400px at 50% 100%, rgba(34,197,94,.08), transparent 60%);
}
.ts-cta-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 28px; }

/* Reset old page-hero styles to avoid conflicts */
.page-hero, .page-hero-title, .page-hero-sub, .quick-links-section { display: none !important; }

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    /* readable backdrop behind hero text on the left */
    linear-gradient(90deg,
      rgba(18,18,20,0.92) 0%,
      rgba(18,18,20,0.78) 25%,
      rgba(18,18,20,0.40) 50%,
      rgba(18,18,20,0.10) 70%,
      rgba(18,18,20,0.00) 100%),
    /* soft vertical fade so wave dissolves toward edges */
    linear-gradient(180deg,
      rgba(18,18,20,0.35) 0%,
      transparent 25%,
      transparent 75%,
      rgba(18,18,20,0.55) 100%);
}
@media (max-width: 880px) {
  .hero-bg::after {
    background:
      linear-gradient(180deg,
        rgba(18,18,20,0.55) 0%,
        rgba(18,18,20,0.30) 50%,
        rgba(18,18,20,0.55) 100%);
  }
}

/* ============================================================
   v13: Inter + JetBrains Mono fonts, animated logo on scroll,
   header layout, removed gray divider between hero and footer
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

body,
html {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, system-ui, sans-serif;
}
body { font-weight: 400; }
h1, h2, h3, h4, h5, .logo, .btn, b, strong { font-weight: 600; }
h1 { font-weight: 700; }
code, pre, kbd, samp, .mono, .hash, [style*="font-family:monospace"], [style*="font-family: monospace"] {
  font-family: 'JetBrains Mono', ui-monospace, 'SF Mono', Consolas, 'Liberation Mono', Menlo, monospace !important;
  font-weight: 400;
}

/* === Header layout: nav next to logo, actions remain on the right === */
.hdr .container { max-width: 1440px; padding: 0 28px; }
.hdr-row { justify-content: flex-start; }
.hdr-row .logo { margin-right: 32px; }
.hdr-row .nav { margin-right: auto; }
.hdr-row .hdr-actions { margin-left: auto; }
.nav { gap: 26px; }
.nav a { font-size: 13px; font-weight: 500; }

/* === Default state: hide the static SAIKYO text in the header logo === */
.hdr .logo .logo-text { display: none; }
.hdr .logo .logo-crypto {
  display: inline-flex;
  gap: 1px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 1.5px;
  margin-left: 0;
  pointer-events: none;
  white-space: nowrap;
  flex-shrink: 0;
}
.hdr .logo .logo-crypto span {
  display: inline-block;
  opacity: 0;
  width: 0;
  overflow: hidden;
  vertical-align: middle;
  transform: translateY(-8px) rotateX(-90deg);
  transition: opacity .35s ease, transform .35s ease, width .35s ease, color .35s ease;
}

/* Premium gold gradient text */
.hdr .logo .logo-crypto span {
  background: linear-gradient(135deg, #f0d060 0%, #fff8e0 40%, #e8b830 60%, #d4a520 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Logo mark flips on scroll */
.hdr .logo-mark {
  display: inline-flex;
  transform: rotateY(0deg);
  transition: transform .65s cubic-bezier(.4,.6,.2,1);
  transform-style: preserve-3d;
  will-change: transform;
}

/* === Scrolled state: flip logo + reveal SAIKYO crypto-letters === */
.hdr.scrolled .logo-mark {
  transform: rotateY(-360deg) translateX(-2px);
}
.hdr.scrolled .logo .logo-crypto span {
  opacity: 1;
  width: 1ch;
  transform: translateY(0) rotateX(0);
}
.hdr.scrolled .logo .logo-crypto span:nth-child(1) { transition-delay: .12s; }
.hdr.scrolled .logo .logo-crypto span:nth-child(2) { transition-delay: .18s; }
.hdr.scrolled .logo .logo-crypto span:nth-child(3) { transition-delay: .24s; }
.hdr.scrolled .logo .logo-crypto span:nth-child(4) { transition-delay: .30s; }
.hdr.scrolled .logo .logo-crypto span:nth-child(5) { transition-delay: .36s; }
.hdr.scrolled .logo .logo-crypto span:nth-child(6) { transition-delay: .42s; }

@media (prefers-reduced-motion: reduce) {
  .hdr .logo-mark, .hdr .logo .logo-crypto span { transition: none !important; }
  .hdr.scrolled .logo-mark { transform: none; }
}

/* === Remove gray divider between hero squares and footer === */
body { background: #08090b; }
.footer { margin-top: 0; border-top: none; background: #000 !important; }
html, body { background: #000 !important; }
.hero { padding-bottom: 32px; }
@media (max-width: 640px) {
  .hero { padding-bottom: 18px; }
}

/* === SOC 2 trust badge === */
.soc2-badge {
  position: relative;
  display: inline-flex; align-items: center;
  font-size: 11.5px; font-weight: 500;
  color: #cbd5e1;
  padding: 9px 16px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(34,197,94,.08), rgba(34,197,94,.04));
  border: 1px solid rgba(34,197,94,.3);
  letter-spacing: .2px;
  cursor: help;
  transition: all .2s ease;
  box-shadow: 0 0 0 0 rgba(34,197,94,0);
}
.soc2-badge:hover {
  border-color: rgba(34,197,94,.55);
  background: linear-gradient(135deg, rgba(34,197,94,.14), rgba(34,197,94,.06));
  box-shadow: 0 0 24px rgba(34,197,94,.18);
  color: #fff;
}
.soc2-badge svg { color: #22c55e; transition: transform .2s ease; }
.soc2-badge:hover svg { transform: scale(1.1); }
.soc2-tip {
  position: absolute;
  left: 50%; bottom: calc(100% + 14px);
  transform: translateX(-50%) translateY(8px);
  width: min(440px, calc(100vw - 32px));
  padding: 16px 18px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(15,23,32,.98), rgba(8,12,18,.98));
  border: 1px solid rgba(34,197,94,.4);
  color: #e2e8f0;
  font-size: 12.5px;
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: .1px;
  text-align: left;
  box-shadow: 0 24px 60px rgba(0,0,0,.55), 0 0 0 1px rgba(255,255,255,.03) inset;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
  z-index: 20;
}
.soc2-tip::before {
  content: '';
  position: absolute;
  left: 50%; top: 100%;
  transform: translateX(-50%);
  border: 7px solid transparent;
  border-top-color: rgba(34,197,94,.4);
}
.soc2-tip strong {
  color: #4ade80;
  font-weight: 600;
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
}
.soc2-tip ul {
  margin: 6px 0 0;
  padding-left: 16px;
}
.soc2-tip li { margin-bottom: 3px; color: #cbd5e1; }
.soc2-tip li::marker { color: #22c55e; }
.soc2-badge:hover .soc2-tip,
.soc2-badge:focus .soc2-tip,
.soc2-badge:focus-within .soc2-tip {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.order-submit-bar {
  position: sticky;
  bottom: -18px;
  z-index: 5;
  margin: 18px -2px -2px;
  padding: 14px 0 2px;
  background: linear-gradient(180deg, rgba(15,23,42,0), var(--bg-3) 42%);
}
.order-submit-bar .btn {
  min-height: 52px;
  box-shadow: 0 14px 30px rgba(14,165,233,.28);
}

@media (max-width: 360px) {
  .hero .container { padding-left: 8px !important; padding-right: 8px !important; }
  .exchange { padding: 8px !important; }
  .ex-row { grid-template-columns: minmax(0, 1fr) minmax(78px, 96px) !important; }
  .ex-coin { max-width: 96px !important; font-size: 12px !important; }
  .ex-networks { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .ex-rate-row { grid-template-columns: minmax(0, 1fr) !important; gap: 3px !important; }
  .ex-rate-row span:last-child { text-align: left !important; display: inline-flex; align-items: center; }
  #rate-display { display: inline-flex !important; align-items: center; flex-wrap: nowrap; }
}

/* ====== SYSTEM BANNER ====== */
.system-banner {
  background: rgba(245, 158, 11, 0.04);
  border-bottom: 1px solid rgba(245, 158, 11, 0.12);
  padding: 8px 0;
  position: relative;
  z-index: 100;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.banner-content {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  line-height: 1.4;
  max-width: 1100px;
  margin: 0 auto;
}
.banner-icon {
  font-size: 14px;
  flex-shrink: 0;
  opacity: .7;
}
.banner-text {
  color: rgba(254, 202, 202, 0.75);
  flex: 1;
  font-weight: 400;
}
.banner-text strong {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
}
.banner-close {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: all .15s;
}
.banner-close:hover {
  background: rgba(255,255,255,0.08);
  color: var(--text);
}

/* ====== HERO FEATURES ====== */
.hero-features {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}
.hero-feature {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  font-size: 12.5px;
  color: var(--text-muted);
}
.hf-icon {
  font-size: 16px;
  flex-shrink: 0;
}

/* ====== AMOUNT ERROR / OK ====== */
.ex-amount-error {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: 10px;
  margin-bottom: 14px;
  font-size: 13px;
  color: #fca5a5;
  transition: all .2s;
}
.ex-amount-error.visible {
  display: flex;
}
.ex-amount-error.is-ok {
  background: rgba(22, 163, 74, 0.1);
  border-color: rgba(22, 163, 74, 0.3);
  color: #86efac;
}
.ex-amount-error .error-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--danger);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.ex-amount-error.is-ok .error-icon {
  background: var(--accent);
}
.input-error {
  border-color: var(--danger) !important;
  background: rgba(239, 68, 68, 0.05) !important;
}
.input-error:focus {
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15) !important;
}

/* ====== EX-FOOT LINK ====== */
.ex-foot a {
  color: var(--accent);
  cursor: pointer;
  transition: color .12s;
}
.ex-foot a:hover {
  color: var(--accent-2);
}

/* ====== FOOTER POLISH ====== */
.footer {
  background: #000 !important;
  position: relative;
}
.footer::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.08) 50%, transparent 100%);
}
.footer .logo-text {
  background: linear-gradient(135deg, #fff 0%, #94a3b8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.footer-desc { letter-spacing: .1px; }
.footer h4 { color: rgba(255,255,255,0.45); }
.footer-list a {
  position: relative;
  display: inline-block;
}
.footer-list a::after {
  content: '';
  position: absolute;
  left: 0; bottom: -2px;
  width: 0; height: 1px;
  background: var(--accent);
  transition: width .2s ease;
}
.footer-list a:hover::after { width: 100%; }
.footer-powered-by {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  padding: 10px 14px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 10px;
  font-size: 11.5px;
  color: rgba(255,255,255,0.4);
  line-height: 1.5;
  max-width: 380px;
}
.footer-powered-by-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #22c55e;
  flex-shrink: 0;
  box-shadow: 0 0 8px rgba(34,197,94,0.6);
  animation: footerPulse 2s ease-in-out infinite;
}
@keyframes footerPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
.footer-powered-by a {
  color: rgba(255,255,255,0.65);
  text-decoration: none;
  border-bottom: 1px dashed rgba(255,255,255,0.2);
  transition: all .15s;
}
.footer-powered-by a:hover {
  color: #22c55e;
  border-bottom-color: rgba(34,197,94,0.5);
}

/* ============================================================
   v22: Cyberpunk SAIKYO scroll reveal
   - glitch scramble + neon glow + shimmer sweep
   - scroll-progress bar under header
   ============================================================ */

/* Header gets a subtle glass + breathing border when scrolled */
.hdr {
  position: sticky;
  top: 0;
  z-index: 50;
  transition: background .35s ease, backdrop-filter .35s ease, box-shadow .35s ease, border-color .35s ease;
}
.hdr.scrolled {
  background: rgba(8, 9, 11, 0.78);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid rgba(212, 165, 32, 0.2);
  box-shadow:
    0 1px 0 0 rgba(255,248,224,.03) inset,
    0 8px 32px -8px rgba(0,0,0,.6),
    0 0 40px -10px rgba(240,208,96,.12);
}

/* Coin-drop layer (sits next to logo, can overflow) */
.coin-drop-layer {
  position: absolute;
  left: 0; top: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  overflow: visible;
  z-index: 0;
}
.coin-chip {
  position: absolute;
  left: 0; top: 0;
  width: 22px; height: 22px;
  border-radius: 50%;
  pointer-events: none;
  background: #1a1d23;
  box-shadow: 0 4px 14px -2px rgba(0,0,0,.55), 0 0 0 1px rgba(255,255,255,.06) inset;
  transform: translate3d(0,0,0) rotate(0deg);
  will-change: transform, opacity;
}
.coin-chip img {
  width: 100%; height: 100%;
  display: block; border-radius: 50%;
  -webkit-user-drag: none; user-select: none;
}

/* Burst flash where coin lands */
.coin-burst {
  position: absolute;
  left: 0; top: 0;
  width: 22px; height: 22px;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle, rgba(255,248,224,.9) 0%, rgba(240,208,96,.3) 40%, rgba(240,208,96,0) 70%);
  filter: blur(1px);
  will-change: transform, opacity;
}

/* Comet trail particles dropped behind a flying coin */
.coin-trail {
  position: absolute;
  left: 0; top: 0;
  width: 14px; height: 14px;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle,
    rgba(255,255,255,.55) 0%,
    rgba(255,255,255,.18) 45%,
    rgba(255,255,255,0) 75%);
  filter: blur(2px);
  mix-blend-mode: screen;
  will-change: transform, opacity, filter;
}

/* Magnetic hover: each letter follows the cursor via CSS variables --mx/--my */
.hdr.scrolled .logo .logo-crypto.magnetic-on span.letter-formed {
  transform: translate(var(--mx, 0px), var(--my, 0px));
  transition: transform .18s cubic-bezier(.2,.8,.2,1), text-shadow .35s ease;
}

/* Captcha widget */
.captcha-check {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
}
.captcha-check input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
}
.captcha-box {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
  font-size: 14px;
  color: #cbd5e1;
  transition: all .2s ease;
}
.captcha-box:hover {
  background: rgba(255,255,255,.05);
  border-color: rgba(255,255,255,.15);
}
.captcha-check input:checked + .captcha-box {
  border-color: #16a34a;
  background: rgba(22,163,74,.08);
}
.captcha-check input:checked + .captcha-box .captcha-text {
  color: #16a34a;
}
.captcha-spinner {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  opacity: 0;
  transition: all .3s ease;
}
.captcha-check input:checked + .captcha-box .captcha-spinner {
  opacity: 1;
  background: #16a34a;
  border: none;
  position: relative;
}
.captcha-check input:checked + .captcha-box .captcha-spinner::after {
  content: '[v] ';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 12px;
  font-weight: 600;
}

/* While coins haven't landed yet вЂ” keep individual letters hidden, but
   reserve their layout space (1ch each) so coins can target real positions. */
.hdr.scrolled .logo .logo-crypto.coins-pending span {
  opacity: 0;
  transform: none;
  transition: opacity .15s ease;
}
/* Letter becomes visible only after its coin lands */
.hdr.scrolled .logo .logo-crypto.coins-pending span.letter-formed {
  opacity: 1;
  transform: none;
  animation: letterPop .42s cubic-bezier(.34,1.56,.64,1) both;
}
@keyframes letterPop {
  0%   { transform: translateY(-6px) scale(.7); opacity: 0; filter: blur(1px); }
  60%  { transform: translateY(0)    scale(1.15); opacity: 1; filter: blur(0); }
  100% { transform: translateY(0)    scale(1);   opacity: 1; }
}

/* === Override v13 letters with richer entrance === */
.hdr .logo .logo-crypto {
  position: relative;
  display: inline-flex;
  gap: 1px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 1.5px;
  margin-left: 2px;
  pointer-events: none;
  white-space: nowrap;
  flex-shrink: 0;
  flex-direction: row;
}
.hdr .logo .logo-crypto span {
  --gx: 0;
  display: inline-block;
  position: relative;
  opacity: 0;
  width: 0;
  overflow: hidden;
  vertical-align: middle;
  transform: translateY(-14px) rotateX(-90deg) scale(.7);
  transform-origin: 50% 100%;
  transition:
    opacity .42s cubic-bezier(.2,.8,.2,1),
    transform .55s cubic-bezier(.34,1.56,.64,1),
    width .42s cubic-bezier(.2,.8,.2,1),
    text-shadow .35s ease,
    color .35s ease;
  filter: drop-shadow(0 0 0 transparent);
}

/* Subtle warm-glow ghost layers */
.hdr .logo .logo-crypto span::before,
.hdr .logo .logo-crypto span::after {
  content: attr(data-char);
  position: absolute; left: 0; top: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity .35s ease, transform .35s ease;
  -webkit-text-fill-color: initial;
  background: none;
}
.hdr .logo .logo-crypto span::before {
  color: #f0d060;
  transform: translate(-1px, 0);
  mix-blend-mode: screen;
}
.hdr .logo .logo-crypto span::after {
  color: #fff8e0;
  transform: translate(1px, 0);
  mix-blend-mode: screen;
}

/* Scramble flash class вЂ” toggled briefly by JS at reveal */
.hdr .logo .logo-crypto.scrambling span {
  animation: letterJitter .07s steps(2, end) infinite;
}
@keyframes letterJitter {
  0%   { transform: translate(0, 0); }
  50%  { transform: translate(.5px, -.5px); }
  100% { transform: translate(-.5px, .5px); }
}

/* === Scrolled state === */
.hdr.scrolled .logo .logo-crypto span {
  opacity: 1;
  width: 1ch;
  overflow: visible;
  transform: translateY(0) rotateX(0) scale(1);
}
.hdr.scrolled .logo .logo-crypto span::before,
.hdr.scrolled .logo .logo-crypto span::after {
  opacity: .35;
  animation: chromaShift 2.6s ease-in-out infinite;
}
.hdr.scrolled .logo .logo-crypto span::after {
  animation-delay: .6s;
}
@keyframes chromaShift {
  0%, 100% { transform: translate(-1px, 0); opacity: .35; }
  50%      { transform: translate(-2px, 0); opacity: .15; }
}

/* Letter delays вЂ” staggered "decoding" feel */
.hdr.scrolled .logo .logo-crypto span:nth-child(1) { transition-delay: .05s; }
.hdr.scrolled .logo .logo-crypto span:nth-child(2) { transition-delay: .12s; }
.hdr.scrolled .logo .logo-crypto span:nth-child(3) { transition-delay: .19s; }
.hdr.scrolled .logo .logo-crypto span:nth-child(4) { transition-delay: .26s; }
.hdr.scrolled .logo .logo-crypto span:nth-child(5) { transition-delay: .33s; }
.hdr.scrolled .logo .logo-crypto span:nth-child(6) { transition-delay: .40s; }

/* Subtle gold glow when scrolled */
.hdr.scrolled .logo .logo-crypto span {
  filter: drop-shadow(0 0 6px rgba(240,208,96,.4)) drop-shadow(0 0 14px rgba(240,208,96,.15));
}

/* Gold shimmer sweep across whole word */
.hdr .logo .logo-crypto::after {
  content: '';
  position: absolute;
  left: -20%; top: 0; bottom: 0; width: 40%;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(240,208,96,.0) 30%,
    rgba(255,248,224,.6) 50%,
    rgba(240,208,96,.0) 70%,
    transparent 100%);
  transform: translateX(-100%) skewX(-18deg);
  opacity: 0;
  pointer-events: none;
  filter: blur(2px);
  mix-blend-mode: overlay;
}
.hdr .logo .logo-crypto.shimmer-once::after {
  animation: letterShimmer 1.6s cubic-bezier(.2,.6,.2,1) 0s 1;
}
@keyframes letterShimmer {
  0%   { transform: translateX(-50%) skewX(-18deg); opacity: 0; }
  20%  { opacity: .9; }
  100% { transform: translateX(280%) skewX(-18deg); opacity: 0; }
}

/* Logo mark -- premium crown with ambient glow */
.hdr .logo-mark {
  display: inline-flex;
  position: relative;
  width: 28px; height: 28px;
  transform: rotateY(0deg);
  transition: transform .8s cubic-bezier(.34, 1.56, .64, 1), filter .5s ease;
  transform-style: preserve-3d;
  will-change: transform, filter;
  filter: drop-shadow(0 0 4px rgba(240,208,96,.35));
  animation: crownBreath 3s ease-in-out infinite;
}
.hdr .logo:hover .logo-mark {
  filter: drop-shadow(0 0 14px rgba(240,208,96,.7)) drop-shadow(0 0 28px rgba(240,208,96,.25));
  animation: none;
}
.hdr.scrolled .logo-mark {
  transform: rotateY(-360deg);
}

/* Reduced motion вЂ” keep it simple */
@media (prefers-reduced-motion: reduce) {
  .hdr.scrolled .logo-mark { transform: none; }
  .hdr.scrolled .logo .logo-crypto::after { animation: none; opacity: 0; }
  .hdr .logo .logo-crypto span { transition: opacity .2s, width .2s; transform: none; }
  .hdr.scrolled .logo .logo-crypto span { transform: none; }
  .hdr.scrolled .logo .logo-crypto span::before,
  .hdr.scrolled .logo .logo-crypto span::after { animation: none; opacity: 0; }
  .coin-chip { display: none; }
}

/* ====== COMPACT FOOTER v2 ====== */
.footer-compact { padding: 0; }
.footer-top {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 40px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.footer-brand-col { display: flex; flex-direction: column; gap: 12px; }
.footer-tagline {
  color: rgba(255,255,255,0.4);
  font-size: 12.5px;
  line-height: 1.5;
  margin: 0;
}
.footer-columns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.footer-col-toggle {
  display: none; /* hidden on desktop */
  background: none; border: none; color: rgba(255,255,255,0.45);
  font-size: 14px; text-transform: none; letter-spacing: 0;
  font-weight: 600; padding: 0; cursor: pointer;
  width: 100%; text-align: left;
  align-items: center; justify-content: space-between;
}
.footer-col-toggle svg { transition: transform .2s; }
.footer-col.open .footer-col-toggle svg { transform: rotate(180deg); }
/* v3-cleaned */ .footer-col-list {
  list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 8px;
}
.footer-col-list li { font-size: 13px; color: rgba(255,255,255,0.45); line-height: 1.4; }
.footer-col-list a {
  color: rgba(255,255,255,0.55);
  text-decoration: none;
  transition: color .15s;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.footer-col-list a:hover { color: #fff; }
.footer-col-list .muted { color: rgba(255,255,255,0.3); font-size: 12px; }
/* Column headers on desktop */
/* ::before headers removed вЂ” toggle buttons handle column titles */
.footer-col::before { display: none !important; }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 16px;
  font-size: 11.5px;
  color: rgba(255,255,255,0.25);
}
.footer-bottom-left { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }
.footer-legal-note { opacity: .7; }
.footer-bottom-right { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.soc2-badge-mini {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: rgba(255,255,255,0.4);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
  cursor: help;
}
.soc2-badge-mini svg { color: #22c55e; }
.footer-bottom .footer-banners {
  display: flex; gap: 8px; align-items: center;
  opacity: .4; transition: opacity .2s;
  margin: 0;
}
.footer-bottom .footer-banners:hover { opacity: 1; }
.footer-bottom .footer-banners img { display: block; border-radius: 2px; height: 24px; width: auto; }

/* Mobile footer accordion */
@media (max-width: 768px) {
  .footer { padding: 28px 0 16px !important; margin-top: 36px !important; }
  .footer-top { grid-template-columns: 1fr; gap: 20px; }
  .footer-brand-col { text-align: center; align-items: center; }
  .footer-columns { grid-template-columns: 1fr; gap: 0; }
  .footer-col { border-bottom: 1px solid rgba(255,255,255,0.06); }
  .footer-col:last-child { border-bottom: none; }
  .footer-col::before { display: none; }
  .footer-col-toggle {
    display: flex;
    padding: 14px 0;
    font-size: 12px;
  }
  /* v3-cleaned */ .footer-col-list {
    margin: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height .3s ease, padding .3s ease;
    padding: 0;
  }
  .footer-col.open /* v3-cleaned */ .footer-col-list {
    max-height: 400px;
    padding-bottom: 14px;
  }
  .footer-bottom { flex-direction: column; align-items: center; text-align: center; gap: 8px; }
  .footer-bottom-right { flex-direction: column; gap: 8px; }
}

/* Inline icon base style */
.ico {
  display: inline-block;
  vertical-align: -2px;
  flex-shrink: 0;
}

/* ====== CONVERTO ON-RAMP PAGE ====== */
.onramp.hero {
  background:
    radial-gradient(900px 360px at 75% 0%, rgba(34,197,94,.14), transparent 62%),
    radial-gradient(700px 280px at 10% 10%, rgba(59,130,246,.08), transparent 58%),
    linear-gradient(180deg, rgba(255,255,255,.012), transparent 60%);
}
.onramp-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}
.onramp-badges span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 8px 13px;
  border-radius: 999px;
  background: rgba(255,255,255,.035);
  border: 1px solid var(--border);
  color: #d1fae5;
  font-size: 12.5px;
  font-weight: 600;
}
.onramp-section { padding-top: 56px; }
.onramp-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, .65fr);
  gap: 22px;
  align-items: start;
}
.onramp-widget-card,
.onramp-info-card {
  background: rgba(255,255,255,.035);
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: var(--shadow-lg);
}
.onramp-widget-card {
  overflow: hidden;
}
.onramp-widget-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 24px 24px 16px;
  border-bottom: 1px solid var(--border);
}
.onramp-widget-head .ts-eyebrow {
  margin-bottom: 10px;
  padding: 5px 10px;
}
.onramp-widget-head h2,
.onramp-info-card h2 {
  margin: 0;
  font-size: 24px;
  letter-spacing: -.5px;
}
.onramp-live {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(34,197,94,.08);
  border: 1px solid rgba(34,197,94,.26);
  color: #86efac;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.onramp-live::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 12px rgba(34,197,94,.8);
}
#convertoCalc {
  display: block;
  width: 100%;
  min-height: 690px;
  border: 0;
  background: #0b0f14;
}
.onramp-form {
  padding: 24px;
}
.onramp-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.onramp-field {
  display: grid;
  gap: 8px;
}
.onramp-field-wide {
  grid-column: 1 / -1;
}
.onramp-field span,
.onramp-check span {
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
}
.onramp-field input,
.onramp-field select {
  width: 100%;
  min-height: 48px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(5,8,13,.72);
  color: var(--text);
  padding: 0 14px;
  outline: none;
}
.onramp-field input:focus,
.onramp-field select:focus {
  border-color: rgba(34,197,94,.55);
  box-shadow: 0 0 0 3px rgba(34,197,94,.10);
}
.onramp-check {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 10px;
  align-items: start;
  margin-top: 18px;
}
.onramp-check input {
  margin-top: 2px;
  accent-color: #22c55e;
}
.onramp-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}
.onramp-status {
  margin-bottom: 18px;
  padding: 13px 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  font-size: 13.5px;
  line-height: 1.45;
}
.onramp-status-info {
  background: rgba(59,130,246,.09);
  border-color: rgba(59,130,246,.26);
  color: #bfdbfe;
}
.onramp-status-success {
  background: rgba(34,197,94,.09);
  border-color: rgba(34,197,94,.28);
  color: #bbf7d0;
}
.onramp-status-warn {
  background: rgba(245,158,11,.09);
  border-color: rgba(245,158,11,.28);
  color: #fde68a;
}
.onramp-status-error {
  background: rgba(239,68,68,.09);
  border-color: rgba(239,68,68,.28);
  color: #fecaca;
}
.onramp-info-card {
  padding: 26px;
  position: sticky;
  top: 72px;
}
.onramp-steps {
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
  display: grid;
  gap: 18px;
}
.onramp-steps li {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 14px;
  align-items: start;
}
.onramp-steps li > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: rgba(34,197,94,.10);
  border: 1px solid rgba(34,197,94,.28);
  color: #22c55e;
  font-size: 12px;
  font-weight: 800;
}
.onramp-steps b {
  display: block;
  margin-bottom: 4px;
  color: var(--text);
}
.onramp-steps p {
  margin: 0;
  color: var(--text-muted);
  font-size: 13.5px;
  line-height: 1.55;
}
.onramp-warning {
  margin-top: 24px;
  padding: 16px;
  border-radius: 15px;
  background: rgba(245,158,11,.08);
  border: 1px solid rgba(245,158,11,.24);
}
.onramp-warning b {
  display: block;
  margin-bottom: 6px;
  color: #fbbf24;
}
.onramp-warning p {
  margin: 0;
  color: #fde68a;
  font-size: 13px;
  line-height: 1.55;
}
.onramp-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}
.onramp-links a {
  padding: 8px 11px;
  border-radius: 999px;
  background: rgba(255,255,255,.035);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 12.5px;
}
.onramp-links a:hover {
  border-color: rgba(34,197,94,.35);
  color: #22c55e;
}
@media (max-width: 980px) {
  .onramp-layout { grid-template-columns: 1fr; }
  .onramp-info-card { position: static; }
}
@media (max-width: 640px) {
  .onramp-section { padding-top: 28px; }
  .onramp-widget-head { flex-direction: column; padding: 18px; }
  .onramp-widget-head h2,
  .onramp-info-card h2 { font-size: 21px; }
  #convertoCalc { min-height: 740px; }
  .onramp-form { padding: 18px; }
  .onramp-form-grid { grid-template-columns: 1fr; }
  .onramp-info-card { padding: 20px; }
  .onramp-steps li { grid-template-columns: 36px 1fr; gap: 12px; }
  .onramp-steps li > span { width: 36px; height: 36px; border-radius: 11px; font-size: 11px; }
}



/* === FOOTER MOBILE ADAPT v3 === */
.footer { background: #000 !important; padding: 32px 0 18px; border-top: 1px solid rgba(255,255,255,.04); }
.footer-compact { display: flex; flex-direction: column; gap: 24px; }
.footer-top { display: grid; grid-template-columns: minmax(220px, 1.2fr) repeat(3, minmax(0, 1fr)); gap: 32px; align-items: start; }
.footer-brand-col { display: flex; flex-direction: column; gap: 10px; }
.footer-tagline { color: rgba(226,232,240,.6); font-size: 13px; line-height: 1.5; margin: 0; }
.footer-columns { display: contents; }
.footer-col-toggle { background: none; border: none; color: #e2e8f0; font-weight: 600; font-size: 14px; padding: 0; display: flex; align-items: center; gap: 6px; cursor: default; pointer-events: none; }
.footer-col-toggle svg { display: none; }
.footer-col-list { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-direction: column; gap: 8px; }
.footer-col-list a { color: rgba(226,232,240,.7); font-size: 13.5px; text-decoration: none; }
.footer-col-list a:hover { color: #4ade80; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.06); color: rgba(226,232,240,.45); font-size: 12.5px; }
.footer-bottom-left, .footer-bottom-right { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }

/* Tablet */
@media (max-width: 900px) {
  .footer-top { grid-template-columns: 1fr 1fr; gap: 24px; }
  .footer-brand-col { grid-column: 1 / -1; }
}
/* Mobile вЂ” accordion */
@media (max-width: 640px) {
  .footer { padding: 28px 0 90px; }
  .footer-top { grid-template-columns: 1fr; gap: 4px; }
  .footer-brand-col { padding-bottom: 14px; border-bottom: 1px solid rgba(255,255,255,.05); }
  .footer-col {
    border-bottom: 1px solid rgba(255,255,255,.05);
    padding: 6px 0;
  }
  .footer-col-toggle {
    width: 100%;
    justify-content: space-between;
    padding: 12px 0;
    cursor: pointer;
    pointer-events: auto;
    font-size: 14px;
  }
  .footer-col-toggle svg { display: inline-block; transition: transform .2s; }
  .footer-col-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
  /* v3-cleaned */ .footer-col-list {
    margin: 0 0 8px;
    max-height: 0;
    overflow: hidden;
    transition: max-height .25s ease-out;
  }
  .footer-col-toggle[aria-expanded="true"] + /* v3-cleaned */ .footer-col-list {
    max-height: 600px;
  }
  .footer-col-list a { padding: 8px 0; display: block; font-size: 14px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 8px; padding-top: 14px; }
  .footer-bottom-left, .footer-bottom-right { gap: 10px; font-size: 11.5px; }
}

/* === HERO COVERAGE + FOOTER v4 (consolidated) === */
/* Make sure the hero (and its animated wave background) fully covers the
   exchange/calculator card on every screen size, so no grey body-background
   shows under the widget. */
.hero { min-height: clamp(620px, 78vh, 920px); }
.hero-bg { inset: 0; width: 100%; height: 100%; }
@media (min-width: 1280px) {
  .hero { min-height: clamp(680px, 70vh, 880px); }
}
@media (max-width: 980px) {
  .hero { min-height: auto; padding-bottom: 36px; }
  .hero-bg { background: var(--bg-2); }
}
@media (max-width: 640px) {
  .hero { min-height: auto; padding-bottom: 24px; }
}

/* Footer mobile v4: stable bottom padding, comfortable tap targets, no overflow */
@media (max-width: 768px) {
  .footer { padding: 28px 0 28px !important; margin-top: 28px !important; }
  .footer-bottom { padding-top: 14px; gap: 10px; }
  .footer-bottom, .footer-bottom-left, .footer-bottom-right { width: 100%; }
}
@media (max-width: 640px) {
  .footer { padding: 26px 0 24px !important; }
  .footer-top { grid-template-columns: 1fr; gap: 4px; }
  .footer-brand-col { text-align: left; align-items: flex-start; padding-bottom: 14px; border-bottom: 1px solid rgba(255,255,255,.06); }
  .footer-col { border-bottom: 1px solid rgba(255,255,255,.05); padding: 4px 0; }
  .footer-col-toggle {
    width: 100%;
    justify-content: space-between;
    padding: 12px 2px;
    font-size: 14px;
    font-weight: 600;
    color: #e2e8f0;
    cursor: pointer;
    pointer-events: auto;
  }
  .footer-col-toggle svg { display: inline-block; transition: transform .2s; }
  .footer-col-toggle[aria-expanded="true"] svg,
  .footer-col.open .footer-col-toggle svg { transform: rotate(180deg); }
  /* v3-cleaned */ .footer-col-list {
    margin: 0; padding: 0;
    max-height: 0; overflow: hidden;
    transition: max-height .25s ease-out, padding-bottom .25s ease-out;
  }
  .footer-col-toggle[aria-expanded="true"] + .footer-col-list,
  .footer-col.open /* v3-cleaned */ .footer-col-list {
    max-height: 600px;
    padding: 0 0 12px;
  }
  .footer-col-list a { display: block; padding: 10px 0; font-size: 14.5px; color: rgba(226,232,240,.78); }
  .footer-bottom {
    flex-direction: column; align-items: flex-start;
    text-align: left; gap: 10px; padding-top: 14px;
  }
  .footer-bottom-left, .footer-bottom-right { width: 100%; flex-wrap: wrap; gap: 10px; }
  .footer-bottom .footer-banners { opacity: .55; }
}

/* === HIW-TABS-V1 === */
.hiw-tabs { display: inline-flex; gap: 6px; padding: 6px; margin: 0 0 28px;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08);
  border-radius: 999px; }
.hiw-tab { appearance: none; border: 0; background: transparent; color: rgba(226,232,240,.7);
  font: 600 14px/1 'Inter', system-ui, sans-serif; padding: 10px 18px;
  border-radius: 999px; cursor: pointer; transition: background .18s ease, color .18s ease; }
.hiw-tab:hover { color: #fff; }
.hiw-tab.is-active { background: linear-gradient(135deg,#16a34a,#22c55e); color: #fff;
  box-shadow: 0 4px 14px rgba(22,163,74,.35); }
.hiw-panel { display: none; }
.hiw-panel.is-active { display: block; animation: hiwFade .25s ease-out both; }
@keyframes hiwFade { from{opacity:0; transform: translateY(6px);} to{opacity:1; transform:none;} }
@media (max-width: 640px){ .hiw-tabs { width: 100%; } .hiw-tab { flex: 1; padding: 11px 8px; font-size: 13.5px; } }

/* === HERO_GREY_FIX_V1 === */
/* Hero background must NOT show solid grey under the calculator.
   We make .hero-bg transparent so wave (canvas) draws over body's pure black,
   and apply min-height only when the hero actually contains the exchange widget. */
.hero-bg { background: transparent !important; }
.hero { min-height: 0; }
.hero:has(.exchange) { min-height: clamp(620px, 78vh, 920px); }
@media (max-width: 980px) {
  .hero:has(.exchange) { min-height: auto; padding-bottom: 36px; }
}
@media (max-width: 640px) {
  .hero:has(.exchange) { min-height: auto; padding-bottom: 24px; }
}
/* Defensive: kill grey backgrounds on the page-level wrappers used between
   hero and footer so #000 shows through. */
main, .page, .wrap, body { background: #000 !important; }
/* Section default backgrounds: only sections that explicitly opt-in carry a fill.
   Generic .ts-section / .section keep transparent so #000 shows. */
.ts-section, .section { background: transparent; }
/* When modal is open, ensure the page behind is fully covered, even if the
   modal is rendered in-flow on smaller breakpoints. */
.modal:not([hidden]) { background: rgba(0,0,0,.85); }
/* ===== PREMIUM KYC WIZARD ===== */
.kyc-docflow-premium {
  background: linear-gradient(145deg, #0a0f1e 0%, #0d1528 40%, #0a1020 100%);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(255,255,255,.03), 0 25px 60px -20px rgba(0,0,0,.5), 0 0 80px -30px rgba(56,189,248,.08);
}

.kd-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 28px 28px 0;
}
.kd-header-icon {
  flex-shrink: 0;
  width: 48px; height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(34,197,94,.15), rgba(56,189,248,.1));
  border: 1px solid rgba(56,189,248,.15);
  display: grid; place-items: center;
  color: #38bdf8;
}
.kd-header-text { flex: 1; }
.kd-title {
  font-size: 20px; font-weight: 700; letter-spacing: -.3px;
  color: #f1f5f9; margin-bottom: 4px;
}
.kd-subtitle {
  font-size: 13.5px; color: #94a3b8; line-height: 1.5;
}

.kd-progress {
  padding: 20px 28px 0;
}
.kd-progress-track {
  height: 4px; background: rgba(148,163,184,.12);
  border-radius: 99px; overflow: hidden;
}
.kd-progress-fill {
  height: 100%; width: 33%;
  background: linear-gradient(90deg, #22c55e, #38bdf8);
  border-radius: 99px;
  transition: width .4s cubic-bezier(.4,0,.2,1);
}
.kd-steps-label {
  margin-top: 8px; font-size: 12px; font-weight: 500;
  color: #64748b; text-transform: uppercase; letter-spacing: .8px;
}

.kd-body { padding: 24px 28px; }

.kd-step-num {
  font-size: 11px; font-weight: 700; letter-spacing: 1.5px;
  color: #38bdf8; text-transform: uppercase; margin-bottom: 8px;
}
.kd-step-title {
  font-size: 22px; font-weight: 700; letter-spacing: -.4px;
  color: #f8fafc; margin: 0 0 6px;
}
.kd-step-desc {
  font-size: 14px; color: #94a3b8; margin: 0 0 20px; line-height: 1.5;
}

/* Upload cards */
.kd-upload-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
}
.kd-upload-card {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 28px 16px 20px;
  background: rgba(15,23,42,.5);
  border: 1px dashed rgba(148,163,184,.2);
  border-radius: 16px;
  cursor: pointer; transition: all .25s;
  text-align: center; color: #94a3b8;
}
.kd-upload-card:hover {
  border-color: rgba(56,189,248,.4);
  background: rgba(56,189,248,.04);
  transform: translateY(-1px);
}
.kd-upload-icon { color: #475569; margin-bottom: 4px; transition: color .25s; }
.kd-upload-card:hover .kd-upload-icon { color: #38bdf8; }
.kd-upload-label { font-size: 15px; font-weight: 600; color: #e2e8f0; }
.kd-upload-hint { font-size: 12.5px; color: #64748b; }
.kd-upload-status { font-size: 12px; color: #475569; margin-top: 4px; transition: color .25s; }
.kd-upload-status.done { color: #22c55e; font-weight: 500; }

/* Face check */
.kd-face-grid {
  display: grid; grid-template-columns: minmax(280px,420px) 1fr; gap: 20px;
}
.kd-face-preview {
  background: #020617;
  border-radius: 18px;
  min-height: 320px;
  display: grid; place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.04);
}
.kd-face-preview video { width: 100%; height: 100%; object-fit: cover; display: none; }
.kd-face-placeholder {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  color: #475569; font-size: 14px;
}
.kd-face-actions { display: flex; flex-direction: column; gap: 10px; }

/* Buttons */
.kd-btn-primary, .kd-btn-secondary, .kd-btn-ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px; border-radius: 12px; font-size: 14px; font-weight: 600;
  border: none; cursor: pointer; transition: all .2s;
  font-family: inherit; letter-spacing: -.2px;
}
.kd-btn-primary {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #fff; box-shadow: 0 4px 14px rgba(22,163,74,.3);
}
.kd-btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(22,163,74,.4); }
.kd-btn-secondary {
  background: rgba(56,189,248,.1); color: #38bdf8;
  border: 1px solid rgba(56,189,248,.2);
}
.kd-btn-secondary:hover { background: rgba(56,189,248,.18); }
.kd-btn-ghost {
  background: transparent; color: #64748b; padding: 8px 12px; font-size: 13px;
}
.kd-btn-ghost:hover { color: #94a3b8; background: rgba(255,255,255,.03); }

.kd-selfie-status { font-size: 13px; color: #64748b; padding: 4px 0; }
.kd-selfie-status.done { color: #22c55e; }

.kd-liveness-badge {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 14px; border-radius: 12px;
  background: rgba(250,204,21,.06); border: 1px solid rgba(250,204,21,.15);
  font-size: 12.5px; color: #facc15; margin-top: 4px;
}

/* Review */
.kd-review { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.kd-review-item {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; border-radius: 12px;
  background: rgba(15,23,42,.6); font-size: 13.5px; color: #cbd5e1;
}
.kd-review-note {
  font-size: 12.5px; color: #64748b; padding: 8px 0; line-height: 1.5;
}

/* Consent */
.kd-consent {
  display: flex; align-items: flex-start; gap: 10px; cursor: pointer;
  font-size: 13px; color: #94a3b8; line-height: 1.5;
}
.kd-consent input { display: none; }
.kd-consent-check {
  flex-shrink: 0; width: 20px; height: 20px;
  border-radius: 6px; border: 1.5px solid rgba(148,163,184,.3);
  background: rgba(15,23,42,.5); margin-top: 1px;
  transition: all .2s;
}
.kd-consent input:checked + .kd-consent-check {
  background: #22c55e; border-color: #22c55e;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  background-position: center; background-repeat: no-repeat;
}

/* Footer */
.kd-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 28px;
  border-top: 1px solid rgba(255,255,255,.05);
  background: rgba(2,6,23,.4);
}
.kd-btn-back {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 16px; border-radius: 10px;
  background: transparent; color: #64748b;
  border: 1px solid transparent; font-size: 14px; font-weight: 500;
  cursor: pointer; transition: all .2s; font-family: inherit;
}
.kd-btn-back:hover { color: #94a3b8; background: rgba(255,255,255,.03); }

.kd-btn-action {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 28px; border-radius: 12px;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #fff; border: none; font-size: 14px; font-weight: 600;
  cursor: pointer; transition: all .25s; font-family: inherit;
  letter-spacing: -.2px;
  box-shadow: 0 4px 16px rgba(22,163,74,.25);
}
.kd-btn-action:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(22,163,74,.35); }
.kd-btn-action.kd-btn-submit {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  box-shadow: 0 4px 16px rgba(59,130,246,.3);
  padding: 14px 36px; font-size: 15px;
}
.kd-btn-action.kd-btn-submit:hover { box-shadow: 0 8px 28px rgba(59,130,246,.4); }

@media (max-width: 640px) {
  .kd-upload-grid { grid-template-columns: 1fr; }
  .kd-face-grid { grid-template-columns: 1fr; }
  .kd-face-preview { min-height: 240px; }
  .kd-header { padding: 20px 20px 0; }
  .kd-body { padding: 18px 20px; }
  .kd-footer { padding: 14px 20px; }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-4px); }
  40% { transform: translateX(4px); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(2px); }
}

/* === PWA BANNER MOBILE FIX === */
@media (max-width: 640px) {
  body:has(.cookie-banner) #saikyo-pwa-toast { bottom: 110px !important; }
}

.change-pro-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 10px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  transition: all .15s;
}
.change-pro-badge:hover {
  background: rgba(255,255,255,.10);
  border-color: rgba(255,255,255,.15);
}
.change-pro-badge img {
  width: 16px;
  height: 16px;
  border-radius: 3px;
}

/*  spinner */
.aml-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(134,142,150,0.2);
  border-top-color: #868e96;
  border-radius: 50%;
  animation: aml-spin 0.8s linear infinite;
  vertical-align: middle;
  margin-right: 6px;
}
@keyframes aml-spin { to { transform: rotate(360deg); } }


/* === SAIKYO polish: rounded glass header + crypto network fee note === */
.hdr {
  top: 10px !important;
  margin: 0 auto !important;
  width: min(1180px, calc(100% - 24px)) !important;
  border: 1px solid rgba(255,255,255,.08) !important;
  border-radius: 18px !important;
  background: rgba(8,12,22,.82) !important;
  box-shadow: 0 18px 50px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.05) !important;
  overflow: visible !important;
}
.hdr-row {
  height: 54px !important;
  padding: 0 14px !important;
}
.nav a {
  padding: 8px 10px !important;
  border-radius: 10px !important;
  transition: background .18s ease, color .18s ease, transform .18s ease !important;
}
.nav a:hover,
.nav a.active {
  background: rgba(34,197,94,.10) !important;
  color: #f8fafc !important;
  transform: translateY(-1px) !important;
}
.hdr-user,
.btn-login,
.btn-register {
  border-radius: 12px !important;
}
.ex-fee-note {
  margin-top: 10px;
  background: #1f1f22;
  border-left: 3px solid #f59e0b;
  border-radius: 6px;
  padding: 10px 14px;
  color: #d4d4d8;
  font-size: 0.85rem;
  line-height: 1.4;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.ex-fee-note svg {
  flex-shrink: 0;
  margin-top: 1px;
  color: #f59e0b;
}
@media (max-width: 768px) {
  .hdr { top: 6px !important; width: calc(100% - 14px) !important; border-radius: 16px !important; }
  .hdr-row { height: 50px !important; }
}

/* === SAIKYO polish: security banner spacing under rounded header === */
.system-banner {
  z-index: 20 !important;
  width: min(1120px, calc(100% - 24px)) !important;
  margin: 18px auto 18px !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
.system-banner .container {
  padding: 0 !important;
  max-width: none !important;
}
.banner-content {
  max-width: none !important;
  padding: 11px 14px !important;
  border-radius: 16px !important;
  border: 1px solid rgba(245,158,11,.18) !important;
  background: linear-gradient(135deg, rgba(245,158,11,.10), rgba(239,68,68,.055)) !important;
  box-shadow: 0 12px 34px rgba(0,0,0,.20), inset 0 1px 0 rgba(255,255,255,.04) !important;
}
.banner-icon {
  width: 26px !important;
  height: 26px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 999px !important;
  background: rgba(245,158,11,.14) !important;
  opacity: 1 !important;
}
.banner-text {
  color: rgba(254,226,226,.86) !important;
}
.banner-text a {
  color: inherit !important;
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(254,226,226,.45);
}
.banner-text a:hover { text-decoration-color: currentColor; }
.banner-close {
  border-radius: 999px !important;
  background: rgba(255,255,255,.04) !important;
}
.hero {
  padding-top: 6px !important;
}
@media (max-width: 768px) {
  .system-banner { width: calc(100% - 14px) !important; margin: 12px auto 14px !important; }
  .banner-content { align-items: flex-start !important; padding: 10px 12px !important; border-radius: 14px !important; }
  .banner-text { font-size: 12px !important; }
}

/* ====== NAV: Omega Wallet (отдельный продукт) ====== */
.nav a.nav-accent {
  color: #c4b5fd !important;
  font-weight: 600 !important;
  white-space: nowrap !important;
  padding: 7px 13px !important;
  border: 1px solid rgba(167,139,250,.38) !important;
  border-radius: 999px !important;
  background: rgba(139,92,246,.12) !important;
}
.nav a.nav-accent:hover,
.nav a.nav-accent.active {
  color: #ddd3ff !important;
  border-color: rgba(167,139,250,.62) !important;
  background: rgba(139,92,246,.20) !important;
}
@media (max-width: 900px) {
  .nav.nav-open { gap: 4px !important; padding: 10px 14px 14px !important; }
  .nav.nav-open a { font-size: 14px !important; padding: 11px 12px !important; }
  .nav.nav-open a.nav-accent { text-align: center !important; margin-top: 4px !important; }
}

/* ====== HEADER: stable layout, no overflow (logged-in nav) ====== */
.hdr-row { gap: 10px !important; }
.hdr-row .logo { margin-right: 14px !important; }
.hdr .logo .logo-crypto { min-width: calc(6ch + 5px); }
.hdr-row .nav { flex: 1 1 auto; min-width: 0; gap: 4px !important; flex-wrap: nowrap; }
.nav a { white-space: nowrap; padding: 7px 9px !important; }
.nav a:hover, .nav a.active { transform: none !important; }
.hdr-actions { flex-shrink: 0; }
.hdr-user { white-space: nowrap; }
.hdr-user > span:not(.hdr-user-ava):not(.tag) { max-width: 140px; overflow: hidden; text-overflow: ellipsis; }
@media (min-width: 1081px) { .nav a.nav-auth { display: none !important; } }
@media (max-width: 1280px) { .hdr-user > span:not(.hdr-user-ava):not(.tag) { max-width: 90px; } .nav a { padding: 7px 7px !important; } }

/* OW_NOTE_NEUTRAL_V1 */
.ex-fee-note.ow-note { background: transparent; border-left: 0; border-radius: 0; padding: 2px 0 0; margin-top: 6px; color: #8b8b93; font-size: 0.78rem; }
.ex-fee-note.ow-note svg { display: none; }

/* HDR_MOBILE_FIT_V1 — header must fit 360-430px screens with lang switch + auth buttons + burger */
@media (max-width: 520px) {
  .hdr-row { gap: 6px !important; }
  .hdr .logo .logo-crypto { display: none !important; }
  .hdr-actions { gap: 5px !important; flex-shrink: 1; min-width: 0; }
  .hdr-actions .btn, .hdr-actions .btn-sm { padding: 6px 8px !important; font-size: 11px !important; white-space: nowrap; }
  .sk-lang-switch { font-size: 11px; white-space: nowrap; }
  .hamburger { flex-shrink: 0; }
}
@media (max-width: 380px) {
  .hdr-actions .btn-ghost { display: none !important; }
}
