body[data-ui=swap]{--swap-width:420px;--ui-footer:clamp(104px,calc(100dvh - 720px),220px)}
body[data-ui=swap] [hidden]{display:none!important}
.swap-skip{position:fixed;top:8px;left:8px;z-index:300;translate:0 -180%;background:#11110e;color:#fff2d8;padding:12px;border-radius:10px}
.swap-skip:focus{translate:0}
body[data-ui=swap] .staking-club-link{display:none}
.swap-heading{flex:none;text-align:center;padding:0 24px 12px}
.swap-heading h1{font-size:var(--ui-title,52px);font-weight:550;line-height:1.08;letter-spacing:-.045em;margin:0}
body[data-ui=swap]>main#swap-main{width:100%;max-width:none;padding:4px 24px 12px}
.swap-workspace{width:min(100%,var(--swap-width));margin:0 auto}
#swap-form{display:block;margin:0;padding:0;max-width:none}
.swap-toolbar{display:flex;align-items:center;justify-content:space-between;margin:0 0 8px}
.swap-sides{display:flex;gap:4px;background:#11110e0c;border-radius:14px;padding:4px}
#swap-main button{font:inherit;cursor:pointer}
#swap-main button:disabled{cursor:default}
.swap-sides button,#settings-open,#reverse,.swap-fractions button{background:none;color:#11110e;border:0}
.swap-sides button{min-width:84px;min-height:44px;padding:9px 22px;border-radius:10px;font-size:18px!important;transition:background-color .18s,color .18s,scale .18s}
.swap-sides button[aria-pressed=true]{background:#11110e;color:#fff2d8}
#settings-open{height:44px;width:44px;display:grid;place-items:center;border-radius:50%}
#settings-open:hover,#reverse:hover{background:#fff2d833}
#settings-open svg,#reverse svg{height:24px;width:24px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.swap-field{background:#fff2d82b;border:1px solid #fff2d82b;border-radius:18px;padding:12px 20px}
.swap-field:focus-within{background:#fff2d83d}
.swap-field-label{display:flex;justify-content:space-between;gap:12px;align-items:baseline;font-size:14px;line-height:1.4}
#balance{font-size:12px;overflow-wrap:anywhere;text-align:right}
.swap-amount-line{display:flex;align-items:center;gap:14px;min-height:48px}
.swap-amount-line :is(input,output){min-width:0;flex:1;width:100%;background:none;border:0;border-radius:0;padding:4px 0;color:#11110e;font-size:clamp(26px,6vw,38px)!important;font-weight:500;letter-spacing:-.045em;font-variant-numeric:tabular-nums;line-height:1.2;box-shadow:none}
.swap-amount-line input:focus{outline:none}
.swap-amount-line input:focus-visible{box-shadow:0 2px 0 #11110e80}
.swap-amount-line input::placeholder{color:#11110e66}
.swap-amount-line output{overflow-wrap:anywhere}
.swap-amount-line>span{font-size:19px;font-weight:550;letter-spacing:-.02em}
.swap-fractions{display:flex;justify-content:flex-end;gap:6px;margin:-2px -10px -8px}
.swap-fractions button{min-height:44px;min-width:44px;font-size:13px!important;padding:8px 10px;border-radius:9px;transition:background-color .18s,opacity .18s}
.swap-fractions button:hover:not(:disabled){background:#fff2d833}
.swap-between{height:12px;position:relative;display:flex;justify-content:center;z-index:1}
#reverse{position:absolute;top:50%;translate:0 -50%;height:38px;width:38px;border:5px solid #ec7044;border-radius:50%;background:#f28d64;display:grid;place-items:center;padding:0;transition:rotate .2s,background-color .2s}
#reverse:active{rotate:180deg}
#reverse svg{height:21px;width:21px}
.swap-summary{display:flex;align-items:baseline;justify-content:space-between;gap:16px;font-size:13px;line-height:1.4;padding:10px 2px}
#minimum{font-variant-numeric:tabular-nums;text-align:right}
#swap-action{width:100%;min-height:52px;font-size:18px;transition:opacity .18s,scale .18s,background-color .18s}
#swap-action:disabled{opacity:.5}
#swap-status{min-height:22px;font-size:14px;line-height:1.45;margin:8px 0 0;text-align:center;overflow-wrap:anywhere}
#quote-details{font-size:14px;line-height:1.6}
#quote-details>summary{width:fit-content;margin-inline:auto;text-align:center;list-style:none;cursor:pointer;padding:10px 18px;min-height:44px;border-radius:10px;transition:background-color .18s}
#quote-details>summary::-webkit-details-marker{display:none}
#quote-details>summary:hover{background:#fff2d833}
#quote-details dl{margin:8px 0}
#quote-details dl>div{display:flex;justify-content:space-between;gap:20px;padding:3px 0}
#quote-details dd{margin:0;text-align:right;overflow-wrap:anywhere}
#quote-details dd[title]{cursor:help}
#quote-details a{display:block;text-align:center}
.swap-links{flex:none;display:flex;justify-content:center;gap:4px;width:fit-content;max-width:100%;margin:8px auto 12px;padding:4px;background:#11110e0c;border-radius:14px;font-size:14px;font-weight:500}
#swap-main a{color:inherit;text-decoration:none;text-underline-offset:4px}
#swap-main a:hover{text-decoration:underline}
.swap-links a{color:inherit;text-decoration:none;min-height:44px;display:flex;align-items:center;justify-content:center;padding:10px 18px;border-radius:10px;transition:background-color .2s,color .2s,scale .2s}
.swap-links a:hover{background:#fff2d84d;text-decoration:none}
.swap-links a:active{scale:.97}
:is(.swap-links a,#quote-details>summary,.swap-fractions button):focus-visible{outline:2px solid #11110e;outline-offset:3px}
.swap-pending,#network-notice{font-size:14px;line-height:1.5;margin-top:16px;background:#fff2d82b;border-radius:14px;padding:18px;overflow-wrap:anywhere}
.swap-pending p{margin:0 0 10px}
.swap-pending button,#network-notice button{background:#11110e;color:#fff2d8;border:0;border-radius:9px;padding:10px 14px;min-height:44px;margin:8px 0}
.swap-pending input:not([type=checkbox]){width:100%;box-sizing:border-box;background:#fff2d840;border:0;border-bottom:1px solid #1116;border-radius:0;min-height:44px;margin:8px 0;font-size:16px}
.swap-pending label{display:block}
.swap-pending label:has([type=checkbox]){display:flex;gap:10px;align-items:start;margin-top:10px}
.swap-pending input[type=checkbox]{flex:none;accent-color:#111;width:18px;height:18px}
#swap-settings{width:min(340px,calc(100vw - 32px));padding:24px;margin:auto}
#swap-settings h2{font-size:24px;letter-spacing:-.03em;margin:0 0 20px}
#swap-settings label{display:block;font-size:15px;margin-bottom:8px}
#swap-settings select{display:block;width:100%;min-height:46px;font-size:17px;padding:10px;border:1px solid #1113;background:transparent;border-radius:10px}
#swap-settings button{display:block;background:#11110e;color:#fff2d8;border:0;border-radius:10px;min-height:44px;width:100%;margin-top:16px;font:inherit}
#mobile-wallet{display:block;margin:12px 0;text-align:center}
@media(max-width:600px){.swap-heading{padding-bottom:8px}.swap-heading h1{font-size:var(--ui-title,40px)}body[data-ui=swap]>main#swap-main{padding:4px 16px 12px}.swap-field{padding:14px 16px}.swap-amount-line{min-height:48px}.swap-links{margin-top:8px}.swap-links a{padding-inline:16px}.swap-toolbar{margin-bottom:10px}}
@media(prefers-reduced-motion:reduce){#swap-main *,#swap-settings{transition:none!important;animation:none!important}}

/* The trading account belongs beside the trading controls. */
.swap-toolbar{gap:6px;flex-wrap:wrap}
.swap-account-slot{flex:1;min-width:0;display:flex;justify-content:flex-end}
body[data-ui=swap] .swap-account-slot .footer-account{position:static;inset:auto;width:auto;max-width:100%;justify-content:flex-end}
body[data-ui=swap] .swap-account-slot .footer-wallet{min-height:44px;padding:8px 6px;color:var(--ui-ink);font-size:13px;border-radius:10px}
body[data-ui=swap] .swap-account-slot .footer-wallet:hover{opacity:1;background:#fff2d833}
body[data-ui=swap] .swap-account-slot .footer-wallet:focus-visible{outline:2px solid var(--ui-ink);outline-offset:2px}
#settings-open{flex:none}
body[data-ui=swap] #stop-flow{order:4;flex-basis:100%;text-align:right}
.swap-feedback{display:flex;align-items:center;justify-content:center;gap:10px;flex-wrap:wrap}
body[data-ui=swap] .swap-feedback #swap-status{margin:0 0 6px}
body[data-ui=swap] .swap-feedback #swap-status[data-wallet-state=done]{font-size:15px;font-weight:600}
body[data-ui=swap] .swap-feedback #swap-status[data-wallet-state=done]::before{content:'✓';width:auto;height:auto;background:none;border-radius:0;margin-right:7px}
#swap-main #swap-result-link{display:inline-flex;align-items:center;min-height:44px;font-size:13px;padding:0 4px;text-decoration:none;border-radius:6px;margin:-5px 0 1px}
#swap-main #swap-result-link:hover{text-decoration:underline}
#swap-main #swap-result-link:focus-visible{outline:2px solid var(--ui-ink);outline-offset:2px}
@media(max-width:380px){.swap-sides button{min-width:52px;padding-inline:10px;font-size:16px!important}.swap-account-slot .footer-wallet{padding-inline:4px}}
/* After a finished trade, the receipt replaces the empty minimum row. */
#swap-form:has(#swap-amount:placeholder-shown):has(#swap-status[data-wallet-state=done]) .swap-summary{display:none}

@media(max-height:760px){body[data-ui=swap] .swap-field{padding-block:10px}body[data-ui=swap] .swap-amount-line{min-height:44px}body[data-ui=swap] .swap-amount-line :is(input,output){font-size:32px!important;padding-block:2px}}
