/* ============================================================
   CONEXA — Estilo "Carnet"
   ------------------------------------------------------------
   Portada, registro, inicio de sesión y completar el carnet.
   Todo cuelga de la clase .cx para no chocar con style.css.
   Letras: Archivo (títulos anchos, etiquetas estrechas) y
   Graduate (números de carnet y cursos).
   ============================================================ */

:root {
  --cx-azul:     #003087;
  --cx-azul-d:   #001A4D;
  --cx-noche:    #0B1B3F;   /* texto sobre amarillo y colores: no cambia en modo oscuro */
  --cx-amarillo: #FFD23F;
  --cx-coral:    #FF7A59;
  --cx-salmon:   #FF8A65;
  --cx-cielo:    #9CC9FF;
  --cx-menta:    #7FE0B5;

  --cx-fondo:    #F1F4FB;
  --cx-papel:    #FFFFFF;
  --cx-tinta:    #0B1B3F;
  --cx-gris:     #46557A;
  --cx-gris2:    #7C89A8;
  --cx-linea:    #C9D3E8;
  --cx-suave:    #E3E9F6;
  --cx-borde:    #0B1B3F;
  --cx-enlace:   #003087;
  --cx-error:    #B42318;

  --cx-letra:    'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --cx-num:      'Graduate', 'Archivo', Georgia, serif;
}
body.dark {
  --cx-fondo:    #0B1226;
  --cx-papel:    #141E3A;
  --cx-tinta:    #EEF2FA;
  --cx-gris:     #B3BEDA;
  --cx-gris2:    #8693B4;
  --cx-linea:    #2E3C63;
  --cx-suave:    #1C2A4E;
  --cx-borde:    #8EA2D4;
  --cx-enlace:   #9CC9FF;
  --cx-error:    #FF9A80;
}

.cx { font-family: var(--cx-letra); color: var(--cx-tinta); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
.cx *, .cx *::before, .cx *::after { box-sizing: border-box; }
:where(.cx) button { font-family: inherit; }
.cx [hidden] { display: none !important; }
.cx a { color: var(--cx-enlace); }
body.cx { margin: 0; background: var(--cx-fondo); min-height: 100vh; min-height: 100dvh; overflow-x: hidden; }

/* ── Pantallas y columna ─────────────────────────────────────── */
.cx-pantalla { min-height: 100vh; min-height: 100dvh; background: var(--cx-fondo); display: flex; flex-direction: column; }
.cx-azul { background: var(--cx-azul); color: #fff; }
.cx-azul a { color: var(--cx-amarillo); }
.cx-col {
  width: 100%; max-width: 440px; margin: 0 auto; flex: 1;
  display: flex; flex-direction: column;
  padding: calc(14px + env(safe-area-inset-top)) 24px calc(28px + env(safe-area-inset-bottom));
}
.cx-top { display: flex; align-items: center; justify-content: space-between; min-height: 44px; margin-bottom: 20px; }
.cx-volver {
  width: 44px; height: 44px; border-radius: 14px; flex: none;
  border: 2px solid var(--cx-borde); background: var(--cx-papel); color: var(--cx-tinta);
  display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0;
}
.cx-volver svg { width: 20px; height: 20px; }
.cx-paso { font-family: var(--cx-num); font-size: 16px; }
.cx-logo { display: inline-flex; align-items: center; gap: 9px; font-weight: 900; font-stretch: 125%; font-size: 20px; letter-spacing: 0.01em; line-height: 1; color: inherit; text-decoration: none; }
.cx-logo b { font-weight: inherit; }
.cx-logo-c { width: 28px; height: 28px; border-radius: 8px; flex: none; }
.cx-logo span { color: var(--cx-amarillo); }
.cx-pantalla:not(.cx-azul) .cx-logo { color: var(--cx-azul); }
body.dark .cx-pantalla:not(.cx-azul) .cx-logo { color: var(--cx-tinta); }

.cx-titulo { font-weight: 900; font-size: clamp(29px, 8.4vw, 36px); line-height: 1.02; letter-spacing: -0.025em; margin: 0 0 10px; }
.cx-titulo em { font-style: normal; color: var(--cx-azul); }
body.dark .cx-titulo em, .cx-azul .cx-titulo em { color: var(--cx-amarillo); }
.cx-sub { font-size: 15px; line-height: 1.45; color: var(--cx-gris); margin: 0 0 22px; }
.cx-azul .cx-sub { color: #C9D8FF; }
.cx-sub strong { color: var(--cx-tinta); font-weight: 700; overflow-wrap: anywhere; }
.cx-pie { margin-top: auto; padding-top: 24px; display: flex; flex-direction: column; gap: 12px; }
.cx-legal { font-size: 13px; line-height: 1.4; color: var(--cx-gris); text-align: center; margin: 0; }
.cx-centro { text-align: center; }

/* ── Campos ──────────────────────────────────────────────────── */
.cx-label { display: block; font-weight: 700; font-stretch: 85%; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--cx-gris); margin: 0 0 8px; }
.cx-label + .cx-label, .cx-campo + .cx-campo { margin-top: 16px; }
.cx-input, .cx-caja {
  width: 100%; height: 58px; border-radius: 16px;
  border: 2px solid var(--cx-borde); background: var(--cx-papel); box-shadow: 0 3px 0 var(--cx-borde);
  color: var(--cx-tinta); font: 600 18px var(--cx-letra);
}
.cx-input { padding: 0 16px; outline: none; }
.cx-caja { display: flex; align-items: center; overflow: hidden; }
.cx-caja input { flex: 1; min-width: 0; height: 100%; border: 0; outline: none; background: transparent; padding: 0 14px; font: inherit; color: inherit; }
.cx-input::placeholder, .cx-caja input::placeholder { color: var(--cx-gris2); }
.cx-input:focus-visible, .cx-caja:focus-within { box-shadow: 0 3px 0 var(--cx-borde), 0 0 0 4px rgba(0, 48, 135, 0.2); }
.cx-sufijo { align-self: stretch; display: flex; align-items: center; padding: 0 12px; background: var(--cx-suave); border-left: 2px solid var(--cx-borde); font-weight: 700; font-size: 15px; white-space: nowrap; }
.cx-ojo { width: 44px; height: 44px; margin-right: 6px; flex: none; border: 0; background: transparent; border-radius: 12px; color: var(--cx-tinta); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.cx-ayuda { font-size: 14px; line-height: 1.45; color: var(--cx-gris); margin: 10px 0 0; }
.cx-error { display: none; color: var(--cx-error); font-weight: 600; font-size: 14px; line-height: 1.4; margin: 12px 0 0; }
.cx-error.on { display: block; }
.cx-azul .cx-error { color: #FFD0C2; }
.cx-fuerza { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-top: 14px; }
.cx-fuerza i { height: 6px; border-radius: 3px; background: var(--cx-linea); transition: background .2s; }
.cx-fuerza i.on { background: var(--cx-azul); }
body.dark .cx-fuerza i.on { background: var(--cx-cielo); }

/* ── Botones ─────────────────────────────────────────────────── */
.cx-btn {
  width: 100%; height: 56px; border-radius: 16px; padding: 0 18px;
  background: var(--cx-amarillo); color: var(--cx-noche) !important;
  border: 2px solid var(--cx-noche); box-shadow: 0 4px 0 var(--cx-noche);
  font: 800 17px var(--cx-letra); text-decoration: none;
  display: flex; align-items: center; justify-content: center; gap: 10px; cursor: pointer;
  transition: transform .08s ease, box-shadow .08s ease;
}
.cx-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--cx-noche); }
.cx-btn svg { width: 20px; height: 20px; flex: none; }
.cx-btn.cargando { pointer-events: none; opacity: .85; }
.cx-btn.cargando::after { content: ''; width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid var(--cx-noche); border-right-color: transparent; animation: cxGira .7s linear infinite; }
.cx-btn.cargando svg { display: none; }
.cx-btn-sec {
  width: 100%; height: 52px; border-radius: 16px; padding: 0 16px;
  border: 2px solid var(--cx-borde); background: var(--cx-papel); color: var(--cx-tinta) !important;
  font: 700 16px var(--cx-letra); text-decoration: none; text-align: center;
  display: flex; align-items: center; justify-content: center; gap: 10px; cursor: pointer;
}
.cx-btn-sec svg { width: 20px; height: 20px; flex: none; }
.cx-azul .cx-btn-sec { background: transparent; border-color: rgba(255, 255, 255, 0.5); color: #fff !important; }
.cx-azul .cx-btn { box-shadow: 0 4px 0 var(--cx-azul-d); }
.cx-enlace { border: 0; background: none; padding: 8px 2px; cursor: pointer; color: var(--cx-enlace); font: 700 14px var(--cx-letra); text-decoration: underline; text-underline-offset: 3px; }
.cx-falta { height: 56px; border-radius: 16px; border: 2px dashed var(--cx-gris2); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 16px; color: var(--cx-gris); text-align: center; padding: 0 12px; }

/* ── Fichas (opciones grandes) ───────────────────────────────── */
.cx-fichas { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.cx-fichas.tres { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.cx-ficha {
  position: relative; min-width: 0; border-radius: 16px; padding: 12px;
  border: 2px solid var(--cx-borde); background: var(--cx-papel); box-shadow: 0 3px 0 var(--cx-borde);
  color: var(--cx-tinta); text-align: left; cursor: pointer;
  transition: transform .14s cubic-bezier(.2, 1.4, .4, 1), background .12s, box-shadow .12s;
}
.cx-ficha:active { transform: translateY(2px); }
.cx-ficha[aria-pressed="true"] {
  background: var(--cat, var(--cx-amarillo)); color: var(--cx-noche); border-color: var(--cx-noche);
  box-shadow: 0 5px 0 var(--cx-noche); transform: rotate(var(--giro, -2deg));
}
.cx-fac { min-height: 92px; gap: 8px; display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start; overflow: hidden; }
.cx-fac b { position: relative; font-weight: 800; font-stretch: 88%; font-size: 17px; line-height: 1.05; padding-right: 22px; }
.cx-fac small { position: relative; font-size: 13px; color: var(--cx-gris); }
.cx-fac i { position: absolute; right: 10px; top: 8px; font-style: normal; font-family: var(--cx-num); font-size: 26px; line-height: 1; color: var(--cx-suave); }
.cx-fac.buscar { border-style: dashed; border-color: var(--cx-gris2); box-shadow: none; background: transparent; }
.cx-curso { height: 100px; display: flex; align-items: center; justify-content: center; font-family: var(--cx-num); font-size: 50px; line-height: 1; padding: 0; }
.cx-busca { height: 168px; display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start; padding: 14px 14px 16px; }
.cx-busca i { font-style: normal; font-family: var(--cx-num); font-size: 20px; line-height: 1; }
.cx-busca b { display: block; font-weight: 900; font-size: 25px; line-height: 1; letter-spacing: -0.02em; margin-bottom: 6px; }
.cx-busca small { display: block; font-size: 14px; line-height: 1.3; color: var(--cx-gris); }
.cx-ficha[aria-pressed="true"] small { color: #2E3B5E; }

/* Lista de grados */
.cx-lista { display: flex; flex-direction: column; gap: 8px; padding: 2px 2px 10px; }
.cx-grado {
  flex: none; min-height: 56px; width: 100%; border-radius: 14px; padding: 10px 14px;
  border: 2px solid var(--cx-linea); background: var(--cx-papel); color: var(--cx-tinta);
  display: flex; align-items: center; gap: 12px; text-align: left; cursor: pointer; font: 600 16px/1.2 var(--cx-letra);
}
.cx-grado[aria-pressed="true"] { background: var(--cx-amarillo); color: var(--cx-noche); border-color: var(--cx-noche); box-shadow: 0 3px 0 var(--cx-noche); }
.cx-radio { flex: none; width: 22px; height: 22px; border-radius: 50%; border: 2px solid currentColor; display: flex; align-items: center; justify-content: center; }
.cx-grado[aria-pressed="true"] .cx-radio { background: var(--cx-noche); }
.cx-grado[aria-pressed="true"] .cx-radio::after { content: ''; width: 9px; height: 5px; border: solid var(--cx-amarillo); border-width: 0 0 3px 3px; transform: translateY(-1px) rotate(-45deg); }
.cx-grado span { flex: 1; min-width: 0; }
.cx-doble { display: inline-block; font-weight: 800; font-stretch: 75%; font-size: 10px; letter-spacing: 0.1em; padding: 2px 6px; border-radius: 4px; background: var(--cx-noche); color: #fff; margin-bottom: 3px; }
body.dark .cx-grado:not([aria-pressed="true"]) .cx-doble { background: var(--cx-suave); }
.cx-chip { display: inline-flex; align-items: center; max-width: 70%; font-weight: 700; font-size: 13px; padding: 6px 12px; border-radius: 999px; background: var(--cx-azul); color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Pegatinas (gustos) */
.cx-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-bottom: 14px; }
.cx-tab {
  height: 44px; border-radius: 12px; border: 2px solid var(--cx-borde); background: var(--cx-papel); color: var(--cx-tinta);
  display: flex; align-items: center; justify-content: center; gap: 5px; padding: 0 4px; cursor: pointer;
  font: 800 14px var(--cx-letra); font-stretch: 90%;
}
.cx-tab[aria-selected="true"] { background: var(--cx-noche); color: #fff; border-color: var(--cx-noche); }
body.dark .cx-tab[aria-selected="true"] { background: var(--cx-amarillo); color: var(--cx-noche); }
.cx-tab { position: relative; }
.cx-tab em {
  position: absolute; top: -9px; right: -6px; font-style: normal; min-width: 20px; height: 20px; border-radius: 10px; padding: 0 5px;
  background: var(--cat); color: var(--cx-noche); border: 2px solid var(--cx-fondo); font-size: 11px; display: flex; align-items: center; justify-content: center;
}
.cx-gustos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.cx-gusto {
  position: relative; min-width: 0; height: 58px; border-radius: 14px; padding: 0 8px;
  border: 2px solid var(--cx-linea); background: var(--cx-papel); color: var(--cx-tinta);
  display: flex; align-items: center; justify-content: center; text-align: center; cursor: pointer;
  font: 700 14px/1.08 var(--cx-letra); font-stretch: 80%; overflow-wrap: break-word; hyphens: auto;
  transition: transform .14s cubic-bezier(.2, 1.4, .4, 1), background .12s;
}
.cx-gusto[aria-pressed="true"] { background: var(--cat); color: var(--cx-noche); border-color: var(--cx-noche); box-shadow: 0 4px 0 var(--cx-noche); transform: rotate(var(--giro, -2deg)); }
.cx-gusto[aria-pressed="true"]::after {
  content: ''; position: absolute; right: -7px; top: -7px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--cx-noche) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E") center / 11px no-repeat;
  border: 2px solid #fff;
}

/* Código de 6 cifras */
.cx-codigo { position: relative; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.cx-digito {
  position: relative; height: 68px; border-radius: 14px; background: var(--cx-papel); border: 2px solid var(--cx-linea);
  display: flex; align-items: center; justify-content: center; font-family: var(--cx-num); font-size: 34px; line-height: 1;
}
.cx-digito.lleno { border-color: var(--cx-borde); box-shadow: 0 3px 0 var(--cx-borde); }
.cx-digito.ahora { border-color: var(--cx-azul); }
body.dark .cx-digito.ahora { border-color: var(--cx-cielo); }
.cx-digito.ahora::after { content: ''; position: absolute; left: 50%; top: 18px; width: 2px; height: 32px; margin-left: -1px; background: currentColor; animation: cxParpadea 1s steps(1) infinite; }
.cx-codigo input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; border: 0; font-size: 16px; cursor: text; }
.cx-codigo.mal .cx-digito { border-color: var(--cx-error); animation: cxTiembla .3s; }
.cx-aviso { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-radius: 16px; background: var(--cx-suave); font-size: 14px; line-height: 1.35; }
.cx-aviso b { font-family: var(--cx-num); font-weight: 400; font-size: 15px; white-space: nowrap; }
.cx-icono { width: 64px; height: 64px; border-radius: 18px; background: var(--cx-azul); color: var(--cx-amarillo); display: flex; align-items: center; justify-content: center; transform: rotate(-6deg); box-shadow: 0 4px 0 var(--cx-azul-d); margin: 6px 0 24px; }
.cx-icono svg { width: 32px; height: 32px; }

/* Tarjeta blanca (tu clase, avisos) */
.cx-tarjeta { border-radius: 18px; border: 2px solid var(--cx-borde); background: var(--cx-papel); color: var(--cx-tinta); padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; }
.cx-azul .cx-tarjeta { border-color: var(--cx-noche); box-shadow: 0 5px 0 var(--cx-azul-d); background: #fff; color: var(--cx-noche); }
.cx-tarjeta .cx-label { margin: 0; }
.cx-azul .cx-tarjeta .cx-label { color: #46557A; }
.cx-tarjeta big { font-weight: 900; font-size: 24px; line-height: 1.05; letter-spacing: -0.01em; }
.cx-tarjeta p { margin: 0; font-size: 14px; line-height: 1.45; color: var(--cx-gris); }
.cx-azul .cx-tarjeta p { color: #46557A; }

/* ── El carnet ───────────────────────────────────────────────── */
/* Medidas en em: 1em = 10 px en el carnet de tamaño normal (330×208).
   --cx-c lo escala (0.7 = 70 %); en móviles estrechos encoge solo. */
.cx-carnet {
  --cx-c: 1;
  font-size: min(calc(10px * var(--cx-c)), calc((100vw - 48px) / 33 * var(--cx-c)));
  position: relative; width: 33em; height: 20.8em; flex: none; color: #fff; font-family: var(--cx-letra);
  transform: rotate(var(--giro, 0deg));
}
.cx-carnet.c70 { --cx-c: 0.7; }
.cx-carnet.c62 { --cx-c: 0.62; }
.cx-carnet.c50 { --cx-c: 0.5; }
.cx-carnet-hueco { display: flex; justify-content: center; margin: 4px 0 22px; }
.cx-cara {
  position: absolute; inset: 0; border-radius: 1.6em; overflow: hidden; background: var(--cx-azul);
  box-shadow: 0 0.6em 0 rgba(0, 16, 51, 0.35), inset 0 0 0 1px rgba(255, 255, 255, 0.14);
}
.cx-ondas { position: absolute; inset: 0; width: 100%; height: 100%; }
.cx-ondas path { fill: none; stroke: #fff; stroke-opacity: 0.09; stroke-width: 0.8; }
.cx-c-marca { position: absolute; left: 1.6em; top: 1.3em; display: flex; flex-direction: column; gap: 0.4em; }
.cx-c-marca b { font-weight: 900; font-stretch: 125%; font-size: 1.5em; letter-spacing: 0.02em; line-height: 1; }
.cx-c-marca b span { color: var(--cx-amarillo); }
.cx-c-num { display: flex; align-items: baseline; gap: 0.6em; }
.cx-c-num span { font-family: var(--cx-num); font-size: 1.3em; color: var(--cx-amarillo); line-height: 1; }
.cx-c-et { font-weight: 600; font-stretch: 75%; font-size: 1em; letter-spacing: 0.14em; color: #B9CCF5; line-height: 1; text-transform: uppercase; font-style: normal; }
.cx-c-curso { position: absolute; right: 1.6em; top: 1em; display: flex; align-items: center; gap: 0.7em; }
.cx-c-curso span { font-family: var(--cx-num); font-size: 3.2em; line-height: 1; color: var(--cx-amarillo); }
.cx-c-curso span.cx-c-hueco { font-size: inherit; }
.cx-c-hueco { display: block; width: 3.6em; height: 3em; border-radius: 0.6em; border: 1.5px dashed rgba(255, 255, 255, 0.4); }
.cx-c-foto { position: absolute; left: 1.6em; top: 5.4em; width: 7.6em; height: 9.6em; border-radius: 1em; overflow: hidden; }
.cx-c-foto img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cx-c-ini { width: 100%; height: 100%; background: var(--cx-amarillo); color: var(--cx-noche); display: flex; align-items: center; justify-content: center; font-family: var(--cx-num); font-size: 3em; }
.cx-c-sil { width: 100%; height: 100%; border: 1.5px dashed rgba(255, 255, 255, 0.45); border-radius: 1em; display: flex; align-items: flex-end; justify-content: center; }
.cx-c-sil svg { width: 5.6em; height: 7.2em; }
.cx-c-campos { position: absolute; left: 10.6em; top: 5.4em; width: 20.8em; display: flex; flex-direction: column; gap: 0.4em; }
.cx-c-campos .cx-c-et + .cx-c-et, .cx-c-valor + .cx-c-et, .cx-c-barra + .cx-c-et { margin-top: 0.6em; }
.cx-c-valor { font-weight: 800; font-size: 1.5em; line-height: 1.12; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.cx-c-valor.peq { font-weight: 600; font-size: 1.2em; line-height: 1.2; color: #DCE6FF; }
.cx-c-barra { width: 13.2em; height: 1.2em; border-radius: 0.6em; background: rgba(255, 255, 255, 0.16); margin: 0.3em 0 0.2em; }
.cx-c-barra.larga { width: 16.8em; height: 1em; }
.cx-c-sello {
  position: absolute; left: 3em; top: 12.8em; width: 6.6em; height: 6.6em; border-radius: 50%;
  border: 0.25em solid var(--cx-coral); color: var(--cx-coral); background: rgba(0, 48, 135, 0.55);
  transform: rotate(-16deg); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.2em;
}
.cx-c-sello b { font-weight: 900; font-size: 1.5em; line-height: 1; }
.cx-c-sello i { font-style: normal; font-weight: 800; font-stretch: 70%; font-size: 1em; letter-spacing: 0.06em; line-height: 1; }
.cx-c-sello.nuevo { animation: cxSello .5s cubic-bezier(.2, 1.6, .4, 1) both; }
.cx-c-peg {
  position: absolute; transform: rotate(var(--r, 0deg)); background: var(--cat, var(--cx-amarillo)); color: var(--cx-noche);
  border: 0.2em solid #fff; border-radius: 99em; padding: 0.3em 0.9em; white-space: nowrap;
  font-weight: 800; font-stretch: 80%; font-size: 1.1em; line-height: 1.2; box-shadow: 0 0.2em 0 rgba(0, 16, 51, 0.45);
}
.cx-c-peg.nueva { animation: cxPega .35s cubic-bezier(.2, 1.6, .4, 1) both; }
.cx-c-mas { width: 2.7em; height: 2.7em; padding: 0; display: flex; align-items: center; justify-content: center; background: #fff; font-size: 1.1em; }
/* Reverso */
.cx-c-banda { position: absolute; left: 0; right: 0; top: 2.2em; height: 4em; background: var(--cx-azul-d); }
.cx-c-candado { position: absolute; left: 14.1em; top: 9.8em; width: 4.8em; height: 4.8em; border-radius: 50%; background: var(--cx-amarillo); display: flex; align-items: center; justify-content: center; box-shadow: 0 0.3em 0 var(--cx-azul-d); }
.cx-c-candado svg { width: 2.2em; height: 2.2em; }
.cx-c-pie { position: absolute; left: 1.6em; bottom: 1.4em; font-weight: 900; font-stretch: 125%; font-size: 1.3em; letter-spacing: 0.02em; color: rgba(255, 255, 255, 0.55); }

/* ── Portada: el tablón de anuncios del campus ───────────────── */
/* Fieltro azul del tablón y papel con grano (ruido SVG): que se note
   que es material, no una pantalla plana. */
:root {
  --cx-grano-papel: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
}
.cx-tablon {
  background-color: #0B2C73;
  background-image:
    radial-gradient(120% 70% at 50% 0%, rgba(255, 255, 255, 0.10), transparent 65%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='f'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .2 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23f)'/%3E%3C/svg%3E");
}
.cx-entrar {
  height: 40px; padding: 0 18px; border-radius: 999px; border: 2px solid rgba(255, 255, 255, 0.55);
  background: transparent; color: #fff; font: 700 15px var(--cx-letra); cursor: pointer;
}
.cx-corcho { position: relative; margin: 6px -4px 0; }
.cx-cartel, .cx-cuartilla, .cx-postit, .cx-entrada {
  transform: rotate(var(--r, 0deg));
  animation: cxClavar .55s cubic-bezier(.2, .9, .25, 1.15) both;
}
/* El cartel: titular impreso a dos tintas (azul y amarillo) */
.cx-cartel {
  --r: -1.3deg; position: relative; z-index: 1; padding: 22px 20px 20px; border-radius: 2px;
  background: #FBF8F1 var(--cx-grano-papel); color: #0B2C73;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.2), 0 14px 24px -6px rgba(0, 0, 0, 0.5);
}
.cx-cartel-et { position: relative; margin: 0 0 10px; font-weight: 800; font-stretch: 75%; font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase; }
.cx-cartel-titulo {
  position: relative; margin: 0; color: #0B2C73; text-transform: uppercase;
  font-weight: 900; font-stretch: 62%; font-size: clamp(50px, 15.5vw, 78px); line-height: 0.86; letter-spacing: -0.005em;
}
.cx-cartel-titulo mark { display: inline-block; margin: 0.05em 0; padding: 0 0.08em; background: var(--cx-amarillo); color: #0B2C73; transform: rotate(-1.5deg); }
.cx-cartel-sub { position: relative; margin: 14px 0 0; max-width: 24em; font-size: 15px; line-height: 1.4; font-weight: 500; color: #2E3B5E; }
.cx-trama {
  position: absolute; right: 6px; bottom: 6px; width: 50%; height: 64%; pointer-events: none;
  background: radial-gradient(circle, var(--cx-amarillo) 2.3px, transparent 2.8px) 0 0 / 9px 9px;
  -webkit-mask-image: radial-gradient(circle at 100% 100%, #000 0%, transparent 72%);
  mask-image: radial-gradient(circle at 100% 100%, #000 0%, transparent 72%);
}
.cx-celo {
  position: absolute; top: 4px; z-index: 2; width: 92px; height: 28px;
  background: rgba(255, 244, 214, 0.62); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
  clip-path: polygon(0 8%, 7% 0, 14% 8%, 21% 1%, 29% 8%, 36% 0, 44% 9%, 52% 1%, 60% 8%, 68% 0, 76% 9%, 84% 1%, 92% 8%, 100% 2%,
                     100% 92%, 93% 100%, 85% 91%, 77% 100%, 69% 92%, 61% 100%, 53% 91%, 45% 100%, 37% 92%, 29% 100%, 21% 91%, 13% 100%, 6% 92%, 0 99%);
}
.cx-celo.izq { left: -20px; transform: rotate(-38deg); }
.cx-celo.der { right: -20px; transform: rotate(36deg); }
/* Cuartilla de "arranca la tira" */
.cx-fila { position: relative; z-index: 2; display: flex; align-items: flex-start; margin-top: -14px; padding: 0 2px; }
.cx-cuartilla {
  --r: 2.4deg; flex: 0 0 58%; position: relative; padding: 20px 14px 0; animation-delay: .12s;
  background: #fff var(--cx-grano-papel); color: var(--cx-noche);
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.2), 0 12px 20px -6px rgba(0, 0, 0, 0.5);
}
.cx-cuartilla b { display: block; color: #0B2C73; text-transform: uppercase; font-weight: 900; font-stretch: 70%; font-size: 26px; line-height: 0.95; }
.cx-cuartilla p { margin: 6px 0 12px; font-size: 13px; line-height: 1.35; }
.cx-chincheta {
  position: absolute; left: 50%; top: -7px; width: 18px; height: 18px; margin-left: -9px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #FF9A88 0 18%, #E0442B 45%, #8F1D0E 100%);
  box-shadow: 2px 4px 4px rgba(0, 0, 0, 0.35);
}
.cx-tiras { display: flex; margin: 0 -14px; border-top: 1.5px dashed #9AA5BF; }
.cx-tira {
  flex: 1 1 0; min-width: 0; height: 88px; display: flex; align-items: center; justify-content: center;
  writing-mode: vertical-rl; border-left: 1.5px dashed #9AA5BF; background: #fff var(--cx-grano-papel);
  color: #0B2C73 !important; text-decoration: none; font-weight: 700; font-stretch: 80%; font-size: 11px; letter-spacing: 0.02em;
  transition: transform .15s ease; transform-origin: 50% 0;
}
.cx-tira:first-child { border-left: 0; }
.cx-tira:nth-child(odd) { transform: rotate(-1.2deg); }
.cx-tira:nth-child(3n) { transform: rotate(1.5deg); }
.cx-tira:hover { transform: rotate(-6deg); }
.cx-tira.fuera { visibility: hidden; }
.cx-tira.cae { animation: cxArranca .5s cubic-bezier(.4, 0, .7, .2) forwards; }
/* Pósit escrito a mano */
.cx-postit {
  --r: -5deg; flex: 0 0 46%; position: relative; z-index: 3; aspect-ratio: 1; margin: 92px 0 0 -3%; padding: 16px 14px;
  background: #FFE45C; color: #0B2C73; animation-delay: .22s;
  font-family: 'Caveat', 'Segoe Print', cursive; font-weight: 700; font-size: clamp(17px, 5.6vw, 21px); line-height: 1.12;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.15), 0 16px 18px -10px rgba(0, 0, 0, 0.55);
}
/* Entrada de fiesta (solo en pantallas grandes) */
.cx-entrada { display: none; }
.cx-hero-confianza { margin: 2px 0 0; text-align: center; font-size: 13px; color: #B9CCF5; text-wrap: balance; }
.cx-portada { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1fr); }
.cx-hero { display: flex; flex-direction: column; }
.cx-hero .cx-col { max-width: 520px; }
.cx-hero-botones { padding-top: 28px; }
.cx-hero-enlaces { display: flex; gap: 14px; justify-content: center; font-size: 13px; margin-top: 4px; }
.cx-hero-enlaces a { color: #B9CCF5; text-decoration: none; }
.cx-acceso { display: none; }
.cx-portada.entrar .cx-hero { display: none; }
.cx-portada.entrar .cx-acceso { display: flex; }

@media (min-width: 900px) {
  .cx-portada { grid-template-columns: minmax(0, 1.15fr) minmax(420px, 1fr); }
  .cx-portada .cx-hero, .cx-portada.entrar .cx-hero { display: flex; }
  .cx-portada .cx-acceso { display: flex; }
  .cx-hero .cx-col { max-width: 600px; justify-content: safe center; padding-top: 18px; padding-bottom: 18px; }
  .cx-hero .cx-top { margin-bottom: 12px; }
  .cx-hero .cx-entrar, .cx-acceso .cx-volver { display: none; }
  .cx-cartel { padding: 22px 30px 22px; }
  .cx-cartel-titulo { font-size: 64px; }
  .cx-fila { margin-top: -18px; }
  .cx-cuartilla { flex-basis: 50%; margin-left: 28px; }
  .cx-postit { flex-basis: 32%; margin: 56px 0 0 3%; font-size: 22px; }
  .cx-hero-botones { padding-top: 20px; }
  .cx-entrada {
    --r: 9deg; display: flex; flex-direction: column; gap: 6px; position: absolute; right: -40px; bottom: 30px; z-index: 3;
    padding: 12px 22px; background: var(--cx-coral) var(--cx-grano-papel); color: var(--cx-noche); animation-delay: .3s;
    -webkit-mask: radial-gradient(circle at 0 50%, transparent 9px, #000 9.5px) left / 51% 100% no-repeat,
                  radial-gradient(circle at 100% 50%, transparent 9px, #000 9.5px) right / 51% 100% no-repeat;
    mask: radial-gradient(circle at 0 50%, transparent 9px, #000 9.5px) left / 51% 100% no-repeat,
          radial-gradient(circle at 100% 50%, transparent 9px, #000 9.5px) right / 51% 100% no-repeat;
    filter: drop-shadow(0 8px 10px rgba(0, 0, 0, 0.35));
  }
  .cx-entrada span { font-weight: 800; font-stretch: 75%; font-size: 13px; line-height: 1.05; letter-spacing: 0.08em; text-transform: uppercase; }
  .cx-entrada b { font-family: var(--cx-num); font-weight: 400; font-size: 20px; line-height: 1; }
  .cx-acceso .cx-col { justify-content: safe center; }
  .cx-acceso .cx-pie { margin-top: 18px; }
}

/* ── Pasos del registro ──────────────────────────────────────── */
.cx-pant { display: none; }
.cx-pant.activa { display: flex; animation: cxEntra .3s cubic-bezier(.2, .8, .2, 1) both; }
.cx-pant.activa.atras { animation-name: cxVuelve; }
.cx-grados-caja { margin: 16px -2px 0; }
/* Botón siempre a mano en las pantallas con listas largas */
.cx-pie.fijo { position: sticky; bottom: 0; z-index: 2; background: var(--cx-fondo); padding: 14px 0 12px; margin-bottom: -12px; }
.cx-oculto { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; overflow: hidden; }

/* ── Completar el carnet (dentro de la app) ──────────────────── */
.cx-flujo { position: fixed; inset: 0; z-index: 2000; background: var(--cx-fondo); overflow-y: auto; overflow-x: hidden; }
.cx-flujo[hidden] { display: none; }
.cx-flujo .cx-col { min-height: 100%; }
@media (min-width: 700px) {
  .cx-flujo { background: rgba(5, 12, 30, 0.6); display: flex; align-items: center; justify-content: center; padding: 24px; }
  .cx-flujo-caja { width: 440px; max-height: calc(100vh - 48px); overflow-y: auto; border-radius: 28px; background: var(--cx-fondo); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35); }
  .cx-flujo-caja .cx-col { min-height: 720px; }
}
.cx-foto-marco {
  position: relative; width: 228px; height: 304px; margin: 6px auto 0; border-radius: 20px;
  border: 2px solid var(--cx-borde); background: var(--cx-papel); box-shadow: 0 4px 0 var(--cx-borde);
  transform: rotate(-2deg); overflow: hidden; cursor: pointer; display: block; padding: 0;
}
.cx-foto-marco svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.cx-foto-marco img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cx-foto-marco span { position: absolute; left: 0; right: 0; top: 112px; text-align: center; font-weight: 700; font-size: 13px; color: var(--cx-gris); }

/* Compañeros bocabajo */
.cx-bocabajo { max-width: 480px; margin: 0 auto; padding: 6px 0 24px; }
.cx-bocabajo .cx-monton { position: relative; height: 22em; font-size: min(10px, calc((100vw - 40px) / 33)); margin-bottom: 8px; }
.cx-bocabajo .cx-monton .cx-carnet { position: absolute; --cx-c: .7; font-size: calc(min(10px, calc((100vw - 40px) / 33)) * .7); }
.cx-bocabajo .cx-monton .cx-carnet:nth-child(1) { left: 0; top: 0.4em; --giro: -9deg; }
.cx-bocabajo .cx-monton .cx-carnet:nth-child(2) { right: 0; top: 1.4em; --giro: 7deg; }
.cx-bocabajo .cx-monton .cx-carnet:nth-child(3) { left: 50%; margin-left: -16.5em; top: 5.6em; --giro: -2deg; }
.cx-check { display: flex; flex-direction: column; gap: 8px; margin: 18px 0 20px; }
.cx-check div { height: 56px; border-radius: 14px; border: 2px solid var(--cx-linea); background: var(--cx-papel); display: flex; align-items: center; gap: 12px; padding: 0 14px; }
.cx-check i { flex: none; width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--cx-borde); display: flex; align-items: center; justify-content: center; font-style: normal; font-family: var(--cx-num); font-size: 14px; }
.cx-check .hecho i { background: var(--cx-menta); border-color: var(--cx-noche); color: var(--cx-noche); }
.cx-check .hecho b { text-decoration: line-through; opacity: .6; }
.cx-check b { flex: 1; font-weight: 700; font-size: 16px; }
.cx-check small { font-size: 13px; color: var(--cx-gris); }

/* Avisos flotantes en las páginas nuevas (el panel usa los de style.css) */
body.cx .toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); z-index: 3000;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none; max-width: calc(100vw - 32px);
  padding: 12px 18px; border-radius: 14px; border: 2px solid #fff; background: var(--cx-noche); color: #fff;
  font: 600 14px/1.35 var(--cx-letra); box-shadow: 0 4px 0 rgba(0, 0, 0, 0.25); transition: opacity .2s, transform .2s;
}
body.cx .toast.show { opacity: 1; transform: translate(-50%, 0); }
body.cx .toast.error { background: #B42318; }
body.cx .toast.success { background: #0F6E56; }

/* Ventana (recuperar contraseña) */
.cx-modal { position: fixed; inset: 0; z-index: 2500; background: rgba(5, 12, 30, 0.6); display: none; align-items: flex-end; justify-content: center; }
.cx-modal-caja { position: relative; width: 100%; max-width: 440px; max-height: 92vh; overflow-y: auto; background: var(--cx-fondo); border-radius: 26px 26px 0 0; padding: 26px 24px calc(26px + env(safe-area-inset-bottom)); }
.cx-modal-cerrar { position: absolute; right: 14px; top: 14px; }
.cx-modal-caja .cx-titulo { font-size: 28px; padding-right: 52px; }
.cx-modal-caja .cx-input + .cx-input { margin-top: 12px; }
.cx-modal-caja .cx-btn { margin-top: 18px; }
@media (min-width: 600px) {
  .cx-modal { align-items: center; padding: 24px; }
  .cx-modal-caja { border-radius: 26px; }
}

/* ── Animaciones ─────────────────────────────────────────────── */
@keyframes cxClavar  { from { opacity: 0; transform: translateY(-16px) rotate(var(--r, 0deg)) scale(1.03); } to { opacity: 1; transform: rotate(var(--r, 0deg)); } }
@keyframes cxArranca { 30% { transform: translateY(-4px) rotate(-10deg); } 100% { transform: translateY(170px) rotate(-38deg); opacity: 0; } }
@keyframes cxEntra   { from { opacity: 0; transform: translateX(22px); } to { opacity: 1; transform: none; } }
@keyframes cxVuelve  { from { opacity: 0; transform: translateX(-22px); } to { opacity: 1; transform: none; } }
@keyframes cxSello   { from { opacity: 0; transform: rotate(-30deg) scale(1.9); } to { opacity: 1; transform: rotate(-16deg) scale(1); } }
@keyframes cxPega    { from { opacity: 0; transform: rotate(0deg) scale(1.6); } }
@keyframes cxGira    { to { transform: rotate(360deg); } }
@keyframes cxParpadea { 50% { opacity: 0; } }
@keyframes cxTiembla { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
@media (prefers-reduced-motion: reduce) {
  .cx *, .cx *::before, .cx *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
