/* Vendalia — estilos. Marca: esmeralda + ámbar sobre crema. */
:root {
  --v: #0E9F6E; --v-2: #0B7F58; --v-suave: #E3F5EE; --a: #F59E0B; --a-suave: #FEF3DC;
  --tinta: #111827; --tinta-2: #374151; --gris: #6B7280; --linea: #E8E5DD; --fondo: #FBFAF7; --tarjeta: #FFFFFF; --tarjeta-2: #F5F3EE;
  --rojo: #DC2626; --rojo-suave: #FDECEC; --azul: #2563EB;
  --r: 14px; --r-g: 22px; --sombra: 0 1px 2px rgba(17,24,39,.05), 0 8px 24px rgba(17,24,39,.06);
  --fuente: "Plus Jakarta Sans", Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}
[data-tema="oscuro"] {
  --v: #34D399; --v-2: #10B981; --v-suave: #0F2A21; --a: #FBBF24; --a-suave: #2A2210;
  --tinta: #F3F4F6; --tinta-2: #D1D5DB; --gris: #9CA3AF; --linea: #23302B; --fondo: #0B1210; --tarjeta: #111A17; --tarjeta-2: #16211D;
  --rojo: #F87171; --rojo-suave: #2A1414; --sombra: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.25);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
body { margin: 0; font-family: var(--fuente); background: var(--fondo); color: var(--tinta); line-height: 1.55; -webkit-font-smoothing: antialiased; }
a { color: var(--v-2); }
[data-tema="oscuro"] a { color: var(--v); }
img, svg { max-width: 100%; }
h1, h2, h3, h4 { line-height: 1.15; letter-spacing: -.02em; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 4.6vw, 3.4rem); font-weight: 800; }
h2 { font-size: clamp(1.45rem, 2.6vw, 2rem); font-weight: 800; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; }
em.v { font-style: normal; color: var(--v); }
.oculto { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--v) 55%, transparent); outline-offset: 2px; border-radius: 6px; }
.ic { width: 1.15em; height: 1.15em; flex: none; vertical-align: -.2em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Cabecera */
.cab { position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--fondo) 88%, transparent); backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--linea); }
.cab__in { max-width: 1240px; margin: 0 auto; display: flex; align-items: center; gap: 14px; padding: 10px 20px; }
.marca { display: inline-flex; align-items: center; gap: 9px; font-weight: 800; font-size: 1.15rem; color: var(--tinta); text-decoration: none; letter-spacing: -.02em; }
.marca svg { width: 32px; height: 32px; }
.nav { display: flex; gap: 2px; margin-left: 10px; overflow-x: auto; scrollbar-width: none; flex: 1; }
.nav::-webkit-scrollbar { display: none; }
.nav a { padding: 7px 11px; border-radius: 10px; color: var(--tinta-2); text-decoration: none; font-weight: 600; font-size: .92rem; white-space: nowrap; }
.nav a:hover { background: var(--tarjeta-2); }
.nav a[aria-current="page"] { background: var(--v-suave); color: var(--v-2); }
[data-tema="oscuro"] .nav a[aria-current="page"] { color: var(--v); }
.cab__acc { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.bot-ic { width: 40px; height: 40px; border-radius: 12px; border: 0; background: transparent; color: var(--tinta-2); display: inline-grid; place-items: center; cursor: pointer; position: relative; }
.bot-ic:hover { background: var(--tarjeta-2); }
.punto { position: absolute; top: 6px; right: 6px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--a); color: #111; font-size: .68rem; font-weight: 800; display: grid; place-items: center; }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: inline-grid; place-items: center; font-weight: 800; color: #fff; background: linear-gradient(135deg, var(--v), var(--v-2)); flex: none; position: relative; font-size: .95rem; }
.avatar--s { width: 30px; height: 30px; font-size: .8rem; }
.avatar--g { width: 72px; height: 72px; font-size: 1.6rem; }
.menu-burger { display: none; }
@media (max-width: 900px) {
  .nav { display: none; position: fixed; inset: 61px 0 auto 0; background: var(--fondo); flex-direction: column; padding: 12px; border-bottom: 1px solid var(--linea); margin: 0; max-height: calc(100vh - 61px); overflow: auto; }
  .nav.abierta { display: flex; }
  .nav a { padding: 12px 14px; font-size: 1rem; }
  .menu-burger { display: inline-grid; }
}
/* Con sesión hay muchas secciones: el menú se pliega antes */
@media (max-width: 1240px) {
  .cab:has(.nav a:nth-child(6)) .nav { display: none; position: fixed; inset: 61px 0 auto 0; background: var(--fondo); flex-direction: column; padding: 12px; border-bottom: 1px solid var(--linea); margin: 0; max-height: calc(100vh - 61px); overflow: auto; }
  .cab:has(.nav a:nth-child(6)) .nav.abierta { display: flex; }
  .cab:has(.nav a:nth-child(6)) .nav a { padding: 12px 14px; font-size: 1rem; }
  .cab:has(.nav a:nth-child(6)) .menu-burger { display: inline-grid; }
}

/* Botones */
.bot { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 12px; padding: 11px 18px; font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; transition: transform .12s, background .15s, box-shadow .15s; white-space: nowrap; }
.bot:active { transform: translateY(1px); }
.bot--p { background: var(--v); color: #fff; box-shadow: 0 6px 18px color-mix(in srgb, var(--v) 30%, transparent); }
[data-tema="oscuro"] .bot--p { color: #06281D; }
.bot--p:hover { background: var(--v-2); }
.bot--s { background: var(--tarjeta-2); color: var(--tinta); }
.bot--s:hover { background: var(--linea); }
.bot--a { background: var(--a); color: #1F1503; }
.bot--l { background: transparent; color: var(--tinta-2); padding: 8px 10px; }
.bot--l:hover { background: var(--tarjeta-2); }
.bot--peligro { background: var(--rojo-suave); color: var(--rojo); }
.bot--g { padding: 15px 24px; font-size: 1.05rem; border-radius: 14px; }
.bot--peq { padding: 7px 12px; font-size: .88rem; border-radius: 10px; }
.bot[disabled], .bot[aria-busy="true"] { opacity: .55; cursor: not-allowed; }
.bot[aria-busy="true"]::after { content: ""; width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: gira .7s linear infinite; }
@keyframes gira { to { transform: rotate(360deg); } }

/* Disposición */
.cont { max-width: 1240px; margin: 0 auto; padding: 28px 20px 80px; }
.estrecho { max-width: 760px; margin: 0 auto; }
.rejilla { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.rejilla--2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.fila { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.fila--sep { justify-content: space-between; }
.pila > * + * { margin-top: 14px; }
.tarjeta { background: var(--tarjeta); border: 1px solid var(--linea); border-radius: var(--r-g); padding: 22px; box-shadow: var(--sombra); }
.tarjeta--plana { box-shadow: none; }
.tarjeta--link { text-decoration: none; color: inherit; display: block; transition: transform .15s, box-shadow .15s, border-color .15s; }
.tarjeta--link:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--v) 40%, var(--linea)); }
.cab-sec { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.cab-sec p { color: var(--gris); margin: 0; max-width: 640px; }
.kicker { text-transform: uppercase; letter-spacing: .08em; font-size: .75rem; font-weight: 800; color: var(--v-2); margin-bottom: 8px; }
[data-tema="oscuro"] .kicker { color: var(--v); }
.suave { color: var(--gris); }
.peq { font-size: .87rem; }
.pastilla { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: .78rem; font-weight: 700; background: var(--tarjeta-2); color: var(--tinta-2); }
.pastilla--v { background: var(--v-suave); color: var(--v-2); }
[data-tema="oscuro"] .pastilla--v { color: var(--v); }
.pastilla--a { background: var(--a-suave); color: #92570A; }
[data-tema="oscuro"] .pastilla--a { color: var(--a); }
.pastilla--r { background: var(--rojo-suave); color: var(--rojo); }
.sep { height: 1px; background: var(--linea); margin: 22px 0; border: 0; }

/* Pestañas */
.pestanas { display: flex; gap: 6px; border-bottom: 1px solid var(--linea); margin-bottom: 24px; overflow-x: auto; scrollbar-width: none; }
.pestanas a { padding: 10px 14px; text-decoration: none; color: var(--gris); font-weight: 700; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.pestanas a[aria-current="page"] { color: var(--tinta); border-color: var(--v); }

/* Formularios */
.campo { display: grid; gap: 6px; }
.campo > span { font-weight: 700; font-size: .9rem; }
.campo small { color: var(--gris); }
input, select, textarea { font: inherit; color: var(--tinta); background: var(--tarjeta); border: 1.5px solid var(--linea); border-radius: 12px; padding: 11px 13px; width: 100%; transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--v); box-shadow: 0 0 0 4px color-mix(in srgb, var(--v) 18%, transparent); }
textarea { min-height: 110px; resize: vertical; }
input[type="checkbox"], input[type="radio"] { width: 18px; height: 18px; accent-color: var(--v); flex: none; }
.casilla { display: flex; gap: 10px; align-items: flex-start; font-size: .92rem; cursor: pointer; }
.pre { position: relative; }
.pre > b { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--gris); font-weight: 600; pointer-events: none; }
.pre > input { padding-left: 34px; }
.form-rej { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.error-campo { color: var(--rojo); font-size: .88rem; font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1.5px solid var(--linea); background: var(--tarjeta); border-radius: 999px; padding: 8px 14px; font: inherit; font-weight: 600; cursor: pointer; color: var(--tinta-2); }
.chip[aria-pressed="true"] { border-color: var(--v); background: var(--v-suave); color: var(--v-2); }
[data-tema="oscuro"] .chip[aria-pressed="true"] { color: var(--v); }

/* Portada */
.heroe { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; padding: 56px 0 40px; }
.heroe p.lead { font-size: 1.2rem; color: var(--tinta-2); max-width: 540px; }
.heroe .ventajas { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 22px; color: var(--tinta-2); font-weight: 600; font-size: .92rem; }
.heroe .ventajas span { display: inline-flex; gap: 6px; align-items: center; }
.heroe .ventajas .ic { color: var(--v); }
.escena { position: relative; aspect-ratio: 1 / .86; }
.escena .panel-falso { position: absolute; inset: 6% 4% 12% 8%; border-radius: 22px; background: var(--tarjeta); border: 1px solid var(--linea); box-shadow: 0 30px 60px rgba(17,24,39,.12); padding: 20px; overflow: hidden; }
.escena .flota { position: absolute; background: var(--tarjeta); border: 1px solid var(--linea); border-radius: 16px; box-shadow: 0 16px 36px rgba(17,24,39,.12); padding: 12px 14px; font-weight: 700; font-size: .9rem; display: flex; gap: 10px; align-items: center; animation: flota 6s ease-in-out infinite; }
.escena .f1 { top: 0; right: 0; } .escena .f2 { bottom: 2%; left: 0; animation-delay: -2s; } .escena .f3 { bottom: 16%; right: -2%; animation-delay: -4s; }
@keyframes flota { 50% { transform: translateY(-8px); } }
.barra-n { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--linea); font-size: .9rem; }
.barra-n:last-child { border: 0; }
.nota { display: inline-grid; place-items: center; min-width: 40px; height: 28px; border-radius: 9px; background: var(--v); color: #fff; font-weight: 800; font-size: .85rem; padding: 0 8px; }
[data-tema="oscuro"] .nota { color: #06281D; }
.nota--m { background: var(--a); color: #1F1503; }
.nota--b { background: var(--tarjeta-2); color: var(--tinta-2); }
@media (max-width: 900px) { .heroe { grid-template-columns: 1fr; padding-top: 28px; } .escena { max-width: 520px; } }
.seccion-p { padding: 56px 0; }
.mod { display: flex; gap: 14px; align-items: flex-start; }
.mod__ic { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; flex: none; color: #fff; }
.mod__ic .ic { width: 22px; height: 22px; }
.mod p { color: var(--gris); margin: 0 0 8px; font-size: .94rem; }
.c1 { background: #0E9F6E; } .c2 { background: #F59E0B; } .c3 { background: #2563EB; } .c4 { background: #DB2777; } .c5 { background: #7C3AED; } .c6 { background: #0891B2; } .c7 { background: #EA580C; } .c8 { background: #4B5563; }
.pasos-h { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; counter-reset: p; }
.pasos-h > div { counter-increment: p; position: relative; padding-top: 44px; }
.pasos-h > div::before { content: counter(p); position: absolute; top: 0; left: 0; width: 34px; height: 34px; border-radius: 50%; background: var(--a); color: #1F1503; font-weight: 800; display: grid; place-items: center; }
.cta-final { text-align: center; background: linear-gradient(135deg, var(--v), var(--v-2)); color: #fff; border-radius: 28px; padding: 56px 24px; }
.cta-final h2 { color: #fff; }
.cta-final .bot--a { margin-top: 10px; }
.pie { border-top: 1px solid var(--linea); padding: 28px 20px; color: var(--gris); font-size: .88rem; }
.pie__in { max-width: 1240px; margin: 0 auto; display: flex; gap: 18px; flex-wrap: wrap; justify-content: space-between; }
.pie a { color: var(--gris); }

/* Acceso */
.acceso { display: grid; grid-template-columns: 1fr 440px; gap: 48px; align-items: center; min-height: calc(100vh - 160px); }
@media (max-width: 900px) { .acceso { grid-template-columns: 1fr; } .acceso__lado { display: none; } }
.lista-ic { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 14px; }
.lista-ic li { display: flex; gap: 12px; align-items: center; }
.lista-ic li b { display: block; }
.lista-ic li span { color: var(--gris); font-size: .9rem; }
.codigo-inp { font-size: 1.8rem; letter-spacing: .5em; text-align: center; font-weight: 800; padding: 14px; }
.nota-caja { background: var(--v-suave); border-radius: 12px; padding: 12px 14px; font-size: .9rem; }
.nota-caja--a { background: var(--a-suave); }
.nota-caja--r { background: var(--rojo-suave); color: var(--rojo); }

/* Asistente */
.asist { max-width: 720px; margin: 0 auto; }
.asist__barra { display: flex; gap: 8px; margin-bottom: 28px; }
.asist__barra span { flex: 1; height: 6px; border-radius: 3px; background: var(--linea); }
.asist__barra span.hecho { background: var(--v); }
.opciones { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.opcion { border: 1.5px solid var(--linea); border-radius: 16px; padding: 14px; background: var(--tarjeta); cursor: pointer; text-align: left; font: inherit; color: inherit; display: grid; gap: 4px; }
.opcion:hover { border-color: color-mix(in srgb, var(--v) 50%, var(--linea)); }
.opcion[aria-pressed="true"] { border-color: var(--v); background: var(--v-suave); }
.opcion b { font-size: 1rem; }
.opcion span { color: var(--gris); font-size: .86rem; }

/* Panel */
.saludo { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; margin-bottom: 26px; }
.progreso-g { height: 10px; background: var(--linea); border-radius: 5px; overflow: hidden; min-width: 200px; }
.progreso-g > i { display: block; height: 100%; background: linear-gradient(90deg, var(--v), var(--a)); border-radius: 5px; transition: width .6s; }
.paso { display: flex; gap: 14px; align-items: center; padding: 14px 16px; border-radius: 16px; border: 1px solid var(--linea); background: var(--tarjeta); text-decoration: none; color: inherit; }
.paso:hover { border-color: color-mix(in srgb, var(--v) 45%, var(--linea)); }
.paso__n { width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--linea); display: grid; place-items: center; font-weight: 800; flex: none; color: var(--gris); }
.paso.hecho .paso__n { background: var(--v); border-color: var(--v); color: #fff; }
.paso.siguiente { border-color: var(--a); box-shadow: 0 0 0 3px var(--a-suave); }
.paso b { display: block; }
.paso span { color: var(--gris); font-size: .88rem; }
.paso .ic.flecha { margin-left: auto; color: var(--gris); }

/* Productos */
.prod { display: flex; flex-direction: column; gap: 10px; }
.prod__img { aspect-ratio: 16/10; border-radius: 14px; background: linear-gradient(135deg, var(--tarjeta-2), var(--v-suave)); display: grid; place-items: center; font-size: 3.2rem; position: relative; }
.prod__img > img { width: 100%; height: 100%; object-fit: cover; border-radius: 14px; background: #fff; }
.prod__img .nota { position: absolute; top: 10px; left: 10px; z-index: 1; }
.galeria { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.galeria button { flex: none; width: 64px; height: 64px; padding: 0; border-radius: 10px; border: 2px solid var(--linea); overflow: hidden; cursor: pointer; background: #fff; }
.galeria button[aria-pressed="true"] { border-color: var(--v); }
.galeria img, .mini img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mini { width: 48px; height: 48px; border-radius: 10px; overflow: hidden; flex: none; background: var(--tarjeta-2); display: grid; place-items: center; font-size: 1.6rem; }
.aviso-ejemplo { border: 1.5px dashed var(--a); background: var(--a-suave); border-radius: 14px; padding: 12px 16px; margin-bottom: 18px; }
.prod__img .pastilla { position: absolute; top: 10px; right: 10px; z-index: 1; }
.cifras { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.cifras div { background: var(--tarjeta-2); border-radius: 10px; padding: 8px; text-align: center; }
.cifras b { display: block; font-size: 1rem; }
.cifras span { font-size: .74rem; color: var(--gris); }
.enfoques { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.enfoque { border: 1.5px solid var(--linea); border-radius: 16px; padding: 16px; cursor: pointer; background: var(--tarjeta); text-align: left; font: inherit; color: inherit; }
.enfoque[aria-pressed="true"] { border-color: var(--v); box-shadow: 0 0 0 3px var(--v-suave); }
.enfoque .precio { font-size: 1.4rem; font-weight: 800; margin-top: 6px; }
.tabla { width: 100%; border-collapse: collapse; font-size: .93rem; }
.tabla th, .tabla td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--linea); vertical-align: top; }
.tabla th { color: var(--gris); font-weight: 700; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; }
.tabla-env { overflow-x: auto; }
.cargando { display: flex; gap: 12px; align-items: center; color: var(--gris); padding: 30px 0; }
.cargando::before { content: ""; width: 20px; height: 20px; border: 3px solid var(--linea); border-top-color: var(--v); border-radius: 50%; animation: gira .8s linear infinite; }
.vacio { text-align: center; padding: 46px 20px; color: var(--gris); border: 2px dashed var(--linea); border-radius: var(--r-g); }
.vacio .ic { width: 38px; height: 38px; color: var(--v); margin-bottom: 8px; }
.vacio h3 { color: var(--tinta); }

/* Calculadoras */
.calc { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; align-items: start; }
@media (max-width: 860px) { .calc { grid-template-columns: 1fr; } }
.resultado { background: var(--tinta); color: #fff; border-radius: var(--r-g); padding: 24px; position: sticky; top: 80px; }
[data-tema="oscuro"] .resultado { background: #0A1F18; border: 1px solid var(--linea); }
.resultado .grande { font-size: 2.4rem; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; }
.resultado .linea-r { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid rgba(255,255,255,.12); font-size: .95rem; }
.resultado .linea-r:last-child { border: 0; }
.veredicto { margin-top: 14px; border-radius: 12px; padding: 12px 14px; font-weight: 700; }
.veredicto--ok { background: rgba(52,211,153,.18); color: #6EE7B7; }
.veredicto--mal { background: rgba(248,113,113,.18); color: #FCA5A5; }
.veredicto--meh { background: rgba(251,191,36,.18); color: #FCD34D; }

/* Texto generado */
.generado { white-space: pre-wrap; background: var(--tarjeta-2); border-radius: 14px; padding: 16px; font-size: .93rem; max-height: 420px; overflow: auto; }
.copiable { position: relative; }
.copiable .bot { position: absolute; top: 10px; right: 10px; }

/* Comunidad */
.pub { display: grid; grid-template-columns: 54px 1fr; gap: 14px; }
.voto { display: grid; justify-items: center; align-content: start; gap: 2px; }
.voto button { width: 44px; height: 40px; border-radius: 12px; border: 1.5px solid var(--linea); background: var(--tarjeta); cursor: pointer; color: var(--tinta-2); }
.voto button[aria-pressed="true"] { border-color: var(--a); background: var(--a-suave); color: #92570A; }
.voto b { font-size: .95rem; }
.autor { display: flex; align-items: center; gap: 8px; font-size: .88rem; color: var(--gris); }
.autor a { color: var(--tinta); font-weight: 700; text-decoration: none; }
.insignia { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; color: #fff; font-size: .62rem; vertical-align: -3px; }
.cifra-res { font-size: 1.6rem; font-weight: 800; color: var(--v); }
.destacado { border: 2px solid var(--a); background: linear-gradient(180deg, var(--a-suave), var(--tarjeta) 60%); }

/* Chat */
.chat { display: flex; flex-direction: column; height: min(640px, calc(100vh - 220px)); }
.chat__msgs { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; padding: 4px 4px 16px; }
.burbuja { max-width: 82%; padding: 12px 15px; border-radius: 18px; white-space: pre-wrap; }
.burbuja--yo { align-self: flex-end; background: var(--v); color: #fff; border-bottom-right-radius: 6px; }
[data-tema="oscuro"] .burbuja--yo { color: #06281D; }
.burbuja--ia { align-self: flex-start; background: var(--tarjeta-2); border-bottom-left-radius: 6px; }
.chat__form { display: flex; gap: 10px; border-top: 1px solid var(--linea); padding-top: 14px; }
.chat__form textarea { min-height: 48px; height: 48px; }

/* Curso */
.leccion { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 12px; cursor: pointer; border: 0; background: transparent; width: 100%; text-align: left; font: inherit; color: inherit; }
.leccion:hover { background: var(--tarjeta-2); }
.leccion[aria-current="true"] { background: var(--v-suave); }
.leccion .marca-v { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--linea); display: grid; place-items: center; flex: none; }
.leccion.vista .marca-v { background: var(--v); border-color: var(--v); color: #fff; }
.video { aspect-ratio: 16/9; border-radius: 16px; overflow: hidden; background: #000; }
.video iframe { width: 100%; height: 100%; border: 0; }
.curso { display: grid; grid-template-columns: 320px 1fr; gap: 24px; align-items: start; }
@media (max-width: 900px) { .curso { grid-template-columns: 1fr; } }

/* Desplegables, ventanas y avisos */
.desple { position: absolute; top: calc(100% + 8px); right: 0; width: min(380px, calc(100vw - 24px)); background: var(--tarjeta); border: 1px solid var(--linea); border-radius: 18px; box-shadow: 0 20px 50px rgba(17,24,39,.18); padding: 8px; z-index: 60; max-height: 70vh; overflow: auto; }
.desple a, .desple button.item { display: block; width: 100%; text-align: left; padding: 10px 12px; border-radius: 10px; color: var(--tinta); text-decoration: none; border: 0; background: transparent; font: inherit; cursor: pointer; }
.desple a:hover, .desple button.item:hover { background: var(--tarjeta-2); }
.desple .aviso-i.nuevo { background: var(--v-suave); }
.desple small { color: var(--gris); display: block; }
.velo { position: fixed; inset: 0; background: rgba(17,24,39,.45); z-index: 80; display: grid; place-items: center; padding: 16px; animation: aparece .15s; }
.ventana { background: var(--tarjeta); border-radius: 22px; padding: 26px; width: min(560px, 100%); max-height: 90vh; overflow: auto; box-shadow: 0 30px 70px rgba(0,0,0,.3); }
@keyframes aparece { from { opacity: 0; } }
.tostadas { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); display: grid; gap: 8px; z-index: 100; width: min(440px, calc(100vw - 24px)); }
.tostada { background: var(--tinta); color: #fff; border-radius: 14px; padding: 13px 16px; box-shadow: 0 14px 34px rgba(0,0,0,.25); animation: sube .2s; font-size: .93rem; }
[data-tema="oscuro"] .tostada { background: #1F2D28; }
.tostada b { display: block; }
.tostada--mal { background: var(--rojo); }
@keyframes sube { from { transform: translateY(10px); opacity: 0; } }
.aviso-ia { display: flex; gap: 10px; align-items: flex-start; background: var(--a-suave); border-radius: 12px; padding: 10px 14px; font-size: .88rem; margin-bottom: 14px; }
.nf { text-align: center; padding: 80px 20px; }
