/* Artificial Portal — dark stone + phosphor, multi-page */

:root {
  --void: #05070a;
  --stone: rgba(12, 16, 20, 0.78);
  --edge: rgba(180, 210, 160, 0.14);
  --hair: rgba(180, 210, 160, 0.1);
  --glow: #d9f0b4;
  --glow-mid: #a8d178;
  --glow-deep: #5f8a3c;
  --lamp: #f0c48a;
  --ink: #e6ebe2;
  --ink-dim: #94a096;
  --ink-faint: #5d6a62;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Code", "SF Mono", Consolas, monospace;
  --gutter: clamp(0.85rem, 3.5vw, 3.5rem);
  --radius: 22px;
  --nav-h: 4rem;
  /* Phone mockups scale with viewport so desktop & mobile keep the same composition */
  --phone-solo-w: clamp(160px, 36vw, 420px);
  --phone-stack-w: clamp(128px, 30vw, 340px);
  --phone-radius: clamp(16px, 3.2vw, 34px);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100svh;
  background: var(--void);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--glow-mid);
}

img {
  max-width: 100%;
  height: auto;
}

/* ---------------------------------------------------------------- stage */

.stage {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

/* Always show still under the video so mobile never goes pure black if play() fails */
.stage--video {
  background: url('porte.jpg') center / cover no-repeat;
}

.stage__video,
.stage__photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.stage__video {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.1s ease;
  pointer-events: none;
  /* Never show Safari/iOS play chrome — this is wallpaper, not a player */
  -webkit-appearance: none;
}

.stage__video::-webkit-media-controls,
.stage__video::-webkit-media-controls-enclosure,
.stage__video::-webkit-media-controls-start-playback-button,
.stage__video::-webkit-media-controls-overlay-play-button {
  display: none !important;
  -webkit-appearance: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
  width: 0 !important;
  height: 0 !important;
}

/* Autoplay blocked → hide <video> so the play glyph never appears; still shows porte.jpg */
.stage--video.is-static .stage__video,
.stage__video.is-fallback {
  display: none !important;
}

.stage__video.is-active,
.page-home .stage__video:only-of-type {
  opacity: 1;
}

.stage--video.is-static {
  background: url('porte.jpg') center / cover no-repeat;
}

.stage__photo {
  background: url('porte.jpg') center 35% / cover no-repeat;
}

/* Profile only: light readability scrim (home + explore have none). */
.stage__veil--heavy {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(5, 7, 10, 0.35), rgba(5, 7, 10, 0.55));
}

.page-home .home__title,
.page-home .home__lede,
.page-home .home__section-title,
.page-home .home__points li {
  text-shadow: 0 1px 18px rgba(0, 0, 0, 0.55);
}

.page-explore .explore__title,
.page-explore .explore__lede {
  text-shadow: 0 1px 16px rgba(0, 0, 0, 0.5);
}

/* ------------------------------------------------------------------ nav */

.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(8px) saturate(1.1);
  transition: background 0.35s ease, border-color 0.35s ease;
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--nav-h);
  max-width: 1280px;
  margin: 0 auto;
  padding: 0.65rem var(--gutter);
}

.nav__brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.nav__logo {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: 0 0 16px rgba(120, 175, 80, 0.22);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.nav__brand:hover .nav__logo {
  transform: scale(1.05);
  box-shadow: 0 0 22px rgba(120, 175, 80, 0.35);
}

.nav__burger {
  display: none;
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink);
  padding: 0.35rem 0.55rem;
  cursor: pointer;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 0.35rem 0.85rem;
}

.nav__link {
  color: rgba(230, 235, 226, 0.82);
  text-decoration: none;
  font-size: 0.92rem;
  padding: 0.4rem 0.55rem;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.35);
  transition: color 0.25s ease, opacity 0.25s ease;
}

.nav__link:hover,
.nav__link.is-active {
  color: var(--glow);
}

.nav__connect {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: var(--ink);
  padding: 0.55rem 1rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

.nav__connect:hover {
  background: rgba(255, 255, 255, 0.2);
}

.nav__connect.is-connected {
  border-color: rgba(168, 209, 120, 0.35);
  color: var(--glow);
}

/* ------------------------------------------------------------- site footer */

.site-footer {
  position: relative;
  z-index: 2;
  margin-top: clamp(2rem, 6vh, 4rem);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(5, 7, 10, 0.72);
  backdrop-filter: blur(10px);
}

.site-footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: 1280px;
  margin: 0 auto;
  padding: 1.1rem var(--gutter) 1.35rem;
}

.site-footer__brand {
  font-size: 0.85rem;
  color: var(--ink-dim);
  letter-spacing: 0.02em;
}

.site-footer__x {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--glow);
  text-decoration: none;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: lowercase;
  opacity: 0.92;
  transition: opacity 0.2s ease, color 0.2s ease;
}

.site-footer__x:hover {
  opacity: 1;
  color: #f0fad8;
}

@media (max-width: 720px) {
  .nav__burger {
    display: inline-flex;
  }

  .nav__links {
    display: none;
    position: absolute;
    top: calc(var(--nav-h) + 1px);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
    padding: 0.75rem var(--gutter) 1rem;
    background: rgba(5, 7, 10, 0.92);
    backdrop-filter: blur(14px) saturate(1.05);
    border-bottom: 1px solid rgba(217, 240, 180, 0.18);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55);
    animation: softIn 0.28s ease;
  }

  .nav__links.is-open {
    display: flex;
  }

  .nav__links .nav__link {
    color: var(--glow);
    text-shadow: none;
    padding: 0.7rem 0.55rem;
    border-radius: 10px;
  }

  .nav__links .nav__link:hover,
  .nav__links .nav__link.is-active {
    color: #f0fad8;
    background: rgba(217, 240, 180, 0.08);
  }

  .nav__connect {
    width: 100%;
    margin-top: 0.35rem;
    border-color: rgba(217, 240, 180, 0.35);
    background: transparent;
    color: var(--glow);
  }

  .nav__connect:hover,
  .nav__connect.is-connected {
    background: rgba(217, 240, 180, 0.1);
    border-color: rgba(217, 240, 180, 0.5);
    color: #f0fad8;
  }
}

/* ----------------------------------------------------------------- home */

.home {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.home--scroll {
  display: block;
}

.home__panel {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-height: auto;
  padding: clamp(1.5rem, 5vh, 3rem) 0 clamp(1.25rem, 4vh, 2.5rem);
  max-width: 42rem;
}

.home__hero {
  padding-bottom: 0.5rem;
}

.home__title {
  margin: 0;
  display: flex;
  flex-direction: column;
  font-size: clamp(2.8rem, 11vw, 6.5rem);
  line-height: 0.92;
  font-weight: 700;
  letter-spacing: -0.03em;
  text-transform: uppercase;
}

.home__title-lit {
  color: var(--glow);
  text-shadow:
    0 0 14px rgba(217, 240, 180, 0.45),
    0 0 60px rgba(120, 175, 80, 0.3);
}

.home__section-title {
  margin: 0.4rem 0 0;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  letter-spacing: -0.02em;
  line-height: 1.15;
  text-shadow: 0 1px 18px rgba(0, 0, 0, 0.55);
}

.home__lede {
  margin: 1.2rem 0 0;
  color: var(--ink);
  font-size: clamp(1rem, 2vw, 1.12rem);
  text-shadow: 0 1px 14px rgba(0, 0, 0, 0.55);
}

.home__points {
  margin: 1.4rem 0 0;
  padding: 0;
  list-style: none;
}

.home__points li {
  position: relative;
  padding: 0.65rem 0 0.65rem 1.2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--ink);
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.45);
}

.home__points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.15rem;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--glow-mid);
  box-shadow: 0 0 10px rgba(168, 209, 120, 0.5);
}

.home__scroll-hint {
  margin: 1rem 0 0;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(230, 235, 226, 0.7);
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.45);
}

.home__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.8rem;
}

.home__install-status {
  margin: 0.85rem 0 0;
  min-height: 1.2em;
  font-size: 0.88rem;
  color: var(--glow-mid);
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.45);
}

/* ------------------------------------------------------- home split rows */

.home__split {
  position: relative;
  display: grid;
  /* Same composition as desktop: copy + phone side-by-side at every width */
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center;
  gap: 0;
  padding: clamp(1rem, 3.5vh, 2.25rem) 0;
  max-width: none;
}

.home__split-copy {
  position: relative;
  z-index: 2;
  order: 1;
  max-width: 34rem;
  margin-right: clamp(-1.25rem, -4vw, -4.5rem);
}

.home__split-art {
  display: flex;
  justify-content: flex-end;
  order: 2;
  position: relative;
  z-index: 1;
}

.home__split--reverse .home__split-copy {
  order: 2;
  margin-right: 0;
  margin-left: clamp(-1.25rem, -4vw, -4.5rem);
}

.home__split--reverse .home__split-art {
  order: 1;
  justify-content: flex-start;
}

.phone--solo {
  margin: 0;
  width: var(--phone-solo-w);
  max-width: 100%;
  border-radius: var(--phone-radius);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: #0a0d10;
  box-shadow:
    0 28px 80px rgba(0, 0, 0, 0.55),
    0 0 56px rgba(120, 175, 80, 0.18);
}

.phone--solo img {
  display: block;
  width: 100%;
  height: auto;
}

.home__app {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(1rem, 4vw, 3.5rem);
  align-items: center;
  min-height: auto;
  padding: clamp(1.5rem, 5vh, 3.5rem) 0 clamp(2.5rem, 8vh, 5rem);
  max-width: none;
}

.home__app::before {
  content: '';
  position: absolute;
  top: -1rem;
  bottom: -1rem;
  left: 50%;
  width: 100vw;
  transform: translateX(-50%);
  background: radial-gradient(90% 120% at 42% 20%, rgba(14, 18, 14, 0.72), rgba(5, 7, 8, 0.55) 70%, transparent 100%);
  z-index: 0;
  pointer-events: none;
}

.home__app-copy,
.home__phones {
  position: relative;
  z-index: 1;
}

.home__app-copy {
  max-width: 34rem;
}

.home__phones {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  /* Height tracks phone scale so cluster sits in the same spot */
  min-height: calc(var(--phone-stack-w) * 2.05);
  padding: clamp(0.5rem, 2vw, 1rem) 0 clamp(1rem, 3vw, 2rem);
}

.phone {
  margin: 0;
  width: var(--phone-stack-w);
  border-radius: var(--phone-radius);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: #0a0d10;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.52);
}

.phone img {
  display: block;
  width: 100%;
  height: auto;
}

.phone--back {
  transform: translate(18%, -6%) rotate(-8deg);
  opacity: 0.88;
  z-index: 1;
}

.phone--front {
  transform: translate(-18%, 4%) rotate(4deg);
  z-index: 2;
  box-shadow:
    0 28px 70px rgba(0, 0, 0, 0.5),
    0 0 40px rgba(120, 175, 80, 0.15);
}

/* Narrow phones: keep same grid, just tighter type + smaller art */
@media (max-width: 640px) {
  .home__panel {
    max-width: none;
  }

  /* Title under ticker; Launch → scroll hint → Stocks stay packed (no full-viewport void) */
  .page-home .home__hero.home__panel {
    justify-content: flex-start;
    min-height: auto;
    padding: 0.2rem 0 0.85rem;
  }

  .home__scroll-hint {
    margin-top: 0.85rem;
    padding-top: 0;
  }

  .page-home .home__split {
    padding: 0.85rem 0 1.25rem;
  }

  .home__title {
    font-size: clamp(2.2rem, 12vw, 3.4rem);
  }

  .home__section-title {
    font-size: clamp(1.15rem, 4.6vw, 1.55rem);
  }

  .home__lede {
    margin-top: 0.85rem;
    font-size: 0.92rem;
  }

  .home__points {
    margin-top: 1rem;
  }

  .home__points li {
    padding: 0.5rem 0 0.5rem 1rem;
    font-size: 0.9rem;
  }

  .home__split-copy,
  .home__app-copy {
    max-width: none;
  }

  .phone--solo,
  .phone {
    box-shadow:
      0 14px 36px rgba(0, 0, 0, 0.48),
      0 0 28px rgba(120, 175, 80, 0.12);
  }

  .phone--front {
    box-shadow:
      0 14px 36px rgba(0, 0, 0, 0.48),
      0 0 24px rgba(120, 175, 80, 0.12);
  }
}

/* Desktop only: tight sections, larger mockups, no Launch→Stocks void */
@media (min-width: 900px) {
  .page-home .home {
    max-width: 1120px;
  }

  .page-home .home__hero.home__panel {
    justify-content: flex-start;
    min-height: auto;
    padding: 1.75rem 0 1rem;
    max-width: 38rem;
  }

  .page-home .home__scroll-hint {
    margin-top: 1rem;
  }

  .page-home .home__split {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: 1.25rem 2rem;
    padding: 1.35rem 0 1.75rem;
    max-width: 1040px;
    margin-inline: auto;
  }

  .page-home .home__split-copy {
    max-width: 30rem;
    margin-right: -0.75rem;
  }

  .page-home .home__split--reverse .home__split-copy {
    margin-left: -0.75rem;
  }

  .page-home {
    --phone-solo-w: clamp(260px, 26vw, 380px);
    --phone-stack-w: clamp(210px, 20vw, 310px);
    --phone-radius: 24px;
  }

  .page-home .home__app {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.95fr);
    gap: 1.5rem 2.25rem;
    max-width: 1040px;
    margin-inline: auto;
    padding: 1.75rem 0 2.75rem;
    align-items: center;
  }

  .page-home .home__app-copy {
    max-width: 28rem;
  }

  .page-home .home__phones {
    justify-content: flex-end;
    min-height: calc(var(--phone-stack-w) * 1.9);
    padding: 0.25rem 0 0.5rem;
  }

  .page-home .phone--back {
    transform: translate(12%, -4%) rotate(-7deg);
  }

  .page-home .phone--front {
    transform: translate(-10%, 3%) rotate(3deg);
  }
}

@media (min-width: 1200px) {
  .page-home .home {
    max-width: 1180px;
  }

  .page-home .home__app {
    max-width: 1100px;
  }

  .page-home {
    --phone-solo-w: clamp(280px, 24vw, 400px);
    --phone-stack-w: clamp(230px, 18vw, 330px);
  }
}

@media (max-width: 420px) {
  .home__actions {
    gap: 0.55rem;
    margin-top: 1.25rem;
  }

  .home__actions .btn-create,
  .home__actions .button {
    flex: 1 1 auto;
    justify-content: center;
    min-height: 2.75rem;
    padding-inline: 0.9rem;
    font-size: 0.88rem;
  }
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
}

.chips li {
  padding: 0.35rem 0.8rem;
  border: 1px solid var(--edge);
  border-radius: 999px;
  background: rgba(12, 16, 20, 0.55);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

/* -------------------------------------------------------------- explore */

.ticker {
  position: relative;
  z-index: 2;
  overflow: hidden;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(8px) saturate(1.1);
  /* Soft fade so chips ease in/out at the edges */
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 8%, #000 92%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 8%, #000 92%, transparent 100%);
}

.ticker__track {
  display: flex;
  gap: 0.65rem;
  width: max-content;
  padding: 0.7rem var(--gutter);
  animation: ticker-marquee 42s linear infinite;
  will-change: transform;
}

.ticker__track.is-paused {
  animation-play-state: paused;
}

.ticker__item {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.75rem 0.35rem 0.4rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(6px) saturate(1.1);
  font-family: var(--mono);
  font-size: clamp(0.62rem, 2.4vw, 0.72rem);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.35);
  white-space: nowrap;
  cursor: default;
  pointer-events: none;
  user-select: none;
}

.ticker__logo {
  width: clamp(16px, 4.2vw, 22px);
  height: clamp(16px, 4.2vw, 22px);
  border-radius: 999px;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.16);
  flex-shrink: 0;
}

@keyframes ticker-marquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

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

.page-home .home,
.page-explore .explore,
.page-profile .profile,
.page-launch .launch,
.page-token .token,
.page-mcp .mcp {
  animation: softIn 0.55s ease both;
}

.page-home .ticker {
  /* Opacity only — transform here would fight the marquee on the child track */
  animation: softInFade 0.7s ease both;
}

@keyframes softInFade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.explore {
  position: relative;
  z-index: 1;
  padding: clamp(1.5rem, 4vh, 2.8rem) var(--gutter) 4rem;
  max-width: 1280px;
  margin: 0 auto;
}

.explore__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem 1.5rem;
}

.explore__title {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.7rem;
  font-size: clamp(2rem, 5.5vw, 3.2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
}

.count-pill {
  display: inline-flex;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--edge);
  background: rgba(12, 16, 20, 0.65);
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--ink-dim);
}

.explore__lede {
  margin: 0.75rem 0 0;
  color: var(--ink-dim);
  max-width: 34rem;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.search {
  flex: 1 1 200px;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: min(100%, 200px);
  max-width: 400px;
  padding: 0.7rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--edge);
  background: rgba(12, 16, 20, 0.62);
  color: var(--ink-faint);
}

.search input {
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  min-width: 0;
}

.search input::placeholder {
  color: var(--ink-faint);
}

.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  padding: 0.28rem;
  border-radius: 999px;
  border: 1px solid var(--edge);
  background: rgba(12, 16, 20, 0.55);
}

.pill {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 0.5rem 0.85rem;
  background: transparent;
  color: var(--ink-dim);
  font-size: 0.84rem;
  cursor: pointer;
}

.pill.is-active {
  background: rgba(226, 235, 226, 0.92);
  color: #0a1008;
  font-weight: 600;
}

.btn-create {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 0.85rem 1.35rem;
  background: linear-gradient(135deg, var(--glow-mid), var(--glow-deep));
  color: #0a1008;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 0 24px rgba(120, 175, 80, 0.25);
}

.btn-create:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.button {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1.15rem;
  border: 1px solid var(--edge);
  border-radius: 999px;
  background: rgba(12, 16, 20, 0.75);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
}

.button--lit {
  border-color: rgba(168, 209, 120, 0.4);
  color: var(--glow);
}

.button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* ---------------------------------------------------------------- cards */

.token-grid {
  display: grid;
  gap: 1rem;
  margin-top: 1.4rem;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr));
}

.pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  margin: 1.25rem 0 0.5rem;
}

.pager__btn {
  appearance: none;
  min-width: 2.2rem;
  height: 2.2rem;
  padding: 0 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--edge);
  background: rgba(12, 16, 20, 0.65);
  color: var(--ink-dim);
  font-family: var(--mono);
  font-size: 0.78rem;
  cursor: pointer;
}

.pager__btn.is-active {
  border-color: rgba(217, 240, 180, 0.45);
  background: rgba(217, 240, 180, 0.14);
  color: var(--glow);
}

.pager__btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.pager__ellipsis {
  color: var(--ink-faint);
  font-family: var(--mono);
  font-size: 0.78rem;
  padding: 0 0.15rem;
}

.token-empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 2.5rem 1.25rem;
  border-radius: var(--radius);
  border: 1px solid var(--edge);
  background: var(--stone);
  text-align: center;
  color: var(--ink-faint);
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.token-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--edge);
  background: rgba(10, 13, 16, 0.84);
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s, border-color 0.2s;
}

.token-card:hover {
  transform: translateY(-2px);
  border-color: rgba(168, 209, 120, 0.35);
}

.token-card__media {
  position: relative;
  aspect-ratio: 1;
  background: #0a0d10;
  overflow: hidden;
}

.token-card__media.is-empty,
.logo-field__preview.is-empty {
  background: #0a0d10;
}

.logo-field__preview img[hidden],
.token-card__media img[hidden] {
  display: none;
}

.token-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.token-card__ver {
  position: absolute;
  top: 0.7rem;
  left: 0.7rem;
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
  background: rgba(12, 16, 20, 0.75);
  border: 1px solid var(--edge);
  color: var(--ink-dim);
  font-family: var(--mono);
  font-size: 0.66rem;
}

.token-card__ver--stock {
  border-color: rgba(240, 196, 138, 0.45);
  color: var(--lamp);
}

.token-card__info {
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.85rem 0.95rem 1rem;
  border-top: 1px solid var(--hair);
}

.token-card__name {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}

.token-card__sym {
  display: block;
  margin-top: 0.15rem;
  color: var(--glow-mid);
  font-weight: 600;
  font-size: 0.9rem;
}

.token-card__time {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--ink-faint);
}

.reveal {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

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

/* -------------------------------------------------------------- create */

.create {
  width: min(94vw, 420px);
  padding: 0;
  border: 1px solid var(--edge);
  border-radius: var(--radius);
  background: rgba(8, 11, 14, 0.96);
  color: var(--ink);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
}

.create::backdrop {
  background: rgba(5, 7, 10, 0.75);
  backdrop-filter: blur(5px);
}

.create__sheet {
  margin: 0;
  padding: 1.2rem 1.25rem 1.35rem;
}

.create__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.create__head h2 {
  margin: 0;
  font-size: 1.3rem;
}

.create__close {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--ink-dim);
  font-size: 1.5rem;
  cursor: pointer;
}

.create__lede {
  margin: 0.5rem 0 0;
  color: var(--ink-dim);
  font-size: 0.9rem;
}

.create__versions {
  margin-top: 1rem;
  width: fit-content;
}

.gate {
  margin-top: 1.1rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--hair);
}

.gate__row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.gate__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 1rem;
  margin-top: 0.85rem;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.gate__status {
  margin: 0.8rem 0 0;
  font-size: 0.88rem;
  color: var(--ink-dim);
}

.gate__status[data-tone='ok'] {
  color: var(--glow-mid);
}

.gate__status[data-tone='warn'] {
  color: var(--lamp);
}

.gate__result {
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--hair);
  font-size: 0.86rem;
  color: var(--ink-dim);
}

.gate__result p {
  margin: 0.25rem 0 0;
}

/* ------------------------------------------------------------- profile */

.profile {
  position: relative;
  z-index: 1;
  padding: clamp(1.5rem, 4vh, 2.8rem) var(--gutter) 4rem;
  max-width: 960px;
  margin: 0 auto;
}

.profile__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.eyebrow {
  margin: 0 0 0.4rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--glow-mid);
}

.profile__title {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  letter-spacing: -0.02em;
}

.profile__full {
  display: inline-block;
  margin-top: 0.35rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--ink-faint);
  word-break: break-all;
  text-decoration: none;
}

.profile__panel {
  margin-top: 1.5rem;
  padding: 1.2rem 1.2rem 1.35rem;
  border-radius: var(--radius);
  border: 1px solid var(--edge);
  background: rgba(10, 13, 16, 0.82);
}

.profile__panel h2 {
  margin: 0;
  font-size: 1.15rem;
}

.profile__panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.profile__hint {
  margin: 0.45rem 0 0;
  color: var(--ink-dim);
  font-size: 0.9rem;
}

.fee-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.1rem;
}

.fee-label {
  display: block;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.fee-value {
  display: block;
  margin-top: 0.25rem;
  font-size: 1.35rem;
}

.token-grid--profile {
  margin-top: 1rem;
}

/* ---------------------------------------------------------------- launch */

.launch {
  position: relative;
  z-index: 1;
  padding: clamp(1.5rem, 4vh, 2.8rem) var(--gutter) 4rem;
  max-width: 1100px;
  margin: 0 auto;
}

.page-launch .profile__title,
.page-launch .explore__lede {
  text-shadow: 0 1px 16px rgba(0, 0, 0, 0.5);
}

.launch__head {
  max-width: 42rem;
}

.launch__grid {
  display: grid;
  gap: 1.5rem;
  margin-top: 1.8rem;
  align-items: start;
}

@media (min-width: 860px) {
  .launch__grid {
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.8fr);
  }
}

.launch__form {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  padding: 1.3rem;
  border-radius: var(--radius);
  border: 1px solid var(--edge);
  background: rgba(10, 13, 16, 0.82);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.field label {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.field input[type='text'],
.field input[type='number'],
.field textarea {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border-radius: 12px;
  border: 1px solid var(--edge);
  background: rgba(12, 16, 20, 0.62);
  color: var(--ink);
  font: inherit;
  resize: vertical;
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--ink-faint);
}

.field-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.1rem;
}

@media (min-width: 480px) {
  .field-row {
    grid-template-columns: 1fr 1fr;
  }
}

.field__suffix {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  border-radius: 12px;
  border: 1px solid var(--edge);
  background: rgba(12, 16, 20, 0.62);
}

.field__suffix input {
  border: 0;
  background: transparent;
  padding: 0.35rem 0;
  color: var(--ink);
  width: 100%;
}

.field__suffix span {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--ink-faint);
}

.logo-field {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}

.logo-field__preview {
  width: 72px;
  height: 72px;
  flex-shrink: 0;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--edge);
  background: #0a0d10;
}

.logo-field__preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.logo-field__controls {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1 1 200px;
}

.logo-field__url {
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  border: 1px solid var(--edge);
  background: rgba(12, 16, 20, 0.62);
  color: var(--ink);
  font-size: 0.85rem;
}

.logo-field__status {
  margin: 0;
  min-height: 1.1em;
  font-size: 0.78rem;
  color: var(--ink-faint);
}

.socials-field {
  border-top: 1px solid var(--hair);
  padding-top: 0.9rem;
}

.socials-field summary {
  cursor: pointer;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

.socials-field .field-row {
  margin-top: 0.9rem;
}

.socials-field .field-row + .field-row {
  margin-top: 1.1rem;
}

.checkbox-field {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.86rem;
  color: var(--ink-dim);
}

.checkbox-field input {
  margin-top: 0.2rem;
}

.launch__side {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.launch__preview {
  cursor: default;
}

.launch__preview:hover {
  transform: none;
}

.launch__gate {
  margin-top: 0;
  padding: 1.2rem;
  border-radius: var(--radius);
  border: 1px solid var(--edge);
  background: rgba(10, 13, 16, 0.82);
}

/* ----------------------------------------------------------------- token */

.token {
  position: relative;
  z-index: 1;
  padding: clamp(1.5rem, 4vh, 2.8rem) var(--gutter) 4rem;
  max-width: 1180px;
  margin: 0 auto;
}

.page-token .token__deployer,
.page-token .token__name {
  text-shadow: 0 1px 16px rgba(0, 0, 0, 0.5);
}

.token__back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-dim);
  text-decoration: none;
}

.token__back:hover {
  color: var(--glow-mid);
}

.token__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.1rem;
  margin-top: 1.2rem;
}

.token__logo {
  width: 4.2rem;
  height: 4.2rem;
  border-radius: 18px;
  object-fit: cover;
  border: 1px solid var(--edge);
  background: #0a0d10;
}

.token__head-info {
  flex: 1 1 220px;
  min-width: 0;
}

.token__name {
  margin: 0;
  font-size: clamp(1.5rem, 3.6vw, 2.1rem);
  letter-spacing: -0.02em;
}

.token__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.35rem;
}

.token__sym {
  font-weight: 600;
  color: var(--glow-mid);
}

.token__time {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--ink-faint);
}

.token__deployer {
  margin: 0.35rem 0 0;
  font-size: 0.86rem;
  color: var(--ink-dim);
}

.token__deployer-link {
  font-family: var(--mono);
  color: var(--ink);
  text-decoration: none;
}

.token__deployer-link:hover {
  color: var(--glow-mid);
}

.token__head-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.token__head-actions .btn-create,
.token__head-actions .button {
  text-decoration: none;
}

.token__live {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 1.1rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--edge);
  background: rgba(12, 16, 20, 0.55);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
}

.token__live-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--ink-faint);
}

.token__live[data-mode='ws'] .token__live-dot {
  background: var(--glow-mid);
  box-shadow: 0 0 0 0 rgba(168, 209, 120, 0.55);
  animation: livePulse 1.6s ease-out infinite;
}

.token__live[data-mode='offline'] .token__live-dot {
  background: #e08a7b;
}

.token__live[data-mode='ws'] {
  color: var(--glow-mid);
  border-color: rgba(168, 209, 120, 0.3);
}

@keyframes livePulse {
  0% {
    box-shadow: 0 0 0 0 rgba(168, 209, 120, 0.5);
  }
  70% {
    box-shadow: 0 0 0 6px rgba(168, 209, 120, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(168, 209, 120, 0);
  }
}

.token__stats {
  display: grid;
  gap: 0.75rem;
  margin-top: 1.4rem;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
}

.stat-cell {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  border: 1px solid var(--edge);
  background: rgba(10, 13, 16, 0.78);
}

.stat-cell__label {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.stat-cell__value {
  font-size: 1.1rem;
  font-weight: 600;
}

.stat-cell__value[data-tone='up'] {
  color: var(--glow-mid);
}

.stat-cell__value[data-tone='down'] {
  color: #e08a7b;
}

.token__grid {
  display: grid;
  gap: 1.2rem;
  margin-top: 1.2rem;
  align-items: start;
}

@media (min-width: 900px) {
  .token__grid {
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  }
}

.token__panel {
  padding: 1.2rem;
  border-radius: var(--radius);
  border: 1px solid var(--edge);
  background: rgba(10, 13, 16, 0.82);
}

.token__panel h2 {
  margin: 0 0 0.9rem;
  font-size: 1.05rem;
}

.token__chart {
  aspect-ratio: 16 / 11;
  border-radius: 14px;
  overflow: hidden;
  background: #0a0d10;
  display: flex;
  align-items: center;
  justify-content: center;
}

.token__chart iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.token__trades {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  max-height: 26rem;
  overflow-y: auto;
}

.trade-row {
  display: grid;
  grid-template-columns: 3.2rem 1fr 1fr 1fr 1fr;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.4rem;
  border-radius: 10px;
  font-size: 0.82rem;
}

.trade-row:not(.trade-row--head):hover {
  background: rgba(180, 210, 160, 0.06);
}

.trade-row--head {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  border-bottom: 1px solid var(--hair);
  padding-bottom: 0.6rem;
}

.trade-row__side {
  font-weight: 700;
  font-size: 0.76rem;
}

.trade-row__side[data-side='buy'] {
  color: var(--glow-mid);
}

.trade-row__side[data-side='sell'] {
  color: #e08a7b;
}

.trade-row__wallet,
.trade-row__time {
  color: var(--ink-dim);
  text-decoration: none;
  font-family: var(--mono);
  font-size: 0.72rem;
}

.trade-row__wallet:hover,
.trade-row__time:hover {
  color: var(--glow-mid);
}

/* ------------------------------------------------------------------ mcp */

.mcp {
  position: relative;
  z-index: 1;
  padding: clamp(1.5rem, 4vh, 2.8rem) var(--gutter) 4rem;
  max-width: 1100px;
  margin: 0 auto;
}

.page-mcp .profile__title,
.page-mcp .explore__lede {
  text-shadow: 0 1px 16px rgba(0, 0, 0, 0.5);
}

.mcp__head {
  max-width: 46rem;
}

.mcp__status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.1rem;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  border: 1px solid var(--edge);
  background: rgba(12, 16, 20, 0.6);
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--ink-faint);
}

.mcp__status[data-state='ok'] {
  color: var(--glow-mid);
  border-color: rgba(168, 209, 120, 0.3);
}

.mcp__status[data-state='ok'] .token__live-dot {
  background: var(--glow-mid);
  animation: livePulse 1.6s ease-out infinite;
}

.mcp__status[data-state='error'] .token__live-dot {
  background: #e08a7b;
}

.mcp__grid {
  display: grid;
  gap: 1.2rem;
  margin-top: 1.6rem;
}

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

.mcp__panel {
  padding: 1.2rem;
  border-radius: var(--radius);
  border: 1px solid var(--edge);
  background: rgba(10, 13, 16, 0.82);
}

.mcp__panel--wide {
  margin-top: 1.2rem;
}

.mcp__panel h2 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
}

.mcp__hint {
  margin: 0.3rem 0 0.9rem;
  color: var(--ink-dim);
  font-size: 0.86rem;
}

.mcp__hint code {
  font-family: var(--mono);
  color: var(--ink);
}

.code-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 0.9rem;
  border-radius: 12px;
  border: 1px solid var(--hair);
  background: #0a0d10;
}

.code-row--block {
  align-items: flex-start;
}

.code-row code,
.code-row pre {
  flex: 1;
  margin: 0;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--glow-mid);
  overflow-x: auto;
  white-space: pre;
}

.mcp__tools {
  display: grid;
  gap: 0.6rem;
  margin-top: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

.mcp__tool {
  padding: 0.75rem 0.9rem;
  border-radius: 12px;
  border: 1px solid var(--hair);
  background: rgba(255, 255, 255, 0.02);
}

.mcp__tool-name {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--glow-mid);
}

.mcp__tool-desc {
  margin: 0.3rem 0 0;
  font-size: 0.82rem;
  color: var(--ink-dim);
}

.mcp__demo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.9rem;
}

.mcp__demo-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.6rem;
}

.mcp__demo-form input {
  flex: 1 1 220px;
  min-width: 0;
  padding: 0.6rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--edge);
  background: rgba(12, 16, 20, 0.62);
  color: var(--ink);
}

.mcp__demo-form input::placeholder {
  color: var(--ink-faint);
}

.mcp__output {
  margin-top: 1rem;
  padding: 0.9rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--hair);
  background: #0a0d10;
  color: var(--ink-dim);
  font-family: var(--mono);
  font-size: 0.78rem;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 22rem;
  overflow-y: auto;
}

/* -------------------------------------------------------------- motion */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .token__live-dot,
  .reveal,
  .page-home .home,
  .page-explore .explore,
  .page-profile .profile,
  .page-launch .launch,
  .page-token .token,
  .page-mcp .mcp,
  .page-home .ticker {
    animation: none;
    transition: none;
  }

  /* Keep the stock strip scrolling — it's the main way to scan the board */
  .ticker__track {
    animation: ticker-marquee 42s linear infinite;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

  .stage--video .stage__video {
    display: none;
  }

  .stage--video {
    background: url('porte.jpg') center / cover;
  }
}

@media (max-width: 560px) {
  .explore__head {
    align-items: stretch;
  }

  .explore__title {
    font-size: 1.65rem;
  }

  .explore__lede {
    font-size: 0.9rem;
    margin-top: 0.5rem;
  }

  .btn-create {
    width: 100%;
  }

  .toolbar {
    margin-top: 1rem;
    gap: 0.55rem;
  }

  .toolbar .search {
    max-width: none;
    flex: 1 1 100%;
    padding: 0.55rem 0.85rem;
  }

  .toolbar .pills {
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
  }

  .page-explore .token-grid,
  .page-profile .token-grid--profile {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.45rem;
    margin-top: 1rem;
  }

  .page-explore .token-card,
  .page-profile .token-card {
    border-radius: 12px;
  }

  .page-explore .token-card__ver,
  .page-profile .token-card__ver {
    top: 0.28rem;
    left: 0.28rem;
    padding: 0.1rem 0.28rem;
    font-size: 0.52rem;
  }

  .page-explore .token-card__info,
  .page-profile .token-card__info {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15rem;
    padding: 0.4rem 0.4rem 0.5rem;
  }

  .page-explore .token-card__name,
  .page-profile .token-card__name {
    font-size: 0.68rem;
    line-height: 1.15;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
  }

  .page-explore .token-card__sym,
  .page-profile .token-card__sym {
    font-size: 0.62rem;
    margin-top: 0;
  }

  .page-explore .token-card__time,
  .page-profile .token-card__time {
    display: none;
  }

  .pager {
    margin-top: 0.9rem;
    gap: 0.28rem;
  }

  .pager__btn {
    min-width: 2rem;
    height: 2rem;
    font-size: 0.72rem;
  }

  /* ---- MCP mobile ---- */
  .page-mcp .mcp {
    padding: 1rem var(--gutter) 2.5rem;
  }

  .page-mcp .profile__title {
    font-size: 1.45rem;
    line-height: 1.2;
  }

  .page-mcp .explore__lede {
    font-size: 0.9rem;
    max-width: none;
  }

  .mcp__status {
    margin-top: 0.85rem;
    max-width: 100%;
    font-size: 0.68rem;
  }

  .mcp__grid {
    margin-top: 1.1rem;
    gap: 0.85rem;
  }

  .mcp__panel {
    padding: 0.9rem;
    border-radius: 16px;
  }

  .mcp__panel--wide {
    margin-top: 0.85rem;
  }

  .mcp__panel h2 {
    font-size: 0.95rem;
  }

  .mcp__hint {
    font-size: 0.8rem;
    margin-bottom: 0.7rem;
  }

  .code-row {
    flex-direction: column;
    align-items: stretch;
    gap: 0.55rem;
    padding: 0.65rem 0.75rem;
  }

  .code-row .button {
    width: 100%;
    justify-content: center;
  }

  .code-row code,
  .code-row pre {
    font-size: 0.68rem;
    white-space: pre-wrap;
    word-break: break-word;
    max-width: 100%;
  }

  .mcp__tools {
    grid-template-columns: 1fr;
    gap: 0.5rem;
    margin-top: 0.75rem;
  }

  .mcp__tool {
    padding: 0.65rem 0.75rem;
  }

  .mcp__tool-name {
    font-size: 0.72rem;
    word-break: break-word;
  }

  .mcp__tool-desc {
    font-size: 0.78rem;
  }

  .mcp__demo-actions,
  .mcp__demo-form {
    gap: 0.4rem;
  }

  .mcp__demo-form input {
    flex: 1 1 100%;
    border-radius: 12px;
  }

  .mcp__demo-actions .pill,
  .mcp__demo-form .pill {
    flex: 1 1 auto;
    justify-content: center;
    text-align: center;
  }

  .mcp__output {
    font-size: 0.7rem;
    max-height: 16rem;
    padding: 0.75rem;
  }
}

@media (max-width: 640px) {
  .token__head-actions {
    width: 100%;
  }

  .token__head-actions .btn-create,
  .token__head-actions .button {
    flex: 1;
    justify-content: center;
  }

  .trade-row {
    grid-template-columns: 2.6rem 1fr 1fr 1fr;
  }

  .trade-row__time {
    display: none;
  }

  .trade-row--head span:nth-child(5) {
    display: none;
  }

  /* tablet-ish phones: still 4-up explore / profile board */
  .page-explore .token-grid,
  .page-profile .token-grid--profile {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.55rem;
  }
}
