:root {
  color-scheme: dark;
  --ivory: #eee7db;
  --muted: #9f978b;
  --gold: #c9a569;
  --gold-light: #ead09b;
  --night: #070810;
  --panel: #0d1018;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-mass: cubic-bezier(.65, 0, .35, 1);
  --serif: "Shippori Mincho", "Noto Serif TC", serif;
  --sans: "Manrope", sans-serif;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
html { background: var(--night); }
body { margin: 0; overflow: hidden; background: var(--night); color: var(--ivory); font-family: var(--sans); }
button, input { font: inherit; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; z-index: 100; top: 10px; left: 10px; padding: 10px 14px; background: var(--ivory); color: var(--night); transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); }

.museum-header {
  position: fixed; z-index: 20; inset: 0 0 auto; height: 76px; padding: 0 clamp(22px, 4vw, 66px);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  border-bottom: 1px solid rgba(222,190,132,.12);
  background: linear-gradient(180deg, rgba(3,4,9,.82), rgba(3,4,9,.18) 72%, transparent);
  transition: opacity .8s var(--ease-out), transform .8s var(--ease-out);
}
.brand { display: inline-flex; align-items: center; gap: 12px; width: max-content; font-family: var(--serif); font-size: 12px; letter-spacing: .1em; }
.brand-sigil { display: grid; place-items: center; width: 28px; aspect-ratio: 1; border: 1px solid rgba(201,165,105,.7); border-radius: 50%; color: var(--gold); font-size: 10px; }
.hall-number { margin: 0; color: var(--gold-light); font-size: 9px; letter-spacing: .28em; }
.hall-number span { color: rgba(238,231,219,.36); }
.index-trigger { justify-self: end; min-height: 44px; padding: 12px 0; border: 0; border-bottom: 1px solid rgba(201,165,105,.35); background: transparent; cursor: pointer; font-size: 9px; letter-spacing: .22em; }
.index-trigger span { margin-left: 12px; color: var(--gold); }
.header-left { display: inline-flex; align-items: center; gap: clamp(14px, 2.4vw, 30px); }
.exit-modern { display: inline-flex; align-items: center; gap: 7px; padding-block: 9px; color: rgba(238,231,219,.6); font-size: 10px; letter-spacing: .2em; border-bottom: 1px solid rgba(201,165,105,.3); transition: color .45s var(--ease-out), border-color .45s var(--ease-out); }
.exit-modern:hover, .exit-modern:focus-visible { color: var(--ivory); border-color: rgba(201,165,105,.72); }
.exit-arrow { color: var(--gold); }

.grand-hall { --look-x: 0px; --look-y: 0px; position: relative; min-height: 100dvh; overflow: hidden; isolation: isolate; perspective: 1400px; }
.hall-background { position: absolute; z-index: -5; inset: -3%; background: url("library-assets/hall.jpg") center / cover no-repeat; filter: saturate(.72) brightness(.66) contrast(1.08); transform: translate3d(calc(var(--look-x) * -.5), calc(var(--look-y) * -.5), -20px) scale(1.055); transition: transform 1.7s var(--ease-out); animation: hall-breathe 18s var(--ease-mass) infinite alternate; }
.hall-depth { position: absolute; z-index: -4; inset: 0; background: radial-gradient(ellipse at 50% 46%, rgba(33,44,83,.05) 0 18%, rgba(3,4,10,.15) 48%, rgba(2,3,8,.78) 100%), linear-gradient(180deg, rgba(2,3,8,.08), rgba(2,3,8,.02) 55%, rgba(2,3,8,.72)); }
.hall-depth::after { content: ""; position: absolute; inset: 0; opacity: .12; mix-blend-mode: soft-light; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='150' height='150'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.7'/%3E%3C/svg%3E"); }
.light-shaft { position: absolute; z-index: -2; left: 50%; top: -15%; width: 28vw; height: 105vh; transform: translateX(-50%) perspective(500px) rotateX(-6deg); clip-path: polygon(42% 0, 58% 0, 100% 100%, 0 100%); background: linear-gradient(180deg, rgba(238,211,158,.22), rgba(238,211,158,.055) 55%, transparent); filter: blur(7px); mix-blend-mode: screen; opacity: .55; }

.dust-field { position: absolute; z-index: 1; inset: 0; pointer-events: none; overflow: hidden; }
.dust-field i { --size: 2px; --x: 50%; --delay: 0s; --duration: 12s; position: absolute; left: var(--x); bottom: 7%; width: var(--size); height: var(--size); border-radius: 50%; background: #f0ce8d; box-shadow: 0 0 8px rgba(234,190,113,.8); opacity: 0; animation: dust-drift var(--duration) var(--delay) cubic-bezier(.37,0,.63,1) infinite; }
.dust-field i:nth-child(1) { --x: 31%; --delay: -2s; --duration: 15s; }
.dust-field i:nth-child(2) { --x: 39%; --delay: -9s; --duration: 13s; --size: 1px; }
.dust-field i:nth-child(3) { --x: 46%; --delay: -5s; --duration: 18s; }
.dust-field i:nth-child(4) { --x: 52%; --delay: -12s; --duration: 16s; --size: 1px; }
.dust-field i:nth-child(5) { --x: 58%; --delay: -3s; --duration: 14s; }
.dust-field i:nth-child(6) { --x: 67%; --delay: -7s; --duration: 19s; --size: 1px; }
.dust-field i:nth-child(7) { --x: 72%; --delay: -11s; --duration: 17s; }
.dust-field i:nth-child(8) { --x: 35%; --delay: -14s; --duration: 21s; --size: 1px; }
.dust-field i:nth-child(9) { --x: 62%; --delay: -16s; --duration: 20s; }
.dust-field i:nth-child(10) { --x: 44%; --delay: -7s; --duration: 22s; --size: 1px; }
.dust-field i:nth-child(11) { --x: 55%; --delay: -1s; --duration: 18s; }
.dust-field i:nth-child(12) { --x: 76%; --delay: -8s; --duration: 23s; --size: 1px; }

.hall-intro { position: absolute; z-index: 3; left: clamp(26px, 5vw, 82px); top: 17%; max-width: 330px; transform: translate3d(calc(var(--look-x) * .18), calc(var(--look-y) * .18), 20px); transition: transform 1.4s var(--ease-out); }
.hall-kicker { display: flex; align-items: center; gap: 12px; margin: 0 0 18px; color: var(--gold-light); font-size: 9px; letter-spacing: .22em; text-transform: uppercase; }
.hall-kicker span { width: 25px; height: 1px; background: var(--gold); }
.hall-intro h1 { margin: 0; font-family: var(--serif); font-size: clamp(32px, 3.2vw, 50px); font-weight: 400; line-height: 1.12; letter-spacing: .12em; text-shadow: 0 10px 34px rgba(0,0,0,.65); text-wrap: balance; }
.hall-intro > p:last-child { margin: 19px 0 0; color: rgba(238,231,219,.55); font-family: var(--serif); font-size: 11px; line-height: 1.9; letter-spacing: .08em; }

.room-doors { position: absolute; z-index: 5; inset: 0; pointer-events: none; scrollbar-width: none; }
.room-doors::-webkit-scrollbar { display: none; }
.room-door { position: absolute; width: clamp(156px, 14vw, 215px); min-height: 58px; padding: 11px 0; display: grid; grid-template-columns: 24px 1fr auto 18px; align-items: center; gap: 9px; border: 0; border-top: 1px solid rgba(218,183,122,.28); border-bottom: 1px solid rgba(218,183,122,.1); background: linear-gradient(90deg, rgba(6,8,15,.78), rgba(6,8,15,.25)); text-align: left; cursor: pointer; pointer-events: auto; backdrop-filter: blur(4px); transition: transform .65s var(--ease-out), border-color .65s, background .65s; }
.room-1 { left: 4.5%; top: 51%; }
.room-2 { left: 6.5%; top: 66%; }
.room-3 { right: 4.5%; top: 51%; }
.room-4 { right: 6.5%; top: 66%; }
.room-number { color: rgba(238,231,219,.42); font-size: 9px; letter-spacing: .12em; }
.door-line { width: 1px; height: 25px; background: linear-gradient(var(--gold), transparent); }
.room-door strong { display: block; font-family: var(--serif); font-size: 11px; font-weight: 500; letter-spacing: .09em; }
.room-door small { display: block; margin-top: 5px; color: rgba(238,231,219,.58); font-size: 9px; letter-spacing: .1em; }
.room-door i { color: var(--gold); font-size: 11px; font-style: normal; opacity: .5; transition: transform .55s var(--ease-out), opacity .55s; }
.room-reveal { opacity: 0; transform: translateY(4px); transition: opacity .55s var(--ease-out), transform .55s var(--ease-out); }
.room-door:hover .room-reveal,
.room-door:focus-visible .room-reveal { opacity: 1; transform: translateY(0); }
.room-door:hover { transform: translateX(6px); border-color: rgba(225,190,128,.55); background: linear-gradient(90deg, rgba(12,14,23,.9), rgba(16,15,17,.4)); }
.room-3:hover, .room-4:hover { transform: translateX(-6px); }
.room-door:hover i { transform: translate(3px,-3px); opacity: 1; }

.featured-exhibit { position: absolute; z-index: 4; left: 50%; top: 49%; width: clamp(310px, 35vw, 540px); aspect-ratio: 1.25; opacity: 1; transform: translate3d(calc(-50% + var(--look-x) * .45), calc(-50% + var(--look-y) * .3), 60px); transition: opacity 1.05s var(--ease-out), transform 1.2s var(--ease-out); }
.celestial-mechanism { position: absolute; inset: -26%; pointer-events: none; transform-style: preserve-3d; }
.orrery-ring { position: absolute; inset: 16%; border: 1px solid rgba(221,184,119,.34); border-radius: 50%; filter: drop-shadow(0 0 8px rgba(204,158,85,.15)); animation: orrery-turn 30s cubic-bezier(.45,.05,.55,.95) infinite alternate; }
.orrery-ring::before, .orrery-ring::after { content: "✦"; position: absolute; top: 48%; color: var(--gold-light); font-size: 8px; }
.orrery-ring::before { left: -4px; }
.orrery-ring::after { right: -4px; }
.ring-a { transform: rotateX(69deg) rotateZ(12deg); }
.ring-b { inset: 24%; border-style: dashed; opacity: .68; animation-duration: 21s; animation-direction: reverse; transform: rotateY(66deg) rotateZ(-14deg); }
.ring-c { inset: 34%; border-color: rgba(221,184,119,.22); animation-duration: 16s; transform: rotateX(66deg) rotateY(25deg); }
.axis-line { position: absolute; left: 50%; top: 4%; width: 1px; height: 92%; background: linear-gradient(transparent, rgba(221,184,119,.42), transparent); }

.exhibit-object { position: absolute; z-index: 3; left: 50%; top: 44%; width: 74%; padding: 0; border: 0; background: transparent; transform: translate(-50%,-50%); cursor: pointer; animation: exhibit-float 7.4s var(--ease-mass) infinite alternate; }
.exhibit-bezel-outer { position: relative; display: block; padding: 5px; border: 1px solid rgba(234,203,146,.68); background: #0b0b0c; box-shadow: 0 32px 80px rgba(0,0,0,.7), 0 0 0 1px rgba(91,65,32,.65), 0 0 52px rgba(199,153,79,.11); }
.exhibit-bezel-outer::before { content: ""; position: absolute; inset: -5px; border: 1px solid rgba(201,165,105,.18); pointer-events: none; }
.exhibit-bezel-inner { display: block; padding: 8px; border: 1px solid rgba(120,91,50,.58); background: #11100e; box-shadow: inset 0 0 0 1px rgba(238,211,159,.14), inset 0 0 24px rgba(0,0,0,.6); }
.bezel-rivet { position: absolute; z-index: 6; width: 4px; height: 4px; border-radius: 50%; background: var(--gold-light); box-shadow: 0 0 6px rgba(232,201,142,.55); }
.rivet-tl { left: -2px; top: -2px; } .rivet-tr { right: -2px; top: -2px; }
.rivet-bl { left: -2px; bottom: -2px; } .rivet-br { right: -2px; bottom: -2px; }
.exhibit-frame { position: relative; display: block; aspect-ratio: 1.45; padding: 5px; border: 1px solid rgba(225,190,128,.34); background: #090b10; overflow: hidden; }
.exhibit-frame::before { content: ""; position: absolute; z-index: 2; inset: 11px; border: 1px solid rgba(229,196,138,.22); pointer-events: none; }
.exhibit-frame img { width: 100%; height: 100%; display: block; object-fit: cover; filter: saturate(.78) contrast(1.04) brightness(.9); transition: transform 1.2s var(--ease-out), filter 1.2s; }
.frame-corner { position: absolute; z-index: 4; width: 16px; height: 16px; border-color: var(--gold-light); opacity: .72; }
.corner-tl { left: 2px; top: 2px; border-left: 1px solid; border-top: 1px solid; }
.corner-tr { right: 2px; top: 2px; border-right: 1px solid; border-top: 1px solid; }
.corner-bl { left: 2px; bottom: 2px; border-left: 1px solid; border-bottom: 1px solid; }
.corner-br { right: 2px; bottom: 2px; border-right: 1px solid; border-bottom: 1px solid; }
.exhibit-glint { position: absolute; z-index: 3; inset: 0; background: linear-gradient(115deg, transparent 35%, rgba(255,235,194,.2) 48%, transparent 60%); transform: translateX(-120%); transition: transform 1.2s var(--ease-out); }
.exhibit-caption { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; margin-top: 14px; text-align: left; text-shadow: 0 3px 18px #000; }
.exhibit-index, .exhibit-category { color: var(--gold); font-size: 9px; letter-spacing: .18em; text-transform: uppercase; }
.exhibit-category { text-align: right; }
.exhibit-caption strong { grid-column: 1 / -1; font-family: var(--serif); font-size: clamp(13px, 1.25vw, 18px); font-weight: 500; line-height: 1.4; letter-spacing: .06em; }
.exhibit-instruction { grid-column: 1 / -1; margin-top: 4px; color: rgba(238,231,219,.58); font-size: 9px; letter-spacing: .14em; }
.exhibit-instruction b { margin-left: 6px; color: var(--gold); font-weight: 400; }
.exhibit-object:hover .exhibit-frame img { transform: scale(1.045); filter: saturate(.95) contrast(1.04) brightness(1); }
.exhibit-object:hover .exhibit-glint { transform: translateX(120%); }
.exhibit-pedestal { position: absolute; left: 50%; bottom: -11%; width: 46%; height: 28%; transform: translateX(-50%) perspective(300px) rotateX(65deg); border: 1px solid rgba(213,177,112,.3); border-radius: 50%; box-shadow: 0 0 45px rgba(201,158,89,.16), inset 0 0 26px rgba(201,158,89,.13); }
.exhibit-pedestal span { position: absolute; inset: 22%; border: 1px dashed rgba(213,177,112,.36); border-radius: 50%; animation: orrery-turn 22s cubic-bezier(.45,.05,.55,.95) infinite alternate-reverse; }

.floating-relics { position: absolute; z-index: 2; inset: 0; pointer-events: none; }
.relic { position: absolute; width: 28px; aspect-ratio: .7; border: 1px solid rgba(220,181,114,.35); background: linear-gradient(135deg, rgba(58,37,23,.8), rgba(8,10,16,.9)); box-shadow: 0 12px 20px rgba(0,0,0,.5); animation: relic-drift 10s var(--ease-mass) infinite alternate; }
.relic::after { content: ""; position: absolute; inset: 5px; border: 1px solid rgba(220,181,114,.25); }
.relic-one { left: 34%; top: 24%; transform: rotate(-12deg); }
.relic-two { right: 31%; top: 31%; width: 20px; animation-delay: -3s; animation-duration: 13s; }
.relic-three { right: 36%; bottom: 22%; width: 17px; animation-delay: -7s; animation-duration: 15s; }

.hall-status { position: absolute; z-index: 5; left: clamp(22px, 4vw, 66px); bottom: 32px; margin: 0; color: rgba(238,231,219,.32); font-size: 7px; letter-spacing: .18em; }
.archive-toggle { position: absolute; z-index: 6; left: 50%; bottom: 22px; width: min(290px, 42vw); min-height: 44px; padding: 0 0 13px; display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; border: 0; border-bottom: 1px solid rgba(220,181,114,.38); background: transparent; text-align: left; cursor: pointer; }
.archive-eyebrow { grid-column: 1 / -1; color: rgba(238,231,219,.35); font-size: 6px; letter-spacing: .28em; }
.archive-toggle > span:nth-child(2) { font-family: var(--serif); font-size: 11px; letter-spacing: .12em; }
.archive-toggle i { align-self: center; width: 28px; height: 1px; background: var(--gold); transform-origin: right; transition: transform .7s var(--ease-out); }
.archive-toggle:hover i { transform: scaleX(.55); }
.view-hint { position: absolute; z-index: 5; right: clamp(22px, 4vw, 66px); bottom: 30px; margin: 0; color: rgba(238,231,219,.3); font-size: 7px; letter-spacing: .15em; }
.view-hint span { margin-right: 8px; color: var(--gold); }

.archive-drawer { position: fixed; z-index: 40; inset: 0; visibility: hidden; pointer-events: none; }
.drawer-backdrop { position: absolute; inset: 0; background: rgba(1,2,5,.68); opacity: 0; backdrop-filter: blur(7px); transition: opacity .55s var(--ease-out); }
.drawer-panel { position: absolute; inset: 9% 3% 0; padding: clamp(24px, 4vw, 60px) clamp(22px, 5vw, 76px) 70px; overflow: auto; background: linear-gradient(145deg, rgba(15,17,25,.98), rgba(6,8,13,.99)); border: 1px solid rgba(218,183,122,.25); border-bottom: 0; box-shadow: 0 -30px 90px rgba(0,0,0,.55); transform: translateY(103%); transition: transform .8s var(--ease-out); }
.drawer-panel::before { content: ""; position: fixed; inset: 9% 3% auto; height: 1px; background: linear-gradient(90deg, transparent, rgba(226,192,130,.7), transparent); }
.archive-drawer.is-open { visibility: visible; pointer-events: auto; }
.archive-drawer.is-open .drawer-backdrop { opacity: 1; }
.archive-drawer.is-open .drawer-panel { transform: translateY(0); }
.drawer-head { display: flex; justify-content: space-between; align-items: flex-start; padding-bottom: 28px; border-bottom: 1px solid rgba(218,183,122,.18); }
.drawer-head p { margin: 0 0 9px; color: var(--gold); font-size: 9px; letter-spacing: .28em; }
.drawer-head h2 { margin: 0; font-family: var(--serif); font-size: clamp(28px, 3vw, 44px); font-weight: 400; letter-spacing: .12em; }
.drawer-close, .dialog-close { width: 44px; min-height: 44px; aspect-ratio: 1; border: 1px solid rgba(218,183,122,.3); border-radius: 50%; background: transparent; color: var(--gold-light); cursor: pointer; font-size: 20px; font-weight: 300; transition: transform .5s var(--ease-out), background .5s; }
.drawer-close:hover, .dialog-close:hover { transform: rotate(90deg); background: rgba(218,183,122,.08); }
.archive-tools { padding: 26px 0 19px; display: grid; grid-template-columns: minmax(260px, .65fr) 1.35fr; gap: 34px; align-items: center; }
.archive-search { display: grid; grid-template-columns: 1fr auto; align-items: center; border-bottom: 1px solid rgba(218,183,122,.32); }
.archive-search input { width: 100%; min-height: 44px; padding: 13px 0; border: 0; outline: 0; background: transparent; color: var(--ivory); font-family: var(--serif); font-size: 13px; letter-spacing: .06em; }
.archive-search input::placeholder { color: rgba(238,231,219,.32); }
.archive-search > span:last-child { color: var(--gold); }
.archive-filters { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.archive-filters button { min-height: 44px; padding: 0 16px; border: 1px solid rgba(218,183,122,.18); border-radius: 999px; background: transparent; color: rgba(238,231,219,.66); cursor: pointer; font-size: 9px; letter-spacing: .1em; }
.archive-filters button[aria-pressed="true"] { border-color: var(--gold); color: var(--gold-light); background: rgba(201,165,105,.08); }
.archive-summary { margin: 0 0 16px; color: rgba(238,231,219,.48); font-size: 9px; letter-spacing: .16em; }
.archive-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-flow: dense; column-gap: clamp(18px, 2.6vw, 42px); }
.archive-card { position: relative; padding: 22px 0; display: grid; grid-template-columns: 84px 1fr 15px; gap: 14px; align-items: center; border: 0; border-top: 1px solid rgba(218,183,122,.15); background: transparent; text-align: left; cursor: pointer; }
.archive-visual { position: relative; height: 58px; display: block; overflow: hidden; background: #161723; }
.archive-visual img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.65) brightness(.72); transition: transform .7s var(--ease-out), filter .7s; }
.archive-no { position: absolute; left: 5px; bottom: 4px; color: rgba(255,255,255,.55); font-size: 6px; letter-spacing: .12em; text-shadow: 0 1px 5px #000; }
.archive-placeholder { display: grid; place-items: center; height: 100%; color: var(--gold); font-family: var(--serif); font-size: 26px; background: radial-gradient(circle at 50% 35%, rgba(201,165,105,.16), transparent 60%); }
.archive-card-copy small { display: block; margin-bottom: 7px; color: var(--gold); font-size: 9px; letter-spacing: .12em; }
.archive-card-copy strong { display: -webkit-box; overflow: hidden; color: rgba(238,231,219,.84); font-family: var(--serif); font-size: 12px; font-weight: 500; line-height: 1.55; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.archive-arrow { color: var(--gold); font-size: 10px; opacity: .25; transition: transform .5s var(--ease-out), opacity .5s; }
.archive-card:hover img { transform: scale(1.07); filter: saturate(.95) brightness(.9); }
.archive-card:hover .archive-arrow { transform: translate(3px,-3px); opacity: 1; }
.archive-empty { padding: 70px 0; color: rgba(238,231,219,.4); font-family: var(--serif); text-align: center; }

.work-dialog { width: min(1080px, calc(100vw - 48px)); max-height: min(760px, calc(100dvh - 48px)); padding: 0; overflow: visible; border: 1px solid rgba(218,183,122,.35); background: #0d0f16; color: var(--ivory); box-shadow: 0 40px 120px rgba(0,0,0,.75); }
.work-dialog::backdrop { background: rgba(1,2,5,.82); backdrop-filter: blur(9px); }
.dialog-close { position: absolute; z-index: 4; right: -18px; top: -18px; background: #0d0f16; }
.dialog-layout { display: grid; grid-template-columns: 1.2fr .8fr; min-height: 540px; }
.dialog-visual { min-height: 420px; display: grid; place-items: center; overflow: hidden; background: #080a0f; }
.dialog-visual img { width: 100%; height: 100%; object-fit: cover; }
.dialog-placeholder { color: var(--gold); font-family: var(--serif); font-size: 92px; opacity: .55; }
.dialog-copy { align-self: center; padding: clamp(36px, 5vw, 70px); }
.dialog-copy > p:first-child { margin: 0 0 13px; color: var(--gold); font-size: 7px; letter-spacing: .25em; }
.dialog-copy h2 { margin: 0; font-family: var(--serif); font-size: clamp(24px, 2.6vw, 38px); font-weight: 400; line-height: 1.38; letter-spacing: .06em; }
.dialog-rule { width: 36px; height: 1px; margin: 26px 0; background: var(--gold); }
.dialog-description { max-height: 180px; overflow: auto; color: rgba(238,231,219,.58); font-size: 11px; line-height: 2; }
.dialog-link, .dialog-location { display: inline-flex; align-items: center; gap: 14px; margin: 24px 0 0; padding-bottom: 10px; border-bottom: 1px solid rgba(218,183,122,.45); color: var(--gold-light); font-size: 9px; letter-spacing: .16em; }

.is-arriving .museum-header, .is-arriving .hall-intro, .is-arriving .room-doors, .is-arriving .archive-toggle { opacity: 0; transform: translateY(14px); }
.is-arriving .featured-exhibit { opacity: 0; transform: translate3d(-50%, -43%, 60px) scale(.94); }
.museum-header, .hall-intro, .room-doors, .archive-toggle { transition: opacity 1.1s var(--ease-out), transform 1.1s var(--ease-out); }
body:not(.is-arriving) .hall-intro { transition-delay: .12s; }
body:not(.is-arriving) .featured-exhibit { opacity: 1; transition-delay: .35s; }
body:not(.is-arriving) .room-doors { opacity: 1; transition-delay: .9s; }
body:not(.is-arriving) .archive-toggle { transition-delay: 1.05s; }

@media (min-width: 1181px) {
  .archive-card:has(.archive-visual img) { grid-column: span 2; grid-template-columns: 164px 1fr 18px; }
}

button:focus-visible, a:focus-visible, input:focus-visible { outline: 1px solid #f0ca84; outline-offset: 5px; }

@keyframes hall-breathe { to { transform: translate3d(calc(var(--look-x) * -.5), calc(var(--look-y) * -.5 - 4px), -20px) scale(1.075); } }
@keyframes orrery-turn { to { rotate: 1turn; } }
@keyframes exhibit-float { from { transform: translate(-50%, calc(-50% + 7px)) rotateZ(-.25deg); } to { transform: translate(-50%, calc(-50% - 8px)) rotateZ(.3deg); } }
@keyframes dust-drift { 0% { transform: translate3d(0,20px,0); opacity: 0; } 12% { opacity: .55; } 65% { opacity: .25; } 100% { transform: translate3d(28px,-72vh,0); opacity: 0; } }
@keyframes relic-drift { from { translate: -4px 8px; rotate: -3deg; } to { translate: 6px -10px; rotate: 5deg; } }

@media (max-width: 1180px) {
  .archive-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .room-door { width: 170px; }
  .hall-intro { max-width: 270px; }
  .hall-intro > p:last-child { display: none; }
}

@media (max-width: 900px) {
  .museum-header { grid-template-columns: 1fr auto; }
  .hall-number { display: none; }
  .hall-intro { top: 13%; }
  .hall-intro h1 { font-size: 36px; }
  .room-door { width: 150px; }
  .room-1, .room-3 { top: 55%; }
  .room-2, .room-4 { top: 69%; }
  .featured-exhibit { width: min(48vw, 420px); }
  .archive-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .archive-tools { grid-template-columns: 1fr; }
  .archive-filters { justify-content: flex-start; }
}

@media (max-width: 767px) {
  .museum-header { height: 66px; padding-inline: 18px; }
  .brand-name { font-size: 10px; }
  .brand-sigil { width: 25px; }
  .index-trigger { font-size: 8px; }
  .header-left { gap: 15px; }
  .exit-modern { font-size: 8px; letter-spacing: .16em; }
  .exit-full { display: none; }
  .hall-background { inset: -2% -38%; background-position: center; }
  .hall-depth { background: radial-gradient(circle at 50% 43%, transparent 15%, rgba(3,4,10,.25) 53%, rgba(2,3,8,.86) 100%), linear-gradient(180deg, rgba(2,3,8,.18), transparent 45%, rgba(2,3,8,.84)); }
  .light-shaft { width: 68vw; }
  .hall-intro { left: 20px; top: 11%; }
  .hall-kicker { font-size: 6px; }
  .hall-intro h1 { font-size: 30px; }
  .featured-exhibit { top: 46%; width: min(76vw, 370px); }
  .celestial-mechanism { inset: -18%; }
  .exhibit-object { width: 74%; }
  .room-doors { top: auto; bottom: 90px; height: 72px; display: flex; gap: 8px; padding: 0 14px; overflow-x: auto; pointer-events: auto; }
  .room-door, .room-1, .room-2, .room-3, .room-4 { position: relative; inset: auto; flex: 0 0 145px; min-height: 54px; grid-template-columns: 19px 1px 1fr 15px; padding: 8px 0; backdrop-filter: blur(6px); }
  .room-door:hover, .room-3:hover, .room-4:hover { transform: translateY(-3px); }
  .floating-relics { opacity: .45; }
  .hall-status, .view-hint { display: none; }
  .archive-toggle { bottom: 19px; width: calc(100% - 40px); }
  .drawer-panel { inset: 4% 0 0; padding: 30px 20px 60px; }
  .drawer-panel::before { inset: 4% 0 auto; }
  .archive-grid { grid-template-columns: 1fr; }
  .archive-card { grid-template-columns: 100px 1fr 15px; }
  .dialog-layout { grid-template-columns: 1fr; }
  .dialog-visual { min-height: 230px; max-height: 38vh; }
  .dialog-copy { padding: 30px 24px; }
  .work-dialog { width: calc(100vw - 28px); max-height: calc(100dvh - 30px); overflow: auto; }
  .dialog-close { right: 8px; top: 8px; background: rgba(8,10,15,.82); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .hall-background, .hall-intro, .featured-exhibit { transform: none; }
  .featured-exhibit { transform: translate(-50%,-50%); }
  .exhibit-object { transform: translate(-50%,-50%); }
}
