* { box-sizing: border-box; }
body { margin: 0; background: #fff; color: #26394b; font: 16px/1.6 Arial, sans-serif; }
main { max-width: 1800px; margin: auto; padding: 0 1%; }

#room { position: relative; overflow: hidden; }
.room-photo { display: block; width: 100%; height: auto; }
.room-scale {
  position: absolute;
  inset: 0 auto auto 0;
  width: 1771px;
  height: 888px;
  transform-origin: top left;
  transform: scale(var(--room-scale, 0));
  pointer-events: none;
}
.walnut-wall, .opening, .door {
  position: absolute;
  inset: 0 auto auto 0;
  width: 1983px;
  height: 793px;
  transform-origin: top left;
}
.walnut-wall { transform: translate(34px, 198px) scale(.875); }
#screen {
  position: absolute;
  left: 1472px;
  top: 125px;
  width: 330px;
  height: 336px;
  opacity: 0;
  transition: opacity 1.1s;
}
#room.on #screen { opacity: 1; }
.screen-surface { position: relative; height: 100%; }
.screen-poster, #screen-picture {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  clip-path: polygon(0 30.06%, 100% 0, 100% 100%, 0 95.83%);
}
.screen-poster { object-fit: cover; }
#localMovie { position: absolute; top: 0; left: 0; width: 2px; height: 2px; opacity: 0; }
.opening { clip-path: polygon(1437px 212px, 1814px 96px, 1814px 490px, 1437px 467px); }
.door { display: block; will-change: transform; backface-visibility: hidden; filter: drop-shadow(2px 0 2px #130d0880); }
#leftDoor { clip-path: polygon(1437px 212px, 1610px 159px, 1610px 478px, 1437px 467px); }
#rightDoor { clip-path: polygon(1610px 159px, 1814px 96px, 1814px 490px, 1610px 478px); }

.controls { display: flex; gap: 15px; align-items: center; flex-wrap: wrap; margin: 15px 0; }
.controls button { min-width: 190px; min-height: 44px; padding: 12px 22px; border: 1px solid #516f91; background: #26394b; color: #fff; cursor: pointer; font: inherit; }
.controls button:disabled { background: #eef2f5; color: #516575; border-color: #c8d2db; cursor: default; }
.controls button:focus-visible { outline: 3px solid #89a2ba; outline-offset: 3px; }
#status { font-size: 13px; color: #505e69; }
.note { font-size: 11px; color: #505e69; }

@media (max-width: 430px) {
  .controls { gap: 8px; }
  .controls button { min-width: 0; padding-inline: 10px; font-size: 14px; }
  .controls #status { flex-basis: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  #screen { transition: none; }
}
