.room-wrap {
  background: #e8e4da;
  padding: clamp(12px, 2.2vw, 34px);
}
.room-studio {
  --scene-bg: #243833;
  --scene-light: #697865;
  --scene-accent: #f1d6a6;
  position: relative;
  isolation: isolate;
  max-width: 1520px;
  margin: 0 auto;
  padding: clamp(22px, 3.25vw, 52px);
  border: 1px solid #fff4;
  border-radius: clamp(20px, 3vw, 36px);
  background: var(--scene-bg);
  color: #fff9ed;
  box-shadow: 0 20px 40px #34271720;
  transition: background-color .55s ease;
}
.room-studio::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: radial-gradient(ellipse at 76% 57%, var(--scene-light), transparent 61%);
  content: "";
  pointer-events: none;
}
.room-studio[data-theme="1"] { --scene-bg: #4f3428; --scene-light: #a07858; }
.room-studio[data-theme="2"] { --scene-bg: #203242; --scene-light: #657c92; }
.room-studio[data-theme="3"] { --scene-bg: #343e43; --scene-light: #778580; }
.room-studio [hidden] { display: none !important; }
.room-top, .room-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.room-top h1 {
  margin: 0;
  max-width: 31rem;
  color: #fff3de;
  font-size: .81rem;
  font-weight: 600;
  letter-spacing: .14em;
  line-height: 1.55;
  text-transform: uppercase;
}
.room-studio button, .room-cta, .room-quote {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.room-studio :is(a, button):focus-visible {
  outline: 2px solid #fff;
  outline-offset: 4px;
}
.room-menu-button, .room-stepper button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  gap: 10px;
  min-width: 44px;
  min-height: 44px;
  border: 1px solid #fff6;
  border-radius: 999px;
  background: #141a1a24;
  font-size: .9rem;
}
.room-menu-button { padding: 0 15px; }
.room-menu-icon {
  width: 13px;
  height: 6px;
  border-block: 1px solid currentColor;
}
.room-menu-button:hover, .room-stepper button:hover {
  background: #ffffff22;
}
.room-slide {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 6fr);
  align-items: center;
  gap: clamp(18px, 3vw, 50px);
  min-height: clamp(450px, 42vw, 665px);
  padding: 10px 0;
}
.room-copy {
  position: relative;
  z-index: 2;
  padding-left: clamp(0px, 2vw, 35px);
}
.room-copy h2 {
  margin: 0;
  color: #fff9ed;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(4.1rem, 7vw, 7.5rem);
  font-weight: 500;
  letter-spacing: -.055em;
  line-height: .85;
}
.room-copy > p {
  max-width: 23rem;
  margin: 25px 0 21px;
  color: #fff7e6;
  font-size: 1rem;
  line-height: 1.6;
}
.room-cta {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  border-radius: 999px;
  padding: 0 19px;
  background: #f0d9b0;
  color: #253126;
  font-size: .9rem;
  font-weight: 650;
}
.room-cta:hover { background: #fff1d7; }
.room-figure {
  width: min(100%, 625px);
  margin: auto;
  text-align: center;
}
.room-stage {
  position: relative;
  isolation: isolate;
  aspect-ratio: 1;
  perspective: 1050px;
  touch-action: pan-y pinch-zoom;
}
.room-stage::before {
  position: absolute;
  z-index: -1;
  right: 1%;
  bottom: 7%;
  left: 1%;
  height: 23%;
  border-radius: 50%;
  background: #0d1413af;
  filter: blur(27px);
  content: "";
  pointer-events: none;
  transform: translateX(var(--shadow-x, 0px));
  transition: transform .28s ease-out;
}
.room-object {
  position: absolute;
  inset: 0;
  transform: rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
  transition: transform .22s ease-out;
}
.room-object img {
  width: 100%;
  height: 100%;
  user-select: none;
  -webkit-user-drag: none;
}
.room-studio:not(.rooms-ready) .room-pin { display: none; }
.room-pin {
  position: absolute;
  top: var(--y);
  left: var(--x);
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}
.room-pin > span:first-child {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  border: 1px solid #fff9;
  border-radius: 50%;
  background: #182520;
  color: #fff7e3;
  box-shadow: 0 0 0 4px #fff4;
  font: 500 23px/1 system-ui, sans-serif;
  transition: background .2s, color .2s, scale .2s;
}
.room-pin:is(:hover, [aria-expanded="true"]) > span:first-child {
  scale: 1.12;
  background: #fff1d7;
  color: #24332b;
}
.room-figure figcaption {
  padding-inline: 8px;
  color: #fff5e4;
  font-size: .82rem;
}
.room-detail {
  max-width: 25rem;
  margin-top: 18px;
  padding: 13px 16px;
  border: 1px solid #fff5;
  border-radius: 13px;
  background: #121b1a95;
  font-size: .9rem;
}
.room-detail p { margin: 4px 0 7px; }
.room-detail a { color: var(--scene-accent); text-decoration: underline; text-underline-offset: 3px; }
.room-bottom {
  padding-top: 17px;
  margin-top: 10px;
  border-top: 1px solid #fff4;
}
.room-stepper, .room-choices { display: flex; gap: 6px; }
.room-stepper button { font: 400 1.65rem/1 system-ui, sans-serif; }
.room-choices button, .room-quote {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 999px;
  color: #fff8ea;
  font-size: .86rem;
}
.room-choices button[aria-pressed="true"] {
  background: #fff2da;
  color: #27332b;
  font-weight: 650;
}
.room-choices button[aria-pressed="false"]:hover, .room-quote:hover { background: #ffffff22; }
.room-quote { white-space: nowrap; text-decoration: underline; text-underline-offset: 4px; }
.room-menu {
  position: fixed;
  inset: 0;
  width: min(90vw, 475px);
  max-width: none;
  max-height: 90vh;
  margin: auto;
  padding: clamp(22px, 4vw, 40px);
  overflow: auto;
  border: 1px solid #ffffff44;
  border-radius: 24px;
  background: #202c29;
  color: #fff7e8;
  box-shadow: 0 18px 56px #0006;
}
.room-menu::backdrop { background: #121716ba; backdrop-filter: blur(8px); }
.room-menu-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.room-menu-head h2 { font-size: .9rem; letter-spacing: .1em; text-transform: uppercase; }
.room-menu-head button { width: 44px; height: 44px; font-size: 1.6rem; }
.room-menu-list { margin-top: 12px; }
.room-menu-list button {
  display: block;
  width: 100%;
  padding: 8px 0;
  border-top: 1px solid #ffffff30;
  text-align: left;
  font: 500 clamp(2.1rem, 5vw, 3rem)/1.1 "Cormorant Garamond", Georgia, serif;
}
.room-menu-list button:is(:hover, [aria-pressed="true"]) { color: var(--scene-accent); }
.room-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 850px) {
  .room-copy { padding-left: 0; }
  .room-copy h2 { font-size: clamp(3.3rem, 8.5vw, 5rem); }
  .room-slide { min-height: 0; padding: 24px 0; }
}
@media (max-width: 720px) {
  .room-top { gap: 10px; }
  .room-top h1 { font-size: .72rem; letter-spacing: .085em; }
  .room-slide { display: flex; flex-direction: column; align-items: stretch; gap: 8px; padding: 24px 0 4px; }
  .room-copy { display: contents; }
  .room-copy h2 { order: 0; }
  .room-figure { width: min(100%, 440px); order: 1; }
  .room-details { order: 2; }
  .room-detail { margin-top: 2px; }
  .room-copy > p { order: 3; margin: 6px 0; }
  .room-cta { order: 4; align-self: start; }
  .room-bottom { display: grid; grid-template-columns: 1fr auto; gap: 9px; padding-top: 10px; }
  .room-choices { grid-column: 1 / -1; grid-row: 1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 3px; }
  .room-choices button { padding: 0 3px; font-size: .74rem; line-height: 1.12; }
  .room-stage::before { filter: blur(14px); }
}
@media (prefers-reduced-motion: reduce) {
  .room-studio, .room-stage::before, .room-object, .room-pin > span:first-child { transition: none; }
}
@media (min-width: 851px) {
  .room-slide { min-height: clamp(400px, min(42vw, calc(100svh - 255px)), 665px); }
  .room-figure { width: min(100%, 625px, max(390px, calc(100svh - 285px))); }
}

/* Each scene change wipes the backdrop while the room and its plinth move separately. */
.room-studio {
  overflow: clip;
  background: var(--scene-bg);
  transition: none;
}
.room-wipe {
  position: absolute;
  z-index: -1;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(ellipse at 76% 57%, var(--scene-light), transparent 61%), var(--scene-bg);
  pointer-events: none;
}
.room-wipe[data-theme="0"] { --scene-bg: #243833; --scene-light: #697865; }
.room-wipe[data-theme="1"] { --scene-bg: #4f3428; --scene-light: #a07858; }
.room-wipe[data-theme="2"] { --scene-bg: #203242; --scene-light: #657c92; }
.room-wipe[data-theme="3"] { --scene-bg: #343e43; --scene-light: #778580; }
.room-slides { position: relative; }
.room-outgoing {
  position: absolute;
  z-index: 3;
  inset: 0 0 auto;
  pointer-events: none;
}
.room-changing .room-stage::before,
.room-changing .room-pin,
.room-outgoing figcaption { visibility: hidden; }
.room-pedestal {
  position: absolute;
  inset: 42% 3% 0;
  opacity: 0;
  background: linear-gradient(90deg, #a47755 50%, #583f32 50%);
  clip-path: polygon(50% 0, 100% 46%, 100% 56%, 50% 100%, 0 56%, 0 46%);
  pointer-events: none;
}
.room-pedestal::before {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #dbc19f, #aa8261);
  clip-path: polygon(50% 0, 100% 46%, 50% 91%, 0 46%);
  content: "";
}

/* The room stage stays in view while the page scrolls through the four scenes. */
.room-wrap {
  --room-screen: 100svh;
  --room-step: 44svh;
  padding: 0;
  background: #243833;
}
.room-wrap.rooms-scroll { height: calc(var(--room-screen) + var(--room-step) * 3.55); }
.room-studio {
  display: grid;
  grid-template-rows: auto minmax(0,1fr) auto;
  width: 100%;
  max-width: none;
  min-height: var(--room-screen);
  padding: clamp(14px, 3.4vh, 46px) clamp(16px, 3.4vw, 65px);
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.rooms-scroll .room-studio {
  position: sticky;
  top: 0;
  height: var(--room-screen);
}
.room-studio .room-slide {
  height: 100%;
  min-height: 0;
}
.room-studio .room-figure {
  width: min(100%, 790px, calc(var(--room-screen) - 175px));
  min-width: 0;
}
.room-top-actions { display: flex; align-items: center; gap: clamp(8px,2vw,30px); flex-shrink: 0; }
.room-site-link { font-size: .85rem; color: #fff8ea; text-underline-offset: 4px; }
.room-site-link:hover { text-decoration: underline; }
.room-bottom { padding-top: 10px; }
.room-continue { background: #fff1d713; }
.room-mobile-actions { transition: opacity .16s; }
.rooms-in-view .room-mobile-actions { opacity: 0; visibility: hidden; pointer-events: none; }
@media (min-width: 721px) {
  .room-studio .room-copy h2 { max-width: 5.5ch; }
  .room-studio .room-copy h2:not(#01-living-room-title) { max-width: none; }
  .room-studio .room-detail { position: absolute; top: 100%; z-index: 3; background: #14221e; }
}
@media (max-width: 720px) {
  .room-wrap { --room-step: 48svh; }
  .room-studio { padding: 12px 14px max(10px, env(safe-area-inset-bottom)); }
  .room-top-actions { gap: 8px; }
  .room-site-link { max-width: 5.5rem; text-align: right; font-size: .74rem; }
  .room-studio .room-slide { justify-content: center; padding-block: 8px 0; gap: 5px; }
  .room-studio .room-copy h2 { font-size: clamp(2.45rem, 10vw, 4.2rem); }
  .room-studio .room-copy > p { font-size: .88rem; line-height: 1.38; }
  .room-studio .room-figure { width: min(100%, 435px, max(130px, calc(var(--room-screen) - 342px))); margin: 0 auto; }
  .room-studio .room-detail {
    position: absolute;
    z-index: 3;
    bottom: 0;
    left: 0;
    right: 0;
    margin: 0 auto;
    background: #14221e;
  }
  .room-studio .room-bottom { margin-top: 5px; padding-top: 6px; }
}
@media (max-height: 470px) and (min-width: 721px) {
  .room-studio .room-copy h2 { font-size: clamp(2.1rem,6vw,3.2rem); max-width: none; }
  .room-studio .room-copy > p { margin-block: 8px; }
  .room-studio .room-detail { position: absolute; inset: auto 0 0; }
}
@media (prefers-reduced-motion: reduce) {
  .room-mobile-actions { transition: none; }
}

.room-top-actions { gap: clamp(8px,1.6vw,22px); }
.room-quote-shortcut {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  padding: 0 13px;
  border-radius: 999px;
  background: #f0d9b0;
  color: #253126;
  white-space: nowrap;
  font-size: .85rem;
  font-weight: 650;
}
.room-quote-shortcut:hover { background: #fff1d7; }
.room-progress { align-self: center; white-space: nowrap; font-size: .8rem; }
.room-pin-label {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  padding: 3px 8px;
  border-radius: 8px;
  background: #182520;
  color: #fff8ea;
  white-space: nowrap;
  font-size: .74rem;
  line-height: 1.35;
  pointer-events: none;
}
.room-detail { padding-right: 52px; }
.room-detail-close {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 44px;
  height: 44px;
  color: #fff8ea;
  border-radius: 10px;
  font-size: 1.4rem;
}
.room-detail-close:hover { background: #ffffff22; }
@media (max-width: 720px) {
  .room-top { align-items: flex-start; gap: 5px; }
  .room-top h1 { flex: 1; font-size: .64rem; }
  .room-top-actions { gap: 5px; }
  .room-site-link { font-size: .72rem; }
  .room-quote-shortcut, .room-menu-button { padding-inline: 8px; font-size: .74rem; }
  .room-menu-icon { display: none; }
  .room-progress { font-size: .7rem; }
  .room-continue { padding-inline: 7px; font-size: .73rem; }
  .room-detail { bottom: auto; top: 12px; }
}

.room-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: #fff3de;
  text-decoration: none;
}
.room-brand svg { width: 38px; height: 38px; flex: none; }
.room-brand-name {
  display: block;
  font: 600 1.4rem/1 "Cormorant Garamond", Georgia, serif;
  letter-spacing: .17em;
  text-transform: uppercase;
  white-space: nowrap;
}
.room-brand-caption {
  display: block;
  margin-top: 5px;
  font-size: .65rem;
  letter-spacing: .1em;
}
@media (max-width: 720px) {
  .room-top { align-items: center; }
  .room-brand { gap: 3px; }
  .room-brand svg { width: 25px; height: 25px; }
  .room-brand-name { font-size: .95rem; letter-spacing: .075em; }
  .room-brand-caption { display: none; }
}
