:root {
      --rojo-peru: #b91c1c;
      --rojo-claro: #ef4444;
      --azul: #1e3a8a;
      --azul-2: #0f172a;
      --celeste: #38bdf8;
      --turquesa: #0d9488;
      --turquesa-claro: #2dd4bf;
  --fucsia: #d946ef;
  --fucsia-oscuro: #c026d3;
      --dorado: #f59e0b;
      --verde: #16a34a;
      --morado: #7c3aed;
      --blanco: #ffffff;
      --texto: #0f172a;
      --muted: #64748b;
      --vidrio: rgba(255,255,255,.78);
      --borde: rgba(255,255,255,.55);
      --sombra: 0 18px 50px rgba(15,23,42,.16);
      --radio: 28px;
    }

    * {
      box-sizing: border-box;
      margin: 0;
      padding: 0;
    }

    html {
      height: 100%;
    }

    html, body {
      width: 100%;
      min-height: 100%;
    }

    body {
      font-family: "Segoe UI", Arial, Helvetica, sans-serif;
      color: var(--texto);
      -webkit-font-smoothing: antialiased;
      background:
        radial-gradient(circle at 12% 18%, rgba(239,68,68,.23), transparent 28%),
        radial-gradient(circle at 86% 16%, rgba(56,189,248,.24), transparent 30%),
        radial-gradient(circle at 75% 88%, rgba(245,158,11,.18), transparent 27%),
        linear-gradient(135deg, #f8fafc 0%, #eef2ff 48%, #fff7ed 100%);
      min-height: 100dvh;
      min-height: 100vh;
      overflow-x: hidden;
      overflow-y: auto;
      display: flex;
      align-items: flex-start;
      justify-content: center;
      padding: clamp(10px, 1.5vh, 20px) clamp(8px, 1vw, 16px);
    }

    body::before {
      content: "";
      position: fixed;
      inset: 0;
      background-image:
        linear-gradient(rgba(15,23,42,.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(15,23,42,.045) 1px, transparent 1px);
      background-size: 52px 52px;
      mask-image: radial-gradient(circle at 50% 45%, black, transparent 82%);
      pointer-events: none;
    }

    .orb {
      position: fixed;
      border-radius: 999px;
      filter: blur(1px);
      opacity: .34;
      pointer-events: none;
      animation: flotar 9s ease-in-out infinite;
    }

    .orb.uno {
      width: 160px;
      height: 160px;
      left: 4vw;
      bottom: 8vh;
      background: linear-gradient(135deg, var(--rojo-claro), #fb7185);
    }

    .orb.dos {
      width: 220px;
      height: 220px;
      right: 6vw;
      top: 8vh;
      background: linear-gradient(135deg, var(--celeste), #818cf8);
      animation-delay: -3s;
    }

    .orb.tres {
      width: 120px;
      height: 120px;
      right: 20vw;
      bottom: 12vh;
      background: linear-gradient(135deg, var(--dorado), #fde68a);
      animation-delay: -5s;
    }

    @keyframes flotar {
      0%, 100% { transform: translate3d(0,0,0) scale(1); }
      50% { transform: translate3d(0,-24px,0) scale(1.06); }
    }

    .pantalla {
      position: relative;
      z-index: 2;
      width: min(96vw, 1500px);
      height: auto;
      min-height: min(calc(100dvh - 24px), 960px);
      min-height: min(calc(100vh - 24px), 960px);
      margin: 0 auto;
      padding: clamp(14px, 1.8vw, 28px);
      display: flex;
      flex-direction: column;
      gap: clamp(10px, 1.2vw, 20px);
      border: 1px solid rgba(255,255,255,.72);
      border-radius: 34px;
      background: linear-gradient(145deg, rgba(255,255,255,.83), rgba(255,255,255,.60));
      box-shadow: var(--sombra);
      backdrop-filter: blur(22px);
      overflow: visible;
      flex-shrink: 0;
    }

    .pantalla::before {
      content: "";
      position: absolute;
      width: 460px;
      height: 460px;
      top: -260px;
      left: -120px;
      border-radius: 999px;
      background: radial-gradient(circle, rgba(185,28,28,.18), transparent 70%);
      animation: pulsoSuave 7s ease-in-out infinite;
    }

    .pantalla::after {
      content: "";
      position: absolute;
      inset: 0;
      background: linear-gradient(115deg, transparent 0%, transparent 42%, rgba(255,255,255,.38) 50%, transparent 58%, transparent 100%);
      transform: translateX(-120%);
      animation: brilloPantalla 8s ease-in-out infinite;
      pointer-events: none;
    }

    @keyframes brilloPantalla {
      0%, 45% { transform: translateX(-120%); }
      65%, 100% { transform: translateX(120%); }
    }

    @keyframes pulsoSuave {
      0%,100% { opacity: .55; transform: scale(1); }
      50% { opacity: .9; transform: scale(1.08); }
    }

    .barra-superior {
      position: relative;
      z-index: 1;
      flex-shrink: 0;
      display: grid;
      grid-template-columns: clamp(110px, 10vw, 160px) 1fr clamp(170px, 16vw, 240px);
      grid-template-rows: clamp(68px, 9.5vh, 108px) clamp(68px, 9.5vh, 108px);
      gap: clamp(10px, 1.2vw, 18px);
      min-height: 0;
    }

    .panel, .boton, .tarjeta-area {
      position: relative;
      border: 1px solid var(--borde);
      border-radius: var(--radio);
      background: var(--vidrio);
      box-shadow: 0 14px 35px rgba(15,23,42,.10);
      backdrop-filter: blur(16px);
      overflow: hidden;
      isolation: isolate;
    }

    .boton.sesiones {
      overflow: visible;
      isolation: auto;
    }

    .panel::before, .boton::before, .tarjeta-area::before {
      content: "";
      position: absolute;
      inset: 0;
      border-radius: inherit;
      background: linear-gradient(135deg, rgba(255,255,255,.60), transparent 44%);
      z-index: -1;
    }

    .boton, .tarjeta-area {
      cursor: pointer;
      border: 0;
      color: inherit;
      font-family: inherit;
      text-decoration: none;
      transition: transform .35s ease, box-shadow .35s ease, background .35s ease;
    }

    a.boton, a.tarjeta-area {
      -webkit-tap-highlight-color: transparent;
    }

    .boton:hover, .tarjeta-area:hover {
      transform: translateY(-7px) scale(1.012);
      box-shadow: 0 22px 56px rgba(15,23,42,.20);
      background: rgba(255,255,255,.92);
    }

    .boton:active, .tarjeta-area:active {
      transform: translateY(-2px) scale(.99);
    }

    .logo {
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 12px;
      animation: aparecer .75s ease both;
    }

    .marca {
      width: clamp(64px, 7vw, 80px);
      height: clamp(64px, 7vw, 80px);
      border-radius: 26px;
      display: grid;
      place-items: center;
      background: linear-gradient(135deg, var(--rojo-peru), #fb7185 48%, var(--azul));
      box-shadow: 0 14px 28px rgba(185,28,28,.22);
      color: var(--blanco);
      font-weight: 900;
      font-size: clamp(22px, 2.3vw, 36px);
      letter-spacing: -.08em;
      animation: latidoLogo 3.8s ease-in-out infinite;
    }

    .marca span:last-child {
      transform: translateY(2px);
    }

    @keyframes latidoLogo {
      0%, 100% { transform: rotate(-4deg) scale(1); }
      50% { transform: rotate(3deg) scale(1.05); }
    }

    .titulo {
      display: flex;
      flex-direction: column;
      justify-content: center;
      padding: clamp(16px, 2vw, 30px);
      animation: aparecer .85s ease .08s both;
    }

    .titulo small {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      width: fit-content;
      margin-bottom: 8px;
      padding: 6px 13px;
      border-radius: 999px;
      color: #7f1d1d;
      background: rgba(254,226,226,.9);
      font-size: clamp(11px, .82vw, 14px);
      font-weight: 800;
      letter-spacing: .13em;
      text-transform: uppercase;
    }

    .titulo h1 {
      display: flex;
      flex-wrap: wrap;
      align-items: baseline;
      gap: 0.35em;
      font-size: clamp(20px, 2.2vw, 38px);
      line-height: 1.03;
      letter-spacing: -.035em;
      color: var(--rojo-peru);
      text-wrap: balance;
    }

    .titulo h1 .titulo-marca {
      color: var(--rojo-peru);
      font-weight: 800;
    }

    .titulo h1 .titulo-sub {
      font-size: 0.52em;
      font-weight: 800;
      letter-spacing: -.02em;
      color: var(--fucsia);
      white-space: nowrap;
    }

    .titulo h1 strong {
      color: var(--rojo-peru);
    }

    .tutorial {
      grid-column: 3;
      grid-row: 1 / 3;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: clamp(10px, 1.5vh, 16px);
      padding: clamp(12px, 1.5vw, 22px);
      color: white;
      background: linear-gradient(145deg, #1e3a8a, #0f172a 62%, #7f1d1d);
      animation: aparecer .9s ease .16s both;
    }

    .tutorial .icono {
      width: clamp(52px, 5vw, 74px);
      height: clamp(52px, 5vw, 74px);
      border-radius: 24px;
      display: grid;
      place-items: center;
      background: rgba(255,255,255,.15);
      box-shadow: inset 0 0 0 1px rgba(255,255,255,.24);
      font-size: clamp(28px, 3vw, 40px);
      animation: girarIcono 8s linear infinite;
    }

    @keyframes girarIcono {
      0% { transform: rotate(0deg); }
      100% { transform: rotate(360deg); }
    }

    .tutorial strong {
      font-size: clamp(17px, 1.8vw, 28px);
      line-height: 1.08;
      letter-spacing: -.02em;
    }

    .unidad {
      grid-column: 1 / 3;
      grid-row: 2;
      display: flex;
      align-items: center;
      gap: clamp(12px, 1.4vw, 22px);
      padding: 0 clamp(18px, 2.4vw, 38px);
      color: white;
      background: linear-gradient(135deg, #b91c1c, #ef4444 55%, #f59e0b);
      animation: aparecer .86s ease .12s both;
    }

    .unidad .circulo, .sesiones .circulo {
      flex: 0 0 auto;
      width: clamp(42px, 4vw, 62px);
      height: clamp(42px, 4vw, 62px);
      display: grid;
      place-items: center;
      border-radius: 20px;
      background: rgba(255,255,255,.18);
      box-shadow: inset 0 0 0 1px rgba(255,255,255,.25);
      font-size: clamp(22px, 2.6vw, 34px);
    }

    .unidad span {
      font-size: clamp(18px, 2vw, 36px);
      font-weight: 800;
      line-height: 1.02;
      letter-spacing: -.035em;
      text-align: left;
    }

    .sesiones {
      position: relative;
      z-index: 5;
      flex-shrink: 0;
      min-height: clamp(58px, 7vh, 80px);
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 14px;
      padding: 0 clamp(18px, 2.4vw, 38px);
      animation: aparecer .9s ease .22s both;
      overflow: visible;
    }

    .sesiones-main {
      border: 0;
      background: transparent;
      padding: 0;
      margin: 0;
      cursor: pointer;
      font: inherit;
      color: inherit;
      text-align: left;
      min-width: 0;
      flex: 1 1 auto;
    }

    .sesiones .izquierda {
      display: flex;
      align-items: center;
      gap: clamp(12px, 1.4vw, 20px);
      min-width: 0;
    }

    .sesiones .circulo {
      color: var(--azul);
      background: rgba(219,234,254,.95);
    }

    .sesiones strong {
      font-size: clamp(17px, 1.6vw, 28px);
      letter-spacing: -.02em;
    }

    .sesiones small {
      color: var(--muted);
      font-size: clamp(12px, .95vw, 16px);
      font-weight: 700;
    }

    .grado-desplegable {
      position: relative;
      flex: 0 0 auto;
      z-index: 60;
    }

    .chip-ia {
      display: inline-flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      border: 0;
      cursor: pointer;
      font-family: inherit;
      padding: 10px 16px;
      border-radius: 999px;
      background: linear-gradient(135deg, rgba(30,58,138,.10), rgba(185,28,28,.10));
      color: #1e293b;
      font-size: clamp(12px, .9vw, 15px);
      font-weight: 900;
      letter-spacing: .04em;
      text-transform: none;
      min-width: 11.5rem;
      animation: respirar 2.6s ease-in-out infinite;
    }

    #textoGradoSeleccionado {
      text-align: left;
      flex: 1 1 auto;
    }

    .chip-ia[aria-expanded="true"] {
      animation: none;
      background: linear-gradient(135deg, rgba(30,58,138,.18), rgba(185,28,28,.16));
    }

    .chip-flecha {
      font-size: .95em;
      line-height: 1;
      transition: transform .2s ease;
    }

    .chip-ia[aria-expanded="true"] .chip-flecha {
      transform: rotate(180deg);
    }

    .grado-lista {
      position: absolute;
      top: calc(100% + 8px);
      right: 0;
      left: auto;
      z-index: 80;
      min-width: 200px;
      margin: 0;
      padding: 8px;
      list-style: none;
      border-radius: 16px;
      background: #ffffff;
      border: 1px solid rgba(148,163,184,.45);
      box-shadow: 0 18px 44px rgba(15,23,42,.22);
    }

    .grado-lista.oculto {
      display: none;
    }

    .grado-lista li + li {
      margin-top: 4px;
    }

    .grado-lista button {
      width: 100%;
      border: 0;
      border-radius: 12px;
      padding: 10px 12px;
      background: transparent;
      color: #0f172a;
      font-family: inherit;
      font-size: 14px;
      font-weight: 800;
      text-align: left;
      cursor: pointer;
    }

    .grado-lista button:disabled,
    .grado-lista button.grado-no-suscrito {
      opacity: 0.35;
      cursor: not-allowed;
      text-decoration: line-through;
    }

    .grado-lista button.grado-suscrito {
      font-weight: 700;
      outline: 2px solid rgba(190, 24, 93, 0.45);
    }

    .grado-lista button.grado-sin-apps {
      opacity: 0.55;
    }

    .grado-lista button.grado-sin-apps::after {
      content: " (próx.)";
      font-weight: 600;
      font-size: 12px;
      color: #64748b;
    }

    .auth-form select,
    .auth-form input[type="radio"] {
      accent-color: #0d9488;
    }

    .auth-grado-label {
      font-size: 13px;
      font-weight: 700;
      color: #334155;
      margin-bottom: -4px;
    }

    .auth-req {
      color: #b91c1c;
    }

    .auth-grado-opciones {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 10px;
    }

    .auth-grado-chip {
      display: flex !important;
      flex-direction: row !important;
      align-items: center;
      gap: 8px !important;
      margin: 0;
      padding: 12px 14px;
      border: 2px solid #cbd5e1;
      border-radius: 14px;
      background: #f8fafc;
      cursor: pointer;
      font-size: 15px;
      font-weight: 800;
      color: #0f172a;
    }

    .auth-grado-chip input {
      width: 18px;
      height: 18px;
      margin: 0;
      flex-shrink: 0;
    }

    .auth-grado-chip:has(input:checked) {
      border-color: #0d9488;
      background: rgba(13, 148, 136, 0.12);
      box-shadow: 0 0 0 2px rgba(13, 148, 136, 0.2);
    }

    .auth-form select {
      width: 100%;
      box-sizing: border-box;
      padding: 0.65rem 0.75rem;
      border-radius: 10px;
      border: 1px solid #e5e7eb;
      font: inherit;
      background: #fff;
    }

    /* Evita que el modal recorte controles del formulario */
    .auth-card {
      overflow-x: hidden;
      overflow-y: auto;
    }

    .grado-lista button:hover:not(:disabled),
    .grado-lista button:focus-visible:not(:disabled) {
      background: #eff6ff;
      color: #1d4ed8;
      outline: none;
    }

    @keyframes respirar {
      0%, 100% { transform: scale(1); opacity: .86; }
      50% { transform: scale(1.05); opacity: 1; }
    }

    .areas {
      position: relative;
      z-index: 1;
      flex: 1 1 auto;
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      grid-template-rows: repeat(2, minmax(130px, auto));
      gap: clamp(10px, 1.2vw, 18px);
      min-height: clamp(280px, 38vh, 420px);
    }

    .tarjeta-area {
      display: flex;
      align-items: center;
      justify-content: space-between;
      min-height: 0;
      padding: clamp(12px, 1.5vw, 24px);
      text-align: left;
      animation: subir .8s cubic-bezier(.2,.9,.2,1) both;
      transform-style: preserve-3d;
    }

    .tarjeta-area:nth-child(1) { animation-delay: .28s; --color: #1d4ed8; --luz: rgba(59,130,246,.18); }
    .tarjeta-area:nth-child(2) { animation-delay: .36s; --color: #b91c1c; --luz: rgba(239,68,68,.18); }
    .tarjeta-area:nth-child(3) { animation-delay: .44s; --color: #047857; --luz: rgba(16,185,129,.18); }
    .tarjeta-area:nth-child(4) { animation-delay: .52s; --color: #7c2d12; --luz: rgba(245,158,11,.20); }
    .tarjeta-area:nth-child(5) { animation-delay: .60s; --color: #6d28d9; --luz: rgba(124,58,237,.18); }
    .tarjeta-area:nth-child(6) { animation-delay: .68s; --color: #be123c; --luz: rgba(244,63,94,.16); }

    .tarjeta-area.area-no-disponible {
      cursor: not-allowed;
      filter: grayscale(.55);
      opacity: .62;
    }

    .tarjeta-area.area-no-disponible:hover {
      transform: none;
      box-shadow: 0 14px 35px rgba(15,23,42,.10);
    }

    .tarjeta-area::after {
      content: "";
      position: absolute;
      width: 180px;
      height: 180px;
      right: -54px;
      bottom: -74px;
      border-radius: 999px;
      background: var(--luz);
      transition: transform .45s ease, opacity .45s ease;
      z-index: -1;
    }

    .tarjeta-area:hover::after {
      transform: scale(1.45);
      opacity: .95;
    }

    .area-texto {
      display: flex;
      flex-direction: column;
      gap: clamp(8px, .8vw, 12px);
      min-width: 0;
    }

    .area-texto small {
      width: fit-content;
      color: var(--color);
      background: color-mix(in srgb, var(--color) 12%, white);
      padding: 7px 12px;
      border-radius: 999px;
      font-size: clamp(10px, .78vw, 13px);
      font-weight: 900;
      letter-spacing: .10em;
      text-transform: uppercase;
    }

    .area-texto strong {
      color: #111827;
      font-size: clamp(18px, 1.8vw, 32px);
      line-height: 1.04;
      letter-spacing: -.04em;
    }

    .area-icono {
      flex: 0 0 auto;
      width: clamp(44px, 4.5vw, 72px);
      height: clamp(44px, 4.5vw, 72px);
      display: grid;
      place-items: center;
      border-radius: 26px;
      color: white;
      background: linear-gradient(135deg, var(--color), color-mix(in srgb, var(--color) 55%, white));
      box-shadow: 0 16px 30px color-mix(in srgb, var(--color) 24%, transparent);
      font-size: clamp(28px, 3vw, 42px);
      transition: transform .45s ease;
    }

    .tarjeta-area:hover .area-icono {
      transform: translateZ(24px) rotate(7deg) scale(1.08);
    }

    @keyframes aparecer {
      from { opacity: 0; transform: translateY(18px) scale(.98); }
      to { opacity: 1; transform: translateY(0) scale(1); }
    }

    @keyframes subir {
      from { opacity: 0; transform: translateY(34px) scale(.96); }
      to { opacity: 1; transform: translateY(0) scale(1); }
    }

    .onda {
      position: absolute;
      border-radius: 50%;
      transform: scale(0);
      background: rgba(255,255,255,.52);
      animation: onda .62s linear;
      pointer-events: none;
    }

    @keyframes onda {
      to { transform: scale(4); opacity: 0; }
    }

    .toast {
      position: fixed;
      z-index: 20;
      left: 50%;
      bottom: 28px;
      transform: translateX(-50%) translateY(22px);
      opacity: 0;
      display: flex;
      align-items: center;
      gap: 12px;
      min-width: min(90vw, 460px);
      max-width: min(92vw, 520px);
      padding: 14px 14px 14px 20px;
      border-radius: 18px;
      color: white;
      background: rgba(15,23,42,.94);
      box-shadow: 0 20px 45px rgba(15,23,42,.25);
      font-weight: 700;
      pointer-events: none;
      transition: opacity .28s ease, transform .28s ease;
    }

    .toast.activo {
      opacity: 1;
      transform: translateX(-50%) translateY(0);
      pointer-events: auto;
    }

    .toast-texto {
      flex: 1;
      text-align: left;
      line-height: 1.35;
    }

    .toast-cerrar {
      flex: 0 0 auto;
      width: 32px;
      height: 32px;
      border: 0;
      border-radius: 10px;
      background: rgba(255,255,255,.14);
      color: #fff;
      font-size: 22px;
      line-height: 1;
      cursor: pointer;
      font-family: inherit;
    }

    .toast-cerrar:hover {
      background: rgba(255,255,255,.24);
    }

    @media (max-height: 780px) {
      body {
        align-items: flex-start;
        padding-block: 10px;
      }

      .pantalla {
        height: auto;
        min-height: calc(100dvh - 20px);
        min-height: calc(100vh - 20px);
        overflow-y: auto;
      }

      .barra-superior {
        grid-template-rows: clamp(60px, 8vh, 88px) clamp(60px, 8vh, 88px);
      }

      .tutorial strong {
        font-size: clamp(16px, 2.5vw, 24px);
      }

      .titulo h1 {
        font-size: clamp(18px, 2.5vw, 28px);
      }
    }

    @media (max-width: 1120px) {
      body {
        align-items: flex-start;
      }

      .pantalla {
        height: auto;
        min-height: calc(100dvh - 24px);
        min-height: calc(100vh - 24px);
        overflow-y: auto;
      }
      .barra-superior {
        grid-template-columns: 120px 1fr;
        grid-template-rows: 104px 104px 104px;
      }
      .tutorial {
        grid-column: 1 / 3;
        grid-row: 3;
        flex-direction: row;
      }
      .unidad {
        grid-column: 1 / 3;
        grid-row: 2;
      }
      .areas {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-rows: none;
      }
      .sesiones strong { white-space: normal; }
    }

    @media (max-width: 720px) {
      body {
        padding: 12px 8px;
      }

      .pantalla {
        width: 100%;
        height: auto;
        min-height: 0;
        margin: 0;
        padding: 16px;
        border-radius: 24px;
      }
      .barra-superior {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
      }
      .logo, .titulo, .tutorial, .unidad {
        grid-column: 1;
        grid-row: auto;
        min-height: 92px;
      }
      .marca { width: 72px; height: 72px; }
      .tutorial { flex-direction: column; }
      .unidad span { font-size: clamp(21px, 6vw, 32px); }
      .sesiones { flex-direction: column; align-items: flex-start; padding-block: 18px; }
      .chip-ia { align-self: flex-start; }
      .areas { grid-template-columns: 1fr; }
      .tarjeta-area { min-height: 132px; }
      .area-texto strong { font-size: clamp(25px, 8vw, 34px); }
    }

    @media (prefers-reduced-motion: reduce) {
      *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
      }
    }

    /* —— Registro docente (exploración libre) —— */
    body.auth-abierto .pantalla {
      filter: blur(2px);
      pointer-events: none;
      user-select: none;
    }

    .oculto {
      display: none !important;
    }

    .barra-invitado {
      position: relative;
      z-index: 3;
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 10px 12px;
      padding: 12px 16px;
      border-radius: 18px;
      background: linear-gradient(135deg, rgba(255,255,255,.94), rgba(224,242,254,.85));
      border: 1px solid rgba(56,189,248,.28);
      box-shadow: 0 8px 24px rgba(30,58,138,.08);
    }

    .invitado-texto {
      flex: 1 1 200px;
      font-size: 14px;
      line-height: 1.4;
      color: #334155;
    }

    .invitado-texto strong {
      color: var(--turquesa);
    }

    .invitado-texto .invitado-aviso-descarga {
      color: #000;
      font-weight: 800;
    }

    .btn-auth {
      border: 0;
      border-radius: 12px;
      padding: 9px 14px;
      font-weight: 800;
      cursor: pointer;
      font-family: inherit;
      font-size: 13px;
      white-space: nowrap;
    }

    .btn-auth-primario {
      color: white;
      background: linear-gradient(135deg, var(--turquesa), #0891b2);
    }

    .btn-auth-secundario {
      color: #334155;
      background: #f1f5f9;
    }

    .btn-auth:hover {
      filter: brightness(1.05);
    }

    .barra-docente {
      position: relative;
      z-index: 3;
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 10px 16px;
      padding: 10px 16px;
      border-radius: 18px;
      background: rgba(255,255,255,.9);
      border: 1px solid rgba(13,148,136,.25);
      box-shadow: 0 8px 24px rgba(13,148,136,.12);
    }

    .docente-saludo {
      font-weight: 700;
      color: var(--rojo-peru);
    }

    .docente-plan {
      font-size: 13px;
      font-weight: 700;
      color: var(--muted);
      padding: 4px 10px;
      border-radius: 999px;
      background: rgba(13,148,136,.08);
    }

    .btn-sesion {
      margin-left: auto;
      border: 0;
      border-radius: 12px;
      padding: 8px 14px;
      font-weight: 700;
      cursor: pointer;
      color: #7f1d1d;
      background: rgba(254,226,226,.95);
      font-family: inherit;
    }

    .btn-sesion:hover {
      background: #fecaca;
    }

    .auth-overlay {
      position: fixed;
      inset: 0;
      z-index: 50;
      display: grid;
      place-items: center;
      padding: 20px;
      background: rgba(15,23,42,.45);
      backdrop-filter: blur(6px);
    }

    .auth-card {
      position: relative;
      width: min(100%, 460px);
      max-height: min(92vh, 720px);
      overflow-y: auto;
      padding: clamp(20px, 3vw, 28px);
      border-radius: 24px;
      background: rgba(255,255,255,.96);
      box-shadow: 0 24px 60px rgba(15,23,42,.22);
      border: 1px solid rgba(255,255,255,.8);
    }

    .auth-marca {
      display: inline-block;
      margin-bottom: 8px;
      padding: 5px 12px;
      border-radius: 999px;
      font-size: 12px;
      font-weight: 900;
      letter-spacing: .12em;
      text-transform: uppercase;
      color: var(--rojo-peru);
      background: rgba(185,28,28,.1);
    }

    .auth-card h2 {
      font-size: clamp(22px, 4vw, 28px);
      color: var(--azul-2);
      margin-bottom: 8px;
    }

    .auth-sub {
      color: var(--muted);
      line-height: 1.45;
      margin-bottom: 18px;
      font-size: 14px;
    }

    .auth-sub a {
      color: var(--turquesa);
      font-weight: 800;
    }

    .texto-fucsia {
      color: var(--fucsia);
      font-weight: 800;
    }

    .auth-tabs {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 8px;
      margin-bottom: 16px;
    }

    .auth-tab {
      border: 0;
      border-radius: 14px;
      padding: 10px;
      font-weight: 800;
      cursor: pointer;
      background: #f1f5f9;
      color: #475569;
      font-family: inherit;
    }

    .auth-tab.activo {
      color: white;
      background: linear-gradient(135deg, var(--turquesa), #0891b2);
    }

    .auth-panel {
      display: none;
    }

    .auth-panel.activo {
      display: block;
    }

    .auth-acceso-demo {
      margin-bottom: 14px;
      border: 1px solid #cbd5e1;
      border-radius: 14px;
      background: #f8fafc;
      overflow: hidden;
    }

    .auth-acceso-demo summary {
      cursor: pointer;
      list-style: none;
      padding: 11px 14px;
      font-size: 13px;
      font-weight: 800;
      color: var(--azul-2);
      user-select: none;
    }

    .auth-acceso-demo summary::-webkit-details-marker {
      display: none;
    }

    .auth-acceso-demo summary::after {
      content: "▾";
      float: right;
      color: #64748b;
      font-weight: 700;
    }

    .auth-acceso-demo[open] summary::after {
      content: "▴";
    }

    .auth-acceso-demo-body {
      padding: 0 14px 14px;
      display: flex;
      flex-direction: column;
      gap: 8px;
      font-size: 13px;
      color: #334155;
      line-height: 1.4;
    }

    .auth-acceso-demo-body p {
      margin: 0;
    }

    .auth-acceso-demo-body code {
      display: inline-block;
      margin-top: 2px;
      padding: 3px 8px;
      border-radius: 8px;
      background: #e2e8f0;
      color: #0f172a;
      font-size: 13px;
      font-weight: 700;
      letter-spacing: .02em;
      word-break: break-all;
    }

    .auth-acceso-reglas {
      margin-top: 4px !important;
      padding-top: 10px;
      border-top: 1px dashed #cbd5e1;
      color: #475569;
      font-weight: 600;
    }

    .auth-form {
      display: flex;
      flex-direction: column;
      gap: 12px;
    }

    .auth-form label {
      display: flex;
      flex-direction: column;
      gap: 6px;
      font-size: 13px;
      font-weight: 700;
      color: #334155;
    }

    .auth-form input {
      border: 1px solid #cbd5e1;
      border-radius: 12px;
      padding: 10px 12px;
      font-size: 15px;
      font-family: inherit;
    }

    .auth-form input:focus {
      outline: 2px solid rgba(13,148,136,.35);
      border-color: var(--turquesa);
    }

    .auth-error {
      display: none;
      color: #b91c1c;
      font-size: 13px;
      font-weight: 700;
      line-height: 1.35;
    }

    .auth-error.visible {
      display: block;
    }

    .auth-submit {
      margin-top: 4px;
      border: 0;
      border-radius: 14px;
      padding: 12px 16px;
      font-size: 16px;
      font-weight: 800;
      color: white;
      cursor: pointer;
      background: linear-gradient(135deg, #b91c1c, #ef4444 55%, #f59e0b);
      font-family: inherit;
    }

    .auth-submit:hover {
      filter: brightness(1.03);
    }

    .auth-cerrar {
      position: absolute;
      top: 12px;
      right: 12px;
      width: 36px;
      height: 36px;
      border: 0;
      border-radius: 10px;
      background: #f1f5f9;
      color: #64748b;
      font-size: 22px;
      line-height: 1;
      cursor: pointer;
      font-family: inherit;
    }

    .auth-cerrar:hover {
      background: #e2e8f0;
      color: #334155;
    }

    /* —— Tutorial video —— */
    body.tutorial-abierto .pantalla {
      filter: blur(2px);
      pointer-events: none;
    }

    .tutorial-overlay {
      position: fixed;
      inset: 0;
      z-index: 55;
      display: grid;
      place-items: center;
      padding: 16px;
      background: rgba(15,23,42,.55);
      backdrop-filter: blur(4px);
    }

    .tutorial-card {
      position: relative;
      width: min(100%, 920px);
      max-height: 92vh;
      overflow: auto;
      padding: 20px 20px 24px;
      border-radius: 22px;
      background: #fff;
      box-shadow: 0 24px 60px rgba(15,23,42,.25);
    }

    .tutorial-card h2 {
      font-size: clamp(20px, 3vw, 26px);
      color: var(--azul-2);
      margin-bottom: 6px;
      padding-right: 40px;
    }

    .tutorial-sub {
      color: var(--muted);
      font-size: 14px;
      margin-bottom: 14px;
    }

    .tutorial-cerrar {
      position: absolute;
      top: 14px;
      right: 14px;
      width: 36px;
      height: 36px;
      border: 0;
      border-radius: 10px;
      background: #f1f5f9;
      color: #64748b;
      font-size: 22px;
      cursor: pointer;
      font-family: inherit;
    }

    .tutorial-video-wrap {
      position: relative;
      width: 100%;
      aspect-ratio: 16 / 9;
      background: #0f172a;
      border-radius: 14px;
      overflow: hidden;
    }

    .tutorial-video-wrap iframe,
    .tutorial-video-wrap video {
      position: absolute;
      inset: 0;
      width: 100%;
      height: 100%;
      border: 0;
      object-fit: contain;
      background: #000;
    }

    .tutorial-enlace-yt {
      margin-top: 12px;
      font-size: 14px;
      text-align: center;
      color: var(--muted);
    }

    .tutorial-enlace-yt a {
      color: var(--turquesa);
      font-weight: 800;
    }