:root {
  color-scheme: dark;
  --ink: #080604;
  --ink-soft: #151009;
  --papyrus: #f3e5bd;
  --muted: #b9a577;
  --gold: #d2ad61;
  --gold-bright: #f1d58d;
  --blue: #17284a;
  --panel: rgba(12, 9, 5, 0.88);
  --line: rgba(222, 185, 102, 0.35);
  --shadow: 0 28px 90px rgba(0, 0, 0, 0.58);
}

* { box-sizing: border-box; }

html, body { width: 100%; min-height: 100%; }

body {
  margin: 0;
  overflow: hidden;
  background: var(--ink);
  color: var(--papyrus);
  font-family: Georgia, "Times New Roman", serif;
}

button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible {
  outline: 2px solid var(--gold-bright);
  outline-offset: 3px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.museum-app, .experience { position: fixed; inset: 0; }

.welcome {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 28px;
  background:
    linear-gradient(180deg, rgba(6, 4, 2, 0.3), rgba(6, 4, 2, 0.78)),
    url("assets/rooms/golden-treasures.png") center / cover no-repeat;
  transition: opacity 900ms ease, visibility 900ms ease;
}

.welcome::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 35%, transparent 0 15%, rgba(4, 3, 2, 0.72) 70%);
}

.welcome.is-hidden { opacity: 0; visibility: hidden; pointer-events: none; }

.welcome__glow {
  position: absolute;
  width: min(720px, 80vw);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(218, 176, 91, 0.17), transparent 63%);
  animation: breathe 6s ease-in-out infinite alternate;
}

.welcome__content {
  position: relative;
  max-width: 760px;
  padding: clamp(36px, 6vw, 72px);
  text-align: center;
  background: linear-gradient(155deg, rgba(13, 9, 5, 0.88), rgba(6, 4, 2, 0.76));
  border: 1px solid var(--line);
  box-shadow: var(--shadow), inset 0 1px rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(14px);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--gold);
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  line-height: 1.4;
  text-transform: uppercase;
}

.sun-mark {
  margin: 14px auto 8px;
  color: var(--gold-bright);
  font-size: 2rem;
  text-shadow: 0 0 28px rgba(232, 191, 102, 0.75);
}

.welcome h1 {
  margin: 0;
  color: #fff6da;
  font-size: clamp(2.35rem, 7vw, 5.6rem);
  font-weight: 400;
  letter-spacing: 0.12em;
  line-height: 0.98;
  text-transform: uppercase;
  text-shadow: 0 4px 34px rgba(0, 0, 0, 0.8);
}

.welcome__subtitle {
  margin: 18px 0 0;
  color: var(--muted);
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: clamp(0.72rem, 1.4vw, 0.95rem);
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.gold-rule {
  width: min(260px, 60%);
  height: 1px;
  margin: 30px auto;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.welcome__dedication {
  margin: 0 auto;
  max-width: 520px;
  color: #e9d9ad;
  font-size: clamp(1rem, 2vw, 1.25rem);
  font-style: italic;
  line-height: 1.7;
}

.primary-button {
  min-width: 220px;
  margin-top: 30px;
  padding: 14px 24px;
  border: 1px solid var(--gold);
  background: linear-gradient(135deg, #d4ad5d, #9d7232);
  color: #130e07;
  cursor: pointer;
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.19em;
  text-transform: uppercase;
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

.primary-button:hover { transform: translateY(-2px); filter: brightness(1.08); box-shadow: 0 14px 40px rgba(207, 164, 78, 0.26); }

.welcome-actions { display: grid; justify-items: center; gap: 10px; margin-top: 30px; }
.welcome-actions .primary-button { margin-top: 0; }
.welcome-secondary-button,
.welcome-text-button {
  min-width: 220px;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid rgba(226, 190, 108, 0.46);
  background: rgba(12, 8, 4, 0.72);
  color: #ead7a8;
  cursor: pointer;
  font: 700 0.68rem/1.2 "Segoe UI", Arial, sans-serif;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}
.welcome-text-button { border-color: transparent; background: transparent; color: #c7ad72; text-decoration: underline; text-underline-offset: 5px; }

.welcome__hint {
  margin: 18px 0 0;
  color: #8f7c55;
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 0.7rem;
}

.experience {
  z-index: 1;
  overflow: hidden;
  opacity: 0;
  transition: opacity 800ms ease;
}

.experience.is-ready { opacity: 1; }

.scene-wash {
  position: absolute;
  inset: -34px;
  background: center / cover no-repeat;
  filter: blur(24px) brightness(0.4) saturate(0.8);
  transform: scale(1.08);
  transition: background-image 650ms ease;
}

.scene-wash::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(2, 2, 2, 0.26);
}

.scene-shell {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}

.scene-frame {
  position: relative;
  width: 100vw;
  height: 56.25vw;
  max-width: 177.7778vh;
  max-height: 100vh;
  overflow: hidden;
  background: #0a0806;
  box-shadow: 0 0 60px rgba(0, 0, 0, 0.65);
}

.scene-frame.is-gallery {
  width: 100vw;
  height: 100dvh;
  max-width: none;
  max-height: none;
  box-shadow: none;
}

.scene-wash.is-gallery {
  background-image:
    radial-gradient(circle at 50% 18%, rgba(146, 100, 37, 0.22), transparent 34%),
    linear-gradient(180deg, #171008, #060504) !important;
  filter: none;
  transform: none;
}

.artifact-gallery-scene:not([hidden]) {
  position: absolute;
  z-index: 3;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(14px, 1.7vw, 28px);
  overflow-x: hidden;
  overflow-y: auto;
  padding: max(94px, calc(env(safe-area-inset-top) + 74px)) clamp(70px, 7vw, 130px) max(170px, calc(env(safe-area-inset-bottom) + 150px));
  background:
    linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px) 0 0 / 25% 100%,
    radial-gradient(circle at 50% -10%, rgba(216, 167, 76, 0.16), transparent 47%),
    linear-gradient(180deg, #171008 0%, #0a0705 66%, #050403 100%);
  scrollbar-color: #9d7232 #0a0705;
}

.gallery-exhibit {
  position: relative;
  min-width: 0;
  min-height: 280px;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  padding: 0;
  border: 1px solid rgba(216, 173, 85, 0.24);
  background: linear-gradient(155deg, rgba(31, 23, 14, 0.96), rgba(8, 7, 5, 0.98));
  color: #eee0bd;
  cursor: zoom-in;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.36), inset 0 1px rgba(255, 234, 184, 0.04);
  text-align: left;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.gallery-exhibit:hover,
.gallery-exhibit:focus-visible {
  transform: translateY(-4px);
  border-color: rgba(230, 188, 96, 0.72);
  box-shadow: 0 28px 74px rgba(0, 0, 0, 0.54), 0 0 0 1px rgba(220, 173, 78, 0.12);
  outline: none;
}

.gallery-exhibit__frame {
  position: relative;
  min-height: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 38%, rgba(130, 94, 46, 0.22), transparent 54%),
    #070605;
}

.gallery-exhibit__frame::after {
  content: "";
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 42px rgba(0, 0, 0, 0.44);
  pointer-events: none;
}

.gallery-exhibit__frame img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  transition: transform 360ms cubic-bezier(.2,.75,.2,1), filter 260ms ease;
}

.gallery-exhibit:hover .gallery-exhibit__frame img { transform: scale(1.035); filter: brightness(1.08); }

.gallery-exhibit__label {
  min-height: 82px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  padding: 15px 17px 17px;
  border-top: 1px solid rgba(216, 173, 85, 0.22);
  background: rgba(16, 11, 7, 0.96);
}

.gallery-exhibit__label small {
  color: #aa8442;
  font: 700 0.56rem/1.2 "Segoe UI", Arial, sans-serif;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.gallery-exhibit__label strong {
  display: -webkit-box;
  overflow: hidden;
  color: #efe0b8;
  font-size: clamp(0.86rem, 1.15vw, 1.08rem);
  font-weight: 400;
  line-height: 1.23;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.room-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transform: scale(1.001);
  transform-origin: 50% 50%;
  transition: opacity 480ms ease, transform 850ms cubic-bezier(.2,.75,.2,1), filter 600ms ease;
  user-select: none;
  -webkit-user-drag: none;
}

.room-image.is-changing { opacity: 0.12; filter: blur(8px); transform: scale(1.04); }
.scene-frame.is-inspecting .room-image { transform: scale(1.18); }

.scene-shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(3, 2, 1, 0.55) 0%, transparent 22%, transparent 65%, rgba(3, 2, 1, 0.72) 100%),
    linear-gradient(90deg, rgba(3, 2, 1, 0.25), transparent 18%, transparent 82%, rgba(3, 2, 1, 0.25));
}

.topbar {
  position: fixed;
  z-index: 15;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: max(16px, env(safe-area-inset-top)) clamp(16px, 3vw, 42px) 22px;
  pointer-events: none;
}

.topbar button { pointer-events: auto; }

.brand-button {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
  text-shadow: 0 2px 12px #000;
}

.brand-button__mark { color: var(--gold-bright); font-size: 1.45rem; }
.brand-button strong { display: block; font-size: 0.9rem; font-weight: 400; letter-spacing: 0.17em; text-transform: uppercase; }
.brand-button small { display: block; margin-top: 3px; color: var(--muted); font: 0.58rem/1 "Segoe UI", Arial, sans-serif; letter-spacing: 0.18em; text-transform: uppercase; }

.topbar__actions { display: flex; align-items: center; gap: 8px; }

.soft-button, .icon-button, .sound-button {
  border: 1px solid var(--line);
  background: rgba(9, 7, 4, 0.66);
  color: #e9dbb4;
  cursor: pointer;
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  backdrop-filter: blur(10px);
  transition: background 180ms ease, border-color 180ms ease, color 180ms ease;
}

.soft-button { min-height: 40px; padding: 0 15px; }
.soft-button[hidden] { display: none !important; }
.icon-button { width: 40px; height: 40px; padding: 0; font-size: 1.1rem; }
.soft-button:hover, .icon-button:hover, .sound-button:hover, .soft-button[aria-pressed="true"] { background: var(--gold); border-color: var(--gold); color: #110d07; }

.count-badge {
  display: inline-grid;
  min-width: 22px;
  height: 22px;
  margin-left: 6px;
  place-items: center;
  border-radius: 12px;
  background: rgba(213, 177, 92, 0.18);
  font-size: 0.6rem;
}

.room-arrow {
  position: fixed;
  z-index: 12;
  top: 50%;
  display: flex;
  align-items: center;
  gap: 9px;
  height: 72px;
  padding: 0 17px;
  border: 1px solid rgba(222, 185, 102, 0.27);
  background: rgba(8, 6, 4, 0.56);
  cursor: pointer;
  transform: translateY(-50%);
  backdrop-filter: blur(8px);
  transition: background 180ms ease, transform 180ms ease, border-color 180ms ease;
}

.room-arrow--left { left: 0; border-left: 0; }
.room-arrow--right { right: 0; border-right: 0; }
.room-arrow span { color: var(--gold-bright); font-size: 2.1rem; line-height: 1; }
.room-arrow small { color: #d8c79f; font: 0.58rem/1 "Segoe UI", Arial, sans-serif; letter-spacing: 0.14em; text-transform: uppercase; }
.room-arrow:hover { background: rgba(190, 143, 61, 0.88); border-color: var(--gold); transform: translateY(-50%) scale(1.03); }
.room-arrow:hover span, .room-arrow:hover small { color: #130e07; }

.room-look-controls { display: none; }
.room-look-controls[hidden] { display: none !important; }

.hotspot-layer { position: absolute; inset: 0; z-index: 4; }

.hotspot {
  position: absolute;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid rgba(255, 226, 159, 0.9);
  border-radius: 50%;
  background: rgba(25, 16, 7, 0.66);
  cursor: pointer;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 7px rgba(223, 178, 82, 0.12), 0 0 25px rgba(223, 178, 82, 0.38);
  transition: transform 160ms ease, background 160ms ease;
  animation: hotspotPulse 2.6s ease-in-out infinite;
}

.hotspot::before, .hotspot::after { content: ""; position: absolute; background: var(--gold-bright); }
.hotspot::before { width: 10px; height: 1px; left: 50%; top: 50%; transform: translate(-50%, -50%); }
.hotspot::after { width: 1px; height: 10px; left: 50%; top: 50%; transform: translate(-50%, -50%); }
.hotspot:hover, .hotspot.is-active { background: var(--gold); transform: translate(-50%, -50%) scale(1.17); animation: none; }
.hotspot:hover::before, .hotspot:hover::after, .hotspot.is-active::before, .hotspot.is-active::after { background: #140e06; }

.room-swipe-hint {
  display: none;
  position: fixed;
  z-index: 16;
  left: 50%;
  margin: 0;
  border: 1px solid rgba(229, 191, 106, 0.38);
  border-radius: 999px;
  background: rgba(8, 6, 4, 0.82);
  color: #f1dfb4;
  font-family: "Segoe UI", Arial, sans-serif;
  letter-spacing: 0.05em;
  text-align: center;
  transform: translateX(-50%);
  backdrop-filter: blur(12px);
  transition: opacity 260ms ease, transform 260ms ease;
  pointer-events: none;
}

.room-swipe-hint.is-hidden { opacity: 0; transform: translate(-50%, -8px); }

.exhibit-panel {
  position: fixed;
  z-index: 20;
  right: clamp(18px, 4vw, 60px);
  top: 50%;
  width: min(390px, calc(100vw - 40px));
  padding: 28px 28px 25px;
  border: 1px solid var(--line);
  border-top: 3px solid var(--gold);
  background: var(--panel);
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translate(22px, -45%);
  backdrop-filter: blur(18px);
  transition: opacity 300ms ease, transform 300ms ease;
}

.exhibit-panel.is-open { opacity: 1; pointer-events: auto; transform: translate(0, -50%); }
.exhibit-panel h2 { margin: 0; color: #fff2ce; font-size: clamp(1.5rem, 3vw, 2.3rem); font-weight: 400; line-height: 1.08; }
.exhibit-panel > p:not(.eyebrow) { margin: 16px 0 20px; color: #cfbf98; font-size: 0.94rem; line-height: 1.72; }

.panel-close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #d9c79b;
  cursor: pointer;
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 1.6rem;
  line-height: 1;
}

.panel-close:hover { color: #fff4d4; }
.panel-close--light { color: #89734a; }

.text-button {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 0 0 5px;
  border: 0;
  border-bottom: 1px solid var(--gold);
  background: transparent;
  color: var(--gold-bright);
  cursor: pointer;
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-decoration: none;
  text-transform: uppercase;
}

.exhibit-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 16px 20px; }
.inspect-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid var(--gold-bright);
  background: var(--gold);
  color: #130d06;
  cursor: pointer;
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: transform 180ms ease, background 180ms ease;
}
.inspect-button:hover { background: #f0ca75; transform: translateY(-2px); }
.text-button--quiet { color: #c8ad73; border-bottom-color: rgba(218, 178, 89, 0.45); }

.room-dock {
  position: fixed;
  z-index: 14;
  left: clamp(18px, 4vw, 58px);
  right: clamp(18px, 4vw, 58px);
  bottom: max(22px, env(safe-area-inset-bottom));
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  pointer-events: none;
}

.room-dock__copy { max-width: 620px; text-shadow: 0 3px 18px #000, 0 1px 4px #000; }
.room-dock__copy h2 { margin: 0; color: #fff3cf; font-size: clamp(1.75rem, 3.7vw, 3.8rem); font-weight: 400; letter-spacing: 0.035em; line-height: 1; }
.room-dock__copy > p:last-child { margin: 10px 0 0; color: #d0bd91; font-size: clamp(0.8rem, 1.3vw, 1rem); font-style: italic; }

.room-dock__nav { min-width: 230px; text-align: right; pointer-events: auto; }
.room-dock__nav p { margin: 9px 0 0; color: #9f8a5d; font: 0.59rem/1 "Segoe UI", Arial, sans-serif; letter-spacing: 0.14em; text-transform: uppercase; }
.room-dots { display: flex; justify-content: flex-end; gap: 8px; }

.room-dot {
  width: 34px;
  height: 5px;
  padding: 0;
  border: 0;
  background: rgba(255, 255, 255, 0.22);
  cursor: pointer;
  transition: width 250ms ease, background 250ms ease;
}
.room-dot.is-active { width: 58px; background: var(--gold-bright); }
.room-dot.is-visited:not(.is-active) { background: rgba(211, 171, 86, 0.56); }

.sound-button {
  position: fixed;
  z-index: 14;
  right: clamp(18px, 4vw, 58px);
  bottom: 98px;
  min-height: 32px;
  padding: 0 11px;
}

.mobile-museum-nav { display: none; }

.museum-map {
  position: fixed;
  inset: 0;
  z-index: 110;
  visibility: hidden;
  opacity: 0;
  transition: opacity 280ms ease, visibility 280ms ease;
}
.museum-map.is-open { visibility: visible; opacity: 1; }
.museum-map__backdrop { position: absolute; inset: 0; background: rgba(3, 2, 1, 0.8); backdrop-filter: blur(12px); }
.museum-map__panel {
  position: absolute;
  inset: clamp(18px, 3vw, 42px);
  overflow-y: auto;
  padding: clamp(26px, 4vw, 58px);
  border: 1px solid rgba(206, 163, 77, 0.34);
  background: #efe3c7;
  color: #261c10;
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.72);
}
.museum-map__header { display: flex; align-items: flex-start; justify-content: space-between; gap: 28px; margin-bottom: 30px; }
.museum-map__header .eyebrow { color: #8c6428; }
.museum-map__header h2 { margin: 0; font-size: clamp(2.5rem, 5vw, 5rem); font-weight: 400; line-height: 1; }
.museum-map__header p:last-child { max-width: 720px; margin: 14px 0 0; color: #6f5b3d; font-size: 1rem; line-height: 1.55; }
.museum-map__back,
.museum-map__exit {
  min-height: 52px;
  padding: 0 18px;
  border: 1px solid #8c6428;
  background: #8c6428;
  color: #fff5da;
  cursor: pointer;
  font: 800 0.68rem/1.2 "Segoe UI", Arial, sans-serif;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.museum-map__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.museum-map-card {
  display: grid;
  grid-template-columns: minmax(180px, 42%) minmax(0, 1fr);
  min-height: 230px;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(94, 66, 29, 0.22);
  background: #130e08;
  color: #f3e5c0;
  cursor: pointer;
  text-align: left;
  box-shadow: 0 14px 34px rgba(61, 39, 16, 0.15);
}
.museum-map-card.is-current { border: 3px solid #b98435; }
.museum-map-card img { width: 100%; height: 100%; min-height: 230px; object-fit: cover; }
.museum-map-card__copy { display: flex; flex-direction: column; padding: 25px 22px; }
.museum-map-card__copy small { color: #caa45a; font: 700 0.61rem/1.3 "Segoe UI", Arial, sans-serif; letter-spacing: 0.14em; text-transform: uppercase; }
.museum-map-card__copy strong { margin-top: 12px; color: #fff1cf; font-size: clamp(1.35rem, 2.2vw, 2rem); font-weight: 400; line-height: 1.08; }
.museum-map-card__copy span { margin-top: 12px; color: #bbaa87; font-size: 0.92rem; line-height: 1.55; }
.museum-map-card__copy b { margin-top: auto; padding-top: 18px; color: #e0b65e; font: 800 0.66rem/1.2 "Segoe UI", Arial, sans-serif; letter-spacing: 0.09em; text-transform: uppercase; }
.museum-map__exit { display: none; }

.collection-drawer, .artifact-viewer {
  position: fixed;
  inset: 0;
  z-index: 60;
  visibility: hidden;
  opacity: 0;
  transition: opacity 300ms ease, visibility 300ms ease;
}

.collection-drawer.is-open, .artifact-viewer.is-open { visibility: visible; opacity: 1; }
.drawer-backdrop { position: absolute; inset: 0; background: rgba(3, 2, 1, 0.76); backdrop-filter: blur(8px); }

.drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(1180px, 92vw);
  overflow-y: auto;
  padding: clamp(24px, 4vw, 54px);
  background: #f0e7d2;
  color: #241b10;
  box-shadow: -24px 0 80px rgba(0, 0, 0, 0.55);
  transform: translateX(100%);
  transition: transform 420ms cubic-bezier(.2,.75,.2,1);
}

.collection-drawer.is-open .drawer-panel { transform: translateX(0); }

.drawer-header { position: relative; display: flex; align-items: flex-start; justify-content: space-between; gap: 30px; padding-right: 0; }
.drawer-header .eyebrow, .viewer-copy .eyebrow { color: #8c6428; }
.drawer-header h2 { margin: 0; font-size: clamp(2rem, 4vw, 4.1rem); font-weight: 400; line-height: 1; }
.drawer-header p:last-child { max-width: 660px; margin: 14px 0 0; color: #76644a; font-size: 0.92rem; line-height: 1.55; }

.drawer-tools { position: sticky; z-index: 3; top: -54px; margin: 30px -10px 26px; padding: 14px 10px; background: rgba(240, 231, 210, 0.95); backdrop-filter: blur(12px); }
.search-field input {
  width: 100%;
  height: 48px;
  padding: 0 16px;
  border: 1px solid rgba(63, 47, 24, 0.22);
  border-radius: 0;
  background: rgba(255, 253, 247, 0.72);
  color: #20180e;
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 0.9rem;
}

.collection-filters { display: flex; gap: 7px; margin-top: 11px; overflow-x: auto; padding-bottom: 3px; scrollbar-width: thin; }
.mobile-gallery-filter,
.drawer-exit-bar { display: none; }
.filter-chip {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 0 13px;
  border: 1px solid rgba(104, 77, 36, 0.28);
  background: transparent;
  color: #5f4c30;
  cursor: pointer;
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 0.62rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}
.filter-chip:hover, .filter-chip.is-active { border-color: #8e6325; background: #8e6325; color: #fff4d7; }

.artifact-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 17px; }
.artifact-card {
  position: relative;
  min-width: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: #16110c;
  color: #f0e4c6;
  cursor: pointer;
  text-align: left;
  box-shadow: 0 9px 24px rgba(63, 45, 20, 0.15);
  transition: transform 220ms ease, box-shadow 220ms ease;
}
.artifact-card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(50, 34, 15, 0.25); }
.artifact-card__image { aspect-ratio: 4 / 3; overflow: hidden; background: #21180e; }
.artifact-card img { width: 100%; height: 100%; display: block; object-fit: cover; transition: transform 500ms ease; }
.artifact-card:hover img { transform: scale(1.045); }
.artifact-card__copy { padding: 14px 14px 16px; }
.artifact-card__room { display: block; margin-bottom: 6px; color: #b99a5c; font: 0.56rem/1.3 "Segoe UI", Arial, sans-serif; letter-spacing: 0.13em; text-transform: uppercase; }
.artifact-card__title { display: -webkit-box; overflow: hidden; font-size: 0.93rem; font-weight: 400; line-height: 1.35; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }

.empty-state { padding: 50px 0; color: #6e5d43; text-align: center; font-style: italic; }

.artifact-viewer { overflow: hidden; background: #030303; }
.artifact-viewer.is-open { touch-action: none; }
.viewer-back-button,
.viewer-copy-back,
.drawer-back-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 15px;
  border: 1px solid rgba(224, 190, 116, 0.38);
  border-radius: 4px;
  background: rgba(8, 7, 5, 0.82);
  color: #f2ddb0;
  cursor: pointer;
  font: 700 0.66rem/1 "Segoe UI", Arial, sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.viewer-back-button strong { font: inherit; }
.drawer-back-button,
.viewer-copy-back { color: #6f4f20; border-color: rgba(89, 64, 28, 0.25); background: rgba(255, 251, 240, 0.78); }
.viewer-copy-back { position: absolute; top: max(15px, env(safe-area-inset-top)); right: 16px; }

.viewer-stage {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 46%, rgba(74, 54, 29, 0.34), transparent 48%),
    #030303;
  touch-action: none;
  user-select: none;
}

.zoom-surface {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: grab;
  touch-action: none;
}
.zoom-surface.is-dragging { cursor: grabbing; }
.zoom-surface img {
  max-width: 100%;
  max-height: 100%;
  display: block;
  object-fit: contain;
  transform: translate3d(0, 0, 0) scale(1);
  transform-origin: center;
  will-change: transform;
  user-select: none;
  -webkit-user-drag: none;
}

.viewer-toolbar {
  position: absolute;
  z-index: 6;
  top: 0;
  left: 0;
  right: 0;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: max(14px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) 24px max(14px, env(safe-area-inset-left));
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.86), transparent);
  pointer-events: none;
}
.viewer-toolbar > * { pointer-events: auto; }
.viewer-icon-button, .zoom-controls button {
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(232, 199, 126, 0.4);
  background: rgba(8, 7, 5, 0.76);
  color: #f3dfaf;
  cursor: pointer;
  font-family: "Segoe UI", Arial, sans-serif;
  backdrop-filter: blur(12px);
}
.viewer-icon-button { width: 46px; height: 46px; padding: 0; font-size: 1.55rem; }
.viewer-position { min-width: 0; color: #e9d8b1; font: 0.62rem/1.3 "Segoe UI", Arial, sans-serif; letter-spacing: 0.1em; text-transform: uppercase; }
.viewer-position span, .viewer-position strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.viewer-position strong { margin-top: 3px; color: #9f895b; font-size: 0.58rem; font-weight: 500; }
.viewer-info-toggle {
  min-height: 46px;
  padding: 0 17px;
  border: 1px solid var(--gold);
  background: rgba(17, 12, 6, 0.8);
  color: #f1d99f;
  cursor: pointer;
  font: 700 0.64rem/1 "Segoe UI", Arial, sans-serif;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  backdrop-filter: blur(12px);
}
.viewer-info-toggle:hover, .viewer-info-toggle[aria-expanded="true"] { background: var(--gold); color: #130e07; }

.viewer-angle-menu {
  position: absolute;
  z-index: 7;
  top: max(78px, calc(env(safe-area-inset-top) + 68px));
  left: 50%;
  display: flex;
  gap: 7px;
  padding: 6px;
  border: 1px solid rgba(222, 185, 102, 0.3);
  background: rgba(5, 4, 3, 0.8);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.42);
  transform: translateX(-50%);
  backdrop-filter: blur(13px);
  transition: opacity 180ms ease;
}

.viewer-angle-menu button {
  min-height: 43px;
  padding: 0 15px;
  border: 1px solid transparent;
  background: transparent;
  color: #d8c79f;
  cursor: pointer;
  font: 700 0.6rem/1.1 "Segoe UI", Arial, sans-serif;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}

.viewer-angle-menu button:hover,
.viewer-angle-menu button[aria-pressed="true"] {
  border-color: var(--gold);
  background: var(--gold);
  color: #160f07;
}

.viewer-study-note {
  position: absolute;
  z-index: 5;
  top: max(142px, calc(env(safe-area-inset-top) + 132px));
  left: 50%;
  margin: 0;
  color: rgba(229, 207, 159, 0.7);
  font: 0.58rem/1.3 "Segoe UI", Arial, sans-serif;
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
  transform: translateX(-50%);
  pointer-events: none;
  transition: opacity 180ms ease;
}

.artifact-viewer.is-reading .viewer-angle-menu,
.artifact-viewer.is-reading .viewer-study-note { opacity: 0; pointer-events: none; }

.viewer-step {
  position: absolute;
  z-index: 5;
  top: 50%;
  width: 50px;
  height: 78px;
  padding: 0;
  border: 1px solid rgba(228, 192, 112, 0.32);
  background: rgba(6, 5, 3, 0.64);
  color: #f2daa4;
  cursor: pointer;
  transform: translateY(-50%);
  backdrop-filter: blur(10px);
}
.viewer-step span { font-size: 2.7rem; font-weight: 200; line-height: 1; }
.viewer-step--previous { left: max(10px, env(safe-area-inset-left)); }
.viewer-step--next { right: max(10px, env(safe-area-inset-right)); }
.viewer-step:hover { background: var(--gold); color: #160f07; }

.zoom-controls {
  position: absolute;
  z-index: 6;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(24px, env(safe-area-inset-bottom));
  display: flex;
  gap: 7px;
}
.zoom-controls button { min-width: 46px; height: 46px; padding: 0 12px; font-size: 1.25rem; }
#zoomReset { font-size: 0.63rem; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; }

.viewer-gesture-hint {
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: max(30px, env(safe-area-inset-bottom));
  margin: 0;
  color: rgba(238, 218, 171, 0.74);
  font: 0.62rem/1.35 "Segoe UI", Arial, sans-serif;
  letter-spacing: 0.08em;
  text-align: center;
  text-shadow: 0 2px 9px #000;
  transform: translateX(-50%);
  pointer-events: none;
}

.viewer-copy {
  position: absolute;
  z-index: 9;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(480px, 92vw);
  overflow-y: auto;
  padding: max(72px, calc(env(safe-area-inset-top) + 58px)) clamp(28px, 4vw, 52px) max(46px, env(safe-area-inset-bottom));
  background: #f0e7d3;
  color: #241b11;
  box-shadow: -24px 0 80px rgba(0, 0, 0, 0.58);
  transform: translateX(104%);
  transition: transform 360ms cubic-bezier(.2,.75,.2,1);
  touch-action: pan-y;
}
.artifact-viewer.is-reading .viewer-copy { transform: translateX(0); }
.viewer-copy-close { position: absolute; top: max(15px, env(safe-area-inset-top)); right: 16px; color: #71572f; border-color: rgba(89, 64, 28, 0.24); background: rgba(255, 251, 240, 0.7); }
.viewer-copy .eyebrow { color: #8c6428; }
.viewer-copy h2 { margin: 0 44px 30px 0; font-size: clamp(2rem, 4vw, 3.4rem); font-weight: 400; line-height: 1.06; }
.viewer-reading-block { margin: 0 0 30px; padding-top: 23px; border-top: 1px solid rgba(91, 67, 32, 0.18); }
.viewer-reading-block h3 { margin: 0 0 12px; color: #8a6228; font: 700 0.68rem/1.3 "Segoe UI", Arial, sans-serif; letter-spacing: 0.14em; text-transform: uppercase; }
.viewer-description { margin: 0; color: #5f513e; font-size: 1rem; line-height: 1.78; }
.look-closely-list { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; color: #5f513e; font-size: 0.96rem; line-height: 1.6; }
.look-closely-list li { position: relative; padding-left: 22px; }
.look-closely-list li::before { content: ""; position: absolute; left: 0; top: 0.68em; width: 8px; height: 1px; background: #a97931; }
.artifact-meta { display: grid; grid-template-columns: max-content 1fr; gap: 9px 16px; margin: 28px 0; padding: 22px 0; border-top: 1px solid rgba(91, 67, 32, 0.2); border-bottom: 1px solid rgba(91, 67, 32, 0.2); font-family: "Segoe UI", Arial, sans-serif; font-size: 0.76rem; line-height: 1.5; }
.artifact-meta dt { color: #8c6428; font-weight: 700; text-transform: uppercase; }
.artifact-meta dd { margin: 0; color: #5b4c38; }
.viewer-copy .text-button { color: #815719; }
#artifactSource[hidden] { display: none !important; }

.toast {
  position: fixed;
  z-index: 120;
  left: 50%;
  bottom: 30px;
  max-width: min(430px, calc(100vw - 30px));
  padding: 12px 18px;
  border: 1px solid var(--line);
  background: rgba(11, 8, 4, 0.9);
  color: #eddfba;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 14px);
  transition: opacity 250ms ease, transform 250ms ease;
  font: 0.72rem/1.4 "Segoe UI", Arial, sans-serif;
  letter-spacing: 0.05em;
  text-align: center;
}
.toast.is-showing { opacity: 1; transform: translate(-50%, 0); }

@keyframes breathe { from { transform: scale(0.92); opacity: 0.65; } to { transform: scale(1.08); opacity: 1; } }
@keyframes hotspotPulse { 0%, 100% { box-shadow: 0 0 0 6px rgba(223,178,82,.1), 0 0 18px rgba(223,178,82,.25); } 50% { box-shadow: 0 0 0 12px rgba(223,178,82,0), 0 0 31px rgba(223,178,82,.55); } }

@media (max-width: 800px), (max-aspect-ratio: 4/5) {
  :root { --mobile-tap: max(52px, 5dvh); }
  .welcome__content { max-height: calc(100dvh - 28px); overflow-y: auto; padding: 28px 22px; }
  .welcome-actions { width: 100%; }
  .welcome-actions button { width: 100%; min-height: 56px; }
  .scene-shell { display: block; }
  .scene-frame:not(.is-gallery) {
    --portrait-room-width: 100vw;
    width: 100vw;
    height: 100dvh;
    max-width: none;
    max-height: none;
    overflow-x: hidden;
    overflow-y: hidden;
    scroll-behavior: smooth;
    scrollbar-width: none;
    overscroll-behavior: none;
    touch-action: none;
  }
  .scene-frame:not(.is-gallery)::-webkit-scrollbar { display: none; }
  .scene-frame:not(.is-gallery) .room-image {
    width: 100vw;
    min-width: 100vw;
    height: 100dvh;
    max-width: none;
    object-fit: fill;
    transform: none;
  }
  .scene-frame:not(.is-gallery) .scene-shade,
  .scene-frame:not(.is-gallery) .hotspot-layer {
    inset: auto;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100dvh;
  }
  .scene-frame.is-inspecting .room-image { transform: none; }
  .scene-frame.is-gallery { overflow: hidden; }
  .room-swipe-hint {
    display: none;
    width: max-content;
    max-width: calc(100vw - 32px);
    padding: max(10px, 1dvh) max(15px, 2.4dvw);
    font-size: max(0.72rem, 1.18dvh);
    line-height: 1.35;
  }
  .topbar {
    z-index: 18;
    align-items: flex-start;
    gap: max(10px, 1.4dvw);
    padding: max(12px, env(safe-area-inset-top), 1.6dvh) max(12px, 2dvw) 18px;
  }
  .brand-button { min-height: var(--mobile-tap); gap: max(8px, 1dvw); }
  .brand-button__mark { font-size: max(1.45rem, 2dvh); }
  .brand-button strong { font-size: max(0.72rem, 1.08dvh); }
  .brand-button small { display: none; }
  .topbar__actions { gap: max(7px, 0.8dvw); }
  .soft-button, .icon-button { width: var(--mobile-tap); height: var(--mobile-tap); min-height: var(--mobile-tap); }
  .soft-button { padding: 0; overflow: hidden; color: transparent; font-size: 0; }
  .icon-button { font-size: max(1.15rem, 1.7dvh); }
  #collectionButton { display: none; }
  .count-badge {
    min-width: max(22px, 2.1dvh);
    height: max(22px, 2.1dvh);
    margin: 0 0 0 6px;
    color: #f3e6bd;
    font-size: max(0.58rem, 0.92dvh);
  }
  .room-look-controls { display: none !important; }
  .room-look {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-width: max(104px, 25vw);
    height: max(50px, 5dvh);
    padding: 0 11px;
    border: 1px solid rgba(232, 198, 124, 0.52);
    border-radius: 6px;
    background: rgba(8, 6, 4, 0.82);
    color: #efd99f;
    backdrop-filter: blur(9px);
  }
  .room-look span { font-size: max(1.75rem, 2.7dvh); line-height: 1; }
  .room-look small { font: 700 max(0.56rem, 0.88dvh)/1.2 "Segoe UI", Arial, sans-serif; letter-spacing: 0.06em; text-transform: uppercase; }
  .room-arrow {
    z-index: 17;
    top: auto;
    bottom: max(148px, 17dvh);
    width: max(60px, 6dvh);
    height: max(68px, 7dvh);
    justify-content: center;
    padding: 0;
    border: 1px solid rgba(232, 198, 124, 0.48);
    border-radius: 6px;
    transform: none;
    background: rgba(8, 6, 4, 0.76);
  }
  .room-arrow { display: none; }
  .room-arrow--left { left: max(10px, 2dvw); border-left: 1px solid rgba(232, 198, 124, 0.48); }
  .room-arrow--right { right: max(10px, 2dvw); border-right: 1px solid rgba(232, 198, 124, 0.48); }
  .room-arrow small { display: none; }
  .room-arrow span { font-size: max(2.3rem, 3.7dvh); }
  .room-arrow:hover { transform: none; }
  .hotspot {
    width: max(48px, 4dvh);
    height: max(48px, 4dvh);
    box-shadow: 0 0 0 max(8px, 0.7dvh) rgba(223, 178, 82, 0.14), 0 0 max(25px, 2.2dvh) rgba(223, 178, 82, 0.46);
  }
  .hotspot::before { width: max(12px, 1.1dvh); }
  .hotspot::after { height: max(12px, 1.1dvh); }
  .room-dock {
    left: max(18px, 2.5dvw);
    right: max(18px, 2.5dvw);
    bottom: max(98px, calc(env(safe-area-inset-bottom) + 86px));
    align-items: flex-start;
    flex-direction: column;
    gap: max(8px, 1dvh);
  }
  .room-dock__copy h2 { font-size: max(1.75rem, 3.7dvh); }
  .room-dock__copy .eyebrow { font-size: max(0.58rem, 0.96dvh); }
  .room-dock__copy > p:last-child { display: none; }
  .room-dock__nav { width: 100%; min-width: 0; text-align: left; }
  .room-dock__nav p { margin-top: 0; font-size: max(0.6rem, 0.95dvh); }
  .room-dots { display: none; }
  .sound-button { display: none; }
  .mobile-museum-nav {
    position: fixed;
    z-index: 24;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    min-height: calc(78px + env(safe-area-inset-bottom));
    padding: 6px 7px max(7px, env(safe-area-inset-bottom));
    border-top: 1px solid rgba(229, 190, 105, 0.48);
    background: rgba(8, 6, 4, 0.96);
    box-shadow: 0 -12px 34px rgba(0, 0, 0, 0.48);
    backdrop-filter: blur(16px);
  }
  .mobile-museum-nav button {
    display: flex;
    min-width: 0;
    min-height: 64px;
    padding: 5px 4px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 4px;
    border: 0;
    border-right: 1px solid rgba(221, 183, 99, 0.18);
    background: transparent;
    color: #ead8aa;
  }
  .mobile-museum-nav button:last-child { border-right: 0; }
  .mobile-museum-nav span { color: #e4b85f; font-size: 1.45rem; line-height: 1; }
  .mobile-museum-nav strong { overflow: hidden; font: 800 max(0.55rem, 0.88dvh)/1.1 "Segoe UI", Arial, sans-serif; letter-spacing: 0.05em; text-align: center; text-overflow: ellipsis; text-transform: uppercase; }

  .museum-map__panel { inset: 0; padding: 24px 16px max(98px, calc(env(safe-area-inset-bottom) + 86px)); border: 0; }
  .museum-map__header { display: block; margin-bottom: 22px; }
  .museum-map__header h2 { font-size: clamp(2.7rem, 12vw, 4.2rem); }
  .museum-map__header p:last-child { font-size: 1rem; line-height: 1.6; }
  .museum-map__back { width: 100%; min-height: 58px; margin-top: 18px; }
  .museum-map__grid { grid-template-columns: 1fr; gap: 13px; }
  .museum-map-card { grid-template-columns: 42% minmax(0, 1fr); min-height: 180px; }
  .museum-map-card img { min-height: 180px; }
  .museum-map-card__copy { padding: 18px 15px; }
  .museum-map-card__copy strong { font-size: clamp(1.4rem, 5.6vw, 2rem); }
  .museum-map-card__copy span { display: -webkit-box; overflow: hidden; font-size: 0.86rem; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
  .museum-map__exit {
    position: absolute;
    z-index: 3;
    right: 12px;
    bottom: max(12px, env(safe-area-inset-bottom));
    left: 12px;
    display: block;
    width: calc(100% - 24px);
    min-height: 68px;
    box-shadow: 0 10px 34px rgba(22, 13, 4, 0.48);
  }
  .artifact-gallery-scene:not([hidden]) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 270px;
    gap: 10px;
    padding: max(76px, calc(env(safe-area-inset-top) + 62px)) 12px max(176px, calc(env(safe-area-inset-bottom) + 156px));
  }
  .gallery-exhibit { min-height: 0; }
  .gallery-exhibit__label { min-height: 75px; padding: 11px 12px 13px; }
  .gallery-exhibit__label strong { font-size: 0.91rem; }
  .exhibit-panel {
    right: max(14px, 2.4dvw);
    left: max(14px, 2.4dvw);
    top: auto;
    bottom: max(118px, 13.5dvh);
    width: auto;
    max-height: 52dvh;
    overflow-y: auto;
    padding: max(24px, 2.6dvh) max(22px, 2.5dvw);
    transform: translateY(18px);
  }
  .exhibit-panel.is-open { transform: translateY(0); }
  .exhibit-panel h2 { margin-right: var(--mobile-tap); font-size: max(1.8rem, 3.6dvh); }
  .exhibit-panel > p:not(.eyebrow) { font-size: max(1.05rem, 1.9dvh); line-height: 1.65; }
  .exhibit-panel .eyebrow { font-size: max(0.6rem, 0.92dvh); }
  .panel-close { width: var(--mobile-tap); height: var(--mobile-tap); font-size: max(2rem, 3dvh); }
  .exhibit-actions { align-items: stretch; flex-direction: column; gap: max(13px, 1.3dvh); }
  .inspect-button { width: 100%; min-height: var(--mobile-tap); font-size: max(0.7rem, 1.15dvh); }
  .exhibit-panel .text-button { align-self: flex-start; min-height: var(--mobile-tap); font-size: max(0.68rem, 1.08dvh); }
  .drawer-panel { width: 100vw; padding: 24px 18px max(110px, calc(env(safe-area-inset-bottom) + 96px)); }
  .drawer-header { display: block; }
  .drawer-back-button {
    width: 100%;
    min-height: 58px;
    margin-top: 20px;
    border-color: #8e6325;
    background: #8e6325;
    color: #fff4d7;
    font-size: 0.74rem;
  }
  .drawer-tools { top: 0; margin-top: 20px; }
  .collection-filters { display: none; }
  .mobile-gallery-filter {
    display: grid;
    gap: 8px;
    margin-top: 12px;
    color: #765426;
    font: 700 0.7rem/1.2 "Segoe UI", Arial, sans-serif;
    letter-spacing: 0.1em;
    text-transform: uppercase;
  }
  .mobile-gallery-filter select {
    width: 100%;
    min-height: 56px;
    padding: 0 44px 0 15px;
    border: 2px solid rgba(126, 86, 30, 0.48);
    border-radius: 4px;
    background: #fffaf0;
    color: #2c2113;
    font: 700 0.94rem/1.2 "Segoe UI", Arial, sans-serif;
  }
  .drawer-exit-bar {
    position: absolute;
    z-index: 6;
    right: max(12px, env(safe-area-inset-right));
    bottom: max(12px, env(safe-area-inset-bottom));
    left: max(12px, env(safe-area-inset-left));
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 13px;
    min-height: 74px;
    padding: 10px 18px;
    border: 2px solid #f3d58d;
    border-radius: 7px;
    background: linear-gradient(135deg, #bd8a36, #8b5d20);
    color: #fff7df;
    box-shadow: 0 10px 35px rgba(20, 12, 4, 0.48);
    text-align: left;
  }
  .drawer-exit-bar__arrow { font-size: 2rem; line-height: 1; }
  .drawer-exit-bar strong,
  .drawer-exit-bar small { display: block; }
  .drawer-exit-bar strong { font: 800 0.88rem/1.15 "Segoe UI", Arial, sans-serif; letter-spacing: 0.08em; text-transform: uppercase; }
  .drawer-exit-bar small { margin-top: 5px; color: #f7e7bd; font: 0.72rem/1.2 "Segoe UI", Arial, sans-serif; }
  .artifact-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .viewer-toolbar { grid-template-columns: auto minmax(0, 1fr) auto; gap: max(9px, 1dvw); padding-left: max(10px, 1.5dvw); padding-right: max(10px, 1.5dvw); }
  .viewer-back-button { min-height: var(--mobile-tap); padding: 0 max(11px, 1.4dvw); font-size: max(0.56rem, 0.9dvh); }
  .viewer-icon-button { width: var(--mobile-tap); height: var(--mobile-tap); }
  .viewer-position { font-size: max(0.62rem, 0.98dvh); }
  .viewer-position strong { font-size: max(0.58rem, 0.9dvh); }
  .viewer-info-toggle { min-height: var(--mobile-tap); padding: 0 max(12px, 1.5dvw); font-size: max(0.58rem, 0.98dvh); }
  .viewer-angle-menu {
    top: max(72px, calc(env(safe-area-inset-top) + 62px));
    width: calc(100vw - 20px);
    gap: 4px;
    padding: 5px;
  }
  .viewer-angle-menu button { min-width: 0; flex: 1; min-height: var(--mobile-tap); padding: 0 max(6px, 0.8dvw); font-size: max(0.56rem, 0.94dvh); letter-spacing: 0.07em; }
  .viewer-study-note { top: max(133px, calc(env(safe-area-inset-top) + 123px)); width: calc(100vw - 34px); font-size: max(0.53rem, 0.86dvh); }
  .viewer-step { width: max(62px, 6dvh); height: max(84px, 8dvh); }
  .viewer-step--previous { left: max(16px, env(safe-area-inset-left)); }
  .viewer-step--next { right: max(16px, env(safe-area-inset-right)); }
  .zoom-controls { right: 12px; bottom: max(14px, env(safe-area-inset-bottom)); }
  .zoom-controls button { min-width: var(--mobile-tap); height: var(--mobile-tap); }
  .viewer-gesture-hint { bottom: max(70px, calc(env(safe-area-inset-bottom) + 60px)); width: min(330px, calc(100vw - 90px)); }
  .viewer-copy {
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100dvh;
    padding: max(86px, calc(env(safe-area-inset-top) + 72px)) 24px max(52px, calc(env(safe-area-inset-bottom) + 38px));
    border-top: 0;
    box-shadow: none;
    transform: translateY(104%);
    transition: transform 360ms cubic-bezier(.2,.75,.2,1);
  }
  .viewer-copy-back { top: max(15px, env(safe-area-inset-top)); right: 16px; min-height: var(--mobile-tap); }
  .artifact-viewer.is-reading .viewer-copy { transform: translateY(0); }
  .viewer-copy h2 { margin: 0 42px 36px 0; font-size: clamp(2.4rem, 10vw, 3.45rem); line-height: 1.05; }
  .viewer-reading-block { margin-bottom: 34px; padding-top: 27px; }
  .viewer-reading-block h3 { margin-bottom: 15px; font-size: 0.76rem; }
  .viewer-description { font-size: 1.17rem; line-height: 1.82; }
  .look-closely-list { gap: 16px; font-size: 1.08rem; line-height: 1.75; }
  .artifact-meta { font-size: 0.84rem; line-height: 1.65; }
}

@media (max-height: 610px) and (orientation: landscape) {
  .room-dock__copy > p:last-child, .room-dock__nav p, .brand-button small { display: none; }
  .room-dock { bottom: 14px; }
  .room-dock__copy h2 { font-size: 1.8rem; }
  .sound-button { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}
