/* Xpress Desk · design system v5. Plus Jakarta Sans (self-hosted), 4/8pt rhythm, tabular money, one line-icon family,
   brand colours ink #111 / green #15a777 / surface #f5f7f8. Every header respects the iPhone safe areas. */
@font-face { font-family: 'Plus Jakarta Sans'; src: url('assets/fonts/plus-jakarta-sans.woff2') format('woff2'); font-weight: 200 800; font-style: normal; font-display: swap; }
:root {
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --ink: #111; --ink-2: #374046; --ink-3: #69737a; --ink-4: #a0a8ad;
  --line: #e1e6e9; --line-2: #eef1f3; --surface: #f5f7f8; --card: #fff;
  --ok: #15a777; --ok-ink: #0b7a55; --ok-bg: #e9f7f1; --warn: #a45f00; --warn-bg: #fff6e6; --warn-line: #f1d7a3; --bad: #c3352b; --bad-bg: #fdeeed;
  --ai: var(--ok-ink); --ai-bg: var(--ok-bg);
  --r-sm: 10px; --r: 14px; --r-lg: 18px; --r-xl: 24px;
  --e1: 0 1px 2px rgba(17,17,17,.04);
  --e2: 0 1px 2px rgba(17,17,17,.04), 0 6px 16px -6px rgba(17,17,17,.10);
  --e3: 0 18px 40px -12px rgba(17,17,17,.28), 0 2px 6px rgba(17,17,17,.06);
  --sat: env(safe-area-inset-top, 0px); --sab: env(safe-area-inset-bottom, 0px);
  --pad: 16px; --hdr: 56px;
  --t-display: 800 30px/1.12 var(--font); --t-h1: 800 26px/1.18 var(--font); --t-h2: 700 17px/1.3 var(--font); --t-h3: 700 15px/1.35 var(--font);
  --t-body: 500 15px/1.5 var(--font); --t-small: 500 13px/1.45 var(--font); --t-xs: 600 11px/1.3 var(--font);
  --ease: cubic-bezier(.2,.8,.2,1);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--surface); }
html[data-top="dark"], html[data-top="dark"] body { background: #0b0e10; }
html[data-top="white"], html[data-top="white"] body { background: #fff; }
body { font: var(--t-body); color: var(--ink); background: var(--surface); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; overflow: hidden; -webkit-text-size-adjust: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; text-align: left; }
button[disabled] { cursor: default; }
a { color: inherit; text-decoration: none; }
svg { width: 20px; height: 20px; flex-shrink: 0; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 8px; }
.num, .amt, .issue-key, .money input, .kv dd { font-variant-numeric: tabular-nums; font-feature-settings: 'tnum' 1; }
.noscript { padding: 20px; }
#app { height: 100vh; height: 100dvh; display: flex; flex-direction: column; max-width: 560px; margin: 0 auto; background: transparent; position: relative; overflow: hidden; }

/* type */
.display { font: var(--t-display); letter-spacing: -.03em; margin: 0; }
.h1 { font: var(--t-h1); letter-spacing: -.025em; margin: 0; }
.h1.big { font-size: 30px; }
.h2 { font: var(--t-h2); letter-spacing: -.01em; margin: 0; }
.h3 { font: var(--t-h3); margin: 0 0 12px; letter-spacing: -.005em; }
.m0 { margin: 0; }
.lead { font: var(--t-body); color: var(--ink-3); margin: 0; }
.small { font: var(--t-small); }
.muted { color: var(--ink-3); }
.eyebrow { font: 600 13px/1.3 var(--font); color: var(--ink-3); margin: 0; letter-spacing: 0; }
.grow { flex: 1; min-width: 0; }
.stack { display: flex; flex-direction: column; gap: 8px; }
.pad14 { padding: 14px; margin: 0; }

/* header: one pattern everywhere. Safe-area padding keeps it clear of the status bar / notch in Safari and home-screen mode. */
.topbar { flex-shrink: 0; padding-top: calc(var(--sat) + 4px); background: rgba(245,247,248,.94); -webkit-backdrop-filter: saturate(1.5) blur(14px); backdrop-filter: saturate(1.5) blur(14px); position: relative; z-index: 5; }
.topbar.sub { box-shadow: 0 1px 0 var(--line-2); }
.topbar-in { height: var(--hdr); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 0 var(--pad); gap: 12px; }
.topbar-in > :first-child { justify-self: start; }
.topbar-in > :last-child { justify-self: end; }
.brand { display: inline-flex; align-items: center; height: 40px; color: var(--ink); }
.logo { display: block; height: 22px; width: auto; color: var(--ink); }
.nav-back { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--card); border: 1px solid var(--line); box-shadow: var(--e1); color: var(--ink); }
.nav-back svg { width: 20px; height: 20px; margin-left: -1px; }
.nav-title { display: flex; flex-direction: column; align-items: center; text-align: center; line-height: 1.2; min-width: 0; }
.nav-title b { font-weight: 700; font-size: 16px; letter-spacing: -.01em; white-space: nowrap; }
.nav-title small { font-weight: 500; font-size: 12px; color: var(--ink-3); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 180px; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--ink); color: #fff; font-weight: 700; font-size: 13px; letter-spacing: .02em; display: grid; place-items: center; box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px var(--line); }
.avatar.lg { width: 48px; height: 48px; font-size: 17px; box-shadow: none; }
.avatar.xl { width: 84px; height: 84px; font-size: 28px; box-shadow: 0 0 0 6px rgba(255,255,255,.9), var(--e3); }
.avatar-gap { width: 36px; }

/* screens */
.scr { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 16px; padding: 12px var(--pad) 16px; scrollbar-width: none; }
.scr::-webkit-scrollbar { display: none; }
.scr > *, .msgs > *, .bot-col > * { flex-shrink: 0; }
.scr.center { align-items: stretch; text-align: center; }
.scr.pad-lg { padding: 24px; }
.screen-in { animation: rise .32s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
.spacer { flex: 1 1 0; min-height: 8px; flex-shrink: 1 !important; }
.spacer.b { flex: 1.4 1 0; }
.state-ic { width: 72px; height: 72px; border-radius: 22px; margin: 0 auto 8px; display: grid; place-items: center; background: var(--card); border: 1px solid var(--line); box-shadow: var(--e2); color: var(--ink); }
.state-ic svg { width: 32px; height: 32px; }
.scr.center .lead { max-width: 340px; margin: 0 auto; }
.scr.center .h1 { font-size: 24px; }
.actionbar { flex-shrink: 0; padding: 12px var(--pad) calc(12px + var(--sab)); background: linear-gradient(to bottom, rgba(245,247,248,0), var(--surface) 28%); display: flex; flex-direction: column; gap: 8px; position: relative; z-index: 4; }
.actionbar .why { text-align: center; color: var(--ink-3); margin: 0; }
.page-intro { display: flex; flex-direction: column; gap: 6px; padding: 4px 4px 0; }

/* buttons: 52 primary, 48 default, 36 small. Icons 20/18px, 8px gap. */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 48px; padding: 0 20px; border-radius: var(--r); background: var(--ink); color: #fff; font-weight: 700; font-size: 15px; letter-spacing: -.005em; text-align: center; transition: transform .12s var(--ease), background .15s, opacity .15s; box-shadow: 0 1px 2px rgba(17,17,17,.12), inset 0 1px 0 rgba(255,255,255,.08); white-space: nowrap; }
.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .5; }
.btn.go { height: 52px; width: 100%; font-size: 16px; }
.btn.block { width: 100%; }
.btn.secondary, .btn.plain { background: var(--card); color: var(--ink); border: 1px solid var(--line); box-shadow: var(--e1); }
.btn.ghost { background: transparent; color: var(--ink-2); box-shadow: none; }
.btn.sm { height: 36px; padding: 0 14px; font-size: 13px; border-radius: 10px; gap: 6px; }
.btn.danger { background: var(--card); color: var(--bad); border: 1px solid var(--line); box-shadow: none; }
.btn svg { width: 19px; height: 19px; }
.btn.sm svg { width: 16px; height: 16px; }
.btn-pair { display: flex; gap: 6px; flex-shrink: 0; }
.linkish { color: var(--ink-2); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line); padding: 6px 0; }
.linkish.center { align-self: center; font-size: 14px; }
.linkish.with-ic { display: inline-flex; align-items: center; gap: 4px; text-decoration: none; }
.linkish.with-ic svg { width: 16px; height: 16px; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 99px; background: var(--card); border: 1px solid var(--line); font-size: 13px; font-weight: 600; white-space: nowrap; box-shadow: var(--e1); }
.chip svg { width: 16px; height: 16px; color: var(--ink-3); }
.chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.chip.on svg { color: #fff; }
.chips { display: flex; gap: 8px; }
.chips.wrap { flex-wrap: wrap; }
.chips.scroll { overflow-x: auto; scrollbar-width: none; padding: 2px var(--pad); margin: 0 calc(-1 * var(--pad)); }
.chips.scroll::-webkit-scrollbar { display: none; }
.pill { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 99px; font-size: 11px; font-weight: 700; background: var(--line-2); color: var(--ink-2); white-space: nowrap; letter-spacing: .005em; }
.pill svg { width: 12px; height: 12px; }
.pill.ok { background: var(--ok-bg); color: var(--ok-ink); }
.pill.warn { background: var(--warn-bg); color: var(--warn); }
.pill.bad { background: var(--bad-bg); color: var(--bad); }
.pill.ghost { background: transparent; border: 1px solid var(--line); }
.live { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--ink-3); }
.live::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px rgba(21,167,119,.16); }
.live.sm { margin: 2px 0 0 2px; font-size: 11px; }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--ink); animation: spin .8s linear infinite; margin: 0 auto; }
@keyframes spin { to { transform: rotate(360deg); } }
.skel { display: block; background: linear-gradient(90deg, var(--line-2), #f8fafb, var(--line-2)); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: 6px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* cards & lists: 18px radius, hairline dividers */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--e1); }
.card.pad { padding: 16px; }
.card.list { display: flex; flex-direction: column; overflow: hidden; }
.card.list > * + * { border-top: 1px solid var(--line-2); }
.sec-head { display: flex; align-items: center; justify-content: space-between; padding: 0 4px; }
.notice { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r); background: var(--card); border: 1px solid var(--line); }
.notice > div { display: flex; flex-direction: column; gap: 2px; }
.notice.warn { background: var(--warn-bg); border-color: var(--warn-line); }
.notice.warn > svg, .notice.warn .row-h svg { color: var(--warn); }
.notice.col { flex-direction: column; gap: 6px; }
.notice p { margin: 0; }
.row-h { display: flex; align-items: center; gap: 8px; }
.splash { flex: 1; color: #fff; background: #0b0e10; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 28px; min-height: 60vh; }
.splash .logo { height: 30px; color: #fff; }

/* sign-in */
.signin { flex: 1; min-height: 0; display: flex; flex-direction: column; color: #fff; position: relative; overflow: hidden;
  background: radial-gradient(90% 50% at 50% 30%, rgba(21,167,119,.16), rgba(21,167,119,0) 70%), linear-gradient(180deg, #0a0d0f 0%, #0e1416 50%, #0a0d0f 100%); }
.si-top { position: relative; display: flex; align-items: center; justify-content: center; padding: calc(var(--sat) + 22px) 28px 0; }
.si-logo .logo { color: #fff; height: 30px; }
.si-hero { position: relative; flex: 1 1 0; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 8px 20px 0; }
.si-art { width: 100%; max-width: 352px; max-height: 100%; height: auto; overflow: visible; }
.si-scan { animation: siscan 3.4s cubic-bezier(.45,0,.55,1) infinite; }
@keyframes siscan { 0% { transform: translateY(20px); } 55% { transform: translateY(184px); } 100% { transform: translateY(184px); opacity: 0; } }
.si-chip-in { animation: sichip .6s var(--ease) both; }
.si-chip-in.d1 { animation-delay: .12s; } .si-chip-in.d2 { animation-delay: .24s; }
@keyframes sichip { from { opacity: 0; transform: translateX(-10px); } }
.si-copy { position: relative; padding: 4px 28px 0; display: flex; flex-direction: column; }
.si-eyebrow { margin: 0 0 12px; display: inline-flex; align-items: center; gap: 8px; font: 700 12px/1 var(--font); letter-spacing: .14em; text-transform: uppercase; color: #34d399; }
.si-dot { width: 6px; height: 6px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 4px rgba(52,211,153,.16); }
.si-copy h1 { margin: 0; font: 800 34px/1.06 var(--font); letter-spacing: -.04em; }
.si-copy h1 span { color: rgba(255,255,255,.58); }
.si-lead { margin: 12px 0 0; color: rgba(255,255,255,.66); font: 500 15px/1.55 var(--font); max-width: 330px; }
.si-feat { list-style: none; margin: 18px 0 0; padding: 14px 0 0; display: flex; justify-content: space-between; gap: 10px; border-top: 1px solid rgba(255,255,255,.08); }
.si-feat li { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; font: 600 13px/1 var(--font); color: rgba(255,255,255,.84); }
.si-feat svg { width: 16px; height: 16px; color: #34d399; }
.si-actions { position: relative; display: flex; flex-direction: column; gap: 12px; padding: 26px 28px calc(var(--sab) + 18px); }
.si-alert { margin: 0; display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: rgba(255,186,73,.12); border: 1px solid rgba(255,186,73,.32); color: #ffe2b0; font: 600 13px/1.4 var(--font); }
.si-alert svg { width: 18px; height: 18px; flex-shrink: 0; color: #ffc864; }
.si-fine { margin: 0; text-align: center; color: rgba(255,255,255,.5); font: 500 12.5px/1.5 var(--font); }
.si-fine .linkish { color: rgba(255,255,255,.78); font: inherit; padding: 0; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(255,255,255,.28); }
.ms-btn { width: 100%; height: 56px; gap: 12px; background: #fff; color: #111; border: 0; border-radius: 16px; box-shadow: 0 14px 34px -14px rgba(0,0,0,.7), inset 0 -1px 0 rgba(0,0,0,.06); font: 700 16px/1 var(--font); letter-spacing: -.01em; }
.ms-btn svg { width: 20px; height: 20px; }
@media (max-height: 700px) { .si-top { padding-top: calc(var(--sat) + 14px); } .si-logo .logo { height: 26px; } .si-copy h1 { font-size: 29px; } .si-lead { font-size: 14px; margin-top: 10px; } .si-feat { margin-top: 14px; } .si-eyebrow { margin-bottom: 10px; } .si-actions { padding-top: 18px; } .ms-btn { height: 52px; } }
@media (max-height: 560px) { .si-hero { display: none; } }
@media (prefers-reduced-motion: reduce) { .si-scan, .si-chip-in { animation: none !important; } }

/* lock + enrol: full screen, branded */
.lock-scr { flex: 1; display: flex; flex-direction: column; min-height: 0; position: relative; overflow: hidden; background: linear-gradient(180deg, #fff 0%, var(--surface) 100%); }
.lock-glow { position: absolute; width: 420px; height: 420px; left: 50%; top: 18%; transform: translate(-50%, -50%); border-radius: 50%; background: radial-gradient(closest-side, rgba(21,167,119,.16), rgba(21,167,119,0)); pointer-events: none; }
.lock-top { padding: calc(var(--sat) + 22px) 24px 0; display: flex; justify-content: center; position: relative; }
.lock-top .logo { height: 22px; }
.lock-mid { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 12px; padding: 16px 28px; position: relative; }
.lock-mid .lead { display: inline-flex; align-items: center; gap: 6px; max-width: 330px; }
.lock-mid .lead svg { width: 16px; height: 16px; }
.lock-mid .h1 { margin-top: 10px; }
.lock-bottom { padding: 0 24px calc(var(--sab) + 20px); display: flex; flex-direction: column; gap: 12px; position: relative; }
.lock-err { display: flex; gap: 8px; align-items: flex-start; margin: 0; padding: 10px 12px; border-radius: var(--r); background: var(--warn-bg); color: #7a4700; font-size: 13px; font-weight: 600; text-align: left; }
.lock-err svg { width: 16px; height: 16px; margin-top: 1px; }
.fid-badge { position: relative; width: 104px; height: 104px; border-radius: 30px; background: var(--ink); color: #fff; display: grid; place-items: center; box-shadow: 0 22px 44px -16px rgba(17,17,17,.5); overflow: hidden; margin-bottom: 10px; }
.fid-badge svg { width: 54px; height: 54px; stroke-width: 1.3; }
.fid-badge.muted-badge { background: var(--card); color: var(--ink); border: 1px solid var(--line); box-shadow: var(--e2); }
/* Face ID set-up: a contained halo behind the badge (fades out long before the logo) and a scan line sweeping over the face glyph */
.fid-wrap { position: relative; display: grid; place-items: center; margin-bottom: 10px; --scan-from: 24px; --scan-to: 78px; }
.fid-wrap .fid-badge { margin-bottom: 0; }
.fid-halo { position: absolute; left: 50%; top: 50%; width: 220px; height: 220px; transform: translate(-50%, -50%); border-radius: 50%; background: radial-gradient(closest-side, rgba(21,167,119,.18), rgba(21,167,119,.06) 55%, rgba(21,167,119,0) 100%); pointer-events: none; }
.fid-scan { position: absolute; left: 16px; right: 16px; top: 0; height: 2px; border-radius: 2px; background: linear-gradient(90deg, rgba(63,211,160,0), #3fd3a0 18%, #3fd3a0 82%, rgba(63,211,160,0)); box-shadow: 0 0 12px 2px rgba(63,211,160,.55); transform: translateY(var(--scan-from)); animation: fidscan 1.8s cubic-bezier(.45,0,.55,1) infinite alternate; will-change: transform; }
.fid-scan::after { content: ''; position: absolute; left: 0; right: 0; bottom: 2px; height: 18px; background: linear-gradient(to top, rgba(63,211,160,.22), rgba(63,211,160,0)); border-radius: 4px 4px 0 0; }
@keyframes fidscan { from { transform: translateY(var(--scan-from)); } to { transform: translateY(var(--scan-to)); } }
@media (prefers-reduced-motion: reduce) { .fid-scan { animation: none !important; transform: translateY(calc((var(--scan-from) + var(--scan-to)) / 2)); } }
.enroll .lead { display: block; }
.fine { margin: 0; text-align: center; font-size: 12px; line-height: 1.45; color: var(--ink-3); padding: 0 12px; }

/* home */
.greet { display: flex; flex-direction: column; gap: 4px; padding: 16px 4px 4px; align-items: flex-start; }
.greet .h1 { font-size: 28px; }
.acct-switch { display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; height: 30px; padding: 0 10px 0 12px; border-radius: 99px; background: var(--card); border: 1px solid var(--line); font-size: 13px; font-weight: 600; box-shadow: var(--e1); }
.acct-switch svg { width: 15px; height: 15px; color: var(--ink-3); }
.hero { position: relative; overflow: hidden; border-radius: var(--r-xl); padding: 20px; display: flex; flex-direction: column; gap: 18px; border: 1px solid var(--line);
  background: radial-gradient(120% 90% at 100% 0%, rgba(21,167,119,.13), rgba(21,167,119,0) 58%), var(--card); box-shadow: var(--e2); }
.hero-body { display: grid; grid-template-columns: 1fr 116px; gap: 10px; align-items: center; }
.hero-copy { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.hero-copy h2 { font: 800 23px/1.15 var(--font); letter-spacing: -.025em; margin: 2px 0 0; }
.hero-copy p { margin: 0; color: var(--ink-3); font-size: 14px; line-height: 1.45; }
.ai-tag { align-self: flex-start; display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px 0 8px; border-radius: 99px; background: var(--ok-bg); color: var(--ok-ink); font-size: 12px; font-weight: 700; }
.ai-tag svg { width: 14px; height: 14px; }
.hero-art { width: 116px; height: auto; overflow: visible; }
.hb-beam { animation: hbeam 3s var(--ease) infinite; }
@keyframes hbeam { 0% { transform: translateY(12px); opacity: 0; } 8% { opacity: 1; } 85% { opacity: 1; } 100% { transform: translateY(140px); opacity: 0; } }
.hb-amount { animation: hamount 3s var(--ease) infinite; }
@keyframes hamount { 0%, 55% { opacity: .35; } 66%, 100% { opacity: 1; } }
.hero-actions { display: grid; grid-template-columns: 1.2fr 1fr; gap: 10px; }
.hero-cam, .hero-up { height: 52px; }
.bill-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; width: 100%; min-height: 64px; }
.bill-row:active { background: var(--surface); }
.bill-ic { width: 40px; height: 40px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line-2); display: grid; place-items: center; flex-shrink: 0; color: var(--ink-2); }
.bill-ic svg { width: 20px; height: 20px; }
.bill-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.bill-main b { font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bill-main small { font-size: 12px; color: var(--ink-3); font-weight: 500; }
.bill-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.amt { font-weight: 700; font-size: 14px; }
.empty-bills { display: flex; gap: 10px; align-items: center; padding: 16px; color: var(--ink-3); font-size: 13px; }
.dock { flex-shrink: 0; padding: 6px var(--pad) calc(10px + var(--sab)); background: linear-gradient(to bottom, rgba(245,247,248,0), var(--surface) 40%); margin-top: -18px; position: relative; z-index: 4; }
.dock .ask-bar { margin-top: 0; }
.scr:has(+ .dock) { padding-bottom: 30px; }
.ask-bar { display: flex; width: 100%; box-sizing: border-box; align-items: center; gap: 12px; height: 54px; padding: 0 8px 0 10px; border-radius: 99px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--e2); color: var(--ink-3); font-size: 15px; font-weight: 500; flex-shrink: 0; margin-top: auto; }
.ai-mark { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--ok-bg); color: var(--ok-ink); flex-shrink: 0; }
.ai-mark svg { width: 18px; height: 18px; }
.go-ic { width: 38px; height: 38px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; }
.go-ic svg { width: 18px; height: 18px; }
.acct-row { display: flex; align-items: center; gap: 12px; padding: 14px; width: 100%; }
.acct-row.sel { background: var(--surface); }
.acct-row b { font-weight: 700; }
.acct-row small, .nav-row small { display: block; color: var(--ink-3); font-size: 12px; font-weight: 500; }
.acct-row > svg:last-child { color: var(--ink-4); width: 18px; }
.mono { width: 42px; height: 42px; border-radius: 13px; background: var(--ink); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 14px; }
.nav-row { display: flex; align-items: center; gap: 12px; padding: 14px; width: 100%; font-weight: 600; min-height: 54px; }
.nav-row > svg:first-child { color: var(--ink-2); }
.nav-row > svg:last-child:not(:first-child) { color: var(--ink-4); width: 18px; }
.nav-row.static { cursor: default; }

/* capture */
.strip { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.strip.many { grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--e1); }
.tile.flagged { border-color: var(--warn-line); }
.tile-img { position: relative; aspect-ratio: 3/4; background: var(--surface); display: grid; place-items: center; overflow: hidden; }
.tile-img img { width: 100%; height: 100%; object-fit: cover; }
.pno { position: absolute; top: 8px; left: 8px; min-width: 22px; height: 22px; border-radius: 11px; background: rgba(17,17,17,.78); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; padding: 0 6px; }
.tile-flag { position: absolute; left: 8px; right: 8px; bottom: 8px; background: var(--warn-bg); color: var(--warn); font-size: 11px; font-weight: 700; padding: 4px 8px; border-radius: 8px; }
.tile-tools { display: flex; justify-content: space-around; padding: 4px; }
.tile-tools button { width: 36px; height: 36px; display: grid; place-items: center; color: var(--ink-2); border-radius: 10px; }
.tile-tools button[disabled] { opacity: .3; }
.tile-tools svg { width: 18px; height: 18px; }
.strip.many .tile-tools button { width: 28px; height: 32px; }
.strip.many .tile-tools svg { width: 16px; height: 16px; }
.add-tile { border: 1.5px dashed var(--line); border-radius: var(--r-lg); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: var(--ink-3); font-weight: 600; font-size: 13px; min-height: 160px; }
.strip.many .add-tile { min-height: 0; }

/* reading */
.reading { gap: 16px; }
.scan { position: relative; flex: 1 1 auto; flex-shrink: 1 !important; min-height: 140px; max-height: 300px; border-radius: var(--r-lg); overflow: hidden; background: var(--ink); box-shadow: var(--e2); }
.scan img { width: 100%; height: 100%; object-fit: cover; opacity: .86; }
.scan .beam { position: absolute; left: 0; right: 0; height: 64px; top: -64px; background: linear-gradient(to bottom, transparent, rgba(21,167,119,.35)); border-bottom: 2px solid var(--ok); animation: beam 1.6s var(--ease) infinite; }
.scan.done .beam { display: none; }
@keyframes beam { to { top: 100%; } }
.read-head { display: flex; gap: 12px; align-items: center; }
.read-head p { margin: 2px 0 0; }
.spark-spin svg { animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(.82); opacity: .6; } }
.srow { display: flex; align-items: center; gap: 12px; padding: 12px 14px; min-height: 46px; }
.srow small { width: 92px; flex-shrink: 0; color: var(--ink-3); font-size: 12px; font-weight: 600; }
.srow .v { flex: 1; font-weight: 700; font-size: 14px; line-height: 1.3; min-width: 0; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.srow .v.skel { height: 12px; flex: 0 0 45%; }
.srow.in .v { animation: fadein .3s var(--ease) both; }
.srow .ck { width: 16px; height: 16px; color: var(--ok); animation: pop .3s var(--ease) both; }
@keyframes fadein { from { opacity: 0; transform: translateX(-4px); } }
@keyframes pop { from { transform: scale(.4); opacity: 0; } }

/* review */
.review { gap: 10px; }
.ai-line { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; color: var(--ok-ink); }
.ai-line svg { width: 14px; height: 14px; }
.conf { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; }
.conf svg { width: 14px; height: 14px; }
.conf.ok { color: var(--ok-ink); }
.conf.warn { color: var(--warn); }
.frow { display: flex; align-items: center; gap: 8px; padding: 8px 14px; width: 100%; min-height: 52px; transition: background .15s; }
.frow:active:not([disabled]) { background: var(--surface); }
.frow-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.frow-main small { font-size: 12px; color: var(--ink-3); font-weight: 500; }
.frow .v { font-weight: 700; font-size: 15px; overflow-wrap: anywhere; }
.frow .v.empty { color: var(--ink-4); font-weight: 500; }
.frow .why { display: flex; align-items: flex-start; gap: 4px; font-size: 12px; font-weight: 600; color: var(--warn); margin-top: 2px; }
.frow .why svg { width: 13px; height: 13px; margin-top: 1px; }
.frow.flag { background: linear-gradient(90deg, var(--warn-bg), #fffbf2 70%); box-shadow: inset 3px 0 0 #f0b44c; }
.frow.need { background: var(--bad-bg); box-shadow: inset 3px 0 0 var(--bad); }
.frow .need-why { color: var(--bad); }
.frow .chev svg { width: 16px; height: 16px; color: var(--ink-4); }
.frow.static { cursor: default; }
.status-row { gap: 12px; }
.status-row .frow-main { flex: 0 1 auto; }
.seg { display: flex; background: var(--surface); border: 1px solid var(--line); border-radius: 11px; padding: 3px; gap: 2px; flex: 0 0 216px; }
.seg button { flex: 1; height: 32px; border-radius: 8px; font-size: 13px; font-weight: 700; color: var(--ink-3); text-align: center; transition: background .15s, color .15s; }
.seg button.on { background: var(--card); color: var(--ink); box-shadow: var(--e2); }
.seg.mini { flex: 0 0 auto; }
.seg.mini button { height: 28px; padding: 0 10px; font-size: 12px; }
.ro { font-size: 11px; color: var(--ink-3); }
.bar-tools { display: flex; gap: 8px; }
.bar-tools .more-row, .bar-tools .note-chip { min-height: 44px; padding-top: 0; padding-bottom: 0; background: var(--card); }
#app:has(.bar-tools) .scr { padding-bottom: 12px; }
.actionbar:has(.bar-tools) { background: var(--surface); border-top: 1px solid var(--line); padding-top: 10px; }
.more-row { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; padding: 13px 14px; border-radius: var(--r-lg); border: 1px dashed var(--line); color: var(--ink-2); font-weight: 700; font-size: 14px; background: rgba(255,255,255,.5); }
.more-row small { flex: 1; text-align: right; color: var(--ink-3); font-weight: 500; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.more-row svg { width: 16px; height: 16px; color: var(--ink-4); }
.note-chip { display: inline-flex; align-items: center; gap: 4px; padding: 0 14px; border-radius: var(--r-lg); border: 1px dashed var(--line); font-weight: 700; font-size: 14px; color: var(--ink-2); background: rgba(255,255,255,.5); }
.note-chip svg { width: 15px; height: 15px; }
.steps-mini { list-style: none; margin: 0; padding: 0; font-size: 13px; display: flex; flex-direction: column; gap: 4px; }
.steps-mini li { display: flex; align-items: center; gap: 6px; }
.steps-mini svg { width: 15px; height: 15px; }
.steps-mini .done { color: var(--ok-ink); } .steps-mini .failed { color: var(--bad); font-weight: 700; }

/* success */
.success { align-items: center; text-align: center; gap: 20px; }
.center-txt { display: flex; flex-direction: column; gap: 6px; }
.burst { position: relative; width: 96px; height: 96px; }
.success-mark { width: 96px; height: 96px; border-radius: 50%; background: var(--ok); color: #fff; display: grid; place-items: center; box-shadow: 0 14px 34px -8px rgba(21,167,119,.55); animation: pop .45s var(--ease) both; }
.success-mark svg { width: 44px; height: 44px; stroke-width: 2.2; }
.burst i { position: absolute; left: 50%; top: 50%; width: 6px; height: 6px; border-radius: 50%; background: var(--ok); opacity: 0; animation: fly .9s var(--ease) .15s both; }
.burst i:nth-child(2) { --a: 0deg; } .burst i:nth-child(3) { --a: 45deg; background: #111; } .burst i:nth-child(4) { --a: 90deg; } .burst i:nth-child(5) { --a: 135deg; background: #111; }
.burst i:nth-child(6) { --a: 180deg; } .burst i:nth-child(7) { --a: 225deg; background: #111; } .burst i:nth-child(8) { --a: 270deg; } .burst i:nth-child(9) { --a: 315deg; background: #111; }
@keyframes fly { 0% { opacity: 1; transform: rotate(var(--a)) translateY(0); } 100% { opacity: 0; transform: rotate(var(--a)) translateY(-72px); } }
.ticket { width: 100%; padding: 16px; text-align: left; display: flex; flex-direction: column; gap: 8px; }
.ticket-top { display: flex; justify-content: space-between; align-items: center; }
.ticket p { margin: 0; color: var(--ink-2); font-size: 14px; }
.issue-key { font-weight: 800; font-size: 20px; letter-spacing: -.01em; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 4px 0 0; font-size: 14px; padding-top: 10px; border-top: 1px solid var(--line-2); }
.kv dt { color: var(--ink-3); } .kv dd { margin: 0; text-align: right; font-weight: 700; }

/* chat */
.chat { gap: 12px; padding-bottom: 8px; }
.chat-hello { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; margin: auto 0 0; padding: 24px 16px 8px; }
.chat-hello p { margin: 0; max-width: 310px; }
.ai-av { width: 30px; height: 30px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; flex-shrink: 0; }
.ai-av svg { width: 16px; height: 16px; color: #7fe0bd; }
.ai-av.lg { width: 56px; height: 56px; box-shadow: var(--e3); } .ai-av.lg svg { width: 28px; height: 28px; }
.msgs { display: flex; flex-direction: column; gap: 14px; margin-top: auto; }
.chat-hello + .msgs { margin-top: 0; }
.msg { max-width: 86%; padding: 10px 14px; border-radius: 20px; font-size: 15px; line-height: 1.5; animation: rise .25s var(--ease) both; overflow-wrap: anywhere; }
.msg p { margin: 0; }
.msg.me { align-self: flex-end; background: var(--ink); color: #fff; border-bottom-right-radius: 6px; font-weight: 500; }
.msg.bot { background: var(--card); border: 1px solid var(--line); border-bottom-left-radius: 6px; max-width: 100%; box-shadow: var(--e1); }
.msg.err { background: var(--bad-bg); border-color: #f4c7c3; color: #8c2219; }
.bot-row { display: flex; gap: 8px; align-items: flex-start; max-width: 92%; }
.bot-row .ai-av { margin-top: 4px; }
.bot-col { display: flex; flex-direction: column; gap: 8px; min-width: 0; flex: 1; }
.typing { display: inline-flex; gap: 4px; padding: 15px 16px; width: auto; align-self: flex-start; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--ink-4); animation: blink 1s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 50% { opacity: .25; transform: translateY(-2px); } }
.issue-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line-2); }
.ichip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 5px 0 10px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); font-size: 12px; align-self: flex-start; }
.ichip b { font-weight: 700; }
.act { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px; display: flex; flex-direction: column; gap: 8px; box-shadow: var(--e2); animation: rise .3s var(--ease) both; }
.act b { font-size: 15px; font-weight: 700; line-height: 1.35; }
.act-k { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--ink-3); }
.act-k svg { width: 14px; height: 14px; }
.act.offer { border-color: #bfe6d6; background: linear-gradient(180deg, var(--ok-bg), #fff 62%); }
.act.offer .act-k { color: var(--ok-ink); }
.act.prev { border-color: var(--ink); }
.act.done { background: var(--ok-bg); border-color: #bfe8d8; color: #0d6e4e; box-shadow: none; }
.act.done:not(.col) { flex-direction: row; align-items: center; font-weight: 700; font-size: 14px; }
.act.off { background: transparent; border-style: dashed; color: var(--ink-3); box-shadow: none; font-size: 13px; padding: 10px 14px; }
.act.col .small { margin: 0; }
.reasons { margin: 0; padding: 0 0 0 18px; font-size: 13px; color: var(--ink-2); display: flex; flex-direction: column; gap: 2px; }
.labels { display: flex; flex-wrap: wrap; gap: 6px; }
.act p { margin: 0; }
.diff { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.diff .from { color: var(--ink-3); text-decoration: line-through; } .diff .to { font-weight: 700; } .diff svg { width: 14px; height: 14px; color: var(--ink-4); }
.quote { font-size: 14px; color: var(--ink-2); padding: 8px 12px; border-left: 3px solid var(--line); background: var(--surface); border-radius: 0 8px 8px 0; }
.row2 { display: grid; grid-template-columns: 1fr 1.4fr; gap: 8px; margin-top: 4px; }
.row3 { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; margin-top: 4px; }
.composer-wrap { flex-shrink: 0; display: flex; flex-direction: column; gap: 10px; padding: 8px var(--pad) calc(10px + var(--sab)); background: var(--surface); }
.composer { display: flex; gap: 8px; align-items: center; height: 54px; padding: 0 7px 0 18px; border-radius: 99px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--e2); }
.composer input { flex: 1; border: 0; outline: 0; background: transparent; font-size: 16px; min-width: 0; font-weight: 500; }
.composer input::placeholder { color: var(--ink-4); }
.composer:focus-within { border-color: var(--ink-3); }
.send { width: 40px; height: 40px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; }
.send[disabled] { opacity: .4; }
.send svg { width: 18px; height: 18px; }

/* prose & admin */
.prose h3 { font-size: 15px; font-weight: 700; margin: 8px 0 -8px; }
.prose p { margin: 0; color: var(--ink-2); }
.fld { display: flex; flex-direction: column; gap: 6px; }
.fld small { font-size: 12px; color: var(--ink-3); font-weight: 600; }
.fld input, .fld select, .fld textarea, .money input { width: 100%; height: 50px; padding: 0 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--card); font-size: 16px; font-weight: 600; outline: 0; transition: border-color .15s, box-shadow .15s; }
.fld input:focus, .fld select:focus, .fld textarea:focus, .money:focus-within { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(17,17,17,.08); }
.fld textarea { height: 112px; padding: 12px 14px; resize: none; font-weight: 500; }
.money { display: flex; align-items: center; gap: 4px; border: 1px solid var(--line); border-radius: var(--r); padding-left: 14px; background: var(--card); }
.money span { font-weight: 700; font-size: 20px; color: var(--ink-3); }
.money input { border: 0; box-shadow: none !important; font-size: 24px; font-weight: 800; padding-left: 4px; letter-spacing: -.01em; }
.toggle { display: flex; align-items: center; gap: 10px; font-size: 14px; padding: 4px 0; }
.toggle input { width: 20px; height: 20px; accent-color: var(--ink); }
.grant { display: flex; align-items: center; gap: 12px; padding: 12px 14px; }
.grant b { display: block; font-size: 14px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; }
.grant small { display: block; font-size: 12px; color: var(--ink-3); }

/* sheets */
.sheet-back { position: fixed; inset: 0; background: rgba(17,17,17,.38); display: flex; align-items: flex-end; justify-content: center; z-index: 50; animation: fade .2s both; }
@keyframes fade { from { opacity: 0; } }
.sheet { width: 100%; max-width: 560px; background: var(--card); border-radius: 26px 26px 0 0; padding: 8px 20px calc(20px + var(--sab)); display: flex; flex-direction: column; gap: 14px; box-shadow: var(--e3); animation: up .32s var(--ease) both; max-height: 92dvh; overflow-y: auto; scrollbar-width: none; }
.sheet::-webkit-scrollbar { display: none; }
@keyframes up { from { transform: translateY(100%); } }
.sheet.center { align-items: center; text-align: center; padding-top: 28px; }
.sheet.center p { margin: 0; }
.sheet.tall { height: 88dvh; }
.sheet.dark { background: #0d0f10; color: #fff; }
.sheet .grab { width: 36px; height: 5px; border-radius: 3px; background: var(--line); align-self: center; margin-bottom: 2px; flex-shrink: 0; }
.sheet h2 { font: 700 19px/1.3 var(--font); margin: 0; letter-spacing: -.015em; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sheet-head .x { width: 34px; height: 34px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; color: var(--ink-2); }
.sheet-head .x svg { width: 16px; height: 16px; }
.sheet.dark .x { background: rgba(255,255,255,.12); color: #fff; }
.sheet-body { flex: 1; overflow-y: auto; margin: 0 -20px; padding: 0 20px 8px; scrollbar-width: none; }
.sheet-body::-webkit-scrollbar { display: none; }
.grp { font-size: 12px; font-weight: 700; color: var(--ink-3); margin: 12px 4px -6px; }
.drow { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; width: 100%; border-bottom: 1px solid var(--line-2); }
.drow small { color: var(--ink-3); font-size: 13px; flex-shrink: 0; }
.drow span { font-weight: 700; font-size: 14px; text-align: right; overflow-wrap: anywhere; }
.drow span.empty { color: var(--ink-4); font-weight: 500; }
.drow.flag small::after { content: ' · check'; color: var(--warn); font-weight: 700; }
.drow.ro { cursor: default; }
.li-row { display: grid; grid-template-columns: 1fr 88px 32px; gap: 6px; margin-bottom: 6px; }
.li-row input { height: 40px; border: 1px solid var(--line); border-radius: 10px; padding: 0 10px; font-size: 14px; min-width: 0; }
.li-row button { display: grid; place-items: center; color: var(--ink-3); }
.crop { height: 120px; border-radius: var(--r); overflow: hidden; background: var(--surface); border: 1px solid var(--line-2); flex-shrink: 0; }
.crop img { width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }
.ai-note { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: var(--r); background: var(--warn-bg); color: #7a4a00; font-size: 13px; line-height: 1.4; }
.ai-note b { display: block; font-size: 12px; margin-bottom: 2px; }
.ai-note svg { width: 16px; height: 16px; margin-top: 1px; }
.ai-note.ok { background: var(--ok-bg); color: #0d6e4e; align-items: center; }
.me { display: flex; gap: 12px; align-items: center; }
.me b { display: block; font-weight: 700; } .me small { color: var(--ink-3); font-size: 13px; }
.viewer-img { flex: 1; min-height: 0; display: grid; place-items: center; overflow: hidden; }
.viewer-img img { max-height: 100%; object-fit: contain; }
.viewer-bar { display: flex; justify-content: center; gap: 16px; }
.viewer-bar button { width: 48px; height: 48px; border-radius: 50%; background: rgba(255,255,255,.12); color: #fff; display: grid; place-items: center; }
.viewer-bar button[disabled] { opacity: .3; }
.toast { position: fixed; left: 50%; top: calc(var(--sat) + var(--hdr) + 10px); bottom: auto; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 16px; border-radius: 14px; font-size: 14px; font-weight: 600; z-index: 80; max-width: min(92vw, 420px); box-shadow: var(--e3); animation: rise .25s var(--ease) both; text-align: center; }

/* camera */
.camera { position: fixed; inset: 0; background: #000; z-index: 70; display: flex; flex-direction: column; }
.camera video { flex: 1; width: 100%; object-fit: cover; min-height: 0; }
.camera .frame { position: absolute; inset: 12% 8% 24%; border: 2px solid rgba(255,255,255,.8); border-radius: 18px; box-shadow: 0 0 0 100vmax rgba(0,0,0,.35); pointer-events: none; }
.camera .tip { position: absolute; top: calc(20px + var(--sat)); left: 0; right: 0; text-align: center; color: #fff; font-size: 14px; font-weight: 600; }
.camera .cbar { display: flex; align-items: center; justify-content: space-between; padding: 20px 28px calc(28px + var(--sab)); background: #000; }
.camera .txt { color: #fff; font-weight: 600; width: 90px; }
.camera .txt:last-child { text-align: right; }
.shutter { width: 72px; height: 72px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 4px #000, 0 0 0 7px #fff; }
.shutter:active { transform: scale(.94); }

/* helpers (CSP: no inline styles) */
.rot90 { transform: rotate(90deg); } .rot180 { transform: rotate(180deg); } .rot270 { transform: rotate(270deg); }
.mt4 { margin-top: 4px; } .mt2 { margin-top: 2px; } .fill { flex: 1; } .gap6 { gap: 6px !important; } .col8 { display: flex; flex-direction: column; gap: 8px; } .sk1 { height: 12px; width: 60%; } .sk2 { height: 10px; width: 35%; }

/* small phones (iPhone SE 375×667): tighter rhythm, no dead zones */
@media (max-height: 700px) {
  :root { --pad: 14px; --hdr: 52px; }
  .scr { gap: 12px; padding-bottom: 8px; }
  .greet { padding-top: 8px; } .greet .h1 { font-size: 24px; }
  .hero { padding: 16px; gap: 14px; } .hero-body { grid-template-columns: 1fr 92px; } .hero-art { width: 92px; }
  .hero-copy h2 { font-size: 20px; } .hero-copy p { font-size: 13px; }
  .hero-cam, .hero-up { height: 48px; }
  .bill-row { min-height: 56px; padding: 9px 12px; }
  .scan { min-height: 110px; }
  .srow { padding: 10px 14px; min-height: 40px; }
  .frow { min-height: 44px; padding: 6px 14px; } .frow .v { font-size: 14px; } .frow-main small { font-size: 11px; }
  .sum { padding: 12px 14px; gap: 10px; } .sum-img { width: 54px; height: 70px; } .sum-amt { font-size: 24px; }
  .seg button { height: 30px; } .review { gap: 8px; } .scr.review { padding-top: 6px; }
  .bar-tools .more-row, .bar-tools .note-chip { min-height: 44px; }
  .actionbar { padding-top: 8px; } .actionbar .why { display: none; }
  .display { font-size: 28px; }
  .fid-wrap { --scan-from: 20px; --scan-to: 66px; } .fid-halo { width: 190px; height: 190px; }
  .fid-badge { width: 88px; height: 88px; border-radius: 26px; } .fid-badge svg { width: 46px; height: 46px; } .h1.big { font-size: 26px; }
  .avatar.xl { width: 72px; height: 72px; font-size: 24px; }
}
@media (max-width: 380px) { .seg { flex-basis: 196px; } .seg button { font-size: 12px; } }
@media (min-height: 900px) { .hero { padding: 24px 22px; gap: 22px; } .hero-body { grid-template-columns: 1fr 128px; } .hero-art { width: 128px; } .greet { padding-top: 20px; } }
@media (display-mode: standalone) { .topbar { padding-top: calc(var(--sat) + 6px); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .001s !important; animation-iteration-count: 1 !important; transition: none !important; } }

.soon-ic { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--surface); color: var(--ink); margin-top: 4px; }
.soon-ic svg { width: 26px; height: 26px; }
/* review: Note + All details sit in the bottom bar with the submit button; the list above fits a 390×844 screen */
.actionbar:has(.bar-tools) .why { display: none; }
.scr.review .frow { min-height: 48px; padding-top: 6px; padding-bottom: 6px; }
.scr.review { gap: 8px; padding-bottom: 8px; }
.scr.review .sum { padding: 12px 14px; }
@media (max-height: 700px) {
  .scr.review .frow { min-height: 42px; padding-top: 4px; padding-bottom: 4px; }
  .scr.review .sum { padding: 8px 12px; }
  .bar-tools .more-row, .bar-tools .note-chip { min-height: 40px; }
  .actionbar:has(.bar-tools) { padding-top: 8px; gap: 6px; }
}

/* AI summary card: status tags side by side at the top */
.tag { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 9px; border-radius: 99px; font-size: 11.5px; font-weight: 700; background: var(--ok-bg); color: var(--ok-ink); white-space: nowrap; }
.tag svg { width: 12px; height: 12px; }
.tag.warn { background: var(--warn-bg); color: var(--warn); }

/* review: AI summary card */
.sum { position: relative; display: flex; flex-direction: column; gap: 12px; padding: 14px 16px 16px; border-radius: var(--r-lg, 18px);
  border: 1px solid transparent;
  background: linear-gradient(180deg, #ffffff 0%, #f4fbf8 100%) padding-box, linear-gradient(135deg, rgba(21,167,119,.55), rgba(21,167,119,.12) 45%, var(--line) 80%) border-box;
  box-shadow: 0 1px 2px rgba(16,24,40,.04), 0 10px 24px -16px rgba(21,120,90,.35); }
.sum-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.sum-body { display: flex; align-items: center; gap: 16px; }
.sum-img { position: relative; width: 66px; height: 86px; border-radius: 12px; overflow: hidden; flex-shrink: 0; padding: 0; background: #fff; border: 1px solid rgba(16,24,40,.08);
  box-shadow: 0 1px 2px rgba(16,24,40,.08), 0 8px 18px -8px rgba(16,24,40,.35); image-rendering: auto; }
.sum-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sum-img .pno { top: auto; bottom: 5px; left: 5px; }
.sum-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.sum-cap { font: 600 12.5px/1.35 var(--font); color: var(--ink-3); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
.sum-amt { font: 800 30px/1.1 var(--font); letter-spacing: -.03em; color: var(--ink); }
.sum-none { font-size: 17px; font-weight: 700; color: var(--ink-4); letter-spacing: -.01em; }
.sum-due { display: inline-flex; align-items: center; gap: 5px; font: 600 13px/1.3 var(--font); color: var(--ink-3); }
.sum-due svg { width: 14px; height: 14px; flex-shrink: 0; }

/* buttons: the icon and label are centred together as one group */
.btn { display: inline-flex; align-items: center; justify-content: center; line-height: 1; text-align: center; }
.btn > svg { flex-shrink: 0; margin: 0; display: block; }
.btn > span { display: block; line-height: 1; }
.btn.go.confirm { gap: 9px; padding: 1.5px 21.5px 0 20px; } /* measured: the ink of check + label sits 0.75px high and right of true centre without this */
.btn.go.confirm > svg { width: 20px; height: 20px; }

/* ================= review v8: hero + one details card + one action area (no dead band) ================= */
.scr.review { gap: 12px; padding-top: 8px; }
.hero { position: relative; display: flex; flex-direction: column; gap: 14px; padding: 16px; border-radius: 20px; flex-shrink: 0;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdfc 100%) padding-box, linear-gradient(160deg, rgba(21,167,119,.45), rgba(21,167,119,.08) 38%, var(--line) 70%) border-box;
  border: 1px solid transparent; box-shadow: 0 1px 2px rgba(16,24,40,.04), 0 12px 28px -18px rgba(16,24,40,.28); }
.hero-top { display: flex; gap: 14px; align-items: flex-start; }
.thumb { position: relative; width: 62px; height: 78px; border-radius: 10px; overflow: hidden; flex-shrink: 0; background: #fff; padding: 0;
  border: 1px solid rgba(16,24,40,.10); box-shadow: 0 1px 2px rgba(16,24,40,.06), 0 8px 16px -8px rgba(16,24,40,.30); }
.thumb img { position: absolute; left: -12%; top: -7%; width: 172%; max-width: none; height: auto; }
.thumb .pno { top: 4px; left: 4px; bottom: auto; }
.thumb-zoom { position: absolute; right: 4px; bottom: 4px; width: 20px; height: 20px; border-radius: 6px; display: grid; place-items: center; background: rgba(17,17,17,.74); color: #fff; }
.thumb-zoom svg { width: 11px; height: 11px; }
.hero-id { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; padding-top: 1px; }
.hero-f { display: block; width: 100%; text-align: left; border-radius: 8px; transition: background .15s; }
.hero-f:active:not([disabled]) { background: var(--line-2); }
.hero-title { display: block; font: 700 17px/1.3 var(--font); letter-spacing: -.015em; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hero-cap { display: block; font: 500 13px/1.45 var(--font); color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hero-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.hero-f.amt { position: relative; display: grid; grid-template-columns: 1fr auto; column-gap: 12px; align-items: center; padding: 12px 14px 13px; border-radius: 14px; background: #f4f8f6; border: 1px solid #e3eee9; }
.hero-f.amt small { grid-column: 1; font: 600 12px/1.3 var(--font); color: var(--ink-3); letter-spacing: .01em; }
.hero-f.amt .hero-amt { grid-column: 1; font: 800 34px/1.08 var(--font); letter-spacing: -.035em; color: var(--ink); }
.hero-none { font-size: 20px; font-weight: 700; color: var(--ink-4); letter-spacing: -.01em; }
.hero-edit { grid-column: 2; grid-row: 1 / span 2; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: #fff; border: 1px solid var(--line); color: var(--ink-3); box-shadow: var(--e1); }
.hero-edit svg { width: 15px; height: 15px; }
.hero-f.flag { background: var(--warn-bg); box-shadow: 0 0 0 1px var(--warn-line); }
.hero-f.amt.flag { border-color: var(--warn-line); }
.hero-f.need { background: var(--bad-bg); box-shadow: 0 0 0 1px rgba(195,53,43,.25); }
.hero-why { display: flex; flex-direction: column; gap: 6px; margin-top: -4px; }
.hero-why button { display: flex; gap: 6px; align-items: flex-start; font: 500 12.5px/1.4 var(--font); color: var(--warn); text-align: left; }
.hero-why svg { width: 14px; height: 14px; margin-top: 1px; }
/* details: one card, label left / value right, the same height for every line */
.details .frow { min-height: 54px; padding: 8px 12px 8px 16px; }
.details .frow-main { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; column-gap: 12px; row-gap: 2px; }
.details .frow-main small { font: 500 14px/1.3 var(--font); color: var(--ink-2); margin: 0; }
.details .frow-main .v { font: 600 15px/1.3 var(--font); color: var(--ink); text-align: right; margin-left: auto; max-width: 62%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.details .frow-main .v.empty { color: var(--ink-4); font-weight: 500; }
.details .frow-main .why { flex-basis: 100%; }
.details .chev svg { color: var(--ink-4); }
.details .status-row .frow-main { flex-direction: column; align-items: flex-start; }
.details .status-row .frow-main small { font-size: 14px; }
.scr.review > .card.list.fill { flex: 0 0 auto; }
.scr.review > .card.list.fill.r1 { flex-grow: 1; max-height: 70px; }
.scr.review > .card.list.fill.r2 { flex-grow: 2; max-height: 139px; }
.scr.review > .card.list.fill.r3 { flex-grow: 3; max-height: 208px; }
.scr.review > .card.list.fill.r4 { flex-grow: 4; max-height: 277px; }
.scr.review > .card.list.fill.r5 { flex-grow: 5; max-height: 346px; }
.scr.review > .card.list.fill.r6 { flex-grow: 6; max-height: 415px; }
.scr.review > .card.list.fill.r7 { flex-grow: 7; max-height: 484px; }
.scr.review > .card.list.fill.r8 { flex-grow: 8; max-height: 553px; }
.scr.review > .card.list.fill.r9 { flex-grow: 9; max-height: 622px; }
.scr.review > .card.list.fill > .frow { flex: 1 1 auto; max-height: 68px; }
/* action area: one segmented toolbar (note + all details) above the confirm button */
.bar-tools { display: flex; gap: 0; height: 46px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--e1); overflow: hidden; }
.bar-tools .tool { display: inline-flex; align-items: center; gap: 7px; padding: 0 14px; font: 600 14px/1 var(--font); color: var(--ink-2); white-space: nowrap; }
.bar-tools .tool + .tool { border-left: 1px solid var(--line-2); }
.bar-tools .tool svg { width: 16px; height: 16px; color: var(--ink-3); }
.bar-tools .tool.more { flex: 1; min-width: 0; }
.bar-tools .tool.more small { flex: 1; min-width: 0; text-align: right; font: 500 12.5px/1 var(--font); color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; }
.bar-tools .tool.more > svg:last-child { width: 14px; height: 14px; color: var(--ink-4); }
.bar-tools .tool:active { background: var(--line-2); }
.actionbar:has(.bar-tools) { gap: 10px; padding-bottom: max(12px, calc(var(--sab) + 4px)); }
@media (max-height: 700px) {
  .scr.review { gap: 10px; } .hero { padding: 14px; gap: 12px; } .hero-f.amt .hero-amt { font-size: 30px; } .thumb { width: 56px; height: 70px; }
  .details .frow { min-height: 50px; } .bar-tools { height: 44px; } .actionbar:has(.bar-tools) { gap: 8px; }
}
.hero-id .hero-f.flag, .hero-id .hero-f.need { padding: 1px 6px; margin-left: -6px; width: calc(100% + 6px); }
@media (max-height: 899px) { .details .frow.kd-x { display: none; } }
