:root {
  color-scheme: dark;
  --ink: #fff9e8;
  --muted: #c9bd9e;
  --bg: #080704;
  --panel: rgba(29, 24, 13, 0.82);
  --card: rgba(20, 16, 8, 0.86);
  --chip: rgba(255, 255, 255, 0.05);
  --input: rgba(0, 0, 0, 0.32);
  --nav-bg: rgba(32, 23, 10, 0.88);
  --nav-ink: #f7e8b0;
  --toast-bg: rgba(8, 7, 4, 0.94);
  --toast-ink: #fff9e8;
  --line: rgba(249, 213, 116, 0.22);
  --line-soft: rgba(249, 213, 116, 0.12);
  --gold: #f8d66d;
  --gold-bright: #f8d66d;
  --mono-ink: #f5e4b1;
  --shadow: 0 18px 70px rgba(0, 0, 0, 0.5);
  --shadow-soft: 0 10px 36px rgba(0, 0, 0, 0.24);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", Inter, "Segoe UI", ui-sans-serif, system-ui, sans-serif;
}

html[data-theme="light"] {
  color-scheme: light;
  --ink: #261e09;
  --muted: #7d7257;
  --bg: #f6f2e8;
  --panel: rgba(255, 255, 255, 0.88);
  --card: rgba(255, 255, 255, 0.94);
  --chip: rgba(150, 110, 20, 0.07);
  --input: rgba(38, 30, 9, 0.05);
  --nav-bg: rgba(255, 255, 255, 0.92);
  --nav-ink: #8a7330;
  --toast-bg: rgba(38, 30, 9, 0.94);
  --toast-ink: #fff9e8;
  --line: rgba(160, 120, 20, 0.24);
  --line-soft: rgba(160, 120, 20, 0.13);
  --gold: #a07608;
  --mono-ink: #6b5618;
  --shadow: 0 18px 60px rgba(120, 90, 20, 0.16);
  --shadow-soft: 0 10px 30px rgba(120, 90, 20, 0.1);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 24% 4%, rgba(248, 214, 109, 0.18), transparent 20rem),
    radial-gradient(circle at 90% 12%, rgba(255, 20, 118, 0.1), transparent 18rem),
    linear-gradient(180deg, #050503 0%, #0e0b05 46%, #050503 100%);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  transition: background 240ms ease, color 240ms ease;
}

html[data-theme="light"] body {
  background:
    radial-gradient(circle at 24% 4%, rgba(208, 158, 32, 0.14), transparent 20rem),
    radial-gradient(circle at 90% 12%, rgba(255, 20, 118, 0.05), transparent 18rem),
    linear-gradient(180deg, #faf7ef 0%, #f2ecdc 46%, #faf7ef 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

.app-shell {
  width: min(100%, 480px);
  min-height: 100vh;
  margin: 0 auto;
  padding: max(14px, env(safe-area-inset-top)) 14px calc(94px + env(safe-area-inset-bottom));
  position: relative;
  overflow: hidden;
}

.app-shell::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(115deg, transparent 0 26%, rgba(248, 214, 109, 0.16) 26% 31%, transparent 31% 100%),
    radial-gradient(circle, rgba(248, 214, 109, 0.2) 0 1px, transparent 1px);
  background-size: 100% 100%, 44px 44px;
  opacity: 0.55;
}

html[data-theme="light"] .app-shell::before {
  opacity: 0.25;
}

.hero,
main,
.bottom-nav,
.toast {
  position: relative;
  z-index: 1;
}

.hero,
main {
  min-width: 0;
}

/* ---------- Hero (always dark, image based) ---------- */

.hero {
  min-height: clamp(500px, 78svh, 580px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  border: 1px solid rgba(249, 213, 116, 0.24);
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.1), rgba(8, 7, 4, 0.68)),
    url("./assets/coin-glow.gif") center top / cover no-repeat;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8, 7, 4, 0.08) 0%, rgba(8, 7, 4, 0.84) 76%);
  pointer-events: none;
}

.topbar,
.hero-stage,
.intro,
.spotlight,
.token-panel,
.section-heading,
.community-link,
.bottom-nav {
  display: flex;
  align-items: center;
}

.topbar,
.hero-stage,
.intro {
  z-index: 1;
  position: relative;
}

.topbar {
  justify-content: space-between;
  gap: 12px;
}

.topbar-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.brand-lockup {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px 8px 8px;
  border: 1px solid rgba(248, 214, 109, 0.2);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(14px);
}

.brand-lockup img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.brand-lockup strong {
  color: var(--gold-bright);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.round-button {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(248, 214, 109, 0.24);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.3);
  color: #fff9e8;
  cursor: pointer;
  backdrop-filter: blur(14px);
  transition: transform 120ms ease;
}

.wallet-chip {
  height: 44px;
  width: 44px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0;
  border: 1px solid rgba(248, 214, 109, 0.24);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.3);
  color: #fff9e8;
  cursor: pointer;
  backdrop-filter: blur(14px);
  transition: transform 120ms ease;
}

.wallet-chip:active {
  transform: scale(0.94);
}

.wallet-chip .wallet-icon {
  flex-shrink: 0;
}

.wallet-chip .wallet-name {
  display: none;
  max-width: 96px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--gold-bright);
}

.wallet-chip.is-connected {
  width: auto;
  padding: 0 13px 0 11px;
}

.wallet-chip.is-connected .wallet-name {
  display: inline;
}

.round-button:active {
  transform: scale(0.94);
}

html[data-theme="light"] #themeToggle .icon-sun,
html[data-theme="dark"] #themeToggle .icon-moon {
  display: none;
}

.hero-stage {
  min-height: 250px;
  justify-content: center;
  isolation: isolate;
}

.flag-ribbon {
  position: absolute;
  width: 125%;
  height: 118px;
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 214, 0, 0.9) 0 48%, rgba(0, 56, 147, 0.78) 48% 74%, rgba(206, 17, 38, 0.8) 74% 100%);
  transform: rotate(-14deg);
  box-shadow: 0 20px 80px rgba(248, 214, 109, 0.3);
  opacity: 0.78;
  z-index: -1;
}

.coin-hero {
  width: min(62vw, 250px);
  max-height: 250px;
  object-fit: contain;
  filter: drop-shadow(0 22px 34px rgba(0, 0, 0, 0.56));
}

.butterfly {
  position: absolute;
  color: var(--gold-bright);
  text-shadow: 0 0 20px rgba(248, 214, 109, 0.8);
}

.butterfly-a {
  top: 24%;
  right: 13%;
  font-size: 1.7rem;
}

.butterfly-b {
  left: 12%;
  bottom: 18%;
  font-size: 1.15rem;
  opacity: 0.74;
}

.world-pill {
  position: absolute;
  right: 4px;
  bottom: 0;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border: 1px solid rgba(248, 214, 109, 0.24);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.48);
  color: var(--gold-bright);
  font-size: 0.7rem;
  font-weight: 700;
  backdrop-filter: blur(16px);
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #facc15;
}

.world-pill.is-ready .dot {
  background: #22c55e;
}

.world-pill.is-browser .dot {
  background: #60a5fa;
}

.world-pill.is-verified .dot {
  background: #22c55e;
}

.world-pill.is-unverified .dot {
  background: #facc15;
}

.worldid-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
}

@media (min-width: 640px) {
  .worldid-modal {
    align-items: center;
    padding: 16px;
  }
}

.worldid-modal[hidden] {
  display: none;
}

.worldid-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(2px);
}

.worldid-modal__sheet {
  position: relative;
  width: 100%;
  max-width: 24rem;
  overflow: hidden;
  border-radius: 28px 28px 0 0;
  border: 1px solid rgba(251, 191, 36, 0.35);
  border-bottom: 0;
  background: linear-gradient(180deg, #fffdf7 0%, #fff 45%, #fff8eb 100%);
  box-shadow: 0 -8px 40px rgba(245, 179, 1, 0.25);
  padding: 32px 24px 24px;
  text-align: center;
}

@media (min-width: 640px) {
  .worldid-modal__sheet {
    border-radius: 28px;
    border-bottom: 1px solid rgba(251, 191, 36, 0.35);
  }
}

.worldid-modal__sheet::before {
  content: "";
  pointer-events: none;
  position: absolute;
  inset: 0 0 auto;
  height: 8rem;
  background: radial-gradient(80% 100% at 50% 0%, rgba(245, 179, 1, 0.35) 0%, transparent 70%);
  opacity: 0.6;
}

.worldid-modal__coin-wrap {
  position: relative;
  width: 88px;
  height: 88px;
  margin: 0 auto 16px;
}

.worldid-modal__coin {
  width: 100%;
  height: 100%;
  border-radius: 999px;
  object-fit: cover;
  box-shadow: 0 8px 24px rgba(245, 179, 1, 0.45);
}

.worldid-modal__sheet h2 {
  position: relative;
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: #111827;
}

.worldid-modal__subtitle {
  position: relative;
  margin: 4px 0 0;
  font-size: 0.875rem;
  color: #6b7280;
}

.worldid-modal__divider {
  position: relative;
  height: 1px;
  margin: 20px 0;
  background: linear-gradient(90deg, transparent, rgba(251, 191, 36, 0.8), transparent);
}

.worldid-modal__body {
  position: relative;
  margin: 0;
  text-align: left;
  font-size: 0.875rem;
  color: #4b5563;
}

.worldid-modal__permission {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  padding: 12px 16px;
  border-radius: 16px;
  border: 1px solid #fef3c7;
  background: rgba(255, 251, 235, 0.6);
  text-align: left;
  font-size: 0.875rem;
  font-weight: 600;
  color: #111827;
}

.worldid-modal__check {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #111827;
  color: #fff;
  font-size: 0.75rem;
}

.worldid-modal__cta {
  position: relative;
  width: 100%;
  min-height: 52px;
  margin-top: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  background: #111827;
  color: #fff;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.2);
}

.worldid-modal__cta.is-busy {
  opacity: 0.6;
  pointer-events: none;
}

.worldid-modal__hint {
  position: relative;
  margin: 12px 0 0;
  font-size: 0.6875rem;
  line-height: 1.5;
  color: #9ca3af;
}

body.is-humanity-locked .app-shell {
  visibility: hidden;
  pointer-events: none;
  user-select: none;
}

body.is-humanity-locked .worldid-modal {
  pointer-events: auto;
}

body.is-worldid-native .worldid-modal {
  display: none;
}

body.is-worldid-native::after {
  content: "Verificando con World ID…";
  position: fixed;
  inset: 0;
  z-index: 119;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  text-align: center;
}

.legal-links {
  margin: 12px 0 0;
  text-align: center;
  font-size: 0.78rem;
}

.legal-links a {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.intro {
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.intro .eyebrow {
  color: var(--gold-bright);
}

.eyebrow,
.section-label {
  margin: 0;
  color: var(--gold);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.intro h1 {
  max-width: 22rem;
  margin: 0;
  color: #fff9e8;
  font-size: clamp(1.65rem, 7.5vw, 2.4rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.02em;
}

.intro p:last-child {
  margin: 0;
  color: #f5e4b1;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.4;
}

/* ---------- Main layout ---------- */

main {
  display: grid;
  gap: 14px;
  padding-top: 14px;
}

main > section,
.panel > *,
.swap-box > *,
.swap-field > *,
.link-grid > *,
.market-grid > *,
.community-links > * {
  min-width: 0;
}

.spotlight {
  gap: 10px;
}

.buy-card,
.copy-button {
  min-height: 50px;
  border: 0;
  border-radius: 15px;
  cursor: pointer;
}

.buy-card {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 12px;
  color: #ffffff;
  font-size: 0.92rem;
  font-weight: 700;
  text-align: center;
  box-shadow: var(--shadow-soft);
  transition: transform 120ms ease;
}

.buy-card:active {
  transform: scale(0.97);
}

.buy-card--gold {
  background: linear-gradient(135deg, #a96f00, #e2ad1c);
}

.buy-card--pink {
  background: linear-gradient(135deg, #ff1476, #b30cff);
}

.panel,
.banner-card,
.rcolito-card,
.token-panel,
.community-panel {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--panel);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px);
}

.panel {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.panel-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.72rem;
  text-align: center;
}

.swap-fee {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 2px 0 0;
  color: var(--green, #15d982);
  font-size: 0.76rem;
  font-weight: 650;
  text-align: center;
}

html[data-theme="light"] .swap-fee {
  color: #0f9d58;
}

.swap-fee svg {
  width: 15px;
  height: 15px;
}

/* ---------- Anuncios (carrusel) ---------- */

.ann-carousel {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 2px 0 4px;
  margin: 0 -2px;
  scrollbar-width: none;
}

.ann-carousel::-webkit-scrollbar {
  display: none;
}

.ann-card {
  scroll-snap-align: start;
  flex: 0 0 86%;
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 78px;
  padding: 12px 14px;
  border: 1px solid color-mix(in srgb, var(--accent) 32%, var(--line));
  border-radius: 18px;
  background:
    linear-gradient(120deg, color-mix(in srgb, var(--accent) 22%, transparent), transparent 62%),
    var(--card);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  transition: transform 120ms ease;
}

.ann-card:active {
  transform: scale(0.98);
}

.ann-card.has-image {
  padding: 0;
  min-height: 110px;
}

.ann-card__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.ann-card.has-image .ann-card__body {
  position: relative;
  z-index: 1;
  align-self: flex-end;
  margin: 12px 14px;
  padding: 6px 10px;
  border-radius: 12px;
  background: rgba(8, 7, 4, 0.55);
  backdrop-filter: blur(8px);
  color: #fff;
}

.ann-card.has-image .ann-card__go {
  position: relative;
  z-index: 1;
  margin: 0 12px 0 auto;
  color: #fff;
}

.ann-card__icon {
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: color-mix(in srgb, var(--accent) 22%, rgba(0, 0, 0, 0.3));
  color: var(--accent);
}

.ann-card__body {
  flex: 1;
  min-width: 0;
}

.ann-card__body strong {
  display: block;
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.ann-card__body small {
  display: block;
  margin-top: 1px;
  color: var(--muted);
  font-size: 0.78rem;
}

.ann-card.has-image .ann-card__body small {
  color: rgba(255, 255, 255, 0.85);
}

.ann-card__go {
  flex-shrink: 0;
  color: var(--accent);
}

/* ---------- Reveal al hacer scroll ---------- */

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

.banner-card {
  overflow: hidden;
}

.banner-card img {
  width: 100%;
  display: block;
  aspect-ratio: 3 / 1;
  object-fit: cover;
}

.section-heading {
  justify-content: space-between;
  padding: 0 2px;
}

.section-heading h2,
.rcolito-card h2 {
  margin: 2px 0 0;
  color: var(--ink);
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.section-heading {
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

/* ---------- Price chart (sparkline) ---------- */

.price-hero {
  --spark: #15d982;
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 18px;
  background: var(--chip);
}

.price-hero__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
}

.price-hero__head strong {
  display: block;
  margin-top: 2px;
  color: var(--ink);
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.price-change {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--spark) 16%, transparent);
  color: var(--spark);
  font-size: 0.82rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.sparkline {
  width: 100%;
  height: 56px;
  display: block;
  overflow: visible;
}

.price-hero__caption {
  color: var(--muted);
  font-size: 0.7rem;
}

/* ---------- Market stats ---------- */

.market-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.stat-card {
  display: grid;
  gap: 3px;
  align-content: start;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  background: var(--chip);
}

.stat-label {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.stat-card strong {
  color: var(--ink);
  font-size: 1.18rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stat-card small {
  color: var(--muted);
  font-size: 0.7rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------- Swap ---------- */

.swap-box {
  display: grid;
  gap: 4px;
}

.swap-field {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid var(--line-soft);
  border-radius: 18px;
  background: var(--input);
}

.swap-field label {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
}

.swap-field__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.swap-bal {
  border: 0;
  padding: 2px 4px;
  background: transparent;
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  font-variant-numeric: tabular-nums;
}

.swap-bal:active {
  opacity: 0.7;
}

.swap-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.swap-row input,
.swap-row output {
  flex: 1;
  min-width: 0;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--ink);
  font-family: inherit;
  font-size: 1.45rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  outline: none;
}

.swap-row input::placeholder {
  color: var(--muted);
  opacity: 0.7;
}

.swap-row input::-webkit-outer-spin-button,
.swap-row input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.swap-row input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}

.swap-row output {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.swap-field small {
  min-height: 1em;
  color: var(--muted);
  font-size: 0.74rem;
  font-variant-numeric: tabular-nums;
}

.token-select {
  flex-shrink: 0;
  appearance: none;
  -webkit-appearance: none;
  padding: 8px 26px 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background-color: var(--chip);
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23998a5e' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  color: var(--ink);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
}

.swap-invert {
  position: relative;
  z-index: 2;
  width: 38px;
  height: 38px;
  margin: -15px auto;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  color: var(--gold);
  cursor: pointer;
  box-shadow: var(--shadow-soft);
  transition: transform 160ms ease;
}

.swap-invert:active {
  transform: rotate(180deg);
}

.swap-cta {
  min-height: 50px;
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 15px;
  background: linear-gradient(135deg, #f8d66d, #b87803);
  color: #171005;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 120ms ease;
}

.swap-cta:active {
  transform: scale(0.97);
}

.swap-cta:disabled,
.swap-cta.is-busy {
  opacity: 0.65;
  cursor: wait;
  transform: none;
}

/* Nota de transparencia: PUF como alternativa mas barata */
.swap-puf-hint {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  margin-top: 2px;
  padding: 10px 12px;
  border: 1px solid color-mix(in srgb, #ff1476 28%, var(--line));
  border-radius: 14px;
  background: color-mix(in srgb, #ff1476 8%, transparent);
  color: var(--ink);
  text-align: left;
  font-size: 0.76rem;
  line-height: 1.35;
  cursor: pointer;
  transition: transform 120ms ease, background 120ms ease;
}

.swap-puf-hint:active {
  transform: scale(0.98);
}

.swap-puf-hint span {
  flex: 1;
  min-width: 0;
}

.swap-puf-hint strong {
  color: #ff1476;
  font-weight: 750;
}

html[data-theme="light"] .swap-puf-hint strong {
  color: #d10a5e;
}

.swap-puf-hint__info {
  flex-shrink: 0;
  color: #ff1476;
}

.swap-puf-hint__info,
.swap-puf-hint__go {
  width: 16px;
  height: 16px;
}

.swap-puf-hint__go {
  flex-shrink: 0;
  color: var(--muted);
}

/* ---------- Vista NFT separada ---------- */

.nft-view {
  display: grid;
  gap: 14px;
  padding-top: max(8px, env(safe-area-inset-top));
  animation: viewIn 240ms ease;
}

@keyframes viewIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

.view-topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 2px;
}

.view-topbar > strong {
  flex: 1;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.view-topbar .round-button {
  border-color: var(--line);
  background: var(--chip);
  color: var(--ink);
}

/* Acceso (teaser) a la coleccion desde el hub */
.nft-teaser {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--gold) 12%, transparent), transparent 60%),
    var(--panel);
  color: var(--ink);
  box-shadow: var(--shadow-soft);
  transition: transform 120ms ease;
}

.nft-teaser:active {
  transform: scale(0.98);
}

.nft-teaser__icon {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: color-mix(in srgb, var(--gold) 20%, transparent);
  color: var(--gold);
}

.nft-teaser__body {
  flex: 1;
  min-width: 0;
}

.nft-teaser__body strong {
  display: block;
  font-size: 0.95rem;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.nft-teaser__body small {
  display: block;
  margin-top: 1px;
  color: var(--muted);
  font-size: 0.78rem;
}

.nft-teaser > svg {
  flex-shrink: 0;
  color: var(--muted);
}

/* ---------- NFT ---------- */

.nft-panel {
  gap: 10px;
}

.nft-heading {
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.nft-status {
  flex-shrink: 0;
  padding: 6px 12px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--gold) 16%, transparent);
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  border: 1px solid var(--line);
}

.nft-status.is-live {
  background: rgba(21, 217, 130, 0.92);
  color: #062;
  border-color: transparent;
}

.nft-desc {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

.nft-supply {
  margin: 0;
  color: var(--gold);
  font-size: 0.76rem;
  font-weight: 700;
}

.nft-sub {
  margin-top: 4px;
}

/* Progreso de acuñacion */
.nft-progress {
  display: grid;
  gap: 7px;
  padding: 12px 14px;
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  background: var(--chip);
}

.nft-progress__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.88rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.nft-progress__pct {
  color: var(--gold);
}

.nft-progress__bar {
  height: 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--ink) 12%, transparent);
  overflow: hidden;
}

.nft-progress__bar > span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #b87803, var(--gold));
  transition: width 700ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.nft-progress .nft-supply {
  margin: 0;
  color: var(--muted);
  font-weight: 600;
}

/* Filtros por rareza */
.nft-filters {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 0;
  scrollbar-width: none;
}

.nft-filters::-webkit-scrollbar {
  display: none;
}

.nft-filter {
  flex-shrink: 0;
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--chip);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 650;
  cursor: pointer;
  transition: transform 120ms ease, color 120ms ease, background 120ms ease;
}

.nft-filter:active {
  transform: scale(0.95);
}

.nft-filter.is-active {
  background: color-mix(in srgb, var(--gold) 18%, transparent);
  border-color: color-mix(in srgb, var(--gold) 45%, transparent);
  color: var(--gold);
}

/* Galeria de NFTs */
.nft-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 2px 0 4px;
}

.nft-item {
  display: grid;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  background: var(--card);
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  transition: transform 120ms ease, border-color 120ms ease;
}

.nft-item:active {
  transform: scale(0.97);
}

.nft-item:hover {
  border-color: color-mix(in srgb, var(--tc) 55%, transparent);
}

.nft-item__art {
  display: block;
  aspect-ratio: 1 / 1;
  border-radius: 11px;
  overflow: hidden;
  background: #0a0805;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tc) 35%, transparent);
}

.nft-item__art svg,
.nft-item__art img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.nft-item__meta {
  display: grid;
  gap: 3px;
  padding: 0 2px 2px;
}

.nft-item__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.nft-item__edition {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}

.nft-item__tier {
  flex-shrink: 0;
  padding: 2px 7px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--tc) 18%, transparent);
  color: var(--tc);
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.nft-item__perk {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
}

@media (min-width: 480px) {
  .nft-gallery {
    grid-template-columns: repeat(3, 1fr);
  }
}

.nft-benefits {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nft-benefits li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: var(--chip);
}

.nft-benefit__icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: color-mix(in srgb, var(--gold) 18%, transparent);
  color: var(--gold);
}

.nft-benefits strong {
  display: block;
  font-size: 0.9rem;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.nft-benefits small {
  display: block;
  margin-top: 1px;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.35;
}

.nft-rarity {
  display: grid;
  gap: 8px;
}

.nft-rarity__list {
  display: grid;
  gap: 6px;
}

.nft-tier {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: var(--input);
}

.nft-tier__name {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--gold);
}

.nft-tier__range {
  font-size: 0.74rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.nft-tier__perk {
  font-size: 0.74rem;
  font-weight: 600;
  text-align: right;
}

.nft-cta {
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 15px;
  background: linear-gradient(135deg, #1f9d6b, #0e7a4f);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 120ms ease;
}

.nft-cta:active {
  transform: scale(0.97);
}

/* ---------- Accesos (compact list, iOS style) ---------- */

.link-section {
  display: grid;
  gap: 10px;
}

.link-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.link-card {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 60px;
  padding: 10px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 18px;
  background: var(--card);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
  transition: transform 120ms ease;
}

.link-card:active {
  transform: scale(0.98);
}

.link-card.is-disabled {
  opacity: 0.64;
}

.link-card__icon {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  color: var(--accent);
}

.link-card__icon img {
  width: 26px;
  height: 26px;
  object-fit: contain;
  border-radius: 7px;
}

.link-card__body {
  display: block;
  flex: 1;
  min-width: 0;
}

.link-card h3 {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.link-card p {
  margin: 1px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.link-card__chevron {
  flex-shrink: 0;
  color: var(--muted);
  opacity: 0.7;
}

/* Desplegable de juegos */
.link-card--games {
  display: block;
  padding: 0;
  overflow: hidden;
}

.link-card__toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 60px;
  padding: 10px 12px;
  border: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.link-card__caret {
  flex-shrink: 0;
  color: var(--muted);
  transition: transform 220ms ease;
}

.link-card--games.is-open .link-card__caret {
  transform: rotate(180deg);
}

.games-list {
  display: grid;
  gap: 6px;
  padding: 0 10px 10px;
}

.games-list[hidden] {
  display: none;
}

.game-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: var(--chip);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: transform 120ms ease;
}

.game-item:active {
  transform: scale(0.98);
}

.game-item__icon {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  color: var(--accent);
}

.game-item__icon img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  border-radius: 7px;
}

.game-item__body {
  flex: 1;
  min-width: 0;
}

.game-item__body strong {
  display: block;
  font-size: 0.9rem;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.game-item__body small {
  display: block;
  color: var(--muted);
  font-size: 0.74rem;
}

.game-tag {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 0.66rem;
  font-weight: 700;
}

.game-tag svg {
  width: 12px;
  height: 12px;
}

.game-tag.is-verified {
  background: color-mix(in srgb, #15d982 18%, transparent);
  color: #15d982;
}

.game-tag.is-reviewing {
  background: color-mix(in srgb, #facc15 20%, transparent);
  color: #d9a400;
}

.game-tag.is-unverified {
  background: color-mix(in srgb, var(--muted) 22%, transparent);
  color: var(--muted);
}

.link-card--group {
  cursor: default;
}

.link-card--group:active {
  transform: none;
}

.link-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 7px;
}

.link-card__actions a {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 4px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--chip);
  color: var(--gold);
  font-size: 0.76rem;
  font-weight: 650;
  transition: transform 120ms ease;
}

.link-card__actions a:active {
  transform: scale(0.95);
}

html[data-theme="light"] .link-card__icon {
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: color-mix(in srgb, var(--accent) 70%, #4a3a08);
}

/* ---------- RCOLito / token / community ---------- */

.rcolito-card {
  display: grid;
  grid-template-columns: 108px 1fr;
  gap: 14px;
  align-items: center;
  padding: 12px;
}

.rcolito-card img {
  width: 108px;
  height: 108px;
  object-fit: cover;
  border-radius: 16px;
  object-position: 68% 50%;
}

.rcolito-card p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.45;
}

.token-panel {
  justify-content: space-between;
  gap: 14px;
  padding: 16px;
}

.token-panel > div {
  min-width: 0;
}

.token-panel p {
  max-width: 17rem;
  margin: 4px 0 0;
  overflow: hidden;
  color: var(--mono-ink);
  font-family: "SF Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.76rem;
  font-weight: 600;
  text-overflow: ellipsis;
}

.copy-button {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 14px;
  background: linear-gradient(135deg, #f8d66d, #b87803);
  color: #171005;
  font-size: 0.9rem;
  font-weight: 700;
  transition: transform 120ms ease;
}

.copy-button:active {
  transform: scale(0.96);
}

.community-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.community-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.community-link {
  min-height: 60px;
  justify-content: center;
  gap: 9px;
  padding: 10px;
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  background: var(--chip);
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 700;
  transition: transform 120ms ease;
}

.community-link:active {
  transform: scale(0.97);
}

.community-link small {
  display: block;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 500;
}

/* ---------- Bottom nav & toast ---------- */

.bottom-nav {
  position: fixed;
  right: 16px;
  bottom: max(14px, env(safe-area-inset-bottom));
  left: 16px;
  z-index: 5;
  width: min(calc(100% - 32px), 428px);
  min-height: 62px;
  margin: 0 auto;
  justify-content: space-around;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--nav-bg);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.bottom-nav a {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: var(--nav-ink);
}

.bottom-nav a.is-active {
  background: color-mix(in srgb, var(--gold) 16%, transparent);
  color: var(--gold);
}

.toast {
  position: fixed;
  right: 16px;
  bottom: calc(88px + env(safe-area-inset-bottom));
  left: 16px;
  max-width: 428px;
  min-height: 46px;
  margin: 0 auto;
  display: grid;
  place-items: center;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--toast-bg);
  color: var(--toast-ink);
  font-size: 0.88rem;
  font-weight: 600;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Modal de detalle NFT ---------- */

body.modal-open {
  overflow: hidden;
}

.nft-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 18px;
}

.nft-modal[hidden] {
  display: none;
}

.nft-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 3, 2, 0.66);
  backdrop-filter: blur(6px);
  animation: fadeIn 180ms ease;
}

.nft-modal__card {
  position: relative;
  z-index: 1;
  width: min(100%, 360px);
  max-height: 88svh;
  overflow-y: auto;
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid color-mix(in srgb, var(--tc, #f8d66d) 40%, var(--line));
  border-radius: 24px;
  background: var(--panel-strong, var(--panel));
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(20px);
  animation: modalIn 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

html[data-theme="light"] .nft-modal__card {
  background: rgba(255, 255, 255, 0.98);
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.96);
  }
}

.nft-modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.4);
  color: #fff;
  cursor: pointer;
  backdrop-filter: blur(8px);
}

.nft-modal__art {
  aspect-ratio: 1 / 1;
  border-radius: 18px;
  overflow: hidden;
  background: #0a0805;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tc, #f8d66d) 35%, transparent),
    0 0 28px color-mix(in srgb, var(--tc, #f8d66d) 30%, transparent);
}

.nft-modal__art svg,
.nft-modal__art img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.nft-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.nft-modal__head h3 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.nft-modal__tier {
  flex-shrink: 0;
  padding: 4px 11px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--tc, #f8d66d) 20%, transparent);
  color: var(--tc, #f8d66d);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.nft-modal__edition {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
}

.nft-modal__perk {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--tc, #f8d66d) 14%, transparent);
  color: var(--tc, #f8d66d);
  font-size: 0.92rem;
  font-weight: 700;
  width: fit-content;
}

.nft-modal__perk svg {
  width: 16px;
  height: 16px;
}

.nft-modal__benefits {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nft-modal__benefits li {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 0.85rem;
  font-weight: 600;
}

.nft-modal__benefits svg {
  width: 17px;
  height: 17px;
  color: var(--gold);
  flex-shrink: 0;
}

.nft-modal__share {
  min-height: 46px;
  margin-top: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid color-mix(in srgb, var(--tc, #f8d66d) 45%, transparent);
  border-radius: 14px;
  background: color-mix(in srgb, var(--tc, #f8d66d) 14%, transparent);
  color: var(--tc, #f8d66d);
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 120ms ease;
}

.nft-modal__share:active {
  transform: scale(0.97);
}

.nft-modal__share svg {
  width: 17px;
  height: 17px;
}

.nft-modal__note {
  margin-top: 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.76rem;
}

svg {
  width: 20px;
  height: 20px;
}

/* ---------- Vista Swap separada ---------- */

.swap-view {
  display: grid;
  gap: 14px;
  padding-top: max(8px, env(safe-area-inset-top));
  animation: viewIn 240ms ease;
}

.swap-view__price {
  flex-shrink: 1;
  min-width: 0;
  max-width: 52%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 5px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--chip);
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* ---------- Wallet / Portafolio ---------- */

.wallet-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid color-mix(in srgb, #ff1476 30%, var(--line));
  border-radius: 24px;
  background:
    radial-gradient(circle at 12% 0%, rgba(255, 20, 118, 0.16), transparent 60%),
    radial-gradient(circle at 90% 8%, rgba(179, 0, 255, 0.13), transparent 55%),
    var(--panel);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.wallet-card__top {
  display: flex;
  align-items: center;
  gap: 11px;
}

.wallet-card__id {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  flex: 1;
}

.wallet-card__avatar {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff1476, #b30cff);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28), inset 0 0 0 2px rgba(255, 255, 255, 0.16);
}

.wallet-card__idtext {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.wallet-card__name {
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wallet-card__addr {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  width: fit-content;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: color 120ms ease;
}

.wallet-card__addr:active {
  color: var(--gold);
}

.wallet-card__addr svg {
  width: 13px;
  height: 13px;
}

.swap-wallet-connect {
  flex-shrink: 0;
  padding: 9px 18px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #f8d66d, #b87803);
  color: #171005;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(248, 214, 109, 0.28);
  transition: transform 120ms ease;
}

.swap-wallet-connect:active {
  transform: scale(0.95);
}

.wallet-card__refresh {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--chip);
  color: var(--gold);
  cursor: pointer;
  transition: transform 120ms ease;
}

.wallet-card__refresh:active {
  transform: scale(0.92);
}

.wallet-card__refresh.is-spinning svg {
  animation: spin 600ms linear;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.wallet-card__total {
  display: grid;
  gap: 2px;
}

.wallet-card__total[hidden] {
  display: none;
}

.wallet-card__total strong {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  line-height: 1.05;
}

.wallet-card__hint {
  color: var(--muted);
  font-size: 0.72rem;
}

.wallet-card__empty {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 10px 4px 4px;
  text-align: center;
}

.wallet-card__empty[hidden] {
  display: none;
}

.wallet-card__empty svg {
  width: 30px;
  height: 30px;
  color: var(--gold);
  opacity: 0.85;
}

.wallet-card__empty p {
  margin: 0;
  max-width: 24rem;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.wallet-tokens {
  display: grid;
  gap: 6px;
}

.wallet-tokens[hidden] {
  display: none;
}

.wallet-token {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  background: var(--chip);
  transition: opacity 200ms ease;
}

.wallet-token.is-empty {
  opacity: 0.5;
}

.wallet-token.is-loading .wallet-token__bal {
  color: var(--muted);
}

.wallet-token__icon {
  position: relative;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  overflow: hidden;
  background: color-mix(in srgb, var(--tk) 22%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tk) 40%, transparent);
}

.wallet-token__init {
  color: var(--tk);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

html[data-theme="light"] .wallet-token__init {
  color: color-mix(in srgb, var(--tk) 60%, #2a2208);
}

.wallet-token__icon img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #fff;
}

.wallet-token__info {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 1px;
}

.wallet-token__info strong {
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.wallet-token__info small {
  color: var(--muted);
  font-size: 0.72rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wallet-token__amounts {
  flex-shrink: 0;
  display: grid;
  gap: 1px;
  text-align: right;
}

.wallet-token__bal {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.wallet-token__usd {
  color: var(--muted);
  font-size: 0.74rem;
  font-variant-numeric: tabular-nums;
}

.swap-rate-row {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 14px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: var(--chip);
  color: var(--muted);
  font-size: 0.82rem;
}

.swap-rate-row[hidden] {
  display: none;
}

.swap-last-tx {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  background: var(--chip);
}

.swap-last-tx[hidden] {
  display: none;
}

.swap-last-tx__link {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--gold);
  font-size: 0.88rem;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.swap-last-tx__link span {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------- Historial de transacciones ---------- */

.tx-history {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 22px;
  background: var(--panel);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow-soft);
}

.tx-history[hidden] {
  display: none;
}

.tx-history__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.tx-history__src {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, #15d982 16%, transparent);
  color: #15d982;
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.tx-history__list {
  display: grid;
  gap: 6px;
}

.tx-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  background: var(--chip);
  transition: transform 120ms ease;
}

.tx-item:active {
  transform: scale(0.98);
}

.tx-item__icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 11px;
}

.tx-item--buy .tx-item__icon {
  background: rgba(21, 217, 130, 0.14);
  color: #15d982;
}

.tx-item--sell .tx-item__icon {
  background: rgba(255, 20, 118, 0.13);
  color: #ff1476;
}

.tx-item__icon svg {
  width: 18px;
  height: 18px;
}

.tx-item__body {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 3px;
}

.tx-item__pair {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.88rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.tx-item__arrow {
  flex-shrink: 0;
  color: var(--muted);
}

.tx-item__arrow svg,
svg.tx-item__arrow {
  width: 13px;
  height: 13px;
}

.tx-item__meta {
  display: flex;
  align-items: center;
  gap: 7px;
}

.tx-item__time {
  color: var(--muted);
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
}

.tx-item__badge {
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 0.64rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.tx-item__badge--buy {
  background: rgba(21, 217, 130, 0.14);
  color: #15d982;
}

.tx-item__badge--sell {
  background: rgba(255, 20, 118, 0.13);
  color: #ff1476;
}

.tx-item__link {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--chip);
  color: var(--gold);
  transition: transform 120ms ease;
}

.tx-item__link:active {
  transform: scale(0.92);
}

.tx-item__link--none {
  color: #15d982;
  pointer-events: none;
}

.tx-item__link svg {
  width: 15px;
  height: 15px;
}

/* Teaser del swap en la vista hub */
.swap-teaser {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid color-mix(in srgb, #ff1476 35%, var(--line));
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255, 20, 118, 0.14), rgba(179, 0, 255, 0.1) 60%, transparent),
    var(--panel);
  color: var(--ink);
  box-shadow: var(--shadow-soft);
  transition: transform 120ms ease;
}

.swap-teaser:active {
  transform: scale(0.98);
}

.swap-teaser__icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(255, 20, 118, 0.28), rgba(179, 0, 255, 0.22));
  color: #ff1476;
}

.swap-teaser__body {
  flex: 1;
  min-width: 0;
}

.swap-teaser__body strong {
  display: block;
  font-size: 0.96rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.swap-teaser__body small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
}

.swap-teaser > svg {
  flex-shrink: 0;
  color: var(--muted);
}

.link-card__chevron svg,
svg.link-card__chevron {
  width: 17px;
  height: 17px;
}

/* ---------- Narrow phones ---------- */

@media (max-width: 374px) {
  .app-shell {
    padding-right: 10px;
    padding-left: 10px;
  }

  .hero {
    min-height: 480px;
    padding: 14px;
  }

  .intro h1 {
    font-size: 1.5rem;
  }

  .coin-hero {
    width: min(58vw, 200px);
  }

  .spotlight {
    flex-direction: column;
    align-items: stretch;
  }

  .buy-card {
    min-height: 46px;
  }

  .panel {
    padding: 13px;
  }

  .stat-card strong {
    font-size: 1.05rem;
  }

  .swap-row input,
  .swap-row output {
    font-size: 1.25rem;
  }

  .link-card {
    min-height: 54px;
    padding: 8px 10px;
    gap: 10px;
  }

  .link-card__icon {
    width: 34px;
    height: 34px;
  }

  .community-links {
    grid-template-columns: 1fr;
  }

  .token-panel {
    flex-direction: column;
    align-items: stretch;
  }

  .token-panel .copy-button {
    width: 100%;
    min-height: 46px;
  }

  .rcolito-card {
    grid-template-columns: 92px 1fr;
  }

  .rcolito-card img {
    width: 92px;
    height: 104px;
  }

  .bottom-nav {
    min-height: 56px;
  }

  .bottom-nav a {
    width: 40px;
    height: 40px;
  }
}

/* ---------- Wide phones / small tablets ---------- */

@media (min-width: 560px) {
  .link-grid {
    grid-template-columns: 1fr 1fr;
  }

  .market-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (min-width: 720px) {
  body {
    display: grid;
    place-items: start center;
  }

  .app-shell {
    padding-top: 28px;
  }
}

/* ---------- Desktop ---------- */

@media (min-width: 900px) {
  body {
    min-height: 100vh;
  }

  .app-shell {
    width: min(100%, 960px);
    display: grid;
    grid-template-columns: minmax(360px, 430px) minmax(0, 1fr);
    gap: 18px;
    align-items: start;
    overflow: visible;
    padding-right: 22px;
    padding-left: 22px;
  }

  .app-shell > * {
    min-width: 0;
  }

  .hero {
    position: sticky;
    top: 28px;
    min-height: calc(100svh - 56px);
  }

  main {
    grid-template-columns: 1fr 1fr;
    align-content: start;
    padding-top: 0;
    width: 100%;
    max-width: 100%;
  }

  .nft-view,
  .swap-view {
    grid-template-columns: 1fr;
  }

  .spotlight,
  .banner-card,
  .link-section,
  .market-panel,
  .swap-panel,
  .swap-teaser {
    grid-column: span 2;
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .rcolito-card,
  .token-panel,
  .community-panel {
    grid-column: span 1;
  }

  .market-grid {
    grid-template-columns: 1fr 1fr;
  }

  .link-grid {
    grid-template-columns: 1fr 1fr;
  }

  .rcolito-card {
    grid-template-columns: 1fr;
  }

  .rcolito-card img {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
  }

  .bottom-nav {
    width: min(520px, calc(100% - 32px));
  }
}
