/* BLACKOUT app: the Swap screen (swap.js). Loaded after skin.css; uses its colours and type.
   One screen, four layouts while the owner chooses: [data-look="1"] Quiet, "2" Open, "3" Orb, "4" Desk (bottom of
   this file). Everything above the layouts is shared.
   Motion moves only transform and opacity (and one small ring), so nothing lags; "reduce motion" stops it all.
   The screen lays itself out by the width of its own box, not the window's (container queries on .sw), so the form
   also fits a box 360 to 480 px wide with none of the app's shell around it. The two sheets are the exception: they
   sit over the whole window, so they go by the window. */

.sw { container: sw / inline-size; }
/* The no-pool form alone (swap.js init { only: 'outside' }): no choice of where to pay from, no other ways. */
.sw.alone .sw-source, .sw.alone .sw-src-line, .sw.alone .sw-ways, .sw.alone .sw-moreways, .sw.alone .sw-head { display: none !important; }
@container sw (max-width: 420px) {
  .sw-head h1 { white-space: normal; }
}

.sw [hidden], dialog.sheet [hidden] { display: none !important; }
.sw-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.sw-head > div:first-child { flex: 0 0 auto; }
.sw-head h1 { white-space: nowrap; }
.sw-dev { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; margin-bottom: 10px; }
.sw-looks { display: inline-flex; gap: 3px; padding: 3px; border-radius: 11px; background: var(--bg-2); border: 1px dashed var(--line-2); }
.sw-looks button { all: unset; cursor: pointer; padding: 6px 9px; border-radius: 8px; font: 600 11.5px/1 var(--sans); color: var(--muted); white-space: nowrap; }
.sw-looks button[aria-checked='true'] { background: var(--chip-bg); color: var(--chip-ink); }
.sw-looks button:focus-visible { outline: 2px solid var(--red); outline-offset: 1px; }
.sw-sample { margin: 0; font-size: 12px; display: flex; align-items: center; gap: 8px; }
.sw-sample .sw-link { font-size: 12px; min-height: 0; }

/* ---------- the ways: Swap, Many wallets, Many deposits, Collect, Track ---------- */
.sw-ways { display: flex; gap: 4px; margin: 2px 0 12px; padding: 2px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.sw-ways::-webkit-scrollbar { display: none; }
.sw-ways button { all: unset; box-sizing: border-box; cursor: pointer; flex: none; display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 9px 13px; border-radius: 11px; font: 600 13.5px/1 var(--sans); color: var(--muted); white-space: nowrap; transition: color .2s, background-color .2s; }
.sw-ways button svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.sw-ways button i { display: grid; }
.sw-ways button:hover { color: var(--text); }
.sw-ways button[aria-selected='true'] { color: var(--chip-ink); background: var(--chip-bg); }
.sw-ways button:focus-visible { outline: 2px solid var(--red); outline-offset: 1px; }
.sw-way-link { margin-left: auto; }
.sw-moreways { all: unset; display: none; box-sizing: border-box; width: 100%; margin-top: 12px; padding: 12px 14px; border-radius: 13px; border: 1px dashed var(--line-2); font: 600 13.5px/1.35 var(--sans); color: var(--muted); cursor: pointer; text-align: center; transition: color .2s, border-color .2s; }
.sw-moreways:hover { color: var(--text); border-color: var(--red); }
.sw-moreways::after { content: "›"; display: inline-block; margin-left: 8px; font-size: 17px; line-height: 1; transform: rotate(90deg); color: var(--red-2); }
.sw-moreways { color: var(--text); border-style: solid; }
/* On a phone "Advanced options" is a link in the form, and the ways open in this sheet. */
.sw.alone .sw-advlink { display: none !important; }
.sw-adv-list { display: grid; gap: 8px; }
.sw-adv-item { all: unset; box-sizing: border-box; display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; padding: 10px 14px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--bg-2); font: 600 15px/1.3 var(--sans); color: var(--text); cursor: pointer; }
.sw-adv-item::after { content: "›"; margin-left: auto; font-size: 20px; color: var(--red-2); }
.sw-adv-item:hover, .sw-adv-item:focus-visible { border-color: var(--red); }
.sw-adv-item i { color: var(--red-2); }
.sw-moreways:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }

/* ---------- the form ---------- */
.sw-card { padding: 16px 16px 18px; }
.sw-source { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.sw-src { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 10px; row-gap: 1px; align-items: center; padding: 9px 12px; border-radius: 13px; border: 1px solid var(--line-2); background: var(--bg-2); cursor: pointer; transition: border-color .2s, background-color .2s; }
.sw-src input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.sw-src-ico { grid-row: 1 / span 2; width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; background: var(--panel-3); color: var(--muted); transition: background-color .2s, color .2s; }
.sw-src-ico svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.sw-src-ico .pw { stroke-width: 12; color: inherit; }
.sw-src b { font: 700 14px/1.2 var(--display); letter-spacing: -.01em; color: var(--text); }
.sw-src span { grid-column: 2; font-size: 12.5px; line-height: 1.3; color: var(--muted); }
.sw-src:has(input:checked) { border-color: var(--red); background: var(--chip-bg); box-shadow: inset 0 0 0 1px var(--red); }
.sw-src:has(input:checked) .sw-src-ico { background: var(--grad); color: #fff; }
.sw-src:has(input:focus-visible) { outline: 2px solid var(--red); outline-offset: 2px; }
.sw-src.soon { opacity: .62; border-style: dashed; }
.sw-src.soon, .sw-src.soon input { cursor: not-allowed; }
.sw-src-line { display: none; margin: -4px 0 10px; font-size: 13px; color: var(--muted); }

.sw-pair { display: flex; flex-direction: column; }
.sw-leg { border-radius: 14px; border: 1px solid var(--line-2); background: var(--bg-2); padding: 10px 12px 10px 14px; transition: border-color .2s, box-shadow .2s; }
.sw-leg:focus-within { border-color: var(--red); box-shadow: 0 0 0 3px rgba(var(--accent-rgb), .14); }
.sw-leg-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; min-height: 18px; font: 600 11px/1.2 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.sw-get-note { font-style: normal; letter-spacing: .06em; color: var(--dim); }
.sw-bal { all: unset; cursor: pointer; font: 600 12px/1.2 var(--sans); letter-spacing: 0; text-transform: none; color: var(--red-2); padding: 3px 0; }
/* Two balances over "You send" (owner, 30 Nov 2026): the connected wallet's (plain) and the private one (purple shield). */
.sw-bals { display: inline-flex; gap: 10px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.sw-bal { display: inline-flex !important; align-items: center; gap: 4px; }
.sw-bal[hidden] { display: none !important; }
.sw-bal svg { width: 13px; height: 13px; flex: none; }
.sw-bal-w { color: var(--ink-2, #5b5670); }
.sw-bal-w svg { fill: none; stroke: currentColor; stroke-width: 1.8; }
.sw-bal-p { color: #7c3aed; }
.sw-bal-p svg { fill: currentColor; }
.sw-bal:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; border-radius: 4px; }
.sw-leg-main { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; margin-top: 2px; }
.sw-amt { all: unset; display: block; box-sizing: border-box; min-width: 0; width: 100%; font: 700 clamp(22px, 5cqi, 29px)/1.3 var(--mono); letter-spacing: -.02em; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; transition: opacity .25s; }
.sw.quoting output.sw-amt { opacity: .5; }
output.sw-amt.tick { animation: sw-tick .38s cubic-bezier(.2, .8, .2, 1); }
.sw-coin { all: unset; box-sizing: border-box; cursor: pointer; flex: none; display: inline-flex; align-items: center; gap: 9px; min-height: 44px; padding: 6px 8px 6px 6px; border-radius: 12px; background: var(--card-s); border: 1px solid var(--line-2); transition: border-color .2s, transform .3s cubic-bezier(.2, .8, .2, 1); }
.sw-coin:hover { border-color: var(--red); transform: translateY(-1px); }
.sw-coin:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
.sw-coin.wide { display: flex; width: 100%; }
.sw-coin.wide .sw-chev { margin-left: auto; }
.sw-coin-t { display: grid; text-align: left; }
.sw-coin-t b { font: 700 15px/1.1 var(--display); letter-spacing: -.01em; }
.sw-coin-t small { font: 500 11.5px/1.25 var(--sans); color: var(--muted); }
.sw-chev { width: 16px; height: 16px; fill: none; stroke: var(--dim); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sw-glyph { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font: 800 9.5px/1 var(--display); font-style: normal; letter-spacing: 0; color: #fff; background: radial-gradient(circle at 30% 25%, color-mix(in srgb, var(--tint) 55%, #fff), var(--tint) 64%); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25), 0 5px 12px -7px var(--tint); }
.sw-glyph.long { font-size: 7.5px; letter-spacing: -.02em; }

.sw-mid { position: relative; height: 6px; z-index: 2; }
.sw-orbit { display: none; }
.sw-flip { all: unset; box-sizing: border-box; position: absolute; left: 50%; top: 50%; width: 38px; height: 38px; margin: -19px 0 0 -19px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; background: var(--card-s); border: 1px solid var(--card-b); box-shadow: 0 6px 16px -8px rgba(var(--accent-rgb), .8); color: var(--red-2); transition: transform .45s cubic-bezier(.2, .8, .2, 1), border-color .2s; }
.sw-flip svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.sw-flip:hover { border-color: var(--red); transform: rotate(180deg); }
.sw-flip.turn { animation: sw-turn .5s cubic-bezier(.2, .8, .2, 1); }
.sw-flip:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
.sw-flip:disabled { opacity: .45; cursor: not-allowed; transform: none; }

.sw-round { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 8px 0 0; font-size: 13px; color: var(--muted); }
.sw-round .chips { display: inline-flex; gap: 6px; }
.sw-round .chipbtn { padding: 5px 10px; }
.sw-k { font: 600 11px/1.2 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.sw-dest { margin-top: 8px; }
.sw-dest-own { display: flex; flex-wrap: wrap; align-items: baseline; gap: 3px 10px; padding: 9px 14px; border-radius: 12px; background: rgba(var(--accent-rgb), .06); border: 1px dashed rgba(var(--accent-rgb), .35); }
.sw-dest-own b { font: 700 14px/1.2 var(--display); letter-spacing: -.01em; }
.sw-dest-sub { font-size: 12.5px; color: var(--muted); }
.sw-dest-addr { display: grid; gap: 6px; }
.sw-dest-addr .input { width: 100%; box-sizing: border-box; font-size: 13.5px; }
.sw-dest-addr + .sw-dest-addr { margin-top: 8px; }
.sw-exchange .sw-net small { margin-left: 6px; font: 500 11.5px/1 var(--mono); color: var(--muted); }

.sw-route { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; margin-top: 10px; padding: 8px 10px 8px 12px; min-height: 46px; box-sizing: border-box; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line); }
.sw-route-text { font-size: 13.5px; line-height: 1.35; color: var(--muted); }
.sw-route-text b { color: var(--text); }
/* Many deposits (swap-batch.js): the extra fields. */
.sw-batch-extra { display: grid; gap: 0 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin-top: 6px; }
.sw-batch-extra #sw-batch-refund-field { grid-column: 1 / -1; }
/* Many wallets, each through an exchange (swap-split.js). */
.sw-panel.by-exchange .sw-many-grid > .field:nth-child(2), .sw-panel.by-exchange #sw-many-line, .sw-panel.by-exchange #sw-many-length { display: none; }
.sw-split-ex { flex-wrap: wrap; gap: 6px; max-height: 148px; overflow: auto; padding: 2px; }
.sw-split-ex .sw-net small { margin-left: 6px; font: 500 11.5px/1 var(--mono); color: var(--muted); }
.sw-split-line.err { color: var(--err, #d0384f); }
.sw-split-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.sw-split-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--bg-2); font-size: 13px; }
.sw-split-list li b { display: inline-flex; align-items: center; font-weight: 600; color: var(--text); }
.sw-split-list li em { font-style: normal; color: var(--muted); font-size: 12.5px; }
.sw-split-list li.bad { border-color: var(--err, #d0384f); }
.sw-split-list li[data-state='done'] em { color: var(--ok, #1f9d6b); }
.sw-split-list li[data-state='failed'] em, .sw-split-list li[data-state='refunded'] em { color: var(--err, #d0384f); }
.sw-split-notes { margin: 10px 0 0; padding-left: 18px; font-size: 12.5px; line-height: 1.45; color: var(--muted); }
.sw-split-status:not(:empty) { margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line-2); }
@media (max-width: 720px) { .sw-split-list li { grid-template-columns: minmax(0, 1fr) auto; } .sw-split-list li em { grid-column: 1 / -1; } }
/* A provider's or an exchange's own logo, next to its name. */
.sw-exlogo { width: 20px; height: 20px; border-radius: 6px; object-fit: cover; vertical-align: -5px; margin-right: 7px; flex: none; background: #fff1; }
.sw-net .sw-exlogo { width: 18px; height: 18px; vertical-align: -4px; margin-right: 6px; }
.sw-route-text .chip { vertical-align: middle; }
.sw-route-ring { width: 18px; height: 18px; opacity: .25; transition: opacity .2s; }
.sw-route-ring.on { opacity: 1; }
.sw-route-ring svg { display: block; width: 18px; height: 18px; transform: rotate(-90deg); }
.sw-route-ring circle { fill: none; stroke: var(--line-2); stroke-width: 2.6; }
.sw-route-ring circle.t { stroke: var(--red); stroke-dasharray: 56.6; stroke-dashoffset: 0; stroke-linecap: round; }
.sw-route-ring.run circle.t { animation: sw-ring 20s linear forwards; }
.sw.quoting .sw-route-ring svg { animation: sw-spin .9s linear infinite; }
.sw.quoting .sw-route-ring circle.t { stroke-dasharray: 18 56.6; animation: none; }
.sw-route .chipbtn { white-space: nowrap; }

.sw-exchange { display: grid; gap: 6px; margin-top: 8px; }
.sw-exchange .sw-nets { flex-wrap: wrap; overflow: visible; }
.sw-opts { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 0 14px; margin-top: 6px; }
.sw-lock { margin: 0; font-size: 13.5px; }
.sw-lock b { font-weight: 600; }
.sw-lock em { font: 500 12.5px/1.2 var(--mono); font-style: normal; color: var(--muted); }
.sw-link { all: unset; cursor: pointer; display: inline-flex; align-items: center; min-height: 36px; font: 600 13px/1.3 var(--sans); color: var(--red-2); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(var(--accent-rgb), .4); }
.sw-link:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; border-radius: 4px; }
.sw-go { margin-top: 12px; }
.sw-card .status:empty { min-height: 0; margin-top: 0; }
.sw-card .hint { margin-top: 10px; }
.sw-details { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.sw-details .note { margin: 8px 0 0; }

/* ---------- every route: rows (in the sheet, and on the page in layouts 2 and 4) ---------- */
.sw-rows { display: grid; gap: 8px; align-content: start; grid-auto-rows: max-content; }
.sw-row { all: unset; box-sizing: border-box; position: relative; overflow: hidden; cursor: pointer; display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1.2fr) minmax(0, .6fr) minmax(0, .9fr) minmax(0, 1fr); gap: 4px 14px; align-items: center; padding: 11px 14px 13px; border-radius: 13px; border: 1px solid var(--line-2); background: var(--bg-2); animation: sw-row-in .36s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--i, 0) * 34ms); transition: border-color .2s, background-color .2s; }
.sw-row:hover { border-color: var(--red); }
.sw-row[aria-checked='true'] { border-color: var(--red); background: var(--chip-bg); box-shadow: inset 0 0 0 1px var(--red); }
.sw-row:disabled { opacity: .55; cursor: not-allowed; }
.sw-row:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
.sw-row-name { display: grid; gap: 3px; min-width: 0; }
.sw-row-name b { font: 700 14.5px/1.2 var(--display); letter-spacing: -.01em; color: var(--text); }
.sw-row-name small { font-size: 12px; color: var(--muted); }
.sw-row-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.sw-row-tags:empty { display: none; }
.sw-row-tags .chip, .sw-route-text .chip, .sw-coinrow .chip { height: 19px; padding: 0 7px; font-size: 10px; display: inline-flex; align-items: center; font-style: normal; }
.sw-row-get { display: grid; gap: 2px; min-width: 0; }
.sw-row-get b { font: 700 14px/1.2 var(--mono); letter-spacing: -.01em; color: var(--text); overflow-wrap: anywhere; }
.sw-row-get small { font-size: 12px; color: var(--muted); }
.sw-row-get small.err { color: var(--err); }
.sw-row-cell { display: grid; gap: 2px; min-width: 0; font-size: 13px; color: var(--text); overflow-wrap: anywhere; }
.sw-row-cell i { font: 600 9.5px/1.2 var(--sans); font-style: normal; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); }
.risk-none span, .risk-low span { color: var(--ok); font-weight: 600; }
.risk-medium span { color: var(--wait); font-weight: 600; }
.risk-high span { color: var(--err); font-weight: 600; }
.sw-row-bar { position: absolute; left: 0; bottom: 0; height: 3px; width: var(--w, 100%); background: var(--grad); opacity: .6; border-radius: 0 3px 0 0; transform-origin: left; animation: sw-bar .6s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--i, 0) * 34ms + 120ms); }
/* the list on the page is narrower: name and amount on one line, the rest beneath */
.sw-board .sw-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sw-board .sw-row-name { grid-column: 1; }
.sw-board .sw-row-get { grid-column: 2; text-align: right; }
.sw-board { padding: 14px; }
.sw-board-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.sw-board-head h2 { margin: 0; }
.sw-board-sub { font-size: 12.5px; color: var(--muted); }
.sw-board .sw-link { display: block; margin-top: 10px; text-align: center; }

/* ---------- sheets: the coin picker and the route list ---------- */
dialog.sheet { box-sizing: border-box; width: min(520px, calc(100vw - 24px)); max-height: min(660px, calc(100dvh - 32px)); padding: 18px; border-radius: 20px; border: 1px solid var(--card-b); background: var(--card-s); color: var(--text); box-shadow: 0 40px 90px -30px rgba(40, 10, 110, .55); overflow: hidden; }
dialog.sheet[open] { display: flex; flex-direction: column; gap: 10px; animation: sw-sheet .3s cubic-bezier(.2, .8, .2, 1); }
dialog.sheet.wide { width: min(900px, calc(100vw - 24px)); }
dialog.sheet::backdrop { background: rgba(13, 11, 24, .55); }
.sheet-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex: none; }
.sheet-head h2 { margin: 0; }
.sheet-q { width: 100%; box-sizing: border-box; flex: none; font-family: var(--sans); }
.sheet-sub { margin: 0; font-size: 13.5px; flex: none; }
dialog.sheet .sw-coins, dialog.sheet .sw-rows { flex: 1 1 auto; min-height: 0; overflow: auto; overscroll-behavior: contain; padding: 2px; }
dialog.sheet .note { margin: 0; flex: none; }
dialog.sheet .note:empty { display: none; }
.sw-nets { display: flex; gap: 6px; flex: none; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.sw-nets::-webkit-scrollbar { display: none; }
.sw-net { all: unset; cursor: pointer; flex: none; padding: 7px 11px; border-radius: 99px; font: 600 12.5px/1 var(--sans); color: var(--muted); background: var(--bg-2); border: 1px solid var(--line-2); white-space: nowrap; }
.sw-net[aria-checked='true'] { color: var(--chip-ink); background: var(--chip-bg); border-color: transparent; }
.sw-net:focus-visible { outline: 2px solid var(--red); outline-offset: 1px; }
.sw-coins { list-style: none; margin: 0; display: grid; gap: 2px; align-content: start; grid-auto-rows: max-content; }
.sw-coins:focus { outline: none; }
.sw-coinrow { all: unset; box-sizing: border-box; width: 100%; cursor: pointer; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; min-height: 52px; padding: 8px 10px; border-radius: 12px; }
.sw-coinrow:hover, .sw-coinrow:focus-visible { background: var(--chip-bg); }
.sw-coinrow:focus-visible { outline: 2px solid var(--red); outline-offset: -2px; }
.sw-coinrow[aria-selected='true'] { box-shadow: inset 0 0 0 1.5px var(--red); }
.sw-coinrow-t { display: grid; min-width: 0; }
.sw-coinrow-t b { font: 700 15px/1.2 var(--display); letter-spacing: -.01em; }
.sw-coinrow-t small { font-size: 12.5px; color: var(--muted); }
.sw-coinrow-s { display: flex; align-items: center; gap: 6px; }
.sw-coinrow-s i { font: 500 11.5px/1 var(--sans); font-style: normal; color: var(--dim); }
.sw-coins .empty { padding: 22px 10px; text-align: center; color: var(--dim); font-size: 13.5px; }

/* ---------- after the button: progress, what to pay, the receipt ---------- */
.sw-run-head { display: flex; align-items: center; gap: 14px; margin-bottom: 8px; }
.sw-run-head h2 { margin: 0 0 2px; outline: none; }
.sw-run-head p { margin: 0; font-size: 13.5px; }
.sw-orb { position: relative; flex: none; width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 32% 26%, rgba(255, 255, 255, .9), rgba(var(--accent-rgb), .4) 38%, rgba(var(--accent-rgb), .95) 100%); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .4), 0 12px 28px -12px rgba(var(--accent-rgb), .9); }
.sw-orb .pw { width: 22px; height: 22px; color: #fff; stroke-width: 12; }
.sw-orb::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid transparent; }
.sw-orb[data-state='active']::after { border-top-color: var(--red); border-right-color: rgba(var(--accent-rgb), .35); animation: sw-spin 1.1s linear infinite; }
.sw-orb[data-state='done'] { background: radial-gradient(circle at 32% 26%, #fff, rgba(var(--ok-rgb), .55) 40%, var(--ok)); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .4), 0 12px 28px -12px rgba(var(--ok-rgb), .9); animation: sw-pop .5s cubic-bezier(.2, .8, .2, 1); }
.sw-orb[data-state='refunded'] { background: radial-gradient(circle at 32% 26%, #fff, rgba(var(--wait-rgb), .55) 40%, var(--wait)); }
.sw-orb[data-state='failed'] { background: radial-gradient(circle at 32% 26%, #fff, rgba(var(--err-rgb), .55) 40%, var(--err)); }
.sw-pay { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: start; margin: 10px 0 4px; padding: 14px; border-radius: 14px; background: var(--bg-2); border: 1px solid var(--line-2); }
.sw-pay .kv dd.mono { font-size: 13px; user-select: all; }
.sw-pay .row { margin-top: 10px; }
.sw-qr img { display: block; width: 132px; height: 132px; padding: 8px; background: #fff; border-radius: 12px; image-rendering: pixelated; }
.sw-steps { margin: 14px 0 6px; }
.sw-steps li[data-state='todo'] b { color: var(--dim); }
.sw-receipt { margin-top: 14px; padding: 14px 14px 10px; border-radius: 14px; background: var(--bg-2); border: 1px dashed var(--line-2); }
.sw-receipt h2 { margin: 0 0 4px; font-size: 15px; }
.sw-receipt .kv dd.mono { font-size: 12.5px; user-select: all; }

/* ---------- the other ways ---------- */
.sw-p { margin: 0 0 12px; font-size: 14px; }
.sw-many-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: 0 16px; align-items: start; }
.sw-when { display: flex; flex-wrap: wrap; gap: 6px; }
.sw-pill { position: relative; cursor: pointer; }
.sw-pill input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.sw-pill span { display: block; padding: 10px 12px; border-radius: 11px; border: 1px solid var(--line-2); background: var(--bg-2); font: 600 13px/1 var(--sans); color: var(--muted); white-space: nowrap; transition: color .2s, border-color .2s, background-color .2s; }
.sw-pill input:checked + span { color: var(--chip-ink); background: var(--chip-bg); border-color: var(--red); }
.sw-pill input:focus-visible + span { outline: 2px solid var(--red); outline-offset: 2px; }
.sw-own { margin-top: 8px; }
input.sw-own { width: 100%; box-sizing: border-box; font-size: 13.5px; }
.sw-timeline { position: relative; display: flex; justify-content: space-between; align-items: center; height: 26px; margin: 14px 6px 0; }
.sw-timeline::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 2px; margin-top: -1px; border-radius: 2px; background: linear-gradient(90deg, var(--red), rgba(var(--accent-rgb), .15)); }
.sw-timeline i { position: relative; width: 10px; height: 10px; border-radius: 50%; background: var(--card-s); box-shadow: inset 0 0 0 2px var(--red); animation: sw-dot 3s ease-in-out infinite; animation-delay: calc(var(--i, 0) * 220ms); }
.sw-timeline[data-once='true'] { justify-content: flex-start; gap: 5px; }
.sw-timeline[data-once='true']::before { right: auto; width: 40%; }
.sw-timeline[data-once='true'] i { animation-delay: 0s; }
#sw-many-length.err { color: var(--err); }
.sw-track-in { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.sw-addrs, .sw-wallets { padding: 0; margin: 10px 0 0; }
.sw-addrs li, .sw-wallets li { align-items: center; }
#sw-orders .v small { display: block; margin-top: 3px; font: 500 11.5px/1.2 var(--mono); color: var(--ok); }
.sw-found { margin-top: 8px; }

@keyframes sw-tick { from { opacity: .2; transform: translateY(7px); } }
@keyframes sw-turn { from { transform: rotate(-180deg); } }
@keyframes sw-spin { to { transform: rotate(360deg); } }
@keyframes sw-ring { to { stroke-dashoffset: 56.6; } }
@keyframes sw-row-in { from { opacity: 0; transform: translateY(8px); } }
@keyframes sw-bar { from { transform: scaleX(0); } }
@keyframes sw-sheet { from { opacity: 0; transform: translateY(18px) scale(.985); } }
@keyframes sw-pop { 0% { transform: scale(.7); } 60% { transform: scale(1.08); } }
@keyframes sw-dot { 0%, 100% { transform: scale(1); } 10% { transform: scale(1.55); background: var(--red); } 22% { transform: scale(1); background: var(--card-s); } }
@keyframes sw-breathe { 0%, 100% { transform: scale(1); opacity: .9; } 50% { transform: scale(1.06); opacity: 1; } }
@keyframes sw-orbit { to { transform: rotate(360deg); } }
@keyframes sw-glow { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }

@container sw (max-width: 620px) {
  .sw-card { padding: 14px 12px 16px; }
  .sw-panel:not(#sw-panel-swap) .sw-source { grid-template-columns: minmax(0, 1fr); }
  .sw[data-look='1'] #sw-form > .sw-source .sw-src-ico, .sw[data-look='3'] #sw-form > .sw-source .sw-src-ico { display: none; }
  .sw[data-look='1'] #sw-form > .sw-source .sw-src, .sw[data-look='3'] #sw-form > .sw-source .sw-src { padding: 9px 12px; grid-template-columns: minmax(0, 1fr); }
  .sw[data-look='1'] #sw-form > .sw-source, .sw[data-look='3'] #sw-form > .sw-source { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); }
  .sw[data-look='1'] #sw-form > .sw-source .sw-src b, .sw[data-look='3'] #sw-form > .sw-source .sw-src b { font-size: 12.5px; text-align: center; }
  .sw[data-look='4'] #sw-form > .sw-source { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); }
  .sw[data-look='1'] .sw-src-line { display: block; margin: 0 0 8px; }
  .sw-src { padding: 9px 10px; column-gap: 8px; }
  .sw-src-ico { width: 26px; height: 26px; border-radius: 9px; }
  .sw-src b { font-size: 13px; }
  .sw-src span { font-size: 12px; }
  .sw-many-grid { grid-template-columns: minmax(0, 1fr); }
  .sw-pay { grid-template-columns: minmax(0, 1fr); }
  .sw-qr img { width: 148px; height: 148px; }
  /* a route on a phone: name and amount on one line, the four facts beneath */
  .sw-row { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px 10px; padding: 11px 12px 13px; }
  .sw-row-name { grid-column: 1 / span 2; }
  .sw-row-get { grid-column: 3 / span 2; text-align: right; }
  .sw-board .sw-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sw-board .sw-row-name { grid-column: 1; }
  .sw-board .sw-row-get { grid-column: 2; }
}
@media (max-width: 620px) {
  .sw-row { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px 10px; padding: 11px 12px 13px; }
  .sw-row-name { grid-column: 1 / span 2; }
  .sw-row-get { grid-column: 3 / span 2; text-align: right; }
  dialog.sheet, dialog.sheet.wide { width: 100vw; max-width: 100vw; margin: auto 0 0; border-radius: 20px 20px 0 0; border-bottom: 0; max-height: 88dvh; padding: 16px 14px calc(16px + env(safe-area-inset-bottom)); }
  dialog.sheet[open] { animation-name: sw-sheet-up; }
}
@keyframes sw-sheet-up { from { transform: translateY(60px); opacity: .4; } }
@media (max-height: 700px) and (min-width: 821px) {
  .sw h1 { font-size: clamp(24px, 5.4vh, 34px); margin: 8px 0 8px -.03em; }
  .sw-dev { margin-bottom: 8px; }
  .sw-card { padding: 14px 16px 16px; }
  .sw-source { margin-bottom: 10px; }
  .sw-leg { padding: 8px 12px 8px 14px; }
  .sw-ways { margin-bottom: 10px; }
  .sw[data-look='2'] .sw-ways, .sw[data-look='4'] .sw-ways { margin-bottom: 8px; }
  .sw[data-look='2'] .sw-card, .sw[data-look='4'] .sw-card { padding: 10px 14px 14px; }
  .sw[data-look='2'] .sw-source { margin-bottom: 8px; }
  .sw[data-look='2'] .sw-src { padding: 6px 12px; }
  .sw[data-look='2'] .sw-leg, .sw[data-look='4'] .sw-leg { padding: 6px 12px 6px 14px; }
  .sw[data-look='2'] .sw-route, .sw[data-look='4'] .sw-route { margin-top: 8px; }
  .sw[data-look='2'] .sw-go, .sw[data-look='4'] .sw-go { margin-top: 8px; }
}

/* =====================================================================================================
   Layout 1 · Quiet. Only the form. The other ways wait behind one line under it; routes open in a sheet.
   ===================================================================================================== */
.sw[data-look='1'].on { display: flex; flex-direction: column; }
.sw[data-look='1'] .sw-ways { order: 9; margin: 10px 0 0; }
.sw[data-look='1'] .sw-ways:not(.open) { display: none; }
.sw[data-look='1'] .sw-moreways { display: block; order: 8; }
.sw[data-look='1'].away .sw-ways { display: flex; order: 0; margin: 2px 0 12px; }
.sw[data-look='1'].away .sw-moreways { display: none; }
.sw[data-look='1'] #sw-form > .sw-source { display: inline-grid; vertical-align: middle; grid-template-columns: auto auto; gap: 4px; padding: 4px; margin-bottom: 8px; border-radius: 13px; background: var(--bg-2); border: 1px solid var(--line-2); }
.sw[data-look='1'] #sw-form > .sw-source .sw-src { padding: 7px 12px 7px 8px; border: 0; border-radius: 10px; background: none; box-shadow: none; }
.sw[data-look='1'] #sw-form > .sw-source .sw-src span { display: none; }
.sw[data-look='1'] #sw-form > .sw-source .sw-src-ico { grid-row: auto; width: 24px; height: 24px; border-radius: 8px; }
.sw[data-look='1'] #sw-form > .sw-source .sw-src-ico svg { width: 14px; height: 14px; }
.sw[data-look='1'] #sw-form > .sw-source .sw-src b { font-size: 13.5px; }
.sw[data-look='1'] #sw-form > .sw-source .sw-src:has(input:checked) { background: var(--chip-bg); }
.sw[data-look='1'] .sw-src-line { display: inline-block; vertical-align: middle; margin: 0 0 8px 10px; max-width: 100%; }

/* =====================================================================================================
   Layout 2 · Open. The ways as tabs on top, both ways to pay explained, the top routes and the fees on the page.
   ===================================================================================================== */
.sw[data-look='2'] .sw-ways { padding: 4px; border-radius: 14px; background: var(--bg-2); border: 1px solid var(--line-2); }
.sw[data-look='2'] .sw-ways button { flex: 1 0 auto; justify-content: center; }
.sw[data-look='2'] .sw-board { margin-top: 14px; }
@container sw (min-width: 621px) {
  .sw[data-look='2'] .sw-board .sw-row { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1.2fr) minmax(0, .6fr) minmax(0, .8fr); }
  .sw[data-look='2'] .sw-board .sw-row-get { text-align: left; }
}
.sw[data-look='2'] #sw-details[hidden] { display: block !important; }
.sw[data-look='2'] #sw-details[hidden] > :not(.kv) { display: none !important; }
.sw[data-look='2'] #btn-sw-details { display: none; }
.sw[data-look='2'] .sw-route { border-color: rgba(var(--accent-rgb), .35); background: rgba(var(--accent-rgb), .05); }

/* =====================================================================================================
   Layout 3 · Orb. The form around the pool's orb, richer motion, the ways as chips underneath.
   ===================================================================================================== */
.sw[data-look='3'].on { display: flex; flex-direction: column; }
.sw[data-look='3'] .sw-ways { order: 9; justify-content: center; flex-wrap: wrap; margin: 14px 0 0; }
.sw[data-look='3'] .sw-ways button { border: 1px solid var(--line-2); background: var(--card); border-radius: 99px; padding: 9px 14px; }
.sw[data-look='3'] .sw-ways button[aria-selected='true'] { border-color: var(--red); background: var(--chip-bg); }
.sw[data-look='3'] .sw-way-link { margin-left: 0; }
.sw[data-look='3'] .sw-card { position: relative; overflow: hidden; background: linear-gradient(150deg, var(--card), rgba(var(--accent-rgb), .11)); }
.sw[data-look='3'] .sw-card::before { content: ""; position: absolute; right: -60px; top: -70px; width: 260px; height: 260px; opacity: .07; pointer-events: none; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' fill='none' stroke='%237c3aed' stroke-width='11' stroke-linecap='round'%3E%3Cpath fill='%237c3aed' stroke='none' d='M8.56 27.76 L33.61 11.37 L33.61 30.57 L25.41 35.56 L25.41 64.13 L50 79.11 L74.59 64.13 L74.59 35.56 L66.47 30.57 L66.47 11.37 L91.44 27.76 L91.44 73.02 L50 98 L8.56 73.02Z'/%3E%3Cpath fill='%237c3aed' stroke='none' d='M50 2 L58.35 6.84 L58.35 44.93 L50 49.77 L41.65 44.93 L41.65 6.84Z'/%3E%3C/svg%3E") center / contain no-repeat; }
.sw[data-look='3'] .sw-form, .sw[data-look='3'] .sw-run { position: relative; }
.sw[data-look='3'] #sw-form > .sw-source { display: flex; justify-content: center; gap: 4px; margin-bottom: 6px; }
.sw[data-look='3'] #sw-form > .sw-source .sw-src { padding: 6px 13px 6px 7px; border-radius: 99px; background: var(--card-s); }
.sw[data-look='3'] #sw-form > .sw-source .sw-src span { display: none; }
.sw[data-look='3'] #sw-form > .sw-source .sw-src-ico { grid-row: auto; width: 24px; height: 24px; border-radius: 50%; }
.sw[data-look='3'] #sw-form > .sw-source .sw-src-ico svg { width: 13px; height: 13px; }
.sw[data-look='3'] #sw-form > .sw-source .sw-src b { font-size: 13px; }
.sw[data-look='3'] .sw-src-line { display: block; text-align: center; margin: 0 0 10px; }
.sw[data-look='3'] .sw-pair { display: grid; grid-template-columns: minmax(0, 1fr) 92px minmax(0, 1fr); align-items: stretch; gap: 0; }
.sw[data-look='3'] .sw-leg { display: flex; flex-direction: column; justify-content: center; background: var(--card-s); padding: 12px 14px; }
.sw[data-look='3'] .sw-leg-main { grid-template-columns: minmax(0, 1fr); gap: 8px; margin-top: 6px; }
.sw[data-look='3'] .sw-leg-main .sw-coin { order: -1; justify-self: start; }
.sw[data-look='3'] #sw-leg-get { text-align: right; }
.sw[data-look='3'] #sw-leg-get .sw-leg-main .sw-coin { justify-self: end; }
.sw[data-look='3'] #sw-leg-get .sw-leg-top { flex-direction: row-reverse; }
.sw[data-look='3'] .sw-mid { height: auto; min-height: 96px; display: grid; place-items: center; }
.sw[data-look='3'] .sw-flip { position: relative; left: auto; top: auto; margin: 0; width: 62px; height: 62px; border: 0; color: #fff; background: radial-gradient(circle at 32% 26%, rgba(255, 255, 255, .9), rgba(var(--accent-rgb), .45) 36%, rgba(var(--accent-rgb), .96) 100%); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .45), 0 14px 30px -12px rgba(var(--accent-rgb), .95); animation: sw-breathe 4.2s ease-in-out infinite; }
.sw[data-look='3'] .sw-flip svg { width: 22px; height: 22px; transform: rotate(90deg); filter: drop-shadow(0 1px 2px rgba(60, 20, 150, .6)); }
.sw[data-look='3'] .sw-flip:hover { transform: rotate(180deg); }
.sw[data-look='3'] .sw-flip.turn { animation: sw-turn .5s cubic-bezier(.2, .8, .2, 1); }
.sw[data-look='3'] .sw-orbit { display: block; position: absolute; left: 50%; top: 50%; width: 86px; height: 86px; margin: -43px 0 0 -43px; border-radius: 50%; border: 1px dashed rgba(var(--accent-rgb), .4); animation: sw-orbit 9s linear infinite; pointer-events: none; }
.sw[data-look='3'] .sw-orbit i { position: absolute; width: 7px; height: 7px; margin: -3.5px; border-radius: 50%; background: var(--red); box-shadow: 0 0 8px var(--pglow); }
.sw[data-look='3'] .sw-orbit i:nth-child(1) { left: 50%; top: 0; }
.sw[data-look='3'] .sw-orbit i:nth-child(2) { left: 6.7%; top: 75%; opacity: .6; }
.sw[data-look='3'] .sw-orbit i:nth-child(3) { left: 93.3%; top: 75%; opacity: .35; }
.sw[data-look='3'].quoting .sw-orbit { animation-duration: 1.4s; }
.sw[data-look='3'] .sw-dest-own { justify-content: center; }
.sw[data-look='3'] .sw-route { border: 0; background: none; padding: 4px 0 0; grid-template-columns: auto minmax(0, 1fr) auto; }
.sw[data-look='3'] .sw-go .btn { min-height: 54px; font-size: 16.5px; }
.sw[data-look='3'] output.sw-amt.tick { animation: sw-tick .5s cubic-bezier(.2, .8, .2, 1), sw-glow .5s; }

/* =====================================================================================================
   Layout 4 · Desk. The form and every route side by side; on a phone the routes become cards to swipe.
   ===================================================================================================== */
.sw[data-look='4'] .sw-ways { border-bottom: 1px solid var(--line); border-radius: 0; padding: 0; gap: 2px; }
.sw[data-look='4'] .sw-ways button { border-radius: 10px 10px 0 0; padding: 10px 13px 11px; position: relative; }
.sw[data-look='4'] .sw-ways button[aria-selected='true'] { background: none; }
.sw[data-look='4'] .sw-ways button[aria-selected='true']::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2.5px; border-radius: 3px; background: var(--grad); }
.sw[data-look='4'] .sw-wrap { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.sw[data-look='4'] .sw-board .sw-row { padding: 9px 12px 11px; gap: 2px 10px; }
.sw[data-look='4'] .sw-board { margin-top: 0; max-height: min(520px, calc(100dvh - 190px)); display: flex; flex-direction: column; }
.sw[data-look='4'] .sw-board .sw-rows { overflow: auto; min-height: 0; padding: 2px; overscroll-behavior: contain; }
.sw[data-look='4'] #btn-sw-routes { display: none; }
.sw[data-look='4'] .sw-route { grid-template-columns: auto minmax(0, 1fr); }
.sw[data-look='4'] #sw-form > .sw-source .sw-src span { display: none; }
.sw[data-look='4'] #sw-form > .sw-source .sw-src { padding: 8px 10px; }
.sw[data-look='4'] #sw-form > .sw-source .sw-src-ico { display: none; }
.sw[data-look='4'] #sw-form > .sw-source .sw-src b { font-size: 12.5px; text-align: center; }
.sw[data-look='4'] #sw-form > .sw-source .sw-src { grid-template-columns: minmax(0, 1fr); }
.sw[data-look='4'] #sw-form > .sw-source { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); margin-bottom: 8px; }
.sw[data-look='4'] .sw-form { display: flex; flex-direction: column; }
.sw[data-look='4'] .sw-opts { order: 1; margin-top: 10px; }
.sw[data-look='4'] #sw-match, .sw[data-look='4'] #sw-idnote, .sw[data-look='4'] #sw-details { order: 2; }
.sw[data-look='4'] .sw-dest-sub { display: none; }
@media (min-width: 1181px) {
  .sw[data-look='4'] { max-width: 900px; }
}
@container sw (max-width: 600px) {
  .sw[data-look='4'] .sw-wrap { grid-template-columns: minmax(0, 1fr); }
  .sw[data-look='4'] .sw-board { max-height: none; padding: 12px 0 12px 12px; }
  .sw[data-look='4'] .sw-board-head { padding-right: 12px; }
  .sw[data-look='4'] .sw-board .sw-rows { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 2px 12px 6px 2px; scrollbar-width: none; }
  .sw[data-look='4'] .sw-board .sw-rows::-webkit-scrollbar { display: none; }
  .sw[data-look='4'] .sw-board .sw-row { flex: 0 0 78%; scroll-snap-align: start; }
}
@container sw (max-width: 620px) {
  .sw[data-look='3'] .sw-pair { grid-template-columns: minmax(0, 1fr); }
  .sw[data-look='3'] .sw-mid { min-height: 0; height: 22px; }
  .sw[data-look='3'] .sw-flip { position: absolute; left: 50%; top: 50%; margin: -27px 0 0 -27px; width: 54px; height: 54px; }
  .sw[data-look='3'] .sw-flip svg { transform: none; }
  .sw[data-look='3'] .sw-orbit { width: 74px; height: 74px; margin: -37px 0 0 -37px; }
  .sw[data-look='3'] .sw-leg-main { grid-template-columns: minmax(0, 1fr) auto; }
  .sw[data-look='3'] .sw-leg-main .sw-coin { order: 0; }
  .sw[data-look='3'] #sw-leg-get { text-align: left; }
  .sw[data-look='3'] #sw-leg-get .sw-leg-top { flex-direction: row; }
  .sw[data-look='3'] #sw-leg-send { padding-bottom: 22px; }
  .sw[data-look='3'] #sw-leg-get { padding-top: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  .sw *, dialog.sheet, dialog.sheet * { animation: none !important; transition: none !important; }
}

/* Real coin logos (served by our own server), over the lettered glyph, which stays if a logo fails to load. */
.sw-glyph { position: relative; overflow: hidden; }
.sw-glyph-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; background: #fff; }
.sw-glyph.has-img { color: transparent; box-shadow: inset 0 0 0 1px rgba(20, 14, 60, .12); }

/* The private pool's own coins (SOL and USDC on Solana): purple, so they read as ours at a glance. */
.sw-coinrow.is-pool { background: color-mix(in srgb, #8b5cf6 11%, transparent); box-shadow: inset 3px 0 0 #8b5cf6; }
.sw-coinrow.is-pool b { color: #6d28d9; }
.sw-coin.is-pool, button.is-pool[id^="sw-coin"] { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, #8b5cf6 55%, transparent); background: color-mix(in srgb, #8b5cf6 8%, transparent); }
.chip.pool, .sw-chip.pool { background: #8b5cf6; color: #fff; }
.t-night .sw-coinrow.is-pool b { color: #c4b5fd; }

/* "Go private" on a wallet swap: the purple of the pool, the wait choice under it. */
.sw-private { margin: 4px 0 10px; padding: 10px 12px; border: 1px solid color-mix(in srgb, var(--accent, #7c4dff) 35%, transparent); border-radius: 14px; background: color-mix(in srgb, var(--accent, #7c4dff) 7%, transparent); }
.sw-private-on { margin: 0; display: grid; grid-template-columns: auto 1fr; column-gap: 10px; align-items: center; }
.sw-private-on b { font-weight: 650; }
.sw-private-on em { grid-column: 2; font-style: normal; font-size: 12.5px; line-height: 1.35; color: var(--muted); }
.sw-private-wait { margin-top: 10px; }
.sw-wave { margin: 10px 0 0; font-size: 12.5px; line-height: 1.4; color: var(--muted); }
.sw-wave b { font: 600 13px/1.2 var(--mono); color: var(--text, inherit); font-variant-numeric: tabular-nums; }

/* Private mode (swap.js buildMode): one switch in place of the two "pay from" tabs. On = through our pool; off = an
   ordinary public swap through outside services. The tabs and the Go private tick are still in the page, unseen. */
.sw .sw-form.has-mode .sw-source, .sw .sw-form.has-mode .sw-src-line { display: none !important; }
.sw-modebox { margin-bottom: 12px; }
.sw-form.has-mode .sw-private-on { display: none; }
.sw-form.has-mode .sw-private:not(:has(#sw-private-wait:not([hidden]))) { display: none; }
.sw-modebox { padding: 12px 14px; border-radius: 15px; border: 1px solid var(--line-2); background: var(--card); transition: border-color .2s, box-shadow .2s, background-color .2s; }
.sw-modebox.is-on { border-color: var(--red); background: var(--chip-bg); box-shadow: inset 0 0 0 1px var(--red), 0 10px 26px -18px rgba(124, 58, 237, .9); }
.sw-mode { margin: 0; gap: 12px; }
.sw-mode span { width: 48px; height: 27px; }
.sw-mode span::after { width: 19px; height: 19px; }
.sw-mode input:checked + span::after { transform: translateX(21px); }
.sw-mode input:disabled + span { opacity: .6; }
.sw-mode b { font: 800 16px/1.2 var(--display); letter-spacing: -.01em; color: var(--text); }
.sw-mode-pill { margin-left: auto; font: 700 11px/1 var(--mono); font-style: normal; letter-spacing: .08em; text-transform: uppercase; padding: 5px 9px; border-radius: 99px; color: var(--muted); background: var(--panel-3); }
.sw-modebox.is-on .sw-mode-pill { color: #fff; background: var(--grad); }
.sw-mode-note { margin: 8px 0 0; font-size: 13px; line-height: 1.45; color: var(--muted); }
.sw-mode-from { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.sw-mode-from[hidden] { display: none; }
.sw-mode-from > span { font: 600 11.5px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-right: 2px; }
.sw-mode-chip { all: unset; cursor: pointer; padding: 8px 12px; border-radius: 99px; font: 600 13px/1 var(--sans); color: var(--text); background: var(--card-s); box-shadow: inset 0 0 0 1px var(--line-2); }
.sw-mode-chip[aria-pressed='true'] { color: #fff; background: var(--grad); box-shadow: none; }
.sw-mode-chip:disabled { opacity: .45; cursor: default; }
.sw-mode-chip:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
.sw.alone .sw-modebox { display: none !important; }

/* A phone: the Swap form fits one screen, with the slide button above the tab bar. No page heading, a short line
   under Private mode, tighter boxes. What is under the button (the other ways) stays below, one scroll away. */
@media (max-width: 720px) {
  .screen.sw div:has(> .kicker) { display: none; }
  body:has(.screen.sw.on) #stage { padding-top: 10px; }
  .sw .sw-card { padding: 8px 10px 10px; }
  .sw-modebox { padding: 7px 12px; margin-bottom: 6px; }
  .sw-mode b { font-size: 15px; }
  .sw-mode-note { margin-top: 5px; font-size: 0; line-height: 0; }
  .sw-mode-note::before { content: attr(data-short); font-size: 12.5px; line-height: 1.35; }
  .sw-mode-from { margin-top: 7px; gap: 6px; }
  .sw-mode-chip { padding: 7px 11px; font-size: 12.5px; }
  .sw .sw-leg { padding: 6px 12px 6px 14px; }
  .sw .sw-dest-own { padding: 7px 14px; }
  .sw .sw-dest-own .sw-dest-sub { display: none; }
  .sw .sw-route { margin-top: 8px; padding: 6px 10px 6px 12px; }
  .sw .sw-opts { margin-top: 0; flex-wrap: nowrap; gap: 0 10px; }
  .sw .sw-opts .sw-link { min-height: 26px; white-space: nowrap; }
  /* With "Lock the rate" in the row too, the link is one word. */
  .sw-form:not(:has(#sw-mode-box.is-on)) .sw-advlink { font-size: 0; }
  .sw-form:not(:has(#sw-mode-box.is-on)) .sw-advlink::before { content: attr(data-short); font-size: 13px; }
  .sw .sw-lock b { white-space: nowrap; }
  /* Nothing under the form: the ways are behind "Advanced options", so the screen has nothing to scroll. */
  .sw[data-look='1']:not(.away) .sw-ways { display: none !important; }
  html:has(.screen.sw.on:not(.away)) { overscroll-behavior-y: none; }
  body:has(.screen.sw.on:not(.away)) #stage { padding-bottom: 0; min-height: 0; } /* the shell already keeps the tab bar's height free */
  .sw .sw-go { margin-top: 2px; }
  .sw .sw-go.has-swipe > .swipe { margin: 10px auto 2px; }
  .sw .sw-go.has-swipe { margin-top: 0; }
  /* Whatever the form's height (two address fields, a small phone), the slide button stays in place, just above
     the tab bar: the form moves under it, the button never has to be scrolled to. */
  .sw .sw-go.has-swipe { position: sticky; bottom: calc(80px + env(safe-area-inset-bottom, 0px)); z-index: 4; }
  .sw .sw-dest { gap: 5px; }
  .sw .sw-dest-addr .sw-k { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .sw .sw-dest-addr .input { min-height: 0; height: 40px; padding-top: 0; padding-bottom: 0; }
  .sw .sw-refund { margin-top: 0; }
  /* The round amounts: one row that slides sideways, without its sentence. */
  .sw :has(> #swap-round) > :first-child:not(#swap-round) { display: none; }
  .sw #swap-round { flex-wrap: nowrap; overflow-x: auto; margin-top: 6px; padding-bottom: 2px; scrollbar-width: none; }
  .sw #swap-round > * { flex: none; }
  .sw .sw-leg { padding: 4px 12px 4px 14px; }
  .sw .sw-route { margin-top: 6px; padding: 5px 10px 5px 12px; font-size: 13px; }
  .sw .sw-dest-addr { gap: 3px; }
  /* Through the pool from a wallet: the three waits as one short row, and no "Lock the rate" (the pool's price is not held). */
  .sw .sw-private { margin-top: 6px; padding: 0; border: 0; background: none; }
  .sw .sw-private-wait { margin-top: 0; gap: 6px; }
  .sw .sw-private-wait .mode { padding: 6px 6px; min-height: 0; }
  .sw .sw-private-wait .mode b { font-size: 12.5px; }
  .sw .sw-private-wait .mode span { display: none; }
  .sw-form:has(#sw-mode-box.is-on) #sw-lock-box { display: none; }
}

/* Slide to confirm, on a phone (swipe.js). The mascot is the handle: hold him and drag him to the right; he follows
   the finger exactly and leaves a glowing trail behind him. The real button stays in the page, out of sight, for
   screen readers and the keyboard. swipe.js writes three numbers on .swipe and nothing else: --sw-x (how far he is,
   in px), --sw-p (the same as 0..1) and --sw-cut (where his front is, in the label's own px).
   The trail is "Pulse" (number 16 of the owner's sheet): the rim of the button lights up as he is dragged, and his
   picture (drawn with Higgsfield after that sheet) carries his own trail of light. */
.swipe { display: none; }
.has-swipe > .btn { position: absolute; width: 1px; height: 1px; min-height: 0; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; box-shadow: none; }
.has-swipe { position: relative; }
.has-swipe > .swipe { --sw-x: 0; --sw-p: 0; --sw-cut: 0; display: block; position: relative; width: 100%; height: 60px; max-width: 440px; margin: 26px auto 10px; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; touch-action: pan-y; }
.has-swipe > .btn:focus-visible + .swipe { outline: 2px solid var(--red); outline-offset: 5px; border-radius: 34px; }
.swipe__in { position: absolute; inset: 0; overflow: hidden; border-radius: 30px; background: linear-gradient(180deg, #170a33, #0d0620); border: 2px solid #c8a2ff; box-shadow: 0 0 18px rgba(170, 100, 255, .8), 0 10px 26px -14px rgba(90, 30, 200, .9), inset 0 0 20px rgba(140, 70, 255, .2); }
.swipe__fill { position: absolute; left: 0; top: 0; bottom: 0; width: calc(var(--sw-x) * 1px + min(var(--sw-x) * 1px, 46px)); pointer-events: none; }
.swipe__fill::after { content: ""; position: absolute; inset: 0; }
.swipe__label { position: absolute; inset: 0 46px 0 90px; display: flex; align-items: center; justify-content: center; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent calc(var(--sw-cut) * 1px), #000 calc(var(--sw-cut) * 1px + 16px)); mask-image: linear-gradient(90deg, transparent calc(var(--sw-cut) * 1px), #000 calc(var(--sw-cut) * 1px + 16px)); }
.swipe__label b { font: italic 700 16.5px/1 var(--sans); color: #fff; white-space: nowrap; letter-spacing: 0; text-shadow: 0 0 12px rgba(168, 85, 247, .75); }
.swipe__hint { position: absolute; right: 16px; top: 50%; width: 26px; height: 18px; margin-top: -9px; opacity: calc(1 - var(--sw-p) * 2.2); background: linear-gradient(90deg, rgba(255, 255, 255, .35), #fff 50%, rgba(255, 255, 255, .35)) 0 0 / 300% 100%; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 26 18' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 2.5l7 6.5-7 6.5M14 2.5l7 6.5-7 6.5'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 26 18' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 2.5l7 6.5-7 6.5M14 2.5l7 6.5-7 6.5'/%3E%3C/svg%3E") center / contain no-repeat; animation: swipe-hint 1.6s linear infinite; }
/* The handle, and (for the Echo trail) his copies: all in one place, moved by --sw-x alone. */
/* His picture carries his own trail of light (img/ninja-dash.webp: the trail runs left from him). It is drawn twice,
   in the same place: once inside the button, cut by the button's own shape (the trail), and once over it showing
   only him, so his head can stand above the rim. */
.swipe__run { position: absolute; inset: 0; pointer-events: none; }
.swipe__trail { position: absolute; left: 0; bottom: -5px; width: 85px; height: 72px; transform: translate3d(calc(var(--sw-x) * 1px), 0, 0); will-change: transform; pointer-events: none; }
.swipe__trail img { position: absolute; right: 0; bottom: 0; height: 100%; width: auto; max-width: none; }
/* Measured from the picture's right edge, where he stands whatever the trail's length. */
.swipe__run img { -webkit-mask-image: linear-gradient(270deg, transparent 2px, #000 9px, #000 64px, transparent 76px); mask-image: linear-gradient(270deg, transparent 2px, #000 9px, #000 64px, transparent 76px); }
.swipe__trail img { -webkit-mask-image: linear-gradient(270deg, transparent 2px, #000 9px); mask-image: linear-gradient(270deg, transparent 2px, #000 9px); }
.swipe.no-art .swipe__trail { display: none; }
.swipe__run > .swipe__thumb { pointer-events: auto; }
.swipe__thumb { position: absolute; left: 22px; bottom: -3px; width: 62px; height: 72px; transform: translate3d(calc(var(--sw-x) * 1px), 0, 0); will-change: transform; }
.swipe__thumb { touch-action: none; cursor: grab; }
.swipe__thumb::before { content: ""; position: absolute; inset: -6px -14px -8px -8px; }
.swipe__thumb img { position: absolute; right: -3px; bottom: 0; height: 100%; width: auto; max-width: none; pointer-events: none; }
.swipe__thumb img { filter: drop-shadow(0 0 5px rgba(190, 130, 255, .6)); transition: transform .18s cubic-bezier(.2, .8, .2, 1), filter .2s; transform-origin: 50% 100%; }
.swipe__knob { display: none; }
.swipe.no-art .swipe__thumb { left: 8px; bottom: 8px; width: 44px; height: 44px; }
.swipe.no-art .swipe__thumb img { display: none !important; }
.swipe.no-art .swipe__knob { display: block; width: 100%; height: 100%; border-radius: 50%; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236d28d9' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 5l7 7-7 7'/%3E%3C/svg%3E") center / 22px no-repeat; box-shadow: 0 0 14px rgba(190, 130, 255, .9); }
.swipe.no-art .swipe__label { left: 58px; }
.swipe.is-drag .swipe__thumb { cursor: grabbing; }
.swipe.is-drag .swipe__thumb img { transform: scale(1.07) rotate(3deg); filter: drop-shadow(0 0 10px rgba(214, 170, 255, 1)); }
/* Only letting go is animated (he runs back, or to the end); under the finger nothing eases. */
.swipe.is-anim { transition: --sw-x .42s cubic-bezier(.2, .9, .25, 1), --sw-p .42s linear, --sw-cut .42s cubic-bezier(.2, .9, .25, 1); }
.swipe.is-nudge .swipe__thumb img { animation: swipe-nudge .55s cubic-bezier(.3, .7, .3, 1); }
/* Not ready yet: dimmed, but still solid, so the form never shows through it while it stays above the tab bar. */
.swipe.is-off .swipe__in { border-color: #6f5a99; box-shadow: none; background: linear-gradient(180deg, #120928, #0b0519); }
.swipe.is-off .swipe__label b { color: #8f84ad; text-shadow: none; }
.swipe.is-off .swipe__thumb { pointer-events: none; }
.swipe.is-off .swipe__thumb img, .swipe.is-off .swipe__trail img { filter: grayscale(.7) brightness(.55); }
.swipe.is-off .swipe__hint, .swipe.is-busy .swipe__hint, .swipe.is-done .swipe__hint { display: none; }
.swipe.is-busy .swipe__thumb, .swipe.is-done .swipe__thumb { pointer-events: none; }
.swipe.is-busy .swipe__label { inset: 0 86px 0 18px; -webkit-mask-image: none; mask-image: none; }
.swipe.is-busy .swipe__label b::before { content: ""; display: inline-block; width: 12px; height: 12px; margin-right: 8px; vertical-align: -1px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
.swipe.is-busy .swipe__thumb img { animation: swipe-work .5s ease-in-out infinite alternate; }

/* 16 · Pulse: the rim answers the drag, speed lines behind him. */
.swipe[data-trail='16'] .swipe__in { border-color: rgba(214, 180, 255, calc(.8 + var(--sw-p) * .2)); box-shadow: 0 0 calc(18px + var(--sw-p) * 26px) rgba(176, 110, 255, calc(.8 + var(--sw-p) * .2)), 0 10px 26px -14px rgba(90, 30, 200, .9), inset 0 0 calc(20px + var(--sw-p) * 22px) rgba(150, 80, 255, calc(.2 + var(--sw-p) * .35)); }
.swipe[data-trail='16'] .swipe__in::before { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 16px rgba(190, 130, 255, .55); animation: swipe-pulse 2.2s ease-in-out infinite; pointer-events: none; }
.swipe[data-trail='16'] .swipe__fill { background: linear-gradient(90deg, rgba(150, 70, 255, .28), rgba(160, 84, 255, .34) 60%, rgba(176, 110, 255, 0)); }
@property --sw-x { syntax: '<number>'; inherits: true; initial-value: 0; }
@property --sw-p { syntax: '<number>'; inherits: true; initial-value: 0; }
@property --sw-cut { syntax: '<number>'; inherits: true; initial-value: 0; }
@keyframes swipe-hint { from { background-position: 100% 0; } to { background-position: -50% 0; } }
@keyframes swipe-nudge { 0%, 100% { transform: translateX(0); } 40% { transform: translateX(24px) rotate(3deg); } }
@keyframes swipe-work { from { transform: translateX(0); } to { transform: translateX(3px) rotate(2deg); } }
@keyframes swipe-pulse { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .swipe__hint, .swipe.is-busy .swipe__thumb img, .swipe.is-nudge .swipe__thumb img, .swipe[data-trail='16'] .swipe__in::before { animation: none; } .swipe.is-anim { transition: none; } }

/* A payment on the way (pending.js): on the phone Swap form its chip sits small in the top bar, so it never
   lies over the slide button, which is fixed just above the tab bar. A tap opens the same list. */
@media (max-width: 720px) {
  body:has(.screen.sw.on:not(.away)) .pd[data-look='1'] .pd-chip { left: auto; right: 152px; top: calc(11px + env(safe-area-inset-top, 0px)); bottom: auto; width: auto; padding: 3px; border-radius: 99px; z-index: 40; }
  body:has(.screen.sw.on:not(.away)) .pd[data-look='1'] .pd-chip-text, body:has(.screen.sw.on:not(.away)) .pd[data-look='1'] .pd-chip-c { display: none; }
}

/* ===== The owner's layout (29 Nov 2026): two big tabs over the form, "Single Swap" and "Multi Swap" (the other
   ways, in place of "Advanced options"), and Privacy mode as one row under "Lock the rate". swap.js builds both
   (buildSeg, buildMode) and marks the screen .has-seg. ===== */
.sw-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 5px; margin: 0 0 12px; border-radius: 17px; background: var(--card); border: 1px solid var(--line-2); }
.sw-seg button { all: unset; box-sizing: border-box; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 46px; padding: 0 12px; border-radius: 12px; font: 800 16px/1 var(--display); letter-spacing: -.01em; color: var(--red-2); white-space: nowrap; transition: color .2s, background-color .2s, box-shadow .2s; }
.sw-seg button svg { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sw-seg button:hover { background: var(--chip-bg); }
.sw-seg button[aria-selected='true'] { color: #fff; background: var(--grad); box-shadow: 0 10px 24px -14px rgba(124, 58, 237, .95); }
.sw-seg button:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
.sw.alone .sw-seg { display: none !important; }
.sw.has-seg .sw-moreways, .sw.has-seg .sw-advlink { display: none !important; }
/* The row of ways shows only under "Multi Swap", without its own "Swap" tab. */
.sw.has-seg[data-look] .sw-ways { display: none !important; }
.sw.has-seg.away[data-look] .sw-ways { display: flex !important; order: 0; margin: 0 0 12px; }
.sw.has-seg #sw-tab-swap { display: none; }

.sw.has-seg .sw-modebox { margin: 10px 0 0; padding: 9px 14px; }
.sw-mode-top { display: flex; align-items: center; gap: 12px; min-width: 0; }
.sw-mode-top .sw-mode { flex: none; }
.sw-mode-shield { display: grid; place-items: center; flex: none; color: var(--red-2); }
.sw-mode-shield svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sw.has-seg .sw-mode b { font: 700 15px/1.2 var(--sans); letter-spacing: 0; }
.sw.has-seg .sw-mode-pill { display: none; }
.sw-mode-line { flex: 1; min-width: 0; font-size: 13.5px; line-height: 1.35; color: var(--muted); }
.sw-mode-i { all: unset; box-sizing: border-box; cursor: pointer; flex: none; width: 22px; height: 22px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--muted); color: var(--muted); font: 700 12px/22px var(--mono); text-align: center; }
.sw-mode-i:hover, .sw-mode-i[aria-expanded='true'] { color: var(--red-2); box-shadow: inset 0 0 0 1.5px var(--red-2); }
.sw-mode-i:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
.sw.has-seg .sw-mode-note { display: none; margin: 8px 0 0; }
.sw.has-seg .sw-modebox.info .sw-mode-note { display: block; }
@media (max-width: 720px) {
  .sw-seg { margin-bottom: 7px; padding: 4px; border-radius: 14px; }
  .sw-seg button { min-height: 38px; font-size: 14.5px; gap: 8px; border-radius: 10px; }
  .sw-seg button svg { width: 19px; height: 19px; }
  .sw.has-seg .sw-modebox { margin-top: 6px; padding: 6px 12px; }
  .sw.has-seg .sw-mode b { font-size: 14.5px; }
  .sw-mode-top { gap: 9px; }
  .sw-mode-line { font-size: 12px; line-height: 1.25; }
  .sw-mode-line { display: none; } /* a phone has no room for it: (i) opens the whole text, and on, the "Pay from" row says it */
  .sw-mode-top .sw-mode { flex: 1; }
  .sw.has-seg .sw-mode-note { font-size: 12.5px; line-height: 1.35; margin-top: 5px; }
  .sw.has-seg .sw-mode-note::before { content: none; }
  .sw.has-seg .sw-mode-from { margin-top: 6px; }
  .sw.has-seg.away[data-look] .sw-ways { margin-bottom: 8px; }
}
/* A short, wide screen (the owner's is 1280 x 610): the whole form with its button, nothing to scroll. */
@media (min-width: 721px) and (max-height: 720px) {
  .screen.sw .sw-head .kicker { display: none; }
  body:has(.screen.sw.on:not(.away)) #stage { padding-top: 12px; padding-bottom: 12px; }
  .sw-seg { margin-bottom: 8px; }
  .sw-seg button { min-height: 40px; }
  .sw .sw-card { padding-top: 10px; padding-bottom: 10px; }
  .sw .sw-leg { padding-top: 8px; padding-bottom: 8px; }
  .sw .sw-route { margin-top: 6px; }
  .sw.has-seg .sw-modebox { margin-top: 6px; padding: 7px 14px; }
  .sw.has-seg .sw-mode-from { margin-top: 7px; }
  .sw .sw-go { margin-top: 8px; }
}

.sw #swap-round .chipbtn.is-near { color: #fff; background: var(--grad); border-color: transparent; }

/* ===== One settings group (the owner, 29 Nov): "Best rate", "Lock the rate" and "Privacy mode" are one card with
   three rows, the same left edge and hairlines between, and "Fees and details" is its last line. swap.js builds
   it (buildSet) from the page's own parts and marks the form .has-set. ===== */
.sw-set { margin-top: 10px; border-radius: 15px; border: 1px solid var(--line-2); background: var(--card); overflow: hidden; }
.sw .sw-form.has-set .sw-set > * { margin: 0; border: 0; border-radius: 0; background: none; box-shadow: none; }
.sw .sw-form.has-set .sw-set > * + * { border-top: 1px solid var(--line); }
.sw .sw-form.has-set .sw-set > [hidden] { display: none !important; }
.sw .sw-form.has-set .sw-set > .sw-route { padding: 10px 12px 10px 14px; min-height: 48px; }
.sw .sw-form.has-set .sw-set > .sw-exchange { padding: 8px 14px; }
.sw .sw-form.has-set .sw-set > .sw-opts { padding: 9px 14px; min-height: 46px; box-sizing: border-box; }
.sw .sw-form.has-set .sw-set > .sw-opts .sw-lock { margin: 0; }
.sw .sw-form.has-set .sw-set > .sw-modebox { padding: 9px 14px; }
.sw .sw-form.has-set .sw-set > .sw-modebox.is-on { background: var(--chip-bg); box-shadow: inset 3px 0 0 var(--red); }
.sw .sw-form.has-set .sw-set > .sw-private { padding: 8px 14px 10px; }
.sw-set-foot { display: flex; justify-content: center; padding: 7px 14px; }
.sw-set-foot .sw-link { min-height: 0; font-size: 13px; }
.sw-form.has-set .sw-opts:not(:has(> :not([hidden]))) { display: none; }
/* Where the coins land when they stay in the pool: said in the Privacy mode row, so the dashed box is not needed. */
.sw .sw-form.has-set #sw-dest-own { display: none !important; }
.sw-mode-goes { margin: 8px 0 0; font-size: 13px; line-height: 1.4; color: var(--muted); }
.sw-mode-goes[hidden] { display: none; }
/* the switches of the two rows are the same size, on the same left edge */
.sw .sw-form.has-set .sw-lock span { width: 48px; height: 27px; }
.sw .sw-form.has-set .sw-lock span::after { width: 19px; height: 19px; }
.sw .sw-form.has-set .sw-lock input:checked + span::after { transform: translateX(21px); }
.sw .sw-form.has-set .sw-lock b { font: 700 15px/1.2 var(--sans); }
.sw .sw-form.has-set .sw-lock { gap: 12px; }
@media (max-width: 720px) {
  .sw-set { margin-top: 6px; border-radius: 13px; }
  .sw .sw-form.has-set .sw-set > .sw-route { padding: 7px 10px 7px 12px; min-height: 0; }
  .sw .sw-form.has-set .sw-set > .sw-opts { padding: 6px 12px; min-height: 0; }
  .sw .sw-form.has-set .sw-set > .sw-modebox { padding: 6px 12px; }
  .sw .sw-form.has-set .sw-set > .sw-private { padding: 6px 12px 8px; }
  .sw-set-foot { padding: 4px 12px; }
  .sw-mode-goes { margin-top: 6px; font-size: 12px; line-height: 1.3; }
  /* Through the pool the price is not held: no "Lock the rate" row at all (it used to leave the link hanging alone). */
  .sw-form.has-set:has(#sw-mode-box.is-on) .sw-set > .sw-opts { display: none; }
}
@media (min-width: 721px) and (max-height: 720px) {
  .sw-set { margin-top: 6px; }
  .sw .sw-form.has-set .sw-set > .sw-route { padding: 6px 12px 6px 14px; min-height: 0; }
  .sw .sw-form.has-set .sw-set > .sw-opts { padding: 5px 14px; min-height: 0; }
  .sw .sw-form.has-set .sw-set > .sw-modebox { padding: 6px 14px; }
  .sw-set-foot { padding: 3px 14px; }
  .sw-mode-goes { margin-top: 5px; font-size: 12.5px; }
}

/* ===== A phone, Privacy mode off (the first thing people see): the whole form with its slide button on one
   screen, also inside Safari with its two bars (about 390 x 630). The owner, 29 Nov 2026. ===== */
.sw-route-short { display: none; }
.sw-set-foot:empty { display: none; }
@media (max-width: 720px) {
  .sw-route-long { display: none; }
  .sw-route-short { display: inline; }
  .sw-seg { margin-bottom: 6px; }
  .sw-seg button { min-height: 34px; }
  .sw .sw-card { padding: 6px 9px 8px; }
  .sw .sw-leg { padding: 3px 12px 3px 14px; }
  .sw .sw-leg-top { min-height: 14px; font-size: 10px; }
  .sw .sw-leg-main { margin-top: 0; }
  .sw .sw-amt { font-size: 22px; line-height: 1.2; }
  .sw .sw-coin { min-height: 38px; padding: 4px 7px 4px 5px; }
  .sw .sw-dest { margin-top: 5px; gap: 4px; }
  .sw .sw-dest-addr { gap: 2px; }
  .sw .sw-dest-addr .sw-k { font-size: 10px; }
  .sw .sw-dest-addr .input { height: 36px; }
  .sw-set { margin-top: 5px; }
  .sw .sw-form.has-set .sw-set > .sw-route { padding: 6px 10px 6px 12px; font-size: 13px; }
  .sw .sw-form.has-set .sw-set > .sw-opts { padding: 4px 12px; }
  .sw .sw-form.has-set .sw-set > .sw-modebox { padding: 4px 12px; }
  .sw .sw-form.has-set .sw-lock span, .sw.has-seg .sw-mode span { width: 42px; height: 24px; }
  .sw .sw-form.has-set .sw-lock span::after, .sw.has-seg .sw-mode span::after { width: 17px; height: 17px; }
  .sw .sw-form.has-set .sw-lock input:checked + span::after, .sw.has-seg .sw-mode input:checked + span::after { transform: translateX(18px); }
  .sw .sw-form.has-set .sw-lock b, .sw.has-seg .sw-mode b { font-size: 14px; }
  .sw .sw-go.has-swipe > .swipe { margin: 7px auto 2px; }
}

/* Swap, Privacy mode off: the Pay from row (QR code / Connected wallet) lines up with the rows above it */
.sw-out-pay { padding: 8px 14px 10px; }

/* Guard rails (swap-help.js, 30 Nov 2026): the address card, Paste / Scan, one-tap fixes, the first-swap helper. */
.sw-addr-tools { display: flex; gap: 8px; margin-top: 6px; }
.sw-addr-tools .btn { flex: 0 0 auto; }
.sw .input.bad { border-color: #e5484d; box-shadow: 0 0 0 3px rgb(229 72 77 / 14%); }
.sw-guard { margin-top: 10px; padding: 12px 14px; border-radius: 14px; background: #fff4f2; border: 1px solid #f3c4bd; color: #5a1d16; font-size: 13.5px; line-height: 1.45; }
.sw-guard b { display: block; font-size: 14px; margin-bottom: 4px; }
.sw-guard p { margin: 0 0 10px; }
.sw-guard .row { display: flex; flex-wrap: wrap; gap: 8px; }
.sw-fix { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.sw-fix:empty { display: none; }
.sw-wb-hint { margin: 0 0 12px; padding: 12px 14px; border-radius: 14px; background: #f4efff; border: 1px solid #ddd0fb; color: #33205e; font-size: 13.5px; line-height: 1.45; }
.sw-wb-hint p { margin: 0 0 8px; }
.sw-wb-hint .row { display: flex; gap: 8px; flex-wrap: wrap; }
.sw-tip { position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); width: min(92vw, 380px); z-index: 60; padding: 14px 16px; border-radius: 16px; background: #1b1430; color: #fff; box-shadow: 0 18px 40px rgb(20 10 50 / 35%); font-size: 14px; line-height: 1.45; }
.sw-tip b { display: block; margin-bottom: 4px; }
.sw-tip p { margin: 0 0 10px; color: #e6defa; }
.sw-tip .row { display: flex; gap: 8px; }
.sw-tip .btn.ghost { color: #fff; border-color: rgb(255 255 255 / 30%); }
.sw-tip-on { position: relative; z-index: 59; outline: 3px solid #8b5cf6; outline-offset: 4px; border-radius: 14px; transition: outline-color .2s; }
.sw-scan { border: 0; border-radius: 18px; padding: 16px; width: min(92vw, 420px); display: grid; gap: 10px; }
.sw-scan video { width: 100%; border-radius: 12px; background: #000; }
@media (prefers-reduced-motion: reduce) { .sw-tip-on { transition: none; } }

/* "Paying from Binance, OKX, Bybit or KuCoin?" (swap-help.js exchangeGuide). */
.xg { margin: 12px 0 4px; border: 1px solid var(--line, rgb(127 127 160 / 22%)); border-radius: 14px; padding: 10px 12px; font-size: 13.5px; line-height: 1.45; }
.xg > summary { cursor: pointer; font-weight: 600; list-style: none; }
.xg > summary::before { content: '▸ '; }
.xg[open] > summary::before { content: '▾ '; }
.xg-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 8px; }
.xg-tab { border: 1px solid var(--line, rgb(127 127 160 / 30%)); background: transparent; color: inherit; border-radius: 999px; padding: 5px 11px; font: 600 12.5px/1 var(--sans, system-ui); cursor: pointer; }
.xg-tab.on { background: #7c3aed; border-color: #7c3aed; color: #fff; }
.xg-steps { margin: 0; padding-left: 20px; display: grid; gap: 7px; }
.xg-steps .btn { margin-left: 4px; padding: 3px 9px; font-size: 12px; }
.xg-addr { font-size: 12.5px; }
.xg-note { margin: 8px 0 0; color: var(--dim, #6b6880); font-size: 12.5px; }

/* Multi Swap's wallet cards (split-cards.js, 30 Nov 2026). */
.mw-cards { display: grid; gap: 10px; margin: 6px 0 10px; }
.mw-card { border: 1px solid var(--line, rgb(127 127 160 / 22%)); border-radius: 16px; padding: 10px 12px 12px; display: grid; gap: 8px; background: var(--card, transparent); }
.mw-card.bad { border-color: #e5484d; }
.mw-head { display: flex; align-items: center; justify-content: space-between; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--dim, #6b6880); }
.mw-x { border: 0; background: transparent; color: inherit; font-size: 20px; line-height: 1; padding: 2px 6px; cursor: pointer; }
.mw-addr { display: flex; gap: 8px; }
.mw-addr .input { flex: 1; min-width: 0; font-size: 13px; }
.mw-line { display: flex; align-items: center; gap: 10px; }
.mw-pctbox { display: flex; align-items: center; gap: 4px; flex: 0 0 auto; }
.mw-pct { width: 72px; text-align: right; font-size: 15px; font-weight: 600; }
.mw-amt { display: grid; font-size: 14px; font-weight: 600; min-width: 0; }
.mw-amt small { font-weight: 500; color: var(--dim, #6b6880); font-size: 12.5px; }
.mw-chip { display: inline-flex; align-items: center; gap: 8px; justify-self: start; border: 1px solid var(--line, rgb(127 127 160 / 30%)); background: transparent; color: inherit; border-radius: 999px; padding: 6px 12px; font: 600 13px/1.2 var(--sans, system-ui); cursor: pointer; }
.mw-chip img, .mw-ex img { width: 18px; height: 18px; border-radius: 50%; }
.mw-caret { font-style: normal; opacity: .6; }
.mw-bad { margin: 0; color: #c4222a; font-size: 12.5px; line-height: 1.4; }
.mw-sum { margin: 2px 0 0; font-size: 12.5px; color: var(--dim, #6b6880); }
.mw-sum.err { color: #c4222a; }
.mw-foot { display: flex; flex-wrap: wrap; gap: 8px; }
.mw-sheet h2 { font-size: 18px; }
.mw-ex { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; align-items: center; gap: 10px; width: 100%; text-align: left; border: 1px solid transparent; border-radius: 12px; background: transparent; color: inherit; padding: 9px 10px; cursor: pointer; font: inherit; }
.mw-ex.on { border-color: #7c3aed; background: rgb(124 58 237 / 8%); }
.mw-ex-n { display: grid; }
.mw-ex-n small { color: var(--dim, #6b6880); font-size: 12px; }
.mw-ex-v { font-weight: 600; font-size: 13px; white-space: nowrap; }
.mw-ex-dot { display: inline-block; width: 18px; height: 18px; border-radius: 50%; background: linear-gradient(135deg, #a78bfa, #7c3aed); }
.sw-split-more { margin-top: 8px; font-size: 13px; }
.sw-split-more summary { cursor: pointer; font-weight: 600; }
/* The exchange sheet and Paste many fit a phone: never wider than the screen. */
dialog.mw-sheet { width: min(480px, calc(100vw - 24px)); max-width: calc(100vw - 24px); box-sizing: border-box; padding: 18px 14px; }
dialog.mw-sheet .mw-ex { box-sizing: border-box; }
dialog.mw-sheet textarea { width: 100%; box-sizing: border-box; }
.mw-pct { width: 84px; }

/* The exchange picker's groups. */
.mw-ex-h { margin: 12px 0 2px; font: 600 11px/1.3 var(--sans, system-ui); letter-spacing: .08em; text-transform: uppercase; color: var(--dim, #6b6880); }
dialog.mw-sheet { max-height: calc(100vh - 40px); overflow: auto; }

/* "Where should it go?" (swap.js askWhere) */
dialog.sw-where { max-width: 420px; }
.sw-where-list { display: grid; gap: 4px; }
.sw-where-list .btn { width: 100%; justify-content: center; margin-top: 8px; }
.sw-where-list .note { margin: 2px 2px 6px; font-size: 13px; }
.sw-addr-tools[hidden] { display: none !important; }
