/* Dumbo — "statement" design: graphite ground, champagne accent, ledger figures in mono. */
:root {
  --bg: #0D0E11;
  --surface: #16171B;
  --surface-2: #1D1E23;
  --line: #24262C;
  --line-2: #2E3037;
  --text: #EEEAE2;
  --text-2: #B8B3A9;
  --muted: #9A968E;
  --faint: #6E6B65;
  --gold: #CDB079;
  --gold-hi: #E6C46F;
  --gold-bg: #1B1710;
  --gold-line: #5C4A26;
  --gain: #86D7A8;
  --loss: #F08A7E;
  --display: "Bricolage Grotesque", "Geist", -apple-system, system-ui, sans-serif;
  --sans: "Geist", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  color-scheme: dark;
}

[hidden] { display: none !important; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { font-family: var(--sans); font-size: 16px; line-height: 1.45; -webkit-font-smoothing: antialiased; min-height: 100dvh; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
input, select { font: inherit; color: var(--text); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

#app { max-width: 480px; margin: 0 auto; padding: calc(var(--safe-t) + 22px) 20px calc(var(--safe-b) + 112px); }

/* ---------- type ---------- */
.mono-label { font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin: 0; }
.mono-label.gold { color: var(--gold); }
.display { font-family: var(--display); font-weight: 500; letter-spacing: -0.035em; line-height: 1.02; margin: 0; text-wrap: balance; }
.display em { font-style: normal; color: var(--gold); }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.gain { color: var(--gain); }
.loss { color: var(--loss); }
.gold { color: var(--gold); }

.topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 26px; min-height: 44px; }
.wordmark { font-family: var(--display); font-weight: 500; font-size: 26px; letter-spacing: -0.03em; }
.icon-btn { width: 44px; height: 44px; border-radius: 22px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); display: grid; place-items: center; }
.icon-btn svg { width: 18px; height: 18px; }

/* ---------- buttons ---------- */
.btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 56px; border-radius: 16px; font-weight: 600; font-size: 16px; transition: transform .12s ease, opacity .2s; }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--text); color: var(--bg); }
.btn-ghost { background: var(--surface); border: 1px solid var(--line); color: var(--text); }
.btn-text { height: 44px; color: var(--muted); font-weight: 500; }
.btn[disabled] { opacity: .35; pointer-events: none; }
.link { color: var(--gold); font-weight: 500; font-size: 14px; }
.pill { height: 44px; padding: 0 18px; border-radius: 99px; font-size: 14px; font-weight: 500; display: inline-flex; align-items: center; justify-content: center; }
.pill-gold { background: var(--gold-hi); color: #1A1408; font-weight: 600; }
.pill-outline { border: 1px solid var(--gold-line); color: var(--text); }
.pill-sm { height: 36px; padding: 0 14px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface-2); font-size: 13.5px; font-weight: 500; }

/* ---------- splash ---------- */
.splash { position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; background: radial-gradient(90% 55% at 50% 46%, #17150F 0%, var(--bg) 70%); transition: opacity .5s ease; }
.splash.out { opacity: 0; pointer-events: none; }
.splash .wm { font-family: var(--display); font-weight: 500; font-size: 64px; line-height: 1; letter-spacing: -0.045em; animation: splashIn .7s cubic-bezier(.2,.8,.2,1) both; }
.splash .tagline { font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.18em; color: var(--gold); animation: splashIn .7s .15s cubic-bezier(.2,.8,.2,1) both; }
@keyframes splashIn { from { opacity: 0; transform: translateY(8px); } }

/* ---------- intro ---------- */
.intro { min-height: calc(100dvh - 140px); display: flex; flex-direction: column; justify-content: space-between; gap: 28px; }
.intro h1 { font-size: 50px; margin-top: 30px; line-height: .98; letter-spacing: -0.04em; }
.bullets { margin: 18px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; font-size: 15px; line-height: 1.4; color: #C9C5BD; }
.bullets li { display: flex; gap: 12px; align-items: baseline; }
.bullets li::before { content: ""; width: 6px; height: 6px; border-radius: 3px; background: var(--gold); flex: none; transform: translateY(-2px); }
.receipt { margin-top: 26px; border-radius: 4px 4px 14px 14px; background: var(--text); color: #1A1B1F; padding: 18px 18px 16px; font-family: var(--mono); font-size: 12.5px; transform: rotate(-1.5deg); box-shadow: 0 30px 50px -28px rgba(0,0,0,.95); }
.receipt .r { display: flex; justify-content: space-between; padding: 3px 0; gap: 12px; }
.receipt .head { letter-spacing: .1em; font-size: 10.5px; color: #5E5B55; }
.receipt .rule { border-top: 1px dashed #B9B4AA; margin: 10px 0; }
.receipt .total { font-weight: 500; font-size: 14px; }
.promise { display: flex; flex-wrap: wrap; gap: 6px 14px; font-family: var(--mono); font-size: 11px; letter-spacing: .08em; color: var(--muted); }
.ios-tip { font-size: 13px; color: var(--muted); text-align: center; margin: 0; }

/* ---------- picker ---------- */
.step-row { display: flex; justify-content: space-between; align-items: center; }
.search { margin-top: 20px; height: 48px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); display: flex; align-items: center; gap: 10px; padding: 0 14px; color: var(--muted); }
.search:focus-within { border-color: var(--gold); }
.search input { flex: 1; min-width: 0; background: none; border: 0; outline: none; font-size: 16px; }
.issuer-name { margin: 24px 0 4px; font-family: var(--mono); font-size: 11px; letter-spacing: .14em; color: var(--faint); text-transform: uppercase; }
.row-btn { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 68px; padding: 8px 0; border-bottom: 1px solid #1E2025; text-align: left; }
.row-btn .txt { flex: 1; min-width: 0; }
.row-btn .nm { display: block; font-size: 15px; font-weight: 500; }
.row-btn .sub { display: block; font-family: var(--mono); font-size: 11.5px; color: var(--muted); }
.row-btn .sub.gold { color: var(--gold); }
.check { width: 24px; height: 24px; border-radius: 12px; border: 1.5px solid #3A3C43; display: grid; place-items: center; flex: none; color: var(--bg); }
.check.on { background: var(--gold); border-color: var(--gold); }
.check svg { width: 14px; height: 14px; }
.sticky-cta { position: fixed; left: 0; right: 0; bottom: 0; padding: 40px 20px calc(var(--safe-b) + 18px); background: linear-gradient(180deg, rgba(13,14,17,0), var(--bg) 45%); z-index: 5; }
.sticky-cta > div { max-width: 440px; margin: 0 auto; }

/* mini card preview */
.mini { width: 68px; height: 43px; flex: none; border-radius: 7px; padding: 5px 6px; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; position: relative; box-shadow: inset 0 1px 0 rgba(255,255,255,.22), 0 6px 12px -6px rgba(0,0,0,.9); }
.mini::after { content: ""; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 35%, rgba(255,255,255,.16) 48%, transparent 60%); }
.mini .iss { font-family: var(--mono); font-size: 6.5px; letter-spacing: .14em; opacity: .85; text-transform: uppercase; white-space: nowrap; }
.mini .bot { display: flex; justify-content: space-between; align-items: flex-end; gap: 3px; }
.mini .n { font-family: var(--display); font-size: 8.5px; font-weight: 500; line-height: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini .chp { width: 10px; height: 7px; border-radius: 2px; background: linear-gradient(135deg, #E6D3A3, #B1925A); flex: none; }

/* choose-usual list */
.choice-list { display: flex; flex-direction: column; margin-top: 18px; }

/* ---------- pay ---------- */
.ask { font-size: 36px; margin-top: 8px; letter-spacing: -0.03em; }
.cats { margin-top: 22px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.cat { height: 72px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; font-size: 12px; transition: border-color .15s, background .15s, color .15s; }
.cat svg { width: 22px; height: 22px; }
.cat.on { border-color: var(--gold); background: #1A1813; color: var(--text); font-weight: 500; }
.cat.on svg { color: var(--gold); }
.amount { margin-top: 12px; height: 56px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); display: flex; align-items: center; gap: 10px; padding: 0 16px; }
.amount:focus-within { border-color: var(--gold); }
.amount.err { border-color: var(--loss); }
.amount .lbl { font-family: var(--mono); font-size: 13px; color: var(--muted); letter-spacing: .08em; }
.amount input { flex: 1; min-width: 0; text-align: right; background: none; border: 0; outline: none; font-family: var(--mono); font-size: 22px; }
.amount input::placeholder { color: var(--faint); }
.hint { margin-top: 22px; text-align: center; font-size: 13.5px; color: var(--faint); }

.result { margin-top: 30px; animation: rise .45s cubic-bezier(.2,.8,.2,1) both; }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } }
.hero { margin-top: 10px; border-radius: 16px; aspect-ratio: 1.586; max-width: 100%; padding: 18px 20px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 24px 40px -24px rgba(0,0,0,.9); }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,.12) 45%, transparent 60%); pointer-events: none; }
.hero .iss { font-family: var(--mono); font-size: 11px; letter-spacing: .16em; opacity: .85; text-transform: uppercase; }
.hero .rate { font-family: var(--display); font-weight: 500; font-size: 54px; line-height: .9; letter-spacing: -0.03em; }
.hero .rate small { font-size: 22px; margin-left: 2px; }
.hero .nm { font-family: var(--display); font-weight: 500; font-size: 26px; line-height: 1; letter-spacing: -0.02em; }
.hero .chp { width: 36px; height: 26px; border-radius: 6px; background: linear-gradient(135deg, #E6D3A3, #B1925A); }
.hero .row { display: flex; justify-content: space-between; align-items: flex-start; }
.hero .row.end { align-items: flex-end; }
.earn { margin-top: 18px; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.earn .big { font-family: var(--display); font-weight: 500; font-size: 48px; line-height: 1; letter-spacing: -0.03em; color: var(--gain); }
.earn .sub { font-family: var(--mono); font-size: 12px; color: var(--muted); text-align: right; }
.note { margin: 10px 0 0; font-size: 13px; color: var(--muted); display: flex; gap: 8px; align-items: flex-start; }
.note svg { width: 14px; height: 14px; flex: none; margin-top: 3px; }
.note.gold { color: var(--gold); }

.box { margin-top: 12px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); padding: 6px 16px 14px; }
.box.first { margin-top: 22px; }
.ledger-row { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; font-size: 14px; }
.ledger-row.dash { border-bottom: 1px dashed var(--line-2); }
.ledger-row.solid { border-bottom: 1px solid var(--line-2); color: var(--muted); }
.ledger-total { display: flex; justify-content: space-between; align-items: baseline; padding-top: 12px; }
.ledger-total span:first-child { font-size: 14px; font-weight: 600; }
.ledger-total .mono { font-size: 18px; }
.tag { font-family: var(--mono); font-size: 10px; letter-spacing: .1em; border: 1px solid #3A3C43; border-radius: 4px; padding: 1px 5px; margin-left: 4px; color: var(--muted); font-weight: 400; }
.box p.small, .box .small { margin: 4px 0 0; font-size: 12.5px; color: var(--muted); }
.box.plain { background: none; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.box.warn { background: var(--gold-bg); border-color: var(--gold-line); padding: 14px 16px; font-size: 14px; line-height: 1.45; }
.box.good { padding: 14px 16px; font-size: 14px; color: var(--text-2); }
.bar { height: 6px; border-radius: 6px; background: var(--line); overflow: hidden; }
.bar.thin { height: 4px; }
.bar i { display: block; height: 100%; border-radius: 6px; }
.text-link { color: var(--gold); font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }

.used-row { margin-top: 18px; display: grid; grid-template-columns: minmax(0, 1fr) 56px; gap: 10px; }
.used-row .btn { min-width: 0; }
.used-row .btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.runners { margin-top: 26px; }
.runner { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid #1E2025; font-size: 14px; }
.runner .n { flex: 1; min-width: 0; }
.runner .v { font-family: var(--mono); font-size: 12.5px; color: var(--muted); }

/* ---------- wallet ---------- */
.hello { margin-top: 4px; }
.hello p { margin: 0; }
.hello .big { margin-top: 4px; font-family: var(--display); font-weight: 500; font-size: 56px; line-height: 1; letter-spacing: -0.03em; color: var(--gain); }
.todo { margin-top: 28px; border-radius: 18px; border: 1px solid var(--gold-line); background: var(--gold-bg); padding: 18px; display: flex; flex-direction: column; gap: 6px; }
.todo + .todo { margin-top: 10px; }
.todo .t { margin: 0; font-size: 13px; font-weight: 600; color: var(--gold-hi); }
.todo .b { margin: 0; font-size: 17px; line-height: 1.4; }
.todo .why { margin: 0; font-size: 14px; line-height: 1.45; color: var(--text-2); }
.todo .acts { margin-top: 10px; display: flex; gap: 8px; flex-wrap: wrap; }
.h2 { margin: 32px 0 12px; font-size: 17px; font-weight: 600; display: flex; justify-content: space-between; align-items: baseline; }
.wcard { border-radius: 18px; border: 1px solid var(--line); background: var(--surface); padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.wcard + .wcard { margin-top: 10px; }
.wcard.empty { background: none; border-style: dashed; border-color: var(--line-2); flex-direction: row; align-items: center; gap: 14px; }
.wtop { display: flex; align-items: center; gap: 14px; }
.wtop .txt { flex: 1; min-width: 0; }
.wtop .nm { font-size: 16px; font-weight: 600; }
.wtop .sub { font-size: 13px; color: var(--muted); }
.status { font-size: 12.5px; font-weight: 600; border-radius: 99px; padding: 4px 10px; white-space: nowrap; border: 1px solid; }
.status.bad { color: var(--loss); border-color: rgba(240,138,126,.4); }
.status.mid { color: var(--gold-hi); border-color: rgba(230,196,111,.4); }
.status.ok { color: var(--gain); border-color: rgba(134,215,168,.4); }
.wcard .used { margin: 0; font-size: 13.5px; color: var(--text-2); }
.wcard .goal { border-top: 1px solid var(--line); padding-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.wcard .goal p { margin: 0; font-size: 14px; }
.wcard .acts { display: flex; gap: 8px; flex-wrap: wrap; }
.usual-tag { font-family: var(--mono); font-size: 10px; letter-spacing: .1em; border: 1px solid #3A3C43; border-radius: 4px; padding: 1px 5px; margin-left: 6px; color: var(--muted); font-weight: 400; vertical-align: 2px; }

/* ---------- sheets ---------- */
.scrim { position: fixed; inset: 0; background: rgba(0,0,0,.6); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); z-index: 20; animation: fade .2s both; }
@keyframes fade { from { opacity: 0; } }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 21; max-width: 520px; margin: 0 auto; max-height: 88dvh; overflow: auto; background: var(--surface); border-top: 1px solid var(--line); border-radius: 26px 26px 0 0; padding: 10px 20px calc(var(--safe-b) + 22px); animation: up .32s cubic-bezier(.2,.8,.2,1) both; }
@keyframes up { from { transform: translateY(100%); } }
.grabber { width: 38px; height: 5px; border-radius: 5px; background: var(--line); margin: 0 auto 16px; }
.sheet h3 { font-family: var(--display); font-weight: 500; letter-spacing: -0.03em; font-size: 28px; line-height: 1.05; margin: 0 0 6px; }
.sheet .lead { margin: 0; font-size: 14px; color: var(--muted); }
.field { margin-top: 16px; }
.field label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.field input, .field select { width: 100%; height: 50px; border-radius: 14px; border: 1px solid var(--line); background: var(--bg); padding: 0 14px; outline: none; -webkit-appearance: none; appearance: none; font-size: 16px; }
.field input:focus, .field select:focus { border-color: var(--gold); }
.field-row { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 10px; }
.divider { height: 1px; background: var(--line); margin: 22px 0 4px; }
.sheet h4 { margin: 16px 0 0; font-size: 15px; font-weight: 600; }
.sheet h4 span { font-weight: 400; color: var(--faint); font-size: 13px; }
.seg { display: grid; grid-auto-flow: column; gap: 6px; background: var(--bg); border: 1px solid var(--line); border-radius: 14px; padding: 4px; }
.seg button { height: 40px; border-radius: 10px; font-size: 14px; color: var(--muted); }
.seg button.on { background: var(--surface-2); color: var(--text); font-weight: 600; }
.menu-item { display: flex; justify-content: space-between; align-items: center; width: 100%; min-height: 52px; border-bottom: 1px solid var(--line); text-align: left; }
.menu-item:last-child { border-bottom: 0; }
.danger { color: var(--loss); }
.stack { display: flex; flex-direction: column; gap: 10px; }
.install-steps { margin: 18px 0; display: grid; gap: 12px; }
.install-steps div { display: flex; gap: 12px; align-items: center; font-size: 15px; }
.install-steps b { width: 28px; height: 28px; border-radius: 50%; background: var(--surface-2); display: grid; place-items: center; font-size: 13px; flex: none; }
.confirm-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 20px; }

/* ---------- tabs & toast ---------- */
.tabs { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--safe-b) + 18px); z-index: 10; display: flex; gap: 4px; padding: 5px; border-radius: 99px; background: rgba(28,29,34,.9); border: 1px solid #2A2C32; backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4); box-shadow: 0 16px 40px -12px rgba(0,0,0,.8); }
.tab { height: 46px; padding: 0 24px; border-radius: 99px; color: var(--muted); font-weight: 500; font-size: 14.5px; }
.tab.on { background: var(--text); color: var(--bg); font-weight: 600; }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--safe-b) + 88px); z-index: 30; background: var(--text); color: var(--bg); border-radius: 99px; padding: 11px 16px 11px 18px; font-size: 14px; font-weight: 500; display: flex; gap: 14px; align-items: center; max-width: calc(100vw - 32px); width: max-content; animation: rise .3s both; box-shadow: 0 12px 30px -10px rgba(0,0,0,.7); }
.toast button { font-weight: 700; color: #7A5A1C; }

.foot { margin-top: 26px; text-align: center; font-size: 11.5px; color: var(--faint); line-height: 1.6; }
.foot button { color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }

@media (max-width: 360px) {
  .ask { font-size: 31px; }
  .intro h1 { font-size: 42px; }
  .cats { gap: 6px; }
  .cat { height: 66px; font-size: 11px; }
  .hello .big, .earn .big { font-size: 46px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
