:root {
  color-scheme: light;
  --bg: #eef2f4;
  --surface: #ffffff;
  --surface-soft: #f6f8f9;
  --ink: #182125;
  --muted: #637178;
  --line: #dbe3e6;
  --accent: #16a06f;
  --accent-dark: #0d7652;
  --warm: #f2a93b;
  --danger: #d84b45;
  --shadow: 0 14px 36px rgba(28, 43, 51, 0.12);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  min-height: 100vh;
  margin: 0;
  padding-bottom: 112px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.8), rgba(238, 242, 244, 0.96)),
    radial-gradient(circle at 18% 0%, rgba(22, 160, 111, 0.16), transparent 30%),
    var(--bg);
  color: var(--ink);
  touch-action: manipulation;
  overscroll-behavior: none;
  -webkit-text-size-adjust: 100%;
  user-select: none;
  -webkit-user-select: none;
}

body.bloqueado .barra,
body.bloqueado .layout {
  display: none;
}

body.cargando .barra,
body.cargando .layout,
body.cargando .login,
body.cargando .instalacion-intro {
  display: none;
}

body.bloqueado {
  padding-bottom: 0;
}

body:not(.bloqueado) .login {
  display: none;
}

body:not(.bloqueado) .instalacion-intro,
body.bloqueado.mostrando-login .instalacion-intro {
  display: none;
}

body.bloqueado:not(.mostrando-login) .login {
  display: none;
}

body:not(.cargando) .carga {
  display: none;
}

button,
input {
  font: inherit;
  touch-action: manipulation;
}

input,
textarea {
  user-select: text;
  -webkit-user-select: text;
}

.carga {
  display: grid;
  min-height: 100vh;
  min-height: 100dvh;
  place-items: center;
  padding: max(24px, env(safe-area-inset-top)) 24px max(24px, env(safe-area-inset-bottom));
  background:
    radial-gradient(circle at 50% 14%, rgba(22, 160, 111, 0.18), transparent 34%),
    linear-gradient(180deg, #12181b, #1d292d);
  color: #fff;
}

.carga-panel {
  display: grid;
  justify-items: center;
  gap: 10px;
  width: min(360px, 100%);
  text-align: center;
}

.carga-panel .marca {
  color: rgba(255, 255, 255, 0.74);
}

.carga-panel h1 {
  margin: 0;
  font-size: 1.45rem;
}

.carga-panel p {
  margin: 0;
  color: rgba(255, 255, 255, 0.74);
  line-height: 1.42;
}

.pesa-loader {
  display: grid;
  grid-template-columns: 10px 12px 72px 12px 10px;
  align-items: center;
  gap: 4px;
  height: 46px;
  animation: pesa-respira 900ms ease-in-out infinite;
}

.pesa-loader span,
.pesa-loader strong {
  display: block;
  background: linear-gradient(90deg, #16a06f, #f2a93b);
}

.pesa-loader span {
  width: 100%;
  height: 28px;
  border-radius: 8px;
}

.pesa-loader span:first-child,
.pesa-loader span:last-child {
  height: 34px;
}

.pesa-loader strong {
  height: 8px;
  border-radius: 999px;
}

.carga-global {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: max(22px, env(safe-area-inset-top)) 22px max(22px, env(safe-area-inset-bottom));
  background: rgba(18, 24, 27, 0.34);
  backdrop-filter: blur(10px) saturate(1.2);
  -webkit-backdrop-filter: blur(10px) saturate(1.2);
}

.carga-global[hidden] {
  display: none;
}

.carga-global-panel {
  display: grid;
  justify-items: center;
  gap: 8px;
  width: min(260px, 88vw);
  padding: 20px 22px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 18px;
  background: rgba(18, 24, 27, 0.74);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.26);
  color: #fff;
  text-align: center;
}

.carga-global-panel .pesa-loader {
  transform-origin: center;
}

.carga-global-panel strong {
  font-size: 1rem;
}

.carga-global-panel span {
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.88rem;
}

.login,
.instalacion-intro {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 20px;
}

.login-panel,
.instalacion-panel {
  width: min(100%, 420px);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.login-panel h1 {
  margin-bottom: 8px;
}

.login-texto {
  color: var(--muted);
}

.instalacion-panel {
  display: grid;
  gap: 16px;
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(18, 24, 27, 0.72);
  box-shadow: 0 18px 46px rgba(10, 18, 22, 0.28);
  color: #fff;
  backdrop-filter: blur(18px) saturate(1.18);
  -webkit-backdrop-filter: blur(18px) saturate(1.18);
}

.instalacion-panel .marca {
  color: rgba(255, 255, 255, 0.74);
}

.instalacion-pasos {
  min-height: 255px;
}

.instalacion-paso {
  display: none;
}

.instalacion-paso.activo {
  display: grid;
  gap: 14px;
}

.instalacion-numero {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.08)),
    rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 1rem;
  font-weight: 900;
}

.instalacion-paso h1,
.instalacion-paso p,
.instalacion-paso ol {
  margin: 0;
}

.instalacion-paso h1 {
  font-size: 1.55rem;
  line-height: 1.08;
}

.instalacion-paso p,
.instalacion-paso li {
  color: rgba(255, 255, 255, 0.74);
  line-height: 1.42;
}

.instalacion-paso ol {
  display: grid;
  gap: 10px;
  padding-left: 22px;
  font-weight: 800;
}

.instalacion-indicadores {
  display: flex;
  gap: 7px;
}

.instalacion-indicadores span {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
}

.instalacion-indicadores span.activo {
  width: 24px;
  background: #fff;
}

.instalacion-acciones {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.instalacion-acciones button {
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-weight: 900;
  cursor: pointer;
}

.instalacion-acciones button.secundario {
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.instalacion-acciones button.secundario:hover {
  background: rgba(255, 255, 255, 0.24);
}

.instalacion-acciones button[hidden] {
  display: none;
}

#btnMostrarLogin {
  grid-column: 1 / -1;
}

.login-panel label {
  display: grid;
  gap: 6px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

.login-panel input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 10px;
  background: var(--surface-soft);
  color: var(--ink);
}

.login-panel button {
  width: 100%;
  min-height: 44px;
  margin-top: 14px;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-weight: 900;
  cursor: pointer;
}

.login-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin: 12px 0;
}

.login-tabs button {
  min-height: 38px;
  margin: 0;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--ink);
  font-size: 0.82rem;
}

.login-tabs button.activo {
  border-color: rgba(22, 160, 111, 0.42);
  background: #ecf8f3;
  color: var(--accent-dark);
}

.login-vista {
  display: none;
}

.login-vista.activo {
  display: block;
}

.registro-encabezado {
  display: grid;
  gap: 3px;
  margin-top: 12px;
  border: 1px solid rgba(22, 160, 111, 0.2);
  border-radius: 8px;
  padding: 10px 12px;
  background: #ecf8f3;
}

.registro-encabezado span {
  color: var(--accent-dark);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.registro-encabezado strong {
  color: var(--ink);
  font-size: 0.94rem;
}

.registro-paso {
  display: none;
}

.registro-paso.activo {
  display: block;
}

.codigos-registro {
  margin-top: 10px;
}

.login-panel button.boton-secundario {
  border: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--ink);
}

.barra {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 1180px;
  margin: 0 auto;
  padding: max(10px, env(safe-area-inset-top)) 20px 6px;
}

.barra-acciones {
  display: flex;
  align-items: center;
  gap: 10px;
}

.usuario-menu-visible {
  display: flex;
  align-items: center;
  min-height: 44px;
  max-width: min(46vw, 220px);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  padding: 8px 13px;
  background: rgba(18, 24, 27, 0.72);
  color: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 46px rgba(10, 18, 22, 0.24);
  backdrop-filter: blur(18px) saturate(1.18);
  -webkit-backdrop-filter: blur(18px) saturate(1.18);
  font-size: 0.88rem;
  font-weight: 900;
}

.usuario-menu-visible span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.menu-wrapper {
  position: static;
}

.menu-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(18, 24, 27, 0.72);
  box-shadow: 0 18px 46px rgba(10, 18, 22, 0.24);
  backdrop-filter: blur(18px) saturate(1.18);
  -webkit-backdrop-filter: blur(18px) saturate(1.18);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  transition: transform 160ms ease, opacity 160ms ease;
}

.menu-toggle[aria-expanded="true"] span:first-child {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.menu-toggle[aria-expanded="true"] span:last-child {
  transform: translateY(-7px) rotate(-45deg);
}

.menu-panel {
  position: relative;
  z-index: 40;
  display: none;
  width: min(380px, calc(100% - 40px));
  gap: 6px;
  margin: 6px max(20px, calc((100vw - 1180px) / 2 + 20px)) 12px auto;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 18px;
  padding: 8px;
  background: rgba(18, 24, 27, 0.72);
  box-shadow: 0 18px 46px rgba(10, 18, 22, 0.28);
  backdrop-filter: blur(18px) saturate(1.18);
  -webkit-backdrop-filter: blur(18px) saturate(1.18);
}

.menu-panel::before {
  content: none;
}

.menu-panel.abierto {
  display: grid;
  grid-template-columns: 1fr;
}

.menu-panel-cabecera {
  display: flex;
  grid-column: 1 / -1;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 8px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}

.menu-panel-cabecera strong {
  color: #fff;
  font-size: 0.84rem;
}

.menu-panel-cabecera span {
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.64rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.menu-cuenta {
  grid-column: 1 / -1;
  grid-template-columns: minmax(0, 1fr) auto;
  justify-items: start;
  align-items: center;
  min-width: 0;
  min-height: 68px;
  border-color: rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  padding: 11px 12px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.08)),
    rgba(255, 255, 255, 0.12);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.menu-cuenta small {
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.64rem;
}

.menu-cuenta .usuario-activo {
  justify-items: end;
  min-width: 0;
}

.menu-cuenta .usuario-activo strong {
  color: #fff;
  font-size: 0.8rem;
}

.menu-cuenta .usuario-activo button {
  min-height: 32px;
  border-color: rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 5px 12px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 0.7rem;
}

.menu-cuenta .usuario-activo button:hover {
  background: rgba(255, 255, 255, 0.24);
}

.menu-panel button {
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  border: 0;
  border-radius: 8px;
  padding: 8px 10px;
  background: transparent;
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.82rem;
  font-weight: 900;
  text-align: left;
  cursor: pointer;
}

.menu-panel button:hover,
.menu-panel button.activo {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.menu-icono {
  position: relative;
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.menu-icono::before {
  content: "";
  width: 12px;
  height: 12px;
  border: 2px solid currentColor;
  border-radius: 4px;
}

.menu-panel button[data-vista="entreno"] .menu-icono::before {
  width: 14px;
  height: 14px;
  border-radius: 999px;
}

.menu-panel button[data-vista="rutinas"] .menu-icono::before {
  border-radius: 2px;
  box-shadow: 6px 0 0 -3px currentColor, -6px 0 0 -3px currentColor;
}

.menu-panel button[data-vista="progreso"] .menu-icono::before {
  width: 14px;
  height: 8px;
  border-top: 0;
  border-right: 0;
  border-radius: 0;
  transform: rotate(-45deg);
}

.menu-panel button[data-vista="recordatorio"] .menu-icono::before {
  width: 11px;
  height: 14px;
  border-radius: 999px 999px 4px 4px;
}

.menu-panel button[data-vista="sugerencias"] .menu-icono::before {
  width: 13px;
  height: 10px;
  border-radius: 999px;
}

.menu-panel button[data-vista="nosotros"] .menu-icono::before {
  width: 13px;
  height: 13px;
  border-radius: 999px;
  box-shadow: 0 7px 0 -5px currentColor;
}

.menu-panel button[data-vista="admin"] .menu-icono::before {
  width: 13px;
  height: 13px;
  border-radius: 3px;
  transform: rotate(45deg);
}

.marca,
.panel-titulo span,
.estado small,
.tiempo-total small,
.cronometro small {
  margin: 0;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.marca {
  color: var(--accent-dark);
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(1.05rem, 2vw, 1.55rem);
  line-height: 1.05;
}

h2 {
  margin-bottom: 0;
  line-height: 1.15;
}

.estado,
.tiempo-total {
  display: grid;
  justify-items: end;
  min-width: 96px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.estado-usuario {
  grid-template-columns: auto auto;
  align-items: center;
  gap: 14px;
}

.usuario-activo {
  display: grid;
  gap: 4px;
  justify-items: end;
}

.usuario-activo strong {
  font-size: 0.9rem;
}

.usuario-activo button {
  min-height: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 2px 8px;
  background: #fff;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  cursor: pointer;
}

.estado span,
.tiempo-total span {
  font-size: 1.05rem;
  font-weight: 900;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 900px);
  justify-content: center;
  gap: 14px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 8px 20px 18px;
}

.panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
}

.panel-titulo,
.player-cabecera {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.rutinas,
.recordatorio,
.progreso,
.admin-panel {
  padding: 14px;
}

.player,
.vista-principal {
  grid-column: 1;
}

.player {
  padding: 13px;
}

.vista-principal:not(.activo) {
  display: none;
}

.lista-rutinas {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.lista-rutinas > * {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--ink);
  text-align: left;
}

.lista-rutinas .rutina {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.lista-rutinas button,
.lista-rutinas .rutina {
  cursor: pointer;
}

.rutina-contenido {
  min-width: 0;
}

.rutina strong,
.rutina span {
  display: block;
}

.rutina strong {
  margin-bottom: 3px;
  font-size: 0.94rem;
}

.rutina span {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
}

.rutina.completada {
  border-color: rgba(13, 118, 82, 0.28);
  background: #f7fbf9;
  box-shadow: inset 0 0 0 1px rgba(22, 160, 111, 0.08);
}

.rutina-ticket {
  position: relative;
  display: inline-grid;
  flex: 0 0 auto;
  align-self: center;
  place-items: center;
  width: 32px;
  height: 32px;
  margin-inline: auto 0;
  border-radius: 10px;
  background: #e8f7ef;
  color: var(--accent-dark);
  box-shadow:
    inset 0 0 0 1px rgba(13, 118, 82, 0.2),
    0 6px 14px rgba(13, 118, 82, 0.08);
}

.rutina-ticket::before {
  content: "\2713";
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  font-size: 1.08rem;
  font-weight: 1000;
  line-height: 1;
  transform: translateY(-1px);
}

.lista-rutinas > :hover,
.lista-rutinas > .activo,
.lista-rutinas > .activa,
.lista-rutinas > [aria-selected="true"] {
  border-color: rgba(22, 160, 111, 0.46);
  background: #ecf8f3;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 9px;
  border-radius: 999px;
  background: #e4f5ee;
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 900;
}

.pill[data-tipo="ejercicio"] {
  background: #e4f5ee;
  color: var(--accent-dark);
}

.pill[data-tipo="descanso"],
.pill[data-tipo="descanso-ronda"] {
  background: #fff1d7;
  color: #8a5d0e;
}

.pill[data-tipo="calentamiento"],
.pill[data-tipo="vuelta-calma"] {
  background: #e9eefb;
  color: #304982;
}

#nombreEjercicio {
  margin: 5px 0 4px;
  font-size: clamp(1.12rem, 2vw, 1.5rem);
}

#indicacionEjercicio {
  max-width: 48ch;
  margin-bottom: 0;
  color: var(--muted);
}

.zona-entreno {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: 8px;
  min-height: 0;
  margin: 12px 0 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f6faf8;
}

.visor-ejercicio {
  display: grid;
  place-items: center;
  width: min(100%, 330px);
  margin: 0 auto;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border: 1px solid #dce7e2;
  border-radius: 8px;
  background: #fff;
}

.visor-ejercicio.plancha,
.visor-ejercicio.climber,
.visor-ejercicio.flexion,
.visor-ejercicio.puente,
.visor-ejercicio.lateral {
  width: min(100%, 390px);
  aspect-ratio: 1.45 / 1;
}

.exercise-image,
.exercise-video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  padding: 6px;
}

.exercise-image {
  transform-origin: 50% 72%;
  will-change: transform;
}

.exercise-video {
  background: #fff;
}

.visor-ejercicio.zancada .exercise-image {
  animation: imagen-zancada 1.15s ease-in-out infinite;
}

.visor-ejercicio.rodillas .exercise-image {
  animation: imagen-rodillas 0.48s ease-in-out infinite;
}

.visor-ejercicio.boxing .exercise-image {
  animation: imagen-boxing 0.5s ease-in-out infinite;
  transform-origin: 45% 62%;
}

.visor-ejercicio.plancha .exercise-image,
.visor-ejercicio.flexion .exercise-image,
.visor-ejercicio.lateral .exercise-image {
  animation: imagen-suelo 1.15s ease-in-out infinite;
  transform-origin: 50% 55%;
}

.visor-ejercicio.flexion .exercise-image {
  animation-name: imagen-flexion;
}

.visor-ejercicio.climber .exercise-image,
.visor-ejercicio.burpee .exercise-image {
  animation: imagen-dinamica 0.42s ease-in-out infinite;
  transform-origin: 52% 58%;
}

.visor-ejercicio.puente .exercise-image {
  animation: imagen-puente 1s ease-in-out infinite;
  transform-origin: 58% 62%;
}

.visor-ejercicio.descanso .exercise-image {
  animation: imagen-descanso 1.6s ease-in-out infinite;
}

.visor-ejercicio.descanso-texto {
  width: min(100%, 390px);
  aspect-ratio: 1.45 / 1;
  border-color: rgba(242, 169, 59, 0.44);
  background:
    linear-gradient(180deg, rgba(255, 248, 236, 0.98), rgba(255, 255, 255, 0.98));
}

.visor-ejercicio.preparacion-texto {
  width: min(100%, 390px);
  aspect-ratio: 1.45 / 1;
  border-color: rgba(22, 160, 111, 0.36);
  background:
    linear-gradient(180deg, rgba(236, 248, 243, 0.98), rgba(255, 255, 255, 0.98));
}

.visor-ejercicio.felicitacion-texto {
  width: min(100%, 390px);
  aspect-ratio: 1.45 / 1;
  border-color: rgba(242, 169, 59, 0.5);
  background:
    linear-gradient(180deg, rgba(255, 247, 231, 0.98), rgba(246, 251, 248, 0.98));
}

.descanso-card {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 20px;
  text-align: center;
}

.descanso-card span {
  color: #8a5d0e;
  font-size: 0.78rem;
  font-weight: 950;
  text-transform: uppercase;
}

.descanso-card strong {
  max-width: 15ch;
  color: var(--ink);
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  line-height: 1.02;
}

.descanso-card small {
  max-width: 28ch;
  color: var(--muted);
  font-weight: 800;
  line-height: 1.25;
}

.preparacion-card span {
  color: var(--accent-dark);
}

.preparacion-card strong {
  max-width: 18ch;
  font-size: clamp(1.45rem, 3.6vw, 2.3rem);
}

.preparacion-card em {
  max-width: 28ch;
  color: var(--accent-dark);
  font-size: 0.82rem;
  font-style: normal;
  font-weight: 900;
  line-height: 1.25;
}

.felicitacion-card {
  gap: 7px;
}

.felicitacion-card span {
  color: #8a5d0e;
}

.felicitacion-card strong {
  max-width: 18ch;
  font-size: clamp(1.6rem, 4vw, 2.45rem);
}

.medalla-logro {
  position: relative;
  width: 58px;
  height: 58px;
  margin: 2px 0;
  border-radius: 999px;
  background:
    radial-gradient(circle at 35% 28%, rgba(255, 255, 255, 0.78), transparent 26%),
    linear-gradient(145deg, #ffd46a, #f2a93b 58%, #c98216);
  box-shadow:
    inset 0 0 0 4px rgba(255, 255, 255, 0.36),
    0 12px 24px rgba(201, 130, 22, 0.24);
}

.medalla-logro::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -16px;
  width: 36px;
  height: 24px;
  background:
    linear-gradient(135deg, #16a06f 0 48%, transparent 49%),
    linear-gradient(225deg, #0d7652 0 48%, transparent 49%);
  transform: translateX(-50%);
  clip-path: polygon(0 0, 100% 0, 75% 100%, 50% 68%, 25% 100%);
}

.medalla-logro::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 21px;
  height: 12px;
  border: solid #fff8df;
  border-width: 0 0 4px 4px;
  transform: translate(-50%, -58%) rotate(-45deg);
}

.visor-ejercicio.preparate,
.visor-ejercicio.vamos,
.visor-ejercicio.inicio {
  animation: descanso-pulso 0.7s ease-in-out infinite;
}

.fondo-svg {
  fill: #f7fbf9;
  stroke: #d6e2df;
  stroke-width: 2;
}

.suelo-svg {
  fill: none;
  stroke: rgba(99, 113, 120, 0.28);
  stroke-width: 8;
  stroke-linecap: round;
}

.halo {
  fill: rgba(22, 160, 111, 0.1);
}

.piel {
  fill: #f2b182;
  stroke: #f2b182;
}

.linea {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 18;
}

.pierna {
  stroke-width: 20;
}

.top {
  fill: #ef6297;
  stroke: #de4f86;
  stroke-width: 2;
}

.short {
  fill: #2faf83;
  stroke: #168d65;
  stroke-width: 2;
}

.cara {
  stroke: #263238;
  stroke-width: 5;
}

.pelo {
  fill: none;
  stroke: #263238;
  stroke-width: 7;
  stroke-linecap: round;
}

.zapatilla {
  fill: none;
  stroke: #5945bd;
  stroke-width: 13;
  stroke-linecap: round;
}

.guante {
  fill: #5945bd;
  stroke: #4637a0;
  stroke-width: 2;
}

.persona {
  transform-box: fill-box;
  transform-origin: center bottom;
}

.movimiento-suave {
  animation: arte-suave 1.8s ease-in-out infinite;
}

.movimiento-rapido {
  animation: arte-rapido 0.9s ease-in-out infinite;
}

.movimiento-suelo {
  animation: arte-suelo 1.5s ease-in-out infinite;
}

.movimiento-puente {
  animation: arte-puente 1.7s ease-in-out infinite;
}

.piso {
  transform-origin: center center;
}

.figura {
  position: relative;
  width: min(100%, 180px);
  aspect-ratio: 1 / 1.25;
  margin: 0 auto;
  transform-origin: 50% 78%;
  animation: figura-respira 1.8s ease-in-out infinite;
}

.figura span {
  position: absolute;
  display: block;
  box-shadow: 0 5px 12px rgba(24, 33, 37, 0.12);
}

.figura::before {
  content: "";
  position: absolute;
  right: 8%;
  bottom: 4%;
  left: 8%;
  height: 7px;
  border-radius: 999px;
  background: rgba(99, 113, 120, 0.18);
}

.figura::after {
  content: "";
  position: absolute;
  top: 18%;
  left: 50%;
  width: 94px;
  height: 94px;
  border-radius: 50%;
  background: rgba(22, 160, 111, 0.08);
  transform: translateX(-50%);
  z-index: 0;
}

.cabeza {
  z-index: 2;
  top: 8%;
  left: 50%;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #f0b186;
  border: 4px solid #263238;
  transform: translateX(-50%);
}

.torso {
  z-index: 2;
  top: 28%;
  left: 50%;
  width: 28px;
  height: 72px;
  border-radius: 18px 18px 14px 14px;
  background: linear-gradient(180deg, #ef6f9d 0 56%, #3bb586 56% 100%);
  transform: translateX(-50%) rotate(-4deg);
}

.brazo,
.pierna {
  z-index: 1;
  width: 14px;
  border-radius: 999px;
  background: #f0b186;
  transform-origin: top center;
}

.brazo::after,
.pierna::after {
  content: "";
  position: absolute;
  right: -2px;
  bottom: -8px;
  left: -2px;
  height: 12px;
  border-radius: 999px;
  background: #6049b6;
}

.brazo::after {
  height: 10px;
  background: #f0b186;
}

.brazo.izq {
  top: 34%;
  left: 39%;
  height: 64px;
  transform: rotate(38deg);
}

.brazo.der {
  top: 34%;
  right: 39%;
  height: 64px;
  transform: rotate(-38deg);
}

.pierna.izq {
  top: 62%;
  left: 43%;
  height: 82px;
  transform: rotate(22deg);
}

.pierna.der {
  top: 62%;
  right: 43%;
  height: 82px;
  transform: rotate(-22deg);
}

.figura.sentadilla .torso {
  animation: torso-sentadilla 1.7s ease-in-out infinite;
}

.figura.sentadilla .brazo.izq,
.figura.sentadilla .brazo.der {
  top: 36%;
  height: 58px;
}

.figura.sentadilla .brazo.izq {
  left: 47%;
  animation: brazo-sentadilla-a 1.7s ease-in-out infinite;
}

.figura.sentadilla .brazo.der {
  right: 37%;
  animation: brazo-sentadilla-b 1.7s ease-in-out infinite;
}

.figura.sentadilla .pierna.izq {
  animation: pierna-sentadilla-a 1.7s ease-in-out infinite;
}

.figura.sentadilla .pierna.der {
  animation: pierna-sentadilla-b 1.7s ease-in-out infinite;
}

.figura.zancada .torso {
  animation: torso-zancada 1.8s ease-in-out infinite;
}

.figura.zancada .brazo.izq {
  left: 37%;
  animation: brazo-zancada-a 1.8s ease-in-out infinite;
}

.figura.zancada .brazo.der {
  right: 37%;
  animation: brazo-zancada-b 1.8s ease-in-out infinite;
}

.figura.zancada .pierna.izq {
  left: 44%;
  animation: pierna-zancada-a 1.8s ease-in-out infinite;
}

.figura.zancada .pierna.der {
  right: 42%;
  animation: pierna-zancada-b 1.8s ease-in-out infinite;
}

.figura.rodillas .brazo.izq,
.figura.rodillas .pierna.der {
  animation: marcha-a 0.72s ease-in-out infinite;
}

.figura.rodillas .brazo.der,
.figura.rodillas .pierna.izq {
  animation: marcha-b 0.72s ease-in-out infinite;
}

.figura.boxing .torso {
  animation: torso-boxing 0.9s ease-in-out infinite;
}

.figura.boxing .brazo.izq {
  left: 47%;
  animation: golpe-a 0.9s ease-in-out infinite;
}

.figura.boxing .brazo.der {
  right: 47%;
  animation: golpe-b 0.9s ease-in-out infinite;
}

.figura.boxing .pierna.izq {
  transform: rotate(12deg);
}

.figura.boxing .pierna.der {
  transform: rotate(-32deg);
}

.figura.descanso {
  animation: figura-descanso 2s ease-in-out infinite;
}

.figura.descanso .brazo.izq {
  transform: rotate(18deg);
}

.figura.descanso .brazo.der {
  transform: rotate(-18deg);
}

.figura.plancha {
  width: min(100%, 220px);
  aspect-ratio: 1.55 / 1;
  animation: plancha-sostiene 1.8s ease-in-out infinite;
}

.figura.plancha .cabeza {
  top: 30%;
  left: 18%;
}

.figura.plancha .torso {
  top: 40%;
  left: 48%;
  width: 98px;
  height: 20px;
  transform: rotate(0deg);
}

.figura.plancha .brazo.izq,
.figura.plancha .brazo.der {
  top: 52%;
  height: 50px;
}

.figura.plancha .brazo.izq {
  left: 28%;
  transform: rotate(8deg);
}

.figura.plancha .brazo.der {
  right: 58%;
  transform: rotate(-8deg);
}

.figura.plancha .pierna.izq,
.figura.plancha .pierna.der {
  top: 46%;
  height: 72px;
}

.figura.plancha .pierna.izq {
  left: 69%;
  transform: rotate(78deg);
}

.figura.plancha .pierna.der {
  right: 16%;
  transform: rotate(-78deg);
}

.figura.climber {
  width: min(100%, 220px);
  aspect-ratio: 1.55 / 1;
  animation: plancha-sostiene 1s ease-in-out infinite;
}

.figura.climber .cabeza {
  top: 30%;
  left: 18%;
}

.figura.climber .torso {
  top: 39%;
  left: 47%;
  width: 98px;
  height: 20px;
  transform: rotate(0deg);
}

.figura.climber .brazo.izq,
.figura.climber .brazo.der {
  top: 51%;
  height: 50px;
}

.figura.climber .brazo.izq {
  left: 28%;
  transform: rotate(8deg);
}

.figura.climber .brazo.der {
  right: 58%;
  transform: rotate(-8deg);
}

.figura.climber .pierna.izq,
.figura.climber .pierna.der {
  top: 47%;
  height: 74px;
}

.figura.climber .pierna.izq {
  left: 66%;
  animation: climber-a 0.76s ease-in-out infinite;
}

.figura.climber .pierna.der {
  right: 17%;
  animation: climber-b 0.76s ease-in-out infinite;
}

.figura.flexion {
  width: min(100%, 220px);
  aspect-ratio: 1.55 / 1;
  animation: flexion-cuerpo 1.5s ease-in-out infinite;
}

.figura.flexion .cabeza {
  top: 30%;
  left: 18%;
}

.figura.flexion .torso {
  top: 40%;
  left: 48%;
  width: 100px;
  height: 20px;
  transform: rotate(0deg);
}

.figura.flexion .brazo.izq,
.figura.flexion .brazo.der {
  top: 50%;
  height: 54px;
  animation: flexion-brazos 1.5s ease-in-out infinite;
}

.figura.flexion .brazo.izq {
  left: 28%;
}

.figura.flexion .brazo.der {
  right: 58%;
}

.figura.flexion .pierna.izq,
.figura.flexion .pierna.der {
  top: 49%;
  height: 68px;
}

.figura.flexion .pierna.izq {
  left: 70%;
  transform: rotate(92deg);
}

.figura.flexion .pierna.der {
  right: 13%;
  transform: rotate(-92deg);
}

.figura.puente {
  width: min(100%, 220px);
  aspect-ratio: 1.55 / 1;
  animation: puente-cadera 1.7s ease-in-out infinite;
}

.figura.puente .cabeza {
  top: 56%;
  left: 18%;
}

.figura.puente .torso {
  top: 52%;
  left: 44%;
  width: 96px;
  height: 22px;
  transform: rotate(-16deg);
}

.figura.puente .brazo.izq,
.figura.puente .brazo.der {
  top: 72%;
  height: 56px;
  transform: rotate(88deg);
}

.figura.puente .brazo.izq {
  left: 28%;
}

.figura.puente .brazo.der {
  right: 42%;
}

.figura.puente .pierna.izq,
.figura.puente .pierna.der {
  top: 54%;
  height: 62px;
}

.figura.puente .pierna.izq {
  left: 70%;
  transform: rotate(40deg);
}

.figura.puente .pierna.der {
  right: 14%;
  transform: rotate(-46deg);
}

.figura.burpee {
  animation: medio-burpee 1.9s ease-in-out infinite;
}

.figura.burpee .brazo.izq,
.figura.burpee .brazo.der {
  top: 38%;
  height: 68px;
}

.figura.burpee .pierna.izq {
  animation: burpee-pierna-a 1.9s ease-in-out infinite;
}

.figura.burpee .pierna.der {
  animation: burpee-pierna-b 1.9s ease-in-out infinite;
}

.figura.lateral {
  width: min(100%, 220px);
  aspect-ratio: 1.55 / 1;
  animation: lateral-sostiene 1.8s ease-in-out infinite;
}

.figura.lateral .cabeza {
  top: 22%;
  left: 26%;
}

.figura.lateral .torso {
  top: 37%;
  left: 52%;
  width: 106px;
  height: 21px;
  transform: rotate(-18deg);
}

.figura.lateral .brazo.izq {
  top: 50%;
  left: 34%;
  height: 58px;
  transform: rotate(8deg);
}

.figura.lateral .brazo.der {
  top: 18%;
  right: 48%;
  height: 58px;
  transform: rotate(-135deg);
}

.figura.lateral .pierna.izq,
.figura.lateral .pierna.der {
  top: 41%;
  height: 76px;
}

.figura.lateral .pierna.izq {
  left: 75%;
  transform: rotate(70deg);
}

.figura.lateral .pierna.der {
  right: 10%;
  transform: rotate(-80deg);
}

.cronometro {
  display: grid;
  justify-items: center;
  gap: 2px;
  min-width: 0;
  text-align: center;
}

#tiempoBloque {
  font-variant-numeric: tabular-nums;
  max-width: 100%;
  font-size: clamp(3.1rem, 4.6vw, 4.35rem);
  font-weight: 950;
  line-height: 0.92;
}

.frase-motivacional {
  position: absolute;
  z-index: 8;
  top: 16px;
  left: 50%;
  display: block;
  width: min(calc(100% - 32px), 520px);
  min-height: 0;
  max-width: none;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 8px;
  padding: 10px 14px;
  background: rgba(24, 33, 37, 0.62);
  color: #fff;
  box-shadow: 0 12px 30px rgba(24, 33, 37, 0.18);
  font-size: clamp(1.15rem, 3vw, 1.7rem);
  font-weight: 900;
  line-height: 1.08;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -8px);
  transition: opacity 160ms ease, transform 160ms ease, background 160ms ease;
}

.frase-motivacional.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.frase-motivacional.urgente {
  background: rgba(216, 75, 69, 0.74);
  color: #fff;
}

.barra-progreso {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
}

.barra-progreso span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--warm));
  transition: width 220ms ease;
}

.controles-flotantes {
  position: fixed;
  z-index: 70;
  right: max(12px, calc((100vw - 900px) / 2 + 12px));
  bottom: max(12px, env(safe-area-inset-bottom));
  left: max(12px, calc((100vw - 900px) / 2 + 12px));
  display: grid;
  gap: 8px;
  max-width: 876px;
  margin-inline: auto;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 28px;
  padding: 12px;
  background: rgba(18, 24, 27, 0.72);
  box-shadow: 0 18px 46px rgba(10, 18, 22, 0.34);
  backdrop-filter: blur(18px) saturate(1.18);
  -webkit-backdrop-filter: blur(18px) saturate(1.18);
}

.siguiente {
  min-height: 18px;
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.84rem;
  font-weight: 700;
  text-align: center;
}

.controles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 168px));
  justify-content: center;
  gap: 8px;
}

.controles button {
  min-height: 42px;
  border: 0;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-weight: 900;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.controles button:hover {
  background: rgba(255, 255, 255, 0.24);
}

.controles button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  filter: grayscale(0.35);
}

#btnIniciar,
#btnGuardarRecordatorio {
  background: rgba(22, 160, 111, 0.92);
}

#btnIniciar.latido {
  animation: latido-iniciar 1.15s ease-in-out infinite;
  box-shadow:
    0 0 0 0 rgba(22, 160, 111, 0.45),
    0 14px 28px rgba(22, 160, 111, 0.28);
}

@keyframes latido-iniciar {
  0% {
    transform: scale(1);
    box-shadow:
      0 0 0 0 rgba(22, 160, 111, 0.44),
      0 14px 28px rgba(22, 160, 111, 0.24);
  }

  55% {
    transform: scale(1.035);
    box-shadow:
      0 0 0 12px rgba(22, 160, 111, 0),
      0 16px 30px rgba(22, 160, 111, 0.3);
  }

  100% {
    transform: scale(1);
    box-shadow:
      0 0 0 0 rgba(22, 160, 111, 0),
      0 14px 28px rgba(22, 160, 111, 0.24);
  }
}

.recordatorio {
  display: grid;
  align-content: start;
  gap: 12px;
}

.progreso {
  display: grid;
  gap: 12px;
}

.resumen-avance {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.resumen-avance > div {
  display: grid;
  gap: 2px;
  min-height: 62px;
  align-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: var(--surface-soft);
}

.resumen-avance strong {
  font-size: 1.35rem;
  line-height: 1;
}

.resumen-avance span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.calendario-progreso,
.admin-dias {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
}

.dia-reto,
.admin-dia {
  display: grid;
  position: relative;
  min-height: 34px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
}

.dia-reto.logrado,
.admin-dia.logrado {
  border-color: rgba(22, 160, 111, 0.45);
  background: #e4f5ee;
  color: var(--accent-dark);
}

.dia-reto.multiple {
  border-color: rgba(103, 80, 164, 0.4);
}

.dia-reto small {
  position: absolute;
  top: 2px;
  right: 3px;
  min-width: 18px;
  border-radius: 999px;
  padding: 1px 4px;
  background: #6049b6;
  color: #fff;
  font-size: 0.56rem;
  line-height: 1.25;
}

.historial-entrenamientos {
  display: grid;
  gap: 8px;
}

.notificacion-usuario {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid rgba(22, 160, 111, 0.34);
  border-radius: 8px;
  padding: 12px;
  background: #eaf7f1;
}

.notificacion-usuario strong {
  display: block;
  margin-bottom: 4px;
}

.notificacion-usuario p {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1.35;
}

.notificacion-usuario button {
  min-height: 44px;
  white-space: nowrap;
}

.historial-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: var(--surface-soft);
}

.historial-item div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.historial-item strong,
.historial-item span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.historial-item strong {
  font-size: 0.9rem;
}

.historial-item span,
.historial-item time {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
}

.historial-item time {
  text-align: right;
  white-space: nowrap;
}

.admin-panel,
.vista-principal.admin-panel.activo {
  display: grid;
  gap: 12px;
}

.admin-dia {
  min-height: 40px;
  cursor: pointer;
}

.admin-dia:hover {
  border-color: rgba(22, 160, 111, 0.46);
}

.oculto {
  display: none !important;
}

.recordatorio label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

.recordatorio label:first-of-type {
  grid-template-columns: 18px 1fr;
  align-items: center;
  color: var(--ink);
}

input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

input[type="time"],
input[type="email"],
input[type="url"],
input[type="tel"],
input[type="text"],
input[type="password"],
textarea,
select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 10px;
  background: var(--surface-soft);
  color: var(--ink);
  font: inherit;
}

.sugerencias-intro,
.nosotros-contenido {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: var(--surface-soft);
}

.sugerencias-intro p,
.nosotros-contenido p {
  margin: 0;
}

.formulario-sugerencia {
  display: grid;
  gap: 12px;
}

.formulario-sugerencia label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

.formulario-sugerencia input,
.formulario-sugerencia textarea {
  width: 100%;
}

.anti-robot {
  max-width: 260px;
}

.campo-trampa {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

textarea {
  resize: vertical;
  line-height: 1.35;
}

.compactos {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.push-controles {
  grid-template-columns: 1fr;
}

.push-controles-principales {
  margin-top: -2px;
  margin-bottom: 10px;
}

.push-controles button {
  min-height: 48px;
}

#btnActivarPush {
  background: rgba(22, 160, 111, 0.92);
}

#btnActivarPushUsuario {
  background: rgba(22, 160, 111, 0.92);
}

#btnProbarPush {
  background: rgba(18, 24, 27, 0.9);
}

.mensaje {
  min-height: 20px;
  margin: 0;
  color: var(--accent-dark);
  font-weight: 800;
}

.nota {
  margin: -4px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

@media (max-width: 640px) {
  .notificacion-usuario {
    grid-template-columns: 1fr;
  }

  .notificacion-usuario button {
    width: 100%;
  }
}

.alerta-cambio .player {
  border-color: rgba(216, 75, 69, 0.55);
  box-shadow: 0 0 0 4px rgba(216, 75, 69, 0.1), var(--shadow);
}

@keyframes figura-respira {
  0%,
  100% {
    transform: translateY(0) scaleY(1);
  }
  50% {
    transform: translateY(8px) scaleY(0.96);
  }
}

@keyframes pesa-respira {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-6px) scale(1.04);
  }
}

@keyframes figura-descanso {
  0%,
  100% {
    transform: translateY(0);
    opacity: 0.92;
  }
  50% {
    transform: translateY(4px);
    opacity: 1;
  }
}

@keyframes marcha-a {
  0%,
  100% {
    transform: rotate(34deg);
  }
  50% {
    transform: rotate(-10deg);
  }
}

@keyframes marcha-b {
  0%,
  100% {
    transform: rotate(-34deg);
  }
  50% {
    transform: rotate(10deg);
  }
}

@keyframes plancha-sostiene {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(3px);
  }
}

@keyframes torso-sentadilla {
  0%,
  100% {
    transform: translate(-50%, 0) rotate(-4deg);
  }
  50% {
    transform: translate(-50%, 20px) rotate(12deg);
  }
}

@keyframes brazo-sentadilla-a {
  0%,
  100% {
    transform: rotate(72deg);
  }
  50% {
    transform: rotate(88deg);
  }
}

@keyframes brazo-sentadilla-b {
  0%,
  100% {
    transform: rotate(56deg);
  }
  50% {
    transform: rotate(76deg);
  }
}

@keyframes pierna-sentadilla-a {
  0%,
  100% {
    transform: rotate(22deg);
  }
  50% {
    transform: translateY(14px) rotate(70deg);
  }
}

@keyframes pierna-sentadilla-b {
  0%,
  100% {
    transform: rotate(-22deg);
  }
  50% {
    transform: translateY(14px) rotate(-70deg);
  }
}

@keyframes torso-zancada {
  0%,
  100% {
    transform: translate(-50%, 0) rotate(-3deg);
  }
  50% {
    transform: translate(-50%, 14px) rotate(2deg);
  }
}

@keyframes brazo-zancada-a {
  0%,
  100% {
    transform: rotate(42deg);
  }
  50% {
    transform: rotate(-10deg);
  }
}

@keyframes brazo-zancada-b {
  0%,
  100% {
    transform: rotate(-42deg);
  }
  50% {
    transform: rotate(10deg);
  }
}

@keyframes pierna-zancada-a {
  0%,
  100% {
    transform: rotate(22deg);
  }
  50% {
    transform: translateY(14px) rotate(66deg);
  }
}

@keyframes pierna-zancada-b {
  0%,
  100% {
    transform: rotate(-22deg);
  }
  50% {
    transform: translateY(14px) rotate(-78deg);
  }
}

@keyframes torso-boxing {
  0%,
  100% {
    transform: translateX(-50%) rotate(-8deg);
  }
  50% {
    transform: translateX(-50%) rotate(8deg);
  }
}

@keyframes golpe-a {
  0%,
  100% {
    transform: rotate(72deg);
  }
  50% {
    transform: rotate(104deg) translateY(-8px);
  }
}

@keyframes golpe-b {
  0%,
  100% {
    transform: rotate(-72deg);
  }
  50% {
    transform: rotate(-22deg) translateY(-8px);
  }
}

@keyframes climber-a {
  0%,
  100% {
    transform: rotate(78deg);
  }
  50% {
    transform: rotate(28deg) translateY(18px);
  }
}

@keyframes climber-b {
  0%,
  100% {
    transform: rotate(-38deg) translateY(18px);
  }
  50% {
    transform: rotate(-78deg);
  }
}

@keyframes flexion-cuerpo {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(14px);
  }
}

@keyframes flexion-brazos {
  0%,
  100% {
    transform: rotate(8deg);
  }
  50% {
    transform: rotate(28deg);
  }
}

@keyframes puente-cadera {
  0%,
  100% {
    transform: translateY(10px);
  }
  50% {
    transform: translateY(-8px);
  }
}

@keyframes medio-burpee {
  0%,
  100% {
    transform: translateY(0) scaleY(1);
  }
  45%,
  60% {
    transform: translateY(24px) scaleY(0.78);
  }
}

@keyframes burpee-pierna-a {
  0%,
  100% {
    transform: rotate(18deg);
  }
  50% {
    transform: rotate(78deg);
  }
}

@keyframes burpee-pierna-b {
  0%,
  100% {
    transform: rotate(-18deg);
  }
  50% {
    transform: rotate(-78deg);
  }
}

@keyframes lateral-sostiene {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(4px);
  }
}

@keyframes arte-suave {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(5px);
  }
}

@keyframes arte-rapido {
  0%,
  100% {
    transform: translateY(0) rotate(-1deg);
  }
  50% {
    transform: translateY(-5px) rotate(1deg);
  }
}

@keyframes arte-suelo {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(4px);
  }
}

@keyframes arte-puente {
  0%,
  100% {
    transform: translateY(5px);
  }
  50% {
    transform: translateY(-7px);
  }
}

@keyframes imagen-sentadilla {
  0%,
  100% {
    transform: translateY(-5px) scale(1.02);
  }
  50% {
    transform: translateY(24px) scale(0.965);
  }
}

@keyframes imagen-zancada {
  0%,
  100% {
    transform: translateX(-8px) translateY(-4px) rotate(1deg);
  }
  50% {
    transform: translateX(10px) translateY(16px) rotate(-1.6deg);
  }
}

@keyframes imagen-rodillas {
  0%,
  100% {
    transform: translateY(12px) rotate(-1.5deg) scale(0.98);
  }
  50% {
    transform: translateY(-18px) rotate(1.5deg) scale(1.02);
  }
}

@keyframes imagen-boxing {
  0%,
  100% {
    transform: translateX(-16px) rotate(-2deg);
  }
  50% {
    transform: translateX(18px) rotate(2deg);
  }
}

@keyframes imagen-suelo {
  0%,
  100% {
    transform: translateY(-5px) scale(1.015);
  }
  50% {
    transform: translateY(12px) scale(0.98);
  }
}

@keyframes imagen-flexion {
  0%,
  100% {
    transform: translateY(-10px) scale(1.015);
  }
  50% {
    transform: translateY(18px) scale(0.965);
  }
}

@keyframes imagen-dinamica {
  0%,
  100% {
    transform: translateX(-22px) translateY(8px) rotate(-2deg);
  }
  50% {
    transform: translateX(22px) translateY(-12px) rotate(2deg);
  }
}

@keyframes imagen-puente {
  0%,
  100% {
    transform: translateY(16px) scale(0.975);
  }
  50% {
    transform: translateY(-14px) scale(1.015);
  }
}

@keyframes imagen-descanso {
  0%,
  100% {
    transform: translateY(5px) scale(0.99);
  }
  50% {
    transform: translateY(-8px) scale(1.015);
  }
}

@keyframes descanso-pulso {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.018);
  }
}

@media (max-width: 920px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .player {
    grid-column: 1;
  }
}

@media (max-width: 640px) {
  .barra,
  .player-cabecera,
  .panel-titulo {
    align-items: stretch;
    flex-direction: column;
  }

  .barra {
    padding-inline: 12px;
  }

  .barra-acciones {
    align-items: center;
    justify-content: space-between;
  }

  .menu-panel {
    width: calc(100% - 24px);
    margin: 6px 12px 10px auto;
    grid-template-columns: 1fr;
  }

  .estado,
  .tiempo-total {
    justify-items: start;
  }

  .estado-usuario {
    grid-template-columns: auto auto;
  }

  .menu-cuenta {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .usuario-activo {
    justify-items: start;
  }

  .layout {
    grid-template-columns: 1fr;
    padding: 8px 12px 18px;
  }

  .zona-entreno {
    grid-template-columns: 1fr;
    min-height: 0;
    padding: 12px;
  }

  .visor-ejercicio,
  .visor-ejercicio.plancha,
  .visor-ejercicio.climber,
  .visor-ejercicio.flexion,
  .visor-ejercicio.puente,
  .visor-ejercicio.lateral {
    width: min(100%, 330px);
  }

  #tiempoBloque {
    font-size: clamp(2.9rem, 16vw, 4.1rem);
  }

  .controles-flotantes {
    right: 10px;
    bottom: max(10px, env(safe-area-inset-bottom));
    left: 10px;
    gap: 7px;
    border-radius: 24px;
    padding: 10px;
  }

  .siguiente {
    font-size: 0.78rem;
  }

  .controles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }

  .controles button {
    min-height: 40px;
    border-radius: 16px;
    padding: 8px 6px;
    font-size: 0.86rem;
  }

  .calendario-progreso,
  .admin-dias {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
