/* P2 Plates. Graphite stage, four anodized plates. The plates carry the colour; everything else stays quiet. */
@font-face { font-family: "Funnel Display"; src: url("../fonts/funnel-display-latin-wght-normal.woff2") format("woff2"); font-weight: 300 800; font-display: swap; }
@font-face { font-family: "Funnel Sans"; src: url("../fonts/funnel-sans-latin-wght-normal.woff2") format("woff2"); font-weight: 300 800; 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 {
  --f-display: "Funnel Display", ui-sans-serif, system-ui, sans-serif;
  --f-text: "Funnel Sans", ui-sans-serif, system-ui, sans-serif;
  --f-mono: "Fragment Mono", ui-monospace, monospace;
  --strip: 62px; --plate-h: 196px; --r-plate: 22px;
  --spring: cubic-bezier(.2, 1.2, .3, 1);
  --soft: cubic-bezier(.2, .8, .2, 1);
  --gx: .35; --gy: .3;

  /* anodized plates: natural aluminium, copper, indigo, sea teal */
  --usd-a: oklch(88% 0.012 245); --usd-b: oklch(71% 0.018 250); --usd-ink: oklch(22% 0.02 255); --usd-line: oklch(30% 0.03 255 / .30); --usd-edge: oklch(100% 0 0 / .7);
  --btc-a: oklch(73% 0.125 60); --btc-b: oklch(54% 0.12 44); --btc-ink: oklch(19% 0.04 50); --btc-line: oklch(26% 0.06 45 / .34); --btc-edge: oklch(92% 0.08 80 / .6);
  --eth-a: oklch(53% 0.135 283); --eth-b: oklch(35% 0.125 280); --eth-ink: oklch(97% 0.015 285); --eth-line: oklch(86% 0.07 285 / .30); --eth-edge: oklch(85% 0.08 285 / .45);
  --sol-a: oklch(62% 0.09 192); --sol-b: oklch(43% 0.078 202); --sol-ink: oklch(98% 0.015 190); --sol-line: oklch(92% 0.05 185 / .30); --sol-edge: oklch(90% 0.06 190 / .45);
}
:root, [data-theme="dark"] {
  color-scheme: dark;
  --stage: oklch(18.5% 0.006 255); --stage-2: oklch(15.5% 0.006 255);
  --raise: oklch(24% 0.008 255); --raise-2: oklch(29.5% 0.009 255);
  --ink: oklch(95.5% 0.004 90); --ink-2: oklch(82% 0.006 250); --muted: oklch(68% 0.01 250);
  --rule: oklch(31% 0.008 255); --inv: oklch(18% 0.006 255);
  --safe: oklch(80% 0.12 165); --safe-wash: oklch(32% 0.05 165);
  --warn: oklch(80% 0.13 75); --danger: oklch(72% 0.17 28); --danger-wash: oklch(31% 0.08 28);
  --frost: oklch(86% 0.045 225); --frost-ink: oklch(22% 0.04 240);
  --focus: oklch(82% 0.11 230);
  --plate-shadow: 0 -10px 26px -8px rgb(0 0 0 / .55), 0 22px 32px -20px rgb(0 0 0 / .7);
  --sheet-shadow: 0 -24px 60px rgb(0 0 0 / .5);
}
[data-theme="light"] {
  color-scheme: light;
  --stage: oklch(95.2% 0.004 240); --stage-2: oklch(92.5% 0.005 240);
  --raise: oklch(99.2% 0.002 240); --raise-2: oklch(90.5% 0.006 240);
  --ink: oklch(21% 0.012 255); --ink-2: oklch(34% 0.012 255); --muted: oklch(47% 0.012 255);
  --rule: oklch(87.5% 0.006 240); --inv: oklch(98% 0.003 240);
  --safe: oklch(46% 0.1 165); --safe-wash: oklch(91% 0.045 165);
  --warn: oklch(52% 0.12 70); --danger: oklch(50% 0.18 28); --danger-wash: oklch(92% 0.04 28);
  --frost: oklch(80% 0.06 228); --frost-ink: oklch(22% 0.04 240);
  --focus: oklch(50% 0.16 255);
  --plate-shadow: 0 -6px 18px -8px rgb(30 40 60 / .28), 0 18px 28px -18px rgb(30 40 60 / .38);
  --sheet-shadow: 0 -24px 60px rgb(30 40 60 / .18);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--stage); color: var(--ink); font: 400 16px/1.45 var(--f-text); -webkit-font-smoothing: antialiased; transition: background-color .5s; overscroll-behavior-y: none; }
h1, h2, p, dl, dd { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 8px; }
.view:focus { outline: none; }
.mono { font-family: var(--f-mono); letter-spacing: 0; }
.muted { color: var(--muted); }
.ic { width: 24px; height: 24px; flex: none; }
.mark { width: 20px; height: 20px; flex: none; }
.dec { font-size: .56em; color: var(--muted); font-weight: 500; }
[hidden] { display: none !important; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--inv); padding: 10px 14px; border-radius: 10px; z-index: 99; }
.skip:focus { left: 8px; }

/* ---------- frame ---------- */
.app { min-height: 100dvh; display: flex; flex-direction: column; max-width: 520px; margin: 0 auto; padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
.top { display: flex; align-items: center; justify-content: space-between; height: calc(56px + env(safe-area-inset-top)); padding: env(safe-area-inset-top) 12px 0 14px; }
.topnav { display: none; }
.top-right { display: flex; align-items: center; gap: 4px; }
.body { display: flex; flex-direction: column; padding: 0 16px; flex: 1; }
.rack { display: none; }
.app[data-rack="stack"] .rack, .app[data-rack="lifted"] .rack { display: block; }
.view.enter { animation: view-in .26s var(--soft); }
@keyframes view-in { from { opacity: 0; transform: translateY(8px); } }

.iconbtn { width: 44px; height: 44px; border-radius: 50%; display: inline-grid; place-items: center; color: var(--ink-2); transition: background-color .15s, transform .15s; }
@media (hover: hover) { .iconbtn:hover { background: var(--raise); } }
.iconbtn[data-pressed] { transform: scale(.9); background: var(--raise-2); }
.iconbtn.sm { width: 32px; height: 32px; flex: none; }
.iconbtn.sm .ic { width: 16px; height: 16px; }
.avatar { font: 600 13px var(--f-display); background: var(--raise); color: var(--ink); width: 36px; height: 36px; margin-left: 4px; }
[data-theme="dark"] .i-moon, [data-theme="light"] .i-sun { display: none; }

.ws-wrap { position: relative; }
.ws { display: flex; align-items: center; gap: 9px; height: 44px; padding: 0 10px 0 6px; border-radius: 14px; font: 600 17px var(--f-display); transition: background-color .15s, transform .15s; }
@media (hover: hover) { .ws:hover { background: var(--raise); } }
.ws[data-pressed] { transform: scale(.96); }
.ws .ic { width: 16px; height: 16px; color: var(--muted); }
.ws-menu { position: absolute; left: 0; top: 50px; z-index: 40; width: 270px; background: var(--raise); border: 1px solid var(--rule); border-radius: 18px; padding: 6px; box-shadow: 0 20px 50px -10px rgb(0 0 0 / .45); animation: pop .22s var(--spring); transform-origin: 20px 0; }
@keyframes pop { from { opacity: 0; transform: scale(.94); } }
.ws-item { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 12px; min-height: 56px; }
@media (hover: hover) { .ws-item:hover { background: var(--raise-2); } }
.ws-item > span:nth-child(2) { flex: 1; display: grid; }
.ws-item b { font-weight: 600; }
.ws-item small { color: var(--muted); font-size: 13px; }
.ws-item .ic { width: 18px; height: 18px; color: var(--safe); }

.tabs { position: fixed; left: 50%; bottom: calc(14px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 30; display: flex; gap: 2px; padding: 5px; border-radius: 28px;
  background: color-mix(in oklch, var(--raise) 82%, transparent); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4); border: 1px solid var(--rule); box-shadow: 0 14px 34px -12px rgb(0 0 0 / .5); }
.tabs a { display: flex; align-items: center; gap: 8px; height: 46px; padding: 0 16px; border-radius: 23px; font: 500 14px var(--f-text); color: var(--muted); transition: background-color .2s, color .2s, transform .15s; }
.tabs a .ic { width: 22px; height: 22px; }
.tabs a span { display: none; }
.tabs a[aria-current] { background: var(--ink); color: var(--inv); padding: 0 18px 0 14px; }
.tabs a[aria-current] span { display: inline; }
.tabs a[data-pressed] { transform: scale(.94); }

.frozen-bar { display: flex; align-items: center; gap: 10px; margin: 0 16px 10px; padding: 10px 14px; border-radius: 14px; background: var(--frost); color: var(--frost-ink); font-size: 14px; font-weight: 500; animation: view-in .3s var(--soft); }
.frozen-bar .ic { width: 20px; height: 20px; }
.frozen-bar span { flex: 1; }
.frozen-bar a { font-weight: 700; text-decoration: underline; text-underline-offset: 3px; padding: 6px 0; }

/* ---------- the rack and its plates ---------- */
.rack-head { min-height: 104px; display: flex; align-items: center; }
.total { display: grid; gap: 2px; padding: 4px 4px 14px; }
.total-label { font-size: 14px; color: var(--muted); }
.total-fig { font: 500 44px/1.05 var(--f-display); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.total-sub { font-size: 14px; color: var(--muted); margin-top: 4px; }
.rack-back { display: none; align-items: center; gap: 4px; height: 44px; padding: 0 12px 0 4px; margin-left: -4px; border-radius: 14px; font: 600 17px var(--f-display); }
.rack-back .ic { width: 22px; height: 22px; }
.rack[data-lifted] .rack-head { min-height: 52px; }
.rack[data-lifted] .total { display: none; }
.rack[data-lifted] .rack-back { display: inline-flex; }

.stack { position: relative; height: calc(var(--strip) * 3 + var(--plate-h)); transition: height .5s var(--soft); }
.rack[data-lifted] .stack { height: var(--plate-h); }
.plate { position: absolute; left: 0; right: 0; top: calc(var(--i) * var(--strip)); height: var(--plate-h); z-index: calc(var(--i) + 1); display: block; text-align: left; border-radius: var(--r-plate);
  transform: translateY(var(--dy, 0px)); transition: transform .6s var(--spring), opacity .3s; touch-action: none; user-select: none; -webkit-user-select: none; }
.plate.is-dragging { transition: none; }
.rack[data-lifted] .plate:not(.is-lifted) { transform: translateY(calc(var(--plate-h) * 1.5 + var(--i) * 26px)) scale(.94); opacity: 0; pointer-events: none; transition: transform .5s var(--soft), opacity .28s; }
.plate.is-lifted { transform: translateY(calc(var(--i) * var(--strip) * -1 + var(--dy, 0px))); z-index: 9; }
.rack.is-entering .plate { animation: drop .8s var(--spring) backwards; animation-delay: calc(var(--i) * 70ms + 60ms); }
@keyframes drop { from { opacity: 0; transform: translateY(-70px) scale(.96); } }

.plate-usd { --p-a: var(--usd-a); --p-b: var(--usd-b); --p-ink: var(--usd-ink); --p-line: var(--usd-line); --p-edge: var(--usd-edge); }
.plate-btc { --p-a: var(--btc-a); --p-b: var(--btc-b); --p-ink: var(--btc-ink); --p-line: var(--btc-line); --p-edge: var(--btc-edge); }
.plate-eth { --p-a: var(--eth-a); --p-b: var(--eth-b); --p-ink: var(--eth-ink); --p-line: var(--eth-line); --p-edge: var(--eth-edge); }
.plate-sol { --p-a: var(--sol-a); --p-b: var(--sol-b); --p-ink: var(--sol-ink); --p-line: var(--sol-line); --p-edge: var(--sol-edge); }

.plate-body { position: absolute; inset: 0; border-radius: inherit; overflow: hidden; color: var(--p-ink); display: flex; flex-direction: column; justify-content: space-between; padding: 0 20px 18px;
  background:
    repeating-linear-gradient(90deg, rgb(255 255 255 / .035) 0 1px, transparent 1px 3px),
    linear-gradient(172deg, var(--p-a), var(--p-b));
  box-shadow: inset 0 1.5px 0 var(--p-edge), inset 0 0 0 1px rgb(255 255 255 / .07), inset 0 -1.5px 0 rgb(0 0 0 / .28), var(--plate-shadow);
  transition: transform .25s var(--soft), filter .7s; transform-origin: 50% 60%; }
.plate[data-pressed] .plate-body { transform: scale(.985); }
.engr { position: absolute; inset: 0; color: var(--p-line); pointer-events: none; filter: drop-shadow(0 .7px 0 rgb(255 255 255 / .22)); }
.engr svg { width: 100%; height: 100%; display: block; }
.sheen { position: absolute; inset: 0; pointer-events: none; mix-blend-mode: overlay; opacity: .7; transition: opacity .3s;
  background:
    radial-gradient(70% 120% at calc(var(--px, .3) * 100%) calc(var(--py, 0) * 100%), rgb(255 255 255 / .55), transparent 62%),
    linear-gradient(112deg, transparent calc(var(--gx) * 100% - 28%), rgb(255 255 255 / .28) calc(var(--gx) * 100%), transparent calc(var(--gx) * 100% + 28%)); }
.plate:hover .sheen, .plate[data-pressed] .sheen { opacity: 1; }
.plate-top { position: relative; height: var(--strip); display: flex; align-items: center; justify-content: space-between; gap: 12px; flex: none; }
.plate-name { font: 600 18px var(--f-display); letter-spacing: -0.005em; }
.plate-val { font: 600 18px var(--f-display); font-variant-numeric: tabular-nums; transform-origin: 100% 50%; transition: transform .5s var(--spring); }
.plate-low { position: relative; display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.plate-native { font: 500 20px var(--f-display); opacity: .86; }
.plate-foot { display: flex; align-items: center; gap: 8px; font-size: 12px; opacity: .7; }
.plate-foot .mark { width: 16px; height: 16px; }
.plate-name, .plate-val, .plate-native, .plate-foot { text-shadow: 0 1px 0 rgb(255 255 255 / .16); }
.plate-eth .plate-name, .plate-eth .plate-val, .plate-eth .plate-native, .plate-eth .plate-foot,
.plate-sol .plate-name, .plate-sol .plate-val, .plate-sol .plate-native, .plate-sol .plate-foot { text-shadow: 0 -1px 0 rgb(0 0 0 / .22); }
.plate.is-front .plate-val, .plate.is-lifted .plate-val { transform: scale(1.34); }

/* frozen: the plates lose their colour under a film of frost */
:root[data-frozen] .plate-body { filter: saturate(.16) brightness(1.06) contrast(.92); }
:root[data-frozen] .plate-body::after { content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: radial-gradient(120% 80% at 0% 0%, rgb(226 242 255 / .55), transparent 55%), radial-gradient(90% 70% at 100% 100%, rgb(214 234 252 / .42), transparent 60%), repeating-linear-gradient(63deg, rgb(255 255 255 / .09) 0 2px, transparent 2px 9px), repeating-linear-gradient(-31deg, rgb(255 255 255 / .07) 0 1px, transparent 1px 13px);
  animation: frost .9s var(--soft); }
@keyframes frost { from { opacity: 0; } }
:root[data-frozen][data-theme="dark"] { --stage: oklch(19.5% 0.018 240); }
:root[data-frozen][data-theme="light"] { --stage: oklch(94% 0.016 232); }
:root[data-frozen] [data-live] { opacity: .45; }

/* ---------- shared pieces ---------- */
.desk-title, .asset-head { display: none; }
.page-title { font: 600 30px/1.1 var(--f-display); letter-spacing: -0.015em; padding: 8px 4px 14px; }
.actions { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 10px; margin: 18px 0 6px; }
.act { display: flex; align-items: center; justify-content: center; gap: 8px; height: 52px; border-radius: 18px; background: var(--raise); font: 600 15px var(--f-display); white-space: nowrap; transition: transform .18s var(--spring), background-color .15s; }
.act .ic { width: 20px; height: 20px; }
.act .long { display: none; }
.act:first-child { background: var(--ink); color: var(--inv); }
.act[data-pressed] { transform: scale(.95); }
@media (hover: hover) { .act:hover:not(:first-child) { background: var(--raise-2); } }
.hint { display: flex; align-items: flex-start; gap: 8px; margin: 12px 0 0; padding: 12px 8px 12px 14px; border-radius: 16px; border: 1px dashed var(--rule); font-size: 14px; color: var(--ink-2); line-height: 1.4; }
.hint span { flex: 1; }

.list-sec { margin-top: 18px; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; padding: 0 4px 2px; }
.sec-head h2 { font: 600 15px var(--f-display); color: var(--muted); }
.sec-head a { font-size: 14px; font-weight: 500; color: var(--ink-2); padding: 10px 0 10px 12px; text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: 4px; }
.rows { display: grid; }
.row { position: relative; isolation: isolate; display: flex; align-items: center; gap: 12px; min-height: 62px; padding: 8px 4px; text-align: left; width: 100%; transition: transform .18s var(--spring); }
.row + .row { border-top: 1px solid var(--rule); }
.row::after { content: ""; position: absolute; inset: 3px -8px; border-radius: 14px; background: var(--raise); opacity: 0; z-index: -1; transition: opacity .15s; }
@media (hover: hover) { a.row:hover::after, button.row:hover::after { opacity: .7; } }
.row[data-pressed] { transform: scale(.985); }
.row[data-pressed]::after { opacity: 1; }
.card-rows .row::after { background: var(--raise-2); inset: 3px -6px; }
.row-ic, .av { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.row-ic { background: var(--raise); color: var(--ink-2); }
.row-ic .ic { width: 20px; height: 20px; }
.av { background: oklch(52% 0.09 var(--hue)); color: oklch(98% 0.01 var(--hue)); font: 600 13px var(--f-display); }
.av.sq { border-radius: 12px; }
.row-main { flex: 1; min-width: 0; display: grid; }
.row-who { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-sub { font-size: 14px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row > .ic { width: 18px; height: 18px; color: var(--muted); }
.amt { font: 600 16px var(--f-display); font-variant-numeric: tabular-nums; white-space: nowrap; }
.amt.in { color: var(--safe); }
.amt.off { color: var(--muted); text-decoration: line-through; text-decoration-thickness: 1px; }
.tx-blocked .row-who { color: var(--muted); }
.empty { color: var(--muted); padding: 16px 4px; font-size: 15px; }
.card { background: var(--raise); border-radius: 20px; padding: 4px 16px; }
.card-rows { background: var(--raise); border-radius: 20px; padding: 2px 12px; }
.card-rows.second { margin-top: 14px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.dot.ok { background: var(--safe); }
.dot.cold { background: var(--frost); }
.state { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; color: var(--muted); white-space: nowrap; }
.state.ok { color: var(--safe); }
.state .ic { width: 16px; height: 16px; }

.kv { display: grid; }
.kv > div { display: flex; justify-content: space-between; gap: 18px; padding: 14px 0; align-items: baseline; }
.kv > div + div { border-top: 1px solid var(--rule); }
.kv dt { color: var(--muted); flex: none; }
.kv dd { text-align: right; font-weight: 500; min-width: 0; }
.kv dd small { display: block; font-size: 13px; color: var(--muted); font-weight: 400; }
.kv .up { color: var(--safe); } .kv .down { color: var(--danger); }
.kv .wrap { word-break: break-all; font-size: 12px; line-height: 1.5; max-width: 22ch; }
.kv dd.to { display: flex; align-items: center; gap: 10px; text-align: left; }
.kv dd.to .av { width: 32px; height: 32px; font-size: 11px; }
.kv dd.to span { display: grid; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 48px; padding: 0 20px; border-radius: 16px; background: var(--ink); color: var(--inv); font: 600 16px var(--f-display); transition: transform .18s var(--spring), opacity .2s, background-color .2s; }
.btn .ic { width: 20px; height: 20px; }
.btn[data-pressed] { transform: scale(.96); }
.btn:disabled { opacity: .32; cursor: default; }
.btn.quiet { background: var(--raise); color: var(--ink); }
@media (hover: hover) { .btn.quiet:hover { background: var(--raise-2); } }
.btn.block { display: flex; width: 100%; margin-top: 10px; }
.btn.big { height: 58px; border-radius: 20px; font-size: 17px; }
.btn.sm { height: 40px; padding: 0 14px; border-radius: 13px; font-size: 14px; }
.btn.sm .ic { width: 16px; height: 16px; }
.btn.is-copied { background: var(--safe); color: var(--inv); }
.textlink { display: block; text-align: center; padding: 16px; font-weight: 500; text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: 4px; }
.lead { font-size: 17px; line-height: 1.45; color: var(--ink-2); margin: 6px 4px 18px; }
.center { text-align: center; }
.foot-note { font-size: 14px; color: var(--muted); margin: 14px 4px 0; line-height: 1.45; }
.chip { display: inline-flex; align-items: center; height: 30px; padding: 0 12px; border-radius: 10px; font: 600 13px var(--f-display); color: var(--p-ink); background: linear-gradient(172deg, var(--p-a), var(--p-b)); box-shadow: inset 0 1px 0 var(--p-edge); font-variant-numeric: tabular-nums; }
.seg { display: flex; gap: 2px; padding: 4px; border-radius: 16px; background: var(--raise); margin: 0 0 16px; }
.seg > * { flex: 1; height: 40px; border-radius: 12px; display: grid; place-items: center; font: 600 14px var(--f-display); color: var(--muted); transition: background-color .2s, color .2s, transform .15s; white-space: nowrap; }
.seg > [aria-pressed="true"], .seg > [aria-current] { background: var(--ink); color: var(--inv); }
.seg > [data-pressed] { transform: scale(.95); }

.vh { display: flex; align-items: center; gap: 4px; height: calc(56px + env(safe-area-inset-top)); padding-top: env(safe-area-inset-top); margin: 0 -8px 8px; }
.vh h1 { font: 600 19px var(--f-display); flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vh-right { padding-right: 8px; }

/* ---------- send ---------- */
.paste { display: flex; align-items: center; gap: 8px; background: var(--raise); border-radius: 18px; padding: 6px 6px 6px 16px; border: 1px solid transparent; transition: border-color .2s; }
.paste:focus-within { border-color: var(--focus); }
.paste input { flex: 1; min-width: 0; height: 44px; border: 0; background: none; color: var(--ink); font: 400 16px var(--f-text); outline: none; }
.paste input::placeholder { color: var(--muted); }
.try { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 12px 4px 4px; font-size: 14px; color: var(--muted); }
.chipbtn { height: 36px; padding: 0 12px; border-radius: 12px; border: 1px dashed var(--rule); color: var(--ink-2); font-size: 14px; transition: transform .15s, background-color .15s; }
@media (hover: hover) { .chipbtn:hover { background: var(--raise); } }
.chipbtn[data-pressed] { transform: scale(.95); }
.stop, .check { margin-top: 14px; padding: 18px 16px 16px; border-radius: 22px; background: var(--raise); animation: land .4s var(--spring); }
.stop { box-shadow: inset 0 0 0 1.5px var(--danger); animation: land .4s var(--spring), nudge .4s .05s; }
@keyframes land { from { opacity: 0; transform: translateY(14px) scale(.98); } }
@keyframes nudge { 20% { translate: -6px 0; } 45% { translate: 5px 0; } 70% { translate: -3px 0; } }
.stop h2, .check h2 { font: 600 20px/1.2 var(--f-display); display: flex; align-items: center; gap: 8px; }
.stop h2 .ic { color: var(--danger); }
.stop p, .check p { margin-top: 6px; color: var(--ink-2); }
.stop p.muted { font-size: 14px; color: var(--muted); margin: 0 0 6px; }
.cmp { display: grid; gap: 12px; margin: 16px 0 14px; }
.cmp-row { display: grid; gap: 6px; }
.cmp-lab { font-size: 13px; color: var(--muted); }
.cmp-row.bad .cmp-lab { color: var(--danger); }
.groups { display: grid; grid-template-columns: repeat(5, max-content); gap: 4px 12px; font-size: 15px; line-height: 1.5; }
.groups mark { background: var(--safe-wash); color: var(--safe); border-radius: 3px; padding: 0 .5px; }
.cmp-row.bad .groups mark { background: var(--danger-wash); color: var(--danger); }
.check-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin: 16px 0 8px; }
.check-grid span { display: grid; gap: 2px; padding: 8px 0 10px; border-radius: 12px; background: var(--stage); text-align: center; font-size: 16px; }
.check-grid small { font: 400 11px var(--f-text); color: var(--muted); }

.amount { flex: 1; display: grid; place-content: center; text-align: center; min-height: 150px; padding: 12px 0; }
.amount-fig { font: 500 clamp(40px, calc(330px / var(--len, 4) * 1.5), 88px)/1 var(--f-display); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.amount-fig.shake { animation: nudge .35s; color: var(--danger); }
.amount-sub { margin-top: 10px; color: var(--muted); }
.amount-sub.is-over { color: var(--danger); }
.pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin-bottom: 8px; }
.key { height: 62px; border-radius: 18px; font: 500 27px var(--f-display); display: grid; place-items: center; transition: background-color .25s, transform .15s var(--spring); touch-action: manipulation; }
.key[data-pressed] { background: var(--raise-2); transform: scale(.92); transition: none; }
@media (hover: hover) { .key:hover { background: var(--raise); } }

.review-plate { position: relative; top: auto; height: 104px; --strip: 104px; margin: 6px 0 16px; touch-action: auto;
  transform: perspective(800px) rotateY(calc(var(--lean, 0) * 16deg)) rotateX(calc(var(--lean, 0) * 5deg)) translateX(calc(var(--lean, 0) * 8px)); transition: none; }
.review-plate .plate-body { padding-bottom: 0; }
.review-plate .plate-name, .review-plate .plate-val { font-size: 22px; }
.review-plate .sheen { opacity: 1; }
.review-kv { margin-bottom: 20px; }
.sign-phone { margin-top: auto; }
.sign-desk { display: none; }
.slide { position: relative; height: 68px; border-radius: 34px; background: var(--raise); overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none;
  background-image: radial-gradient(circle at center, var(--rule) 1.5px, transparent 2px); background-size: 12.5% 100%; background-position: 6.25% 0; background-color: var(--raise); }
.slide-fill { position: absolute; left: 0; top: 0; bottom: 0; width: calc(var(--x, 0px) + 66px); border-radius: 34px; background: linear-gradient(90deg, var(--usd-b), var(--usd-a)); opacity: calc(.25 + var(--p) * .75); }
.slide-label { position: absolute; inset: 0; display: grid; place-items: center; padding-left: 44px; font: 600 16px var(--f-display); color: var(--ink-2); opacity: calc(1 - var(--p) * 2.2); pointer-events: none; }
.slide-thumb { position: absolute; left: 4px; top: 4px; width: 60px; height: 60px; border-radius: 50%; background: var(--ink); color: var(--inv); display: grid; place-items: center; transform: translateX(var(--x, 0px)); box-shadow: 0 4px 14px rgb(0 0 0 / .35); touch-action: none; cursor: grab; }
.slide.is-held .slide-thumb { cursor: grabbing; scale: 1.06; }
.slide.is-done .slide-thumb { background: var(--safe); }
.settling { position: fixed; inset: 0; z-index: 60; background: var(--stage); display: grid; place-content: center; justify-items: center; gap: 8px; opacity: 0; transition: opacity .25s; }
.settling.on { opacity: 1; }
.settling p { font: 600 19px var(--f-display); color: var(--ink-2); }
.settling-seal, .done-seal, .open-seal { position: relative; width: 240px; height: 240px; color: var(--ink-2); }
.seal { width: 100%; height: 100%; display: block; }
.seal path { stroke-dasharray: 1; stroke-dashoffset: 0; }
.settling.on .seal-a, .open.on .seal-a { animation: draw 1.5s cubic-bezier(.3, 0, .2, 1) backwards; }
.settling.on .seal-b, .open.on .seal-b { animation: draw 1.2s .15s cubic-bezier(.3, 0, .2, 1) backwards; }
.settling.on .settling-seal { animation: spin 6s linear infinite; }
@keyframes draw { from { stroke-dashoffset: 1; } }
@keyframes spin { to { rotate: 360deg; } }

.done { min-height: calc(100dvh - 40px); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 24px 4px; }
.done-seal { margin-bottom: 8px; color: var(--muted); }
.done-check { position: absolute; inset: 0; margin: auto; width: 76px; height: 76px; border-radius: 50%; background: var(--safe); color: var(--inv); display: grid; place-items: center; animation: pop-in .5s var(--spring) backwards .05s; }
.done-check .ic { width: 38px; height: 38px; stroke-width: 2.2; }
@keyframes pop-in { from { transform: scale(.3); opacity: 0; } }
.done h1 { font: 600 28px/1.15 var(--f-display); letter-spacing: -0.015em; max-width: 14ch; }
.done p { color: var(--muted); margin: 10px 0 26px; }

/* ---------- link, receive ---------- */
.linkcard, .rc { position: relative; top: auto; touch-action: auto; }
.linkcard { height: 150px; margin: 6px 0 18px; }
.linkcard .plate-body { justify-content: center; gap: 6px; padding: 0 22px; }
.link-amt { position: relative; font: 600 40px/1 var(--f-display); letter-spacing: -0.02em; }
.link-url { position: relative; font-size: 12px; opacity: .75; }
.share-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 18px 0 8px; }
.share-app { display: grid; justify-items: center; gap: 8px; padding: 14px 0; border-radius: 16px; font-size: 13px; background: var(--raise-2); transition: transform .15s; }
.share-app[data-pressed] { transform: scale(.94); }
.rc { height: 272px; margin: 0 auto 16px; width: 100%; }
.rc .plate-body { padding: 0; display: grid; place-items: center; justify-content: center; }
.qr { position: relative; width: 204px; height: 204px; background: oklch(98.5% 0.003 240); color: oklch(18% 0.01 255); border-radius: 18px; padding: 12px; box-shadow: 0 10px 24px -8px rgb(0 0 0 / .45), inset 0 0 0 1px rgb(0 0 0 / .06); }
.qr svg { width: 100%; height: 100%; display: block; }
.net-one { text-align: center; color: var(--muted); margin-bottom: 14px; }
.addr { display: flex; justify-content: center; gap: 10px; padding: 14px 12px; border-radius: 18px; background: var(--raise); font-size: 15px; }
.addr .pre { color: var(--muted); line-height: 1.5; }
.addr .groups { grid-template-columns: repeat(5, max-content); }

/* ---------- activity detail ---------- */
.tx-head { padding: 6px 4px 18px; }
.tx-who { font: 600 22px var(--f-display); }
.tx-amt .amt { font-size: 46px; letter-spacing: -0.025em; line-height: 1.1; }
.note { padding: 16px; margin-top: 12px; display: grid; gap: 10px; }
.note h2 { font: 600 18px var(--f-display); }
.note .textlink { text-align: left; padding: 4px 0; }
.details { margin-top: 14px; border-radius: 20px; background: var(--raise); padding: 0 16px; }
.details summary { list-style: none; display: flex; align-items: center; justify-content: space-between; height: 52px; font-weight: 600; cursor: pointer; color: var(--ink-2); }
.details summary::-webkit-details-marker { display: none; }
.details summary .ic { width: 18px; height: 18px; transition: rotate .25s var(--spring); }
.details[open] summary .ic { rotate: 180deg; }
.details .kv { border-top: 1px solid var(--rule); font-size: 15px; }

/* ---------- safety ---------- */
.safe-row { min-height: 72px; }
.sw-row { cursor: pointer; min-height: 68px; }
.sw { appearance: none; -webkit-appearance: none; width: 52px; height: 32px; border-radius: 16px; background: var(--raise-2); position: relative; flex: none; cursor: pointer; transition: background-color .25s; margin: 0; }
.sw::after { content: ""; position: absolute; left: 3px; top: 3px; width: 26px; height: 26px; border-radius: 50%; background: oklch(98% 0 0); box-shadow: 0 2px 6px rgb(0 0 0 / .3); transition: transform .3s var(--spring); }
.sw:checked { background: var(--safe); }
.sw:checked::after { transform: translateX(20px); }
.freeze-stage { display: grid; place-items: center; height: 260px; }
.freeze-orb { position: relative; width: 156px; height: 156px; border-radius: 50%; display: grid; place-items: center; background: var(--raise); color: var(--ink); touch-action: none; user-select: none; -webkit-user-select: none; transition: transform .3s var(--spring), background-color .4s, color .4s;
  box-shadow: inset 0 1.5px 0 rgb(255 255 255 / .12), 0 18px 40px -16px rgb(0 0 0 / .5); }
.freeze-orb .ic { width: 56px; height: 56px; stroke-width: 1.3; position: relative; }
.freeze-orb[data-holding] { transform: scale(.94); color: var(--frost); }
.orb-fill { position: absolute; inset: -10px; border-radius: 50%; background: conic-gradient(var(--frost) calc(var(--p, 0) * 360deg), transparent 0); -webkit-mask: radial-gradient(circle, transparent 82px, #000 83px); mask: radial-gradient(circle, transparent 82px, #000 83px); }
.freeze-stage.is-frozen .freeze-orb { background: var(--frost); color: var(--frost-ink); box-shadow: 0 0 0 10px color-mix(in oklch, var(--frost) 22%, transparent), 0 0 0 24px color-mix(in oklch, var(--frost) 9%, transparent); animation: pop-in .6s var(--spring); }

/* ---------- sheets, approval, opening ---------- */
.sheet-wrap { position: fixed; inset: 0; z-index: 70; display: flex; align-items: flex-end; justify-content: center; }
.scrim { position: absolute; inset: 0; background: rgb(0 0 0 / .5); opacity: 0; transition: opacity .3s; }
.sheet { position: relative; width: 100%; max-width: 520px; background: var(--raise); border-radius: 28px 28px 0 0; padding: 10px 20px calc(20px + env(safe-area-inset-bottom)); box-shadow: var(--sheet-shadow); transform: translateY(105%); transition: transform .5s var(--spring); outline: none; }
.sheet-wrap.on .scrim { opacity: 1; }
.sheet-wrap.on .sheet { transform: translateY(var(--drag, 0px)); }
.grab { width: 100%; height: 26px; margin-bottom: 6px; touch-action: none; cursor: grab; display: grid; place-items: center; }
.grab::after { content: ""; width: 40px; height: 5px; border-radius: 3px; background: var(--rule); }
.sheet h2 { font: 600 22px/1.2 var(--f-display); margin-bottom: 6px; }
.sheet .kv { margin: 10px 0 6px; }
.sheet .btn.quiet, .stop .btn.quiet, .check .btn.quiet { background: var(--raise-2); }

.fid { position: fixed; inset: 0; z-index: 80; display: grid; place-content: center; justify-items: center; gap: 14px; background: color-mix(in oklch, var(--stage) 70%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); opacity: 0; transition: opacity .2s; }
.fid.on { opacity: 1; }
.fid-box { position: relative; width: 104px; height: 104px; border-radius: 30px; background: var(--raise); display: grid; place-items: center; box-shadow: 0 20px 50px -12px rgb(0 0 0 / .55); transform: scale(.8); transition: transform .4s var(--spring), background-color .25s; overflow: hidden; }
.fid.on .fid-box { transform: scale(1); }
.fid-box > span { grid-area: 1 / 1; display: grid; transition: opacity .2s, transform .35s var(--spring); }
.fid-box .ic { width: 60px; height: 60px; stroke-width: 1.3; }
.fid-box::after { content: ""; position: absolute; left: 0; right: 0; height: 40%; top: -40%; background: linear-gradient(to bottom, transparent, color-mix(in oklch, var(--ink) 22%, transparent)); animation: scan .64s ease-in-out; }
@keyframes scan { to { top: 100%; } }
.fid-check { opacity: 0; transform: scale(.4); color: var(--inv); }
.fid.ok .fid-box { background: var(--safe); }
.fid.ok .fid-glyph { opacity: 0; }
.fid.ok .fid-check { opacity: 1; transform: scale(1); }
.fid p { font: 600 16px var(--f-display); color: var(--ink-2); }

.open { position: fixed; inset: 0; z-index: 90; background: var(--stage); display: grid; place-content: center; justify-items: center; gap: 22px; transition: opacity .45s, transform .6s var(--soft); outline: none; }
.open.out { opacity: 0; transform: scale(1.06); pointer-events: none; }
.open-seal { width: 280px; height: 280px; color: var(--muted); }
.open-glyph { position: absolute; inset: 0; display: grid; place-items: center; color: var(--ink); transition: transform .4s var(--spring), opacity .3s; }
.open-glyph .ic { width: 64px; height: 64px; stroke-width: 1.2; }
.open.ok .open-glyph { transform: scale(1.25); opacity: 0; }
.open-name { display: flex; align-items: center; gap: 10px; font: 700 20px var(--f-display); letter-spacing: -0.02em; }
.open-skip { position: absolute; right: 16px; top: calc(12px + env(safe-area-inset-top)); height: 44px; padding: 0 14px; color: var(--muted); font-size: 15px; }

.toast { position: fixed; left: 50%; bottom: calc(92px + env(safe-area-inset-bottom)); z-index: 95; translate: -50% 20px; max-width: min(92vw, 420px); padding: 12px 18px; border-radius: 16px; background: var(--ink); color: var(--inv); font-size: 15px; font-weight: 500; text-align: center; opacity: 0; pointer-events: none; transition: opacity .25s, translate .4s var(--spring); }
.toast.on { opacity: 1; translate: -50% 0; }

/* the stand-in phone, used on desktop only */
.handoff { display: grid; grid-template-columns: 1fr 240px; gap: 40px; align-items: center; }
.handoff-copy p { color: var(--ink-2); margin: 8px 0 12px; }
.handoff .kv { margin: 0 0 14px; }
.waiting { display: flex; align-items: center; gap: 10px; font-weight: 500; }
.pulse { width: 10px; height: 10px; border-radius: 50%; background: var(--warn); animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .25; scale: .7; } }
.phone { position: relative; height: 420px; border-radius: 40px; background: var(--stage); border: 2px solid var(--rule); box-shadow: 0 0 0 6px var(--stage-2), 0 30px 60px -20px rgb(0 0 0 / .6); padding: 44px 18px 18px; display: flex; flex-direction: column; align-items: center; text-align: center; overflow: hidden; }
.phone-island { position: absolute; top: 12px; left: 50%; translate: -50% 0; width: 70px; height: 20px; border-radius: 10px; background: #000; }
.phone-seal { width: 150px; height: 150px; color: var(--muted); margin-bottom: 4px; }
.phone.is-signed .phone-seal { color: var(--safe); transition: color .3s; }
.phone-title { font: 600 18px/1.2 var(--f-display); }
.phone-detail { color: var(--muted); font-size: 14px; margin-top: 4px; }
.holdbtn { position: relative; margin-top: auto; width: 100%; height: 54px; border-radius: 18px; background: var(--raise-2); overflow: hidden; font: 600 15px var(--f-display); touch-action: none; user-select: none; -webkit-user-select: none; transition: transform .2s var(--spring); }
.holdbtn[data-holding] { transform: scale(.97); }
.hold-fill { position: absolute; inset: 0; background: var(--ink); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); }
.hold-label { position: relative; display: flex; align-items: center; justify-content: center; gap: 8px; mix-blend-mode: difference; color: #fff; }
.hold-label .ic { width: 20px; height: 20px; }
.holdbtn.is-done .hold-fill { background: var(--safe); transform: none; }
.holdbtn.is-done .hold-label { mix-blend-mode: normal; color: var(--inv); }
.standin-note { font-size: 13px; color: var(--muted); text-align: center; margin-top: 14px; }

/* ---------- phone-only chrome rules ---------- */
@media (max-width: 1023.98px) {
  .app[data-flow] .top, .app[data-flow] .tabs, .app:has(.view > .vh) .top { display: none; }
  .app[data-flow] { padding-bottom: calc(20px + env(safe-area-inset-bottom)); }
  .app[data-view="amount"] .view, .app[data-view="review"] .view { display: flex; flex-direction: column; min-height: calc(100dvh - 24px - env(safe-area-inset-bottom)); }
  .spark { display: none; }
  .app[data-view="home"] .list-sec .row:nth-child(n+4) { display: none; }
}
@media (max-width: 1023.98px) and (max-height: 760px) {
  :root { --strip: 54px; --plate-h: 170px; }
  .rack-head { min-height: 88px; } .total-fig { font-size: 38px; }
  .key { height: 54px; }
}

/* ---------- desktop: the rack stands on the left ---------- */
@media (min-width: 1024px) {
  :root { --strip: 88px; --plate-h: 236px; --r-plate: 26px; }
  .app { max-width: none; padding-bottom: 0; }
  .top { position: sticky; top: 0; z-index: 30; height: 68px; padding: 0 32px; background: color-mix(in oklch, var(--stage) 86%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-bottom: 1px solid var(--rule); }
  .ws-wrap { flex: 1; }
  .topnav { display: flex; gap: 4px; }
  .topnav a { height: 40px; padding: 0 16px; border-radius: 12px; display: grid; place-items: center; font: 600 15px var(--f-display); color: var(--muted); transition: background-color .15s, color .15s; }
  .topnav a:hover { color: var(--ink); }
  .topnav a[aria-current] { background: var(--raise); color: var(--ink); }
  .top-right { flex: 1; justify-content: flex-end; }
  .tabs { display: none; }
  .frozen-bar { max-width: 1116px; margin: 16px auto 0; width: calc(100% - 64px); }
  .body { flex-direction: row; align-items: flex-start; gap: 88px; max-width: 1180px; width: 100%; margin: 0 auto; padding: 44px 32px 80px; }
  .rack, .app[data-rack] .rack { display: block; width: 408px; flex: none; position: sticky; top: 112px; }
  .rack[data-lifted] .rack-head { min-height: 104px; }
  .rack[data-lifted] .total { display: grid; }
  .rack[data-lifted] .rack-back { display: none; }
  .rack[data-lifted] .stack { height: calc(var(--strip) * 3 + var(--plate-h)); }
  .plate { touch-action: auto; }
  .plate, .plate.is-lifted, .rack[data-lifted] .plate:not(.is-lifted) { transform: translateY(calc((var(--slot, var(--i)) - var(--i)) * var(--strip))); z-index: calc(var(--slot, var(--i)) + 1); opacity: 1; pointer-events: auto; transition: transform .65s var(--spring); }
  .plate:not(.is-front):hover { transform: translateY(calc((var(--slot, var(--i)) - var(--i)) * var(--strip) - 8px)); }
  .plate:hover .plate-body { transform: perspective(900px) rotateX(calc((var(--py, .5) - .5) * -5deg)) rotateY(calc((var(--px, .5) - .5) * 5deg)); }
  .plate.is-lifted:not(.is-front) .plate-val { transform: none; }
  .total-fig { font-size: 52px; }
  .view { flex: 1; max-width: 540px; min-width: 0; padding-top: 6px; }
  .desk-title { display: block; font: 600 34px/1.1 var(--f-display); letter-spacing: -0.02em; margin-bottom: 8px; }
  .asset-head { display: block; margin-bottom: 4px; }
  .asset-head h1 { font: 600 20px var(--f-display); color: var(--muted); }
  .asset-fig { font: 500 56px/1.1 var(--f-display); letter-spacing: -0.025em; font-variant-numeric: tabular-nums; }
  .page-title { font-size: 34px; padding-top: 0; }
  .actions { margin-top: 20px; grid-auto-columns: minmax(0, 176px); justify-content: start; }
  .act { height: 50px; }
  .act .long { display: inline; } .act .short { display: none; }
  .vh { height: 48px; margin-bottom: 14px; }
  .vh h1 { font-size: 24px; }
  .spark { position: relative; margin-top: 22px; padding: 18px 20px 14px; }
  .spark-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
  .spark-head h2 { font: 600 15px var(--f-display); color: var(--muted); }
  .spark svg { width: 100%; height: 120px; display: block; overflow: visible; }
  .spark-line { fill: none; stroke: var(--ink); stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
  .spark-area { fill: color-mix(in oklch, var(--ink) 6%, transparent); }
  .spark-dot { display: none; }
  .amount { min-height: 190px; }
  .pad { max-width: 380px; margin: 0 auto 12px; width: 100%; }
  .key { height: 56px; }
  .sign-phone { display: none; }
  .sign-desk { display: block; }
  .done { min-height: 520px; }
  .rc { max-width: 380px; }
  .settling { background: color-mix(in oklch, var(--stage) 88%, transparent); backdrop-filter: blur(12px); }
  .sheet-wrap { align-items: center; }
  .sheet { border-radius: 28px; max-width: 460px; padding: 22px 24px 24px; transform: translateY(30px) scale(.96); opacity: 0; transition: transform .4s var(--spring), opacity .2s; }
  .sheet-wrap.on .sheet { transform: none; opacity: 1; }
  .sheet-wrap.modal .sheet { max-width: 760px; padding: 36px 40px; }
  .grab { display: none; }
  .toast { bottom: 36px; }
  .hint { margin-top: 16px; }
  .cmp .groups { grid-template-columns: repeat(10, max-content); }
}

/* ---------- the mark in motion (shared/mark.mjs) ---------- */
.mk-field { color: var(--ink); }
.mk-load { width: 15px; height: 15px; }
.btn .mk-load { margin-right: 8px; vertical-align: -2px; }

/* opening: the points gather into the mark, then let go as the plates drop in */
.open { display: block; }
.open-field, .settling-field { position: absolute; inset: 0; -webkit-mask: radial-gradient(circle closest-side at center, #000 38%, transparent 96%); mask: radial-gradient(circle closest-side at center, #000 38%, transparent 96%); }
.open-low { position: absolute; left: 0; right: 0; bottom: calc(12% + env(safe-area-inset-bottom)); display: grid; justify-items: center; gap: 20px; }
.open-lockup { height: 36px; width: auto; opacity: 0; transform: translateY(8px); transition: opacity .7s .45s, transform .9s .45s var(--soft); }
.open.on .open-lockup { opacity: 1; transform: none; }
.open-fid { display: grid; grid-template-columns: 22px auto; align-items: center; gap: 8px; height: 24px; color: var(--muted); font: 500 15px var(--f-text); opacity: 0; transition: opacity .5s .7s; }
.open.on .open-fid { opacity: 1; }
.open-fid .open-glyph, .open-fid .open-ok { position: static; inset: auto; grid-area: 1 / 1; display: grid; place-items: center; color: inherit; transition: opacity .25s, transform .4s var(--spring); }
.open-fid .ic { width: 22px; height: 22px; stroke-width: 1.5; }
.open-fid .open-ok { opacity: 0; transform: scale(.4); color: var(--safe); }
.open.ok .open-fid .open-glyph { opacity: 0; transform: scale(.6); }
.open.ok .open-fid .open-ok { opacity: 1; transform: none; }
.open.out { transform: none; }

/* sending and sent */
.settling { display: block; }
.settling p { position: absolute; left: 0; right: 0; top: calc(50% + min(52vw, 260px)); text-align: center; }
.done-mark { position: relative; width: 230px; height: 230px; margin-bottom: 2px; }
.done-mark .done-check { inset: auto 38px 38px auto; margin: 0; width: 38px; height: 38px; box-shadow: 0 0 0 4px var(--stage); animation-delay: .55s; }
.done-mark .done-check .ic { width: 20px; height: 20px; stroke-width: 2.4; }

/* freeze: the points lock into a rigid grid */
.freeze-stage { height: 290px; }
.freeze-orb { width: 208px; height: 208px; }
.freeze-orb .mk-field { position: absolute; inset: 30px; width: calc(100% - 60px); height: calc(100% - 60px); }
.orb-fill { -webkit-mask: radial-gradient(circle, transparent 108px, #000 109px); mask: radial-gradient(circle, transparent 108px, #000 109px); }
.freeze-stage.is-frozen .freeze-orb { background: var(--raise); color: var(--frost); animation: none; }

/* pull to refresh */
.ptr { position: fixed; left: 50%; top: calc(env(safe-area-inset-top) + 56px + (var(--pull, 0px) - 50px) / 2); width: 50px; height: 50px; margin-left: -25px; z-index: 4; pointer-events: none; opacity: 0; transition: opacity .2s, top .42s var(--spring); }
.ptr.on { opacity: 1; }
.app .body { padding-top: var(--pull, 0px); transition: padding-top .42s var(--spring); }
.app.is-pulling .body { transition: none; }
.app.is-pulling ~ .ptr { transition: opacity .2s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
