/* The two frames and their captions use the same edges on every screen. */
.gallery-reference-page .lighting-compare {
  --lighting-photo-width:100%;
}
.gallery-reference-page .lighting-compare .lighting-compare-frame {
  width:var(--lighting-photo-width);
  height:auto;
  aspect-ratio:4 / 3;
  margin-inline:auto;
}
.gallery-reference-page .lighting-compare .lighting-compare-stage {
  width:100%;
  height:100%;
}
.gallery-reference-page .lighting-compare .lighting-labels {
  width:var(--lighting-photo-width);
  margin-inline:auto;
}
@media (min-width:701px) {
  .gallery-reference-page .lighting-compare {
    --lighting-photo-width:min(100%, clamp(454px, 53.3333vw, 906px));
  }
}
@media (min-width:1024px) {
  .gallery-reference-page .lighting-compare {
    --lighting-photo-width:min(100%, 67.5vw, 1120px);
  }
}
.gallery-reference-page .gallery-title-tail { white-space:nowrap; }
@media (max-width:700px) {
  .gallery-reference-page .gallery-title-tail { display:block; }
}
@media (max-width:400px) {
  .gallery-reference-page .gallery-text-intro h1 { font-size:clamp(22px,7.8vw,31px); }
}
@media (max-width:700px) {
  .gallery-reference-page .lighting-compare #lighting-title { font-size:clamp(15px,6.2vw,34px); }
  .gallery-reference-page .lighting-title-name { display:block; white-space:nowrap; }
  .gallery-reference-page .lighting-title-tail { display:block; white-space:nowrap; }
}

.gallery-reference-page #modal-body .gallery-viewer-frame {
  display:grid; grid-template-rows:minmax(0,1fr) auto; gap:8px;
  width:100%; height:100%; min-width:0; min-height:0;
}
.gallery-viewer-image { display:grid; place-items:center; min-height:0; touch-action:pan-y pinch-zoom; }
.gallery-viewer-image img { user-select:none; -webkit-user-drag:none; }
.gallery-viewer-controls { display:flex; align-items:center; justify-content:center; gap:16px; }
.gallery-viewer-controls button { display:grid; place-items:center; width:48px; height:44px; border:1px solid #55565c; border-radius:100px; color:#fff; background:#222328; cursor:pointer; padding:0; }
.gallery-viewer-controls button:hover { background:#34363d; }
.gallery-viewer-controls button:focus-visible { outline:2px solid #fff; outline-offset:2px; }
.gallery-viewer-count { min-width:5ch; text-align:center; font-size:14px; color:#f1f1f3; font-variant-numeric:tabular-nums; }
