/* P1 Monolith. Obsidian, graphite, titanium. One home surface, everything else is a sheet. */
@font-face { font-family: "Mona Sans"; src: url("../fonts/mona-sans-latin-wdth-normal.woff2") format("woff2"); font-weight: 200 900; font-stretch: 75% 125%; font-display: swap; }
@font-face { font-family: "Fragment Mono"; src: url("../fonts/fragment-mono-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }

:root {
  --font: "Mona Sans", ui-sans-serif, system-ui, sans-serif;
  --mono: "Fragment Mono", ui-monospace, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --spring: cubic-bezier(0.3, 1.36, 0.5, 1);
  --r-slab: 30px; --r-row: 16px; --r-key: 20px;
  --pad: 22px;
  --safe-t: env(safe-area-inset-top, 0px); --safe-b: env(safe-area-inset-bottom, 0px);
}
[data-theme="dark"] {
  color-scheme: dark;
  --bg: #050506; --slab: #0c0c0e; --s1: #131316; --s2: #1a1a1e; --s3: #232328;
  --line: rgba(255, 255, 255, 0.075); --line2: rgba(255, 255, 255, 0.14); --hi: rgba(255, 255, 255, 0.07);
  --ink: #ebe8e1; --ink2: #bdbab2; --mute: #8a8882; --faint: #56554f;
  --acc: #d9cdb3; --acc-hi: #f4eddc; --acc-lo: #a3977c; --acc-ink: #15130d;
  --seal: #d9cdb3;
  --stop: #e8644c; --stop-wash: rgba(232, 100, 76, 0.12); --stop-ink: #1a0905;
  --ice: #b4cddd; --scrim: rgba(0, 0, 0, 0.66);
  --depth: 0 -1px 0 var(--hi) inset, 0 40px 90px -20px rgba(0, 0, 0, 0.9);
  --bevel: inset 0 1px 0 var(--hi), inset 0 0 0 1px var(--line);
}
[data-theme="light"] {
  color-scheme: light;
  --bg: #cdcdca; --slab: #e3e3e0; --s1: #ececea; --s2: #f4f4f2; --s3: #fbfbfa;
  --line: rgba(0, 0, 0, 0.085); --line2: rgba(0, 0, 0, 0.17); --hi: rgba(255, 255, 255, 0.85);
  --ink: #17171a; --ink2: #38383c; --mute: #606064; --faint: #9c9c9e;
  --acc: #232220; --acc-hi: #3b3934; --acc-lo: #111110; --acc-ink: #efe9da;
  --seal: #75684a;
  --stop: #bd3a22; --stop-wash: rgba(189, 58, 34, 0.1); --stop-ink: #fff4f0;
  --ice: #4f7690; --scrim: rgba(60, 60, 58, 0.5);
  --depth: 0 1px 0 var(--hi) inset, 0 40px 80px -24px rgba(40, 40, 36, 0.45);
  --bevel: inset 0 1px 0 var(--hi), inset 0 0 0 1px var(--line);
}
html[data-frozen] { --acc: var(--ice); --acc-hi: #d6e6f0; --acc-lo: #86a5b8; --seal: var(--ice); }
html[data-frozen][data-theme="light"] { --acc: #3d6079; --acc-hi: #4f7690; --acc-lo: #2c4a5f; }

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); }
body { font: 450 15px/1.4 var(--font); font-stretch: 100%; color: var(--ink); -webkit-font-smoothing: antialiased; overflow-x: hidden; overscroll-behavior-y: none; }
button, input { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; text-align: inherit; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, ul, dl, dd { margin: 0; padding: 0; }
ul { list-style: none; }
svg { display: block; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--seal); outline-offset: 3px; border-radius: 10px; }
.sheet:focus-visible { outline: none; }
.ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.mono { font-family: var(--mono); font-size: 13px; letter-spacing: 0; }
.mute { color: var(--mute); }

/* ---------- frame ---------- */
.app { min-height: 100dvh; display: flex; flex-direction: column; padding-top: var(--safe-t); position: relative; }
.top { display: flex; align-items: center; justify-content: space-between; padding: 12px var(--pad) 4px; position: relative; z-index: 5; }
.who { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 10px 0 0; font-weight: 520; font-stretch: 108%; }
.who .mark { width: 22px; height: 22px; color: var(--ink); }
.who .ic { width: 14px; height: 14px; color: var(--mute); transition: transform 0.3s var(--ease); }
.who[aria-expanded="true"] .ic { transform: rotate(180deg); }
.top-r { display: flex; align-items: center; gap: 12px; }
.kbar { display: none; }
.sealbtn { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; transition: transform 0.25s var(--ease); }
.sealbtn[data-pressed] { transform: scale(0.9); }
.sealbtn .seal { width: 30px; height: 30px; }

.menu { position: absolute; left: 14px; top: calc(100% + 2px); width: 270px; background: var(--s2); border-radius: 22px; padding: 6px; box-shadow: var(--bevel), 0 24px 60px -12px rgba(0, 0, 0, 0.7); transform-origin: 20px 0; animation: pop 0.28s var(--spring); z-index: 30; }
.menu[hidden] { display: none; }
.menu a, .menu button { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 8px 12px; border-radius: 16px; }
.menu a:hover, .menu button:hover, .menu [data-pressed] { background: var(--s3); }
.menu small { display: block; color: var(--mute); font-size: 13px; }
.menu .ava { flex: none; }
.menu hr { border: 0; height: 1px; background: var(--line); margin: 6px 12px; }
.menu .tick { margin-left: auto; color: var(--seal); }
@keyframes pop { from { opacity: 0; transform: scale(0.92) translateY(-6px); } }

.home { flex: 1; display: block; padding: 0 0 calc(120px + var(--safe-b)); transition: transform 0.5s var(--ease), filter 0.5s var(--ease), border-radius 0.5s; transform-origin: 50% 30%; }
.app[data-sheet] .home, .app[data-sheet] .top { transform: scale(0.955); filter: brightness(0.55); }
.app[data-sheet] .top { transition: transform 0.5s var(--ease), filter 0.5s var(--ease); transform-origin: 50% 300%; }
.app[data-sheet] .dock { transform: translateY(140%); }

/* ---------- balance ---------- */
.total { display: block; width: 100%; padding: 30px var(--pad) 0; }
.total-label { display: flex; align-items: center; gap: 8px; color: var(--mute); font-size: 14px; }
.total-num { display: block; margin-top: 6px; font-weight: 300; font-stretch: 125%; font-size: min(13vw, 60px); line-height: 1.02; letter-spacing: -0.02em; transition: font-stretch 0.35s var(--ease), font-weight 0.35s var(--ease), letter-spacing 0.35s var(--ease); white-space: nowrap; }
.total-num .c { color: var(--mute); font-size: 0.5em; font-weight: 400; letter-spacing: 0; margin-left: 0.04em; }
.total-num .cur { font-size: 0.5em; vertical-align: 0.62em; color: var(--mute); font-weight: 400; margin-right: 0.08em; letter-spacing: 0; }
.total[data-pressed] .total-num { font-stretch: 100%; font-weight: 400; }
.total-num.is-hidden { letter-spacing: 0.12em; color: var(--faint); }

.spark { position: relative; margin: 14px 0 0; padding: 0 var(--pad); touch-action: pan-y; cursor: crosshair; }
.spark svg { width: 100%; height: 56px; overflow: visible; }
.spark path.l { fill: none; stroke: var(--seal); stroke-width: 1.25; vector-effect: non-scaling-stroke; }
.spark path.a { fill: url(#sparkfill); stroke: none; }
.spark .cur-line { stroke: var(--line2); stroke-width: 1; vector-effect: non-scaling-stroke; opacity: 0; }
.spark .cur-dot { fill: var(--acc-hi); opacity: 0; }
.spark[data-scrub] .cur-line, .spark[data-scrub] .cur-dot { opacity: 1; }
.spark-cap { padding: 6px var(--pad) 0; color: var(--mute); font-size: 13px; min-height: 24px; }

/* ---------- lists ---------- */
.sec-h { display: flex; align-items: baseline; justify-content: space-between; padding: 30px var(--pad) 8px; }
.sec-h h2 { font-size: 14px; font-weight: 450; color: var(--mute); }
.sec-h a { color: var(--ink2); font-size: 14px; min-height: 44px; display: inline-flex; align-items: center; margin: -12px 0; }
.rows { padding: 0 10px; }
.row { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 64px; padding: 10px 12px; border-radius: var(--r-row); position: relative; transition: background 0.2s, transform 0.3s var(--ease); }
.row[data-pressed] { background: var(--s1); transform: scale(0.985); }
@media (hover: hover) { .row:hover { background: var(--s1); } }
.row + .row::before { content: ""; position: absolute; left: 66px; right: 12px; top: 0; height: 1px; background: var(--line); }
.row .mid { flex: 1; min-width: 0; }
.row .mid b { display: block; font-weight: 520; font-stretch: 104%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .mid small { display: block; color: var(--mute); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .end { text-align: right; white-space: nowrap; }
.row .end b { display: block; font-weight: 480; font-stretch: 110%; }
.row .end small { display: block; color: var(--mute); font-size: 13px; }
.row.is-quiet .mid b, .row.is-quiet .end b { color: var(--mute); font-weight: 450; }
.up { color: var(--ink2); } .down { color: var(--mute); }

.coin, .ava, .glyph { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.coin { background: radial-gradient(120% 120% at 30% 20%, var(--s3), var(--s1)); box-shadow: var(--bevel); font-weight: 600; font-stretch: 118%; font-size: 15px; color: var(--ink2); }
.ava { background: oklch(34% 0.035 var(--hue, 80)); color: oklch(90% 0.03 var(--hue, 80)); font-size: 13px; font-weight: 600; font-stretch: 110%; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12); }
[data-theme="light"] .ava { background: oklch(86% 0.03 var(--hue, 80)); color: oklch(30% 0.05 var(--hue, 80)); }
.ava.lg { width: 64px; height: 64px; font-size: 20px; }
.glyph { background: var(--s1); box-shadow: var(--bevel); color: var(--ink2); }
.glyph.stop { color: var(--stop); }

/* ---------- dock ---------- */
.dock { position: fixed; left: 14px; right: 14px; bottom: calc(14px + var(--safe-b)); z-index: 8; display: grid; grid-template-columns: 1.25fr 1fr 1fr; gap: 6px; padding: 6px; border-radius: 28px; background: color-mix(in srgb, var(--s1) 88%, transparent); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); box-shadow: var(--bevel), 0 18px 50px -10px rgba(0, 0, 0, 0.75); transition: transform 0.5s var(--ease); }
.dock a { display: flex; align-items: center; justify-content: center; gap: 8px; height: 56px; border-radius: 22px; font-weight: 560; font-stretch: 108%; background: var(--s3); box-shadow: var(--bevel); transition: transform 0.2s var(--ease), font-stretch 0.25s var(--ease); }
.dock a[data-pressed] { transform: scale(0.955); font-stretch: 96%; }
.dock a.primary, .btn.primary { background: linear-gradient(180deg, var(--acc-hi), var(--acc) 45%, var(--acc-lo)); color: var(--acc-ink); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), inset 0 -1px 0 rgba(0, 0, 0, 0.25); }
[data-theme="light"] .dock a.primary, [data-theme="light"] .btn.primary { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), inset 0 -1px 0 rgba(0, 0, 0, 0.5); }
.dock a[aria-disabled="true"] { opacity: 0.4; }

.app::before { content: ""; position: fixed; left: 0; right: 0; bottom: 0; height: calc(120px + var(--safe-b)); background: linear-gradient(180deg, transparent, var(--bg) 70%); pointer-events: none; z-index: 7; transition: opacity 0.3s; }
.app[data-sheet]::before { opacity: 0; }

/* ---------- frozen ---------- */
.frost { margin: 10px 14px 0; padding: 14px 16px; border-radius: 20px; background: color-mix(in srgb, var(--ice) 10%, var(--s1)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ice) 40%, transparent); display: flex; align-items: center; gap: 12px; }
.frost[hidden] { display: none; }
.frost p { flex: 1; font-size: 14px; }
.frost b { display: block; font-weight: 560; }
.frost a { padding: 0 16px; height: 44px; display: inline-flex; align-items: center; border-radius: 14px; background: var(--s3); box-shadow: var(--bevel); font-weight: 540; white-space: nowrap; }
html[data-frozen] .app::after { content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 4; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ice) 50%, transparent), inset 0 0 120px color-mix(in srgb, var(--ice) 14%, transparent); animation: frostin 0.9s var(--ease); }
html[data-frozen] .home { filter: saturate(0.3); }
@keyframes frostin { from { opacity: 0; box-shadow: inset 0 0 0 1px var(--ice), inset 0 0 300px color-mix(in srgb, var(--ice) 60%, transparent); } }

/* ---------- sheet ---------- */
.scrim { position: fixed; inset: 0; background: var(--scrim); opacity: 0; pointer-events: none; transition: opacity 0.4s var(--ease); z-index: 10; }
.app[data-sheet] .scrim { opacity: 1; pointer-events: auto; }
.sheet { position: fixed; z-index: 20; left: 8px; right: 8px; bottom: calc(8px + var(--safe-b)); max-height: calc(100dvh - 44px - var(--safe-t)); display: flex; flex-direction: column; background: var(--s1); border-radius: 34px; box-shadow: var(--bevel), var(--depth); transform: translateY(calc(110% + var(--drag, 0px))); transition: transform 0.55s var(--ease); overflow: hidden; will-change: transform; }
.sheet[hidden] { display: none; }
.sheet.is-open { transform: translateY(var(--drag, 0px)); }
.grab { height: 22px; display: grid; place-items: center; cursor: grab; touch-action: none; flex: none; }
.grab i { width: 38px; height: 4px; border-radius: 4px; background: var(--line2); }
.sheet-head { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; padding: 0 12px 6px; flex: none; touch-action: none; }
.sheet-head h2 { text-align: center; font-size: 16px; font-weight: 560; font-stretch: 108%; }
.hbtn { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; color: var(--ink2); transition: transform 0.2s var(--ease), background 0.2s; }
.hbtn[data-pressed] { transform: scale(0.88); background: var(--s2); }
.hbtn[hidden] { visibility: hidden; display: grid; }
.sheet-body { overflow-y: auto; overscroll-behavior: contain; padding: 4px var(--pad) calc(var(--pad) + 2px); flex: 1; min-height: 0; }
.sheet-body.step-fwd > * { animation: stepf 0.42s var(--ease) backwards; }
.sheet-body.step-back > * { animation: stepb 0.42s var(--ease) backwards; }
@keyframes stepf { from { opacity: 0; transform: translateX(28px); } }
@keyframes stepb { from { opacity: 0; transform: translateX(-28px); } }

/* ---------- controls ---------- */
.btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 56px; padding: 0 20px; border-radius: 20px; font-weight: 560; font-stretch: 108%; background: var(--s3); box-shadow: var(--bevel); transition: transform 0.2s var(--ease), font-stretch 0.25s var(--ease), opacity 0.2s; }
.btn[data-pressed] { transform: scale(0.97); font-stretch: 98%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.35; pointer-events: none; }
.btn.plain { background: none; box-shadow: none; color: var(--ink2); }
.btn.stop { color: var(--stop); }
.btns { display: grid; gap: 8px; margin-top: 20px; }
.btns.two { grid-template-columns: 1fr 1fr; }
.lead { color: var(--ink2); font-size: 15px; line-height: 1.45; max-width: 46ch; }
.big-h { font-size: 24px; font-weight: 500; font-stretch: 116%; line-height: 1.12; letter-spacing: -0.01em; margin-bottom: 8px; }
.center { text-align: center; display: flex; flex-direction: column; align-items: center; }
.center .lead { margin-inline: auto; }
.kv { margin-top: 18px; border-radius: 20px; background: var(--s2); box-shadow: var(--bevel); padding: 2px 16px; }
.kv > div { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; }
.kv > div + div { border-top: 1px solid var(--line); }
.kv dt { color: var(--mute); }
.kv dd { text-align: right; min-width: 0; overflow-wrap: anywhere; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; border-radius: 18px; background: var(--s2); box-shadow: var(--bevel); }
.seg button { min-height: 44px; border-radius: 14px; font-weight: 520; font-size: 14px; color: var(--mute); text-align: center; transition: background 0.25s, color 0.25s, font-stretch 0.3s var(--ease); white-space: nowrap; padding: 0 6px; }
.seg button[aria-pressed="true"] { background: var(--s3); color: var(--ink); box-shadow: var(--bevel); font-stretch: 108%; }
.switch { width: 52px; height: 32px; border-radius: 32px; background: var(--s3); box-shadow: var(--bevel); position: relative; flex: none; transition: background 0.3s; }
.switch::after { content: ""; position: absolute; top: 4px; left: 4px; width: 24px; height: 24px; border-radius: 50%; background: var(--mute); transition: transform 0.35s var(--spring), background 0.3s; }
.switch[aria-checked="true"] { background: var(--acc); }
.switch[aria-checked="true"]::after { transform: translateX(20px); background: var(--acc-ink); }
details.more { margin-top: 14px; }
details.more summary { list-style: none; display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; color: var(--mute); cursor: pointer; font-size: 14px; }
details.more summary::-webkit-details-marker { display: none; }
details.more summary .ic { width: 14px; height: 14px; transition: transform 0.3s var(--ease); }
details.more[open] summary .ic { transform: rotate(180deg); }
details.more .kv { margin-top: 4px; }
details.more .kv dd { font-family: var(--mono); font-size: 12.5px; }

/* ---------- send: pick ---------- */
.paste { display: flex; align-items: center; gap: 10px; height: 56px; padding: 0 8px 0 16px; border-radius: 20px; background: var(--s2); box-shadow: var(--bevel); }
.paste input { flex: 1; min-width: 0; background: none; border: 0; font-size: 15px; }
.paste input::placeholder { color: var(--mute); }
.paste:focus-within { box-shadow: var(--bevel), 0 0 0 2px var(--seal); }
.paste input:focus-visible { outline: none; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 6px; }
.chip { min-height: 36px; padding: 0 14px; border-radius: 12px; font-size: 13.5px; color: var(--ink2); box-shadow: inset 0 0 0 1px var(--line2); position: relative; transition: transform 0.2s var(--ease), background 0.2s; }
.chip::after { content: ""; position: absolute; inset: -5px 0; }
.chip[data-pressed] { transform: scale(0.95); background: var(--s2); }
.sheet-body .rows { padding: 0; margin: 8px -12px 0; }
.sub-h { color: var(--mute); font-size: 14px; margin: 18px 0 0; }

/* ---------- address checks ---------- */
.cmp { margin-top: 16px; border-radius: 20px; background: var(--s2); box-shadow: var(--bevel); padding: 14px 16px; }
.cmp + .cmp { margin-top: 8px; }
.cmp small { display: block; color: var(--mute); font-size: 13px; margin-bottom: 8px; }
.cmp .addr { font-family: var(--mono); font-size: 13.5px; line-height: 1.9; display: flex; flex-wrap: wrap; gap: 0 8px; }
.cmp .addr span { white-space: nowrap; }
.cmp .addr i { font-style: normal; }
.cmp .addr i.x { background: var(--stop); color: var(--stop-ink); border-radius: 3px; }
.cmp .addr i.s { color: var(--mute); }
.cmp.is-stop { box-shadow: inset 0 0 0 1px var(--stop); background: var(--stop-wash); }
.groups { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-top: 16px; }
.groups button { height: 48px; border-radius: 12px; background: var(--s2); box-shadow: var(--bevel); font-family: var(--mono); font-size: 14px; text-align: center; transition: background 0.25s, color 0.25s, transform 0.2s var(--ease); }
.groups button[data-pressed] { transform: scale(0.93); }
.groups button[aria-pressed="true"] { background: var(--acc); color: var(--acc-ink); box-shadow: none; }

/* ---------- amount + keypad ---------- */
.to-pill { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px 0 6px; border-radius: 40px; background: var(--s2); box-shadow: var(--bevel); font-weight: 520; font-size: 14px; max-width: 100%; }
.to-pill .ava, .to-pill .glyph { width: 28px; height: 28px; font-size: 10px; }
.to-pill .glyph .ic { width: 15px; height: 15px; }
.amt { height: 104px; display: flex; align-items: center; justify-content: center; font-weight: 300; font-stretch: 125%; font-size: 64px; letter-spacing: -0.02em; white-space: nowrap; }
.amt .cur { font-size: 0.5em; color: var(--mute); margin-right: 0.08em; transform: translateY(-0.36em); font-weight: 400; }
.amt .d { display: inline-block; }
.amt .d.in { animation: digit 0.42s var(--ease); }
.amt .ghost { color: var(--faint); }
.amt.shake { animation: shake 0.36s; color: var(--stop); }
@keyframes digit { from { font-stretch: 75%; font-weight: 600; opacity: 0; transform: translateY(14px); } }
@keyframes shake { 20%, 60% { transform: translateX(-7px); } 40%, 80% { transform: translateX(7px); } }
.amt-cap { text-align: center; color: var(--mute); font-size: 14px; min-height: 22px; }
.amt-cap.is-stop { color: var(--stop); }
.keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 16px; touch-action: manipulation; user-select: none; -webkit-user-select: none; }
.keys button { height: 60px; border-radius: var(--r-key); text-align: center; font-size: 26px; font-weight: 400; font-stretch: 118%; display: grid; place-items: center; transition: transform 0.18s var(--ease), background 0.18s, font-stretch 0.22s var(--ease), font-weight 0.22s; }
.keys button[data-pressed] { background: var(--s3); transform: scale(0.94); font-stretch: 90%; font-weight: 600; box-shadow: var(--bevel); }
@media (hover: hover) { .keys button:hover { background: var(--s2); } }

/* ---------- seal ---------- */
.seal { color: var(--seal); --p: 0; overflow: visible; }
.seal .track { fill: none; stroke: var(--line2); stroke-width: 1.5; }
.seal .prog { fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 289.03; stroke-dashoffset: calc(289.03 * (1 - var(--p))); transform: rotate(-90deg); transform-origin: 50px 50px; }
.seal .dot { fill: currentColor; --g: clamp(0, calc((var(--p) - var(--dl)) / (1 - var(--dl))), 1); transform-box: fill-box; transform-origin: center; transform: translate(calc(var(--dx) * var(--g)), calc(var(--dy) * var(--g))) scale(calc(1 - var(--g) * 0.7)); opacity: calc(1 - var(--g) * 0.9); }
.seal .core { fill: currentColor; transform-box: fill-box; transform-origin: center; transform: scale(calc(1 + var(--p) * 2.1)); }
.seal.mini .track { stroke: currentColor; opacity: 0.55; stroke-width: 4; }
.seal.mini .prog, .seal.mini .dot { display: none; }
.seal.mini .core { transform: none; }
.seal.is-done .dot { opacity: 0; }
.seal.is-done .core { animation: corepop 0.6s var(--spring); }
@keyframes corepop { 0% { transform: scale(3.1); } 40% { transform: scale(4.2); } 100% { transform: scale(3.1); } }

.holder { position: relative; width: 148px; height: 148px; margin: 22px auto 10px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 50% 30%, var(--s3), var(--s1) 70%); box-shadow: var(--bevel), 0 18px 40px -14px rgba(0, 0, 0, 0.6); touch-action: none; user-select: none; -webkit-user-select: none; transition: transform 0.3s var(--ease); cursor: pointer; }
.holder[data-holding] { transform: scale(0.955); }
.holder .seal { width: 124px; height: 124px; grid-area: 1 / 1; transition: opacity 0.25s; }
.holder .face { grid-area: 1 / 1; width: 46px; height: 46px; color: var(--seal); opacity: 0; transform: scale(0.8); transition: opacity 0.2s, transform 0.3s var(--ease); stroke-width: 1.4; }
.holder.is-face .face { opacity: 1; transform: none; }
.holder.is-face .seal .dot, .holder.is-face .seal .core { opacity: 0; }
.holder.is-busy { pointer-events: none; }
.holder.is-busy .seal .prog { animation: sweep 1s linear infinite; stroke-dasharray: 70 219; stroke-dashoffset: 0; }
.holder.is-stop { --seal: var(--stop); }
@keyframes sweep { to { transform: rotate(270deg); } }
.hold-cap { text-align: center; color: var(--mute); font-size: 14px; min-height: 22px; }
.review-amt { font-weight: 300; font-stretch: 125%; font-size: 52px; letter-spacing: -0.02em; line-height: 1; margin: 6px 0 12px; }
.review-amt .cur { font-size: 0.5em; color: var(--mute); vertical-align: 0.62em; margin-right: 0.08em; font-weight: 400; }
.done-seal { width: 96px; height: 96px; margin: 18px auto 18px; }

/* phone stand-in, desktop only */
.handoff { display: none; }
.phone { width: 232px; margin: 18px auto 0; padding: 16px 14px 18px; border-radius: 38px; background: var(--bg); box-shadow: inset 0 0 0 1px var(--line2), inset 0 0 0 5px var(--s2), 0 24px 50px -18px rgba(0, 0, 0, 0.7); text-align: center; }
.phone::before { content: ""; display: block; width: 64px; height: 18px; border-radius: 18px; background: var(--s2); margin: 2px auto 14px; }
.phone p { font-size: 13px; color: var(--ink2); }
.phone p b { display: block; font-size: 15px; color: var(--ink); font-weight: 560; }
.phone .holder { width: 120px; height: 120px; margin: 14px auto 8px; }
.phone .holder .seal { width: 100px; height: 100px; }

/* ---------- share ---------- */
.linkbox { margin-top: 18px; padding: 14px 16px; border-radius: 20px; background: var(--s2); box-shadow: var(--bevel); font-family: var(--mono); font-size: 13.5px; overflow-wrap: anywhere; text-align: left; }
.share { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 12px; }
.share button { display: grid; justify-items: center; gap: 8px; padding: 14px 4px 12px; border-radius: 18px; background: var(--s2); box-shadow: var(--bevel); font-size: 12.5px; color: var(--ink2); text-align: center; transition: transform 0.2s var(--ease); }
.share button[data-pressed] { transform: scale(0.94); }

/* ---------- receive ---------- */
.qr { width: 216px; margin: 20px auto 0; padding: 14px; border-radius: 26px; background: #f3f1ea; box-shadow: 0 0 0 1px var(--line2), 0 20px 44px -18px rgba(0, 0, 0, 0.6); }
.qr svg { width: 100%; height: auto; color: #0b0b0d; }
.addr-line { margin-top: 16px; text-align: center; font-family: var(--mono); font-size: 13.5px; line-height: 1.8; color: var(--ink2); display: flex; flex-wrap: wrap; justify-content: center; gap: 0 8px; }
.note { text-align: center; color: var(--mute); font-size: 13.5px; margin-top: 8px; }
.nets { margin-top: 10px; }

/* ---------- safety ---------- */
.safety-top { display: flex; align-items: center; gap: 16px; padding: 4px 0 14px; }
.safety-top .seal { width: 56px; height: 56px; flex: none; }
.dial { margin: 18px auto 6px; width: 190px; height: 190px; position: relative; display: grid; place-items: center; }
.dial svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.dial circle { fill: none; stroke-width: 2; }
.dial .t { stroke: var(--line2); }
.dial .v { stroke: var(--seal); stroke-linecap: round; transition: stroke-dashoffset 0.9s var(--ease); }
.dial b { font-size: 46px; font-weight: 300; font-stretch: 125%; line-height: 1; display: block; text-align: center; }
.dial small { color: var(--mute); display: block; text-align: center; margin-top: 4px; }
.state-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--seal); flex: none; }
.state-dot.off { background: var(--faint); }
.row .tag { color: var(--mute); font-size: 13.5px; }

/* ---------- toast ---------- */
.toast { position: fixed; left: 50%; top: calc(14px + var(--safe-t)); z-index: 60; transform: translate(-50%, -300%); opacity: 0; padding: 12px 18px; border-radius: 18px; background: var(--s3); box-shadow: var(--bevel), 0 18px 40px -10px rgba(0, 0, 0, 0.7); font-weight: 520; font-size: 14px; white-space: nowrap; transition: transform 0.5s var(--spring), opacity 0.3s; pointer-events: none; }
.toast.is-on { transform: translate(-50%, 0); opacity: 1; }

/* ---------- command bar ---------- */
.cmdk { position: fixed; inset: 0; z-index: 50; background: var(--scrim); display: grid; justify-items: center; align-items: start; padding: 14vh 16px 0; }
.cmdk[hidden] { display: none; }
.cmdk-box { width: min(520px, 100%); border-radius: 24px; background: var(--s1); box-shadow: var(--bevel), var(--depth); overflow: hidden; animation: pop 0.3s var(--spring); }
.cmdk input { width: 100%; height: 60px; padding: 0 22px; background: none; border: 0; border-bottom: 1px solid var(--line); font-size: 17px; }
.cmdk input:focus-visible { outline: none; }
.cmdk ul { max-height: 340px; overflow: auto; padding: 6px; }
.cmdk li { display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 0 14px; border-radius: 14px; cursor: pointer; color: var(--ink2); }
.cmdk li[aria-selected="true"] { background: var(--s3); color: var(--ink); }
.cmdk li small { margin-left: auto; color: var(--mute); }

/* ---------- opening ---------- */
.opening { position: fixed; inset: 0; z-index: 80; background: var(--bg); display: grid; place-items: center; transition: opacity 0.5s var(--ease), transform 0.6s var(--ease); cursor: pointer; }
.opening[hidden] { display: none; }
.opening.is-leaving { opacity: 0; transform: scale(1.08); pointer-events: none; }
.opening .stack { display: grid; justify-items: center; gap: 22px; }
.opening .seal { width: 132px; height: 132px; }
.opening .face { width: 30px; height: 30px; color: var(--mute); transition: opacity 0.3s; }
.opening p { color: var(--mute); font-size: 14px; }

/* ---------- desktop ---------- */
.pane-r .pane-head { display: none; }
@media (min-width: 1024px) {
  :root { --pad: 28px; }
  body { font-size: 15px; }
  .app { max-width: 1180px; margin: 0 auto; padding: 22px 28px 28px; min-height: 100dvh; }
  .top { padding: 0 4px 18px; }
  .kbar { display: flex; align-items: center; gap: 14px; height: 40px; padding: 0 8px 0 16px; border-radius: 14px; color: var(--mute); box-shadow: inset 0 0 0 1px var(--line2); font-size: 14px; }
  .kbar kbd { font: 500 12px var(--font); padding: 4px 8px; border-radius: 8px; background: var(--s2); color: var(--ink2); }
  .kbar:hover { color: var(--ink2); }
  .menu { left: 0; }
  .app::before { display: none; }
  .home { display: grid; grid-template-columns: minmax(400px, 5fr) 6fr; gap: 14px; padding: 0; align-items: start; flex: 1; }
  .app[data-sheet] .home, .app[data-sheet] .top { transform: none; filter: none; }
  .pane { border-radius: var(--r-slab); background: var(--slab); box-shadow: var(--bevel), 0 30px 80px -30px rgba(0, 0, 0, 0.8); padding: 10px 0 18px; }
  .pane-l { display: flex; flex-direction: column; background: linear-gradient(180deg, var(--s1), var(--slab) 46%); }
  .pane-r { background: transparent; box-shadow: inset 0 0 0 1px var(--line); height: calc(100dvh - 134px); min-height: 560px; overflow-y: auto; }
  .total { padding-top: 26px; }
  .total-num { font-size: 60px; }
  .dock { position: static; margin: 14px 22px 6px; background: none; backdrop-filter: none; -webkit-backdrop-filter: none; box-shadow: none; padding: 0; gap: 8px; }
  .app[data-sheet] .dock { transform: none; }
  .frost { margin: 0 0 14px; }
  .pane-r .pane-head { display: flex; align-items: center; gap: 6px; padding: 8px 16px 0; }
  .pane-r .pane-head h2 { font-size: 16px; font-weight: 560; font-stretch: 108%; }
  .pane-r .pane-body { padding: 8px var(--pad) 0; max-width: 520px; margin: 0 auto; }
  .pane-r .pane-body .rows { margin: 8px -12px 0; padding: 0; }
  .sheet { left: 50%; right: auto; bottom: auto; top: 50%; width: 468px; max-height: min(760px, calc(100dvh - 48px)); border-radius: 30px; transform: translate(-50%, calc(-46% + var(--drag, 0px))) scale(0.96); opacity: 0; transition: transform 0.45s var(--ease), opacity 0.3s var(--ease); pointer-events: none; }
  .sheet.is-open { transform: translate(-50%, calc(-50% + var(--drag, 0px))); opacity: 1; pointer-events: auto; }
  .grab { height: 14px; cursor: default; }
  .grab i { display: none; }
  .handoff { display: block; }
  .phone-only { display: none; }
  .toast { top: 26px; }
}
@media (max-width: 1023.98px) { .desk-only { display: none; } }
@media (max-width: 359px) { .groups { grid-template-columns: repeat(4, 1fr); } .amt { font-size: 52px; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ---------- later additions ---------- */
.switch::before { content: ""; position: absolute; inset: -8px; }
.again { margin: 14px 22px 0; padding-top: 2px; border-top: 1px solid var(--line); }
.again-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; margin-top: 10px; }
.again-b { display: grid; justify-items: center; gap: 8px; padding: 10px 0 8px; border-radius: 16px; font-size: 13px; color: var(--ink2); text-align: center; transition: transform 0.2s var(--ease), background 0.2s; }
.again-b:hover { background: var(--s2); }
.again-b[data-pressed] { transform: scale(0.94); }
@media (min-width: 1024px) { .pane-l { position: sticky; top: 22px; } }
