* { box-sizing: border-box; }
html { color-scheme: dark; background: #0d0d0d; }
body { width: min(100%, 30rem); margin: 0 auto; min-height: 100svh; container-type: inline-size; display: grid; grid-template-rows: auto minmax(0,1fr) auto; background: #141414; color: #f3f0eb; font-family: system-ui, sans-serif; }
header { background: linear-gradient(110deg,#191919,#101010); padding: .65rem 4.4cqw; font: bold clamp(1.1rem,4.25cqw,1.45rem) Georgia,serif; color: #d8d6d1; }
main { min-width: 0; position: relative; display: grid; align-content: start; background: url(ceiling.webp) center top / 100% auto no-repeat, url(floor.webp) center bottom / 100% auto no-repeat, radial-gradient(ellipse at 51% 19%,#aaa19168,transparent 47%), url(wall.webp) center / 100% 100%; }
.heading { padding: clamp(4.5rem,12.4svh,7.5rem) 0 0 5.7cqw; text-shadow: 0 2px 4px #000; }
h1 { margin: 0; font: 400 clamp(2rem,8cqw,2.6rem)/1.1 Georgia,serif; }
.heading p { margin: .35rem 0 0; font-size: clamp(.875rem,2.8cqw,1.05rem); color: #ddd9d1; }
.gallery { --frame: 76cqw; --margin: 9.4cqw; display: flex; gap: 7.4cqw; align-items: start; overflow: auto hidden; scroll-snap-type: x mandatory; scroll-padding-inline: var(--margin); scrollbar-width: none; margin-top: clamp(1.4rem,6.5svh,4rem); padding: 0 14.6cqw 2rem 9.4cqw; }
.gallery::-webkit-scrollbar { display:none; }
.exhibit { scroll-snap-align: start; flex: 0 0 var(--frame); min-width: 0; display: grid; justify-items: center; margin: 0; }
button { cursor: pointer; color: inherit; font: inherit; }
button:focus-visible, a:focus-visible { outline: 2px solid #fff; outline-offset: 4px; }
.frame { display: block; width: 100%; aspect-ratio: 652 / 661; border: 0; padding: 4.3%; background: url(frame.webp) center / 100% 100%; box-shadow: 0 8px 13px #0009; }
.frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.plaque { margin-top: clamp(.8rem,2.5svh,1.5rem); padding: .45rem .85rem; min-width: 51%; background: repeating-linear-gradient(0deg,#ffffff15 0 1px,transparent 1px 3px), linear-gradient(106deg,#77736e,#d8d3ce 44%,#a39e99); color: #191512; text-align: center; box-shadow: 0 4px 8px #000b; }
.plaque h2 { font: bold clamp(1rem,3.4cqw,1.4rem) Georgia,serif; margin: 0 0 .2rem; }
.plaque p { border-top: 1px solid #4a423b66; margin: 0; padding-top: .2rem; font-size: .875rem; word-break: keep-all; }
footer { position: sticky; bottom: 0; z-index: 1; display: flex; justify-content: space-between; gap: .45rem; align-items: center; padding: .6rem max(.55rem,4cqw) max(.65rem,env(safe-area-inset-bottom)); background: #171717; border-top: 1px solid #333; }
footer button { min-height: 44px; border-radius: .55rem; border: 1px solid #515151; background: #282828; }
.arrow { min-width: 44px; font-size: 1.45rem; }
#details { padding: .25rem clamp(.4rem,3cqw,1rem); white-space: nowrap; }
.pages { display: flex; }
.pages button { display: grid; place-items: center; width: clamp(16px,4cqw,22px); padding: 0; border: none; background: transparent; }
.pages button::after { content: ''; border-radius: 50%; width: 7px; height: 7px; background: #838383; }
.pages button[aria-current=true]::after { background: #fff; }
dialog { position: relative; width: min(90vw,31rem); padding: 2rem; background: #222; color: #f3f0eb; border: 1px solid #777; border-radius: .6rem; }
dialog::backdrop { background: #000a; }
dialog h2 { margin: .3rem 2rem .8rem 0; }
dialog p { line-height: 1.65; }
dialog a { color: inherit; }
#close { position: absolute; top: .55rem; right: .55rem; width: 44px; height: 44px; background: transparent; border: none; font-size: 1.7rem; }

@media (min-width: 481px) {
 body { width: min(30rem, max(22rem, 48svh)); box-shadow: 0 0 3rem #0009; }
}
@media (max-height: 740px) {
 .heading { padding-top: clamp(4rem, 11svh, 5.1rem); }
 .gallery { margin-top: 4svh; }
}
