/* ─────────────────────────────────────────────────────────
   Aula Ortográfica · pantalla de acceso (contraseña)
   Se muestra solo mientras <html> lleva la clase «bloqueado».
   ───────────────────────────────────────────────────────── */
.acceso { display: none; }
html.bloqueado .acceso {
  display: grid; position: fixed; inset: 0; z-index: 10000; padding: 18px; overflow: auto;
  color: var(--tinta);
}
html.bloqueado body { overflow: hidden; }

/* ── Fondo ── */
.ac-fondo {
  position: fixed; inset: 0; overflow: hidden;
  background:
    radial-gradient(1100px 650px at 12% 8%, rgba(113,100,244,.5), transparent 62%),
    radial-gradient(900px 600px at 92% 96%, rgba(35,184,144,.32), transparent 62%),
    linear-gradient(145deg, #0e1829 0%, #17243b 42%, #2a2c74 100%);
}
/* renglones, como en las fichas */
.ac-fondo::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(255,255,255,.045) 0 1px, transparent 1px 42px);
}
.ac-blob { position: absolute; border-radius: 50%; filter: blur(64px); will-change: transform; }
.ac-b1 { width: 46vmax; height: 46vmax; left: -12vmax; top: -14vmax; background: #7164f4; opacity: .55; animation: ac-flota1 22s ease-in-out infinite alternate; }
.ac-b2 { width: 38vmax; height: 38vmax; right: -10vmax; bottom: -12vmax; background: #23b890; opacity: .34; animation: ac-flota2 27s ease-in-out infinite alternate; }
.ac-b3 { width: 30vmax; height: 30vmax; right: 22vw; top: -12vmax; background: #d6455d; opacity: .2; animation: ac-flota3 31s ease-in-out infinite alternate; }
@keyframes ac-flota1 { to { transform: translate(14vmax, 10vmax) scale(1.12); } }
@keyframes ac-flota2 { to { transform: translate(-12vmax, -9vmax) scale(1.1); } }
@keyframes ac-flota3 { to { transform: translate(-10vmax, 12vmax) scale(.9); } }

/* letras y signos que suben despacio */
.ac-letras span {
  position: absolute; left: var(--x); top: 105%; font: 700 var(--s)/1 Georgia, "Times New Roman", serif;
  color: #fff; opacity: .1; white-space: nowrap; user-select: none; will-change: transform;
  animation: ac-sube var(--d) linear var(--t) infinite;
}
@keyframes ac-sube {
  from { transform: translate3d(0, 0, 0) rotate(var(--r)); }
  to   { transform: translate3d(var(--dx), -135vh, 0) rotate(calc(var(--r) * -1)); }
}

/* ── Tarjeta (pop-up) ── */
.ac-caja {
  position: relative; margin: auto; width: min(430px, 100%); overflow: hidden; text-align: center;
  padding: 36px clamp(22px, 6vw, 40px) 24px; background: rgba(255,255,255,.97); border-radius: 24px;
  box-shadow: 0 34px 90px rgba(4,9,28,.55), 0 2px 8px rgba(4,9,28,.25);
  animation: ac-entra .5s cubic-bezier(.2,.9,.3,1.15) both;
}
.ac-caja::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 6px;
  background: linear-gradient(90deg, var(--lavanda), var(--menta));
}
@keyframes ac-entra { from { opacity: 0; transform: translateY(22px) scale(.95); } to { opacity: 1; transform: none; } }
.acceso.saliendo .ac-caja { animation: ac-sale .3s ease-in forwards; }
.acceso.saliendo .ac-fondo { animation: ac-sale .3s ease-in forwards; }
@keyframes ac-sale { to { opacity: 0; transform: translateY(-10px) scale(.98); } }
.ac-caja.sacude { animation: ac-sacude .45s ease both; }
@keyframes ac-sacude {
  10%, 90% { transform: translateX(-2px); } 20%, 80% { transform: translateX(4px); }
  30%, 50%, 70% { transform: translateX(-8px); } 40%, 60% { transform: translateX(8px); }
}

.ac-logo {
  width: 68px; height: 68px; margin: 0 auto 12px; border-radius: 20px; display: grid; place-items: center;
  background: linear-gradient(145deg, var(--lavanda), var(--lavanda-osc)); color: #fff;
  font: 700 30px/1 Arial, sans-serif; letter-spacing: -1px; box-shadow: 0 12px 26px rgba(113,100,244,.45);
  animation: ac-logo 5s ease-in-out infinite;
}
@keyframes ac-logo { 50% { transform: translateY(-4px) rotate(-2deg); } }
.ac-caja h2 { margin: 0; font-size: 1.55rem; line-height: 1.15; }
.ac-sub { margin: 4px 0 0; color: var(--suave); font-size: .9rem; }
.ac-lead { margin: 22px 0 0; font-size: 1.08rem; font-weight: 600; }

/* ── Campo de contraseña ── */
.ac-campo {
  display: flex; align-items: center; margin-top: 14px; background: var(--fondo);
  border: 2px solid var(--linea); border-radius: 14px; transition: border-color .15s, box-shadow .15s, background .15s;
}
.ac-campo:focus-within { border-color: var(--lavanda); background: #fff; box-shadow: 0 0 0 4px var(--lavanda-cl); }
.ac-campo.error { border-color: var(--rojo); box-shadow: 0 0 0 4px rgba(214,69,93,.14); }
.ac-candado { flex: none; margin-left: 14px; color: var(--suave); }
.ac-campo input {
  flex: 1; min-width: 0; padding: 14px 6px 14px 10px; border: 0; outline: none; background: transparent;
  font-size: 1.1rem; letter-spacing: .06em;
}
.ac-campo input::placeholder { letter-spacing: 0; color: #98a1b3; }
.ac-ojo {
  flex: none; width: 46px; height: 46px; margin-right: 2px; display: grid; place-items: center; cursor: pointer;
  border: 0; border-radius: 12px; background: transparent; color: var(--suave); transition: color .15s, background .15s;
}
.ac-ojo:hover { color: var(--lavanda-osc); background: var(--lavanda-cl); }
.ac-tacha { display: none; }
.ac-ojo.ver .ac-tacha { display: inline; }

/* ── Intentos y mensajes ── */
.ac-intentos { display: flex; justify-content: center; gap: 10px; margin: 16px 0 2px; }
.ac-intentos i { width: 12px; height: 12px; border-radius: 50%; background: var(--lavanda); transition: background .25s, transform .25s, opacity .25s; }
.ac-intentos i.gastado { background: var(--rojo); transform: scale(.78); opacity: .85; }
.ac-msg { min-height: 2.6em; margin: 6px 0 0; font-size: .92rem; line-height: 1.35; color: var(--suave); }
.ac-msg.err { color: var(--rojo); font-weight: 600; }
.ac-msg.ok { color: #14876a; font-weight: 600; }

.ac-entrar {
  width: 100%; margin-top: 6px; padding: 14px 18px; cursor: pointer; border: 0; border-radius: 14px;
  background: linear-gradient(135deg, var(--lavanda), var(--lavanda-osc)); color: #fff; font-weight: 700; font-size: 1.05rem;
  box-shadow: 0 10px 22px rgba(113,100,244,.42); transition: transform .15s, box-shadow .15s, opacity .15s;
}
.ac-entrar:hover { transform: translateY(-1px); box-shadow: 0 14px 28px rgba(113,100,244,.5); }
.ac-entrar:active { transform: translateY(0); }
.ac-entrar:disabled { opacity: .7; cursor: progress; transform: none; }

/* ── Bloqueo con cuenta atrás ── */
.ac-form[hidden], .ac-bloqueo[hidden] { display: none; }
.ac-bloqueo { margin-top: 22px; outline: none; }
.ac-aviso-bloqueo {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px;
  background: #fde7ea; color: #b0283f; font-size: .95rem;
}
.ac-bloqueo-txt { margin: 14px 0 0; font-size: .98rem; line-height: 1.4; }
.ac-reloj { position: relative; width: 150px; height: 150px; margin: 8px auto 6px; }
.ac-reloj svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ac-reloj circle { fill: none; stroke-width: 8; }
.ac-fondo-arco { stroke: var(--linea); }
.ac-arco { stroke: var(--rojo); stroke-linecap: round; stroke-dasharray: 326.73; stroke-dashoffset: 0; transition: stroke-dashoffset .3s linear; }
.ac-tiempo { position: absolute; inset: 0; display: grid; place-items: center; font-size: 2.1rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.ac-bloqueo-pie { margin: 0; font-size: .88rem; color: var(--suave); }

.ac-nota { margin: 18px 0 0; padding-top: 14px; border-top: 1px solid var(--linea); font-size: .8rem; line-height: 1.4; color: var(--suave); }

@media (max-height: 560px) { .ac-logo { display: none; } .ac-lead { margin-top: 14px; } }

/* Sin animaciones si el usuario lo prefiere: las letras se quedan quietas como adorno */
@media (prefers-reduced-motion: reduce) {
  .ac-blob, .ac-caja, .ac-logo, .ac-caja.sacude, .acceso.saliendo .ac-caja, .acceso.saliendo .ac-fondo { animation: none; }
  .ac-letras span { animation: none; top: var(--y); }
  .ac-arco { transition: none; }
}

@media print { .acceso { display: none !important; } }
