.project-album { min-width: 0; }
.project-album > summary { display: block; cursor: zoom-in; list-style: none; }
.project-album > summary::-webkit-details-marker { display: none; }
.project-album[open] > summary { cursor: zoom-out; }
.project-album .project-glass { display: block; }
.project-album:is(:hover,:focus-within) + .project-story .project-arrow { width: 1.16em; opacity: 1; transform: none; }
.photo-links { margin: 16px 0 0; padding: 0; list-style: none; display: grid; gap: 16px; }
.photo-links img { width: 100%; height: auto; display: block; border-radius: 10px; }
.photo-links figure { margin: 0; }
.photo-links figcaption { padding: .5em 0; font-size: .9rem; }
html:has(.qr-photo-dialog[open]) { overflow: hidden; }
.qr-photo-dialog {
  --photo-ratio: 1.6;
  --photo-gutter-x: max(clamp(8px, 2.6vw, 48px), env(safe-area-inset-left), env(safe-area-inset-right));
  --photo-gutter-y: max(clamp(8px, 3dvh, 36px), env(safe-area-inset-top), env(safe-area-inset-bottom));
  --photo-height: calc(100dvh - 2 * var(--photo-gutter-y));
  color-scheme: dark;
  width: min(1680px, calc(100vw - 2 * var(--photo-gutter-x)), calc(var(--photo-height) * var(--photo-ratio)));
  height: auto; aspect-ratio: var(--photo-ratio); max-width: none; max-height: none;
  margin: auto; padding: 0; border: 0; border-radius: clamp(10px, 1.2vw, 20px);
  color: white; background: #0a1827; box-shadow: 0 16px 80px #020b18a6;
  overflow: hidden; overscroll-behavior: contain;
}
.qr-photo-dialog::backdrop { background: #061222e6; backdrop-filter: blur(12px); }
.qr-photo-dialog [hidden] { display: none; }
.photo-view-shell {
  position: absolute; inset: 0; container-type: inline-size; isolation: isolate;
  text-shadow: 0 1px 3px #061220, 0 0 9px #e5f2ff45;
}
.photo-view-figure, .photo-stage { position: absolute; inset: 0; margin: 0; }
.photo-stage { touch-action: pan-y pinch-zoom; }
.photo-full { display: block; width: 100%; height: 100%; object-fit: cover; }
.photo-caption {
  --inset: clamp(16px, 2.4cqw, 38px);
  position: absolute; inset: auto 0 0; pointer-events: none;
  padding: clamp(44px, 7cqw, 108px) var(--inset) var(--inset);
  background: linear-gradient(to top, #06121ef0, #06121eba 40%, transparent);
}
.photo-view-shell:has(.photo-view-nav:not([hidden])) .photo-caption { padding-right: calc(172px + var(--inset)); }
.photo-caption h2 {
  margin: 2px 0 0; color: white;
  font: 480 clamp(1.25rem, 2.35cqw, 2.5rem)/1.08 Inter,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;
  letter-spacing: -.045em; text-wrap: balance;
}
.photo-sector, .photo-counter {
  color: #f3f8ff; font: 450 clamp(.68rem,.83cqw,.8rem)/1.35 'IBM Plex Mono',ui-monospace,monospace;
  font-variant-numeric: tabular-nums;
}
.photo-description {
  margin: .36em 0 0; color: #f3f8ff;
  font: 400 clamp(.8rem,1.09cqw,1.05rem)/1.35 Inter,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;
}
.photo-close, .photo-view-nav button {
  display: grid; place-items: center; min-width: 46px; height: 46px;
  appearance: none; padding: 0; border: 0;
  background: transparent; color: white; cursor: pointer; touch-action: manipulation;
}
.photo-close {
  position: absolute; z-index: 1; top: clamp(3px,1cqw,18px); right: clamp(3px,1cqw,18px);
}
.qr-photo-dialog button:focus-visible { outline: 2px solid white; outline-offset: -4px; }
.qr-photo-dialog button svg {
  fill: none; stroke: currentColor; stroke-linecap: square; stroke-linejoin: miter; stroke-width: 1.6;
  filter: drop-shadow(0 1px 1px #061220) drop-shadow(0 0 3px #deedffb3);
}
.qr-photo-dialog button:is(:hover,:focus-visible) svg { filter: drop-shadow(0 1px 1px #061220) drop-shadow(0 0 5px white); }
.photo-close svg { width: 25px; height: 25px; }
.photo-view-nav {
  position: absolute; right: clamp(10px,1.8cqw,32px); bottom: clamp(10px,1.85cqw,32px);
  display: flex; align-items: center; gap: 3px;
}
.photo-view-nav svg { width: 34px; height: 22px; }
.photo-prev svg { scale: -1 1; }
.photo-counter { min-width: 5ch; text-align: center; }
@container (max-width: 480px) {
  .photo-caption { --inset: 14px; padding-top: 36px; }
  .photo-view-shell:has(.photo-view-nav:not([hidden])) .photo-caption { padding-right: var(--inset); }
  .photo-view-nav { top: 3px; left: 4px; bottom: auto; right: auto; }
  .photo-view-shell:has(.photo-view-nav:not([hidden])) .photo-stage::after {
    content: ''; position: absolute; inset: 0 0 auto; height: 64px; pointer-events: none;
    background: linear-gradient(to bottom, #0514229c, transparent);
  }
}
@media (prefers-reduced-motion:no-preference) {
  .qr-photo-dialog button svg { transition: filter 180ms; }
  .qr-photo-dialog[open] { animation: qr-photo-open 200ms cubic-bezier(.2,.8,.2,1) both; }
  @keyframes qr-photo-open { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
}
