:root {
  --bg: #00050a;
  --bg2: #050a15;
  --surface: rgba(8, 16, 32, 0.92);
  --surface2: rgba(12, 24, 48, 0.85);
  --text: #f0f6ff;
  --muted: #8ba3c7;
  --accent: #00b4ff;
  --accent2: #007bff;
  --accent-soft: rgba(0, 180, 255, 0.12);
  --danger: #ff5c7a;
  --ok: #00e5a0;
  --border: rgba(0, 180, 255, 0.18);
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  --glow: 0 0 28px rgba(0, 180, 255, 0.28);
  --radius: 16px;
  --radius-lg: 22px;
  --font: "Sora", system-ui, sans-serif;
  --font-display: "Sora", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  background: var(--bg2);
  color-scheme: dark;
  overflow-x: hidden;
  max-width: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  background:
    radial-gradient(900px 420px at 15% -5%, rgba(0, 123, 255, 0.18), transparent 58%),
    radial-gradient(700px 360px at 100% 0%, rgba(0, 242, 255, 0.08), transparent 55%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg2) 100%);
  background-color: var(--bg2);
  color: var(--text);
  line-height: 1.55;
  min-height: 100vh;
  min-height: 100dvh;
  min-height: -webkit-fill-available;
  overflow-x: hidden;
  max-width: 100%;
}

body::before,
body::after {
  content: "";
  position: fixed;
  pointer-events: none;
  z-index: 0;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.45;
}

body::before {
  width: min(420px, 100vw);
  height: 420px;
  top: -80px;
  right: 0;
  background: rgba(0, 123, 255, 0.22);
}

body::after {
  width: min(360px, 100vw);
  height: 360px;
  bottom: -80px;
  left: 0;
  background: rgba(0, 242, 255, 0.12);
}

a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: #0369a1; }

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 max(1.25rem, env(safe-area-inset-right, 0px)) 0 max(1.25rem, env(safe-area-inset-left, 0px));
  position: relative;
  z-index: 1;
  width: 100%;
}

.site-header {
  border-bottom: 1px solid var(--border);
  background: rgba(5, 10, 21, 0.92);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  gap: 1rem;
}

.brand {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand em,
.brand span.brand-accent { color: var(--accent); font-style: normal; }

.nav-links {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  align-items: center;
}

.nav-links a {
  color: var(--muted);
  font-size: 0.9rem;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
}

.nav-links a:hover {
  color: var(--text);
  background: rgba(15, 23, 42, 0.04);
  text-decoration: none;
}

.nav-links a.nav-pay {
  border: 1px solid rgba(2, 132, 199, 0.18);
  background: var(--accent-soft);
  color: #0369a1;
}

.nav-actions { display: flex; gap: 0.55rem; align-items: center; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.62rem 1.15rem;
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.15s, box-shadow 0.2s;
}

.btn:hover { transform: translateY(-1px); }

.btn-primary {
  background: linear-gradient(135deg, #00c6ff 0%, #0072ff 100%);
  color: #fff;
  box-shadow: 0 10px 28px rgba(0, 114, 255, 0.35);
}

.btn-ghost {
  background: rgba(8, 16, 32, 0.55);
  border-color: var(--border);
  color: var(--text);
}

.btn-sm { padding: 0.45rem 0.95rem; font-size: 0.85rem; }

.hero { padding: 4rem 0 2rem; }

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 2rem;
  align-items: start;
}

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .nav-links { display: none; }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.4rem 0.85rem 0.4rem 0.45rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--muted);
  font-size: 0.82rem;
  margin-bottom: 1.1rem;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
}

.hero-badge .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.12);
}

.hero-badge-anon {
  background: linear-gradient(135deg, #ecfeff 0%, #eef2ff 100%);
  border-color: rgba(2, 132, 199, 0.2);
  color: #0369a1;
  font-weight: 600;
}

.hero-badge-anon .dot {
  background: #0284c7;
  box-shadow: 0 0 0 4px rgba(2, 132, 199, 0.12);
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  line-height: 1.08;
  margin: 0 0 1rem;
  letter-spacing: -0.03em;
}

.hero h1 span {
  background: linear-gradient(135deg, #0f172a 0%, #0284c7 50%, #4f46e5 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-lead {
  color: var(--muted);
  max-width: 560px;
  margin: 0 0 1.6rem;
  font-size: 1.05rem;
}

.hero-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.stat {
  padding: 0.9rem 1rem;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

.stat .k {
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.stat .v { margin-top: 0.25rem; font-size: 1.15rem; font-weight: 700; }

.rates-section {
  margin: 2.5rem 0 2rem;
}

.rates-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.rates-head h2 {
  margin: 0;
  font-size: 1.45rem;
  letter-spacing: -0.02em;
}

.rates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.85rem;
}

.rate-tile {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.05rem;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
  transition: transform 0.2s, box-shadow 0.2s;
}

.rate-tile:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.08);
}

.rate-tile .top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
}

.rate-tile .code {
  font-weight: 700;
  font-size: 1rem;
}

.rate-tile .name {
  color: var(--muted);
  font-size: 0.78rem;
}

.rate-tile .rub {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.rate-tile .usdt {
  color: var(--muted);
  font-size: 0.82rem;
  margin-top: 0.15rem;
}

.rate-tile .chg {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
}

.chg-up { color: var(--ok); background: rgba(5, 150, 105, 0.1); }
.chg-down { color: var(--danger); background: rgba(225, 29, 72, 0.08); }
.chg-flat { color: var(--muted); background: rgba(100, 116, 139, 0.1); }

.anon-banner {
  margin: 2.5rem 0;
  padding: 1.6rem 1.5rem;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(2, 132, 199, 0.16);
  background: linear-gradient(135deg, #f0f9ff 0%, #ffffff 55%, #f5f3ff 100%);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.06);
}

.anon-inner {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 1.5rem;
  align-items: start;
}

@media (max-width: 800px) {
  .anon-inner { grid-template-columns: 1fr; }
}

.anon-kicker {
  margin: 0 0 0.35rem;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #0284c7;
  font-weight: 700;
}

.anon-banner h2 {
  margin: 0 0 0.65rem;
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 3vw, 2rem);
  letter-spacing: -0.02em;
}

.anon-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.65rem;
}

.anon-list li {
  padding: 0.75rem 0.9rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--border);
  color: #334155;
  font-size: 0.92rem;
}

.anon-list strong { color: #0f172a; }

.privacy-note {
  margin: 0.85rem 0 0;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.5;
}

.legal-inline-note {
  margin: 0.55rem 0 0;
  padding: 0.65rem 0.75rem;
  border-radius: 12px;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  font-size: 0.88rem;
  color: #065f46;
  line-height: 1.5;
}

.legal-inline-note a {
  color: #047857;
  font-weight: 600;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin: 2rem 0;
}

@media (max-width: 800px) {
  .feature-grid { grid-template-columns: 1fr; }
  .hero-stats { grid-template-columns: 1fr; }
}

.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.3rem;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.04);
  transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.08);
}

.card-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  margin-bottom: 0.85rem;
  background: var(--accent-soft);
  font-size: 1.1rem;
}

.card h3 { margin: 0 0 0.5rem; font-size: 1.08rem; }
.card p { margin: 0; color: var(--muted); font-size: 0.92rem; }

.sheet {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  max-width: 440px;
  box-shadow: var(--shadow);
}

.auth-wrap { padding: 3rem 0 4rem; max-width: 480px; }

.auth-wrap h1 {
  font-family: var(--font-display);
  font-size: 2rem;
  margin: 0 0 0.45rem;
}

.form { display: grid; gap: 0.95rem; }

.form label {
  display: grid;
  gap: 0.4rem;
  font-size: 0.88rem;
  color: var(--muted);
}

.form input,
.form select,
.form textarea {
  width: 100%;
  padding: 0.72rem 0.85rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  font: inherit;
}

.form input:focus,
.form select:focus,
.form textarea:focus {
  outline: none;
  border-color: rgba(2, 132, 199, 0.45);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.12);
}

.msg { padding: 0.7rem 0.85rem; border-radius: 12px; font-size: 0.9rem; }
.msg-ok { background: rgba(5, 150, 105, 0.1); color: var(--ok); }
.msg-err { background: rgba(225, 29, 72, 0.08); color: var(--danger); }
.hidden { display: none !important; }
.hint { color: var(--muted); font-size: 0.86rem; }

.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.85rem;
  margin-bottom: 0.25rem;
}

.wallet-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin: 1rem 0 0.85rem;
}

/* --- Wallet balance carousel (bank-style) --- */
.wallet-carousel {
  margin-bottom: 0.35rem;
}
.wallet-carousel-viewport {
  position: relative;
  touch-action: pan-y;
}
.wallet-carousel-track {
  position: relative;
  min-height: 15.5rem;
}
.wallet-carousel-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.wallet-carousel-slide.is-active {
  opacity: 1;
  visibility: visible;
  position: relative;
}
.wallet-card {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  padding: 0;
  min-height: 10.5rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.28);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.wallet-card-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.wallet-card-art {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center right;
}
.wallet-card-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(115deg, rgba(5, 10, 21, 0.88) 0%, rgba(5, 10, 21, 0.45) 42%, rgba(5, 10, 21, 0.2) 100%),
    linear-gradient(180deg, transparent 35%, rgba(5, 10, 21, 0.55) 100%);
  pointer-events: none;
}
.wallet-card-body {
  position: relative;
  z-index: 1;
  padding: 1.15rem 1.1rem 1.05rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-height: 100%;
}
.wallet-code-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
  padding: 0.45rem 0.55rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(5, 10, 21, 0.42);
  backdrop-filter: blur(6px);
}
.wallet-code-label {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(240, 246, 255, 0.62);
  white-space: nowrap;
}
.wallet-code-copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-left: auto;
  padding: 0.28rem 0.45rem 0.28rem 0.55rem;
  border-radius: 10px;
  border: 1px solid rgba(0, 242, 255, 0.22);
  background: rgba(0, 180, 255, 0.1);
  color: #f0f6ff;
  cursor: pointer;
  max-width: calc(100% - 4.5rem);
}
.wallet-code-copy-btn:active {
  transform: scale(0.98);
}
.wallet-code-value {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 9.5rem;
}
.wallet-code-copy-label {
  font-size: 0.68rem;
  font-weight: 700;
  color: rgba(240, 246, 255, 0.78);
  white-space: nowrap;
}
.wallet-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 0.22;
  background: radial-gradient(circle at 85% 15%, rgba(255, 255, 255, 0.22), transparent 42%);
  pointer-events: none;
}
.wallet-card-rub {
  background: linear-gradient(135deg, #064e3b 0%, #059669 42%, #0a1628 100%);
}
.wallet-card-usdt {
  background: linear-gradient(135deg, #0c4a6e 0%, #0891b2 45%, #0a1628 100%);
}
.wallet-card-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(5, 10, 21, 0.28);
  color: rgba(240, 246, 255, 0.88);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.wallet-card-amount {
  margin-top: 0.55rem;
  font-size: clamp(1.65rem, 6vw, 2.15rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: #f0f6ff;
}
.wallet-card-sub {
  margin: 0.35rem 0 0;
  font-size: 0.82rem;
  color: rgba(240, 246, 255, 0.72);
}
.wallet-card-sub strong {
  color: #f0f6ff;
  font-weight: 700;
}
.wallet-slide-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
}
.wallet-slide-actions .btn {
  min-height: 48px;
}
.wallet-carousel-prev,
.wallet-carousel-next {
  position: absolute;
  top: 38%;
  transform: translateY(-50%);
  z-index: 2;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(5, 10, 21, 0.55);
  color: rgba(240, 246, 255, 0.9);
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0.85;
}
.wallet-carousel-prev { left: 0.35rem; }
.wallet-carousel-next { right: 0.35rem; }
.wallet-carousel-dots {
  display: flex;
  justify-content: center;
  gap: 0.4rem;
  margin-top: 0.55rem;
}
.wallet-carousel-dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 999px;
  border: none;
  padding: 0;
  background: rgba(148, 163, 184, 0.35);
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease;
}
.wallet-carousel-dot.is-active {
  width: 1.15rem;
  background: var(--accent);
}
@media (min-width: 801px) {
  .wallet-carousel-prev,
  .wallet-carousel-next {
    opacity: 1;
  }
  [data-panel="wallet"] .wallet-carousel {
    width: 50%;
    max-width: 50%;
    min-width: 360px;
  }
  .wallet-carousel-track {
    min-height: 0;
  }
  .wallet-card {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    aspect-ratio: 16 / 9;
    min-height: 0;
    width: 100%;
  }
  .wallet-card-media {
    position: absolute;
    inset: 0;
    min-height: 0;
    border-left: none;
  }
  .wallet-card-art {
    position: absolute;
    inset: 0;
    object-fit: cover;
    object-position: center right;
  }
  .wallet-card-shade {
    background:
      linear-gradient(115deg, rgba(5, 10, 21, 0.84) 0%, rgba(5, 10, 21, 0.42) 44%, rgba(5, 10, 21, 0.12) 100%),
      linear-gradient(180deg, transparent 32%, rgba(5, 10, 21, 0.52) 100%);
  }
  .wallet-card-body {
    justify-content: flex-end;
    min-height: 100%;
    background: none;
  }
  .wallet-card-rub {
    background: linear-gradient(135deg, #064e3b 0%, #059669 42%, #0a1628 100%);
  }
  .wallet-card-usdt {
    background: linear-gradient(135deg, #0c4a6e 0%, #0891b2 45%, #0a1628 100%);
  }
  .wallet-code-value {
    max-width: 13rem;
  }
  .wallet-card-amount {
    font-size: clamp(1.85rem, 2.4vw, 2.35rem);
  }
  .wallet-carousel-prev,
  .wallet-carousel-next {
    top: 44%;
  }
}
@media (max-width: 800px) {
  .wallet-carousel-prev,
  .wallet-carousel-next {
    display: none;
  }
  [data-panel="wallet"] .panel-title {
    margin-bottom: 0.45rem;
  }
  [data-panel="wallet"] #userNickHint {
    margin-bottom: 0.55rem !important;
    font-size: 0.82rem;
  }
  .wallet-carousel {
    margin-left: -0.35rem;
    margin-right: -0.35rem;
  }
  .wallet-carousel-track {
    min-height: clamp(26rem, 62vh, 30rem);
  }
  .wallet-card {
    min-height: clamp(18.5rem, 52vh, 22rem);
    border-radius: 24px;
  }
  .wallet-card-body {
    padding: 1.15rem 1rem 1.15rem;
    gap: 0.55rem;
  }
  .wallet-code-row {
    padding: 0.55rem 0.62rem;
    margin-bottom: 0.15rem;
  }
  .wallet-code-value {
    font-size: 0.88rem;
    max-width: 11rem;
  }
  .wallet-code-copy-label {
    font-size: 0.72rem;
  }
  .wallet-card-amount {
    font-size: clamp(2.25rem, 11vw, 3rem);
    margin-top: 0.35rem;
  }
  .wallet-card-sub {
    font-size: 0.92rem;
  }
  .wallet-card-badge {
    font-size: 0.74rem;
    padding: 0.24rem 0.65rem;
  }
  .wallet-slide-actions .btn {
    min-height: 54px;
    font-size: 1rem;
  }
  .wallet-carousel-dot.is-active {
    width: 1.45rem;
  }
  [data-panel="wallet"] .privacy-note,
  [data-panel="wallet"] .legal-inline-note {
    font-size: 0.78rem;
  }
}

.metric {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1rem;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
}

.metric .label {
  color: var(--muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.metric .value { font-size: 1.35rem; font-weight: 700; margin-top: 0.25rem; }

.table-wrap { overflow: auto; }

table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

table.data th,
table.data td {
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

table.data th {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
}

.badge {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.74rem;
  background: var(--surface2);
}

.badge-buy { color: var(--ok); }
.badge-sell { color: var(--accent); }

.app-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: calc(100vh - 72px);
  position: relative;
  z-index: 1;
}

@media (max-width: 800px) {
  .app-layout { grid-template-columns: 1fr; }
  .side { border-right: none; border-bottom: 1px solid var(--border); }
}

.side {
  border-right: 1px solid var(--border);
  padding: 1.2rem;
  background: rgba(255, 255, 255, 0.72);
}

.side nav { display: grid; gap: 0.35rem; }

.side nav button {
  text-align: left;
  background: transparent;
  border: none;
  color: var(--muted);
  padding: 0.65rem 0.75rem;
  border-radius: 12px;
  cursor: pointer;
  font: inherit;
}

.side nav button.is-active {
  background: var(--accent-soft);
  color: #0369a1;
}

.side nav .side-rules-link {
  display: block;
  text-align: left;
  text-decoration: none;
  background: transparent;
  border: none;
  color: var(--muted);
  padding: 0.65rem 0.75rem;
  border-radius: 12px;
  font: inherit;
}

.side nav .side-rules-link:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.5);
}

.main-panel { padding: 1.4rem 1.5rem 2rem; }

.panel-title {
  margin: 0 0 1rem;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}

footer.site-foot {
  border-top: 1px solid var(--border);
  padding: 1.75rem 0 calc(2rem + env(safe-area-inset-bottom, 0px));
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 1rem;
}

/* PWA install */
.pwa-install {
  position: fixed;
  left: 0.85rem;
  right: 0.85rem;
  bottom: calc(0.85rem + env(safe-area-inset-bottom, 0px));
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-radius: 16px;
  border: 1px solid rgba(2, 132, 199, 0.18);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.12);
  backdrop-filter: blur(12px);
}

.pwa-install p {
  margin: 0;
  font-size: 0.86rem;
  color: var(--muted);
  line-height: 1.35;
}

.pwa-install strong { color: var(--text); display: block; margin-bottom: 0.15rem; }

.pwa-install-actions {
  display: flex;
  gap: 0.35rem;
  flex-shrink: 0;
}

/* Auth app screen */
body.auth-app {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

body.auth-app .site-header {
  background: transparent;
  border-bottom: none;
}

.auth-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: min(100%, 420px);
  margin: 0 auto;
  padding: 1rem 1.25rem calc(2rem + env(safe-area-inset-bottom, 0px));
}

.auth-brand {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 6vw, 2.2rem);
  font-weight: 650;
  text-align: center;
  margin-bottom: 0.35rem;
}

.auth-brand em { color: var(--accent); font-style: normal; }

.auth-tagline {
  text-align: center;
  color: var(--muted);
  margin: 0 0 1.25rem;
  font-size: 0.95rem;
}

.auth-screen .sheet {
  max-width: none;
  width: 100%;
}

.input-lg,
.form .input-lg {
  padding: 0.95rem 1rem;
  font-size: 1.05rem;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem;
  margin-bottom: 1rem;
  padding: 0.25rem;
  border-radius: 14px;
  background: rgba(0, 8, 20, 0.55);
  border: 1px solid var(--border);
}

.auth-tabs button {
  border: none;
  background: transparent;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.55rem 0.65rem;
  border-radius: 10px;
  color: var(--muted);
  cursor: pointer;
}

.auth-tabs button.is-active {
  background: rgba(0, 123, 255, 0.22);
  color: var(--accent);
  box-shadow: none;
}

.auth-panel.hidden { display: none !important; }

.code-input {
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.email-code-input {
  text-align: center;
  font-size: 1.35rem;
  letter-spacing: 0.35em;
  text-transform: none;
}

.btn-block { width: 100%; }
.btn-lg { padding: 0.85rem 1.2rem; font-size: 1rem; min-height: 48px; }

.auth-alt {
  margin-top: 1rem;
  font-size: 0.88rem;
  color: var(--muted);
}

.auth-alt summary {
  cursor: pointer;
  color: var(--accent);
  margin-bottom: 0.65rem;
}

.code-reveal {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 14px;
  background: #ecfeff;
  border: 1px dashed rgba(2, 132, 199, 0.35);
  text-align: center;
}

.code-reveal .value {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin: 0.35rem 0 0.65rem;
  word-break: break-all;
}

/* Mobile landing menu */
.nav-toggle {
  display: none;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 12px;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font: inherit;
}

.mobile-nav {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(5, 10, 21, 0.55);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.mobile-nav.is-open {
  display: block;
}

.mobile-nav-panel {
  position: absolute;
  top: 0;
  left: 0;
  width: min(86vw, 320px);
  height: 100%;
  background: var(--surface);
  padding: calc(1rem + env(safe-area-inset-top, 0px)) 1rem calc(1rem + env(safe-area-inset-bottom, 0px));
  padding-left: max(1rem, env(safe-area-inset-left, 0px));
  box-shadow: 12px 0 40px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  transform: translateX(-102%);
  transition: transform 0.22s ease;
}

.mobile-nav.is-open .mobile-nav-panel {
  transform: translateX(0);
}

.mobile-nav-panel a,
.mobile-nav-panel button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.75rem 0.85rem;
  border-radius: 12px;
  border: none;
  background: transparent;
  color: var(--text);
  font: inherit;
  text-decoration: none;
}

.mobile-nav-panel a:hover,
.mobile-nav-panel button:hover {
  background: rgba(15, 23, 42, 0.05);
}

.mobile-nav-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

/* App shell / mobile cabinet */
body.app-shell {
  min-height: 100dvh;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

body.app-shell.drawer-open {
  overflow: hidden;
}

body.nav-open,
body.has-public-nav.drawer-open {
  overflow: hidden;
}

body.app-shell .site-header .brand { font-size: 1.25rem; }
body.app-shell #whoami {
  display: none;
}

.app-nav {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.5rem;
}

.drawer-toggle {
  display: none;
  min-width: 42px;
  padding: 0.45rem 0.55rem;
}

.app-panel-title {
  display: none;
  font-weight: 700;
  font-size: 0.95rem;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-drawer {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  visibility: hidden;
}

.app-drawer.is-open {
  display: block;
  pointer-events: auto;
  visibility: visible;
}

.app-drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.22s ease;
}

.app-drawer.is-open .app-drawer-backdrop {
  opacity: 1;
}

.app-drawer-panel {
  position: absolute;
  top: 0;
  left: 0;
  width: min(88vw, 300px);
  height: 100%;
  background: #fff;
  padding: 1rem 1rem calc(1rem + env(safe-area-inset-bottom, 0px));
  box-shadow: 12px 0 40px rgba(15, 23, 42, 0.14);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  transform: translateX(-102%);
  transition: transform 0.22s ease;
}

.app-drawer.is-open .app-drawer-panel {
  transform: translateX(0);
}

.app-drawer-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.25rem;
}

.drawer-user {
  margin: 0 0 0.5rem;
  font-size: 0.82rem;
  line-height: 1.35;
}

.drawer-nav {
  display: grid;
  gap: 0.3rem;
  flex: 1;
  overflow: auto;
}

.drawer-nav button {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  color: var(--text);
  padding: 0.72rem 0.8rem;
  border-radius: 12px;
  font: inherit;
  font-size: 0.92rem;
  cursor: pointer;
}

.drawer-nav button .ico {
  width: 1.35rem;
  text-align: center;
  font-size: 1rem;
}

.drawer-nav button.is-active {
  background: var(--accent-soft);
  color: #0369a1;
  font-weight: 600;
}

.drawer-nav .drawer-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  text-align: left;
  padding: 0.72rem 0.8rem;
  border-radius: 12px;
  font-size: 0.92rem;
  color: var(--text);
  text-decoration: none;
}

.drawer-nav .drawer-link .ico {
  width: 1.35rem;
  text-align: center;
  font-size: 1rem;
}

.drawer-nav .drawer-link:hover {
  background: rgba(15, 23, 42, 0.05);
}

.drawer-nav .drawer-link.is-active {
  background: var(--accent-soft);
  color: #0369a1;
  font-weight: 600;
}

.drawer-foot {
  display: grid;
  gap: 0.45rem;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.drawer-download-block {
  margin-top: 0.65rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--border);
}

.drawer-link-download {
  display: flex !important;
  align-items: center;
  gap: 0.65rem;
  padding: 0.75rem 0.85rem !important;
  border-radius: 12px;
  border: 1px solid rgba(0, 242, 255, 0.28) !important;
  background: linear-gradient(
    135deg,
    rgba(0, 180, 255, 0.12),
    rgba(5, 10, 21, 0.92)
  ) !important;
}

.drawer-download-text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  line-height: 1.25;
}

.drawer-download-text strong {
  font-size: 0.92rem;
  color: var(--text);
}

.drawer-download-text small {
  font-size: 0.72rem;
  color: var(--muted);
}

.mobile-nav-download {
  display: flex !important;
  align-items: center;
  gap: 0.65rem;
  margin: 0.35rem 0 0.5rem;
  padding: 0.75rem 0.85rem !important;
  border-radius: 12px;
  border: 1px solid rgba(0, 242, 255, 0.28);
  background: linear-gradient(
    135deg,
    rgba(0, 180, 255, 0.12),
    rgba(15, 23, 42, 0.95)
  );
  font-weight: 700;
  color: var(--text);
}

.mobile-nav-download:hover {
  border-color: rgba(0, 242, 255, 0.45);
  background: linear-gradient(
    135deg,
    rgba(0, 180, 255, 0.18),
    rgba(15, 23, 42, 0.98)
  );
}

.mobile-nav-download .nav-dl-ico {
  flex: 0 0 1.5rem;
  font-size: 1.2rem;
  line-height: 1;
}

.mobile-nav-download .nav-dl-body {
  display: flex;
  flex-direction: column;
  gap: 0.08rem;
  min-width: 0;
}

.mobile-nav-download strong {
  font-size: 0.92rem;
  font-weight: 700;
}

.mobile-nav-download small {
  font-size: 0.72rem;
  font-weight: 500;
  opacity: 0.78;
}

.app-layout {
  padding-bottom: calc(52px + env(safe-area-inset-bottom, 0px));
}

.mobile-controls {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 90;
  pointer-events: auto;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  padding: 0.2rem max(0.15rem, env(safe-area-inset-right, 0px)) calc(0.25rem + env(safe-area-inset-bottom, 0px)) max(0.15rem, env(safe-area-inset-left, 0px));
  background: rgba(5, 10, 21, 0.98);
  border-top: 1px solid var(--border);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.35);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.mobile-controls.mobile-tabbar button {
  border: none;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.54rem;
  font-weight: 600;
  padding: 0.2rem 0.08rem;
  border-radius: 8px;
  min-height: 44px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.1rem;
  cursor: pointer;
  min-width: 0;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.mobile-controls.mobile-tabbar button .lbl {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.1;
}

.mobile-controls.mobile-tabbar button.ctrl-menu {
  color: var(--text);
}

.mobile-controls button {
  border: none;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.54rem;
  font-weight: 600;
  padding: 0.25rem 0.1rem;
  border-radius: 8px;
  min-height: 44px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.12rem;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.mobile-controls button .ico {
  font-size: 1.05rem;
  line-height: 1;
}

.mobile-controls button.is-active {
  color: #0369a1;
  background: var(--accent-soft);
}

.mobile-controls button.ctrl-primary {
  color: #fff;
  background: linear-gradient(135deg, #0ea5e9 0%, #6366f1 100%);
  box-shadow: 0 8px 18px rgba(14, 165, 233, 0.22);
}

.mobile-controls button.ctrl-primary.is-active {
  color: #fff;
}

.mobile-controls a.public-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.12rem;
  min-height: 44px;
  padding: 0.25rem 0.1rem;
  border-radius: 8px;
  font-size: 0.54rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--muted);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.mobile-controls a.public-nav-item .ico {
  font-size: 1.05rem;
  line-height: 1;
}

.mobile-controls a.public-nav-item.is-active {
  color: #0369a1;
  background: var(--accent-soft);
}

.mobile-controls a.public-nav-item.ctrl-primary {
  color: #fff;
  background: linear-gradient(135deg, #0ea5e9 0%, #6366f1 100%);
  box-shadow: 0 8px 18px rgba(14, 165, 233, 0.22);
}

.mobile-controls a.public-nav-item.ctrl-primary.is-active {
  color: #fff;
}

body.has-public-nav {
  padding-bottom: calc(52px + env(safe-area-inset-bottom, 0px));
}

body.has-public-nav .site-foot {
  padding-bottom: calc(2rem + env(safe-area-inset-bottom, 0px));
}

body.has-public-nav.auth-app .auth-screen {
  padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
}

@media (max-width: 800px) {
  body.has-public-nav .mobile-controls.public-nav {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  }

  body.has-public-nav .site-header .container.nav.public-nav-bar {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 0.5rem;
  }

  body.has-public-nav .drawer-toggle {
    display: inline-flex;
  }
}

.legal-page {
  padding: 2rem 0 1.5rem;
  max-width: 920px;
}

.legal-doc {
  padding: 1.85rem 1.65rem 2rem;
}

.legal-doc h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.5vw, 2.65rem);
  margin: 0 0 0.75rem;
  letter-spacing: -0.02em;
}

.legal-doc h2 {
  font-size: 1.22rem;
  margin: 1.65rem 0 0.7rem;
  color: #0f172a;
}

.legal-doc p {
  margin: 0 0 0.9rem;
  color: #334155;
  font-size: 1.05rem;
  line-height: 1.72;
}

.legal-kicker {
  margin: 0 0 0.45rem;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #0284c7;
  font-weight: 700;
}

.legal-updated {
  margin-bottom: 1.25rem !important;
  font-size: 1rem !important;
  line-height: 1.65 !important;
}

.legal-list {
  margin: 0.5rem 0 1rem;
  padding-left: 1.35rem;
  color: #334155;
  font-size: 1.05rem;
  line-height: 1.68;
}

.legal-list li { margin-bottom: 0.55rem; }

.legal-callout {
  border-radius: 14px;
  padding: 1rem 1.1rem;
  margin: 0 0 1.15rem;
  font-size: 1.05rem;
  line-height: 1.68;
  color: #334155;
}

.legal-callout strong {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 1.08rem;
  color: #0f172a;
}

.legal-callout-accent {
  background: #e0f2fe;
  border: 1px solid #7dd3fc;
}

.legal-callout-secure {
  background: #ecfdf5;
  border: 1px solid #6ee7b7;
}

.legal-footer-note {
  margin-top: 1.75rem !important;
  font-size: 0.98rem !important;
  line-height: 1.65 !important;
}

.legal-toc {
  margin: 0 0 1.35rem;
  padding: 1rem 1.1rem;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.65);
}

.legal-toc-title {
  margin: 0 0 0.65rem;
  font-size: 1rem;
  color: #0f172a;
}

.legal-toc ol {
  margin: 0;
  padding-left: 1.25rem;
  color: #334155;
  font-size: 0.98rem;
  line-height: 1.65;
}

.legal-toc a {
  color: #0369a1;
  text-decoration: none;
}

.legal-toc a:hover {
  text-decoration: underline;
}

.legal-table-wrap {
  overflow-x: auto;
  margin: 0.75rem 0 1rem;
}

.legal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  line-height: 1.5;
  color: #334155;
}

.legal-table th,
.legal-table td {
  border: 1px solid #cbd5e1;
  padding: 0.55rem 0.65rem;
  text-align: left;
  vertical-align: top;
}

.legal-table th {
  background: #f1f5f9;
  color: #0f172a;
  font-weight: 700;
}

.legal-table tbody tr:nth-child(even) {
  background: rgba(241, 245, 249, 0.55);
}

.legal-doc h3 {
  font-size: 1.05rem;
  margin: 1.15rem 0 0.55rem;
  color: #0f172a;
}

.legal-example {
  margin: 0.65rem 0 1rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: 1px dashed #94a3b8;
  background: #f8fafc;
  font-size: 0.98rem;
  line-height: 1.6;
  color: #334155;
}

.legal-example strong {
  color: #0f172a;
}

.nav-links a.is-active {
  color: #0369a1;
  background: var(--accent-soft);
}

.site-foot a {
  color: var(--accent);
  text-decoration: none;
}

.site-foot a:hover { text-decoration: underline; }

@media (max-width: 800px) {
  .legal-page { padding: 1.25rem 0 0.5rem; }
  .legal-doc { padding: 1.15rem 1rem 1.35rem; }
}

.wallet-actions .btn {
  flex: 1 1 calc(50% - 0.4rem);
  min-height: 48px;
}

.user-code-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0 0 0.85rem;
  padding: 0.55rem 0.75rem;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--border);
  font-size: 0.82rem;
  color: var(--muted);
  flex-wrap: wrap;
}

.user-code-chip code {
  font-family: ui-monospace, Consolas, monospace;
  color: var(--text);
  font-weight: 700;
  letter-spacing: 0.05em;
}

@media (max-width: 900px) {
  .hero { padding: 2.25rem 0 1.5rem; }
  .hero-actions .btn { flex: 1 1 calc(50% - 0.4rem); min-height: 48px; }
  .rates-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .anon-banner { padding: 1.15rem; margin: 1.75rem 0; }
  .container { padding: 0 1rem; }
  .nav { min-height: 60px; }
  .nav-actions .btn-ghost { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav .brand { margin-right: auto; }
  body.auth-app.has-public-nav .nav-actions { display: none; }
}

@media (max-width: 800px) {
  .app-layout {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .side { display: none; }

  .drawer-toggle { display: inline-flex; }

  .app-panel-title { display: block; }

  body.app-shell .site-header .brand {
    display: none;
  }

  body.app-shell .app-nav {
    grid-template-columns: auto 1fr auto;
  }

  body.app-shell .nav-actions {
    display: none;
  }

  .mobile-controls { display: grid; }

  .wallet-rates-section { display: none; }

  .main-panel {
    padding: 1rem 1rem 0.5rem;
  }

  .sheet { max-width: none !important; width: 100%; }

  table.data { font-size: 0.8rem; }
  table.data th,
  table.data td { padding: 0.55rem 0.45rem; }

  .metrics {
    grid-template-columns: 1fr 1fr;
  }

  .metrics .metric:last-child {
    grid-column: 1 / -1;
  }

  [data-panel="rates"] .rates-grid {
    grid-template-columns: 1fr 1fr;
  }

  [data-panel="history"] .card {
    border-radius: 14px;
  }

  .rates-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 420px) {
  .rates-grid { grid-template-columns: 1fr; }
  .hero-stats { grid-template-columns: 1fr; }
  .metrics { grid-template-columns: 1fr; }
  .metrics .metric:last-child { grid-column: auto; }
}

.p2p-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.p2p-stats-grid .label {
  display: block;
  font-size: 0.72rem;
  color: var(--muted);
  margin-bottom: 0.2rem;
}

.p2p-stats-grid strong {
  font-size: 1rem;
}

.warn-hint { color: #b45309; }
.ok-hint { color: #047857; }

.review-modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.review-modal.hidden {
  display: none;
}

.review-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
}

.review-modal-panel {
  position: relative;
  width: min(100%, 480px);
  margin: 0;
  border-radius: 18px 18px 0 0;
  padding: 1.25rem 1.25rem calc(1.25rem + env(safe-area-inset-bottom, 0px));
  background: #fff;
  box-shadow: 0 -12px 40px rgba(15, 23, 42, 0.12);
}

.review-votes {
  display: flex;
  gap: 0.5rem;
}

.review-vote.is-active {
  color: #0369a1;
  background: var(--accent-soft);
  border-color: #7dd3fc;
}

.review-modal textarea {
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  font: inherit;
  resize: vertical;
}

@media (max-width: 560px) {
  .p2p-stats-grid {
    grid-template-columns: 1fr;
  }
}

.apk-download-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 1rem 0 1.25rem;
  padding: 1rem 1.1rem;
  border-radius: 14px;
  border: 1px solid rgba(0, 242, 255, 0.22);
  background: linear-gradient(135deg, rgba(0, 242, 255, 0.08), rgba(79, 70, 229, 0.06));
}

@media (max-width: 560px) {
  .apk-download-card {
    flex-direction: column;
    align-items: stretch;
  }
  .apk-download-card .btn {
    width: 100%;
  }
}

.p2p-insurance-layout {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
}

.p2p-insurance-form {
  max-width: 260px;
  margin: 0;
}

.p2p-insurance-card {
  border: 1px solid rgba(0, 242, 255, 0.18);
  background: linear-gradient(135deg, rgba(0, 242, 255, 0.06), rgba(79, 70, 229, 0.05));
}

.p2p-trust-cell {
  min-width: 8.5rem;
}

.p2p-trust-label {
  font-size: 0.72rem;
  color: var(--muted);
}

.p2p-trust-meta {
  margin-top: 0.2rem;
  font-size: 0.72rem;
}

@media (max-width: 560px) {
  .p2p-insurance-form {
    max-width: none;
    width: 100%;
  }
}

.shop-panel {
  animation: shopFadeIn 0.35s ease;
}

@keyframes shopFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.shop-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem 1.25rem;
  padding: 1.35rem 1.25rem;
  margin-bottom: 1.15rem;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(56, 189, 248, 0.28) 0%, transparent 55%),
    radial-gradient(90% 120% at 0% 100%, rgba(129, 140, 248, 0.22) 0%, transparent 50%),
    linear-gradient(135deg, #0c4a6e 0%, #0369a1 42%, #0284c7 100%);
  color: #f8fafc;
  box-shadow: 0 22px 50px rgba(2, 132, 199, 0.22);
}

.shop-hero-kicker {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 700;
  color: rgba(224, 242, 254, 0.92);
}

.shop-hero-title {
  margin: 0 0 0.45rem;
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 3.5vw, 1.85rem);
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.shop-hero-lead {
  margin: 0;
  max-width: 36rem;
  font-size: 0.92rem;
  line-height: 1.55;
  color: rgba(241, 245, 249, 0.88);
}

.shop-hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-self: center;
}

.shop-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.38rem 0.72rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(8px);
}

.shop-pill-soft {
  background: rgba(15, 23, 42, 0.12);
  border-color: rgba(255, 255, 255, 0.14);
}

.shop-segment {
  display: inline-flex;
  gap: 0.25rem;
  padding: 0.28rem;
  margin-bottom: 1.15rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--border);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.shop-segment-btn,
.shop-tabs .btn {
  border: none;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.55rem 1.05rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}

.shop-segment-btn.is-active,
.shop-tabs .btn.is-active {
  color: #0c4a6e;
  background: #fff;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.15);
}

.shop-section-head {
  margin-bottom: 0.85rem;
}

.shop-section-head h3 {
  margin: 0 0 0.2rem;
  font-size: 1.08rem;
  color: #0f172a;
}

.shop-section-head .hint {
  margin: 0;
}

.session-notice {
  position: fixed;
  left: max(0.65rem, env(safe-area-inset-left, 0px));
  right: max(0.65rem, env(safe-area-inset-right, 0px));
  top: calc(52px + env(safe-area-inset-top, 0px));
  z-index: 85;
  padding: 0.65rem 0.85rem;
  border-radius: 12px;
  border: 1px solid rgba(250, 204, 21, 0.35);
  background: rgba(66, 32, 6, 0.92);
  color: #fef9c3;
  font-size: 0.82rem;
  line-height: 1.4;
  text-align: center;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.25);
}

.session-notice.hidden {
  display: none !important;
}

body.app-shell.drawer-open .session-notice,
body.app-shell .session-notice {
  top: calc(56px + env(safe-area-inset-top, 0px));
}

.shop-categories {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.shop-category-featured {
  grid-column: 1 / -1;
  --shop-accent: #eab308;
  border-color: rgba(234, 179, 8, 0.42) !important;
  box-shadow:
    0 0 0 1px rgba(234, 179, 8, 0.12),
    0 18px 42px rgba(202, 138, 4, 0.16);
}

.shop-category-featured:hover {
  border-color: rgba(250, 204, 21, 0.55) !important;
  box-shadow:
    0 0 0 1px rgba(234, 179, 8, 0.2),
    0 22px 48px rgba(202, 138, 4, 0.22);
}

.shop-category-badge {
  position: absolute;
  top: 0.55rem;
  left: 0.55rem;
  z-index: 3;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #fef9c3;
  background: rgba(113, 63, 18, 0.72);
  border: 1px solid rgba(250, 204, 21, 0.45);
  backdrop-filter: blur(6px);
}

.shop-category-featured .shop-category-img {
  height: 132px;
}

.shop-category-featured .shop-category-body {
  padding: 0.7rem 0.85rem 0.85rem;
}

.shop-category-featured .shop-category-body strong {
  font-size: 1.08rem;
  line-height: 1.2;
}

.shop-category-featured .shop-category-meta {
  font-size: 0.78rem;
}

.shop-category-featured .shop-category-arrow {
  top: auto;
  bottom: 0.7rem;
  right: 0.75rem;
  width: 2rem;
  height: 2rem;
  font-size: 1rem;
  background: rgba(113, 63, 18, 0.72);
  border: 1px solid rgba(250, 204, 21, 0.35);
}

@media (min-width: 640px) {
  .shop-category-featured .shop-category-img {
    height: 168px;
  }

  .shop-category-featured .shop-category-body strong {
    font-size: 1.18rem;
  }
}

.shop-cat-featured { --shop-accent: #eab308; }

.shop-category-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
  padding: 0;
  text-align: left;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  font: inherit;
  color: inherit;
  position: relative;
  overflow: hidden;
}

.shop-category-has-img {
  min-height: 100%;
}

.shop-category-has-img::before {
  display: none;
}

.shop-category-card:not(.shop-category-has-img) {
  flex-direction: row;
  align-items: center;
  gap: 0.75rem;
  padding: 0.95rem 0.9rem;
}

.shop-category-card:not(.shop-category-has-img)::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--shop-accent, #0284c7);
  border-radius: 4px 0 0 4px;
}

.shop-category-img {
  display: block;
  width: 100%;
  height: 88px;
  object-fit: cover;
  object-position: center;
  transition: transform 0.28s ease;
}

@media (min-width: 640px) {
  .shop-category-img {
    height: 96px;
  }
}

.shop-category-has-img .shop-category-body {
  padding: 0.55rem 0.65rem 0.65rem;
}

.shop-category-has-img .shop-category-arrow {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  width: 1.65rem;
  height: 1.65rem;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(5, 10, 21, 0.55);
  backdrop-filter: blur(6px);
  color: #fff;
  font-size: 0.85rem;
}

.shop-category-card:hover .shop-category-img {
  transform: scale(1.05);
}

.shop-category-card:hover {
  border-color: rgba(2, 132, 199, 0.35);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.08);
  transform: translateY(-2px);
}

.shop-cat-0 { --shop-accent: #0284c7; }
.shop-cat-1 { --shop-accent: #4f46e5; }
.shop-cat-2 { --shop-accent: #059669; }
.shop-cat-3 { --shop-accent: #d97706; }
.shop-cat-4 { --shop-accent: #db2777; }
.shop-cat-5 { --shop-accent: #0891b2; }
.shop-cat-6 { --shop-accent: #7c3aed; }
.shop-cat-7 { --shop-accent: #ca8a04; }

.shop-category-icon {
  flex: 0 0 auto;
  width: 2.5rem;
  height: 2.5rem;
  display: grid;
  place-items: center;
  font-size: 1.25rem;
  border-radius: 14px;
  background: color-mix(in srgb, var(--shop-accent) 12%, white);
}

.shop-category-body {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
}

.shop-category-has-img .shop-category-body strong {
  font-size: 0.84rem;
}

.shop-category-has-img .shop-category-meta {
  font-size: 0.72rem;
}

.shop-category-body strong {
  display: block;
  font-size: 0.92rem;
  line-height: 1.25;
}

.shop-category-meta {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.75rem;
  color: var(--muted);
}

.shop-category-arrow {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 1rem;
  transition: transform 0.18s ease, color 0.18s ease;
}

.shop-category-card:hover .shop-category-arrow {
  color: var(--shop-accent);
  transform: translateX(2px);
}

.shop-toolbar h3 {
  margin: 0.15rem 0 0;
  font-size: 1.15rem;
}

.shop-back-btn {
  border: none;
  background: none;
  padding: 0;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
  cursor: pointer;
}

.shop-back-btn:hover {
  text-decoration: underline;
}

.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.9rem;
}

.shop-grid-compact {
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

.shop-product-card {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 1rem;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.04);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.shop-product-card:hover {
  transform: translateY(-2px);
  border-color: rgba(2, 132, 199, 0.22);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}

.shop-product-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.shop-product-tag {
  display: inline-flex;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  color: #0369a1;
  background: #e0f2fe;
}

.shop-product-stock {
  font-size: 0.72rem;
  color: var(--muted);
}

.shop-product-card h4 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.35;
  color: #0f172a;
}

.shop-product-desc {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.shop-product-foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.65rem;
  margin-top: auto;
  padding-top: 0.35rem;
}

.shop-product-price {
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.2;
}

.shop-product-seller {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--muted);
}

.shop-buy-btn {
  white-space: nowrap;
  border-radius: 12px;
  min-width: 5.5rem;
}

.shop-own-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
}

.shop-sell-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 1rem;
  align-items: start;
}

.shop-form-card {
  padding: 1.15rem 1.1rem 1.25rem;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.05);
}

.shop-form-head h3 {
  margin: 0 0 0.25rem;
  font-size: 1.08rem;
}

.shop-form-head .hint {
  margin: 0 0 0.85rem;
}

.shop-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.shop-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: #334155;
}

.shop-field-wide {
  grid-column: 1 / -1;
}

.shop-field input,
.shop-field select,
.shop-field textarea {
  font-weight: 500;
}

.shop-fee-banner {
  margin: 0.85rem 0 0.95rem;
  padding: 0.75rem 0.85rem;
  border-radius: 14px;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
  font-size: 0.84rem;
  line-height: 1.45;
}

.shop-submit-btn {
  min-height: 48px;
  border-radius: 14px;
}

.shop-my-block {
  min-width: 0;
}

.shop-orders-list {
  display: grid;
  gap: 0.85rem;
}

.shop-order-card {
  padding: 1rem 1.05rem;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

.shop-order-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
}

.shop-order-id {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
}

.shop-order-card h4 {
  margin: 0 0 0.25rem;
  font-size: 1rem;
}

.shop-order-meta {
  margin: 0 0 0.75rem;
  font-size: 0.82rem;
  color: var(--muted);
}

.shop-order-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
}

.shop-order-price {
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
}

.shop-order-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.shop-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.24rem 0.58rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.2;
}

.shop-badge-wait {
  color: #92400e;
  background: #fef3c7;
}

.shop-badge-info {
  color: #1d4ed8;
  background: #dbeafe;
}

.shop-badge-ok {
  color: #047857;
  background: #d1fae5;
}

.shop-badge-off {
  color: #64748b;
  background: #f1f5f9;
}

.shop-badge-neutral {
  color: #475569;
  background: #e2e8f0;
}

.shop-empty {
  text-align: center;
  padding: 2.2rem 1rem;
  border-radius: 20px;
  border: 1px dashed rgba(2, 132, 199, 0.25);
  background: rgba(240, 249, 255, 0.65);
}

.shop-empty-icon {
  font-size: 2rem;
  margin-bottom: 0.35rem;
}

.shop-empty strong {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 1rem;
}

.shop-empty .hint {
  margin: 0 auto;
  max-width: 22rem;
}

.shop-goods-pre {
  white-space: pre-wrap;
  word-break: break-word;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.85rem;
  margin: 0;
  max-height: 320px;
  overflow: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.82rem;
}

@media (max-width: 900px) {
  .shop-sell-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .shop-hero {
    padding: 1.1rem 1rem;
  }

  .shop-segment {
    display: flex;
    width: 100%;
  }

  .shop-segment-btn {
    flex: 1 1 0;
    padding-inline: 0.55rem;
    font-size: 0.82rem;
  }

  .shop-form-grid {
    grid-template-columns: 1fr;
  }

  .shop-grid,
  .shop-grid-compact {
    grid-template-columns: 1fr;
  }

  .shop-categories {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .shop-category-img {
    height: 82px;
  }

  .shop-category-featured .shop-category-img {
    height: 120px;
  }
}

/* --- MonvexPay brand dark theme overrides --- */
.card,
.sheet,
.stat,
.rate-tile,
.hero-badge,
.mobile-nav-panel,
.pwa-install,
.auth-screen .sheet,
.legal-doc,
.shop-card,
.shop-hero,
.deal-card,
.chat-panel,
.metric,
.table-wrap,
.app-drawer-panel,
.side {
  background: var(--surface) !important;
  border-color: var(--border) !important;
  color: var(--text);
  box-shadow: var(--shadow);
}

.hero-badge,
.stat,
.rate-tile,
.hero-badge-anon {
  background: rgba(8, 16, 32, 0.72) !important;
}

.hero-badge-anon {
  border-color: rgba(0, 180, 255, 0.28) !important;
  color: var(--accent) !important;
}

.hero h1 span,
.mp-headline span {
  background: linear-gradient(135deg, #ffffff 0%, #00f2ff 55%, #007bff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.anon-banner,
.anon-inner,
.feature-grid .card,
.legal-callout,
.legal-callout-accent,
.privacy-note,
.code-reveal,
.user-code-chip {
  background: rgba(8, 16, 32, 0.78) !important;
  border-color: var(--border) !important;
}

.anon-list strong,
.legal-doc h2,
.legal-doc h3,
.panel-title,
.shop-card h3 {
  color: var(--text) !important;
}

.form input,
.form select,
.form textarea,
.input-lg,
.auth-tabs button,
.tab,
.shop-segment-btn,
.drawer-nav button,
.side button {
  background: rgba(0, 8, 20, 0.55) !important;
  color: var(--text) !important;
  border-color: var(--border) !important;
}

.form input:focus,
.form select:focus,
.form textarea:focus,
.input-lg:focus {
  border-color: rgba(0, 242, 255, 0.55) !important;
  box-shadow: 0 0 0 3px rgba(0, 180, 255, 0.15) !important;
}

.mobile-controls,
.public-nav,
.app-bottom-nav {
  background: rgba(5, 10, 21, 0.94) !important;
  border-color: var(--border) !important;
}

.site-foot {
  border-top: 1px solid var(--border);
  color: var(--muted);
}

/* Landing */
.mp-hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 2rem;
  align-items: center;
  padding: 2.5rem 0 1.5rem;
}

@media (max-width: 960px) {
  .mp-hero { grid-template-columns: 1fr; }
  .mp-hero-visual { order: -1; }
}

.mp-logo-lockup {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-bottom: 1.2rem;
}

.mp-logo-lockup img { width: 58px; height: 58px; }

.mp-wordmark {
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  font-weight: 800;
  letter-spacing: 0.08em;
}

.mp-wordmark span { color: var(--accent); }

.mp-tagline {
  margin: 0.2rem 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.mp-headline {
  margin: 0 0 1.2rem;
  font-size: clamp(1.8rem, 4.5vw, 2.75rem);
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.mp-features {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
  display: grid;
  gap: 0.85rem;
}

.mp-feature {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 0.75rem;
  align-items: start;
}

.mp-feature .ico {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  color: var(--accent);
  filter: drop-shadow(0 0 8px rgba(0, 242, 255, 0.35));
}

.mp-feature strong {
  display: block;
  margin-bottom: 0.15rem;
}

.mp-feature span {
  color: var(--muted);
  font-size: 0.92rem;
}

.mp-hero-visual img {
  width: 100%;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow), var(--glow);
}

.mp-security {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
  padding: 0.55rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(0, 123, 255, 0.08);
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.mp-exchange {
  margin: 2rem 0;
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background:
    radial-gradient(circle at top right, rgba(0, 180, 255, 0.12), transparent 45%),
    rgba(8, 16, 32, 0.88);
  box-shadow: var(--shadow);
}

.mp-exchange h2 {
  margin: 0 0 0.5rem;
  font-size: 1.45rem;
}

.mp-exchange p { margin: 0; color: var(--muted); }

.mp-exchange-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1rem;
}

.mp-footer-band {
  margin: 2rem 0 1rem;
  padding: 1.25rem 0;
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

@media (max-width: 760px) {
  .mp-footer-band { grid-template-columns: 1fr; }
}

.mp-pay-icons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.65rem;
}

.mp-pay-icons span {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  background: rgba(0, 8, 20, 0.55);
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--accent);
}

.mp-mini-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
}

.mp-mini {
  padding: 0.75rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(0, 8, 20, 0.45);
  font-size: 0.82rem;
  color: var(--muted);
}

.mp-mini strong {
  display: block;
  color: var(--text);
  margin-bottom: 0.15rem;
}

.auth-brand {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
}

.auth-tagline {
  text-align: center;
  color: var(--muted);
  margin: 0 0 1rem;
}

.auth-screen .sheet {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow), var(--glow);
}

.nav-links a.nav-pay {
  border-color: rgba(0, 180, 255, 0.28);
  background: rgba(0, 123, 255, 0.12);
  color: var(--accent);
}

/* --- Mobile compact app (iOS / Android browser + PWA) --- */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body.app-shell,
body.has-public-nav,
body.auth-app {
  padding-top: env(safe-area-inset-top, 0px);
  -webkit-tap-highlight-color: transparent;
}

.btn,
.side-nav button,
.drawer-nav button,
.side nav button,
.mobile-controls button,
.mobile-controls a,
.mobile-nav-panel a {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.review-modal.hidden {
  display: none !important;
  pointer-events: none !important;
}

@media (max-width: 800px) {
  .container {
    padding: 0 max(0.65rem, env(safe-area-inset-right, 0px)) 0 max(0.65rem, env(safe-area-inset-left, 0px));
  }

  .site-header .nav {
    min-height: 48px;
    padding-left: 0.15rem;
    padding-right: 0.15rem;
  }

  .site-header .container {
    padding: 0 max(0.65rem, env(safe-area-inset-right, 0px)) 0 max(0.65rem, env(safe-area-inset-left, 0px));
  }

  .app-layout {
    position: relative;
    z-index: 2;
    min-height: calc(100dvh - 48px);
  }

  .main-panel {
    padding: 0.65rem 0.7rem 0.35rem;
  }

  .panel-title {
    font-size: 1.1rem;
    margin-bottom: 0.65rem;
  }

  .card,
  .sheet,
  .panel,
  .metric,
  .rate-tile,
  .auth-screen .sheet {
    padding: 0.75rem !important;
    border-radius: 12px !important;
  }

  .metrics {
    gap: 0.45rem;
  }

  .metric .value {
    font-size: 1.35rem;
  }

  .mp-hero {
    padding: 0.85rem 0 0.65rem;
    gap: 0.85rem;
  }

  .mp-headline {
    font-size: 1.55rem;
    margin-bottom: 0.85rem;
  }

  .mp-features {
    gap: 0.55rem;
    margin-bottom: 1rem;
  }

  .mp-exchange {
    margin: 1rem 0;
    padding: 0.85rem;
  }

  .feature-grid {
    gap: 0.55rem;
  }

  .feature-grid .card {
    padding: 0.75rem !important;
  }

  .hero-actions .btn {
    min-height: 42px;
    padding: 0.55rem 0.85rem;
    font-size: 0.84rem;
  }

  .auth-screen {
    padding: 1rem 0.65rem calc(3.5rem + env(safe-area-inset-bottom));
  }

  .auth-screen .sheet {
    max-width: none;
    width: 100%;
  }

  .legal-doc {
    padding: 1rem 0.85rem 1.25rem;
  }

  .pwa-install {
    left: 0.5rem;
    right: 0.5rem;
    bottom: calc(52px + env(safe-area-inset-bottom));
    padding: 0.65rem 0.75rem;
    z-index: 70;
  }

  body.app-shell .mobile-controls.mobile-tabbar {
    display: grid !important;
    pointer-events: auto !important;
  }

  .mobile-controls button.is-active,
  .mobile-controls a.public-nav-item.is-active {
    color: var(--accent) !important;
    background: rgba(0, 123, 255, 0.14) !important;
  }

  .mobile-controls button.ctrl-primary,
  .mobile-controls a.public-nav-item.ctrl-primary {
    background: linear-gradient(135deg, #00c6ff 0%, #0072ff 100%) !important;
  }
}

@media (max-width: 420px) {
  .mobile-controls button .ico,
  .mobile-controls a.public-nav-item .ico {
    font-size: 0.95rem;
  }

  .hero-stats,
  .mp-mini-grid {
    gap: 0.45rem;
  }

  table.data {
    font-size: 0.76rem;
  }
}

/* --- Public section pages --- */
.section-page {
  padding: 1.35rem 0 2rem;
}

.section-doc {
  padding: 1.35rem 1.25rem 1.5rem;
  max-width: 820px;
  margin: 0 auto;
}

.section-kicker {
  margin: 0 0 0.5rem;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
}

.section-doc h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.55rem, 4vw, 2.1rem);
  line-height: 1.15;
}

.section-lead {
  margin: 0 0 1.25rem;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.6;
}

.section-list {
  margin: 0 0 1.25rem;
  padding-left: 1.15rem;
  color: var(--muted);
  line-height: 1.65;
}

.section-list li { margin-bottom: 0.45rem; }

.section-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1.35rem;
}

.section-callout {
  margin: 1rem 0 0;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(8, 16, 32, 0.72);
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

.section-callout strong { color: var(--text); }

.home-hub {
  padding: 1.5rem 0 2rem;
}

.home-hub-hero {
  text-align: center;
  padding: 1rem 0 1.5rem;
}

.home-hub-hero .mp-wordmark {
  justify-content: center;
}

.home-hub-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
  margin: 0 0 1.25rem;
}

@media (min-width: 640px) {
  .home-hub-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.65rem;
  }
}

@media (min-width: 960px) {
  .home-hub-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.7rem;
  }
}

.home-hub-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1rem 0.95rem;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(8, 16, 32, 0.78);
  color: var(--text);
  text-decoration: none;
  min-height: 118px;
  transition: border-color 0.2s, transform 0.2s;
}

.home-hub-card:hover {
  border-color: rgba(0, 180, 255, 0.45);
  transform: translateY(-2px);
  color: var(--text);
}

.home-hub-card .ico {
  font-size: 1.35rem;
  line-height: 1;
}

.home-hub-card strong {
  font-size: 0.95rem;
  line-height: 1.25;
}

.home-hub-card span {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.4;
}

.home-hub-card-has-img {
  padding: 0;
  min-height: auto;
  overflow: hidden;
}

.home-hub-card-img {
  display: block;
  width: 100%;
  height: 72px;
  max-height: 72px;
  aspect-ratio: auto;
  object-fit: cover;
  object-position: center;
  transition: transform 0.3s ease;
}

@media (min-width: 640px) {
  .home-hub-card-img {
    height: 80px;
    max-height: 80px;
  }
}

.home-hub-card-has-img:hover .home-hub-card-img {
  transform: scale(1.05);
}

.home-hub-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.5rem 0.6rem 0.6rem;
}

.home-hub-card-has-img .ico {
  display: none;
}

.home-hub-card-body strong {
  font-size: 0.82rem;
  line-height: 1.2;
}

.home-hub-card-body span {
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.home-hub-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  justify-content: center;
  margin-top: 0.5rem;
}

.rates-section-page .rates-head {
  margin-bottom: 1rem;
}

/* --- iOS Safari / iPhone safe area & overflow --- */
body.has-public-nav,
body.auth-app {
  padding-left: env(safe-area-inset-left, 0px);
  padding-right: env(safe-area-inset-right, 0px);
}

.auth-screen {
  padding-left: max(1.25rem, env(safe-area-inset-left, 0px));
  padding-right: max(1.25rem, env(safe-area-inset-right, 0px));
}

main.container,
.home-hub,
.section-page,
.legal-page {
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
}

.home-hub-grid,
.rates-grid,
.hero-stats,
.mp-mini-grid,
.section-actions,
.home-hub-actions {
  width: 100%;
  max-width: 100%;
}

.home-hub-card,
.section-doc,
.card,
.sheet {
  min-width: 0;
  word-wrap: break-word;
  overflow-wrap: anywhere;
}

.review-modal-panel {
  background: var(--surface) !important;
  color: var(--text);
  border-top: 1px solid var(--border);
}

.mobile-nav-panel a:hover,
.mobile-nav-panel button:hover {
  background: rgba(0, 123, 255, 0.12) !important;
}

.pwa-install {
  left: max(0.85rem, env(safe-area-inset-left, 0px));
  right: max(0.85rem, env(safe-area-inset-right, 0px));
  bottom: calc(52px + env(safe-area-inset-bottom, 0px));
  -webkit-backdrop-filter: blur(12px);
}

@media (max-width: 800px) {
  .container {
    padding-left: max(0.65rem, env(safe-area-inset-left, 0px));
    padding-right: max(0.65rem, env(safe-area-inset-right, 0px));
  }

  body.has-public-nav .nav-actions .btn-ghost {
    display: none;
  }

  body.has-public-nav .nav .brand {
    font-size: 0.92rem;
    max-width: calc(100vw - 7.5rem);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body.has-public-nav .nav-actions .btn {
    padding: 0.42rem 0.7rem;
    font-size: 0.78rem;
    white-space: nowrap;
  }
}

.referral-link-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.referral-link-row input {
  flex: 1 1 220px;
  min-width: 0;
}

.referral-hero code {
  font-size: 0.92rem;
}

.referral-rules-panel {
  padding: 1rem;
  margin-top: 0.25rem;
}

.referral-rules-title {
  margin: 0 0 0.5rem;
  font-size: 1rem;
}

.referral-rules-intro {
  margin: 0 0 0.85rem;
}

.referral-rules-body {
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(5, 12, 28, 0.45);
  max-height: none;
}

.legal-doc-inset h4 {
  margin: 1rem 0 0.45rem;
  font-size: 0.92rem;
  color: var(--text);
}

.legal-doc-inset h4:first-child {
  margin-top: 0;
}

.legal-doc-inset p {
  margin: 0.45rem 0 0;
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--muted);
}

.legal-doc-inset .legal-list {
  margin: 0.35rem 0 0;
  padding-left: 1.15rem;
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--muted);
}

.cabinet-legal-panel {
  margin-bottom: 1rem;
}

.legal-doc-inset .legal-callout {
  margin-top: 0.75rem;
  font-size: 0.86rem;
  line-height: 1.5;
}

.legal-doc-inset .legal-callout:first-child {
  margin-top: 0;
}

/* --- Home landing (monvexpay.com) --- */
body.home-landing main {
  padding-bottom: 2rem;
}

.home-hero-band {
  padding: 0.5rem 0 1.5rem;
  background:
    radial-gradient(ellipse 80% 60% at 50% -20%, rgba(0, 180, 255, 0.14), transparent 55%),
    radial-gradient(circle at 90% 20%, rgba(79, 70, 229, 0.08), transparent 40%);
  border-bottom: 1px solid var(--border);
}

.home-hero-band .mp-hero {
  padding: 1.75rem 0 1.25rem;
}

.home-hero-copy .hero-lead {
  max-width: 540px;
  margin-bottom: 1.25rem;
}

.home-hero-panel {
  padding: 1.25rem 1.15rem;
  background:
    radial-gradient(circle at top right, rgba(0, 180, 255, 0.1), transparent 50%),
    rgba(8, 16, 32, 0.92);
  border: 1px solid rgba(0, 180, 255, 0.22);
  box-shadow: var(--shadow), 0 0 40px rgba(0, 120, 255, 0.08);
}

.home-hero-panel-kicker {
  margin: 0 0 0.35rem;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  font-weight: 700;
}

.home-hero-rate {
  font-size: clamp(1.85rem, 5vw, 2.45rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 0.25rem;
  color: var(--accent);
  text-shadow: 0 0 24px rgba(0, 242, 255, 0.25);
}

.home-hero-rate-meta {
  margin: 0 0 0.85rem !important;
  font-size: 0.78rem !important;
}

.home-hero-stats {
  margin: 0 !important;
}

.home-hero-stats .stat .v {
  font-size: 0.88rem;
}

.home-promo-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
  margin: 1.5rem auto 1.75rem;
}

@media (max-width: 860px) {
  .home-promo-row {
    grid-template-columns: 1fr;
  }
}

.home-promo-card {
  padding: 1.15rem 1.1rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: rgba(8, 16, 32, 0.82);
  min-height: 100%;
}

.home-promo-card h2 {
  margin: 0.45rem 0 0.5rem;
  font-size: 1.05rem;
  line-height: 1.3;
}

.home-promo-card p {
  margin: 0 0 0.75rem;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.55;
}

.home-promo-card p strong {
  color: var(--accent);
}

.home-promo-tag {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid var(--border);
  color: var(--muted);
}

.home-promo-accent {
  border-color: rgba(0, 180, 255, 0.35);
  background:
    linear-gradient(145deg, rgba(0, 123, 255, 0.12), rgba(8, 16, 32, 0.9));
}

.home-promo-accent .home-promo-tag {
  border-color: rgba(0, 180, 255, 0.4);
  color: var(--accent);
}

.home-promo-gift {
  border-color: rgba(16, 185, 129, 0.35);
  background:
    linear-gradient(145deg, rgba(16, 185, 129, 0.1), rgba(8, 16, 32, 0.9));
}

.home-promo-gift .home-promo-tag {
  border-color: rgba(16, 185, 129, 0.4);
  color: #34d399;
}

.home-promo-link {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
}

.home-promo-link:hover {
  text-decoration: underline;
}

.home-section-head {
  margin-bottom: 1rem;
}

.home-section-head h2 {
  margin: 0 0 0.35rem;
  font-size: clamp(1.25rem, 3vw, 1.55rem);
}

.home-section-head .hint {
  margin: 0;
}

.home-section-head a {
  color: var(--accent);
}

.home-tariffs-section {
  margin-bottom: 1.75rem;
}

.home-tariffs-card {
  padding: 1rem 1rem 0.85rem;
  background: rgba(8, 16, 32, 0.78);
}

.home-tariffs-table th,
.home-tariffs-table td {
  border-color: var(--border);
  color: var(--muted);
  font-size: 0.86rem;
}

.home-tariffs-table th {
  background: rgba(0, 8, 20, 0.65);
  color: var(--text);
}

.home-tariffs-table tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.02);
}

.home-tariffs-table strong {
  color: var(--text);
}

.home-fee {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  border-radius: 8px;
  background: rgba(0, 180, 255, 0.12);
  color: var(--accent);
  font-weight: 800;
}

.home-fee-zero {
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
}

.home-tariffs-note {
  margin: 0.65rem 0 0 !important;
  font-size: 0.78rem !important;
}

.home-services {
  margin-bottom: 1.75rem;
}

.home-steps-section {
  margin-bottom: 1.75rem;
}

.home-steps {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  display: grid;
  gap: 0.65rem;
}

@media (min-width: 720px) {
  .home-steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.home-step {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  padding: 1rem;
  background: rgba(8, 16, 32, 0.78);
}

.home-step-num {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 800;
  font-size: 0.95rem;
}

.home-step strong {
  display: block;
  margin-bottom: 0.2rem;
  font-size: 0.92rem;
}

.home-step span {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.home-trust-band {
  margin: 1.5rem auto 0.5rem;
}

.home-trust-band .mp-mini-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 720px) {
  .home-trust-band .mp-mini-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 480px) {
  .home-trust-band .mp-mini-grid {
    grid-template-columns: 1fr;
  }

  .home-hero-band .hero-actions .btn {
    flex: 1 1 100%;
  }
}

/* Showcase banners */
.home-showcase {
  margin-bottom: 1.85rem;
}

.home-showcase-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

@media (max-width: 720px) {
  .home-showcase-grid {
    grid-template-columns: 1fr;
  }

  .home-showcase-wide {
    grid-column: auto !important;
  }
}

.home-showcase-banner {
  position: relative;
  display: flex;
  align-items: stretch;
  justify-content: flex-start;
  gap: 0.75rem;
  min-height: 168px;
  padding: 1.15rem 1.1rem;
  border-radius: 18px;
  border: 1px solid var(--border);
  overflow: hidden;
  color: var(--text);
  text-decoration: none;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.home-showcase-has-img {
  min-height: 200px;
  padding: 0;
  border-color: rgba(255, 255, 255, 0.08);
  background: #050a15;
}

.home-showcase-wide.home-showcase-has-img {
  min-height: 220px;
}

.home-showcase-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center right;
  z-index: 0;
  transition: transform 0.35s ease;
}

.home-showcase-has-img:hover .home-showcase-img {
  transform: scale(1.04);
}

.home-showcase-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    105deg,
    rgba(5, 10, 21, 0.94) 0%,
    rgba(5, 10, 21, 0.82) 42%,
    rgba(5, 10, 21, 0.35) 72%,
    rgba(5, 10, 21, 0.15) 100%
  );
}

.home-showcase-has-img .home-showcase-body {
  position: relative;
  z-index: 2;
  padding: 1.15rem 1.1rem;
  max-width: min(100%, 520px);
}

.home-showcase-banner:hover {
  transform: translateY(-3px);
  color: var(--text);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}

.home-showcase-wide {
  grid-column: span 2;
}

.home-showcase-wide.home-showcase-has-img {
  min-height: 220px;
}

.home-showcase-body {
  position: relative;
  z-index: 2;
  flex: 1;
  min-width: 0;
}

.home-showcase-badge {
  display: inline-block;
  margin-bottom: 0.45rem;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(0, 0, 0, 0.2);
}

.home-showcase-banner h3 {
  margin: 0 0 0.4rem;
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  line-height: 1.25;
  max-width: 28ch;
}

.home-showcase-banner p {
  margin: 0 0 0.55rem;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.82rem;
  line-height: 1.5;
  max-width: 42ch;
}

.home-showcase-list {
  margin: 0 0 0.65rem;
  padding-left: 1rem;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.78rem;
  line-height: 1.45;
}

.home-showcase-list li {
  margin-bottom: 0.2rem;
}

.home-showcase-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.65rem;
}

.home-showcase-pills span {
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 600;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.85);
}

.home-showcase-cta {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.35);
}

.home-showcase-art {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  align-self: center;
  font-size: clamp(2.5rem, 6vw, 3.75rem);
  line-height: 1;
  opacity: 0.9;
  filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.35));
}

.home-showcase-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.85;
}

.home-showcase-shop {
  border-color: rgba(168, 85, 247, 0.4);
  background: linear-gradient(135deg, #4c1d95 0%, #6d28d9 42%, #1e1033 100%);
}

.home-showcase-shop .home-showcase-glow {
  background: radial-gradient(circle at 85% 20%, rgba(255, 255, 255, 0.18), transparent 45%);
}

.home-showcase-earn {
  border-color: rgba(16, 185, 129, 0.45);
  background: linear-gradient(135deg, #065f46 0%, #059669 45%, #0a1628 100%);
}

.home-showcase-earn .home-showcase-glow {
  background: radial-gradient(circle at 90% 30%, rgba(52, 211, 153, 0.25), transparent 50%);
}

.home-showcase-p2p {
  border-color: rgba(0, 180, 255, 0.4);
  background: linear-gradient(135deg, #0c4a6e 0%, #0284c7 50%, #0a1628 100%);
}

.home-showcase-p2p .home-showcase-glow {
  background: radial-gradient(circle at 80% 25%, rgba(0, 242, 255, 0.2), transparent 48%);
}

.home-showcase-wallet {
  border-color: rgba(99, 102, 241, 0.4);
  background: linear-gradient(135deg, #312e81 0%, #4f46e5 48%, #0f172a 100%);
}

.home-showcase-wallet .home-showcase-glow {
  background: radial-gradient(circle at 85% 35%, rgba(129, 140, 248, 0.22), transparent 45%);
}

.home-showcase-swap {
  border-color: rgba(245, 158, 11, 0.45);
  background: linear-gradient(135deg, #92400e 0%, #d97706 42%, #1a1208 100%);
}

.home-showcase-swap .home-showcase-glow {
  background: radial-gradient(circle at 88% 22%, rgba(251, 191, 36, 0.22), transparent 50%);
}

.home-showcase-transfer {
  border-color: rgba(56, 189, 248, 0.35);
  background: linear-gradient(135deg, #164e63 0%, #0891b2 50%, #0a1628 100%);
}

.home-showcase-transfer .home-showcase-glow {
  background: radial-gradient(circle at 82% 28%, rgba(125, 211, 252, 0.2), transparent 48%);
}

.home-showcase-b2b {
  border-color: rgba(148, 163, 184, 0.35);
  background: linear-gradient(135deg, #1e293b 0%, #334155 55%, #0a1628 100%);
}

.home-showcase-b2b .home-showcase-glow {
  background: radial-gradient(circle at 85% 25%, rgba(226, 232, 240, 0.12), transparent 45%);
}

.home-showcase-pwa {
  border-color: rgba(236, 72, 153, 0.4);
  background: linear-gradient(135deg, #831843 0%, #db2777 48%, #1a0a14 100%);
}

.home-showcase-pwa .home-showcase-glow {
  background: radial-gradient(circle at 84% 30%, rgba(244, 114, 182, 0.22), transparent 48%);
}

@media (max-width: 560px) {
  .home-showcase-has-img {
    min-height: 220px;
  }

  .home-showcase-has-img .home-showcase-body {
    max-width: 100%;
    padding: 1rem 0.9rem;
  }

  .home-showcase-overlay {
    background: linear-gradient(
      180deg,
      rgba(5, 10, 21, 0.08) 0%,
      rgba(5, 10, 21, 0.42) 48%,
      rgba(5, 10, 21, 0.72) 100%
    );
  }

  .home-showcase-img {
    filter: brightness(1.25) saturate(1.08);
    object-position: center center;
  }
}

/* --- Mobile polish: drawer, hero stats, legal, showcase --- */
@media (max-width: 800px) {
  .mobile-nav-panel {
    width: min(76vw, 268px);
    padding: calc(0.6rem + env(safe-area-inset-top, 0px)) 0.55rem calc(0.6rem + env(safe-area-inset-bottom, 0px));
    padding-left: max(0.55rem, env(safe-area-inset-left, 0px));
    gap: 0.1rem;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .mobile-nav-head {
    margin-bottom: 0.35rem;
    font-size: 0.88rem;
    flex-shrink: 0;
  }

  .mobile-nav-panel a,
  .mobile-nav-panel button {
    padding: 0.52rem 0.62rem;
    font-size: 0.86rem;
    border-radius: 10px;
    line-height: 1.25;
  }

  .app-drawer-panel {
    width: min(76vw, 268px);
    padding: calc(0.6rem + env(safe-area-inset-top, 0px)) 0.55rem calc(0.6rem + env(safe-area-inset-bottom, 0px));
    padding-left: max(0.55rem, env(safe-area-inset-left, 0px));
    gap: 0.1rem;
  }

  .app-drawer-head {
    margin-bottom: 0.15rem;
    font-size: 0.9rem;
  }

  .drawer-user {
    margin: 0 0 0.35rem;
    font-size: 0.76rem;
    line-height: 1.3;
  }

  .drawer-nav {
    gap: 0.12rem;
    min-height: 0;
  }

  .drawer-nav button,
  .drawer-nav .drawer-link {
    padding: 0.52rem 0.62rem;
    font-size: 0.86rem;
    gap: 0.48rem;
    border-radius: 10px;
    line-height: 1.25;
  }

  .drawer-nav button .ico,
  .drawer-nav .drawer-link .ico {
    width: 1.1rem;
    font-size: 0.92rem;
    flex-shrink: 0;
  }

  .drawer-foot {
    margin-top: 0.35rem;
    padding-top: 0.45rem;
    gap: 0.35rem;
    flex-shrink: 0;
  }

  .drawer-foot .btn {
    min-height: 40px;
    padding: 0.45rem 0.65rem;
    font-size: 0.84rem;
  }

  .legal-page {
    padding: 0.75rem 0 calc(3.75rem + env(safe-area-inset-bottom, 0px));
  }

  .legal-doc {
    padding: 0.85rem 0.7rem 1rem;
    overflow-x: hidden;
  }

  .legal-doc h1 {
    font-size: clamp(1.45rem, 6vw, 1.85rem);
    line-height: 1.15;
  }

  .legal-doc h2 {
    font-size: 1.05rem;
    margin-top: 1.25rem;
  }

  .legal-doc h3 {
    font-size: 0.95rem;
  }

  .legal-doc p,
  .legal-list,
  .legal-list li {
    font-size: 0.9rem;
    line-height: 1.6;
  }

  .legal-updated {
    font-size: 0.88rem !important;
  }

  .legal-callout {
    padding: 0.72rem 0.8rem;
    font-size: 0.88rem;
    line-height: 1.55;
  }

  .legal-callout strong {
    font-size: 0.95rem;
  }

  .legal-toc {
    padding: 0.75rem 0.85rem;
  }

  .legal-toc ol {
    padding-left: 1rem;
    font-size: 0.86rem;
  }

  .legal-table-wrap {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0.65rem 0 0.85rem;
  }

  .legal-table {
    font-size: 0.76rem;
    min-width: 520px;
  }

  .legal-table th,
  .legal-table td {
    padding: 0.38rem 0.42rem;
    word-break: break-word;
  }

  .legal-example {
    padding: 0.72rem 0.8rem;
    font-size: 0.86rem;
  }

  .home-tariffs-card {
    padding: 0.85rem 0.65rem 0.75rem;
    overflow: hidden;
  }

  .home-tariffs-card .table-wrap {
    margin: 0 -0.15rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .home-tariffs-table {
    min-width: 420px;
    font-size: 0.78rem;
  }

  .home-tariffs-table th,
  .home-tariffs-table td {
    padding: 0.45rem 0.4rem;
  }
}

@media (max-width: 640px) {
  .home-hero-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.4rem;
  }

  .home-hero-stats .stat {
    padding: 0.5rem 0.35rem;
    text-align: center;
    min-width: 0;
  }

  .home-hero-stats .stat .k {
    font-size: 0.62rem;
    letter-spacing: 0.05em;
  }

  .home-hero-stats .stat .v {
    font-size: 0.95rem;
    line-height: 1.2;
    margin-top: 0.12rem;
    white-space: nowrap;
  }

  .home-hero-panel {
    padding: 1rem 0.85rem;
  }
}

@media (max-width: 720px) {
  .home-showcase-has-img .home-showcase-img {
    filter: brightness(1.18) saturate(1.05);
  }

  .home-showcase-overlay {
    background: linear-gradient(
      105deg,
      rgba(5, 10, 21, 0.72) 0%,
      rgba(5, 10, 21, 0.48) 45%,
      rgba(5, 10, 21, 0.22) 100%
    );
  }
}

/* --- Swap landing (/exchange/swap.html) --- */
.swap-hero-band {
  position: relative;
  overflow: hidden;
  padding: 2.5rem 0 2.75rem;
  border-bottom: 1px solid var(--border);
}
.swap-hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  opacity: 0.55;
}
.swap-hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(115deg, rgba(5, 10, 21, 0.92) 0%, rgba(5, 10, 21, 0.72) 42%, rgba(5, 10, 21, 0.35) 100%),
    radial-gradient(600px 280px at 85% 20%, rgba(0, 242, 255, 0.12), transparent 60%);
  pointer-events: none;
}
.swap-hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, 340px);
  gap: 1.25rem;
  align-items: center;
}
.swap-hero-copy h1 {
  margin: 0 0 0.85rem;
  font-size: clamp(1.85rem, 5vw, 2.65rem);
  line-height: 1.12;
  font-weight: 800;
}
.swap-hero-copy h1 span {
  color: var(--accent);
}
.swap-hero-lead {
  margin: 0 0 1.15rem;
  max-width: 38rem;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.65;
}
.swap-hero-rate-card {
  padding: 1.1rem 1rem 1.15rem;
  background: rgba(8, 16, 32, 0.82) !important;
  backdrop-filter: blur(12px);
  border: 1px solid rgba(0, 242, 255, 0.14);
}
.swap-features {
  padding: 2rem 0 0.5rem;
}
.swap-feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}
.swap-feature-card {
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--border);
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.swap-feature-card:hover {
  transform: translateY(-2px);
  border-color: rgba(0, 242, 255, 0.22);
}
.swap-feature-card img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.swap-feature-body {
  padding: 0.95rem 1rem 1.1rem;
}
.swap-feature-body h3 {
  margin: 0 0 0.45rem;
  font-size: 1.05rem;
}
.swap-feature-body p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.55;
}
.swap-compare-section {
  padding: 2rem 0 0.5rem;
}
.swap-compare-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}
.swap-compare-card {
  padding: 1.1rem 1rem 1.15rem;
}
.swap-compare-card h3 {
  margin: 0.55rem 0 0.65rem;
  font-size: 1.15rem;
}
.swap-compare-highlight {
  border-color: rgba(0, 242, 255, 0.22);
  box-shadow: var(--glow);
}
.swap-faq-section {
  padding: 2rem 0 2.5rem;
}
.swap-faq-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}
.swap-faq-item {
  padding: 1rem 1rem 1.05rem;
}
.swap-faq-item h3 {
  margin: 0 0 0.4rem;
  font-size: 0.98rem;
}
.swap-faq-item p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
}
.swap-callout {
  margin-top: 1.25rem;
}
@media (max-width: 860px) {
  .swap-hero-inner {
    grid-template-columns: 1fr;
  }
  .swap-hero-band {
    padding: 1.5rem 0 1.75rem;
  }
  .swap-feature-grid,
  .swap-compare-grid,
  .swap-faq-grid {
    grid-template-columns: 1fr;
  }
}

/* In-app swap panel (app.html) */
.swap-app-panel {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.swap-app-hero {
  overflow: hidden;
  padding: 0;
  display: grid;
  grid-template-columns: minmax(120px, 160px) minmax(0, 1fr);
  gap: 0;
  border: 1px solid var(--border);
}
.swap-app-hero-img {
  width: 100%;
  height: 100%;
  min-height: 120px;
  object-fit: cover;
  object-position: center;
}
.swap-app-hero-body {
  padding: 0.85rem 0.95rem;
}
.swap-app-features {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
}
.swap-app-feature {
  overflow: hidden;
  padding: 0;
  display: flex;
  flex-direction: column;
}
.swap-app-feature img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.swap-app-feature div {
  padding: 0.55rem 0.6rem 0.65rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.swap-app-feature strong {
  font-size: 0.82rem;
}
.swap-app-feature .hint {
  font-size: 0.72rem;
  line-height: 1.35;
}
.swap-app-form {
  padding: 1rem;
  max-width: none;
}
.swap-app-form-title {
  margin: 0 0 0.65rem;
  font-size: 0.95rem;
}
.swap-app-more {
  margin: 0;
  text-align: center;
}
@media (max-width: 720px) {
  .swap-app-hero {
    grid-template-columns: 1fr;
  }
  .swap-app-hero-img {
    max-height: 140px;
  }
  .swap-app-features {
    grid-template-columns: 1fr;
  }
}

/* --- Banner carousel (P2P and others) --- */
.mv-carousel {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(5, 10, 21, 0.9);
  box-shadow: var(--shadow);
  touch-action: pan-y;
}
.mv-carousel-track {
  position: relative;
  min-height: clamp(190px, 34vw, 320px);
}
.mv-carousel-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.45s ease, visibility 0.45s ease;
}
.mv-carousel-slide.is-active {
  opacity: 1;
  visibility: visible;
  position: relative;
}
.mv-carousel-slide img {
  display: block;
  width: 100%;
  height: clamp(190px, 34vw, 320px);
  object-fit: cover;
  object-position: center;
}
.mv-carousel-caption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 1.5rem 1rem 1rem;
  background: linear-gradient(180deg, transparent 0%, rgba(5, 10, 21, 0.35) 20%, rgba(5, 10, 21, 0.88) 100%);
}
.mv-carousel-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  border: 1px solid rgba(0, 242, 255, 0.22);
  background: rgba(0, 180, 255, 0.08);
  color: var(--accent);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}
.mv-carousel-caption h3 {
  margin: 0 0 0.3rem;
  font-size: clamp(1.05rem, 3.2vw, 1.35rem);
  line-height: 1.2;
}
.mv-carousel-caption p {
  margin: 0;
  max-width: 36rem;
  color: rgba(240, 246, 255, 0.82);
  font-size: 0.86rem;
  line-height: 1.45;
}
.mv-carousel-prev,
.mv-carousel-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  border: 1px solid rgba(0, 242, 255, 0.18);
  background: rgba(5, 10, 21, 0.72);
  color: var(--text);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  backdrop-filter: blur(8px);
}
.mv-carousel-prev { left: 0.45rem; }
.mv-carousel-next { right: 0.45rem; }
.mv-carousel-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.55rem;
  z-index: 2;
  display: flex;
  justify-content: center;
  gap: 0.35rem;
}
.mv-carousel-dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 999px;
  border: 0;
  padding: 0;
  background: rgba(240, 246, 255, 0.28);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}
.mv-carousel-dot.is-active {
  width: 1.1rem;
  background: var(--accent);
}
.mv-carousel-compact .mv-carousel-track,
.mv-carousel-compact .mv-carousel-slide img {
  min-height: clamp(160px, 28vw, 220px);
  height: clamp(160px, 28vw, 220px);
}
.p2p-landing .p2p-content {
  padding: 1.25rem 0 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.p2p-feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}
.p2p-feature-card {
  padding: 1rem;
}
.p2p-feature-card h3 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
}
.p2p-feature-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
}
.p2p-app-panel .mv-carousel {
  margin-bottom: 0.75rem;
}
@media (max-width: 720px) {
  .p2p-feature-grid { grid-template-columns: 1fr; }
  .mv-carousel-caption { padding: 1.15rem 0.85rem 1.35rem; }
}

/* --- Referral panel (app.html) --- */
.referral-app-panel {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.referral-app-panel .mv-carousel {
  margin-bottom: 0.15rem;
}
.ref-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
}
.ref-stat-card {
  padding: 0.75rem 0.8rem;
  text-align: center;
  border: 1px solid rgba(0, 242, 255, 0.12);
  background: rgba(8, 16, 32, 0.72);
}
.ref-stat-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.25rem;
}
.ref-stat-value {
  display: block;
  font-size: clamp(0.95rem, 3vw, 1.15rem);
  color: var(--accent);
  line-height: 1.2;
}
.ref-link-card {
  padding: 1rem;
  border: 1px solid rgba(0, 242, 255, 0.14);
  background: linear-gradient(135deg, rgba(8, 16, 32, 0.92) 0%, rgba(0, 123, 255, 0.06) 100%);
}
.ref-link-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.65rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}
.ref-link-title {
  margin: 0 0 0.25rem;
  font-size: 1rem;
}
.ref-link-hint {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.45;
}
.ref-code-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(5, 10, 21, 0.55);
  font-size: 0.78rem;
  white-space: nowrap;
}
.ref-code-pill code {
  color: var(--accent);
  font-size: 0.82rem;
}
.ref-sources-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}
.ref-source-card {
  padding: 0.75rem 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.ref-source-card strong {
  font-size: 0.88rem;
}
.ref-source-card .hint {
  font-size: 0.74rem;
}
.ref-table-card {
  padding: 0.85rem 0.9rem 1rem;
}
.ref-block-title {
  margin: 0 0 0.65rem;
  font-size: 0.95rem;
}
.ref-footnote {
  margin: 0;
  text-align: center;
  font-size: 0.82rem;
}
@media (max-width: 720px) {
  .ref-stats-grid {
    grid-template-columns: 1fr;
  }
  .ref-sources-grid {
    grid-template-columns: 1fr;
  }
}

/* Casino work landing */
.casino-work-main {
  padding-bottom: 2rem;
}
.casino-work-hero {
  margin-bottom: 1rem;
}
.casino-work-steps {
  display: grid;
  gap: 0.75rem;
  margin-top: 1.25rem;
}
.casino-work-step {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.75rem 0.85rem;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.04);
  border: 1px solid rgba(148, 163, 184, 0.25);
}
.casino-work-step span {
  flex: 0 0 1.75rem;
  height: 1.75rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  color: #fff;
}
.casino-work-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1rem;
  align-items: start;
}
.casino-work-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
  margin: 0.75rem 0 1rem;
}
.casino-work-stats .stat {
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.04);
  border: 1px solid rgba(148, 163, 184, 0.2);
}
.casino-work-stats .k {
  font-size: 0.72rem;
  opacity: 0.75;
}
.casino-work-stats .v {
  font-weight: 700;
  font-size: 0.95rem;
  margin-top: 0.15rem;
}
.casino-work-deposit-form .field-row {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.35rem;
}
.casino-work-deposit-form input {
  flex: 1;
  min-width: 0;
}
.check-row {
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
  margin: 0.75rem 0 1rem;
  font-size: 0.92rem;
  line-height: 1.45;
}
.check-row input {
  margin-top: 0.2rem;
}
.casino-work-msg.is-error {
  color: #dc2626;
}
@media (max-width: 900px) {
  .casino-work-grid {
    grid-template-columns: 1fr;
  }
  .casino-work-stats:not(.casino-work-stats-compact) {
    grid-template-columns: 1fr;
  }
  .casino-work-deposit-form:not(.casino-work-deposit-compact) .field-row {
    flex-direction: column;
  }
}

/* Casino work in authenticated app */
.drawer-nav-featured,
.side-nav-featured {
  border: 1px solid rgba(234, 179, 8, 0.38) !important;
  background: linear-gradient(
    135deg,
    rgba(234, 179, 8, 0.16),
    rgba(202, 138, 4, 0.08)
  ) !important;
  color: #fef9c3 !important;
  font-weight: 700 !important;
  box-shadow: 0 8px 24px rgba(202, 138, 4, 0.14);
}
.drawer-nav-featured.is-active,
.side-nav-featured.is-active {
  color: #422006 !important;
  background: linear-gradient(135deg, #fde047, #facc15) !important;
}
.side-nav-featured {
  border-radius: 12px;
  padding: 0.72rem 0.85rem !important;
  text-align: left;
}
.mobile-tabbar .ctrl-casino {
  color: #fde047;
}
.mobile-tabbar .ctrl-casino.is-active {
  color: #fef08a;
}
.mobile-tabbar .ctrl-casino .ico {
  filter: drop-shadow(0 0 6px rgba(250, 204, 21, 0.45));
}
.wallet-casino-promo {
  display: flex;
  align-items: stretch;
  gap: 0;
  width: 100%;
  margin: 0 0 1.1rem;
  padding: 0;
  border: 1px solid rgba(234, 179, 8, 0.42);
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  text-align: left;
  background: linear-gradient(135deg, rgba(30, 27, 10, 0.95), rgba(15, 23, 42, 0.92));
  box-shadow:
    0 0 0 1px rgba(234, 179, 8, 0.1),
    0 18px 42px rgba(202, 138, 4, 0.18);
  font: inherit;
  color: inherit;
}
.wallet-casino-promo:hover {
  border-color: rgba(250, 204, 21, 0.55);
  transform: translateY(-1px);
}
.wallet-casino-promo-img {
  width: 38%;
  max-width: 220px;
  min-height: 140px;
  object-fit: cover;
  flex-shrink: 0;
}
.wallet-casino-promo-body {
  flex: 1;
  padding: 1rem 1rem 1rem 0.85rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.35rem;
}
.wallet-casino-promo-badge {
  display: inline-block;
  align-self: flex-start;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #fef9c3;
  background: rgba(113, 63, 18, 0.72);
  border: 1px solid rgba(250, 204, 21, 0.45);
}
.wallet-casino-promo-title {
  font-size: 1.15rem;
  line-height: 1.2;
  color: #fef08a;
}
.wallet-casino-promo-text {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.45;
  color: rgba(226, 232, 240, 0.88);
}
.wallet-casino-promo-arrow {
  display: flex;
  align-items: center;
  padding: 0 1rem;
  font-size: 1.5rem;
  color: #fde047;
  font-weight: 700;
}
.casino-work-app-panel {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

/* Compact casino work (mobile-first) */
.cw-compact-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.15rem 0 0.35rem;
}
.cw-compact-head-public {
  padding-top: 0.35rem;
}
.cw-compact-tag {
  display: inline-block;
  margin-bottom: 0.25rem;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fef9c3;
  background: rgba(113, 63, 18, 0.72);
  border: 1px solid rgba(250, 204, 21, 0.4);
}
.cw-compact-title {
  margin: 0 0 0.2rem;
  font-size: 1.2rem;
  line-height: 1.15;
  color: #fef08a;
}
.cw-compact-sub {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.35;
}
.cw-rules-link {
  flex-shrink: 0;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  text-decoration: none;
  color: #fde047;
  border: 1px solid rgba(234, 179, 8, 0.45);
  background: rgba(30, 27, 10, 0.55);
}
.cw-steps-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0 0 0.65rem;
  padding: 0;
  list-style: none;
  counter-reset: cw-step;
}
.cw-steps-inline li {
  flex: 1 1 auto;
  min-width: 0;
  padding: 0.35rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  text-align: center;
  color: rgba(226, 232, 240, 0.92);
  background: rgba(15, 23, 42, 0.45);
  border: 1px solid rgba(148, 163, 184, 0.22);
  counter-increment: cw-step;
}
.cw-steps-inline li::before {
  content: counter(cw-step) ". ";
  opacity: 0.65;
}
.cw-compact-card {
  padding: 0.85rem 0.9rem !important;
}
.cw-compact-card .check-row-compact {
  margin: 0.5rem 0 0.65rem;
  font-size: 0.82rem;
  gap: 0.45rem;
}
.cw-status-line {
  margin: 0 0 0.55rem;
  font-size: 0.8rem;
  line-height: 1.4;
}
.casino-work-stats-compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.45rem;
  margin: 0 0 0.55rem;
}
.casino-work-stats-compact .stat {
  padding: 0.45rem 0.5rem;
  border-radius: 8px;
}
.casino-work-stats-compact .k {
  font-size: 0.65rem;
}
.casino-work-stats-compact .v {
  font-size: 0.82rem;
  word-break: break-word;
}
.casino-work-deposit-compact .field-row {
  flex-direction: row;
  align-items: stretch;
  margin-top: 0;
  margin-bottom: 0.55rem;
}
.casino-work-deposit-compact input {
  min-height: 2.5rem;
  padding: 0.45rem 0.65rem;
  font-size: 0.9rem;
}
.casino-work-deposit-compact .btn {
  flex: 0 0 2.5rem;
  width: 2.5rem;
  min-width: 2.5rem;
  padding: 0;
  font-size: 1.25rem;
  line-height: 1;
}
.cw-action-row {
  margin-top: 0.15rem;
}
.cw-action-row .btn {
  min-height: 2.65rem;
  font-size: 0.88rem;
}
.cw-tiers-fold {
  padding: 0 !important;
  overflow: hidden;
}
.cw-tiers-fold summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.75rem 0.9rem;
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 700;
  list-style: none;
  user-select: none;
}
.cw-tiers-fold summary::-webkit-details-marker {
  display: none;
}
.cw-tiers-fold summary::after {
  content: "▾";
  font-size: 0.85rem;
  opacity: 0.65;
  transition: transform 0.15s ease;
}
.cw-tiers-fold[open] summary::after {
  transform: rotate(180deg);
}
.cw-tiers-fold-hint {
  font-size: 0.72rem;
  font-weight: 600;
  color: #fde047;
  opacity: 0.9;
}
.cw-tier-chips {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.4rem;
  margin: 0;
  padding: 0 0.9rem 0.85rem;
  list-style: none;
}
.cw-tier-chips li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  padding: 0.4rem 0.55rem;
  border-radius: 8px;
  font-size: 0.72rem;
  background: rgba(15, 23, 42, 0.35);
  border: 1px solid rgba(148, 163, 184, 0.18);
}
.cw-tier-chips li span {
  opacity: 0.88;
}
.cw-tier-chips li strong {
  color: #fde047;
  font-size: 0.82rem;
}
.cw-tiers-table-desktop {
  display: none;
  padding: 0 0.9rem 0.85rem;
}
.casino-work-compact-page {
  padding-bottom: 1.25rem;
}
.casino-work-compact-page.section-page {
  padding-top: 0.75rem;
}

.wallet-casino-promo-compact {
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 0.75rem;
  border-radius: 12px;
}
.wallet-casino-promo-compact .wallet-casino-promo-ico {
  flex: 0 0 2.25rem;
  width: 2.25rem;
  height: 2.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  border-radius: 10px;
  background: rgba(113, 63, 18, 0.55);
  border: 1px solid rgba(250, 204, 21, 0.35);
}
.wallet-casino-promo-compact .wallet-casino-promo-body {
  padding: 0;
  gap: 0.1rem;
}
.wallet-casino-promo-compact .wallet-casino-promo-title {
  font-size: 0.95rem;
}
.wallet-casino-promo-compact .wallet-casino-promo-text {
  font-size: 0.74rem;
  line-height: 1.3;
}
.wallet-casino-promo-compact .wallet-casino-promo-arrow {
  padding: 0 0.15rem 0 0;
  font-size: 1.1rem;
}

@media (min-width: 721px) {
  .cw-tier-chips {
    display: none;
  }
  .cw-tiers-table-desktop {
    display: block;
  }
  .cw-compact-title {
    font-size: 1.35rem;
  }
}

@media (max-width: 720px) {
  .wallet-casino-promo:not(.wallet-casino-promo-compact) {
    flex-direction: column;
  }
  .wallet-casino-promo-img {
    width: 100%;
    max-width: none;
    max-height: 160px;
  }
  .wallet-casino-promo-compact {
    margin-bottom: 0.85rem;
  }
  .casino-work-app-panel {
    gap: 0.5rem;
  }
  .cw-compact-card {
    padding: 0.75rem 0.8rem !important;
  }
  .cw-tier-chips {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 420px) {
  .cw-tier-chips {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .casino-work-stats-compact .v {
    font-size: 0.76rem;
  }
}

/* Casino work rules carousel */
.cw-rules-carousel {
  margin-bottom: 0.55rem;
  border-color: rgba(234, 179, 8, 0.38);
  box-shadow: 0 12px 32px rgba(202, 138, 4, 0.14);
  background: #050a15;
  max-width: 100%;
  box-sizing: border-box;
}
.cw-rules-carousel .mv-carousel-track {
  min-height: clamp(170px, 38vw, 240px);
  height: auto;
  aspect-ratio: 16 / 9;
}
.cw-rules-carousel .mv-carousel-slide {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #050a15;
}
.cw-rules-carousel .mv-carousel-slide img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  max-width: 100%;
  object-fit: contain;
  object-position: center;
}
.cw-rules-carousel .mv-carousel-prev,
.cw-rules-carousel .mv-carousel-next {
  border-color: rgba(250, 204, 21, 0.35);
  background: rgba(15, 23, 42, 0.78);
  color: #fde047;
  width: 1.85rem;
  height: 1.85rem;
  font-size: 1.1rem;
}
.cw-rules-carousel .mv-carousel-dot {
  background: rgba(254, 240, 138, 0.35);
}
.cw-rules-carousel .mv-carousel-dot.is-active {
  background: #fde047;
}
.cw-rules-carousel .mv-carousel-dots {
  bottom: 0.45rem;
}
@media (max-width: 720px) {
  .cw-rules-carousel {
    width: calc(100% - 0.85rem);
    max-width: calc(100% - 0.85rem);
    margin-left: auto;
    margin-right: auto;
  }
  .cw-rules-carousel .mv-carousel-track {
    aspect-ratio: auto;
    min-height: clamp(270px, 78vw, 400px);
    height: clamp(270px, 78vw, 400px);
  }
  .cw-rules-carousel .mv-carousel-slide img {
    width: 100%;
    height: 100%;
    max-width: 100%;
    object-fit: contain;
  }
  .cw-rules-carousel .mv-carousel-prev {
    left: 0.2rem;
  }
  .cw-rules-carousel .mv-carousel-next {
    right: 0.2rem;
  }
  .cw-rules-carousel .mv-carousel-dots {
    bottom: 0.35rem;
  }
}
