/* ════════════════════════════════════════════════════════════════════════════
   VellaSwap page — Uniswap-style swap card + token picker in Vella colours
   (light = sky blue, dark = charcoal + off-white). Background: the page colour
   with floating create-cast tiles holding a sky-blue glow (js/swap-page.js).
   Double #dexView beats both theme files.
   ════════════════════════════════════════════════════════════════════════════ */

:root{
  --u-page:#E8F1FA;
  --u-sell:#FFFFFF;
  --u-sell-line:rgba(10,37,64,.10);
  --u-buy:#EEF4FA;
  --u-ink:#0A2540;
  --u-mute:#4F6B86;
  --u-faint:#9AAFC2;
  --u-accent:#0077CC;
  --u-accent-h:#006BB8;
  --u-on:#FFFFFF;
  --u-hover:rgba(10,37,64,.05);
  --u-modal:#FFFFFF;
  --u-modal-line:rgba(10,37,64,.10);
  --u-field:#EEF4FA;
  --u-chip:#F3F7FB;
  --u-shadow:0 24px 64px rgba(10,37,64,.18);
  --u-dim:rgba(232,241,250,.55);
  --u-coin-op:.55;
}
html:is([data-theme="dark"],[data-scheme="dark"],[data-theme="voidtype"]){
  --u-page:#0E0E0E;
  --u-sell:#111111;
  --u-sell-line:rgba(255,255,255,.08);
  --u-buy:#1B1B1B;
  --u-ink:#F4F4EF;
  --u-mute:#9A9A92;
  --u-faint:#5E5E58;
  --u-accent:#EDEDE6;
  --u-accent-h:#FFFFFF;
  --u-on:#0A0A0A;
  --u-hover:rgba(255,255,255,.06);
  --u-modal:#131313;
  --u-modal-line:rgba(255,255,255,.10);
  --u-field:#1F1F1F;
  --u-chip:#1B1B1B;
  --u-shadow:0 24px 64px rgba(0,0,0,.6);
  --u-dim:rgba(14,14,14,.62);
  --u-coin-op:.5;
}

/* ── Page frame: hide the old hero + side column, centre the card ── */
#dexView#dexView.u{position:relative;min-height:calc(100vh - 88px);isolation:isolate}
#dexView#dexView.u > *:not(.u-bg){position:relative;z-index:2}
#dexView#dexView.u :is(.dex-faulty-bg,.dex-hero,.dex-side){display:none}
#dexView .u-el{display:none}
#dexView#dexView.u .u-el{display:block}
#dexView#dexView.u .dex-swap-layout{display:flex;flex-direction:column;align-items:center;gap:0}
#dexView#dexView.u .u-hero{text-align:center;padding:64px 16px 40px}
#dexView .u-title{margin:0;font-size:clamp(40px,5.4vw,72px);font-weight:500;line-height:1.08;letter-spacing:-.035em;color:var(--u-ink);text-wrap:balance}
#dexView .u-caption{max-width:440px;margin:26px auto 0;text-align:center;font-size:17px;line-height:1.45;color:var(--u-mute);text-wrap:pretty}
#dexView .u-caption b{font-weight:500;color:var(--u-accent)}
html:not([data-theme="dark"]):not([data-theme="voidtype"]):not([data-scheme="dark"]) #dexView .u-caption b{color:#0077CC}

/* ── The card: no outer shell, two panels + CTA (as in the reference) ── */
#dexView#dexView.u .dex-swap-card{
  display:flex;flex-direction:column;gap:0;width:100%;max-width:480px;padding:0;
  background:transparent;border:0;border-radius:0;box-shadow:none;backdrop-filter:none;-webkit-backdrop-filter:none;
}
#dexView#dexView.u .dex-swap-card::before{display:none}
/* light-soft paints every .dex-swap-card as a card; here it is only a wrapper — keep it see-through */
#dexView#dexView.u .dex-swap-card:not(#_){background-color:transparent!important;border-color:transparent!important}
#dexView#dexView.u .dex-sc-box{min-height:0;padding:16px 16px 18px;border-radius:20px;box-shadow:none}
#dexView#dexView.u :is(.dex-sc-pay,.dex-sc-recv){background:var(--u-panel);border:1px solid var(--u-panel-line);box-shadow:var(--u-panel-shadow);padding:16px 16px 18px}
#dexView#dexView.u :is(.dex-sc-pay,.dex-sc-recv):focus-within{background:var(--u-panel);border-color:var(--u-accent);box-shadow:var(--u-panel-shadow)}
#dexView#dexView.u .dex-sc-box-lbl{margin:0 0 6px;font-family:inherit;font-size:16px;font-weight:450;letter-spacing:0;text-transform:none;color:var(--u-mute)}
#dexView#dexView.u .dex-sc-inp-row{gap:10px;min-height:52px}
#dexView#dexView.u :is(.dex-sc-inp,.dex-sc-out){
  font-family:inherit;font-size:36px;font-weight:450;letter-spacing:-.02em;line-height:1.2;color:var(--u-ink);min-width:0;
}
#dexView#dexView.u .dex-sc-inp{caret-color:var(--u-accent)}
#dexView#dexView.u .dex-sc-inp::placeholder{color:var(--u-faint)}
#dexView#dexView.u .dex-sc-out:is(:empty){color:var(--u-faint)}
#dexView#dexView.u .dex-sc-box-foot{margin-top:6px}
#dexView#dexView.u :is(.dex-sc-box-usd,.dex-sc-bal){font-size:14px;font-weight:450;color:var(--u-mute);font-variant-numeric:tabular-nums}
#dexView#dexView.u .dex-sc-max{padding:0 2px;background:transparent;color:var(--u-accent);font-weight:600}
html:not([data-theme="dark"]):not([data-theme="voidtype"]):not([data-scheme="dark"]) #dexView#dexView.u .dex-sc-max{color:#0077CC}

/* Token button: icon + ticker + chevron in a hairline pill */
#dexView#dexView.u :is(.dex-sc-tok,.dex-sc-tok-selected){
  flex-shrink:0;display:inline-flex;align-items:center;gap:8px;min-height:44px;padding:4px 12px 4px 4px;
  border-radius:999px;border:1px solid var(--u-sell-line);background:var(--u-sell);color:var(--u-ink);
  font-family:inherit;font-size:18px;font-weight:600;letter-spacing:-.01em;box-shadow:none;cursor:pointer;
  transition-property:background-color;transition-duration:.15s;
}
#dexView#dexView.u :is(.dex-sc-tok,.dex-sc-tok-selected):hover{background:var(--u-hover)}
#dexView#dexView.u :is(.dex-sc-tok,.dex-sc-tok-selected) svg{width:14px;height:14px;stroke-width:2.4}
#dexView#dexView.u :is(.dex-sc-tok-gram,.dex-sc-tok-selected) img:not(.u-badge){width:34px!important;height:34px!important;border-radius:50%!important;object-fit:cover}
#dexView#dexView.u .dex-sc-tok-selected .dex-sc-tok-ico-emoji{width:34px;height:34px;font-size:18px}
.u-ico{position:relative;display:inline-grid;flex-shrink:0}
.u-ico > img:first-child{width:34px;height:34px;border-radius:50%;object-fit:cover}
.u-ico .u-badge{position:absolute;right:-3px;bottom:-3px;width:15px!important;height:15px!important;border-radius:5px!important;background:var(--u-sell);box-shadow:0 0 0 2px var(--u-sell);object-fit:contain}
/* Empty "Select token": the one solid pill */
#dexView#dexView.u .dex-sc-tok-select{min-height:44px;padding:0 14px 0 16px;border-color:var(--u-accent);background:var(--u-accent);color:var(--u-on);font-size:18px}
#dexView#dexView.u .dex-sc-recv .dex-sc-tok-select{background:var(--u-accent)}
#dexView#dexView.u .dex-sc-tok-select:hover{background:var(--u-accent-h);border-color:var(--u-accent-h);color:var(--u-on)}

/* Square flip button, ringed in the page colour, straddling both panels */
#dexView#dexView.u .dex-sc-flip-wrap{position:relative;z-index:3;height:6px;margin:0;display:block}
#dexView#dexView.u .dex-sc-flip{
  position:absolute;left:50%;top:50%;translate:-50% -50%;margin:0;width:48px;height:48px;
  border-radius:16px;border:4px solid var(--u-page);background:var(--u-buy);color:var(--u-ink);box-shadow:none;
  transition-property:background-color;transition-duration:.15s;
}
#dexView#dexView.u .dex-sc-flip svg{width:20px;height:20px;stroke-width:2.2}
#dexView#dexView.u .dex-sc-flip:hover{background:var(--u-field);background-image:none;color:var(--u-ink);border-color:var(--u-page);box-shadow:none;transform:none}

/* CTA: solid, tall, bold */
#dexView#dexView.u .dex-sc-cta{
  margin-top:6px;min-height:64px;border:0;border-radius:20px;
  background:var(--u-accent);background-image:none;color:var(--u-on);box-shadow:none;filter:none;
  font-family:inherit;font-size:20px;font-weight:600;letter-spacing:-.01em;text-transform:none;
  transition-property:background-color,scale;transition-duration:.15s;
}
#dexView#dexView.u .dex-sc-cta:hover{background:var(--u-accent-h);background-image:none;color:var(--u-on);box-shadow:none;transform:none;filter:none}
#dexView#dexView.u .dex-sc-cta:active{scale:.98}
#dexView#dexView.u .dex-sc-cta:focus-visible{outline:2px solid var(--u-accent);outline-offset:3px}

#dexView#dexView.u .dex-sc-details{margin:10px 2px 0;padding:4px 14px;border:0;border-radius:16px;background:transparent}
#dexView#dexView.u .dex-sc-det-lbl{color:var(--u-mute)}
#dexView#dexView.u .dex-sc-det-val{color:var(--u-ink)}
#dexView#dexView.u .dex-sc-det-sub{color:var(--u-mute)}
#dexView#dexView.u .dex-sc-slip.bs-trade-settings-btn{margin:8px auto 0;width:auto;align-self:center;gap:10px;padding:6px 12px;border:0;border-radius:999px;background:transparent;color:var(--u-mute)}
#dexView#dexView.u .dex-sc-slip.bs-trade-settings-btn:hover{background:var(--u-hover)}
#dexView#dexView.u .dex-sc-slip :is(.bs-ts-label,.bs-ts-val){font-family:inherit;color:var(--u-mute)}

/* ── Background: the site's own page colour, no dim, no blur — floating cast tiles that glow ── */
#dexView#dexView .u-bg{position:absolute;inset:-24px -24px 0;z-index:0;overflow:hidden;pointer-events:none;display:none}
#dexView#dexView.u .u-bg{display:block}
#dexView .u-tile{position:absolute;left:calc(50% + var(--dx));top:var(--y);width:var(--s);height:var(--s);rotate:var(--r,0deg)}
#dexView .u-tile img{position:relative;z-index:1;display:block;width:100%;height:100%;object-fit:cover;border-radius:24%;
  box-shadow:0 10px 28px rgba(10,37,64,.16),0 0 0 1px rgba(255,255,255,.55)}
html:is([data-theme="dark"],[data-scheme="dark"],[data-theme="voidtype"]) #dexView .u-tile img{box-shadow:0 12px 32px rgba(0,0,0,.5),0 0 0 1px rgba(255,255,255,.08)}
/* Glow in the tile's own colour (sampled from the image) */
#dexView .u-tile::after{content:"";position:absolute;inset:6%;z-index:0;border-radius:30%;
  box-shadow:0 0 42px 14px rgb(var(--glow,0 152 234) / .55);opacity:var(--g,.5);transition:opacity .8s cubic-bezier(0.2,0,0,1)}
html:is([data-theme="dark"],[data-scheme="dark"],[data-theme="voidtype"]) #dexView .u-tile::after{box-shadow:0 0 46px 16px rgb(var(--glow,237 237 230) / .6)}

/* Lit — every tile holds the lit look: a touch larger with a sky-blue halo; they only float */
#dexView#dexView.u .u-tile{animation:uBob var(--d,9s) ease-in-out infinite alternate;animation-delay:var(--dl,0s);--g:1}
#dexView#dexView.u .u-tile img{scale:1.06}
#dexView#dexView.u .u-tile::after{box-shadow:0 0 44px 14px rgb(0 152 234 / .5)}
html:is([data-theme="dark"],[data-scheme="dark"],[data-theme="voidtype"]) #dexView#dexView.u .u-tile::after{box-shadow:0 0 46px 14px rgb(41 165 245 / .55)}

/* ── Token picker (own modal; router's #tselModal stays for other pages) ── */
.u-pick-bd{position:fixed;inset:0;z-index:1200;background:rgba(10,20,32,.28);display:none}
html:is([data-theme="dark"],[data-scheme="dark"],[data-theme="voidtype"]) .u-pick-bd{background:rgba(0,0,0,.55)}
.u-pick{
  position:fixed;left:50%;top:max(24px,8vh);translate:-50% 0;z-index:1201;display:none;flex-direction:column;
  width:min(480px,calc(100vw - 24px));max-height:min(720px,calc(100dvh - 48px));
  background:var(--u-modal);border:1px solid var(--u-modal-line);border-radius:24px;box-shadow:var(--u-shadow);color:var(--u-ink);
  font-family:inherit;
}
.u-pick.on,.u-pick-bd.on{display:flex}
.u-pick.on{animation:uPickIn .22s cubic-bezier(0.2,0,0,1)}
@keyframes uPickIn{from{opacity:0;translate:-50% 8px}to{opacity:1;translate:-50% 0}}
.u-pick-hd{display:flex;align-items:center;justify-content:space-between;padding:18px 16px 12px 20px}
.u-pick-hd h2{margin:0;font-size:18px;font-weight:500;letter-spacing:-.01em;color:var(--u-ink)}
.u-x{display:grid;place-items:center;width:36px;height:36px;border:0;border-radius:12px;background:transparent;color:var(--u-ink);cursor:pointer}
.u-x:hover{background:var(--u-hover)}
.u-x:focus-visible,.u-row:focus-visible,.u-chipbtn:focus-visible,.u-clear:focus-visible{outline:2px solid var(--u-accent);outline-offset:2px}
.u-search{display:flex;align-items:center;gap:10px;height:52px;margin:0 16px;padding:0 12px 0 16px;border-radius:18px;background:var(--u-field);border:1px solid transparent;transition:border-color .15s}
.u-search:focus-within{border-color:var(--u-accent)}
.u-search svg{flex-shrink:0;color:var(--u-mute)}
.u-search input{flex:1;min-width:0;height:100%;border:0;outline:0;background:transparent;color:var(--u-ink);font:inherit;font-size:17px}
.u-search input::placeholder{color:var(--u-mute)}
.u-chips{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px;padding:16px 16px 8px}
.u-chipbtn{display:flex;flex-direction:column;align-items:center;gap:6px;padding:12px 4px 10px;border:1px solid var(--u-modal-line);border-radius:16px;background:var(--u-chip);color:var(--u-ink);font:inherit;font-size:15px;font-weight:600;cursor:pointer;transition-property:background-color,scale;transition-duration:.15s;min-width:0}
.u-chipbtn:hover{background:var(--u-hover)}
.u-chipbtn:active{scale:.96}
.u-chipbtn span{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.u-scroll{overflow-y:auto;overscroll-behavior:contain;padding:4px 8px 12px;min-height:0;flex:1}
.u-sec{display:flex;align-items:center;justify-content:space-between;padding:14px 12px 6px;color:var(--u-mute);font-size:15px}
.u-sec-l{display:inline-flex;align-items:center;gap:8px}
.u-clear{border:0;background:transparent;color:var(--u-ink);font:inherit;font-size:14px;font-weight:600;cursor:pointer;padding:4px 6px;border-radius:8px}
.u-clear:hover{background:var(--u-hover)}
.u-row{display:flex;align-items:center;gap:12px;width:100%;padding:10px 12px;border:0;border-radius:16px;background:transparent;color:inherit;font:inherit;text-align:left;cursor:pointer}
.u-row:hover,.u-row.is-active{background:var(--u-hover)}
.u-row .u-ico > img:first-child,.u-row .u-emo{width:40px;height:40px}
.u-row .u-ico .u-badge,.u-chipbtn .u-ico .u-badge{background:var(--u-modal);box-shadow:0 0 0 2px var(--u-modal)}
.u-chipbtn .u-ico > img:first-child,.u-chipbtn .u-emo{width:32px;height:32px}
.u-emo{display:grid;place-items:center;border-radius:50%;font-size:18px}
.u-row-t{min-width:0;flex:1}
.u-row-n{display:block;font-size:17px;font-weight:500;color:var(--u-ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.u-row-s{display:block;margin-top:2px;font-size:14px;color:var(--u-mute);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-variant-numeric:tabular-nums}
.u-row-s i{font-style:normal;margin-left:6px;opacity:.85}
.u-empty{padding:40px 16px;text-align:center;color:var(--u-mute);font-size:15px}
.u-empty b{display:block;margin-bottom:4px;color:var(--u-ink);font-weight:600}

/* ── Phones ── */
@media (max-width:760px){
  #dexView#dexView.u .u-hero{padding:28px 8px 26px}
  #dexView .u-title{font-size:40px}
  #dexView .u-caption{font-size:15px;margin-top:20px}
  #dexView .u-coin{--s:44px !important}
  #dexView#dexView.u :is(.dex-sc-inp,.dex-sc-out){font-size:32px}
  #dexView#dexView.u-5 .u-halo{top:330px}
  #dexView#dexView.u-5 .u-coin{--rad:230px !important}
  .u-pick{top:auto;bottom:0;left:0;translate:none;width:100%;max-height:92dvh;border-radius:24px 24px 0 0;padding-bottom:env(safe-area-inset-bottom)}
  .u-pick.on{animation:uSheetUp .3s cubic-bezier(0.2,0,0,1)}
  @keyframes uSheetUp{from{transform:translateY(100%)}to{transform:none}}
  .u-pick::before{content:"";display:block;width:36px;height:4px;margin:8px auto 0;border-radius:2px;background:var(--u-mute);opacity:.35}
}
@media (max-width:380px){
  .u-chips{grid-template-columns:repeat(4,minmax(0,1fr))}
  .u-chips .u-chipbtn:nth-child(5){display:none}
  #dexView#dexView.u :is(.dex-sc-tok,.dex-sc-tok-selected,.dex-sc-tok-select){font-size:16px}
}
@media (prefers-reduced-motion:reduce){
  #dexView .u-coin,#dexView .u-halo,.u-pick.on{animation:none!important}
  #dexView#dexView.u-4 .u-coin{transition:none}
}


/* Fixed-height picker: only the list scrolls; header, search and chips keep their size */
.u-pick{height:min(720px,calc(100dvh - 48px))}
.u-pick > :not(.u-scroll){flex:none}
.u-chips{align-items:start}
.u-scroll{flex:1 1 auto}
@media (max-width:760px){
  .u-pick{height:88dvh}
  :root{--u-coin-op:.32}
  html:is([data-theme="dark"],[data-scheme="dark"],[data-theme="voidtype"]){--u-coin-op:.3}
}
/* The site's global input styles drew a second box inside the search field */
.u-search input,.u-search input:focus,.u-search input:focus-visible{border:0!important;box-shadow:none!important;outline:0!important;padding:0!important;border-radius:0!important;background:transparent!important}

/* ── Round 3 details ── */
:root{--u-panel:#FFFFFF;--u-panel-line:rgba(10,37,64,.12);--u-panel-shadow:0 1px 2px rgba(10,37,64,.05),0 8px 24px rgba(10,37,64,.06);--u-pill:#F2F7FC;--u-pill-w:168px}
html:is([data-theme="dark"],[data-scheme="dark"],[data-theme="voidtype"]){--u-panel:#161616;--u-panel-line:rgba(255,255,255,.10);--u-panel-shadow:0 8px 24px rgba(0,0,0,.35);--u-pill:#222222}
/* Flip ring matches the page behind the card */
#dexView#dexView.u .dex-sc-flip{background:var(--u-panel);border-color:var(--u-page);box-shadow:0 0 0 1px var(--u-panel-line)}
html:not([data-theme="dark"]):not([data-theme="voidtype"]):not([data-scheme="dark"]) #dexView#dexView.u .dex-sc-flip{border-color:#E6F1FC}
/* Same-size pills: GRAM label, chosen coin, and "Select token" */
#dexView#dexView.u :is(.dex-sc-tok,.dex-sc-tok-selected,.dex-sc-tok-select){
  box-sizing:border-box;width:var(--u-pill-w);min-width:var(--u-pill-w);height:44px;min-height:44px;padding:4px 12px 4px 4px;
  justify-content:flex-start;background:var(--u-pill);border:1px solid var(--u-panel-line);overflow:hidden;white-space:nowrap}
#dexView#dexView.u :is(.dex-sc-tok,.dex-sc-tok-selected) > span:not(.u-ico){min-width:0;flex:1;overflow:hidden;text-overflow:ellipsis;text-align:left}
#dexView#dexView.u :is(.dex-sc-tok-selected) svg{margin-left:auto;flex-shrink:0}
#dexView#dexView.u .dex-sc-tok-select{justify-content:center;padding:0 12px;background:var(--u-accent);border-color:var(--u-accent);color:var(--u-on)}
/* GRAM is fixed on one side: a label, not a control */
#dexView#dexView.u .dex-sc-tok-gram{cursor:default;pointer-events:none;gap:10px}
#dexView#dexView.u .dex-sc-tok-gram svg{display:none}
#dexView#dexView.u .dex-sc-tok-gram:hover{background:var(--u-pill)}

@media (max-width:760px){
  :root{--u-pill-w:146px}
  #dexView#dexView.u :is(.dex-sc-tok,.dex-sc-tok-selected,.dex-sc-tok-select){font-size:16px}
  #dexView .u-tile::after{box-shadow:0 0 26px 8px rgb(var(--glow,0 152 234) / .5)}
}
@media (max-width:380px){:root{--u-pill-w:132px}}
@media (prefers-reduced-motion:reduce){
  #dexView .u-tile,#dexView .u-tile::after{animation:none!important}
  #dexView .u-tile img{transition:none!important}
}
/* Phones: tiles sit in the corners above the headline and below the card, never on text */
@media (max-width:760px){
  #dexView#dexView.u .u-hero{padding-top:64px}
}

/* ── Round 4: neater token pills ── */
:root{--u-pill-w:auto}
#dexView#dexView.u :is(.dex-sc-tok,.dex-sc-tok-selected,.dex-sc-tok-select){
  height:40px;min-height:40px;padding:0 10px 0 4px;gap:7px;justify-content:center;font-size:16px;font-weight:600}
#dexView#dexView.u .dex-sc-tok-select{padding:0 10px}
#dexView#dexView.u .dex-sc-tok-gram{padding:0 12px 0 4px}
#dexView#dexView.u :is(.dex-sc-tok,.dex-sc-tok-selected) > span:not(.u-ico){flex:0 1 auto}
#dexView#dexView.u :is(.dex-sc-tok-selected) svg{margin-left:0}
#dexView#dexView.u :is(.dex-sc-tok-gram,.dex-sc-tok-selected) img:not(.u-badge){width:30px!important;height:30px!important}
#dexView#dexView.u .dex-sc-tok-selected .u-ico > img:first-child{width:30px!important;height:30px!important}
#dexView#dexView.u .dex-sc-tok-selected .u-ico .u-badge{width:13px!important;height:13px!important;right:-2px;bottom:-2px}
@media (max-width:760px){#dexView#dexView.u :is(.dex-sc-tok,.dex-sc-tok-selected,.dex-sc-tok-select){font-size:15px}}
/* Phones: the card grows once a quote shows — keep only the two tiles above it */
/* Width set in JS to fit the longer of the two pills, so both stay identical */
#dexView#dexView.u :is(.dex-sc-tok,.dex-sc-tok-selected,.dex-sc-tok-select){width:var(--u-pill-fit,auto);min-width:0;max-width:170px}

/* ── Phones: tiles fully on screen (never cut by the edge), tucked behind text and panels ── */
@media (max-width:760px){
  #dexView#dexView .u-bg{position:absolute;inset:0;overflow:visible}
  #dexView .u-tile{display:block!important;width:var(--ms)!important;height:var(--ms)!important;top:var(--my)!important;
    left:clamp(var(--edge-l),var(--mx),calc(100% - var(--ms) - var(--edge-r)))!important}
  #dexView#dexView.u{--edge-l:10px;--edge-r:10px}
  #dexView .u-tile:nth-child(1){--mx:0px;--my:14px;--ms:62px}
  #dexView .u-tile:nth-child(2){--mx:100%;--my:30px;--ms:58px}
  #dexView .u-tile:nth-child(3){--mx:100%;--my:190px;--ms:56px}
  #dexView .u-tile:nth-child(4){--mx:0px;--my:300px;--ms:60px}
  #dexView .u-tile:nth-child(5){--mx:100%;--my:460px;--ms:62px}
  #dexView .u-tile:nth-child(6){--mx:0px;--my:590px;--ms:56px}
  #dexView .u-tile:nth-child(7){--mx:100%;--my:720px;--ms:60px}
  #dexView .u-tile::after{box-shadow:0 0 22px 6px rgb(0 152 234 / .45)}
  #dexView#dexView.u .u-tile img{scale:1}
}


/* ── Cards under the panels: quote details + fee split ── */
#dexView#dexView.u .dex-sc-details{
  margin:10px 0 0;padding:6px 16px;border-radius:20px;background:var(--u-panel);border:1px solid var(--u-panel-line);box-shadow:var(--u-panel-shadow)}
#dexView#dexView.u .dex-sc-det-row{display:flex;align-items:baseline;justify-content:space-between;gap:12px;padding:10px 0;border-top:1px solid var(--u-panel-line);font-size:14px}
#dexView#dexView.u .dex-sc-det-row:first-child{border-top:0}
#dexView#dexView.u .dex-sc-det-val{text-align:right;font-weight:600;font-variant-numeric:tabular-nums;min-width:0;overflow-wrap:anywhere}
#dexView#dexView.u .dex-sc-det-sub{display:block;margin-top:2px;font-size:12px;font-weight:450}
#dexView#dexView.u .dex-sc-cta{margin-top:10px}
#dexView#dexView.u .u-fee-card{display:block;width:100%;max-width:480px;margin-top:14px;padding:16px 18px;border-radius:20px;
  background:var(--u-panel);border:1px solid var(--u-panel-line);box-shadow:var(--u-panel-shadow);backdrop-filter:none}
#dexView#dexView.u .u-fee-card .dex-side-hdr{display:flex;align-items:center;gap:8px;margin-bottom:12px;font-family:inherit;font-size:15px;font-weight:600;color:var(--u-ink)}
#dexView#dexView.u .u-fee-card .dex-fee-list{gap:10px}
#dexView#dexView.u .u-fee-card .dex-fee-name{min-width:0;flex:0 0 42%;font-size:13.5px;color:var(--u-mute)}
#dexView#dexView.u .u-fee-card .dex-fee-track{height:6px;background:var(--u-pill)}
#dexView#dexView.u .u-fee-card .dex-fee-fill--lp{background:#0098EA}
#dexView#dexView.u .u-fee-card .dex-fee-pct{font-size:13.5px;color:var(--u-ink);font-variant-numeric:tabular-nums}
#dexView#dexView.u .u-fee-card .dex-fee-total{margin-top:6px;padding-top:10px;border-top:1px solid var(--u-panel-line);font-size:13.5px;color:var(--u-ink)}
/* Balance / USD line never wraps into the panel */
#dexView#dexView.u .dex-sc-box-foot{gap:10px;white-space:nowrap}
#dexView#dexView.u .dex-sc-box-usd{min-width:0;overflow:hidden;text-overflow:ellipsis}
#dexView#dexView.u .dex-sc-bal{flex-shrink:0}
@media (max-width:760px){
  #dexView#dexView.u .dex-sc-det-row{font-size:13px}
  #dexView#dexView.u .dex-sc-bal{font-size:13px}
}
#dexView#dexView.u .u-fee-card .dex-fee-name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
@media (max-width:420px){#dexView#dexView.u .u-fee-card .dex-fee-name{flex-basis:46%;font-size:12.5px}}
#dexView#dexView.u .dex-sc-details{box-sizing:border-box;width:100%;margin-inline:0}
#dexView#dexView.u .dex-sc-det-lbl{white-space:nowrap}
#dexView#dexView.u .dex-sc-det-sub{display:none}   /* the split has its own card below */
#dexView#dexView.u :is(.dex-sc-pay,.dex-sc-recv){margin-inline:0;box-sizing:border-box;width:100%}
#dexView#dexView.u .dex-sc-cta{margin-inline:0;box-sizing:border-box;width:100%}


/* Approved DEX refinement (ported from design-refs/dex-polish). */
/* Preserve the live composition, assets, fee values and transaction controls. */
html[data-dex-page="true"] #dexView#dexView.u .dex-sc-box{padding:20px 20px 18px;border-radius:24px}
html[data-dex-page="true"] #dexView#dexView.u .dex-sc-box-lbl{font-size:15px;font-weight:550;margin-bottom:10px}
html[data-dex-page="true"] #dexView#dexView.u .dex-sc-inp-row{min-height:58px;gap:14px}
html[data-dex-page="true"] #dexView#dexView.u :is(.dex-sc-inp,.dex-sc-out){font-size:46px;font-weight:550;letter-spacing:-.045em;font-variant-numeric:tabular-nums;line-height:1.12}
html[data-dex-page="true"] #dexView#dexView.u .dex-sc-inp{appearance:textfield;-moz-appearance:textfield}
html[data-dex-page="true"] #dexView#dexView.u .dex-sc-inp::-webkit-inner-spin-button{appearance:none}
html[data-dex-page="true"] #dexView#dexView.u :is(.dex-sc-tok,.dex-sc-tok-selected,.dex-sc-tok-select){min-height:46px;border-radius:16px;font-size:18px;font-weight:650;padding:5px 12px;max-width:180px}
html[data-dex-page="true"] #dexView#dexView.u .dex-sc-box-foot{margin-top:12px;align-items:center}
html[data-dex-page="true"] #dexView#dexView.u .dex-sc-bal{display:flex;align-items:center;gap:8px;font-size:14px;font-weight:550}
html[data-dex-page="true"] #dexView#dexView.u .dex-sc-max{display:inline-flex;align-items:center;justify-content:center;min-height:30px;padding:0 9px;border-radius:9px;background:var(--u-pill);font-size:12px;font-weight:700;letter-spacing:.025em;cursor:pointer}
html[data-dex-page="true"] #dexView#dexView.u .dex-sc-max:hover{background:var(--u-hover)}
html[data-dex-page="true"] #dexView#dexView.u .dex-sc-flip-wrap{height:10px;padding:0;min-height:0}
html[data-dex-page="true"] #dexView#dexView.u .dex-sc-flip{width:46px;height:46px;border-radius:15px;border-width:4px;box-shadow:0 2px 5px #0000000a}
html[data-dex-page="true"] #dexView#dexView.u .dex-sc-flip svg{width:22px;height:22px}
html[data-dex-page="true"] #dexView#dexView.u .dex-sc-cta{min-height:62px;border-radius:22px;font-size:22px;font-weight:650;margin-top:12px}
html[data-dex-page="true"] #dexView#dexView.u :is(.dex-sc-tok,.dex-sc-flip):focus-visible{outline:2px solid var(--u-accent);outline-offset:3px}
@media(max-width:540px){
 html[data-dex-page="true"] #dexView#dexView.u .dex-sc-box{padding:16px}
 html[data-dex-page="true"] #dexView#dexView.u :is(.dex-sc-inp,.dex-sc-out){font-size:36px}
 html[data-dex-page="true"] #dexView#dexView.u :is(.dex-sc-tok,.dex-sc-tok-selected,.dex-sc-tok-select){font-size:16px;max-width:150px;padding:5px 9px}
 html[data-dex-page="true"] #dexView#dexView.u .dex-sc-box-foot{flex-wrap:wrap;white-space:normal}
}

/* Round 2: a quieter utility row and an explicitly informational fee breakdown. */
html[data-dex-page="true"] #dexView#dexView.u .dex-sc-box-usd{font-size:15px;font-weight:450;letter-spacing:-.015em;font-variant-numeric:tabular-nums}
html[data-dex-page="true"] #dexView#dexView.u .dex-sc-slip.bs-trade-settings-btn{width:100%;box-sizing:border-box;justify-content:space-between;margin:10px 0 0;padding:10px 16px;min-height:48px;border-radius:16px;background:var(--u-pill);border:1px solid transparent}
html[data-dex-page="true"] #dexView#dexView.u .dex-sc-slip.bs-trade-settings-btn:hover{background:var(--u-hover);border-color:var(--u-panel-line)}
html[data-dex-page="true"] #dexView#dexView.u .dex-sc-slip .bs-ts-label{font-size:15px;font-weight:550;color:var(--u-ink)}
html[data-dex-page="true"] #dexView#dexView.u .dex-sc-slip .bs-ts-val{font-size:15px;font-weight:650;color:var(--u-ink);font-variant-numeric:tabular-nums}
html[data-dex-page="true"] #dexView#dexView.u .dex-sc-slip .bs-ts-arrow{width:14px;height:14px;opacity:.65}
html[data-dex-page="true"] #dexView#dexView.u .dex-sc-slip:focus-visible{outline:2px solid var(--u-accent);outline-offset:3px}
html[data-dex-page="true"] #dexView#dexView.u .u-fee-card{margin-top:18px;padding:20px;border-radius:24px;box-shadow:none}
html[data-dex-page="true"] #dexView#dexView.u .u-fee-card .dex-side-hdr{font-size:16px;font-weight:650;margin-bottom:18px;letter-spacing:-.025em;flex-wrap:wrap}
html[data-dex-page="true"] #dexView#dexView.u .u-fee-card .dex-fee-list{gap:14px}
html[data-dex-page="true"] #dexView#dexView.u .u-fee-card .dex-fee-name{font-size:14px;flex-basis:48%;white-space:normal;overflow:visible;text-overflow:clip;line-height:1.35}
html[data-dex-page="true"] #dexView#dexView.u .u-fee-card .dex-fee-pct{font-size:15px;font-weight:600;letter-spacing:-.015em}
html[data-dex-page="true"] #dexView#dexView.u .u-fee-card .dex-fee-track{height:4px}
html[data-dex-page="true"] #dexView#dexView.u .u-fee-card .dex-fee-total{margin-top:2px;padding-top:14px;font-size:18px;font-weight:650;letter-spacing:-.025em}
@media(max-width:380px){html[data-dex-page="true"] #dexView#dexView.u .u-fee-card{padding:16px}html[data-dex-page="true"] #dexView#dexView.u .u-fee-card .dex-fee-name{font-size:13px}}

/* Round 3: trade settings, presentation only; all real controls remain intact. */
html #tradeSettingsModal{--dp-surface:#fff;--dp-soft:#f2f7fb;--dp-line:#e0e8ef;--dp-ink:#102d49;--dp-muted:#607b94;--dp-accent:#007dcc}
html:is([data-theme="dark"],[data-scheme="dark"],[data-theme="voidtype"]) #tradeSettingsModal{--dp-surface:#1b2026;--dp-soft:#252c34;--dp-line:#36414c;--dp-ink:#f3f6f9;--dp-muted:#a8b8c7;--dp-accent:#49b9ff}
html #tradeSettingsModal .ts-modal{width:calc(100% - 24px);max-width:440px;max-height:calc(100dvh - 24px);background:var(--dp-surface);border:1px solid var(--dp-line);border-radius:28px;box-shadow:0 24px 70px #10203026;overflow:auto;color:var(--dp-ink)}
html #tradeSettingsModal .ts-header{padding:22px 24px 18px;border-color:var(--dp-line)}
html #tradeSettingsModal .ts-title{font-family:inherit;font-size:22px;font-weight:650;letter-spacing:-.035em;color:var(--dp-ink)}
html #tradeSettingsModal .ts-title-ico{width:20px;height:20px;color:var(--dp-muted)}
html #tradeSettingsModal .ts-close-btn{width:36px;height:36px;border:0;border-radius:12px;background:var(--dp-soft);color:var(--dp-muted);font-size:22px}
html #tradeSettingsModal .ts-body{padding:22px 24px;gap:22px}
html #tradeSettingsModal .ts-section{gap:12px}
html #tradeSettingsModal .ts-section-title{font-size:16px;font-weight:600;letter-spacing:-.02em;color:var(--dp-ink)}
html #tradeSettingsModal .ts-section-sub{font-size:13px;line-height:1.55;color:var(--dp-muted);text-wrap:pretty}
html #tradeSettingsModal .ts-hero{justify-content:space-between;margin:0;padding:14px 18px;background:var(--dp-soft);border:1px solid var(--dp-line);border-radius:20px;gap:10px}
html #tradeSettingsModal .ts-slip-inp{width:112px;max-width:100%;font-family:inherit;font-size:56px;line-height:1.05;font-weight:550;letter-spacing:-.06em;text-align:left;color:var(--dp-ink)}
html #tradeSettingsModal .ts-hero-pct{font-family:inherit;font-size:28px;font-weight:500;color:var(--dp-muted)}
html #tradeSettingsModal .ts-risk{font-size:12px;font-weight:600;padding:7px 10px;border-radius:10px;white-space:nowrap}
html #tradeSettingsModal .ts-presets{gap:6px;margin:0}
html #tradeSettingsModal .ts-preset{min-height:42px;padding:8px 2px;font-family:inherit;font-size:14px;font-weight:600;font-variant-numeric:tabular-nums;border:1px solid var(--dp-line);border-radius:12px;background:var(--dp-surface);color:var(--dp-muted);box-shadow:none}
html #tradeSettingsModal .ts-preset.active{background:var(--dp-accent);border-color:var(--dp-accent);color:var(--dp-surface)}
html #tradeSettingsModal .ts-preset:hover{border-color:var(--dp-accent)}
html #tradeSettingsModal .ts-slider-ticks span{font-family:inherit;font-size:11px;font-weight:500;color:var(--dp-muted)}
html #tradeSettingsModal .ts-section:last-child{padding:16px;background:var(--dp-soft);border:1px solid var(--dp-line);border-radius:20px}
html #tradeSettingsModal .ts-toggle-row{padding:4px;gap:4px;border:1px solid var(--dp-line);border-radius:14px;background:var(--dp-surface);box-sizing:border-box}
html #tradeSettingsModal .ts-tog-btn{min-height:38px;border:0;border-radius:10px;font-size:14px;color:var(--dp-muted);background:transparent;box-shadow:none}
html #tradeSettingsModal .ts-tog-btn.active{background:var(--dp-soft);color:var(--dp-ink);box-shadow:0 1px 3px #00000012}
html #tradeSettingsModal .ts-footer{padding:16px 24px 20px;border-color:var(--dp-line);gap:16px}
html #tradeSettingsModal .ts-reset-btn{font-size:13px;color:var(--dp-muted);min-height:40px;text-decoration:none}
html #tradeSettingsModal .ts-reset-btn:hover{text-decoration:underline}
html #tradeSettingsModal .ts-done-btn{min-height:44px;min-width:112px;border-radius:14px;font-size:16px;font-weight:600;background:var(--dp-accent);color:var(--dp-surface);box-shadow:none}
html #tradeSettingsModal :is(button,input):focus-visible{outline:2px solid var(--dp-accent);outline-offset:3px}
@media(max-width:380px){html #tradeSettingsModal :is(.ts-header,.ts-body,.ts-footer){padding:16px}html #tradeSettingsModal .ts-slip-inp{width:88px;font-size:44px}html #tradeSettingsModal .ts-hero{padding:12px}}

/* Round 4: remove secondary decoration and the MEV section from the preview. */
html #tradeSettingsModal .ts-title-ico,
html #tradeSettingsModal .ts-body > .ts-section:has(#tsMevOn){display:none}
html #tradeSettingsModal .ts-header{border-bottom:0}
html #tradeSettingsModal .ts-footer{border-top:0}

/* Round 5: readable help text and a proper secondary reset action. */
html #tradeSettingsModal .ts-reset-btn{min-height:44px;padding:10px 16px;border:1px solid var(--dp-line);border-radius:14px;background:var(--dp-soft);color:var(--dp-ink);font-size:14px;font-weight:550;line-height:1.35;text-decoration:none}
html #tradeSettingsModal .ts-reset-btn:hover{background:var(--dp-surface);border-color:var(--dp-muted);text-decoration:none}
html #tradeSettingsModal .ts-section-sub{font-size:15px;line-height:1.75;margin-top:2px}
html #tradeSettingsModal #tsSlipInp:is(:focus,:focus-visible){outline:none!important;box-shadow:none!important;border:none!important;background:transparent!important}
@media(max-width:380px){html #tradeSettingsModal .ts-footer{gap:10px}html #tradeSettingsModal .ts-reset-btn{padding-inline:10px}html #tradeSettingsModal .ts-done-btn{min-width:88px}}

/* Round 6: matching footer buttons and an explicit sentence break. */
html #tradeSettingsModal .ts-reset-btn{min-height:44px;border:0;border-radius:14px;padding:10px 28px;background:var(--dp-accent);color:var(--dp-surface);font-size:16px;font-weight:600;box-shadow:none;transition:opacity .15s,transform .12s}
html #tradeSettingsModal .ts-reset-btn:hover{background:var(--dp-accent);color:var(--dp-surface);opacity:.88;transform:translateY(-1px)}
html #tradeSettingsModal .ts-reset-btn:active{transform:none}
html #tradeSettingsModal .ts-section > .ts-section-sub{white-space:pre-line}
@media(max-width:380px){html #tradeSettingsModal .ts-reset-btn{padding-inline:12px}}

/* Round 7: tighten the surrounding composition, preserving the swap form. */
html[data-dex-page="true"] #dexView#dexView.u .u-hero{padding:28px 16px 26px}
html[data-dex-page="true"] #dexView#dexView.u .u-title{font-size:clamp(40px,4.7vw,64px);font-weight:650;letter-spacing:-.055em;line-height:1.02;max-width:680px;margin-inline:auto}
html[data-dex-page="true"] #dexView#dexView.u .u-bg{inset:0;overflow:hidden;border-radius:32px;background:radial-gradient(ellipse 520px 420px at 50% 290px,rgba(0,152,234,.12),transparent 100%)}
html[data-dex-page="true"] #dexView#dexView.u .u-tile::after{box-shadow:0 0 28px 8px rgb(0 152 234 / .22)}
html[data-dex-page="true"] #dexView#dexView.u .u-tile img{box-shadow:0 8px 22px #102d4924,0 0 0 1px #ffffff66;scale:1}
@media(min-width:761px){
 html[data-dex-page="true"] #dexView#dexView.u .u-tile:nth-child(1){left:calc(50% - 440px);top:38px;width:112px;height:112px}
 html[data-dex-page="true"] #dexView#dexView.u .u-tile:nth-child(2){left:calc(50% + 330px);top:22px;width:108px;height:108px}
 html[data-dex-page="true"] #dexView#dexView.u .u-tile:nth-child(3){left:calc(50% - 366px);top:220px;width:90px;height:90px}
 html[data-dex-page="true"] #dexView#dexView.u .u-tile:nth-child(4){left:calc(50% + 280px);top:245px;width:112px;height:112px}
 html[data-dex-page="true"] #dexView#dexView.u .u-tile:nth-child(5){left:calc(50% - 450px);top:390px;width:122px;height:122px}
 html[data-dex-page="true"] #dexView#dexView.u .u-tile:nth-child(6){left:calc(50% + 355px);top:445px;width:92px;height:92px}
 html[data-dex-page="true"] #dexView#dexView.u .u-tile:nth-child(7){left:calc(50% - 360px);top:595px;width:96px;height:96px}
}
@media(max-width:760px){
 html[data-dex-page="true"] #dexView#dexView.u .u-hero{padding:24px 40px 24px}
 html[data-dex-page="true"] #dexView#dexView.u .u-title{font-size:clamp(32px,7vw,44px)}
 html[data-dex-page="true"] #dexView#dexView.u .u-tile::after{box-shadow:0 0 18px 3px rgb(0 152 234 / .15)}
}

/* Round 8: use the desktop width for content instead of empty side gutters. */
@media(min-width:1050px){
 html[data-dex-page="true"] #dexView#dexView.u #dexPanelSwap{display:grid;grid-template-columns:minmax(0,1fr) minmax(420px,1.08fr);grid-template-rows:auto auto;column-gap:clamp(32px,4vw,72px);row-gap:30px;max-width:1160px;margin:32px auto 0;padding:32px;align-items:start;box-sizing:border-box}
 html[data-dex-page="true"] #dexView#dexView.u .dex-swap-layout{display:block;grid-column:2;grid-row:1;min-width:0;width:100%}
 html[data-dex-page="true"] #dexView#dexView.u .u-hero{grid-column:1;grid-row:1;text-align:left;padding:8px 0 0;align-self:end}
 html[data-dex-page="true"] #dexView#dexView.u .u-title{font-size:clamp(52px,4.8vw,76px);line-height:1.03;letter-spacing:-.055em;margin:0;max-width:520px;text-wrap:balance}
 html[data-dex-page="true"] #dexView#dexView.u .dex-swap-card{grid-column:2;grid-row:1 / span 2;max-width:none;width:100%}
 html[data-dex-page="true"] #dexView#dexView.u .u-fee-card{grid-column:1;grid-row:2;max-width:none;margin:0;width:100%;box-sizing:border-box;align-self:start}
 html[data-dex-page="true"] #dexView#dexView.u .u-bg{background:radial-gradient(ellipse at 70% 35%,rgba(0,152,234,.14),transparent 70%)}
 html[data-dex-page="true"] #dexView#dexView.u .u-tile{display:none!important}
}

/* Independent columns prevent quote expansion from displacing the heading. */
html[data-dex-page="true"] .dp-left{display:flex;flex-direction:column}
html[data-dex-page="true"] .dp-coins{display:none}
@media(min-width:1050px){
 html[data-dex-page="true"] #dexView#dexView.u #dexPanelSwap{grid-template-rows:auto;align-items:start}
 html[data-dex-page="true"] #dexView#dexView.u .dp-left{display:flex;flex-direction:column;gap:28px;grid-column:1;grid-row:1;min-width:0}
 html[data-dex-page="true"] #dexView#dexView.u .u-hero{padding:0;align-self:stretch}
 html[data-dex-page="true"] #dexView#dexView.u .dex-swap-card{grid-row:1}
 html[data-dex-page="true"] #dexView#dexView.u .dp-coins{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:8px 4px}
 html[data-dex-page="true"] #dexView#dexView.u .dp-coins img{width:calc((100% - 48px)/5);aspect-ratio:1;object-fit:cover;border-radius:24%;box-shadow:0 6px 14px #102d491a;transform:rotate(-7deg)}
 html[data-dex-page="true"] #dexView#dexView.u .dp-coins img:nth-child(even){transform:rotate(6deg) translateY(5px)}
}
@media(max-width:1049px){
 html[data-dex-page="true"] #dexView#dexView.u #dexPanelSwap{display:flex;flex-direction:column;align-items:center}
 html[data-dex-page="true"] #dexView#dexView.u .dex-swap-layout{display:block;order:2;min-width:0;width:100%;max-width:480px}
 html[data-dex-page="true"] #dexView#dexView.u .u-hero{order:1}
 html[data-dex-page="true"] #dexView#dexView.u .dex-swap-card{order:2}
 html[data-dex-page="true"] #dexView#dexView.u .u-fee-card{order:3}
}

/* Round 10: artwork belongs to the background, not the content column. */
html[data-dex-page="true"] #dexView#dexView.u .dp-coins{display:none}
@media(min-width:1050px){
 html[data-dex-page="true"] #dexView#dexView.u .u-bg{pointer-events:none;overflow:hidden}
 html[data-dex-page="true"] #dexView#dexView.u .u-tile{display:block!important;opacity:.7;animation:none;pointer-events:none}
 html[data-dex-page="true"] #dexView#dexView.u .u-tile:nth-child(1){left:1%;top:25px;width:88px;height:88px}
 html[data-dex-page="true"] #dexView#dexView.u .u-tile:nth-child(2){left:85%;top:8px;width:76px;height:76px}
 html[data-dex-page="true"] #dexView#dexView.u .u-tile:nth-child(3){left:-20px;top:300px;width:82px;height:82px}
 html[data-dex-page="true"] #dexView#dexView.u .u-tile:nth-child(4){left:calc(100% - 70px);top:240px;width:94px;height:94px}
 html[data-dex-page="true"] #dexView#dexView.u .u-tile:nth-child(5){left:8%;top:620px;width:110px;height:110px}
 html[data-dex-page="true"] #dexView#dexView.u .u-tile:nth-child(6){left:calc(100% - 85px);top:610px;width:100px;height:100px}
 html[data-dex-page="true"] #dexView#dexView.u .u-tile:nth-child(7){left:44%;top:740px;width:74px;height:74px}
 html[data-dex-page="true"] #dexView#dexView.u .u-tile::after{box-shadow:0 0 24px 6px rgb(0 152 234 / .15)}
}

/* Round 11: full-colour artwork with room for rotated corners. */
@media(min-width:1050px){
 html[data-dex-page="true"] #dexView#dexView.u{min-height:900px}
 html[data-dex-page="true"] #dexView#dexView.u .u-tile{opacity:1}
 html[data-dex-page="true"] #dexView#dexView.u .u-tile:nth-child(1){left:24px;top:24px;width:104px;height:104px}
 html[data-dex-page="true"] #dexView#dexView.u .u-tile:nth-child(2){left:calc(100% - 136px);top:24px;width:92px;height:92px}
 html[data-dex-page="true"] #dexView#dexView.u .u-tile:nth-child(3){left:24px;top:320px;width:98px;height:98px}
 html[data-dex-page="true"] #dexView#dexView.u .u-tile:nth-child(4){left:calc(100% - 136px);top:280px;width:110px;height:110px}
 html[data-dex-page="true"] #dexView#dexView.u .u-tile:nth-child(5){left:8%;top:660px;width:126px;height:126px}
 html[data-dex-page="true"] #dexView#dexView.u .u-tile:nth-child(6){left:calc(100% - 148px);top:690px;width:116px;height:116px}
 html[data-dex-page="true"] #dexView#dexView.u .u-tile:nth-child(7){left:44%;top:760px;width:90px;height:90px}
}

/* Round 12: decoration must not create an extra scrollable canvas. */
@media(min-width:1050px){
 html[data-dex-page="true"] #dexView#dexView.u{min-height:0}
 html[data-dex-page="true"] #dexView#dexView.u .u-tile:nth-child(5){top:auto;bottom:28px;left:24px;width:110px;height:110px}
 html[data-dex-page="true"] #dexView#dexView.u .u-tile:nth-child(6){top:auto;bottom:24px;left:calc(100% - 136px);width:104px;height:104px}
 html[data-dex-page="true"] #dexView#dexView.u .u-tile:nth-child(7){top:auto;bottom:24px;left:36%;width:82px;height:82px}
}

/* Round 13: give settings the same readable surface as the form. */
html[data-dex-page="true"] #dexView#dexView.u .dex-sc-slip.bs-trade-settings-btn{background:var(--u-panel);border:1px solid var(--u-panel-line);box-shadow:0 2px 5px rgb(0 0 0 / .06)}
html[data-dex-page="true"] #dexView#dexView.u .dex-sc-slip.bs-trade-settings-btn:hover{background:var(--u-panel);border-color:var(--u-accent);box-shadow:0 3px 8px rgb(0 0 0 / .08)}
html[data-dex-page="true"] #dexView#dexView.u .dex-sc-slip .bs-ts-arrow{opacity:1;color:var(--u-accent)}

/* Keep decorative tiles fully inside the canvas at intermediate widths. */
@media (min-width:761px) and (max-width:1049px){
 html[data-dex-page="true"] #dexView#dexView.u .u-tile:nth-child(1){left:24px;top:24px;width:72px;height:72px}
 html[data-dex-page="true"] #dexView#dexView.u .u-tile:nth-child(2){left:calc(100% - 100px);top:24px;width:72px;height:72px}
 html[data-dex-page="true"] #dexView#dexView.u .u-tile:nth-child(3){left:24px;top:210px;width:72px;height:72px}
 html[data-dex-page="true"] #dexView#dexView.u .u-tile:nth-child(4){left:calc(100% - 100px);top:230px;width:72px;height:72px}
 html[data-dex-page="true"] #dexView#dexView.u .u-tile:nth-child(5){left:24px;top:410px;width:72px;height:72px}
 html[data-dex-page="true"] #dexView#dexView.u .u-tile:nth-child(6){left:calc(100% - 100px);top:430px;width:72px;height:72px}
 html[data-dex-page="true"] #dexView#dexView.u .u-tile:nth-child(7){display:none}
}
@media (max-width:760px){html[data-dex-page="true"] #dexView#dexView.u .u-tile{display:none}}

/* Dark theme: black fields instead of grey (design-refs/swap-dark variant 2, 2026-10-23) — near-black panels,
   a hairline rim and a faint light edge on top, on a black page */
html:is([data-theme="dark"],[data-scheme="dark"],[data-theme="voidtype"]){
  --u-page:#000;--u-panel:#070707;--u-panel-line:rgba(255,255,255,.13);--u-panel-shadow:inset 0 1px 0 rgba(255,255,255,.07),0 10px 30px rgba(0,0,0,.6);
  --u-pill:#121212;--u-field:#101010;--u-buy:#070707;--u-sell:#070707;--u-chip:#0E0E0E;--u-modal:#080808;--u-modal-line:rgba(255,255,255,.12)}
html[data-dex-page="true"]:is([data-theme="dark"],[data-scheme="dark"],[data-theme="voidtype"]) body{background:var(--u-page)!important}

/* Trade settings (user, 2026-10-23): no help text, no reset button — Done spans the row;
   dark theme fields black like the Swap form (variant 2: near-black, hairline rim, faint light edge) */
html #tradeSettingsModal .ts-reset-btn[hidden]{display:none}
html #tradeSettingsModal .ts-footer .ts-done-btn{flex:1}
html:is([data-theme="dark"],[data-scheme="dark"],[data-theme="voidtype"]) #tradeSettingsModal{--dp-surface:#0A0A0A;--dp-soft:#050505;--dp-line:rgba(255,255,255,.13);--dp-muted:#9A9A92}
html:is([data-theme="dark"],[data-scheme="dark"],[data-theme="voidtype"]) #tradeSettingsModal :is(.ts-hero,.ts-preset:not(.active)){background:#050505;border-color:rgba(255,255,255,.13);box-shadow:inset 0 1px 0 rgba(255,255,255,.07)}
html:is([data-theme="dark"],[data-scheme="dark"],[data-theme="voidtype"]) #tradeSettingsModal .ts-close-btn{background:#141414}
html:is([data-theme="dark"],[data-scheme="dark"],[data-theme="voidtype"]) body #tradeSettingsModal .ts-presets .ts-preset:not(.active){background:#050505!important;border-color:rgba(255,255,255,.13)!important}

/* ── Trade settings window (coin page + Swap): design-refs/trade-settings round 2 variant 10, user 2026-10-26 ──
   Playful: chunky keys with a 4px "step", sticker headings, the number big with % right after it, a green
   Done; no high-slippage warning. Selectors carry extra weight to beat the dark-theme preset rules above. */
html body #tradeSettingsModal{--tsx-ink:#0A2540;--tsx-field:rgba(10,37,64,.08);--tsx-step:rgba(10,37,64,.16);--tsx-up:#20B26C;--tsx-up-step:#13834E}
html:is([data-theme="dark"],[data-scheme="dark"],[data-theme="voidtype"]) body #tradeSettingsModal{--tsx-ink:#F2F2EE;--tsx-field:rgba(255,255,255,.08);--tsx-step:rgba(255,255,255,.16)}
html body #tradeSettingsModal .ts-modal{border-radius:28px!important}
html body #tradeSettingsModal :is(.ts-header,.ts-footer){border:0!important}
html body #tradeSettingsModal .ts-title svg{display:none}
html body #tradeSettingsModal #tsSlipWarn{display:none!important}
/* headings with stickers */
html body #tradeSettingsModal .ts-section-title{display:flex;align-items:center;gap:8px;font-size:17px!important;font-weight:900!important}
html body #tradeSettingsModal .ts-body > .ts-section:first-child .ts-section-title::before{content:"";flex:none;width:28px;height:28px;background:url(Emodji/slippage.webp) center/contain no-repeat}
html body #tradeSettingsModal #tsQuick .ts-section-title::before{content:"";flex:none;width:28px;height:28px;background:url(Emodji/gram-gem.webp) center/contain no-repeat}
/* the number with % right after it (the field is as wide as its text where the browser can) */
html body #tradeSettingsModal .ts-hero-val{gap:2px;align-items:baseline}
html body #tradeSettingsModal .ts-slip-inp{width:2.4ch;text-align:right;font-size:56px!important;font-weight:900!important;color:var(--tsx-ink)}
@supports (field-sizing:content){html body #tradeSettingsModal .ts-slip-inp{field-sizing:content;width:auto;min-width:1ch;text-align:left}}
/* chunky keys: the number field, slippage presets, quick amounts */
html body #tradeSettingsModal :is(.ts-hero,.ts-preset.ts-preset.ts-preset,.ts-qa-inp.ts-qa-inp){border:0!important;border-radius:16px!important;background:var(--tsx-field)!important;
  box-shadow:0 4px 0 var(--tsx-step)!important;color:var(--tsx-ink)!important;font-weight:900!important}
html body #tradeSettingsModal .ts-presets .ts-preset.ts-preset.ts-preset.active{background:var(--tsx-up)!important;color:#fff!important;box-shadow:0 4px 0 var(--tsx-up-step)!important}
html body #tradeSettingsModal .ts-presets .ts-preset.ts-preset.ts-preset:active{transform:translateY(3px);box-shadow:0 1px 0 var(--tsx-step)!important}
html body #tradeSettingsModal .ts-qa-max.ts-qa-max{opacity:.6}
html body #tradeSettingsModal .ts-risk{background:#F5C451!important;color:#3D2A00!important;border-radius:999px;box-shadow:0 3px 0 #C99A26}
html body #tradeSettingsModal .ts-done-btn{height:58px;border-radius:18px!important;background:var(--tsx-up)!important;color:#06120B!important;font-size:18px!important;font-weight:900!important;
  box-shadow:0 5px 0 var(--tsx-up-step)!important}
html body #tradeSettingsModal .ts-done-btn:active{transform:translateY(4px);box-shadow:0 1px 0 var(--tsx-up-step)!important}
@media(prefers-reduced-motion:reduce){html body #tradeSettingsModal :is(.ts-preset,.ts-done-btn):active{transform:none}}
html body #tradeSettingsModal .ts-presets .ts-preset.ts-preset.ts-preset:not(.active){background:var(--tsx-field)!important;box-shadow:0 4px 0 var(--tsx-step)!important;color:var(--tsx-ink)!important;border:0!important}

/* 2026-10-26 site pass: the panels are see-through now, so tiles 3–7 showed through them on phones and one sat on
   the Trade settings row — phones keep only the two tiles by the headline */
@media (max-width:760px){#dexView#dexView .u-tile:nth-child(n+3){display:none!important}}

/* Smallest phones: the headline stays clear of the two stickers beside it. */
@media(max-width:360px){
 html[data-dex-page="true"] #dexView#dexView.u .u-title{font-size:clamp(28px,8.9vw,32px)}
 #dexView .u-tile:nth-child(1){--ms:46px}
 #dexView .u-tile:nth-child(2){--ms:44px}
}
