.starq-gallery {
  --gap: 0.375rem;
  --edge-inset: 0rem;
  container: gallery / inline-size;
  display: grid;
  gap: var(--gap);
}
[data-article-gallery] .starq-gallery {
  --edge-inset: var(--page-gutter, 1rem);
  inline-size: var(--content-measure-bleed, 100vi);
  margin-inline: calc((100% - var(--content-measure-bleed, 100vi)) / 2);
}
.starq-gallery__tile {
  position: relative;
  display: block;
  overflow: hidden;
  min-width: 0;
  aspect-ratio: var(--ratio);
  background: color-mix(in oklch, var(--color-foreground) 8%, transparent);
  border-radius: var(--radius-media, 0.5rem);
  cursor: zoom-in;
  -webkit-tap-highlight-color: transparent;
}
.starq-gallery__tile img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.starq-gallery__tile:focus-visible {
  outline: 2px solid var(--color-ring);
  outline-offset: 2px;
}
.starq-gallery__tile[data-lead] {
  justify-self: center;
  inline-size: min(100% - 2 * var(--edge-inset), 78svh * var(--ratio));
}
[data-article-gallery] .starq-gallery__tile[data-lead] {
  inline-size: min(100%, 78svh * var(--ratio));
  border-radius: 0;
}
.starq-gallery__rest {
  --row-h: 9.5rem;
  display: flex;
  gap: var(--gap);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--edge-inset);
  padding-inline: var(--edge-inset);
  scrollbar-width: none;
}
.starq-gallery__rest::-webkit-scrollbar {
  display: none;
}
.starq-gallery__rest .starq-gallery__tile {
  flex: 0 0 auto;
  block-size: var(--row-h);
  inline-size: calc(var(--row-h) * var(--ratio));
  scroll-snap-align: start;
}
@container gallery (width >= 40rem) {
  .starq-gallery {
    --gap: 0.5rem;
  }
  .starq-gallery__rest {
    --row-h: 13rem;
    flex-wrap: wrap;
    overflow: visible;
    scroll-snap-type: none;
  }
  .starq-gallery__rest::after {
    content: "";
    flex-grow: 100000;
  }
  .starq-gallery__rest .starq-gallery__tile {
    flex-shrink: 1;
    flex-basis: calc(var(--row-h) * var(--ratio));
    inline-size: auto;
    block-size: auto;
  }
  [data-article-gallery] .starq-gallery__tile[data-lead] {
    inline-size: min(100% - 2 * var(--edge-inset), 78svh * var(--ratio));
    border-radius: var(--radius-media, 0.5rem);
  }
}
@container gallery (width >= 64rem) {
  .starq-gallery__rest {
    --row-h: 17rem;
  }
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .starq-gallery__tile img {
    transition: transform 400ms cubic-bezier(0.23, 1, 0.32, 1);
  }
  .starq-gallery__tile:hover img {
    transform: scale(1.03);
  }
}
.starq-lightbox {
  position: fixed;
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  color: var(--color-media-foreground, white);
  background: color-mix(in oklch, var(--color-foreground) 8%, black);
  overflow: hidden;
}
.starq-lightbox::backdrop {
  background: color-mix(in oklch, var(--color-foreground) 8%, black);
}
.starq-lightbox[open] {
  display: flex;
  flex-direction: column;
}
.starq-lightbox__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: max(0.5rem, env(safe-area-inset-top)) 0.75rem 0.5rem;
}
.starq-lightbox__count {
  font-variant-numeric: tabular-nums;
  font-size: 0.875rem;
  opacity: 0.85;
}
.starq-lightbox__button {
  display: inline-grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 999px;
  color: inherit;
  background: color-mix(in oklch, currentColor 12%, transparent);
}
.starq-lightbox__button:hover {
  background: color-mix(in oklch, currentColor 22%, transparent);
}
.starq-lightbox__button:disabled {
  opacity: 0.35;
}
.starq-lightbox__button:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}
.starq-lightbox__stage {
  position: relative;
  display: flex;
  flex: 1 1 0;
  min-height: 0;
}
.starq-lightbox__track {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  overscroll-behavior: contain;
  scrollbar-width: none;
  touch-action: pan-x pinch-zoom;
}
.starq-lightbox__track::-webkit-scrollbar {
  display: none;
}
.starq-lightbox__slide {
  container-type: size;
  display: grid;
  box-sizing: border-box;
  flex: 0 0 100%;
  place-items: center;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 0 0.5rem;
  scroll-snap-align: center;
  scroll-snap-stop: always;
}
.starq-lightbox__slide img {
  display: block;
  width: min(100cqw, 100cqh * var(--ratio));
  height: auto;
  max-height: 100cqh;
  object-fit: contain;
  border-radius: var(--radius-media, 0.5rem);
  translate: 0 var(--pull, 0px);
}
.starq-lightbox:not([data-pulling]) .starq-lightbox__slide img {
  transition: translate 220ms cubic-bezier(0.23, 1, 0.32, 1);
}
.starq-lightbox__foot {
  display: grid;
  grid-template-columns: 2.75rem minmax(0, 1fr) 2.75rem;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem max(0.75rem, env(safe-area-inset-bottom));
}
.starq-lightbox__caption {
  grid-column: 2;
  grid-row: 1;
  min-height: 2.75rem;
  margin: 0;
  display: grid;
  align-items: center;
  text-align: center;
  font-size: 0.9375rem;
  line-height: 1.4;
  text-wrap: balance;
  opacity: 0.92;
}
.starq-lightbox__step[data-dir="prev"] {
  grid-column: 1;
  grid-row: 1;
}
.starq-lightbox__step[data-dir="next"] {
  grid-column: 3;
  grid-row: 1;
}
@media (hover: hover) and (pointer: fine) and (min-width: 48rem) {
  .starq-lightbox__step {
    position: absolute;
    top: 50%;
    translate: 0 -50%;
  }
  .starq-lightbox__step[data-dir="prev"] {
    inset-inline-start: 1rem;
  }
  .starq-lightbox__step[data-dir="next"] {
    inset-inline-end: 1rem;
  }
}
::view-transition-group(starq-gallery-photo) {
  animation-duration: 340ms;
  animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1);
}
::view-transition-old(starq-gallery-photo),
::view-transition-new(starq-gallery-photo) {
  height: 100%;
  object-fit: cover;
}
@media (prefers-reduced-motion: reduce) {
  .starq-lightbox:not([data-pulling]) .starq-lightbox__slide img {
    transition: none;
  }
}
.starq-gallery[data-layout="rows"] .starq-gallery__rest {
  --row-h: 7.5rem;
  flex-wrap: wrap;
  overflow: visible;
  scroll-snap-type: none;
  padding-inline: 0;
}
.starq-gallery[data-layout="rows"] .starq-gallery__rest::after {
  content: "";
  flex-grow: 100000;
}
.starq-gallery[data-layout="rows"] .starq-gallery__rest .starq-gallery__tile {
  flex-shrink: 1;
  flex-basis: calc(var(--row-h) * var(--ratio));
  inline-size: auto;
  block-size: auto;
  border-radius: 0.125rem;
}
@container gallery (width >= 40rem) {
  .starq-gallery[data-layout="rows"] .starq-gallery__rest {
    --row-h: 15rem;
  }
}
@container gallery (width >= 64rem) {
  .starq-gallery[data-layout="rows"] .starq-gallery__rest {
    --row-h: 20rem;
  }
}
.starq-wall {
  display: grid;
  gap: 1.5rem;
}
.starq-wall .starq-gallery {
  --gap: 0.25rem;
  padding-inline: 0.25rem;
}
.starq-wall__filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
  inline-size: min(100% - 2 * var(--page-gutter, 1rem), var(--content-measure, 80rem));
  margin-inline: auto;
}
.starq-wall__filter button {
  min-block-size: 2.75rem;
  padding: 0;
  border: 0;
  background: none;
  color: color-mix(in oklch, var(--color-foreground) 62%, transparent);
  font: inherit;
  font-size: 1rem;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-decoration-thickness: 0.09em;
  text-underline-offset: 0.4em;
  transition:
    color 0.2s ease,
    text-decoration-color 0.2s ease;
}
.starq-wall__filter button:hover {
  color: var(--color-foreground);
}
.starq-wall__filter button[aria-pressed="true"] {
  color: var(--color-foreground);
  text-decoration-color: currentColor;
}
.starq-wall__filter button:focus-visible {
  outline: 2px solid var(--color-ring);
  outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
  .starq-wall__filter button {
    transition: none;
  }
}
