/* ============================================================
   Metodion v2 · APP-V3 (propuesta A, «papel») · la app del jugador y la puerta
   ------------------------------------------------------------
   `metodion.css` trae los tokens `[data-ambito="app"]` y los componentes BASE (pantalla, cabecera,
   etiqueta, h1, cifras, fila, botón, barra fija): los que también usa el móvil de muestra del panel.
   Esto es TODO lo demás, escrito de cero desde `dev/direccion/mockups/app-v3/comun.css` (la pinta
   exacta) y el mapa mockup → clase del encargo (§2). Nada de colores sueltos: siempre var(--a-*) /
   var(--c-*). Sin modo oscuro (§7). Una sola uppercase en toda la app: `.a-etiqueta`.
   ============================================================ */

/* ---------- base del ámbito ---------- */
body[data-ambito="app"] { overflow-x: hidden; }
[data-ambito="app"] { -webkit-font-smoothing: antialiased; }
/* Convivencia con el escaparate en `index.html` (C6): sus reglas globales de h1/label/input/button y el
   margen de `p` no entran en la app. `:where()` deja la especificidad a cero: las clases `a-*` mandan. */
:where([data-ambito="app"]) h1, :where([data-ambito="app"]) label, :where([data-ambito="app"]) p { margin: 0; }
:where([data-ambito="app"]) input, :where([data-ambito="app"]) button { width: auto; margin: 0; padding: 0; border: 0; border-radius: 0; background: none; color: inherit; font: inherit; }
:where([data-ambito="app"]) input:focus { outline: none; }

/* ---------- estructura de pantalla ---------- */
.a-cuerpo { padding: 8px 16px 0; display: flex; flex-direction: column; gap: 6px; }
.a-acciones { padding: 16px 16px 24px; display: flex; flex-direction: column; gap: 10px; }
.a-rotulo { font-size: 13px; font-weight: 600; color: var(--a-texto-2); }
.a-cab-sesion { padding: calc(env(safe-area-inset-top, 0px) + 14px) 16px 8px; display: flex; justify-content: space-between; align-items: center; min-height: 56px; }
.a-cab-sesion span { font-size: 13px; font-weight: 700; color: var(--a-texto-2); }
.a-volver { text-decoration: none; font-size: 15px; font-weight: 700; color: var(--a-texto); background: none; border: 0; padding: 0; }
.a-cab-txt { display: flex; flex-direction: column; min-width: 0; }
.a-enlace { font-size: 15px; font-weight: 600; color: var(--c-acento, var(--c-color)); text-decoration: underline; padding: 6px 0; background: none; border: 0; text-align: left; }
.a-enlace-centro { text-align: center; font-size: 15px; font-weight: 600; color: var(--c-acento, var(--c-color)); text-decoration: underline; padding: 8px; background: none; border: 0; }
.a-pie-txt { font-size: 12px; color: var(--a-texto-2); text-align: center; }
.a-msg { padding: 8px 16px 0; font-size: 14px; color: var(--a-aviso); min-height: 1em; }
.a-vacio { margin: 12px 16px 0; padding: 28px 22px; border: 1.5px dashed var(--a-linea); border-radius: var(--a-radio); display: flex; flex-direction: column; gap: 10px; text-align: center; color: var(--a-texto-2); }
.a-fila-enlace { color: inherit; text-decoration: none; }
.a-fila-progreso { padding: 0; }
/* D11 · la banda de «sin red» (solo cuando lo que se ve viene de la caché o hay sesiones por subir) */
.a-sinred { padding: 8px 16px; font-size: 13px; color: var(--a-texto-2); background: var(--a-capa-2); border-bottom: 1px solid var(--a-linea); text-align: center; }

/* ---------- campos (AppEntrar, AppAcceso, AppFinSesion) ---------- */
.a-campo { display: flex; flex-direction: column; gap: 6px; }
.a-input { width: 100%; min-height: 52px; padding: 0 14px; background: var(--a-capa); border: 1.5px solid var(--a-linea); color: var(--a-texto); font: inherit; font-size: 16px; border-radius: 12px; }
.a-input:focus { border-color: var(--c-color); outline: none; }
.a-input[readonly] { color: var(--a-texto-2); }
.a-textarea { width: 100%; min-height: 84px; padding: 12px 14px; background: var(--a-capa); border: 1.5px solid var(--a-linea); color: var(--a-texto); font: inherit; font-size: 15px; border-radius: 12px; resize: none; }
.a-textarea:focus { border-color: var(--c-color); outline: none; }
.a-paso { display: flex; gap: 14px; align-items: flex-start; padding: 14px; background: var(--a-capa); border: 1px solid var(--a-linea); border-radius: var(--a-radio); box-shadow: var(--a-sombra); }
.a-paso b { flex: none; width: 28px; height: 28px; border-radius: 8px; background: var(--c-color); color: var(--c-color-texto); display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 800; }
.a-sello-grande { width: 56px; height: 56px; font-size: 26px; border-radius: 12px; }
.a-sello-grande img { border-radius: 12px; }

/* ---------- vídeo (ficha) · póster con el play encima; el iframe solo al tocar (base.js · videoNodo) ---------- */
.video { position: relative; width: auto; margin: 12px 16px 0; aspect-ratio: 16 / 9; background: var(--a-capa-2); border-radius: 12px; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.video iframe, .video video, .video img { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; object-fit: cover; }
.video .t { position: absolute; left: 14px; bottom: 12px; font-size: 12px; color: var(--a-texto-2); }
.a-play { width: 60px; height: 60px; border-radius: 50%; background: var(--a-capa); color: var(--a-texto); box-shadow: var(--a-sombra); display: flex; align-items: center; justify-content: center; border: 0; position: relative; }
.a-play svg { margin-left: 3px; }
.a-video-dur { position: absolute; right: 10px; bottom: 10px; font-size: 12px; font-weight: 700; background: rgba(27, 26, 23, 0.8); color: #fff; padding: 3px 7px; border-radius: 6px; }
/* la tarjeta activa de la sesión: el póster detrás del play */
.a-video { aspect-ratio: 16 / 9; background: var(--a-capa-2) center / cover no-repeat; border-radius: 12px; display: flex; align-items: center; justify-content: center; }
.a-video .a-play { width: 52px; height: 52px; }
/* la miniatura 64×40 de la lista de ejercicios */
.a-mini { flex: none; position: relative; width: 64px; height: 40px; border-radius: 6px; background: var(--a-capa-2); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.a-mini img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.a-mini .a-mini-play { position: relative; }
.a-mini-play { width: 20px; height: 20px; border-radius: 50%; background: var(--a-capa); color: var(--a-texto); display: flex; align-items: center; justify-content: center; opacity: 0.92; }

/* ---------- la sesión: series, descanso, sensación, conmutador ---------- */
.serie { display: flex; gap: 8px; }
.serie span { flex: 1; min-height: 50px; display: flex; align-items: center; justify-content: center; background: var(--a-capa-2); border: 1px solid var(--a-linea); border-radius: 12px; font-weight: 800; font-size: 16px; color: var(--a-texto-2); }
.serie span.ok { background: var(--a-ok); color: #fff; border-color: transparent; }
.serie span.on { background: var(--c-acento, var(--c-color)); color: var(--c-acento-texto, var(--c-color-texto)); border-color: transparent; }
.sens { display: flex; gap: 8px; }
.sens span { flex: 1; height: 48px; display: flex; align-items: center; justify-content: center; background: var(--a-capa); border: 1.5px solid var(--a-linea); border-radius: 12px; font-size: 18px; font-weight: 800; color: var(--a-texto-2); cursor: pointer; }
.sens span.on { background: var(--c-acento, var(--c-color)); color: var(--c-acento-texto, var(--c-color-texto)); border-color: transparent; }
.toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px; background: var(--a-capa); border: 1px solid var(--a-linea); border-radius: var(--a-radio); cursor: pointer; }
.toggle i { width: 44px; height: 26px; border-radius: 13px; background: var(--a-capa-2); position: relative; display: block; flex: none; transition: background 120ms; }
.toggle i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--a-capa); box-shadow: var(--a-sombra); transition: transform 120ms; }
.toggle.on i { background: var(--c-color); }
.toggle.on i::after { transform: translateX(18px); }
.a-descanso { padding: 60px 24px 0; display: flex; flex-direction: column; gap: 10px; align-items: center; text-align: center; flex: 1; }
.a-descanso b { font-size: 72px; line-height: 1; font-weight: 800; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }

/* ---------- Programa: el selector de semana y los días ---------- */
.sem { display: flex; gap: 6px; padding: 0 16px; margin-top: 14px; }
.sem span { flex: 1; text-align: center; font-size: 12px; font-weight: 700; color: var(--a-texto-3); padding: 9px 0; border-radius: 999px; background: var(--a-capa-2); cursor: pointer; }
.sem span.ok { color: var(--a-ok); }
.sem span.on { background: var(--c-acento, var(--c-color)); color: var(--c-acento-texto, var(--c-color-texto)); }
.dia { display: flex; align-items: center; gap: 14px; padding: 12px 14px; min-height: 64px; background: var(--a-capa); border: 1px solid var(--a-linea); border-radius: var(--a-radio); box-shadow: var(--a-sombra); color: inherit; text-decoration: none; }
.dia .n { width: 40px; flex: none; display: flex; flex-direction: column; align-items: center; line-height: 1; }
.dia .n b { font-size: 20px; font-weight: 800; }
.dia .n span { font-size: 10px; font-weight: 700; letter-spacing: 0.06em; color: var(--a-texto-3); margin-top: 3px; }
.dia .a-fila-txt strong { font-size: 15px; }
.dia.desc { background: transparent; border-style: dashed; box-shadow: none; color: var(--a-texto-3); }
.dia.desc > span { flex: 1; text-align: right; font-size: 14px; }
.dia.desc .club-dia-evento { flex: none; margin: 0; font-size: 12px; text-align: right; max-width: 55%; }
.dia.hoy { border: 2px solid var(--c-color); }
.dia .a-check { margin-left: auto; width: 26px; height: 26px; border-radius: 50%; background: var(--a-ok); color: #fff; padding: 5px; }
.dia .a-btn { min-height: 40px; padding: 0 14px; font-size: 13px; }
.dia .n span { color: var(--a-texto-2); }
.dia-chev { margin-left: auto; color: var(--a-texto-3); flex: none; }

/* ---------- Yo: el calendario, la leyenda y las filas ---------- */
.cal-cab { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); font-size: 10px; font-weight: 700; color: var(--a-texto-2); text-align: center; letter-spacing: 0.06em; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal i { display: block; aspect-ratio: 1; border-radius: 7px; background: var(--a-celda); font-style: normal; }
.cal i.si { background: var(--a-ok); }
.cal i.mol { background: var(--a-aviso); }
.cal i.hoy { outline: 2px solid var(--a-texto); outline-offset: -2px; }
.cal-leyenda { display: flex; gap: 14px; font-size: 11px; color: var(--a-texto-2); }
.cal-leyenda span { display: flex; align-items: center; gap: 5px; }
.cal-leyenda i { width: 10px; height: 10px; border-radius: 3px; background: var(--a-celda); display: block; font-style: normal; }
.cal-leyenda i.si { background: var(--a-ok); }
.cal-leyenda i.mol { background: var(--a-aviso); }
.fila { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 56px; padding: 14px 16px; background: var(--a-capa); border: 1px solid var(--a-linea); border-radius: var(--a-radio); box-shadow: var(--a-sombra); font-size: 15px; font-weight: 700; color: inherit; text-decoration: none; }
.fila > :first-child { flex: none; }
.fila > span:last-child { flex: 1; font-weight: 400; color: var(--a-texto-2); font-size: 14px; text-align: right; }
.a-sw { width: 44px; height: 26px; border-radius: 13px; background: var(--a-capa-2); position: relative; flex: none; transition: background 120ms; }
.a-sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--a-capa); box-shadow: var(--a-sombra); transition: transform 120ms; }
.a-sw.on { background: var(--c-color); }
.a-sw.on::after { transform: translateX(18px); }

/* ---------- Avisos (M4) ---------- */
.av-lista { padding: 0 16px; display: flex; flex-direction: column; gap: 10px; }
.av { background: var(--a-capa); border: 1px solid var(--a-linea); border-radius: var(--a-radio); box-shadow: var(--a-sombra); padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.av.nuevo { border-left: 4px solid var(--c-color); }
.av.leido { opacity: 0.75; }
.av strong { font-size: 16px; font-weight: 700; line-height: 1.25; }
.av-meta { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; color: var(--a-texto-2); }
.av-meta .on { color: var(--c-acento, var(--c-color)); font-weight: 700; letter-spacing: 0.04em; }

/* ---------- CLUB · comunicados y eventos en la app ---------- */
.club-hoy { padding: 0 16px 4px; display: flex; flex-direction: column; gap: 10px; }
.club-tarjeta { background: var(--a-capa); border: 1px solid var(--a-linea); border-left: 4px solid var(--c-color); border-radius: var(--a-radio); box-shadow: var(--a-sombra); padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.club-tarjeta-cab { display: flex; justify-content: space-between; align-items: center; }
.club-tarjeta-titulo { font-size: 16px; font-weight: 700; line-height: 1.25; color: inherit; text-decoration: none; }
.club-pregunta { font-size: 18px; font-weight: 800; margin-top: 2px; }
.club-sino { display: flex; gap: 8px; }
.club-sino .a-btn { flex: 1; min-height: 46px; font-size: 15px; }
/* el evento: dado de fecha en el color del equipo + título + hora/lugar (mockup .evento) */
.club-evento { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; background: var(--a-capa); border: 1px solid var(--a-linea); border-radius: var(--a-radio); box-shadow: var(--a-sombra); }
.a-evento-fecha { width: 44px; height: 48px; flex: none; border-radius: 10px; background: var(--c-color); color: var(--c-color-texto); display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; }
.a-evento-fecha b { font-size: 18px; font-weight: 800; }
.a-evento-fecha span { font-size: 9px; font-weight: 700; letter-spacing: 0.06em; margin-top: 3px; }   /* el mes ya llega en mayúsculas (JS) */
.club-evento-txt { font-size: 15px; font-weight: 700; }
.club-evento .a-sec { font-size: 13px; }
.a-evento-conf { margin-left: auto; flex: none; font-size: 11px; font-weight: 700; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--a-linea); color: var(--a-texto-2); }
.a-evento-conf.si { background: var(--a-ok); color: #fff; border-color: transparent; }
.a-evento-conf.no { background: var(--a-aviso); color: #fff; border-color: transparent; }
.club-dia-evento { display: block; font-size: 12px; color: var(--c-acento, var(--c-color)); font-weight: 700; margin-top: 2px; }
.club-cita { font-size: 15px; font-weight: 700; margin: 4px 0 0; }
.club-texto { display: flex; flex-direction: column; gap: 10px; margin: 12px 0 16px; font-size: 16px; line-height: 1.5; }
.club-texto p { margin: 0; }
.club-confirmar { margin-top: 18px; padding: 14px 16px; background: var(--a-capa); border: 1px solid var(--a-linea); border-radius: var(--a-radio); box-shadow: var(--a-sombra); display: flex; flex-direction: column; gap: 8px; }
.club-push { margin: 12px 16px 0; padding: 14px 16px; background: var(--a-capa); border: 1px solid var(--a-linea); border-radius: var(--a-radio); box-shadow: var(--a-sombra); display: flex; align-items: center; gap: 12px; }
.club-push-txt { display: flex; flex-direction: column; gap: 3px; flex: 1; }
.club-push-txt strong { font-size: 15px; }
.club-interruptor { position: relative; width: 44px; height: 26px; flex-shrink: 0; }
.club-interruptor input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.club-interruptor i { position: absolute; inset: 0; background: var(--a-capa-2); border-radius: 13px; transition: background 120ms; }
.club-interruptor i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--a-capa); box-shadow: var(--a-sombra); transition: transform 120ms; }
.club-interruptor input:checked + i { background: var(--c-color); }
.club-interruptor input:checked + i::after { transform: translateX(18px); }
