/* RememberCuts — "letrero de neón en la ventana de la barbería, de noche".
   Negro puro, azul helénico para halos y superficies, blanco neón para lo que brilla.
   Títulos en Rochester (cursiva victoriana de oeste) tratados como tubo de neón. */
:root {
  --negro: #000;
  --noche: #050b16;          /* vidrio nocturno: negro teñido de helénico */
  --noche-2: #0a1628;
  --helenico: #0d5eaf;       /* azul de la bandera griega */
  --helenico-luz: #5a9ceb;   /* versión legible para texto chico sobre negro (6.9:1) */
  --neon: #f5fbff;           /* blanco neón */
  --humo: #8d97a8;           /* texto secundario (6.6:1) */
  --linea: rgba(90, 156, 235, .2);
  --linea-fuerte: rgba(90, 156, 235, .45);
  --peligro: #ff7a85;

  --brillo-neon: 0 0 1px #fff, 0 0 6px rgba(220, 236, 255, .9), 0 0 16px rgba(90, 156, 235, .85), 0 0 38px rgba(13, 94, 175, .9), 0 0 76px rgba(13, 94, 175, .6);
  --brillo-suave: 0 0 8px rgba(90, 156, 235, .55), 0 0 22px rgba(13, 94, 175, .45);
  --halo-caja: 0 0 0 1px var(--linea), 0 0 24px rgba(13, 94, 175, .25), inset 0 0 18px rgba(13, 94, 175, .12);

  --script: "Rochester", "Brush Script MT", cursive;
  --texto: "Archivo", system-ui, sans-serif;

  --curva: cubic-bezier(.19, 1, .22, 1);          /* expo.out, la de Apple */
  --resorte: cubic-bezier(.34, 1.56, .64, 1);     /* rebote corto para presionar */
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--negro);
  color: var(--neon);
  font: 400 16px/1.55 var(--texto);
  font-stretch: 100%;
  min-height: 100dvh;
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--helenico-luz); }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--helenico-luz); outline-offset: 3px; border-radius: 6px; }

/* --- Tipografía ----------------------------------------------------------- */
h1, h2, h3 { margin: 0; font-weight: 400; line-height: 1.05; }
h1, h2 { font-family: var(--script); letter-spacing: .01em; }
h1 { font-size: clamp(2.6rem, 9vw, 4.2rem); }
h2 { font-size: clamp(2.1rem, 7vw, 2.8rem); }
h3 { font-family: var(--texto); font-size: 1.05rem; font-weight: 600; letter-spacing: -.005em; }
.suave { color: var(--humo); }
.chico { font-size: .875rem; }
.cifra-reloj { font-family: var(--texto); font-stretch: 62%; font-weight: 300; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }

/* Neón: apagado = tubo de vidrio azul oscuro; encendido = blanco con halo */
.neon { color: var(--neon); text-shadow: var(--brillo-neon); }
.neon-tenue { color: var(--neon); text-shadow: var(--brillo-suave); }
.palabra-neon { display: inline-block; white-space: nowrap; }

/* Nombre con la marca de la barbería: su letra y su color, encendido como neón de ese color */
.neon-marca, .neon.neon-marca {
  color: color-mix(in srgb, var(--tinte, #f5fbff) 62%, #fff);
  text-shadow: 0 0 1px #fff, 0 0 6px var(--tinte), 0 0 16px var(--tinte),
    0 0 36px color-mix(in srgb, var(--tinte) 70%, transparent), 0 0 70px color-mix(in srgb, var(--tinte) 45%, transparent);
}
.letra { display: inline-block; transition: color .05s, text-shadow .05s; }
.letra.apagada { color: #12233b; text-shadow: none; }

/* Máscara para revelar palabras desde abajo (técnica del "Text Reveal Mask" de 21st.dev) */
.mascara { display: inline-block; overflow: hidden; vertical-align: top; padding: .08em .02em .14em; margin: -.08em -.02em -.14em; }
.mascara > .palabra { display: inline-block; will-change: transform; }

/* --- Botones -------------------------------------------------------------- */
.btn {
  --x: 50%; --y: 50%;
  position: relative; overflow: hidden; isolation: isolate;
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  min-height: 50px; padding: .75rem 1.35rem; border-radius: 999px;
  border: 1px solid var(--linea-fuerte); background: transparent; color: var(--neon);
  font-weight: 600; font-size: .98rem; letter-spacing: .005em; line-height: 1.15; text-align: center; text-decoration: none; white-space: nowrap;
  transition: transform .45s var(--resorte), border-color .3s, box-shadow .3s, background-color .3s;
  touch-action: manipulation; user-select: none;
}
/* Luz que nace donde tocas */
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(160px circle at var(--x) var(--y), rgba(90, 156, 235, .35), transparent 60%);
  opacity: 0; transition: opacity .4s;
}
.btn:hover::before, .btn.tocado::before { opacity: 1; }
.btn:hover { border-color: var(--helenico-luz); box-shadow: var(--brillo-suave); }
.btn:active { transform: scale(.955); transition-duration: .12s; }
.btn svg { width: 20px; height: 20px; flex: none; }
@media (max-width: 380px) { .btn { padding-inline: 1rem; gap: .4rem; font-size: .94rem; } }
.btn-luz { background: var(--helenico); border-color: #3b82d6; box-shadow: 0 0 0 1px rgba(255, 255, 255, .06) inset, 0 8px 30px rgba(13, 94, 175, .45); }
.btn-luz:hover { background: #1269c2; box-shadow: 0 0 0 1px rgba(255, 255, 255, .12) inset, 0 0 26px rgba(90, 156, 235, .7), 0 10px 40px rgba(13, 94, 175, .6); }
.btn-whats { border-color: var(--neon); }
.btn-peligro { border-color: rgba(255, 122, 133, .45); color: var(--peligro); }
.btn-ancho { width: 100%; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.icono-btn {
  width: 46px; height: 46px; display: grid; place-items: center; flex: none;
  border-radius: 50%; border: 1px solid var(--linea); background: transparent;
  transition: transform .4s var(--resorte), border-color .3s;
}
.icono-btn:active { transform: scale(.9); }
.icono-btn:hover { border-color: var(--helenico-luz); }
.icono-btn svg { width: 18px; height: 18px; }

/* --- Formularios ---------------------------------------------------------- */
.campo { display: grid; gap: .4rem; margin-bottom: 1.1rem; min-width: 0; }
.campo label { font-weight: 600; font-size: .92rem; transition: color .25s, text-shadow .3s; }
/* Estilo "Tubo": caja que se distingue del fondo y brilla en blanco neón solo mientras
   el cursor está encima, se presiona con el dedo o el campo está seleccionado. */
.campo input {
  width: 100%; min-width: 0; min-height: 50px; padding: .75rem .95rem;
  border: 1px solid #22344f; border-radius: 14px;
  background: #07101d; font-size: 17px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
  transition: border-color .25s, box-shadow .3s, background-color .3s;
}
.campo input::placeholder { color: #4a5568; }
.campo input:focus, .campo input:active {
  outline: none; border-color: #fff; background: #0a1526;
  box-shadow: 0 0 0 1px #fff, 0 0 10px rgba(255, 255, 255, .75), 0 0 26px rgba(220, 236, 255, .35), inset 0 0 12px rgba(255, 255, 255, .06);
}
.campo:focus-within label { color: #fff; text-shadow: 0 0 8px rgba(255, 255, 255, .8); }
/* Solo con mouse: en el celular el "hover" se queda pegado después de tocar */
@media (hover: hover) {
  .campo input:hover {
    border-color: #fff; background: #0a1526;
    box-shadow: 0 0 0 1px #fff, 0 0 10px rgba(255, 255, 255, .75), 0 0 26px rgba(220, 236, 255, .35), inset 0 0 12px rgba(255, 255, 255, .06);
  }
  .campo:hover label { color: #fff; text-shadow: 0 0 8px rgba(255, 255, 255, .8); }
}
.ayuda { font-size: .85rem; color: var(--humo); }
.error-campo { font-size: .9rem; color: var(--peligro); min-height: 1.2em; margin: 0; }

/* --- Estructura de la app ------------------------------------------------- */
.app { max-width: 560px; margin: 0 auto; padding: 18px 20px calc(104px + env(safe-area-inset-bottom)); }
.barra-sup { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 6px 0 22px; }
.marca { font-family: var(--script); font-size: 1.9rem; line-height: 1; }
.pila { display: grid; gap: 16px; }
.fila { display: flex; gap: 12px; align-items: center; }
.fila > .crece { flex: 1; min-width: 0; }
.tarjeta { background: var(--noche); border-radius: 22px; padding: 20px; box-shadow: var(--halo-caja); }

/* Navegación inferior: la barra de luz se desliza a la pestaña activa */
.nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  display: grid; grid-template-columns: repeat(3, 1fr);
  background: rgba(0, 0, 0, .82); backdrop-filter: blur(14px) saturate(140%);
  border-top: 1px solid var(--linea);
  padding-bottom: env(safe-area-inset-bottom);
}
.nav button {
  position: relative; min-height: 66px; border: 0; background: none; color: var(--humo);
  display: grid; place-items: center; align-content: center; gap: 3px; font-size: .78rem; font-weight: 600;
  transition: color .3s;
}
.nav button svg { width: 23px; height: 23px; transition: transform .45s var(--resorte), filter .3s; }
.nav button:active svg { transform: scale(.82); }
.nav button[aria-current="page"] { color: var(--neon); }
.nav button[aria-current="page"] svg { filter: drop-shadow(0 0 6px rgba(90, 156, 235, .9)); }
.nav .barra-luz {
  position: absolute; top: -1px; left: 0; width: calc(100% / 3); height: 2px; pointer-events: none;
  display: flex; justify-content: center; transition: transform .6s var(--curva);
}
.nav .barra-luz::after {
  content: ""; width: 44px; height: 2px; border-radius: 2px; background: var(--neon);
  box-shadow: 0 0 8px #fff, 0 0 18px var(--helenico-luz), 0 0 34px var(--helenico);
}

/* --- Pantallas centradas (cuenta pausada) --------------------------------- */
.pantalla-centro { min-height: 100dvh; display: grid; place-items: center; padding: 24px 20px; text-align: center; }
.pantalla-centro .caja { max-width: 400px; width: 100%; display: grid; gap: 20px; justify-items: center; }
.pantalla-centro .logo { width: 72px; height: 72px; color: var(--helenico-luz); filter: drop-shadow(0 0 10px rgba(90, 156, 235, .7)); }

/* --- Portada (lo primero que ve una barbería) ----------------------------- */
.portada { position: relative; overflow-x: clip; }
.portada-hero {
  position: relative; min-height: 100svh; display: grid; align-content: center; justify-items: center;
  gap: 22px; padding: 64px 20px 120px; text-align: center;
}
/* Pared de ladrillo nocturna apenas sugerida + charco de luz azul bajo el letrero */
.portada-hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60% 38% at 50% 42%, rgba(13, 94, 175, .32), transparent 70%),
    radial-gradient(40% 12% at 50% 70%, rgba(90, 156, 235, .12), transparent 70%);
}
.letrero { font-size: clamp(3.6rem, 17vw, 8.5rem); line-height: .95; white-space: nowrap; }
.reflejo {
  font-family: var(--script); font-size: clamp(3.6rem, 17vw, 8.5rem); line-height: .95; white-space: nowrap;
  margin-top: -18px; transform: scaleY(-1); color: var(--neon); opacity: .16; filter: blur(3px);
  -webkit-mask-image: linear-gradient(to top, #000 0%, transparent 62%); mask-image: linear-gradient(to top, #000 0%, transparent 62%);
  text-shadow: var(--brillo-suave); user-select: none; pointer-events: none;
}
.portada-lema { max-width: 30ch; margin: 0; font-size: clamp(1.1rem, 4.4vw, 1.4rem); line-height: 1.4; font-weight: 300; color: #d6e4f5; }
.acceso { display: grid; gap: 12px; justify-items: center; min-height: 52px; }
/* Sin esto, el iframe del botón de Google pinta un rectángulo blanco sobre fondo oscuro */
.acceso iframe { color-scheme: light; }
.deslizar {
  position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%);
  display: grid; justify-items: center; gap: 10px; font-size: .82rem; color: var(--humo); text-decoration: none; white-space: nowrap;
}
.deslizar i { display: block; width: 1px; height: 46px; background: linear-gradient(var(--neon), transparent); animation: gotear 2.4s var(--curva) infinite; transform-origin: top; }
@keyframes gotear { 0% { transform: scaleY(0); opacity: 1; } 60% { transform: scaleY(1); opacity: 1; } 100% { transform: scaleY(1); opacity: 0; } }

/* Escena fija: la tarjeta se sella mientras deslizas */
.historia { position: relative; }
.escena {
  min-height: 100svh; display: grid; align-content: center; justify-items: center; gap: 34px;
  padding: 40px 20px; perspective: 1100px;
}
.pieza {
  width: min(320px, 82vw); aspect-ratio: 5 / 7; border-radius: 30px; padding: 26px 22px;
  display: grid; align-content: space-between;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, .06), transparent 38%),
    linear-gradient(180deg, var(--noche-2), var(--noche));
  box-shadow: 0 0 0 1px var(--linea-fuerte), 0 40px 120px -30px rgba(13, 94, 175, .85), inset 0 1px 0 rgba(255, 255, 255, .08);
  transform-style: preserve-3d; will-change: transform;
}
.pieza-cabeza { display: flex; justify-content: space-between; align-items: flex-end; }
.pieza-cliente-nombre { display: grid; gap: 6px; }
.pieza-cliente-nombre .neon { font-family: var(--script); font-size: 4.2rem; line-height: .9; }
.pieza .sellos { grid-template-columns: repeat(4, 1fr); }
.pasos { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; text-align: center; max-width: 34ch; }
.pasos li { font-size: clamp(1.05rem, 4vw, 1.25rem); color: #4a6283; transition: color .5s, text-shadow .5s; }
.pasos li.activo { color: var(--neon); text-shadow: var(--brillo-suave); }

.cierre { min-height: 90svh; display: grid; align-content: center; justify-items: center; gap: 30px; padding: 80px 20px 60px; text-align: center; }
.cierre-frase { font-family: var(--script); font-size: clamp(3rem, 13vw, 6rem); line-height: 1; margin: 0; }
.pie { font-size: .85rem; color: var(--humo); }
.pie a { color: var(--humo); }

/* --- Escáner -------------------------------------------------------------- */
.visor { position: relative; aspect-ratio: 1; border-radius: 28px; overflow: hidden; background: #000; box-shadow: var(--halo-caja); }
.visor video { width: 100%; height: 100%; object-fit: cover; display: block; }
.visor .marco { position: absolute; inset: 15%; pointer-events: none; }
.visor .marco i { position: absolute; width: 34px; height: 34px; border: 3px solid var(--neon); filter: drop-shadow(0 0 6px var(--helenico-luz)); }
.visor .marco i:nth-child(1) { top: 0; left: 0; border-right: 0; border-bottom: 0; border-top-left-radius: 14px; }
.visor .marco i:nth-child(2) { top: 0; right: 0; border-left: 0; border-bottom: 0; border-top-right-radius: 14px; }
.visor .marco i:nth-child(3) { bottom: 0; left: 0; border-right: 0; border-top: 0; border-bottom-left-radius: 14px; }
.visor .marco i:nth-child(4) { bottom: 0; right: 0; border-left: 0; border-top: 0; border-bottom-right-radius: 14px; }
.visor .barrido {
  position: absolute; left: 15%; right: 15%; top: 15%; height: 2px; pointer-events: none;
  background: linear-gradient(90deg, transparent, var(--neon), transparent);
  box-shadow: 0 0 12px var(--helenico-luz), 0 0 30px var(--helenico);
  animation: barrer 2.6s cubic-bezier(.65, 0, .35, 1) infinite alternate;
}
@keyframes barrer { to { top: 85%; } }
.visor .aviso { position: absolute; inset: 0; display: grid; place-items: center; padding: 28px; text-align: center; color: var(--humo); background: #000; }

/* --- Sellos: estampas de neón con borde dentado (componente "Stamp" de 21st.dev) */
.sellos { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.sello { position: relative; aspect-ratio: 1; display: grid; place-items: center; }
.sello svg.borde { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.sello svg.borde path { fill: none; stroke: #16304f; stroke-width: 2.2; transition: stroke .4s, filter .4s; }
.sello .num { position: relative; font-stretch: 62%; font-weight: 300; font-size: 1.15rem; color: #2f4868; }
.sello .icono-sello { position: relative; width: 44%; height: 44%; color: var(--neon); }
.sello.lleno svg.borde path { stroke: var(--neon); filter: drop-shadow(0 0 3px #fff) drop-shadow(0 0 8px var(--helenico-luz)) drop-shadow(0 0 16px var(--helenico)); }
.sello.lleno .icono-sello { filter: drop-shadow(0 0 4px var(--helenico-luz)); }
.sello.premio:not(.lleno) svg.borde path { stroke: var(--helenico-luz); stroke-dasharray: 4 5; }
.sello.premio:not(.lleno) .icono-sello { color: var(--helenico-luz); }

/* El contador gira como el disco de fecha de un reloj */
.contador { display: inline-flex; align-items: baseline; gap: 2px; line-height: 1; }
.contador .rodillo { font-size: 3.4rem; color: var(--neon); }
.contador small { font-family: var(--texto); font-stretch: 62%; font-weight: 300; font-size: 1.5rem; color: var(--humo); }
/* align-items: flex-start es clave: sin él la columna se estira solo al alto de la ventana
   (1 número) y "-10 %" la mueve una décima de número en vez de un número completo. */
.rodillo { display: inline-flex; align-items: flex-start; height: 1em; overflow: hidden; line-height: 1; }
/* El brillo va como filtro del rodillo (se dibuja por fuera de su ventana); con text-shadow
   la ventana lo recortaba y se veía un rectángulo oscuro alrededor del número. */
.contador .rodillo, .stepper-valor .rodillo, .nivel-num .rodillo { filter: drop-shadow(0 0 6px rgba(90, 156, 235, .75)) drop-shadow(0 0 16px rgba(13, 94, 175, .6)); }
.rodillo .columna { display: flex; flex-direction: column; flex: none; will-change: transform; }
.rodillo .columna span { height: 1em; display: block; }

/* --- Niveles / premios ---------------------------------------------------- */
.niveles { list-style: none; margin: 0; padding: 0; display: grid; }
.nivel { display: flex; align-items: center; gap: 14px; padding: 14px 2px; border-bottom: 1px solid var(--linea); }
.nivel:last-child { border-bottom: 0; }
.nivel .cortes { font-stretch: 62%; font-weight: 300; font-size: 2rem; min-width: 2ch; text-align: center; color: var(--helenico-luz); line-height: 1; }
.nivel .que { flex: 1; min-width: 0; }
.nivel .estado { font-size: .82rem; color: var(--humo); }
.nivel[data-estado="disponible"] .cortes, .nivel[data-estado="disponible"] .que { color: var(--neon); text-shadow: var(--brillo-suave); }
.nivel[data-estado="disponible"] .estado { color: var(--neon); }
.nivel[data-estado="canjeado"] { opacity: .5; }
.nivel[data-estado="canjeado"] .que { text-decoration: line-through; text-decoration-color: var(--helenico-luz); }

/* --- Lista de clientes ---------------------------------------------------- */
.lista { list-style: none; margin: 0; padding: 0; }
.lista li { border-bottom: 1px solid var(--linea); }
.lista button {
  width: 100%; text-align: left; display: flex; align-items: center; gap: 14px;
  padding: 14px 4px; min-height: 70px; border: 0; background: none;
  transition: background-color .3s, transform .45s var(--resorte);
}
.lista button:hover { background: linear-gradient(90deg, rgba(13, 94, 175, .14), transparent 70%); }
.lista button:active { transform: scale(.985); }
.avatar {
  width: 46px; height: 46px; border-radius: 50%; flex: none; display: grid; place-items: center;
  border: 1px solid var(--linea-fuerte); font-family: var(--script); font-size: 1.6rem; line-height: 1; padding-top: 4px;
  color: var(--neon); text-shadow: var(--brillo-suave);
}
.barra-progreso { height: 2px; border-radius: 2px; background: #10233c; overflow: hidden; margin-top: 8px; }
.barra-progreso > i { display: block; height: 100%; background: var(--neon); box-shadow: 0 0 8px var(--helenico-luz); transform-origin: left; }
.insignia {
  font-size: .78rem; font-weight: 600; padding: 4px 10px; border-radius: 999px; white-space: nowrap;
  border: 1px solid var(--neon); color: var(--neon); box-shadow: var(--brillo-suave);
  animation: latir 2.2s ease-in-out infinite;
}
@keyframes latir { 50% { box-shadow: 0 0 14px rgba(90, 156, 235, .9), 0 0 30px rgba(13, 94, 175, .7); } }
.vacio { text-align: center; padding: 40px 16px; color: var(--humo); }

/* --- Hoja inferior -------------------------------------------------------- */
.hoja-fondo {
  position: fixed; inset: 0; z-index: 20; background: rgba(0, 0, 0, .66); backdrop-filter: blur(6px);
  display: flex; align-items: flex-end; justify-content: center;
}
.hoja {
  width: 100%; max-width: 560px; max-height: 92dvh; overflow-y: auto; overscroll-behavior: contain;
  background: linear-gradient(180deg, var(--noche-2), var(--negro) 70%);
  border-radius: 30px 30px 0 0; padding: 22px 20px calc(24px + env(safe-area-inset-bottom));
  box-shadow: 0 -1px 0 var(--linea-fuerte), 0 -30px 80px -20px rgba(13, 94, 175, .55);
}
.hoja .agarradera { width: 42px; height: 4px; border-radius: 2px; background: var(--linea-fuerte); margin: -8px auto 16px; }

.qr-caja { background: #fff; border-radius: 22px; padding: 16px; width: min(250px, 100%); margin: 0 auto; box-shadow: 0 0 0 1px var(--linea-fuerte), 0 0 40px rgba(13, 94, 175, .55); }
.qr-caja img, .qr-caja canvas { width: 100%; height: auto; display: block; image-rendering: pixelated; }

.aviso-caja { padding: 12px 16px; border-radius: 16px; font-size: .95rem; border: 1px solid; }
.aviso-caja.exito { border-color: var(--linea-fuerte); background: rgba(13, 94, 175, .14); color: var(--neon); }
.aviso-caja.alerta { border-color: rgba(245, 251, 255, .35); background: rgba(245, 251, 255, .05); color: #dce9f8; }
.aviso-caja.error { border-color: rgba(255, 122, 133, .45); background: rgba(255, 122, 133, .08); color: var(--peligro); }

.toast {
  position: fixed; left: 50%; top: calc(16px + env(safe-area-inset-top)); z-index: 30;
  transform: translateX(-50%); padding: 11px 20px; border-radius: 999px;
  background: rgba(5, 11, 22, .92); backdrop-filter: blur(10px); color: var(--neon); font-weight: 600;
  box-shadow: 0 0 0 1px var(--linea-fuerte), 0 0 30px rgba(13, 94, 175, .6); max-width: calc(100% - 32px);
}

.historial { list-style: none; margin: 0; padding: 0; font-size: .95rem; }
.historial li { display: flex; justify-content: space-between; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--linea); }
details summary { list-style: none; }
details summary::-webkit-details-marker { display: none; }

/* --- Tarjeta pública del cliente ------------------------------------------ */
.publica { padding-top: 40px; padding-bottom: 48px; }
.publica-cabeza { text-align: center; display: grid; gap: 6px; margin-bottom: 8px; }
.publica-cabeza { position: relative; isolation: isolate; justify-items: center; }
.publica-cabeza h1 { font-size: clamp(3rem, 14vw, 4.6rem); text-wrap: balance; }
/* Portada: foto de la barbería a todo lo ancho, que se funde con el negro hacia abajo */
.publica-cabeza.con-portada { padding-top: 120px; }
.portada-foto {
  position: absolute; z-index: -1; top: -40px; left: 50%; width: 100vw; max-width: 760px; height: calc(100% + 80px);
  transform: translateX(-50%); background-size: cover; background-position: center;
  -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, .75), rgba(0, 0, 0, .35) 55%, transparent);
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, .75), rgba(0, 0, 0, .35) 55%, transparent);
}
.escenario { perspective: 1000px; }
.pieza-cliente { aspect-ratio: auto; width: 100%; gap: 22px; position: relative; overflow: hidden; }
.pieza-cliente .destello {
  position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: radial-gradient(420px circle at var(--bx, 30%) var(--by, 0%), rgba(255, 255, 255, .13), transparent 55%);
  mix-blend-mode: screen;
}

/* --- Panel de administración --------------------------------------------- */
.admin { max-width: 980px; padding-bottom: 40px; }
.cifras { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.cifra { padding: 16px; border-radius: 20px; background: var(--noche); box-shadow: var(--halo-caja); }
.cifra b { display: block; font-stretch: 62%; font-weight: 300; font-size: 2.6rem; line-height: 1; color: var(--neon); text-shadow: var(--brillo-suave); }
.cifra span { font-size: .82rem; color: var(--humo); }
.segmentos { display: inline-flex; padding: 4px; gap: 2px; border-radius: 999px; border: 1px solid var(--linea); }
.segmentos button { min-height: 40px; padding: 0 16px; border: 0; border-radius: 999px; background: none; color: var(--humo); font-weight: 600; transition: color .3s, background-color .3s; }
.segmentos button[aria-pressed="true"] { background: var(--helenico); color: var(--neon); }
.rejilla { display: grid; gap: 14px; }
@media (min-width: 800px) { .rejilla { grid-template-columns: 1fr 1fr; } }
.negocio { display: grid; gap: 14px; }
.negocio h3 { font-family: var(--script); font-size: 1.9rem; font-weight: 400; line-height: 1.05; }
.negocio[data-activo="false"] { box-shadow: 0 0 0 1px rgba(255, 122, 133, .35); }
.negocio .correo { font-size: .9rem; color: var(--humo); overflow-wrap: anywhere; }
.datos { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px 12px; font-size: .92rem; margin: 0; }
.datos dt { color: var(--humo); font-size: .8rem; }
.datos dd { margin: 0; font-weight: 600; }
.chip { font-size: .78rem; font-weight: 600; padding: 4px 10px; border-radius: 999px; white-space: nowrap; border: 1px solid; }
.chip.activa { color: var(--neon); border-color: var(--linea-fuerte); }
.chip.pausada { color: var(--peligro); border-color: rgba(255, 122, 133, .45); }
.chip.tuya { color: var(--humo); border-color: var(--linea); }
.interruptor { display: flex; align-items: center; gap: 12px; min-height: 44px; border: 0; background: none; padding: 0; font-weight: 600; text-align: left; }
.interruptor .riel { position: relative; width: 54px; height: 30px; border-radius: 15px; flex: none; background: #1b0d12; box-shadow: inset 0 0 0 1px rgba(255, 122, 133, .4); transition: background-color .3s, box-shadow .3s; }
.interruptor .riel::after { content: ""; position: absolute; top: 4px; left: 4px; width: 22px; height: 22px; border-radius: 50%; background: #9aa3b2; transition: transform .5s var(--resorte), background-color .3s, box-shadow .3s; }
.interruptor[aria-checked="true"] .riel { background: var(--helenico); box-shadow: inset 0 0 0 1px #3b82d6, 0 0 16px rgba(13, 94, 175, .7); }
.interruptor[aria-checked="true"] .riel::after { transform: translateX(24px); background: var(--neon); box-shadow: 0 0 10px #fff; }
.interruptor[aria-busy="true"] { opacity: .55; cursor: progress; }
.interruptor:disabled { opacity: .55; cursor: not-allowed; }

/* --- Ajustes: el taller del letrero -------------------------------------- */
.oculto-accesible { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.etiqueta { font-weight: 600; font-size: .92rem; }
.btn-chico { min-height: 42px; padding: .5rem 1rem; font-size: .92rem; }
.btn:focus-within { outline: 2px solid var(--helenico-luz); outline-offset: 3px; }
.ajustes { gap: 22px; }
.ajustes-pie { margin-top: 18px; padding-top: 22px; border-top: 1px solid var(--linea); }

/* Pestañas: una cápsula de luz se desliza a la elegida */
.segmentos-ancho { position: relative; display: grid; grid-template-columns: 1fr 1fr; width: 100%; isolation: isolate; }
.segmentos-ancho .indicador {
  position: absolute; z-index: -1; top: 4px; left: 4px; bottom: 4px; width: 0; border-radius: 999px;
  background: linear-gradient(180deg, #1269c2, var(--helenico));
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .1) inset, 0 0 22px rgba(13, 94, 175, .65);
}
.segmentos-ancho button { position: relative; white-space: nowrap; padding: 0 8px; min-height: 46px; font-size: .94rem; background: none; color: var(--humo); transition: color .4s; }
.segmentos-ancho button[aria-selected="true"] { color: var(--neon); }

/* Bloques: sin caja; el título sube por máscara y una línea fina los separa */
.bloque { gap: 14px; padding-top: 8px; }
.bloque + .bloque { border-top: 1px solid var(--linea); padding-top: 22px; }
.bloque-titulo { font-family: var(--script); font-weight: 400; font-size: 2.1rem; line-height: 1; letter-spacing: .01em; }
.bloque-cabeza { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }

/* Rodillo de horas: el número gira como el calendario de un reloj */
.stepper { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px; border-radius: 22px; background: #050c18; box-shadow: inset 0 0 0 1px var(--linea); }
.stepper .icono-btn { width: 52px; height: 52px; }
.stepper-valor { display: flex; align-items: baseline; gap: 8px; }
.stepper-valor .rodillo { font-size: 3.4rem; color: var(--neon); }
.stepper-valor small { color: var(--humo); font-size: .95rem; }

/* Escala de niveles: como el bisel de un reloj, con un punto encendido por premio */
.escala { position: relative; height: 74px; margin: 6px 14px 4px; }
.escala-riel { position: absolute; left: 0; right: 0; top: 30px; height: 2px; border-radius: 2px; background: linear-gradient(90deg, #12253f, #2a4a76); }
.marca-escala { position: absolute; top: 24px; width: 1px; height: 14px; background: #2a4466; transform-origin: bottom; }
.marca-escala.larga { top: 18px; height: 20px; background: #4a6a95; }
.punto-escala {
  position: absolute; top: 31px; transform: translate(-50%, -50%); width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; background: #000; border: 2px solid var(--neon);
  box-shadow: 0 0 8px #fff, 0 0 18px var(--helenico-luz), 0 0 34px var(--helenico);
}
.punto-escala b { font-stretch: 62%; font-weight: 500; font-size: .95rem; color: var(--neon); }

.niveles-editor { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.nivel-fila {
  display: grid; grid-template-columns: 1fr auto; gap: 10px 12px; align-items: center; overflow: hidden;
  padding: 14px; border-radius: 20px; background: #050c18; box-shadow: inset 0 0 0 1px var(--linea);
}
.nivel-cortes { display: flex; align-items: center; gap: 10px; }
.icono-btn.mini { width: 40px; height: 40px; }
.nivel-num .rodillo { font-size: 2.4rem; color: var(--neon); min-width: 1ch; }

/* Barra de cambios: sube desde abajo cuando algo cambió */
.barra-cambios {
  position: fixed; z-index: 15; left: 12px; right: 12px; bottom: calc(78px + env(safe-area-inset-bottom));
  max-width: 536px; margin: 0 auto; display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 18px;
  border-radius: 999px; background: rgba(5, 11, 22, .92); backdrop-filter: blur(14px) saturate(150%);
  box-shadow: 0 0 0 1px var(--linea-fuerte), 0 18px 50px -10px rgba(13, 94, 175, .8);
}
.barra-cambios > span { flex: 1; font-weight: 600; font-size: .95rem; white-space: nowrap; }
.ajustes:has(~ .barra-cambios:not([hidden])) { padding-bottom: 80px; }

/* Vitrina: el letrero fijo arriba mientras se eligen letra y color (configurador Rolex) */
.vitrina {
  position: sticky; top: 10px; z-index: 5; height: 200px; border-radius: 26px; overflow: hidden; isolation: isolate;
  display: grid; place-items: center; background: #000;
  box-shadow: 0 0 0 1px var(--linea-fuerte), 0 24px 60px -18px rgba(13, 94, 175, .75);
}
.vitrina-foto { position: absolute; inset: 0; z-index: -2; background: center / cover no-repeat; }
.vitrina::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(0, 0, 0, .3), rgba(0, 0, 0, .72)); }
.vitrina.sin-foto::after { background: radial-gradient(70% 70% at 50% 45%, rgba(13, 94, 175, .35), transparent 70%); }
.vitrina.subiendo .vitrina-foto { animation: latir 1s ease-in-out infinite; }
.vitrina-letrero { overflow: hidden; padding: 10px 16px 18px; max-width: 100%; text-align: center; }
.vitrina-nombre { display: inline-block; font-size: 2.9rem; line-height: 1.1; overflow-wrap: anywhere; }
.vitrina-acciones { position: absolute; left: 10px; right: 10px; bottom: 10px; display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.chip-foto {
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 14px; border-radius: 999px; cursor: pointer;
  font-size: .82rem; font-weight: 600; color: var(--neon); border: 1px solid rgba(255, 255, 255, .22);
  background: rgba(0, 0, 0, .55); backdrop-filter: blur(8px); transition: border-color .3s, transform .4s var(--resorte);
}
.chip-foto:active { transform: scale(.94); }
.chip-foto:hover, .chip-foto:focus-within { border-color: #fff; }
.chip-foto svg { width: 15px; height: 15px; }

/* Carrusel de letras: cartas grandes que se centran al elegirlas */
.carrusel {
  display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
  margin: 0 -20px; padding: 6px 20px 14px; scrollbar-width: none;
}
.carrusel::-webkit-scrollbar { display: none; }
.carta-fuente {
  position: relative; flex: 0 0 68%; scroll-snap-align: center; min-height: 128px; padding: 18px 16px;
  display: grid; align-content: space-between; gap: 10px; border-radius: 22px; cursor: pointer;
  background: #050c18; box-shadow: inset 0 0 0 1px var(--linea);
  transition: transform .5s var(--resorte), box-shadow .35s, background-color .35s;
}
.carta-fuente input { position: absolute; opacity: 0; pointer-events: none; }
.carta-fuente .muestra {
  line-height: 1.12; color: #c9d6e6; overflow: hidden; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2;
}
.carta-fuente .estilo { font-size: .82rem; color: var(--humo); }
.carta-fuente:active { transform: scale(.97); }
.carta-fuente:has(input:checked) {
  background: linear-gradient(180deg, rgba(13, 94, 175, .28), rgba(13, 94, 175, .08));
  box-shadow: inset 0 0 0 2px var(--neon), 0 0 22px rgba(255, 255, 255, .25), 0 0 40px rgba(13, 94, 175, .5);
}
.carta-fuente:has(input:checked) .muestra { color: var(--neon); text-shadow: var(--brillo-suave); }
.carta-fuente:has(input:checked) .estilo { color: var(--neon); }
.carta-fuente:has(input:focus-visible) { outline: 2px solid var(--neon); outline-offset: 3px; }

/* Colores: círculos de luz; un anillo blanco salta al elegido (no solo el color lo indica) */
.colores { position: relative; display: flex; flex-wrap: wrap; gap: 14px; padding: 6px; }
.colores .anillo {
  position: absolute; top: 0; left: 0; width: 56px; height: 56px; border-radius: 50%; pointer-events: none; opacity: 0;
  border: 2px solid var(--neon); box-shadow: 0 0 10px #fff, 0 0 22px var(--helenico-luz);
}
.color-op { position: relative; width: 44px; height: 44px; cursor: pointer; }
.color-op > input[type="radio"] { position: absolute; opacity: 0; pointer-events: none; }
.color-op > span {
  display: grid; place-items: center; width: 100%; height: 100%; border-radius: 50%; color: #000;
  background: var(--c); box-shadow: 0 0 10px color-mix(in srgb, var(--c) 70%, transparent);
  transition: transform .45s var(--resorte);
}
.color-op > span svg { width: 18px; height: 18px; }
.color-op:active > span { transform: scale(.86); }
.color-op:has(input:focus-visible) > span { outline: 2px solid var(--helenico-luz); outline-offset: 8px; }
.color-libre input[type="color"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; border: 0; padding: 0; }


/* --- Movimiento reducido: todo queda en su estado final ------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reflejo { display: none; }
}
