/* ============================================================
   Secret Wallet — obsidian + iridescent design system
   ============================================================ */
:root {
  --bg: #060609;
  --bg-1: #0A0A0F;
  --surface: #101017;
  --surface-2: #16161F;
  --surface-3: #1E1E29;
  --hairline: rgba(255, 255, 255, 0.07);
  --hairline-2: rgba(255, 255, 255, 0.12);
  --text: #ECEDF2;
  --text-2: #9597A4;
  --text-3: #5E606B;
  --pos: #3ADCA0;
  --neg: #FB6B6B;
  --violet: #A78BFA;
  --irid: linear-gradient(115deg, #5EEAD4 0%, #7DD3FC 26%, #A78BFA 52%, #F0ABFC 76%, #5EEAD4 100%);
  --irid-soft: linear-gradient(115deg, rgba(94,234,212,.18), rgba(125,211,252,.14) 40%, rgba(167,139,250,.16) 70%, rgba(240,171,252,.16));
  --r-sm: 12px;
  --r: 16px;
  --r-lg: 22px;
  --r-xl: 28px;
  --shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.8);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; overscroll-behavior: none; }
html { touch-action: manipulation; } /* no double-tap zoom */
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  overscroll-behavior: none;
  touch-action: manipulation;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  -webkit-text-size-adjust: 100%;
}
button { font-family: inherit; color: inherit; background: none; border: none; cursor: pointer; }
input, textarea { font-family: inherit; }
img { display: block; }
::selection { background: rgba(167, 139, 250, 0.35); }

/* --- device column (mobile-first; framed on desktop) --- */
#app {
  position: relative;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  min-height: 100dvh;
  background:
    radial-gradient(120% 60% at 50% -10%, rgba(125, 211, 252, 0.06), transparent 60%),
    radial-gradient(100% 50% at 90% 110%, rgba(167, 139, 250, 0.06), transparent 55%),
    var(--bg);
  overflow: hidden;
  isolation: isolate;
}
@media (min-width: 520px) {
  body { background: #030304; display: flex; align-items: center; justify-content: center; padding: 22px 0; }
  #app {
    min-height: min(880px, calc(100dvh - 44px));
    height: min(880px, calc(100dvh - 44px));
    border-radius: 40px;
    border: 1px solid var(--hairline);
    box-shadow: var(--shadow), 0 0 0 8px #08080b, 0 0 80px -20px rgba(167, 139, 250, 0.25);
  }
}

/* --- screens & transitions --- */
.screen {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  padding-top: var(--safe-top);
  background: var(--bg);
  transform: translateZ(0);
  backface-visibility: hidden;
  contain: layout paint;
}
/* crisp, GPU-only page transitions */
.screen.enter { animation: screenIn 0.26s cubic-bezier(0.33, 1, 0.68, 1) both; will-change: transform, opacity; }
.screen.leave { animation: screenOut 0.2s cubic-bezier(0.33, 1, 0.68, 1) both; pointer-events: none; will-change: transform, opacity; }
.screen.enter-back { animation: screenInBack 0.26s cubic-bezier(0.33, 1, 0.68, 1) both; will-change: transform, opacity; }
.screen.leave-back { animation: screenOutBack 0.2s cubic-bezier(0.33, 1, 0.68, 1) both; pointer-events: none; will-change: transform, opacity; }
@keyframes screenIn { from { transform: translate3d(22px, 0, 0); opacity: 0; } to { transform: translateZ(0); opacity: 1; } }
@keyframes screenOut { from { transform: translateZ(0); opacity: 1; } to { transform: translate3d(-16px, 0, 0); opacity: 0; } }
@keyframes screenInBack { from { transform: translate3d(-22px, 0, 0); opacity: 0; } to { transform: translateZ(0); opacity: 1; } }
@keyframes screenOutBack { from { transform: translateZ(0); opacity: 1; } to { transform: translate3d(22px, 0, 0); opacity: 0; } }

.scroll { flex: 1; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; overscroll-behavior-y: contain; touch-action: pan-y; }
.pad { padding: 0 18px; }
.pb-nav { padding-bottom: calc(96px + var(--safe-bottom)); }
.stack > * + * { margin-top: 12px; }

/* --- topbar --- */
.topbar {
  height: 56px; flex: 0 0 auto;
  display: flex; align-items: center; gap: 10px;
  padding: 0 12px;
}
.topbar .title { flex: 1; text-align: center; font-weight: 700; font-size: 16px; letter-spacing: -0.01em; }
.topbar .title.pick { display: inline-flex; align-items: center; gap: 6px; justify-content: center; }
.iconbtn {
  width: 40px; height: 40px; border-radius: 12px;
  display: grid; place-items: center; color: var(--text);
  transition: background 0.2s;
}
.iconbtn:active { background: var(--surface-2); }
.iconbtn svg { width: 22px; height: 22px; }
.badge-dot {
  position: absolute; top: 6px; right: 6px; min-width: 16px; height: 16px; padding: 0 4px;
  background: #FF4D4D; color: #fff; font-size: 10px; font-weight: 700; border-radius: 8px;
  display: grid; place-items: center; border: 2px solid var(--bg);
}
.iconbtn { position: relative; }

/* --- typography helpers --- */
.h1 { font-size: 30px; font-weight: 800; letter-spacing: -0.03em; }
.h2 { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-3); }
.muted { color: var(--text-2); }
.muted-3 { color: var(--text-3); }
.center { text-align: center; }
.mono { font-family: var(--mono); }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.pos { color: var(--pos); }
.neg { color: var(--neg); }

.irid-text {
  background: var(--irid); background-size: 200% 200%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: iridShift 9s ease-in-out infinite;
}
@keyframes iridShift { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }

/* --- buttons --- */
.btn {
  height: 54px; border-radius: 16px; font-weight: 700; font-size: 16px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: transform 0.12s var(--ease), filter 0.2s, background 0.2s; letter-spacing: -0.01em;
}
.btn:active { transform: translateY(1px) scale(0.99); }
.btn-block { width: 100%; }
.btn-primary { color: #07070a; position: relative; background: var(--irid); background-size: 200% 200%; animation: iridShift 9s ease infinite; box-shadow: 0 12px 34px -12px rgba(125, 211, 252, 0.55); }
.btn-primary:disabled { filter: grayscale(0.7) brightness(0.6); box-shadow: none; }
.btn-secondary { background: var(--surface-2); color: var(--text); border: 1px solid var(--hairline); }
.btn-ghost { color: var(--violet); background: transparent; }
.btn-danger { background: rgba(251, 107, 107, 0.12); color: var(--neg); }

/* iridescent hairline border wrapper */
.irid-border {
  position: relative; border-radius: var(--r);
  background:
    linear-gradient(var(--surface), var(--surface)) padding-box,
    var(--irid) border-box;
  background-size: auto, 200% 200%;
  border: 1px solid transparent;
  animation: iridShift 9s ease infinite;
}

/* --- cards / surfaces --- */
.card { background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--r); }
.card-2 { background: var(--surface-2); border: 1px solid var(--hairline); border-radius: var(--r); }
.list { background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--r); overflow: hidden; }
.list-item { display: flex; align-items: center; gap: 14px; padding: 16px; transition: background 0.18s; }
.list-item:active { background: var(--surface-2); }
.list-item + .list-item { border-top: 1px solid var(--hairline); }
.list-item .li-icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); color: var(--violet); flex: 0 0 auto; }
.list-item .li-main { flex: 1; min-width: 0; text-align: left; }
.list-item .li-title { font-weight: 600; font-size: 15.5px; }
.list-item .li-sub { color: var(--text-2); font-size: 13px; margin-top: 2px; }
.chev { color: var(--text-3); }

/* --- balance block --- */
.balance { text-align: center; padding: 18px 0 22px; }
.balance .lbl { display: inline-flex; align-items: center; gap: 7px; color: var(--text-2); font-size: 13.5px; font-weight: 600; }
.balance .lbl svg { width: 17px; height: 17px; }
.balance .amount { font-family: var(--mono); font-weight: 700; font-size: 46px; letter-spacing: -0.03em; margin-top: 8px; line-height: 1; }
.balance .amount .cents { color: var(--text-2); }
.balance .sub { margin-top: 8px; color: var(--text-2); font-weight: 600; font-size: 14px; }
.balance .sub .up { color: var(--pos); }
.balance .sub .down { color: var(--neg); }

/* --- action row --- */
.action-row { display: flex; justify-content: space-between; gap: 6px; padding: 4px 6px 6px; }
.action { display: flex; flex-direction: column; align-items: center; gap: 8px; flex: 1; }
.action .circ {
  width: 56px; height: 56px; border-radius: 50%;
  display: grid; place-items: center; color: var(--text);
  background: var(--surface-2); border: 1px solid var(--hairline);
  transition: transform 0.14s var(--ease), background 0.2s;
}
.action:active .circ { transform: translateY(2px) scale(0.96); }
.action.hero .circ { background: var(--irid); background-size: 200% 200%; color: #07070a; border: none; animation: iridShift 9s ease infinite; box-shadow: 0 10px 26px -10px rgba(125, 211, 252, 0.6); }
.action .circ svg { width: 24px; height: 24px; }
.action .lbl { font-size: 12px; font-weight: 600; color: var(--text-2); }

/* --- segmented tabs (Coin/Earn/NFT) --- */
.segtabs { display: flex; gap: 26px; padding: 4px 4px 0; position: relative; justify-content: center; }
.segtab { padding: 10px 2px 14px; font-weight: 700; font-size: 16px; color: var(--text-3); position: relative; transition: color 0.2s; }
.segtab.on { color: var(--text); }
.segtab.on::after { content: ""; position: absolute; left: 0; right: 0; bottom: 6px; height: 3px; border-radius: 3px; background: var(--irid); background-size: 200% 200%; animation: iridShift 9s ease infinite; }

/* --- search --- */
.searchbar { display: flex; align-items: center; gap: 10px; }
.searchbar .box { flex: 1; height: 44px; border-radius: 13px; background: var(--surface); border: 1px solid var(--hairline); display: flex; align-items: center; gap: 9px; padding: 0 13px; color: var(--text-3); }
.searchbar .box input { flex: 1; background: none; border: none; outline: none; color: var(--text); font-size: 14.5px; }
.searchbar .box svg { width: 18px; height: 18px; }

/* --- asset rows --- */
.assets { margin-top: 6px; }
.asset-row { display: flex; align-items: center; gap: 13px; padding: 13px 6px; border-radius: 14px; transition: background 0.18s; }
.asset-row:active { background: var(--surface); }
.asset-logo { position: relative; width: 42px; height: 42px; flex: 0 0 auto; }
.asset-logo img { width: 42px; height: 42px; border-radius: 50%; background: var(--surface-2); }
.net-badge { position: absolute; right: -3px; bottom: -3px; min-width: 17px; height: 17px; padding: 0 3px; border-radius: 6px; font-size: 8.5px; font-weight: 800; color: #fff; display: grid; place-items: center; border: 2px solid var(--bg); letter-spacing: 0.02em; }
.asset-main { flex: 1; min-width: 0; }
.asset-name { font-weight: 700; font-size: 15.5px; letter-spacing: -0.01em; }
.asset-name .net { color: var(--text-3); font-weight: 600; }
.asset-sub { display: flex; align-items: center; gap: 7px; margin-top: 3px; font-size: 12.5px; }
.asset-sub .px { color: var(--text-2); font-family: var(--mono); }
.asset-right { text-align: right; }
.asset-amt { font-weight: 700; font-family: var(--mono); font-size: 15px; }
.asset-val { color: var(--text-2); font-size: 12.5px; font-family: var(--mono); margin-top: 3px; }
.asset-row.zero .asset-amt { color: var(--text-2); }

/* --- chips / privacy badges --- */
.chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 11px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--surface-2); border: 1px solid var(--hairline); color: var(--text-2); }
.chip svg { width: 14px; height: 14px; }
.chip.priv { color: var(--pos); border-color: rgba(58, 220, 160, 0.25); background: rgba(58, 220, 160, 0.08); }
.chip.mix { color: var(--violet); border-color: rgba(167, 139, 250, 0.28); background: rgba(167, 139, 250, 0.08); }

/* --- bottom nav --- */
.tabbar {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 20;
  height: calc(76px + var(--safe-bottom)); padding-bottom: var(--safe-bottom);
  display: flex; align-items: stretch;
  background: linear-gradient(to top, var(--bg-1) 62%, rgba(10, 10, 15, 0.86));
  border-top: 1px solid var(--hairline);
}
.tab { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; color: var(--text-3); transition: color 0.2s; }
.tab svg { width: 24px; height: 24px; }
.tab .t { font-size: 10.5px; font-weight: 700; letter-spacing: 0.01em; }
.tab.on { color: var(--text); }
.tab.on svg { color: var(--violet); }

/* --- bottom sheet --- */
.sheet-backdrop { position: absolute; inset: 0; background: rgba(3, 3, 6, 0.66); z-index: 40; opacity: 0; transition: opacity 0.3s; }
.sheet-backdrop.on { opacity: 1; }
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 41;
  background: var(--bg-1); border-top: 1px solid var(--hairline-2);
  border-radius: 26px 26px 0 0; padding: 8px 18px calc(20px + var(--safe-bottom));
  transform: translateY(100%); transition: transform 0.4s var(--ease);
  max-height: 88%; overflow-y: auto;
  box-shadow: 0 -20px 60px -24px rgba(0, 0, 0, 0.9);
}
.sheet.on { transform: none; }
.sheet-handle { width: 38px; height: 4px; border-radius: 3px; background: var(--surface-3); margin: 6px auto 14px; }
.sheet-title { font-weight: 800; font-size: 18px; text-align: center; margin-bottom: 14px; letter-spacing: -0.01em; }

/* --- toast --- */
.toast-wrap { position: absolute; top: calc(var(--safe-top) + 14px); left: 0; right: 0; z-index: 90; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.toast { background: var(--surface-3); border: 1px solid var(--hairline-2); color: var(--text); padding: 11px 16px; border-radius: 13px; font-size: 14px; font-weight: 600; box-shadow: var(--shadow); animation: toastIn 0.3s var(--ease) both; display: flex; align-items: center; gap: 9px; max-width: 90%; }
.toast svg { width: 18px; height: 18px; flex: 0 0 auto; }
.toast.good { color: var(--pos); } .toast.bad { color: var(--neg); }
@keyframes toastIn { from { transform: translateY(-14px); opacity: 0; } to { transform: none; opacity: 1; } }

/* --- fields --- */
.field { margin-top: 14px; }
.field label { display: block; font-size: 13px; font-weight: 700; color: var(--text-2); margin-bottom: 8px; }
.input, .textarea {
  width: 100%; background: var(--surface); border: 1px solid var(--hairline); border-radius: 14px;
  color: var(--text); font-size: 15.5px; padding: 15px 15px; outline: none; transition: border 0.2s;
}
.input:focus, .textarea:focus { border-color: rgba(167, 139, 250, 0.5); }
.textarea { resize: none; line-height: 1.6; font-family: var(--mono); font-size: 15px; }
.input.mono { font-family: var(--mono); }
.input-row { display: flex; gap: 10px; }

/* --- PIN --- */
.pin-dots { display: flex; justify-content: center; gap: 16px; margin: 6px 0 8px; }
.pin-dot { width: 15px; height: 15px; border-radius: 50%; border: 1.6px solid var(--surface-3); transition: all 0.2s var(--ease); }
.pin-dot.on { background: var(--irid); background-size: 200% 200%; border-color: transparent; box-shadow: 0 0 12px rgba(167, 139, 250, 0.5); }
.pin-dots.err { animation: shake 0.4s; }
@keyframes shake { 0%,100%{transform:translateX(0)} 20%,60%{transform:translateX(-8px)} 40%,80%{transform:translateX(8px)} }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.key { height: 62px; border-radius: 16px; font-size: 24px; font-weight: 600; font-family: var(--mono); background: var(--surface); border: 1px solid var(--hairline); display: grid; place-items: center; transition: transform 0.1s, background 0.15s; }
.key:active { transform: scale(0.95); background: var(--surface-2); }
.key.fn { background: transparent; border: none; font-size: 16px; color: var(--text-2); }
.key svg { width: 26px; height: 26px; }

/* --- seed grid --- */
.seed-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.seed-word { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--hairline); border-radius: 13px; padding: 13px 14px; }
.seed-word .i { color: var(--text-3); font-size: 12px; font-weight: 700; font-family: var(--mono); width: 18px; }
.seed-word .w { font-weight: 700; font-size: 15px; letter-spacing: -0.01em; }
.seed-blur { filter: blur(7px); transition: filter 0.3s; }
.reveal-tap { position: relative; }
.reveal-hint { position: absolute; inset: 0; display: grid; place-items: center; z-index: 2; }

/* --- QR / receive --- */
.qr-card { text-align: center; padding: 20px; }
.qr-wrap { width: 236px; height: 236px; margin: 8px auto 14px; background: #fff; border-radius: 20px; padding: 14px; position: relative; box-shadow: 0 14px 40px -18px rgba(125, 211, 252, 0.5); }
.qr-wrap svg { width: 100%; height: 100%; display: block; }
.qr-logo { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 46px; height: 46px; border-radius: 12px; border: 3px solid #fff; background: #fff; }
.qr-logo img { width: 100%; height: 100%; border-radius: 9px; }
.addr-mono { font-family: var(--mono); font-size: 13.5px; line-height: 1.7; word-break: break-all; color: var(--text); }
.addr-mono b { color: var(--violet); font-weight: 700; }
.warn { display: flex; gap: 10px; align-items: flex-start; background: var(--surface); border: 1px solid var(--hairline); border-radius: 14px; padding: 13px; color: var(--text-2); font-size: 12.5px; line-height: 1.5; }
.warn svg { width: 17px; height: 17px; flex: 0 0 auto; margin-top: 1px; color: var(--text-3); }

/* --- amount entry --- */
.amt-display { text-align: center; padding: 26px 0 10px; }
.amt-display .big { font-family: var(--mono); font-size: 44px; font-weight: 700; letter-spacing: -0.02em; }
.amt-display .big .cur { color: var(--text-3); }
.amt-display .conv { color: var(--text-2); font-weight: 600; margin-top: 8px; font-family: var(--mono); }
.amt-display.err .big { color: var(--neg); animation: shake 0.4s; }
.max-chip { display: inline-flex; margin-top: 10px; }

/* --- select-asset / picker rows --- */
.pick-row { display: flex; align-items: center; gap: 13px; padding: 13px 4px; border-radius: 12px; }
.pick-row:active { background: var(--surface); }
.pick-row img { width: 40px; height: 40px; border-radius: 50%; }
.pick-row .r { text-align: right; }

/* --- recipient / send summary --- */
.dest-card { display: flex; align-items: center; gap: 12px; padding: 14px; }
.dest-card .rt { flex: 1; min-width: 0; }
.route-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; padding: 5px 10px; border-radius: 999px; }
.route-tag.internal { color: var(--pos); background: rgba(58, 220, 160, 0.08); border: 1px solid rgba(58, 220, 160, 0.25); }
.route-tag.mixer { color: var(--violet); background: rgba(167, 139, 250, 0.08); border: 1px solid rgba(167, 139, 250, 0.28); }

/* --- CoinJoin / mixer stage --- */
.mixer-screen { position: absolute; inset: 0; z-index: 60; background: radial-gradient(120% 80% at 50% 20%, rgba(30, 20, 55, 0.6), var(--bg) 60%); display: flex; flex-direction: column; padding: calc(var(--safe-top) + 10px) 20px calc(24px + var(--safe-bottom)); animation: screenIn 0.4s var(--ease) both; }
.mixer-stage { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; position: relative; }
.mix-core { position: relative; width: 220px; height: 220px; display: grid; place-items: center; }
.mix-ring { position: absolute; border-radius: 50%; border: 1.5px solid rgba(167, 139, 250, 0.22); }
.mix-ring.r1 { inset: 0; animation: spin 7s linear infinite; border-top-color: rgba(94, 234, 212, 0.7); }
.mix-ring.r2 { inset: 26px; animation: spin 5s linear infinite reverse; border-top-color: rgba(167, 139, 250, 0.8); }
.mix-ring.r3 { inset: 52px; animation: spin 9s linear infinite; border-top-color: rgba(240, 171, 252, 0.7); }
@keyframes spin { to { transform: rotate(360deg); } }
.mix-hub { width: 96px; height: 96px; border-radius: 50%; background: var(--irid); background-size: 200% 200%; animation: iridShift 4s ease infinite, hubPulse 2.4s ease-in-out infinite; display: grid; place-items: center; box-shadow: 0 0 50px -6px rgba(167, 139, 250, 0.6); }
.mix-hub svg { width: 42px; height: 42px; color: #07070a; }
@keyframes hubPulse { 0%,100%{transform:scale(1)} 50%{transform:scale(1.06)} }
.mix-node { position: absolute; width: 12px; height: 12px; border-radius: 50%; background: #7DD3FC; box-shadow: 0 0 10px #7DD3FC; }
.mix-title { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; margin-top: 30px; text-align: center; }
.mix-step { color: var(--text-2); font-size: 14px; margin-top: 8px; height: 20px; text-align: center; font-weight: 600; }
.mix-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 26px; width: 100%; }
.mix-stat { background: var(--surface); border: 1px solid var(--hairline); border-radius: 14px; padding: 13px 8px; text-align: center; }
.mix-stat .v { font-family: var(--mono); font-weight: 700; font-size: 18px; }
.mix-stat .k { color: var(--text-3); font-size: 11px; font-weight: 700; margin-top: 3px; text-transform: uppercase; letter-spacing: 0.06em; }
.mix-progress { height: 6px; border-radius: 3px; background: var(--surface-2); margin-top: 22px; overflow: hidden; }
.mix-progress > i { display: block; height: 100%; width: 0; border-radius: 3px; background: var(--irid); background-size: 200% 200%; animation: iridShift 4s ease infinite; transition: width 0.5s var(--ease); }
.mix-particles { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }

/* success check */
.success-check { width: 108px; height: 108px; border-radius: 50%; display: grid; place-items: center; background: rgba(58, 220, 160, 0.1); border: 1.5px solid rgba(58, 220, 160, 0.4); margin: 0 auto; animation: pop 0.5s var(--ease) both; }
.success-check svg { width: 54px; height: 54px; color: var(--pos); }
@keyframes pop { 0%{transform:scale(0.4);opacity:0} 60%{transform:scale(1.08)} 100%{transform:scale(1);opacity:1} }

/* --- welcome --- */
.welcome { position: absolute; inset: 0; display: flex; flex-direction: column; padding: calc(var(--safe-top) + 10px) 26px calc(30px + var(--safe-bottom)); overflow: hidden; }

/* flowing iridescent background */
.welcome-bg { position: absolute; inset: 0; overflow: hidden; z-index: 0; }
.wb-flow { position: absolute; inset: -50%; background: conic-gradient(from 0deg at 50% 50%, #5EEAD4, #7DD3FC, #A78BFA, #F0ABFC, #7DD3FC, #5EEAD4); filter: blur(85px); opacity: 0.22; animation: wbSpin 26s linear infinite; will-change: transform; }
@keyframes wbSpin { to { transform: rotate(360deg); } }
.welcome-bg::after { content: ""; position: absolute; inset: 0; background: radial-gradient(125% 90% at 50% 28%, transparent 32%, rgba(6, 6, 9, 0.55) 76%, rgba(6, 6, 9, 0.9)); }

.aurora { position: absolute; width: 420px; height: 420px; border-radius: 50%; filter: blur(72px); opacity: 0.5; }
.aurora.a { top: -150px; left: -130px; background: radial-gradient(circle, rgba(94, 234, 212, 0.5), transparent 62%); animation: drift1 16s ease-in-out infinite; }
.aurora.b { bottom: -170px; right: -150px; background: radial-gradient(circle, rgba(167, 139, 250, 0.55), transparent 62%); animation: drift2 20s ease-in-out infinite; }
.aurora.c { top: 40%; right: -170px; background: radial-gradient(circle, rgba(125, 211, 252, 0.4), transparent 62%); animation: drift1 22s ease-in-out infinite; }
@keyframes drift1 { 0%,100%{transform:translate(0,0)} 50%{transform:translate(40px,50px)} }
@keyframes drift2 { 0%,100%{transform:translate(0,0)} 50%{transform:translate(-46px,-38px)} }

.welcome-body { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; position: relative; z-index: 2; }
.brand-hero { position: relative; width: 244px; height: 168px; display: grid; place-items: center; animation: floaty 6s ease-in-out infinite; }
.hero-glow { position: absolute; width: 250px; height: 250px; border-radius: 50%; background: radial-gradient(circle, rgba(167, 139, 250, 0.5), rgba(125, 211, 252, 0.16) 45%, transparent 68%); filter: blur(20px); animation: glowPulse 5.5s ease-in-out infinite; }
.hero-img { position: relative; width: 240px; height: auto; filter: drop-shadow(0 22px 42px rgba(94, 90, 190, 0.5)); }
.brandmark { width: 116px; height: 116px; animation: floaty 6s ease-in-out infinite; }
@keyframes floaty { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-12px)} }
@keyframes glowPulse { 0%,100%{opacity:.7; transform:scale(1)} 50%{opacity:1; transform:scale(1.08)} }

.welcome h1 { font-size: 34px; font-weight: 800; letter-spacing: -0.03em; margin-top: 22px; }
.welcome .tagline { color: var(--text); font-size: 17px; line-height: 1.5; margin-top: 12px; max-width: 320px; font-weight: 700; letter-spacing: -0.01em; }
.welcome .subtag { color: var(--text-2); font-size: 13.5px; line-height: 1.55; margin-top: 12px; max-width: 322px; font-weight: 500; }
.welcome-cta { position: relative; z-index: 2; }
.trust-row { display: flex; justify-content: center; gap: 8px; margin-bottom: 18px; flex-wrap: wrap; }

/* --- skeleton --- */
.sk { background: linear-gradient(90deg, var(--surface) 25%, var(--surface-2) 50%, var(--surface) 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: 8px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* --- pull to refresh (iridescent ring pill) --- */
.ptr {
  position: absolute; top: 0; left: 50%;
  transform: translateX(-50%) scale(0.7);
  margin-top: 10px; width: 42px; height: 42px;
  display: grid; place-items: center;
  background: var(--surface-2); border: 1px solid var(--hairline); border-radius: 50%;
  opacity: 0; z-index: 6; pointer-events: none;
  box-shadow: 0 10px 24px -10px rgba(0, 0, 0, 0.7);
  will-change: transform, opacity;
}
.ptr svg { width: 40px; height: 40px; }
.ptr .ptr-track { fill: none; stroke: var(--surface-3); stroke-width: 3.2; }
.ptr .ptr-arc { fill: none; stroke: url(#ptrgrad); stroke-width: 3.2; stroke-linecap: round; transform: rotate(-90deg); transform-origin: 20px 20px; transition: stroke-dashoffset 0.06s linear; }
.ptr.spin svg { animation: spin 0.72s linear infinite; }
.ptr.spin .ptr-arc { transition: none; }

/* --- QR scanner --- */
.scanner { position: absolute; inset: 0; z-index: 80; background: #000; opacity: 0; transition: opacity 0.28s var(--ease); display: flex; flex-direction: column; }
.scanner.on { opacity: 1; }
.scanner video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.scanner .scan-veil { position: absolute; inset: 0; background: radial-gradient(circle at 50% 44%, transparent 118px, rgba(4, 4, 7, 0.72) 190px); z-index: 2; }
.scanner .scan-top { position: relative; z-index: 3; display: flex; align-items: center; justify-content: space-between; padding: calc(var(--safe-top) + 8px) 14px 0; }
.scanner .scan-top .iconbtn { background: rgba(20, 20, 28, 0.6); color: #fff; }
.scanner .scan-body { position: relative; z-index: 3; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 26px; }
.scan-frame { width: 236px; height: 236px; position: relative; }
.scan-frame span { position: absolute; width: 34px; height: 34px; border: 3px solid #fff; }
.scan-frame span:nth-child(1) { top: 0; left: 0; border-right: 0; border-bottom: 0; border-radius: 14px 0 0 0; }
.scan-frame span:nth-child(2) { top: 0; right: 0; border-left: 0; border-bottom: 0; border-radius: 0 14px 0 0; }
.scan-frame span:nth-child(3) { bottom: 0; left: 0; border-right: 0; border-top: 0; border-radius: 0 0 0 14px; }
.scan-frame span:nth-child(4) { bottom: 0; right: 0; border-left: 0; border-top: 0; border-radius: 0 0 14px 0; }
.scan-frame .scan-line { position: absolute; left: 8px; right: 8px; height: 2px; border-radius: 2px; background: linear-gradient(90deg, transparent, #7DD3FC, #A78BFA, transparent); box-shadow: 0 0 14px #7DD3FC; animation: scanline 2.4s ease-in-out infinite; }
@keyframes scanline { 0%, 100% { top: 10px; } 50% { top: 216px; } }
.scan-frame.err span { border-color: var(--neg); }
.scanner .scan-hint { position: relative; z-index: 3; color: rgba(255, 255, 255, 0.82); font-size: 14px; font-weight: 600; text-align: center; padding: 0 40px; max-width: 340px; }

/* --- misc --- */
.row { display: flex; align-items: center; }
.between { justify-content: space-between; }
.gap { gap: 10px; }
.grow { flex: 1; }
.divider { height: 1px; background: var(--hairline); margin: 8px 0; }
.kv { display: flex; justify-content: space-between; align-items: center; padding: 13px 0; }
.kv + .kv { border-top: 1px solid var(--hairline); }
.kv .k { color: var(--text-2); font-size: 14px; }
.kv .v { font-weight: 600; font-size: 14px; font-family: var(--mono); text-align: right; }
.hidden { display: none !important; }
.copyable:active { opacity: 0.6; }

/* --- price chart --- */
.chart-wrap { margin-top: 8px; }
.chart-head { display: flex; align-items: baseline; gap: 10px; padding: 0 2px; }
.chart-price { font-family: var(--mono); font-weight: 800; font-size: 22px; letter-spacing: -0.02em; }
.chart-chg { font-family: var(--mono); font-weight: 700; font-size: 14px; }
.chart-date { color: var(--text-3); font-size: 12px; margin-left: auto; font-weight: 600; }
.chart { margin-top: 12px; min-height: 156px; }
.chart-svg { display: block; overflow: visible; touch-action: none; }
.range-tabs { display: flex; gap: 8px; margin-top: 14px; }
.range-tabs button { flex: 1; height: 34px; border-radius: 11px; font-weight: 700; font-size: 13px; color: var(--text-2); background: var(--surface); border: 1px solid var(--hairline); transition: background 0.15s, color 0.15s; }
.range-tabs button.on { color: var(--text); background: var(--surface-3); border-color: var(--hairline-2); }

/* --- gas selector --- */
.gas-row { display: flex; gap: 8px; }
.gas-opt { flex: 1; border-radius: 14px; background: var(--surface); border: 1px solid var(--hairline); padding: 11px 6px; text-align: center; transition: border 0.15s, background 0.15s; }
.gas-opt.on { border-color: rgba(167, 139, 250, 0.55); background: rgba(167, 139, 250, 0.09); }
.gas-opt .g-label { font-weight: 700; font-size: 13.5px; }
.gas-opt .g-eta { color: var(--text-2); font-size: 11px; margin-top: 3px; font-weight: 600; }
.gas-opt .g-fee { color: var(--text-3); font-size: 10px; margin-top: 2px; font-family: var(--mono); }

/* --- amount USD/crypto toggle --- */
.amt-toggle { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 13px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--hairline); font-weight: 700; font-size: 13px; color: var(--text); }
.amt-toggle svg { width: 15px; height: 15px; color: var(--violet); }

/* --- pending payment --- */
.pending-banner { display: flex; align-items: center; gap: 12px; padding: 13px 14px; margin: 2px 0 8px; border-radius: 16px; background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--irid) border-box; background-size: auto, 200% 200%; border: 1px solid transparent; animation: iridShift 9s ease infinite; }
.pending-banner .pb-ic { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--violet); flex: 0 0 auto; }
.pending-banner .pb-ic svg { animation: spin 1.1s linear infinite; }
.pending-banner .pb-main { flex: 1; min-width: 0; }
.pending-banner .pb-title { font-weight: 700; font-size: 14.5px; }
.pending-banner .pb-sub { color: var(--text-2); font-size: 12.5px; margin-top: 2px; }
.pending-banner .pb-eta { font-family: var(--mono); font-weight: 700; color: var(--violet); font-size: 14px; }
.tx-row.pending .li-icon { color: var(--violet); }
.chip.pend { color: var(--violet); border-color: rgba(167, 139, 250, 0.28); background: rgba(167, 139, 250, 0.08); }

/* --- send form (single-screen) --- */
.brand-btn { padding: 0; }
.brand-btn svg { width: 30px; height: auto; }

.send-from { display: flex; gap: 10px; margin: 2px 0 14px; }
.send-from .from-wallet { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; height: 48px; padding: 0 14px; background: var(--surface); border: 1px solid var(--hairline); border-radius: 14px; font-weight: 600; font-size: 14.5px; }
.send-from .from-wallet svg { color: var(--text-2); flex: 0 0 auto; }
.send-from .from-wallet span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.send-from .from-addr { display: flex; align-items: center; padding: 0 14px; height: 48px; background: var(--surface); border: 1px solid var(--hairline); border-radius: 14px; font-family: var(--mono); font-size: 13px; color: var(--text-2); flex: 0 0 auto; }

.send-coin { width: 100%; display: flex; align-items: center; gap: 13px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--hairline); border-radius: 16px; transition: border 0.15s; }
.send-coin:active { border-color: var(--hairline-2); }
.send-coin .sc-main { flex: 1; text-align: left; min-width: 0; }
.send-coin .sc-sym { font-weight: 800; font-size: 17px; letter-spacing: -0.01em; display: block; }
.send-coin .sc-name { color: var(--text-2); font-size: 12.5px; margin-top: 2px; display: block; }
.send-coin > svg { color: var(--text-3); flex: 0 0 auto; }

.send-label-row { display: flex; align-items: center; justify-content: space-between; margin: 18px 2px 8px; }
.send-label { font-weight: 700; font-size: 16px; }
.send-tools { display: flex; align-items: center; gap: 4px; color: var(--text-2); }
.send-tools .iconbtn { width: 36px; height: 36px; }
.tool-div { width: 1px; height: 18px; background: var(--hairline-2); }

.send-input { position: relative; display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--hairline); border-radius: 14px; height: 56px; padding: 0 14px; transition: border 0.15s; }
.send-input:focus-within { border-color: rgba(167, 139, 250, 0.5); }
.send-input input { flex: 1; background: none; border: none; outline: none; color: var(--text); font-size: 16px; min-width: 0; }
.send-input input::placeholder { color: var(--text-3); }
.paste-btn { color: var(--pos); font-weight: 700; font-size: 15px; padding: 6px 4px; flex: 0 0 auto; }
.amount-input input { font-family: var(--mono); font-size: 19px; font-weight: 600; }
.max-btn { font-weight: 700; font-size: 13px; color: var(--text); border: 1px solid var(--hairline-2); border-radius: 9px; padding: 6px 12px; flex: 0 0 auto; }
.max-btn:active { background: var(--surface-2); }
.send-input .unit { font-family: var(--mono); font-weight: 700; font-size: 16px; color: var(--text); flex: 0 0 auto; }

.avail { margin: 12px 2px 0; color: var(--text-2); font-size: 13.5px; }
.avail b { color: var(--violet); font-family: var(--mono); font-weight: 700; }

.add-recv { width: 100%; margin-top: 18px; height: 52px; border-radius: 14px; border: 1px dashed var(--hairline-2); color: var(--text); font-weight: 700; font-size: 15px; display: flex; align-items: center; justify-content: center; gap: 8px; }
.add-recv:active { background: var(--surface); }

.fee-card { margin-top: 18px; background: var(--surface); border: 1px solid var(--hairline); border-radius: 16px; padding: 14px; }
.fee-head { display: flex; justify-content: space-between; align-items: center; font-weight: 700; font-size: 15px; margin-bottom: 12px; }
.fee-total { color: var(--text-2); font-weight: 700; }
.fee-opts { display: flex; gap: 8px; }
.fee-opt { flex: 1; border-radius: 12px; background: var(--bg-1); border: 1px solid var(--hairline); padding: 10px 6px; text-align: center; transition: border 0.15s, background 0.15s; }
.fee-opt.on { border-color: rgba(167, 139, 250, 0.6); background: rgba(167, 139, 250, 0.08); }
.fo-label { font-weight: 700; font-size: 13.5px; }
.fo-sub { color: var(--text-2); font-size: 11px; margin-top: 3px; font-weight: 600; }

/* --- notifications --- */
.notif-row { display: flex; gap: 13px; padding: 15px 4px; border-bottom: 1px solid var(--hairline); position: relative; }
.notif-row .notif-body { color: var(--text-2); font-size: 13px; margin-top: 3px; line-height: 1.45; }
.notif-row .notif-time { color: var(--text-3); font-size: 11.5px; margin-top: 6px; font-weight: 600; }
.notif-row.unread::after { content: ""; position: absolute; right: 2px; top: 20px; width: 8px; height: 8px; border-radius: 50%; background: var(--irid); background-size: 200% 200%; box-shadow: 0 0 8px rgba(167, 139, 250, 0.6); }

/* brand image mark */
.brand-btn { padding: 0; }
.brand-img { display: block; }

/* --- swap --- */
.swap-card { background: var(--surface); border: 1px solid var(--hairline); border-radius: 18px; padding: 16px; }
.swap-head { display: flex; justify-content: space-between; align-items: center; }
.swap-lbl { font-weight: 700; font-size: 16px; }
.swap-bal { display: flex; align-items: center; gap: 6px; color: var(--text-2); font-size: 13px; }
.swap-bal svg { color: var(--text-3); }
.swap-bal b { color: var(--text); font-family: var(--mono); font-weight: 700; }
.swap-max { color: var(--violet); font-weight: 800; font-size: 13px; margin-left: 6px; }
.swap-body { display: flex; align-items: center; gap: 12px; margin-top: 14px; }
.swap-coin { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.swap-coin .swc-txt { text-align: left; }
.swap-coin .swc-sym { font-weight: 800; font-size: 18px; display: block; letter-spacing: -0.01em; }
.swap-coin .swc-net { color: var(--text-3); font-size: 12px; display: block; margin-top: 1px; max-width: 96px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.swap-coin > svg { color: var(--text-3); }
.swap-input { flex: 1; min-width: 0; background: none; border: none; outline: none; text-align: right; color: var(--text); font-family: var(--mono); font-size: 24px; font-weight: 700; }
.swap-input::placeholder { color: var(--text-3); }
.swap-out { flex: 1; text-align: right; font-family: var(--mono); font-size: 24px; font-weight: 700; }
.swap-flip { position: relative; height: 0; display: flex; justify-content: center; z-index: 3; }
.swap-flip button { position: relative; top: -23px; width: 46px; height: 46px; border-radius: 50%; background: var(--surface-3); border: 4px solid var(--bg-1); color: var(--text); display: grid; place-items: center; box-shadow: 0 6px 16px -6px rgba(0, 0, 0, 0.6); transition: transform 0.3s var(--ease); }
.swap-flip button:active { transform: rotate(180deg) scale(0.95); }

/* --- explore --- */
.promo-card { position: relative; overflow: hidden; width: 100%; text-align: left; border-radius: 20px; padding: 20px; background: linear-gradient(135deg, #291a5c, #3a2a7c 46%, #1d2a6a); border: 1px solid var(--hairline-2); display: block; }
.promo-glow { position: absolute; right: -40px; top: -40px; width: 190px; height: 190px; border-radius: 50%; background: radial-gradient(circle, rgba(125, 211, 252, 0.5), transparent 65%); filter: blur(22px); }
.promo-kicker { display: block; font-size: 11px; font-weight: 800; letter-spacing: 0.16em; color: #A5C8FF; position: relative; }
.promo-title { display: block; font-size: 22px; font-weight: 800; letter-spacing: -0.02em; margin-top: 8px; line-height: 1.12; position: relative; color: #fff; }
.promo-sub { display: block; color: rgba(255, 255, 255, 0.72); font-size: 13px; margin-top: 8px; position: relative; }
.promo-cta { display: inline-flex; align-items: center; gap: 4px; margin-top: 14px; font-weight: 700; font-size: 13px; color: #fff; background: rgba(255, 255, 255, 0.14); padding: 7px 12px; border-radius: 999px; position: relative; }
.app-row { display: flex; gap: 10px; justify-content: space-between; }
.app-tile { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.app-ic { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; transition: transform 0.14s; }
.app-tile:active .app-ic { transform: scale(0.94); }
.app-lbl { font-size: 11.5px; font-weight: 600; color: var(--text-2); }
.dex-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 18px; flex: 0 0 auto; }
