:root {
  --night: #161927;
  --panel: #1f2335;
  --raised: #292e45;
  --line: #31374f;
  --chalk: #eef0f7;
  --fog: #8d93ab;
  --porch: #ffbf4d;
  --porch-ink: #2b1d00;
  --up: #4fd18b;
  --down: #ff7c7c;
  --warn: #ffbf4d;
  --r-lg: 22px;
  --r-md: 14px;
  --r-sm: 10px;
  --font: ui-rounded, "SF Pro Rounded", "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--night); color: var(--chalk); font: 15px/1.45 var(--font); -webkit-font-smoothing: antialiased; }
body { min-height: 100vh; display: flex; justify-content: center; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--porch); outline-offset: 2px; }
.hide { display: none !important; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--fog); }
.small { font-size: 13px; }
.up { color: var(--up); } .down { color: var(--down); } .warn { color: var(--warn); } .bad { color: var(--down); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; word-break: break-all; }

/* frame */
#app { width: 100%; max-width: 420px; min-height: 100vh; position: relative; display: flex; flex-direction: column; padding-top: env(safe-area-inset-top); }
/* Installed to the home screen: feel like an app (no rubber-band pull, no grey tap flash). */
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
@media (display-mode: standalone) { html, body { overscroll-behavior: none; } }
.screen { flex: 1; padding: 18px 18px 110px; }
.center { display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; min-height: 100vh; padding: 32px 24px; }
.center .stack { width: 100%; }

/* type */
h1 { font-size: 26px; line-height: 1.15; margin: 0 0 8px; font-weight: 800; letter-spacing: -.3px; }
h2 { font-size: 17px; margin: 0 0 10px; font-weight: 700; }
h3 { font-size: 15px; margin: 18px 0 8px; font-weight: 700; }
p { margin: 0 0 12px; }

/* controls */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 999px; padding: 14px 20px; font-weight: 700; cursor: pointer; background: var(--porch); color: var(--porch-ink); width: 100%; transition: transform .08s; }
.btn:active { transform: scale(.98); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn.quiet { background: var(--raised); color: var(--chalk); }
.btn.text { background: none; color: var(--fog); width: auto; padding: 8px 10px; }
.btn.danger { background: transparent; color: var(--down); border: 1px solid var(--line); }
.btn.small { padding: 8px 14px; font-size: 13.5px; width: auto; }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.field { display: block; margin: 0 0 12px; text-align: left; }
.field span { display: block; font-size: 13px; color: var(--fog); margin: 0 0 6px; }
.input, select.input, textarea.input { width: 100%; padding: 13px 14px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--panel); color: var(--chalk); outline: none; }
.input:focus { border-color: var(--porch); }
textarea.input { min-height: 96px; font-family: ui-monospace, Menlo, monospace; font-size: 12.5px; }
.err { color: var(--down); font-size: 13.5px; min-height: 18px; margin: 4px 0 10px; text-align: left; }
.row { display: flex; align-items: center; gap: 12px; }
.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { border: 1px solid var(--line); background: var(--panel); border-radius: 999px; padding: 7px 14px; font-size: 13.5px; cursor: pointer; }
.chip.on { background: var(--chalk); color: var(--night); border-color: var(--chalk); }
.check { display: flex; gap: 10px; align-items: flex-start; text-align: left; font-size: 14px; margin: 12px 0; }
.check input { margin-top: 3px; accent-color: var(--porch); width: 18px; height: 18px; }
.switch { position: relative; width: 48px; height: 28px; flex: none; display: inline-block; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch span { position: absolute; inset: 0; background: var(--raised); border-radius: 999px; cursor: pointer; transition: .15s; }
.switch span::before { content: ""; position: absolute; width: 22px; height: 22px; left: 3px; top: 3px; background: var(--fog); border-radius: 50%; transition: .15s; }
.switch input:checked + span { background: var(--porch); }
.switch input:checked + span::before { transform: translateX(20px); background: var(--porch-ink); }
.switch input:focus-visible + span { outline: 2px solid var(--porch); outline-offset: 2px; }

/* brand mark */
.mark { width: 64px; height: 64px; margin: 0 auto 18px; color: var(--porch); }
.mark svg { width: 100%; height: 100%; }

/* top bar */
.topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.acct { display: inline-flex; align-items: center; gap: 8px; background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px 6px 6px; cursor: pointer; font-weight: 700; }
.acct .dot { width: 26px; height: 26px; border-radius: 50%; background: var(--porch); color: var(--porch-ink); display: grid; place-items: center; }
.acct .dot svg { width: 16px; height: 16px; }
.iconbtn { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--panel); color: var(--chalk); display: grid; place-items: center; cursor: pointer; }
.iconbtn svg { width: 20px; height: 20px; }

/* balance hero */
.hero { text-align: center; padding: 10px 0 22px; }
.hero .total { font-size: 46px; font-weight: 800; letter-spacing: -1.2px; line-height: 1.05; }
.hero .chg { margin-top: 6px; font-weight: 600; }
.actions { display: flex; justify-content: center; gap: 22px; margin: 4px 0 24px; }
.action { display: flex; flex-direction: column; align-items: center; gap: 8px; background: none; border: 0; cursor: pointer; font-size: 13px; color: var(--chalk); width: 76px; }
.action .ring { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--panel); border: 1px solid var(--line); }
.action .ring svg { width: 24px; height: 24px; }
.action.primary .ring { background: var(--porch); color: var(--porch-ink); border-color: var(--porch); }

/* banners */
.banner { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px 14px; margin-bottom: 14px; font-size: 14px; }
.banner.warn { border-color: rgba(255,191,77,.45); color: var(--chalk); }
.banner.bad { border-color: rgba(255,124,124,.45); }

/* token list */
.tokens { display: flex; flex-direction: column; gap: 4px; }
.token { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: var(--r-md); background: var(--panel); border: 0; width: 100%; text-align: left; cursor: pointer; }
.token:hover { background: var(--raised); }
.coin { width: 42px; height: 42px; flex: none; }
.coin.lg { width: 64px; height: 64px; }
.token .name { font-weight: 700; }
.token .name, .token .sub, .token .val, .token .chgline { display: block; }
.token .sub { font-size: 13px; color: var(--fog); }
.token .right { margin-left: auto; text-align: right; }
.token .val { font-weight: 700; }
.tag { display: inline-block; font-size: 11.5px; padding: 1px 7px; border-radius: 6px; background: var(--raised); color: var(--fog); margin-left: 6px; vertical-align: 1px; }
.tag.warn { color: var(--warn); }
.tag.ok { color: var(--up); }

/* cards / lists */
.card { background: var(--panel); border-radius: var(--r-lg); padding: 16px; margin-bottom: 14px; }
.list { display: flex; flex-direction: column; }
.li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.li:last-child { border-bottom: 0; }
.kv { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.kv:last-child { border-bottom: 0; }
.kv .k { color: var(--fog); flex: none; }
.kv .v { text-align: right; min-width: 0; }

/* bottom nav */
.tabbar { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 420px; display: flex; background: rgba(22,25,39,.94); backdrop-filter: blur(12px); border-top: 1px solid var(--line); padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); z-index: 5; }
.tabbar button { flex: 1; background: none; border: 0; color: var(--fog); display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11.5px; padding: 6px 0; cursor: pointer; }
.tabbar button svg { width: 22px; height: 22px; }
.tabbar button.on { color: var(--porch); }

/* pages & sheets */
.page { position: fixed; inset: 0; padding-top: env(safe-area-inset-top); background: var(--night); z-index: 10; overflow-y: auto; display: flex; justify-content: center; animation: slidein .22s ease-out; }
.page > .inner { width: 100%; max-width: 420px; padding: 18px 18px 120px; }
@keyframes slidein { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.scrim { position: fixed; inset: 0; background: rgba(8,9,16,.6); z-index: 20; display: flex; align-items: flex-end; justify-content: center; }
.sheet { width: 100%; max-width: 420px; max-height: 92vh; overflow-y: auto; background: var(--panel); border-radius: 26px 26px 0 0; padding: 10px 18px calc(28px + env(safe-area-inset-bottom)); animation: sheetup .22s ease-out; }
.sheet .grab { width: 40px; height: 5px; border-radius: 3px; background: var(--line); margin: 0 auto 14px; }
@keyframes sheetup { from { transform: translateY(40px); } to { transform: none; } }
.sheet .card, .sheet .input { background: var(--night); }

/* token detail */
.dhead { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.price { font-size: 34px; font-weight: 800; letter-spacing: -.6px; }
.spark { width: 100%; height: 120px; display: block; margin: 12px 0 16px; }
.spark path.line { fill: none; stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }

/* amount entry */
.amount { text-align: center; padding: 18px 0 8px; }
.amount input { background: none; border: 0; text-align: center; font-size: 44px; font-weight: 800; width: 100%; outline: none; color: var(--chalk); letter-spacing: -1px; }
.amount input::placeholder { color: var(--line); }
.amount .usd { color: var(--fog); font-weight: 600; }
.wallet-pick { display: flex; flex-direction: column; gap: 8px; }
.wallet-opt { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--night); cursor: pointer; text-align: left; width: 100%; }
.wallet-opt.on { border-color: var(--porch); }
.wallet-opt:disabled { opacity: .5; cursor: not-allowed; }
.wicon { width: 34px; height: 34px; border-radius: 50%; background: var(--raised); display: grid; place-items: center; flex: none; color: var(--porch); }
.wicon.done { background: var(--porch); color: var(--porch-ink); }
a.link { color: var(--porch); }
.wicon svg { width: 18px; height: 18px; }

.li select.input, .li input.input { width: 112px; flex: none; padding: 9px 10px; }
.li .switch { margin-left: 8px; }

/* exchanges */
.exgrid { display: grid; gap: 12px; }
.excard { margin: 0; }
.excard h2 { margin: 0; }
.exdot { width: 26px; height: 26px; flex: none; }
.err ul.why { margin: 8px 0 8px 18px; padding: 0; color: var(--chalk); }
.err ul.why li { margin: 6px 0; }
.err ul.why b { color: var(--down); }
.lede { font-size: 19px; color: var(--porch); font-weight: 700; margin: -2px 0 12px; }

/* recovery key */
.reckey { font-family: ui-monospace, Menlo, monospace; font-size: 20px; letter-spacing: 1px; line-height: 1.7; background: var(--panel); border: 1px dashed var(--porch); border-radius: var(--r-md); padding: 16px; word-spacing: 6px; margin: 14px 0; user-select: all; }

/* sent-home moment: the door lights up */
.home-anim { width: 120px; height: 120px; margin: 12px auto 6px; }
.home-anim .house { fill: none; stroke: var(--chalk); stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; stroke-dasharray: 160; stroke-dashoffset: 160; animation: draw .7s ease-out forwards; }
.home-anim .house { stroke: var(--porch); stroke-width: 7; stroke-dasharray: 300; stroke-dashoffset: 300; }
.home-anim .door { fill: var(--chalk); opacity: 0; transform-origin: 60px 60px; animation: glow .45s .7s cubic-bezier(.3,1.6,.5,1) forwards; }
.home-anim .halo { fill: var(--porch); opacity: 0; animation: halo 1.3s .8s ease-out forwards; transform-origin: 60px 60px; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes glow { from { opacity: 0; transform: scale(.2); } to { opacity: 1; transform: none; } }
@keyframes halo { 0% { opacity: .35; transform: scale(.6); } 100% { opacity: 0; transform: scale(1.6); } }

/* feed */
.feed .li { align-items: flex-start; }
.feed .pip { width: 9px; height: 9px; border-radius: 50%; margin-top: 7px; flex: none; background: var(--fog); }
.feed .sent .pip { background: var(--up); } .feed .fill .pip { background: #7fa8ff; } .feed .error .pip { background: var(--down); } .feed .wait .pip { background: var(--warn); }

.spinner { width: 18px; height: 18px; border: 2.5px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; display: inline-block; vertical-align: -4px; }
@keyframes spin { to { transform: rotate(360deg); } }
.toast { position: fixed; top: calc(14px + env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); background: var(--chalk); color: var(--night); padding: 10px 16px; border-radius: 999px; font-size: 14px; font-weight: 600; z-index: 40; max-width: 90vw; }
.steps { padding-left: 20px; margin: 6px 0 12px; color: var(--fog); font-size: 14px; } .steps li { margin: 4px 0; } .steps b { color: var(--chalk); }
details summary { cursor: pointer; color: var(--fog); margin: 4px 0 8px; }
.gap { height: 12px; }

/* ---------- shared pieces for wide layouts ---------- */
.brandrow, .navfoot { display: none; }
.wgrid { display: block; }
.detail { display: none; }
.token.sel { background: var(--raised); box-shadow: inset 3px 0 0 var(--porch); }

/* ---------- desktop ---------- */
@media (min-width: 960px) {
  body { display: block; }
  #app { max-width: none; min-height: 100vh; }
  .screen { margin-left: 236px; padding: 30px 40px 60px; max-width: 1240px; }
  .screen > h1 { font-size: 30px; margin-bottom: 18px; }

  /* bottom tab bar becomes a left sidebar */
  .tabbar { left: 0; top: 0; bottom: 0; transform: none; width: 236px; max-width: none; flex-direction: column; gap: 4px; padding: 22px 14px; border-top: 0; border-right: 1px solid var(--line); background: var(--night); backdrop-filter: none; }
  .tabbar .brandrow { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; padding: 0 10px 22px; letter-spacing: -.2px; }
  .tabbar .brandrow .bm { width: 30px; height: 30px; color: var(--porch); display: block; }
  .tabbar .brandrow .bm svg { width: 100%; height: 100%; }
  .tabbar button { flex: none; flex-direction: row; gap: 12px; font-size: 15px; padding: 11px 12px; border-radius: var(--r-md); justify-content: flex-start; }
  .tabbar button:hover { background: var(--panel); color: var(--chalk); }
  .tabbar button.on { background: var(--panel); color: var(--porch); }
  .tabbar .navfoot { display: block; margin-top: auto; padding: 10px 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

  /* wallet: list on the left, the selected coin on the right */
  .wgrid { display: grid; grid-template-columns: minmax(360px, 440px) minmax(0, 1fr); gap: 36px; align-items: start; }
  .detail { display: block; position: sticky; top: 24px; background: var(--panel); border-radius: var(--r-lg); padding: 22px 24px; min-height: 480px; }
  .detail .card { background: var(--night); }
  .detail .dhead h2 { font-size: 22px; margin: 0; }
  .detail .spark { height: 190px; }
  .hero { text-align: left; padding-top: 4px; }
  .hero .total { font-size: 52px; }
  .actions { justify-content: flex-start; gap: 14px; }
  .topbar { max-width: none; }

  /* two-column pages */
  .cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; align-items: start; }
  .cols.narrow-left { grid-template-columns: minmax(300px, 380px) minmax(0, 1fr); }
  .col > h3:first-child { margin-top: 0; }

  /* sheets become centered windows */
  .scrim { align-items: center; }
  .sheet { border-radius: 24px; max-width: 480px; max-height: 86vh; padding: 22px 24px 26px; box-shadow: 0 24px 80px rgba(0,0,0,.5); animation: pop .18s ease-out; }
  .sheet .grab { display: none; }
  @keyframes pop { from { transform: scale(.97); opacity: 0; } to { transform: none; opacity: 1; } }

  /* first-run screens */
  .screen.solo { margin: 0 auto; max-width: 620px; }
  .center .stack { max-width: 420px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0ms !important; transition: none !important; }
  .home-anim .house { stroke-dashoffset: 0; } .home-anim .door { opacity: 1; }
}

/* Check connection */
.excard .row.gap { gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.checksum { margin: 14px 0 6px; font-weight: 700; }
.checksum.good { color: var(--up); } .checksum.warn { color: var(--porch); } .checksum.bad { color: var(--down); }
ul.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
ul.checks li { display: grid; grid-template-columns: 14px 1fr; column-gap: 10px; align-items: start; font-size: 14px; }
ul.checks li::before { content: ""; width: 10px; height: 10px; border-radius: 50%; margin-top: 5px; grid-row: span 2; }
ul.checks li.good::before { background: var(--up); }
ul.checks li.warn::before { background: var(--porch); }
ul.checks li.bad::before { background: var(--down); }
ul.checks li span { color: var(--fog); grid-column: 2; }
ul.checks li.bad span { color: var(--chalk); }

/* Self-custody bar */
.custody { margin-top: 4px; }
.custody .row { gap: 12px; flex-wrap: wrap; }
.cbar { height: 10px; border-radius: 99px; background: var(--raised); overflow: hidden; margin-top: 10px; }
.cbar span { display: block; height: 100%; border-radius: 99px; background: var(--porch); }
h3.sect { margin: 22px 0 8px; }
.li .r { text-align: right; }
/* Emergency stop */
.card.stop { border: 1px solid rgba(255, 124, 124, .35); }
.card.stop h2 { color: var(--down); }
label.check { display: flex; gap: 10px; align-items: flex-start; margin: 12px 0; font-size: 14px; }
label.check input { margin-top: 3px; accent-color: var(--down); }
.tag.bad { color: var(--down); background: rgba(255, 124, 124, .12); }

/* Test send: fixed amount */
.amount .fixed { font-size: 44px; font-weight: 700; letter-spacing: -0.02em; text-align: center; min-height: 56px; }
.note { margin: 4px 0 10px; }
.note p { margin: 6px 0; }

/* ---------- 4.4: wallet polish ---------- */
.row.tight { gap: 8px; }
.iconbtn.sm { width: 30px; height: 30px; font-size: 20px; line-height: 1; }
/* One total, with the home / exchange split under it */
.totalrow { display: inline-flex; align-items: center; gap: 10px; }
.iconbtn.eye { width: 34px; height: 34px; background: transparent; color: var(--fog); }
.iconbtn.eye:hover { color: var(--chalk); background: var(--panel); }
.split { max-width: 340px; margin: 16px auto 0; }
.split .cbar { margin-top: 0; height: 8px; background: var(--raised); }
.splitrow { display: flex; justify-content: space-between; gap: 12px; margin-top: 8px; color: var(--fog); flex-wrap: wrap; }
.splitrow b { color: var(--chalk); }
.sw { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }
.sw.home { background: var(--porch); } .sw.ex { background: var(--raised); box-shadow: inset 0 0 0 1px var(--fog); }
.upd { display: block; margin: 12px auto 0; background: none; border: 0; color: var(--fog); cursor: pointer; padding: 4px 8px; border-radius: 8px; }
.upd:hover { color: var(--chalk); }
/* Hide balances: amounts on the main screens blur until you tap the eye */
.privacy .screen .num { filter: blur(9px); transition: filter .2s; user-select: none; }
.privacy .screen .num:is(.cnt) { filter: none; }
/* Per-coin home share */
.tshare { display: flex; align-items: center; gap: 8px; margin-top: 6px; color: var(--fog); }
.tbar { flex: 0 0 64px; height: 4px; border-radius: 99px; background: var(--raised); overflow: hidden; }
.tbar i { display: block; height: 100%; width: 0; background: var(--porch); border-radius: 99px; }
/* Pull to refresh */
.ptr { height: 0; overflow: hidden; display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--fog); font-size: 13px; transition: height .18s; }
.ptr svg { width: 18px; height: 18px; transition: transform .2s; }
.ptr.ready svg { transform: rotate(180deg); color: var(--porch); }
.ptr.busy svg { animation: spin .8s linear infinite; }
/* Loading placeholders */
.skel { background: linear-gradient(90deg, var(--panel) 0%, var(--raised) 50%, var(--panel) 100%); background-size: 200% 100%; animation: shimmer 1.3s ease-in-out infinite; border-radius: var(--r-md); }
.skel.total-s { width: 220px; height: 48px; margin: 0 auto; border-radius: 12px; }
.skel.line-s { width: 160px; height: 14px; margin: 12px auto 0; border-radius: 99px; }
.skel.act-s { width: 56px; height: 56px; border-radius: 50%; }
.skel.row { height: 64px; margin-bottom: 10px; }
.skel.card-s { height: 180px; border-radius: var(--r-lg); }
.skel-list .skel.row:last-child { margin-bottom: 0; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
/* Guided start */
.card.guide h2 { margin: 0; }
.gdots { display: flex; gap: 6px; margin: 12px 0 14px; }
.gdots i { flex: 1; height: 4px; border-radius: 99px; background: var(--raised); }
.gdots i.done { background: var(--up); } .gdots i.now { background: var(--porch); }
.gsteps { display: grid; gap: 10px; }
.gstep { display: flex; align-items: center; gap: 12px; color: var(--fog); font-size: 14px; }
.gstep .gi { flex: 0 0 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800; background: var(--raised); }
.gstep .gi svg { width: 14px; height: 14px; }
.gstep.done .gi { background: rgba(79, 209, 139, .16); color: var(--up); }
.gstep.now { color: var(--chalk); background: var(--raised); border-radius: var(--r-md); padding: 12px; }
.gstep.now .gi { background: var(--porch); color: var(--porch-ink); }
.stepof { margin: 0 0 4px; }
/* Alerts: bell, badges, banner, list */
.bellbtn { position: relative; }
.bellbtn[data-count]:not([data-count=""])::after { content: attr(data-count); position: absolute; top: -2px; right: -2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--porch); color: var(--porch-ink); font-size: 11px; font-weight: 800; display: grid; place-items: center; box-sizing: border-box; }
.tabbar button { position: relative; }
.tabbar button.badge::after { content: "✓"; position: absolute; top: 2px; left: calc(50% + 6px); width: 16px; height: 16px; border-radius: 50%; background: var(--up); color: var(--night); font-size: 10px; font-weight: 900; display: grid; place-items: center; }
.cbanner { display: flex; gap: 12px; align-items: flex-start; background: rgba(79, 209, 139, .1); border: 1px solid rgba(79, 209, 139, .35); border-radius: var(--r-md); padding: 12px; margin-bottom: 14px; }
.cbanner .ck { flex: 0 0 28px; height: 28px; border-radius: 50%; background: var(--up); color: var(--night); display: grid; place-items: center; }
.cbanner .ck svg { width: 16px; height: 16px; }
.li.alert { align-items: flex-start; }
.li.alert.unread b { color: var(--porch); }
.kdot { flex: 0 0 8px; height: 8px; border-radius: 50%; background: var(--fog); margin-top: 7px; }
.kdot.good { background: var(--up); } .kdot.bad { background: var(--down); }
h3.day { margin: 18px 0 8px; font-size: 13px; color: var(--fog); font-weight: 700; }
h2.sect2 { margin: 22px 0 4px; font-size: 18px; }
.card.tight { padding-top: 6px; padding-bottom: 6px; }
.chips.filters { margin-bottom: 4px; }
.chip .cnt { display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 4px; border-radius: 99px; background: var(--raised); font-size: 11.5px; }
.chip.on .cnt { background: rgba(22, 25, 39, .15); }
/* Live arrival after a send */
.home-anim.travel .arc { fill: none; stroke: var(--porch); stroke-width: 7; stroke-linecap: round; stroke-dasharray: 300; stroke-dashoffset: 90; transform-origin: 60px 60px; animation: orbit 2.4s linear infinite; }
.home-anim.travel .dot { fill: var(--raised); }
@keyframes orbit { to { transform: rotate(360deg); } }
ol.track { list-style: none; padding: 0; margin: 18px auto 6px; text-align: left; max-width: 320px; display: grid; gap: 0; }
ol.track li { display: grid; grid-template-columns: 30px 1fr; gap: 12px; align-items: start; color: var(--fog); position: relative; padding-bottom: 16px; }
ol.track li:not(:last-child)::before { content: ""; position: absolute; left: 14px; top: 28px; bottom: 2px; width: 2px; background: var(--raised); }
ol.track li.done:not(:last-child)::before { background: var(--up); }
ol.track .ti { width: 28px; height: 28px; border-radius: 50%; background: var(--raised); display: grid; place-items: center; font-weight: 800; }
ol.track .ti svg { width: 15px; height: 15px; }
ol.track .ti .spinner { width: 14px; height: 14px; border-width: 2px; }
ol.track li.done { color: var(--chalk); } ol.track li.done .ti { background: var(--up); color: var(--night); }
ol.track li.now { color: var(--chalk); } ol.track li.now .ti { color: var(--porch); }
ol.track li.bad { color: var(--down); } ol.track li.bad .ti { background: rgba(255, 124, 124, .16); }
@media (min-width: 960px) {
  .split { margin-left: 0; }
  .upd { margin-left: 0; }
  .tabbar button.badge::after { left: 26px; top: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  .skel, .home-anim.travel .arc, .ptr.busy svg { animation: none; }
}
/* split: one centered line on phones, label + amount kept together */
.splitrow { justify-content: center; gap: 6px 18px; }
.splitrow > span { white-space: nowrap; }
@media (min-width: 960px) { .splitrow { justify-content: flex-start; } }
/* guided step: button drops under the text on narrow screens */
.gstep.now { flex-wrap: wrap; }
.gstep.now .grow { flex: 1 1 180px; }
@media (max-width: 420px) { .gstep.now .btn { flex: 1 0 100%; margin-left: 38px; } }

/* radar */
.gauge { height: 8px; border-radius: 99px; background: var(--raised); overflow: hidden; margin: 12px 0 6px; }
.gauge span { display: block; height: 100%; border-radius: 99px; background: var(--up); transition: width .4s; }
.radar.lv-watch .gauge span { background: var(--warn); }
.radar.lv-danger .gauge span { background: var(--down); }
.radar.lv-danger { box-shadow: inset 0 0 0 1px rgba(255,124,124,.45); }
.rspark { width: 100%; height: 28px; display: block; margin: 4px 0 8px; }
.rspark polyline { fill: none; stroke: var(--fog); stroke-width: 1.6; stroke-linejoin: round; }
.rspark .grid { stroke: var(--line); stroke-width: 1; stroke-dasharray: 2 3; }
.radar.lv-watch .rspark polyline { stroke: var(--warn); }
.radar.lv-danger .rspark polyline { stroke: var(--down); }
.signals { list-style: none; padding: 0; margin: 6px 0 8px; font-size: 14px; }
.signals li { padding: 3px 0; }
.signals .num { display: inline-block; min-width: 34px; color: var(--fog); font-size: 12.5px; }
