/*
 * Hoja de estilos unica de Fit.
 *
 * La app se usa con el movil en la mano y en medio de una serie: todo lo que se
 * toca es grande, y los numeros que hay que leer de un vistazo (peso,
 * repeticiones, descanso) van grandes y con `tabular-nums` para que no bailen
 * al cambiar de valor.
 *
 * Tema claro con un unico acento (volt). El volt sobre blanco no se lee (1,3:1
 * de contraste), asi que se usa SOLO como relleno con texto oscuro encima
 * (`--sobre-acento`); para texto, iconos y barras finas va `--acento-texto`,
 * un lima oscuro que si contrasta. No mezclar los dos usos.
 *
 * Ninguna fuente externa: se apoya en la del sistema, que en iPhone y iPad es
 * SF Pro. Ademas de verse bien, evita el parpadeo de texto al cargar y que la
 * app dependa de un servidor de fuentes.
 */

:root {
  /* Superficies, del fondo hacia delante. */
  --fondo: #f7f7f5;
  --superficie: #ffffff;
  --superficie-alta: #f1f1ed;
  --linea: #e4e3de;
  --linea-tenue: #edece8;

  --tinta: #14151a;
  /* Sobre blanco no valen los grises claros: estos dos estan calculados para
     pasar de 4,5:1 (WCAG AA) sobre --superficie y sobre --superficie-alta. Los
     del tema oscuro (#8b929c / #9aa0a7) se quedaban en 2,6:1. */
  --suave: #5b6169;
  --tenue: #6d737c;

  /* Un solo acento en toda la app: lo que se puede pulsar y lo que esta hecho. */
  --acento: #cdff57; /* solo como relleno, con --sobre-acento encima */
  --acento-texto: #4d7c0f; /* para texto, iconos y barras finas sobre claro */
  --acento-apagado: #85b81a;
  --sobre-acento: #10140a;
  --acento-veloutre: rgb(205 255 87 / 22%);

  --peligro: #c8322b;

  --radio: 16px;
  --radio-chico: 11px;
  --sombra: 0 1px 2px rgb(20 21 26 / 6%), 0 12px 32px rgb(20 21 26 / 8%);

  color-scheme: light;
}

* {
  box-sizing: border-box;
}

/* La app se enseña y se esconde con el atributo `hidden`. Como casi todos los
   bloques llevan su propio `display`, sin este !important el `display:none` que
   trae el navegador para [hidden] pierde por especificidad y se ve todo a la vez. */
[hidden] {
  display: none !important;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  background: var(--fondo);
  color: var(--tinta);
  font:
    16px/1.45 -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    system-ui,
    Roboto,
    sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overscroll-behavior-y: none;
  /* Un halo muy tenue arriba: da profundidad sin ensuciar. */
  background-image: radial-gradient(120% 60% at 50% -10%, rgb(205 255 87 / 18%), transparent 65%);
  background-attachment: fixed;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.15;
  letter-spacing: -0.03em;
  font-weight: 700;
}

/* Todo numero que se lea de un vistazo, con ancho fijo. */
.cifra,
.numero b,
.serie .n,
.serie input,
#crono,
#descanso b {
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum';
}

/* ------------------------------------------------------------- estructura */

#app {
  display: grid;
  grid-template-rows: auto 1fr auto;
  height: 100dvh;
}

#cabecera {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: max(14px, env(safe-area-inset-top)) 20px 14px;
  background: rgb(247 247 245 / 80%);
  backdrop-filter: saturate(150%) blur(18px);
  -webkit-backdrop-filter: saturate(150%) blur(18px);
  border-bottom: 1px solid var(--linea-tenue);
  position: relative;
  z-index: 5;
}

#cabecera h1 {
  font-size: 25px;
  flex: 1;
  min-width: 0;
  letter-spacing: -0.04em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

#cabecera .sub {
  display: block;
  margin-top: 3px;
  color: var(--suave);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

#vista {
  overflow-y: auto;
  padding: 20px 20px 28px;
  -webkit-overflow-scrolling: touch;
  transition: padding-bottom 0.2s ease;
}

/* Con el cronometro de descanso flotando, lo ultimo de la pagina queda debajo y
   no se puede ni leer ni pulsar. Se le hace sitio para que suba con el scroll. */
body.con-descanso #vista {
  padding-bottom: 92px;
}

/* Barra de pestañas inferior. */
#tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: rgb(255 255 255 / 88%);
  backdrop-filter: saturate(150%) blur(18px);
  -webkit-backdrop-filter: saturate(150%) blur(18px);
  border-top: 1px solid var(--linea-tenue);
  padding-bottom: env(safe-area-inset-bottom);
}

#tabs button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 11px 4px 9px;
  background: none;
  border: 0;
  color: var(--tenue);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  position: relative;
}

#tabs button svg {
  width: 23px;
  height: 23px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#tabs button[aria-selected='true'] {
  color: var(--acento-texto);
}

/* Marca fina sobre la pestaña activa. */
#tabs button[aria-selected='true']::before {
  content: '';
  position: absolute;
  top: 0;
  width: 26px;
  height: 2px;
  border-radius: 0 0 3px 3px;
  background: var(--acento-texto);
}

/* ---------------------------------------------------------------- piezas */

.tarjeta {
  background: var(--superficie);
  border: 1px solid var(--linea);
  border-radius: var(--radio);
  padding: 16px;
  margin-bottom: 12px;
}

.boton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 50px;
  padding: 0 20px;
  /* Sobre fondo claro un boton relleno de gris casi no se distingue del
     fondo: el borde es lo que lo define. El de acento no lo necesita. */
  border: 1px solid var(--linea);
  border-radius: 13px;
  background: var(--superficie-alta);
  color: var(--tinta);
  font-weight: 650;
  letter-spacing: -0.01em;
  cursor: pointer;
  text-align: center;
}

.boton.ancho {
  width: 100%;
}

/* La accion principal de cada pantalla, en volt. Solo deberia haber una. */
.boton.acento {
  background: var(--acento);
  border-color: transparent;
  color: var(--sobre-acento);
  font-weight: 700;
  box-shadow: 0 6px 18px rgb(133 184 26 / 26%);
}

.boton.secundario {
  background: transparent;
  color: var(--tinta);
  border-color: var(--linea);
}

.boton.peligro {
  background: none;
  color: var(--peligro);
  border-color: var(--linea);
}

.boton.pequeno {
  min-height: 38px;
  padding: 0 14px;
  font-size: 14px;
  border-radius: 10px;
}

.boton:disabled {
  opacity: 0.4;
  cursor: default;
}

.campo {
  display: block;
  margin-bottom: 14px;
}

.campo span {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--suave);
  margin-bottom: 7px;
  letter-spacing: 0.01em;
}

.campo input,
.campo select,
.campo textarea {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  background: var(--superficie);
  border: 1px solid var(--linea);
  border-radius: 13px;
  color: var(--tinta);
}

.campo textarea {
  min-height: 92px;
  resize: vertical;
}

.campo input::placeholder,
.campo textarea::placeholder {
  color: var(--tenue);
}

.campo input:focus,
.campo select:focus,
.campo textarea:focus,
.serie input:focus {
  outline: none;
  border-color: var(--acento);
  box-shadow: 0 0 0 3px var(--acento-veloutre);
}

.fila {
  display: flex;
  gap: 8px;
  align-items: center;
}

.crece {
  flex: 1;
  min-width: 0;
}

.suave {
  color: var(--suave);
}

.pequeno {
  font-size: 13px;
}

.vacio {
  text-align: center;
  color: var(--suave);
  padding: 44px 24px 36px;
}

.vacio strong {
  display: block;
  color: var(--tinta);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
}

.error {
  background: rgb(200 50 43 / 8%);
  border: 1px solid rgb(200 50 43 / 22%);
  color: var(--peligro);
  border-radius: 12px;
  padding: 11px 14px;
  margin-bottom: 14px;
  font-size: 14px;
}

/* Chips de filtro, con scroll horizontal. */
.chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-bottom: 14px;
  scrollbar-width: none;
}

.chips::-webkit-scrollbar {
  display: none;
}

.chip {
  flex: 0 0 auto;
  padding: 9px 15px;
  border: 1px solid var(--linea);
  border-radius: 999px;
  background: var(--superficie);
  color: var(--suave);
  font-size: 14px;
  font-weight: 550;
  cursor: pointer;
  white-space: nowrap;
}

.chip[aria-pressed='true'] {
  background: var(--acento);
  border-color: var(--acento);
  color: var(--sobre-acento);
  font-weight: 700;
}

.etiqueta {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--superficie-alta);
  border: 1px solid var(--linea);
  font-size: 12px;
  font-weight: 600;
  color: var(--suave);
}

/* ------------------------------------------------------------- ejercicios */

/*
 * Las ilustraciones son linea negra sobre blanco: van sobre su propia tarjeta
 * clara. Sobre el fondo oscuro se verian como recortes pegados.
 */
.miniatura {
  width: 62px;
  height: 62px;
  flex: 0 0 auto;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--linea);
  object-fit: cover;
}

/* Dentro del entreno la animacion es lo que se mira entre serie y serie. */
.miniatura.grande {
  width: 88px;
  height: 88px;
  border-radius: 14px;
}

.lista-ejercicios {
  display: grid;
  gap: 9px;
}

.item-ejercicio {
  display: flex;
  gap: 13px;
  align-items: center;
  width: 100%;
  text-align: left;
  padding: 10px;
  background: var(--superficie);
  border: 1px solid var(--linea);
  border-radius: var(--radio);
  color: var(--tinta);
  cursor: pointer;
}

.item-ejercicio h3 {
  font-size: 15.5px;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.item-ejercicio .meta {
  display: block;
  font-size: 12.5px;
  color: var(--suave);
  margin-top: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------------------------------------------------------------- series */

.ejercicio-entreno {
  background: var(--superficie);
  border: 1px solid var(--linea);
  border-radius: var(--radio);
  margin-bottom: 12px;
  overflow: hidden;
}

.ejercicio-entreno > header {
  display: flex;
  gap: 13px;
  align-items: center;
  padding: 13px;
  border-bottom: 1px solid var(--linea-tenue);
}

.ejercicio-entreno h3 {
  font-size: 16px;
  letter-spacing: -0.025em;
  /* Hay nombres muy largos ("Press de banca declinado con mancuernas, agarre
     cerrado"): dos lineas como mucho, para que la cabecera no crezca sin fin. */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.series {
  padding: 4px 13px 14px;
}

.serie,
.serie-cabecera {
  display: grid;
  grid-template-columns: 26px 1fr 1fr 50px;
  gap: 9px;
  align-items: center;
}

.serie-cabecera {
  font-size: 10.5px;
  color: var(--tenue);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding: 10px 0 6px;
}

.serie {
  padding: 4px 0;
  border-radius: 12px;
}

.serie .n {
  color: var(--tenue);
  font-size: 14px;
  font-weight: 600;
  text-align: center;
}

.serie input {
  width: 100%;
  min-height: 48px;
  padding: 8px;
  text-align: center;
  font-size: 18px;
  font-weight: 600;
  border: 1px solid var(--linea);
  border-radius: 12px;
  background: var(--superficie-alta);
  color: var(--tinta);
}

.serie .marcar {
  min-height: 48px;
  border: 1px solid var(--linea);
  border-radius: 12px;
  background: var(--superficie-alta);
  color: var(--tenue);
  cursor: pointer;
  display: grid;
  place-items: center;
}

.serie .marcar svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Serie hecha: es el estado que se busca, asi que se lleva el acento. */
.serie[data-hecha='1'] .marcar {
  background: var(--acento);
  border-color: var(--acento);
  color: var(--sobre-acento);
}

.serie[data-hecha='1'] input {
  border-color: var(--acento-apagado);
  background: var(--acento-veloutre);
  color: var(--acento-texto);
}

/* ------------------------------------------------------------- resumenes */

.numeros {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
  margin-bottom: 14px;
}

.numero {
  background: var(--superficie);
  border: 1px solid var(--linea);
  border-radius: var(--radio);
  padding: 15px 10px;
  text-align: center;
}

.numero b {
  display: block;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.045em;
  white-space: nowrap;
}

/* La unidad, en pequeño y apagada: lo que se lee de un vistazo es la cifra. */
.numero b small {
  font-size: 0.5em;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--suave);
  margin-left: 3px;
}

.numero span {
  display: block;
  margin-top: 3px;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--tenue);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Barras de volumen semanal: alturas en % via style, sin libreria. */
.barras {
  display: flex;
  align-items: flex-end;
  gap: 5px;
  height: 116px;
  margin: 12px 0 6px;
}

.barras div {
  flex: 1;
  background: var(--superficie-alta);
  border-radius: 5px 5px 3px 3px;
  min-height: 4px;
}

.barras div.hay {
  background: linear-gradient(180deg, var(--acento-apagado), var(--acento-texto));
}

.medidor {
  height: 7px;
  border-radius: 4px;
  background: var(--superficie-alta);
  overflow: hidden;
  margin-top: 6px;
}

.medidor i {
  display: block;
  height: 100%;
  border-radius: 4px;
  background: var(--acento-texto);
}

/* ---------------------------------------------------------- hoja inferior */

.hoja {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  align-items: end;
  background: rgb(20 21 26 / 38%);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.hoja > div {
  background: var(--superficie);
  border: 1px solid var(--linea);
  border-bottom: 0;
  border-radius: 24px 24px 0 0;
  max-height: 90dvh;
  display: grid;
  grid-template-rows: auto 1fr;
  box-shadow: var(--sombra);
}

.hoja header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 18px 14px;
  border-bottom: 1px solid var(--linea-tenue);
  position: relative;
}

/* Asa: el gesto de arrastrar la hoja hacia abajo se da por hecho en el movil. */
.hoja header::before {
  content: '';
  position: absolute;
  top: 7px;
  left: 50%;
  transform: translateX(-50%);
  width: 38px;
  height: 4px;
  border-radius: 3px;
  background: var(--linea);
}

.hoja header h2 {
  flex: 1;
  font-size: 19px;
  min-width: 0;
  letter-spacing: -0.035em;
}

.hoja .cuerpo {
  overflow-y: auto;
  padding: 18px calc(18px + env(safe-area-inset-right)) calc(24px + env(safe-area-inset-bottom))
    calc(18px + env(safe-area-inset-left));
}

.cerrar {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 0;
  border-radius: 50%;
  background: var(--superficie-alta);
  color: var(--suave);
  font-size: 19px;
  line-height: 1;
  cursor: pointer;
}

.cerrar svg {
  width: 19px;
  height: 19px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.9;
  stroke-linecap: round;
}

.gif {
  width: 100%;
  /* Las ilustraciones son de 180x180 (limite de la licencia), asi que no se
     estiran mas de la cuenta: pasado este ancho se ven blandas. */
  max-width: 268px;
  margin: 0 auto 6px;
  display: block;
  border-radius: 18px;
  background: #fff;
  border: 1px solid var(--linea);
}

.pasos {
  margin: 0;
  padding-left: 22px;
  display: grid;
  gap: 10px;
  color: var(--suave);
}

.pasos li::marker {
  color: var(--acento-texto);
  font-weight: 700;
}

.atribucion {
  font-size: 11.5px;
  /* Va sobre --fondo, no sobre blanco: con --tenue se quedaba en 4,46:1. */
  color: var(--suave);
  text-align: center;
  margin: 8px 0 16px;
}

.atribucion a {
  color: inherit;
}

/* ----------------------------------------------------- cronometro y avisos */

/* Barra de descanso: flota sobre las pestañas al marcar una serie. */
#descanso {
  position: fixed;
  left: 14px;
  right: 14px;
  bottom: calc(74px + env(safe-area-inset-bottom));
  z-index: 15;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  border-radius: 16px;
  background: var(--superficie-alta);
  border: 1px solid var(--linea);
  color: var(--tinta);
  box-shadow: var(--sombra);
  overflow: hidden;
}

#descanso > span {
  font-size: 13px;
  font-weight: 600;
  color: var(--suave);
}

#descanso b {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--acento-texto);
}

#descanso button {
  background: var(--superficie);
  border: 1px solid var(--linea);
  color: var(--tinta);
  border-radius: 9px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

/* Progreso del descanso: se vacia solo, para verlo sin leer el numero. */
#descanso-barra {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--acento-texto);
  transition: width 0.25s linear;
}

#aviso {
  position: fixed;
  left: 50%;
  bottom: calc(88px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 40;
  background: var(--acento);
  color: var(--sobre-acento);
  padding: 12px 18px;
  border-radius: 12px;
  font-size: 14.5px;
  font-weight: 650;
  box-shadow: var(--sombra);
  max-width: calc(100vw - 32px);
  transition: bottom 0.15s;
}

/* Con el cronometro de descanso en pantalla, el aviso sube para no taparlo.
   #descanso va antes que #aviso en el HTML, de ahi el selector de hermanos. */
#descanso:not([hidden]) ~ #aviso {
  bottom: calc(146px + env(safe-area-inset-bottom));
}

/* ---------------------------------------------------------------- acceso */

#acceso {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 28px;
}

#acceso > div {
  width: 100%;
  max-width: 360px;
}

#acceso .marca {
  text-align: center;
  margin-bottom: 30px;
}

#acceso .marca h1 {
  font-size: 40px;
  letter-spacing: -0.055em;
  margin-top: 18px;
}

#acceso .marca p {
  color: var(--suave);
  margin: 10px 0 0;
  font-size: 15px;
}

.logo {
  width: 68px;
  height: 68px;
  display: block;
  margin: 0 auto;
}

/* ------------------------------------------------------------ animaciones */

/*
 * Todo lo de aqui anima solo `transform` y `opacity`, que el navegador resuelve
 * en la GPU sin recalcular la pagina. Cualquier otra propiedad (alto, margenes,
 * fondos grandes) da tirones en el movil.
 *
 * Y va dentro de `prefers-reduced-motion: no-preference`: quien tenga el
 * sistema configurado para reducir movimiento no ve nada de esto.
 */
@media (prefers-reduced-motion: no-preference) {
  #vista.entrando > * {
    animation: entra 0.34s cubic-bezier(0.22, 0.72, 0.28, 1) backwards;
  }

  #vista.entrando > *:nth-child(1) {
    animation-delay: 0.01s;
  }
  #vista.entrando > *:nth-child(2) {
    animation-delay: 0.04s;
  }
  #vista.entrando > *:nth-child(3) {
    animation-delay: 0.07s;
  }
  #vista.entrando > *:nth-child(4) {
    animation-delay: 0.1s;
  }
  #vista.entrando > *:nth-child(5) {
    animation-delay: 0.13s;
  }
  #vista.entrando > *:nth-child(n + 6) {
    animation-delay: 0.16s;
  }

  @keyframes entra {
    from {
      opacity: 0;
      transform: translateY(9px);
    }
  }

  .lista-ejercicios > * {
    animation: entra 0.3s cubic-bezier(0.22, 0.72, 0.28, 1) backwards;
  }

  .lista-ejercicios > *:nth-child(1) {
    animation-delay: 0.01s;
  }
  .lista-ejercicios > *:nth-child(2) {
    animation-delay: 0.03s;
  }
  .lista-ejercicios > *:nth-child(3) {
    animation-delay: 0.05s;
  }
  .lista-ejercicios > *:nth-child(4) {
    animation-delay: 0.07s;
  }
  .lista-ejercicios > *:nth-child(n + 5) {
    animation-delay: 0.09s;
  }

  .hoja > div {
    animation: sube 0.24s cubic-bezier(0.22, 0.72, 0.28, 1);
  }

  @keyframes sube {
    from {
      transform: translateY(22px);
      opacity: 0.5;
    }
  }

  .hoja {
    animation: fundido 0.2s ease-out;
  }

  @keyframes fundido {
    from {
      opacity: 0;
    }
  }

  /* Al marcar una serie: el tic entra dando un saltito. */
  .serie.recien .marcar svg {
    animation: tic 0.36s cubic-bezier(0.3, 1.5, 0.5, 1);
  }

  @keyframes tic {
    0% {
      transform: scale(0.4);
      opacity: 0.4;
    }
    55% {
      transform: scale(1.22);
    }
  }

  .serie.recien .marcar {
    animation: aura 0.6s ease-out;
  }

  @keyframes aura {
    from {
      box-shadow: 0 0 0 0 rgb(133 184 26 / 55%);
    }
    to {
      box-shadow: 0 0 0 14px rgb(133 184 26 / 0%);
    }
  }

  #aviso {
    animation: avisoEntra 0.22s cubic-bezier(0.22, 0.72, 0.28, 1);
  }

  @keyframes avisoEntra {
    from {
      opacity: 0;
      transform: translate(-50%, 12px);
    }
  }

  #descanso {
    animation: entra 0.24s cubic-bezier(0.22, 0.72, 0.28, 1);
  }

  #acceso .marca .logo {
    animation: entra 0.5s cubic-bezier(0.22, 0.72, 0.28, 1) backwards;
  }
}

/* Reaccion inmediata al dedo, sin esperar a la red. */
.boton,
.chip,
.item-ejercicio,
.marcar,
.cerrar,
#tabs button svg {
  transition:
    transform 0.12s ease,
    background-color 0.16s ease,
    border-color 0.16s ease,
    color 0.16s ease,
    box-shadow 0.16s ease;
}

.boton:active {
  transform: scale(0.985);
}

.item-ejercicio:active,
.chip:active {
  transform: scale(0.985);
}

.serie .marcar:active {
  transform: scale(0.9);
}

#tabs button[aria-selected='true'] svg {
  transform: translateY(-1px) scale(1.08);
}

@media (hover: hover) {
  .item-ejercicio:hover,
  .chip:hover {
    border-color: var(--tenue);
  }
}

/* En pantalla grande la app se queda centrada con ancho de movil: es donde se
   usa de verdad y estirarla a 1400px no aporta nada. */
@media (min-width: 640px) {
  body {
    display: grid;
    place-items: center;
  }

  #app,
  #acceso {
    width: 430px;
    height: 100dvh;
    border-left: 1px solid var(--linea-tenue);
    border-right: 1px solid var(--linea-tenue);
  }

  #descanso,
  #aviso {
    max-width: 402px;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    width: calc(100% - 28px);
  }

  .hoja > div {
    width: 430px;
    margin: 0 auto;
  }
}
