/* Rooms: one photograph each, with hotspots registered to the furniture in the picture. */
#room { z-index: 10; overflow: hidden; background: #0c1614; transform-origin: 50% 55%; }
.room-photo-box {
  position: absolute; left: 50%; top: 50%; aspect-ratio: 1672 / 941; min-width: 100%; min-height: 100%;
  transform: translate(calc(-50% + var(--look-x, 0px)), calc(-50% + var(--look-y, 0px))) scale(1.03); transition: transform .9s var(--ease-out); will-change: transform;
}
@supports (width: max(1px, 2px)) { .room-photo-box { width: max(100vw, calc(100dvh * 1672 / 941)); min-width: 0; min-height: 0; } }
.room-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; user-select: none; -webkit-user-drag: none; }
.room-shade { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, #0c161499 0%, transparent 18%, transparent 68%, #0c1614b3 100%); }

.room-titles { position: absolute; left: 50%; top: calc(22px + var(--safe-t)); transform: translateX(-50%); text-align: center; pointer-events: none; padding: 10px 22px; border-radius: 14px; background: #14272599; backdrop-filter: blur(4px); max-width: min(78vw, 720px); transition: opacity .8s var(--ease-out), transform .8s var(--ease-out); }
.room-titles h1 { font-size: clamp(26px, 3.6vw, 44px); margin-top: 4px; color: #fff3da; text-shadow: 0 2px 14px #000a; }
.room-titles p { display: none; }

.hotspot {
  position: absolute; left: var(--x); top: var(--y); transform: translate(-50%, -100%); display: grid; justify-items: center; gap: 0; border: 0; background: none; padding: 0; color: var(--cream);
  -webkit-tap-highlight-color: transparent; transition: opacity .5s var(--ease-out);
}
.hotspot-card {
  display: block; min-width: 168px; padding: 13px 20px 14px; border-radius: 12px; text-align: center; background: linear-gradient(180deg, #1d3432f2, #142725f2); border: 1px solid #f3d29a80;
  box-shadow: 0 16px 30px #0009; transition: transform .45s var(--ease-out), border-color .3s, box-shadow .45s var(--ease-out);
}
.hotspot-card strong { display: block; font: 500 calc(25px * var(--text-scale))/1.1 var(--display); color: #fff3da; white-space: nowrap; }
.hotspot-card small { display: block; margin-top: 4px; font-size: calc(13px * var(--text-scale)); color: var(--cream-soft); }
.hotspot-stem { width: 1px; height: 22px; background: linear-gradient(180deg, #f3d29acc, #f3d29a22); }
.hotspot-dot { width: 12px; height: 12px; border-radius: 50%; background: #fff3da; box-shadow: 0 0 0 4px #f3d29a44, 0 2px 8px #000a; position: relative; }
.hotspot-dot::after { content: ''; position: absolute; inset: -4px; border-radius: 50%; border: 1px solid #f3d29a; opacity: 0; animation: pulse 3.2s var(--ease-out) infinite; }
@keyframes pulse { 0% { transform: scale(.7); opacity: .8; } 70%, 100% { transform: scale(2.4); opacity: 0; } }
.hotspot:hover .hotspot-card, .hotspot:focus-visible .hotspot-card { transform: translateY(-6px); border-color: var(--gold); box-shadow: 0 24px 36px #000b; }
.hotspot:focus-visible { outline: none; }
.hotspot:focus-visible .hotspot-card { outline: 3px solid #ffe2a5; outline-offset: 3px; }
#room.labels-off .hotspot-card, #room.labels-off .hotspot-stem { opacity: 0; pointer-events: none; }
#room.labels-off .room-titles, #room.labels-off .room-caption { opacity: 0; }

.room-exit { position: absolute; left: calc(20px + var(--safe-l)); top: calc(18px + var(--safe-t)); z-index: 3; }
.room-tools { position: absolute; right: calc(20px + var(--safe-r)); top: calc(18px + var(--safe-t)); z-index: 3; display: flex; gap: 8px; }
.room-caption { position: absolute; left: 50%; bottom: calc(96px + var(--safe-b)); transform: translateX(-50%); padding: 9px 20px; border-radius: 999px; background: #142725cc; border: 1px solid #f3d29a33; font: italic 500 calc(18px * var(--text-scale))/1.2 var(--display); color: #fff3da; white-space: nowrap; pointer-events: none; transition: opacity .8s; }
.world-nav { position: absolute; left: 50%; bottom: calc(22px + var(--safe-b)); transform: translateX(-50%); z-index: 3; display: flex; gap: 2px; padding: 4px; border-radius: 999px; background: #142725e6; border: 1px solid #f3d29a55; backdrop-filter: blur(6px); }
.world-nav button { min-height: 44px; padding: 0 16px; border: 0; border-radius: 999px; background: transparent; color: var(--cream); font: 500 calc(13px * var(--text-scale))/1 var(--body); white-space: nowrap; }
.world-nav button[aria-current='page'] { background: #6b5a3f; color: #fff3da; }
.world-nav button:hover { background: #2a4340; }

/* list of the room's places: the main way in on small screens, an extra on large ones */
.room-guide { position: absolute; left: calc(20px + var(--safe-l)); bottom: calc(22px + var(--safe-b)); z-index: 4; }
.room-guide > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 10px; background: #142725e6; border: 1px solid #f3d29a66; font: 500 calc(14px * var(--text-scale))/1 var(--body); }
.room-guide > summary::-webkit-details-marker { display: none; }
.room-guide > summary::before { content: '✧'; color: var(--gold); }
.room-guide-menu { position: absolute; left: 0; bottom: calc(100% + 8px); display: grid; gap: 6px; width: min(300px, calc(100vw - 40px)); padding: 10px; border-radius: 14px; background: #142725f5; border: 1px solid #f3d29a66; box-shadow: 0 18px 40px #000a; }
.room-guide-menu button { display: grid; gap: 2px; text-align: left; min-height: 52px; padding: 9px 14px; border-radius: 10px; border: 1px solid transparent; background: #1c2b29; color: var(--cream); }
.room-guide-menu button:hover { border-color: var(--gold); }
.room-guide-menu strong { font: 500 calc(19px * var(--text-scale))/1.1 var(--display); }
.room-guide-menu small { color: var(--cream-soft); font-size: calc(12.5px * var(--text-scale)); }
