/* =========================================================================
   PancakeSwapV3 Portfolio — faithful PancakeSwap "bubblegum" light theme.
   Design tokens mirror the official PancakeSwap UIKit.
   ========================================================================= */
:root {
  --primary:        #1FC7D4;
  --primary-bright: #53DEE9;
  --primary-dark:   #0098A1;
  --secondary:      #7645D9;
  --secondary-2:    #9A6AFF;
  --success:        #31D0AA;
  --warning:        #FFB237;
  --failure:        #ED4B9E;
  --gold:           #FFC700;

  --bg-top:   #E6FDFF;
  --bg-bot:   #F3EFFF;
  --card:     #FFFFFF;
  --card-2:   #FAF9FA;
  --border:   #E7E3EB;
  --input:    #EEEAF4;
  --input-2:  #D7CAEC;
  --tertiary: #EFF4F5;

  --text:      #280D5F;
  --subtle:    #7A6EAA;
  --disabled:  #BDC2C4;

  --glass:       rgba(255,255,255,.72);
  --out-text:    #C77E00;
  --border-hi:   #E0D7F0;
  --bg-glow:     rgba(255,255,255,.85);
  --bg-glow2:    rgba(83,222,233,.18);

  --grad-brand:  linear-gradient(118deg, var(--primary) 0%, var(--secondary) 100%);
  --grad-bubble: linear-gradient(139.73deg, #E6FDFF 0%, #F3EFFF 100%);
  --grad-text:   linear-gradient(90deg, var(--primary-dark) 0%, var(--secondary) 100%);

  --sh-card:  0px 2px 12px -8px rgba(25,19,38,.1), 0px 1px 1px rgba(25,19,38,.05);
  --sh-hover: 0px 12px 28px -12px rgba(118,69,217,.35), 0px 2px 8px -4px rgba(25,19,38,.08);
  --sh-btn:   inset 0px -1px 0px 0px rgba(14,14,44,.4);
  --sh-input: inset 0px 2px 2px -1px rgba(74,74,104,.1);
  --sh-focus: 0px 0px 0px 1px var(--secondary), 0px 0px 0px 4px rgba(118,69,217,.2);

  --r-card: 24px;
  --r:      16px;
  --r-sm:   12px;
  --r-xs:   8px;

  --ease:     cubic-bezier(.25,.46,.45,.94);
  --ease-out: cubic-bezier(.16,1,.3,1);
  --font: 'Kanit', 'Trebuchet MS', system-ui, sans-serif;
}

/* ---- Dark theme (PancakeSwap "dark") ---- */
:root[data-theme="dark"] {
  --primary-dark: #53DEE9;
  --card:     #27262C;
  --card-2:   #1B1A21;
  --border:   #383241;
  --input:    #372F47;
  --input-2:  #493F5E;
  --tertiary: #353547;

  --text:     #F4EEFF;
  --subtle:   #B8ADD2;
  --disabled: #666171;

  --glass:     rgba(255,255,255,.05);
  --out-text:  #FFC94D;
  --border-hi: #4A4160;
  --bg-glow:   rgba(155,106,255,.20);
  --bg-glow2:  rgba(31,199,212,.14);

  --grad-bubble: linear-gradient(139.73deg, #23283B 0%, #2E2140 100%);

  --sh-card:  0px 2px 12px -8px rgba(0,0,0,.6), 0px 1px 1px rgba(0,0,0,.35);
  --sh-hover: 0px 14px 30px -14px rgba(0,0,0,.8), 0px 2px 8px -4px rgba(0,0,0,.4);
  --sh-input: inset 0px 2px 2px -1px rgba(0,0,0,.35);
  --sh-focus: 0px 0px 0px 1px var(--primary), 0px 0px 0px 4px rgba(31,199,212,.22);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  width: 420px;
  font-family: var(--font);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body {
  position: relative;
  min-height: 520px;
  overflow-x: hidden;
  scroll-behavior: smooth;
  background:
    radial-gradient(80% 55% at 12% -6%, var(--bg-glow), transparent 60%),
    radial-gradient(70% 50% at 100% 4%, var(--bg-glow2), transparent 60%),
    var(--grad-bubble);
}

/* smooth light/dark cross-fade */
body, .pos, .summary, .chip, .amt, .search-field, .sum-cell, .foot,
.tag, .refresh, .demo-btn, .retry, .theme-btn, .skel, .bar {
  transition: background-color .3s var(--ease), color .3s var(--ease),
              border-color .3s var(--ease), box-shadow .3s var(--ease);
}

button { font-family: inherit; cursor: pointer; border: none; background: none; }
input  { font-family: inherit; }
::selection { background: rgba(31,199,212,.28); }

/* ---- brand mark (chrome-badged store icon) ---- */
.brand-mark {
  width: 40px; height: 40px; flex: none; border-radius: 10px;
  display: block; object-fit: contain;
  filter: drop-shadow(0 4px 10px rgba(118, 69, 217, .22));
}

/* =========================================================================
   Splash
   ========================================================================= */
.splash {
  position: fixed; inset: 0; z-index: 50;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px;
  background:
    radial-gradient(70% 50% at 50% 34%, var(--bg-glow), transparent 70%),
    var(--grad-bubble);
  transition: opacity .55s var(--ease), visibility .55s var(--ease);
}
.splash.hide { opacity: 0; visibility: hidden; pointer-events: none; }
.splash-glow {
  position: absolute; width: 240px; height: 240px; border-radius: 50%;
  top: 24%; background: var(--grad-brand); filter: blur(70px); opacity: .28;
  animation: pulse 2.6s var(--ease) infinite;
}
@keyframes pulse { 0%,100%{ transform: scale(.9); opacity:.22 } 50%{ transform: scale(1.08); opacity:.36 } }

.splash-mark { position: relative; width: 120px; height: 120px; margin-bottom: 10px;
  display: flex; align-items: center; justify-content: center; }
.splash-logo {
  width: 96px; height: 96px; border-radius: 22px; display: block; object-fit: contain;
  filter: drop-shadow(0 14px 22px rgba(118, 69, 217, .28));
  animation: logoIn .7s var(--ease-out) both;
}
@keyframes logoIn {
  0%   { opacity: 0; transform: translateY(-18px) scale(.86); }
  65%  { transform: translateY(3px) scale(1.04); }
  100% { opacity: 1; transform: none; }
}
.splash-word {
  font-size: 28px; font-weight: 700; letter-spacing: .2px;
  color: var(--text); animation: rise .6s .5s var(--ease-out) both;
}
.splash-word span {
  background: var(--grad-text); -webkit-background-clip: text; background-clip: text;
  color: transparent; margin-left: 4px;
}
.splash-sub {
  font-size: 12px; font-weight: 600; letter-spacing: 5px; text-transform: uppercase;
  color: var(--subtle); animation: rise .6s .62s var(--ease-out) both;
}
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.splash-bar {
  margin-top: 24px; width: 168px; height: 5px; border-radius: 4px;
  background: rgba(122,110,170,.16); overflow: hidden;
  animation: rise .6s .7s var(--ease-out) both;
}
.splash-bar i { display: block; height: 100%; width: 42%; border-radius: 4px;
  background: var(--grad-brand); animation: load 1.5s var(--ease) forwards; }
@keyframes load { 0%{ transform: translateX(-110%);} 100%{ transform: translateX(320%);} }

/* =========================================================================
   App shell
   ========================================================================= */
.app { display: flex; flex-direction: column; min-height: 520px;
  animation: fadeApp .5s var(--ease-out) both; }
@keyframes fadeApp { from { opacity: 0; } to { opacity: 1; } }

.topbar { display: flex; align-items: center; justify-content: space-between;
  padding: 15px 16px 10px; }
.brand { display: flex; align-items: center; gap: 11px; }
.brand-title { font-size: 18px; font-weight: 700; line-height: 1.05; color: var(--text); }
.brand-title b { font-weight: 700; background: var(--grad-text);
  -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand-sub { font-size: 10px; font-weight: 600; letter-spacing: 1.6px;
  text-transform: uppercase; color: var(--subtle); }

.top-actions { display: flex; align-items: center; gap: 8px; }
.theme-btn { width: 34px; height: 34px; border-radius: 12px; color: var(--subtle);
  background: var(--card); border: 1px solid var(--border); box-shadow: var(--sh-card);
  display: grid; place-items: center; transition: opacity .2s, transform .1s, color .2s; }
.theme-btn:hover { opacity: .7; }
.theme-btn:active { transform: translateY(1px); }
.theme-btn svg { width: 17px; height: 17px; }
.theme-btn .ic-moon { display: none; }
:root[data-theme="dark"] .theme-btn .ic-sun { display: none; }
:root[data-theme="dark"] .theme-btn .ic-moon { display: block; color: var(--gold); }

.netlogo { width: 17px; height: 17px; border-radius: 50%; flex: none; display: block; }
.netlogo-sm { width: 13px; height: 13px; border-radius: 50%; flex: none; }

.ro-pill { display: inline-flex; align-items: center; gap: 6px;
  font-size: 10px; font-weight: 700; letter-spacing: .8px; color: var(--success);
  padding: 6px 11px; border-radius: 999px;
  background: rgba(49,208,170,.1); border: 1px solid rgba(49,208,170,.28); }
.ro-pill .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--success);
  animation: beat 2s infinite; }
@keyframes beat { 0%{ box-shadow: 0 0 0 0 rgba(49,208,170,.5);} 70%{ box-shadow: 0 0 0 6px rgba(49,208,170,0);} 100%{ box-shadow: 0 0 0 0 rgba(49,208,170,0);} }

/* ---- search ---- */
.search { display: flex; gap: 8px; padding: 6px 16px 12px; }
.search-field { flex: 1; display: flex; align-items: center; gap: 8px;
  background: var(--input); border-radius: var(--r); padding: 0 14px;
  box-shadow: var(--sh-input); border: 1px solid transparent;
  transition: box-shadow .18s var(--ease), border-color .18s var(--ease); }
.search-field:focus-within { box-shadow: var(--sh-focus), var(--sh-input); }
.search-field .ico { color: var(--subtle); flex: none; }
.search-field input { flex: 1; background: none; border: none; outline: none;
  color: var(--text); font-size: 13.5px; font-weight: 500; padding: 12px 0; letter-spacing: .2px; }
.search-field input::placeholder { color: var(--subtle); font-weight: 400; opacity: .8; }
.clear { color: var(--subtle); font-size: 18px; line-height: 1; padding: 2px 4px;
  border-radius: 6px; transition: color .15s; }
.clear:hover { color: var(--text); }

.scan-btn { padding: 0 20px; border-radius: var(--r); font-size: 14px; font-weight: 600;
  color: #fff; background: var(--primary); box-shadow: var(--sh-btn);
  transition: opacity .2s var(--ease), transform .1s var(--ease); }
.scan-btn:hover:not(:disabled) { opacity: .65; }
.scan-btn:active:not(:disabled) { transform: translateY(1px); box-shadow: none; opacity: .85; }
.scan-btn:disabled { opacity: .5; cursor: default; }

/* ---- chain chips ---- */
.chips { display: flex; gap: 7px; padding: 0 16px 12px; flex-wrap: wrap; }
.chip { font-size: 12px; font-weight: 600; letter-spacing: .2px; color: var(--subtle);
  padding: 7px 13px; border-radius: 999px; background: var(--card);
  border: 1px solid var(--border); display: inline-flex; align-items: center; gap: 6px;
  box-shadow: var(--sh-card);
  transition: transform .16s var(--ease), color .16s, background .2s, box-shadow .2s; }
.chip .cd { width: 7px; height: 7px; border-radius: 50%; }
.chip:hover { transform: translateY(-1px); color: var(--text); }
.chip.on { color: #fff; background: var(--primary); border-color: transparent;
  box-shadow: var(--sh-btn); }
.chip.on .cd { background: rgba(255,255,255,.85) !important; }

/* =========================================================================
   Main
   ========================================================================= */
.main { flex: 1; padding: 0 16px 14px; overflow-y: auto; max-height: 470px;
  scroll-behavior: smooth; overscroll-behavior: contain; }
body.full { width: 100%; min-height: 100vh; }
body.full .app { min-height: 100vh; max-width: 920px; margin: 0 auto; }
body.full .main { max-height: none; overflow: visible; padding-bottom: 28px; }
body.full .topbar { padding: 18px 22px 10px; }
body.full .search { padding: 8px 22px 10px; }
body.full .chips { padding: 0 22px 12px; }
body.full .main { padding: 0 22px 28px; }
body.full .foot { padding: 12px 22px 22px; }
body.full .intro p { max-width: 420px; }
body.full .sum-grid { grid-template-columns: repeat(4, 1fr); }

/* ---- Full dashboard CTA (extension popup → web) ---- */
.dash-cta-wrap { padding: 0 16px; margin: 2px 0 4px; }
.dash-cta {
  width: 100%; display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border: 0; border-radius: var(--r);
  background: var(--grad-brand); color: #fff; cursor: pointer; font: inherit;
  text-align: left;
  box-shadow: 0 10px 26px rgba(118, 69, 217, .35), var(--sh-btn);
  transition: transform .16s var(--ease), box-shadow .16s var(--ease), filter .16s;
  position: relative; overflow: hidden;
}
.dash-cta::after {
  content: ''; position: absolute; inset: -40% auto -40% -20%; width: 40%;
  background: linear-gradient(115deg, transparent, rgba(255,255,255,.22), transparent);
  transform: translateX(-120%) skewX(-18deg); pointer-events: none;
}
.dash-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(118, 69, 217, .48), var(--sh-btn);
  filter: brightness(1.04);
}
.dash-cta:hover::after { animation: dash-shine .85s var(--ease); }
.dash-cta:active { transform: translateY(0); }
@keyframes dash-shine { to { transform: translateX(420%) skewX(-18deg); } }
.dash-cta-ic {
  width: 38px; height: 38px; border-radius: 12px; flex-shrink: 0;
  display: grid; place-items: center;
  background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.22);
}
.dash-cta-copy { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1; }
.dash-cta-copy strong { font-weight: 700; font-size: 14.5px; letter-spacing: -.01em; }
.dash-cta-copy small { font-size: 11px; font-weight: 500; opacity: .85; }
.dash-cta-go { display: grid; place-items: center; opacity: .9; flex-shrink: 0; }
.expand-btn svg { width: 16px; height: 16px; }
.foot-link {
  color: var(--subtle); text-decoration: none; font-weight: 600;
}
.foot-link:hover { color: var(--primary-dark); text-decoration: underline; }
.main::-webkit-scrollbar { width: 6px; }
.main::-webkit-scrollbar-thumb { background: var(--input-2); border-radius: 8px; }
.main::-webkit-scrollbar-track { background: transparent; }

/* ---- intro / empty ---- */
.intro { text-align: center; padding: 20px 14px 30px; animation: rise .55s var(--ease-out) both; }
.intro-art { position: relative; width: 100px; height: 100px; margin: 0 auto 18px;
  animation: float 4s ease-in-out infinite; }
@keyframes float { 0%,100%{ transform: translateY(0);} 50%{ transform: translateY(-7px);} }
.ia-ring { position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(from 210deg, var(--primary), var(--secondary), var(--gold), var(--primary));
  -webkit-mask: radial-gradient(circle, transparent 42px, #000 43px);
  mask: radial-gradient(circle, transparent 42px, #000 43px);
  opacity: .9; animation: spin 9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.ia-mark {
  position: absolute; inset: 0; margin: auto; width: 66px; height: 66px;
  border-radius: 16px; display: block; object-fit: contain;
  filter: drop-shadow(0 6px 12px rgba(118, 69, 217, .22));
}
.intro h2 { font-size: 20px; font-weight: 700; margin-bottom: 8px; color: var(--text); }
.intro p { font-size: 12.5px; line-height: 1.6; color: var(--subtle);
  max-width: 320px; margin: 0 auto 18px; font-weight: 400; }
.intro-demo { font-size: 11px; color: var(--subtle); letter-spacing: .3px; margin-bottom: 8px; }
.demo-btn { font-size: 13px; font-weight: 600; color: var(--primary-dark);
  background: var(--card); border: 2px solid var(--primary); padding: 8px 18px;
  border-radius: var(--r); box-shadow: var(--sh-card);
  transition: opacity .2s, transform .1s; }
.demo-btn:hover { opacity: .7; }
.demo-btn:active { transform: translateY(1px); }

/* ---- summary card ---- */
.summary { position: relative; overflow: hidden; border-radius: var(--r-card);
  padding: 18px 18px 16px; margin: 4px 0 14px;
  background: var(--grad-bubble); border: 1px solid var(--border);
  box-shadow: var(--sh-card); animation: pop .5s var(--ease-out) both; }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.99); } to { opacity: 1; transform: none; } }
.summary::after { content: ''; position: absolute; top: -40px; right: -30px;
  width: 130px; height: 130px; border-radius: 50%;
  background: radial-gradient(circle, rgba(83,222,233,.35), transparent 70%); }
.sum-label { position: relative; font-size: 10px; letter-spacing: 1.2px;
  text-transform: uppercase; color: var(--subtle); font-weight: 600; }
.sum-total { position: relative; font-size: 36px; font-weight: 700; letter-spacing: -.5px;
  margin: 3px 0 14px; color: var(--text); font-variant-numeric: tabular-nums; line-height: 1; }
.sum-total .cur { color: var(--subtle); font-weight: 600; font-size: 22px; margin-right: 2px; }
.sum-grid { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.sum-cell { background: var(--glass); border: 1px solid var(--border);
  border-radius: var(--r); padding: 10px 11px; backdrop-filter: blur(4px); }
.sum-cell .k { font-size: 9.5px; color: var(--subtle); letter-spacing: .4px;
  text-transform: uppercase; font-weight: 600; }
.sum-cell .v { font-size: 17px; font-weight: 700; margin-top: 2px; color: var(--text);
  font-variant-numeric: tabular-nums; }
.sum-cell .v.fees, .sum-cell .v.green { color: var(--success); }

/* ---- toolbar ---- */
.toolbar { display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 11px; padding: 0 2px; }
.toolbar .count { font-size: 12.5px; color: var(--subtle); font-weight: 500; }
.toolbar .count b { color: var(--text); font-weight: 700; }
.tools { display: flex; align-items: center; gap: 10px; }
.toggle-closed { font-size: 11.5px; font-weight: 600; color: var(--subtle);
  display: inline-flex; align-items: center; gap: 6px; user-select: none; cursor: pointer; }
.toggle-closed input { display: none; }
.tg { width: 32px; height: 18px; border-radius: 999px; background: var(--input-2);
  position: relative; transition: background .2s var(--ease); }
.tg::after { content: ''; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px;
  border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2);
  transition: transform .2s var(--ease-out); }
.toggle-closed input:checked + .tg { background: var(--primary); }
.toggle-closed input:checked + .tg::after { transform: translateX(14px); }
.refresh { width: 32px; height: 32px; border-radius: 10px; color: var(--primary-dark);
  background: var(--card); border: 1px solid var(--border); box-shadow: var(--sh-card);
  display: grid; place-items: center; transition: opacity .2s, transform .1s; }
.refresh:hover { opacity: .7; }
.refresh:active { transform: translateY(1px); }
.refresh svg { width: 15px; height: 15px; }
.refresh.spin svg { animation: spin .8s linear infinite; }

/* ---- position card ---- */
.pos { position: relative; border-radius: var(--r-card); padding: 14px 15px 15px;
  margin-bottom: 12px; background: var(--card); border: 1px solid var(--border);
  box-shadow: var(--sh-card); animation: cardIn .5s var(--ease-out) both;
  transition: transform .22s var(--ease-out), box-shadow .22s var(--ease-out), border-color .22s; }
@keyframes cardIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.pos:hover { transform: translateY(-3px); box-shadow: var(--sh-hover); border-color: var(--border-hi); }
.pos.closed { opacity: .78; }

.pos-top { display: flex; align-items: center; gap: 11px; margin-bottom: 13px; }
.duo { position: relative; width: 48px; height: 32px; flex: none; }
.tok { position: absolute; top: 0; width: 32px; height: 32px; border-radius: 50%;
  overflow: hidden; background: var(--tertiary); border: 2px solid var(--card);
  display: grid; place-items: center; font-size: 10px; font-weight: 700; color: #fff;
  letter-spacing: -.3px; }
.tok.t0 { left: 0; z-index: 2; }
.tok.t1 { right: 0; }
.tok img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pos-id { flex: 1; min-width: 0; }
.pair { font-size: 15.5px; font-weight: 700; line-height: 1.1; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pair .sep { color: var(--subtle); margin: 0 3px; font-weight: 500; }
.meta-row { display: flex; align-items: center; gap: 6px; margin-top: 5px; }
.tag { font-size: 10px; font-weight: 600; letter-spacing: .2px; padding: 3px 8px;
  border-radius: var(--r-xs); background: var(--input); color: var(--subtle); }
.tag.fee { background: rgba(31,199,212,.12); color: var(--primary-dark); }
.tag.chain { display: inline-flex; align-items: center; gap: 5px; background: var(--card);
  border: 1px solid var(--border); }
.tag.chain .cd { width: 6px; height: 6px; border-radius: 50%; }
.status { margin-left: auto; font-size: 10px; font-weight: 700; letter-spacing: .3px;
  padding: 5px 10px; border-radius: 999px; display: inline-flex; align-items: center; gap: 5px; }
.status .sd { width: 6px; height: 6px; border-radius: 50%; }
.status.in { color: var(--success); background: rgba(49,208,170,.12); }
.status.in .sd { background: var(--success); animation: beat 2s infinite; }
.status.out { color: var(--out-text); background: rgba(255,178,55,.16); }
.status.out .sd { background: var(--warning); }
.status.closed { color: var(--subtle); background: var(--tertiary); }
.status.closed .sd { background: var(--disabled); }

/* amounts */
.amounts { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-bottom: 13px; }
.amt { background: var(--tertiary); border-radius: var(--r); padding: 9px 11px; }
.amt .sym { font-size: 10.5px; color: var(--subtle); font-weight: 600; letter-spacing: .2px; }
.amt .num { font-size: 14px; font-weight: 700; margin-top: 2px; color: var(--text);
  font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.amt .usd { font-size: 10.5px; color: var(--subtle); margin-top: 1px; font-weight: 500; }

/* range bar */
.range { margin-top: 2px; }
.range-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.range-head .rl { font-size: 9.5px; color: var(--subtle); letter-spacing: .5px;
  text-transform: uppercase; font-weight: 600; }
.range-head .rc { font-size: 11px; color: var(--subtle); font-weight: 500; }
.range-head .rc b { color: var(--text); font-weight: 700; font-variant-numeric: tabular-nums; }
.bar { position: relative; height: 8px; border-radius: 999px; background: var(--input); }
.bar .fill { position: absolute; top: 0; height: 100%; border-radius: 999px;
  background: var(--grad-brand); opacity: .9; transform-origin: left;
  animation: grow .6s var(--ease-out) both; }
.bar.out .fill { background: linear-gradient(90deg, var(--warning), var(--gold)); }
@keyframes grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.bar .cur { position: absolute; top: 50%; width: 4px; height: 17px; border-radius: 3px;
  background: var(--text); transform: translate(-50%, -50%);
  box-shadow: 0 0 0 3px var(--card), 0 2px 5px rgba(40,13,95,.25);
  animation: markIn .5s .25s var(--ease-out) both; }
@keyframes markIn { from { opacity: 0; transform: translate(-50%, -50%) scale(.4); } to { opacity: 1; transform: translate(-50%, -50%) scale(1); } }
.range-scale { display: flex; justify-content: space-between; margin-top: 7px; }
.range-scale span { font-size: 10px; color: var(--subtle); font-variant-numeric: tabular-nums; font-weight: 500; }

/* fees line */
.fees-line { display: flex; align-items: center; justify-content: space-between;
  margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.fees-line .fl-k { font-size: 11.5px; color: var(--subtle); font-weight: 500;
  display: inline-flex; align-items: center; gap: 6px; }
.fees-line .fl-k svg { width: 13px; height: 13px; color: var(--success); }
.fees-line .fl-v { font-size: 13px; font-weight: 700; color: var(--success);
  font-variant-numeric: tabular-nums; }
.fees-line .fl-v.zero { color: var(--subtle); }

/* ---- states ---- */
.status-line { text-align: center; font-size: 12px; color: var(--subtle);
  padding: 10px 0 16px; font-weight: 500; }
.status-line .sp { display: inline-block; width: 14px; height: 14px; margin-right: 7px;
  vertical-align: -2px; border: 2px solid rgba(31,199,212,.25); border-top-color: var(--primary);
  border-radius: 50%; animation: spin .7s linear infinite; }
.skel { border-radius: var(--r-card); height: 130px; margin-bottom: 12px; border: 1px solid var(--border);
  background: linear-gradient(100deg, var(--card) 30%, var(--tertiary) 50%, var(--card) 70%);
  background-size: 200% 100%; animation: shimmer 1.3s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

.msg { text-align: center; padding: 34px 20px; animation: rise .45s var(--ease-out) both; }
.msg .emoji { font-size: 40px; margin-bottom: 10px; }
.msg h3 { font-size: 17px; font-weight: 700; margin-bottom: 6px; color: var(--text); }
.msg p { font-size: 12.5px; color: var(--subtle); line-height: 1.55; max-width: 300px; margin: 0 auto; }
.msg.error h3 { color: var(--failure); }
.retry { margin-top: 16px; font-size: 13px; font-weight: 600; color: var(--primary-dark);
  background: var(--card); border: 2px solid var(--primary); padding: 8px 20px;
  border-radius: var(--r); box-shadow: var(--sh-card); transition: opacity .2s, transform .1s; }
.retry:hover { opacity: .7; }
.retry:active { transform: translateY(1px); }

/* ---- footer ---- */
.foot { display: flex; justify-content: space-between; align-items: center;
  padding: 11px 16px 13px; border-top: 1px solid var(--border);
  font-size: 10.5px; color: var(--subtle); letter-spacing: .2px; }
