:root {
  color-scheme: dark;
  --bg: #030205;
  --panel: rgba(14, 10, 24, 0.92);
  --panel-2: rgba(28, 18, 50, 0.95);
  --line: rgba(168, 130, 255, 0.22);
  --hot-line: rgba(255, 177, 59, 0.45);
  --text: #f5f0ff;
  --muted: #9d8eb8;
  --purple: #b06fff;
  --purple-2: #7c3aed;
  --orange: #ff9f2e;
  --orange-2: #ff7b00;
  --green: #34d399;
  --radius: 12px;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html { -webkit-tap-highlight-color: transparent; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(160, 90, 255, 0.30), transparent 55%),
    radial-gradient(ellipse 60% 40% at 90% 20%, rgba(255, 160, 50, 0.18), transparent 45%),
    radial-gradient(ellipse 50% 30% at 10% 80%, rgba(160, 90, 255, 0.12), transparent 40%),
    var(--bg);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    linear-gradient(rgba(3, 2, 5, 0.90), rgba(3, 2, 5, 0.98)),
    url("./assets/poster.jpg") top center / min(100vw, 760px) auto no-repeat;
  opacity: 0.35;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    radial-gradient(circle at center, rgba(168, 130, 255, 0.09) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(ellipse 75% 65% at 50% 35%, rgba(0,0,0,1), transparent 100%);
  opacity: 0.45;
}

button, input { font: inherit; }
button { cursor: pointer; }

button:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.55); }
  50% { box-shadow: 0 0 0 6px rgba(52, 211, 153, 0); }
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

@keyframes border-glow {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

.app-shell {
  position: relative;
  z-index: 1;
  width: min(430px, 100vw);
  min-height: 100vh;
  margin: 0 auto;
  padding: 14px 14px 94px;
  background: linear-gradient(180deg, rgba(3, 2, 5, 0.25), rgba(3, 2, 5, 0.92) 30%, #030205);
}

.app-top {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 8px 0 14px;
  backdrop-filter: blur(20px) saturate(1.2);
}

.brand-lockup {
  width: 148px;
  height: 38px;
  overflow: hidden;
  display: flex;
  align-items: center;
}

.brand-lockup img {
  width: 148px;
  height: 148px;
  object-fit: cover;
}

.wallet-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--hot-line);
  background: linear-gradient(135deg, rgba(255, 159, 46, 0.12), rgba(255, 123, 0, 0.08));
  color: #ffe8c2;
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 0 16px rgba(255, 159, 46, 0.10), inset 0 1px 0 rgba(255,255,255,0.06);
}

.wallet-chip span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  animation: pulse-dot 2.2s infinite;
}

.wallet-chip b {
  font: inherit;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tab-screen {
  display: none;
  animation: screenIn 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

.tab-screen.active { display: block; }

@keyframes screenIn {
  from { opacity: 0; transform: translateY(10px) scale(0.995); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.hero-card,
.balance-card,
.panel,
.asset-card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  box-shadow:
    0 24px 80px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255,255,255,0.06),
    0 0 0 1px rgba(168, 130, 255, 0.08);
  backdrop-filter: blur(18px) saturate(1.1);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.panel:hover,
.asset-card:hover {
  transform: translateY(-1px);
  box-shadow:
    0 28px 90px rgba(0, 0, 0, 0.60),
    inset 0 1px 0 rgba(255,255,255,0.08),
    0 0 0 1px rgba(168, 130, 255, 0.12),
    0 0 28px rgba(155, 92, 255, 0.10);
}

.hero-card {
  min-height: 320px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background:
    linear-gradient(180deg, rgba(3, 2, 5, 0.25), rgba(3, 2, 5, 0.96)),
    url("./assets/logo.png") center 22px / 420px auto no-repeat,
    var(--panel);
  overflow: hidden;
}

.hero-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  box-shadow: inset 0 0 40px rgba(155, 92, 255, 0.08);
}

.hero-copy p,
.panel-title span,
.card-head span,
.mini-list dt,
.token-row span,
.asset-card span,
.amount-box span,
.swap-box span,
.pool-list span {
  margin: 0;
  color: var(--orange);
  font-size: 11px;
  line-height: 1.2;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.13em;
}

h1, h2 { margin: 0; letter-spacing: 0; }

.hero-copy h1 {
  margin-top: 8px;
  font-size: 36px;
  line-height: 1.02;
  background: linear-gradient(135deg, #fff 30%, #e0c3ff 70%, #ffd28a 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-copy > span {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.mint-balance { min-height: 260px; }
.mint-balance .hero-copy { }

.hero-stats,
.token-row,
.quick-grid,
.reward-row,
.reward-compact {
  display: grid;
  gap: 10px;
}

.hero-stats { grid-template-columns: 1fr 1fr; }

.hero-stats div,
.token-row div,
.quick-grid button,
.reward-row div,
.reward-compact div {
  border: 1px solid rgba(190,150,255,0.14);
  border-radius: var(--radius);
  background: rgba(255,255,255,0.04);
  padding: 12px;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.hero-stats div:hover,
.token-row div:hover,
.reward-compact div:hover {
  border-color: rgba(190,150,255,0.28);
  box-shadow: 0 0 18px rgba(155,92,255,0.10);
}

.token-row div {
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: center;
  gap: 4px 9px;
}

.hero-stats span,
.reward-row span,
.reward-compact span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 6px;
}

.hero-stats strong,
.token-row b,
.reward-row strong,
.reward-compact strong,
.mini-list dd,
.asset-card strong,
.asset-card em,
.claim-value,
.total-value,
.amount-box input,
.swap-box strong {
  font-family: var(--mono);
}

.balance-card,
.panel {
  margin-top: 14px;
  padding: 18px;
}

.card-head,
.panel-title {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}

.icon-btn {
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  background: rgba(255,255,255,0.04);
  transition: background 160ms ease, box-shadow 160ms ease;
}

.icon-btn:hover {
  background: rgba(255,255,255,0.08);
  box-shadow: 0 0 12px rgba(155,92,255,0.18);
}

.total-value {
  display: block;
  margin-bottom: 14px;
  font-size: 34px;
  line-height: 1;
}

.token-row { grid-template-columns: repeat(3, 1fr); }

.token-row b {
  display: block;
  margin-bottom: 5px;
  color: #fff2c7;
}

.mini-token-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center;
  border: 1px solid rgba(255, 220, 162, 0.50);
  background: #030205;
  box-shadow: 0 0 18px rgba(155,92,255,0.38), 0 0 14px rgba(255,177,59,0.18);
}

.token-row .mini-token-icon { grid-row: 1 / 3; }

.token-row b,
.token-row span { min-width: 0; }

.token-row span {
  color: var(--muted);
  letter-spacing: 0;
  text-transform: none;
  overflow-wrap: anywhere;
}

.quick-grid {
  grid-template-columns: repeat(4, 1fr);
  margin-top: 12px;
}

.condition-stack {
  display: grid;
  gap: 9px;
  margin: 14px 0;
}

.status-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0;
}

.status-strip span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  color: #ffe8c2;
  background: linear-gradient(135deg, rgba(255,159,46,0.12), rgba(255,123,0,0.08));
  border: 1px solid rgba(255,159,46,0.25);
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 0 10px rgba(255,159,46,0.08), inset 0 1px 0 rgba(255,255,255,0.04);
}

.muted-strip span {
  color: rgba(245,240,255,0.78);
  background: rgba(255,255,255,0.04);
  border-color: rgba(190,150,255,0.18);
  box-shadow: none;
}

.soft-note {
  margin: -2px 0 14px;
  color: rgba(157,142,184,0.80);
  font-size: 12px;
  line-height: 1.55;
}

.condition-stack div {
  border: 1px solid rgba(190,150,255,0.14);
  border-radius: var(--radius);
  background: rgba(255,255,255,0.04);
  padding: 12px;
}

.condition-stack b,
.condition-stack span { display: block; }

.condition-stack b {
  margin-bottom: 6px;
  color: #fff2c7;
  font-size: 13px;
}

.condition-stack span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.quick-grid button {
  min-height: 82px;
  color: var(--text);
  border: 1px solid rgba(190,150,255,0.16);
  transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease;
}

.quick-grid button:hover {
  transform: translateY(-2px);
  border-color: rgba(190,150,255,0.32);
  box-shadow: 0 8px 22px rgba(0,0,0,0.35), 0 0 18px rgba(155,92,255,0.14);
}

.quick-grid i,
.bottom-tabs i {
  display: grid;
  place-items: center;
  font-style: normal;
  font-weight: 1000;
}

.quick-grid i {
  width: 32px;
  height: 32px;
  margin: 0 auto 8px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--purple), var(--orange));
  box-shadow: 0 0 12px rgba(155,92,255,0.35), 0 0 8px rgba(255,159,46,0.20);
}

.quick-grid span { font-size: 12px; font-weight: 900; }

.panel-title h2 {
  margin-top: 6px;
  font-size: 20px;
  line-height: 1.1;
}

.title-amount {
  color: #fff2c7;
  font-family: var(--mono);
  font-size: 20px;
  white-space: nowrap;
}

.panel-title em {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--hot-line);
  background: linear-gradient(135deg, rgba(255,159,46,0.12), rgba(255,123,0,0.08));
  color: #ffe8c2;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
  box-shadow: 0 0 10px rgba(255,159,46,0.08), inset 0 1px 0 rgba(255,255,255,0.04);
}

.large-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.reward-compact {
  grid-template-columns: 1fr 1fr;
  margin: 2px 0 14px;
}

.reward-compact div { padding: 10px 12px; }

.reward-compact strong {
  display: block;
  color: #fff2c7;
  font-size: 16px;
}

.compact-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 12px 0;
}

.compact-metrics div {
  position: relative;
  border: 1px solid rgba(190,150,255,0.14);
  border-radius: var(--radius);
  background: rgba(255,255,255,0.04);
  padding: 12px;
  overflow: hidden;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.compact-metrics div::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--purple), var(--orange));
  opacity: 0.7;
}

.compact-metrics div:hover {
  border-color: rgba(190,150,255,0.28);
  box-shadow: 0 0 18px rgba(155,92,255,0.10);
}

.compact-metrics span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
}

.compact-metrics strong {
  font-family: var(--mono);
  color: #fff2c7;
}

.balance-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 12px 0 14px;
}

.balance-pair div {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 3px 9px;
  align-items: center;
  border: 1px solid rgba(190,150,255,0.14);
  border-radius: var(--radius);
  background: rgba(255,255,255,0.04);
  padding: 10px;
}

.balance-pair img,
.balance-pair i {
  grid-row: 1 / 3;
  width: 32px;
  height: 32px;
  border-radius: 50%;
}

.balance-pair img {
  object-fit: cover;
  border: 1px solid rgba(255, 220, 162, 0.50);
}

.balance-pair i {
  display: grid;
  place-items: center;
  font-style: normal;
  color: #fff;
  background: linear-gradient(135deg, var(--purple), var(--orange));
  box-shadow: 0 0 10px rgba(155,92,255,0.30);
}

.balance-pair span {
  color: var(--muted);
  font-size: 12px;
}

.balance-pair strong {
  font-family: var(--mono);
  color: #fff2c7;
}

.inline-balances {
  display: grid;
  gap: 8px;
  margin: 12px 0 10px;
}

.inline-balances div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(190,150,255,0.08);
}

.inline-balances span {
  color: rgba(157,142,184,0.85);
  font-size: 13px;
}

.inline-balances strong {
  color: #fff2c7;
  font-family: var(--mono);
  font-size: 14px;
}

.large-line strong,
.claim-value {
  color: #fff2c7;
  font-size: 28px;
  line-height: 1.1;
}

.claim-value {
  background: linear-gradient(135deg, #fff2c7 20%, #ffd28a 60%, #e0c3ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: none;
}

.primary-btn,
.secondary-btn {
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  color: #fff;
  font-weight: 1000;
  letter-spacing: 0.02em;
  transition: transform 140ms ease, box-shadow 160ms ease, filter 160ms ease;
}

.primary-btn {
  position: relative;
  background: linear-gradient(135deg, var(--purple-2), #a855f7 45%, var(--orange));
  box-shadow: 0 8px 24px rgba(155, 92, 255, 0.25), 0 0 0 1px rgba(255,255,255,0.06) inset;
  overflow: hidden;
}

.primary-btn::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, transparent 30%, rgba(255,255,255,0.12) 50%, transparent 70%);
  background-size: 200% 100%;
  mix-blend-mode: overlay;
  animation: shimmer 3.5s infinite linear;
  pointer-events: none;
}

.primary-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
  box-shadow: 0 12px 32px rgba(155, 92, 255, 0.32), 0 0 0 1px rgba(255,255,255,0.08) inset;
}

.primary-btn:active {
  transform: scale(0.98) translateY(0);
}

.secondary-btn {
  border-color: var(--hot-line);
  background: linear-gradient(135deg, rgba(255,159,46,0.16), rgba(255,123,0,0.08));
  box-shadow: 0 6px 18px rgba(255, 123, 0, 0.10), inset 0 1px 0 rgba(255,255,255,0.04);
  color: #ffe8c2;
}

.secondary-btn:hover {
  transform: translateY(-1px);
  background: linear-gradient(135deg, rgba(255,159,46,0.22), rgba(255,123,0,0.12));
  box-shadow: 0 10px 26px rgba(255, 123, 0, 0.16), inset 0 1px 0 rgba(255,255,255,0.06);
}

.secondary-btn:active { transform: scale(0.98) translateY(0); }

.full { width: 100%; }

.mini-list {
  display: grid;
  gap: 8px;
  margin: 14px 0;
}

.mini-list div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 9px;
  border-bottom: 1px solid rgba(190,150,255,0.12);
}

.mini-list dt,
.mini-list dd { margin: 0; }

.mini-list dt {
  color: var(--muted);
  letter-spacing: 0;
  text-transform: none;
}

.mini-list dd {
  text-align: right;
  overflow-wrap: anywhere;
  color: rgba(245,240,255,0.92);
  font-weight: 700;
}

.soft-list div {
  padding-bottom: 7px;
  border-bottom-color: rgba(190,150,255,0.08);
}

.soft-list dt { color: rgba(157,142,184,0.78); }

.soft-list dd {
  color: rgba(245,240,255,0.88);
  font-weight: 700;
}

.amount-box {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--hot-line);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(255,159,46,0.08), rgba(255,123,0,0.04));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), 0 0 18px rgba(255,159,46,0.06);
  transition: box-shadow 160ms ease, border-color 160ms ease;
}

.amount-box:focus-within {
  border-color: rgba(255,159,46,0.65);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 0 24px rgba(255,159,46,0.14);
}

.amount-box span {
  grid-column: 1 / -1;
  color: var(--muted);
  letter-spacing: 0;
  text-transform: none;
}

.amount-box input {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  font-size: 30px;
  font-weight: 900;
}

.amount-box b { color: var(--orange); }

.order-list,
.asset-stack,
.pool-list {
  display: grid;
  gap: 10px;
}

.order-list article,
.asset-card {
  position: relative;
  border-radius: var(--radius);
  border: 1px solid rgba(190,150,255,0.14);
  background: rgba(255,255,255,0.04);
  padding: 13px;
  transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease;
}

.order-list article:hover,
.asset-card:hover {
  border-color: rgba(190,150,255,0.26);
  box-shadow: 0 6px 20px rgba(0,0,0,0.30), 0 0 18px rgba(155,92,255,0.08);
}

.order-list article::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 3px;
  border-radius: 0 999px 999px 0;
  background: linear-gradient(180deg, var(--orange), var(--purple));
  opacity: 0.8;
}

.order-list article.done::before {
  background: linear-gradient(180deg, #34d399, #10b981);
  opacity: 0.9;
}

.order-list b {
  display: inline-flex;
  width: fit-content;
  padding: 5px 9px;
  border-radius: 999px;
  color: #ffe8c2;
  background: linear-gradient(135deg, rgba(255,159,46,0.14), rgba(255,123,0,0.08));
  border: 1px solid rgba(255,159,46,0.22);
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 0 8px rgba(255,159,46,0.08);
}

.order-list b.done {
  color: #c8ffe4;
  background: linear-gradient(135deg, rgba(52,211,153,0.14), rgba(52,211,153,0.06));
  border-color: rgba(52,211,153,0.25);
  box-shadow: 0 0 8px rgba(52,211,153,0.08);
}

.order-list strong,
.order-list span { display: block; }

.order-list strong {
  margin-top: 9px;
  font-family: var(--mono);
  font-size: 16px;
  color: #fff2c7;
}

.order-list span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.asset-card {
  display: grid;
  grid-template-columns: 50px 1fr;
  align-items: center;
  gap: 12px;
}

.coin-mark {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--purple), var(--orange));
  font-weight: 1000;
  box-shadow: 0 0 18px rgba(155,92,255,0.35), 0 0 10px rgba(255,159,46,0.20);
}

.coin-mark.image-mark {
  overflow: hidden;
  padding: 2px;
  border: 1px solid rgba(255, 220, 162, 0.50);
  background: linear-gradient(135deg, rgba(155,92,255,0.95), rgba(255,177,59,0.9));
  box-shadow: 0 0 22px rgba(155,92,255,0.38), 0 0 14px rgba(255,177,59,0.18);
}

.coin-mark.image-mark img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  object-position: center;
}

.asset-card span {
  color: var(--muted);
  letter-spacing: 0;
  text-transform: none;
}

.asset-card b {
  display: block;
  margin-bottom: 3px;
  color: #fff2c7;
  font-size: 15px;
}

.asset-card strong {
  display: block;
  margin-top: 6px;
  font-size: 18px;
  background: linear-gradient(135deg, #fff2c7 20%, #ffd28a 60%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.asset-card em {
  grid-column: 2;
  justify-self: start;
  color: #ffe8c2;
  font-size: 12px;
  font-style: normal;
}

.pool-list div { display: grid; gap: 8px; }

.pool-list strong { font-family: var(--mono); }

.pool-list i,
.progress,
.progress i {
  display: block;
  border-radius: 999px;
}

.pool-list i {
  height: 8px;
  background: linear-gradient(90deg, var(--purple), var(--orange));
  box-shadow: 0 0 10px rgba(155,92,255,0.25);
}

.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(0,0,0,0.25);
}

.segmented button {
  min-height: 28px;
  border: 0;
  border-radius: var(--radius);
  color: var(--muted);
  background: transparent;
  font-size: 12px;
  font-weight: 1000;
  transition: color 120ms ease;
}

.segmented button.active {
  color: #fff;
  background: linear-gradient(135deg, var(--purple), var(--orange));
  box-shadow: 0 4px 12px rgba(155,92,255,0.25);
}

.swap-box {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  padding: 14px;
  margin-bottom: 14px;
  border: 1px solid var(--hot-line);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(255,159,46,0.08), rgba(255,123,0,0.04));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), 0 0 18px rgba(255,159,46,0.06);
}

.secondary-swap { margin-top: -4px; }

.resonance-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 5px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.04);
  margin-bottom: 14px;
}

.resonance-tabs button {
  min-height: 38px;
  border: 0;
  border-radius: var(--radius);
  color: var(--muted);
  background: transparent;
  font-weight: 1000;
  transition: color 120ms ease, box-shadow 120ms ease;
}

.resonance-tabs button.active {
  color: #fff;
  border: 1px solid rgba(155,92,255,0.45);
  background: linear-gradient(135deg, rgba(155,92,255,0.38), rgba(168,85,247,0.24));
  box-shadow: 0 4px 14px rgba(155,92,255,0.20), inset 0 1px 0 rgba(255,255,255,0.06);
}

.resonance-balance {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 9px;
}

.resonance-balance strong {
  color: #fff2c7;
  font-family: var(--mono);
}

.resonance-input {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-radius: var(--radius);
  border: 1px solid rgba(190,150,255,0.18);
  background: rgba(255,255,255,0.05);
  margin-bottom: 14px;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.resonance-input:focus-within {
  border-color: rgba(190,150,255,0.40);
  box-shadow: 0 0 20px rgba(155,92,255,0.12), inset 0 1px 0 rgba(255,255,255,0.04);
}

.resonance-input input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  color: #fff;
  background: transparent;
  font-family: var(--mono);
  font-size: 24px;
  font-weight: 900;
}

.resonance-input button {
  flex: 0 0 auto;
  min-height: 32px;
  padding: 0 12px;
  border-radius: var(--radius);
  border: 1px solid rgba(155,92,255,0.42);
  color: #e0d0ff;
  background: rgba(155,92,255,0.16);
  font-size: 12px;
  font-weight: 1000;
  transition: background 120ms ease, box-shadow 120ms ease;
}

.resonance-input button:hover {
  background: rgba(155,92,255,0.24);
  box-shadow: 0 0 12px rgba(155,92,255,0.18);
}

.receive-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 13px 0;
  border-top: 1px solid rgba(190,150,255,0.12);
  border-bottom: 1px solid rgba(190,150,255,0.12);
  margin-bottom: 14px;
}

.receive-row span {
  color: var(--muted);
  font-size: 13px;
}

.receive-row strong {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fbbf24;
  font-family: var(--mono);
  font-size: 20px;
  text-shadow: 0 0 14px rgba(251, 191, 36, 0.25);
}

.swap-box b { color: var(--orange); }

.swap-token-result { position: relative; padding-left: 42px; }

.swap-token-result .mini-token-icon {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
}

.progress {
  height: 8px;
  margin: 14px 0;
  background: rgba(255,255,255,0.08);
  overflow: hidden;
  border-radius: 999px;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.3);
}

.progress i {
  height: 100%;
  background: linear-gradient(90deg, var(--purple), var(--orange));
  box-shadow: 0 0 12px rgba(155,92,255,0.35), 0 0 8px rgba(255,159,46,0.20);
  position: relative;
}

.progress i::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, transparent 30%, rgba(255,255,255,0.25) 50%, transparent 70%);
  background-size: 200% 100%;
  animation: shimmer 2.5s infinite linear;
  mix-blend-mode: overlay;
}

.market-hero,
.interest-card,
.reboot-card,
.verify-card,
.league-card {
  background:
    linear-gradient(135deg, rgba(168,85,247,0.14), rgba(255,177,59,0.08)),
    linear-gradient(180deg, var(--panel-2), var(--panel));
  position: relative;
}

.market-hero::after,
.interest-card::after,
.reboot-card::after,
.verify-card::after,
.league-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: inset 0 0 30px rgba(155,92,255,0.06);
}

.stat-list {
  display: grid;
  gap: 0;
  margin: 0;
}

.stat-list div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid rgba(190,150,255,0.10);
  transition: background 120ms ease;
}

.stat-list div:hover {
  background: rgba(255,255,255,0.025);
  margin: 0 -6px;
  padding-left: 6px;
  padding-right: 6px;
  border-radius: 6px;
}

.stat-list div:last-child { border-bottom: 0; }

.stat-list dt,
.stat-list dd { margin: 0; }

.stat-list dt {
  color: rgba(157,142,184,0.78);
  font-size: 13px;
}

.stat-list dd {
  color: #fff2c7;
  font-family: var(--mono);
  font-weight: 800;
  text-align: right;
  text-shadow: 0 0 10px rgba(255, 242, 199, 0.12);
}

.tree-list dt { font-size: 12px; }
.tree-list .sub { padding-left: 12px; color: rgba(169,155,191,0.85); }

.rank-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}

.rank-grid div {
  padding: 14px;
  border-radius: var(--radius);
  border: 1px solid rgba(255,177,59,0.22);
  background: linear-gradient(135deg, rgba(255,177,59,0.08), rgba(255,177,59,0.03));
  text-align: center;
  transition: transform 140ms ease, box-shadow 140ms ease;
}

.rank-grid div:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.30), 0 0 16px rgba(255,177,59,0.10);
}

.rank-grid span,
.layer-card small,
.leaderboard span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.rank-grid strong {
  display: block;
  margin-top: 6px;
  color: #fff2c7;
  font-family: var(--mono);
  font-size: 22px;
  text-shadow: 0 0 12px rgba(255, 242, 199, 0.12);
}

.layer-stack {
  display: grid;
  gap: 10px;
}

.layer-card {
  position: relative;
  border: 1px solid rgba(190,150,255,0.14);
  border-radius: var(--radius);
  background: rgba(255,255,255,0.04);
  padding: 12px;
  transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease;
}

.layer-card:hover {
  transform: translateY(-1px);
  border-color: rgba(190,150,255,0.26);
  box-shadow: 0 6px 18px rgba(0,0,0,0.30), 0 0 16px rgba(155,92,255,0.08);
}

.layer-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 0 999px 999px 0;
  background: linear-gradient(180deg, var(--purple), var(--orange));
  opacity: 0.7;
}

.layer-card div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-bottom: 8px;
}

.layer-card b { color: #fff; }

.layer-card div span {
  color: var(--muted);
  font-size: 12px;
}

.layer-card strong {
  display: block;
  color: #ffe1a6;
  font-family: var(--mono);
  font-size: 13px;
  margin-bottom: 5px;
  text-shadow: 0 0 10px rgba(255, 225, 166, 0.12);
}

.layer-gold {
  border-color: rgba(255,215,0,0.35);
  background: linear-gradient(135deg, rgba(255,215,0,0.08), rgba(255,215,0,0.03));
}

.layer-gold::before { background: linear-gradient(180deg, #ffd700, #ffaa00); opacity: 1; }

.layer-silver {
  border-color: rgba(192,192,192,0.32);
  background: linear-gradient(135deg, rgba(192,192,192,0.06), rgba(192,192,192,0.02));
}

.layer-silver::before { background: linear-gradient(180deg, #e8e8e8, #a0a0a0); opacity: 1; }

.layer-bronze {
  border-color: rgba(205,127,50,0.34);
  background: linear-gradient(135deg, rgba(205,127,50,0.08), rgba(205,127,50,0.03));
}

.layer-bronze::before { background: linear-gradient(180deg, #cd7f32, #f1b36d); opacity: 1; }

.sub-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 5px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(0,0,0,0.22);
  margin-bottom: 12px;
}

.sub-tabs button {
  min-height: 34px;
  border: 0;
  border-radius: var(--radius);
  color: var(--muted);
  background: transparent;
  font-size: 12px;
  font-weight: 900;
  transition: color 120ms ease;
}

.sub-tabs button.active {
  color: #fff;
  background: linear-gradient(135deg, var(--purple), var(--orange));
  box-shadow: 0 4px 14px rgba(155,92,255,0.22);
}

.leaderboard {
  display: grid;
  gap: 9px;
  margin-bottom: 14px;
}

.leaderboard article {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 11px;
  border-radius: var(--radius);
  border: 1px solid rgba(190,150,255,0.14);
  background: rgba(255,255,255,0.04);
  transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease;
}

.leaderboard article:hover {
  transform: translateY(-1px);
  border-color: rgba(190,150,255,0.26);
  box-shadow: 0 6px 18px rgba(0,0,0,0.28), 0 0 14px rgba(155,92,255,0.08);
}

.leaderboard i {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: rgba(155,92,255,0.24);
  font-style: normal;
  font-family: var(--mono);
  font-weight: 900;
}

.leaderboard i.top1 {
  color: #1a0b3d;
  background: linear-gradient(135deg, #ffd700, #ffaa00);
  box-shadow: 0 0 12px rgba(255, 170, 0, 0.35);
}

.leaderboard i.top2 {
  color: #1a0b3d;
  background: linear-gradient(135deg, #e8e8e8, #a0a0a0);
  box-shadow: 0 0 12px rgba(192,192,192,0.25);
}

.leaderboard i.top3 {
  color: #1a0b3d;
  background: linear-gradient(135deg, #cd7f32, #f1b36d);
  box-shadow: 0 0 12px rgba(205,127,50,0.30);
}

.leaderboard b {
  display: block;
  margin-bottom: 3px;
  font-family: var(--mono);
}

.leaderboard article > strong {
  color: #ffe1a6;
  font-family: var(--mono);
  text-shadow: 0 0 10px rgba(255, 225, 166, 0.15);
}

.bottom-tabs {
  position: fixed;
  left: 50%;
  bottom: max(12px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 30;
  width: min(402px, calc(100vw - 24px));
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(12, 9, 22, 0.92);
  box-shadow: 0 18px 60px rgba(0,0,0,0.55), inset 0 1px 0 rgba(255,255,255,0.06), 0 0 0 1px rgba(168,130,255,0.08);
  backdrop-filter: blur(24px) saturate(1.2);
  overflow: hidden;
}

.bottom-tabs::before {
  content: "";
  position: absolute;
  top: 0;
  left: 12px;
  right: 12px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(168,130,255,0.35), rgba(255,159,46,0.25), transparent);
}

.bottom-tabs button {
  min-height: 58px;
  border: 1px solid transparent;
  border-radius: 14px;
  color: var(--muted);
  background: transparent;
  display: grid;
  place-items: center;
  gap: 2px;
  font-size: 11px;
  font-weight: 1000;
  transition: color 160ms ease, background 160ms ease, box-shadow 160ms ease, transform 140ms ease;
}

.bottom-tabs i {
  width: 24px;
  height: 24px;
  font-size: 16px;
}

.bottom-tabs button.active {
  color: #fff;
  border-color: rgba(255,255,255,0.08);
  background: linear-gradient(135deg, rgba(155,92,255,0.92), rgba(255,177,59,0.88));
  box-shadow: 0 10px 28px rgba(155,92,255,0.32), 0 0 14px rgba(255,159,46,0.18);
  transform: translateY(-1px);
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  align-items: flex-end;
  justify-content: center;
  padding: 14px;
  background: rgba(2, 1, 6, 0.72);
  backdrop-filter: blur(16px);
}

.modal-overlay.show { display: flex; }

.modal-sheet {
  width: min(430px, 100%);
  max-height: min(78vh, 680px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 20px 20px var(--radius) var(--radius);
  background:
    linear-gradient(180deg, rgba(46, 28, 78, 0.98), rgba(11, 8, 19, 0.99)),
    var(--panel);
  box-shadow: 0 -24px 90px rgba(0,0,0,0.65), inset 0 1px 0 rgba(255,255,255,0.07), 0 0 0 1px rgba(168,130,255,0.10);
  padding: 10px 16px 16px;
  animation: modalIn 200ms cubic-bezier(0.22, 1, 0.36, 1);
  position: relative;
}

.modal-sheet::before {
  content: "";
  position: absolute;
  top: 0;
  left: 20px;
  right: 20px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(168,130,255,0.40), rgba(255,159,46,0.25), transparent);
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(22px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-handle {
  width: 44px;
  height: 4px;
  margin: 0 auto 14px;
  border-radius: 999px;
  background: rgba(255,255,255,0.28);
}

.modal-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.modal-head span {
  color: var(--orange);
  font-size: 11px;
  line-height: 1.2;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.13em;
}

.modal-head h2 {
  margin-top: 5px;
  font-size: 22px;
}

.modal-close {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  background: rgba(255,255,255,0.05);
  font-size: 22px;
  line-height: 1;
  transition: background 120ms ease, box-shadow 120ms ease;
}

.modal-close:hover {
  background: rgba(255,255,255,0.10);
  box-shadow: 0 0 14px rgba(155,92,255,0.18);
}

.modal-desc {
  margin: 12px 0 14px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.modal-content {
  display: grid;
  gap: 12px;
  max-height: min(52vh, 520px);
  overflow-y: auto;
  padding-right: 2px;
  overscroll-behavior: contain;
}

.referrer-box {
  margin-top: 12px;
  padding: 12px;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 159, 46, 0.28);
  background: rgba(255, 159, 46, 0.08);
}

.referrer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.referrer-head strong {
  color: #ffe1a6;
  font-size: 13px;
  font-weight: 900;
}

.referrer-head strong::before {
  content: "⚠";
  margin-right: 8px;
  color: #ffd42a;
}

.referrer-head button,
.referrer-box label button {
  min-height: 30px;
  border-radius: 10px;
  border: 1px solid rgba(255, 159, 46, 0.34);
  background: linear-gradient(135deg, rgba(255,159,46,0.18), rgba(155,92,255,0.16));
  color: #ffe1a6;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}

.referrer-head button:hover,
.referrer-box label button:hover {
  border-color: rgba(255, 159, 46, 0.58);
  background: linear-gradient(135deg, rgba(255,159,46,0.26), rgba(155,92,255,0.22));
}

.referrer-head button {
  padding: 0 10px;
}

.referrer-box label button {
  min-width: 52px;
  margin-right: 6px;
  padding: 0 8px;
}

.referrer-box label {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 46px;
  padding: 0;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 159, 46, 0.30);
  background: rgba(0,0,0,0.22);
}

.referrer-box input {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 0;
  outline: none;
  color: var(--text);
  background: transparent;
  font-family: var(--mono);
  font-size: 12px;
}

.referrer-box input:focus {
  box-shadow: none;
}

.referrer-box small {
  display: block;
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 159, 46, 0.34);
  background: rgba(255, 159, 46, 0.10);
  color: #ffd42a;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.5;
}

.modal-error {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 92, 92, 0.34);
  background: rgba(255, 92, 92, 0.10);
  color: #ffd0d0;
  font-size: 12px;
  line-height: 1.55;
}

.modal-ranking {
  display: grid;
  gap: 10px;
}

.modal-ranking article {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 11px;
  border-radius: var(--radius);
  border: 1px solid rgba(190,150,255,0.14);
  background: rgba(255,255,255,0.04);
}

.modal-ranking i {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: rgba(155,92,255,0.22);
  font-style: normal;
  font-weight: 900;
  font-size: 12px;
}

.modal-ranking i.top1 { background: linear-gradient(135deg, #ffe08a, #ff9f2e); color: #2a1400; }
.modal-ranking i.top2 { background: linear-gradient(135deg, #f4f4ff, #9d8eb8); color: #201233; }
.modal-ranking i.top3 { background: linear-gradient(135deg, #ffba78, #b45f24); color: #271000; }

.modal-ranking b,
.modal-ranking span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.modal-ranking b {
  color: rgba(245,240,255,0.96);
  font-size: 13px;
}

.modal-ranking span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.modal-ranking strong {
  color: #ffe1a6;
  font-size: 12px;
  white-space: nowrap;
}

.modal-section {
  border: 1px solid rgba(190,150,255,0.14);
  border-radius: var(--radius);
  background: rgba(255,255,255,0.04);
  padding: 12px;
}

.modal-section h3 {
  margin: 0 0 10px;
  color: #ffe1a6;
  font-size: 13px;
}

.modal-kv {
  display: grid;
  gap: 8px;
}

.modal-kv div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(190,150,255,0.10);
}

.modal-kv div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.modal-kv dt,
.modal-kv dd {
  margin: 0;
  font-size: 12px;
}

.modal-kv dt { color: var(--muted); }

.modal-kv dd {
  text-align: right;
  font-family: var(--mono);
  overflow-wrap: anywhere;
  color: rgba(245,240,255,0.92);
}

.method-chip {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  padding: 7px 9px;
  border-radius: var(--radius);
  color: #e0d0ff;
  background: rgba(155,92,255,0.14);
  border: 1px solid rgba(155,92,255,0.32);
  font-family: var(--mono);
  font-size: 12px;
  overflow-wrap: anywhere;
  box-shadow: 0 0 10px rgba(155,92,255,0.10);
}

.modal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}

@media (min-width: 760px) {
  body {
    display: grid;
    place-items: start center;
    padding: 24px 0;
  }
  .app-shell {
    min-height: calc(100vh - 48px);
    border: 1px solid rgba(190,150,255,0.14);
    border-radius: 28px;
    box-shadow: 0 30px 120px rgba(0,0,0,0.60), 0 0 0 1px rgba(168,130,255,0.10);
    overflow: hidden;
  }
}

@media (max-width: 390px) {
  .app-shell { padding-left: 10px; padding-right: 10px; }
  .quick-grid { grid-template-columns: repeat(2, 1fr); }
  .token-row { grid-template-columns: 1fr; }
  .asset-card { grid-template-columns: 46px 1fr; }
  .asset-card em { grid-column: 2; }
}
