/* ============ Toro Coach · app de los clientes ============
   Misma estética que el Panel de Alex (dashboard/web/styles.css), pensada para el móvil en vertical. */
:root {
  --morado: #B213BD;
  --morado-osc: #7A0D82;
  --morado-claro: #D84CE2;
  --negro: #0A0A0D;
  --rojo: #E0323C;
  --ambar: #D97706;
  --verde: #16A35A;
  --azul: #3B6FE0;

  --fuente: "Montserrat", "Segoe UI", system-ui, -apple-system, sans-serif;
  --radio: 22px;
  --radio-s: 14px;
  --ancho: 480px;
  --nav-alto: 64px;
  --arriba: env(safe-area-inset-top, 0px);
  --abajo: env(safe-area-inset-bottom, 0px);

  --bg-1: #F6F1FA;
  --bg-2: #EEF0FB;
  --bg-mancha-1: rgba(178, 19, 189, .16);
  --bg-mancha-2: rgba(90, 120, 240, .14);
  --tarjeta: rgba(255, 255, 255, .74);
  --tarjeta-solida: #FFFFFF;
  --tarjeta-borde: rgba(255, 255, 255, .9);
  --tarjeta-sombra: 0 1px 2px rgba(40, 20, 60, .04), 0 12px 32px -12px rgba(60, 20, 90, .16);
  --hundido: rgba(120, 90, 150, .08);
  --linea: rgba(60, 30, 90, .10);
  --texto: #17141C;
  --texto-2: #5D5868;
  --texto-3: #8E8899;
  --acento: #B213BD;
  --acento-texto: #9A10A4;
  --acento-suave: rgba(178, 19, 189, .10);
  --barra: #0A0A0D;
  color-scheme: light;
}

[data-tema="oscuro"] {
  --bg-1: #08080B;
  --bg-2: #0E0B12;
  --bg-mancha-1: rgba(178, 19, 189, .22);
  --bg-mancha-2: rgba(80, 90, 220, .12);
  --tarjeta: rgba(24, 22, 30, .74);
  --tarjeta-solida: #17151D;
  --tarjeta-borde: rgba(255, 255, 255, .06);
  --tarjeta-sombra: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 16px 40px -16px rgba(0, 0, 0, .7);
  --hundido: rgba(255, 255, 255, .06);
  --linea: rgba(255, 255, 255, .08);
  --texto: #F2EEF5;
  --texto-2: #B5AEBF;
  --texto-3: #7D7688;
  --acento: #C93AD3;
  --acento-texto: #E58BEB;
  --acento-suave: rgba(201, 58, 211, .16);
  --barra: #17151D;
  --rojo: #F05A62;
  --ambar: #F0A43A;
  --verde: #34C77B;
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100dvh;
  font-family: var(--fuente); color: var(--texto); background: var(--bg-1);
  font-size: 15px; line-height: 1.45; -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-user-select: none; user-select: none; touch-action: manipulation; }
a { color: var(--acento-texto); }
[hidden] { display: none !important; }
svg.i { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }

.fondo {
  position: fixed; inset: 0; z-index: -1;
  background:
    radial-gradient(600px 420px at 10% -8%, var(--bg-mancha-1), transparent 60%),
    radial-gradient(520px 420px at 100% 12%, var(--bg-mancha-2), transparent 60%),
    radial-gradient(520px 380px at 50% 110%, var(--bg-mancha-1), transparent 60%),
    linear-gradient(160deg, var(--bg-1), var(--bg-2));
}

/* ---------- estructura ---------- */
.app {
  max-width: var(--ancho); margin: 0 auto;
  padding: calc(var(--arriba) + 14px) 16px calc(var(--nav-alto) + var(--abajo) + 34px);
}
.app.sin-nav { padding-bottom: calc(var(--abajo) + 40px); }
.cab { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 4px 2px 16px; }
.cab h1 { font-size: 24px; font-weight: 800; letter-spacing: -.6px; margin: 0; line-height: 1.15; }
.cab p { margin: 3px 0 0; color: var(--texto-3); font-size: 13px; font-weight: 500; }
.logo {
  width: 42px; height: 42px; border-radius: 50%; flex: none; border: 0;
  background: linear-gradient(135deg, var(--morado-claro), var(--morado)); color: #fff;
  font-weight: 800; font-size: 14px; letter-spacing: -.4px; display: grid; place-items: center;
  box-shadow: 0 6px 18px -4px rgba(178, 19, 189, .7);
}
.seccion-tit { font-size: 13px; font-weight: 700; color: var(--texto-2); margin: 22px 4px 10px; display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.seccion-tit small { font-weight: 500; color: var(--texto-3); }

/* ---------- barra de abajo ---------- */
.nav {
  position: fixed; z-index: 30; left: 50%; transform: translateX(-50%);
  bottom: calc(var(--abajo) + 12px); width: min(calc(100% - 28px), calc(var(--ancho) - 28px));
  height: var(--nav-alto); padding: 0 8px; border-radius: 32px; background: var(--barra);
  display: flex; align-items: center; justify-content: space-around;
  box-shadow: 0 20px 40px -18px rgba(10, 0, 20, .7), 0 0 0 1px rgba(255, 255, 255, .04) inset;
}
.nav button {
  height: 48px; min-width: 48px; padding: 0 14px; border-radius: 24px; border: 0;
  background: transparent; color: #9A93A6; display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 700; transition: background .2s, color .2s;
}
.nav button span { display: none; }
.nav button.activo { background: #fff; color: var(--negro); }
.nav button.activo span { display: inline; }
.nav button:active { transform: scale(.95); }

/* ---------- tarjetas y botones ---------- */
.tarjeta {
  background: var(--tarjeta); border: 1px solid var(--tarjeta-borde);
  backdrop-filter: blur(18px) saturate(140%); -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-radius: var(--radio); box-shadow: var(--tarjeta-sombra); padding: 18px; margin-bottom: 12px; min-width: 0;
  background-origin: border-box; /* el degradado cubre también el borde: sin la línea que asomaba en el tema claro */
}
.tarjeta h2 { font-size: 16px; margin: 0; font-weight: 700; letter-spacing: -.2px; }
.tarjeta-cab { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; }
.tarjeta-cab small, .sub { color: var(--texto-3); font-size: 12.5px; font-weight: 500; }
.destacada { background: linear-gradient(135deg, color-mix(in srgb, var(--acento) 18%, var(--tarjeta-solida)), var(--tarjeta-solida) 70%); }

.boton {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 20px; border-radius: 999px; border: 0;
  background: var(--acento); color: #fff; font-weight: 700; font-size: 15px;
  box-shadow: 0 10px 22px -10px color-mix(in srgb, var(--acento) 85%, transparent);
  transition: transform .15s, filter .15s;
}
.boton:active { transform: scale(.97); }
.boton.ancho { width: 100%; }
.boton.grande { height: 54px; font-size: 16px; }
.boton.sec { background: var(--tarjeta-solida); color: var(--texto); box-shadow: inset 0 0 0 1px var(--linea); }
.boton.peq { height: 36px; padding: 0 14px; font-size: 13px; }
.boton.peligro { color: var(--rojo); }
.boton[disabled] { opacity: .5; pointer-events: none; }
.icono-btn { width: 38px; height: 38px; flex: none; border-radius: 50%; border: 0; background: var(--hundido); color: var(--texto-2); display: grid; place-items: center; }
.icono-btn svg.i { width: 18px; height: 18px; }
.enlace-btn { border: 0; background: none; padding: 0; color: var(--acento-texto); font-weight: 600; font-size: 13px; }

.chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px 14px; padding: 2px 16px; }
.chips::-webkit-scrollbar { display: none; }
.chips.apilar { flex-wrap: wrap; overflow: visible; row-gap: 8px; }   /* pestañas de Progreso: pasan a otra fila en vez de cortarse */
.chip {
  flex: none; height: 36px; padding: 0 15px; border-radius: 999px; border: 0;
  background: var(--tarjeta-solida); box-shadow: inset 0 0 0 1px var(--linea); color: var(--texto-2);
  font-weight: 600; font-size: 13px; white-space: nowrap;
}
.chip.activo { background: var(--texto); color: var(--tarjeta-solida); box-shadow: none; }
.etiqueta { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 999px; background: var(--acento-suave); color: var(--acento-texto); font-size: 11px; font-weight: 700; }
.etiqueta.verde { background: color-mix(in srgb, var(--verde) 14%, transparent); color: var(--verde); }
.etiqueta.azul { background: color-mix(in srgb, var(--azul) 14%, transparent); color: var(--azul); }
.etiqueta.gris { background: var(--hundido); color: var(--texto-2); }

/* ---------- campos ---------- */
.campo { display: block; margin-bottom: 14px; }
.campo span { display: block; font-size: 12.5px; font-weight: 600; color: var(--texto-2); margin: 0 4px 6px; }
.entrada {
  width: 100%; height: 50px; border-radius: 16px; border: 0; padding: 0 16px;
  background: var(--tarjeta-solida); box-shadow: inset 0 0 0 1px var(--linea);
  font-size: 16px; outline: none;
}
.entrada:focus { box-shadow: inset 0 0 0 2px var(--acento); }
textarea.entrada { height: auto; min-height: 96px; padding: 14px 16px; resize: vertical; line-height: 1.45; }
.error-txt { color: var(--rojo); font-size: 13px; font-weight: 600; margin: -4px 4px 12px; min-height: 1em; }

/* ---------- acceso ---------- */
.acceso { min-height: calc(100dvh - 60px); display: flex; flex-direction: column; justify-content: center; }
.acceso .logo { width: 64px; height: 64px; font-size: 20px; margin: 0 auto 18px; }
.acceso h1 { text-align: center; font-size: 26px; letter-spacing: -.7px; margin: 0 0 6px; }
.acceso > p { text-align: center; color: var(--texto-2); margin: 0 0 24px; }

/* ---------- semana (tira de días) ---------- */
.semana-tira { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-bottom: 14px; }
.dia-btn {
  position: relative; border: 0; border-radius: 18px; padding: 9px 0 11px;
  background: var(--tarjeta); box-shadow: inset 0 0 0 1px var(--tarjeta-borde), var(--tarjeta-sombra);
  display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--texto-2);
}
.dia-btn small { font-size: 11px; font-weight: 600; color: var(--texto-3); text-transform: uppercase; }
.dia-btn b { font-size: 17px; font-weight: 800; letter-spacing: -.4px; color: var(--texto); }
.dia-btn .punto { width: 6px; height: 6px; border-radius: 50%; background: transparent; margin-top: 2px; }
.dia-btn.entreno .punto { background: var(--acento); }
.dia-btn.hecho .punto { background: var(--verde); }
.dia-btn.hoy { box-shadow: inset 0 0 0 2px var(--acento), var(--tarjeta-sombra); }
.dia-btn.sel { background: var(--negro); }
[data-tema="oscuro"] .dia-btn.sel { background: #fff; }
.dia-btn.sel small, .dia-btn.sel b { color: #fff; }
[data-tema="oscuro"] .dia-btn.sel small, [data-tema="oscuro"] .dia-btn.sel b { color: var(--negro); }

/* ---------- tarjeta del día ---------- */
.dia-tit { font-size: 22px; font-weight: 800; letter-spacing: -.6px; margin: 4px 0 2px; line-height: 1.2; }
.lista-ej { list-style: none; margin: 14px 0 16px; padding: 0; }
.lista-ej li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--linea); font-size: 14px; }
.lista-ej li:last-child { border-bottom: 0; }
.lista-ej li b { font-weight: 600; min-width: 0; }
.lista-ej li .sub { white-space: nowrap; }
.lista-ej .ss { box-shadow: inset 3px 0 0 var(--azul); padding-left: 10px; }
.descanso-dia { text-align: center; padding: 26px 10px 18px; }
.descanso-dia .grande-ico { width: 64px; height: 64px; border-radius: 22px; margin: 0 auto 12px; display: grid; place-items: center; background: var(--acento-suave); color: var(--acento-texto); }
.descanso-dia .grande-ico svg.i { width: 30px; height: 30px; }

.mini-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.mini { background: var(--hundido); border-radius: var(--radio-s); padding: 11px 12px; min-width: 0; }
.mini small { display: block; font-size: 11.5px; color: var(--texto-3); font-weight: 600; }
.mini b { display: block; font-size: 19px; font-weight: 800; letter-spacing: -.5px; font-variant-numeric: tabular-nums; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini b em { font-style: normal; font-size: 12px; color: var(--texto-3); font-weight: 600; margin-left: 2px; }
.barra-prog { height: 8px; border-radius: 8px; background: var(--hundido); overflow: hidden; margin-top: 12px; }
.barra-prog span { display: block; height: 100%; border-radius: 8px; background: linear-gradient(90deg, var(--morado-claro), var(--morado)); transition: width .4s; }
.aviso { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radio-s); background: var(--acento-suave); color: var(--texto); font-size: 13.5px; margin-bottom: 12px; }
.aviso svg.i { color: var(--acento-texto); margin-top: 1px; width: 18px; height: 18px; }
.aviso.ambar { background: color-mix(in srgb, var(--ambar) 13%, transparent); }
.aviso.ambar svg.i { color: var(--ambar); }

/* ---------- entreno en curso ---------- */
.entreno-cab {
  position: sticky; top: calc(var(--arriba) + 6px); z-index: 10; margin: 0 0 14px;
  background: linear-gradient(120deg, color-mix(in srgb, var(--acento) 16%, var(--tarjeta-solida)), var(--tarjeta-solida));
  backdrop-filter: none; -webkit-backdrop-filter: none; padding: 12px 14px;
}
.entreno-cab .fila1 { display: flex; align-items: center; gap: 10px; }
.entreno-cab .fila1 > div { flex: 1; min-width: 0; }
.entreno-cab h2 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.entreno-datos { display: flex; gap: 18px; margin-top: 8px; }
.entreno-datos small { display: block; font-size: 11px; color: var(--texto-3); font-weight: 600; }
.entreno-datos b { font-size: 15px; font-variant-numeric: tabular-nums; }
.entreno-datos .reloj { color: var(--acento-texto); }

.ej { padding: 14px 12px 12px; }
.ej.en-ss { box-shadow: inset 4px 0 0 var(--azul), var(--tarjeta-sombra); }
.ej-cab { display: flex; align-items: flex-start; gap: 10px; padding: 0 4px; }
.ej-cab > div { flex: 1; min-width: 0; }
.ej-nombre { border: 0; background: none; padding: 0; text-align: left; font-size: 16px; font-weight: 700; letter-spacing: -.2px; color: var(--texto); display: inline; line-height: 1.3; }
.ej-nombre svg.i { width: 14px; height: 14px; vertical-align: -1px; color: var(--texto-3); margin-left: 3px; }
.ej-meta { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.ej-mas { width: 34px; height: 34px; margin: -4px -2px 0 0; background: transparent; }
.ej-mas:active { background: var(--hundido); }
/* reloj de descanso de cada ejercicio */
.reloj-ej { display: flex; align-items: center; gap: 10px; margin: 12px 4px 0; padding: 6px 6px 6px 12px; border-radius: 16px; background: var(--hundido); }
.reloj-ico { color: var(--acento-texto); display: grid; }
.reloj-ico svg.i { width: 18px; height: 18px; }
.reloj-txt { flex: 1; font-size: 13px; font-weight: 600; color: var(--texto-2); }
.reloj-valor { display: inline-flex; align-items: baseline; gap: 3px; height: 34px; padding: 0 8px 0 12px; border: 0; border-radius: 11px; background: var(--tarjeta-solida); box-shadow: 0 1px 2px rgba(40, 20, 60, .08); font-variant-numeric: tabular-nums; }
.reloj-valor b { font-size: 16px; font-weight: 800; letter-spacing: -.3px; align-self: center; }
.reloj-valor small { font-size: 11.5px; font-weight: 600; color: var(--texto-3); align-self: center; }
.reloj-valor .flechita { width: 15px; height: 15px; color: var(--texto-3); align-self: center; }
.reloj-play { width: 34px; height: 34px; border: 0; border-radius: 11px; display: grid; place-items: center; background: var(--acento); color: #fff; box-shadow: 0 6px 14px -6px var(--acento); }
.reloj-play svg.i { width: 15px; height: 15px; fill: currentColor; stroke-width: 1.5; margin-left: 2px; }
.reloj-play.activo { background: var(--texto); color: var(--tarjeta-solida); box-shadow: none; }
.reloj-play:active, .reloj-valor:active { transform: scale(.95); }
.obs { margin: 10px 4px 4px; padding: 10px 12px; border-radius: 12px; background: var(--hundido); font-size: 13px; color: var(--texto-2); }
.obs b { color: var(--texto); font-weight: 700; }

.series { width: 100%; table-layout: fixed; border-collapse: separate; border-spacing: 0 4px; margin-top: 8px; font-variant-numeric: tabular-nums; }
.series col.c-n { width: 38px; } .series col.c-ant { width: 62px; } .series col.c-rir { width: 64px; } .series col.c-ok { width: 46px; }
.series th { font-size: 10.5px; font-weight: 700; color: var(--texto-3); text-transform: uppercase; letter-spacing: .3px; padding: 0 2px 2px; text-align: center; }
.series td { padding: 0 2px; text-align: center; vertical-align: middle; }
.series .n { width: 32px; height: 36px; border-radius: 10px; background: var(--hundido); display: grid; place-items: center; font-weight: 700; font-size: 14px; margin: 0 auto; }
.series .ant { font-size: 12px; color: var(--texto-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.25; }
.series input, .series select {
  width: 100%; min-width: 0; height: 40px; border: 0; border-radius: 12px; text-align: center;
  background: var(--tarjeta-solida); box-shadow: inset 0 0 0 1px var(--linea);
  font-size: 16px; font-weight: 600; outline: none; padding: 0 2px; -moz-appearance: textfield; appearance: none;
}
.series input::-webkit-outer-spin-button, .series input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.series input:focus, .series select:focus { box-shadow: inset 0 0 0 2px var(--acento); }
.series input::placeholder { color: var(--texto-3); font-weight: 500; }
.series select { font-size: 14px; }
.series tr.hecha td { background: color-mix(in srgb, var(--verde) 12%, transparent); }
.series tr.hecha td:first-child { border-radius: 12px 0 0 12px; }
.series tr.hecha td:last-child { border-radius: 0 12px 12px 0; }
.series tr.hecha input, .series tr.hecha select { background: transparent; box-shadow: none; }
.check { width: 40px; height: 40px; border-radius: 12px; border: 0; background: var(--hundido); color: var(--texto-3); display: grid; place-items: center; margin: 0 auto; }
.check svg.i { width: 18px; height: 18px; stroke-width: 2.6; }
.hecha .check { background: var(--verde); color: #fff; }
.ej-pie { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: 8px 4px 0; }
.cardio { display: flex; gap: 12px; align-items: center; }
.cardio .grande-ico { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--acento-suave); color: var(--acento-texto); flex: none; }

.descanso-flot {
  position: fixed; z-index: 40; left: 50%; transform: translateX(-50%);
  bottom: calc(var(--abajo) + 14px); width: min(calc(100% - 24px), calc(var(--ancho) - 24px));
  background: var(--barra); color: #fff; border-radius: 24px; padding: 12px 14px 12px 18px;
  display: flex; align-items: center; gap: 12px; box-shadow: 0 20px 40px -14px rgba(0, 0, 0, .6); overflow: hidden;
}
.descanso-flot .barra-t { position: absolute; left: 0; bottom: 0; height: 3px; background: var(--morado-claro); transition: width 1s linear; }
.descanso-flot div { flex: 1; min-width: 0; }
.descanso-flot small { display: block; font-size: 11.5px; color: #B5AEBF; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.descanso-flot b { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
.descanso-flot button { height: 36px; padding: 0 12px; border-radius: 18px; border: 0; background: rgba(255, 255, 255, .12); color: #fff; font-weight: 700; font-size: 13px; }

/* ---------- hoja inferior (modal) ---------- */
.capa { position: fixed; inset: 0; z-index: 50; background: rgba(8, 4, 12, .5); display: flex; align-items: flex-end; justify-content: center; }
.hoja {
  width: 100%; max-width: var(--ancho); max-height: 92dvh; overflow-y: auto;
  background: var(--tarjeta-solida); border-radius: 26px 26px 0 0; padding: 10px 18px calc(var(--abajo) + 20px);
  animation: subir .26s cubic-bezier(.2, .8, .2, 1);
}
.hoja::before { content: ""; display: block; width: 40px; height: 5px; border-radius: 3px; background: var(--linea); margin: 0 auto 14px; }
.hoja h2 { font-size: 20px; margin: 0 0 6px; letter-spacing: -.4px; }
.hoja p { color: var(--texto-2); margin: 0 0 16px; font-size: 14px; }
.hoja-botones { display: flex; gap: 10px; margin-top: 6px; }
.hoja-botones .boton { flex: 1; }
@keyframes subir { from { transform: translateY(40px); opacity: .4; } to { transform: none; opacity: 1; } }

/* ---------- resumen del entreno ---------- */
.trofeo { width: 76px; height: 76px; border-radius: 26px; margin: 12px auto 14px; display: grid; place-items: center; background: linear-gradient(135deg, var(--morado-claro), var(--morado)); color: #fff; box-shadow: 0 14px 30px -10px rgba(178, 19, 189, .8); }
.trofeo svg.i { width: 36px; height: 36px; }
.centro { text-align: center; }
.record { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--linea); font-size: 14px; }
.record:last-child { border-bottom: 0; }
.record .medalla { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; background: color-mix(in srgb, var(--ambar) 16%, transparent); color: var(--ambar); flex: none; }

/* ---------- ficha de ejercicio ---------- */
.volver { display: inline-flex; align-items: center; gap: 4px; border: 0; background: none; padding: 6px 0; color: var(--texto-2); font-weight: 600; font-size: 14px; margin-bottom: 4px; }
.video-caja { aspect-ratio: 9 / 16; max-height: 62dvh; width: 100%; border-radius: var(--radio-s); overflow: hidden; background: #000; display: grid; place-items: center; }
.video-caja video, .video-caja iframe { width: 100%; height: 100%; border: 0; object-fit: contain; background: #000; }
.video-vacio { aspect-ratio: 16 / 10; border-radius: var(--radio-s); background: var(--hundido); display: grid; place-items: center; text-align: center; color: var(--texto-3); font-size: 13px; padding: 20px; }
.video-vacio svg.i { width: 32px; height: 32px; margin-bottom: 6px; }
.musculos { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.texto-ficha { font-size: 14px; color: var(--texto-2); margin: 0; white-space: pre-wrap; }
.mis-videos { display: grid; gap: 10px; }
.mi-video { border-radius: var(--radio-s); overflow: hidden; background: var(--hundido); }
.mi-video video { width: 100%; display: block; max-height: 60dvh; background: #000; }
.mi-video div { padding: 9px 12px; font-size: 12.5px; color: var(--texto-2); }
.respuesta { margin-top: 6px; padding: 8px 10px; border-radius: 10px; background: var(--acento-suave); color: var(--texto); }

/* 1RM, récords e historial de la ficha */
.rm-cab { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.rm-cab b { display: block; font-size: 30px; font-weight: 800; letter-spacing: -1px; font-variant-numeric: tabular-nums; line-height: 1.15; }
.rm-cab b em { font-style: normal; font-size: 14px; color: var(--texto-3); font-weight: 600; }
.rm-tabla { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; margin-top: 12px; padding: 8px 4px; border-radius: var(--radio-s); background: var(--hundido); text-align: center; }
.rm-tabla small { display: block; font-size: 10.5px; color: var(--texto-3); font-weight: 600; white-space: nowrap; }
.rm-tabla b { font-size: 14px; font-variant-numeric: tabular-nums; }
.records-rejilla { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.record-caja { margin: 0; padding: 14px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.record-caja .medalla { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; background: color-mix(in srgb, var(--ambar) 16%, transparent); color: var(--ambar); margin-bottom: 6px; }
.record-caja .medalla svg.i { width: 16px; height: 16px; }
.record-caja small { font-size: 12px; font-weight: 600; color: var(--texto-2); }
.record-caja b { font-size: 20px; font-weight: 800; letter-spacing: -.5px; font-variant-numeric: tabular-nums; }
.record-caja .sub { font-size: 11.5px; }
.hist { padding: 11px 0; border-bottom: 1px solid var(--linea); }
.hist:last-child { border-bottom: 0; }
.hist-cab { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 13.5px; }
.hist-cab .sub { white-space: nowrap; font-size: 12px; }
.hist-series { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
.hist-series span { display: inline-flex; align-items: baseline; gap: 5px; padding: 5px 9px; border-radius: 10px; background: var(--hundido); font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.hist-series small { font-size: 10.5px; color: var(--texto-3); }
.hist-series em { font-style: normal; font-size: 11px; color: var(--texto-3); font-weight: 600; }

/* ---------- tablas simples ---------- */
.tabla { width: 100%; border-collapse: collapse; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.tabla th { text-align: left; font-size: 11px; font-weight: 700; color: var(--texto-3); text-transform: uppercase; letter-spacing: .3px; padding: 0 6px 8px; border-bottom: 1px solid var(--linea); }
.tabla td { padding: 10px 6px; border-bottom: 1px solid var(--linea); vertical-align: top; }
.tabla tr:last-child td { border-bottom: 0; }
.tabla .der { text-align: right; }

/* ---------- dieta ---------- */
.macros { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.macros .mini.kcal { grid-column: 1 / -1; display: flex; align-items: baseline; justify-content: space-between; background: linear-gradient(120deg, color-mix(in srgb, var(--acento) 18%, transparent), var(--hundido)); }
.macros .mini.kcal b { font-size: 26px; }
.comida-macros { display: flex; flex-wrap: wrap; gap: 5px; }
.opciones-tabs { display: flex; gap: 6px; margin: 12px 0 10px; overflow-x: auto; scrollbar-width: none; }
.opciones-tabs::-webkit-scrollbar { display: none; }
.opciones-tabs .chip { height: 32px; font-size: 12.5px; }
.plato { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--linea); font-size: 14px; }
.plato:last-child { border-bottom: 0; }
.plato em { color: var(--texto-3); font-style: normal; font-size: 12px; margin-left: 4px; }
.plato b { white-space: nowrap; font-weight: 700; }
.plato small { display: block; color: var(--texto-3); font-size: 12px; }
.nota-dieta { white-space: pre-wrap; font-size: 13.5px; color: var(--texto-2); margin: 0; }

/* ---------- progreso ---------- */
.grafica { width: 100%; height: 170px; display: block; overflow: visible; }
.grafica .linea { fill: none; stroke: var(--acento); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.grafica .area { fill: url(#deg); }
.grafica .pto { fill: var(--tarjeta-solida); stroke: var(--acento); stroke-width: 2; }
.grafica .eje { fill: var(--texto-3); font-size: 10px; font-family: var(--fuente); font-weight: 600; }
.grafica .rejilla { stroke: var(--linea); stroke-width: 1; }
.grafica .barra { fill: var(--acento); }
.grafica .barra.fondo-b { fill: var(--hundido); }
.peso-entrada { display: flex; gap: 8px; }
.peso-entrada .entrada { flex: 1; }
.fotos-rejilla { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.fotos-rejilla button { aspect-ratio: 3 / 4; border: 0; padding: 0; border-radius: 12px; overflow: hidden; background: var(--hundido); }
.fotos-rejilla img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fecha-grupo { font-size: 12.5px; font-weight: 700; color: var(--texto-3); margin: 14px 2px 8px; }
.visor { position: fixed; inset: 0; z-index: 60; background: #000; display: flex; flex-direction: column; }
.visor img { flex: 1; min-height: 0; object-fit: contain; width: 100%; }
.visor .barra-visor { display: flex; justify-content: space-between; align-items: center; padding: calc(var(--arriba) + 10px) 14px 10px; color: #fff; }
.visor .barra-visor button { color: #fff; background: rgba(255, 255, 255, .14); }
.fila-ej { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: none; text-align: left; padding: 11px 0; border-bottom: 1px solid var(--linea); }
.fila-ej:last-child { border-bottom: 0; }
.fila-ej > div { flex: 1; min-width: 0; }
.fila-ej b { display: block; font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sube { color: var(--verde); font-weight: 700; }
.baja { color: var(--rojo); font-weight: 700; }

/* ---------- ajustes ---------- */
.ajuste { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--linea); }
.ajuste:last-child { border-bottom: 0; }
.ajuste > div { min-width: 0; }
.ajuste b { display: block; font-weight: 600; font-size: 14.5px; }
.ajuste small { color: var(--texto-3); font-size: 12.5px; }
.interruptor { position: relative; width: 52px; height: 32px; flex: none; border-radius: 16px; border: 0; background: var(--hundido); box-shadow: inset 0 0 0 1px var(--linea); transition: background .2s; }
.interruptor::after { content: ""; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .25); transition: transform .2s; }
.interruptor.si { background: var(--acento); box-shadow: none; }
.interruptor.si::after { transform: translateX(20px); }
.segmento { display: flex; background: var(--hundido); border-radius: 999px; padding: 3px; }
.segmento button { border: 0; background: none; height: 32px; padding: 0 12px; border-radius: 999px; font-size: 12.5px; font-weight: 700; color: var(--texto-2); }
.segmento button.activo { background: var(--tarjeta-solida); color: var(--texto); box-shadow: 0 2px 6px rgba(0, 0, 0, .1); }

/* ---------- estados ---------- */
.vacio { text-align: center; padding: 34px 16px; color: var(--texto-3); }
.vacio svg.i { width: 34px; height: 34px; margin-bottom: 8px; color: var(--texto-3); }
.vacio b { display: block; color: var(--texto); font-size: 15px; margin-bottom: 4px; }
.vacio p { margin: 0; font-size: 13.5px; }
.cargando { display: grid; place-items: center; min-height: 60dvh; }
.cargando .logo { animation: latir 1.2s ease-in-out infinite; }
@keyframes latir { 50% { transform: scale(.9); opacity: .7; } }
.sinc { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--texto-3); }
.sinc i { width: 8px; height: 8px; border-radius: 50%; background: var(--verde); }
.sinc.pendiente i { background: var(--ambar); }
.sinc.fuera i { background: var(--texto-3); }

.toast {
  position: fixed; z-index: 70; left: 50%; top: calc(var(--arriba) + 12px); transform: translate(-50%, -140%);
  max-width: calc(100% - 32px); background: var(--negro); color: #fff; padding: 12px 18px; border-radius: 18px;
  font-size: 14px; font-weight: 600; box-shadow: 0 16px 30px -12px rgba(0, 0, 0, .5); transition: transform .3s cubic-bezier(.2, .8, .2, 1);
  pointer-events: none; text-align: center;
}
.toast.ver { transform: translate(-50%, 0); }
[data-tema="oscuro"] .toast { background: #fff; color: var(--negro); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
@media (min-width: 560px) {
  /* en el ordenador se ve como un móvil centrado */
  .app { padding-top: 26px; }
}

/* ---------- hojas tipo menú (descanso, opciones del ejercicio, peticiones, discos) ---------- */
.hoja.picker { padding-top: 8px; }
.picker-cab { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.picker-cab small { font-size: 12px; font-weight: 600; color: var(--texto-3); }
.picker-cab h2 { margin: 1px 0 0; font-size: 19px; }
.picker-rejilla { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.picker-op { position: relative; height: 62px; border: 0; border-radius: 18px; background: var(--hundido); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; font-variant-numeric: tabular-nums; transition: transform .12s, background .2s; }
.picker-op b { font-size: 20px; font-weight: 800; letter-spacing: -.5px; line-height: 1.1; }
.picker-op small { font-size: 11px; font-weight: 600; color: var(--texto-3); }
.picker-op:active { transform: scale(.94); }
.picker-op.activo { background: var(--acento); color: #fff; box-shadow: 0 10px 22px -10px var(--acento); }
.picker-op.activo small { color: rgba(255, 255, 255, .8); }
.rec { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--acento); }
.picker-op .rec { position: absolute; top: 9px; right: 10px; }
.picker-op.activo .rec { background: #fff; }
.picker-nota, .nota-hoja { display: flex; align-items: center; gap: 8px; font-size: 12.5px !important; color: var(--texto-3) !important; margin: 14px 2px 0 !important; line-height: 1.4; }
.nota-hoja { display: block; margin: 4px 2px 14px !important; }
.menu-lista { display: flex; flex-direction: column; gap: 2px; margin: 0 -6px; }
.menu-op { display: flex; align-items: center; gap: 12px; border: 0; background: none; padding: 10px 6px; border-radius: 16px; text-align: left; }
.menu-op:active { background: var(--hundido); }
.menu-op b { display: block; font-size: 15px; font-weight: 700; }
.menu-op small { display: block; font-size: 12.5px; color: var(--texto-3); }
.menu-ico { width: 40px; height: 40px; border-radius: 14px; flex: none; display: grid; place-items: center; background: var(--acento-suave); color: var(--acento-texto); }
.pregunta { margin-bottom: 16px; }
.pregunta > b { display: block; font-size: 14px; font-weight: 700; margin: 0 2px 8px; }
.chips-envolver { display: flex; flex-wrap: wrap; gap: 6px; }
.chips-envolver .chip { height: 34px; padding: 0 13px; }
.segmento.ancho { display: flex; width: 100%; }
.segmento.ancho button { flex: 1; padding: 0 6px; }

/* escalas 1-5 y 1-10 */
.escala5, .escala10 { display: grid; gap: 6px; }
.escala5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.escala10 { grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 4px; margin-top: 8px; }
.escala5 button, .escala10 button { height: 42px; border: 0; border-radius: 13px; background: var(--hundido); font-weight: 700; font-size: 15px; color: var(--texto-2); font-variant-numeric: tabular-nums; transition: transform .12s; padding: 0; }
.escala10 button { height: 38px; border-radius: 11px; font-size: 13.5px; }
.escala5 button:active, .escala10 button:active { transform: scale(.92); }
.escala5 button.activo, .escala10 button.activo { background: var(--acento); color: #fff; box-shadow: 0 8px 18px -10px var(--acento); }
.escala-pie { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--texto-3); font-weight: 600; margin: 5px 2px 0; }

/* ---------- Hoy: cosas de Alex ---------- */
.tarjeta-accion { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; color: var(--texto); padding: 14px 16px; }
.tarjeta-accion > div { flex: 1; min-width: 0; }
.tarjeta-accion b { display: block; font-size: 15px; font-weight: 700; }
.tarjeta-accion small { color: var(--texto-3); font-size: 12.5px; }
.tarjeta-accion > svg.i { color: var(--texto-3); }
.accion-ico { width: 42px; height: 42px; border-radius: 14px; flex: none; display: grid; place-items: center; background: var(--acento-suave); color: var(--acento-texto); }
.acciones-alex { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.acciones-alex .tarjeta { margin: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; padding: 14px; color: var(--texto); }
.acciones-alex svg.i { color: var(--acento-texto); margin-bottom: 6px; }
.acciones-alex b { font-size: 14.5px; }
.acciones-alex small { font-size: 12px; color: var(--texto-3); }
.respuesta-alex { border: 1px solid color-mix(in srgb, var(--acento) 30%, transparent); }
.respuesta-alex h2 { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.respuesta-alex h2 svg.i { color: var(--acento-texto); width: 18px; height: 18px; }
.resp-linea { padding: 8px 0; border-top: 1px solid var(--linea); }
.resp-linea small { font-size: 11.5px; color: var(--texto-3); font-weight: 600; }
.resp-linea p { margin: 2px 0 0; font-size: 14px; }
.renovacion { display: flex; gap: 12px; align-items: flex-start; background: linear-gradient(135deg, var(--morado-claro), var(--morado)); color: #fff; border: 0; }
.renovacion small { font-size: 12px; font-weight: 600; opacity: .85; }
.renovacion p { margin: 2px 0 0; font-size: 14.5px; font-weight: 600; white-space: pre-wrap; }
.renov-ico { width: 38px; height: 38px; border-radius: 13px; flex: none; display: grid; place-items: center; background: rgba(255, 255, 255, .18); }
.dos-botones { display: flex; gap: 8px; }
.dos-botones .boton { flex: 1; padding: 0 10px; }

/* peticiones */
.peticion { padding: 10px 0; border-bottom: 1px solid var(--linea); }
.peticion:last-of-type { border-bottom: 0; }
.pet-cab { display: flex; align-items: center; gap: 10px; }
.pet-cab > div { flex: 1; min-width: 0; }
.pet-cab { align-items: flex-start; }
.pet-cab b { display: block; font-size: 14px; font-weight: 700; line-height: 1.3; }
.pet-cab small { color: var(--texto-3); font-size: 12px; }
.pet-ico { width: 32px; height: 32px; border-radius: 11px; flex: none; display: grid; place-items: center; background: color-mix(in srgb, var(--azul) 14%, transparent); color: var(--azul); }
.pet-ico.molestia { background: color-mix(in srgb, var(--ambar) 16%, transparent); color: var(--ambar); }
.pet-ico svg.i { width: 17px; height: 17px; }
.pet-txt { margin: 6px 0 0 42px; font-size: 13px; color: var(--texto-2); }
.peticion .respuesta { margin-left: 42px; font-size: 13px; }
.peticion .etiqueta { flex: none; }

/* check-ins */
.ci-fila { padding: 11px 0; border-bottom: 1px solid var(--linea); }
.ci-fila:last-child { border-bottom: 0; }
.ci-cab { display: flex; justify-content: space-between; align-items: center; }
.ci-escalas { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.ci-escalas span { display: inline-flex; align-items: baseline; gap: 5px; padding: 5px 9px; border-radius: 10px; background: var(--hundido); font-size: 13px; }
.ci-escalas small { font-size: 11px; color: var(--texto-3); font-weight: 600; }
.ci-fila .respuesta { font-size: 13px; margin-top: 8px; }

/* resumen de la semana y plan */
.mini-dif { display: block; font-size: 11.5px; margin-top: 1px; }
.record .medalla.ok { background: color-mix(in srgb, var(--verde) 14%, transparent); color: var(--verde); }
.record .medalla svg.i { width: 16px; height: 16px; }
.plan-num { display: flex; align-items: baseline; gap: 8px; margin-top: 6px; }
.plan-num b { font-size: 40px; font-weight: 800; letter-spacing: -1.4px; line-height: 1; }
.plan-num span { color: var(--texto-3); font-weight: 600; font-size: 14px; }
.plan-fechas { display: flex; gap: 8px; margin-top: 12px; }
.plan-fechas span { flex: 1; min-width: 0; font-size: 13.5px; font-weight: 700; }
.plan-fechas small { display: block; font-size: 11px; color: var(--texto-3); font-weight: 600; }

/* ---------- récord al momento ---------- */
.festejo { position: fixed; z-index: 80; left: 50%; top: calc(var(--arriba) + 14px); transform: translate(-50%, -160%); width: min(calc(100% - 28px), 420px); transition: transform .45s cubic-bezier(.2, 1.3, .3, 1); pointer-events: none; }
.festejo.ver { transform: translate(-50%, 0); pointer-events: auto; }
.festejo-caja { position: relative; display: flex; align-items: center; gap: 12px; padding: 12px 16px 12px 12px; border-radius: 22px; color: #fff; background: linear-gradient(120deg, var(--morado-claro), var(--morado) 60%, var(--morado-osc)); box-shadow: 0 20px 40px -14px rgba(122, 13, 130, .8); }
.festejo-caja > div { min-width: 0; }
.festejo-caja b { display: block; font-size: 16px; font-weight: 800; letter-spacing: -.3px; }
.festejo-caja small { display: block; font-size: 12.5px; opacity: .9; line-height: 1.35; }
.festejo-ico { width: 44px; height: 44px; border-radius: 15px; flex: none; display: grid; place-items: center; background: rgba(255, 255, 255, .2); }
.festejo.ver .festejo-ico { animation: brillo .9s ease-out .25s; }
.festejo-caja i { position: absolute; left: 34px; top: 50%; width: 6px; height: 6px; border-radius: 2px; background: #FFD66B; opacity: 0; }
.festejo-caja i:nth-of-type(even) { background: #fff; }
.festejo.ver .festejo-caja i { animation: chispa .9s ease-out forwards; animation-delay: calc(.3s + var(--d)); }
@keyframes brillo { 30% { transform: scale(1.18) rotate(-8deg); } 60% { transform: scale(.96) rotate(4deg); } }
@keyframes chispa { 0% { opacity: 1; transform: rotate(var(--a)) translateX(0); } 100% { opacity: 0; transform: rotate(var(--a)) translateX(46px); } }

/* ---------- calculadora de discos ---------- */
.calc-kg { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 2px 0 14px; }
.calc-kg .icono-btn { width: 46px; height: 46px; font-size: 22px; font-weight: 600; color: var(--texto); }
.calc-kg label { text-align: center; }
.calc-kg input { width: 150px; border: 0; background: none; text-align: center; font-size: 42px; font-weight: 800; letter-spacing: -1.4px; outline: none; font-variant-numeric: tabular-nums; padding: 0; }
.calc-kg span { display: block; font-size: 12px; color: var(--texto-3); font-weight: 600; }
.barra-dib { position: relative; height: 104px; margin: 18px 0 6px; display: flex; align-items: center; justify-content: center; gap: 2px; }
.barra-eje { position: absolute; left: 4px; right: 4px; top: 50%; height: 10px; margin-top: -5px; border-radius: 5px; background: linear-gradient(#D5D2DC, #8F8B99); }
.tope { position: relative; width: 10px; height: 34px; border-radius: 3px; background: #6F6B79; margin-right: 2px; }
.discos-lado { position: relative; display: flex; align-items: center; gap: 2px; min-width: 40%; }
.disco { flex: none; border-radius: 5px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .14), 0 3px 8px rgba(0, 0, 0, .18); }
.calc-por-lado { text-align: center; margin-top: 6px; }
.calc-por-lado small { display: block; font-size: 12px; color: var(--texto-3); font-weight: 600; }
.calc-por-lado b { font-size: 20px; font-weight: 800; letter-spacing: -.4px; }

/* ---------- dieta: comidas hechas ---------- */
.comidas-hoy { display: flex; align-items: center; gap: 14px; }
.comidas-hoy > div > b { display: block; font-size: 15px; }
.anillo { width: 66px; height: 66px; flex: none; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--acento) calc(var(--p) * 1%), var(--hundido) 0); position: relative; }
.anillo::before { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: var(--tarjeta-solida); }
.anillo b { position: relative; font-size: 18px; font-weight: 800; letter-spacing: -.5px; }
.anillo em { font-style: normal; font-size: 12px; color: var(--texto-3); font-weight: 600; }
.dias-comidas { display: flex; gap: 6px; margin-top: 8px; }
.dias-comidas span { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.dias-comidas i { width: 18px; height: 18px; border-radius: 6px; background: color-mix(in srgb, var(--acento) calc(var(--v) * 100%), var(--hundido)); }
.dias-comidas small { font-size: 10px; font-weight: 600; color: var(--texto-3); }
.dias-comidas .hoy small { color: var(--acento-texto); }
.comida-der { display: flex; align-items: center; gap: 8px; }
.check-comida { width: 34px; height: 34px; border-radius: 11px; border: 0; background: var(--hundido); color: var(--texto-3); display: grid; place-items: center; transition: transform .12s, background .2s; }
.check-comida svg.i { width: 17px; height: 17px; stroke-width: 2.6; }
.check-comida:active { transform: scale(.9); }
.comida.hecha .check-comida { background: var(--verde); color: #fff; }
.comida.hecha { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--verde) 45%, transparent), var(--tarjeta-sombra); }

/* ---------- comparador de fotos ---------- */
.comp-lado { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.comp-foto { position: relative; border: 0; padding: 0; border-radius: 16px; overflow: hidden; aspect-ratio: 3 / 4; background: var(--hundido); box-shadow: inset 0 0 0 2px transparent; }
.comp-foto img { width: 100%; height: 100%; object-fit: cover; display: block; }
.comp-foto span { position: absolute; left: 8px; bottom: 8px; padding: 4px 9px; border-radius: 999px; background: rgba(10, 10, 13, .62); color: #fff; font-size: 11.5px; font-weight: 700; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.comp-foto.sel { outline: 3px solid var(--acento); outline-offset: -3px; }
.comp-desliza { position: relative; aspect-ratio: 3 / 4; border-radius: 18px; overflow: hidden; background: #000; }
.comp-desliza img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.comp-desliza img.arriba { clip-path: inset(0 calc(100% - var(--corte)) 0 0); }
.comp-desliza .linea { position: absolute; top: 0; bottom: 0; left: var(--corte); width: 2px; margin-left: -1px; background: #fff; box-shadow: 0 0 8px rgba(0, 0, 0, .5); pointer-events: none; }
.comp-desliza .linea::after { content: ""; position: absolute; top: 50%; left: 50%; width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%; background: #fff; box-shadow: 0 4px 12px rgba(0, 0, 0, .35); }
.comp-desliza .et { position: absolute; bottom: 10px; padding: 4px 9px; border-radius: 999px; background: rgba(10, 10, 13, .62); color: #fff; font-size: 11.5px; font-weight: 700; pointer-events: none; }
.comp-desliza .et.iz { left: 10px; } .comp-desliza .et.de { right: 10px; }
.comp-desliza input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; margin: 0; cursor: ew-resize; touch-action: pan-y; }
.comp-tira { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 2px 16px 6px; }
.comp-tira::-webkit-scrollbar { display: none; }
.comp-tira button { flex: none; width: 74px; border: 0; padding: 0; background: none; text-align: center; }
.comp-tira img { width: 74px; height: 98px; object-fit: cover; border-radius: 12px; display: block; box-shadow: inset 0 0 0 1px var(--linea); }
.comp-tira small { font-size: 11px; color: var(--texto-3); font-weight: 600; }
.comp-tira .es-a img { outline: 3px solid var(--texto-3); outline-offset: -3px; }
.comp-tira .es-b img { outline: 3px solid var(--acento); outline-offset: -3px; }

/* fuera de casa */
.pet-ico.fallo { background: color-mix(in srgb, var(--rojo, #E5484D) 14%, transparent); color: var(--rojo, #E5484D); }
.pet-ico.sugerencia { background: color-mix(in srgb, var(--acento, #B3159F) 14%, transparent); color: var(--acento, #B3159F); }
.pet-ico.fuera { background: color-mix(in srgb, var(--verde) 14%, transparent); color: var(--verde); }
.fuera-aviso { display: flex; gap: 12px; align-items: center; padding: 14px 16px; }
.fuera-aviso b { display: block; font-size: 14px; }
.fuera-aviso small { display: block; font-size: 12.5px; color: var(--texto-3); margin-top: 2px; line-height: 1.35; }
.acciones-alex { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.acciones-alex .tarjeta { padding: 13px 12px; }
.acciones-alex b { font-size: 13.5px; line-height: 1.2; }
.fechas-dos { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fechas-dos .campo { min-width: 0; }
.fechas-dos .entrada { width: 100%; min-width: 0; padding-left: 10px; padding-right: 6px; }

/* medidas */
.medidas-rejilla { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.medidas-rejilla .medida { margin: 0; text-align: left; color: var(--texto); padding: 13px 14px; display: flex; flex-direction: column; gap: 2px; }
.medida small { font-size: 12px; color: var(--texto-3); font-weight: 600; }
.medida b { font-size: 21px; font-weight: 800; letter-spacing: -.5px; font-variant-numeric: tabular-nums; }
.medida b em { font-style: normal; font-size: 12px; color: var(--texto-3); font-weight: 600; margin-left: 2px; }
.medida .sub { font-size: 11.5px; }
.medida.activo { box-shadow: inset 0 0 0 2px var(--acento); }
.medida-campo span small { display: block; font-weight: 500; color: var(--texto-3); font-size: 11.5px; margin-top: 1px; }
.centro-blq { display: block; margin: 4px auto 10px; }

/* icono de la app */
.ajuste-icono { flex-wrap: wrap; }
.iconos-elegir { display: flex; gap: 10px; }
.iconos-elegir button { border: 0; background: none; padding: 0; display: flex; flex-direction: column; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 700; color: var(--texto-3); }
.iconos-elegir img { width: 54px; height: 54px; border-radius: 14px; box-shadow: 0 0 0 1px var(--linea); transition: box-shadow .15s, transform .15s; }
.iconos-elegir button.activo { color: var(--texto); }
.iconos-elegir button.activo img { box-shadow: 0 0 0 2px var(--tarjeta-solida), 0 0 0 4px var(--acento); }
.iconos-elegir button:active img { transform: scale(.94); }

/* foto de Alex en sus mensajes */
.av-alex { width: 18px; height: 18px; border-radius: 50%; object-fit: cover; flex: none; vertical-align: middle; margin: -3px 5px 0 0; box-shadow: 0 0 0 1.5px var(--tarjeta-solida); }
.firma-alex { white-space: nowrap; }
.respuesta-alex h2 .av-alex.cab { width: 26px; height: 26px; margin-right: 2px; box-shadow: 0 0 0 2px color-mix(in srgb, var(--acento) 45%, transparent); }
.renov-ico.foto { padding: 0; overflow: hidden; border-radius: 50%; box-shadow: 0 0 0 2px rgba(255, 255, 255, .55); }
.renov-ico.foto .av-alex { width: 100%; height: 100%; margin: 0; box-shadow: none; }

/* el degradado de las tarjetas (destacada, renovación, cabecera del entreno…) cubre también su borde */
.tarjeta[class] { background-origin: border-box; }
