/* Photo-gallery styles are isolated from the shared editorial photo frames. */
body.spac27 .spac27-gallery-intro{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:24px;margin-bottom:24px}
body.spac27 .spac27-gallery-summary{max-width:70ch;margin:0 0 36px;color:#4d5966;font:400 17px/1.6 'SPAC DM Sans',sans-serif}
body.spac27 .spac27-gallery-grid{columns:3;column-gap:20px}
body.spac27 .spac27-gallery-item{display:inline-block;vertical-align:top;width:100%;margin:0 0 20px;break-inside:avoid;border-radius:14px;overflow:hidden;background:#e8ebf0;line-height:0;cursor:zoom-in}
body.spac27 .spac27-gallery-item img{display:block;width:100%;height:auto;max-height:none;object-fit:contain;border-radius:inherit}
body.spac27 .spac27-gallery-item:focus-visible{outline:3px solid var(--orange,#f0850a);outline-offset:4px}
body.spac27 .spac27-gallery-item:hover{filter:brightness(1.06)}

#spac27-gallery-dialog{width:min(1440px,calc(100vw - 32px));height:min(1000px,calc(100vh - 32px));height:min(1000px,calc(100dvh - 32px));max-width:none;max-height:none;margin:auto;padding:0;border:1px solid #ffffff40;border-radius:14px;background:#0a122a;color:#fff;overflow:hidden;box-shadow:0 24px 80px #0008;overscroll-behavior:contain}
#spac27-gallery-dialog[open]{display:grid;grid-template-rows:auto minmax(0,1fr) auto}
#spac27-gallery-dialog::backdrop{background:#050912e8}
#spac27-gallery-dialog .spac27-gallery-dialog-toolbar{display:flex;align-items:center;gap:12px;min-width:0;padding:12px 16px}
#spac27-gallery-counter{margin:0 auto 0 0;font:400 14px/1.45 'SPAC DM Sans',sans-serif;color:#fff;white-space:nowrap}
#spac27-gallery-original{display:inline-flex;align-items:center;justify-content:center;min-height:44px;max-width:190px;padding:8px;border-radius:6px;color:#fff;font:700 14px/1.4 'SPAC DM Sans',sans-serif;text-align:center;text-decoration:underline;text-underline-offset:4px;overflow-wrap:anywhere}
#spac27-gallery-dialog button{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:44px;min-width:44px;height:44px;min-height:44px;margin:0;padding:8px;border:1px solid #ffffff55;border-radius:6px;background:#ffffff0d;color:#fff;font:700 22px/1 'SPAC DM Sans',sans-serif;cursor:pointer;touch-action:manipulation}
#spac27-gallery-dialog button:hover{background:#24324d}
#spac27-gallery-dialog button:disabled{opacity:.4;cursor:default}
#spac27-gallery-dialog :is(button,a):focus-visible{outline:3px solid #f5b44d;outline-offset:3px}
#spac27-gallery-dialog .spac27-gallery-dialog-stage{position:relative;display:grid;place-items:center;min-width:0;min-height:0;margin:0;padding:0 16px;overflow:hidden}
#spac27-gallery-image{position:absolute;inset:0;display:block;box-sizing:border-box;width:100%;height:100%;min-width:0;min-height:0;max-width:100%;max-height:100%;padding-inline:16px;object-fit:contain}
#spac27-gallery-image[hidden],#spac27-gallery-dialog .spac27-gallery-status[hidden]{display:none}
#spac27-gallery-dialog .spac27-gallery-status{position:absolute;inset:auto 0;margin:0;padding:24px;text-align:center;font:400 16px/1.5 'SPAC DM Sans',sans-serif;color:#fff}
#spac27-gallery-dialog .spac27-gallery-dialog-footer{display:grid;grid-template-columns:44px minmax(0,1fr) 44px;align-items:center;gap:16px;min-width:0;padding:12px 16px}
#spac27-gallery-caption{max-height:6em;margin:0;overflow:auto;overscroll-behavior:contain;text-align:center;color:#fff;font:400 15px/1.45 'SPAC DM Sans',sans-serif}

@media(max-width:900px){
  body.spac27 .spac27-gallery-grid{columns:2;column-gap:16px}
  body.spac27 .spac27-gallery-item{margin-bottom:16px}
}
@media(max-width:700px){
  body.spac27 .spac27-gallery-intro{align-items:flex-start;gap:20px}
  body.spac27 .spac27-gallery-summary{margin-bottom:28px}
  body.spac27 .spac27-gallery-grid{column-gap:12px}
  body.spac27 .spac27-gallery-item{margin-bottom:12px}
  #spac27-gallery-dialog{width:calc(100vw - 16px);height:calc(100vh - 16px);height:calc(100dvh - 16px);border-radius:10px}
  #spac27-gallery-dialog .spac27-gallery-dialog-toolbar{gap:8px;padding:8px 10px}
  #spac27-gallery-original{max-width:145px;padding:8px 4px;font-size:13px}
  #spac27-gallery-counter{font-size:13px}
  #spac27-gallery-dialog .spac27-gallery-dialog-stage{padding-inline:10px}
  #spac27-gallery-image{padding-inline:10px}
  #spac27-gallery-dialog .spac27-gallery-dialog-footer{gap:12px;padding:10px}
  #spac27-gallery-caption{font-size:14px}
}
@media(max-width:359px){
  body.spac27 .spac27-gallery-grid{columns:1}
}
@media print{
  #spac27-gallery-dialog{display:none!important}
  body.spac27 .spac27-gallery-item{filter:none}
}
