.app-view { padding: 36px 20px 80px; max-width: 860px; }
.auth-card { max-width: 400px; margin: 40px auto; }

.auth-or { display: flex; align-items: center; gap: 12px; margin: 24px 0; font-weight: 700; }
.auth-or::before, .auth-or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.wizard-steps { display: flex; gap: 8px; margin-bottom: 24px; }
.wizard-steps .ws { flex: 1; height: 4px; border-radius: 2px; background: var(--surface-2); }
.wizard-steps .ws.on { background: var(--ink); }
.ex-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.ex-pick .card { cursor: pointer; text-align: center; padding: 16px 10px; transition: background-color .15s; }
.ex-pick .card:hover { background: var(--surface-2); }
.ex-pick .card.sel { box-shadow: inset 0 0 0 1.5px var(--ink); }
.wallet-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 18px 0 26px; }
@media (max-width: 640px) { .wallet-row { grid-template-columns: 1fr; } }
.wallet-cell { background: var(--surface); box-shadow: var(--ring); border-radius: var(--r-md); padding: 18px; text-align: center; }
.wallet-cell .v { font-size: 26px; font-weight: 800; color: var(--amber); } 
.wallet-cell .l { font-size: 12px; font-weight: 500; color: var(--text-faint); }
.acct-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 22px; }
.err { color: var(--down); font-size: 13px; font-weight: 500; min-height: 18px; }
.badge-danger { background: var(--danger-bg); color: var(--down); } 
.tbl-sm th, .tbl-sm td { padding: 8px 12px; font-size: 13px; }
.pill-paid { color: var(--success); font-weight: 600; } .pill-payable { color: var(--amber); font-weight: 600; } .pill-accrued { color: var(--info); font-weight: 600; }
.cc { display: inline-block; min-width: 24px; font-size: 12px; font-weight: 600; color: var(--text-faint); letter-spacing: .5px; } 
.field textarea { width: 100%; background: var(--bg); border: 0; box-shadow: var(--ring); color: var(--text); border-radius: var(--r-sm); padding: 10px; font-size: var(--fs-input); font-family: inherit; }


.evt-strip { background: var(--surface); box-shadow: var(--ring); border-radius: var(--r-md); padding: 14px 16px; margin-bottom: 22px; }
.evt-strip-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 10px; }
.evt-strip-title { font-size: 13px; font-weight: 600; color: var(--text); }
.evt-strip-row { display: flex; gap: 10px; flex-wrap: wrap; }
.evt-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 6px 12px 6px 8px;
  background: var(--bg); box-shadow: var(--ring); border-radius: var(--r-sm); text-decoration: none; color: var(--text);
  font-size: 13px; font-weight: 600; transition: background-color .15s; }
.evt-chip:hover { background: var(--surface-2); }
.evt-chip .ex-cc { margin-right: 0; }
.evt-chip-title { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.evt-left { font-size: 12px; font-weight: 600; color: var(--text-sub); }
.evt-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; margin-top: 16px; }
.evt-card h3 { font-size: 15px; margin: 10px 0 4px; word-break: keep-all; }
.evt-card .btn { margin-top: 10px; }
.evt-card-head { display: flex; align-items: center; gap: 8px; }
.evt-card-head .ex-cc { margin-right: 0; }
.evt-card-head b { font-size: 13px; }
.evt-card-head .evt-left { margin-left: auto; }
.evt-meta { margin-top: 8px; }
.evt-empty { max-width: 420px; margin-top: 16px; }
.evt-empty .btn { margin-top: 10px; }


.cl-strip { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; background: var(--surface); box-shadow: var(--ring); border-radius: var(--r-lg); padding: 16px 24px; margin-bottom: 16px; }
.cl-item { display: flex; align-items: center; gap: 8px; color: var(--text-faint); font-size: 14px; }
.cl-dot { width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--surface-2); font-size: 13px; font-weight: 700; flex-shrink: 0; }
.cl-item.done { color: var(--text-sub); }
.cl-item.done .cl-dot { background: var(--success-bg); color: var(--success); }
.cl-item.next { color: var(--text); font-weight: 600; }
.cl-item.next .cl-dot { background: var(--ink); color: var(--on-ink); }
.cl-item .btn-sm { min-height: 36px; padding: 0 16px; }
@media (max-width: 640px) { .cl-strip { flex-direction: column; align-items: flex-start; gap: 8px; } }


.ob-code-line { margin: 8px 0 0; }
.code-mono { font-family: ui-monospace, SFMono-Regular, 'Cascadia Mono', Consolas, Menlo, monospace; font-size: 13px; font-weight: 600; color: var(--text); background: var(--surface-3); border-radius: var(--r-sm); padding: 0 8px; } 
.ob-copy { border: 0; background: transparent; color: var(--text-sub); font-size: 13px; font-weight: 600; text-decoration: underline; text-decoration-color: var(--underline); cursor: pointer; padding: 0 8px; min-height: 24px; } 
.ob-copy:hover { color: var(--text); }


.prefail { font-size: 13px; }
.prefail > summary { cursor: pointer; color: var(--text-sub); font-weight: 600; padding: 8px 0; min-height: 44px; display: flex; align-items: center; }
.prefail > summary:hover { color: var(--text); }
.prefail ul { margin: 0 0 8px; padding-left: 20px; color: var(--text-sub); }
.prefail li { padding: 4px 0; line-height: 1.6; }



.acct-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; margin: 16px 0; }
.acct-card { position: relative; background: var(--bg); box-shadow: var(--ring); border-radius: var(--r-md); padding: 16px; text-decoration: none; color: var(--text); }
.acct-card .acct-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.acct-card .acct-uid { margin-top: 4px; color: var(--text-faint); }
.acct-card.add { display: flex; align-items: center; justify-content: center; color: var(--text-sub); border: 1px dashed var(--line); box-shadow: none; }
.acct-card .acct-actions { margin-top: 8px; }

.acct-reason { margin-top: 6px; color: var(--text-sub); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.acct-reason.open { white-space: normal; }

.acct-x { position: absolute; top: 4px; right: 4px; width: 32px; height: 32px; border: 0; background: transparent; color: var(--text-faint); font-size: 18px; cursor: pointer; border-radius: var(--r-sm); }
.acct-x:hover { color: var(--text); background: var(--surface-2); }
.acct-hidden .acct-card { opacity: .66; }

.wallet-cell.zero .v { color: var(--text-faint); }
.wallet-empty { color: var(--text-faint); margin-top: 4px; }

.bal-card { background: var(--bg); box-shadow: var(--ring); border-radius: var(--r-lg); padding: 16px; margin: 16px 0; }
.bal-title { font-size: var(--fs-h3); margin: 0 0 8px; }
.bal-row { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 0.75px solid var(--line); }
.bal-row:last-of-type { border-bottom: 0; }
.bal-ex { display: flex; align-items: center; gap: 8px; min-width: 120px; }
.bal-nums { flex: 1; display: flex; gap: 16px; flex-wrap: wrap; }
.bal-avail { font-weight: 800; color: var(--amber); }
.bal-avail i, .bal-held i { font-style: normal; font-weight: 500; font-size: var(--fs-caption); color: var(--text-sub); margin-inline-start: 4px; }
.bal-held { color: var(--text-sub); }
.bal-form { display: flex; gap: 8px; align-items: center; padding: 8px 0 12px; flex-wrap: wrap; }
.bal-form input { width: 140px; background: var(--bg); border: 0; box-shadow: var(--ring); border-radius: var(--r-sm); padding: 8px 12px; min-height: 40px; }


.hero-pb { background: var(--surface); border-radius: var(--r-lg); padding: 20px; box-shadow: inset 0 0 0 .75px var(--hairline); margin: 0 0 16px; max-width: 560px; }
.hero-pb .hp-num { font-size: 38px; font-weight: 800; letter-spacing: -1px; color: var(--amber); line-height: 1.2; }
.hero-pb .spark { display: block; margin-top: 8px; max-width: 100%; }
.boost-pill { display: inline-flex; gap: 6px; align-items: center; background: var(--amber-bg); color: var(--amber); border-radius: var(--r-pill); padding: 4px 12px; font-size: 12px; font-weight: 700; margin: 8px 8px 0 0; }
.flt-chips { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin: 8px 0; }
.flt-chip { border: 0; background: var(--surface-3); border-radius: var(--r-pill); padding: 6px 14px; font-size: 13px; font-weight: 700; color: var(--text-sub); cursor: pointer; }
.flt-chip.on { background: var(--ink); color: var(--on-ink); }

.flt-wrap { margin: 8px 0; }
.flt-wrap .flt-chips { margin: 0; }
.flt-custom { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.flt-custom[hidden] { display: none; }   
.flt-custom input { padding: 6px 8px; border: 0; background: var(--surface); box-shadow: inset 0 0 0 .75px var(--hairline); border-radius: var(--r-sm); color: var(--text); font: inherit; font-size: var(--fs-input); }
.pt-gauge-bar { background: var(--surface-3); border-radius: 999px; height: 6px; overflow: hidden; margin: 8px 0 4px; }
.pt-gauge-bar > div { background: var(--ink); height: 6px; border-radius: 999px; }




.avatar { display: inline-flex; align-items: center; justify-content: center; width: var(--hdr-ctl-h); height: var(--hdr-ctl-h); border-radius: 999px;
  background: var(--surface-3); color: var(--text); font-size: 13px; font-weight: 800; text-decoration: none; flex-shrink: 0;
  box-shadow: var(--ring); transition: background-color var(--t-fast); }
.avatar:hover { background: var(--surface-2); }
.avatar::after { content: ''; position: absolute; width: 44px; height: 44px; } 
a.avatar { position: relative; }
.avatar-lg { width: 48px; height: 48px; font-size: 18px; }
.avatar-lg::after { content: none; }
.pf-card { background: var(--surface); box-shadow: var(--ring); border-radius: var(--r-md); padding: 18px; max-width: 560px; }
.pf-id { display: flex; align-items: center; gap: 14px; }
.pf-email { font-size: 15px; font-weight: 600; word-break: break-all; }


.spark-wrap { position: relative; margin-top: 8px; }
.hero-pb .spark { display: block; margin-top: 0; width: 100%; height: 36px; touch-action: pan-y; } 
.spark-tip { position: absolute; bottom: calc(100% + 6px); background: var(--bg); border: var(--overlay-border); border-radius: var(--r-sm);
  box-shadow: var(--hover-shadow); padding: 4px 8px; font-size: 12px; font-weight: 600; white-space: nowrap; pointer-events: none; z-index: var(--z-overlay); }


.flt-custom { flex-wrap: wrap; row-gap: 6px; }
.flt-custom input { width: 148px; min-height: 36px; box-sizing: border-box; }
.flt-custom .btn { min-height: 36px; padding: 6px 14px; }
.flt-chip { min-height: 36px; } 


@media (max-width: 430px) {
  .app-view { padding: 24px 14px 72px; }
  .hero-pb { padding: 16px; }
  .hero-pb .hp-num { font-size: 30px; }
  .flt-custom { width: 100%; }
  .flt-custom input { flex: 1; width: auto; min-width: 0; }
  .pf-id { gap: 10px; }
  .wallet-cell { padding: 14px; }
}
.nowrap { white-space: nowrap; } 
