:root {
  /* From jumper.xyz extract — reliable tokens only */
  --bg: #120b1e;
  --surface: #1c102d;
  --surface-2: #26163c;
  --surface-3: #302b52;
  --line: rgba(255, 255, 255, 0.06);
  --text: #ffffff;
  --text-cta: #fcfaff;
  --muted: #dbcfed;
  --muted-2: #999999;
  --primary: #653ca2;
  --purple: #653ca2;
  --purple-hot: #7a49c9;
  --pink: #ef3bd7;
  --radius-pill: 999px;
  --radius-card: 24px;
  --radius-button: 12px;
  --radius-row: 16px;
  --space: 4px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.08), 0 28px 70px rgba(0, 0, 0, 0.34);
  --shadow-low: 0 2px 4px rgba(0, 0, 0, 0.08), 0 8px 16px rgba(0, 0, 0, 0.08);
  --font-body: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  --font-display: Urbanist, Inter, ui-sans-serif, "Segoe UI", Arial, sans-serif;
  --logo-primary: #b49bda;
  --logo-secondary: #d35cff;
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  color: var(--text);
  background: var(--bg);
  font-family: var(--font-body);
  font-weight: 500;
}

button, input { font: inherit; }
button { color: inherit; }

.ambient {
  position: fixed;
  border-radius: 999px;
  z-index: 0;
  filter: blur(110px);
  pointer-events: none;
  opacity: 0;
  transform: scale(.55) translateY(100px);
  transition: opacity 1.1s .22s ease, transform 1.25s .16s cubic-bezier(.16,1,.3,1);
}

.ambient-one { width: 470px; height: 430px; left: -255px; bottom: -180px; background: #8147e5; }
.ambient-two { width: 470px; height: 430px; right: -255px; bottom: -180px; background: #8147e5; }
body.app-ready .ambient { opacity: .5; transform: scale(1) translateY(0); }

.site-header {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 88px;
  padding: 0 clamp(20px, 4vw, 58px);
  background: transparent;
}

.brand, .menu-button, .settings, .flip-button, .asset-button, .wallet-button {
  border: 0;
  background: none;
  cursor: pointer;
}

.brand-switcher { position: relative; z-index: 30; }

.brand {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 0;
}

.brand-chevron {
  color: #aa9dbb;
  margin-left: 2px;
  transition: transform .22s ease;
}
.brand-switcher.is-open .brand-chevron { transform: rotate(180deg); }

.jumper-logo {
  display: block;
  height: 32px;
  width: auto;
}
.jumper-logo .logo-primary { fill: var(--logo-primary); }
.jumper-logo .logo-accent { fill: var(--logo-secondary); }

.products-menu {
  position: absolute;
  top: calc(100% + 14px);
  left: 0;
  width: min(292px, calc(100vw - 32px));
  padding: 14px 10px 10px;
  border: 1px solid rgba(255, 255, 255, .05);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .45);
  transform-origin: 20px top;
  animation: menuIn .2s cubic-bezier(.16,1,.3,1);
}

.products-menu[hidden] { display: none; }

.products-label {
  margin: 0 12px 8px;
  color: #9a8eaa;
  font-size: 13px;
  font-weight: 600;
}

.product-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 16px;
  color: inherit;
  text-decoration: none;
  transition: background .18s ease;
}

.product-item:hover,
.product-item.is-active {
  background: rgba(255, 255, 255, .06);
}

.product-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .05);
  color: #f4edfa;
}
.product-icon iconify-icon { color: inherit; }

.product-copy { display: grid; gap: 2px; min-width: 0; }
.product-title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -.02em;
}
.product-title iconify-icon { opacity: .85; }
.product-desc { color: #a396b4; font-size: 13px; font-weight: 500; }

@keyframes menuIn {
  from { opacity: 0; transform: translateY(-6px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.header-actions { display: flex; align-items: center; gap: 18px; position: relative; }
.main-nav { display: flex; align-items: center; gap: clamp(34px, 4vw, 72px); margin-right: auto; margin-left: clamp(44px, 6vw, 105px); }
.main-nav a { color: var(--muted-2); text-decoration: none; font-size: 16px; font-weight: 750; transition: color .22s ease; }
.main-nav a:hover, .main-nav a.active { color: var(--text); }
.connect-mini, .primary-button, .get-started {
  border: 0;
  cursor: pointer;
  font-weight: 700;
  color: var(--text-cta);
  background: var(--primary);
  box-shadow: none;
  transition: transform .25s ease, filter .25s ease;
}
.connect-mini { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 23px; border-radius: var(--radius-pill); }
.connect-mini:hover, .primary-button:hover, .get-started:hover { transform: translateY(-2px); filter: brightness(1.08); }

.main-menu-wrap { position: relative; z-index: 40; }
.menu-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 50%;
  background: var(--surface);
  transition: background .2s ease, opacity .2s ease, transform .2s ease;
}
.menu-button:hover,
.main-menu-wrap.is-open .menu-button {
  background: var(--surface-2);
  opacity: 1;
}
.menu-button span {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #fff;
}

.main-menu {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: min(288px, calc(100vw - 24px));
  padding: 12px 12px 14px;
  border: 0;
  border-radius: 16px;
  background: var(--surface-2);
  box-shadow: 0 2px 4px rgba(0, 0, 0, .08), 0 8px 16px rgba(0, 0, 0, .08), 0 24px 60px rgba(0, 0, 0, .35);
  transform-origin: top right;
  max-height: calc(100vh - 110px);
  overflow-y: auto;
  animation: menuIn .2s cubic-bezier(.16,1,.3,1);
}
.main-menu[hidden] { display: none; }
.main-menu-nav { display: none; }

.main-menu-panel { display: grid; gap: 2px; }
.main-menu-panel[hidden] { display: none; }

.main-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 48px;
  padding: 12px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: background .18s ease;
}
.main-menu-item:hover { background: rgba(255, 255, 255, .06); }
.main-menu-icon {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  color: var(--text);
}
.main-menu-icon iconify-icon { color: inherit; display: block; }
.main-menu-item > span:nth-child(2) { flex: 1; }
.main-menu-meta {
  margin-left: auto;
  color: var(--muted-2);
  font-size: 13px;
  font-weight: 700;
}
.main-menu-chevron {
  margin-left: 4px;
  color: var(--muted-2);
  flex: 0 0 auto;
}
.main-menu-item[data-menu-nav="theme"] .main-menu-chevron,
.main-menu-item[data-menu-action="resources"] .main-menu-chevron {
  margin-left: auto;
}
.main-menu-item[data-menu-action="language"] .main-menu-meta,
.main-menu-item[data-menu-nav="language"] .main-menu-meta {
  margin-left: auto;
}
.main-menu-item[data-menu-action="language"] .main-menu-chevron,
.main-menu-item[data-menu-nav="language"] .main-menu-chevron {
  margin-left: 8px;
}

.main-menu-check {
  margin-left: auto;
  color: var(--text);
  opacity: 0;
  flex: 0 0 auto;
}
.main-menu-item[aria-checked="true"] .main-menu-check { opacity: 1; }

.main-menu-theme-head {
  display: grid;
  grid-template-columns: 40px 1fr 40px;
  align-items: center;
  min-height: 44px;
  margin-bottom: 4px;
}
.main-menu-back {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}
.main-menu-back:hover { background: rgba(255, 255, 255, .06); }
.main-menu-back iconify-icon { color: inherit; }
.main-menu-theme-title {
  margin: 0;
  text-align: center;
  font-size: 16px;
  font-weight: 700;
}

.main-menu-footer {
  margin-top: 8px;
  padding-top: 4px;
  border-top: 1px solid rgba(255, 255, 255, .06);
}
.main-menu-social {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: 0;
  padding: 14px 8px 6px;
}
.main-menu-social-link {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  color: #9a8eaa;
  text-decoration: none;
  border: 0;
  background: transparent;
  cursor: pointer;
  transition: color .18s ease;
}
.main-menu-social-link:hover { color: var(--text); }
.main-menu-social-link iconify-icon { color: inherit; display: block; }

.main-menu-legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 2px 10px 6px;
  color: #7d728c;
  font-size: 11px;
  font-weight: 600;
  text-align: center;
  line-height: 1.35;
}
.main-menu-legal-row {
  display: contents;
}
.main-menu-legal a {
  color: inherit;
  text-decoration: none;
}
.main-menu-legal a:hover { color: var(--muted); }

main { position: relative; z-index: 1; min-height: calc(100vh - 88px); padding: 0 24px 70px; }

.swap-shell {
  position: absolute;
  z-index: 3;
  top: 82px;
  left: 50%;
  width: min(calc(100% - 32px), 456px);
  margin: 0;
  opacity: .31;
  filter: saturate(.55) blur(.35px);
  clip-path: inset(0 0 51% 0 round 25px);
  transform: translateX(-50%) translateY(18px) scale(.985);
  transform-origin: 50% 10%;
  transition:
    top .9s cubic-bezier(.16,1,.3,1),
    opacity .72s ease,
    transform .9s cubic-bezier(.16,1,.3,1),
    filter .72s ease,
    clip-path .95s cubic-bezier(.16,1,.3,1);
  cursor: pointer;
}
body:not(.app-ready) .swap-shell:hover { opacity: .58; filter: saturate(.8) blur(0); clip-path: inset(0 0 40% 0 round 25px); transform: translateX(-50%) translateY(-2px) scale(1.018); }
.release-pill {
  display: flex;
  width: fit-content;
  align-items: center;
  gap: 9px;
  margin: 0 auto 22px;
  padding: 7px 15px 7px 8px;
  color: var(--muted);
  border: 1px solid rgba(181,119,255,.12);
  border-radius: var(--radius-pill);
  background: rgba(71,32,104,.35);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease, color .2s ease, transform .2s ease;
}
.release-pill:hover {
  background: rgba(91, 42, 128, .5);
  border-color: rgba(181,119,255,.22);
  transform: translateY(-1px);
}
.release-pill.is-active {
  color: var(--text);
  border-color: rgba(181,119,255,.28);
  background: rgba(91, 42, 128, .55);
}
.release-pill-text { text-decoration: none; }
.release-pill.is-active .release-pill-text { text-decoration: underline; text-underline-offset: 3px; }
.release-icon { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--surface-3); color: #b782ff; font-weight: 800; }

.swap-card { position: relative; display: flex; flex-direction: column; padding: 18px; border: 1px solid rgba(255,255,255,.025); border-radius: var(--radius-card); background: var(--surface); box-shadow: var(--shadow); }
.card-topline { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.tabs { display: flex; align-items: center; gap: 3px; }
.tabs[hidden],
.advanced-panel[hidden],
.quotes-panel[hidden] { display: none !important; }
.tab { border: 0; border-radius: var(--radius-button); padding: 12px 14px; color: var(--muted); background: transparent; font-weight: 700; cursor: pointer; transition: background .2s ease, color .2s ease, transform .2s ease; }
.tab:hover { transform: translateY(-1px); }
.tab.active { background: rgba(255,255,255,.075); color: var(--text); }
.settings { display: grid; place-items: center; width: 40px; height: 40px; padding: 8px; color: var(--text); }
.settings iconify-icon { color: inherit; display: block; }

.asset-panel { min-height: 112px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 17px; border-radius: 15px; background: var(--surface-2); border: 1px solid rgba(255,255,255,.018); }
.asset-panel > div { display: grid; gap: 5px; }
.asset-label { color: var(--muted); font-size: 14px; font-weight: 700; }
.asset-panel input, .asset-panel output { width: 170px; padding: 0; color: var(--text); border: 0; outline: 0; background: transparent; font-size: 31px; font-weight: 600; line-height: 1.15; }
.usd-value { color: var(--muted-2); font-size: 13px; font-weight: 600; }
.asset-button { display: flex; align-items: center; gap: 8px; min-width: 116px; justify-content: center; padding: 11px 13px; border-radius: var(--radius-pill); background: rgba(101, 60, 162, .48); font-weight: 700; transition: background .2s ease, transform .2s ease; }
.asset-button:hover { transform: scale(1.03); background: rgba(101, 60, 162, .7); }
.select-placeholder { min-width: 105px; padding-left: 10px; gap: 8px; }
.select-search {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
}
.token-bubbles { position: relative; width: 28px; height: 24px; margin-right: -2px; }
.token-bubbles i {
  position: absolute;
  top: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(18, 10, 30, .55);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.08);
}
.token-bubbles i:first-child { left: 0; z-index: 1; }
.token-bubbles i:last-child { left: 10px; top: 6px; width: 16px; height: 16px; z-index: 0; background: rgba(18, 10, 30, .4); }
.token { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; font-size: 12px; }
.token-eth { background: #6f7bea; }
.token-usdc { background: #2775ca; }

.flip-button { position: relative; z-index: 2; display: grid; place-items: center; width: 48px; height: 48px; margin: -10px auto; border: 6px solid var(--surface); border-radius: 50%; background: var(--surface-2); color: var(--text); transition: transform .35s cubic-bezier(.2,.8,.2,1), background .2s ease; }
.flip-button:hover { transform: rotate(180deg); background: var(--surface-3); }
.flip-button iconify-icon { color: inherit; display: block; }

.primary-row { display: flex; gap: 12px; margin-top: 18px; }

.private-dest {
  margin-top: 14px;
}

.private-dest[hidden] {
  display: none !important;
}

.private-dest-card {
  display: grid;
  gap: 14px;
  width: 100%;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.018);
  border-radius: 16px;
  background: var(--surface-2);
  text-align: left;
  cursor: pointer;
  transition: background .18s ease, transform .18s ease;
}

.private-dest-card:hover {
  transform: translateY(-1px);
  background: var(--surface-3);
}

.private-dest-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.private-dest-label {
  color: var(--text);
  font-size: 15px;
  font-weight: 700;
}

.private-dest-required {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 26px;
  padding: 3px 10px 3px 8px;
  border-radius: 999px;
  background: rgba(255, 193, 7, 0.18);
  color: #f0b429;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.private-dest-required[hidden] {
  display: none !important;
}

.private-dest-required iconify-icon {
  color: inherit;
  display: block;
}

.private-dest-field {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 28px;
}

.private-dest-icon {
  position: relative;
  flex: 0 0 auto;
  width: 28px;
  height: 24px;
}

.private-dest-icon i {
  position: absolute;
  top: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.private-dest-icon i:first-child {
  left: 0;
  z-index: 1;
}

.private-dest-icon i:last-child {
  left: 10px;
  top: 6px;
  width: 16px;
  height: 16px;
  z-index: 0;
  background: rgba(255, 255, 255, 0.08);
}

.private-dest-value {
  flex: 1;
  min-width: 0;
  color: var(--text);
  font-size: 16px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.private-dest-value.is-placeholder {
  color: var(--muted-2);
  font-weight: 500;
}

.swap-card[data-mode="private"] .wallet-button {
  display: none;
}

.swap-card[data-mode="private"] .primary-button {
  width: 100%;
}
.primary-button { flex: 1; min-height: 54px; border-radius: var(--radius-pill); font-size: 16px; }
.wallet-button { display: grid; place-items: center; width: 54px; flex: 0 0 54px; border-radius: 50%; background: var(--surface-3); color: var(--text); transition: transform .2s ease, background .2s ease; }
.wallet-button:hover { transform: translateY(-2px); background: color-mix(in srgb, var(--surface-3) 80%, var(--text) 8%); }
.wallet-button iconify-icon { color: inherit; display: block; }

.settings-panel[hidden],
.send-wallet-panel[hidden],
.swap-card-main[hidden],
.token-picker[hidden],
.network-panel[hidden],
.token-detail[hidden] { display: none !important; }

.settings-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 480px;
}

.settings-header {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 44px;
  margin-bottom: 4px;
}

.settings-back {
  position: absolute;
  left: 0;
  top: 50%;
  translate: 0 -50%;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: transparent;
  cursor: pointer;
  color: inherit;
}

.settings-back:hover { background: rgba(255,255,255,.06); }
.settings-back iconify-icon { color: inherit; display: block; }

.settings-title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -.02em;
}

.settings-list {
  display: grid;
  gap: 10px;
}

.settings-row,
.settings-row-static {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 56px;
  padding: 14px 16px;
  border: 0;
  border-radius: var(--radius-row);
  background: var(--surface-2);
  color: inherit;
  text-align: left;
  font: inherit;
  cursor: pointer;
  transition: background .18s ease;
}

.settings-row:hover { background: #302043; }
.settings-row-static { cursor: default; }

.settings-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  font-size: 15px;
  font-weight: 650;
}

.settings-icon {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  color: #f2eaf8;
}

.settings-icon iconify-icon {
  color: inherit;
  display: block;
}

.settings-value {
  color: #f7f2fb;
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
}

.settings-toggle {
  position: relative;
  width: 46px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: #3a2a4f;
  cursor: pointer;
  transition: background .2s ease;
  flex: 0 0 auto;
}

.settings-toggle::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #d9cfea;
  transition: transform .2s ease, background .2s ease;
}

.settings-toggle[aria-checked="true"] {
  background: var(--primary);
}

.settings-toggle[aria-checked="true"]::after {
  transform: translateX(18px);
  background: #fff;
}

.send-wallet-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 480px;
}

.send-wallet-view[hidden] { display: none !important; }

.send-wallet-box {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
  border: 1px solid transparent;
  border-radius: 18px;
  background: var(--surface-2);
  transition: border-color .18s ease;
}

.send-wallet-box.is-error {
  border-color: #e57373;
}

.send-wallet-box input {
  width: 100%;
  min-height: 44px;
  padding: 0 6px;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  outline: none;
}

.send-wallet-box input::placeholder {
  color: var(--muted-2);
  font-weight: 500;
}

.send-wallet-error {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: #e57373;
  font-size: 13px;
  font-weight: 600;
}

.send-wallet-error[hidden] { display: none !important; }

.send-wallet-error iconify-icon {
  color: inherit;
  flex: 0 0 auto;
}

.send-wallet-actions {
  display: flex;
  gap: 10px;
}

.send-wallet-done {
  flex: 1;
  min-height: 48px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background .18s ease, transform .18s ease;
}

.send-wallet-done:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.12);
}

.send-wallet-bookmark-btn {
  display: grid;
  place-items: center;
  width: 48px;
  flex: 0 0 48px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  cursor: pointer;
  transition: background .18s ease, transform .18s ease;
}

.send-wallet-bookmark-btn:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.12);
}

.send-wallet-bookmark-btn iconify-icon {
  color: inherit;
  display: block;
}

.send-wallet-menu {
  display: grid;
  gap: 10px;
  margin-top: 4px;
}

.send-wallet-menu-row {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 56px;
  padding: 14px 16px;
  border: 0;
  border-radius: var(--radius-row);
  background: var(--surface-2);
  color: var(--text);
  text-align: left;
  font: inherit;
  font-size: 15px;
  font-weight: 650;
  cursor: pointer;
  transition: background .18s ease;
}

.send-wallet-menu-row:hover {
  background: #302043;
}

.send-wallet-menu-icon {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  color: inherit;
}

.send-wallet-menu-icon iconify-icon {
  color: inherit;
  display: block;
}

.send-wallet-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 320px;
  padding: 24px 20px;
  text-align: center;
  color: var(--text);
}

.send-wallet-empty iconify-icon {
  color: var(--text);
  margin-bottom: 8px;
}

.send-wallet-empty strong {
  font-size: 18px;
  font-weight: 700;
}

.send-wallet-empty p {
  margin: 0;
  max-width: 280px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.45;
}

.swap-shell[data-panel="settings"] .release-pill,
.swap-shell[data-panel="send-wallet"] .release-pill {
  opacity: 0;
  pointer-events: none;
  height: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
}

.swap-shell[data-panel="settings"] .quotes-panel,
.swap-shell[data-panel="send-wallet"] .quotes-panel {
  display: none !important;
}

.swap-shell[data-panel="settings"],
.swap-shell[data-panel="send-wallet"] {
  display: block;
  width: min(520px, calc(100vw - 48px));
  grid-template-columns: none;
}

.swap-shell[data-panel="settings"] .view-switcher,
.swap-shell[data-panel="send-wallet"] .view-switcher {
  top: 0;
  left: -62px;
}

.advanced-panel {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}
.advanced-panel[hidden] { display: none; }
.advanced-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--surface-2);
  border: 1px solid rgba(255,255,255,.03);
}
.advanced-label { color: var(--text); font-size: 14px; font-weight: 700; }
.slippage-group { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.slippage-chip {
  border: 0;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--text);
  background: rgba(255,255,255,.06);
  font-size: 13px;
  font-weight: 650;
  transition: background .18s ease, transform .18s ease;
}
.slippage-chip:hover { transform: translateY(-1px); background: rgba(255,255,255,.1); }
.slippage-chip.active { background: rgba(130, 80, 210, .45); color: #fff; }
.slippage-custom {
  width: 78px;
  padding: 7px 10px;
  border: 0;
  border-radius: 999px;
  color: var(--text);
  background: rgba(255,255,255,.06);
  font-size: 12px;
  font-weight: 650;
  outline: 0;
}
.slippage-custom::placeholder { color: var(--muted); }
.slippage-custom:focus {
  background: rgba(130, 80, 210, .35);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.12);
}
.slippage-custom.is-active {
  background: rgba(130, 80, 210, .45);
  color: #fff;
}
.exchanges-value {
  border: 0;
  cursor: pointer;
  padding: 0;
  color: var(--muted);
  background: none;
  font-size: 14px;
  font-weight: 650;
}
.exchanges-value:hover { color: var(--text); }

.quotes-panel {
  position: absolute;
  top: 0;
  left: calc(100% + 20px);
  display: flex;
  flex-direction: column;
  width: min(483px, 46vw);
  min-height: 540px;
  padding: 0;
  border-radius: var(--radius-card);
  background: var(--surface);
  border: 1px solid rgba(255,255,255,.04);
  box-shadow: var(--shadow);
  overflow: hidden;
  color: var(--text);
}
.quotes-panel[hidden] { display: none !important; }
.quotes-body {
  position: relative;
  z-index: 2;
  padding: 32px 40px 12px;
}
.quotes-features {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 20px;
  align-items: start;
}
.quotes-feature {
  display: grid;
  gap: 12px;
  justify-items: start;
}
.quotes-feature-icon {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  color: #b07cff;
}
.quotes-feature-icon svg,
.quotes-feature-icon iconify-icon {
  color: inherit;
  display: block;
}
.quotes-feature strong {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.25;
  color: var(--text);
}
.quotes-divider {
  width: 1px;
  align-self: stretch;
  min-height: 72px;
  margin-top: 4px;
  background: rgba(255,255,255,.12);
}
.quotes-copy {
  margin: 20px 0 0;
  max-width: 38ch;
  color: var(--muted);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.5;
}
.quotes-art {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 360px;
  min-height: 0;
  margin-top: auto;
  overflow: hidden;
  pointer-events: none;
}
.quotes-art::before {
  content: "";
  position: absolute;
  bottom: -100%;
  left: 40px;
  z-index: 0;
  width: 483px;
  height: 286px;
  background: url("assets/advanced-routes-placeholder-bg.svg") center / contain no-repeat;
  transform: scale(3.5);
  pointer-events: none;
}
.quotes-art-logo {
  position: absolute;
  bottom: -25%;
  left: 0;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  transform: scale(1.5);
  pointer-events: none;
  user-select: none;
}
body[data-theme="light"] .quotes-panel {
  background: #ffffff;
  border-color: rgba(80, 40, 120, 0.06);
}
body[data-theme="light"] .quotes-feature-icon { color: #7a49c9; }
body[data-theme="light"] .quotes-divider { background: rgba(80, 40, 120, 0.12); }
body[data-theme="light"] .quotes-copy { color: #5f4d73; }

.theme-menu-icon {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  color: inherit;
}
.theme-menu-icon iconify-icon {
  color: inherit;
  display: block;
}

.swap-stage { position: relative; }

.view-switcher {
  position: absolute;
  top: 0;
  left: -62px;
  z-index: 4;
  display: grid;
  padding: 4px;
  gap: 4px;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--surface);
  box-shadow: var(--shadow-low);
  opacity: 0;
  transform: translateX(18px);
  transition: opacity .55s .4s ease, transform .65s .38s cubic-bezier(.16,1,.3,1);
}
.view-mode {
  position: relative;
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: inherit;
  background: transparent;
  cursor: pointer;
  transition: background .2s ease;
}
.view-mode.active { background: rgba(255,255,255,.08); }
.view-mode iconify-icon { color: var(--text); display: block; }

.view-switcher-tooltip {
  position: absolute;
  right: calc(100% + 14px);
  top: 50%;
  transform: translateY(-50%) scale(.95);
  padding: 7px 14px;
  background: #000;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  border-radius: 12px;
  pointer-events: none;
  opacity: 0;
  transition: opacity .2s ease, transform .2s ease;
  white-space: nowrap;
  box-shadow: 0 8px 20px rgba(0,0,0,.4);
}
.view-switcher-tooltip::after {
  content: "";
  position: absolute;
  left: 100%;
  top: 50%;
  transform: translateY(-50%);
  border-width: 5px;
  border-style: solid;
  border-color: transparent transparent transparent #000;
}
.view-mode:not(.active):hover .view-switcher-tooltip { opacity: 1; transform: translateY(-50%) scale(1); }

.tabs-advanced { gap: 2px; flex-wrap: nowrap; }
.tabs-advanced .tab { padding: 10px 9px; font-size: 13px; white-space: nowrap; }
.slippage-chip { padding: 7px 10px; font-size: 12px; }
.swap-shell[data-view="advanced"] .release-pill {
  grid-column: 1;
  grid-row: 1;
  margin: 0 0 16px;
  justify-self: center;
}
.swap-shell[data-view="advanced"] {
  display: grid;
  grid-template-columns: min(456px, calc(100vw - 120px));
  align-items: start;
  column-gap: 24px;
  row-gap: 0;
  width: max-content;
  max-width: calc(100vw - 48px);
}
.swap-shell[data-view="advanced"][data-quotes="open"] {
  grid-template-columns: min(456px, calc(100vw - 140px)) min(528px, 50vw);
  align-items: stretch;
}
.swap-shell[data-view="advanced"] .swap-stage {
  grid-column: 1;
  grid-row: 2;
  align-self: start;
}
.swap-shell[data-view="advanced"] .swap-card {
  width: 100%;
}
.swap-shell[data-view="advanced"] .quotes-panel {
  position: relative;
  top: auto;
  left: auto;
  width: 100%;
  height: 0;
  min-height: 100%;
  grid-column: 2;
  grid-row: 2;
  align-self: stretch;
}
.swap-shell[data-view="advanced"] .quotes-art {
  flex: 1 1 auto;
  height: auto;
  min-height: 200px;
}
.swap-shell[data-view="advanced"][data-quotes="closed"] .quotes-panel {
  display: none !important;
}
.swap-shell[data-view="advanced"] .view-switcher {
  top: 0;
  left: -62px;
}
body.app-ready .swap-shell[data-view="advanced"] {
  clip-path: none;
  transform: translateX(-50%) translateY(0) scale(1);
}

.swap-shell[data-view][data-panel="settings"],
.swap-shell[data-panel="settings"],
.swap-shell[data-view][data-panel="send-wallet"],
.swap-shell[data-panel="send-wallet"] {
  position: fixed !important;
  left: 50% !important;
  top: 108px !important;
  display: block !important;
  width: min(416px, calc(100vw - 48px)) !important;
  max-width: min(416px, calc(100vw - 48px)) !important;
  margin: 0 !important;
  grid-template-columns: none !important;
  gap: 0;
  transform: translateX(-50%) !important;
  clip-path: none !important;
  transition: none !important;
  z-index: 25;
}

body.app-ready .swap-shell[data-view][data-panel="settings"],
body.app-ready .swap-shell[data-panel="settings"],
body:not(.app-ready) .swap-shell[data-panel="settings"],
body.app-ready .swap-shell[data-view][data-panel="send-wallet"],
body.app-ready .swap-shell[data-panel="send-wallet"],
body:not(.app-ready) .swap-shell[data-panel="send-wallet"] {
  top: 108px !important;
  transform: translateX(-50%) !important;
  opacity: 1 !important;
  filter: none !important;
  transition: none !important;
}

.swap-shell[data-panel="settings"] .quotes-panel,
.swap-shell[data-panel="send-wallet"] .quotes-panel {
  display: none !important;
}

.swap-shell[data-panel="settings"] .view-switcher,
.swap-shell[data-panel="send-wallet"] .view-switcher {
  top: 0;
  left: -62px;
  opacity: 1 !important;
  transform: none !important;
}

.welcome {
  position: fixed;
  z-index: 10;
  inset: 88px 0 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: clamp(265px, 33vh, 325px) 22px 38px;
  background: transparent;
  text-align: center;
  transition: opacity .48s ease, visibility .48s ease;
}

.welcome::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(ellipse 52% 30% at 50% 26%, rgba(22, 14, 36, 0.72), transparent 70%);
}

.hero-copy {
  position: relative;
  isolation: isolate;
  transform: translateY(12px);
  animation: heroIn .85s .1s cubic-bezier(.16,1,.3,1) both;
}

.hero-spray {
  position: absolute;
  left: 50%;
  top: 40%;
  z-index: -1;
  width: min(680px, 120%);
  height: 200px;
  transform: translate(-50%, -50%);
  pointer-events: none;
  /* Soft fog to hide the swap card — not a neon glow */
  background: radial-gradient(
    ellipse 58% 52% at 50% 48%,
    rgba(16, 10, 28, 0.88) 0%,
    rgba(18, 12, 32, 0.55) 42%,
    transparent 72%
  );
  filter: blur(22px);
  opacity: 1;
}

h1 { max-width: 860px; margin: 0; font-family: var(--font-display); font-size: clamp(52px, 5.2vw, 64px); line-height: 1; letter-spacing: -.055em; font-weight: 700; position: relative; }
h1 span { color: transparent; background: linear-gradient(90deg, #b77cff 0%, #f13cda 100%); background-clip: text; -webkit-background-clip: text; }
.hero-copy p { position: relative; margin: 16px 0 0; color: var(--muted); font-size: clamp(18px, 2vw, 25px); font-weight: 600; letter-spacing: -.025em; }
.hero-copy a { color: white; text-decoration: none; font-weight: 800; }

.stats { display: flex; justify-content: center; gap: 16px; margin: 38px 0 0; animation: heroIn .8s .25s both; }
.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 136px;
  height: 120px;
  border: 0;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: rgba(0, 0, 0, 0.04) 0 2px 4px, rgba(0, 0, 0, 0.08) 0 8px 16px;
  cursor: pointer;
  font: inherit;
  color: inherit;
  transition: transform .2s ease, background .2s ease;
}
.stat:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.1);
}
.stat:focus-visible {
  outline: 2px solid rgba(167, 120, 255, 0.7);
  outline-offset: 3px;
}
.stat strong {
  font-size: 32px;
  font-weight: 700;
  line-height: 1;
  color: #fff;
}
.stat span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 16px;
  font-weight: 400;
}

.get-started { display: flex; align-items: center; justify-content: center; gap: 10px; width: min(310px, 75vw); min-height: 58px; margin-top: 36px; border-radius: var(--radius-pill); font-size: 17px; animation: heroIn .8s .38s both; }
.get-started iconify-icon { width: 0; opacity: 0; overflow: hidden; color: inherit; transition: width .25s ease, opacity .25s ease; }
.get-started:hover iconify-icon { width: 22px; opacity: 1; }

.welcome.is-closing { opacity: 0; visibility: hidden; pointer-events: none; transition-delay: .12s; }
.welcome.is-closing .hero-copy { transform: translateY(26px) scale(.97); filter: blur(8px); opacity: 0; transition: transform .5s ease, filter .45s ease, opacity .35s ease; }
.welcome.is-closing .stats { transform: translateY(54px) scale(.97); filter: blur(7px); opacity: 0; transition: .42s ease; }
.welcome.is-closing .get-started { transform: translateY(42px) scale(.96); filter: blur(6px); opacity: 0; transition: .38s ease; }

body.app-ready .swap-shell { top: 34px; opacity: 1; transform: translateX(-50%) translateY(0) scale(1); filter: none; clip-path: inset(-90px -90px -90px -220px round 25px); }
body.app-ready .swap-shell[data-panel="settings"],
body.app-ready .swap-shell[data-panel="send-wallet"] {
  top: 108px !important;
  transform: translateX(-50%) !important;
  clip-path: none !important;
  transition: none !important;
}
body.app-ready .view-switcher { opacity: 1; transform: translateX(0); }
body.app-ready .swap-shell { cursor: default; }

.welcome { pointer-events: none; }
.hero-copy, .stats, .get-started { pointer-events: auto; }

.toast { position: fixed; z-index: 40; left: 50%; bottom: 24px; translate: -50% 20px; padding: 12px 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: .3s ease; font-size: 14px; font-weight: 600; }
.toast.show { translate: -50% 0; opacity: 1; }

/* —— Wallet connect modal (Jumper-style) —— */
body.wallet-modal-open { overflow: hidden; }

.wallet-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease;
}
.wallet-modal[hidden] { display: none !important; }
.wallet-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.wallet-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 6, 20, 0.55);
  backdrop-filter: blur(10px);
}

.wallet-modal-panel {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: min(400px, 100%);
  max-height: min(620px, calc(100vh - 48px));
  padding: 16px 14px 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  background: linear-gradient(180deg, #2a1b3d 0%, #1e1430 48%, #181026 100%);
  box-shadow:
    0 0 0 1px rgba(167, 120, 255, 0.08),
    0 24px 80px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  animation: walletModalIn .22s cubic-bezier(.16, 1, .3, 1) both;
}
.wallet-modal-panel.is-busy {
  opacity: 1;
}
.wallet-modal-panel.is-busy .wallet-eco-list,
.wallet-modal-panel.is-busy .wallet-modal-list {
  pointer-events: none;
}

@keyframes walletModalIn {
  from { opacity: 0; transform: translateY(12px) scale(.97); }
  to { opacity: 1; transform: none; }
}

.wallet-modal-header {
  display: grid;
  grid-template-columns: 40px 1fr 40px;
  align-items: center;
  margin-bottom: 14px;
  min-height: 40px;
}

.wallet-modal-title {
  margin: 0;
  text-align: center;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.wallet-modal-back,
.wallet-modal-close {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition: background .15s ease;
}
.wallet-modal-back:hover,
.wallet-modal-close:hover {
  background: rgba(255, 255, 255, 0.06);
}
.wallet-modal-back[hidden] { visibility: hidden; pointer-events: none; }

.wallet-modal-body {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.wallet-modal-view {
  display: flex;
  flex-direction: column;
  min-height: 0;
  max-height: min(520px, calc(100vh - 160px));
}
.wallet-modal-view[hidden] {
  display: none !important;
}

.wallet-modal-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  padding: 2px 4px 2px 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.35) transparent;
}
.wallet-modal-list::-webkit-scrollbar { width: 6px; }
.wallet-modal-list::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,.28);
  border-radius: 999px;
}

.wallet-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 60px;
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  cursor: pointer;
  text-align: left;
  transition: background .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.wallet-row:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(180, 130, 255, 0.22);
  box-shadow: 0 8px 24px rgba(101, 60, 162, 0.18);
}

.wallet-row-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.wallet-row-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  background: transparent;
  flex: 0 0 auto;
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
}
.wallet-row-icon.is-round { border-radius: 50%; }

.wallet-eco-hero-icon,
.wallet-connecting-icon {
  border-radius: 50%;
  object-fit: cover;
  background: transparent;
}

.wallet-row-name {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
}

.wallet-row-badge {
  flex: 0 0 auto;
  padding: 6px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #e8dff5;
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
}

.wallet-eco-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 12px 16px 20px;
  text-align: center;
  flex: 0 0 auto;
}
.wallet-eco-hero-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
}
.wallet-eco-text {
  margin: 0;
  max-width: 300px;
  color: #d7cbeb;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.45;
}

.wallet-eco-list {
  flex: 1 1 auto;
}

.wallet-connecting {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 340px;
  padding: 28px 20px 36px;
  text-align: center;
}
.wallet-connecting-icon {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.35);
  animation: walletPulse 1.6s ease-in-out infinite;
}
.wallet-connecting-title {
  margin: 8px 0 0;
  color: #fff;
  font-size: 20px;
  font-weight: 700;
}
.wallet-connecting-hint {
  margin: 0;
  max-width: 280px;
  color: #d7cbeb;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.45;
}

@keyframes walletPulse {
  0%, 100% { transform: scale(1); filter: brightness(1); }
  50% { transform: scale(1.04); filter: brightness(1.08); }
}

.connect-mini.is-connected,
#connectWallet.is-connected {
  letter-spacing: -0.01em;
}

body[data-theme="light"] .wallet-modal-backdrop {
  background: rgba(40, 20, 70, 0.28);
}
body[data-theme="light"] .wallet-modal-panel {
  border-color: rgba(80, 40, 120, 0.08);
  background: #f4f1f7;
  box-shadow: 0 24px 70px rgba(60, 30, 100, 0.18);
}
body[data-theme="light"] .wallet-modal-back:hover,
body[data-theme="light"] .wallet-modal-close:hover {
  background: rgba(80, 40, 120, 0.06);
}
body[data-theme="light"] .wallet-modal-title {
  color: #241433;
}
body[data-theme="light"] .wallet-modal-back,
body[data-theme="light"] .wallet-modal-close {
  color: #241433;
}
body[data-theme="light"] .wallet-row {
  background: #ffffff;
}
body[data-theme="light"] .wallet-row:hover {
  background: #ffffff;
  box-shadow: 0 4px 16px rgba(80, 40, 140, 0.08);
}
body[data-theme="light"] .wallet-row-name {
  color: #241433;
}
body[data-theme="light"] .wallet-row-badge {
  background: #ece8f1;
  color: #4a3a5c;
}
body[data-theme="light"] .wallet-modal-list {
  scrollbar-color: #3a3a3a transparent;
}
body[data-theme="light"] .wallet-modal-list::-webkit-scrollbar-thumb {
  background: #3a3a3a;
}
body[data-theme="light"] .wallet-eco-text {
  color: #3a2a4f;
}
body[data-theme="light"] .wallet-connecting-title {
  color: #241433;
}
body[data-theme="light"] .wallet-connecting-hint {
  color: #5f4d73;
}


@keyframes heroIn { from { opacity: 0; transform: translateY(34px) scale(.97); filter: blur(8px); } to { opacity: 1; transform: translateY(12px); filter: blur(0); } }

/* Portfolio View — glow sits behind the stats cards */
.portfolio-view {
  position: fixed;
  z-index: 10;
  inset: 88px 0 0;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: clamp(160px, 24vh, 280px) 24px 48px;
  text-align: center;
  background: transparent;
  overflow: visible;
}
.portfolio-view[hidden] {
  display: none;
}

.portfolio-ghost {
  position: absolute;
  left: 50%;
  /* Tops of ghost panels sit behind the hero heading — like Jumper */
  top: clamp(130px, 20vh, 250px);
  z-index: 0;
  display: grid;
  grid-template-columns: minmax(240px, 340px) minmax(280px, 420px);
  gap: 18px;
  width: min(820px, 92vw);
  translate: -50% 0;
  opacity: .32;
  filter: blur(1.5px);
  pointer-events: none;
  mask-image: linear-gradient(180deg, rgba(0,0,0,.7) 0%, rgba(0,0,0,.75) 28%, rgba(0,0,0,.45) 58%, transparent 90%);
  -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,.7) 0%, rgba(0,0,0,.75) 28%, rgba(0,0,0,.45) 58%, transparent 90%);
}
.portfolio-ghost-panel {
  min-height: 280px;
  padding: 18px 18px 22px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 22px;
  background: rgba(40, 26, 62, 0.65);
}
.portfolio-ghost-title {
  display: block;
  margin-bottom: 18px;
  color: rgba(219, 207, 237, 0.55);
  font-size: 15px;
  font-weight: 650;
  text-align: left;
}
.portfolio-ghost-lines {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}
.portfolio-ghost-lines i {
  display: block;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}
.portfolio-ghost-lines i:nth-child(1) { width: 72%; }
.portfolio-ghost-lines i:nth-child(2) { width: 54%; }
.portfolio-ghost-lines i:nth-child(3) { width: 64%; }
.portfolio-ghost-lines i:nth-child(4) { width: 40%; }
.portfolio-ghost-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.portfolio-ghost-cards span {
  display: block;
  height: 64px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
}
.portfolio-ghost-tabs {
  display: flex;
  gap: 18px;
  margin-bottom: 18px;
  color: rgba(219, 207, 237, 0.42);
  font-size: 13px;
  font-weight: 600;
  text-align: left;
}
.portfolio-ghost-tabs .is-active {
  color: rgba(255, 255, 255, 0.55);
}
.portfolio-ghost-chart {
  height: 120px;
  margin-bottom: 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
}
.portfolio-ghost-rows {
  display: grid;
  gap: 10px;
}
.portfolio-ghost-rows i {
  display: block;
  height: 28px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
}
.portfolio-ghost-rows i:nth-child(2) { width: 88%; }
.portfolio-ghost-rows i:nth-child(3) { width: 74%; }

.portfolio-hero {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(625px, 100%);
  padding: 0;
  background: none;
  border-radius: 0;
  box-shadow: none;
  animation: heroIn .7s cubic-bezier(.16, 1, .3, 1) both;
}

.portfolio-heading {
  margin: 0;
  max-width: 100%;
  font-family: var(--font-body);
  font-size: 32px;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: normal;
  color: #fff;
  background: none;
}
.portfolio-heading .portfolio-accent {
  color: transparent;
  background: linear-gradient(90deg, #dbcfed 0%, #d35cff 100%);
  background-clip: text;
  -webkit-background-clip: text;
}
.portfolio-subheading {
  margin: 8px 0 0;
  font-size: 24px;
  font-weight: 400;
  line-height: 1.4;
  color: var(--muted);
}

.portfolio-stage {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 36px;
  width: 100%;
  isolation: isolate;
}

/* Subtle backlight — dark theme only, low intensity like Jumper */
.portfolio-glow {
  position: absolute;
  left: 50%;
  top: 38%;
  z-index: 0;
  width: min(720px, 110vw);
  height: min(720px, 110vw);
  max-width: 720px;
  max-height: 720px;
  translate: -50% -50%;
  pointer-events: none;
  background: radial-gradient(50% 50% at 50% 50%, #653ca2 0%, rgba(101, 60, 162, 0) 100%);
  opacity: .38;
}

.portfolio-stats {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  gap: 16px;
  margin: 0;
}
.portfolio-stat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 136px;
  height: 120px;
  border: 0;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: rgba(0, 0, 0, 0.04) 0 2px 4px, rgba(0, 0, 0, 0.08) 0 8px 16px;
  cursor: pointer;
  font: inherit;
  color: inherit;
  transition: transform .2s ease, background .2s ease;
}
.portfolio-stat-card:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.1);
}
.portfolio-stat-card:focus-visible {
  outline: 2px solid rgba(167, 120, 255, 0.7);
  outline-offset: 3px;
}
.portfolio-stat-card strong {
  font-size: 32px;
  font-weight: 700;
  line-height: 1;
  color: #fff;
}
.portfolio-stat-card span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 16px;
  font-weight: 400;
}

.portfolio-btn {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 32px;
  padding: 14px 22px;
  min-height: 48px;
  border: 0;
  border-radius: var(--radius-pill);
  font-size: 16px;
  font-weight: 700;
  color: var(--text-cta);
  background: var(--primary);
  cursor: pointer;
  transition: transform .25s ease, filter .25s ease;
}
.portfolio-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
}

/* —— Portfolio catalog modal (Chains / Bridges / DEXs) —— */
body.catalog-modal-open { overflow: hidden; }

.catalog-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 24px 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease;
}

.catalog-modal[hidden] { display: none !important; }

.catalog-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.catalog-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 6, 20, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.catalog-modal-panel {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: min(720px, 100%);
  max-height: min(640px, calc(100vh - 48px));
  padding: 18px 8px 12px 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  background: #1a1428;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
  animation: catalogModalIn .22s cubic-bezier(.16, 1, .3, 1) both;
}

@keyframes catalogModalIn {
  from { opacity: 0; transform: translateY(10px) scale(.98); }
  to { opacity: 1; transform: none; }
}

.catalog-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 10px 14px 4px;
}

.catalog-modal-title {
  margin: 0;
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
}

.catalog-modal-close {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #fff;
  cursor: pointer;
  transition: background .18s ease;
}

.catalog-modal-close:hover {
  background: rgba(255, 255, 255, 0.08);
}

.catalog-modal-body {
  position: relative;
  overflow: hidden;
  min-height: 220px;
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px 6px;
  max-height: min(520px, calc(100vh - 160px));
  padding: 0 10px 8px 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.28) transparent;
}

.catalog-grid::-webkit-scrollbar { width: 6px; }
.catalog-grid::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
}

.catalog-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 10px 4px 12px;
  border: 0;
  background: transparent;
  color: #fff;
  text-align: center;
  pointer-events: none;
  user-select: none;
}

.catalog-item-logo {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.catalog-item-logo.is-fallback {
  display: grid;
  place-items: center;
  font-size: 16px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.75);
}

.catalog-item-name {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  max-width: 100%;
  min-height: 2.4em;
  color: rgba(255, 255, 255, 0.92);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  word-break: break-word;
}

.catalog-status {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.catalog-status[hidden] { display: none !important; }

@media (max-width: 720px) {
  .catalog-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .catalog-item-logo { width: 42px; height: 42px; }
}

@media (max-width: 480px) {
  .catalog-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .catalog-modal-panel { padding: 16px 6px 10px 12px; }
}

body[data-theme="light"] .catalog-modal-backdrop {
  background: rgba(40, 24, 70, 0.28);
}

body[data-theme="light"] .catalog-modal-panel {
  border-color: rgba(80, 40, 120, 0.08);
  background: #ffffff;
  box-shadow: 0 24px 64px rgba(60, 30, 100, 0.18);
}

body[data-theme="light"] .catalog-modal-title,
body[data-theme="light"] .catalog-modal-close {
  color: #241433;
}

body[data-theme="light"] .catalog-modal-close:hover {
  background: rgba(101, 60, 162, 0.08);
}

body[data-theme="light"] .catalog-item-name {
  color: #241433;
}

body[data-theme="light"] .catalog-item-logo {
  background: #f3edf8;
  box-shadow: inset 0 0 0 1px rgba(80, 40, 120, 0.06);
}

body[data-theme="light"] .catalog-item-logo.is-fallback {
  color: #653ca2;
}

body[data-theme="light"] .catalog-grid {
  scrollbar-color: rgba(80, 40, 120, 0.28) transparent;
}

body[data-theme="light"] .catalog-grid::-webkit-scrollbar-thumb {
  background: rgba(80, 40, 120, 0.28);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Earn View */
.earn-view {
  position: relative;
  z-index: 10;
  width: min(1080px, 100%);
  margin: 0 auto;
  padding: 8px 0 96px;
  font-family: var(--font-body);
}
.earn-view[hidden] { display: none; }
.earn-view::before,
.earn-view::after {
  content: "";
  position: fixed;
  z-index: -1;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(90px);
  opacity: .45;
}
.earn-view::before {
  left: -180px;
  top: 28%;
  background: #653ca2;
}
.earn-view::after {
  right: -200px;
  top: 48%;
  background: #8147e5;
}

.earn-featured {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 16px;
  margin-bottom: 16px;
}
.earn-promo {
  display: flex;
  flex-direction: column;
  min-height: 280px;
  padding: 24px;
  border: 0;
  border-radius: 24px;
  background: var(--surface-2);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}
.earn-promo-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.earn-tag {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(101, 60, 162, 0.28);
  color: #dbcfed;
  font-size: 12px;
  font-weight: 650;
}
.earn-promo-title {
  margin: 18px 0 0;
  font-family: var(--font-display);
  font-size: clamp(22px, 2.2vw, 28px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.03em;
}
.earn-promo-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 28px;
}
.earn-promo-asset {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.earn-promo-asset strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
}
.earn-promo-asset > div > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  color: var(--muted-2);
  font-size: 12px;
  font-weight: 500;
}
.earn-icon-stack {
  position: relative;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
}
.earn-token-icon {
  display: block;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(145deg, #7a49c9, #3d2468);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}
.earn-token-sky { background: conic-gradient(from 210deg, #68f0c8, #1f8f6e, #9bffd8, #68f0c8); }
.earn-token-aave { background: linear-gradient(145deg, #b8a4ff, #6b4fd8); }
.earn-chain-badge {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--surface-2);
  background: #627eea;
}
.earn-chain-badge.is-base { background: #0052ff; }
.earn-chain-badge.is-eth { background: #627eea; }
.earn-quick-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--primary);
  color: var(--text-cta);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: transform .2s ease, filter .2s ease;
}
.earn-quick-btn iconify-icon {
  color: inherit;
  display: block;
}
.earn-quick-btn:hover { transform: translateY(-1px); filter: brightness(1.12); }
.earn-quick-btn-icon {
  width: 40px;
  padding: 0;
  justify-content: center;
}

/* Filter panel — separate rounded block (as on jumper.xyz/earn) */
.earn-controls {
  padding: 22px 24px 20px;
  border: 0;
  border-radius: 24px;
  background: var(--surface);
  box-shadow: none;
}
/* Cards sit below the filter panel, not inside it */
.earn-markets {
  margin-top: 16px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.earn-markets-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 0;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.earn-market-tabs {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.28);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  border-bottom: 0;
}
.earn-market-tab {
  position: relative;
  border: 0;
  border-radius: 999px;
  padding: 8px 14px;
  background: transparent;
  color: rgba(255, 255, 255, 0.78);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: color .2s ease, background .2s ease, box-shadow .2s ease;
}
.earn-market-tab::after {
  display: none;
}
.earn-market-tab.active,
.earn-market-tab[aria-selected="true"] {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-weight: 700;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}
.earn-market-tab.active::after,
.earn-market-tab[aria-selected="true"]::after {
  background: transparent;
}
.earn-markets-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}
.earn-updated {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(129, 71, 229, 0.18);
  color: #cbb6f0;
  font-size: 12px;
  font-weight: 600;
}
.earn-range {
  display: flex;
  padding: 3px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.28);
}
.earn-range-btn {
  border: 0;
  border-radius: 999px;
  padding: 6px 10px;
  background: transparent;
  color: var(--muted-2);
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
}
.earn-range-btn.active {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
}

.earn-filters { margin-top: 16px; }
.earn-filter-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.earn-search-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}
.earn-search-row .earn-search {
  flex: 1 1 auto;
  margin-top: 0;
  min-width: 0;
}
.earn-search-row .earn-sort,
.earn-search-row .earn-view-toggle {
  flex: 0 0 auto;
}
.earn-filter,
.earn-view-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 12px;
  border: 0;
  border-radius: 24px;
  background: var(--surface-3);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s ease, color .2s ease;
}
.earn-filter iconify-icon,
.earn-view-toggle iconify-icon {
  color: inherit;
  display: block;
  opacity: 0.85;
}
.earn-filter .earn-sort-arrow {
  opacity: 1;
  font-weight: 700;
}
.earn-sort {
  gap: 4px;
}
.earn-filter-accent {
  color: #dbcfed;
  background: rgba(101, 60, 162, 0.28);
  font-weight: 700;
}
.earn-filter:hover,
.earn-view-toggle:hover {
  background: color-mix(in srgb, var(--surface-3) 70%, #fff 8%);
  color: var(--text);
}
.earn-filter-accent:hover {
  background: rgba(101, 60, 162, 0.4);
}
.earn-filter-accent.is-active,
.earn-filter.is-active {
  color: var(--text);
  background: rgba(129, 71, 229, 0.35);
  box-shadow: inset 0 0 0 1px rgba(219, 207, 237, 0.35);
}
.earn-filter-wrap {
  position: relative;
}
.earn-filter-menu {
  position: absolute;
  z-index: 40;
  top: calc(100% + 6px);
  left: 0;
  min-width: 180px;
  max-height: 280px;
  overflow: auto;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  background: var(--surface-2, #1c1528);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}
.earn-filter-option {
  display: block;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  font-size: 13px;
  font-weight: 550;
  text-align: left;
  cursor: pointer;
}
.earn-filter-option:hover,
.earn-filter-option.is-selected {
  background: rgba(129, 71, 229, 0.22);
}
.earn-promo-skeleton {
  min-height: 280px;
  background: linear-gradient(90deg, rgba(255,255,255,0.04), rgba(255,255,255,0.09), rgba(255,255,255,0.04));
  background-size: 200% 100%;
  animation: earnShimmer 1.2s ease-in-out infinite;
}
@keyframes earnShimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}
.earn-state {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 220px;
  padding: 32px 16px;
  color: var(--muted-2);
  font-size: 15px;
  font-weight: 550;
  text-align: center;
}
.earn-state-error { color: #f0b4b4; }
.earn-retry-btn {
  height: 36px;
  padding: 0 16px;
  border: 0;
  border-radius: 12px;
  background: #8147e5;
  color: #fff;
  font-weight: 650;
  cursor: pointer;
}
.earn-filter-spacer { flex: 1 1 auto; min-width: 8px; }
.earn-view-toggle {
  width: 36px;
  padding: 0;
  justify-content: center;
}
.earn-view-toggle.active {
  color: #fff;
  background: var(--primary);
}

.earn-search {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin-top: 14px;
  padding: 0 16px;
  height: 42px;
  border: 0;
  border-radius: 24px;
  background: var(--surface-2);
}
.earn-search iconify-icon {
  flex: 0 0 auto;
  color: #999;
  display: block;
}
.earn-search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
}
.earn-search input::placeholder { color: #77708a; }

.earn-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 0;
}
.earn-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 234px;
  padding: 16px 16px 14px;
  border: 0;
  border-radius: 24px;
  background: var(--surface-2);
  transition: transform .2s ease, filter .2s ease;
  cursor: pointer;
}
.earn-card:hover {
  transform: translateY(-2px);
  filter: brightness(1.06);
}
.earn-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.earn-card-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.earn-card-tag {
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #dbcfed;
  font-size: 11px;
  font-weight: 600;
}
.earn-card-bolt {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  cursor: pointer;
}
.earn-card-bolt iconify-icon {
  color: inherit;
  display: block;
}
.earn-card-protocol {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.earn-card-protocol-icon {
  position: relative;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
}
.earn-card-protocol-icon > i,
.earn-card-protocol-icon > img:first-child,
.earn-card-protocol-icon .earn-protocol-logo {
  display: block;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  background: linear-gradient(145deg, #8a62d8, #3a2468);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}
.earn-card-protocol-icon .earn-chain-badge {
  border-color: var(--surface-2);
}
.earn-card-protocol strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 200px;
  font-size: 15px;
  font-weight: 700;
}
.earn-card-protocol span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 4px;
  color: var(--muted-2);
  font-size: 12px;
  font-weight: 500;
}
.earn-card-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 12px;
  margin-top: auto;
}
.earn-metric-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 4px;
  color: var(--muted-2);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
}
.earn-metric-label iconify-icon {
  color: #7a738c;
  opacity: 0.9;
}
.earn-metric-value {
  display: block;
  font-family: var(--font-body);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.earn-metric-sub {
  display: block;
  margin-top: 2px;
  color: #9b8fb0;
  font-size: 12px;
  font-weight: 500;
}
.earn-card-asset {
  padding-top: 2px;
}
.earn-asset-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
  font-size: 14px;
  font-weight: 650;
}
.earn-asset-icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.08);
}
.earn-asset-symbol {
  color: var(--text);
}

.earn-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-top: 24px;
}
.earn-page-btn {
  display: grid;
  place-items: center;
  min-width: 36px;
  height: 36px;
  padding: 0 8px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted-2);
  font-size: 14px;
  font-weight: 650;
  cursor: pointer;
  transition: background .2s ease, color .2s ease;
}
.earn-page-btn:hover:not(:disabled) {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}
.earn-page-btn.active {
  background: rgba(101, 60, 162, 0.55);
  color: white;
}
.earn-page-btn:disabled {
  opacity: 0.35;
  cursor: default;
}
.earn-page-btn iconify-icon {
  color: inherit;
  display: block;
}

/* —— Missions —— */
.missions-view {
  position: relative;
  z-index: 10;
  width: min(1112px, 100%);
  margin: 0 auto;
  padding: 8px 16px 64px;
  font-family: var(--font-body);
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.missions-view[hidden] { display: none; }

.missions-panel {
  padding: 24px;
  border-radius: 24px;
  background: var(--surface);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

.missions-hero {
  position: relative;
  display: block;
  border-radius: 24px;
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  isolation: isolate;
  transition: transform .25s ease, filter .25s ease;
}
.missions-hero:hover {
  filter: brightness(1.04);
}
.missions-hero:focus-visible {
  outline: 2px solid #b782ff;
  outline-offset: 3px;
}
.missions-hero-img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1032 / 470;
  object-fit: cover;
  object-position: center;
}
.missions-hero-badge {
  position: absolute;
  left: 50%;
  bottom: 32px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 78px;
  padding: 8px 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: rgba(255, 255, 255, 0.92);
  pointer-events: none;
}
.missions-hero-badge-label {
  font-size: 12px;
  font-weight: 700;
  line-height: 16px;
}
.missions-hero-badge-count {
  font-size: 24px;
  font-weight: 700;
  line-height: 32px;
}

.missions-section {
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.missions-section-head {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.missions-section-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  line-height: 32px;
  letter-spacing: -0.02em;
  color: var(--text);
}
.missions-section-sub {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  line-height: 20px;
  color: rgba(255, 255, 255, 0.75);
}

.missions-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
}

.mission-card {
  display: flex;
  flex-direction: column;
  min-height: 352px;
  border-radius: 16px;
  overflow: hidden;
  background: var(--surface-2);
  color: inherit;
  text-decoration: none;
  transition: transform .22s ease, box-shadow .22s ease, background .22s ease;
}
.mission-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.28);
}
.mission-card:focus-visible {
  outline: 2px solid #b782ff;
  outline-offset: 3px;
}
.mission-card-media {
  position: relative;
  height: 192px;
  overflow: hidden;
  background: #1a1228;
}
.mission-card-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.mission-card-body {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 16px;
  padding: 32px 24px 24px;
  background: var(--surface-2);
}
.mission-card-avatar {
  position: absolute;
  top: 0;
  left: 24px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-top: -22px;
  border-radius: 50%;
  background: var(--surface-2);
  box-shadow: 0 0 0 2px var(--surface-2);
  overflow: hidden;
}
.mission-card-avatar img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}
.mission-card-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.02em;
  color: var(--text);
}
html[lang="uk"] .mission-card-title {
  font-size: 16px;
}
html[lang="uk"] .main-menu-legal {
  font-size: 10px;
  gap: 4px 6px;
}
html[lang="uk"] .campaign-hero-desc {
  font-size: 14px;
  line-height: 1.45;
}
.mission-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}
.mission-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 128px;
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  line-height: 18px;
}

body.missions-open,
body.earn-open,
body.portfolio-open,
body.scan-open,
body.blog-open {
  overflow-x: hidden;
}
body.missions-open .swap-shell,
body.missions-open .welcome,
body.earn-open .swap-shell,
body.earn-open .welcome,
body.portfolio-open .swap-shell,
body.portfolio-open .welcome,
body.scan-open .swap-shell,
body.scan-open .welcome,
body.blog-open .swap-shell,
body.blog-open .welcome {
  display: none !important;
}
body.missions-open main,
body.earn-open main,
body.scan-open main,
body.blog-open main {
  padding-top: 4px;
  padding-bottom: 48px;
}
body.missions-open .ambient,
body.earn-open .ambient,
body.scan-open .ambient,
body.blog-open .ambient {
  opacity: .35;
  transform: scale(1) translateY(0);
}

@media (max-width: 980px) {
  .missions-grid { grid-template-columns: 1fr; gap: 24px; }
  .mission-card { min-height: 0; }
  .missions-hero-img { aspect-ratio: 16 / 9; }
  .missions-hero-badge { bottom: 20px; }
  .missions-panel { padding: 16px; }
  .missions-section { gap: 24px; }
}

@media (max-width: 640px) {
  .missions-view { padding: 4px 12px 48px; gap: 24px; }
  .missions-panel { padding: 12px; border-radius: 20px; }
  .missions-hero { border-radius: 16px; }
  .missions-section { gap: 20px; }
  .missions-section-title { font-size: 20px; }
  .missions-grid { gap: 16px; }
  .mission-card-body { padding: 28px 18px 18px; }
  .mission-card-media { height: 168px; }
  .missions-hero-badge { bottom: 16px; padding: 6px 10px; }
  .missions-hero-badge-count { font-size: 20px; line-height: 26px; }
}

body[data-theme="light"] .missions-panel {
  background: #fff;
  box-shadow: var(--shadow-low);
}
body[data-theme="light"] .missions-section-sub {
  color: rgba(18, 11, 30, 0.55);
}
body[data-theme="light"] .mission-card {
  background: #f4eefb;
  box-shadow: none;
}
body[data-theme="light"] .mission-card-body {
  background: #f4eefb;
}
body[data-theme="light"] .mission-card-avatar {
  background: #f4eefb;
  box-shadow: 0 0 0 2px #f4eefb;
}
body[data-theme="light"] .mission-card-title {
  color: #120b1e;
}
body[data-theme="light"] .mission-chip {
  background: rgba(18, 11, 30, 0.06);
  color: #120b1e;
}
body[data-theme="light"] .missions-hero-badge {
  background: rgba(18, 11, 30, 0.45);
  color: rgba(255, 255, 255, 0.95);
}

/* —— Campaign (Base Season) —— */
.campaign-hero-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.campaign-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  min-height: 40px;
  padding: 4px 12px 4px 8px;
  border-radius: 128px;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.92);
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  line-height: 20px;
  transition: background .2s ease, color .2s ease;
}
.campaign-back iconify-icon {
  display: block;
}
.campaign-back:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}
.campaign-back:focus-visible {
  outline: 2px solid #b782ff;
  outline-offset: 2px;
}

.campaign-hero {
  overflow: hidden;
  border-radius: 24px;
  background: var(--surface-2);
}
.campaign-hero-banner {
  position: relative;
  overflow: hidden;
}
.campaign-hero-img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1032 / 308;
  object-fit: cover;
  object-position: center;
}
.campaign-hero-overlay {
  position: absolute;
  left: 50%;
  top: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.campaign-hero-icon {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  object-fit: contain;
  background: #1c102d;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}
.campaign-hero-banner .missions-hero-badge {
  position: static;
  left: auto;
  bottom: auto;
  transform: none;
}
.campaign-hero-copy {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 32px 24px;
}
.campaign-hero-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  line-height: 40px;
  letter-spacing: -0.03em;
  color: var(--text);
}
.campaign-hero-desc {
  margin: 0;
  max-width: 72ch;
  font-size: 18px;
  font-weight: 500;
  line-height: 24px;
  color: rgba(255, 255, 255, 0.64);
}

.mission-card-new {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 4px 8px;
  border-radius: 128px;
  background: #b49bda;
  color: #653ca2;
  font-size: 10px;
  font-weight: 700;
  line-height: 14px;
}

body[data-theme="light"] .campaign-back {
  background: rgba(18, 11, 30, 0.06);
  color: #120b1e;
}
body[data-theme="light"] .campaign-back:hover {
  background: rgba(18, 11, 30, 0.1);
}
body[data-theme="light"] .campaign-hero {
  background: #f4eefb;
}
body[data-theme="light"] .campaign-hero-title {
  color: #120b1e;
}
body[data-theme="light"] .campaign-hero-desc {
  color: rgba(18, 11, 30, 0.6);
}
body[data-theme="light"] .campaign-hero-icon {
  background: #fff;
}

@media (max-width: 980px) {
  .campaign-hero-overlay { gap: 20px; }
  .campaign-hero-icon { width: 88px; height: 88px; }
  .campaign-hero-title { font-size: 28px; line-height: 36px; }
  .campaign-hero-desc { font-size: 16px; }
}

@media (max-width: 640px) {
  .campaign-hero { border-radius: 16px; }
  .campaign-hero-img { aspect-ratio: 1032 / 308; }
  .campaign-hero-overlay { gap: 8px; }
  .campaign-hero-icon { width: 44px; height: 44px; }
  .campaign-hero-copy { padding: 24px 18px; gap: 12px; }
  .campaign-hero-title { font-size: 24px; line-height: 30px; }
  .campaign-hero-desc { font-size: 15px; line-height: 22px; }
  .campaign-hero-banner .missions-hero-badge {
    min-width: 52px;
    padding: 4px 8px;
  }
  .campaign-hero-banner .missions-hero-badge-label { font-size: 11px; line-height: 14px; }
  .campaign-hero-banner .missions-hero-badge-count {
    font-size: 16px;
    line-height: 20px;
  }
}

body.portfolio-open .ambient {
  opacity: .28;
  transform: scale(1) translateY(0);
}
/* Light portfolio: no ambient glow at all (must beat .app-ready) */
body[data-theme="light"].portfolio-open .ambient,
body[data-theme="light"].portfolio-open.app-ready .ambient,
body[data-theme="light"].app-ready.portfolio-open .ambient {
  opacity: 0 !important;
  visibility: hidden;
}

@media (max-width: 980px) {
  .earn-featured { grid-template-columns: 1fr; }
  .earn-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .site-header { height: 72px; padding: 0 20px; }
  .brand { gap: 1px; }
  .jumper-logo { height: 28px; }
  .connect-mini { padding: 10px 17px; border-radius: 17px; font-size: 13px; }
  .header-actions { gap: 9px; }
  .main-nav { display: none; }
  .menu-button { width: 36px; height: 36px; }
  .main-menu { right: -4px; }
  main { min-height: calc(100vh - 72px); padding: 19px 8px 50px; }
  .welcome { inset: 72px 0 0; justify-content: flex-start; padding-top: min(28vh, 220px); }
  h1 { max-width: 360px; font-size: clamp(45px, 13vw, 60px); line-height: 1.08; }
  .hero-copy p { max-width: 330px; margin: 13px auto 0; font-size: 17px; line-height: 1.35; }
  .stats { flex-wrap: wrap; justify-content: center; max-width: 240px; margin: 32px 0 0; }
  .stat { width: 104px; height: 98px; }
  .stat:last-child { margin-top: -1px; }
  .get-started { position: absolute; bottom: max(32px, env(safe-area-inset-bottom)); width: min(292px, 76vw); min-height: 52px; margin: 0; font-size: 16px; animation: heroIn .8s .4s both; }
  .swap-shell { top: 54px; width: calc(100% - 16px); clip-path: inset(0 0 56% 0 round 24px); }
  body.app-ready .swap-shell { top: 19px; }
  .release-pill { margin-bottom: 18px; }
  .swap-card { padding: 12px; border-radius: var(--radius-card); }
  .card-topline { padding: 0 4px; }
  .tab { padding: 11px 10px; font-size: 13px; }
  .settings { width: 36px; padding: 7px; }
  .asset-panel { min-height: 122px; padding: 16px 14px; }
  .asset-panel input, .asset-panel output { width: 120px; font-size: 31px; }
  .asset-button { min-width: 104px; padding: 10px 11px; font-size: 14px; }
  .primary-row { margin-top: 16px; }
  .view-switcher { display: none; }
  .quotes-panel { display: none !important; }
  .tabs-advanced .tab { padding: 10px 8px; font-size: 12px; }
  .advanced-row { flex-wrap: wrap; }
  .slippage-group { justify-content: flex-start; }
  .portfolio-view { inset: 72px 0 0; padding: clamp(100px, 16vh, 160px) 16px 40px; }
  .portfolio-ghost {
    top: clamp(80px, 14vh, 140px);
    grid-template-columns: 1fr;
    width: min(420px, 90vw);
    opacity: .16;
  }
  .portfolio-ghost-right { display: none; }
  .portfolio-hero { width: 100%; }
  .portfolio-heading { font-size: 28px; }
  .portfolio-subheading { font-size: 18px; }
  .portfolio-stats { gap: 12px; margin-top: 28px; }
  .portfolio-stat-card { width: 104px; height: 98px; }
  .portfolio-stat-card strong { font-size: 28px; }
  .portfolio-stat-card span { font-size: 14px; }
  .earn-view { padding: 4px 0 48px; }
  .earn-controls { padding: 16px 14px 14px; border-radius: 20px; }
  .earn-markets { margin-top: 12px; padding: 0; background: transparent; }
  .earn-grid { grid-template-columns: 1fr; margin-top: 0; }
  .earn-promo { min-height: 240px; padding: 20px; }
  .earn-promo-title { font-size: 22px; }
  .earn-filter-spacer { display: none; }
  .earn-updated { display: none; }
  .earn-market-tabs { width: auto; max-width: 100%; overflow-x: auto; }
}

/* —— Mobile header + full-screen main menu (matches jumper.xyz drawer) ——
   Up to 780px: below that the desktop nav + actions no longer fit in one row. */
@media (max-width: 780px) {
  .site-header { z-index: 60; }
  .main-nav { display: none; }
  .main-menu-wrap { position: static; }
  .menu-button {
    flex-direction: column;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: transparent;
    border-radius: 12px;
  }
  .menu-button:hover,
  .main-menu-wrap.is-open .menu-button { background: transparent; }
  .menu-button span {
    width: 22px;
    height: 2px;
    border-radius: 2px;
    transition: transform .22s ease, opacity .18s ease;
  }
  .main-menu-wrap.is-open .menu-button span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .main-menu-wrap.is-open .menu-button span:nth-child(2) { opacity: 0; }
  .main-menu-wrap.is-open .menu-button span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  body.menu-open { overflow: hidden; }
  body[data-theme="light"] .menu-button,
  body[data-theme="light"] .menu-button:hover,
  body[data-theme="light"] .main-menu-wrap.is-open .menu-button { background: transparent; }

  .main-menu {
    position: fixed;
    inset: 88px 0 0 0;
    z-index: 50;
    display: flex;
    flex-direction: column;
    width: auto;
    padding: 8px 16px calc(16px + env(safe-area-inset-bottom));
    border-radius: 0;
    box-shadow: none;
    overflow-y: auto;
    overscroll-behavior: contain;
    transform-origin: top center;
    animation: none;
  }
  .main-menu[hidden] { display: none; }
  .main-menu-panel { flex: 1; align-content: start; }
  .main-menu-panel[data-menu-panel="root"] { display: flex; flex-direction: column; gap: 0; }
  .main-menu-panel[hidden] { display: none; }

  .main-menu-nav {
    display: grid;
    gap: 0;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 8px;
  }
  .main-menu-nav a {
    display: flex;
    align-items: center;
    min-height: 52px;
    padding: 0 8px;
    border-radius: 12px;
    color: var(--text);
    font-size: 18px;
    font-weight: 600;
    text-decoration: none;
  }
  .main-menu-nav a.active { color: var(--logo-primary); }
  .main-menu-nav a:active,
  .main-menu-item:active { background: rgba(255, 255, 255, .06); }

  .main-menu-item { min-height: 52px; padding: 0 8px; font-size: 18px; }
  .main-menu-icon { display: none; }
  .main-menu-item[data-menu-nav="theme"] {
    position: relative;
    margin-top: 8px;
  }
  .main-menu-item[data-menu-nav="theme"]::before {
    content: "";
    position: absolute;
    top: -4px;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--line);
  }
  .main-menu-theme-head { grid-template-columns: 44px 1fr 44px; min-height: 52px; }
  .main-menu-back { width: 44px; height: 44px; }

  .main-menu-footer { margin-top: auto; padding-top: 12px; }
  .main-menu-social { gap: 28px; }
  .main-menu-social-link { width: 44px; height: 44px; }
  .main-menu-legal { font-size: 12px; padding-bottom: 4px; }
}

body[data-theme="light"] .main-menu-nav a.active { color: var(--logo-primary); }

@media (max-width: 640px) {
  .main-menu { inset: 72px 0 0 0; }
}

/* Fill the screen below the header (beats the 520px minimum from the ≤860px block) */
@media (max-width: 640px) {
  body .swap-shell[data-panel="tokens"] {
    grid-template-columns: calc(100vw - 16px);
    grid-template-rows: calc(100vh - 104px);
    grid-template-rows: calc(100dvh - 104px);
  }
}

/* Mobile welcome hero */
@media (max-width: 640px) {
  /* 16px keeps iOS Safari from zooming the page on input focus */
  .token-search input,
  .network-search input,
  #earnSearch,
  #scanSearch,
  #slippageCustom,
  #sendWalletInput { font-size: 16px; }
  body.app-ready .ambient { opacity: .22; }
  .welcome {
    padding: clamp(150px, 27vh, 230px) 16px calc(28px + env(safe-area-inset-bottom));
    overflow-y: auto;
  }
  h1 { font-size: 46px; line-height: 1.12; letter-spacing: -.04em; max-width: 300px; margin-inline: auto; }
  .hero-copy p { margin-top: 14px; font-size: 18px; line-height: 1.3; }
  .stats { flex-wrap: wrap; gap: 12px; margin-top: 28px; max-width: 340px; }
  .stat { width: 104px; height: 96px; }
  .stat strong { font-size: 26px; }
  .stat span { font-size: 15px; }
  .get-started { width: min(260px, 70vw); min-height: 52px; margin-top: 28px; font-size: 16px; }
}

@media (max-height: 700px) and (max-width: 640px) {
  .welcome { padding-top: 100px; }
  .stats { margin-top: 20px; }
  .stat { width: 88px; height: 76px; }
  .get-started { bottom: 20px; }
}

@media (max-height: 790px) and (min-width: 641px) {
  .welcome { padding-top: 218px; }
  h1 { font-size: clamp(50px, 5vw, 70px); }
  .hero-copy p { margin-top: 11px; font-size: 19px; }
  .stats { margin-top: 24px; }
  .stat { width: 116px; height: 92px; }
  .stat strong { font-size: 27px; }
  .get-started { min-height: 52px; margin-top: 24px; }
  .swap-shell { top: 50px; }
  body.app-ready .swap-shell { top: 18px; transform: translateX(-50%) scale(.92); }
  body.app-ready .swap-shell[data-view="advanced"] {
    transform: translateX(-50%) scale(.88);
  }
  body.app-ready .swap-shell[data-panel="settings"] {
    top: 72px !important;
    transform: translateX(-50%) !important;
  }
  .swap-shell[data-view="advanced"] {
    grid-template-columns: min(420px, 44vw);
    gap: 16px;
  }
  .swap-shell[data-view="advanced"][data-quotes="open"] {
    grid-template-columns: min(420px, 44vw) min(500px, 48vw);
  }
  .swap-shell[data-panel="settings"] {
    width: min(416px, calc(100vw - 32px)) !important;
  }
}

/* Narrow phones (iPhone SE 1st gen, small Android: 320–360px) */
@media (max-width: 360px) {
  .site-header { padding: 0 12px; }
  .jumper-logo { height: 24px; }
  .brand-chevron { width: 16px; }
  .header-actions { gap: 4px; }
  .menu-button { width: 36px; height: 36px; }
  h1 { font-size: 40px; }
  .hero-copy p { font-size: 16px; }
  .stats { gap: 8px; }
  .stat { width: 92px; }
}

@media (max-height: 700px) and (max-width: 640px) {
  .welcome { padding-top: 64px; }
}

/* Pagination: drop first/last jumps and shrink buttons so the row fits */
@media (max-width: 420px) {
  .earn-pagination { gap: 2px; flex-wrap: wrap; }
  .earn-page-btn { min-width: 32px; height: 32px; padding: 0 4px; }
  .earn-pagination .earn-page-btn:first-child,
  .earn-pagination .earn-page-btn:last-child { display: none; }
}

/* Phones in landscape: very little height, so compact everything */
@media (max-height: 500px) and (max-width: 960px) {
  .site-header { height: 60px; }
  main { min-height: calc(100vh - 60px); }
  .welcome {
    inset: 60px 0 0;
    padding: 12px 16px calc(16px + env(safe-area-inset-bottom));
    overflow-y: auto;
  }
  h1 { font-size: 36px; line-height: 1.1; max-width: none; }
  .hero-copy p { margin-top: 8px; font-size: 16px; }
  .stats { flex-wrap: nowrap; gap: 10px; margin-top: 14px; max-width: none; }
  .stat { width: 96px; height: 72px; }
  .stat strong { font-size: 22px; }
  .stat span { font-size: 13px; }
  .get-started { min-height: 46px; margin-top: 14px; }
  body.app-ready .swap-shell { transform: translateX(-50%); }
  /* Token picker must fit the viewport: it does not scroll with the page */
  html body.app-ready .swap-shell[data-panel="tokens"] { top: 64px !important; }
  body .swap-shell[data-panel="tokens"] {
    grid-template-rows: calc(100vh - 72px);
    grid-template-rows: calc(100dvh - 72px);
  }
  .swap-shell[data-panel="tokens"] .swap-card { padding: 12px; }
  .token-picker { gap: 8px; }
  .token-picker-header { min-height: 36px; }
  .token-picker-title { font-size: 17px; }
  .token-search { min-height: 40px; }
  .chain-chip { min-height: 34px; }
  html body.app-ready .swap-shell[data-view][data-panel="settings"],
  html body.app-ready .swap-shell[data-view][data-panel="send-wallet"] { top: 64px !important; }
  .swap-shell[data-panel="settings"] .swap-card,
  .swap-shell[data-panel="send-wallet"] .swap-card { max-height: calc(100dvh - 72px); }
}
@media (max-height: 500px) and (max-width: 780px) {
  .main-menu { inset: 60px 0 0 0; }
}

/* Settings / wallet panels are fixed-height overlays: scroll inside the card on short screens */
@media (max-width: 640px), (max-height: 500px) {
  .swap-shell[data-panel="settings"] .swap-card,
  .swap-shell[data-panel="send-wallet"] .swap-card {
    max-height: calc(100vh - 116px);
    max-height: calc(100dvh - 116px);
    overflow-y: auto;
    overscroll-behavior: contain;
  }
}
@media (max-height: 500px) and (max-width: 960px) {
  .swap-shell[data-panel="settings"] .swap-card,
  .swap-shell[data-panel="send-wallet"] .swap-card {
    max-height: calc(100vh - 72px);
    max-height: calc(100dvh - 72px);
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Light theme — jumper.xyz light mode */
body[data-theme="light"] {
  --bg: #efe8f6;
  --surface: #ffffff;
  --surface-2: #f3edf8;
  --surface-3: #e8dff3;
  --line: rgba(80, 40, 120, 0.1);
  --text: #241433;
  --text-cta: #fcfaff;
  --muted: #5f4d73;
  --muted-2: #7a6a90;
  --primary: #653ca2;
  --purple: #653ca2;
  --purple-hot: #7a49c9;
  --logo-primary: #31007a;
  --logo-secondary: #8700b8;
  --shadow: 0 4px 24px rgba(80, 40, 120, 0.06), 0 24px 60px rgba(80, 40, 120, 0.12);
  --shadow-low: 0 2px 8px rgba(80, 40, 120, 0.06);
  color-scheme: light;
}

body[data-theme="light"] .ambient-one,
body[data-theme="light"] .ambient-two {
  background: #c9a8f0;
  opacity: 0;
}
body[data-theme="light"].app-ready .ambient {
  opacity: .45;
}
body[data-theme="light"].app-ready.portfolio-open .ambient,
body[data-theme="light"].portfolio-open.app-ready .ambient {
  opacity: 0 !important;
  visibility: hidden;
}

body[data-theme="light"] .brand-chevron { color: #7a6a90; }
body[data-theme="light"] .products-menu,
body[data-theme="light"] .main-menu {
  border-color: rgba(80, 40, 120, 0.08);
  box-shadow: 0 18px 50px rgba(80, 40, 120, 0.16);
}
body[data-theme="light"] .product-item:hover,
body[data-theme="light"] .product-item.is-active,
body[data-theme="light"] .main-menu-item:hover,
body[data-theme="light"] .main-menu-back:hover {
  background: rgba(101, 60, 162, 0.08);
}
body[data-theme="light"] .product-icon {
  background: rgba(101, 60, 162, 0.08);
  color: #241433;
}
body[data-theme="light"] .product-icon iconify-icon { color: inherit; }
body[data-theme="light"] .product-desc,
body[data-theme="light"] .products-label { color: #7a6a90; }

body[data-theme="light"] .menu-button {
  background: #ebe2f5;
}
body[data-theme="light"] .menu-button:hover,
body[data-theme="light"] .main-menu-wrap.is-open .menu-button {
  background: #e2d6f0;
  opacity: 1;
}
body[data-theme="light"] .menu-button span {
  background: #241433;
}
body[data-theme="light"] .main-menu {
  background: #fff;
  border-color: rgba(80, 40, 120, 0.08);
  box-shadow: 0 18px 50px rgba(80, 40, 120, 0.16);
}

body[data-theme="light"] .release-pill {
  color: #5f4d73;
  border-color: rgba(101, 60, 162, 0.16);
  background: rgba(255, 255, 255, 0.86);
}
body[data-theme="light"] .release-pill:hover,
body[data-theme="light"] .release-pill.is-active {
  color: #241433;
  border-color: rgba(101, 60, 162, 0.28);
  background: #ffffff;
}
body[data-theme="light"] .release-icon {
  background: #ebe2f5;
  color: #7a49c9;
}

body[data-theme="light"] .swap-card,
body[data-theme="light"] .view-switcher {
  border-color: rgba(80, 40, 120, 0.06);
  background: #ffffff;
}
body[data-theme="light"] .tab.active {
  background: rgba(101, 60, 162, 0.1);
  color: #241433;
}
body[data-theme="light"] .private-dest-card {
  border-color: rgba(80, 40, 120, 0.05);
  background: #f3edf8;
}
body[data-theme="light"] .private-dest-card:hover {
  background: #ebe3f4;
}
body[data-theme="light"] .private-dest-required {
  background: rgba(255, 193, 7, 0.22);
  color: #c79100;
}
body[data-theme="light"] .private-dest-icon i {
  background: rgba(80, 40, 120, 0.14);
  box-shadow: inset 0 0 0 1px rgba(80, 40, 120, 0.08);
}
body[data-theme="light"] .private-dest-icon i:last-child {
  background: rgba(80, 40, 120, 0.1);
}
body[data-theme="light"] .view-mode.active {
  background: rgba(101, 60, 162, 0.1);
}
body[data-theme="light"] .view-switcher {
  background: #ffffff;
  box-shadow: 0 4px 18px rgba(80, 40, 120, 0.1);
}
body[data-theme="light"] .asset-panel {
  border-color: rgba(80, 40, 120, 0.05);
  background: #f3edf8;
}
body[data-theme="light"] .asset-button {
  background: rgba(101, 60, 162, 0.88);
  color: #fff;
}
body[data-theme="light"] .asset-button:hover {
  background: #653ca2;
}
body[data-theme="light"] .token-bubbles i {
  background: rgba(255, 255, 255, 0.28);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}
body[data-theme="light"] .token-bubbles i:last-child {
  background: rgba(255, 255, 255, 0.18);
}
body[data-theme="light"] .flip-button {
  border-color: #ffffff;
  background: #f3edf8;
}
body[data-theme="light"] .wallet-button {
  background: #e8dff3;
  color: #241433;
}
body[data-theme="light"] .wallet-button:hover {
  background: #ddd0ee;
}
body[data-theme="light"] .hero-copy a { color: #241433; }
body[data-theme="light"] .hero-spray {
  background: radial-gradient(
    ellipse 58% 52% at 50% 48%,
    rgba(244, 238, 250, 0.95) 0%,
    rgba(244, 238, 250, 0.62) 42%,
    transparent 72%
  );
  filter: blur(20px);
  opacity: 1;
}
body[data-theme="light"] .welcome::before {
  background: radial-gradient(ellipse 52% 30% at 50% 26%, rgba(244, 238, 250, 0.75), transparent 70%);
}
body[data-theme="light"] .stat {
  border: 0;
  background: #fff;
  box-shadow: 0 2px 8px rgba(80, 40, 140, 0.06), 0 8px 20px rgba(80, 40, 140, 0.06);
}
body[data-theme="light"] .stat:hover {
  background: #fff;
}
body[data-theme="light"] .stat strong {
  color: #31007a;
}
body[data-theme="light"] .stat span {
  color: #5f4d73;
}

body[data-theme="light"] .advanced-row {
  background: #f3edf8;
  border-color: rgba(80, 40, 120, 0.06);
}
body[data-theme="light"] .slippage-chip,
body[data-theme="light"] .slippage-custom {
  background: rgba(101, 60, 162, 0.08);
  color: #241433;
}
body[data-theme="light"] .slippage-chip:hover {
  background: rgba(101, 60, 162, 0.14);
}
body[data-theme="light"] .slippage-chip.active,
body[data-theme="light"] .slippage-custom.is-active,
body[data-theme="light"] .slippage-custom:focus {
  background: rgba(101, 60, 162, 0.92);
  color: #fff;
  box-shadow: none;
}
body[data-theme="light"] .slippage-custom::placeholder { color: #7a6a90; }
body[data-theme="light"] .exchanges-value { color: #5f4d73; }
body[data-theme="light"] .exchanges-value:hover { color: #241433; }

body[data-theme="light"] .send-wallet-box {
  background: #ffffff;
  box-shadow: 0 2px 10px rgba(80, 40, 120, 0.04);
}
body[data-theme="light"] .send-wallet-box.is-error {
  border-color: #e57373;
}
body[data-theme="light"] .send-wallet-box input {
  color: #120b1e;
}
body[data-theme="light"] .send-wallet-box input::placeholder {
  color: #9a8aae;
}
body[data-theme="light"] .send-wallet-done,
body[data-theme="light"] .send-wallet-bookmark-btn {
  background: #efeff1;
  color: #120b1e;
}
body[data-theme="light"] .send-wallet-done:hover,
body[data-theme="light"] .send-wallet-bookmark-btn:hover {
  background: #e6e4ea;
}
body[data-theme="light"] .send-wallet-menu-row {
  background: #ffffff;
  color: #120b1e;
  box-shadow: 0 2px 10px rgba(80, 40, 120, 0.04);
}
body[data-theme="light"] .send-wallet-menu-row:hover {
  background: #faf8fc;
}
body[data-theme="light"] .send-wallet-empty {
  color: #120b1e;
}
body[data-theme="light"] .send-wallet-empty iconify-icon {
  color: #120b1e;
}
body[data-theme="light"] .send-wallet-empty p {
  color: #6b6578;
}

body[data-theme="light"] .settings-row:hover,
body[data-theme="light"] .settings-back:hover {
  background: rgba(101, 60, 162, 0.06);
}
body[data-theme="light"] .settings-icon {
  color: #241433;
}
body[data-theme="light"] .settings-value {
  color: #241433;
}
body[data-theme="light"] .settings-left {
  color: #241433;
}
body[data-theme="light"] .settings-title {
  color: #241433;
}
body[data-theme="light"] .settings-back {
  color: #241433;
}
body[data-theme="light"] .settings-toggle {
  background: #ddd3ea;
}
body[data-theme="light"] .settings-toggle[aria-checked="true"] {
  background: #653ca2;
}
body[data-theme="light"] .main-menu-social-link { color: #7a6a90; }
body[data-theme="light"] .main-menu-social-link:hover { color: #241433; }
body[data-theme="light"] .main-menu-legal { color: #8a7a9c; }
body[data-theme="light"] .main-menu-footer {
  border-top-color: rgba(80, 40, 120, 0.1);
}
body[data-theme="light"] .toast {
  background: #ffffff;
  border-color: rgba(80, 40, 120, 0.1);
  color: #241433;
}
body[data-theme="light"] .portfolio-ghost {
  opacity: .7;
  filter: blur(0.8px);
  mask-image: linear-gradient(180deg, rgba(0,0,0,.75) 0%, rgba(0,0,0,.85) 30%, rgba(0,0,0,.5) 58%, transparent 92%);
  -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,.75) 0%, rgba(0,0,0,.85) 30%, rgba(0,0,0,.5) 58%, transparent 92%);
}
body[data-theme="light"] .portfolio-ghost-panel {
  border-color: rgba(80, 40, 120, 0.1);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 4px 28px rgba(80, 40, 140, 0.05);
}
body[data-theme="light"] .portfolio-ghost-title,
body[data-theme="light"] .portfolio-ghost-tabs .is-active {
  color: rgba(36, 20, 51, 0.45);
}
body[data-theme="light"] .portfolio-ghost-tabs {
  color: rgba(36, 20, 51, 0.32);
}
body[data-theme="light"] .portfolio-ghost-lines i,
body[data-theme="light"] .portfolio-ghost-cards span,
body[data-theme="light"] .portfolio-ghost-rows i,
body[data-theme="light"] .portfolio-ghost-chart {
  background: rgba(101, 60, 162, 0.1);
}
/* Light theme: ZERO backlight */
body[data-theme="light"] .portfolio-glow {
  display: none !important;
  opacity: 0 !important;
  background: none !important;
}
body[data-theme="light"] .portfolio-stat-card {
  background: #fff;
  box-shadow: 0 2px 8px rgba(80, 40, 140, 0.06), 0 8px 20px rgba(80, 40, 140, 0.06);
}
body[data-theme="light"] .portfolio-stat-card:hover {
  background: #fff;
}
body[data-theme="light"] .portfolio-stat-card strong {
  color: #31007a;
}
body[data-theme="light"] .portfolio-stat-card span {
  color: #5f4d73;
}
body[data-theme="light"] .portfolio-heading {
  color: #31007a;
  background: none;
}
body[data-theme="light"] .portfolio-heading .portfolio-accent {
  color: #31007a;
  background: none;
}
body[data-theme="light"] .portfolio-subheading {
  color: #241433;
}

/* —— Token picker (LI.FI / Jumper-style) —— */
.token-picker {
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1 1 auto;
  min-height: 0;
}

.token-picker-header {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 44px;
  flex: 0 0 auto;
}

.token-picker-back {
  position: absolute;
  left: 0;
  top: 50%;
  translate: 0 -50%;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: inherit;
  cursor: pointer;
}
.token-picker-back:hover { background: rgba(255,255,255,.06); }
.token-picker-back iconify-icon { color: inherit; display: block; }

.token-picker-title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -.02em;
}

.token-search,
.network-search {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 14px;
  border-radius: 16px;
  background: var(--surface-2);
  color: var(--muted-2);
  flex: 0 0 auto;
}
.token-search iconify-icon,
.network-search iconify-icon { color: inherit; flex: 0 0 auto; }
.token-search input,
.network-search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 15px;
  font-weight: 500;
}
.token-search input::placeholder,
.network-search input::placeholder { color: var(--muted-2); }

.token-list,
.network-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding-right: 2px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.18) transparent;
}
.token-list::-webkit-scrollbar,
.network-list::-webkit-scrollbar { width: 6px; }
.token-list::-webkit-scrollbar-thumb,
.network-list::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,.16);
  border-radius: 999px;
}

.token-list-status {
  padding: 18px 8px;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

.token-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 16px;
  cursor: pointer;
}
.token-row:hover { background: rgba(255,255,255,.05); }

.token-subline {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  margin-top: 2px;
}
.token-subline-swap {
  position: relative;
  display: grid;
  align-items: center;
  min-width: 0;
  max-width: 160px;
  height: 16px;
  overflow: hidden;
}
.token-name,
.token-address {
  grid-area: 1 / 1;
  min-width: 0;
  max-width: 100%;
  color: var(--muted-2);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: transform .28s cubic-bezier(.16,1,.3,1), opacity .22s ease;
}
.token-name {
  transform: translateY(0);
  opacity: 1;
}
.token-address {
  transform: translateY(110%);
  opacity: 0;
}
.token-row:hover .token-name {
  transform: translateY(-110%);
  opacity: 0;
}
.token-row:hover .token-address {
  transform: translateY(0);
  opacity: 1;
}
.token-footnote {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted-2);
  opacity: .55;
  cursor: pointer;
  flex: 0 0 auto;
}
.token-row:hover .token-footnote { opacity: .9; }
.token-footnote:hover,
.token-pin-btn.is-on {
  opacity: 1;
  color: var(--text);
  background: rgba(255,255,255,.06);
}
.token-pin-btn.is-on { color: #a78bfa; }

.token-logo-stack {
  position: relative;
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
}
.token-logo,
.token-logo-fallback {
  display: block;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--surface-3);
}
.token-logo-fallback {
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}
.token-logo-lg,
.token-logo-lg.token-logo-fallback {
  width: 56px;
  height: 56px;
  font-size: 20px;
}
.token-chain-badge {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--surface);
  background: var(--surface-3);
  object-fit: cover;
}
.token-chain-badge-empty { display: none; }

.token-meta {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.token-symbol-line {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.token-symbol-line strong {
  font-size: 16px;
  font-weight: 700;
}
.token-verified { color: #3b82f6; }

.asset-button.has-token {
  min-width: 118px;
  padding: 8px 12px 8px 8px;
  gap: 8px;
  background: rgba(101, 60, 162, .55);
}
.asset-token-stack {
  width: 32px;
  height: 32px;
}
.asset-token-stack .token-logo,
.asset-token-stack .token-logo-fallback {
  width: 32px;
  height: 32px;
}
.asset-token-stack .token-chain-badge {
  width: 14px;
  height: 14px;
  border-width: 1.5px;
}

.network-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 18px;
  border: 1px solid rgba(255,255,255,.025);
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.network-row-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.network-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 48px;
  padding: 8px 36px 8px 12px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: background .15s ease;
}
.network-row:hover { background: rgba(255,255,255,.05); }
.network-row.active {
  background: rgba(101, 60, 162, .28);
}
.network-pin-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  translate: 0 -50%;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted-2);
  opacity: 0;
  cursor: pointer;
}
.network-row-wrap:hover .network-pin-btn,
.network-pin-btn.is-on {
  opacity: 1;
}
.network-pin-btn:hover {
  background: rgba(255,255,255,.06);
  color: var(--text);
}
.network-pin-btn.is-on { color: #a78bfa; }
.network-logo,
.network-logo.token-logo-fallback {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 auto;
}
.network-all-icons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
}
.network-all-icons img {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--surface-3);
}

.swap-shell[data-panel="tokens"] {
  position: fixed !important;
  left: 50% !important;
  top: 96px !important;
  display: grid !important;
  grid-template-columns: min(416px, calc(100vw - 48px)) min(280px, 32vw);
  grid-template-rows: minmax(560px, min(72vh, 680px));
  column-gap: 16px;
  row-gap: 0;
  align-items: stretch;
  width: max-content !important;
  max-width: calc(100vw - 32px) !important;
  margin: 0 !important;
  transform: translateX(-50%) !important;
  clip-path: none !important;
  transition: none !important;
  z-index: 25;
  opacity: 1 !important;
  filter: none !important;
}
.swap-shell[data-panel="tokens"] .release-pill { display: none; }
.swap-shell[data-panel="tokens"] .quotes-panel { display: none !important; }
.swap-shell[data-panel="tokens"] .swap-stage {
  grid-column: 1;
  grid-row: 1;
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.swap-shell[data-panel="tokens"] .swap-card {
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}
.swap-shell[data-panel="tokens"] .swap-card-main[hidden] + .token-picker,
.swap-shell[data-panel="tokens"] .token-picker:not([hidden]) {
  flex: 1 1 auto;
}
.swap-shell[data-panel="tokens"] .network-panel {
  grid-column: 2;
  grid-row: 1;
  align-self: stretch;
  height: 100%;
  min-height: 0;
}
.swap-shell[data-panel="tokens"] .view-switcher {
  top: 0;
  left: -62px;
  opacity: 1 !important;
  transform: none !important;
}
body.app-ready .swap-shell[data-panel="tokens"] {
  top: 96px !important;
  transform: translateX(-50%) !important;
}

/* Token detail as bottom sheet overlay (Jumper-style) */
.token-detail {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  border-radius: inherit;
  overflow: hidden;
}
.token-detail-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  border-radius: inherit;
  background: rgba(12, 6, 22, .42);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  cursor: pointer;
}
.token-detail-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-height: min(94%, 540px);
  overflow: auto;
  padding: 26px 22px 28px;
  border-radius: 24px 24px 22px 22px;
  background: var(--surface);
  box-shadow: 0 -12px 40px rgba(0, 0, 0, .35);
  animation: tokenDetailIn .32s cubic-bezier(.16,1,.3,1);
}
@keyframes tokenDetailIn {
  from { opacity: 0; transform: translateY(100%); }
  to { opacity: 1; transform: translateY(0); }
}
.swap-card.is-token-detail .token-picker {
  pointer-events: none;
}
.token-detail-x {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.token-detail-x:hover { background: rgba(255,255,255,.06); color: var(--text); }
.token-detail-hero {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
}
.token-detail-hero strong {
  display: block;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -.03em;
}
.token-detail-hero span {
  color: var(--muted-2);
  font-size: 14px;
  font-weight: 500;
}
.token-detail-stack { width: 56px; height: 56px; }
.token-detail-stack .token-chain-badge {
  width: 22px;
  height: 22px;
  border-width: 2px;
}
.token-detail-grid {
  display: grid;
  gap: 18px;
}
.token-detail-label {
  display: block;
  margin-bottom: 4px;
  color: var(--muted-2);
  font-size: 13px;
  font-weight: 500;
}
.token-detail-grid strong {
  font-size: 22px;
  font-weight: 750;
  letter-spacing: -.02em;
}
.token-detail-address-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 650;
}
.token-detail-address-row button,
.token-detail-address-row a {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  text-decoration: none;
  cursor: pointer;
}
.token-detail-address-row button:hover,
.token-detail-address-row a:hover {
  background: rgba(255,255,255,.06);
  color: var(--text);
}

body[data-theme="light"] .token-search,
body[data-theme="light"] .network-search {
  background: #f3eef8;
}
body[data-theme="light"] .token-row:hover,
body[data-theme="light"] .network-row:hover,
body[data-theme="light"] .token-footnote:hover,
body[data-theme="light"] .network-pin-btn:hover,
body[data-theme="light"] .token-picker-back:hover,
body[data-theme="light"] .token-detail-x:hover {
  background: rgba(101, 60, 162, 0.06);
}
body[data-theme="light"] .token-pin-btn.is-on,
body[data-theme="light"] .network-pin-btn.is-on {
  color: #7a49c9;
}
body[data-theme="light"] .network-row.active {
  background: rgba(101, 60, 162, 0.12);
}
body[data-theme="light"] .token-chain-badge {
  border-color: #ffffff;
}
body[data-theme="light"] .token-detail-backdrop {
  background: rgba(255, 255, 255, .28);
}
body[data-theme="light"] .token-detail-card {
  background: #ffffff;
  box-shadow: 0 18px 50px rgba(80, 40, 120, 0.18);
}
body[data-theme="light"] .token-verified { color: #2563eb; }

.token-chain-strip { display: none; }

@media (max-width: 860px) {
  .token-chain-strip {
    display: flex;
    gap: 8px;
    flex: 0 0 auto;
    margin: 0 -4px;
    padding: 2px 4px 4px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .token-chain-strip::-webkit-scrollbar { display: none; }
  .chain-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
    min-height: 40px;
    padding: 0 14px 0 8px;
    border: 1.5px solid transparent;
    border-radius: 999px;
    background: var(--surface-2);
    color: var(--text);
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
  }
  .chain-chip.active {
    border-color: var(--logo-primary);
    background: rgba(101, 60, 162, .28);
  }
  .chain-chip .network-logo,
  .chain-chip .network-all-icons { flex: 0 0 auto; }
  .chain-chip .network-logo { width: 24px; height: 24px; }
  .chain-chip .network-all-icons { width: 24px; height: 24px; gap: 1px; }
  .chain-chip .network-all-icons img { width: 11px; height: 11px; }
  .swap-shell[data-panel="tokens"] {
    grid-template-columns: min(416px, calc(100vw - 24px));
    grid-template-rows: minmax(520px, min(78vh, 680px));
    top: 72px !important;
  }
  .swap-shell[data-panel="tokens"] .network-panel {
    display: none !important;
  }
  .swap-shell[data-panel="tokens"] .view-switcher {
    display: none;
  }
}

/* —— Scan (Jumper-like transfers feed + detail) —— */
.scan-view {
  position: relative;
  z-index: 10;
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 8px 20px 96px;
}
.scan-view[hidden] { display: none !important; }

.scan-hero {
  display: grid;
  gap: 12px;
  justify-items: center;
  margin: 8px 0 22px;
}

.scan-search {
  display: flex;
  align-items: center;
  gap: 12px;
  width: min(640px, 100%);
  min-width: 0;
  min-height: 56px;
  padding: 0 20px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.scan-search iconify-icon {
  color: var(--muted-2);
  flex: 0 0 auto;
}

.scan-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 16px;
  font-weight: 600;
}

.scan-search input::placeholder {
  color: var(--muted-2);
  font-weight: 500;
}

.scan-live {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  font-weight: 600;
}
.scan-live[hidden] { display: none !important; }

.scan-panel {
  position: relative;
}

.scan-feed[hidden],
.scan-detail[hidden] { display: none !important; }

.scan-table {
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.04);
  overflow: hidden;
}

.scan-status {
  margin: 0;
  padding: 56px 16px;
  text-align: center;
  color: var(--muted);
  font-size: 15px;
  font-weight: 600;
}
.scan-status.is-error { color: #ef9a9a; }
.scan-status[hidden] { display: none !important; }

.scan-head,
.scan-row {
  display: grid;
  grid-template-columns: minmax(200px, 1.15fr) minmax(200px, 1.25fr) minmax(200px, 1.25fr) minmax(140px, 0.9fr);
  gap: 10px 16px;
  align-items: center;
}

.scan-head {
  padding: 18px 22px 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.scan-rows {
  display: flex;
  flex-direction: column;
}

.scan-row {
  width: 100%;
  margin: 0;
  padding: 16px 22px;
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 0;
  background: transparent;
  text-align: left;
  color: inherit;
  font: inherit;
  cursor: pointer;
  transition: background .16s ease;
}

.scan-row:hover {
  background: rgba(255, 255, 255, 0.035);
}

.scan-col-transfer {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.scan-status-icon {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  color: #3dd68c;
}

.scan-status-icon.is-pending { color: #f0b429; }
.scan-status-icon.is-failed { color: #ef5350; }

.scan-transfer-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.scan-transfer-copy strong {
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.scan-transfer-copy span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
}

.scan-token {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.scan-token-icons {
  position: relative;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
}

.scan-token-logo,
.scan-via-logo {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.08);
}

.scan-via-logo {
  width: 32px;
  height: 32px;
}

.scan-token-logo.is-fallback,
.scan-via-logo.is-fallback,
.scan-chain-badge.is-fallback {
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.8);
}

.scan-chain-badge {
  position: absolute;
  right: -3px;
  bottom: -3px;
  width: 18px;
  height: 18px;
  border-radius: 6px;
  border: 2px solid #171022;
  background: #171022;
  object-fit: cover;
}

.scan-token-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.scan-token-copy strong {
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.scan-token-copy span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scan-via {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: #fff;
  font-size: 14px;
  font-weight: 650;
}

.scan-via-icon-wrap {
  position: relative;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
}

.scan-via-arrow {
  position: absolute;
  right: -3px;
  bottom: -3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #2a1f3d;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.scan-via-arrow::before {
  content: "";
  position: absolute;
  inset: 4px;
  border-right: 1.5px solid rgba(255, 255, 255, 0.75);
  border-bottom: 1.5px solid rgba(255, 255, 255, 0.75);
  transform: rotate(45deg) translate(-1px, -1px);
}

.scan-via > span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Detail view */
.scan-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px;
  padding: 8px 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
  cursor: pointer;
}
.scan-back:hover { color: #fff; }

.scan-detail-shell {
  display: grid;
  gap: 16px;
}

.scan-detail-top,
.scan-side-card {
  padding: 22px 24px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.045);
}

.scan-badge-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.scan-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 4px 10px 4px 8px;
  border-radius: 999px;
  background: rgba(61, 214, 140, 0.14);
  color: #3dd68c;
  font-size: 13px;
  font-weight: 700;
}
.scan-pill.is-failed {
  background: rgba(239, 83, 80, 0.14);
  color: #ef5350;
}
.scan-pill.is-pending {
  background: rgba(240, 180, 41, 0.16);
  color: #f0b429;
}

.scan-pill-time {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.scan-transfer-line {
  margin-bottom: 22px;
}

.scan-kv-label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.scan-transfer-hash,
.scan-kv-value,
.scan-meta-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.scan-transfer-hash strong {
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  word-break: break-all;
  line-height: 1.3;
}

.scan-hash-actions {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
}

.scan-icon-btn {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  text-decoration: none;
  cursor: pointer;
}
.scan-icon-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.scan-meta-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.scan-meta-card {
  min-width: 0;
}

.scan-meta-row strong,
.scan-integrator {
  color: #fff;
  font-size: 16px;
  font-weight: 700;
}

.scan-detail-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.scan-side-card h3 {
  margin: 0 0 16px;
  color: #fff;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.scan-side-card .scan-token {
  margin-bottom: 18px;
}

.scan-kv + .scan-kv {
  margin-top: 14px;
}

.scan-kv-value strong {
  color: #fff;
  font-size: 15px;
  font-weight: 700;
}

@media (max-width: 980px) {
  .scan-head { display: none; }
  .scan-row {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 16px 18px;
  }
  .scan-meta-grid,
  .scan-detail-split {
    grid-template-columns: 1fr;
  }
  .scan-transfer-hash strong {
    font-size: 15px;
  }
}

body[data-theme="light"] .scan-search {
  background: #ffffff;
  border-color: rgba(80, 40, 120, 0.08);
  box-shadow: 0 8px 24px rgba(80, 40, 120, 0.08);
}

body[data-theme="light"] .scan-live {
  color: #5f4d73;
}

body[data-theme="light"] .scan-table,
body[data-theme="light"] .scan-detail-top,
body[data-theme="light"] .scan-side-card {
  background: #ffffff;
  border-color: rgba(80, 40, 120, 0.06);
  box-shadow: 0 8px 28px rgba(80, 40, 120, 0.06);
}

body[data-theme="light"] .scan-row {
  border-top-color: rgba(80, 40, 120, 0.06);
}

body[data-theme="light"] .scan-row:hover {
  background: #faf8fc;
}

body[data-theme="light"] .scan-transfer-copy strong,
body[data-theme="light"] .scan-token-copy strong,
body[data-theme="light"] .scan-via,
body[data-theme="light"] .scan-transfer-hash strong,
body[data-theme="light"] .scan-meta-row strong,
body[data-theme="light"] .scan-integrator,
body[data-theme="light"] .scan-side-card h3,
body[data-theme="light"] .scan-kv-value strong,
body[data-theme="light"] .scan-back:hover {
  color: #241433;
}

body[data-theme="light"] .scan-chain-badge {
  border-color: #ffffff;
  background: #ffffff;
}

body[data-theme="light"] .scan-token-logo,
body[data-theme="light"] .scan-via-logo {
  background: #f3edf8;
}

body[data-theme="light"] .scan-via-arrow {
  background: #ebe3f4;
}

body[data-theme="light"] .scan-token-logo.is-fallback,
body[data-theme="light"] .scan-via-logo.is-fallback {
  color: #653ca2;
}

/* —— Blog —— */
.blog-view {
  width: min(820px, calc(100% - 32px));
  margin: 0 auto;
  padding: 12px 0 48px;
}

.blog-view[hidden] { display: none !important; }

.blog-hero {
  margin-bottom: 28px;
}

.blog-hero-title {
  margin: 0 0 8px;
  font-size: clamp(2rem, 4vw, 2.75rem);
  letter-spacing: -0.03em;
  color: #f4f2ff;
}

.blog-hero-sub {
  margin: 0;
  color: rgba(226, 220, 255, 0.62);
  font-size: 1.05rem;
}

.blog-status {
  margin: 0 0 16px;
  color: rgba(226, 220, 255, 0.55);
}

.blog-status.is-error { color: #ef9a9a; }
.blog-status[hidden] { display: none !important; }

.blog-list {
  display: grid;
  gap: 12px;
}

.blog-empty {
  margin: 0;
  color: rgba(226, 220, 255, 0.5);
}

.blog-card {
  display: block;
  padding: 18px 20px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(20, 16, 36, 0.55);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.blog-card:hover {
  border-color: rgba(168, 140, 255, 0.35);
  background: rgba(32, 24, 56, 0.72);
  transform: translateY(-1px);
}

.blog-card-meta {
  font-size: 0.8rem;
  color: rgba(226, 220, 255, 0.45);
  margin-bottom: 8px;
}

.blog-card-title {
  margin: 0;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  color: #f7f4ff;
}

.blog-card-sub {
  margin: 8px 0 0;
  color: rgba(226, 220, 255, 0.62);
  line-height: 1.45;
}

.blog-article-panel[hidden],
.blog-panel[hidden] { display: none !important; }

.blog-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 20px;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(226, 220, 255, 0.7);
  font: inherit;
  cursor: pointer;
}

.blog-back:hover { color: #fff; }

.blog-article-date {
  margin: 0 0 10px;
  font-size: 0.85rem;
  color: rgba(226, 220, 255, 0.45);
}

.blog-article-title {
  margin: 0 0 10px;
  font-size: clamp(1.75rem, 3.5vw, 2.4rem);
  letter-spacing: -0.03em;
  color: #f7f4ff;
}

.blog-article-sub {
  margin: 0 0 24px;
  font-size: 1.15rem;
  color: rgba(226, 220, 255, 0.65);
  line-height: 1.45;
}

.blog-article-body {
  color: rgba(236, 232, 255, 0.88);
  font-size: 1.05rem;
  line-height: 1.7;
}

.blog-article-body p {
  margin: 0 0 1.1em;
}

.blog-article-body p:last-child { margin-bottom: 0; }

body[data-theme="light"] .blog-hero-title,
body[data-theme="light"] .blog-card-title,
body[data-theme="light"] .blog-article-title {
  color: #241433;
}

body[data-theme="light"] .blog-hero-sub,
body[data-theme="light"] .blog-card-sub,
body[data-theme="light"] .blog-article-sub,
body[data-theme="light"] .blog-status,
body[data-theme="light"] .blog-card-meta,
body[data-theme="light"] .blog-article-date,
body[data-theme="light"] .blog-back,
body[data-theme="light"] .blog-empty {
  color: rgba(36, 20, 51, 0.62);
}

body[data-theme="light"] .blog-card {
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(36, 20, 51, 0.08);
}

body[data-theme="light"] .blog-card:hover {
  background: #fff;
  border-color: rgba(101, 60, 162, 0.28);
}

body[data-theme="light"] .blog-article-body {
  color: rgba(36, 20, 51, 0.88);
}

body[data-theme="light"] .blog-back:hover {
  color: #241433;
}

@media (max-width: 640px) {
  .blog-view {
    width: calc(100% - 24px);
    padding: 8px 0 calc(28px + env(safe-area-inset-bottom));
  }
  .blog-hero { margin-bottom: 18px; }
  .blog-hero-title { font-size: 1.7rem; }
  .blog-hero-sub { font-size: 0.95rem; }
  .blog-card { padding: 14px 16px; border-radius: 14px; }
  .blog-card-title { font-size: 1.08rem; }
  .blog-card-sub { font-size: 0.92rem; }
  .blog-article-title { font-size: 1.4rem; }
  .blog-article-sub { font-size: 1rem; margin-bottom: 18px; }
  .blog-article-body { font-size: 0.98rem; line-height: 1.65; }
  .blog-back { margin-bottom: 14px; }
}

@media (max-width: 380px) {
  .blog-view { width: calc(100% - 16px); }
  .blog-hero-title { font-size: 1.45rem; }
  .blog-article-title { font-size: 1.25rem; }
}

