/* FitDiario · estilos propios. La base es https://www.zojim.com.ar/zojim-ui.css (clases z-).
   Todo en rem: el botón "A+" de legal.js agranda la raíz y escala todo. */

/* Color de la app: ámbar (energía, esfuerzo, calor del entrenamiento). Ícono #fde68a → #f59e0b → #92400e.
   Interfaz: que lo pase a zojim-ui.css como --z-fitdiario-1/2. */
[data-app="fitdiario"] { --z-app-1: #fcd34d; --z-app-2: #f59e0b; --z-app-tinta: #231400; }
:root {
  --fd-acento: #fbbf24;
  --fd-fondo-graf: #151516;
  /* Macros: siempre con su nombre al lado (el color solo acompaña). */
  --fd-prot: #3987e5; --fd-carb: #c98500; --fd-gras: #d55181;
  --fd-agua: #7dd3fc;
  --barra: 4.25rem;
}

html { font-size: 112.5%; }
body { margin: 0; background: #09090a; color: #f5f3ee; font-family: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
[hidden] { display: none !important; }
body.z a.z-btn { color: var(--z-texto); text-decoration: none; }
body.z a.z-btn-app { color: var(--z-app-tinta); }
.contenedor { width: 100%; max-width: 760px; margin: 0 auto; padding: 0 16px calc(var(--barra) + 32px + env(safe-area-inset-bottom, 0px)); box-sizing: border-box; }
.contenedor > * + * { margin-top: 16px; }
#pantalla > * + *, .vista-pro > * + * { margin-top: 16px; }
#pantalla > *:first-child { margin-top: 8px; }
.gris { color: var(--z-texto-3); }
.acento { color: var(--z-app-1); }
.centro { text-align: center; }
.separado { margin-top: 28px !important; }
.cargando { display: flex; align-items: center; gap: 12px; color: var(--z-texto-2); padding: 24px 0; }
.titulo-pantalla { margin: 8px 0 4px; font-size: clamp(1.75rem, 6vw, 2.4rem); }
.titulo-fecha { display: block; font: 500 var(--z-t-base) var(--z-sans); color: var(--z-texto-3); letter-spacing: 0; margin-top: 4px; }
.subtitulo { margin-top: 20px !important; }
.volver { padding-inline: 0; min-height: 2.75rem; }
p { margin: 0; }
p + p { margin-top: 8px; }

/* ---------- Cabecera y barra de abajo ---------- */
.cabecera { position: sticky; top: 0; z-index: 30; background: rgba(9, 9, 10, .94); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid rgba(255, 255, 255, .08); }
.cabecera .z-cabecera-app { max-width: 760px; margin: 0 auto; }
.z-marca img { border-radius: 22%; }

.pestanas {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: grid; grid-template-columns: repeat(5, 1fr);
  min-height: var(--barra); padding-bottom: env(safe-area-inset-bottom, 0px);
  background: rgba(17, 17, 18, .97); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-top: 1px solid rgba(255, 255, 255, .1);
}
.pestanas a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: var(--barra); padding: 6px 2px;
  color: var(--z-texto-3); text-decoration: none; font-size: var(--z-t-chico); font-weight: 600; -webkit-tap-highlight-color: transparent;
}
.pestanas svg { width: 1.6rem; height: 1.6rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pestanas a[aria-current] { color: var(--z-app-1); }
.pestanas a[aria-current] svg { stroke-width: 2.3; }
.pestanas a:focus-visible { outline: 3px solid var(--z-app-1); outline-offset: -4px; border-radius: 12px; }
.pestanas span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.sin-pestanas .pestanas { display: none; }
body.sin-pestanas .contenedor { padding-bottom: calc(40px + env(safe-area-inset-bottom, 0px)); }
@media (min-width: 900px) {
  .pestanas { left: 50%; right: auto; bottom: 16px; transform: translateX(-50%); width: 560px; border: 1px solid rgba(255, 255, 255, .12); border-radius: 22px; padding-bottom: 0; }
}
/* El círculo de instalar y el cartel de versión nueva van arriba de la barra de abajo. */
#zf { bottom: calc(var(--barra) + 16px + env(safe-area-inset-bottom, 0px)) !important; }
#zojim-nueva { bottom: calc(var(--barra) + 16px + env(safe-area-inset-bottom, 0px)) !important; }
body.con-descanso #zf, body.con-descanso #zojim-nueva { bottom: calc(var(--barra) + 110px + env(safe-area-inset-bottom, 0px)) !important; }

.aviso-red { padding: 12px 16px; border-radius: var(--z-radio); background: var(--z-alerta-fondo); border: 1px solid rgba(245, 203, 110, .35); color: var(--z-texto); margin-top: 12px; }
.pie-app { margin-top: 40px !important; text-align: center; color: var(--z-texto-3); font-size: var(--z-t-chico); line-height: 2.2; }
.pie-app a { color: var(--z-texto-2); }

/* ---------- Tarjetas, listas y formularios ---------- */
.z-tarjeta > * + * { margin-top: 12px; }
.tarjeta-cab { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.tarjeta-cab .z-btn-texto { min-height: 2.75rem; padding-inline: 4px; }
.tarjeta-destacada { border-color: color-mix(in srgb, var(--z-app-1) 55%, transparent); background: var(--z-app-fondo); }
.botones-fila { display: flex; flex-wrap: wrap; gap: 10px; }
.botones-fila > .z-btn { flex: 1 1 auto; }
.botones-mini { display: flex; flex-wrap: wrap; gap: 8px; }
.botones-mini .z-btn { min-height: 2.75rem; padding: 6px 16px; font-size: var(--z-t-chico); }
.pila-botones { display: grid; gap: 10px; }
.lista-simple { margin: 0; padding-left: 1.2em; }
.lista-simple li + li { margin-top: 6px; }
.lista-simple a, .pagina a, .credito a { color: var(--z-app-1); }
.lista-botones { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.lista-ventajas { margin: 0; padding-left: 1.2em; color: var(--z-texto-2); }
.lista-ventajas li + li { margin-top: 6px; }
.datos-lista { margin: 0; display: grid; gap: 8px; }
.datos-lista > div { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-bottom: 8px; border-bottom: 1px solid var(--z-borde); }
.datos-lista > div:last-child { border-bottom: 0; padding-bottom: 0; }
.datos-lista dt { color: var(--z-texto-2); }
.datos-lista dd { margin: 0; text-align: right; font-weight: 600; }
.formulario > * + * { margin-top: 14px; }
.campos-2, .campos-3 { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.campos-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 380px) { .campos-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.campos-2 .z-campo, .campos-3 .z-campo { min-width: 0; }
.z-entrada { width: 100%; box-sizing: border-box; min-width: 0; }
select.z-entrada { padding-right: 36px; }
.entrada-grande { font-size: 1.4rem; font-weight: 700; }
.entrada-titulo { font-size: 1.25rem; font-weight: 700; }
.detalles { border-top: 1px solid var(--z-borde); padding-top: 4px; }
.detalles > summary { min-height: var(--z-toque); display: flex; align-items: center; cursor: pointer; font-weight: 600; color: var(--z-texto-2); list-style: none; }
.detalles > summary::-webkit-details-marker { display: none; }
.detalles > summary::after { content: ""; width: 10px; height: 10px; margin-left: auto; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-3px); transition: transform .2s; }
.detalles[open] > summary::after { transform: rotate(-135deg) translateY(-3px); }
.detalles > * + * { margin-top: 12px; }
.opciones { border: 0; margin: 0; padding: 0; display: grid; gap: 8px; }
.fila-form { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.fila-form .z-campo { flex: 1 1 12rem; }
.selector { display: flex; gap: 8px; flex-wrap: wrap; }
.selector .z-btn { flex: 1 1 auto; min-height: 2.9rem; padding: 6px 14px; }
.selector-chico .z-btn { font-size: var(--z-t-chico); min-height: 2.75rem; padding: 4px 12px; }
.credito { font-size: var(--z-t-chico); color: var(--z-texto-3); }
.cifra { font-size: var(--z-t-medio); }
.cifra b { font-size: 2rem; letter-spacing: -0.02em; }
.cifras { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.cifras > div { background: var(--z-superficie); border: 1px solid var(--z-borde); border-radius: var(--z-radio); padding: 12px; display: grid; gap: 2px; min-width: 0; }
.cifras b { font-size: 1.5rem; }
.cifras span { color: var(--z-texto-3); font-size: var(--z-t-chico); line-height: 1.3; }
.resumen-semana b { color: var(--z-texto); }

/* Barras de progreso */
.z-progreso.barra-pasado > i { background: #f8a59b; }
.z-progreso.barra-prot > i { background: var(--fd-prot); }
.z-progreso.barra-carb > i { background: var(--fd-carb); }
.z-progreso.barra-gras > i { background: var(--fd-gras); }
.z-progreso.barra-agua > i { background: var(--fd-agua); }
.macros { display: grid; gap: 12px; }
.macro p { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.macro-punto { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }
.macro-punto.prot { background: var(--fd-prot); }
.macro-punto.carb { background: var(--fd-carb); }
.macro-punto.gras { background: var(--fd-gras); }

/* ---------- Bienvenida y Pro ---------- */
.bienvenida { border-color: color-mix(in srgb, var(--z-app-1) 55%, transparent); background: linear-gradient(160deg, var(--z-app-fondo), transparent 70%), var(--z-superficie); }
.aviso-lectura .z-btn { margin-top: 10px; }
.vista-pro { padding-top: 8px; }

/* ---------- Ejercicios ---------- */
.buscador { display: grid; gap: 12px; }
.lista-ejercicios, .lista-alimentos, .lista-comidas, .lista-rutinas, .lista-registros { list-style: none; margin: 0; padding: 0; }
.lista-ejercicios { display: grid; gap: 8px; }
.item-ejercicio, .item-alimento, .item-comida, .item-sesion {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: var(--z-toque); box-sizing: border-box; padding: 8px 12px;
  border-radius: var(--z-radio); border: 1px solid var(--z-borde); background: var(--z-superficie); color: var(--z-texto);
  font: inherit; text-align: left; text-decoration: none; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.item-ejercicio:hover, .item-alimento:hover, .item-comida:hover, .item-sesion:hover { border-color: var(--z-borde-fuerte); }
.item-ejercicio:focus-visible, .item-alimento:focus-visible, .item-comida:focus-visible, .item-sesion:focus-visible { outline: none; box-shadow: var(--z-foco); }
.item-texto { display: grid; gap: 2px; min-width: 0; flex: 1; }
.item-texto b { overflow-wrap: anywhere; }
.item-texto .gris { font-size: var(--z-t-chico); line-height: 1.35; }
.miniatura { width: 56px; height: 56px; border-radius: 12px; object-fit: contain; background: #fff; flex-shrink: 0; }
.miniatura-vacia { display: grid; place-items: center; background: var(--z-superficie-2); color: var(--z-texto-3); font-weight: 700; font-size: 1.3rem; }
.ejercicio-figura { margin: 0; display: grid; gap: 8px; }
.ejercicio-imagen { background: #fff; border-radius: var(--z-radio); overflow: hidden; aspect-ratio: 1; max-width: 420px; width: 100%; margin: 0 auto; }
.ejercicio-imagen img { width: 100%; height: 100%; object-fit: contain; display: block; }
.ejercicio-figura .z-btn-texto { justify-self: center; min-height: 2.75rem; }
.pasos { margin: 0; padding-left: 1.4em; display: grid; gap: 8px; line-height: 1.5; }
.lista-rutinas { display: grid; gap: 4px; }
.lista-rutinas > li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--z-borde); }
.lista-rutinas > li:last-child { border-bottom: 0; }
.lista-rutinas > li > div:first-child { min-width: 0; }
.lista-rutinas a { color: var(--z-texto); }
.lista-rutinas .gris { font-size: var(--z-t-chico); margin-top: 2px; }
.plantilla h3 { margin: 0; }
.lista-rutina { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; counter-reset: linea; }
.linea-cab { display: flex; align-items: center; gap: 12px; }
.linea-cab a { color: var(--z-texto); }
.linea-cab .gris { font-size: var(--z-t-chico); margin-top: 2px; }

/* ---------- Entreno en vivo ---------- */
.entreno-cab { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; position: sticky; top: calc(64px + env(safe-area-inset-top, 0px)); z-index: 20; background: rgba(9, 9, 10, .96); padding: 10px 0; margin: 0 -2px; }
.entreno-cab > div { min-width: 0; flex: 1; }
.entreno-nombre { width: 100%; background: transparent; border: 0; border-bottom: 2px dashed transparent; color: var(--z-texto); font: 700 1.3rem var(--z-sans); padding: 4px 0; }
.entreno-nombre:focus { outline: none; border-bottom-color: var(--z-app-1); }
.entreno-cab .gris { font-size: var(--z-t-chico); }
.ej-vivo .linea-cab { align-items: flex-start; }
.series { display: grid; gap: 6px; }
.serie { display: grid; gap: 6px; align-items: center; grid-template-columns: 2.75rem repeat(2, minmax(0, 1fr)) 4.8rem; padding: 4px; border-radius: 14px; }
.series-1 .serie { grid-template-columns: 2.75rem minmax(0, 1fr) 4.8rem; }
.serie-cab { font-size: var(--z-t-chico); color: var(--z-texto-3); padding-block: 0; }
.serie-cab span { text-align: center; }
.serie-num { width: 2.75rem; height: 2.75rem; border-radius: 50%; border: 2px solid var(--z-borde-fuerte); background: transparent; color: var(--z-texto); font: 700 var(--z-t-base) var(--z-sans); cursor: pointer; padding: 0; }
.serie-c .serie-num { color: var(--fd-agua); border-color: color-mix(in srgb, var(--fd-agua) 60%, transparent); }
.serie-f .serie-num { color: #f8a59b; border-color: rgba(248, 165, 155, .6); }
.serie-d .serie-num { color: #c4b5fd; border-color: rgba(196, 181, 253, .6); }
.serie-dato { text-align: center; padding-inline: 4px !important; font-size: 1.15rem; font-weight: 700; min-height: 2.9rem; }
.serie-dato::placeholder { font-weight: 500; }
.serie-hecho { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 2.9rem; border-radius: 999px; border: 2px solid var(--z-borde-fuerte); cursor: pointer; font-weight: 600; font-size: var(--z-t-chico); padding: 0 8px; }
.serie-hecho input { width: 22px; height: 22px; margin: 0; accent-color: var(--z-app-1); }
.serie-hecha { background: color-mix(in srgb, var(--z-app-1) 13%, transparent); }
.serie-hecha .serie-hecho { border-color: var(--z-app-1); background: var(--z-app-1); color: var(--z-app-tinta); }
.serie-hecha .serie-dato { border-color: color-mix(in srgb, var(--z-app-1) 50%, transparent); }
@media (max-width: 360px) { .serie { grid-template-columns: 2.3rem repeat(2, minmax(0, 1fr)) 3rem; gap: 5px; } .series-1 .serie { grid-template-columns: 2.3rem minmax(0, 1fr) 3rem; } .serie-dato { font-size: 1rem; } .serie-hecho span { display: none; } .serie-hecho { padding: 0; } .serie-num { width: 2.3rem; height: 2.3rem; } }

/* Reloj de descanso: fijo arriba de la barra de abajo. */
.descanso { position: fixed; left: 0; right: 0; bottom: calc(var(--barra) + env(safe-area-inset-bottom, 0px)); z-index: 45; background: #1c1c1e; border-top: 1px solid color-mix(in srgb, var(--z-app-1) 50%, transparent); box-shadow: 0 -16px 40px -20px #000; }
body.sin-pestanas .descanso { bottom: 0; padding-bottom: env(safe-area-inset-bottom, 0px); }
.descanso-barra { height: 5px; background: rgba(255, 255, 255, .1); }
.descanso-barra i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, var(--z-app-2), var(--z-app-1)); transition: width .25s linear; }
.descanso-fila { display: flex; align-items: center; gap: 8px; max-width: 760px; margin: 0 auto; padding: 8px 16px; box-sizing: border-box; }
.descanso-fila p { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.descanso-titulo { color: var(--z-texto-3); font-size: var(--z-t-chico); }
.descanso-fila b { font-size: 1.8rem; font-variant-numeric: tabular-nums; }
.descanso-fila .z-btn { min-height: 2.9rem; padding: 6px 12px; font-size: var(--z-t-chico); }
body.con-descanso .contenedor { padding-bottom: calc(var(--barra) + 120px + env(safe-area-inset-bottom, 0px)); }
@media (min-width: 900px) { .descanso { bottom: calc(var(--barra) + 32px); left: 50%; right: auto; width: 560px; transform: translateX(-50%); border-radius: 18px; overflow: hidden; border: 1px solid color-mix(in srgb, var(--z-app-1) 50%, transparent); } }

/* ---------- Historial y sesión ---------- */
.historial { display: grid; gap: 8px; }
.historial .mes { margin: 16px 0 0; color: var(--z-texto-2); }
.item-sesion { flex-direction: column; align-items: flex-start; gap: 4px; }
.item-sesion .gris, .item-sesion > span { font-size: var(--z-t-chico); }
.tabla-records, .graf-tabla table { width: 100%; border-collapse: collapse; font-size: var(--z-t-chico); }
.tabla-records th, .tabla-records td, .graf-tabla th, .graf-tabla td { padding: 10px 8px; border-bottom: 1px solid var(--z-borde); text-align: left; }
.tabla-records td, .graf-tabla td:not(:first-child), .graf-tabla th:not(:first-child) { text-align: right; white-space: nowrap; }
.tabla-records thead th, .graf-tabla thead th { color: var(--z-texto-3); font-weight: 600; }
.tabla-records a { color: var(--z-texto); }
.records-nuevos { border-color: color-mix(in srgb, var(--z-app-1) 55%, transparent); }
.series-lista { margin: 0; padding-left: 1.4em; display: grid; gap: 4px; }
.sensacion .z-btn { flex: 1 1 30%; padding-inline: 10px; font-size: var(--z-t-chico); }

/* ---------- Comidas ---------- */
.dia-nav { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; }
.dia-nav h1 { margin: 0; text-align: center; font-size: 1.35rem; }
.dia-nav .z-btn { padding: 6px 14px; font-size: var(--z-t-chico); }
.dia-nav-hueco { width: 1px; }
.momento .tarjeta-cab h2 { margin: 0; }
.lista-comidas, .lista-alimentos { display: grid; gap: 6px; }
.lista-alimentos > li.con-boton { display: flex; gap: 6px; align-items: center; }
.item-kcal { font-weight: 700; white-space: nowrap; }
.item-kcal::after { content: " kcal"; font-weight: 500; color: var(--z-texto-3); font-size: var(--z-t-chico); }
.off { background: var(--z-fondo-2); }
.cant-resumen { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: baseline; padding: 12px 14px; border-radius: var(--z-radio); background: var(--z-superficie-2); }
.cant-resumen b { font-size: 1.4rem; width: 100%; }
.cant-resumen span { color: var(--z-texto-2); font-size: var(--z-t-chico); }
.camara { position: relative; border-radius: var(--z-radio); overflow: hidden; background: #000; aspect-ratio: 4 / 3; }
.camara video { width: 100%; height: 100%; object-fit: cover; display: block; }
.camara-marco { position: absolute; inset: 30% 12%; border: 3px solid var(--z-app-1); border-radius: 12px; box-shadow: 0 0 0 999px rgba(0, 0, 0, .35); }

/* ---------- Hoja de abajo ---------- */
.hoja {
  width: 100%; max-width: 640px; max-height: 88vh; max-height: 88dvh; margin: auto auto 0; padding: 0; box-sizing: border-box;
  border: 1px solid var(--z-borde); border-bottom: 0; border-radius: 24px 24px 0 0; background: #151516; color: var(--z-texto); overflow: hidden;
}
.hoja[open] { display: flex; flex-direction: column; animation: subir .22s var(--z-ease); }
.hoja::backdrop { background: rgba(0, 0, 0, .6); }
.hoja-cab { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px 10px 20px; border-bottom: 1px solid var(--z-borde); }
.hoja-cab h2 { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.hoja-cuerpo { padding: 16px 20px calc(24px + env(safe-area-inset-bottom, 0px)); overflow-y: auto; overscroll-behavior: contain; }
.hoja-cuerpo > * + * { margin-top: 14px; }
@media (min-width: 700px) { .hoja { margin: auto; border-radius: 24px; border-bottom: 1px solid var(--z-borde); } }
@keyframes subir { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
body.con-hoja { overflow: hidden; }

/* ---------- Mensaje corto ---------- */
.mensaje {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--barra) + 20px + env(safe-area-inset-bottom, 0px)); z-index: 60;
  max-width: min(92vw, 520px); padding: 12px 20px; border-radius: 16px; background: #f5f3ee; color: #0a0a0a; font-weight: 600; box-shadow: 0 16px 40px -12px #000; text-align: center;
}
.mensaje-error { background: #f8a59b; color: #1a0503; }
body.con-descanso .mensaje { bottom: calc(var(--barra) + 110px + env(safe-area-inset-bottom, 0px)); }

/* ---------- Gráficos ---------- */
.graf { display: grid; gap: 6px; }
.graf-caja { position: relative; width: 100%; touch-action: pan-y; }
.graf-caja svg { display: block; overflow: visible; }
.graf-grilla { stroke: rgba(255, 255, 255, .08); stroke-width: 1; }
.graf-base { stroke: rgba(255, 255, 255, .3); stroke-width: 1; }
.graf-eje { fill: var(--z-texto-3); font: 500 13px var(--z-sans); }
.graf-meta { stroke: var(--z-texto-2); stroke-width: 1.5; stroke-dasharray: 6 5; }
.graf-cruz { stroke: rgba(255, 255, 255, .35); stroke-width: 1; }
.graf-tip { position: absolute; z-index: 5; pointer-events: none; display: grid; gap: 2px; padding: 8px 12px; border-radius: 12px; background: #f5f3ee; color: #0a0a0a; font-size: var(--z-t-chico); white-space: nowrap; box-shadow: 0 10px 30px -10px #000; }
.graf-tip span { display: flex; align-items: center; gap: 6px; }
.graf-tip i, .graf-leyenda i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; flex-shrink: 0; }
.graf-leyenda { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: var(--z-t-chico); color: var(--z-texto-2); }
.graf-leyenda span { display: inline-flex; align-items: center; gap: 6px; }
.graf-vacio { padding: 24px 0; text-align: center; color: var(--z-texto-3); }
.graf-tabla-btn { justify-self: start; min-height: 2.75rem; padding-inline: 0; font-size: var(--z-t-chico); }

/* ---------- Pantallas largas de texto ---------- */
.pagina h2 { margin-top: 0; }
.pagina p, .pagina li { line-height: 1.55; color: var(--z-texto-2); }

@media (prefers-reduced-motion: reduce) { .hoja[open] { animation: none; } .descanso-barra i { transition: none; } }
@media print { .pestanas, .descanso, .cabecera, #zf, #zojim-nueva, .mensaje { display: none !important; } .contenedor { padding-bottom: 0; } }

/* ---- Logros, metas y plan ---- */
.metas { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.meta { display: grid; gap: 6px; min-width: 0; }
.meta + .meta { border-top: 1px solid var(--z-borde); padding-top: 14px; }
.meta-cab { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.meta-cab b { min-width: 0; overflow-wrap: anywhere; }
.meta-pct { font-weight: 700; color: var(--z-app-1); font-variant-numeric: tabular-nums; }
.meta .gris { margin: 0; }
.meta .botones-fila { gap: 4px; }
.z-progreso.barra-meta > i { background: var(--z-app-1); }
.meta-cumplida .z-progreso > i { background: #86efac; }
.plan-etapas { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.plan-etapas li { display: flex; gap: 10px; align-items: flex-start; }
.plan-marca { flex: none; width: 1.7rem; height: 1.7rem; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--z-borde); font-size: .85rem; font-weight: 700; }
.plan-etapas .hecha .plan-marca { background: var(--z-app-1); border-color: var(--z-app-1); color: #231400; }
.plan-etapas .actual .plan-marca { border: 2px solid var(--z-app-1); color: var(--z-app-1); }
.logros-grupo { margin-top: 18px; display: flex; justify-content: space-between; gap: 8px; }
.logros-grupo .gris { font-weight: 400; font-size: var(--z-t-chico); }
.logros { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); }
.logro { display: flex; gap: 12px; align-items: flex-start; padding: 10px 12px; border: 1px dashed var(--z-borde); border-radius: var(--z-radio); min-width: 0; }
.logro > div { min-width: 0; flex: 1; display: grid; gap: 4px; }
.logro p { margin: 0; }
.logro .logro-icono { font-size: 1.6rem; line-height: 1; filter: grayscale(1); opacity: .45; }
.logro.logrado { border-style: solid; border-color: color-mix(in srgb, var(--z-app-1) 50%, transparent); background: var(--z-app-fondo); }
.logro.logrado .logro-icono { filter: none; opacity: 1; }
.logro-cuenta { font-size: var(--z-t-chico); }
.enlace-tarjeta { display: flex; gap: 14px; align-items: center; text-decoration: none; color: inherit; }
.enlace-tarjeta > span:last-child { display: grid; gap: 2px; }
.enlace-icono { font-size: 1.8rem; line-height: 1; }
.enlace-logros { margin: 0; text-align: center; }
.enlace-logros a { color: var(--z-app-1); }
.casilla-festejos { display: flex; gap: 10px; align-items: flex-start; margin-top: 16px; color: var(--z-texto-2); }
.casilla-festejos input { width: 1.25rem; height: 1.25rem; flex: none; margin-top: .1rem; accent-color: var(--z-app-2); }
.festejo { position: relative; text-align: center; overflow: hidden; }
.festejo-icono { font-size: 3.4rem; line-height: 1; margin: 6px 0 0; animation: latido .7s var(--z-ease) both; }
.festejo-lista { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; text-align: left; }
.festejo-lista li { display: flex; gap: 12px; align-items: flex-start; }
.festejo-lista li > span { font-size: 1.5rem; line-height: 1.2; }
.festejo-lista p { margin: 2px 0 0; }
.festejo-frase { font-family: var(--z-serif); font-size: 1.2rem; color: var(--z-app-1); }
.festejo .botones-fila { justify-content: center; }
.festejo-confeti { position: absolute; inset: 0; pointer-events: none; }
.festejo-confeti i { position: absolute; top: -12px; left: var(--x); width: 8px; height: 12px; border-radius: 2px; background: var(--c); opacity: 0; animation: confeti 1.6s var(--d) ease-in both; }
@keyframes confeti { 0% { transform: translateY(0) rotate(0); opacity: 1; } 100% { transform: translateY(260px) rotate(540deg); opacity: 0; } }
@keyframes latido { 0% { transform: scale(.4); opacity: 0; } 60% { transform: scale(1.15); opacity: 1; } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .festejo-confeti { display: none; } .festejo-icono { animation: none; } }
.festejo-uno .festejo-lista li > span { display: none; } .festejo-uno .festejo-lista { text-align: center; } .festejo-uno .festejo-lista li { justify-content: center; }
