.event-photos {
  --photo-height: clamp(210px, 23vw, 290px);
  padding-block: 64px 42px;
  overflow: hidden;
  background: radial-gradient(ellipse at 45% 80%, #6c472322, transparent 65%), var(--bg);
  border-bottom: 1px solid #e0bc8626;
}
.photo-heading { display: flex; justify-content: space-between; align-items: end; gap: 24px; }
.photo-date { color: var(--accent); font-size: 11px; letter-spacing: .16em; margin-bottom: 7px; }
.photo-heading h2 { font: 36px/1.4 var(--title); }
.photo-footer { display: flex; justify-content: flex-end; }
.photo-controls { display: flex; align-items: center; gap: 8px; }
.photo-controls button, .photo-viewer-footer button, .photo-viewer-close {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; padding: 0; border: 0;
  background: transparent; color: #c3b39e; transition: color .15s;
}
.photo-controls button:hover, .photo-viewer-footer button:hover, .photo-viewer-close:hover { color: #fff5e5; }
.photo-controls svg, .photo-viewer-footer svg, .photo-viewer-close svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.photo-controls .photo-motion svg { width: 18px; height: 18px; }
.photo-controls button:focus-visible, .photo-viewer-footer button:focus-visible, .photo-viewer-close:focus-visible { outline-offset: 0; border-radius: 50%; }
.photo-reel-shell { position: relative; margin-top: 14px; }
.photo-reel-shell::before, .photo-reel-shell::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 40px;
  pointer-events: none; z-index: 1;
}
.photo-reel-shell::before { left: 0; background: linear-gradient(90deg, var(--bg), transparent); }
.photo-reel-shell::after { right: 0; background: linear-gradient(-90deg, var(--bg), transparent); }
.photo-reel {
  overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain;
  scrollbar-width: thin; scrollbar-color: #8e6b3d #211e19;
  padding-inline: max(24px, calc((100vw - 1180px) / 2));
}
.photo-track { position: relative; display: flex; gap: 28px; width: max-content; list-style: none; margin: 0; padding: 24px 0 22px; }
.photo-card { width: calc(var(--photo-height) * var(--photo-ratio) + 16px); flex: 0 0 auto; transform: rotate(var(--photo-tilt)); }
.photo-card figure { padding: 8px 8px 0; background: #eadfc9; color: #493421; box-shadow: 0 8px 18px #0005; }
.photo-card a { display: block; position: relative; overflow: hidden; background: #31291f; cursor: zoom-in; }
.photo-card img { width: 100%; height: var(--photo-height); object-fit: contain; }
.photo-card figcaption { min-height: 39px; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-inline: 4px; font-size: 12px; }
.photo-card figcaption > span:last-child { font-size: 10px; opacity: .65; font-variant-numeric: tabular-nums; }
.photo-enlarge { position: absolute; right: 12px; bottom: 8px; color: #fff8ed; text-shadow: 0 1px 5px #000; font-size: 20px; opacity: 0; transition: opacity .15s; }
.photo-card a:is(:hover, :focus-visible) .photo-enlarge { opacity: 1; }
.photo-card a:focus-visible { outline-color: #7e3914; outline-offset: 3px; }
.event-photo-viewer {
  width: min(1280px, calc(100% - 48px)); max-width: none; max-height: calc(100dvh - 40px);
  padding: 0; border: 0; background: transparent; color: var(--fg);
  overflow: auto; overscroll-behavior: contain;
}
.event-photo-viewer::backdrop { background: #100c08ed; }
.photo-viewer-inner { padding: 16px 20px; }
.photo-viewer-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.photo-viewer-heading h2 { font-size: 16px; font-weight: 500; color: var(--accent); }
.photo-viewer-stage { position: relative; background: #100f0d; min-height: 180px; touch-action: pan-y pinch-zoom; }
.photo-viewer-image { height: min(68dvh, 780px); }
.photo-viewer-image img { width: 100%; height: 100%; object-fit: contain; user-select: none; }
.photo-viewer-state { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 16px; font-size: 14px; background: #100f0dcf; }
.photo-viewer-state button { border: 0; background: transparent; color: var(--accent); padding: 10px 18px; min-height: 44px; text-decoration: underline; text-underline-offset: 5px; }
.photo-viewer-footer { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; gap: 20px; padding-top: 16px; }
.photo-viewer-footer > div { text-align: center; }
.photo-viewer-caption { font-size: 14px; }
.photo-viewer-count { margin-top: 3px; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
@media (max-width: 700px) {
  .event-photos { --photo-height: clamp(145px, 44vw, 220px); padding-block: 42px 28px; }
  .photo-heading { gap: 12px; }
  .photo-heading h2 { font-size: 27px; }
  .photo-date { font-size: 10px; }
  .photo-controls { gap: 4px; }
  .photo-reel { padding-inline: 24px; }
  .photo-track { gap: 22px; }
  .photo-reel-shell::before, .photo-reel-shell::after { width: 16px; }
  .photo-enlarge { opacity: 1; }
  .event-photo-viewer { width: calc(100% - 20px); max-height: calc(100dvh - 20px); }
  .photo-viewer-inner { padding: 10px; }
  .photo-viewer-heading { margin-bottom: 10px; }
  .photo-viewer-image { height: calc(100dvh - 180px); }
  .photo-viewer-footer { gap: 10px; padding-top: 12px; }
}
@media (max-height: 500px) and (orientation: landscape) {
  .photo-viewer-inner { padding: 8px 12px; }
  .photo-viewer-heading { margin-bottom: 6px; }
  .photo-viewer-image { height: calc(100dvh - 160px); }
  .photo-viewer-footer { padding-top: 6px; }
}
@media (prefers-reduced-motion: reduce) { .photo-motion { display: none !important; } }
@media print {
  .photo-footer, .photo-enlarge, .event-photo-viewer, .photo-card[data-copy] { display: none !important; }
  .event-photos, .photo-reel { overflow: visible; background: white; }
  .photo-track { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: auto; }
  .photo-card { width: auto; transform: none; }
  .photo-card img { height: 160px; }
}
