:root {
  --fondo: #fbf6f3; --tarjeta: #ffffff; --texto: #2c1f1b; --suave: #7d6a63; --linea: #efe3dd;
  --rosa: #c9707f; --rosa-claro: #f6e1e3; --cacao: #2c1f1b; --ok: #4f9a74; --aviso: #d9822b;
  --menu-alto: 64px; --abajo: env(safe-area-inset-bottom, 0px); --arriba: env(safe-area-inset-top, 0px);
  --radio: 18px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--fondo); color: var(--texto); font-family: 'Outfit', system-ui, sans-serif; font-size: 16px; }
body.sin-scroll { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
[hidden] { display: none !important; }
h1, h2 { margin: 0; }

.vista { max-width: 560px; margin: 0 auto; padding: calc(14px + var(--arriba)) 16px calc(var(--menu-alto) + var(--abajo) + 28px); min-height: 100vh; }

/* ---------- cabeceras ---------- */
.cabecera { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 6px 0 16px; }
.cabecera h1 { font-size: 28px; font-weight: 600; letter-spacing: -.01em; }
.cabecera small { color: var(--suave); }
.cabecera-volver { justify-content: flex-start; }
.cabecera-volver h1 { font-size: 22px; }
.perfil-boton { width: 42px; height: 42px; border-radius: 50%; background: var(--rosa-claro); color: var(--rosa); display: grid; place-items: center; font-weight: 600; }
.volver { flex: 0 0 40px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--tarjeta); box-shadow: 0 1px 4px rgba(0,0,0,.08); font-size: 26px; line-height: 1; padding-bottom: 3px; color: var(--texto); }
.titulo { font-size: 18px; font-weight: 600; margin: 26px 0 10px; display: flex; justify-content: space-between; align-items: baseline; }
.titulo a { font-size: 14px; color: var(--rosa); font-weight: 500; }
.titulo small { font-weight: 400; color: var(--suave); font-size: 13px; }
.sub { color: var(--suave); margin: -8px 0 12px; }
.etiqueta { color: var(--suave); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.nota-demo { font-size: 12px; color: var(--suave); margin: 4px 0 10px; }
.vacio { color: var(--suave); text-align: center; padding: 20px 0; }
.vacio-grande { text-align: center; padding: 40px 0; color: var(--suave); }

/* ---------- botones ---------- */
.boton { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; border-radius: 999px; padding: 13px 20px; background: var(--cacao); color: #fff; font-weight: 600; font-size: 15px; cursor: pointer; }
.boton:disabled { opacity: .35; }
.boton-claro { background: var(--rosa-claro); color: var(--cacao); }
.boton-peque { padding: 8px 14px; font-size: 13.5px; }
.boton-ancho { width: 100%; margin-top: 12px; }
.chip { flex: 0 0 auto; border: 1px solid var(--linea); background: var(--tarjeta); border-radius: 999px; padding: 8px 14px; font-size: 14px; }
.chip.activa { background: var(--cacao); color: #fff; border-color: var(--cacao); }
.chips { display: flex; gap: 8px; overflow-x: auto; margin: 12px -16px 0; padding: 0 16px 4px; scrollbar-width: none; }
.chips::-webkit-scrollbar, .carrusel::-webkit-scrollbar, .dias::-webkit-scrollbar, .sel-fila::-webkit-scrollbar { display: none; }
.enlace { color: var(--rosa); font-weight: 500; font-size: 14.5px; padding: 6px 2px; display: inline-block; }

/* ---------- tarjetas ---------- */
.tarjeta { display: block; background: var(--tarjeta); border-radius: var(--radio); padding: 16px; margin-bottom: 12px; box-shadow: 0 1px 2px rgba(60,30,20,.04), 0 6px 20px rgba(60,30,20,.05); }
.barra { height: 8px; border-radius: 99px; background: var(--linea); overflow: hidden; margin: 10px 0 8px; }
.barra i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #e8a3b3, var(--rosa)); }
.barra i.urgente { background: linear-gradient(90deg, #f2b880, var(--aviso)); }
.tarjeta-unas { background: linear-gradient(160deg, #fff, #fbeef0); }
.unas-top { display: flex; gap: 14px; align-items: center; }
.unas-top canvas { flex: 0 0 auto; background: #f6e6e1; border-radius: 12px; padding: 2px; }
.unas-top div { display: flex; flex-direction: column; gap: 2px; }
.unas-top small { color: var(--suave); font-size: 12.5px; }
.unas-top span { color: var(--suave); font-size: 14px; }
.tarjeta-unas p { margin: 4px 0 14px; font-size: 15px; line-height: 1.4; }
.tarjeta-unas .boton { width: 100%; }
.fila-cita { display: flex; gap: 12px; align-items: center; margin-top: 6px; }
.fila-cita div { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.fila-cita span { color: var(--suave); font-size: 14px; }
.avatar { flex: 0 0 auto; width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 18px; }
.tarjeta-probar { display: flex; flex-direction: column; gap: 10px; background: linear-gradient(140deg, #2c1f1b, #5a3a40); color: #fff; }
.tarjeta-probar canvas { width: 100%; height: 110px; display: block; }
.tarjeta-probar div { display: flex; flex-direction: column; gap: 2px; }
.tarjeta-probar b { font-size: 18px; }
.tarjeta-probar span { color: #e6cfd0; font-size: 14px; }
.puntos { display: flex; align-items: center; gap: 12px; }
.puntos > div { flex: 1; min-width: 0; }
.puntos small { color: var(--suave); font-size: 12.5px; }
.puntos .barra { margin: 6px 0 4px; height: 6px; }
.puntos strong { font-size: 22px; color: var(--rosa); }

/* ---------- salones ---------- */
.carrusel { display: flex; gap: 12px; overflow-x: auto; margin: 0 -16px; padding: 0 16px 8px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.carrusel .salon-tarjeta { flex: 0 0 72%; scroll-snap-align: start; }
.salon-tarjeta { display: block; background: var(--tarjeta); border-radius: var(--radio); overflow: hidden; margin-bottom: 12px; box-shadow: 0 6px 20px rgba(60,30,20,.06); }
.salon-portada { height: 96px; background: radial-gradient(120% 120% at 100% 0%, rgba(255,255,255,.55), transparent 55%), linear-gradient(135deg, var(--c), color-mix(in srgb, var(--c) 55%, #2c1f1b)); display: flex; align-items: flex-end; padding: 10px 14px; }
.salon-portada span { color: rgba(255,255,255,.9); font-weight: 600; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; }
.salon-info { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 3px; }
.salon-info b { font-size: 17px; }
.salon-info span, .salon-info small { color: var(--suave); font-size: 14px; }
.salon-info small { font-size: 12.5px; }
.nota { color: var(--texto); font-weight: 600; }
.nota small { color: var(--suave); font-weight: 400; }
.buscador { display: flex; align-items: center; gap: 10px; background: var(--tarjeta); border-radius: 14px; padding: 0 14px; box-shadow: 0 1px 6px rgba(60,30,20,.06); }
.buscador svg { width: 20px; height: 20px; fill: none; stroke: var(--suave); stroke-width: 2; }
.buscador input { flex: 1; border: 0; outline: 0; background: none; font: inherit; padding: 14px 0; min-width: 0; }

.portada-grande { position: relative; margin: calc(-14px - var(--arriba)) -16px 0; padding: calc(64px + var(--arriba)) 20px 22px; color: #fff;
  background: radial-gradient(120% 120% at 100% 0%, rgba(255,255,255,.5), transparent 55%), linear-gradient(135deg, var(--c), color-mix(in srgb, var(--c) 45%, #2c1f1b)); }
.portada-grande .volver { position: absolute; top: calc(12px + var(--arriba)); left: 14px; }
.portada-grande h1 { font-size: 26px; }
.portada-grande span { opacity: .9; }
.ficha-datos { display: flex; flex-direction: column; gap: 4px; margin: 14px 0; color: var(--suave); font-size: 14px; }
.puntos-salon > div:first-child { display: flex; justify-content: space-between; align-items: center; }
.puntos-salon b { font-size: 24px; color: var(--rosa); }
.puntos-salon b small { font-size: 14px; color: var(--suave); }
.puntos-salon > small { color: var(--suave); font-size: 13px; }
.servicios { list-style: none; margin: 0; padding: 0; background: var(--tarjeta); border-radius: var(--radio); }
.servicios li { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--linea); }
.servicios li:last-child { border-bottom: 0; }
.servicios li div { flex: 1; display: flex; flex-direction: column; }
.servicios small { color: var(--suave); }
.horario { color: var(--suave); line-height: 1.7; margin: 0; }

/* ---------- reservar ---------- */
.dias { display: flex; gap: 8px; overflow-x: auto; margin: 0 -16px; padding: 2px 16px 6px; scrollbar-width: none; }
.dia { flex: 0 0 58px; border: 1px solid var(--linea); background: var(--tarjeta); border-radius: 16px; padding: 8px 0; display: flex; flex-direction: column; align-items: center; }
.dia b { font-size: 20px; }
.dia small { font-size: 12px; color: var(--suave); }
.dia.activa { background: var(--cacao); border-color: var(--cacao); color: #fff; }
.dia.activa small { color: #e8d6d0; }
.horas { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.hora { border: 1px solid var(--linea); background: var(--tarjeta); border-radius: 12px; padding: 10px 0; font-size: 15px; }
.hora:disabled { opacity: .3; text-decoration: line-through; }
.hora.activa { background: var(--cacao); color: #fff; border-color: var(--cacao); }
.opciones-diseno { display: flex; flex-direction: column; gap: 8px; }
.opcion { display: flex; gap: 12px; align-items: center; text-align: left; border: 1.5px solid var(--linea); background: var(--tarjeta); border-radius: 16px; padding: 10px 14px; }
.opcion.activa { border-color: var(--cacao); box-shadow: inset 0 0 0 1px var(--cacao); }
.opcion div { display: flex; flex-direction: column; }
.opcion small { color: var(--suave); font-size: 13px; }
.icono-op { width: 34px; text-align: center; font-size: 22px; }
textarea, .campo input { width: 100%; border: 1px solid var(--linea); border-radius: 14px; padding: 12px; font: inherit; background: var(--tarjeta); resize: vertical; }
.campo { display: block; color: var(--suave); font-size: 14px; }
.campo input { margin-top: 6px; color: var(--texto); font-size: 16px; }
.confirmar { position: sticky; bottom: calc(var(--menu-alto) + var(--abajo) + 10px); margin-top: 20px; display: flex; align-items: center; gap: 12px; background: var(--tarjeta); border-radius: 20px; padding: 12px 12px 12px 16px; box-shadow: 0 10px 30px rgba(60,30,20,.15); }
.confirmar div { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.confirmar small { color: var(--suave); font-size: 12.5px; }

/* ---------- probar ---------- */
.escaparate { background: radial-gradient(90% 90% at 50% 100%, #f3dcd3, #fbf1ec); border-radius: 22px; padding: 6px; }
.escaparate canvas { display: block; width: 100%; height: 190px; }
.resumen-sel { text-align: center; color: var(--suave); font-size: 14px; margin: 12px 0 6px; }
.botones-probar { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.botones-probar .boton { padding: 13px 8px; }

/* selector compartido */
.selector { margin: 0 -16px; }
.sel-pestanas { display: flex; gap: 4px; padding: 0 16px 8px; }
.sel-pestanas button { flex: 1; border: 0; background: none; padding: 8px 4px; border-radius: 999px; color: var(--suave); font-size: 14.5px; }
.sel-pestanas button.activa { background: var(--rosa-claro); color: var(--texto); font-weight: 600; }
.sel-fila { display: flex; gap: 10px; overflow-x: auto; padding: 4px 16px 8px; scrollbar-width: none; }
.sel-chips { padding-top: 4px; }
.muestra { flex: 0 0 auto; width: 42px; height: 42px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--linea); padding: 0; }
.muestra.activa { box-shadow: 0 0 0 2.5px var(--cacao); }
.muestra-libre { position: relative; overflow: hidden; background: conic-gradient(red, yellow, lime, cyan, blue, magenta, red); }
.muestra-libre input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; }
.ficha { flex: 0 0 auto; width: 74px; border: 0; background: var(--tarjeta); border-radius: 14px; padding: 6px 4px 8px; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 11.5px; line-height: 1.15; box-shadow: 0 1px 4px rgba(60,30,20,.06); }
.ficha.activa { box-shadow: inset 0 0 0 2px var(--cacao); }
.ficha-texto { width: 116px; padding: 10px 8px; text-align: center; font-size: 13px; }
.ficha-texto small { color: var(--suave); font-size: 11px; }
/* versión oscura dentro de la cámara */
.selector-oscuro .sel-pestanas button { color: #cdbab2; }
.selector-oscuro .sel-pestanas button.activa { background: rgba(255,255,255,.16); color: #fff; }
.selector-oscuro .ficha { background: rgba(255,255,255,.08); color: #eee; box-shadow: none; }
.selector-oscuro .ficha.activa { box-shadow: inset 0 0 0 2px #f2d6cf; }
.selector-oscuro .ficha-texto small { color: #bba79f; }
.selector-oscuro .muestra { border-color: rgba(255,255,255,.4); box-shadow: none; }
.selector-oscuro .muestra.activa { box-shadow: 0 0 0 2.5px #fff; }
.selector-oscuro .chip { background: none; color: #eee; border-color: rgba(255,255,255,.3); }
.selector-oscuro .chip.activa { background: #fff; color: var(--cacao); }

/* ---------- citas ---------- */
.segmentos { display: flex; background: #f1e6e1; border-radius: 999px; padding: 4px; margin-bottom: 14px; }
.segmentos button { flex: 1; border: 0; background: none; border-radius: 999px; padding: 9px; font-size: 14.5px; color: var(--suave); }
.segmentos button.activa { background: var(--tarjeta); color: var(--texto); font-weight: 600; box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.cita em { font-style: normal; font-size: 12px; padding: 4px 10px; border-radius: 99px; align-self: flex-start; }
.estado-pendiente { background: #fff2e2; color: #a5631d; }
.estado-hecha { background: #e4f3ea; color: #2f7a52; }
.estado-cancelada { background: #f2eceb; color: #8d7d78; }
.cita-fecha { margin: 12px 0 0; font-size: 15px; }
.cita-diseno { display: flex; gap: 10px; align-items: center; margin-top: 10px; padding: 8px 10px; background: #fbf3f0; border-radius: 12px; }
.cita-diseno small { color: var(--suave); }
.cita-nota { color: var(--suave); font-style: italic; margin: 8px 0 0; }
.cita-acciones { display: flex; justify-content: flex-end; margin-top: 10px; }

/* ---------- mensajes ---------- */
.mensaje { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--linea); }
.mensaje > div { flex: 1; min-width: 0; }
.mensaje-top { display: flex; justify-content: space-between; gap: 8px; }
.mensaje-top small { color: var(--suave); white-space: nowrap; }
.mensaje p { margin: 6px 0 10px; line-height: 1.45; font-size: 15px; }
.mensaje.nuevo .mensaje-top b::after { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--rosa); margin-left: 6px; vertical-align: middle; }
.sello { display: inline-block; margin-top: 4px; font-style: normal; font-size: 11.5px; padding: 3px 9px; border-radius: 99px; background: #fbe6e9; color: #a24a5a; }
.sello-puntos { background: #fdf0d9; color: #9a6514; }
.sello-promo { background: #ece6fb; color: #5e47a8; }
.enlace-panel { display: flex; flex-direction: column; gap: 4px; }
.enlace-panel span { color: var(--suave); font-size: 14px; }

/* ---------- menú inferior ---------- */
.menu { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; height: calc(var(--menu-alto) + var(--abajo)); padding-bottom: var(--abajo);
  display: flex; background: rgba(255,255,255,.94); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--linea); }
.menu a { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11px; color: #a3918a; }
.menu svg { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.menu a.activa { color: var(--cacao); font-weight: 600; }
.menu a.activa svg { stroke-width: 2.2; }
.menu-centro svg { width: 44px; height: 44px; padding: 9px; margin-top: -18px; border-radius: 50%; background: var(--cacao); stroke: #fff !important; box-shadow: 0 6px 16px rgba(44,31,27,.3); }
#globo { position: absolute; top: 6px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--rosa); color: #fff; font-size: 11px; display: grid; place-items: center; }

.aviso-flotante { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--menu-alto) + var(--abajo) + 18px); z-index: 30; background: var(--cacao); color: #fff; padding: 12px 18px; border-radius: 14px; font-size: 14.5px; box-shadow: 0 8px 24px rgba(0,0,0,.2); width: max-content; max-width: calc(100% - 32px); }

/* ---------- cámara ---------- */
.camara { position: fixed; inset: 0; z-index: 20; background: #000; color: #fff; }
#cam-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
#cam-lienzo { position: absolute; inset: 0; width: 100%; height: 100%; }
.camara.espejo #cam-lienzo { transform: scaleX(-1); }
.cam-arriba { position: absolute; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; align-items: center; padding: calc(10px + var(--arriba)) 12px 10px; background: linear-gradient(rgba(0,0,0,.45), transparent); }
.cam-icono { width: 42px; height: 42px; border-radius: 50%; border: 0; background: rgba(0,0,0,.4); font-size: 20px; color: #fff; }
.cam-aviso { position: absolute; top: calc(70px + var(--arriba)); left: 16px; right: 16px; margin: 0; text-align: center; padding: 10px 14px; border-radius: 14px; background: rgba(0,0,0,.55); font-size: 14px; }
.cam-cargando { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; background: rgba(20,12,10,.85); padding: 30px; text-align: center; }
.cam-cargando i { width: 38px; height: 38px; border-radius: 50%; border: 3px solid rgba(255,255,255,.2); border-top-color: #fff; animation: gira 0.9s linear infinite; }
.cam-cargando.error i { display: none; }
@keyframes gira { to { transform: rotate(360deg); } }
.cam-panel { position: absolute; left: 0; right: 0; bottom: 0; padding: 10px 16px calc(14px + var(--abajo)); background: rgba(24,16,14,.86); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-radius: 22px 22px 0 0; }
.cam-resumen { margin: 0 0 8px; text-align: center; font-size: 13px; color: #e6cfd0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cam-botones { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 6px; }
.cam-botones .boton { background: #fff; color: var(--cacao); }
.cam-botones .boton-claro { background: rgba(255,255,255,.15); color: #fff; }
.cam-botones .boton[hidden] + * , .cam-botones:has([hidden]) { grid-template-columns: 1fr; }

@media (min-width: 700px) { .carrusel .salon-tarjeta { flex-basis: 46%; } .cam-panel { left: 50%; width: 560px; transform: translateX(-50%); } }
