/* 2026 photo album: the photographs lead; the original Wonderland palette frames them. */
.event-gallery { background: var(--bg); scroll-margin-top: 72px; }
.event-gallery-heading { max-width: 760px; margin: 0 auto 2.5rem; text-align: center; }
.event-gallery-eyebrow { color: var(--gold); font-size: .75rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; }
.event-gallery-heading h2 { margin: 1rem 0; color: var(--gold-light); font-family: var(--font-head); font-size: clamp(1.8rem, 6vw, 3.25rem); line-height: 1.17; text-wrap: balance; }
.event-gallery-lead { color: var(--text); font-size: clamp(1rem, 2.5vw, 1.125rem); line-height: 1.8; }
.event-gallery-meta { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: .75rem; margin-top: 1.5rem; color: var(--smoke); font-size: .8125rem; }
.event-gallery-meta a, .event-gallery-progress a { color: var(--gold-light); text-underline-offset: .25em; }
.event-gallery-meta-rule { width: 24px; height: 1px; background: var(--line); }
.gallery-contest { display: grid; gap: 1.25rem; align-items: center; padding: clamp(1.25rem, 3vw, 2.5rem); margin-bottom: 1.5rem; scroll-margin-top: 6rem; border-block: 1px solid var(--line); background: linear-gradient(115deg, #1b1115, var(--bg-2) 74%); }
.gallery-contest h3 { margin: .5rem 0; font: 700 clamp(1.25rem, 3.4vw, 2rem)/1.2 var(--font-head); color: var(--gold-light); }
.gallery-contest-copy { max-width: 65ch; }
.gallery-contest-copy a { color: var(--gold-light); text-underline-offset: .2em; }
.gallery-contest-prize { max-width: 32ch; border-inline-start: 2px solid var(--gold); padding-inline-start: 1rem; font-size: .9375rem; }
.gallery-contest-prize strong { display: block; color: var(--gold-light); font: 700 clamp(2rem, 4.4vw, 3.25rem)/1.3 var(--font-head); }
@media (min-width: 760px) {
  .gallery-contest { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 2rem; }
  .gallery-contest-prize { padding-inline-start: 1.75rem; }
}
.event-gallery-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
.event-gallery-photo { display: block; position: relative; overflow: hidden; aspect-ratio: 4 / 5; background: var(--bg-3); color: var(--gold-light); border: 1px solid var(--line); border-radius: 3px; text-decoration: none; isolation: isolate; }
.event-gallery-photo:first-child { grid-column: 1 / -1; aspect-ratio: 3 / 2; }
.event-gallery-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease, opacity .3s ease; }
.event-gallery-photo:first-child img { object-fit: contain; }
.event-gallery-photo::after { content: '↗'; position: absolute; right: .625rem; bottom: .625rem; display: grid; width: 32px; height: 32px; place-items: center; color: var(--gold-light); background: rgba(7, 6, 10, .78); border: 1px solid var(--line); border-radius: 50%; opacity: 0; transition: opacity .2s; pointer-events: none; }
.event-gallery-photo:hover::after, .event-gallery-photo:focus-visible::after { opacity: 1; }
.event-gallery-photo:focus-visible, .event-gallery-more:focus-visible, .gallery-viewer button:focus-visible, .gallery-viewer a:focus-visible { outline: 2px solid var(--gold-light); outline-offset: 4px; }
.event-gallery-photo-error::before { content: '↗'; position: absolute; inset: 0; display: grid; place-items: center; font-size: 1.5rem; }
.event-gallery-photo-error img { opacity: 0; }
.event-gallery-footer { display: grid; justify-items: center; gap: 1rem; margin-top: 2rem; text-align: center; }
.event-gallery-progress { color: var(--smoke); font-size: .8125rem; min-height: 1.3em; }
.event-gallery-more { min-height: 48px; }
.event-gallery-error { max-width: 540px; color: var(--gold-light); font-size: .875rem; }
.event-gallery-more[hidden], .event-gallery-error[hidden] { display: none; }
.event-gallery-more:disabled { cursor: progress; opacity: .65; }

.gallery-viewer { position: fixed; inset: 0; width: 100%; max-width: none; height: 100%; height: 100dvh; max-height: none; margin: 0; padding: max(.75rem, env(safe-area-inset-top)) max(.75rem, env(safe-area-inset-right)) max(.75rem, env(safe-area-inset-bottom)) max(.75rem, env(safe-area-inset-left)); border: 0; color: var(--text); background: rgba(7, 6, 10, .98); overscroll-behavior: contain; }
.gallery-viewer:not([hidden]) { display: flex; flex-direction: column; gap: .5rem; }
.gallery-viewer[hidden] { display: none; }
.gallery-viewer { isolation: isolate; overflow: hidden; z-index: 2000; }
.gallery-viewer-top, .gallery-viewer-controls { position: relative; z-index: 3; background: var(--bg); }
.gallery-viewer-stage { z-index: 1; }
html:has(.gallery-viewer:not([hidden])), html:has(.gallery-viewer:not([hidden])) body { overflow: hidden; }
.gallery-viewer-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex: 0 0 auto; }
.gallery-viewer-top p { font-family: var(--font-head); font-size: clamp(.75rem, 3vw, 1rem); color: var(--gold-light); }
.gallery-viewer button { font: inherit; color: var(--gold-light); background: transparent; border: 1px solid var(--line); cursor: pointer; -webkit-tap-highlight-color: transparent; }
.gallery-viewer-close, .gallery-viewer-arrow { width: 48px; height: 48px; flex: 0 0 48px; display: grid; place-items: center; border-radius: 50%; }
.gallery-viewer-close span { font-family: var(--font-body); font-size: 2rem; line-height: 1; font-weight: 300; }
.gallery-viewer button:hover { background: var(--bg-3); }
.gallery-viewer button:disabled { cursor: default; opacity: .4; }
.gallery-viewer-stage { position: relative; display: flex; align-items: center; justify-content: center; flex: 1 1 auto; min-height: 0; margin: 0; overflow: hidden; touch-action: pan-y pinch-zoom; }
.gallery-viewer-stage img { display: block; width: 100%; height: 100%; min-height: 0; object-fit: contain; }
.gallery-viewer-stage img[hidden] { display: none; }
.gallery-viewer-status { position: absolute; left: 5%; right: 5%; top: 50%; transform: translateY(-50%); text-align: center; color: var(--smoke); font-size: .875rem; pointer-events: none; }
.gallery-viewer-status:empty { display: none; }
.gallery-viewer-controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .75rem; flex: 0 0 auto; padding-top: .5rem; }
.gallery-viewer-arrow { font-size: 1.25rem !important; }
.gallery-viewer-counter { min-width: 90px; color: var(--smoke); font-variant-numeric: tabular-nums; text-align: center; font-size: .875rem; }
.gallery-viewer button.gallery-viewer-share { min-height: 44px; padding: .5rem 1rem; border-radius: 3px; color: var(--bg); background: var(--gold-light); font-weight: 600; }
.gallery-viewer button.gallery-viewer-share:hover { background: var(--gold); }
.gallery-share-panel { flex: 0 1 auto; min-height: 0; overflow: auto; text-align: center; }
.gallery-share-panel[hidden], .gallery-share-actions [hidden], .gallery-share-url[hidden] { display: none; }
.gallery-share-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: .25rem .875rem; }
.gallery-share-actions a, .gallery-share-actions button { display: inline-flex; align-items: center; min-height: 44px; color: var(--gold-light); border: 0; padding: .25rem; font-family: inherit; font-size: .875rem; text-decoration: underline; text-underline-offset: .25em; }
.gallery-share-actions [aria-disabled="true"] { opacity: .6; text-decoration: none; }
.gallery-share-feedback { color: var(--text); font-size: .8125rem; }
.gallery-share-feedback:empty { display: none; }
.gallery-share-url { width: min(100%, 32rem); margin-top: .5rem; padding: .5rem; color: var(--text); background: var(--bg-3); border: 1px solid var(--gold); font: inherit; }
@media (max-width: 360px) {
  .gallery-viewer-controls { gap: .25rem; }
  .gallery-viewer-arrow { width: 44px; height: 44px; flex-basis: 44px; }
  .gallery-viewer-counter { min-width: 0; font-size: .8125rem; }
  .gallery-viewer button.gallery-viewer-share { padding-inline: .625rem; }
}

@media (min-width: 700px) {
  .event-gallery-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; }
  .event-gallery-photo { aspect-ratio: 3 / 4; }
  .event-gallery-photo:first-child { grid-column: span 2; grid-row: auto; aspect-ratio: auto; }
  .gallery-viewer { padding: 1.5rem 2rem; }
  .gallery-viewer-controls { position: relative; }
}
@media (min-width: 1080px) {
  .event-gallery-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (hover: hover) and (pointer: fine) {
  html.motion-full .event-gallery-photo:not(:first-child):hover img { transform: scale(1.035); }
}
html.motion-reduced .event-gallery-photo img, html.motion-reduced .event-gallery-photo::after { transition: none; }
@media (prefers-reduced-motion: reduce) {
  html:not(.motion-full) .event-gallery-photo img, html:not(.motion-full) .event-gallery-photo::after { transition: none; }
}
