/* === Fonts (self-hosted) === */
@font-face {
    font-family: 'Unbounded';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url(../fonts/unbounded-latin.woff2) format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Unbounded';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url(../fonts/unbounded-latin-ext.woff2) format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Unbounded';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url(../fonts/unbounded-latin.woff2) format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Unbounded';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url(../fonts/unbounded-latin-ext.woff2) format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Unbounded';
    font-style: normal;
    font-weight: 900;
    font-display: swap;
    src: url(../fonts/unbounded-latin.woff2) format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Unbounded';
    font-style: normal;
    font-weight: 900;
    font-display: swap;
    src: url(../fonts/unbounded-latin-ext.woff2) format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Plus Jakarta Sans';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url(../fonts/plusjakarta-latin.woff2) format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Plus Jakarta Sans';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url(../fonts/plusjakarta-latin-ext.woff2) format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Plus Jakarta Sans';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url(../fonts/plusjakarta-latin.woff2) format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Plus Jakarta Sans';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url(../fonts/plusjakarta-latin-ext.woff2) format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Plus Jakarta Sans';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url(../fonts/plusjakarta-latin.woff2) format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Plus Jakarta Sans';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url(../fonts/plusjakarta-latin-ext.woff2) format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* === Variables === */
:root {
    --negro: #0a0a0a;
    --negro-2: #111;
    --negro-3: #1a1a1a;
    --azul: #2D7BFF;
    --azul-2: #8FC0FF;
    --fucsia: #FF1FA9;
    --violeta: #7C3AED;
    --blanco: #fff;
    --gris-1: #E5E7EB;
    --gris-2: #9CA3AF;
    --gris-3: #374151;
    --display: 'Unbounded', sans-serif;
    --body: 'Plus Jakarta Sans', sans-serif;
}

/* === Reset & base === */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    font-family: var(--body);
    background: var(--negro);
    color: var(--blanco);
    line-height: 1.55;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
::selection { background: var(--azul); color: #000; }
button, input, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--azul); outline-offset: 3px; }

/* === Ambient background === */
#ambiente { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
#ambiente i {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: .55;
    mix-blend-mode: screen;
    animation: flotar 14s ease-in-out infinite alternate;
}
#ambiente i:nth-child(1) { width: 60vmax; height: 60vmax; left: -20vmax; top: -20vmax; background: radial-gradient(circle, var(--azul), transparent 60%); }
#ambiente i:nth-child(2) { width: 50vmax; height: 50vmax; right: -15vmax; bottom: -10vmax; background: radial-gradient(circle, var(--violeta), transparent 60%); animation-delay: -5s; animation-duration: 18s; }
#ambiente i:nth-child(3) { width: 30vmax; height: 30vmax; left: 40vw; top: 50vh; background: radial-gradient(circle, var(--fucsia), transparent 60%); opacity: .18; animation-delay: -9s; animation-duration: 11s; }
@keyframes flotar { from { transform: translate(0,0) scale(1); } to { transform: translate(8vw,-6vh) scale(1.15); } }
#grano {
    position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: .07;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* === Header === */
.header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px clamp(18px, 4vw, 48px);
    backdrop-filter: blur(10px);
    background: linear-gradient(rgba(10,10,10,.85), rgba(10,10,10,0));
    border-bottom: none;
}
.header-titulo {
    font-family: var(--display);
    font-weight: 900;
    font-size: 13px;
    letter-spacing: .22em;
    text-transform: uppercase;
}
.header-sub {
    font-size: .7rem;
    color: var(--gris-2);
    letter-spacing: .1em;
}
.lang-selector {
    display: flex;
    gap: 2px;
    border: 1px solid var(--gris-3);
}
.lang-btn {
    background: transparent;
    border: 0;
    padding: 6px 12px;
    font-size: 12px;
    letter-spacing: .15em;
    cursor: pointer;
    color: var(--gris-2);
    font-weight: 600;
}
.lang-btn.activo {
    background: var(--blanco);
    color: #000;
}

/* === Main container === */
.main {
    position: relative;
    z-index: 2;
    max-width: 1100px;
    margin: 0 auto;
    padding: 1.2rem clamp(18px, 4vw, 48px);
}

/* === Portada === */
.portada {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: calc(100vh - 3rem);
    padding: 2rem 0;
}
.portada-titulo {
    font-family: var(--display);
    font-weight: 900;
    font-size: clamp(2rem, 7vw, 3.6rem);
    line-height: 1;
    letter-spacing: -.03em;
    text-transform: uppercase;
    margin-bottom: .4rem;
}
.portada-sub {
    font-size: clamp(.7rem, 1.4vw, .85rem);
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--gris-2);
    margin-bottom: 3rem;
}
.portada-puertas {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    width: 100%;
    max-width: 560px;
}
.portada-puerta {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: clamp(2.4rem, 6vw, 3.6rem) 20px;
    background: var(--negro-2);
    border: 2px solid transparent;
    border-image: linear-gradient(135deg, var(--azul), var(--violeta), var(--fucsia)) 1;
    cursor: pointer;
    transition: transform .25s, box-shadow .25s;
}
.portada-puerta:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 48px -12px rgba(45,123,255,.35);
}
.portada-puerta:active {
    transform: translateY(-1px);
}
.portada-puerta-titulo {
    font-family: var(--display);
    font-weight: 900;
    font-size: clamp(.85rem, 2vw, 1.2rem);
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--blanco);
    line-height: 1.2;
}
.portada-puerta-sub {
    font-size: 11px;
    color: var(--gris-2);
    letter-spacing: .15em;
    text-transform: uppercase;
}
.portada-lang {
    margin-top: 2.5rem;
}
@media (max-width: 480px) {
    .portada-puertas { grid-template-columns: 1fr; max-width: 280px; }
}

/* === Entrada === */
.entrada-titulo {
    font-family: var(--display);
    font-weight: 900;
    font-size: clamp(1.6rem, 5vw, 2.2rem);
    line-height: 1;
    letter-spacing: -.02em;
    margin-bottom: .5rem;
}
.entrada-ayuda {
    font-size: .9rem;
    color: var(--gris-1);
    margin-bottom: 1.2rem;
    max-width: 46ch;
}
.campo-codigos {
    width: 100%;
    min-height: 100px;
    resize: vertical;
    background: var(--negro-2);
    border: 1px solid var(--gris-3);
    color: var(--blanco);
    padding: 18px 20px;
    font-family: var(--display);
    font-weight: 700;
    font-size: clamp(18px, 2vw, 24px);
    letter-spacing: .08em;
    text-transform: uppercase;
    line-height: 1.35;
    transition: border-color .2s, box-shadow .2s;
}
.campo-codigos::placeholder {
    color: #3b3b3b;
    text-transform: none;
    font-family: var(--body);
    font-weight: 400;
    letter-spacing: 0;
    font-size: 16px;
}
.campo-codigos:focus {
    outline: none;
    border-color: var(--fucsia);
    box-shadow: 0 0 0 1px var(--fucsia), 0 0 40px -10px var(--fucsia);
}
.campo-codigos.error {
    border-color: #ff4d4d;
    box-shadow: 0 0 0 1px #ff4d4d;
}

/* === Cajitas de reconocimiento === */
.cajitas {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px 22px;
    margin-top: 1.2rem;
}
@media (max-width: 520px) { .cajitas { grid-template-columns: 1fr; } }
.cajita {
    background: transparent;
    border: 1px solid rgba(255,255,255,.08);
    padding: .8rem;
}
.cajita-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .2em;
    color: var(--gris-2);
    margin-bottom: .5rem;
    display: flex;
    justify-content: space-between;
}
.cajita-items {
    min-height: 1.6rem;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.cajita-item {
    border: 1px solid var(--azul);
    background: rgba(45,123,255,.08);
    color: var(--blanco);
    padding: 6px 10px;
    font-size: 13px;
    display: inline-flex;
    gap: 6px;
    align-items: center;
    animation: enciende .7s cubic-bezier(.2,.9,.2,1);
}
.cajita-item code, .cajita-item .cod {
    font-family: var(--display);
    font-weight: 700;
    font-size: 12px;
    color: var(--azul);
}
@keyframes enciende {
    0% { box-shadow: 0 0 0 0 var(--fucsia); border-color: var(--fucsia); transform: scale(.9); }
    40% { box-shadow: 0 0 30px 0 var(--fucsia); border-color: var(--fucsia); }
    100% { box-shadow: 0 0 0 0 transparent; }
}
.cajita.completa .cajita-label {
    color: var(--fucsia);
}

/* === Errores === */
.errores-lista {
    margin-top: .8rem;
    min-height: 1.4em;
}
.error-msg {
    color: #ff9c9c;
    font-size: 14px;
    margin-bottom: .3rem;
    padding: .3rem 0;
}

/* === Numero tarjeta === */
.campo-tarjeta-wrap {
    margin-top: 1.2rem;
}
.campo-tarjeta {
    width: 100%;
    font-size: .95rem;
    padding: .6rem .8rem;
    background: var(--negro-2);
    border: 1px solid var(--gris-3);
    color: var(--blanco);
    transition: border-color .2s;
}
.campo-tarjeta:focus {
    outline: none;
    border-color: var(--azul);
}
.campo-tarjeta-label {
    font-size: 11px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--gris-2);
    margin-bottom: .3rem;
}

/* === Boton principal === */
.btn-informe {
    appearance: none;
    display: block;
    width: 100%;
    margin-top: 1.5rem;
    padding: 16px 26px;
    font-family: var(--display);
    font-weight: 700;
    font-size: 14px;
    letter-spacing: .12em;
    text-transform: uppercase;
    background: var(--blanco);
    color: #000;
    border: 1px solid var(--blanco);
    cursor: pointer;
    transition: transform .2s, box-shadow .2s;
    border-radius: 0;
}
.btn-informe:disabled {
    opacity: .25;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}
.btn-informe:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px -10px var(--azul);
}
.btn-copiar {
    background: var(--azul);
    border-color: var(--azul);
    color: #000;
}
.btn-nueva {
    background: transparent;
    color: var(--blanco);
    border-color: var(--gris-3);
}
.btn-nueva:hover {
    border-color: var(--blanco);
}

/* === Privacidad === */
.privacidad {
    text-align: center;
    font-size: .72rem;
    color: #555;
    margin-top: 1.2rem;
    padding-top: .8rem;
    border-top: 1px solid rgba(255,255,255,.07);
    letter-spacing: .1em;
}

/* === Informe === */
.inf-cabecera {
    display: none;
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,.07);
}
.inf-titulo-principal {
    font-family: var(--display);
    font-size: clamp(1.6rem, 4vw, 2.2rem);
    font-weight: 900;
    line-height: 1;
    letter-spacing: -.02em;
    margin-bottom: .3rem;
}
.inf-subtitulo {
    font-size: 11px;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--gris-2);
}
.inf-tarjeta-num {
    font-size: 11px;
    color: var(--gris-2);
    margin-top: .4rem;
    font-family: var(--display);
}

/* === Secciones del informe === */
.inf-seccion {
    margin-bottom: 0;
    padding: clamp(2rem, 6vh, 4rem) 0;
    border-top: 1px solid rgba(255,255,255,.07);
}
.inf-seccion:first-child {
    border-top: 0;
}
.inf-seccion h2 {
    font-family: var(--display);
    font-size: clamp(1.2rem, 3vw, 1.6rem);
    font-weight: 900;
    line-height: 1.05;
    letter-spacing: -.02em;
    color: var(--blanco);
    margin-bottom: .8rem;
}

/* Tu tarjeta */
.inf-tu-tarjeta {
    background: transparent;
    border: 1px solid rgba(255,255,255,.1);
    padding: 1.2rem;
    border-radius: 0;
}
.inf-grupo-cod {
    margin-bottom: .6rem;
}
.inf-grupo-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--gris-2);
}

/* Contexto */
.inf-contexto p {
    font-size: clamp(.9rem, 1.2vw, 1.05rem);
    color: var(--gris-1);
    line-height: 1.6;
    font-style: italic;
}

/* Perfil */
.inf-perfil-intro {
    font-size: clamp(1rem, 1.4vw, 1.15rem);
    color: var(--gris-1);
    margin-bottom: .8rem;
}
.inf-perfil-lista {
    list-style: none;
    padding: 0;
    display: grid;
    gap: 8px;
    margin-top: 1rem;
}
.inf-perfil-lista li {
    font-size: .9rem;
    padding: 4px 0 4px 16px;
    color: var(--gris-1);
    border-left: 2px solid var(--azul);
}

/* Leyenda "Cómo leer esto" */
.inf-leyenda-texto {
    font-size: clamp(.85rem, 1.2vw, .95rem);
    color: var(--gris-1);
    line-height: 1.6;
}
.inf-leyenda-texto strong {
    color: var(--blanco);
}
.inf-leyenda-texto em {
    font-style: italic;
    color: var(--azul-2);
}

/* Bloques de profesiones */
.inf-bloque-intro {
    font-size: .88rem;
    color: var(--gris-2);
    margin-bottom: 1rem;
    max-width: 60ch;
}
.inf-bloque-vacio {
    font-size: .88rem;
    color: var(--gris-2);
    font-style: italic;
}
.inf-bloque-destacado {
    border: 1px solid var(--azul);
    padding: clamp(1rem, 3vw, 2rem);
    background: linear-gradient(135deg, rgba(45,123,255,.10), transparent 60%);
    border-radius: 0;
}
.inf-bloque-destacado h2 {
    color: var(--fucsia);
}

/* Profesiones */
.inf-profs {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 1rem;
    counter-reset: prof;
}
.inf-prof {
    display: grid;
    grid-template-columns: 56px 72px 1fr auto;
    gap: 14px 18px;
    align-items: center;
    padding: 18px 22px;
    border: 1px solid rgba(255,255,255,.08);
    background: rgba(255,255,255,.015);
    transition: border-color .25s, transform .25s, background .25s;
    position: relative;
    overflow: hidden;
}
.inf-prof::before {
    counter-increment: prof;
    content: counter(prof, decimal-leading-zero);
    font-family: var(--display);
    font-weight: 900;
    font-size: 26px;
    line-height: 1;
    color: #2a2a2a;
    transition: color .25s;
    align-self: start;
    padding-top: 4px;
}
/* Foto de profesion en informe */
.inf-prof-foto {
    aspect-ratio: 800 / 1433;
    width: 72px;
    overflow: hidden;
    border: 2px solid transparent;
    border-image: linear-gradient(135deg, var(--azul), var(--violeta), var(--fucsia)) 1;
    align-self: start;
}
.inf-prof-foto img {
    width: 100%;
    display: block;
}
.inf-prof-foto.sin-foto {
    background: var(--negro-2);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
}
.inf-prof-foto-fb {
    font-family: var(--display);
    font-weight: 700;
    font-size: 8px;
    text-align: center;
    color: var(--gris-2);
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: .05em;
}
.inf-prof-foto-par {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px;
}
.inf-prof-foto-par img {
    aspect-ratio: 400 / 1433;
    object-fit: cover;
    object-position: top;
}
.inf-prof-texto {
    min-width: 0;
}
.inf-prof:hover {
    border-color: var(--azul);
    transform: translateX(6px);
    background: rgba(45,123,255,.05);
}
.inf-prof:hover::before {
    color: var(--azul);
}
.inf-prof-nombre {
    font-family: var(--display);
    font-weight: 700;
    font-size: clamp(.9rem, 1.4vw, 1.1rem);
    line-height: 1.15;
}
.inf-prof-meta {
    font-size: 12px;
    color: var(--gris-2);
    letter-spacing: .06em;
    margin-top: 4px;
}
.inf-prof-senales {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    align-items: center;
    justify-content: flex-end;
    text-align: right;
    font-size: 12px;
    color: var(--gris-2);
    white-space: nowrap;
    max-width: 46ch;
}
.inf-senal {
    font-size: 12px;
    font-style: normal;
    color: var(--fucsia);
}
.inf-senal-bonus {
    font-weight: 500;
    color: var(--azul-2);
}
.inf-prof-perfiles {
    grid-column: 3 / -1;
    font-size: 13px;
    color: var(--gris-2);
    margin-top: -4px;
}
@media (max-width: 640px) {
    .inf-prof { grid-template-columns: 1fr; gap: 10px; }
    .inf-prof::before { display: none; }
    .inf-prof-foto { width: 100px; justify-self: center; }
    .inf-prof-senales { grid-column: 1; align-items: flex-start; text-align: left; flex-wrap: wrap; gap: 8px; white-space: normal; max-width: none; }
    .inf-prof-perfiles { grid-column: 1; }
}

/* Cierre */
.inf-cierre {
    border: 1px solid var(--azul);
    padding: clamp(1rem, 3vw, 2rem);
    background: linear-gradient(135deg, rgba(45,123,255,.10), transparent 60%);
}
.inf-cierre p {
    font-family: var(--display);
    font-weight: 400;
    font-size: clamp(.95rem, 1.6vw, 1.2rem);
    color: var(--gris-1);
    line-height: 1.4;
    font-style: normal;
}
.inf-pie {
    margin-top: 2rem;
    font-size: 11px;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: #555;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

/* Acciones */
.inf-acciones {
    margin-top: 2rem;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* === Verificacion === */
.verificacion-panel {
    margin-top: 3rem;
    border-top: 1px dashed var(--gris-3);
    padding-top: 1rem;
    color: var(--gris-2);
    font-size: 14px;
}
.verificacion-panel summary {
    cursor: pointer;
    letter-spacing: .16em;
    text-transform: uppercase;
    font-size: 11px;
}
.verificacion-panel table {
    margin-top: 14px;
    border-collapse: collapse;
    width: 100%;
    max-width: 560px;
}
.verificacion-panel td {
    padding: 6px 8px;
    border-bottom: 1px solid #222;
}
.verificacion-panel td:last-child {
    text-align: right;
    font-family: var(--display);
    color: var(--blanco);
}
.verificacion-panel tr.tot td {
    color: var(--fucsia);
    font-weight: 700;
    border-bottom: 0;
}

/* === Juego === */
.juego-pantalla {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: calc(100vh - 8rem);
    padding: 2rem 0;
}
.juego-titulo {
    font-family: var(--display);
    font-weight: 900;
    font-size: clamp(1.6rem, 5vw, 2.2rem);
    line-height: 1;
    letter-spacing: -.02em;
    text-align: center;
    margin-bottom: .5rem;
}
.juego-ayuda {
    font-size: .9rem;
    color: var(--gris-1);
    text-align: center;
    max-width: 42ch;
    margin-bottom: 1.5rem;
}
.juego-contador {
    font-family: var(--display);
    font-weight: 700;
    font-size: 13px;
    letter-spacing: .15em;
    color: var(--fucsia);
    margin-bottom: 1.2rem;
}

/* Género */
.juego-genero-opciones {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    width: 100%;
    max-width: 400px;
}
.juego-genero-btn {
    padding: clamp(2rem, 5vw, 3rem) 20px;
    background: var(--negro-2);
    border: 2px solid transparent;
    border-image: linear-gradient(135deg, var(--azul), var(--violeta), var(--fucsia)) 1;
    cursor: pointer;
    font-family: var(--display);
    font-weight: 700;
    font-size: clamp(.85rem, 2vw, 1rem);
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--blanco);
    transition: transform .25s, box-shadow .25s;
}
.juego-genero-btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 48px -12px rgba(45,123,255,.35);
}
.juego-genero-btn:active {
    transform: translateY(-1px);
}

/* Rejilla de cartas (oficios) */
.juego-rejilla {
    display: grid;
    gap: 14px;
    width: 100%;
}
.juego-rejilla-oficios {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    max-width: 740px;
}
.juego-carta {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: clamp(1.2rem, 3vw, 1.8rem) 14px;
    background: var(--negro-2);
    border: 2px solid rgba(255,255,255,.1);
    cursor: pointer;
    transition: border-color .25s, transform .25s, box-shadow .25s, opacity .3s;
}
.juego-carta-codigo {
    font-family: var(--display);
    font-weight: 900;
    font-size: 22px;
    color: var(--gris-3);
    transition: color .25s;
}
.juego-carta-nombre {
    font-size: 13px;
    text-align: center;
    line-height: 1.25;
    color: var(--gris-1);
}
.juego-carta:hover {
    border-color: var(--azul);
    transform: translateY(-3px);
    box-shadow: 0 12px 36px -8px rgba(45,123,255,.25);
}
.juego-carta.seleccionada {
    border: 2px solid transparent;
    border-image: linear-gradient(135deg, var(--azul), var(--violeta), var(--fucsia)) 1;
    background: rgba(45,123,255,.08);
}
.juego-carta.seleccionada .juego-carta-codigo {
    color: var(--fucsia);
}
.juego-carta.atenuada {
    opacity: .55;
    pointer-events: none;
}

/* Navegación del juego */
.juego-nav {
    display: flex;
    gap: 14px;
    margin-top: 2rem;
    width: 100%;
    max-width: 400px;
}
.juego-nav-btn {
    flex: 1;
    padding: 14px 20px;
    font-family: var(--display);
    font-weight: 700;
    font-size: 13px;
    letter-spacing: .1em;
    text-transform: uppercase;
    background: transparent;
    color: var(--blanco);
    border: 1px solid var(--gris-3);
    cursor: pointer;
    transition: border-color .2s, transform .2s;
}
.juego-nav-btn:hover {
    border-color: var(--blanco);
    transform: translateY(-2px);
}
.juego-nav-siguiente {
    background: var(--blanco);
    color: #000;
    border-color: var(--blanco);
}
.juego-nav-btn:disabled {
    opacity: .25;
    cursor: not-allowed;
    transform: none;
}

/* Tareas cards */
.juego-rejilla-tareas {
    grid-template-columns: repeat(3, 1fr);
    max-width: 740px;
}
.juego-carta-tarea {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 0;
    background: var(--negro-2);
    border: 2px solid rgba(255,255,255,.1);
    cursor: pointer;
    transition: border-color .25s, transform .25s, box-shadow .25s, opacity .3s;
    overflow: hidden;
}
.juego-carta-tarea-img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    display: block;
}
.juego-carta-tarea-nombre {
    font-size: 12px;
    text-align: center;
    line-height: 1.3;
    color: var(--gris-1);
    padding: 0 10px 14px;
}
.juego-carta-tarea:hover {
    border-color: var(--azul);
    transform: translateY(-3px);
    box-shadow: 0 12px 36px -8px rgba(45,123,255,.25);
}
.juego-carta-tarea.seleccionada {
    border: 2px solid transparent;
    border-image: linear-gradient(135deg, var(--azul), var(--violeta), var(--fucsia)) 1;
    background: rgba(45,123,255,.08);
}
.juego-carta-tarea.atenuada {
    opacity: .55;
    pointer-events: none;
}

/* Paginador */
.juego-paginador {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 1.2rem;
}
.juego-pag-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--negro-2);
    border: 1px solid var(--gris-3);
    color: var(--blanco);
    font-size: 18px;
    cursor: pointer;
    transition: border-color .2s;
}
.juego-pag-btn:hover { border-color: var(--blanco); }
.juego-pag-btn:disabled { opacity: .25; cursor: not-allowed; }
.juego-pag-texto {
    font-family: var(--display);
    font-size: 12px;
    letter-spacing: .12em;
    color: var(--gris-2);
}

/* Mundos (pantalla completa, apilados) */
.juego-mundos-wrap {
    align-items: stretch;
    gap: 0;
}
.juego-mundos-wrap .juego-titulo,
.juego-mundos-wrap .juego-ayuda {
    align-self: center;
}
.juego-mundo {
    display: flex;
    flex-direction: column;
    width: 100%;
    background: var(--negro-2);
    border: 2px solid rgba(255,255,255,.1);
    cursor: pointer;
    overflow: hidden;
    transition: border-color .35s, opacity .35s, transform .35s, box-shadow .35s;
    margin-bottom: 1.5rem;
    padding: 0;
    text-align: left;
}
.juego-mundo-img {
    width: 100%;
    aspect-ratio: 1920 / 1080;
    object-fit: cover;
    display: block;
}
.juego-mundo-texto {
    padding: clamp(1rem, 3vw, 1.6rem) clamp(1rem, 3vw, 1.5rem);
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.juego-mundo-codigo {
    font-family: var(--display);
    font-weight: 900;
    font-size: 14px;
    color: var(--gris-3);
    letter-spacing: .1em;
    transition: color .25s;
}
.juego-mundo-nombre {
    font-family: var(--display);
    font-weight: 900;
    font-size: clamp(1rem, 2.5vw, 1.3rem);
    line-height: 1.15;
    color: var(--blanco);
}
.juego-mundo-desc {
    font-size: clamp(.8rem, 1.2vw, .9rem);
    color: var(--gris-2);
    line-height: 1.5;
}
.juego-mundo:hover {
    border-color: var(--azul);
    transform: translateY(-3px);
    box-shadow: 0 16px 48px -12px rgba(45,123,255,.25);
}
.juego-mundo.seleccionado {
    border: 2px solid transparent;
    border-image: linear-gradient(135deg, var(--azul), var(--violeta), var(--fucsia)) 1;
    box-shadow: 0 0 60px -12px rgba(124,58,237,.35);
}
.juego-mundo.seleccionado .juego-mundo-codigo {
    color: var(--fucsia);
}
.juego-mundo.atenuado {
    opacity: .55;
}
.juego-mundo.atenuado:hover {
    opacity: .7;
    transform: none;
    box-shadow: none;
}

/* Afinidades */
.juego-rejilla-afinidades {
    grid-template-columns: 1fr 1fr;
    max-width: 740px;
    gap: 16px;
}
.juego-carta-afin {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 14px;
    padding: 0;
    background: var(--negro-2);
    border: 2px solid rgba(255,255,255,.1);
    cursor: pointer;
    overflow: hidden;
    transition: border-color .25s, transform .25s, box-shadow .25s, opacity .3s;
    text-align: left;
}
.juego-carta-afin-img {
    width: 80px;
    min-width: 80px;
    aspect-ratio: 1;
    object-fit: cover;
    display: block;
    align-self: stretch;
}
.juego-carta-afin-desc {
    font-size: clamp(.78rem, 1.1vw, .88rem);
    line-height: 1.4;
    color: var(--gris-1);
    padding: 12px 14px 12px 0;
}
.juego-carta-afin:hover {
    border-color: var(--azul);
    transform: translateY(-2px);
    box-shadow: 0 12px 36px -8px rgba(45,123,255,.25);
}
.juego-carta-afin.seleccionada {
    border: 2px solid transparent;
    border-image: linear-gradient(135deg, var(--azul), var(--violeta), var(--fucsia)) 1;
    background: rgba(45,123,255,.08);
}
.juego-carta-afin.atenuada {
    opacity: .55;
    pointer-events: none;
}

/* Tarjeta montada */
.juego-tarjeta-grupos {
    width: 100%;
    max-width: 600px;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    margin-bottom: 1.5rem;
}
.juego-tarjeta-grupo {
    border: 1px solid rgba(255,255,255,.1);
    padding: 1rem 1.2rem;
    background: rgba(255,255,255,.015);
}
.juego-tarjeta-grupo-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: .6rem;
}
.juego-tarjeta-grupo-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .2em;
    color: var(--gris-2);
}
.juego-tarjeta-cambiar {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--azul);
    background: transparent;
    border: 1px solid var(--azul);
    padding: 4px 12px;
    cursor: pointer;
    transition: background .2s, color .2s;
}
.juego-tarjeta-cambiar:hover {
    background: var(--azul);
    color: #000;
}
.juego-tarjeta-grupo-items {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.juego-tarjeta-hash {
    font-family: var(--display);
    font-size: 11px;
    letter-spacing: .08em;
    color: var(--gris-3);
    word-break: break-all;
    text-align: center;
    max-width: 600px;
    margin-bottom: 1rem;
}
.juego-tarjeta-confirmar {
    max-width: 400px;
}

@media (max-width: 640px) {
    .juego-rejilla-afinidades { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
    .juego-genero-opciones { grid-template-columns: 1fr; max-width: 260px; }
    .juego-rejilla-oficios { grid-template-columns: 1fr 1fr; }
    .juego-rejilla-tareas { grid-template-columns: 1fr 1fr; }
}

/* === Scroll reveal === */
.rv {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity .9s cubic-bezier(.2,.8,.2,1), transform .9s cubic-bezier(.2,.8,.2,1);
    transition-delay: calc(var(--i, 0) * 90ms);
}
.rv.in {
    opacity: 1;
    transform: none;
}

/* === Vista oculta === */
.oculto { display: none !important; }

/* === Reduced motion === */
@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; transition: none !important; }
    .rv { opacity: 1; transform: none; }
}

/* === Print A4 — informe blanco maquetado === */

/* Foto estrella: oculta en pantalla */
.inf-print-estrella { display: none; }

@media print {
    .no-print { display: none !important; }
    * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }

    html, body {
        background: #fff !important;
        color: #1a1a1a;
        font-family: 'Plus Jakarta Sans', sans-serif;
        font-size: 9.5pt;
        line-height: 1.45;
        margin: 0;
        padding: 0;
    }

    @page {
        size: A4 portrait;
        margin: 14mm 16mm;
    }

    #ambiente, #grano { display: none !important; }
    .header { display: none !important; }
    .main { max-width: 100%; padding: 0; margin: 0; }
    #vista-portada { display: none !important; }
    #vista-entrada { display: none !important; }
    #vista-juego { display: none !important; }
    #vista-informe { display: block !important; }
    .rv { opacity: 1 !important; transform: none !important; transition: none !important; }
    .inf-acciones { display: none !important; }
    .privacidad { display: none !important; }
    .verificacion-panel { display: none !important; }

    /* --- Marco de página --- */
    #vista-informe {
        border: 2pt solid #1a1a1a;
        padding: 10mm;
        outline: .5pt solid #ccc;
        outline-offset: 3pt;
    }

    /* --- Cabecera --- */
    .inf-cabecera {
        display: flex;
        align-items: center;
        gap: 16pt;
        border-bottom: 1.5pt solid #1a1a1a;
        padding-bottom: 8pt;
        margin-bottom: 6pt;
    }
    .inf-titulo-principal {
        font-size: 15pt;
        color: #1a1a1a;
        margin: 0;
        flex: 1;
    }
    .inf-subtitulo { font-size: 8pt; color: #555; letter-spacing: .1em; }
    .inf-tarjeta-num { font-size: 8pt; color: #555; }

    /* --- Foto estrella (solo print) --- */
    .inf-print-estrella {
        display: block;
        text-align: center;
        margin: 8pt 0 6pt;
        break-inside: avoid;
    }
    .inf-print-estrella img {
        width: 55mm;
        max-height: 90mm;
        object-fit: cover;
        border: 1pt solid #ccc;
    }
    .inf-print-estrella-nombre {
        font-family: 'Unbounded', sans-serif;
        font-weight: 700;
        font-size: 11pt;
        margin-top: 4pt;
        color: #1a1a1a;
    }

    /* --- Secciones --- */
    .inf-seccion {
        padding: 5pt 0;
        margin-bottom: 0;
        border-top: .5pt solid #ddd;
        break-inside: avoid;
    }
    .inf-seccion:first-child { border-top: 0; }
    .inf-seccion h2 {
        font-size: 10.5pt;
        margin-bottom: 3pt;
        color: #1a1a1a;
    }

    /* Tu tarjeta */
    .inf-tu-tarjeta {
        background: #f8f8f8;
        border: .5pt solid #ccc;
        padding: 6pt 8pt;
    }
    .cajita-item {
        background: none;
        border: .5pt solid #aaa;
        color: #1a1a1a;
        padding: 1pt 4pt;
        font-size: 7pt;
    }
    .inf-grupo-label { font-size: 6.5pt; color: #555; }
    .inf-grupo-cod { margin-bottom: 2pt; }

    /* Contexto */
    .inf-contexto p { font-size: 8pt; color: #444; font-style: italic; }

    /* Leyenda */
    .inf-leyenda { break-inside: avoid; }
    .inf-leyenda h2 { font-size: 9pt; }
    .inf-leyenda-texto { font-size: 7.5pt; color: #444; }
    .inf-leyenda-texto strong { color: #1a1a1a; }
    .inf-leyenda-texto em { color: #333; }

    /* Perfil */
    .inf-perfil-intro { font-size: 8.5pt; color: #222; }
    .inf-perfil-lista li {
        font-size: 8pt;
        padding: 1pt 0 1pt 8pt;
        color: #222;
        border-left: 1.5pt solid #1a1a1a;
    }

    /* Bloques de profesiones */
    .inf-bloque-intro { font-size: 7.5pt; color: #555; margin-bottom: 3pt; }
    .inf-bloque-vacio { font-size: 7.5pt; }

    .inf-bloque-destacado {
        background: none !important;
        border: 1.5pt solid #1a1a1a;
        padding: 6pt 8pt;
    }
    .inf-bloque-destacado h2 { color: #1a1a1a; }

    /* Fichas de profesión */
    .inf-profs { gap: 3pt; }
    .inf-prof {
        background: none;
        border: .5pt solid #ccc;
        padding: 4pt 6pt;
        break-inside: avoid;
        grid-template-columns: 20pt 1fr auto;
        gap: 4pt;
    }
    .inf-prof::before {
        color: #aaa;
        font-size: 9pt;
        display: block;
        align-self: start;
        padding-top: 1pt;
    }
    /* Ocultar fotos individuales en print (la estrella las sustituye) */
    .inf-prof-foto { display: none !important; }
    .inf-prof-nombre { font-size: 8.5pt; color: #1a1a1a; }
    .inf-prof-meta { font-size: 6.5pt; color: #555; margin-top: 1pt; }
    .inf-prof-senales { gap: 2pt; justify-content: flex-start; text-align: left; }
    .inf-senal { font-size: 6.5pt; color: #333; }
    .inf-senal-bonus { color: #1a1a1a; font-weight: 700; }
    .inf-prof-perfiles { font-size: 6.5pt; color: #555; grid-column: 2 / -1; }

    @media (max-width: 640px) {
        .inf-prof { grid-template-columns: 1fr; }
        .inf-prof::before { display: none; }
        .inf-prof-perfiles { grid-column: 1; }
    }

    /* Cierre */
    .inf-cierre {
        border: 1pt solid #1a1a1a;
        background: none !important;
        padding: 6pt 8pt;
        break-inside: avoid;
    }
    .inf-cierre p { font-size: 8pt; color: #333; }

    /* Pie */
    .inf-pie {
        font-size: 6.5pt;
        color: #888;
        border-top: .5pt solid #ccc;
        margin-top: 4pt;
        padding-top: 3pt;
    }
}
