.gallery-page {
  --gallery-ink: #221119;
  --gallery-gold: #e1bc79;
  --gallery-paper: #f5dfb3;
  background: var(--gallery-ink);
}
.gallery {
  isolation: isolate;
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 320px;
  overflow: hidden;
}
.gallery[data-loading] :is(.gallery-viewport, .gallery-masthead, .gallery-controls, .skip) { visibility: hidden; }
.gallery-preparation {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: .85rem;
  color: var(--gallery-paper);
  background: radial-gradient(ellipse at center, #522a3e, #24111c 75%);
}
.gallery-preparation progress { width: min(190px, 70vw); accent-color: var(--gallery-gold); }
.gallery-viewport {
  position: absolute;
  inset: 0;
  overflow: hidden;
  perspective: 810px;
  background: #371923;
  touch-action: pan-y;
}
.gallery-camera, .gallery-room {
  position: absolute;
  width: 0;
  height: 0;
  transform-style: preserve-3d;
  transform-origin: 0 0;
}
.gallery-camera {
  top: 50%;
  left: 50%;
  will-change: transform;
}
.gallery-surface {
  position: absolute;
  transform-style: preserve-3d;
  transform-origin: 0 0;
  backface-visibility: hidden;
}
.gallery-wall {
  background:
    linear-gradient(90deg, #210c15 0%, #652d36 2%, #3f1924 4%, transparent 8% 92%, #3f1924 96%, #652d36 98%, #210c15),
    radial-gradient(ellipse at 50% 33%, #6f3338, #461d28 63%, #2d131d);
  border-top: 5px solid #5a2d30;
  border-bottom: 15px solid #29131b;
}
.gallery-wall::before, .gallery-wall::after {
  content: "";
  position: absolute;
  right: 0;
  left: 0;
  pointer-events: none;
}
.gallery-wall::before {
  top: 0;
  height: 63px;
  background: linear-gradient(180deg,
    #241017 0 6%, #754143 9% 15%, #512b32 18% 29%, #2a131c 35% 46%,
    #69404a 50% 59%, #46212b 62% 77%, #211018 82% 91%, transparent);
  box-shadow: 0 10px 16px #19091470;
}
.gallery-wall::after {
  bottom: 0;
  height: 87px;
  background:
    linear-gradient(180deg, #241017 0%, #78464b 5%, #4a222b 9%, #2c131c 15%, transparent 24% 84%, #582f37 90%, #1e0d15 98%),
    repeating-linear-gradient(90deg, #371921 0 6px, #5d3138 6px 9px, #3c1b25 10px 96px, #62353c 97px 100px);
  box-shadow: 0 -2px 0 #743e4299, 0 -8px 14px #230f17a3;
}
.gallery-floor {
  border-radius: 50%;
  background-color: #4a342c;
  background-image:
    radial-gradient(ellipse at 50% 27%, #d6a17b4a, #160c19bc 83%),
    repeating-linear-gradient(32deg, transparent 0 19px, #f3e3b515 20px 21px, transparent 22px 44px),
    repeating-linear-gradient(135deg, transparent 0 30px, #130b1680 31px 32px, #a67c487f 33px 34px, transparent 35px 67px),
    repeating-conic-gradient(from 45deg, #725341 0% 25%, #b79270 0% 50%);
  background-size: 100% 100%, 100% 100%, 100% 100%, 102px 102px;
  border: 13px solid #53352b;
  box-shadow: inset 0 0 0 3px #b49363, inset 0 0 0 11px #45272a, inset 0 0 0 14px #89704c;
}
.gallery-ceiling {
  overflow: hidden;
  border-radius: 50%;
  display: grid;
  grid-template: repeat(5, 1fr) / repeat(5, 1fr);
  gap: 9px;
  padding: 22px;
  background: linear-gradient(130deg, #24141d, #684b30 44%, #382027 76%, #21131b);
  box-shadow: inset 0 0 0 4px #b79b60, inset 0 0 0 16px #34211f;
}
.gallery-coffer {
  display: block;
  border: 4px double #b89654;
  box-shadow: inset 0 0 0 3px #36241f, inset 0 0 0 10px #8d6c3e, inset 0 0 0 14px #553d2b, inset 0 0 36px 22px #240e20;
  background:
    radial-gradient(circle at 50% 50%, #f4cf84 0 2px, #725134 3px 5px, #dab56d 6px 8px, #3d2126 9px 13px, #ae8c543e 14px 15px, transparent 16px),
    repeating-conic-gradient(from 15deg at 50% 50%, #d4a75812 0 30deg, #32162662 30deg 49deg),
    radial-gradient(ellipse at 45% 35%, #675037, #332026 73%);
}
.gallery-panel {
  position: absolute;
  inset: 79px 12px 91px;
  border: 2px solid #693740;
  border-radius: 2px;
  background:
    radial-gradient(ellipse at 50% 27%, #bd755258, #8b4b4620 56%, #210c1763 100%),
    linear-gradient(160deg, #5a2732, #462029 65%, #381721);
  box-shadow:
    0 0 0 3px #281118, 0 0 0 6px #512631,
    inset 0 0 0 2px #351520, inset 0 0 0 5px #753b4263,
    inset 0 0 28px 8px #28121b99, 0 13px 19px #180a13a3;
}
.gallery-wall--gap .gallery-panel {
  background: radial-gradient(ellipse at 48% 43%, #652d37, #431b27 82%);
}
.gallery-chandelier {
  position: absolute;
  width: 1px;
  height: 1px;
  transform-style: preserve-3d;
  transform: translate3d(0,-335px,-226px);
  pointer-events: none;
}
.gallery-chandelier i {
  position: absolute;
  top: -49px;
  left: -89px;
  display: block;
  width: 178px;
  height: 101px;
  border-bottom: 7px double #d5a457;
  border-inline: 3px solid #7e552c;
  border-radius: 1% 1% 50% 50%;
  background:
    linear-gradient(90deg, transparent 49%, #e5bb70 49% 50%, #573617 52%, transparent 53%),
    radial-gradient(ellipse at 25% 45%, #ffd37a4d, transparent 43%),
    radial-gradient(ellipse at 75% 45%, #ffd37a4d, transparent 43%);
  transform: rotateY(var(--profile));
}
.gallery-chandelier i::before, .gallery-chandelier i::after {
  content: "";
  position: absolute;
  width: 9px;
  height: 38px;
  top: -11px;
  background: linear-gradient(#fff9c6 18%, #f9bb55 38%, #996b36 41%, #d6ad64 79%, #6a442b);
  border-radius: 70% 70% 9% 9%;
  box-shadow: 0 -7px 18px 5px #facc7288;
}
.gallery-chandelier i::before { left: 6px; }
.gallery-chandelier i::after { right: 6px; }
.gallery-exhibit {
  position: absolute;
  margin: 0;
  transform: translate(-50%,-50%) translateZ(13px);
  text-align: center;
  color: #1f1320;
}
.gallery-sizing-probe { visibility: hidden; pointer-events: none; }
.gallery-frame {
  --frame-sides: 13.3%;
  --frame-ends: 10.5%;
  box-sizing: border-box;
  position: relative;
  isolation: isolate;
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  outline-offset: 4px;
  border-radius: 2px;
  background: #614323;
  box-shadow: 8px 14px 25px #170910bd, 0 0 0 1px #472a1e;
}
button.gallery-frame { cursor: pointer; transition: box-shadow .2s ease; }
.gallery-frame::before {
  content: "";
  position: absolute;
  pointer-events: none;
  inset: 0;
  z-index: 3;
  background: url("../files/d7ba705fc0f0d132/gallery/gilded-frame.webp") center / 100% 100% no-repeat;
}
.gallery-frame::after {
  content: "";
  position: absolute;
  pointer-events: none;
  inset: var(--frame-ends) var(--frame-sides);
  z-index: 2;
  box-shadow: inset 0 0 8px 1px #25151079;
}
.gallery[data-camera="settled"] button.gallery-frame:hover, button.gallery-frame:focus-visible {
  box-shadow: 11px 17px 28px #170810ca, 0 0 0 1px #aa8255;
}
.gallery-exhibit--photo .gallery-frame { pointer-events: none; }
.gallery-exhibit--photo .gallery-frame::after { content: none; }
.gallery-frame img, .gallery-frame video {
  position: absolute;
  display: block;
  inset: var(--frame-ends) var(--frame-sides);
  width: calc(100% - 2 * var(--frame-sides));
  height: calc(100% - 2 * var(--frame-ends));
  object-fit: contain;
  background: radial-gradient(ellipse at center, #291a21, #1f131b 92%);
}
.gallery-frame video { opacity: 0; transition: opacity .35s; }
.gallery-frame video[data-playing] { opacity: 1; }
.gallery-film-badge {
  position: absolute;
  right: calc(var(--frame-sides) + 5px);
  bottom: calc(var(--frame-ends) + 5px);
  z-index: 4;
  padding: 4px 10px;
  color: #fff3da;
  border: 1px solid #e2c98e9c;
  background: #271623e0;
  border-radius: 4px;
  font: 500 .75rem/1.3 var(--body);
}
.gallery-label {
  position: absolute;
  top: calc(100% + 11px);
  left: 50%;
  transform: translateX(-50%);
  width: max(188px, 100%);
  min-height: var(--gallery-plaque-height, 55px);
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 5px 11px 6px;
  background:
    linear-gradient(125deg, #ffffff46, transparent 45%),
    linear-gradient(145deg, #f6e6bc, #dec398 75%);
  border: 3px double #95703b;
  border-radius: 2px;
  box-shadow: 2px 5px 10px #18081182;
  text-align: center;
}
.gallery-label strong { font: 500 1.24rem/.94 var(--display); }
.gallery-label span { font: 500 .64rem/1.21 var(--body); color: #43301f; }
.gallery-vignette {
  position: absolute;
  pointer-events: none;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 46%, transparent 34%, #1b081225 64%, #17091299 110%),
    linear-gradient(#160912c9, #1a0b1531 15%, transparent 25% 78%, #1c0c1700 80%, #180c17cc);
}
.gallery[data-image-only] .gallery-vignette { display: none; }
.gallery-transition {
  position: absolute;
  z-index: 1;
  inset: 0;
  opacity: 0;
  background: #271421;
  pointer-events: none;
}
.gallery-masthead {
  position: absolute;
  z-index: 2;
  inset: env(safe-area-inset-top, 0px) max(15px, var(--gutter), env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px)) auto;
  pointer-events: none;
}
.gallery-header {
  min-height: 67px;
  border-bottom: 1px solid #e4b9835e;
}
.gallery-header :is(a, summary) { pointer-events: auto; }
.gallery-controls {
  position: absolute;
  bottom: max(18px, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  width: max-content;
  max-width: calc(100% - 24px);
  gap: 10px;
  align-items: center;
  justify-content: center;
}
.gallery-guide { display: flex; gap: 7px; min-width: 0; }
.gallery-controls .glass { min-height: 42px; }
.gallery :is(.gallery-header, .gallery-controls) .glass::before {
  background-color: #2c1624dc;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.gallery-step {
  width: 39px;
  flex: 0 0 auto;
  color: #f7d8a1;
  font: 500 1.9rem/.9 var(--display);
  text-align: center;
  padding-inline: 5px;
}
.gallery-auto {
  width: 43px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  color: #f7d8a1;
  padding: 0;
}
.gallery-auto span {
  display: block;
  width: 11px;
  height: 13px;
  border-inline: 3px solid currentColor;
}
.gallery-auto[aria-pressed="false"] span {
  width: 10px;
  height: 12px;
  border: 0;
  background: currentColor;
  clip-path: polygon(0 0,100% 50%,0 100%);
}
.gallery-select { flex: 0 1 auto; width: min(232px, 48vw); }
.gallery-select .scene-picker-trigger { padding-inline: 10px 29px; min-height: 44px; font-size: .82rem; }
.gallery-select .scene-listbox {
  inset-inline: 0 auto;
  width: min(19.5rem, calc(100vw - 24px));
  min-width: 0;
  max-width: none;
  transform: translateX(var(--scene-list-offset, 0px));
}
.gallery-inspect { white-space: nowrap; }
.gallery-inspect[hidden] { display: none; }
.gallery-dialog {
  width: min(820px, calc(100vw - 28px));
  max-height: calc(100svh - 28px);
  overflow: auto;
  padding: clamp(12px, 2.2vw, 25px);
}
.gallery-dialog-content { display: grid; grid-template-columns: auto minmax(10.5rem, 1fr); gap: clamp(15px, 2.7vw, 38px); align-items: center; }
.gallery-detail-media {
  min-height: 0;
  max-height: min(720px, 80svh);
  max-width: min(58vw, 474px);
  justify-self: center;
  border: 5px double #d5ab6a;
  background: #1b0c15;
}
.gallery-detail-media:empty { display: none; }
.gallery-detail-media img, .gallery-detail-media video {
  display: block;
  max-width: 100%;
  max-height: calc(min(720px, 80svh) - 12px);
  width: auto;
  height: auto;
  object-fit: contain;
}
.gallery-detail-copy h2 { margin: 0 0 8px; line-height: 1; }
.gallery-detail-copy p { margin: 0 0 20px; }
.gallery-noscript {
  position: absolute; inset: 35% 12% auto; text-align: center; z-index: 3;
}
.gallery-noscript a { text-decoration: underline; }
.gallery-page[data-gallery-portal] { min-width: 0; overflow: hidden; }
.gallery[data-portal] { min-height: 0; height: 100dvh; }
.gallery[data-portal] .gallery-masthead,
.gallery[data-portal] .gallery-controls,
.gallery[data-portal] .gallery-preparation,
.gallery[data-portal] .skip { display: none; }
.gallery[data-portal] .gallery-vignette {
  background: radial-gradient(ellipse at 50% 48%, transparent 52%, #1b08123d 100%);
}

@media (max-width: 560px) {
  .gallery-header { min-height: 60px; }
  .gallery-header .compact-button { padding-inline: .5rem; font-size: .72rem; }
  .gallery-controls { gap: 7px; width: calc(100% - 24px); }
  .gallery-guide { gap: 5px; }
  .gallery-step { width: 33px; }
  .gallery-auto { width: 36px; }
  .gallery-select .scene-picker-trigger { padding-inline: 7px 22px; }
  .gallery-inspect { flex: 0 0 auto; padding-inline: .5rem; font-size: .76rem; }
  .gallery-dialog-content { grid-template-columns: 1fr; text-align: center; }
  .gallery-detail-media { max-width: 100%; }
  .gallery-detail-media img, .gallery-detail-media video { max-height: min(65svh, 545px); margin-inline: auto; }
}
@media (max-height: 550px) {
  .gallery-header { min-height: 55px; }
}
@media (prefers-reduced-motion: reduce) {
  .gallery-frame, .gallery-frame video { transition: none; }
}
