/*
 * zkAPI adapter styles for the pinned OA Chat client.
 * These use OA's existing color tokens, type scale, spacing, radii, and motion.
 */

:root {
    --zkapi-ease-out: cubic-bezier(0.23, 1, 0.32, 1);
    --zkapi-ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
}

.zkapi-testnet-password-dialog {
    width: min(25rem, calc(100vw - 2rem));
    padding: 1.75rem;
    border: 1px solid hsl(var(--color-border));
    border-radius: 1.25rem;
    color: hsl(var(--color-foreground));
    background: hsl(var(--color-popover));
    box-shadow: 0 16px 48px rgb(0 0 0 / 0.25);
}
.zkapi-testnet-password-dialog::backdrop { background: rgb(0 0 0 / 0.5); }
.zkapi-testnet-password-dialog form { display: grid; gap: 0.875rem; }
.zkapi-testnet-password-dialog h2 { margin: 0; font-size: 1.125rem; font-weight: 600; }
.zkapi-testnet-password-dialog p { margin: 0; font-size: 0.8rem; color: hsl(var(--color-muted-foreground)); }
.zkapi-testnet-password-dialog label { font-size: 0.875rem; }
.zkapi-testnet-password-dialog input {
    width: 100%; padding: 0.65rem; border-radius: 0.5rem;
    border: 1px solid hsl(var(--color-border));
    background: hsl(var(--color-background)); color: inherit;
}
.zkapi-testnet-password-dialog [role="alert"] { color: hsl(var(--color-destructive-text)); }
.zkapi-testnet-password-dialog [role="alert"]:empty { display: none; }
.zkapi-testnet-password-actions { display: flex; justify-content: flex-end; gap: 0.75rem; }

/* ---------- Private balance dialog: the OA dialog frame ----------
   Same frame as Account and Welcome in oa-commercial: 560px, 24px radius,
   40px inset, 22/600 title, no header hairline, rows separated by space.
   Everything reads the app's colour tokens, so Light, Dark and Purple all
   apply; only the primary button's tint is theme-specific. */
/* The balance bar's blue, shared by the dialog and the right panel: the
   same blue as an "on" switch, in every theme. */
:root { --zkapi-bar: #0a84ff; }
.zkapi-panel-bar-fill { background: var(--zkapi-bar); }
.zkapi-dialog {
    --zkapi-radius: 1.25rem;
    --zkapi-pad-x: 2rem;
    --zkapi-line: hsl(var(--color-foreground) / 0.08);
    --zkapi-control-border: hsl(var(--color-foreground) / 0.14);
    --zkapi-control-border-hover: hsl(var(--color-foreground) / 0.22);
    --zkapi-hover: hsl(var(--color-foreground) / 0.04);
    --zkapi-primary-fill: transparent;
    --zkapi-primary-fill-hover: var(--zkapi-hover);
    --zkapi-primary-border: hsl(var(--color-foreground) / 0.28);
    --zkapi-primary-border-hover: hsl(var(--color-foreground) / 0.4);
    --zkapi-primary-fg: hsl(var(--color-foreground));
    --zkapi-ease: cubic-bezier(0.2, 0, 0, 1);
    position: relative;
    display: flex;
    flex-direction: column;
    width: min(30rem, 100%);
    max-height: calc(100vh - 5rem);
    box-sizing: border-box;
    overflow: hidden;
    padding: 1.5rem 0 1.75rem;
    border: 0;
    border-radius: var(--zkapi-radius);
    background: hsl(var(--color-popover));
    color: hsl(var(--color-foreground));
    font-family: var(--font-sans, system-ui, -apple-system, 'Segoe UI', sans-serif);
    font-size: 0.875rem;
    line-height: 1.4;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    box-shadow:
        0 0 0 1px hsl(var(--color-foreground) / 0.06),
        0 12px 40px -12px rgb(0 0 0 / 0.35);
}
html.dark .zkapi-dialog {
    --zkapi-control-border: hsl(var(--color-foreground) / 0.16);
    --zkapi-control-border-hover: hsl(var(--color-foreground) / 0.26);
    --zkapi-line: hsl(var(--color-foreground) / 0.1);
    box-shadow: 0 0 0 1px hsl(0 0% 100% / 0.08), 0 16px 48px -12px rgb(0 0 0 / 0.6);
}
/* In zkAPI's own colours (purple by day, night by dark) the wallet action
   takes the accent — outline and text only, never a fill. */
html.zkapi-mode .zkapi-dialog {
    --zkapi-primary-fill: transparent;
    --zkapi-primary-fill-hover: hsl(var(--color-primary) / 0.08);
    --zkapi-primary-border: hsl(var(--color-primary) / 0.5);
    --zkapi-primary-border-hover: hsl(var(--color-primary) / 0.75);
    --zkapi-primary-fg: hsl(var(--color-primary));
}
.zkapi-dialog * { box-sizing: border-box; }
.zkapi-dialog :where(p) { margin: 0; }
.zkapi-dialog :where(button, input) { font: inherit; }

.zkapi-dialog-head {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 2rem;
    padding: 0 calc(var(--zkapi-pad-x) - 0.5rem) 0 var(--zkapi-pad-x);
}
.zkapi-dialog-title {
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.01em;
    text-wrap: balance;
}
.zkapi-dialog-head [data-zkapi-help] { margin: 0 0.125rem 0 auto; }
.zkapi-dialog-close {
    display: grid;
    flex: 0 0 auto;
    width: 2rem;
    height: 2rem;
    margin: 0;
    padding: 0;
    place-items: center;
    border: 0;
    border-radius: 0.625rem;
    background: transparent;
    color: hsl(var(--color-foreground) / 0.78);
    cursor: pointer;
    transition: background-color 160ms var(--zkapi-ease), color 160ms var(--zkapi-ease);
}
.zkapi-dialog-close svg { width: 1rem; height: 1rem; }
.zkapi-dialog-close:hover { background: var(--zkapi-hover); color: hsl(var(--color-foreground)); }

.zkapi-dialog-scroll {
    min-height: 0;
    overflow-y: auto;
    padding: 0.75rem var(--zkapi-pad-x) 0.25rem;
    scrollbar-gutter: stable;
}
.zkapi-lede {
    max-width: 30rem;
    color: hsl(var(--color-muted-foreground));
    font-size: 1rem;
    line-height: 1.5;
    text-wrap: pretty;
}
.zkapi-dialog-head + .zkapi-dialog-scroll > .zkapi-lede { margin-top: 0; }
.zkapi-stack { display: flex; flex-direction: column; gap: 1.25rem; }
.zkapi-stack > .zkapi-lede { margin-bottom: -1.25rem; }
.zkapi-section { display: flex; flex-direction: column; gap: 0.875rem; }
.zkapi-section-title { margin: 0; font-size: 0.875rem; font-weight: 600; line-height: 1.2; }
.zkapi-row { display: flex; align-items: center; gap: 1rem; min-height: 2.25rem; }
.zkapi-row-label { flex: 1 1 auto; min-width: 0; font-size: 0.9375rem; font-weight: 500; line-height: 1.3; }
.zkapi-row-end { display: flex; flex: 0 0 auto; align-items: center; gap: 0.5rem; }
.zkapi-helper {
    margin-top: -0.375rem;
    color: hsl(var(--color-muted-foreground));
    font-size: 0.8125rem;
    line-height: 1.5;
    font-variant-numeric: tabular-nums;
    text-wrap: pretty;
}
.zkapi-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }

/* Deposit: the amount is the figure, the way the funded state shows the
   balance; the wallet action sits under it. */
.zkapi-deposit { gap: 0.375rem; }
.zkapi-deposit > .zkapi-helper { margin-top: 0.375rem; }
.zkapi-deposit > .zkapi-actions { margin-top: 0.75rem; }
/* The figure and its caption on one line: "$ 4.00  Deposit". */
.zkapi-figure-row { display: flex; align-items: baseline; gap: 0.75rem; }
.zkapi-figure-row > .zkapi-balance-caption { font-size: 0.8125rem; }
.zkapi-figure {
    display: inline-flex;
    align-items: baseline;
    gap: 0.125rem;
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.05;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
}
.zkapi-figure > span { color: hsl(var(--color-muted-foreground)); font-size: 1.3125rem; font-weight: 500; }
.zkapi-figure input {
    width: 4.5ch;
    min-width: 2ch;
    padding: 0 0 0.125rem;
    border: 0;
    border-bottom: 2px solid var(--zkapi-control-border);
    border-radius: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    font-variant-numeric: tabular-nums;
    outline: 0;
    transition: border-color 160ms var(--zkapi-ease);
}
.zkapi-figure input:hover { border-bottom-color: var(--zkapi-control-border-hover); }
.zkapi-figure input:focus { border-bottom-color: hsl(var(--color-focus-ring)); }
.zkapi-figure input[readonly] { border-bottom-color: transparent; }

/* Amount: one instrument with the button beside it — same height, same radius. */
.zkapi-amount {
    display: flex;
    align-items: center;
    width: 5.75rem;
    height: 2rem;
    padding: 0 0.625rem;
    border: 1px solid var(--zkapi-control-border);
    border-radius: 0.625rem;
    background: transparent;
    color: hsl(var(--color-foreground));
    font-size: 0.875rem;
    transition: border-color 120ms ease, box-shadow 120ms ease;
}
.zkapi-amount > span { margin-right: 0.1875rem; color: hsl(var(--color-muted-foreground)); }
.zkapi-amount input {
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font-size: 0.875rem;
    font-variant-numeric: tabular-nums;
    outline: 0;
}
.zkapi-amount:focus-within {
    border-color: hsl(var(--color-focus-ring));
    box-shadow: 0 0 0 3px hsl(var(--color-focus-ring) / 0.14);
}

/* ---------- Buttons: the OA set ----------
   Primary is the one wallet action on screen (tinted, never filled);
   secondary navigates or refreshes; a busy label sits inside the same
   button so nothing shifts. Digits are tabular so countdowns keep width. */
.zkapi-primary-button,
.zkapi-secondary-button {
    display: inline-grid;
    flex: 0 0 auto;
    height: 1.875rem;
    min-width: 0;
    margin: 0;
    padding: 0 0.75rem;
    place-items: center;
    border: 1px solid var(--zkapi-control-border);
    border-radius: 0.625rem;
    background: transparent;
    color: hsl(var(--color-foreground));
    font-size: 0.8125rem;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
    cursor: pointer;
    transition: background-color 180ms var(--zkapi-ease), border-color 180ms var(--zkapi-ease), color 180ms var(--zkapi-ease), transform 120ms ease-out;
}
.zkapi-secondary-button:hover:not(:disabled) {
    border-color: var(--zkapi-control-border-hover);
    background: var(--zkapi-hover);
}
.zkapi-primary-button {
    border-color: var(--zkapi-primary-border);
    background: var(--zkapi-primary-fill);
    color: var(--zkapi-primary-fg);
}
.zkapi-primary-button:hover:not(:disabled) {
    border-color: var(--zkapi-primary-border-hover);
    background: var(--zkapi-primary-fill-hover);
}
.zkapi-primary-button:active:not(:disabled),
.zkapi-secondary-button:active:not(:disabled) { transform: scale(0.98); }
.zkapi-primary-button:disabled,
.zkapi-secondary-button:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}
/* Quiet: Back to balance — text only, a soft tint on hover. */
.zkapi-quiet-button {
    display: inline-grid;
    place-items: center;
    height: 1.875rem;
    padding: 0 0.5rem;
    border: 1px solid transparent;
    border-radius: 0.625rem;
    background: transparent;
    color: hsl(var(--color-foreground) / 0.78);
    font-size: 0.8125rem;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 180ms var(--zkapi-ease), color 180ms var(--zkapi-ease);
}
.zkapi-quiet-button:hover:not(:disabled) { background: var(--zkapi-hover); color: hsl(var(--color-foreground)); }
.zkapi-quiet-button:disabled { cursor: not-allowed; opacity: 0.5; }
/* Full-width buttons in the deeper withdraw views keep the same skin. */
.zkapi-primary-button.w-full,
.zkapi-secondary-button.w-full { width: 100%; }
/* Author display styles must not expose unavailable wallet actions. */
.zkapi-primary-button[hidden],
.zkapi-secondary-button[hidden],
.zkapi-quiet-button[hidden] { display: none; }
html[data-keyboard-nav] .zkapi-dialog button:focus-visible,
html[data-keyboard-nav] .zkapi-dialog summary:focus-visible,
html[data-keyboard-nav] .zkapi-dialog a:focus-visible {
    outline: 2px solid hsl(var(--color-focus-ring));
    outline-offset: 2px;
}

/* The right panel's status pill while a step runs: a spinner in place of a
   sentence that never fit; the sentence is the toast over the chat bar. */
.zkapi-pill-spinner {
    display: inline-block;
    width: 0.625rem;
    height: 0.625rem;
    vertical-align: -0.0625rem;
    border-radius: 50%;
    border: 1.5px solid currentColor;
    border-right-color: transparent;
    opacity: 0.8;
    animation: zkapiPillSpin 900ms linear infinite;
}
@keyframes zkapiPillSpin { to { transform: rotate(360deg); } }

/* Wallet work in progress: the action row's height, a spinner, and the
   step's words. Words change in place with a short fade; nothing shifts. */
.zkapi-progress {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 1.875rem;
    padding: 0 0.125rem;
    color: hsl(var(--color-foreground));
    font-size: 0.8125rem;
    font-weight: 500;
    line-height: 1.3;
    text-wrap: pretty;
}
.zkapi-progress .zkapi-pill-spinner { flex-shrink: 0; opacity: 0.7; }
.zkapi-progress-text.is-entering { animation: zkapiProgressIn 220ms var(--zkapi-ease); }
@keyframes zkapiProgressIn {
    from { opacity: 0; transform: translateY(0.125rem); }
    to { opacity: 1; transform: none; }
}
.zkapi-dialog-close[hidden] { display: none; }

/* ---------- Disclosures: the Invoices / inference-ticket idiom ---------- */
/* ---------- Steps: the work a deposit or withdrawal does ----------
   The same shape a zkAPI chat shows for private access, at dialog scale.
   Complete steps get a check in the accent tint, the current one a ring
   (spinning while the app works, still while it waits on the person),
   the rest sit back. The list is drawn from persisted state after a
   reload, so it looks the same before and after one. */
.zkapi-steps { display: flex; flex-direction: column; gap: 0.625rem; }
.zkapi-steps-title { margin: 0; font-size: 0.9375rem; font-weight: 600; line-height: 1.3; }
.zkapi-steps-list { display: flex; flex-direction: column; gap: 0.5rem; margin: 0; padding: 0; list-style: none; }
.zkapi-step { display: grid; grid-template-columns: 1.375rem 1fr; gap: 0.75rem; align-items: start; color: hsl(var(--color-muted-foreground)); }
.zkapi-step-mark {
    display: inline-grid; place-items: center; width: 1.25rem; height: 1.25rem; margin-top: 0.0625rem;
    border-radius: 9999px; border: 1.5px solid hsl(var(--color-foreground) / 0.18); color: hsl(var(--color-muted-foreground));
    font-size: 0.75rem; font-weight: 600; line-height: 1;
    transition: border-color 200ms var(--zkapi-ease), background-color 200ms var(--zkapi-ease), color 200ms var(--zkapi-ease);
}
.zkapi-step-mark svg { width: 0.75rem; height: 0.75rem; }
.zkapi-step-text { display: flex; flex-direction: column; gap: 0.125rem; min-width: 0; }
.zkapi-step-label { font-size: 0.9375rem; line-height: 1.35; transition: color 200ms var(--zkapi-ease); }
.zkapi-step-detail { font-size: 0.8125rem; line-height: 1.4; color: hsl(var(--color-muted-foreground)); text-wrap: pretty; }
.zkapi-step[data-state="complete"] .zkapi-step-mark { border-color: hsl(var(--color-primary) / 0.45); background: hsl(var(--color-primary) / 0.1); color: hsl(var(--color-primary)); }
.zkapi-step[data-state="active"], .zkapi-step[data-state="waiting"], .zkapi-step[data-state="error"] { color: hsl(var(--color-foreground)); }
.zkapi-step[data-state="active"] .zkapi-step-mark { border-color: hsl(var(--color-primary)); border-top-color: transparent; animation: zkapi-step-spin 0.9s linear infinite; }
.zkapi-step[data-state="waiting"] .zkapi-step-mark { border-color: hsl(var(--color-primary)); background: hsl(var(--color-primary) / 0.14); }
.zkapi-step[data-state="error"] .zkapi-step-mark { border-color: hsl(var(--color-destructive) / 0.6); color: hsl(var(--color-destructive-text)); }
.zkapi-step[data-state="upcoming"] { color: hsl(var(--color-muted-foreground) / 0.8); }
@keyframes zkapi-step-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
    .zkapi-step[data-state="active"] .zkapi-step-mark { animation: none; border-top-color: hsl(var(--color-primary)); background: hsl(var(--color-primary) / 0.14); }
}
/* What a run ended with, said in the dialog instead of a toast: one line
   under the work, in the ink for a result and the attention colour for
   something to act on. */
.zkapi-outcome { margin: 0; font-size: 0.875rem; line-height: 1.45; text-wrap: pretty; color: hsl(var(--color-foreground)); }
.zkapi-outcome[data-tone="error"] { color: hsl(var(--color-destructive-text)); }
.zkapi-outcome[data-tone="info"] { color: hsl(var(--color-muted-foreground)); }
/* The decided method, one line where the choices were. */
.zkapi-summary-line { margin: 0; font-size: 0.9375rem; color: hsl(var(--color-muted-foreground)); }
.zkapi-summary-line strong { font-weight: 500; color: hsl(var(--color-foreground)); margin-right: 0.375rem; }

.zkapi-guides { display: flex; flex-direction: column; gap: 0; margin-top: -0.625rem; }
.zkapi-guide { display: flex; flex-direction: column; }
.zkapi-guide-details > summary { list-style: none; }
.zkapi-guide-details > summary::-webkit-details-marker { display: none; }
.zkapi-guide-trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    align-self: flex-start;
    min-height: 2rem;
    padding: 0.25rem 0;
    border: 0;
    border-radius: 0.25rem;
    background: transparent;
    color: hsl(var(--color-foreground) / 0.78);
    font: inherit;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.3;
    letter-spacing: 0;
    text-align: left;
    cursor: pointer;
    transition: color 160ms var(--zkapi-ease);
}
.zkapi-guide-trigger:hover { color: hsl(var(--color-foreground)); }
.zkapi-guide-trigger svg {
    flex-shrink: 0;
    width: 0.875rem;
    height: 0.875rem;
    fill: none;
    stroke: hsl(var(--color-muted-foreground));
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform 240ms var(--zkapi-ease);
}
.zkapi-guide[data-state="open"] > .zkapi-guide-trigger svg,
.zkapi-guide-details[open] > summary svg { transform: rotate(180deg); }
.zkapi-guide-note { color: hsl(var(--color-muted-foreground)); font-size: 0.8125rem; font-weight: 400; font-variant-numeric: tabular-nums; }
.zkapi-guide-body { padding: 0.375rem 0 0.875rem; }
.zkapi-guide-body[hidden] { display: none; }
.zkapi-guide-lead,
.zkapi-guide-more,
.zkapi-guide-steps {
    max-width: 30rem;
    color: hsl(var(--color-muted-foreground));
    font-size: 0.875rem;
    line-height: 1.5;
    text-wrap: pretty;
}
.zkapi-guide-lead { margin: 0 0 0.625rem; }
.zkapi-guide-more { margin: 0.625rem 0 0; }
/* Steps: a small tabular number in the gutter, the step's name on its own
   line, the how-to under it — each step reads as its own block. */
.zkapi-guide-steps { display: flex; flex-direction: column; gap: 1rem; margin: 0.875rem 0 0; padding: 0; list-style: none; counter-reset: zkapi-step; }
.zkapi-guide-steps > li { position: relative; padding-left: 1.75rem; counter-increment: zkapi-step; }
.zkapi-guide-steps > li::before {
    content: counter(zkapi-step);
    position: absolute;
    top: 0.0625rem;
    left: 0;
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 999px;
    background: hsl(var(--color-foreground) / 0.06);
    color: hsl(var(--color-foreground));
    font-size: 0.6875rem;
    font-weight: 500;
    line-height: 1.25rem;
    text-align: center;
    font-variant-numeric: tabular-nums;
}
.zkapi-guide-steps strong { color: hsl(var(--color-foreground)); font-weight: 500; }
.zkapi-guide-step-title { display: block; margin-bottom: 0.125rem; }
.zkapi-guide-body a { color: hsl(var(--color-foreground)); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--zkapi-control-border-hover); }
/* Inline payment history keeps the record cards but drops their outer inset. */
.zkapi-guide-body > .zkapi-stack { gap: 0.75rem; }

/* ---------- Funded balance ---------- */
.zkapi-balance-card { display: flex; flex-direction: column; gap: 0.75rem; }
.zkapi-balance-card > .zkapi-note { margin-top: 0.25rem; max-width: 30rem; }
.zkapi-balance-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; }
.zkapi-balance-caption { color: hsl(var(--color-muted-foreground)); font-size: 0.75rem; font-weight: 500; }
.zkapi-balance-amount {
    margin-top: 0.125rem;
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.05;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
}
.zkapi-balance-eth {
    margin-top: 0.375rem;
    color: hsl(var(--color-muted-foreground));
    font-size: 0.8125rem;
    line-height: 1.5;
    font-variant-numeric: tabular-nums;
    overflow-wrap: anywhere;
}
.zkapi-pill {
    align-self: center;
    padding: 0.1875rem 0.5rem;
    border-radius: 999px;
    font-size: 0.6875rem;
    font-weight: 500;
    line-height: 1;
    text-transform: capitalize;
}
.zkapi-bar { height: 0.1875rem; overflow: hidden; border-radius: 999px; background: hsl(var(--color-foreground) / 0.08); }
.zkapi-bar-fill { height: 100%; border-radius: inherit; background: var(--zkapi-bar); transition: width 240ms var(--zkapi-ease); }
.zkapi-balance-foot {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    color: hsl(var(--color-muted-foreground));
    font-size: 0.75rem;
    font-variant-numeric: tabular-nums;
}
@media (prefers-reduced-motion: reduce) {
    .zkapi-guide-trigger svg, .zkapi-bar-fill, .zkapi-primary-button, .zkapi-secondary-button { transition: none; }
    .zkapi-progress-text.is-entering { animation: none; }
}
@media (max-width: 640px) {
    .zkapi-dialog { --zkapi-pad-x: 1.5rem; }
    .zkapi-row { flex-wrap: wrap; }
}

.zkapi-details,
.zkapi-panel-details {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-size: 0.6875rem;
}

.zkapi-details > div,
.zkapi-panel-details > div {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
}

.zkapi-details dt,
.zkapi-panel-details dt {
    color: hsl(var(--color-muted-foreground));
}

.zkapi-details dd,
.zkapi-panel-details dd {
    max-width: 65%;
    overflow: hidden;
    color: hsl(var(--color-foreground));
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    text-align: right;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Withdrawal method: rows with a radio, separated by space — no boxes. */
.zkapi-choices { margin: 0; padding: 0; border: 0; min-width: 0; gap: 0.125rem; }
.zkapi-choices > legend { padding: 0; margin-bottom: 0.625rem; }
.zkapi-choice {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    min-height: 2.25rem;
    padding: 0.375rem 0;
    cursor: pointer;
}
.zkapi-choice input {
    flex: 0 0 auto;
    width: 1rem;
    height: 1rem;
    margin: 0.125rem 0 0;
    accent-color: hsl(var(--color-accent-primary));
}
.zkapi-choice span { display: flex; min-width: 0; flex-direction: column; gap: 0.125rem; }
.zkapi-choice strong { color: hsl(var(--color-foreground) / 0.85); font-size: 0.9375rem; font-weight: 500; line-height: 1.3; transition: color 160ms var(--zkapi-ease); }
.zkapi-choice.selected strong, .zkapi-choice:hover strong { color: hsl(var(--color-foreground)); }
.zkapi-choice small { color: hsl(var(--color-muted-foreground)); font-size: 0.8125rem; line-height: 1.5; text-wrap: pretty; }
.zkapi-choices:disabled .zkapi-choice { cursor: default; opacity: 0.6; }
.zkapi-check { display: flex; align-items: flex-start; gap: 0.75rem; margin-top: -0.5rem; color: hsl(var(--color-muted-foreground)); font-size: 0.875rem; line-height: 1.5; cursor: pointer; }
.zkapi-check input { flex: 0 0 auto; width: 1rem; height: 1rem; margin: 0.1875rem 0 0; accent-color: hsl(var(--color-accent-primary)); }
.zkapi-note { color: hsl(var(--color-muted-foreground)); font-size: 0.8125rem; line-height: 1.5; text-wrap: pretty; }
.zkapi-note--attention { color: hsl(35 80% 32%); }
html.dark .zkapi-note--attention { color: hsl(40 90% 72%); }

.zkapi-status-dot {
    width: 0.4rem;
    height: 0.4rem;
    flex: none;
    border-radius: 9999px;
    background: hsl(var(--color-muted-foreground) / 0.5);
}

.zkapi-status-dot.online {
    background: rgb(34 197 94);
    box-shadow: 0 0 0 3px rgb(34 197 94 / 0.12);
}

.zkapi-status-dot.error {
    background: hsl(var(--color-destructive));
    box-shadow: 0 0 0 3px hsl(var(--color-destructive) / 0.12);
}

.zkapi-progress-indeterminate {
    width: 45%;
    animation: zkapi-progress 1.3s ease-in-out infinite;
}

@keyframes zkapi-progress {
    0% { transform: translateX(-110%); }
    50% { transform: translateX(75%); }
    100% { transform: translateX(225%); }
}

#right-panel {
    overflow: hidden;
    transition: width 220ms ease, min-width 220ms ease, border-width 220ms ease,
        transform 220ms ease;
}

#right-panel-content {
    width: 18rem;
    min-width: 18rem;
}

#account-tab-btn [data-private-balance-label] {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#account-tab-btn.zkapi-private-balance-control {
    display: inline-flex;
    flex: 0 1 auto;
    width: auto;
    height: 2rem;
    min-height: 2rem;
    max-width: 10rem;
    align-items: center;
    gap: 0.45rem;
    padding: 0 0.6rem;
    border: 1px solid hsl(var(--color-border));
    border-radius: 0.5rem;
    font-size: 0.75rem;
    color: hsl(var(--color-foreground));
    background: hsl(var(--color-background));
}
.zkapi-private-balance-control .account-tab-dot {
    width: 0.4rem;
    height: 0.4rem;
    flex: none;
    border-radius: 50%;
    background: hsl(var(--color-muted-foreground) / 0.6);
}
.zkapi-private-balance-control[data-status="logged-in"] .account-tab-dot {
    background: rgb(34 197 94);
}

/* Payment onboarding owns its surface. Do not depend on removed upstream
   welcome-page glass classes: transparent cards become unreadable on overlays. */
.zkapi-welcome-dialog {
    color: hsl(var(--color-foreground));
    background: hsl(var(--color-card));
    max-width: calc(100vw - 2rem) !important;
    max-height: calc(100dvh - 2rem);
    overflow-y: auto;
    flex-shrink: 0;
    animation: zkapiWelcomeIn 180ms ease-out;
}
@keyframes zkapiWelcomeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
    .zkapi-welcome-dialog { animation: none; }
}

@media (max-width: 1023px) {
    #right-panel {
        position: fixed;
        width: 18rem !important;
        min-width: 18rem !important;
        transform: translateX(0);
    }

    html[data-right-panel-hidden="true"] #right-panel {
        transform: translateX(100%);
    }
}

@media (max-width: 480px) {
    #right-panel {
        width: min(18rem, 90vw) !important;
        min-width: min(18rem, 90vw) !important;
    }

    #right-panel-content {
        width: min(18rem, 90vw);
        min-width: min(18rem, 90vw);
    }
}

@media (prefers-reduced-motion: reduce) {
    .zkapi-progress-indeterminate {
        width: 100%;
        animation: none;
    }
}

/* zkAPI state experience proposals. These intentionally inherit OA's visual
 * language; the variants change information architecture, not branding. */
.zkapi-state-spinner {
    width: 0.875rem;
    height: 0.875rem;
    flex: none;
    border: 1.5px solid hsl(var(--color-muted-foreground) / 0.28);
    border-top-color: hsl(var(--color-foreground) / 0.72);
    border-radius: 9999px;
    animation: zkapi-state-spin 1.2s linear infinite;
}

@keyframes zkapi-state-spin {
    to { transform: rotate(360deg); }
}

.zkapi-state-glyph {
    display: inline-flex;
    width: 0.875rem;
    height: 0.875rem;
    flex: none;
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
    background: hsl(var(--color-muted-foreground) / 0.16);
    color: hsl(var(--color-muted-foreground));
    font-size: 0.625rem;
    font-weight: 700;
}

.zkapi-state-glyph svg {
    width: 0.75rem;
    height: 0.75rem;
}

.zkapi-state-glyph--success {
    background: rgb(34 197 94 / 0.13);
    color: rgb(22 101 52);
}

.dark .zkapi-state-glyph--success {
    color: rgb(134 239 172);
}

.zkapi-state-glyph--error {
    background: hsl(var(--color-destructive) / 0.12);
    color: hsl(var(--color-destructive-text));
}

.zkapi-state-glyph--waiting {
    background: rgb(245 158 11 / 0.14);
    color: rgb(180 83 9);
}

.dark .zkapi-state-glyph--waiting {
    color: rgb(252 211 77);
}

.zkapi-composer-state {
    display: block;
    margin: 0.125rem 0.5rem 0.25rem;
    color: hsl(var(--color-muted-foreground));
    font-size: 0.6875rem;
    line-height: 1rem;
}

.zkapi-composer-inline {
    display: flex;
    min-height: 1.75rem;
    align-items: center;
    gap: 0.5rem;
    border-radius: 0.5rem;
    padding: 0.25rem 0.5rem;
    background: hsl(var(--color-muted) / 0.28);
}

.zkapi-composer-copy {
    display: flex;
    min-width: 0;
    flex: 1;
    align-items: baseline;
    gap: 0.4rem;
}

.zkapi-composer-copy strong,
.zkapi-composer-guided-heading strong {
    flex: none;
    color: hsl(var(--color-foreground));
    font-weight: 550;
}

.zkapi-composer-copy small {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.zkapi-composer-state--activity .zkapi-composer-inline {
    background: transparent;
    box-shadow: 0 0 0 1px hsl(var(--color-border)) inset;
}

.zkapi-composer-state--activity button {
    min-height: 1.5rem;
    flex: none;
    border: 0;
    border-radius: 0.375rem;
    padding: 0 0.4rem;
    background: transparent;
    color: hsl(var(--color-foreground));
    font-size: 0.625rem;
    font-weight: 550;
    cursor: pointer;
    transition: background-color 120ms ease-out, transform 120ms ease-out;
}

@media (hover: hover) and (pointer: fine) {
    .zkapi-composer-state--activity button:hover {
        background: hsl(var(--color-muted) / 0.7);
    }
}

.zkapi-composer-state--activity button:active {
    transform: scale(0.96);
}

.zkapi-composer-state--activity button:focus-visible,
.zkapi-billing-explainer summary:focus-visible {
    outline: 2px solid hsl(var(--color-ring));
    outline-offset: 2px;
}

.zkapi-composer-state--guided {
    border-radius: 0.625rem;
    padding: 0.5rem 0.625rem 0.55rem;
    background: hsl(var(--color-muted) / 0.22);
    box-shadow: 0 0 0 1px hsl(var(--color-border) / 0.72) inset;
}

.zkapi-composer-guided-heading {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.zkapi-composer-guided-heading > span:last-child {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.zkapi-composer-guided-heading small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.zkapi-journey {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.35rem;
    margin-top: 0.65rem;
}

.zkapi-journey-step {
    position: relative;
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 0.3rem;
    color: hsl(var(--color-muted-foreground) / 0.68);
}

.zkapi-journey-step:not(:last-child)::after {
    position: absolute;
    z-index: 0;
    top: 0.45rem;
    right: -0.25rem;
    width: 0.35rem;
    height: 1px;
    background: hsl(var(--color-border));
    content: '';
}

.zkapi-journey-marker {
    z-index: 1;
    display: inline-flex;
    width: 1rem;
    height: 1rem;
    flex: none;
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
    background: hsl(var(--color-muted));
    color: hsl(var(--color-muted-foreground));
    font-size: 0.55rem;
    font-variant-numeric: tabular-nums;
}

.zkapi-journey-step[data-state="active"] {
    color: hsl(var(--color-foreground));
}

.zkapi-journey-step[data-state="active"] .zkapi-journey-marker {
    background: hsl(var(--color-foreground));
    color: hsl(var(--color-background));
    box-shadow: 0 0 0 3px hsl(var(--color-foreground) / 0.08);
}

.zkapi-journey-step[data-state="complete"] {
    color: hsl(var(--color-foreground) / 0.82);
}

.zkapi-journey-step[data-state="complete"] .zkapi-journey-marker {
    background: rgb(34 197 94 / 0.14);
    color: rgb(22 101 52);
}

.dark .zkapi-journey-step[data-state="complete"] .zkapi-journey-marker {
    color: rgb(134 239 172);
}

.zkapi-journey-step[data-state="error"] .zkapi-journey-marker {
    background: hsl(var(--color-destructive) / 0.12);
    color: hsl(var(--color-destructive-text));
}

.zkapi-journey-label {
    overflow: hidden;
    font-size: 0.625rem;
    line-height: 0.85rem;
    text-overflow: ellipsis;
}

.zkapi-journey--compact {
    margin-top: 0.5rem;
}

.zkapi-panel-experience {
    margin-top: 0.75rem;
    border-radius: 0.625rem;
    padding: 0.65rem;
    background: hsl(var(--color-muted) / 0.18);
    box-shadow: 0 0 0 1px hsl(var(--color-border) / 0.7) inset;
}

.zkapi-panel-experience--quiet {
    padding: 0.55rem 0.6rem;
    background: transparent;
}

.zkapi-panel-experience--disclosure {
    padding: 0;
    overflow: visible;
    background: transparent;
}

.zkapi-panel-experience--disclosure > summary {
    display: flex;
    min-height: 2rem;
    align-items: center;
    gap: 0.45rem;
    border-radius: 0.625rem;
    padding: 0.4rem 0.55rem;
    color: hsl(var(--color-muted-foreground));
    cursor: pointer;
    list-style: none;
}

.zkapi-panel-experience--disclosure > summary::-webkit-details-marker {
    display: none;
}

.zkapi-panel-experience--disclosure > summary > span:nth-child(2) {
    min-width: 0;
    flex: 1;
    overflow: hidden;
    color: hsl(var(--color-foreground));
    font-size: 0.6875rem;
    font-weight: 550;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.zkapi-disclosure-chevron {
    width: 0.875rem;
    height: 0.875rem;
    flex: none;
    transition: transform 160ms var(--zkapi-ease-out);
}

.zkapi-panel-experience--disclosure[open] .zkapi-disclosure-chevron {
    transform: rotate(180deg);
}

.zkapi-panel-disclosure-body {
    padding: 0.15rem 0.6rem 0.65rem 1.9rem;
}

.zkapi-panel-disclosure-body > strong {
    color: hsl(var(--color-foreground));
    font-size: 0.6875rem;
    font-weight: 600;
}

.zkapi-panel-disclosure-body > p {
    margin-top: 0.2rem;
    color: hsl(var(--color-muted-foreground));
    font-size: 0.625rem;
    line-height: 0.9rem;
}

.zkapi-panel-experience--disclosure > summary:focus-visible,
.zkapi-composer-receipt:focus-visible,
.zkapi-composer-relay:focus-visible,
.zkapi-composer-ambient-button:focus-visible,
.zkapi-composer-capsule:focus-visible {
    outline: 2px solid hsl(var(--color-ring));
    outline-offset: 2px;
}

.zkapi-composer-state--receipt,
.zkapi-composer-state--relay,
.zkapi-composer-state--capsule {
    display: flex;
    justify-content: flex-end;
}

.zkapi-composer-relay,
.zkapi-composer-capsule,
.zkapi-composer-ambient-button {
    border: 0;
    color: hsl(var(--color-muted-foreground));
    cursor: pointer;
}

.zkapi-composer-relay {
    display: inline-flex;
    min-height: 1.75rem;
    align-items: center;
    gap: 0.4rem;
    border-radius: 9999px;
    padding: 0.25rem 0.5rem;
    background: hsl(var(--color-muted) / 0.45);
    box-shadow: 0 0 0 1px hsl(var(--color-border) / 0.65) inset;
    font-size: 0.625rem;
    font-weight: 550;
    transition: color 140ms ease, background-color 140ms ease, transform 140ms var(--zkapi-ease-out);
}

.zkapi-composer-relay > svg {
    width: 0.8rem;
    height: 0.8rem;
}

.zkapi-composer-state--ambient {
    position: relative;
    height: 0.875rem;
    margin-top: 0;
    overflow: visible;
}

.zkapi-composer-state--ambient::before,
.zkapi-composer-state--ambient::after {
    position: absolute;
    right: 2rem;
    bottom: 0.15rem;
    left: 0;
    height: 2px;
    border-radius: 9999px;
    content: '';
    pointer-events: none;
}

.zkapi-composer-state--ambient::before {
    background: hsl(var(--color-border) / 0.6);
}

.zkapi-composer-state--ambient::after {
    width: 30%;
    background: hsl(var(--color-foreground) / 0.7);
    opacity: 0.55;
}

.zkapi-composer-state--ambient[aria-busy="true"]::after {
    animation: zkapiAmbientEdge 1.6s linear infinite;
}

.zkapi-composer-state--ambient[data-tone="error"]::after {
    width: auto;
    background: hsl(var(--color-destructive));
    animation: none;
}

.zkapi-composer-state--ambient[data-tone="waiting"]::after {
    width: auto;
    background: rgb(217 119 6);
    opacity: 0.82;
    animation: none;
}

.dark .zkapi-composer-state--ambient[data-tone="waiting"]::after {
    background: rgb(252 211 77);
}

.zkapi-composer-ambient-button {
    position: absolute;
    right: 0;
    bottom: -0.35rem;
    display: inline-flex;
    width: 1.5rem;
    height: 1.5rem;
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
    background: hsl(var(--color-background));
}

.zkapi-composer-capsule {
    display: inline-grid;
    min-width: 4.5rem;
    min-height: 1.75rem;
    grid-template-columns: 1fr 1fr 1fr;
    align-items: center;
    border-radius: 9999px;
    padding: 0.2rem 0.45rem;
    background: hsl(var(--color-muted) / 0.35);
    box-shadow: 0 0 0 1px hsl(var(--color-border) / 0.7) inset;
    transition: color 140ms ease, background-color 140ms ease, transform 140ms var(--zkapi-ease-out);
}

.zkapi-capsule-check {
    color: rgb(22 101 52);
}

.dark .zkapi-capsule-check {
    color: rgb(134 239 172);
}

.zkapi-capsule-arrow {
    color: hsl(var(--color-foreground));
}

.zkapi-capsule-origin,
.zkapi-capsule-end {
    display: inline-flex;
    min-width: 0.75rem;
    align-items: center;
    justify-content: center;
}

.zkapi-capsule-origin--neutral i {
    width: 0.375rem;
    height: 0.375rem;
    border: 1px solid currentColor;
    border-radius: 9999px;
    opacity: 0.72;
}

.zkapi-capsule-end--hold {
    color: rgb(180 83 9);
    font-size: 0.55rem;
    font-weight: 700;
    letter-spacing: -0.12em;
}

.dark .zkapi-capsule-end--hold {
    color: rgb(252 211 77);
}

.zkapi-capsule-end--error {
    color: hsl(var(--color-destructive-text));
    font-size: 0.75rem;
    font-weight: 700;
}

.zkapi-capsule-end--closing {
    color: hsl(var(--color-muted-foreground));
    font-size: 0.75rem;
    line-height: 1;
}

.zkapi-composer-state--receipt[data-tone="waiting"] .zkapi-composer-receipt,
.zkapi-composer-state--relay[data-tone="waiting"] .zkapi-composer-relay,
.zkapi-composer-state--capsule[data-tone="waiting"] .zkapi-composer-capsule {
    background: rgb(245 158 11 / 0.08);
    color: rgb(180 83 9);
    box-shadow: 0 0 0 1px rgb(217 119 6 / 0.24) inset;
}

.dark .zkapi-composer-state--receipt[data-tone="waiting"] .zkapi-composer-receipt,
.dark .zkapi-composer-state--relay[data-tone="waiting"] .zkapi-composer-relay,
.dark .zkapi-composer-state--capsule[data-tone="waiting"] .zkapi-composer-capsule {
    color: rgb(252 211 77);
}

@media (hover: hover) and (pointer: fine) {
    .zkapi-composer-relay:hover,
    .zkapi-composer-capsule:hover,
    .zkapi-composer-ambient-button:hover {
        color: hsl(var(--color-foreground));
        background: hsl(var(--color-muted) / 0.75);
    }
}

.zkapi-composer-relay:active,
.zkapi-composer-capsule:active,
.zkapi-composer-ambient-button:active {
    transform: scale(0.96);
}

.zkapi-panel-state-heading {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.zkapi-panel-state-heading > div {
    min-width: 0;
    flex: 1;
}

.zkapi-panel-state-heading strong {
    display: block;
    color: hsl(var(--color-foreground));
    font-size: 0.6875rem;
    font-weight: 600;
    line-height: 0.9rem;
}

.zkapi-panel-state-heading p {
    margin-top: 0.15rem;
    color: hsl(var(--color-muted-foreground));
    font-size: 0.625rem;
    line-height: 0.9rem;
}

.zkapi-running-count {
    flex: none;
    border-radius: 9999px;
    padding: 0.1rem 0.35rem;
    background: hsl(var(--color-foreground));
    color: hsl(var(--color-background));
    font-size: 0.55rem;
    font-weight: 600;
}

.zkapi-activity-list {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    margin-top: 0.55rem;
}

.zkapi-activity-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.45rem;
    min-height: 2.25rem;
    border-radius: 0.45rem;
    padding: 0.3rem 0.35rem;
}

.zkapi-activity-row + .zkapi-activity-row {
    border-top: 1px solid hsl(var(--color-border) / 0.55);
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}

.zkapi-activity-indicator {
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 9999px;
    background: hsl(var(--color-muted-foreground) / 0.5);
}

.zkapi-activity-row[data-status="running"] .zkapi-activity-indicator,
.zkapi-activity-row[data-status="waiting"] .zkapi-activity-indicator {
    background: hsl(var(--color-foreground));
    box-shadow: 0 0 0 3px hsl(var(--color-foreground) / 0.08);
}

.zkapi-activity-row[data-status="success"] .zkapi-activity-indicator {
    background: rgb(34 197 94);
}

.zkapi-activity-row[data-status="error"] .zkapi-activity-indicator {
    background: hsl(var(--color-destructive));
}

.zkapi-activity-copy {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.zkapi-activity-copy strong,
.zkapi-activity-copy small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.zkapi-activity-copy strong {
    color: hsl(var(--color-foreground));
    font-size: 0.625rem;
    font-weight: 550;
}

.zkapi-activity-copy small,
.zkapi-activity-state,
.zkapi-activity-empty {
    color: hsl(var(--color-muted-foreground));
    font-size: 0.55rem;
}

.zkapi-activity-state {
    max-width: 4.25rem;
    text-align: end;
}

.zkapi-activity-empty {
    margin-top: 0.55rem;
}

.zkapi-billing-explainer summary {
    border-radius: 0.25rem;
    color: hsl(var(--color-muted-foreground));
    font-size: 0.625rem;
    font-weight: 550;
    cursor: pointer;
}

.zkapi-billing-explainer p {
    margin-top: 0.45rem;
    color: hsl(var(--color-muted-foreground));
    font-size: 0.625rem;
    line-height: 0.9rem;
}

.account-tab-btn[data-status="busy"] .account-tab-dot {
    background: hsl(var(--color-foreground));
    box-shadow: 0 0 0 3px hsl(var(--color-foreground) / 0.08);
    animation: zkapiBalancePulse 1.6s var(--zkapi-ease-in-out) infinite;
}

.account-tab-btn[data-status="attention"] .account-tab-dot {
    background: hsl(var(--color-destructive));
}

.account-tab-btn[data-status="waiting"] .account-tab-dot {
    background: rgb(217 119 6);
}

.zkapi-composer-live-status {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* The verbose lifecycle sentence is announced by screen readers while the
   compact OA-style trace remains the only visible status. */
.pending-response-announcement {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

/* Delivery changes remain available to assistive technology while the
   assistant placeholder is the sole visible lifecycle surface. */
#zkapi-send-announcer {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.message-action-btn.is-processing,
.confirm-edit-btn.is-processing {
    position: relative;
    color: transparent !important;
    cursor: wait;
    pointer-events: none;
}

.message-action-btn.is-processing > *,
.confirm-edit-btn.is-processing > * {
    visibility: hidden;
}

.message-action-btn.is-processing::after,
.confirm-edit-btn.is-processing::after {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0.75rem;
    height: 0.75rem;
    border: 1.5px solid hsl(var(--color-muted-foreground) / 0.3);
    border-top-color: hsl(var(--color-foreground) / 0.82);
    border-radius: 9999px;
    animation: zkapiActionOrbit 1.1s linear infinite;
    content: '';
    transform: translate(-50%, -50%);
}

.pending-response-line:has(> .pending-security-trace:not(.hidden)) {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.pending-response-dots {
    display: inline-flex;
    gap: 0.18rem;
    align-items: center;
    height: 0.75rem;
}

.pending-response-dots i {
    width: 0.25rem;
    height: 0.25rem;
    border-radius: 50%;
    background: hsl(var(--color-muted-foreground));
    animation: zkapiDotLift 1.2s var(--zkapi-ease-in-out) infinite;
}

.pending-response-dots i:nth-child(2) { animation-delay: 120ms; }
.pending-response-dots i:nth-child(3) { animation-delay: 240ms; }

.pending-security-summary .pending-response-label {
    font-size: 0.625rem;
    letter-spacing: 0.01em;
}

.zkapi-send-orbit {
    position: relative;
    width: 1rem;
    height: 1rem;
    border: 1.5px solid currentColor;
    border-radius: 50%;
    opacity: 0.95;
}

.zkapi-send-orbit i {
    position: absolute;
    top: -0.14rem;
    left: 50%;
    width: 0.28rem;
    height: 0.28rem;
    border-radius: 50%;
    background: currentColor;
    transform-origin: 0 0.64rem;
    animation: zkapiSendOrbit 1.25s linear infinite;
}

.zkapi-send-check {
    width: 1rem;
    height: 1rem;
    animation: zkapiSendCheck 160ms var(--zkapi-ease-out) both;
}

@keyframes zkapiSendOrbit { to { transform: rotate(360deg); } }
@keyframes zkapiSidebarOrbit { to { transform: rotate(360deg); } }
@keyframes zkapiActionOrbit { to { transform: translate(-50%, -50%) rotate(360deg); } }
@keyframes zkapiAmbientEdge {
    from { opacity: 0.25; transform: translateX(-110%); }
    50% { opacity: 0.85; }
    to { opacity: 0.25; transform: translateX(360%); }
}
@keyframes zkapiBalancePulse {
    0%, 100% { opacity: 0.45; transform: scale(0.88); }
    50% { opacity: 1; transform: scale(1); }
}
@keyframes zkapiSendCheck {
    from { opacity: 0; transform: scale(0.92); }
    to { opacity: 1; transform: scale(1); }
}
@keyframes zkapiDotLift {
    0%, 60%, 100% { opacity: 0.35; transform: translateY(0); }
    30% { opacity: 1; transform: translateY(-0.16rem); }
}

.zkapi-sidebar-orbit {
    animation: zkapiSidebarOrbit 1.2s linear infinite;
}

.chat-session[data-deleting="true"] {
    cursor: wait;
    opacity: 0.72;
}

.chat-session[data-deleting="true"] > a,
.chat-session[data-deleting="true"] .session-title-input {
    cursor: wait;
    pointer-events: none;
}

/* OA's dark destructive token is intended for solid surfaces and is too dark
   for small status text on OA's #262626 canvas. Keep its subtle fills, but use
   the existing red-400 value for zkAPI error foregrounds and indicators. */
.dark .zkapi-state-glyph--error,
.dark .zkapi-journey-step[data-state="error"] .zkapi-journey-marker,
.dark .zkapi-capsule-end--error,
.dark #right-panel .text-destructive,
.dark #account-modal .text-destructive,
.dark #sidebar .text-destructive {
    color: rgb(248 113 113) !important;
}

.dark .zkapi-status-dot.error,
.dark .zkapi-composer-state--ambient[data-tone="error"]::after,
.dark .zkapi-activity-row[data-status="error"] .zkapi-activity-indicator,
.dark .account-tab-btn[data-status="attention"] .account-tab-dot {
    background: rgb(248 113 113);
}

@media (max-width: 640px) {
    .zkapi-composer-copy small {
        display: none;
    }

    .zkapi-composer-guided-heading small {
        white-space: normal;
    }

    .zkapi-journey-label {
        display: none;
    }

    .zkapi-journey-step {
        justify-content: center;
    }

    .zkapi-journey-step:not(:last-child)::after {
        right: -0.4rem;
        width: 0.8rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    #right-panel {
        transition: none;
    }

    .zkapi-progress-indeterminate,
    #welcome-panel .animate-spin {
        animation: none !important;
        transform: none;
    }

    .zkapi-state-spinner {
        animation: none;
        border-top-color: currentColor;
    }

    .zkapi-composer-state--activity button {
        transition: none;
    }

    .pending-response-dots i,
    .zkapi-send-orbit i,
    .zkapi-send-check,
    .zkapi-sidebar-orbit,
    .message-action-btn.is-processing::after,
    .confirm-edit-btn.is-processing::after,
    .account-tab-btn[data-status="busy"] .account-tab-dot,
    .zkapi-composer-state--ambient::after {
        animation: none !important;
        transform: none;
    }

    .message-action-btn.is-processing::after,
    .confirm-edit-btn.is-processing::after {
        transform: translate(-50%, -50%);
    }

    .zkapi-disclosure-chevron,
    .zkapi-composer-relay,
    .zkapi-composer-capsule,
    .zkapi-composer-ambient-button {
        transition: none;
    }

    .pending-response-dots i {
        opacity: 0.8;
    }

    .pending-response-streaming {
        animation: none !important;
        background-image: none !important;
        color: hsl(var(--color-muted-foreground)) !important;
        -webkit-text-fill-color: currentColor !important;
    }
}
/* One persistent payment choice; funding status lives in the System Panel. */
.payment-mode-control {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 2px;
    border: 0;
    border-radius: 0.625rem;
    background: hsl(var(--color-foreground) / .06);
    flex-shrink: 0;
}
.payment-mode-control button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    gap: 0.375rem;
    padding: 0 0.625rem;
    height: 2rem !important;
    min-height: 0 !important;
    border-radius: 0.5rem;
    line-height: 1;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
    color: hsl(var(--color-muted-foreground));
    transition: opacity 160ms cubic-bezier(.2, 0, 0, 1), background-color 160ms cubic-bezier(.2, 0, 0, 1);
}
/* The marks keep their own colours; the unselected one sits back. */
.payment-mode-control .payment-mode-mark { display: block; opacity: .45; transition: opacity 160ms cubic-bezier(.2, 0, 0, 1); }
.payment-mode-control .payment-mode-mark-oa { width: 0.875rem; height: 0.875rem; }
.payment-mode-control .payment-mode-mark-eth { width: auto; height: 0.9375rem; }
.payment-mode-control button[aria-pressed="true"] {
    background: hsl(var(--color-card));
    box-shadow: 0 1px 2px rgb(0 0 0 / .06);
}
.payment-mode-control button[aria-pressed="true"] .payment-mode-mark,
.payment-mode-control button:hover:not(:disabled) .payment-mode-mark { opacity: 1; }
.payment-mode-control button:hover:not(:disabled) {
    color: hsl(var(--color-foreground));
}
.payment-mode-control button[aria-pressed="false"]:hover:not(:disabled) {
    background: hsl(var(--color-foreground) / .05);
}
.payment-mode-control button:focus-visible {
    outline: 2px solid hsl(var(--color-accent-primary));
    outline-offset: 2px;
}
.payment-mode-control button:disabled { cursor: wait; opacity: .6; }
/* Both names appear in the same place, just left of the control, so the
   zkAPI tooltip never sits over the tickets mark. Its offset skips that
   mark (2rem) and the gaps around it. */
.payment-mode-control #payment-mode-zkapi[data-tooltip-position="start"]:hover::after {
    right: calc(100% + 2rem + 4px + 0.5rem);
}
@media (max-width: 640px) {
    .payment-mode-control button { padding-inline: 0.5rem; }
    .payment-mode-toolbar #share-btn-text, .payment-mode-toolbar #wide-mode-btn { display: none; }
    .payment-mode-toolbar #share-btn { padding-inline: 6px; }
}

/* A quiet, text-only action under a primary one (Use a different amount). */
.zkapi-text-button {
    height: 2rem;
    border: 0;
    border-radius: 0.5rem;
    background: transparent;
    color: hsl(var(--color-muted-foreground));
    font: inherit;
    font-size: 0.8125rem;
    cursor: pointer;
    transition: color 120ms ease, background-color 120ms ease;
}
.zkapi-text-button:hover:not(:disabled) { color: hsl(var(--color-foreground)); background: hsl(var(--color-foreground) / 0.05); }
.zkapi-text-button:disabled { opacity: 0.5; cursor: default; }

/* Approved wallet walkthrough: one disclosure, four readable steps. Reuse the
   installed Transitions.dev grid/chevron and modal snippets with local timing. */
.zkapi-funding-overlay {
    align-items: flex-start !important;
    padding-top: clamp(1rem, 10vh, 5rem) !important;
}
.zkapi-funding-overlay > .zkapi-dialog {
    max-height: calc(100dvh - clamp(1rem, 10vh, 5rem) - 2rem);
}
.zkapi-dialog, .zkapi-welcome-dialog {
    --acc-expand: 420ms;
    --acc-collapse: 420ms;
    --acc-chevron: 320ms;
    --acc-ease: cubic-bezier(0.4, 0, 0.2, 1);
    --funding-scroll-duration: 320ms;
    --modal-scale: 0.96;
    --modal-scale-close: 0.96;
}
.zkapi-dialog-scroll { overflow-anchor: none; scrollbar-gutter: stable; overflow-x: hidden; scroll-behavior: auto; }

/* Both methods share the wallet lifecycle; manual calls expose only public
   transaction fields. Long addresses and calldata stay inside the dialog. */
.zkapi-wallet-method { margin: 0 0 24px; }
.zkapi-wallet-method-options { display: flex; gap: 4px; padding: 4px; border: 1px solid hsl(var(--color-border)); border-radius: 12px; }
.zkapi-wallet-method-options button { flex: 1; min-height: 40px; padding: 8px; border-radius: 8px; font-size: 12px; color: hsl(var(--color-muted-foreground)); }
.zkapi-wallet-method-options button[aria-pressed="true"] { background: hsl(var(--color-muted)); color: hsl(var(--color-foreground)); font-weight: 600; }
.zkapi-wallet-method-options button:disabled { opacity: .6; cursor: default; }
.zkapi-wallet-method-options button:focus-visible,
.zkapi-funding-address button:focus-visible { outline: 2px solid hsl(var(--color-ring)); outline-offset: 2px; }
/* A compact address handoff; long public addresses never widen the dialog. */
.zkapi-funding-account { margin: 0 0 24px; padding: 18px; border: 1px solid hsl(var(--color-border)); border-radius: 14px; }
.zkapi-funding-return-outcome { overflow-wrap: anywhere; }
.zkapi-funding-account h3 { margin: 0 0 10px; font-size: 14px; font-weight: 600; }
.zkapi-funding-heading { display: flex; align-items: flex-start; gap: 10px; margin: 18px 0 10px; }
.zkapi-funding-heading h3 { flex: 1; min-width: 0; margin: 0; overflow-wrap: anywhere; }
.zkapi-funding-help[data-funding-help="quote"] .zkapi-funding-heading { position: relative; display: block; }
.zkapi-funding-heading .zkapi-funding-send-amount { font-size: 14px; line-height: 1.4; }
.zkapi-funding-send-usd { display: block; margin-top: 4px; color: hsl(var(--color-muted-foreground)); font-size: 12px; font-weight: 400; }
.zkapi-funding-send-label { display: block; min-height: 26px; }
/* The exact number gets the full card width; only its ETH suffix may wrap. */
.zkapi-funding-send-value { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 .35em; width: 100%; margin-top: 5px; font-size: clamp(14px, 4.5vw, 20px); font-variant-numeric: tabular-nums; }
.zkapi-funding-send-value > span { white-space: nowrap; overflow-wrap: normal; }
.zkapi-funding-help-toggle { display: inline-flex; flex: 0 0 26px; align-items: center; justify-content: center; width: 26px; height: 26px; border: 1px solid hsl(var(--color-border)); border-radius: 50%; background: transparent; color: hsl(var(--color-muted-foreground)); font-size: 12px; cursor: pointer; }
.zkapi-funding-help-toggle:hover,
.zkapi-funding-help-toggle[aria-expanded="true"] { background: hsl(var(--color-muted)); color: hsl(var(--color-foreground)); }
.zkapi-funding-help-toggle:focus-visible { outline: 2px solid hsl(var(--color-ring)); outline-offset: 2px; }
.zkapi-funding-summary { margin: 8px 0 4px; color: hsl(var(--color-muted-foreground)); font-size: 11px; line-height: 1.5; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.zkapi-funding-breakdown-toggle { gap: 6px; width: auto; height: auto; margin: 0 0 10px; padding: 5px 0; border: 0; border-radius: 4px; font-size: 11px; }
.zkapi-funding-breakdown-toggle svg { width: 12px; height: 12px; }
.zkapi-funding-breakdown-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
/* Keep the clicked explanation inside the scrollable dialog on narrow screens. */
.zkapi-funding-help-panel { margin: 0 0 14px; padding: 12px; border: 1px solid hsl(var(--color-border)); border-radius: 10px; background: hsl(var(--color-muted) / .3); }
.zkapi-funding-help-panel[hidden] { display: none; }
.zkapi-funding-help-panel .zkapi-funding-breakdown { margin-top: 0; }
.zkapi-funding-help-panel .zkapi-note + .zkapi-note { margin-top: 10px; }
.zkapi-funding-status { margin-top: 12px; }
.zkapi-funding-field { display: flex; flex-direction: column; gap: 7px; margin: 14px 0; font-size: 12px; font-weight: 500; }
.zkapi-funding-field input,
.zkapi-funding-address input { display: block; box-sizing: border-box; width: 100%; min-width: 0; padding: 10px 12px; border: 1px solid hsl(var(--color-border)); border-radius: 8px; background: hsl(var(--color-background)); color: hsl(var(--color-foreground)); font-size: 12px; line-height: 1.6; }
.zkapi-funding-address { display: flex; gap: 8px; margin-top: 14px; }
.zkapi-funding-address input { font-family: monospace; }
.zkapi-funding-qr { display: grid; justify-items: center; gap: 10px; margin: 18px 0 4px; text-align: center; }
.zkapi-funding-qr svg { display: block; width: 192px; height: auto; max-width: 100%; border-radius: 8px; background: #fff; }
.zkapi-funding-qr figcaption { font-size: 12px; line-height: 1.5; color: hsl(var(--color-foreground)); }
.zkapi-funding-progress { margin: 0 0 16px; font-size: 12px; line-height: 1.5; font-variant-numeric: tabular-nums; }
.zkapi-funding-progress-available { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; margin-bottom: 10px; }
.zkapi-funding-progress-available > span { color: hsl(var(--color-muted-foreground)); }
.zkapi-funding-progress-available strong { min-width: 0; max-width: 100%; overflow-wrap: anywhere; font-weight: 600; }
.zkapi-funding-progress-available strong span,
.zkapi-funding-progress dd span { color: hsl(var(--color-muted-foreground)); font-weight: 400; }
.zkapi-funding-progress .zkapi-funding-progress-percentage { margin: 0 0 6px; font-size: 11px; font-weight: 600; }
.zkapi-funding-progress-chart { position: relative; margin: 0 1px; }
.zkapi-funding-progress-track { position: relative; height: 14px; overflow: hidden; border: 1px solid hsl(var(--color-foreground) / .25); border-radius: 4px; background: hsl(var(--color-foreground) / .07); }
/* One fill represents the whole public balance, including leftovers. Costs are not wallet buckets. */
.zkapi-funding-progress-received { position: absolute; inset: 0 auto 0 0; display: block; background: var(--zkapi-bar); }
.zkapi-funding-progress-optional,
.zkapi-funding-progress-optional-key { background-image: repeating-linear-gradient(135deg, transparent, transparent 3px, hsl(var(--color-foreground) / .22) 3px, hsl(var(--color-foreground) / .22) 5px); }
.zkapi-funding-progress-optional { position: absolute; top: 0; bottom: 0; }
.zkapi-funding-progress-required { position: absolute; top: -2px; bottom: -2px; left: var(--funding-required-position); border-left: 2px solid hsl(var(--color-foreground)); transform: translateX(-1px); }
.zkapi-funding-progress-chart-key { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 8px; font-size: 10px; color: hsl(var(--color-muted-foreground)); }
.zkapi-funding-progress-chart-key > span { display: inline-flex; align-items: center; gap: 6px; }
.zkapi-funding-progress-required-key { width: 2px; height: 12px; background: hsl(var(--color-foreground)); }
.zkapi-funding-progress-optional-key { width: 14px; height: 12px; border: 1px solid hsl(var(--color-foreground) / .25); border-radius: 2px; }
.zkapi-funding-progress .zkapi-funding-progress-caption { margin: 8px 0 14px; color: hsl(var(--color-muted-foreground)); font-size: 11px; }
.zkapi-funding-progress-legend,
.zkapi-funding-progress-totals { display: grid; gap: 10px; margin: 0; }
/* Wrap the amount onto its own line before long exact ETH values become cramped. */
.zkapi-funding-progress-item,
.zkapi-funding-progress-totals > div { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 12px; }
.zkapi-funding-progress dt { flex: 1 1 120px; }
.zkapi-funding-progress-item dt small { display: block; color: hsl(var(--color-muted-foreground)); font-size: 10px; }
.zkapi-funding-progress dd { min-width: 0; max-width: 100%; margin: 0 0 0 auto; text-align: right; overflow-wrap: anywhere; }
.zkapi-funding-progress-totals { margin-top: 12px; padding-top: 10px; border-top: 1px solid hsl(var(--color-border)); }
.zkapi-funding-progress-totals > div:first-child { font-weight: 600; }
.zkapi-funding-progress-totals > div:last-child dt { color: hsl(var(--color-muted-foreground)); }
.zkapi-funding-progress .zkapi-funding-progress-note { margin-top: 12px; color: hsl(var(--color-muted-foreground)); font-size: 11px; }
.zkapi-funding-account code { overflow-wrap: anywhere; }
.zkapi-funding-account > button { margin-top: 8px; }
.zkapi-funding-account details { border-top: 1px solid hsl(var(--color-border)); margin-top: 16px; padding-top: 12px; }
.zkapi-funding-account summary { cursor: pointer; font-size: 12px; font-weight: 500; }
.zkapi-funding-account summary:focus-visible { outline: 2px solid hsl(var(--color-ring)); outline-offset: 3px; }
.zkapi-funding-error { margin: 12px 0; font-size: 12px; line-height: 1.6; text-wrap: pretty; color: hsl(var(--color-destructive-text)); }
.zkapi-funding-pending { margin-top: 12px; }
.zkapi-funding-amount-input { display: flex; align-items: center; gap: 8px; }
.zkapi-funding-amount-input > span { font-size: 20px; }
.zkapi-funding-currency { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 7px; min-height: 42px; padding: 8px 10px; border: 1px solid hsl(var(--color-border)); border-radius: 8px; background: hsl(var(--color-muted)); color: hsl(var(--color-foreground)); font-size: 12px; font-weight: 600; cursor: pointer; }
.zkapi-funding-currency span { color: hsl(var(--color-muted-foreground)); font-size: 16px; }
.zkapi-funding-currency:hover { background: hsl(var(--color-accent)); }
.zkapi-funding-currency:disabled { cursor: default; opacity: .6; }
.zkapi-funding-currency:focus-visible { outline: 2px solid hsl(var(--color-ring)); outline-offset: 2px; }
.zkapi-funding-breakdown { display: grid; gap: 10px; margin: 18px 0 10px; font-size: 12px; line-height: 1.6; }
.zkapi-funding-breakdown > div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; }
.zkapi-funding-breakdown dt { color: hsl(var(--color-muted-foreground)); }
.zkapi-funding-breakdown dd { margin: 0; overflow-wrap: anywhere; }
.zkapi-funding-breakdown dd span { color: hsl(var(--color-muted-foreground)); }
.zkapi-funding-breakdown .zkapi-funding-total { padding-top: 10px; border-top: 1px solid hsl(var(--color-border)); font-weight: 600; }
.zkapi-funding-breakdown .zkapi-funding-total dt { color: hsl(var(--color-foreground)); }
.zkapi-funding-account .zkapi-note + .zkapi-helper { margin-top: 12px; }
.zkapi-funding-account [data-funding-next] { width: 100%; margin-top: 12px; }
.zkapi-welcome-dialog { overflow-anchor: none; scroll-behavior: auto; }
.zkapi-guide.t-acc { position: relative; }
.zkapi-guide.t-acc::before {
    content: '';
    position: absolute;
    top: 0;
    left: calc(-1 * var(--zkapi-pad-x, 28px));
    right: calc(-1 * var(--zkapi-pad-x, 28px));
    height: 1px;
    background: var(--zkapi-line, hsl(var(--color-border)));
    pointer-events: none;
}
.zkapi-guide.t-acc .zkapi-guide-trigger {
    display: flex;
    width: 100%;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 0;
}
.zkapi-guide-trigger > span:first-child { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.5rem; }
.zkapi-guide.t-acc .t-acc-panel-inner { filter: none; }
.zkapi-guide.t-acc .zkapi-guide-body { padding: 0.25rem 0 1.25rem; }
.zkapi-guide-steps { gap: 1.375rem; margin: 0.125rem 0 0; line-height: 1.65; }
.zkapi-guide-steps > li { padding-left: 2.25rem; }
.zkapi-guide-steps > li:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 0.625rem;
    top: 1.875rem;
    bottom: -0.9375rem;
    width: 1px;
    background: var(--zkapi-line, hsl(var(--color-border)));
}
.zkapi-guide-steps .zkapi-guide-step-title { margin-bottom: 0.3125rem; }
.zkapi-guide-steps p { margin-bottom: 0.375rem; }
.zkapi-guide-steps a { font-size: 0.8125rem; }

/* Wallet progress is informational, not a warning or another action. */
.zkapi-wallet-status { display: flex; align-items: center; gap: 0.5rem; margin-top: 0.5rem; color: hsl(var(--color-muted-foreground)); font-size: 0.6875rem; line-height: 1.5; }
.zkapi-wallet-status .zkapi-pill-spinner { flex-shrink: 0; }
.zkapi-retry-link { align-self: center; border: 0; background: none; color: hsl(var(--color-muted-foreground)); font: inherit; font-size: 0.8125rem; padding: 0.5rem; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.zkapi-retry-link:hover { color: hsl(var(--color-foreground)); }
.zkapi-retry-link:disabled { cursor: not-allowed; opacity: 0.5; }

.zkapi-wallet-status-dot { width: 0.375rem; height: 0.375rem; margin-inline: 0.125rem; border-radius: 50%; background: currentColor; opacity: 0.6; flex-shrink: 0; }

/* Funding disclosure rows share their height, inset and divider width. */
.zkapi-guides { margin-top: 0; }
.zkapi-guide.t-acc .zkapi-guide-trigger { min-height: 56px; padding-block: 16px; }
.zkapi-guide.t-acc::before { left: 0; right: 0; }
.zkapi-deposit > .zkapi-actions { margin-top: 16px; }
.dark .zkapi-outcome[data-tone="error"],
.dark .zkapi-step[data-state="error"] .zkapi-step-mark,
.dark #payment-balance-modal .text-destructive { color: #fca5a5; }

#zkapi-deposit-btn, #welcome-fund-btn {
    min-height: 44px; height: auto; padding: 10px 16px;
    white-space: normal; line-height: 1.35;
}
.zkapi-figure-row { flex-wrap: wrap; }
#zkapi-deposit-amount { max-width: min(10ch, 100%); }
