/* ============================== tokens ============================== */

:root {
  color-scheme: dark;

  /* fomo.family palette */
  --bg: #060510;
  --surface: #0f0e18;
  --surface-2: #161522;
  --surface-3: #1e1d2c;
  --line: rgba(203, 208, 235, 0.08);
  --line-strong: rgba(203, 208, 235, 0.15);
  --text: #f7f7f7;
  --muted: #9899a3;
  --faint: #686977;
  --accent: #516af6;
  --accent-2: #6f85ff;
  --accent-soft: rgba(81, 106, 246, 0.16);
  --green: #21c95e;
  --green-soft: rgba(33, 201, 94, 0.13);
  --red: #ff622e;
  --red-soft: rgba(255, 98, 46, 0.13);
  --violet: #b56cff;

  --radius: 16px;
  --font: 'Inter', 'Segoe UI Variable Text', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --mono: 'JetBrains Mono', 'Cascadia Mono', 'SF Mono', ui-monospace, Consolas, monospace;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* ============================== base ============================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  background: var(--bg);
}

body {
  width: 380px;
  height: 590px;
  overflow: hidden;
  color: var(--text);
  font: 13px/1.4 var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input,
textarea {
  font: inherit;
  color: inherit;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 2px;
}

::selection {
  background: rgba(111, 133, 255, 0.35);
}

[hidden] {
  display: none !important;
}

.truncate {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.fine {
  margin: 0;
  color: var(--faint);
  font-size: 11px;
}

.center {
  text-align: center;
}

/* ============================== shell ============================== */

.app {
  /* the wide layout (end of file) depends on the app's width, not the screen's */
  container: lens / inline-size;
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  background:
    radial-gradient(110% 55% at 50% -12%, rgba(81, 106, 246, 0.2), transparent 62%),
    var(--bg);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 12px 8px 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
}

.brand-mark {
  border-radius: 8px;
  box-shadow: 0 4px 14px -4px rgba(81, 106, 246, 0.8);
}

.brand-name {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.brand-name b {
  color: var(--accent-2);
  font-weight: 600;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 2px;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  margin-right: 4px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
}

.status i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--faint);
  transition: background 0.3s, box-shadow 0.3s;
}

.status[data-state='online'] i {
  background: var(--green);
  box-shadow: 0 0 0 3px var(--green-soft);
}

.status[data-state='loading'] i {
  background: var(--accent-2);
  animation: pulse 1s ease-in-out infinite;
}

.status[data-state='error'] i {
  background: var(--red);
}

/* ============================== tabs ============================== */

.tabs {
  --index: 0;
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 2px 14px 8px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.tabs-indicator {
  position: absolute;
  top: 3px;
  bottom: 3px;
  left: 3px;
  width: calc((100% - 6px) / 4);
  border-radius: 9px;
  background: var(--surface-3);
  box-shadow:
    inset 0 0 0 1px var(--line-strong),
    0 2px 6px rgba(0, 0, 0, 0.35);
  transform: translateX(calc(var(--index) * 100%));
  transition: transform 0.3s var(--ease);
}

.tabs [role='tab'] {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 30px;
  border: 0;
  border-radius: 9px;
  background: none;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.2s;
}

.tabs [role='tab']:hover,
.tabs [aria-selected='true'] {
  color: var(--text);
}

.tab-count {
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-2);
  font-size: 10px;
  font-weight: 650;
  line-height: 16px;
}

.tab-count:empty {
  display: none;
}

/* ============================== views ============================== */

.views {
  position: relative;
  flex: 1;
  min-height: 0;
}

.view {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 4px 14px 16px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--surface-3) transparent;
  animation: view-in 0.24s var(--ease);
}

.view > * {
  flex-shrink: 0;
}

/* ============================== cards ============================== */

.card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.022), transparent 60%), var(--surface);
}

.card-flush {
  padding: 4px;
}

.section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 24px;
  padding: 2px 2px 0;
}

.section-title h2 {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
}

.count {
  padding: 0 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 600;
  line-height: 16px;
}

.tag {
  padding: 0 6px;
  border-radius: 5px;
  background: var(--accent-soft);
  color: var(--accent-2);
  font-size: 10.5px;
  font-weight: 600;
  line-height: 17px;
  white-space: nowrap;
}

/* ============================== avatars & chips ============================== */

.avatar {
  --h: 230;
  position: relative;
  display: inline-grid;
  flex-shrink: 0;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background: linear-gradient(135deg, hsl(var(--h) 72% 58%), hsl(calc(var(--h) + 55) 68% 38%));
  color: #fff;
  font-weight: 700;
  line-height: 1;
  user-select: none;
}

.avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.25s;
}

.avatar.has-image img {
  opacity: 1;
}

.avatar.has-image .avatar-fallback {
  visibility: hidden;
}

.token-avatar {
  position: relative;
  display: inline-block;
  flex-shrink: 0;
}

.token-avatar .avatar {
  width: 100% !important;
  height: 100% !important;
}

.chain-dot {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 12px;
  height: 12px;
  border: 2.5px solid var(--surface);
  border-radius: 50%;
  background: var(--chain);
}

.chain-chip {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  color: #c9d2ff;
}

.pill {
  display: inline-flex;
  align-items: center;
  border-radius: 6px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.pill-sm {
  padding: 1px 5px;
  font-size: 11px;
}

.pill-md {
  padding: 2px 7px;
  font-size: 12px;
}

.pill.is-up {
  background: var(--green-soft);
  color: var(--green);
}

.pill.is-down {
  background: var(--red-soft);
  color: var(--red);
}

.pill.is-flat {
  background: var(--surface-2);
  color: var(--muted);
}

.verified {
  display: inline-flex;
  flex-shrink: 0;
  color: var(--accent-2);
}

.icon-cutout {
  stroke: var(--surface);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
}

.chip b {
  color: var(--text);
  font-weight: 600;
}

/* ============================== buttons ============================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 0;
  border-radius: 11px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition:
    transform 0.12s,
    filter 0.2s,
    background 0.2s;
}

.btn:active {
  transform: scale(0.98);
}

.btn-md {
  height: 38px;
  padding: 0 16px;
  font-size: 13px;
}

.btn-sm {
  height: 32px;
  padding: 0 12px;
  font-size: 12px;
}

.btn-primary {
  background: linear-gradient(180deg, var(--accent-2), var(--accent));
  box-shadow:
    0 8px 20px -8px rgba(81, 106, 246, 0.8),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
  color: #fff;
}

.btn-primary:hover {
  filter: brightness(1.08);
}

.btn-secondary {
  border: 1px solid var(--line-strong);
  background: var(--surface-3);
  color: var(--text);
}

.btn-secondary:hover {
  background: #262537;
}

.icon-btn {
  display: inline-grid;
  flex-shrink: 0;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 9px;
  background: none;
  color: var(--muted);
  text-decoration: none;
  cursor: pointer;
  transition:
    background 0.15s,
    color 0.15s,
    border-color 0.15s;
}

.icon-btn:hover {
  background: var(--surface-2);
  color: var(--text);
}

.icon-btn.is-spinning .icon {
  animation: spin 0.8s linear infinite;
}

/* something needs attention behind this button */
.icon-btn.is-warn {
  position: relative;
  color: #f3b44a;
}

.icon-btn.is-warn::after {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #f3b44a;
  box-shadow: 0 0 0 2px var(--bg);
  content: '';
}

.icon-btn.is-danger {
  color: var(--red);
}

.icon-btn.is-danger:hover {
  background: var(--red-soft);
}

.add-btn {
  border: 1px solid var(--line-strong);
}

.add-btn.is-active,
.watch-btn.is-active {
  border-color: transparent;
  background: var(--accent-soft);
  color: var(--accent-2);
}

.text-btn {
  padding: 4px 7px;
  border: 0;
  border-radius: 7px;
  background: none;
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.text-btn:hover {
  background: var(--accent-soft);
}

/* ============================== lists ============================== */

.list {
  display: flex;
  flex-direction: column;
}

.row {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  min-height: 54px;
  padding: 8px 10px;
  border: 0;
  border-radius: 12px;
  background: none;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s;
}

.row:hover {
  background: var(--surface-2);
}

.row:hover .chain-dot {
  border-color: var(--surface-2);
}

.row-main {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.row-title {
  font-size: 13px;
  font-weight: 600;
}

.row-sub {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  color: var(--muted);
  font-size: 11.5px;
  white-space: nowrap;
}

.row-sub b {
  color: #cfd0d8;
  font-weight: 500;
}

.row-end {
  display: flex;
  flex-shrink: 0;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
}

/* A row's trailing icon, swapped for a spinner while it works. */
.row-mark {
  display: grid;
  flex-shrink: 0;
  place-items: center;
  width: 28px;
  color: var(--muted);
}

.row-value {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.row-value.is-loading {
  min-width: 52px;
  border-radius: 5px;
  color: transparent;
  background: var(--surface-3);
  animation: shimmer-fade 1.2s ease-in-out infinite;
}

.row-spark {
  display: flex;
  flex-shrink: 0;
}

.token-row {
  gap: 9px;
  padding-right: 4px;
}

.token-row .row-end {
  min-width: 74px;
}

.list-more {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
  height: 34px;
  margin-top: 2px;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0 0 12px 12px;
  background: none;
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.list-more:hover {
  background: var(--accent-soft);
}

/* ============================== profile ============================== */

.profile {
  overflow: hidden;
  padding: 0;
}

.profile-cover {
  position: relative;
  height: 58px;
  background:
    radial-gradient(80% 140% at 85% 0%, rgba(181, 108, 255, 0.55), transparent 60%),
    linear-gradient(120deg, #1d2266, var(--accent) 60%, #7b61ff);
  background-position: center;
  background-size: cover;
}

.profile-cover::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 20%, var(--surface));
  content: '';
}

.profile-head {
  position: relative;
  display: flex;
  align-items: flex-end;
  gap: 12px;
  margin-top: -26px;
  padding: 0 12px 0 14px;
}

.profile-avatar {
  border: 3px solid var(--surface);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.45);
}

.profile-id {
  flex: 1;
  min-width: 0;
  padding-bottom: 1px;
}

.profile-name {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 16px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.profile-handle {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 1px;
  color: var(--muted);
  font-size: 12px;
}

.profile-bio {
  display: -webkit-box;
  margin: 10px 14px 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 12px 0 0;
  border-top: 1px solid var(--line);
}

.stat {
  padding: 10px 4px 12px;
  text-align: center;
}

.stat + .stat {
  border-left: 1px solid var(--line);
}

.stat dt {
  color: var(--faint);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.stat dd {
  margin: 3px 0 0;
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.profile-skeleton {
  display: flex;
  align-items: center;
  gap: 12px;
}

.profile-skeleton .skeleton-stack {
  flex: 1;
}

/* ============================== balance ============================== */

.balance {
  position: relative;
  overflow: hidden;
}

.balance::before {
  position: absolute;
  top: -70px;
  right: -50px;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(81, 106, 246, 0.26), transparent 65%);
  content: '';
  pointer-events: none;
}

.balance-head {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.balance-value {
  position: relative;
  margin: 6px 0 14px;
  font-size: 32px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.balance-cents {
  color: var(--muted);
  font-size: 20px;
  font-weight: 600;
}

.balance-bar {
  display: flex;
  gap: 3px;
  height: 6px;
  margin-bottom: 12px;
}

.seg {
  min-width: 6px;
  border-radius: 999px;
}

.seg-cash {
  background: var(--green);
}

.seg-tokens {
  background: var(--accent-2);
}

.seg-perps {
  background: var(--violet);
}

.legend {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.legend li {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.legend b {
  margin-left: auto;
  color: var(--text);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 3px;
}

/* ============================== account footer ============================== */

.id-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 2px 0 4px;
  color: var(--faint);
  font-size: 11px;
}

.id-footer code {
  color: var(--muted);
  font: 11px var(--mono);
}

.id-footer .icon-btn {
  width: 24px;
  height: 24px;
}

/* ============================== wallets ============================== */

.summary {
  display: grid;
  grid-auto-columns: 1fr;
  grid-auto-flow: column;
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
}

.summary > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  background: var(--surface);
}

.summary-label {
  color: var(--faint);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.summary b {
  font-size: 15px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.wallet {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.wallet-head {
  display: flex;
  align-items: center;
  gap: 11px;
}

.wallet-mark {
  display: grid;
  flex-shrink: 0;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07);
}

.wallet-mark.is-svm {
  background:
    radial-gradient(90% 90% at 100% 0%, rgba(0, 255, 163, 0.2), transparent 70%),
    radial-gradient(90% 90% at 0% 100%, rgba(220, 31, 255, 0.24), transparent 70%),
    var(--surface-3);
}

.wallet-mark.is-evm {
  background:
    radial-gradient(100% 100% at 50% 0%, rgba(138, 156, 240, 0.32), transparent 70%),
    var(--surface-3);
  color: #c9d2ff;
}

.chain-logo {
  display: block;
  flex-shrink: 0;
}

.wallet-id {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.wallet-title {
  font-size: 14px;
  font-weight: 650;
}

.wallet-value {
  font-size: 15px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.badge {
  padding: 1px 6px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
}

.badge.is-accent {
  border-color: transparent;
  background: var(--accent-soft);
  color: var(--accent-2);
}

.address {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 3px 3px 3px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
}

.address code {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font: 12px var(--mono);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.address .icon-btn {
  width: 28px;
  height: 28px;
}

.address.contract .fine {
  margin-right: 8px;
  font-size: 11px;
}

.chain-totals {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.chain-totals li {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.chain-totals b {
  margin-left: auto;
  color: var(--text);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.explorers {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.explorer {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 24px;
  padding: 0 7px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-decoration: none;
  transition:
    color 0.15s,
    border-color 0.15s;
}

.explorer .chain-logo,
.chain-totals .chain-logo {
  color: #c9d2ff;
}

.explorer:hover {
  border-color: color-mix(in srgb, var(--chain) 55%, transparent);
  color: var(--text);
}

/* ============================== search ============================== */

.search {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 5px 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--surface);
  color: var(--faint);
  cursor: text;
  transition:
    border-color 0.2s,
    box-shadow 0.2s,
    color 0.2s;
}

.search:focus-within {
  border-color: rgba(111, 133, 255, 0.6);
  box-shadow: 0 0 0 4px rgba(81, 106, 246, 0.14);
  color: var(--accent-2);
}

.search-input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: 0;
  background: none;
  color: var(--text);
  font-size: 13px;
}

.search-input::placeholder {
  color: var(--faint);
}

.search-input::-webkit-search-cancel-button {
  display: none;
}

.search-clear {
  width: 28px;
  height: 28px;
  visibility: hidden;
}

.search.has-value .search-clear {
  visibility: visible;
}

.search-panel,
.watchlist {
  display: flex;
  flex-direction: column;
  gap: 8px;
  animation: view-in 0.2s var(--ease);
}

.search-panel .row-end {
  margin-right: 2px;
}

.panel-note {
  margin: 0;
  padding: 22px 0;
  color: var(--muted);
  text-align: center;
}

.panel-note.is-error {
  color: var(--red);
}

.flame {
  color: #ff8a3d;
}

.spinner {
  width: 12px;
  height: 12px;
  margin-left: auto;
  border: 2px solid var(--line-strong);
  border-top-color: var(--accent-2);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

/* ============================== sparkline ============================== */

.spark {
  display: block;
  overflow: visible;
}

.spark-line {
  fill: none;
  stroke: var(--muted);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.5;
}

.spark-stop {
  stop-color: var(--muted);
}

.spark.is-up .spark-line {
  stroke: var(--green);
}

.spark.is-up .spark-stop {
  stop-color: var(--green);
}

.spark.is-down .spark-line {
  stroke: var(--red);
}

.spark.is-down .spark-stop {
  stop-color: var(--red);
}

.spark.is-empty .spark-line {
  stroke: var(--line-strong);
  stroke-dasharray: 2 3;
}

/* ============================== chart ============================== */

.chart {
  --trend: var(--green);
  position: relative;
  cursor: crosshair;
  touch-action: none;
}

.chart.is-down {
  --trend: var(--red);
}

.chart-svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.chart-line {
  fill: none;
  stroke: var(--trend);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}

.chart-stop {
  stop-color: var(--trend);
}

.chart-base {
  stroke: var(--line-strong);
  stroke-dasharray: 3 4;
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.chart-label {
  position: absolute;
  right: 0;
  padding: 0 4px;
  border-radius: 4px;
  background: rgba(6, 5, 16, 0.7);
  color: var(--faint);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}

.chart-label.is-hi {
  top: -4px;
}

.chart-label.is-lo {
  bottom: -4px;
}

.chart-cursor,
.chart-dot,
.chart-tip {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s;
}

.chart-cursor {
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(180deg, transparent, var(--line-strong) 15%, var(--line-strong) 85%, transparent);
}

.chart-dot {
  width: 10px;
  height: 10px;
  border: 2px solid var(--bg);
  border-radius: 50%;
  background: var(--trend);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--trend) 25%, transparent);
  transform: translate(-50%, -50%);
}

.chart-tip {
  bottom: -21px;
  padding: 1px 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 10.5px;
  white-space: nowrap;
  transform: translateX(-50%);
}

.chart.is-hovering .chart-cursor,
.chart.is-hovering .chart-dot,
.chart.is-hovering .chart-tip {
  opacity: 1;
}

.chart.is-hovering .chart-label {
  opacity: 0.4;
}

.chart-slot {
  min-height: 186px;
  padding-bottom: 22px;
}

.chart-placeholder {
  display: grid;
  gap: 6px;
  place-content: center;
  justify-items: center;
  height: 164px;
  border-radius: 12px;
  color: var(--faint);
  font-size: 12px;
}

.chart-placeholder.is-empty {
  border: 1px dashed var(--line-strong);
}

/* ============================== token sheet ============================== */

.sheet {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(110% 45% at 50% -10%, rgba(81, 106, 246, 0.16), transparent 60%),
    var(--bg);
  visibility: hidden;
  transform: translateX(100%);
  transition:
    transform 0.32s var(--ease),
    visibility 0s 0.32s;
}

.sheet.is-open {
  visibility: visible;
  transform: none;
  transition: transform 0.32s var(--ease);
}

.app.has-sheet .views,
.app.has-sheet .tabs,
.app.has-sheet .topbar {
  opacity: 0.35;
  transform: translateX(-16%);
}

.views,
.tabs,
.topbar {
  transition:
    transform 0.32s var(--ease),
    opacity 0.32s;
}

.detail {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.detail-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 12px 12px 8px;
  border-bottom: 1px solid var(--line);
}

.detail-head .chain-dot {
  border-color: var(--bg);
}

.detail-id {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.detail-name {
  font-size: 15px;
  font-weight: 650;
}

.detail-sub {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

.detail-sub b {
  color: #cfd0d8;
  font-weight: 600;
}

.watch-btn {
  border: 1px solid var(--line-strong);
}

.detail-scroll {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 14px;
  padding: 14px 14px 16px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--surface-3) transparent;
}

.detail-scroll > * {
  flex-shrink: 0;
}

.detail-price-value {
  font-size: 28px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.detail-price-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.detail-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.seg-control,
.ranges {
  display: flex;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
}

.seg-control button,
.ranges button {
  padding: 5px 8px;
  border: 0;
  border-radius: 7px;
  background: none;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition:
    background 0.15s,
    color 0.15s;
}

.seg-control button:hover,
.ranges button:hover {
  color: var(--text);
}

.seg-control [aria-selected='true'],
.ranges [aria-selected='true'] {
  background: var(--surface-3);
  box-shadow: inset 0 0 0 1px var(--line-strong);
  color: var(--text);
}

.detail-stats {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--line);
}

.cell {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  padding: 10px 11px;
  background: var(--surface);
}

.cell span {
  color: var(--faint);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.cell b {
  overflow: hidden;
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cell b.is-up {
  color: var(--green);
}

.cell b.is-down {
  color: var(--red);
}

/* user's position on the token */
.position {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: hidden;
}

.position::before {
  position: absolute;
  top: -60px;
  right: -40px;
  width: 160px;
  height: 160px;
  background: radial-gradient(circle, rgba(81, 106, 246, 0.2), transparent 65%);
  content: '';
  pointer-events: none;
}

.position-head,
.position-main {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.position-head .fine:first-child {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.position-main > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.position-value {
  font-size: 22px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.position-grid {
  position: relative;
}

.position-grid .cell {
  background: var(--bg);
}

.changes {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.changes > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}

.changes > div > span:first-child {
  color: var(--faint);
  font-size: 10.5px;
  font-weight: 600;
}

.detail-desc {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}

.detail-footer {
  padding: 10px 14px 14px;
  border-top: 1px solid var(--line);
}

.detail-footer:has(> .footer-actions:empty) {
  display: none;
}

.footer-actions {
  display: flex;
  gap: 8px;
}

.detail-footer .btn {
  flex: 1;
  min-width: 0;
}

.detail-footer .btn.is-grow {
  flex: 2;
}

/* ============================== states ============================== */

.gate {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 24px 18px 40px;
  text-align: center;
}

.gate-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin-bottom: 8px;
  border-radius: 18px;
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px rgba(111, 133, 255, 0.25);
  color: var(--accent-2);
}

.gate-title {
  margin: 0;
  font-size: 17px;
  font-weight: 650;
}

.gate-text {
  max-width: 280px;
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.5;
}

.gate-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.gate-icon.is-sm {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  margin: 0;
  border-radius: 10px;
}

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 16px 10px;
  text-align: center;
}

.empty-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 6px;
  border-radius: 14px;
  background: var(--surface-2);
  color: var(--muted);
}

.empty-title {
  margin: 0;
  font-weight: 600;
}

.empty-text {
  max-width: 260px;
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 12px;
}

.banner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 98, 46, 0.25);
  border-radius: 10px;
  background: var(--red-soft);
  color: #ffb59a;
  font-size: 11.5px;
}

.skeleton-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.skeleton {
  height: 14px;
  border-radius: 7px;
  background: linear-gradient(90deg, var(--surface-2) 0%, var(--surface-3) 50%, var(--surface-2) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.3s ease-in-out infinite;
  animation-delay: var(--d, 0ms);
}

.skeleton-stack .skeleton:nth-child(even) {
  width: 64%;
}

.skeleton.circle {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 50%;
}

.chart-placeholder.skeleton {
  height: 164px;
  border-radius: 12px;
  opacity: 0.6;
}

.toast {
  position: absolute;
  bottom: 16px;
  left: 50%;
  z-index: 50;
  max-width: 340px;
  padding: 8px 14px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface-3);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55);
  font-size: 12px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition:
    opacity 0.2s,
    transform 0.25s var(--ease);
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.toast[data-tone='success']::before {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--green);
  content: '';
  vertical-align: 1px;
}

.toast[data-tone='error'] {
  border-color: rgba(255, 98, 46, 0.35);
  color: #ffb59a;
}

/* ============================== privacy ============================== */

.sensitive {
  transition: filter 0.2s;
}

.is-private .sensitive {
  filter: blur(7px);
  user-select: none;
}

/* ============================== forms ============================== */

.stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.stack > * {
  flex-shrink: 0;
}

.detail-sub .detail-sub {
  display: contents;
}

.btn:disabled {
  cursor: not-allowed;
  filter: saturate(0.4);
  opacity: 0.45;
  transform: none;
}

.btn-danger {
  border: 1px solid rgba(255, 98, 46, 0.35);
  background: var(--red-soft);
  color: #ff9a74;
}

.btn-danger:hover {
  background: rgba(255, 98, 46, 0.22);
}

.form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0;
}

.form-intro h3 {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 650;
}

.form-intro p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.form-intro .steps {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.form-error {
  margin: -4px 0 0;
  color: var(--red);
  font-size: 12px;
}

.form-error:empty {
  display: none;
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.inline-form {
  display: flex;
  gap: 8px;
}

.inline-form .input {
  flex: 1;
  min-width: 0;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.field-hint {
  color: var(--faint);
  font-size: 11px;
  line-height: 1.45;
}

.input {
  width: 100%;
  height: 38px;
  padding: 0 11px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  outline: 0;
  background: var(--bg);
  color: var(--text);
  font-size: 13px;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}

.input::placeholder {
  color: var(--faint);
}

.input:focus {
  border-color: rgba(111, 133, 255, 0.6);
  box-shadow: 0 0 0 3px rgba(81, 106, 246, 0.14);
}

textarea.input {
  height: auto;
  padding: 10px 11px;
  line-height: 1.45;
  resize: none;
}

.input.secret {
  font-family: var(--mono);
  font-size: 12px;
  -webkit-text-security: disc;
}

.input.secret.is-revealed {
  -webkit-text-security: none;
}

.input-sm {
  height: 32px;
}

.input[type="number"]::-webkit-inner-spin-button {
  display: none;
}

.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip-group .opt {
  height: 32px;
  padding: 0 11px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition:
    background 0.15s,
    color 0.15s,
    border-color 0.15s;
}

.chip-group .opt:hover {
  color: var(--text);
}

.chip-group .opt[aria-pressed="true"] {
  border-color: rgba(111, 133, 255, 0.55);
  background: var(--accent-soft);
  color: var(--accent-2);
}

.form .seg-control {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
}

.form .seg-control button {
  padding: 7px 8px;
  font-size: 12px;
}

.notice {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.45;
}

.notice .icon {
  flex-shrink: 0;
  margin-top: 1px;
}

.notice.is-warn {
  border-color: rgba(255, 176, 46, 0.28);
  background: rgba(255, 176, 46, 0.08);
  color: #f3c77a;
}

.notice.is-error {
  border-color: rgba(255, 98, 46, 0.28);
  background: var(--red-soft);
  color: #ffb59a;
}

.pasted-session {
  align-items: center;
}

.pasted-session span {
  flex: 1;
}

/* ============================== buy ============================== */

.buy-fomo {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px;
}

.buy-fomo-icon {
  display: grid;
  flex-shrink: 0;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: var(--accent-soft);
  color: var(--accent-2);
}

.buy-fomo-text {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.buy-fomo-text span {
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.4;
}

.amount-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.amount-row .chip-group {
  flex-wrap: nowrap;
}

.amount-row .chip-group .opt {
  padding: 0 9px;
}

.input-suffix {
  position: relative;
  display: flex;
  flex: 1;
  align-items: center;
  min-width: 0;
}

.input-suffix .input {
  padding-right: 34px;
  font-variant-numeric: tabular-nums;
}

.input-suffix > span {
  position: absolute;
  right: 9px;
  color: var(--faint);
  font-size: 11px;
  font-weight: 600;
  pointer-events: none;
}

.pick-list {
  display: flex;
  flex-direction: column;
}

.pick-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.15s;
}

.pick-row:hover {
  background: var(--surface-2);
}

.pick-row input {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--accent);
  cursor: pointer;
}

.pick-row.is-disabled {
  cursor: default;
  opacity: 0.55;
}

.pick-main {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
  font-weight: 600;
}

.pick-main code,
.leg-title code {
  color: var(--faint);
  font: 11px var(--mono);
}

.pick-end {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
  font-variant-numeric: tabular-nums;
}

.pick-end .is-muted {
  color: var(--faint);
}

.pick-issue {
  color: var(--red);
  font-size: 11px;
  font-weight: 600;
}

.wallet-mark.is-sm {
  width: 30px;
  height: 30px;
  border-radius: 9px;
}

.wallet-mark.is-xs {
  width: 22px;
  height: 22px;
  border-radius: 7px;
}

.buy-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 8px;
  padding: 2px 2px 0;
}

.buy-summary > span:first-child {
  color: var(--muted);
}

.buy-summary b {
  font-size: 16px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.buy-summary .fine {
  flex-basis: 100%;
}

.review-total {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px;
}

.review-total b {
  font-size: 22px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

/* ============================== orders ============================== */

.order {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.order-head {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.order-id {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.legs {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  list-style: none;
}

.card-flush > .legs {
  padding: 0;
  border: 0;
  background: none;
}

.leg {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
}

.leg + .leg {
  border-top: 1px solid var(--line);
}

.leg-state {
  display: grid;
  flex-shrink: 0;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--muted);
}

.leg-state .spinner {
  margin: 0;
}

.leg.is-confirmed .leg-state {
  background: var(--green-soft);
  color: var(--green);
}

.leg.is-failed .leg-state {
  background: var(--red-soft);
  color: var(--red);
}

.leg-main {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.leg-title {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-weight: 600;
}

.leg-sub {
  overflow: hidden;
  color: var(--muted);
  font-size: 11.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.leg.is-failed .leg-sub {
  color: #ff9a74;
  white-space: normal;
}

.leg-times {
  color: var(--faint);
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
}

.order-times {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--line);
}

.order-times > div {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  padding: 9px 11px;
  background: var(--surface);
}

.order-times span {
  color: var(--faint);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.order-times b {
  overflow: hidden;
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.leg-end {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  font-variant-numeric: tabular-nums;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--accent-2);
  font-size: 11px;
  font-weight: 600;
  text-decoration: none;
}

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

.pill.is-running {
  gap: 5px;
  background: var(--accent-soft);
  color: var(--accent-2);
}

.pill.is-warn {
  background: rgba(255, 176, 46, 0.12);
  color: #f3b44a;
}

.spinner-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  animation: pulse 1s ease-in-out infinite;
}

/* ============================== imported wallets ============================== */

.imported-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 6px 8px 10px;
  border-radius: 12px;
}

.imported-row:hover {
  background: var(--surface-2);
}

.imported-row .row-sub {
  font: 11px var(--mono);
}

.row-actions {
  display: flex;
  flex-shrink: 0;
}

.row-actions .icon-btn {
  width: 26px;
  height: 26px;
}

.icon-btn.is-danger-soft:hover,
.icon-btn.is-armed {
  background: var(--red-soft);
  color: var(--red);
}


.imported-total {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 2px;
  padding: 10px 12px 8px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

.imported-total b {
  margin-left: auto;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.lock-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 9px 11px;
  border: 1px solid rgba(255, 176, 46, 0.28);
  border-radius: 10px;
  background: rgba(255, 176, 46, 0.08);
  color: #f3c77a;
  font-size: 12px;
  text-align: left;
  cursor: pointer;
}

.lock-banner span {
  flex: 1;
}

.key-preview {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: -4px 0 0;
  padding: 0;
  list-style: none;
}

.key-preview:empty {
  display: none;
}

.key-preview li {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
}

.key-preview li.is-ok {
  color: var(--green);
}

.key-preview li.is-bad {
  color: var(--red);
}

.key-preview code {
  color: var(--text);
  font: 12px var(--mono);
}

.key-preview .fine {
  margin-left: auto;
}

.token-row .buy-btn {
  width: 28px;
  height: 28px;
  margin-left: -4px;
  color: var(--accent-2);
}

.token-row .buy-btn:hover {
  background: var(--accent-soft);
  color: var(--accent-2);
}

.holding-row {
  padding-right: 4px;
}

.holding-row .sell-btn {
  width: 28px;
  height: 28px;
  margin-left: -2px;
  color: var(--red);
}

.holding-row .sell-btn:hover {
  background: var(--red-soft);
  color: var(--red);
}

/* ============================== positions across wallets ============================== */

.positions:empty {
  display: none;
}

.position-row {
  padding-right: 6px;
}

.position-row .sell-all-btn {
  min-width: 74px;
  height: 28px;
  padding: 0 10px;
}

.position-row .needs-login {
  color: #f3c77a;
}

/* ============================== quick mode ============================== */

.tabs [data-tab='quick'] .icon {
  color: var(--accent-2);
}

.quick-row {
  gap: 9px;
  padding-right: 6px;
}

.quick-row .pick-end {
  flex-shrink: 0;
}

.quick-share {
  flex: none;
  width: 58px;
}

.quick-share .input {
  height: 30px;
  padding: 0 20px 0 8px;
  font-size: 12px;
}

.quick-share > span {
  right: 8px;
}

/* The contract address and Buy Now stay at the bottom of the tab, in view whatever scrolls above. */
.quick-bar {
  position: sticky;
  bottom: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: auto -14px -16px;
  padding: 12px 14px 14px;
  border-top: 1px solid var(--line);
  background: var(--bg);
  box-shadow: 0 -14px 24px -12px rgba(0, 0, 0, 0.7);
}

.quick-preview:empty,
.quick-hint:empty {
  display: none;
}

.quick-token {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 36px;
}

.quick-token .skeleton.circle {
  width: 32px;
  height: 32px;
}

.quick-ca {
  height: 42px;
}

.quick-buy {
  width: 100%;
  height: 46px;
  font-size: 14px;
}

/* ============================== funds ============================== */

.funds-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.funds-actions .btn {
  flex: 1;
}

.funds-account {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.funds-profile {
  display: flex;
  align-items: center;
  gap: 11px;
}

.funds-id {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.funds-id b {
  font-size: 14px;
  font-weight: 650;
}

.funds-cash {
  display: flex;
  flex-shrink: 0;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
}

.funds-cash b {
  font-size: 15px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.funds-wallet {
  gap: 6px;
  padding-left: 5px;
}

.funds-wallet-label {
  color: var(--muted);
  font-size: 11.5px;
  white-space: nowrap;
}

.funds-links {
  display: flex;
  gap: 8px;
}

.deposit-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.deposit-qr {
  display: block;
  overflow: hidden;
  border-radius: 12px;
  line-height: 0;
}

.deposit-address {
  max-width: 100%;
  color: var(--text);
  font: 12px/1.5 var(--mono);
  text-align: center;
  word-break: break-all;
}

.funds-review {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.funds-review > div {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  align-items: baseline;
  column-gap: 8px;
}

.funds-review code {
  grid-column: 2;
  color: var(--muted);
  font: 11px/1.45 var(--mono);
  word-break: break-all;
}

.input.is-mono {
  font: 12px var(--mono);
}

.row:disabled {
  cursor: default;
  opacity: 0.5;
}

.row:disabled:hover {
  background: none;
}

.imported-row.is-link {
  cursor: pointer;
}

/* ============================== profile edit ============================== */

.profile-photo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: -4px;
  padding: 4px;
  border-radius: 14px;
  transition:
    background 0.15s,
    box-shadow 0.15s;
}

.profile-photo.is-dragging {
  background: var(--accent-soft);
  box-shadow: 0 0 0 1px rgba(111, 133, 255, 0.5);
}

.profile-photo-btn {
  position: relative;
  flex-shrink: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  cursor: pointer;
}

.profile-photo-badge {
  position: absolute;
  right: -2px;
  bottom: -2px;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 2px solid var(--surface);
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
}

.profile-photo-text {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.profile-photo-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.input-prefix {
  position: relative;
  display: flex;
  align-items: center;
}

.input-prefix > span {
  position: absolute;
  left: 11px;
  color: var(--faint);
  pointer-events: none;
}

.input-prefix .input {
  padding-left: 25px;
}

.bio-input {
  min-height: 96px;
}

.input:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

/* ============================== thesis ============================== */

.trade-card {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px;
}

.trade-card > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.trade-dot {
  flex-shrink: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.trade-dot.is-open {
  background: var(--green);
  box-shadow: 0 0 0 4px var(--green-soft);
}

.trade-dot.is-closed {
  background: var(--faint);
}

.thesis-input {
  min-height: 150px;
  font-size: 13px;
}

.thesis-accounts {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.thesis-accounts:empty {
  display: none;
}

.chip-group .account-opt {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding-left: 6px;
}

.chip-group .account-opt .avatar {
  flex: none;
}

/* ============================== access key ============================== */

.access-lock {
  position: absolute;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 22px 32px;
  overflow-y: auto;
  background:
    radial-gradient(90% 50% at 50% 0%, rgba(81, 106, 246, 0.22), transparent 65%),
    var(--bg);
}

.access-lock > .spinner {
  width: 20px;
  height: 20px;
  margin: 0;
}

/* nothing behind the lock can be seen or reached with the keyboard */
.app.is-locked > :not(.access-lock, .toast) {
  visibility: hidden;
}

.access-lock-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: min(340px, 100%);
  text-align: center;
  animation: view-in 0.24s var(--ease);
}

.access-mark {
  margin-bottom: 10px;
  border-radius: 16px;
  box-shadow: 0 10px 30px -8px rgba(81, 106, 246, 0.85);
}

.access-title {
  margin: 0;
  font-size: 18px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.access-text {
  max-width: 290px;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.5;
}

.access-lock-card > .btn-secondary {
  margin-bottom: 8px;
}

.access-form {
  width: 100%;
  margin-bottom: 10px;
}

.access-input {
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.04em;
  text-align: center;
  text-transform: uppercase;
}

.access-card {
  display: flex;
  align-items: center;
  gap: 11px;
}

.access-card > div {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.facts {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 9px 14px;
  margin: 0;
}

.facts dt {
  color: var(--faint);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.facts dd {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  font-variant-numeric: tabular-nums;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.facts code {
  font-family: var(--mono);
  font-size: 12px;
}

/* ============================== wide layout ============================== */

/* The desktop app's big window: the three tabs side by side as columns, and
   sheets as a panel on the right over a dimmed backdrop. */
.scrim,
.is-wide-only {
  display: none;
}

@container lens (min-width: 900px) {
  .topbar {
    padding: 14px 20px 12px 22px;
  }

  .is-wide-only {
    display: inline-grid;
  }

  .tabs {
    display: none;
  }

  .views {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.25fr);
    grid-template-rows: auto minmax(0, 1fr);
    grid-template-areas:
      'account wallets quick'
      'account wallets tokens';
    gap: 14px;
    width: 100%;
    max-width: 1760px;
    margin: 0 auto;
    padding: 2px 20px 20px;
  }

  /* every column shows, whichever tab was last picked in the compact window */
  .views > .view,
  .views > .view[hidden] {
    position: relative;
    inset: auto;
    display: flex !important;
    padding: 0 14px 16px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: #0a0915;
    animation: none;
  }

  #view-account {
    grid-area: account;
  }

  #view-wallets {
    grid-area: wallets;
  }

  #view-tokens {
    grid-area: tokens;
  }

  /* Quick Mode sits above the watchlist and scrolls on its own when it is long. */
  #view-quick {
    grid-area: quick;
    max-height: 58vh;
  }

  .views > .view::before {
    position: sticky;
    top: 0;
    z-index: 2;
    flex-shrink: 0;
    margin: 0 -14px;
    padding: 14px 16px 8px;
    background: #0a0915;
    color: var(--muted);
    content: attr(data-view);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .sheet {
    left: auto;
    width: min(520px, 100%);
    border-left: 1px solid var(--line-strong);
    box-shadow: -30px 0 80px -30px rgba(0, 0, 0, 0.85);
  }

  .app.has-sheet .views,
  .app.has-sheet .tabs,
  .app.has-sheet .topbar {
    opacity: 1;
    transform: none;
  }

  .scrim {
    position: absolute;
    inset: 0;
    z-index: 19;
    display: block;
    background: rgba(3, 2, 9, 0.6);
    opacity: 0;
    visibility: hidden;
    transition:
      opacity 0.32s,
      visibility 0s 0.32s;
  }

  .app.has-sheet .scrim {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.32s;
  }
}

/* ============================== motion ============================== */

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes pulse {
  50% {
    opacity: 0.35;
  }
}

@keyframes shimmer {
  from {
    background-position: 100% 0;
  }
  to {
    background-position: -100% 0;
  }
}

@keyframes shimmer-fade {
  50% {
    opacity: 0.5;
  }
}

@keyframes view-in {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
}

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