.pictures-intro {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 2rem;
  padding-block: 3rem 2rem;
}

.pictures-intro h1 {
  font-size: clamp(2.8rem, 5.2vw, 4.7rem);
  margin: 0;
}

.pictures-intro h1 em { color: var(--accent-bright); }
.pictures-intro > p { color: var(--muted); margin: 0; }
.gallery { margin-inline: auto; width: calc(100% - 24px); }
.gallery-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 0; }
.gallery-toolbar p { color: var(--muted); font-size: 0.85rem; margin: 0; }
.gallery-controls, .view-switch { display: flex; gap: 0.35rem; }
.gallery button, .photo-dialog button { min-height: 44px; padding: 0.5rem 0.85rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); color: var(--ink); }
.gallery button:hover, .photo-dialog button:hover { background: var(--accent-soft); border-color: var(--accent-bright); }
.gallery button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent-bright); }
.gallery-viewport { border: 1px solid var(--line); background: #111010; border-radius: var(--radius); }
.photo-board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; padding: 2rem; }
.photo { display: block; padding: 0.5rem; border: 1px solid #5a5147; border-radius: 2px; background: var(--ivory); color: var(--ivory-ink); text-decoration: none; box-shadow: 0 6px 18px #0008; }
.photo img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; user-select: none; pointer-events: none; }
.photo-label { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; padding: 0.65rem 0.3rem 0.2rem; }
.photo-label > span { font: 700 1rem/1.3 var(--handwriting); }
.photo-label small { font: 0.65rem var(--mono); white-space: nowrap; }
.photo:hover, .photo:focus-visible { border-color: var(--accent-bright); }
.gallery-note { display: flex; justify-content: space-between; gap: 1rem; color: var(--muted); font: 0.8rem/1.6 var(--mono); margin: 1rem 0; }
.gallery-note span { color: var(--bronze); }

/* Each print can be moved independently. The empty board can be dragged to pan. */
.is-wall .gallery-viewport { position: relative; height: max(720px, calc(100svh - var(--header) - 90px)); overflow: hidden; touch-action: none; cursor: grab; background-image: radial-gradient(#564139 1px, transparent 1px); background-size: 24px 24px; }
.is-wall .photo-board { display: block; position: absolute; width: 1580px; height: 1090px; padding: 0; transform-origin: 0 0; will-change: transform; }
.is-wall .photo { position: absolute; left: var(--x); top: var(--y); width: 400px; transform: rotate(var(--angle)); cursor: grab; touch-action: none; user-select: none; }
.is-wall .photo:nth-child(3n+2) { width: 365px; }
.is-wall .photo:focus-visible { z-index: 100 !important; }
.is-wall .photo.is-dragging { cursor: grabbing; box-shadow: 0 15px 35px #000b; }
.is-wall .gallery-viewport.is-dragging { cursor: grabbing; }
.pictures-more { display: flex; align-items: center; justify-content: space-between; gap: 2rem; padding-block: 3.5rem; }
.pictures-more h2 { margin: 0; }
.pictures-more .hero-actions { margin: 0; }

.photo-dialog { width: min(1500px, calc(100vw - 32px)); max-height: calc(100dvh - 24px); padding: 1rem; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); }
.photo-dialog::backdrop { background: #000e; }
.viewer-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-bottom: 0.75rem; }
.viewer-top > span { color: var(--muted); font-family: var(--mono); font-size: 0.8rem; }
#fullPhoto { width: 100%; height: min(62dvh, 850px); object-fit: contain; background: var(--deep); }
.viewer-bottom { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding-top: 1rem; }
.viewer-bottom > div { text-align: center; }
.viewer-bottom h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); margin-bottom: 0.3rem; }
.viewer-bottom p { margin: 0; color: var(--muted); font-size: 0.9rem; }
.viewer-bottom a { display: inline-block; padding: 0.5rem 0; font-size: 0.8rem; text-underline-offset: 3px; }
.viewer-bottom button { flex-shrink: 0; min-width: 44px; }

@media (max-width: 1050px) {
  .pictures-intro { display: block; }
  .pictures-intro > p { margin-top: 1.25rem; }
  .photo-board { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .pictures-intro { padding-top: 2rem; }
  .is-wall .gallery-viewport { height: max(500px, 72svh); }
  .gallery-toolbar { align-items: start; flex-direction: column; }
  .gallery-controls { flex-wrap: wrap; }
  .photo-board { grid-template-columns: 1fr; padding: 1rem; gap: 1.25rem; }
  .gallery-note { display: block; }
  .gallery-note span { display: block; }
  .pictures-more { display: block; }
  .pictures-more .hero-actions { margin-top: 1.5rem; }
  .photo-dialog { padding: 0.6rem; }
  #fullPhoto { height: 45dvh; }
  .viewer-bottom { gap: 0.4rem; }
}
