@font-face {
  font-family: "Momo Signature";
  src: url("/fonts/momo_signature.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --bg-primary: #faf5f7;
  --bg-surface: #ffffff;
  --bg-subtle: #f6e6ed;
  --text-primary: #2c1625;
  --text-secondary: #7a5b6c;
  --text-muted: #a88e9e;
  --brand-primary: #4a2040;
  --brand-on-primary: #ffffff;
  --brand-accent: #c8527c;
  --brand-soft: #f4d9e4;
  --border-line: #edd5e0;
  --status-success: #d2e7d6;
  --status-success-ink: #1b4423;
  --status-warning: #fbe3b8;
  --status-warning-ink: #5c3e0c;
  --status-danger: #f6cfcf;
  --status-danger-ink: #641e1e;
  --shadow-sm: 0 2px 8px rgba(74, 32, 64, 0.05);
  --shadow-lg: 0 12px 32px rgba(74, 32, 64, 0.12);
  --radio: 16px;
  --fuente-titulo: "Roboto", system-ui, -apple-system, sans-serif;
  --fuente-cuerpo: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg-primary: #1a0d18; --bg-surface: #281525; --bg-subtle: #381e34;
    --text-primary: #f8edf3; --text-secondary: #cbb4c3; --text-muted: #8d7184;
    --brand-primary: #e4a0b7; --brand-on-primary: #1a0d18; --brand-accent: #e86b97;
    --brand-soft: #42203c; --border-line: #42253e;
    --status-success: #213b26; --status-success-ink: #c0e8c7;
    --status-warning: #4a3716; --status-warning-ink: #f9e2b5;
    --status-danger: #4d2323; --status-danger-ink: #f8c8c8;
    --shadow-sm: 0 2px 10px rgba(0,0,0,.3); --shadow-lg: 0 14px 36px rgba(0,0,0,.5);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg-primary: #1a0d18; --bg-surface: #281525; --bg-subtle: #381e34;
  --text-primary: #f8edf3; --text-secondary: #cbb4c3; --text-muted: #8d7184;
  --brand-primary: #e4a0b7; --brand-on-primary: #1a0d18; --brand-accent: #e86b97;
  --brand-soft: #42203c; --border-line: #42253e;
  --status-success: #213b26; --status-success-ink: #c0e8c7;
  --status-warning: #4a3716; --status-warning-ink: #f9e2b5;
  --status-danger: #4d2323; --status-danger-ink: #f8c8c8;
  --shadow-sm: 0 2px 10px rgba(0,0,0,.3); --shadow-lg: 0 14px 36px rgba(0,0,0,.5);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--fuente-cuerpo);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  transition: background-color .25s ease, color .25s ease;
}

h1, h2, h3, .brand-font { font-family: var(--fuente-titulo); }
h1, h2, h3, p { margin: 0; }
a { color: var(--brand-primary); }
img, svg { max-width: 100%; }
button, input { font: inherit; }

/* ===== Layout base (móvil primero) ===== */
.pagina, .contenedor {
  width: min(100%, 1120px);
  margin: 0 auto;
  padding: 16px max(14px, env(safe-area-inset-right, 0px)) calc(24px + env(safe-area-inset-bottom, 0px) + var(--barra-h, 0px)) max(14px, env(safe-area-inset-left, 0px));
}

.topbar, .hero-superior {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--border-line);
}

.logo-link { color: inherit; text-decoration: none; display: inline-flex; min-width: 0; }
.logo-link:focus-visible { outline: 2px solid var(--brand-primary); outline-offset: 4px; border-radius: 8px; }
.logo-area { display: flex; align-items: center; gap: 10px; min-width: 0; }
.logo-icon {
  width: 40px; height: 40px; flex: 0 0 auto;
  border-radius: 50%;
  background: var(--brand-soft); color: var(--brand-primary);
  display: grid; place-items: center; font-size: 18px;
  border: 1px solid var(--border-line);
}
.brand-title {
  font-family: "Momo Signature", cursive;
  font-size: 28px; font-weight: 400; line-height: 1.1;
  letter-spacing: 0; color: var(--text-primary);
}
.brand-subtitle {
  font-family: var(--fuente-cuerpo);
  font-size: 10px; text-transform: uppercase; letter-spacing: .22em;
  color: var(--text-secondary); margin-top: 1px;
}

.theme-switch-btn, .tema-toggle {
  appearance: none;
  display: inline-flex; align-items: center; gap: 8px;
  flex: 0 0 auto;
  background: var(--bg-surface); color: var(--text-primary);
  border: 1px solid var(--border-line); border-radius: 999px;
  padding: 9px 14px; font-size: 13px; font-weight: 600;
  cursor: pointer; box-shadow: var(--shadow-sm);
  transition: border-color .2s, transform .15s;
}
.theme-switch-btn:hover, .tema-toggle:hover { border-color: var(--brand-primary); }
.theme-switch-btn:active, .tema-toggle:active { transform: scale(.98); }
.theme-switch-btn i { color: var(--brand-accent); }

.intro { margin-bottom: 16px; }
.intro h1 { font-size: clamp(1.55rem, 5vw, 2rem); color: var(--brand-primary); line-height: 1.15; }
.bajada { margin-top: 4px; color: var(--text-secondary); font-size: .95rem; }

main { display: grid; gap: 14px; min-width: 0; }

/* ===== Rejilla de reserva ===== */
.booking-grid, .rejilla {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  align-items: start;
  min-width: 0;
}
.col-izq, .col-der { display: contents; }
.booking-grid > *, .col-izq > *, .col-der > * { min-width: 0; }
.paso-servicios, .paso-fecha, .paso-datos, .paso-resumen { scroll-margin-top: 16px; scroll-margin-bottom: calc(var(--barra-h, 0px) + 16px); }

.paso-fecha.inset {
  background: var(--bg-primary);
  border: 0;
  box-shadow: none;
  border-radius: 0;
  padding: 4px 0;
}
.paso-fecha.inset h2 {
  font-size: 1.15rem; margin-bottom: 12px;
  display: flex; align-items: center; gap: 8px; color: var(--text-primary);
}

.card-box, .tarjeta {
  min-width: 0;
  background: var(--bg-surface);
  border: 1px solid var(--border-line);
  border-radius: var(--radio);
  padding: 16px;
  box-shadow: var(--shadow-sm);
}
.card-box h2, .tarjeta h2 {
  font-size: 1.15rem; margin-bottom: 12px;
  display: flex; align-items: center; gap: 8px; color: var(--text-primary);
}
.card-box h2 i, .tarjeta h2 i { color: var(--brand-accent); font-size: .95em; }
.card-box.chica, .tarjeta.chica { background: var(--bg-subtle); box-shadow: none; }

/* Selector de servicios (lista + buscador + chips) */
.srv-busqueda {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg-primary); color: var(--text-secondary);
  border: 1px solid var(--border-line); border-radius: 12px;
  padding: 0 12px; min-height: 44px; margin-bottom: 10px;
  transition: border-color .2s, box-shadow .2s;
}
.srv-busqueda:focus-within {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px var(--brand-soft);
}
.srv-busqueda i { color: var(--text-muted); font-size: 14px; flex: 0 0 auto; }
.srv-busqueda input {
  flex: 1; min-width: 0; border: 0; background: transparent; color: var(--text-primary);
  padding: 10px 0; min-height: 44px; font-size: 16px; outline: none; box-shadow: none;
}
.srv-busqueda input::placeholder { color: var(--text-muted); }

.srv-chips {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-bottom: 8px;
}
.srv-chips:empty { display: none; margin: 0; }
.srv-chip {
  display: inline-flex; align-items: center; gap: 6px; max-width: 100%;
  background: var(--brand-soft); color: var(--brand-primary);
  border: 1px solid var(--border-line); border-radius: 999px;
  padding: 4px 6px 4px 12px; font-size: .84rem; font-weight: 600;
}
.srv-chip-nombre { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.srv-chip-quitar {
  appearance: none; border: 0; background: transparent; color: var(--brand-primary);
  width: 32px; height: 32px; border-radius: 50%;
  display: inline-grid; place-items: center; cursor: pointer; flex: 0 0 auto;
  font-size: 18px; line-height: 1; padding: 0;
}
.srv-chip-quitar:hover { background: color-mix(in srgb, var(--brand-primary) 12%, transparent); }
.srv-chip-quitar:focus-visible { outline: 2px solid var(--brand-primary); outline-offset: 1px; }

.srv-conteo {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  font-size: .8rem; color: var(--text-secondary); margin-bottom: 8px;
}
.srv-conteo span:last-child { font-weight: 600; color: var(--text-primary); }

.srv-lista {
  max-height: 264px; overflow-y: auto; overscroll-behavior: contain;
  display: grid; gap: 8px; padding-right: 2px;
}
.srv-fila {
  appearance: none; width: 100%; min-height: 56px;
  display: flex; align-items: center; gap: 12px; text-align: left;
  background: var(--bg-subtle); color: var(--text-primary);
  border: 1px solid var(--border-line); border-radius: 12px;
  padding: 10px 12px; cursor: pointer; font: inherit;
  transition: border-color .15s, background .15s, opacity .15s;
}
.srv-fila:hover { border-color: var(--brand-primary); }
.srv-fila:focus-visible { outline: 2px solid var(--brand-primary); outline-offset: 2px; }
.srv-fila.deshabilitada, .srv-fila:disabled {
  opacity: .55; cursor: not-allowed;
}
.srv-fila.deshabilitada:hover, .srv-fila:disabled:hover { border-color: var(--border-line); }
.srv-fila-info { flex: 1 1 auto; min-width: 0; display: grid; gap: 2px; }
.srv-fila-nombre { font-weight: 600; font-size: .95rem; overflow-wrap: anywhere; }
.srv-fila-meta { font-size: .8rem; color: var(--text-secondary); display: inline-flex; align-items: center; gap: 4px; }
.srv-fila-meta i { font-size: .75rem; }
.srv-fila-precio { flex: 0 0 auto; font-weight: 700; font-size: .92rem; color: var(--brand-primary); white-space: nowrap; }
.srv-fila-precio.pendiente { color: var(--text-secondary); font-weight: 600; font-size: .82rem; }
.srv-fila-add {
  flex: 0 0 auto; width: 32px; height: 32px; border-radius: 50%;
  display: inline-grid; place-items: center;
  background: var(--brand-primary); color: var(--brand-on-primary);
  font-size: 20px; line-height: 1; font-weight: 600;
}
.srv-fila.deshabilitada .srv-fila-add, .srv-fila:disabled .srv-fila-add {
  background: var(--border-line); color: var(--text-muted);
}
.srv-vacio { padding: 8px 2px; }

.field-label, .subtitulo, label:not(.check) {
  display: block; font-size: .8rem; font-weight: 600;
  margin-bottom: 6px; color: var(--text-secondary);
}

.date-trigger {
  width: 100%;
  display: flex; align-items: center; gap: 10px;
  background: var(--bg-surface);
  border: 1px solid var(--border-line); color: var(--text-primary);
  padding: 13px 14px; border-radius: 12px;
  font-size: 15px; text-align: left; cursor: pointer;
  margin-bottom: 4px; min-height: 48px;
  box-shadow: var(--shadow-sm);
  transition: border-color .2s, box-shadow .2s;
}
.date-trigger i:first-child { color: var(--brand-accent); font-size: 16px; }
.date-trigger span { flex: 1; font-weight: 500; }
.date-trigger .caret { font-size: 11px; color: var(--text-muted); }
.date-trigger:hover, .date-trigger:focus-visible, .date-trigger[aria-expanded="true"] {
  border-color: var(--brand-primary); outline: none;
  box-shadow: 0 0 0 3px var(--brand-soft);
}
.field-hint { font-size: .78rem; color: var(--text-muted); margin: 0 0 14px; }

.time-grid, .horas {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.time-btn, .hora {
  appearance: none;
  background: var(--bg-surface); color: var(--text-primary);
  border: 1px solid var(--border-line); border-radius: 10px;
  padding: 12px 6px; min-height: 44px;
  font-size: .86rem; font-weight: 600; text-align: center;
  cursor: pointer; box-shadow: var(--shadow-sm);
  transition: border-color .15s, background .15s, color .15s, box-shadow .15s;
}
.time-btn:hover:not(:disabled), .hora:hover:not(:disabled) { border-color: var(--brand-primary); }
.time-btn.active, .hora.activa {
  background: var(--brand-primary); color: var(--brand-on-primary);
  border-color: var(--brand-primary);
}
.time-btn:disabled, .hora:disabled {
  opacity: .4; text-decoration: line-through; cursor: not-allowed;
  background: transparent; box-shadow: none;
}
.time-empty, .vacio, .time-grid .pista { grid-column: 1 / -1; width: 100%; color: var(--text-secondary); font-size: .9rem; padding: 6px 0; }
#cargando-horas, #sin-horas { width: 100%; }
.pista { color: var(--text-secondary); font-size: .84rem; margin-top: 8px; }

/* ===== Formulario ===== */
form { display: grid; gap: 12px; }
.form-group, .campo { display: grid; gap: 5px; margin: 0; }
.input-field, input[type="text"], input[type="tel"] {
  width: 100%;
  background: var(--bg-primary); color: var(--text-primary);
  border: 1px solid var(--border-line); border-radius: 12px;
  padding: 12px 13px; min-height: 46px; font-size: 16px; /* evita zoom iOS */
  outline: none; transition: border-color .2s, box-shadow .2s;
}
.input-field:focus, input[type="text"]:focus, input[type="tel"]:focus {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px var(--brand-soft);
}
.ayuda-campo, .campo small { font-size: .76rem; color: var(--text-secondary); }
.check {
  display: flex; gap: 10px; align-items: flex-start;
  font-size: .84rem; color: var(--text-secondary); cursor: pointer;
}
.check input { margin-top: 3px; accent-color: var(--brand-accent); flex: 0 0 auto; }
.privacidad { font-size: .76rem; color: var(--text-secondary); }
.turnstile { margin: 2px 0; min-height: 0; }

.btn-primary, button[type="submit"], .boton-secundario {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; min-height: 48px;
  border: 0; border-radius: 12px;
  background: var(--brand-primary); color: var(--brand-on-primary);
  padding: 13px 16px; font-weight: 700; font-size: .98rem;
  cursor: pointer; text-decoration: none; box-shadow: var(--shadow-sm);
  transition: opacity .15s, transform .1s, background .15s, color .15s, border-color .15s;
}
.btn-primary:hover, button[type="submit"]:hover, .boton-secundario:hover { opacity: .93; }
.btn-primary:active, button[type="submit"]:active { transform: scale(.99); }
.btn-primary:disabled, button[type="submit"]:disabled { opacity: .55; cursor: wait; transform: none; }
.btn-primary.btn-bloqueado, button[type="submit"].btn-bloqueado {
  background: var(--bg-subtle);
  color: var(--text-muted);
  border: 1px dashed var(--border-line);
  box-shadow: none;
  cursor: not-allowed;
  opacity: 1;
}
.btn-primary.btn-bloqueado:hover, button[type="submit"].btn-bloqueado:hover { opacity: 1; }
.btn-primary.btn-bloqueado:active, button[type="submit"].btn-bloqueado:active { transform: none; }
.btn-primary.btn-enviando, button[type="submit"].btn-enviando { cursor: wait; opacity: .85; }
.falta {
  margin: 6px 0 0;
  font-size: .82rem;
  color: var(--text-secondary);
  min-height: 1.2em;
  transition: color .2s;
}
.falta.resaltado { color: var(--brand-accent); font-weight: 600; }
.btn-enlace { width: auto; padding-inline: 22px; }
.btn-secondary {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; border-radius: 12px;
  border: 1px solid var(--border-line);
  background: transparent; color: var(--text-primary);
  padding: 13px 16px; font-weight: 600; font-size: .98rem;
  cursor: pointer; text-decoration: none;
  transition: background .15s, border-color .15s, transform .1s;
}
.btn-secondary:hover { background: color-mix(in srgb, var(--brand-soft) 50%, transparent); border-color: var(--brand-primary); }
.btn-secondary:active { transform: scale(.99); }

/* ===== Mensajes / estados ===== */
.error {
  margin: 0; padding: 10px 12px; border-radius: 10px;
  background: var(--status-danger); color: var(--status-danger-ink);
  border: 1px solid color-mix(in srgb, var(--status-danger-ink) 15%, transparent);
  font-size: .86rem;
}
.exito {
  text-align: center;
  border-color: color-mix(in srgb, var(--status-success-ink) 22%, transparent);
  background: color-mix(in srgb, var(--status-success) 30%, var(--bg-surface));
}
.sello {
  display: inline-grid; place-items: center;
  width: 46px; height: 46px; margin: 0 auto 8px;
  border-radius: 50%; background: var(--status-success); color: var(--status-success-ink);
  font-size: 20px;
}
.exito h2 { justify-content: center; color: var(--status-success-ink); }
.exito p { margin: 8px 0; }
.exito-resumen { text-align: left; margin: 12px 0; }
.exito-resumen .resumen-lista { margin-bottom: 8px; }
.exito-item { justify-content: space-between; gap: 12px; }
.seguimiento-contenido { display: grid; gap: 10px; margin: 12px 0; }
.seguimiento-resumen { margin: 0; }

/* Resumen (carrito) */
#resumen-contenido { display: grid; gap: 10px; }
.resumen-lista { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.resumen-item {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 10px;
  padding: 10px 0; border-bottom: 1px solid var(--border-line);
}
.resumen-item-info { min-width: 0; display: grid; gap: 2px; }
.resumen-item-nombre { font-weight: 600; overflow-wrap: anywhere; }
.resumen-item-meta { font-size: .82rem; color: var(--text-secondary); }
.resumen-quitar {
  appearance: none; border: 1px solid var(--border-line); background: var(--bg-primary); color: var(--text-secondary);
  width: 36px; height: 36px; border-radius: 10px; display: inline-grid; place-items: center; cursor: pointer; flex: 0 0 auto;
}
.resumen-quitar:hover { border-color: var(--brand-primary); color: var(--brand-primary); }
.resumen-totales { display: grid; gap: 6px; padding-top: 4px; }
.resumen-fila { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; font-size: .95rem; }
.resumen-fila span { color: var(--text-secondary); }
.resumen-fila.total strong { color: var(--brand-primary); font-size: 1.05rem; }
.resumen-fila.cita { flex-direction: column; gap: 2px; align-items: flex-start; }
.resumen-fila.cita strong { color: var(--text-primary); }
.resumen-nota, .resumen-aviso-precio { margin: 0; }
/* Barra inferior mini-carrito */
.barra-carrito {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px max(14px, env(safe-area-inset-right, 0px)) calc(10px + env(safe-area-inset-bottom, 0px)) max(14px, env(safe-area-inset-left, 0px));
  background: var(--bg-surface); border-top: 1px solid var(--border-line);
  box-shadow: 0 -4px 16px rgba(74, 32, 64, 0.08);
}
.barra-carrito-info { min-width: 0; }
.barra-total { font-weight: 700; color: var(--brand-primary); font-size: 1rem; line-height: 1.2; }
.barra-detalle { font-size: .8rem; color: var(--text-secondary); margin-top: 2px; }
.barra-accion { width: auto; min-width: 140px; padding-inline: 18px; flex: 0 0 auto; }
.barra-carrito.oculto { display: none !important; }
body.ocultar-barra .barra-carrito { display: none !important; }

.resumen {
  display: grid; grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 10px; margin: 12px 0; padding: 12px;
  background: var(--bg-subtle); border: 1px solid var(--border-line); border-radius: 12px;
  text-align: left;
}
.dato-etiqueta { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text-secondary); }
.etiqueta {
  display: inline-block; margin: 0 0 6px; padding: 4px 10px; border-radius: 999px;
  background: var(--brand-soft); color: var(--brand-primary);
  font-family: var(--fuente-cuerpo); font-size: .72rem; font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase;
}
.estado-aceptada { background: var(--status-success); color: var(--status-success-ink); }
.estado-rechazada, .estado-cancelada { background: var(--status-danger); color: var(--status-danger-ink); }
.estado-expirada { background: var(--status-warning); color: var(--status-warning-ink); }
.estado-completada { background: var(--bg-subtle); color: var(--text-primary); border: 1px solid var(--border-line); }
.aviso {
  margin: 10px 0; padding: 10px 12px; border-radius: 10px;
  border-left: 4px solid var(--brand-accent); background: var(--brand-soft);
  color: var(--text-primary); font-size: .88rem; text-align: left;
}

.oculto { display: none !important; }

/* ===== Pie y compatibilidad seguimiento ===== */
.pie {
  margin-top: 18px; padding-top: 14px;
  border-top: 1px solid var(--border-line);
  color: var(--text-secondary); font-size: .82rem;
}
.pie p { margin: 2px 0; }

/* Seguimiento.html usa .hero/.marca heredados parciales */
.hero { padding: 0 0 4px; background: transparent; border: 0; }
.hero h1 { color: var(--brand-primary); margin: 8px 0 4px; font-size: clamp(1.45rem, 5vw, 2rem); }
.hero .marca { margin: 0; letter-spacing: .18em; text-transform: uppercase; font-size: .72rem; font-weight: 700; color: var(--brand-primary); }
.hero-contenido { max-width: none; }
.paso { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; }
.numero {
  display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%;
  background: var(--brand-primary); color: var(--brand-on-primary); font: 700 .82rem var(--fuente-cuerpo);
}

/* ===== Calendario modal ===== */
.cal-overlay {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: end center;
  padding: 0;
  background: rgba(26,13,24,.55); backdrop-filter: blur(3px);
  opacity: 0; visibility: hidden;
  transition: opacity .2s ease, visibility .2s ease;
}
.cal-overlay.open { opacity: 1; visibility: visible; }
.cal-modal {
  width: min(100%, 400px);
  height: min(82dvh, 520px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--bg-surface); border: 1px solid var(--border-line);
  border-radius: 22px 22px 0 0; box-shadow: var(--shadow-lg);
  transform: translateY(16px); transition: transform .25s cubic-bezier(.2,.8,.2,1);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.cal-overlay.open .cal-modal { transform: none; }
@media (max-height: 500px) {
  .cal-modal { height: 100dvh; max-height: 100dvh; border-radius: 0; }
}
.cal-head {
  position: relative; z-index: 1; flex: 0 0 auto;
  background: var(--brand-primary); color: var(--brand-on-primary);
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 12px 16px; overflow: hidden;
}
.cal-title { text-align: center; position: relative; z-index: 1; }
.cal-month { font-family: var(--fuente-titulo); font-size: 26px; line-height: 1.1; }
.cal-year { font-size: 12px; letter-spacing: .28em; opacity: .85; margin-top: 2px; }
.cal-nav {
  position: relative; z-index: 1;
  width: 44px; height: 44px; border-radius: 50%; border: 0;
  background: color-mix(in srgb, var(--brand-on-primary) 14%, transparent);
  color: inherit; cursor: pointer; display: grid; place-items: center; font-size: 14px;
}
.cal-nav:hover:not(:disabled) { background: color-mix(in srgb, var(--brand-on-primary) 26%, transparent); }
.cal-nav:disabled { opacity: .3; cursor: not-allowed; }
.cal-nav:focus-visible { outline: 2px solid var(--brand-on-primary); outline-offset: 2px; }
.cal-petal {
  position: absolute; top: -16px; border-radius: 0 100% 0 100%;
  background: var(--brand-on-primary); opacity: 0; pointer-events: none;
  animation: petal-fall linear infinite;
}
@keyframes petal-fall {
  0% { transform: translate(0,0) rotate(0); opacity: 0 }
  15% { opacity: .32 }
  100% { transform: translate(28px,120px) rotate(260deg); opacity: 0 }
}
.cal-body { padding: 14px 14px 4px; flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.cal-week, .cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.cal-week { flex: 0 0 auto; }
.cal-week span {
  text-align: center; font-size: 11px; font-weight: 700;
  letter-spacing: .06em; color: var(--text-muted); padding-bottom: 8px;
}
.cal-grid { gap: 4px 0; grid-template-rows: repeat(6, 1fr); flex: 1 1 auto; align-content: stretch; }
.cal-cell-empty { min-height: 44px; }
.cal-day {
  position: relative; border: 0; background: transparent;
  color: var(--text-primary); font-size: 15px; cursor: pointer;
  border-radius: 50%; display: grid; place-items: center;
  width: 100%; height: 100%; min-height: 44px; max-height: 52px; justify-self: center;
}
.cal-day:hover:not(:disabled) { background: var(--brand-soft); }
.cal-day:focus-visible { outline: 2px solid var(--brand-primary); outline-offset: -2px; }
.cal-day:disabled { color: var(--text-muted); opacity: .45; cursor: not-allowed; }
.cal-day.closed:disabled { text-decoration: line-through; }
.cal-day.today::after {
  content: ""; position: absolute; bottom: 16%; left: 50%;
  width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%;
  background: var(--brand-accent);
}
.cal-day.sel { background: var(--brand-soft); font-weight: 700; }
.cal-ring {
  position: absolute; inset: -3px; width: calc(100% + 6px); height: calc(100% + 6px);
  pointer-events: none; overflow: visible;
}
.cal-ring path {
  fill: none; stroke: var(--brand-accent); stroke-width: 2; stroke-linecap: round;
  stroke-dasharray: 100; stroke-dashoffset: 100; animation: ring-draw .55s ease-out forwards;
}
@keyframes ring-draw { to { stroke-dashoffset: 0 } }
.cal-foot {
  display: flex; flex-wrap: wrap; gap: 6px 16px; justify-content: center; flex: 0 0 auto;
  padding: 8px 14px calc(14px + env(safe-area-inset-bottom, 0px));
  font-size: 11px; color: var(--text-secondary);
}
.cal-foot span { display: inline-flex; align-items: center; gap: 6px; }
.lg-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--brand-accent); }
.lg-sel { width: 14px; height: 14px; border-radius: 50%; background: var(--brand-soft); border: 1.5px solid var(--brand-accent); }
.lg-off { text-decoration: line-through; opacity: .75; }

@media (min-width: 480px) {
  .time-grid, .horas { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (min-width: 720px) {
  .pagina, .contenedor {
    padding: 24px max(20px, env(safe-area-inset-right, 0px)) calc(36px + env(safe-area-inset-bottom, 0px) + var(--barra-h, 0px)) max(20px, env(safe-area-inset-left, 0px));
  }
  .booking-grid { max-width: 680px; margin: 0 auto; }
  .time-grid, .horas { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .cal-overlay { place-items: center; padding: 16px; }
  .cal-modal { height: 520px; border-radius: 22px; }
}

@media (min-width: 860px) {
  .booking-grid, .rejilla {
    max-width: none;
    grid-template-columns: 1.15fr 1fr;
    gap: 20px;
    align-items: start;
  }
  .col-izq, .col-der {
    display: grid;
    gap: 20px;
    align-content: start;
    min-width: 0;
  }
  .col-der { position: sticky; top: 16px; align-self: start; }
  .paso-fecha.inset { padding: 4px 0; }
  .card-box, .tarjeta { padding: 20px; }
  .intro h1 { font-size: 2.1rem; }
  .barra-carrito { display: none !important; }
  body { --barra-h: 0px !important; }
  .pagina, .contenedor { padding-bottom: calc(36px + env(safe-area-inset-bottom, 0px)); }
}

@media (max-width: 380px) {
  .brand-subtitle { display: none; }
  .theme-switch-btn span, .tema-toggle span { display: none; }
  .time-grid, .horas { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .time-btn, .hora { font-size: .8rem; padding: 10px 4px; }
  .resumen { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .cal-petal { display: none; }
  .cal-overlay, .cal-modal, .cal-ring path, .barra-carrito, .service-card, .time-btn, .hora { transition: none; animation: none; }
  .cal-ring path { stroke-dashoffset: 0; }
}
