.gallery-marquee {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Marquee spans full inner width of the unified `.image-gallery` card below. */
#root .image-gallery > .gallery-marquee {
  position: static;
  left: auto;
  transform: none;
  width: 100%;
  max-width: none;
  margin: 0;
  box-sizing: border-box;
}

.yarl-marquee-row {
  overflow: hidden;
  width: 100%;
  border: 1px solid #000000;
  background-color: #ffffff;
}

.yarl-marquee-track {
  display: flex;
  width: max-content;
  gap: 10px;
  padding: 0;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  will-change: transform;
}

.yarl-marquee-row[data-dir="left"] .yarl-marquee-track {
  animation-name: yarl-marquee-left;
  animation-duration: var(--marquee-duration, 28s);
}

.yarl-marquee-row[data-dir="right"] .yarl-marquee-track {
  animation-name: yarl-marquee-right;
  animation-duration: var(--marquee-duration, 28s);
}

@keyframes yarl-marquee-left {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

@keyframes yarl-marquee-right {
  0% {
    transform: translateX(-50%);
  }
  100% {
    transform: translateX(0);
  }
}

.yarl-marquee-set {
  display: flex;
  flex-shrink: 0;
  gap: 10px;
  align-items: center;
}

.yarl-marquee-item {
  flex-shrink: 0;
  width: 150px;
}

.yarl-marquee-item img {
  display: block;
  width: 100%;
  height: 150px;
  object-fit: contain;
  object-position: center;
  border: 1px solid #000000;
  background-color: #ffffff;
}

@media (max-width: 768px) {
  .yarl-marquee-item {
    width: 120px;
  }

  .yarl-marquee-item img {
    height: 150px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .yarl-marquee-track {
    animation: none !important;
    transform: none !important;
  }
}

/* ---- One white card: headline + italic note + marquees (#root container is narrower). --- */
#scroll-site {
  overflow-x: hidden;
  --yarl-gallery-span: min(100vw - 24px, 1280px);
}

#root .image-gallery {
  overflow-x: visible;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  box-sizing: border-box;
  width: var(--yarl-gallery-span);
  margin-top: 0;
  margin-bottom: 24px !important;
  padding: 20px 20px 22px !important;
  background: #fff !important;
  border: 2px solid #000 !important;
}

/* Headline sits inside the same panel (no second box around it). */
#root .image-gallery > h3.gallery-title-yarl-memes {
  position: static;
  left: auto;
  transform: none;
  width: auto;
  max-width: none;
  margin: 0 0 10px;
  padding: 0;
  border: none;
  background: transparent !important;
  text-align: center;
  font-size: clamp(24px, 4.8vw, 44px);
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1.15;
}

#root .image-gallery > .gallery-marquee {
  margin-top: 6px;
}

@media (max-width: 480px) {
  #root .image-gallery {
    left: auto;
    transform: none;
    width: 100%;
    max-width: none;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding: 16px 14px 18px !important;
  }

  #root .image-gallery > h3.gallery-title-yarl-memes {
    font-size: clamp(22px, 9vw, 36px);
  }
}
