:root {
  color-scheme: light;
  --page: #f5f5f5;
  --surface: #ffffff;
  --ink: #292b2d;
  --muted: #8a8d90;
  --line: #e9e9e9;
  --accent: #bf5e50;
  --accent-dark: #a94d40;
  --sand: #dfc184;
  --sand-deep: #d8b772;
  --good: #27855a;
  --bad: #b94f45;
  --radius: 16px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
html { min-height: 100%; background: var(--page); }
body { margin: 0; min-height: 100vh; color: var(--ink); background: var(--page); -webkit-font-smoothing: antialiased; }
button, input { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
.app-shell { width: 100%; max-width: 620px; min-height: 100vh; margin: 0 auto; background: var(--page); padding-bottom: calc(18px + env(safe-area-inset-bottom)); }
.topbar { min-height: 64px; padding: 12px 20px; display: flex; align-items: center; gap: 12px; background: var(--surface); border-bottom: 1px solid #efefef; }
.brand-mark { width: 34px; height: 34px; border-radius: 11px; background: var(--accent); display: flex; align-items: center; justify-content: center; gap: 3px; transform: rotate(-4deg); flex: 0 0 auto; }
.brand-mark span { display: block; width: 4px; height: 17px; border-radius: 3px; background: #fff; }
.brand-mark span:nth-child(2) { height: 23px; }
.brand-mark span:nth-child(3) { height: 12px; }
.brand-copy { flex: 1; min-width: 0; }
.brand-name { font-size: 14px; font-weight: 800; letter-spacing: 1.4px; }
.brand-subtitle { margin-top: 2px; font-size: 11px; color: var(--muted); }
.demo-chip { flex-shrink: 0; padding: 5px 8px; border-radius: 6px; background: #fff5de; color: #805e20; font-size: 10px; font-weight: 800; letter-spacing: .7px; }
.balance-card { padding: 23px 24px 18px; background: linear-gradient(135deg, var(--sand) 0%, #e5ca91 58%, var(--sand-deep) 100%); color: #fffdf7; }
.card-topline, .card-bottomline { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.eyebrow { margin: 0 0 7px; font-size: 11px; color: rgba(255,255,255,.78); letter-spacing: .5px; }
.card-number { margin: 0; font-size: 17px; font-weight: 550; letter-spacing: .25px; }
.card-symbol { display: grid; place-items: center; width: 37px; height: 37px; border: 1.5px solid rgba(255,255,255,.6); border-radius: 50%; color: #fff; font-size: 22px; font-weight: 400; }
.balance-caption { margin: 23px 0 2px; font-size: 13px; color: rgba(255,255,255,.84); }
.balance-value { font-size: clamp(28px, 7vw, 38px); line-height: 1.25; font-weight: 500; letter-spacing: .2px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.card-bottomline { margin-top: 20px; font-size: 11px; color: rgba(255,255,255,.86); }
#greeting { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.virtual-label { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; font-size: 10px; }
.status-dot { width: 6px; height: 6px; display: inline-block; border-radius: 50%; background: #fff6d5; }
.notice-strip { min-height: 39px; padding: 10px 19px; display: flex; align-items: center; gap: 8px; color: #82672e; background: #fff7e5; border-bottom: 1px solid #f2e8d0; font-size: 11px; }
.notice-icon { font-size: 13px; }
.tabs { display: flex; align-items: stretch; min-height: 57px; background: #fff; border-bottom: 1px solid var(--line); }
.tab { width: 50%; border: 0; border-bottom: 3px solid transparent; background: transparent; color: #55575a; font-size: 15px; font-weight: 650; cursor: pointer; }
.tab.is-active { border-bottom-color: var(--accent); color: var(--accent); }
.panel { display: block; background: var(--surface); }
.panel.is-hidden { display: none; }
.section-caption { padding: 20px 20px 8px; color: #a0a2a4; font-size: 10px; font-weight: 800; letter-spacing: 1.2px; }
.action-row { display: flex; align-items: center; width: 100%; min-height: 91px; gap: 16px; padding: 15px 20px; border: 0; border-bottom: 1px solid var(--line); background: var(--surface); text-align: left; cursor: pointer; }
.action-row:active { background: #faf8f7; }
.action-icon { display: grid; place-items: center; width: 36px; height: 36px; flex: 0 0 36px; color: var(--accent); }
.action-icon svg { width: 32px; height: 32px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.action-copy { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.action-title { font-size: 17px; line-height: 1.25; font-weight: 520; }
.action-description { color: #a1a2a4; font-size: 12px; line-height: 1.35; }
.chevron { color: #d5d6d7; font-size: 31px; line-height: 1; font-weight: 300; padding-left: 4px; }
.panel-footnote { margin: 0; padding: 15px 20px 22px; color: #9a9b9d; font-size: 10px; line-height: 1.5; }
.statement-heading { display: flex; align-items: end; justify-content: space-between; padding-right: 20px; }
.statement-heading .section-caption { padding-bottom: 5px; }
.statement-heading h2 { margin: 0 20px 17px; font-size: 19px; font-weight: 650; }
.count-label { display: inline-flex; align-items: center; justify-content: center; min-width: 26px; height: 26px; margin-bottom: 16px; padding: 0 7px; border-radius: 20px; background: #f4f4f4; color: #888; font-size: 11px; }
.filters { display: flex; gap: 8px; padding: 0 20px 15px; }
.filter-chip { padding: 7px 13px; border: 1px solid #e7e7e7; border-radius: 20px; background: #fff; color: #65676a; font-size: 12px; cursor: pointer; }
.filter-chip.is-selected { color: var(--accent); background: #fff5f2; border-color: #edd0ca; }
.transaction-list { min-height: 120px; }
.transaction-row { display: flex; align-items: center; gap: 12px; padding: 15px 20px; border-top: 1px solid var(--line); }
.tx-icon { display: grid; place-items: center; flex: 0 0 36px; width: 36px; height: 36px; border-radius: 13px; background: #f7f1e6; color: #ae8b4f; font-size: 19px; }
.tx-icon.incoming { background: #eaf5ee; color: var(--good); }
.tx-icon.outgoing { background: #fbedeb; color: var(--bad); }
.tx-copy { flex: 1; min-width: 0; }
.tx-title { font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.tx-subtitle { margin-top: 4px; color: #999b9d; font-size: 11px; overflow-wrap: anywhere; }
.tx-date { margin-top: 4px; color: #b0b1b3; font-size: 10px; }
.tx-amount { align-self: flex-start; padding-top: 1px; font-size: 14px; line-height: 1.3; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tx-amount.incoming { color: var(--good); }
.tx-amount.outgoing { color: var(--bad); }
.load-more-button { display: block; width: calc(100% - 40px); margin: 15px 20px 22px; padding: 12px; border: 1px solid #e8e8e8; border-radius: 11px; background: #fff; color: #777; font-size: 12px; font-weight: 650; cursor: pointer; }
.load-more-button:disabled { opacity: .55; }
.empty-state { padding: 27px 28px 40px; text-align: center; }
.empty-illustration { display: grid; place-items: center; width: 54px; height: 54px; margin: 0 auto 14px; border-radius: 18px; background: #f8f0e1; color: #b59556; font-size: 30px; }
.empty-title { margin: 0; font-size: 15px; font-weight: 650; }
.empty-caption { max-width: 290px; margin: 7px auto 0; color: #999b9d; font-size: 12px; line-height: 1.5; }
.app-footer { padding: 25px 22px 15px; text-align: center; color: #a1a3a5; font-size: 10px; line-height: 1.7; }
.modal { width: min(100%, 520px); max-width: 520px; max-height: min(92vh, 760px); margin: auto auto 0; padding: 0; overflow: auto; border: 0; border-radius: 22px 22px 0 0; background: #fff; color: var(--ink); box-shadow: 0 -12px 50px rgba(24, 24, 24, .16); }
.modal::backdrop { background: rgba(23, 23, 23, .44); backdrop-filter: blur(2px); }
.modal[open] { animation: slide-up .19s ease-out; }
@keyframes slide-up { from { transform: translateY(22px); opacity: .7; } to { transform: translateY(0); opacity: 1; } }
.modal-content { position: relative; padding: 14px 23px calc(24px + env(safe-area-inset-bottom)); }
.modal-handle { width: 35px; height: 4px; margin: 0 auto 23px; border-radius: 6px; background: #dedede; }
.modal-close { position: absolute; top: 12px; right: 15px; width: 32px; height: 32px; border: 0; border-radius: 50%; background: #f3f3f3; color: #666; font-size: 25px; line-height: 1; cursor: pointer; }
.modal-kicker { margin: 0 0 8px; color: #a0a2a4; font-size: 10px; font-weight: 800; letter-spacing: 1px; }
.modal h2 { margin: 0 38px 8px 0; font-size: 23px; font-weight: 700; letter-spacing: -.4px; }
.modal-intro { margin: 0 0 22px; color: #888b8d; font-size: 12px; line-height: 1.5; }
.field-label { display: block; margin: 16px 0 8px; color: #626568; font-size: 12px; font-weight: 650; }
.username-input-wrap, .amount-input-wrap { display: flex; align-items: center; min-height: 52px; border: 1px solid #dedfe0; border-radius: 12px; background: #fff; }
.username-input-wrap:focus-within, .amount-input-wrap:focus-within, .plain-input:focus { border-color: #d7a29a; box-shadow: 0 0 0 3px rgba(191,94,80,.08); outline: 0; }
.username-input-wrap > span { padding-left: 14px; color: #a5a5a5; font-size: 16px; }
.username-input-wrap input { flex: 1; width: 100%; min-width: 0; padding: 14px 14px 14px 5px; border: 0; outline: 0; background: transparent; font-size: 15px; }
.amount-input-wrap input { flex: 1; min-width: 0; width: 100%; padding: 12px 14px; border: 0; outline: 0; background: transparent; font-size: 22px; font-weight: 650; }
.amount-input-wrap > span { padding: 0 15px; color: #9b9c9d; }
.available-row { display: flex; justify-content: space-between; gap: 10px; margin-top: 12px; color: #909294; font-size: 11px; }
.available-row strong { color: #55585a; font-variant-numeric: tabular-nums; white-space: nowrap; }
.input-hint { margin: 10px 0 0; color: #a4a5a7; font-size: 10px; line-height: 1.45; }
.plain-input { display: block; width: 100%; min-height: 49px; padding: 12px 14px; border: 1px solid #dedfe0; border-radius: 12px; outline: 0; background: #fff; font-size: 17px; letter-spacing: 2px; }
.primary-button { display: block; width: 100%; min-height: 52px; margin-top: 23px; padding: 12px 18px; border: 0; border-radius: 13px; background: var(--accent); color: #fff; font-size: 15px; font-weight: 700; cursor: pointer; }
.primary-button:active { background: var(--accent-dark); }
.primary-button:disabled { opacity: .58; cursor: progress; }
.form-error { margin: 13px 0 0; padding: 10px 12px; border-radius: 10px; background: #fff1ef; color: #a34036; font-size: 12px; line-height: 1.4; }
.toast { position: fixed; z-index: 20; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom)); max-width: calc(100vw - 30px); padding: 12px 16px; border-radius: 13px; background: rgba(35,36,38,.94); color: white; font-size: 12px; line-height: 1.4; box-shadow: 0 6px 22px rgba(0,0,0,.17); transform: translate(-50%, 12px); opacity: 0; pointer-events: none; transition: transform .2s, opacity .2s; }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.fatal-state { position: fixed; z-index: 30; inset: 0; display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 32px; background: #f7f7f7; text-align: center; }
.fatal-state[hidden] { display: none; }
.fatal-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: #fff1ef; color: var(--accent); font-size: 27px; font-weight: 700; }
.fatal-state h2 { margin: 18px 0 7px; font-size: 21px; }
.fatal-state p { max-width: 320px; margin: 0; color: #8b8d90; font-size: 13px; line-height: 1.55; }
[hidden] { display: none !important; }
@media (min-width: 621px) {
  body { padding: 24px 0; }
  .app-shell { min-height: calc(100vh - 48px); border-radius: 16px; overflow: hidden; box-shadow: 0 7px 35px rgba(0,0,0,.07); }
  .modal { margin: auto; border-radius: 22px; }
  .modal-content { padding-bottom: 24px; }
}
@media (max-width: 350px) {
  .balance-card { padding-left: 17px; padding-right: 17px; }
  .card-number { font-size: 15px; }
  .virtual-label { font-size: 9px; }
  .action-row { gap: 11px; padding-left: 15px; padding-right: 15px; }
  .action-title { font-size: 16px; }
}
