:root {
  color-scheme: dark;
  --bg: #090b10;
  --surface: rgba(255, 255, 255, .045);
  --surface-strong: #12161f;
  --border: rgba(255, 255, 255, .08);
  --border-gold: rgba(233, 196, 106, .28);
  --text: #f3f4f7;
  --hint: #8b93a3;
  --gold: #e9c46a;
  --gold-grad: linear-gradient(135deg, #f8e1a1 0%, #e9c46a 45%, #c08f2e 100%);
  --green: #2fd38a;
  --green-grad: linear-gradient(135deg, #5ef0ad 0%, #1fb872 100%);
  --red: #ff5f6d;
  --red-grad: linear-gradient(135deg, #ff8a94 0%, #e5394b 100%);
  --amber: #f5b544;
  --blue: #6ea8ff;
  --select-bg: rgba(255, 255, 255, .12);
  --select-border: rgba(255, 255, 255, .32);
  --radius: 18px;
  --shadow: 0 14px 34px -18px rgba(0, 0, 0, .8);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { background: var(--bg); }
body {
  margin: 0; min-height: 100vh; color: var(--text);
  font: 15px/1.45 "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-feature-settings: "tnum" 1, "cv11" 1;
  background:
    radial-gradient(700px 420px at 110% -8%, rgba(233, 196, 106, .14), transparent 62%),
    radial-gradient(620px 380px at -15% 6%, rgba(47, 211, 138, .09), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  padding-bottom: calc(96px + env(safe-area-inset-bottom));
  -webkit-font-smoothing: antialiased;
}
a { color: var(--gold); text-decoration: none; }
a[data-href] { cursor: pointer; }
a, img { -webkit-touch-callout: none; -webkit-user-drag: none; }
main { padding: 14px 16px 24px; max-width: 640px; margin: 0 auto; }
main > * { animation: rise .28s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

h1 { font-size: 22px; font-weight: 700; letter-spacing: -.01em; margin: 6px 0 14px; }
h2 { font-size: 16px; font-weight: 650; margin: 18px 0 10px; }
.muted { color: var(--hint); }
.small { font-size: 13px; }
.center { text-align: center; padding: 44px 12px; }
.row { display: flex; align-items: center; gap: 10px; }
.row > input:not([type="checkbox"]):not([type="radio"]) { flex: 1; min-width: 0; }
.between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.mono { font-family: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace; word-break: break-all; letter-spacing: -.01em; }
.big { font-size: 22px; font-weight: 700; }
.gold-text { background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Surfaces */

.card {
  position: relative; background: linear-gradient(180deg, rgba(255, 255, 255, .055), rgba(255, 255, 255, .025));
  border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin-bottom: 12px;
  box-shadow: var(--shadow); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.card.tap { cursor: pointer; transition: transform .15s ease, border-color .15s ease; }
.card.tap:active { transform: scale(.985); border-color: var(--select-border); }

.hero {
  position: relative; overflow: hidden; border-radius: 22px; padding: 16px; margin-bottom: 14px;
  background: linear-gradient(135deg, rgba(233, 196, 106, .18), rgba(233, 196, 106, .04) 55%, rgba(47, 211, 138, .07));
  border: 1px solid var(--border-gold); box-shadow: var(--shadow);
}
.hero::after {
  content: ""; position: absolute; width: 180px; height: 180px; right: -60px; top: -70px; border-radius: 50%;
  background: radial-gradient(circle, rgba(248, 225, 161, .35), transparent 70%); pointer-events: none;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-name { font-size: 18px; font-weight: 750; letter-spacing: -.01em; }
.brand-sub { font-size: 12px; color: var(--hint); }
.logo {
  width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; flex: none;
  background: radial-gradient(circle at 50% 40%, rgba(233, 196, 106, .22), transparent 70%), #0d1017;
  border: 1px solid var(--border-gold); box-shadow: 0 8px 22px -10px rgba(233, 196, 106, .6);
}
.logo img { width: 32px; height: 32px; filter: drop-shadow(0 3px 8px rgba(233, 196, 106, .45)); }
.hero-text { margin: 10px 0 0; font-size: 13.5px; color: #d9dce3; }
.badges { display: flex; gap: 6px; margin: 12px -16px 0; padding: 0 16px; overflow-x: auto; scrollbar-width: none; }
.badges::-webkit-scrollbar { display: none; }
.badge {
  display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 550; padding: 5px 10px; white-space: nowrap; flex: none;
  border-radius: 999px; background: rgba(0, 0, 0, .25); border: 1px solid var(--border); color: #e6e8ee;
}

/* Segmented control and chips */

.seg {
  display: flex; gap: 4px; padding: 4px; margin-bottom: 12px; border-radius: 15px;
  background: rgba(255, 255, 255, .04); border: 1px solid var(--border);
}
.seg button {
  flex: 1 1 auto; min-width: 0; border: 0; background: transparent; color: var(--hint); padding: 10px 6px; border-radius: 11px;
  font-family: inherit; font-size: 14.5px; font-weight: 600; line-height: 1.2; transition: background .2s ease, color .2s ease;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.seg button.on { background: #eef0f4; color: #0d1016; box-shadow: 0 6px 18px -10px rgba(255, 255, 255, .45); }
.seg button.on.buy { background: var(--green-grad); color: #03170c; box-shadow: 0 6px 18px -8px rgba(47, 211, 138, .7); }
.seg button.on.sell { background: var(--red-grad); color: #fff; box-shadow: 0 6px 18px -8px rgba(255, 95, 109, .7); }

.chips { display: flex; gap: 8px; overflow-x: auto; margin-bottom: 14px; padding-bottom: 2px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--border); background: rgba(255, 255, 255, .035);
  color: var(--text); border-radius: 999px; padding: 6px 13px 6px 7px; white-space: nowrap; font-family: inherit; font-size: 14px; font-weight: 550;
}
.chip.plain { padding-left: 13px; }
.chip.on { border-color: var(--select-border); background: var(--select-bg); color: #fff; }
.chips.sorts { align-items: center; gap: 6px; margin-top: -4px; }
.chips.sorts .chip { padding: 5px 11px; font-size: 13px; color: var(--hint); }
.chips.sorts .chip.on { color: #fff; }
.chips.wrap { flex-wrap: wrap; overflow: visible; }
.lang-chips .chip { padding: 7px 12px; font-size: 13.5px; }

/* Country */

.country-chip {
  position: relative; z-index: 1; flex: none; align-self: flex-start; display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 650; color: #e6e8ee;
  background: rgba(0, 0, 0, .28); border: 1px solid var(--border);
}
.country-row {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; font: inherit; color: inherit;
  padding: 13px 14px; margin-bottom: 8px;
}
.country-row.on { border-color: var(--border-gold); }
.country-flag { font-size: 28px; line-height: 1; }
.country-check { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--gold-grad); color: #1d1405; }
.country-check svg { width: 14px; height: 14px; }
.market-line { display: inline-flex; align-items: center; gap: 6px; margin: -6px 0 12px; font-size: 13px; color: var(--hint); }
.sort-label { display: inline-grid; place-items: center; flex: none; width: 26px; height: 26px; color: var(--hint); }
.sort-label svg { width: 16px; height: 16px; }

/* Coins and avatars */

.coin-ico {
  width: 24px; height: 24px; border-radius: 50%; display: inline-grid; place-items: center; flex: none;
  font-weight: 800; font-size: 13px; color: #fff;
}
.coin-ico.usdt { background: linear-gradient(135deg, #3fd1a5, #1a9c7a); }
.coin-ico.btc { background: linear-gradient(135deg, #ffb547, #f2870f); }
.coin-ico.lg { width: 34px; height: 34px; font-size: 17px; }
.coin { display: inline-flex; align-items: center; gap: 8px; }
.coin-name { font-weight: 650; }
.coin-net { font-size: 11px; color: var(--hint); font-weight: 600; letter-spacing: .04em; }

.avatar {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; flex: none;
  font-weight: 700; font-size: 15px; color: #fff; text-transform: uppercase;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .15);
}
.avatar.lg { width: 64px; height: 64px; font-size: 24px; }
.avatar { position: relative; }
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.avatar.online { overflow: visible; }
.avatar.online::after {
  content: ""; position: absolute; right: -1px; bottom: -1px; width: 11px; height: 11px; border-radius: 50%;
  background: var(--green); border: 2px solid #12151d;
}
.avatar.lg.online::after { width: 15px; height: 15px; right: 1px; bottom: 1px; }
.online-text { color: var(--green); }

.rate-hint { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin: 6px 0 2px; font-size: 12px; color: var(--hint); }
.rate-hint b { font-weight: 650; }
.rate-hint b.up { color: var(--amber); }
.rate-hint b.down { color: var(--green); }
.rate-coin { display: inline-flex; align-items: center; gap: 5px; color: var(--text); font-weight: 600; }
.rate-coin .coin-ico { width: 16px; height: 16px; font-size: 10px; }
.chips.sorts + .rate-hint { margin: -6px 0 12px; }

/* Offer card */

.offer-top { display: flex; align-items: center; gap: 11px; }
.offer-name { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.offer-rep { font-size: 12px; color: var(--hint); }
.offer-price { display: flex; align-items: baseline; gap: 6px; margin: 12px 0 4px; }
.offer-price b { font-size: 26px; font-weight: 750; letter-spacing: -.02em; }
.offer-price .chev { margin-left: auto; align-self: center; }
.offer-flags { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: 6px; }
.offer-flags .tag.instant { margin-top: 0; }
.offer-speed { font-size: 12px; color: var(--hint); white-space: nowrap; }
.offer-limits { font-size: 13px; color: var(--hint); }
.offer-pills { margin-top: 10px; }
.offer-meta { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 13px; color: var(--hint); }
.pills { display: flex; gap: 5px; flex-wrap: wrap; }
.pill { font-size: 11px; font-weight: 650; padding: 3px 8px; border-radius: 7px; background: rgba(255, 255, 255, .06); color: #cfd3dc; letter-spacing: .02em; }
.chev { color: var(--hint); font-size: 22px; line-height: 1; margin-left: 4px; }

.price { font-size: 22px; font-weight: 750; letter-spacing: -.02em; }

.tag {
  display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 650; padding: 4px 10px; border-radius: 999px;
  background: rgba(255, 255, 255, .07); color: var(--hint); white-space: nowrap;
}
.tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.tag.green { background: rgba(47, 211, 138, .13); color: var(--green); }
.tag.red { background: rgba(255, 95, 109, .13); color: var(--red); }
.tag.amber { background: rgba(245, 181, 68, .13); color: var(--amber); }
.tag.blue { background: rgba(110, 168, 255, .13); color: var(--blue); }

/* Forms */

label { display: block; font-size: 13px; font-weight: 550; color: var(--hint); margin: 14px 0 6px; }
input, textarea, select {
  width: 100%; border: 1px solid var(--border); background: rgba(0, 0, 0, .28); color: var(--text);
  border-radius: 14px; padding: 13px 14px; font-size: 16px; font-family: inherit; outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
input::placeholder, textarea::placeholder { color: #5d6474; }
input:focus, textarea:focus, select:focus { border-color: var(--select-border); box-shadow: 0 0 0 3px rgba(255, 255, 255, .07); }
input[spellcheck="false"] { font-family: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace; font-size: 14px; letter-spacing: -.02em; }
textarea { resize: vertical; min-height: 76px; }
.checks { display: flex; flex-wrap: wrap; gap: 8px; }
.check {
  flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 10px; margin: 0; padding: 12px 14px; border-radius: 14px;
  border: 1px solid var(--border); background: rgba(255, 255, 255, .03); color: var(--text); font-size: 15px; font-weight: 600;
  overflow-wrap: anywhere;
}
.check input { flex: none; width: 18px; height: 18px; accent-color: var(--gold); margin: 0; }

.btn {
  display: block; width: 100%; border: 0; border-radius: 15px; padding: 15px; margin-top: 12px;
  font-family: inherit; font-size: 16px; font-weight: 700; line-height: 1.2; letter-spacing: .01em; cursor: pointer; text-wrap: balance;
  background: var(--gold-grad); color: #1d1405; box-shadow: 0 12px 26px -12px rgba(233, 196, 106, .75);
  transition: transform .12s ease, opacity .15s ease;
}
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .5; }
.btn.green { background: var(--green-grad); color: #03170c; box-shadow: 0 12px 26px -12px rgba(47, 211, 138, .7); }
.btn.red { background: var(--red-grad); color: #fff; box-shadow: 0 12px 26px -12px rgba(255, 95, 109, .7); }
.btn.ghost { background: rgba(255, 255, 255, .04); color: var(--text); border: 1px solid var(--border); box-shadow: none; }
.btn.danger { background: rgba(255, 95, 109, .07); color: var(--red); border: 1px solid rgba(255, 95, 109, .35); box-shadow: none; }
.btn.small {
  display: inline-block; width: auto; padding: 8px 13px; font-size: 13px; margin: 0; border-radius: 11px; flex: none;
}
.btn.small.ghost { color: var(--text); border-color: var(--border); background: rgba(255, 255, 255, .06); }

/* Key-value lists */

.kv { display: flex; justify-content: space-between; gap: 14px; padding: 9px 0; border-bottom: 1px solid rgba(255, 255, 255, .05); }
.kv:last-child { border-bottom: 0; }
.kv span:first-child { color: var(--hint); }
.kv span:last-child { text-align: right; font-weight: 600; }

.copybox {
  display: flex; align-items: center; gap: 10px; margin: 8px 0; padding: 12px 12px 12px 14px; border-radius: 14px;
  background: rgba(0, 0, 0, .3); border: 1px dashed rgba(255, 255, 255, .16);
}
.copybox .mono { flex: 1; font-size: 14px; }
.copybox .mono.big { font-size: 22px; font-weight: 750; color: #fff; }

/* Deal */

.deal-head { padding-bottom: 14px; }
.deal-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.deal-title h1 { margin: 0; }
.steps { display: flex; gap: 6px; margin: 16px 0 6px; }
.steps div { flex: 1; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.steps div.done { background: var(--green-grad); }
.steps div.now { background: var(--gold-grad); animation: glow 1.8s ease-in-out infinite; }
@keyframes glow { 50% { opacity: .55; } }
.steplabels { display: flex; font-size: 11px; color: var(--hint); font-weight: 550; }
.steplabels span { flex: 1; text-align: center; }

.note {
  position: relative; padding: 12px 14px 12px 16px; margin: 12px 0; border-radius: 14px;
  background: rgba(110, 168, 255, .06); border: 1px solid rgba(110, 168, 255, .16); color: #dfe5ef; font-size: 14px;
}
.note::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 3px; background: var(--blue); }
.note.warn { background: rgba(245, 181, 68, .08); border-color: rgba(245, 181, 68, .25); }
.note.warn::before { background: var(--amber); }
a.note { display: block; color: #dfe5ef; text-decoration: none; }

.timer-card { display: flex; align-items: center; justify-content: space-between; }
.timer { font-variant-numeric: tabular-nums; font-weight: 750; font-size: 22px; letter-spacing: .02em; }

/* Chat */

.chat { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.msg {
  max-width: 85%; padding: 9px 12px; border-radius: 16px 16px 16px 6px; background: rgba(255, 255, 255, .06);
  white-space: pre-wrap; word-wrap: break-word;
}
.msg.me { align-self: flex-end; border-radius: 16px 16px 6px 16px; background: linear-gradient(135deg, #3b6fd8, #2c56b3); color: #fff; }
.msg.me .who { color: rgba(255, 255, 255, .7); }
.msg.guarantor { align-self: center; border-radius: 14px; background: rgba(233, 196, 106, .1); border: 1px solid rgba(233, 196, 106, .28); }
.msg .who { font-size: 11px; color: var(--hint); margin-bottom: 3px; font-weight: 600; }
.msg img { max-width: 100%; border-radius: 12px; display: block; margin-top: 5px; }
.composer { display: flex; gap: 8px; align-items: flex-end; }
.composer[hidden] { display: none; }
.composer textarea { min-height: 46px; height: 46px; padding: 12px 14px; }
.iconbtn {
  border: 1px solid var(--border); background: rgba(255, 255, 255, .05); color: var(--text); border-radius: 14px;
  min-width: 46px; height: 46px; font-size: 18px; display: grid; place-items: center;
}
.iconbtn.send { background: var(--gold-grad); color: #1d1405; border: 0; }
.iconbtn svg { width: 20px; height: 20px; }
.iconbtn.small { min-width: 32px; width: 32px; height: 32px; border-radius: 10px; color: var(--hint); }
.iconbtn.small svg { width: 16px; height: 16px; }

.name-box { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.name-row { display: flex; align-items: center; justify-content: center; gap: 8px; max-width: 100%; }
.name-row h1 { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.name-box input { text-align: center; font-size: 17px; font-weight: 650; }
.name-hint { max-width: 300px; }
.name-actions { justify-content: center; gap: 8px; }
.btn.small.ghost.plain { color: var(--text); border-color: var(--border); background: rgba(255, 255, 255, .04); }
.linkbtn { border: 0; background: none; color: var(--gold); font-family: inherit; font-size: 13px; font-weight: 600; cursor: pointer; padding: 4px; }
a.linkbtn.alerts-link { display: inline-block; margin: 2px 0 8px; padding: 4px 0; text-decoration: none; }

/* Profile */

.profile-head { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 22px 16px; }
.profile-head h1 { margin: 0; }
.bulk-bar { flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.price-mode { margin: 14px 0 0; }
.margin-row input { flex: 1; min-width: 0; }
.float-hint { margin-top: 6px; }
.fee-row { margin-top: 12px; }
.fee-kind { font-weight: 650; margin-bottom: 4px; }
.fee-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.fee-grid input { width: 100%; min-width: 0; padding-left: 8px; padding-right: 6px; font-size: 14px; }
.legal-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin: 18px 0 6px; color: var(--hint); }
.legal-links a { color: var(--hint); text-decoration: underline; text-underline-offset: 3px; }
.stats + .stats { margin-top: 8px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 4px; width: 100%; }
.stat { padding: 12px 6px; border-radius: 14px; background: rgba(0, 0, 0, .25); border: 1px solid var(--border); }
.stat b { display: block; font-size: 20px; font-weight: 750; }
.stat span { font-size: 12px; color: var(--hint); }

/* Loading and empty states */

.skel {
  height: 118px; border-radius: var(--radius); margin-bottom: 12px; border: 1px solid var(--border);
  background: linear-gradient(100deg, rgba(255, 255, 255, .03) 30%, rgba(255, 255, 255, .08) 50%, rgba(255, 255, 255, .03) 70%);
  background-size: 300% 100%; animation: shimmer 1.3s linear infinite;
}
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }
/* Traders, ratings and reviews */

.user-link { display: flex; align-items: center; gap: 10px; min-width: 0; color: inherit; text-decoration: none; }
.user-link:active { opacity: .7; }
.user-link .chev { font-size: 18px; margin-left: 6px; vertical-align: -1px; }
.counterparty { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.stars { color: #3a4050; letter-spacing: 1px; white-space: nowrap; font-size: 15px; }
.stars .on { color: var(--gold); }
.review-text { margin-top: 10px; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.45; }
.review-form h2 { margin-top: 0; }
.star-pick { display: flex; justify-content: center; gap: 6px; margin: 14px 0 4px; }
.star {
  border: 0; background: none; font-size: 40px; line-height: 1; padding: 2px 4px; color: #3a4050; cursor: pointer;
  transition: transform .12s ease, color .12s ease;
}
.star.on { color: var(--gold); text-shadow: 0 0 18px rgba(233, 196, 106, .45); }
.star:active { transform: scale(.88); }
.star-label { text-align: center; color: var(--hint); font-size: 13px; font-weight: 600; margin-bottom: 12px; min-height: 18px; }
.review-form textarea { margin-bottom: 12px; }
.bars { display: grid; gap: 8px; }
.bar-row { display: grid; grid-template-columns: 34px 1fr 28px; align-items: center; gap: 10px; font-size: 13px; }
.bar-label { color: var(--hint); white-space: nowrap; }
.bar { height: 8px; border-radius: 999px; background: rgba(255, 255, 255, .06); overflow: hidden; }
.bar span { display: block; height: 100%; border-radius: inherit; background: var(--gold-grad); }
.bar-count { text-align: right; color: var(--hint); }
a.btn { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }

.empty { text-align: center; padding: 36px 16px; color: var(--hint); }
.empty .empty-ico { font-size: 36px; margin-bottom: 8px; opacity: .85; }

/* Navigation */

nav#nav {
  position: fixed; left: 12px; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom)); max-width: 616px; margin: 0 auto;
  display: flex; padding: 6px; border-radius: 22px; z-index: 5;
  background: rgba(16, 19, 27, .82); border: 1px solid var(--border);
  backdrop-filter: blur(22px) saturate(1.4); -webkit-backdrop-filter: blur(22px) saturate(1.4);
  box-shadow: 0 18px 40px -16px rgba(0, 0, 0, .9);
}
nav#nav a {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 7px 0 6px; border-radius: 16px;
  color: var(--hint); font-size: 11px; font-weight: 600; transition: color .2s ease, background .2s ease;
}
nav#nav a svg { width: 22px; height: 22px; }
nav#nav a.on { color: #fff; background: rgba(255, 255, 255, .1); }
nav#nav a.create.on, nav#nav a.create:active { color: var(--gold); }
nav#nav a.create svg { width: 26px; height: 26px; }
nav#nav a[hidden], nav#nav[hidden] { display: none; }

.a-tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 6px; text-align: center; }
.a-tiles .stat span { display: block; }
.a-tiles .stat .a-sub { color: var(--green); font-size: 11px; margin-top: 2px; }
.a-turnover { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.a-turnover:last-child { border-bottom: 0; }
.a-badges { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.a-badge {
  display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 4px; border-radius: 14px;
  background: rgba(255, 255, 255, .03); border: 1px solid var(--border); color: var(--hint); font-size: 12px; text-align: center;
}
.a-badge b { font-size: 22px; color: var(--text); }
.a-badge.hot { border-color: rgba(245, 181, 68, .45); background: rgba(245, 181, 68, .08); }
.a-badge.hot b { color: var(--amber); }
.a-links { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 14px 0 6px; }
.a-links .btn { margin: 0; padding: 13px 10px; font-size: 14px; font-weight: 650; justify-content: flex-start; text-align: left; }
.a-row { display: block; color: inherit; }
.a-panel { border-color: var(--select-border); }
.a-panel h2 { margin-top: 0; }
.a-party { padding: 8px 0; border-bottom: 1px solid var(--border); }
.a-tg { margin-top: 2px; overflow-wrap: anywhere; }
.a-payout { margin-top: 14px; display: grid; gap: 6px; }
.a-panel .btn.green, .a-panel .btn.red { margin-top: 8px; }
.net-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 6px; }
.net-grid label { margin: 0; }
.net-grid input { margin-top: 4px; }
.a-newbie, .a-verify { align-items: flex-end; }
.a-newbie input, .a-verify input { margin-top: 4px; }
.a-verify .grow, .a-newbie .grow { min-width: 0; }
.a-newbie, .a-verify { flex-wrap: wrap; }
.a-newbie > .btn, .a-verify > .btn { flex: 1 0 100%; }
.a-bc-count { text-align: right; margin-top: 4px; }
.a-setting { margin-bottom: 12px; }
.a-setting-title {
  font-size: 15px; font-weight: 700; margin: -2px 0 12px; padding-bottom: 10px; border-bottom: 1px solid var(--border);
}

.fav-box { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-top: 14px; }
.fav-row { padding: 8px 0; border-bottom: 1px solid var(--border); }
.fav-row:last-child { border-bottom: 0; }
.a-badges:has(> :nth-child(4)) { grid-template-columns: repeat(4, 1fr); }
.a-badges:has(> :nth-child(5)) { grid-template-columns: repeat(6, 1fr); }
.a-badges:has(> :nth-child(5)) > * { grid-column: span 2; }
.a-badges:has(> :nth-child(5)) > :nth-child(n+4) { grid-column: span 3; }

.ref-card { display: flex; align-items: center; gap: 12px; color: inherit; border-color: var(--border-gold); }
.ref-icon { font-size: 26px; }
.ref-balance { font-size: 15px; color: var(--hint); margin-bottom: 4px; }
.ref-balance b { font-size: 30px; font-weight: 750; }
.ref-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--border); }
.ref-row:last-child { border-bottom: 0; }
.green-text { color: var(--green); }
.ref-stats { margin-top: 12px; text-align: center; }
.ref-card.plain-card { border-color: var(--border); }

.saved { margin: 2px 0 8px; }
.saved .chips { margin-top: 6px; }
.saved-chip { font-family: inherit; font-size: 12.5px; }
.req-add { display: grid; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.req-add .btn { justify-self: start; }
.req-address { overflow-wrap: anywhere; }

.bank-filter { display: flex; align-items: center; gap: 8px; margin: 2px 0 10px; }
.bank-filter select { flex: 1; padding: 9px 12px; font-size: 13px; }
.bank-filter.on select { border-color: rgba(110, 168, 255, .55); color: #cfe0ff; }
.bank-pill { background: rgba(110, 168, 255, .13); color: #a9c8ff; }
.bank-line { margin-top: 4px; color: #a9c8ff; }
.bal-coin .coin-label, .bal-coin .row.between > :first-child { flex-shrink: 0; }
.bal-amount { color: var(--hint); font-size: 14px; }
.bal-amount b { font-size: 22px; font-weight: 750; }
.bal-actions { margin-top: 10px; gap: 8px; }
.bal-actions .btn { flex: 1; }
.bal-form { display: grid; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.bal-form label { margin: 0; }
.bal-form .row input { flex: 1; }
.tag.instant { background: rgba(245, 181, 68, .13); color: var(--amber); margin-top: 6px; }
.tag.instant::before { display: none; }
.tag.timer-tag { font-size: 14px; font-variant-numeric: tabular-nums; }
.tag.timer-tag::before { display: none; }
.bal-hint { text-align: center; margin-top: 8px; }
.linkbtn.bal-cancel { display: block; margin: 14px auto 0; color: var(--hint); }
.instant-note { border-color: rgba(245, 181, 68, .35); }
.verify-card { border-color: rgba(47, 211, 138, .25); }
.verify-card.on { background: linear-gradient(135deg, rgba(47, 211, 138, .10), transparent 60%), var(--surface); }
.verify-title { display: flex; align-items: center; gap: 8px; font-weight: 700; margin-bottom: 6px; }
.verify-title svg { width: 18px; height: 18px; color: var(--green); }
.verify-title .tag { margin-left: auto; }
.verify-perks { margin: 4px 0 12px; padding-left: 18px; color: var(--hint); }
.verify-perks li { margin: 3px 0; }
.verify-plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)); gap: 8px; margin-top: 8px; }
.verify-plan {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 14px 8px 10px; border-radius: 12px; border: 1px solid var(--border); background: rgba(255, 255, 255, .03);
  color: inherit; font: inherit; cursor: pointer;
}
.verify-plan b { font-size: 14px; }
.verify-plan-price { font-size: 16px; font-weight: 750; color: var(--green); }
.verify-plan.best { border-color: rgba(47, 211, 138, .55); background: rgba(47, 211, 138, .08); }
.verify-plan .tag { position: absolute; top: -9px; font-size: 10px; padding: 2px 6px; }
.verify-plan:disabled { opacity: .5; }
.verify-one { display: flex; flex-direction: column; align-items: center; gap: 3px; margin-top: 4px; }
.verify-one small { font-size: 13px; font-weight: 650; opacity: .75; }
.verify-note { margin-top: 12px; text-align: center; }

.verified {
  display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; margin-left: 5px;
  border-radius: 50%; background: var(--green); color: #03170c; vertical-align: -2px; flex: none;
}
.verified svg { width: 11px; height: 11px; }
h1 .verified { width: 20px; height: 20px; vertical-align: -3px; }
h1 .verified svg { width: 14px; height: 14px; }
.kyc-mark {
  display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 16px; margin-left: 5px;
  border-radius: 5px; background: rgba(110, 168, 255, .16); color: var(--blue); vertical-align: -2px; flex: none;
}
.kyc-mark svg { width: 13px; height: 13px; }
h1 .kyc-mark { width: 24px; height: 20px; vertical-align: -3px; }
h1 .kyc-mark svg { width: 16px; height: 16px; }
.tags-row { justify-content: center; flex-wrap: wrap; gap: 6px; }

.kyc-card { border-color: rgba(110, 168, 255, .25); }
.kyc-card.on { background: linear-gradient(135deg, rgba(110, 168, 255, .10), transparent 60%), var(--surface); }
.kyc-card .verify-title svg { color: var(--blue); }
.kyc-card .btn { margin-top: 10px; }
.kyc-privacy { margin-top: 10px; }

.lock {
  position: fixed; inset: 0; z-index: 20; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 24px 24px calc(24px + env(safe-area-inset-bottom)); background: var(--bg);
}
.lock-icon { font-size: 40px; }
.lock-name { margin-top: 6px; color: var(--hint); font-size: 14px; }
.lock-title { margin-top: 14px; font-size: 19px; font-weight: 700; }
.lock-dots { display: flex; gap: 16px; margin-top: 22px; height: 14px; }
.lock-dots span { width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid var(--select-border); transition: background .12s; }
.lock-dots span.on { background: var(--gold); border-color: var(--gold); }
.lock-dots.shake { animation: shake .38s; }
@keyframes shake { 20%, 60% { transform: translateX(-9px); } 40%, 80% { transform: translateX(9px); } }
.lock-msg { min-height: 20px; margin-top: 14px; color: var(--red); font-size: 14px; text-align: center; max-width: 300px; }
.lock-pad { display: grid; grid-template-columns: repeat(3, 76px); gap: 16px 24px; margin-top: 18px; }
.lock-key {
  width: 76px; height: 76px; border-radius: 50%; border: 0; background: var(--surface-strong); color: var(--text);
  font: 500 30px/1 Inter, system-ui, sans-serif; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.lock-key:active { background: var(--select-bg); }
.lock-key.fn { background: transparent; font-size: 24px; }
.lock-key.ok { color: var(--gold); }
.pin-input { -webkit-text-security: disc; text-security: disc; letter-spacing: 2px; }
.pin-input::placeholder { letter-spacing: normal; }
.lock-bio {
  margin-top: 22px; padding: 10px 20px; border: 1px solid rgba(233, 196, 106, .45); border-radius: 999px;
  background: rgba(233, 196, 106, .08); color: var(--gold); font-size: 15px; font-weight: 600; cursor: pointer;
}
.lock-bio:active { transform: scale(.97); }
.lock-forgot { margin-top: 26px; border: 0; background: none; color: var(--hint); font-size: 14px; text-decoration: underline; cursor: pointer; }

#toast {
  position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 10;
  max-width: 90%; padding: 11px 18px; border-radius: 999px; font-size: 14px; font-weight: 550; text-align: center;
  background: rgba(22, 26, 36, .95); color: #fff; border: 1px solid var(--select-border); box-shadow: var(--shadow);
}

/* Light theme: the same layout on a light background (html[data-theme], set from the profile). */

html[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f5f8;
  --surface: #ffffff;
  --surface-strong: #ffffff;
  --border: rgba(15, 23, 42, .1);
  --border-gold: rgba(176, 125, 30, .38);
  --text: #12151c;
  --hint: #687080;
  --gold: #a87414;
  --green: #109a5e;
  --red: #dc3445;
  --amber: #b97a0c;
  --blue: #2f6fdf;
  --select-bg: rgba(15, 23, 42, .07);
  --select-border: rgba(15, 23, 42, .3);
  --shadow: 0 10px 26px -18px rgba(15, 23, 42, .35);
}
[data-theme="light"] body {
  background:
    radial-gradient(700px 420px at 110% -8%, rgba(233, 196, 106, .2), transparent 62%),
    radial-gradient(620px 380px at -15% 6%, rgba(47, 211, 138, .1), transparent 60%),
    var(--bg);
}
[data-theme="light"] .gold-text { background-image: linear-gradient(135deg, #c9962f 0%, #a87414 55%, #835808 100%); }
[data-theme="light"] .card { background: #fff; backdrop-filter: none; -webkit-backdrop-filter: none; }
[data-theme="light"] .hero { background: linear-gradient(135deg, rgba(233, 196, 106, .28), rgba(255, 255, 255, .9) 55%, rgba(47, 211, 138, .1)); }
[data-theme="light"] .hero-text { color: #3d4452; }
[data-theme="light"] .badge, [data-theme="light"] .country-chip { background: rgba(255, 255, 255, .8); color: var(--text); }
[data-theme="light"] .seg { background: rgba(15, 23, 42, .05); }
[data-theme="light"] .seg button.on:not(.buy):not(.sell) { background: #fff; color: var(--text); box-shadow: 0 4px 12px -6px rgba(15, 23, 42, .35); }
[data-theme="light"] .chip, [data-theme="light"] .check, [data-theme="light"] .iconbtn,
[data-theme="light"] .btn.ghost, [data-theme="light"] .btn.small.ghost, [data-theme="light"] .btn.small.ghost.plain,
[data-theme="light"] .stat, [data-theme="light"] .a-badge:not(.hot), [data-theme="light"] .verify-plan:not(.best) { background: #fff; }
[data-theme="light"] .verify-card.on { background: linear-gradient(135deg, rgba(47, 211, 138, .12), transparent 60%), #fff; }
[data-theme="light"] .kyc-card.on { background: linear-gradient(135deg, rgba(110, 168, 255, .12), transparent 60%), #fff; }
[data-theme="light"] .iconbtn.send { background: var(--gold-grad); }
[data-theme="light"] .chip.on, [data-theme="light"] .chips.sorts .chip.on { background: var(--select-bg); color: var(--text); }
[data-theme="light"] .avatar.online::after { border-color: #fff; }
[data-theme="light"] .pill { background: rgba(15, 23, 42, .06); color: #4b5262; }
[data-theme="light"] .tag { background: rgba(15, 23, 42, .06); }
[data-theme="light"] .tag.green { background: rgba(16, 154, 94, .12); }
[data-theme="light"] .tag.red { background: rgba(220, 52, 69, .1); }
[data-theme="light"] .tag.amber, [data-theme="light"] .tag.instant { background: rgba(185, 122, 12, .12); }
[data-theme="light"] .tag.blue { background: rgba(47, 111, 223, .1); }
[data-theme="light"] input, [data-theme="light"] textarea, [data-theme="light"] select { background: #fff; }
[data-theme="light"] input::placeholder, [data-theme="light"] textarea::placeholder { color: #9ba2ae; }
[data-theme="light"] input:focus, [data-theme="light"] textarea:focus, [data-theme="light"] select:focus { box-shadow: 0 0 0 3px rgba(15, 23, 42, .06); }
[data-theme="light"] .kv { border-bottom-color: rgba(15, 23, 42, .07); }
[data-theme="light"] .copybox { background: rgba(15, 23, 42, .035); border-color: rgba(15, 23, 42, .2); }
[data-theme="light"] .copybox .mono.big { color: var(--text); }
[data-theme="light"] .steps div:not(.done):not(.now) { background: rgba(15, 23, 42, .08); }
[data-theme="light"] .note, [data-theme="light"] a.note { color: #1f2633; background: rgba(47, 111, 223, .06); }
[data-theme="light"] .note.warn { background: rgba(245, 181, 68, .12); }
[data-theme="light"] .msg { background: rgba(15, 23, 42, .06); }
[data-theme="light"] .msg.me { background: linear-gradient(135deg, #3b6fd8, #2c56b3); }
[data-theme="light"] .msg.guarantor { background: rgba(233, 196, 106, .16); }
[data-theme="light"] .skel { background: linear-gradient(100deg, rgba(15, 23, 42, .04) 30%, rgba(15, 23, 42, .09) 50%, rgba(15, 23, 42, .04) 70%); background-size: 300% 100%; }
[data-theme="light"] .stars, [data-theme="light"] .star { color: #d3d7de; }
[data-theme="light"] .stars .on, [data-theme="light"] .star.on { color: #e0a82e; }
[data-theme="light"] .bar { background: rgba(15, 23, 42, .07); }
[data-theme="light"] nav#nav { background: rgba(255, 255, 255, .88); box-shadow: 0 14px 34px -16px rgba(15, 23, 42, .35); }
[data-theme="light"] nav#nav a.on { color: var(--text); background: rgba(15, 23, 42, .07); }
[data-theme="light"] .bank-filter.on select { color: var(--blue); border-color: rgba(47, 111, 223, .5); }
[data-theme="light"] .bank-pill { background: rgba(47, 111, 223, .1); color: var(--blue); }
[data-theme="light"] .bank-line { color: var(--blue); }
[data-theme="light"] .lock-key { box-shadow: 0 4px 14px -8px rgba(15, 23, 42, .3); }
