/* ==========================================================================
   Blockstream Secure — Simple by Design
   Dark, calm, mobile-first. Inter for UI, JetBrains Mono for figures that
   need to line up. One accent (electric blue) + semantic green / red / amber.
   ========================================================================== */

:root {
  /* Surfaces — near-black, high-contrast */
  --bg: #08090a;
  --bg-elev: #0e0f12;
  --surface: #121318;
  --surface-2: #1a1c22;
  --surface-3: #24262e;
  --input: #0d0e12;
  --border: #202228;
  --border-strong: #2c2f37;

  /* Text */
  --text: #ffffff;
  --text-2: #a4a6ad;
  --text-3: #6f717a;

  /* Brand + semantic — electric blue accent, Bitcoin orange */
  --accent: #00c3ff;
  --accent-strong: #3ad3ff;
  --accent-ink: #001119;
  --accent-soft: rgba(0, 195, 255, 0.14);
  --accent-line: rgba(0, 195, 255, 0.42);
  --green: #3fd36b;
  --green-soft: rgba(63, 211, 107, 0.13);
  --red: #ff5d5d;
  --red-soft: rgba(255, 93, 93, 0.13);
  --amber: #f7a531;
  --amber-soft: rgba(247, 165, 49, 0.14);
  --orange: #f7931a;
  --violet: #a38bff;

  /* Shape + rhythm */
  --radius-sm: 8px;
  --radius: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --gutter: 20px;
  --tabbar-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);

  --font: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  --font-display: "Space Grotesk", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --shadow-pop: 0 24px 60px rgba(0, 0, 0, 0.55), 0 2px 8px rgba(0, 0, 0, 0.4);

  color-scheme: dark;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; touch-action: manipulation; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.45;
  font-feature-settings: "cv11", "ss01", "tnum";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}
h1, h2, h3, p, dl, dd { margin: 0; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
button:disabled { cursor: default; opacity: 0.45; }
img { display: block; max-width: 100%; }
summary { list-style: none; cursor: pointer; }
summary::-webkit-details-marker { display: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--accent-soft); }
.hidden, [hidden] { display: none !important; }
body.modal-open { overflow: hidden; }

/* ---------- Icons ---------- */
.ico {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Privacy (hide balances) ---------- */
[data-sensitive] { transition: filter 0.2s var(--ease); }
.is-private [data-sensitive] { filter: blur(7px); user-select: none; }
.eye-btn .when-hidden, .is-private .eye-btn .when-visible { display: none; }
.is-private .eye-btn .when-hidden { display: block; }

/* ==========================================================================
   App shell
   ========================================================================== */
.app { min-height: 100vh; min-height: 100dvh; }

.screen {
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding: calc(18px + var(--safe-t)) var(--gutter) calc(var(--tabbar-h) + var(--safe-b) + 32px);
}

/* Bottom tab bar (phones) */
.tabbar {
  position: fixed;
  z-index: 40;
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  padding: 8px 6px calc(8px + var(--safe-b));
  background: rgba(30, 31, 35, 0.92);
  border-top: 1px solid var(--border);
  backdrop-filter: saturate(160%) blur(18px);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
}
.tabbar-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 4px 0;
  color: var(--text-3);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: color 0.15s;
}
.tabbar-item .ico { width: 23px; height: 23px; stroke-width: 1.5; }
.tabbar-item.is-active { color: var(--text); font-weight: 600; }
.tabbar-item:active { transform: scale(0.94); }

/* Sidebar (wide screens) */
.sidebar { display: none; }

@media (min-width: 960px) {
  .app { display: grid; grid-template-columns: 264px 1fr; }
  .tabbar { display: none; }
  .screen { padding: 44px 40px 64px; max-width: 600px; }
  .sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    gap: 28px;
    padding: 28px 18px;
    background: var(--bg-elev);
    border-right: 1px solid var(--border);
  }
  .sidebar-nav { display: grid; gap: 4px; }
  .sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 12px;
    border-radius: var(--radius);
    color: var(--text-2);
    font-weight: 500;
    transition: background 0.15s, color 0.15s;
  }
  .sidebar-link:hover { background: var(--surface); color: var(--text); }
  .sidebar-link.is-active { background: var(--surface-2); color: var(--text); }
  .sidebar-link.is-active .ico { color: var(--accent); }
  .sidebar-profile {
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--surface);
  }
  .sidebar-profile-text { display: grid; min-width: 0; }
  .sidebar-profile-text strong { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .sidebar-profile-text span { font-size: 12px; color: var(--text-3); }
}

/* Brand lockup */
.brand { display: flex; align-items: center; gap: 12px; padding: 0 6px; }
.brand-mark { width: 40px; height: 40px; filter: drop-shadow(0 0 10px rgba(46, 170, 255, 0.35)); }
.brand-text { display: grid; line-height: 1.15; }
.brand-name { font-size: 17px; font-weight: 700; letter-spacing: -0.01em; }
.brand-tagline { font-size: 12px; color: var(--text-3); }

/* ==========================================================================
   Headers
   ========================================================================== */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 40px;
  margin-bottom: 18px;
}
.page-title { font-size: 20px; font-weight: 600; letter-spacing: -0.01em; }
.page-actions { display: flex; align-items: center; gap: 12px; }

.nav-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 40px;
  margin-bottom: 18px;
}
.nav-back { display: inline-flex; align-items: center; gap: 2px; color: var(--text); font-size: 15px; margin-left: -6px; padding: 6px 6px 6px 0; }
.nav-back .ico { width: 20px; height: 20px; }
.nav-title { font-size: 16px; font-weight: 600; text-align: center; }
.nav-action { display: flex; justify-content: flex-end; }

@media (min-width: 960px) {
  .page-title { font-size: 26px; }
}

/* Small round buttons */
.round-btn {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  transition: transform 0.15s var(--ease), background 0.15s;
}
.round-btn .ico { width: 17px; height: 17px; stroke-width: 1.9; }
.round-btn:hover { background: var(--accent-strong); }
.round-btn:active { transform: scale(0.92); }
.round-btn-ghost { background: var(--surface-2); color: var(--text); border: 1px solid var(--border); }
.round-btn-ghost:hover { background: var(--surface-3); }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: var(--text-2);
  transition: background 0.15s, color 0.15s;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn-sm { width: 32px; height: 32px; }
.icon-btn-sm .ico { width: 17px; height: 17px; }
.icon-btn-ring { width: 28px; height: 28px; border: 1.5px solid var(--text-2); color: var(--text); }
.icon-btn-ring .ico { width: 16px; height: 16px; stroke-width: 2; }

.link-accent {
  color: var(--accent);
  font-size: 15px;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
}
.link-sm { font-size: 13px; }

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 20px;
  border-radius: var(--radius);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.005em;
  border: 1px solid transparent;
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.12s var(--ease);
  user-select: none;
}
.btn:active { transform: scale(0.98); }
.btn .ico { width: 18px; height: 18px; }
.btn-block { width: 100%; }
.btn-lg { min-height: 54px; font-size: 17px; }
.btn-sm { min-height: 38px; padding: 0 14px; font-size: 14px; border-radius: var(--radius-sm); }
.btn-sm .ico { width: 16px; height: 16px; }

.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-strong); }
.btn-outline { border-color: var(--accent-line); color: var(--accent); background: transparent; }
.btn-outline:hover { background: var(--accent-soft); border-color: var(--accent); }
.btn-ghost { background: var(--surface-2); color: var(--text); border-color: var(--border); }
.btn-ghost:hover { background: var(--surface-3); }
.btn-danger { background: var(--red); color: #1a0606; }
.btn-danger:hover { background: #ff7373; }
.btn-outline-danger { border-color: rgba(255, 93, 93, 0.4); color: var(--red); }
.btn-outline-danger:hover { background: var(--red-soft); }
.btn-text { color: var(--text-2); min-height: 44px; font-size: 15px; }
.btn-text:hover { color: var(--text); }

/* ==========================================================================
   Cards, sections, lists
   ========================================================================== */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.section { margin-top: 26px; }
.section-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-2);
  margin-bottom: 10px;
}
.section-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.count-badge {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 1px 8px;
  border-radius: 999px;
}

.list > :not([hidden]) ~ :not([hidden]) { border-top: 1px solid var(--border); }

/* Notice (guest banner) */
.notice {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  margin-bottom: 18px;
  border-radius: var(--radius);
  background: var(--accent-soft);
  border: 1px solid rgba(83, 183, 247, 0.25);
  font-size: 13px;
  color: var(--text-2);
}
.notice strong { color: var(--text); font-weight: 600; }
.notice-icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: rgba(83, 183, 247, 0.18); color: var(--accent); flex: none; }
.notice-icon .ico { width: 17px; height: 17px; }
.notice-text { flex: 1; }
.notice-chevron { color: var(--text-3); width: 18px; height: 18px; }

/* ==========================================================================
   Balance hero
   ========================================================================== */
.balance { margin-bottom: 6px; }
.balance-label { display: flex; align-items: center; gap: 8px; color: var(--text-2); font-size: 14px; }
.eye-btn { display: grid; place-items: center; width: 30px; height: 30px; margin: -6px 0; border-radius: 50%; color: var(--text); }
.eye-btn .ico { width: 21px; height: 21px; }
.eye-btn:hover { background: var(--surface-2); }
.balance-value {
  margin-top: 4px;
  font-size: 31px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}
.balance-compact .balance-value { font-size: 28px; }
.balance-month { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.balance-month-label { font-size: 12px; color: var(--text-3); }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px 3px 6px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.pill .ico { width: 14px; height: 14px; stroke-width: 2; }
.pill-in { color: var(--green); background: var(--green-soft); }
.pill-out { color: var(--red); background: var(--red-soft); }
.quick-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }

/* ==========================================================================
   Asset rows + coins
   ========================================================================== */
.asset-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 60px;
  padding: 12px 14px 12px 16px;
  transition: background 0.15s;
}
a.asset-row:hover { background: rgba(255, 255, 255, 0.02); }
.asset-name { flex: 1; min-width: 0; display: grid; font-size: 15px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.asset-name small { font-size: 12px; font-weight: 400; color: var(--text-3); }
.asset-values { display: grid; justify-items: end; text-align: right; line-height: 1.3; }
.asset-primary { color: var(--accent); font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.asset-secondary { color: var(--text-3); font-size: 12px; }
.asset-row-empty .asset-name { color: var(--text-2); }
.asset-row-muted .asset-primary { color: var(--text-2); }
.row-chevron { color: var(--text-3); width: 18px; height: 18px; }

.coin {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  flex: none;
  color: #fff;
  background: var(--surface-3);
}
.coin .ico { width: 16px; height: 16px; stroke-width: 2; }
.coin-sm { width: 26px; height: 26px; }
.coin-sm .ico { width: 14px; height: 14px; }
.coin-checking { background: #2f80ed; }
.coin-card { background: var(--orange); }
.coin-cash { background: #27ae60; }
.coin-savings { background: #8b6cf6; }
.coin-none { background: var(--surface-3); color: var(--text-2); }
.coin-add { background: var(--accent-soft); color: var(--accent); }
.coin-in { background: var(--green); color: #05230f; }
.coin-out { background: var(--orange); color: #2a1400; }
.coin-trend { background: var(--accent-soft); color: var(--accent); }

/* Home header: brand lockup top-left on phones, plain title on wide screens (brand lives in the sidebar). */
.header-brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.header-brand-mark { width: 36px; height: 36px; flex: none; filter: drop-shadow(0 0 8px rgba(46, 170, 255, 0.35)); }
.header-brand-text { display: grid; line-height: 1.2; min-width: 0; }
.header-brand-text strong { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.header-brand-text small { font-size: 12px; color: var(--text-3); white-space: nowrap; }
.page-title-wide { display: none; }
@media (min-width: 960px) {
  .header-brand { display: none; }
  .page-title-wide { display: block; }
}

/* ==========================================================================
   Balance trend card
   ========================================================================== */
.trend { padding: 16px; }
.trend-head { display: flex; align-items: center; gap: 12px; }
.trend-name { flex: 1; display: grid; line-height: 1.25; min-width: 0; }
.trend-name strong { font-size: 15px; font-weight: 500; }
.trend-name small { font-size: 12px; color: var(--text-3); }
.trend-figures { display: grid; justify-items: end; line-height: 1.3; }
.trend-change { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.trend-change .ico { width: 15px; height: 15px; stroke-width: 2; }
.trend-change.is-up { color: var(--green); }
.trend-change.is-down { color: var(--red); }
.trend-value { font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }

.trend-chart { position: relative; height: 150px; margin: 14px -4px 4px; touch-action: pan-y; }
.trend-svg { width: 100%; height: 100%; display: block; overflow: visible; }
.trend-line { fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
.trend-scrub { stroke: rgba(255, 255, 255, 0.18); stroke-width: 1; stroke-dasharray: 3 3; }
.trend-dot-halo { fill: rgba(83, 183, 247, 0.22); }
.trend-dot { fill: #1b2733; stroke: var(--accent); stroke-width: 2; }
.trend-empty { position: absolute; top: 22%; left: 0; right: 0; text-align: center; font-size: 13px; color: var(--text-3); }

.range { display: flex; justify-content: space-between; gap: 4px; margin: 6px 0 16px; padding: 0 8px; }
.range-pill {
  min-width: 46px;
  height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--text-2);
  font-size: 13.5px;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
}
.range-pill:hover { color: var(--text); }
.range-pill.is-active { background: var(--surface-3); color: var(--text); }

/* ==========================================================================
   Transactions
   ========================================================================== */
.tx-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px 12px 16px;
  transition: background 0.15s;
}
.tx-summary:hover { background: rgba(255, 255, 255, 0.02); }
.tx[open] > .tx-summary { background: rgba(255, 255, 255, 0.025); }
.tx-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex: none;
}
.tx-icon .ico { width: 17px; height: 17px; stroke-width: 2; }
.tx-icon.is-in { background: var(--green-soft); color: var(--green); }
.tx-icon.is-out { background: var(--surface-2); color: var(--text-2); }
.tx-main { flex: 1; min-width: 0; display: grid; line-height: 1.3; }
.tx-title, .tx-meta { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tx-title { font-size: 15px; font-weight: 500; }
.tx-meta { font-size: 12.5px; color: var(--text-3); }
.tx-side { display: grid; justify-items: end; line-height: 1.3; }
.tx-amount { font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tx-date { font-size: 12px; color: var(--text-3); white-space: nowrap; }
.tx-detail { padding: 4px 16px 16px 64px; display: grid; gap: 14px; animation: reveal 0.2s var(--ease); }

.kv { display: grid; gap: 8px; }
.kv > div { display: flex; justify-content: space-between; gap: 16px; font-size: 13.5px; }
.kv dt { color: var(--text-3); }
.kv dd { color: var(--text); text-align: right; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }

.pos { color: var(--green); }
.neg { color: var(--red); }
.warn { color: var(--amber); }
.asset-primary.neg { color: var(--red); }

.group-label { font-size: 12px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-3); margin: 18px 0 8px; }
.tx-group:first-of-type .group-label { margin-top: 4px; }

.history-tools { display: grid; gap: 10px; margin-bottom: 8px; }
.search {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  padding: 0 14px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-3);
  transition: border-color 0.15s;
}
.search:focus-within { border-color: var(--accent); }
.search .ico { width: 18px; height: 18px; }
.search-input { flex: 1; min-width: 0; height: 100%; background: none; border: 0; outline: none; font-size: 16px; color: var(--text); }
.search-input::placeholder { color: var(--text-3); }
.search-input::-webkit-search-cancel-button { filter: invert(0.6); }
.filter { display: flex; gap: 8px; }
.filter-chip {
  height: 32px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-2);
  font-size: 13.5px;
  font-weight: 500;
  transition: all 0.15s;
}
.filter-chip:hover { color: var(--text); }
.filter-chip.is-active { background: var(--text); color: var(--bg); border-color: var(--text); }

/* Empty states */
.empty { display: grid; justify-items: center; text-align: center; gap: 4px; padding: 28px 20px; }
.empty-inline { padding: 18px 16px; color: var(--text-3); font-size: 14px; }
.empty-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--surface-2); color: var(--text-2); margin-bottom: 6px; }
.empty-title { font-weight: 600; }
.empty-sub { font-size: 13.5px; color: var(--text-3); max-width: 280px; }

/* Promo row */
.promo { display: flex; align-items: center; gap: 12px; padding: 14px 14px 14px 16px; margin-top: 26px; transition: border-color 0.15s; }
.promo:hover { border-color: var(--border-strong); }
.promo-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--amber-soft); color: var(--amber); flex: none; }
.promo-icon .ico { width: 18px; height: 18px; }
.promo-text { flex: 1; display: grid; line-height: 1.3; }
.promo-text strong { font-weight: 600; }
.promo-text span { font-size: 13px; color: var(--text-3); }

/* ==========================================================================
   Forms
   ========================================================================== */
.form-card { padding: 16px; display: grid; gap: 14px; }
.stack { display: grid; gap: 14px; }
.field { display: grid; gap: 7px; min-width: 0; }
.field-label { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; color: var(--text-2); }
.field-label .ico { width: 14px; height: 14px; color: var(--text-3); }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border-radius: var(--radius);
  background: var(--input);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 16px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  -webkit-appearance: none;
  appearance: none;
}
.input::placeholder { color: var(--text-3); }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.textarea { height: auto; min-height: 84px; padding: 12px 14px; resize: vertical; line-height: 1.45; }
.input-date { min-width: 0; }
.input-date::-webkit-calendar-picker-indicator { filter: invert(0.75); cursor: pointer; }
.input-date::-webkit-date-and-time-value { text-align: left; }

.input-wrap { position: relative; }
.input-wrap .input { padding-right: 48px; }
.input-addon { position: absolute; top: 0; right: 0; width: 48px; height: 48px; display: grid; place-items: center; color: var(--text-3); }
.input-addon:hover { color: var(--text); }
.input-wrap-prefix .input { padding-left: 30px; padding-right: 14px; }
.input-prefix { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-3); pointer-events: none; }

.form-actions { display: grid; grid-template-columns: auto 1fr; gap: 10px; margin-top: 4px; }

.hint { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: var(--text-3); }
.hint .ico { width: 16px; height: 16px; margin-top: 1px; color: var(--amber); }

/* Segmented control */
.segmented {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  padding: 3px;
  border-radius: var(--radius);
  background: var(--input);
  border: 1px solid var(--border);
}
.segmented-option { position: relative; }
.segmented-option input { position: absolute; opacity: 0; pointer-events: none; }
.segmented-option span {
  display: grid;
  place-items: center;
  height: 38px;
  border-radius: 8px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text-2);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.segmented-option input:checked + span { background: var(--surface-3); color: var(--text); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35); }
.segmented-option input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: -2px; }
.segmented-direction .segmented-option:nth-child(1) input:checked + span { color: var(--red); }
.segmented-direction .segmented-option:nth-child(2) input:checked + span { color: var(--green); }

/* Amount hero */
.amount-hero {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 4px;
  padding: 10px 0 2px;
  cursor: text;
}
.amount-currency { font-size: 28px; font-weight: 600; color: var(--text-3); }
.amount-input {
  width: 4.2ch;
  min-width: 4.2ch;
  field-sizing: content;
  max-width: 100%;
  background: none;
  border: 0;
  outline: none;
  font-size: 40px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  text-align: left;
  font-variant-numeric: tabular-nums;
}
.amount-input::placeholder { color: var(--surface-3); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips-center { justify-content: center; }
.chip {
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-2);
  font-size: 13.5px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  transition: all 0.15s;
}
.chip:hover { color: var(--text); border-color: var(--border-strong); }
.chip-outline { background: transparent; border-color: var(--accent-line); color: var(--accent); }
.chip-outline:hover { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }

/* Choice grid (wallet type) */
.choice-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice-body {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 12px 4px 10px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--input);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-2);
  cursor: pointer;
  transition: all 0.15s;
}
.choice input:checked + .choice-body { border-color: var(--accent); color: var(--text); background: var(--accent-soft); }
.choice input:focus-visible + .choice-body { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Stats strip */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.stat { display: grid; gap: 2px; padding: 12px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); min-width: 0; }
.stat span { font-size: 11.5px; color: var(--text-3); }
.stat strong { font-size: 14.5px; font-weight: 600; font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Disclosure cards (new plan / new wallet) */
.disclosure { margin-top: 16px; overflow: hidden; }
.disclosure-summary { display: flex; align-items: center; gap: 12px; padding: 14px 14px 14px 16px; }
.disclosure-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); flex: none; }
.disclosure-icon .ico { width: 18px; height: 18px; }
.disclosure-text { flex: 1; display: grid; line-height: 1.3; }
.disclosure-text strong { font-weight: 600; }
.disclosure-text span { font-size: 13px; color: var(--text-3); }
.disclosure-chevron { color: var(--text-3); width: 18px; height: 18px; transition: transform 0.2s var(--ease); }
details[open] > summary .disclosure-chevron { transform: rotate(180deg); }
.disclosure-body { padding: 4px 16px 16px; animation: reveal 0.2s var(--ease); }

@keyframes reveal { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* ==========================================================================
   Plans
   ========================================================================== */
.summary { padding: 16px; display: grid; gap: 12px; }
.summary-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.summary-label { font-size: 13px; color: var(--text-2); }
.summary-value { font-size: 24px; font-weight: 700; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.summary-value span { font-size: 15px; font-weight: 500; color: var(--text-3); }
.summary-foot { font-size: 13px; color: var(--text-3); }

.ring {
  --p: 0;
  position: relative;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: conic-gradient(var(--accent) calc(var(--p) * 1%), var(--surface-3) 0);
  flex: none;
}
.ring::before { content: ""; position: absolute; inset: 5px; border-radius: 50%; background: var(--surface); }
.ring span { position: relative; font-size: 12.5px; font-weight: 600; }

.progress { height: 6px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.progress-fill { display: block; height: 100%; border-radius: inherit; background: var(--accent); transition: width 0.6s var(--ease); }
.progress-fill.is-warn { background: var(--amber); }
.progress-fill.is-over { background: var(--red); }

.plan-list { display: grid; gap: 10px; }
.plan { padding: 14px 12px 14px 16px; display: grid; gap: 12px; }
.plan-head { display: flex; align-items: center; gap: 12px; }
.plan-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); flex: none; }
.plan-icon .ico { width: 17px; height: 17px; }
.plan-icon.is-warn { background: var(--amber-soft); color: var(--amber); }
.plan-icon.is-over { background: var(--red-soft); color: var(--red); }
.plan-name { flex: 1; display: grid; line-height: 1.3; min-width: 0; }
.plan-name strong { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plan-name small { font-size: 12px; color: var(--text-3); }
.plan-pct { font-size: 14px; font-weight: 600; color: var(--text-2); font-variant-numeric: tabular-nums; }
.plan-figures { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding-right: 4px; }
.plan-figures div { display: grid; gap: 2px; }
.plan-figures div:nth-child(2) { text-align: center; }
.plan-figures div:nth-child(3) { text-align: right; }
.plan-figures dt { font-size: 11.5px; color: var(--text-3); }
.plan-figures dd { font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }

/* ==========================================================================
   Settings
   ========================================================================== */
.profile { display: flex; align-items: center; gap: 14px; padding: 16px; }
.profile-text { flex: 1; display: grid; min-width: 0; line-height: 1.3; }
.profile-text strong { font-size: 16px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.profile-text span { font-size: 13px; color: var(--text-3); }
.avatar {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2b8fe0, #22d3ee);
  color: var(--accent-ink);
  font-size: 19px;
  font-weight: 700;
  flex: none;
}
.avatar .ico { width: 22px; height: 22px; stroke-width: 2; }
.avatar-sm { width: 34px; height: 34px; font-size: 14px; }
.avatar-sm .ico { width: 17px; height: 17px; }
.badge { font-size: 11.5px; font-weight: 600; padding: 3px 9px; border-radius: 999px; }
.badge-accent { background: var(--accent-soft); color: var(--accent); }
.badge-muted { background: var(--surface-3); color: var(--text-2); }

.card-lead { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; color: var(--text-2); }
.card-lead .ico { width: 18px; height: 18px; color: var(--accent); margin-top: 1px; }

.settings-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 56px;
  padding: 10px 14px 10px 16px;
  text-align: left;
  font-size: 15px;
  font-weight: 500;
  transition: background 0.15s;
  cursor: pointer;
}
.settings-row:hover:not(:disabled) { background: rgba(255, 255, 255, 0.02); }
.settings-row-static { cursor: default; }
.settings-icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; background: var(--surface-2); color: var(--text); flex: none; }
.settings-icon .ico { width: 17px; height: 17px; }
.settings-text { flex: 1; display: grid; line-height: 1.3; min-width: 0; }
.settings-text small { font-size: 12.5px; font-weight: 400; color: var(--text-3); }
.settings-row-danger { color: var(--red); }
.settings-row-danger .settings-icon { background: var(--red-soft); color: var(--red); }
.row-disclosure-body { padding: 2px 16px 16px; animation: reveal 0.2s var(--ease); }
.list form { margin: 0; }

.switch { position: relative; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.switch-track { display: block; width: 46px; height: 28px; border-radius: 999px; background: var(--surface-3); transition: background 0.2s; }
.switch-track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  transition: transform 0.2s var(--ease);
}
.switch input:checked + .switch-track { background: var(--accent); }
.switch input:checked + .switch-track::after { transform: translateX(18px); }
.switch input:focus-visible + .switch-track { outline: 2px solid var(--accent); outline-offset: 2px; }

.about { display: grid; justify-items: center; gap: 2px; margin: 36px 0 8px; text-align: center; }
.about img { width: 44px; height: 44px; margin-bottom: 6px; filter: drop-shadow(0 0 10px rgba(46, 170, 255, 0.35)); }
.about strong { font-size: 14px; font-weight: 600; }
.about span { font-size: 12.5px; color: var(--text-3); }

/* ==========================================================================
   Receive / Pay flow
   ========================================================================== */
.flow .section-label { margin-top: 20px; }
.flow .section-label:first-of-type { margin-top: 0; }
.wallet-pick { display: flex; align-items: center; gap: 12px; padding: 6px 14px 6px 16px; min-height: 58px; }
.wallet-pick-select { flex: 1; min-width: 0; }
.wallet-pick-edit { color: var(--text-2); }
.wallet-pick-edit .ico { width: 18px; height: 18px; }

.amount-card { position: relative; padding: 26px 16px 20px; display: grid; gap: 10px; background: var(--surface); }
.amount-corner { position: absolute; width: 22px; height: 22px; border: 0 solid var(--accent); }
.amount-corner.tl { top: 10px; left: 10px; border-top-width: 3px; border-left-width: 3px; border-top-left-radius: 8px; }
.amount-corner.tr { top: 10px; right: 10px; border-top-width: 3px; border-right-width: 3px; border-top-right-radius: 8px; }
.amount-corner.bl { bottom: 10px; left: 10px; border-bottom-width: 3px; border-left-width: 3px; border-bottom-left-radius: 8px; }
.amount-corner.br { bottom: 10px; right: 10px; border-bottom-width: 3px; border-right-width: 3px; border-bottom-right-radius: 8px; }
.amount-card .amount-input { font-size: 44px; }
.amount-caption { text-align: center; font-size: 13px; color: var(--text-3); font-family: var(--mono); }
.amount-caption span { color: var(--text-2); }
.flow-submit { margin-top: 22px; }

@media (max-width: 959px) {
  .screen-flow .flow-submit {
    position: sticky;
    bottom: calc(var(--tabbar-h) + var(--safe-b) + 12px);
    z-index: 5;
  }
  .screen-flow .flow-submit::before {
    content: "";
    position: absolute;
    inset: -16px -20px -12px;
    background: linear-gradient(to bottom, rgba(18, 19, 22, 0), var(--bg) 40%);
    z-index: -1;
  }
}

/* ==========================================================================
   Guide
   ========================================================================== */
.guide-hero { display: flex; align-items: center; gap: 14px; padding: 16px; background: radial-gradient(120% 140% at 0% 0%, rgba(83, 183, 247, 0.16), transparent 60%), var(--surface); }
.guide-hero img { width: 64px; height: 64px; flex: none; filter: drop-shadow(0 0 14px rgba(46, 170, 255, 0.4)); }
.guide-hero-title { font-size: 17px; font-weight: 600; }
.guide-hero-sub { font-size: 13.5px; color: var(--text-2); }
.guide-context { display: flex; justify-content: space-between; margin-top: 14px; padding: 0 2px; font-size: 13px; color: var(--text-3); }
.guide-context strong { color: var(--text-2); font-weight: 600; }
.guide-item .settings-icon { background: var(--accent-soft); color: var(--accent); }
.guide-detail { padding: 0 16px 16px 60px; font-size: 14px; color: var(--text-2); animation: reveal 0.2s var(--ease); }

/* ==========================================================================
   Auth
   ========================================================================== */
.auth-body { background: #0f1013; }
.auth {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  max-width: 440px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  padding: calc(40px + var(--safe-t)) 24px calc(28px + var(--safe-b));
  overflow: hidden;
}
.auth-glow {
  position: absolute;
  top: -120px;
  left: 50%;
  width: 560px;
  height: 560px;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(40, 150, 255, 0.22), rgba(40, 150, 255, 0) 62%);
  pointer-events: none;
}
.auth-hero { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 20px 0 28px; }
.auth-logo { width: 148px; height: 148px; margin-bottom: 18px; animation: spin-in 1.2s var(--ease) both; }
@keyframes spin-in { from { opacity: 0; transform: rotate(-40deg) scale(0.85); } to { opacity: 1; transform: none; } }
.auth-name { font-size: 34px; font-weight: 700; letter-spacing: -0.03em; }
.auth-tagline { margin-top: 2px; font-size: 16px; font-weight: 500; color: var(--accent); }
.auth-blurb { margin-top: 14px; max-width: 300px; font-size: 15px; color: var(--text-2); }
.auth-features { list-style: none; margin: 26px 0 0; padding: 0; display: grid; gap: 10px; width: 100%; max-width: 300px; }
.auth-features li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius);
  background: rgba(27, 28, 32, 0.7);
  border: 1px solid var(--border);
  font-size: 14px;
  font-weight: 500;
  text-align: left;
}
.auth-features .ico { width: 18px; height: 18px; color: var(--accent); }
.auth-actions { position: relative; display: grid; gap: 10px; }
.auth-actions .btn-text .ico { width: 16px; height: 16px; }

/* Bottom sheet */
.sheet-layer { position: fixed; inset: 0; z-index: 60; display: flex; align-items: flex-end; justify-content: center; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.62); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); animation: fade 0.2s ease both; }
.sheet {
  position: relative;
  width: 100%;
  max-width: 480px;
  padding: 10px 20px calc(24px + var(--safe-b));
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-bottom: 0;
  box-shadow: var(--shadow-pop);
  animation: sheet-up 0.32s var(--ease) both;
}
.sheet-handle { display: block; width: 38px; height: 4px; margin: 0 auto 12px; border-radius: 999px; background: var(--surface-3); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; }
.sheet-title { font-size: 20px; font-weight: 600; }
.sheet-sub { margin: 4px 0 18px; font-size: 14px; color: var(--text-2); }
.sheet-switch { text-align: center; font-size: 14px; color: var(--text-3); }
.sheet-switch a { color: var(--accent); font-weight: 500; }
@keyframes sheet-up { from { transform: translateY(100%); } to { transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

@media (min-width: 600px) {
  .sheet-layer { align-items: center; }
  .sheet { border-radius: var(--radius-xl); border-bottom: 1px solid var(--border); padding-bottom: 24px; animation-name: pop-in; }
  .sheet .sheet-handle { display: none; }
}
@keyframes pop-in { from { opacity: 0; transform: translateY(12px) scale(0.98); } to { opacity: 1; transform: none; } }

/* ==========================================================================
   Confirm modal (driven by app.js)
   ========================================================================== */
.confirm-modal { position: fixed; inset: 0; z-index: 80; display: flex; align-items: flex-end; justify-content: center; }
.confirm-modal-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.62); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); animation: fade 0.2s ease both; }
.confirm-modal-card {
  position: relative;
  width: 100%;
  max-width: 420px;
  padding: 10px 20px calc(20px + var(--safe-b));
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-pop);
  text-align: center;
  animation: sheet-up 0.3s var(--ease) both;
}
.confirm-modal-title { font-size: 18px; font-weight: 600; margin-top: 4px; }
.confirm-modal-message { margin: 6px 0 20px; font-size: 14.5px; color: var(--text-2); }
.confirm-modal-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (min-width: 600px) {
  .confirm-modal { align-items: center; }
  .confirm-modal-card { border-radius: var(--radius-lg); padding-bottom: 20px; animation-name: pop-in; }
  .confirm-modal-card .sheet-handle { display: none; }
}

/* ==========================================================================
   Toasts
   ========================================================================== */
.toast-stack {
  position: fixed;
  z-index: 90;
  top: calc(12px + var(--safe-t));
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 420px;
  display: grid;
  gap: 8px;
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: rgba(34, 35, 40, 0.96);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-pop);
  font-size: 14px;
  font-weight: 500;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  animation: toast-in 0.35s var(--ease) both;
}
.toast-icon { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; flex: none; }
.toast-icon .ico { width: 15px; height: 15px; stroke-width: 2.4; }
.toast-success .toast-icon { background: var(--green-soft); color: var(--green); }
.toast-error .toast-icon { background: var(--red-soft); color: var(--red); }
@keyframes toast-in { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }

/* ==========================================================================
   iOS-style select (ios-select.js)
   ========================================================================== */
.ios-picker { position: relative; }
.ios-picker-native { position: absolute !important; width: 1px !important; height: 1px !important; opacity: 0 !important; pointer-events: none !important; }
.ios-picker-trigger {
  width: 100%;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 14px;
  border-radius: var(--radius);
  background: var(--input);
  border: 1px solid var(--border);
  font-size: 16px;
  text-align: left;
  transition: border-color 0.15s;
}
.ios-picker-trigger[aria-expanded="true"] { border-color: var(--accent); }
.ios-picker-value { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ios-picker-chevron { color: var(--text-3); display: grid; }
/* Bare variant: sits inside a card row (Receive / Pay wallet picker). */
.plain-select-bare + .ios-picker-trigger,
.ios-picker:has(.plain-select-bare) .ios-picker-trigger { background: transparent; border-color: transparent; padding: 0; font-size: 15px; font-weight: 500; }
.ios-picker:has(.plain-select-bare) .ios-picker-chevron { display: none; }
.plain-select:not(.ios-picker-native) { width: 100%; height: 48px; padding: 0 12px; border-radius: var(--radius); background: var(--input); border: 1px solid var(--border); font-size: 16px; }

.ios-picker-mount { position: fixed; inset: 0; z-index: 70; }
.ios-picker-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.35); animation: fade 0.15s ease both; }
.ios-picker-sheet-wrap { position: fixed; }
.ios-picker-sheet {
  overflow-y: auto;
  padding: 6px;
  border-radius: 14px;
  background: rgba(38, 39, 45, 0.97);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-pop);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  animation: pop-in 0.18s var(--ease) both;
}
.ios-picker-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 9px;
  font-size: 15px;
  text-align: left;
}
.ios-picker-option:hover, .ios-picker-option:focus-visible { background: rgba(255, 255, 255, 0.06); outline: none; }
.ios-picker-check { width: 16px; color: var(--accent); font-weight: 700; }
.ios-picker-option[aria-selected="true"] { color: var(--accent); }

/* ==========================================================================
   Small screens
   ========================================================================== */
@media (max-width: 380px) {
  :root { --gutter: 16px; }
  .balance-value { font-size: 27px; }
  .choice-grid { grid-template-columns: repeat(2, 1fr); }
  .field-grid { grid-template-columns: 1fr; }
  .range-pill { min-width: 40px; padding: 0 8px; }
  .stat strong { font-size: 13.5px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ==========================================================================
   Theme layer — pure-black canvas, electric-blue accent, Bitcoin orange.
   Refines type, weight and colour, and adds the currency/denomination pieces.
   ========================================================================== */

/* Bold grotesk display type for the pieces that carry the brand voice. */
.page-title,
.page-title-wide,
.nav-title,
.balance-value,
.summary-value,
.auth-name,
.sheet-title,
.header-brand-text strong {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
}
.balance-value { font-weight: 700; }

/* Primary call-to-action: solid electric blue with black ink. */
.btn-primary {
  font-weight: 600;
  letter-spacing: 0.01em;
  box-shadow: 0 0 0 1px rgba(0, 195, 255, 0.12), 0 6px 20px rgba(0, 195, 255, 0.16);
}
.btn-primary:hover { box-shadow: 0 0 0 1px rgba(0, 195, 255, 0.2), 0 8px 26px rgba(0, 195, 255, 0.24); }

/* A touch of glow behind the big balance figure to echo the neon references. */
.balance-value { text-shadow: 0 0 24px rgba(0, 195, 255, 0.12); }

/* Filled glyphs (e.g. the Bitcoin mark): flip the default stroke icon to a fill. */
.ico.ico-fill { fill: currentColor; stroke: none; }

/* Currency "coins" in the settings picker. */
.coin-bitcoin { background: var(--orange); color: #241100; }
.coin-fiat { background: var(--surface-3); color: var(--text); }
.coin-symbol { font-weight: 700; font-size: 15px; line-height: 1; font-family: var(--font-display); }
.coin-sm .coin-symbol { font-size: 13px; }

/* Currency rows: tick the active one, tint the selected row. */
.settings-row.is-selected { background: var(--accent-soft); }
.settings-row .row-check { color: var(--accent); width: 20px; height: 20px; flex: none; }
.settings-row.is-selected .settings-text strong,
.settings-row.is-selected .settings-text { color: var(--text); }

/* Short explainer under a section label. */
.section-hint {
  margin: -4px 0 12px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text-3);
}

/* Official Bitcoin coin icon used in lists (settings picker). */
.ico.coin-icon { width: 26px; height: 26px; flex: none; }

/* ---- Home currency / Bitcoin switcher (pill row) ---- */
.currency-switch { margin-top: 2px; }
.currency-switch-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.currency-switch-row::-webkit-scrollbar { display: none; }
.currency-switch-form { flex: none; margin: 0; }
.currency-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 40px;
  padding: 0 15px 0 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  transition: border-color 0.15s, background 0.15s, color 0.15s, transform 0.12s var(--ease);
}
.currency-pill:hover { border-color: var(--border-strong); color: var(--text); }
.currency-pill:active { transform: scale(0.97); }
.currency-pill.is-active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--accent-line);
}
.currency-pill-sym {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--surface-3);
  color: var(--text);
  font-weight: 700;
  font-size: 13px;
  font-family: var(--font-display);
}
.currency-pill.is-active .currency-pill-sym { background: rgba(0, 195, 255, 0.18); color: var(--accent); }
.ico.currency-pill-coin { width: 24px; height: 24px; flex: none; }
.currency-pill-code { line-height: 1; }

/* ---- Assets grouped by currency ---- */
.asset-group { margin-bottom: 18px; }
.asset-group:last-child { margin-bottom: 0; }
.asset-group-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 4px 8px;
}
.asset-group-sym {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--surface-3);
  color: var(--text);
  font-weight: 700;
  font-size: 13px;
  font-family: var(--font-display);
  flex: none;
}
.ico.asset-group-coin { width: 24px; height: 24px; flex: none; }
.asset-group-name { flex: 1; min-width: 0; font-weight: 600; font-size: 14px; }
.asset-group-total {
  font-weight: 700;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  font-family: var(--font-display);
  color: var(--text);
}
.choice-grid-currency { grid-template-columns: repeat(5, 1fr); }
