.event-albums {
  --album-ink: #161f37;
  padding-block-start: calc(var(--inner-header-clearance) + 1.35rem);
  color: #fffbef;
  background: #172f52;
}
.event-albums h1 {
  margin: 0 0 clamp(1.2rem, 2vw, 2rem);
  color: inherit;
  font-size: clamp(2.6rem, 6.2vw, 5.6rem);
  line-height: 1.05;
  letter-spacing: -.035em;
  overflow-wrap: anywhere;
}
.event-albums__grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(.85rem, 2vw, 1.7rem);
  margin: 0;
  padding: 0;
}
.event-albums__grid[hidden] { display: none; }
.event-albums__grid li { display: flex; }
.event-album {
  display: flex;
  flex-direction: column;
  width: 100%;
  overflow: hidden;
  background: var(--album-paper, #fff1ba);
  color: var(--album-ink);
  border-radius: .85rem;
  text-decoration: none;
}
.event-albums__grid li:nth-child(4n + 2) { --album-paper: #ffdfe8; }
.event-albums__grid li:nth-child(4n + 3) { --album-paper: #d4edee; }
.event-albums__grid li:nth-child(4n + 4) { --album-paper: #e1e1ff; }
.event-album__cover {
  aspect-ratio: 3/2;
  position: relative;
  overflow: hidden;
  background: linear-gradient(140deg, #334d72, #697e96);
}
.event-album__cover:empty::after,
.event-album__cover:has(img[hidden])::after {
  content: '';
  position: absolute;
  inset: 30% 33%;
  border: 3px solid #ffffffa6;
  border-radius: .45rem;
  box-shadow: 5px 5px 0 -2px #526a85, 5px 5px 0 0 #ffffffa6;
}
.event-album__cover img { width: 100%; height: 100%; object-fit: cover; }
.event-album__caption { display: flex; flex: 1; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.2rem; }
.event-album__caption strong { font-size: clamp(1rem, 2vw, 1.4rem); line-height: 1.3; overflow-wrap: anywhere; }
.event-album__icon { position: relative; flex: 0 0 1rem; height: .85rem; }
.event-album__icon::before, .event-album__icon::after { content: ''; position: absolute; }
.event-album__icon::before { top: 50%; left: 0; width: 100%; border-top: 2px solid currentColor; }
.event-album__icon::after { top: 50%; right: 0; width: .55rem; height: .55rem; border-top: 2px solid currentColor; border-right: 2px solid currentColor; transform: translateY(-38%) rotate(45deg); }
.album-back, .album-plain { display: inline-block; color: inherit; text-underline-offset: .22em; padding-block: .45rem; }
.album-back { margin-bottom: .9rem; }
.album-back::before { font-family: system-ui, sans-serif; content: '←'; display: inline-block; margin-right: .45rem; }
.album-heading p { margin: -.4rem 0 1.5rem; color: #e0e8f0; }
.album-message { margin: .5rem 0; }
.album-message button { color: inherit; background: none; border: 0; text-decoration: underline; cursor: pointer; font: inherit; padding: .35rem; }
.album-photo-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(.55rem, 1.3vw, 1rem); }
.album-photo { margin: 0; min-width: 0; }
.album-photo [data-album-item] {
  display: grid;
  place-items: center;
  position: relative;
  width: 100%;
  aspect-ratio: 4/3;
  color: #fff;
  background: #354b64;
  overflow: hidden;
  border: 0;
  padding: 0;
  border-radius: .45rem;
  cursor: zoom-in;
}
.album-photo button[data-video-play] { cursor: pointer; }
.album-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.album-video__play {
  display: inline-flex;
  align-items: center;
  gap: .5em;
  position: relative;
  min-height: 2.75rem;
  padding: .65rem 1rem;
  border-radius: 2rem;
  background: #172f52f2;
  font: 700 .95rem/1 var(--sans);
}
.album-video__play::before {
  content: '';
  border-block: .42em solid transparent;
  border-left: .7em solid #fff;
}
.lightbox [data-video-slot] {
  margin-inline: auto;
  width: min(100%, max(12rem, calc((100dvh - 12rem) * 16 / 9)));
  aspect-ratio: 16/9;
  overflow: hidden;
  background: #101f35;
}
.lightbox [data-video-slot] iframe { display: block; width: 100%; height: 100%; border: 0; }
.event-albums :focus-visible { outline: 3px solid #ffcc65; outline-offset: 4px; }
.event-albums img[hidden], #photographs[hidden], .lightbox [hidden] { display: none; }
.lightbox { max-width: calc(100vw - 1rem); border-radius: .65rem; }
.lightbox figure { margin: 0; }
.lightbox figure img { max-width: 100%; height: auto; object-fit: contain; }
.lightbox [data-photo-controls]:not([hidden]) { display: flex; gap: .6rem; justify-content: center; margin-top: .6rem; }
.lightbox [data-photo-controls] button, .lightbox form button { font-family: system-ui, sans-serif; border-radius: 50%; width: 2.75rem; height: 2.75rem; }
.lightbox [data-photo-error] { padding: 2rem; text-align: center; }
@media (prefers-reduced-motion: no-preference) {
  .event-album img { transition: transform .25s ease-out; }
  .event-album:hover img { transform: scale(1.025); }
}
@media (max-width: 54rem) {
  .event-albums__grid, .album-photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 34rem) {
  .event-albums__grid { grid-template-columns: 1fr; }
  .event-album__caption { padding: .8rem 1rem; }
  .event-album__cover { aspect-ratio: 16/9; }
}
