/* The gallery belongs only to the sunlight route. */
.dome-gallery{--gallery-gap:24px;--slide-width:min(84vw,1100px);margin:44px 0 0;width:calc(100vw - 2 * clamp(20px,4vw,80px));margin-left:calc(50% - 50vw + clamp(20px,4vw,80px));position:relative;overflow:visible}
.dome-gallery-stage{padding:24px 0;display:flex;flex-direction:column;justify-content:center;gap:20px;background:var(--paper)}
.dome-gallery-heading,.dome-gallery-footer{display:flex;align-items:center;gap:20px;justify-content:space-between}
.dome-gallery-heading p{margin:0;font-family:var(--serif);font-size:1.35rem;line-height:1.3}
.dome-gallery-heading p span{display:inline-block;margin-left:16px;font-family:var(--sans);font-size:.75rem;color:var(--muted);font-weight:500}
.dome-gallery-heading>a{font-size:.75rem;min-height:44px;display:flex;align-items:center;gap:12px;text-decoration:underline;text-underline-offset:5px}
.dome-gallery-window{overflow-x:auto;overflow-y:hidden;scroll-snap-type:x mandatory;scrollbar-width:thin;scrollbar-color:var(--rust) transparent;padding:5px;margin:-5px}
.dome-gallery-track{display:flex;gap:var(--gallery-gap);width:max-content}
.dome-slide{margin:0;flex:0 0 var(--slide-width);width:var(--slide-width);scroll-snap-align:start;scroll-snap-stop:always}
.dome-photo{display:block;position:relative;aspect-ratio:16/9;background:#ddd4c5;border-radius:12px;overflow:hidden;cursor:zoom-in}
.dome-photo img{display:block;width:100%;height:100%;object-fit:contain}
.dome-expand{position:absolute;right:16px;bottom:16px;display:grid;place-items:center;width:44px;height:44px;background:var(--paper);color:var(--ink);border-radius:50%;font-size:1.4rem;transition:transform .2s ease-out}
.dome-photo:hover .dome-expand{transform:scale(1.08)}
.dome-slide figcaption{display:flex;justify-content:space-between;gap:14px;padding-top:12px;font-size:.75rem;line-height:1.4;font-weight:500}
.dome-slide figcaption>span:last-child{color:var(--muted)}
.dome-gallery-footer{min-height:48px}
.dome-gallery-hint{font-size:.75rem;font-weight:500;margin:0;color:var(--muted)}
.dome-gallery-progress{height:2px;background:#cfc5b4;flex:1;max-width:280px;overflow:hidden}
.dome-gallery-progress>span{display:block;width:100%;height:100%;background:var(--rust);transform:scaleX(var(--gallery-progress,.25));transform-origin:left}
.dome-gallery-count{font-size:.75rem;font-variant-numeric:tabular-nums;white-space:nowrap}
.dome-gallery-buttons{display:flex;gap:8px}
.dome-gallery-buttons[hidden]{display:none}
.dome-gallery-buttons button,.dome-lightbox-nav button{width:46px;height:46px;border:1px solid currentColor;background:transparent;border-radius:50%;color:inherit;font-size:1.3rem;cursor:pointer}
.dome-gallery-buttons button:hover:not(:disabled){background:#e8decd}
.dome-gallery button:disabled,.dome-lightbox button:disabled{opacity:.3;cursor:default}
.dome-gallery a:focus-visible,.dome-gallery button:focus-visible{outline:3px solid var(--rust);outline-offset:3px}
.dome-gallery.is-pinned{--slide-width:min(82vw,calc((100svh - 210px) * 16 / 9),1400px);height:var(--gallery-height)}
.dome-gallery.is-pinned .dome-gallery-stage{position:sticky;top:0;height:100svh;box-sizing:border-box}
.dome-gallery.is-pinned .dome-gallery-window{overflow:clip;scroll-snap-type:none}
.dome-gallery.is-pinned .dome-gallery-track{will-change:transform}
#dome-materials{scroll-margin-top:40px}
.dome-photo.is-unavailable:before{content:'Image unavailable';position:absolute;inset:0;display:grid;place-items:center;font-size:1rem}
.dome-photo.is-unavailable img{visibility:hidden}
html.dome-viewer-open{overflow:hidden;scrollbar-gutter:stable}
dialog.dome-lightbox{position:fixed;inset:0;margin:0;width:100vw;max-width:none;height:100dvh;max-height:none;box-sizing:border-box;padding:76px clamp(18px,4vw,70px) 24px;border:0;border-radius:0;background:#181d18f5;color:#fff6e6;overflow:hidden}
.dome-lightbox::backdrop{background:#181d18}
.dome-lightbox[open]{display:flex;flex-direction:column;gap:20px;animation:dome-viewer-in .2s ease-out}
.dome-lightbox-close{position:absolute;top:18px;right:clamp(18px,4vw,70px);display:flex;align-items:center;gap:20px;min-height:44px;padding:0 16px;border:1px solid #fff6e655;border-radius:10px;background:transparent;color:inherit;font:inherit;font-size:.85rem;cursor:pointer}
.dome-lightbox-close span{font-size:1.65rem;line-height:1}
.dome-lightbox-image{flex:1;min-height:0;display:grid;place-items:center;position:relative}
.dome-lightbox-image img{width:100%;height:100%;min-height:0;position:absolute;inset:0;object-fit:contain;border-radius:4px}
.dome-lightbox-error{font-size:1rem;text-align:center}
.dome-lightbox-error[hidden]{display:none}
.dome-lightbox-footer{display:flex;justify-content:space-between;align-items:center;gap:24px;flex-shrink:0}
dialog.dome-lightbox .dome-lightbox-caption{margin:0;font-size:.875rem;line-height:1.5}
.dome-lightbox-nav{display:flex;align-items:center;gap:20px;flex-shrink:0}
.dome-lightbox-count{font-size:.8rem;font-variant-numeric:tabular-nums}
.dome-lightbox button:hover:not(:disabled){background:#fff6e620}
.dome-lightbox button:focus-visible{outline:3px solid #f5d793;outline-offset:4px}
@keyframes dome-viewer-in{from{opacity:0}to{opacity:1}}
@media(max-width:700px){
  .dome-gallery{--gallery-gap:16px;margin-top:24px}
  .dome-gallery-stage{gap:14px;padding:16px 0}
  .dome-gallery-heading p span{display:block;margin:5px 0 0;font-size:.65rem}
  .dome-gallery-heading>a{font-size:.7rem;gap:6px}
  .dome-gallery-hint{font-size:.7rem;max-width:160px}
  .dome-gallery-footer{flex-wrap:wrap;gap:10px}
  .dome-gallery-progress{order:4;flex-basis:100%;max-width:none}
  .dome-gallery-count{margin-left:auto}
  .dome-slide figcaption{font-size:.65rem;gap:8px}
  .dome-expand{right:10px;bottom:10px;width:38px;height:38px}
  .dome-lightbox-footer{flex-direction:column;gap:16px;text-align:center}
  dialog.dome-lightbox .dome-lightbox-caption{font-size:.8rem}
}
@media(prefers-reduced-motion:reduce){.dome-lightbox[open]{animation:none}.dome-expand{transition:none}}
body.motion-paused .dome-lightbox[open]{animation:none}
/* Material descriptions have plain headings, without a numbering column. */
@media(max-width:800px){.material-notes article{display:block}}

/* Clip, rather than create a hidden scroll container, to prevent trackpad latching. */
.dome-gallery.is-pinned .dome-photo{overflow:clip}

/* Button-operated gallery keeps normal vertical scrolling at every screen size. */
.dome-gallery[data-navigation="buttons"]{--slide-width:100%;width:100%;margin-left:0}
.dome-gallery[data-navigation="buttons"] .dome-gallery-window{overflow:clip;scroll-snap-type:none}
.dome-gallery[data-navigation="buttons"] .dome-gallery-track{width:100%;transition:transform .35s ease}
.dome-gallery[data-navigation="buttons"] .dome-slide{flex:0 0 100%;width:100%}
.dome-gallery[data-navigation="buttons"] .dome-photo{width:100%;aspect-ratio:16/9}
@media(prefers-reduced-motion:reduce){.dome-gallery[data-navigation="buttons"] .dome-gallery-track{transition:none}}
