:root {
  --bg: #070708;
  --surface: rgba(18, 18, 21, 0.86);
  --surface-2: #17171b;
  --line: #26262c;
  --line-strong: #34343c;
  --text: #f3f3f5;
  --muted: #8d8d97;
  --faint: #5e5e68;
  --red: #c8102e;
  --red-bright: #ff2d46;
  --red-deep: #6e0a17;
  --red-glow: rgba(200, 16, 46, 0.35);
  --ok: #2fd27a;
  --warn: #ffb020;
  --radius: 18px;
  --head: 'Chakra Petch', 'Inter', system-ui, sans-serif;
  --body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body {
  font: 15px/1.45 var(--body);
  min-height: 100vh;
  padding-bottom: calc(76px + var(--safe-bottom));
  overflow-x: hidden;
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }

.backdrop {
  position: fixed; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(7, 7, 8, 0.15) 0%, rgba(7, 7, 8, 0.85) 38%, var(--bg) 70%),
    url('/assets/bg.jpg') center top / cover no-repeat;
}

/* --- Header & tabs ----------------------------------------------------------- */

.top { position: relative; display: flex; align-items: center; justify-content: center; padding: 18px 16px 6px; }
.top a { display: flex; }
.back {
  position: absolute; left: 12px; top: 50%; transform: translateY(-35%);
  width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center;
  background: var(--surface-2); border: 1px solid var(--line-strong); color: var(--text);
}
.back svg { width: 20px; height: 20px; }
.back:active { background: var(--red-deep); }
.wordmark { height: 30px; width: auto; mix-blend-mode: screen; }

main { padding: 8px 16px 24px; max-width: 520px; margin: 0 auto; }

.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; justify-content: center; gap: 8px;
  padding: 8px 16px calc(8px + var(--safe-bottom));
  background: rgba(7, 7, 8, 0.92); border-top: 1px solid var(--line);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.tabs a {
  flex: 1; max-width: 200px; display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 6px 0; border-radius: 12px; text-decoration: none; color: var(--muted);
  font: 600 12px var(--head); letter-spacing: 0.06em; text-transform: uppercase;
}
.tabs svg { width: 22px; height: 22px; }
.tabs a.on { color: var(--text); }
.tabs a.on svg { color: var(--red-bright); filter: drop-shadow(0 0 6px var(--red-glow)); }

/* --- Cards ----------------------------------------------------------------------- */

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.card + .card { margin-top: 10px; }
.label {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  font: 600 11px var(--head); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted);
}
.label .hint { font: 500 12px var(--body); letter-spacing: 0; text-transform: none; color: var(--faint); }

.h1 { font: 700 22px var(--head); letter-spacing: 0.02em; margin: 6px 2px 14px; text-transform: uppercase; }
.h1 small { display: block; font: 500 13px var(--body); color: var(--muted); text-transform: none; letter-spacing: 0; margin-top: 2px; }

/* --- Swap form --------------------------------------------------------------------- */

.leg-row { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.amount {
  flex: 1; min-width: 0; background: none; border: 0; outline: 0; padding: 0;
  font: 600 28px var(--head); letter-spacing: 0.01em;
}
.amount::placeholder { color: var(--faint); }
.amount.readonly { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.amount.loading { color: var(--faint); }

.coin-btn {
  display: flex; align-items: center; gap: 8px; flex-shrink: 0;
  background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: 999px;
  padding: 6px 10px 6px 6px; max-width: 58%;
}
.coin-btn:active { transform: scale(0.97); }
.coin-btn .tick { font: 700 15px var(--head); letter-spacing: 0.03em; }
.coin-btn .net { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.coin-btn .stack { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; text-align: left; }
.coin-btn .chev { width: 14px; height: 14px; color: var(--muted); flex-shrink: 0; }

.icon { width: 30px; height: 30px; border-radius: 50%; background: #222 center / cover no-repeat; flex-shrink: 0; display: grid; place-items: center; font: 700 11px var(--head); color: var(--muted); overflow: hidden; }
.icon img { width: 100%; height: 100%; object-fit: cover; }

.unit-toggle { display: inline-flex; background: #0e0e11; border: 1px solid var(--line); border-radius: 999px; padding: 2px; }
.unit-toggle button { border: 0; background: none; padding: 3px 10px; border-radius: 999px; font: 600 11px var(--head); letter-spacing: 0.08em; color: var(--muted); }
.unit-toggle button.on { background: var(--red); color: #fff; box-shadow: 0 0 10px var(--red-glow); }

.sub-line { margin-top: 6px; font-size: 12.5px; color: var(--muted); min-height: 18px; }
.sub-line.err { color: var(--red-bright); }

.flip-wrap { display: flex; justify-content: center; margin: -8px 0; position: relative; z-index: 2; }
.flip {
  width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--red);
  background: linear-gradient(180deg, #1c0a0d, #0d0607); color: var(--red-bright);
  display: grid; place-items: center; box-shadow: 0 0 18px var(--red-glow);
}
.flip svg { width: 20px; height: 20px; }
.flip:active { transform: rotate(180deg); transition: transform 0.2s; }

.field {
  display: flex; align-items: center; gap: 8px; margin-top: 10px;
  background: #0d0d10; border: 1px solid var(--line); border-radius: 12px; padding: 4px 4px 4px 12px;
}
.field:focus-within { border-color: var(--red); box-shadow: 0 0 0 3px rgba(200, 16, 46, 0.15); }
.field input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; padding: 9px 0; font-size: 14px; font-family: ui-monospace, 'SF Mono', Menlo, monospace; }
.field input::placeholder { font-family: var(--body); color: var(--faint); }
.field.bad { border-color: var(--red-bright); }
.mini-btn {
  border: 1px solid var(--line-strong); background: var(--surface-2); border-radius: 9px;
  padding: 7px 11px; font: 600 12px var(--head); letter-spacing: 0.06em; text-transform: uppercase; color: var(--text);
}
.mini-btn:active { background: var(--red-deep); }

.meta { display: grid; gap: 6px; margin: 12px 4px 0; font-size: 13px; color: var(--muted); }
.meta div { display: flex; justify-content: space-between; gap: 12px; }
.meta b { color: var(--text); font-weight: 600; text-align: right; }

.warn { margin-top: 10px; padding: 10px 12px; border-radius: 12px; font-size: 12.5px; background: rgba(255, 176, 32, 0.08); border: 1px solid rgba(255, 176, 32, 0.25); color: #ffd58a; }
.warn.red { background: rgba(200, 16, 46, 0.1); border-color: rgba(255, 45, 70, 0.35); color: #ff9aa6; }

.cta {
  width: 100%; margin-top: 16px; padding: 16px; border: 0; border-radius: 14px;
  background: linear-gradient(180deg, #e0142f 0%, #a10d22 100%); color: #fff;
  font: 700 16px var(--head); letter-spacing: 0.14em; text-transform: uppercase;
  box-shadow: 0 8px 28px rgba(200, 16, 46, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.cta:disabled { background: #2a2a30; color: var(--faint); box-shadow: none; }
.cta:not(:disabled):active { transform: translateY(1px); }
.cta.ghost { background: transparent; border: 1px solid var(--line-strong); box-shadow: none; color: var(--text); }

.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255,255,255,.25); border-top-color: #fff; animation: spin .7s linear infinite; display: inline-block; vertical-align: -3px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* --- Sheets (coin picker, confirm) ------------------------------------------------- */

.sheet {
  position: fixed; inset: 0; z-index: 40; background: var(--bg);
  display: flex; flex-direction: column; animation: up .18s ease-out;
}
@keyframes up { from { transform: translateY(16px); opacity: 0; } }
.sheet-head { padding: 14px 16px 10px; border-bottom: 1px solid var(--line); background: rgba(7,7,8,.96); }
.sheet-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.sheet-title h2 { margin: 0; font: 700 18px var(--head); letter-spacing: 0.06em; text-transform: uppercase; }
.close { border: 0; background: var(--surface-2); width: 32px; height: 32px; border-radius: 10px; color: var(--muted); font-size: 18px; line-height: 1; }
.search { display: flex; align-items: center; gap: 8px; background: #0f0f12; border: 1px solid var(--line-strong); border-radius: 12px; padding: 0 12px; }
.search:focus-within { border-color: var(--red); }
.search svg { width: 18px; height: 18px; color: var(--muted); flex-shrink: 0; }
.search input { flex: 1; background: none; border: 0; outline: 0; padding: 12px 0; font-size: 15px; }
.chips { display: flex; gap: 6px; overflow-x: auto; padding-top: 10px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { display: flex; align-items: center; gap: 6px; flex-shrink: 0; border: 1px solid var(--line-strong); background: var(--surface-2); border-radius: 999px; padding: 4px 10px 4px 4px; font: 600 13px var(--head); }
.chip .icon { width: 22px; height: 22px; }
.list { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 6px 8px calc(16px + var(--safe-bottom)); }
.section { font: 600 11px var(--head); letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); padding: 12px 10px 6px; }
.row { display: flex; align-items: center; gap: 12px; width: 100%; border: 0; background: none; padding: 10px; border-radius: 12px; text-align: left; }
.row:active, .row.sel { background: var(--surface-2); }
.row .icon { width: 36px; height: 36px; }
.row .main { flex: 1; min-width: 0; }
.row .t { font: 700 15px var(--head); letter-spacing: 0.03em; }
.row .n { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.badge { flex-shrink: 0; font: 600 10.5px var(--head); letter-spacing: 0.08em; text-transform: uppercase; color: #ff8c99; background: rgba(200, 16, 46, 0.12); border: 1px solid rgba(200, 16, 46, 0.35); padding: 3px 7px; border-radius: 6px; max-width: 40%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.empty { text-align: center; color: var(--muted); padding: 40px 16px; }
.sheet-body { flex: 1; overflow-y: auto; padding: 16px 16px calc(20px + var(--safe-bottom)); }

/* --- Exchange (tracking) -------------------------------------------------------------- */

.status-pill { display: inline-flex; align-items: center; gap: 6px; font: 600 12px var(--head); letter-spacing: 0.08em; text-transform: uppercase; padding: 5px 10px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line-strong); color: var(--muted); }
.status-pill.live { color: #ff9aa6; border-color: rgba(255,45,70,.4); background: rgba(200,16,46,.1); }
.status-pill.done { color: var(--ok); border-color: rgba(47,210,122,.35); background: rgba(47,210,122,.08); }
.status-pill.bad { color: var(--red-bright); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.live .dot { animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .25; } }

.x-head { display: flex; justify-content: space-between; align-items: center; margin: 4px 2px 14px; gap: 10px; }
.x-head h1 { margin: 0; font: 700 22px var(--head); text-transform: uppercase; letter-spacing: 0.04em; }

.pair { display: flex; align-items: center; gap: 10px; }
.pair .side { flex: 1; min-width: 0; }
.pair .side .v { font: 700 18px var(--head); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pair .side .c { font-size: 12.5px; color: var(--muted); }
.pair .arrow { color: var(--red-bright); flex-shrink: 0; }
.pair .side:last-child { text-align: right; }

.steps { list-style: none; margin: 4px 0 0; padding: 0; }
.steps li { display: flex; gap: 12px; position: relative; padding-bottom: 16px; }
.steps li:last-child { padding-bottom: 0; }
.steps li::before { content: ''; position: absolute; left: 11px; top: 26px; bottom: 2px; width: 2px; background: var(--line); }
.steps li:last-child::before { display: none; }
.steps .mark { width: 24px; height: 24px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center; border: 2px solid var(--line-strong); background: var(--bg); font: 700 11px var(--head); color: var(--faint); z-index: 1; }
.steps .done .mark { background: var(--red); border-color: var(--red); color: #fff; }
.steps .done::before { background: var(--red); }
.steps .now .mark { border-color: var(--red-bright); color: var(--red-bright); box-shadow: 0 0 0 4px rgba(200,16,46,.18); animation: ring 1.6s ease-in-out infinite; }
@keyframes ring { 50% { box-shadow: 0 0 0 8px rgba(200,16,46,.05); } }
.steps .txt b { display: block; font: 600 14px var(--head); letter-spacing: 0.03em; }
.steps .txt span { font-size: 12.5px; color: var(--muted); }
.steps .todo .txt b { color: var(--faint); }

.deposit { text-align: center; }
.qr { width: 184px; height: 184px; margin: 12px auto; border-radius: 14px; background: #fff; padding: 8px; box-shadow: 0 0 0 1px var(--line), 0 10px 30px rgba(0,0,0,.5); }
.qr img { width: 100%; height: 100%; display: block; }
.big-amount { font: 700 26px var(--head); letter-spacing: 0.01em; margin-top: 6px; }
.copy-box { display: flex; align-items: center; gap: 8px; margin-top: 10px; background: #0d0d10; border: 1px solid var(--line); border-radius: 12px; padding: 10px 10px 10px 12px; text-align: left; }
.copy-box code { flex: 1; min-width: 0; word-break: break-all; font: 13.5px/1.4 ui-monospace, 'SF Mono', Menlo, monospace; color: var(--text); }
.copy-box .k { display: block; font: 600 10.5px var(--head); letter-spacing: .12em; text-transform: uppercase; color: var(--faint); margin-bottom: 2px; }
.timer { margin-top: 10px; font-size: 12.5px; color: var(--muted); }
.timer b { color: var(--text); font-family: var(--head); }

.kv { display: grid; gap: 10px; }
.kv div { display: flex; justify-content: space-between; gap: 12px; font-size: 13.5px; }
.kv span { color: var(--muted); flex-shrink: 0; }
.kv b { font-weight: 600; text-align: right; word-break: break-all; }
.kv a { color: #ff8c99; text-decoration: none; font-weight: 600; }

/* --- History ---------------------------------------------------------------------------- */

.h-item { display: block; text-decoration: none; }
.h-item .top-line { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; }
.h-item .id { font: 700 14px var(--head); letter-spacing: 0.05em; color: var(--muted); }
.h-item .date { font-size: 12px; color: var(--faint); margin-top: 8px; }

.hero-empty { text-align: center; padding: 30px 16px; }
.hero-empty img { width: 96px; filter: drop-shadow(0 0 24px var(--red-glow)); }
.hero-empty p { color: var(--muted); }

.toast {
  position: fixed; left: 50%; bottom: calc(90px + var(--safe-bottom)); transform: translateX(-50%); z-index: 60;
  background: #1d1d22; border: 1px solid var(--line-strong); color: var(--text); padding: 10px 16px; border-radius: 12px;
  font-size: 13.5px; box-shadow: 0 10px 30px rgba(0,0,0,.5); animation: up .15s ease-out; max-width: calc(100% - 32px);
}
.gate { text-align: center; padding: 48px 20px; }
.gate img { width: 120px; filter: drop-shadow(0 0 30px var(--red-glow)); }
.gate h2 { font: 700 22px var(--head); text-transform: uppercase; letter-spacing: .06em; }
.gate p { color: var(--muted); }

/* --- Exchanges in progress, on the swap screen ------------------------------------------- */

.active-x { display: flex; align-items: center; gap: 12px; text-decoration: none; margin-bottom: 10px; border-color: rgba(200, 16, 46, 0.45); background: linear-gradient(90deg, rgba(110, 10, 23, 0.35), var(--surface)); }
.active-x .main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.active-x b { font: 600 14px var(--head); letter-spacing: 0.03em; }
.active-x span span, .active-x .main span { font-size: 12.5px; color: var(--muted); }
.active-x .go { font: 700 13px var(--head); color: var(--red-bright); letter-spacing: 0.05em; }
.dot-live { width: 9px; height: 9px; border-radius: 50%; background: var(--red-bright); box-shadow: 0 0 10px var(--red-bright); animation: pulse 1.4s ease-in-out infinite; flex-shrink: 0; }
.h-item + .section, .card + .section { margin-top: 8px; }

/* --- Address book ---------------------------------------------------------------------------- */

.icon-btn { display: grid; place-items: center; padding: 7px 9px; }
.saved-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.saved-chips:empty { display: none; }
.chip.saved { padding: 5px 10px; flex-direction: column; align-items: flex-start; gap: 0; border-radius: 10px; font-size: 12.5px; line-height: 1.25; }
.chip.saved span { font: 500 11px ui-monospace, 'SF Mono', Menlo, monospace; color: var(--muted); }
.chip.saved.on { border-color: var(--red); background: rgba(200, 16, 46, 0.12); }
.hint-line { font-size: 12.5px; color: var(--muted); }
.book-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); margin-bottom: 8px; }
.book-main { flex: 1; min-width: 0; border: 0; background: none; padding: 0; text-align: left; display: flex; flex-direction: column; gap: 2px; }
.book-main b { font: 600 15px var(--head); letter-spacing: 0.02em; }
.book-main code { font: 12px ui-monospace, 'SF Mono', Menlo, monospace; color: var(--muted); word-break: break-all; }
.book-main small { font-size: 12px; color: var(--muted); }
.book-actions { display: flex; gap: 6px; width: 100%; justify-content: flex-end; }
.mini-btn.danger { color: #ff8c99; border-color: rgba(200, 16, 46, 0.4); }
.save-box { padding: 12px 14px; }
.check { display: flex; align-items: center; gap: 10px; font: 600 14px var(--head); letter-spacing: 0.03em; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--red); }

/* --- Wallets page ----------------------------------------------------------------------------- */

.wallet-fam { margin-bottom: 10px; }
.wallet-fam + .wallet-fam { margin-top: 0; }
.fam-head { display: flex; align-items: center; gap: 12px; }
.fam-head .icon { width: 36px; height: 36px; }
.fam-title { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.fam-title b { font: 700 16px var(--head); letter-spacing: 0.03em; }
.fam-title span { font-size: 12px; color: var(--muted); }
.wallet-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.wallet-main { flex: 1 1 100%; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.wallet-main b { font: 600 14.5px var(--head); letter-spacing: 0.02em; }
.wallet-main code { font: 12px ui-monospace, 'SF Mono', Menlo, monospace; color: var(--muted); word-break: break-all; }
.wallet-main small { font-size: 12px; color: var(--muted); }
.wallet-form { margin-top: 12px; padding-top: 4px; border-top: 1px solid var(--line); }
.form-buttons { display: flex; gap: 8px; justify-content: flex-end; align-items: center; margin-top: 10px; }
.cta.slim { width: auto; margin: 0; padding: 10px 22px; font-size: 13px; }
.more-fams { margin-top: 6px; }
.more-fams summary { cursor: pointer; list-style: none; padding: 12px 4px; font: 600 12px var(--head); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.more-fams summary::-webkit-details-marker { display: none; }
.more-fams summary::after { content: ' ▾'; }
.more-fams[open] summary::after { content: ' ▴'; }

/* --- Home ------------------------------------------------------------------------------------- */

.bal-card { display: block; text-decoration: none; margin-bottom: 14px; position: relative; overflow: hidden;
  border-color: rgba(200, 16, 46, 0.4); background: linear-gradient(135deg, rgba(110, 10, 23, 0.55), var(--surface) 60%); }
.bal-card::after { content: ''; position: absolute; right: -40px; top: -40px; width: 160px; height: 160px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 45, 70, 0.22), transparent 70%); pointer-events: none; }
.bal-total { font: 700 34px var(--head); letter-spacing: 0.01em; margin-top: 6px; }
.bal-card.big .bal-total { font-size: 38px; }
.soon-text { font-size: 20px; color: var(--muted); }
.bal-actions { display: flex; gap: 8px; margin-top: 12px; position: relative; z-index: 1; }
.bal-actions .cta { flex: 1; text-align: center; text-decoration: none; }
.mini-btn.red { background: var(--red); border-color: var(--red); box-shadow: 0 0 12px var(--red-glow); }

.services { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.bubble {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-decoration: none; min-height: 132px;
  padding: 16px; border-radius: 22px; border: 1px solid var(--line); background: var(--surface);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); transition: transform .12s, border-color .12s;
}
.bubble:active { transform: scale(0.97); border-color: var(--red); }
.bubble b { font: 700 17px var(--head); letter-spacing: 0.05em; text-transform: uppercase; margin-top: auto; }
.bubble > span:last-child { font-size: 12.5px; color: var(--muted); line-height: 1.3; }
.bubble-icon {
  width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; color: #fff;
  background: radial-gradient(circle at 30% 30%, #ff3a52, var(--red) 55%, var(--red-deep)); box-shadow: 0 0 22px var(--red-glow);
}
.bubble-icon svg { width: 24px; height: 24px; }
.bubble-icon.badge-icon { background: none; box-shadow: none; }
.bubble-icon.badge-icon img { width: 48px; height: 48px; filter: drop-shadow(0 0 12px rgba(30, 136, 255, 0.45)); }
.bubble.soon { opacity: 0.55; border-style: dashed; }
.bubble.soon .bubble-icon { background: var(--surface-2); box-shadow: none; color: var(--muted); }

/* --- Balance ---------------------------------------------------------------------------------- */

.assets { padding: 6px 16px; }
.asset-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; text-decoration: none; }
.asset-row + .asset-row, .more-assets .asset-row { border-top: 1px solid var(--line); }
.asset-row .icon { width: 36px; height: 36px; }
.asset-row .main, .pending-row .main, .act-row .main, .pay-opt .main, .hold-line .main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.asset-row b, .act-row b, .pending-row b { font: 600 15px var(--head); letter-spacing: 0.03em; }
.asset-row small, .act-row small, .pending-row small, .pay-opt small, .hold-line small { font-size: 12px; color: var(--muted); }
.asset-row.zero { opacity: 0.5; }
.asset-row .go { color: var(--muted); font-size: 22px; }
.amt-col { display: flex; flex-direction: column; align-items: flex-end; text-align: right; }
.amt-col b { font: 600 15px var(--head); }
.amt-col small { font-size: 12px; color: var(--muted); }
.more-assets summary { cursor: pointer; list-style: none; padding: 12px 0 8px; font: 600 11px var(--head); letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); border-top: 1px solid var(--line); }
.more-assets summary::-webkit-details-marker { display: none; }
.more-assets summary::after { content: ' ▾'; }
.more-assets[open] summary::after { content: ' ▴'; }
.empty.slim { padding: 18px 8px; }
.pending-row { display: flex; align-items: center; gap: 12px; }
.pending-row + .pending-row { margin-top: 10px; }
.pending-row a { color: #ff8c99; text-decoration: none; font-weight: 600; font-size: 13px; }
.act-row { display: flex; align-items: center; gap: 12px; padding: 9px 0; text-decoration: none; }
.act-row + .act-row { border-top: 1px solid var(--line); }
.act-row .amt { font: 600 14px var(--head); white-space: nowrap; }
.act-row .amt.in { color: var(--ok); }
.deposit-list { padding: 4px 16px; }
.cta.slim.ghost { background: transparent; }
.cta.slim:disabled { background: #2a2a30; }

/* --- Exchange: paying from the balance ----------------------------------------------------------- */

.seg { display: flex; background: #0e0e11; border: 1px solid var(--line); border-radius: 14px; padding: 3px; margin-bottom: 10px; }
.seg button { flex: 1; border: 0; background: none; padding: 9px 6px; border-radius: 11px; font: 600 12.5px var(--head); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.seg button.on { background: var(--red); color: #fff; box-shadow: 0 0 12px var(--red-glow); }
.link-btn { border: 0; background: none; padding: 0 2px; color: #ff8c99; font: 700 12px var(--head); letter-spacing: 0.08em; text-transform: uppercase; }
.sub-line a { color: #ff8c99; text-decoration: none; font-weight: 600; }

/* --- Hold -------------------------------------------------------------------------------------------- */

.hold-hero { text-align: center; padding: 10px 8px 16px; }
.hold-hero img { width: 104px; height: 104px; filter: drop-shadow(0 0 26px rgba(30, 136, 255, 0.45)); }
.hold-hero h1 { margin: 10px 0 4px; font: 700 24px var(--head); letter-spacing: 0.04em; text-transform: uppercase; }
.hold-hero p { margin: 0 auto; max-width: 340px; color: var(--muted); font-size: 14px; }
.hold-hero.small img { width: 72px; height: 72px; }
.hold-hero.small h1 { font-size: 20px; text-transform: none; word-break: break-all; }
.plans { padding: 0; overflow: hidden; }
.plan { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; border: 0; background: none; padding: 18px 18px; text-align: left; position: relative; }
.plan + .plan { border-top: 1px solid var(--line); }
.plan-name { font: 600 16px var(--head); letter-spacing: 0.03em; }
.plan-price { display: flex; flex-direction: column; align-items: flex-end; }
.plan-price b { font: 700 19px var(--head); letter-spacing: 0.02em; }
.plan-price small { font-size: 12.5px; color: var(--muted); }
.plan.on { background: linear-gradient(90deg, rgba(200, 16, 46, 0.18), transparent); }
.plan.on::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--red-bright); box-shadow: 0 0 10px var(--red-bright); }
.plans + .card, .card + .cta { margin-top: 10px; }
.pay-list { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.pay-opt { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: #0d0d10; text-align: left; }
.pay-opt b { font: 600 15px var(--head); letter-spacing: 0.02em; }
.pay-opt.on { border-color: var(--red); box-shadow: 0 0 0 3px rgba(200, 16, 46, 0.15); }
.pay-opt:disabled { opacity: 0.45; }
.pay-opt .radio { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line-strong); flex-shrink: 0; }
.pay-opt.on .radio { border-color: var(--red-bright); background: radial-gradient(circle, var(--red-bright) 45%, transparent 50%); }
.pay-opt .short { color: var(--faint); white-space: nowrap; }
.hold-line { display: flex; align-items: center; gap: 12px; }
.hold-line img { width: 34px; height: 34px; }
.hold-line b { font: 600 15px var(--head); word-break: break-all; }
.meta .note, .kv .note { display: block; font-size: 12px; color: var(--faint); }

/* --- Multi exchange ------------------------------------------------------------------------------ */

.leg { margin-top: 10px; }
.leg .label { min-height: 22px; }
.close.small { width: 26px; height: 26px; font-size: 14px; border-radius: 8px; }
.bad-text { color: var(--red-bright); }
#legs + .cta.ghost { margin-top: 10px; }
.split-row { padding-right: 4px; }
.split-row .mini-btn { white-space: nowrap; }
