/* Malenity — estilos base. Colores y tipografías en :root para cambiar la marca fácilmente. */
:root {
  --bg: #fcf8f7;
  --surface: #ffffff;
  --text: #2a2230;
  --muted: #766c7e;
  --border: #eee4e6;
  --brand: #f898b4;        /* rosa del logo (acentos, no para texto) */
  --primary: #c42a5c;      /* frambuesa: botones y links, contraste OK con blanco */
  --primary-soft: #fdeef2; /* rosa muy claro: fondos de etiquetas y mensajes */
  --primary-ink: #ffffff;
  --success: #1f8a4c;
  --danger: #c0392b;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(42, 34, 48, .04), 0 8px 24px rgba(42, 34, 48, .05);
  --shadow-hover: 0 2px 4px rgba(42, 34, 48, .05), 0 14px 32px rgba(42, 34, 48, .09);
  --font-titulos: "Fraunces", Georgia, "Times New Roman", serif;
  --font-texto: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; } /* que `hidden` gane aunque la clase tenga display */
body {
  margin: 0; font: 400 16px/1.6 var(--font-texto); background: var(--bg); color: var(--text);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { font-family: var(--font-titulos); font-weight: 500; letter-spacing: -.015em; line-height: 1.2; font-optical-sizing: auto; }
h1 { font-size: 2.1rem; margin: .2em 0 .5em; }
h2 { font-size: 1.45rem; margin: 1.4em 0 .6em; }
h3 { font-size: 1.15rem; margin: .3em 0; }
h4 { font-family: var(--font-texto); }
strong { font-weight: 600; }

/* Íconos de línea ({% icono %}) */
.icono { width: 1.1em; height: 1.1em; vertical-align: -.18em; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.icono--lleno { fill: currentColor; stroke: none; }
.icono--grande { width: 1.6rem; height: 1.6rem; }

.wrap { max-width: 1160px; margin: 0 auto; padding: 0 20px; }
.main { padding-top: 32px; padding-bottom: 64px; min-height: 70vh; }
.footer { position: relative; color: var(--muted); font-size: .85rem; padding-top: 24px; padding-bottom: 32px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.footer::before { content: ""; position: absolute; top: 0; left: 20px; right: 20px; border-top: 1px solid var(--border); }
.muted { color: var(--muted); }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }
.inline { display: inline; }
.volver { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: .92rem; }
.volver:hover { color: var(--text); text-decoration: none; }

/* Topbar */
.topbar { background: rgba(255, 255, 255, .88); backdrop-filter: saturate(180%) blur(10px); -webkit-backdrop-filter: saturate(180%) blur(10px); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 10; }
.topbar__in { display: flex; align-items: center; justify-content: space-between; min-height: 68px; gap: 16px; flex-wrap: wrap; }
.logo { display: flex; align-items: center; }
.logo img { height: 46px; width: auto; }
.logo:hover { text-decoration: none; }
.nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; margin-left: auto; }
.nav a { color: var(--muted); font-weight: 500; font-size: .95rem; padding: 8px 12px; border-radius: 999px; transition: color .15s, background .15s; }
.nav a:hover { color: var(--text); background: var(--primary-soft); text-decoration: none; }
.nav a.on { color: var(--primary); background: var(--primary-soft); }
.nav a.btn { color: var(--primary-ink); padding: 8px 18px; margin-left: 4px; }
.nav a.btn:hover { background: var(--primary); }
.avatar { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--primary-soft); color: var(--primary) !important; font: 600 1rem var(--font-titulos); flex-shrink: 0; border: 1px solid #f6d3de; padding: 0; cursor: pointer; overflow: hidden; -webkit-tap-highlight-color: transparent; transition: box-shadow .15s; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.menu-usuario { margin-left: 8px; }
.icono--rosa { color: var(--primary); }
.avatar:hover { box-shadow: 0 0 0 4px var(--primary-soft); }
.avatar:focus-visible, .avatar[aria-expanded="true"] { outline: 2px solid var(--brand); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.menu-usuario { position: relative; }
.menu-usuario__panel {
  position: absolute; right: 0; top: calc(100% + 12px); z-index: 20; width: 270px; max-width: calc(100vw - 32px);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: 0 16px 40px rgba(42, 34, 48, .14); padding: 8px; display: flex; flex-direction: column;
}
.menu-usuario__cabecera { display: flex; flex-direction: column; gap: 3px; align-items: flex-start; padding: 10px 12px 14px; border-bottom: 1px solid var(--border); margin-bottom: 6px; overflow-wrap: anywhere; }
.menu-usuario__cabecera strong { font-family: var(--font-titulos); font-weight: 500; font-size: 1.1rem; }
.menu-usuario__cabecera .plan-tag { margin-top: 6px; }
.menu-usuario__panel a, .menu-usuario__salir { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 10px 12px; border-radius: var(--radius-sm); color: var(--text); background: none; border: 0; font: inherit; font-size: .95rem; cursor: pointer; }
.menu-usuario__panel a .icono, .menu-usuario__salir .icono { color: var(--muted); }
.menu-usuario__panel a:hover, .menu-usuario__salir:hover { background: var(--primary-soft); text-decoration: none; }
.menu-usuario__panel form { margin: 6px 0 0; padding-top: 6px; border-top: 1px solid var(--border); }
.menu-usuario__salir, .menu-usuario__salir .icono { color: var(--danger) !important; }
@media (max-width: 760px) {
  /* Celular: logo y cuenta arriba; las secciones en una fila que se desliza de costado */
  .topbar__in { gap: 0 12px; min-height: 60px; padding-top: 8px; }
  .logo img { height: 40px; }
  .menu-usuario { margin-left: auto; }
  .nav { order: 3; width: calc(100% + 40px); margin: 0 -20px; padding: 0 16px 10px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { white-space: nowrap; padding: 7px 12px; }
}
@media (max-width: 600px) {
  /* En el celular el menú sube desde abajo, sobre un fondo oscurecido */
  .menu-usuario__panel { position: fixed; top: auto; left: 12px; right: 12px; bottom: 12px; width: auto; max-width: none; padding: 12px; box-shadow: 0 0 0 100vmax rgba(42, 34, 48, .35), 0 12px 32px rgba(42, 34, 48, .2); }
  .menu-usuario__panel a, .menu-usuario__salir { padding: 13px 12px; }
}

/* Botones */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--primary); color: var(--primary-ink); border: 1px solid transparent; border-radius: 999px; padding: 11px 22px; font: inherit; font-weight: 600; font-size: .95rem; line-height: 1.2; cursor: pointer; text-align: center; transition: background .15s, box-shadow .15s, transform .15s; }
.btn:hover { background: #ad2250; text-decoration: none; box-shadow: 0 6px 16px rgba(196, 42, 92, .22); }
.btn:active { transform: translateY(1px); }
.btn--ghost { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn--ghost:hover { background: var(--surface); border-color: #e2cdd3; color: var(--primary); box-shadow: none; }
.btn--sm { padding: 7px 14px; font-size: .86rem; }
.btn--full { width: 100%; margin-top: 8px; }
.linkbtn { background: none; border: 0; color: inherit; font: inherit; cursor: pointer; padding: 0; }

/* Tarjetas */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); margin-bottom: 16px; display: block; color: inherit; }
.card.narrow { max-width: 440px; margin: 32px auto; padding: 32px; }
.empty { text-align: center; color: var(--muted); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.curso-card { padding: 0; overflow: hidden; }
.curso-card { transition: box-shadow .2s, transform .2s; }
.curso-card:hover { text-decoration: none; box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.curso-card__img { aspect-ratio: 16/9; background: radial-gradient(120% 90% at 20% 10%, #fff 0%, var(--primary-soft) 55%, #f9dde6 100%); display: grid; place-items: center; }
.curso-card__codigo { font-family: var(--font-titulos); font-style: italic; font-weight: 400; font-size: 2.3rem; letter-spacing: -.01em; color: var(--primary); opacity: .8; }
.curso-card__img img { width: 100%; height: 100%; object-fit: cover; }
.curso-card__body { padding: 16px 20px 20px; }
.curso-card__body h3 { margin: 10px 0 6px; font-size: 1.2rem; }
.curso-card__body p { margin: 0 0 12px; font-size: .92rem; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag { font-size: .72rem; background: var(--primary-soft); color: var(--primary); border-radius: 999px; padding: 3px 10px; font-weight: 600; letter-spacing: .02em; }
.bar { height: 6px; background: #f3e9ec; border-radius: 999px; overflow: hidden; margin: 8px 0 4px; }
.bar > div { height: 100%; background: linear-gradient(90deg, var(--brand), var(--primary)); border-radius: 999px; }

/* Layouts */
.layout-2 { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
.layout-leccion { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 24px; align-items: start; }
.sticky { position: sticky; top: 92px; }
.portada { border-radius: var(--radius-sm); margin-bottom: 14px; }
.precio { font-family: var(--font-titulos); font-size: 1.7rem; font-weight: 500; margin: 0 0 8px; }

.hero { padding: 56px 0 40px; }
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 400; max-width: 820px; line-height: 1.08; letter-spacing: -.025em; }
.hero h1 em { font-style: italic; color: var(--primary); }
.hero p { font-size: 1.12rem; max-width: 560px; margin: 0 0 28px; }
.hero__kicker { display: inline-block; font-size: .8rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--primary); margin-bottom: 12px; }

/* Lecciones */
.lecciones { list-style: none; padding: 0; margin: 0; }
.lecciones li { padding: 10px 0; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.lecciones li .icono { color: var(--muted); margin-right: 6px; }
.lecciones li:last-child { border-bottom: 0; }
.lecciones li.done a::before { content: ""; display: inline-block; width: .85em; height: .85em; margin-right: 6px; background: var(--success); -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.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%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.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center/contain no-repeat; }
.lecciones li.active a { font-weight: 600; color: var(--text); }
.sidebar h4 { margin: 18px 0 4px; font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.sidebar .lecciones li { font-size: .92rem; padding: 6px 0; }
.video { position: relative; aspect-ratio: 16/9; background: #000; border-radius: var(--radius); overflow: hidden; margin-bottom: 16px; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-file { width: 100%; border-radius: var(--radius); margin-bottom: 16px; background: #000; }
.prose { line-height: 1.75; font-size: 1.02rem; }
.recursos { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.recursos figure { margin: 0; }
.recursos img { border-radius: 8px; }
.recursos figcaption { font-size: .85rem; color: var(--muted); }
.leccion-nav { margin-top: 24px; }

/* Agenda */
.agenda__dia { margin-top: 24px; text-transform: capitalize; }
.agenda__item { display: grid; grid-template-columns: 80px 1fr auto; gap: 16px; align-items: center; }
.agenda__hora { font-size: 1.3rem; font-weight: 700; }
.agenda__hora small { display: block; font-size: .75rem; color: var(--muted); font-weight: 400; }
.agenda__info p { margin: 4px 0 0; }

/* Comunidad */
.composer summary { cursor: pointer; color: var(--muted); list-style: none; display: flex; align-items: center; gap: 10px; }
.composer summary::-webkit-details-marker { display: none; }
.composer summary .icono { color: var(--primary); }
.chips { margin-bottom: 16px; }
.chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border); border-radius: 999px; padding: 6px 14px; color: var(--muted); background: var(--surface); font-size: .88rem; font-weight: 500; }
.chip:hover { color: var(--text); text-decoration: none; border-color: #e2cdd3; }
.chip--on, .chip--on:hover { background: var(--text); color: #fff; border-color: var(--text); }
.post__meta { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
.post__img { border-radius: 8px; margin: 8px 0; max-height: 420px; object-fit: cover; }
.post__acts { gap: 20px; }

/* Formularios */
form p { margin: 0 0 12px; }
label { display: block; font-weight: 500; font-size: .88rem; margin-bottom: 6px; }
input[type=text], input[type=email], input[type=password], input[type=url], input[type=number], input[type=date], input[type=search], textarea, select {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; font: inherit; background: var(--surface); color: var(--text);
}
.filters { display: flex; gap: 12px; margin-bottom: 20px; }
.filters select { width: auto; }
.helptext, .errorlist { font-size: .85rem; color: var(--muted); }
.errorlist { color: var(--danger); padding-left: 16px; }

/* Mensajes */
.msg { padding: 12px 18px; border-radius: var(--radius-sm); margin-bottom: 12px; background: var(--primary-soft); font-size: .95rem; }
.msg--success { background: #e8f7ee; color: #14532d; }
.msg--error { background: #fdecec; color: #7f1d1d; }
.msg--warning { background: #fff6e0; color: #713f12; }

/* Panel de gestión */
.panel-head { margin-bottom: 16px; }
.panel-head h1 { margin-bottom: .3em; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-top: 8px; overflow-x: auto; }
.tabs a { padding: 12px 16px; color: var(--muted); font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a:hover { color: var(--text); text-decoration: none; }
.tabs a.on { color: var(--text); border-bottom-color: var(--primary); }
.tabla-wrap { padding: 0; overflow-x: auto; }
.tabla { width: 100%; border-collapse: collapse; }
.tabla th, .tabla td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: middle; }
.tabla th { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; background: #fdfafa; }
.tabla tr:last-child td { border-bottom: 0; }
.tabla tr.inactiva td { opacity: .55; }
.progreso-celda { min-width: 180px; }
.acciones { display: flex; gap: 6px; align-items: center; justify-content: flex-end; flex-wrap: wrap; }
.estado { border: 0; border-radius: 999px; padding: 3px 10px; font: inherit; font-size: .78rem; font-weight: 600; cursor: pointer; vertical-align: middle; }
.estado--ok { background: #e8f7ee; color: #14532d; }
.estado--borrador { background: #eef0f4; color: var(--muted); }
button.estado:hover { filter: brightness(.95); }
.form-card { max-width: 720px; }
.campo { margin-bottom: 14px; }
.campo .helptext { display: block; margin-top: 4px; }
.campo--check label { display: flex; gap: 8px; align-items: center; font-weight: 600; }
.campo--check input { width: auto; margin: 0; }
input[type=file] { font: inherit; font-size: .9rem; max-width: 100%; }
.card > h2:first-child, .card > h3:first-child { margin-top: 0; }
.form-linea { display: flex; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.form-linea .campo { flex: 1; min-width: 220px; margin-bottom: 0; }
.form-linea .campo label { display: none; }
.zona-peligro { border-color: #f3c9c9; }
.zona-peligro h3 { color: var(--danger); }
.btn--peligro { background: var(--danger); }
.btn--texto-peligro { color: var(--danger); }
.item-fila { display: flex; align-items: center; gap: 10px; }
.item-fila__txt { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.item-fila__txt h3 { margin: 0; }
#ordenable { counter-reset: unidad; }
.unidad-panel { counter-increment: unidad; }
.unidad-num::before { content: "Unidad " counter(unidad) " · "; color: var(--muted); font-weight: 500; }
.unidad-panel > header { padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.lista-lecciones { list-style: none; margin: 0; padding: 4px 0; min-height: 44px; }
.lista-lecciones > li { padding: 8px 6px; border-bottom: 1px solid var(--border); border-radius: 6px; background: var(--surface); }
.lista-lecciones > li:last-child { border-bottom: 0; }
.lista-lecciones:not(:has(li))::before { content: "Sin lecciones todavía. Podés arrastrar una acá."; display: block; padding: 12px 6px; color: var(--muted); font-size: .9rem; }
.asa, .asa-demo { cursor: grab; color: #b9adb4; user-select: none; padding: 0 2px; touch-action: none; display: inline-flex; }
.asa:hover { color: var(--text); }
.arrastrando { opacity: .45; outline: 2px dashed var(--brand); }
.agregar { margin-top: 8px; }
.recurso-fila { padding: 8px 0; border-bottom: 1px solid var(--border); }
.recurso-nuevo { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--border); }

/* Flashcards */
.mazo-card h3 { margin-bottom: 4px; }
.mazo-card__stats { display: flex; gap: 16px; margin: 10px 0 4px; font-size: .9rem; color: var(--muted); }
.mazo-card__stats strong { color: var(--text); }
.al-dia { color: var(--success); font-weight: 600; margin: 10px 0 0; }
.mazo-fila { color: inherit; }
.mazo-fila:hover { text-decoration: none; border-color: var(--primary); }
.estudio { max-width: 640px; margin: 0 auto; }
.estudio__head h1 { margin-bottom: .3em; }
.estudio__progreso { margin-bottom: 16px; }
.estudio__progreso .bar > div { background: var(--primary); transition: width .3s; }
.flashcard { position: relative; min-height: 300px; perspective: 1200px; cursor: pointer; outline: none; }
.flashcard__cara {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  padding: 28px; text-align: center; background: var(--surface); border: 1px solid var(--border); border-radius: 18px;
  box-shadow: var(--shadow); backface-visibility: hidden; transition: transform .45s ease;
}
.flashcard__frente { border-top: 6px solid var(--brand); }
.flashcard__dorso { transform: rotateY(180deg); border-top: 6px solid var(--primary); }
.flashcard.dada-vuelta .flashcard__frente { transform: rotateY(-180deg); }
.flashcard.dada-vuelta .flashcard__dorso { transform: rotateY(0); }
.flashcard:focus-visible .flashcard__cara { outline: 3px solid var(--brand); outline-offset: 2px; }
#frente { font-family: var(--font-titulos); font-size: 2.3rem; font-weight: 500; margin: 0; }
#dorso { font-family: var(--font-titulos); font-size: 1.8rem; font-weight: 500; margin: 0; color: var(--primary); }
#ejemplo { font-style: italic; margin: 0; }
#imagen { max-height: 140px; width: auto; border-radius: 10px; }
.estudio__botones { margin-top: 18px; }
.respuesta { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.btn--no { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn--no:hover { background: #fdf1f0; color: var(--danger); box-shadow: none; }
.btn--si { background: var(--text); color: #fff; }
.btn--si:hover { background: #000; box-shadow: none; }
kbd { font: inherit; font-size: .72rem; opacity: .6; border: 1px solid currentColor; border-radius: 4px; padding: 0 5px; margin-left: 6px; }
.fin { text-align: center; }
.fin .row { justify-content: center; }
@media (hover: none) { kbd { display: none; } }
@media (prefers-reduced-motion: reduce) { .flashcard__cara { transition: none; } }

/* Planes */
.plan-tag { display: inline-block; font-size: .72rem; font-weight: 600; letter-spacing: .02em; border-radius: 999px; padding: 3px 10px; background: #f3eff1; color: var(--muted); }
.plan-tag--1 { background: var(--primary-soft); color: var(--primary); }
.plan-tag--2 { background: #1c1f2a; color: #f5d9a8; }
.texto-peligro { color: var(--danger); }
.planes-head { text-align: center; padding: 16px 0 8px; }
.planes { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; align-items: stretch; margin-top: 16px; }
.plan { position: relative; display: flex; flex-direction: column; padding: 26px 22px; }
.plan h2 { margin: 0 0 4px; font-size: 1.6rem; }
.plan--destacado { border: 2px solid var(--primary); box-shadow: 0 8px 30px rgba(210, 30, 82, .12); }
.plan--actual { background: var(--primary-soft); }
.plan__cinta { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--primary); color: var(--primary-ink); font-size: .75rem; font-weight: 700; border-radius: 999px; padding: 3px 12px; white-space: nowrap; }
.plan__precio { font-family: var(--font-titulos); font-size: 2.4rem; font-weight: 500; letter-spacing: -.02em; margin: 14px 0; }
.plan__precio small { font-size: .95rem; font-weight: 500; color: var(--muted); }
.plan__beneficios { list-style: none; padding: 0; margin: 0 0 20px; flex: 1; }
.plan__beneficios li { padding: 6px 0 6px 26px; position: relative; }
.plan__beneficios li::before { content: ""; position: absolute; left: 0; top: .6em; width: 14px; height: 14px; background: var(--primary); -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.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%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.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center/contain no-repeat; }
.plan__btn[aria-disabled] { cursor: default; }
.plan__btn--pronto { opacity: .65; }

/* Panel: usuarios */
.buscador { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.buscador input[type=search] { flex: 1; min-width: 200px; }
.buscador select { width: auto; }
.paginacion { display: flex; gap: 8px; align-items: center; justify-content: center; margin-top: 16px; }
.ficha-datos { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin: 0; }
.ficha-datos dt { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.ficha-datos dd { margin: 2px 0 0; font-weight: 600; }
.tabla tr.cuenta-inactiva td { opacity: .5; }

/* Biblioteca */
.secciones-bib { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-bottom: 8px; }
.seccion-bib { display: flex; flex-direction: column; gap: 4px; color: inherit; }
.seccion-bib { transition: box-shadow .2s, transform .2s; }
.seccion-bib:hover { text-decoration: none; box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.seccion-bib__icono { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: var(--primary-soft); color: var(--primary); margin-bottom: 8px; }
.seccion-bib__icono .icono { width: 24px; height: 24px; }
.seccion-bib strong { font-family: var(--font-titulos); font-weight: 500; font-size: 1.3rem; }
.seccion-bib__n { color: var(--primary); font-weight: 600; margin-top: 4px; }
.bib-titulo { margin-top: 16px; }
.bib-titulo h2 { margin-bottom: .4em; }
.bib-gestion { margin-top: 24px; }
.material { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.material__media { display: block; position: relative; width: 100%; aspect-ratio: 16/9; background: var(--primary-soft); border: 0; padding: 0; overflow: hidden; }
.material__media img { width: 100%; height: 100%; object-fit: cover; }
button.material__yt { cursor: pointer; }
.material__play { position: absolute; inset: 0; margin: auto; width: 56px; height: 56px; border-radius: 50%; background: rgba(255, 255, 255, .92); color: var(--primary); display: grid; place-items: center; box-shadow: 0 6px 20px rgba(0, 0, 0, .2); transition: transform .15s; }
.material__play .icono { width: 22px; height: 22px; margin-left: 3px; }
.material__yt:hover .material__play { transform: scale(1.08); }
.material__iframe { border: 0; }
.material__spotify { width: 100%; height: 152px; border: 0; display: block; }
.material__candado { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(255, 255, 255, .55); color: var(--text); }
.material__candado .icono { width: 28px; height: 28px; }
.material--bloqueado .material__media img { filter: grayscale(.6) blur(1px); }
.material__body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.material__body h3 { margin: 0; }
.material__desc { margin: 0; font-size: .92rem; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.material audio { width: 100%; }
.material__acciones { margin-top: auto; gap: 8px; }
.consejos { padding-left: 18px; margin: 0; font-size: .92rem; }
.consejos li { margin-bottom: 8px; }

@media (max-width: 860px) {
  .layout-2, .layout-leccion { grid-template-columns: 1fr; }
  .sticky { position: static; }
  .agenda__item { grid-template-columns: 1fr; }
  .hero h1 { font-size: 1.7rem; }
  .item-fila { flex-wrap: wrap; }
  .item-fila .acciones { width: 100%; justify-content: flex-start; padding-left: 26px; }
}
