/* Examen Seguro · diseño compartido (estudiante y docente).
   Vidrio esmerilado sobre fondo pastel (como la Wallet) y tipografía del Registro WEB. Claro y oscuro. */
:root {
  --fondo: #EEF0FB; --sup: rgb(255 255 255 / .66); --sup-fuerte: rgb(255 255 255 / .9); --sup-solida: #FFFFFF; --sup2: rgb(22 19 42 / .05);
  --borde: rgb(255 255 255 / .8); --linea: rgb(22 19 42 / .08); --texto: #16132A; --suave: rgb(22 19 42 / .62); --tenue: rgb(22 19 42 / .42);
  --acento: #5A3CEB; --acento-2: #3D63F5; --sobre-acento: #fff; --verde: #12A06A; --amarillo: #D98E04; --rojo: #E5484D; --morado: #8E5BF5; --cielo: #0EA5E9;
  --verde-t: #E3F7EE; --amarillo-t: #FFF4DB; --rojo-t: #FDE7E8; --morado-t: #EFE8FF; --azul-t: #E6EDFF; --cielo-t: #E0F4FD;
  --marca: linear-gradient(135deg, #6C4DF5 0%, #3D63F5 55%, #22B8F0 100%);
  --marca-2: linear-gradient(135deg, #8F7BFF 0%, #B98CFF 45%, #FF9EB5 100%);
  --b1: #C9BBFF; --b2: #FFD3BF; --b3: #FFC9E0; --b4: #BFD7FF; --b-op: .78;
  --radio: 22px; --radio-sm: 14px; --blur: saturate(170%) blur(22px);
  --sombra: 0 1px 2px rgb(16 12 40 / .05), 0 14px 34px -16px rgb(16 12 40 / .25);
  --letra: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --fondo: #0E0C1D; --sup: rgb(38 33 66 / .55); --sup-fuerte: rgb(44 38 78 / .92); --sup-solida: #1B1832; --sup2: rgb(255 255 255 / .06);
  --borde: rgb(255 255 255 / .09); --linea: rgb(255 255 255 / .08); --texto: #F4F1FF; --suave: rgb(244 241 255 / .66); --tenue: rgb(244 241 255 / .42);
  --acento: #A794FF; --acento-2: #7B9BFF; --sobre-acento: #120F22; --verde: #3DDC97; --amarillo: #FFC94D; --rojo: #FF6B6F; --morado: #C3A1FF; --cielo: #5BD0FF;
  --verde-t: rgb(61 220 151 / .14); --amarillo-t: rgb(255 201 77 / .14); --rojo-t: rgb(255 107 111 / .14); --morado-t: rgb(167 148 255 / .16); --azul-t: rgb(123 155 255 / .14); --cielo-t: rgb(91 208 255 / .14);
  --b1: #5B42E0; --b2: #C2557A; --b3: #7A2F8A; --b4: #2B4FC9; --b-op: .22;
  --sombra: 0 1px 2px rgb(0 0 0 / .3), 0 16px 36px -18px rgb(0 0 0 / .7);
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden], .oculto { display: none !important; }
html, body { margin: 0; min-height: 100%; }
body { font: 15.5px/1.45 var(--letra); color: var(--texto); background: var(--fondo); -webkit-font-smoothing: antialiased; letter-spacing: -.005em; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
a { color: var(--acento); }
::selection { background: var(--acento); color: var(--sobre-acento); }
.ico { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -4px; }

/* Fondo con manchas pastel */
.fondo { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.fondo i { position: absolute; width: 70vmax; height: 70vmax; border-radius: 50%; filter: blur(90px); opacity: var(--b-op); animation: flota 26s ease-in-out infinite; }
.fondo i:nth-child(1) { background: var(--b1); top: -36vmax; left: -28vmax; }
.fondo i:nth-child(2) { background: var(--b2); top: -26vmax; right: -40vmax; animation-delay: -6s; }
.fondo i:nth-child(3) { background: var(--b3); bottom: -40vmax; right: -28vmax; animation-delay: -12s; }
.fondo i:nth-child(4) { background: var(--b4); bottom: -34vmax; left: -36vmax; animation-delay: -18s; }
@keyframes flota { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(3vmax, -2vmax) scale(1.06); } }
@keyframes entra { from { opacity: 0; transform: translateY(12px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes pulso { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }
@media (prefers-reduced-motion: reduce) { *, .fondo i { animation: none !important; transition: none !important; } }

/* Vidrio */
.vidrio, .tarjeta { background: var(--sup); border: 1px solid var(--borde); border-radius: var(--radio); box-shadow: var(--sombra);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); }
.tarjeta { padding: 20px 22px; animation: entra .35s ease-out both; }
.tarjeta h2, .tarjeta h3 { margin: 0 0 12px; display: flex; align-items: center; gap: 10px; }
h1 { font-size: 27px; font-weight: 800; letter-spacing: -.03em; margin: 0 0 4px; }
h2 { font-size: 19px; font-weight: 750; letter-spacing: -.02em; } h3 { font-size: 16px; font-weight: 700; }
.suave { color: var(--suave); } .tenue { color: var(--tenue); } .pequeno { font-size: 13px; }
.chip-ico { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; flex: none; background: var(--morado-t); color: var(--acento); }
.chip-ico.verde { background: var(--verde-t); color: var(--verde); } .chip-ico.amarillo { background: var(--amarillo-t); color: var(--amarillo); }
.chip-ico.rojo { background: var(--rojo-t); color: var(--rojo); } .chip-ico.azul { background: var(--azul-t); color: var(--acento-2); } .chip-ico.cielo { background: var(--cielo-t); color: var(--cielo); }

/* Botones */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 18px; border-radius: 999px; border: 0; cursor: pointer;
  font-weight: 700; background: var(--texto); color: var(--fondo); transition: transform .12s, opacity .12s, box-shadow .12s; white-space: nowrap; }
.btn:hover { transform: translateY(-1px); } .btn:active { transform: scale(.98); }
.btn:disabled { opacity: .45; cursor: default; transform: none; }
.btn.primario { background: var(--marca); color: #fff; box-shadow: 0 10px 24px -12px #3D63F5; }
.btn.claro { background: var(--sup-fuerte); color: var(--texto); border: 1px solid var(--linea); }
.btn.fantasma { background: transparent; color: var(--suave); padding: 9px 12px; }
.btn.fantasma:hover { background: var(--sup2); color: var(--texto); }
.btn.peligro { background: var(--rojo-t); color: var(--rojo); }
.btn.ok { background: var(--verde-t); color: var(--verde); }
.btn.mini { padding: 7px 12px; font-size: 13.5px; }
.btn.icono { width: 40px; height: 40px; padding: 0; border-radius: 50%; }
.btn.ancho { width: 100%; padding: 14px 18px; font-size: 16px; }

/* Formularios */
.campo { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.campo > span, label.titulo { font-size: 12.5px; font-weight: 700; color: var(--suave); letter-spacing: .02em; text-transform: uppercase; }
.entrada, select.entrada, textarea.entrada { width: 100%; padding: 12px 14px; border-radius: var(--radio-sm); border: 1px solid var(--linea); background: var(--sup-fuerte);
  outline: none; transition: border .15s, box-shadow .15s; -webkit-appearance: none; appearance: none; }
.entrada:focus { border-color: var(--acento); box-shadow: 0 0 0 4px color-mix(in srgb, var(--acento) 18%, transparent); }
textarea.entrada { min-height: 90px; resize: vertical; }
select.entrada { background-image: linear-gradient(45deg, transparent 50%, var(--suave) 50%), linear-gradient(135deg, var(--suave) 50%, transparent 50%);
  background-position: calc(100% - 20px) 54%, calc(100% - 15px) 54%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
select.entrada option { background: var(--sup-solida); color: var(--texto); }
.fila { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.error { color: var(--rojo); font-weight: 600; min-height: 1.3em; margin: 6px 0; }

/* Segmentado e interruptor */
.segmento { display: inline-flex; padding: 4px; gap: 4px; border-radius: 999px; background: var(--sup2); border: 1px solid var(--linea); }
.segmento button { border: 0; background: transparent; padding: 8px 14px; border-radius: 999px; font-weight: 700; color: var(--suave); cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.segmento button.on { background: var(--sup-solida); color: var(--texto); box-shadow: var(--sombra); }
.interruptor { position: relative; width: 50px; height: 30px; flex: none; }
.interruptor input { opacity: 0; width: 0; height: 0; }
.interruptor i { position: absolute; inset: 0; border-radius: 999px; background: var(--sup2); border: 1px solid var(--linea); transition: background .2s; cursor: pointer; }
.interruptor i::after { content: ''; position: absolute; width: 24px; height: 24px; top: 2px; left: 2px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgb(0 0 0 / .2); transition: transform .2s; }
.interruptor input:checked + i { background: var(--verde); border-color: var(--verde); }
.interruptor input:checked + i::after { transform: translateX(20px); }
.interruptor input:focus-visible + i { outline: 3px solid var(--acento); outline-offset: 2px; }

/* Píldoras de estado */
.pildora { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 700; background: var(--sup2); color: var(--suave); white-space: nowrap; }
.pildora.verde { background: var(--verde-t); color: var(--verde); } .pildora.amarillo { background: var(--amarillo-t); color: var(--amarillo); }
.pildora.rojo { background: var(--rojo-t); color: var(--rojo); } .pildora.morado { background: var(--morado-t); color: var(--acento); } .pildora.azul { background: var(--azul-t); color: var(--acento-2); }
.pildora .punto { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pildora .punto.vivo { animation: pulso 1.2s infinite; }

/* Modal y avisos */
.modal { position: fixed; inset: 0; z-index: 50; background: rgb(14 12 29 / .45); display: grid; place-items: center; padding: 16px; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.modal > .tarjeta { width: min(560px, 100%); max-height: 90vh; overflow: auto; background: var(--sup-fuerte); }
.modal.ancho > .tarjeta { width: min(900px, 100%); }
.aviso { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 60; padding: 12px 18px; border-radius: 999px; background: var(--texto); color: var(--fondo);
  font-weight: 700; box-shadow: var(--sombra); animation: entra .25s ease-out; display: flex; gap: 8px; align-items: center; max-width: calc(100% - 32px); }
.vacio { text-align: center; padding: 36px 16px; color: var(--suave); }
.vacio .chip-ico { width: 56px; height: 56px; border-radius: 18px; margin: 0 auto 10px; }

/* Tema */
.tema { display: inline-flex; padding: 3px; gap: 2px; border-radius: 999px; background: var(--sup); border: 1px solid var(--borde); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); }
.tema button { border: 0; background: transparent; width: 34px; height: 30px; border-radius: 999px; cursor: pointer; color: var(--suave); display: grid; place-items: center; }
.tema button.on { background: var(--sup-solida); color: var(--texto); box-shadow: var(--sombra); }

/* Tablas */
.tabla { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
.tabla th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--tenue); font-weight: 700; padding: 10px 12px; border-bottom: 1px solid var(--linea); }
.tabla td { padding: 11px 12px; border-bottom: 1px solid var(--linea); vertical-align: middle; }
.tabla tr:last-child td { border-bottom: 0; }
.tabla tbody tr:hover td { background: var(--sup2); }
.desliza { overflow-x: auto; }
.barra-nota { height: 8px; border-radius: 99px; background: var(--sup2); overflow: hidden; min-width: 70px; }
.barra-nota i { display: block; height: 100%; border-radius: 99px; background: var(--verde); }
.barra-nota i.medio { background: var(--amarillo); } .barra-nota i.bajo { background: var(--rojo); }

@media print { .fondo, .no-imprimir, .tema { display: none !important; } body { background: #fff; } .tarjeta, .vidrio { box-shadow: none; border: 1px solid #ddd; background: #fff; } }

/* Imagen, video o audio de una pregunta */
.media { margin: 6px 0 14px; }
.media img { display: block; max-width: 100%; max-height: 340px; margin: 0 auto; border-radius: 14px; background: #fff; cursor: zoom-in; border: 1px solid var(--linea); }
.media.grande img { max-height: none; cursor: zoom-out; }
.media figcaption { font-size: 12px; color: var(--tenue); text-align: center; margin-top: 4px; }
.media.video iframe, .media.video video { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 14px; background: #000; }
.media.audio audio { width: 100%; }
.media.audio iframe { width: 100%; height: 70px; border: 0; border-radius: 12px; }