/* Mi Rutina — estilos (primero celular). Paleta C de Guille (12/11): fondo petróleo, superficies petróleo claro, acento lima
   (el mismo del músculo que trabaja en los videos) con texto casi negro encima; gris cálido para el texto. */
:root {
  --bg: #0F2E2A; --sup: #16403A; --sup2: #1B4A43; --sup3: #22564E; --linea: #24524A; --linea2: #2F6359;
  --tinta: #F1EFEB; --tinta2: #D6D3CE; --gris: #9FB5B0;
  --acento: #C6F432; --acento2: #D4F86A; --acento-s: rgba(198, 244, 50, .14); --sobre-acento: #0B0F0E; --acento-claro: #E6FBA6;
  --ok: #35D07F; --ok-s: rgba(53, 208, 127, .14); --amarillo: #F5B740; --mal: #FF5568; --mal-s: rgba(255, 85, 104, .13);
  --wa: #25D366; --video: #0F2E2A;
  --radio: 16px; --sombra: 0 10px 30px rgba(0, 0, 0, .35);
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --nav: 62px; --top: env(safe-area-inset-top, 0px); --bot: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--tinta); font: 400 16px/1.45 var(--sans); overscroll-behavior-y: none; }
body.con-modal { overflow: hidden; }
a { color: inherit; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
img, video { max-width: 100%; display: block; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -.02em; }
.oculto { display: none !important; }
.cargando { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; }
.cargando img { border-radius: 14px; animation: latido 1.1s ease-in-out infinite; }
@keyframes latido { 50% { opacity: .5; transform: scale(.95); } }
:focus-visible { outline: 2px solid var(--acento2); outline-offset: 2px; }

/* ---------- Estructura ---------- */
.app { min-height: 100vh; min-height: 100dvh; padding-bottom: calc(var(--nav) + var(--bot) + 16px); }
.app.sin-nav { padding-bottom: calc(var(--bot) + 24px); }
.app.con-pie { padding-bottom: calc(var(--bot) + 96px); }
.barra { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 6px; min-height: 56px; padding: calc(8px + var(--top)) 10px 8px; background: rgba(15, 46, 42, .88); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--linea); }
.barra .marca { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 19px; letter-spacing: -.02em; padding-left: 6px; }
.barra .marca img { border-radius: 8px; }
.barra .titulo { flex: 1; min-width: 0; font-size: 17px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.barra .titulo.sec { text-align: right; padding-right: 8px; font-size: 14px; font-weight: 600; color: var(--gris); letter-spacing: 0; }
.cinta { background: var(--amarillo); color: #1A1200; font-size: 12px; font-weight: 700; text-align: center; padding: 5px 12px; letter-spacing: .02em; }
.cont { max-width: 620px; margin: 0 auto; padding: 16px; }
.btn-ico { width: 42px; height: 42px; flex: none; display: inline-grid; place-items: center; border: 0; border-radius: 12px; background: transparent; color: var(--tinta2); text-decoration: none; }
.btn-ico:active { background: var(--sup2); }
.btn-ico:disabled { opacity: .25; }
.ico, .btn-ico svg { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: repeat(4, 1fr); padding-bottom: var(--bot); background: rgba(16, 21, 28, .94); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--linea); }
.nav a { height: var(--nav); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--gris); text-decoration: none; font-size: 11.5px; font-weight: 600; }
.nav a.activo { color: var(--acento2); }
.pie-fijo { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; gap: 10px; padding: 12px 16px calc(12px + var(--bot)); background: linear-gradient(to top, var(--bg) 62%, rgba(12, 16, 22, 0)); }
.pie-fijo > * { flex: 1 1 auto; min-width: 0; max-width: 620px; margin: 0 auto; }
.pie-fijo > .boton { white-space: nowrap; padding: 0 12px; }

/* ---------- Piezas ---------- */
.boton { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 16px; border-radius: 14px; border: 1px solid var(--linea2); background: var(--sup2); color: var(--tinta); font-weight: 650; font-size: 15px; text-decoration: none; text-align: center; line-height: 1.15; }
.boton .ico { width: 19px; height: 19px; }
.boton.prim { background: var(--acento); border-color: var(--acento); color: var(--sobre-acento); }
.boton.wa { background: var(--wa); border-color: var(--wa); color: #062B14; }
.boton.peligro { background: var(--mal); border-color: var(--mal); color: #2A0308; }
.boton.texto-peligro { background: transparent; border-color: transparent; color: var(--mal); }
.boton.punteado { background: transparent; border-style: dashed; color: var(--acento2); min-height: 56px; }
.boton.ancho { width: 100%; }
.boton.grande { min-height: 56px; font-size: 16.5px; border-radius: 16px; }
.boton.chico { min-height: 38px; padding: 0 11px; gap: 6px; font-size: 13.5px; border-radius: 11px; white-space: nowrap; }
.boton.chico .ico { width: 16px; height: 16px; }
.boton:disabled { opacity: .5; }
.boton:active { transform: translateY(1px); filter: brightness(.94); }
.fila-botones { display: flex; gap: 10px; flex-wrap: wrap; margin: 10px 0 12px; }
.fila-botones > * { flex: 1 1 140px; }
.cont > .boton.ancho, form > .boton.ancho, .hoja-c > .boton.ancho { margin-top: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips.fila { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px 10px; padding: 0 16px 2px; scrollbar-width: none; }
.chips.fila::-webkit-scrollbar { display: none; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--linea2); background: var(--sup); color: var(--tinta2); font-size: 14px; font-weight: 600; white-space: nowrap; flex: none; }
.chip .ico { width: 15px; height: 15px; display: none; }
.chip.activo { background: var(--acento-s); border-color: var(--acento); color: var(--acento-claro); }
.chip.activo .ico { display: block; }
.chip.fijo { min-height: 28px; padding: 0 10px; font-size: 12.5px; background: var(--sup2); border-color: transparent; }
.campo { display: block; margin: 0 0 14px; }
.campo > span { display: block; font-size: 13px; font-weight: 650; color: var(--tinta2); margin-bottom: 6px; }
.campo input { width: 100%; min-height: 50px; padding: 0 14px; border-radius: 13px; border: 1px solid var(--linea2); background: var(--bg); font-size: 16px; }
.campo small { display: block; margin-top: 6px; font-size: 12.5px; color: var(--gris); }
input::placeholder { color: #5E6A7A; }
input:focus, select:focus { outline: 2px solid var(--acento); outline-offset: 0; border-color: transparent; }
.seccion { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 22px 0 10px; }
.seccion h2, h2.sub, h3.sub { font-size: 12.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--gris); }
h3.sub, h2.sub { margin: 20px 0 9px; }
h3.sub.ok { color: var(--ok); }
h3.sub.mal { color: var(--mal); }
.num { color: var(--acento2); font-variant-numeric: tabular-nums; }
.tarj { background: var(--sup); border: 1px solid var(--linea); border-radius: var(--radio); margin-bottom: 12px; }
.tarj.pad { padding: 16px; }
.tarj.pad > h2.sub:first-child { margin-top: 0; }
.aviso { font-size: 13px; color: var(--gris); }
.aviso.centro { text-align: center; margin: 18px 0; }
.texto { color: var(--tinta2); margin-bottom: 14px; }
.error-msg { color: var(--mal); font-size: 14px; min-height: 0; margin: 0 0 8px; }
.error-msg:empty { display: none; }
.vacio { text-align: center; color: var(--gris); padding: 30px 16px; font-size: 15px; }
.vacio.corto { padding: 14px 8px; font-size: 14px; }
.vacio.pantalla { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; }
.vacio.pantalla h1 { color: var(--tinta); font-size: 22px; }
.toast { position: fixed; left: 50%; bottom: calc(var(--bot) + 104px); transform: translateX(-50%); z-index: 80; max-width: calc(100% - 32px); width: max-content; padding: 11px 16px; border-radius: 13px; background: var(--tinta); color: var(--sobre-acento); font-size: 14.5px; font-weight: 600; box-shadow: var(--sombra); animation: sube .18s ease-out; }
@keyframes sube { from { opacity: 0; transform: translate(-50%, 8px); } }

/* ---------- Hojas (ventanas desde abajo) ---------- */
.modal { position: fixed; inset: 0; z-index: 60; display: flex; align-items: flex-end; justify-content: center; background: rgba(4, 6, 9, .66); animation: aparece .15s ease-out; }
.hoja { width: 100%; max-width: 620px; max-height: 92dvh; display: flex; flex-direction: column; background: var(--sup); border-radius: 22px 22px 0 0; border: 1px solid var(--linea); border-bottom: 0; animation: desliza .22s cubic-bezier(.2, .8, .2, 1); }
.modal.alta .hoja { height: 94dvh; }
.modal.alta .hoja-c { display: flex; flex-direction: column; }
.sel-cuerpo { flex: 1 0 auto; }
.hoja > header { display: flex; align-items: center; gap: 8px; padding: 12px 8px 8px 18px; }
.hoja > header h2 { flex: 1; font-size: 18px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hoja-c { overflow-y: auto; padding: 6px 18px calc(18px + var(--bot)); overscroll-behavior: contain; flex: 1; }
@keyframes aparece { from { opacity: 0; } }
@keyframes desliza { from { transform: translateY(40px); opacity: .4; } }
.menu { display: grid; gap: 2px; }
.menu button { display: flex; align-items: center; gap: 14px; min-height: 54px; padding: 0 10px; border: 0; border-radius: 12px; background: transparent; font-size: 16px; font-weight: 600; text-align: left; }
.menu button:active { background: var(--sup2); }
.texto-peligro { color: var(--mal); }
.barra-fija { position: sticky; bottom: calc(-18px - var(--bot)); margin: 0 -18px calc(-18px - var(--bot)); padding: 12px 18px calc(14px + var(--bot)); background: linear-gradient(to top, var(--sup) 70%, rgba(20, 26, 34, 0)); }

/* ---------- Inicio y alumnos ---------- */
.hero { padding: 18px 2px 0; }
.hero h2 { font-size: 34px; font-weight: 850; line-height: 1.04; letter-spacing: -.035em; text-wrap: balance; }
.hero > .boton + .boton { margin-top: 10px; }
.hero > p { color: var(--tinta2); margin: 14px 0 20px; font-size: 16.5px; }
.pasos { list-style: none; margin: 0 0 22px; padding: 0; display: grid; gap: 10px; }
.pasos li { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--sup); border: 1px solid var(--linea); border-radius: 14px; font-weight: 600; font-size: 15px; }
.pasos b { flex: none; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: var(--acento-s); color: var(--acento2); font-size: 14px; }
.lista { display: grid; gap: 8px; }
.fila-al { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px; background: var(--sup); border: 1px solid var(--linea); border-radius: var(--radio); text-decoration: none; text-align: left; }
.fila-al:active { background: var(--sup2); }
.fila-al > .ico { color: var(--gris); }
.fila-t { flex: 1; min-width: 0; display: grid; gap: 2px; }
.fila-t b { font-size: 16px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fila-t small { color: var(--gris); font-size: 13px; }
.avatar { flex: none; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; background: linear-gradient(140deg, #2B3646, #1B232E); color: var(--tinta); font-weight: 800; font-size: 15px; letter-spacing: .02em; }
.avatar.g { width: 58px; height: 58px; font-size: 20px; background: linear-gradient(140deg, var(--acento2), var(--acento)); color: var(--sobre-acento); }
.cab-al { display: flex; align-items: center; gap: 14px; margin: 4px 0 16px; }
.cab-al h2 { font-size: 24px; font-weight: 800; }
.cab-al p { color: var(--gris); font-size: 14px; margin-top: 3px; }
.rut-c { display: block; padding: 14px 16px 10px; text-decoration: none; }
.rut-c h3 { font-size: 17px; font-weight: 750; }
.rut-c p { color: var(--gris); font-size: 13.5px; margin-top: 4px; }
.rut-b { display: flex; align-items: center; gap: 8px; padding: 0 10px 10px 12px; }
.rut-b .btn-ico { margin-left: auto; }
.rut-b .boton:first-child { flex: 1; }
.como { margin-top: 22px; border: 1px solid var(--linea); border-radius: 14px; padding: 0 14px; background: var(--sup); }
.como summary { padding: 13px 0; font-weight: 650; font-size: 14.5px; color: var(--tinta2); cursor: pointer; }
.como ul { margin: 0 0 14px; padding-left: 18px; color: var(--gris); font-size: 13.5px; display: grid; gap: 7px; }

/* ---------- Loops y biblioteca ---------- */
.loop { position: relative; aspect-ratio: 1; overflow: hidden; background: var(--video); border-radius: 14px; }
.loop img, .loop video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.loop video { opacity: 0; transition: opacity .2s; }
.loop.andando video { opacity: 1; }
.loop.sin { display: grid; place-items: center; background: repeating-linear-gradient(135deg, #131A22 0 12px, #161E28 12px 24px); }
.loop.sin > span { display: grid; justify-items: center; gap: 6px; color: var(--gris); font-size: 12px; font-weight: 600; text-align: center; padding: 8px; }
.loop.sin .ico { width: 30px; height: 30px; opacity: .7; }
.loop.tocar::after { content: ""; position: absolute; inset: 0; margin: auto; width: 54px; height: 54px; border-radius: 50%; background: rgba(12, 16, 22, .7) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23fff'%3E%3Cpath d='M9 6.5v11l9-5.5z'/%3E%3C/svg%3E") center / 26px no-repeat; }
.loop.tecnica video { opacity: 1; object-fit: contain; }
.buscador { display: flex; align-items: center; gap: 10px; min-height: 50px; padding: 0 14px; margin-bottom: 12px; border-radius: 14px; border: 1px solid var(--linea2); background: var(--sup); color: var(--gris); }
.buscador input { flex: 1; min-width: 0; height: 48px; border: 0; background: transparent; color: var(--tinta); font-size: 16px; outline: 0; }
.buscador:focus-within { border-color: var(--acento); }
.bib .cuenta { margin: 4px 0 10px; }
.grilla { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 560px) { .grilla { grid-template-columns: repeat(3, 1fr); } }
.tarj-ej { position: relative; background: var(--sup); border: 1px solid var(--linea); border-radius: var(--radio); overflow: hidden; cursor: pointer; }
.tarj-ej .loop { border-radius: 0; }
.tarj-pie { padding: 10px 11px 12px; }
.tarj-pie h3 { font-size: 14.5px; font-weight: 700; letter-spacing: -.01em; line-height: 1.2; }
.tarj-pie p { font-size: 12px; color: var(--gris); margin-top: 4px; }
.tarj-pie .pers { display: flex; gap: 6px; margin-top: 8px; }
.tarj-pie .pers .chip { min-height: 26px; padding: 0 9px; font-size: 12px; }
.tarj-pie .pers .chip.activo { background: var(--acento-s); border-color: var(--acento); color: var(--acento-claro); }
.tarj-ej.elegido { border-color: var(--acento); box-shadow: 0 0 0 2px var(--acento) inset; }
.marca-sel { position: absolute; top: 8px; left: 8px; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: rgba(12, 16, 22, .6); border: 2px solid rgba(255, 255, 255, .7); color: transparent; z-index: 2; }
.marca-sel .ico { width: 16px; height: 16px; stroke-width: 3; }
.elegido .marca-sel { background: var(--acento); border-color: var(--acento); color: var(--sobre-acento); }
.tarj-ej .info { position: absolute; top: 4px; right: 4px; z-index: 2; color: #fff; background: rgba(15, 46, 42, .55); width: 36px; height: 36px; border-radius: 50%; }

/* ---------- Ficha ---------- */
.ficha .loop { max-width: 420px; margin: 0 auto 12px; }
.segmento { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin-bottom: 12px; background: var(--bg); border-radius: 13px; }
.segmento button { min-height: 38px; border: 0; border-radius: 10px; background: transparent; color: var(--gris); font-weight: 650; font-size: 14px; }
.segmento .activo { background: var(--sup3); color: var(--tinta); }
.ficha .aviso { margin-top: 10px; }
.puntos { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.puntos li { display: flex; gap: 10px; align-items: flex-start; padding: 11px 12px; border-radius: 12px; font-size: 15px; font-weight: 550; }
.puntos .ico { width: 18px; height: 18px; margin-top: 2px; stroke-width: 3; }
.puntos.ok li { background: var(--ok-s); }
.puntos.ok .ico { color: var(--ok); }
.puntos.mal li { background: var(--mal-s); }
.puntos.mal .ico { color: var(--mal); }

/* ---------- Armador ---------- */
.estado-g { font-size: 12px; font-weight: 600; color: var(--gris); padding: 0 4px; white-space: nowrap; }
.estado-g.ok { color: var(--ok); }
.nombre-rut { width: 100%; border: 0; border-bottom: 1px solid transparent; background: transparent; padding: 2px 0 4px; font-size: 26px; font-weight: 850; letter-spacing: -.03em; border-radius: 0; }
.nombre-rut:focus { outline: 0; border-bottom-color: var(--acento); }
.para { margin: 2px 0 14px; }
.dias { display: flex; gap: 8px; overflow-x: auto; margin: 0 -16px; padding: 2px 16px 4px; scrollbar-width: none; }
.dias::-webkit-scrollbar { display: none; }
.dia { flex: none; min-width: 58px; height: 58px; display: grid; place-items: center; align-content: center; gap: 1px; border-radius: 16px; border: 1px solid var(--linea2); background: var(--sup); color: var(--tinta2); }
.dia b { font-size: 20px; font-weight: 850; line-height: 1; }
.dia small { font-size: 10.5px; font-weight: 700; color: var(--gris); text-transform: uppercase; letter-spacing: .04em; }
.dia.activo { background: var(--acento); border-color: var(--acento); color: var(--sobre-acento); }
.dia.activo small { color: rgba(255, 255, 255, .85); }
.dia.mas { border-style: dashed; color: var(--gris); background: transparent; }
.dia-cab { display: flex; align-items: center; gap: 4px; margin: 12px 0 10px; }
.nombre-dia { flex: 1; min-width: 0; min-height: 44px; border: 1px solid var(--linea); border-radius: 12px; background: var(--sup); padding: 0 12px; font-size: 15px; font-weight: 600; }
.item { background: var(--sup); border: 1px solid var(--linea); border-radius: var(--radio); padding: 10px; margin-bottom: 10px; }
.item-cab { display: flex; align-items: center; gap: 10px; }
.mini { flex: none; width: 56px; height: 56px; padding: 0; border: 0; border-radius: 12px; overflow: hidden; background: var(--video); color: var(--gris); display: grid; place-items: center; }
.mini img { width: 100%; height: 100%; object-fit: cover; }
.item-t { flex: 1; min-width: 0; }
.item-t h3 { font-size: 15.5px; font-weight: 750; line-height: 1.2; letter-spacing: -.01em; }
.item-t p { font-size: 12.5px; color: var(--gris); margin-top: 3px; }
.item-ord { display: flex; flex: none; }
.item-ord .btn-ico { width: 34px; height: 40px; }
.item-ord .btn-ico svg { width: 19px; height: 19px; }
.dosis-ed { display: grid; grid-template-columns: 1.25fr 1fr 1.1fr .9fr; gap: 7px; margin-top: 10px; }
.cmp { display: grid; gap: 4px; min-width: 0; }
.cmp > span { font-size: 10.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--gris); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmp input, .cmp select, .paso { width: 100%; height: 44px; border-radius: 11px; border: 1px solid var(--linea2); background: var(--bg); font-size: 15.5px; font-weight: 700; text-align: center; padding: 0 4px; min-width: 0; }
.cmp select { appearance: none; -webkit-appearance: none; text-align-last: center; }
.paso { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 0; overflow: hidden; }
.paso button { height: 100%; border: 0; background: transparent; font-size: 20px; font-weight: 600; color: var(--acento2); }
.paso button:active { background: var(--sup2); }
.paso output { font-variant-numeric: tabular-nums; min-width: 16px; }
.nota-ed { width: 100%; min-height: 42px; margin-top: 8px; padding: 0 12px; border-radius: 11px; border: 1px solid var(--linea); background: transparent; font-size: 14.5px; }

/* ---------- Enviar ---------- */
.burbuja { position: relative; margin: 0 0 16px auto; max-width: 92%; padding: 10px 12px 18px; border-radius: 14px 14px 4px 14px; background: #075E54; color: #E9FFF6; font-size: 14.5px; overflow-wrap: anywhere; }
.burbuja .link { color: #8FD3FF; text-decoration: underline; }
.burbuja .hora { position: absolute; right: 9px; bottom: 3px; color: #8FE3C0; }
.burbuja .hora .ico { width: 15px; height: 15px; }

/* ---------- Vista del alumno ---------- */
.alu { max-width: 620px; margin: 0 auto; padding-bottom: calc(var(--bot) + 104px); }
.alu-cab { padding: calc(18px + var(--top)) 16px 0; }
.alu-fija { position: sticky; top: 0; z-index: 20; padding: calc(8px + var(--top)) 16px 10px; background: var(--bg); }
.alu-fija::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 14px; background: linear-gradient(to bottom, var(--bg), rgba(12, 16, 22, 0)); pointer-events: none; }
.avance-fila { display: flex; align-items: center; gap: 12px; }
.avance-fila .avance { flex: 1; }
.alu-de { font-size: 13px; color: var(--gris); font-weight: 600; }
.kicker { margin-top: 14px; font-size: 13px; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; color: var(--acento2); }
.alu-cab h1 { font-size: 46px; font-weight: 900; letter-spacing: -.04em; line-height: 1; margin: 2px 0 6px; }
.alu-cab h1 small { font-size: 17px; font-weight: 650; color: var(--tinta2); letter-spacing: -.01em; margin-left: 4px; }
.alu-fija .dias { margin-bottom: 10px; }
.alu-fija .dia { min-width: 62px; height: 46px; border-radius: 14px; }
.alu-fija .dia b { font-size: 18px; }
.alu-fija .dia small { font-size: 9.5px; color: var(--acento2); }
.alu-fija .dia.activo small { color: var(--sobre-acento); }
.avance { height: 6px; border-radius: 99px; background: var(--sup2); overflow: hidden; }
.avance i { display: block; height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, var(--acento2), var(--acento)); transition: width .35s ease; }
.avance-t { font-size: 12.5px; white-space: nowrap; font-weight: 650; color: var(--gris); font-variant-numeric: tabular-nums; }
.alu-lista { padding: 8px 16px 0; display: grid; gap: 16px; }
.ej { background: var(--sup); border: 1px solid var(--linea); border-radius: 20px; overflow: hidden; }
.ej .loop { border-radius: 0; }
.orden { position: absolute; top: 12px; left: 12px; z-index: 2; padding: 4px 10px; border-radius: 99px; background: rgba(12, 16, 22, .62); font-size: 12.5px; font-weight: 750; font-variant-numeric: tabular-nums; backdrop-filter: blur(6px); }
.tec { position: absolute; right: 12px; bottom: 12px; z-index: 2; display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 13px; border: 1px solid rgba(255, 255, 255, .22); border-radius: 99px; background: rgba(12, 16, 22, .62); color: #fff; font-size: 13.5px; font-weight: 700; backdrop-filter: blur(6px); }
.tec .ico { width: 17px; height: 17px; color: var(--ok); }
.ej-c { padding: 14px 16px 16px; }
.ej-c h2 { font-size: 21px; font-weight: 800; }
.dosis { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 8px; color: var(--gris); font-size: 13.5px; }
.dosis b { color: var(--tinta); font-size: 17px; font-weight: 800; font-variant-numeric: tabular-nums; margin-right: 2px; }
.ej .nota { margin-top: 12px; padding: 10px 12px; border-left: 3px solid var(--acento); border-radius: 4px 12px 12px 4px; background: var(--acento-s); font-size: 14.5px; color: var(--acento-claro); }
.series { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.serie { flex: 1 1 62px; max-width: 92px; display: grid; gap: 6px; }
.tilde { position: relative; height: 54px; border-radius: 15px; border: 1.5px solid var(--linea2); background: var(--bg); display: grid; place-items: center; font-size: 19px; font-weight: 800; color: var(--tinta2); transition: transform .12s, background .15s; }
.tilde .ico { display: none; width: 26px; height: 26px; stroke-width: 3; }
.tilde:active { transform: scale(.94); }
.serie.hecha .tilde { background: var(--acento); border-color: var(--acento); color: var(--sobre-acento); }
.serie.hecha .tilde span { display: none; }
.serie.hecha .tilde .ico { display: block; }
.serie input { width: 100%; height: 36px; border-radius: 10px; border: 1px solid var(--linea); background: transparent; text-align: center; font-size: 14.5px; font-weight: 650; padding: 0 2px; }
.sen { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-top: 14px; padding-top: 13px; border-top: 1px solid var(--linea); }
.sen > span { font-size: 12.5px; color: var(--gris); font-weight: 600; margin-right: 2px; flex: 1 0 100%; }
.sen .chip { min-height: 34px; font-size: 13.5px; }
.sen .chip.facil.activo { background: var(--ok-s); border-color: var(--ok); color: #BFF5D8; }
.sen .chip.costo.activo { background: rgba(245, 183, 64, .14); border-color: var(--amarillo); color: #FFE6AE; }
.sen .chip.dolio.activo { background: var(--mal-s); border-color: var(--mal); color: #FFCCD3; }
.alerta { margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: var(--mal-s); color: #FFCCD3; font-size: 13.5px; font-weight: 600; }
.descanso { position: fixed; left: 50%; bottom: calc(var(--bot) + 86px); transform: translateX(-50%); z-index: 40; display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 18px; border-radius: 99px; background: var(--tinta); color: var(--sobre-acento); box-shadow: var(--sombra); white-space: nowrap; }
.descanso .d-t { font-size: 13.5px; font-weight: 700; }
.descanso .d-n { font-size: 22px; font-weight: 850; font-variant-numeric: tabular-nums; min-width: 52px; text-align: center; }
.descanso button { min-height: 38px; padding: 0 14px; border: 0; border-radius: 99px; background: var(--bg); color: #fff; font-size: 13.5px; font-weight: 700; }
.descanso.listo { background: var(--ok); }
.descanso.listo .d-n, .descanso.listo button { display: none; }
.descanso.listo { padding: 14px 20px; }
.fin { text-align: center; padding: 6px 0 4px; }
.fin-ico { width: 76px; height: 76px; margin: 0 auto 14px; display: grid; place-items: center; border-radius: 50%; background: var(--acento); color: var(--sobre-acento); }
.fin-ico .ico { width: 40px; height: 40px; stroke-width: 3; }
.fin-n { font-size: 16px; color: var(--tinta2); margin-bottom: 8px; }
.fin-n b { font-size: 34px; font-weight: 900; color: var(--tinta); letter-spacing: -.03em; margin-right: 4px; }
.fin .boton { margin-top: 10px; }

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ====================== Versión con servidor: entrada, accesos, progreso, marca ====================== */

/* ---------- Entrada del profe ---------- */
.entrada { max-width: 520px; margin: 0 auto; min-height: 100dvh; padding: calc(28px + var(--top)) 20px calc(24px + var(--bot)); display: flex; flex-direction: column; }
.marca.grande { display: flex; align-items: center; gap: 12px; font-size: 24px; font-weight: 850; letter-spacing: -.03em; }
.marca.grande img { border-radius: 12px; }
.entrada h1 { font-size: 36px; font-weight: 900; line-height: 1.03; letter-spacing: -.04em; margin: 28px 0 12px; text-wrap: balance; }
.entrada > .sub { color: var(--tinta2); font-size: 16.5px; margin-bottom: 20px; }
.ventajas { list-style: none; margin: 0 0 24px; padding: 0; display: grid; gap: 10px; }
.ventajas li { display: flex; align-items: center; gap: 12px; font-size: 15px; font-weight: 600; color: var(--tinta2); }
.ventajas .ico { flex: none; width: 38px; height: 38px; padding: 9px; border-radius: 12px; background: var(--acento-s); color: var(--acento2); }
.entrada form { margin-top: auto; padding: 18px 16px 16px; background: var(--sup); border: 1px solid var(--linea); border-radius: 20px; }
.entrada form .boton + .boton { margin-top: 10px; }

/* ---------- Lista de alumnos con su estado ---------- */
.saludo { margin: 4px 0 2px; }
.saludo h2 { font-size: 28px; font-weight: 850; }
.saludo p { color: var(--gris); font-size: 14.5px; margin-top: 4px; }
.fila-al.al { align-items: center; padding: 13px 12px; }
.fila-al.al .fila-t small:first-of-type { color: var(--tinta2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.estado { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 650; color: var(--gris); }
.estado i { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--linea2); }
.estado.ok { color: #7DE3AD; } .estado.ok i { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-s); }
.estado.medio { color: #F3CF7C; } .estado.medio i { background: var(--amarillo); }
.estado.frio i { background: #5B6676; }
.cab-al .estado { margin-top: 5px; font-size: 13.5px; }
.fila-d { flex: none; display: grid; justify-items: end; gap: 6px; }
.puntos-sem { display: flex; gap: 4px; }
.puntos-sem i { width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid var(--linea2); }
.puntos-sem i.si { background: var(--acento); border-color: var(--acento); }
.chip.fijo.dolio { background: var(--mal-s); color: #FFC2CA; }
.chip.fijo.costo { background: rgba(245, 183, 64, .15); color: #FFE2A3; }
.chip.fijo.dolio, .chip.fijo.costo { min-height: 24px; font-size: 11.5px; font-weight: 750; padding: 0 9px; }

/* ---------- Página del alumno: pestañas, acceso y rutina asignada ---------- */
.segmento a { display: grid; place-items: center; min-height: 38px; border-radius: 10px; color: var(--gris); font-weight: 650; font-size: 14px; text-decoration: none; }
.segmento a.activo { background: var(--sup3); color: var(--tinta); }
.cab-al + .segmento { margin-bottom: 16px; }
.acceso { padding-top: 14px; }
.acc-cab { display: flex; align-items: center; gap: 12px; padding: 0 14px 12px; }
.acc-ico { flex: none; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 13px; background: var(--ok-s); color: var(--ok); }
.acc-cab h3 { font-size: 16px; font-weight: 750; }
.acc-cab p { font-size: 13px; color: var(--gris); margin-top: 2px; }
.rut.asignada { border-color: rgba(53, 208, 127, .45); }
.sello { display: flex; align-items: center; gap: 6px; margin: 0; padding: 10px 16px 0; font-size: 12px; font-weight: 750; letter-spacing: .03em; text-transform: uppercase; color: var(--ok); }
.sello .ico { width: 15px; height: 15px; stroke-width: 3; }
.para.sello { padding: 0; margin: 4px 0 14px; text-transform: none; letter-spacing: 0; font-size: 13px; }
.cont > .boton.grande { margin-top: 4px; }

/* ---------- Hoja «Asignar una rutina lista» ---------- */
.lista-r { display: flex; align-items: center; gap: 12px; width: 100%; padding: 13px 12px 13px 14px; background: var(--sup2); border: 1px solid var(--linea); border-radius: var(--radio); text-align: left; transition: border-color .15s, transform .1s; }
.lista-r:active { transform: scale(.985); }
.lista-r.eligiendo { border-color: var(--ok); background: var(--ok-s); }
.lista-r:disabled:not(.eligiendo) { opacity: .5; }
.lista-t { flex: 1; min-width: 0; display: grid; gap: 3px; }
.lista-t b { font-size: 15.5px; font-weight: 750; line-height: 1.2; }
.lista-t small { font-size: 12.5px; color: var(--gris); }
.minis { flex: none; display: flex; }
.minis img { width: 38px; height: 38px; border-radius: 10px; object-fit: cover; border: 2px solid var(--sup2); margin-left: -12px; background: var(--video); }
.minis img:first-child { margin-left: 0; }
.lista-r > .ico { flex: none; color: var(--gris); }

/* ---------- Progreso ---------- */
.ico.grande { width: 44px; height: 44px; margin: 0 auto 10px; display: block; opacity: .6; }
.cargando.chico { min-height: 180px; }
.tiles { display: grid; grid-template-columns: 1.25fr 1fr 1fr; gap: 8px; }
.tile { padding: 12px 12px 13px; border-radius: 14px; background: var(--sup); border: 1px solid var(--linea); min-width: 0; }
.tile small { display: block; white-space: nowrap; font-size: 10.5px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: var(--gris); }
.tile b { display: block; margin-top: 5px; font-size: 20px; font-weight: 850; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile b i { font-style: normal; font-weight: 700; color: var(--gris); font-size: 15px; }
.tile.ok b { color: #7DE3AD; } .tile.medio b { color: #F3CF7C; }
.barras { display: grid; grid-template-columns: repeat(8, 1fr); gap: 7px; height: 132px; padding: 12px 12px 8px; background: var(--sup); border: 1px solid var(--linea); border-radius: var(--radio); }
.barra-s { display: grid; grid-template-rows: 16px 1fr 16px; justify-items: center; align-items: end; min-width: 0; }
.barra-s b { font-size: 12px; font-weight: 800; color: var(--tinta2); }
.barra-s i { width: 100%; max-width: 26px; min-height: 3px; border-radius: 6px 6px 3px 3px; background: var(--sup3); }
.barra-s.actual i { background: linear-gradient(to top, var(--acento), var(--acento2)); }
.barra-s.actual b { color: var(--acento2); }
.barra-s small { font-size: 9.5px; color: var(--gris); font-weight: 600; white-space: nowrap; }
.pesos, .marcas, .sesiones { list-style: none; margin: 0; padding: 0; background: var(--sup); border: 1px solid var(--linea); border-radius: var(--radio); }
.pesos li, .marcas li, .sesiones li { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-top: 1px solid var(--linea); }
.pesos li:first-child, .marcas li:first-child, .sesiones li:first-child { border-top: 0; }
.peso-n { flex: 1; min-width: 0; display: grid; gap: 2px; }
.peso-n b { font-size: 14px; font-weight: 700; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.peso-n small { font-size: 11.5px; color: var(--gris); }
.trazo { flex: none; overflow: visible; }
.trazo polyline { fill: none; stroke: var(--acento2); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.trazo circle { fill: var(--acento); }
.peso-v { flex: none; min-width: 62px; display: grid; justify-items: end; gap: 1px; }
.peso-v b { font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.peso-v small { font-size: 11.5px; font-weight: 700; color: var(--gris); }
.peso-v .sube { color: var(--ok); } .peso-v .baja { color: var(--mal); }
.marcas li span:nth-child(2) { flex: 1; min-width: 0; font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.marcas small, .ses-f { flex: none; font-size: 12.5px; color: var(--gris); font-variant-numeric: tabular-nums; }
.ses-f { width: 42px; }
.ses-d { flex: 1; min-width: 0; font-size: 14px; color: var(--tinta2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ses-d b { color: var(--tinta); }
.ses-n { flex: none; font-size: 13.5px; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--amarillo); }
.ses-n.todo { color: var(--ok); }

/* ---------- Armador y ajustes ---------- */
.estado-g.mal { color: var(--mal); }
.colores { display: flex; gap: 10px; flex-wrap: wrap; }
.color { width: 42px; height: 42px; border-radius: 50%; border: 3px solid transparent; background: var(--c); box-shadow: 0 0 0 1px var(--linea2); }
.color.activo { border-color: var(--bg); box-shadow: 0 0 0 3px var(--c); }
.logo-ed { display: flex; align-items: center; gap: 10px; }
.logo-v { flex: none; width: 56px; height: 56px; display: grid; place-items: center; border-radius: 14px; background: var(--bg); border: 1px solid var(--linea2); color: var(--gris); overflow: hidden; }
.logo-v img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- WhatsApp: vista previa del mensaje ---------- */
.burbuja p { white-space: pre-wrap; max-height: 38dvh; overflow-y: auto; }
.hoja-c > .boton.ancho + .boton.ancho { margin-top: 10px; }

/* ---------- App del alumno: cabecera con el profe (o su marca) ---------- */
.previa { display: flex; align-items: center; gap: 8px; margin: -6px -4px 12px; padding: 9px 12px; border-radius: 12px; background: var(--sup2); border: 1px solid var(--linea2); color: var(--tinta2); font-size: 13px; font-weight: 650; text-decoration: none; }
.previa .ico { width: 18px; height: 18px; }
.alu-marca { display: flex; align-items: center; gap: 11px; }
.alu-marca .avatar, .alu-logo { flex: none; width: 42px; height: 42px; border-radius: 13px; }
.alu-marca .avatar { background: linear-gradient(140deg, var(--acento2), var(--acento)); color: var(--sobre-acento); font-size: 14px; }
.alu-logo { object-fit: cover; }
.alu-m-t { flex: 1; min-width: 0; display: grid; gap: 1px; }
.alu-m-t b { font-size: 15.5px; font-weight: 800; letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.alu-m-t small { font-size: 12.5px; color: var(--gris); font-weight: 600; }
.wa-ico { background: var(--sup2); color: var(--wa); border: 1px solid var(--linea); }
.sin-red { margin-top: 10px; padding: 8px 12px; border-radius: 10px; background: rgba(245, 183, 64, .12); color: #F3CF7C; font-weight: 600; }
.alu-cab .kicker { margin-top: 20px; }
.alu-cab h1.chico { font-size: 28px; letter-spacing: -.03em; line-height: 1.1; margin: 6px 0 12px; }
.hecho-con { opacity: .7; }
