/* Simulación del asistente de Casa Malca. Negro, arena y tostado de su web; rojo terciopelo de sus suites. */
:root {
  --arena: #EDE5DA;
  --arena-2: #F6F1EA;
  --concreto: #E2DACE;
  --blanco: #FFFDF9;
  --tinta: #0A0A0A;
  --tinta-2: #5F574E;
  --tinta-3: #7A7066;
  --linea: #D8CDBF;
  --tostado: #BA9D7D;
  --tostado-osc: #7A5F42;
  --terciopelo: #7E1D22;
  --terciopelo-suave: #F3E2DF;
  --ok: #2F6B4F;
  --titulo: "Zen Antique Soft", "Times New Roman", serif;
  --texto: "Instrument Sans", system-ui, sans-serif;
  --sale: cubic-bezier(.16, 1, .3, 1);
  --vvh: 100dvh;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--arena); color: var(--tinta);
  font: 400 16px/1.5 var(--texto); -webkit-font-smoothing: antialiased;
  caret-color: var(--terciopelo); overflow-x: hidden;
}
::selection { background: var(--tinta); color: var(--arena); }
h1, h2, h3, h4, p, dl, dd, ol, fieldset { margin: 0; padding: 0; }
fieldset { border: 0; min-width: 0; }
ol { list-style: none; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
:focus-visible { outline: 2px solid var(--terciopelo); outline-offset: 2px; border-radius: 4px; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.oculto { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
* { scrollbar-width: thin; scrollbar-color: #C7B9A8 transparent; }

/* ---------- Entrada ---------- */
.intro { padding-bottom: 116px; }
.portada { position: relative; height: min(64svh, 560px); min-height: 400px; overflow: hidden; background: #6E8C8F url("../img/playa-poster.webp") center / cover; color: #fff; isolation: isolate; }
.portada-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.portada-velo { position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(10, 10, 10, .5) 0%, rgba(10, 10, 10, 0) 26%, rgba(10, 10, 10, 0) 44%, rgba(10, 10, 10, .78) 100%); }
.marca { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: calc(18px + env(safe-area-inset-top)) 20px 0; }
.logo { width: 128px; height: auto; display: block; filter: drop-shadow(0 1px 8px rgba(0, 0, 0, .25)); }
.sello { font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; padding: 6px 10px; border: 1px solid rgba(255, 255, 255, .7); background: rgba(10, 10, 10, .28); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.portada-texto { position: absolute; left: 0; right: 0; bottom: 0; padding: 0 20px 24px; }
.antetitulo { font-size: 12.5px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: #F1E6D6; margin-bottom: 10px; }
h1 { font: 400 clamp(2rem, 8.6vw, 2.9rem)/1.04 var(--titulo); letter-spacing: -.01em; text-wrap: balance; max-width: 14ch; text-shadow: 0 1px 20px rgba(0, 0, 0, .25); }

.panel { padding: 24px 20px 0; max-width: 560px; margin: 0 auto; }
.bajada { font-size: 1.04rem; line-height: 1.5; max-width: 46ch; }
.bajada b { font-weight: 600; }
.dato { margin-top: 16px; padding: 12px 0 0; border-top: 1px solid var(--linea); font-size: .94rem; color: var(--tinta-2); max-width: 46ch; }
.dato strong { color: var(--terciopelo); font-weight: 700; }

.armado { margin-top: 26px; display: grid; gap: 22px; }
legend { font: 400 1.14rem/1.2 var(--titulo); padding: 0; margin-bottom: 10px; }
.opciones { display: grid; gap: 8px; }
.opciones.dos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.opcion { position: relative; display: block; }
.opcion input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.opcion span {
  display: flex; flex-direction: column; justify-content: center; gap: 2px; min-height: 62px; padding: 10px 12px;
  background: var(--blanco); box-shadow: inset 0 0 0 1px var(--linea);
  transition: box-shadow .18s, background-color .18s, transform .18s var(--sale);
}
.opcion b { font-weight: 600; font-size: .98rem; line-height: 1.2; }
.opcion small { font-size: .8rem; line-height: 1.25; color: var(--tinta-2); }
.opcion small.cerrado { color: var(--terciopelo); }
.opcion input:checked + span { background: var(--tinta); box-shadow: inset 0 0 0 1px var(--tinta); color: var(--arena); }
.opcion input:checked + span small { color: #CDBFAE; }
.opcion input:focus-visible + span { outline: 2px solid var(--terciopelo); outline-offset: 2px; }
.opcion input:active + span { transform: scale(.98); }

.arranque {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; padding: 14px 20px calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, var(--arena) 70%, rgba(237, 229, 218, 0));
}
.boton { text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 54px; padding: 0 22px; font-weight: 600; font-size: 1rem; letter-spacing: .01em; transition: transform .18s var(--sale), background-color .18s, box-shadow .18s; }
.boton:active { transform: scale(.975); }
.boton.primario { width: 100%; background: var(--tinta); color: var(--arena); box-shadow: 0 10px 24px -14px rgba(10, 10, 10, .7); }
.boton.primario svg { transition: transform .25s var(--sale); }
.letra-chica { margin-top: 24px; font-size: .85rem; color: var(--tinta-2); max-width: 52ch; }
.firma { margin-top: 10px; font-size: .85rem; color: var(--tinta-2); }
.firma a, .enlace { color: var(--tinta); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--tostado); }

/* ---------- Chat ---------- */
.tel { display: none; flex-direction: column; background: var(--concreto); overflow: hidden; }
body.v-chat .intro { display: none; }
body.v-chat { overflow: hidden; }
body.v-chat .tel { display: flex; position: fixed; left: 0; right: 0; top: var(--vvtop, 0px); height: var(--vvh); z-index: 10; }

.chat-top { display: flex; align-items: center; gap: 8px; padding: calc(8px + env(safe-area-inset-top)) 8px 8px; background: var(--tinta); color: var(--arena); flex: none; }
.icono { width: 44px; height: 44px; display: grid; place-items: center; flex: none; transition: background-color .15s; }
.chat-top .icono:active { background: rgba(237, 229, 218, .14); }
.avatar { width: 38px; height: 38px; background: var(--arena); display: grid; place-items: center; flex: none; padding: 4px; }
.avatar b { display: grid; place-items: center; width: 100%; height: 100%; background: var(--tinta); color: var(--arena); font: 800 17px/1 var(--texto); letter-spacing: -.02em; }
.quien { min-width: 0; flex: 1; display: flex; flex-direction: column; line-height: 1.2; }
.quien strong { font-weight: 600; font-size: .96rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.quien span { font-size: .76rem; color: #BFB2A2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ver-ficha { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 10px; background: rgba(237, 229, 218, .12); font-weight: 600; font-size: .88rem; flex: none; }
.ver-ficha svg { width: 18px; height: 18px; }
.cuenta { font-weight: 700; font-size: .76rem; background: var(--tostado); color: var(--tinta); padding: 2px 6px; font-variant-numeric: tabular-nums; }
.cuenta.pop { animation: pop .5s var(--sale); }
@keyframes pop { 0% { transform: scale(1); } 35% { transform: scale(1.28); } 100% { transform: scale(1); } }

.contexto { flex: none; padding: 7px 14px; font-size: .78rem; font-weight: 500; color: var(--tinta-2); background: var(--arena-2); border-bottom: 1px solid var(--linea); text-align: center; text-wrap: balance; }
.contexto b { color: var(--terciopelo); font-weight: 600; }

.mensajes { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 14px 12px 8px; display: flex; flex-direction: column; gap: 6px; outline-offset: -2px; }
.mensajes > * { flex-shrink: 0; }
.msj { max-width: 84%; padding: 8px 11px 7px; border-radius: 14px; font-size: .97rem; line-height: 1.42; overflow-wrap: anywhere; animation: entra .34s var(--sale) both; }
@keyframes entra { from { opacity: 0; transform: translateY(8px) scale(.985); } }
.msj time { float: right; margin: 7px 0 -2px 10px; font-size: .68rem; font-variant-numeric: tabular-nums; opacity: .66; }
.msj.asis { align-self: flex-start; background: var(--blanco); border-bottom-left-radius: 4px; box-shadow: 0 1px 1.5px rgba(10, 10, 10, .08); }
.msj.huesped { align-self: flex-end; background: var(--tinta); color: var(--arena); border-bottom-right-radius: 4px; }
.msj.huesped + .msj.asis, .msj.asis + .msj.huesped, .aviso + .msj, .msj + .aviso { margin-top: 6px; }

.escribiendo { display: inline-flex; gap: 4px; padding: 13px 14px; }
.escribiendo i { width: 7px; height: 7px; border-radius: 50%; background: var(--tinta-3); animation: punto 1.1s infinite ease-in-out; }
.escribiendo i:nth-child(2) { animation-delay: .15s; }
.escribiendo i:nth-child(3) { animation-delay: .3s; }
@keyframes punto { 0%, 60%, 100% { opacity: .3; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }

.aviso { align-self: center; display: inline-flex; align-items: center; gap: 6px; max-width: 94%; padding: 5px 11px; border-radius: 999px; background: rgba(255, 253, 249, .78); color: var(--tinta-2); font-size: .77rem; line-height: 1.3; text-align: center; animation: entra .34s var(--sale) both; }
.aviso svg { width: 14px; height: 14px; stroke: var(--ok); stroke-width: 2.4; }
.aviso b { color: var(--tinta); font-weight: 600; }
.aviso.idioma { background: var(--terciopelo-suave); color: var(--terciopelo); }
.aviso.idioma svg { stroke: var(--terciopelo); }

/* tarjetas de suites dentro del chat */
.carrusel { align-self: stretch; margin: 2px -12px; padding: 2px 12px 6px; display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 12px; overscroll-behavior-x: contain; animation: entra .4s var(--sale) both; scrollbar-width: none; }
.carrusel::-webkit-scrollbar { display: none; }
.suite { flex: 0 0 min(76%, 268px); scroll-snap-align: start; background: var(--blanco); border-radius: 14px; overflow: hidden; box-shadow: 0 1px 1.5px rgba(10, 10, 10, .08); display: flex; flex-direction: column; }
.suite img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--linea); }
.suite-cuerpo { padding: 11px 12px 12px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.suite h4 { font: 400 1.08rem/1.15 var(--titulo); }
.suite .datos { font-size: .78rem; font-weight: 600; color: var(--tostado-osc); letter-spacing: .02em; }
.suite p { font-size: .87rem; line-height: 1.38; color: var(--tinta-2); }
.suite .elegir { margin-top: auto; padding-top: 8px; }
.suite .elegir button { width: 100%; min-height: 44px; background: var(--arena); font-weight: 600; font-size: .9rem; transition: background-color .15s, transform .15s var(--sale); }
.suite .elegir button:active { transform: scale(.97); background: var(--concreto); }
.carrusel-pista { align-self: flex-start; font-size: .74rem; color: var(--tinta-3); margin: -2px 0 2px 2px; }

/* resumen interno */
.resumen { align-self: stretch; margin: 10px 0 4px; background: var(--tinta); color: var(--arena); border-radius: 14px; padding: 16px 16px 14px; animation: entra .5s var(--sale) both; }
.resumen .etiqueta { display: inline-block; font-size: .7rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--tinta); background: var(--tostado); padding: 3px 8px; }
.resumen h4 { margin-top: 10px; font: 400 1.3rem/1.15 var(--titulo); }
.resumen .sub { font-size: .82rem; color: #BFB2A2; margin-top: 3px; }
.resumen dl { margin-top: 12px; display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: .92rem; line-height: 1.35; }
.resumen dt { color: #BFB2A2; }
.resumen dd { font-weight: 600; overflow-wrap: anywhere; }
.resumen .ej { font-weight: 500; font-size: .72rem; color: var(--tinta); background: #CDBFAE; padding: 1px 5px; margin-left: 6px; vertical-align: 1px; }
.resumen .sigue { margin-top: 12px; padding-top: 10px; border-top: 1px solid rgba(237, 229, 218, .18); font-size: .86rem; color: #E3D6C4; }
.resumen .acciones { margin-top: 14px; display: grid; gap: 8px; }
.resumen .boton { min-height: 48px; font-size: .95rem; width: 100%; }
.resumen .boton.primario { background: var(--arena); color: var(--tinta); }
.resumen .boton.claro { box-shadow: inset 0 0 0 1px rgba(237, 229, 218, .4); color: var(--arena); }
.otra { align-self: center; margin: 6px 0 4px; min-height: 46px; padding: 0 18px; background: var(--blanco); color: var(--tinta); font-weight: 600; font-size: .94rem; box-shadow: 0 1px 1.5px rgba(10, 10, 10, .1); display: inline-flex; align-items: center; gap: 8px; animation: entra .5s var(--sale) both; }
.otra svg { width: 18px; height: 18px; }

.chips { flex: none; display: flex; flex-wrap: wrap; gap: 7px; padding: 6px 12px 8px; max-height: 176px; overflow-y: auto; }
.chips:empty { display: none; }
.chip { min-height: 44px; padding: 0 14px; border-radius: 22px; font-weight: 600; font-size: .9rem; line-height: 1.2; text-align: left; background: var(--blanco); color: var(--tinta); box-shadow: inset 0 0 0 1px var(--linea); transition: transform .16s var(--sale), background-color .16s; animation: entra .3s var(--sale) both; }
.chip.duda { background: transparent; color: var(--tinta-2); box-shadow: none; border: 1.5px dashed #B3A491; }
.chip:active { transform: scale(.96); background: var(--arena); }

.redactar { flex: none; display: flex; gap: 8px; align-items: center; padding: 8px 10px calc(8px + env(safe-area-inset-bottom)); background: var(--arena-2); border-top: 1px solid var(--linea); }
.redactar input { flex: 1; min-width: 0; height: 46px; padding: 0 16px; border-radius: 23px; border: 0; background: var(--blanco); box-shadow: inset 0 0 0 1px var(--linea); font-size: 16px; }
.redactar input::placeholder { color: var(--tinta-3); }
.redactar input:focus { outline: none; box-shadow: inset 0 0 0 2px var(--tinta); }
.enviar { width: 46px; height: 46px; border-radius: 50%; background: var(--tinta); color: var(--arena); display: grid; place-items: center; flex: none; transition: transform .16s var(--sale); }
.enviar:active { transform: scale(.92); }
.enviar svg { fill: currentColor; stroke: none; width: 20px; height: 20px; }

/* ---------- Lado: ficha en vivo + tablero ---------- */
.lado { background: var(--arena); padding: calc(8px + env(safe-area-inset-top)) 20px calc(28px + env(safe-area-inset-bottom)); display: none; }
body.lado-abierto .lado { display: block; position: fixed; inset: 0; z-index: 20; overflow-y: auto; overscroll-behavior: contain; animation: sube .38s var(--sale); }
@keyframes sube { from { transform: translateY(24px); opacity: 0; } }
.lado-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; min-height: 44px; }
.lado h2 { font: 400 1.5rem/1.1 var(--titulo); }
.lado h3 { font: 400 1.12rem/1.2 var(--titulo); }
.ficha, .tablero { background: var(--blanco); padding: 16px; box-shadow: 0 1px 2px rgba(10, 10, 10, .05), 0 12px 28px -20px rgba(10, 10, 10, .35); }
.tablero { margin-top: 16px; }
.ficha-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.progreso { font-size: .82rem; font-weight: 600; color: var(--tostado-osc); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ficha-ayuda { font-size: .84rem; color: var(--tinta-2); margin-top: 2px; }
.ficha dl { margin-top: 10px; }
.fila { display: grid; grid-template-columns: 100px 1fr; gap: 10px; padding: 9px 0; border-top: 1px solid var(--linea); font-size: .92rem; line-height: 1.35; }
.fila dt { color: var(--tinta-2); }
.fila dd { font-weight: 600; overflow-wrap: anywhere; }
.fila.falta dd { font-weight: 400; color: var(--tinta-3); }
.fila.nuevo dd { animation: llena .7s var(--sale) both; }
.fila.nuevo { animation: marca 1.6s ease-out both; }
@keyframes llena { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes marca { from { background: #F1E4D2; box-shadow: -8px 0 0 #F1E4D2, 8px 0 0 #F1E4D2; } to { background: transparent; box-shadow: -8px 0 0 transparent, 8px 0 0 transparent; } }
.fila dd span { display: block; }
.fila dd span + span { margin-top: 3px; }
.fila dd .ej-chico { display: inline; }
.ej-chico { font-weight: 500; font-size: .72rem; color: var(--tinta-2); background: var(--arena); padding: 1px 5px; margin-left: 6px; vertical-align: 1px; }

.filtros { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.filtros::-webkit-scrollbar { display: none; }
.filtro { min-height: 44px; padding: 0 11px; font-size: .86rem; font-weight: 600; color: var(--tinta-2); box-shadow: inset 0 0 0 1px var(--linea); white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; flex: none; }
.filtro b { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--tinta-3); }
.filtro[aria-selected="true"] { background: var(--tinta); color: var(--arena); box-shadow: none; }
.filtro[aria-selected="true"] b { color: var(--tostado); }
.fichas { margin-top: 10px; display: grid; }
.fichas li { padding: 12px 0; border-top: 1px solid var(--linea); display: grid; gap: 3px; font-size: .9rem; line-height: 1.35; }
.fichas .arriba { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.fichas .nombre { font-weight: 700; font-size: .98rem; }
.fichas .cuando { font-size: .78rem; color: var(--tinta-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.fichas .tags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.tag { font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 2px 7px; }
.tag.t-suite { background: var(--tinta); color: var(--arena); }
.tag.t-beach { background: #D7E6E3; color: #1F4B47; }
.tag.t-spa { background: var(--terciopelo-suave); color: var(--terciopelo); }
.tag.lang { box-shadow: inset 0 0 0 1px var(--linea); color: var(--tinta-2); }
.fichas .estado { font-size: .8rem; font-weight: 600; color: var(--ok); }
.fichas .gris { color: var(--tinta-2); }
.vacio { margin-top: 10px; padding-top: 12px; border-top: 1px solid var(--linea); font-size: .9rem; color: var(--tinta-2); }
.enlace { font-size: .86rem; min-height: 44px; padding: 0 4px; }

/* ---------- Escritorio: las tres cosas a la vista ---------- */
@media (min-width: 1200px) {
  .solo-movil { display: none !important; }
  body, body.v-chat { overflow: auto; }
  .escena { min-height: 100dvh; display: grid; grid-template-columns: minmax(360px, 440px) 400px minmax(320px, 400px); justify-content: center; align-items: start; gap: clamp(28px, 3.4vw, 56px); padding: 36px 32px; }
  .intro, body.v-chat .intro { display: block; padding: 0; }
  .portada { height: 380px; min-height: 0; }
  .panel { padding: 22px 0 0; max-width: none; }
  .arranque { position: static; padding: 0; background: none; }
  .boton.primario:hover { background: #2A2622; }
  .boton.primario:hover svg { transform: translateX(4px); }
  .opcion span:hover { box-shadow: inset 0 0 0 1px var(--tostado); }
  .opcion input:checked + span:hover { box-shadow: inset 0 0 0 1px var(--tinta); }
  .tel, body.v-chat .tel { display: flex; position: sticky; top: 36px; left: auto; right: auto; height: min(820px, calc(100dvh - 72px)); border-radius: 34px; border: 9px solid var(--tinta); box-shadow: 0 2px 4px rgba(10, 10, 10, .1), 0 40px 70px -38px rgba(10, 10, 10, .55); z-index: 1; }
  .chat-top { padding: 10px 10px 10px 14px; }
  .chat-top .icono:hover { background: rgba(237, 229, 218, .12); }
  .chip:hover { background: var(--arena); }
  .chip.duda:hover { background: rgba(255, 253, 249, .6); }
  .suite .elegir button:hover { background: var(--concreto); }
  .lado, body.lado-abierto .lado { display: block; position: static; padding: 0; overflow: visible; animation: none; background: none; }
  .lado-top { margin-bottom: 16px; min-height: 0; }
  .resumen .boton.claro:hover { background: rgba(237, 229, 218, .1); }
  .otra:hover { background: var(--arena); }
  .filtro:hover { color: var(--tinta); }
}
@media (max-width: 380px) {
  .ver-ficha span { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; }
}
