/* =========================================================
   usuarios.css — registro por colegio, filtros, mensajes del
   administrador, acceso seguro. Complementa a styles.css.
   ========================================================= */
/* ---------- Campo de contraseña ---------- */
.pw-field label { display: block; font-weight: 700; margin-bottom: 4px; font-size: .9rem; }
.pw-field__row { display: flex; gap: 6px; }
.pw-field__row input { flex: 1; min-width: 0; padding: 10px 12px; border: 2px solid #dbe3f5; border-radius: 10px; font: inherit; }
.pw-field__row input:focus { outline: none; border-color: var(--violet); box-shadow: 0 0 0 3px rgba(29,78,216,.15); }
.pw-field__btn { border: 2px solid #dbe3f5; background: #fff; border-radius: 10px; padding: 0 12px; cursor: pointer; font: inherit; font-weight: 700; white-space: nowrap; }
.pw-field__btn:hover { border-color: var(--violet); color: var(--violet); }
.pw-field__btn--gen { background: #eef3ff; color: #1d4ed8; }
.pw-meter { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin: 8px 0 4px; }
.pw-meter i { height: 5px; border-radius: 4px; background: #e5e9f2; }
.pw-meter i.on.s1 { background: #dc2626; }
.pw-meter i.on.s2 { background: #f59e0b; }
.pw-meter i.on.s3 { background: #65a30d; }
.pw-meter i.on.s4 { background: #15803d; }
.pw-field__hint { font-size: .8rem; color: var(--ink-soft); }
.pw-field__hint.no { color: #b45309; }
.pw-field__hint.ok { color: #15803d; font-weight: 700; }
/* ---------- Selector Colombia ---------- */
.geo-picker { display: grid; gap: 4px; }
.geo-picker__row { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 16px; }
.geo-picker .form-field label { font-weight: 700; font-size: .9rem; display: block; margin-bottom: 4px; }
.geo-picker select, .geo-picker input[type=search], .geo-picker input[type=text] { width: 100%; padding: 10px 12px; border: 2px solid #dbe3f5; border-radius: 10px; font: inherit; background: #fff; }
.geo-picker select:focus, .geo-picker input:focus { outline: none; border-color: var(--violet); box-shadow: 0 0 0 3px rgba(29,78,216,.15); }
.geo-picker select:disabled, .geo-picker input:disabled { background: #f3f5f9; color: #8b94a8; }
.geo-picker__ie input[type=search] { margin-bottom: 6px; }
.geo-picker__info { display: block; margin-top: 6px; font-size: .8rem; }
.geo-picker__add { margin-top: 6px; background: none; border: 0; color: var(--violet); font: inherit; font-weight: 700; cursor: pointer; padding: 4px 0; }
.geo-picker__add:hover { text-decoration: underline; }
.geo-picker__addform { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 8px; margin-top: 8px; padding: 12px; border: 2px dashed #c7d3f0; border-radius: 12px; background: #f7f9ff; }
.geo-picker__addform input { grid-column: 1 / -1; }
.geo-picker__addform .btn { grid-column: auto; }
@media (max-width: 640px) {
  .geo-picker__row, .geo-picker__addform { grid-template-columns: 1fr; }

}
/* ---------- Filtros ---------- */
.flt { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; min-width: 0; margin: 4px 0 12px; padding: 12px; background: #f6f8fd; border: 1px solid #e3e9f7; border-radius: 14px; }
.flt__row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.flt input[type=search], .flt select { padding: 9px 11px; border: 2px solid #dbe3f5; border-radius: 10px; font: inherit; background: #fff; min-width: 0; max-width: 100%; }
.flt input[type=search] { flex: 1 1 240px; }
.flt__row select { flex: 1 1 150px; }
.flt input:focus, .flt select:focus { outline: none; border-color: var(--violet); }
.flt select:disabled { background: #eef1f6; color: #98a1b3; }
.flt__go { border: 0; background: linear-gradient(180deg, #3b82f6, #2563eb); color: #fff; border-radius: 10px; padding: 9px 16px; font: inherit; font-weight: 800; cursor: pointer; white-space: nowrap; box-shadow: 0 2px 6px rgba(37, 99, 235, 0.28); }
.flt__go:hover { filter: brightness(1.07); }
.flt__go:focus-visible { outline: 3px solid #93c5fd; outline-offset: 2px; }
.flt__go.is-on { background: #1d4ed8; }
.flt__row .flt__go { flex: 0 0 auto; }
.flt__clear { border: 0; background: #fee2e2; color: #b91c1c; border-radius: 10px; padding: 9px 12px; font: inherit; font-weight: 700; cursor: pointer; }
.flt__sum { font-size: .82rem; }
/* ---------- Tarjetas de registro / listas ---------- */
.usr-card { margin-bottom: 20px; }
.usr-card__head { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 14px; }
.usr-card__head h3 { margin: 0 0 4px; }
.usr-card__head p { margin: 0; }
.usr-card__ico { flex: none; width: 46px; height: 46px; display: grid; place-items: center; font-size: 1.5rem; border-radius: 14px; background: linear-gradient(135deg, #dbeafe, #e0e7ff); }
.usr-card__head.is-toggle { cursor: pointer; margin-bottom: 0; border-radius: 12px; }
.usr-card__head.is-toggle:hover .usr-card__caret { background: #dbeafe; }
.usr-card__head.is-toggle p { max-width: 70ch; }
.usr-card__caret { margin-left: auto; align-self: center; flex: none; font-size: .78rem; font-weight: 800; color: #1d4ed8; background: #eef3ff; border-radius: 999px; padding: 6px 12px; white-space: nowrap; }
.usr-card__body { margin-top: 16px; }
.usr-card__body[hidden] { display: none; }
.usr-tabs { display: inline-flex; background: #eef2fb; border-radius: 12px; padding: 4px; margin-bottom: 14px; gap: 4px; }
.usr-tabs button { border: 0; background: transparent; padding: 8px 16px; border-radius: 9px; font: inherit; font-weight: 700; color: #5b6b94; cursor: pointer; }
.usr-tabs button.is-active { background: #fff; color: #0f1f4d; box-shadow: 0 1px 4px rgba(15,31,77,.15); }
.usr-pane[hidden] { display: none; }
.usr-form fieldset { border: 1px solid #e3e9f7; border-radius: 14px; padding: 14px 16px 10px; margin: 0 0 14px; min-width: 0; background: #fcfdff; }
.usr-form legend { padding: 0 8px; font-weight: 800; color: #0f1f4d; font-size: .86rem; letter-spacing: .02em; }
.usr-form--inline { margin-top: 12px; padding-top: 12px; border-top: 1px dashed #d6def2; }
.usr-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px 16px; }
.usr-span2 { grid-column: 1 / -1; }
.usr-form .form-field label { display: block; font-weight: 700; font-size: .9rem; margin-bottom: 4px; }
.usr-form input[type=text], .usr-form input[type=email], .usr-form input[type=tel], .usr-form input[type=number], .usr-form input[type=date], .usr-form input[type=password], .usr-form select, .usr-form textarea { width: 100%; padding: 10px 12px; border: 2px solid #dbe3f5; border-radius: 10px; font: inherit; background: #fff; box-sizing: border-box; }
.usr-form textarea { min-height: 120px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .86rem; }
.usr-form input:focus, .usr-form select:focus, .usr-form textarea:focus { outline: none; border-color: var(--violet); box-shadow: 0 0 0 3px rgba(29,78,216,.15); }
.usr-hint { color: var(--ink-soft); font-size: .84rem; margin: 2px 0 8px; }
.usr-hint code, .usr-row code, .acc-help code { background: #eef2fb; padding: 1px 6px; border-radius: 6px; font-size: .85em; }
@media (max-width: 760px) {
  .usr-grid { grid-template-columns: 1fr; }
  .usr-span2 { grid-column: auto; }

}
.usr-warn { background: #fff7ed; border: 1px solid #fed7aa; color: #9a3412; border-radius: 12px; padding: 10px 14px; margin-top: 12px; font-size: .88rem; }
.usr-warn ul { margin: 6px 0 0; padding-left: 18px; }
.usr-empty { text-align: center; padding: 22px 0; }
.usr-file { cursor: pointer; display: inline-flex; margin-top: 10px; }
/* credenciales */
.cred-box { margin-top: 16px; border: 2px solid #86efac; border-radius: 16px; background: #f0fdf4; padding: 16px; }
.cred-box__head { display: flex; gap: 12px; align-items: flex-start; }
.cred-box__head > span { font-size: 1.6rem; }
.cred-box__head h4 { margin: 0 0 2px; color: #14532d; }
.cred-box__head p { margin: 0; color: #166534; font-size: .88rem; }
.cred-box__scroll { overflow: auto; max-height: 340px; margin: 12px 0; border-radius: 10px; background: #fff; }
.cred-table { width: 100%; font-size: .88rem; }
.cred-mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 700; }
/* filas de personas */
.usr-rows { display: flex; flex-direction: column; gap: 10px; }
.usr-row { border: 1px solid #e3e9f7; border-radius: 16px; padding: 12px 14px; background: #fff; display: grid; grid-template-columns: 1fr auto; gap: 10px 14px; align-items: center; transition: box-shadow .15s, border-color .15s; }
.usr-row:hover { border-color: #c4d2f4; box-shadow: 0 4px 16px rgba(15,31,77,.08); }
.usr-row__main { display: flex; gap: 12px; align-items: center; min-width: 0; }
.usr-row__av { flex: none; width: 46px; height: 46px; border-radius: 50%; background: linear-gradient(135deg, #eef2ff, #dbeafe); display: grid; place-items: center; font-size: 1.5rem; }
.usr-row__txt { min-width: 0; }
.usr-row__name { font-weight: 800; color: #0f1f4d; overflow-wrap: anywhere; }
.usr-row__sub { display: flex; gap: 6px 12px; flex-wrap: wrap; font-size: .84rem; color: #4a5775; margin-top: 2px; align-items: center; }
.usr-row__kids { margin-top: 6px; display: flex; gap: 6px; flex-wrap: wrap; }
.usr-row__acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; align-items: center; }
.usr-row__panel { grid-column: 1 / -1; }
.usr-row__panel:empty { display: none; }
.usr-chip { background: #e0e7ff; color: #3730a3; font-weight: 800; border-radius: 999px; padding: 1px 9px; font-size: .78rem; }
.usr-chip--soft { background: #ecfdf5; color: #065f46; }
.usr-badge { border-radius: 999px; padding: 1px 9px; font-size: .72rem; font-weight: 800; }
.usr-badge--warn { background: #fef3c7; color: #92400e; }
.usr-count { background: #ef4444; color: #fff; border-radius: 999px; padding: 0 7px; font-size: .72rem; font-weight: 800; }
.usr-danger { color: #b91c1c; }
.usr-more { align-self: center; margin-top: 4px; }
.child-tag button { border: 0; background: transparent; cursor: pointer; font-weight: 800; color: #b91c1c; margin-left: 2px; }
@media (max-width: 760px) {
  .usr-row { grid-template-columns: 1fr; }
  .usr-row__acts { justify-content: flex-start; }

}
/* menú ⋯ */
.usr-menu { position: relative; }
.usr-menu summary { list-style: none; cursor: pointer; }
.usr-menu summary::-webkit-details-marker { display: none; }
.usr-menu__list { position: absolute; right: 0; top: calc(100% + 4px); z-index: 30; min-width: 220px; background: #fff; border: 1px solid #d6def2; border-radius: 12px; box-shadow: 0 12px 32px rgba(15,31,77,.2); padding: 6px; display: grid; }
.usr-menu__list button { border: 0; background: none; text-align: left; padding: 9px 12px; border-radius: 8px; font: inherit; cursor: pointer; }
.usr-menu__list button:hover { background: #eef2ff; }
.usr-menu__list .is-danger { color: #b91c1c; }
.usr-menu__list .is-danger:hover { background: #fee2e2; }
/* selector de hijos */
.kid-pick { display: grid; gap: 8px; }
.kid-pick__chips { display: flex; flex-wrap: wrap; gap: 6px; min-height: 28px; align-items: center; }
.kid-pick__list { max-height: 280px; overflow: auto; border: 1px solid #e3e9f7; border-radius: 12px; background: #fff; padding: 4px; }
.kid-pick__item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; cursor: pointer; }
.kid-pick__item:hover { background: #f1f5ff; }
.kid-pick__item.is-off { opacity: .55; cursor: not-allowed; }
.kid-pick__item small { display: block; color: #5b6b94; font-weight: 500; }
/* ---------- Mensajes del administrador ---------- */
.ami-card { padding: 0 !important; overflow: hidden; }
.ami { display: grid; grid-template-columns: minmax(300px, 400px) 1fr; height: min(720px, calc(100vh - 170px)); min-height: 520px; background: #fff; }
.ami__side { display: flex; flex-direction: column; min-height: 0; min-width: 0; border-right: 1px solid #e3e9f7; background: #fbfcff; }
.ami__tabs { display: flex; gap: 2px; padding: 10px 10px 0; border-bottom: 1px solid #e3e9f7; }
.ami__tabs button { flex: 1; white-space: nowrap; border: 0; background: transparent; padding: 10px 6px; font: inherit; font-weight: 700; font-size: .84rem; color: #5b6b94; cursor: pointer; border-bottom: 3px solid transparent; border-radius: 8px 8px 0 0; }
.ami__tabs button.is-active { color: #1d4ed8; border-bottom-color: #1d4ed8; background: #fff; }
.ami__tabs b { background: #ef4444; color: #fff; border-radius: 999px; font-size: .68rem; padding: 0 6px; margin-left: 2px; }
.ami__flt { padding: 8px 10px 0; max-height: 230px; overflow-y: auto; overflow-x: hidden; }
.ami__flt .flt { margin: 0 0 6px; padding: 8px; }
.ami__flt .flt input[type=search] { flex-basis: 100%; }
.ami__flt .flt select { flex: 1 1 45%; font-size: .84rem; padding: 7px 8px; }
.ami__bulk { display: flex; justify-content: space-between; gap: 8px; padding: 6px 12px; font-size: .8rem; color: #4a5775; background: #eef2ff; }
.ami-link { border: 0; background: none; color: #1d4ed8; font: inherit; font-weight: 700; cursor: pointer; padding: 0; }
.ami__list { flex: 1; overflow: auto; padding: 6px; display: flex; flex-direction: column; gap: 2px; }
.ami__empty { text-align: center; color: #6b7690; padding: 28px 12px; font-size: .9rem; }
.ami__more { align-self: center; margin: 6px 0; }
.ami-row { all: unset; box-sizing: border-box; display: flex; gap: 10px; align-items: center; padding: 9px 10px; border-radius: 12px; cursor: pointer; width: 100%; }
.ami-row:hover { background: #eef3ff; }
.ami-row.is-active { background: #dbe7ff; }
.ami-row__chk { flex: none; width: 18px; height: 18px; }
.ami-row__av { flex: none; width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(135deg, #eef2ff, #dbeafe); display: grid; place-items: center; font-size: 1.3rem; }
.ami-row__body { flex: 1; min-width: 0; display: grid; gap: 1px; }
.ami-row__top { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.ami-row__name { font-weight: 800; color: #0f1f4d; font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ami-row__time { font-size: .7rem; color: #6b7690; flex: none; }
.ami-row__sub { font-size: .8rem; color: #4a5775; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ami-row__ctx { font-size: .7rem; color: #8b94a8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ami-row__badge { flex: none; background: #ef4444; color: #fff; border-radius: 999px; min-width: 22px; text-align: center; padding: 1px 6px; font-size: .74rem; font-weight: 800; }
.ami__main { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: #fff; }
.ami__main > .chat { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 0; }
.ami__main .chat__list.ami__chat { flex: 1; max-height: none; min-height: 0; padding: 14px 18px; background: #f3f6fc; }
.ami__main .chat__composer { padding: 10px 14px; border-top: 1px solid #e3e9f7; background: #fff; }
.ami__main .chat__composer textarea { flex: 1; resize: none; max-height: 110px; }
.ami__head { display: flex; gap: 12px; align-items: center; padding: 12px 16px; border-bottom: 1px solid #e3e9f7; background: #fff; }
.ami__head strong { display: block; color: #0f1f4d; }
.ami__head small { color: #6b7690; }
.ami__back { display: none; border: 0; background: #eef2ff; border-radius: 10px; width: 36px; height: 36px; font-size: 1.1rem; cursor: pointer; }
.ami__hint { margin: 0; padding: 8px 16px; font-size: .8rem; background: #fffbeb; color: #92400e; border-bottom: 1px solid #fde68a; }
.ami__ph { margin: auto; text-align: center; color: #8b94a8; padding: 24px; }
.ami__ph span { font-size: 3rem; display: block; margin-bottom: 8px; }
.ami__compose { padding: 22px; display: grid; gap: 12px; align-content: start; }
.ami__compose h4 { margin: 0; color: #0f1f4d; font-size: 1.15rem; }
.ami__to { background: #eef2ff; border-radius: 12px; padding: 12px 14px; font-size: .9rem; color: #1e3a8a; }
.ami__to.is-empty { background: #f6f8fd; color: #6b7690; border: 2px dashed #d6def2; }
.ami__compose textarea { width: 100%; box-sizing: border-box; padding: 12px; border: 2px solid #dbe3f5; border-radius: 12px; font: inherit; min-height: 130px; resize: vertical; }
.ami__compose textarea:focus { outline: none; border-color: var(--violet); }
.ami__compose-foot { display: flex; justify-content: space-between; align-items: center; }
.chat__day { text-align: center; font-size: .72rem; font-weight: 700; color: #6b7690; margin: 10px 0 4px; }
.chat__day::before, .chat__day::after { content: ""; display: inline-block; width: 28px; height: 1px; background: #cdd6ea; vertical-align: middle; margin: 0 8px; }
@media (max-width: 860px) {
  .ami { grid-template-columns: 1fr; height: calc(100vh - 150px); }
  .ami__main { display: none; }
  .ami--open .ami__main { display: flex; }
  .ami--open .ami__side { display: none; }
  .ami__back { display: inline-block; }

}
/* ---------- Acceso del administrador ---------- */
.acc-gate { display: grid; grid-template-columns: 1.05fr 1fr; max-width: 940px; margin: 14px auto; border-radius: 24px; overflow: hidden; box-shadow: 0 18px 50px rgba(15,31,77,.22); background: #fff; }
.acc-gate__intro { padding: 38px 36px; color: #fff; background: radial-gradient(circle at 20% 0%, rgba(56,189,248,.45), transparent 55%), linear-gradient(160deg, #0f1f4d, #162a63 70%, #1d3a8a); }
.acc-gate__logo { display: grid; place-items: center; width: 58px; height: 58px; border-radius: 16px; background: rgba(255,255,255,.14); font-size: 1.9rem; overflow: hidden; }
.acc-gate__logo .brand-logo { height: 100%; width: 100%; }
.acc-gate__intro h1 { margin: 16px 0 8px; font-size: 1.8rem; color: #fff; }
.acc-gate__intro > p { color: #c7d6f8; line-height: 1.5; }
.acc-gate__intro ul { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 14px; }
.acc-gate__intro li { display: flex; gap: 12px; align-items: flex-start; }
.acc-gate__intro li > span { font-size: 1.3rem; background: rgba(255,255,255,.12); border-radius: 12px; width: 42px; height: 42px; display: grid; place-items: center; flex: none; }
.acc-gate__intro li strong { display: block; color: #fff; }
.acc-gate__intro li small { color: #9fb3e8; }
.acc-gate__card { padding: 36px 34px; display: flex; flex-direction: column; justify-content: center; }
.acc-gate__card h2 { margin: 0 0 4px; color: #0f1f4d; }
.acc-form { display: grid; gap: 4px; margin-top: 8px; }
.acc-form .form-field label { display: block; font-weight: 700; font-size: .9rem; margin-bottom: 4px; }
.acc-form input, .acc-form select { width: 100%; box-sizing: border-box; padding: 11px 13px; border: 2px solid #dbe3f5; border-radius: 12px; font: inherit; background: #fff; }
.acc-form .pw-field__row input { width: auto; }
.acc-form input:focus, .acc-form select:focus { outline: none; border-color: var(--violet); box-shadow: 0 0 0 4px rgba(29,78,216,.15); }
.acc-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.acc-btn { margin-top: 10px; width: 100%; padding: 13px; font-size: 1rem; }
.acc-help { margin-top: 12px; font-size: .85rem; color: #4a5775; }
.acc-help summary { cursor: pointer; color: #1d4ed8; font-weight: 700; }
.acc-help code { display: block; margin: 6px 0; padding: 8px 10px; }
@media (max-width: 760px) {
  .acc-gate { grid-template-columns: 1fr; }
  .acc-gate__intro { padding: 24px; }
  .acc-gate__card { padding: 24px 20px; }
  .acc-row { grid-template-columns: 1fr; }

}
/* ---------- Ingreso de estudiantes (inicio) ---------- */
.login-card { background: #fff; border: 1px solid #e3e9f7; border-radius: 22px; padding: 26px 26px 22px; box-shadow: 0 12px 36px rgba(15,31,77,.12); border-top: 6px solid #1d4ed8; }
.login-card h2 { margin: 4px 0; color: #0f1f4d; }
.login-card .form-field label { display: block; font-weight: 700; font-size: .9rem; margin-bottom: 4px; }
.login-card input { width: 100%; box-sizing: border-box; padding: 12px 14px; border: 2px solid #dbe3f5; border-radius: 12px; font: inherit; }
.login-card .pw-field__row input { width: auto; }
.login-card input:focus { outline: none; border-color: var(--violet); box-shadow: 0 0 0 4px rgba(29,78,216,.15); }
.login-card__msg { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; border-radius: 10px; padding: 8px 12px; font-size: .88rem; margin: 8px 0; }
.login-card__go { width: 100%; padding: 13px; font-size: 1.02rem; margin: 10px 0 8px; }
/* el chat del administrador usa una caja de texto compacta (styles.css fija 110px para .adm textarea) */
.adm .ami__main .chat__composer textarea { min-height: 44px; height: 44px; padding: 10px 12px; }
.adm .ami__compose textarea { min-height: 130px; }
.ami__fdet summary { cursor: pointer; font-weight: 700; font-size: .86rem; color: #1d4ed8; padding: 4px 2px 8px; list-style: none; }
.ami__fdet summary::-webkit-details-marker { display: none; }
@media (min-width: 861px) {
  .ami__fdet summary { display: none; }

}
/* ---------- Moneda ChaloJS ---------- */
.chalo-coin { display: inline-block; width: 1.45em; height: 1.45em; vertical-align: -0.34em; margin: 0 .08em; filter: drop-shadow(0 1px 1.5px rgba(120,53,15,.45)); }
.chalo-coin svg { display: block; width: 100%; height: 100%; }
.header-coins .chalo-coin { width: 1.7em; height: 1.7em; vertical-align: -0.45em; }
.ap-card h4 .chalo-coin { width: 1.5em; height: 1.5em; }
/* ---------- Recarga rápida del usuario de prueba ---------- */
.ap-fab { position: fixed; left: 14px; bottom: 14px; z-index: 900; }
.ap-fab__btn { border: 0; border-radius: 999px; padding: 11px 16px; font: inherit; font-weight: 800; color: #fff; background: linear-gradient(135deg, #7c3aed, #1d4ed8); box-shadow: 0 8px 24px rgba(29,78,216,.4); cursor: pointer; }
.ap-fab__panel { position: absolute; left: 0; bottom: 52px; width: 270px; background: #fff; border: 1px solid #d6def2; border-radius: 16px; box-shadow: 0 16px 40px rgba(15,31,77,.28); padding: 14px; display: grid; gap: 10px; }
.ap-fab__panel[hidden] { display: none; }
.ap-fab__panel h4 { margin: 0; color: #0f1f4d; font-size: .95rem; }
.ap-fab__row { display: flex; gap: 6px; flex-wrap: wrap; }
.ap-fab__row button { flex: 1 1 auto; border: 2px solid #dbe3f5; background: #f7f9ff; border-radius: 10px; padding: 7px 8px; font: inherit; font-weight: 700; cursor: pointer; }
.ap-fab__row button:hover { border-color: #1d4ed8; }
.ap-fab__now { font-size: .8rem; color: #4a5775; }
/* ---------- Reglas y control ---------- */
.rg-field small { display: block; margin-top: 3px; font-size: .78rem; }
.rg-switch { display: flex; gap: 12px; align-items: center; padding: 12px 14px; background: #f3f7ff; border: 1px solid #d6e2fb; border-radius: 14px; margin-bottom: 14px; cursor: pointer; }
.rg-switch input { position: absolute; opacity: 0; }
.rg-switch__tr { flex: none; width: 46px; height: 26px; border-radius: 999px; background: #cbd5e1; position: relative; transition: background .2s; }
.rg-switch__tr::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.rg-switch input:checked + .rg-switch__tr { background: #16a34a; }
.rg-switch input:checked + .rg-switch__tr::after { transform: translateX(20px); }
.rg-switch small { display: block; }
.rg-resumen { background: #eef6ff; border-radius: 10px; padding: 10px 14px; margin: 8px 0 4px; font-size: .9rem; color: #1e3a8a; }
.rg-row { display: grid; grid-template-columns: auto 1fr auto auto; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid #e3e9f7; border-radius: 14px; margin-top: 8px; background: #fff; }
.rg-row__txt small { display: block; color: #5b6b94; }
.rg-row__t { font-size: .95rem; color: #0f1f4d; }
.rg-row__acts { display: flex; gap: 6px; }
@media (max-width: 760px) {
  .rg-row { grid-template-columns: auto 1fr; }
  .rg-row__t, .rg-row__acts { grid-column: 2; }

}
.rg-list { margin: 0 0 12px; padding-left: 4px; list-style: none; display: grid; gap: 6px; font-size: .92rem; }
.rg-bk { display: grid; gap: 6px; margin-top: 10px; }
.rg-bk__row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding: 8px 12px; border: 1px solid #e3e9f7; border-radius: 12px; background: #fbfcff; font-size: .88rem; }
.rg-bk__row .btn { margin-left: auto; }
.rg-help { margin-top: 12px; font-size: .88rem; }
.rg-help summary { cursor: pointer; color: #1d4ed8; font-weight: 700; }
.rg-help code { display: block; margin: 6px 0; padding: 8px 10px; background: #eef2fb; border-radius: 8px; overflow-x: auto; }
.rg-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr)); gap: 10px; }
.rg-kpi { background: #f6f8fd; border: 1px solid #e3e9f7; border-radius: 14px; padding: 12px; display: grid; gap: 2px; }
.rg-kpi span { font-size: 1.3rem; }
.rg-kpi b { font-size: 1.6rem; color: #0f1f4d; }
.rg-kpi small { color: #5b6b94; }
.rg-kpi.is-warn { background: #fffbeb; border-color: #fde68a; }
/* ubicación heredada del hijo */
.pp-loc { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: #f6f8fd; border: 1px dashed #c7d3f0; }
.pp-loc.is-ok { background: #f0fdf4; border: 1px solid #86efac; }
.pp-loc.is-warn { background: #fffbeb; border: 1px solid #fde68a; }
.pp-loc__ico { font-size: 1.4rem; }
.pp-loc small { display: block; }
.pp-manual { margin-top: 10px; font-size: .88rem; }
.pp-manual summary { cursor: pointer; color: #1d4ed8; font-weight: 700; }
.pp-manual[hidden] { display: none; }
/* Contenido → resultados */
.cb-flt { margin-bottom: 10px; }
.cb-sub { margin: 18px 0 8px; color: #0f1f4d; }
.cb-tablewrap { overflow-x: auto; }
.admin-content-table td.cb-v { background: #dcfce7; color: #166534; font-weight: 800; }
.admin-content-table td.cb-a { background: #fef9c3; color: #854d0e; font-weight: 800; }
.admin-content-table td.cb-r { background: #fee2e2; color: #991b1b; font-weight: 800; }
.adm-bar--wide { grid-template-columns: minmax(70px, 38%) 1fr 34px; }
.adm-bar--wide span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* ---------- elementos flotantes movibles ---------- */
.is-movible { cursor: grab; }
.is-arrastrando, .is-arrastrando .is-movible { cursor: grabbing; user-select: none; }
.chalo-fab.is-arrastrando { transform: scale(1.06); box-shadow: 0 12px 30px rgba(0,0,0,.35); }
.chalo-panel__head.is-movible { cursor: move; touch-action: none; }
/* regalar Chalos */
.reg-form { display: grid; gap: 10px; }
.reg-list { max-height: 300px; overflow: auto; display: grid; gap: 6px; padding: 4px; border: 1px solid #e3e9f7; border-radius: 12px; background: #fff; }
.reg-item { display: flex; gap: 10px; align-items: center; text-align: left; padding: 8px 10px; border: 2px solid transparent; border-radius: 10px; background: #f7f9ff; font: inherit; cursor: pointer; }
.reg-item:hover { border-color: #c7d3f0; }
.reg-item.is-on { border-color: #1d4ed8; background: #eaf0ff; }
.reg-item small { display: block; color: #5b6b94; }
.reg-item__av { font-size: 1.5rem; }
.reg-send { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.reg-send input { padding: 9px 12px; border: 2px solid #dbe3f5; border-radius: 10px; font: inherit; width: 120px; }
/* ---------- Ciudad Chalo (mundo abierto multijugador) ---------- */
.ciudad .mundo__hud { gap: 6px; }
.ciudad #cd-on { background: #166534; }
.cd-net { position: absolute; top: 8px; left: 50%; transform: translateX(-50%); z-index: 4; background: rgba(185,28,28,.92); color: #fff; padding: 6px 14px; border-radius: 999px; font-size: .82rem; font-weight: 700; max-width: 92%; text-align: center; }
#cd-unread { background: #ef4444; color: #fff; border-radius: 999px; padding: 0 6px; margin-left: 4px; font-size: .72rem; }
.cd-chat { position: absolute; left: 10px; bottom: 140px; width: min(330px, calc(100% - 20px)); z-index: 4; background: rgba(15,23,42,.86); backdrop-filter: blur(6px); border: 1px solid rgba(255,255,255,.2); border-radius: 14px; overflow: hidden; color: #fff; display: flex; flex-direction: column; }
.cd-chat[hidden] { display: none; }
.cd-chat__tabs { display: flex; gap: 4px; padding: 6px 6px 0; }
.cd-chat__tabs button { flex: 1; border: 0; background: rgba(255,255,255,.1); color: #cbd5e1; border-radius: 8px 8px 0 0; padding: 6px 4px; font: inherit; font-size: .78rem; font-weight: 700; cursor: pointer; }
.cd-chat__tabs button.on { background: rgba(255,255,255,.95); color: #0f172a; }
.cd-chat__tabs .cd-chat__x { flex: 0 0 30px; background: transparent; color: #fff; font-size: 1rem; }
.cd-chat__log { height: 130px; overflow-y: auto; padding: 8px 10px; font-size: .84rem; display: flex; flex-direction: column; gap: 4px; background: rgba(255,255,255,.95); color: #0f172a; }
.cd-m b { color: #1d4ed8; }
.cd-m.is-me b { color: #15803d; }
.cd-m small { color: #64748b; font-weight: 600; }
.cd-chat__vacio { margin: auto; text-align: center; color: #64748b; font-size: .82rem; }
.cd-chat__form { display: flex; gap: 6px; padding: 6px; background: rgba(15,23,42,.9); }
.cd-chat__form input { flex: 1; min-width: 0; border: 0; border-radius: 8px; padding: 8px 10px; font: inherit; font-size: .88rem; }
.cd-lug { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.cd-lug span { background: #e2e8f0; border-radius: 999px; padding: 3px 10px; font-size: .8rem; font-weight: 700; color: #334155; }
.cd-lug span.ok { background: #dcfce7; color: #166534; }
.cd-pl { display: grid; gap: 4px; max-height: 260px; overflow: auto; text-align: left; }
.cd-pl > div { display: flex; gap: 8px; align-items: center; padding: 6px 10px; border-radius: 10px; background: #f1f5f9; }
.cd-pl > div.same { background: #dcfce7; }
.cd-pl > div.me { background: #fef9c3; }
@media (max-width: 760px) {
  .cd-chat { bottom: 132px; width: calc(100% - 20px); }
  .cd-chat__log { height: 100px; }

}
/* selector de mundos */
.mundo-w--ciudad { grid-column: 1 / -1; background: linear-gradient(135deg, #0ea5e9, #6366f1) !important; color: #fff !important; border: 0 !important; }
.mundo-w--ciudad small, .mundo-w--ciudad b { color: #fff !important; }
.mundo-w--ciudad.on { box-shadow: 0 0 0 3px #fde047; }
.mundo-sala { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 8px 0; padding: 10px 12px; border-radius: 12px; background: #eef6ff; }
.mundo-sala select { padding: 8px 10px; border: 2px solid #c7d3f0; border-radius: 10px; font: inherit; }
/* ===== Ciudad Chalo v2: HUD, brújula, mapas, pantalla completa ===== */
.cd-stage { background: #8ccf8a; }
.cd-top { position: absolute; top: 8px; left: 8px; right: 8px; z-index: 4; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; pointer-events: none; }
.cd-top > * { pointer-events: auto; }
.cd-stats { display: flex; gap: 6px; flex-wrap: wrap; }
.cd-stats span { background: rgba(15,23,42,.72); color: #fff; padding: 4px 10px; border-radius: 999px; font-size: .8rem; font-weight: 700; }
.cd-stats #cd-on { background: #166534; }
.cd-stats #cd-t.is-low { background: #b91c1c; }
.cd-bar { display: flex; gap: 5px; flex-wrap: wrap; max-width: 100%; }
.cd-bar button { border: 0; background: rgba(15,23,42,.72); color: #fff; border-radius: 12px; padding: 5px 9px; font: inherit; font-size: 1.05rem; cursor: pointer; display: inline-flex; align-items: center; gap: 5px; position: relative; backdrop-filter: blur(4px); }
.cd-bar button:hover { background: rgba(30,41,59,.92); }
.cd-bar button em { font-style: normal; font-size: .72rem; font-weight: 700; }
.cd-bar .cd-fs { background: #1d4ed8; }
.cd-bar .cd-fs:hover { background: #2563eb; }
.cd-bar .cd-salir { background: #b91c1c; }
.cd-bar b { position: absolute; top: -4px; right: -4px; background: #ef4444; color: #fff; border-radius: 999px; font-size: .65rem; min-width: 16px; height: 16px; display: grid; place-items: center; }
.cd-comp { position: absolute; top: 8px; left: 50%; transform: translateX(-50%); width: min(440px, 46%); height: auto; z-index: 3; pointer-events: none; }
.cd-minibox { position: absolute; top: 96px; right: 8px; z-index: 3; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.cd-minibox canvas { width: 150px; height: 150px; border-radius: 50%; box-shadow: 0 2px 12px rgba(0,0,0,.45); background: #4b5563; }
.cd-minibtn { display: flex; gap: 4px; }
.cd-minibtn button { border: 0; background: rgba(15,23,42,.72); color: #fff; width: 30px; height: 28px; border-radius: 8px; cursor: pointer; font-size: .95rem; }
.cd-trkbox { position: absolute; left: 8px; bottom: 148px; z-index: 3; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; max-width: 62%; }
.cd-trkbox .mundo__trk { position: static; }
.cd-guiar { border: 0; background: #facc15; color: #422006; font-weight: 800; border-radius: 999px; padding: 5px 12px; cursor: pointer; font: inherit; font-size: .8rem; font-weight: 800; }
.cd-guiar[hidden] { display: none; }
.cd-prompt { position: absolute; left: 50%; bottom: 150px; transform: translateX(-50%); z-index: 4; border: 0; background: rgba(15,23,42,.88); color: #fff; padding: 9px 18px; border-radius: 999px; font: inherit; font-weight: 800; font-size: .95rem; cursor: pointer; box-shadow: 0 4px 16px rgba(0,0,0,.4); border: 2px solid #fde047; }
.cd-prompt[hidden] { display: none; }
.cd-zoom { position: absolute; left: 8px; top: 50%; transform: translateY(-50%); z-index: 3; display: flex; flex-direction: column; gap: 4px; }
.cd-zoom button { border: 0; background: rgba(15,23,42,.72); color: #fff; width: 34px; height: 34px; border-radius: 10px; font-size: 1.15rem; cursor: pointer; }
.cd-mapa { width: min(100%, 560px); height: auto; border-radius: 12px; cursor: crosshair; display: block; margin: 0 auto 8px; touch-action: manipulation; }
.cd-mapacard { max-width: 640px; }
/* pantalla ampliada */
.mundo--max { position: fixed !important; inset: 0; z-index: 9000; background: #000; margin: 0; padding: 0; border-radius: 0; }
.mundo--max .mundo__stage { border-radius: 0; }
.mundo--max .mundo__help { display: none; }
body.cd-bloq { overflow: hidden; }
@media (max-width: 760px) {
  .cd-bar button em { display: none; }
  .cd-bar .cd-fs em { display: inline; }
  .cd-comp { top: 84px; width: 60%; }
  .cd-minibox { top: 120px; }
  .cd-minibox canvas { width: 110px; height: 110px; }
  .cd-trkbox { bottom: 170px; max-width: 90%; }
  .cd-prompt { bottom: 175px; }

}
/* mundos de grado: mismo HUD de mapas */
.mundo .cd-minibox { top: 8px; }
.mundo .cd-comp { top: 8px; }
.mundo .cd-trkbox { bottom: 160px; }
.mundo--max { display: flex; flex-direction: column; overflow: hidden; }
.mundo--max .mundo__hud { flex: 0 0 auto; }
.mundo--max .mundo__stage { flex: 1 1 auto; }
/* ===== Portada compacta ===== */
.land { display: grid; grid-template-columns: 1.25fr minmax(320px, 400px); gap: 20px; margin: 16px 0 18px; align-items: stretch; }
.land .hero { margin: 0; padding: 26px 30px; display: flex; align-items: center; min-height: 0; text-align: left; }
.land .hero__content { text-align: left; max-width: none; margin: 0; }
.hero__row { display: flex; align-items: center; gap: 14px; }
.land .hero__logo, .land .hero__brand img, .land .hero__brand svg { width: 58px !important; height: 58px !important; }
.land .hero__brand { margin: 0; flex: 0 0 auto; }
.land .hero__title { font-size: 1.7rem; margin: 0; }
.land .hero__inst { margin: 2px 0 0; font-size: .85rem; opacity: .85; }
.land .hero__tagline { font-size: 1.02rem; margin: 14px 0 6px; }
.hero__hello { margin: 0; font-size: .9rem; opacity: .8; }
.land .hero__pills { justify-content: flex-start; margin-top: 14px; }
.land .hero__pills span { font-size: .76rem; padding: 4px 11px; }
.land .login-card { margin: 0; padding: 20px 22px 16px; border-radius: 18px; box-shadow: 0 8px 26px rgba(15,31,77,.10); display: flex; flex-direction: column; justify-content: center; }
.land .login-card h2 { font-size: 1.15rem; margin: 0 0 2px; }
.land .login-card > .muted { font-size: .85rem; margin: 0 0 10px; }
.land .login-card .form-field { margin-bottom: 8px; }
.land .login-card input { padding: 9px 12px; font-size: .95rem; border-radius: 10px; }
.land .login-card__go { padding: 10px; font-size: .96rem; margin: 6px 0 6px; }
.land .login-card small { font-size: .76rem; }
@media (max-width: 860px) {
  .land { grid-template-columns: 1fr; }

}
/* moneda: zoom al tocarla */
.chalo-coin { cursor: zoom-in; }
.coin-zoom { position: fixed; inset: 0; z-index: 99999; background: rgba(15,23,42,.72); display: grid; place-items: center; backdrop-filter: blur(4px); animation: coinfade .18s ease; cursor: zoom-out; }
.coin-zoom__box { text-align: center; color: #fff; }
.coin-zoom__box .chalo-coin { width: min(62vw, 300px); height: min(62vw, 300px); filter: drop-shadow(0 18px 40px rgba(0,0,0,.55)); cursor: default; animation: coinpop .35s cubic-bezier(.2,1.4,.4,1); }
.coin-zoom__box strong { display: block; font-size: 1.4rem; margin-top: 14px; }
.coin-zoom__box small { opacity: .8; }
@keyframes coinfade { from { opacity: 0; } }
@keyframes coinpop { from { transform: scale(.3) rotate(-25deg); } }
/* =========================================================
   Videolecciones (js/videolecciones.js, js/screens-video.js)
   ========================================================= */
.vp { background: #0f172a; border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); outline: none; color: #fff; }
.vp:fullscreen { border-radius: 0; display: flex; flex-direction: column; }
.vp:fullscreen .vp__stage { flex: 1; aspect-ratio: auto; }
.vp__stage { position: relative; aspect-ratio: 16 / 9; background: linear-gradient(135deg, #f8fbff 0%, #eef3ff 100%); color: var(--ink); overflow: hidden; container-type: size; }
.vp__head { position: absolute; top: 0; left: 0; right: 0; padding: 1.4cqh 2cqw; z-index: 3; display: flex; }
.vp__cap { font-size: max(11px, 1.9cqw); font-weight: 800; color: #1d4ed8; background: rgba(255,255,255,.9); padding: .5cqh 1.4cqw; border-radius: 99px; box-shadow: var(--shadow-sm); }
.vp__scene { position: absolute; inset: 11cqh 2cqw 20cqh 2cqw; display: flex; align-items: center; justify-content: center; }
.vp__slide { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.vp__slide.is-in { animation: vpIn .5s ease both; }
@keyframes vpIn { from { opacity: 0; transform: translateY(10px) scale(.985); } to { opacity: 1; transform: none; } }
.vp__prof { position: absolute; right: 1.6cqw; top: 1.2cqh; z-index: 3; display: flex; align-items: center; gap: .8cqw; background: rgba(255,255,255,.95); border-radius: 99px; padding: .5cqh 1.2cqw .5cqh .5cqh; box-shadow: var(--shadow-sm); }
.vp__prof .vp-av { width: 7.5cqh; height: 7.5cqh; min-width: 34px; min-height: 34px; }
.vp__prof b { display: block; font-size: max(10px, 1.6cqw); line-height: 1.1; }
.vp__prof small { display: block; font-size: max(8px, 1.15cqw); color: var(--ink-soft); }
.vp-mouth { transform-origin: 50px 57px; }
.vp__prof.habla .vp-mouth { animation: vpMouth .32s infinite alternate ease-in-out; }
@keyframes vpMouth { from { transform: scaleY(.7); } to { transform: scaleY(3.2); } }
.vp__sub { position: absolute; left: 0; right: 0; bottom: 0; min-height: 10cqh; padding: 1.2cqh 3cqw; display: flex; align-items: center; justify-content: center; text-align: center; z-index: 3; }
.vp__sub span { background: rgba(15,23,42,.88); color: #fff; padding: .9cqh 1.8cqw; border-radius: 10px; font-size: max(12px, 2.05cqw); line-height: 1.3; max-width: 90cqw; }
.vp__sub span.en { font-style: italic; background: rgba(76,29,149,.9); }
.vp__big { position: absolute; inset: 0; z-index: 5; border: 0; cursor: pointer; background: radial-gradient(circle, rgba(15,23,42,.35), rgba(15,23,42,.72)); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.5cqh; font: inherit; }
.vp__big span { width: 14cqh; height: 14cqh; min-width: 56px; min-height: 56px; border-radius: 50%; background: #fff; color: #1d4ed8; display: flex; align-items: center; justify-content: center; font-size: 6cqh; padding-left: 1cqh; box-shadow: 0 8px 30px rgba(0,0,0,.4); transition: transform .2s; }
.vp__big:hover span { transform: scale(1.08); }
.vp__big em { font-style: normal; font-weight: 800; font-size: max(13px, 2.4cqw); }
.vp__end { position: absolute; inset: 0; z-index: 6; background: rgba(15,23,42,.82); display: flex; align-items: center; justify-content: center; padding: 3cqw; }
.vp__endbox { background: #fff; color: var(--ink); border-radius: 16px; padding: 3cqh 3cqw; text-align: center; max-width: 80cqw; }
.vp__endbox h3 { margin: .5cqh 0; font-size: max(16px, 3cqw); }
.vp__endbox p { font-size: max(12px, 1.9cqw); margin: .8cqh 0 1.6cqh; }
.vp__endico { font-size: 6cqh; }
.vp__endbtns { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.vp__bar { display: flex; align-items: center; gap: 6px; padding: 8px 10px; background: #0f172a; flex-wrap: wrap; }
.vp__b { border: 0; background: rgba(255,255,255,.12); color: #fff; border-radius: 8px; min-width: 36px; height: 34px; cursor: pointer; font: inherit; font-weight: 800; }
.vp__b:hover { background: rgba(255,255,255,.25); }
.vp__b.vp__cc:not(.is-on), .vp__b.vp__voz:not(.is-on) { opacity: .5; }
.vp__play { background: #2563eb; min-width: 44px; }
.vp__track { flex: 1; min-width: 160px; display: flex; gap: 3px; height: 34px; align-items: center; }
.vp__seg { flex: 1; height: 10px; border: 0; padding: 0; background: rgba(255,255,255,.2); border-radius: 4px; cursor: pointer; overflow: hidden; position: relative; transition: height .15s; }
.vp__seg:hover, .vp__seg.is-cur { height: 14px; }
.vp__seg i { display: block; height: 100%; width: 0; background: #60a5fa; }
.vp__seg.is-cur i { background: #fbbf24; }
.vp__time { font-size: .8rem; font-variant-numeric: tabular-nums; color: #cbd5e1; min-width: 78px; text-align: center; }
.vp__speed { background: rgba(255,255,255,.12); color: #fff; border: 0; border-radius: 8px; height: 34px; padding: 0 6px; font: inherit; }
.vp__speed option { color: #000; }
.vp__chaps { background: #fff; color: var(--ink); padding: 10px 14px; }
.vp__chaps summary { cursor: pointer; font-weight: 800; }
.vp__chaps ol { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; }
.vp__chaps li button { width: 100%; text-align: left; background: #f4f7fd; border: 2px solid transparent; border-radius: 8px; padding: 8px 10px; display: flex; justify-content: space-between; cursor: pointer; font: inherit; }
.vp__chaps li.is-cur button { border-color: #2563eb; background: #e7edfd; }
.vp__chaps li p { margin: 4px 10px 6px; font-size: .82rem; color: var(--ink-soft); display: none; }
.vp__chaps li.is-cur p { display: block; }
/* visuales dentro de la escena (escalan con el ancho del escenario) */
.vv { width: 100%; max-height: 100%; font-size: max(11px, 2.6cqw); line-height: 1.35; color: var(--ink); }
.vv-t { margin: 0 0 1.2cqh; font-size: 1.25em; color: #13327f; }
.vv-svg svg { width: 100%; max-height: 66cqh; height: auto; display: block; margin: 0 auto; }
.vsvg text { font-family: var(--font); }
.vr, .vr-m { opacity: 0; transform: translateY(12px); transition: opacity .55s ease, transform .55s ease; }
.vr.on, .vr-m.on { opacity: 1; transform: none; }
.vr.now { filter: drop-shadow(0 0 6px rgba(37,99,235,.35)); }
.vs { opacity: 0; transition: opacity .6s ease; }
.vs.on { opacity: 1; }
.vd { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1s ease; }
.vd.on { stroke-dashoffset: 0; }
.vv-portada { text-align: center; }
.vv-portada__ico { font-size: 2.6em; line-height: 1; }
.vv-portada h2 { margin: .1em 0; font-size: 1.55em; color: #13327f; }
.vv-sub { color: var(--ink-soft); margin: 0 0 1cqh; }
.vv-obj { list-style: none; margin: 1cqh auto 0; padding: 0; max-width: 96%; text-align: left; display: grid; grid-template-columns: 1fr 1fr; gap: .8cqh 1.2cqw; font-size: .82em; }
.vv-obj li { background: #fff; border-radius: 10px; padding: .45em .7em; box-shadow: var(--shadow-sm); display: flex; gap: .6em; }
.vv-obj li span { color: #16a34a; font-weight: 900; }
.vv-grid { display: grid; grid-template-columns: repeat(var(--cols, 3), 1fr); gap: 1.4cqw; }
.vv-card, .vv-rama, .vv-paso { background: #fff; border-radius: 12px; padding: .8em 1em; border-top: .35em solid var(--cc, #2563eb); box-shadow: var(--shadow-sm); }
.vv-card b, .vv-rama b, .vv-paso b { display: block; color: var(--cc, #13327f); }
.vv-card p, .vv-rama p, .vv-paso p { margin: .3em 0 0; font-size: .86em; color: var(--ink-soft); }
.vv-card__ico { font-size: 1.9em; line-height: 1.1; }
.vv-pasos ol { list-style: none; margin: 0; padding: 0; display: grid; gap: .6cqh; }
.vv-pasos li { display: flex; gap: .7em; align-items: flex-start; background: #fff; border-radius: 10px; padding: .45em .8em; box-shadow: var(--shadow-sm); }
.vv-n { min-width: 1.7em; height: 1.7em; border-radius: 50%; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: .9em; }
.vv-f { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 1.15em; font-weight: 700; color: #13327f; margin-top: .15em; }
.vv-enun { background: #fff7ed; border-left: .3em solid #ea580c; padding: .5em .8em; border-radius: 8px; margin-bottom: 1cqh; }
.vv-res { margin-top: 1cqh; background: #dcfce7; color: #14532d; font-weight: 800; padding: .55em .9em; border-radius: 10px; text-align: center; font-size: 1.1em; }
.vhl { background: #fde68a; border-radius: 4px; padding: 0 .2em; font-weight: 800; }
.vv-formula { text-align: center; }
.vv-big { font-size: 2.5em; font-weight: 900; color: #13327f; background: #fff; border-radius: 16px; padding: .3em .6em; display: inline-block; box-shadow: var(--shadow-sm); margin-bottom: 1.2cqh; }
.vv-leyenda { display: grid; gap: .5cqh; text-align: left; max-width: 80%; margin: 0 auto; }
.vv-leyenda i { display: inline-block; width: .8em; height: .8em; border-radius: 50%; margin-right: .4em; }
.vv-nota { background: #eef3ff; border-radius: 10px; padding: .5em .9em; margin: 1cqh auto 0; max-width: 90%; text-align: center; }
.vv-tabla { border-collapse: collapse; width: 100%; background: #fff; border-radius: 10px; overflow: hidden; box-shadow: var(--shadow-sm); }
.vv-tabla th { background: #1d4ed8; color: #fff; padding: .45em .6em; }
.vv-tabla td { padding: .4em .6em; border-top: 1px solid var(--border); text-align: center; }
.vv-tabla tr.vhi td { background: #fef9c3; font-weight: 800; }
.vv-dos { display: grid; grid-template-columns: 1fr 1fr; gap: 1.6cqw; }
.vv-lado { background: #fff; border-radius: 12px; padding: .7em 1em; border-top: .35em solid var(--cc); box-shadow: var(--shadow-sm); }
.vv-lado h4 { margin: 0 0 .3em; color: var(--cc); }
.vv-lado p { margin: .3em 0; }
.vv-proc { display: flex; flex-wrap: wrap; align-items: stretch; justify-content: center; gap: .6cqw; }
.vv-paso { flex: 1; min-width: 20%; text-align: center; }
.vv-flecha { align-self: center; color: #94a3b8; font-size: 1.6em; }
.vv-linea { display: flex; align-items: center; gap: .6cqw; border-top: .3em solid #1d4ed8; padding: 4cqh 0; margin-top: 3cqh; }
.vv-ev { flex: 1; text-align: center; position: relative; }
.vv-ev b { display: block; color: var(--cc); font-size: 1.2em; }
.vv-ev span { font-size: .85em; display: block; background: #fff; border-radius: 8px; padding: .3em .5em; box-shadow: var(--shadow-sm); }
.vv-ev.arriba { transform: translateY(-3.2em); }
.vv-ev.abajo { transform: translateY(3.2em); }
.vv-ev.vr, .vv-ev.vr.on { transition: opacity .5s; }
.vv-ev.vr { transform: none; }
.vv-ev.arriba.vr { margin-top: -4.4em; }
.vv-ev.abajo.vr { margin-top: 4.4em; }
.vv-esq { text-align: center; }
.vv-centro { display: inline-block; background: var(--cc, #1d4ed8); color: #fff; border-radius: 99px; padding: .5em 1.4em; font-weight: 900; font-size: 1.3em; margin-bottom: 1.4cqh; }
.vv-centro span { margin-right: .4em; }
.vv-ramas { display: grid; grid-template-columns: repeat(auto-fit, minmax(22%, 1fr)); gap: 1.2cqw; }
.vv-texto { background: #fff; border-radius: 12px; padding: 1em 1.2em; line-height: 1.9; font-size: 1.05em; box-shadow: var(--shadow-sm); }
.vr-m { background: color-mix(in srgb, var(--cc) 22%, transparent); border-bottom: .15em solid var(--cc); border-radius: 4px; padding: 0 .2em; display: inline; transform: none; }
.vr-m small { display: inline-block; background: var(--cc); color: #fff; border-radius: 6px; padding: 0 .4em; font-size: .6em; margin-left: .4em; font-weight: 800; vertical-align: middle; }
.vv-preg { max-width: 92%; }
.vv-ctx { background: #fff7ed; border-left: .3em solid #ea580c; padding: .4em .8em; border-radius: 8px; margin: 0 0 .6cqh; font-size: .92em; }
.vv-q { font-weight: 800; margin: .3em 0 .6cqh; }
.vv-ops { display: grid; grid-template-columns: 1fr 1fr; gap: .8cqh 1.2cqw; }
.vv-op { text-align: left; border: 2px solid #c7d2fe; background: #fff; border-radius: 10px; padding: .45em .7em; font: inherit; cursor: pointer; display: flex; gap: .5em; align-items: center; }
.vv-op b { background: #e7edfd; color: #1d4ed8; border-radius: 50%; min-width: 1.6em; height: 1.6em; display: inline-flex; align-items: center; justify-content: center; }
.vv-op:hover:not(:disabled) { border-color: #1d4ed8; }
.vv-op.ok { background: #dcfce7; border-color: #16a34a; }
.vv-op.no { background: #fee2e2; border-color: #dc2626; }
.vv-fb { margin-top: .8cqh; padding: .5em .8em; border-radius: 10px; font-size: .92em; }
.vv-fb.ok { background: #dcfce7; }
.vv-fb.no { background: #fff7ed; }
/* biblioteca / tarjetas */
.vid-hero { display: flex; gap: 14px; align-items: center; background: linear-gradient(120deg, #1d4ed8, #7c3aed); color: #fff; border-radius: 16px; padding: 16px 20px; margin-bottom: 16px; }
.vid-hero h2 { margin: 0 0 4px; }
.vid-hero p { margin: 0; opacity: .92; }
.vid-hero__ico { font-size: 2.6rem; }
.vid-chalo { display: flex; gap: 12px; align-items: flex-start; background: #fffbeb; border: 2px solid #fcd34d; border-radius: 14px; padding: 12px 14px; margin-bottom: 16px; }
.vid-chalo__ico { font-size: 2rem; }
.vid-chalo ul { margin: 6px 0 0; padding-left: 18px; }
.vid-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.vid-tab { border: 2px solid var(--border); background: #fff; border-radius: 99px; padding: 6px 14px; font: inherit; font-weight: 700; cursor: pointer; }
.vid-tab.is-on { background: var(--violet); border-color: var(--violet); color: #fff; }
.vid-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr)); gap: 14px; }
.vid-card { background: #fff; border-radius: 14px; overflow: hidden; box-shadow: var(--shadow-sm); border: 2px solid transparent; cursor: pointer; display: flex; flex-direction: column; text-align: left; padding: 0; font: inherit; }
.vid-card:hover, .vid-card:focus-visible { border-color: var(--violet); transform: translateY(-2px); }
.vid-card__th { aspect-ratio: 16 / 8; display: flex; align-items: center; justify-content: center; font-size: 2.6rem; position: relative; color: #fff; }
.vid-card__th::before { content: attr(data-s); position: absolute; inset: 0; display: flex; align-items: center; justify-content: space-around; font-size: 2.6rem; font-weight: 800; opacity: .16; letter-spacing: .4em; overflow: hidden; white-space: nowrap; }
.vid-card__th[data-m="matematicas"]::before { content: "π ∑ √ ± ÷ % ∞"; }
.vid-card__th[data-m="lectura-critica"]::before { content: "“ ” ¿? ¡! … ❝"; }
.vid-card__th[data-m="sociales-ciudadanas"]::before { content: "⚖ ★ ⚑ ⌂ ✦ ⚑"; }
.vid-card__th[data-m="ciencias-naturales"]::before { content: "⚛ ∆ λ ⚗ ☉ ⚡"; }
.vid-card__th[data-m="ingles"]::before { content: "A B C Ab ? ! ABC"; }
.vid-card__th small { position: absolute; right: 8px; bottom: 6px; background: rgba(0,0,0,.65); border-radius: 6px; padding: 1px 7px; font-size: .75rem; font-weight: 800; }
.vid-card__ok { position: absolute; left: 8px; top: 6px; background: #16a34a; border-radius: 99px; padding: 1px 9px; font-size: .72rem; font-weight: 800; }
.vid-card__why { position: absolute; left: 8px; top: 6px; background: #f59e0b; color: #1f2430; border-radius: 99px; padding: 1px 9px; font-size: .72rem; font-weight: 800; }
.vid-card__body { padding: 10px 12px 12px; }
.vid-card__body b { display: block; margin-bottom: 4px; color: var(--ink); }
.vid-card__body p { margin: 0; font-size: .82rem; color: var(--ink-soft); }
.vid-prof { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-size: .75rem; color: var(--ink-soft); }
.vid-prof .vp-av { width: 22px; height: 22px; }
.vid-info { margin-top: 14px; display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); }
.vid-info .card ul { margin: 6px 0 0; padding-left: 18px; }
.vid-sala { margin: 18px 0; }
@media (max-width: 640px) {
  .vv-dos, .vv-ops { grid-template-columns: 1fr; }
  .vp__prof small { display: none; }
  .vp__time { display: none; }

}
.usr-pres { font-size: .72rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: #f1f5f9; color: #475569; white-space: nowrap; }

/* ---------- Mundos: avisos legibles, sin taparse con la brújula, el jefe ni el minimapa ---------- */
/* Orden de arriba hacia abajo: brújula (8 px) → aviso (58 px) → barra del jefe (si hay jefe, el aviso baja debajo de ella). */
.mundo .mundo__msg { top: 58px; z-index: 6; max-width: max(240px, calc(100% - 340px)); padding: 10px 18px; border-radius: 16px; background: rgba(15, 23, 42, .94); color: #fff; border: 2px solid rgba(255, 255, 255, .28); box-shadow: 0 8px 22px rgba(0, 0, 0, .45); font-size: 1rem; font-weight: 700; line-height: 1.35; text-align: center; text-shadow: 0 1px 2px rgba(0, 0, 0, .6); pointer-events: none; }
.mundo .mundo__msg.is-in { animation: mundoMsgIn .22s ease-out; }
@keyframes mundoMsgIn { from { opacity: 0; transform: translate(-50%, -8px); } to { opacity: 1; transform: translate(-50%, 0); } }
.mundo .mundo__boss { top: 58px; z-index: 5; }
.mundo .mundo__stage:has(.mundo__boss:not([hidden])) .mundo__msg { top: 104px; }
.mundo .mundo__prompt { z-index: 6; background: rgba(15, 23, 42, .94); color: #fff; border: 2px solid rgba(255, 255, 255, .28); font-size: .95rem; padding: 9px 18px; box-shadow: 0 6px 18px rgba(0, 0, 0, .4); }
.mundo .mundo__trk { background: rgba(15, 23, 42, .9); color: #fff; font-size: .85rem; padding: 7px 13px; border: 1.5px solid rgba(255, 255, 255, .22); }
.mundo .cd-guiar { box-shadow: 0 4px 12px rgba(0, 0, 0, .35); font-size: .88rem; padding: 7px 14px; }
.mundo__btn--lug { background: #f59e0b; color: #422006; }

/* Lista «📍 Lugares» */
.mundo__lugcard { max-width: 520px; text-align: left; max-height: 88vh; }
.mundo__lugs { display: grid; gap: 6px; overflow-y: auto; max-height: 52vh; padding-right: 2px; }
.mundo__lugh { margin: 8px 0 2px; font-size: .78rem; color: #475569; text-transform: uppercase; letter-spacing: .04em; }
.mundo__lug { all: unset; box-sizing: border-box; cursor: pointer; display: grid; grid-template-columns: 34px 1fr auto auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 12px; background: #f1f5ff; border: 1.5px solid #dbe4fb; }
.mundo__lug:hover, .mundo__lug:focus-visible { background: #e3ebff; border-color: #6366f1; }
.mundo__lug__i { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: #fff; font-size: 1.1rem; box-shadow: 0 1px 3px rgba(15, 23, 42, .15); }
.mundo__lug b { font-size: .92rem; color: #0f172a; }
.mundo__lug em { font-style: normal; font-size: .76rem; color: #475569; white-space: nowrap; }
.mundo__lug i:last-child { font-style: normal; font-size: .72rem; font-weight: 800; color: #fff; background: #4f46e5; padding: 4px 9px; border-radius: 99px; white-space: nowrap; }
.mundo__lug.is-ok { opacity: .72; } .mundo__lug.is-ok i:last-child { background: #64748b; }
@media (max-width: 520px) { .mundo__lug { grid-template-columns: 34px 1fr auto; } .mundo__lug i:last-child { display: none; } }

/* ---------- Reiniciar a un estudiante (reinicio-estudiante.js) ---------- */
.re-modal { width: min(560px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column; background: #fff; border-radius: 22px; overflow: hidden; box-shadow: 0 26px 80px rgba(8,15,40,.45); }
.re-head { display: flex; align-items: center; gap: 14px; padding: 16px 18px; color: #fff; background: linear-gradient(120deg, #1e3a8a, #2e5bd8 70%, #6d28d9); }
.re-head__av { flex: none; width: 52px; height: 52px; display: grid; place-items: center; font-size: 1.9rem; border-radius: 16px; background: rgba(255,255,255,.18); }
.re-head__t { flex: 1; min-width: 0; }
.re-head__t small { opacity: .8; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; font-size: .72rem; }
.re-head__t h3 { margin: 1px 0 2px; color: #fff; font-size: 1.15rem; overflow-wrap: anywhere; }
.re-head__t p { margin: 0; opacity: .85; font-size: .84rem; }
.re-x { flex: none; border: 0; background: rgba(255,255,255,.18); color: #fff; width: 34px; height: 34px; border-radius: 10px; cursor: pointer; font-size: 1rem; }
.re-x:hover { background: rgba(255,255,255,.3); }
.re-body { padding: 16px 18px 6px; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; }
.re-body > * { flex: none; }
.re-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.re-kpis > div { display: grid; text-align: center; padding: 9px 4px; border-radius: 14px; background: #f3f6ff; border: 1px solid #dbe5fb; }
.re-kpis b { font-size: 1.15rem; color: #1d4ed8; line-height: 1.1; }
.re-kpis span { font-size: .72rem; font-weight: 700; color: #5b6b94; }
.re-step { display: flex; align-items: center; gap: 9px; font-weight: 800; color: #0f1f4d; margin-top: 4px; }
.re-step i { font-style: normal; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: #1d4ed8; color: #fff; font-size: .8rem; }
.re-presets { display: flex; flex-wrap: wrap; gap: 6px; margin-top: -4px; }
.re-list { display: grid; gap: 8px; }
.re-opt { position: relative; display: flex; align-items: center; gap: 12px; padding: 11px 13px; border: 1.5px solid #dbe3f5; border-radius: 15px; background: #fff; cursor: pointer; transition: border-color .15s, background .15s, box-shadow .15s; }
.re-opt:hover { border-color: #93a8e6; }
.re-opt.is-on { border-color: #dc2626; background: #fff6f6; box-shadow: 0 2px 10px rgba(220,38,38,.1); }
.re-opt input { position: absolute; opacity: 0; pointer-events: none; }
.re-opt input:focus-visible ~ .re-sw { outline: 3px solid #93c5fd; outline-offset: 2px; }
.re-opt__ico { flex: none; width: 40px; height: 40px; display: grid; place-items: center; font-size: 1.3rem; border-radius: 12px; background: #eef2fb; }
.re-opt.is-on .re-opt__ico { background: #ffe1e1; }
.re-opt__txt { flex: 1; min-width: 0; display: grid; gap: 1px; }
.re-opt__txt b { color: #0f1f4d; font-size: .95rem; }
.re-opt__txt small { color: #5b6b94; line-height: 1.35; }
.re-opt__txt em { font-style: normal; font-weight: 700; font-size: .78rem; color: #b91c1c; }
.re-sw { flex: none; width: 42px; height: 24px; border-radius: 999px; background: #cbd5e6; position: relative; transition: background .15s; }
.re-sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .15s; }
.re-opt.is-on .re-sw { background: #dc2626; }
.re-opt.is-on .re-sw::after { transform: translateX(18px); }
.re-keep { padding: 10px 12px; border-radius: 13px; background: #e4f6ea; border: 1px solid #bfe6cb; color: #14532d; font-size: .86rem; line-height: 1.45; }
.re-close { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 13px; background: #f6f8fd; border: 1px solid #e3e9f7; font-size: .88rem; cursor: pointer; }
.re-close input { margin-top: 3px; }
.re-close small { color: #5b6b94; }
.re-err { margin: 0; padding: 9px 12px; border-radius: 12px; background: #ffe7e7; border: 1px solid #f6c3c3; color: #991b1b; font-weight: 700; font-size: .88rem; }
.re-note { margin: 0; font-size: .8rem; color: #5b6b94; }
.re-foot { display: flex; gap: 10px; justify-content: flex-end; padding: 12px 18px 16px; border-top: 1px solid #eef1f8; background: #fff; }
.re-go { border: 0; border-radius: 12px; padding: 11px 18px; font: inherit; font-weight: 800; color: #fff; cursor: pointer; background: linear-gradient(120deg, #dc2626, #b91c1c); }
.re-go:hover:not(:disabled) { filter: brightness(1.08); }
.re-go:disabled { opacity: .45; cursor: not-allowed; }
.re-done { padding: 28px 22px 24px; text-align: center; display: grid; gap: 8px; justify-items: center; }
.re-done__ico { font-size: 3rem; }
.re-done h3 { margin: 0; color: #0f1f4d; }
.re-done ul { list-style: none; margin: 4px 0; padding: 0; display: grid; gap: 6px; text-align: left; }
.re-done li { display: flex; gap: 9px; align-items: center; padding: 7px 14px; border-radius: 12px; background: #e4f6ea; color: #14532d; font-weight: 700; }
/* buscador de la zona de peligro */
.re-find { margin: 0 0 18px; padding: 16px; border-radius: 18px; border: 1.5px solid #f4dba6; background: linear-gradient(135deg, #fff8e8, #fff 75%); }
.re-find__h { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; }
.re-find__h > span { flex: none; width: 44px; height: 44px; display: grid; place-items: center; font-size: 1.5rem; border-radius: 14px; background: #ffe9b8; }
.re-find__h h4 { margin: 0; color: #0f1f4d; }
.re-find__h p { margin: 2px 0 0; color: #5b6b94; font-size: .88rem; }
.re-find__list { display: grid; gap: 8px; margin-top: 8px; }
.re-row { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 13px; background: #fff; border: 1px solid #e3e9f7; }
.re-row__av { flex: none; width: 38px; height: 38px; display: grid; place-items: center; font-size: 1.3rem; border-radius: 12px; background: #eef2fb; }
.re-row__t { flex: 1; min-width: 0; display: grid; }
.re-row__t small { color: #5b6b94; }
@media (max-width: 520px) { .re-kpis { grid-template-columns: repeat(2, 1fr); } .re-foot { flex-direction: column-reverse; } .re-foot .btn, .re-go { width: 100%; } }

/* ---- Reinicio de estudiante: simulacros puntuales y resumen ---- */
.re-modal { width: min(640px, 100%); }
.re-sims { border: 1.5px solid #dbe3f5; border-radius: 16px; background: #fff; overflow: hidden; }
.re-sims__h { display: flex; align-items: center; gap: 12px; padding: 11px 14px; background: linear-gradient(120deg, #eef3ff, #fff); border-bottom: 1px solid #e3e9f7; }
.re-sims__ico { flex: none; width: 40px; height: 40px; display: grid; place-items: center; font-size: 1.3rem; border-radius: 12px; background: #dfe8ff; }
.re-sims__h > div { flex: 1; min-width: 0; display: grid; }
.re-sims__h b { color: #0f1f4d; }
.re-sims__h small { color: #5b6b94; line-height: 1.35; }
.re-sims__n { flex: none; padding: 3px 11px; border-radius: 999px; background: #dc2626; color: #fff; font-weight: 800; font-size: .8rem; }
.re-sims__n[hidden] { display: none; }
.re-sims__bar { display: grid; gap: 8px; padding: 10px 12px; border-bottom: 1px solid #eef1f8; background: #fafbff; }
.re-sims__chips, .re-sims__acts { display: flex; flex-wrap: wrap; gap: 6px; }
.re-sims__chips .ax-fchip b { margin-left: 2px; opacity: .75; }
.re-sims__list { display: grid; gap: 6px; padding: 10px 12px; max-height: 270px; overflow-y: auto; }
.re-sims__vacio { margin: 0; padding: 14px; color: #5b6b94; text-align: center; }
.re-sim { display: flex; align-items: center; gap: 11px; padding: 8px 11px; border: 1.5px solid #e3e9f7; border-radius: 12px; background: #fff; cursor: pointer; transition: border-color .15s, background .15s; }
.re-sim:hover { border-color: #93a8e6; }
.re-sim.is-on { border-color: #dc2626; background: #fff6f6; }
.re-sim input { position: absolute; opacity: 0; pointer-events: none; }
.re-sim input:focus-visible ~ .re-sw { outline: 3px solid #93c5fd; outline-offset: 2px; }
.re-sim__ico { flex: none; width: 34px; height: 34px; display: grid; place-items: center; font-size: 1.1rem; border-radius: 10px; background: #eef2fb; }
.re-sim__t { flex: 1; min-width: 0; display: grid; line-height: 1.25; }
.re-sim__t b { color: #0f1f4d; font-size: .9rem; }
.re-sim__t small { color: #5b6b94; font-size: .78rem; overflow-wrap: anywhere; }
.re-sim__nota { flex: none; font-weight: 800; font-size: .82rem; color: #1d4ed8; background: #e8efff; border-radius: 999px; padding: 3px 10px; }
.re-sim.is-on .re-sim__nota { background: #ffe1e1; color: #b91c1c; }
.re-sw--sm { width: 36px; height: 21px; }
.re-sw--sm::after { width: 15px; height: 15px; }
.re-sim.is-on .re-sw { background: #dc2626; }
.re-sim.is-on .re-sw--sm::after { transform: translateX(15px); }
.re-sum { display: grid; grid-template-columns: 1.3fr 1fr; gap: 10px; }
.re-sum__col { padding: 12px 14px; border-radius: 14px; }
.re-sum__col h4 { margin: 0 0 6px; font-size: .92rem; }
.re-sum__col ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; font-size: .86rem; line-height: 1.35; }
.re-sum__col li { display: flex; gap: 8px; align-items: flex-start; }
.re-sum__col--del { background: #fff1f1; border: 1px solid #f6c3c3; color: #7f1d1d; }
.re-sum__col--del h4 { color: #b91c1c; }
.re-sum__col--keep { background: #e9f8ee; border: 1px solid #bfe6cb; color: #14532d; }
.re-sum__col--keep li::before { content: "✓"; font-weight: 800; color: #15803d; }
.re-sum__vacio { grid-column: 1 / -1; margin: 0; padding: 14px; text-align: center; border-radius: 14px; background: #f6f8fd; border: 1.5px dashed #c9d5f2; color: #5b6b94; }
@media (max-width: 560px) { .re-sum { grid-template-columns: 1fr; } .re-sim__nota { display: none; } }
.kid-pick__mode { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.cg-vigpanel { margin: 10px 0 2px; padding: 12px 14px; border-radius: 14px; background: #f6f8fd; border: 1.5px solid #cdd9f5; display: grid; gap: 8px; } .cg-vigpanel h5 { margin: 0; color: #0f1f4d; }

/* ---- Filtro extra «Con / Sin …» (js/filtros.js, opts.extras): botones segmentados con contador ---- */
.flt__x { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; padding-top: 10px; border-top: 1px dashed #d3dcf2; }
.flt-seg { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; }
.flt-seg__l { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: #475569; }
.flt-seg__l i { font-style: normal; font-size: 1rem; }
.flt-seg__b { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 3px; border-radius: 999px; background: #e8edf8; max-width: 100%; }
.flt-seg__o { border: 0; background: transparent; color: #334155; font: inherit; font-weight: 700; font-size: .85rem; padding: 7px 14px; border-radius: 999px; cursor: pointer; transition: background .15s, color .15s, box-shadow .15s; min-height: 36px; }
.flt-seg__o b { display: inline-block; min-width: 1.6em; margin-left: 4px; padding: 0 6px; border-radius: 999px; background: rgba(15, 23, 42, .09); font-size: .74rem; line-height: 1.6; text-align: center; }
.flt-seg__o:hover { background: #fff; }
.flt-seg__o.is-on { background: #1d4ed8; color: #fff; box-shadow: 0 2px 8px rgba(29, 78, 216, .35); }
.flt-seg__o--ok.is-on { background: #15803d; box-shadow: 0 2px 8px rgba(21, 128, 61, .35); }
.flt-seg__o--no.is-on { background: #c2410c; box-shadow: 0 2px 8px rgba(194, 65, 12, .35); }
.flt-seg__o.is-on b { background: rgba(255, 255, 255, .25); }
.flt-seg__o:focus-visible { outline: 2px solid #1d4ed8; outline-offset: 2px; }
@media (max-width: 600px) { .flt__x { flex-direction: column; align-items: stretch; } .flt-seg__b { border-radius: 16px; } .flt-seg__o { flex: 1 1 auto; text-align: center; } }

/* ---- Portal de familias: ruta de 200 días ---- */
.fe-rt__big { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 10px 0 12px; }
.fe-rt__big > div { background: #f5f3ff; border-radius: 14px; padding: 12px; text-align: center; }
.fe-rt__big b { display: block; font-size: 1.6rem; color: #4338ca; line-height: 1.1; }
.fe-rt__big small { color: #64748b; font-size: .76rem; }
.fe-rt__bar { height: 12px; border-radius: 99px; background: #e0e7ff; overflow: hidden; }
.fe-rt__bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #6366f1, #22c55e); }
.fe-rt__ph-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 12px 0; }
.fe-rt__ph { border: 2px solid #e2e8f0; border-radius: 12px; padding: 8px; text-align: center; font-size: .8rem; }
.fe-rt__ph b { display: block; color: #334155; }
.fe-rt__ph small { color: #64748b; }
.fe-rt__ph.is-done { background: #ecfdf5; border-color: #86efac; }
.fe-rt__ph.is-now { background: #eef2ff; border-color: #818cf8; box-shadow: 0 0 0 3px rgba(99, 102, 241, .15); }
.fe-rt__meta { font-size: .88rem; line-height: 1.5; color: #334155; margin: 6px 0; }
.fe-rt__ok { color: #15803d; font-weight: 700; }
.fe-rt__lag { color: #b45309; font-weight: 700; }
@media (max-width: 520px) { .fe-rt__big { grid-template-columns: 1fr; } .fe-rt__big > div { display: flex; align-items: baseline; gap: 10px; text-align: left; } .fe-rt__ph-row { grid-template-columns: repeat(2, 1fr); } }

/* Reinicio de estudiante: modos (simulacros específicos / por áreas) y cuadro de lo que se borra */
.re-areas[hidden], .re-sims[hidden] { display: none !important; }
.re-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 4px 0 12px; }
.re-mode { text-align: left; padding: 10px 12px; border: 1.5px solid #dbe3f5; border-radius: 14px; background: #fff; cursor: pointer; display: grid; gap: 2px; font: inherit; color: inherit; }
.re-mode small { color: #64748b; font-size: .78rem; line-height: 1.3; }
.re-mode.is-on { border-color: #2563eb; background: #eff4ff; box-shadow: 0 0 0 2px rgba(37,99,235,.15); }
.re-tab { width: 100%; border-collapse: collapse; font-size: .82rem; margin: 2px 0 8px; background: rgba(255,255,255,.6); border-radius: 8px; overflow: hidden; }
.re-tab th, .re-tab td { padding: 5px 7px; text-align: left; border-bottom: 1px solid #f6c3c3; }
.re-tab th { font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; }
@media (max-width: 640px) { .re-modes { grid-template-columns: 1fr; } .re-sum { grid-template-columns: 1fr; } .re-tab { font-size: .76rem; } }

/* Selección masiva (eliminar varios) */
.msel { margin: 8px 0; }
.msel__bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 9px 12px; background: #fff7ed; border: 1.5px solid #fdba74; border-radius: 14px; position: sticky; top: 8px; z-index: 5; }
.msel__n { margin-right: auto; font-size: .9rem; color: #7c2d12; }
.msel__del { all: unset; cursor: pointer; padding: 6px 14px; border-radius: 10px; background: #dc2626; color: #fff; font-weight: 800; font-size: .86rem; }
.msel__del[disabled] { opacity: .4; cursor: not-allowed; }
.msel-fila { position: relative; padding-left: 46px !important; }
.msel-fila.is-marcada { background: #fff1f1; border-color: #f6c3c3; }
.msel__box { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); display: flex; align-items: center; padding: 4px; cursor: pointer; z-index: 2; }
.msel__box input { width: 20px; height: 20px; accent-color: #dc2626; cursor: pointer; }
.msel-lista { margin: 0 0 10px; padding: 0 0 0 18px; max-height: 220px; overflow: auto; font-size: .88rem; }
.msel-lista small { color: #64748b; }
.msel-aviso { background: #fff1f1; border: 1px solid #f6c3c3; color: #7f1d1d; border-radius: 12px; padding: 9px 12px; font-size: .86rem; }
.msel-prog { height: 8px; background: #e5e7eb; border-radius: 6px; overflow: hidden; margin-top: 8px; }
.msel-prog i { display: block; height: 100%; width: 0; background: #dc2626; transition: width .2s; }
@media (max-width: 640px) { .msel__n { width: 100%; } }

/* ===== Acudiente: competencias por colores (semáforo) ===== */
.cmp-ley { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 2px 0 10px; font-size: .8rem; color: #475569; }
.cmp-ley span { display: inline-flex; align-items: center; gap: 6px; }
.cmp-dot { display: inline-block; width: 11px; height: 11px; border-radius: 50%; }
.cmp-dot--verde { background: #16a34a; } .cmp-dot--amarillo { background: #f59e0b; } .cmp-dot--rojo { background: #dc2626; }
.cmp-row .bar-row__val { width: auto; min-width: 128px; text-align: left; font-weight: 800; }
.adm--padres .cmp-row .bar-row__fill, .cmp-row .bar-row__fill { transition: width .4s; }
.adm--padres .cmp-row--verde .bar-row__fill, .cmp-row--verde .bar-row__fill { background: linear-gradient(90deg, #16a34a, #4ade80); }
.adm--padres .cmp-row--amarillo .bar-row__fill, .cmp-row--amarillo .bar-row__fill { background: linear-gradient(90deg, #f59e0b, #fcd34d); }
.adm--padres .cmp-row--rojo .bar-row__fill, .cmp-row--rojo .bar-row__fill { background: linear-gradient(90deg, #dc2626, #f87171); }
.cmp-row--verde .bar-row__val { color: #15803d; } .cmp-row--amarillo .bar-row__val { color: #b45309; } .cmp-row--rojo .bar-row__val { color: #b91c1c; }

/* ===== Acudiente: línea del tiempo de los 200 días en colores ===== */
.fe-rt__big > .is-main { background: #eef2ff; border: 2px solid #c7d2fe; }
.fe-rt__lin { margin: 14px 0 6px; }
.fe-tl__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.fe-tl__fase { border: 2px solid #e2e8f0; border-radius: 14px; padding: 9px 11px 11px; background: #fff; }
.fe-tl__fase header { display: grid; gap: 1px; margin-bottom: 8px; }
.fe-tl__fase header b { color: #1e293b; font-size: .9rem; } .fe-tl__fase header small { color: #64748b; } .fe-tl__fase header em { font-style: normal; font-size: .76rem; font-weight: 700; color: #475569; }
.fe-tl__fase--verde { border-color: #86efac; background: #f3fdf6; } .fe-tl__fase--ambar { border-color: #fcd34d; background: #fffcf0; } .fe-tl__fase--rojo { border-color: #fca5a5; background: #fff6f6; } .fe-tl__fase--gris { background: #f8fafc; }
.fe-tl__fase.is-now { box-shadow: 0 0 0 3px rgba(59, 130, 246, .25); }
.fe-tl__cells { display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; }
.fe-tl__c { display: block; aspect-ratio: 1; border-radius: 5px; min-width: 0; }
.fe-tl__ley .fe-tl__c { display: inline-block; width: 13px; aspect-ratio: auto; height: 13px; margin-right: 6px; vertical-align: -2px; }
.fe-tl__c--completo { background: #16a34a; }
.fe-tl__c--parcial, .fe-tl__c--parcial-hoy { background: #f59e0b; }
.fe-tl__c--falto { background: #fca5a5; }
.fe-tl__c--hoy, .fe-tl__c--parcial-hoy { box-shadow: 0 0 0 2px #fff, 0 0 0 4px #2563eb; }
.fe-tl__c--hoy { background: #bfdbfe; }
.fe-tl__c--futuro { background: #e5e9f2; }
.fe-tl__ley { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 10px 0 0; padding: 0; font-size: .8rem; color: #475569; }
.fe-tl__ley li { display: inline-flex; align-items: center; } .fe-tl__ley b { margin-left: 5px; color: #0f172a; }
@media (max-width: 640px) { .fe-tl__grid { grid-template-columns: 1fr; } }

/* ===== Acudiente (rediseño compacto): franjas de datos, línea de 200 días, insignias ===== */
.pf-strip, .pn-strip { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 10px; }
.pf-st, .pn-st { flex: 1 1 170px; display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 12px; background: #f8faff; border: 1px solid #e3e9f7; border-left: 4px solid var(--stc, #2563eb); min-width: 0; }
.pf-st strong, .pn-st strong { display: block; font-size: 1.05rem; color: #0f1f4d; line-height: 1.15; }
.pf-st small, .pn-st small { color: #64748b; font-size: .76rem; }
.pf-st__i, .pn-st__i { font-size: 1.25rem; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: #fff; flex: none; }
.pf-st.t-azul, .pn-st.azul { --stc: #2563eb; } .pf-st.t-verde, .pn-st.verde { --stc: #16a34a; } .pf-st.t-violeta, .pn-st.violeta { --stc: #7c3aed; }
.pn-st.rosa { --stc: #db2777; } .pn-st.cian { --stc: #0891b2; } .pf-st.t-amarillo { --stc: #f59e0b; } .pf-st.t-naranja { --stc: #ea580c; } .pf-st.t-gris { --stc: #94a3b8; }
.pn-strip { margin-top: 0; }

/* línea de 200 días compacta */
.fe-rt2 { padding-bottom: 12px; }
.fe-rt2__h h3 { margin: 0 0 2px; } .fe-rt2__h p { margin: 0 0 8px; font-size: .9rem; color: #334155; }
.fe-rt2 .fe-rt__lin { margin: 0; }
.fe-rt2__f { margin: 8px 0 0; font-size: .84rem; color: #475569; }
.fe-tl2__strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.fe-tl2__cells { display: flex; gap: 1px; height: 18px; }
.fe-tl2__cells .fe-tl__c { flex: 1; aspect-ratio: auto; height: 100%; border-radius: 2px; min-width: 0; }
.fe-tl2__cells .fe-tl__c--hoy, .fe-tl2__cells .fe-tl__c--parcial-hoy { box-shadow: 0 0 0 2px #2563eb; position: relative; z-index: 1; }
.fe-tl2__et small { display: block; margin-top: 3px; font-size: .72rem; color: #64748b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fe-tl2__et small b { color: #0f172a; }
.fe-tl2__ley { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 8px 0 0; padding: 0; font-size: .76rem; color: #475569; }
.fe-tl2__ley li { display: inline-flex; align-items: center; gap: 5px; } .fe-tl2__ley .fe-tl__c { display: inline-block; width: 11px; height: 11px; aspect-ratio: auto; border-radius: 3px; }
@media (max-width: 560px) { .fe-tl2__strip { grid-template-columns: 1fr 1fr; } }

/* insignias con color */
.ins-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(230px, 100%), 1fr)); gap: 10px; }
.ins { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 14px; background: linear-gradient(135deg, var(--c2), #fff 85%); border: 1.5px solid var(--c1); min-width: 0; }
.ins__i { width: 46px; height: 46px; border-radius: 50%; flex: none; display: grid; place-items: center; color: #fff; background: radial-gradient(circle at 30% 25%, var(--c2), var(--c1) 70%); box-shadow: 0 3px 8px rgba(15, 23, 42, .22), inset 0 -3px 5px rgba(0, 0, 0, .18); }
.ins__i .icon { width: 24px; height: 24px; }
.ins b { display: block; color: #0f1f4d; font-size: .9rem; line-height: 1.15; } .ins small { display: block; color: #475569; font-size: .74rem; line-height: 1.25; margin-top: 2px; }
.ins em { font-style: normal; display: inline-block; margin-top: 3px; font-size: .66rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--c1); }

/* ===== Guía para familias ===== */
.gd__intro { padding: 12px 16px; border-radius: 14px; background: linear-gradient(135deg, #eef3ff, #fff); border: 1px solid #d5e0fb; color: #334155; margin-bottom: 12px; }
.gd__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); gap: 12px; }
.gd__c { background: #fff; border: 1px solid #e3e9f7; border-top: 4px solid var(--g, #2563eb); border-radius: 16px; padding: 12px 16px 14px; min-width: 0; }
.gd__c h3 { margin: 0 0 8px; font-size: 1rem; color: #0f1f4d; display: flex; align-items: center; gap: 8px; }
.gd__c h3 span { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: color-mix(in srgb, var(--g) 15%, #fff); }
.gd__c ul { margin: 0; padding-left: 18px; display: grid; gap: 6px; font-size: .9rem; color: #334155; line-height: 1.45; }
.gd__c--azul { --g: #2563eb; } .gd__c--verde { --g: #16a34a; } .gd__c--violeta { --g: #7c3aed; } .gd__c--naranja { --g: #ea580c; } .gd__c--rosa { --g: #db2777; } .gd__c--cian { --g: #0891b2; }
