/*
 * App de la persona (index.html). Hoja propia: el panel de RH sigue con
 * estilos.css y no se toca desde aquí.
 *
 * Diseño de Luis, 23 de octubre de 2026, después de seis vueltas de maquetas:
 *
 *   - Arriba, en las tres vistas, un fondo casi negro con una cuadrícula muy
 *     tenue y un resplandor cian que entra de arriba, como powerme.com.mx; el
 *     logotipo oficial pequeño en la esquina.
 *   - Abajo, un panel grande con lo del día. Dos temas que la persona elige en
 *     Perfil → Apariencia: claro (panel blanco con la tinta del fondo, un verde
 *     petróleo casi negro) y oscuro (panel oscuro, un escalón arriba del
 *     fondo). Sin elección, el del teléfono.
 *   - Colores neutros. El cian, poco: el logotipo, el resplandor y la palomita
 *     de «registro guardado». El ámbar y el rojo, solo para advertencias y
 *     errores.
 *   - Letra Wix Madefor: Display para las cifras, Text para lo demás. No trae
 *     cifras tabulares, así que cada dígito de la hora va en su propia caja.
 *   - Movimiento para confirmar, no para adornar: la pantalla se arma al abrir,
 *     los dígitos de la hora ruedan, las cifras nuevas entran, las barras se
 *     llenan, el aviso baja, las hojas suben. Con «reducir movimiento», nada.
 *
 * El 2 de noviembre de 2026, lo mismo en laptop o computadora de escritorio
 * (ver «Pantalla ancha» y «Con ratón», antes de «Movimiento»): en el celular no
 * cambia nada.
 *
 * El 4 de noviembre de 2026, la portada (sin sesión) tomó otra forma: ver
 * «Portada».
 */

@font-face {
  font-family: 'Wix Madefor Display';
  src: url('/fuentes/wix-madefor-display-latin.woff2') format('woff2');
  font-weight: 400 800;
  font-display: swap;
}

@font-face {
  font-family: 'Wix Madefor Text';
  src: url('/fuentes/wix-madefor-text-latin.woff2') format('woff2');
  font-weight: 400 800;
  font-display: swap;
}

/* --- Tokens ------------------------------------------------------------------ */

/* Tema claro: el panel blanco; lo oscuro toma el tono del fondo. */
:root {
  --suelo: #070808;
  --cian: #0bcee1;

  --tarjeta: #ffffff;
  --tinta: #0c2225;
  --gris: #5f7376;
  --gris-claro: #a9b8ba;
  --pista: #e5eded;
  --linea: #e4ecec;
  --circulo: #0c2225;
  --circulo-tinta: #ffffff;
  --barra-nav: #ecf2f2;
  --unidad: #a9b8ba;
  --barra-nav-sombra: 0 14px 34px -14px rgb(7 8 8 / 0.35);

  --alerta: #8a5a00;
  --alerta-fondo: #fbf1de;
  --mal: #b8392b;
  --mal-fondo: #fbe7e4;

  --display: 'Wix Madefor Display', system-ui, sans-serif;
  --texto: 'Wix Madefor Text', system-ui, sans-serif;

  --curva: cubic-bezier(0.23, 1, 0.32, 1);
  --resorte: cubic-bezier(0.34, 1.4, 0.64, 1);
  --cajon: cubic-bezier(0.32, 0.72, 0, 1);

  color-scheme: light;
}

/* Tema oscuro: el panel oscuro, letra clara, el mismo contraste que arriba. */
:root[data-tema='oscuro'] {
  --tarjeta: #11181a;
  --tinta: #eef3f3;
  --gris: #849396;
  --gris-claro: #4f5c5e;
  --pista: #1e2729;
  --linea: #1c2527;
  --circulo: #eef3f3;
  --circulo-tinta: #0c2225;
  --barra-nav: #1d2628;
  --unidad: #849396;
  --barra-nav-sombra: 0 14px 34px -14px rgb(0 0 0 / 0.8);
  --alerta: #e8b14f;
  --alerta-fondo: #2a2414;
  --mal: #f08a7e;
  --mal-fondo: #2c1917;
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-tema='claro']) {
    --tarjeta: #11181a;
    --tinta: #eef3f3;
    --gris: #849396;
    --gris-claro: #4f5c5e;
    --pista: #1e2729;
    --linea: #1c2527;
    --circulo: #eef3f3;
    --circulo-tinta: #0c2225;
    --barra-nav: #1d2628;
  --unidad: #849396;
    --barra-nav-sombra: 0 14px 34px -14px rgb(0 0 0 / 0.8);
    --alerta: #e8b14f;
    --alerta-fondo: #2a2414;
    --mal: #f08a7e;
    --mal-fondo: #2c1917;
    color-scheme: dark;
  }
}

/* --- Base -------------------------------------------------------------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--suelo);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--suelo);
  color: #ffffff;
  font-family: var(--texto);
  font-size: 16px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

[hidden] {
  display: none !important;
}

button,
a {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: default;
}

:focus-visible {
  outline: 2.5px solid var(--cian);
  outline-offset: 3px;
}

.solo-lector {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* --- Arriba: el fondo, la cabecera ----------------------------------------- */

.app {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  max-width: 520px;
  margin: 0 auto;
  overflow-x: clip;
  isolation: isolate;
}

/* Casi negro, una cuadrícula que apenas se nota y se apaga hacia abajo, y el
   resplandor cian que entra de arriba. */
.fondo {
  position: absolute;
  z-index: -1;
  inset: 0 0 auto;
  height: 560px;
  pointer-events: none;
  overflow: hidden;
}

.fondo::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgb(255 255 255 / 0.026) 1px, transparent 1px),
    linear-gradient(90deg, rgb(255 255 255 / 0.026) 1px, transparent 1px);
  background-size: 26px 26px;
  background-position: -7px -4px;
  -webkit-mask-image: linear-gradient(#000, rgb(0 0 0 / 0.5) 36%, transparent 62%);
  mask-image: linear-gradient(#000, rgb(0 0 0 / 0.5) 36%, transparent 62%);
}

.fondo::after {
  content: '';
  position: absolute;
  inset: -40px -20% auto;
  height: 420px;
  background: radial-gradient(
    closest-side,
    rgb(11 206 225 / 0.19),
    rgb(11 206 225 / 0.05) 50%,
    rgb(11 206 225 / 0)
  );
  transform: translateY(-46%);
  animation: brillo 9s ease-in-out infinite alternate;
}

.cabeza {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: calc(env(safe-area-inset-top) + 22px) 24px 0;
}

.cabeza .logo {
  display: block;
  flex: none;
  height: 14px;
  width: auto;
}

.cabeza .fecha {
  min-width: 0;
  margin: 0;
  font-size: 14.5px;
  line-height: 1.25;
  font-weight: 600;
  color: rgb(255 255 255 / 0.62);
  text-align: right;
}

/* --- Vistas ------------------------------------------------------------------- */

.vista {
  display: flex;
  flex: 1;
  flex-direction: column;
}

.vista.entra {
  animation: vista-entra 0.42s var(--curva) both;
}

/* La banda de Inicio: qué pasa ahora, la hora y el botón. */
.banda {
  padding: 0 22px;
  margin-top: clamp(24px, 10vh, 120px);
}

/* Solo para las excepciones (salida estimada, festivo); vacía, no ocupa lugar. */
.estado {
  margin: 0;
  font-size: 15.5px;
  font-weight: 600;
  color: rgb(255 255 255 / 0.64);
}

.hora {
  display: flex;
  height: 1em;
  margin: 6px 0 18px;
  overflow: hidden;
  font-family: var(--display);
  font-size: clamp(50px, 16vw, 62px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.01em;
  color: #ffffff;
}

.hora .dig {
  display: inline-block;
  width: 0.65em;
  text-align: center;
}

.hora .dos {
  display: inline-block;
  width: 0.3em;
  text-align: center;
  transform: translateY(-0.05em);
}

.hora .dig.sale {
  animation: dig-sale 0.32s var(--curva) both;
}

.hora .dig.entra {
  animation: dig-entra 0.42s var(--resorte) both;
}

.estado:empty {
  display: none;
}

/* --- Píldora (el botón principal) ------------------------------------------- */

.pildora {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.3em;
  width: 100%;
  height: 58px;
  padding: 0 24px;
  border: 0;
  border-radius: 99px;
  background: #ffffff;
  color: #0c2225;
  font-family: var(--texto);
  font-size: 17.5px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 10px 24px -14px rgb(0 0 0 / 0.7);
  transition:
    transform 0.18s var(--curva),
    background-color 0.35s,
    color 0.35s,
    box-shadow 0.35s;
}

.pildora-grande {
  height: 60px;
  font-size: 18px;
}

.pildora:active:not(:disabled) {
  transform: scale(0.965);
}

/* Terminada la jornada, o con la comida abierta (no se puede salir comiendo:
   la comida se termina con su círculo). */
.pildora:disabled {
  background: rgb(255 255 255 / 0.1);
  color: rgb(255 255 255 / 0.86);
  box-shadow: none;
}

.pildora[data-estado='comida'] {
  color: rgb(255 255 255 / 0.4);
}

.pildora .giro,
.pildora .icono-hecho {
  display: none;
  flex: none;
  width: 21px;
  height: 21px;
  margin-right: 0.25em;
}

.pildora[data-estado='completa'] .icono-hecho {
  display: block;
}

.pildora.registrando .giro {
  display: block;
  border: 3px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: girar 0.7s linear infinite;
}

.pildora.registrando .icono-hecho {
  display: none;
}

/* --- El panel ---------------------------------------------------------------- */

.tarjeta {
  flex: 1;
  margin: 22px 8px 0;
  padding: 30px 22px calc(env(safe-area-inset-bottom) + 112px);
  border-radius: 34px 34px 0 0;
  background: var(--tarjeta);
  color: var(--tinta);
  transition:
    background-color 0.35s,
    color 0.35s;
}

.tarjeta-cabeza {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.tarjeta-cabeza > div {
  flex: 1;
  min-width: 0;
}

.etiqueta {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--gris);
}

.trabajado {
  margin: 8px 0 0;
  font-family: var(--display);
  font-size: clamp(36px, 12.5vw, 56px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.025em;
  white-space: nowrap;
}

.unidad {
  color: var(--gris-claro);
  font-size: 0.54em;
  font-weight: 700;
  letter-spacing: 0;
}

/* El círculo de la comida: siempre en su lugar. Inicia y termina la comida. */
.comida-boton {
  display: flex;
  flex: none;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 98px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--gris);
}

.comida-boton .disco {
  position: relative;
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: var(--circulo);
  color: var(--circulo-tinta);
  transition:
    transform 0.2s var(--curva),
    background-color 0.35s,
    color 0.35s;
}

.comida-boton svg {
  display: none;
  width: 30px;
  height: 30px;
}

.comida-boton[data-comida='apagada'] .icono-comida,
.comida-boton[data-comida='disponible'] .icono-comida,
.comida-boton[data-comida='en-curso'] .icono-terminar,
.comida-boton[data-comida='hecha'] .icono-hecha {
  display: block;
}

.comida-boton:active:not(:disabled) .disco {
  transform: scale(0.92);
}

.comida-boton .rotulo {
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
}

.comida-boton:disabled .disco {
  background: var(--pista);
  color: var(--gris-claro);
}

.comida-boton:disabled .rotulo {
  color: var(--gris-claro);
}

.comida-boton[data-comida='en-curso'] .rotulo {
  color: var(--tinta);
}

/* Comiendo: un anillo que respira dice que la comida sigue abierta. */
.comida-boton[data-comida='en-curso'] .disco::before {
  content: '';
  position: absolute;
  inset: -6px;
  border: 2px solid var(--tinta);
  border-radius: 50%;
  opacity: 0.18;
  animation: respira 2.4s ease-in-out infinite;
}

.comida-boton .giro {
  position: absolute;
  inset: -6px;
  border: 2.5px solid var(--tinta);
  border-right-color: transparent;
  border-radius: 50%;
  opacity: 0;
}

.comida-boton.registrando .giro {
  opacity: 1;
  animation: girar 0.7s linear infinite;
}

.comida-boton.registrando .disco::before {
  display: none;
}

.comida-boton.cambia {
  animation: rebote 0.5s var(--resorte);
}

/* Entrada · Comida · Salida, cada una con su barra. */
.columnas {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 28px;
}

.columna .etiqueta {
  font-size: 14.5px;
}

.barra {
  position: relative;
  height: 9px;
  margin: 11px 0 12px;
  overflow: hidden;
  border-radius: 9px;
  background: var(--pista);
}

.barra i {
  position: absolute;
  inset: 0;
  border-radius: 9px;
  background: var(--tinta);
  transform: scaleX(var(--lleno, 0));
  transform-origin: left center;
  transition:
    transform 0.9s var(--resorte),
    background-color 0.35s;
}

.valor {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(21px, 6.4vw, 25px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.015em;
  white-space: nowrap;
}

.valor.abierta {
  font-size: 0.74em;
  white-space: normal;
  line-height: 1.15;
}

.valor.sin-dato {
  color: var(--gris-claro);
}

.valor .unidad {
  color: var(--gris);
  font-size: 0.64em;
}

.trabajado .unidad {
  color: var(--unidad);
}

.nuevo {
  animation: valor-entra 0.5s var(--resorte) both;
}

/* Lo que acompaña al día: avisos y la constancia del sitio. */
.notas {
  display: grid;
  gap: 10px;
  margin-top: 24px;
}

.nota {
  margin: 0;
  padding: 12px 15px;
  border-radius: 16px;
  background: var(--pista);
  color: var(--tinta);
  font-size: 14.5px;
  line-height: 1.45;
}

.nota-alerta {
  background: var(--alerta-fondo);
  color: var(--alerta);
}

.nota-error {
  background: var(--mal-fondo);
  color: var(--mal);
}

.linea-discreta {
  margin: 0;
  color: var(--gris);
  font-size: 13.5px;
  line-height: 1.45;
}

.linea-discreta:empty {
  display: none;
}

.enlace {
  padding: 10px 6px;
  border: 0;
  background: none;
  color: var(--tinta);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.linea-discreta .enlace {
  padding: 4px 2px;
}

/* --- Pestañas flotantes ----------------------------------------------------- */

.pestanas {
  position: fixed;
  z-index: 20;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom) + 20px);
  display: flex;
  gap: 6px;
  padding: 7px;
  border-radius: 99px;
  background: var(--barra-nav);
  box-shadow: var(--barra-nav-sombra);
  transform: translateX(-50%);
  transition: background-color 0.35s;
}

.pestana {
  display: grid;
  place-items: center;
  width: 64px;
  height: 50px;
  border: 0;
  border-radius: 99px;
  background: transparent;
  color: var(--gris-claro);
  transition:
    color 0.25s,
    transform 0.18s var(--curva);
}

.pestana:active {
  transform: scale(0.92);
}

.pestana[aria-current='page'] {
  color: var(--tinta);
}

.pestana svg {
  width: 27px;
  height: 27px;
}

/* --- El aviso de arriba ------------------------------------------------------ */

.aviso {
  position: fixed;
  z-index: 30;
  top: calc(env(safe-area-inset-top) + 12px);
  left: 50%;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: min(100% - 24px, 496px);
  padding: 12px 8px 12px 12px;
  border-radius: 22px;
  background: #121a1c;
  color: #ffffff;
  box-shadow:
    0 0 0 1px rgb(255 255 255 / 0.06),
    0 18px 40px -16px rgb(0 0 0 / 0.65);
  transform: translateX(-50%);
}

.aviso.entra {
  animation: aviso-entra 0.55s var(--resorte) both;
}

.aviso.sale {
  animation: aviso-sale 0.3s var(--curva) both;
}

.aviso p {
  flex: 1;
  margin: 7px 0;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
}

.aviso-sello {
  display: grid;
  flex: none;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--cian);
  color: #06262c;
}

.aviso-sello svg,
.marca-resumen svg {
  display: none;
  width: 20px;
  height: 20px;
}

.aviso[data-tono='exito'] .sello-bien,
.aviso:not([data-tono='exito']) .sello-ojo {
  display: block;
}

.aviso[data-tono='alerta'] .aviso-sello {
  background: #e8b14f;
  color: #2a1d00;
}

.aviso[data-tono='error'] .aviso-sello {
  background: #e0574a;
  color: #ffffff;
}

.aviso[data-tono='error'] {
  box-shadow:
    0 0 0 1px rgb(224 87 74 / 0.35),
    0 18px 40px -16px rgb(0 0 0 / 0.65);
}

.aviso-cerrar {
  display: grid;
  flex: none;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: rgb(255 255 255 / 0.55);
}

.aviso-cerrar svg {
  width: 18px;
  height: 18px;
}

.trazo {
  stroke-dasharray: 24;
  stroke-dashoffset: 0;
}

.entra .trazo,
dialog[open] .trazo {
  stroke-dashoffset: 24;
  animation: trazo 0.35s 0.15s var(--curva) forwards;
}

/* --- Asistencia y Perfil --------------------------------------------------- */

.cabecera-vista {
  padding: 0 22px;
  margin-top: clamp(26px, 7vh, 64px);
}

.cabecera-vista h1 {
  margin: 0;
  font-family: var(--display);
  font-size: 34px;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: #ffffff;
}

.segmentos {
  display: flex;
  gap: 4px;
  margin-top: 18px;
  padding: 4px;
  border-radius: 99px;
  background: rgb(255 255 255 / 0.08);
}

.segmento {
  flex: 1;
  height: 44px;
  border: 0;
  border-radius: 99px;
  background: transparent;
  color: rgb(255 255 255 / 0.7);
  font-size: 15px;
  font-weight: 700;
  transition:
    background-color 0.25s,
    color 0.25s;
}

.segmento[aria-selected='true'] {
  background: #ffffff;
  color: #0c2225;
}

.sub {
  margin: 14px 0 0;
  color: var(--gris);
  font-size: 14.5px;
  line-height: 1.5;
}

.titulo {
  margin: 34px 0 6px;
  font-family: var(--display);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.cifras {
  display: grid;
  gap: 16px;
  margin: 0;
}

.cifras-dos {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cifras-tres {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.cifras dt {
  color: var(--gris);
  font-size: 14.5px;
  font-weight: 600;
}

.cifras dd {
  margin: 6px 0 0;
  font-family: var(--display);
  font-size: clamp(22px, 7vw, 30px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.cifras-tres dd {
  font-size: clamp(19px, 5.6vw, 24px);
}

/* Los días: el nombre y su rango; debajo, cada registro con su hora. */
.lista-dias,
.lista-registros {
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.dia,
.registro {
  padding: 18px 0;
  border-top: 1px solid var(--linea);
}

.dia-cabecera,
.registro-cabecera {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.dia-cabecera strong,
.registro-cabecera strong {
  font-size: 16px;
  font-weight: 700;
}

.dia-horas {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  font-family: var(--display);
  font-size: 16.5px;
  font-weight: 800;
  white-space: nowrap;
}

.linea {
  display: grid;
  gap: 10px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.evento {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 12px;
  align-items: baseline;
}

.evento-hora {
  font-family: var(--display);
  font-size: 15.5px;
  font-weight: 800;
}

.evento-tipo {
  display: block;
  font-size: 15px;
  font-weight: 600;
}

.evento-marcas,
.evento-ubicacion {
  display: block;
  margin-top: 2px;
  font-size: 13.5px;
  line-height: 1.4;
}

.evento-marcas {
  color: var(--alerta);
}

.evento-ubicacion {
  color: var(--gris);
}

li.vacio {
  padding: 18px 0;
  border-top: 1px solid var(--linea);
  color: var(--gris);
  font-size: 15px;
}

.pastilla {
  flex: none;
  padding: 5px 11px;
  border-radius: 99px;
  background: var(--pista);
  color: var(--tinta);
  font-size: 12.5px;
  font-weight: 700;
  white-space: nowrap;
}

.pastilla[data-estado='pendiente'] {
  background: var(--alerta-fondo);
  color: var(--alerta);
}

.pastilla[data-estado='rechazado'] {
  background: var(--mal-fondo);
  color: var(--mal);
}

.registro-detalle {
  margin-top: 6px;
  color: var(--gris);
  font-size: 14.5px;
  line-height: 1.45;
}

.registro-rechazo {
  margin-top: 6px;
  color: var(--mal);
  font-size: 14.5px;
  line-height: 1.45;
}

/* El horario acordado: el día a la izquierda, las horas a la derecha. */
.semana {
  display: grid;
  grid-template-columns: auto 1fr;
  margin: 10px 0 0;
}

.semana dt,
.semana dd {
  padding: 10px 0;
  border-top: 1px solid var(--linea);
  font-size: 15px;
}

.semana dt {
  color: var(--gris);
  font-weight: 600;
}

.semana dt::first-letter {
  text-transform: uppercase;
}

.semana dd {
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
  text-align: right;
}

.semana [data-hoy='si'] {
  color: var(--tinta);
  font-weight: 800;
}

.semana .descanso {
  color: var(--gris-claro);
  font-family: var(--texto);
  font-weight: 600;
}

.semana .comida {
  color: var(--gris);
  font-family: var(--texto);
  font-size: 13px;
  font-weight: 600;
}

.horario-total,
.horario-constancia {
  margin: 12px 0 0;
  color: var(--gris);
  font-size: 14px;
  line-height: 1.45;
}

/* Perfil */
.cabecera-perfil {
  display: flex;
  align-items: center;
  gap: 16px;
}

.cabecera-perfil h1 {
  font-size: 26px;
}

.cabecera-perfil .sub {
  margin-top: 4px;
  color: rgb(255 255 255 / 0.6);
}

.avatar {
  display: grid;
  flex: none;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgb(255 255 255 / 0.1);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.08);
  color: #ffffff;
  font-family: var(--display);
  font-size: 23px;
  font-weight: 800;
}

.ficha {
  margin: 0;
}

.ficha > div {
  padding: 13px 0;
  border-bottom: 1px solid var(--linea);
}

.ficha > div:first-child {
  padding-top: 0;
}

.ficha dt {
  color: var(--gris);
  font-size: 13.5px;
  font-weight: 600;
}

.ficha dd {
  margin: 3px 0 0;
  font-size: 16px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

/* «Registro desde» con su «Cambiar» en el mismo renglón (Luis, 2 nov 2026). */
.ficha .ficha-con-accion {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

/* El área de toque se queda grande sin hacer más alto el renglón. */
.ficha-con-accion .enlace {
  flex: none;
  margin: -10px -6px;
  font-size: 15px;
}

.selector {
  display: flex;
  gap: 4px;
  margin-top: 12px;
  padding: 4px;
  border-radius: 99px;
  background: var(--pista);
}

.selector button {
  flex: 1;
  height: 44px;
  border: 0;
  border-radius: 99px;
  background: transparent;
  color: var(--gris);
  font-size: 15px;
  font-weight: 700;
  transition:
    background-color 0.25s,
    color 0.25s,
    box-shadow 0.25s;
}

.selector button[aria-checked='true'] {
  background: var(--tarjeta);
  color: var(--tinta);
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.14);
}

.acciones-lista {
  margin-top: 30px;
}

.pie-legal {
  margin: 26px 0 0;
  color: var(--gris);
  font-size: 13px;
  line-height: 1.5;
}

/* --- Botones de las hojas y de Perfil -------------------------------------- */

.acciones {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 20px;
}

.acciones form {
  margin: 0;
}

.accion {
  width: 100%;
  height: 56px;
  border: 0;
  border-radius: 99px;
  background: var(--circulo);
  color: var(--circulo-tinta);
  font-size: 17px;
  font-weight: 700;
  transition: transform 0.18s var(--curva);
}

.accion:active:not(:disabled) {
  transform: scale(0.97);
}

.accion:disabled {
  opacity: 0.5;
}

/* Opciones de un catálogo: alineadas a la izquierda y con peso normal, porque
   son una lista para leer, no botones que compitan entre sí. */
.opcion {
  display: block;
  width: 100%;
  min-height: 54px;
  padding: 15px 18px;
  border: 0;
  border-radius: 18px;
  background: var(--pista);
  color: var(--tinta);
  font-size: 15.5px;
  font-weight: 600;
  text-align: left;
  text-decoration: none;
  transition:
    transform 0.18s var(--curva),
    box-shadow 0.2s;
}

.opcion:active {
  transform: scale(0.985);
}

.opcion.opcion-centrada {
  text-align: center;
  font-weight: 700;
}

.opcion-mal {
  color: var(--mal);
}

/* La causa más probable se resalta, pero sin bloquear las otras: el sistema
   sugiere, la persona decide. */
.opcion[data-probable='si'] {
  box-shadow: inset 0 0 0 2px var(--tinta);
}

dialog .enlace {
  color: var(--gris);
  font-weight: 600;
  text-decoration: none;
}

/* --- Hojas (diálogos) ------------------------------------------------------- */

dialog {
  width: min(100% - 16px, 504px);
  max-width: none;
  max-height: calc(100dvh - 24px);
  margin: auto auto calc(env(safe-area-inset-bottom) + 8px);
  padding: 30px 24px 22px;
  overflow-y: auto;
  border: 0;
  border-radius: 34px;
  background: var(--tarjeta);
  color: var(--tinta);
  text-align: center;
  overscroll-behavior: contain;
}

dialog[open] {
  animation: hoja-sube 0.5s var(--cajon) both;
}

dialog::backdrop {
  background: rgb(4 6 7 / 0.58);
  animation: fundido 0.3s var(--curva) both;
}

dialog h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 24px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.dialogo-texto {
  margin: 10px auto 0;
  max-width: 340px;
  color: var(--gris);
  font-size: 15.5px;
  line-height: 1.5;
}

.dialogo-texto.resumen,
.horario-resumen {
  color: var(--tinta);
  font-size: 16.5px;
}

#dialogo-motivo,
#dialogo-privacidad {
  text-align: left;
}

#dialogo-motivo .dialogo-texto,
#dialogo-privacidad .dialogo-texto {
  margin-left: 0;
  max-width: none;
}

/* El aviso: un documento que se desliza arriba y un pie que no se mueve, con
   cuánto lleva leído, la casilla y el botón (Luis, 13 nov 2026). */
#dialogo-privacidad {
  padding: 0;
  overflow: hidden;
}

#dialogo-privacidad[open] {
  display: flex;
  flex-direction: column;
}

.aviso-hoja {
  flex: 1 1 auto;
  min-height: 0;
  padding: 30px 24px 22px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.aviso-documento {
  margin-top: 18px;
  color: var(--gris);
  font-size: 14.5px;
  line-height: 1.6;
}

.aviso-documento p {
  margin: 0 0 9px;
}

.aviso-documento b {
  color: var(--tinta);
  font-weight: 700;
}

/* La leyenda: lo primero que se lee, en el color del texto. */
.aviso-entrada p {
  margin: 0 0 10px;
  color: var(--tinta);
  font-size: 15.5px;
  line-height: 1.55;
}

/* «AVISO DE PRIVACIDAD INTEGRAL…», «TÉRMINOS…»: rótulos que separan partes. */
.aviso-rotulo {
  margin: 26px 0 2px;
  padding-top: 20px;
  border-top: 1px solid var(--linea);
  color: var(--gris);
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1.45;
}

.aviso-apartado {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 20px 0 6px;
  color: var(--tinta);
  font-family: var(--display);
  font-size: 16px;
  font-weight: 800;
  line-height: 1.3;
}

.aviso-numero {
  flex: none;
  min-width: 30px;
  height: 22px;
  padding: 0 6px;
  border-radius: 8px;
  background: var(--pista);
  color: var(--gris);
  font-family: var(--texto);
  font-size: 11px;
  line-height: 22px;
  text-align: center;
}

.aviso-documento ul {
  margin: 0 0 10px;
  padding: 0;
  list-style: none;
}

.aviso-documento li {
  position: relative;
  margin-bottom: 8px;
  padding-left: 16px;
}

.aviso-documento li::before {
  content: '';
  position: absolute;
  top: 0.66em;
  left: 2px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gris-claro);
}

.aviso-pie {
  flex: none;
  padding: 0 24px 18px;
  background: var(--tarjeta);
}

.aviso-avance {
  height: 3px;
  margin: 0 -24px 16px;
  background: var(--pista);
}

.aviso-avance i {
  display: block;
  height: 100%;
  background: var(--tinta);
  transform: scaleX(0);
  transform-origin: left;
}

.aviso-pie .acciones {
  margin-top: 14px;
}

/* La casilla de consentimiento: el texto entero se puede tocar. */
.casilla {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 12px;
  align-items: start;
  color: var(--tinta);
  font-size: 13.5px;
  line-height: 1.45;
  cursor: pointer;
}

.casilla[hidden] {
  display: none;
}

.casilla input {
  appearance: none;
  display: grid;
  place-content: center;
  width: 24px;
  height: 24px;
  margin: 1px 0 0;
  border: 2px solid var(--gris-claro);
  border-radius: 8px;
  background: none;
  cursor: pointer;
  transition:
    background-color 120ms ease,
    border-color 120ms ease;
}

.casilla input:checked {
  border-color: var(--circulo);
  background: var(--circulo);
}

.casilla input:checked::after {
  content: '';
  width: 11px;
  height: 6px;
  border-bottom: 2.5px solid var(--circulo-tinta);
  border-left: 2.5px solid var(--circulo-tinta);
  transform: translateY(-1px) rotate(-45deg);
}

/* La versión del aviso y desde cuándo rige, chica, debajo del título. */
.dialogo-meta {
  margin: 6px 0 0;
  color: var(--gris);
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.4;
}

/* Un error dentro de una hoja, debajo de lo que lo causó. */
dialog .nota {
  margin-top: 16px;
}

/* Celular o computadora: dos opciones del mismo peso, lado a lado, sin una que
   parezca elegida de antemano (Luis, 2 nov 2026). */
.eleccion {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 22px;
}

.eleccion button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 108px;
  padding: 18px 10px 16px;
  border: 0;
  border-radius: 24px;
  background: var(--pista);
  color: var(--tinta);
  font-size: 16.5px;
  font-weight: 700;
  transition:
    transform 0.18s var(--curva),
    background-color 0.2s,
    box-shadow 0.2s,
    opacity 0.2s;
}

.eleccion svg {
  width: 34px;
  height: 34px;
}

.eleccion button:active:not(:disabled) {
  transform: scale(0.96);
}

/* Al cambiar desde Perfil, la que tiene ahora. */
.eleccion button[data-actual='si'] {
  box-shadow: inset 0 0 0 2px var(--tinta);
}

/* Guardando: la que se tocó se queda; la otra se apaga. */
.eleccion button:disabled:not([data-eligiendo='si']) {
  opacity: 0.45;
}

#dialogo-dispositivo-pie {
  margin-top: 10px;
}

/* La cámara: un círculo, en espejo, como se ve uno al tomarse una foto. */
.visor {
  position: relative;
  width: min(236px, 62vw);
  aspect-ratio: 1;
  margin: 22px auto 4px;
  overflow: hidden;
  border-radius: 50%;
  background: var(--pista);
}

.visor video,
.visor .foto-previa {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
}

.visor .foto-previa {
  position: absolute;
  inset: 0;
  display: none;
}

.visor::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  box-shadow: inset 0 0 0 4px rgb(255 255 255 / 0.85);
  pointer-events: none;
}

.visor-etiqueta {
  position: absolute;
  left: 50%;
  bottom: 18px;
  padding: 5px 12px;
  border-radius: 99px;
  background: rgb(7 8 8 / 0.7);
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  transform: translateX(-50%);
}

.visor .destello {
  position: absolute;
  inset: 0;
  background: #ffffff;
  opacity: 0;
  pointer-events: none;
}

/* Las dos fases del diálogo. */
#dialogo-camara[data-fase='camara'] .solo-revision,
#dialogo-camara[data-fase='revision'] .solo-camara {
  display: none;
}

#dialogo-camara[data-fase='revision'] video {
  visibility: hidden;
}

#dialogo-camara[data-fase='revision'] .foto-previa {
  display: block;
  animation: revelar 0.3s var(--curva);
}

#dialogo-camara[data-fase='revision'] .destello {
  animation: destello 0.45s var(--curva);
}

/* El resumen de la salida: la palomita (o el aviso, si algo faltó). */
.marca-resumen {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--circulo);
  color: var(--circulo-tinta);
}

.marca-resumen svg {
  width: 32px;
  height: 32px;
}

#dialogo-resumen[data-tono='exito'] .sello-bien,
#dialogo-resumen:not([data-tono='exito']) .sello-ojo {
  display: block;
}

#dialogo-resumen[data-tono='alerta'] .marca-resumen {
  background: var(--alerta-fondo);
  color: var(--alerta);
}

/* --- Portada (sin sesión) --------------------------------------------------- */

/*
 * Una tarjeta de vidrio al centro, como la referencia que Luis eligió el 4 de
 * noviembre de 2026, después de ver y descartar una página de dos columnas.
 * Oscura en los dos temas, sobre el fondo de la app: casi negro, la cuadrícula
 * —aquí más tenue y quieta: Luis quitó las celdas que se encendían— y el
 * resplandor cian. En la tarjeta, el logotipo de PowerMe, más grande que en la
 * app, y un solo botón, el de Microsoft.
 */
.portada {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100dvh;
  padding: calc(env(safe-area-inset-top) + 32px) 16px calc(env(safe-area-inset-bottom) + 32px);
  /* Lo que entra desde abajo no debe sacar la barra de desplazamiento. */
  overflow: clip;
}

.portada-fondo {
  position: absolute;
  z-index: -1;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

/* La cuadrícula, de la misma celda que la de la app; se apaga hacia las
   orillas, alrededor de la tarjeta. */
.portada-fondo::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgb(255 255 255 / 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgb(255 255 255 / 0.025) 1px, transparent 1px);
  background-size: 26px 26px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 45%, #000, rgb(0 0 0 / 0.5) 55%, transparent 100%);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 45%, #000, rgb(0 0 0 / 0.5) 55%, transparent 100%);
}

/* El resplandor de arriba, el mismo de la app. */
.portada-fondo::after {
  content: '';
  position: absolute;
  inset: -40px -20% auto;
  height: 420px;
  background: radial-gradient(
    closest-side,
    rgb(11 206 225 / 0.19),
    rgb(11 206 225 / 0.05) 50%,
    rgb(11 206 225 / 0)
  );
  transform: translateY(-46%);
  animation: brillo 9s ease-in-out infinite alternate;
}

/* La tarjeta: un vidrio que la luz toca por la izquierda y que hacia la
   derecha se funde con el fondo, como la referencia. */
.portada-tarjeta {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 480px;
  padding: 44px clamp(24px, 7vw, 40px) 40px;
  border-radius: 28px;
  background: linear-gradient(90deg, rgb(255 255 255 / 0.063), rgb(7 8 8 / 0.9));
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  box-shadow: 0 30px 60px -24px rgb(0 0 0 / 0.9);
  animation: surgir 0.7s 0.1s var(--curva) both;
}

/* El logotipo de siempre, solo que grande. */
.portada-logo {
  display: block;
  width: 300px;
  max-width: 100%;
  height: auto;
}

.portada-tarjeta h1 {
  margin: 16px 0 28px;
  color: rgb(255 255 255 / 0.6);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
}

.portada-tarjeta hr {
  align-self: stretch;
  margin: 0 0 22px;
  border: 0;
  border-top: 1px solid rgb(255 255 255 / 0.1);
}

/* El botón de Microsoft, como el de Google de la referencia: una píldora
   oscura, con un degradado de arriba abajo y el logotipo a color. */
.boton-microsoft {
  display: flex;
  align-items: center;
  align-self: stretch;
  justify-content: center;
  gap: 12px;
  height: 56px;
  padding: 0 24px;
  border-radius: 99px;
  background: linear-gradient(#232526, #2d2e30);
  color: #ffffff;
  font-size: 16.5px;
  font-weight: 600;
  text-decoration: none;
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 0.06),
    0 1px 3px rgb(0 0 0 / 0.4);
  transition:
    transform 0.18s var(--curva),
    filter 0.2s;
}

.boton-microsoft svg {
  flex: none;
  width: 20px;
  height: 20px;
}

.boton-microsoft:active {
  transform: scale(0.97);
}

/* La tarjeta es oscura en los dos temas: el error va con los colores del
   oscuro. */
.portada-tarjeta .nota {
  align-self: stretch;
  margin-top: 14px;
  background: #2c1917;
  color: #f08a7e;
  font-size: 14px;
  text-align: center;
}

.portada-nota {
  margin: 16px 0 0;
  color: rgb(255 255 255 / 0.5);
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
  text-wrap: balance;
}

.portada-nota strong {
  color: rgb(255 255 255 / 0.82);
  font-weight: 600;
}

.portada-pie {
  max-width: 480px;
  margin: 40px 0 0;
  color: rgb(255 255 255 / 0.5);
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
  text-wrap: balance;
  animation: surgir 0.7s 0.25s var(--curva) both;
}

/* --- Pantalla ancha: laptop o computadora de escritorio --------------------- */

/*
 * En una laptop o un monitor la app era la columna del celular: una franja de
 * 520 px estirada hasta el piso, con el fondo cortado a los lados y las hojas
 * pegadas abajo (Luis, 2 nov 2026). Aquí el fondo ocupa toda la ventana, el
 * panel es una tarjeta con las cuatro esquinas redondeadas que termina donde
 * termina lo suyo, las hojas son ventanas al centro, la portada va al centro y
 * las pestañas dicen su nombre. El diseño es el mismo del 23 oct: los mismos
 * colores, la misma letra, el cian igual de escaso.
 *
 * Se decide por ancho y alto: un celular acostado es ancho pero bajito, y se
 * queda como está. Con ratón basta el ancho, para la laptop con la pantalla
 * escalada y la barra de favoritos, que deja poca altura.
 */
@media (min-width: 900px) and (min-height: 460px), (min-width: 900px) and (hover: hover) and (pointer: fine) {
  /* Con barra de desplazamiento fija (Windows), la columna no se corre de lado
     al pasar de Inicio, que cabe, a Perfil, que no; y la barra va oscura, sobre
     el fondo. Las hojas, que pueden ser blancas, se quedan con la de siempre. */
  html {
    scrollbar-gutter: stable;
    scrollbar-color: rgb(255 255 255 / 0.22) var(--suelo);
  }

  .app {
    max-width: 560px;
    /* La sombra de la tarjeta no se corta en los lados; el resplandor ya lo
       recorta el fondo, que ahora es de la ventana. */
    overflow-x: visible;
    /* Lugar para las pestañas, que flotan abajo de la ventana. */
    padding-bottom: 116px;
  }

  .fondo {
    position: fixed;
    inset: 0;
    height: auto;
  }

  /* La cuadrícula se apaga desde arriba al centro hacia abajo y a los lados. */
  .fondo::before {
    -webkit-mask-image: radial-gradient(
      ellipse 70% 80% at 50% 0%,
      #000,
      rgb(0 0 0 / 0.45) 45%,
      transparent 85%
    );
    mask-image: radial-gradient(ellipse 70% 80% at 50% 0%, #000, rgb(0 0 0 / 0.45) 45%, transparent 85%);
  }

  .fondo::after {
    inset: -60px 10% auto;
    height: 560px;
  }

  .cabeza {
    padding: 30px 30px 0;
  }

  .banda,
  .cabecera-vista {
    padding: 0 30px;
  }

  .tarjeta {
    flex: none;
    margin: 24px 0 0;
    padding: 32px 30px 30px;
    border-radius: 34px;
    box-shadow:
      0 0 0 1px rgb(255 255 255 / 0.05),
      0 40px 80px -40px rgb(0 0 0 / 0.75);
  }

  /* Las pestañas: icono y nombre; la abierta, una píldora como el selector de
     Apariencia. */
  .pestanas {
    bottom: 24px;
  }

  .pestana {
    display: flex;
    align-items: center;
    gap: 8px;
    width: auto;
    height: 46px;
    padding: 0 18px 0 14px;
    font-size: 15px;
    font-weight: 700;
    transition:
      color 0.25s,
      background-color 0.25s,
      box-shadow 0.25s,
      transform 0.18s var(--curva);
  }

  .pestana svg {
    width: 22px;
    height: 22px;
  }

  .pestana .pestana-rotulo {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip: auto;
  }

  .pestana[aria-current='page'] {
    background: var(--tarjeta);
    box-shadow: 0 1px 3px rgb(0 0 0 / 0.14);
  }

  /* Las hojas, ventanas al centro con las cuatro esquinas redondeadas. Entran
     con un fundido corto en vez de subir desde el borde. */
  dialog {
    width: min(100% - 48px, 460px);
    max-height: calc(100dvh - 64px);
    margin: auto;
    padding: 34px 32px 26px;
    scrollbar-color: auto;
  }

  dialog[open] {
    animation: ventana-abre 0.32s var(--curva) both;
  }

  /* El aviso se lee: más ancho y más alto. */
  #dialogo-privacidad {
    width: min(100% - 48px, 600px);
  }

  /* En la portada, el resplandor como el de la app en pantalla ancha. */
  .portada-fondo::after {
    inset: -60px 10% auto;
    height: 560px;
  }
}

/* --- Con ratón ----------------------------------------------------------------- */

/* Solo donde hay un puntero que pasa por encima: en el celular, un toque no debe
   dejar nada encendido (Luis, 2 nov 2026). Suave: un poco más de tinta o de
   fondo, nada que salte. */
@media (hover: hover) and (pointer: fine) {
  .accion {
    transition:
      transform 0.18s var(--curva),
      opacity 0.2s;
  }

  .opcion {
    transition:
      transform 0.18s var(--curva),
      background-color 0.2s,
      box-shadow 0.2s;
  }

  .pildora:hover:not(:disabled) {
    background: #e7eeee;
  }

  .boton-microsoft:hover {
    filter: brightness(1.1);
  }

  .accion:hover:not(:disabled) {
    opacity: 0.88;
  }

  .opcion:hover,
  .eleccion button:hover:not(:disabled) {
    background: color-mix(in srgb, var(--tinta) 7%, var(--pista));
  }

  .enlace:hover {
    text-decoration-thickness: 2px;
  }

  dialog .enlace:hover {
    color: var(--tinta);
  }

  .pestana:hover:not([aria-current='page']) {
    color: var(--gris);
  }

  .segmento:hover:not([aria-selected='true']) {
    background: rgb(255 255 255 / 0.06);
    color: #ffffff;
  }

  .selector button:hover:not([aria-checked='true']) {
    color: var(--tinta);
  }

  .comida-boton .disco {
    transition:
      transform 0.2s var(--curva),
      background-color 0.35s,
      color 0.35s,
      box-shadow 0.2s;
  }

  .comida-boton:hover:not(:disabled) .disco {
    box-shadow: 0 0 0 5px var(--pista);
  }

  .aviso-cerrar:hover {
    background: rgb(255 255 255 / 0.08);
    color: #ffffff;
  }
}

/* --- Movimiento --------------------------------------------------------------- */

/* Al abrir: la cabecera, la banda en cascada, el panel sube y las pestañas aparecen. */
.app.abre .cabeza {
  animation: surgir 0.6s 0.1s var(--curva) both;
}

.app.abre .banda > *,
.app.abre .cabecera-vista {
  animation: surgir 0.6s var(--curva) both;
}

.app.abre .banda > :nth-child(1) {
  animation-delay: 0.2s;
}

.app.abre .banda > :nth-child(2) {
  animation-delay: 0.27s;
}

.app.abre .banda > :nth-child(3) {
  animation-delay: 0.34s;
}

.app.abre .tarjeta {
  animation: tarjeta-sube 0.8s 0.26s var(--cajon) both;
}

.app.abre .pestanas {
  animation: pestanas-entran 0.6s 0.5s var(--curva) both;
}

.sacude {
  animation: sacudir 0.42s var(--curva);
}

@keyframes girar {
  to {
    transform: rotate(360deg);
  }
}

@keyframes brillo {
  to {
    opacity: 0.72;
  }
}

@keyframes fundido {
  from {
    opacity: 0;
  }
}

@keyframes surgir {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
}

@keyframes vista-entra {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}

@keyframes tarjeta-sube {
  from {
    transform: translateY(80px);
  }
}

@keyframes pestanas-entran {
  from {
    opacity: 0;
    transform: translate(-50%, 18px);
  }
}

@keyframes hoja-sube {
  from {
    transform: translateY(110%);
  }
}

/* En pantalla ancha: la ventana aparece en su lugar, sin recorrer la pantalla. */
@keyframes ventana-abre {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.97);
  }
}

@keyframes aviso-entra {
  from {
    opacity: 0;
    transform: translate(-50%, -24px) scale(0.94);
  }
}

@keyframes aviso-sale {
  to {
    opacity: 0;
    transform: translate(-50%, -16px) scale(0.96);
  }
}

@keyframes trazo {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes respira {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.18;
  }
  50% {
    transform: scale(1.08);
    opacity: 0.06;
  }
}

@keyframes rebote {
  0% {
    transform: scale(0.86);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes valor-entra {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}

@keyframes dig-sale {
  to {
    opacity: 0;
    transform: translateY(-100%);
  }
}

@keyframes dig-entra {
  from {
    opacity: 0;
    transform: translateY(100%);
  }
}

@keyframes sacudir {
  0%,
  100% {
    transform: translateX(0);
  }
  20% {
    transform: translateX(-7px);
  }
  40% {
    transform: translateX(6px);
  }
  60% {
    transform: translateX(-4px);
  }
  80% {
    transform: translateX(2px);
  }
}

@keyframes revelar {
  from {
    opacity: 0;
    transform: scaleX(-1) scale(1.03);
  }
  to {
    opacity: 1;
    transform: scaleX(-1) scale(1);
  }
}

@keyframes destello {
  0% {
    opacity: 0;
  }
  20% {
    opacity: 0.9;
  }
  100% {
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }
}
