/* Concept P3, Circle. Daylight first: a cool ground, true black type, one ultramarine ink. */
@font-face { font-family: "Bricolage"; src: url("../fonts/bricolage-grotesque-latin-opsz-normal.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "Bricolage Narrow"; src: url("../fonts/bricolage-grotesque-latin-wdth-normal.woff2") format("woff2"); font-weight: 200 800; font-stretch: 75% 100%; 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 {
  --ground: #F2F4F8; --surface: #FFFFFF; --surface-2: #E7EBF2; --ink: #000000; --ink-2: #232832; --muted: #596273; --rule: #D9DFE9;
  --blue: #1D3BFF; --blue-t: #1D3BFF; --on-blue: #FFFFFF; --blue-wash: #E1E7FF;
  --stop: #C8260D; --stop-wash: #FFE4DD; --up: #0A7446; --ice: #5F7E9E; --ice-wash: #DCE8F2;
  --av-l: 88%; --av-c: 0.085; --av-tl: 28%;
  --font: "Bricolage", ui-sans-serif, system-ui, sans-serif;
  --narrow: "Bricolage Narrow", "Bricolage", ui-sans-serif, sans-serif;
  --mono: "Fragment Mono", ui-monospace, monospace;
  --spring: cubic-bezier(0.2, 1.35, 0.4, 1); --out: cubic-bezier(0.16, 1, 0.3, 1);
  --sat: env(safe-area-inset-top, 0px); --sab: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}
[data-theme="dark"] {
  --ground: #050816; --surface: #0D1228; --surface-2: #171D3A; --ink: #FFFFFF; --ink-2: #DADFF0; --muted: #96A0BF; --rule: #222A4B;
  --blue: #3554FF; --blue-t: #8EA2FF; --on-blue: #FFFFFF; --blue-wash: #161F4D;
  --stop: #FF6B52; --stop-wash: #3A1410; --up: #4FD39A; --ice: #8FB2D3; --ice-wash: #13233A;
  --av-l: 36%; --av-c: 0.09; --av-tl: 93%;
  color-scheme: dark;
}
[data-frozen] { --blue: var(--ice); --blue-t: var(--ice); --blue-wash: var(--ice-wash); }
[data-theme="dark"][data-frozen] { --blue: #4D6C8C; }

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; margin: 0; }
body { font: 400 16px/1.4 var(--font); font-optical-sizing: auto; color: var(--ink); background: var(--ground); -webkit-font-smoothing: antialiased; overscroll-behavior: none; }
h1, h2, p, ul, ol { margin: 0; padding: 0; } ul, ol { list-style: none; }
a { color: inherit; text-decoration: none; } button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-align: inherit; }
small { font-size: 0.8125rem; color: var(--muted); }
.mono, .addr { font-family: var(--mono); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
:focus-visible { outline: 3px solid var(--blue-t); outline-offset: 3px; border-radius: 12px; }
.main:focus { outline: none; }
.i { width: 22px; height: 22px; flex: none; }
.mark { width: 22px; height: 22px; }

/* ---------- frame ---------- */
.app { position: fixed; inset: 0; display: flex; flex-direction: column; }
.side, .ctx { display: none; }
.main { flex: 1; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; padding-top: var(--sat); scrollbar-width: none; }
.main::-webkit-scrollbar { display: none; }
.screen { min-height: 100%; padding: 0 20px calc(120px + var(--sab)); display: flex; flex-direction: column; max-width: 560px; margin: 0 auto; }
.screen.push { animation: push 0.3s var(--out); } .screen.pop { animation: pop 0.3s var(--out); } .screen.swap { animation: swap 0.16s linear; }
@keyframes push { from { transform: translateX(28px); opacity: 0; } } @keyframes pop { from { transform: translateX(-28px); opacity: 0; } } @keyframes swap { from { opacity: 0.4; } }

/* ---------- shared pieces ---------- */
.top, .bar { display: flex; align-items: center; gap: 12px; min-height: 64px; padding-top: 8px; }
.top { justify-content: space-between; }
.bar h1 { flex: 1; font-size: 1.0625rem; font-weight: 650; text-align: center; }
.bar-r { width: 44px; flex: none; }
.h-tab { font: 750 2.25rem/1 var(--narrow); font-stretch: 82%; letter-spacing: -0.02em; }
.round { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--surface); transition: transform 0.18s var(--spring); }
[data-pressed] { transform: scale(0.955); }
.round[data-pressed] { transform: scale(0.88); }

.av { --h: 250; width: 44px; height: 44px; flex: none; display: inline-grid; place-items: center; border-radius: 50%; font-weight: 700; font-size: 0.9375rem; letter-spacing: 0.01em;
  background: oklch(var(--av-l) var(--av-c) var(--h)); color: oklch(var(--av-tl) 0.11 var(--h)); position: relative; }
.av.lg { width: 60px; height: 60px; font-size: 1.1875rem; } .av.xl { width: 92px; height: 92px; font-size: 1.875rem; }
.av.me { width: 32px; height: 32px; font-size: 0.75rem; background: var(--ink); color: var(--ground); }
.av.glyph, .av.add { background: var(--surface-2); color: var(--ink); } .av.xl .i { width: 34px; height: 34px; }
.av.k-link { background: var(--blue-wash); color: var(--blue-t); } .av.k-blocked { background: var(--stop-wash); color: var(--stop); }
.av.fake { background: var(--stop-wash); color: var(--stop); outline: 2px dashed var(--stop); outline-offset: 3px; }
[data-frozen] .av:not(.me):not(.glyph) { filter: saturate(0.25); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px; border-radius: 999px; background: var(--surface); font-weight: 650; position: relative; overflow: hidden; transition: transform 0.2s var(--spring), background 0.15s; white-space: nowrap; }
.btn.blue { background: var(--blue); color: var(--on-blue); }
.btn.big { min-height: 58px; font-size: 1.0625rem; width: 100%; }
.btn.small { min-height: 44px; padding: 0 16px; font-size: 0.9375rem; background: var(--surface-2); }
.btn.quiet { background: none; } .btn.danger { color: var(--stop); }
.btn:disabled { opacity: 0.4; cursor: default; }
.btn .fill { position: absolute; inset: 0; background: color-mix(in oklab, var(--on-blue) 26%, transparent); transform-origin: left; transform: scaleX(var(--p, 0)); }
.btn .lbl { position: relative; display: inline-flex; align-items: center; gap: 8px; }
.btn.did { background: var(--up); color: #fff; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 16px; border-radius: 999px; background: var(--surface); font-weight: 600; font-size: 0.9375rem; white-space: nowrap; transition: transform 0.2s var(--spring); }
.chip .i { width: 18px; height: 18px; } .chip.on { background: var(--ink); color: var(--ground); }
.stack { display: grid; gap: 10px; margin-top: 20px; } .pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fine { font-size: 0.8125rem; color: var(--muted); text-align: center; margin-top: 12px; text-wrap: balance; }
.lede { font-size: 1.0625rem; line-height: 1.45; color: var(--ink-2); margin-top: 12px; text-wrap: pretty; } .lede.strong { font-weight: 700; font-size: 1.375rem; line-height: 1.2; color: var(--ink); }
.empty { color: var(--muted); padding: 32px 0; text-align: center; }

.frozen-banner { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 18px; background: var(--ice-wash); color: var(--ink); font-size: 0.9375rem; margin-bottom: 8px; border: 1.5px solid var(--ice); }
.frozen-banner span { flex: 1; } .frozen-banner b { text-decoration: underline; text-underline-offset: 3px; }
[data-frozen] .app::after { content: ""; position: fixed; inset: 0; pointer-events: none; border: 4px solid var(--ice); border-radius: 0; box-shadow: inset 0 0 60px color-mix(in oklab, var(--ice) 45%, transparent); z-index: 40; animation: frost 0.5s var(--out); }
@keyframes frost { from { opacity: 0; box-shadow: inset 0 0 240px var(--ice); } }

/* ---------- rows and feed ---------- */
.day { margin-top: 26px; } .day h2, .side h2, .ctx h2 { font-size: 0.9375rem; font-weight: 650; color: var(--muted); margin-bottom: 6px; }
.rows { display: grid; }
.row { display: flex; align-items: center; gap: 14px; min-height: 68px; padding: 10px 0; width: 100%; border-radius: 18px; transition: transform 0.2s var(--spring), background 0.12s; }
.row > .i { color: var(--muted); width: 18px; height: 18px; }
.row-t { flex: 1; min-width: 0; display: grid; } .row-t b { font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .row-t small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-a { font: 700 1.1875rem/1.1 var(--narrow); font-stretch: 85%; font-variant-numeric: tabular-nums; text-align: right; display: grid; }
.row-a.in { color: var(--blue-t); } .row-a.void { color: var(--muted); text-decoration: line-through; } .row-a small { font: 500 0.8125rem var(--font); }
.up { color: var(--up); } .down { color: var(--stop); }
.rows.tall .row { min-height: 76px; }
.row.lone { margin-top: 18px; }
.more { display: inline-flex; align-items: center; gap: 4px; align-self: flex-start; min-height: 44px; margin-top: 12px; font-weight: 650; color: var(--blue-t); } .more .i { width: 16px; height: 16px; }
.state { display: inline-flex; align-items: center; gap: 4px; font-size: 0.875rem; font-weight: 650; } .state.ok { color: var(--up); } .state .i { width: 16px; height: 16px; }
.coin { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border-radius: 14px; font: 800 1.25rem var(--narrow); background: var(--ink); color: var(--ground); }
.coin.c-usd { background: var(--blue); color: var(--on-blue); border-radius: 50%; } .coin.big { width: 64px; height: 64px; font-size: 1.75rem; border-radius: 20px; } .coin.big.c-usd { border-radius: 50%; }

/* ---------- home ---------- */
.ws { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px 0 6px; border-radius: 999px; background: var(--surface); font-weight: 650; transition: transform 0.2s var(--spring); } .ws .i { width: 16px; height: 16px; color: var(--muted); }
.total { padding: 28px 0 8px; }
.total-n { font: 800 clamp(3.6rem, 19.5vw, 5.4rem)/0.9 var(--narrow); font-stretch: 76%; letter-spacing: -0.035em; font-variant-numeric: tabular-nums; }
.total-n small { font: inherit; font-size: 0.46em; color: var(--muted); letter-spacing: -0.02em; }
.total-n.sm { font-size: 3.25rem; } .total-n.in { color: var(--blue-t); }
.total-acts { display: flex; gap: 8px; margin-top: 20px; }
.circle { display: flex; gap: 6px; margin: 22px -20px 0; padding: 4px 20px; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; } .circle::-webkit-scrollbar { display: none; }
.circle a { display: grid; justify-items: center; gap: 6px; width: 72px; flex: none; font-size: 0.875rem; font-weight: 600; scroll-snap-align: start; transition: transform 0.22s var(--spring); }
.circle a[data-pressed] { transform: scale(0.9); }

.strip { display: flex; gap: 8px; margin: 22px -20px 0; padding: 0 20px; overflow-x: auto; scrollbar-width: none; } .strip::-webkit-scrollbar { display: none; }
.strip a { display: flex; align-items: center; gap: 10px; min-height: 60px; padding: 0 16px 0 10px; border-radius: 20px; background: var(--surface); white-space: nowrap; transition: transform 0.2s var(--spring); } .strip span { display: grid; } .strip b { font: 750 1.0625rem/1.15 var(--narrow); font-stretch: 86%; font-variant-numeric: tabular-nums; }
.coin.sm { width: 36px; height: 36px; font-size: 1.0625rem; border-radius: 12px; } .coin.sm.c-usd { border-radius: 50%; }
/* ---------- tab bar ---------- */
.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; gap: 10px; justify-content: center; padding: 10px 16px calc(12px + var(--sab)); pointer-events: none; transition: transform 0.3s var(--out); }
.tabs > * { pointer-events: auto; }
.tabs-pill { display: flex; padding: 5px; border-radius: 999px; background: color-mix(in oklab, var(--surface) 86%, transparent); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4); box-shadow: 0 1px 0 var(--rule), 0 12px 32px -12px rgb(0 10 60 / 0.28); }
.tabs-pill a { display: grid; justify-items: center; align-content: center; gap: 1px; width: 68px; height: 54px; border-radius: 999px; font-size: 0.6875rem; font-weight: 650; color: var(--muted); transition: transform 0.2s var(--spring); }
.tabs-pill a.on { background: var(--ink); color: var(--ground); }
.tabs-send { display: inline-flex; align-items: center; gap: 8px; height: 64px; padding: 0 26px 0 22px; border-radius: 999px; background: var(--blue); color: var(--on-blue); font-weight: 750; font-size: 1.125rem; box-shadow: 0 14px 30px -12px color-mix(in oklab, var(--blue) 80%, transparent); transition: transform 0.22s var(--spring); }
.tabs-send[data-pressed] { transform: scale(0.92); }
body[data-tab="0"] .tabs { transform: translateY(140%); }
[data-frozen] .tabs-send span { text-decoration: line-through; }

/* ---------- thread ---------- */
.thread { padding-bottom: 0; }
.thread-bar { position: sticky; top: 0; z-index: 5; background: var(--ground); }
.who { flex: 1; display: flex; align-items: center; gap: 12px; min-width: 0; } .who span { display: grid; } .who b { font-weight: 700; }
.msgs { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; gap: 14px; padding: 20px 0; }
.msg { display: grid; gap: 4px; max-width: 82%; } .msg.out { align-self: flex-end; justify-items: end; } .msg.in { align-self: flex-start; justify-items: start; }
.bubble { display: grid; gap: 0; padding: 12px 20px 13px; border-radius: 28px; background: var(--surface); transition: transform 0.2s var(--spring); }
.bubble b { font: 800 2.25rem/1 var(--narrow); font-stretch: 78%; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; } .bubble span { font-size: 0.9375rem; opacity: 0.86; margin-top: 2px; }
.msg.out .bubble { background: var(--blue); color: var(--on-blue); border-bottom-right-radius: 8px; } .msg.in .bubble { border-bottom-left-radius: 8px; }
.stamp { font-size: 0.75rem; padding: 0 6px; } .stamp.landed { color: var(--blue-t); font-weight: 650; }
.stamp.pending::after { content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 6px; border-radius: 50%; background: var(--blue-t); animation: blink 0.7s ease-in-out infinite alternate; }
@keyframes blink { to { opacity: 0.2; transform: scale(0.6); } }
.msg.fresh .bubble { animation: land 0.55s var(--spring); transform-origin: 100% 100%; }
@keyframes land { 0% { transform: translateY(-90px) scale(0.5); opacity: 0; } 55% { opacity: 1; } }
.composer { position: sticky; bottom: 0; padding: 10px 0 calc(14px + var(--sab)); background: linear-gradient(to top, var(--ground) 70%, transparent); display: grid; gap: 8px; }
.quick { display: flex; gap: 8px; }
.compose { display: flex; align-items: center; gap: 8px; height: 60px; padding: 0 6px 0 22px; border-radius: 999px; background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--rule); transition: transform 0.2s var(--spring); }
.compose-cur { font: 800 1.5rem var(--narrow); } .compose-ph { flex: 1; color: var(--muted); font-size: 1.0625rem; }
.compose-go { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; background: var(--blue); color: var(--on-blue); }

/* ---------- send: pick ---------- */
.paste { display: grid; gap: 10px; padding: 16px; border-radius: 24px; background: var(--surface); margin-top: 4px; }
.paste > * { min-width: 0; } .paste-f .btn { flex: none; padding: 0 14px; }
.paste label { font-weight: 650; font-size: 0.9375rem; }
.paste-f { display: flex; gap: 8px; } .paste-f input { flex: 1; min-width: 0; height: 48px; padding: 0 14px; border: 0; border-radius: 14px; background: var(--ground); color: var(--ink); font: 0.875rem var(--mono); }
.paste-f input::placeholder { color: var(--muted); font-family: var(--font); font-size: 1rem; }
.try { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 0.875rem; color: var(--muted); } .try .chip { background: var(--ground); min-height: 40px; font-size: 0.875rem; }

/* ---------- send: amount and the throw ---------- */
.amount { padding-bottom: calc(16px + var(--sab)); }
.target { display: grid; justify-items: center; gap: 10px; padding-top: 2px; position: relative; text-align: center; }
.target p { display: grid; gap: 1px; } .target b { font-weight: 700; font-size: 1.0625rem; }
.target .av { transition: transform 0.3s var(--spring); z-index: 1; }
.target-ring { position: absolute; top: -8px; left: 50%; width: 112px; height: 112px; margin-left: -56px; border-radius: 50%; border: 2.5px dashed var(--blue-t); opacity: 0; transform: scale(0.8); transition: opacity 0.2s, transform 0.3s var(--spring), background 0.2s; }
.target.armed .target-ring { opacity: 1; transform: scale(1); animation: turn 6s linear infinite; }
.target.near .target-ring { border-style: solid; background: var(--blue-wash); transform: scale(1.12); animation: none; }
.target.near .av { transform: scale(1.1); }
.target.caught .av { animation: catch 0.5s var(--spring); }
@keyframes turn { to { rotate: 360deg; } } @keyframes catch { 0% { transform: scale(1.32); } }
.target-face { position: absolute; top: 2px; left: 50%; width: 92px; height: 92px; margin-left: -46px; z-index: 2; display: grid; place-items: center; border-radius: 50%; background: var(--blue); color: var(--on-blue); opacity: 0; transform: scale(0.6); transition: opacity 0.18s, transform 0.3s var(--spring); }
.target.signing .target-face { opacity: 1; transform: scale(1); } .target.signing .target-ring { opacity: 0; }
.faceid { width: 52px; height: 52px; } .f-check { opacity: 0; stroke-dasharray: 30; stroke-dashoffset: 30; }
.signing .f-face, .opening .f-face, .faceplate .f-face { animation: scan 0.6s ease-in-out infinite alternate; } @keyframes scan { to { opacity: 0.35; } }
.signed .f-face, .ok .f-face { opacity: 0; animation: none; } .signed .f-check, .ok .f-check { opacity: 1; stroke-dashoffset: 0; transition: stroke-dashoffset 0.28s var(--out); }
.stage { flex: 1; min-height: 132px; padding-top: 18px; display: grid; align-content: center; justify-items: center; gap: 6px; }
.token { display: grid; place-items: center; width: 100%; max-width: 340px; min-height: 104px; padding: 0 12px; border-radius: 999px; touch-action: none; user-select: none; -webkit-user-select: none; position: relative; z-index: 3; will-change: transform; transition: background 0.16s, color 0.16s, box-shadow 0.2s; }
.token.live { cursor: grab; } .token.still { cursor: default; }
.tk-n { font: 800 116px/1 var(--narrow); font-stretch: 76%; letter-spacing: -0.035em; font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--muted); transition: font-size 0.16s var(--out), color 0.15s; display: block; }
.token.live .tk-n, .linkmake .tk-n { color: var(--ink); } .token.over .tk-n { color: var(--stop); }
.tk-n.tap { animation: tap 0.2s var(--out); } @keyframes tap { from { transform: scale(1.05); } }
.token.live:not(.still)::before { content: ""; position: absolute; top: -6px; left: 50%; width: 36px; height: 5px; margin-left: -18px; border-radius: 3px; background: var(--blue-t); animation: lift 1.4s ease-in-out infinite; }
@keyframes lift { 50% { transform: translateY(-6px); opacity: 0.4; } }
.token.held, .is-sending .token { background: var(--blue); cursor: grabbing; box-shadow: 0 24px 44px -18px color-mix(in oklab, var(--blue) 85%, transparent); }
.token.held .tk-n, .is-sending .token .tk-n { color: var(--on-blue); } .token.held::before, .is-sending .token::before { display: none; }
.token.nudge { animation: nudge 0.32s linear; } @keyframes nudge { 25% { translate: -8px; } 50% { translate: 7px; } 75% { translate: -4px; } }
.hint { font-size: 0.9375rem; color: var(--muted); text-align: center; min-height: 1.4em; }
.token.live ~ .hint { color: var(--blue-t); font-weight: 650; } .linkmake .token.live ~ .hint { color: var(--muted); font-weight: 400; }
.keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px 8px; margin: 6px 0 12px; }
.key { height: 58px; display: grid; place-items: center; border-radius: 20px; font: 600 1.75rem var(--narrow); font-stretch: 88%; transition: transform 0.16s var(--spring), background 0.1s; touch-action: manipulation; }
.key[data-pressed] { background: var(--surface); transform: scale(0.9); } .key:disabled { opacity: 0.3; }
.is-sending .keys, .is-sending .hold-send, .is-sending .fine { opacity: 0.25; transition: opacity 0.2s; }
.amount .fine { margin-top: 10px; }

/* ---------- ticket ---------- */
.ticket { margin-top: 12px; padding: 22px 24px; border-radius: 28px; background: var(--blue); color: var(--on-blue); position: relative; transition: transform 0.25s var(--spring);
  -webkit-mask: radial-gradient(circle 14px at 0 calc(100% - 64px), #0000 98%, #000) left / 51% 100% no-repeat, radial-gradient(circle 14px at 100% calc(100% - 64px), #0000 98%, #000) right / 51% 100% no-repeat;
  mask: radial-gradient(circle 14px at 0 calc(100% - 64px), #0000 98%, #000) left / 51% 100% no-repeat, radial-gradient(circle 14px at 100% calc(100% - 64px), #0000 98%, #000) right / 51% 100% no-repeat; }
.ticket.void { background: var(--surface-2); color: var(--muted); } .ticket.void .tk-amt { text-decoration: line-through; }
.tk-top { display: flex; justify-content: space-between; align-items: center; font-weight: 600; font-size: 0.9375rem; } .tk-brand { display: inline-flex; align-items: center; gap: 6px; font-weight: 750; letter-spacing: -0.02em; } .tk-brand .mark { width: 18px; height: 18px; }
.tk-amt { font: 800 5rem/0.9 var(--narrow); font-stretch: 76%; letter-spacing: -0.035em; margin: 44px 0 30px; } .tk-amt small { font: inherit; font-size: 0.46em; color: inherit; opacity: 0.7; }
.tk-perf { border-top: 2.5px dashed color-mix(in oklab, currentColor 55%, transparent); margin: 0 -8px; }
.tk-url { font-size: 0.8125rem; padding-top: 18px; opacity: 0.9; }

/* ---------- receive ---------- */
.seg { display: flex; padding: 4px; border-radius: 999px; background: var(--surface-2); margin-top: 4px; }
.seg > * { flex: 1; min-height: 44px; display: grid; place-items: center; border-radius: 999px; font-weight: 650; font-size: 0.9375rem; text-align: center; transition: transform 0.2s var(--spring); } .seg .on { background: var(--surface); box-shadow: 0 1px 3px rgb(0 10 60 / 0.14); }
.qr-card { position: relative; margin: 22px auto 0; width: min(100%, 300px); aspect-ratio: 1; padding: 20px; border-radius: 32px; background: #fff; color: #000; }
.qr { width: 100%; height: 100%; display: block; } .qr rect[fill="none"] { stroke-width: 1; }
.qr-mark { position: absolute; inset: 0; margin: auto; width: 52px; height: 52px; display: grid; place-items: center; border-radius: 16px; background: var(--blue); color: #fff; } [data-theme="dark"] .qr-mark { background: #1D3BFF; } .qr-mark .mark { width: 30px; height: 30px; }
.nets { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; margin-top: 18px; font-size: 0.9375rem; color: var(--muted); } .nets .chip { min-height: 40px; padding: 0 14px; }
.addr-wrap { margin-top: 16px; padding: 14px 16px; border-radius: 18px; background: var(--surface); font-size: 0.875rem; }
.addr { display: flex; flex-wrap: wrap; gap: 4px 10px; justify-content: center; } .addr b { font-weight: 400; } .addr i { font-style: normal; color: var(--muted); }

/* ---------- assets ---------- */
.hold-card { padding: 20px; border-radius: 28px; background: var(--surface); margin: 4px 0 12px; display: grid; gap: 6px; }
.delta { font-weight: 650; font-size: 0.9375rem; } .spark { width: 100%; height: 64px; color: var(--blue-t); margin-top: 8px; overflow: visible; }
.asset-head { display: grid; gap: 10px; padding: 8px 0 22px; }
.fold { margin-top: 18px; border-radius: 22px; background: var(--surface); padding: 0 18px; }
.fold summary { display: flex; justify-content: space-between; align-items: center; min-height: 56px; font-weight: 650; cursor: pointer; list-style: none; } .fold summary::-webkit-details-marker { display: none; }
.fold summary .i { transition: rotate 0.25s var(--out); color: var(--muted); } .fold[open] summary .i { rotate: 180deg; } .fold .fine { padding-bottom: 16px; margin-top: 4px; text-align: left; }
.kv { display: grid; } .kv li, .kv li > a { display: flex; justify-content: space-between; gap: 16px; padding: 13px 0; } .kv li + li { border-top: 1px solid var(--rule); } .kv li:has(> a) { padding: 0; }
.kv span { color: var(--muted); } .kv b { font-weight: 650; text-align: right; min-width: 0; }
.mono-v b { font: 0.8125rem/1.5 var(--mono); } .digest { word-break: break-all; max-width: 22ch; }

/* ---------- transaction ---------- */
.tx-head { display: grid; justify-items: center; gap: 8px; padding: 12px 0 24px; text-align: center; } .tx-kind { color: var(--muted); font-weight: 600; } .ctx-name { font-weight: 750; font-size: 1.375rem; }
.tx .btn { margin-top: 18px; }
.note-card { display: flex; gap: 12px; padding: 16px; border-radius: 20px; background: var(--stop-wash); margin-bottom: 12px; font-size: 0.9375rem; } .note-card .i { color: var(--stop); margin-top: 1px; } .note-card a { font-weight: 650; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- safety ---------- */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 4px; }
.tile { display: grid; grid-template-columns: 1fr auto; gap: 4px 8px; align-content: start; min-height: 172px; padding: 18px; border-radius: 28px; background: var(--surface); transition: transform 0.22s var(--spring); }
.tile-i { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; background: var(--ground); margin-bottom: 26px; }
.tile-s { align-self: start; font-size: 0.8125rem; font-weight: 700; padding: 5px 10px; border-radius: 999px; background: var(--ground); }
.tile b { grid-column: 1 / -1; font-size: 1.125rem; font-weight: 700; line-height: 1.15; } .tile small { grid-column: 1 / -1; line-height: 1.3; }
.tile.t-backup { background: var(--blue); color: var(--on-blue); } .tile.t-backup small { color: inherit; opacity: 0.85; } .tile.t-backup .tile-i, .tile.t-backup .tile-s { background: color-mix(in oklab, var(--on-blue) 18%, transparent); }
.tile.is-frozen { background: var(--ice-wash); box-shadow: inset 0 0 0 2px var(--ice); }
.heir { display: flex; align-items: center; gap: 16px; padding: 8px 0 20px; } .heir p { display: grid; } .heir b { font-size: 1.375rem; font-weight: 750; }
.seg.four button { font-size: 0.875rem; }
.checkin { display: grid; justify-items: center; gap: 18px; margin-top: 28px; }
.ring { --p: 0.96; width: 168px; height: 168px; border-radius: 50%; display: grid; place-content: center; text-align: center; background: radial-gradient(closest-side, var(--ground) 86%, transparent 87%), conic-gradient(var(--blue) calc(var(--p) * 360deg), var(--surface-2) 0); transition: --p 0.5s; }
.ring b { font: 800 3.5rem/0.9 var(--narrow); font-stretch: 76%; font-variant-numeric: tabular-nums; } .ring.pulse { animation: pulse 0.5s var(--spring); } @keyframes pulse { 40% { transform: scale(1.07); } }
.ice { width: 96px; height: 96px; display: grid; place-items: center; border-radius: 50%; background: var(--ice-wash); color: var(--ice); margin: 12px 0 16px; } .ice .i { width: 44px; height: 44px; }
.ice-btn { background: var(--ink); color: var(--ground); } .ice-btn .fill { background: var(--ice); opacity: 0.9; }
.switch { width: 56px; height: 34px; border-radius: 999px; background: var(--surface-2); position: relative; flex: none; transition: background 0.2s; } .switch i { position: absolute; top: 3px; left: 3px; width: 28px; height: 28px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgb(0 0 0 / 0.3); transition: transform 0.28s var(--spring); }
.switch[aria-checked="true"] { background: var(--blue); } .switch[aria-checked="true"] i { transform: translateX(22px); }

/* ---------- lookalike comparison ---------- */
.cmp { display: grid; gap: 10px; margin-top: 16px; }
.cmp-row { display: flex; gap: 12px; align-items: center; padding: 14px; border-radius: 20px; background: var(--ground); } .cmp-row > div { display: grid; gap: 4px; min-width: 0; } .cmp-row b { font-weight: 650; font-size: 0.9375rem; }
.cmp-a { font: 0.75rem/1.7 var(--mono); display: flex; flex-wrap: wrap; } .cmp-a i { font-style: normal; padding: 0 0.5px; border-radius: 3px; } .cmp-a i.sp { margin-left: 6px; }
.cmp-a.fake i.d { background: var(--stop); color: #fff; font-weight: 700; } .cmp-a.real i.d { background: var(--blue-wash); color: var(--blue-t); }
.stop-pair { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 6px 0 16px; } .vs { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: var(--stop); color: #fff; } .vs .i { width: 18px; height: 18px; }
.grid-addr { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-top: 16px; position: relative; font-size: 0.9375rem; } .grid-addr > i { position: absolute; top: -18px; left: 2px; font-style: normal; font-size: 0.75rem; color: var(--muted); }
.g { min-height: 48px; display: grid; place-items: center; border-radius: 14px; background: var(--ground); transition: transform 0.2s var(--spring), background 0.15s, color 0.15s; } .g[aria-pressed="true"] { background: var(--blue); color: var(--on-blue); }

/* ---------- sheets, toast, face plate, opening ---------- */
.sheet-wrap { position: fixed; inset: 0; z-index: 60; display: flex; align-items: flex-end; justify-content: center; }
.scrim { position: absolute; inset: 0; background: rgb(2 6 30 / 0.5); opacity: 0; transition: opacity 0.25s; } .in .scrim { opacity: 1; }
.sheet { --drag: 0px; position: relative; width: 100%; max-width: 560px; max-height: 92%; overflow-y: auto; padding: 8px 20px calc(24px + var(--sab)); border-radius: 32px 32px 0 0; background: var(--surface); transform: translateY(calc(100% + var(--drag))); transition: transform 0.42s var(--out); }
.in .sheet { transform: translateY(var(--drag)); }
.grab { height: 28px; display: grid; place-items: center; cursor: grab; touch-action: none; } .grab::before { content: ""; width: 40px; height: 5px; border-radius: 3px; background: var(--rule); }
.sheet h2 { font: 750 1.625rem/1.1 var(--narrow); font-stretch: 86%; letter-spacing: -0.015em; margin-bottom: 8px; } .sheet p { color: var(--ink-2); text-wrap: pretty; } .sheet .fine { text-align: left; }
.sheet .btn:not(.blue), .sheet .chip { background: var(--surface-2); } .sheet .rows { margin-top: 8px; }
.toast { position: fixed; left: 50%; top: calc(12px + var(--sat)); z-index: 80; max-width: min(88vw, 420px); padding: 12px 18px; border-radius: 18px; background: var(--ink); color: var(--ground); font-weight: 600; font-size: 0.9375rem; text-align: center; transform: translate(-50%, -24px) scale(0.94); opacity: 0; pointer-events: none; transition: transform 0.3s var(--spring), opacity 0.2s; } .toast.in { transform: translate(-50%, 0); opacity: 1; }
.faceplate { position: fixed; z-index: 90; top: 50%; left: 50%; width: 148px; height: 148px; margin: -74px; display: grid; place-content: center; justify-items: center; gap: 8px; border-radius: 36px; background: var(--ink); color: var(--ground); font-weight: 650; font-size: 0.875rem; animation: plate 0.3s var(--spring); transition: opacity 0.2s, transform 0.2s; } .faceplate.out { opacity: 0; transform: scale(0.9); } .faceplate.ok { background: var(--blue); color: var(--on-blue); }
@keyframes plate { from { transform: scale(0.7); opacity: 0; } }
.opening { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; background: var(--blue); color: #fff; transition: transform 0.46s cubic-bezier(0.7, 0, 0.2, 1); } .opening[hidden] { display: none; }
[data-theme="dark"] .opening { background: #1D3BFF; }
.opening.out { transform: translateY(-100%); }
.op-in { display: grid; justify-items: center; gap: 14px; font-weight: 650; } .op-face .faceid { width: 84px; height: 84px; } .op-mark { position: absolute; top: calc(28px + var(--sat)); left: 50%; translate: -50%; } .op-mark .mark { width: 30px; height: 30px; }
.op-skip { position: absolute; bottom: calc(28px + var(--sab)); left: 50%; translate: -50%; min-height: 44px; padding: 0 20px; color: #fff; opacity: 0.75; font-weight: 600; }
.ask { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; background: rgb(2 6 30 / 0.5); opacity: 0; transition: opacity 0.22s; } .ask.in { opacity: 1; }
.ask-in { box-shadow: 0 0 0 1px var(--rule); width: min(92vw, 360px); padding: 24px; border-radius: 32px; background: var(--surface); display: grid; justify-items: center; gap: 10px; text-align: center; transform: scale(0.94); transition: transform 0.3s var(--spring); } .ask.in .ask-in { transform: none; }
.ask h2 { font: 750 1.5rem/1.1 var(--narrow); font-stretch: 86%; } .ask p { color: var(--ink-2); font-size: 0.9375rem; }
.mphone { width: 216px; margin-top: 10px; padding: 8px; border-radius: 40px; background: #000; transition: transform 0.3s var(--spring); } .mphone.ok { transform: scale(0.96); }
.mphone-s { display: grid; justify-items: center; gap: 4px; padding: 30px 14px 16px; border-radius: 32px; background: var(--ground); color: var(--ink); } .mphone-s b { font: 800 1.75rem/1 var(--narrow); font-stretch: 78%; margin-top: 18px; } .mphone-s > span { font-size: 0.875rem; color: var(--muted); }
.mphone-app { display: inline-flex !important; align-items: center; gap: 5px; font-weight: 750; color: var(--ink) !important; letter-spacing: -0.02em; } .mphone-app .mark { width: 16px; height: 16px; }
.mhold { width: 100%; margin-top: 22px; min-height: 52px; } .mphone.ok .mhold { background: var(--up); }

/* ---------- desktop: three columns ---------- */
@media (min-width: 1024px) {
  .app { display: grid; grid-template-columns: 328px minmax(0, 1fr) 372px; }
  .tabs { display: none; }
  .side, .ctx { display: flex; flex-direction: column; overflow-y: auto; padding: 20px; scrollbar-width: thin; }
  .side { border-right: 1px solid var(--rule); gap: 16px; } .ctx { border-left: 1px solid var(--rule); background: var(--ground); }
  .main { background: var(--surface); padding: 0; }
  [data-theme="dark"] .main { background: var(--surface); }
  .screen { padding: 12px 32px 48px; max-width: 620px; }
  .main .round, .main .chip, .main .btn:not(.blue):not(.ice-btn), .main .paste, .main .hold-card, .main .fold, .main .addr-wrap, .main .tile, .main .ws, .main .bubble, .main .compose, .main .key[data-pressed] { background: var(--ground); }
  .main .msg.out .bubble { background: var(--blue); } .main .tile.t-backup { background: var(--blue); } .main .tile-i, .main .tile-s, .main .paste-f input, .main .try .chip { background: var(--surface); } .main .tile.t-backup .tile-i, .main .tile.t-backup .tile-s { background: color-mix(in oklab, var(--on-blue) 18%, transparent); }
  .main .thread-bar { background: var(--surface); } .main .composer { background: linear-gradient(to top, var(--surface) 70%, transparent); } .main .chip.on { background: var(--ink); } .main .seg .on { background: var(--surface); }
  .main .btn.did { background: var(--up); } .main .tile.is-frozen { background: var(--ice-wash); }
  .home .top, .home .circle, .thread-bar > .round, .tabs { display: none; }
  .strip { margin-inline: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); } .main .strip a { background: var(--ground); padding-right: 8px; }
  .home .total { padding-top: 40px; } .total-n { font-size: 6.5rem; } .total-n.sm { font-size: 3.5rem; }
  .side-top { display: flex; justify-content: space-between; align-items: center; } .brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: 1.25rem; letter-spacing: -0.03em; min-height: 44px; } .brand .mark { width: 26px; height: 26px; color: var(--blue-t); }
  .side-total { font: 800 2.75rem/1 var(--narrow); font-stretch: 76%; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; margin-top: 8px; } .side-total small { font: inherit; font-size: 0.5em; }
  .side-nav { display: grid; gap: 2px; } .side-nav a { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px; border-radius: 14px; font-weight: 650; color: var(--ink-2); } .side-nav a:hover { background: var(--surface); } .side-nav a.on { background: var(--ink); color: var(--ground); }
  .side h2 { margin: 6px 0 -8px; } .side .row { padding: 8px 10px; margin: 0 -10px; width: calc(100% + 20px); min-height: 60px; } .row:hover { background: color-mix(in oklab, var(--ink) 5%, transparent); } .row.is-on { background: var(--blue-wash); } .row.static:hover { background: none; }
  .main .row { padding-inline: 10px; margin-inline: -10px; width: calc(100% + 20px); }
  .side-foot { margin-top: auto; display: flex; gap: 8px; padding-top: 12px; } .side-foot .btn { background: var(--surface); flex: 1; }
  .ctx-in { display: grid; gap: 4px; } .ctx h2 { margin: 22px 0 2px; } .ctx .hold-card, .ctx .addr-wrap { background: var(--surface); } .ctx .btn { background: var(--surface); } .ctx .fold { background: var(--surface); }
  .kv.links a { width: 100%; padding: 13px 0; } .kv.links a:hover b { color: var(--blue-t); }
  .mini-ticket { display: flex; align-items: center; gap: 12px; padding: 16px; border-radius: 20px; background: var(--blue); color: var(--on-blue); } .mini-ticket span { display: grid; } .mini-ticket b { font: 800 1.5rem/1 var(--narrow); font-stretch: 80%; } .mini-ticket small { color: inherit; opacity: 0.85; }
  .msgs { justify-content: flex-end; } .msg { max-width: 62%; }
  .amount { max-width: 480px; padding-top: 24px; } .stage { min-height: 170px; }
  .sheet-wrap { align-items: center; } .sheet { border-radius: 32px; max-width: 520px; transform: translateY(30px) scale(0.96); opacity: 0; transition: transform 0.3s var(--spring), opacity 0.2s; } .in .sheet { transform: translateY(var(--drag)); opacity: 1; } .grab { visibility: hidden; height: 16px; }
  .toast { top: 20px; } .tiles { grid-template-columns: repeat(2, 1fr); }
  [data-frozen] .app::after { border-width: 5px; }
}
@media (min-width: 1024px) and (max-width: 1240px) { .app { grid-template-columns: 288px minmax(0, 1fr) 320px; } }
@media (max-height: 740px) and (max-width: 1023px) { .key { height: 50px; } .av.xl { width: 72px; height: 72px; font-size: 1.5rem; } .target-face { width: 72px; height: 72px; margin-left: -36px; } .target-ring { width: 92px; height: 92px; margin-left: -46px; } .stage { min-height: 100px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; } }
