/* ============================================================================
   AINEMO 3-ROW ALTERNATING MODEL PILL MARQUEE (LIGHT MONOCHROME FADE-EDGE)
   100% Shared Identical Across: ainemo.store, api, voice, & studio-beta
   Zero inline styles | Strict CSP & Reduced-Motion Safe | Zero Overflow
   ============================================================================ */

section.anm-models-marquee-wrap {
  position: relative;
  width: 100%;
  max-width: 1360px;
  margin: 0 auto;
  padding: 20px clamp(16px, 3vw, 32px) 28px;
  background: transparent;
  overflow-x: clip;
  box-sizing: border-box;
}

.anm-mp-viewport {
  position: relative;
  overflow: hidden;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 10%, #000 90%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0%, #000 10%, #000 90%, transparent 100%);
}

.anm-mp-row {
  position: relative;
  overflow: hidden;
  width: 100%;
}

.anm-mp-track {
  display: flex;
  align-items: center;
  width: max-content;
  will-change: transform;
}

.anm-mp-track.is-left {
  animation: anmMpScrollLeft 52s linear infinite;
}

.anm-mp-track.is-right {
  animation: anmMpScrollRight 58s linear infinite;
}

.anm-mp-track.is-left-slow {
  animation: anmMpScrollLeft 64s linear infinite;
}

.anm-mp-row:hover .anm-mp-track,
.anm-mp-row:focus-within .anm-mp-track {
  animation-play-state: paused;
}

.anm-mp-group {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  gap: 10px;
  padding-right: 10px;
}

.anm-mp-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid #d4d4d8;
  box-shadow: 0 1px 2px rgba(17, 17, 19, 0.04);
  color: #27272a;
  font-family: 'Inter', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
  flex-shrink: 0;
  user-select: none;
  transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.anm-mp-pill:hover {
  background: #ffffff;
  border-color: #a1a1aa;
  color: #111113;
}

.anm-mp-prefix {
  color: #71717a;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.02em;
}

@keyframes anmMpScrollLeft {
  0% {
    transform: translate3d(0, 0, 0);
  }
  100% {
    transform: translate3d(-50%, 0, 0);
  }
}

@keyframes anmMpScrollRight {
  0% {
    transform: translate3d(-50%, 0, 0);
  }
  100% {
    transform: translate3d(0, 0, 0);
  }
}

@media (max-width: 640px) {
  section.anm-models-marquee-wrap {
    padding: 14px 12px 22px;
  }
  .anm-mp-viewport {
    gap: 8px;
    -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 6%, #000 94%, transparent 100%);
    mask-image: linear-gradient(to right, transparent 0%, #000 6%, #000 94%, transparent 100%);
  }
  .anm-mp-group {
    gap: 8px;
    padding-right: 8px;
  }
  .anm-mp-pill {
    padding: 6px 12px;
    font-size: 12px;
    gap: 6px;
  }
  .anm-mp-prefix {
    font-size: 11px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .anm-mp-viewport {
    -webkit-mask-image: none;
    mask-image: none;
  }
  .anm-mp-track,
  .anm-mp-track.is-left,
  .anm-mp-track.is-right,
  .anm-mp-track.is-left-slow {
    animation: none;
    width: 100%;
    justify-content: center;
  }
  .anm-mp-group[aria-hidden="true"],
  .anm-mp-pill.is-dup {
    display: none;
  }
  .anm-mp-group {
    flex-wrap: wrap;
    justify-content: center;
    padding-right: 0;
  }
}
