.gallery {
  position: relative;
  isolation: isolate;
  background: radial-gradient(ellipse at 50% 38%, #fcfaf7, #e6edf7 76%, #dbe5f2);
  color: #202f44;
}
.gallery-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.gallery-title {
  position: absolute;
  z-index: 1;
  inset: clamp(14px, 3svh, 32px) 18px auto;
  margin: 0;
  color: #293449;
  font: 400 clamp(22px, 3vw, 48px)/1.1 'The Seasons', Georgia, serif;
  letter-spacing: -.035em;
  text-align: center;
  text-wrap: balance;
  pointer-events: none;
}
.gallery-field {
  position: relative;
  height: 100svh;
  overflow: hidden;
  overflow: clip;
  touch-action: pan-y;
  cursor: grab;
  outline-offset: -5px;
}
.gallery-field.is-dragging { cursor: grabbing; }
.gallery-planes { position: absolute; inset: 0; }
.gallery button {
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.gallery-card {
  position: absolute;
  top: 0;
  left: 0;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: 0 12px 29px #24394b38;
  border-radius: 5px;
  user-select: none;
}
.gallery-card img {
  display: block;
  width: 100%;
  border-radius: inherit;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  pointer-events: none;
}
.gallery-card:focus-visible, .gallery-card:hover { outline: 2px solid #324764; outline-offset: 4px; }
.gallery-views {
  display: flex;
  justify-content: center;
  gap: 8px;
}
.gallery-detail button {
  min-width: 44px;
  min-height: 44px;
  padding: 6px 14px;
  border: 1px solid #32476465;
  border-radius: 24px;
  background: #fafcff;
}
.gallery-detail button:hover { background: #e0e8f3; }
.gallery-detail {
  width: min(92vw, 540px);
  max-height: 94dvh;
  padding: clamp(14px, 3vw, 24px);
  border: 0;
  border-radius: 16px;
  color: inherit;
  background: #f7f9fd;
}
.gallery-detail::backdrop { background: #172537ad; }
.gallery-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.gallery-detail h3 { margin: 0; font: italic 400 28px Georgia, serif; }
.gallery-detail img {
  display: block;
  width: 100%;
  height: min(61dvh, 560px);
  object-fit: contain;
}
.gallery-views { margin-top: 12px; }
.gallery-views button[aria-pressed="true"] { background: #253850; color: white; }

.gallery-anchor {
  position: absolute;
  bottom: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}
@media (prefers-reduced-motion: no-preference) {
  .gallery {
    position: absolute;
    inset: 0;
    z-index: 10;
    background: radial-gradient(ellipse at 50% 42%, #f7fbffb8, #e1ebf573 68%, transparent);
    visibility: hidden;
    opacity: 0;
    will-change: opacity;
  }
  .gallery-field { height: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .journey { height: auto; }
  .world { position: relative; height: auto; }
  .atelier {
    position: relative;
    inset: auto;
    min-height: 100svh;
    pointer-events: auto;
  }
  .atelier-photo, .atelier-cloud { animation: none; }
}

@media (max-width: 700px) {
  .atelier-cloud { padding: 18px 8px 22px; }
  .atelier-links { gap: 4px 14px; }
  .atelier-links a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }
  .gallery-title { inset-inline: 16px; }
}
@media (max-height: 480px) and (orientation: landscape) {
  .atelier { padding-block: 16px; }
  .atelier-photo img { max-height: 52dvh; }
  .atelier-cloud { padding-block: 16px; }
  .gallery-title { top: 8px; font-size: clamp(18px, 5dvh, 24px); }
}
