/* =========================================================
   PMN · Música Entretenida — Sistema visual "soft UI" azul claro
   ========================================================= */
:root {
  --bg: #e9f1fb;
  --surface: #eef5fd;
  --surface-2: #f6faff;
  --sh-dark: #c3d3e8;
  --sh-light: #ffffff;
  --ink: #1d2b44;
  --ink-2: #51627f;
  --ink-3: #8a9bb5;
  --blue: #3d8bfd;
  --blue-2: #5fb2ff;
  --cyan: #2fd3e6;
  --blue-deep: #1f5fd1;
  --grad: linear-gradient(135deg, #5fb2ff 0%, #3d8bfd 55%, #2f6fe8 100%);
  --grad-soft: linear-gradient(135deg, #e3efff 0%, #f6faff 100%);
  --ok: #34c08a;
  --warn: #f4a261;
  --danger: #ef5b6b;
  --r-lg: 26px;
  --r-md: 18px;
  --r-sm: 12px;
  --raise: 8px 8px 18px var(--sh-dark), -8px -8px 18px var(--sh-light);
  --raise-sm: 4px 4px 10px var(--sh-dark), -4px -4px 10px var(--sh-light);
  --inset: inset 4px 4px 10px var(--sh-dark), inset -4px -4px 10px var(--sh-light);
  --inset-sm: inset 2px 2px 6px var(--sh-dark), inset -2px -2px 6px var(--sh-light);
  --glow: 0 0 0 4px rgba(61, 139, 253, .15), 0 8px 24px rgba(61, 139, 253, .35);
  --font: 'Poppins', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--blue-deep); text-decoration: none; }
.oculto { display: none !important; }

/* ---------- Barra superior ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 18px;
  padding: 14px 28px;
  background: rgba(233, 241, 251, .85);
  backdrop-filter: blur(10px);
  box-shadow: 0 6px 18px rgba(195, 211, 232, .55);
}
.marca { display: flex; align-items: center; gap: 12px; font-weight: 600; white-space: nowrap; }
.marca-logo {
  width: 42px; height: 42px; border-radius: 14px;
  background: var(--grad); color: #fff; display: grid; place-items: center;
  font-weight: 700; font-size: 14px; letter-spacing: .5px; box-shadow: var(--glow);
}
.marca small { display: block; font-weight: 400; color: var(--ink-3); font-size: 11px; }
.menu { display: flex; align-items: center; gap: 8px; margin-left: auto; flex-wrap: wrap; }
.menu a {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 16px; border-radius: 14px; color: var(--ink-2); font-size: 14px; font-weight: 500;
  transition: .2s;
}
.menu a svg { width: 18px; height: 18px; }
.menu a:hover { color: var(--blue-deep); box-shadow: var(--raise-sm); }
.menu a.activo { color: var(--blue-deep); background: var(--surface); box-shadow: var(--inset-sm); }
.menu a.cta { background: var(--grad); color: #fff; box-shadow: var(--glow); }
/* Desplegable de Grados */
.dd { position: relative; }
.dd-boton {
  display: flex; align-items: center; gap: 8px; border: 0; background: transparent; cursor: pointer;
  padding: 10px 16px; border-radius: 14px; color: var(--ink-2); font-size: 14px; font-weight: 500; transition: .2s;
}
.dd-boton svg { width: 18px; height: 18px; }
.dd-boton .dd-flecha { width: 16px; height: 16px; transition: transform .2s; }
.dd-boton:hover { color: var(--blue-deep); box-shadow: var(--raise-sm); }
.dd-boton.activo, .dd.abierto .dd-boton { color: var(--blue-deep); background: var(--surface); box-shadow: var(--inset-sm); }
.dd.abierto .dd-flecha { transform: rotate(180deg); }
.dd-panel {
  position: absolute; top: calc(100% + 12px); left: 50%; width: 460px; max-height: 76vh; overflow: auto;
  padding: 18px; border-radius: var(--r-lg); background: var(--surface);
  box-shadow: 12px 12px 30px var(--sh-dark), -8px -8px 22px var(--sh-light);
  opacity: 0; visibility: hidden; transform: translate(-50%, -8px); transition: .2s; z-index: 30;
}
.dd.abierto .dd-panel { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.dd-ciclo { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--ink-3); margin: 6px 4px 10px; }
.dd-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 14px; }
.dd-grado {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 14px;
  color: var(--ink); font-size: 14px; font-weight: 500; background: var(--surface); box-shadow: var(--raise-sm); transition: .15s;
}
a.dd-grado:hover { transform: translateY(-1px); color: var(--blue-deep); }
.dd-grado.actual { box-shadow: var(--inset-sm); color: var(--blue-deep); }
.dd-num {
  width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; flex: none;
  background: var(--grad); color: #fff; font-size: 12px; font-weight: 700; box-shadow: var(--glow);
}
.dd-grado.bloqueado { color: var(--ink-3); box-shadow: none; cursor: not-allowed; }
.dd-grado.bloqueado .dd-num { background: var(--surface); color: var(--ink-3); box-shadow: var(--inset-sm); }
.dd-grado.bloqueado svg { width: 14px; height: 14px; margin-left: auto; }
.dd-aviso { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-radius: 14px; background: #e3efff; color: var(--blue-deep); font-size: 13px; margin-bottom: 14px; }
.dd-aviso svg { width: 18px; height: 18px; flex: none; }

.usuario-chip {
  display: flex; align-items: center; gap: 10px; padding: 6px 8px 6px 6px;
  border-radius: 999px; background: var(--surface); box-shadow: var(--raise-sm); font-size: 13px;
}
.avatar {
  width: 32px; height: 32px; border-radius: 50%; background: var(--grad); color: #fff;
  display: grid; place-items: center; font-weight: 600; font-size: 13px;
}
.btn.btn-menu { display: none; }

/* ---------- Contenedores ---------- */
main { padding: 32px 28px 60px; max-width: 1280px; margin: 0 auto; }
.titulo-pagina { margin: 0 0 6px; font-size: 28px; font-weight: 600; }
.subtitulo { margin: 0 0 28px; color: var(--ink-2); }
.panel {
  background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--raise); padding: 26px;
}
.panel-hundido { background: var(--surface); border-radius: var(--r-md); box-shadow: var(--inset); padding: 18px; }
.grid { display: grid; gap: 22px; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; cursor: pointer; padding: 12px 22px; border-radius: 14px;
  background: var(--surface); box-shadow: var(--raise-sm); font-weight: 500; transition: .18s;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { box-shadow: var(--inset-sm); transform: none; }
.btn svg { width: 18px; height: 18px; }
.btn-primario { background: var(--grad); color: #fff; box-shadow: var(--glow); }
.btn-primario:active { box-shadow: inset 0 3px 8px rgba(0,0,0,.2); }
.btn-bloque { width: 100%; }
.btn-redondo { width: 56px; height: 56px; padding: 0; border-radius: 50%; }
.btn-redondo svg { width: 22px; height: 22px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; }
.enlace { background: none; border: 0; color: var(--blue-deep); cursor: pointer; padding: 0; font-size: 13px; }

/* ---------- Formularios ---------- */
.campo { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.campo label { font-size: 13px; color: var(--ink-2); font-weight: 500; }
.entrada {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface); box-shadow: var(--inset-sm); border-radius: 14px; padding: 0 14px;
}
.entrada svg { width: 18px; height: 18px; color: var(--ink-3); flex: none; }
.entrada input, .entrada textarea, .entrada select {
  border: 0; outline: 0; background: transparent; width: 100%; padding: 13px 0; font-size: 14px;
}
.entrada textarea { resize: vertical; min-height: 110px; }
.entrada:focus-within { box-shadow: var(--inset-sm), 0 0 0 2px rgba(61,139,253,.35); }
.alerta { padding: 12px 16px; border-radius: 14px; font-size: 13px; margin-bottom: 16px; }
.alerta.error { background: #fde8eb; color: #b3263a; }
.alerta.ok { background: #e1f6ee; color: #1b7a55; }
.alerta.info { background: #e3efff; color: var(--blue-deep); }

/* Toggle tipo píldora */
.toggle { position: relative; width: 54px; height: 30px; flex: none; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle span {
  position: absolute; inset: 0; border-radius: 999px; background: var(--surface); box-shadow: var(--inset-sm);
  cursor: pointer; transition: .25s;
}
.toggle span::after {
  content: ''; position: absolute; top: 4px; left: 4px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--surface-2); box-shadow: 2px 2px 5px var(--sh-dark); transition: .25s;
}
.toggle input:checked + span { background: var(--grad); box-shadow: var(--glow); }
.toggle input:checked + span::after { left: 28px; background: #fff; }

/* Slider */
input[type=range].slider { -webkit-appearance: none; appearance: none; width: 100%; height: 10px; border-radius: 999px;
  background: var(--surface); box-shadow: var(--inset-sm); outline: none; }
input[type=range].slider::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; border-radius: 50%;
  background: var(--grad); box-shadow: var(--glow); cursor: pointer; border: 3px solid #fff; }
input[type=range].slider::-moz-range-thumb { width: 20px; height: 20px; border-radius: 50%; background: var(--blue);
  border: 3px solid #fff; cursor: pointer; }

/* ---------- Login ---------- */
.login-wrap { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center; min-height: calc(100vh - 170px); }
.login-hero h1 { font-size: 40px; line-height: 1.15; margin: 0 0 14px; font-weight: 600; }
.login-hero h1 span { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.login-hero p { color: var(--ink-2); max-width: 460px; line-height: 1.6; }
.hero-grafias { display: flex; gap: 22px; margin-top: 30px; }
.hero-grafias .ficha { width: 92px; height: 92px; }
.login-card { max-width: 420px; width: 100%; justify-self: center; }
.login-card h2 { margin: 0 0 4px; font-weight: 600; }
.login-card .sub { color: var(--ink-3); font-size: 13px; margin: 0 0 22px; }
.separador { display: flex; align-items: center; gap: 12px; color: var(--ink-3); font-size: 12px; margin: 18px 0; }
.separador::before, .separador::after { content: ''; flex: 1; height: 1px; background: var(--sh-dark); }
.fila-entre { display: flex; justify-content: space-between; align-items: center; }

/* ---------- Espacio de trabajo del grado ---------- */
.migas { font-size: 13px; color: var(--ink-3); margin-bottom: 8px; }
.tabs { display: inline-flex; gap: 6px; padding: 6px; border-radius: 18px; box-shadow: var(--inset-sm); margin-bottom: 24px; flex-wrap: wrap; }
.tab { border: 0; background: transparent; padding: 10px 18px; border-radius: 13px; cursor: pointer; font-size: 14px; color: var(--ink-2); font-weight: 500; }
.tab.activo { background: var(--surface-2); color: var(--blue-deep); box-shadow: var(--raise-sm); }
.tab .pronto { font-size: 10px; color: var(--ink-3); margin-left: 4px; }
.estudio { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
.escenario { padding: 30px 30px 24px; }
.escenario-cab { text-align: center; margin-bottom: 8px; }
.escenario-cab h2 { margin: 0; font-weight: 500; font-size: 22px; }
.escenario-cab p { margin: 4px 0 0; color: var(--ink-2); font-size: 14px; }
.linea-tiempo { position: relative; display: grid; gap: 18px; align-items: start; padding: 44px 10px 18px; }
/* La línea de tiempo pasa por el centro de cada ficha (su tamaño depende del ancho de la celda). */
.pulso { container-type: inline-size; }
.pulso::after { content: ''; position: absolute; left: -10px; right: -10px; top: calc(min(120px, 100cqw) / 2 - 1px); height: 2px; background: #bcd0ea; z-index: -1; }
.pulso:last-child::after { right: -4px; }
.linea-tiempo::after { content: ''; position: absolute; right: 0; top: var(--flecha-top, 98px); border: 7px solid transparent; border-left: 12px solid #bcd0ea; display: none; }
.pulso { position: relative; display: flex; flex-direction: column; align-items: center; gap: 14px; z-index: 1; }
.pulso { min-width: 0; }
.pulso .ficha { width: min(120px, 100%); height: auto; aspect-ratio: 1; transition: transform .12s; cursor: pointer; }
.pulso .etq { font-size: 14px; color: var(--ink-2); text-align: center; min-height: 20px; }
.pulso .nro { position: absolute; top: -30px; font-size: 12px; color: var(--ink-3); }
.pulso.actual .ficha { transform: scale(1.12); }
.pulso.actual::before {
  content: ''; position: absolute; top: -26px; bottom: 26px; left: 50%; width: 34px; transform: translateX(-50%);
  border-radius: 999px; background: linear-gradient(180deg, rgba(95,178,255,.15), rgba(95,178,255,.55), rgba(95,178,255,.15));
  box-shadow: 0 0 24px rgba(61,139,253,.55); z-index: 2; pointer-events: none;
}
.grafia-img { width: 100%; height: 100%; object-fit: contain; display: block; }
.ficha svg { width: 100%; height: 100%; filter: drop-shadow(2px 3px 3px rgba(120,150,190,.3)); overflow: visible; }
.ficha.vacia { border-radius: 24px; box-shadow: var(--inset-sm); display: grid; place-items: center; color: var(--ink-3); font-size: 26px; }

.controles { display: flex; align-items: center; gap: 18px; margin-top: 18px; flex-wrap: wrap; }
.consola { display: flex; gap: 14px; align-items: flex-end; padding: 14px 18px; border-radius: var(--r-md); box-shadow: var(--raise-sm); }
.consola .canal { display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 11px; color: var(--ink-3); }
.consola .canal input[type=range] { writing-mode: vertical-lr; direction: rtl; width: 10px; height: 90px; }
.bpm-box { flex: 1; min-width: 220px; text-align: center; }
.bpm-box .valor { font-size: 30px; font-weight: 600; color: var(--blue-deep); }
.bpm-box .valor small { font-size: 13px; color: var(--ink-3); font-weight: 400; }
.contador-pulso { display: flex; gap: 8px; justify-content: center; margin-top: 10px; }
.contador-pulso i { width: 10px; height: 10px; border-radius: 50%; box-shadow: var(--inset-sm); }
.contador-pulso i.on { background: var(--grad); box-shadow: var(--glow); }

.lateral { display: flex; flex-direction: column; gap: 22px; }
.lateral h4 { margin: 0 0 14px; font-weight: 500; color: var(--ink-2); }
.dicc-lista { max-height: 430px; overflow-y: auto; padding: 4px 6px 4px 2px; margin: 0 -6px 0 -2px; }
.diccionario-item { display: flex; align-items: center; gap: 14px; padding: 10px; border-radius: 16px; cursor: pointer; border: 0; background: transparent; width: 100%; text-align: left; }
.diccionario-item:hover { box-shadow: var(--raise-sm); }
.diccionario-item .ficha { width: 46px; height: 46px; flex: none; }
.diccionario-item b { display: block; font-weight: 500; font-size: 14px; }
.diccionario-item span { font-size: 12px; color: var(--ink-3); }
.metrica { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.metrica .barra { flex: 1; }
.metrica .barra small { font-size: 12px; color: var(--ink-2); }
.anillo { --p: 0; width: 54px; height: 54px; border-radius: 50%; flex: none; display: grid; place-items: center; font-size: 12px; font-weight: 600;
  background: conic-gradient(var(--blue) calc(var(--p) * 1%), #d9e5f5 0); position: relative; color: var(--ink-3); }
.anillo::before { content: ''; position: absolute; inset: 6px; border-radius: 50%; background: var(--surface); }
.anillo b { position: relative; }
.proximamente { font-size: 12px; color: var(--ink-3); display: flex; align-items: center; gap: 8px; }
.insignia { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; padding: 4px 10px; border-radius: 999px; background: #e3efff; color: var(--blue-deep); font-weight: 500; }

/* ---------- Tablero de entrenamiento (diseño v2) ---------- */
.tb-cab { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.tb-cab .titulo-pagina { margin: 0; }
.tb-sub { font-size: 16px; color: var(--ink-3); font-weight: 500; }
.tb-menu { display: flex; gap: 8px; flex-wrap: wrap; padding: 6px; border-radius: 18px; box-shadow: var(--inset-sm); margin-bottom: 22px; width: fit-content; max-width: 100%; }
.tb-menu .dd-boton b { color: var(--blue-deep); font-weight: 600; }
.tb-dd { left: 0; transform: translate(0, -8px); width: 320px; }
.dd.abierto .tb-dd { transform: translate(0, 0); }
.tb-ix { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; border: 0; background: transparent; text-align: left; padding: 10px 12px; border-radius: 14px; cursor: pointer; margin-bottom: 6px; }
.tb-ix small { color: var(--ink-3); font-size: 12px; }
.tb-ix:hover:not([disabled]) { box-shadow: var(--raise-sm); }
.tb-ix.actual { box-shadow: var(--inset-sm); color: var(--blue-deep); }
.tb-ix[disabled] { opacity: .55; cursor: not-allowed; }
.tb-registros { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 12px; }
.tb-reg { position: relative; }
.tb-reg-btn { width: 100%; border: 0; cursor: pointer; background: var(--surface-2); box-shadow: var(--raise-sm); border-radius: 16px; padding: 12px 6px 10px; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px; transition: .15s; }
.tb-reg-btn:hover { transform: translateY(-2px); }
.tb-reg-btn .ficha { width: 44px; height: 44px; }
.tb-check { position: absolute; top: 6px; right: 6px; }
.tb-check input { position: absolute; opacity: 0; }
.tb-check span { display: block; width: 18px; height: 18px; border-radius: 6px; box-shadow: var(--inset-sm); background: var(--surface); cursor: pointer; }
.tb-check input:checked + span { background: var(--grad); box-shadow: var(--glow); }
.tb-check input:checked + span::after { content: ''; display: block; width: 5px; height: 9px; margin: 2px 0 0 6px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.tb-tablero { position: relative; padding: 64px 30px 28px; }
.tb-ajustes { position: absolute; top: 14px; right: 16px; z-index: 5; display: flex; gap: 12px; align-items: center; }
.tb-iniciar { height: 44px; padding: 0 20px; border-radius: 999px; font-weight: 600; }
.tb-iniciar svg { width: 16px; height: 16px; }
.tb-ajustes .btn-redondo { width: 44px; height: 44px; }
.tb-pop { position: absolute; right: 0; top: 56px; width: 330px; padding: 16px 18px; border-radius: var(--r-md); background: var(--surface); box-shadow: 12px 12px 30px var(--sh-dark), -8px -8px 22px var(--sh-light); }
.tb-pop-fila { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 9px 0; font-size: 13px; color: var(--ink-2); }
.tb-pop-fila .slider { width: 130px; }
.tb-foto { width: min(70px, 62%); aspect-ratio: 1; object-fit: contain; padding: 3px; border-radius: 14px; box-shadow: var(--raise-sm); background: var(--surface); }
.tb-foto-vacia { display: grid; place-items: center; color: var(--ink-3); box-shadow: var(--inset-sm); }
.tb-foto-vacia svg { width: 45%; height: 45%; }
.tb-control { display: flex; align-items: center; justify-content: center; gap: 18px; flex-wrap: wrap; margin: 26px auto 0; max-width: 960px; padding: 16px 24px; border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--raise); }
.tb-control .bpm-box { min-width: 0; }
.tb-opciones { display: flex; gap: 10px; align-items: center; }
.tb-opc { position: relative; }
.tb-opc-btn { flex-direction: column; gap: 2px; padding: 8px 14px; min-width: 76px; line-height: 1.1; }
.tb-opc-btn small { font-size: 11px; color: var(--ink-3); font-weight: 500; }
.tb-opc-btn b { font-size: 18px; color: var(--blue-deep); }
.tb-opc-btn svg { width: 20px; height: 20px; color: var(--blue-deep); }
.tb-lista { position: absolute; bottom: calc(100% + 10px); left: 50%; transform: translateX(-50%); z-index: 20; padding: 12px; border-radius: var(--r-md);
  background: var(--surface); box-shadow: 12px 12px 30px var(--sh-dark), -8px -8px 22px var(--sh-light); display: grid; grid-template-columns: repeat(3, 44px); gap: 8px; }
.tb-lista .dd-ciclo { grid-column: 1 / -1; margin: 0 0 4px; white-space: nowrap; }
.tb-lista button { height: 44px; border: 0; border-radius: 12px; background: var(--surface-2); box-shadow: var(--raise-sm); font-weight: 600; cursor: pointer; color: var(--ink); }
.tb-lista button:hover { color: var(--blue-deep); }
.tb-lista button.actual { background: var(--grad); color: #fff; box-shadow: var(--glow); }
/* Cada botón del controlador con su color */
#opc-pulsos { --c1: #a78bfa; --c2: #7c3aed; --cg: rgba(124, 58, 237, .35); }
#opc-compases { --c1: #34d3b4; --c2: #0f9f8a; --cg: rgba(15, 159, 138, .35); }
#azar { --c1: #fdba74; --c2: #f97316; --cg: rgba(249, 115, 22, .35); }
#opc-compases .tb-lista, #opc-pulsos .tb-lista { grid-template-columns: repeat(4, 44px); }
#opc-figuras { --c1: #f9a8d4; --c2: #db2777; --cg: rgba(219, 39, 119, .32); }
.tb-manual { grid-column: 1 / -1; display: flex; gap: 6px; margin-top: 4px; }
.tb-manual input { width: 0; flex: 1; border: 0; border-radius: 12px; padding: 0 10px; height: 40px; background: var(--surface); box-shadow: var(--inset-sm); font-weight: 600; outline: none; }
.tb-manual input:focus { box-shadow: var(--inset-sm), 0 0 0 2px var(--cg); }
.tb-manual button { height: 40px; padding: 0 12px; }
.tb-figuras { display: block; width: min(460px, 92vw); max-height: 60vh; overflow-y: auto; left: auto; right: 0; transform: none; }
.tb-fig-cab { gap: 10px; margin-bottom: 4px; }
.tb-lista .enlace { height: auto; background: none; box-shadow: none; padding: 0; font-weight: 500; font-size: 12px; color: var(--c2); }
.tb-fig-cat { font-size: 10px; text-transform: uppercase; letter-spacing: 1px; color: var(--ink-3); margin: 10px 2px 6px; }
.tb-fig-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(62px, 1fr)); gap: 8px; }
.tb-lista .tb-fig { height: auto; padding: 8px 4px 6px; display: flex; flex-direction: column; align-items: center; gap: 4px; font-weight: 500; }
.tb-fig .ficha { width: 30px; height: 30px; }
.tb-fig small { font-size: 10px; line-height: 1.1; text-align: center; word-break: break-word; }
.tb-lista .tb-fig.on { background: #fde7f3; box-shadow: inset 0 0 0 2px var(--c2); color: var(--c2); }
.cs-numero { width: 110px; }
.tb-opc .tb-opc-btn, #azar.tb-opc-btn { background: linear-gradient(135deg, var(--c1), var(--c2)); box-shadow: 0 0 0 4px var(--cg), 0 8px 20px var(--cg); }
.tb-opc .tb-opc-btn small, .tb-opc .tb-opc-btn b, #azar.tb-opc-btn small, #azar.tb-opc-btn svg { color: #fff; }
.tb-opc .tb-lista button.actual { background: linear-gradient(135deg, var(--c1), var(--c2)); box-shadow: 0 0 0 3px var(--cg); }
.tb-opc .tb-lista button:hover:not(.actual) { color: var(--c2); }
.ficha.seleccionada { outline: 3px dashed #9cc2f5; outline-offset: 4px; border-radius: 20px; }
.cs-grados { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0; }
.cs-barra { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 16px; }
.cs-tablero { padding: 6px 14px 14px; }
.cs-tablero .pulso .ficha { width: min(84px, 100%); }
.cs-tablero .pulso::after { top: calc(min(84px, 100cqw) / 2 - 1px); }
.tb-campo { display: flex; flex-direction: column; gap: 4px; font-size: 11px; color: var(--ink-3); }
/* Compases: cada compás agrupa sus pulsos; con varios compases se muestran como bloques. */
.linea-tiempo { grid-template-columns: 1fr; padding-top: 14px; }
.linea-tiempo.varios { grid-template-columns: repeat(auto-fit, minmax(min(100%, calc(var(--ppc) * 78px + 40px)), 1fr)); padding-top: 10px; }
.compas-pulsos { display: grid; grid-template-columns: repeat(var(--ppc), minmax(0, 1fr)); gap: 18px; padding-top: 30px; }
.linea-tiempo.varios .compas { padding: 12px 16px 16px; border-radius: var(--r-md); box-shadow: var(--inset-sm); }
.compas-nro { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--ink-3); }
.pulso.fuerte .nro { color: var(--blue-deep); font-weight: 700; font-size: 13px; }
.contador-pulso i.fuerte { width: 14px; height: 14px; }
.tb-compas-actual { font-size: 12px; color: var(--ink-3); margin-top: 6px; min-height: 16px; }
/* Conteo de entrada (One, Two, Three…) */
.tb-conteo { position: fixed; inset: 0; z-index: 55; display: grid; place-items: center; background: rgba(29, 43, 68, .35); backdrop-filter: blur(3px); pointer-events: none; }
.tb-conteo-caja { min-width: 300px; padding: 30px 46px 26px; border-radius: 32px; text-align: center; background: var(--surface); box-shadow: 0 30px 80px rgba(20, 40, 80, .35); animation: latido .25s ease-out; }
.tb-conteo-caja b { display: block; font-size: 84px; line-height: 1; font-weight: 700; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tb-conteo-caja.fuerte b { background: linear-gradient(135deg, #a78bfa, #7c3aed); -webkit-background-clip: text; background-clip: text; }
.tb-conteo-caja span { display: block; color: var(--ink-3); font-size: 18px; margin-top: 4px; }
.tb-conteo-puntos { display: flex; gap: 10px; justify-content: center; margin-top: 16px; }
.tb-conteo-puntos i { width: 14px; height: 14px; border-radius: 50%; box-shadow: var(--inset-sm); }
.tb-conteo-puntos i.on { background: var(--grad); box-shadow: var(--glow); }
@keyframes latido { from { transform: scale(.82); opacity: .4; } to { transform: scale(1); opacity: 1; } }

/* Visor de la foto de interpretación ampliada */
img.tb-foto { cursor: zoom-in; transition: transform .15s; }
img.tb-foto:hover { transform: scale(1.06); }
.tb-visor { position: fixed; inset: 0; z-index: 60; background: rgba(29, 43, 68, .55); backdrop-filter: blur(6px); display: grid; place-items: center; padding: 24px; cursor: zoom-out; }
.tb-visor-caja { position: relative; margin: 0; background: var(--surface); border-radius: var(--r-lg); padding: 22px; box-shadow: 0 30px 80px rgba(20, 40, 80, .35); max-width: min(560px, 92vw); }
.tb-visor-caja img { display: block; width: 100%; max-height: 68vh; object-fit: contain; border-radius: var(--r-md); background: #fff; }
.tb-visor-caja figcaption { display: flex; align-items: center; gap: 14px; margin-top: 16px; }
.tb-visor-caja figcaption .ficha { width: 52px; height: 52px; flex: none; }
.tb-visor-caja figcaption b { display: block; font-size: 18px; }
.tb-visor-caja figcaption small { color: var(--ink-2); font-size: 13px; }
.tb-visor-cerrar { position: absolute; top: -14px; right: -14px; width: 40px; height: 40px; font-size: 16px; }

/* Proyectar: tablero + controlador en pantalla completa */
.tb-escena:fullscreen { background: var(--bg); overflow-y: auto; padding: 28px 32px; display: flex; flex-direction: column; justify-content: center; gap: 0; }
.tb-escena:fullscreen .tb-tablero { width: 100%; }
.tb-escena:fullscreen .tb-control { margin-top: 22px; width: 100%; }
.tb-escena:fullscreen .toast { position: fixed; }

/* ---------- Video PMN ---------- */
.video-marco { aspect-ratio: 16/9; border-radius: var(--r-md); overflow: hidden; box-shadow: var(--inset); display: grid; place-items: center; background: var(--grad-soft); }
.video-marco iframe, .video-marco video { width: 100%; height: 100%; border: 0; }
.play-gigante { width: 96px; height: 96px; border-radius: 50%; background: var(--grad); color: #fff; display: grid; place-items: center; box-shadow: var(--glow); }
.play-gigante svg { width: 40px; height: 40px; margin-left: 6px; }

/* ---------- Contacto ---------- */
.contacto-wrap { display: grid; grid-template-columns: 1fr 1.3fr; gap: 26px; }
.dato { display: flex; gap: 14px; align-items: center; margin-bottom: 18px; }
.dato .ico { width: 46px; height: 46px; border-radius: 15px; display: grid; place-items: center; box-shadow: var(--raise-sm); color: var(--blue); flex: none; }
.dato .ico svg { width: 20px; height: 20px; }
.dato small { display: block; color: var(--ink-3); font-size: 12px; }
.dos-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* ---------- Configuración ---------- */
.config-wrap { display: grid; grid-template-columns: 240px 1fr; gap: 26px; align-items: start; }
.config-nav { display: flex; flex-direction: column; gap: 6px; padding: 14px; }
.config-nav button { border: 0; background: transparent; text-align: left; padding: 12px 14px; border-radius: 14px; cursor: pointer; color: var(--ink-2); display: flex; gap: 10px; align-items: center; font-size: 14px; }
.config-nav button svg { width: 18px; height: 18px; }
.config-nav button.activo { box-shadow: var(--inset-sm); color: var(--blue-deep); }
.ajuste { display: flex; justify-content: space-between; align-items: center; gap: 18px; padding: 16px 0; border-bottom: 1px solid #dbe6f4; }
.ajuste:last-child { border-bottom: 0; }
.ajuste b { font-weight: 500; display: block; }
.ajuste small { color: var(--ink-3); }
.tabla-usuarios { width: 100%; border-collapse: separate; border-spacing: 0 12px; }
.tabla-usuarios td { background: var(--surface-2); padding: 14px; vertical-align: top; }
.tabla-usuarios td:first-child { border-radius: 16px 0 0 16px; }
.tabla-usuarios td:last-child { border-radius: 0 16px 16px 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 0; padding: 6px 11px; border-radius: 999px; font-size: 12px; cursor: pointer; background: var(--surface); box-shadow: var(--raise-sm); color: var(--ink-2); }
.chip.on { background: var(--grad); color: #fff; box-shadow: var(--glow); }
.estado-tag { font-size: 11px; padding: 3px 9px; border-radius: 999px; font-weight: 500; }
.estado-tag.pendiente { background: #fff1e3; color: #b8651c; }
.estado-tag.activo { background: #e1f6ee; color: #1b7a55; }
select.mini { border: 0; background: var(--surface); box-shadow: var(--inset-sm); border-radius: 10px; padding: 7px 10px; font-size: 13px; }

/* ---------- Directorio RGC ---------- */
.rgc-cabecera, .rgc-fila { display: grid; grid-template-columns: 130px 200px 1fr 230px; gap: 20px; align-items: center; }
.rgc-cabecera { padding: 18px 18px 8px; font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--ink-3); }
.rgc-lista { display: flex; flex-direction: column; gap: 16px; }
.rgc-fila { padding: 16px 18px; border-radius: var(--r-md); background: var(--surface-2); box-shadow: var(--raise-sm); }
.rgc-img { border-radius: 18px; box-shadow: var(--inset-sm); display: grid; place-items: center; overflow: hidden; background: var(--surface); }
.rgc-simbolo { width: 130px; height: 130px; padding: 16px; cursor: pointer; }
.rgc-interp { width: 200px; height: 150px; }
.rgc-img img { width: 100%; height: 100%; object-fit: contain; }
.rgc-interp img { object-fit: contain; padding: 6px; }
.rgc-img svg { width: 100%; height: 100%; }
.rgc-vacio { display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--ink-3); text-align: center; padding: 10px; }
.rgc-vacio svg { width: 28px; height: 28px; }
.rgc-vacio small { font-size: 11px; }
.rgc-datos { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.rgc-nombre { border: 0; background: transparent; font-size: 20px; font-weight: 600; padding: 6px 8px; border-radius: 10px; outline: none; width: 100%; }
.rgc-accion { border: 0; background: var(--surface); box-shadow: var(--inset-sm); border-radius: 12px; padding: 10px 12px; font-size: 13px; color: var(--ink-2); resize: vertical; outline: none; }
.rgc-nombre:focus { box-shadow: var(--inset-sm); }
.rgc-acciones { display: flex; flex-direction: column; gap: 10px; }
.rgc-acciones .btn { padding: 10px 14px; font-size: 13px; }
.rgc-acciones .rgc-borrar { align-self: flex-end; width: 42px; height: 42px; padding: 0; color: var(--danger); }
@media (max-width: 1200px) {
  .rgc-cabecera { display: none; }
  .rgc-fila { grid-template-columns: 110px 160px 1fr; }
  .rgc-simbolo { width: 110px; height: 110px; }
  .rgc-interp { width: 160px; height: 120px; }
  .rgc-acciones { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; }
}
@media (max-width: 600px) {
  .rgc-fila { grid-template-columns: 1fr 1fr; }
  .rgc-simbolo, .rgc-interp { width: 100%; height: 120px; }
  .rgc-datos { grid-column: 1 / -1; }
}

/* ---------- Pie y utilidades ---------- */
.pie { text-align: center; color: var(--ink-3); font-size: 12px; padding: 20px; }
.toast { position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%) translateY(120px); background: var(--ink); color: #fff;
  padding: 12px 20px; border-radius: 14px; font-size: 14px; transition: .3s; z-index: 50; opacity: 0; visibility: hidden; }
.toast.ver { transform: translateX(-50%) translateY(0); opacity: 1; visibility: visible; }
.cargando { display: grid; place-items: center; min-height: 50vh; color: var(--ink-3); }
.spinner { width: 46px; height: 46px; border-radius: 50%; border: 4px solid #d6e3f5; border-top-color: var(--blue); animation: gira 1s linear infinite; margin: 0 auto 14px; }
@keyframes gira { to { transform: rotate(360deg); } }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .estudio { grid-template-columns: 1fr; }
  .login-wrap { grid-template-columns: 1fr; }
  .login-hero { text-align: center; }
  .login-hero p { margin: 0 auto; }
  .hero-grafias { justify-content: center; }
  .contacto-wrap, .config-wrap { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .topbar { padding: 12px 16px; flex-wrap: wrap; }
  .btn.btn-menu { display: inline-flex; margin-left: auto; }
  .menu { display: none; width: 100%; flex-direction: column; align-items: stretch; }
  .menu.abierto { display: flex; }
  .dd-panel { position: static; width: auto; max-height: none; transform: none; display: none; margin-top: 8px; box-shadow: var(--inset-sm); }
  .dd.abierto .dd-panel { display: block; transform: none; }
  main { padding: 22px 16px 50px; }
  .titulo-pagina { font-size: 23px; }
  .login-hero h1 { font-size: 30px; }
  .dos-col { grid-template-columns: 1fr; }
  .escenario { padding: 20px 14px; }
  .tabla-usuarios, .tabla-usuarios tbody, .tabla-usuarios tr, .tabla-usuarios td { display: block; }
  .tabla-usuarios td { border-radius: 0 !important; }
  .tabla-usuarios tr { margin-bottom: 14px; border-radius: 16px; overflow: hidden; }
}

/* ---------- Música de referencia (Configuración) ---------- */
.mu-ayuda { font-size: 13px; color: var(--ink-2); margin: 14px 0; }
.mu-lista { display: flex; flex-direction: column; gap: 14px; }
.mu-fila { display: grid; grid-template-columns: 1fr auto auto auto auto; gap: 18px; align-items: center; padding: 16px 18px; border-radius: var(--r-md); background: var(--surface-2); box-shadow: var(--raise-sm); }
.mu-datos { min-width: 0; }
.mu-datos small { color: var(--ink-3); padding-left: 8px; }
.mu-ajuste { display: flex; gap: 4px; align-items: center; }
.mu-ajuste input { width: 92px; text-align: center; }
.mu-ajuste button { width: 30px; height: 32px; border: 0; border-radius: 10px; background: var(--surface); box-shadow: var(--raise-sm); cursor: pointer; font-weight: 700; }
.mu-acciones { display: flex; gap: 8px; align-items: center; }
.mu-acciones .btn { padding: 10px 14px; font-size: 13px; }
.mu-acciones .rgc-borrar { width: 42px; height: 42px; padding: 0; color: var(--danger); }
@media (max-width: 1100px) { .mu-fila { grid-template-columns: 1fr 1fr; } .mu-datos, .mu-acciones { grid-column: 1 / -1; } }

/* Music en el tablero */
.tb-musica { padding: 4px 0 8px; border-bottom: 1px solid #dbe6f4; margin-bottom: 4px; }
.tb-musica select { width: 100%; margin: 4px 0; }
.tb-musica-estado { font-size: 11px; color: var(--ink-3); line-height: 1.4; }
.tb-pop-fila.bloqueado .toggle { opacity: .4; pointer-events: none; }
.tb-nota { font-size: 11px; color: var(--ink-3); }
.tb-desfase { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.tb-desfase .slider { width: 120px; }
.tb-desfase small { font-size: 11px; color: var(--ink-3); }

/* Instrumento de interpretación de las figuras rítmicas */
.planos-fig { position: relative; width: min(120px, 100%); aspect-ratio: 100 / 34; margin-top: -2px; }
.plano-nota { position: absolute; top: 0; transform: translateX(-50%); aspect-ratio: 1; border-radius: 8px; padding: 2px; background: var(--surface); box-shadow: var(--raise-sm); transition: .1s; }
.plano-nota.vacio { box-shadow: var(--inset-sm); }
.plano-nota svg, .plano-nota img { width: 100%; height: 100%; }
.plano-nota.on { box-shadow: 0 0 0 3px var(--blue), 0 0 14px rgba(61,139,253,.6); transform: translateX(-50%) scale(1.15); }
.fi-fila { display: flex; align-items: center; gap: 8px; padding: 6px 4px; border-bottom: 1px solid #e3ecf7; flex-wrap: wrap; }
.fi-fila b { font-size: 12px; min-width: 64px; }
.fi-figura { width: 30px; height: 30px; }
.fi-golpes { display: flex; gap: 6px; flex-wrap: wrap; margin-left: auto; }
.fi-golpe { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.fi-golpe .ficha { width: 26px; height: 26px; display: grid; place-items: center; color: var(--ink-3); }
.fi-golpe select { border: 0; border-radius: 8px; background: var(--surface); box-shadow: var(--inset-sm); font-size: 11px; padding: 3px 2px; max-width: 64px; }

/* Guardar / Mis ejercicios / editor de casilla */
.tb-guardar { width: 340px; }
.tb-guardar .entrada { margin: 6px 0 12px; }
.tb-guardar-btns { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.tb-mis { width: 360px; padding: 10px; }
.mis-fila { display: flex; align-items: stretch; gap: 6px; margin-bottom: 6px; }
.mis-abrir { flex: 1; text-align: left; border: 0; cursor: pointer; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); box-shadow: var(--raise-sm); display: flex; flex-direction: column; gap: 2px; }
.mis-abrir small { color: var(--ink-3); font-size: 11px; }
.mis-abrir:hover b { color: var(--blue-deep); }
.mis-borrar { border: 0; width: 34px; border-radius: 10px; background: var(--surface); box-shadow: var(--raise-sm); color: var(--danger); cursor: pointer; }
.tb-abierto { margin: -10px 0 16px; font-size: 13px; color: var(--ink-2); }
.tb-celda { width: 340px; top: auto; z-index: 8; }
.fi-todas { border: 0; background: none; color: var(--blue-deep); font-size: 11px; cursor: pointer; align-self: flex-end; padding: 0 2px 6px; }


.tb-celda { width: 360px; }
.ec-figuras { max-height: 220px; overflow-y: auto; padding: 2px 4px 4px 2px; }
.ec-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(40px, 1fr)); gap: 6px; }
.ec-fig { border: 0; padding: 5px; border-radius: 10px; background: var(--surface-2); box-shadow: var(--raise-sm); cursor: pointer; aspect-ratio: 1; }
.ec-fig .ficha { width: 100%; height: 100%; }
.ec-fig:hover { transform: translateY(-1px); }
.ec-fig.on { box-shadow: 0 0 0 2px var(--blue), var(--glow); }
.linea-tiempo .pulso { cursor: pointer; }

/* Texto de interpretación (en lugar de imagen) */
.rgc-texto { padding: 10px; font-size: 22px; font-weight: 700; text-align: center; color: var(--ink); word-break: break-word; }
.rgc-interp-btns { display: flex; gap: 8px; }
.rgc-interp-btns .btn { flex: 1; }
/* Mismo tamaño y posición que la foto de interpretación (cuadro de la misma altura y ancho). */
.tb-texto { width: min(70px, 62%); aspect-ratio: 1; display: grid; place-items: center; padding: 4px; border-radius: 14px; background: var(--surface); box-shadow: var(--raise-sm); font-weight: 700; font-size: clamp(10px, 11cqw, 18px); text-align: center; color: var(--ink); cursor: zoom-in; overflow-wrap: anywhere; line-height: 1.1; overflow: hidden; }
.tb-visor-texto { min-width: min(420px, 80vw); padding: 50px 30px; text-align: center; font-size: clamp(36px, 7vw, 72px); font-weight: 700; color: var(--ink); background: #fff; border-radius: var(--r-md); }

/* ---------- Pantalla de inicio (video + tablero de muestra) ---------- */
.modo-demo .tb-cab { display: none; }
.intro { padding-top: 0; }
/* El video ocupa el área de la página justo debajo del menú (no tapa la barra superior),
   alineado arriba y del mismo ancho que el contenido, para que su último cuadro coincida con el tablero. */
.intro-video { position: fixed; top: var(--alto-barra, 70px); left: 0; right: 0; bottom: 0; z-index: 19; background: var(--bg);
  display: flex; justify-content: center; align-items: flex-start; padding: 16px 28px 0; transition: opacity 1.2s ease, transform 1.2s ease; }
.intro-marco { position: relative; width: min(1224px, 100%); }
.intro-video video { display: block; width: 100%; max-height: calc(100vh - var(--alto-barra, 70px) - 32px); border-radius: var(--r-lg); background: var(--bg); box-shadow: var(--raise); }
.intro-video.fin { opacity: 0; transform: scale(1.06); filter: blur(14px) brightness(1.15); pointer-events: none; }
.intro-video { transition: opacity 1.1s ease, transform 1.1s ease, filter 1.1s ease; }

/* Entrada del título y del tablero al terminar el video */
.intro-titulo { margin: 4px 0 18px; color: #4a6a96; font-weight: 600;
  text-shadow: 2px 3px 6px rgba(120, 150, 195, .45), -1px -1px 2px rgba(255, 255, 255, .9); }
.intro .intro-titulo, .intro .tb-menu, .intro .tb-tablero, .intro .tb-control { opacity: 0; transform: translateY(26px) scale(.98); }
.intro.revelar .intro-titulo, .intro.revelar .tb-menu, .intro.revelar .tb-tablero, .intro.revelar .tb-control { opacity: 1; transform: none; transition: opacity .8s ease, transform .8s cubic-bezier(.2,.8,.2,1); }
.intro.revelar .tb-menu { transition-delay: .08s; }
.intro.revelar .tb-tablero { transition-delay: .15s; }
.intro.revelar .tb-control { transition-delay: .3s; }
.intro.entrando .pulso { animation: aparecer .6s cubic-bezier(.2,.8,.2,1) both; }
.intro.entrando .pulso:nth-child(2) { animation-delay: .1s; }
.intro.entrando .pulso:nth-child(3) { animation-delay: .2s; }
.intro.entrando .pulso:nth-child(4) { animation-delay: .3s; }
@keyframes aparecer { from { opacity: 0; transform: scale(.85); } to { opacity: 1; transform: none; } }
.intro-ctrl { position: absolute; right: 18px; bottom: 18px; display: flex; gap: 10px; }
.intro-ctrl .btn { background: rgba(255,255,255,.85); }
body.con-intro { overflow: hidden; }

.intro-play { position: absolute; inset: 0; border: 0; background: rgba(233,241,251,.35); backdrop-filter: blur(2px); border-radius: var(--r-lg); cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; color: var(--ink); font-size: 18px; }
.intro-play .play-gigante svg { width: 40px; height: 40px; margin-left: 6px; }
.play-gigante { width: 96px; height: 96px; border-radius: 50%; background: var(--grad); color: #fff; display: grid; place-items: center; box-shadow: var(--glow); }

/* Bienvenida sobre el tablero al terminar el video */
.intro-modal { position: fixed; inset: 0; z-index: 75; display: grid; place-items: center; padding: 20px;
  background: rgba(233, 241, 251, .35); backdrop-filter: blur(3px); opacity: 0; transition: opacity .35s ease; }
.intro-modal.visible { opacity: 1; }
.intro-modal-caja { width: min(460px, 100%); padding: 30px 30px 26px; border-radius: 28px; text-align: center;
  background: rgba(246, 250, 255, .92); box-shadow: 0 30px 70px rgba(40, 70, 120, .28), inset 0 1px 0 #fff;
  transform: translateY(18px) scale(.96); transition: transform .45s cubic-bezier(.2,.8,.2,1); }
.intro-modal.visible .intro-modal-caja { transform: none; }
.intro-modal h2 { margin: 0 0 18px; font-size: 24px; color: #4a6a96; text-shadow: 1px 2px 4px rgba(120,150,195,.35); }
.intro-acciones { list-style: none; padding: 0; margin: 0 0 18px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.intro-acciones li { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 8px; border-radius: 18px; background: var(--surface); box-shadow: var(--raise-sm); }
.intro-acciones .ficha { width: 46px; height: 46px; }
.intro-acciones b { font-size: 13px; font-weight: 500; color: var(--ink-2); line-height: 1.3; }
.intro-modal p { color: var(--ink-2); font-size: 14px; line-height: 1.55; margin: 0 0 22px; }
.intro-modal .btn-primario { padding: 14px 34px; font-size: 16px; border-radius: 999px; }
@media (max-width: 480px) { .intro-acciones { grid-template-columns: 1fr; } .intro-acciones li { flex-direction: row; } }

.intro-sugerencia { margin-top: -10px !important; }
.intro-chip { display: inline-block; padding: 2px 10px; border-radius: 999px; background: var(--grad); color: #fff; font-weight: 600; font-size: 13px; white-space: nowrap; }
.tb-iniciar.sugerido { animation: invitar 1.2s ease-in-out infinite; }
@keyframes invitar { 0%, 100% { box-shadow: var(--glow); transform: scale(1); } 50% { box-shadow: 0 0 0 10px rgba(61,139,253,.18), 0 10px 30px rgba(61,139,253,.5); transform: scale(1.06); } }

/* Ejercicio de muestra: la foto del registro que suena crece en su tiempo */
.demo-vivo .tb-foto { transform-origin: 50% 0; transition: transform .14s ease-out, box-shadow .14s ease-out; position: relative; }
.demo-vivo .pulso.actual .tb-foto { transform: scale(2.3); z-index: 4; box-shadow: 0 14px 34px rgba(40, 80, 140, .35); }
.demo-vivo .tb-tablero { padding-bottom: 118px; }
.modo-demo .tb-tablero { transition: padding-bottom .4s ease; }

/* ---------- Pruebas de entrada (después del video) ---------- */
.pr-zona { position: fixed; top: var(--alto-barra, 70px); left: 0; right: 0; bottom: 0; z-index: 18; background: var(--bg);
  display: flex; justify-content: center; align-items: flex-start; padding: 16px 28px; transition: opacity 1s ease, transform 1s ease; }
.pr-zona.fin { opacity: 0; transform: scale(.98); pointer-events: none; }
.pr-prueba { position: relative; width: min(1224px, 100%); height: min(660px, calc(100vh - var(--alto-barra, 70px) - 32px));
  border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--raise); display: flex; flex-direction: column; overflow: hidden; }
.pr-cab { display: flex; justify-content: space-between; align-items: center; padding: 16px 24px; }
.pr-etiqueta { font-weight: 600; color: #4a6a96; text-shadow: 1px 2px 4px rgba(120,150,195,.35); font-size: 18px; }
.pr-marcador { display: flex; align-items: center; gap: 18px; }
.pr-meta { font-size: 14px; color: var(--ink-2); }
.pr-meta b { font-size: 22px; color: var(--blue-deep); }
.pr-reloj { --p: 100; width: 54px; height: 54px; border-radius: 50%; position: relative; display: grid; place-items: center;
  background: conic-gradient(var(--blue) calc(var(--p) * 1%), #d9e5f5 0); }
.pr-reloj::before { content: ""; position: absolute; inset: 6px; border-radius: 50%; background: var(--surface); }
.pr-reloj b, .pr-reloj small { position: relative; }
.pr-reloj b { font-size: 18px; color: var(--ink); }
.pr-reloj small { font-size: 10px; color: var(--ink-3); margin-left: 1px; }
.pr-latido { width: 18px; height: 18px; border-radius: 50%; box-shadow: var(--inset-sm); }
.pr-latido.on { animation: latir .3s ease-out; }
@keyframes latir { 0% { background: var(--blue); box-shadow: 0 0 0 0 rgba(61,139,253,.6); } 100% { background: transparent; box-shadow: 0 0 0 14px rgba(61,139,253,0); } }
.pr-campo { position: relative; flex: 1; margin: 0 18px 10px; border-radius: var(--r-md); box-shadow: var(--inset-sm); }
.pr-pie { display: flex; align-items: center; gap: 12px; justify-content: center; margin: 0 18px 16px; padding: 10px 16px; border-radius: 16px;
  background: var(--surface-2); box-shadow: var(--raise-sm); color: var(--ink-2); font-size: 15px; }
.pr-pie .ficha { width: 34px; height: 34px; flex: none; }
.pr-pie b { color: var(--blue-deep); }
.pr-fig { position: absolute; transform: translate(-50%, -50%); width: clamp(54px, 7vw, 86px); aspect-ratio: 1; border: 0; padding: 12px; border-radius: 22px;
  background: var(--surface-2); box-shadow: var(--raise-sm); cursor: pointer; animation: flotar 4s ease-in-out infinite; transition: opacity .3s; }
.pr-fig .ficha { display: block; width: 100%; height: 100%; }
.pr-fig:hover { box-shadow: var(--raise-sm), 0 0 0 3px rgba(61,139,253,.25); }
.pr-fig.salir { opacity: .15; pointer-events: none; }
@keyframes flotar { 0%, 100% { margin-top: 0; } 50% { margin-top: -8px; } }
.pr-fig.acierto { animation: none; background: transparent; box-shadow: none; }
.pr-orbe { display: grid; place-items: center; width: 100%; height: 100%; border-radius: 50%; color: #fff; font-size: 26px; font-weight: 700;
  background: radial-gradient(circle at 35% 30%, #a8e4ff, #2f8bff 55%, #1146c9); box-shadow: 0 0 18px #3d8bfd, 0 0 40px rgba(61,139,253,.8), inset 0 0 10px rgba(255,255,255,.6);
  animation: orbe .65s ease-out forwards; }
@keyframes orbe { 0% { transform: scale(.4); opacity: 0; } 30% { transform: scale(1.15); opacity: 1; } 70% { transform: scale(1); opacity: 1; } 100% { transform: scale(.2); opacity: 0; } }
.pr-fig.estalla { animation: estallar .45s ease-out forwards; overflow: visible; }
@keyframes estallar { 0% { transform: translate(-50%, -50%) scale(1); } 40% { transform: translate(-50%, -50%) scale(1.3); filter: hue-rotate(-40deg) saturate(3); } 100% { transform: translate(-50%, -50%) scale(.1); opacity: 0; } }
.pr-chispa { position: absolute; left: 50%; top: 50%; width: 9px; height: 9px; border-radius: 50%; background: radial-gradient(#fff3b0, #ff6b3d);
  animation: chispa .55s ease-out forwards; }
@keyframes chispa { from { transform: translate(-50%, -50%); opacity: 1; } to { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(.3); opacity: 0; } }
.pr-aviso { position: absolute; transform: translate(-50%, -100%); font-size: 13px; font-weight: 600; color: #d6453b; background: #fff; padding: 3px 10px;
  border-radius: 999px; box-shadow: var(--raise-sm); pointer-events: none; animation: avisoSube .9s ease-out forwards; }
@keyframes avisoSube { from { opacity: 1; margin-top: 0; } to { opacity: 0; margin-top: -26px; } }
.pr-capa { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(233,241,251,.55); backdrop-filter: blur(3px); z-index: 5; }
.pr-tarjeta { width: min(500px, 92%); text-align: center; padding: 30px; border-radius: 28px; background: rgba(246,250,255,.95);
  box-shadow: 0 30px 70px rgba(40,70,120,.25); animation: entrarTarjeta .45s cubic-bezier(.2,.8,.2,1); }
@keyframes entrarTarjeta { from { transform: translateY(16px) scale(.96); opacity: 0; } to { transform: none; opacity: 1; } }
.pr-tarjeta h2 { margin: 6px 0 12px; color: #4a6a96; text-shadow: 1px 2px 4px rgba(120,150,195,.35); }
.pr-tarjeta p { color: var(--ink-2); line-height: 1.55; margin: 0 0 12px; }
.pr-accion { margin-top: 14px !important; font-size: 15px; }
.pr-accion b { color: var(--blue-deep); }
.pr-nombre { color: var(--blue-deep); }
.pr-objetivo { width: 92px; height: 92px; margin: 0 auto; padding: 16px; border-radius: 26px; background: var(--surface); box-shadow: var(--raise); }
.pr-objetivo .ficha { display: block; width: 100%; height: 100%; }
.pr-tarjeta .btn-primario { padding: 14px 34px; border-radius: 999px; font-size: 16px; margin-top: 8px; }
.pr-conteo { font-size: 96px; font-weight: 700; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pr-icono { width: 72px; height: 72px; margin: 0 auto; border-radius: 50%; display: grid; place-items: center; font-size: 34px; color: #fff; background: linear-gradient(135deg, #fdba74, #f97316); }
.pr-icono.ok { background: radial-gradient(circle at 35% 30%, #a8e4ff, #2f8bff 55%, #1146c9); box-shadow: 0 0 24px rgba(61,139,253,.7); }
.pr-datos { list-style: none; padding: 0; margin: 14px 0 18px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.pr-datos li { padding: 10px 6px; border-radius: 16px; background: var(--surface); box-shadow: var(--raise-sm); display: flex; flex-direction: column; gap: 2px; }
.pr-datos b { font-size: 20px; color: var(--ink); }
.pr-datos small { font-size: 11px; color: var(--ink-3); }
.pr-botones { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* Prueba de atención: círculo = imagen */
.pr-pareja { display: flex; align-items: center; justify-content: center; gap: 16px; margin: 6px 0 14px; }
.pr-igual { font-size: 30px; font-weight: 700; color: var(--ink-3); }
.pr-objetivo-img { padding: 6px; overflow: hidden; }
.pr-objetivo-img img { width: 100%; height: 100%; object-fit: contain; border-radius: 18px; }
.pr-texto { display: grid; place-items: center; width: 100%; height: 100%; font-weight: 700; font-size: 14px; color: var(--ink); text-align: center; line-height: 1.1; }
.pr-pie-img { min-width: 38px; height: 38px; display: grid; place-items: center; padding: 0 6px; border-radius: 10px; overflow: hidden; flex: none; background: #fff; box-shadow: var(--raise-sm); }
.pr-pie-img img { width: 34px; height: 34px; object-fit: contain; display: block; }
.pr-pie .pr-igual { font-size: 20px; }
.pr-img { padding: 5px; overflow: hidden; }
.pr-img img { width: 100%; height: 100%; object-fit: contain; border-radius: 16px; background: #fff; pointer-events: none; }
.pr-fig.elegido { box-shadow: 0 0 0 4px var(--blue), 0 0 22px rgba(61,139,253,.7); animation: none; transform: translate(-50%, -50%) scale(1.12); }
.pr-fig { touch-action: manipulation; -webkit-tap-highlight-color: transparent; user-select: none; }

/* Pruebas en celular y tableta */
@media (max-width: 760px) {
  .pr-zona { padding: 10px; }
  .pr-prueba { height: calc(100vh - var(--alto-barra, 70px) - 20px); height: calc(100dvh - var(--alto-barra, 70px) - 20px); }
  .pr-cab { padding: 12px 14px; flex-wrap: wrap; gap: 8px; }
  .pr-etiqueta { font-size: 15px; }
  .pr-marcador { gap: 10px; }
  .pr-campo { margin: 0 10px 8px; }
  .pr-fig { width: clamp(54px, 17vw, 74px); padding: 9px; border-radius: 18px; }
  .pr-pie { margin: 0 10px 10px; padding: 8px 10px; font-size: 12px; gap: 8px; }
  .pr-pie-texto { display: none; }
  .pr-tarjeta { padding: 22px 18px; }
  .pr-tarjeta h2 { font-size: 21px; }
  .pr-objetivo { width: 76px; height: 76px; }
  .pr-conteo { font-size: 72px; }
  .pr-datos { grid-template-columns: 1fr 1fr 1fr; gap: 6px; }
  .pr-datos b { font-size: 16px; }
  .intro-video { padding: 10px; }
  .intro-ctrl { right: 10px; bottom: 10px; }
  .intro-ctrl .btn { padding: 8px 12px; font-size: 13px; }
}

/* Evaluación de la prueba de atención */
.pr-capa { overflow-y: auto; padding: 12px 0; }
.pr-evaluacion { width: min(560px, 94%); padding: 24px 26px; }
.pr-evaluacion h2 { margin: 4px 0 6px; }
.pr-evaluacion > p { margin-bottom: 8px; }
.pr-resumen { font-size: 15px; color: var(--ink) !important; }
.pr-nivel { display: table; margin: 0 auto 6px; padding: 3px 14px; border-radius: 999px; font-size: 13px; font-weight: 700; }
.pr-nivel.alto { background: #dcfce7; color: #15803d; }
.pr-nivel.medio { background: #fef3c7; color: #b45309; }
.pr-nivel.bajo { background: #ffe4e1; color: #c2410c; }
.pr-habilidades { list-style: none; padding: 0; margin: 10px 0 8px; display: grid; gap: 8px; text-align: left; }
.pr-habilidades li { padding: 10px 14px; border-radius: 16px; background: var(--surface); box-shadow: var(--raise-sm); }
.pr-hab-cab { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.pr-hab-cab b { color: var(--ink); font-size: 14px; }
.pr-hab-cab span { font-size: 12px; font-weight: 700; }
.pr-habilidades .alto .pr-hab-cab span { color: #15803d; }
.pr-habilidades .medio .pr-hab-cab span { color: #b45309; }
.pr-habilidades .bajo .pr-hab-cab span { color: #c2410c; }
.pr-barra { height: 7px; margin: 6px 0 5px; border-radius: 999px; background: rgba(120,150,195,.18); overflow: hidden; }
.pr-barra i { display: block; height: 100%; border-radius: inherit; transition: width .8s ease; }
.pr-habilidades .alto .pr-barra i { background: linear-gradient(90deg, #4ade80, #16a34a); }
.pr-habilidades .medio .pr-barra i { background: linear-gradient(90deg, #fcd34d, #f59e0b); }
.pr-habilidades .bajo .pr-barra i { background: linear-gradient(90deg, #fdba74, #f97316); }
.pr-que { display: block; font-size: 11.5px; color: var(--ink-3); }
.pr-habilidades p { margin: 4px 0 0; font-size: 13px; line-height: 1.4; color: var(--ink-2); }
.pr-cifras { font-size: 11.5px !important; color: var(--ink-3) !important; }
@media (max-width: 760px) {
  .pr-evaluacion { padding: 18px 14px; }
  .pr-resumen { font-size: 14px; }
  .pr-habilidades li { padding: 9px 11px; }
}
.pr-capa { place-items: safe center; overscroll-behavior: contain; }
.pr-evaluacion { margin: auto 0; padding-top: 18px; padding-bottom: 18px; }
.pr-evaluacion .btn-primario { margin-top: 2px; }
.pr-evaluacion .pr-datos { margin: 8px 0 12px; }
@media (min-width: 761px) {
  .pr-evaluacion { width: min(760px, 94%); }
  .pr-habilidades { grid-template-columns: repeat(3, 1fr); }
  .pr-habilidades li { display: flex; flex-direction: column; }
  .pr-hab-cab { flex-direction: column; align-items: flex-start; gap: 0; }
}

/* Video de presentación: subtítulos y pausa al hacer clic */
.intro-video video { cursor: pointer; }
.intro-sub { position: absolute; left: 50%; bottom: 78px; transform: translateX(-50%); width: max-content; max-width: min(88%, 900px); margin: 0;
  padding: 8px 18px; border-radius: 14px; background: rgba(20,35,60,.72); color: #fff; font-size: clamp(14px, 2.1vw, 22px); font-weight: 500;
  line-height: 1.35; text-align: center; white-space: pre-line; pointer-events: none; text-shadow: 0 1px 2px rgba(0,0,0,.4); }
.intro-sub.oculto { display: none; }
.intro-pausa { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.intro-pausa.oculto { display: none; }
.intro-pausa .play-gigante { opacity: .92; }
.intro-pausa .play-gigante svg { width: 40px; height: 40px; margin-left: 6px; }
#intro-subs.apagado { opacity: .6; text-decoration: line-through; }
@media (max-width: 760px) {
  .intro-sub { bottom: 58px; padding: 6px 12px; border-radius: 10px; }
}
.intro-sub.vacio { display: none; }
@media (max-width: 760px) {
  .intro-sub { position: static; transform: none; width: auto; max-width: none; margin: 10px 0 0; min-height: 3.2em;
    display: grid; place-items: center; background: rgba(20,35,60,.82); font-size: 15px; }
  .intro-sub.vacio { display: grid; visibility: hidden; }
  .intro-ctrl { position: static; justify-content: center; flex-wrap: wrap; margin-top: 10px; }
}

/* Prueba de concentración */
.cc-campo { overflow: hidden; }
.cc-fig { position: absolute; width: clamp(80px, 11vw, 130px); aspect-ratio: 1; padding: 16px; border-radius: 28px; background: var(--surface-2);
  box-shadow: var(--raise), 0 0 30px rgba(61,139,253,.25); transform: translate(-50%, -50%); pointer-events: none;
  animation: ccAparecer var(--dur, .5s) ease-out forwards; }
.cc-fig .ficha { display: block; width: 100%; height: 100%; }
@keyframes ccAparecer {
  0% { transform: translate(-50%, -50%) scale(.3); opacity: 0; }
  18% { transform: translate(-50%, -50%) scale(1.12); opacity: 1; }
  30% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  80% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(.85); opacity: 0; }
}
.pr-pie .ficha + .ficha { margin-left: -2px; }
.cc-figuras { display: flex; justify-content: center; gap: 14px; margin: 4px 0 16px; }
.cc-figuras .pr-objetivo { margin: 0; width: 80px; height: 80px; padding: 14px; }
.cc-intriga { font-weight: 600; color: var(--blue-deep) !important; }
.cc-pregunta { display: flex; flex-direction: column; align-items: center; }
.cc-pregunta h2 { animation: ccPregunta .5s cubic-bezier(.2,.8,.2,1); }
@keyframes ccPregunta { from { transform: scale(.85); opacity: 0; } to { transform: none; opacity: 1; } }
.cc-chip { display: inline-block; padding: 3px 12px; border-radius: 999px; background: var(--grad); color: #fff; font-size: 12px; font-weight: 600; }
.cc-objetivo { margin-bottom: 16px; }
.cc-respuesta { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 14px; }
.cc-respuesta input { width: 96px; height: 72px; border: 0; border-radius: 20px; text-align: center; font: inherit; font-size: 38px; font-weight: 700;
  color: var(--blue-deep); background: var(--surface); box-shadow: var(--inset-sm); -moz-appearance: textfield; }
.cc-respuesta input::-webkit-outer-spin-button, .cc-respuesta input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.cc-respuesta input:focus { outline: 3px solid rgba(61,139,253,.45); }
.cc-mas { width: 52px; height: 52px; border: 0; border-radius: 50%; font-size: 28px; font-weight: 600; color: var(--blue-deep); background: var(--surface);
  box-shadow: var(--raise-sm); cursor: pointer; touch-action: manipulation; }
.cc-mas:active { box-shadow: var(--inset-sm); }
.cc-mas:disabled, .cc-respuesta input:disabled { opacity: .6; cursor: default; }
.cc-repaso { width: 100%; }
.cc-repaso.oculto { display: none; }
.cc-fila { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; min-height: 58px; }
.cc-mini { position: relative; width: 50px; height: 50px; padding: 8px; border-radius: 14px; background: var(--surface); box-shadow: var(--raise-sm);
  animation: ccMini .35s cubic-bezier(.2,.8,.2,1); }
.cc-mini .ficha { display: block; width: 100%; height: 100%; }
.cc-mini b { position: absolute; right: -6px; top: -6px; width: 20px; height: 20px; border-radius: 50%; background: var(--blue); color: #fff;
  font-size: 11px; display: grid; place-items: center; }
@keyframes ccMini { from { transform: scale(.2); opacity: 0; } to { transform: none; opacity: 1; } }
.cc-veredicto { margin: 12px 0 6px !important; font-size: 17px; min-height: 1.4em; animation: ccPregunta .4s ease-out; }
.cc-veredicto.ok { color: #15803d !important; font-weight: 600; }
.cc-veredicto.casi { color: #b45309 !important; }
.cc-veredicto.no { color: #c2410c !important; }
@media (max-width: 760px) {
  .cc-fig { width: clamp(70px, 22vw, 96px); padding: 12px; border-radius: 22px; }
  .cc-figuras .pr-objetivo { width: 64px; height: 64px; padding: 10px; }
  .pr-pie span:first-child { font-size: 12px; }
}

/* ---------- Fondo de pantalla completa (ingreso, registro y Mi espacio) ---------- */
/* Capa fija que siempre cubre toda la ventana, aunque se haga zoom o se gire el celular. */
.fondo-app { position: fixed; inset: 0; z-index: -1; opacity: 0; transition: opacity .6s ease; pointer-events: none;
  background:
    radial-gradient(circle at 18% 22%, rgba(120, 190, 255, .55), transparent 42%),
    radial-gradient(circle at 82% 30%, rgba(167, 139, 250, .5), transparent 40%),
    radial-gradient(circle at 60% 85%, rgba(56, 189, 248, .4), transparent 45%),
    linear-gradient(135deg, #0b1e3f 0%, #183a78 45%, #3b2a7a 100%); }
.fondo-app.visible { opacity: 1; }
.fondo-app img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .8s ease; }
.fondo-app.con-imagen img { opacity: 1; }
.fondo-velo { position: absolute; inset: 0; background: linear-gradient(100deg, rgba(8, 20, 45, .62) 0%, rgba(8, 20, 45, .28) 55%, rgba(8, 20, 45, .12) 100%); }
body.con-fondo { background: transparent; }
html:has(body.con-fondo) { background: #0b1e3f; }
body.con-fondo .pie { color: rgba(255, 255, 255, .7); }
body.con-fondo .topbar { background: rgba(240, 246, 255, .78); backdrop-filter: blur(14px); }

/* ---------- Ingreso y registro ---------- */
.acceso { display: grid; grid-template-columns: 1.15fr minmax(320px, 440px); gap: 48px; align-items: center; min-height: calc(100vh - 190px); }
.acceso-marca { color: #fff; text-shadow: 0 4px 24px rgba(0, 0, 0, .35); }
.acceso-marca h1 { margin: 0; font-size: clamp(84px, 13vw, 180px); line-height: .9; font-weight: 700; letter-spacing: .04em;
  background: linear-gradient(180deg, #ffffff 30%, #bfe0ff 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 6px 26px rgba(61, 139, 253, .55)); }
.acceso-nombre { margin: 10px 0 0 6px; font-size: clamp(11px, 1.1vw, 14px); text-transform: uppercase; letter-spacing: .32em; font-weight: 500; opacity: .9; }
.acceso-lema { margin: 22px 0 0 4px; max-width: 520px; font-size: clamp(18px, 2.1vw, 28px); line-height: 1.3; font-weight: 500; }
.acceso-tarjeta { width: 100%; padding: 26px 28px; border-radius: 28px; background: rgba(244, 249, 255, .88); backdrop-filter: blur(18px);
  box-shadow: 0 30px 80px rgba(5, 15, 40, .45), inset 0 1px 0 rgba(255, 255, 255, .7); }
.acceso-pestanas { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 5px; border-radius: 16px; background: var(--surface); box-shadow: var(--inset-sm); margin-bottom: 20px; }
.acceso-pestanas button { border: 0; background: transparent; padding: 10px; border-radius: 12px; font: inherit; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.acceso-pestanas button.activo { background: var(--surface-2); color: var(--blue-deep); box-shadow: var(--raise-sm); }
.acceso-titulo { margin: 0 0 4px; font-size: 21px; font-weight: 600; }
.acceso-sub { margin: 0 0 16px; color: var(--ink-2); font-size: 14px; }
.acceso-tipos { display: grid; gap: 10px; }
.acceso-tipo, .acceso-elegido { display: grid; grid-template-columns: 48px 1fr; align-items: center; column-gap: 14px; text-align: left; width: 100%;
  border: 0; padding: 14px 16px; border-radius: 18px; background: var(--surface-2); box-shadow: var(--raise-sm); font: inherit; color: var(--ink); cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease; }
.acceso-tipo b, .acceso-elegido b { font-size: 16px; }
.acceso-tipo small, .acceso-elegido small { grid-column: 2; color: var(--ink-2); font-size: 13px; }
.acceso-tipo .acceso-tipo-ico { grid-row: span 2; }
.acceso-tipo:hover { transform: translateY(-2px); box-shadow: var(--raise-sm), 0 0 0 3px rgba(61, 139, 253, .35); }
.acceso-tipo-ico { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; color: #fff; background: var(--grad); }
.acceso-tipo-ico svg { width: 26px; height: 26px; }
.acceso-elegido { grid-template-columns: 48px 1fr auto; margin-bottom: 18px; }
.acceso-elegido > span:nth-child(2) { display: flex; flex-direction: column; }
.acceso-cambiar { font-size: 13px; color: var(--blue-deep); font-weight: 600; }
.acceso-cambio { text-align: center; font-size: 13px; color: var(--ink-2); margin: 18px 0 0; }
.acceso-nota { font-size: 12.5px; color: #b45309; margin: -4px 0 14px; }
.acceso .entrada select { flex: 1; border: 0; background: transparent; font: inherit; color: var(--ink); padding: 12px 0; outline: none; }
@media (max-width: 900px) {
  .acceso { grid-template-columns: 1fr; gap: 26px; min-height: 0; }
  .acceso-marca { text-align: center; }
  .acceso-nombre, .acceso-lema { margin-left: 0; }
  .acceso-lema { margin: 14px auto 0; }
  .acceso-tarjeta { max-width: 460px; justify-self: center; padding: 22px 18px; }
}

/* ---------- Mi espacio ---------- */
.espacio { color: #fff; }
.esp-vista { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 6px 8px; border-radius: 14px; margin-bottom: 22px;
  background: rgba(255, 255, 255, .16); backdrop-filter: blur(10px); font-size: 13px; }
.esp-vista span { padding: 0 6px; opacity: .85; }
.esp-vista button { border: 0; padding: 7px 14px; border-radius: 10px; background: transparent; color: #fff; font: inherit; font-weight: 600; cursor: pointer; }
.esp-vista button.activo { background: #fff; color: var(--blue-deep); }
.esp-cab { text-shadow: 0 3px 18px rgba(0, 0, 0, .35); margin-bottom: 24px; }
.esp-tipo { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 8px; border-radius: 999px; background: rgba(255, 255, 255, .18);
  backdrop-filter: blur(8px); font-size: 13px; font-weight: 600; text-shadow: none; }
.esp-tipo svg { width: 20px; height: 20px; }
.esp-cab h1 { margin: 16px 0 2px; font-size: clamp(30px, 4.5vw, 48px); font-weight: 700; }
.esp-cab h2 { margin: 0 0 8px; font-size: clamp(18px, 2.2vw, 24px); font-weight: 500; opacity: .95; }
.esp-cab p { margin: 0; max-width: 620px; line-height: 1.5; opacity: .9; }
.esp-aviso { display: flex; align-items: center; gap: 12px; max-width: 720px; padding: 14px 18px; margin-bottom: 22px; border-radius: 18px;
  background: rgba(255, 244, 228, .94); color: #8a4b12; }
.esp-aviso svg { width: 22px; height: 22px; flex: none; }
.esp-grados { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 24px; }
.esp-grado { display: inline-flex; align-items: center; gap: 10px; padding: 8px 16px 8px 8px; border-radius: 16px; text-decoration: none; color: var(--ink);
  background: rgba(244, 249, 255, .9); backdrop-filter: blur(10px); box-shadow: 0 10px 30px rgba(5, 15, 40, .25); font-weight: 500; }
.esp-grado span { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: var(--grad); color: #fff; font-weight: 700; font-size: 13px; }
.esp-grado:hover { transform: translateY(-2px); }
.esp-vacio { margin: 0 0 24px; padding: 12px 16px; border-radius: 14px; background: rgba(255, 255, 255, .16); backdrop-filter: blur(8px); max-width: 620px; }
.esp-tarjetas { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.esp-tarjeta { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 22px; border-radius: 24px; text-decoration: none; color: var(--ink);
  background: rgba(244, 249, 255, .9); backdrop-filter: blur(14px); box-shadow: 0 20px 50px rgba(5, 15, 40, .3); transition: transform .2s ease; }
a.esp-tarjeta:hover { transform: translateY(-4px); }
.esp-tarjeta.pronto { opacity: .82; }
.esp-ico { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--grad); color: #fff; margin-bottom: 6px; }
.esp-ico svg { width: 24px; height: 24px; }
.esp-tarjeta b { font-size: 17px; }
.esp-tarjeta small { color: var(--ink-2); line-height: 1.45; }
.esp-pronto { position: absolute; top: 16px; right: 16px; font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: #fef3c7; color: #b45309; }

/* ---------- Configuración → Fondos ---------- */
.fd-ayuda { color: var(--ink-2); font-size: 14px; margin-top: 0; }
.fd-lugares { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin: 16px 0 20px; }
.fd-lugar { display: flex; flex-direction: column; gap: 2px; padding: 10px; border-radius: 16px; background: var(--surface-2); box-shadow: var(--raise-sm); }
.fd-lugar small { color: var(--ink-3); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fd-mini { display: grid; place-items: center; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; margin-bottom: 6px;
  background: linear-gradient(135deg, #0b1e3f, #183a78 45%, #3b2a7a); color: rgba(255, 255, 255, .8); font-size: 12px; }
.fd-mini img { width: 100%; height: 100%; object-fit: cover; }
.fd-subir { display: inline-flex; cursor: pointer; margin-bottom: 18px; }
.fd-subir.ocupado { pointer-events: none; opacity: .7; }
.fd-galeria { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.fd-item { margin: 0; border-radius: 18px; overflow: hidden; background: var(--surface-2); box-shadow: var(--raise-sm); }
.fd-item img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.fd-item figcaption { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; }
.fd-item small { color: var(--ink-3); font-size: 12px; }
.fd-usar { font-size: 12px; color: var(--ink-2); margin-top: 6px; }
.fd-borrar { align-self: flex-start; color: #c2410c; font-size: 13px; margin-top: 6px; }
.tipo-tag { display: inline-block; font-size: 11px; padding: 3px 9px; border-radius: 999px; background: #e0ecff; color: var(--blue-deep); font-weight: 500; margin-right: 4px; }
.acceso-marca h1 { text-shadow: none; }

.acceso-metodos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
@media (max-width: 380px) { .acceso-metodos { grid-template-columns: 1fr; } }
.acceso-metodo { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 10px; font-size: 14px; }
.acceso-metodo svg { width: 20px; height: 20px; flex: none; }
.acceso-metodo { min-width: 0; }
@media (max-width: 480px) {
  .acceso-metodos { gap: 6px; }
  .acceso-metodo { padding: 10px 4px; font-size: 13px; gap: 6px; }
  .acceso-metodo svg { width: 18px; height: 18px; }
}

/* ---------- Orbes neón del fondo (ingreso, registro y Mi espacio) ---------- */
.fondo-orbes { position: absolute; inset: 0; overflow: hidden; }
.orbe { position: absolute; display: block; aspect-ratio: 1; mix-blend-mode: screen; will-change: transform;
  --c1: rgba(120, 200, 255, .22); --c2: rgba(61, 139, 253, .07); --borde: rgba(150, 210, 255, .22); --brillo: rgba(80, 160, 255, .28);
  background: radial-gradient(circle at 34% 30%, var(--c1), var(--c2) 58%, transparent 74%);
  box-shadow: 0 0 46px var(--brillo), inset 0 0 26px rgba(170, 220, 255, .16);
  border: 1px solid var(--borde);
  animation: orbeFlotar var(--t, 32s) ease-in-out infinite alternate; animation-delay: var(--d, 0s); }
/* Burbujas que cambian de forma muy lentamente */
.orbe.burbuja { border-radius: 46% 54% 58% 42% / 52% 44% 56% 48%; animation: orbeFlotar var(--t, 32s) ease-in-out infinite alternate, orbeForma 23s ease-in-out infinite alternate; animation-delay: var(--d, 0s); }
/* Figuras geométricas suaves: bordes redondeados y difuminados */
.orbe.cuadro { border-radius: 32% 38% 30% 36%; filter: blur(1.5px); }
.orbe.triangulo, .orbe.hexagono { border: 0; box-shadow: none; background: none; filter: blur(4px) drop-shadow(0 0 18px var(--brillo)); }
.orbe.triangulo::before, .orbe.hexagono::before { content: ""; position: absolute; inset: 0; }
.orbe.triangulo::before { clip-path: polygon(50% 4%, 96% 90%, 4% 90%); background: linear-gradient(160deg, var(--c1), var(--c2) 75%); }
.orbe.hexagono::before { clip-path: polygon(25% 6%, 75% 6%, 98% 50%, 75% 94%, 25% 94%, 2% 50%); background: radial-gradient(circle at 40% 35%, var(--c1), var(--c2) 75%); }
/* Colores: azul, cian, violeta y ámbar (como los puntos de luz de la imagen) */
.orbe.o3, .orbe.o7 { --c1: rgba(255, 180, 110, .26); --c2: rgba(255, 140, 60, .08); --borde: rgba(255, 200, 150, .18); --brillo: rgba(255, 160, 80, .22); }
.orbe.o2, .orbe.o6 { --c1: rgba(180, 150, 255, .28); --c2: rgba(124, 92, 250, .09); --borde: rgba(200, 180, 255, .2); --brillo: rgba(140, 110, 255, .26); }
.orbe.o5 { --c1: rgba(110, 230, 255, .26); --c2: rgba(40, 190, 230, .08); --borde: rgba(150, 235, 255, .2); --brillo: rgba(60, 200, 240, .24); }
/* Posiciones: varias detrás del título (izquierda) y del panel (derecha) */
.orbe.o1 { width: 34vmin; left: 3%;  top: 26%; --t: 38s; }
.orbe.o2 { width: 15vmin; left: 31%; top: 58%; --t: 31s; --d: -9s; transform: rotate(18deg); }
.orbe.o3 { width: 11vmin; left: 14%; top: 72%; --t: 27s; --d: -4s; }
.orbe.o4 { width: 40vmin; right: 5%; top: 14%; --t: 41s; --d: -15s; }
.orbe.o5 { width: 20vmin; right: 26%; top: 62%; --t: 34s; --d: -7s; }
.orbe.o6 { width: 13vmin; right: 3%;  top: 74%; --t: 29s; --d: -12s; }
.orbe.o7 { width: 7vmin;  left: 44%; top: 14%; --t: 25s; --d: -3s; }
.orbe.o8 { width: 9vmin;  left: 8%;  top: 12%; --t: 36s; --d: -18s; }
@keyframes orbeFlotar {
  0%   { translate: 0 0; rotate: 0deg; }
  50%  { translate: 14px -22px; rotate: 6deg; }
  100% { translate: -12px 16px; rotate: -5deg; }
}
@keyframes orbeForma {
  0%   { border-radius: 46% 54% 58% 42% / 52% 44% 56% 48%; }
  50%  { border-radius: 58% 42% 45% 55% / 44% 58% 42% 56%; }
  100% { border-radius: 42% 58% 52% 48% / 58% 46% 54% 42%; }
}
@media (max-width: 760px) {
  .orbe.o1 { width: 46vmin; left: -8%; top: 14%; }
  .orbe.o4 { width: 52vmin; right: -12%; top: 48%; }
  .orbe.o5 { right: 50%; top: 80%; }
}
/* Quien prefiere menos movimiento en su sistema ve los orbes quietos */
@media (prefers-reduced-motion: reduce) { .orbe { animation: none !important; } }
/* Tipografía de la pantalla de ingreso: «PMN» en Sora y los textos de abajo en Plus Jakarta Sans. */
.acceso-marca h1 { font-family: 'Sora', var(--font); font-weight: 800; letter-spacing: -.02em; }
.acceso-nombre, .acceso-lema { font-family: 'Plus Jakarta Sans', var(--font); font-weight: 500; }

/* Ingreso: título y acceso simplificado a la izquierda, video de presentación a la derecha */
.acceso { grid-template-columns: minmax(340px, .85fr) 1.15fr; gap: 44px; }
.acceso-izq { display: flex; flex-direction: column; gap: 26px; }
.acceso-marca h1 { font-size: clamp(72px, 8.5vw, 150px); }
.acceso-izq .acceso-tarjeta { max-width: 440px; padding: 22px 24px; }
.acceso-dos { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.acceso-dos .btn { padding: 14px 10px; font-size: 16px; font-weight: 600; justify-content: center; }
.acceso-volver { display: inline-block; margin: 0 0 12px; font-size: 14px; }
.acceso-video .intro-marco { position: relative; width: 100%; }
.acceso-video video { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 24px; background: #050c1c;
  box-shadow: 0 30px 80px rgba(5, 15, 40, .55), 0 0 0 1px rgba(150, 200, 255, .15); cursor: pointer; }
.acceso-video .intro-play { border-radius: 24px; }
.acceso-video .intro-sub { bottom: 70px; font-size: clamp(13px, 1.25vw, 18px); }
.acceso-video .intro-ctrl { right: 14px; bottom: 14px; }
.acceso-video .intro-ctrl .btn { padding: 8px 14px; font-size: 13px; }
@media (max-width: 900px) {
  .acceso { grid-template-columns: 1fr; }
  .acceso-izq { align-items: center; }
  .acceso-izq .acceso-tarjeta { width: 100%; }
}

/* ---------- Tablero holográfico de la persona ---------- */
.esp-cab.compacto { margin-bottom: 18px; }
.esp-cab.compacto h1 { font-size: clamp(26px, 3.4vw, 36px); margin-top: 10px; }
.esp-cab.compacto h2 { font-size: 17px; }
.esp-cab.compacto p { display: none; }
.holo { position: relative; color: #fff; padding: 26px 30px 22px; border-radius: 28px;
  background: linear-gradient(135deg, rgba(130, 195, 255, .40), rgba(70, 140, 230, .24) 48%, rgba(120, 185, 255, .34));
  backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%);
  border: 1.5px solid rgba(175, 228, 255, .7);
  box-shadow: 0 0 0 1px rgba(90, 180, 255, .25), 0 0 34px rgba(80, 170, 255, .5), inset 0 0 46px rgba(170, 220, 255, .2), 0 34px 90px rgba(0, 10, 40, .5);
  transform: perspective(2200px) rotateY(5deg) rotateX(1.5deg); transform-origin: left center; }
.holo-marca { display: block; margin: -4px 0 14px 4px; font: 800 34px 'Sora', var(--font); letter-spacing: .02em; color: rgba(255, 255, 255, .78);
  text-shadow: 0 0 18px rgba(140, 210, 255, .8); }
.holo-cuerpo { display: grid; grid-template-columns: 220px 1fr; gap: 26px; padding: 20px; border-radius: 20px;
  border: 1px solid rgba(205, 238, 255, .4); background: rgba(255, 255, 255, .05); }
/* Nivel cognitivo */
.holo-nivel { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 16px 12px; border-radius: 18px;
  border: 1px solid rgba(205, 238, 255, .35); background: rgba(255, 255, 255, .07); text-align: center; }
.holo-rotulo { font-size: 15px; font-weight: 500; opacity: .95; }
.holo-medidor { position: relative; width: 150px; aspect-ratio: 1; display: grid; place-items: center; }
.holo-medidor svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.holo-pista { fill: none; stroke: rgba(255, 255, 255, .16); stroke-width: 10; }
.holo-arco { fill: none; stroke: #4fdcff; stroke-width: 10; stroke-linecap: round; filter: drop-shadow(0 0 6px #33c8ff); transition: stroke-dashoffset 1.2s cubic-bezier(.2,.8,.2,1); }
.holo-medidor b { font: 700 46px 'Sora', var(--font); text-shadow: 0 0 16px rgba(120, 220, 255, .7); }
.holo-medidor small { font-size: 22px; margin-left: 2px; }
.holo-barras { display: flex; align-items: flex-end; gap: 4px; height: 26px; }
.holo-barras i { width: 7px; height: var(--h); border-radius: 2px; background: linear-gradient(180deg, #7ff0ff, #1fb6ff); box-shadow: 0 0 8px rgba(60, 200, 255, .8); }
.holo-barras i.vacia { background: rgba(255, 255, 255, .25); box-shadow: none; }
.holo-ayuda { font-size: 11.5px; opacity: .8; line-height: 1.35; }
/* Habilidades */
.holo-centro { display: flex; flex-direction: column; gap: 26px; min-width: 0; }
.holo-habilidades { display: flex; flex-wrap: wrap; gap: 12px; }
.holo-pildora { display: inline-flex; align-items: center; gap: 9px; padding: 11px 20px; border-radius: 999px; cursor: pointer; font: inherit; font-size: 15px; color: #fff;
  border: 1.5px solid rgba(195, 232, 255, .65); background: rgba(255, 255, 255, .12); box-shadow: 0 0 14px rgba(90, 180, 255, .35), inset 0 0 12px rgba(200, 235, 255, .15);
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease; }
.holo-pildora svg { width: 22px; height: 22px; }
.holo-pildora:first-child, .holo-pildora:hover { background: rgba(255, 255, 255, .22); box-shadow: 0 0 22px rgba(110, 200, 255, .75), inset 0 0 14px rgba(210, 240, 255, .25); }
.holo-pildora:hover { transform: translateY(-2px); }
.holo-pildora em { font-style: normal; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: rgba(79, 220, 255, .3); }
.holo-pildora.pronto { opacity: .8; }
/* Secuencia de figuras */
.holo-secuencia { display: grid; grid-template-columns: repeat(var(--n), 1fr); gap: 14px; }
.holo-nodo { position: relative; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.holo-nodo:not(:last-of-type)::after { content: ""; position: absolute; top: 37px; left: calc(50% + 44px); width: calc(100% - 88px + 14px); height: 2px;
  background: rgba(225, 246, 255, .85); box-shadow: 0 0 8px rgba(140, 215, 255, .9); }
.holo-figura { width: 76px; height: 76px; display: grid; place-items: center; transition: transform .2s ease, filter .2s ease;
  filter: invert(1) brightness(2) drop-shadow(0 0 6px rgba(150, 220, 255, .9)); }
.holo-figura svg, .holo-figura img { width: 100%; height: 100%; }
.holo-redondo { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; color: #fff;
  border: 1.5px solid rgba(215, 240, 255, .75); background: rgba(255, 255, 255, .1); box-shadow: 0 0 12px rgba(100, 190, 255, .45); }
.holo-redondo svg { width: 22px; height: 22px; }
.holo-redondo:hover { background: rgba(255, 255, 255, .22); }
.holo-foto { width: 100%; max-width: 160px; aspect-ratio: 16 / 10; border-radius: 8px; overflow: hidden; display: grid; place-items: center;
  background: linear-gradient(180deg, #eef6ff, #d6e8fb); box-shadow: 0 6px 18px rgba(0, 20, 60, .3); color: var(--ink); }
.holo-foto img { width: 100%; height: 100%; object-fit: contain; }
.holo-foto b { font-size: 13px; padding: 6px; text-align: center; }
.holo-nodo small { font-size: 12px; font-weight: 600; letter-spacing: .06em; opacity: .85; }
.holo-nodo.activo .holo-figura { transform: scale(1.18); filter: invert(1) brightness(2) drop-shadow(0 0 14px rgba(120, 230, 255, 1)); }
.holo-nodo.activo .holo-foto { box-shadow: 0 0 0 3px #4fdcff, 0 0 24px rgba(79, 220, 255, .8); }
/* Barra del reproductor */
.holo-barra { display: flex; align-items: center; gap: 22px; margin-top: 18px; padding: 12px 22px; border-radius: 16px;
  border: 1px solid rgba(205, 238, 255, .4); background: rgba(255, 255, 255, .06); }
.holo-onda { display: flex; align-items: center; gap: 3px; height: 30px; }
.holo-onda i { width: 3px; height: var(--a); border-radius: 2px; background: #7fe6ff; box-shadow: 0 0 6px rgba(80, 210, 255, .8); }
.holo-onda.viva i { animation: ondaViva .9s ease-in-out infinite alternate; animation-delay: calc(var(--k) * -.07s); }
@keyframes ondaViva { from { transform: scaleY(.35); } to { transform: scaleY(1); } }
.holo-avance { position: relative; flex: 1; height: 3px; border-radius: 2px; background: rgba(255, 255, 255, .25); }
.holo-avance i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 2px; background: #4fdcff; box-shadow: 0 0 10px #33c8ff; transition: width .25s ease; }
.holo-avance i::after { content: ""; position: absolute; right: -6px; top: 50%; width: 12px; height: 12px; border-radius: 50%; transform: translateY(-50%);
  background: #bff3ff; box-shadow: 0 0 10px #4fdcff; }
.holo-controles { display: flex; align-items: center; gap: 10px; }
.holo-controles button { width: 38px; height: 38px; display: grid; place-items: center; border: 0; border-radius: 50%; background: transparent; color: #fff; cursor: pointer; }
.holo-controles button svg { width: 22px; height: 22px; filter: drop-shadow(0 0 6px rgba(130, 210, 255, .8)); }
.holo-controles button.grande svg { width: 30px; height: 30px; }
.holo-controles button:hover { background: rgba(255, 255, 255, .14); }
@media (max-width: 1000px) {
  .holo { transform: none; padding: 20px 18px 18px; }
  .holo-cuerpo { grid-template-columns: 1fr; padding: 14px; }
  .holo-nivel { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 14px; }
  .holo-medidor { width: 120px; }
  .holo-medidor b { font-size: 36px; }
}
@media (max-width: 600px) {
  .holo-marca { font-size: 26px; }
  .holo-habilidades { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .holo-pildora { padding: 9px 12px; font-size: 13px; justify-content: center; }
  .holo-pildora svg { width: 18px; height: 18px; }
  .holo-secuencia { gap: 8px; }
  .holo-figura { width: 50px; height: 50px; }
  .holo-nodo:not(:last-of-type)::after { top: 24px; left: calc(50% + 30px); width: calc(100% - 60px + 8px); }
  .holo-redondo { width: 36px; height: 36px; }
  .holo-redondo svg { width: 18px; height: 18px; }
  .holo-nodo small { font-size: 10px; }
  .holo-barra { gap: 12px; padding: 10px 12px; }
  .holo-onda { display: none; }
}
@media (max-width: 600px) {
  .holo-habilidades { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .holo-pildora { min-width: 0; gap: 6px; padding: 9px 8px; font-size: 12.5px; }
  .holo-pildora span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .holo-pildora em { font-size: 10.5px; padding: 1px 6px; }
  .holo-cuerpo, .holo-centro, .holo-secuencia { min-width: 0; }
}
@media (max-width: 600px) { .holo-pildora em { display: none; } }

/* ---------- Tablero holográfico v2: indicadores arriba y el tablero completo debajo ---------- */
.holo { transform: none; }  /* derecho, sin inclinación */
.holo-cab { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; margin-bottom: 18px; }
.holo-cab .holo-marca { margin: 0 6px 0 4px; }
.holo-indicadores { flex: 1; display: flex; align-items: center; gap: 22px; flex-wrap: wrap; min-width: 0; }
.holo-indicadores .holo-nivel { flex-direction: row; align-items: center; gap: 14px; padding: 10px 18px 10px 12px; text-align: left; }
.holo-indicadores .holo-medidor { width: 92px; }
.holo-indicadores .holo-medidor b { font-size: 28px; }
.holo-indicadores .holo-medidor small { font-size: 14px; }
.holo-indicadores .holo-arco, .holo-indicadores .holo-pista { stroke-width: 11; }
.holo-nivel-texto { display: flex; flex-direction: column; gap: 6px; max-width: 170px; }
.holo-indicadores .holo-habilidades { flex: 1; }
/* El tablero de entrenamiento dentro del vidrio */
.holo .tb-menu { background: rgba(255, 255, 255, .08); border: 1px solid rgba(205, 238, 255, .4); box-shadow: inset 0 0 16px rgba(170, 220, 255, .12); }
.holo .tb-menu .dd-boton { color: #fff; }
.holo .tb-menu .dd-boton b { color: #9fe9ff; }
.holo .tb-menu .dd-boton:hover, .holo .tb-menu .dd.abierto > .dd-boton { background: rgba(255, 255, 255, .16); box-shadow: 0 0 14px rgba(110, 200, 255, .5); }
.holo .tb-abierto { color: #dff4ff; }
.holo .tb-tablero { background: rgba(255, 255, 255, .07); border: 1px solid rgba(205, 238, 255, .42);
  box-shadow: inset 0 0 40px rgba(170, 220, 255, .14), 0 0 22px rgba(80, 170, 255, .25); }
.holo .linea-tiempo .ficha svg, .holo .planos-fig svg { filter: invert(1) brightness(2) drop-shadow(0 0 6px rgba(150, 220, 255, .9)); }
.holo .pulso::after { background: rgba(225, 246, 255, .75); box-shadow: 0 0 8px rgba(140, 215, 255, .9); }
.holo .pulso .nro { color: rgba(255, 255, 255, .7); }
.holo .pulso .etq { color: #fff; }
.holo .pulso.actual .nro { color: #9fe9ff; }
.holo .ficha.vacia { color: rgba(255, 255, 255, .7); box-shadow: inset 0 0 0 1.5px rgba(205, 238, 255, .5); }
.holo .linea-tiempo.varios .compas { box-shadow: none; border: 1px solid rgba(205, 238, 255, .3); background: rgba(255, 255, 255, .04); }
.holo .tb-control { background: rgba(255, 255, 255, .09); border: 1px solid rgba(205, 238, 255, .42); color: #fff;
  box-shadow: inset 0 0 30px rgba(170, 220, 255, .12), 0 0 22px rgba(80, 170, 255, .25); }
.holo .bpm-box .valor { color: #fff; text-shadow: 0 0 14px rgba(120, 220, 255, .7); }
.holo .bpm-box .valor small { color: rgba(255, 255, 255, .75); }
.holo .tb-compas-actual { color: rgba(255, 255, 255, .8); }
.holo .contador-pulso i { box-shadow: inset 0 0 0 1.5px rgba(205, 238, 255, .5); }
/* Ventanas emergentes del tablero: siguen claras para leerse bien */
.holo .dd-panel, .holo .tb-pop, .holo .tb-lista, .holo .tb-visor, .holo .tb-conteo { color: var(--ink); }
/* Proyectar: la pantalla completa conserva el fondo oscuro del espacio */
.holo .tb-escena:fullscreen { background: linear-gradient(rgba(8, 20, 45, .55), rgba(8, 20, 45, .55)), url('../img/fondos/fondo-1.webp') center / cover, #0b1e3f; color: #fff; }
@media (max-width: 1000px) {
  .holo-indicadores .holo-nivel { flex: 1 1 100%; justify-content: center; }
}
@media (max-width: 600px) {
  .holo-cab { gap: 12px; }
  .holo-indicadores { gap: 12px; }
  .holo-indicadores .holo-medidor { width: 80px; }
}
/* Botones redondos claros del tablero (ajustes y stop) en versión vidrio */
.holo .tb-ajustes .btn-redondo, .holo .tb-control #stop { background: rgba(255, 255, 255, .14); color: #fff; border: 1.5px solid rgba(215, 240, 255, .7);
  box-shadow: 0 0 14px rgba(100, 190, 255, .45); }
.holo .tb-ajustes .btn-redondo:hover, .holo .tb-control #stop:hover { background: rgba(255, 255, 255, .24); }
.holo .tb-ajustes .btn-redondo svg, .holo .tb-control #stop svg { color: #fff; }
.holo-indicadores .holo-pildora { padding: 10px 16px; font-size: 14px; }
@media (max-width: 600px) {
  .holo-cab { flex-direction: column; align-items: stretch; }
  .holo-cab .holo-marca { margin: 0; }
  .holo-indicadores .holo-nivel { justify-content: flex-start; }
  .holo-indicadores .holo-pildora svg { display: none; }
  .holo-indicadores .holo-pildora span { overflow: visible; }
  .holo .tb-opciones { width: 100%; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
  .holo .tb-opc-btn { min-width: 0; width: 100%; padding: 8px 4px; }
  .holo .tb-opc { min-width: 0; }
}

/* ---------- Línea del Índice: menú con íconos y habilidades al lado ---------- */
.tb-fila { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 22px; }
.tb-fila .tb-menu { margin-bottom: 0; }
.tb-menu-iconos .dd-boton { gap: 6px; }
.tb-menu-iconos > .dd-boton, .tb-menu-iconos .dd > .dd-boton[data-tip] { padding: 9px 11px; }
.tb-menu-iconos .dd-boton svg { width: 21px; height: 21px; }
.tb-menu-extra { flex: 1; min-width: 0; }
.tb-menu-extra .holo-habilidades { display: flex; flex-wrap: wrap; gap: 8px; padding: 6px; border-radius: 18px;
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(205, 238, 255, .4); box-shadow: inset 0 0 16px rgba(170, 220, 255, .12); }
.tb-menu-extra .holo-pildora { padding: 8px 13px; font-size: 13px; gap: 7px; }
.tb-menu-extra .holo-pildora svg { width: 19px; height: 19px; }
.tb-menu-extra .holo-pildora:first-child { background: rgba(255, 255, 255, .12); box-shadow: 0 0 14px rgba(90, 180, 255, .35), inset 0 0 12px rgba(200, 235, 255, .15); }
.tb-menu-extra .holo-pildora:hover { background: rgba(255, 255, 255, .22); box-shadow: 0 0 22px rgba(110, 200, 255, .75), inset 0 0 14px rgba(210, 240, 255, .25); }
/* Nombre del botón al pasar el mouse */
[data-tip] { position: relative; }
[data-tip]:hover::after, [data-tip]:focus-visible::after { content: attr(data-tip); position: absolute; left: 50%; top: calc(100% + 8px); transform: translateX(-50%);
  white-space: nowrap; padding: 5px 10px; border-radius: 8px; background: rgba(10, 25, 55, .92); color: #fff; font-size: 12px; font-weight: 500;
  box-shadow: 0 6px 18px rgba(0, 10, 40, .35); pointer-events: none; z-index: 30; }
.dd.abierto > [data-tip]::after { display: none; }
@media (max-width: 600px) {
  .tb-fila { gap: 10px; }
  .tb-fila .tb-menu { width: 100%; justify-content: space-between; }
  .tb-menu-extra { flex-basis: 100%; }
  .tb-menu-extra .holo-habilidades { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tb-menu-extra .holo-pildora { justify-content: flex-start; text-align: left; line-height: 1.15; }
  .tb-menu-extra .holo-pildora span { white-space: normal; }
  .tb-menu-extra .holo-pildora svg { display: block; flex: none; }
}
/* Habilidades como pestañas compactas (ícono arriba, nombre abajo) para que quepan en una línea */
.tb-menu-extra .holo-habilidades { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.tb-menu-extra .holo-pildora { position: relative; flex-direction: column; justify-content: center; gap: 4px; min-width: 0; padding: 7px 6px; border-radius: 14px;
  font-size: 11.5px; line-height: 1.15; text-align: center; }
.tb-menu-extra .holo-pildora span { white-space: normal; overflow: visible; }
.tb-menu-extra .holo-pildora svg { display: block; width: 20px; height: 20px; }
.tb-menu-extra .holo-pildora em { display: block; position: absolute; top: -7px; right: -4px; font-size: 10px; padding: 1px 6px; background: #1fb6ff; color: #fff; box-shadow: 0 0 8px rgba(60, 200, 255, .8); }
.tb-fila { flex-wrap: nowrap; align-items: stretch; }
.tb-fila .tb-menu { align-items: center; flex: none; }
@media (max-width: 1100px) { .tb-fila { flex-wrap: wrap; } .tb-menu-extra { flex-basis: 100%; } }
@media (max-width: 600px) {
  .tb-menu-extra .holo-habilidades { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tb-menu-extra .holo-pildora { justify-content: center; text-align: center; padding: 8px 4px; }
}

/* ---------- Tablerito junto al controlador: nivel desarrollado o registros de entrenamiento ---------- */
.holo .tb-control { max-width: none; }
.tb-control-extra { flex: none; }
.holo-tarjeta { display: flex; align-items: center; gap: 14px; padding: 10px 16px 10px 12px; border-radius: 18px; color: #fff; min-width: 290px;
  border: 1px solid rgba(205, 238, 255, .45); background: rgba(255, 255, 255, .08); box-shadow: inset 0 0 18px rgba(170, 220, 255, .14), 0 0 16px rgba(80, 170, 255, .22); }
.holo-tarjeta .holo-medidor { width: 92px; }
.holo-tarjeta .holo-medidor b { font-size: 26px; }
.holo-tarjeta .holo-medidor small { font-size: 13px; }
.holo-tarjeta .holo-arco, .holo-tarjeta .holo-pista { stroke-width: 11; }
.holo-tarjeta .holo-rotulo { font-size: 12px; opacity: .85; text-transform: uppercase; letter-spacing: .06em; }
.holo-que { font-size: 15px; color: #9fe9ff; text-shadow: 0 0 10px rgba(120, 220, 255, .6); }
.holo-tarjeta .holo-nivel-texto { gap: 5px; max-width: 180px; }
.holo-barras i.esta { box-shadow: 0 0 10px #4fdcff, 0 0 0 1.5px #fff; }
.holo-accion { align-self: flex-start; margin-top: 2px; padding: 6px 14px; border-radius: 999px; font: inherit; font-size: 12.5px; font-weight: 600; color: #fff; cursor: pointer;
  border: 1.5px solid rgba(195, 232, 255, .7); background: linear-gradient(135deg, rgba(90, 169, 255, .55), rgba(47, 111, 237, .55)); box-shadow: 0 0 14px rgba(90, 180, 255, .5); }
.holo-accion:hover { background: linear-gradient(135deg, rgba(90, 169, 255, .8), rgba(47, 111, 237, .8)); }
.holo-registros { flex-direction: column; align-items: stretch; gap: 8px; padding: 10px 14px; }
.holo-reg-cab { display: flex; flex-direction: column; gap: 1px; }
.holo-datos { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; }
.holo-dato { display: grid; grid-template-columns: 20px auto; grid-template-rows: auto auto; column-gap: 7px; align-items: center; }
.holo-dato svg { grid-row: span 2; width: 18px; height: 18px; color: #7fe6ff; filter: drop-shadow(0 0 4px rgba(80, 210, 255, .8)); }
.holo-dato b { font-size: 15px; line-height: 1.1; }
.holo-dato small { font-size: 10.5px; opacity: .8; line-height: 1.1; }
.holo-registros .holo-ayuda { font-size: 11px; }
/* Pestaña elegida y los dos tipos (ámbitos con un toque violeta) */
.tb-menu-extra .holo-pildora:first-child { background: rgba(255, 255, 255, .12); box-shadow: 0 0 14px rgba(90, 180, 255, .35), inset 0 0 12px rgba(200, 235, 255, .15); }
.tb-menu-extra .holo-pildora.ambito { border-color: rgba(205, 185, 255, .7); }
.tb-menu-extra .holo-pildora.activo { background: rgba(255, 255, 255, .28); border-color: #bff3ff;
  box-shadow: 0 0 24px rgba(110, 210, 255, .85), inset 0 0 14px rgba(220, 245, 255, .3); }
@media (max-width: 1100px) { .tb-control-extra { flex-basis: 100%; display: flex; justify-content: center; } }
@media (max-width: 600px) {
  .holo-tarjeta { min-width: 0; width: 100%; }
  .holo-tarjeta .holo-medidor { width: 80px; }
}
.holo-nivel.holo-tarjeta { flex-direction: row; text-align: left; align-items: center; }
.holo-tarjeta .holo-nivel-texto { align-items: flex-start; }
.tb-menu-extra .holo-pildora.activo::after { content: ""; position: absolute; left: 22%; right: 22%; bottom: -1px; height: 3px; border-radius: 3px;
  background: #7fefff; box-shadow: 0 0 10px #4fdcff, 0 0 18px rgba(79, 220, 255, .8); }

/* Conteo de entrada (One, Two…) con la apariencia holográfica del espacio de la persona */
.holo .tb-conteo { background: rgba(6, 18, 42, .45); backdrop-filter: blur(4px); border-radius: inherit; }
.holo .tb-conteo-caja { color: #fff; background: linear-gradient(135deg, rgba(130, 195, 255, .30), rgba(60, 120, 220, .22) 55%, rgba(120, 185, 255, .28));
  backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%); border: 1.5px solid rgba(175, 228, 255, .75);
  box-shadow: 0 0 0 1px rgba(90, 180, 255, .25), 0 0 40px rgba(80, 170, 255, .55), inset 0 0 36px rgba(170, 220, 255, .2), 0 30px 80px rgba(0, 10, 40, .5); }
.holo .tb-conteo-caja b { font-family: 'Sora', var(--font); font-weight: 800; background: linear-gradient(180deg, #ffffff 30%, #9fe9ff); -webkit-background-clip: text; background-clip: text;
  filter: drop-shadow(0 0 16px rgba(79, 220, 255, .75)); }
.holo .tb-conteo-caja.fuerte b { background: linear-gradient(180deg, #ffffff 25%, #c4b5fd); -webkit-background-clip: text; background-clip: text;
  filter: drop-shadow(0 0 18px rgba(167, 139, 250, .85)); }
.holo .tb-conteo-caja span { color: rgba(220, 242, 255, .85); }
.holo .tb-conteo-puntos i { box-shadow: inset 0 0 0 1.5px rgba(205, 238, 255, .6); }
.holo .tb-conteo-puntos i.on { background: #4fdcff; box-shadow: 0 0 10px #33c8ff, 0 0 18px rgba(79, 220, 255, .7); }

/* Saludo en la parte superior del tablero de la persona, en una sola línea */
.holo-saludo { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 16px; margin: -2px 0 16px 4px; font-weight: 400; }
.holo-saludo b { font: 800 clamp(24px, 2.6vw, 32px) 'Sora', var(--font); letter-spacing: -.01em; color: #fff; text-shadow: 0 0 18px rgba(140, 210, 255, .75); }
.holo-saludo span { font: 500 clamp(15px, 1.6vw, 19px) 'Plus Jakarta Sans', var(--font); color: rgba(220, 242, 255, .9); }
.holo-saludo span::before { content: "·"; margin-right: 12px; color: #7fe6ff; }
@media (max-width: 600px) { .holo-saludo span::before { display: none; } }

/* ---------- Fondo claro (docente y ejercicios compartidos): sin velo oscuro ---------- */
.fondo-app.es-claro { background: linear-gradient(135deg, #f4f8fd, #e4eef9); }
.fondo-app.es-claro .fondo-velo { background: linear-gradient(180deg, rgba(255, 255, 255, .15), rgba(233, 241, 251, .35)); }
.fondo-app.es-claro .orbe { mix-blend-mode: multiply; opacity: .32; }
html:has(body.fondo-claro) { background: #eef3fa; }
body.con-fondo.fondo-claro .pie { color: var(--ink-3); }

/* ---------- Entorno claro del docente: el mismo tablero con vidrio blanco y azul ---------- */
.claro { position: relative; padding: 24px 28px 22px; border-radius: 28px; color: var(--ink);
  background: rgba(255, 255, 255, .55); backdrop-filter: blur(14px) saturate(130%); -webkit-backdrop-filter: blur(14px) saturate(130%);
  border: 1px solid rgba(255, 255, 255, .95); box-shadow: 0 24px 60px rgba(60, 100, 160, .18), inset 0 0 0 1px rgba(190, 215, 245, .5); }
.holo-encabezado { display: flex; align-items: center; justify-content: space-between; gap: 10px 20px; flex-wrap: wrap; margin-bottom: 16px; }
.holo-encabezado .holo-saludo { margin: 0 0 0 4px; }
.claro .holo-saludo b { color: #2c4f86; text-shadow: 1px 2px 6px rgba(120, 150, 195, .35); }
.claro .holo-saludo span { color: var(--ink-2); }
.claro .holo-saludo span::before { color: var(--blue); }
.esp-cursos { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; color: var(--ink-2); }
.esp-cursos > span { font-weight: 600; margin-right: 2px; }
.esp-curso { min-width: 38px; height: 38px; padding: 0 8px; border-radius: 12px; display: grid; place-items: center; text-decoration: none; font-weight: 700; font-size: 13px;
  color: #fff; background: var(--grad); box-shadow: var(--raise-sm); }
.esp-curso:hover { transform: translateY(-2px); }
.esp-cursos small { color: var(--ink-3); }
/* Pestañas y tablerito en versión clara */
.claro .tb-menu-extra .holo-habilidades { background: transparent; border: 0; box-shadow: var(--inset-sm); }
.claro .tb-menu-extra .holo-pildora, .claro .tb-menu-extra .holo-pildora:first-child { color: var(--ink-2); background: var(--surface-2); border: 0; box-shadow: var(--raise-sm); }
.claro .tb-menu-extra .holo-pildora.ambito { box-shadow: var(--raise-sm), inset 0 0 0 1.5px rgba(167, 139, 250, .45); }
.claro .tb-menu-extra .holo-pildora:hover { background: #fff; box-shadow: var(--raise-sm), 0 0 0 3px rgba(61, 139, 253, .2); }
.claro .tb-menu-extra .holo-pildora.activo { color: var(--blue-deep); background: #fff; box-shadow: var(--inset-sm), 0 0 0 2px rgba(61, 139, 253, .45); }
.claro .tb-menu-extra .holo-pildora.activo::after { background: var(--blue); box-shadow: 0 0 8px rgba(61, 139, 253, .6); }
.claro .tb-menu-extra .holo-pildora em { background: var(--blue); }
.claro .holo-tarjeta { color: var(--ink); background: var(--surface-2); border: 0; box-shadow: var(--raise-sm); }
.claro .holo-tarjeta .holo-rotulo { color: var(--ink-3); }
.claro .holo-que { color: var(--blue-deep); text-shadow: none; }
.claro .holo-pista { stroke: #d9e5f5; }
.claro .holo-arco { stroke: var(--blue); filter: drop-shadow(0 0 4px rgba(61, 139, 253, .5)); }
.claro .holo-medidor b { color: var(--ink); text-shadow: none; }
.claro .holo-barras i { background: linear-gradient(180deg, #7cb8ff, #2f6fed); box-shadow: none; }
.claro .holo-barras i.vacia { background: #d9e5f5; }
.claro .holo-barras i.esta { box-shadow: 0 0 0 1.5px var(--blue-deep); }
.claro .holo-accion { border: 0; background: var(--grad); box-shadow: var(--raise-sm); }
.claro .holo-dato svg { color: var(--blue); filter: none; }
.claro .holo-ayuda { color: var(--ink-3); opacity: 1; }
.claro .tb-enviar { color: var(--blue-deep); }
.claro .tb-enviar svg, .holo .tb-enviar svg { width: 21px; height: 21px; }
.claro .tb-escena:fullscreen { background: url('../img/fondos/fondo-2.webp') center / cover, #eef3fa; }

/* ---------- Ventana «Enviar a tus estudiantes» ---------- */
.cp-modal { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 18px; background: rgba(29, 43, 68, .35); backdrop-filter: blur(4px); }
.cp-modal-caja { position: relative; width: min(500px, 100%); padding: 26px 26px 22px; border-radius: 26px; background: var(--surface); box-shadow: 0 30px 80px rgba(20, 40, 80, .35); }
.cp-modal-caja h2 { margin: 0 0 8px; font-size: 21px; color: #2c4f86; }
.cp-nota { margin: 0 0 10px; font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.cp-resumen { display: inline-block; margin: 0 0 16px; padding: 4px 12px; border-radius: 999px; background: #e3efff; color: var(--blue-deep); font-size: 13px; font-weight: 600; }
.cp-modal-caja label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin: 0 0 6px; }
.cp-modal-caja .entrada { margin-bottom: 14px; }
.cp-cerrar { position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; border: 0; border-radius: 50%; background: var(--surface-2); box-shadow: var(--raise-sm); cursor: pointer; color: var(--ink-2); }
.cp-enlace { display: flex; gap: 8px; margin-bottom: 14px; }
.cp-enlace input { flex: 1; min-width: 0; padding: 12px 14px; border: 0; border-radius: 14px; background: var(--surface-2); box-shadow: var(--inset-sm); font: inherit; font-size: 13px; color: var(--ink); }
.cp-acciones { display: flex; gap: 8px; flex-wrap: wrap; }
.cp-acciones .btn { flex: 1 1 140px; justify-content: center; text-decoration: none; font-size: 14px; }

/* ---------- Ejercicio compartido: solo el tablero, en cualquier dispositivo ---------- */
body.modo-compartido .topbar, body.modo-compartido .pie { display: none; }
body.modo-compartido main { max-width: 1280px; padding: 18px 18px 28px; }
.cp { padding: 18px 22px 16px; border-radius: 28px; background: rgba(255, 255, 255, .55); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, .95); box-shadow: 0 24px 60px rgba(60, 100, 160, .18); }
.cp-cab { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; }
.cp-marca { flex: none; width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; color: #fff; background: var(--grad); box-shadow: var(--raise-sm);
  font: 800 16px 'Sora', var(--font); letter-spacing: .02em; }
.cp-cab h1 { margin: 0; font-size: clamp(20px, 3vw, 28px); color: #2c4f86; }
.cp-cab small { color: var(--ink-3); font-size: 13px; }
.cp-ayuda { margin: 12px 0 0; text-align: center; font-size: 13px; color: var(--ink-3); }
.cp-aviso { max-width: 560px; margin: 12vh auto 0; padding: 30px; text-align: center; border-radius: 26px; background: rgba(255, 255, 255, .7); box-shadow: 0 24px 60px rgba(60, 100, 160, .18); }
.cp-aviso h1 { margin: 0 0 10px; color: #2c4f86; font-size: 24px; }
.cp-aviso p { margin: 0; color: var(--ink-2); }
/* En el tablero compartido no se edita: sin menú, sin pulsos/compases/figuras/aleatoria */
.tb-compartido .tb-fila, .tb-compartido .tb-abierto, .tb-compartido .tb-opciones { display: none !important; }
.tb-compartido .linea-tiempo .pulso { cursor: default; }
@media (max-width: 600px) {
  .claro { padding: 18px 14px; }
  .cp { padding: 14px 10px 12px; border-radius: 22px; }
  .cp-marca { width: 42px; height: 42px; font-size: 13px; }
}
.claro .tb-control { max-width: none; }
@media (max-width: 600px) {
  .claro .tb-opciones { width: 100%; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
  .claro .tb-opc-btn { min-width: 0; width: 100%; padding: 8px 4px; }
  .claro .tb-opc { min-width: 0; }
}

/* ---------- «Índice:» desplegable con las pestañas de lo que se entrena ---------- */
.tb-fila { flex-wrap: nowrap; align-items: stretch; }
.tb-menu-iconos #dd-indice { display: none; }   /* en los espacios, el Índice son las pestañas */
.tb-indice-hab { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 6px; border-radius: 18px; box-shadow: var(--inset-sm); flex: 0 1 auto; }
.tb-indice-hab.abierto { flex: 1 1 auto; }
.tb-indice-hab > .dd-boton { flex: none; gap: 8px; white-space: nowrap; }
.tb-indice-hab > .dd-boton b { color: var(--blue-deep); font-weight: 600; }
.tb-indice-flecha { width: 16px !important; height: 16px !important; transition: transform .25s ease; }
.tb-indice-hab.abierto .tb-indice-flecha { transform: rotate(180deg); }
.tb-indice-hab.abierto #ix-hab { display: none; }
.tb-indice-hab .tb-menu-extra { display: none; flex: 1; min-width: 0; }
.tb-indice-hab.abierto .tb-menu-extra { display: block; animation: indiceAbre .3s cubic-bezier(.2,.8,.2,1); }
@keyframes indiceAbre { from { opacity: 0; transform: translateX(-12px); } to { opacity: 1; transform: none; } }
.tb-indice-hab .tb-menu-extra .holo-habilidades { padding: 0; background: transparent; border: 0; box-shadow: none; }
.tb-fila .tb-menu-iconos { flex: none; align-items: center; }
/* Versión vidrio oscuro (persona) */
.holo .tb-indice-hab { background: rgba(255, 255, 255, .08); border: 1px solid rgba(205, 238, 255, .4); box-shadow: inset 0 0 16px rgba(170, 220, 255, .12); }
.holo .tb-indice-hab > .dd-boton { color: #fff; }
.holo .tb-indice-hab > .dd-boton b { color: #9fe9ff; }
.holo .tb-indice-hab > .dd-boton:hover { background: rgba(255, 255, 255, .16); box-shadow: 0 0 14px rgba(110, 200, 255, .5); }
.claro .tb-indice-hab .tb-menu-extra .holo-habilidades { box-shadow: none; }
@media (max-width: 1100px) {
  .tb-fila { flex-wrap: wrap; }
  .tb-indice-hab.abierto { flex-basis: 100%; flex-wrap: wrap; }
  .tb-indice-hab.abierto .tb-menu-extra { flex-basis: 100%; }
}
@media (max-width: 600px) {
  .tb-indice-hab { width: 100%; flex-wrap: wrap; }
  .tb-indice-hab > .dd-boton { flex: 1; }
  .tb-fila .tb-menu-iconos { width: 100%; justify-content: space-around; }
}
/* Las ventanas de Guardar y Mis ejercicios se abren hacia la izquierda (las herramientas están a la derecha) */
.tb-menu-iconos .tb-dd { left: auto; right: 0; }
@media (max-width: 600px) { .tb-menu-iconos .tb-dd { width: min(320px, calc(100vw - 40px)); } }

/* ---------- Programas de entrenamiento (espacio personal) ---------- */
.holo .tb-programas, .claro .tb-programas { color: inherit; }
.tb-programas svg { width: 21px; height: 21px; }
/* Avance en el tablerito de registros */
.prog-avance { display: flex; flex-direction: column; gap: 4px; margin-top: 4px; padding-top: 9px; border-top: 1px solid rgba(205, 238, 255, .3); }
.prog-avance-cab { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.prog-avance-cab small { font-size: 11px; opacity: .8; }
.prog-avance-nivel { font-size: 14px; color: #9fe9ff; }
.prog-avance-ses { font-size: 11.5px; opacity: .85; }
.prog-barra { position: relative; height: 6px; border-radius: 999px; background: rgba(255, 255, 255, .18); overflow: hidden; }
.prog-barra i { position: absolute; inset: 0 auto 0 0; border-radius: inherit; background: linear-gradient(90deg, #7fefff, #1fb6ff); box-shadow: 0 0 8px rgba(60, 200, 255, .8); }
.prog-barra.total { height: 4px; }
.prog-barra.total i { background: linear-gradient(90deg, #c4b5fd, #8b5cf6); box-shadow: 0 0 8px rgba(167, 139, 250, .8); }
.prog-avance-btns { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.holo-accion.suave { background: rgba(255, 255, 255, .1); }
.claro .prog-avance { border-top-color: #d9e5f5; }
.claro .prog-avance-nivel { color: var(--blue-deep); }
.claro .prog-barra { background: #d9e5f5; }
/* Letrero dentro de la pantalla proyectada */
.prog-chip { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px 16px; margin: 0 auto 14px; padding: 10px 20px; border-radius: 18px;
  width: fit-content; max-width: 100%; color: #fff; background: rgba(255, 255, 255, .1); border: 1px solid rgba(205, 238, 255, .5); box-shadow: 0 0 18px rgba(80, 170, 255, .35); }
.prog-chip b { font: 700 15px 'Sora', var(--font); color: #9fe9ff; }
.prog-chip span { font-size: 13.5px; opacity: .9; }
.prog-chip-barra { position: relative; display: block; flex-basis: 100%; height: 4px; border-radius: 999px; background: rgba(255, 255, 255, .2); overflow: hidden; }
.prog-chip-barra > i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, #7fefff, #1fb6ff); transition: width .25s ease; }
.claro .prog-chip { color: var(--ink); background: var(--surface-2); border: 0; box-shadow: var(--raise-sm); }
.claro .prog-chip b { color: var(--blue-deep); }
/* Ventana de los programas (vidrio oscuro en el espacio personal) */
.prog-modal { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 18px; background: rgba(6, 18, 42, .55); backdrop-filter: blur(5px); overflow-y: auto; }
.prog-caja { position: relative; width: min(980px, 100%); max-height: calc(100vh - 36px); overflow-y: auto; padding: 26px 26px 22px; border-radius: 26px; color: #fff;
  background: linear-gradient(135deg, rgba(40, 80, 150, .92), rgba(20, 45, 95, .94)); border: 1.5px solid rgba(175, 228, 255, .6);
  box-shadow: 0 0 40px rgba(80, 170, 255, .45), 0 30px 80px rgba(0, 10, 40, .55); }
.prog-caja h2 { margin: 0 0 6px; font: 800 24px 'Sora', var(--font); }
.prog-intro { margin: 0 0 12px; font-size: 14px; line-height: 1.5; opacity: .9; max-width: 720px; }
.prog-total { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.prog-total .prog-barra { flex: 1; height: 6px; }
.prog-total small { font-size: 12.5px; opacity: .85; white-space: nowrap; }
.prog-niveles { display: grid; gap: 12px; }
.prog-nivel { padding: 14px 16px; border-radius: 18px; background: rgba(255, 255, 255, .07); border: 1px solid rgba(205, 238, 255, .3); }
.prog-nivel.bloqueado { opacity: .55; }
.prog-nivel header { display: flex; align-items: center; gap: 12px; }
.prog-nivel header div { flex: 1; display: flex; flex-direction: column; }
.prog-nivel header b { font-size: 16px; }
.prog-nivel header small { font-size: 12px; opacity: .8; }
.prog-nivel header em { font-style: normal; font-weight: 700; font-size: 13px; color: #9fe9ff; }
.prog-num { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; font: 800 18px 'Sora', var(--font); background: linear-gradient(135deg, #5aa9ff, #2f6fed); box-shadow: 0 0 14px rgba(90, 170, 255, .6); }
.prog-nivel p { margin: 8px 0 10px; font-size: 13px; opacity: .85; }
.prog-sesiones { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.prog-ses { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 9px 6px; border-radius: 14px; cursor: pointer; font: inherit; color: #fff;
  border: 1.5px solid rgba(195, 232, 255, .45); background: rgba(255, 255, 255, .08); transition: transform .15s ease, box-shadow .15s ease; }
.prog-ses:hover:not([disabled]) { transform: translateY(-2px); box-shadow: 0 0 16px rgba(110, 200, 255, .6); }
.prog-ses.siguiente { border-color: #7fefff; background: rgba(79, 220, 255, .18); box-shadow: 0 0 16px rgba(79, 220, 255, .5); }
.prog-ses.hecha { border-color: rgba(134, 239, 172, .7); background: rgba(74, 222, 128, .14); }
.prog-ses[disabled] { cursor: not-allowed; opacity: .6; }
.prog-ses-num { font-weight: 700; font-size: 13px; }
.prog-ses-figs { display: flex; gap: 3px; justify-content: center; }
.prog-ses-figs i { width: 16px; height: 16px; filter: invert(1) brightness(2); }
.prog-ses-figs svg { width: 100%; height: 100%; }
.prog-ses small { font-size: 10.5px; opacity: .8; }
.prog-fin { width: min(480px, 100%); text-align: center; }
.prog-fin .pr-icono { margin-bottom: 8px; }
.prog-fin p { margin: 0 0 10px; opacity: .92; line-height: 1.5; }
.prog-sig em { font-style: normal; font-weight: 700; color: #fde68a; }
.prog-modal .cp-cerrar { background: rgba(255, 255, 255, .14); color: #fff; box-shadow: none; }
@media (max-width: 700px) {
  .prog-caja { padding: 20px 14px 16px; }
  .prog-sesiones { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.prog-modal .btn:not(.btn-primario) { color: #fff; background: rgba(255, 255, 255, .12); border: 1.5px solid rgba(195, 232, 255, .55); box-shadow: 0 0 12px rgba(90, 180, 255, .3); }
.prog-modal .btn:not(.btn-primario):hover { background: rgba(255, 255, 255, .22); }

/* Tablero del docente: vidrio claro con algo de transparencia y sombras más marcadas en los bordes */
.claro { background: rgba(255, 255, 255, .38); border: 1px solid rgba(255, 255, 255, .85);
  box-shadow: 0 30px 70px rgba(40, 80, 140, .28), 0 10px 24px rgba(40, 80, 140, .16), inset 0 0 0 1px rgba(190, 215, 245, .55); }
.claro .tb-tablero, .claro .tb-control { background: rgba(244, 249, 255, .55); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, .9);
  box-shadow: 0 18px 40px rgba(40, 80, 140, .22), 0 4px 12px rgba(40, 80, 140, .12), inset 0 1px 0 rgba(255, 255, 255, .9); }
.claro .tb-indice-hab, .claro .tb-menu { background: rgba(244, 249, 255, .5); border: 1px solid rgba(255, 255, 255, .9);
  box-shadow: 0 10px 24px rgba(40, 80, 140, .18), inset 0 1px 0 rgba(255, 255, 255, .9); }
.claro .holo-tarjeta { background: rgba(255, 255, 255, .6); box-shadow: 0 10px 24px rgba(40, 80, 140, .18); }
.claro .tb-foto { box-shadow: 0 6px 14px rgba(40, 80, 140, .2); }

/* Swiche Registros | Programa del tablerito */
.holo-reg-cab { flex-direction: row !important; align-items: flex-start; justify-content: space-between; gap: 10px; }
.holo-reg-titulo { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.holo-swiche { flex: none; display: flex; padding: 3px; border-radius: 999px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(205, 238, 255, .45); }
.holo-swiche button { border: 0; padding: 5px 11px; border-radius: 999px; font: inherit; font-size: 11.5px; font-weight: 600; color: rgba(255, 255, 255, .8); background: transparent; cursor: pointer; transition: background .2s ease, color .2s ease; }
.holo-swiche button.activo { color: #06223f; background: #7fefff; box-shadow: 0 0 12px rgba(79, 220, 255, .7); }
.holo-registros .prog-avance { margin-top: 0; padding-top: 0; border-top: 0; }
.claro .holo-swiche { background: var(--surface); border: 0; box-shadow: var(--inset-sm); }
.claro .holo-swiche button { color: var(--ink-3); }
.claro .holo-swiche button.activo { color: #fff; background: var(--grad); box-shadow: var(--raise-sm); }

/* Vista «Programa» compacta (misma altura que «Registros») */
.prog-avance { gap: 3px; }
.prog-avance-fila { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.prog-avance-fila small { font-size: 11px; opacity: .8; white-space: nowrap; }
.prog-avance-btns { margin-top: 5px; gap: 6px; }
.prog-avance-btns .holo-accion { padding: 4px 11px; font-size: 11.5px; margin-top: 0; }

/* =====================================================================================
   Espacio de la institución: apariencia clara naranja (no pastel) sobre la imagen de fondo 3
   ===================================================================================== */
.fondo-app[data-lugar="institucion"] .fondo-velo { background: linear-gradient(180deg, rgba(10, 20, 40, .12), rgba(10, 20, 40, .28)); }
/* Los colores de la app se vuelven naranja dentro de este entorno (botones, figuras activas, controles…) */
.naranja { --blue: #f2690d; --blue-deep: #c2410c; --grad: linear-gradient(135deg, #fb923c, #ea580c);
  --glow: 0 0 0 4px rgba(242, 105, 13, .18), 0 6px 18px rgba(234, 88, 12, .35); }
.claro.naranja { background: rgba(255, 247, 240, .86); border-color: rgba(255, 255, 255, .95);
  box-shadow: 0 30px 70px rgba(10, 20, 40, .45), 0 10px 24px rgba(194, 65, 12, .18), inset 0 0 0 1px rgba(253, 186, 116, .55); }
.naranja .holo-saludo b { color: #9a3412; text-shadow: 1px 2px 6px rgba(194, 65, 12, .25); }
.naranja .holo-saludo span::before { color: #ea580c; }
.naranja .tb-tablero, .naranja .tb-control { background: rgba(255, 251, 247, .78); border-color: rgba(255, 237, 213, .95);
  box-shadow: 0 18px 40px rgba(124, 45, 18, .18), 0 4px 12px rgba(124, 45, 18, .1), inset 0 1px 0 #fff; }
.naranja .tb-indice-hab, .naranja .tb-menu { background: rgba(255, 251, 247, .75); border-color: rgba(255, 237, 213, .95); }
.naranja .pulso::after { background: #fdba74; }
.naranja .pulso.actual::before { background: linear-gradient(180deg, rgba(251, 146, 60, .15), rgba(251, 146, 60, .55), rgba(251, 146, 60, .15)); box-shadow: 0 0 24px rgba(234, 88, 12, .5); }
.naranja .tb-menu-extra .holo-pildora.ambito { box-shadow: var(--raise-sm), inset 0 0 0 1.5px rgba(234, 88, 12, .35); }
.naranja .tb-menu-extra .holo-pildora.activo { box-shadow: var(--inset-sm), 0 0 0 2px rgba(234, 88, 12, .5); }
.naranja .holo-barras i { background: linear-gradient(180deg, #fdba74, #ea580c); }
.naranja .holo-pista { stroke: #fde4cf; }
.naranja .prog-barra i { background: linear-gradient(90deg, #fdba74, #ea580c); box-shadow: none; }
.naranja .tb-escena:fullscreen { background: linear-gradient(rgba(255, 247, 240, .72), rgba(255, 247, 240, .72)), url('../img/fondos/fondo-3.webp') center / cover; }

/* ---------- Panel de gestión institucional ---------- */
.gestion { margin-top: 22px; padding: 20px 24px 22px; border-radius: 26px; }
.gestion.claro:not(.naranja) { background: rgba(255, 255, 255, .5); }
.gestion-cab { display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; margin-bottom: 16px; }
.gestion-cab h2 { margin: 0; font: 800 22px 'Sora', var(--font); color: var(--blue-deep); }
.gestion-cab small { color: var(--ink-3); font-size: 13px; }
.gestion-tabs { display: flex; flex-wrap: wrap; gap: 6px; padding: 5px; border-radius: 16px; box-shadow: var(--inset-sm); background: rgba(255, 255, 255, .5); }
.gestion-tabs button { border: 0; padding: 9px 14px; border-radius: 12px; font: inherit; font-size: 14px; font-weight: 600; color: var(--ink-2); background: transparent; cursor: pointer; }
.gestion-tabs button.activo { color: #fff; background: var(--grad); box-shadow: var(--raise-sm); }
.gestion-cuerpo { min-height: 140px; }
.g-ayuda { color: var(--ink-2); font-size: 14px; line-height: 1.5; margin: 0 0 12px; }
.g-grados { margin-bottom: 14px; }
.g-dos { display: grid; grid-template-columns: 280px 1fr; gap: 18px; align-items: start; }
.g-lista { display: flex; flex-direction: column; gap: 8px; }
.g-curso { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; text-align: left; border: 0; padding: 11px 14px; border-radius: 14px; font: inherit; cursor: pointer;
  background: rgba(255, 255, 255, .7); box-shadow: var(--raise-sm); color: var(--ink); }
.g-curso small { color: var(--ink-3); font-size: 12px; }
.g-curso.activo { color: var(--blue-deep); box-shadow: var(--inset-sm), 0 0 0 2px var(--blue); }
.g-nuevo { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.g-nuevo input, .g-nuevo select, .g-asignar input, .g-asignar select, .g-filtros select, .g-pegar textarea {
  flex: 1 1 120px; min-width: 0; padding: 10px 12px; border: 0; border-radius: 12px; font: inherit; font-size: 14px; color: var(--ink); background: rgba(255, 255, 255, .85); box-shadow: var(--inset-sm); }
.g-nuevo .btn { flex: 1 1 100%; justify-content: center; }
.g-docente .btn { flex: 0 0 auto; }
.g-importar { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; padding: 12px; border-radius: 14px; background: rgba(255, 255, 255, .55); box-shadow: var(--inset-sm); }
.g-importar small { color: var(--ink-3); font-size: 12px; line-height: 1.4; }
.g-importar .btn { justify-content: center; cursor: pointer; }
.g-mcp { font-style: italic; }
.g-detalle { padding: 16px 18px; border-radius: 18px; background: rgba(255, 255, 255, .6); box-shadow: var(--raise-sm); min-width: 0; }
.g-det-cab { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 10px; }
.g-det-cab h3 { margin: 0; font-size: 20px; color: var(--blue-deep); }
.g-det-cab small { color: var(--ink-3); }
.g-bloque { display: flex; flex-direction: column; gap: 8px; padding: 10px 0; border-top: 1px solid rgba(194, 65, 12, .12); }
.g-borrar { color: #c2410c; font-size: 13px; }
.g-estudiantes { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; max-height: 340px; overflow-y: auto; }
.g-estudiantes li { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 12px; background: rgba(255, 255, 255, .75); }
.g-estudiantes li > span { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 14px; }
.g-estudiantes li small { color: var(--ink-3); font-size: 12px; }
.g-estudiantes .g-vacio { color: var(--ink-3); font-size: 13px; }
.btn.g-mini { padding: 6px 10px; font-size: 12px; text-decoration: none; }
.g-pegar { display: flex; flex-direction: column; gap: 8px; }
.g-pegar textarea { resize: vertical; }
.g-asignar { display: flex; flex-direction: column; gap: 14px; max-width: 760px; }
.g-campo { display: flex; flex-direction: column; gap: 6px; }
.g-campo > label, .g-fila label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.g-fila { display: flex; gap: 14px; flex-wrap: wrap; }
.g-fila > div { flex: 1 1 200px; display: flex; flex-direction: column; gap: 6px; }
.g-para { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 14px; color: var(--ink); }
.g-para label { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.g-para small { color: var(--ink-3); }
.g-programa { display: flex; gap: 8px; flex-wrap: wrap; }
.g-programa select { flex: 1 1 180px; }
.g-algunos { max-height: 160px; overflow-y: auto; }
.g-asignar .btn-primario { align-self: flex-start; padding: 12px 26px; }
.g-filtros { margin-bottom: 14px; max-width: 560px; }
.g-tabla-envoltura { overflow-x: auto; border-radius: 16px; background: rgba(255, 255, 255, .7); box-shadow: var(--raise-sm); }
.g-tabla { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.g-tabla th { text-align: left; padding: 10px 12px; font-size: 12px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em; border-bottom: 1px solid rgba(194, 65, 12, .15); }
.g-tabla td { padding: 9px 12px; border-bottom: 1px solid rgba(194, 65, 12, .08); vertical-align: middle; }
.g-tabla small { color: var(--ink-3); }
.g-ambito { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 600; }
.g-ambito.visomotora { background: #ffedd5; color: #c2410c; }
.g-ambito.audiomotora { background: #ede9fe; color: #6d28d9; }
.g-nota { display: flex; gap: 6px; align-items: center; }
.g-nota input { width: 64px; padding: 7px 8px; border: 0; border-radius: 10px; font: inherit; text-align: center; background: #fff; box-shadow: var(--inset-sm); }

/* ---------- Entorno del estudiante (su enlace) ---------- */
.est { margin: 0 auto; max-width: 1240px; }
.est-resumen { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; color: var(--ink-2); }
.est-resumen span { padding: 4px 12px; border-radius: 999px; background: rgba(255, 255, 255, .8); box-shadow: var(--raise-sm); }
.est-resumen .est-prom { color: #fff; background: var(--grad); font-weight: 700; }
.est-asignaciones { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; margin-bottom: 18px; }
.est-tarjeta { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; text-align: left; padding: 16px; border: 0; border-radius: 20px; font: inherit; color: var(--ink); cursor: pointer;
  background: rgba(255, 255, 255, .85); box-shadow: 0 14px 30px rgba(124, 45, 18, .16); transition: transform .15s ease, box-shadow .15s ease; }
.est-tarjeta:hover { transform: translateY(-3px); box-shadow: 0 18px 36px rgba(124, 45, 18, .24), 0 0 0 2px var(--blue); }
.est-tarjeta b { font-size: 16px; }
.est-tarjeta small { color: var(--ink-3); font-size: 12px; }
.est-tipo { padding: 2px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.est-tipo.visomotora { background: #ffedd5; color: #c2410c; }
.est-tipo.audiomotora { background: #ede9fe; color: #6d28d9; }
.est-figs { display: flex; gap: 4px; }
.est-figs i { width: 22px; height: 22px; }
.est-figs svg { width: 100%; height: 100%; }
.est-estado { margin-top: 4px; font-size: 13px; font-weight: 600; color: var(--blue-deep); }
.est-tarjeta.hecha .est-estado { color: #15803d; }
.est-vacio { grid-column: 1 / -1; padding: 22px; text-align: center; color: var(--ink-2); border-radius: 18px; background: rgba(255, 255, 255, .7); }
.claro-modal { background: rgba(29, 43, 68, .38); }
.claro-modal .prog-caja { color: var(--ink); background: rgba(255, 251, 247, .97); border: 1px solid #fff; box-shadow: 0 30px 80px rgba(20, 40, 80, .35); }
.claro-modal .prog-caja h2 { color: var(--blue-deep, #c2410c); }
.claro-modal .btn:not(.btn-primario) { color: var(--ink); background: var(--surface-2); border: 0; }
@media (max-width: 900px) {
  .g-dos { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .gestion { padding: 16px 12px; }
  .gestion-tabs { width: 100%; }
  .gestion-tabs button { flex: 1 1 auto; padding: 8px 10px; font-size: 13px; }
  .g-estudiantes li { flex-wrap: wrap; }
}
/* Campos de Asignar y Calificaciones: tamaño normal (en columnas flex el «flex» estiraba la altura) */
.g-asignar input, .g-asignar select, .g-filtros select { flex: none; height: auto; }
.g-asignar input[type="radio"] { flex: none; width: 16px; height: 16px; padding: 0; box-shadow: none; background: none; accent-color: var(--blue); }
.g-asignar input[type="number"] { max-width: 120px; }
.g-asignar .g-fila { flex-direction: row; }
.g-asignar .g-fila > div { flex: 1 1 200px; }
.g-fila.g-campo { flex-direction: row; }

/* ---------- Planes: insignia, compra y demostración ---------- */
.plan-insignia { display: inline-flex; align-items: center; gap: 8px; padding: 5px 6px 5px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 600; }
.plan-insignia.activo { padding-right: 12px; color: #15803d; background: rgba(220, 252, 231, .9); }
.plan-insignia.demo { color: #9a3412; background: rgba(255, 237, 213, .92); }
.holo .plan-insignia.demo { color: #fde68a; background: rgba(255, 255, 255, .12); border: 1px solid rgba(253, 230, 138, .5); }
.holo .plan-insignia.activo { color: #bbf7d0; background: rgba(74, 222, 128, .15); }
.plan-comprar { border: 0; padding: 5px 12px; border-radius: 999px; font: inherit; font-size: 12px; font-weight: 700; color: #fff; cursor: pointer;
  background: linear-gradient(135deg, #fb923c, #ea580c); box-shadow: 0 0 12px rgba(234, 88, 12, .45); }
.compra-caja { width: min(480px, 100%); text-align: left; }
.compra-fin { font-size: 40px; text-align: center; }
.compra-caja h2 { text-align: center; }
.compra-intro { margin: 0 0 14px; line-height: 1.5; opacity: .92; text-align: center; }
.compra-plan { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 16px; margin-bottom: 12px;
  background: rgba(255, 255, 255, .1); border: 1px solid rgba(205, 238, 255, .4); }
.compra-plan > div:first-child { display: flex; flex-direction: column; gap: 3px; }
.compra-plan small { font-size: 12px; opacity: .8; line-height: 1.35; }
.compra-precio { text-align: right; flex: none; }
.compra-precio b { display: block; font: 800 24px 'Sora', var(--font); }
.compra-cant { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; font-weight: 600; font-size: 14px; }
.compra-cant input { width: 110px; padding: 9px 10px; border: 0; border-radius: 12px; font: inherit; text-align: center; background: #fff; box-shadow: var(--inset-sm); }
.compra-total { text-align: right; margin-bottom: 12px; font-size: 15px; }
.compra-total b { font-size: 20px; }
.compra-caja .btn-bloque { margin-top: 6px; justify-content: center; text-decoration: none; }
.compra-nota { margin: 10px 0 0; font-size: 12.5px; opacity: .8; text-align: center; }
.claro-modal .compra-plan { background: #fff; border-color: #fde4cf; }
.est-demo { margin: 0 0 14px; padding: 12px 16px; border-radius: 16px; font-size: 14px; color: #9a3412; background: rgba(255, 237, 213, .92); }
.g-cupos { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 10px 12px; margin-bottom: 6px; border-radius: 14px;
  font-size: 13px; color: #166534; background: rgba(220, 252, 231, .85); }
.g-cupos.sin { color: #9a3412; background: rgba(255, 237, 213, .9); }
.g-activo { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--ink-2); cursor: pointer; }
.g-activo input { accent-color: var(--blue); width: 16px; height: 16px; }
.g-estado { font-size: 11.5px; color: #9a3412; }
.g-estado.si { color: #15803d; }
.pg-sub { margin: 22px 0 6px; font-size: 16px; color: var(--ink); }
.pg-cuenta { margin-left: 6px; padding: 2px 9px; border-radius: 999px; font-size: 12px; color: #fff; background: #ea580c; }
.pg-enlaces { display: grid; gap: 10px; max-width: 620px; }
.pg-enlaces label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.pg-enlaces input { padding: 10px 12px; border: 0; border-radius: 12px; font: inherit; background: var(--surface-2); box-shadow: var(--inset-sm); }
.pg-enlaces .btn { justify-self: start; }
.pg-estado { padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.pg-estado.pendiente { color: #9a3412; background: #ffedd5; }
.pg-estado.confirmado { color: #166534; background: #dcfce7; }
.pg-estado.rechazado { color: #991b1b; background: #fee2e2; }
.claro-modal .cp-cerrar { color: var(--ink-2); background: var(--surface-2); box-shadow: var(--raise-sm); }

/* ---------- Prueba audioperceptiva (asociación audiomotora) ---------- */
.am .pr-cab { padding-bottom: 8px; }
.am-oido { font-size: 22px; }
.am-barra { height: 5px; margin: 0 24px; border-radius: 999px; background: #dbe6f5; overflow: hidden; }
.am-barra i { display: block; height: 100%; width: 0; background: var(--grad); transition: width .4s ease; }
.am-cuerpo { flex: 1; display: grid; place-items: center; padding: 18px; overflow-y: auto; }
.am-inicio { position: static; }
.am-inicio p { color: var(--ink-2); }
.am-fecha { max-width: 260px; margin: 6px auto 14px; }
.am-fecha input { flex: 1; border: 0; background: transparent; font: inherit; padding: 12px; color: var(--ink); }
.am-error { color: #c2410c; font-size: 13px; min-height: 1em; margin: 8px 0 0 !important; }
.am-cuantos { font-size: 20px; }
.am-cuantos b { font-size: 28px; color: var(--blue-deep); }
.am-previa { font-size: 14px; }
.am-item { width: min(760px, 100%); display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.am-num-item { margin: 0; font-size: 13px; color: var(--ink-3); }
.am-titulo { margin: 0; font: 700 clamp(20px, 2.6vw, 28px) 'Sora', var(--font); color: #2c4f86; }
.am-estado { margin: 0; min-height: 1.4em; font-size: 17px; font-weight: 600; color: var(--blue-deep); }
.am-muestra { width: 86px; height: 86px; border-radius: 20px; overflow: hidden; background: #fff; box-shadow: var(--raise-sm); }
.am-muestra img { width: 100%; height: 100%; object-fit: contain; }
.am-pulsos { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.am-pulso { width: clamp(56px, 9vw, 78px); aspect-ratio: 1; border: 0; border-radius: 18px; font: 700 18px 'Sora', var(--font); color: var(--ink-3);
  background: var(--surface-2); box-shadow: var(--raise-sm); cursor: pointer; transition: transform .1s ease, background .1s ease; }
.am-pulso:nth-child(4n+1) { box-shadow: var(--raise-sm), inset 0 -3px 0 rgba(61, 139, 253, .35); }
.am-pulso.luz { background: var(--grad); color: #fff; transform: scale(1.08); }
.am-pulso:disabled { cursor: default; }
.am-pulso:not(:disabled):hover { box-shadow: var(--raise-sm), 0 0 0 3px rgba(61, 139, 253, .35); }
.am-pulso.elegido { background: #dbeafe; color: var(--blue-deep); box-shadow: inset 0 0 0 3px var(--blue); }
.am-tocar { width: min(420px, 100%); padding: 26px; border: 0; border-radius: 22px; font: 600 16px var(--font); color: var(--ink-3); background: var(--surface-2);
  box-shadow: var(--inset-sm); cursor: pointer; touch-action: manipulation; user-select: none; }
.am-tocar.activa { color: var(--blue-deep); box-shadow: var(--inset-sm), 0 0 0 3px rgba(61, 139, 253, .35); }
.am-tocar.golpe { animation: amGolpe .18s ease-out; }
@keyframes amGolpe { from { background: #bfdbfe; } to { background: var(--surface-2); } }
.am-opciones { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.am-grid { display: grid; gap: 12px; width: 100%; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); max-width: 640px; }
.am-grid.n2 { grid-template-columns: repeat(2, minmax(0, 200px)); justify-content: center; }
.am-op { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 12px 8px; min-height: 110px; border: 0; border-radius: 18px;
  font: inherit; color: var(--ink); background: #fff; box-shadow: var(--raise-sm); cursor: pointer; transition: transform .12s ease; }
.am-op:not(:disabled):hover { transform: translateY(-3px); box-shadow: var(--raise-sm), 0 0 0 3px rgba(61, 139, 253, .3); }
.am-op img { width: 64px; height: 64px; object-fit: contain; }
.am-op svg { width: 58px; height: 58px; color: var(--blue-deep); }
.am-op small { font-size: 13px; color: var(--ink-2); }
.am-op.elegido { box-shadow: inset 0 0 0 3px var(--blue); }
.am-op:disabled { cursor: default; }
.am-emoji { font-size: 52px; line-height: 1; }
.am-num { font: 800 24px 'Sora', var(--font); color: var(--blue-deep); }
.am-par { display: flex; gap: 4px; }
.am-par img, .am-par svg { width: 44px !important; height: 44px !important; }
.am-orden { display: flex; gap: 8px; justify-content: center; }
.am-hueco { width: 58px; height: 58px; border-radius: 14px; box-shadow: var(--inset-sm); display: grid; place-items: center; overflow: hidden; }
.am-hueco img { width: 100%; height: 100%; object-fit: contain; }
.am-resp { min-height: 46px; display: flex; flex-direction: column; align-items: center; }
.am-resp b { font-size: 20px; }
.am-resp small { color: var(--ink-2); font-size: 14px; }
.am-resp.bien b { color: #15803d; }
.am-resp.mal b { color: #c2410c; }
@media (max-width: 600px) {
  .am-op { min-height: 92px; }
  .am-op img { width: 52px; height: 52px; }
  .am-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Entrenamiento audiomotor: temas y presentación de sonidos */
.am-temas-caja { width: min(900px, 100%); display: flex; flex-direction: column; align-items: center; gap: 16px; }
.am-temas { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; width: 100%; }
.am-tema { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 130px; padding: 14px 10px; border: 0; border-radius: 18px;
  font: inherit; color: var(--ink); background: #fff; box-shadow: var(--raise-sm); cursor: pointer; transition: transform .12s ease; }
.am-tema:hover { transform: translateY(-3px); box-shadow: var(--raise-sm), 0 0 0 3px rgba(61, 139, 253, .3); }
.am-tema img, .am-tema svg { width: 54px; height: 54px; object-fit: contain; color: var(--blue-deep); }
.am-tema b { font-size: 14px; line-height: 1.25; }
.am-tema .am-emoji { font-size: 42px; }
.am-tema .am-num { font-size: 18px; }
.am-tema .am-par img, .am-tema .am-par svg { width: 34px !important; height: 34px !important; }
.am-presenta { width: 170px; height: 170px; display: grid; place-items: center; border-radius: 30px; background: #fff; box-shadow: var(--raise); animation: entrarTarjeta .4s ease; }
.am-presenta img, .am-presenta svg { width: 120px; height: 120px; object-fit: contain; color: var(--blue-deep); }
.am-presenta .am-emoji { font-size: 96px; }
.am-presenta .am-par { gap: 6px; }
.am-presenta .am-par img, .am-presenta .am-par svg { width: 70px !important; height: 70px !important; }
.am-paso { color: var(--ink-3); }

/* Entorno del estudiante: Escucha (entrenar / evaluar) */
.est-escucha { display: flex; align-items: center; gap: 10px 12px; flex-wrap: wrap; margin-bottom: 16px; padding: 12px 16px; border-radius: 18px;
  background: rgba(255, 255, 255, .85); box-shadow: 0 10px 24px rgba(124, 45, 18, .14); }
.est-escucha > div { flex: 1 1 220px; display: flex; flex-direction: column; gap: 2px; }
.est-escucha b { font-size: 16px; color: var(--ink); }
.est-escucha small { font-size: 12.5px; color: var(--ink-3); }
.est-escucha .btn { padding: 10px 20px; }

.g-grado-curso { display: flex; align-items: center; gap: 8px; margin-top: 6px; font-size: 12.5px; color: var(--ink-2); }
.g-grado-curso select { padding: 6px 8px; border: 0; border-radius: 10px; font: inherit; background: #fff; box-shadow: var(--inset-sm); }

/* Asociación audiomotora dentro del tablero (reemplaza las figuras) */
.holo-audio { display: flex; flex-direction: column; gap: 14px; }
.holo-audio.oculto, .tb-escena.oculto { display: none !important; }
.holo-audio-cab { display: flex; justify-content: center; }
.holo-swiche.grande { padding: 4px; }
.holo-swiche.grande button { padding: 9px 22px; font-size: 14px; }
.holo-audio-cuerpo .pr-prueba { width: 100%; height: auto; min-height: 520px; }
.holo-audio-pie { display: flex; justify-content: flex-end; }
.holo-audio-pie .holo-tarjeta { min-width: 320px; }
@media (max-width: 600px) { .holo-audio-pie .holo-tarjeta { min-width: 0; width: 100%; } .holo-audio-cuerpo .pr-prueba { min-height: 460px; } }

/* «Índice:» con dos acciones: palabras (siguiente opción) y flechita (desplegar) */
.tb-indice-hab > .tb-ix-ciclo { padding-right: 6px; }
.tb-indice-hab > .tb-ix-flecha { flex: none; width: 34px; padding: 8px 0; justify-content: center; border-radius: 12px; }
.holo .tb-indice-hab > .tb-ix-flecha { color: #9fe9ff; }
.tb-indice-hab > .tb-ix-ciclo b { transition: opacity .15s ease; }
.tb-indice-hab > .tb-ix-ciclo:active b { opacity: .5; }
@media (max-width: 600px) { .tb-indice-hab > .tb-ix-flecha { flex: none; } }
/* Atención y concentración dentro del tablero: la prueba necesita altura para su campo */
.holo-audio-cuerpo .pr-prueba { min-height: 560px; }
.holo-audio-cuerpo .pr-campo { min-height: 320px; }

.est-habilidades { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 10px; margin-bottom: 16px; }
.est-habilidades .est-escucha { margin-bottom: 0; }
.g-ambito.atencion { background: #dbeafe; color: #1d4ed8; }
.g-ambito.concentracion { background: #dcfce7; color: #15803d; }
.est-habilidades .est-escucha > div { flex: 1 1 100%; }
.est-habilidades .est-escucha .btn { flex: 1 1 0; justify-content: center; }

/* Entrenamiento guiado: pasos */
.cg-pasos { display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; margin: 4px 0 10px; }
.cg-pasos span { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 700; color: var(--ink-3); background: var(--surface); box-shadow: var(--inset-sm); }
.cg-pasos span.hecho { color: #fff; background: #22c55e; box-shadow: none; }
.cg-pasos span.actual { color: #fff; background: var(--grad); box-shadow: var(--glow); }

.am-presenta.chica { width: 110px; height: 110px; border-radius: 24px; margin: 4px auto 0; }
.am-presenta.chica img, .am-presenta.chica svg { width: 76px; height: 76px; }
.am-presenta.chica .am-emoji { font-size: 60px; }
.cg-consejo { font-size: 14px; color: var(--blue-deep) !important; }

/* ---------- Atención y concentración: ejercicios ---------- */
.cg-cuerpo { flex: 1; display: grid; place-items: center; padding: 16px; overflow-y: auto; }
.cg-fig { display: inline-grid; place-items: center; width: 56px; height: 56px; }
.cg-fig svg, .cg-fig img { width: 100%; height: 100%; }
.cg-escena { width: min(760px, 100%); display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; }
.cg-modelo { display: inline-flex; align-items: center; gap: 10px; padding: 8px 16px; border-radius: 16px; background: #fff; box-shadow: var(--raise-sm); }
.cg-modelo small { font-size: 12px; color: var(--ink-3); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.cg-modelo .cg-fig { width: 42px; height: 42px; }
.cg-modelos { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 6px 0 10px; }
.cg-modelos .cg-fig { width: 64px; height: 64px; padding: 8px; border-radius: 16px; background: #fff; box-shadow: var(--raise-sm); }
.cg-centro { width: 190px; height: 190px; display: grid; place-items: center; border-radius: 30px; background: #fff; box-shadow: var(--raise); }
.cg-centro .cg-fig { width: 130px; height: 130px; }
.cg-centro.grande { width: 210px; height: 210px; }
.cg-fig.aparece { animation: cgAparece .22s cubic-bezier(.2,.8,.2,1); }
@keyframes cgAparece { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }
.cg-tocar.bien { box-shadow: var(--inset-sm), 0 0 0 4px rgba(34, 197, 94, .55); }
.cg-tocar.mal { box-shadow: var(--inset-sm), 0 0 0 4px rgba(234, 88, 12, .55); }
.cg-aviso { text-align: center; animation: entrarTarjeta .4s ease; }
.cg-aviso h2 { font: 800 26px 'Sora', var(--font); color: #c2410c; }
.cg-grilla { display: grid; grid-template-columns: repeat(var(--lado), minmax(0, 1fr)); gap: 8px; width: min(520px, 100%); }
.cg-celda { aspect-ratio: 1; display: grid; place-items: center; padding: 6px; border: 0; border-radius: 14px; background: #fff; box-shadow: var(--raise-sm); cursor: pointer; }
.cg-celda .cg-fig { width: 100%; height: 100%; }
.cg-celda.bien { background: #dcfce7; box-shadow: inset 0 0 0 3px #22c55e; }
.cg-celda.mal { background: #ffedd5; box-shadow: inset 0 0 0 3px #f97316; }
.am-op.bien { box-shadow: inset 0 0 0 3px #22c55e; background: #f0fdf4; }
.am-op.mal { box-shadow: inset 0 0 0 3px #f97316; background: #fff7ed; }
.am-op .cg-fig { width: 60px; height: 60px; }
.am-hueco .cg-fig { width: 40px; height: 40px; }
.am-hueco.mal { box-shadow: inset 0 0 0 3px #f97316; }
.am-tema .cg-fig { width: 50px; height: 50px; }
@media (max-width: 600px) {
  .cg-centro, .cg-centro.grande { width: 150px; height: 150px; }
  .cg-centro .cg-fig { width: 100px; height: 100px; }
  .cg-grilla { gap: 5px; }
}
.cg-grilla { width: min(430px, 100%, 62vh); gap: 6px; }
.cg-celda { padding: 5px; border-radius: 12px; }

/* Presentación del entrenamiento audiomotor: tocar la imagen repite el sonido */
button.am-presenta { position: relative; border: 0; padding: 0; cursor: pointer; touch-action: manipulation; transition: transform .12s ease; }
button.am-presenta:hover { box-shadow: var(--raise), 0 0 0 4px rgba(61, 139, 253, .3); }
button.am-presenta:active { transform: scale(.96); }
button.am-presenta.suena { animation: amSuena .45s ease-out; }
@keyframes amSuena { 0% { box-shadow: var(--raise), 0 0 0 0 rgba(61, 139, 253, .6); } 100% { box-shadow: var(--raise), 0 0 0 22px rgba(61, 139, 253, 0); } }
.am-presenta-oir { position: absolute; right: 8px; bottom: 8px; font-size: 18px; opacity: .75; }

/* ---------- Control master ---------- */
.ms-tabs { margin: 6px 0 16px; width: fit-content; max-width: 100%; }
.ms-bloque { margin-bottom: 18px; padding: 16px; border-radius: 18px; background: var(--surface-2); box-shadow: var(--raise-sm); }
.ms-bloque h4 { margin: 0 0 10px; font-size: 15px; }
.ms-fondos { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 6px; }
.ms-fondo { display: flex; flex-direction: column; gap: 4px; padding: 6px; border: 0; border-radius: 14px; background: #fff; box-shadow: var(--raise-sm); cursor: pointer; font: inherit; text-align: left; }
.ms-fondo img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; }
.ms-fondo small { font-size: 12px; color: var(--ink-2); padding: 0 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ms-fondo.on { box-shadow: 0 0 0 3px var(--blue), var(--raise-sm); }
.ms-campo { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.ms-campo input { padding: 10px 12px; border: 0; border-radius: 12px; font: inherit; font-weight: 400; color: var(--ink); background: #fff; box-shadow: var(--inset-sm); max-width: 520px; }
.ms-campo input[type="number"] { max-width: 120px; }

/* ---------- Códigos promocionales ---------- */
.pr-codigo-fila { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 12px; }
.pr-codigo-fila .ms-campo input, .pr-codigo-fila .ms-campo select { max-width: none; }
.ms-campo select { padding: 10px 12px; border: 0; border-radius: 12px; font: inherit; font-weight: 400; background: #fff; box-shadow: var(--inset-sm); }
.pr-codigos { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.pr-codigo-item { padding: 14px 16px; border-radius: 16px; background: var(--surface-2); box-shadow: var(--raise-sm); }
.pr-codigo-item.vencido { opacity: .65; }
.pr-codigo-cab { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.pr-codigo-cab b { font: 800 17px 'Sora', var(--font); letter-spacing: .03em; color: var(--blue-deep); }
.pr-codigo-item p { margin: 6px 0 2px; font-size: 14px; }
.pr-codigo-item small { color: var(--ink-3); font-size: 12px; }
.pg-codigo { color: #15803d; font-weight: 600; }
@media (max-width: 600px) { .pr-codigo-fila { grid-template-columns: 1fr 1fr; } .pr-codigo-fila label:first-child { grid-column: 1 / -1; } }

/* Código promocional: en la compra y en el enlace */
.compra-promo { display: flex; gap: 8px; margin: 4px 0 8px; }
.compra-promo input { flex: 1; min-width: 0; padding: 10px 12px; border: 0; border-radius: 12px; font: inherit; text-transform: uppercase; background: #fff; box-shadow: var(--inset-sm); color: var(--ink); }
.compra-desc { margin-bottom: 8px; padding: 8px 12px; border-radius: 12px; font-size: 13px; font-weight: 600; }
.compra-desc.oculto { display: none; }
.compra-desc.bien { color: #166534; background: #dcfce7; }
.compra-desc.mal { color: #9a3412; background: #ffedd5; }
.compra-total s { opacity: .55; font-size: 15px; margin-right: 4px; }
.promo-caja { color: var(--ink); }
.promo-regalo { font-size: 56px; }
.promo-codigo { display: flex; flex-direction: column; align-items: center; gap: 4px; margin: 14px auto; padding: 16px; max-width: 360px; border-radius: 18px; border: 2px dashed var(--blue); background: #fff; }
.promo-codigo b { font: 800 26px 'Sora', var(--font); letter-spacing: .05em; color: var(--blue-deep); }
.promo-codigo span { font-weight: 600; color: #166534; }
.promo-codigo small { color: var(--ink-3); }
.promo-nota { font-size: 13px; color: var(--ink-2); }
.promo-caja .pr-botones { justify-content: center; margin-top: 10px; }
.promo-caja { background: rgba(244, 249, 255, .94); box-shadow: 0 30px 80px rgba(5, 15, 40, .45); }

/* ---------- Memoria (MIS con REP, al pulso del metrónomo) ---------- */
.g-ambito.memoria { background: #fce7f3; color: #be185d; }
.mm-metro { display: inline-flex; gap: 5px; align-items: center; }
.mm-metro i { width: 11px; height: 11px; border-radius: 50%; box-shadow: var(--inset-sm); transition: background .08s; }
.mm-metro i:first-child { width: 14px; height: 14px; }
.mm-metro i.on { background: var(--blue); box-shadow: 0 0 10px rgba(61, 139, 253, .8); }
.mm-metro i:first-child.on { background: #f97316; box-shadow: 0 0 12px rgba(249, 115, 22, .85); }
.mm-escena { gap: 12px; }
.mm-fila, .mm-opciones { width: 100%; display: flex; justify-content: center; }
.mm-estado { min-height: 2.6em; }
.mm-prepara { font-size: 13px; font-weight: 600; color: #c2410c; letter-spacing: .03em; }
.mm-centro { min-height: 170px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; }
.mm-centro:empty { min-height: 40px; }
.mm-cosa { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 22px; border-radius: 26px; background: #fff; box-shadow: var(--raise); }
.mm-cosa.aparece { animation: cgAparece .22s cubic-bezier(.2,.8,.2,1); }
.mm-cosa b { font: 800 22px 'Sora', var(--font); color: var(--blue-deep); letter-spacing: .04em; }
.mm-par { display: flex; align-items: center; gap: 14px; }
.mm-par .cg-fig { width: 104px; height: 104px; }
.mm-gesto { width: 104px; height: 104px; object-fit: cover; border-radius: 18px; }
.mm-animal img { width: 124px; height: 124px; object-fit: contain; }
.mm-animal .am-emoji { font-size: 96px; }
.mm-centro.estrella .mm-cosa { background: radial-gradient(circle, #fff7d6, #fde68a); box-shadow: 0 0 0 4px #facc15, 0 0 46px rgba(250, 204, 21, .85); transform: scale(1.12); }
.mm-centro.estrella .mm-cosa::before { content: ''; width: 30px; height: 30px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'%3E%3Cpath d='M12 3l2.7 5.6 6.1.9-4.4 4.3 1 6.1L12 17l-5.4 2.9 1-6.1-4.4-4.3 6.1-.9z'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'%3E%3Cpath d='M12 3l2.7 5.6 6.1.9-4.4 4.3 1 6.1L12 17l-5.4 2.9 1-6.1-4.4-4.3 6.1-.9z'/%3E%3C/svg%3E") center / contain no-repeat; color: #f5b400; display: inline-block; }
.mm-pie { margin: 0; font-size: 16px; color: var(--ink-2); }
.mm-rep { font-size: 92px; line-height: 1; display: inline-block; }
.mm-rep.golpe { animation: mmGolpe .25s ease-out; }
@keyframes mmGolpe { from { transform: scale(1.28); filter: drop-shadow(0 0 18px rgba(249, 115, 22, .9)); } to { transform: scale(1); } }
.mm-cuenta { font: 800 84px 'Sora', var(--font); color: var(--blue-deep); animation: cgAparece .2s ease-out; }
.mm-ojos, .mm-oido { font-size: 78px; line-height: 1; }
.mm-huecos { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.mm-hueco { position: relative; width: 66px; height: 66px; display: grid; place-items: center; border: 0; border-radius: 16px; background: var(--surface); box-shadow: var(--inset-sm); color: var(--ink-3); font-weight: 700; transition: transform .12s, box-shadow .12s; }
.mm-hueco .mm-lleno { display: grid; place-items: center; width: 100%; height: 100%; }
.mm-hueco .cg-fig, .mm-hueco img { width: 46px; height: 46px; object-fit: contain; }
.mm-hueco .am-emoji { font-size: 34px; }
.mm-hueco.ahora { transform: scale(1.12); box-shadow: 0 0 0 3px var(--blue), 0 0 18px rgba(61, 139, 253, .6); background: #fff; }
.mm-hueco.fijo { background: #fff; box-shadow: var(--raise-sm); }
.mm-hueco.bien { box-shadow: inset 0 0 0 3px #22c55e; background: #f0fdf4; }
.mm-hueco.mal { box-shadow: inset 0 0 0 3px #f97316; background: #fff7ed; }
.mm-hueco.tarde { box-shadow: inset 0 0 0 3px #cbd5e1; opacity: .7; }
button.mm-hueco { cursor: pointer; }
.mm-grid { max-width: 720px; }
.mm-grid .am-op { min-height: 92px; padding: 8px 6px; }
.mm-grid .am-op .cg-fig { width: 52px; height: 52px; }
.mm-grid .am-op img { width: 56px; height: 56px; }
.am-op.temprano { animation: mmTemprano .3s; }
@keyframes mmTemprano { 0%, 100% { transform: translateX(0); } 30% { transform: translateX(-5px); } 70% { transform: translateX(5px); } }
.am-op.era, .mm-celda.era { box-shadow: inset 0 0 0 3px #22c55e; background: #f0fdf4; }
.mm-tiempo { display: flex; gap: 6px; justify-content: center; }
.mm-tiempo i { width: 14px; height: 14px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 8px rgba(61, 139, 253, .6); transition: background .15s, box-shadow .15s; }
.mm-tiempo i.ido { background: transparent; box-shadow: var(--inset-sm); }
.mm-compas { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 86px)); gap: 8px; justify-content: center; width: 100%; }
.mm-celda { aspect-ratio: 1; display: grid; place-items: center; padding: 8px; border: 0; border-radius: 16px; background: #fff; box-shadow: var(--raise-sm); transition: transform .1s, box-shadow .1s; }
.mm-celda:not(:disabled) { cursor: pointer; }
.mm-celda .cg-fig { width: 100%; height: 100%; }
.mm-celda.ahora { transform: translateY(-6px); box-shadow: 0 0 0 3px var(--blue), 0 0 18px rgba(61, 139, 253, .6); }
.mm-celda.bien { box-shadow: inset 0 0 0 3px #22c55e; background: #f0fdf4; }
.mm-celda.mal { box-shadow: inset 0 0 0 3px #f97316; background: #fff7ed; }
.mm-casa { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; width: min(560px, 100%); padding: 10px; border-radius: 22px; background: linear-gradient(#fef3c7, #fde68a); box-shadow: var(--raise-sm); }
.mm-cuarto { width: auto; height: auto; min-height: 92px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 6px; background: #fffbeb; }
.mm-cuarto em { font-style: normal; font-size: 26px; line-height: 1; }
.mm-cuarto small { font-size: 11px; color: #92400e; font-weight: 600; }
.mm-cuarto .mm-lleno { width: auto; height: auto; min-height: 40px; }
.mm-mis { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 4px 0 8px; }
.mm-mis span { padding: 4px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; color: var(--blue-deep); background: #eef4ff; }
.mm-recuerdos { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; margin: 6px 0 12px; padding: 10px 14px; border-radius: 14px; background: #fdf2f8; color: #9d174d; font-size: 14px; }
.mm-crear { gap: 14px; }
.mm-programas { width: min(760px, 100%); display: flex; flex-direction: column; gap: 12px; }
.mm-nivel { padding: 12px 14px; border-radius: 18px; background: #fff; box-shadow: var(--raise-sm); }
.mm-nivel.bloqueado { opacity: .55; }
.mm-nivel-cab { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; margin-bottom: 8px; }
.mm-nivel-cab b { font: 700 15px 'Sora', var(--font); color: var(--blue-deep); }
.mm-nivel-cab small { color: var(--ink-3); font-size: 12.5px; }
.mm-sesiones { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.mm-sesion { display: flex; flex-direction: column; gap: 3px; padding: 8px 10px; border: 0; border-radius: 12px; text-align: left; background: var(--surface); box-shadow: var(--inset-sm); color: var(--ink-2); cursor: pointer; font: inherit; }
.mm-sesion b { font-size: 13px; }
.mm-sesion small { font-size: 11px; line-height: 1.3; color: var(--ink-3); }
.mm-sesion.hecha { background: #f0fdf4; box-shadow: inset 0 0 0 2px #22c55e; }
.mm-sesion.actual { background: #fff; box-shadow: 0 0 0 2px var(--blue), var(--glow); }
.mm-sesion:disabled { cursor: default; }
.mm-lista { margin: 4px 0; padding-left: 18px; text-align: left; font-size: 14px; }
@media (max-width: 600px) {
  .mm-sesiones { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mm-casa { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mm-par .cg-fig, .mm-gesto { width: 76px; height: 76px; }
  .mm-animal img { width: 96px; height: 96px; }
  .mm-hueco { width: 54px; height: 54px; }
  .mm-cuenta { font-size: 64px; }
}
.mm-programas { align-self: start; }

/* ---------- Tablero en modo habilidad (Memoria…): el mismo escenario, otro contenido ---------- */
.tb-hab.oculto, .tb-pop-hab:empty { display: none; }
.tb-modo-hab #pop-ajustes .tb-pop-fila:not(.siempre), .tb-modo-hab #musica-opc { display: none; }
.tb-modo-hab .tb-opciones { opacity: .4; pointer-events: none; }
.tb-modo-hab .linea-tiempo .pulso { cursor: default; }
.tb-pop-hab { padding-bottom: 10px; margin-bottom: 8px; border-bottom: 1px solid rgba(120, 150, 190, .25); }
.tb-pop-titulo { font: 700 14px 'Sora', var(--font); color: var(--blue-deep); margin-bottom: 8px; }
.tb-hab-modos { display: flex; flex-direction: column; gap: 6px; }
.tb-hab-modos button { padding: 9px 12px; border: 0; border-radius: 12px; text-align: left; font: 600 14px var(--font); color: var(--ink-2); background: var(--surface); box-shadow: var(--raise-sm); cursor: pointer; }
.tb-hab-modos button.activo { color: #fff; background: var(--grad); box-shadow: var(--glow); }
.tb-hab { margin: 4px 0 6px; }
.mm-tablero { display: flex; flex-direction: column; gap: 8px; }
.mm-cab { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.mm-etiqueta { font: 700 14px 'Sora', var(--font); color: var(--blue-deep); }
.mm-cuerpo { display: grid; place-items: center; min-height: 260px; }
.mm-tarjeta { width: min(620px, 100%); padding: 18px 20px; }
.mm-tablero .mm-centro { min-height: 150px; }
.mm-tablero .mm-par .cg-fig, .mm-tablero .mm-gesto { width: 92px; height: 92px; }
.mm-tablero .mm-animal img { width: 108px; height: 108px; }
.mm-casilla .ficha img, .mm-casilla .ficha .am-emoji { width: 100%; height: 100%; object-fit: contain; font-size: clamp(28px, 5vw, 56px); display: grid; place-items: center; }
.mm-casilla .ficha .cg-fig { width: 100%; height: 100%; }
.mm-casilla.bien .ficha { border-radius: 22px; box-shadow: 0 0 0 4px #22c55e, 0 0 18px rgba(34, 197, 94, .5); }
.mm-casilla.mal .ficha { border-radius: 22px; box-shadow: 0 0 0 4px #f97316, 0 0 18px rgba(249, 115, 22, .5); }
.mm-casilla.era .ficha { border-radius: 22px; box-shadow: 0 0 0 4px #22c55e; }
.mm-casilla.tarde .ficha { opacity: .5; }
.mm-casilla.fijo .ficha { opacity: .85; }
.mm-casilla.estrella .ficha { border-radius: 22px; box-shadow: 0 0 0 4px #facc15, 0 0 30px rgba(250, 204, 21, .9); }
.mm-casilla.elegible { cursor: pointer !important; }
.mm-casilla.elegible .ficha:hover { transform: translateY(-4px); }
.mm-casilla.mm-tiempo.ido .ficha { opacity: .3; }
.mm-casilla .nro .mm-lugar { white-space: nowrap; font-size: 12px; font-weight: 700; }
.mm-tablero .mm-centro:empty { min-height: 0; }
/* Atención, Concentración y Escucha dentro del tablero: sin marco propio (el marco es el tablero). */
.tb-hab .pr-prueba { width: 100%; height: auto; min-height: 520px; background: transparent; box-shadow: none; border-radius: 0; }
.tb-hab .pr-cab { padding: 4px 6px 8px; }
.tb-hab .pr-campo { min-height: 340px; }
@media (max-width: 600px) { .tb-hab .pr-prueba { min-height: 440px; } }
.tb-hab .btn:not(.btn-primario) { color: var(--blue-deep); }

/* ---------- Tablero de alto fijo (espacios): mismo tamaño en todas las pestañas y momentos ---------- */
.tb-fijo { --alto-tablero: clamp(540px, 66vh, 640px); }
.tb-fijo .tb-tablero { height: var(--alto-tablero); display: flex; flex-direction: column; overflow: hidden; }
.tb-fijo .linea-tiempo { flex: 0 1 auto; min-height: 0; overflow-y: auto; margin: auto 0; }
.tb-fijo.tb-modo-hab .tb-tablero { padding-top: 14px; padding-bottom: 10px; }
.tb-fijo.tb-modo-hab .tb-hab { flex: 1 1 auto; min-height: 0; overflow-y: auto; margin: 0; display: flex; flex-direction: column; }
.tb-fijo.tb-modo-hab .linea-tiempo { flex: 0 0 auto; margin: 0; padding-top: 26px; padding-bottom: 4px; overflow: visible; }
.tb-fijo.tb-modo-hab .compas-pulsos { padding-top: 22px; }
.tb-fijo.tb-modo-hab .pulso .ficha { width: min(74px, 100%); }
.tb-fijo.tb-modo-hab .pulso { gap: 6px; }
.tb-fijo.tb-modo-hab .pulso::after { top: calc(min(74px, 100cqw) / 2 - 1px); }
/* El encabezado del ejercicio va junto a «Iniciar» y ⚙ (no debajo), para ganar espacio. */
.tb-hab .mm-cab, .tb-hab .pr-cab { min-height: 46px; padding-right: 270px; }
.tb-hab .mm-tablero { flex: 1; min-height: 0; }
.tb-hab .mm-cuerpo { flex: 1; min-height: 0; overflow-y: auto; }
.tb-hab .mm-tablero .mm-centro { min-height: 110px; }
.tb-hab .mm-tablero .mm-par .cg-fig, .tb-hab .mm-tablero .mm-gesto { width: 74px; height: 74px; }
.tb-hab .mm-tablero .mm-animal img { width: 86px; height: 86px; }
.tb-hab .mm-cosa { padding: 8px 16px; }
.tb-hab .mm-cuenta { font-size: 64px; }
.tb-hab .mm-rep { font-size: 72px; }
.tb-hab .mm-grid .am-op { min-height: 76px; }
.tb-hab .pr-prueba { flex: 1; min-height: 0; height: auto; }
.tb-hab .pr-campo { min-height: 0; }
.tb-hab .cg-cuerpo { min-height: 0; }
.tb-hab .cg-centro, .tb-hab .cg-centro.grande { width: 150px; height: 150px; }
.tb-hab .cg-centro .cg-fig { width: 100px; height: 100px; }
.tb-hab .pr-tarjeta { padding: 16px 20px; }
@media (max-width: 700px) {
  .tb-fijo { --alto-tablero: clamp(560px, 80vh, 720px); }
  .tb-fijo.tb-modo-hab .tb-tablero { padding: 64px 12px 8px; }
  .tb-hab .mm-cab, .tb-hab .pr-cab { padding-right: 6px; min-height: 0; }
}

/* ---------- Alto original del tablero (≈ 370 px) también en las habilidades ----------
   Los ejercicios se compactan: encabezado junto a «Iniciar», casillas más pequeñas abajo y el
   contenido del ejercicio en fila (lo que se ve a la izquierda, las respuestas a la derecha). */
@media (min-width: 701px) {
  .tb-fijo { --alto-tablero: 372px; }
  .tb-fijo.tb-modo-hab .tb-tablero { padding: 10px 22px 4px; }
  .tb-hab .mm-cab, .tb-hab .pr-cab { min-height: 40px; padding: 0 250px 0 4px; }
  .tb-hab .am-barra { margin: 2px 0 4px; }
  .tb-fijo.tb-modo-hab .linea-tiempo { padding-top: 16px; padding-bottom: 0; }
  .tb-fijo.tb-modo-hab .compas-pulsos { padding-top: 16px; gap: 12px; }
  .tb-fijo.tb-modo-hab .pulso .nro { top: -20px; }
  .tb-fijo.tb-modo-hab .pulso .ficha { width: min(50px, 100%); }
  .tb-fijo.tb-modo-hab .pulso::after { top: calc(min(50px, 100cqw) / 2 - 1px); }
  /* Tarjetas (explicaciones, pasos, resultados) */
  .tb-hab .pr-tarjeta { width: min(720px, 96%); padding: 10px 18px; border-radius: 20px; }
  .tb-hab .pr-tarjeta h2 { font-size: 18px; margin: 2px 0 6px; }
  .tb-hab .pr-tarjeta p { font-size: 13.5px; line-height: 1.4; margin: 0 0 6px; }
  .tb-hab .pr-tarjeta .btn-primario { padding: 9px 24px; font-size: 14px; margin-top: 2px; }
  .tb-hab .pr-tarjeta .pr-icono { width: 40px; height: 40px; font-size: 20px; margin: 0 auto; }
  .tb-hab .cg-pasos { margin: 2px 0 4px; }
  .tb-hab .cg-pasos span { width: 24px; height: 24px; font-size: 11px; }
  .tb-hab .am-num-item { font-size: 12px; }
  .tb-hab .mm-mis { margin: 2px 0 4px; }
  .tb-hab .mm-mis span { padding: 2px 8px; font-size: 11.5px; }
  .tb-hab .mm-recuerdos { margin: 4px 0; padding: 6px 10px; font-size: 13px; }
  .tb-hab .pr-botones { margin-top: 4px; }
  /* Memoria: lo que aparece a la izquierda, las respuestas a la derecha */
  .tb-hab .mm-cuerpo { min-height: 0; place-items: center; }
  .tb-hab .mm-escena { width: 100%; display: grid; grid-template-columns: auto 1fr; grid-template-areas: "e e" "c o"; align-items: center; justify-items: center; gap: 4px 18px; }
  .tb-hab .mm-estado { grid-area: e; min-height: 0; font-size: 15px; }
  .tb-hab .mm-centro { grid-area: c; min-height: 0 !important; }
  .tb-hab .mm-opciones { grid-area: o; }
  .tb-hab .mm-centro:empty { display: none; }
  .tb-hab .mm-centro:empty + .mm-opciones { grid-column: 1 / -1; }
  .tb-hab .mm-cosa { padding: 6px 12px; border-radius: 18px; gap: 2px; }
  .tb-hab .mm-cosa b { font-size: 15px; }
  .tb-hab .mm-tablero .mm-par .cg-fig, .tb-hab .mm-tablero .mm-gesto { width: 58px; height: 58px; }
  .tb-hab .mm-tablero .mm-animal img { width: 66px; height: 66px; }
  .tb-hab .mm-pie { font-size: 13px; }
  .tb-hab .mm-cuenta { font-size: 52px; }
  .tb-hab .mm-rep { font-size: 56px; }
  .tb-hab .mm-ojos, .tb-hab .mm-oido { font-size: 52px; }
  .tb-hab .mm-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; max-width: none; }
  .tb-hab .mm-grid .am-op { width: 74px; min-height: 0; padding: 5px 4px; border-radius: 12px; gap: 2px; }
  .tb-hab .mm-grid .am-op .cg-fig, .tb-hab .mm-grid .am-op img { width: 38px; height: 38px; }
  .tb-hab .mm-grid .am-op .am-emoji { font-size: 32px; }
  .tb-hab .mm-grid .am-op small { font-size: 10.5px; }
  .tb-hab .mm-crear { display: flex; flex-direction: column; align-items: center; gap: 6px; }
  .tb-hab .mm-crear .am-titulo { font-size: 17px; }
  .tb-hab .mm-programas { gap: 6px; }
  .tb-hab .mm-nivel { padding: 8px 10px; }
  .tb-hab .mm-sesion { padding: 5px 8px; }
  .tb-hab .mm-tap { padding: 14px; width: min(320px, 100%); }
  /* Atención y Concentración: en fila */
  .tb-hab .cg-cuerpo, .tb-hab .am-cuerpo { padding: 4px 8px; }
  .tb-hab .cg-escena { flex-direction: row; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px 18px; }
  .tb-hab .cg-centro, .tb-hab .cg-centro.grande { width: 116px; height: 116px; border-radius: 22px; }
  .tb-hab .cg-centro .cg-fig { width: 80px; height: 80px; }
  .tb-hab .cg-tocar, .tb-hab .am-tocar { width: min(300px, 100%); padding: 16px; }
  .tb-hab .cg-grilla { width: min(250px, 100%); gap: 4px; }
  .tb-hab .am-estado, .tb-hab .am-titulo { font-size: 15px; width: 100%; }
  .tb-hab .am-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; max-width: 560px; }
  .tb-hab .am-op { width: 92px; min-height: 0; padding: 6px 4px; border-radius: 14px; gap: 2px; }
  .tb-hab .am-op img, .tb-hab .am-op svg, .tb-hab .am-op .cg-fig { width: 42px; height: 42px; }
  .tb-hab .am-op .am-emoji { font-size: 34px; }
  .tb-hab .am-op small { font-size: 11px; }
  .tb-hab .am-hueco { width: 40px; height: 40px; }
  /* Escucha: la imagen a la izquierda, el texto y los botones a la derecha */
  .tb-hab .am-item { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 6px 16px; }
  .tb-hab .am-presenta { width: 110px; height: 110px; border-radius: 22px; }
  .tb-hab .am-presenta img, .tb-hab .am-presenta svg { width: 80px; height: 80px; }
  .tb-hab .am-presenta .am-emoji { font-size: 62px; }
  .tb-hab .am-muestra { width: 60px; height: 60px; }
  .tb-hab .am-pulso { width: 38px; height: 38px; }
  .tb-hab .pr-campo { margin: 0 4px 4px; }
}
/* Tema oscuro (espacio personal): los textos del ejercicio sobre el tablero, claros. Las tarjetas siguen claras. */
.holo .tb-hab .mm-etiqueta, .holo .tb-hab .pr-etiqueta, .holo .tb-hab .mm-estado, .holo .tb-hab .am-estado,
.holo .tb-hab .am-titulo, .holo .tb-hab .mm-pie, .holo .tb-hab .am-item > h2, .holo .tb-hab .mm-crear .am-titulo { color: #eaf6ff; text-shadow: 0 1px 6px rgba(0, 20, 50, .45); }
.holo .tb-hab .pr-meta, .holo .tb-hab .mm-cab .pr-meta, .holo .tb-hab .am-item > .am-num-item, .holo .tb-hab .mm-programas > .am-num-item { color: rgba(225, 242, 255, .8); }
.holo .tb-hab .mm-estado b, .holo .tb-hab .am-estado b { color: #9fe9ff; }
.holo .tb-hab .mm-prepara { color: #fdba74; }
.holo .tb-hab .pr-tarjeta .am-num-item, .holo .tb-hab .pr-tarjeta p { color: var(--ink-2); text-shadow: none; }
.tb-hab .am-item > .am-num-item { width: 100%; }
.tb-hab .mm-estado { text-align: center; justify-self: center; }

/* Docente e institución: tableros translúcidos como el personal (se ve el fondo detrás, con desenfoque). */
.claro { background: rgba(255, 255, 255, .22); backdrop-filter: blur(12px) saturate(130%); -webkit-backdrop-filter: blur(12px) saturate(130%); }
.claro .tb-tablero, .claro .tb-control { background: rgba(244, 249, 255, .34); }
.claro .tb-indice-hab, .claro .tb-menu { background: rgba(244, 249, 255, .32); }
.claro.naranja { background: rgba(255, 247, 240, .42); }
.naranja .tb-tablero, .naranja .tb-control { background: rgba(255, 251, 247, .44); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.naranja .tb-indice-hab, .naranja .tb-menu { background: rgba(255, 251, 247, .42); }
.claro.naranja .holo-saludo span { color: #5a2410; }

/* Asignaciones de programas de habilidades (estudiante) y menú de configuración del tablero con scroll */
.est-tipo.atencion { background: #dbeafe; color: #1d4ed8; }
.est-tipo.concentracion { background: #dcfce7; color: #15803d; }
.est-tipo.memoria { background: #fce7f3; color: #be185d; }
.tb-fijo .tb-tablero { overflow: visible; }
.tb-pop#pop-ajustes { max-height: min(70vh, 520px); overflow-y: auto; overscroll-behavior: contain; z-index: 30; }
.tb-fijo .tb-tablero { z-index: 3; }

/* Espacio personal (oscuro): menús, ventanas y tarjetas sobre el tablero al 80 % (vidrio), no blanco sólido. */
.holo .tb-pop, .holo .dd-panel, .holo .tb-lista, .holo .tb-celda, .holo .tb-visor-caja,
.holo .tb-hab .pr-tarjeta, .holo .tb-hab .mm-nivel {
  background: rgba(236, 244, 253, .8);
  backdrop-filter: blur(14px) saturate(130%); -webkit-backdrop-filter: blur(14px) saturate(130%);
  border: 1px solid rgba(255, 255, 255, .55);
}
.holo .tb-hab .mm-sesion { background: rgba(225, 236, 250, .7); }
.holo .tb-hab .mm-sesion.actual { background: rgba(255, 255, 255, .85); }
/* Escucha dentro del tablero: la tarjeta de cada paso con la imagen a la izquierda y el texto a la
   derecha, para que se lea completa de una vez (sin bajar). */
@media (min-width: 701px) {
  .tb-hab .pr-tarjeta:has(> .am-presenta) { display: grid; grid-template-columns: auto 1fr; column-gap: 20px; align-items: center; text-align: left; width: min(760px, 96%); }
  .tb-hab .pr-tarjeta:has(> .am-presenta) > * { grid-column: 2; }
  .tb-hab .pr-tarjeta:has(> .am-presenta) > .am-presenta { grid-column: 1; grid-row: 1 / span 5; margin: 0; width: 96px; height: 96px; }
  .tb-hab .pr-tarjeta:has(> .am-presenta) .cg-pasos { justify-content: flex-start; }
  .tb-hab .pr-tarjeta:has(> .am-presenta) .btn-primario { justify-self: start; }
}

/* ---------- Percepción (dentro del tablero) ---------- */
.g-ambito.percepcion, .est-tipo.percepcion { background: #fef9c3; color: #a16207; }
.pc-bola { display: block; width: 62%; aspect-ratio: 1; margin: auto; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff, #7dd3fc 35%, #2563eb); box-shadow: 0 0 16px rgba(56, 189, 248, .9); }
.pc-luz { display: block; width: 80%; aspect-ratio: 1; margin: auto; border-radius: 30%; background: radial-gradient(circle, #fef08a, #f59e0b); box-shadow: 0 0 22px rgba(250, 204, 21, .95); }
.pc-pregunta { display: grid; place-items: center; height: 100%; font: 800 clamp(22px, 3vw, 34px) 'Sora', var(--font); color: #f59e0b; }
.mm-casilla.destello .ficha { border-radius: 18px; box-shadow: 0 0 0 3px #facc15, 0 0 22px rgba(250, 204, 21, .8); }
.mm-casilla.pc-muro .ficha { border-radius: 14px; background: repeating-linear-gradient(45deg, #b45309 0 8px, #92400e 8px 16px); box-shadow: inset 0 0 0 2px #78350f; }
.mm-casilla.pc-muro .ficha * { visibility: hidden; }
.pc-sello { padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700; }
.pc-sello.concrecion { background: #dbeafe; color: #1d4ed8; }
.pc-sello.anticipacion { background: #fce7f3; color: #be185d; }
.pc-sello.canal { background: #f1f5f9; color: #475569; }
.pc-op .am-num { font-size: 22px; }
/* En Percepción las casillas son el escenario principal: un poco más grandes. */
@media (min-width: 701px) {
  .tb-fijo.tb-modo-hab .tb-hab:has(.pc .mm-escena) + .linea-tiempo .pulso .ficha { width: min(84px, 100%); }
  .tb-fijo.tb-modo-hab .tb-hab:has(.pc .mm-escena) + .linea-tiempo .pulso::after { top: calc(min(84px, 100cqw) / 2 - 1px); }
}

/* Percepción: tarjetas compactas (se leen completas sin desplazarse); los sellos van junto al título. */
@media (min-width: 701px) {
  .tb-hab .pc .mm-tarjeta .mm-mis { margin: 0 0 4px; }
  .tb-hab .pc .mm-tarjeta h2 { margin: 0 0 4px; }
  .tb-hab .pc .mm-tarjeta .cg-pasos { margin: 0 0 2px; }
  .tb-hab .pc .mm-tarjeta .pr-icono { width: 32px; height: 32px; font-size: 16px; }
}

/* ---------- Programa del grado (docente e institución) ---------- */
.pg-plan { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 0 0 12px; padding: 10px 14px; border-radius: 18px;
  background: rgba(255, 255, 255, .5); border: 1px solid rgba(255, 255, 255, .85); box-shadow: 0 8px 22px rgba(40, 80, 140, .14); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.pg-plan-ico { font-size: 26px; }
.pg-plan-sel { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.pg-plan-sel label { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--blue-deep); }
.pg-plan select { padding: 6px 10px; border: 0; border-radius: 10px; font: inherit; font-size: 13px; background: #fff; box-shadow: var(--inset-sm); color: var(--ink); }
.pg-plan-texto { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 1px; font-size: 13.5px; color: var(--ink); }
.pg-plan-texto small { color: var(--ink-2); font-size: 12.5px; }
.pg-plan-que { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--blue-deep); }
.pg-plan-btns { display: flex; align-items: center; gap: 10px; }
.holo .pg-plan { background: rgba(255, 255, 255, .1); border-color: rgba(205, 238, 255, .42); color: #fff; }
.holo .pg-plan-texto, .holo .pg-plan-sel label { color: #eaf6ff; }
.holo .pg-plan-texto small { color: rgba(225, 242, 255, .8); }
.pg-caja { width: min(1100px, 100%); }
.pg-enfoque { margin: 0 0 6px; font-size: 15px; }
.pg-enfoque small { display: block; opacity: .8; font-size: 12.5px; }
.pg-nota { margin: 0 0 10px; font-size: 13px; opacity: .85; }
.pg-tabla-caja { overflow-x: auto; }
.pg-tabla { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.pg-tabla th, .pg-tabla td { padding: 8px 10px; border-bottom: 1px solid rgba(120, 150, 190, .25); vertical-align: top; text-align: left; }
.pg-tabla thead th { font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; }
.pg-tabla tbody th { white-space: nowrap; }
.pg-tabla td small { display: block; margin-top: 3px; opacity: .8; }
.pg-focos { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; margin-top: 12px; }
.pg-focos div { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border-radius: 12px; background: rgba(120, 150, 190, .12); font-size: 13px; }
.g-det-btns { display: flex; align-items: center; gap: 10px; }

/* Planos del cuerpo debajo de las figuras rítmicas: sin el efecto neón del tema oscuro (se ven nítidos). */
.holo .planos-fig svg, .holo .planos-fig img { filter: none; }
/* Paleta de planos del cuerpo (RGC dibujados) para cada golpe de una figura rítmica */
.fi-golpe { position: relative; }
.fi-golpe small { font-size: 10px; color: var(--ink-3); }
.fi-btn { width: 34px; height: 34px; display: grid; place-items: center; padding: 4px; border: 0; border-radius: 9px; background: #fff; box-shadow: var(--raise-sm); cursor: pointer; color: var(--ink-3); }
.fi-btn.vacio { background: var(--surface); box-shadow: var(--inset-sm); }
.fi-btn svg { width: 100%; height: 100%; }
.fi-btn:hover { box-shadow: 0 0 0 2px var(--blue), var(--raise-sm); }
.fi-paleta { position: absolute; top: calc(100% + 4px); right: -6px; z-index: 40; width: 236px; max-height: 230px; overflow-y: auto; display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; padding: 8px; border-radius: 14px; background: #fff; box-shadow: 0 14px 34px rgba(20, 40, 80, .28); }
.fi-op { aspect-ratio: 1; display: grid; place-items: center; padding: 4px; border: 0; border-radius: 8px; background: var(--surface); cursor: pointer; color: var(--ink-2); font-weight: 700; }
.fi-op svg { width: 100%; height: 100%; }
.fi-op:hover { box-shadow: 0 0 0 2px var(--blue); background: #fff; }
.fi-op.on { box-shadow: 0 0 0 2px var(--blue); background: #eef4ff; }
/* Tema oscuro: los planos bajo las figuras rítmicas en blanco, sin cuadro de fondo ni brillo. */
.holo .plano-nota { background: transparent; box-shadow: none; }
.holo .plano-nota.vacio { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .35); }
.holo .planos-fig svg, .holo .planos-fig img { filter: invert(1) brightness(2); }
.holo .plano-nota.on { box-shadow: 0 0 0 2px #9fe9ff; }

/* Usuarios asignados por correo (Configuración → Usuarios y permisos) */
.us-asignar .us-fila { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
.us-asignar input { padding: 10px 12px; border: 0; border-radius: 12px; font: inherit; background: #fff; box-shadow: var(--inset-sm); }
.us-asignar .chips { margin-bottom: 10px; }
.us-pendientes { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.us-pendientes li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding: 8px 12px; border-radius: 12px; background: var(--surface-2); font-size: 14px; }
.us-pendientes li span { color: var(--ink-2); }
.us-pendientes li small { color: var(--ink-3); }
.us-pendientes li .g-borrar { margin-left: auto; }
@media (max-width: 600px) { .us-asignar .us-fila { grid-template-columns: 1fr; } }

/* Programa del grado en su ventana (botón de escalones) */
.pg-modal-caja { width: min(780px, 100%); }
.pg-modal-plan .pg-plan { margin: 6px 0 12px; box-shadow: none; }
.pg-modal-plan.claro-modal .pg-plan { background: rgba(240, 246, 253, .9); }
.pg-modal-plan:not(.claro-modal) .pg-plan { background: rgba(255, 255, 255, .08); border-color: rgba(205, 238, 255, .35); color: #fff; }
.pg-modal-plan:not(.claro-modal) .pg-plan-texto, .pg-modal-plan:not(.claro-modal) .pg-plan-sel label { color: #eaf6ff; }
.pg-modal-extra { display: flex; flex-wrap: wrap; gap: 8px; }
.pg-modal-plan .pg-plan-ico { display: none; }

/* Licencia institucional de las docentes: horario por curso, jornada y vigencia */
.g-horario { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.g-hor-fila { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; }
.g-hor-fila span { min-width: 200px; font-weight: 600; }
.g-hor-fila input { width: 64px; padding: 5px 8px; border: 0; border-radius: 8px; background: #fff; box-shadow: var(--inset-sm); font: inherit; }
.g-hor-fila b { color: var(--blue-deep); }
.g-jornada { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 10px 0 14px; padding: 10px 12px; border-radius: 14px; background: var(--surface-2); }
.g-jornada .g-ayuda { flex-basis: 100%; margin: 0; }
.g-jornada input { padding: 6px 8px; border: 0; border-radius: 8px; background: #fff; box-shadow: var(--inset-sm); font: inherit; }
.g-tabla-caja { overflow-x: auto; }
.g-vig { width: 100%; border-collapse: collapse; font-size: 13px; }
.g-vig th, .g-vig td { padding: 8px; border-bottom: 1px solid rgba(120, 150, 190, .25); text-align: left; vertical-align: top; }
.g-vig td small { display: block; margin-top: 2px; color: var(--ink-3); font-size: 11.5px; }
.g-nivel { font-weight: 700; white-space: nowrap; }
.g-nivel.observacion { color: #a16207; }
.g-nivel.restringida { color: #b91c1c; }
.g-nivel.vigente { color: #15803d; }
.g-vig-btns { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.g-doc-cursos { display: flex; flex-direction: column; gap: 10px; margin: 12px 0 16px; }
.g-doc-curso { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border-radius: 14px; background: var(--surface-2); }
.g-nuevo-tit { flex-basis: 100%; font-size: 13px; color: var(--blue-deep); }
.g-nuevo-tit small { font-weight: 400; color: var(--ink-3); }
.g-nuevo #g-c-grado { flex: 1 1 120px; min-width: 0; }
.g-nuevo #g-c-grupo { flex: 0 1 110px; min-width: 0; }
.g-nuevo-prev { flex-basis: 100%; color: var(--blue-deep); font-weight: 600; font-size: 12.5px; min-height: 1em; }

/* ---------- Mi perfil ---------- */
.usuario-perfil { display: inline-flex; align-items: center; gap: 8px; color: inherit; text-decoration: none; border-radius: 999px; padding-right: 4px; }
.usuario-perfil:hover span:last-child, .usuario-perfil.activo span:last-child { text-decoration: underline; }
.perfil { max-width: 980px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.pf-cab { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; }
.pf-cab h1 { margin: 0; font: 800 28px 'Sora', var(--font); }
.pf-cab small { opacity: .8; }
.pf-bloque { padding: 16px 18px; border-radius: 20px; background: rgba(255, 255, 255, .55); border: 1px solid rgba(255, 255, 255, .8); box-shadow: 0 10px 26px rgba(40, 80, 140, .14); }
.holo .pf-bloque { background: rgba(255, 255, 255, .08); border-color: rgba(205, 238, 255, .4); }
.pf-bloque h2 { margin: 4px 0 10px; font: 700 17px 'Sora', var(--font); }
.pf-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 10px 14px; margin-bottom: 12px; }
.pf-campo { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 600; }
.pf-campo input { padding: 10px 12px; border: 0; border-radius: 12px; font: inherit; font-weight: 400; background: #fff; box-shadow: var(--inset-sm); color: var(--ink); }
.pf-campo input:disabled { opacity: .7; }
.pf-datos { list-style: none; margin: 0 0 12px; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.pf-datos li { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 14px; background: rgba(255, 255, 255, .6); }
.holo .pf-datos li { background: rgba(255, 255, 255, .1); }
.pf-datos b { font-size: 15px; }
.pf-datos small { font-size: 12px; opacity: .75; }
.pf-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.pf-nota { margin: 0 0 10px; opacity: .85; font-size: 14px; }
.pf-tabla-caja { overflow-x: auto; }
.pf-tabla { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.pf-tabla th, .pf-tabla td { padding: 8px; text-align: left; border-bottom: 1px solid rgba(120, 150, 190, .25); }
.pf-estado { padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.pf-estado.pendiente { background: #fef9c3; color: #a16207; }
.pf-estado.confirmado { background: #dcfce7; color: #15803d; }
.pf-estado.rechazado { background: #fee2e2; color: #b91c1c; }

/* Gestión institucional / Mis grupos: cerrada de forma predeterminada, se abre con su encabezado */
.g-pliegue { display: flex; align-items: center; gap: 10px; padding: 0; border: 0; background: none; cursor: pointer; text-align: left; color: inherit; font: inherit; }
.g-pliegue span { display: flex; flex-direction: column; }
.g-pliegue-ico { font-size: 20px; color: var(--blue-deep); transition: transform .2s; }
.gestion:not(.cerrada) .g-pliegue-ico { transform: rotate(90deg); }
.gestion.cerrada .gestion-tabs, .gestion.cerrada .gestion-cuerpo { display: none; }
.gestion.cerrada .gestion-cab { margin-bottom: 0; }

/* Fotos de perfil */
.avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
.pf-yo { display: flex; align-items: center; gap: 14px; }
.pf-foto { width: 84px; height: 84px; flex: none; display: grid; place-items: center; border-radius: 50%; overflow: hidden; background: var(--grad); color: #fff; font: 800 28px 'Sora', var(--font); box-shadow: 0 6px 18px rgba(40, 80, 140, .25); }
.pf-foto img { width: 100%; height: 100%; object-fit: cover; }
.pf-foto-btns { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
.pf-foto-btns .btn { cursor: pointer; }
.g-doc-nombre { display: inline-flex; align-items: center; gap: 8px; }
.g-doc-foto { width: 32px; height: 32px; flex: none; display: grid; place-items: center; border-radius: 50%; overflow: hidden; background: var(--grad); color: #fff; font-size: 13px; font-weight: 800; }
.g-doc-foto img { width: 100%; height: 100%; object-fit: cover; }

/* Foto de perfil junto al saludo «Hola, NOMBRE» */
.holo-saludo.con-foto { align-items: center; }
.holo-foto { width: 48px; height: 48px; flex: none; border-radius: 50%; overflow: hidden; display: block; box-shadow: 0 0 0 2px rgba(255, 255, 255, .85), 0 4px 14px rgba(40, 80, 140, .3); margin-right: -4px; }
.holo-foto img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 600px) { .holo-foto { width: 40px; height: 40px; } }

/* ---------- Blog «¿Qué es PMN?» debajo del video (pestaña PMN): artículo en una columna ---------- */
.intro-video.con-blog { overflow-y: auto; flex-direction: column; justify-content: flex-start; align-items: center; padding-bottom: 40px; }
.intro-video.con-blog .intro-marco { flex: none; }
.bl { width: min(820px, 100%); margin: 8px auto 0; padding: 40px clamp(18px, 5vw, 64px) 30px; border-radius: var(--r-lg); background: #fff; box-shadow: var(--raise-sm);
  color: #333d4d; font-family: 'Source Sans 3', 'Segoe UI', var(--font); font-size: 18px; line-height: 1.75; }
.bl-desliza { text-align: center; margin: -24px 0 18px; color: var(--ink-3); font-size: 14px; animation: bl-bota 2s ease-in-out infinite; }
@keyframes bl-bota { 50% { transform: translateY(5px); } }
.bl-cab { margin-bottom: 18px; }
.bl-etiqueta { font-size: 12px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; color: var(--blue-deep); }
.bl h1 { margin: 6px 0 10px; font: 800 clamp(28px, 4vw, 40px)/1.2 'Sora', var(--font); color: #1f2a3c; }
.bl-autor { margin: 0; font-size: 15px; color: #6b7686; }
.bl-entrada { font-size: 20px; color: #2c3647; }
.bl h2 { margin: 42px 0 12px; font: 700 clamp(24px, 3vw, 30px)/1.3 'Sora', var(--font); color: #1f2a3c; }
.bl h3 { margin: 26px 0 6px; font: 700 20px/1.35 'Sora', var(--font); color: #2a3a55; }
.bl p { margin: 0 0 16px; }
.bl b { color: #1f2a3c; }
.bl-fig { margin: 22px 0 24px; }
.bl-fig img, .bl-fig svg { display: block; width: 100%; height: auto; border-radius: 10px; }
.bl-fig img { border: 1px solid #e6eaf0; }
.bl-fig figcaption { margin-top: 8px; font-size: 14px; line-height: 1.5; color: #6b7686; }
.bl-cerebro { background: #fbfaf7; border: 1px solid #e6eaf0; }
.bl-pareja { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.bl-pareja .bl-fig { margin: 0 0 18px; }
.bl-cita { margin: 26px 0; padding: 4px 0 4px 22px; border-left: 4px solid var(--blue); font: italic 500 21px/1.5 'Source Sans 3', var(--font); color: #2a3a55; }
.bl-cita cite { display: block; margin-top: 6px; font: normal 400 14px var(--font); color: #8a93a3; }
.bl-g { display: inline-block; width: 1.15em; height: 1.15em; vertical-align: -0.2em; }
.bl-g svg { width: 100%; height: 100%; overflow: visible; }
.bl-recuadro { margin: 26px 0; padding: 18px 22px; border-radius: 12px; background: #f3f7fd; border: 1px solid #dbe6f5; }
.bl-recuadro > b { font-family: 'Sora', var(--font); }
.bl-recuadro p { margin: 6px 0 12px; font-size: 16px; }
.bl-pulso { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.bl-pulso-grafia { width: 56px; height: 56px; display: grid; place-items: center; border-radius: 50%; background: #fff; box-shadow: var(--raise-sm); }
.bl-pulso-grafia svg { width: 34px; height: 34px; }
.bl-pulso-grafia.late { animation: bl-late .35s ease-out; }
@keyframes bl-late { 0% { transform: scale(1.25); box-shadow: 0 0 0 10px rgba(61, 139, 253, .25); } 100% { transform: none; } }
.bl-pulso .btn.activo { background: var(--grad); color: #fff; }
.bl-glosario { margin: 0; }
.bl-glosario dt { margin-top: 12px; font-weight: 700; color: #1f2a3c; }
.bl-glosario dd { margin: 0; }
.bl-pie { margin-top: 36px; padding-top: 20px; border-top: 1px solid #e6eaf0; text-align: center; font-size: 14px; color: #6b7686; }
.bl-pie .btn { margin-top: 8px; }
@media (max-width: 760px) {
  .bl { font-size: 17px; border-radius: var(--r-md); }
  .bl-entrada { font-size: 18px; }
  .bl-pareja { grid-template-columns: 1fr; }
}

/* Las listas del controlador (pulsos, compases, figuras…) abren hacia arriba: mientras una está abierta,
   el controlador queda por encima del tablero para que no se escondan detrás. */
.tb-control { position: relative; }
.tb-control:has(.tb-lista:not(.oculto)) { z-index: 6; }

/* Cursos: ordenar arrastrando (clic sostenido) */
.g-orden-ayuda { display: block; margin: 0 0 4px; font-size: 12px; }
.g-lista .g-curso { touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.g-lista.ordenando { cursor: grabbing; }
.g-lista.ordenando .g-curso { cursor: grabbing; transition: transform .12s; }
.g-curso.arrastrando { opacity: .9; transform: scale(1.03); box-shadow: 0 10px 24px rgba(40, 80, 140, .3), 0 0 0 2px var(--blue); position: relative; z-index: 2; }

/* El tablero y sus ventanas (casilla, planos, ajustes, listas) quedan por encima de la gestión
   institucional y de lo que venga debajo, para que nada las tape. */
section:has(> .holo-tablero), .est { position: relative; z-index: 2; }
.gestion { position: relative; z-index: 1; }

/* Usuarios y permisos: dar de baja */
.us-eliminar { padding: 8px 12px; margin-left: 6px; color: #b91c1c; }
.us-eliminar:hover { background: #fee2e2; }
.us-baja summary { cursor: pointer; font-weight: 700; }

.us-cursos { display: block; margin-top: 8px; max-width: 360px; color: var(--ink-2); font-size: 12.5px; line-height: 1.45; }

/* Usuarios registrados: cada usuario en una fila horizontal (datos · grados en línea · acciones). */
@media (min-width: 761px) {
  .tabla-usuarios, .tabla-usuarios tbody { display: block; }
  .tabla-usuarios tr { display: grid; grid-template-columns: minmax(200px, 260px) 1fr auto; align-items: center; margin-bottom: 12px;
    border-radius: 16px; background: var(--surface-2); }
  .tabla-usuarios td { display: block; background: none; padding: 12px 14px; vertical-align: middle; border-radius: 0 !important; }
  .tabla-usuarios td .chips { display: flex; flex-wrap: wrap; gap: 6px; }
  .tabla-usuarios td .chip { padding: 5px 10px; }
  .tabla-usuarios td:last-child { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
  .tabla-usuarios .us-cursos { max-width: none; margin-top: 6px; }
}

/* Fila de usuario: nombre / correo / institución apilados · grados en una línea · listas e íconos */
.us-quien b, .us-quien small, .us-quien > span { display: block; }
.us-quien small { color: var(--ink-3); margin: 2px 0 6px; }
.us-ico { width: 40px; height: 40px; padding: 0 !important; display: inline-grid; place-items: center; margin: 0 !important; }
.us-ico svg { width: 20px; height: 20px; }
.us-eliminar.us-ico { color: #b91c1c; }
@media (min-width: 761px) {
  .tabla-usuarios td .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: thin; padding-bottom: 2px; }
  .tabla-usuarios td .chip { flex: none; }
  .tabla-usuarios .us-cursos { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}
@media (min-width: 761px) {
  .tabla-usuarios tr { grid-template-columns: minmax(180px, 230px) minmax(0, 1fr) auto; }
  .tabla-usuarios td { min-width: 0; }
  .tabla-usuarios td .chips { gap: 4px; }
  .tabla-usuarios td .chip { padding: 4px 8px; font-size: 12px; }
  .tabla-usuarios td:last-child select.mini { max-width: 120px; }
}

@media (min-width: 761px) {
  .tabla-usuarios td .chips { flex-wrap: wrap; overflow: visible; }
  .us-selects { display: flex; flex-direction: column; gap: 4px; }
  .tabla-usuarios td:last-child select.mini { width: 130px; max-width: none; }
}
@media (min-width: 761px) {
  .tabla-usuarios tr { grid-template-columns: minmax(160px, 190px) minmax(0, 1fr) auto; }
  .tabla-usuarios td { padding: 12px 10px; }
  .tabla-usuarios td .chip { padding: 3px 7px; font-size: 11.5px; }
  .us-quien small { word-break: break-all; font-size: 12px; }
}
@media (min-width: 761px) { .us-quien small { word-break: normal; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } }

/* ---------- «¡A jugar!» (espacio personal): juego por rondas dentro del tablero ---------- */
.tb-jugar svg { width: 22px; height: 22px; }
.jg { display: flex; flex-direction: column; gap: 8px; flex: 1; min-height: 0; }
.jg-cab { display: flex; flex-direction: column; min-height: 46px; padding-right: 270px; }
.jg-cab b { font: 800 18px 'Sora', var(--font); color: var(--blue-deep); }
.jg-cab span { font-size: 13px; color: var(--ink-2); }
.jg-avatares { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px 10px; }
.jg-slot { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.jg-ava { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; overflow: hidden; border: 3px solid transparent;
  background: color-mix(in srgb, var(--c, #94a3b8) 22%, #fff); cursor: pointer; padding: 0; position: relative; transition: transform .15s; }
.jg-ava img { width: 100%; height: 100%; object-fit: cover; }
.jg-emoji { font-size: 30px; line-height: 1; }
.jg-slot:not(.on) .jg-ava { opacity: .55; filter: grayscale(.5); }
.jg-slot.on .jg-ava { border-color: var(--c); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 30%, transparent); }
.jg-ava:hover { transform: scale(1.06); }
.jg-slot small { font-size: 11px; color: var(--ink-3); }
.jg-nombre { width: 100%; max-width: 110px; padding: 4px 8px; border: 0; border-radius: 10px; font: 600 12.5px var(--font); text-align: center; background: #fff; box-shadow: var(--inset-sm); color: var(--ink); }
.jg-pie { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; margin-top: auto; }
.jg-nota { margin: 0; font-size: 12.5px; color: var(--ink-2); flex: 1; }
.jg-ayuda { flex: none; text-align: center; }
.jg-presenta { flex: 1; display: grid; grid-template-columns: auto auto; grid-template-rows: auto 1fr auto auto; justify-content: center; align-items: center; column-gap: 22px; text-align: center; position: relative; }
.jg-presenta > small { grid-column: 1 / -1; color: var(--ink-3); font-size: 12px; }
.jg-fig { width: 130px; height: 130px; animation: cgAparece .3s ease-out; }
.jg-fig svg, .jg-fig img { width: 100%; height: 100%; }
.jg-foto { width: 130px; height: 130px; object-fit: cover; border-radius: 18px; box-shadow: var(--raise-sm); animation: cgAparece .3s ease-out; }
.jg-presenta > b { grid-column: 1 / -1; font: 800 30px 'Sora', var(--font); color: var(--blue-deep); }
.jg-presenta > span { grid-column: 1 / -1; font-size: 14px; color: var(--ink-2); }
.jg-reloj { position: absolute; left: 0; right: 0; bottom: -4px; height: 4px; border-radius: 4px; background: var(--grad); transform-origin: left; animation: jgReloj var(--dur) linear forwards; }
@keyframes jgReloj { from { transform: scaleX(1); } to { transform: scaleX(0); } }
.jg-centro { min-height: 70px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.jg-rep { font-size: 54px; }
.jg-rep.golpe { animation: mmGolpe .25s ease-out; }
.jg-cuenta { font: 800 56px 'Sora', var(--font); color: var(--blue-deep); animation: cgAparece .2s ease-out; }
.jg-ahora { font: 800 34px 'Sora', var(--font); color: var(--blue-deep); }
.jg-centro small { font-size: 12px; color: var(--ink-3); }
.jg-juez { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 10px; }
.jg-jug { display: flex; flex-direction: column; align-items: center; gap: 2px; border: 0; background: none; cursor: pointer; padding: 0; font: inherit; }
.jg-jug .jg-ava { width: 46px; height: 46px; border-color: var(--c); cursor: pointer; }
.jg-jug .jg-emoji { font-size: 26px; }
.jg-jug small { font-size: 11.5px; font-weight: 600; color: var(--ink); max-width: 76px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jg-jug.fuera .jg-ava { filter: grayscale(1); opacity: .45; border-color: #94a3b8; }
.jg-jug.fuera small { text-decoration: line-through; color: var(--ink-3); }
.jg-x { position: absolute; inset: 0; display: grid; place-items: center; font: 900 30px var(--font); font-style: normal; color: #dc2626; }
.jg-final { display: flex; flex-direction: column; align-items: center; gap: 8px; flex: 1; text-align: center; }
.jg-ganadores { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px; }
.jg-ganador { display: flex; flex-direction: column; align-items: center; gap: 4px; animation: cgAparece .4s ease-out; }
.jg-ganador .jg-ava { width: 84px; height: 84px; border-color: var(--c); box-shadow: 0 0 0 5px color-mix(in srgb, var(--c) 30%, transparent), 0 8px 24px rgba(0, 0, 0, .15); }
.jg-ganador .jg-emoji { font-size: 48px; }
.jg-ganador b { font: 800 20px 'Sora', var(--font); color: var(--blue-deep); }
.jg-tabla { margin: 0; padding-left: 18px; font-size: 13px; columns: 2; text-align: left; }
.jg-tabla small { color: var(--ink-3); }
.jg-final .jg-pie { justify-content: center; margin-top: 4px; }
.jg-figs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 8px; }
.jg-figs button { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px; border: 0; border-radius: 10px; background: var(--surface-2); box-shadow: var(--raise-sm); cursor: pointer; opacity: .5; }
.jg-figs button.on { opacity: 1; box-shadow: var(--raise-sm), 0 0 0 2px var(--blue); }
.jg-figs svg { width: 28px; height: 28px; }
.jg-figs small { font-size: 10.5px; font-weight: 700; color: var(--ink-2); }
.holo .jg-cab span, .holo .jg-nota, .holo .jg-jug small { color: rgba(225, 242, 255, .9); }
.holo .jg-cab b, .holo .jg-ahora, .holo .jg-cuenta, .holo .jg-presenta > b, .holo .jg-ganador b { color: #9fe9ff; }
@media (max-width: 600px) {
  .jg-cab { padding-right: 0; }
  .jg-avatares { grid-template-columns: repeat(5, 1fr); gap: 6px; }
  .jg-ava { width: 46px; height: 46px; }
  .jg-fig, .jg-foto { width: 96px; height: 96px; }
}
/* Juego: que la preparación quepa sin desplazamiento en el alto fijo del tablero */
.tb-hab .jg { gap: 4px; }
.tb-hab .jg-avatares { gap: 2px 8px; }
.tb-hab .jg-slot { gap: 2px; }
.tb-hab .jg-slot .jg-ava { width: 42px; height: 42px; border-width: 2px; }
.tb-hab .jg-slot .jg-emoji { font-size: 24px; }
.tb-hab .jg-nombre { padding: 2px 6px; font-size: 12px; max-width: 96px; }
.tb-hab .jg-slot small { font-size: 10.5px; line-height: 1.2; }
.tb-hab .jg-pie .btn { padding: 7px 14px; }
.tb-hab .jg-presenta .jg-fig, .tb-hab .jg-presenta .jg-foto { width: 110px; height: 110px; }
.tb-hab .jg-presenta > b { font-size: 26px; }
/* Juego · presentación de cada figura: figura e imagen grandes, lado a lado (sin animación de opacidad) */
.jg-presenta { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.jg-presenta .jg-par { display: flex; align-items: center; justify-content: center; gap: 22px; }
.jg-fig, .jg-foto { animation: jgEntra .35s ease-out; opacity: 1; }
.tb-hab .jg-presenta .jg-fig, .tb-hab .jg-presenta .jg-foto { width: 120px; height: 120px; flex: none; }
.jg-presenta > b, .jg-presenta > span, .jg-presenta > small { grid-column: auto; }
@keyframes jgEntra { from { transform: scale(.7); } to { transform: none; } }
.jg-reloj { bottom: 0; }
.tb-fijo.tb-modo-hab .tb-hab:has(> .jg) { overflow: hidden; }
/* Juego con varios compases: casillas más pequeñas para que quepan en el alto del tablero */
.tb-fijo.tb-modo-hab .tb-tablero:has(.jg) .linea-tiempo.varios { padding-top: 6px; }
.tb-fijo.tb-modo-hab .tb-tablero:has(.jg) .linea-tiempo.varios .compas-pulsos { padding-top: 14px; }
.tb-fijo.tb-modo-hab .tb-tablero:has(.jg) .linea-tiempo.varios .pulso .ficha { width: min(44px, 100%); }
.tb-fijo.tb-modo-hab .tb-tablero:has(.jg) .linea-tiempo.varios .compas-cab { font-size: 12px; }
.tb-hab .jg-centro { min-height: 54px; }
.tb-hab .jg-ahora { font-size: 28px; }
.tb-hab .jg-juez .jg-ava { width: 40px; height: 40px; }
.tb-hab .jg-juez .jg-emoji { font-size: 22px; }
.tb-hab .jg-ayuda { font-size: 11.5px; }
/* Juego: todos los compases de la ronda en una sola fila (no tapan los avatares del juez) */
.tb-fijo.tb-modo-hab .tb-tablero:has(.jg) .linea-tiempo.varios { grid-template-columns: repeat(var(--jg-comp, 2), minmax(0, 1fr)); gap: 8px; }
.tb-fijo.tb-modo-hab .tb-tablero:has(.jg) .linea-tiempo.varios .compas { min-width: 0; padding-left: 6px; padding-right: 6px; }
.jg-ganador, .jg-cuenta { animation: jgEntra .4s ease-out; opacity: 1; }

/* Juego: galería de los 27 avatares y participantes elegidos */
.jg-ava img { width: 100%; height: 100%; object-fit: cover; background: #fff; display: block; }
.jg-galeria { display: grid; grid-template-columns: repeat(14, minmax(0, 1fr)); gap: 4px 6px; justify-items: center; }
.jg-galeria .jg-ava { width: 36px; height: 36px; border-width: 2px; opacity: .9; }
.jg-galeria .jg-ava.on { border-color: var(--c); box-shadow: 0 0 0 2px color-mix(in srgb, var(--c) 35%, transparent); opacity: .35; }
.jg-galeria .jg-ava:disabled { opacity: .3; cursor: not-allowed; }
.jg-participantes { display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-start; gap: 6px 10px; min-height: 64px; padding-top: 4px; border-top: 1px dashed rgba(120, 150, 190, .35); }
.jg-participantes .jg-slot { width: 80px; }
.tb-hab .jg-participantes .jg-ava { width: 40px; height: 40px; border-width: 3px; }
.jg-quitar { position: absolute; top: -2px; right: -2px; width: 16px; height: 16px; border-radius: 50%; display: grid; place-items: center; font: 900 10px var(--font); font-style: normal; color: #fff; background: #ef4444; opacity: 0; transition: opacity .15s; }
.jg-participantes .jg-ava { overflow: visible; }
.jg-participantes .jg-ava img { border-radius: 50%; }
.jg-participantes .jg-ava:hover .jg-quitar { opacity: 1; }
.jg-juez .jg-ava img, .jg-ganador .jg-ava img { border-radius: 50%; }
@media (max-width: 760px) { .jg-galeria { grid-template-columns: repeat(9, minmax(0, 1fr)); } }
.tb-hab .jg-participantes .jg-ava { width: 52px; height: 52px; }
.jg-participantes .jg-slot { width: 86px; }

/* Juego v2: la línea de figuras siempre en el mismo lugar y los participantes siempre abajo */
.tb-fijo.tb-modo-hab .linea-tiempo.jg-linea { flex: 0 0 118px; height: 118px; overflow: hidden; display: grid; align-content: center; padding-top: 0; padding-bottom: 0; }
.tb-fijo.tb-modo-hab .linea-tiempo.jg-linea:not(.varios) .compas-pulsos { padding-top: 18px; }
.tb-fijo.tb-modo-hab .linea-tiempo.jg-linea .pulso .ficha { width: min(60px, 100%); }
.tb-fijo.tb-modo-hab .linea-tiempo.jg-linea.varios .pulso .ficha { width: min(44px, 100%); }
.jg-abajo { flex: 0 0 86px; height: 86px; display: flex; align-items: center; justify-content: center; border-top: 1px dashed rgba(120, 150, 190, .35); overflow: hidden; }
.jg-abajo .jg-participantes { border-top: 0; min-height: 0; padding-top: 0; }
.jg-abajo .jg-participantes .jg-ava { width: 46px; height: 46px; border-width: 3px; }
.jg-abajo .jg-juez .jg-ava { width: 50px; height: 50px; border-width: 3px; }
.jg-abajo .jg-tabla { columns: 3; font-size: 12.5px; }
.jg-quedan { font: 800 46px 'Sora', var(--font); color: var(--blue-deep); line-height: 1; }
/* Eliminado: ¡explota! */
.jg-jug.explota .jg-ava { animation: jgBoom .6s ease-out forwards; overflow: visible; }
.jg-boom { position: absolute; inset: -10px; display: grid; place-items: center; font-size: 38px; font-style: normal; pointer-events: none; animation: jgBoomFuego .6s ease-out forwards; }
@keyframes jgBoom { 0% { transform: scale(1); } 25% { transform: scale(1.35); filter: brightness(1.8) saturate(1.6); } 60% { transform: scale(1.1) rotate(-8deg); } 100% { transform: scale(.85); filter: grayscale(1); opacity: .45; } }
@keyframes jgBoomFuego { 0% { transform: scale(.2); opacity: 0; } 30% { transform: scale(1.6); opacity: 1; } 100% { transform: scale(2.4); opacity: 0; } }
/* Juego: al pasar el mouse (o quedarse) sobre un avatar, se agranda como un zoom */
.tb-fijo.tb-modo-hab .tb-hab:has(> .jg) { overflow: visible; }
.jg-abajo, .jg-galeria, .jg-juez, .jg-participantes { overflow: visible; }
.jg .jg-ava, .jg-abajo .jg-ava { transition: transform .18s ease, box-shadow .18s ease; transform-origin: center; }
.jg .jg-ava:hover, .jg .jg-ava:focus-visible, .jg-abajo .jg-ava:hover, .jg-abajo .jg-ava:focus-visible {
  transform: scale(2.2); z-index: 20; position: relative; box-shadow: 0 10px 28px rgba(0, 0, 0, .3); opacity: 1 !important; filter: none; }
.jg-galeria .jg-ava:first-child:hover, .jg-galeria .jg-ava:nth-child(14n+1):hover { transform-origin: left center; }
.jg-galeria .jg-ava:nth-child(14n):hover { transform-origin: right center; }
.jg-galeria .jg-ava:nth-child(-n+14):hover { transform-origin: center top; }
.jg-abajo .jg-ava:hover { transform-origin: center bottom; }
.jg-jug.fuera .jg-ava:hover { filter: grayscale(1); }
/* Zoom de los avatares de abajo: un poco menor y con una pausa breve, para no tapar al vecino al pasar rápido */
.jg-abajo .jg-ava:hover, .jg-abajo .jg-ava:focus-visible { transform: scale(1.8); transition-delay: .15s; }
/* Juego: los botones (Empezar, Presentar figuras, Parar ronda, Ronda N…) en la fila de «Iniciar juego» */
.jg-cab { flex-direction: row; align-items: center; justify-content: space-between; gap: 10px; }
.jg-titulo { display: flex; flex-direction: column; min-width: 0; }
.jg-acciones { display: flex; flex-wrap: nowrap; align-items: center; gap: 6px; flex: none; }
.tb-hab .jg-acciones .btn { padding: 8px 14px; font-size: 13.5px; white-space: nowrap; }
.jg-pie:not(:has(.btn)) { justify-content: flex-start; margin-top: auto; }
.jg-pie:not(:has(.btn)) .jg-nota { text-align: left; }
@media (max-width: 760px) { .jg-cab { flex-wrap: wrap; } .jg-acciones { flex-wrap: wrap; } }
/* Juego: en el tablero oscuro, las figuras de la presentación y de la ⚙ en blanco, como en la línea */
.holo .jg-fig svg { filter: invert(1) brightness(2) drop-shadow(0 0 8px rgba(150, 220, 255, .9)); }
/* Juego: encabezado sin botones en columna; presentación compacta (no se mete sobre la línea de figuras) */
.jg-cab:not(:has(.jg-titulo)) { flex-direction: column; align-items: flex-start; justify-content: center; gap: 0; }
.tb-hab .jg-presenta { gap: 2px; min-height: 0; flex: 1; overflow: hidden; }
.tb-hab .jg-presenta .jg-par { gap: 16px; }
.tb-hab .jg-presenta .jg-fig, .tb-hab .jg-presenta .jg-foto { width: 84px; height: 84px; }
.tb-hab .jg-presenta > b { font-size: 22px; line-height: 1.1; }
.tb-hab .jg-presenta > span { font-size: 12.5px; }
.tb-hab .jg-presenta > small { font-size: 11px; }
.tb-hab .jg-centro { min-height: 0; flex: 1; }
/* Presentación en una fila: figura · foto · nombre y acción (cabe en cualquier alto del tablero) */
.tb-hab .jg-presenta { flex-direction: row; justify-content: center; align-items: center; gap: 22px; position: relative; padding-top: 12px; }
.tb-hab .jg-presenta > small { position: absolute; top: 0; left: 50%; transform: translateX(-50%); }
.jg-pres-txt { display: flex; flex-direction: column; align-items: flex-start; text-align: left; }
.jg-pres-txt b { font: 800 30px/1.1 'Sora', var(--font); color: var(--blue-deep); }
.jg-pres-txt span { font-size: 14px; color: var(--ink-2); }
.holo .jg-pres-txt b { color: #9fe9ff; }
.holo .jg-pres-txt span { color: rgba(225, 242, 255, .9); }
.tb-hab .jg-presenta { padding-top: 0; }
.jg-pres-txt small { font-size: 11.5px; color: var(--ink-3); }
.holo .jg-pres-txt small { color: rgba(225, 242, 255, .7); }
.holo .jg-quedan { color: #9fe9ff; }
.holo .jg-centro small { color: rgba(225, 242, 255, .75); }
/* Juego: textos arriba junto a los botones (no sobre el plano); pausa de la presentación al pasar el mouse */
.jg-sub { font-size: 11.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.holo .jg-sub { color: rgba(225, 242, 255, .7); }
.jg-titulo { flex: 1 1 auto; }
.jg-cab .jg-quedan { font: 800 inherit; font-size: 15px; }
.jg-presenta:hover .jg-reloj { animation-play-state: paused; }
.jg-presenta { cursor: default; }
/* Juego: figuras del MISMO tamaño que en el tablero normal (120 px); con varios compases, lo más grandes que quepan */
.tb-fijo.tb-modo-hab .linea-tiempo.jg-linea { flex: 0 0 152px; height: 152px; }
.tb-fijo.tb-modo-hab .linea-tiempo.jg-linea .pulso .ficha { width: min(120px, 100%); }
.tb-fijo.tb-modo-hab .linea-tiempo.jg-linea.varios .pulso .ficha { width: min(120px, 100%); }
.tb-fijo.tb-modo-hab .linea-tiempo.jg-linea:not(.varios) .compas-pulsos { padding-top: 16px; }
.tb-fijo.tb-modo-hab .linea-tiempo.jg-linea .pulso::after { top: calc(min(120px, 100cqw) / 2 - 1px); }
.jg-abajo { flex: 0 0 70px; height: 70px; }
.jg-abajo .jg-juez .jg-ava, .jg-abajo .jg-participantes .jg-ava { width: 42px; height: 42px; }
.tb-hab .jg-presenta .jg-fig, .tb-hab .jg-presenta .jg-foto { width: 70px; height: 70px; }
.tb-hab .jg-galeria .jg-ava { width: 32px; height: 32px; }
.tb-hab .jg-galeria { gap: 3px 6px; }
/* Juego: botones de la fila a la altura de «Iniciar juego» */
.jg-cab:has(.jg-titulo) { align-items: flex-start; }
.tb-hab .jg-acciones .btn { height: 44px; padding-top: 0; padding-bottom: 0; display: inline-flex; align-items: center; }
/* Juego · REP: un orbe de neón que late con cada golpe del ritmo (en lugar del tambor) */
.jg-orbe { display: block; width: 46px; height: 46px; border-radius: 50%; font-size: 0;
  background: radial-gradient(circle at 35% 30%, #ffffff 0%, #9fe9ff 22%, #3d8bfd 55%, rgba(61, 139, 253, 0) 72%);
  box-shadow: 0 0 18px 6px rgba(95, 178, 255, .55), 0 0 42px 14px rgba(47, 211, 230, .28); opacity: .75; transition: opacity .2s; }
.jg-orbe.golpe { animation: jgOrbe .32s ease-out; opacity: 1; }
@keyframes jgOrbe { 0% { transform: scale(1.45); box-shadow: 0 0 28px 12px rgba(159, 233, 255, .9), 0 0 70px 26px rgba(47, 211, 230, .5); } 100% { transform: scale(1); } }
.claro .jg-orbe { box-shadow: 0 0 16px 5px rgba(61, 139, 253, .45), 0 0 34px 10px rgba(47, 211, 230, .22); }

/* Juego: historial de partidas (se desplaza dentro de su franja si hay muchas) */
.jg-historial { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; padding-right: 4px; }
.jg-partida { padding: 6px 10px; border-radius: 12px; background: rgba(255, 255, 255, .55); }
.holo .jg-partida { background: rgba(255, 255, 255, .08); border: 1px solid rgba(205, 238, 255, .25); }
.jg-partida-cab { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.jg-partida-cab b { font-size: 13.5px; }
.jg-partida-cab small, .jg-salidas small { color: var(--ink-3); font-size: 11.5px; }
.holo .jg-partida-cab small, .holo .jg-salidas small { color: rgba(225, 242, 255, .7); }
.jg-salidas { display: flex; flex-wrap: wrap; gap: 2px 14px; margin: 3px 0 0; padding-left: 18px; font-size: 12.5px; }
.jg-salidas li { display: list-item; }
.jg-mini-ava { display: inline-block; width: 18px; height: 18px; border-radius: 50%; overflow: hidden; vertical-align: -4px; margin-right: 4px; }
.jg-mini-ava img { width: 100%; height: 100%; object-fit: cover; }
.jg-partida-cab { position: relative; padding-right: 30px; }
.jg-quitar-partida { position: absolute; top: -2px; right: -4px; width: 28px; height: 28px; display: grid; place-items: center; border: 0; border-radius: 8px; background: none; color: #ef4444; cursor: pointer; opacity: .7; }
.jg-quitar-partida:hover { opacity: 1; background: rgba(239, 68, 68, .12); }
.jg-quitar-partida svg { width: 17px; height: 17px; }

/* ---------- Juego: fondo de cada misión (solo el recuadro de las figuras), con formas que se mueven despacio ---------- */
.tb-tablero.jg-fondo { isolation: isolate; border-color: rgba(150, 210, 255, .35); }
.tb-tablero.jg-fondo::before, .tb-tablero.jg-fondo::after { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: -1; }
.tb-tablero.jg-fondo::after { z-index: -1; }
/* Sobre fondos oscuros: textos claros y figuras blancas, en cualquier tema */
.tb-tablero.jg-fondo .jg-cab b, .tb-tablero.jg-fondo .jg-pres-txt b, .tb-tablero.jg-fondo .jg-ahora, .tb-tablero.jg-fondo .jg-ganador b { color: #e6f6ff; }
.tb-tablero.jg-fondo .jg-cab span, .tb-tablero.jg-fondo .jg-sub, .tb-tablero.jg-fondo .jg-nota, .tb-tablero.jg-fondo .jg-pres-txt span,
.tb-tablero.jg-fondo .jg-pres-txt small, .tb-tablero.jg-fondo .jg-centro small, .tb-tablero.jg-fondo .jg-jug small, .tb-tablero.jg-fondo .jg-tabla { color: rgba(230, 244, 255, .82); }
.tb-tablero.jg-fondo .jg-quedan { color: #9fe9ff; }
.tb-tablero.jg-fondo .linea-tiempo .ficha svg, .tb-tablero.jg-fondo .jg-fig svg { filter: invert(1) brightness(2) drop-shadow(0 0 6px rgba(190, 230, 255, .85)); }
.tb-tablero.jg-fondo .linea-tiempo .nro, .tb-tablero.jg-fondo .compas-cab { color: rgba(230, 244, 255, .8); }
.tb-tablero.jg-fondo .compas { background: rgba(255, 255, 255, .04); border-color: rgba(200, 230, 255, .18); }
.tb-tablero.jg-fondo .jg-abajo { border-top-color: rgba(200, 230, 255, .2); }

/* 1 · Recuperar la corteza prefrontal — arena digital minimalista: azul petróleo, bordes azules, profundidad */
.jg-fondo-1::before { background: radial-gradient(ellipse 80% 70% at 50% 115%, rgba(40, 140, 190, .35), transparent 65%), linear-gradient(165deg, #0c3340 0%, #072431 55%, #041820 100%);
  box-shadow: inset 0 0 46px rgba(80, 175, 255, .35), inset 0 0 2px rgba(120, 200, 255, .6); }
.jg-fondo-1::after { background-image: radial-gradient(1.6px 1.6px at 12% 28%, rgba(170, 225, 255, .55), transparent 70%), radial-gradient(1.4px 1.4px at 46% 72%, rgba(170, 225, 255, .4), transparent 70%),
  radial-gradient(1.8px 1.8px at 78% 38%, rgba(170, 225, 255, .5), transparent 70%), radial-gradient(1.2px 1.2px at 64% 12%, rgba(170, 225, 255, .35), transparent 70%);
  background-size: 340px 220px; animation: jgDeriva 70s linear infinite; opacity: .8; }

/* 2 · Energizar el hemisferio creativo — malla tecnológica casi invisible sobre naranja oscuro */
.jg-fondo-2::before { background: radial-gradient(ellipse 70% 60% at 85% 0%, rgba(255, 140, 60, .22), transparent 70%), linear-gradient(150deg, #3b1707 0%, #5a240b 48%, #2a0f04 100%);
  box-shadow: inset 0 0 40px rgba(255, 150, 70, .28); }
.jg-fondo-2::after { background-image: linear-gradient(rgba(255, 180, 110, .09) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 180, 110, .09) 1px, transparent 1px);
  background-size: 28px 28px; animation: jgMalla 36s linear infinite; }

/* 3 · Sincronizar el cerebelo — cristal futurista verde con reflejos difusos */
.jg-fondo-3::before { background: radial-gradient(ellipse 60% 80% at 15% 20%, rgba(120, 255, 200, .14), transparent 70%), linear-gradient(140deg, #06302a 0%, #0b4a3c 46%, #052820 100%);
  box-shadow: inset 0 0 44px rgba(90, 240, 190, .22), inset 0 1px 0 rgba(200, 255, 235, .25); }
.jg-fondo-3::after { background: linear-gradient(112deg, transparent 32%, rgba(190, 255, 230, .11) 44%, rgba(190, 255, 230, .03) 50%, transparent 62%);
  background-size: 260% 100%; animation: jgReflejo 16s ease-in-out infinite alternate; }

/* 4 · Encender el hipocampo — nebulosa violeta con orbes que flotan */
.jg-fondo-4::before { background: radial-gradient(ellipse 70% 60% at 30% 100%, rgba(160, 90, 255, .25), transparent 70%), linear-gradient(160deg, #1d0f3a 0%, #2a1352 50%, #140a2a 100%);
  box-shadow: inset 0 0 44px rgba(170, 120, 255, .3); }
.jg-fondo-4::after { background-image: radial-gradient(circle at 18% 72%, rgba(200, 160, 255, .16) 0 38px, transparent 40px), radial-gradient(circle at 78% 30%, rgba(150, 120, 255, .13) 0 58px, transparent 60px),
  radial-gradient(circle at 55% 85%, rgba(230, 170, 255, .10) 0 26px, transparent 28px);
  background-size: 100% 100%; animation: jgOrbes 28s ease-in-out infinite alternate; }

/* 5 · Unir los dos hemisferios — aurora magenta y cian que se cruza despacio */
.jg-fondo-5::before { background: linear-gradient(120deg, #1c0c2f 0%, #0d1f35 55%, #062a35 100%); box-shadow: inset 0 0 44px rgba(120, 200, 255, .22); }
.jg-fondo-5::after { background: linear-gradient(100deg, rgba(255, 70, 190, .13), rgba(40, 220, 255, .13), rgba(255, 70, 190, .13), rgba(40, 220, 255, .13));
  background-size: 300% 100%; animation: jgAurora 24s ease-in-out infinite alternate; }

/* 6 · Despertar la corteza auditiva — ondas ámbar que se expanden muy suave */
.jg-fondo-6::before { background: radial-gradient(ellipse 70% 70% at 50% 50%, rgba(255, 190, 90, .18), transparent 70%), linear-gradient(160deg, #2e1d06 0%, #3e2808 50%, #1f1404 100%);
  box-shadow: inset 0 0 44px rgba(255, 200, 110, .25); }
.jg-fondo-6::after { background: repeating-radial-gradient(circle at 50% 55%, rgba(255, 215, 140, .07) 0 2px, transparent 2px 36px);
  background-size: 100% 100%; background-position: center; animation: jgOndas 9s ease-in-out infinite alternate; }

@keyframes jgDeriva { from { background-position: 0 0; } to { background-position: -340px 110px; } }
@keyframes jgMalla { from { background-position: 0 0; } to { background-position: 28px 56px; } }
@keyframes jgReflejo { from { background-position: 100% 0; } to { background-position: 0% 0; } }
@keyframes jgOrbes { from { background-position: 0 0; } to { background-position: 40px -24px; } }
@keyframes jgAurora { from { background-position: 0% 0; } to { background-position: 100% 0; } }
@keyframes jgOndas { from { background-size: 100% 100%; } to { background-size: 112% 112%; } }
@media (prefers-reduced-motion: reduce) { .tb-tablero.jg-fondo::after { animation: none; } }
/* Juego: botones solo con ícono (redondos, del alto de «Iniciar juego») */
.tb-hab .jg-acciones .btn.jg-ico, .jg-final .btn.jg-ico { width: 44px; height: 44px; padding: 0; justify-content: center; border-radius: 50%; }
.jg-ico svg { width: 20px; height: 20px; }
#jg-borrar-hist { color: #ef4444; }

.jg-modos { margin-bottom: 8px; }
.jg-auto { color: #9fe9ff !important; font-weight: 600; }
/* Juego: zoom grande del avatar al pasar el mouse (4 veces su tamaño: un 300 % más) */
.jg .jg-ava:hover, .jg .jg-ava:focus-visible, .jg-abajo .jg-ava:hover, .jg-abajo .jg-ava:focus-visible {
  transform: scale(4); z-index: 60; transition: transform .2s ease .12s; box-shadow: 0 6px 18px rgba(0, 0, 0, .35); }
.jg-abajo .jg-ava:hover, .jg-abajo .jg-ava:focus-visible { transform-origin: center bottom; }
.jg-galeria .jg-ava:hover { transform-origin: center top; }
.jg-galeria .jg-ava:nth-child(14n+1):hover { transform-origin: left top; }
.jg-galeria .jg-ava:nth-child(14n):hover { transform-origin: right top; }
.jg-galeria .jg-ava:nth-child(n+15):hover { transform-origin: center top; }
.jg-galeria .jg-ava:nth-child(15):hover { transform-origin: left top; }
.jg-galeria .jg-ava:nth-child(28):hover { transform-origin: right top; }
.jg-abajo { position: relative; z-index: 5; }
.jg-galeria { position: relative; z-index: 5; }
.jg-jug:hover small, .jg-slot:hover .jg-nombre { position: relative; z-index: 61; }
/* La ✕ de quitar no crece con el zoom; los textos del encabezado en una línea (no se montan sobre la galería) */
.jg-ava:hover .jg-quitar { transform: scale(.28); transform-origin: top right; opacity: 1; }
.jg-titulo { min-width: 0; overflow: hidden; }
.jg-titulo > b, .jg-titulo > span, .jg-titulo > small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; max-width: 100%; }
/* Juego: el botón de salir se distingue (rojo) */
.tb-hab .jg-acciones #jg-salir, .jg-final #jg-salir { color: #ef4444; }
.tb-hab .jg-acciones #jg-salir:hover, .jg-final #jg-salir:hover { background: rgba(239, 68, 68, .14); }
/* Video de bienvenida del juego: bloquea la pantalla completa */
.jg-video { position: fixed; inset: 0; z-index: 10000; background: #000; display: grid; place-items: center; }
.jg-video video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.jg-video-esc { pointer-events: none; }
body.con-video-juego { overflow: hidden; }

/* ⚙ del juego: rondas para elegir las figuras en modo manual */
.jg-rondas { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 6px; }
.jg-rondas button { min-width: 38px; padding: 5px 8px; border: 0; border-radius: 10px; font: 700 12px var(--font); color: var(--ink-2); background: var(--surface-2); box-shadow: var(--raise-sm); cursor: pointer; }
.jg-rondas button.lista { color: var(--blue-deep); }
.jg-rondas button.on { color: #fff; background: var(--grad); box-shadow: var(--glow); }
.jg-comp-fila .jg-rondas { margin: 0; }
.jg-comp-fila .jg-rondas button { min-width: 32px; }
/* ⚙ del juego: opciones como tarjetas */
.jg-op-sec { margin: 10px 0 6px; font: 700 11.5px var(--font); letter-spacing: .6px; text-transform: uppercase; color: var(--ink-3); }
.jg-opciones { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }
.jg-opciones-par { flex-direction: row; }
.jg-opciones-par .jg-opcion { flex: 1; }
.jg-opcion { display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 14px; border: 1.5px solid rgba(120, 160, 210, .25); border-radius: 16px; text-align: left; cursor: pointer;
  background: linear-gradient(145deg, rgba(255, 255, 255, .95), rgba(236, 244, 255, .9)); box-shadow: 0 4px 12px rgba(40, 80, 140, .12); transition: transform .15s, box-shadow .15s, border-color .15s; font: inherit; color: var(--ink); }
.jg-opcion:hover { transform: translateY(-1px); box-shadow: 0 8px 18px rgba(40, 80, 140, .2); border-color: rgba(61, 139, 253, .5); }
.jg-opcion b { display: block; font: 700 14px 'Sora', var(--font); }
.jg-opcion small { display: block; margin-top: 2px; font-size: 11.5px; line-height: 1.35; color: var(--ink-2); }
.jg-op-ico { flex: none; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; font-size: 20px; background: rgba(61, 139, 253, .12); }
.jg-opcion.activo { color: #fff; border-color: transparent; background: var(--grad); box-shadow: var(--glow); }
.jg-opcion.activo small { color: rgba(255, 255, 255, .9); }
.jg-opcion.activo .jg-op-ico { background: rgba(255, 255, 255, .22); }
.jg-opcion.activo b { color: #fff; }
.jg-comp-fila { flex-wrap: nowrap; }
.jg-comp-fila .jg-rondas { flex-wrap: nowrap; flex: none; }
.jg-comp-fila .jg-rondas button { min-width: 30px; padding: 5px 6px; }
/* La ⚙ (y su ventana) siempre por encima de todo lo del tablero, incluidos los avatares con zoom */
.tb-ajustes { z-index: 80; }
/* Juego: anuncio de la ronda (modo automático) */
.jg-anuncio { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; animation: jgEntra .45s ease-out; }
.jg-anuncio small { font: 700 14px var(--font); letter-spacing: 3px; text-transform: uppercase; color: var(--ink-3); }
.jg-anuncio b { font: 900 64px/1 'Sora', var(--font); color: var(--blue-deep); text-shadow: 0 0 24px rgba(95, 178, 255, .55); }
.jg-anuncio span { margin-top: 2px; font: 700 18px 'Sora', var(--font); color: var(--ink-2); }
.tb-tablero.jg-fondo .jg-anuncio b, .holo .jg-anuncio b { color: #e6f6ff; text-shadow: 0 0 26px rgba(120, 210, 255, .8); }
.tb-tablero.jg-fondo .jg-anuncio small, .tb-tablero.jg-fondo .jg-anuncio span, .holo .jg-anuncio small, .holo .jg-anuncio span { color: rgba(230, 244, 255, .85); }

/* ---------- Luz del tablero: halo detrás y ecualizador en el borde, al pulso ---------- */
.tb-tablero { isolation: isolate; }
.tb-tablero.luz { animation: tbLuz .55s ease-out; }
.tb-tablero.luz-fuerte { animation: tbLuzFuerte .7s ease-out; }
@keyframes tbLuz { 0% { box-shadow: 0 0 22px 4px rgba(95, 178, 255, .38), 0 0 60px 10px rgba(47, 211, 230, .14); } 100% { box-shadow: 0 0 0 0 rgba(95, 178, 255, 0); } }
@keyframes tbLuzFuerte { 0% { box-shadow: 0 0 30px 8px rgba(120, 200, 255, .55), 0 0 90px 22px rgba(47, 211, 230, .22); } 100% { box-shadow: 0 0 0 0 rgba(95, 178, 255, 0); } }
.tb-eq { position: absolute; left: 8%; right: 8%; bottom: 2px; height: 22px; display: flex; align-items: flex-end; gap: 3px; z-index: -1; pointer-events: none; opacity: .5; }
.tb-eq span { flex: 1; height: 6%; border-radius: 2px 2px 0 0; background: linear-gradient(to top, rgba(95, 178, 255, .95), rgba(47, 211, 230, .15));
  box-shadow: 0 0 6px rgba(95, 178, 255, .55); transition: height .5s cubic-bezier(.2, .7, .3, 1); }
.claro .tb-eq span { background: linear-gradient(to top, rgba(61, 139, 253, .8), rgba(47, 211, 230, .1)); }
.naranja .tb-eq span { background: linear-gradient(to top, rgba(249, 115, 22, .8), rgba(253, 186, 116, .12)); box-shadow: 0 0 6px rgba(249, 115, 22, .45); }
.naranja .tb-tablero.luz { animation-name: tbLuzN; }
.naranja .tb-tablero.luz-fuerte { animation-name: tbLuzNF; }
@keyframes tbLuzN { 0% { box-shadow: 0 0 22px 4px rgba(249, 115, 22, .3); } 100% { box-shadow: 0 0 0 0 rgba(249, 115, 22, 0); } }
@keyframes tbLuzNF { 0% { box-shadow: 0 0 30px 8px rgba(249, 115, 22, .45), 0 0 80px 18px rgba(253, 186, 116, .2); } 100% { box-shadow: 0 0 0 0 rgba(249, 115, 22, 0); } }
@media (prefers-reduced-motion: reduce) { .tb-tablero.luz, .tb-tablero.luz-fuerte { animation: none; } .tb-eq span { transition: none; } }
/* Audiomotora dentro del tablero: la presentación en dos columnas (imagen | texto y botones), sin desplazamiento */
.tb-hab .am-item:has(> .am-presenta) { display: grid; grid-template-columns: auto auto; grid-template-areas: "img lab" "img tit" "img bot" "img paso";
  justify-content: center; align-items: center; column-gap: 18px; row-gap: 2px; text-align: left; }
.tb-hab .am-item:has(> .am-presenta) > .am-num-item { grid-area: lab; margin: 0; }
.tb-hab .am-item:has(> .am-presenta) > .am-presenta { grid-area: img; width: 84px; height: 84px; border-radius: 18px; }
.tb-hab .am-item:has(> .am-presenta) > .am-presenta img, .tb-hab .am-item:has(> .am-presenta) > .am-presenta svg { width: 62px; height: 62px; }
.tb-hab .am-item:has(> .am-presenta) > .am-presenta .am-emoji { font-size: 46px; }
.tb-hab .am-item:has(> .am-presenta) > .am-titulo { grid-area: tit; margin: 0; text-align: left; }
.tb-hab .am-item:has(> .am-presenta) > .pr-botones { grid-area: bot; justify-content: flex-start; margin: 2px 0 0; }
.tb-hab .am-item:has(> .am-presenta) > .am-paso { grid-area: paso; }
.tb-hab .am-item .am-par img { width: 54px; height: 54px; }

/* Atajos de teclado */
.tb-atajos .prog-caja { max-width: 520px; }
.tb-atajos h2 { margin: 0 0 10px; font: 800 20px 'Sora', var(--font); }
.tb-atajos-lista { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.tb-atajos-lista li { display: grid; grid-template-columns: 130px 1fr; align-items: center; gap: 10px; font-size: 14px; }
.tb-atajos-lista kbd { justify-self: start; padding: 3px 9px; border-radius: 8px; font: 700 12.5px var(--font); color: var(--blue-deep); background: #fff; box-shadow: 0 1px 0 rgba(0, 0, 0, .15), var(--raise-sm); white-space: nowrap; }

/* ---------- Juego: barra aparte (junto a Proyectar · Guardar · Mis ejercicios), solo con el juego activo ---------- */
.tb-juego-barra { display: flex; align-items: center; gap: 8px; padding: 6px; border-radius: 18px; box-shadow: var(--inset-sm); flex: none; }
.holo .tb-juego-barra { background: rgba(255, 255, 255, .08); border: 1px solid rgba(205, 238, 255, .4); box-shadow: inset 0 0 16px rgba(170, 220, 255, .12); }
.tb-juego-acciones { display: flex; align-items: center; gap: 6px; }
.tb-juego-acciones:empty { display: none; }
.tb-juego-barra .btn.jg-ico { width: 42px; height: 42px; padding: 0; border-radius: 50%; display: inline-grid; place-items: center; }
.tb-juego-barra .jg-ico svg { width: 20px; height: 20px; }
.tb-juego-barra #jg-salir { color: #ef4444; }
.tb-juego-barra #jg-salir:hover { background: rgba(239, 68, 68, .14); }
.tb-juego-principal { height: 42px; padding: 0 18px; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.tb-juego-principal svg { width: 16px; height: 16px; }
.tb-fila:has(.tb-juego-barra) { flex-wrap: wrap; }
/* En pantalla completa, la barra arriba del tablero proyectado */
.tb-escena:fullscreen > .tb-juego-barra { align-self: flex-end; margin-bottom: 12px; }
/* Con el juego activo, el botón principal vive en la barra; en el tablero quedan el nivel y la ⚙ */
.jg-activo .tb-ajustes > #btn-iniciar { display: none; }
.jg-nivel { padding: 6px 12px; border-radius: 999px; font: 700 12.5px var(--font); letter-spacing: .4px; color: var(--blue-deep); background: rgba(61, 139, 253, .12); white-space: nowrap; }
.holo .jg-nivel, .tb-tablero.jg-fondo .jg-nivel { color: #e6f6ff; background: rgba(255, 255, 255, .14); border: 1px solid rgba(205, 238, 255, .35); }
.jg-cab:has(.jg-titulo:empty) { min-height: 46px; }
/* Barra del juego: íconos nítidos (como los del tablero) y neón 40 % más suave */
.tb-juego-barra .btn.jg-ico { color: var(--blue-deep); box-shadow: 0 2px 6px rgba(40, 80, 140, .14); }
.holo .tb-juego-barra .btn.jg-ico { background: rgba(255, 255, 255, .12); color: #fff; border: 1.5px solid rgba(215, 240, 255, .55); box-shadow: 0 0 8px rgba(100, 190, 255, .27); }
.holo .tb-juego-barra .btn.jg-ico:hover { background: rgba(255, 255, 255, .22); }
.holo .tb-juego-barra .btn.jg-ico svg { color: #fff; }
.tb-juego-barra #jg-salir, .holo .tb-juego-barra #jg-salir { color: #ff7a7a; }
.tb-juego-barra #jg-salir svg, .holo .tb-juego-barra #jg-salir svg { color: #ff7a7a; }
.tb-juego-barra .tb-juego-principal { box-shadow: 0 0 0 2px rgba(61, 139, 253, .09), 0 5px 14px rgba(61, 139, 253, .21); }
/* Barra del juego: cada botón con su color neón translúcido (fondo transparente, ícono del mismo tono) */
.tb-juego-barra .btn.jg-ico { --nc: 61, 139, 253; background: rgba(var(--nc), .18) !important; border: 1.5px solid rgba(var(--nc), .55) !important;
  color: rgb(var(--nc)) !important; box-shadow: 0 0 8px rgba(var(--nc), .3) !important; }
.tb-juego-barra .btn.jg-ico svg { color: rgb(var(--nc)) !important; }
.tb-juego-barra .btn.jg-ico:hover { background: rgba(var(--nc), .3) !important; }
.tb-juego-barra #jg-modo { --nc: 57, 255, 140; }          /* verde neón: modo manual / automático */
.tb-juego-barra #jg-historial { --nc: 255, 150, 50; }     /* naranja neón: historial */
.tb-juego-barra #jg-salir { --nc: 255, 90, 100; }         /* rojo neón: salir */
.tb-juego-barra #jg-presentar, .tb-juego-barra #jg-otra-vez { --nc: 70, 220, 255; }  /* cian: presentar figuras */
.tb-juego-barra #jg-reiniciar { --nc: 190, 120, 255; }    /* violeta: reiniciar */
.tb-juego-barra #jg-fin { --nc: 255, 215, 60; }           /* amarillo: terminar */
.tb-juego-barra #jg-volver { --nc: 120, 180, 255; }       /* azul: volver */
.tb-juego-barra #jg-borrar-hist { --nc: 255, 90, 100; }   /* rojo: borrar historial */
/* En los temas claros, tonos un poco más oscuros para que se lean */
.claro .tb-juego-barra #jg-modo { --nc: 22, 163, 74; }
.claro .tb-juego-barra #jg-historial { --nc: 234, 108, 10; }
.claro .tb-juego-barra #jg-fin { --nc: 202, 138, 4; }
.claro .tb-juego-barra #jg-presentar, .claro .tb-juego-barra #jg-otra-vez { --nc: 8, 145, 178; }

/* ---------- Juego: selector de personajes tipo carrusel (estilo consola) ---------- */
.jg-cab:has(.jg-selector) { flex-direction: row; align-items: center; justify-content: space-between; }
.jg-selector { position: relative; display: flex; align-items: center; gap: 6px; flex: none; margin-left: auto; }
.jg-flecha { width: 28px; height: 28px; border: 0; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  font: 700 22px/1 var(--font); color: #9fe9ff; background: rgba(95, 178, 255, .14); box-shadow: 0 0 8px rgba(95, 178, 255, .25); transition: transform .15s, background .15s; }
.jg-flecha:hover { transform: scale(1.12); background: rgba(95, 178, 255, .28); }
.claro .jg-flecha { color: var(--blue-deep); }
.jg-carrusel { display: flex; align-items: center; gap: 4px; }
.jg-carrusel.desde-der { animation: jgCarDer .28s ease-out; }
.jg-carrusel.desde-izq { animation: jgCarIzq .28s ease-out; }
@keyframes jgCarDer { from { transform: translateX(22px); opacity: .5; } to { transform: none; opacity: 1; } }
@keyframes jgCarIzq { from { transform: translateX(-22px); opacity: .5; } to { transform: none; opacity: 1; } }
.jg-car { position: relative; width: 46px; height: 46px; padding: 0; border-radius: 50%; overflow: visible; cursor: pointer;
  border: 2.5px solid rgba(205, 238, 255, .55); background: rgba(255, 255, 255, .1);
  box-shadow: 0 0 10px rgba(95, 178, 255, .3), inset 0 0 8px rgba(255, 255, 255, .15); transition: transform .3s cubic-bezier(.2, .8, .2, 1), box-shadow .3s, opacity .3s; }
.jg-car img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
.jg-car.lado { opacity: .75; }
.jg-car.centro { border-color: var(--c); }
.jg-car.ya { border-color: #39ff8c; }
.jg-car-ok { position: absolute; right: -3px; bottom: -3px; width: 16px; height: 16px; border-radius: 50%; display: grid; place-items: center;
  font: 900 10px var(--font); font-style: normal; color: #062; background: #39ff8c; box-shadow: 0 0 6px rgba(57, 255, 140, .8); }
/* Al moverse, el del centro se amplía (zoom) para verlo bien */
.jg-selector.moviendo .jg-car.centro { transform: scale(2.1); z-index: 30; box-shadow: 0 0 22px var(--c), 0 8px 24px rgba(0, 0, 0, .35); }
.jg-selector.moviendo .jg-car.lado { opacity: .45; transform: scale(.9); }
.jg-carrusel { position: relative; }
.jg-car-tag { position: absolute; left: 50%; top: calc(50% + 54px); transform: translateX(-50%); z-index: 31; padding: 2px 8px; border-radius: 6px;
  font: 700 11px/1.3 var(--font); letter-spacing: .2px; color: #fff; background: rgba(4, 20, 50, .75); white-space: nowrap; pointer-events: none;
  opacity: 0; transition: opacity .2s; }
/* El nombre solo aparece debajo del personaje ampliado, mientras se mueve; quieto no queda nada fijo */
.jg-selector.moviendo .jg-car-tag { opacity: 1; }
.tb-hab .jg-cab:has(.jg-selector) { min-height: 64px; }
.tb-juego-barra #jg-nueva { --nc: 57, 255, 140; }        /* verde: nueva partida */
.claro .tb-juego-barra #jg-nueva { --nc: 22, 163, 74; }

/* ---------- Juego: sesión (nombre + configuración) después del video ---------- */
.jg-sesion { position: fixed; inset: 0; z-index: 10000; display: grid; place-items: center; padding: 16px; background: rgba(2, 10, 30, .88); backdrop-filter: blur(4px); }
.jg-sesion-caja { width: min(560px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; padding: 22px 24px; border-radius: 22px; background: var(--surface); color: var(--ink);
  box-shadow: 0 0 40px rgba(95, 178, 255, .35), 0 20px 50px rgba(0, 0, 0, .45); }
.jg-sesion-caja h2 { margin: 0 0 12px; font: 800 20px 'Sora', var(--font); color: var(--blue-deep); }
.jg-sesion-nombre { display: grid; gap: 6px; margin-bottom: 6px; }
.jg-sesion-nombre span { font: 700 11.5px var(--font); letter-spacing: .6px; text-transform: uppercase; color: var(--ink-3); }
.jg-sesion-nombre input { padding: 12px 14px; border: 1.5px solid rgba(61, 139, 253, .35); border-radius: 14px; font: 600 16px var(--font); color: var(--ink); background: var(--surface-2); outline: none; }
.jg-sesion-nombre input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(61, 139, 253, .2); }
.jg-sesion-ajustes .tb-pop-titulo { display: none; }
.jg-sesion-ir { display: block; width: 100%; margin-top: 14px; padding: 15px; border: 0; border-radius: 999px; cursor: pointer; font: 800 18px var(--font); color: #fff;
  background: linear-gradient(135deg, #3d8bfd, #7c3aed); box-shadow: 0 0 24px rgba(95, 178, 255, .5); }
.jg-sesion-ir:hover { filter: brightness(1.1); }
.jg-partida-sesion { display: block; width: 100%; font: 800 12px var(--font); letter-spacing: .4px; text-transform: uppercase; color: var(--blue); }
#jg-nivel { max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
.jg-sesion .jg-sesion-caja { width: min(820px, 100%); }
.jg-sesion .jg-opciones:not(.jg-opciones-par) { display: flex; gap: 8px; }
.jg-sesion .jg-opciones:not(.jg-opciones-par) .jg-opcion { flex: 1; }
.jg-sesion .jg-figs { grid-template-columns: repeat(9, 1fr); gap: 5px; }
.jg-sesion .jg-figs button { padding: 4px 2px; }
.jg-sesion .jg-figs svg { width: 22px; height: 22px; }
.jg-sesion .jg-figs small { font-size: 9.5px; }
@media (max-width: 640px) { .jg-sesion .jg-figs { grid-template-columns: repeat(5, 1fr); } .jg-sesion .jg-opciones:not(.jg-opciones-par) { flex-direction: column; } }
/* Sesión de juego: ventana oscura */
.jg-sesion .jg-sesion-caja { width: min(760px, 100%); --surface: #0c1a3a; --surface-2: rgba(255, 255, 255, .07); --ink: #eaf4ff; --ink-2: #b8cbe8; --ink-3: #7fa0cc; --blue-deep: #9fe9ff;
  --raise-sm: 0 0 0 1px rgba(140, 190, 255, .18); background: linear-gradient(160deg, #0f2250, #081430 70%); border: 1px solid rgba(120, 180, 255, .3); color: var(--ink); }
.jg-sesion .jg-sesion-caja h2 { color: #9fe9ff; }
.jg-sesion .jg-sesion-nombre input { color: #fff; background: rgba(255, 255, 255, .07); border-color: rgba(120, 180, 255, .35); }
.jg-sesion .jg-sesion-nombre input::placeholder { color: rgba(200, 220, 255, .45); }
.jg-sesion .jg-opcion { background: rgba(255, 255, 255, .06); border-color: rgba(120, 180, 255, .25); color: var(--ink); box-shadow: none; }
.jg-sesion .jg-opcion:hover { border-color: rgba(120, 200, 255, .6); box-shadow: 0 0 14px rgba(95, 178, 255, .25); }
.jg-sesion .jg-opcion.activo { background: var(--grad); border-color: transparent; box-shadow: 0 0 18px rgba(95, 178, 255, .45); }
.jg-sesion .jg-op-ico { background: rgba(120, 180, 255, .15); }
.jg-sesion .jg-figs button { color: #eaf4ff; }
.jg-sesion .jg-figs button.on { box-shadow: 0 0 0 2px #5fb2ff, 0 0 10px rgba(95, 178, 255, .4); }
.jg-sesion .tb-nota, .jg-sesion .tb-pop-fila { color: var(--ink-2); }
.jg-sesion .jg-sec-fig, .jg-sesion .jg-op-fig { display: none; }
.jg-sesion-ajustes.abierto { margin-top: 4px; padding: 10px 12px; border-radius: 16px; background: rgba(0, 0, 0, .2); border: 1px solid rgba(120, 180, 255, .18); animation: jgEntra .3s ease-out; }
.jg-sesion .jg-sesion-ir { font: 900 20px 'Sora', var(--font); letter-spacing: .5px; animation: jgAnunciaBtn 1.6s ease-in-out infinite; }
@keyframes jgAnunciaBtn { 0%, 100% { box-shadow: 0 0 18px rgba(95, 178, 255, .45); transform: scale(1); } 50% { box-shadow: 0 0 38px rgba(167, 120, 255, .85); transform: scale(1.02); } }
.jg-sesion .jg-sesion-ajustes .jg-sec-fig, .jg-sesion .jg-sesion-ajustes .jg-op-fig { display: none; }
.jg-sesion .jg-sesion-caja > .jg-opciones { flex-direction: row; }
.jg-sesion .jg-sesion-caja > .jg-opciones .jg-opcion { flex: 1; }
.jg-sesion .jg-sesion-caja { padding: 18px 22px; }
.jg-sesion .jg-sesion-caja h2 { margin-bottom: 8px; font-size: 18px; }
.jg-sesion .jg-sesion-ajustes .jg-op-sec { margin: 6px 0 4px; }
.jg-sesion .jg-sesion-ajustes .jg-opciones { margin-bottom: 0; }
.jg-sesion .jg-sesion-ajustes .jg-opcion { padding: 7px 12px; }
.jg-sesion .jg-sesion-ajustes .jg-op-ico { width: 30px; height: 30px; font-size: 16px; }
.jg-sesion .jg-sesion-ajustes .tb-nota { margin: 4px 0; }
.jg-sesion .jg-figs { margin-bottom: 4px; }
.jg-sesion .jg-figs button { opacity: .8; }
.jg-sesion .jg-figs button.on { opacity: 1; }
.jg-sesion .jg-sesion-ir { margin-top: 12px; padding: 13px; }
@media (max-width: 640px) { .jg-sesion .jg-sesion-caja > .jg-opciones { flex-direction: column; } }
/* Juego: íconos propios en SVG (sin emojis del navegador) */
.jg-con-ico { display: inline-flex; align-items: center; gap: 8px; }
.jg-con-ico > svg { width: 1.15em; height: 1.15em; flex: none; }
.jg-op-ico svg { width: 22px; height: 22px; }
.jg-sesion-ajustes .jg-op-ico svg { width: 18px; height: 18px; }
.jg-sesion-ir svg { width: 26px; height: 26px; vertical-align: -6px; margin-right: 6px; }
.jg-x svg { width: 70%; height: 70%; stroke-width: 3; }
.jg-quitar svg, .jg-car-ok svg { width: 70%; height: 70%; }
.jg-quitar svg path, .jg-car-ok svg path { stroke-width: 3.5; }
.jg-boom svg { width: 64px; height: 64px; filter: drop-shadow(0 0 8px rgba(255, 120, 30, .8)); }
.jg-tabla small svg { width: 14px; height: 14px; vertical-align: -2px; }

/* Íconos de solo contorno en toda la app (sin emojis del navegador) */
.ico-l { width: 1.15em; height: 1.15em; display: inline-block; vertical-align: -0.2em; flex: none; }
.am-emoji .ico-l, .mm-rep .ico-l, .mm-ojos .ico-l, .mm-oido .ico-l, .compra-fin .ico-l, .promo-regalo .ico-l, .pr-icono .ico-l, .am-presenta-oir .ico-l { width: 1em; height: 1em; vertical-align: middle; }
.punto-estado { display: inline-flex; vertical-align: -0.15em; }
.punto-estado.verde { color: #16a34a; }
.punto-estado.amarillo { color: #d9a400; }
.punto-estado.rojo { color: #dc2626; }
.cg-vida { color: #ef4444; display: inline-flex; margin: 0 2px; }
.cg-vida.perdida { color: currentColor; opacity: .3; }
/* Juego en los espacios docente e institucional: el mismo tablero oscuro del espacio personal */
.holo.jg-tema { background: radial-gradient(120% 90% at 25% 10%, #1b5fae 0%, #0d3474 45%, #061a40 100%); }
.jg-sesion-nombre span em { font-style: normal; font-weight: 500; text-transform: none; letter-spacing: 0; opacity: .85; }
.jg-fig-grupo { margin: 6px 0 4px; font: 700 10.5px var(--font); letter-spacing: .5px; text-transform: uppercase; color: var(--ink-3); }
.jg-sesion .jg-figs { grid-template-columns: repeat(11, 1fr); }
.jg-sesion .jg-fig-grupo { margin: 4px 0 3px; }
@media (max-width: 640px) { .jg-sesion .jg-figs { grid-template-columns: repeat(5, 1fr); } }
.jg-sesion .jg-figs button { padding: 2px 1px; gap: 0; }
.jg-sesion .jg-figs svg { width: 19px; height: 19px; }
.jg-sesion .jg-figs small { font-size: 9px; }
.jg-sesion .jg-sesion-caja h2 { margin-bottom: 6px; }
.jg-sesion .jg-sesion-ajustes.abierto { padding: 8px 10px; }
.jg-sesion .jg-sesion-ajustes .jg-rondas { margin-bottom: 3px; }

/* ---------- Celular: barra superior en una sola fila y tablero sin espacio sobrante ---------- */
@media (max-width: 760px) {
  .topbar { flex-wrap: wrap; gap: 10px; padding: 8px 12px; }
  .marca { flex: 1; min-width: 0; gap: 10px; white-space: normal; }
  .marca > span:last-child { min-width: 0; font-size: 14px; line-height: 1.15; }
  .marca small { font-size: 10.5px; margin-top: 1px; }
  .marca-logo { width: 38px; height: 38px; border-radius: 12px; font-size: 13px; flex: none; }
  .btn.btn-menu { margin-left: 0; flex: none; width: 42px; height: 42px; padding: 0; justify-content: center; }
  .menu.abierto { padding-top: 4px; }
}
@media (max-width: 700px) {
  /* El tablero normal: lo justo para la línea de figuras (más grandes) y los avatares. */
  .tb-fijo:not(.tb-modo-hab) { --alto-tablero: clamp(330px, 48vh, 420px); }
  .tb-fijo:not(.tb-modo-hab) .tb-tablero { padding: 60px 12px 16px; justify-content: center; }
  .tb-fijo:not(.tb-modo-hab) .pulso .ficha { width: min(64px, 100%); }
  /* Habilidades y juego: un poco más de alto, sin pasarse de la pantalla. */
  .tb-fijo.tb-modo-hab { --alto-tablero: clamp(460px, 68vh, 600px); }
}
@media (max-width: 700px) {
  /* Barra del juego: a lo ancho, botones a la izquierda e «Iniciar juego» ocupando el resto. */
  .tb-juego-barra { width: 100%; box-sizing: border-box; flex-wrap: wrap; gap: 6px; }
  .tb-juego-acciones { flex-wrap: wrap; gap: 5px; }
  .tb-juego-barra .btn.jg-ico { width: 38px; height: 38px; }
  .tb-juego-principal { flex: 1; min-width: 130px; justify-content: center; padding: 0 12px; }
}
@media (max-width: 700px) { .jg-activo.tb-fijo, .jg-activo .tb-fijo { --alto-tablero: clamp(400px, 56vh, 480px); } }

/* ================= Molda: entrenamiento físico al ritmo de PMN ================= */
.holo.md { max-width: 760px; margin: 0 auto; padding: 22px 24px 20px; transform: none; display: flex; flex-direction: column; gap: 16px; }
.md-cab { position: relative; display: flex; justify-content: center; align-items: center; min-height: 46px; padding: 0 56px; }
.md-titulo { margin: 0; text-align: center; font: 800 clamp(20px, 3.2vw, 28px) 'Sora', var(--font); color: #fff; letter-spacing: .01em; text-shadow: 0 0 18px rgba(140, 210, 255, .6); border-bottom: 2px solid rgba(160, 220, 255, .45); padding-bottom: 4px; }
.md-conf { position: absolute; right: 0; top: 50%; transform: translateY(-50%); background: rgba(255, 255, 255, .14) !important; color: #fff !important; border: 1.5px solid rgba(215, 240, 255, .7) !important; }
.md-conf svg { color: #fff; }
.md-anillo { position: relative; width: min(300px, 76vw); aspect-ratio: 1; margin: 0 auto; }
.md-anillo svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.md-pista { fill: rgba(255, 255, 255, .05); stroke: rgba(205, 238, 255, .22); stroke-width: 4.5; }
.md-avance { fill: none; stroke: #5fd4ff; stroke-width: 4.5; stroke-linecap: round; filter: drop-shadow(0 0 3px rgba(95, 212, 255, .8)); transition: stroke-dashoffset .4s ease; }
.md-punto { fill: rgba(255, 255, 255, .18); stroke: rgba(215, 240, 255, .55); stroke-width: .5; transition: fill .3s; }
.md-punto.on { fill: #39ff8c; stroke: #b6ffd5; filter: drop-shadow(0 0 2px rgba(57, 255, 140, .95)); }
.md-punto.actual { fill: #ffd34d; stroke: #fff2bf; animation: mdLate 1s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes mdLate { 50% { transform: scale(1.5); } }
.md-centro { position: absolute; inset: 22%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; color: #fff; line-height: 1.05; }
.md-centro small { font: 700 11px var(--font); letter-spacing: 1.5px; text-transform: uppercase; color: rgba(210, 236, 255, .75); }
.md-centro b { font: 800 clamp(30px, 7vw, 42px) 'Sora', var(--font); margin-bottom: 6px; }
.md-centro b.md-meta { color: #8ff0c4; }
.md-centro em { font-style: normal; font-size: 11px; color: rgba(210, 236, 255, .65); }
.md-medio { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 14px; align-items: stretch; }
.md-img { margin: 0; display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 18px; background: rgba(255, 255, 255, .07); border: 1px solid rgba(205, 238, 255, .35); color: #fff; }
.md-fig { flex: none; width: 92px; height: 92px; border-radius: 14px; display: grid; place-items: center; background: rgba(95, 178, 255, .12); color: #bfe9ff; }
.md-fig svg { width: 78px; height: 78px; }
.md-img figcaption { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.md-img figcaption b { font: 800 16px 'Sora', var(--font); }
.md-img figcaption span { font-size: 12.5px; color: rgba(215, 238, 255, .85); }
.md-img figcaption em { font-style: normal; font: 700 13px var(--font); color: #ffd34d; }
.md-img figcaption small { font-size: 11.5px; line-height: 1.3; color: rgba(215, 238, 255, .7); }
.md-como { display: flex; flex-direction: column; gap: 10px; }
.md-boton { flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 12px; border-radius: 16px; cursor: pointer; font: 700 14px var(--font); color: #fff;
  background: rgba(255, 255, 255, .08); border: 1.5px solid rgba(205, 238, 255, .4); transition: background .2s, box-shadow .2s, opacity .2s; }
.md-boton svg { width: 18px; height: 18px; }
.md-boton:disabled { opacity: .4; cursor: default; }
.md-boton.pide { border-color: #5fd4ff; box-shadow: 0 0 16px rgba(95, 212, 255, .45); animation: mdPide 1.6s ease-in-out infinite; }
.md-boton:not(:disabled):hover { background: rgba(255, 255, 255, .16); }
@keyframes mdPide { 50% { box-shadow: 0 0 26px rgba(95, 212, 255, .8); } }
.md-control { margin: 0 !important; max-width: none !important; width: 100%; box-sizing: border-box; }
.md-result { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.md-result > div { display: flex; flex-direction: column; align-items: center; padding: 12px 8px; border-radius: 16px; background: rgba(255, 255, 255, .07); border: 1px solid rgba(205, 238, 255, .3); color: #fff; }
.md-result small { font: 700 11px var(--font); letter-spacing: 1px; text-transform: uppercase; color: rgba(210, 236, 255, .75); }
.md-result b { font: 800 26px 'Sora', var(--font); line-height: 1.15; }
.md-result em { font-style: normal; font-size: 11px; color: rgba(210, 236, 255, .65); }
/* Modal transparente (avisos, felicitaciones y la configuración) */
.md-modal { position: fixed; inset: 0; z-index: 10000; display: grid; place-items: center; padding: 16px; background: rgba(2, 10, 30, .55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: jgEntra .25s ease-out; }
.md-modal-caja { position: relative; width: min(440px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; padding: 22px 22px 18px; border-radius: 22px; text-align: center; color: #fff;
  background: linear-gradient(160deg, rgba(40, 90, 170, .55), rgba(10, 30, 70, .6)); border: 1.5px solid rgba(175, 228, 255, .6); box-shadow: 0 0 34px rgba(80, 170, 255, .45), inset 0 0 40px rgba(170, 220, 255, .12); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.md-modal-ico { display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; border: 1.5px solid currentColor; color: #ffd34d; margin-bottom: 6px; }
.md-modal.felicita .md-modal-ico { color: #39ff8c; }
.md-modal-ico svg { width: 28px; height: 28px; }
.md-modal-caja h2 { margin: 0 0 6px; font: 800 20px 'Sora', var(--font); }
.md-modal-caja p { margin: 0 0 14px; font-size: 14.5px; line-height: 1.5; color: rgba(230, 244, 255, .92); }
.md-modal-ok { padding: 11px 26px; border: 0; border-radius: 999px; cursor: pointer; font: 800 15px var(--font); color: #fff; background: linear-gradient(135deg, #3d8bfd, #7c3aed); box-shadow: 0 0 18px rgba(95, 178, 255, .5); }
.md-conf-caja { width: min(620px, 100%); text-align: left; }
.md-x { position: absolute; top: 12px; right: 12px; width: 34px; height: 34px; border-radius: 50%; border: 1px solid rgba(215, 240, 255, .5); background: rgba(255, 255, 255, .1); color: #fff; cursor: pointer; display: grid; place-items: center; }
.md-x svg { width: 18px; height: 18px; }
.md-sec { margin: 14px 0 6px; font: 700 11.5px var(--font); letter-spacing: .8px; text-transform: uppercase; color: #9fe9ff; }
.md-campos { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; }
.md-campos label { display: flex; flex-direction: column; gap: 4px; font-size: 11.5px; color: rgba(215, 238, 255, .8); }
.md-campos input, .md-campos select { padding: 9px 10px; border-radius: 12px; border: 1px solid rgba(175, 228, 255, .45); background: rgba(255, 255, 255, .1); color: #fff; font: 600 15px var(--font); min-width: 0; }
.md-campos select option { color: #12233f; }
.md-nota { display: block; margin-top: 6px; font-size: 11.5px; line-height: 1.4; color: rgba(215, 238, 255, .7); }
.md-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.md-chips button { padding: 8px 14px; border-radius: 999px; border: 1px solid rgba(175, 228, 255, .45); background: rgba(255, 255, 255, .08); color: #fff; font: 700 13px var(--font); cursor: pointer; }
.md-chips button.on { background: linear-gradient(135deg, #3d8bfd, #7c3aed); border-color: transparent; box-shadow: 0 0 14px rgba(95, 178, 255, .45); }
.md-rutinas { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; }
.md-rutinas button { text-align: left; padding: 10px 12px; border-radius: 14px; border: 1px solid rgba(175, 228, 255, .4); background: rgba(255, 255, 255, .07); color: #fff; cursor: pointer; display: flex; flex-direction: column; gap: 2px; }
.md-rutinas button b { font: 700 13.5px var(--font); }
.md-rutinas button small { font-size: 11px; color: rgba(215, 238, 255, .7); }
.md-rutinas button.otra { opacity: .6; }
.md-rutinas button.on { opacity: 1; border-color: #5fd4ff; background: rgba(95, 212, 255, .18); box-shadow: 0 0 14px rgba(95, 212, 255, .35); }
.md-hist { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.md-hist li { display: flex; flex-direction: column; padding: 6px 10px; border-radius: 10px; background: rgba(255, 255, 255, .06); }
.md-hist b { font-size: 13px; }
.md-hist small { font-size: 11px; color: rgba(215, 238, 255, .7); }
.md-conf-pie { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.md-conf-pie .enlace { color: #ff9aa5; }
@media (max-width: 640px) {
  .holo.md { padding: 16px 12px; gap: 12px; border-radius: 22px; }
  .md-cab { padding: 0 48px; }
  .md-medio { grid-template-columns: 1fr; }
  .md-como { flex-direction: row; }
  .md-fig { width: 76px; height: 76px; }
  .md-fig svg { width: 64px; height: 64px; }
  .md-result b { font-size: 21px; }
  .md-control { gap: 10px; padding: 12px; }
}

/* Molda: nivel, tiempo y «Arma tu rutina» */
.md-titulos { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.md-sub { margin: 0; display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; font: 700 12px var(--font); }
.md-nivel { padding: 3px 10px; border-radius: 999px; color: #ffd34d; border: 1px solid rgba(255, 211, 77, .5); background: rgba(255, 211, 77, .1); }
.md-reloj { padding: 3px 10px; border-radius: 999px; color: #9fe9ff; border: 1px solid rgba(159, 233, 255, .45); background: rgba(159, 233, 255, .08); font-variant-numeric: tabular-nums; }
.md-niveles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.md-niveles button { text-align: left; padding: 10px; border-radius: 14px; border: 1px solid rgba(175, 228, 255, .4); background: rgba(255, 255, 255, .07); color: #fff; cursor: pointer; display: flex; flex-direction: column; gap: 3px; }
.md-niveles button b { font: 800 13px var(--font); }
.md-niveles button small { font-size: 10.5px; line-height: 1.3; color: rgba(215, 238, 255, .75); }
.md-niveles button.on { border-color: #ffd34d; background: rgba(255, 211, 77, .14); box-shadow: 0 0 14px rgba(255, 211, 77, .3); }
.md-arma { display: grid; grid-template-columns: 1.6fr 1fr; gap: 8px; }
.md-arma label { display: flex; flex-direction: column; gap: 4px; font-size: 11.5px; color: rgba(215, 238, 255, .8); }
.md-arma select { padding: 9px 10px; border-radius: 12px; border: 1px solid rgba(175, 228, 255, .45); background: rgba(255, 255, 255, .1); color: #fff; font: 600 14px var(--font); }
.md-arma select option { color: #12233f; }
.md-arma-btns { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.md-arma-btns .md-modal-ok { flex: 1.4; display: flex; flex-direction: column; align-items: center; line-height: 1.15; }
.md-arma-btns .md-modal-ok small { font-size: 10.5px; font-weight: 600; opacity: .85; }
.md-arma-btns .md-boton { flex: 1; }
.md-ejs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.md-ejs button { padding: 6px 11px; border-radius: 999px; border: 1px solid rgba(175, 228, 255, .4); background: rgba(255, 255, 255, .07); color: #fff; font: 600 12px var(--font); cursor: pointer; }
.md-ejs button.on { background: rgba(57, 255, 140, .2); border-color: #39ff8c; }
.md-armar-mia { margin-top: 8px; width: 100%; }
.md-armar-mia:disabled { opacity: .45; cursor: default; }
.md-rutinas button { position: relative; }
.md-rutinas button em { font-style: normal; font-size: 10px; padding: 1px 6px; border-radius: 6px; background: rgba(57, 255, 140, .25); color: #b6ffd5; }
.md-quitar { position: absolute; top: 6px; right: 8px; font-style: normal; font-size: 10.5px; color: #ff9aa5; text-decoration: underline; }
@media (max-width: 640px) { .md-niveles { grid-template-columns: 1fr; } .md-arma { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .md-control { flex-wrap: nowrap; } .md-control .bpm-box { flex: 1; min-width: 0; } .md-control .bpm-box .slider { width: 100%; } .md-control .tb-opc-btn { min-width: 58px; padding: 6px 8px; } .md-control .btn-redondo { flex: none; } }

/* Molda: fotos de los ejercicios y pantalla sin plan */
.md-fig img { width: 100%; height: 100%; object-fit: cover; border-radius: 14px; }
.md-sin-plan { text-align: center; align-items: center; color: #fff; }
.md-sin-plan p { margin: 0; max-width: 520px; line-height: 1.55; color: rgba(230, 244, 255, .9); }

/* Molda: calentamiento y «Quiero trabajar» con varias zonas */
.md-cal { font-style: normal; font-size: 10.5px; padding: 1px 7px; border-radius: 6px; vertical-align: 2px; color: #ffb37a; border: 1px solid rgba(255, 179, 122, .55); }
.md-arma { grid-template-columns: 1fr !important; }
.md-quiero { display: flex; flex-direction: column; gap: 6px; font-size: 11.5px; color: rgba(215, 238, 255, .8); }
.md-quiero small { opacity: .75; }
.md-arma label { max-width: 220px; }

/* Molda: botón y selector de objetivos */
.md-objetivo { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; padding: 12px 14px; border-radius: 16px; cursor: pointer; text-align: left; color: #fff;
  background: linear-gradient(135deg, rgba(61, 139, 253, .35), rgba(124, 58, 237, .35)); border: 1.5px solid rgba(175, 228, 255, .6); box-shadow: 0 0 14px rgba(95, 178, 255, .3); }
.md-objetivo small { font: 700 10.5px var(--font); letter-spacing: .8px; text-transform: uppercase; color: #ffd34d; }
.md-objetivo b { font: 800 16px var(--font); }
.md-objetivo span { font-size: 12px; color: rgba(215, 238, 255, .85); }
.md-obj { z-index: 10001; }
.md-obj-caja { width: min(680px, 100%); text-align: left; }
.md-obj-lista { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px; margin-top: 8px; }
.md-obj-lista button { position: relative; text-align: left; padding: 9px 12px; border-radius: 12px; border: 1px solid rgba(175, 228, 255, .4); background: rgba(255, 255, 255, .07); color: #fff; font: 600 12.5px var(--font); cursor: pointer; }
.md-obj-lista button.on { background: rgba(95, 212, 255, .18); border-color: #5fd4ff; box-shadow: 0 0 12px rgba(95, 212, 255, .3); }
.md-obj-lista button i { display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 6px; font: 800 10px var(--font); font-style: normal; color: #1a1300; background: #ffd34d; vertical-align: 1px; }
.md-obj-lista button i.s { background: #8ff0c4; color: #032; }
.md-obj-mas { width: 100%; margin-top: 10px; }

/* Molda: dos líneas de bombillos (afuera la meta, adentro el día), plan y objetivo a tu medida */
.md-meta-punto { fill: rgba(255, 255, 255, .12); stroke: rgba(255, 211, 77, .45); stroke-width: .4; }
.md-meta-punto.on { fill: #ffd34d; stroke: #fff2bf; filter: drop-shadow(0 0 2px rgba(255, 211, 77, .95)); }
.md-meta-punto.perdida { fill: #ff5a6e; stroke: #ffc2ca; }
.md-meta-punto.actual { fill: #fff; stroke: #ffd34d; animation: mdLate 1.4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.md-centro { inset: 26% !important; }
.md-centro em { max-width: 100%; line-height: 1.25; text-align: center; }
.md-plan { margin-top: 8px; display: flex; flex-direction: column; gap: 3px; padding: 10px 12px; border-radius: 14px; background: rgba(255, 211, 77, .1); border: 1px solid rgba(255, 211, 77, .45); font-size: 12.5px; color: rgba(235, 245, 255, .92); }
.md-plan > b { font: 800 13px var(--font); color: #ffd34d; text-transform: uppercase; letter-spacing: .6px; }
.md-plan small { color: rgba(215, 238, 255, .7); font-size: 11px; }
.md-medida { display: grid; gap: 5px; }
.md-medida-fila { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; padding: 6px 10px; border-radius: 12px; background: rgba(255, 255, 255, .05); }
.md-medida-fila > span { font: 700 13px var(--font); color: #fff; }
.md-medida-fila > div { display: flex; gap: 5px; flex-wrap: wrap; }
.md-medida-fila button { padding: 5px 11px; border-radius: 999px; border: 1px solid rgba(175, 228, 255, .4); background: rgba(255, 255, 255, .06); color: #fff; font: 700 11.5px var(--font); cursor: pointer; }
.md-medida-fila button.on.reducir { background: rgba(255, 90, 110, .3); border-color: #ff5a6e; }
.md-medida-fila button.on.aumentar { background: rgba(57, 255, 140, .25); border-color: #39ff8c; }
.md-medida-fila button.on.tonificar { background: rgba(95, 212, 255, .25); border-color: #5fd4ff; }
.md-quiero > b { font-size: 13px; color: #fff; }

/* Molda: rutina incompleta */
.md-meta-punto.media { fill: #ff9f43; stroke: #ffd7ae; }
.md-dos { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.md-dos .md-boton { flex: 0 1 auto; padding: 11px 18px; }
.md-incomp { color: #ffb37a; font-weight: 700; }
.baja-acciones { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 6px; }

/* Molda: botones en las esquinas del indicador, barra de pulso arriba y pausa */
.md-zona-anillo { position: relative; width: min(340px, 88vw); margin: 0 auto; }
.md-zona-anillo .md-anillo { width: 100%; }
.md-esquina { position: absolute; bottom: -4px; width: 74px; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 0; border: 0; background: none; cursor: pointer;
  font: 700 10.5px/1.15 var(--font); color: #fff; text-align: center; }
.md-esquina svg { box-sizing: border-box; width: 50px; height: 50px; padding: 13px; border-radius: 50%; border: 2px solid currentColor; }
.md-esquina.rojo { left: -4px; color: #ff4d6d; }
.md-esquina.verde { right: -4px; color: #39ff8c; }
.md-esquina.rojo svg { background: rgba(255, 77, 109, .14); box-shadow: 0 0 16px rgba(255, 77, 109, .6), inset 0 0 10px rgba(255, 77, 109, .3); }
.md-esquina.verde svg { background: rgba(57, 255, 140, .14); box-shadow: 0 0 16px rgba(57, 255, 140, .6), inset 0 0 10px rgba(57, 255, 140, .3); }
.md-esquina span { color: rgba(235, 245, 255, .9); }
.md-esquina:disabled { opacity: .35; cursor: default; }
.md-esquina.pide svg { animation: mdPideEsq 1.4s ease-in-out infinite; }
@keyframes mdPideEsq { 50% { transform: scale(1.1); filter: brightness(1.3); } }
.md-control { display: grid !important; grid-template-columns: auto auto minmax(0, 1fr) auto; align-items: center; gap: 14px; }
.md-control .bpm-box { min-width: 0; width: 100%; }
.md-control .bpm-box .slider { width: 100%; }
.md-control .tb-opciones { justify-self: end; }
@media (max-width: 640px) {
  .md-control { grid-template-columns: auto auto 1fr; gap: 10px 12px; }
  .md-control .bpm-box { grid-column: 1 / -1; grid-row: 2; }
  .md-control .tb-opciones { grid-column: 3; grid-row: 1; }
}
.md-desertar { color: #ff9aa5 !important; border-color: rgba(255, 90, 110, .6) !important; }
.md-pausa .md-modal-ok svg { width: 14px; height: 14px; vertical-align: -2px; }

/* Molda: video del ejercicio y «Mis ejercicios» */
.md-img { cursor: pointer; }
.md-ver { font-style: normal; font-size: 11px; font-weight: 700; color: #9fe9ff; margin-top: 2px; }
.md-ver svg { width: 10px; height: 10px; vertical-align: -1px; }
.md-img.con-video .md-ver { color: #39ff8c; }
.md-video-caja { width: min(560px, 100%); }
.md-yt { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; background: #000; margin-bottom: 10px; }
.md-yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.md-link-form { display: flex; gap: 8px; margin-top: 8px; }
.md-link-form input { flex: 1; min-width: 0; padding: 9px 10px; border-radius: 12px; border: 1px solid rgba(175, 228, 255, .45); background: rgba(255, 255, 255, .1); color: #fff; font: 600 13px var(--font); }
.md-link-form .md-boton { flex: none; padding: 9px 14px; }
.md-mis { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 4px; }
.md-mis li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 10px; background: rgba(255, 255, 255, .06); }
.md-mis li span { display: flex; flex-direction: column; min-width: 0; }
.md-mis b { font-size: 13px; color: #fff; }
.md-mis small { font-size: 11px; color: rgba(215, 238, 255, .7); }
.md-mis .enlace { color: #ff9aa5; flex: none; }
.md-nuevo-ej { display: grid; grid-template-columns: 1.4fr .8fr .8fr; gap: 8px; }
.md-nuevo-ej label { display: flex; flex-direction: column; gap: 4px; font-size: 11.5px; color: rgba(215, 238, 255, .8); min-width: 0; }
.md-nuevo-ej input, .md-nuevo-ej select { padding: 9px 10px; border-radius: 12px; border: 1px solid rgba(175, 228, 255, .45); background: rgba(255, 255, 255, .1); color: #fff; font: 600 14px var(--font); min-width: 0; }
.md-nuevo-ej select option { color: #12233f; }
.md-nuevo-ej .ancho { grid-column: 1 / -1; }
.md-nuevo-ej label.md-check { flex-direction: row; margin: 2px 0 0; font-size: 12.5px; color: #fff; }
.md-nuevo-ej .md-check input { padding: 0; flex: none; }
@media (max-width: 640px) { .md-nuevo-ej { grid-template-columns: 1fr 1fr; } .md-nuevo-ej label:first-child { grid-column: 1 / -1; } }

/* Molda: descanso entre series (temporizador del rojo neón al verde) */
.md-zona-anillo { --desc: hsl(350 100% 60%); }
.md-descanso b { font-size: clamp(54px, 15vw, 76px) !important; color: var(--desc); text-shadow: 0 0 18px var(--desc), 0 0 36px var(--desc); transition: color 1.2s linear, text-shadow 1.2s linear; font-variant-numeric: tabular-nums; }
.md-descanso small { color: var(--desc) !important; transition: color 1.2s linear; letter-spacing: 3px !important; }
.md-zona-anillo.descansando .md-pista { stroke: var(--desc); opacity: .55; filter: drop-shadow(0 0 4px var(--desc)); transition: stroke 1.2s linear; }
.md-zona-anillo.descansando .md-avance { stroke: var(--desc); filter: drop-shadow(0 0 5px var(--desc)); transition: stroke 1.2s linear, stroke-dashoffset .4s ease; }
/* Molda: botones de las esquinas más pequeños y afuera del anillo de bombillos */
.md-zona-anillo { width: min(420px, 96vw) !important; }
.md-zona-anillo .md-anillo { width: 78% !important; margin: 0 auto; }
.md-esquina { bottom: 0 !important; width: 64px !important; font-size: 9.5px !important; }
.md-esquina.rojo { left: 0 !important; }
.md-esquina.verde { right: 0 !important; }
.md-esquina svg { width: 40px !important; height: 40px !important; padding: 10px !important; border-width: 1.5px !important; }
.md-zona-anillo { width: 100% !important; max-width: 420px; }
/* Molda: lugar y nivel como botones segmentados, uno al lado del otro */
.md-seg { display: grid !important; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px !important; padding: 4px; border-radius: 999px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(175, 228, 255, .3); }
.md-seg button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 9px 8px !important; border: 0 !important; border-radius: 999px !important; background: transparent !important; color: rgba(225, 240, 255, .8) !important; font: 700 13px var(--font) !important; white-space: nowrap; transition: background .25s, color .25s, box-shadow .25s; }
.md-seg button:hover { color: #fff !important; background: rgba(255, 255, 255, .08) !important; }
.md-seg button.on { color: #fff !important; background: linear-gradient(135deg, #3d8bfd, #7c3aed) !important; box-shadow: 0 0 16px rgba(95, 178, 255, .45) !important; }
.md-barras { display: inline-flex; align-items: flex-end; gap: 2px; height: 13px; }
.md-barras span { width: 3px; border-radius: 2px; background: rgba(255, 255, 255, .28); }
.md-barras span:nth-child(1) { height: 5px; } .md-barras span:nth-child(2) { height: 9px; } .md-barras span:nth-child(3) { height: 13px; }
.md-barras span.llena { background: #ffd34d; box-shadow: 0 0 4px rgba(255, 211, 77, .8); }
.md-seg button.on .md-barras span.llena { background: #fff; box-shadow: 0 0 5px rgba(255, 255, 255, .9); }

/* Molda: botón «Descripción de tu plan» y su modal */
.md-btn-plan { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; width: 100%; margin-top: 10px; padding: 11px 14px; border-radius: 14px; cursor: pointer; text-align: left; color: #fff;
  background: rgba(255, 211, 77, .1); border: 1.5px solid rgba(255, 211, 77, .55); transition: box-shadow .3s, background .3s; }
.md-btn-plan span { font: 800 14px var(--font); color: #ffd34d; }
.md-btn-plan small { font-size: 11.5px; color: rgba(215, 238, 255, .75); }
.md-btn-plan:hover { background: rgba(255, 211, 77, .18); }
.md-btn-plan.brilla { animation: mdBrillaPlan .9s ease-in-out 4; }
@keyframes mdBrillaPlan { 50% { box-shadow: 0 0 24px rgba(255, 211, 77, .9); background: rgba(255, 211, 77, .28); } }
.md-plan-modal { display: flex; flex-direction: column; gap: 8px; text-align: left; }
.md-plan-linea { display: block; padding: 8px 10px; border-radius: 10px; background: rgba(255, 255, 255, .06); font-size: 13.5px; line-height: 1.45; }
/* Molda: el objetivo se ve como botón (con «Cambiar ›»), no como campo */
.md-objetivo { position: relative; padding-right: 118px !important; transition: transform .15s, box-shadow .2s, filter .2s; box-shadow: 0 6px 18px rgba(0, 0, 0, .3), 0 0 16px rgba(95, 178, 255, .35) !important; }
.md-objetivo:hover { transform: translateY(-2px); filter: brightness(1.12); }
.md-objetivo:active { transform: translateY(0) scale(.99); }
.md-obj-cambiar { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); display: inline-flex; align-items: center; gap: 4px; padding: 8px 12px 8px 14px; border-radius: 999px; font: 800 12.5px var(--font); font-style: normal; color: #fff; background: linear-gradient(135deg, #3d8bfd, #7c3aed); box-shadow: 0 0 14px rgba(124, 58, 237, .55); }
.md-obj-cambiar svg { width: 15px; height: 15px; transition: transform .2s; }
.md-objetivo:hover .md-obj-cambiar svg { transform: translateX(3px); }
@media (max-width: 420px) { .md-objetivo { padding-right: 100px !important; } .md-obj-cambiar { padding: 7px 10px; font-size: 11.5px; } }

/* Molda: «Arma tu rutina» con dos botones (Automática / Manual) y su contenido */
.md-arma-panel { margin-top: 10px; padding: 12px; border-radius: 16px; background: rgba(255, 255, 255, .05); border: 1px solid rgba(175, 228, 255, .25); display: flex; flex-direction: column; gap: 8px; animation: jgEntra .25s ease-out; }
.md-arma-panel .md-nota { margin-top: 0; }
.md-armar-auto { width: 100%; }
.md-sub-sec { margin: 8px 0 0; font: 700 11px var(--font); letter-spacing: .6px; text-transform: uppercase; color: #ffd34d; }

/* Molda: «Tus datos» plegable */
.md-datos-btn { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; margin-top: 6px; padding: 11px 14px; border-radius: 14px; cursor: pointer; text-align: left; color: #fff;
  background: rgba(255, 255, 255, .07); border: 1px solid rgba(175, 228, 255, .4); transition: background .2s; }
.md-datos-btn:hover { background: rgba(255, 255, 255, .12); }
.md-datos-btn > span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.md-datos-btn b { font: 800 12px var(--font); letter-spacing: .8px; text-transform: uppercase; color: #9fe9ff; }
.md-datos-btn small { font-size: 12.5px; color: rgba(230, 244, 255, .9); }
.md-datos-btn svg { flex: none; width: 20px; height: 20px; color: #9fe9ff; transition: transform .25s; }
.md-datos-btn.abierto svg { transform: rotate(180deg); }
.md-datos-cuerpo { margin-top: 8px; animation: jgEntra .25s ease-out; }
/* Molda ⚙: cada sección separada y ordenada (título con aire arriba y línea divisoria) */
.md-conf-caja .md-sec { margin: 22px 0 10px !important; padding-top: 16px; border-top: 1px solid rgba(175, 228, 255, .16); font-size: 12px !important; letter-spacing: 1px !important; }
.md-conf-caja .md-arma-panel .md-sec, .md-conf-caja .md-obj-caja .md-sec { border-top: 0; padding-top: 0; margin: 12px 0 6px !important; }
.md-conf-caja .md-btn-plan { margin-top: 12px; }
.md-conf-caja .md-seg + .md-nota { margin-top: 8px; }
.md-conf-caja h2 { margin-bottom: 14px !important; }
.md-conf-caja .md-conf-pie { margin-top: 22px; padding-top: 16px; border-top: 1px solid rgba(175, 228, 255, .16); }
/* Molda ⚙: grupo «Parámetros del entrenamiento» (dónde entrenas, nivel y objetivo) */
.md-grupo .md-sub-sec { margin: 14px 0 8px; color: #9fe9ff; letter-spacing: .8px; }
.md-grupo .md-sec + .md-sub-sec { margin-top: 4px; }
/* Molda ⚙: «Parámetros del entrenamiento» como título principal; sus partes como subtítulos */
.md-grupo > .md-sec { font-size: 13.5px !important; color: #fff !important; letter-spacing: 1.2px !important; }
.md-grupo .md-sub-sec { font-size: 10.5px !important; color: rgba(159, 233, 255, .85) !important; margin: 14px 0 7px !important; }
.md-centro { cursor: pointer; }

/* Molda: selector de objetivo con sus dos formas plegadas */
.md-obj-caja .md-datos-btn { margin-top: 10px; }
.md-obj-actual { padding: 8px 10px; border-radius: 10px; background: rgba(255, 211, 77, .08); border: 1px solid rgba(255, 211, 77, .35); }
.md-obj-actual b { color: #ffd34d; }
.md-plegable { margin-top: 8px; animation: jgEntra .25s ease-out; }
.md-tiempo label { display: flex; flex-direction: column; max-width: 260px; }
.md-tiempo select { padding: 10px 12px; border-radius: 12px; border: 1px solid rgba(175, 228, 255, .45); background: rgba(255, 255, 255, .1); color: #fff; font: 700 14px var(--font); }
.md-tiempo select option { color: #12233f; }
/* Molda ⚙: cada sección en su cuadro de color transparente */
.md-caja { --cc: 95, 178, 255; margin-top: 14px; padding: 14px 16px; border-radius: 18px; background: rgba(var(--cc), .09); border: 1px solid rgba(var(--cc), .38); box-shadow: inset 0 0 22px rgba(var(--cc), .06); }
.md-caja.azul { --cc: 95, 178, 255; }
.md-caja.verde { --cc: 57, 255, 140; }
.md-caja.violeta { --cc: 167, 120, 255; }
.md-caja.amarillo { --cc: 255, 211, 77; }
.md-caja.rojo { --cc: 255, 90, 110; }
.md-caja.gris { --cc: 200, 215, 235; }
.md-conf-caja .md-caja > .md-sec:first-child { margin: 0 0 10px !important; padding-top: 0 !important; border-top: 0 !important; color: rgb(var(--cc)) !important; }
.md-caja > .md-datos-btn:first-child { margin-top: 0; }
.md-caja .md-chips.md-seg { background: rgba(0, 0, 0, .15); }
/* Molda: sin negrilla en los textos que no son títulos (los títulos siguen en negrilla) */
.md p b, .md small b, .md em, .md-modal p b, .md-modal small b, .md-nota, .md-nota b, .md-plan-linea, .md-plan-linea b, .md-modal-caja p, .md-img figcaption span, .md-img figcaption em, .md-img figcaption small, .md-ver,
.md-chips button, .md-seg button, .md-obj-lista button, .md-ejs button, .md-medida-fila button, .md-campos label, .md-campos input, .md-campos select, .md-tiempo select, .md-nuevo-ej label, .md-nuevo-ej input, .md-nuevo-ej select, .md-link-form input,
.md-rutinas button small, .md-mis small, .md-hist small, .md-datos-btn small, .md-btn-plan small, .md-objetivo span, .md-esquina span, .md-centro em, .md-result em, .md-quiero, .md-quiero small, .md-incomp, .md-boton, .md-niveles button small { font-weight: 400 !important; }

/* Molda: nombre del objetivo */
.md-obj-chip { padding: 3px 10px; border-radius: 999px; color: #fff; font-weight: 800; background: linear-gradient(135deg, rgba(61, 139, 253, .55), rgba(124, 58, 237, .55)); border: 1px solid rgba(175, 228, 255, .55); }
.md-objetivo b { font-size: 18px !important; letter-spacing: .2px; }
.md-obj-nombre { color: #fff !important; font-weight: 800 !important; }
/* Molda: números de peso y meta un poco más pequeños */
.md-centro b { font-size: clamp(24px, 5.6vw, 34px) !important; margin-bottom: 4px !important; }
.md-descanso b { font-size: clamp(50px, 13vw, 68px) !important; }
/* Molda ⚙: el objetivo es un círculo con su nombre dentro; al tocarlo se abre el selector */
.md-objetivo { width: 150px !important; height: 150px !important; margin: 6px auto 14px; padding: 16px !important; border-radius: 50% !important; display: flex !important; flex-direction: column; align-items: center !important; justify-content: center; text-align: center !important; gap: 4px !important;
  background: radial-gradient(circle at 35% 30%, rgba(124, 58, 237, .65), rgba(61, 139, 253, .45) 60%, rgba(10, 30, 70, .6)) !important; border: 2px solid rgba(175, 228, 255, .75) !important; box-shadow: 0 0 22px rgba(124, 58, 237, .55), inset 0 0 18px rgba(255, 255, 255, .12) !important; }
.md-objetivo small { font-size: 9.5px !important; letter-spacing: 1px; }
.md-objetivo b { font-size: 15px !important; line-height: 1.15; }
.md-objetivo > span { display: none !important; }
.md-obj-cambiar { position: absolute; top: auto !important; bottom: -12px; right: 50% !important; transform: translateX(50%) !important; padding: 5px 10px !important; font-size: 11px !important; }
.md-objetivo:hover { transform: scale(1.04) !important; }
.md-auto { color: rgba(57, 255, 140, .8); font-size: 11.5px; }
/* Molda: ventanas que caben en el celular (sin quedar tapadas arriba) */
.md-modal { height: 100dvh; align-items: start; overflow-y: auto; padding: max(12px, env(safe-area-inset-top)) 12px 12px; }
.md-modal-caja { max-height: calc(100dvh - 24px); margin: auto 0; }
@supports not (height: 100dvh) { .md-modal { height: 100%; } .md-modal-caja { max-height: calc(100% - 24px); } }
.md-auto-desc { margin: 0; font-size: 13.5px; line-height: 1.5; color: rgba(230, 244, 255, .9); }
.md-auto-desc b { font-weight: 700 !important; color: #fff; }
/* Molda ⚙: el objetivo vuelve a ser rectangular (plegado: solo su nombre y «Cambiar ›») */
.md-objetivo { width: 100% !important; height: auto !important; min-height: 64px; margin: 4px 0 0 !important; padding: 12px 120px 12px 16px !important; border-radius: 16px !important; align-items: flex-start !important; text-align: left !important; gap: 2px !important;
  background: linear-gradient(135deg, rgba(61, 139, 253, .38), rgba(124, 58, 237, .38)) !important; border: 1.5px solid rgba(175, 228, 255, .6) !important; box-shadow: 0 6px 18px rgba(0, 0, 0, .3), 0 0 16px rgba(95, 178, 255, .35) !important; }
.md-objetivo b { font-size: 17px !important; }
.md-obj-cambiar { top: 50% !important; bottom: auto !important; right: 12px !important; transform: translateY(-50%) !important; padding: 8px 12px 8px 14px !important; font-size: 12.5px !important; }
.md-objetivo:hover { transform: translateY(-2px) !important; }

/* Molda ⚙: «Descripción de tu plan» y «Mis ejercicios» lado a lado */
.md-dos-btn { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 10px; margin-top: 12px; }
.md-dos-btn .md-btn-plan { margin-top: 0; }
.md-btn-mis { border-color: rgba(57, 255, 140, .55) !important; background: rgba(57, 255, 140, .08) !important; }
.md-btn-mis span { color: #39ff8c !important; }
.md-mis-modal { z-index: 10001; }
.md-mis-modal h2 { margin: 0 0 12px; font: 800 20px 'Sora', var(--font); }
@media (max-width: 420px) { .md-dos-btn { grid-auto-flow: row; } }
.md-t-uni { display: flex; gap: 4px; }
.md-t-uni input { flex: 1; min-width: 0; }
.md-t-uni select { flex: none; width: 66px; padding: 9px 6px !important; }
/* Molda: la imagen del ejercicio va en la barra de pulso; abajo, solo la descripción */
.md-control { grid-template-columns: auto auto minmax(0, 1fr) auto auto !important; }
.md-ctl-fig { padding: 0; border: 0; background: none; cursor: pointer; justify-self: end; }
.md-ctl-fig .md-fig { width: 72px; height: 72px; }
.md-ctl-fig .md-fig svg { width: 60px; height: 60px; }
.md-img { padding: 14px 16px !important; }
.md-img .md-fig { display: none; }
@media (max-width: 640px) { .md-control { grid-template-columns: auto auto auto 1fr !important; } .md-control .bpm-box { grid-column: 1 / -1 !important; grid-row: 2 !important; } .md-control .tb-opciones { grid-column: 3 !important; grid-row: 1 !important; } .md-ctl-fig { grid-column: 4; grid-row: 1; } .md-ctl-fig .md-fig { width: 64px; height: 64px; } }
/* Molda celular: la imagen del ejercicio grande, ocupando las dos filas de la barra de pulso */
@media (max-width: 640px) {
  .md-control { grid-template-columns: auto auto auto minmax(96px, 1fr) !important; align-items: center; }
  .md-control .bpm-box { grid-column: 1 / 4 !important; grid-row: 2 !important; }
  .md-ctl-fig { grid-column: 4 !important; grid-row: 1 / 3 !important; justify-self: stretch; align-self: stretch; }
  .md-ctl-fig .md-fig { width: 100% !important; height: 100% !important; min-height: 140px; }
  .md-ctl-fig .md-fig svg { width: 86%; height: 86%; }
}
/* Molda: descripción del ejercicio compacta y ordenada */
.md-img { padding: 12px 14px !important; }
.md-img figcaption { gap: 4px !important; width: 100%; }
.md-desc-cab { display: flex; align-items: center; gap: 8px; min-width: 0; }
.md-desc-cab b { flex: 1; min-width: 0; font: 800 15px 'Sora', var(--font) !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.md-desc-cab .md-cal { flex: none; vertical-align: 0; }
.md-desc-dato { flex: none; padding: 2px 9px; border-radius: 999px; font-size: 11.5px !important; color: #9fe9ff !important; background: rgba(159, 233, 255, .1); border: 1px solid rgba(159, 233, 255, .35); white-space: nowrap; }
.md-img figcaption em { font-size: 12.5px !important; }
.md-img figcaption small { font-size: 11.5px !important; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.md-img .md-ver { font-size: 11px !important; }
.md-desc-sub { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.md-desc-cab b { white-space: normal !important; overflow: visible !important; }

/* Molda: ajustar series y tiempo de la rutina */
.md-desc-dato, .md-desc-sub em { cursor: pointer; text-decoration: underline dotted rgba(255, 255, 255, .35); text-underline-offset: 3px; }
.md-ajuste { z-index: 10001; }
.md-ajuste h2 { margin: 0 0 8px; font: 800 20px 'Sora', var(--font); }
.md-aj-lista { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.md-aj-lista li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 12px; background: rgba(255, 255, 255, .06); }
.md-aj-n { font-size: 13px; color: #fff; min-width: 0; }
.md-paso { display: inline-flex; align-items: center; gap: 4px; }
.md-paso button { width: 28px; height: 28px; border-radius: 50%; border: 1px solid rgba(175, 228, 255, .5); background: rgba(255, 255, 255, .08); color: #fff; font: 700 16px/1 var(--font); cursor: pointer; }
.md-paso b { min-width: 34px; text-align: center; font: 700 13px var(--font) !important; color: #ffd34d; }
.md-paso small { font-size: 10px; color: rgba(215, 238, 255, .7); }
@media (max-width: 420px) { .md-aj-lista li { grid-template-columns: 1fr auto; } .md-aj-n { grid-column: 1 / -1; } }

/* Molda: «Arma tu rutina → Manual» ordenado por zonas */
.md-sel { padding: 10px; border-radius: 12px; background: rgba(57, 255, 140, .08); border: 1px solid rgba(57, 255, 140, .35); }
.md-sel > span { display: block; margin-bottom: 6px; font-size: 11.5px; color: #8ff0c4; }
.md-sel > div { display: flex; flex-wrap: wrap; gap: 5px; }
.md-sel button { padding: 5px 10px; border-radius: 999px; border: 1px solid #39ff8c; background: rgba(57, 255, 140, .18); color: #fff; font: 400 12px var(--font); cursor: pointer; }
.md-sel button i { font-style: normal; margin-left: 4px; color: #ff9aa5; }
.md-zonas-ej { display: grid; gap: 6px; }
.md-zona-ej { border-radius: 12px; border: 1px solid rgba(175, 228, 255, .25); background: rgba(255, 255, 255, .04); }
.md-zona-ej.abierta { border-color: rgba(167, 120, 255, .55); background: rgba(167, 120, 255, .08); }
.md-zona-btn { display: flex; align-items: center; gap: 8px; width: 100%; padding: 10px 12px; border: 0; background: none; color: #fff; cursor: pointer; text-align: left; }
.md-zona-btn span { font: 700 13px var(--font); }
.md-zona-btn small { flex: 1; font-size: 11px; color: rgba(215, 238, 255, .7); }
.md-zona-btn small b { color: #39ff8c; font-weight: 700 !important; }
.md-zona-btn svg { flex: none; width: 18px; height: 18px; color: #c4a8ff; transition: transform .2s; }
.md-zona-ej.abierta .md-zona-btn svg { transform: rotate(180deg); }
.md-zona-ej .md-ejs { padding: 0 10px 10px; margin: 0; }
.md-parte { font-style: normal; margin-left: 5px; padding: 0 5px; border-radius: 5px; font-size: 9.5px; color: #ffd34d; border: 1px solid rgba(255, 211, 77, .45); }
/* Molda ⚙: «Tus datos», «Descripción de tu plan» y «Catálogo personalizado» como tres círculos uno al lado del otro */
.md-caja.azul { display: flex; flex-wrap: wrap; justify-content: space-around; align-items: center; gap: 10px; }
.md-caja.azul .md-dos-btn { display: contents; }
.md-caja.azul > .md-datos-btn, .md-caja.azul .md-btn-plan { order: 1; flex: none; width: 92px; height: 92px; margin: 0 !important; padding: 8px !important; border-radius: 50% !important; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; text-align: center; }
.md-caja.azul > .md-datos-btn > span, .md-caja.azul .md-btn-plan { align-items: center; }
.md-caja.azul > .md-datos-btn small, .md-caja.azul .md-btn-plan small { display: none; }
.md-caja.azul > .md-datos-btn b, .md-caja.azul .md-btn-plan span { font: 800 11.5px/1.2 var(--font) !important; letter-spacing: .2px; text-transform: none; }
.md-caja.azul > .md-datos-btn b { color: #9fe9ff; }
.md-caja.azul > .md-datos-btn svg { width: 14px; height: 14px; }
.md-caja.azul > .md-datos-btn { border: 1.5px solid rgba(159, 233, 255, .6); background: rgba(95, 178, 255, .12); box-shadow: 0 0 12px rgba(95, 178, 255, .3); }
.md-caja.azul > .md-datos-btn.abierto { box-shadow: 0 0 18px rgba(95, 212, 255, .7); background: rgba(95, 212, 255, .22); }
.md-caja.azul .md-btn-plan { box-shadow: 0 0 12px rgba(255, 211, 77, .3); }
.md-caja.azul .md-btn-mis { box-shadow: 0 0 12px rgba(57, 255, 140, .3) !important; }
.md-caja.azul > .md-datos-cuerpo, .md-caja.azul > .md-nota { order: 2; width: 100%; }
.md-caja.azul { flex-wrap: wrap; justify-content: space-between; gap: 8px; padding: 12px !important; }
.md-caja.azul > .md-datos-btn, .md-caja.azul .md-btn-plan { width: calc((100% - 16px) / 3) !important; max-width: 104px; height: auto !important; aspect-ratio: 1; padding: 6px !important; }
.md-caja.azul > .md-datos-btn b, .md-caja.azul .md-btn-plan span { font-size: 10.5px !important; }
/* Molda ⚙: íconos de contorno dentro de los tres círculos */
.md-c-ico { display: none; font-style: normal; }
.md-c-corto { display: none; }
.md-caja.azul .md-c-ico { display: grid; place-items: center; }
.md-caja.azul .md-c-ico svg { width: 26px; height: 26px; }
.md-caja.azul > .md-datos-btn .md-c-ico { color: #9fe9ff; }
.md-caja.azul .md-btn-plan .md-c-ico { color: #ffd34d; }
.md-caja.azul .md-btn-mis .md-c-ico { color: #39ff8c; }
.md-caja.azul .md-c-largo { display: none; }
.md-caja.azul .md-c-corto { display: block; }
.md-caja.azul > .md-datos-btn > svg { display: none; }
.md-caja.azul > .md-datos-btn > span { gap: 3px; }
/* Molda ⚙: Ritmo como tres círculos con ícono (metrónomo, música, tempo variable) */
.md-ritmo { display: flex; justify-content: space-between; gap: 8px; }
.md-circ { width: calc((100% - 16px) / 3); max-width: 104px; aspect-ratio: 1; padding: 6px; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; cursor: pointer; color: #fff; text-align: center;
  background: rgba(255, 90, 110, .1); border: 1.5px solid rgba(255, 140, 155, .5); box-shadow: 0 0 12px rgba(255, 90, 110, .25); transition: background .2s, box-shadow .2s; }
.md-circ .md-c-ico { display: grid; place-items: center; color: #ff9aa5; }
.md-circ .md-c-ico svg { width: 26px; height: 26px; }
.md-circ span { font: 700 10.5px/1.15 var(--font); }
.md-circ.on { background: linear-gradient(135deg, rgba(255, 90, 110, .55), rgba(124, 58, 237, .5)); border-color: #ffc2ca; box-shadow: 0 0 20px rgba(255, 90, 110, .6); }
.md-circ.on .md-c-ico { color: #fff; }

/* Molda: video del ejercicio dentro del cuadro de la imagen; al tocarlo, pantalla completa */
.md-fig-video { position: relative; overflow: hidden; background: #000 !important; padding: 0 !important; }
.md-fig-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; pointer-events: none; }
.md-vid-tapa { position: absolute; inset: 0; cursor: zoom-in; }
.md-fig-video:fullscreen, .md-fig-video:-webkit-full-screen { width: 100vw !important; height: 100vh !important; border-radius: 0 !important; }
.md-fig-video:fullscreen iframe, .md-fig-video:-webkit-full-screen iframe { pointer-events: auto; }
.md-fig-video:fullscreen .md-vid-tapa, .md-fig-video:-webkit-full-screen .md-vid-tapa { display: none; }

/* Molda ⚙: Parámetros del entrenamiento en círculos (tiempo primero) */
.md-param { margin-top: 4px; }
.md-param .md-circ { background: rgba(57, 255, 140, .08); border-color: rgba(57, 255, 140, .5); box-shadow: 0 0 12px rgba(57, 255, 140, .22); }
.md-param .md-circ .md-c-ico { color: #39ff8c; }
.md-param .md-circ span { font-size: 10.5px; padding: 0 4px; }
.md-param .md-circ:hover { background: rgba(57, 255, 140, .16); }
.md-barras-g { height: 22px !important; gap: 3px !important; }
.md-barras-g span { width: 5px !important; }
.md-barras-g span:nth-child(1) { height: 9px !important; } .md-barras-g span:nth-child(2) { height: 15px !important; } .md-barras-g span:nth-child(3) { height: 22px !important; }
.md-barras-g span.llena { background: #39ff8c !important; box-shadow: 0 0 5px rgba(57, 255, 140, .8) !important; }
/* Molda: el video pequeño se recorta arriba y abajo para ocultar los textos de YouTube (título, logo, botones) */
.md-fig-video iframe { inset: auto !important; left: 50% !important; top: 50% !important; width: 160% !important; height: 160% !important; transform: translate(-50%, -50%); }
.md-fig-video:fullscreen iframe, .md-fig-video:-webkit-full-screen iframe { width: 100% !important; height: 100% !important; transform: none; left: 0 !important; top: 0 !important; }

/* Molda: video del cuadro — imagen mientras carga, ✕ y deslizar para volver a la imagen */
.md-fig-video { touch-action: pan-y; }
.md-vid-fondo { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(95, 178, 255, .12); color: #bfe9ff; transition: opacity .3s; }
.md-vid-fondo svg { width: 70%; height: 70%; }
.md-vid-fondo img { width: 100%; height: 100%; object-fit: cover; }
.md-fig-video iframe { transition: opacity .3s; }
.md-fig-video.md-cargando iframe { opacity: 0; }
.md-fig-video:not(.md-cargando) .md-vid-fondo { opacity: 0; }
.md-vid-espera { position: absolute; left: 50%; bottom: 10px; width: 18px; height: 18px; margin-left: -9px; border-radius: 50%; border: 2.5px solid rgba(255, 255, 255, .3); border-top-color: #fff; animation: mdGira .8s linear infinite; display: none; }
.md-fig-video.md-cargando .md-vid-espera { display: block; }
@keyframes mdGira { to { transform: rotate(360deg); } }
.md-vid-x { position: absolute; top: 5px; right: 5px; z-index: 3; width: 24px; height: 24px; padding: 0; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .6); background: rgba(0, 0, 0, .55); color: #fff; display: grid; place-items: center; cursor: pointer; }
.md-vid-x svg { width: 12px; height: 12px; }
.md-fig-video:fullscreen .md-vid-x, .md-fig-video:-webkit-full-screen .md-vid-x, .md-fig-video:fullscreen .md-vid-fondo, .md-fig-video:-webkit-full-screen .md-vid-fondo { display: none; }
/* Molda: el ícono de «Tus datos» no gira al desplegar (solo giraba la flecha) */
.md-datos-btn.abierto .md-c-ico svg { transform: none !important; }
/* Molda: «Ver video» en cada ejercicio del catálogo personalizado */
.md-mis-acc { display: flex; align-items: center; gap: 10px; flex: none; }
.md-ver-btn { display: inline-flex; align-items: center; gap: 4px; padding: 5px 10px; border-radius: 999px; border: 1px solid rgba(57, 255, 140, .55); background: rgba(57, 255, 140, .12); color: #8ff0c4; font: 400 12px var(--font); cursor: pointer; }
.md-ver-btn svg { width: 10px; height: 10px; }
.md-video { z-index: 10002 !important; }

/* Molda: el video se precarga escondido; se ve solo al tocar la imagen (.viendo) */
.md-fig-video { background: rgba(95, 178, 255, .12) !important; }
.md-fig-video:not(.viendo) iframe { opacity: 0 !important; }
.md-fig-video:not(.viendo) .md-vid-fondo { opacity: 1 !important; }
.md-fig-video:not(.viendo) .md-vid-x, .md-fig-video:not(.viendo) .md-vid-espera { display: none !important; }
.md-fig-video:not(.viendo) .md-vid-tapa { cursor: pointer; }
/* Molda: mientras se ve el video, se pausan los efectos pesados (fondo animado, desenfoques, latidos) para que no se trabe */
body.md-video-on .fondo-orbes, body.md-video-on .fondo-orbes * { animation-play-state: paused !important; }
body.md-video-on .fondo-orbes { display: none !important; }
body.md-video-on .holo, body.md-video-on .holo *, body.md-video-on .topbar { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
body.md-video-on .md-punto, body.md-video-on .md-meta-punto, body.md-video-on .md-avance { animation: none !important; filter: none !important; }
body.md-video-on .holo.md { background: rgba(12, 40, 90, .92) !important; }

/* Molda ⚙ Automática: tiempo de cada ejercicio */
.md-previa { margin: 8px 0 4px; padding: 8px 10px; border-radius: 12px; background: rgba(167, 120, 255, .08); border: 1px solid rgba(167, 120, 255, .35); }
.md-previa p { margin: 0 0 6px; font-size: 11.5px; color: #d6c4ff; }
.md-previa ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; }
.md-previa li { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; color: #fff; padding: 3px 0; border-bottom: 1px dashed rgba(255, 255, 255, .1); }
.md-previa li:last-child { border-bottom: 0; }
.md-previa li small { flex: none; color: #8ff0c4; font-size: 11.5px; }

/* Molda ⚙: borrar sesiones del historial */
.md-hist li { position: relative; padding-right: 34px !important; }
.md-hist-x { position: absolute; right: 2px; top: 50%; transform: translateY(-50%); width: 28px; height: 28px; padding: 0; display: grid; place-items: center; border-radius: 50%; border: 1px solid rgba(255, 90, 110, .45); background: rgba(255, 90, 110, .08); color: #ff9aa5; cursor: pointer; }
.md-hist-x:hover { background: rgba(255, 90, 110, .22); }
.md-hist-x svg { width: 15px; height: 15px; }
.md-hist-todas { display: block; margin: 6px 0 2px; }
.md-previa li, .md-previa li span, .md-previa li small { font-weight: 400 !important; }

/* Molda: etiquetas bajo el título como botones; historial por nivel; reparto del tiempo */
#md-sub button { font: inherit; cursor: pointer; transition: filter .15s, transform .15s; }
#md-sub button:hover { filter: brightness(1.25); transform: translateY(-1px); }
.md-niv-res { display: block; margin-top: 4px; color: #8ff0c4 !important; font-size: 11px !important; }
.md-niv-hist { margin-top: 6px; border-radius: 12px; border: 1px solid rgba(175, 228, 255, .25); background: rgba(255, 255, 255, .04); }
.md-niv-hist summary { padding: 9px 12px; cursor: pointer; color: #fff; font-size: 13px; }
.md-niv-hist summary small { margin-left: 6px; color: rgba(215, 238, 255, .7); }
.md-niv-hist .md-hist { padding: 0 10px 8px; margin: 0; max-height: 260px; overflow: auto; }
.md-tiempo-modal h2 { margin-bottom: 4px; }
.md-reparto { margin: 10px 0 !important; }

/* ===== MODO LIVIANO EN CELULAR · PASO 1 (para deshacerlo, borrar este bloque completo) =====
   En pantallas táctiles el fondo queda quieto (mismas figuras y colores) y los toques responden al instante. */
@media (hover: none) and (pointer: coarse) {
  .orbe, .orbe.burbuja { animation: none !important; will-change: auto; }
  .fondo-app { contain: strict; transform: translateZ(0); }
  a, button, [role="button"], label, select, summary, input[type="checkbox"], input[type="radio"] { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
}
/* ===== FIN MODO LIVIANO · PASO 1 ===== */

/* Molda: descanso que se detiene al tocar el círculo y «Iniciar» del siguiente ejercicio */
.md-descanso { cursor: pointer; }
.md-detenido b { opacity: .55; }
.md-detenido small { color: #ffd34d !important; }
.md-iniciar { cursor: pointer; gap: 2px !important; }
.md-ini-play { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; border: 2px solid #39ff8c; color: #39ff8c; background: rgba(57, 255, 140, .1); box-shadow: 0 0 18px rgba(57, 255, 140, .45); animation: mdIniLatir 1.6s ease-in-out infinite; }
.md-ini-play svg { width: 24px; height: 24px; margin-left: 3px; }
.md-iniciar b { font-size: 17px !important; color: #fff !important; margin-top: 4px; }
.md-iniciar em { max-width: 150px; text-align: center; font-size: 10.5px !important; line-height: 1.25; color: #8ff0c4 !important; }
@keyframes mdIniLatir { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.07); } }

/* Molda: editar ejercicios del catálogo personalizado */
.md-edit-btn svg { width: 13px; height: 13px; }
.md-edit-btn.on { border-color: #ffd34d !important; color: #ffd34d !important; }
.md-nuevo-ej.editando { border: 1px solid rgba(255, 211, 77, .55) !important; background: rgba(255, 211, 77, .07) !important; border-radius: 12px; }
.md-edit-tit { margin: 0; font-size: 12.5px; color: #ffd34d; }
.md-nuevo-ej .md-dos { display: flex; gap: 8px; }
.md-nuevo-ej .md-dos > * { flex: 1; }
.md-nuevo-ej.editando { padding: 12px !important; }
/* Molda · Catálogo personalizado: Ver video, Editar y quitar en una fila */
.md-mis li .md-mis-acc { flex-direction: row; align-items: center; gap: 6px; flex: none; }
.md-mis li .md-mis-acc button { white-space: nowrap; }
@media (max-width: 480px) {
  .md-mis li { flex-wrap: wrap; }
  .md-mis li .md-mis-acc { width: 100%; justify-content: flex-end; }
}
.md-mis-acc .md-ver-btn svg { width: 13px; height: 13px; }
/* Molda · Catálogo personalizado: acciones en círculos con ícono y tooltip */
.md-acc-c { position: relative; display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border-radius: 50%; cursor: pointer;
  border: 1.5px solid var(--acc); color: var(--acc); background: color-mix(in srgb, var(--acc) 10%, transparent); box-shadow: 0 0 10px color-mix(in srgb, var(--acc) 30%, transparent); transition: background .15s, transform .15s; }
.md-acc-c svg { width: 16px; height: 16px; }
.md-acc-c.verde { --acc: #39ff8c; } .md-acc-c.amarillo { --acc: #ffd34d; } .md-acc-c.rojo { --acc: #ff6b7d; }
.md-acc-c:hover, .md-acc-c.on { background: color-mix(in srgb, var(--acc) 24%, transparent); transform: translateY(-1px); }
.md-acc-c::after { content: attr(data-tip); position: absolute; bottom: calc(100% + 7px); left: 50%; transform: translate(-50%, 4px); padding: 4px 8px; border-radius: 7px;
  background: rgba(8, 18, 40, .95); border: 1px solid color-mix(in srgb, var(--acc) 60%, transparent); color: #fff; font: 400 11px var(--font); white-space: nowrap;
  opacity: 0; pointer-events: none; transition: opacity .15s, transform .15s; z-index: 5; }
.md-acc-c:hover::after, .md-acc-c:focus-visible::after { opacity: 1; transform: translate(-50%, 0); }
@media (hover: none) { .md-acc-c:active::after { opacity: 1; transform: translate(-50%, 0); } }
@media (max-width: 480px) { .md-mis li { flex-wrap: nowrap; } .md-mis li .md-mis-acc { width: auto; } }
.md-acc-c.rojo::after { left: auto; right: -4px; transform: translate(0, 4px); }
.md-acc-c.rojo:hover::after, .md-acc-c.rojo:focus-visible::after { transform: none; }
@media (hover: none) { .md-acc-c.rojo:active::after { transform: none; } }
.md-acc-c::after { top: auto !important; bottom: calc(100% + 7px) !important; }

/* Molda: figuras de palitos animadas al pulso (balanceo de pierna) */
.mdf-anim .mdf-pierna { transform-box: view-box; transform-origin: 32px 34px; }
.mdf-anim .mdf-b { opacity: .4; }
.mdf-anim.otra .mdf-a { opacity: .4; } .mdf-anim.otra .mdf-b { opacity: 1; }
.mdf-anim.mueve:not(.otra) .mdf-a, .mdf-anim.mueve.otra .mdf-b { animation: mdfBalanceo calc(var(--pulso, .75s) * 2) ease-in-out infinite; }
.mdf-anim:not(.mueve) .mdf-a { transform: rotate(-28deg); } /* quieta: muestra el gesto */
@keyframes mdfBalanceo { 0%, 100% { transform: rotate(-42deg); } 50% { transform: rotate(30deg); } }
@media (prefers-reduced-motion: reduce) { .mdf-anim .mdf-pierna { animation: none !important; } }

/* Molda: ficha de cada ejercicio (imagen o muñequito animado) y nombres que la abren */
.md-ficha-link { cursor: pointer; text-decoration: underline dotted rgba(143, 240, 196, .6); text-underline-offset: 3px; }
.md-ficha-link:hover { color: #8ff0c4; }
.md-ej-par { display: inline-flex; align-items: center; gap: 3px; }
.md-ejs .md-ej-ojo { display: grid; place-items: center; width: 28px; height: 28px; padding: 0 !important; border-radius: 50% !important; border: 1px solid rgba(143, 240, 196, .55) !important; background: rgba(57, 255, 140, .08) !important; color: #8ff0c4; }
.md-ej-ojo svg { width: 15px; height: 15px; }
.md-ficha-caja { text-align: center; max-width: 380px; }
.md-ficha-fig { width: min(220px, 60vw); aspect-ratio: 1; margin: 4px auto 10px; border-radius: 18px; overflow: hidden; display: grid; place-items: center;
  background: rgba(95, 178, 255, .12); border: 1px solid rgba(175, 228, 255, .35); color: #bfe9ff; }
.md-ficha-fig svg { width: 82%; height: 82%; }
.md-ficha-fig img { width: 100%; height: 100%; object-fit: cover; }
.md-ficha-dato { margin: 0 0 6px; font-size: 12.5px; color: rgba(215, 238, 255, .8); }

/* Molda · Catálogo: pestañas General / Personalizado */
.md-cat-tabs { margin: 6px 0 12px; }
.md-cat-zona > summary { list-style: none; }
.md-cat-zona > summary::-webkit-details-marker { display: none; }
.md-cat-zona[open] { border-color: rgba(167, 120, 255, .55); background: rgba(167, 120, 255, .08); }
.md-cat-zona[open] .md-zona-btn svg { transform: rotate(180deg); }
.md-ejs .md-cat-ej { font-weight: 400 !important; }
.md-anim-tag { color: #8ff0c4 !important; border-color: rgba(143, 240, 196, .5) !important; }
/* La ficha del ejercicio siempre por encima del catálogo, del ajuste y de la configuración */
.md-ficha { z-index: 10003 !important; }

/* Molda: muñequito de frente; «otra» lo refleja para mostrar la otra pierna */
.mdf-anim .mdf-espejo { transform-box: view-box; transform-origin: 32px 32px; transition: transform .25s; }
.mdf-anim.otra .mdf-espejo { transform: scaleX(-1); }

/* Molda: levanta rodilla y balancea (la pierna gira en la rodilla) */
.mdf-anim .mdf-pantorrilla { transform-box: view-box; transform-origin: 42.5px 34px; }
.mdf-anim.mueve .mdf-pantorrilla { animation: mdfRodilla calc(var(--pulso, .75s) * 2) ease-in-out infinite; }
.mdf-anim:not(.mueve) .mdf-pantorrilla { transform: rotate(-40deg); }
@keyframes mdfRodilla { 0%, 100% { transform: rotate(-72deg); } 50% { transform: rotate(18deg); } }
@media (prefers-reduced-motion: reduce) { .mdf-anim .mdf-pantorrilla { animation: none !important; } }

/* Molda: calentamiento de hoy, clasificado */
.md-cal-btn { cursor: pointer; }
.md-cal-btn:hover { background: rgba(255, 179, 122, .15); }
.md-cal-tipos { display: grid; gap: 8px; margin-top: 10px; text-align: left; }
.md-cal-tipo { display: grid; gap: 4px; width: 100%; padding: 10px 12px; border-radius: 12px; border: 1px solid rgba(175, 228, 255, .3); background: rgba(255, 255, 255, .05); color: #fff; font: inherit; text-align: left; cursor: pointer; }
.md-cal-tipo b { font-size: 13.5px; }
.md-cal-tipo small { font-size: 11.5px; color: rgba(215, 238, 255, .75); }
.md-cal-tipo.on { border-color: #ffb37a; background: rgba(255, 179, 122, .12); box-shadow: 0 0 12px rgba(255, 179, 122, .25); }
.md-cal-tipo.pronto { opacity: .5; cursor: default; }
.md-cal-ejs { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 2px; font-size: 11.5px; color: #8ff0c4; }
/* Molda: bisagra de cadera (el tronco baja y sube desde la cadera) */
.mdf-anim .mdf-tronco { transform-box: view-box; transform-origin: 32px 34px; }
.mdf-anim.mueve .mdf-tronco { animation: mdfBisagra calc(var(--pulso, .75s) * 2) ease-in-out infinite; }
.mdf-anim:not(.mueve) .mdf-tronco { transform: rotate(40deg); }
@keyframes mdfBisagra { 0%, 100% { transform: rotate(0deg); } 50% { transform: rotate(72deg); } }
@media (prefers-reduced-motion: reduce) { .mdf-anim .mdf-tronco { animation: none !important; } }

/* Molda: sección de calentamientos (clasificaciones desplegables con tarjetas animadas) */
.md-cal-caja { max-width: 560px; }
.md-cal-secciones { display: grid; gap: 8px; margin-top: 8px; text-align: left; }
.md-cal-sec.pronto { opacity: .5; }
.md-cal-sec.pronto .md-zona-btn { cursor: default; }
.md-cal-sec.hoy { border-color: rgba(255, 179, 122, .7); }
.md-cal-cuerpo { padding: 0 10px 10px; }
.md-cal-cuerpo > .md-nota { margin: 0 0 8px; }
.md-cal-tarjetas { display: grid; gap: 8px; }
.md-cal-tarjeta { display: grid; grid-template-columns: 74px 1fr; gap: 10px; align-items: center; padding: 8px; border-radius: 12px; border: 1px solid rgba(175, 228, 255, .25); background: rgba(255, 255, 255, .05); cursor: pointer; }
.md-cal-tarjeta:hover { border-color: rgba(143, 240, 196, .6); }
.md-cal-fig { width: 74px; height: 74px; border-radius: 12px; overflow: hidden; display: grid; place-items: center; background: rgba(95, 178, 255, .12); color: #bfe9ff; }
.md-cal-fig svg { width: 88%; height: 88%; }
.md-cal-fig img { width: 100%; height: 100%; object-fit: cover; }
.md-cal-txt { display: grid; gap: 3px; min-width: 0; }
.md-cal-txt b { font-size: 13px; color: #fff; }
.md-cal-txt small { font-size: 11.5px; line-height: 1.35; color: rgba(215, 238, 255, .78); }
.md-cal-txt .md-cal-serie { color: #8ff0c4; }
.md-cal-usar { width: 100%; margin-top: 10px; }
.md-cal-usar:disabled { opacity: .6; cursor: default; }

.md-tipo-zona { color: #8fd3ff !important; border-color: rgba(143, 211, 255, .55) !important; }
.md-tipo-zona:hover { background: rgba(143, 211, 255, .15) !important; }
.md-cal-enuso { margin: 10px 0 0 !important; color: #ffb37a !important; text-align: center; }

/* Molda: tempo que se puede escribir; metrónomo y música junto a la barra */
.md-bpm-num { padding: 0 4px; border: 0; border-bottom: 1.5px dashed rgba(255, 255, 255, .45); background: none; color: inherit; font: inherit; cursor: text; line-height: 1; }
.md-bpm-num:hover { border-bottom-color: #8fd3ff; }
.md-bpm-input { width: 3.2em; padding: 0 2px; border: 1.5px solid #8fd3ff; border-radius: 8px; background: rgba(8, 18, 40, .7); color: #fff; font: inherit; text-align: center; }
.md-bpm-input::-webkit-inner-spin-button { opacity: .4; }
.md-bpm-fila { display: flex; align-items: center; gap: 8px; width: 100%; }
.md-bpm-fila .slider { flex: 1; min-width: 0; }
.md-son-btn { flex: none; display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border-radius: 50%; border: 1.5px solid rgba(255, 255, 255, .35); background: transparent; color: rgba(255, 255, 255, .6); cursor: pointer; transition: border-color .15s, color .15s, background .15s; }
.md-son-btn svg { width: 18px; height: 18px; }
.md-son-btn.on { border-color: #fff; color: #fff; background: rgba(255, 255, 255, .12); }
.md-son-btn:hover { color: #fff; }

/* Molda: listado de canciones (presión larga en el botón de música) */
.md-son-btn { -webkit-touch-callout: none; user-select: none; }
.md-canc-lista { display: grid; gap: 6px; margin-top: 8px; max-height: 55vh; overflow: auto; text-align: left; }
.md-canc { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; border-radius: 12px; border: 1px solid rgba(175, 228, 255, .28); background: rgba(255, 255, 255, .05); color: #fff; font: inherit; text-align: left; cursor: pointer; }
.md-canc > span:last-child { display: grid; gap: 2px; min-width: 0; }
.md-canc b { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.md-canc small { font-size: 11px; color: rgba(215, 238, 255, .7); }
.md-canc-ico { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; border: 1.5px solid rgba(255, 255, 255, .35); color: rgba(255, 255, 255, .75); }
.md-canc-ico svg { width: 16px; height: 16px; }
.md-canc.on { border-color: #fff; background: rgba(255, 255, 255, .1); }
.md-canc.on .md-canc-ico { border-color: #fff; color: #fff; }
/* Molda: número de cada ejercicio en su sección */
.md-cal-fig { position: relative; }
.md-num { position: absolute; top: 4px; left: 4px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; display: grid; place-items: center; background: rgba(8, 18, 40, .8); border: 1px solid rgba(143, 240, 196, .6); color: #8ff0c4; font: 400 10.5px var(--font); }
.md-cal-modal { z-index: 10002 !important; }

/* Molda: tiempo automático o a mi medida */
.md-tiempo-modo { margin-bottom: 6px; }
.md-tiempo-libre label { display: flex; align-items: center; gap: 10px; }
.md-tiempo-libre input { width: 90px; text-align: center; font-size: 18px; }
.md-tiempo-libre span { font-size: 13px; color: rgba(215, 238, 255, .8); }
/* Molda: campo de minutos «A mi medida» legible y con su unidad al lado */
.md-tiempo.md-tiempo-libre label { display: flex !important; flex-direction: row !important; align-items: center !important; gap: 10px; }
.md-tiempo.md-tiempo-libre input { width: 96px !important; height: 44px; padding: 0 10px !important; border-radius: 12px !important; border: 1.5px solid rgba(57, 255, 140, .55) !important; background: rgba(8, 18, 40, .75) !important; color: #fff !important; font: 400 20px var(--font) !important; text-align: center; color-scheme: dark; }
.md-tiempo.md-tiempo-libre span { font-size: 14px; color: #fff; }

/* Molda: reparto del tiempo con series, repeticiones y tempo editables */
.md-t-bpm { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 10px 0 4px; font-size: 13px; color: #fff; }
.md-reparto li { flex-wrap: wrap; row-gap: 4px; }
.md-reparto li > b { flex-basis: 100%; }
.md-t-campos { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: rgba(215, 238, 255, .85); }
.md-t-campos input, .md-t-bpm input { width: 56px; height: 30px; padding: 0 4px; border-radius: 8px; border: 1.5px solid rgba(143, 211, 255, .55); background: rgba(8, 18, 40, .75); color: #fff; font: 400 14px var(--font); text-align: center; color-scheme: dark; }
.md-t-fijo { font-size: 12px; color: rgba(215, 238, 255, .85); }
.md-t-res { color: #8ff0c4; }
.md-reparto li { display: flex !important; flex-wrap: wrap; align-items: center; gap: 4px 8px; text-align: left; }
.md-reparto li > b, .md-reparto li > small { flex-basis: 100%; }

/* Molda · Manual: cada ejercicio elegido con series, repeticiones, tempo y su tiempo */
.md-sel-lista { display: grid; gap: 6px; margin-top: 6px; }
.md-sel-ej { position: relative; padding: 8px 10px; border-radius: 10px; border: 1px solid rgba(57, 255, 140, .35); background: rgba(8, 18, 40, .35); display: grid; gap: 6px; text-align: left; }
.md-sel-cab { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-right: 30px; }
.md-sel-cab b { font-size: 13px; color: #fff; }
.md-sel-ej .md-hist-x { top: 8px; transform: none; }
.md-sel-ej .md-t-campos { flex-wrap: wrap; row-gap: 6px; }
.md-sel-t { font-size: 11.5px; color: rgba(215, 238, 255, .78); }
.md-sel .md-sel-ej .md-hist-x { padding: 0; width: 28px; height: 28px; border-radius: 50%; border: 1px solid rgba(255, 90, 110, .45); background: rgba(255, 90, 110, .08); color: #ff9aa5; }

.md-t-grad { margin-top: 2px; }

/* Molda: aviso de riesgo cuando el tiempo pasa lo recomendado del nivel */
.md-riesgo { display: flex; gap: 8px; align-items: flex-start; margin: 6px 0 0; padding: 8px 10px; border-radius: 10px; border: 1px solid rgba(255, 179, 122, .6); background: rgba(255, 179, 122, .1); color: #ffd9b8; font-size: 12px; line-height: 1.4; }
.md-riesgo svg { flex: none; width: 16px; height: 16px; margin-top: 1px; color: #ffb37a; }
/* Molda: sin efectos de movimiento que alteren la sensibilidad
   - la rueda de ⚙ ya no salta al acercar el mouse (el hover le cambiaba su posición)
   - los campos de número sin flechitas que suben y bajan (se escribe el número)
   - los botones no se desplazan al pasar el mouse */
.md-conf:hover, .md-conf:active, .md-conf:focus { transform: translateY(-50%) !important; }
.md-control .btn:hover, .md-modal .btn:hover, #md-sub button:hover, .md-acc-c:hover { transform: none !important; }
.md-modal input[type="number"], .md-control input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
.md-modal input[type="number"]::-webkit-inner-spin-button, .md-modal input[type="number"]::-webkit-outer-spin-button,
.md-control input[type="number"]::-webkit-inner-spin-button, .md-control input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

/* Molda: parámetros de cada ejercicio de una rutina */
.md-previa li.md-previa-ej { flex-wrap: wrap; }
.md-previa-par { flex-basis: 100%; color: rgba(215, 238, 255, .75) !important; }
.md-ver-par { display: inline-block; margin-top: 4px; margin-right: 10px; font-style: normal; font-size: 11px; color: #8fd3ff; text-decoration: underline dotted; cursor: pointer; }
.md-param-modal { z-index: 10002 !important; }
.md-param-lista { margin: 10px 0 0; padding-left: 20px; display: grid; gap: 8px; text-align: left; max-height: 60vh; overflow: auto; }
.md-param-lista li { display: grid; gap: 2px; font-size: 13px; color: #fff; }
.md-param-lista li small { font-size: 11.5px; color: rgba(215, 238, 255, .78); }
.md-param-lista li small.md-t-res { color: #8ff0c4; }
/* Molda ⚙: «Rutina» contraída; el botón muestra la rutina activa */
.md-rut-btn { border-radius: 12px; border: 1px solid rgba(255, 211, 77, .4); background: rgba(255, 211, 77, .06); margin-bottom: 8px; }
.md-rut-btn span { font-weight: 400 !important; }
.md-rut-btn.abierta svg { transform: rotate(180deg); }
.md-rutinas[hidden] { display: none !important; }

/* Molda ⚙ · Rutina: solo las armadas, en Automáticas y Manuales */
.md-rut-activa { margin: 0 0 8px !important; }
.md-rut-lista { display: grid; gap: 8px; margin-top: 10px; }
.md-rut-item { border-radius: 14px; border: 1px solid rgba(175, 228, 255, .35); background: rgba(255, 255, 255, .05); padding: 8px 10px; text-align: left; }
.md-rut-item.on { border-color: #ffd34d; background: rgba(255, 211, 77, .08); }
.md-rut-sel { width: 100%; display: grid; gap: 2px; padding: 0; border: 0; background: none; color: #fff; text-align: left; cursor: pointer; }
.md-rut-sel b { font-size: 13.5px; }
.md-rut-sel small { font-size: 11px; color: rgba(215, 238, 255, .72); }
.md-rut-acc { display: flex; gap: 14px; margin-top: 4px; }
.md-rut-acc .enlace { font-size: 11.5px; color: #8fd3ff; }
.md-rut-acc .md-rut-quitar { color: #ff9aa5; }
.md-rut-ejs { margin: 8px 0 0; padding-left: 20px; display: grid; gap: 4px; font-size: 12.5px; color: #fff; }
.md-rut-ejs li small { display: block; font-size: 11px; color: rgba(215, 238, 255, .75); }

/* Molda: el muñequito del ejercicio dentro del círculo (antes de empezarlo) */
.md-centro-ej { gap: 2px !important; }
.md-centro-fig { display: grid; place-items: center; width: 92px; height: 92px; border-radius: 50%; color: #bfe9ff; background: rgba(95, 178, 255, .12); border: 1px solid rgba(175, 228, 255, .35); }
.md-centro-fig svg { width: 84%; height: 84%; }
.md-centro-ej em { max-width: 160px; text-align: center; font-size: 11px !important; line-height: 1.25; }
.md-centro-ej small b { font-size: inherit !important; }
.md-iniciar.md-centro-ej .md-ini-play { width: 38px; height: 38px; }
.md-iniciar.md-centro-ej .md-ini-play svg { width: 18px; height: 18px; }
.md-iniciar.md-centro-ej > b { font-size: 14px !important; margin-top: 0; }
@media (max-width: 480px) { .md-centro-fig { width: 70px; height: 70px; } }

/* Molda: conteo de entrada con números grandes dentro del círculo */
.md-centro-cuenta b { font-size: 64px !important; line-height: 1; color: #39ff8c !important; text-shadow: 0 0 18px rgba(57, 255, 140, .55); }
.md-centro-cuenta em { max-width: 160px; text-align: center; font-size: 11px !important; }
/* Molda: ▶ palpita mientras espera que lo toques */
#md-play.md-late { animation: mdLatePlay 1.4s ease-in-out infinite; }
@keyframes mdLatePlay { 0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(61, 139, 253, .55); } 50% { transform: scale(1.08); box-shadow: 0 0 0 12px rgba(61, 139, 253, 0); } }
@media (prefers-reduced-motion: reduce) { #md-play.md-late { animation: none; } }
/* Molda: ▶ naranja cuando no está andando; azul (el de siempre) mientras suena */
#md-play.md-quieto { background: linear-gradient(135deg, #ffb347, #ff7a18) !important; box-shadow: 0 6px 18px rgba(255, 122, 24, .45) !important; color: #fff !important; }
#md-play.md-quieto.md-late { animation: mdLatePlayN 1.4s ease-in-out infinite; }
@keyframes mdLatePlayN { 0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 122, 24, .6); } 50% { transform: scale(1.08); box-shadow: 0 0 0 12px rgba(255, 122, 24, 0); } }
@media (prefers-reduced-motion: reduce) { #md-play.md-quieto.md-late { animation: none; } }
/* Molda: ▶ naranja más oscuro, acorde a la paleta oscura */
#md-play.md-quieto { background: linear-gradient(135deg, #c2410c, #7c2d12) !important; box-shadow: 0 6px 18px rgba(194, 65, 12, .4) !important; border: 1px solid rgba(251, 146, 60, .45) !important; }
@keyframes mdLatePlayN { 0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(194, 65, 12, .55); } 50% { transform: scale(1.08); box-shadow: 0 0 0 12px rgba(194, 65, 12, 0); } }
.md-check { display: flex; align-items: center; gap: 8px; margin: 10px 0 4px; font-size: 12.5px; color: #fff; cursor: pointer; }
.md-check input { width: 18px; height: 18px; accent-color: #39ff8c; }

/* Molda: la rutina por partes (calentamiento y ejercicios) con su muñequito; el título se puede tocar */
#md-titulo { cursor: pointer; text-decoration: underline dotted rgba(255, 255, 255, .45); text-underline-offset: 6px; }
.md-param-sec { margin: 14px 0 4px; font-size: 12px; letter-spacing: .5px; text-transform: uppercase; color: #ffb37a; text-align: left; }
.md-param-sec small { text-transform: none; color: rgba(215, 238, 255, .7); }
.md-param-fila { display: flex !important; align-items: center; gap: 10px; }
.md-param-fig { flex: none; width: 46px; height: 46px; border-radius: 10px; display: grid; place-items: center; background: rgba(95, 178, 255, .12); color: #bfe9ff; }
.md-param-fig svg { width: 88%; height: 88%; }
.md-param-txt { display: grid; gap: 2px; min-width: 0; }

/* Molda: descripción en dos mitades — Now (actual) y Next (lo que viene, más oscuro) */
.md-img { align-items: stretch !important; }
.md-img figcaption { flex: 1 1 58%; }
.md-next { flex: 0 1 42%; min-width: 120px; display: grid; justify-items: center; align-content: center; gap: 3px; margin: -12px -12px -12px 0; padding: 10px; border-radius: 0 18px 18px 0; background: rgba(4, 10, 26, .55); border-left: 1px solid rgba(175, 228, 255, .2); text-align: center; }
.md-next-tit { font-size: 10.5px; letter-spacing: 1.5px; text-transform: uppercase; color: #ffb37a; }
.md-next-fig { width: 64px; height: 64px; border-radius: 12px; display: grid; place-items: center; color: #bfe9ff; background: rgba(95, 178, 255, .1); }
.md-next-fig svg { width: 88%; height: 88%; }
.md-next b { font-size: 12.5px !important; font-weight: 700; line-height: 1.25; }
.md-next small { font-size: 11px; color: rgba(215, 238, 255, .75); }
.md-next-fin { font-size: 12px; color: rgba(215, 238, 255, .85); }
.md-centro-serie small { font-size: 13px !important; color: #fff !important; letter-spacing: 0 !important; }

/* Molda: «Reusar» una rutina desde el historial */
.md-reusar { display: inline-flex; align-items: center; gap: 5px; margin-top: 4px; padding: 3px 10px; border-radius: 999px; border: 1px solid rgba(57, 255, 140, .55); background: rgba(57, 255, 140, .1); color: #8ff0c4; font: 400 11.5px var(--font); cursor: pointer; }
.md-reusar svg { width: 11px; height: 11px; }
/* Molda: el muñequito del círculo queda dentro de su cuadro (no hereda el tamaño del anillo) y el texto va debajo */
.md-anillo .md-centro-fig { position: relative; flex: none; overflow: hidden; }
.md-anillo .md-centro-fig svg { position: static !important; inset: auto !important; width: 84% !important; height: 84% !important; overflow: hidden !important; }
.md-anillo .md-centro-ej { justify-content: center; }
.md-anillo .md-centro-ej > small { margin-top: 6px; }
/* Molda: la barra del pulso sin el cuadro del muñequito (ya está en el círculo y en Next) */
#md-fig-ctl { display: none !important; }
/* Molda: círculo del muñequito más grande (para que quepa entero, también al subir al step) */
.md-anillo .md-centro-fig { width: 112px; height: 112px; }
.md-anillo .md-centro-fig svg { width: 90% !important; height: 90% !important; }
@media (max-width: 480px) { .md-anillo .md-centro-fig { width: 86px; height: 86px; } }
/* Molda: barra del pulso reacomodada sin el cuadro del muñequito */
.md-control { grid-template-columns: auto auto minmax(0, 1fr) auto !important; }
.md-control .bpm-box { grid-column: 3 !important; grid-row: 1 !important; }
.md-control .tb-opciones { grid-column: 4 !important; grid-row: 1 !important; justify-self: end; }
@media (max-width: 640px) {
  .md-control { grid-template-columns: auto auto 1fr !important; align-items: center; }
  .md-control .tb-opciones { grid-column: 3 !important; grid-row: 1 !important; justify-self: end; }
  .md-control .bpm-box { grid-column: 1 / -1 !important; grid-row: 2 !important; }
}
/* Rueda de ⚙ más pequeña */
.md-conf { width: 42px !important; height: 42px !important; min-width: 0 !important; padding: 0 !important; }
.md-conf svg { width: 20px !important; height: 20px !important; }
@media (max-width: 640px) { .md-conf { width: 36px !important; height: 36px !important; } .md-conf svg { width: 18px !important; height: 18px !important; } }
.md-control .tb-opciones { display: flex !important; justify-content: flex-end; width: 100%; }
/* Molda: el ▶ de «Iniciar» va encima del muñequito (centrado sobre él), no sobre el texto */
.md-anillo .md-iniciar .md-centro-fig .md-ini-play { position: absolute; inset: 0; margin: auto; width: 46px !important; height: 46px !important; background: rgba(4, 10, 26, .55); backdrop-filter: none; z-index: 2; }
.md-anillo .md-iniciar .md-centro-fig .md-ini-play svg { width: 22px !important; height: 22px !important; position: static !important; }
.md-anillo .md-iniciar > b { margin-top: 6px !important; }
/* Molda: al terminar, Continuo e Interrumpido parpadean para que elijas */
.md-esquina.pide svg { animation: mdPide 1.1s ease-in-out infinite; }
.md-esquina.pide span { animation: mdPideTxt 1.1s ease-in-out infinite; }
@keyframes mdPide { 0%, 100% { opacity: 1; filter: brightness(1.25); } 50% { opacity: .35; filter: brightness(.8); } }
@keyframes mdPideTxt { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }
@media (prefers-reduced-motion: reduce) { .md-esquina.pide svg, .md-esquina.pide span { animation: none; } }
/* Molda · celular: barra del pulso en dos filas, como el dibujo
   fila 1: ▶  ■  Pulsos  metrónomo  música
   fila 2: «72 BPM» y la barra del tempo */
@media (max-width: 640px) {
  .md-control { display: grid !important; grid-template-columns: repeat(5, minmax(0, 1fr)) !important; align-items: center; justify-items: center; gap: 12px 6px !important; }
  .md-control .bpm-box, .md-control .md-bpm-fila { display: contents !important; }
  .md-control #md-play { grid-column: 1 !important; grid-row: 1 !important; }
  .md-control #stop { grid-column: 2 !important; grid-row: 1 !important; }
  .md-control .tb-opciones { grid-column: 3 !important; grid-row: 1 !important; justify-self: center !important; width: auto !important; }
  .md-control [data-son-ctl="metronomo"] { grid-column: 4 !important; grid-row: 1 !important; width: 46px; height: 46px; }
  .md-control [data-son-ctl="musica"] { grid-column: 5 !important; grid-row: 1 !important; width: 46px; height: 46px; }
  .md-control .bpm-box .valor { grid-column: 1 / 3 !important; grid-row: 2 !important; justify-self: start; margin: 0 !important; white-space: nowrap; }
  .md-control .bpm-box .slider { grid-column: 3 / 6 !important; grid-row: 2 !important; width: 100% !important; }
  .md-control .contador-pulso { grid-column: 1 / -1 !important; grid-row: 3 !important; }
  .md-control .btn-redondo { width: 56px; height: 56px; }
  .md-control .tb-opc-btn { min-width: 54px !important; padding: 6px !important; }
}
@media (max-width: 640px) { .md-control .contador-pulso { margin: 0 !important; min-height: 10px; height: auto; } .md-control { padding-bottom: 10px !important; } }

/* Molda: el cuadro del ejercicio en dos mitades iguales — Now y Next */
.md-img figcaption { flex: 1 1 0 !important; min-width: 0; }
.md-next { flex: 1 1 0 !important; min-width: 0 !important; }
.md-now-cab { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-bottom: 4px; flex-wrap: wrap; }
.md-now-tit { font-size: 10.5px; letter-spacing: 1.5px; text-transform: uppercase; color: #8fd3ff; }
.md-modo-btn { padding: 3px 10px; border-radius: 999px; border: 1px solid rgba(167, 120, 255, .65); background: rgba(167, 120, 255, .14); color: #e4d6ff; font: 400 11px var(--font); cursor: pointer; white-space: nowrap; }
.md-modo-btn:hover { background: rgba(167, 120, 255, .26); }
.md-img { padding: 0 !important; gap: 0 !important; overflow: hidden; }
.md-img figcaption { padding: 12px !important; box-sizing: border-box; }
.md-next { margin: 0 !important; box-sizing: border-box; border-radius: 0 !important; }

/* Molda: tablero del pulso con calorías, grasa y peso abajo (como el dibujo) */
.md-control .md-result-ctl { grid-column: 1 / -1 !important; grid-row: 2 !important; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin: 4px -14px -14px; border-top: 1px solid rgba(175, 228, 255, .25); }
.md-control .md-result-ctl > div { display: flex; align-items: baseline; justify-content: center; gap: 6px; padding: 8px 6px; border: 0 !important; border-radius: 0 !important; background: none !important; box-shadow: none !important; min-height: 0 !important; }
.md-control .md-result-ctl > div + div { border-left: 1px solid rgba(175, 228, 255, .25) !important; }
.md-control .md-result-ctl small { font-size: 10.5px !important; letter-spacing: .5px; color: rgba(215, 238, 255, .75); }
.md-control .md-result-ctl b { font-size: 18px !important; line-height: 1; }
.md-control .md-result-ctl em { font-size: 11px !important; }
@media (max-width: 640px) {
  .md-control .md-result-ctl { grid-row: 4 !important; margin: 2px -12px -10px; }
  .md-control .md-result-ctl > div { flex-direction: column; align-items: center; gap: 0; padding: 6px 2px; }
  .md-control .md-result-ctl b { font-size: 16px !important; }
}
/* Now y Next: dos mitades iguales y simétricas — título, cuadro con el muñequito, tipo y datos */
.md-img { align-items: stretch !important; }
.md-now, .md-next { flex: 1 1 0 !important; min-width: 0; display: flex !important; flex-direction: column; align-items: center; gap: 6px; padding: 12px !important; text-align: center; box-sizing: border-box; }
.md-now figcaption { display: flex !important; flex-direction: column; align-items: center; gap: 4px; padding: 0 !important; }
.md-now-cab { width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px; margin: 0 !important; position: relative; }
.md-now-cab .md-modo-btn { position: absolute; right: 0; top: 50%; transform: translateY(-50%); padding: 2px 8px; font-size: 10.5px; }
.md-now-tit, .md-next-tit { font-size: 12px; letter-spacing: 2px; text-transform: uppercase; }
.md-now-tit { color: #8fd3ff; }
.md-half-fig { width: 96px; height: 96px; flex: none; display: grid; place-items: center; padding: 0; border-radius: 14px; border: 1px solid rgba(175, 228, 255, .35); background: rgba(95, 178, 255, .1); color: #bfe9ff; cursor: pointer; }
.md-half-fig svg { width: 86%; height: 86%; }
.md-half-fin { font-size: 12px; color: rgba(215, 238, 255, .8); cursor: default; }
.md-half-nom { font: 700 14px var(--font) !important; line-height: 1.25; color: #fff; }
/* En plena rutina: «¿Cómo se hace?» pausa y abre la ficha del ejercicio de ahora. */
.md-como { display: inline-block; margin: 4px 0 2px; padding: 3px 10px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .45); background: rgba(255, 255, 255, .12); color: #fff; font: 600 12px var(--font); cursor: pointer; }
.md-como:hover { background: rgba(255, 255, 255, .24); transform: none !important; }
.md-como + .md-como { margin-left: 6px; }
/* Modificar la rutina en plena marcha: lo ya hecho se ve apagado. */
.md-modif .md-hecho { opacity: .55; }
.md-half-dato { font-style: normal; font-size: 12px; color: #ffd34d; }
.md-now .md-desc-sub, .md-next .md-desc-sub { justify-content: center; }
.md-now .md-desc-dato { font-size: 11px; padding: 1px 8px; border-radius: 999px; border: 1px solid rgba(143, 211, 255, .5); color: #8fd3ff; cursor: pointer; }
.md-next { background: rgba(4, 10, 26, .55) !important; border-left: 1px solid rgba(175, 228, 255, .22) !important; }
@media (max-width: 480px) { .md-half-fig { width: 76px; height: 76px; } .md-now-cab .md-modo-btn { position: static; transform: none; } .md-now-cab { flex-wrap: wrap; } }
.md-control .md-result-ctl > div { display: flex !important; flex-direction: row !important; justify-content: center !important; align-items: baseline !important; text-align: center; }
@media (max-width: 640px) { .md-control .md-result-ctl > div { flex-direction: column !important; align-items: center !important; } }
/* Molda · celular: todo en una pantalla, sin desplazarse */
@media (max-width: 640px) {
  .holo.md { gap: 8px !important; padding: 10px 10px 12px !important; }
  .md-cab { padding: 0 38px 0 0 !important; min-height: 0 !important; justify-content: flex-start; }
  .md-cab .md-conf { top: 0 !important; transform: none !important; right: 0; }
  .md-conf:hover, .md-conf:active, .md-conf:focus { transform: none !important; }
  .md-titulos { align-items: flex-start !important; gap: 4px !important; width: 100%; }
  .md-titulo { font-size: 19px !important; text-align: left !important; padding-bottom: 2px !important; }
  .md-sub { flex-wrap: nowrap !important; gap: 5px !important; justify-content: flex-start !important; font-size: 10.5px !important; max-width: 100%; }
  .md-sub button { padding: 3px 8px !important; white-space: nowrap; }
  .md-zona-anillo { max-width: 290px !important; margin-top: -2px !important; }
  .md-zona-anillo .md-anillo { width: 74% !important; }
  .md-esquina { width: 60px !important; bottom: -2px !important; }
  .md-esquina svg { width: 40px !important; height: 40px !important; padding: 10px !important; }
  .md-esquina span { font-size: 10px !important; }
  .md-centro b { font-size: 26px !important; }
  .md-control { padding: 10px 10px 8px !important; gap: 8px 4px !important; }
  .md-control .btn-redondo { width: 48px !important; height: 48px !important; }
  .md-control [data-son-ctl] { width: 40px !important; height: 40px !important; }
  .md-control .tb-opc-btn { min-width: 50px !important; padding: 4px 6px !important; }
  .md-control .contador-pulso { display: none !important; }
  .md-control .bpm-box .valor { font-size: 15px; }
  .md-control .bpm-box .valor .md-bpm-num, .md-control .bpm-box .valor #md-bpm-val { font-size: 30px !important; }
  .md-control .md-result-ctl { grid-row: 3 !important; margin: 0 -10px -8px !important; }
  .md-control .md-result-ctl > div { padding: 4px 2px !important; }
  .md-control .md-result-ctl small { font-size: 9.5px !important; }
  .md-control .md-result-ctl b { font-size: 15px !important; }
  .md-now, .md-next { padding: 8px !important; gap: 3px !important; }
  .md-half-fig { width: 58px !important; height: 58px !important; }
  .md-half-nom { font-size: 12.5px !important; }
  .md-half-dato { font-size: 11px !important; }
  .md-now .md-desc-sub .md-cal, .md-next .md-desc-sub .md-cal { font-size: 9.5px !important; padding: 0 6px !important; }
  .md-now .md-desc-dato { display: none; }
}

/* Molda: carrusel de relax (Caminar · Trotar · Correr) */
.md-relax-carrusel { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(150px, 1fr); gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 6px 2px 10px; margin-top: 8px; }
.md-relax-card { scroll-snap-align: center; display: grid; justify-items: center; gap: 4px; padding: 12px 10px; border-radius: 16px; border: 1px solid rgba(57, 255, 140, .45); background: rgba(57, 255, 140, .07); color: #fff; cursor: pointer; font: inherit; }
.md-relax-card:hover { background: rgba(57, 255, 140, .14); }
.md-relax-card b { font-size: 15px; }
.md-relax-card small { font-size: 11px; color: rgba(215, 238, 255, .78); }
.md-relax-ir { margin-top: 4px; padding: 4px 14px; border-radius: 999px; background: linear-gradient(135deg, #39ff8c, #12b76a); color: #04220f; font-size: 12px; }
@media (max-width: 480px) { .md-relax-carrusel { grid-auto-columns: 72%; } }

/* Molda: el círculo en reposo da las indicaciones; «Pesos» con el actual en rojo y el estimado en verde */
.md-centro-guia { gap: 6px !important; padding: 0 14px; }
.md-guia { display: grid; gap: 0; text-align: center; line-height: 1.2; }
.md-guia b { font-size: 13px !important; color: #fff !important; font-weight: 700; }
.md-guia small { font-size: 10.5px !important; letter-spacing: 0 !important; text-transform: none !important; color: rgba(215, 238, 255, .78) !important; }
.md-centro-guia em { margin-top: 2px; font-size: 10px !important; color: rgba(215, 238, 255, .6) !important; }
@media (max-width: 480px) { .md-guia b { font-size: 11.5px !important; } .md-guia small { font-size: 9.5px !important; } .md-centro-guia { gap: 3px !important; } }
.md-control .md-result-ctl .md-pesos { justify-content: center !important; }
.md-peso-act { color: #ff6b7d; }
.md-peso-est { color: #39ff8c; }
.md-peso-bar { margin: 0 3px; color: rgba(215, 238, 255, .6); font-weight: 400; }

/* Molda: carrusel de relax dentro del círculo */
.md-centro-relax { gap: 2px !important; }
.md-rx-carta { display: grid; justify-items: center; gap: 2px; cursor: pointer; }
.md-rx-carta b { font-size: 16px !important; color: #fff !important; }
.md-rx-carta small { font-size: 10px !important; letter-spacing: 0 !important; text-transform: none !important; color: #8ff0c4 !important; }
.md-rx-flecha { position: absolute; top: 42%; width: 30px; height: 30px; border-radius: 50%; border: 1px solid rgba(175, 228, 255, .45); background: rgba(4, 10, 26, .5); color: #fff; font-size: 20px; line-height: 1; cursor: pointer; display: grid; place-items: center; padding: 0; }
.md-rx-flecha.izq { left: -6px; } .md-rx-flecha.der { right: -6px; }
.md-rx-x { position: absolute; top: -14px; right: 6px; width: 24px; height: 24px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .4); background: rgba(4, 10, 26, .6); color: #fff; font-size: 15px; line-height: 1; cursor: pointer; padding: 0; }
.md-rx-puntos { display: flex; gap: 5px; margin-top: 3px; }
.md-rx-puntos i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, .3); }
.md-rx-puntos i.on { background: #39ff8c; box-shadow: 0 0 6px rgba(57, 255, 140, .8); }
/* Molda: en reposo el círculo queda limpio y las indicaciones aparecen de a una, se desvanecen y sigue la otra */
.md-centro-guia { gap: 0 !important; padding: 0 !important; }
.md-centro-guia .md-guia { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 4px; padding: 0 12%; opacity: 0; animation: mdGuia 10.5s ease-in-out infinite; }
.md-centro-guia .md-guia:nth-child(2) { animation-delay: 3.5s; }
.md-centro-guia .md-guia:nth-child(3) { animation-delay: 7s; }
.md-centro-guia .md-guia b { font-size: 16px !important; }
.md-centro-guia .md-guia small { font-size: 12px !important; max-width: 150px; line-height: 1.3; }
@keyframes mdGuia { 0% { opacity: 0; transform: translateY(4px); } 6% { opacity: 1; transform: none; } 27% { opacity: 1; transform: none; } 33% { opacity: 0; transform: translateY(-4px); } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .md-centro-guia .md-guia { animation: none; } .md-centro-guia .md-guia:first-child { opacity: 1; } }
@media (max-width: 480px) { .md-centro-guia .md-guia b { font-size: 14px !important; } .md-centro-guia .md-guia small { font-size: 11px !important; max-width: 120px; } }
/* Molda: sin Now/Next abajo; el círculo más grande muestra el muñequito con el que empieza la rutina */
#md-img { display: none !important; }
.md-zona-anillo { max-width: 460px !important; }
.md-zona-anillo .md-anillo { width: 84% !important; }
.md-anillo .md-centro-fig { width: 150px; height: 150px; }
.md-centro-inicio { gap: 4px !important; }
.md-inicio-nom { font-size: 17px !important; color: #fff !important; }
.md-guia-linea { position: relative; display: block; width: 100%; height: 30px; }
.md-guia-linea i { position: absolute; inset: 0; display: grid; place-items: center; font-style: normal; font-size: 11.5px; line-height: 1.2; color: rgba(215, 238, 255, .8); opacity: 0; animation: mdGuia 10.5s ease-in-out infinite; }
.md-guia-linea i:nth-child(2) { animation-delay: 3.5s; }
.md-guia-linea i:nth-child(3) { animation-delay: 7s; }
@media (prefers-reduced-motion: reduce) { .md-guia-linea i { animation: none; } .md-guia-linea i:first-child { opacity: 1; } }
@media (max-width: 640px) {
  .md-zona-anillo { max-width: 360px !important; margin-top: 4px !important; }
  .md-zona-anillo .md-anillo { width: 82% !important; }
  .md-anillo .md-centro-fig { width: 112px; height: 112px; }
  .md-inicio-nom { font-size: 14px !important; }
  .md-guia-linea { height: 26px; }
  .md-guia-linea i { font-size: 10px; padding: 0 6px; }
}
/* Molda · celular: título centrado y debajo las tres etiquetas centradas */
@media (max-width: 640px) {
  .md-cab { padding: 0 40px !important; justify-content: center !important; }
  .md-cab .md-conf { position: absolute !important; right: 0; top: 0 !important; }
  .md-titulos { align-items: center !important; }
  .md-titulo { text-align: center !important; }
  .md-sub { justify-content: center !important; flex-wrap: wrap !important; }
}
@media (max-width: 640px) { .md-sub { flex-wrap: nowrap !important; margin: 0 -40px !important; width: calc(100% + 80px); } .md-sub button { padding: 3px 7px !important; } }
@media (max-width: 640px) { .md-control { margin-top: 36px !important; } }
/* Molda: botón de la modalidad entre el círculo y el tablero */
.md-modo-fila { display: flex; justify-content: center; margin: 6px 0 2px; }
.md-modo-grande { padding: 6px 18px !important; font-size: 13px !important; }
@media (max-width: 640px) { .md-control { margin-top: 10px !important; } .md-modo-fila { margin: 18px 0 4px; } }
/* Celular: dejar presionado el círculo sin que el navegador lo interrumpa (selección de texto, menú o desplazamiento) */
#md-anillo .md-centro { touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
#md-anillo .md-centro * { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }

/* Molda: carrusel vertical de relax (rueda: anterior arriba, elegida al centro, siguiente abajo) */
.md-rx-rueda { display: grid; justify-items: center; gap: 2px; width: 100%; }
.md-rx-otra { font-size: 12px; color: rgba(215, 238, 255, .45); cursor: pointer; padding: 2px 10px; border-radius: 999px; transform: scale(.9); }
.md-rx-otra.arriba { -webkit-mask-image: linear-gradient(to top, #000 40%, transparent); mask-image: linear-gradient(to top, #000 40%, transparent); }
.md-rx-otra.abajo { -webkit-mask-image: linear-gradient(to bottom, #000 40%, transparent); mask-image: linear-gradient(to bottom, #000 40%, transparent); }
.md-rx-otra:hover { color: #fff; }
.md-rx-carta { padding: 4px 0; border-top: 1px solid rgba(57, 255, 140, .35); border-bottom: 1px solid rgba(57, 255, 140, .35); width: 100%; }
.md-centro-relax .md-centro-fig { width: 96px !important; height: 96px !important; }
.md-rx-rueda.sube { animation: rxSube .28s ease-out; }
.md-rx-rueda.baja { animation: rxBaja .28s ease-out; }
@keyframes rxSube { from { transform: translateY(26px); opacity: .4; } to { transform: none; opacity: 1; } }
@keyframes rxBaja { from { transform: translateY(-26px); opacity: .4; } to { transform: none; opacity: 1; } }
.md-rx-flecha, .md-rx-puntos { display: none !important; }
@media (max-width: 480px) { .md-centro-relax .md-centro-fig { width: 76px !important; height: 76px !important; } .md-rx-otra { font-size: 11px; } }
.md-rx-ir { margin-top: 3px; padding: 3px 12px; border-radius: 999px; background: linear-gradient(135deg, #39ff8c, #12b76a); color: #04220f; font-size: 11px; font-weight: 700; }
.md-centro-relax .md-centro-fig { width: 80px !important; height: 80px !important; }
@media (max-width: 480px) { .md-centro-relax .md-centro-fig { width: 58px !important; height: 58px !important; } .md-rx-carta b { font-size: 14px !important; } .md-rx-otra { font-size: 10.5px; padding: 0 8px; } .md-rx-ir { font-size: 10px; padding: 2px 10px; } }
/* Molda: más aire entre la barra del tempo y la franja de calorías, grasa y pesos */
.md-control .md-result-ctl { margin-top: 14px !important; padding-top: 4px; }
@media (max-width: 640px) { .md-control .md-result-ctl { margin-top: 12px !important; } }
/* Molda: el relax como carrete de tragamonedas (cilindro con sombras, la opción anterior y la siguiente asomando) */
.md-centro-relax { gap: 6px !important; }
.md-rx-reel { position: relative; width: 58%; height: 76%; border-radius: 18px; overflow: hidden; border: 3px solid #39ff8c; box-shadow: 0 0 14px rgba(57, 255, 140, .45), inset 0 0 0 2px rgba(4, 10, 26, .9); background: linear-gradient(90deg, #cfe7ff 0%, #ffffff 22%, #ffffff 78%, #cfe7ff 100%); }
.md-rx-cinta { position: absolute; inset: 0; display: grid; grid-template-rows: 1fr 1.6fr 1fr; justify-items: center; align-items: center; color: #0b1a33; }
.md-rx-cinta .md-rx-otra { width: 70%; height: 100%; display: grid; place-items: center; opacity: .35; filter: blur(.6px); padding: 0; transform: none; -webkit-mask-image: none; mask-image: none; cursor: pointer; }
.md-rx-cinta .md-rx-otra.arriba { transform: translateY(-22%) scaleY(.72); }
.md-rx-cinta .md-rx-otra.abajo { transform: translateY(22%) scaleY(.72); }
.md-rx-cinta .md-rx-otra svg { width: 90%; height: 90%; }
.md-rx-cinta .md-rx-carta { border: 0; padding: 0; width: auto; display: grid; place-items: center; cursor: pointer; }
.md-centro-relax .md-rx-cinta .md-centro-fig { background: none !important; border: 0 !important; color: #0b1a33; width: 86px !important; height: 86px !important; }
.md-rx-sombra { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(to bottom, rgba(4, 10, 26, .75) 0%, rgba(4, 10, 26, .15) 26%, transparent 40%, transparent 60%, rgba(4, 10, 26, .15) 74%, rgba(4, 10, 26, .75) 100%); }
.md-rx-placa { position: absolute; left: -4px; right: -4px; top: 63%; display: grid; justify-items: center; padding: 3px 4px; border-radius: 10px; border: 2px solid #39ff8c; background: linear-gradient(#ffffff, #e6f3ff); color: #0b1a33; box-shadow: 0 2px 8px rgba(0, 0, 0, .4); cursor: pointer; }
.md-rx-placa b { font-size: 15px !important; color: #0b1a33 !important; line-height: 1.1; }
.md-rx-placa small { font-size: 9.5px !important; color: #1d4f8a !important; letter-spacing: 0 !important; text-transform: none !important; }
.md-rx-cinta.sube { animation: rxSube .3s ease-out; }
.md-rx-cinta.baja { animation: rxBaja .3s ease-out; }
.md-rx-rueda { display: none; }
.md-rx-ir { cursor: pointer; }
@media (max-width: 480px) { .md-rx-reel { width: 62%; height: 72%; border-width: 2px; } .md-centro-relax .md-rx-cinta .md-centro-fig { width: 62px !important; height: 62px !important; } .md-rx-placa b { font-size: 12.5px !important; } .md-rx-placa small { font-size: 8.5px !important; } }
/* Carrete más alto: usa más del círculo para que se vean la opción anterior y la siguiente */
.md-anillo .md-centro.md-centro-relax { inset: 9% !important; }
.md-rx-reel { width: 46% !important; height: 82% !important; }
.md-rx-cinta { grid-template-rows: 1fr 1.25fr 1fr !important; }
.md-rx-placa { top: 58% !important; }
.md-rx-x { top: 2px !important; right: 18% !important; }
@media (max-width: 480px) { .md-rx-reel { width: 50% !important; height: 80% !important; } .md-centro-relax .md-rx-cinta .md-centro-fig { width: 58px !important; height: 58px !important; } }
.md-rx-sombra { background: linear-gradient(to bottom, rgba(4, 10, 26, .55) 0%, rgba(4, 10, 26, .12) 22%, transparent 36%, transparent 64%, rgba(4, 10, 26, .12) 78%, rgba(4, 10, 26, .55) 100%) !important; }
.md-rx-cinta .md-rx-otra { opacity: .55 !important; filter: blur(.4px) !important; color: #4a6a90; }
.md-rx-cinta .md-rx-otra svg { width: 100% !important; height: 100% !important; }
.md-centro-relax .md-rx-cinta .md-centro-fig { width: 76px !important; height: 76px !important; margin-top: -18px; }
@media (max-width: 480px) { .md-centro-relax .md-rx-cinta .md-centro-fig { width: 66px !important; height: 66px !important; } }
/* Carrusel de relax: todo el fondo del círculo es el carrete (sin marco), con sombra de cilindro */
.md-anillo .md-centro.md-centro-relax { inset: 15% !important; gap: 4px !important; }
.md-rx-reel { width: 100% !important; height: 100% !important; border: 0 !important; border-radius: 50% !important; box-shadow: inset 0 0 18px rgba(0, 0, 0, .45) !important;
  background: linear-gradient(to bottom, #0b1a33 0%, #2f5f99 18%, #9fd0ff 42%, #d9eeff 50%, #9fd0ff 58%, #2f5f99 82%, #0b1a33 100%) !important; }
.md-rx-sombra { border-radius: 50%; background: linear-gradient(90deg, rgba(4, 10, 26, .35), transparent 22%, transparent 78%, rgba(4, 10, 26, .35)) !important; }
.md-rx-cinta { color: #0b1a33; grid-template-rows: 1fr 1.3fr 1fr !important; }
.md-rx-cinta .md-rx-otra { color: #dbeeff !important; opacity: .55 !important; width: 46% !important; }
.md-rx-placa { left: 18% !important; right: 18% !important; top: 60% !important; border: 0 !important; background: rgba(4, 10, 26, .78) !important; color: #fff !important; box-shadow: 0 2px 10px rgba(0, 0, 0, .45) !important; }
.md-rx-placa b { color: #fff !important; }
.md-rx-placa small { color: #8ff0c4 !important; }
.md-centro-relax .md-rx-cinta .md-centro-fig { margin-top: -22px; }
.md-centro-relax > .md-rx-ir { position: absolute; bottom: 8%; left: 50%; transform: translateX(-50%); z-index: 3; }
.md-rx-x { top: 6% !important; right: 14% !important; z-index: 3; }
/* Molda: un poco más de aire — el círculo más abajo del título y el tempo más abajo de los botones */
.md-zona-anillo { margin-top: 14px !important; }
.md-control .bpm-box .valor, .md-control .bpm-box .slider { margin-top: 6px; }
@media (max-width: 640px) {
  .md-zona-anillo { margin-top: 16px !important; }
  .md-control { row-gap: 16px !important; }
  .md-control .bpm-box .valor, .md-control .bpm-box .slider { margin-top: 4px !important; }
}
/* Molda: en el tablero, arriba calorías · grasa · pesos y debajo los controles del pulso */
.md-control .md-result-ctl { grid-row: 1 !important; margin: -14px -14px 6px !important; border-top: 0 !important; border-bottom: 1px solid rgba(175, 228, 255, .25); padding-top: 0 !important; }
.md-control > #md-play, .md-control > #stop, .md-control > .bpm-box, .md-control > .tb-opciones { grid-row: 2 !important; }
@media (max-width: 640px) {
  .md-control .md-result-ctl { grid-row: 1 !important; margin: -10px -10px 4px !important; }
  .md-control #md-play, .md-control #stop, .md-control .tb-opciones, .md-control [data-son-ctl] { grid-row: 2 !important; }
  .md-control .bpm-box .valor, .md-control .bpm-box .slider { grid-row: 3 !important; }
}

/* Molda: el círculo en reposo tiene páginas (‹ ›): 1 el primer ejercicio, 2 el carrusel de relax */
.md-pag { position: absolute; top: 50%; z-index: 4; width: 30px; height: 30px; margin-top: -15px; padding: 0; display: grid; place-items: center; border-radius: 50%; border: 1px solid rgba(175, 228, 255, .5); background: rgba(4, 10, 26, .55); color: #dff3ff; cursor: pointer; box-shadow: 0 0 10px rgba(95, 178, 255, .35); }
.md-pag:hover { transform: none !important; background: rgba(95, 178, 255, .25); }
.md-pag svg { width: 16px; height: 16px; }
.md-pag.izq { left: 17%; }
.md-pag.der { right: 17%; }
.md-pag-puntos { position: absolute; left: 50%; bottom: 19%; transform: translateX(-50%); z-index: 4; display: flex; gap: 6px; pointer-events: none; }
.md-pag-puntos i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, .3); }
.md-pag-puntos i.on { background: #8fd3ff; box-shadow: 0 0 6px rgba(143, 211, 255, .9); }
.md-pag-entra-der { animation: mdPagDer .3s ease-out; }
.md-pag-entra-izq { animation: mdPagIzq .3s ease-out; }
@keyframes mdPagDer { from { opacity: 0; translate: 30px 0; } to { opacity: 1; translate: 0 0; } }
@keyframes mdPagIzq { from { opacity: 0; translate: -30px 0; } to { opacity: 1; translate: 0 0; } }
#md-anillo { touch-action: pan-y; }
#md-anillo .md-centro { touch-action: none; }
@media (max-width: 480px) { .md-pag { width: 26px; height: 26px; margin-top: -13px; } .md-pag svg { width: 14px; height: 14px; } .md-pag.izq { left: 15%; } .md-pag.der { right: 15%; } }

/* Molda: en la preparación, el círculo del muñequito pasa del rojo transparente al azul antes del conteo */
.md-anillo .md-centro-prep .md-centro-fig { animation: mdPrep var(--prep, 7s) linear var(--prep-va, 0s) forwards; }
@keyframes mdPrep {
  from { background: rgba(255, 60, 90, .32); border-color: rgba(255, 90, 110, .75); box-shadow: 0 0 18px rgba(255, 60, 90, .45); }
  to { background: rgba(95, 178, 255, .22); border-color: rgba(143, 211, 255, .8); box-shadow: 0 0 18px rgba(95, 178, 255, .5); }
}
.md-pag-puntos { display: none !important; }
/* Molda: los pulsadores ‹ › del círculo, sin círculo: solo la flecha en color, palpitando */
.md-pag, .md-pag:hover { border: 0 !important; background: none !important; box-shadow: none !important; color: #ffb547; width: 34px; height: 44px; margin-top: -22px; }
.md-pag svg { width: 30px !important; height: 30px !important; filter: drop-shadow(0 0 5px rgba(255, 181, 71, .85)); animation: mdPagLate 1.1s ease-in-out infinite; }
.md-pag.izq svg { transform-origin: 70% 50%; }
.md-pag.der svg { transform-origin: 30% 50%; }
@keyframes mdPagLate { 0%, 100% { opacity: .55; transform: scale(.9); } 50% { opacity: 1; transform: scale(1.12); } }
@media (max-width: 480px) { .md-pag { width: 28px; height: 40px; margin-top: -20px; } .md-pag svg { width: 26px !important; height: 26px !important; } }

/* Molda: la preparación colorea el disco del círculo (no el del muñequito): rojo transparente → azul */
.md-anillo .md-centro-prep .md-centro-fig { animation: none !important; }
.md-pista.md-pista-prep { animation: mdPrepDisco var(--prep, 7s) linear var(--prep-va, 0s) forwards; }
@keyframes mdPrepDisco {
  from { fill: rgba(255, 50, 80, .30); stroke: rgba(255, 70, 100, .55); }
  to { fill: rgba(70, 160, 255, .26); stroke: rgba(120, 200, 255, .6); }
}
/* Molda: pulsadores ‹ › del círculo más pequeños */
.md-pag { width: 24px !important; height: 30px !important; margin-top: -15px !important; }
.md-pag svg { width: 18px !important; height: 18px !important; }
@media (max-width: 480px) { .md-pag { width: 20px !important; height: 26px !important; margin-top: -13px !important; } .md-pag svg { width: 15px !important; height: 15px !important; } }
/* Celular: sin las orbes que flotan en el fondo (casi no se notan y gastan batería y procesador) */
@media (max-width: 640px) { .fondo-orbes, .orbe { display: none !important; animation: none !important; } }
/* Celular: más aire entre los botones del tablero y su borde (▶ ya no roza el borde izquierdo) */
@media (max-width: 640px) {
  .md-control { padding-left: 20px !important; padding-right: 20px !important; }
  .md-control .md-result-ctl { margin-left: -20px !important; margin-right: -20px !important; }
}
/* Molda: pulsadores ‹ › del círculo con algo de transparencia */
@keyframes mdPagLate { 0%, 100% { opacity: .35; transform: scale(.9); } 50% { opacity: .7; transform: scale(1.12); } }
/* Molda (celular): los pulsadores ‹ › entre el borde del círculo y el muñequito, sin tocar ninguno */
@media (max-width: 480px) { .md-pag { width: 18px !important; } .md-pag.izq { left: 20.5% !important; } .md-pag.der { right: 20.5% !important; } }

/* Molda: el botón de modo se deja presionar sin seleccionar texto ni abrir menús */
#md-modo { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-action: manipulation; }
/* Molda: el nombre del ejercicio bajo el muñequito, más pequeño; los de varias palabras se acomodan en dos líneas */
.md-anillo .md-centro b.md-inicio-nom { font-size: 18px !important; line-height: 1.15; margin: 4px 0 0 !important; max-width: 62%; text-align: center; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 480px) { .md-anillo .md-centro b.md-inicio-nom { font-size: 15px !important; } }
.md-anillo .md-centro b.md-inicio-nom { flex: none; }
@media (max-width: 480px) { .md-anillo .md-centro-inicio .md-centro-fig { width: 96px !important; height: 96px !important; } }
.md-anillo .md-centro b.md-inicio-nom { max-width: none !important; width: 190px; font-size: 16px !important; overflow-wrap: normal; align-self: center; }
@media (max-width: 480px) { .md-anillo .md-centro b.md-inicio-nom { width: 150px; font-size: 13.5px !important; } }

/* Molda: botón de historial junto a «Pesos» y su ventana */
.md-peso-hist { display: inline-grid; place-items: center; width: 18px; height: 18px; margin-left: 3px; padding: 0; vertical-align: -4px; border: 0; background: none; color: #8fd3ff; cursor: pointer; }
.md-peso-hist svg { width: 15px; height: 15px; }
.md-peso-hist:hover { color: #fff; transform: none !important; }
.md-hp-resumen { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 10px 0; text-align: center; }
.md-hp-resumen > div { display: grid; gap: 2px; padding: 8px 4px; border-radius: 12px; border: 1px solid rgba(175, 228, 255, .25); background: rgba(95, 178, 255, .07); }
.md-hp-resumen small { font-size: 11px; color: rgba(215, 238, 255, .75); }
.md-hp-resumen b { font-size: 20px; }
.md-hp-resumen em { font-style: normal; font-size: 11px; color: rgba(215, 238, 255, .6); }
.md-hp-graf { width: 100%; height: auto; margin: 4px 0 10px; border-radius: 12px; background: rgba(4, 10, 26, .35); }
.md-hp-linea { fill: none; stroke: #8fd3ff; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.md-hp-punto { fill: #04122a; stroke: #8fd3ff; stroke-width: 1.5; }
.md-hp-meta { stroke: #39ff8c; stroke-width: 1.2; stroke-dasharray: 4 4; opacity: .8; }
.md-hp-nuevo { display: flex; align-items: flex-end; gap: 8px; margin-bottom: 10px; }
.md-hp-nuevo label { flex: 1; display: grid; gap: 4px; font-size: 12px; }
.md-hp-nuevo input { width: 100%; box-sizing: border-box; }
.md-hp-lista { max-height: 40vh; overflow: auto; }
.md-hp-sube { color: #ff6b7d; }
.md-hp-baja { color: #39ff8c; }
.md-hp-nuevo input { height: 40px; padding: 0 12px; border-radius: 12px; border: 1px solid rgba(175, 228, 255, .4); background: rgba(4, 10, 26, .55); color: #fff; font: inherit; font-size: 15px; }
.md-hp-nuevo #hp-guardar { height: 40px; padding: 0 16px; border-radius: 12px; border: 1px solid rgba(143, 211, 255, .6); background: linear-gradient(135deg, #2f7dff, #5b4bff); color: #fff; font-weight: 700; box-shadow: none; }
.md-hp-nuevo #hp-guardar:hover { transform: none !important; filter: brightness(1.1); }

/* Molda: bajo el nombre del ejercicio, la serie y las repeticiones hechas */
.md-anillo .md-centro small.md-progreso { flex: none; margin-top: 2px; font-size: 12.5px !important; letter-spacing: 0 !important; text-transform: none !important; color: #ffd34d !important; font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (max-width: 480px) { .md-anillo .md-centro small.md-progreso { font-size: 11px !important; } .md-anillo .md-centro-serie .md-centro-fig { width: 96px !important; height: 96px !important; } }
/* Molda: la serie y las repeticiones del círculo sin negrilla */
.md-anillo .md-centro small.md-progreso { font-weight: 400 !important; }

/* Molda: ventana «Tu historial» (chip del encabezado) */
.md-hs-resumen em { font-size: 10.5px !important; }
.md-hs-lista { max-height: 55vh; overflow: auto; }
.md-hs-lista li { position: relative; }

/* Molda: al borrar una sesión del historial, la fila se desvanece y arriba queda el aviso */
.md-hs-lista li.md-borrando { opacity: 0; transition: opacity .25s ease; pointer-events: none; }
.md-hs-aviso { margin: 6px 0 4px; padding: 8px 12px; border-radius: 12px; border: 1px solid rgba(255, 107, 125, .5); background: rgba(255, 107, 125, .12); color: #ffd0d6; font-size: 12.5px; }

/* Molda: peso de la máquina en el círculo (se toca para ajustarlo) y su ventana */
.md-anillo .md-centro .md-carga { flex: none; margin-top: 3px; padding: 1px 10px; border-radius: 999px; border: 1px solid rgba(255, 211, 77, .55); background: rgba(255, 211, 77, .1); color: #ffe08a; font: 400 12px var(--font); cursor: pointer; white-space: nowrap; }
.md-anillo .md-centro .md-carga:hover { transform: none !important; background: rgba(255, 211, 77, .2); }
@media (max-width: 480px) { .md-anillo .md-centro .md-carga { font-size: 11px; padding: 0 8px; } }
.md-param-kg { color: #ffe08a; }
.md-cg-paso { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 12px 0; }
.md-cg-btn { width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(175, 228, 255, .5); background: rgba(4, 10, 26, .5); color: #fff; font-size: 24px; line-height: 1; cursor: pointer; }
.md-cg-btn:hover { transform: none !important; background: rgba(95, 178, 255, .2); }
.md-cg-val { display: flex; align-items: baseline; gap: 6px; }
.md-cg-val input { width: 96px; height: 48px; text-align: center; border-radius: 12px; border: 1px solid rgba(255, 211, 77, .6); background: rgba(4, 10, 26, .55); color: #ffe08a; font: 700 24px var(--font); -moz-appearance: textfield; }
.md-cg-val input::-webkit-outer-spin-button, .md-cg-val input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.md-cg-val span { font-size: 14px; color: rgba(215, 238, 255, .8); }

/* Molda · Arma tu rutina: los ejercicios de cada zona en orden alfabético, en carrusel (deslizar o ‹ ›) */
.md-carr { position: relative; padding: 0 4px 10px; }
.md-zona-ej .md-ejs.md-ejs-carrusel { display: grid; grid-auto-flow: column; grid-template-rows: repeat(2, auto); grid-auto-columns: 132px; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 28px; padding: 4px 28px 8px; margin: 0; flex-wrap: nowrap; scrollbar-width: thin; }
.md-ej-carta { position: relative; scroll-snap-align: start; display: flex; }
.md-ej-carta .md-ej-sel { flex: 1; display: grid; justify-items: center; align-content: start; gap: 4px; min-height: 112px; padding: 8px 6px 6px; border-radius: 14px; border: 1px solid rgba(175, 228, 255, .3); background: rgba(4, 10, 26, .35); color: #fff; font: inherit; cursor: pointer; text-align: center; }
.md-ej-carta .md-ej-sel:hover { transform: none !important; background: rgba(95, 178, 255, .14); }
.md-ej-carta.on .md-ej-sel { border-color: #8fd3ff; background: linear-gradient(160deg, rgba(47, 125, 255, .45), rgba(91, 75, 255, .35)); box-shadow: 0 0 10px rgba(95, 178, 255, .35); }
.md-ej-fig { width: 54px; height: 54px; display: grid; place-items: center; color: #bfe9ff; }
.md-ej-fig svg { width: 100%; height: 100%; }
.md-ej-nom { font-size: 12px; line-height: 1.2; }
.md-ej-orden { position: absolute; top: 6px; left: 6px; min-width: 20px; height: 20px; padding: 0 4px; border-radius: 999px; background: #ffd34d; color: #1a1300; font: 700 11px/20px var(--font); font-style: normal; }
.md-ej-carta .md-ej-ojo { position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; padding: 0; }
.md-carr-fl { position: absolute; top: 50%; z-index: 2; width: 26px; height: 40px; margin-top: -25px; padding: 0; border: 0; background: none; color: #ffb547; cursor: pointer; }
.md-carr-fl:hover { transform: none !important; }
.md-carr-fl svg { width: 22px; height: 22px; filter: drop-shadow(0 0 4px rgba(255, 181, 71, .7)); }
.md-carr-fl.izq { left: 0; } .md-carr-fl.der { right: 0; }
@media (max-width: 480px) { .md-zona-ej .md-ejs.md-ejs-carrusel { grid-auto-columns: 118px; } }
.md-zonas-ej, .md-zona-ej, .md-carr { min-width: 0; max-width: 100%; }
.md-zona-ej .md-ejs.md-ejs-carrusel { width: 100%; max-width: 100%; box-sizing: border-box; }
.md-conf-caja { overflow-x: hidden; }
.md-zona-ej .md-ejs.md-ejs-carrusel { padding: 4px 24px 8px !important; scroll-padding: 0 24px; grid-auto-columns: calc((100% - 16px) / 3) !important; }
@media (max-width: 480px) { .md-zona-ej .md-ejs.md-ejs-carrusel { grid-auto-columns: calc((100% - 8px) / 2) !important; } .md-ej-fig { width: 44px; height: 44px; } .md-ej-carta .md-ej-sel { min-height: 100px; } }
/* Molda: «Rutina de hoy» muestra solo el modo elegido */
.md-rut-modo { margin: 6px 0 8px; font-weight: 700; font-size: 14px; color: #ffe08a; }
.md-rut-modo small { font-weight: 400; font-size: 11.5px; color: rgba(215, 238, 255, .7); }

/* Molda ⚙ «Parámetros del entrenamiento»: el título con los minutos al frente y debajo solo los tres botones */
.md-param-cab { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.md-param-cab .md-sec { margin: 0 !important; }
.md-min-cab { display: flex; align-items: baseline; gap: 6px; flex: none; }
.md-min-cab input { width: 64px; height: 38px; text-align: center; border-radius: 12px; border: 1px solid rgba(57, 255, 140, .5); background: rgba(4, 10, 26, .55); color: #fff; font: 700 18px var(--font); -moz-appearance: textfield; }
.md-min-cab input::-webkit-outer-spin-button, .md-min-cab input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.md-min-cab span { font-size: 13px; color: rgba(215, 238, 255, .8); }

/* Molda · Arma tu rutina: campo de peso (kg) en cada ejercicio */
.md-t-campos input.md-t-kg { border-color: rgba(255, 211, 77, .55); color: #ffe08a; }
.md-anillo .md-centro .md-carga-fija { cursor: default; }

/* Molda: «Tiempo para entrenar hoy» en pequeño junto a los minutos; aviso del calentamiento en el círculo */
.md-min-cab { align-items: center !important; }
.md-min-txt { font-size: 10.5px; line-height: 1.15; color: rgba(215, 238, 255, .75); text-align: right; max-width: 92px; }
.md-anillo .md-centro em.md-antes-cal { flex: none; margin-top: 3px; font-size: 10.5px !important; font-style: normal; color: rgba(215, 238, 255, .7) !important; }
/* Molda · Arma tu rutina: «Armar con mis N ejercicios» flota abajo mientras eliges */
.md-armar-mia:not([disabled]) { position: sticky; bottom: 10px; z-index: 5; box-shadow: 0 6px 22px rgba(0, 0, 0, .55), 0 0 14px rgba(124, 92, 250, .55); }
/* Molda ⚙ (celular): los minutos y «min» caben dentro del cuadro de parámetros */
.md-param-cab .md-sec { flex: 1 1 auto; min-width: 0; }
.md-min-cab { min-width: 0; max-width: 100%; }
@media (max-width: 480px) {
  .md-param-cab { flex-wrap: wrap; row-gap: 6px; }
  .md-param-cab .md-sec { flex-basis: 100%; }
  .md-min-cab { margin-left: auto; gap: 6px; }
  .md-min-txt { max-width: none; }
  .md-min-cab input { width: 56px; height: 34px; font-size: 16px; }
}
/* Molda: lo de adentro del círculo en reposo cabe sin salirse (muñequito más pequeño y textos juntos) */
.md-anillo .md-centro-inicio { gap: 0 !important; }
.md-anillo .md-centro-inicio .md-centro-fig { width: 128px !important; height: 128px !important; }
.md-anillo .md-centro-inicio b.md-inicio-nom { margin-top: 2px !important; }
.md-anillo .md-centro-inicio small.md-progreso { margin-top: 1px; }
.md-anillo .md-centro-inicio em.md-antes-cal { margin-top: 1px; font-size: 10px !important; }
@media (max-width: 480px) {
  .md-anillo .md-centro-inicio .md-centro-fig { width: 74px !important; height: 74px !important; }
  .md-anillo .md-centro-inicio b.md-inicio-nom { font-size: 13px !important; width: 130px; }
  .md-anillo .md-centro-inicio small.md-progreso { font-size: 10.5px !important; }
  .md-anillo .md-centro-inicio em.md-antes-cal { font-size: 9px !important; }
  .md-anillo .md-centro-inicio .md-carga { font-size: 10px; }
}
.md-anillo .md-centro-serie { gap: 0 !important; }
@media (max-width: 480px) {
  .md-anillo .md-centro-serie .md-centro-fig { width: 80px !important; height: 80px !important; }
  .md-anillo .md-centro-serie b.md-inicio-nom { font-size: 13px !important; width: 130px; }
  .md-anillo .md-centro-serie small.md-progreso { font-size: 10.5px !important; }
}

/* Molda: pausa dentro del círculo (sin ventana): ▶ para seguir y «Desertar» debajo */
.md-anillo .md-centro-pausa { gap: 0 !important; }
.md-anillo .md-centro-pausa b { font-size: 16px !important; margin: 4px 0 0 !important; }
.md-anillo .md-centro-pausa em { font-size: 11px !important; font-style: normal; color: rgba(215, 238, 255, .8) !important; }
.md-desertar-btn { flex: none; margin-top: 6px; padding: 3px 14px; border-radius: 999px; border: 1px solid rgba(255, 107, 125, .7); background: rgba(255, 60, 90, .15); color: #ffb3bd; font: 600 12px var(--font); cursor: pointer; }
.md-desertar-btn:hover { transform: none !important; background: rgba(255, 60, 90, .28); }
@media (max-width: 480px) { .md-anillo .md-centro-pausa .md-centro-fig { width: 74px !important; height: 74px !important; } .md-anillo .md-centro-pausa b { font-size: 14px !important; } .md-anillo .md-centro-pausa em { font-size: 10px !important; } .md-desertar-btn { font-size: 11px; padding: 2px 12px; } }

/* Molda · Arma tu rutina (manual): tiempo disponible y cuánto queda */
.md-arma-tiempo { display: grid; gap: 6px; margin-bottom: 10px; padding: 10px 12px; border-radius: 14px; border: 1px solid rgba(57, 255, 140, .35); background: rgba(57, 255, 140, .06); }
.md-arma-tiempo .md-min-cab { justify-content: flex-start; }
.md-arma-tiempo .md-min-txt { text-align: left; max-width: none; font-size: 12px; }
.md-quedan { font-size: 12px; line-height: 1.35; color: rgba(215, 238, 255, .85); }
.md-quedan-ok { color: #39ff8c; }
.md-quedan-pasa { color: #ff6b7d; }
/* Molda · Arma tu rutina: la cifra de lo que queda (o lo que te pasas) más grande */
.md-quedan b.md-quedan-ok, .md-quedan b.md-quedan-pasa { font-size: 17px; }

/* Molda: rueda de ⚙ a la izquierda y campana de notificaciones a la derecha */
.md-cab .md-conf { right: auto !important; left: 0 !important; }
.md-campana { position: absolute !important; right: 0; top: 50%; transform: translateY(-50%); width: 42px !important; height: 42px !important; min-width: 0 !important; padding: 0 !important; background: rgba(255, 255, 255, .14) !important; color: #fff !important; border: 1.5px solid rgba(215, 240, 255, .7) !important; }
.md-campana:hover { transform: translateY(-50%) !important; }
.md-campana svg { width: 20px; height: 20px; }
.md-campana.hay { color: #ffd34d !important; border-color: #ffd34d !important; box-shadow: 0 0 12px rgba(255, 211, 77, .55); }
.md-campana-n { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 999px; background: #ff4d6d; color: #fff; font: 700 11px/18px var(--font); text-align: center; }
@media (max-width: 640px) { .md-campana { width: 36px !important; height: 36px !important; } .md-campana svg { width: 18px; height: 18px; } .md-cab .md-campana { top: 0 !important; transform: none !important; } .md-campana:hover { transform: none !important; } }
@media (max-width: 640px) { .md-cab .md-conf { left: 0 !important; right: auto !important; } }
/* Fila bajo el círculo: modo, rutina compartida y compartir */
.md-modo-fila { display: flex; justify-content: center; align-items: center; gap: 8px; flex-wrap: wrap; }
.md-modo-fila .md-modo-btn { opacity: .75; }
.md-modo-fila .md-modo-btn.on { opacity: 1; }
.md-comp-btn.on { border-color: #39ff8c !important; color: #b9ffd6 !important; box-shadow: 0 0 10px rgba(57, 255, 140, .35); }
.md-compartir { width: 36px; height: 36px; display: grid; place-items: center; padding: 0; border-radius: 50%; border: 1px solid rgba(175, 228, 255, .5); background: rgba(4, 10, 26, .4); color: #dff3ff; cursor: pointer; }
.md-compartir:hover { transform: none !important; background: rgba(95, 178, 255, .2); }
.md-compartir svg { width: 18px; height: 18px; }
@media (max-width: 480px) { .md-modo-fila .md-modo-grande { padding: 6px 12px !important; font-size: 12px !important; } }
/* Círculo sin rutina en ese modo */
.md-anillo .md-centro-vacio { gap: 6px !important; padding: 0 18%; text-align: center; cursor: pointer; }
.md-anillo .md-centro-vacio b { font-size: 16px !important; }
.md-anillo .md-centro-vacio em { font-size: 11.5px !important; font-style: normal; color: rgba(215, 238, 255, .8) !important; }
/* Ventanas de compartir y notificaciones */
.md-cp-campo { display: grid; gap: 6px; margin: 10px 0; font-size: 12px; color: rgba(215, 238, 255, .85); }
.md-cp-campo input { height: 42px; padding: 0 12px; border-radius: 12px; border: 1px solid rgba(175, 228, 255, .45); background: rgba(4, 10, 26, .55); color: #fff; font: inherit; font-size: 15px; }
.md-cp-o { margin: 14px 0 8px; font-size: 12px; color: rgba(215, 238, 255, .7); text-align: center; }
.md-cp-estado { min-height: 18px; margin-top: 10px; font-size: 12.5px; color: #b9ffd6; overflow-wrap: anywhere; }
.md-cp-estado.error { color: #ffb3bd; }
.md-notis-lista li { display: grid; gap: 6px; }
.md-notis-lista li.nueva { border-left: 3px solid #ffd34d; }
/* Página pública de una rutina compartida */
.rc { max-width: 480px; margin: 24px auto; padding: 22px 18px; border-radius: 22px; border: 1px solid rgba(175, 228, 255, .35); background: rgba(8, 20, 48, .72); color: #fff; display: grid; gap: 10px; box-sizing: border-box; }
.rc h1 { margin: 0; font-size: 24px; }
.rc-marca { font-size: 12px; letter-spacing: 2px; text-transform: uppercase; color: #8fd3ff; }
.rc-de { margin: 0; color: #ffe08a; }
.rc-dato { margin: 0; font-size: 13px; color: rgba(215, 238, 255, .8); }
.rc-lista { margin: 4px 0 8px; padding-left: 22px; display: grid; gap: 4px; font-size: 14px; }
.rc-sec { background: rgba(255, 255, 255, .1) !important; color: #fff !important; }
.rc-nota { font-size: 12px; color: rgba(215, 238, 255, .75); }
@media (max-width: 520px) { .rc { margin: 16px; } }
/* Molda: carrusel de relax sutil, en los azules del círculo (sin el centro blanco intenso) */
.md-rx-reel { box-shadow: inset 0 0 22px rgba(0, 0, 0, .35) !important;
  background: linear-gradient(to bottom, rgba(4, 10, 26, .55) 0%, rgba(47, 95, 153, .22) 30%, rgba(95, 178, 255, .2) 50%, rgba(47, 95, 153, .22) 70%, rgba(4, 10, 26, .55) 100%) !important; }
.md-rx-sombra { background: linear-gradient(90deg, rgba(4, 10, 26, .25), transparent 25%, transparent 75%, rgba(4, 10, 26, .25)) !important; }
.md-rx-cinta, .md-centro-relax .md-rx-cinta .md-centro-fig { color: #bfe9ff !important; }
.md-rx-cinta .md-rx-otra { color: #8fb8dd !important; opacity: .4 !important; }
.md-rx-placa { background: rgba(4, 10, 26, .5) !important; border: 1px solid rgba(175, 228, 255, .28) !important; box-shadow: none !important; }
.md-rx-placa small { color: rgba(185, 255, 214, .85) !important; }
.md-centro-relax > .md-rx-ir { background: rgba(57, 255, 140, .12) !important; border: 1px solid rgba(57, 255, 140, .55) !important; color: #b9ffd6 !important; box-shadow: none !important; }
.md-modo-fila [hidden] { display: none !important; }
/* Tiempo de descanso entre ejercicios: niveles 1, 2, 3 */
.md-desc-niveles { position: relative; display: inline-flex; gap: 5px; margin-right: 2px; }
/* Línea que une los niveles con el botón de rutina: ese estado es del botón (que tendrá otras funciones) */
.md-desc-niveles::after { content: ''; position: absolute; left: 3px; right: -10px; top: -6px; height: 15px; border: 1px solid rgba(175, 228, 255, .7); border-bottom: 0; border-left: 0; border-top-right-radius: 6px; pointer-events: none; }
.md-desc-niv { width: 20px; height: 20px; min-height: 0; padding: 0; line-height: 1; border-radius: 999px; border: 1px solid rgba(175, 228, 255, .45); background: rgba(4, 10, 26, .4); color: #dff3ff; font: 700 10.5px var(--font); cursor: pointer; }
.md-desc-niv:hover { transform: none !important; background: rgba(95, 178, 255, .2); }
.md-desc-niv.on { border-color: #39ff8c; color: #b9ffd6; box-shadow: 0 0 10px rgba(57, 255, 140, .35); }
.md-desc-niv[data-tip]:hover::after, .md-desc-niv[data-tip]:focus-visible::after { white-space: normal; width: 220px; text-align: center; }

/* Molda: un solo botón de rutina; manual y compartida con un borde delgado de su color (la automática igual que siempre) */
.md-modo-fila .md-modo-btn { opacity: 1 !important; }
#md-modo[data-modo="manual"] { border: 1px solid #ffb547 !important; box-shadow: none !important; }
#md-modo[data-modo="compartida"] { border: 1px solid #39ff8c !important; box-shadow: none !important; }

/* Molda: los bombillos de las series se pueden tocar (un área más grande e invisible encima de cada uno) */
#md-anillo svg .md-punto-toque { fill: transparent; stroke: none; cursor: pointer; pointer-events: all; }
#md-anillo svg { pointer-events: none; }
#md-anillo svg .md-punto-toque { pointer-events: all; }

/* Molda · Tus datos: medidas corporales semanales */
.md-medidas { margin-top: 12px; padding-top: 10px; border-top: 1px solid rgba(175, 228, 255, .2); }
.md-med-campos { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)) !important; }
.md-med-guardar { margin: 8px 0; }
.md-med-tabla { width: 100%; border-collapse: collapse; font-size: 12.5px; margin: 6px 0; }
.md-med-tabla th { font-weight: 400; font-size: 11px; color: rgba(215, 238, 255, .7); text-align: right; padding: 3px 4px; }
.md-med-tabla td { padding: 4px; text-align: right; border-top: 1px solid rgba(175, 228, 255, .12); }
.md-med-tabla td:first-child, .md-med-tabla th:first-child { text-align: left; }
.md-med-tabla em { font-style: normal; }
.md-med-tabla em.baja { color: #39ff8c; }
.md-med-tabla em.sube { color: #ffb547; }
.md-med-tabla em.bien { color: #39ff8c; }
.md-med-tabla em.mal { color: #ffb547; }

/* Molda · medidas: historial por semana con editar y borrar */
.md-med-acc { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.md-med-hist li { display: flex; align-items: center; gap: 6px; }
.md-med-hist li > span { flex: 1; min-width: 0; display: grid; gap: 2px; }
.md-med-hist li.editando { outline: 1px solid #ffd34d; border-radius: 10px; }
.md-med-btn { flex: none; width: 32px; height: 32px; display: grid; place-items: center; padding: 0; border-radius: 50%; border: 1px solid rgba(175, 228, 255, .45); background: rgba(4, 10, 26, .4); color: #dff3ff; cursor: pointer; }
.md-med-btn:hover { transform: none !important; background: rgba(95, 178, 255, .2); }
.md-med-btn svg { width: 16px; height: 16px; }
.md-med-btn.borrar { border-color: rgba(255, 107, 125, .6); color: #ffb3bd; }
.md-hist.md-med-hist li { display: flex !important; flex-direction: row !important; align-items: center !important; text-align: left !important; gap: 8px; }
.md-hist.md-med-hist li > span { justify-items: start; }

/* Molda · ficha del ejercicio: pulsos por repetición */
.md-fi-pulsos { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 10px 0 4px; }
.md-fi-pulsos > span { font-size: 13px; color: rgba(215, 238, 255, .85); }
.md-fi-pulsos b { min-width: 28px; text-align: center; font-size: 22px; color: #ffe08a; }
.md-fi-pulsos .md-cg-btn { width: 36px; height: 36px; font-size: 20px; }
.md-fi-pulsos-nota { text-align: center; display: block; }

/* Molda: buscador de ejercicios por nombre */
.md-busca { display: flex; align-items: center; gap: 8px; margin: 8px 0 10px; padding: 0 12px; height: 40px; border-radius: 12px; border: 1px solid rgba(175, 228, 255, .4); background: rgba(4, 10, 26, .5); color: rgba(215, 238, 255, .75); }
.md-busca svg { width: 18px; height: 18px; flex: none; }
.md-busca input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; color: #fff; font: inherit; font-size: 15px; }
.md-busca:focus-within { border-color: #8fd3ff; box-shadow: 0 0 0 2px rgba(143, 211, 255, .2); }
.md-busca-res li { display: grid; gap: 2px; }

/* Molda · Arma tu rutina: nombre de la rutina e importar desde JSON */
.md-nombre-rut { display: grid; gap: 4px; margin: 10px 0 8px; font-size: 12px; color: rgba(215, 238, 255, .85); }
.md-nombre-rut input { height: 40px; padding: 0 12px; border-radius: 12px; border: 1px solid rgba(175, 228, 255, .45); background: rgba(4, 10, 26, .55); color: #fff; font: inherit; font-size: 15px; }
.md-importar { display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; margin-top: 12px; }

/* Molda: editor de rutinas propias */
.md-er-lista { list-style: none; margin: 8px 0; padding: 0; display: grid; gap: 8px; }
.md-er-lista li { padding: 10px; border-radius: 14px; border: 1px solid rgba(175, 228, 255, .25); background: rgba(4, 10, 26, .35); display: grid; gap: 6px; }
.md-er-cab { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.md-er-cab > b { flex: 1; min-width: 0; }
.md-er-acc { display: flex; gap: 4px; margin-left: auto; }
.md-er-acc button { width: 30px; height: 30px; display: grid; place-items: center; padding: 0; border-radius: 50%; border: 1px solid rgba(175, 228, 255, .45); background: rgba(4, 10, 26, .4); color: #dff3ff; cursor: pointer; font-size: 15px; }
.md-er-acc button:disabled { opacity: .3; cursor: default; }
.md-er-acc button:hover { transform: none !important; }
.md-er-acc button.borrar { border-color: rgba(255, 107, 125, .6); color: #ffb3bd; }
.md-er-acc button svg { width: 15px; height: 15px; }

/* Molda: ▶ junto al ejercicio que tiene video (se abre afuera, en YouTube) */
.md-play-ext { display: inline-grid; place-items: center; width: 26px; height: 26px; margin-left: 8px; padding: 0; vertical-align: middle; border-radius: 50%; border: 1px solid rgba(255, 77, 77, .7); background: rgba(255, 0, 0, .15); color: #ff8a8a; cursor: pointer; }
.md-play-ext:hover { transform: none !important; background: rgba(255, 0, 0, .28); }
.md-play-ext svg { width: 13px; height: 13px; }
/* Calendario del historial: verde = rutina completa, amarillo = a medias. */
.md-mes { margin: 12px 0 14px; padding: 12px; border-radius: 14px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12); }
.md-mes-cab { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.md-mes-cab b { font-size: 15px; color: #fff; }
.md-mes-fl { width: 32px; height: 32px; padding: 0; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .3); background: transparent; color: #fff; font-size: 18px; line-height: 1; cursor: pointer; }
.md-mes-grilla { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.md-mes-sem { font-size: 11px; font-weight: 700; color: rgba(255, 255, 255, .6); padding-bottom: 2px; }
.md-mes-dia { aspect-ratio: 1; min-width: 0; padding: 0; border-radius: 8px; border: 1px solid rgba(255, 255, 255, .12); background: rgba(255, 255, 255, .04); color: rgba(255, 255, 255, .85); font: 600 13px var(--font); cursor: pointer; }
.md-mes-dia.ok { background: rgba(60, 200, 120, .35); border-color: rgba(60, 200, 120, .8); color: #fff; }
.md-mes-dia.media { background: rgba(255, 196, 60, .3); border-color: rgba(255, 196, 60, .8); color: #fff; }
.md-mes-dia.hoy { outline: 2px solid #fff; outline-offset: 1px; }
.md-mes-dia.elegido { box-shadow: 0 0 0 3px rgba(120, 170, 255, .7); }
.md-mes-tot { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 10px 0 4px; font-size: 13px; color: rgba(255, 255, 255, .85); }
.md-mes-tot b { font-size: 16px; margin-right: 3px; }
.md-mes-tot .ok b { color: #5fe39a; } .md-mes-tot .falla b { color: #ff8a8a; } .md-mes-tot .media b { color: #ffd166; }
.md-mes-detalle { margin-top: 8px; }
.md-mes-detalle .md-sub-sec { text-transform: capitalize; }
/* Importar rutina: arriba en «Manual». */
.md-importar-arriba { margin: 0 0 12px; }

/* Molda: el dueño cambia el nombre de un ejercicio desde su ficha */
.md-fi-renombrar { display: inline-grid !important; vertical-align: middle; width: 28px !important; height: 28px !important; margin-left: 6px; }

/* Título de Molda: máx. 16 caracteres sobre un cuadro oscuro */
.md-cab .md-titulo#md-titulo { font-weight: 400 !important; letter-spacing: .02em; text-shadow: 0 0 10px rgba(140, 210, 255, .35); }
.md-cab .md-titulo#md-titulo { background: rgba(22, 48, 92, .42); border: 0 !important; border-radius: 12px; padding: 4px 16px 6px; text-decoration: none; white-space: nowrap; box-shadow: 0 6px 18px rgba(0, 6, 24, .2); }
@media (max-width: 640px) { .md-cab .md-titulo#md-titulo { padding: 3px 12px 5px !important; } }
/* Nombre corto en el catálogo (el que se ve en la pantalla) */
.md-corto { display: block; font-size: 10.5px; font-weight: 500; color: rgba(185, 230, 255, .7); margin-top: 1px; }

/* ▶ de inicio: botón de vidrio transparente (naranja, con borde metálico y brillo) que cubre el círculo grande y late; deja ver el muñequito y su contenido */
.md-centro-inicio.md-con-play { cursor: pointer; }
/* Con el ▶ grande, el circulito del muñequito (y lo que tiene dentro) se ve desenfocado: así no se confunde con el play */
.md-centro-inicio.md-con-play .md-centro-fig { filter: blur(3px); opacity: .85; }
.md-play-suave { position: absolute; inset: -17%; border-radius: 50%; display: grid; place-items: center; pointer-events: none; z-index: 1;
  background: radial-gradient(circle at 50% 32%, rgba(255, 185, 95, .38), rgba(255, 135, 35, .42) 52%, rgba(240, 95, 10, .7) 100%);
  box-shadow: inset 0 0 0 3px rgba(235, 242, 255, .55), inset 0 0 0 5px rgba(120, 130, 150, .35), inset 0 -14px 34px rgba(255, 130, 40, .22), 0 0 0 1px rgba(255, 255, 255, .25), 0 10px 30px rgba(0, 8, 30, .35), 0 0 22px rgba(255, 140, 50, .25);
  animation: mdPlaySuave 1.6s ease-in-out infinite; }
.md-play-brillo { position: absolute; top: 5%; left: 17%; width: 66%; height: 40%; border-radius: 50%; background: linear-gradient(180deg, rgba(255, 255, 255, .42), rgba(255, 255, 255, .04)); }
.md-play-suave svg { position: relative; width: 100%; height: 100%; fill: rgba(255, 255, 255, .6); stroke: none; filter: drop-shadow(0 2px 6px rgba(120, 40, 0, .35)); }
@keyframes mdPlaySuave { 0%, 100% { transform: scale(.98); opacity: .8; } 50% { transform: scale(1.02); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .md-play-suave { animation: none; } }

/* ===== Molda con menos botones: Inicio (casita) con panel lateral, indicadores que rotan, controles sin borde, círculo más grande ===== */
/* Bajo el círculo, mientras se entrena: una etiqueta que va cambiando (calorías → grasa → peso) */
.md-indic { display: flex; align-items: baseline; justify-content: center; gap: 7px; width: max-content; max-width: 92%; margin: 8px auto 0; padding: 6px 18px; border-radius: 999px; background: rgba(22, 48, 92, .42); color: #fff; font: 500 14px var(--font); }
.md-indic[hidden] { display: none; }
.md-indic-k { font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: rgba(200, 230, 255, .75); }
.md-indic b { font: 700 18px 'Sora', var(--font); }
.md-indic.entra { animation: mdIndicEntra .5s ease; }
@keyframes mdIndicEntra { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
/* Cuadro de los controles: sin borde, solo el fondo y una línea delgadita arriba; los bordes se funden con el fondo */
.holo.md .tb-control.md-control { border: 0 !important; border-top: 1px solid rgba(190, 230, 255, .3) !important; border-radius: 0 !important; box-shadow: none !important; outline: 0 !important;
  background: linear-gradient(180deg, rgba(25, 55, 105, .32), rgba(25, 55, 105, .14)) !important; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  padding-left: 28px !important; padding-right: 28px !important;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 26px, #000 calc(100% - 26px), transparent), linear-gradient(180deg, #000, #000 calc(100% - 16px), transparent); -webkit-mask-composite: source-in;
  mask-image: linear-gradient(90deg, transparent, #000 26px, #000 calc(100% - 26px), transparent), linear-gradient(180deg, #000, #000 calc(100% - 16px), transparent); mask-composite: intersect; }
.holo.md .tb-control.md-control::before, .holo.md .tb-control.md-control::after { display: none !important; }
/* El círculo, más grande: ya no hay botones a los lados ni debajo */
.md-zona-anillo { max-width: 560px !important; }
.md-zona-anillo .md-anillo { width: 94% !important; }
@media (max-width: 640px) { .md-zona-anillo .md-anillo { width: 96% !important; } }
/* Calorías, grasa y peso dentro del círculo, bajo las indicaciones del ejercicio */
.md-centro .md-indic { margin: 6px auto 0; padding: 3px 12px; gap: 5px; font-size: 12px; background: rgba(10, 30, 70, .45); }
.md-centro .md-indic b { font-size: 15px; }
.md-centro .md-indic-k { font-size: 9.5px; }
/* Sin el recuadro: el fondo de Molda ocupa casi de lado a lado y se desvanece hacia los extremos (sensación de unidad) */
.holo.md { border: 0 !important; box-shadow: none !important; background: none !important; backdrop-filter: none !important; -webkit-backdrop-filter: none !important; isolation: isolate; }
.holo.md::before { content: ''; position: absolute; z-index: -1; top: -48px; bottom: -48px; left: 50%; width: min(98vw, 1600px); transform: translateX(-50%); pointer-events: none;
  background: linear-gradient(135deg, rgba(130, 195, 255, .36), rgba(70, 140, 230, .22) 48%, rgba(120, 185, 255, .3));
  backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 16%, #000 84%, transparent), linear-gradient(180deg, transparent, #000 70px, #000 calc(100% - 70px), transparent); -webkit-mask-composite: source-in;
  mask-image: linear-gradient(90deg, transparent, #000 16%, #000 84%, transparent), linear-gradient(180deg, transparent, #000 70px, #000 calc(100% - 70px), transparent); mask-composite: intersect; }
@media (max-width: 640px) { .holo.md::before { width: 100vw; top: -24px; bottom: -24px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent), linear-gradient(180deg, transparent, #000 40px, #000 calc(100% - 40px), transparent);
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent), linear-gradient(180deg, transparent, #000 40px, #000 calc(100% - 40px), transparent); } }
body.md-video-on .holo.md { background: none !important; }
body.md-video-on .holo.md::before { background: rgba(12, 40, 90, .92); }
/* El fondo de Molda sale del ancho de la tarjeta: nunca debe crear barra de desplazamiento horizontal */
html:has(.holo.md), html:has(.holo.md) body { overflow-x: clip; }

/* ===== Inicio: barra vertical de íconos bajo la casita; lo de atrás se desenfoca con viñeta oscura ===== */
.holo.md { position: relative; }
.md-inicio-velo { position: fixed; inset: 0; z-index: 880; backdrop-filter: blur(7px); -webkit-backdrop-filter: blur(7px);
  background: radial-gradient(120% 95% at 50% 75%, transparent 38%, rgba(0, 6, 22, .55) 80%, rgba(0, 4, 16, .85) 100%), linear-gradient(180deg, rgba(0, 6, 22, .5), transparent 32%);
  animation: mdVeloEntra .25s ease; }
.md-inicio-velo[hidden] { display: none; }
@keyframes mdVeloEntra { from { opacity: 0; } to { opacity: 1; } }
.holo.md.md-ini-on .md-conf { z-index: 901; } /* la casita queda en su sitio, encima de la barra y sobre el desenfoque */
.md-inicio { position: absolute; z-index: 900; top: 78px; left: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 6px;
  border-radius: 999px; background: linear-gradient(180deg, rgba(34, 52, 120, .95), rgba(18, 30, 78, .95)); box-shadow: 0 12px 34px rgba(0, 6, 24, .55), inset 0 1px 0 rgba(255, 255, 255, .12);
  opacity: 0; visibility: hidden; transform: translateY(-10px) scale(.96); transform-origin: top center; transition: opacity .22s ease, transform .22s ease, visibility 0s linear .22s; }
.md-inicio.abierto { opacity: 1; visibility: visible; transform: none; transition: opacity .22s ease, transform .22s ease; }
.md-ini-item { position: relative; }
.md-ini-btn { width: 42px; height: 42px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: transparent; color: #e8f2ff; cursor: pointer; transition: background .2s ease, color .2s ease; }
.md-ini-btn svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.md-ini-btn:hover { background: rgba(255, 255, 255, .1); transform: none !important; }
.md-ini-btn.on { background: #fff; color: #1b2a6b; }
/* Lo que se abre de lado: una píldora verde unida al ícono con una línea y un punto */
.md-ini-lado { position: absolute; left: calc(100% + 40px); top: 50%; display: flex; align-items: center; gap: 8px; padding: 7px 10px; white-space: nowrap; border-radius: 999px;
  background: linear-gradient(180deg, #17a876, #0f8c62); box-shadow: 0 10px 28px rgba(0, 30, 20, .45), inset 0 1px 0 rgba(255, 255, 255, .2); color: #fff;
  opacity: 0; visibility: hidden; transform: translate(-12px, -50%); transition: opacity .22s ease, transform .22s ease, visibility 0s linear .22s; }
.md-ini-lado::before { content: ''; position: absolute; right: 100%; top: 50%; width: 32px; height: 1.5px; margin-right: 4px; background: rgba(230, 245, 255, .85); }
.md-ini-lado::after { content: ''; position: absolute; right: calc(100% + 32px); top: 50%; width: 6px; height: 6px; margin: -2px 2px 0 0; border-radius: 50%; background: #fff; }
.md-ini-btn.on + .md-ini-lado { opacity: 1; visibility: visible; transform: translate(0, -50%); transition: opacity .22s ease, transform .22s ease; }
.md-ini-info { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: rgba(0, 40, 25, .55); color: #b8ff9a; cursor: help; }
.md-ini-info svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.md-ini-info[data-tip]:hover::after, .md-ini-info[data-tip]:focus-visible::after { white-space: normal; width: 240px; left: 0; transform: none; text-align: left; }
.md-ini-lado .md-modo-fila { display: flex !important; align-items: center; gap: 8px; margin: 0 !important; flex-wrap: nowrap !important; }
.md-ini-lado .md-modo-fila .md-modo-grande { order: 0; flex: none; padding: 6px 14px !important; border-radius: 999px !important; border: 0 !important; background: rgba(0, 50, 32, .5) !important; color: #fff !important; font: 500 14px var(--font) !important; box-shadow: none !important; opacity: 1 !important; }
.md-ini-lado .md-desc-niveles { order: 1; gap: 6px; margin: 0; }
.md-ini-lado .md-desc-niveles::after, .md-ini-lado .md-desc-niveles::before { display: none !important; content: none; }
.md-ini-lado .md-desc-niv { width: 28px; height: 28px; border: 0; background: rgba(0, 50, 32, .5); color: #d9ffe9; font: 500 13px var(--font); }
.md-ini-lado .md-desc-niv.on { background: #fff; color: #0f8c62; box-shadow: none; }
.md-ini-lado .md-desc-niv[data-tip]:hover::after { left: 50%; transform: translateX(-50%); }
.md-ini-lado .md-compartir { order: 2; width: 30px; height: 30px; border: 0; background: rgba(0, 50, 32, .5); }
.md-ini-lado .md-compartir svg { width: 16px; height: 16px; }
/* Progreso físico: la misma píldora con calorías, grasa y pesos */
.md-ini-prog .md-result { display: flex !important; align-items: center; gap: 6px !important; margin: 0 !important; padding: 0 !important; border: 0 !important; }
.md-ini-prog .md-result > div { display: flex !important; flex-direction: row !important; align-items: baseline !important; gap: 5px !important; padding: 5px 12px !important; border-radius: 999px !important; border: 0 !important; background: rgba(0, 50, 32, .5) !important; min-height: 0 !important; box-shadow: none !important; }
.md-ini-prog .md-result small { font: 600 10.5px var(--font) !important; letter-spacing: .06em; color: rgba(220, 255, 236, .8) !important; display: inline-flex; align-items: center; gap: 4px; }
.md-ini-prog .md-result b { font: 700 16px 'Sora', var(--font) !important; }
.md-ini-prog .md-result em { font-size: 11px !important; color: rgba(220, 255, 236, .8) !important; }
.md-ini-prog .md-peso-hist { color: #d9ffe9; }
/* En celular: la píldora no cabe de lado completa; se acomoda en dos filas debajo del ícono */
@media (max-width: 640px) {
  .md-inicio { top: 60px; }
  .md-ini-lado { left: calc(100% + 26px); white-space: normal; flex-wrap: wrap; max-width: calc(100vw - 110px); border-radius: 22px; }
  .md-ini-lado::before { width: 18px; }
  .md-ini-lado::after { right: calc(100% + 18px); }
  .md-ini-lado .md-modo-fila, .md-ini-prog .md-result { flex-wrap: wrap !important; }
}
/* Indicador de progreso dentro del círculo: más abajo, letras verde neón sobre un vidrio sin borde */
.md-centro .md-indic { margin-top: 16px !important; border: 0 !important; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14) !important; background: rgba(255, 255, 255, .07) !important; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); color: #39ff8c !important; text-shadow: 0 0 8px rgba(57, 255, 140, .55); }
.md-centro .md-indic b, .md-centro .md-indic .md-peso-act, .md-centro .md-indic .md-peso-est, .md-centro .md-indic .md-peso-bar { color: #39ff8c !important; }
.md-centro .md-indic-k { color: rgba(120, 255, 175, .85) !important; }
/* El indicador de progreso tiene siempre el mismo tamaño (en serie, conteo y descanso) */
.md-anillo .md-centro .md-indic { font-size: 13px !important; padding: 4px 14px !important; line-height: 1 !important; }
.md-anillo .md-centro .md-indic b { font: 800 30px/1 'Sora', var(--font) !important; margin: 0 !important; }
.md-anillo .md-centro .md-indic .md-indic-k { font-size: 9.5px !important; }
@media (max-width: 480px) { .md-anillo .md-centro .md-indic b { font-size: 22px !important; } }
/* En celular el indicador de progreso es más compacto para que siempre quede dentro del círculo */
@media (max-width: 480px) {
  .md-anillo .md-centro .md-indic { margin-top: 8px !important; padding: 3px 10px !important; gap: 4px !important; max-width: 86%; white-space: nowrap; font-size: 11px !important; }
  .md-anillo .md-centro .md-indic b { font-size: 18px !important; }
  .md-anillo .md-centro .md-indic .md-indic-k { font-size: 8.5px !important; }
}
/* Pie de la pantalla de Molda */
.md-pie { margin: 6px 0 0; text-align: center; font: 400 11.5px var(--font); letter-spacing: .18em; text-transform: uppercase; color: rgba(205, 232, 255, .55); }
.md-pie b { font-weight: 700; color: rgba(225, 242, 255, .8); }
/* Zona invisible sobre cada punto de la línea de afuera: al pasar el mouse dice qué es */
.md-meta-toque { fill: transparent; stroke: none; pointer-events: all; cursor: help; }
/* Botón de video dentro del círculo (solo si el ejercicio tiene video) */
.md-vid-btn { display: inline-flex; align-items: center; gap: 6px; margin: 8px auto 0; padding: 4px 12px 4px 9px; border: 0; border-radius: 999px; background: rgba(255, 255, 255, .08); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14); color: #e8f4ff; font: 500 12px var(--font); cursor: pointer; }
.md-vid-btn:hover { background: rgba(255, 255, 255, .16); transform: none !important; }
.md-vid-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; }
.md-vid-btn svg .lleno { fill: currentColor; stroke: none; }
@media (max-width: 480px) { .md-vid-btn { margin-top: 5px; padding: 3px 10px 3px 8px; font-size: 11px; } .md-vid-btn svg { width: 17px; height: 17px; } }
/* El video sobre la pantalla: sin recuadro, fondo oscuro desenfocado */
.md-vid-pantalla { background: rgba(0, 6, 20, .72) !important; }
.md-vid-marco { position: relative; width: min(960px, 94vw); text-align: center; color: #dff3ff; }
.md-vid-marco iframe { display: block; width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; border-radius: 16px; box-shadow: 0 20px 60px rgba(0, 0, 0, .55); background: #000; }
.md-vid-marco p { margin: 10px 0 0; font: 500 14px var(--font); opacity: .85; }
.md-vid-marco .md-x { position: absolute; top: -46px; right: 0; }
/* En celular: el botón de video solo con su ícono y el muñequito un poco más pequeño, para que todo quepa dentro del círculo */
@media (max-width: 480px) {
  .md-vid-btn { padding: 4px 8px; margin-top: 4px; }
  .md-vid-btn span { display: none; }
  .md-anillo .md-centro:has(.md-vid-btn) .md-centro-fig { width: 68px !important; height: 68px !important; }
}
.md-centro .md-vid-btn svg { width: 20px !important; height: 20px !important; flex: none; position: static !important; }
.md-vid-marco .md-x { top: 10px !important; right: 10px !important; z-index: 2; background: rgba(0, 0, 0, .55) !important; color: #fff !important; }
@media (max-width: 480px) { .md-centro .md-vid-btn svg { width: 17px !important; height: 17px !important; } }

/* Ningún modal de Molda tiene borde: el fondo se desvanece hacia los extremos (el contenido no se corta) */
.md-modal .md-modal-caja { border: 0 !important; outline: 0 !important; box-shadow: none !important; backdrop-filter: none !important; -webkit-backdrop-filter: none !important;
  border-radius: 26px !important;
  padding-left: max(30px, 6%) !important; padding-right: max(30px, 6%) !important; padding-top: 34px !important; padding-bottom: 30px !important; }
.md-modal .md-modal-caja .md-x { top: 16px; right: 16px; }
@media (max-width: 640px) { .md-modal .md-modal-caja { padding-left: 22px !important; padding-right: 22px !important; padding-top: 28px !important; } .md-modal .md-modal-caja .md-x { top: 10px; right: 10px; } }

/* Todos los modales de Molda: vidrio transparente, sin borde ni sombra marcada (se funden con el fondo) */
.md-modal .md-modal-caja { background: linear-gradient(160deg, rgba(150, 200, 255, .16), rgba(90, 140, 230, .1)) !important; backdrop-filter: blur(22px) saturate(140%) !important; -webkit-backdrop-filter: blur(22px) saturate(140%) !important;
  box-shadow: 0 0 70px 24px rgba(40, 90, 170, .16) !important; border: 0 !important; outline: 0 !important; }

/* Reiniciar el plan (en «Tu plan») */
.md-plan-reinicio { display: block; margin: 14px auto 0; padding: 7px 16px; border-radius: 999px; border: 0; background: rgba(255, 107, 125, .16); color: #ffb3bd; font: 600 12.5px var(--font); cursor: pointer; }
.md-plan-reinicio:hover { background: rgba(255, 107, 125, .28); transform: none !important; }
/* «Arma tu rutina manual»: vista previa del ejercicio (muñequito al tempo, descripción y clic) */
.md-sel-prev { display: flex; gap: 12px; align-items: flex-start; margin: 8px 0 10px; padding: 8px; border-radius: 14px; background: rgba(255, 255, 255, .05); }
.md-sel-fig { flex: none; width: 84px; height: 84px; display: grid; place-items: center; border-radius: 12px; background: rgba(10, 30, 70, .35); color: #cfeaff; }
.md-sel-fig svg { width: 76px; height: 76px; }
.md-sel-prev-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; text-align: left; }
.md-sel-desc { margin: 0; font-size: 12px; line-height: 1.35; color: rgba(225, 240, 255, .85); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.md-sel-prev.abierta .md-sel-desc { -webkit-line-clamp: unset; display: block; }
.md-sel-mas { align-self: flex-start; padding: 0; border: 0; background: none; color: #7fd4ff; font: 600 11.5px var(--font); cursor: pointer; }
.md-sel-modo { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.md-sel-modo > button[data-prev-ver] { padding: 4px 10px; border-radius: 999px; border: 0; background: rgba(255, 255, 255, .08); color: #dff3ff; font: 500 11.5px var(--font); cursor: pointer; }
.md-sel-modo > button[data-prev-ver].on { background: #39ff8c; color: #06301a; }
.md-sel-modo small { font-size: 11px; color: rgba(215, 238, 255, .7); }
.md-sel-son { width: 28px; height: 28px; display: grid; place-items: center; padding: 0; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .08); color: #dff3ff; cursor: pointer; }
.md-sel-son svg { width: 17px; height: 17px; }
.md-sel-son[aria-pressed="true"] { background: #39ff8c; color: #06301a; }
@media (max-width: 480px) { .md-sel-prev { flex-direction: column; align-items: center; } .md-sel-prev-txt { width: 100%; } }

/* Favorito (de cada persona) y Recomendable (del administrador, para todos) */
.md-sel-acc { display: inline-flex; align-items: center; gap: 6px; }
.md-sel-fav, .md-sel-rec { display: inline-flex; align-items: center; gap: 5px; height: 30px; min-width: 30px; justify-content: center; padding: 0 7px; border-radius: 999px; border: 0; background: rgba(255, 255, 255, .08); color: #dff3ff; font: 600 11px var(--font); cursor: pointer; }
.md-sel-fav svg, .md-sel-rec svg, .md-rec-insignia svg, .md-fav-marca svg, .md-fav-fila small svg, .md-fav-tit svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; flex: none; }
.md-sel-fav.on { background: rgba(255, 211, 77, .2); color: #ffd34d; }
.md-sel-fav.on svg { fill: currentColor; }
.md-sel-rec.on { background: #39ff8c; color: #06301a; }
.md-sel-fav:hover, .md-sel-rec:hover { transform: none !important; filter: brightness(1.15); }
.md-rec-insignia { display: inline-flex; align-items: center; gap: 4px; margin-left: 6px; padding: 2px 8px 2px 5px; border-radius: 999px; background: rgba(57, 255, 140, .14); color: #7dffb4; font: 600 10.5px var(--font); vertical-align: middle; }
.md-fav-marca { display: inline-flex; margin-left: 5px; color: #ffd34d; vertical-align: middle; }
.md-fav-marca svg { fill: currentColor; }
.md-fav-fila { margin: 10px 0 12px; text-align: left; }
.md-fav-fila > small { display: inline-flex; align-items: center; gap: 5px; margin-bottom: 6px; color: #ffd34d; font: 600 11.5px var(--font); }
.md-fav-chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.md-fav-chip { flex: none; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 7px 12px; border-radius: 14px; border: 0; background: rgba(255, 211, 77, .1); color: #fff; font: 500 11px var(--font); text-align: left; cursor: pointer; }
.md-fav-chip b { font: 600 12.5px var(--font); }
.md-fav-chip span { color: rgba(255, 226, 150, .85); }
.md-fav-chip.on { opacity: .5; cursor: default; }
.md-fav-tit { display: flex; align-items: center; gap: 6px; margin: 6px 0 4px; color: #ffd34d; font: 600 13px var(--font); text-align: left; }
.md-fav-lista li { position: relative; padding-right: 44px; }
.md-fav-lista .md-sel-fav { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); }
/* Ficha de «Tu selección» contraída con el ojito: queda solo el nombre y un resumen */
.md-sel-ojo { display: inline-grid; place-items: center; width: 30px; height: 30px; padding: 0; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .08); color: #dff3ff; cursor: pointer; }
.md-sel-ojo svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.md-sel-ojo:hover { transform: none !important; filter: brightness(1.2); }
.md-sel-resumen { display: none; }
.md-sel-ej.cerrada > :not(.md-sel-cab):not(.md-sel-resumen) { display: none !important; }
.md-sel-ej.cerrada .md-sel-resumen { display: block; margin-top: 4px; font-size: 11.5px; color: rgba(215, 238, 255, .75); text-align: left; }
.md-sel-ej.cerrada .md-sel-ojo { color: #7fd4ff; }
/* «Tu selección» por secciones (Calentamiento, Ejercicios, Enfriamiento) */
.md-sel-sec { margin: 12px 2px 6px; font: 700 11px var(--font); letter-spacing: .1em; text-transform: uppercase; color: #ffb36b; text-align: left; }
.md-sel-sec:first-child { margin-top: 2px; }
/* El ojito, sin círculo ni borde */
.md-sel-ej .md-sel-ojo { width: 26px !important; height: 26px !important; background: none !important; border: 0 !important; box-shadow: none !important; outline: 0; border-radius: 0 !important; }

/* Días de entrenamiento (Arma tu rutina manual) */
.md-dias-ent { margin: 10px 0 12px; text-align: left; }
.md-dias-ent > small:first-child { display: block; margin-bottom: 6px; font: 600 11.5px var(--font); color: rgba(215, 238, 255, .85); }
.md-dias-ent > div { display: flex; gap: 6px; flex-wrap: wrap; }
.md-dias-ent button { width: 34px; height: 34px; padding: 0; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .08); color: #dff3ff; font: 600 13px var(--font); cursor: pointer; }
.md-dias-ent button.on { background: #39ff8c; color: #06301a; }
.md-dias-ent .md-nota { display: block; margin-top: 6px; }
/* Calendario de rutinas (al tocar el título) */
.md-cal-rut .md-modal-caja { width: min(560px, 100%); }
.md-crt-modo { justify-content: center; margin: 4px 0 10px; }
.md-crt-grilla { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.md-crt-grilla .md-mes-sem { font: 700 11px var(--font); color: rgba(215, 238, 255, .55); text-align: center; }
.md-crt-grilla .md-mes-sem.ent { color: #39ff8c; }
.md-crt-dia { min-height: 54px; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 2px; padding: 5px 2px; border-radius: 10px; border: 0; background: rgba(255, 255, 255, .04); color: rgba(220, 238, 255, .6); font: 600 12px var(--font); cursor: pointer; overflow: hidden; }
.md-crt-dia:disabled { cursor: default; opacity: .55; }
.md-crt-dia small { font: 500 9px/1.15 var(--font); color: #fff; text-align: center; word-break: break-word; }
.md-crt-dia.entreno { background: rgba(95, 178, 255, .16); color: #fff; }
.md-crt-dia.ok { background: rgba(57, 255, 140, .2); }
.md-crt-dia.falla { background: rgba(255, 107, 125, .18); }
.md-crt-dia.hoy { box-shadow: inset 0 0 0 2px #ffd34d; }
.md-crt-dia.sel { box-shadow: inset 0 0 0 2px #7fd4ff; }
.md-crt-dia:hover:not(:disabled) { transform: none !important; filter: brightness(1.2); }
.md-crt-ley { margin: 8px 0 0; font-size: 11px; color: rgba(215, 238, 255, .7); text-align: left; }
.md-crt-ley span { display: inline-flex; align-items: center; gap: 4px; margin-right: 10px; }
.md-crt-ley span::before { content: ''; width: 10px; height: 10px; border-radius: 3px; }
.md-crt-ley .ok::before { background: rgba(57, 255, 140, .6); } .md-crt-ley .falla::before { background: rgba(255, 107, 125, .6); } .md-crt-ley .hoy::before { box-shadow: inset 0 0 0 2px #ffd34d; }
.md-crt-acc { margin-top: 12px; padding: 10px 12px; border-radius: 14px; background: rgba(255, 255, 255, .06); text-align: left; font-size: 13px; }
.md-crt-acc b:first-child { text-transform: capitalize; }
.md-crt-btns { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; }
.md-crt-hoy { background: #39ff8c !important; color: #06301a !important; }
.md-crt-cambio { display: flex; flex-direction: column; gap: 4px; font-size: 11.5px; color: rgba(215, 238, 255, .8); }
.md-crt-cambio select { max-width: 260px; }
@media (max-width: 480px) { .md-crt-dia { min-height: 46px; } .md-crt-dia small { font-size: 8px; } }
/* Nombre de la rutina manual, arriba y visible */
.md-nombre-arriba { display: flex; flex-direction: column; gap: 5px; margin: 6px 0 4px; text-align: left; }
.md-nombre-arriba span { font: 600 11.5px var(--font); color: rgba(215, 238, 255, .85); }
.md-nombre-arriba input { font: 600 15px var(--font); }
/* Importar rutina, descargar modelo y catálogo: botones pequeños redondos (dicen qué son al pasar el mouse) */
.md-imp-redondos { display: flex !important; justify-content: flex-end; align-items: center; gap: 8px !important; padding: 4px 0 !important; border: 0 !important; background: none !important; margin: 0 0 6px !important; }
.md-imp-btn { width: 34px; height: 34px; display: grid; place-items: center; padding: 0; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .09); color: #dff3ff; cursor: pointer; }
.md-imp-btn svg { width: 18px; height: 18px; }
.md-imp-btn:hover { background: rgba(95, 178, 255, .25); transform: none !important; }
.md-imp-btn[data-tip]:hover::after, .md-imp-btn[data-tip]:focus-visible::after { left: auto; right: 0; transform: none; }
/* Vista previa de las rutinas automáticas: la línea de series, tempo y descanso baja de renglón y no se sale */
.md-previa li { min-width: 0; }
.md-previa li > span { min-width: 0; overflow-wrap: anywhere; }
.md-previa li small.md-previa-par, .md-previa .md-previa-par { flex: 1 1 100% !important; min-width: 0; white-space: normal !important; overflow-wrap: anywhere; line-height: 1.35; }
/* «Datos de ejercicios»: cada ejercicio en su tarjeta, sin salirse de la pantalla (nombre arriba, campos y tiempo debajo) */
.md-tiempo-modal .md-reparto li { display: flex !important; flex-wrap: wrap !important; align-items: center !important; gap: 6px 8px !important; min-width: 0; max-width: 100%; box-sizing: border-box; position: relative; padding-right: 44px !important; }
.md-tiempo-modal .md-reparto li > b { flex: 1 1 100% !important; min-width: 0; white-space: normal !important; overflow-wrap: anywhere; }
.md-tiempo-modal .md-reparto li > .md-t-campos, .md-tiempo-modal .md-reparto li > .md-t-fijo { flex: 0 1 auto !important; min-width: 0; display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; white-space: normal !important; }
.md-tiempo-modal .md-reparto li > small { flex: 1 1 100% !important; min-width: 0; white-space: normal !important; overflow-wrap: anywhere; }
.md-tiempo-modal .md-reparto li .md-hist-x, .md-tiempo-modal .md-reparto li [data-tquitar] { position: absolute; top: 8px; right: 8px; margin: 0 !important; }
.md-tiempo-modal .md-modal-caja { overflow-x: hidden; }
/* Inicio → Mis rutinas manuales */
.md-mias { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.md-mias li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; padding: 10px 12px; border-radius: 14px; background: rgba(255, 255, 255, .06); text-align: left; }
.md-mias li.hoy { box-shadow: inset 0 0 0 2px #39ff8c; }
.md-mias-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 180px; }
.md-mias-txt b { font: 600 15px var(--font); color: #fff; overflow-wrap: anywhere; }
.md-mias-txt small { font-size: 11.5px; color: rgba(215, 238, 255, .75); }
.md-mias-txt i { font-style: normal; color: #39ff8c; }
.md-mias-acc { display: flex; gap: 6px; flex-wrap: wrap; }

/* Día de la semana que se está armando (borde) y días que ya tienen rutina (puntico) */
.md-dias-ent button { position: relative; user-select: none; -webkit-user-select: none; touch-action: manipulation; }
.md-dias-ent button.arma { box-shadow: 0 0 0 2px #ffd34d; }
.md-dias-ent button i { position: absolute; bottom: 3px; left: 50%; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: currentColor; }
/* Día con rutina: solo su nombre (se expande para ver los ejercicios) */
.md-rutdia { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin: 6px 0 12px; padding: 12px 14px; border-radius: 14px; background: rgba(57, 255, 140, .1); box-shadow: inset 0 0 0 1px rgba(57, 255, 140, .35); text-align: left; }
.md-rutdia > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.md-rutdia small { font: 600 10.5px var(--font); letter-spacing: .08em; text-transform: uppercase; color: #7dffb4; }
.md-rutdia b { font: 700 16px var(--font); color: #fff; overflow-wrap: anywhere; }
.md-rutdia span { font-size: 11.5px; color: rgba(215, 238, 255, .75); }
.md-arma-panel.compacta .md-sel, .md-arma-panel.compacta .md-fav-fila, .md-arma-panel.compacta .md-busca, .md-arma-panel.compacta .md-zonas-ej, .md-arma-panel.compacta .md-zona-ej, .md-arma-panel.compacta .md-check, .md-arma-panel.compacta .md-armar-mia, .md-arma-panel.compacta .md-nombre-arriba { display: none !important; }
/* Días y rutina del día, arriba (debajo de los botones de importar) */
.md-arma-panel > .md-dias-ent { margin-top: 2px; }
.md-arma-panel > .md-rutdia { margin-bottom: 14px; }

/* Arma tu rutina: «Escoge los ejercicios», pestañita de secciones y favoritos en un modal */
.md-escoge { margin: 14px 0 6px; font: 600 12px var(--font); color: rgba(215, 238, 255, .85); text-align: left; }
.md-secs-tab { display: flex; align-items: center; justify-content: space-between; width: 100%; margin: 10px 0 8px; padding: 10px 14px; border-radius: 14px; border: 0; background: rgba(255, 255, 255, .06); color: #e8f2ff; font: 600 13px var(--font); cursor: pointer; }
.md-secs-tab svg { width: 18px; height: 18px; transition: transform .2s ease; }
.md-secs-tab.on svg { transform: rotate(180deg); }
.md-secs-tab:hover { transform: none !important; background: rgba(95, 178, 255, .14); }
.md-zonas-ej[hidden] { display: none !important; }
.md-imp-fav { color: #ffd34d !important; }
.md-imp-fav svg { fill: none; stroke: currentColor; stroke-width: 1.8; }
.md-arma-panel.compacta .md-escoge, .md-arma-panel.compacta .md-secs-tab { display: none !important; }
.md-favs { list-style: none; margin: 10px 0 12px; padding: 0; display: grid; gap: 8px; }
.md-fav-op { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border-radius: 14px; border: 0; background: rgba(255, 255, 255, .06); color: #fff; text-align: left; cursor: pointer; }
.md-fav-op:hover { transform: none !important; background: rgba(255, 211, 77, .12); }
.md-fav-op.on { box-shadow: inset 0 0 0 2px #39ff8c; }
.md-fav-op-fig { flex: none; width: 52px; height: 52px; display: grid; place-items: center; border-radius: 10px; background: rgba(10, 30, 70, .35); color: #cfeaff; }
.md-fav-op-fig svg { width: 46px; height: 46px; }
.md-fav-op-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.md-fav-op-txt b { font: 600 13.5px var(--font); }
.md-fav-op-txt small { font-size: 11.5px; color: rgba(255, 226, 150, .85); }
.md-fav-op i { font-style: normal; font: 600 11px var(--font); color: #ffd34d; }
.md-fav-op.on i { color: #39ff8c; }
/* Título → ¿Qué rutina haces hoy? (solo los nombres) */
.md-elige-lista { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.md-elige-op { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; padding: 13px 16px; border-radius: 14px; border: 0; background: rgba(255, 255, 255, .07); color: #fff; font: 600 15px var(--font); text-align: left; cursor: pointer; }
.md-elige-op:hover { transform: none !important; background: rgba(95, 178, 255, .18); }
.md-elige-op.on { box-shadow: inset 0 0 0 2px #39ff8c; }
.md-elige-op i { font-style: normal; font: 700 11px var(--font); color: #39ff8c; }
/* Botón «Armar con mis ejercicios» con el resumen de tiempo */
.md-armar-mia { display: flex !important; flex-direction: column; align-items: center; gap: 3px; line-height: 1.2; }
.md-armar-tiempo { font: 500 11px var(--font); color: rgba(255, 255, 255, .85); white-space: normal; text-align: center; }
.md-armar-tiempo b { color: #b9ffd6; }
.md-armar-tiempo b.pasa { color: #ffd0d6; }
/* Editar rutina: el muñequito de cada ejercicio a su tempo (a la derecha, bajo los botones) */
.md-er-lista > li { position: relative; padding-right: 96px !important; }
.md-er-fig { position: absolute; right: 10px; top: 48px; width: 78px; display: flex; flex-direction: column; align-items: center; gap: 2px; color: #cfeaff; }
.md-er-fig svg { width: 70px; height: 70px; border-radius: 10px; background: rgba(10, 30, 70, .3); }
.md-er-fig small { font: 600 10px var(--font); color: #7dffb4; white-space: nowrap; }
@media (max-width: 420px) { .md-er-lista > li { padding-right: 76px !important; } .md-er-fig { width: 62px; } .md-er-fig svg { width: 56px; height: 56px; } }
.md-sel-ej.cerrada { cursor: pointer; }
.md-sel-ej.cerrada:hover { filter: brightness(1.12); }
.md-rutdia-acc { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.md-rutdia-quitar { color: #ffb3bd !important; font-size: 12px; }
/* Aviso breve «Guardado» */
.md-aviso-breve { position: fixed; left: 50%; bottom: 28px; z-index: 100000; transform: translateX(-50%); display: flex; align-items: center; gap: 8px; max-width: calc(100vw - 32px); padding: 10px 18px; border-radius: 999px; background: rgba(10, 70, 45, .92); color: #eafff3; font: 500 14px var(--font); box-shadow: 0 10px 30px rgba(0, 0, 0, .4); animation: mdAvisoEntra .25s ease; transition: opacity .5s ease, transform .5s ease; }
.md-aviso-breve svg { width: 20px; height: 20px; flex: none; fill: none; stroke: #39ff8c; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.md-aviso-breve.sale { opacity: 0; transform: translate(-50%, 10px); }
@keyframes mdAvisoEntra { from { opacity: 0; transform: translate(-50%, 10px); } to { opacity: 1; transform: translateX(-50%); } }
/* Fichas de «Tu selección»: nunca más anchas que su caja (el nombre y los botones se acomodan) */
.md-sel-lista, .md-sel-ej { min-width: 0; max-width: 100%; box-sizing: border-box; }
.md-sel-ej .md-sel-cab { display: flex !important; flex-wrap: wrap; align-items: flex-start; gap: 6px; min-width: 0; }
.md-sel-ej .md-sel-cab > b { flex: 1 1 140px; min-width: 0; overflow-wrap: anywhere; }
.md-sel-ej .md-sel-acc { flex-wrap: wrap; justify-content: flex-end; margin-left: auto; }
.md-sel-ej .md-sel-prev, .md-sel-ej .md-t-campos { max-width: 100%; box-sizing: border-box; }
.md-sel-ej .md-t-campos { flex-wrap: wrap; }
@media (max-width: 480px) { .md-sel-rec span { display: none; } }
/* Editores: la sección buscada con sus tarjetas (en dos filas, se desliza de lado) */
.md-er-zona { margin: 8px 0 10px; }
.md-er-cartas { display: grid; grid-auto-flow: column; grid-template-rows: repeat(2, auto); grid-auto-columns: 96px; gap: 6px; overflow-x: auto; padding: 6px 2px 8px; scroll-snap-type: x mandatory; }
.md-er-cartas .md-ej-sel:disabled { cursor: default; opacity: .9; }
/* Botón de guardar: texto largo en computador, corto en celular; en celular más pequeño */
.md-t-corto { display: none; }
@media (max-width: 640px) {
  .md-t-largo { display: none; }
  .md-t-corto { display: inline; }
  .md-armar-mia:not([disabled]), .md-armar-mia { width: auto !important; max-width: 92%; margin: 8px auto 0 !important; padding: 8px 18px !important; min-height: 0 !important; font-size: 14px !important; border-radius: 999px !important; }
  .md-armar-tiempo { font-size: 10.5px !important; }
}
/* En celular, las fichas de «Tu selección» caben siempre: menos relleno y botones más pequeños */
@media (max-width: 640px) {
  .md-sel { padding-left: 8px !important; padding-right: 8px !important; }
  .md-sel-lista { padding: 0 !important; margin: 0 !important; }
  .md-sel-ej { width: 100% !important; margin-left: 0 !important; margin-right: 0 !important; padding: 10px !important; }
  .md-sel-ej .md-sel-cab > b { font-size: 14px !important; flex-basis: 100% !important; }
  .md-sel-ej .md-sel-acc { margin-left: 0; justify-content: flex-start; }
  .md-sel-fav, .md-sel-rec, .md-sel-ojo, .md-sel-ej .md-hist-x { height: 28px !important; min-width: 28px !important; }
  .md-sel-rec span { display: none; }
}
/* ===== Arreglo de fondo: las fichas de «Tu selección» nunca se salen (en todas las pantallas) =====
   La lista y la ficha son cuadrículas: sin «minmax(0, 1fr)» la columna crece con lo que tenga dentro. */
.md-sel-lista { grid-template-columns: minmax(0, 1fr) !important; }
.md-sel-ej { grid-template-columns: minmax(0, 1fr) !important; width: 100% !important; max-width: 100% !important; box-sizing: border-box !important; margin-left: 0 !important; margin-right: 0 !important; }
.md-sel-ej > * { min-width: 0; max-width: 100%; }
.md-sel-ej .md-sel-cab { display: flex !important; flex-wrap: wrap !important; align-items: center; gap: 6px 8px; padding-right: 34px; }
.md-sel-ej .md-sel-cab > b { flex: 1 1 100% !important; min-width: 0; overflow-wrap: anywhere; }
.md-sel-ej .md-sel-acc { flex: 0 1 auto; flex-wrap: wrap; justify-content: flex-start; margin-left: 0 !important; gap: 6px; }
.md-sel-ej .md-hist-x { position: absolute !important; top: 8px !important; right: 8px !important; }
.md-sel-rec span { display: none !important; } /* «Recomendable»: solo el ícono (el nombre sale al pasar el mouse) */
.md-sel-rec { width: 30px; padding: 0 !important; }
/* El botón de guardar: compacto en todas las pantallas, con el texto corto */
.md-t-largo { display: none !important; }
.md-t-corto { display: inline !important; }
.md-armar-mia, .md-armar-mia:not([disabled]) { width: auto !important; max-width: 92%; margin: 10px auto 0 !important; padding: 8px 20px !important; min-height: 0 !important; font-size: 14px !important; border-radius: 999px !important; }
.md-armar-tiempo { font-size: 10.5px !important; }
/* «Asignar a: L M M J V S D» (Editar rutina y Notificaciones) */
.md-asig { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; margin: 8px 0 10px; text-align: left; }
.md-asig > span { font: 600 11.5px var(--font); color: rgba(215, 238, 255, .85); }
.md-asig > div { display: flex; gap: 5px; flex-wrap: wrap; }
.md-asig button { position: relative; width: 30px; height: 30px; padding: 0; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .08); color: #dff3ff; font: 600 12px var(--font); cursor: pointer; }
.md-asig button.on { background: #39ff8c; color: #06301a; }
.md-asig button i { position: absolute; bottom: 3px; left: 50%; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: currentColor; opacity: .7; }
.md-asig button:hover { transform: none !important; filter: brightness(1.2); }
/* ===== Molda: ningún contenedor se sale de su caja (zoom, ventanas angostas y celular) =====
   Los hijos de flex/grid no pueden ser más anchos que su caja y las filas de botones bajan de renglón. */
.md-modal .md-modal-caja { max-width: 100%; box-sizing: border-box; }
.md-modal .md-modal-caja :where(div, section, ul, ol, li, label, p, span, small, b, form, fieldset, details, summary) { min-width: 0; max-width: 100%; box-sizing: border-box; }
.md-modal .md-modal-caja :where(small, p, li) { overflow-wrap: anywhere; }
.md-rut-lista, .md-sel-lista, .md-mias, .md-elige-lista, .md-favs, .md-hist { grid-template-columns: minmax(0, 1fr); }
.md-rut-acc { flex-wrap: wrap; gap: 4px 12px !important; }
.md-rut-item { max-width: 100%; box-sizing: border-box; }
.md-conf-caja :where(.md-dos, .md-dos-btn, .md-conf-pie, .md-chips, .md-importar, .md-ritmo, .md-sel-modo, .md-mias-acc, .md-crt-btns, .md-rutdia-acc) { flex-wrap: wrap; }
.md-modal .md-modal-caja input:not([type="checkbox"]):not([type="radio"]):not([type="range"]) { max-width: 100%; }
/* Asignar a: día marcado (sin confirmar), botón de confirmar y en qué días quedó */
.md-asig button.pend { box-shadow: 0 0 0 2px #ffd34d; }
.md-asig .md-asig-ok { width: auto !important; height: auto !important; border-radius: 999px !important; padding: 6px 14px !important; background: #39ff8c !important; color: #06301a !important; font: 600 12px var(--font) !important; }
.md-asig .md-asig-ok.quitar { background: rgba(255, 107, 125, .2) !important; color: #ffb3bd !important; }
.md-asig-en { flex-basis: 100%; font-size: 11px; color: #7dffb4; }
.md-aviso-check { display: inline-flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 13px; color: rgba(225, 240, 255, .9); cursor: pointer; }
/* Configuración: tres botones que despliegan su contenedor (Arma tu rutina · Información · Parámetros) */
.md-conf-caja .md-caja[hidden] { display: none !important; }
.md-conf-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 6px 0 12px; }
.md-conf-tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 64px; padding: 8px 4px; border-radius: 16px; border: 0; background: rgba(255, 255, 255, .07); color: #dff3ff; font: 600 12px var(--font); cursor: pointer; text-align: center; }
.md-conf-tab i { display: grid; place-items: center; width: 26px; height: 26px; font-style: normal; }
.md-conf-tab i svg { width: 22px; height: 22px; }
.md-conf-tab:hover { transform: none !important; background: rgba(95, 178, 255, .16); }
.md-conf-tab.on { background: linear-gradient(160deg, rgba(47, 125, 255, .5), rgba(124, 92, 250, .45)); color: #fff; box-shadow: 0 0 14px rgba(124, 92, 250, .35); }
/* Arma tu rutina: catálogo (redondo) y tiempo para entrenar hoy, en la cabecera */
.md-arma-cab { display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: wrap; margin: 4px 0 10px; }
.md-arma-cab .md-arma-cat { width: 58px !important; height: 58px !important; min-height: 0 !important; padding: 0 !important; border-radius: 50% !important; display: grid !important; place-items: center; align-content: center; gap: 0 !important; }
.md-arma-cab .md-arma-cat .md-c-largo, .md-arma-cab .md-arma-cat small { display: none !important; }
.md-arma-cab .md-arma-cat .md-c-corto { display: block !important; font-size: 10px; }
.md-arma-cab .md-min-cab { margin: 0 !important; }
/* Información: tu objetivo junto a tus datos y tu plan */
.md-dos-btn .md-info-obj { flex: 1 1 0; }
.md-cal-caja-conf .md-crt-dia { min-height: 44px; }
.md-cal-completo { display: block; margin: 8px auto 0; font-size: 12px; }
/* Calendario: días de la rutina elegida (desde Mis rutinas manuales) y días con una copia propia */
.md-crt-dia.marca { box-shadow: inset 0 0 0 2px #39ff8c; }
.md-crt-dia.solo { outline: 1.5px dashed rgba(255, 211, 77, .8); outline-offset: -3px; }
/* Las palabras de los botones nunca se parten (p. ej. «Calendari-o»): bajan completas de renglón */
.md-modal .md-modal-caja button, .md-modal .md-modal-caja button * { overflow-wrap: normal !important; word-break: normal !important; hyphens: none; }
.md-mias-acc .md-boton { white-space: nowrap; padding: 8px 14px !important; }
/* Canciones: escuchar antes de elegir */
.md-canciones .md-canc { display: flex !important; align-items: center; gap: 10px; cursor: default; }
.md-canc-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; text-align: left; }
.md-canc-txt b { overflow-wrap: anywhere; }
.md-canc-play { flex: none; width: 38px; height: 38px; display: grid; place-items: center; padding: 0; border-radius: 50%; border: 1px solid rgba(175, 228, 255, .45); background: rgba(255, 255, 255, .06); color: #dff3ff; cursor: pointer; }
.md-canc-play svg { width: 18px; height: 18px; }
.md-canc-play.on { background: #39ff8c; color: #06301a; border-color: #39ff8c; }
.md-canc-play.md-canc-cargando { opacity: .6; min-height: 0; }
.md-canc-elegir { flex: none; padding: 7px 14px; border-radius: 999px; border: 0; background: linear-gradient(135deg, #4f8bff, #7c5cfa); color: #fff; font: 600 12.5px var(--font); cursor: pointer; white-space: nowrap; }
.md-canc.on .md-canc-elegir { background: rgba(57, 255, 140, .2); color: #7dffb4; }
.md-canc-play:hover, .md-canc-elegir:hover { transform: none !important; filter: brightness(1.12); }
/* En pausa: el ▶ de vidrio que late sobre el círculo, el muñequito desenfocado y «Desertar» siempre tocable */
.md-centro-pausa.md-con-play .md-centro-fig { filter: blur(3px); opacity: .85; }
.md-centro-pausa.md-con-play .md-desertar-btn { position: relative; z-index: 2; }
.md-centro-pausa.md-con-play > b, .md-centro-pausa.md-con-play > em { position: relative; z-index: 2; }
/* «Prepárate»: tocar el muñequito pausa / sigue la voz; «Ir al conteo» salta (igual en celular y computador) */
.md-centro-prep { cursor: pointer; }
.md-centro-prep.pausada .md-centro-fig { opacity: .55; }
.md-centro-prep.pausada small { color: #ffd34d !important; }
.md-ir-conteo { margin-top: 8px; padding: 6px 14px; border-radius: 999px; border: 0; background: rgba(255, 255, 255, .12); color: #fff; font: 600 12px var(--font); cursor: pointer; position: relative; z-index: 2; }
.md-ir-conteo:hover { transform: none !important; background: rgba(57, 255, 140, .25); }
@media (max-width: 480px) { .md-ir-conteo { margin-top: 5px; padding: 5px 12px; font-size: 11px; } }
@media (max-width: 480px) { .md-anillo .md-centro-prep .md-centro-fig { width: 60px !important; height: 60px !important; } }

/* ===== Video de PMN: botones redondos pequeños, solo con ícono ===== */
.intro-ctrl .intro-redondo { width: 40px; height: 40px; min-width: 0; padding: 0 !important; border-radius: 50% !important; display: grid; place-items: center; }
.intro-ctrl .intro-redondo svg { width: 20px; height: 20px; }
.intro-ctrl .intro-redondo.apagado { opacity: .55; }

/* ===== Pestaña PMN: subpestañas, artículos | visor | videos ===== */
.pmn-tabs { display: flex; justify-content: center; gap: 6px; margin: 4px auto 14px; padding: 4px; border-radius: 999px; background: var(--surface, #fff); box-shadow: var(--raise-sm, 0 2px 8px rgba(0,0,0,.08)); width: max-content; max-width: 100%; }
.pmn-tabs button { padding: 8px 18px; border-radius: 999px; border: 0; background: none; color: var(--ink-2, #334); font: 600 14px var(--font); cursor: pointer; white-space: nowrap; }
.pmn-tabs button.on { background: linear-gradient(135deg, #4f8bff, #7c5cfa); color: #fff; }
.pmn-panel { width: 100%; display: flex; flex-direction: column; align-items: center; }
.pmn-panel[hidden] { display: none !important; }
.pmn-grid { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(0, 3fr) minmax(180px, 1fr); gap: 16px; width: min(1500px, 100%); align-items: start; }
.pmn-col { min-width: 0; max-height: calc(100vh - var(--alto-barra, 70px) - 90px); overflow-y: auto; padding: 10px; border-radius: 16px; background: var(--surface, #fff); box-shadow: var(--raise-sm, 0 2px 8px rgba(0,0,0,.08)); }
.pmn-col-cab { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.pmn-col-cab h3 { margin: 0; font: 700 14px var(--font); }
.pmn-admin { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: linear-gradient(135deg, #4f8bff, #7c5cfa); color: #fff; cursor: pointer; }
.pmn-admin svg { width: 16px; height: 16px; }
.pmn-admin[hidden] { display: none; }
.pmn-lista { display: grid; gap: 8px; }
.pmn-vacio { margin: 6px 2px; font-size: 12.5px; color: var(--ink-3, #667); }
.pmn-item { position: relative; display: flex; gap: 8px; align-items: flex-start; padding: 8px; border-radius: 12px; cursor: pointer; background: rgba(79, 139, 255, .05); }
.pmn-item:hover { background: rgba(79, 139, 255, .12); }
.pmn-item.on { box-shadow: inset 0 0 0 2px #4f8bff; }
.pmn-item-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pmn-item-txt b { font: 600 12.5px/1.3 var(--font); overflow-wrap: anywhere; }
.pmn-item-txt small { font-size: 11px; color: var(--ink-3, #667); overflow-wrap: anywhere; }
.pmn-art-ico { flex: none; width: 28px; height: 28px; display: grid; place-items: center; color: #e5484d; }
.pmn-art-ico svg { width: 22px; height: 22px; }
.pmn-vids .pmn-item { flex-direction: column; }
.pmn-vid-min { width: 100%; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; background: #000; }
.pmn-vid-min img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pmn-item-acc { position: absolute; top: 6px; right: 6px; display: flex; gap: 4px; }
.pmn-redondo { width: 34px; height: 34px; display: inline-grid; place-items: center; padding: 0; border-radius: 50%; border: 0; background: rgba(15, 25, 50, .08); color: inherit; cursor: pointer; text-decoration: none; }
.pmn-redondo svg { width: 17px; height: 17px; }
.pmn-redondo.chico { width: 26px; height: 26px; background: rgba(255, 255, 255, .9); }
.pmn-redondo.chico svg { width: 14px; height: 14px; }
.pmn-redondo.rojo { color: #e5484d; }
.pmn-centro { position: relative; min-width: 0; }
.pmn-centro .intro-marco { width: 100%; }
.pmn-visor { position: absolute; inset: 0; z-index: 3; display: flex; flex-direction: column; border-radius: var(--r-lg, 18px); overflow: hidden; background: var(--surface, #fff); box-shadow: var(--raise, 0 8px 24px rgba(0,0,0,.15)); min-height: 360px; }
.pmn-visor[hidden] { display: none; }
.pmn-visor-cab { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-bottom: 1px solid rgba(0, 0, 0, .08); }
.pmn-visor-cab > div { min-width: 0; display: flex; flex-direction: column; }
.pmn-visor-cab b { font: 700 14px var(--font); overflow-wrap: anywhere; }
.pmn-visor-cab small { font-size: 12px; color: var(--ink-3, #667); }
.pmn-visor-acc { display: flex; gap: 6px; flex: none; }
.pmn-visor-cuerpo { flex: 1; min-height: 0; display: flex; flex-direction: column; background: #f4f6fa; }
.pmn-pdf, .pmn-yt { flex: 1; width: 100%; min-height: 320px; border: 0; background: #fff; }
.pmn-yt { background: #000; }
.pmn-pdf-ayuda { margin: 0; padding: 6px 10px; font-size: 11.5px; color: var(--ink-3, #667); }
.pmn-movil-tabs { display: none; }
.pmn-pronto { margin: 40px auto; padding: 30px 40px; border-radius: 20px; text-align: center; background: var(--surface, #fff); box-shadow: var(--raise-sm, 0 2px 8px rgba(0,0,0,.08)); }
/* Formularios del dueño */
.pmn-modal { position: fixed; inset: 0; z-index: 10050; display: grid; place-items: center; padding: 16px; background: rgba(2, 10, 30, .5); backdrop-filter: blur(4px); }
.pmn-modal-caja { position: relative; width: min(460px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; display: grid; gap: 10px; padding: 22px; border-radius: 18px; background: var(--surface, #fff); box-shadow: 0 20px 50px rgba(0, 0, 0, .3); }
.pmn-modal-caja h3 { margin: 0 0 4px; }
.pmn-modal-caja label { display: grid; gap: 4px; font-size: 12.5px; }
.pmn-modal-caja input { padding: 9px 10px; border-radius: 10px; border: 1px solid rgba(0, 0, 0, .15); font: inherit; }
.pmn-modal-x { position: absolute; top: 10px; right: 10px; }
.pmn-form-msg { margin: 0; min-height: 1em; font-size: 12px; color: #4f5bd5; }
.pmn-form-pie { display: flex; justify-content: flex-end; gap: 8px; }
/* En celular: el visor arriba y debajo Artículos | Videos */
@media (max-width: 900px) {
  .pmn-grid { grid-template-columns: minmax(0, 1fr); }
  .pmn-centro { order: -1; }
  .pmn-movil-tabs { display: flex; justify-content: center; gap: 6px; margin: 0 0 10px; }
  .pmn-movil-tabs button { padding: 6px 16px; border-radius: 999px; border: 1px solid rgba(79, 139, 255, .4); background: none; font: 600 13px var(--font); cursor: pointer; }
  .pmn-movil-tabs button.on { background: #4f8bff; color: #fff; border-color: #4f8bff; }
  .pmn-grid[data-lado="arts"] .pmn-vids, .pmn-grid[data-lado="vids"] .pmn-arts { display: none; }
  .pmn-col { max-height: none; }
  .pmn-movil-tabs { order: 0; }
  .pmn-col { order: 1; }
  .pmn-visor { position: relative; min-height: 70vh; }
}
/* Columnas de la pestaña PMN: del alto del reproductor, con desplazamiento por dentro; se ven unas tres miniaturas */
@media (min-width: 901px) {
  .pmn-col { height: var(--alto-visor, 480px); max-height: var(--alto-visor, 480px) !important; display: flex; flex-direction: column; overflow: hidden; box-sizing: border-box; }
  .pmn-col .pmn-lista { flex: 1; min-height: 0; overflow-y: auto; padding-right: 4px; scrollbar-width: thin; }
  .pmn-vids .pmn-item { gap: 4px; padding: 6px; }
  .pmn-vid-min { height: calc((var(--alto-visor, 480px) - 70px) / 3 - 40px); min-height: 56px; aspect-ratio: auto; }
  .pmn-vids .pmn-item-txt b { font-size: 11.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
}
/* Artículo con texto escrito en la plataforma */
.pmn-texto { flex: 1; overflow-y: auto; padding: 18px 22px; background: #fff; font: 400 15px/1.65 var(--font); color: #1f2937; }
.pmn-texto p { margin: 0 0 14px; }
.pmn-visor-modo { display: inline-flex; gap: 2px; padding: 2px; border-radius: 999px; background: rgba(15, 25, 50, .08); }
.pmn-visor-modo button { padding: 5px 12px; border-radius: 999px; border: 0; background: none; font: 600 12px var(--font); cursor: pointer; }
.pmn-visor-modo button.on { background: #4f8bff; color: #fff; }
.pmn-modal-caja textarea { padding: 9px 10px; border-radius: 10px; border: 1px solid rgba(0, 0, 0, .15); font: inherit; resize: vertical; min-height: 120px; }
/* Artículo solo con enlace: tarjeta con el botón para abrirlo */
.pmn-enlace-cuerpo { align-items: center; justify-content: center; padding: 20px; }
.pmn-enlace-tarjeta { display: flex; flex-direction: column; align-items: center; gap: 8px; max-width: 460px; text-align: center; }
.pmn-enlace-ico { width: 56px; height: 56px; display: grid; place-items: center; border-radius: 16px; background: rgba(229, 72, 77, .1); color: #e5484d; }
.pmn-enlace-ico svg { width: 30px; height: 30px; }
.pmn-enlace-tarjeta b { font: 700 16px var(--font); }
.pmn-enlace-tarjeta small { color: var(--ink-3, #667); }
.pmn-enlace-btn { display: inline-flex; align-items: center; gap: 8px; margin-top: 6px; text-decoration: none; }
.pmn-enlace-btn svg { width: 18px; height: 18px; }
/* Video de PMN en pantalla completa: ocupa toda la pantalla, centrado sobre negro */
.intro-marco.en-completa { width: 100% !important; height: 100%; display: flex; align-items: center; justify-content: center; background: #000; }
.intro-marco.en-completa video { max-height: 100vh !important; height: 100%; width: 100%; object-fit: contain; border-radius: 0 !important; }
.intro-marco.en-completa .intro-sub { bottom: 90px; font-size: clamp(18px, 2.4vw, 30px); }

/* ===== Fisiología PMN: cerebro 3D holográfico ===== */
.cb-raiz { width: min(1300px, 100%); }
.cb-escena { position: relative; width: 100%; height: min(78vh, 760px); min-height: 420px; border-radius: 22px; overflow: hidden; background: radial-gradient(ellipse at 50% 45%, #0c2a4a 0%, #071a33 55%, #040d1d 100%); box-shadow: 0 18px 50px rgba(2, 10, 30, .35); touch-action: none; }
.cb-lienzo { display: block; width: 100%; height: 100%; cursor: grab; }
.cb-lienzo:active { cursor: grabbing; }
.cb-cargando { position: absolute; inset: 0; display: grid; place-items: center; color: #bfe9ff; font: 500 14px var(--font); }
.cb-vistas, .cb-acc { position: absolute; left: 12px; display: flex; flex-wrap: wrap; gap: 6px; max-width: calc(100% - 24px); }
.cb-vistas { top: 12px; }
.cb-acc { bottom: 40px; }
.cb-vistas button, .cb-acc button, .cb-info-acc button { padding: 6px 12px; border-radius: 999px; border: 1px solid rgba(140, 210, 255, .35); background: rgba(8, 30, 60, .55); color: #dff3ff; font: 600 12px var(--font); cursor: pointer; backdrop-filter: blur(6px); }
.cb-vistas button:hover, .cb-acc button:hover, .cb-info-acc button:hover { background: rgba(60, 140, 230, .4); transform: none !important; }
.cb-acc button.on { background: #39ff8c; color: #06301a; border-color: #39ff8c; }
.cb-info { position: absolute; top: 12px; right: 12px; width: min(320px, calc(100% - 24px)); max-height: calc(100% - 70px); overflow-y: auto; padding: 14px 16px; border-radius: 16px; background: rgba(6, 22, 48, .78); backdrop-filter: blur(10px); color: #e6f4ff; box-shadow: 0 10px 30px rgba(0, 0, 0, .35); }
.cb-info[hidden] { display: none; }
.cb-info small { color: #7fd4ff; font: 600 11px var(--font); letter-spacing: .06em; text-transform: uppercase; }
.cb-info h3 { margin: 2px 0 8px; font: 700 17px var(--font); color: #ffd34d; }
.cb-info p { margin: 0 0 8px; font-size: 13px; line-height: 1.45; }
.cb-info .cb-pmn { color: #b9ffd6; }
.cb-info-acc { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.cb-x { position: absolute; top: 8px; right: 10px; border: 0; background: none; color: #cfeaff; font-size: 20px; cursor: pointer; }
.cb-ayuda { position: absolute; left: 0; right: 0; bottom: 10px; margin: 0; text-align: center; font-size: 11.5px; color: rgba(200, 230, 255, .65); pointer-events: none; }
.cb-lista-caja { margin: 12px 0 0; padding: 10px 14px; border-radius: 16px; background: var(--surface, #fff); box-shadow: var(--raise-sm, 0 2px 8px rgba(0,0,0,.08)); }
.cb-lista-caja summary { cursor: pointer; font: 700 14px var(--font); }
.cb-lista { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px 16px; margin-top: 10px; }
.cb-lista-grupo { display: flex; flex-direction: column; gap: 3px; }
.cb-lista-grupo b { font: 700 12px var(--font); filter: brightness(.75); }
.cb-lista-grupo button { text-align: left; padding: 3px 6px; border-radius: 8px; border: 0; background: none; font: 500 12.5px var(--font); color: var(--ink-2, #334); cursor: pointer; }
.cb-lista-grupo button:hover, .cb-lista-grupo button.on { background: rgba(79, 139, 255, .12); color: #1f4fd1; transform: none !important; }
.cb-credito { margin: 8px 0 0; font-size: 11px; color: var(--ink-3, #667); text-align: center; }
@media (max-width: 640px) {
  .cb-escena { height: 70vh; border-radius: 16px; }
  .cb-info { top: auto; bottom: 74px; right: 8px; left: 8px; width: auto; max-height: 45%; }
  .cb-vistas button, .cb-acc button { padding: 5px 9px; font-size: 11px; }
}
/* Cerebro 3D: botón y modo de pantalla completa */
.cb-completa { position: absolute; right: 12px; bottom: 40px; z-index: 2; width: 40px; height: 40px; display: grid; place-items: center; padding: 0; border-radius: 50%; border: 1px solid rgba(140, 210, 255, .35); background: rgba(8, 30, 60, .55); color: #dff3ff; cursor: pointer; backdrop-filter: blur(6px); }
.cb-completa svg { width: 20px; height: 20px; }
.cb-completa:hover { background: rgba(60, 140, 230, .4); transform: none !important; }
.cb-escena.cb-en-completa { height: 100vh !important; border-radius: 0; }
.cb-escena.cb-pseudo { position: fixed !important; inset: 0; z-index: 10060; height: 100dvh !important; border-radius: 0; }
/* Cerebro 3D: buscador de partes (junto a «Medial») */
.cb-busca { position: relative; display: flex; align-items: center; gap: 6px; padding: 0 10px; height: 30px; border-radius: 999px; border: 1px solid rgba(140, 210, 255, .35); background: rgba(8, 30, 60, .55); color: #dff3ff; backdrop-filter: blur(6px); }
.cb-busca svg { width: 15px; height: 15px; flex: none; }
.cb-busca input { width: 170px; border: 0; background: none; color: #fff; font: 500 12.5px var(--font); outline: none; }
.cb-busca input::placeholder { color: rgba(200, 230, 255, .6); }
.cb-busca-res { position: absolute; top: calc(100% + 6px); left: 0; z-index: 5; min-width: 240px; max-height: 300px; overflow-y: auto; margin: 0; padding: 6px; list-style: none; border-radius: 14px; background: rgba(6, 22, 48, .94); box-shadow: 0 10px 30px rgba(0, 0, 0, .4); }
.cb-busca-res[hidden] { display: none; }
.cb-busca-res button { display: flex; flex-direction: column; align-items: flex-start; width: 100%; padding: 7px 10px; border-radius: 10px; border: 0; background: none; color: #fff; font: 600 12.5px var(--font); text-align: left; cursor: pointer; }
.cb-busca-res button small { font: 500 10.5px var(--font); color: #7fd4ff; }
.cb-busca-res button:hover { background: rgba(60, 140, 230, .35); transform: none !important; }
.cb-busca-nada { padding: 8px 10px; font-size: 12px; color: rgba(200, 230, 255, .7); }
@media (max-width: 640px) { .cb-busca input { width: 120px; } }
/* Tablero en pantalla completa: el contenedor de compases crece hacia abajo para mostrarlos todos (sin barra propia) */
.tb-fijo .tb-escena:fullscreen .tb-tablero { height: auto !important; overflow: visible !important; }
.tb-fijo .tb-escena:fullscreen .linea-tiempo { overflow: visible !important; max-height: none !important; margin: 0 !important; }
.tb-escena:fullscreen { justify-content: flex-start !important; }
.tb-escena:fullscreen > .tb-tablero { margin-top: auto; }
.tb-escena:fullscreen > .tb-control { margin-bottom: auto; }
/* Tablero: botones de metrónomo y música junto al tempo (como en Molda) */
.tb-bpm-fila { display: flex; align-items: center; gap: 8px; width: 100%; }
.tb-bpm-fila .slider { flex: 1; min-width: 0; }
.tb-son-btn { flex: none; display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border-radius: 50%; border: 1.5px solid rgba(79, 139, 255, .35); background: transparent; color: var(--ink-3, #667); cursor: pointer; -webkit-touch-callout: none; user-select: none; transition: background .2s, color .2s, border-color .2s; }
.tb-son-btn svg { width: 18px; height: 18px; }
.tb-son-btn.on { border-color: var(--blue, #4f8bff); color: var(--blue, #4f8bff); background: rgba(79, 139, 255, .12); }
.holo .tb-son-btn { border-color: rgba(255, 255, 255, .35); color: rgba(255, 255, 255, .7); }
.holo .tb-son-btn.on { border-color: #fff; color: #fff; background: rgba(255, 255, 255, .12); }
.tb-son-btn:hover { transform: none !important; filter: brightness(1.15); }
/* Para hacer espacio: los botones de pulsos, compases, figuras y aleatoria más pequeños, y los registros más compactos */
.tb-control .tb-opc-btn, .tb-control #azar.tb-opc-btn { min-width: 58px !important; padding: 6px 10px !important; }
.tb-control .tb-opc-btn small { font-size: 10px; }
.tb-control .tb-opc-btn b { font-size: 16px; }
.tb-control .tb-opc-btn, .tb-control #azar.tb-opc-btn { box-shadow: 0 0 0 3px var(--cg), 0 6px 14px var(--cg) !important; }
.tb-control .holo-registros { padding: 8px 10px !important; }
.tb-control .holo-registros .holo-dato small { font-size: 9.5px; }
/* Sesión de juego: botón para cerrar */
.jg-sesion-caja { position: relative; }
.jg-sesion-x { position: absolute; top: 12px; right: 12px; width: 34px; height: 34px; display: grid; place-items: center; padding: 0; border-radius: 50%; border: 1px solid rgba(175, 228, 255, .4); background: rgba(255, 255, 255, .08); color: #dff3ff; cursor: pointer; }
.jg-sesion-x svg { width: 16px; height: 16px; }
.jg-sesion-x:hover { background: rgba(255, 255, 255, .18); transform: none !important; }

/* Botón «¡A jugar!» encendido mientras se juega (tocarlo otra vez vuelve al tablero) */
.holo .tb-menu .dd-boton.activo { color: #fff; background: rgba(95, 178, 255, .32); box-shadow: 0 0 0 1.5px rgba(150, 220, 255, .85), 0 0 16px rgba(110, 200, 255, .75); }

/* «¿Qué rutina haces hoy?»: ojito redondo al lado de cada rutina para ver sus ejercicios */
.md-elige-fila { display: flex; align-items: center; gap: 8px; min-width: 0; }
.md-elige-fila .md-elige-op { flex: 1; min-width: 0; }
.md-elige-ver { flex: none; width: 40px; height: 40px; display: grid; place-items: center; padding: 0; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .07); color: #cfeaff; cursor: pointer; }
.md-elige-ver:hover { transform: none !important; background: rgba(95, 178, 255, .2); color: #fff; }
.md-elige-ver svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; }

/* Espacio de la persona: la barra de control compacta y centrada debajo del tablero; al proyectar vuelve a ser grande */
.tb-escena > .tb-control-mini { position: relative; z-index: 30; flex: none; flex-wrap: nowrap; justify-content: center; gap: 10px; width: fit-content; max-width: 100%; margin: 12px auto 0; padding: 6px 12px; border-radius: 18px; }
.tb-control-mini .tb-herr > .btn-redondo { width: 36px; height: 36px; min-width: 36px; padding: 0; }
.tb-control-mini .tb-herr > .btn-redondo svg { width: 15px; height: 15px; }
.tb-control-mini .bpm-box { flex: 0 1 200px; min-width: 150px; }
.tb-control-mini .bpm-box .valor { font-size: 17px; line-height: 1; }
.tb-control-mini .bpm-box .valor small { font-size: 10px; }
.tb-control-mini .tb-bpm-fila { gap: 5px; }
.tb-control-mini .tb-bpm-fila .slider { min-width: 70px; }
.tb-control-mini .tb-son-btn { width: 26px; height: 26px; }
.tb-control-mini .tb-son-btn svg { width: 14px; height: 14px; }
.tb-control-mini .contador-pulso { margin-top: 4px; gap: 5px; }
.tb-control-mini .contador-pulso i { width: 7px; height: 7px; }
.tb-control-mini .tb-compas-actual { display: none; }
.tb-control-mini .tb-opciones { gap: 6px; }
.tb-control-mini .tb-opc-btn, .tb-control-mini #azar.tb-opc-btn { min-width: 44px !important; padding: 4px 7px !important; gap: 0; border-radius: 10px;
  box-shadow: 0 0 0 2px var(--cg), 0 3px 8px var(--cg) !important; }
.tb-control-mini .tb-opc-btn small { font-size: 8.5px; }
.tb-control-mini .tb-opc-btn b { font-size: 13px; }
.tb-control-mini #azar.tb-opc-btn svg { width: 14px; height: 14px; }
.tb-control-mini .tb-control-extra { flex: none; }
@media (max-width: 600px) { .tb-escena > .tb-control-mini { flex-wrap: wrap; } }
/* Cerebro en miniatura (abre los registros y la red neuronal en grande) */
.holo-cbr { position: relative; display: block; width: 58px; height: 50px; padding: 0; border: 0; border-radius: 12px; overflow: hidden; cursor: pointer;
  background: radial-gradient(circle at 50% 45%, rgba(40, 90, 170, .55), rgba(4, 14, 40, .94) 72%); box-shadow: inset 0 0 0 1px rgba(160, 220, 255, .3); }
.holo-cbr:hover { transform: none !important; box-shadow: inset 0 0 0 1px rgba(160, 220, 255, .7), 0 0 14px rgba(110, 200, 255, .55); }
.holo-cbr canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.cbr-pct { display: none; }
.holo-cbr.cbr-sin3d .cbr-pct { display: grid; position: absolute; inset: 0; place-items: center; font: 700 12px var(--font); color: #dff6ff; }
/* Ventana grande: los registros a la izquierda y la red neuronal a la derecha */
.cbr-modal { position: fixed; inset: 0; z-index: 3000; display: grid; place-items: center; padding: 16px; background: rgba(2, 10, 30, .62); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.cbr-caja { position: relative; width: min(900px, 100%); max-height: calc(100vh - 32px); overflow: auto; padding: 18px 20px 16px; border-radius: 22px; color: #fff;
  background: linear-gradient(160deg, rgba(14, 34, 78, .92), rgba(4, 12, 34, .95)); box-shadow: 0 20px 60px rgba(0, 0, 0, .5), inset 0 0 0 1px rgba(160, 220, 255, .18); }
.cbr-x { position: absolute; top: 12px; right: 12px; z-index: 2; width: 34px; height: 34px; display: grid; place-items: center; padding: 0; border-radius: 50%; border: 1px solid rgba(175, 228, 255, .4); background: rgba(255, 255, 255, .08); color: #dff3ff; cursor: pointer; }
.cbr-x:hover { transform: none !important; background: rgba(255, 255, 255, .18); }
.cbr-x svg { width: 16px; height: 16px; }
.cbr-cab small { font: 600 11px var(--font); text-transform: uppercase; letter-spacing: .08em; opacity: .75; }
.cbr-cab h2 { margin: 2px 0 10px; font: 700 20px var(--font); color: var(--cbr); text-shadow: 0 0 12px var(--cbr); }
.cbr-cuerpo { display: grid; grid-template-columns: minmax(0, 290px) minmax(0, 1fr); gap: 14px; align-items: stretch; }
.cbr-cuerpo:not(:has(.cbr-extra > *)) { grid-template-columns: minmax(0, 1fr); }
.cbr-extra:empty { display: none; }
.cbr-extra > .holo-tarjeta { min-width: 0; height: 100%; color: #fff; }
.cbr-escena { position: relative; min-height: min(52vh, 420px); border-radius: 16px; overflow: hidden; background: radial-gradient(circle at 50% 45%, rgba(40, 90, 170, .45), rgba(2, 8, 26, .9) 75%); }
.cbr-escena canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
@media (max-width: 700px) { .cbr-cuerpo { grid-template-columns: minmax(0, 1fr); } .cbr-escena { min-height: 300px; } }
.cbr-avance { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.cbr-barra { flex: 1; height: 8px; border-radius: 99px; background: rgba(255, 255, 255, .1); overflow: hidden; }
.cbr-barra i { display: block; height: 100%; border-radius: inherit; background: var(--cbr); box-shadow: 0 0 10px var(--cbr); }
.cbr-avance b { font: 700 14px var(--font); }
.cbr-detalle { margin: 6px 0 0; font-size: 13px; opacity: .85; }
.cbr-zonas-tit { margin: 12px 0 6px; font: 600 12px var(--font); opacity: .8; }
.cbr-zonas { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.cbr-zonas li { padding: 5px 11px; border-radius: 99px; font-size: 12px; background: rgba(255, 255, 255, .07); box-shadow: inset 0 0 0 1px var(--cbr); }
.cbr-credito { margin: 12px 0 0; font-size: 10.5px; opacity: .55; }
/* Registros dentro de la ventana: título, Registros | Programa, la habilidad y tres datos en columna */
.cbr-extra .holo-reg-cab { display: flex; flex-direction: column !important; align-items: flex-start; gap: 5px; }
.cbr-extra .holo-reg-titulo { display: contents; }
.cbr-extra .holo-reg-titulo .holo-rotulo { order: 0; }
.cbr-extra .holo-reg-cab .holo-swiche { order: 1; }
.cbr-extra .holo-reg-titulo .holo-que { order: 2; }
.holo-datos-lista { grid-template-columns: 1fr; gap: 9px; }
.holo-dato-prog { grid-template-columns: 20px 1fr auto; }
.holo-dato-prog b { font-size: 13px; }
.holo-dato-prog .holo-prog-barra { grid-column: 2; height: 6px; border-radius: 99px; background: rgba(255, 255, 255, .14); overflow: hidden; }
.holo-dato-prog .holo-prog-barra i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #4fdcff, #39ff8c); box-shadow: 0 0 8px rgba(80, 220, 255, .7); }
.holo-dato-prog small { grid-column: 3; grid-row: 2; font-weight: 700; opacity: 1; }
/* Botón para recoger o sacar las herramientas de la barra compacta (el cerebro queda siempre a la vista) */
.tb-herr { display: contents; }
.tb-recoger { display: none; }
.tb-control-mini .tb-herr { display: flex; align-items: center; gap: 10px; flex: none; max-width: 820px; transition: max-width .45s cubic-bezier(.2, .8, .2, 1), opacity .3s ease; }
.tb-control-mini.recogida { flex: 0 0 auto; }
.tb-control-mini.recogida .tb-herr { max-width: 0; opacity: 0; overflow: hidden; }
.tb-control-mini .tb-recoger { flex: none; display: grid; place-items: center; width: 28px; height: 28px; padding: 0; border-radius: 50%; cursor: pointer;
  border: 1px solid rgba(175, 228, 255, .45); background: rgba(255, 255, 255, .08); color: #dff3ff; box-shadow: inset 0 0 8px rgba(170, 220, 255, .15); transition: background .2s, box-shadow .2s; }
.tb-control-mini .tb-recoger:hover { transform: none !important; background: rgba(255, 255, 255, .18); box-shadow: 0 0 12px rgba(110, 200, 255, .6); }
.tb-control-mini .tb-recoger svg { width: 15px; height: 15px; transform: rotate(180deg); transition: transform .35s ease; }
.tb-control-mini.recogida .tb-recoger svg { transform: none; }
.claro .tb-control-mini .tb-recoger { border-color: rgba(79, 139, 255, .4); background: rgba(255, 255, 255, .5); color: var(--blue-deep); }
.tb-control-mini .tb-herr > * { flex: none; }
.tb-control-mini .tb-herr > .bpm-box { width: 190px; }
/* Programas por dificultad: carrusel arriba a la izquierda del tablero de grafías */
.dif-carr { position: absolute; top: 12px; left: 14px; z-index: 6; display: flex; align-items: center; gap: 6px; max-width: calc(100% - 260px); }
.dif-fl, .dif-ir { flex: none; display: grid; place-items: center; width: 28px; height: 28px; padding: 0; border-radius: 50%; cursor: pointer;
  border: 1px solid rgba(175, 228, 255, .45); background: rgba(255, 255, 255, .08); color: #dff3ff; }
.dif-fl svg { width: 14px; height: 14px; }
.dif-fl:hover:not(:disabled), .dif-ir:hover:not(:disabled) { transform: none !important; background: rgba(255, 255, 255, .18); box-shadow: 0 0 12px rgba(110, 200, 255, .55); }
.dif-fl:disabled { opacity: .35; cursor: default; }
.dif-item { min-width: 0; width: 210px; display: flex; flex-direction: column; gap: 1px; padding: 6px 12px; border-radius: 14px; cursor: help;
  background: rgba(255, 255, 255, .08); box-shadow: inset 0 0 0 1px rgba(160, 220, 255, .3); color: #fff; }
.dif-item small { font: 600 9.5px var(--font); text-transform: uppercase; letter-spacing: .06em; opacity: .7; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dif-item b { font: 700 14px var(--font); color: #9fe9ff; text-shadow: 0 0 10px rgba(120, 220, 255, .55); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dif-item span { font-size: 11px; opacity: .85; }
.dif-item.pronto b { color: #cfe3f5; text-shadow: none; }
.dif-item.pronto span { font-style: italic; opacity: .6; }
.dif-ir { width: 34px; height: 34px; border: 0; color: #fff; background: linear-gradient(135deg, #4fa8ff, #2f6fed); box-shadow: 0 0 14px rgba(80, 170, 255, .6); }
.dif-ir svg { width: 15px; height: 15px; }
.dif-ir.parar { background: linear-gradient(135deg, #ff7a8a, #e0405a); box-shadow: 0 0 14px rgba(255, 90, 110, .6); }
.dif-ir:disabled { opacity: .4; cursor: default; box-shadow: none; }
.claro .dif-fl { border-color: rgba(79, 139, 255, .4); background: rgba(255, 255, 255, .55); color: var(--blue-deep); }
.claro .dif-item { background: rgba(255, 255, 255, .6); color: var(--ink); box-shadow: inset 0 0 0 1px rgba(79, 139, 255, .25); }
.claro .dif-item b { color: var(--blue-deep); text-shadow: none; }
@media (max-width: 700px) { .dif-carr { position: static; max-width: none; margin: -50px 0 12px; } .dif-item { flex: 1; width: auto; } }
/* En una habilidad (o en un bloque del programa) el carrusel va en su propia fila, sin taparle el encabezado */
.tb-modo-hab .dif-carr { position: static; max-width: none; margin: 0 0 10px; }

/* ---------- Brújula orbital del espacio personal ---------- */
.orb-vista { position: relative; }
.orb { --orb: #4fdcff; position: relative; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 22px 16px 26px; border-radius: 28px; color: #fff; overflow: hidden;
  background: radial-gradient(circle at 25% 15%, rgba(21, 87, 153, .9), rgba(9, 44, 92, .92) 45%, rgba(4, 19, 41, .96)); border: 1px solid rgba(148, 197, 255, .22);
  box-shadow: 0 20px 50px rgba(2, 10, 26, .55), inset 0 1px 0 rgba(255, 255, 255, .12); user-select: none; -webkit-user-select: none; }
.orb-cab { align-self: stretch; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; padding: 0 6px; }
.orb-hola { margin: 0; font: 800 26px var(--font); }
.orb-sub { font-size: 14px; color: rgba(186, 230, 253, .85); }
.orb-titulo { text-align: center; max-width: 520px; min-height: 92px; }
.orb-pildora { display: inline-block; padding: 4px 12px; border-radius: 99px; font: 700 10.5px var(--font); text-transform: uppercase; letter-spacing: .08em; color: #ffd27a;
  background: rgba(14, 52, 104, .55); box-shadow: inset 0 0 0 1px rgba(148, 197, 255, .25); }
.orb-titulo h2 { margin: 6px 0 2px; font: 800 24px var(--font); color: var(--orb); text-shadow: 0 0 16px var(--orb); transition: color .4s ease; }
.orb-titulo p { margin: 0; font-size: 13px; line-height: 1.35; color: rgba(214, 236, 255, .85); }
.orb-escena { position: relative; width: min(480px, calc(100vw - 48px)); aspect-ratio: 1; touch-action: none; cursor: grab; }
.orb-escena:active { cursor: grabbing; }
.orb-anillos { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; animation: orbLatido 4s ease-in-out infinite; }
@keyframes orbLatido { 0%, 100% { transform: scale(1); opacity: .6; } 50% { transform: scale(1.03); opacity: 1; } }
.orb-nodos { position: absolute; inset: 0; }
.orb-nodo { --oc: #5fb8ff; position: absolute; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 0; border: 0; background: none; color: #e6f4ff; cursor: pointer; z-index: 2; }
.orb-nodo:hover { transform: translate(-50%, -50%) !important; }
.orb-nodo-ico { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; color: var(--oc); transition: all .3s ease;
  background: rgba(14, 52, 104, .6); box-shadow: inset 0 0 0 1px rgba(148, 197, 255, .3), 0 0 12px rgba(0, 0, 0, .25); }
.orb-nodo-ico svg { width: 21px; height: 21px; }
.orb-nodo small { padding: 2px 8px; border-radius: 99px; font: 700 10px var(--font); white-space: nowrap; background: rgba(4, 21, 45, .75); box-shadow: inset 0 0 0 1px rgba(148, 197, 255, .18); }
.orb-nodo:hover .orb-nodo-ico { box-shadow: inset 0 0 0 1px var(--oc), 0 0 14px var(--oc); }
.orb-nodo.on { z-index: 3; }
.orb-nodo.on .orb-nodo-ico { width: 56px; height: 56px; color: #0b2347; background: #fff; box-shadow: 0 0 24px rgba(255, 255, 255, .85), 0 0 0 4px rgba(125, 211, 252, .55); }
.orb-nodo.on .orb-nodo-ico svg { width: 26px; height: 26px; }
.orb-nodo.on small { color: #0b2347; background: #fff; }
.orb-nodo.pronto .orb-nodo-ico { opacity: .55; }
.orb-nucleo { position: absolute; left: 50%; top: 50%; width: 54%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; z-index: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 8%; text-align: center;
  background: radial-gradient(circle at 35% 28%, rgba(255, 255, 255, .34), rgba(255, 255, 255, .06) 34%, transparent 62%), radial-gradient(circle at 50% 70%, rgba(40, 110, 190, .75), rgba(8, 35, 80, .92) 80%);
  border: 2px solid rgba(255, 255, 255, .28); box-shadow: 0 0 55px color-mix(in srgb, var(--orb) 45%, transparent), inset 0 4px 18px rgba(255, 255, 255, .35), inset 0 -14px 28px rgba(0, 0, 0, .55); transition: box-shadow .5s ease; }
.orb-nucleo-ico { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 16px; color: var(--orb); background: rgba(255, 255, 255, .1); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25); }
.orb-nucleo-ico svg { width: 28px; height: 28px; }
.orb-nucleo b { font: 800 19px var(--font); line-height: 1.15; }
.orb-nucleo small { font-size: 11.5px; color: #ffd27a; }
.orb-ir { display: inline-flex; align-items: center; gap: 8px; margin-top: 6px; padding: 10px 20px; border-radius: 99px; border: 0; cursor: pointer; font: 800 12px var(--font); text-transform: uppercase; letter-spacing: .06em;
  color: #0b2347; background: #fff; box-shadow: 0 6px 20px rgba(0, 0, 0, .3), 0 0 18px color-mix(in srgb, var(--orb) 55%, transparent); }
.orb-ir svg { width: 14px; height: 14px; }
.orb-ir:hover:not(:disabled) { transform: scale(1.04) !important; }
.orb-ir:disabled { opacity: .55; cursor: default; }
.orb-control { display: flex; align-items: center; gap: 12px; }
.orb-fl { display: grid; place-items: center; width: 42px; height: 42px; padding: 0; border-radius: 50%; cursor: pointer; color: #fff; border: 1px solid rgba(148, 197, 255, .3); background: rgba(14, 52, 104, .55); }
.orb-fl svg { width: 18px; height: 18px; }
.orb-fl:hover { transform: none !important; background: rgba(56, 189, 248, .3); }
.orb-puntos { display: flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 99px; background: rgba(14, 52, 104, .55); box-shadow: inset 0 0 0 1px rgba(148, 197, 255, .22); }
.orb-puntos button { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 99px; background: rgba(255, 255, 255, .3); cursor: pointer; transition: all .3s ease; }
.orb-puntos button.on { width: 22px; background: var(--orb); }
.orb-ayuda { margin: 0; font-size: 11.5px; color: rgba(186, 230, 253, .7); text-align: center; }
.orb-volver { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; padding: 6px 14px; border-radius: 99px; cursor: pointer; font: 700 12px var(--font); color: #e0f2ff;
  border: 1px solid rgba(148, 197, 255, .35); background: rgba(14, 52, 104, .55); }
.orb-volver svg { width: 16px; height: 16px; }
.orb-volver:hover { transform: none !important; background: rgba(56, 189, 248, .3); }
@media (max-width: 600px) {
  .orb-hola { font-size: 21px; }
  .orb-titulo h2 { font-size: 20px; }
  .orb-nodo-ico { width: 36px; height: 36px; }
  .orb-nodo-ico svg { width: 18px; height: 18px; }
  .orb-nodo.on .orb-nodo-ico { width: 46px; height: 46px; }
  .orb-nodo small { font-size: 9px; padding: 1px 6px; }
  .orb-nucleo { width: 58%; gap: 3px; }
  .orb-nucleo-ico { width: 40px; height: 40px; }
  .orb-nucleo b { font-size: 15px; }
  .orb-ir { padding: 8px 14px; font-size: 10.5px; }
}
.orb-ir { white-space: nowrap; }
/* Brújula: sin encabezado (la dificultad del núcleo es la protagonista), más grande, opciones de alrededor apagadas
   y el cuadro con 50 % de transparencia */
.orb { background: radial-gradient(circle at 25% 15%, rgba(21, 87, 153, .45), rgba(9, 44, 92, .46) 45%, rgba(4, 19, 41, .48)); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.orb-escena { width: min(640px, calc(100vw - 48px), calc(100vh - 190px)); min-width: min(320px, calc(100vw - 48px)); }
.orb-nodo:not(.on) .orb-nodo-ico { color: color-mix(in srgb, var(--oc) 45%, rgba(200, 220, 240, .35)); background: rgba(14, 52, 104, .3); box-shadow: inset 0 0 0 1px rgba(148, 197, 255, .14); opacity: .55; }
.orb-nodo:not(.on) small { color: rgba(214, 236, 255, .32); background: transparent; box-shadow: none; font-weight: 600; }
.orb-nodo:not(.on):hover .orb-nodo-ico { opacity: .9; }
.orb-nodo:not(.on):hover small { color: rgba(214, 236, 255, .7); }
.orb-nucleo b { font-size: 24px; }
.orb-nucleo-ico { width: 62px; height: 62px; }
.orb-nucleo-ico svg { width: 32px; height: 32px; }
.orb-nucleo small { font-size: 13px; }
@media (max-width: 600px) { .orb-nucleo b { font-size: 17px; } .orb-nucleo-ico { width: 42px; height: 42px; } .orb-nucleo-ico svg { width: 22px; height: 22px; } .orb-nucleo small { font-size: 11px; } }
/* Brújula: sin borde ni sombra; el recuadro se desvanece hacia los extremos y se funde con el fondo */
.orb { border: 0; box-shadow: none; border-radius: 0; backdrop-filter: none; -webkit-backdrop-filter: none;
  background: radial-gradient(ellipse 70% 62% at 50% 50%, rgba(21, 87, 153, .45), rgba(9, 44, 92, .3) 50%, rgba(4, 19, 41, 0) 100%); }
/* Botón del núcleo: redondo tipo «power», con su texto muy pequeño debajo */
.orb-ir { flex-direction: column; gap: 5px; padding: 0; margin-top: 8px; border-radius: 0; background: none; box-shadow: none; color: #fff; text-transform: uppercase; }
.orb-ir-boton { display: grid; place-items: center; width: 58px; height: 58px; border-radius: 50%; color: #0b2347; background: #fff; transition: transform .2s ease, box-shadow .2s ease;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .35), 0 0 0 4px color-mix(in srgb, var(--orb) 35%, transparent), 0 0 22px color-mix(in srgb, var(--orb) 60%, transparent); }
.orb-ir-boton svg { width: 26px; height: 26px; }
.orb-ir:hover:not(:disabled) { transform: none !important; }
.orb-ir:hover:not(:disabled) .orb-ir-boton { transform: scale(1.08); box-shadow: 0 6px 20px rgba(0, 0, 0, .35), 0 0 0 5px color-mix(in srgb, var(--orb) 50%, transparent), 0 0 30px var(--orb); }
.orb-ir-txt { font: 700 8.5px var(--font); letter-spacing: .1em; color: rgba(224, 242, 255, .8); }
.orb-ir:disabled .orb-ir-boton { background: rgba(255, 255, 255, .35); box-shadow: none; }
@media (max-width: 600px) { .orb-ir-boton { width: 46px; height: 46px; } .orb-ir-boton svg { width: 21px; height: 21px; } .orb-ir-txt { font-size: 7.5px; } }
/* Botón power del núcleo: verde neón transparente */
.orb-ir-boton { color: #39ff8c; background: rgba(57, 255, 140, .14); border: 1.5px solid rgba(57, 255, 140, .85);
  box-shadow: 0 0 18px rgba(57, 255, 140, .55), inset 0 0 14px rgba(57, 255, 140, .3); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.orb-ir-boton svg { filter: drop-shadow(0 0 5px rgba(57, 255, 140, .9)); }
.orb-ir:hover:not(:disabled) .orb-ir-boton { background: rgba(57, 255, 140, .24); box-shadow: 0 0 28px rgba(57, 255, 140, .8), inset 0 0 16px rgba(57, 255, 140, .4); }
.orb-ir-txt { color: #8dffc0; }
.orb-ir:disabled .orb-ir-boton { color: rgba(200, 230, 215, .5); background: rgba(255, 255, 255, .06); border-color: rgba(200, 230, 215, .3); box-shadow: none; }
.orb-ir:disabled .orb-ir-boton svg { filter: none; }
.orb-ir:disabled .orb-ir-txt { color: rgba(214, 236, 255, .5); }
.orb-cab { flex-direction: column; align-items: flex-start; gap: 2px; }
/* Saludo y subtítulo de la brújula más grandes */
.orb-hola { font-size: 34px; }
.orb-sub { font-size: 19px; font-weight: 500; }
@media (max-width: 600px) { .orb-hola { font-size: 26px; } .orb-sub { font-size: 16px; } }

/* ---------- Ejercicios propios de los programas (tablero proyectado), en vidrio ---------- */
.ed { display: flex; flex-direction: column; align-items: center; gap: 10px; width: 100%; padding: 6px 0 4px; color: #eaf6ff; }
.ed-cab { font: 700 11px var(--font); text-transform: uppercase; letter-spacing: .08em; color: rgba(186, 230, 253, .8); }
.ed-cuerpo { width: 100%; display: flex; justify-content: center; }
.ed-tarjeta, .ed-escena { width: min(560px, 100%); padding: 22px 24px; border-radius: 22px; text-align: center; color: #eaf6ff;
  background: rgba(14, 52, 104, .38); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(160, 220, 255, .28); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), 0 14px 40px rgba(2, 10, 26, .35); }
.ed-num { margin: 0; font: 700 11px var(--font); text-transform: uppercase; letter-spacing: .08em; color: #ffd27a; }
.ed-tarjeta h2 { margin: 6px 0 8px; font: 800 22px var(--font); color: #9fe9ff; text-shadow: 0 0 12px rgba(120, 220, 255, .55); }
.ed-tarjeta p { margin: 0 0 14px; font-size: 15px; line-height: 1.5; color: rgba(234, 246, 255, .92); }
.ed-tarjeta b { color: #fff; }
.ed-btn { padding: 11px 26px; border-radius: 99px; border: 1.5px solid rgba(57, 255, 140, .85); cursor: pointer; font: 800 13px var(--font); color: #39ff8c;
  background: rgba(57, 255, 140, .14); box-shadow: 0 0 16px rgba(57, 255, 140, .45); }
.ed-btn:hover { transform: none !important; background: rgba(57, 255, 140, .24); }
.ed-escena { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.ed-estado { margin: 0; font-size: 16px; }
.ed-estado b { color: #9fe9ff; }
.ed-centro { display: grid; place-items: center; width: 150px; height: 150px; border-radius: 50%; color: #fff; background: rgba(255, 255, 255, .05); box-shadow: inset 0 0 0 2px rgba(160, 220, 255, .25); transition: box-shadow .2s ease, background .2s ease; }
.ed-centro.pulso { animation: edPulso .35s ease-out; }
.ed-centro.ok { background: rgba(57, 255, 140, .18); box-shadow: inset 0 0 0 3px #39ff8c, 0 0 30px rgba(57, 255, 140, .6); }
.ed-centro.mal { background: rgba(255, 90, 110, .16); box-shadow: inset 0 0 0 3px #ff6b7d, 0 0 30px rgba(255, 90, 110, .55); }
@keyframes edPulso { from { box-shadow: inset 0 0 0 4px rgba(160, 220, 255, .9), 0 0 34px rgba(110, 200, 255, .7); } to { box-shadow: inset 0 0 0 2px rgba(160, 220, 255, .25); } }
.ed-halo { width: 46px; height: 46px; border-radius: 50%; background: radial-gradient(circle, rgba(159, 233, 255, .9), rgba(79, 168, 255, .2) 70%); }
.ed-nota { font: 800 40px var(--font); color: #9fe9ff; text-shadow: 0 0 16px rgba(120, 220, 255, .8); }
.ed-fig svg { width: 104px; height: 104px; filter: drop-shadow(0 0 8px rgba(255, 255, 255, .7)); }
.ed-tocar { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 16px 40px; border-radius: 99px; cursor: pointer; font: 800 16px var(--font); color: #eaf6ff;
  border: 1.5px solid rgba(160, 220, 255, .45); background: rgba(79, 168, 255, .16); touch-action: manipulation; }
.ed-tocar small { font-size: 10.5px; font-weight: 600; opacity: .75; }
.ed-tocar:active { transform: scale(.97) !important; background: rgba(79, 168, 255, .3); }
.ed-tocar.oculto { display: none !important; }
.ed-marcador { margin: 0; min-height: 18px; font: 700 13px var(--font); color: #ffd27a; }
.ed-rep { font: 800 48px var(--font); color: #9fe9ff; text-shadow: 0 0 18px rgba(120, 220, 255, .8); min-height: 60px; }
/* Las tarjetas que explican las habilidades dentro del tablero personal: también de vidrio */
.holo .tb-hab .pr-tarjeta { color: #eaf6ff; background: rgba(14, 52, 104, .38) !important; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(160, 220, 255, .28) !important; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), 0 14px 40px rgba(2, 10, 26, .35) !important; }
.holo .tb-hab .pr-tarjeta :is(h2, h3, p, li, small, b, span:not(.pr-icono)) { color: #eaf6ff; }
/* Mientras corre un ejercicio propio del programa, la línea de figuras se esconde y el ejercicio ocupa el tablero */
.ed-activo .tb-tablero .linea-tiempo { display: none !important; }
.ed-activo .tb-hab { flex: 1 1 auto; justify-content: center; align-items: center; }
.ed-nota svg { width: 56px; height: 56px; filter: drop-shadow(0 0 10px rgba(120, 220, 255, .8)); }
/* Explicación sencilla y el sonido que se muestra mientras suena */
.ed-tarjeta .ed-explica { font-size: 19px; font-weight: 600; line-height: 1.4; margin: 10px 0 16px; }
.ed-tarjeta .ed-nota, .ed-tarjeta .ed-fig { display: inline-grid; place-items: center; margin: 4px auto 0; }
.ed-nota.suena svg { animation: edSuena .6s ease-out; }
@keyframes edSuena { 0% { transform: scale(1); } 30% { transform: scale(1.25); filter: drop-shadow(0 0 16px #9fe9ff); } 100% { transform: scale(1); } }
.ed-presenta .ed-grafia { display: inline-grid; place-items: center; width: 120px; height: 120px; margin: 6px auto; color: #fff; filter: drop-shadow(0 0 10px rgba(255, 255, 255, .6)); }
.ed-presenta .ed-grafia svg { width: 100%; height: 100%; }
.ed-presenta .ed-grafia svg [stroke]:not([stroke="none"]) { stroke: #fff; }
.ed-presenta .ed-grafia svg [fill]:not([fill="none"]) { fill: #fff; }

/* ---------- Voz guía: ondas que se mueven con la voz y subtítulos (CC) ---------- */
.vz { position: relative; width: 100%; min-height: 260px; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; }
.vz-ondas { width: 100%; height: 200px; display: block; }
.vz-cc { max-width: 760px; min-height: 2.8em; margin: 0 auto; padding: 0 16px; text-align: center; font: 600 20px/1.4 var(--font); color: rgba(234, 246, 255, .55); transition: opacity .3s ease; }
.vz-cc b { color: #fff; text-shadow: 0 0 12px rgba(120, 220, 255, .8); }
.vz-cc .vz-dicho { color: rgba(234, 246, 255, .9); }
.vz.sin-cc .vz-cc { opacity: 0; }
.vz-btn-cc { position: absolute; right: 8px; bottom: 6px; padding: 3px 8px; border-radius: 6px; cursor: pointer; font: 800 11px var(--font); letter-spacing: .05em;
  color: rgba(234, 246, 255, .5); background: transparent; border: 1.5px solid rgba(234, 246, 255, .35); }
.vz-btn-cc.on { color: #0b2347; background: #eaf6ff; border-color: #eaf6ff; }
.vz-btn-cc:hover { transform: none !important; }
.vz-franja { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 40; width: min(820px, calc(100% - 32px)); pointer-events: none; }
.vz-franja .vz-cc { min-height: 0; padding: 8px 16px; border-radius: 12px; font-size: 17px; background: rgba(4, 19, 41, .72); opacity: 0; }
.vz-franja .vz-cc.on { opacity: 1; }
.tb-escena { position: relative; }
@media (max-width: 600px) { .vz-cc { font-size: 16px; } .vz-ondas { height: 140px; } }

/* Programas sin recuadros: solo la voz (ondas + CC), lo que hay que buscar y el botón */
.ed-escena { background: none !important; border: 0 !important; box-shadow: none !important; backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
.ed .vz { min-height: 0; }
.vz-extra { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.vz-extra:empty { display: none; }
.ed-nombre-fig { font: 800 26px var(--font); color: #9fe9ff; text-shadow: 0 0 12px rgba(120, 220, 255, .6); }
.vz-extra .ed-grafia { display: grid; place-items: center; width: 120px; height: 120px; color: #fff; filter: drop-shadow(0 0 10px rgba(255, 255, 255, .6)); }
.vz-extra .ed-grafia svg { width: 100%; height: 100%; }
.vz-extra .ed-grafia svg [stroke]:not([stroke="none"]) { stroke: #fff; }
.vz-extra .ed-grafia svg [fill]:not([fill="none"]) { fill: #fff; }
.ed-fin { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.ed-fin b { font: 800 52px var(--font); color: #ffd27a; text-shadow: 0 0 18px rgba(255, 210, 122, .6); }
.ed-fin.ok b { color: #39ff8c; text-shadow: 0 0 18px rgba(57, 255, 140, .6); }
.ed-fin small { font-size: 14px; color: rgba(234, 246, 255, .8); }
.ed-fin-btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.ed-btn-sec { color: #dff3ff; border-color: rgba(160, 220, 255, .5); background: rgba(255, 255, 255, .06); box-shadow: none; }
.ed-rep svg { width: 74px; height: 74px; }
.ed-rep.golpe { animation: edGolpe .25s ease-out; }
@keyframes edGolpe { 0% { transform: scale(1.25); filter: drop-shadow(0 0 18px #9fe9ff); } 100% { transform: scale(1); } }

/* Saludo de regreso: vidrio claro moderno (texto sobre el vidrio, íconos finos, filas con líneas delgadas) */
.reg-modal { position: fixed; inset: 0; z-index: 3000; display: grid; place-items: center; padding: 16px; background: rgba(2, 10, 30, .3); }
.reg-caja { position: relative; width: min(460px, 100%); padding: 22px 24px 20px; border-radius: 22px; text-align: left; color: #f4f9ff;
  background: linear-gradient(150deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, .05)); backdrop-filter: blur(22px) saturate(140%); -webkit-backdrop-filter: blur(22px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, .22); box-shadow: 0 24px 60px rgba(0, 8, 25, .35), inset 0 1px 0 rgba(255, 255, 255, .25); font-weight: 400; }
.reg-x { position: absolute; top: 14px; right: 14px; width: 30px; height: 30px; display: grid; place-items: center; padding: 0; border-radius: 50%; cursor: pointer; color: rgba(244, 249, 255, .8); border: 0; background: rgba(255, 255, 255, .1); }
.reg-x svg { width: 14px; height: 14px; }
.reg-x:hover { transform: none !important; background: rgba(255, 255, 255, .2); }
.reg-cab { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; padding-right: 34px; margin-bottom: 16px; }
.reg-cab small { display: block; font: 500 12px var(--font); color: rgba(244, 249, 255, .65); letter-spacing: .01em; }
.reg-cab h2 { margin: 2px 0 2px; font: 600 26px/1.1 var(--font); color: #fff; text-transform: none; letter-spacing: -.01em; }
.reg-prog { font-size: 13px; color: rgba(244, 249, 255, .8); }
.reg-num { text-align: right; flex: none; }
.reg-num b { display: block; font: 300 48px/1 var(--font); color: #fff; letter-spacing: -.03em; }
.reg-num b i { font-style: normal; font-size: 22px; vertical-align: top; margin-left: 2px; color: rgba(244, 249, 255, .75); }
.reg-num small { font: 500 11px var(--font); color: rgba(244, 249, 255, .6); }
.reg-filas { border-top: 1px solid rgba(255, 255, 255, .14); }
.reg-fila { display: grid; grid-template-columns: 22px 92px 1fr; align-items: start; gap: 10px; padding: 10px 0; border-bottom: 1px solid rgba(255, 255, 255, .1); }
.reg-ico svg { width: 18px; height: 18px; color: rgba(244, 249, 255, .75); }
.reg-et { font-size: 13px; color: rgba(244, 249, 255, .62); }
.reg-val { font-size: 13.5px; font-weight: 500; color: #fff; line-height: 1.4; }
.reg-btns { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.reg-btn { padding: 9px 18px; border-radius: 99px; cursor: pointer; font: 500 13px var(--font); color: rgba(244, 249, 255, .85); border: 0; background: transparent; }
.reg-btn:hover { transform: none !important; background: rgba(255, 255, 255, .1); }
.reg-btn.principal { color: #0b2347; background: rgba(255, 255, 255, .92); font-weight: 600; }
.reg-btn.principal:hover { background: #fff; }
@media (max-width: 480px) { .reg-fila { grid-template-columns: 20px 76px 1fr; } .reg-num b { font-size: 40px; } }
/* Botón «Brújula» siempre a la vista en el tablero proyectado mientras corre un programa */
.prog-volver { position: absolute; right: 16px; bottom: 16px; z-index: 45; display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: 99px; cursor: pointer;
  font: 700 12.5px var(--font); color: #e0f2ff; border: 1px solid rgba(148, 197, 255, .45); background: rgba(14, 52, 104, .6); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.prog-volver svg { width: 17px; height: 17px; }
.prog-volver:hover { transform: none !important; background: rgba(56, 189, 248, .3); }
/* La barra del tempo marca cuando el ejercicio cambia el pulso */
.bpm-box.ed-cambio .valor, .bpm-box.ed-cambio .slider { animation: edCambioTempo .7s ease-out; }
@keyframes edCambioTempo { 0% { filter: drop-shadow(0 0 14px #39ff8c) brightness(1.5); transform: scale(1.08); } 100% { filter: none; transform: none; } }
/* Brújula: el saludo y la instrucción al lado izquierdo (la brújula no se corta) y se desvanecen a los 5 s */
.orb { position: relative; }
.orb-cab { position: absolute; left: 4%; top: 50%; transform: translateY(-50%); z-index: 4; align-self: auto; max-width: 26%; padding: 0; gap: 4px; transition: opacity 1.2s ease, transform 1.2s ease; pointer-events: none; }
.orb-cab.fuera { opacity: 0; transform: translateY(-50%) translateX(-14px); }
.orb-hola { font: 700 30px/1.15 var(--font); }
.orb-sub { font: 400 26px/1.2 var(--font); color: #fff; }
.orb-sub2 { font: 400 17px/1.3 var(--font); color: rgba(234, 246, 255, .9); }
.orb-escena { width: min(640px, calc(100vw - 48px), calc(100vh - 150px)); }
@media (max-width: 1000px) {
  .orb-cab { position: static; transform: none; max-width: none; align-self: stretch; padding: 0 6px; }
  .orb-cab.fuera { transform: none; }
  .orb-hola { font-size: 24px; } .orb-sub { font-size: 19px; } .orb-sub2 { font-size: 14px; }
}
@media (max-width: 1000px) {
  .orb-cab { max-height: 140px; overflow: hidden; transition: opacity 1.2s ease, max-height 1s ease .8s; }
  .orb-cab.fuera { max-height: 0; }
}
/* Lema al lado derecho de la brújula (se va con el saludo a los 5 s) */
.orb-lema { position: absolute; right: 4%; top: 50%; transform: translateY(-50%); z-index: 4; max-width: 24%; margin: 0; text-align: right; pointer-events: none;
  font: 700 30px/1.15 var(--font); color: #fff; text-shadow: 0 0 18px rgba(120, 220, 255, .45); transition: opacity 1.2s ease, transform 1.2s ease; }
.orb-lema.fuera { opacity: 0; transform: translateY(-50%) translateX(14px); }
@media (max-width: 1000px) { .orb-lema { display: none; } }
/* Velo al lanzar un programa (tapa el tablero mientras entra la pantalla completa) */
.lanzar-velo { position: fixed; inset: 0; z-index: 2900; background: radial-gradient(circle at 30% 20%, #0f3d78, #072550 45%, #031027); transition: opacity .35s ease; }
.lanzar-velo.fuera { opacity: 0; pointer-events: none; }
