/* Planta esquemática. Los porcentajes mantienen alineados los muros, vanos y muebles al cambiar de tamaño. */
.planta-viva {
  --pared: clamp(2px, .58cqw, 4px);
  --division: clamp(1.5px, .35cqw, 2.5px);
  --tinta-plano: #433e35;
  --piso: #efe2c9;
  --ropa-cama: #99b7a9;
  --veta-piso: repeating-linear-gradient(0deg, transparent 0 .98cqw, #a7874e24 1cqw 1.11cqw);
  container-type: inline-size;
  position: relative; isolation: isolate; overflow: hidden; width: 100%; aspect-ratio: 1.68;
  background-color: #f5f3e9;
  background-image: linear-gradient(#bdb7a132 1px, transparent 1px), linear-gradient(90deg, #bdb7a132 1px, transparent 1px);
  background-size: 14px 14px;
  color: var(--tinta-plano); font-family: "Segoe UI", system-ui, sans-serif; line-height: 1;
}
.planta-viva i { display: block; position: absolute; pointer-events: none; }
.planta-casa {
  position: absolute; z-index: 1; left: 7%; right: 7%; top: 8%; bottom: 20%; display: grid;
  grid-template-rows: 45% 12% 43%; background: var(--veta-piso), var(--piso);
  border: var(--pared) solid var(--tinta-plano); box-shadow: .8cqw 1cqw 0 #453c2c25;
}
.planta-noche { display: grid; grid-template-columns: repeat(var(--habitaciones, 3), minmax(0, 1fr)); }
.planta-viva[data-dormitorios="2"] { --habitaciones: 2; }
.planta-viva[data-dormitorios="4"] { --habitaciones: 4; }
.planta-viva[data-dormitorios="2"] .planta-dormitorio:nth-child(n+3),
.planta-viva:not([data-dormitorios="4"]) .planta-dormitorio:nth-child(4) { display: none; }
.planta-dormitorio { position: relative; min-width: 0; border-bottom: var(--division) solid var(--tinta-plano); box-shadow: inset var(--division) 0 var(--tinta-plano); }
.planta-dormitorio:first-child { box-shadow: none; }
.planta-dormitorio:nth-child(2) { --ropa-cama: #e2b288; }
.planta-dormitorio:nth-child(3) { --ropa-cama: #9aaeb9; }
.planta-dormitorio:nth-child(4) { --ropa-cama: #c6b285; }
/* Dobles líneas en el muro exterior para las ventanas. */
.planta-dormitorio::before, .planta-ventanal {
  content: ""; position: absolute; z-index: 1; left: 27%; top: calc(-1 * var(--pared)); width: 44%; height: var(--pared);
  border-block: 1px solid #417575; background: linear-gradient(90deg, #e5ffff 49%, #537575 50%, #e5ffff 52%);
}
.planta-dormitorio > span, .planta-dia > div > span, .planta-terraza > span {
  position: absolute; z-index: 1; white-space: nowrap; color: #352e26; font-weight: 700;
  font-size: clamp(7.5px, 2.37cqw, 15px); line-height: 1.13;
}
.planta-dormitorio > span { left: 9%; bottom: 5%; }
.planta-cama {
  left: 12%; top: 8%; width: min(36%, 8.8cqw); height: 62%; border: 1px solid #786850; border-radius: .55cqw;
  background: linear-gradient(to bottom, #e9d7b7 0 28%, #f6f0e3 28% 36%, var(--ropa-cama) 36%);
  box-shadow: .45cqw .45cqw 0 #77674d3b, inset 0 -.55cqw #705e4929;
}
.planta-cama.cama-doble { width: min(56%, 13cqw); }
.planta-cama::before, .cama-doble::after {
  content: ""; position: absolute; top: 4%; left: 11%; width: 74%; height: 20%;
  border: 1px solid #b6a891; border-radius: .42cqw; background: #fffaf0;
}
.cama-doble::before, .cama-doble::after { width: 37%; left: 8%; }
.cama-doble::after { left: auto; right: 8%; }
.planta-armario {
  right: 4%; top: 1%; width: 14%; height: 45%; border: 1px solid #ac9376;
  background: linear-gradient(to bottom, #d8c6a3 48%, #ac9376 49% 52%, #dcc9aa 53%);
}
/* El arco y la hoja marcan hacia qué recinto se abre la puerta. */
.planta-puerta {
  z-index: 2; right: 5%; bottom: calc(-1 * var(--division)); width: 4.9cqw; height: 4.9cqw;
  border-top: 1px solid #9b8c76; border-right: 1px solid #866f56; border-bottom: var(--division) solid var(--piso);
  border-radius: 100% 0 0 0;
}
.planta-pasillo { background: linear-gradient(#f9eed741, #f9eed741); }
.planta-dia { display: grid; grid-template-columns: 36% 39% 25%; min-height: 0; }
.planta-dia > div { position: relative; }
.planta-cocina > span { left: 15%; bottom: 6%; }
.planta-meson {
  left: 0; top: 0; bottom: 25%; width: 25%; border: 1px solid #998d76;
  background-color: #e6ded1;
  background-image: radial-gradient(circle, #806c54 0 36%, transparent 43%), radial-gradient(ellipse, #b3c6c4 0 55%, #7b9290 58% 64%, transparent 68%);
  background-position: .25cqw .35cqw, center 82%; background-size: 2cqw 2cqw, 82% 29%; background-repeat: repeat-x, no-repeat;
  box-shadow: .45cqw .35cqw 0 #5c483921;
}
.planta-comedor {
  left: 54%; top: 36%; width: 29%; height: 30%; background: #ba9469; border: 1px solid #886845;
  border-radius: 23%; box-shadow: 0 -.95cqw 0 -.25cqw #a8896a, 0 .95cqw 0 -.25cqw #a8896a;
}
.planta-estar > span { left: 15%; bottom: 7%; }
.planta-sofa {
  top: 4%; right: 15%; width: 64%; height: 34%; border: 1px solid #7c8a78; border-radius: .85cqw;
  background: linear-gradient(90deg, #a0ad94 0 8%, transparent 8% 92%, #a0ad94 92%),
              linear-gradient(0deg, transparent 0 73%, #a0ad94 73%), linear-gradient(90deg, #c6cdb7 49%, #9aa88e 50% 51%, #c6cdb7 52%);
  box-shadow: .3cqw .4cqw 0 #594c3025;
}
.planta-mesa-estar { right: 29%; top: 49%; width: 32%; height: 18%; border: 1px solid #aa936e; border-radius: 45%; background: #dbc9ac; }
.planta-bano {
  border-left: var(--division) solid var(--tinta-plano); border-top: var(--division) solid var(--tinta-plano);
  background-color: #d8e4df;
  background-image: linear-gradient(#b7cac3 1px, transparent 1px), linear-gradient(90deg,#b7cac3 1px, transparent 1px);
  background-size: 2.8cqw 2.8cqw;
}
.planta-bano > span { left: 14%; bottom: 8%; }
.planta-bano .planta-puerta { left: 7%; top: calc(-1 * var(--division)); transform: rotate(180deg); }
.planta-ducha {
  top: 2%; right: 1%; width: 40%; height: 47%; border: 1px solid #8fa4a2;
  background: radial-gradient(circle at 70% 33%,#789493 0 6%,transparent 7%), linear-gradient(135deg,transparent 48%, #a2b8b4 49% 50%,transparent 51%), #e6f0ed;
}
.planta-wc { right: 10%; bottom: 5%; width: 17%; height: 27%; border-radius: 50% 50% 23% 23%; border: 1px solid #92a5a3; background: #fff; }
.planta-puerta-principal { bottom: calc(-1 * var(--pared)); left: 34%; right: auto; width: 6.4cqw; height: 6.4cqw; border-bottom-width: var(--pared); }
.planta-ventanal { top: auto; left: 53%; bottom: calc(-1 * var(--pared)); width: 18%; }
.planta-entrada {
  position: absolute; left: 36.3%; top: 86%; transform: translateX(-50%); color: #764659;
  text-transform: uppercase; font-size: clamp(7px, 1.85cqw, 11.5px); letter-spacing: .05em; font-weight: 700;
}
.planta-entrada::before {
  content: ""; position: absolute; left: 50%; bottom: calc(100% + .45cqw); transform: translateX(-50%);
  border-bottom: 1.8cqw solid #8c443e; border-inline: 1.05cqw solid transparent;
}
.planta-terraza {
  display: none; position: absolute; z-index: 0; left: 47%; right: 15%; top: 78%; bottom: 4%;
  border: 1px solid #99784e; border-radius: 0 0 .4cqw .4cqw;
  background: repeating-linear-gradient(90deg,#d2ad78 0 1.5cqw, #aa875b 1.5cqw 1.75cqw); box-shadow: .6cqw .7cqw 0 #453c2c20;
}
.planta-viva[data-terraza="true"] .planta-terraza { display: block; }
.planta-terraza > span { left: 10%; top: 48%; }
.planta-mesa-patio {
  right: 13%; top: 26%; width: 3.6cqw; height: 3.6cqw; border: 1px solid #8f7053;
  border-radius: 50%; background: #f3dfbf; box-shadow: -2.2cqw .6cqw 0 -.6cqw #faf0dd, 2.2cqw -.6cqw 0 -.6cqw #faf0dd;
}
@media (prefers-reduced-motion: no-preference) {
  .planta-dormitorio:nth-child(n+3), .planta-terraza { animation: planta-aparecer .22s ease-out; }
  @keyframes planta-aparecer { from { opacity: .3; } to { opacity: 1; } }
}
@media (forced-colors: active) {
  .planta-viva { forced-color-adjust: none; }
}
