:root {
  color-scheme: light dark;
  --glass: rgba(255, 255, 255, 0.68);
  --glass-strong: rgba(255, 255, 255, 0.84);
  --chip: rgba(255, 255, 255, 0.75);
  --text: #14181b;
  --muted: #57636c;
  --blue: #3961ef;
  --green: #087a1b;
  --accent: #4b39ef;
  --outline: rgba(255,255,255,.55);
  --shadow: 0 18px 60px rgba(29, 31, 44, 0.20);
  --veil: radial-gradient(circle at top left, rgba(255,255,255,.45), transparent 36%), rgba(255,255,255,.10);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --glass: rgba(0, 0, 0, 0.36);
    --glass-strong: rgba(10, 10, 16, 0.42);
    --chip: rgba(12, 12, 18, 0.44);
    --text: #f7f7fb;
    --muted: #c8cad6;
    --blue: #5f7dff;
    --green: #16a933;
    --accent: #9f94ff;
    --outline: rgba(255,255,255,.22);
    --shadow: 0 18px 60px rgba(0, 0, 0, 0.44);
    --veil: radial-gradient(circle at top left, rgba(75,57,239,.34), transparent 38%), rgba(0,0,0,.34);
  }
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  color: var(--text);
  background: light-dark(#e8ecff, #06070c);
}

.page-shell {
  position: relative;
  min-height: 100vh;
  overflow-x: hidden;
  padding: 0 24px 24px;
}

.background {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.15) blur(1px);
  transform: scale(1.02);
  z-index: -2;
}

.page-shell::before {
  content: "";
  position: fixed;
  inset: 0;
  background: var(--veil);
  z-index: -1;
}

.app-frame {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding-top: 94px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.stats-strip,
.profile-card,
.download-panel {
  border: 1px solid var(--outline);
  background: var(--glass);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
  border-radius: 24px;
}

.stats-strip {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100vw;
  margin-left: 0;
  padding: 12px;
  overflow-x: auto;
  border-top: 0;
  border-radius: 0 0 24px 24px;
}

.top-logo {
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
  border-radius: 999px;
  object-fit: cover;
  background: #fff;
  border: 3px solid rgba(255,255,255,.82);
}

.stat-pill {
  flex: 0 0 auto;
  min-width: 190px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  background: var(--chip);
  border-radius: 999px;
}

.stat-pill strong { text-decoration: underline; white-space: nowrap; }
.stat-pill span { color: var(--muted); font-size: 0.9rem; }

.profile-card {
  padding: 16px;
  overflow: hidden;
}

.profile-carousel {
  display: block;
}

.blob-stage {
  --pill-w: 164px;
  --pill-h: 56px;
  --pill-gap: 10px;
  --peel-profile-gap: 34px;
  position: relative;
  min-height: 414px;
  padding-top: 0;
  overflow: hidden;
}

.selected-profile-blob {
  position: relative;
  min-height: 414px;
  padding: calc(var(--pill-h) + var(--peel-profile-gap)) 18px 18px;
  isolation: isolate;
}

.blob-shape {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  filter: drop-shadow(0 10px 28px rgba(0,0,0,.12));
}

.blob-shape path {
  fill: var(--glass-strong);
  stroke: color-mix(in srgb, var(--outline) 26%, transparent);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.blob-stage.blob-in .selected-profile-blob { animation: blobPeel .36s cubic-bezier(.2,.85,.22,1) both; }
.profile-carousel.is-animating .unselected-pill-rail .creator-pill { animation: compactSlide .34s cubic-bezier(.2,.85,.22,1) both; }

@keyframes blobPeel {
  from { transform: translateY(-10px) scaleY(.965); opacity: .66; }
  to { transform: translateY(0) scaleY(1); opacity: 1; }
}

@keyframes compactSlide {
  from { transform: translateX(28px); opacity: .58; }
  to { transform: translateX(0); opacity: 1; }
}

.profile-body {
  position: relative;
  z-index: 1;
  padding: 0;
}

.unselected-pill-rail {
  position: absolute;
  top: 0;
  left: calc(var(--pill-w) + 18px);
  right: 0;
  z-index: 3;
  display: flex;
  gap: var(--pill-gap);
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0 2px 10px;
  scroll-snap-type: x proximity;
}

.joined {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  color: var(--accent);
  font-size: .86rem;
}

h1, h2, p { margin-top: 0; }
.profile-about { color: var(--muted); line-height: 1.55; max-width: 760px; margin: 14px 0 0; }

.mini-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(110px, 1fr));
  gap: 10px;
  margin-top: 18px;
  overflow-x: auto;
}

.mini-stats div,
.tag-row span {
  padding: 12px;
  background: var(--chip);
  border-radius: 18px;
}

.mini-stats strong,
.mini-stats span { display: block; }
.mini-stats span { color: var(--muted); font-size: .9rem; }

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.creator-pill {
  flex: 0 0 auto;
  width: var(--pill-w, auto);
  min-width: 154px;
  height: var(--pill-h, auto);
  border: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 13px;
  color: var(--text);
  border-radius: 999px;
  background: var(--chip);
  border: 1px solid var(--outline);
  backdrop-filter: blur(14px);
  box-shadow: 0 8px 18px rgba(0,0,0,.10);
  cursor: pointer;
  font: inherit;
  white-space: nowrap;
  scroll-snap-align: start;
  transition: transform .18s ease, background .18s ease;
}
.creator-pill:hover { transform: translateY(-1px); }
.creator-pill-selected {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  border-color: transparent;
  cursor: default;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.creator-pill-selected::after { display: none; }
.creator-pill-selected:hover { transform: none; }
.creator-pill img {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  object-fit: cover;
}

.download-panel { padding: 22px; }
.download-content {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: center;
}
.download-copy { min-width: 0; }
.eyebrow {
  margin-bottom: 8px;
  color: var(--accent);
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  font-size: .78rem;
}
.download-copy h2 {
  margin-bottom: 8px;
  font-size: clamp(1.35rem, 2.4vw, 2.15rem);
  line-height: 1.12;
  letter-spacing: -0.035em;
}
.download-subtitle,
.qr-card p { color: var(--muted); line-height: 1.45; }
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border-radius: 14px;
  padding: 10px 16px;
  color: #fff;
  text-decoration: none;
  font-weight: 800;
}
.btn-green { background: var(--green); }
.btn-blue { background: var(--blue); }
.qr-card {
  width: min(220px, 32vw);
  text-align: center;
}
.qr-card p { margin-bottom: 10px; font-size: .92rem; }
.qr-card img {
  display: block;
  width: 100%;
  border-radius: 18px;
  background: white;
}

@media (max-width: 760px) {
  .page-shell { padding: 0 12px 12px; }
  .app-frame { gap: 12px; padding-top: 82px; }
  .stats-strip, .profile-card, .download-panel { border-radius: 18px; }
  .stats-strip { border-radius: 0 0 18px 18px; }
  .stat-pill { min-width: 170px; }
  .profile-card { padding: 12px; }
  .blob-stage { --pill-w: 174px; --peel-profile-gap: 30px; min-height: 440px; }
  .selected-profile-blob { min-height: 440px; padding: calc(var(--pill-h) + var(--peel-profile-gap)) 14px 14px; }
  .unselected-pill-rail { left: calc(var(--pill-w) + 14px); }
  @keyframes blobPeel {
    from { transform: translateY(-10px) scaleY(.96); opacity: .62; }
    to { transform: translateY(0) scaleY(1); opacity: 1; }
  }
  .mini-stats { grid-template-columns: repeat(5, 130px); }
  .download-content { grid-template-columns: 1fr; }
  .button-row { display: grid; grid-template-columns: 1fr; }
  .qr-card { width: min(280px, 100%); margin: 0 auto; }
}
