/* Larger examples and consistent touch/keyboard controls, scoped to the homepage. */
.gallery-stage { position:relative; aspect-ratio:4/3; }
.gallery-ready .gallery-zoom { position:absolute; inset:0; z-index:1; display:flex; align-items:flex-end; justify-content:flex-end; width:100%; padding:14px; border:0; background:linear-gradient(transparent 65%, #04101dcc); color:#fff; font-family:inherit; font-weight:600; font-size:12px; line-height:1.4; cursor:zoom-in; text-shadow:0 1px 4px #000; }
.gallery-ready .gallery-zoom:hover { background:linear-gradient(transparent 45%, #04101de6); }
.gallery-ready .gallery-zoom:focus-visible { outline:3px solid #90d8ff; outline-offset:-5px; }
.gallery-ready figcaption { display:grid; grid-template-columns:1fr; gap:6px; padding:12px; }
.gallery-caption { display:block; min-height:2.8em; line-height:1.4; }
.gallery-ready .gallery-controls { display:flex; align-items:center; justify-content:center; width:100%; gap:2px; border-top:1px solid var(--line); padding-top:6px; }
.gallery-ready .gallery-controls button { min-width:44px; width:44px; height:44px; border:1px solid transparent; border-radius:9px; color:var(--text); font-size:15px; }
.gallery-ready .gallery-controls button span { width:7px; height:7px; }
.gallery-ready .gallery-controls button[aria-pressed="true"] { border-color:var(--line); background:#80b4ff18; }
.gallery-ready .gallery-controls button:focus-visible { outline:2px solid var(--dn-blue); outline-offset:-2px; }
.gallery-ready .gallery-controls .gallery-pause { margin-left:auto; background:var(--dn-subtle); }
body.gallery-open { overflow:hidden; }
.example-viewer { padding:0; border:1px solid #b2d5ff33; border-radius:20px; width:min(1120px, calc(100vw - 32px)); max-width:none; max-height:calc(100dvh - 32px); color:#edf5ff; background:#0b1727; box-shadow:0 30px 90px #0009; }
.example-viewer::backdrop { background:#030a17db; backdrop-filter:blur(8px); }
.viewer-shell { display:flex; flex-direction:column; max-height:calc(100dvh - 34px); }
.viewer-header { display:flex; align-items:center; justify-content:space-between; gap:18px; padding:16px 22px; border-bottom:1px solid #b2d5ff26; }
.viewer-kicker { margin:0 0 5px; font-size:11px; color:#a6c5e8; }
.viewer-header h2 { margin:0; font-size:clamp(16px,2vw,22px); line-height:1.3; }
.viewer-tools { display:flex; gap:8px; flex:none; }
.example-viewer button { display:grid; place-items:center; width:44px; height:44px; flex:none; padding:0; border:1px solid #b2d5ff40; border-radius:10px; background:#b2d5ff0c; color:#edf5ff; font-size:22px; cursor:pointer; }
.example-viewer button:hover { background:#b2d5ff26; }
.example-viewer button:disabled { opacity:.3; cursor:default; }
.example-viewer :is(button,a):focus-visible { outline:3px solid #90d8ff; outline-offset:3px; }
.viewer-image-wrap { min-height:0; overflow:auto; background:#050e1b; }
.viewer-image { display:block; width:100%; height:auto; max-height:calc(100dvh - 215px); object-fit:contain; }
.is-magnified .viewer-image { width:auto; max-width:none; max-height:none; }
.is-magnified .viewer-image-wrap { height:calc(100dvh - 215px); overscroll-behavior:contain; }
.viewer-footer { display:flex; align-items:center; justify-content:space-between; gap:14px; flex-wrap:wrap; padding:14px 22px; border-top:1px solid #b2d5ff26; }
.viewer-navigation { display:flex; align-items:center; gap:18px; }
.viewer-count { min-width:42px; text-align:center; font-size:14px; color:#b8cde5; }
.viewer-detail { display:inline-flex; align-items:center; justify-content:center; min-height:44px; padding:8px 16px; border-radius:9px; background:#b9e4ff; color:#0b2340; font-size:14px; font-weight:600; }
.viewer-status { margin:0; padding:0 22px 12px; color:#ffcfa3; font-size:13px; }
.viewer-status:empty { display:none; }
@media (max-width:560px) {
  .example-viewer { width:calc(100vw - 16px); max-height:calc(100dvh - 16px); border-radius:14px; }
  .viewer-shell { max-height:calc(100dvh - 18px); }
  .viewer-header, .viewer-footer { padding:12px; }
  .viewer-header { gap:10px; }
  .viewer-footer { justify-content:center; }
  .viewer-image { max-height:calc(100dvh - 250px); }
  .viewer-detail { width:100%; }
  .gallery-ready .gallery-controls { gap:0; }
}
@media (prefers-reduced-motion:reduce) { .gallery-ready img { transition:none; } }
@media print { .example-viewer, .gallery-controls, .gallery-zoom { display:none !important; } }
