/* rafmeta — Gerren Babin layout + coral-field suit-dog palette */
:root {
  --pfp-pink: #ff8a8a;
  --pfp-green: #ff5c9a;
  --pfp-gold: #e91e63;
  --pfp-gold-band: #ff3366;
  /* Pizza accent — mint matches pizza-dog backdrop; cheese / tomato / crust for UI */
  --pizza-mint: #a2f0b5;
  --pizza-cheese: #f0c14a;
  --pizza-tomato: #d64545;
  --pizza-crust: #c97a3d;
  --bg-base: #0f0808;
  --bg-deep: var(--bg-base);
  --bg-elevated: color-mix(in srgb, var(--bg-base) 82%, #ffffff 18%);
  --text: #f5f5f7;
  --text-muted: color-mix(in srgb, var(--pfp-pink) 42%, #6e6e73);
  --accent: var(--pfp-gold);
  --accent-bright: #ffffff;
  --accent-soft: color-mix(in srgb, var(--pfp-green) 18%, transparent);
  --border: color-mix(in srgb, #ffffff 10%, transparent);
  --radius: 8px;
  --font-display: "Orbitron", system-ui, sans-serif;
  --font-body: "Instrument Sans", system-ui, sans-serif;
  --font-pixel: "Press Start 2P", system-ui, monospace;
  --header-h: 72px;
  /* Approximate powered-by bar height for min-height math (padding + logo row) */
  --footer-powered-h: 5.75rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  color-scheme: dark;
  min-height: 100%;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  min-height: 100%;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text);
  /* Solid fallback only — full-page art lives on .pizza-art (no stacked gradient “second layer”). */
  background: var(--bg-deep);
  -webkit-font-smoothing: antialiased;
}

.grain {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 0;
}

.grain--pixel {
  /* Light touch so the grid doesn’t read as a second dog / duplicate layer */
  opacity: 0.14;
  background-color: transparent;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px);
  background-size: 8px 8px;
  animation: grid-drift 48s linear infinite;
}

/* Pizza dog + mint — faint full-page under-layer (dark body shows through; not full-bleed wallpaper). */
.pizza-art {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 0;
  background-color: transparent;
  background-image: url("assets/pizza-dog.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  opacity: 0.1;
}

@media (max-width: 767px) {
  .pizza-art {
    opacity: 0.085;
  }
}

@keyframes grid-drift {
  0% {
    background-position: 0 0, 0 0;
  }
  100% {
    background-position: 8px 8px, 8px 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .grain--pixel {
    animation: none;
  }
}

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 0.75rem;
  min-height: var(--header-h);
  padding: 0.65rem clamp(1rem, 3vw, 2.5rem);
  background: color-mix(in srgb, var(--bg-base) 88%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 0 color-mix(in srgb, var(--pfp-pink) 12%, transparent) inset;
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  flex: 1;
  min-width: 0;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.02rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
  text-decoration: none;
  transition: color 0.2s ease, filter 0.25s ease;
}

.logo-img {
  box-sizing: border-box;
  width: 50px;
  height: 50px;
  flex-shrink: 0;
  display: block;
  vertical-align: top;
  /* Bitmap is pre-scaled (pfp-header.png) so the browser does not interpolate; srcset @2x for retina */
  object-fit: fill;
  border-radius: 10px;
  background: color-mix(in srgb, var(--bg-base) 92%, var(--pfp-pink) 8%);
  image-rendering: crisp-edges;
  image-rendering: pixelated;
  -ms-interpolation-mode: nearest-neighbor;
  transition: filter 0.25s ease;
}

.logo:hover {
  color: var(--accent-bright);
}

.logo:hover .logo-img {
  filter: brightness(1.06);
}

.nav {
  display: none;
  align-items: center;
  gap: 1.75rem;
}

/* Top header tabs: display caps (Orbitron + uppercase) */
.site-header .nav a {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.site-header .nav a:hover {
  color: var(--text);
}

.site-header .nav a[aria-current="page"] {
  color: var(--text);
}

@media (min-width: 768px) {
  .nav {
    display: flex;
  }
  .menu-toggle {
    display: none;
  }
}

.site-header-actions {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.1rem;
  flex-shrink: 0;
  max-width: min(46vw, 22rem);
  overflow-x: auto;
  overflow-y: hidden;
  flex-wrap: nowrap;
  justify-content: flex-end;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--text-muted) 35%, transparent) transparent;
}

.site-header-actions::-webkit-scrollbar {
  height: 3px;
}

.site-header-actions::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--text-muted) 40%, transparent);
  border-radius: 2px;
}

.header-social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: 10px;
  transition: color 0.2s ease, background 0.2s ease;
}

.header-social-link:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.header-social-link:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--pfp-gold) 65%, transparent);
  outline-offset: 2px;
}

.header-social-icon {
  display: block;
  flex-shrink: 0;
}

.menu-toggle {
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.menu-toggle[aria-expanded="true"] span:first-child {
  transform: translateY(4.5px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] span:last-child {
  transform: translateY(-4.5px) rotate(-45deg);
}

@media (max-width: 767px) {
  .site-header {
    gap: 0.35rem 0.45rem;
    padding-left: 0.55rem;
    padding-right: 0.55rem;
    align-items: center;
  }

  /* Logo column shrinks so it never draws over the social + menu cluster */
  .site-header-inner {
    justify-content: flex-start;
    flex: 1 1 0;
    min-width: 0;
    max-width: 100%;
    margin: 0;
    flex-wrap: nowrap;
  }

  .site-header-actions {
    flex: 0 0 auto;
    flex-shrink: 0;
    max-width: none;
    gap: 0;
    overflow-x: auto;
    overflow-y: hidden;
  }

  .header-social-link {
    width: 26px;
    height: 26px;
  }

  .header-social-icon {
    width: 14px;
    height: 14px;
  }

  .menu-toggle {
    width: 34px;
    height: 34px;
    flex-shrink: 0;
  }

  .logo {
    display: inline-flex;
    align-items: center;
    min-width: 0;
    max-width: 100%;
    flex: 0 1 auto;
    font-size: clamp(0.68rem, 2.9vw, 0.88rem);
    gap: 0.45rem;
    overflow: hidden;
  }

  .logo-img {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
  }

  .logo-text {
    min-width: 0;
    flex: 1 1 auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    letter-spacing: 0.05em;
  }
}

.mobile-nav {
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  z-index: 99;
  display: flex;
  flex-direction: column;
  padding: 1rem 1.5rem 1.5rem;
  background: color-mix(in srgb, var(--bg-base) 96%, var(--pfp-pink) 4%);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
}

.mobile-nav[hidden] {
  display: none;
}

.mobile-nav:not([hidden]) {
  display: flex;
}

.mobile-nav a {
  padding: 0.85rem 0;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
}

.mobile-nav a:last-child {
  border-bottom: none;
}

main {
  position: relative;
  /* Above footer so trait popovers / overlays aren’t covered by the powered-by bar */
  z-index: 2;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  padding-top: var(--header-h);
  /* Tall enough that the footer sits at the bottom of the viewport when content is short */
  min-height: calc(100dvh - var(--footer-powered-h));
}

/* Powered by — Motion Mafia */
.site-footer-powered {
  position: relative;
  /* Below main (trait panels stay on top); above .pizza-art / grain */
  z-index: 1;
  flex-shrink: 0;
  margin-top: auto;
  padding: 1.35rem clamp(1.25rem, 4vw, 2.5rem) max(1.75rem, env(safe-area-inset-bottom));
  border-top: 1px solid color-mix(in srgb, var(--border) 85%, transparent);
  /* Opaque so the faint full-page pizza layer does not bleed through into “Powered by” */
  background: var(--bg-base);
  box-shadow: 0 1px 0 color-mix(in srgb, var(--border) 40%, transparent) inset;
}

/* Collection: space before footer (on CTA block so footer can still use margin-top: auto) */
.page-collection .collection-market-cta {
  margin-bottom: clamp(2.5rem, 7vw, 4rem);
}

.powered-by {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  margin: 0;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.powered-by-label {
  transform: translateY(0.04em);
}

.powered-by-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  border-radius: 6px;
  outline-offset: 3px;
}

.powered-by-link:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--pfp-gold) 65%, transparent);
}

.powered-by-logo {
  height: 1.55em;
  width: auto;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.12))
    drop-shadow(0 0 1px rgba(255, 255, 255, 0.25));
  transition: filter 0.25s ease, transform 0.25s ease;
}

.powered-by-link:hover .powered-by-logo {
  filter: drop-shadow(0 0 14px color-mix(in srgb, var(--pfp-gold) 45%, transparent))
    drop-shadow(0 0 8px rgba(255, 255, 255, 0.2));
  transform: scale(1.04);
}

@media (prefers-reduced-motion: reduce) {
  .powered-by-logo {
    transition: none;
  }
  .powered-by-link:hover .powered-by-logo {
    transform: none;
  }
}

/* Mobile: light fade between tab pages (swipe left/right) */
@media (max-width: 767px) {
  .nav-woosh-overlay {
    position: fixed;
    inset: 0;
    z-index: 250;
    pointer-events: none;
    background: rgba(5, 6, 12, 0.38);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    opacity: 0;
    transition: opacity 0.2s ease-out;
    will-change: opacity;
  }

  .nav-woosh-overlay--exit {
    opacity: 0;
  }

  .nav-woosh-overlay--exit.nav-woosh-overlay--exit-active {
    opacity: 1;
  }

  .nav-woosh-overlay--enter {
    opacity: 1;
    transition: opacity 0.22s ease-out;
  }

  .nav-woosh-overlay--enter.nav-woosh-overlay--enter-active {
    opacity: 0;
  }
}

@media (max-width: 767px) and (prefers-reduced-motion: reduce) {
  .nav-woosh-overlay--exit,
  .nav-woosh-overlay--enter {
    transition-duration: 0.01ms;
  }
}

/* Hero */
.hero {
  position: relative;
  isolation: isolate;
  flex: 1;
  display: grid;
  align-items: center;
  padding: clamp(2rem, 6vw, 4rem) clamp(1.25rem, 4vw, 2.5rem);
  overflow: hidden;
}

.page-home .hero {
  flex: 1 1 auto;
  min-height: calc(100vh - var(--header-h));
  min-height: calc(100svh - var(--header-h));
  padding-top: clamp(2rem, 7vw, 4.5rem);
  padding-bottom: clamp(2.5rem, 10vw, 5.5rem);
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: var(--bg-deep);
}

.hero-bg-layers {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 55% at 20% 15%, color-mix(in srgb, var(--pfp-pink) 22%, transparent), transparent 55%),
    radial-gradient(ellipse 70% 50% at 85% 75%, color-mix(in srgb, var(--pfp-green) 16%, transparent), transparent 50%),
    radial-gradient(ellipse 50% 40% at 50% 100%, color-mix(in srgb, var(--pfp-gold) 8%, transparent), transparent 60%),
    var(--bg-deep);
}

.hero-bg-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 40%, rgba(0, 0, 0, 0.5) 100%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 48rem;
  margin: 0 auto;
  padding: 0 0.5rem;
  text-align: center;
}

.hero-brand-wrap {
  position: relative;
  display: inline-block;
}

.hero-brand-logo {
  display: block;
  width: min(280px, 68vw);
  height: auto;
  margin: 0 auto 1.35rem;
  object-fit: contain;
  border-radius: 12px;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  filter: drop-shadow(0 0 32px color-mix(in srgb, var(--pfp-pink) 25%, transparent))
    drop-shadow(0 0 20px color-mix(in srgb, var(--pfp-green) 20%, transparent));
}

.page-home .hero-brand-logo {
  image-rendering: auto;
  object-fit: cover;
  aspect-ratio: 1 / 1;
  object-position: center 28%;
}

/* Hero headline — large display line (replaces old two-line hero title) */
.hero-headline {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.45rem 0.65rem;
  margin: 0 auto 1.35rem;
  max-width: min(44rem, 100%);
  padding: 0 0.25rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.15rem, 4.5vw, 1.85rem);
  line-height: 1.25;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: center;
  text-shadow:
    0 0 42px color-mix(in srgb, var(--pfp-pink) 38%, transparent),
    0 0 28px color-mix(in srgb, var(--pfp-green) 22%, transparent),
    0 2px 0 rgba(0, 0, 0, 0.45);
}

.page-home .hero-headline {
  flex-wrap: nowrap;
  max-width: 100%;
  gap: 0.3rem 0.4rem;
  font-size: clamp(0.45rem, 2.1vw, 1.28rem);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-shadow:
    0 0 22px color-mix(in srgb, var(--pfp-pink) 22%, transparent),
    0 0 14px color-mix(in srgb, var(--pfp-green) 14%, transparent),
    0 1px 0 rgba(0, 0, 0, 0.4);
}

.page-home .hero-headline-line--mid,
.page-home .hero-headline-line--accent {
  white-space: nowrap;
}

.page-home .hero-headline-line--mid {
  text-shadow:
    0 0 16px color-mix(in srgb, var(--pfp-green) 22%, transparent),
    0 1px 0 rgba(0, 0, 0, 0.4);
}

.page-home .hero-headline-line--accent {
  text-shadow:
    0 0 18px color-mix(in srgb, var(--pfp-gold) 28%, transparent),
    0 0 10px color-mix(in srgb, var(--pfp-pink) 14%, transparent),
    0 1px 0 rgba(0, 0, 0, 0.4);
}

.page-home .hero-cta {
  margin-top: 0.15rem;
}

.page-home .hero-cta-btn {
  min-height: 40px;
  padding: 0.45rem 1.15rem;
  font-size: 0.62rem;
  letter-spacing: 0.07em;
}

.hero-headline-line {
  color: var(--text);
  white-space: nowrap;
}

.hero-headline-line--mid {
  color: color-mix(in srgb, var(--pfp-green) 92%, #fff);
  text-shadow:
    0 0 24px color-mix(in srgb, var(--pfp-green) 35%, transparent),
    0 2px 0 rgba(0, 0, 0, 0.45);
}

.hero-headline-line--accent {
  color: var(--pfp-gold);
  text-shadow:
    0 0 32px color-mix(in srgb, var(--pfp-gold) 45%, transparent),
    0 0 18px color-mix(in srgb, var(--pfp-pink) 25%, transparent),
    0 2px 0 rgba(0, 0, 0, 0.45);
}

.hero-headline-sep {
  color: color-mix(in srgb, var(--text-muted) 55%, var(--pfp-green));
  font-weight: 500;
  opacity: 0.95;
  user-select: none;
  font-size: 0.9em;
}

.hero-title {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin: 0 auto 1.5rem;
  max-width: 42rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(0.78rem, 2vw, 1rem);
  line-height: 1.4;
  letter-spacing: 0.04em;
}

.hero-title .line {
  white-space: nowrap;
}

.hero-title-sep {
  opacity: 0.4;
  color: var(--pfp-green);
  font-weight: 400;
  user-select: none;
}

.hero-title .line:not(.accent) {
  color: var(--text);
}

.hero-title .accent {
  color: var(--pfp-gold);
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem 1rem;
}

.hero-cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.55rem 1.35rem;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: var(--radius);
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.hero-cta-btn--primary {
  border: 1px solid color-mix(in srgb, var(--pfp-green) 55%, transparent);
  background: color-mix(in srgb, var(--pfp-green) 14%, transparent);
  color: var(--text);
  box-shadow: 0 0 24px color-mix(in srgb, var(--pfp-green) 12%, transparent);
}

.hero-cta-btn--primary:hover {
  border-color: var(--pfp-green);
  background: color-mix(in srgb, var(--pfp-green) 22%, transparent);
  box-shadow: 0 0 28px color-mix(in srgb, var(--pfp-green) 22%, transparent);
}

.hero-cta-btn--secondary {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
}

.hero-cta-btn--secondary:hover {
  border-color: color-mix(in srgb, var(--pfp-pink) 35%, transparent);
  color: var(--text);
}

/* Inner pages */
.section {
  padding: clamp(2.5rem, 7vw, 4rem) clamp(1.25rem, 4vw, 2.5rem);
}

.section-inner {
  max-width: 42rem;
  margin: 0 auto;
}

.page-title {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: center;
  color: var(--text);
}

.page-intro {
  margin: 0 auto 2rem;
  text-align: center;
  max-width: 36rem;
  color: var(--text-muted);
  font-size: 0.98rem;
}

.bio-tagline {
  margin: 0 auto 2rem;
  text-align: center;
  max-width: 36rem;
  font-family: var(--font-display);
  font-size: clamp(0.8rem, 2.2vw, 1rem);
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--text);
}

.bio-tagline a {
  color: var(--pfp-gold);
  text-decoration: none;
  font-weight: 700;
}

.bio-tagline a:hover {
  text-decoration: underline;
}

.bio-tagline-sep {
  margin: 0 0.35rem;
  color: var(--pfp-green);
  font-weight: 500;
}

/* Bio — photos on top, story below (centered) */
.bio-layout {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2.25rem;
  width: 100%;
}

.bio-images {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: flex-start;
  justify-content: center;
  gap: 0.85rem 1rem;
  width: 100%;
  max-width: min(28rem, 100%);
  margin: 0 auto;
}

.bio-images .bio-figure {
  flex: 1 1 0;
  min-width: 0;
  max-width: calc(50% - 0.5rem);
}

.bio-images--single {
  max-width: min(16rem, 100%);
}

.bio-images--single .bio-figure {
  flex: 0 0 auto;
  max-width: 100%;
  width: 100%;
}

.bio-images--duo {
  max-width: min(34rem, 100%);
}

@media (max-width: 520px) {
  .bio-images--duo {
    gap: 0.5rem 0.65rem;
  }
}

.bio-figure {
  margin: 0;
  text-align: center;
}

.bio-figure-media {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--pfp-pink) 8%, var(--bg-elevated));
}

.bio-figure--pfp .bio-figure-media,
.bio-figure--portrait .bio-figure-media {
  aspect-ratio: 1;
}

.bio-figure--pfp .bio-figure-media {
  transition:
    transform 0.28s ease,
    box-shadow 0.28s ease,
    border-color 0.28s ease;
}

.bio-figure--portrait .bio-figure-media {
  background: #0a0a0c;
}

.bio-figure-media img {
  display: block;
  width: 100%;
  height: auto;
}

.bio-figure--pfp .bio-figure-media img {
  height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.bio-figure--portrait .bio-figure-media img {
  height: 100%;
  object-fit: cover;
  object-position: center center;
  image-rendering: auto;
}

/* Color strip under Doginal PFP — ties to #2426 tag */
.bio-pfp-palette {
  display: flex;
  gap: 5px;
  align-items: stretch;
  justify-content: center;
  width: 100%;
  margin: 0.55rem 0 0.5rem;
  padding: 0;
}

.bio-pfp-palette-swatch {
  flex: 1 1 0;
  min-width: 0;
  height: 11px;
  border-radius: 3px;
  border: 1px solid color-mix(in srgb, #ffffff 18%, transparent);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35) inset;
}

.bio-pfp-palette:not(.bio-portrait-palette) .bio-pfp-palette-swatch:nth-child(1) {
  background: var(--pfp-pink);
}

.bio-pfp-palette:not(.bio-portrait-palette) .bio-pfp-palette-swatch:nth-child(2) {
  background: var(--pfp-green);
}

.bio-pfp-palette:not(.bio-portrait-palette) .bio-pfp-palette-swatch:nth-child(3) {
  background: var(--pfp-gold);
}

.bio-pfp-palette:not(.bio-portrait-palette) .bio-pfp-palette-swatch:nth-child(4) {
  background: #333333;
}

.bio-pfp-palette:not(.bio-portrait-palette) .bio-pfp-palette-swatch:nth-child(5) {
  background: #e7c74b;
}

/* Portrait photo on bio (night outdoor — matches collection-piece-palette--bio-portrait) */
.bio-portrait-palette .bio-pfp-palette-swatch:nth-child(1) {
  background: #0a0a0e;
}

.bio-portrait-palette .bio-pfp-palette-swatch:nth-child(2) {
  background: #f0f0f2;
}

.bio-portrait-palette .bio-pfp-palette-swatch:nth-child(3) {
  background: #b8956a;
}

.bio-portrait-palette .bio-pfp-palette-swatch:nth-child(4) {
  background: #e02028;
}

.bio-portrait-palette .bio-pfp-palette-swatch:nth-child(5) {
  background: #9aa0a8;
}

.bio-pfp-link {
  display: block;
  width: 100%;
  height: 100%;
  line-height: 0;
  text-decoration: none;
  color: inherit;
  border-radius: inherit;
  outline-offset: 3px;
}

.bio-pfp-link:focus-visible {
  outline: 2px solid var(--pfp-gold);
}

@media (hover: hover) and (min-width: 768px) {
  .bio-pfp-link {
    cursor: pointer;
  }

  .bio-pfp-link:hover .bio-figure-media {
    transform: scale(1.045);
    border-color: color-mix(in srgb, var(--pfp-gold) 48%, transparent);
    box-shadow:
      0 0 0 1px color-mix(in srgb, var(--pfp-gold) 35%, transparent),
      0 8px 28px rgba(0, 0, 0, 0.45),
      0 0 28px color-mix(in srgb, var(--pfp-green) 24%, transparent);
  }
}

@media (hover: hover) and (min-width: 768px) and (prefers-reduced-motion: reduce) {
  .bio-pfp-link:hover .bio-figure-media {
    transform: none;
  }
}

.bio-pfp-caption {
  margin-top: 0;
  font-family: var(--font-pixel);
  font-size: 0.5rem;
  line-height: 1.6;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.bio-pfp-caption-link {
  color: var(--pfp-gold);
  text-decoration: none;
  transition: color 0.15s ease, text-shadow 0.15s ease;
}

.bio-pfp-caption-link:hover {
  color: var(--accent-bright);
  text-decoration: underline;
  text-shadow: 0 0 10px color-mix(in srgb, var(--pfp-gold) 35%, transparent);
}

.bio-content-panel {
  width: 100%;
  max-width: 42rem;
  margin: 0 auto;
  padding: clamp(1.35rem, 3.5vw, 2.15rem);
  background: color-mix(in srgb, var(--bg-base) 72%, #ffffff 10%);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  box-shadow:
    0 1px 0 color-mix(in srgb, #ffffff 7%, transparent) inset,
    0 12px 40px rgba(0, 0, 0, 0.42);
}

.bio-copy {
  color: color-mix(in srgb, var(--text) 94%, var(--pfp-pink) 6%);
  font-size: 1.075rem;
  font-weight: 500;
  line-height: 1.72;
  letter-spacing: 0.015em;
  text-align: center;
  max-width: none;
  margin: 0;
  width: 100%;
  -webkit-font-smoothing: antialiased;
}

.bio-copy .bio-tagline {
  margin-bottom: 1.25rem;
  max-width: none;
  white-space: nowrap;
  font-size: clamp(0.55rem, 2.85vw, 0.95rem);
  letter-spacing: 0.04em;
}

.bio-copy p {
  margin: 0 0 1.1rem;
}

.bio-copy p:last-child {
  margin-bottom: 0;
}

.bio-copy a {
  color: var(--pfp-gold);
  text-decoration: none;
  font-weight: 700;
  text-shadow: 0 0 12px color-mix(in srgb, var(--pfp-gold) 28%, transparent);
}

.bio-copy a:hover {
  text-decoration: underline;
}

.bio-social-icons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.7rem 1.15rem;
  margin: 1.35rem 0 0;
}

.bio-social-icons .bio-social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  color: var(--text-muted);
  border-radius: 8px;
  outline-offset: 3px;
  transition: color 0.2s ease, filter 0.2s ease;
}

.bio-social-icons .bio-social-link:hover {
  color: var(--pfp-gold);
  filter: drop-shadow(0 0 10px color-mix(in srgb, var(--pfp-gold) 35%, transparent));
}

.bio-social-icons .bio-social-link:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--pfp-gold) 65%, transparent);
  outline-offset: 3px;
}

.bio-social-icons .header-social-icon {
  width: 22px;
  height: 22px;
}

/* Palette under bio copy — matches collection card strips (e.g. Doginal #6541) */
.bio-content-panel .collection-piece-palette {
  margin-top: 1.5rem;
}

/* Collection */
.collection-intro {
  margin-bottom: 2rem;
}

.collection-brand-line {
  margin: 0.25rem auto 0.85rem;
  text-align: center;
}

.collection-brand-link {
  font-family: var(--font-display);
  font-size: clamp(0.78rem, 2vw, 0.92rem);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--pfp-gold);
  border-bottom: 1px solid transparent;
  transition:
    color 0.2s ease,
    border-color 0.2s ease,
    text-shadow 0.2s ease;
}

.collection-brand-link:hover {
  color: var(--accent-bright);
  border-bottom-color: color-mix(in srgb, var(--pfp-gold) 45%, transparent);
  text-shadow: 0 0 14px color-mix(in srgb, var(--pfp-gold) 32%, transparent);
}

.collection-brand-link:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--pfp-gold) 65%, transparent);
  outline-offset: 4px;
  border-radius: 2px;
}

.collection-desc-panel {
  width: 100%;
  max-width: 40rem;
  margin: 0 auto;
  padding: clamp(1.15rem, 2.8vw, 1.85rem);
  background: color-mix(in srgb, var(--bg-base) 72%, #ffffff 10%);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  box-shadow:
    0 1px 0 color-mix(in srgb, #ffffff 7%, transparent) inset,
    0 12px 40px rgba(0, 0, 0, 0.42);
}

.collection-desc-panel .page-intro {
  margin: 0;
  max-width: none;
  color: color-mix(in srgb, var(--text) 88%, var(--pfp-pink) 12%);
  font-weight: 500;
  font-size: 1.05rem;
  line-height: 1.6;
}

/* Collection grid — three dogs per row */
.collection-showcase {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.65rem 1.25rem;
  align-items: start;
  justify-items: center;
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 clamp(0.75rem, 3vw, 1.25rem) 0;
  overflow: visible;
}

@media (max-width: 599px) {
  .collection-showcase {
    gap: 1.35rem 0.75rem;
  }
}

.collection-piece {
  position: relative;
  width: min(100%, 220px);
  max-width: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  z-index: 0;
}

.collection-piece--featured {
  max-width: 220px;
  width: min(100%, 220px);
  /* Sit above grid neighbors so the trait popover can cover the row below */
  z-index: 3;
}

.collection-piece-frame {
  position: relative;
  width: 100%;
  z-index: 1;
}

@media (hover: hover) and (min-width: 768px) {
  .collection-piece-frame:hover {
    z-index: 8;
  }
}

.collection-piece-pfp-btn {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  font: inherit;
  color: inherit;
  border-radius: 12px;
  text-align: left;
  outline-offset: 3px;
  -webkit-tap-highlight-color: transparent;
}

.collection-piece-pfp-btn:focus-visible {
  outline: 2px solid var(--pfp-gold);
}

.collection-piece-palette-link {
  display: block;
  width: 100%;
  text-decoration: none;
  color: inherit;
  border-radius: 8px;
  outline-offset: 2px;
}

.collection-piece-palette-link:focus-visible {
  outline: 2px solid var(--pfp-gold);
}

.collection-piece-id-link {
  color: var(--pfp-gold);
  text-decoration: none;
  font-weight: 700;
}

.collection-piece-id-link:hover {
  text-decoration: underline;
}

.collection-piece-id-link:focus-visible {
  outline: 2px solid var(--pfp-gold);
  outline-offset: 2px;
  border-radius: 2px;
}

.collection-piece-media {
  aspect-ratio: 1;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #0a0a0c;
  transform-origin: center center;
  transition:
    transform 0.28s cubic-bezier(0.34, 1.2, 0.64, 1),
    box-shadow 0.28s ease,
    border-color 0.28s ease;
}

.collection-piece-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.collection-piece--featured .collection-piece-media {
  border-color: color-mix(in srgb, var(--pfp-pink) 45%, transparent);
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--pfp-gold) 22%, transparent),
    0 14px 44px rgba(0, 0, 0, 0.55),
    0 0 40px color-mix(in srgb, var(--pfp-pink) 22%, transparent);
}

@media (hover: hover) and (min-width: 768px) {
  .collection-piece-pfp-btn {
    cursor: default;
  }

  .collection-piece-frame:hover .collection-piece-pfp-btn .collection-piece-media {
    transform: scale(1.09);
    border-color: color-mix(in srgb, var(--pfp-gold) 58%, transparent);
    box-shadow:
      0 0 0 1px color-mix(in srgb, var(--pfp-gold) 45%, transparent),
      0 16px 48px rgba(0, 0, 0, 0.58),
      0 0 40px color-mix(in srgb, var(--pfp-green) 28%, transparent),
      0 0 28px color-mix(in srgb, var(--pfp-gold) 22%, transparent);
  }
}

@media (hover: hover) and (min-width: 768px) and (prefers-reduced-motion: reduce) {
  .collection-piece-frame:hover .collection-piece-pfp-btn .collection-piece-media {
    transform: none;
  }
}

/* Hover trait panel (desktop) — marketplace-style */
.collection-traits-popover {
  display: none;
}

@media (hover: hover) and (min-width: 768px) {
  .collection-traits-popover {
    display: block;
    position: absolute;
    left: 50%;
    top: calc(100% + 8px);
    z-index: 50;
    width: min(300px, 92vw);
    max-height: min(70vh, 520px);
    overflow-y: auto;
    padding: 0.65rem 0.65rem 0.75rem;
    margin: 0;
    border-radius: 12px;
    border: 1px solid color-mix(in srgb, #ffffff 14%, transparent);
    background: #121214;
    box-shadow:
      0 20px 56px rgba(0, 0, 0, 0.75),
      0 0 0 1px rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateX(-50%) translateY(6px);
    transition:
      opacity 0.22s ease,
      visibility 0.22s ease,
      transform 0.22s ease;
  }

  .collection-traits-popover--featured {
    width: min(340px, 94vw);
  }

  .collection-piece-frame:hover .collection-traits-popover,
  .collection-piece-frame:focus-within .collection-traits-popover {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
  }

  .collection-piece--featured .collection-piece-frame {
    z-index: 2;
  }

  /* Lift whichever card is active so its trait panel stacks above every other PFP */
  .collection-piece:has(.collection-piece-frame:hover),
  .collection-piece:has(.collection-piece-frame:focus-within) {
    z-index: 60;
  }

  .collection-piece:has(.collection-piece-frame:hover) .collection-traits-popover,
  .collection-piece:has(.collection-piece-frame:focus-within) .collection-traits-popover {
    z-index: 70;
  }
}

.collection-traits-details {
  margin-bottom: 0.65rem;
  padding: 0.55rem 0.6rem;
  border-radius: 10px;
  background: color-mix(in srgb, var(--bg-base) 70%, #ffffff 8%);
  border: 1px solid var(--border);
}

.collection-traits-title {
  margin: 0 0 0.5rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
}

.collection-traits-dl {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.78rem;
}

.collection-traits-dl > div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
}

.collection-traits-dl dt {
  margin: 0;
  color: var(--text-muted);
  font-weight: 500;
}

.collection-traits-dl dd {
  margin: 0;
  color: var(--text);
  font-weight: 600;
  text-align: right;
}

.collection-traits-owner {
  color: var(--pfp-gold) !important;
}

.collection-traits-owner a {
  color: inherit;
  text-decoration: none;
}

.collection-traits-owner a:hover {
  text-decoration: underline;
}

.collection-traits-block {
  margin-top: 0.35rem;
}

.collection-traits-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.45rem;
  padding: 0 0.1rem;
}

.collection-traits-head-title {
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
}

.collection-traits-count {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.collection-traits-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
}

.trait-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  padding: 0.5rem 0.45rem 0.55rem;
  border-radius: 8px;
  background: color-mix(in srgb, #0a0a0c 88%, #ffffff 12%);
  border: 1px solid var(--border);
  text-align: left;
}

.trait-card-cat {
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-muted);
  line-height: 1.2;
}

.trait-card-value {
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}

.trait-card-rarity {
  margin-top: 0.35rem;
  padding: 0.2rem 0.35rem;
  border-radius: 999px;
  font-size: 0.65rem;
  font-style: normal;
  font-weight: 600;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.trait-card-rarity em {
  font-style: normal;
  font-weight: 600;
  color: var(--text-muted);
}

.trait-card--blue {
  border-color: rgba(100, 170, 255, 0.45);
}

.trait-card--mint {
  border-color: rgba(100, 200, 200, 0.45);
}

.trait-card--rose {
  border-color: rgba(255, 150, 190, 0.45);
}

.trait-card--gray {
  border-color: rgba(160, 160, 170, 0.4);
}

.trait-card--gray2 {
  border-color: rgba(150, 150, 160, 0.4);
}

.trait-card--muted {
  border-color: rgba(180, 140, 220, 0.4);
}

.trait-card--purple {
  border-color: rgba(160, 120, 220, 0.45);
}

.trait-card--purple2 {
  border-color: rgba(150, 110, 210, 0.45);
}

.trait-card--orange {
  border-color: rgba(220, 150, 90, 0.45);
}

.trait-card--brown {
  border-color: rgba(180, 130, 90, 0.45);
}

.trait-card--brown2 {
  border-color: rgba(170, 120, 85, 0.45);
}

.collection-traits-rarity {
  margin-top: 0.55rem;
  padding: 0.5rem 0.65rem;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--pfp-gold) 42%, transparent);
  background: color-mix(in srgb, #0a0a0c 92%, var(--pfp-gold) 8%);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

.collection-traits-rarity strong {
  color: var(--pfp-gold);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.collection-traits-fiat {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-muted);
}

.collection-traits-dl dd .collection-traits-fiat {
  margin-top: 0.2rem;
  text-align: right;
}

.collection-traits-grid--stub .trait-card {
  grid-column: 1 / -1;
}

@media (max-width: 767px) {
  .collection-piece-pfp-btn {
    cursor: pointer;
  }

  .collection-traits-popover {
    display: none;
    position: relative;
    left: auto;
    top: auto;
    transform: none;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    width: 100%;
    max-width: 100%;
    max-height: none;
    margin-top: 0.65rem;
    overflow: visible;
  }

  .collection-piece--traits-open .collection-traits-popover {
    display: block;
  }
}

@media (prefers-reduced-motion: reduce) {
  .collection-traits-popover {
    transition: none;
  }
}

.collection-piece-palette {
  display: flex;
  gap: 5px;
  align-items: stretch;
  justify-content: center;
  width: 100%;
  margin: 0.55rem 0 0.45rem;
  padding: 0;
}

.collection-piece-swatch {
  flex: 1 1 0;
  min-width: 0;
  height: 11px;
  border-radius: 3px;
  border: 1px solid color-mix(in srgb, #ffffff 18%, transparent);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35) inset;
}

.collection-piece-palette--331 .collection-piece-swatch:nth-child(1) {
  background: #80e0ff;
}

.collection-piece-palette--331 .collection-piece-swatch:nth-child(2) {
  background: #604020;
}

.collection-piece-palette--331 .collection-piece-swatch:nth-child(3) {
  background: #c0a070;
}

.collection-piece-palette--331 .collection-piece-swatch:nth-child(4) {
  background: #ffcc33;
}

.collection-piece-palette--331 .collection-piece-swatch:nth-child(5) {
  background: #904040;
}

.collection-piece-palette--234 .collection-piece-swatch:nth-child(1) {
  background: #a8e6cf;
}

.collection-piece-palette--234 .collection-piece-swatch:nth-child(2) {
  background: #c41e3a;
}

.collection-piece-palette--234 .collection-piece-swatch:nth-child(3) {
  background: #ffffff;
}

.collection-piece-palette--234 .collection-piece-swatch:nth-child(4) {
  background: #c0a070;
}

.collection-piece-palette--234 .collection-piece-swatch:nth-child(5) {
  background: #ffcc33;
}

.collection-piece-palette--2426 .collection-piece-swatch:nth-child(1) {
  background: var(--pfp-pink);
}

.collection-piece-palette--2426 .collection-piece-swatch:nth-child(2) {
  background: var(--pfp-green);
}

.collection-piece-palette--2426 .collection-piece-swatch:nth-child(3) {
  background: var(--pfp-gold);
}

.collection-piece-palette--2426 .collection-piece-swatch:nth-child(4) {
  background: #333333;
}

.collection-piece-palette--2426 .collection-piece-swatch:nth-child(5) {
  background: #e7c74b;
}

/* Collection PFP palette strips — sampled to match each dog art */
.collection-piece-palette--2814 .collection-piece-swatch:nth-child(1) {
  background: #ffb8d0;
}
.collection-piece-palette--2814 .collection-piece-swatch:nth-child(2) {
  background: #ffdd44;
}
.collection-piece-palette--2814 .collection-piece-swatch:nth-child(3) {
  background: #d4a012;
}
.collection-piece-palette--2814 .collection-piece-swatch:nth-child(4) {
  background: #1e1e24;
}
.collection-piece-palette--2814 .collection-piece-swatch:nth-child(5) {
  background: #ffffff;
}

.collection-piece-palette--2143 .collection-piece-swatch:nth-child(1) {
  background: #6ec4ea;
}
.collection-piece-palette--2143 .collection-piece-swatch:nth-child(2) {
  background: #3ecf7f;
}
.collection-piece-palette--2143 .collection-piece-swatch:nth-child(3) {
  background: #c9a27d;
}
.collection-piece-palette--2143 .collection-piece-swatch:nth-child(4) {
  background: #ffffff;
}
.collection-piece-palette--2143 .collection-piece-swatch:nth-child(5) {
  background: #4db8c9;
}

.collection-piece-palette--857 .collection-piece-swatch:nth-child(1) {
  background: #8fe89a;
}
.collection-piece-palette--857 .collection-piece-swatch:nth-child(2) {
  background: #8b5a2b;
}
.collection-piece-palette--857 .collection-piece-swatch:nth-child(3) {
  background: #f4f1ea;
}
.collection-piece-palette--857 .collection-piece-swatch:nth-child(4) {
  background: #e74c3c;
}
.collection-piece-palette--857 .collection-piece-swatch:nth-child(5) {
  background: #ffb703;
}

.collection-piece-palette--7710 .collection-piece-swatch:nth-child(1) {
  background: #f9b4c8;
}
.collection-piece-palette--7710 .collection-piece-swatch:nth-child(2) {
  background: #ffe566;
}
.collection-piece-palette--7710 .collection-piece-swatch:nth-child(3) {
  background: #7a5c20;
}
.collection-piece-palette--7710 .collection-piece-swatch:nth-child(4) {
  background: #c7708f;
}
.collection-piece-palette--7710 .collection-piece-swatch:nth-child(5) {
  background: #c0392b;
}

.collection-piece-palette--6541 .collection-piece-swatch:nth-child(1) {
  background: #ff8c8c;
}
.collection-piece-palette--6541 .collection-piece-swatch:nth-child(2) {
  background: #ffffff;
}
.collection-piece-palette--6541 .collection-piece-swatch:nth-child(3) {
  background: #0a0a0a;
}
.collection-piece-palette--6541 .collection-piece-swatch:nth-child(4) {
  background: #e91e63;
}
.collection-piece-palette--6541 .collection-piece-swatch:nth-child(5) {
  background: #ff77aa;
}

/* Bio page night portrait — asphalt night, white, khaki, sneaker red, silver */
.collection-piece-palette--bio-portrait .collection-piece-swatch:nth-child(1) {
  background: #0a0a0e;
}
.collection-piece-palette--bio-portrait .collection-piece-swatch:nth-child(2) {
  background: #f0f0f2;
}
.collection-piece-palette--bio-portrait .collection-piece-swatch:nth-child(3) {
  background: #b8956a;
}
.collection-piece-palette--bio-portrait .collection-piece-swatch:nth-child(4) {
  background: #e02028;
}
.collection-piece-palette--bio-portrait .collection-piece-swatch:nth-child(5) {
  background: #9aa0a8;
}

.collection-piece-palette--5435 .collection-piece-swatch:nth-child(1) {
  background: #ffb6c8;
}
.collection-piece-palette--5435 .collection-piece-swatch:nth-child(2) {
  background: #d4a574;
}
.collection-piece-palette--5435 .collection-piece-swatch:nth-child(3) {
  background: #b71c1c;
}
.collection-piece-palette--5435 .collection-piece-swatch:nth-child(4) {
  background: #ff1744;
}
.collection-piece-palette--5435 .collection-piece-swatch:nth-child(5) {
  background: #ef5350;
}

.collection-piece-palette--7351 .collection-piece-swatch:nth-child(1) {
  background: #f5e6a8;
}
.collection-piece-palette--7351 .collection-piece-swatch:nth-child(2) {
  background: #7a7a82;
}
.collection-piece-palette--7351 .collection-piece-swatch:nth-child(3) {
  background: #1a1a1e;
}
.collection-piece-palette--7351 .collection-piece-swatch:nth-child(4) {
  background: #c41e2a;
}
.collection-piece-palette--7351 .collection-piece-swatch:nth-child(5) {
  background: #ffffff;
}

.collection-piece-palette--922 .collection-piece-swatch:nth-child(1) {
  background: #98d4a8;
}
.collection-piece-palette--922 .collection-piece-swatch:nth-child(2) {
  background: #c6863d;
}
.collection-piece-palette--922 .collection-piece-swatch:nth-child(3) {
  background: #1a1a1e;
}
.collection-piece-palette--922 .collection-piece-swatch:nth-child(4) {
  background: #ffcc33;
}
.collection-piece-palette--922 .collection-piece-swatch:nth-child(5) {
  background: #ffffff;
}

.collection-piece-palette--5545 .collection-piece-swatch:nth-child(1) {
  background: #f5b8d8;
}
.collection-piece-palette--5545 .collection-piece-swatch:nth-child(2) {
  background: #c6863d;
}
.collection-piece-palette--5545 .collection-piece-swatch:nth-child(3) {
  background: #1a1a1e;
}
.collection-piece-palette--5545 .collection-piece-swatch:nth-child(4) {
  background: #6cf0ff;
}
.collection-piece-palette--5545 .collection-piece-swatch:nth-child(5) {
  background: #ffcc33;
}

.collection-piece-palette--9338 .collection-piece-swatch:nth-child(1) {
  background: #c4b5e8;
}
.collection-piece-palette--9338 .collection-piece-swatch:nth-child(2) {
  background: #5ec8e8;
}
.collection-piece-palette--9338 .collection-piece-swatch:nth-child(3) {
  background: #ffd54a;
}
.collection-piece-palette--9338 .collection-piece-swatch:nth-child(4) {
  background: #b0b8c4;
}
.collection-piece-palette--9338 .collection-piece-swatch:nth-child(5) {
  background: #ffcc33;
}

.collection-piece-palette--7287 .collection-piece-swatch:nth-child(1) {
  background: #c4b5e8;
}
.collection-piece-palette--7287 .collection-piece-swatch:nth-child(2) {
  background: #ffffff;
}
.collection-piece-palette--7287 .collection-piece-swatch:nth-child(3) {
  background: #1a1a1e;
}
.collection-piece-palette--7287 .collection-piece-swatch:nth-child(4) {
  background: #ffcc33;
}
.collection-piece-palette--7287 .collection-piece-swatch:nth-child(5) {
  background: #8a8a94;
}

.collection-piece-palette--6232 .collection-piece-swatch:nth-child(1) {
  background: #f5e64a;
}
.collection-piece-palette--6232 .collection-piece-swatch:nth-child(2) {
  background: #3a6cb8;
}
.collection-piece-palette--6232 .collection-piece-swatch:nth-child(3) {
  background: #d4a41e;
}
.collection-piece-palette--6232 .collection-piece-swatch:nth-child(4) {
  background: #ffffff;
}
.collection-piece-palette--6232 .collection-piece-swatch:nth-child(5) {
  background: #1a1a1e;
}

.collection-piece-palette--112 .collection-piece-swatch:nth-child(1) {
  background: #f5e6a8;
}
.collection-piece-palette--112 .collection-piece-swatch:nth-child(2) {
  background: #4ad4e8;
}
.collection-piece-palette--112 .collection-piece-swatch:nth-child(3) {
  background: #ffcc33;
}
.collection-piece-palette--112 .collection-piece-swatch:nth-child(4) {
  background: #e8a04a;
}
.collection-piece-palette--112 .collection-piece-swatch:nth-child(5) {
  background: #9040c0;
}

.collection-piece-palette--727 .collection-piece-swatch:nth-child(1) {
  background: #f5e6a8;
}
.collection-piece-palette--727 .collection-piece-swatch:nth-child(2) {
  background: #8a8a94;
}
.collection-piece-palette--727 .collection-piece-swatch:nth-child(3) {
  background: #1a1a1e;
}
.collection-piece-palette--727 .collection-piece-swatch:nth-child(4) {
  background: #ffcc33;
}
.collection-piece-palette--727 .collection-piece-swatch:nth-child(5) {
  background: #ffffff;
}

.collection-piece-palette--3820 .collection-piece-swatch:nth-child(1) {
  background: #e87878;
}
.collection-piece-palette--3820 .collection-piece-swatch:nth-child(2) {
  background: #e8a050;
}
.collection-piece-palette--3820 .collection-piece-swatch:nth-child(3) {
  background: #ffdd22;
}
.collection-piece-palette--3820 .collection-piece-swatch:nth-child(4) {
  background: #ff9ec8;
}
.collection-piece-palette--3820 .collection-piece-swatch:nth-child(5) {
  background: #c0c8d0;
}

.collection-piece-caption {
  margin: 0;
  font-family: var(--font-pixel);
  font-size: 0.5rem;
  line-height: 1.6;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.collection-piece-caption-link {
  color: var(--pfp-gold);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.15s ease, text-shadow 0.15s ease;
}

.collection-piece-caption-link:hover {
  color: var(--accent-bright);
  text-decoration: underline;
  text-shadow: 0 0 10px color-mix(in srgb, var(--pfp-gold) 35%, transparent);
}

.collection-market-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
  margin: 1.25rem auto 0;
  padding: 0 clamp(0.75rem, 3vw, 1.25rem) 2.5rem;
  max-width: 72rem;
}

.collection-market-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.65rem 1.75rem;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: var(--radius);
  color: var(--text);
  border: 1px solid color-mix(in srgb, var(--pfp-green) 55%, transparent);
  background: color-mix(in srgb, var(--pfp-green) 14%, transparent);
  box-shadow: 0 0 24px color-mix(in srgb, var(--pfp-green) 12%, transparent);
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}

.collection-market-btn:hover {
  border-color: var(--pfp-green);
  background: color-mix(in srgb, var(--pfp-green) 22%, transparent);
  box-shadow: 0 0 32px color-mix(in srgb, var(--pfp-green) 22%, transparent);
  color: var(--accent-bright);
}

.collection-market-btn:focus-visible {
  outline: 2px solid var(--pfp-gold);
  outline-offset: 3px;
}

/* Motion Mafia Doggy Run — compact secondary CTA (~half the primary control size) */
.collection-market-btn--doggy-run {
  min-height: 24px;
  padding: 0.28rem 0.85rem;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  border-color: color-mix(in srgb, var(--pfp-gold) 50%, transparent);
  background: color-mix(in srgb, var(--pfp-gold) 10%, transparent);
  box-shadow: 0 0 16px color-mix(in srgb, var(--pfp-gold) 10%, transparent);
}

.collection-market-btn--doggy-run:hover {
  border-color: var(--pfp-gold);
  background: color-mix(in srgb, var(--pfp-gold) 18%, transparent);
  box-shadow: 0 0 24px color-mix(in srgb, var(--pfp-gold) 18%, transparent);
}
