:root {
  --brand: #0d6b5f; --brand-2: #10a37f; --brand-ink: #063b34; --accent: #f5b301;
  --bg: #f3f6f5; --surface: #ffffff; --surface-2: #f6f8f8; --line: #e3e9e7; --ink: #10201d; --muted: #63736f; --faint: #94a29e;
  --pos: #0f9d58; --pos-bg: #e5f6ec; --neg: #d93a3a; --neg-bg: #fdeaea; --warn-bg: #fff6dc;
  --radius: 18px; --radius-sm: 12px; --shadow: 0 1px 2px rgba(16,32,29,.06), 0 6px 20px rgba(16,32,29,.06);
  --shadow-lg: 0 10px 40px rgba(16,32,29,.18); --g: var(--brand);
  color-scheme: light;
}
[data-theme="dark"] {
  --bg: #0c1312; --surface: #151f1d; --surface-2: #1b2725; --line: #26342f; --ink: #e8f0ee; --muted: #9db0ab; --faint: #6c7f7a;
  --pos: #3ccf8e; --pos-bg: #12332a; --neg: #ff7070; --neg-bg: #3a1c1c; --warn-bg: #3a3214; --brand-ink: #c9f2e8;
  --shadow: 0 1px 2px rgba(0,0,0,.4); --shadow-lg: 0 10px 40px rgba(0,0,0,.6);
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body { font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; background: var(--bg); color: var(--ink); -webkit-font-smoothing: antialiased; overscroll-behavior-y: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
a { color: var(--brand-2); }
.hidden { display: none !important; }
#app { max-width: 560px; margin: 0 auto; min-height: 100%; position: relative; padding-bottom: 110px; }
.num { font-variant-numeric: tabular-nums; }
.pos { color: var(--pos); } .neg { color: var(--neg); } .muted { color: var(--muted); } .small { font-size: 13px; }

/* top bars */
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 8px; padding: calc(10px + env(safe-area-inset-top)) 12px 10px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(12px); }
.topbar h1 { font-size: 18px; margin: 0; flex: 1; font-weight: 750; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand { display: flex; align-items: center; gap: 10px; flex: 1; }
.brand img { width: 34px; height: 34px; border-radius: 10px; }
.brand b { font-size: 19px; letter-spacing: -.02em; } .brand b span { color: var(--brand-2); }
.icon-btn { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; color: var(--ink); flex: none; }
.icon-btn:active { background: var(--line); }
.icon-btn svg, .btn svg, .row-ic svg { width: 22px; height: 22px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; padding: 0 18px; border-radius: 14px; font-weight: 650; background: var(--surface-2); color: var(--ink); border: 1px solid var(--line); }
.btn.primary { background: var(--brand); color: #fff; border-color: transparent; }
.btn.danger { color: var(--neg); }
.btn.sm { height: 36px; padding: 0 12px; border-radius: 10px; font-size: 14px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .5; }
.btn:active { transform: scale(.98); }
.link-btn { color: var(--brand-2); font-weight: 650; padding: 6px 4px; }

/* cards */
.wrap { padding: 4px 14px 0; }
.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; margin-bottom: 12px; }
.card h3, .section-title { margin: 0 0 10px; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
.section-title { margin: 18px 4px 8px; }
.hero { background: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%); color: #fff; border-radius: 22px; padding: 18px; margin-bottom: 14px; box-shadow: 0 10px 30px rgba(13,107,95,.25); }
.hero .lbl { opacity: .85; font-size: 13px; }
.hero .big { font-size: 28px; font-weight: 800; letter-spacing: -.02em; }
.hero .split2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.hero .pill { background: rgba(255,255,255,.16); border-radius: 14px; padding: 10px 12px; }
.hero .pill b { display: block; font-size: 17px; }

/* group list */
.glist { display: grid; gap: 10px; }
.gcard { display: flex; align-items: center; gap: 14px; background: var(--surface); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); text-align: left; width: 100%; position: relative; overflow: hidden; }
.gcard::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--g); }
.gav { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; font-size: 26px; flex: none; background: color-mix(in srgb, var(--g) 18%, var(--surface)); }
.gcard .t { flex: 1; min-width: 0; }
.gcard .t b { display: block; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gcard .t span { color: var(--muted); font-size: 13px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gcard .r { text-align: right; font-size: 13px; }
.gcard .r b { display: block; font-size: 15px; }
.chip-bal { display: inline-block; padding: 3px 9px; border-radius: 99px; font-weight: 700; font-size: 12px; }
.chip-bal.pos { background: var(--pos-bg); } .chip-bal.neg { background: var(--neg-bg); } .chip-bal.zero { background: var(--surface-2); color: var(--muted); }

/* group header */
.ghead { background: linear-gradient(160deg, var(--g) 0%, color-mix(in srgb, var(--g) 70%, #000) 100%); color: #fff; padding: calc(8px + env(safe-area-inset-top)) 12px 18px; border-radius: 0 0 26px 26px; }
.ghead .gbar { display: flex; align-items: center; gap: 4px; }
.ghead .icon-btn { color: #fff; }
.ghead .icon-btn:active { background: rgba(255,255,255,.15); }
.ghead .title { flex: 1; display: flex; align-items: center; gap: 10px; min-width: 0; }
.ghead .title .e { font-size: 26px; }
.ghead .title b { font-size: 19px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ghead .totals { display: flex; justify-content: space-between; align-items: flex-end; padding: 10px 8px 0; }
.ghead .totals .big { font-size: 30px; font-weight: 800; letter-spacing: -.02em; }
.ghead .totals .lbl { font-size: 12px; opacity: .8; text-transform: uppercase; letter-spacing: .06em; }
.mebal { background: rgba(255,255,255,.16); padding: 8px 12px; border-radius: 14px; text-align: right; font-size: 12px; }
.mebal b { display: block; font-size: 16px; }
.tabs { position: sticky; top: 0; z-index: 15; display: flex; gap: 4px; padding: 10px 12px; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(10px); }
.tabs button { flex: 1; height: 40px; border-radius: 12px; font-weight: 650; color: var(--muted); font-size: 14px; }
.tabs button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }

/* transactions */
.search { display: flex; gap: 8px; margin-bottom: 8px; }
.search .in { flex: 1; display: flex; align-items: center; gap: 8px; background: var(--surface); border-radius: 14px; padding: 0 12px; height: 44px; box-shadow: var(--shadow); }
.search .in svg { width: 18px; color: var(--faint); }
.search input { border: 0; outline: 0; background: none; flex: 1; min-width: 0; height: 100%; }
.search .icon-btn { background: var(--surface); box-shadow: var(--shadow); border-radius: 14px; position: relative; }
.dot { position: absolute; top: 8px; right: 8px; width: 8px; height: 8px; background: var(--brand-2); border-radius: 50%; }
.fchips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.fchip { background: color-mix(in srgb, var(--brand-2) 14%, var(--surface)); color: var(--brand-ink); border-radius: 99px; padding: 5px 10px; font-size: 13px; font-weight: 600; }
.day { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin: 14px 6px 6px; display: flex; justify-content: space-between; }
.txl { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.tx { display: flex; align-items: center; gap: 12px; padding: 12px 14px; width: 100%; text-align: left; border-bottom: 1px solid var(--line); user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.tx:last-child { border-bottom: 0; }
.tx:active { background: var(--surface-2); }
.cic { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; font-size: 21px; background: var(--surface-2); flex: none; }
.cic.transfer { background: color-mix(in srgb, var(--brand-2) 16%, var(--surface)); }
.cic.income { background: var(--pos-bg); }
.tx .m { flex: 1; min-width: 0; }
.tx .m b { display: block; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx .m span { font-size: 13px; color: var(--muted); }
.tx .a { text-align: right; flex: none; }
.tx .a b { display: block; font-weight: 700; }
.tx .a span { font-size: 12px; font-weight: 600; }
.empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty .ill { font-size: 56px; margin-bottom: 8px; }
.empty h2 { color: var(--ink); margin: 0 0 6px; font-size: 20px; }
.empty .btns { display: flex; gap: 8px; justify-content: center; margin-top: 18px; flex-wrap: wrap; }

/* balances */
.bubbles { width: 100%; height: auto; display: block; }
.bubbles text { font-weight: 700; pointer-events: none; }
.bubble { cursor: pointer; transition: transform .2s; }
.next { display: flex; gap: 12px; align-items: center; background: var(--warn-bg); border-radius: 16px; padding: 12px 14px; margin-bottom: 12px; }
.next .e { font-size: 24px; }
.next b { font-weight: 700; }
.brow { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.brow:last-child { border-bottom: 0; }
.av { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 750; flex: none; font-size: 15px; }
.av.sm { width: 28px; height: 28px; font-size: 12px; }
.brow .m { flex: 1; min-width: 0; }
.brow .m b { display: block; }
.brow .m span { font-size: 12px; color: var(--muted); }
.bar { height: 6px; border-radius: 6px; background: var(--surface-2); margin-top: 6px; position: relative; overflow: hidden; }
.bar i { position: absolute; top: 0; bottom: 0; border-radius: 6px; }
.brow .v { text-align: right; font-weight: 750; }
.brow .v span { display: block; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.debt { display: flex; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.debt:last-child { border-bottom: 0; }
.debt .who { flex: 1; display: flex; align-items: center; gap: 8px; min-width: 0; }
.debt .who .arr { color: var(--faint); }
.debt .amt { font-weight: 800; font-size: 16px; width: 100%; padding-left: 2px; display: flex; justify-content: space-between; align-items: center; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 0; }
.toggle-row .m { flex: 1; } .toggle-row .m span { display: block; font-size: 13px; color: var(--muted); }
.switch { position: relative; width: 50px; height: 30px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch span { position: absolute; inset: 0; background: var(--line); border-radius: 99px; transition: .2s; }
.switch span::after { content: ""; position: absolute; left: 3px; top: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch input:checked + span { background: var(--brand-2); }
.switch input:checked + span::after { transform: translateX(20px); }

/* stats */
.seg { display: flex; background: var(--surface-2); border-radius: 12px; padding: 3px; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.seg button { flex: 1; padding: 8px 10px; border-radius: 10px; font-weight: 650; font-size: 13px; color: var(--muted); white-space: nowrap; }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0; }
.kpi { background: var(--surface); border-radius: 16px; padding: 12px; box-shadow: var(--shadow); }
.kpi span { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; font-weight: 700; }
.kpi b { display: block; font-size: 15px; margin-top: 2px; }
.donut-wrap { display: flex; gap: 16px; align-items: center; }
.donut-wrap svg { width: 140px; height: 140px; flex: none; }
.legend { flex: 1; display: grid; gap: 6px; min-width: 0; font-size: 13px; }
.legend div { display: flex; align-items: center; gap: 8px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.legend span { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hbar { margin: 10px 0; }
.hbar .l { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 4px; }
.hbar .tr { height: 10px; background: var(--surface-2); border-radius: 6px; overflow: hidden; display: flex; }
.hbar .tr i { display: block; height: 100%; border-radius: 6px; }
.cols { display: flex; align-items: flex-end; gap: 6px; height: 150px; padding-top: 10px; }
.cols .c { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; min-width: 0; }
.cols .c i { width: 100%; max-width: 34px; background: linear-gradient(180deg, var(--brand-2), var(--brand)); border-radius: 8px 8px 3px 3px; min-height: 2px; }
.cols .c span { font-size: 10px; color: var(--muted); margin-top: 4px; white-space: nowrap; }
.cols .c em { font-size: 9px; color: var(--muted); font-style: normal; margin-bottom: 2px; white-space: nowrap; }

/* FAB */
.fab { position: fixed; right: max(18px, calc(50% - 262px)); bottom: calc(22px + env(safe-area-inset-bottom)); z-index: 30; height: 58px; padding: 0 22px 0 18px; border-radius: 20px; background: var(--brand); color: #fff; display: flex; align-items: center; gap: 8px; font-weight: 700; box-shadow: 0 10px 28px rgba(13,107,95,.45); font-size: 16px; }
.fab svg { width: 24px; height: 24px; }
.fab:active { transform: scale(.97); }

/* forms */
.page { padding: 0 14px 30px; }
.field { margin-bottom: 14px; }
.field > label, .lbl2 { display: block; font-size: 13px; font-weight: 650; color: var(--muted); margin: 0 2px 6px; }
.inp, select.inp, textarea.inp { width: 100%; height: 48px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface); padding: 0 14px; outline: none; }
textarea.inp { height: 84px; padding: 12px 14px; resize: vertical; }
.inp:focus { border-color: var(--brand-2); }
.inp.sm { height: 40px; border-radius: 10px; padding: 0 10px; }
.amount-box { display: flex; align-items: center; gap: 10px; background: var(--surface); border-radius: 20px; padding: 14px 14px 14px 10px; box-shadow: var(--shadow); margin-bottom: 14px; }
.amount-box select { height: 46px; border-radius: 12px; border: 0; background: var(--surface-2); font-weight: 750; padding: 0 8px; }
.amount-box input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font-size: 34px; font-weight: 800; letter-spacing: -.02em; text-align: right; }
.amount-box input::placeholder { color: var(--faint); }
.rate { background: var(--warn-bg); border-radius: 16px; padding: 12px; margin: -4px 0 14px; font-size: 14px; }
.rate .row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rate input { width: 110px; }
.type-seg { margin-bottom: 14px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chips.scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; margin: 0 -14px; padding-left: 14px; padding-right: 14px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 99px; background: var(--surface); border: 1.5px solid var(--line); font-weight: 600; font-size: 14px; white-space: nowrap; }
.chip.on { border-color: var(--brand-2); background: color-mix(in srgb, var(--brand-2) 14%, var(--surface)); color: var(--brand-ink); }
.chip .av { width: 22px; height: 22px; font-size: 10px; }
.box { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px; margin-bottom: 14px; }
.box-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.box-h b { font-size: 15px; }
.srow { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.srow:last-child { border-bottom: 0; }
.srow .ck { width: 24px; height: 24px; accent-color: var(--brand-2); flex: none; }
.srow .n { flex: 1; min-width: 0; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.srow .inp.sm { width: 96px; text-align: right; }
.srow .out { width: 96px; text-align: right; font-weight: 700; font-size: 14px; }
.remain { margin-top: 8px; font-size: 13px; font-weight: 700; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); }
.remain.ok { color: var(--pos); background: var(--pos-bg); } .remain.bad { color: var(--neg); background: var(--neg-bg); }
.item { border: 1.5px solid var(--line); border-radius: 14px; padding: 10px; margin-bottom: 8px; }
.item .top { display: flex; gap: 8px; margin-bottom: 8px; }
.item .top .inp.sm:first-child { flex: 1; }
.item .top .inp.sm.amt { width: 100px; text-align: right; }
.item .chips .chip { padding: 5px 9px; font-size: 13px; }
.errors { background: var(--neg-bg); color: var(--neg); border-radius: 14px; padding: 10px 14px; margin-bottom: 14px; font-weight: 600; font-size: 14px; }
.errors div + div { margin-top: 4px; }
.receipt-thumb { position: relative; display: inline-block; }
.receipt-thumb img { max-width: 140px; max-height: 140px; border-radius: 12px; display: block; }
.receipt-thumb button { position: absolute; top: -8px; right: -8px; width: 28px; height: 28px; border-radius: 50%; background: var(--neg); color: #fff; font-weight: 800; }
.emoji-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; }
.emoji-grid button { aspect-ratio: 1; border-radius: 12px; font-size: 22px; background: var(--surface-2); border: 2px solid transparent; }
.emoji-grid button.on { border-color: var(--brand-2); background: color-mix(in srgb, var(--brand-2) 14%, var(--surface)); }
.colors { display: flex; gap: 8px; flex-wrap: wrap; }
.colors button { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--surface); box-shadow: 0 0 0 2px transparent; }
.colors button.on { box-shadow: 0 0 0 2px var(--ink); }
.mrow { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.mrow .inp { flex: 1; }
.mrow .w { width: 70px; text-align: center; }

/* detail */
.dhead { text-align: center; padding: 10px 0 18px; }
.dhead .cic { width: 64px; height: 64px; font-size: 32px; border-radius: 20px; margin: 0 auto 10px; }
.dhead h2 { margin: 0; font-size: 22px; }
.dhead .big { font-size: 34px; font-weight: 800; letter-spacing: -.02em; margin-top: 4px; }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.kv:last-child { border-bottom: 0; }
.kv span:first-child { color: var(--muted); }
.receipt-full { width: 100%; border-radius: 14px; display: block; }
.actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }

/* settings list */
.list { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; margin-bottom: 14px; }
.li { display: flex; align-items: center; gap: 12px; padding: 14px; width: 100%; text-align: left; border-bottom: 1px solid var(--line); }
.li:last-child { border-bottom: 0; }
.li:active { background: var(--surface-2); }
.li .row-ic { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: var(--surface-2); color: var(--brand); flex: none; font-size: 18px; }
.li .row-ic svg { width: 20px; height: 20px; }
.li .m { flex: 1; min-width: 0; } .li .m b { display: block; font-weight: 650; } .li .m span { display: block; font-size: 13px; color: var(--muted); }
.li.danger { color: var(--neg); } .li.danger .row-ic { color: var(--neg); background: var(--neg-bg); }

/* sheets, toast */
.scrim { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 50; display: flex; align-items: flex-end; justify-content: center; animation: fade .15s; }
.sheet { background: var(--surface); width: 100%; max-width: 560px; border-radius: 24px 24px 0 0; padding: 10px 16px calc(18px + env(safe-area-inset-bottom)); max-height: 88vh; overflow-y: auto; animation: up .2s ease-out; }
.sheet .grab { width: 40px; height: 5px; background: var(--line); border-radius: 9px; margin: 0 auto 12px; }
.sheet h2 { margin: 0 0 12px; font-size: 19px; }
.sheet .acts { display: flex; gap: 8px; margin-top: 16px; } .sheet .acts .btn { flex: 1; }
.sheet .opt { display: flex; align-items: center; gap: 12px; padding: 14px 6px; width: 100%; text-align: left; font-weight: 600; border-bottom: 1px solid var(--line); font-size: 16px; }
.sheet .opt:last-child { border-bottom: 0; }
.sheet .opt .e { font-size: 22px; width: 30px; text-align: center; }
.sheet .opt span { display: block; font-size: 13px; color: var(--muted); font-weight: 500; }
@keyframes up { from { transform: translateY(40px); opacity: .4; } to { transform: none; opacity: 1; } }
@keyframes fade { from { opacity: 0; } }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(96px + env(safe-area-inset-bottom)); background: #12201d; color: #fff; padding: 12px 16px; border-radius: 14px; z-index: 60; display: flex; gap: 14px; align-items: center; box-shadow: var(--shadow-lg); max-width: calc(100% - 28px); width: max-content; font-size: 14px; animation: up .2s; }
/* toast never blocks taps except on its own button */
.toast { pointer-events: none; }
.toast button { pointer-events: auto; color: #6ee7b7; font-weight: 800; text-transform: uppercase; font-size: 13px; letter-spacing: .04em; }
.code-box { width: 100%; height: 120px; font-family: ui-monospace, monospace; font-size: 11px; word-break: break-all; }
.note { font-size: 13px; color: var(--muted); padding: 0 4px; }
.install-banner { display: flex; align-items: center; gap: 12px; background: var(--surface); border-radius: 16px; padding: 12px 14px; margin-bottom: 12px; box-shadow: var(--shadow); }
.install-banner .m { flex: 1; font-size: 14px; } .install-banner b { display: block; }
#print-root { display: none; }
@media print {
  body { background: #fff; color: #000; }
  #app, .toast, .scrim, .fab, deed-badge, [class*="deed"] { display: none !important; }
  #print-root { display: block; font-size: 12px; padding: 0; }
  #print-root h1 { font-size: 20px; margin: 0 0 4px; } #print-root h2 { font-size: 15px; margin: 18px 0 6px; }
  #print-root table { width: 100%; border-collapse: collapse; }
  #print-root th, #print-root td { border-bottom: 1px solid #ccc; padding: 5px 4px; text-align: left; vertical-align: top; }
  #print-root td.n, #print-root th.n { text-align: right; white-space: nowrap; }
}

/* web test host: lift floating controls above the host badge */
body.hosted .fab { bottom: calc(74px + env(safe-area-inset-bottom)); }
body.hosted .toast { bottom: calc(146px + env(safe-area-inset-bottom)); }
body.hosted #app { padding-bottom: 160px; }
