.event-gallery-page button, .event-gallery-page input { font: inherit; }
.event-gallery-page button, .event-gallery-page .print-email { border: 1px solid var(--soft-line); background: var(--paper); color: var(--ink); padding: 10px 14px; cursor: pointer; }
.event-gallery-page button:hover, .event-gallery-page .print-email:hover { background: var(--ink); color: var(--paper); }
.event-gallery-page :focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }
.event-gallery-page .header-main { gap: 24px; }
.return-link { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; white-space: nowrap; }
.event-intro { text-align: center; padding: 72px 0 44px; }
.event-intro .section-kicker { margin-bottom: 24px; }
.event-intro .club-crest { width: 120px; height: auto; margin: 0 auto 26px; }
.event-intro h1 { font-size: clamp(44px, 6.5vw, 88px); line-height: 1.02; }
.event-intro > p:not(.section-kicker) { color: var(--muted); font-family: var(--serif); font-size: 25px; }
.event-intro .print-instructions { max-width: 640px; margin: 22px auto 0; font-family: var(--sans) !important; font-size: 13px !important; line-height: 1.8; }
.gallery-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--soft-line); padding: 18px 0; margin-bottom: 24px; }
#photo-search { display: flex; gap: 8px; }
#find-photo { width: 100px; border: 1px solid var(--soft-line); padding: 10px; background: transparent; }
#gallery-message { margin: 0; color: var(--muted); }
.event-photo-grid { columns: 3; column-gap: 20px; }
.event-photo { display: inline-block; width: 100%; break-inside: avoid; margin: 0 0 24px; vertical-align: top; scroll-margin-top: 24px; }
.event-photo .photo-open { display: block; background: #e9e6e0; }
.event-photo img { width: 100%; height: auto; }
.event-photo figcaption { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding-top: 10px; font-size: 11px; }
.event-photo figcaption > span { letter-spacing: .08em; font-weight: 500; }
.event-photo label { display: flex; align-items: center; gap: 7px; cursor: pointer; color: var(--muted); }
.event-photo input { width: 17px; height: 17px; margin: 0; accent-color: var(--ink); }
.event-photo:has(input:checked) .photo-open { outline: 2px solid var(--ink); outline-offset: 3px; }
.print-selection { position: sticky; bottom: 12px; z-index: 3; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; background: var(--paper); border: 1px solid var(--line); padding: 18px 22px; margin: 30px 0 48px; box-shadow: 0 4px 24px #00000012; }
.print-selection h2 { font-size: 28px; line-height: 1.1; }
#selection-count { margin: 5px 0 0; font-size: 12px; color: var(--muted); }
.selection-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.event-gallery-page .print-email { background: var(--ink); color: var(--paper); }
#selection-details { width: 100%; border-top: 1px solid var(--soft-line); padding-top: 12px; max-height: 180px; overflow: auto; }
#selection-details p { margin: 0 0 12px; overflow-wrap: anywhere; }
#selection-details a { text-decoration: underline; }
#photo-viewer { width: min(1400px, 96vw); max-width: 96vw; max-height: 96dvh; padding: 16px 22px; background: var(--paper); border: 1px solid var(--line); }
#photo-viewer::backdrop { background: #161616ed; }
.viewer-top, .viewer-bottom { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.viewer-top p { font-weight: 500; letter-spacing: .08em; }
.viewer-image-wrap { display: grid; grid-template-columns: 44px minmax(0,1fr) 44px; align-items: center; gap: 10px; }
#viewer-image { width: 100%; height: min(72dvh, 950px); object-fit: contain; }
.event-gallery-page .viewer-image-wrap button { padding: 10px 0; font-size: 36px; }
.viewer-bottom { margin-top: 12px; }
.event-gallery-page .viewer-bottom button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
body:has(#photo-viewer[open]) { overflow: hidden; }
@media (max-width: 900px) { .event-photo-grid { columns: 2; } }
@media (max-width: 620px) {
  .event-gallery-page .header-main { align-items: flex-start; flex-direction: column; gap: 14px; }
  .event-intro { padding: 42px 0 30px; }
  .event-intro h1 { font-size: clamp(38px, 10vw, 60px); }
  .event-intro > p:not(.section-kicker) { font-size: 22px; }
  .event-photo-grid { columns: 1; }
  .gallery-toolbar { align-items: flex-start; flex-direction: column; }
  .print-selection { bottom: 0; padding: 14px; margin-bottom: 28px; }
  .print-selection h2 { font-size: 24px; }
  .selection-actions { width: 100%; }
  .selection-actions button, .selection-actions a { font-size: 11px; padding: 9px; }
  #photo-viewer { padding: 10px; }
  .viewer-image-wrap { grid-template-columns: 28px minmax(0,1fr) 28px; gap: 4px; }
  #viewer-image { height: 66dvh; }
}
