/* =========================================================
   Museo de Cromos — estilos de la zona del juego de cromos
   Parte de la base de la web (estilos.css: papel, tinta, Fraunces e
   Inter) y le añade personalidad de "museo mágico": noche azul, pan de
   oro y focos de luz. Solo se carga en las páginas de /juego/.
   ========================================================= */

:root {
    --jg-noche: #1C1A36;
    --jg-noche-2: #2A2650;
    --jg-noche-3: #3B3570;
    --jg-oro: #E3A72F;
    --jg-oro-2: #F4CF7A;
    --jg-oro-osc: #9A6B12;
    --jg-tinta: #17130F;
    --jg-tinta-2: #4A4038;
    --jg-tinta-3: #6F6357;
    --jg-papel: #FAF8F4;
    --jg-blanco: #FFFFFF;
    --jg-linea: #E8E2D8;
    --jg-linea-2: #D6CCBE;
    --jg-marca: #B4531A;
    --jg-ok: #22764A;
    --jg-ok-bg: #E6F4EC;
    --jg-error: #B3261E;
    --jg-error-bg: #FCEBEA;
    --jg-aviso: #7A4B00;
    --jg-aviso-bg: #FFF3D4;
    --jg-sombra: 0 24px 48px -24px rgba(28, 26, 54, .35), 0 2px 6px rgba(23, 19, 15, .05);
    --jg-ease: cubic-bezier(.22, 1, .36, 1);
    --jg-rebote: cubic-bezier(.34, 1.56, .64, 1);
}

body.page-juego {
    background:
        radial-gradient(900px 520px at 85% -10%, rgba(227, 167, 47, .14), transparent 60%),
        radial-gradient(700px 480px at -10% 30%, rgba(59, 53, 112, .08), transparent 60%),
        var(--jg-papel);
}
.jg-main { width: 100%; max-width: 1120px; margin: 0 auto; padding: 28px 20px 72px; flex: 1; }
.jg-oculto { display: none !important; }
.jg-solo-lector { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── Tipografía ─────────────────────────────────────── */
.jg-titulo { font-family: 'Fraunces', Georgia, serif; font-weight: 600; letter-spacing: -.02em; line-height: 1.08; color: var(--jg-tinta); }
.jg-sub { color: var(--jg-tinta-3); font-size: 15px; line-height: 1.55; }
.jg-etiqueta {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 4px 11px; border-radius: 999px;
    font-size: 11.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
    background: rgba(227, 167, 47, .16); color: var(--jg-oro-osc);
}

/* ── Botones ────────────────────────────────────────── */
.jg-boton {
    position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 9px;
    min-height: 48px; padding: 0 22px; border: none; border-radius: 14px; cursor: pointer;
    font: 600 15px/1 'Inter', system-ui, sans-serif; text-decoration: none;
    color: #fff; background: linear-gradient(180deg, var(--jg-noche-2), var(--jg-noche));
    box-shadow: 0 1px 0 rgba(255, 255, 255, .12) inset, 0 10px 22px -12px rgba(28, 26, 54, .8);
    transition: transform .18s var(--jg-ease), box-shadow .25s var(--jg-ease), background .25s;
    -webkit-tap-highlight-color: transparent;
}
.jg-boton:hover { transform: translateY(-2px); box-shadow: 0 1px 0 rgba(255, 255, 255, .12) inset, 0 0 0 3px rgba(227, 167, 47, .35), 0 16px 30px -14px rgba(28, 26, 54, .9); }
.jg-boton:active { transform: translateY(0) scale(.97); }
.jg-boton:focus-visible { outline: 3px solid var(--jg-oro); outline-offset: 3px; }
.jg-boton[disabled] { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }
.jg-boton--oro { color: var(--jg-tinta); background: linear-gradient(180deg, var(--jg-oro-2), var(--jg-oro)); box-shadow: 0 1px 0 rgba(255, 255, 255, .5) inset, 0 10px 22px -12px rgba(154, 107, 18, .9); }
.jg-boton--claro { color: var(--jg-tinta); background: var(--jg-blanco); box-shadow: 0 0 0 1px var(--jg-linea-2) inset; }
.jg-boton--claro:hover { box-shadow: 0 0 0 1px var(--jg-tinta-3) inset, 0 10px 22px -16px rgba(23, 19, 15, .5); }
.jg-boton--peligro { background: linear-gradient(180deg, #C8443A, var(--jg-error)); }
.jg-boton--ancho { width: 100%; }
.jg-boton svg { width: 18px; height: 18px; flex-shrink: 0; }
/* Rueda de "cargando" dentro del botón */
.jg-boton.is-cargando { color: transparent !important; pointer-events: none; }
.jg-boton.is-cargando::after {
    content: ''; position: absolute; width: 20px; height: 20px; border-radius: 50%;
    border: 2.5px solid rgba(255, 255, 255, .35); border-top-color: #fff;
    animation: jg-gira .7s linear infinite;
}
.jg-boton--claro.is-cargando::after, .jg-boton--oro.is-cargando::after { border-color: rgba(23, 19, 15, .2); border-top-color: var(--jg-tinta); }
.jg-enlace { background: none; border: none; padding: 0; cursor: pointer; font: inherit; color: var(--jg-marca); font-weight: 600; text-decoration: underline; text-decoration-color: rgba(180, 83, 26, .35); text-underline-offset: 3px; }
.jg-enlace:hover { text-decoration-color: currentColor; }
.jg-enlace:focus-visible { outline: 2px solid var(--jg-marca); outline-offset: 2px; border-radius: 4px; }

/* ── Tarjetas ───────────────────────────────────────── */
.jg-tarjeta {
    position: relative; background: var(--jg-blanco); border-radius: 24px;
    padding: 30px; box-shadow: var(--jg-sombra);
    border: 1px solid rgba(23, 19, 15, .06);
}
/* Marco de "paspartú" dorado, discreto */
.jg-tarjeta--marco::before {
    content: ''; position: absolute; inset: 8px; border-radius: 18px; pointer-events: none;
    border: 1px solid rgba(227, 167, 47, .35);
}

/* ── Formularios ────────────────────────────────────── */
.jg-form { display: flex; flex-direction: column; gap: 16px; }
.jg-campo { display: flex; flex-direction: column; gap: 6px; }
.jg-campo label, .jg-campo .jg-label { font-size: 14px; font-weight: 600; color: var(--jg-tinta); }
.jg-campo .jg-ayuda, .jg-form p.jg-ayuda { font-size: 12.5px; color: var(--jg-tinta-3); line-height: 1.45; }
.jg-entrada { position: relative; }
.jg-entrada input {
    width: 100%; min-height: 50px; padding: 0 16px; border-radius: 14px;
    border: 1.5px solid var(--jg-linea-2); background: #fff; color: var(--jg-tinta);
    font: 400 16px/1 'Inter', system-ui, sans-serif;
    transition: border-color .2s, box-shadow .2s;
}
.jg-entrada input::placeholder { color: #A99D90; }
.jg-entrada input:hover { border-color: #BFB2A2; }
.jg-entrada input:focus { outline: none; border-color: var(--jg-noche-3); box-shadow: 0 0 0 4px rgba(59, 53, 112, .14); }
.jg-entrada input[aria-invalid="true"] { border-color: var(--jg-error); }
.jg-entrada input[aria-invalid="true"]:focus { box-shadow: 0 0 0 4px rgba(179, 38, 30, .14); }
.jg-entrada.con-boton input { padding-right: 52px; }
.jg-ojo {
    position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
    width: 40px; height: 40px; border: none; border-radius: 10px; background: none; cursor: pointer;
    display: grid; place-items: center; color: var(--jg-tinta-3);
}
.jg-ojo:hover { background: rgba(23, 19, 15, .05); color: var(--jg-tinta); }
.jg-ojo:focus-visible { outline: 2px solid var(--jg-noche-3); }
.jg-ojo svg { width: 20px; height: 20px; }
.jg-mensaje-campo { min-height: 18px; font-size: 13px; line-height: 1.4; display: flex; gap: 6px; align-items: flex-start; }
.jg-mensaje-campo.is-error { color: var(--jg-error); }
.jg-mensaje-campo.is-ok { color: var(--jg-ok); }
.jg-mensaje-campo svg { width: 15px; height: 15px; flex-shrink: 0; margin-top: 1px; }

/* Medidor de fuerza de la contraseña */
.jg-fuerza { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; margin-top: 2px; }
.jg-fuerza span { height: 5px; border-radius: 3px; background: var(--jg-linea); transition: background .3s; }
.jg-fuerza[data-nivel="1"] span:nth-child(-n+1) { background: #D9534F; }
.jg-fuerza[data-nivel="2"] span:nth-child(-n+2) { background: var(--jg-oro); }
.jg-fuerza[data-nivel="3"] span:nth-child(-n+3) { background: #7DB356; }
.jg-fuerza[data-nivel="4"] span { background: var(--jg-ok); }

/* Avisos dentro de la página */
.jg-aviso {
    display: flex; gap: 12px; align-items: flex-start;
    padding: 14px 16px; border-radius: 14px; font-size: 14px; line-height: 1.5;
    background: var(--jg-aviso-bg); color: var(--jg-aviso);
}
.jg-aviso svg { width: 20px; height: 20px; flex-shrink: 0; margin-top: 1px; }
.jg-aviso--error { background: var(--jg-error-bg); color: var(--jg-error); }
.jg-aviso--ok { background: var(--jg-ok-bg); color: var(--jg-ok); }
.jg-aviso--info { background: #EEF0FB; color: var(--jg-noche-2); }
.jg-aviso strong { font-weight: 700; }

/* ── Pestañas ───────────────────────────────────────── */
.jg-pestanas {
    position: relative; display: grid; grid-template-columns: 1fr 1fr; padding: 5px;
    border-radius: 16px; background: #F1ECE4; margin-bottom: 26px;
}
.jg-pestanas button {
    position: relative; z-index: 1; min-height: 44px; border: none; background: none; cursor: pointer;
    border-radius: 12px; font: 600 15px/1 'Inter', system-ui, sans-serif; color: var(--jg-tinta-3);
    transition: color .25s;
}
.jg-pestanas button[aria-selected="true"] { color: var(--jg-tinta); }
.jg-pestanas button:focus-visible { outline: 2px solid var(--jg-noche-3); outline-offset: -2px; }
.jg-pestanas .jg-indicador {
    position: absolute; top: 5px; bottom: 5px; left: 5px; width: calc(50% - 5px);
    border-radius: 12px; background: #fff; box-shadow: 0 4px 12px -6px rgba(23, 19, 15, .3);
    transition: transform .35s var(--jg-ease);
}
.jg-pestanas[data-activa="1"] .jg-indicador { transform: translateX(100%); }
.jg-panel { animation: jg-entra .4s var(--jg-ease) both; }

/* ── Pantalla de acceso ─────────────────────────────── */
.jg-acceso { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 36px; align-items: stretch; }
.jg-escaparate {
    position: relative; overflow: hidden; border-radius: 28px; padding: 40px 38px;
    color: #F6EFE2; min-height: 560px; display: flex; flex-direction: column; justify-content: space-between;
    background:
        radial-gradient(420px 300px at 70% 18%, rgba(244, 207, 122, .30), transparent 65%),
        radial-gradient(500px 380px at 20% 110%, rgba(180, 83, 26, .35), transparent 60%),
        linear-gradient(160deg, var(--jg-noche-3), var(--jg-noche) 70%);
    box-shadow: var(--jg-sombra);
}
/* Rayo de foco de museo */
.jg-escaparate::before {
    content: ''; position: absolute; left: 50%; top: -40%; width: 140%; height: 120%;
    transform: translateX(-50%); pointer-events: none;
    background: conic-gradient(from 180deg at 50% 0%, transparent 160deg, rgba(255, 236, 190, .10) 172deg, rgba(255, 236, 190, .18) 180deg, rgba(255, 236, 190, .10) 188deg, transparent 200deg);
}
.jg-escaparate .jg-etiqueta { background: rgba(244, 207, 122, .16); color: var(--jg-oro-2); }
.jg-escaparate h1 { font-family: 'Fraunces', Georgia, serif; font-weight: 600; font-size: clamp(36px, 4.4vw, 54px); line-height: 1.02; letter-spacing: -.03em; margin: 16px 0 12px; color: #FFF8EA; }
.jg-escaparate h1 em { font-style: italic; color: var(--jg-oro-2); }
.jg-escaparate p { color: rgba(246, 239, 226, .78); font-size: 16px; line-height: 1.55; max-width: 34ch; }
.jg-pasos { list-style: none; display: grid; gap: 10px; margin-top: 26px; padding: 0; position: relative; z-index: 1; }
.jg-pasos li { display: flex; align-items: center; gap: 12px; font-size: 14.5px; color: rgba(246, 239, 226, .9); }
.jg-pasos .jg-num {
    width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0;
    font: 700 13px/1 'Inter', sans-serif; color: var(--jg-noche); background: linear-gradient(180deg, var(--jg-oro-2), var(--jg-oro));
}

/* Mini-cromos flotando en el escaparate (decorativos, sin imágenes) */
.jg-vitrina { position: relative; height: 230px; margin: 10px 0 0; }
.jg-mini {
    position: absolute; width: 118px; aspect-ratio: 5 / 7; border-radius: 12px; padding: 7px;
    background: linear-gradient(145deg, #FFF6DD, #E9C877 45%, #B8862C);
    box-shadow: 0 18px 30px -12px rgba(0, 0, 0, .55), 0 0 0 1px rgba(255, 255, 255, .2) inset;
    animation: jg-flota 6s ease-in-out infinite;
}
.jg-mini::after { /* brillo que barre la carta */
    content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
    background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, .55) 50%, transparent 65%);
    background-size: 250% 100%; animation: jg-brillo 5s ease-in-out infinite;
    mix-blend-mode: soft-light;
}
.jg-mini .jg-lamina { height: 72%; border-radius: 7px; }
.jg-mini .jg-pie { height: 9px; margin-top: 8px; border-radius: 3px; background: rgba(28, 26, 54, .25); width: 75%; }
.jg-mini .jg-pie + .jg-pie { width: 45%; margin-top: 5px; }
.jg-mini:nth-child(1) { left: 6%; top: 34px; transform: rotate(-9deg); animation-delay: -1s; }
.jg-mini:nth-child(2) { left: 36%; top: 0; z-index: 2; width: 132px; animation-delay: -3s; }
.jg-mini:nth-child(3) { left: 68%; top: 40px; transform: rotate(8deg); animation-delay: -4.5s; }
/* Tres "cuadros" abstractos: noche de remolinos, cuadrícula primaria y nenúfares */
.jg-lamina--remolino { background: radial-gradient(circle at 70% 25%, #F6D35B 0 9%, transparent 10%), radial-gradient(circle at 30% 60%, rgba(120, 170, 255, .7) 0 14%, transparent 30%), repeating-radial-gradient(circle at 40% 40%, #1F3A8A 0 6px, #2F57B8 6px 12px); }
.jg-lamina--cuadricula { background: linear-gradient(90deg, transparent 62%, #111 62% 65%, transparent 65%), linear-gradient(0deg, transparent 38%, #111 38% 41%, transparent 41%), linear-gradient(90deg, #D7261E 0 62%, #F4F1E8 62%) top / 100% 38% no-repeat, linear-gradient(90deg, #F4F1E8 0 62%, #1C4FA0 62%) bottom / 100% 59% no-repeat; }
.jg-lamina--nenufar { background: radial-gradient(ellipse 30% 14% at 30% 40%, #E8A7C4 0 40%, #7FB37A 42% 100%, transparent 101%), radial-gradient(ellipse 26% 12% at 70% 70%, #F2C7D9 0 35%, #6FA56C 37% 100%, transparent 101%), linear-gradient(180deg, #8FB9D9, #6E9BC2 60%, #8DB59B); }

.jg-acceso-form { align-self: center; }
.jg-acceso-form .jg-tarjeta { padding: 32px 30px; }
.jg-acceso-form h2 { font-size: 26px; margin-bottom: 6px; }
.jg-pie-form { margin-top: 18px; text-align: center; font-size: 14px; color: var(--jg-tinta-3); }

/* ── Ventanas (dialog) ──────────────────────────────── */
.jg-dialogo {
    width: min(520px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow: auto;
    margin: auto; /* estilos.css pone margin: 0 a todo, y <dialog> necesita auto para centrarse */
    border: none; border-radius: 26px; padding: 0; background: var(--jg-blanco); color: var(--jg-tinta);
    box-shadow: 0 40px 80px -30px rgba(10, 8, 30, .6);
}
.jg-dialogo::backdrop { background: rgba(20, 17, 40, .55); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.jg-dialogo[open] { animation: jg-aparece .45s var(--jg-rebote) both; }
.jg-dialogo-cuerpo { padding: 30px 28px 26px; display: flex; flex-direction: column; gap: 18px; }
.jg-dialogo h2 { font-size: 26px; }
.jg-dialogo .jg-botonera { display: flex; flex-wrap: wrap; gap: 10px; }
.jg-dialogo .jg-botonera .jg-boton { flex: 1 1 160px; }

/* Palabras mágicas */
.jg-pergamino {
    position: relative; padding: 22px 18px; border-radius: 18px; text-align: center;
    background: radial-gradient(circle at 50% 0%, #FFF8E6, #FBEFD0);
    border: 2px dashed rgba(154, 107, 18, .45);
}
.jg-palabras { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.jg-palabras span {
    padding: 9px 14px; border-radius: 11px; background: #fff;
    font: 700 20px/1 'Fraunces', Georgia, serif; letter-spacing: .01em; color: var(--jg-noche);
    box-shadow: 0 1px 0 rgba(154, 107, 18, .25), 0 6px 14px -10px rgba(154, 107, 18, .9);
    animation: jg-palabra .5s var(--jg-rebote) both;
}
.jg-palabras span:nth-child(2) { animation-delay: .08s; }
.jg-palabras span:nth-child(3) { animation-delay: .16s; }
.jg-palabras span:nth-child(4) { animation-delay: .24s; }
.jg-palabras .jg-guion { padding: 9px 0; background: none; box-shadow: none; color: var(--jg-oro-osc); }
.jg-pergamino small { display: block; margin-top: 12px; font-size: 12.5px; color: var(--jg-aviso); }
.jg-check { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; line-height: 1.45; cursor: pointer; }
.jg-check input { width: 20px; height: 20px; margin-top: 1px; accent-color: var(--jg-noche-2); flex-shrink: 0; }

/* ── Avisos flotantes (toasts) ──────────────────────── */
.jg-toasts { position: fixed; left: 50%; top: 18px; transform: translateX(-50%); z-index: 2000; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: calc(100% - 32px); max-width: 440px; }
.jg-toast {
    pointer-events: auto; display: flex; align-items: center; gap: 10px;
    padding: 12px 16px; border-radius: 14px; font-size: 14.5px; line-height: 1.4;
    background: var(--jg-noche); color: #fff; box-shadow: 0 18px 36px -14px rgba(10, 8, 30, .6);
    animation: jg-toast-entra .45s var(--jg-rebote) both;
}
.jg-toast.is-saliendo { animation: jg-toast-sale .3s var(--jg-ease) forwards; }
.jg-toast svg { width: 18px; height: 18px; flex-shrink: 0; color: var(--jg-oro-2); }
.jg-toast--error { background: #7E1D17; }
.jg-toast--error svg { color: #FFC9C4; }

/* ── Mi museo (inicio del juego) y perfil ───────────── */
.jg-cabecera { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; margin-bottom: 26px; }
.jg-cabecera h1 { font-size: clamp(30px, 4vw, 44px); }
.jg-avatar-grande {
    width: 92px; height: 92px; border-radius: 50%; flex-shrink: 0; overflow: hidden;
    box-shadow: 0 0 0 4px #fff, 0 0 0 6px var(--jg-oro), 0 18px 30px -14px rgba(28, 26, 54, .6);
    animation: jg-aparece .6s var(--jg-rebote) both;
}
.jg-avatar-grande svg { width: 100%; height: 100%; display: block; }
.jg-rejilla { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 900px) { .jg-rejilla { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .jg-rejilla { grid-template-columns: 1fr; } .jg-rejilla .jg-ficha { min-height: 0; } }
.jg-ficha {
    position: relative; overflow: hidden; border-radius: 22px; padding: 22px; min-height: 150px;
    background: #fff; border: 1px solid rgba(23, 19, 15, .07); box-shadow: 0 12px 26px -20px rgba(23, 19, 15, .45);
    display: flex; flex-direction: column; gap: 8px; color: var(--jg-tinta); text-decoration: none;
    transition: transform .25s var(--jg-ease), box-shadow .25s var(--jg-ease);
    animation: jg-entra .5s var(--jg-ease) both;
}
.jg-ficha:nth-child(2) { animation-delay: .06s; }
.jg-ficha:nth-child(3) { animation-delay: .12s; }
.jg-ficha:nth-child(4) { animation-delay: .18s; }
.jg-ficha:nth-child(5) { animation-delay: .24s; }
.jg-ficha:nth-child(6) { animation-delay: .3s; }
a.jg-ficha:hover { transform: translateY(-4px); box-shadow: 0 20px 34px -20px rgba(23, 19, 15, .55); }
.jg-ficha h3 { font-family: 'Fraunces', Georgia, serif; font-size: 21px; font-weight: 600; letter-spacing: -.01em; }
.jg-ficha p { font-size: 14px; color: var(--jg-tinta-3); line-height: 1.5; }
.jg-ficha .jg-icono { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: rgba(59, 53, 112, .08); color: var(--jg-noche-2); }
.jg-ficha .jg-icono svg { width: 24px; height: 24px; }
.jg-ficha.is-bloqueada { background: repeating-linear-gradient(135deg, #fff 0 14px, #FBF9F5 14px 28px); }
.jg-ficha .jg-pronto { position: absolute; top: 18px; right: 18px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--jg-tinta-3); background: #F1ECE4; padding: 4px 9px; border-radius: 999px; }

.jg-vacio { text-align: center; padding: 36px 20px; }
.jg-vacio svg.jg-ilustracion { width: 150px; height: auto; margin: 0 auto 14px; display: block; }
.jg-vacio h3 { font-family: 'Fraunces', Georgia, serif; font-size: 22px; margin-bottom: 6px; }
.jg-vacio p { color: var(--jg-tinta-3); max-width: 42ch; margin: 0 auto 18px; }

.jg-seccion { margin-top: 30px; }
.jg-seccion > h2 { font-family: 'Fraunces', Georgia, serif; font-size: 24px; font-weight: 600; margin-bottom: 14px; }
.jg-dos-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.jg-acciones-cuenta { display: flex; flex-wrap: wrap; gap: 10px; }

/* Pantalla de carga mientras se comprueba la sesión */
.jg-cargando { display: grid; place-items: center; min-height: 50vh; }
.jg-cargando span { width: 42px; height: 42px; border-radius: 50%; border: 3px solid rgba(59, 53, 112, .15); border-top-color: var(--jg-noche-2); animation: jg-gira .8s linear infinite; }

/* Confeti */
.jg-confeti { position: fixed; inset: 0; pointer-events: none; z-index: 3000; }

/* ── Animaciones ────────────────────────────────────── */
@keyframes jg-gira { to { transform: rotate(360deg); } }
@keyframes jg-entra { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes jg-aparece { from { opacity: 0; transform: scale(.9) translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes jg-palabra { from { opacity: 0; transform: translateY(10px) scale(.8) rotate(-4deg); } to { opacity: 1; transform: none; } }
@keyframes jg-flota { 0%, 100% { translate: 0 0; } 50% { translate: 0 -12px; } }
@keyframes jg-brillo { 0%, 60% { background-position: 150% 0; } 100% { background-position: -100% 0; } }
@keyframes jg-toast-entra { from { opacity: 0; transform: translateY(-14px) scale(.95); } to { opacity: 1; transform: none; } }
@keyframes jg-toast-sale { to { opacity: 0; transform: translateY(-10px) scale(.96); } }
@keyframes jg-sacude { 10%, 90% { transform: translateX(-1px); } 20%, 80% { transform: translateX(3px); } 30%, 50%, 70% { transform: translateX(-6px); } 40%, 60% { transform: translateX(6px); } }
.jg-sacude { animation: jg-sacude .45s both; }

/* ── Móvil ──────────────────────────────────────────── */
@media (max-width: 900px) {
    .jg-acceso { grid-template-columns: 1fr; gap: 18px; }
    .jg-escaparate { min-height: 0; padding: 28px 24px 26px; }
    .jg-escaparate h1 { font-size: 34px; margin-top: 12px; }
    .jg-vitrina { height: 170px; }
    .jg-mini { width: 92px; }
    .jg-mini:nth-child(2) { width: 104px; }
    .jg-pasos { display: none; }
    .jg-dos-col { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
    .jg-main { padding: 18px 14px 60px; }
    .jg-tarjeta, .jg-acceso-form .jg-tarjeta { padding: 24px 18px; border-radius: 22px; }
    .jg-escaparate { border-radius: 22px; padding: 22px 20px 18px; }
    .jg-escaparate h1 { font-size: 30px; margin: 10px 0 8px; }
    .jg-escaparate p { font-size: 15px; }
    .jg-vitrina { height: 128px; }
    .jg-mini { width: 72px; border-radius: 9px; padding: 5px; }
    .jg-mini:nth-child(2) { width: 82px; }
    .jg-mini:nth-child(1) { top: 22px; }
    .jg-mini:nth-child(3) { top: 26px; }
    .jg-dialogo-cuerpo { padding: 24px 18px 20px; }
    .jg-palabras span { font-size: 17px; padding: 8px 11px; }
    .jg-cabecera { gap: 14px; }
    .jg-avatar-grande { width: 72px; height: 72px; }
}

/* ── Movimiento reducido: sin flotar, sin rebotes ───── */
@media (prefers-reduced-motion: reduce) {
    .jg-mini, .jg-mini::after { animation: none; }
    .jg-panel, .jg-ficha, .jg-dialogo[open], .jg-palabras span, .jg-avatar-grande, .jg-toast { animation-name: jg-fundido; animation-duration: .2s; }
    .jg-boton:hover, a.jg-ficha:hover { transform: none; }
    .jg-pestanas .jg-indicador { transition: none; }
    .jg-sacude { animation: none; }
}
@keyframes jg-fundido { from { opacity: 0; } to { opacity: 1; } }

/* ── Sobre de cromos (ilustración en CSS) ───────────── */
.jg-sobre {
    --ancho-sobre: 150px;
    position: relative; width: var(--ancho-sobre); aspect-ratio: 5 / 7; flex-shrink: 0;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6%;
    border-radius: 6px; color: #F4CF7A; text-align: center; overflow: hidden;
    background:
        radial-gradient(circle at 50% 38%, rgba(244, 207, 122, .3), transparent 55%),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24'%3E%3Cpath d='M12 0L24 12L12 24L0 12Z' fill='none' stroke='%23E3A72F' stroke-opacity='.25'/%3E%3C/svg%3E") center / 18px,
        linear-gradient(160deg, #4A3F8F, #2A2650 45%, #1C1A36);
    box-shadow: inset 0 0 0 3px rgba(244, 207, 122, .55), 0 22px 40px -18px rgba(10, 8, 30, .8);
    /* Bordes dentados de arriba y abajo, como un sobre sellado */
    -webkit-mask: radial-gradient(circle 5px at 50% 0, #0000 96%, #000) top / 11px 51% repeat-x, radial-gradient(circle 5px at 50% 100%, #0000 96%, #000) bottom / 11px 51% repeat-x;
    mask: radial-gradient(circle 5px at 50% 0, #0000 96%, #000) top / 11px 51% repeat-x, radial-gradient(circle 5px at 50% 100%, #0000 96%, #000) bottom / 11px 51% repeat-x;
}
.jg-sobre::before { /* reflejo holográfico */
    content: ''; position: absolute; inset: 0; pointer-events: none; mix-blend-mode: color-dodge; opacity: .45;
    background: linear-gradient(115deg, transparent 25%, rgba(255, 120, 200, .6) 38%, rgba(120, 220, 255, .6) 48%, rgba(255, 230, 140, .6) 58%, transparent 72%);
    background-size: 250% 100%; animation: jg-sobre-holo 4s ease-in-out infinite alternate;
}
.jg-sobre svg { width: 46%; height: auto; filter: drop-shadow(0 0 8px rgba(244, 207, 122, .45)); }
.jg-sobre-marca { font-family: 'Fraunces', Georgia, serif; font-weight: 600; font-size: calc(var(--ancho-sobre) * .13); line-height: 1; color: #FFF3D0; }
.jg-sobre-sub { font: 800 calc(var(--ancho-sobre) * .065) / 1 'Inter', sans-serif; letter-spacing: .18em; text-transform: uppercase; color: rgba(244, 207, 122, .85); }
.jg-sobre.flota { animation: jg-sobre-flota 3.4s ease-in-out infinite; }
@keyframes jg-sobre-holo { from { background-position: 100% 0; } to { background-position: 0 0; } }
@keyframes jg-sobre-flota { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-10px) rotate(2deg); } }
@media (prefers-reduced-motion: reduce) { .jg-sobre::before, .jg-sobre.flota { animation: none; } }

/* Aviso de novedades en Mi museo */
.jg-aviso-nuevo {
    display: inline-flex; align-items: center; gap: 10px; margin: 0 0 18px; padding: 12px 18px; border-radius: 999px;
    font: 700 15px/1.2 'Inter', sans-serif; color: var(--jg-tinta); text-decoration: none;
    background: linear-gradient(180deg, #FFF0B3, var(--jg-oro-2)); box-shadow: 0 10px 22px -14px rgba(154, 107, 18, .9);
}
.jg-aviso-nuevo[hidden] { display: none; }
.jg-aviso-nuevo:hover { transform: translateY(-1px); }
.jg-aviso-nuevo:focus-visible { outline: 3px solid var(--jg-noche); outline-offset: 2px; }

/* Medalla de logro conseguido */
.jg-logro {
    position: fixed; left: 50%; bottom: max(24px, env(safe-area-inset-bottom)); z-index: 2500; transform: translateX(-50%);
    display: flex; align-items: center; gap: 14px; width: min(420px, calc(100% - 32px)); padding: 14px 18px; border-radius: 22px;
    color: #FFF6E2; background: linear-gradient(160deg, #3B3570, #1C1A36); box-shadow: 0 0 0 2px rgba(244, 207, 122, .6), 0 24px 48px -18px rgba(10, 8, 30, .8);
    animation: jg-logro-entra .5s cubic-bezier(.34, 1.56, .64, 1);
}
.jg-logro svg { width: 52px; height: 52px; flex-shrink: 0; filter: drop-shadow(0 0 10px rgba(244, 207, 122, .5)); }
.jg-logro strong { display: block; font: 800 12px/1 'Inter', sans-serif; letter-spacing: .14em; text-transform: uppercase; color: #F4CF7A; }
.jg-logro-nombre { display: block; font-family: 'Fraunces', Georgia, serif; font-weight: 600; font-size: 21px; line-height: 1.15; margin-top: 4px; }
.jg-logro-premio { display: block; font-size: 13.5px; color: rgba(246, 239, 226, .75); margin-top: 3px; }
.jg-logro.is-saliendo { animation: jg-logro-sale .35s ease-in forwards; }
@keyframes jg-logro-entra { from { opacity: 0; transform: translate(-50%, 40px) scale(.9); } to { opacity: 1; transform: translateX(-50%); } }
@keyframes jg-logro-sale { to { opacity: 0; transform: translate(-50%, 30px); } }
@media (prefers-reduced-motion: reduce) { .jg-logro, .jg-logro.is-saliendo { animation: none; } }

/* La obra del día (Mi museo) */
.para-leer { display: grid; grid-template-columns: minmax(200px, 340px) 1fr; gap: 26px; align-items: center; }
.para-leer:has(.para-leer-imagen[hidden]) { grid-template-columns: 1fr; }
.para-leer-imagen { display: block; border-radius: 18px; overflow: hidden; background: #1C1A36; aspect-ratio: 4 / 3; box-shadow: 0 16px 30px -20px rgba(23, 19, 15, .6); }
.para-leer-imagen img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--jg-ease); }
.para-leer-imagen:hover img { transform: scale(1.04); }
.para-leer-titulo { font-family: 'Fraunces', Georgia, serif; font-size: 26px; font-weight: 600; line-height: 1.15; letter-spacing: -.01em; margin: 10px 0 8px; }
.para-leer-titulo a { color: inherit; text-decoration: none; }
.para-leer-titulo a[href]:hover { text-decoration: underline; text-decoration-color: var(--jg-oro); text-underline-offset: 4px; }
.para-leer-nota { margin: 14px 0 18px; padding: 12px 16px; border-radius: 14px; background: #FFF8E6; font-size: 14.5px; line-height: 1.5; color: var(--jg-tinta-2); }
.para-leer-botones { display: flex; flex-wrap: wrap; gap: 10px; }
@media (max-width: 680px) { .para-leer { grid-template-columns: 1fr; } }

/* Escaparate de la página de acceso con tres cromos reales */
.jg-vitrina.con-cromos { height: 250px; }
.jg-carta-vitrina { position: absolute; animation: jg-flota 6s ease-in-out infinite; filter: drop-shadow(0 18px 22px rgba(0, 0, 0, .45)); }
.jg-carta-vitrina .cromo { --ancho: 124px; cursor: default; }
.jg-carta-vitrina:nth-child(1) { left: 2%; top: 38px; rotate: -9deg; animation-delay: -1s; }
.jg-carta-vitrina:nth-child(2) { left: 33%; top: 0; z-index: 2; animation-delay: -3s; }
.jg-carta-vitrina:nth-child(2) .cromo { --ancho: 142px; }
.jg-carta-vitrina:nth-child(3) { left: 66%; top: 44px; rotate: 8deg; animation-delay: -4.5s; }
@media (max-width: 520px) {
    .jg-carta-vitrina .cromo { --ancho: 96px; }
    .jg-carta-vitrina:nth-child(2) .cromo { --ancho: 112px; }
    .jg-vitrina.con-cromos { height: 200px; }
}
@media (prefers-reduced-motion: reduce) { .jg-carta-vitrina { animation: none; } }

/* ── Acceder: guía de uso para familias y docentes ── */
.jg-guia {
    margin-top: 44px; display: grid; grid-template-columns: minmax(180px, 290px) 1fr; gap: 40px; align-items: center;
    padding: 34px 38px; border-radius: 28px; background: #fff; border: 1px solid rgba(23, 19, 15, .07);
    box-shadow: 0 18px 40px -30px rgba(23, 19, 15, .5);
}
.jg-guia-vista { display: block; border-radius: 10px; overflow: hidden; transform: rotate(-2.5deg); box-shadow: 0 0 0 1px rgba(23, 19, 15, .08), 0 22px 40px -22px rgba(23, 19, 15, .55); transition: transform .3s var(--jg-ease); }
.jg-guia-vista:hover { transform: rotate(0) scale(1.02); }
.jg-guia-vista img { display: block; width: 100%; height: auto; }
.jg-guia-texto .jg-titulo { font-size: clamp(24px, 3vw, 32px); margin: 12px 0 8px; }
.jg-guia-claves { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 22px; margin: 18px 0 22px; padding: 0; }
.jg-guia-claves li { position: relative; padding-left: 26px; font-size: 14.5px; line-height: 1.45; color: var(--jg-tinta-2); }
.jg-guia-claves li::before { content: ''; position: absolute; left: 0; top: 2px; width: 17px; height: 17px; border-radius: 50%; background: #E6F4EA url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232E7D4F' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center / 11px no-repeat; }
.jg-guia-claves strong { color: var(--jg-tinta); }
.jg-guia-botones { display: flex; flex-wrap: wrap; gap: 10px; }
.jg-guia-nota { margin-top: 12px; font-size: 13px; color: var(--jg-tinta-3); }
@media (max-width: 820px) {
    .jg-guia { grid-template-columns: 1fr; padding: 26px 22px; gap: 26px; }
    .jg-guia-vista { max-width: 250px; margin: 0 auto; }
    .jg-guia-claves { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { .jg-guia-vista, .jg-guia-vista:hover { transform: none; } }

/* Campo trampa del registro: las personas no lo ven; los robots lo rellenan */
.jg-trampa { position: absolute !important; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
