:root {
  --arena: #f7f1e8;
  --arena-2: #efe6d8;
  --salvia: #b8c9b8;
  --salvia-oscura: #7a947a;
  --azul: #a8c5d4;
  --azul-oscuro: #5a7f94;
  --coral: #e8a090;
  --coral-fuerte: #d47868;
  --fucsia: #e11d8a;
  --fucsia-suave: #f472b6;
  --texto: #3d4a52;
  --suave: #6b7a84;
  --blanco: #fffdf9;
  --ocupado: #d4a5a5;
  --tramite: #e8d4a8;
  --ok: #9bb89b;
  --sombra: 0 10px 30px rgba(61, 74, 82, 0.08);
  --radio: 1.1rem;
  --fuente: "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--fuente);
  color: var(--texto);
  background: var(--arena);
  line-height: 1.45;
}
a { color: var(--azul-oscuro); }
img { max-width: 100%; display: block; }
button, input, textarea, select {
  font: inherit;
  color: inherit;
}

.pantalla { display: none; min-height: 100dvh; }
.pantalla.activa { display: block; }

.hero {
  min-height: 92dvh;
  padding: 0.9rem 1rem 2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  background:
    linear-gradient(180deg, rgba(28, 36, 44, 0.35) 0%, rgba(28, 36, 44, 0.12) 35%, rgba(28, 36, 44, 0.55) 100%),
    url("/img/hero-atardecer.jpg") center / cover no-repeat;
  color: #fff;
}
.hero-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.55rem;
  flex-wrap: wrap;
}
.hero-bajo { max-width: 34rem; }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(255, 253, 249, 0.82);
  backdrop-filter: blur(8px);
  border-radius: 999px;
  padding: 0.32rem 0.7rem;
  font-size: 0.72rem;
  color: var(--azul-oscuro);
  text-decoration: none;
  border: 1px solid rgba(255,255,255,0.6);
}
.lugar-pill {
  margin: 0 0 0.55rem;
  color: #2f3d45;
}
.hero h1 {
  margin: 0 0 0.45rem;
  font-weight: 650;
  font-size: clamp(2rem, 8vw, 3.2rem);
  line-height: 1.05;
  max-width: 12ch;
  color: #fff;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.35);
}
.hero .lugar {
  margin: 0 0 0.85rem;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.95rem;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.35);
}
.frases {
  display: grid;
  gap: 0.4rem;
}
.frases span {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  background: rgba(255, 253, 249, 0.86);
  border-radius: 999px;
  padding: 0.38rem 0.75rem;
  font-size: 0.8rem;
  color: var(--texto);
}
.acciones-hero {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.btn {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 0.95rem 1.2rem;
  font-weight: 650;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 0.4rem;
}
.btn-mini {
  padding: 0.38rem 0.75rem;
  font-size: 0.78rem;
  font-weight: 650;
  line-height: 1.1;
}
.btn-reserva {
  background: var(--coral-fuerte);
  color: #fff;
  font-size: 1.15rem;
  box-shadow: 0 12px 24px rgba(212, 120, 104, 0.35);
  letter-spacing: 0.02em;
}
.btn-reserva.btn-mini {
  font-size: 0.78rem;
  box-shadow: 0 6px 14px rgba(212, 120, 104, 0.28);
}
.btn-reserva:active { transform: scale(0.98); }
.btn-suave {
  background: rgba(255, 253, 249, 0.88);
  color: var(--texto);
  border: 1px solid rgba(90, 127, 148, 0.18);
}
.btn-salvia {
  background: var(--salvia-oscura);
  color: #fff;
}
.btn-outline {
  background: transparent;
  border: 1.5px solid rgba(90, 127, 148, 0.35);
  color: var(--azul-oscuro);
}

.seccion {
  padding: 1.6rem 1.2rem 2rem;
  max-width: 720px;
  margin: 0 auto;
}
.seccion h2 {
  margin: 0 0 0.9rem;
  font-size: 1.35rem;
  font-weight: 650;
}
.grid-espacios {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}
.tarjeta-espacio {
  background: var(--blanco);
  border-radius: var(--radio);
  padding: 0.9rem;
  box-shadow: var(--sombra);
  border: 0;
  text-align: left;
  cursor: pointer;
  min-height: 7.2rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0.35rem;
}
.tarjeta-espacio:nth-child(1) { background: linear-gradient(160deg, #f3ebe0, #e7f0e5); }
.tarjeta-espacio:nth-child(2) { background: linear-gradient(160deg, #e8f0f4, #f4ebe5); }
.tarjeta-espacio:nth-child(3) { background: linear-gradient(160deg, #f0e8ef, #e8f1ec); }
.tarjeta-espacio:nth-child(4) { background: linear-gradient(160deg, #e6f1f5, #ebe8f3); }
.tarjeta-espacio:nth-child(5) { background: linear-gradient(160deg, #f2ebe3, #e9efe6); }
.tarjeta-espacio:nth-child(6) { background: linear-gradient(160deg, #efe8e3, #e5eef2); }
.tarjeta-espacio strong { font-size: 1.02rem; }
.tarjeta-espacio span { font-size: 0.8rem; color: var(--suave); }

.modal {
  position: fixed;
  inset: 0;
  background: rgba(45, 58, 66, 0.42);
  display: none;
  align-items: flex-end;
  justify-content: center;
  padding: 1rem;
  z-index: 40;
}
.modal.abierto { display: flex; }
.modal-caja {
  width: min(520px, 100%);
  background: var(--blanco);
  border-radius: 1.4rem 1.4rem 1.1rem 1.1rem;
  padding: 1.2rem 1.2rem 1.4rem;
  box-shadow: var(--sombra);
}
.modal-caja h3 { margin: 0 0 0.5rem; }
.modal-caja p { margin: 0 0 1rem; color: var(--suave); }
.foto-placeholder {
  height: 140px;
  border-radius: 1rem;
  margin-bottom: 0.9rem;
  background: linear-gradient(135deg, var(--azul), var(--salvia));
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 600;
}

.barra-sup {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1rem;
  background: rgba(247, 241, 232, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(90, 127, 148, 0.12);
}
.barra-sup button {
  border: 0;
  background: var(--blanco);
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: var(--sombra);
}
.barra-sup h2 {
  margin: 0;
  font-size: 1.05rem;
}

.leyenda {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 0.2rem 0 1rem;
  font-size: 0.8rem;
  color: var(--suave);
}
.punto {
  display: inline-block;
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 999px;
  margin-right: 0.25rem;
  vertical-align: middle;
}
.punto.libre { background: var(--ok); }
.punto.ocupado { background: var(--ocupado); }
.punto.tramite { background: var(--tramite); }
.punto.sel { background: var(--fucsia); }

.cal-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.7rem;
}
.cal-nav strong { font-size: 1rem; }
.cal-nav button {
  border: 0;
  background: var(--blanco);
  border-radius: 999px;
  width: 2.2rem;
  height: 2.2rem;
  cursor: pointer;
  box-shadow: var(--sombra);
}
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.35rem;
}
.cal-dow {
  text-align: center;
  font-size: 0.72rem;
  color: var(--suave);
  padding: 0.2rem 0;
}
.cal-dia {
  aspect-ratio: 1;
  border: 0;
  border-radius: 0.85rem;
  background: #eaf3ea;
  color: var(--texto);
  cursor: pointer;
  font-weight: 600;
  font-size: 0.88rem;
}
.cal-dia.vacio { background: transparent; cursor: default; }
.cal-dia.pasado { background: #ebe6df; color: #a8b0b6; cursor: not-allowed; }
.cal-dia.ocupado { background: var(--ocupado); color: #fff; cursor: not-allowed; }
.cal-dia.tramite { background: var(--tramite); color: #6a5a3a; cursor: not-allowed; }
.cal-dia.sel,
.cal-dia.rango { background: var(--fucsia); color: #fff; }
.cal-dia.rango { background: var(--fucsia-suave); opacity: 1; }

.resumen-box, .form-box, .ok-box {
  background: var(--blanco);
  border-radius: var(--radio);
  padding: 1rem;
  box-shadow: var(--sombra);
  margin-top: 1rem;
}
.resumen-box dl {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.35rem 0.8rem;
  margin: 0;
}
.resumen-box dt { color: var(--suave); }
.resumen-box dd { margin: 0; font-weight: 650; text-align: right; }
.descuento { color: var(--salvia-oscura) !important; }

.form-box label {
  display: grid;
  gap: 0.3rem;
  margin-bottom: 0.75rem;
  font-size: 0.88rem;
  color: var(--suave);
}
.form-box input, .form-box textarea {
  width: 100%;
  border: 1px solid rgba(90, 127, 148, 0.22);
  border-radius: 0.8rem;
  padding: 0.75rem 0.85rem;
  background: #fff;
}
.form-box textarea { min-height: 4.5rem; resize: vertical; }
.error {
  color: #b05050;
  background: #f8e8e8;
  border-radius: 0.8rem;
  padding: 0.7rem 0.85rem;
  margin: 0.6rem 0;
  font-size: 0.9rem;
  display: none;
}
.error.visible { display: block; }

.ok-box h3 { margin-top: 0; }
.ok-box p { color: var(--suave); }
.pago-box {
  background: #f3f7f2;
  border-radius: 0.9rem;
  padding: 0.85rem 0.95rem;
  margin: 0.8rem 0;
  font-size: 0.9rem;
}
.pago-box p { margin: 0.25rem 0; color: var(--texto); }
.pago-box strong { color: var(--salvia-oscura); }
.modal-foto-img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 1rem;
  margin-bottom: 0.9rem;
  display: block;
}
.tarjeta-espacio.has-foto {
  background-size: cover !important;
  background-position: center !important;
  color: #fff;
  text-shadow: 0 1px 8px rgba(0,0,0,0.45);
}
.tarjeta-espacio.has-foto span { color: rgba(255,255,255,0.9); }

.pie {
  text-align: center;
  padding: 1.5rem 1rem 2.5rem;
  color: var(--suave);
  font-size: 0.82rem;
}
.pie a { color: var(--azul-oscuro); }

@media (min-width: 760px) {
  .grid-espacios { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hero { padding: 2rem 2.5rem 3rem; border-radius: 0 0 2rem 2rem; }
  .modal { align-items: center; }
}
