.plan {
  background: #f3f0e9;
  color: #182923;
}
.plan-intro {
  width: min(860px, calc(100% - 160px));
  margin: 0 auto 2.4rem;
  transition: transform 400ms ease-out;
}
.plan-intro h2 {
  margin: 0 0 1rem;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.6rem, 5vw, 4.4rem);
  line-height: 1.1;
}
.plan-intro h2 em { font-style: italic; }
.plan-intro p { margin: 0; }

.plan-size {
  width: min(var(--max), calc(100% - 160px));
  margin: 0 auto 1.15rem;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.35rem, 2.2vw, 1.75rem);
  letter-spacing: 0.01em;
  color: #182923;
  transition: transform 400ms ease-out;
}
.plan-size span {
  color: #c9a96e;
  padding: 0 0.35rem;
  font-weight: 400;
}

.fp-tabs {
  width: min(var(--max), calc(100% - 160px));
  margin: 0 auto 0.55rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.6rem;
  transition: transform 400ms ease-out;
}
.fp-tabs button {
  border: 0;
  border-bottom: 3px solid transparent;
  background: none;
  color: #182923;
  padding: 0.45rem 0 0.35rem;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
}
.fp-tabs button.is-active { border-bottom-color: #c9a96e; }

.fp-viewport {
  width: min(var(--max), calc(100% - 160px));
  margin: 0 auto;
  background: #f3f0e9;
  overflow: hidden;
  transition: transform 400ms ease-out;
}
.fp-stage { position: relative; width: 100%; }
.fp-layer {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 300ms ease;
}
.fp-layer.is-active { opacity: 1; pointer-events: auto; }
.floorplan-svg { width: 100%; height: auto; display: block; }

.floorplan-svg image.plate { pointer-events: none; }
.floorplan-svg .interior { fill: #e8e4de; }
.floorplan-svg .opening { fill: #e8e4de; }
.floorplan-svg .zone > rect:not([fill]) { fill: #e8e4de; }
.floorplan-svg .room-base { fill: rgba(243, 240, 233, 0); }
.floorplan-svg .shell,
.floorplan-svg .partition,
.floorplan-svg .fixture,
.floorplan-svg .door,
.floorplan-svg .stairs,
.floorplan-svg .window {
  fill: none;
  stroke: #182923;
  stroke-linejoin: round;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}
.floorplan-svg .shell { stroke-width: 1.5px; }
.floorplan-svg .partition { stroke-width: 1px; }
.floorplan-svg .fixture,
.floorplan-svg .door,
.floorplan-svg .stairs,
.floorplan-svg .window { stroke-width: 1px; }
.floorplan-svg .window { stroke: rgba(24, 41, 35, 0.4); }
.floorplan-svg .hatch-fill { fill: url(#hatch); }
.floorplan-svg .room-hot {
  fill: rgba(201, 169, 110, 0.34);
  opacity: 0;
  transition: opacity 200ms ease;
}
.floorplan-svg .room { cursor: pointer; }
.floorplan-svg .room:hover .room-hot,
.floorplan-svg .room:focus .room-hot,
.floorplan-svg .room.is-active .room-hot { opacity: 1; }
.floorplan-svg .room.is-active .room-hot {
  stroke: none;
  filter: none;
}
.floorplan-svg .room-name,
.floorplan-svg .room-dim {
  display: none;
  font-family: "Inter", sans-serif;
  fill: #182923;
  text-anchor: middle;
  pointer-events: none;
}
.floorplan-svg .room-name {
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.05em;
}
.floorplan-svg .room-dim {
  font-size: 8px;
  fill: rgba(24, 41, 35, 0.5);
  font-weight: 400;
}
.floorplan-svg .pool,
.floorplan-svg [data-room="jacuzzi"] .room-base { fill: rgba(243, 240, 233, 0); }
.floorplan-svg .garden-fill { fill: rgba(243, 240, 233, 0); }
.floorplan-svg .garden-edge {
  stroke: #2a6b5a;
  stroke-dasharray: 4 3;
}
.floorplan-svg .terrace-fill { fill: rgba(243, 240, 233, 0); }
.floorplan-svg .terrace .shell,
.floorplan-svg .terrace .partition {
  stroke-dasharray: 5 3;
}
.floorplan-svg .zone { pointer-events: none; }

.fp-index {
  width: min(var(--max), calc(100% - 160px));
  margin: 1rem auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.fp-index button {
  border: 1px solid rgba(24, 41, 35, 0.18);
  background: transparent;
  color: #182923;
  padding: 0.45rem 0.7rem;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  cursor: pointer;
}
.fp-index button:hover,
.fp-index button:focus-visible,
.fp-index button.is-active { border-color: #c9a96e; color: #c9a96e; }
.plan-note {
  width: min(var(--max), calc(100% - 160px));
  margin: 0 auto 0.9rem;
  color: rgba(24, 41, 35, 0.55);
  font-size: 0.84rem;
}

@media (min-width: 1024px) {
  .plan.is-shifted .plan-intro,
  .plan.is-shifted .plan-size,
  .plan.is-shifted .fp-tabs,
  .plan.is-shifted .fp-viewport,
  .plan.is-shifted .fp-index,
  .plan.is-shifted .plan-note { transform: translateX(-160px); }
}

.room-panel {
  position: fixed;
  z-index: 140;
  top: 0;
  right: 0;
  width: min(420px, 100%);
  height: 100%;
  background: #1a1a1a;
  color: #f5f0eb;
  transform: translateX(100%);
  transition: transform 400ms ease-out;
  display: flex;
  flex-direction: column;
  box-shadow: -20px 0 50px rgba(0, 0, 0, 0.35);
}
.room-panel.is-open { transform: none; }
.room-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  padding: 1.4rem 1.3rem 0.2rem;
  touch-action: none;
}
.room-head h3 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
}
.room-close {
  width: 44px;
  height: 44px;
  color: #f5f0eb;
  cursor: pointer;
  flex: none;
}
.room-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  transition: opacity 200ms ease;
}
.room-panel.is-fading .room-body { opacity: 0; }
.room-desc {
  margin: 0;
  padding: 0.35rem 1.3rem 0;
  color: rgba(245, 240, 235, 0.78);
  font-family: "Inter", sans-serif;
  font-size: 13px;
  line-height: 1.45;
}
.room-desc:empty { display: none; }
.room-rule {
  width: calc(100% - 2.6rem);
  margin: 0.9rem 1.3rem 0;
  border: 0;
  border-top: 1px solid #c9a96e;
}
.room-carousel {
  position: relative;
  flex: 1;
  min-height: 180px;
  display: grid;
  place-items: center;
  margin-top: 0.8rem;
  background: #111;
}
.room-carousel img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  cursor: zoom-in;
}
.room-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  background: rgba(26, 26, 26, 0.45);
  color: #f5f0eb;
  cursor: pointer;
}
.room-prev { left: 0.4rem; }
.room-next { right: 0.4rem; }
.room-dots {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  padding: 0.8rem 1.3rem 1.2rem;
}
.room-dots button {
  width: 6px;
  height: 6px;
  padding: 0;
  border-radius: 50%;
  background: rgba(245, 240, 235, 0.35);
  cursor: pointer;
}
.room-dots button.is-on { background: #c9a96e; }

@media (max-width: 1024px) {
  .plan-intro, .plan-size, .fp-tabs, .fp-viewport, .fp-index, .plan-note {
    width: min(var(--max), calc(100% - 48px));
  }
}

@media (max-width: 1023px) {
  .room-panel {
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: auto;
    max-height: 70vh;
    transform: translateY(100%);
  }
  .room-panel.is-open { transform: none; }
  .room-body { overflow: auto; }
}

@media (max-width: 768px) {
  .plan-intro, .plan-size, .fp-tabs, .fp-viewport, .fp-index, .plan-note {
    width: calc(100% - 32px);
  }
}
