.room-picture, .room-light {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.room-picture { object-fit: contain; }
.room-light {
  background: radial-gradient(ellipse 25% 77% at 88.5% 48%,
    #ffad4738 0%, #b4783b17 17%, #262e428c 74%, #202c40a3 100%);
  opacity: 0;
  transition: opacity .75s ease;
}
.room.evening .room-light { opacity: 1; }

.room .volumes {
  position: absolute;
  bottom: 38.35%;
  left: 19%;
  right: 30.5%;
  gap: 0;
  padding: 0;
  z-index: 1;
}
.room .volume {
  flex: 0 0 min(16.5%, 23.5dvh);
  width: 16.5%;
  box-shadow: inset 1px 0 2px #fff9, inset -2px 0 2px #22180a55,
    2px 1px #8d795e, 4px 1px #d3bea0, 5px 2px #74674f,
    3px 3px 2px #32220d70, 9px -2px 7px #4b331a42, 15px -5px 14px #4b331a24;
  transition: transform .3s ease, box-shadow .3s ease, filter .75s ease;
}
.room .volume::after {
  background: linear-gradient(105deg,#ffe8b319,transparent 68%),
    linear-gradient(90deg,#0005 0%,#fff2 1.5%,#0002 3.8%,#0003 4.5%,#fff3 5.2%,transparent 7%,transparent 97.5%,#fff3 99%,#0002);
}
.room.evening .volume { filter: brightness(.8) saturate(.85); }
.room.evening .volume:last-child { filter: brightness(.96) sepia(.08); }
.room .volume:hover, .room .volume:focus-visible {
  box-shadow: inset 1px 0 2px #fff7,3px 2px #c7bd9f,5px 3px #8b8876,
    11px 15px 12px #3828164d;
}
.room-lamp {
  position: absolute;
  top: 38%;
  left: 84%;
  width: 9%;
  height: 24%;
  z-index: 2;
  padding: 0;
  border-radius: 40% 40% 18% 18%;
  cursor: pointer;
}
.lamp-tip {
  position: absolute;
  left: 50%;
  bottom: 100%;
  transform: translate(-50%, -4px);
  padding: 6px 10px;
  font-size: 11px;
  white-space: nowrap;
  background: #f7f5ee;
  color: var(--ink);
  box-shadow: 0 2px 8px #392b1a26;
  border-radius: 20px;
  opacity: 0;
  pointer-events: none;
}
.room-lamp:hover .lamp-tip, .room-lamp:focus-visible .lamp-tip { opacity: 1; }
#shelf .hint { padding-top: 15px; padding-bottom: 20px; }
.text-page p.contact-placeholder {
  border-block: 1px solid var(--line);
  margin: 24px 0 12px;
  padding: 13px 0;
  color: var(--ink);
}

/* One camera for the photograph, the shelf plane, the books and the lamp.
   Its horizontal track stays pannable wherever the viewport crops the room. */
.room-view {
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
  --edge: clamp(20px, 4vw, 74px);
  --light-ink: #fffaea;
}
.room-view .shelf-scroll {
  position: fixed;
  inset: 0;
  margin: 0;
  padding: 0;
  overflow: auto hidden;
  background: #d9c3a1;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
  scroll-snap-type: none;
}
.shelf-scroll::-webkit-scrollbar { display: none; }
.stage.room {
  position: relative;
  isolation: isolate;
  width: max(100%, 259.897dvh);
  height: auto;
  aspect-ratio: 2022 / 778;
  top: 61.65%;
  transform: translateY(-61.65%);
  padding: 0;
}
.room-view #shelf::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(to bottom, #fff5df87, transparent 17%),
    linear-gradient(to top, #1e1a11eb 0%, #20170fc9 12%, #21190d70 24%, transparent 38%);
}
.room-view .intro {
  position: fixed;
  z-index: 1;
  left: var(--edge);
  bottom: max(99px, 12dvh);
  margin: 0;
  padding: 0;
  color: var(--light-ink);
  display: block;
  pointer-events: none;
}
.room-view .intro h1 { font-size: clamp(40px, min(5.4vw, 8.1dvh), 92px); }
.room-view .intro em { color: #ede1bf; }
.room-view .eyebrow { color: #f9ebcd; margin-bottom: 12px; }
.room-view .eyebrow span { background: #e7d8ae; }
.room-view .lead { display: none; }
.room-view #shelf .hint {
  position: fixed;
  z-index: 1;
  left: var(--edge);
  bottom: max(66px, 8dvh);
  padding: 0;
  color: #fcf5db;
  pointer-events: none;
}
.room-view .collection-bar { display: none; }
.room-view footer { border-color: #ffefd139; color: #f8eed6; }
.room-view .local i { background: #c6cdac; }
.room-view .mobile-controls {
  display: flex;
  gap: 8px;
  position: fixed;
  z-index: 2;
  right: var(--edge);
  bottom: calc(max(68px, 8dvh) + 51px);
}
.room-view .mobile-controls[hidden] { display: none; }
.room-view .mobile-controls button {
  background: #30291fb8;
  border: 1px solid #f1e3c58f;
  color: var(--light-ink);
  width: 39px;
  height: 39px;
  border-radius: 50%;
}
.room-view .mobile-controls button:hover { background: #403a2e; }
.room-view .mobile-controls button:disabled { opacity: .38; cursor: default; }

@media (max-width: 720px) {
  .room-view .intro { bottom: 18dvh; }
  .room-view .intro h1 { font-size: clamp(35px, 8.1vw, 58px); }
  .room-view #shelf .hint { bottom: calc(18dvh - 26px); }
  .room-view .mobile-controls { bottom: 52px; }
}

@media (max-height: 590px) {
  .room-view .intro { bottom: 48px; }
  .room-view .intro h1 { font-size: clamp(25px, 6.7dvh, 40px); }
  .room-view .eyebrow { margin-bottom: 5px; font-size: 8px; }
  .room-view #shelf .hint { bottom: 23px; }
  .room-view footer { border-color: #ffefd139; color: #f8eed6; }
@media (prefers-reduced-motion: reduce) {
  .room-light, .room .volume { transition: none; }
}
