.glass-surface {
  color: var(--ink);
  background: linear-gradient(155deg, #fcfff6ac, #ecf3e782 73%, #fafff4b8);
  border: 1px solid #ffffffbb;
  box-shadow: inset 0 1px 0 #fffdf5d9, inset 0 -1px 1px #45684b21, 0 8px 24px #24392a19;
  -webkit-backdrop-filter: blur(18px) saturate(1.36);
  backdrop-filter: blur(18px) saturate(1.36);
}

.site-header { background: #f8f8efb8; }
.nav-shell { grid-template-columns: 1fr auto; }
.nav-action.glass-surface { display: inline-flex; align-items: center; min-height: 2.7rem; }
.nav-action.glass-surface:hover { background-color: #f4f8e9; }
body { padding-bottom: calc(5.1rem + env(safe-area-inset-bottom, 0px)); }
html { scroll-padding-bottom: 6rem; }
.button:active, .zoom-button:active, .scene-playback:active { transform: translateY(1px) scale(.965); }

.research-results, .nav-action { position: relative; }
.gallery-switcher { position: relative; z-index: 2; }
.pointer-light {
  position: absolute;
  z-index: 1;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(circle var(--light-radius, 13rem) at var(--spot-x, 50%) var(--spot-y, 50%), #fffef6ba, #dff5b653 31%, #bfe79c29 52%, transparent 78%);
  transition: opacity .38s ease;
  mix-blend-mode: screen;
}
.is-pointer-lit > .pointer-light { opacity: .88; }
.glass-surface { --light-radius: 5.25rem; }

.glass-dock {
  position: fixed;
  z-index: 8;
  left: 50%;
  bottom: max(.85rem, env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  isolation: isolate;
  display: flex;
  align-items: center;
  gap: .24rem;
  width: max-content;
  max-width: calc(100% - 1.25rem);
  padding: .35rem;
  border-radius: 1.65rem;
  box-shadow: inset 0 1px 2px #ffffffe6, inset 0 -2px 4px #304d2c26, 0 13px 32px #1f322b31;
}
.glass-dock > a {
  position: relative;
  z-index: 2;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: .32rem;
  min-width: clamp(3.15rem, 13vw, 4.1rem);
  min-height: 3.25rem;
  padding: .3rem .46rem;
  border-radius: 1.15rem;
  color: #23362b;
  font-size: .875rem;
  line-height: 1.1;
  white-space: nowrap;
  transform: translateY(var(--dock-rise, 0px)) scale(var(--dock-scale, 1));
  transition: transform .38s cubic-bezier(.2,.85,.28,1.3), color .22s ease;
}
.glass-dock > a:hover { text-decoration: none; }
.glass-dock > a:active { transform: translateY(-.1rem) scale(.95); }
.dock-lens {
  position: absolute;
  z-index: 0;
  inset: .35rem auto .35rem 0;
  width: var(--dock-width, 0px);
  transform: translateX(var(--dock-left, 0px));
  border: 1px solid #f4ffeba1;
  border-radius: 1.18rem;
  background: radial-gradient(ellipse at 50% 10%, #f9fff2, #d2e8bd);
  box-shadow: inset 0 -1px 2px #587e4136, 0 3px 9px #21352022;
  opacity: var(--dock-on, 0);
  pointer-events: none;
  transition: transform .36s cubic-bezier(.22,.8,.24,1), width .28s ease, opacity .22s ease;
}
.dock-icon { position: relative; display: block; width: 1.05rem; height: .98rem; }
.dock-touch { border: 1.45px solid currentColor; border-radius: 48% 48% 39% 39% / 58% 58% 42% 42%; }
.dock-touch::after { content: ""; position: absolute; top: 39%; left: 25%; width: .16rem; height: .16rem; border-radius: 50%; background: currentColor; box-shadow: .32rem 0 currentColor; }
.dock-frame { border: 1.45px solid currentColor; border-radius: .27rem; overflow: hidden; }
.dock-frame::before { content: ""; position: absolute; top: .13rem; right: .14rem; width: .18rem; height: .18rem; border-radius: 50%; background: currentColor; }
.dock-frame::after { content: ""; position: absolute; inset: .21rem -.12rem -.12rem; transform: rotate(-35deg) translate(-.2rem,.26rem); background: currentColor; opacity: .75; }
.dock-shape::after { content: ""; position: absolute; width: .72rem; height: .72rem; border: 1.45px solid currentColor; border-radius: .19rem; transform: rotate(45deg); left: .16rem; top: .12rem; box-shadow: inset 0 0 0 2px #fbfff6a8; }
.dock-people::before { content: ""; position: absolute; width: .28rem; height: .28rem; left: .23rem; top: .03rem; border-radius: 50%; background: currentColor; box-shadow: .4rem .11rem currentColor; }
.dock-people::after { content: ""; position: absolute; inset: .42rem 0 .03rem; border: 1.45px solid currentColor; border-radius: .5rem .5rem .15rem .15rem; }
.dock-book { border: 1.45px solid currentColor; border-radius: .2rem; }
.dock-book::after { content: ""; position: absolute; width: 1px; inset: 0 auto 0 48%; background: currentColor; }

.zoom-button {
  display: inline-grid;
  place-items: center;
  place-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  font-size: 1.52rem;
  line-height: 1;
  font-weight: 500;
  transition: transform .22s ease, background .22s ease;
}
.zoom-button:hover, .gallery-zoom:hover .zoom-button { background-color: #fbfff4c9; transform: scale(1.075); }
.gallery-image {
  display: block;
  background: radial-gradient(ellipse at 50% 52%, #f9fbf6, #eef2e8 77%);
}
.gallery-zoom { position: relative; display: block; width: 100%; height: 100%; padding: 0; border: 0; border-radius: inherit; background: transparent; cursor: zoom-in; }
.gallery-zoom:focus-visible { outline-offset: -5px; }
.gallery-zoom .zoom-button { position: absolute; z-index: 2; top: .8rem; right: .8rem; }
.gallery-zoom img { padding: 3% 8% 5%; }
.image-viewer {
  width: min(calc(100% - 1.5rem), 70rem);
  max-width: none;
  max-height: calc(100dvh - 1.5rem);
  padding: 0;
  border: 0;
  border-radius: 1.55rem;
  background: transparent;
  color: var(--ink);
}
.image-viewer::backdrop { background: #142119bd; -webkit-backdrop-filter: blur(13px); backdrop-filter: blur(13px); }
.image-viewer[open]::backdrop { animation: viewer-fade .28s ease both; }
.image-viewer[open] .viewer-panel { animation: viewer-expand .38s cubic-bezier(.2,.8,.25,1) both; }
.viewer-panel { position: relative; border-radius: 1.55rem; margin: 0; padding: .65rem; background-color: #e8eee5; }
.viewer-panel figure { text-align: center; }
.viewer-panel img {
  width: 100%;
  height: min(70dvh, 55rem);
  object-fit: contain;
  border-radius: 1rem;
  background: radial-gradient(ellipse, #f4f8ee 12%, #e2eadc 100%);
}
.viewer-panel figcaption { padding: .65rem 1rem .2rem; color: var(--secondary); font-size: .91rem; }
.viewer-close { position: absolute; z-index: 1; top: .95rem; right: .95rem; }
.viewer-steps { display: flex; justify-content: center; gap: .55rem; padding: .3rem 0 .15rem; }
.viewer-steps button { min-height: 2.55rem; padding: .25rem .85rem; border-radius: 2rem; font-size: .875rem; font-weight: 650; }
.viewer-steps button:hover { background-color: #fff9; }
@keyframes viewer-expand {
  from { opacity: .42; transform: translate(var(--zoom-from-x, 0px), var(--zoom-from-y, 0px)) scale(.86); }
}
@keyframes viewer-fade { from { opacity: 0; } }
html:has(.image-viewer[open]) { overflow: hidden; }

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass-surface { background-color: #eaf1e3; }
}
@media (prefers-reduced-transparency: reduce) {
  .glass-surface, .site-header { background: #edf3e8; -webkit-backdrop-filter: none; backdrop-filter: none; }
}
@media (prefers-reduced-motion: reduce) {
  .pointer-light { display: none; }
  .glass-dock > a { transform: none; }
}
