/* Hallmark · genre: modern-minimal · macrostructure: Workbench / quiet hierarchy · theme: Soft Orbit v3.1 · pre-emit critique: P5 H5 E5 S5 R5 V5
 * design-system: design.md · designed-as-app
 * apple-design fluency pass: optical type · grouped materials · instant press response · sheet springs
 * one Japanese UI voice and one restrained financial display voice.
 * contrast: pass (40–41) · nav: N6 mobile dock · footer: none · slop: pass (42–45)
 * honest: pass (46) · chrome: pass (47) · tokens: pass (48) · responsive: pass (49)
 * icons: pass (30) · mobile: pass (34, 49, 50–57)
 * ============================================================
 * Meowfi — Soft Orbit design system
 * Warm neutral-lavender ground, quiet groups, native Japanese typography.
 * Native rounded UI appears only on hero finance and NFT card numbers; native system UI carries everything else.
 * ============================================================ */
@import url("/assets/css/tokens.css?v=6");

:root {
  /* ---- legacy aliases (pages reference these names) ---- */
  --brand: var(--color-accent);
  --brand-strong: var(--color-accent-down);
  --brand-deep: var(--color-accent-down);
  --brand-tint: var(--color-paper-2);
  --brand-tint-2: var(--color-rule);
  --gold: var(--color-gold);
  --gold-strong: var(--color-gold-down);
  --gold-tint: oklch(95% 0.03 84);
  --bg: var(--color-bg);
  --surface: var(--color-paper);
  --surface-2: var(--color-paper-2);
  --ink: var(--color-ink);
  --ink-2: var(--color-ink-2);
  --ink-3: var(--color-ink-3);
  --line: var(--color-rule);
  --line-strong: var(--color-rule-strong);
  --green: var(--color-pos);
  --green-tint: oklch(94% 0.04 155);
  --red: var(--color-neg);
  --red-tint: oklch(95% 0.03 20);
  --amber: var(--color-warn);
  --amber-tint: oklch(95% 0.035 80);
  --night: var(--color-night);
  --night-2: var(--color-night-2);
  --night-line: oklch(34% 0.05 283);

  --shadow-float: 0 12px 40px oklch(23% 0.045 283 / 0.16);
  --shadow-nav: none;

  --r-lg: var(--radius-group);
  --r-md: var(--radius-input);
  --r-sm: 8px;
  --r-pill: 999px;

  --font: var(--font-body);
  --page-max: 480px;
  --pad: 20px;
  --topbar-h: 56px;
  --nav-h: 62px;
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  overflow-x: clip;
  font-synthesis: none;
  font-variant-numeric: tabular-nums lining-nums;
}
body {
  font-family: var(--font-body);
  background: var(--color-bg);
  color: var(--color-ink);
  font-size: var(--text-md);
  line-height: 1.62;
  font-optical-sizing: auto;
  font-variant-numeric: tabular-nums lining-nums;
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
  overflow-x: clip;
}
html[lang="ja"] body,
html[lang="ja"] button,
html[lang="ja"] input,
html[lang="ja"] select,
html[lang="ja"] textarea {
  font-family: var(--font-body);
  letter-spacing: 0;
}
html[lang="ja"] body { font-size: var(--text-md); line-height: 1.64; }
html[lang="ja"] h1,
html[lang="ja"] h2,
html[lang="ja"] h3 { font-family: var(--font-body); font-weight: 600; letter-spacing: 0; }
html[lang="ja"] .cap,
html[lang="ja"] .card-title,
html[lang="ja"] .field label,
html[lang="ja"] .hb-label,
html[lang="ja"] .hs-k { letter-spacing: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }

/* Type contract: body for ordinary data, display only for primary financial figures. */
.num {
  font-family: var(--font-body);
  font-feature-settings: "tnum" 1, "lnum" 1;
  font-variant-numeric: tabular-nums lining-nums;
  font-kerning: none;
  letter-spacing: 0;
}
.display-num { font-family:var(--font-display); font-feature-settings:"tnum" 1,"lnum" 1; font-variant-numeric:tabular-nums lining-nums; font-kerning:none; letter-spacing:-0.025em; }
.amount-box input { font-family: var(--font-display); font-feature-settings: "tnum" 1, "lnum" 1; font-variant-numeric:tabular-nums lining-nums; font-kerning:none; letter-spacing: -0.025em; }
.mono { font-family: var(--font-body); font-size: var(--text-sm); font-variant-numeric: tabular-nums lining-nums; font-kerning:none; letter-spacing: 0; }

/* Numbers may change value, but never animate their geometry. This keeps balance,
   history, vault, NFT and affiliate figures pinned during refresh/BFCache restore. */
:where(.num, .display-num, .hb-amount, .hs-v, .li-amount, .stat-v, .vc-apy .n, .vc-stat .v, .countdown, [data-stable-number]),
:where(.num, .display-num, .hb-amount, .hs-v, .li-amount, .stat-v, .vc-apy .n, .vc-stat .v, .countdown, [data-stable-number]) * {
  font-variant-numeric: tabular-nums lining-nums;
  font-kerning: none;
  transition: none !important;
}

/* Caps label — the system's section voice */
.cap {
  font-size: var(--text-xs); font-weight: 400; letter-spacing: 0;
  text-transform: none; color: var(--color-ink-3);
}

h1, h2, h3 { font-family: var(--font-body); font-weight:600; letter-spacing: -0.01em; font-style: normal; overflow-wrap: anywhere; min-width: 0; }

/* ---------- App frame ---------- */
.app {
  max-width: var(--page-max); margin: 0 auto; min-height: 100dvh;
  padding: calc(var(--topbar-h) + var(--sat)) 0 calc(var(--nav-h) + var(--sab) + 12px);
}
.page { padding: var(--space-section) var(--pad) var(--space-xl); display: flex; flex-direction: column; gap: var(--space-section); }

@media (min-width: 768px) {
  body { background: var(--color-desktop-bg); }
  .app { background: var(--color-bg); box-shadow: 0 0 0 1px var(--color-rule); min-height: 100vh; }
}

/* ---------- Top bar ---------- */
.topbar {
  position: fixed; top: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: var(--page-max); z-index: 40;
  padding-top: var(--sat);
  background: color-mix(in oklch, var(--color-bg) 86%, transparent);
  -webkit-backdrop-filter: blur(20px) saturate(135%); backdrop-filter: blur(20px) saturate(135%);
  border-bottom: 1px solid color-mix(in oklch, var(--color-rule) 64%, transparent);
}
.topbar-inner { height: var(--topbar-h); display: flex; align-items: center; gap: var(--space-2xs); padding: 0 var(--pad); }
.topbar .t-logo img { height: 30px; width: auto; display: block; }
.topbar .t-spacer { flex: 1; }
.topbar .t-title { min-width: 0; font-family: var(--font-body); font-size: var(--text-md); font-weight: 500; letter-spacing: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.icon-btn {
  width: 44px; height: 44px; min-width: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--color-ink-2); border-radius: var(--radius-btn);
}
.icon-btn:active { background: var(--color-paper-2); }
.icon-btn svg { width: 21px; height: 21px; }

/* Address chip: same UI voice as the rest of the product. */
.wallet-chip {
  display: inline-flex; align-items: center; gap: 7px;
  height: 40px; padding: 0 var(--space-3xs);
  font-family: var(--font-body); font-size: var(--text-sm); font-weight: 400; color: var(--color-ink-2);
  white-space: nowrap; flex-shrink: 0;
}
.wallet-chip .status-dot { width: 6px; height: 6px; background: var(--color-pos); }
.wallet-chip:active { color: var(--color-accent); } /* copy target presses to accent */
.wallet-chip .num { font-family: var(--font-body); letter-spacing: 0; }
.back-btn {
  display: inline-flex; align-items: center; height: 44px; padding: 0 var(--space-2xs) 0 0; margin-left: -6px;
  color: var(--color-ink); font-size: var(--text-md); font-weight: 500;
}
.back-btn svg { width: 22px; height: 22px; }
.back-btn span { display: none; }  /* chevron only — the title names the page */

@media (max-width: 360px) {
  .topbar-sub .wallet-chip { display: none; }
}

/* ---------- Bottom nav ---------- */
.bottomnav {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: var(--page-max); z-index: 40;
  background: color-mix(in oklch, var(--color-paper) 82%, transparent);
  -webkit-backdrop-filter: blur(22px) saturate(140%); backdrop-filter: blur(22px) saturate(140%);
  border-top: 1px solid color-mix(in oklch, var(--color-rule) 72%, transparent);
  box-shadow: var(--shadow-card);
  padding-bottom: var(--sab);
}
.bottomnav-inner { display: grid; grid-template-columns: repeat(5, 1fr); height: var(--nav-h); }
.nav-item {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  font-size: var(--text-xs); font-weight: 400; letter-spacing: 0; color: var(--color-ink-3);
}
.nav-item svg { width: 23px; height: 23px; }
.nav-item.active { color: var(--color-accent); }

/* ---------- Buttons (CTA voice, design.md) ---------- */
.btn {
  display: flex; align-items: center; justify-content: center; gap: var(--space-2xs);
  width: 100%; min-height: 52px; padding: 0 var(--space-md);
  border-radius: var(--radius-btn); font-size: var(--text-md); font-weight: 500;
  transition: background var(--dur-state) var(--ease-out), opacity var(--dur-state) var(--ease-out), transform 80ms var(--ease-out);
  user-select: none; white-space: nowrap;
}
.btn:active { transform: scale(0.97); transition-duration: 100ms; }
.btn > span { display: inline-flex; align-items: center; justify-content: center; min-width: 0; line-height: 1.4; }
.btn svg { display: block; flex: 0 0 auto; width: 19px; height: 19px; }
.btn-primary { background: var(--color-accent); color: var(--color-accent-ink); }
.btn-primary:active { background: var(--color-accent-down); }
.btn-primary:disabled { background: var(--color-rule); color: var(--color-ink-3); opacity: 1; }
.btn-gold { background: var(--color-gold); color: var(--color-accent-ink); }
.btn-gold:active { background: var(--color-gold-down); }
.btn-secondary { background: color-mix(in oklch, var(--color-accent) 11%, var(--color-paper)); color: var(--color-accent-down); }
.btn-secondary:active { background: color-mix(in oklch, var(--color-accent) 18%, var(--color-paper)); }
.btn-ghost { background: transparent; color: var(--color-accent); min-height: 48px; }
.btn-danger { background: transparent; color: var(--color-neg); border: 1px solid var(--color-rule); }
.btn-sm { min-height: 40px; width: auto; padding: 0 var(--space-sm); font-size: var(--text-sm); }
.btn:disabled { opacity: 0.5; pointer-events: none; cursor: not-allowed; }

/* ---------- Blocks & rows (no floating cards) ---------- */
.card {
  background: var(--color-paper); border-radius: var(--radius-group); box-shadow: var(--shadow-card);
  border: 1px solid color-mix(in oklch, var(--color-rule) 68%, transparent);
  padding: var(--space-sm) var(--space-sm);
}
.card-tight { padding: var(--space-xs) var(--space-xs); }
.card-title { font-size: var(--text-xs); font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--color-ink-3); margin-bottom: var(--space-xs); }

.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: calc(var(--space-xs) * -1); }
.section-head h2 { font-family: var(--font-body); font-size: var(--text-lg); font-weight: 600; letter-spacing: 0; }
.section-head .more { font-size: var(--text-sm); font-weight: 500; color: var(--color-accent); padding: var(--space-2xs) 0; }

.list { background: var(--color-paper); border-radius: var(--radius-group); box-shadow: var(--shadow-card); border: 1px solid color-mix(in oklch, var(--color-rule) 68%, transparent); overflow: hidden; }
.list-row {
  display: flex; align-items: center; gap: var(--space-xs);
  min-height: 56px; padding: var(--space-2xs) var(--space-sm); width: 100%; text-align: left;
  border-bottom: 1px solid var(--color-rule);
  transition: background 100ms var(--ease-out), transform 100ms var(--ease-out);
}
.list > .list-row:last-child, .list > a:last-child .list-row { border-bottom: 0; }
.list-row:active { background: var(--color-paper-2); transform: scale(0.995); }
.list-row .li-icon {
  width: 36px; height: 36px; min-width: 36px;
  display: flex; align-items: center; justify-content: center;
  background: color-mix(in oklch, var(--color-ink-2) 10%, var(--color-paper)); color: var(--color-ink-2); border-radius: 50%;
}
.list-row .li-icon svg { width: 19px; height: 19px; }
.list-row .li-icon img { width: 30px; height: 30px; border-radius: 8px; }
.list-row .li-main { flex: 1; min-width: 0; }
.list-row .li-title { font-size: var(--text-md); font-weight: 500; }
.list-row .li-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-row .li-sub { font-size: var(--text-sm); color: var(--color-ink-3); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-row .tx-date { font-size: var(--text-xs); line-height: 1.3; letter-spacing: 0; }
.list-row .li-end { text-align: right; }
.list-row .tx-status { display: flex; justify-content: flex-end; min-height: 13px; margin-bottom: var(--space-3xs); }
.list-row .li-amount { font-family: var(--font-body); font-feature-settings: "tnum"; font-variant-numeric:tabular-nums; font-size: var(--text-md); font-weight: 600; letter-spacing: 0; }
.list-row .li-amount.pos { color: var(--color-pos); }
.list-row .li-amount.neg { color: var(--color-ink); }
.list-row .li-amount.pending { color: var(--color-pending); }
.chev {
  display: flex; align-items: center; justify-content: center;
  width: 18px; min-width: 18px; height: 18px; flex: 0 0 18px;
  color: var(--color-ink-3); line-height: 1;
}
.chev svg { display: block; width: 18px; height: 18px; flex: 0 0 auto; }
.tx-row .li-title,
.tx-row .li-amount { font-size: var(--text-sm); }

/* Person identity: a configured square image is cropped to the same circle as the ID initial. */
.person-avatar {
  width: 36px; height: 36px; min-width: 36px; border-radius: 50%; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center;
  background: color-mix(in oklch, var(--color-accent) 14%, var(--color-paper));
  color: var(--color-accent-down); font-family: var(--font-body); font-size: var(--text-md); font-weight: 600;
}
.person-avatar-lg { width: 44px; height: 44px; min-width: 44px; font-size: var(--text-lg); }
.person-avatar-xs { width: 28px; height: 28px; min-width: 28px; font-size: var(--text-sm); }
.person-avatar-xl { width: 76px; height: 76px; min-width: 76px; font-size: var(--text-xl); }
.person-avatar img { width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }

/* tx type glyphs — Apple-Wallet-style soft tint circles */
.li-icon.tx-deposit, .li-icon.tx-receive { color: var(--color-pos); background: color-mix(in oklch, var(--color-pos) 13%, var(--color-paper)); }
.li-icon.tx-send, .li-icon.tx-withdraw, .li-icon.tx-vault { color: var(--color-accent); background: color-mix(in oklch, var(--color-accent) 12%, var(--color-paper)); }
.li-icon.tx-nft, .li-icon.tx-reward { color: var(--color-gold-down); background: color-mix(in oklch, var(--color-gold) 16%, var(--color-paper)); }

/* ---------- Badges: text, not pills ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: var(--text-xs); font-weight: 500; letter-spacing: 0; text-transform: none;
  background: transparent; padding: 0; border-radius: 0; height: auto;
}
.li-title .badge, .row > .badge { margin-inline-start: var(--space-2xs); }
.badge svg { display:block; flex:0 0 auto; width: 12px; height: 12px; }
.badge-brand { color: var(--color-accent); }
.badge-gold { color: var(--color-gold); }
.badge-bronze { color:var(--color-tier-bronze); }
.badge-silver { color:var(--color-tier-silver); }
.badge-platinum { color:var(--color-tier-platinum); }
.badge-black { color:var(--color-tier-black); }
.badge-diamond { color:var(--color-accent); }
.badge-legend { color:var(--color-tier-legend); }
.badge-green { color: var(--color-pos); }
.badge-red { color: var(--color-neg); }
.badge-amber { color: var(--color-warn); }
.badge-gray { color: var(--color-ink-3); }

.status-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }

/* ---------- Tabs (was .seg) & filter chips ---------- */
.seg {
  display: flex; background: color-mix(in oklch, var(--color-ink) 6%, var(--color-bg));
  border-radius: 12px; padding: 3px; gap: 2px; border: 0;
}
.seg button {
  flex: 1; min-height: 40px; border-radius: 10px; padding: 0 var(--space-2xs);
  font-size: var(--text-md); font-weight: 500; color: var(--color-ink-2); white-space: nowrap;
  transition: background 140ms var(--ease-out), color 140ms var(--ease-out);
}
.seg button.active { background: var(--color-paper); color: var(--color-ink); font-weight: 600; box-shadow: var(--shadow-soft); }

.chips { display: flex; gap: var(--space-2xs); overflow-x: auto; scrollbar-width: none; margin: 0 calc(var(--pad) * -1); padding: 0 var(--pad); }
.chips::-webkit-scrollbar { display: none; }
.chip {
  height: 36px; padding: 0 var(--space-sm); border-radius: 999px; white-space: nowrap;
  background: var(--color-paper); border: 0;
  font-size: var(--text-sm); font-weight: 500; color: var(--color-ink-2);
  transition: background 120ms var(--ease-out), color 120ms var(--ease-out), transform 100ms var(--ease-out);
}
.chip:active { transform: scale(0.96); }
.chip.active { background: var(--color-ink); color: var(--color-paper); font-weight: 600; }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: var(--space-2xs); }
.field label { font-size: var(--text-xs); font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--color-ink-3); }
.field .hint { font-size: var(--text-sm); color: var(--color-ink-3); }
.field .error-text { font-size: var(--text-sm); color: var(--color-neg); font-weight: 500; display: flex; gap: 5px; align-items: center; padding-inline-start:var(--space-xs); }
.field .ok-text { font-size: var(--text-sm); color: var(--color-pos); font-weight: 500; display: flex; gap: 5px; align-items: center; }
.error-text svg, .ok-text svg { display:block; width: 14px; height: 14px; min-width: 14px; flex-shrink: 0; }

.input {
  width: 100%; min-height: 52px; padding: 0 var(--space-sm);
  background: var(--color-paper); border: 1px solid transparent; border-radius: var(--radius-input);
  font-family: var(--font-body); font-size: 16px; font-weight: 400; letter-spacing: 0;
  line-height: 1.4; outline: 2px solid transparent; outline-offset: 1px; background: var(--color-paper);
  transition: border-color var(--dur-state) var(--ease-out);
}
.input.mono { font-family: var(--font-body); font-size: 16px; letter-spacing: 0; }
.input::placeholder {
  color: var(--color-placeholder); font-family: var(--font-body); font-size: var(--text-md);
  font-weight: 400; letter-spacing: 0; opacity: 1;
}
html[lang="ja"] .input::placeholder {
  font-family: var(--font-body);
}
.input:focus { border-color: var(--color-accent); }
.input:disabled { transition: none; color: var(--color-ink-2); background: var(--color-paper-2); opacity:0.55; cursor:not-allowed; }
.input.invalid, .input[aria-invalid="true"] { border-color: var(--color-neg); }
textarea.input { padding: var(--space-xs) var(--space-sm); min-height: 96px; resize: vertical; line-height: 1.45; }
/* One rule for every input that sits on a white surface (card, sheet, modal):
   inset ground-tint well — never white-on-white, never a different tint per page. */
.card .input, .sheet .input, .modal .input, .sheet .amount-box { background: var(--color-bg); }
/* chips lose their shape on white surfaces without the same ground tint */
.card .chip:not(.active), .sheet .chip:not(.active) { background: var(--color-bg); }

.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap .input { padding-right: 72px; }
.input-wrap .in-action {
  position: absolute; right: var(--space-2xs); height: 36px; padding: 0 var(--space-xs);
  color: var(--color-accent); font-size: var(--text-sm); font-weight: 600; letter-spacing: 0;
}
/* copyable readonly input: glyph inside the field, whole field taps */
.input-wrap .in-copy {
  position: absolute; right: var(--space-sm); display: flex; pointer-events: none;
  color: var(--color-ink-3);
}
.input-wrap .in-copy svg { width: 17px; height: 17px; }
/* small inline controls keep their visual size but extend their hit area */
.in-action, .max-btn { position: relative; }
.in-action::after, .max-btn::after { content: ""; position: absolute; inset: -6px -4px; }

/* Amount entry: giant number over a hairline, label + MAX beneath */
.amount-box { background: var(--color-paper); border: 0; border-radius: var(--radius-group); padding: var(--space-sm); transition: box-shadow var(--dur-state) var(--ease-out); }
.amount-box:focus-within { box-shadow: inset 0 0 0 1.5px var(--color-accent); }
.amount-box.invalid { box-shadow: inset 0 0 0 1.5px var(--color-neg); }
.amount-box .ab-top { display: flex; align-items: baseline; gap: var(--space-xs); }
.amount-box .ab-token { display: flex; align-items: center; gap: 6px; font-size: var(--text-sm); font-weight: 500; color: var(--color-ink-3); letter-spacing: 0; }
.amount-box .ab-token img { width: 20px; height: 20px; }
.amount-box input {
  flex: 1; min-width: 0; border: 0; outline: none; background: transparent; text-align: right;
  font-size: var(--text-display); font-weight: 700;
}
.amount-box input::placeholder { color: var(--color-rule-strong); }
.amount-box .ab-bottom { display: flex; align-items: center; justify-content: space-between; margin-top: var(--space-2xs); font-size: var(--text-sm); color: var(--color-ink-3); }
.amount-box .balance-inline { font-family: var(--font-body); font-size: var(--text-sm); font-weight: 400; letter-spacing: 0; font-feature-settings: "tnum"; }
.amount-box .ab-bottom .max-btn { height: 32px; padding: 0 var(--space-2xs); color: var(--color-accent); font-size: var(--text-sm); font-weight: 600; letter-spacing: 0; }

.check-row { display: flex; align-items: flex-start; gap: var(--space-2xs); padding: var(--space-3xs) 0; font-size: var(--text-md); color: var(--color-ink-2); }
.check-row input[type="checkbox"] {
  appearance: none; -webkit-appearance: none; width: 20px; height: 20px; min-width: 20px; margin-top: 2px;
  border: 1.5px solid var(--color-rule-strong); border-radius: 6px; display: inline-grid; place-content: center;
  background: var(--color-paper); cursor: pointer;
}
.check-row input[type="checkbox"]:checked { background: var(--color-accent); border-color: var(--color-accent); }
.check-row input[type="checkbox"]:checked::before {
  content: ""; width: 10px; height: 5px; border-left: 2px solid var(--color-accent-ink); border-bottom: 2px solid var(--color-accent-ink);
  transform: rotate(-45deg) translate(0, -1px);
}

.stepper { display: flex; align-items: center; gap: var(--space-xs); }
.stepper button {
  width: 48px; height: 48px; border-radius: var(--radius-btn); border: 1px solid var(--color-rule-strong);
  color: var(--color-ink); font-size: var(--text-xl); display: flex; align-items: center; justify-content: center;
}
.stepper button:active { background: var(--color-paper-2); }
.stepper button:disabled { opacity: 0.35; }
.stepper input {
  flex: 1; min-width: 0; text-align: center; border: 1px solid var(--color-rule-strong); border-radius: var(--radius-btn);
  min-height: 48px; font-family: var(--font-display); font-feature-settings: "tnum"; font-size: var(--text-xl); font-weight: 700; outline: none;
}
.stepper input:focus { border-color: var(--color-accent); }

/* ---------- KV rows ---------- */
.kv { display: flex; flex-direction: column; }
.kv-row { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-sm); padding: var(--space-xs) 0; border-bottom: 1px solid var(--color-rule); font-size: var(--text-md); }
.kv-row:last-child { border-bottom: 0; }
.kv-row .k { color: var(--color-ink-3); white-space: nowrap; }
.kv-row .v { font-weight: 600; text-align: right; word-break: break-all; }
.kv-row .v.num, .kv-row .v .num { font-family: var(--font-body); font-feature-settings: "tnum"; letter-spacing: 0; font-weight: 600; }
.kv-row .v.big { font-size: var(--text-lg); }
.kv-row.total { border-top: 1px solid var(--color-rule-strong); border-bottom: 0; }
.kv-row.total .k { color: var(--color-ink); font-weight: 600; }
.kv-row.total .v { font-size: var(--text-lg); }
.kv-row.balance-after-row,
.kv-row.balance-after-row .k,
.kv-row.balance-after-row .v,
.kv-row.balance-after-row .v.num,
.kv-row.balance-after-row .v .num {
  color: var(--color-ink-3);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 400;
}
.tx-detail-kv .kv-row {
  display:grid; grid-template-columns:minmax(104px,40%) minmax(0,1fr); align-items:center;
  min-height:56px; padding:var(--space-2xs) 0; font-family:var(--font-body); font-size:var(--text-sm); line-height:1.35;
}
.tx-detail-kv .kv-row .k { min-width:0; white-space:normal; font-family:var(--font-body); font-size:inherit; font-weight:400; }
.tx-detail-kv .kv-row .v { min-width:0; width:100%; font-family:var(--font-body); font-size:inherit; font-weight:500; line-height:inherit; }
.tx-detail-kv .kv-row .v.num, .tx-detail-kv .kv-row .v .num { font-family:var(--font-body); font-size:inherit; font-weight:500; }
.tx-detail-kv .badge { font-family:var(--font-body); }
.tx-detail-kv .copy-value-button { min-height:0; align-self:stretch; }

/* ---------- Sheets & modals ---------- */
.sheet-backdrop {
  position: fixed; inset: 0; z-index: 60; background: var(--color-backdrop);
  opacity: 0; transition: opacity var(--dur-state) var(--ease-out);
}
/* modal layer sits above sheets so the blur covers everything behind the popup */
.sheet-backdrop.modal-backdrop {
  z-index: 70;
  -webkit-backdrop-filter: blur(9px); backdrop-filter: blur(9px);
}
.sheet-backdrop.show { opacity: 1; }
.sheet {
  position: fixed; bottom: 0; left: 50%; transform: translate(-50%, 105%);
  width: 100%; max-width: var(--page-max); z-index: 61;
  background: var(--color-paper); border-radius: var(--radius-sheet) var(--radius-sheet) 0 0;
  padding: var(--space-2xs) var(--pad) calc(var(--space-md) + var(--sab));
  box-shadow: var(--shadow-sheet);
  transition: transform var(--dur-sheet) var(--ease-sheet);
  max-height: 88dvh; overflow-y: auto;
}
.sheet.show { transform: translate(-50%, 0); }
.sheet .grab { width: 36px; height: 4px; border-radius: 2px; background: var(--color-rule-strong); margin: var(--space-2xs) auto var(--space-sm); }
.sheet h3 { font-size: var(--text-lg); font-weight: 600; margin-bottom: var(--space-3xs); }
.sheet .sheet-sub { font-size: var(--text-sm); color: var(--color-ink-3); margin-bottom: var(--space-sm); }

.modal { position: fixed; inset: 0; z-index: 71; display: flex; align-items: center; justify-content: center; padding: var(--space-md); pointer-events: none; }
.modal .modal-card {
  width: 100%; max-width: 400px; background: var(--color-paper); border-radius: var(--radius-group);
  border: 1px solid color-mix(in oklch, var(--color-rule) 72%, transparent);
  padding: var(--space-md) var(--space-sm) var(--space-sm); box-shadow: var(--shadow-float);
  opacity: 0; transform: scale(0.97); transition: opacity var(--dur-state) var(--ease-out), transform var(--dur-sheet) var(--ease-sheet);
  pointer-events: auto; max-height: 86dvh; overflow-y: auto;
}
.modal.show .modal-card { opacity: 1; transform: none; }
.modal { font-family:var(--font-body); font-size:var(--text-sm); }
.modal h3 { font-family: var(--font-body); font-size: var(--text-md); font-weight: 600; text-align: left; margin-bottom: var(--space-xs); }
.modal .center h3 { text-align: center; }
.modal .kv-row {
  display:grid; grid-template-columns:minmax(104px,40%) minmax(0,1fr); align-items:center;
  min-height:52px; padding:var(--space-2xs) 0; font-family:var(--font-body); font-size:var(--text-sm); line-height:1.35;
}
.modal .kv-row .k { min-width:0; white-space:normal; font-family:var(--font-body); font-size:inherit; font-weight:400; }
.modal .kv-row .v,
.modal .kv-row .v.num,
.modal .kv-row .v .num,
.modal .kv-row .v.big,
.modal .kv-row.total .v { min-width:0; width:100%; max-width:none; font-family:var(--font-body); font-size:inherit; font-weight:500; line-height:inherit; }
.modal .kv-row.total .k { font-weight:500; }
.modal .bold { font-size:var(--text-sm); font-weight:500; }

/* ---------- Toast ---------- */
.toast-wrap { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--nav-h) + var(--sab) + 16px); z-index: 80; display: flex; flex-direction: column; gap: var(--space-2xs); align-items: center; width: max-content; max-width: 92vw; }
.toast {
  display: flex; align-items: center; gap: var(--space-2xs);
  background: var(--color-ink); color: var(--color-paper); font-size: var(--text-sm); font-weight: 500;
  padding: 10px 16px; border-radius: var(--radius-btn);
}
.toast svg { width: 16px; height: 16px; color: var(--color-success-bright); }
.toast.err svg { color: var(--color-error-bright); }

/* ---------- Skeleton / states ---------- */
.skeleton { position: relative; overflow: hidden; background: var(--color-paper-2); border-radius: 6px; min-height: 14px; }
.skeleton::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, var(--color-shimmer), transparent); animation: shimmer 1.4s infinite; }
@keyframes shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }

/* shared state glyph circle: pending / success screens all use the same 64px tint circle */
.state-ic { display: flex; align-items: center; justify-content: center; width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 50%; }
.state-ic svg { width: 30px; height: 30px; }
.state-ic.pend { color: var(--color-ink-2); background: color-mix(in oklch, var(--color-ink) 7%, var(--color-paper)); }
.state-ic.ok { color: var(--color-pos); background: color-mix(in oklch, var(--color-pos) 13%, var(--color-paper)); }
.state-card { padding: var(--space-lg) var(--space-sm); }

/* shared loading spinner (pages may override colors, never the size) */
.spin {
  width: 22px; height: 22px; min-width: 22px; border-radius: 50%;
  border: 3px solid var(--color-rule); border-top-color: var(--color-accent);
  animation: spin-rot 0.8s linear infinite;
}
@keyframes spin-rot { to { transform: rotate(360deg); } }

.empty-state { text-align: center; padding: var(--space-xl) var(--space-md); color: var(--color-ink-3); }
.empty-state svg { width: 36px; height: 36px; margin: 0 auto var(--space-2xs); color: var(--color-rule-strong); }
.empty-state .es-title { font-size: var(--text-sm); font-weight: 400; color: var(--color-ink-3); }
.empty-state .es-sub { font-size: var(--text-sm); margin-top: 2px; }
.empty-state.nft-empty .es-title { color:var(--color-ink-3); font-size:var(--text-sm); font-weight:400; }

.banner { display: flex; align-items:center; gap: var(--space-2xs); padding: var(--space-xs) var(--space-sm); border-radius: var(--radius-input); font-size: var(--text-sm); line-height: 1.5; border: 0; background: var(--color-paper); }
.banner svg { display:block; flex:0 0 auto; width: 17px; height: 17px; min-width: 17px; }
.banner-warn { background: color-mix(in oklch, var(--color-warn) 10%, var(--color-paper)); color: var(--color-warn); }
.banner-info { background: var(--color-paper); color: var(--color-ink-2); }
.banner-error { background: color-mix(in oklch, var(--color-neg) 9%, var(--color-paper)); color: var(--color-neg); }
.banner-success { background: color-mix(in oklch, var(--color-pos) 10%, var(--color-paper)); color: var(--color-pos); }

/* ---------- Typographic balance hero ---------- */
.hero-balance { background: transparent; color: var(--color-ink); border-radius: 0; padding: var(--space-2xs) 0 0; box-shadow: none; position: relative; }
.hero-balance .hb-label { font-size: var(--text-xs); font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--color-ink-3); opacity: 1; }
.hero-balance .hb-amount { font-family: var(--font-display); font-feature-settings: "tnum"; font-size: var(--text-display); font-weight: 700; letter-spacing: -0.03em; margin-top: var(--space-3xs); }
.hero-balance .hb-amount .cur { font-size: var(--text-md); font-weight: 500; color: var(--color-ink-3); margin-left: var(--space-3xs); letter-spacing: 0; }
.hero-balance .hb-mark { display: none; }
.hb-split { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-2xs); margin-top: var(--space-sm); border-top: 0; }
.hb-split .hs-cell { background: transparent; border: 0; border-radius: 0; padding: var(--space-2xs) var(--space-xs); border-left: 1px solid var(--color-rule); }
.hb-split .hs-cell:first-child { border-left: 0; padding-left: 0; }
.hb-split .hs-k { font-size: var(--text-xs); font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--color-ink-3); white-space: nowrap; }
.hb-split .hs-v { font-family: var(--font-body); font-feature-settings: "tnum"; font-size: var(--text-md); font-weight: 600; margin-top: 2px; white-space: nowrap; }

/* Action row: quiet bordered squares */
.action-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-2xs); }
.action-row.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.action-btn {
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  background: var(--color-paper); border: 0; border-radius: var(--radius-group);
  padding: var(--space-sm) var(--space-3xs) var(--space-xs); font-size: var(--text-sm); font-weight: 500; color: var(--color-ink);
  transition: transform 100ms var(--ease-out), background 100ms var(--ease-out);
}
.action-btn:active { background: var(--color-paper-2); transform: scale(0.97); }
.action-btn .ab-ic {
  width: 40px; height: 40px; border-radius: 50%;
  background: color-mix(in oklch, var(--color-accent) 12%, var(--color-paper));
  color: var(--color-accent); display: flex; align-items: center; justify-content: center;
}
.action-btn .ab-ic svg { width: 20px; height: 20px; }

/* ---------- Progress ---------- */
.progress { height: 6px; border-radius: 3px; background: color-mix(in oklch, var(--color-ink) 7%, var(--color-bg)); overflow: hidden; }
.progress > div { height: 100%; border-radius: 3px; background: var(--color-accent); }
.progress.gold > div { background: var(--color-gold); }

/* ---------- Accordion ---------- */
.acc-item { border-bottom: 1px solid var(--color-rule); }
.acc-item:last-child { border-bottom: 0; }
.acc-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-xs); width: 100%; text-align: left; padding: var(--space-sm) 0; font-size: var(--text-md); font-weight: 500; }
.acc-head:active { background: var(--color-paper-2); }
.acc-head svg { width: 18px; height: 18px; color: var(--color-ink-3); transition: transform var(--dur-state) var(--ease-out); min-width: 18px; }
.acc-item.open .acc-head svg { transform: rotate(180deg); }
.acc-body { display: none; padding: 0 0 var(--space-sm); color: var(--color-ink-2); font-size: var(--text-md); line-height: 1.72; }
.acc-item.open .acc-body { display: block; }
.acc-body h4 { font-size: var(--text-md); margin: var(--space-xs) 0 var(--space-3xs); color: var(--color-ink); }
.acc-body p + p { margin-top: var(--space-2xs); }
.acc-body ul { padding-left: 18px; margin: var(--space-2xs) 0; }
.acc-body li { margin: 3px 0; }

/* ---------- Vault rows ---------- */
.vault-card { background: var(--color-paper); border-radius: var(--radius-group); box-shadow: var(--shadow-card); border: 1px solid color-mix(in oklch, var(--color-rule) 68%, transparent); padding: var(--space-sm); display: block; transition: transform 100ms var(--ease-out), background 100ms var(--ease-out); }
.vault-card:active { background: var(--color-paper-2); transform: scale(0.99); }
.vault-card .vc-head { display: flex; align-items: flex-start; gap: var(--space-xs); }
.vault-card .vc-token { display: none; }
.vault-card .vc-name { font-family: var(--font-body); font-size: var(--text-lg); font-weight: 600; letter-spacing: 0; }
.vault-card .vc-sub { font-size: var(--text-xs); color: var(--color-ink-3); font-weight: 400; letter-spacing: 0; text-transform: none; display: flex; align-items: center; gap: 6px; margin-top: 2px; }
.vault-card .vc-apy { display:flex; align-items:baseline; justify-content:flex-end; gap:5px; text-align: right; margin-left: auto; white-space:nowrap; }
.vault-card .vc-apy .n { font-family: var(--font-display); font-feature-settings: "tnum"; font-size: var(--text-xl); font-weight: 700; color: var(--color-pos); letter-spacing: -0.025em; }
.vault-card .vc-apy .k { font-size: var(--text-xs); color: var(--color-ink-3); font-weight: 400; letter-spacing: 0; }
.vault-card .vc-stats { display: grid; grid-template-columns: repeat(3, auto); justify-content: space-between; gap: var(--space-xs); margin-top: var(--space-xs); padding-top: var(--space-xs); border-top: 1px solid var(--color-rule); }
.vault-card .vc-stat .k { font-size: var(--text-xs); color: var(--color-ink-3); font-weight: 400; letter-spacing: 0; }
.vault-card .vc-stat .v { font-family: var(--font-body); font-feature-settings: "tnum"; font-size: var(--text-sm); font-weight: 600; margin-top: 1px; }
/* ---------- NFT card art (the one decorated surface) ---------- */
.nft-card {
  aspect-ratio: 1.586; width: 100%; border-radius: var(--radius-art); position: relative; overflow: hidden;
  background: color-mix(in oklch, var(--color-night) 78%, var(--color-accent));
  color: var(--color-accent-ink); box-shadow: var(--shadow-art); border: 1px solid var(--color-art-border);
}
.nft-card::after { content:""; position:absolute; inset:0; pointer-events:none; opacity:0; }
.nft-card.rarity-purple { background:linear-gradient(145deg,var(--color-night) 0%,var(--color-rarity-purple) 58%,var(--color-night-2) 100%); box-shadow:0 16px 38px color-mix(in oklch,var(--color-rarity-purple) 24%,transparent); }
.nft-card.rarity-purple::after { opacity:.28; background:linear-gradient(115deg,transparent 25%,color-mix(in oklch,var(--color-rarity-purple) 72%,white) 48%,transparent 67%); mix-blend-mode:screen; }
.nft-card.rarity-gold { background:linear-gradient(145deg,var(--color-rarity-gold-deep) 0%,var(--color-rarity-gold) 32%,var(--color-rarity-gold-hi) 48%,var(--color-rarity-gold) 62%,var(--color-rarity-gold-deep) 100%); border-color:color-mix(in oklch,var(--color-rarity-gold-hi) 80%,var(--color-art-border)); box-shadow:0 16px 38px color-mix(in oklch,var(--color-rarity-gold) 36%,transparent); }
.nft-card.rarity-gold::after { opacity:.5; background:linear-gradient(115deg,transparent 18%,color-mix(in oklch,var(--color-paper) 82%,var(--color-rarity-gold-hi)) 44%,transparent 58%,color-mix(in oklch,var(--color-paper) 55%,transparent) 68%,transparent 78%); mix-blend-mode:screen; }
.nft-card.rarity-platinum { background:linear-gradient(145deg,var(--color-rarity-plat-deep) 0%,var(--color-rarity-platinum) 30%,var(--color-rarity-plat-hi) 47%,color-mix(in oklch,var(--color-rarity-platinum) 78%,var(--color-paper)) 58%,var(--color-rarity-plat-deep) 100%); border-color:color-mix(in oklch,var(--color-rarity-plat-hi) 78%,var(--color-art-border)); box-shadow:0 16px 38px color-mix(in oklch,var(--color-rarity-plat-deep) 34%,transparent); }
.nft-card.rarity-platinum::after { opacity:.68; background:radial-gradient(ellipse 68% 92% at 58% 48%,color-mix(in oklch,var(--color-paper) 68%,transparent) 0%,color-mix(in oklch,var(--color-rarity-plat-hi) 36%,transparent) 42%,transparent 76%),linear-gradient(115deg,transparent 14%,color-mix(in oklch,var(--color-paper) 20%,transparent) 30%,color-mix(in oklch,var(--color-paper) 88%,var(--color-rarity-plat-hi)) 46%,color-mix(in oklch,var(--color-paper) 28%,transparent) 62%,transparent 82%); filter:blur(5px); transform:scale(1.05); mix-blend-mode:screen; }
.nft-card.rarity-black { background:linear-gradient(145deg,var(--color-rarity-black),color-mix(in oklch,var(--color-rarity-black) 82%,var(--color-night)) 46%,var(--color-rarity-black)); border-color:color-mix(in oklch,var(--color-paper) 12%,var(--color-art-border)); box-shadow:0 16px 38px color-mix(in oklch,var(--color-rarity-black) 82%,transparent),inset 0 1px 0 color-mix(in oklch,var(--color-paper) 10%,transparent); }
.nft-card.rarity-black::after { opacity:.74; background:radial-gradient(ellipse 58% 88% at 58% 48%,color-mix(in oklch,var(--color-paper) 28%,transparent) 0%,color-mix(in oklch,var(--color-rarity-purple) 14%,transparent) 38%,transparent 76%),linear-gradient(116deg,transparent 14%,color-mix(in oklch,var(--color-paper) 8%,transparent) 30%,color-mix(in oklch,var(--color-paper) 34%,transparent) 46%,color-mix(in oklch,var(--color-rarity-purple) 18%,transparent) 60%,transparent 82%); filter:blur(10px); transform:scale(1.08); mix-blend-mode:screen; }
.nft-card.rarity-holo { background:linear-gradient(135deg,var(--color-night) 0%,color-mix(in oklch,var(--color-rarity-holo-b) 58%,var(--color-night)) 22%,color-mix(in oklch,var(--color-rarity-holo-a) 62%,var(--color-night)) 44%,color-mix(in oklch,var(--color-rarity-holo-c) 56%,var(--color-night)) 62%,color-mix(in oklch,var(--color-rarity-holo-d) 50%,var(--color-night)) 80%,color-mix(in oklch,var(--color-rarity-holo-b) 48%,var(--color-night)) 100%); border-color:color-mix(in oklch,var(--color-rarity-holo-a) 58%,var(--color-art-border)); }
.nft-card.rarity-holo::after { opacity:.55; background:linear-gradient(112deg,transparent 8%,color-mix(in oklch,var(--color-rarity-holo-b) 70%,transparent) 26%,color-mix(in oklch,var(--color-rarity-holo-a) 72%,transparent) 40%,color-mix(in oklch,var(--color-rarity-holo-c) 66%,transparent) 52%,color-mix(in oklch,var(--color-rarity-holo-d) 62%,transparent) 62%,transparent 78%); mix-blend-mode:screen; }
.nft-card.rarity-diamond { color:var(--color-ink); background:linear-gradient(145deg,color-mix(in oklch,var(--color-rarity-diamond) 36%,var(--color-paper)) 0%,color-mix(in oklch,var(--color-rarity-holo-a) 22%,var(--color-paper)) 52%,color-mix(in oklch,var(--color-rarity-holo-b) 18%,var(--color-paper)) 100%); border-color:color-mix(in oklch,var(--color-rarity-diamond) 76%,var(--color-paper)); box-shadow:0 16px 42px color-mix(in oklch,var(--color-rarity-diamond) 34%,transparent); }
.nft-card.rarity-diamond::after { opacity:.82; background:radial-gradient(circle at 12% 22%,var(--color-paper) 0 1px,transparent 2.5px),radial-gradient(circle at 28% 68%,var(--color-paper) 0 1.5px,transparent 3px),radial-gradient(circle at 47% 18%,var(--color-rarity-diamond) 0 1px,transparent 2.5px),radial-gradient(circle at 64% 48%,var(--color-paper) 0 1.5px,transparent 3px),radial-gradient(circle at 72% 22%,var(--color-rarity-diamond) 0 2px,transparent 3.5px),radial-gradient(circle at 78% 72%,var(--color-paper) 0 1px,transparent 2.5px),radial-gradient(circle at 91% 38%,var(--color-paper) 0 1.5px,transparent 3px),linear-gradient(118deg,transparent 18%,color-mix(in oklch,var(--color-paper) 28%,transparent) 38%,color-mix(in oklch,var(--color-rarity-diamond) 72%,transparent) 49%,transparent 67%); animation:stardust-twinkle var(--dur-stardust-loop) var(--ease-out) infinite; }
.nft-card.rarity-diamond .nc-top img.logo { filter:drop-shadow(0 1px 5px color-mix(in oklch,var(--color-accent) 50%,transparent)); }
/* diamond keeps the corner watermark white (subtle on the light art is intended) */
.nft-card.rarity-diamond .nc-num { color:var(--color-paper); text-shadow:0 1px 5px color-mix(in oklch,var(--color-accent) 34%,transparent); }
.nft-card.rarity-platinum .nc-num { color:var(--color-ink-2); }
.nft-card.rarity-gold .nc-num { color:var(--color-night); }
.nft-card .nc-in { position: absolute; inset: 0; padding: 8.5% 9%; display: flex; flex-direction: column; }
.nft-card .nc-top { display: flex; align-items: flex-start; justify-content: space-between; }
.nft-card .nc-top img.logo { height: 27px; width: auto; opacity: .7; }
.nft-card .nc-chip { display: none; }
.nft-card .nc-mark { display: block; position: absolute; width: 72%; height: 120%; right: -12%; top: -10%; object-fit: contain; opacity: 0.24; filter: brightness(0) invert(1); transform: rotate(-8deg); pointer-events: none; }
.nft-card.rarity-classic .nc-top img.logo { filter:brightness(0) invert(1); }
.nft-card.rarity-black .nc-mark { opacity:.3; }
.nft-card .nc-num { position: absolute; left: 8.5%; bottom: 8.5%; font-family: var(--font-display); font-size: var(--text-xs); letter-spacing: 0.04em; font-weight: 500; color: var(--color-art-number); }
.nft-card .nc-bottom { display: none; }
.nft-card .nc-kv .k { font-size: var(--text-xs); letter-spacing: 0.04em; opacity: 0.55; font-weight: 500; }
.nft-card .nc-kv .v { font-family: var(--font-body); font-size: var(--text-sm); font-weight: 500; letter-spacing: 0; margin-top: 1px; }
.nft-card .nc-gold { color: var(--color-art-gold); }
.nft-item { display:block; width:100%; min-width:0; text-align:left; border-radius:var(--radius-art); }
.nft-item:active { transform:scale(.99); }
@keyframes stardust-twinkle { 0%,100% { opacity:.66; } 48% { opacity:1; } }
@media (prefers-reduced-motion:reduce) { .nft-card.rarity-diamond::after { animation:none; opacity:.86; } }
.nft-detail-art { margin-top:var(--space-sm); }
.nft-detail-art-first { margin-top:0; }
.rarity-line { display:inline-flex; align-items:center; justify-content:flex-end; gap:var(--space-2xs); }
.rarity-prob { display:inline-flex; align-items:center; min-height:22px; padding:0 var(--space-2xs); border-radius:var(--radius-pill); background:color-mix(in oklch,var(--color-accent) 10%,var(--color-paper)); color:var(--color-accent); font-size:var(--text-xs); font-weight:600; white-space:nowrap; }
.copy-value-button { min-height:44px; display:flex; align-items:center; justify-content:flex-end; text-align:right; font:inherit; }
.copy-value-button:active { color: var(--color-accent); }

/* ---------- Tables ---------- */
.tbl-scroll { overflow-x: auto; margin: 0 calc(var(--pad) * -1); padding: 0 var(--pad); }
.tbl { width: 100%; border-collapse: collapse; font-size: var(--text-sm); min-width: 520px; background: var(--color-paper); border-radius: var(--radius-group); overflow: hidden; box-shadow: none; }
.tbl th { text-align: left; font-size: var(--text-xs); letter-spacing: 0; text-transform: none; color: var(--color-ink-3); font-weight: 500; padding: var(--space-xs) var(--space-sm); border-bottom: 1px solid var(--color-rule); background: var(--color-paper); white-space: nowrap; }
.tbl td { padding: var(--space-xs) var(--space-sm); border-bottom: 1px solid var(--color-rule); white-space: nowrap; font-weight: 500; font-family: var(--font-body); font-feature-settings: "tnum"; }
.tbl td:first-child { font-family: var(--font-body); font-weight: 600; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tr.current td { background: var(--color-paper-2); }

/* ---------- Locked hero (affiliate) — light, gold-marked ---------- */
.lock-hero {
  text-align: left; padding: var(--space-md) var(--space-sm); border-radius: var(--radius-group);
  background: color-mix(in oklch, var(--color-gold) 8%, var(--color-paper)); color: var(--color-ink); box-shadow: none;
  border: 0;
}
.lock-hero .lh-lock { width: auto; height: auto; margin: 0 0 var(--space-xs); border-radius: 0; background: transparent; border: 0; display: flex; color: var(--color-gold); }
.lock-hero .lh-lock svg { width: 26px; height: 26px; }
.lock-hero h2 { font-size: var(--text-lg); font-weight: 600; }
.lock-hero p { font-size: var(--text-sm); color: var(--color-ink-2); margin-top: var(--space-3xs); line-height: 1.7; }

/* ---------- Option rows / copy rows ---------- */
.opt-row { display: flex; align-items: center; gap: var(--space-xs); width: 100%; text-align: left; min-height: 58px; padding: var(--space-2xs) var(--space-3xs); border-radius: var(--radius-input); border-bottom: 0; }
.opt-row:last-child { border-bottom: 0; }
.opt-row:active { background: var(--color-paper-2); }
.opt-row img { width: 38px; height: 38px; border-radius: 10px; }
.opt-row img.locale-flag {
  width: 30px; height: 30px; min-width: 30px; border-radius: 50%; object-fit: cover;
  background: var(--color-paper-2); box-shadow: inset 0 0 0 1px var(--color-rule);
}
.network-icon { width: 22px; height: 22px; min-width: 22px; border-radius: 50%; object-fit: contain; }
.chip.network-chip { display: inline-flex; align-items: center; gap: 7px; padding-inline: var(--space-xs); }
.network-value { display: inline-flex; align-items: center; justify-content: flex-end; gap: 8px; }
.opt-row .or-main { flex: 1; }
.opt-row .or-title { font-size: var(--text-md); font-weight: 500; }
.opt-row .or-sub { font-size: var(--text-sm); color: var(--color-ink-3); }
.opt-row .or-check { color: var(--color-accent); width: 20px; height: 20px; }

.copy-row { display: flex; align-items: center; gap: var(--space-xs); width: 100%; text-align: left; min-height: 54px; padding: var(--space-2xs) var(--space-3xs); border-radius: var(--radius-input); background: transparent; border: 0; }
.copy-row:active { background: var(--color-paper-2); }
.copy-row:disabled { pointer-events: none; cursor: default; }
.copy-row .cr-k { font-size: var(--text-xs); font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--color-ink-3); }
.copy-row .cr-v { font-size: var(--text-md); font-weight: 500; word-break: break-all; line-height: 1.4; }
.copy-row svg { width: 17px; height: 17px; color: var(--color-ink-3); min-width: 17px; }
.tap-value {
  display: inline-block; min-width: 0; max-width: 100%; padding: 6px 0;
  color: var(--color-ink-2); font-size: var(--text-sm); line-height: 1.3;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: right;
}
.tap-value:active { color: var(--color-accent); }
.address-tap {
  display: flex; align-items: center; min-width: 0; min-height: 48px; flex: 1;
  padding: 0 var(--space-3xs); border-radius: var(--radius-input); text-align: left;
}
.address-tap:active { background: var(--color-paper-2); }
.address-tap .mono { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: var(--text-sm); }

/* ---------- Breadcrumbs ---------- */
.crumbs { display: flex; align-items: center; gap: 2px; overflow-x: auto; scrollbar-width: none; font-size: var(--text-sm); font-weight: 500; color: var(--color-ink-3); }
.crumbs::-webkit-scrollbar { display: none; }
.crumbs button { color: var(--color-accent); padding: var(--space-2xs) var(--space-3xs); white-space: nowrap; font-weight: 600; }
.crumbs .sep { color: var(--color-rule-strong); }
.crumbs .here { color: var(--color-ink-2); padding: var(--space-2xs) var(--space-3xs); white-space: nowrap; }

.countdown { display: flex; align-items: center; gap: var(--space-2xs); font-family: var(--font-display); font-feature-settings: "tnum"; }
.hero-result { font-size:var(--text-2xl); font-weight:700; }
.section-result-title { font-size:var(--text-lg); font-weight:600; }
.tx-address-short { font-size:var(--text-sm); font-weight:500; white-space:nowrap; }

/* ---------- Utility ---------- */
.row { display: flex; align-items: center; gap: var(--space-2xs); }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2xs); }
.col { display: flex; flex-direction: column; gap: var(--space-2xs); }
.gap-sm { gap: var(--space-2xs); } .gap-lg { gap: var(--space-md); }
.mt-sm { margin-top: var(--space-2xs); } .mt-md { margin-top: var(--space-sm); } .mt-lg { margin-top: var(--space-md); }
.muted { color: var(--color-ink-3); } .small { font-size: var(--text-sm); } .xs { font-size: var(--text-xs); }
.bold { font-weight: 600; } .heavy { font-weight: 700; }
.center { text-align: center; }
.green { color: var(--color-pos); } .red { color: var(--color-neg); } .amber { color: var(--color-warn); }
.brandc { color: var(--color-accent); } .goldc { color: var(--color-gold); }
.divider { height: 1px; background: var(--color-rule); border: 0; }

:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; border-radius: 4px; }

/* ---------- Desktop pointer feedback (mobile-first pages stay untouched) ---------- */
@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover { background: var(--color-accent-down); }
  .btn-gold:hover { background: var(--color-gold-down); }
  .btn-secondary:hover { background: color-mix(in oklch, var(--color-accent) 18%, var(--color-paper)); }
  .btn-ghost:hover { background: color-mix(in oklch, var(--color-accent) 8%, transparent); }
  .btn-danger:hover { background: color-mix(in oklch, var(--color-neg) 6%, transparent); }
  .input:not(:disabled):hover { background: var(--color-paper-2); }
  .list-row:hover, .opt-row:hover, .copy-row:hover, .action-btn:hover,
  .icon-btn:hover, .address-tap:hover, .acc-head:hover { background: var(--color-paper-2); }
  .vault-card:not(.premium):hover { background: var(--color-paper-2); }
  .chip:not(.active):hover { background: var(--color-paper-2); }
  .seg button:not(.active):hover { color: var(--color-ink); }
  .nav-item:not(.active):hover { color: var(--color-ink-2); }
  .wallet-chip:hover, .tap-value:hover { color: var(--color-ink); }
  .max-btn:hover, .in-action:hover, .section-head .more:hover { color: var(--color-accent-down); }
  .back-btn:hover { color: var(--color-accent); }
}

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

/* Shared desktop workspace; the same five destinations become a side rail. */
.desktop-brand, .desktop-page-title { display:none; }
.page > * { min-width:0; }
.sheet-dismiss { position:absolute; top:var(--space-2xs); right:var(--space-xs); width:32px; height:32px; min-width:32px; }
.sheet-dismiss svg { width:18px; height:18px; }
.sheet-dismiss::after { content:""; position:absolute; inset:-6px; }
.sheet, .modal-card { overscroll-behavior:contain; }
.sheet:focus, .modal-card:focus { outline:none; }
@media (min-width:1060px) {
  .has-chrome { --sidebar-width:224px; --topbar-h:72px; --nav-h:0px; --pad:32px; background:var(--color-bg); }
  .has-chrome .app { max-width:none; margin-left:var(--sidebar-width); box-shadow:none; padding-bottom:0; }
  .has-chrome .page { width:100%; max-width:1104px; margin-inline:auto; padding-top:var(--space-xl); padding-bottom:var(--space-2xl); gap:var(--space-md); }
  .has-chrome .page--focused { max-width:704px; }
  .has-chrome .topbar { left:var(--sidebar-width); right:0; transform:none; width:auto; max-width:none; }
  .has-chrome .topbar-inner { max-width:1104px; margin:auto; }
  .has-chrome .topbar .t-logo { display:none; }
  .desktop-page-title { display:block; font-size:var(--text-lg); font-weight:600; }
  .has-chrome .topbar .t-title { font-size:var(--text-lg); font-weight:600; }
  .has-chrome .bottomnav { left:0; top:0; bottom:0; transform:none; width:var(--sidebar-width); max-width:none; padding:var(--space-xl) var(--space-sm); background:var(--color-paper); border-top:0; border-right:1px solid var(--color-rule); box-shadow:none; backdrop-filter:none; overflow-y:auto; }
  .desktop-brand { display:flex; align-items:center; padding:0 var(--space-xs); margin-bottom:var(--space-xl); min-height:32px; }
  .desktop-brand img { width:132px; height:auto; }
  .has-chrome .bottomnav-inner { display:flex; flex-direction:column; gap:var(--space-2xs); height:auto; }
  .has-chrome .nav-item { flex-direction:row; justify-content:flex-start; gap:var(--space-xs); min-height:52px; padding:var(--space-xs); border-radius:var(--radius-input); font-size:var(--text-md); font-weight:500; color:var(--color-ink-2); }
  .has-chrome .nav-item.active { color:var(--color-accent); background:var(--color-accent-soft); }
  .has-chrome .nav-item:hover { background:var(--color-paper-2); }
  .has-chrome .sheet { max-width:560px; --pad:24px; }
  .has-chrome .toast-wrap { left:calc(50% + var(--sidebar-width)/2); bottom:var(--space-md); }
}
