/* Photographs remain complete, with the same calm controls as the portfolio. */
.dg-studio #photo-viewer {
  width:min(1120px,calc(100vw - 32px));
  max-width:calc(100vw - 32px);
  max-height:calc(100dvh - 32px);
  margin:auto;
  padding:0;
  overflow:hidden;
  background:#111;
  border:1px solid var(--dg-rule);
}
.dg-studio #photo-viewer[open] {display:flex;flex-direction:column}
.dg-studio .dg-gallery-toolbar {
  display:flex;align-items:center;justify-content:space-between;gap:20px;
  flex:0 0 auto;padding:12px 18px 12px 24px;
  background:#191919;border-bottom:1px solid var(--dg-rule);
}
.dg-studio .dg-gallery-title {
  color:var(--brand-silver);font-size:11px;line-height:1.6;
  letter-spacing:.09em;text-transform:uppercase;
}
.dg-studio #photo-viewer .dg-close {
  position:static;display:grid;place-items:center;flex:0 0 44px;
  width:44px;height:44px;padding:0;border:1px solid var(--dg-rule);
  background:#191919;color:var(--dg-white);font-size:26px;line-height:1;
}
.dg-studio .dg-gallery-stage {
  display:grid;place-items:center;flex:1 1 auto;min-height:0;
  height:min(70dvh,800px);overflow:hidden;background:#0d0e0c;
  touch-action:pan-y pinch-zoom;
}
.dg-studio #photo-viewer .dg-gallery-stage img {
  display:block;width:100%;height:100%;min-height:0;
  max-width:100%;max-height:100%;object-fit:contain;
}
.dg-studio .dg-gallery-footer {
  display:grid;grid-template-columns:minmax(0,1fr) auto;
  align-items:center;gap:24px;flex:0 0 auto;
  padding:16px 24px;background:#191919;border-top:1px solid var(--dg-rule);
}
.dg-studio #photo-viewer .dg-gallery-footer p {
  margin:0;max-height:5.4em;overflow:auto;color:var(--dg-muted);
  font-size:13px;line-height:1.8;
}
.dg-studio .dg-gallery-navigation {display:flex;align-items:center;gap:14px}
.dg-studio .dg-gallery-arrow {
  display:grid;place-items:center;width:44px;height:44px;min-width:44px;
  padding:0;border:1px solid #f0bf7670;background:transparent;
  color:var(--dg-gold);font-size:23px;line-height:1;cursor:pointer;
  transition:background .2s,border-color .2s;
}
.dg-studio .dg-gallery-arrow:hover {background:#f0bf7612;border-color:var(--dg-gold)}
.dg-studio .dg-gallery-arrow:disabled {opacity:.3;cursor:default}
.dg-studio .dg-gallery-count {
  min-width:56px;text-align:center;color:var(--dg-white);
  font-size:12px;line-height:1.6;letter-spacing:.06em;font-variant-numeric:tabular-nums;
}

/* Long actor materials keep their title and close control within reach. */
.dg-studio .dg-project-dialog > .dg-project-dialog-header {
  position:sticky;top:0;z-index:5;background:#191919;
  border-bottom:1px solid var(--dg-rule);
}
.dg-studio .dg-project-dialog-header > .dg-close {z-index:1}

@media(max-width:620px) {
  .dg-studio #photo-viewer {width:calc(100vw - 20px);max-width:calc(100vw - 20px);max-height:calc(100dvh - 20px)}
  .dg-studio .dg-gallery-toolbar {padding:10px 12px 10px 18px;gap:12px}
  .dg-studio .dg-gallery-title {font-size:10px}
  .dg-studio .dg-gallery-stage {height:64dvh}
  .dg-studio .dg-gallery-footer {grid-template-columns:1fr;gap:12px;padding:14px 18px 18px}
  .dg-studio .dg-gallery-navigation {justify-content:space-between}
  .dg-studio #photo-viewer .dg-gallery-footer p {font-size:12px;max-height:3.6em}
}
@media(max-height:500px) and (min-width:621px) {
  .dg-studio .dg-gallery-toolbar {padding-block:6px}
  .dg-studio .dg-gallery-footer {padding-block:10px}
}
@media(prefers-reduced-motion:reduce) {
  .dg-studio .dg-gallery-arrow {transition:none}
}
