/* Compact, swipeable galleries for dated project updates. */
.update-slideshow {
  min-width: 0;
  width: 100%;
  max-width: 20rem;
}
.update-gallery {
  display: flex;
  gap: 0;
  width: 100%;
  max-width: none;
  align-items: stretch;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.update-gallery::-webkit-scrollbar { display: none; }
.update-gallery > .update-figure {
  flex: 0 0 100%;
  width: 100%;
  min-width: 0;
  margin: 0;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  scroll-margin-top: 5rem;
}
.update-gallery .update-photo {
  width: 100%;
  aspect-ratio: var(--update-gallery-ratio, 3 / 4);
  max-height: 22rem;
  background: #e2dfda;
}
.update-gallery .update-photo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.update-gallery .update-photo:focus-visible {
  outline-offset: -4px;
}
.update-gallery .update-figure figcaption {
  padding: .65rem .1rem 0;
}
.update-gallery-controls {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: center;
  gap: .75rem;
  margin-top: .75rem;
}
.update-gallery-arrow {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--rule);
  border-radius: 50%;
  background: transparent;
  color: var(--bronze);
  font-size: 1.35rem;
  line-height: 1;
}
.update-gallery-arrow { text-decoration: none; }
.update-gallery-arrow[aria-disabled="true"] { opacity: .35; }
a.update-gallery-arrow:hover {
  background: var(--bronze);
  border-color: var(--bronze);
  color: var(--paper);
}
.update-gallery-indicators {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: .2rem .75rem;
  min-width: 0;
}
.update-gallery-count {
  min-width: 3rem;
  font-size: .8125rem;
  font-variant-numeric: tabular-nums;
  text-align: center;
}
.update-gallery-dots {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}
.update-gallery-dot {
  display: grid;
  place-items: center;
  width: 28px;
  height: 32px;
  padding: 0;
  border: 0;
  background: transparent;
}
.update-gallery-dot::before {
  content: "";
  width: 7px;
  height: 7px;
  border: 1px solid var(--bronze);
  border-radius: 50%;
}
.update-gallery-dot[aria-pressed="true"]::before {
  background: var(--bronze);
}
.update-gallery-hint {
  margin-top: .25rem;
  color: var(--muted);
  font-size: .75rem;
  text-align: center;
}
.korean-book-content .update-gallery-arrow { display: none; }
.korean-book-content .update-gallery-controls { display: block; text-align: center; }
@media (max-width: 900px) {
  .update-gallery > .update-figure { scroll-margin-top: 11rem; }
}
@media (max-width: 540px) {
  .update-slideshow { max-width: 16rem; }
  .update-gallery .update-photo {
    max-height: 18rem;
  }
  .update-gallery-controls { gap: .5rem; }
}
@media (prefers-reduced-motion: reduce) {
  .update-gallery { scroll-behavior: auto; }
}
