/* Image frames and source captions retain their original placement. */
.photo-open{position:relative;display:block;width:100%;min-width:0;padding:0;border:0;border-radius:0;background:transparent;color:var(--ink,#15171b);font:inherit;text-align:left;cursor:zoom-in}
.photo-open:focus-visible{outline:3px solid var(--blue,#2147cf);outline-offset:5px}
.photo-offset>.photo-open{width:fit-content;max-width:100%}
.photo-offset>.photo-open img{width:auto;max-width:100%}
.photo-open-hint{position:absolute;right:12px;bottom:12px;display:flex;align-items:center;gap:8px;background:#f9fafbf2;color:#15171b;padding:10px 12px;font:500 13px/1.2 Manrope,Arial,sans-serif;box-shadow:0 1px 5px #15171b12;pointer-events:none}
.photo-open-hint svg,.photo-viewer svg{flex:none;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
/* The original mobile duet positions the image link separately from its caption. */
@media(max-width:700px){.photo-offset>.photo-open{grid-column:1;grid-row:1/3}}
@media(max-width:420px){.photo-offset>.photo-open{grid-row:auto}}
.photo-viewer{position:fixed;inset:0;width:100%;height:100%;height:100dvh;max-width:none;max-height:none;margin:0;border:0;padding:0;background:#14171b;color:#f9fafb;font:500 15px/1.5 Manrope,Arial,sans-serif;overflow:hidden;overscroll-behavior:contain}
.photo-viewer[open]{display:grid;grid-template-rows:auto minmax(0,1fr) auto;gap:0}
.photo-viewer::backdrop{background:#14171b}
.photo-viewer [hidden]{display:none!important}
.photo-viewer-bar{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px max(20px,env(safe-area-inset-right)) 12px max(20px,env(safe-area-inset-left));border-bottom:1px solid #ffffff2b}
.photo-viewer-heading{display:flex;align-items:center;gap:18px;flex-wrap:wrap;line-height:1.3}
.photo-viewer-count{font-size:14px;font-variant-numeric:tabular-nums;color:#cdd1da;white-space:nowrap}
.photo-viewer-tools,.photo-viewer-navigation{display:flex;align-items:center;gap:12px}
.photo-viewer button{display:flex;align-items:center;justify-content:center;gap:8px;min-width:44px;min-height:44px;padding:10px 14px;border:1px solid #ffffff55;border-radius:0;color:inherit;background:transparent;font:inherit;font-size:14px;line-height:1.3;cursor:pointer;white-space:nowrap}
.photo-viewer button:hover{background:#ffffff15}
.photo-viewer button:disabled{opacity:.45;cursor:default}
.photo-viewer :is(button,a):focus-visible{outline:3px solid #fff;outline-offset:3px}
.photo-viewer-stage{position:relative;min-width:0;min-height:0;overflow:auto;overscroll-behavior:contain;touch-action:pan-y pinch-zoom;scrollbar-width:thin;scrollbar-color:#8a8e96 #14171b;cursor:default}
.photo-viewer-stage:focus-visible{outline:2px solid #fff;outline-offset:-4px}
.photo-viewer-canvas{min-width:100%;min-height:100%;display:grid;place-items:center}
.photo-viewer .photo-viewer-image{display:block;max-width:none;max-height:none;width:auto;height:auto;object-fit:contain;user-select:none;-webkit-user-drag:none}
.photo-viewer-message{position:absolute;inset:0;display:grid;place-items:center;text-align:center;padding:24px;margin:0;pointer-events:none;font-size:16px}
.photo-viewer-bottom{display:flex;justify-content:space-between;align-items:center;gap:24px;padding:14px max(20px,env(safe-area-inset-right)) max(14px,env(safe-area-inset-bottom)) max(20px,env(safe-area-inset-left));border-top:1px solid #ffffff2b}
.photo-viewer-description{min-width:0;max-width:65ch}
.photo-viewer-caption{margin:0;font-size:15px;line-height:1.5;overflow-wrap:anywhere}
.photo-viewer-links{display:flex;gap:6px 20px;flex-wrap:wrap;margin-top:2px}
.photo-viewer-links a{display:inline-flex;align-items:center;min-height:44px;color:#d5ddff;font-size:14px;line-height:1.4;text-decoration:underline;text-underline-offset:4px;overflow-wrap:anywhere}
.photo-viewer.is-zoomed .photo-viewer-stage{touch-action:pan-x pan-y pinch-zoom;cursor:move}
@media(max-width:700px){
  .photo-viewer-bar{padding:8px 12px;gap:8px}
  .photo-viewer-heading{gap:2px;flex-direction:column;align-items:flex-start;font-size:14px}
  .photo-viewer-tools{gap:6px}
  .photo-viewer button{font-size:13px;padding:10px}
  .photo-viewer-bottom{display:grid;grid-template-columns:1fr;gap:8px;padding:10px 16px max(12px,env(safe-area-inset-bottom))}
  .photo-viewer-caption{font-size:14px}
  .photo-viewer-links{gap:4px 16px}
  .photo-viewer-links a{font-size:13px}
  .photo-viewer-navigation{justify-content:space-between;gap:14px}
  .photo-viewer-navigation button{flex:1}
}
@media(max-height:520px) and (min-width:600px){
  .photo-viewer-bar{padding-block:4px}
  .photo-viewer-bottom{padding-block:4px;gap:12px;align-items:center}
  .photo-viewer-description{display:flex;align-items:center;gap:16px;max-width:70%;font-size:13px}
  .photo-viewer-caption{font-size:13px}
  .photo-viewer-links{gap:12px;flex-shrink:0}
  .photo-viewer-links a{font-size:12px}
  .photo-viewer-navigation{gap:6px}
  .photo-viewer button{padding-inline:10px;font-size:12px}
}
@media(prefers-reduced-motion:reduce){.photo-viewer *{scroll-behavior:auto!important;transition:none!important}}
