/* Scroll-driven stills: existing identity and panels remain unchanged. */
html {
  scrollbar-gutter: stable;
}
.has-showcase {
  overflow-x: clip;
}
.has-showcase .header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  background: var(--paper);
}
.has-showcase .gallery-footer {
  position: fixed;
  inset: auto 0 0;
  z-index: 50;
  background: var(--paper);
}
.stage.scroll-showcase {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100svh;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  isolation: isolate;
  touch-action: pan-y pinch-zoom;
}
.stage.scroll-showcase .wheel-card {
  position: absolute;
  top: 50%;
  left: 50%;
  max-width: none;
  max-height: none;
  margin: 0;
  object-fit: contain;
  transform-origin: center;
  pointer-events: none;
  user-select: none;
  animation: none;
  will-change: transform;
}
.gallery-controls {
  position: relative;
}
.gallery-controls .scroll-hint {
  display: none;
  position: absolute;
  bottom: calc(100% + 5px);
  left: 50%;
  transform: translateX(-50%);
  width: 145px;
  color: var(--muted);
  font: 10px/1.4 var(--sans);
  letter-spacing: 0.3px;
  white-space: nowrap;
}
.has-showcase .gallery-controls .scroll-hint {
  display: block;
}
/* Index occupies the content area, not the shared navigation. */
#index-dialog {
  position: fixed;
  inset: 96px 0 0;
  height: calc(100svh - 96px);
  z-index: 60;
  overflow-y: auto;
}
body:has(#index-dialog[open]) .header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 70;
  background: var(--paper);
}
.header #open-index[aria-expanded="true"]::after {
  content: '';
  position: absolute;
  bottom: 8px;
  left: 2px;
  right: 2px;
  height: 1px;
  background: var(--ink);
}
@media (max-width: 560px) {
  #index-dialog { top: 118px; height: calc(100svh - 118px); }
  .has-showcase .gallery-controls .scroll-hint {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .stage.scroll-showcase .wheel-card {
    will-change: auto;
  }
}
