.gallery-page { min-height: 100vh; background: #fcfcfc; }
.gallery-page > .surf-glass-header {
  position: relative;
  background: transparent;
  margin: 0;
  border: 0;
  backdrop-filter: none;
}
.photo-journal {
  width: min(78rem, calc(100% - clamp(2rem, 7.65vw, 7rem)));
  margin: clamp(2rem, 4.9vw, 4rem) auto;
  color: #1d1d1f;
}
.photo-intro { margin-block-end: clamp(1.25rem, 2.7vw, 2rem); }
.photo-intro h1, .gallery-vibe-heading {
  font-size: clamp(2.5rem, 4.8vw, 4.2rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.055em;
}
.photo-bento, .photo-side, .photo-grid { display: grid; gap: clamp(.75rem, 2vw, 1.5rem); }
.photo-bento { grid-template-columns: 1fr 1fr; }
.photo-side { grid-template-columns: 1fr 1fr; }
.photo-feature, .photo-slide, .photo-tile, .photo-entry {
  position: relative;
  min-width: 0;
}
.photo-feature { aspect-ratio: 1.075; }
#photo-slides, .photo-slide, .photo-slide img, .photo-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.photo-slide, .photo-tile, .photo-entry {
  display: block;
  width: 100%;
  border-radius: .95rem;
  overflow: hidden;
  background: #f7f7f9;
  color: #1d1d1f;
  text-align: left;
}
.photo-slide { color: white; border-radius: 1.25rem; }
.photo-slide[hidden] { display: none; }
.photo-slide img, .photo-tile img, .photo-entry img {
  object-fit: cover;
  transition: transform 380ms ease;
}
.photo-slide::after {
  content: "";
  position: absolute;
  inset: 20% 0 0;
  background: linear-gradient(transparent, #07141ded);
  pointer-events: none;
}
.photo-label { display: grid; gap: .25rem; padding: .9rem 1rem; line-height: 1.25; }
.photo-slide .photo-label, .photo-tile .photo-label { position: absolute; inset: auto 0 0; z-index: 1; }
.photo-slide .photo-label { padding: clamp(1.1rem, 3vw, 2rem); }
.photo-slide strong { font-size: clamp(1.35rem, 2.4vw, 2rem); line-height: 1.08; }
.photo-label small { color: #cde6e8; }
.photo-tile .photo-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); padding: 0; }
.photo-next, .photo-dialog button {
  display: grid;
  place-items: center;
  min-width: 48px;
  min-height: 48px;
  border: 1px solid #d6e4e9;
  border-radius: 100%;
  background: #f1faf8;
  color: #102b34;
  font-size: 1.35rem;
  transition: transform 160ms ease, background-color 160ms ease;
}
.photo-next { position: absolute; top: 50%; right: clamp(.7rem, 1.9vw, 1.4rem); margin-top: -24px; }
.photo-count { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.photo-badges { display: flex; gap: .4rem; align-items: center; }
.photo-label small, .photo-index {
  justify-self: start;
  padding: .18rem .62rem;
  border: 1px solid #0002;
  border-radius: 99px;
  background: #f3f3f5;
  color: #1d1d1f;
  font-size: .68rem;
}
.photo-index { background: #07141dc9; border-color: #fff5; color: white; }
.photo-meta { font-size: .68rem; letter-spacing: .06em; text-transform: uppercase; }
.photo-slide .photo-meta { color: #edf1f4; margin-top: .4rem; }
.photo-journal button:focus-visible, .photo-dialog button:focus-visible { outline: 3px solid #167d84; outline-offset: 3px; }
.photo-archive { margin-block-start: clamp(2rem, 4.5vw, 3.5rem); }
.photo-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.photo-entry, .photo-tile { border: 1px solid #0001; box-shadow: 0 5px 14px #00000007; }
.photo-entry { display: flex; flex-direction: column; height: 100%; }
.photo-entry img { width: 100%; aspect-ratio: 4 / 3; }
.photo-entry .photo-label { flex: 1; width: 100%; padding: 1.15rem; gap: .65rem; }
.photo-entry strong { min-height: 2.5em; }
.photo-entry .photo-meta { margin-top: .6rem; color: #4b4b55; }
.photo-dialog {
  margin: auto;
  width: min(62rem, calc(100% - 2rem));
  max-height: calc(100dvh - 2rem);
  border: 1px solid #45616b;
  border-radius: .95rem;
  background: #102b34;
  color: white;
}
.photo-dialog::backdrop { background: #07141dec; }
.photo-dialog-bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .6rem 1rem; }
.photo-dialog img { width: 100%; max-height: calc(100dvh - 7rem); object-fit: contain; }
@media (hover: hover) {
  [data-photo]:hover img { transform: scale(1.025); }
  .photo-next:hover, .photo-dialog button:hover { transform: translateY(-2px); background: #c9f3e9; }
}
.photo-next:active, .photo-dialog button:active { transform: scale(.96); }
@media (max-width: 760px) {
  .photo-bento { grid-template-columns: minmax(0, 1fr); }
  .photo-feature { width: 100%; min-height: 20rem; }
  .photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .photo-tile { aspect-ratio: 1.08; }
}
@media (max-width: 480px) { .photo-grid { grid-template-columns: minmax(0, 1fr); } }
@media (prefers-reduced-motion: reduce) {
  .photo-journal *, .photo-dialog * { transition: none; }
}

/* Keep the Gallery header on the same light surface as its content. */
.gallery-page > .surf-glass-header {
  inset: auto;
  background: transparent;
}
.gallery-page > .surf-glass-header > .h-16 {
  width: min(78rem, calc(100% - clamp(2rem, 7.65vw, 7rem)));
  padding-inline: 0;
}
.gallery-page [data-purpose="top-navigation"].surf-glass-header .surf-primary-links {
  grid-template-columns: 1.4fr 1fr 1fr;
  border-color: #132e3826;
  background: #fff;
  box-shadow: 0 3px 12px #102b340a;
}
.gallery-page .surf-glass-header .surf-primary-links > a,
.gallery-page .surf-glass-header .surf-package-menu > summary,
.gallery-page .surf-glass-header .surf-glass-brand > span {
  color: #102b34;
}
.gallery-page .surf-glass-brand > span:first-child { border-color: #102b3440; }
.gallery-page .surf-glass-header .surf-primary-links > a[aria-current="page"],
.gallery-page .surf-glass-header .surf-primary-links > a:hover,
.gallery-page .surf-glass-header .surf-package-menu > summary:hover,
.gallery-page .surf-glass-header .surf-package-menu[open] > summary {
  color: #102b34;
  background: #e9f1f1;
  box-shadow: none;
}
.gallery-page .surf-glass-header a.surf-glass-cta { background: #102b34; color: white; }
.gallery-page .surf-glass-header a:focus-visible,
.gallery-page .surf-glass-header summary:focus-visible { outline: 2px solid #167d84; }
